const-fy function parameter struct address_space *aspace
[deliverable/binutils-gdb.git] / gdb / ChangeLog
CommitLineData
accd0bcd
YQ
12017-10-26 Yao Qi <yao.qi@linaro.org>
2
3 * breakpoint.c (breakpoint_location_address_match): Change
4 "struct address_space *" to "const address_space".
5 (breakpoint_location_address_range_overlap): Likewise.
6 (breakpoint_here_p): Likewise.
7 (breakpoint_in_range_p): Likewise.
8 (moribund_breakpoint_here_p): Likewise.
9 (bp_location_inserted_here_p): Likewise.
10 (software_breakpoint_inserted_here_p): Likewise.
11 (hardware_breakpoint_inserted_here_p): Likewise.
12 (hardware_watchpoint_inserted_in_range): Likewise.
13 (bpstat_check_location): Likewise.
14 (bpstat_stop_status): Likewise.
15 (breakpoint_address_match): Likewise.
16 (breakpoint_address_match_range): Likewise.
17 (breakpoint_location_address_match): Likewise.
18 (breakpoint_location_address_range_overlap): Likewise.
19 (insert_single_step_breakpoint): Likewise.
20 (breakpoint_has_location_inserted_here): Likewise.
21 (single_step_breakpoint_inserted_here_p): Likewise.
22 (pc_at_non_inline_function): Likewise.
23 * breakpoint.h (bpstat_stop_status): Update declaration.
24 (breakpoint_here_p): Likewise.
25 (breakpoint_in_range_p): Likewise.
26 (moribund_breakpoint_here_p): Likewise.
27 (breakpoint_inserted_here_p): Likewise.
28 (software_breakpoint_inserted_here_p): Likewise.
29 (hardware_breakpoint_inserted_here_p): Likewise.
30 (breakpoint_has_location_inserted_here): Likewise.
31 (single_step_breakpoint_inserted_here_p): Likewise.
32 (hardware_watchpoint_inserted_in_range): Likewise.
33 (breakpoint_address_match): Likewise.
34 (insert_single_step_breakpoint): Likewise.
35 (pc_at_non_inline_function): Likewise.
36 * gdbthread.h (thread_has_single_step_breakpoint_here): Likewise.
37 * record.c (record_check_stopped_by_breakpoint): Likewise.
38 * record.h (record_check_stopped_by_breakpoint): Likewise.
39 * thread.c (thread_has_single_step_breakpoint_here): Likewise.
40
ac7936df
YQ
412017-10-25 Yao Qi <yao.qi@linaro.org>
42
43 * aarch32-linux-nat.c (aarch32_gp_regcache_supply): Use
44 regcache->arch () instead get_regcache_arch.
45 * aarch64-fbsd-nat.c (aarch64_fbsd_fetch_inferior_registers):
46 Likewise.
47 (aarch64_fbsd_store_inferior_registers): Likewise.
48 * aarch64-linux-nat.c (fetch_gregs_from_thread): Likewise.
49 (store_gregs_to_thread): Likewise.
50 (fetch_fpregs_from_thread): Likewise.
51 (store_fpregs_to_thread): Likewise.
52 * aarch64-tdep.c (aarch64_extract_return_value): Likewise.
53 (aarch64_store_return_value): Likewise.
54 (aarch64_software_single_step): Likewise.
55 * aix-thread.c (aix_thread_wait): Likewise.
56 (supply_reg32): Likewise.
57 (supply_sprs64): Likewise.
58 (supply_sprs32): Likewise.
59 (fill_gprs64): Likewise.
60 (fill_gprs32): Likewise.
61 (fill_sprs64): Likewise.
62 (fill_sprs32): Likewise.
63 (store_regs_user_thread): Likewise.
64 (store_regs_kernel_thread): Likewise.
65 * alpha-bsd-nat.c (alphabsd_fetch_inferior_registers): Likewise.
66 (alphabsd_store_inferior_registers): Likewise.
67 * alpha-tdep.c (alpha_extract_return_value): Likewise.
68 (alpha_store_return_value): Likewise.
69 (alpha_deal_with_atomic_sequence): Likewise.
70 (alpha_next_pc): Likewise.
71 (alpha_software_single_step): Likewise.
72 * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers): Likewise.
73 (amd64bsd_store_inferior_registers): Likewise.
74 * amd64-linux-nat.c (amd64_linux_fetch_inferior_registers):
75 Likewise.
76 (amd64_linux_store_inferior_registers): Likewise.
77 * amd64-nat.c (amd64_supply_native_gregset): Likewise.
78 (amd64_collect_native_gregset): Likewise.
79 * amd64-obsd-tdep.c (amd64obsd_supply_uthread): Likewise.
80 (amd64obsd_collect_uthread): Likewise.
81 * amd64-tdep.c (amd64_supply_fpregset): Likewise.
82 (amd64_collect_fpregset): Likewise.
83 (amd64_supply_fxsave): Likewise.
84 (amd64_supply_xsave): Likewise.
85 (amd64_collect_fxsave): Likewise.
86 (amd64_collect_xsave): Likewise.
87 * arc-tdep.c (arc_write_pc): Likewise.
88 * arch-utils.c (default_skip_permanent_breakpoint): Likewise.
89 * arm-fbsd-nat.c (arm_fbsd_fetch_inferior_registers): Likewise.
90 (arm_fbsd_store_inferior_registers): Likewise.
91 * arm-linux-nat.c (fetch_vfp_regs): Likewise.
92 (store_vfp_regs): Likewise.
93 (arm_linux_fetch_inferior_registers): Likewise.
94 (arm_linux_store_inferior_registers): Likewise.
95 * arm-linux-tdep.c (arm_linux_supply_gregset): Likewise.
96 (arm_linux_sigreturn_next_pc): Likewise.
97 (arm_linux_get_next_pcs_syscall_next_pc): Likewise.
98 * arm-nbsd-nat.c (arm_supply_gregset): Likewise.
99 (fetch_register): Likewise.
100 (store_register): Likewise.
101 * arm-tdep.c (arm_is_thumb): Likewise.
102 (displaced_in_arm_mode): Likewise.
103 (bx_write_pc): Likewise.
104 (arm_get_next_pcs_addr_bits_remove): Likewise.
105 (arm_software_single_step): Likewise.
106 (arm_extract_return_value): Likewise.
107 (arm_store_return_value): Likewise.
108 (arm_write_pc): Likewise.
109 * bfin-tdep.c (bfin_extract_return_value): Likewise.
110 * bsd-uthread.c (bsd_uthread_fetch_registers): Likewise.
111 (bsd_uthread_store_registers): Likewise.
112 * core-regset.c (fetch_core_registers): Likewise.
113 * corelow.c (get_core_registers): Likewise.
114 * cris-tdep.c (cris_store_return_value): Likewise.
115 (cris_extract_return_value): Likewise.
116 (find_step_target): Likewise.
117 (find_step_target): Likewise.
118 (cris_software_single_step): Likewise.
119 * ctf.c (ctf_fetch_registers): Likewise.
120 * darwin-nat.c (cancel_breakpoint): Likewise.
121 * fbsd-tdep.c (fbsd_collect_thread_registers): Likewise.
122 * frv-tdep.c (frv_extract_return_value): Likewise.
123 * ft32-tdep.c (ft32_store_return_value): Likewise.
124 (ft32_extract_return_value): Likewise.
125 * go32-nat.c (fetch_register): Likewise.
126 (go32_fetch_registers): Likewise.
127 (go32_store_registers): Likewise.
128 (store_register): Likewise.
129 * h8300-tdep.c (h8300_extract_return_value): Likewise.
130 (h8300_store_return_value): Likewise.
131 * hppa-linux-nat.c (fetch_register): Likewise.
132 (store_register): Likewise.
133 (hppa_linux_fetch_inferior_registers): Likewise.
134 (hppa_linux_store_inferior_registers): Likewise.
135 * i386-darwin-nat.c (i386_darwin_fetch_inferior_registers): Likewise.
136 (i386_darwin_store_inferior_registers): Likewise.
137 * i386-gnu-nat.c (gnu_fetch_registers): Likewise.
138 (gnu_store_registers): Likewise.
139 * i386-linux-nat.c (fetch_register): Likewise.
140 (store_register): Likewise.
141 (supply_gregset): Likewise.
142 (fill_gregset): Likewise.
143 (i386_linux_fetch_inferior_registers): Likewise.
144 (i386_linux_store_inferior_registers): Likewise.
145 (i386_linux_resume): Likewise.
146 * i386-linux-tdep.c (i386_linux_get_syscall_number_from_regcache):
147 Likewise.
148 * i386-nto-tdep.c (i386nto_supply_gregset): Likewise.
149 * i386-obsd-nat.c (i386obsd_supply_pcb): Likewise.
150 * i386-obsd-tdep.c (i386obsd_supply_uthread): Likewise.
151 (i386obsd_collect_uthread): Likewise.
152 * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
153 (i386_supply_gregset): Likewise.
154 (i386_collect_gregset): Likewise.
155 (i386_supply_fpregset): Likewise.
156 (i386_collect_fpregset): Likewise.
157 (i386_mpx_bd_base): Likewise.
158 * i386-v4-nat.c (supply_fpregset): Likewise.
159 (fill_fpregset): Likewise.
160 * i387-tdep.c (i387_supply_fsave): Likewise.
161 (i387_collect_fsave): Likewise.
162 (i387_supply_fxsave): Likewise.
163 (i387_collect_fxsave): Likewise.
164 (i387_supply_xsave): Likewise.
165 (i387_collect_xsave): Likewise.
166 * ia64-linux-nat.c (ia64_linux_fetch_registers): Likewise.
167 (ia64_linux_store_registers): Likewise.
168 * ia64-tdep.c (ia64_access_rse_reg): Likewise.
169 (ia64_extract_return_value): Likewise.
170 (ia64_store_return_value): Likewise.
171 (find_func_descr): Likewise.
172 * inf-child.c (inf_child_fetch_inferior_registers): Likewise.
173 * inf-ptrace.c (inf_ptrace_fetch_registers): Likewise.
174 (inf_ptrace_store_registers): Likewise.
175 * infrun.c (use_displaced_stepping): Likewise.
176 (displaced_step_prepare_throw): Likewise.
177 (resume): Likewise.
178 (proceed): Likewise.
179 (do_target_wait): Likewise.
180 (adjust_pc_after_break): Likewise.
181 (handle_inferior_event_1): Likewise.
182 (handle_signal_stop): Likewise.
183 (save_infcall_suspend_state): Likewise.
184 (restore_infcall_suspend_state): Likewise.
185 * iq2000-tdep.c (iq2000_extract_return_value): Likewise.
186 * jit.c (jit_frame_prev_register): Likewise.
187 * linux-nat.c (save_stop_reason): Likewise.
188 (linux_nat_wait_1): Likewise.
189 (resume_stopped_resumed_lwps): Likewise.
190 * linux-record.c (record_linux_sockaddr): Likewise.
191 (record_linux_msghdr): Likewise.
192 (record_linux_system_call): Likewise.
193 * linux-tdep.c (linux_collect_thread_registers): Likewise.
194 * lm32-tdep.c (lm32_extract_return_value): Likewise.
195 (lm32_store_return_value): Likewise.
196 * m32c-tdep.c (m32c_read_flg): Likewise.
197 (m32c_pseudo_register_read): Likewise.
198 (m32c_pseudo_register_write): Likewise.
199 * m32r-linux-tdep.c (m32r_linux_supply_gregset): Likewise.
200 (m32r_linux_collect_gregset): Likewise.
201 * m32r-tdep.c (m32r_store_return_value): Likewise.
202 (m32r_extract_return_value): Likewise.
203 * m68k-bsd-nat.c (m68kbsd_supply_fpregset): Likewise.
204 (m68kbsd_collect_fpregset): Likewise.
205 * m68k-bsd-tdep.c (m68kbsd_supply_fpregset): Likewise.
206 * m68k-linux-nat.c (fetch_register): Likewise.
207 (old_fetch_inferior_registers): Likewise.
208 (old_store_inferior_registers): Likewise.
209 (store_regs): Likewise.
210 * m68k-tdep.c (m68k_svr4_extract_return_value): Likewise.
211 (m68k_svr4_store_return_value): Likewise.
212 * m88k-tdep.c (m88k_store_arguments): Likewise.
213 * mi/mi-main.c (mi_cmd_data_list_changed_registers): Likewise.
214 (mi_cmd_data_write_register_values): Likewise.
215 * mips-fbsd-nat.c (mips_fbsd_fetch_inferior_registers): Likewise.
216 (mips_fbsd_store_inferior_registers): Likewise.
217 * mips-fbsd-tdep.c (mips_fbsd_supply_fpregs): Likewise.
218 (mips_fbsd_supply_gregs): Likewise.
219 (mips_fbsd_collect_fpregs): Likewise.
220 (mips_fbsd_collect_gregs): Likewise.
221 (mips_fbsd_supply_fpregset): Likewise.
222 (mips_fbsd_collect_fpregset): Likewise.
223 (mips_fbsd_supply_gregset): Likewise.
224 (mips_fbsd_collect_gregset): Likewise.
225 * mips-linux-nat.c (supply_gregset): Likewise.
226 (fill_gregset): Likewise.
227 (supply_fpregset): Likewise.
228 (fill_fpregset): Likewise.
229 * mips-linux-tdep.c (mips_supply_gregset): Likewise.
230 (mips_fill_gregset): Likewise.
231 (mips_supply_fpregset): Likewise.
232 (mips_fill_fpregset): Likewise.
233 (mips64_supply_gregset): Likewise.
234 (micromips_linux_sigframe_validate): Likewise.
235 * mips-nbsd-nat.c (mipsnbsd_fetch_inferior_registers): Likewise.
236 (mipsnbsd_fetch_inferior_registers): Likewise.
237 (mipsnbsd_store_inferior_registers): Likewise.
238 * mips-nbsd-tdep.c (mipsnbsd_supply_fpregset): Likewise.
239 (mipsnbsd_supply_gregset): Likewise.
240 (mipsnbsd_iterate_over_regset_sections): Likewise.
241 (mipsnbsd_supply_reg): Likewise.
242 (mipsnbsd_supply_fpreg): Likewise.
243 * mips-tdep.c (mips_in_frame_stub): Likewise.
244 (mips_dummy_id): Likewise.
245 (is_octeon_bbit_op): Likewise.
246 (micromips_bc1_pc): Likewise.
247 (extended_mips16_next_pc): Likewise.
248 (mips16_next_pc): Likewise.
249 (deal_with_atomic_sequence): Likewise.
250 * moxie-tdep.c (moxie_process_readu): Likewise.
251 * nios2-tdep.c (nios2_get_next_pc): Likewise.
252 * nto-procfs.c (procfs_store_registers): Likewise.
253 * ppc-fbsd-nat.c (ppcfbsd_fetch_inferior_registers): Likewise.
254 (ppcfbsd_store_inferior_registers): Likewise.
255 * ppc-linux-nat.c (fetch_vsx_register): Likewise.
256 (fetch_altivec_register): Likewise.
257 (get_spe_registers): Likewise.
258 (fetch_spe_register): Likewise.
259 (fetch_altivec_registers): Likewise.
260 (fetch_all_gp_regs): Likewise.
261 (fetch_all_fp_regs): Likewise.
262 (store_vsx_register): Likewise.
263 (store_altivec_register): Likewise.
264 (set_spe_registers): Likewise.
265 (store_spe_register): Likewise.
266 (store_altivec_registers): Likewise.
267 (store_all_gp_regs): Likewise.
268 (store_all_fp_regs): Likewise.
269 * ppc-linux-tdep.c (ppc_linux_supply_gregset): Likewise.
270 (ppc_linux_collect_gregset): Likewise.
271 (ppc_canonicalize_syscall): Likewise.
272 (ppc_linux_record_signal): Likewise.
273 (ppu2spu_prev_register): Likewise.
274 * ppc-nbsd-nat.c (ppcnbsd_supply_pcb): Likewise.
275 * ppc-obsd-nat.c (ppcobsd_fetch_registers): Likewise.
276 (ppcobsd_store_registers): Likewise.
277 * ppc-ravenscar-thread.c (ppc_ravenscar_generic_fetch_registers):
278 Likewise.
279 (ppc_ravenscar_generic_store_registers): Likewise.
280 * procfs.c (procfs_fetch_registers): Likewise.
281 (procfs_store_registers): Likewise.
282 * ravenscar-thread.c (ravenscar_fetch_registers): Likewise.
283 (ravenscar_store_registers): Likewise.
284 (ravenscar_prepare_to_store): Likewise.
285 * record-btrace.c (record_btrace_fetch_registers): Likewise.
286 * record-full.c (record_full_wait_1): Likewise.
287 (record_full_registers_change): Likewise.
288 (record_full_store_registers): Likewise.
289 (record_full_core_fetch_registers): Likewise.
290 (record_full_save): Likewise.
291 (record_full_goto_insn): Likewise.
292 * regcache.c (regcache_register_size): Likewise.
293 (get_regcache_arch): Remove.
294 (regcache_read_pc): Likewise.
295 * regcache.h (get_regcache_arch): Remove.
296 * remote-sim.c (gdbsim_fetch_register): Likewise.
297 (gdbsim_store_register): Likewise.
298 * remote.c (fetch_register_using_p): Likewise.
299 (send_g_packet): Likewise.
300 (remote_prepare_to_store): Likewise.
301 (store_registers_using_G): Likewise.
302 * reverse.c (save_bookmark_command): Likewise.
303 (goto_bookmark_command): Likewise.
304 * rs6000-aix-tdep.c (branch_dest): Likewise.
305 * rs6000-nat.c (rs6000_ptrace64): Likewise.
306 (fetch_register): Likewise.
307 * rs6000-tdep.c (ppc_supply_reg): Likewise.
308 (ppc_collect_reg): Likewise.
309 (ppc_collect_gregset): Likewise.
310 (ppc_collect_fpregset): Likewise.
311 (ppc_collect_vsxregset): Likewise.
312 (ppc_collect_vrregset): Likewise.
313 (ppc_displaced_step_hw_singlestep): Likewise.
314 (rs6000_pseudo_register_read): Likewise.
315 (rs6000_pseudo_register_write): Likewise.
316 * s390-linux-nat.c (supply_gregset): Likewise.
317 (fill_gregset): Likewise.
318 (s390_linux_fetch_inferior_registers): Likewise.
319 * s390-linux-tdep.c (s390_write_pc): Likewise.
320 (s390_software_single_step): Likewise.
321 (s390_all_but_pc_registers_record): Likewise.
322 (s390_linux_syscall_record): Likewise.
323 * sentinel-frame.c (sentinel_frame_prev_arch): Likewise.
324 * sh-nbsd-nat.c (shnbsd_fetch_inferior_registers): Likewise.
325 (shnbsd_store_inferior_registers): Likewise.
326 * sh-tdep.c (sh_extract_return_value_nofpu): Likewise.
327 (sh_extract_return_value_fpu): Likewise.
328 (sh_store_return_value_nofpu): Likewise.
329 (sh_corefile_supply_regset): Likewise.
330 (sh_corefile_collect_regset): Likewise.
331 * sh64-tdep.c (sh64_extract_return_value): Likewise.
332 (sh64_store_return_value): Likewise.
333 * sparc-linux-tdep.c (sparc32_linux_collect_core_fpregset): Likewise.
334 * sparc-nat.c (sparc_fetch_inferior_registers): Likewise.
335 (sparc_store_inferior_registers): Likewise.
336 * sparc-ravenscar-thread.c (register_in_thread_descriptor_p): Likewise.
337 (sparc_ravenscar_prepare_to_store): Likewise.
338 * sparc-tdep.c (sparc32_store_arguments): Likewise.
339 (sparc_analyze_control_transfer): Likewise.
340 (sparc_step_trap): Likewise.
341 (sparc_software_single_step): Likewise.
342 (sparc32_gdbarch_init): Likewise.
343 (sparc_supply_rwindow): Likewise.
344 (sparc_collect_rwindow): Likewise.
345 * sparc64-linux-tdep.c (sparc64_linux_collect_core_fpregset): Likewise.
346 * sparc64-nbsd-nat.c (sparc64nbsd_supply_gregset): Likewise.
347 (sparc64nbsd_collect_gregset): Likewise.
348 (sparc64nbsd_supply_fpregset): Likewise.
349 (sparc64nbsd_collect_fpregset): Likewise.
350 * sparc64-tdep.c (sparc64_store_arguments): Likewise.
351 (sparc64_supply_gregset): Likewise.
352 (sparc64_collect_gregset): Likewise.
353 (sparc64_supply_fpregset): Likewise.
354 (sparc64_collect_fpregset): Likewise.
355 * spu-linux-nat.c (spu_fetch_inferior_registers): Likewise.
356 * spu-tdep.c (spu_unwind_sp): Likewise.
357 (spu2ppu_prev_register): Likewise.
358 (spu_memory_remove_breakpoint): Likewise.
359 * stack.c (return_command): Likewise.
360 * tic6x-tdep.c (tic6x_extract_signed_field): Likewise.
361 * tracefile-tfile.c (tfile_fetch_registers): Likewise.
362 * tracefile.c (trace_save_ctf): Likewise.
363 * windows-nat.c (do_windows_fetch_inferior_registers): Likewise.
364 (do_windows_store_inferior_registers): Likewise.
365 (windows_resume): Likewise.
366 * xtensa-linux-nat.c (fill_gregset): Likewise.
367 (supply_gregset_reg): Likewise.
368 * xtensa-tdep.c (xtensa_register_write_masked): Likewise.
369 (xtensa_register_read_masked): Likewise.
370 (xtensa_supply_gregset): Likewise.
371 (xtensa_extract_return_value): Likewise.
372 (xtensa_store_return_value): Likewise.
373
edd079d9
UW
3742017-10-25 Ulrich Weigand <uweigand@de.ibm.com>
375
376 * doublest.c (floatformat_from_string): New function.
377 * doublest.h (floatformat_from_string): Add prototype.
378
379 * std-operator.def (OP_DOUBLE, OP_DECFLOAT): Remove, replace by ...
380 (OP_FLOAT): ... this.
381 * expression.h: Do not include "doublest.h".
382 (union exp_element): Replace doubleconst and decfloatconst by
383 new element floatconst.
384 * ada-lang.c (resolve_subexp): Handle OP_FLOAT instead of OP_DOUBLE.
385 (ada_evaluate_subexp): Likewise.
386 * eval.c (evaluate_subexp_standard): Handle OP_FLOAT instead of
387 OP_DOUBLE and OP_DECFLOAT.
388 * expprint.c (print_subexp_standard): Likewise.
389 (dump_subexp_body_standard): Likewise.
390 * breakpoint.c (watchpoint_exp_is_const): Likewise.
391
392 * parse.c: Include "dfp.h".
393 (write_exp_elt_dblcst, write_exp_elt_decfloatcst): Remove.
394 (write_exp_elt_floatcst): New function.
395 (operator_length_standard): Handle OP_FLOAT instead of OP_DOUBLE
396 and OP_DECFLOAT.
397 (operator_check_standard): Likewise.
398 (parse_float): Do not accept suffix. Take type as input. Return bool.
399 Return target format buffer instead of host DOUBLEST.
400 Use floatformat_from_string and decimal_from_string to parse
401 either binary or decimal floating-point types.
402 (parse_c_float): Remove.
403 * parser-defs.h: Do not include "doublest.h".
404 (write_exp_elt_dblcst, write_exp_elt_decfloatcst): Remove.
405 (write_exp_elt_floatcst): Add prototype.
406 (parse_float): Update prototype.
407 (parse_c_float): Remove.
408
409 * c-exp.y: Do not include "dfp.h".
410 (typed_val_float): Use byte buffer instead of DOUBLEST.
411 (typed_val_decfloat): Remove.
412 (DECFLOAT): Remove.
413 (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
414 (parse_number): Update to new parse_float interface.
415 Parse suffixes and determine type before calling parse_float.
416 Handle decimal and binary FP types the same way.
417
418 * d-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
419 (FLOAT_LITERAL): Use OP_FLOAT and write_exp_elt_floatcst.
420 (parse_number): Update to new parse_float interface.
421 Parse suffixes and determine type before calling parse_float.
422
423 * f-exp.y: Replace dval by typed_val_float.
424 (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
425 (parse_number): Use parse_float instead of atof.
426
427 * go-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
428 (parse_go_float): Remove.
429 (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
430 (parse_number): Call parse_float instead of parse_go_float.
431 Parse suffixes and determine type before calling parse_float.
432
433 * p-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
434 (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
435 (parse_number): Update to new parse_float interface.
436 Parse suffixes and determine type before calling parse_float.
437
438 * m2-exp.y: Replace dval by byte buffer val.
439 (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
440 (parse_number): Call parse_float instead of atof.
441
442 * rust-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
443 (lex_number): Call parse_float instead of strtod.
444 (ast_dliteral): Use OP_FLOAT instead of OP_DOUBLE.
445 (convert_ast_to_expression): Handle OP_FLOAT instead of OP_DOUBLE.
446 Use write_exp_elt_floatcst.
447 (unit_testing): Remove static variable.
448 (rust_type): Do not check unit_testing.
449 (rust_lex_tests): Do not set uint_testing. Set up dummy rust_parser.
450
451 * ada-exp.y (type_float, type_double): Remove.
452 (typed_val_float): Use byte buffer instead of DOUBLEST.
453 (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
454 * ada-lex.l (processReal): Use parse_float instead of sscanf.
455
cc628f3d
AH
4562017-10-25 Alan Hayward <alan.hayward@arm.com>
457
458 * aarch64-tdep.h (enum aarch64_regnum): Remove.
459 * arch/aarch64.h: New file.
460
09a7c6aa
UW
4612017-10-24 Ulrich Weigand <uweigand@de.ibm.com>
462
463 * dfp.h (decimal_from_string): Use const reference for argument.
464 * dfp.c (decimal_from_string): Likewise.
465
8ba0dd51
UW
4662017-10-24 Ulrich Weigand <uweigand@de.ibm.com>
467
468 * i387-tdep.c (print_i387_value): Use floatformat_to_string.
469 * sh64-tdep.c (sh64_do_fp_register): Likewise.
470 * mips-tdep.c (mips_print_fp_register): Likewise.
471
16e812b2
UW
4722017-10-24 Ulrich Weigand <uweigand@de.ibm.com>
473
474 * common/format.h (enum argclass): Replace decfloat_arg by
475 dec32float_arg, dec64float_arg, and dec128float_arg.
476 * common/format.c (parse_format_string): Update to return
477 new decimal float argument classes.
478
479 * printcmd.c (printf_decfloat): Rename to ...
480 (printf_floating): ... this. Add argclass argument, and use it
481 instead of parsing the format string again. Add support for
482 binary floating-point values, using floatformat_to_string.
483 Convert value to the target format if it doesn't already match.
484 (ui_printf): Call printf_floating instead of printf_decfloat,
485 also for double_arg / long_double_arg. Pass argclass.
486
487 * dfp.c (decimal_to_string): Add format string argument.
488 * dfp.h (decimal_to_string): Likewise.
489
490 * doublest.c (floatformat_to_string): Add format string argument.
491 * doublest.h (floatformat_to_string): Likewise.
492
fdf0cbc2
UW
4932017-10-24 Ulrich Weigand <uweigand@de.ibm.com>
494
495 * doublest.c (floatformat_precision): New routine.
496 (floatformat_to_string): Likewise.
497 * doublest.c (floatformat_to_string): Add prototype.
498
499 * printcmd.c (print_scalar_formatted): Only call print_floating
500 on floating-point types.
501 * valprint.c: Do not include "floatformat.h".
502 (generic_val_print_decfloat): Remove.
503 (generic_val_print): Call generic_val_print_float for both
504 TYPE_CODE_FLT and TYPE_CODE_DECFLOAT.
505 (print_floating): Use floatformat_to_string. Handle decimal float.
506 (print_decimal_floating): Remove, merge into floatformat_to_string.
507 * value.h (print_decimal_floating): Remove.
508
509 * Makefile.in: Do not build doublest.c with -Wformat-nonliteral.
510
5033013f
UW
5112017-10-24 Ulrich Weigand <uweigand@de.ibm.com>
512
513 * buildsym.c (end_symtab_get_static_block): Use std::stable_sort.
514
a664f67e
SM
5152017-10-21 Simon Marchi <simon.marchi@ericsson.com>
516
517 * memattr.h: Don't include vec.h.
518 (struct mem_attrib): Initialize fields.
519 <unknown>: New static method.
520 (struct mem_region): Add constructors, operator<, initialize
521 fields.
522 * memattr.c: Include algorithm.
523 (default_mem_attrib, unknown_mem_attrib): Remove.
524 (user_mem_region_list): New global.
525 (target_mem_region_list, mem_region_list): Change type to
526 std::vector<mem_region>.
527 (mem_use_target): Now a function.
528 (target_mem_regions_valid): Change type to bool.
529 (mem_region_lessthan, mem_region_cmp, mem_region_init): Remove.
530 (require_user_regions): Adjust.
531 (require_target_regions): Adjust.
532 (create_mem_region): Adjust.
533 (lookup_mem_region): Adjust.
534 (invalidate_target_mem_regions): Adjust.
535 (mem_clear): Rename to...
536 (user_mem_clear): ... this, and adjust.
537 (mem_command): Adjust.
538 (info_mem_command): Adjust.
539 (mem_enable, enable_mem_command, mem_disable,
540 disable_mem_command): Adjust.
541 (mem_delete): Adjust.
542 (delete_mem_command): Adjust.
543 * memory-map.h (parse_memory_map): Return an std::vector.
544 * memory-map.c (parse_memory_map): Likewise.
545 (struct memory_map_parsing_data): Add constructor.
546 <memory_map>: Point to std::vector.
547 (memory_map_start_memory): Adjust.
548 (memory_map_end_memory): Adjust.
549 (memory_map_end_property): Adjust.
550 (clear_result): Remove.
551 * remote.c (remote_memory_map): Return an std::vector.
552 * target-debug.h (target_debug_print_VEC_mem_region_s__p):
553 Remove.
554 (target_debug_print_mem_region_vector): New.
555 * target-delegates.c: Regenerate.
556 * target.h (mem_region_vector): New typedef.
557 (to_memory_map): Return mem_region_vector.
558 (target_memory_map): Return an std::vector.
559 * target.c (target_memory_map): Return an std::vector.
560 (flash_erase_command): Adjust.
561
6e17c565
SM
5622017-10-21 Simon Marchi <simon.marchi@ericsson.com>
563
564 * memory-map.c (struct memory_map_parsing_data) <property_name>:
565 Change type to std::string.
566 (memory_map_start_property): Adjust.
567 (memory_map_end_property): Adjust.
568
cfba9872
SM
5692017-10-21 Simon Marchi <simon.marchi@polymtl.ca>
570
571 * infrun.h: Include common/byte-vector.h.
572 (struct displaced_step_closure): New struct.
573 (struct buf_displaced_step_closure): New struct.
574 * infrun.c (displaced_step_closure::~displaced_step_closure):
575 Provide default implementation.
576 (displaced_step_clear): Deallocate step closure with delete.
577 * aarch64-tdep.c (displaced_step_closure): Rename to ...
578 (aarch64_displaced_step_closure): ... this, extend
579 displaced_step_closure.
580 (aarch64_displaced_step_data) <dsc>: Change type to
581 aarch64_displaced_step_closure.
582 (aarch64_displaced_step_copy_insn): Adjust to type change, use
583 unique_ptr.
584 (aarch64_displaced_step_fixup): Add cast for displaced step
585 closure.
586 * amd64-tdep.c (displaced_step_closure): Rename to ...
587 (amd64_displaced_step_closure): ... this, extend
588 displaced_step_closure.
589 <insn_buf>: Change type to std::vector<gdb_byte>.
590 <max_len>: Remove.
591 (fixup_riprel): Change type of DSC parameter, adjust to type
592 change of insn_buf.
593 (fixup_displaced_copy): Change type of DSC parameter.
594 (amd64_displaced_step_copy_insn): Instantiate
595 amd64_displaced_step_closure.
596 (amd64_displaced_step_fixup): Add cast for closure type, adjust
597 to type change of insn_buf.
598 * arm-linux-tdep.c (arm_linux_cleanup_svc): Change type of
599 parameter DSC.
600 (arm_linux_copy_svc): Likewise.
601 (cleanup_kernel_helper_return): Likewise.
602 (arm_catch_kernel_helper_return): Likewise.
603 (arm_linux_displaced_step_copy_insn): Instantiate
604 arm_displaced_step_closure.
605 * arm-tdep.c (arm_pc_is_thumb): Add cast for closure.
606 (displaced_read_reg): Change type of parameter DSC.
607 (branch_write_pc): Likewise.
608 (load_write_pc): Likewise.
609 (alu_write_pc): Likewise.
610 (displaced_write_reg): Likewise.
611 (arm_copy_unmodified): Likewise.
612 (thumb_copy_unmodified_32bit): Likewise.
613 (thumb_copy_unmodified_16bit): Likewise.
614 (cleanup_preload): Likewise.
615 (install_preload): Likewise.
616 (arm_copy_preload): Likewise.
617 (thumb2_copy_preload): Likewise.
618 (install_preload_reg): Likewise.
619 (arm_copy_preload_reg): Likewise.
620 (cleanup_copro_load_store): Likewise.
621 (install_copro_load_store): Likewise.
622 (arm_copy_copro_load_store) Likewise.
623 (thumb2_copy_copro_load_store): Likewise.
624 (cleanup_branch): Likewise.
625 (install_b_bl_blx): Likewise.
626 (arm_copy_b_bl_blx): Likewise.
627 (thumb2_copy_b_bl_blx): Likewise.
628 (thumb_copy_b): Likewise.
629 (install_bx_blx_reg): Likewise.
630 (arm_copy_bx_blx_reg): Likewise.
631 (thumb_copy_bx_blx_reg): Likewise.
632 (cleanup_alu_imm): Likewise.
633 (arm_copy_alu_imm): Likewise.
634 (thumb2_copy_alu_imm): Likewise.
635 (cleanup_alu_reg): Likewise.
636 (install_alu_reg): Likewise.
637 (arm_copy_alu_reg): Likewise.
638 (thumb_copy_alu_reg): Likewise.
639 (cleanup_alu_shifted_reg): Likewise.
640 (install_alu_shifted_reg): Likewise.
641 (arm_copy_alu_shifted_reg): Likewise.
642 (cleanup_load): Likewise.
643 (cleanup_store): Likewise.
644 (arm_copy_extra_ld_st): Likewise.
645 (install_load_store): Likewise.
646 (thumb2_copy_load_literal): Likewise.
647 (thumb2_copy_load_reg_imm): Likewise.
648 (arm_copy_ldr_str_ldrb_strb): Likewise.
649 (cleanup_block_load_all): Likewise.
650 (cleanup_block_store_pc): Likewise.
651 (cleanup_block_load_pc): Likewise.
652 (arm_copy_block_xfer): Likewise.
653 (thumb2_copy_block_xfer): Likewise.
654 (cleanup_svc): Likewise.
655 (install_svc): Likewise.
656 (arm_copy_svc): Likewise.
657 (thumb_copy_svc): Likewise.
658 (arm_copy_undef): Likewise.
659 (thumb_32bit_copy_undef): Likewise.
660 (arm_copy_unpred): Likewise.
661 (arm_decode_misc_memhint_neon): Likewise.
662 (arm_decode_unconditional): Likewise.
663 (arm_decode_miscellaneous): Likewise.
664 (arm_decode_dp_misc): Likewise.
665 (arm_decode_ld_st_word_ubyte): Likewise.
666 (arm_decode_media): Likewise.
667 (arm_decode_b_bl_ldmstm): Likewise.
668 (arm_decode_ext_reg_ld_st): Likewise.
669 (thumb2_decode_dp_shift_reg): Likewise.
670 (thumb2_decode_ext_reg_ld_st): Likewise.
671 (arm_decode_svc_copro): Likewise.
672 (thumb2_decode_svc_copro): Likewise.
673 (install_pc_relative): Likewise.
674 (thumb_copy_pc_relative_16bit): Likewise.
675 (thumb_decode_pc_relative_16bit): Likewise.
676 (thumb_copy_pc_relative_32bit): Likewise.
677 (thumb_copy_16bit_ldr_literal): Likewise.
678 (thumb_copy_cbnz_cbz): Likewise.
679 (thumb2_copy_table_branch): Likewise.
680 (cleanup_pop_pc_16bit_all): Likewise.
681 (thumb_copy_pop_pc_16bit): Likewise.
682 (thumb_process_displaced_16bit_insn): Likewise.
683 (decode_thumb_32bit_ld_mem_hints): Likewise.
684 (thumb_process_displaced_32bit_insn): Likewise.
685 (thumb_process_displaced_insn): Likewise.
686 (arm_process_displaced_insn): Likewise.
687 (arm_displaced_init_closure): Likewise.
688 (arm_displaced_step_fixup): Add cast for closure.
689 * arm-tdep.h: Include infrun.h.
690 (displaced_step_closure): Rename to ...
691 (arm_displaced_step_closure): ... this, extend
692 displaced_step_closure.
693 <u::svc::copy_svc_os>: Change type of parameter DSC.
694 <cleanup>: Likewise.
695 (arm_process_displaced_insn): Likewise.
696 (arm_displaced_init_closure): Likewise.
697 (displaced_read_reg): Likewise.
698 (displaced_write_reg): Likewise.
699 * i386-linux-tdep.c (i386_linux_displaced_step_copy_insn):
700 Adjust.
701 * i386-tdep.h: Include infrun.h.
702 (i386_displaced_step_closure): New typedef.
703 * i386-tdep.c (i386_displaced_step_copy_insn): Use
704 i386_displaced_step_closure.
705 (i386_displaced_step_fixup): Adjust.
706 * rs6000-tdep.c (ppc_displaced_step_closure): New typedef.
707 (ppc_displaced_step_copy_insn): Use ppc_displaced_step_closure
708 and unique_ptr.
709 (ppc_displaced_step_fixup): Adjust.
710 * s390-linux-tdep.c (s390_displaced_step_closure): New typedef.
711 (s390_displaced_step_copy_insn): Use s390_displaced_step_closure
712 and unique_ptr.
713 (s390_displaced_step_fixup): Adjust.
714
b392b304
SM
7152017-10-21 Simon Marchi <simon.marchi@polymtl.ca>
716
717 * interps.h (interp_resume, interp_suspend, interp_set_temp):
718 Remove declarations.
719
d5833c62
TT
7202017-10-20 Tom Tromey <tom@tromey.com>
721
722 * gdb_bfd.c (struct gdb_bfd_data) <included_bfds>: Now a
723 std::vector.
724 (gdb_bfd_record_inclusion): Update.
725 (bfdp): Remove typedef.
726
06d5bbc8
TT
7272017-10-20 Tom Tromey <tom@tromey.com>
728
729 * gdb_bfd.c (gdb_bfd_ref): Use new.
730 (struct gdb_bfd_data): Add constructor, destructor, and member
731 initializers.
732 (gdb_bfd_unref): Use delete.
733
2712ce2e
TT
7342017-10-20 Tom Tromey <tom@tromey.com>
735
736 * exec.c (exec_file_attach): Use new_bfd_ref.
737 * symfile-mem.c (symbol_file_add_from_memory): Use new_bfd_ref.
738 * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
739 (gdb_bfd_openw, gdb_bfd_openr_iovec, gdb_bfd_fdopenr): Use
740 new_bfd_ref.
741 * gdb_bfd.h (new_bfd_ref): New function.
742
fcc8fb2f
PA
7432017-10-20 Pedro Alves <palves@redhat.com>
744
745 * main.c (captured_command_loop): Add attribute noinline.
746
4c2287b0
SM
7472017-10-19 Simon Marchi <simon.marchi@ericsson.com>
748
749 * interps.c (struct interp_factory): Add constructor.
750 (interp_factory_p): Remove typedef.
751 (DEF_VEC_P(interp_factory_p)): Remove.
752 (interpreter_factories): Change type to std::vector.
753 (interp_factory_register): Adjust.
754 (interp_lookup): Adjust.
755 (interpreter_completer): Adjust.
756
3d415c26
TT
7572017-10-19 Tom Tromey <tom@tromey.com>
758
759 * break-catch-syscall.c (catch_syscall_completer): Use
760 std::string, gdb::unique_xmalloc_ptr.
761
395423c4
TT
7622017-10-19 Tom Tromey <tom@tromey.com>
763
764 * infcall.c (call_function_by_hand_dummy): Use std::string.
765
54f70bc1
TT
7662017-10-19 Tom Tromey <tom@tromey.com>
767
768 * mi/mi-main.c (mi_cmd_execute): Update.
769 * top.h (prepare_execute_command): Return scoped_value_mark.
770 * value.h (class scoped_value_mark): Use DISABLE_COPY_AND_ASSIGN.
771 Add move constructor.
772 * top.c (prepare_execute_command): Return scoped_value_mark.
773 (execute_command): Update.
774
63929e84
PA
7752017-10-19 Pedro Alves <palves@redhat.com>
776
777 * xml-support.c (xml_fetch_content_from_file): Check fread's
778 return.
779
a75868f5
PA
7802017-10-19 Pedro Alves <palves@redhat.com>
781
782 * ser-base.c (ser_base_read_error_fd): Delete the file handler if
783 async.
784 (handle_error_fd): New function.
785 (ser_base_async): Add/delete an event loop file handler for
786 error_fd.
787
2edf834e
PA
7882017-10-19 Pedro Alves <palves@redhat.com>
789
790 * xml-support.c (xml_fetch_content_from_file): Don't read in
791 chunks. Instead use fseek to determine the file's size, and read
792 it in one go.
793
c8ba13ad
KS
7942017-11-18 Keith Seitz <keiths@redhat.com>
795
796 * c-exp.y (oper): Canonicalize conversion operators of user-defined
797 types.
798 Add whitespace to front of type name.
799
37534686
KS
8002017-10-18 Keith Seitz <keiths@redhat.com>
801
802 * dwarf2read.c (dwarf2_add_typedef): Issue a complaint on unhandled
803 DW_AT_accessibility.
804
28c7c158
YQ
8052017-10-18 Yao Qi <yao.qi@linaro.org>
806
807 * features/tic6x-c62x-linux.c: Remove.
808
30f0b101
TT
8092017-10-17 Tom Tromey <tom@tromey.com>
810
811 * disasm.c (do_mixed_source_and_assembly_deprecated): Use
812 gdb::optional, ui_out_emit_list, ui_out_emit_tuple.
813 (do_mixed_source_and_assembly): Likewise.
814
57e12da9
TT
8152017-10-17 Tom Tromey <tom@tromey.com>
816
817 * regcache.c (regcache::xfer_part): Remove assertion.
818
7b700999
PA
8192017-10-17 Pedro Alves <palves@redhat.com>
820
821 * xml-support.c (xml_fetch_content_from_file): Call
822 unique_ptr::release() instead unique_ptr::get() when passing
823 through xrealloc.
824
d3037ba6
YQ
8252017-10-17 Yao Qi <yao.qi@linaro.org>
826
827 * regcache.c (regcache::xfer_part): Remove parameters read and
828 write, add parameter is_raw. All callers are updated.
829
83d5a34d
KS
8302017-10-16 Keith Seitz <keiths@redhat.com>
831
832 * c-typeprint.c (enum access_specifier): Moved here from
833 c_type_print_base.
834 (output_access_specifier): New function.
835 (c_type_print_base): Consider typedefs when assessing
836 whether access labels are needed.
837 Use output_access_specifier as needed.
838 Output access specifier for typedefs, if needed.
839 * dwarf2read.c (dwarf2_add_typedef): Record DW_AT_accessibility.
840 * gdbtypes.h (struct typedef_field) <is_protected, is_private>: New
841 fields.
842 (TYPE_TYPEDEF_FIELD_PROTECTED, TYPE_TYPEDEF_FIELD_PRIVATE): New
843 accessor macros.
844
87028b87
TT
8452017-10-16 Tom Tromey <tom@tromey.com>
846
847 * linux-tdep.c (linux_info_proc, linux_find_memory_regions_full)
848 (linux_fill_prpsinfo, linux_vsyscall_range_raw): Update.
849 * target.c (target_fileio_read_stralloc): Update.
850 * sparc64-tdep.c (adi_is_addr_mapped): Update.
851 * target.h (target_fileio_read_stralloc): Return
852 unique_xmalloc_ptr.
853
b7b030ad
TT
8542017-10-16 Tom Tromey <tom@tromey.com>
855
856 * xml-syscall.c (xml_init_syscalls_info): Update.
857 * xml-support.c (xinclude_start_include): Update.
858 (xml_fetch_content_from_file): Return unique_xmalloc_ptr.
859 * xml-support.h (xml_fetch_another): Return unique_xmalloc_ptr.
860 (xml_fetch_content_from_file): Likewise.
861 * osdata.c (get_osdata): Update.
862 * target.h (target_read_stralloc, target_get_osdata): Return
863 unique_xmalloc_ptr.
864 * solib-aix.c (solib_aix_get_library_list): Update.
865 * solib-target.c (solib_target_current_sos): Update.
866 * solib-svr4.c (svr4_current_sos_via_xfer_libraries): Update.
867 * xml-tdesc.c (fetch_available_features_from_target): Update.
868 (target_fetch_description_xml): Update.
869 (file_read_description_xml): Update.
870 * remote.c (remote_get_threads_with_qxfer, remote_memory_map)
871 (remote_traceframe_info, btrace_read_config, remote_read_btrace)
872 (remote_pid_to_exec_file): Update.
873 * target.c (target_read_stralloc): Return unique_xmalloc_ptr.
874 (target_get_osdata): Likewise.
875
b80406ac
TT
8762017-10-16 Tom Tromey <tom@tromey.com>
877
878 * remote.c (remote_register_number_and_offset): Use std::vector.
879 (remote_set_syscall_catchpoint): Use gdb::unique_xmalloc_ptr.
880 (putpkt_binary): Use gdb::def_vector.
881 (compare_sections_command): Use gdb::byte_vector.
882
a90ecff8
TT
8832017-10-16 Tom Tromey <tom@tromey.com>
884
885 * ppc-linux-nat.c (hwdebug_insert_point): Use
886 gdb::unique_xmalloc_ptr, XDUP.
887
2dc0e219
TT
8882017-10-16 Tom Tromey <tom@tromey.com>
889
890 * probe.c (parse_probes): Use std::string.
891 (info_probes_for_ops, enable_probes_command)
892 (disable_probes_command): Remove cleanups.
893
b05628f0
TT
8942017-10-16 Tom Tromey <tom@tromey.com>
895
896 * buildsym.c (block_compar): Remove.
897 (end_symtab_get_static_block): Use std::vector.
898
a79b1bc6
SM
8992017-10-16 Simon Marchi <simon.marchi@ericsson.com>
900
901 * memrange.h (struct mem_range): Define operator< and operator==.
902 (mem_range_s): Remove.
903 (DEF_VEC_O (mem_range_s)): Remove.
904 (normalize_mem_ranges): Change parameter type to std::vector.
905 * memrange.c (compare_mem_ranges): Remove.
906 (normalize_mem_ranges): Change parameter type to std::vector,
907 adjust to vector change.
908 * exec.c (section_table_available_memory): Return vector, remove
909 parameter.
910 (section_table_read_available_memory): Adjust to std::vector
911 change.
912 * remote.c (remote_read_bytes): Adjust to std::vector
913 change.
914 * tracepoint.h (traceframe_available_memory): Change parameter
915 type to std::vector.
916 * tracepoint.c (traceframe_available_memory): Change parameter
917 type to std::vector, adjust.
918 * gdb/mi/mi-main.c (mi_cmd_trace_frame_collected): Adjust to
919 std::vector change.
920 * gdb/Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
921 unittests/memrange-selftests.c.
922 (SUBDIR_UNITTESTS_OBS): Add memrange-selftests.o.
923 * gdb/unittests/memrange-selftests.c: New file.
924
63f0e930
PA
9252017-10-16 Pedro Alves <palves@redhat.com>
926
927 * elfread.c (probe_key_free): Rename range-for variable.
928 * probe.c (parse_probes_in_pspace, find_probes_in_objfile)
929 (find_probe_by_pc, collect_probes): Rename range-for variable.
930
c40c7bfc
YQ
9312017-10-16 Yao Qi <yao.qi@linaro.org>
932
933 * features/Makefile (XMLTOC): Remove tic6x-*.xml.
934 * features/tic6x-c62x.c: Remove.
935 * features/tic6x-c64x-linux.c: Remove.
936 * features/tic6x-c64x.c: Remove.
937 * features/tic6x-c64xp-linux.c: Remove.
938 * features/tic6x-c64xp.c: Remove.
939 * tic6x-linux-tdep.c (_initialize_tic6x_linux_tdep): Don't call
940 initialize_tdesc_tic6x_*_linux functions.
941 * tic6x-tdep.c (_initialize_tic6x_tdep): Don't call
942 initialize_tdesc_tic6x_* functions.
943
df27ae6a
YQ
9442017-10-16 Yao Qi <yao.qi@linaro.org>
945
946 * features/Makefile (WHICH): Remove tic6x-c64xp, tic6x-c64x
947 tic6x-c62x.
948 * regformats/tic6x-c62x.dat: Remove.
949 * regformats/tic6x-c64x.dat: Remove.
950 * regformats/tic6x-c64xp.dat: Remove.
951
86766165
SM
9522017-10-15 Simon Marchi <simon.marchi@ericsson.com>
953
954 * tracepoint.c (parse_traceframe_info): Return a unique_ptr
955 (the !HAVE_LIBEXPAT version).
956
824dfcc3
SM
9572017-10-14 Simon Marchi <simon.marchi@ericsson.com>
958
959 * nat/linux-osdata.c (struct pid_pgid_entry) <operator<>: Make
960 const.
961
2098b393
SM
9622017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
963
964 * target.h: Include tracepoint.h.
965 (enum trace_find_type): Move to tracepoint.h.
966 (struct target_ops) <to_traceframe_info>: Return a unique ptr.
967 * tracepoint.h: Don't include target.h
968 (enum trace_find_type): Move from target.h.
969 (parse_traceframe_info): Return a unique ptr.
970 * tracepoint.c (current_traceframe_info): Change type to unique
971 ptr.
972 (free_traceframe_info): Remove.
973 (clear_traceframe_info): Don't manually free
974 current_traceframe_info.
975 (free_result): Remove.
976 (parse_traceframe_info): Return a unique ptr.
977 (get_traceframe_info): Adjust to unique ptr.
978 * ctf.c (ctf_traceframe_info): Return a unique ptr.
979 * remote.c (remote_traceframe_info): Return a unique ptr.
980 * tracefile-tfile.c (tfile_traceframe_info): Return a unique
981 ptr.
982 * target-debug.h (target_debug_print_traceframe_info_up): New
983 macro.
984 * target-delegates.c: Regenerate.
985
4cdd21a8
SM
9862017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
987
988 * memrange.h (struct mem_range): Add constructors.
989 * tracepoint.h (struct traceframe_info) <memory>: Change type to
990 std::vector<mem_range>.
991 * tracepoint.c (free_traceframe_info): Don't manually free
992 vector.
993 (traceframe_info_start_memory): Adjust to vector change.
994 (traceframe_available_memory): Likewise.
995 * tracefile-tfile.c (build_traceframe_info): Likewise.
996 * ctf.c (ctf_traceframe_info): Likewise.
997
d0d292a2
SM
9982017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
999
1000 * tracepoint.h (struct traceframe_info) <tvars>: Change type to
1001 std::vector<int>.
1002 * tracepoint.c (free_traceframe_info): Deallocate with delete.
1003 (traceframe_info_start_tvar): Adjust to vector change.
1004 (parse_traceframe_info): Allocate with new.
1005 * ctf.c (ctf_traceframe_info): Allocate with new, adjust to
1006 vector change.
1007 * tracefile-tfile.c (build_traceframe_info): Adjust to vector
1008 change.
1009 tfile_traceframe_info): Allocate with new.
1010 * mi/mi-main.c (mi_cmd_trace_frame_collected): Adjust to vector
1011 change.
1012
8d3c73ef
SM
10132017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
1014
1015 * tracepoint.c (traceframe_info): Rename to...
1016 (current_traceframe_info): ...this.
1017 (clear_traceframe_info): Adjust.
1018 (get_traceframe_info): Adjust.
1019
b129dcac
SM
10202017-10-14 Simon Marchi <simon.marchi@ericsson.com>
1021
1022 * nat/linux-osdata.c: Include algorithm.
1023 (compare_processes): Remove.
1024 (struct pid_pgid_entry): New struct.
1025 (linux_xfer_osdata_processgroups): Use std::vector instead of
1026 XNEWVEC.
1027
af5bf4ad
SM
10282017-10-14 Simon Marchi <simon.marchi@ericsson.com>
1029
1030 * objfiles.h: Don't include symfile.h.
1031 (struct partial_symbol): Remove forward-declaration.
1032 (struct objfile) <global_psymbols, static_psymbols>: Change type
1033 to std::vector<partial_symbol *>.
1034 * objfiles.c (objfile::objfile): Don't memset those fields.
1035 (objfile::~objfile): Don't free those fields.
1036 * psympriv.h (struct psymbol_allocation_list): Remove
1037 forward-declaration.
1038 (add_psymbol_to_list): Change psymbol_allocation_list parameter
1039 to std::vector.
1040 (start_psymtab_common): Change parameters to std::vector.
1041 * psymtab.c: Include algorithm.
1042 (require_partial_symbols): Call shrink_to_fit.
1043 (find_pc_sect_psymbol): Adjust to vector change.
1044 (match_partial_symbol): Likewise.
1045 (lookup_partial_symbol): Likewise.
1046 (psym_relocate): Likewise.
1047 (dump_psymtab): Likewise.
1048 (recursively_search_psymtabs): Likewise.
1049 (compare_psymbols): Remove.
1050 (sort_pst_symbols): Adjust to vector change.
1051 (start_psymtab_common): Likewise.
1052 (end_psymtab_common): Likewise.
1053 (psymbol_bcache_full): De-constify return value.
1054 (add_psymbol_to_bcache): Likewise.
1055 (extend_psymbol_list): Remove.
1056 (append_psymbol_to_list): Adjust to vector change.
1057 (add_psymbol_to_list): Likewise.
1058 (init_psymbol_list): Likewise.
1059 (maintenance_info_psymtabs): Likewise.
1060 (maintenance_check_psymtabs): Likewise.
1061 * symfile.h (struct psymbol_allocation_list): Remove.
1062 * symfile.c (reread_symbols): Adjust to vector change.
1063 * dbxread.c (start_psymtab): Change type of parameters.
1064 (dbx_symfile_read): Adjust to vector change.
1065 (read_dbx_symtab): Likewise.
1066 (start_psymtab): Change type of parameters.
1067 * dwarf2read.c (dwarf2_build_psymtabs): Adjust to vector change.
1068 (create_partial_symtab): Likewise.
1069 (add_partial_symbol): Likewise.
1070 (write_one_signatured_type): Likewise.
1071 (recursively_write_psymbols): Likewise.
1072 * mdebugread.c (parse_partial_symbols): Likewise.
1073 * xcoffread.c (xcoff_start_psymtab): Change type of parameters.
1074 (scan_xcoff_symtab): Adjust to vector change.
1075 (xcoff_initial_scan): Likewise.
1076
3ec5942f
SM
10772017-10-13 Simon Marchi <simon.marchi@ericsson.com>
1078
1079 * ada-typeprint.c (print_dynamic_range_bound): Use std::string.
1080
2399fe6a
YQ
10812017-10-13 Yao Qi <yao.qi@linaro.org>
1082
1083 * features/Makefile: Remove tic6x-*-expedite, add tic6x-expedite.
1084 Remove s390x-*-expedite, add s390x-expedite.
1085
4bf3f4a8
YQ
10862017-10-13 Yao Qi <yao.qi@linaro.org>
1087
1088 * features/s390-gs-linux64.c: Regenerated.
1089 * features/s390x-gs-linux64.c: Regenerated.
1090
9e86da07
TT
10912017-10-13 Tom Tromey <tom@tromey.com>
1092
1093 * compile/compile-object-run.c (do_module_cleanup): Use delete.
1094 * solib.c (update_solib_list, reload_shared_libraries_1): Use
1095 delete.
1096 * symfile.c (symbol_file_add_with_addrs): Use new.
1097 (symbol_file_add_separate): Update comment.
1098 (syms_from_objfile_1, remove_symbol_file_command): Use delete.
1099 * jit.c (jit_object_close_impl): Use new.
1100 (jit_unregister_code): Use delete.
1101 * objfiles.c (objfile::objfile): Rename from allocate_objfile.
1102 (~objfile): Rename from free_objfile.
1103 (free_objfile_separate_debug, do_free_objfile_cleanup)
1104 (free_all_objfiles, objfile_purge_solibs): Use delete.
1105 * objfiles.h (struct objfile): Add constructor and destructor.
1106 Use DISABLE_COPY_AND_ASSIGN. Add initializers to data members.
1107 (allocate_objfile, free_objfile): Don't declare.
1108 (struct objstats): Add initializers.
1109
c2508e90
SM
11102017-10-12 Simon Marchi <simon.marchi@ericsson.com>
1111
1112 * arch-utils.h (simple_displaced_step_copy_insn): Remove.
1113 * arch-utils.c (simple_displaced_step_copy_insn): Remove.
1114 * gdbarch.sh (displaced_step_copy_insn): Adjust comment.
1115 * gdbarch.h: Regenerate.
1116 * i386-linux-tdep.c (i386_linux_displaced_step_copy_insn):
1117 Adjust comment.
1118 * i386-tdep.c (i386_displaced_step_copy_insn): Adjust comment.
1119 (i386_displaced_step_fixup): Adjust comment.
1120 * rs6000-tdep.c (ppc_displaced_step_copy_insn): Adjust comment.
1121
a900ff72
TT
11222017-10-12 Tom Tromey <tom@tromey.com>
1123
1124 * prologue-value.h (pv_area::store_would_trash): Return bool.
1125 (pv_area::find_reg): Likewise.
1126 * prologue-value.c (pv_area::store_would_trash): Return bool.
1127 (pv_area::find_reg): Likewise.
1128
f7b7ed97
TT
11292017-10-12 Tom Tromey <tom@tromey.com>
1130
1131 * s390-linux-tdep.c (s390_store, s390_load)
1132 (s390_check_for_saved, s390_analyze_prologue): Update.
1133 * rx-tdep.c (check_for_saved, rx_analyze_prologue): Update.
1134 * rl78-tdep.c (rl78_analyze_prologue, check_for_saved): Update.
1135 * prologue-value.h (class pv_area): Move from prologue-value.c.
1136 Change names of members. Add constructor, destructor, member
1137 functions.
1138 (make_pv_area, free_pv_area, make_cleanup_free_pv_area)
1139 (pv_area_store, pv_area_fetch, pv_area_store_would_trash)
1140 (pv_area_fetch, pv_area_scan): Don't declare.
1141 * prologue-value.c (struct pv_area::area_entry): Now member of
1142 pv_area.
1143 (struct pv_area): Move to prologue-value.h.
1144 (pv_area::pv_area): Rename from make_pv_area.
1145 (pv_area::~pv_area): Rename from free_pv_area.
1146 (do_free_pv_area_cleanup, make_cleanup_free_pv_area): Remove.
1147 (clear_entries, find_entry, overlaps, store_would_trash, store)
1148 (fetch, find_reg, scan): Now member of pv_area.
1149 Remove "area" argument. Update.
1150 * msp430-tdep.c (check_for_saved, msp430_analyze_prologue):
1151 Update.
1152 * mn10300-tdep.c (push_reg, check_for_saved)
1153 (mn10300_analyze_prologue): Update.
1154 * mep-tdep.c (is_arg_spill, check_for_saved)
1155 (mep_analyze_prologue): Update.
1156 * m32c-tdep.c (m32c_pv_push, m32c_srcdest_fetch)
1157 (m32c_srcdest_store, m32c_pv_enter, m32c_is_arg_spill)
1158 (m32c_is_struct_return, m32c_analyze_prologue): Update.
1159 * arm-tdep.c (thumb_analyze_prologue, arm_analyze_prologue):
1160 Update.
1161 * arc-tdep.c (arc_is_in_prologue, arc_analyze_prologue): Update.
1162 * aarch64-tdep.c (aarch64_analyze_prologue): Update.
1163
466eecee
SM
11642017-10-12 Simon Marchi <simon.marchi@ericsson.com>
1165
1166 * linux-nat.h (linux_nat_set_delete_thread): New declaration.
1167 * linux-nat.c (linux_nat_delete_thread): New variable.
1168 (lwp_free): Invoke linux_nat_delete_thread if set.
1169 (linux_nat_set_delete_thread): New function.
1170 * aarch64-linux-nat.c (_initialize_aarch64_linux_nat): Assign
1171 thread delete callback.
1172 * arm-linux-nat.c (arm_linux_delete_thread): New function.
1173 (_initialize_arm_linux_nat): Assign thread delete callback.
1174 * s390-linux-nat.c (s390_delete_thread): New function.
1175 (_initialize_s390_nat): Assign thread delete callback.
1176 * x86-linux-nat.c (x86_linux_add_target): Likewise.
1177 * nat/aarch64-linux.c (aarch64_linux_delete_thread): New
1178 function.
1179 * nat/aarch64-linux.h (aarch64_linux_delete_thread): New
1180 declaration.
1181 * nat/x86-linux.c (x86_linux_delete_thread): New function.
1182 * nat/x86-linux.h (x86_linux_delete_thread): New declaration.
1183
f71c8822
TT
11842017-10-09 Tom Tromey <tom@tromey.com>
1185
1186 * tui/tui-win.c (tui_set_win_height, parse_scrolling_args): Use
1187 std::string.
1188 * tui/tui-layout.c (enum tui_status): Use std::string.
1189
981a3fb3
TT
11902017-10-11 Tom Tromey <tom@tromey.com>
1191
1192 * gdbthread.h (thread_command): Constify.
1193 * inferior.h (detach_command): Constify.
1194 * top.h (set_history, show_history): Constify.
1195 * arm-tdep.c (set_arm_command, show_arm_command): Constify.
1196 * serial.c (serial_set_cmd, serial_show_cmd): Constify.
1197 * bsd-kvm.c (bsd_kvm_cmd): Constify.
1198 * printcmd.c (set_command): Constify.
1199 (non_const_set_command): New function.
1200 * dcache.c (set_dcache_command, show_dcache_command): Constify.
1201 * breakpoint.c (enable_command, disable_command, delete_command)
1202 (catch_command, tcatch_command, set_breakpoint_cmd)
1203 (show_breakpoint_cmd): Constify.
1204 * macrocmd.c (macro_command): Constify.
1205 * infcmd.c (unset_command, kill_command, detach_command)
1206 (info_proc_cmd): Constify.
1207 * i386-tdep.c (set_mpx_cmd, show_mpx_cmd): Constify.
1208 * auto-load.c (show_auto_load_cmd, set_auto_load_cmd)
1209 (info_auto_load_cmd): Constify.
1210 * target-descriptions.c (set_tdesc_cmd, show_tdesc_cmd)
1211 (unset_tdesc_cmd): Constify.
1212 * ada-lang.c (set_ada_command, show_ada_command)
1213 (maint_set_ada_cmd, maint_show_ada_cmd): Constify.
1214 * guile/guile.c (set_guile_command, show_guile_command)
1215 (info_guile_command): Constify.
1216 * tui/tui-win.c (tui_command, set_tui_cmd, show_tui_cmd):
1217 Constify.
1218 * skip.c (skip_command): Constify.
1219 * compile/compile.c (_initialize_compile): Constify.
1220 * dwarf2read.c (set_dwarf_cmd, show_dwarf_cmd): Constify.
1221 * btrace.c (maint_btrace_cmd, maint_btrace_set_cmd)
1222 (maint_btrace_show_cmd, maint_btrace_pt_set_cmd)
1223 (maint_btrace_pt_show_cmd): Constify.
1224 * remote.c (set_remote_cmd, show_remote_cmd, remote_command):
1225 Constify.
1226 * python/python.c (user_show_python, user_set_python): Constify.
1227 * mips-tdep.c (set_mips_command, show_mips_command)
1228 (set_mipsfpu_command): Constify.
1229 * record-btrace.c (cmd_record_btrace_start)
1230 (cmd_set_record_btrace, cmd_show_record_btrace)
1231 (cmd_set_record_btrace_bts, cmd_show_record_btrace_bts)
1232 (cmd_set_record_btrace_pt, cmd_show_record_btrace_pt): Constify.
1233 * rs6000-tdep.c (set_powerpc_command, show_powerpc_command):
1234 Constify.
1235 * symfile.c (overlay_command): Constify.
1236 * spu-tdep.c (set_spu_command, show_spu_command): Constify.
1237 * cli/cli-logging.c (set_logging_command, show_logging_command):
1238 Constify.
1239 * cli/cli-dump.c (dump_command, append_command)
1240 (srec_dump_command, ihex_dump_command, verilog_dump_command)
1241 (tekhex_dump_command, binary_dump_command)
1242 (binary_append_command): Constify.
1243 * cli/cli-decode.c (struct cmd_list_element): Change type of
1244 "fun".
1245 * cli/cli-cmds.c (info_command, show_command, set_debug)
1246 (show_debug): Constify.
1247 (show_command): Add non-const overload.
1248 * top.c (set_history, show_history): Constify.
1249 * sh-tdep.c (set_sh_command, show_sh_command): Constify.
1250 * command.h (add_prefix_cmd): Accept a cmd_const_cfunc_ftype.
1251 * target.c (target_command): Constify.
1252 * sparc64-tdep.c (info_adi_command): Constify.
1253 * record-full.c (cmd_record_full_start): Constify.
1254 (set_record_full_command): Constify. Fix typo.
1255 (show_record_full_command): Constify.
1256 * thread.c (thread_command, thread_apply_command): Constify.
1257 * memattr.c (dummy_cmd): Constify.
1258 * value.c (function_command): Constify.
1259 * frame.c (set_backtrace_cmd, show_backtrace_cmd): Constify.
1260 * probe.c (info_probes_command): Constify.
1261 * ser-tcp.c (set_tcp_cmd, show_tcp_cmd): Constify.
1262 * gnu-nat.c (set_task_cmd, show_task_cmd, set_thread_cmd)
1263 (show_thread_cmd, set_thread_default_cmd)
1264 (show_thread_default_cmd): Constify.
1265 (check_empty): Constify.
1266 * tracepoint.c (tfind_command): Constify.
1267 * cp-support.c (maint_cplus_command): Constify.
1268 * windows-tdep.c (info_w32_command): Constify.
1269 * record.c (cmd_record_start, set_record_command)
1270 (show_record_command, info_record_command, cmd_record_goto):
1271 Constify.
1272 * ravenscar-thread.c (set_ravenscar_command)
1273 (show_ravenscar_command): Constify.
1274 * utils.c (set_internal_problem_cmd, show_internal_problem_cmd):
1275 Constify.
1276 (add_internal_problem_command): Remove casts.
1277 * arc-tdep.c (maintenance_print_arc_command): Constify.
1278 * valprint.c (set_print, show_print, set_print_raw)
1279 (show_print_raw): Constify.
1280 * maint.c (maintenance_command, maintenance_info_command)
1281 (maintenance_print_command, maintenance_set_cmd)
1282 (maintenance_show_cmd, set_per_command_cmd)
1283 (show_per_command_cmd, maintenance_check_command): Constify.
1284 * language.c (set_check, show_check): Constify.
1285 * typeprint.c (show_print_type, set_print_type): Constify.
1286 * go32-nat.c (go32_info_dos_command): Constify.
1287
fdf44873
TT
12882017-10-11 Tom Tromey <tom@tromey.com>
1289
1290 * breakpoint.c (prepare_re_set_context): Remove.
1291 (breakpoint_re_set_one): Update. Don't use cleanups.
1292 (breakpoint_re_set): Use scoped_restore, std::string, and
1293 scoped_restore_current_language.
1294
81b1e71c
TT
12952017-10-11 Tom Tromey <tom@tromey.com>
1296
1297 * breakpoint.c (commands_command_1): Use std::string.
1298 (cleanup_executing_breakpoints): Remove.
1299 (bpstat_do_actions_1): Use scoped_restore.
1300 (bpstat_check_watchpoint): Use std::string.
1301 (decode_static_tracepoint_spec): Likewise.
1302 (break_range_command): Likewise.
1303 (watch_command_1): Likewise.
1304 (compare_breakpoints): Change argument types.
1305 (clear_command): Use std::vector.
1306 (cleanup_executing_breakpoints): Remove.
1307 (update_global_location_list): Use unique_xmalloc_ptr.
1308 (strace_command): Remove unused declaration.
1309
4f9d9906
JB
13102017-10-11 John Baldwin <jhb@FreeBSD.org>
1311
1312 * Makefile.in (ALLDEPFILES): Add arm-fbsd-nat.c.
1313 * NEWS: Mention new FreeBSD/arm native configuration.
1314 * configure.host: Add arm*-*-freebsd*.
1315 * configure.nat: Likewise.
1316 * arm-fbsd-nat.c: New file.
1317
7176dfd2
JB
13182017-10-11 John Baldwin <jhb@FreeBSD.org>
1319
1320 * Makefile.in (ALL_TARGET_OBS): Add arm-fbsd-tdep.o.
1321 (ALLDEPFILES): Add arm-fbsd-tdep.c.
1322 * NEWS: Mention new FreeBSD/arm target.
1323 * configure.tgt: Add arm*-*-freebsd*.
1324 * arm-fbsd-tdep.c: New file.
1325 * arm-fbsd-tdep.h: New file.
1326
fe220226
MR
13272017-10-11 Maciej W. Rozycki <macro@imgtec.com>
1328
1329 * linux-tdep.c (linux_make_corefile_notes): Remove call to
1330 `gdbarch_elfcore_write_linux_prpsinfo'.
1331 * gdbarch.sh (elfcore_write_linux_prpsinfo): Remove architecture
1332 method.
1333 (elf_internal_linux_prpsinfo): Remove declaration.
1334 * gdbarch.h: Regenerate.
1335 * gdbarch.c: Regenerate.
1336
a2f63b2e
MR
13372017-10-11 Maciej W. Rozycki <macro@imgtec.com>
1338
1339 * ppc-linux-tdep.c (ppc_linux_init_abi): Remove call to
1340 `set_gdbarch_elfcore_write_linux_prpsinfo'.
1341
458ca1d0
PA
13422017-10-11 Pedro Alves <palves@redhat.com>
1343
1344 * breakpoint.c (reattach_breakpoints): Delete.
1345 * breakpoint.h (reattach_breakpoints): Delete.
1346
905014d7
SM
13472017-10-11 Simon Marchi <simon.marchi@ericsson.com>
1348
1349 * symfile.c (registered_sym_fns): Make struct, not typedef.
1350 (DEF_VEC_O (registered_sym_fns)): Remove.
1351 (symtab_fns): Change type to std::vector.
1352 (add_symtab_fns): Adjust.
1353 (find_sym_fns): Adjust.
1354
56d704da
AK
13552017-10-11 Anton Kolesov <Anton.Kolesov@synopsys.com>
1356
1357 * arc-tdep.c (arc_gdbarch_init): Pass proper cpu value to disassembler.
1358 * arc-tdep.h (arc_arch_is_em): New function.
1359 (arc_arch_is_hs): Likewise.
1360
7fa29be9
EB
13612017-10-11 Egeyar Bagcioglu <egeyar.bagcioglu@oracle.com>
1362
1363 * macrotab.h (macro_lookup_inclusion): Remove unnecessary
1364 parentheses in the declaration.
1365 (macro_lookup_inclusion): Likewise.
1366 (macro_lookup_definition): Likewise.
1367 * p-lang.h (pascal_builtin_types): Likewise.
1368 * tui/tui-data.c (tui_win_list): Likewise.
1369 * tui/tui-data.h (tui_win_list): Likewise.
1370 * utils.h (make_cleanup_free_section_addr_info): Likewise.
1371
d9b477e3
KB
13722017-10-11 Mark Rages <markrages@gmail.com>
1373
1374 * target-memory.c (block_boundaries): Fix for block address not
1375 aligned on block size.
1376
65630365
PA
13772017-10-10 Pedro Alves <palves@redhat.com>
1378 Tom Tromey <tom@tromey.com>
1379
1380 * breakpoint.c (struct captured_breakpoint_query_args)
1381 (do_captured_breakpoint_query, gdb_breakpoint_query): Delete.
1382 (print_breakpoint): New.
1383 * breakpoint.h (print_breakpoint): Declare.
1384 * common/common-exceptions.h (enum return_reason): Remove
1385 references to catch_exceptions.
1386 * exceptions.c (catch_exceptions, catch_exceptions_with_msg):
1387 Delete.
1388 * exceptions.h (catch_exceptions_ftype, catch_exceptions)
1389 (catch_exception_ftype, catch_exceptions_with_msg): Delete.
1390 * gdb.h: Delete.
1391 * gdbthread.h (thread_select): Declare.
1392 * mi/mi-cmd-break.c: Don't include gdb.h.
1393 (breakpoint_notify): Use print_breakpoint.
1394 * mi/mi-cmd-catch.c: Don't include gdb.h.
1395 * mi/mi-interp.c: Don't include gdb.h.
1396 (mi_print_breakpoint_for_event): New.
1397 (mi_breakpoint_created, mi_breakpoint_modified): Use
1398 mi_print_breakpoint_for_event.
1399 * mi/mi-main.c: Don't include gdb.h.
1400 (mi_cmd_thread_select): Parse the global thread ID here. Use
1401 thread_select instead of gdb_thread_select.
1402 (mi_cmd_thread_list_ids): Output "thread-ids" tuple here instead
1403 of using gdb_list_thread_ids.
1404 * remote-fileio.c (do_remote_fileio_request): Change type. Reply
1405 FILEIO_ENOSYS here.
1406 (remote_fileio_request): Use TRY/CATCH instead of
1407 catch_exceptions.
1408 * symfile-mem.c (struct symbol_file_add_from_memory_args)
1409 (symbol_file_add_from_memory_wrapper): Delete.
1410 (add_vsyscall_page): Use TRY/CATCH instead of catch_exceptions.
1411 * thread.c: Don't include gdb.h.
1412 (do_captured_list_thread_ids, gdb_list_thread_ids): Delete.
1413 (thread_alive): Use thread_select.
1414 (do_captured_thread_select): Delete, parts salvaged as ...
1415 (thread_select): ... this new function.
1416 (gdb_thread_select): Delete.
1417
bf469271
PA
14182017-10-10 Pedro Alves <palves@redhat.com>
1419 Tom Tromey <tom@tromey.com>
1420
1421 * breakpoint.c (breakpoint_cond_eval): Change return type to bool
1422 and reverse logic.
1423 (WP_DELETED, WP_VALUE_CHANGED, WP_VALUE_NOT_CHANGED, WP_IGNORE):
1424 No longer macros. Instead ...
1425 (enum wp_check_result): They're now values of this new
1426 enumeration.
1427 (watchpoint_check): Change return type to wp_check_result and
1428 parameter type to bpstat.
1429 (bpstat_check_watchpoint): Use TRY/CATCH instead of catch_errors.
1430 (bpstat_check_breakpoint_conditions): Use TRY/CATCH instead of
1431 catch_errors. Reverse logic of watchpoint_check call.
1432 (breakpoint_re_set_one): Now returns void and takes a breakpoint
1433 pointer as parameter.
1434 (breakpoint_re_set): Use TRY/CATCH instead of catch_errors.
1435 * common/common-exceptions.c (throw_exception_sjlj): Update
1436 comments to avoid mentioning catch_errors.
1437 * exceptions.c (catch_errors): Delete.
1438 * exceptions.h: Update comments to avoid mentioning catch_errors.
1439 (catch_errors_ftype, catch_errors): Delete.
1440 * infrun.c (normal_stop): Use TRY/CATCH instead of catch_errors.
1441 (hook_stop_stub): Delete.
1442 (restore_selected_frame): Change return type to void, and
1443 parameter type to const frame_id &.
1444 (restore_infcall_control_state): Use TRY/CATCH instead of
1445 catch_errors.
1446 * main.c (captured_command_loop): Return void and remove
1447 parameter. Remove references to catch_errors.
1448 (captured_main): Use TRY/CATCH instead of catch_errors.
1449 * objc-lang.c (objc_submethod_helper_data)
1450 (find_objc_msgcall_submethod_helper): Delete.
1451 (find_objc_msgcall_submethod): Use TRY/CATCH instead of
1452 catch_errors.
1453 * record-full.c (record_full_message): Return void.
1454 (record_full_message_args, record_full_message_wrapper): Delete.
1455 (record_full_message_wrapper_safe): Return bool and use TRY/CATCH
1456 instead of catch_errors.
1457 * solib-aix.c (solib_aix_open_symbol_file_object): Change
1458 parameter type to int.
1459 * solib-darwin.c (open_symbol_file_object): Ditto.
1460 * solib-dsbt.c (open_symbol_file_object): Ditto.
1461 * solib-frv.c (open_symbol_file_object): Ditto.
1462 * solib-svr4.c (open_symbol_file_object): Ditto.
1463 * solib-target.c (solib_target_open_symbol_file_object): Ditto.
1464 * solib.c (update_solib_list): Use TRY/CATCH instead of
1465 catch_errors.
1466 * solist.h (struct target_so_ops) <open_symbol_file_object>:
1467 Change type.
1468 * symmisc.c (struct print_symbol_args): Remove.
1469 (dump_symtab_1): Use TRY/CATCH instead of catch_errors.
1470 (print_symbol): Change type.
1471 * windows-nat.c (handle_load_dll, handle_unload_dll): Return void
1472 and remove parameters.
1473 (catch_errors): New.
1474 (get_windows_debug_event): Adjust.
1475
1a56bfa5
TT
14762017-10-09 Tom Tromey <tom@tromey.com>
1477
1478 * mi/mi-main.c (free_splay_tree): Remove.
1479 (list_available_thread_groups): Use splay_tree_up.
1480 * common/gdb_splay_tree.h: New file.
1481
0c478e2d
TT
14822017-10-09 Tom Tromey <tom@tromey.com>
1483
1484 * mi/mi-main.c (do_nothing): Remove.
1485 (list_available_thread_groups): Update.
1486
cbd2b4e3
PA
14872017-10-09 Pedro Alves <palves@redhat.com>
1488
1489 * infrun.c (handle_inferior_event_1) <TARGET_WAITKIND_EXECD>: Skip
1490 reading registers when switching context.
1491
a181c0bf
JB
14922017-10-09 John Baldwin <jhb@FreeBSD.org>
1493
1494 * fbsd-nat.c (fbsd_siginfo_size): Use gdbarch_long_bit.
1495 (fbsd_convert_siginfo): Likewise.
1496 * fbsd-tdep.c (fbsd_core_xfer_siginfo): Likewise.
1497
6e66f753
SM
14982017-10-09 Simon Marchi <simon.marchi@polymtl.ca>
1499
1500 * configure.ac (try_guile_versions): Remove guile-2.2.
1501 * configure: Regenerate.
1502
890e9790
TT
15032017-10-09 Tom Tromey <tom@tromey.com>
1504
1505 * Makefile.in (COMPILE.post, POSTCOMPILE): Restore $(basename).
1506 (COMPILE.pre): Use $(CXX).
1507
109483d9
PA
15082017-10-09 Pedro Alves <palves@redhat.com>
1509
1510 * cp-support.c (cp_remove_params): Return a gdb::unique_xmalloc_ptr.
1511 Use bool.
1512 (overload_list_add_symbol): Adjust to use gdb::unique_xmalloc_ptr.
1513 * cp-support.h (cp_remove_params): Now returns a
1514 gdb::unique_xmalloc_ptr.
1515 * dwarf2read.c (find_slot_in_mapped_hash): Now returns bool.
1516 Adjust to cp_remove_params returning a gdb::unique_xmalloc_ptr.
1517 * psymtab.c (psymtab_search_name): Adjust to cp_remove_params
1518 returning a gdb::unique_xmalloc_ptr.
1519 (lookup_partial_symbol): Adjust to use gdb::unique_xmalloc_ptr.
1520 * stack.c (find_frame_funname): Adjust to cp_remove_params
1521 returning a gdb::unique_xmalloc_ptr.
1522
791afaa2
TT
15232017-10-08 Tom Tromey <tom@tromey.com>
1524
1525 * dwarf2read.c (dwarf2_get_dwz_file): Use
1526 gdb::unique_xmalloc_ptr.
1527 (find_slot_in_mapped_hash): Likewise.
1528 (dwarf2_physname): Likewise.
1529 (create_dwo_unit_in_dwp_v1): Use std::string.
1530 (create_dwo_unit_in_dwp_v2): Likewise.
1531 (lookup_dwo_cutu): Likewise.
1532 (inherit_abstract_dies): Use std::vector.
1533 (read_array_type): Likewise.
1534 (dwarf_decode_macros): Remove unused declaration.
1535 (unsigned_int_compar): Remove.
1536 (dwarf2_build_psymtabs_hard): Use scoped_restore.
1537 (psymtabs_addrmap_cleanup): Remove.
1538
30a9c02f
TT
15392017-10-08 Tom Tromey <tom@tromey.com>
1540
1541 * frame-unwind.c (frame_unwind_try_unwinder): Update.
1542 * frame.h (frame_cleanup_after_sniffer): Declare.
1543 (frame_prepare_for_sniffer): Return void.
1544 * frame.c (frame_cleanup_after_sniffer): No longer static. Change
1545 type of argument.
1546 (frame_prepare_for_sniffer): Return void.
1547
757325a3
TT
15482017-10-08 Tom Tromey <tom@tromey.com>
1549
1550 * utils.h (make_cleanup_value_free): Remove.
1551 * utils.c (do_value_free, struct cleanup): Remove.
1552 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full) <DWARF_VALUE_STACK>:
1553 Use gdb_value_up.
1554 * value.h (struct value_deleter): New.
1555 (gdb_value_up): New typedef.
1556
b9c04fb2
TT
15572017-10-08 Tom Tromey <tom@tromey.com>
1558
1559 * symtab.c (free_search_symbols, do_free_search_symbols_cleanup)
1560 (make_cleanup_free_search_symbols): Remove.
1561 (search_symbols): Return std::vector.
1562 (symbol_search::compare_search_syms): Now member of
1563 symbol_search. Change arguments.
1564 (sort_search_symbols_remove_dups): Change arguments. Rewrite.
1565 (symtab_symbol_info, rbreak_command): Update.
1566 * symtab.h (struct symbol_search) <next>: Remove.
1567 Add constructors.
1568 (symbol_search::operator<): New function.
1569 (symbol_search::operator==): New function.
1570 (search_symbols): Remove std::vector.
1571 (free_search_symbols, make_cleanup_free_search_symbols): Remove.
1572 (symbol_search::compare_search_syms): Declare.
1573
0d28b0a5
YQ
15742017-10-06 Yao Qi <yao.qi@linaro.org>
1575
1576 * Makefile.in (ALL_64_TARGET_OBS): Replace aarch64-insn.o with
1577 arch/aarch64-insn.o.
1578 Remove one rule.
1579 * configure.tgt: Replace aarch64-insn.o with arch/aarch64-insn.o.
1580
71917808
YQ
15812017-10-06 Yao Qi <yao.qi@linaro.org>
1582
1583 * Makefile.in (ALL_TARGET_OBS): Replace arm.o, arm-get-next-pcs.o,
1584 and arm-linux.o with arch/arm.o, arch/arm-get-next-pcs.o and
1585 arch/arm-linux.o respectively.
1586 * configure.tgt: Likewise.
1587
2081b2b2
YQ
15882017-10-06 Yao Qi <yao.qi@linaro.org>
1589
1590 * Makefile.in (ALL_TARGET_OBS): Rename i386.o to arch/i386.o.
1591 * configure.tgt (i386_tobjs): Replace i386.o with arch/i386.o.
1592
a1b85d28
PA
15932017-10-06 Pedro Alves <palves@redhat.com>
1594
1595 * windows-nat.c: Include <algorithm>.
1596
d97987e2
YQ
15972017-10-06 Yao Qi <yao.qi@linaro.org>
1598
1599 * configure.tgt (i386_tobjs): New variable.
1600 (amd64_tobjs): New variable.
1601 Set $cpu_obs and $os_obs.
1602
f38307f5
YQ
16032017-10-06 Yao Qi <yao.qi@linaro.org>
1604
1605 * Makefile.in (CONFIG_SRC_SUBDIR): New.
1606 (ALL_64_TARGET_OBS): Replace amd64.o with arch/amd64.o.
1607 (clean): Remove object files and dependency files.
1608 (distclean): Remove the directory.
1609 * configure.ac: Invoke AC_CONFIG_COMMANDS.
1610 * configure: Re-generated.
1611 * configure.tgt: Replace amd64.o with arch/amd64.o.
1612
2f924de6
JM
16132017-10-05 Jose E. Marchesi <jose.marchesi@oracle.com>
1614
1615 PR build/22188
1616 * arm-tdep.c (arm_decode_misc_memhint_neon): Fix decoding of CPS
1617 and SETEND.
1618
2fd9d7ca
PA
16192017-10-05 Pedro Alves <palves@redhat.com>
1620
1621 * linux-nat.c (linux_child_follow_fork): When following the parent
1622 and detaching the child, consult the parent thread's architecture
1623 instead of the child's.
1624
d13b8493
UW
16252017-10-05 Ulrich Weigand <uweigand@de.ibm.com>
1626
1627 * ax.h: Do not include "doublest.h".
1628 (union agent_val): Remove.
1629
3b4b2f16
UW
16302017-10-05 Ulrich Weigand <uweigand@de.ibm.com>
1631
1632 * dfp.h (MAX_DECIMAL_STRING): Move to dfp.c.
1633 (decimal_to_string): Return std::string object.
1634 (decimal_from_string): Accept std::string object. Return bool.
1635 (decimal_from_integral, decimal_from_doublest): Remove.
1636 (decimal_from_longest): Add prototype.
1637 (decimal_from_ulongest): Likewise.
1638 (decimal_to_longest): Likewise.
1639 (decimal_from_doublest): Likewise.
1640 * dfp.c: Do not include "gdbtypes.h" or "value.h".
1641 (MAX_DECIMAL_STRING): Move here.
1642 (decimal_to_string): Return std::string object.
1643 (decimal_from_string): Accept std::string object. Return bool.
1644 (decimal_from_integral): Remove, replace by ...
1645 (decimal_from_longest, decimal_from_ulongest): ... these new functions.
1646 (decimal_to_longest): New function.
1647 (decimal_from_floating): Remove, replace by ...
1648 (decimal_from_doublest): ... this new function.
1649 (decimal_to_doublest): Update to new decimal_to_string interface.
1650
1651 * value.c (unpack_long): Use decimal_to_longest.
1652 * valops.c (value_cast): Use decimal_from_doublest instead of
1653 decimal_from_floating. Use decimal_from_[u]longest isntead of
1654 decimal_from_integral.
1655 * valarith.c (value_args_as_decimal): Likewise.
1656 * valprint.c (print_decimal_floating): Update to new
1657 decimal_to_string interface.
1658 * printcmd.c (printf_decfloat): Likewise.
1659 * c-exp.y (parse_number): Update to new decimal_from_string interface.
1660
1841ee5d
UW
16612017-10-05 Ulrich Weigand <uweigand@de.ibm.com>
1662
1663 * doublest.h: Do not include "floatformat.h". Remove stale comments.
1664 * gdbtypes.c: Include "floatformat.h".
1665 * value.c: Likewise.
1666 * m68k-tdep.c: Likewise.
1667
1668 * findvar.c: Do not include "floatformat.h".
1669 * amd64-darwin-tdep.c: Likewise.
1670 * arm-linux-tdep.c: Likewise.
1671 * i386-darwin-tdep.c: Likewise.
1672 * i387-tdep.c: Likewise.
1673 * m68k-linux-tdep.c: Likewise.
1674 * mep-tdep.c: Likewise.
1675 * mips-tdep.c: Likewise.
1676 * nios2-tdep.c: Likewise.
1677 * s390-linux-tdep.c: Likewise.
1678 * sparc-obsd-tdep.c: Likewise.
1679 * sparc-tdep.c: Likewise.
1680 * sparc64-tdep.c: Likewise.
1681 * spu-tdep.c: Likewise.
1682 * tic6x-tdep.c: Likewise.
1683 * tilegx-tdep.c: Likewise.
1684 * vax-tdep.c: Likewise.
1685 * xstormy16-tdep.c: Likewise.
1686 * xtensa-tdep.c: Likewise.
1687
1688 * top.c: Do not include "doublest.h".
1689 * aarch64-tdep.c: Likewise.
1690 * alpha-tdep.c: Likewise.
1691 * arm-linux-tdep.c: Likewise.
1692 * m68k-linux-tdep.c: Likewise.
1693 * tilegx-tdep.c: Likewise.
1694 * xstormy16-tdep.c: Likewise.
1695
a80a6471
JB
16962017-10-05 John Baldwin <jhb@FreeBSD.org>
1697
1698 * mips-fbsd-tdep.c (MIPS_INST_ADDIU_A0_SP_N32): Define.
1699 (mipsn32_fbsd_sigframe): Define.
1700 (mips_fbsd_init_abi): Install mipsn32_fbsd_sigframe unwinder
1701 for FreeBSD/mipsn32.
1702
12c4bd7f
JB
17032017-10-05 John Baldwin <jhb@FreeBSD.org>
1704
1705 * fbsd-tdep.c (fbsd_print_auxv_entry): Handle AT_EHDRFLAGS and
1706 AT_HWCAP.
1707
c91933e9
TG
17082017-10-05 Tristan Gingold <tgingold@free.fr>
1709
1710 * MAINTAINERS (Misc): Update my email address.
1711
5cd63fda
PA
17122017-10-04 Pedro Alves <palves@redhat.com>
1713
1714 * remote.c (get_remote_arch_state): New 'gdbarch' parameter. Use
1715 it instead of target_gdbarch.
1716 (get_remote_state, get_remote_packet_size): Adjust
1717 get_remote_arch_state calls, passing down target_gdbarch
1718 explicitly.
1719 (packet_reg_from_regnum, packet_reg_from_pnum): New parameter
1720 'gdbarch' and use it instead of target_gdbarch.
1721 (get_memory_packet_size): Adjust get_remote_arch_state calls,
1722 passing down target_gdbarch explicitly.
1723 (struct stop_reply) <arch>: New field.
1724 (remote_parse_stop_reply): Use the stopped thread's architecture,
1725 not the current inferior's. Save the architecture in the
1726 stop_reply.
1727 (process_stop_reply): Use the stop reply's architecture.
1728 (process_g_packet, remote_fetch_registers)
1729 (remote_prepare_to_store, store_registers_using_G)
1730 (remote_store_registers): Adjust get_remote_arch_state calls,
1731 using the regcache's architecture.
1732 (remote_get_trace_status): Adjust get_remote_arch_state calls,
1733 passing down target_gdbarch explicitly.
1734 * spu-multiarch.c (spu_thread_architecture): Defer to the target
1735 beneath instead of calling target_gdbarch.
1736 * target.c (default_thread_architecture): Use the specified
1737 inferior's architecture, instead of the current inferior's
1738 architecture (via target_gdbarch).
1739
ed4227b7
PA
17402017-10-04 Pedro Alves <palves@redhat.com>
1741
1742 * regcache.c (get_thread_arch_regcache): Remove null_ptid special
1743 case.
1744 (regcache_print): Handle !target_has_registers here instead.
1745
55b11ddf
PA
17462017-10-04 Pedro Alves <palves@redhat.com>
1747
1748 * frame.c (create_test_frame): Delete.
1749 * frame.h (create_test_frame): Delete.
1750 * gdbarch-selftests.c: Include gdbthread.h and target.h.
1751 (class regcache_test): Delete.
1752 (test_target_has_registers, test_target_has_stack)
1753 (test_target_has_memory, test_target_prepare_to_store)
1754 (test_target_store_registers): New functions.
1755 (test_target_ops): New class.
1756 (register_to_value_test): Error out if there's already a
1757 process_stratum (or higher) target pushed. Create a fuller mock
1758 environment, with mock target_ops, inferior, address space, thread
1759 and inferior_ptid.
1760 * progspace.c (struct address_space): Move to ...
1761 * progspace.h (struct address_space): ... here.
1762 * regcache.h (regcache::~regcache, regcache::raw_write)
1763 [GDB_SELF_TEST]: No longer virtual.
1764
4c71c105
SM
17652017-10-04 Simon Marchi <simon.marchi@ericsson.com>
1766
1767 * mi/mi-main.c (list_available_thread_groups): Reverse filter logic.
1768
73dcd72d
PA
17692017-10-04 Pedro Alves <palves@redhat.com>
1770
1771 * guile/scm-breakpoint.c (gdbscm_breakpoint_commands): Move code
1772 out of 'between TRY and CATCH'.
1773
44704526
PA
17742017-10-04 Pedro Alves <palves@redhat.com>
1775
1776 * cli/cli-cmds.c (complete_command): Add missing END_CATCH.
1777 * common/common-exceptions.h (TRY): Open an outermost scope.
1778 Expand intro comment.
1779 (CATCH): Reindent.
1780 (END_CATCH): Close the outermost scope.
1781 * completer.c (complete_line_internal): Add missing END_CATCH.
1782
bc3b087d
SDJ
17832017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
1784
1785 * NEWS (Changes since GDB 8.0): Add entry about new
1786 'set-cwd-on-gdbserver' feature.
1787 (New remote packets): Add entry for QSetWorkingDir.
1788 * common/common-inferior.h (set_inferior_cwd): New prototype.
1789 * infcmd.c (set_inferior_cwd): Remove "static".
1790 (show_cwd_command): Expand text to include remote debugging.
1791 * remote.c: Add PACKET_QSetWorkingDir.
1792 (remote_protocol_features) <QSetWorkingDir>: New entry for
1793 PACKET_QSetWorkingDir.
1794 (extended_remote_set_inferior_cwd): New function.
1795 (extended_remote_create_inferior): Call
1796 "extended_remote_set_inferior_cwd".
1797 (_initialize_remote): Call "add_packet_config_cmd" for
1798 QSetWorkingDir.
1799
d092c5a2
SDJ
18002017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
1801
1802 * NEWS (New commands): Mention "set/show cwd".
1803 * cli/cli-cmds.c (_initialize_cli_cmds): Mention "set cwd" on
1804 "cd" command's help text.
1805 * common/common-inferior.h (get_inferior_cwd): New prototype.
1806 * infcmd.c (inferior_cwd_scratch): New global variable.
1807 (set_inferior_cwd): New function.
1808 (get_inferior_cwd): Likewise.
1809 (set_cwd_command): Likewise.
1810 (show_cwd_command): Likewise.
1811 (_initialize_infcmd): Add "set/show cwd" commands.
1812 * inferior.h (class inferior) <cwd>: New field.
1813 * nat/fork-inferior.c: Include "gdb_tilde_expand.h".
1814 (fork_inferior): Change inferior's cwd before its execution.
1815 * windows-nat.c (windows_create_inferior): Pass inferior's cwd
1816 to CreateProcess.
1817
7da0a886
SDJ
18182017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
1819
1820 * Makefile.in (SFILES): Add gdb_tilde_expand.c.
1821 (HFILES_NO_SRCDIR): Add gdb_tilde_expand.h.
1822 (COMMON_OBS): Add gdb_tilde_expand.o.
1823 * common/gdb_tilde_expand.c: New file.
1824 * common/gdb_tilde_expand.h: Likewise.
1825
db8dd160
MR
18262017-10-03 Maciej W. Rozycki <macro@imgtec.com>
1827
1828 * gdbarch.sh (objfile): Remove duplicate declaration.
1829 * gdbarch.h: Regenerate.
1830
f8bfbf22
TT
18312017-10-03 Tom Tromey <tom@tromey.com>
1832
1833 * utils.c (internal_vproblem): Use string_vprintf.
1834
5178ed48
TT
18352017-10-03 Tom Tromey <tom@tromey.com>
1836
1837 * printcmd.c (info_symbol_command): Use std::string.
1838
8cff8730
TT
18392017-10-03 Tom Tromey <tom@tromey.com>
1840
1841 * top.c (gdb_safe_append_history): Use std::string.
1842
895b8f30
TT
18432017-10-03 Tom Tromey <tom@tromey.com>
1844
1845 * event-top.c (stdin_event_handler): Update.
1846 * main.c (captured_main_1): Update.
1847 * top.h (make_delete_ui_cleanup): Remove.
1848 (struct ui): Add constructor and destructor.
1849 (new_ui, delete_ui): Remove.
1850 * top.c (make_delete_ui_cleanup): Remove.
1851 (new_ui_command): Use std::unique_ptr.
1852 (delete_ui_cleanup): Remove.
1853 (ui::ui): Rename from new_ui. Update.
1854 (free_ui): Remove.
1855 (ui::~ui): Rename from delete_ui. Update.
1856
0efef640
TT
18572017-10-03 Tom Tromey <tom@tromey.com>
1858
1859 * symfile.c (load_progress): Use gdb::byte_vector.
1860
245ad7d3
TT
18612017-10-03 Tom Tromey <tom@tromey.com>
1862
1863 * mi/mi-main.c (mi_cmd_trace_frame_collected): Remove unused
1864 declaration.
1865 * printcmd.c (x_command): Remove unused declaration.
1866 * symfile.c (symbol_file_command): Remove unused declaration.
1867
e05550d7
TT
18682017-10-03 Tom Tromey <tom@tromey.com>
1869
1870 * utils.c (internal_vproblem): Use std::string.
1871 (defaulted_query): Likewise.
1872
b95de2b7
TT
18732017-10-03 Tom Tromey <tom@tromey.com>
1874
1875 * guile/scm-ports.c (ioscm_with_output_to_port_worker): Update.
1876 * top.c (execute_command_to_string): Update.
1877 * utils.c (make_cleanup_restore_page_info): Remove.
1878 (do_restore_page_info_cleanup): Remove.
1879 (set_batch_flag_and_restore_page_info):
1880 New.
1881 (make_cleanup_restore_page_info): Remove.
1882 (set_batch_flag_and_make_cleanup_restore_page_info): Remove.
1883 (~set_batch_flag_and_restore_page_info): New
1884 (make_cleanup_restore_uinteger): Remove.
1885 (make_cleanup_restore_integer): Remove.
1886 (struct restore_integer_closure): Remove.
1887 (restore_integer): Remove.
1888 * utils.h (struct set_batch_flag_and_restore_page_info): New
1889 class.
1890 (set_batch_flag_and_make_cleanup_restore_page_info): Remove.
1891 (make_cleanup_restore_page_info): Remove.
1892 (make_cleanup_restore_uinteger) Remove.
1893 (make_cleanup_restore_integer) Remove.
1894
07036511
TT
18952017-10-03 Tom Tromey <tom@tromey.com>
1896
1897 * record-full.h (record_full_gdb_operation_disable_set): Return
1898 scoped_restore_tmpl<int>.
1899 * infrun.c (adjust_pc_after_break): Update.
1900 (handle_signal_stop): Update.
1901 * record-full.c (record_full_gdb_operation_disable_set): Return
1902 scoped_restore_tmpl<int>.
1903 (record_full_wait_1, record_full_insert_breakpoint)
1904 (record_full_remove_breakpoint, record_full_save)
1905 (record_full_goto_insn): Update.
1906
45320ffa
TT
19072017-10-02 Tom Tromey <tom@tromey.com>
1908
1909 PR rust/22236:
1910 * rust-lang.c (rust_val_print_str): New function.
1911 (val_print_struct): Call it.
1912 (rust_subscript): Preserve name of slice type.
1913
b3e3859b
TT
19142017-10-02 Tom Tromey <tom@tromey.com>
1915
1916 * rust-lang.c (rust_subscript): Handle slices in
1917 EVAL_AVOID_SIDE_EFFECTS case.
1918
01af5e0d
TT
19192017-10-02 Tom Tromey <tom@tromey.com>
1920
1921 * rust-lang.c (rust_slice_type_p): Recognize &str as a slice type.
1922
888e3ddb
TT
19232017-10-02 Tom Tromey <tom@tromey.com>
1924
1925 * rust-lang.h (rust_slice_type): Add "extern".
1926
cc536b21
PA
19272017-10-02 Tom Tromey <tom@tromey.com>
1928 Pedro Alves <palves@redhat.com>
1929
1930 * ada-lang.h (ada_exc_info::operator<): Make const.
1931 (ada_exc_info::operator==): Make const.
1932 * ada-lang.c (ada_exc_info::operator<, ada_exc_info::operator==):
1933 Make const.
1934
386c8614
TT
19352017-09-29 Tom Tromey <tom@tromey.com>
1936
1937 * target.c (read_whatever_is_readable): Change type of "result".
1938 Update.
1939 (free_memory_read_result_vector): Remove.
1940 (read_memory_robust): Change return type. Update.
1941 * mi/mi-main.c (mi_cmd_data_read_memory_bytes): Update. Use
1942 bin2hex, std::string.
1943 * target.h (memory_read_result_s): Remove typedef.
1944 (free_memory_read_result_vector): Remove.
1945 (read_memory_robust): Return std::vector.
1946
789c4b5e
TT
19472017-09-29 Tom Tromey <tom@tromey.com>
1948
1949 * mi/mi-main.c (captured_mi_execute_command): Use scope_restore.
1950
ab816a27
TT
19512017-09-29 Tom Tromey <tom@tromey.com>
1952
1953 * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions): Update.
1954 * ada-lang.h (struct ada_exc_info): Remove typedef. Declare
1955 operator< and operator==.
1956 (ada_exceptions_list): Return a std::vector.
1957 * ada-lang.c (ada_exc_info::operator<): Rename from
1958 compare_ada_exception_info.
1959 (ada_exc_info::operator==): New.
1960 (sort_remove_dups_ada_exceptions_list): Change type of
1961 "exceptions".
1962 (ada_add_standard_exceptions, ada_add_exceptions_from_frame)
1963 (ada_add_global_exceptions): Likewise.
1964 (ada_exceptions_list_1): Return a std::vector.
1965 (ada_exceptions_list): Likewise.
1966
52f9abe4
TT
19672017-09-29 Tom Tromey <tom@tromey.com>
1968
1969 * mi/mi-main.c (struct print_one_inferior_data) <inferiors>: Now a
1970 'std::set *'.
1971 (print_one_inferior): Update.
1972 (free_vector_of_ints): Remove.
1973 (list_available_thread_groups): Change "ids" to std::set.
1974 (mi_cmd_list_thread_groups): Update.
1975 (struct collect_cores_data) <core>: Now a std::set.
1976 (collect_cores): Update.
1977 (unique): Remove.
1978 (print_one_inferior): Update.
1979
dcd5ddcc
TT
19802017-09-29 Tom Tromey <tom@tromey.com>
1981
1982 * mi/mi-main.c (mi_execute_cli_command): Use std::string.
1983 (mi_execute_async_cli_command): Likewise.
1984 (mi_cmd_trace_frame_collected): Use field_fmt.
1985
45d288cc
TT
19862017-09-29 Tom Tromey <tom@tromey.com>
1987
1988 * mi/mi-main.c (mi_cmd_data_write_memory_bytes): Use
1989 gdb::byte_vector.
1990
6afe2f4a
TT
19912017-09-29 Tom Tromey <tom@tromey.com>
1992
1993 * mi/mi-parse.c (mi_parse): Remove unused declaration.
1994
9813429a
TT
19952017-09-29 Tom Tromey <tom@tromey.com>
1996
1997 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Don't copy "oarg".
1998
2d6960b4
TT
19992017-09-29 Tom Tromey <tom@tromey.com>
2000
2001 * varobj.h (varobj_gen_name): Return std::string.
2002 * varobj.c (varobj_gen_name): Return std::string.
2003 * mi/mi-cmd-var.c (mi_cmd_var_create): Use std::string.
2004 (mi_cmd_var_delete): Don't copy "name".
2005
784c453a
TT
20062017-09-29 Tom Tromey <tom@tromey.com>
2007
2008 * mi/mi-cmd-break.c (mi_argv_to_format): Return std::string.
2009 (mi_cmd_break_insert_1): Update.
2010
a9bc57b9
TT
20112017-09-29 Tom Tromey <tom@tromey.com>
2012
2013 * target.h (make_scoped_defer_target_commit_resume): Update.
2014 * target.c (make_scoped_defer_target_commit_resume): Rename from
2015 make_cleanup_defer_target_commit_resume. Return a
2016 scoped_restore.
2017 * infrun.c (proceed): Use make_scoped_defer_target_commit_resume.
2018
9754d8c4
TT
20192017-09-29 Tom Tromey <tom@tromey.com>
2020
2021 * main.c (captured_main_1): Remove unused declaration.
2022 * spu-multiarch.c (parse_spufs_run): Remove unused declaration.
2023
99ef965c
TT
20242017-09-29 Tom Tromey <tom@tromey.com>
2025
2026 * symtab.c (search_symbols): Remove unused outer cleanup.
2027 (make_source_files_completion_list): Remove unused declaration.
2028
42518ba7
TT
20292017-09-29 Tom Tromey <tom@tromey.com>
2030
2031 * mt-tdep.c (mt_push_dummy_call): Use gdb::byte_vector.
2032
726b2169
TT
20332017-09-29 Tom Tromey <tom@tromey.com>
2034
2035 * xstormy16-tdep.c (xstormy16_push_dummy_call): Use
2036 gdb::byte_vector.
2037
55b06432
TT
20382017-09-29 Tom Tromey <tom@tromey.com>
2039
2040 * complaints.c (vcomplaint): Use std::string.
2041
8abcee91
TT
20422017-09-29 Tom Tromey <tom@tromey.com>
2043
2044 * tracepoint.c (trace_variable_command): Use std::string.
2045 (encode_actions_1): Remove unused declarations.
2046 (create_tsv_from_upload): Use std::string.
2047
6ad94bc7
TT
20482017-09-29 Tom Tromey <tom@tromey.com>
2049
2050 * cp-support.c (gdb_demangle): Use std::string.
2051
2003f3d8
TT
20522017-09-29 Tom Tromey <tom@tromey.com>
2053
2054 * stack.c (parse_frame_specification): Use std::string
2055 (info_frame_command): Use gdb::unique_xmalloc_ptr.
2056
8f8accb5
TT
20572017-09-29 Tom Tromey <tom@tromey.com>
2058
2059 * tilegx-tdep.c (tilegx_push_dummy_call): Use gdb::byte_vector.
2060
200aa7b1
TT
20612017-09-29 Tom Tromey <tom@tromey.com>
2062
2063 * utils.c (vfprintf_maybe_filtered): Use std::string.
2064 (vfprintf_unfiltered): Likewise.
2065
606aae8a
TT
20662017-09-29 Tom Tromey <tom@tromey.com>
2067
2068 * event-top.c (top_level_prompt): Return std::string.
2069 (display_gdb_prompt): Update.
2070
bd413795
TT
20712017-09-29 Tom Tromey <tom@tromey.com>
2072
2073 * unittests/common-utils-selftests.c (format): New function.
2074 (string_vprintf_tests): New function.
2075 (_initialize_common_utils_selftests): Register new tests.
2076 * common/common-utils.c (string_vprintf): New function.
2077 * common/common-utils.h (string_vprintf): Declare.
2078
256642e8
PA
20792017-09-29 Pedro Alves <palves@redhat.com>
2080
2081 * common/rsp-low.c (unpack_varlen_hex): Constify.
2082 * common/rsp-low.h (unpack_varlen_hex): Constify.
2083 * linux-nat.c (linux_child_static_tracepoint_markers_by_strid):
2084 Constify.
2085 * remote.c (remote_set_permissions, read_ptid)
2086 (remote_current_thread, remote_get_threads_with_qthreadinfo)
2087 (remote_static_tracepoint_marker_at)
2088 (remote_static_tracepoint_markers_by_strid)
2089 (stop_reply_extract_thread, remote_parse_stop_reply): Constify.
2090 * tracepoint.c (parse_trace_status, parse_tracepoint_status)
2091 (parse_tracepoint_definition, parse_tsv_definition)
2092 (parse_static_tracepoint_marker_definition): Constify.
2093 * tracepoint.h (parse_static_tracepoint_marker_definition)
2094 (parse_trace_status, parse_tracepoint_status)
2095 (parse_tracepoint_definition, parse_tsv_definition): Constify.
2096
b6bb3468
PA
20972017-09-29 Pedro Alves <palves@redhat.com>
2098
2099 * remote.c (target_buf, target_buf_size): Delete.
2100 (remote_get_noisy_reply): Remove buf_p and sizeof_buf parameters.
2101 Use the connection's packet buffer instead.
2102 All callers adjusted.
2103 (_initialize_remote): Remove references to target_buf and
2104 target_buf_size.
2105
b2f8eb7a
PA
21062017-09-28 Pedro Alves <palves@redhat.com>
2107
2108 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
2109 unittests/common-utils-selftests.c.
2110 (SUBDIR_UNITTESTS_OBS): Add common-utils-selftests.o.
2111 (COMMON_OBS): Remove utils-selftests.o.
2112 * utils-selftests.c: Move to ...
2113 * unittests/common-utils-selftests.c: ... here and rename self
2114 test to "string_printf".
2115
08302ed2
DE
21162017-09-28 Alexander Shaposhnikov <alexander.v.shaposhnikov@gmail.com> (tiny patch)
2117
2118 * dwarf2read.c (open_and_init_dwp_file): Protect against dwp_file
2119 having NULL cus or tus.
2120
96a5a1d3
UW
21212017-09-27 Ulrich Weigand <uweigand@de.ibm.com>
2122
2123 * arm-tdep.c: (convert_from_extended): Remove.
2124 (convert_to_extended): Likewise.
2125 (arm_extract_return_value): Use convert_typed_floating.
2126 (arm_store_return_value): Likewise.
2127
2128 * sh-tdep.h (struct gdbarch_tdep): Add sh_littlebyte_bigword_type.
2129 * sh-tdep.c: Do not include "floatformat.h".
2130 (sh_littlebyte_bigword_type): New function.
2131 (sh_register_convert_to_virtual): Use convert_typed_floating.
2132 (sh_register_convert_to_raw): Likewise.
2133 * sh64-tdep.c: (struct gdbarch_tdep): Add sh_littlebyte_bigword_type.
2134 (sh64_littlebyte_bigword_type): New function.
2135 (sh64_extract_return_value): Use convert_typed_floating.
2136 (sh64_register_convert_to_virtual): Likewise.
2137 (sh64_register_convert_to_raw): Likewise.
2138
0db7851f
UW
21392017-09-27 Ulrich Weigand <uweigand@de.ibm.com>
2140
2141 * doublest.h (floatformat_from_type): Move to gdbtypes.h.
2142 * doublest.c (floatformat_from_type): Move to gdbtypes.c.
2143
2144 * gdbtypes.h (union type_specific): Make field floatformat hold
2145 just a single struct floatformat, not an array.
2146 (floatformat_from_type): Move here.
2147 * gdbtypes.c (floatformat_from_type): Move here. Update to
2148 changed TYPE_FLOATFORMAT definition.
2149 (verify_floatformat): Update to changed TYPE_FLOATFORMAT.
2150 (recursive_dump_type): Likewise.
2151 (init_float_type): Install correct floatformat for byte order.
2152 (arch_float_type): Likewise.
2153
77b7c781
UW
21542017-09-27 Ulrich Weigand <uweigand@de.ibm.com>
2155
2156 * gdbtypes.c (init_type): Change incoming argument from
2157 length-in-bytes to length-in-bits. Assert length is a
2158 multiple of TARGET_CHAR_BITS.
2159 (arch_type, arch_flags_type): Likewise.
2160 (init_integer_type): Update call to init_type.
2161 (init_character_type): Likewise.
2162 (init_boolean_type): Likewise.
2163 (init_float_type): Likewise.
2164 (init_decfloat_type): Likewise.
2165 (init_complex_type): Likewise.
2166 (init_pointer_type): Likewise.
2167 (objfile_type): Likewise.
2168 (arch_integer_type): Update call to arch_type.
2169 (arch_character_type): Likewise.
2170 (arch_boolean_type): Likewise.
2171 (arch_float_type): Likewise.
2172 (arch_decfloat_type): Likewise.
2173 (arch_complex_type): Likewise.
2174 (arch_pointer_type): Likewise.
2175 (gdbtypes_post_init): Likewise.
2176
2177 * dwarf2read.c (dwarf2_init_float_type): Update call to init_type.
2178 (read_base_type): Likewise.
2179 * mdebugread.c (basic_type): Likewise.
2180 * stabsread.c (dbx_init_float_type): Likewise.
2181 (rs6000_builtin_type): Likewise.
2182 (read_range_type): Likewise. Also, fix call to init_integer_type
2183 with erroneous length argument.
2184
2185 * ada-lang.c (ada_language_arch_info): Update call to arch_type.
2186 * d-lang.c (build_d_types): Likewise.
2187 * f-lang.c (build_fortran_types): Likewise.
2188 * go-lang.c (build_go_types): Likewise.
2189 * opencl-lang.c (build_opencl_types): Likewise.
2190 * jit.c (finalize_symtab): Likewise.
2191 * gnu-v3-abi.c (build_gdb_vtable_type): Likewise.
2192 (build_std_type_info_type): Likewise.
2193 * target-descriptions.c (tdesc_gdb_type): Likewise. Also,
2194 update call to arch_flags_type.
2195
2196 * linux-tdep.c (linux_get_siginfo_type_with_fields): Update call to
2197 arch_type.
2198 * fbsd-tdep.c (fbsd_get_siginfo_type): Likewise.
2199 * windows-tdep.c (windows_get_tlb_type): Likewise.
2200
2201 * avr-tdep.c (avr_gdbarch_init): Update call to arch_type.
2202 * ft32-tdep.c (ft32_gdbarch_init): Likewise.
2203 * m32c-tdep.c (make_types): Likewise.
2204 * rl78-tdep.c (rl78_gdbarch_init): Likewise.
2205 (rl78_psw_type): Update call to arch_flags_type.
2206 * m68k-tdep.c (m68k_ps_type): Update call to arch_flags_type.
2207 * rx-tdep.c (rx_psw_type): Likewise.
2208 (rx_fpsw_type): Likewise.
2209 * sparc-tdep.c (sparc_psr_type): Likewise.
2210 (sparc_fsr_type): Likewise.
2211 * sparc64-tdep.c (sparc64_pstate_type): Likewise.
2212 (sparc64_ccr_type): Likewise.
2213 (sparc64_fsr_type): Likewise.
2214 (sparc64_fprs_type): Likewise.
2215
f21b4d5c
TT
22162017-09-27 Tom Tromey <tom@tromey.com>
2217
2218 * findcmd.c (find_command): Constify.
2219
643c2ffa
TT
22202017-09-27 Tom Tromey <tom@tromey.com>
2221
2222 * ada-tasks.c (task_command_1, task_command): Constify.
2223
510e5e56
TT
22242017-09-27 Tom Tromey <tom@tromey.com>
2225
2226 * symtab.c (maintenance_print_symbol_cache)
2227 (maintenance_flush_symbol_cache)
2228 (maintenance_print_symbol_cache_statistics): Constify.
2229
e503b191
TT
22302017-09-27 Tom Tromey <tom@tromey.com>
2231
2232 * inferior.c (detach_inferior_command, kill_inferior_command)
2233 (inferior_command): Constify.
2234
4e001312
TT
22352017-09-27 Tom Tromey <tom@tromey.com>
2236
2237 * regcache.c (regcache_print, maintenance_print_registers)
2238 (maintenance_print_raw_registers)
2239 (maintenance_print_cooked_registers)
2240 (maintenance_print_register_groups)
2241 (maintenance_print_remote_registers): Constify.
2242
77763700
TT
22432017-09-27 Tom Tromey <tom@tromey.com>
2244
2245 * printcmd.c (map_display_numbers, undisplay_command)
2246 (enable_disable_display_command, enable_display_command)
2247 (disable_display_command): Constify.
2248
4495129a
TT
22492017-09-27 Tom Tromey <tom@tromey.com>
2250
2251 * breakpoint.h (delete_command): Don't declare.
2252 * breakpoint.c (delete_command, enable_once_command)
2253 (enable_count_command, enable_delete_command, breakpoint_1)
2254 (maintenance_info_breakpoints, stopin_command, stopat_command)
2255 (delete_command, delete_trace_command, save_breakpoints)
2256 (save_breakpoints_command, save_tracepoints_command): Constify.
2257
3088cf40
TT
22582017-09-27 Tom Tromey <tom@tromey.com>
2259
2260 * macrocmd.c (macro_expand_command, macro_expand_once_command)
2261 (skip_ws, extract_identifier, macro_define_command)
2262 (macro_undef_command, macro_list_command): Constify.
2263
69f476a3
TT
22642017-09-27 Tom Tromey <tom@tromey.com>
2265
2266 * infcmd.c (environment_info, set_environment_command)
2267 (unset_environment_command, path_info, info_proc_cmd_1)
2268 (info_proc_cmd_mappings, info_proc_cmd_stat)
2269 (info_proc_cmd_status, info_proc_cmd_cwd, info_proc_cmd_cmdline)
2270 (info_proc_cmd_exe, info_proc_cmd_all): Constify.
2271
c4a3e68e
TT
22722017-09-27 Tom Tromey <tom@tromey.com>
2273
2274 * i386-tdep.c (i386_mpx_info_bounds, i386_mpx_set_bounds):
2275 Constify.
2276
c9d31bd6
TT
22772017-09-27 Tom Tromey <tom@tromey.com>
2278
2279 * symfile-mem.c (add_symbol_file_from_memory_command): Constify.
2280
1f3f85eb
TT
22812017-09-27 Tom Tromey <tom@tromey.com>
2282
2283 * demangle.c (demangle_command): Constify.
2284
9c504b5d
TT
22852017-09-27 Tom Tromey <tom@tromey.com>
2286
2287 * progspace.c (maintenance_info_program_spaces_command):
2288 Constify.
2289
6663cf91
TT
22902017-09-27 Tom Tromey <tom@tromey.com>
2291
2292 * compile/compile.c (check_raw_argument, compile_file_command)
2293 (compile_code_command, compile_print_command): Constify.
2294
34e5fa26
TT
22952017-09-27 Tom Tromey <tom@tromey.com>
2296
2297 * reggroups.c (maintenance_print_reggroups): Constify.
2298
8384c356
TT
22992017-09-27 Tom Tromey <tom@tromey.com>
2300
2301 * dwarf2read.c (save_gdb_index_command): Constify.
2302
884beb0c
TT
23032017-09-27 Tom Tromey <tom@tromey.com>
2304
2305 * stap-probe.c (info_probes_stap_command): Constify.
2306
e0b2930c
TT
23072017-09-27 Tom Tromey <tom@tromey.com>
2308
2309 * fork-child.c (unset_exec_wrapper_command): Constify.
2310
f938677d
TT
23112017-09-27 Tom Tromey <tom@tromey.com>
2312
2313 * btrace.c (get_uint, get_context_size, no_chunk)
2314 (maint_btrace_packet_history_cmd)
2315 (maint_btrace_clear_packet_history_cmd, maint_btrace_clear_cmd)
2316 (maint_info_btrace_cmd): Constify.
2317
8949cb87
TT
23182017-09-27 Tom Tromey <tom@tromey.com>
2319
2320 * reverse.c (delete_bookmark_command): Constify.
2321
ac88e2de
TT
23222017-09-27 Tom Tromey <tom@tromey.com>
2323
2324 * remote.c (set_memory_packet_size)
2325 (set_memory_write_packet_size, show_memory_write_packet_size)
2326 (set_memory_read_packet_size, show_memory_read_packet_size)
2327 (compare_sections_command, packet_command, remote_put_command)
2328 (remote_get_command, remote_delete_command): Constify.
2329
bd4c9dfe
TT
23302017-09-27 Tom Tromey <tom@tromey.com>
2331
2332 * mips-tdep.c (show_mipsfpu_command, set_mipsfpu_single_command)
2333 (set_mipsfpu_double_command, set_mipsfpu_none_command)
2334 (set_mipsfpu_auto_command): Constify.
2335
5e93d4c6
TT
23362017-09-27 Tom Tromey <tom@tromey.com>
2337
2338 * cli/cli-cmds.h (cd_command): Constify.
2339 * cli/cli-cmds.c (cd_command): Constify.
2340
fc41a75b
TT
23412017-09-27 Tom Tromey <tom@tromey.com>
2342
2343 * thread.c (thread_name_command, thread_find_command): Constify.
2344
67810076
TT
23452017-09-27 Tom Tromey <tom@tromey.com>
2346
2347 * probe.c (enable_probes_command, disable_probes_command):
2348 Constify.
2349
1d8b34a7
TT
23502017-09-27 Tom Tromey <tom@tromey.com>
2351
2352 * symfile.c (symbol_file_command): Constify.
2353 * gdbcore.h (deprecated_file_changed_hook): Constify.
2354 * exec.c (deprecated_file_changed_hook, exec_file_command)
2355 (file_command): Constify.
2356 * defs.h (symbol_file_command): Constify.
2357
442019e1
TT
23582017-09-27 Tom Tromey <tom@tromey.com>
2359
2360 * remote-fileio.c (set_system_call_allowed)
2361 (show_system_call_allowed): Constify.
2362
2983f7cb
TT
23632017-09-27 Tom Tromey <tom@tromey.com>
2364
2365 * tracepoint.c (delete_trace_variable_command)
2366 (tfind_end_command, tfind_start_command, tfind_pc_command)
2367 (tfind_tracepoint_command, tfind_line_command)
2368 (tfind_range_command, tfind_outside_command): Constify.
2369
4fd41b24
TT
23702017-09-27 Tom Tromey <tom@tromey.com>
2371
2372 * ax-gdb.c (maint_agent_printf_command, agent_command)
2373 (agent_eval_command): Constify.
2374
f2fc3015
TT
23752017-09-27 Tom Tromey <tom@tromey.com>
2376
2377 * tracepoint.c (info_scope_command): Constify.
2378 * python/python.c (gdbpy_decode_line): Constify.
2379 * python/py-breakpoint.c (bppy_init): Constify.
2380 * mi/mi-cmd-break.c (mi_cmd_break_insert_1): Constify.
2381 * location.h: (new_linespec_location)
2382 (string_to_event_location_basic, string_to_event_location):
2383 Constify.
2384 * location.c (new_linespec_location)
2385 (string_to_event_location_basic, string_to_event_location):
2386 Constify.
2387 * linespec.h (decode_line_with_current_source)
2388 (decode_line_with_last_displayed, linespec_lex_to_end): Constify.
2389 * linespec.c (linespec_lex_to_end)
2390 (decode_line_with_current_source)
2391 (decode_line_with_last_displayed): Constify.
2392 * guile/scm-breakpoint.c (gdbscm_register_breakpoint_x):
2393 Constify.
2394 * cli/cli-cmds.c (edit_command, list_command): Constify.
2395 * breakpoint.h (until_break_command, watch_command_wrapper)
2396 (awatch_command_wrapper, rwatch_command_wrapper)
2397 (init_ada_exception_breakpoint): Constify.
2398 * breakpoint.c (break_command_1, dprintf_command)
2399 (break_range_command, watch_command_wrapper)
2400 (rwatch_command_wrapper, awatch_command_wrapper)
2401 (until_break_command, init_ada_exception_breakpoint)
2402 (strace_marker_create_sals_from_location, trace_command)
2403 (ftrace_command, strace_command, struct tracepoint): Constify.
2404 * ax-gdb.c (agent_command_1): Constify.
2405 * ada-lang.c (ada_exception_sal): Constify.
2406
8c2f95f4
TT
24072017-09-27 Tom Tromey <tom@tromey.com>
2408
2409 * record.c (cmd_record_delete, cmd_record_stop, cmd_record_save)
2410 (cmd_record_goto_begin, cmd_record_goto_end, get_insn_number)
2411 (get_context_size, no_chunk, get_insn_history_modifiers)
2412 (cmd_record_insn_history, get_call_history_modifiers)
2413 (cmd_record_call_history): Constify.
2414
a0d65762
TT
24152017-09-27 Tom Tromey <tom@tromey.com>
2416
2417 * source.c (show_substitute_path_command)
2418 (unset_substitute_path_command, set_substitute_path_command):
2419 Constify.
2420
58971144
TT
24212017-09-27 Tom Tromey <tom@tromey.com>
2422
2423 * typeprint.c (maintenance_print_type): Constify.
2424 * maint.c (maintenance_dump_me, maintenance_demangle)
2425 (maintenance_time_display, maintenance_info_sections)
2426 (maintenance_print_statistics, maintenance_deprecate)
2427 (maintenance_undeprecate): Constify.
2428 (maintenance_do_deprecate): Constify. Use std::string.
2429 (maintenance_selftest): Constify.
2430 * gdbtypes.h (maintenance_print_type): Constify.
2431
c482f52c
TT
24322017-09-27 Tom Tromey <tom@tromey.com>
2433
2434 * hppa-tdep.c (unwind_command): Constify.
2435
e100df1a
TT
24362017-09-27 Tom Tromey <tom@tromey.com>
2437
2438 * target-descriptions.c (unset_tdesc_filename_cmd)
2439 (maint_print_c_tdesc_cmd, maintenance_check_xml_descriptions):
2440 Constify.
2441
31d56ade
TT
24422017-09-27 Tom Tromey <tom@tromey.com>
2443
2444 * dummy-frame.c (maintenance_print_dummy_frames): Constify.
2445
b961da0b
TT
24462017-09-27 Tom Tromey <tom@tromey.com>
2447
2448 * tui/tui.c (tui_enable_command, tui_disable_command): Constify.
2449
e2d8ae16
TT
24502017-09-27 Tom Tromey <tom@tromey.com>
2451
2452 * tui/tui-regs.c (tui_reg_command): Constify.
2453
863779b0
TT
24542017-09-27 Tom Tromey <tom@tromey.com>
2455
2456 * skip.c (skip_file_command, skip_function_command)
2457 (skip_enable_command, skip_disable_command, skip_delete_command):
2458 Constify.
2459
cdb34d4a
TT
24602017-09-27 Tom Tromey <tom@tromey.com>
2461
2462 * record-btrace.c (cmd_record_btrace_bts_start)
2463 (cmd_record_btrace_pt_start): Constify.
2464
e99c83e7
TT
24652017-09-27 Tom Tromey <tom@tromey.com>
2466
2467 * symmisc.c (maintenance_print_symbols)
2468 (maintenance_print_msymbols, maintenance_print_objfiles)
2469 (maintenance_info_symtabs, maintenance_check_symtabs)
2470 (maintenance_expand_symtabs, maintenance_info_line_tables):
2471 Constify.
2472
32faf971
TT
24732017-09-27 Tom Tromey <tom@tromey.com>
2474
2475 * top.c (new_ui_command): Constify.
2476
2cf311eb
TT
24772017-09-27 Tom Tromey <tom@tromey.com>
2478
2479 * symfile.c (add_symbol_file_command)
2480 (remove_symbol_file_command, list_overlays_command)
2481 (map_overlay_command, unmap_overlay_command)
2482 (overlay_auto_command, overlay_manual_command)
2483 (overlay_off_command, overlay_load_command): Constify.
2484
e6738699
TT
24852017-09-27 Tom Tromey <tom@tromey.com>
2486
2487 * spu-tdep.c (info_spu_event_command, info_spu_signal_command)
2488 (info_spu_mailbox_command, info_spu_dma_command)
2489 (info_spu_proxydma_command): Constify.
2490
aa360cd5
TT
24912017-09-27 Tom Tromey <tom@tromey.com>
2492
2493 * cli/cli-logging.c (set_logging_on, set_logging_off): Constify.
2494
898241a5
TT
24952017-09-27 Tom Tromey <tom@tromey.com>
2496
2497 * cli/cli-script.c (user_defined_command): Constify.
2498
2d0ac106
TT
24992017-09-27 Tom Tromey <tom@tromey.com>
2500
2501 * cli/cli-dump.c (dump_memory_command, dump_value_command)
2502 (dump_srec_memory, dump_srec_value, dump_ihex_memory)
2503 (dump_ihex_value, dump_verilog_memory, dump_verilog_value)
2504 (dump_tekhex_memory, dump_tekhex_value, dump_binary_memory)
2505 (dump_binary_value, append_binary_memory, append_binary_value):
2506 Constify.
2507 (struct dump_context) <func>: Constify.
2508 (add_dump_command): Update.
2509
dede02ce
TT
25102017-09-27 Tom Tromey <tom@tromey.com>
2511
2512 * cli/cli-cmds.c (show_version, show_configuration)
2513 (source_command, show_user): Constify.
2514
d3cb6b99
TT
25152017-09-27 Tom Tromey <tom@tromey.com>
2516
2517 * target.c (maintenance_print_target_stack): Constify.
2518
1970a12f
TT
25192017-09-27 Tom Tromey <tom@tromey.com>
2520
2521 * interps.c (interpreter_exec_cmd): Constify.
2522
41243651
TT
25232017-09-27 Tom Tromey <tom@tromey.com>
2524
2525 * record-full.c (cmd_record_full_restore): Constify.
2526
4465d9db
TT
25272017-09-27 Tom Tromey <tom@tromey.com>
2528
2529 * memattr.c (enable_mem_command, disable_mem_command)
2530 (delete_mem_command): Constify.
2531
ad25e423
TT
25322017-09-27 Tom Tromey <tom@tromey.com>
2533
2534 * value.c (show_convenience): Constify.
2535
d64097b1
TT
25362017-09-27 Tom Tromey <tom@tromey.com>
2537
2538 * gdbcore.h (core_file_command): Update.
2539 * corefile.c (core_file_command): Constify.
2540
4d4589ef
TT
25412017-09-27 Tom Tromey <tom@tromey.com>
2542
2543 * user-regs.c (maintenance_print_user_registers): Constify.
2544
32a7bf17
TT
25452017-09-27 Tom Tromey <tom@tromey.com>
2546
2547 * cp-namespace.c (maintenance_cplus_namespace): Constify.
2548
4a475551
TT
25492017-09-27 Tom Tromey <tom@tromey.com>
2550
2551 * cp-support.c (first_component_command): Constify.
2552
990b9f9f
TT
25532017-09-27 Tom Tromey <tom@tromey.com>
2554
2555 * psymtab.c (maintenance_print_psymbols)
2556 (maintenance_info_psymtabs, maintenance_check_psymtabs):
2557 Constify.
2558
c281872e
TT
25592017-09-27 Tom Tromey <tom@tromey.com>
2560
2561 * windows-tdep.c (display_tib): Constify.
2562
5b64bf74
TT
25632017-09-27 Tom Tromey <tom@tromey.com>
2564
2565 * linux-fork.c (delete_checkpoint_command)
2566 (detach_checkpoint_command): Constify.
2567
4ada038f
TT
25682017-09-27 Tom Tromey <tom@tromey.com>
2569
2570 * cp-abi.c (set_cp_abi_cmd, show_cp_abi_cmd): Constify.
2571
57f5a81b
TT
25722017-09-27 Tom Tromey <tom@tromey.com>
2573
2574 * arc-tdep.c (dump_arc_instruction_command): Constify.
2575
b0a8e6c4
TT
25762017-09-27 Tom Tromey <tom@tromey.com>
2577
2578 * valprint.c (set_radix, show_radix): Constify.
2579
8d97dc1c
TT
25802017-09-27 Tom Tromey <tom@tromey.com>
2581
2582 * dtrace-probe.c (info_probes_dtrace_command): Constify.
2583
eb7c454d
TT
25842017-09-27 Tom Tromey <tom@tromey.com>
2585
2586 * command.h (not_just_help_class_command): Update.
2587 * cli/cli-decode.h (not_just_help_class_command): Update.
2588 * cli/cli-decode.c (not_just_help_class_command): Constify.
2589
e4e33335
TT
25902017-09-27 Tom Tromey <tom@tromey.com>
2591
2592 * gdb_bfd.c (maintenance_info_bfds): Constify.
2593
0450cc4c
TT
25942017-09-27 Tom Tromey <tom@tromey.com>
2595
2596 * cli/cli-decode.c (add_cmd, set_cmd_cfunc): New function
2597 overloads.
2598 (do_add_cmd): Rename from add_cmd. Don't call set_cmd_cfunc.
2599 (do_const_cfunc): New function.
2600 (cmd_cfunc_eq): New overload.
2601 (cli_user_command_p): Check do_const_cfunc.
2602 * cli/cli-decode.h (struct cmd_list_element) <function>: New field
2603 const_cfunc.
2604 * command.h (add_cmd): Add const overload and no-function
2605 overload.
2606 (set_cmd_cfunc): Add const overload.
2607 (cmd_const_cfunc_ftype): Declare.
2608 (cmd_cfunc_eq): Add const overload.
2609 * breakpoint.c, cli-cmds.c, cli-dump.c, guile/scm-cmd.c,
2610 python/py-cmd.c, target.c, tracepoint.c: Use no-function add_cmd
2611 overload.
2612
a9bbfbd8
TT
26132017-09-27 Tom Tromey <tom@tromey.com>
2614
2615 * macroexp.c (get_next_token_for_substitution): New function.
2616 (substitute_args): Call it. Check for __VA_OPT__.
2617
5230b05a
WT
26182017-09-26 Walfred Tedeschi <walfred.tedeschi@intel.com>
2619 Pedro Alves <palves@redhat.com>
2620
2621 * dwarf2read.c (dwarf2_cu): Remove field producer_is_icc and add
2622 producer_is_icc_lt_14.
2623 (producer_is_icc_lt_14): New function.
2624 (check_producer): Add code for checking version of ICC.
2625 (producer_is_icc): Move to producer.c.
2626 (read_structure_type): Restrict ICC workaround to ICC<14.
2627 * producer.c: Include selftest.h.
2628 (producer_is_icc, producer_parsing_tests, _initialize_producer):
2629 New functions.
2630 * producer.h (producer_is_icc): New declaration.
2631
b32b108a
WT
26322017-09-26 Walfred Tedeschi <walfred.tedeschi@intel.com>
2633
2634 * Makefile.in (SFILES): Add producer.c.
2635 (COMMON_OBS): Add producer.o
2636 * amd64-tdep.c (producer.h): Add new include.
2637 * dwarf2read.c (producer.h): Add new include.
2638 * producer.c: New file.
2639 * producer.h: New file.
2640 * utils.c (producer_is_gcc, producer_is_gcc_ge_4): Move to
2641 producer.c.
2642 * utils.h (producer_is_gcc, producer_is_gcc_ge_4): Move to
2643 producer.h.
2644
5007d765
MK
26452017-09-26 Matthias Klose <doko@ubuntu.com>
2646
2647 * configure.ac: Search ncursesw before ncurses.
2648 Check ncursesw/ncurses.h before ncurses/ncurses.h.
2649 * gdb_curses.h: Include <ncursesw/ncurses.h>
2650 * config.in, configure: Regenerate.
2651
281c4447
RO
26522017-09-26 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
2653
2654 PR gdb/22185
2655 * configure.host <*-*-solaris2.[01], *-*-solaris2.[2-9]*>: Mark as
2656 obsolete.
2657 Use gdb_host sol2 for i[34567]86-*-solaris2*, x86_64-*-solaris2*.
2658 Remove i386sol2 support.
2659 * configure.nat <i386sol2>: Remove.
2660 <sol2-64>: Fold into ...
2661 <sol2>: ... this.
2662 Move common settings to default section.
2663 Add sol-thread.o.
2664 * configure.tgt <i[34567]86-*-solaris2.1[0-9]*,
2665 x86_64-*-solaris2.1[0-9]*>: Rename to ...
2666 <i[34567]86-*-solaris2*, x86_64-*-solaris2*>: ... this.
2667 <i[34567]86-*-solaris*>: Remove.
2668 <sparc-*-solaris2.[0-6], sparc-*-solaris2.[0-6].*>: Remove.
2669
2670 * configure.ac: Remove wctype in libw check.
2671 (_MSE_INT_H): Don't define on Solaris 7-9.
2672 <solaris*>: Remove libthread_db.so.1 check.
2673 * configure: Regenerate.
2674 * config.in: Regenerate.
2675
2676 * proc-service.c: Remove PROC_SERVICE_IS_OLD handling.
2677 (gdb_ps_prochandle_t, gdb_ps_read_buf_t, gdb_ps_write_buf_t)
2678 (gdb_ps_size_t): Remove.
2679 Use base types in users.
2680 * sol-thread.c: Likewise, also for gdb_ps_addr_t.
2681
2682 * NEWS (Changes since GDB 8.0): Document Solaris 2.0-9 removal.
2683
39b06c20
RO
26842017-09-26 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
2685
2686 PR build/22206
2687 * sparc64-tdep.c (adi_tag_fd): Print pid as long.
2688 (adi_is_addr_mapped): Likewise.
2689 (PSR_ICC): Don't redefine.
2690 (PSR_IMPL): Likewise.
2691
6c3e20f1
TT
26922017-09-25 Tom Tromey <tom@tromey.com>
2693
2694 * regcache.c (regcache::dump): Use string_printf.
2695
b292235f
TT
26962017-09-25 Tom Tromey <tom@tromey.com>
2697
2698 * regcache.c (class regcache_invalidator): New.
2699 (struct register_to_invalidate): Remove.
2700 (make_cleanup_regcache_invalidate): Remove.
2701 (regcache::raw_write): Use regcache_invalidator.
2702
9ac86b52
TT
27032017-09-25 Tom Tromey <tom@tromey.com>
2704
2705 * spu-tdep.c (spu2ppu_sniffer): Update.
2706 * regcache.h (make_cleanup_regcache_xfree): Don't declare.
2707 * regcache.c (do_regcache_xfree, make_cleanup_regcache_xfree):
2708 Remove.
2709 * ppc-linux-tdep.c (ppu2spu_sniffer): Update.
2710 * mi/mi-main.c (mi_cmd_data_list_changed_registers): Update.
2711 * frame.h (frame_save_as_regcache): Return std::unique_ptr.
2712 * frame.c (frame_save_as_regcache): Return std::unique_ptr.
2713 (frame_pop): Update.
2714
c0e383c6
TT
27152017-09-25 Tom Tromey <tom@tromey.com>
2716
2717 * spu-tdep.c (spu2ppu_dealloc_cache): Use delete.
2718 * regcache.h (regcache_xfree): Don't declare.
2719 * regcache.c (regcache_xfree): Remove.
2720 (do_regcache_xfree): Use delete.
2721 * ppc-linux-tdep.c (ppu2spu_dealloc_cache): Use delete.
2722 * linux-fork.c (free_fork): Use delete.
2723 (fork_save_infrun_state): Likewise.
2724 * jit.c (jit_dealloc_cache): Use delete.
2725 * infrun.c (discard_infcall_suspend_state): Use delete.
2726
791199cc
TT
27272017-09-25 Tom Tromey <tom@tromey.com>
2728
2729 * regcache.h (regcache_xmalloc): Don't declare.
2730 (regcache_raw_set_cached_value): Update comment.
2731 * regcache.c (regcache_xmalloc): Remove.
2732 * ppc-linux-tdep.c (ppu2spu_sniffer): Use new.
2733 * jit.c (jit_frame_sniffer): Use new.
2734 * frame.c (frame_save_as_regcache): Use new.
2735
289e23aa
AA
27362017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
2737
2738 * NEWS: Advertise support for guarded-storage registers on IBM z.
2739
1b63490c
AA
27402017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
2741
2742 * s390-linux-nat.c (have_regset_gs): New static variable.
2743 (s390_linux_fetch_inferior_registers): Handle guarded-storage
2744 control block and guarded-storage broadcast control regsets.
2745 (s390_read_description): Detect whether the target has
2746 guarded-storage support, return appropriate tdesc.
2747 * s390-linux-tdep.c (features/s390-gs-linux64.c): New include.
2748 (features/s390x-gs-linux64.c): Likewise.
2749 (struct gdbarch_tdep) <have_gs>: New field.
2750 (s390_regmap_gs, s390_regmap_gsbc, s390_gs_regset)
2751 (s390_gsbc_regset): New variables.
2752 (s390_iterate_over_regset_sections): Iterate over s390_gs_regset
2753 and s390_gsbc_regset, if applicable.
2754 (s390_core_read_description): Check whether core file was from a
2755 target with guarded-storage support; include appropriate regsets.
2756 (s390_gdbarch_init): Add registers for guarded-storage support.
2757 (_initialize_s390_tdep): Initialize new target descriptions that
2758 include registers for guarded-storage support.
2759 * s390-linux-tdep.h (HWCAP_S390_GS, S390_GSD_REGNUM)
2760 (S390_GSSM_REGNUM, S390_GSEPLA_REGNUM)
2761 (S390_BC_GSD_REGNUM, S390_BC_GSSM_REGNUM): New defines.
2762 (S390_NUM_REGS): Adjust macro definition.
2763 (s390_gs_regset, s390_gsbc_regset, tdesc_s390_gs_linux64)
2764 (tdesc_s390x_gs_linux64): New declarations.
2765
96235dc1
AA
27662017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
2767
2768 * features/s390-gs-linux64.xml: New file.
2769 * features/s390-gs.xml: New file.
2770 * features/s390-gsbc.xml: New file.
2771 * features/s390x-gs-linux64.xml: New file.
2772 * features/Makefile (WHICH): Add s390-gs-linux64 and
2773 s390x-gs-linux64.
2774 (s390-gs-linux64-expedite, s390x-gs-linux64-expedite): New macros.
2775 (XMLTOC): Add s390-gs-linux64.xml and s390x-linux64.xml.
2776 * features/s390-gs-linux64.c: New generated file.
2777 * features/s390x-gs-linux64.c: New file.
2778 * regformats/s390-gs-linux64.dat: New file.
2779 * regformats/s390x-gs-linux64.dat: New file.
2780
b4a7c699
TT
27812017-09-23 Tom Tromey <tom@tromey.com>
2782
2783 * defs.h (make_cleanup_override_quit_handler): Don't declare.
2784
c2f97536
TT
27852017-09-22 Tom Tromey <tom@tromey.com>
2786
2787 * utils.c (class scoped_input_handler) <m_quit_handler>: Change
2788 type to scoped_restore_tmpl.
2789 <scoped_input_handler>: Initialize m_quit_handler directly.
2790
43573013
SDJ
27912017-09-22 Sergio Durigan Junior <sergiodj@redhat.com>
2792
2793 * cli/cli-cmds.c (pwd_command): Use "getcwd (NULL, 0)".
2794 (cd_command): Likewise. Free "current_directory" before
2795 assigning to it.
2796 * main.c (captured_main_1): Use "getcwd (NULL, 0)".
2797 * mi/mi-cmd-env.c (mi_cmd_env_pwd): Likewise.
2798 * top.c (gdb_dirbuf): Remove global declaration.
2799 * top.h (gdb_dirbuf): Likewise.
2800
6ec2e0f5
SDJ
28012017-09-22 Sergio Durigan Junior <sergiodj@redhat.com>
2802
2803 * gnulib/aclocal.m4: Regenerate.
2804 * gnulib/config.in: Regenerate.
2805 * gnulib/configure: Regenerate.
2806 * gnulib/import/Makefile.am: Regenerate.
2807 * gnulib/import/Makefile.in: Regenerate.
2808 * gnulib/import/assure.h: New file.
2809 * gnulib/import/at-func.c: Likewise
2810 * gnulib/import/chdir-long.c: New file.
2811 * gnulib/import/chdir-long.h: New file.
2812 * gnulib/import/cloexec.c: New file.
2813 * gnulib/import/cloexec.h: New file.
2814 * gnulib/import/close.c: New file.
2815 * gnulib/import/closedir.c: New file.
2816 * gnulib/import/dirent-private.h: New file.
2817 * gnulib/import/dup-safer.c: New file.
2818 * gnulib/import/dup.c: New file.
2819 * gnulib/import/dup2.c: New file.
2820 * gnulib/import/error.c: New file.
2821 * gnulib/import/error.h: New file.
2822 * gnulib/import/exitfail.c: New file.
2823 * gnulib/import/exitfail.h: New file.
2824 * gnulib/import/fchdir.c: New file.
2825 * gnulib/import/fcntl.c: New file.
2826 * gnulib/import/fcntl.in.h: New file.
2827 * gnulib/import/fd-hook.c: New file.
2828 * gnulib/import/fd-hook.h: New file.
2829 * gnulib/import/fd-safer.c: New file.
2830 * gnulib/import/fdopendir.c: New file.
2831 * gnulib/import/filename.h: New file.
2832 * gnulib/import/filenamecat-lgpl.c: New file.
2833 * gnulib/import/filenamecat.h: New file.
2834 * gnulib/import/fstat.c: New file.
2835 * gnulib/import/fstatat.c: New file.
2836 * gnulib/import/getcwd-lgpl.c: New file.
2837 * gnulib/import/getcwd.c: New file.
2838 * gnulib/import/getdtablesize.c: New file.
2839 * gnulib/import/getlogin_r.c: New file.
2840 * gnulib/import/getprogname.c: New file.
2841 * gnulib/import/getprogname.h: New file.
2842 * gnulib/import/gettext.h: New file.
2843 * gnulib/import/glob-libc.h: New file.
2844 * gnulib/import/glob.c: New file.
2845 * gnulib/import/glob.in.h: New file.
2846 * gnulib/import/intprops.h: New file.
2847 * gnulib/import/m4/chdir-long.m4: New file.
2848 * gnulib/import/m4/close.m4: New file.
2849 * gnulib/import/m4/closedir.m4: New file.
2850 * gnulib/import/m4/d-ino.m4: New file.
2851 * gnulib/import/m4/d-type.m4: New file.
2852 * gnulib/import/m4/dup.m4: New file.
2853 * gnulib/import/m4/dup2.m4: New file.
2854 * gnulib/import/m4/error.m4: New file.
2855 * gnulib/import/m4/fchdir.m4: New file.
2856 * gnulib/import/m4/fcntl.m4: New file.
2857 * gnulib/import/m4/fcntl_h.m4: New file.
2858 * gnulib/import/m4/fdopendir.m4: New file.
2859 * gnulib/import/m4/filenamecat.m4: New file.
2860 * gnulib/import/m4/fstat.m4: New file.
2861 * gnulib/import/m4/fstatat.m4: New file.
2862 * gnulib/import/m4/getcwd-abort-bug.m4: New file.
2863 * gnulib/import/m4/getcwd-path-max.m4: New file.
2864 * gnulib/import/m4/getcwd.m4: New file.
2865 * gnulib/import/m4/getdtablesize.m4: New file.
2866 * gnulib/import/m4/getlogin_r.m4: New file.
2867 * gnulib/import/m4/getprogname.m4: New file.
2868 * gnulib/import/m4/glob.m4: New file.
2869 * gnulib/import/m4/gnulib-cache.m4: Regenerate.
2870 * gnulib/import/m4/gnulib-comp.m4: Regenerate.
2871 * gnulib/import/m4/mempcpy.m4: New file.
2872 * gnulib/import/m4/memrchr.m4: New file.
2873 * gnulib/import/m4/mode_t.m4: New file.
2874 * gnulib/import/m4/msvc-inval.m4: New file.
2875 * gnulib/import/m4/msvc-nothrow.m4: New file.
2876 * gnulib/import/m4/open.m4: New file.
2877 * gnulib/import/m4/openat.m4: New file.
2878 * gnulib/import/m4/opendir.m4: New file.
2879 * gnulib/import/m4/readdir.m4: New file.
2880 * gnulib/import/m4/realloc.m4: New file.
2881 * gnulib/import/m4/rewinddir.m4: New file.
2882 * gnulib/import/m4/save-cwd.m4: New file.
2883 * gnulib/import/m4/strdup.m4: New file.
2884 * gnulib/import/m4/strerror.m4: New file.
2885 * gnulib/import/m4/unistd-safer.m4: New file.
2886 * gnulib/import/mempcpy.c: New file.
2887 * gnulib/import/memrchr.c: New file.
2888 * gnulib/import/msvc-inval.c: New file.
2889 * gnulib/import/msvc-inval.h: New file.
2890 * gnulib/import/msvc-nothrow.c: New file.
2891 * gnulib/import/msvc-nothrow.h: New file.
2892 * gnulib/import/open.c: New file.
2893 * gnulib/import/openat-die.c: New file.
2894 * gnulib/import/openat-priv.h: New file.
2895 * gnulib/import/openat-proc.c: New file.
2896 * gnulib/import/openat.c: New file.
2897 * gnulib/import/openat.h: New file.
2898 * gnulib/import/opendir.c: New file.
2899 * gnulib/import/pipe-safer.c: New file.
2900 * gnulib/import/readdir.c: New file.
2901 * gnulib/import/realloc.c: New file.
2902 * gnulib/import/rewinddir.c: New file.
2903 * gnulib/import/save-cwd.c: New file.
2904 * gnulib/import/save-cwd.h: New file.
2905 * gnulib/import/strdup.c: New file.
2906 * gnulib/import/strerror-override.c: New file.
2907 * gnulib/import/strerror-override.h: New file.
2908 * gnulib/import/strerror.c: New file.
2909 * gnulib/import/unistd--.h: New file.
2910 * gnulib/import/unistd-safer.h: New file.
2911 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add
2912 "getcwd" and "glob".
2913 * ser-tcp.c: Undefine "close" before redefining it.
2914
432ae719
SM
29152017-09-21 Simon Marchi <simon.marchi@ericsson.com>
2916
2917 * guile/scm-value.c (gdbscm_value_address): Initialize address,
2918 get rid of res_val.
2919
4fa7574e
RO
29202017-09-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
2921
2922 * configure.nat <i386sol2,i386>: Add fork-inferior.o to NATDEPFILES.
2923 <sol2,sparc>: Likewise.
2924 <sol2-64,i386>: Likewise.
2925
2926 * warning.m4 (AM_GDB_WARNINGS): Disable -Wunknown-pragmas,
2927 -Wdeprecated-declarations on *-*-solaris*.
2928 * configure: Regenerate.
2929
2930 * procfs.c: Include "nat/inferior.h".
2931 (procfs_info_proc): Fix typo.
2932
f6327dcb
KB
29332017-09-21 Kevin Buettner <kevinb@redhat.com>
2934
2935 * remote.c (vector): Include.
2936 (struct private_thread_info): Add field, thread_handle.
2937 (free_private_thread_info): Deallocate storage associated with
2938 thread handle.
2939 (get_private_info_thread): Initialize `thread_handle' field.
2940 (struct thread_item): Add field, thread_handle.
2941 (clear_threads_listing_context): Deallocate storage associated
2942 with thread handle.
2943 (start_thread): Add support for "handle" attribute.
2944 (thread_attributes): Add "handle".
2945 (remote_get_threads_with_qthreadinfo): Initialize thread_handle
2946 field.
2947 (remote_update_thread_list): Update thread_handle.
2948 (remote_thread_handle_to_thread_info): New function.
2949 (init_remote_ops): Initialize to_thread_handle_to_thread_info.
2950
fbbe5337
KB
29512017-09-21 Kevin Buettner <kevinb@redhat.com>
2952
2953 * python/py-inferior.c (gdbpy_thread_from_thread_handle): New
2954 function.
2955 (inferior_object_methods): Add gdbpy_thread_from_thread_handle.
2956 * python/python-internal.h (thread_object_type): Declare.
2957
e04ee09e
KB
29582017-09-21 Kevin Buettner <kevinb@redhat.com>
2959
2960 * target.h (struct target_ops): Add to_thread_handle_to_thread_info.
2961 (target_thread_handle_to_thread_info): Declare.
2962 * target.c (target_thread_handle_to_thread_info): New function.
2963 * target-delegates.c: Regenerate.
2964 * gdbthread.h (find_thread_by_handle): Declare.
2965 * thread.c (find_thread_by_handle): New function.
2966 * linux-thread-db.c (thread_db_thread_handle_to_thread_info): New
2967 function.
2968 (init_thread_db_ops): Register thread_db_thread_handle_to_thread_info.
2969
1e5b66ed
SM
29702017-09-21 Simon Marchi <simon.marchi@ericsson.com>
2971
2972 * nat/linux-waitpid.c (linux_debug): Add ATTRIBUTE_PRINTF.
2973
ebe48ba0
SM
29742017-09-21 Simon Marchi <simon.marchi@ericsson.com>
2975
2976 * microblaze-tdep.c (microblaze_debug): Add ATTRIBUTE_PRINTF.
2977
0a0bf5dc
YQ
29782017-09-21 Yao Qi <yao.qi@linaro.org>
2979
2980 * configure.tgt (aarch64*-*-freebsd*): Add fbsd-tdep.o solib-svr4.o
2981 to gdb_target_obs.
2982
d1b0a7bf
TT
29832017-09-20 Tom Tromey <tom@tromey.com>
2984
2985 * breakpoint.c (struct counted_command_line): Remove.
2986 (breakpoint_commands): Update.
2987 (alloc_counted_command_line, incref_counted_command_line)
2988 (decref_counted_command_line, do_cleanup_counted_command_line)
2989 (make_cleanup_decref_counted_command_line): Remove.
2990 (breakpoint_set_commands, commands_command_1, ~bpstats, bpstats)
2991 (bpstat_clear_actions, bpstat_do_actions_1, watchpoint_check)
2992 (bpstat_stop_status, print_one_breakpoint_location, ~breakpoint)
2993 (save_breakpoints): Update.
2994 * breakpoint.h (counted_command_line): Now a typedef to
2995 shared_ptr.
2996 (struct breakpoint) <commands>: Now a counted_command_line.
2997 (struct bpstats) <command>: Likewise.
2998
48649e1b
TT
29992017-09-20 Tom Tromey <tom@tromey.com>
3000
3001 * breakpoint.c (struct commands_info, do_map_commands_command):
3002 Remove.
3003 (commands_command_1): Update.
3004 (iterate_over_related_breakpoints): Take a function_view.
3005 (do_delete_breakpoint, do_map_delete_breakpoint): Remove.
3006 (delete_command): Update.
3007 (map_breakpoint_numbers): Take a function_view.
3008 (do_disable_breakpoint, do_map_delete_breakpoint): Remove.
3009 (disable_command): Update.
3010 (do_enable_breakpoint, do_map_enable_breakpoint): Remove.
3011 (enable_command): Update.
3012 (struct disp_data, do_enable_breakpoint_disp)
3013 (do_map_enable_once_breakpoint, do_map_enable_count_breakpoint)
3014 (do_map_enable_delete_breakpoint): Remove.
3015 (enable_once_command, enable_count_command, enable_delete_command)
3016 (delete_trace_variable_command): Update.
3017
04afa70c
TT
30182017-09-20 Tom Tromey <tom@tromey.com>
3019
3020 * breakpoint.c (~bpstats): Rename from bpstat_free. Update.
3021 (bpstat_clear): Use delete.
3022 (bpstats): New constructors.
3023 (bpstat_copy, bpstat_stop_status): Use new.
3024 (dprintf_after_condition_true): Update.
3025 * breakpoint.h (bpstats::bpstats): Add constructors.
3026 (bpstats::~bpstats): Add destructor.
3027
c83833f4
PA
30282017-09-20 Pedro Alves <palves@redhat.com>
3029
3030 * eval.c (make_params): Delete, refactored as ...
3031 (class fake_method): ... this new type's ctor.
3032 (fake_method::~fake_method): New.
3033 (evaluate_subexp_standard): Use 'fake_method'.
3034
223ffa71
TT
30352017-09-20 Tom Tromey <tom@tromey.com>
3036
3037 * windows-nat.c (get_windows_debug_event, windows_wait)
3038 (do_initial_windows_stuff, windows_attach): Update.
3039 * utils.c (vwarning, internal_vproblem): Update.
3040 (ui_unregister_input_event_handler_cleanup)
3041 (prepare_to_handle_input): Remove.
3042 (class scoped_input_handler): New.
3043 (defaulted_query, prompt_for_continue): Update.
3044 * tui/tui-hooks.c (tui_refresh_frame_and_register_information):
3045 Update.
3046 * top.c (undo_terminal_modifications_before_exit): Update.
3047 * target/target.h (target_terminal_init, target_terminal_inferior)
3048 (target_terminal_ours): Don't declare.
3049 (class target_terminal): New.
3050 * target.h (target_terminal_is_inferior, target_terminal_is_ours)
3051 (target_terminal_ours_for_output)
3052 (make_cleanup_restore_target_terminal): Don't declare.
3053 (target_terminal_info): Remove.
3054 * target.c (enum terminal_state, terminal_state): Remove.
3055 (target_terminal::terminal_state): Define.
3056 (target_terminal::init): Rename from target_terminal_init.
3057 (target_terminal::inferior): Rename from
3058 target_terminal_inferior.
3059 (target_terminal::ours): Rename from target_terminal_ours.
3060 (target_terminal::ours_for_output): Rename from
3061 target_terminal_ours_for_output.
3062 (target_terminal::info): New method.
3063 (cleanup_restore_target_terminal)
3064 (make_cleanup_restore_target_terminal): Remove.
3065 * solib.c (handle_solib_event): Update.
3066 * remote.c (remote_serial_quit_handler): Update.
3067 (remote_terminal_inferior, remote_wait_as): Update.
3068 * record-full.c (record_full_wait_1): Update.
3069 * nto-procfs.c (procfs_create_inferior): Update.
3070 * nat/fork-inferior.c (startup_inferior): Update.
3071 * mi/mi-interp.c (mi_new_thread, mi_thread_exit)
3072 (mi_record_changed, mi_inferior_added, mi_inferior_appeared)
3073 (mi_inferior_exit, mi_inferior_removed, mi_traceframe_changed)
3074 (mi_tsv_created, mi_tsv_deleted, mi_tsv_modified)
3075 (mi_breakpoint_created, mi_breakpoint_deleted)
3076 (mi_breakpoint_modified, mi_on_resume, mi_solib_loaded)
3077 (mi_solib_unloaded, mi_command_param_changed, mi_memory_changed)
3078 (mi_user_selected_context_changed, report_initial_inferior):
3079 Update.
3080 * linux-nat.c (linux_nat_attach, linux_nat_terminal_ours)
3081 (linux_nat_terminal_inferior): Update.
3082 * infrun.c (follow_fork_inferior)
3083 (handle_vfork_child_exec_or_exit, do_target_resume)
3084 (check_curr_ui_sync_execution_done, handle_inferior_event_1)
3085 (handle_signal_stop, maybe_remove_breakpoints, normal_stop):
3086 Update.
3087 * inflow.c (child_terminal_init, info_terminal_command): Update.
3088 * infcmd.c (post_create_inferior, continue_1, prepare_one_step)
3089 (attach_command): Update.
3090 * infcall.c (call_thread_fsm_should_stop): Update.
3091 * gnu-nat.c (gnu_attach): Update.
3092 * extension.c (struct active_ext_lang_state)
3093 (restore_active_ext_lang): Update.
3094 * exceptions.c (print_flush): Update.
3095 * event-top.c (async_enable_stdin, default_quit_handler): Update.
3096 (struct quit_handler_cleanup_data, restore_quit_handler)
3097 (restore_quit_handler_dtor, make_cleanup_override_quit_handler):
3098 Remove.
3099 * cp-support.c (gdb_demangle): Update.
3100 * breakpoint.c (update_inserted_breakpoint_locations)
3101 (insert_breakpoint_locations, handle_jit_event)
3102 (disable_breakpoints_in_unloaded_shlib): Update.
3103 * annotate.c (annotate_breakpoints_invalid)
3104 (annotate_frames_invalid): Update.
3105
013af3fc
TT
31062017-09-20 Tom Tromey <tom@tromey.com>
3107
3108 * main.c (catch_command_errors): Rename from
3109 catch_command_errors_const.
3110 (captured_main_1): Update.
3111
06871ae8
PA
31122017-09-20 Pedro Alves <palves@redhat.com>
3113
3114 * cli/cli-cmds.c (list_command): Use print_sal_location.
3115 (print_sal_location): New function.
3116 (ambiguous_line_spec): Use print_sal_location.
3117 * linespec.c (symbol_to_sal): Record the symbol in the sal.
3118 * symtab.c (find_function_start_sal): Likewise.
3119 * symtab.h (symtab_and_line::symbol): New field.
3120
e5f25bc5
PA
31212017-09-20 Pedro Alves <palves@redhat.com>
3122
3123 * linespec.c (minsym_found): Handle non-text minsyms.
3124 (symbol_to_sal): Record a sal.pc for non-block, non-label symbols.
3125
1b7fa39e
WT
31262017-09-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
3127
3128 * features/Makefile (i386-avx-mpx-avx512-pku.dat): Add missing
3129 backslash.
3130
37dd0825
WT
31312017-09-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
3132
3133 * gdb.arch/i386-avx512.c (move_zmm_data_to_reg): Use
3134 vmovups instead vmovaps.
3135 (move_zmm_data_to_memory): Use vmovups instead vmovaps.
3136
4e5a4f58
JB
31372017-09-19 John Baldwin <jhb@FreeBSD.org>
3138
3139 * NEWS (Changes since GDB 8.0): Add starti.
3140 * infcmd.c (enum run_break): New.
3141 (run_command_1): Queue pending event for RUN_STOP_AT_FIRST_INSN
3142 case.
3143 (run_command): Use enum run_how.
3144 (start_command): Likewise.
3145 (starti_command): New function.
3146 (RUN_ARGS_HELP): New macro.
3147 (_initialize_infcmd): Use RUN_ARGS_HELP for run and start
3148 commands. Add starti command.
3149
aa70c9f1
YQ
31502017-09-19 Yao Qi <yao.qi@linaro.org>
3151
3152 * Makefile.in (monitor.o): Remove the rule.
3153
d6541620
YQ
31542017-09-19 Yao Qi <yao.qi@linaro.org>
3155
3156 * annotate.h (struct annotate_arg_emitter): Use
3157 DISABLE_COPY_AND_ASSIGN.
3158 * common/refcounted-object.h (refcounted_object): Likewise.
3159 * completer.h (struct completion_result): Likewise.
3160 * dwarf2read.c (struct dwarf2_per_objfile): Likewise.
3161 * filename-seen-cache.h (filename_seen_cache): Likewise.
3162 * gdbcore.h (thread_section_name): Likewise.
3163 * gdb_regex.h (compiled_regex): Likewise.
3164 * gdbthread.h (scoped_restore_current_thread): Likewise.
3165 * inferior.h (scoped_restore_current_inferior): Likewise.
3166 * jit.c (jit_reader): Likewise.
3167 * linespec.h (struct linespec_result): Likewise.
3168 * mi/mi-parse.h (struct mi_parse): Likewise.
3169 * nat/fork-inferior.c (execv_argv): Likewise.
3170 * progspace.h (scoped_restore_current_program_space): Likewise.
3171 * python/python-internal.h (class gdbpy_enter): Likewise.
3172 * regcache.h (regcache): Likewise.
3173 * target-descriptions.c (struct tdesc_reg): Likewise.
3174 (struct tdesc_type): Likewise.
3175 (struct tdesc_feature): Likewise.
3176 * ui-out.h (ui_out_emit_type): Likewise.
3177
0615127c
SM
31782017-09-18 Simon Marchi <simon.marchi@ericsson.com>
3179
3180 * dwarf2expr.c (dwarf_expr_context::execute_stack_op): Remove
3181 label abort_expression.
3182
5e187554
SM
31832017-09-16 Simon Marchi <simon.marchi@ericsson.com>
3184
3185 * common/buffer.c (buffer_xml_printf): Adjust.
3186 * common/xml-utils.c (xml_escape_text): Change return type to
3187 std::string, update code accordingly.
3188 * common/xml-utils.h (xml_escape_text): Change return type to
3189 std::string.
3190 * rs6000-aix-tdep.c (rs6000_aix_shared_library_to_xml): Adjust.
3191 * windows-tdep.c (windows_xfer_shared_library): Adjust.
3192 * unittests/xml-utils-selftests.c (test_xml_escape_text):
3193 Adjust.
3194
c3d7b541
SM
31952017-09-16 Simon Marchi <simon.marchi@ericsson.com>
3196
3197 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add new source file.
3198 (SUBDIR_UNITTESTS_OBS): Add new object file.
3199 * unittests/xml-utils-selftests.c: New file.
3200
1526853e
SM
32012017-09-16 Simon Marchi <simon.marchi@ericsson.com>
3202
3203 * common/selftest.h (selftest): New struct/interface.
3204 (register_test): Add name parameter, add new overload.
3205 (run_tests): Add filter parameter.
3206 (for_each_selftest_ftype): New typedef.
3207 (for_each_selftest): New declaration.
3208 * common/selftest.c (tests): Change type to
3209 map<string, unique_ptr<selftest>>.
3210 (simple_selftest): New struct.
3211 (register_test): New function.
3212 (register_test): Add name parameter and use it.
3213 (run_tests): Add filter parameter and use it. Add prints.
3214 Adjust to vector -> map change.
3215 * aarch64-tdep.c (_initialize_aarch64_tdep): Add names when
3216 registering selftests.
3217 * arm-tdep.c (_initialize_arm_tdep): Likewise.
3218 * disasm-selftests.c (_initialize_disasm_selftests): Likewise.
3219 * dwarf2-frame.c (_initialize_dwarf2_frame): Likewise.
3220 * dwarf2loc.c (_initialize_dwarf2loc): Likewise.
3221 * findvar.c (_initialize_findvar): Likewise.
3222 * gdbarch-selftests.c (_initialize_gdbarch_selftests): Likewise.
3223 * maint.c (maintenance_selftest): Update call to run_tests.
3224 (maintenance_info_selftests): New function.
3225 (_initialize_maint_cmds): Register "maintenance info selftests"
3226 command. Update "maintenance selftest" doc.
3227 * regcache.c (_initialize_regcache): Add names when registering
3228 selftests.
3229 * rust-exp.y (_initialize_rust_exp): Likewise.
3230 * selftest-arch.c (gdbarch_selftest): New struct.
3231 (gdbarch_tests): Remove.
3232 (register_test_foreach_arch): Add name parameter. Call
3233 register_test.
3234 (tests_with_arch): Remove, move most content to
3235 gdbarch_selftest::operator().
3236 (_initialize_selftests_foreach_arch): Remove.
3237 * selftest-arch.h (register_test_foreach_arch): Add name
3238 parameter.
3239 (run_tests_with_arch): New declaration.
3240 * utils-selftests.c (_initialize_utils_selftests): Add names
3241 when registering selftests.
3242 * utils.c (_initialize_utils): Likewise.
3243 * unittests/array-view-selftests.c
3244 (_initialize_array_view_selftests): Likewise.
3245 * unittests/environ-selftests.c (_initialize_environ_selftests):
3246 Likewise.
3247 * unittests/function-view-selftests.c
3248 (_initialize_function_view_selftests): Likewise.
3249 * unittests/offset-type-selftests.c
3250 (_initialize_offset_type_selftests): Likewise.
3251 * unittests/optional-selftests.c
3252 (_initialize_optional_selftests): Likewise.
3253 * unittests/scoped_restore-selftests.c
3254 (_initialize_scoped_restore_selftests): Likewise.
3255 * NEWS: Document "maintenance selftest" and "maint info
3256 selftests".
3257
5846367a
SM
32582017-09-16 Simon Marchi <simon.marchi@ericsson.com>
3259
3260 * mi/mi-main.c (mi_load_progress): Restore current_uiout using a
3261 scoped_restore.
3262
bd77e8ff
SM
32632017-09-16 Simon Marchi <simon.marchi@ericsson.com>
3264
3265 * mi/mi-main.c (mi_load_progress): Make uiout variable
3266 a unique_ptr.
3267
26a67918
PA
32682017-09-15 Pedro Alves <palves@redhat.com>
3269
3270 * compile/compile-c-types.c (convert_enum, convert_int)
3271 (convert_float): Adjust to refer to int_type_v0 and float_type_v0.
3272
3f8a7804
SM
32732017-09-15 Simon Marchi <simon.marchi@ericsson.com>
3274
3275 * dwarf2read.c (copy_string): Remove.
3276 (parse_macro_definition): Replace copy_string with savestring.
3277
8d200706
YQ
32782017-09-15 Yao Qi <yao.qi@linaro.org>
3279
3280 * configure.tgt (i[34567]86-*-darwin*): Append amd64.o to
3281 gdb_target_obs.
3282 (i[34567]86-*-solaris2.1[0-9]* | x86_64-*-solaris2.1[0-9]*):
3283 Likewise.
3284 (i[34567]86-*-linux*): Likewise.
3285
d185219d
SM
32862017-09-14 Simon Marchi <simon.marchi@ericsson.com>
3287
3288 * dwarf2expr.h (dwarf_stack_value): Add constructor.
3289 (dwarf_expr_context) <~dwarf_expr_context>: Define as default.
3290 <stack>: Change type to std::vector.
3291 <stack_len, stack_allocated>: Remove.
3292 <grow_stack>: Remove.
3293 * dwarf2expr.c (dwarf_expr_context::dwarf_expr_context): Adjust.
3294 (dwarf_expr_context::~dwarf_expr_context): Remove.
3295 (dwarf_expr_context::grow_stack): Remove.
3296 (dwarf_expr_context::push): Adjust.
3297 (dwarf_expr_context::pop): Adjust.
3298 (dwarf_expr_context::fetch): Adjust.
3299 (dwarf_expr_context::fetch_in_stack_memory): Adjust.
3300 (dwarf_expr_context::stack_empty_p): Adjust.
3301 (dwarf_expr_context::execute_stack_op): Adjust.
3302
eccd80d6
SM
33032017-09-14 Simon Marchi <simon.marchi@ericsson.com>
3304
3305 * dwarf2expr.h (dwarf_expr_context) <stack_empty_p>: Change
3306 return type to bool.
3307 * dwarf2expr.c (dwarf_expr_context::stack_empty_p): Likewise.
3308
69009882
SM
33092017-09-14 Simon Marchi <simon.marchi@ericsson.com>
3310
3311 * dwarf2expr.h (dwarf_expr_piece) <v.mem.in_stack_memory>:
3312 Change type to bool.
3313 (dwarf_stack_value) <in_stack_memory>: Likewise.
3314 (dwarf_expr_context) <push_address>: Change parameter type to
3315 bool.
3316 <fetch_in_stack_memory>: Change return type to bool.
3317 <push>: Change parameter type to bool.
3318 * dwarf2expr.c (dwarf_expr_context::push): Change parameter type
3319 to bool.
3320 (dwarf_expr_context::push_address): Likewise.
3321 (dwarf_expr_context::fetch_in_stack_memory): Change return type
3322 to bool.
3323 (dwarf_expr_context::execute_stack_op): Adjust.
3324 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Adjust.
3325
1e467161
SM
33262017-09-14 Simon Marchi <simon.marchi@ericsson.com>
3327
3328 * dwarf2expr.h (struct dwarf_expr_piece): Move up.
3329 (struct dwarf_expr_context) <n_pieces>: Remove.
3330 <pieces>: Change type to std::vector.
3331 * dwarf2expr.c (dwarf_expr_context::dwarf_expr_context): Adjust.
3332 (dwarf_expr_context::~dwarf_expr_context): Don't manually free
3333 pieces.
3334 (dwarf_expr_context::add_piece): Adjust.
3335 * dwarf2loc.c (struct piece_closure): Initialize fields.
3336 <n_pieces>: Remove.
3337 <pieces>: Change type to std::vector.
3338 (allocate_piece_closure): Adjust, change parameter to
3339 std::vector rvalue and std::move it to piece_closure.
3340 (rw_pieced_value): Adjust.
3341 (check_pieced_synthetic_pointer): Adjust.
3342 (indirect_synthetic_pointer): Adjust.
3343 (coerce_pieced_ref): Adjust.
3344 (free_pieced_value_closure): Adjust. Use delete to free
3345 piece_closure.
3346 (dwarf2_evaluate_loc_desc_full): Adjust. std::move ctx.pieces
3347 to allocate_piece_closure.
3348 (dwarf2_loc_desc_get_symbol_read_needs): Adjust.
3349
0782db84
SM
33502017-09-12 Simon Marchi <simon.marchi@ericsson.com>
3351
3352 * probe.h (probe_ops_cp): Remove typedef.
3353 (DEF_VEC_P (probe_ops_cp)): Remove.
3354 (all_probe_ops): Change type to std::vector.
3355 * probe.c (info_probes_for_ops): Adjust to vector change.
3356 (probe_linespec_to_ops): Likewise.
3357 (all_probe_ops): Change type to std::vector.
3358 (_initialize_probe): Adjust to vector change.
3359 * dtrace-probe.c (_initialize_dtrace_probe): Likewise.
3360 * elfread.c (elf_get_probes): Likewise.
3361 * stap-probe.c (_initialize_stap_probe): Likewise.
3362
1eac6bea
SM
33632017-09-12 Simon Marchi <simon.marchi@ericsson.com>
3364
3365 * probe.h (struct bound_probe): Define constructors.
3366 * probe.c (bound_probe_s): Remove typedef.
3367 (DEF_VEC_O (bound_probe_s)): Remove VEC.
3368 (collect_probes): Change return type to std::vector, remove
3369 cleanup.
3370 (compare_probes): Return bool, change parameter type. Change
3371 semantic to "less than".
3372 (gen_ui_out_table_header_info): Change parameter to std::vector
3373 and update.
3374 (exists_probe_with_pops): Likewise.
3375 (info_probes_for_ops): Update to std::vector change.
3376 (enable_probes_command): Likewise.
3377 (disable_probes_command): Likewise.
3378
aaa63a31
SM
33792017-09-12 Simon Marchi <simon.marchi@ericsson.com>
3380
3381 * probe.h (struct probe_ops) <get_probes>: Change parameter from
3382 vec to std::vector.
3383 * probe.c (parse_probes_in_pspace): Update.
3384 (find_probes_in_objfile): Update.
3385 (find_probe_by_pc): Update.
3386 (collect_probes): Update.
3387 (probe_any_get_probes): Update.
3388 * symfile.h (struct sym_probe_fns) <sym_get_probes> Change
3389 return type to reference to std::vector.
3390 * dtrace-probe.c (dtrace_process_dof_probe): Change parameter to
3391 std::vector and update.
3392 (dtrace_process_dof): Likewise.
3393 (dtrace_get_probes): Likewise.
3394 * elfread.c (elf_get_probes): Change return type to std::vector,
3395 store an std::vector in bfd_data.
3396 (probe_key_free): Update to std::vector.
3397 * stap-probe.c (handle_stap_probe): Change parameter to
3398 std::vector and update.
3399 (stap_get_probes): Likewise.
3400 * symfile-debug.c (debug_sym_get_probes): Change return type to
3401 std::vector and update.
3402
cb85b21b
TT
34032017-09-11 Tom Tromey <tom@tromey.com>
3404
3405 * breakpoint.c (program_breakpoint_here_p): Update.
3406 * target.c (make_scoped_restore_show_memory_breakpoints): Rename
3407 from make_show_memory_breakpoints_cleanup. Return a
3408 scoped_restore_tmpl<int>.
3409 (restore_show_memory_breakpoints): Remove.
3410 * ppc-linux-tdep.c (ppc_linux_memory_remove_breakpoint): Update.
3411 * mem-break.c (memory_validate_breakpoint): Update.
3412 * ia64-tdep.c (ia64_memory_insert_breakpoint): Update.
3413 (ia64_memory_remove_breakpoint): Update.
3414 (ia64_breakpoint_from_pc): Update.
3415 * target.h (make_scoped_restore_show_memory_breakpoints): Rename
3416 from make_show_memory_breakpoints_cleanup.
3417
8fbc99ef
TT
34182017-09-11 Tom Tromey <tom@tromey.com>
3419
3420 * d-namespace.c (d_lookup_symbol): Use std::string.
3421 (find_symbol_in_baseclass): Likewise.
3422
50feb4bd
TT
34232017-09-11 Tom Tromey <tom@tromey.com>
3424
3425 * ctf.c (ctf_start): Use std::string.
3426
c6dc63a1
TT
34272017-09-11 Tom Tromey <tom@tromey.com>
3428
3429 * ada-lang.c (is_known_support_routine): Update.
3430 (ada_unhandled_exception_name_addr_from_raise): Update.
3431 * guile/scm-frame.c (gdbscm_frame_name): Update.
3432 * python/py-frame.c (frapy_name): Update.
3433 (frapy_function): Update.
3434 * stack.h (find_frame_funname): Update.
3435 * stack.c (find_frame_funname): Return unique_xmalloc_ptr.
3436 (print_frame): Update.
3437
d6b9b80f
TT
34382017-09-11 Tom Tromey <tom@tromey.com>
3439
3440 * findcmd.c (put_bits): Take a gdb::byte_vector.
3441 (parse_find_args): Return gdb::byte_vector. "args" now const.
3442 Remove "pattern_bufp" and "pattern_lenp" parameters. Remove
3443 cleanups.
3444 (find_command): Update.
3445
a9921622
TT
34462017-09-11 Tom Tromey <tom@tromey.com>
3447
3448 * cli/cli-script.c (class scoped_restore_hook_in): New.
3449 (clear_hook_in_cleanup): Remove.
3450 (execute_cmd_pre_hook, execute_cmd_post_hook): Use
3451 scoped_restore_hook_in.
3452
be0d7abb
TT
34532017-09-11 Tom Tromey <tom@tromey.com>
3454
3455 * cli/cli-script.c (restore_interp): Remove.
3456 (read_command_lines): Use scoped_restore_interp.
3457 * interps.c (scoped_restore_interp::set_temp): Rename from
3458 interp_set_temp.
3459 * interps.h (class scoped_restore_interp): New.
3460 (interp_set_temp): Remove.
3461
00f675ff
TT
34622017-09-11 Tom Tromey <tom@tromey.com>
3463
3464 * mi/mi-cmd-catch.c (mi_cmd_catch_assert)
3465 (mi_cmd_catch_exception, mi_catch_load_unload): Update.
3466 * mi/mi-cmd-break.c (setup_breakpoint_reporting): Return a
3467 scoped_restore.
3468 (mi_cmd_break_insert_1): Update.
3469 * mi/mi-cmd-break.h (setup_breakpoint_reporting): Return a
3470 scoped_restore.
3471
cb791d59
TT
34722017-09-11 Tom Tromey <tom@tromey.com>
3473
3474 * demangle.c (demangle_command): Update.
3475 * breakpoint.c (disable_command): Update.
3476 (enable_command): Update.
3477 (find_location_by_number): Make "number" const. Use
3478 get_number_trailer.
3479 * cli/cli-utils.c (extract_arg): Return std::string.
3480 * probe.c (parse_probe_linespec): Update. Change types.
3481 (collect_probes): Take string arguments.
3482 (parse_probe_linespec): Likewise.
3483 (info_probes_for_ops): Update.
3484 (enable_probes_command): Update.
3485 (disable_probes_command): Update.
3486 * break-catch-sig.c (catch_signal_split_args): Update.
3487 * mi/mi-parse.c (mi_parse): Update.
3488
2039bd9f
TT
34892017-09-11 Tom Tromey <tom@tromey.com>
3490
3491 * language.h (language_enum): Make argument const.
3492 * language.c (language_enum): Make argument const.
3493
f1735a53
TT
34942017-09-11 Tom Tromey <tom@tromey.com>
3495
3496 * common/common-utils.h (skip_to_space): Remove macro, redeclare
3497 as function.
3498 (skip_to_space): Rename from skip_to_space_const.
3499 * common/common-utils.c (skip_to_space): New function.
3500 (skip_to_space): Rename from skip_to_space_const.
3501 * cli/cli-utils.h (get_number): Rename from get_number_const.
3502 (extract_arg): Rename from extract_arg_const.
3503 * cli/cli-utils.c (get_number): Rename from get_number_const.
3504 (extract_arg): Rename from extract_arg_const.
3505 (number_or_range_parser::get_number): Use ::get_number.
3506 * aarch64-linux-tdep.c, ada-lang.c, arm-linux-tdep.c, ax-gdb.c,
3507 break-catch-throw.c, breakpoint.c, cli/cli-cmds.c, cli/cli-dump.c,
3508 cli/cli-script.c, cli/cli-setshow.c, compile/compile.c,
3509 completer.c, demangle.c, disasm.c, findcmd.c, linespec.c,
3510 linux-tdep.c, linux-thread-db.c, location.c, mi/mi-parse.c,
3511 minsyms.c, nat/linux-procfs.c, printcmd.c, probe.c,
3512 python/py-breakpoint.c, record.c, rust-exp.y, serial.c, stack.c,
3513 stap-probe.c, tid-parse.c, tracepoint.c: Update all callers.
3514
7d221d74
TT
35152017-09-11 Tom Tromey <tom@tromey.com>
3516
3517 * python/python.c (do_start_initialization): Use
3518 py-event-types.def to initialize types.
3519 Define all object type structures.
3520 * python/python-internal.h: Don't declare event initialization
3521 functions.
3522 * python/py-threadevent.c (thread_event_object_type): Don't
3523 define.
3524 * python/py-stopevent.c (stop_event_object_type): Don't define.
3525 * python/py-signalevent.c (signal_event_object_type): Don't
3526 declare or define.
3527 * python/py-newobjfileevent.c (new_objfile_event_object_type)
3528 (clear_objfiles_event_object_type): Don't declare or define.
3529 * python/py-infevents.c (inferior_call_pre_event_object_type)
3530 (inferior_call_post_event_object_type)
3531 (register_changed_event_object_type)
3532 (memory_changed_event_object_type): Don't declare or define.
3533 * python/py-inferior.c (new_thread_event_object_type)
3534 (new_inferior_event_object_type)
3535 (inferior_deleted_event_object_type): Don't declare or define.
3536 * python/py-exitedevent.c (exited_event_object_type): Don't
3537 declare or define.
3538 * python/py-evts.c (gdbpy_initialize_py_events): Use
3539 py-all-events.def.
3540 * python/py-events.h (thread_event_object_type): Don't declare.
3541 (events_object): Use py-all-events.def.
3542 * python/py-event.h (GDBPY_NEW_EVENT_TYPE): Remove. Use
3543 py-event-types.def.
3544 * python/py-event-types.def: New file.
3545 * python/py-continueevent.c (create_continue_event_object): Don't
3546 declare or define.
3547 * python/py-bpevent.c (breakpoint_event_object_type): Don't
3548 declare or define.
3549 * python/py-all-events.def: New file.
3550
35c61a1d
TT
35512017-09-11 Tom Tromey <tom@tromey.com>
3552
3553 * python/py-threadevent.c (create_thread_event_object): Return
3554 gdbpy_ref.
3555 * python/py-stopevent.h (create_stop_event_object)
3556 (create_breakpoint_event_object, create_signal_event_object):
3557 Update.
3558 * python/py-stopevent.c (create_stop_event_object): Return
3559 gdbpy_ref.
3560 (emit_stop_event): Update.
3561 * python/py-signalevent.c (create_signal_event_object): Return
3562 gdbpy_ref.
3563 * python/py-infevents.c (create_inferior_call_event_object):
3564 Update.
3565 * python/py-event.h (create_event_object)
3566 (create_thread_event_object): Update.
3567 * python/py-event.c (create_event_object): Return gdbpy_ref.
3568 * python/py-continueevent.c: Return gdbpy_ref.
3569 * python/py-bpevent.c (create_breakpoint_event_object): Return
3570 gdbpy_ref.
3571
7c96f8c1
TT
35722017-09-11 Tom Tromey <tom@tromey.com>
3573
3574 PR python/15622:
3575 * NEWS: Add entry.
3576 * python/python.c (do_start_initialization): Initialize new event
3577 types.
3578 * python/python-internal.h (gdbpy_initialize_new_inferior_event)
3579 (gdbpy_initialize_inferior_deleted_event)
3580 (gdbpy_initialize_new_thread_event): Declare.
3581 * python/py-threadevent.c (create_thread_event_object): Add option
3582 "thread" parameter.
3583 * python/py-inferior.c (new_thread_event_object_type)
3584 (new_inferior_event_object_type)
3585 (inferior_deleted_event_object_type): Declare.
3586 (python_new_inferior, python_inferior_deleted): New functions.
3587 (add_thread_object): Emit new_thread event.
3588 (gdbpy_initialize_inferior): Attach new functions to corresponding
3589 observers.
3590 (new_thread, new_inferior, inferior_deleted): Define new event
3591 types.
3592 * python/py-evts.c (gdbpy_initialize_py_events): Add new
3593 registries.
3594 * python/py-events.h (events_object) <new_inferior,
3595 inferior_deleted, new_thread>: New fields.
3596 * python/py-event.h (create_thread_event_breakpoint): Add optional
3597 "thread" parameter.
3598
72542b8e
AB
35992017-09-10 Andrew Burgess <andrew.burgess@embecosm.com>
3600
3601 * utils.c (abort_with_message): Don't compare gdb_stderr to NULL,
3602 check current_ui instead.
3603 (internal_vproblem): Likewise.
3604
0d64823e
SM
36052017-09-09 Simon Marchi <simon.marchi@ericsson.com>
3606
3607 * thread.c (print_thread_info_1): Remove unnecessary calls to
3608 uiout->is_mi_like_p.
3609
eb1e02fd
TT
36102017-09-09 Tom Tromey <tom@tromey.com>
3611
3612 * namespace.h (add_using_directive): Update.
3613 * namespace.c (add_using_directive): Change type of excludes to
3614 std::vector.
3615 * dwarf2read.c (read_import_statement): Use std::vector.
3616 (read_namespace): Update.
3617 * cp-namespace.c (cp_scan_for_anonymous_namespaces): Update.
3618
0fc21fd8
TT
36192017-09-09 Tom Tromey <tom@tromey.com>
3620
3621 * linespec.c (create_sals_line_offset): Use gdb::def_vector.
3622
49663d05
TT
36232017-09-09 Tom Tromey <tom@tromey.com>
3624
3625 * p-valprint.c (pascal_object_print_value): Use gdb::byte_vector.
3626
0b868b60
TT
36272017-09-09 Tom Tromey <tom@tromey.com>
3628
3629 * stack.c (func_command): Use gdb::def_vector.
3630
c0470d48
TT
36312017-09-09 Tom Tromey <tom@tromey.com>
3632
3633 * mi/mi-cmd-var.c (mi_cmd_var_list_children): Use gdb::optional,
3634 ui_out_emit_list, ui_out_emit_tuple.
3635 (mi_cmd_var_update): Likewise.
3636
ca5909c7
TT
36372017-09-09 Tom Tromey <tom@tromey.com>
3638
3639 * mi/mi-interp.c (mi_user_selected_context_changed): Use
3640 ui_out_redirect_pop.
3641 * guile/scm-ports.c (ioscm_with_output_to_port_worker): Use
3642 ui_out_redirect_pop.
3643 * utils.c (do_ui_out_redirect_pop)
3644 (make_cleanup_ui_out_redirect_pop): Remove.
3645 * top.c (execute_command_to_string): Use ui_out_redirect_pop.
3646 * utils.h (make_cleanup_ui_out_redirect_pop): Remove.
3647 * ui-out.h (ui_out_redirect_pop): New class.
3648
e6a2252a
TT
36492017-09-09 Tom Tromey <tom@tromey.com>
3650
3651 * mi/mi-main.c (output_cores): Use ui_out_emit_list.
3652 (list_available_thread_groups, mi_cmd_list_thread_groups)
3653 (mi_cmd_data_list_changed_registers, mi_cmd_data_read_memory)
3654 (mi_cmd_data_read_memory_bytes, mi_cmd_trace_frame_collected):
3655 Likewise.
3656
393702cd
TT
36572017-09-09 Tom Tromey <tom@tromey.com>
3658
3659 * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn): Use
3660 ui_out_emit_tuple.
3661
76f9c9cf
TT
36622017-09-09 Tom Tromey <tom@tromey.com>
3663
3664 * target.c (flash_erase_command): Use ui_out_emit_tuple.
3665 * stack.c (print_frame): Use ui_out_emit_tuple.
3666 * spu-tdep.c (info_spu_event_command): Use ui_out_emit_tuple.
3667 (info_spu_mailbox_command, info_spu_dma_command)
3668 (info_spu_proxydma_command): Likewise.
3669 * mi/mi-main.c (mi_cmd_trace_frame_collected): Use
3670 ui_out_emit_tuple, gdb::byte_vector, bin2hex.
3671 * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries): Use
3672 ui_out_emit_tuple.
3673 * breakpoint.c (print_it_watchpoint): Use ui_out_emit_tuple.
3674
dc9fe180
TT
36752017-09-09 Tom Tromey <tom@tromey.com>
3676
3677 * ui-out.h (make_cleanup_ui_out_table_begin_end): Remove.
3678 (class ui_out_emit_table): Update comment.
3679 * ui-out.c (do_cleanup_table_end)
3680 (make_cleanup_ui_out_table_begin_end): Remove.
3681 * spu-tdep.c (info_spu_mailbox_list): Use ui_out_emit_table.
3682 (info_spu_dma_cmdlist): Likewise.
3683 * probe.c (info_probes_for_ops): Use ui_out_emit_table.
3684 * darwin-nat-info.c (darwin_debug_regions_recurse): Use
3685 ui_out_emit_table.
3686
f8cc3da6
TT
36872017-09-09 Tom Tromey <tom@tromey.com>
3688
3689 * thread.c (print_thread_info_1): Use ui_out_emit_table,
3690 ui_out_emit_list, gdb::optional.
3691
481695ed
JB
36922017-09-09 John Baldwin <jhb@FreeBSD.org>
3693
3694 * aarch64-linux-nat.c: Remove _initialize_aarch64_linux_nat
3695 prototype.
3696 * aarch64-linux-tdep.c: Remove _initialize_aarch64_linux_tdep
3697 prototype.
3698 * aarch64-newlib-tdep.c: Remove _initialize_aarch64_newlib_tdep
3699 prototype.
3700 * aarch64-tdep.c: Remove _initialize_aarch64_tdep prototype.
3701 * ada-exp.y: Remove _initialize_ada_exp prototype.
3702 * ada-lang.c: Remove _initialize_ada_language prototype.
3703 * ada-tasks.c: Remove _initialize_tasks prototype.
3704 * addrmap.c: Remove _initialize_addrmap prototype.
3705 * agent.c: Remove _initialize_agent prototype.
3706 * aix-thread.c: Remove _initialize_aix_thread prototype.
3707 * alpha-bsd-nat.c: Remove _initialize_alphabsd_nat prototype.
3708 * alpha-linux-nat.c: Remove _initialize_alpha_linux_nat prototype.
3709 * alpha-linux-tdep.c: Remove _initialize_alpha_linux_tdep
3710 prototype.
3711 * alpha-nbsd-tdep.c: Remove _initialize_alphanbsd_tdep prototype.
3712 * alpha-obsd-tdep.c: Remove _initialize_alphaobsd_tdep prototype.
3713 * alpha-tdep.c: Remove _initialize_alpha_tdep prototype.
3714 * amd64-darwin-tdep.c: Remove _initialize_amd64_darwin_tdep
3715 prototype.
3716 * amd64-dicos-tdep.c: Remove _initialize_amd64_dicos_tdep
3717 prototype.
3718 * amd64-fbsd-nat.c: Remove _initialize_amd64fbsd_nat prototype.
3719 * amd64-fbsd-tdep.c: Remove _initialize_amd64fbsd_tdep prototype.
3720 * amd64-linux-nat.c: Remove _initialize_amd64_linux_nat prototype.
3721 * amd64-linux-tdep.c: Remove _initialize_amd64_linux_tdep
3722 prototype.
3723 * amd64-nbsd-nat.c: Remove _initialize_amd64nbsd_nat prototype.
3724 * amd64-nbsd-tdep.c: Remove _initialize_amd64nbsd_tdep prototype.
3725 * amd64-obsd-nat.c: Remove _initialize_amd64obsd_nat prototype.
3726 * amd64-obsd-tdep.c: Remove _initialize_amd64obsd_tdep prototype.
3727 * amd64-sol2-tdep.c: Remove _initialize_amd64_sol2_tdep prototype.
3728 * amd64-tdep.c: Remove _initialize_amd64_tdep prototype.
3729 * amd64-windows-nat.c: Remove _initialize_amd64_windows_nat
3730 prototype.
3731 * amd64-windows-tdep.c: Remove _initialize_amd64_windows_tdep
3732 prototype.
3733 * annotate.c: Remove _initialize_annotate prototype.
3734 * arc-newlib-tdep.c: Remove _initialize_arc_newlib_tdep prototype.
3735 * arc-tdep.c: Remove _initialize_arc_tdep prototype.
3736 * arch-utils.c: Remove _initialize_gdbarch_utils prototype.
3737 * arm-linux-nat.c: Remove _initialize_arm_linux_nat prototype.
3738 * arm-linux-tdep.c: Remove _initialize_arm_linux_tdep prototype.
3739 * arm-nbsd-tdep.c: Remove _initialize_arm_netbsd_tdep prototype.
3740 * arm-obsd-tdep.c: Remove _initialize_armobsd_tdep prototype.
3741 * arm-symbian-tdep.c: Remove _initialize_arm_symbian_tdep
3742 prototype.
3743 * arm-tdep.c: Remove _initialize_arm_tdep prototype.
3744 * arm-wince-tdep.c: Remove _initialize_arm_wince_tdep prototype.
3745 * auto-load.c: Remove _initialize_auto_load prototype.
3746 * auxv.c: Remove _initialize_auxv prototype.
3747 * avr-tdep.c: Remove _initialize_avr_tdep prototype.
3748 * ax-gdb.c: Remove _initialize_ax_gdb prototype.
3749 * bfin-linux-tdep.c: Remove _initialize_bfin_linux_tdep prototype.
3750 * bfin-tdep.c: Remove _initialize_bfin_tdep prototype.
3751 * break-catch-sig.c: Remove _initialize_break_catch_sig prototype.
3752 * break-catch-syscall.c: Remove _initialize_break_catch_syscall
3753 prototype.
3754 * break-catch-throw.c: Remove _initialize_break_catch_throw
3755 prototype.
3756 * breakpoint.c: Remove _initialize_breakpoint prototype.
3757 * bsd-uthread.c: Remove _initialize_bsd_uthread prototype.
3758 * btrace.c: Remove _initialize_btrace prototype.
3759 * charset.c: Remove _initialize_charset prototype.
3760 * cli/cli-cmds.c: Remove _initialize_cli_cmds prototype.
3761 * cli/cli-dump.c: Remove _initialize_cli_dump prototype.
3762 * cli/cli-interp.c: Remove _initialize_cli_interp prototype.
3763 * cli/cli-logging.c: Remove _initialize_cli_logging prototype.
3764 * cli/cli-script.c: Remove _initialize_cli_script prototype.
3765 * coff-pe-read.c: Remove _initialize_coff_pe_read prototype.
3766 * coffread.c: Remove _initialize_coffread prototype.
3767 * compile/compile.c: Remove _initialize_compile prototype.
3768 * complaints.c: Remove _initialize_complaints prototype.
3769 * completer.c: Remove _initialize_completer prototype.
3770 * copying.awk: Remove _initialize_copying prototype.
3771 * copying.c: Regenerate.
3772 * core-regset.c: Remove _initialize_core_regset prototype.
3773 * corefile.c: Remove _initialize_core prototype.
3774 * corelow.c: Remove _initialize_corelow prototype.
3775 * cp-abi.c: Remove _initialize_cp_abi prototype.
3776 * cp-namespace.c: Remove _initialize_cp_namespace prototype.
3777 * cp-support.c: Remove _initialize_cp_support prototype.
3778 * cp-valprint.c: Remove _initialize_cp_valprint prototype.
3779 * cris-linux-tdep.c: Remove _initialize_cris_linux_tdep prototype.
3780 * cris-tdep.c: Remove _initialize_cris_tdep prototype.
3781 * ctf.c: Remove _initialize_ctf prototype.
3782 * d-lang.c: Remove _initialize_d_language prototype.
3783 * darwin-nat-info.c: Remove _initialize_darwin_info_commands
3784 prototype.
3785 * darwin-nat.c: Remove _initialize_darwin_inferior prototype.
3786 * dbxread.c: Remove _initialize_dbxread prototype.
3787 * dcache.c: Remove _initialize_dcache prototype.
3788 * demangle.c: Remove _initialize_demangler prototype.
3789 * disasm-selftests.c: Remove _initialize_disasm_selftests
3790 prototype.
3791 * disasm.c: Remove _initialize_disasm prototype.
3792 * dtrace-probe.c: Remove _initialize_dtrace_probe prototype.
3793 * dummy-frame.c: Remove _initialize_dummy_frame prototype.
3794 * dwarf2-frame-tailcall.c: Remove _initialize_tailcall_frame
3795 prototype.
3796 * dwarf2-frame.c: Remove _initialize_dwarf2_frame prototype.
3797 * dwarf2expr.c: Remove _initialize_dwarf2expr prototype.
3798 * dwarf2loc.c: Remove _initialize_dwarf2loc prototype.
3799 * dwarf2read.c: Remove _initialize_dwarf2_read prototype.
3800 * elfread.c: Remove _initialize_elfread prototype.
3801 * exec.c: Remove _initialize_exec prototype.
3802 * extension.c: Remove _initialize_extension prototype.
3803 * f-lang.c: Remove _initialize_f_language prototype.
3804 * f-valprint.c: Remove _initialize_f_valprint prototype.
3805 * fbsd-nat.c: Remove _initialize_fbsd_nat prototype.
3806 * fbsd-tdep.c: Remove _initialize_fbsd_tdep prototype.
3807 * filesystem.c: Remove _initialize_filesystem prototype.
3808 * findcmd.c: Remove _initialize_mem_search prototype.
3809 * fork-child.c: Remove _initialize_fork_child prototype.
3810 * frame-base.c: Remove _initialize_frame_base prototype.
3811 * frame-unwind.c: Remove _initialize_frame_unwind prototype.
3812 * frame.c: Remove _initialize_frame prototype.
3813 * frv-linux-tdep.c: Remove _initialize_frv_linux_tdep prototype.
3814 * frv-tdep.c: Remove _initialize_frv_tdep prototype.
3815 * ft32-tdep.c: Remove _initialize_ft32_tdep prototype.
3816 * gcore.c: Remove _initialize_gcore prototype.
3817 * gdb_bfd.c: Remove _initialize_gdb_bfd prototype.
3818 * gdbarch.c: Regenerate.
3819 * gdbarch.sh: Remove _initialize_gdbarch prototype.
3820 * gdbtypes.c: Remove _initialize_gdbtypes prototype.
3821 * gnu-nat.c: Remove _initialize_gnu_nat prototype.
3822 * gnu-v2-abi.c: Remove _initialize_gnu_v2_abi prototype.
3823 * gnu-v3-abi.c: Remove _initialize_gnu_v3_abi prototype.
3824 * go-lang.c: Remove _initialize_go_language prototype.
3825 * go32-nat.c: Remove _initialize_go32_nat prototype.
3826 * guile/guile.c: Remove _initialize_guile prototype.
3827 * h8300-tdep.c: Remove _initialize_h8300_tdep prototype.
3828 * hppa-linux-nat.c: Remove _initialize_hppa_linux_nat prototype.
3829 * hppa-linux-tdep.c: Remove _initialize_hppa_linux_tdep prototype.
3830 * hppa-nbsd-nat.c: Remove _initialize_hppanbsd_nat prototype.
3831 * hppa-nbsd-tdep.c: Remove _initialize_hppanbsd_tdep prototype.
3832 * hppa-obsd-nat.c: Remove _initialize_hppaobsd_nat prototype.
3833 * hppa-obsd-tdep.c: Remove _initialize_hppaobsd_tdep prototype.
3834 * hppa-tdep.c: Remove _initialize_hppa_tdep prototype.
3835 * i386-bsd-nat.c: Remove _initialize_i386bsd_nat prototype.
3836 * i386-cygwin-tdep.c: Remove _initialize_i386_cygwin_tdep
3837 prototype.
3838 * i386-darwin-tdep.c: Remove _initialize_i386_darwin_tdep
3839 prototype.
3840 * i386-dicos-tdep.c: Remove _initialize_i386_dicos_tdep prototype.
3841 * i386-fbsd-nat.c: Remove _initialize_i386fbsd_nat prototype.
3842 * i386-fbsd-tdep.c: Remove _initialize_i386fbsd_tdep prototype.
3843 * i386-gnu-nat.c: Remove _initialize_i386gnu_nat prototype.
3844 * i386-gnu-tdep.c: Remove _initialize_i386gnu_tdep prototype.
3845 * i386-linux-nat.c: Remove _initialize_i386_linux_nat prototype.
3846 * i386-linux-tdep.c: Remove _initialize_i386_linux_tdep prototype.
3847 * i386-nbsd-nat.c: Remove _initialize_i386nbsd_nat prototype.
3848 * i386-nbsd-tdep.c: Remove _initialize_i386nbsd_tdep prototype.
3849 * i386-nto-tdep.c: Remove _initialize_i386nto_tdep prototype.
3850 * i386-obsd-nat.c: Remove _initialize_i386obsd_nat prototype.
3851 * i386-obsd-tdep.c: Remove _initialize_i386obsd_tdep prototype.
3852 * i386-sol2-nat.c: Remove _initialize_amd64_sol2_nat prototype.
3853 * i386-sol2-tdep.c: Remove _initialize_amd64_sol2_tdep prototype.
3854 * i386-tdep.c: Remove _initialize_i386_tdep prototype.
3855 * i386-windows-nat.c: Remove _initialize_i386_windows_nat
3856 prototype.
3857 * ia64-libunwind-tdep.c: Remove _initialize_libunwind_frame
3858 prototype.
3859 * ia64-linux-nat.c: Remove _initialize_ia64_linux_nat prototype.
3860 * ia64-linux-tdep.c: Remove _initialize_ia64_linux_tdep prototype.
3861 * ia64-tdep.c: Remove _initialize_ia64_tdep prototype.
3862 * ia64-vms-tdep.c: Remove _initialize_ia64_vms_tdep prototype.
3863 * infcall.c: Remove _initialize_infcall prototype.
3864 * infcmd.c: Remove _initialize_infcmd prototype.
3865 * inferior.c: Remove _initialize_inferiors prototype.
3866 * inflow.c: Remove _initialize_inflow prototype.
3867 * infrun.c: Remove _initialize_infrun prototype.
3868 * interps.c: Remove _initialize_interpreter prototype.
3869 * iq2000-tdep.c: Remove _initialize_iq2000_tdep prototype.
3870 * jit.c: Remove _initialize_jit prototype.
3871 * language.c: Remove _initialize_language prototype.
3872 * linux-fork.c: Remove _initialize_linux_fork prototype.
3873 * linux-nat.c: Remove _initialize_linux_nat prototype.
3874 * linux-tdep.c: Remove _initialize_linux_tdep prototype.
3875 * linux-thread-db.c: Remove _initialize_thread_db prototype.
3876 * lm32-tdep.c: Remove _initialize_lm32_tdep prototype.
3877 * m2-lang.c: Remove _initialize_m2_language prototype.
3878 * m32c-tdep.c: Remove _initialize_m32c_tdep prototype.
3879 * m32r-linux-nat.c: Remove _initialize_m32r_linux_nat prototype.
3880 * m32r-linux-tdep.c: Remove _initialize_m32r_linux_tdep prototype.
3881 * m32r-tdep.c: Remove _initialize_m32r_tdep prototype.
3882 * m68hc11-tdep.c: Remove _initialize_m68hc11_tdep prototype.
3883 * m68k-bsd-nat.c: Remove _initialize_m68kbsd_nat prototype.
3884 * m68k-bsd-tdep.c: Remove _initialize_m68kbsd_tdep prototype.
3885 * m68k-linux-nat.c: Remove _initialize_m68k_linux_tdep prototype.
3886 * m68k-linux-tdep.c: Remove _initialize_m68k_linux_tdep prototype.
3887 * m68k-tdep.c: Remove _initialize_m68k_tdep prototype.
3888 * m88k-bsd-nat.c: Remove _initialize_m68kbsd_nat prototype.
3889 * m88k-tdep.c: Remove _initialize_m68kbsd_tdep prototype.
3890 * machoread.c: Remove _initialize_machoread prototype.
3891 * macrocmd.c: Remove _initialize_macrocmd prototype.
3892 * macroscope.c: Remove _initialize_macroscope prototype.
3893 * maint.c: Remove _initialize_maint_cmds prototype.
3894 * mdebugread.c: Remove _initialize_mdebugread prototype.
3895 * memattr.c: Remove _initialize_mem prototype.
3896 * mep-tdep.c: Remove _initialize_mep_tdep prototype.
3897 * mi/mi-cmd-env.c: Remove _initialize_mi_cmd_env prototype.
3898 * mi/mi-cmds.c: Remove _initialize_mi_cmds prototype.
3899 * mi/mi-interp.c: Remove _initialize_mi_interp prototype.
3900 * mi/mi-main.c: Remove _initialize_mi_main prototype.
3901 * microblaze-linux-tdep.c: Remove
3902 _initialize_microblaze_linux_tdep prototype.
3903 * microblaze-tdep.c: Remove _initialize_microblaze_tdep prototype.
3904 * mips-fbsd-nat.c: Remove _initialize_mips_fbsd_nat prototype.
3905 * mips-fbsd-tdep.c: Remove _initialize_mips_fbsd_tdep prototype.
3906 * mips-linux-nat.c: Remove _initialize_mips_linux_nat prototype.
3907 * mips-linux-tdep.c: Remove _initialize_mips_linux_tdep prototype.
3908 * mips-nbsd-nat.c: Remove _initialize_mipsnbsd_nat prototype.
3909 * mips-nbsd-tdep.c: Remove _initialize_mipsnbsd_tdep prototype.
3910 * mips-sde-tdep.c: Remove _initialize_mips_sde_tdep prototype.
3911 * mips-tdep.c: Remove _initialize_mips_tdep prototype.
3912 * mips64-obsd-nat.c: Remove _initialize_mips64obsd_nat prototype.
3913 * mips64-obsd-tdep.c: Remove _initialize_mips64obsd_tdep
3914 prototype.
3915 * mipsread.c: Remove _initialize_mipsread prototype.
3916 * mn10300-linux-tdep.c: Remove _initialize_mn10300_linux_tdep
3917 prototype.
3918 * mn10300-tdep.c: Remove _initialize_mn10300_tdep prototype.
3919 * moxie-tdep.c: Remove _initialize_moxie_tdep prototype.
3920 * msp430-tdep.c: Remove _initialize_msp430_tdep prototype.
3921 * mt-tdep.c: Remove _initialize_mt_tdep prototype.
3922 * nds32-tdep.c: Remove _initialize_nds32_tdep prototype.
3923 * nios2-linux-tdep.c: Remove _initialize_nios2_linux_tdep
3924 prototype.
3925 * nios2-tdep.c: Remove _initialize_nios2_tdep prototype.
3926 * nto-procfs.c: Remove _initialize_procfs prototype.
3927 * nto-tdep.c: Remove _initialize_nto_tdep prototype.
3928 * objc-lang.c: Remove _initialize_objc_language prototype.
3929 * objfiles.c: Remove _initialize_objfiles prototype.
3930 * observer.c: Remove observer_test_first_notification_function,
3931 observer_test_second_notification_function,
3932 observer_test_third_notification_function, and
3933 _initialize_observer prototypes.
3934 * opencl-lang.c: Remove _initialize_opencl_language prototypes.
3935 * osabi.c: Remove _initialize_gdb_osabi prototype.
3936 * osdata.c: Remove _initialize_osdata prototype.
3937 * p-valprint.c: Remove _initialize_pascal_valprint prototype.
3938 * parse.c: Remove _initialize_parse prototype.
3939 * ppc-fbsd-nat.c: Remove _initialize_ppcfbsd_nat prototype.
3940 * ppc-fbsd-tdep.c: Remove _initialize_ppcfbsd_tdep prototype.
3941 * ppc-linux-nat.c: Remove _initialize_ppc_linux_nat prototype.
3942 * ppc-linux-tdep.c: Remove _initialize_ppc_linux_tdep prototype.
3943 * ppc-nbsd-nat.c: Remove _initialize_ppcnbsd_nat prototype.
3944 * ppc-nbsd-tdep.c: Remove _initialize_ppcnbsd_tdep prototype.
3945 * ppc-obsd-nat.c: Remove _initialize_ppcobsd_nat prototype.
3946 * ppc-obsd-tdep.c: Remove _initialize_ppcobsd_tdep prototype.
3947 * printcmd.c: Remove _initialize_printcmd prototype.
3948 * probe.c: Remove _initialize_probe prototype.
3949 * proc-api.c: Remove _initialize_proc_api prototype.
3950 * proc-events.c: Remove _initialize_proc_events prototype.
3951 * proc-service.c: Remove _initialize_proc_service prototype.
3952 * procfs.c: Remove _initialize_procfs prototype.
3953 * psymtab.c: Remove _initialize_psymtab prototype.
3954 * python/python.c: Remove _initialize_python prototype.
3955 * ravenscar-thread.c: Remove _initialize_ravenscar prototype.
3956 * record-btrace.c: Remove _initialize_record_btrace prototype.
3957 * record-full.c: Remove _initialize_record_full prototype.
3958 * record.c: Remove _initialize_record prototype.
3959 * regcache.c: Remove _initialize_regcache prototype.
3960 * reggroups.c: Remove _initialize_reggroup prototype.
3961 * remote-notif.c: Remove _initialize_notif prototype.
3962 * remote-sim.c: Remove _initialize_remote_sim prototype.
3963 * remote.c: Remove _initialize_remote prototype.
3964 * reverse.c: Remove _initialize_reverse prototype.
3965 * rl78-tdep.c: Remove _initialize_rl78_tdep prototype.
3966 * rs6000-aix-tdep.c: Remove _initialize_rs6000_aix_tdep prototype.
3967 * rs6000-lynx178-tdep.c: Remove _initialize_rs6000_lynx178_tdep
3968 prototype.
3969 * rs6000-nat.c: Remove _initialize_rs6000_nat prototype.
3970 * rs6000-tdep.c: Remove _initialize_rs6000_tdep prototype.
3971 * rust-exp.y: Remove _initialize_rust_exp prototype.
3972 * rx-tdep.c: Remove _initialize_rx_tdep prototype.
3973 * s390-linux-nat.c: Remove _initialize_s390_nat prototype.
3974 * s390-linux-tdep.c: Remove _initialize_s390_tdep prototype.
3975 * score-tdep.c: Remove _initialize_score_tdep prototype.
3976 * selftest-arch.c: Remove _initialize_selftests_foreach_arch
3977 prototype.
3978 * ser-go32.c: Remove _initialize_ser_dos prototype.
3979 * ser-mingw.c: Remove _initialize_ser_windows prototype.
3980 * ser-pipe.c: Remove _initialize_ser_pipe prototype.
3981 * ser-tcp.c: Remove _initialize_ser_tcp prototype.
3982 * ser-unix.c: Remove _initialize_ser_hardwire prototype.
3983 * serial.c: Remove _initialize_serial prototype.
3984 * sh-linux-tdep.c: Remove _initialize_sh_linux_tdep prototype.
3985 * sh-nbsd-nat.c: Remove _initialize_shnbsd_nat prototype.
3986 * sh-nbsd-tdep.c: Remove _initialize_shnbsd_tdep prototype.
3987 * sh-tdep.c: Remove _initialize_sh_tdep prototype.
3988 * skip.c: Remove _initialize_step_skip prototype.
3989 * sol-thread.c: Remove _initialize_sol_thread prototype.
3990 * solib-aix.c: Remove _initialize_solib_aix prototype.
3991 * solib-darwin.c: Remove _initialize_darwin_solib prototype.
3992 * solib-dsbt.c: Remove _initialize_dsbt_solib prototype.
3993 * solib-frv.c: Remove _initialize_frv_solib prototype.
3994 * solib-spu.c: Remove _initialize_spu_solib prototype.
3995 * solib-svr4.c: Remove _initialize_svr4_solib prototype.
3996 * solib-target.c: Remove _initialize_solib_target prototype.
3997 * solib.c: Remove _initialize_solib prototype.
3998 * source.c: Remove _initialize_source prototype.
3999 * sparc-linux-nat.c: Remove _initialize_sparc_linux_nat prototype.
4000 * sparc-linux-tdep.c: Remove _initialize_sparc_linux_tdep
4001 prototype.
4002 * sparc-nat.c: Remove _initialize_sparc_nat prototype.
4003 * sparc-nbsd-nat.c: Remove _initialize_sparcnbsd_nat prototype.
4004 * sparc-nbsd-tdep.c: Remove _initialize_sparcnbsd_tdep prototype.
4005 * sparc-obsd-tdep.c: Remove _initialize_sparc32obsd_tdep
4006 prototype.
4007 * sparc-sol2-nat.c: Remove _initialize_sparc_sol2_nat prototype.
4008 * sparc-sol2-tdep.c: Remove _initialize_sparc_sol2_tdep prototype.
4009 * sparc-tdep.c: Remove _initialize_sparc_tdep prototype.
4010 * sparc64-fbsd-nat.c: Remove _initialize_sparc64fbsd_nat
4011 prototype.
4012 * sparc64-fbsd-tdep.c: Remove _initialize_sparc64fbsd_tdep
4013 prototype.
4014 * sparc64-linux-nat.c: Remove _initialize_sparc64_linux_nat
4015 prototype.
4016 * sparc64-linux-tdep.c: Remove _initialize_sparc64_linux_tdep
4017 prototype.
4018 * sparc64-nat.c: Remove _initialize_sparc64_nat prototype.
4019 * sparc64-nbsd-nat.c: Remove _initialize_sparc64nbsd_nat
4020 prototype.
4021 * sparc64-nbsd-tdep.c: Remove _initialize_sparc64nbsd_tdep
4022 prototype.
4023 * sparc64-obsd-nat.c: Remove _initialize_sparc64obsd_nat
4024 prototype.
4025 * sparc64-obsd-tdep.c: Remove _initialize_sparc64obsd_tdep
4026 prototype.
4027 * sparc64-sol2-tdep.c: Remove _initialize_sparc64_sol2_tdep
4028 prototype.
4029 * spu-linux-nat.c: Remove _initialize_spu_nat prototype.
4030 * spu-multiarch.c: Remove _initialize_spu_multiarch prototype.
4031 * spu-tdep.c: Remove _initialize_spu_tdep prototype.
4032 * stabsread.c: Remove _initialize_stabsread prototype.
4033 * stack.c: Remove _initialize_stack prototype.
4034 * stap-probe.c: Remove _initialize_stap_probe prototype.
4035 * std-regs.c: Remove _initialize_frame_reg prototype.
4036 * symfile-debug.c: Remove _initialize_symfile_debug prototype.
4037 * symfile-mem.c: Remove _initialize_symfile_mem prototype.
4038 * symfile.c: Remove _initialize_symfile prototype.
4039 * symmisc.c: Remove _initialize_symmisc prototype.
4040 * symtab.c: Remove _initialize_symtab prototype.
4041 * target-dcache.c: Remove _initialize_target_dcache prototype.
4042 * target-descriptions.c: Remove _initialize_target_descriptions
4043 prototype.
4044 * thread.c: Remove _initialize_thread prototype.
4045 * tic6x-linux-tdep.c: Remove _initialize_tic6x_linux_tdep
4046 prototype.
4047 * tic6x-tdep.c: Remove _initialize_tic6x_tdep prototype.
4048 * tilegx-linux-nat.c: Remove _initialize_tile_linux_nat prototype.
4049 * tilegx-linux-tdep.c: Remove _initialize_tilegx_linux_tdep
4050 prototype.
4051 * tilegx-tdep.c: Remove _initialize_tilegx_tdep prototype.
4052 * tracefile-tfile.c: Remove _initialize_tracefile_tfile prototype.
4053 * tracefile.c: Remove _initialize_tracefile prototype.
4054 * tracepoint.c: Remove _initialize_tracepoint prototype.
4055 * tui/tui-hooks.c: Remove _initialize_tui_hooks prototype.
4056 * tui/tui-interp.c: Remove _initialize_tui_interp prototype.
4057 * tui/tui-layout.c: Remove _initialize_tui_layout prototype.
4058 * tui/tui-regs.c: Remove _initialize_tui_regs prototype.
4059 * tui/tui-stack.c: Remove _initialize_tui_stack prototype.
4060 * tui/tui-win.c: Remove _initialize_tui_win prototype.
4061 * tui/tui.c: Remove _initialize_tui prototype.
4062 * typeprint.c: Remove _initialize_typeprint prototype.
4063 * user-regs.c: Remove _initialize_user_regs prototype.
4064 * utils.c: Remove _initialize_utils prototype.
4065 * v850-tdep.c: Remove _initialize_v850_tdep prototype.
4066 * valarith.c: Remove _initialize_valarith prototype.
4067 * valops.c: Remove _initialize_valops prototype.
4068 * valprint.c: Remove _initialize_valprint prototype.
4069 * value.c: Remove _initialize_values prototype.
4070 * varobj.c: Remove _initialize_varobj prototype.
4071 * vax-bsd-nat.c: Remove _initialize_vaxbsd_nat prototype.
4072 * vax-nbsd-tdep.c: Remove _initialize_vaxnbsd_tdep prototype.
4073 * vax-tdep.c: Remove _initialize_vax_tdep prototype.
4074 * windows-nat.c: Remove _initialize_windows_nat,
4075 _initialize_check_for_gdb_ini, and _initialize_loadable
4076 prototypes.
4077 * windows-tdep.c: Remove _initialize_windows_tdep prototype.
4078 * xcoffread.c: Remove _initialize_xcoffread prototype.
4079 * xml-support.c: Remove _initialize_xml_support prototype.
4080 * xstormy16-tdep.c: Remove _initialize_xstormy16_tdep prototype.
4081 * xtensa-linux-nat.c: Remove _initialize_xtensa_linux_nat
4082 prototype.
4083 * xtensa-linux-tdep.c: Remove _initialize_xtensa_linux_tdep
4084 prototype.
4085 * xtensa-tdep.c: Remove _initialize_xtensa_tdep prototype.
4086
a611b5cb
KS
40872017-09-08 Keith Seitz <keiths@redhat.com>
4088
4089 * dwarf2read.c (struct field_info) <fnfields>: Remove unused
4090 field.
4091
469412dd
CW
40922017-09-08 Christoph Weinmann <christoph.t.weinmann@intel.com>
4093
4094 * f-valprint.c (f_val_print): Remove check for one byte
4095 sized integers. Remove printing of character type.
4096
a5ad232b
FP
40972017-09-08 Frank Penczek <frank.penczek@intel.com>
4098 Christoph Weinmann <christoph.t.weinmann@intel.com>
4099 Bernhard Heckel <bernhard.heckel@intel.com>
4100
4101 * f-typeprint.c (f_type_print_base): Use fprintfi_filtered
4102 to maintain proper indentation when printing pointers/refs.
4103
e5014227
JB
41042017-09-07 Joel Brobecker <brobecker@adacore.com>
4105
4106 GDB 8.0.1 released.
4107
63c99141
JB
41082017-09-07 Joel Brobecker <brobecker@adacore.com>
4109
4110 * NEWS (Changes in GDB 7.11): Remove entry for QStartupWithShell.
4111
69c1e056
TT
41122017-09-05 Tom Tromey <tom@tromey.com>
4113
4114 * parse.c (funcall_chain): Now a std::vector.
4115 (start_arglist, end_arglist): Simplify.
4116 (free_funcalls): Remove.
4117 (parse_exp_in_context_1): Remove cleanup.
4118
fef704bf
TT
41192017-09-05 Tom Tromey <tom@tromey.com>
4120
4121 * go-exp.y (go_parse): Don't create a cleanup.
4122
5613c585
TT
41232017-09-05 Tom Tromey <tom@tromey.com>
4124
4125 * d-exp.y (PrimaryExpression): Use std::string.
4126 (d_parse): Don't create a cleanup.
4127
eae49211
TT
41282017-09-05 Tom Tromey <tom@tromey.com>
4129
4130 * utils.c (do_clear_parser_state): Remove.
4131 (make_cleanup_clear_parser_state): Remove.
4132 * p-exp.y (pascal_parse): Use scoped_restore.
4133 * m2-exp.y (m2_parse): Use scoped_restore.
4134 * f-exp.y (f_parse): Use scoped_restore.
4135 * d-exp.y (d_parse): Use scoped_restore.
4136 * c-exp.y (c_parse): Use scoped_restore.
4137 * ada-exp.y (ada_parse): Use scoped_restore.
4138 * utils.h (make_cleanup_clear_parser_state): Remove.
4139
73b9be8b
KS
41402017-09-06 Keith Seitz <keiths@redhat.com>
4141
4142 * dwarf2read.c (dw2_linkage_name_attr): New function.
4143 (dw2_linkage_name): New function.
4144 (dwarf2_compute_name, dwarf2_physname, read_call_site_scope)
4145 (guess_full_die_structure_name, dwarf2_name): Use dw2_linkage_name.
4146 (anonymous_struct_prefix, dwarf2_name): Use dw2_linkage_name_attr.
4147
a102602b
KR
41482017-09-06 Kamil Rytarowski <n54@gmx.com>
4149
4150 * config/djgpp/djconfig.sh: Correct shell portability issue.
4151
28ad437d
KR
41522017-09-06 Kamil Rytarowski <n54@gmx.com>
4153
4154 * configure.nat: Define HAVE_NATIVE_GCORE_HOST on NetBSD.
4155
351787dd
JB
41562017-09-06 John Baldwin <jhb@FreeBSD.org>
4157
4158 * Makefile.in (ALLDEPFILES): Add mips-fbsd-nat.c.
4159 * NEWS: Mention new FreeBSD/mips native configuration.
4160 * configure.host: Add aarch64*-*-freebsd*.
4161 * configure.nat: Likewise.
4162 * aarch64-fbsd-nat.c: New file.
4163
c0f84956
JB
41642017-09-06 John Baldwin <jhb@FreeBSD.org>
4165
4166 * Makefile.in (ALL_64_TARGET_OBS): Add aarch64-fbsd-tdep.o.
4167 (ALLDEPFILES): Add aarch64-fbsd-tdep.c.
4168 * NEWS: Mention new FreeBSD/aarch64 target.
4169 * configure.tgt: Add aarch64*-*-freebsd*.
4170 * aarch64-fbsd-tdep.c: New file.
4171 * aarch64-fbsd-tdep.h: New file.
4172
7610297a
KR
41732017-09-06 Kamil Rytarowski <n54@gmx.com>
4174
4175 * MAINTAINERS (Write After Approval): Add Kamil Rytarowski.
4176
fbd1b771
JK
41772017-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
4178
4179 * parse.c (find_minsym_type_and_address): Don't relocate addresses
4180 of TLS symbols.
4181
5ca79eae
PW
41822017-09-05 Philippe Waroquiers <philippe.waroquiers@skynet.be>
4183
4184 * objfiles.c (get_objfile_bfd_data): Remove useless obstack_init
4185 call.
4186
bf93d7ba
SM
41872017-09-05 Simon Marchi <simon.marchi@ericsson.com>
4188
4189 * infrun.c (follow_exec): Call add_thread after
4190 target_find_description.
4191
1bb7c059
SM
41922017-09-05 Simon Marchi <simon.marchi@ericsson.com>
4193
4194 * infrun.c (handle_inferior_event_1): When exec'ing, read
4195 stop_pc after follow_exec.
4196
fc809827
SM
41972017-09-05 Simon Marchi <simon.marchi@ericsson.com>
4198
4199 * remote.c (process_g_packet): Update error message.
4200
d2fcdd85
YQ
42012017-09-05 Yao Qi <yao.qi@linaro.org>
4202
4203 * configure.tgt (gdb_target_obs): Add i386.o for x86_64-*
4204 targets.
4205
e69570ee
PA
42062017-09-05 Pedro Alves <palves@redhat.com>
4207
4208 * eval.c (eval_call, evaluate_funcall): New functions, factored
4209 out from ...
4210 (evaluate_subexp_standard): ... this.
4211
22916b07
YQ
42122017-09-05 Yao Qi <yao.qi@linaro.org>
4213
4214 * amd64-tdep.c (amd64_target_description): Create target
4215 descriptions.
4216 (_initialize_amd64_tdep): Don't call functions
4217 initialize_tdesc_amd64_*. Add self tests.
4218 * arch/amd64.c (amd64_create_target_description): Add parameter
4219 is_linux. Call set_tdesc_osabi if is_linux is true.
4220 * arch/amd64.h (amd64_create_target_description): Update the
4221 declaration.
4222 * arch/i386.c (i386_create_target_description): Add parameter
4223 is_linux. Call set_tdesc_osabi if is_linux is true.
4224 * arch/i386.h (i386_create_target_description): Update
4225 declaration.
4226 * configure.tgt: Add i386.o to gdb_target_obs.
4227 * features/Makefile (XMLTOC): Remove i386/*.xml.
4228 * features/i386/amd64-avx-avx512.c: Remove.
4229 * features/i386/amd64-avx-mpx-avx512-pku.c: Remove.
4230 * features/i386/amd64-avx-mpx.c: Remove.
4231 * features/i386/amd64-avx.c: Remove.
4232 * features/i386/amd64-mpx.c: Remove.
4233 * features/i386/amd64.c: Remove.
4234 * features/i386/i386-avx-avx512.c: Remove.
4235 * features/i386/i386-avx-mpx-avx512-pku.c: Remove.
4236 * features/i386/i386-avx-mpx.c: Remove.
4237 * features/i386/i386-avx.c: Remove.
4238 * features/i386/i386-mmx.c: Remove.
4239 * features/i386/i386-mpx.c: Remove.
4240 * features/i386/i386.c: Remove.
4241 * i386-tdep.c: Don't include features/i386/i386*.c., include
4242 target-descriptions.h and arch/i386.h.
4243 (i386_target_description): Create target descriptions.
4244 (i386_gdbarch_init): Don't call initialize_tdesc_i386_*
4245 functions. Do self tests.
4246
0854b7b1
YQ
42472017-09-05 Yao Qi <yao.qi@linaro.org>
4248
4249 * features/Makefile (XMLTOC): Remove i386/amd64XXX-linux.xml.
4250 * features/i386/amd64-avx-avx512-linux.c: Removed.
4251 * features/i386/amd64-avx-linux.c: Removed.
4252 * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Removed.
4253 * features/i386/amd64-avx-mpx-linux.c: Removed.
4254 * features/i386/amd64-linux.c: Removed.
4255 * features/i386/amd64-mpx-linux.c: Removed.
4256 * features/i386/x32-avx-avx512-linux.c: Removed.
4257 * features/i386/x32-avx-linux.c: Removed.
4258 * features/i386/x32-linux.c: Removed.
4259
b4570e4b
YQ
42602017-09-05 Yao Qi <yao.qi@linaro.org>
4261
4262 * amd64-linux-tdep.c: Include arch/amd64.h. Don't include
4263 features/i386/*.c.
4264 (amd64_linux_read_description): Call
4265 amd64_create_target_description.
4266 * arch/amd64.c: New file.
4267 * arch/amd64.h: New file.
4268 * configure.tgt (x86_64-*-linux*): Append amd64.o.
4269 * Makefile.in (ALL_64_TARGET_OBS): Append amd64.o.
4270
6c73f67f
YQ
42712017-09-05 Yao Qi <yao.qi@linaro.org>
4272
4273 * amd64-linux-tdep.c: Don't include amd64-XXX-linux and
4274 x32-XXX-linux.c. Include 64bit-XX.c and x32-XX.c.
4275 (amd64_linux_read_description): Create target descriptions.
4276 (_initialize_amd64_linux_tdep): Don't call initialize_tdesc_XXX
4277 functions. Add unit tests.
4278 * features/Makefile (FEATURE_XMLFILES): Append 64bit-XXX.xml and
4279 x32-core.xml.
4280 * features/i386/64bit-avx.c: Generated.
4281 * features/i386/64bit-avx512.c: Generated.
4282 * features/i386/64bit-core.c: Generated.
4283 * features/i386/64bit-linux.c: Generated.
4284 * features/i386/64bit-mpx.c: Generated.
4285 * features/i386/64bit-pkeys.c: Generated.
4286 * features/i386/64bit-segments.c: Generated.
4287 * features/i386/64bit-sse.c: Generated.
4288 * features/i386/x32-core.c: Generated.
4289 * target-descriptions.c (maint_print_c_tdesc_cmd): Print feature
4290 c files for amd64-linux and x32-linux.
4291
9d3d478b
YQ
42922017-09-05 Yao Qi <yao.qi@linaro.org>
4293
4294 * amd64-linux-tdep.c (amd64_linux_read_description): New
4295 function.
4296 (amd64_linux_core_read_description): Call
4297 amd64_linux_read_description.
4298 (amd64_linux_init_abi): Likewise.
4299 (amd64_x32_linux_init_abi): Likewise.
4300 * amd64-linux-tdep.h (amd64_linux_read_description): Declare.
4301 * x86-linux-nat.c (x86_linux_read_description): Call
4302 amd64_linux_read_description.
4303
b9f1d50f
YQ
43042017-09-05 Yao Qi <yao.qi@linaro.org>
4305
4306 * amd64-linux-tdep.c (amd64_linux_core_read_description): Update
4307 comments.
4308
188c9e6d
YQ
43092017-09-05 Yao Qi <yao.qi@linaro.org>
4310
4311 * features/Makefile (XMLTOC): Remove i386/i386-XX-linux.xml.
4312 * features/i386/i386-avx-avx512-linux.c: Remove.
4313 * features/i386/i386-avx-linux.c: Remove.
4314 * features/i386/i386-avx-mpx-avx512-pku-linux.c: Remove.
4315 * features/i386/i386-avx-mpx-linux.c: Remove.
4316 * features/i386/i386-linux.c: Remove.
4317 * features/i386/i386-mmx-linux.c: Remove.
4318 * features/i386/i386-mpx-linux.c: Remove.
4319
5f035c07
YQ
43202017-09-05 Yao Qi <yao.qi@linaro.org>
4321
4322 * Makefile.in (ALL_TARGET_OBS): Add i386.o.
4323 (SFILES): Add arch/i386.c.
4324 (HFILES_NO_SRCDIR): Add arch/i386.h.
4325 * arch/i386.c: New file.
4326 * arch/i386.h: New file.
4327 * arch/tdesc.h (allocate_target_description): Declare.
4328 (set_tdesc_architecture): Declare.
4329 (set_tdesc_osabi): Declare.
4330 * configure.tgt (i[34567]86-*-linux*): Add i386.o.
4331 * i386-linux-tdep.c: Don't include ../features/i386/32bit-XXX.c.
4332 include arch/i386.h.
4333 (i386_linux_read_description): Remove code and call
4334 i386_create_target_description.
4335 (set_tdesc_architecture): New function.
4336 (set_tdesc_osabi): New function.
4337 * target-descriptions.h (allocate_target_description): Remove.
4338
0abe8a89
YQ
43392017-09-05 Yao Qi <yao.qi@linaro.org>
4340
4341 * arch/tdesc.h (tdesc_create_feature): Add an argument xml.
4342 * target-descriptions.c (tdesc_create_feature): Likewise, and
4343 adjust code.
4344 * features/i386/32bit-avx.c: Re-generated.
4345 * features/i386/32bit-avx512.c: Re-generated.
4346 * features/i386/32bit-core.c: Re-generated.
4347 * features/i386/32bit-linux.c: Re-generated.
4348 * features/i386/32bit-mpx.c: Re-generated.
4349 * features/i386/32bit-pkeys.c: Re-generated.
4350 * features/i386/32bit-sse.c: Re-generated.
4351
0a188386
YQ
43522017-09-05 Yao Qi <yao.qi@linaro.org>
4353
4354 * regformats/regdef.h (struct reg): Override operator == and !=.
4355
f49ff000
YQ
43562017-09-05 Yao Qi <yao.qi@linaro.org>
4357
4358 * arch/tdesc.h: New file.
4359 * regformats/regdat.sh: Generate code using tdesc_create_reg.
4360 * target-descriptions.c: Update comments.
4361 * target-descriptions.h: Include "arch/tdesc.h". Remove the
4362 declarations.
4363 * features/i386/32bit-avx.c: Re-generated.
4364 * features/i386/32bit-avx512.c: Re-generated.
4365 * features/i386/32bit-core.c: Re-generated.
4366 * features/i386/32bit-linux.c: Re-generated.
4367 * features/i386/32bit-mpx.c: Re-generated.
4368 * features/i386/32bit-pkeys.c: Re-generated.
4369 * features/i386/32bit-sse.c: Re-generated.
4370
f7000548
YQ
43712017-09-05 Yao Qi <yao.qi@linaro.org>
4372
4373 * regformats/regdat.sh: Update generated code.
4374
c9a5e2a5
YQ
43752017-09-05 Yao Qi <yao.qi@linaro.org>
4376
4377 * regformats/regdat.sh: Adjust code order.
4378
d6b687ac
SM
43792017-09-05 Simon Marchi <simon.marchi@ericsson.com>
4380
4381 * expprint.c (dump_subexp_body_standard): Use constant format
4382 string in fprintf_filtered call.
4383
a379bfd0
JB
43842017-09-04 John Baldwin <jhb@FreeBSD.org>
4385
4386 * configure.nat: Add "x86-nat.o x86-dregs.o" for NetBSD/amd64 and
4387 NetBSD/i386.
4388 * x86-bsd-nat.c [!DBREG_DRX && __NetBSD__]: Define DBREG_DRX.
4389
f7efc967
JB
43902017-09-04 John Baldwin <jhb@FreeBSD.org>
4391
4392 * bsd-kvm.o: Make <sys/user.h> conditional on HAVE_SYS_USER_H.
4393
c49fbc6c
JB
43942017-09-04 John Baldwin <jhb@FreeBSD.org>
4395
4396 * bsd-kvm.o: Define _KMEMUSER.
4397 * configure.ac: Define _KMEMUSER when checking for "struct lwp".
4398 * configure: Regenerate.
4399
26562e73
JB
44002017-09-04 John Baldwin <jhb@FreeBSD.org>
4401
4402 * amd64-fbsd-nat.c: Add include of "x86-xstate.h".
4403 * i386-fbsd-nat.c: Likewise.
4404
31cf1487
JB
44052017-09-04 John Baldwin <jhb@FreeBSD.org>
4406
4407 * unittests/array-view-selftests.c: Add include of <array>.
4408
5b9f8a7c
JB
44092017-09-04 John Baldwin <jhb@FreeBSD.org>
4410
4411 * spu-tdep.c (flush_ea_cache): Add missing argument to
4412 call_function_by_hand.
4413
d69cf9b2
PA
44142017-09-04 Pedro Alves <palves@redhat.com>
4415
4416 * NEWS (Safer support for debugging with no debug info): New.
4417
3693fdb3
PA
44182017-09-04 Pedro Alves <palves@redhat.com>
4419
4420 * c-exp.y (function_method, function_method_void): Add current
4421 instance flags to TYPE_INSTANCE.
4422 * dwarf2read.c (check_modifier): New.
4423 (compute_delayed_physnames): Assert that only C++ adds delayed
4424 physnames. Mark fn_fields as const/volatile depending on
4425 physname.
4426 * eval.c (make_params): New type_instance_flags parameter. Use
4427 it as the new type's instance flags.
4428 (evaluate_subexp_standard) <TYPE_INSTANCE>: Extract the instance
4429 flags element and pass it to make_params.
4430 * expprint.c (print_subexp_standard) <TYPE_INSTANCE>: Handle
4431 instance flags element.
4432 (dump_subexp_body_standard) <TYPE_INSTANCE>: Likewise.
4433 * gdbtypes.h: Include "enum-flags.h".
4434 (type_instance_flags): New enum-flags type.
4435 (TYPE_CONST, TYPE_VOLATILE, TYPE_RESTRICT, TYPE_ATOMIC)
4436 (TYPE_CODE_SPACE, TYPE_DATA_SPACE): Return boolean.
4437 * parse.c (operator_length_standard) <TYPE_INSTANCE>: Adjust.
4438 (follow_type_instance_flags): New function.
4439 (operator_check_standard) <TYPE_INSTANCE>: Adjust.
4440 * parser-defs.h (follow_type_instance_flags): Declare.
4441 * valops.c (value_struct_elt_for_reference): const/volatile must
4442 match too.
4443
e68cb8e0
PA
44442017-09-04 Pedro Alves <palves@redhat.com>
4445
4446 * cp-namespace.c (cp_search_static_and_baseclasses): Handle
4447 function/method scopes; lookup the nested name as a function local
4448 static variable.
4449
858be34c
PA
44502017-09-04 Pedro Alves <palves@redhat.com>
4451
4452 (%type <voidval>): Add function_method.
4453 * c-exp.y (exp): New production for calls with no arguments.
4454 (function_method, function_method_void_or_typelist): New
4455 productions.
4456 (exp): New production for "method()::static_var".
4457 * eval.c (evaluate_subexp_standard): Handle OP_FUNC_STATIC_VAR.
4458 * expprint.c (print_subexp_standard, dump_subexp_body_standard):
4459 Handle OP_FUNC_STATIC_VAR.
4460 * parse.c (operator_length_standard):
4461 Handle OP_FUNC_STATIC_VAR.
4462
dd5901a6
PA
44632017-09-04 Pedro Alves <palves@redhat.com>
4464
4465 * eval.c (evaluate_subexp_standard): Remove UNOP_MEMVAL_TLS
4466 handling.
4467 * expprint.c (print_subexp_standard, dump_subexp_body_standard):
4468 Ditto.
4469 * parse.c (operator_length_standard, operator_check_standard):
4470 Ditto.
4471 * std-operator.def (UNOP_MEMVAL_TLS): Delete.
4472
46a4882b
PA
44732017-09-04 Pedro Alves <palves@redhat.com>
4474
4475 * ax-gdb.c: Include "typeprint.h".
4476 (gen_expr_for_cast): New function.
4477 (gen_expr) <OP_CAST, OP_CAST_TYPE>: Use it.
4478 <OP_VAR_VALUE, OP_MSYM_VAR_VALUE>: Error out if the variable's
4479 type is unknown.
4480 * dwarf2read.c (new_symbol_full): Fallback to int instead of
4481 nodebug_data_symbol.
4482 * eval.c: Include "typeprint.h".
4483 (evaluate_subexp_standard) <OP_VAR_VALUE, OP_VAR_MSYM_VALUE>:
4484 Error out if symbol has unknown type.
4485 <UNOP_CAST, UNOP_CAST_TYPE>: Common bits factored out to
4486 evaluate_subexp_for_cast.
4487 (evaluate_subexp_for_address, evaluate_subexp_for_sizeof): Handle
4488 OP_VAR_MSYM_VALUE.
4489 (evaluate_subexp_for_cast): New function.
4490 * gdbtypes.c (init_nodebug_var_type): New function.
4491 (objfile_type): Use it to initialize types of variables with no
4492 debug info.
4493 * typeprint.c (error_unknown_type): New.
4494 * typeprint.h (error_unknown_type): New declaration.
4495 * compile/compile-c-types.c (convert_type_basic): Handle
4496 TYPE_CODE_ERROR; warn and fallback to int for variables with
4497 unknown type.
4498
fe13dfec
PA
44992017-09-04 Pedro Alves <palves@redhat.com>
4500
4501 * eval.c (evaluate_var_value): New function, factored out from ...
4502 (evaluate_subexp_standard): ... here.
4503
d008ee21
PA
45042017-09-04 Pedro Alves <palves@redhat.com>
4505
4506 * eval.c (evaluate_subexp_standard) <UNOP_COMPLEMENT, UNOP_ADDR>:
4507 Remove useless assignments to 'op'.
4508
827d0c51
PA
45092017-09-04 Pedro Alves <palves@redhat.com>
4510
4511 * eval.c (eval_skip_value): New function.
4512 (evaluate_subexp_standard): Use it.
4513
2c5a2be1
PA
45142017-09-04 Pedro Alves <palves@redhat.com>
4515
4516 * eval.c (evaluate_subexp_standard): <OP_FUNCALL>: Extract
4517 function name from symbol/minsym and pass it to
4518 error_call_unknown_return_type.
4519
74ea4be4
PA
45202017-09-04 Pedro Alves <palves@redhat.com>
4521
4522 * ada-lang.c (resolve_subexp): Handle OP_VAR_MSYM_VALUE.
4523 * ax-gdb.c (gen_msym_var_ref): New function.
4524 (gen_expr): Handle OP_VAR_MSYM_VALUE.
4525 * eval.c (evaluate_var_msym_value): New function.
4526 * eval.c (evaluate_subexp_standard): Handle OP_VAR_MSYM_VALUE.
4527 <OP_FUNCALL>: Extract function name from symbol/minsym and pass it
4528 to call_function_by_hand.
4529 * expprint.c (print_subexp_standard, dump_subexp_body_standard):
4530 Handle OP_VAR_MSYM_VALUE.
4531 (union exp_element) <msymbol>: New field.
4532 * minsyms.h (struct type): Forward declare.
4533 (find_minsym_type_and_address): Declare.
4534 * parse.c (write_exp_elt_msym): New function.
4535 (write_exp_msymbol): Delete, refactored as ...
4536 (find_minsym_type_and_address): ... this new function.
4537 (write_exp_msymbol): Reimplement using OP_VAR_MSYM_VALUE.
4538 (operator_length_standard, operator_check_standard): Handle
4539 OP_VAR_MSYM_VALUE.
4540 * std-operator.def (OP_VAR_MSYM_VALUE): New.
4541
7022349d
PA
45422017-09-04 Pedro Alves <palves@redhat.com>
4543
4544 * ada-lang.c (ada_evaluate_subexp) <TYPE_CODE_FUNC>: Don't handle
4545 TYPE_GNU_IFUNC specially here. Throw error if return type is
4546 unknown.
4547 * ada-typeprint.c (print_func_type): Handle functions with unknown
4548 return type.
4549 * c-typeprint.c (c_type_print_base): Handle functions and methods
4550 with unknown return type.
4551 * compile/compile-c-symbols.c (convert_symbol_bmsym)
4552 <mst_text_gnu_ifunc>: Use nodebug_text_gnu_ifunc_symbol.
4553 * compile/compile-c-types.c: Include "objfiles.h".
4554 (convert_func): For functions with unknown return type, warn and
4555 default to int.
4556 * compile/compile-object-run.c (compile_object_run): Adjust call
4557 to call_function_by_hand_dummy.
4558 * elfread.c (elf_gnu_ifunc_resolve_addr): Adjust call to
4559 call_function_by_hand.
4560 * eval.c (evaluate_subexp_standard): Adjust calls to
4561 call_function_by_hand. Handle functions and methods with unknown
4562 return type. Pass expect_type to call_function_by_hand.
4563 * f-typeprint.c (f_type_print_base): Handle functions with unknown
4564 return type.
4565 * gcore.c (call_target_sbrk): Adjust call to
4566 call_function_by_hand.
4567 * gdbtypes.c (objfile_type): Leave nodebug text symbol with NULL
4568 return type instead of int. Make nodebug_text_gnu_ifunc_symbol be
4569 an integer address type instead of nodebug.
4570 * guile/scm-value.c (gdbscm_value_call): Adjust call to
4571 call_function_by_hand.
4572 * infcall.c (error_call_unknown_return_type): New function.
4573 (call_function_by_hand): New "default_return_type" parameter.
4574 Pass it down.
4575 (call_function_by_hand_dummy): New "default_return_type"
4576 parameter. Use it instead of defaulting to int. If there's no
4577 default and the return type is unknown, throw an error. If
4578 there's a default return type, and the called function has no
4579 debug info, then assume the function is prototyped.
4580 * infcall.h (call_function_by_hand, call_function_by_hand_dummy):
4581 New "default_return_type" parameter.
4582 (error_call_unknown_return_type): New declaration.
4583 * linux-fork.c (call_lseek): Cast return type of lseek.
4584 (inferior_call_waitpid, checkpoint_command): Adjust calls to
4585 call_function_by_hand.
4586 * linux-tdep.c (linux_infcall_mmap, linux_infcall_munmap): Adjust
4587 calls to call_function_by_hand.
4588 * m2-typeprint.c (m2_procedure): Handle functions with unknown
4589 return type.
4590 * objc-lang.c (lookup_objc_class, lookup_child_selector)
4591 (value_nsstring, print_object_command): Adjust calls to
4592 call_function_by_hand.
4593 * p-typeprint.c (pascal_type_print_varspec_prefix): Handle
4594 functions with unknown return type.
4595 (pascal_type_print_func_varspec_suffix): New function.
4596 (pascal_type_print_varspec_suffix) <TYPE_CODE_FUNC,
4597 TYPE_CODE_METHOD>: Use it.
4598 * python/py-value.c (valpy_call): Adjust call to
4599 call_function_by_hand.
4600 * rust-lang.c (rust_evaluate_funcall): Adjust call to
4601 call_function_by_hand.
4602 * valarith.c (value_x_binop, value_x_unop): Adjust calls to
4603 call_function_by_hand.
4604 * valops.c (value_allocate_space_in_inferior): Adjust call to
4605 call_function_by_hand.
4606 * typeprint.c (type_print_unknown_return_type): New function.
4607 * typeprint.h (type_print_unknown_return_type): New declaration.
4608
54990598
PA
46092017-09-04 Pedro Alves <palves@redhat.com>
4610
4611 * gdbtypes.c (lookup_function_type_with_arguments): Mark function
4612 types with more than one parameter as prototyped.
4613
9a24775b
PA
46142017-09-04 Pedro Alves <palves@redhat.com>
4615
4616 * cli/cli-cmds.c (print_disassembly, disassemble_current_function)
4617 (disassemble_command): Use gdb_disassembly_flags instead of bare
4618 int.
4619 * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn)
4620 (dump_insns, do_mixed_source_and_assembly_deprecated)
4621 (do_mixed_source_and_assembly, do_assembly_only, gdb_disassembly):
4622 Use gdb_disassembly_flags instead of bare int.
4623 * disasm.h (DISASSEMBLY_SOURCE_DEPRECATED, DISASSEMBLY_RAW_INSN)
4624 (DISASSEMBLY_OMIT_FNAME, DISASSEMBLY_FILENAME)
4625 (DISASSEMBLY_OMIT_PC, DISASSEMBLY_SOURCE)
4626 (DISASSEMBLY_SPECULATIVE): No longer macros. Instead they're...
4627 (enum gdb_disassembly_flag): ... values of this new enumeration.
4628 (gdb_disassembly_flags): Define.
4629 (gdb_disassembly)
4630 (gdb_pretty_print_disassembler::pretty_print_insn): Use it.
4631 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Use
4632 gdb_disassembly_flags instead of bare int.
4633 * record-btrace.c (btrace_insn_history)
4634 (record_btrace_insn_history, record_btrace_insn_history_range)
4635 (record_btrace_insn_history_from): Use gdb_disassembly_flags
4636 instead of bare int.
4637 * record.c (get_insn_history_modifiers, cmd_record_insn_history):
4638 Use gdb_disassembly_flags instead of bare int.
4639 * target-debug.h (target_debug_print_gdb_disassembly_flags):
4640 Define.
4641 * target-delegates.c: Regenerate.
4642 * target.c (target_insn_history, target_insn_history_from)
4643 (target_insn_history_range): Use gdb_disassembly_flags instead of
4644 bare int.
4645 * target.h: Include "disasm.h".
4646 (struct target_ops) <to_insn_history, to_insn_history_from,
4647 to_insn_history_range>: Use gdb_disassembly_flags instead of bare
4648 int.
4649 (target_insn_history, target_insn_history_from)
4650 (target_insn_history_range): Use gdb_disassembly_flags instead of
4651 bare int.
4652
80a65e9b
SM
46532017-09-04 Simon Marchi <simon.marchi@ericsson.com>
4654
4655 * cli/cli-script.c (build_command_line): For if/while commands,
4656 check whether args is empty.
4657
6b66338c
SM
46582017-09-04 Simon Marchi <simon.marchi@ericsson.com>
4659
4660 * cli/cli-script.h (enum misc_command_type): Move from defs.h.
4661 (enum command_control_type): Likewise.
4662 (struct command_line): Likewise.
4663 (free_command_lines): Likewise.
4664 (struct command_lines_deleter): Likewise.
4665 (command_line_up): Likewise.
4666 (read_command_lines): Likewise.
4667 (read_command_lines_1): Likewise.
4668 * defs.h (enum misc_command_type): Move to cli/cli-script.h.
4669 (enum command_control_type): Likewise.
4670 (struct command_line): Likewise.
4671 (free_command_lines): Likewise.
4672 (struct command_lines_deleter): Likewise.
4673 (command_line_up): Likewise.
4674 (read_command_lines): Likewise.
4675 (read_command_lines_1): Likewise.
4676 * breakpoint.h: Include cli/cli-script.h.
4677 * extension-priv.h: Likewise.
4678 * gdbcmd.h: Likewise.
4679
51abb421
PA
46802017-09-04 Pedro Alves <palves@redhat.com>
4681
4682 * ada-lang.c (is_known_support_routine): Move sal declaration to
4683 where it is initialized.
4684 * breakpoint.c (create_internal_breakpoint, init_catchpoint)
4685 (parse_breakpoint_sals, decode_static_tracepoint_spec)
4686 (clear_command, update_static_tracepoint): Remove init_sal
4687 references. Move declarations closer to initializations.
4688 * cli/cli-cmds.c (list_command): Move sal declarations closer to
4689 initializations.
4690 * elfread.c (elf_gnu_ifunc_resolver_stop): Remove init_sal
4691 references. Move sal declarations closer to initializations.
4692 * frame.c (find_frame_sal): Return a symtab_and_line via function
4693 return instead of output parameter. Remove init_sal references.
4694 * frame.h (find_frame_sal): Return a symtab_and_line via function
4695 return instead of output parameter.
4696 * guile/scm-frame.c (gdbscm_frame_sal): Adjust.
4697 * guile/scm-symtab.c (stscm_make_sal_smob): Use in-place new
4698 instead of memset.
4699 (gdbscm_find_pc_line): Remove init_sal reference.
4700 * infcall.c (call_function_by_hand_dummy): Remove init_sal
4701 references. Move declarations closer to initializations.
4702 * infcmd.c (set_step_frame): Update. Move declarations closer to
4703 initializations.
4704 (finish_backward): Remove init_sal references. Move declarations
4705 closer to initializations.
4706 * infrun.c (process_event_stop_test, handle_step_into_function)
4707 (insert_hp_step_resume_breakpoint_at_frame)
4708 (insert_step_resume_breakpoint_at_caller): Likewise.
4709 * linespec.c (create_sals_line_offset, decode_digits_ordinary)
4710 (symbol_to_sal): Likewise.
4711 * probe.c (parse_probes_in_pspace): Remove init_sal reference.
4712 * python/py-frame.c (frapy_find_sal): Move sal declaration closer
4713 to its initialization.
4714 * reverse.c (save_bookmark_command): Use new/delete. Remove
4715 init_sal references. Move declarations closer to initializations.
4716 * source.c (get_current_source_symtab_and_line): Remove brace
4717 initialization.
4718 (set_current_source_symtab_and_line): Now takes the sal by const
4719 reference. Remove brace initialization.
4720 (line_info): Remove init_sal reference.
4721 * source.h (set_current_source_symtab_and_line): Now takes a
4722 symtab_and_line via const reference.
4723 * stack.c (set_current_sal_from_frame): Adjust.
4724 (print_frame_info): Adjust.
4725 (get_last_displayed_sal): Return the sal via function return
4726 instead of via output parameter. Simplify.
4727 (frame_info): Adjust.
4728 * stack.h (get_last_displayed_sal): Return the sal via function
4729 return instead of via output parameter.
4730 * symtab.c (init_sal): Delete.
4731 (find_pc_sect_line): Remove init_sal references. Move
4732 declarations closer to initializations.
4733 (find_function_start_sal): Remove init_sal references. Move
4734 declarations closer to initializations.
4735 * symtab.h (struct symtab_and_line): In-class initialize all
4736 fields.
4737 * tracepoint.c (set_traceframe_context)
4738 (print_one_static_tracepoint_marker): Remove init_sal references.
4739 Move declarations closer to initializations.
4740 * tui/tui-disasm.c (tui_show_disassem_and_update_source): Adjust.
4741 * tui/tui-stack.c (tui_show_frame_info): Adjust. Move
4742 declarations closer to initializations.
4743 * tui/tui-winsource.c (tui_update_source_window_as_is): Remove
4744 init_sal references. Adjust.
4745
6c5b2ebe
PA
47462017-09-04 Pedro Alves <palves@redhat.com>
4747
4748 * ax-gdb.c (agent_command_1): Use range-for.
4749 * break-catch-throw.c (re_set_exception_catchpoint): Update.
4750 * breakpoint.c: Include "common/array-view.h".
4751 (init_breakpoint_sal, create_breakpoint_sal): Change sals
4752 parameter from struct symtabs_and_lines to
4753 array_view<symtab_and_line>. Adjust. Use range-for. Update.
4754 (breakpoint_sals_to_pc): Change sals parameter from struct
4755 symtabs_and_lines to std::vector reference.
4756 (check_fast_tracepoint_sals): Change sals parameter from struct
4757 symtabs_and_lines to std::array_view. Use range-for.
4758 (decode_static_tracepoint_spec): Return a std::vector instead of
4759 symtabs_and_lines. Update.
4760 (create_breakpoint): Update.
4761 (break_range_command, until_break_command, clear_command): Update.
4762 (base_breakpoint_decode_location, bkpt_decode_location)
4763 (bkpt_probe_create_sals_from_location)
4764 (bkpt_probe_decode_location, tracepoint_decode_location)
4765 (tracepoint_probe_decode_location)
4766 (strace_marker_create_sals_from_location): Return a std::vector
4767 instead of symtabs_and_lines.
4768 (strace_marker_create_breakpoints_sal): Update.
4769 (strace_marker_decode_location): Return a std::vector instead of
4770 symtabs_and_lines. Update.
4771 (update_breakpoint_locations): Change struct symtabs_and_lines
4772 parameters to gdb::array_view. Adjust.
4773 (location_to_sals): Return a std::vector instead of
4774 symtabs_and_lines. Update.
4775 (breakpoint_re_set_default): Use std::vector instead of struct
4776 symtabs_and_lines.
4777 (decode_location_default): Return a std::vector instead of
4778 symtabs_and_lines. Update.
4779 * breakpoint.h: Include "common/array-view.h".
4780 (struct breakpoint_ops) <decode_location>: Now returns a
4781 std::vector instead of returning a symtabs_and_lines via output
4782 parameter.
4783 (update_breakpoint_locations): Change sals parameters to use
4784 gdb::array_view.
4785 * cli/cli-cmds.c (edit_command, list_command): Update to use
4786 std::vector and gdb::array_view.
4787 (ambiguous_line_spec): Adjust to use gdb::array_view and
4788 range-for.
4789 (compare_symtabs): Rename to ...
4790 (cmp_symtabs): ... this. Change parameters to symtab_and_line
4791 const reference and adjust.
4792 (filter_sals): Rewrite using std::vector and standard algorithms.
4793 * elfread.c (elf_gnu_ifunc_resolver_return_stop): Simplify.
4794 (jump_command): Update to use std::vector.
4795 * linespec.c (struct linespec_state) <canonical_names>: Update
4796 comment.
4797 (add_sal_to_sals_basic): Delete.
4798 (add_sal_to_sals, filter_results, convert_results_to_lsals)
4799 (decode_line_2, create_sals_line_offset)
4800 (convert_address_location_to_sals, convert_linespec_to_sals)
4801 (convert_explicit_location_to_sals, parse_linespec)
4802 (event_location_to_sals, decode_line_full, decode_line_1)
4803 (decode_line_with_current_source)
4804 (decode_line_with_last_displayed, decode_objc)
4805 (decode_digits_list_mode, decode_digits_ordinary, minsym_found)
4806 (linespec_result::~linespec_result): Adjust to use std::vector
4807 instead of symtabs_and_lines.
4808 * linespec.h (linespec_sals::sals): Now a std::vector.
4809 (struct linespec_result): Use std::vector, bool, and in-class
4810 initialization.
4811 (decode_line_1, decode_line_with_current_source)
4812 (decode_line_with_last_displayed): Return std::vector.
4813 * macrocmd.c (info_macros_command): Use std::vector.
4814 * mi/mi-main.c (mi_cmd_trace_find): Use std::vector.
4815 * probe.c (parse_probes_in_pspace, parse_probes): Adjust to use
4816 std::vector.
4817 * probe.h (parse_probes): Return a std::vector.
4818 * python/python.c (gdbpy_decode_line): Use std::vector and
4819 gdb::array_view.
4820 * source.c (select_source_symtab, line_info): Use std::vector.
4821 * stack.c (func_command): Use std::vector.
4822 * symtab.h (struct symtabs_and_lines): Delete.
4823 * tracepoint.c (tfind_line_command, scope_info): Use std::vector.
4824
7c44b49c
PA
48252017-09-04 Pedro Alves <palves@redhat.com>
4826
4827 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
4828 unittests/array-view-selftests.c.
4829 (SUBDIR_UNITTESTS_OBS): Add array-view-selftests.o.
4830 * common/array-view.h: New file.
4831 * unittests/array-view-selftests.c: New file.
4832
e439fa14
PA
48332017-09-04 Pedro Alves <palves@redhat.com>
4834
4835 * cli/cli-cmds.c (edit_command): Pass message to
4836 ambiguous_line_spec.
4837 (list_command): Pass message to ambiguous_line_spec. Say
4838 "first"/"last" instead of "start" and "end" to be consistent with
4839 the manual.
4840 (ambiguous_line_spec): Add 'format' and vararg parameters. Use
4841 them to print formatted message.
4842
7525b645
PA
48432017-09-04 Pedro Alves <palves@redhat.com>
4844
4845 * btrace.c (ftrace_add_pt): Pass btrace_insn to
4846 ftrace_update_insns by reference instead of pointer.
4847
badc0020
YQ
48482017-09-04 Yao Qi <yao.qi@linaro.org>
4849
4850 * i386-go32-tdep.c: Include x86-xstate.h.
4851 (i386_go32_init_abi): Call i386_target_description.
4852 * i386-tdep.c (i386_target_description): Return tdesc_i386_mmx
4853 if xcr0 is X86_XSTATE_X87_MASK.
4854 * i386-tdep.h (tdesc_i386): Remove the declaration.
4855 (tdesc_i386_mmx): Likewise.
4856
d78bdb54
YQ
48572017-09-04 Yao Qi <yao.qi@linaro.org>
4858
4859 * i386-fbsd-tdep.c (i386fbsd_core_read_xcr0): Return
4860 X86_XSTATE_SSE_MASK instead of 0.
4861
ca1fa5ee
YQ
48622017-09-04 Yao Qi <yao.qi@linaro.org>
4863
4864 * amd64-fbsd-nat.c (amd64fbsd_read_description): Call
4865 i386_target_description.
4866 * i386-fbsd-nat.c (i386fbsd_read_description): Call
4867 i386_target_description.
4868 * i386-tdep.c (i386_gdbarch_init): Likewise.
4869
2434b019
YQ
48702017-09-04 Yao Qi <yao.qi@linaro.org>
4871
4872 * amd64-darwin-tdep.c: Include "x86-xstate.h".
4873 (x86_darwin_init_abi_64): Call amd64_target_description.
4874 * amd64-dicos-tdep.c: Likewise.
4875 * amd64-fbsd-nat.c: Likewise.
4876 * amd64-fbsd-tdep.c: Likewise.
4877 * amd64-nbsd-tdep.c: Likewise.
4878 * amd64-obsd-tdep.c: Likewise.
4879 * amd64-sol2-tdep.c: Likewise.
4880 * amd64-windows-tdep.c: Likewise.
4881 * amd64-tdep.h (tdesc_amd64): Remove the declaration.
4882
0860c437
SM
48832017-09-04 Simon Marchi <simon.marchi@ericsson.com>
4884
4885 * btrace.h (btrace_insn_s, DEF_VEC_O (btrace_insn_s)): Remove.
4886 (btrace_function) <insn>: Change type to use std::vector.
4887 * btrace.c (ftrace_debug, ftrace_call_num_insn,
4888 ftrace_find_call, ftrace_new_gap, ftrace_update_function,
4889 ftrace_update_insns, ftrace_compute_global_level_offset,
4890 btrace_stitch_bts, btrace_clear, btrace_insn_get,
4891 btrace_insn_end, btrace_insn_next, btrace_insn_prev): Adjust to
4892 change to std::vector.
4893 (ftrace_update_insns): Adjust to change to std::vector, change
4894 type of INSN parameter.
4895 (btrace_compute_ftrace_bts): Adjust call to ftrace_update_insns.
4896 * record-btrace.c (btrace_call_history_insn_range,
4897 btrace_compute_src_line_range,
4898 record_btrace_frame_prev_register): Adjust to change to
4899 std::vector.
4900 * python/py-record-btrace.c (recpy_bt_func_instructions): Adjust
4901 to change to std::vector.
4902
0638b7f9
TT
49032017-09-03 Tom Tromey <tom@tromey.com>
4904
4905 * corefile.c (reopen_exec_file): Use std::string.
4906
8f84fb0e
TT
49072017-09-03 Tom Tromey <tom@tromey.com>
4908
4909 * compile/compile.c (compile_register_name_mangled): Return
4910 std::string.
4911 * compile/compile-loc2c.c (pushf_register_address): Update.
4912 (pushf_register): Update.
4913 * compile/compile-c-types.c (convert_array): Update.
4914 * compile/compile-c-symbols.c (generate_vla_size): Update.
4915 (error_symbol_once): Use a gdb::unique_xmalloc_ptr.
4916 (symbol_substitution_name): Return a gdb::unique_xmalloc_ptr.
4917 (convert_one_symbol): Update.
4918 (generate_c_for_for_one_variable): Update.
4919 * compile/compile-c-support.c (c_get_range_decl_name): Return a
4920 std::string.
4921 (generate_register_struct): Update.
4922 * compile/compile-internal.h (c_get_range_decl_name): Return a
4923 std::string.
4924 (compile_register_name_mangled): Return std::string.
4925
18e9961f
TT
49262017-09-03 Tom Tromey <tom@tromey.com>
4927
4928 * utils.c (perror_string): Return a std::string.
4929 (throw_perror_with_name, perror_warning_with_name): Update.
4930
45343786
TT
49312017-09-03 Tom Tromey <tom@tromey.com>
4932
4933 * demangle.c (demangle_command): Use std::string,
4934 unique_xmalloc_ptr.
4935
b57af503
TT
49362017-09-03 Tom Tromey <tom@tromey.com>
4937
4938 * cli/cli-setshow.c (do_set_command): Use std::string.
4939
6eecf35f
TT
49402017-09-03 Tom Tromey <tom@tromey.com>
4941
4942 * cli/cli-cmds.c (cd_command): Use gdb::unique_xmalloc_ptr.
4943
56496dd4
TT
49442017-09-03 Tom Tromey <tom@tromey.com>
4945
4946 * mi/mi-interp.c (mi_cmd_interpreter_exec): Use std::string.
4947
e91a1fa7
TT
49482017-09-03 Tom Tromey <tom@tromey.com>
4949
4950 * mi/mi-cmd-env.c (env_execute_cli_command): Use
4951 gdb::unique_xmalloc_ptr.
4952
7ffd83d7
TT
49532017-09-03 Tom Tromey <tom@tromey.com>
4954
4955 * thread.c (print_thread_info_1): Use string_printf.
4956 (thread_apply_command, thread_apply_all_command): Use
4957 std::string.
4958
1ccbe998
TT
49592017-09-03 Tom Tromey <tom@tromey.com>
4960
4961 * valprint.c (val_print_string): Update.
4962 * gdbcore.h (memory_error_message): Return std::string.
4963 * corefile.c (memory_error_message): Return std::string.
4964 (memory_error): Update.
4965 * breakpoint.c (insert_bp_location): Update.
4966
23fdd69e
SM
49672017-09-03 Simon Marchi <simon.marchi@ericsson.com>
4968
4969 * target/waitstatus.h (target_waitstatus_to_string): Change
4970 return type to std::string.
4971 * target/waitstatus.c (target_waitstatus_to_string): Return
4972 std::string.
4973 * target.h (target_waitstatus_to_string): Remove declaration.
4974 * infrun.c (resume, clear_proceed_status_thread,
4975 print_target_wait_results, do_target_wait, save_waitstatus,
4976 stop_all_threads): Adjust.
4977 * record-btrace.c (record_btrace_wait): Adjust.
4978 * target-debug.h
4979 (target_debug_print_struct_target_waitstatus_p): Adjust.
4980
5c811d30
JK
49812017-09-01 Jan Kratochvil <jan.kratochvil@redhat.com>
4982
4983 PR gdb/22046
4984 * nat/linux-procfs.c (parse_proc_status_state): Fix PROC_STATE_STOPPED
4985 detection.
4986
0a2dde4a
SDJ
49872017-08-31 Sergio Durigan Junior <sergiodj@redhat.com>
4988
4989 * NEWS (Changes since GDB 8.0): Add entry mentioning new support
4990 for setting/unsetting environment variables on the remote target.
4991 (New remote packets): Add entries for QEnvironmentHexEncoded,
4992 QEnvironmentUnset and QEnvironmentReset.
4993 * common/environ.c (gdb_environ::operator=): Extend method to
4994 handle m_user_set_env_list and m_user_unset_env_list.
4995 (gdb_environ::clear): Likewise.
4996 (match_var_in_string): Change type of first parameter from 'char
4997 *' to 'const char *'.
4998 (gdb_environ::set): Extend method to handle
4999 m_user_set_env_list and m_user_unset_env_list.
5000 (gdb_environ::unset): Likewise.
5001 (gdb_environ::clear_user_set_env): New method.
5002 (gdb_environ::user_set_envp): Likewise.
5003 (gdb_environ::user_unset_envp): Likewise.
5004 * common/environ.h (gdb_environ): Handle m_user_set_env_list and
5005 m_user_unset_env_list on move constructor/assignment.
5006 (unset): Add new default parameter 'update_unset_list = true'.
5007 (clear_user_set_env): New method.
5008 (user_set_envp): Likewise.
5009 (user_unset_envp): Likewise.
5010 (m_user_set_env_list): New std::set.
5011 (m_user_unset_env_list): Likewise.
5012 * common/rsp-low.c (hex2str): New function.
5013 (bin2hex): New overload for bin2hex function.
5014 * common/rsp-low.c (hex2str): New prototype.
5015 (str2hex): New overload prototype.
5016 * remote.c: Include "environ.h". Add QEnvironmentHexEncoded,
5017 QEnvironmentUnset and QEnvironmentReset.
5018 (remote_protocol_features): Add QEnvironmentHexEncoded,
5019 QEnvironmentUnset and QEnvironmentReset packets.
5020 (send_environment_packet): New function.
5021 (extended_remote_environment_support): Likewise.
5022 (extended_remote_create_inferior): Call
5023 extended_remote_environment_support.
5024 (_initialize_remote): Add QEnvironmentHexEncoded,
5025 QEnvironmentUnset and QEnvironmentReset packet configs.
5026 * unittests/environ-selftests.c (gdb_selftest_env_var):
5027 New variable.
5028 (test_vector_initialization): New function.
5029 (test_init_from_host_environ): Likewise.
5030 (test_reinit_from_host_environ): Likewise.
5031 (test_set_A_unset_B_unset_A_cannot_find_A_can_find_B):
5032 Likewise.
5033 (test_unset_set_empty_vector): Likewise.
5034 (test_vector_clear): Likewise.
5035 (test_std_move): Likewise.
5036 (test_move_constructor):
5037 (test_self_move): Likewise.
5038 (test_set_unset_reset): Likewise.
5039 (run_tests): Rewrite in terms of the functions above.
5040
654670a4
WP
50412017-08-31 Weimin Pan <weimin.pan@oracle.com>
5042
5043 * sparc64-tdep.c (adi_stat_t): Fix comment formatting.
5044 (adi_available): Use a temp variable of type CORE_ADDR as argument
5045 3 when calling target_auxv_search.
5046 (adi_normalize_address): Use masks and xor operators to calculate
5047 normalized address.
5048 (adi_read_versions, adi_write_versions, adi_print_versions)
5049 (do_examine, do_assign): Use paddress.
5050
7755ddb7
JB
50512017-08-29 John Baldwin <jhb@FreeBSD.org>
5052
5053 * mips-fbsd-nat.c (getfpregs_supplies): Return true for FIR.
5054 * mips-fbsd-tdep.c (mips_fbsd_supply_fpregs): Split supply of FSR
5055 out of loop and add supply of FIR.
5056 (mips_fbsd_collect_fpregs): Split collect of FSR out of loop and
5057 add collect of FIR.
5058
fd437cbc
SM
50592017-08-28 Simon Marchi <simon.marchi@ericsson.com>
5060
3804a343 5061 PR gdb/21827
fd437cbc
SM
5062 * cli/cli-script.c (define_command): Don't convert command name
5063 to lower case.
5064
988f6b3d
JB
50652017-08-25 Joel Brobecker <brobecker@adacore.com>
5066
5067 * ada-lang.c (ada_lookup_struct_elt_type): Remove parameter "dispp".
5068 Update all callers accordingly. Remove all code blocks handling
5069 the case where DISPP is not NULL.
5070
663c44ac
JK
50712017-08-24 Jan Kratochvil <jan.kratochvil@redhat.com>
5072
5073 PR symtab/22003
5074 * dwarf2read.c (dwarf2_const_value_attr, dump_die_shallow)
5075 (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
5076 (skip_form_bytes, attr_form_is_constant): Handle DW_FORM_implicit_const.
5077
f1902523
JK
50782017-08-24 Jan Kratochvil <jan.kratochvil@redhat.com>
5079
5080 * dwarf2read.c (build_type_psymtabs_reader): New prototype.
5081 (process_psymtab_comp_unit): Accept IS_DEBUG_TYPES.
5082 (read_comp_units_from_section): New parameter abbrev_section, use
5083 read_and_check_comp_unit_head, allocate signatured_type if needed.
5084 (create_all_comp_units): Update read_comp_units_from_section caller.
5085
87215ad1
SDJ
50862017-08-23 Pedro Alves <palves@redhat.com>
5087
5088 PR remote/21852
5089 * remote.c (add_current_inferior_and_thread): Set inferior_ptid
5090 to null_ptid and switch to thread without reading the registers
5091 after adding the inferior.
5092
6e41ddec
JK
50932017-08-23 Jan Kratochvil <jan.kratochvil@redhat.com>
5094
5095 * NEWS (Changes since GDB 8.0): Add set compile-gcc and show
5096 compile-gcc.
5097 * compile/compile.c (compile_gcc, show_compile_gcc): New.
5098 (compile_to_object): Implement compile_gcc.
5099 (_initialize_compile): Install "set compile-gcc". Initialize
5100 compile_gcc.
5101
e68c32d5
JK
51022017-08-23 Jan Kratochvil <jan.kratochvil@redhat.com>
5103
5104 * compile/compile.c (compile_to_object): Conditionally call
5105 set_verbose. Conditionally call compile or compile_v0.
5106
58afddc6
WP
51072017-08-07 Weimin Pan <weimin.pan@oracle.com>
5108
5109 * sparc64-tdep.h: (adi_normalize_address): New export.
5110 * sparc-nat.h: (open_adi_tag_fd): New export.
5111 * sparc64-linux-nat.c: (open_adi_tag_fd): New function.
5112 * sparc64-linux-tdep.c:
5113 (SEGV_ACCADI, SEGV_ADIDERR, SEGV_ADIPERR) New defines.
5114 (sparc64_linux_handle_segmentation_fault): New function.
5115 (sparc64_linux_init_abi): Register
5116 sparc64_linux_handle_segmentation_fault
5117 * sparc64-tdep.c: Include cli-utils.h,gdbcmd.h,auxv.h.
5118 (sparc64_addr_bits_remove): New function.
5119 (sparc64_init_abi): Register sparc64_addr_bits_remove.
5120 (MAX_PROC_NAME_SIZE): New macro.
5121 (AT_ADI_BLKSZ, AT_ADI_NBITS, AT_ADI_UEONADI) New defines.
5122 (sparc64adilist): New variable.
5123 (adi_proc_list): New variable.
5124 (find_adi_info): New function.
5125 (add_adi_info): New function.
5126 (get_adi_info_proc): New function.
5127 (get_adi_info): New function.
5128 (info_adi_command): New function.
5129 (read_maps_entry): New function.
5130 (adi_available): New function.
5131 (adi_normalize_address): New function.
5132 (adi_align_address): New function.
5133 (adi_convert_byte_count): New function.
5134 (adi_tag_fd): New function.
5135 (adi_is_addr_mapped): New function.
5136 (adi_read_versions): New function.
5137 (adi_write_versions): New function.
5138 (adi_print_versions): New function.
5139 (do_examine): New function.
5140 (do_assign): New function.
5141 (adi_examine_command): New function.
5142 (adi_assign_command): New function.
5143 (_initialize_sparc64_adi_tdep): New function.
5144
11db9430
SM
51452017-08-22 Simon Marchi <simon.marchi@ericsson.com>
5146
5147 * breakpoint.c (breakpoints_info): Rename to ...
5148 (info_breakpoints_command): ... this.
5149 (watchpoints_info): Rename to ...
5150 (info_watchpoints_command): ... this.
5151 (tracepoints_info): Rename to ...
5152 (info_tracepoints_command): ... this.
5153 (_initialize_breakpoint): Adjust.
5154 * dcache.c (dcache_info): Rename to ...
5155 (info_display_command): ... this.
5156 (_initialize_dcache): Adjust.
5157 * frame.h (args_info): Rename to ...
5158 (info_args_command): ... this.
5159 (locals_info): Rename to ...
5160 (info_locals_command): ... this.
5161 * infcmd.c (nofp_registers_info): Rename to ...
5162 (info_registers_command): ... this.
5163 (float_info): Rename to ...
5164 (info_float_command): ... this.
5165 (program_info): Rename to ...
5166 (info_program_command): ... this.
5167 (all_registers_info): Rename to ...
5168 (info_all_registers_command): ... this.
5169 (vector_info): Rename to ...
5170 (info_vector_command): ... this.
5171 (float_info): Rename to ...
5172 (info_float_command): ... this.
5173 (_initialize_infcmd): Adjust.
5174 * inferior.h (term_info): Rename to ...
5175 (info_terminal_command): ... this.
5176 * inflow.c (term_info): Rename to ...
5177 (info_terminal_command): ... this.
5178 (_initialize_inflow): Adjust.
5179 * infrun.c (signals_info): Rename to ...
5180 (info_signals_command): ... this.
5181 (_initialize_infrun): Adjust.
5182 * objc-lang.c (classes_info): Rename to ...
5183 (info_classes_command): ... this.
5184 (selectors_info): Rename to ...
5185 (info_selectors_command): ... this.
5186 (_initialize_objc_language): Adjust.
5187 * printcmd.c (sym_info): Rename to ...
5188 (info_symbol_command): ... this.
5189 (address_info): Rename to ...
5190 (info_address_command): ... this.
5191 (display_info): Rename to ...
5192 (info_display_command): ... this.
5193 (_initialize_printcmd): Adjust.
5194 * reverse.c (bookmarks_info): Rename to ...
5195 (info_breakpoints_command): ... this.
5196 (_initialize_reverse): Adjust.
5197 * ser-go32.c (dos_info): Rename to ...
5198 (info_serial_command): ... this.
5199 (_initialize_ser_dos): Adjust.
5200 * skip.c (skip_info): Rename to ...
5201 (info_skip_command): ... this.
5202 (_initialize_step_skip): Adjust.
5203 * source.c (line_info): Rename to ...
5204 (info_line_command): ... this.
5205 (source_info): Rename to ...
5206 (info_source_command)
5207 * stack.c (frame_info): Rename to ...
5208 (info_frame_command): ... this.
5209 (locals_info): Rename to ...
5210 (info_locals_command): ... this.
5211 (args_info): Rename to ...
5212 (info_args_command): ... this.
5213 (_initialize_stack): Adjust.
5214 * symtab.c (sources_info): Rename to ...
5215 (info_sources_command): ... this.
5216 (variables_info): Rename to ...
5217 (info_variables_command): ... this.
5218 (functions_info): Rename to ...
5219 (info_functions_command): ... this.
5220 (types_info): Rename to ...
5221 (info_types_command): ... this.
5222 (_initialize_symtab): Adjust.
5223 * target.c (target_info): Rename to ...
5224 (info_target_command): ... this.
5225 (initialize_targets): Adjust.
5226 * tracepoint.c (tvariables_info): Rename to ...
5227 (info_tvariables_command): ... this.
5228 (scope_info): Rename to ...
5229 (info_scope_command): ... this.
5230 (trace_dump_actions): Adjust.
5231 (_initialize_tracepoint): Adjust.
5232
b270e6f9
TT
52332017-08-22 Tom Tromey <tom@tromey.com>
5234
5235 * breakpoint.h (install_breakpoint): Update.
5236 * breakpoint.c (add_solib_catchpoint): Update.
5237 (install_breakpoint): Change argument to a std::unique_ptr.
5238 (create_fork_vfork_event_catchpoint): Use std::unique_ptr.
5239 (create_breakpoint_sal, create_breakpoint): Update.
5240 (watch_command_1, catch_exec_command_1)
5241 (strace_marker_create_breakpoints_sal): Use std::unique_ptr.
5242 (add_to_breakpoint_chain): Change argument to a std::unique_ptr.
5243 Return the breakpoint.
5244 (set_raw_breakpoint_without_location, set_raw_breakpoint)
5245 (new_single_step_breakpoint): Update.
5246 * break-catch-throw.c (handle_gnu_v3_exceptions): Use
5247 std::unique_ptr.
5248 * break-catch-syscall.c (create_syscall_event_catchpoint): Use
5249 std::unique_ptr.
5250 * break-catch-sig.c (create_signal_catchpoint): Use
5251 std::unique_ptr.
5252 * ada-lang.c (create_ada_exception_catchpoint): Use
5253 std::unique_ptr.
5254
36bd8eaa
TT
52552017-08-22 Tom Tromey <tom@tromey.com>
5256
5257 * breakpoint.c (add_solib_catchpoint): Use std::unique_ptr.
5258
56f37645
TT
52592017-08-22 Tom Tromey <tom@tromey.com>
5260
5261 * psymtab.c (psymtab_search_name): Return a unique_xmalloc_ptr.
5262 (lookup_partial_symbol): Update.
5263
0b581c69
TT
52642017-08-22 Tom Tromey <tom@tromey.com>
5265
5266 * source.h (rewrite_source_path): Return a unique_xmalloc_ptr.
5267 * source.c (rewrite_source_path): Return a unique_xmalloc_ptr.
5268 (find_and_open_source, symtab_to_fullname): Update.
5269 * psymtab.c (psymtab_to_fullname): Update.
5270
14278e1f
TT
52712017-08-22 Tom Tromey <tom@tromey.com>
5272
5273 * exec.c (exec_file_attach): Update.
5274 * linux-thread-db.c (try_thread_db_load): Update.
5275 * guile/scm-safe-call.c (gdbscm_safe_source_script): Update.
5276 * utils.c (gdb_realpath): Change return type.
5277 (gdb_realpath_keepfile): Update.
5278 (gdb_realpath_check_trailer, gdb_realpath_tests): New functions.
5279 (_initialize_utils): Register the new self test.
5280 * source.c (openp): Update.
5281 (find_and_open_source): Update.
5282 * nto-tdep.c (nto_find_and_open_solib): Update.
5283 * main.c (set_gdb_data_directory): Update.
5284 (captured_main_1): Update.
5285 * dwarf2read.c (dwarf2_get_dwz_file): Update
5286 (dw2_map_symbol_filenames): Update.
5287 * auto-load.c (auto_load_safe_path_vec_update): Update.
5288 (filename_is_in_auto_load_safe_path_vec): Change type of
5289 "filename_realp".
5290 (auto_load_objfile_script): Update.
5291 (file_is_auto_load_safe): Update. Use std::string.
5292 * utils.h (gdb_realpath): Return a gdb::unique_xmalloc_ptr.
5293
4971c9a7
TT
52942017-08-22 Tom Tromey <tom@tromey.com>
5295
5296 * utils.c (gdb_realpath_keepfile): Return a
5297 gdb::unique_xmalloc_ptr.
5298 * exec.c (exec_file_attach): Update.
5299 * utils.h (gdb_realpath_keepfile): Return a
5300 gdb::unique_xmalloc_ptr.
5301
e3e41d58
TT
53022017-08-22 Tom Tromey <tom@tromey.com>
5303
5304 * compile/compile.c (compile_file_command): Use
5305 gdb::unique_xmalloc_ptr, std::string.
5306 * utils.c (gdb_abspath): Change return type.
5307 * source.c (openp): Update.
5308 * objfiles.c (allocate_objfile): Update.
5309 * main.c (set_gdb_data_directory): Update.
5310 * utils.h (gdb_abspath): Return a gdb::unique_xmalloc_ptr.
5311
0d999a6e
ZZ
53122017-08-22 Zhouyi Zhou <zhouzhouyi@gmail.com>
5313
5314 * cli-cmds.c (list_commands): List actual code around more than
5315 one location.
5316
329d5e7e
JB
53172017-08-21 John Baldwin <jhb@FreeBSD.org>
5318
5319 * fbsd-nat.c (fbsd_add_threads): Use array type for `lwps'.
5320
bf223d3e
PA
53212017-08-21 Pedro Alves <palves@redhat.com>
5322
5323 PR gdb/19487
5324 * c-exp.y (variable production): Handle function aliases.
5325 * minsyms.c (msymbol_is_text): New function.
5326 * minsyms.h (msymbol_is_text): Declare.
5327 * symtab.c (find_function_alias_target): New function.
5328 * symtab.h (find_function_alias_target): Declare.
5329
c973d0aa
PA
53302017-08-21 Pedro Alves <palves@redhat.com>
5331
5332 * eval.c (evaluate_subexp_standard) <OP_TYPE>: Don't dig past
5333 typedefs.
5334 * typeprint.c (whatis_exp): If handling "whatis", and expression
5335 is OP_TYPE, strip one typedef level. Otherwise don't strip
5336 typedefs here.
5337 * valops.c (value_cast): Save "to" type before resolving
5338 stubs/typedefs. Use that type as resulting value's type.
5339
2989a365
TT
53402017-08-18 Tom Tromey <tom@tromey.com>
5341 Pedro Alves <palves@redhat.com>
5342
5343 * spu-multiarch.c (parse_spufs_run): Use scoped_restore.
5344 * sol-thread.c (sol_thread_resume, sol_thread_wait)
5345 (sol_thread_xfer_partial, rw_common): Use scoped_restore.
5346 * procfs.c (procfs_do_thread_registers): Use scoped_restore.
5347 * proc-service.c (ps_xfer_memory): Use scoped_restore.
5348 * linux-tdep.c (linux_corefile_thread): Remove a cleanup.
5349 (linux_get_siginfo_data): Add "thread" argument. Use
5350 scoped_restore.
5351 * linux-nat.c (linux_child_follow_fork)
5352 (check_stopped_by_watchpoint): Use scoped_restore.
5353 * infrun.c (displaced_step_prepare_throw, write_memory_ptid)
5354 (THREAD_STOPPED_BY, handle_signal_stop): Use scoped_restore.
5355 (restore_inferior_ptid, save_inferior_ptid): Remove.
5356 * btrace.c (btrace_fetch): Use scoped_restore.
5357 * bsd-uthread.c (bsd_uthread_fetch_registers)
5358 (bsd_uthread_store_registers): Use scoped_restore.
5359 * breakpoint.c (reattach_breakpoints, detach_breakpoints): Use
5360 scoped_restore.
5361 * aix-thread.c (aix_thread_resume, aix_thread_wait)
5362 (aix_thread_xfer_partial): Use scoped_restore.
5363 * inferior.h (save_inferior_ptid): Remove.
5364
e60eb288
YQ
53652017-08-18 Yao Qi <yao.qi@linaro.org>
5366
5367 PR tdep/21818
5368 * arm-tdep.c (gdb_print_insn_arm): Mark
5369 USER_SPECIFIED_MACHINE_TYPE if exec_bfd isn't NULL.
5370
6d580b63
YQ
53712017-08-18 Yao Qi <yao.qi@linaro.org>
5372
5373 * NEWS: Mention GDBserver's new option "--selftest".
5374 * Makefile.in (SFILES): Remove selftest.c, add common/selftest.c.
5375 * selftest.c: Move it to common/selftest.c.
5376 * selftest.h: Move it to common/selftest.h.
5377 * selftest-arch.c (reset): New function.
5378 (tests_with_arch): Call reset.
5379
86dcbf50
YQ
53802017-08-18 Yao Qi <yao.qi@linaro.org>
5381
5382 * selftest.c (run_tests): Don't call QUIT. Call debug_printf
5383 instead of exception_fprintf and printf_filtered.
5384
7649770c
YQ
53852017-08-18 Yao Qi <yao.qi@linaro.org>
5386
5387 * selftest.c (register_self_test): Rename it to
5388 selftests::register_test.
5389 (run_self_tests): selftest::run_tests.
5390 * selftest.h: Update declarations.
5391 * selftest-arch.c (register_self_test_foreach_arch): Rename it to
5392 selftests::register_test_foreach_arch.
5393 * selftest-arch.h: Update declaration.
5394 * aarch64-tdep.c: Update.
5395 * arm-tdep.c: Likewise.
5396 * disasm-selftests.c: Likewise.
5397 * dwarf2loc.c: Likewise.
5398 * dwarf2-frame.c: Likewise.
5399 * findvar.c: Likewise.
5400 * gdbarch-selftests.c: Likewise.
5401 * maint.c (maintenance_selftest): Likewise.
5402 * regcache.c: Likewise.
5403 * rust-exp.y: Likewise.
5404 * selftest-arch.c: Likewise.
5405 * unittests/environ-selftests.c: Likewise.
5406 * unittests/function-view-selftests.c: Likewise.
5407 * unittests/offset-type-selftests.c: Likewise.
5408 * unittests/optional-selftests.c: Likewise.
5409 * unittests/scoped_restore-selftests.c: Likewise.
5410 * utils-selftests.c: Likewise.
5411
b0cba12e
PA
54122017-08-17 Pedro Alves <palves@redhat.com>
5413
5414 * cli/cli-cmds.c (source_command): Delete 'old_source_verbose'
5415 local.
5416
4c8aa72d
PA
54172017-08-17 Pedro Alves <palves@redhat.com>
5418
5419 * dwarf2read.c (struct dwarf2_cu) <line_header_die_owner>: New
5420 field.
5421 (reset_die_in_process): Delete, replaced by ...
5422 (process_die_scope): ... this new class. Make it responsible for
5423 freeing cu->line_header too.
5424 (process_die): Use process_die_scope.
5425 (handle_DW_AT_stmt_list): Record the line header's owner CU/DIE in
5426 cu->line_header_die_owner. Don't release the line header if it's
5427 owned by the CU.
5428 (setup_type_unit_groups): Make the CU/DIE own the line header.
5429 Don't release the line header here.
5430
ba713918
AL
54312017-08-17 Alex Lindsay <alexlindsay239@gmail.com> (tiny change)
5432
5433 * elfread.c (elf_read_minimal_symbols): xfree synthsyms.
5434
44d0fb3a
RK
54352017-08-17 Ruslan Kabatsayev <b7.10110111@gmail.com>
5436
5437 * NEWS: Mention new shortcuts for nexti and stepi in TUI
5438 Single-Key mode
5439
a5afdb16
RK
54402017-08-16 Ruslan Kabatsayev <b7.10110111@gmail.com>
5441
5442 * tui/tui.c (tui_commands): Add "nexti" and "stepi" to the Single-Key
5443 mode command list.
5444
47613aeb
SH
54452017-08-15 Stafford Horne <shorne@gmail.com>
5446
5447 * MAINTAINERS (Write After Approval): Add Stafford Horne.
5448
9c3cc999
SH
54492017-08-15 Stafford Horne <shorne@gmail.com>
5450
5451 * xtensa-tdep.c (xtensa_init_reggroups): Use xstrdup for cpname.
5452
206726fb
SDJ
54532017-08-15 Sergio Durigan Junior <sergiodj@redhat.com>
5454
5455 PR gdb/21954
5456 * infcmd.c (unset_environment_command): Use the 'clear' method on
5457 the environment instead of resetting it.
5458
0335ac6d
JB
54592017-08-15 John Baldwin <jhb@FreeBSD.org>
5460
5461 * fbsd-nat.c (fbsd_convert_siginfo): Fix compile on big-endian
5462 platforms.
5463
d3abe1c8
TT
54642017-08-14 Tom Tromey <tom@tromey.com>
5465
5466 * valprint.c (print_octal_chars): Use HOST_CHAR_BIT.
5467 (print_binary_chars): Likewise.
5468 (BITS_IN_BYTES): Remove.
5469
d6382fff
TT
54702017-08-14 Tom Tromey <tom@tromey.com>
5471
5472 PR gdb/21675
5473 * valprint.c (LOW_ZERO): Change value to 034.
5474 (print_octal_chars): Add static_asserts for octal constants.
5475 * printcmd.c (print_scalar_formatted): Add 'd' case.
5476
f978cb06
TT
54772017-08-11 Tom Tromey <tom@tromey.com>
5478
5479 * symfile.c (add_symbol_file_command): Use std::vector.
5480
2f5404b3
TT
54812017-08-14 Tom Tromey <tom@tromey.com>
5482
5483 * break-catch-throw.c (handle_gnu_v3_exceptions): Use std::move.
5484 * break-catch-syscall.c (create_syscall_event_catchpoint): Use
5485 std::move.
5486 * break-catch-sig.c (create_signal_catchpoint): Use std::move.
5487
de7985c3
PA
54882017-08-11 Pedro Alves <palves@redhat.com>
5489
5490 * infrun.c (process_event_stop_test): Adjust
5491 function_name_is_marked_for_skip call.
5492 * skip.c: Include <list>.
5493 (skiplist_entry): Make it a class with private fields, and
5494 getters/setters.
5495 (skiplist_entry_chain): Delete.
5496 (skiplist_entries): New.
5497 (skiplist_entry_count): Delete.
5498 (highest_skiplist_entry_num): New.
5499 (ALL_SKIPLIST_ENTRIES, ALL_SKIPLIST_ENTRIES_SAFE): Delete.
5500 (add_skiplist_entry): Delete.
5501 (skiplist_entry::skiplist_entry): New.
5502 (skiplist_entry::add_entry): New.
5503 (skip_file_command, skip_function): Adjust.
5504 (compile_skip_regexp): Delete.
5505 (skip_command): Don't compile regexp here. Adjust to use
5506 skiplist_entry::add_entry.
5507 (skip_info): Adjust to use range-for and getters.
5508 (skip_enable_command, skip_disable_command): Adjust to use
5509 range-for and setters.
5510 (skip_delete_command): Adjust to use std::list.
5511 (add_skiplist_entry): Delete.
5512 (skip_file_p): Delete, refactored as ...
5513 (skiplist_entry::do_skip_file_p): ... this new method.
5514 (skip_gfile_p): Delete, refactored as ...
5515 (skiplist_entry::do_gskip_file_p): ... this new method.
5516 (skip_function_p, skip_rfunction_p): Delete, refactored as ...
5517 (skiplist_entry::skip_function_p): ... this new method.
5518 (function_name_is_marked_for_skip): Now returns bool, and takes
5519 the function sal by const reference. Adjust to use range-for and
5520 skiplist_entry methods.
5521 (_initialize_step_skip): Remove references to
5522 skiplist_entry_chain, skiplist_entry_count.
5523 * skip.h (function_name_is_marked_for_skip): Now returns bool, and
5524 takes the function sal by const reference.
5525
be7d3cd5
YQ
55262017-08-11 Yao Qi <yao.qi@linaro.org>
5527
5528 * dwarf2-frame.c (clear_pointer_cleanup): Remove.
5529 (dwarf2_frame_cache): Remove reset_cache_cleanup.
5530 (dwarf2_frame_cache):
5531 * frame-unwind.c (frame_unwind_try_unwinder): Catch
5532 RETURN_MASK_ALL and set *this_case to NULL.
5533 * frame-unwind.h: Update comments.
5534
1c90d9f0
YQ
55352017-08-11 Yao Qi <yao.qi@linaro.org>
5536
5537 * dwarf2-frame.c (dwarf2_frame_state_alloc_regs): Remove.
5538 (dwarf2_frame_state_copy_regs): Remove.
5539 (dwarf2_frame_state_free_regs): Remove.
5540 (dwarf2_frame_state::~dwarf2_frame_state): Remove.
5541 (dwarf2_restore_rule): Call method .alloc_regs instead of
5542 dwarf2_frame_state_alloc_regs.
5543 (execute_cfa_program): Likewise. Call dwarf2_frame_state_reg_info
5544 constructor. Call std::move.
5545 (dwarf2_fetch_cfa_info): Don't call dwarf2_frame_state_copy_regs.
5546 (dwarf2_frame_cache): Likewise.
5547
5548 [GDB_SELF_TEST]: Include selftest.h and
5549 selftest-arch.h.
5550 [GDB_SELF_TEST] (execute_cfa_program_test): New function.
5551 (_initialize_dwarf2_frame) [GDB_SELF_TEST]: Register
5552 execute_cfa_program_test.
5553
5554 * dwarf2-frame.h (dwarf2_frame_state_reg_info): Add ctor, dtor,
5555 copy ctor, assignment operator, move assignment.
5556 <alloc_regs>: New method.
5557 <swap>: New method.
5558 (struct dwarf2_frame_state): Delete dtor.
5559 (dwarf2_frame_state_alloc_regs): Remove declaration.
5560 * sparc-tdep.c (sparc_execute_dwarf_cfa_vendor_op): Don't call
5561 dwarf2_frame_state_alloc_regs, use .alloc_regs instead.
5562
afe37d6b
YQ
55632017-08-11 Yao Qi <yao.qi@linaro.org>
5564
5565 * dwarf2-frame.c (dwarf2_frame_state_free): Remove.
5566 (dwarf2_frame_state::dwarf2_frame_state): New.
5567 (dwarf2_frame_state::~dwarf2_frame_state): New.
5568 (dwarf2_fetch_cfa_info): Update.
5569 (dwarf2_frame_cache): Remove old_chain. Change 'fs' to an object
5570 rather than a pointer. Update code.
5571 * dwarf2-frame.h (struct dwarf2_frame_state): Declare ctor and
5572 dtor.
5573 <data_align, code_align, retaddr_column>: Change them to const.
5574 <armcc_cfa_offsets_sf, armcc_cfa_offsets_reversed>: Change them
5575 to bool.
5576
b348037f
YQ
55772017-08-11 Yao Qi <yao.qi@linaro.org>
5578
5579 * dwarf2-frame.h (struct dwarf2_frame_state_reg) <exp_len>: Remove.
5580 <loc.exp>: New field.
5581 * dwarf2-frame.c (execute_cfa_program): Update.
5582 (dwarf2_frame_prev_register): Update.
5583
e7c9de26
PA
55842017-08-10 Pedro Alves <palves@redhat.com>
5585
5586 * common/gdb_unique_ptr.h (xfree_deleter<T[]>): Define.
5587
e8c6b620
JB
55882017-08-09 John Baldwin <jhb@FreeBSD.org>
5589
5590 * fbsd-nat.c (struct fbsd_fork_info): Remove.
5591 (fbsd_pending_children): Use std::list.
5592 (fbsd_remember_child): Likewise.
5593 (fbsd_is_child_pending): Likewise.
5594 (fbsd_pending_vfork_done): Use std::forward_list.
5595 (fbsd_add_vfork_done): Likewise.
5596 (fbsd_is_vfork_done_pending): Likewise.
5597 (fbsd_next_vfork_done): Likewise.
5598
e4a26669
JB
55992017-08-09 John Baldwin <jhb@FreeBSD.org>
5600
5601 * fbsd-nat.c [HAVE_KINFO_GETVMMAP] (struct free_deleter): New.
5602 (fbsd_find_memory_regions): Use free_deleter with std::unique_ptr.
5603 [!HAVE_KINFO_GETVMMAP] (fbsd_find_memory_regions): Use std::string
5604 for `mapfilename'.
5605 (fbsd_xfer_partial): Use gdb::byte_vector.
af3881e6 5606 (fbsd_add_threads): Use gdb::unique_xmalloc_ptr.
e4a26669 5607
142311d3
JB
56082017-08-09 John Baldwin <jhb@FreeBSD.org>
5609
5610 * fbsd-nat.c: [!HAVE_KINFO_GETVMMAP]: Include <sys/user.h> and
5611 "filestuff.h".
5612 (fbsd_find_memory_regions): Fix `mapfile' initialization.
5613
42fa2e0e
TT
56142017-08-09 Tom Tromey <tom@tromey.com>
5615
5616 * skip.c (skiplist_entry): New constructor.
5617 (skiplist_entry::enabled, skiplist_entry::function_is_regexp)
5618 (skiplist_entry::file_is_glob): Now bool.
5619 (skiplist_entry::file, skiplist_entry::function): Now
5620 std::string.
5621 (make_skip_entry): Return a unique_ptr. Use new.
5622 (free_skiplist_entry, free_skiplist_entry_cleanup)
5623 (make_free_skiplist_entry_cleanup): Remove.
5624 (skip_command, skip_disable_command, add_skiplist_entry)
5625 (skip_form_bytes, compile_skip_regexp, skip_command, skip_info)
5626 (skip_file_p, skip_gfile_p, skip_function_p, skip_rfunction_p)
5627 (function_name_is_marked_for_skip): Update.
5628 (skip_delete_command): Update. Use delete.
5629
cd3af38d
JW
56302017-08-09 Jiong Wang <jiong.wang@arm.com>
5631
5632 * aarch64-linux-tdep.c: Include "auxv.h" and "elf/common.h".
5633 (aarch64_linux_core_read_description): New function.
5634 (aarch64_linux_init_abi): Register gdbarch_core_read_description.
5635
29592bde
PA
56362017-08-09 Pedro Alves <palves@redhat.com>
5637
5638 * cp-name-parser.y (cp_comp_to_string): Return a
5639 gdb::unique_xmalloc_ptr<char>.
5640 * cp-support.c (replace_typedefs_qualified_name)
5641 (replace_typedefs): Adjust to use gdb::unique_xmalloc_ptr<char>.
5642 (cp_canonicalize_string_full): Use op= instead of explicit
5643 convertion.
5644 (cp_class_name_from_physname, method_name_from_physname)
5645 (cp_func_name, cp_remove_params): Adjust to use
5646 gdb::unique_xmalloc_ptr<char>.
5647 * cp-support.h (cp_comp_to_string): Return a
5648 gdb::unique_xmalloc_ptr<char>.
5649 * python/py-type.c (typy_lookup_type): Adjust to use
5650 gdb::unique_xmalloc_ptr<char>.
5651
b3340438
L
56522017-08-09 H.J. Lu <hongjiu.lu@intel.com>
5653
5654 * dwarf2read.c (dwarf2_string_attr): Fix a typo.
5655
e88e8651
YQ
56562017-08-09 Alex Lindsay <alexlindsay239@gmail.com>
5657 Yao Qi <yao.qi@linaro.org>
5658
5659 * cp-support.c (cp_canonicalize_string_full): Use
5660 gdb::unique_xmalloc_ptr<char>.
5661 (cp_canonicalize_string): Likewise.
5662
f5a29eb0
YQ
56632017-08-09 Yao Qi <yao.qi@linaro.org>
5664
5665 * features/Makefile (WHICH): Remove i386/ non-linux stuff.
5666 * regformats/i386/amd64-avx-avx512.dat: Remove.
5667 * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Remove.
5668 * regformats/i386/amd64-avx-mpx.dat:Remove.
5669 * regformats/i386/amd64-avx.dat: Remove.
5670 * regformats/i386/amd64-mpx.dat: Remove.
5671 * regformats/i386/i386-avx-avx512.dat: Remove.
5672 * regformats/i386/i386-avx-mpx-avx512-pku.dat: Remove.
5673 * regformats/i386/i386-avx-mpx.dat: Remove.
5674 * regformats/i386/i386-mmx.dat: Remove.
5675 * regformats/i386/i386-mpx.dat: Remove.
5676
57757c2f
YQ
56772017-08-09 Yao Qi <yao.qi@linaro.org>
5678
5679 * amd64-tdep.h (tdesc_x32): Remove the declaration.
5680 * amd64-tdep.c: Don't include features/i386/x32*.c.
5681 (_initialize_amd64_tdep): Don't call initialize_tdesc_x32*
5682 functions.
5683 * features/Makefile (WHICH): Remove i386/x32, i386/x32-avx,
5684 and i386/x32-avx-avx512.
5685 (XMLTOC): Remove i386/x32-avx.xml, i386/x32-avx-avx512.xml,
5686 and i386/x32.xml.
5687 * features/i386/x32-avx-avx512.c: Removed.
5688 * features/i386/x32-avx-avx512.xml: Removed.
5689 * features/i386/x32-avx.c: Removed.
5690 * features/i386/x32-avx.xml: Removed.
5691 * features/i386/x32.c: Removed.
5692 * features/i386/x32.xml: Removed.
5693 * regformats/i386/x32-avx-avx512.dat: Removed.
5694 * regformats/i386/x32-avx.dat: Removed.
5695 * regformats/i386/x32.dat: Removed.
5696
ba7b109b
MR
56972017-08-07 Maciej W. Rozycki <macro@imgtec.com>
5698
5699 PR breakpoints/21886
5700 * mem-break.c (default_memory_insert_breakpoint): Use
5701 `->placed_address' rather than `->reqstd_address' for the
5702 breakpoint location.
5703
e347efc3
MR
57042017-08-07 Maciej W. Rozycki <macro@imgtec.com>
5705
5706 * arch-utils.c (default_print_insn): Remove arch/mach/endian
5707 assertions.
5708
0dba2a6c
MR
57092017-08-07 Maciej W. Rozycki <macro@imgtec.com>
5710
5711 * gdbarch.sh (gdbarch_info): Replace the `tdep_info' member with
5712 a union of `tdep_info', `tdesc_data' and `id'.
5713 * aarch64-tdep.c (aarch64_gdbarch_init): Use `info.tdesc_data'
5714 rather than `info.tdep_info'.
5715 * amd64-linux-tdep.c (amd64_linux_init_abi): Likewise.
5716 * i386-linux-tdep.c (i386_linux_init_abi): Likewise.
5717 * i386-tdep.c (i386_gdbarch_init): Likewise.
5718 * mips-linux-tdep.c (mips_linux_init_abi): Likewise.
5719 * mips-tdep.c (mips_gdbarch_init): Likewise.
5720 * nds32-tdep.c (nds32_gdbarch_init): Likewise.
5721 * rs6000-tdep.c (rs6000_gdbarch_init): Likewise.
5722 * ppc-linux-tdep.c (ppu2spu_sniffer): Use `info.id' rather than
5723 `info.tdep_info'.
5724 (ppc_linux_init_abi): Use `info.tdesc_data' rather than
5725 `info.tdep_info'.
5726 * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
5727 * spu-multiarch.c (spu_gdbarch): Use `info.id' rather than
5728 `info.tdep_info'.
5729 * spu-tdep.c (spu_gdbarch_init): Likewise.
5730 * gdbarch.h: Regenerate.
5731
16eb6b2d
LS
57322017-08-07 Leszek Swirski <leszeks@google.com>
5733
7b005726 5734 PR symtab/20899
16eb6b2d
LS
5735 * dwarf2read.c (dwarf2_string_attr): Allow DW_FORM_GNU_strp_alt.
5736
74cbb09e
SM
57372017-08-07 Simon Marchi <simon.marchi@ericsson.com>
5738
5739 * remote-sim.c (gdbsim_load): Remove char **argv local variable.
5740 (gdbsim_open): Rename gdb_argv args object to argv.
5741
ee0c3293
TT
57422017-08-05 Tom Tromey <tom@tromey.com>
5743
5744 * compile/compile-object-load.c (compile_object_load): Use
5745 gdb::unique_xmalloc_ptr.
5746 * cli/cli-dump.c (scan_filename): Rename from
5747 scan_filename_with_cleanup. Change return type.
5748 (scan_expression): Rename from scan_expression_with_cleanup.
5749 Change return type.
5750 (dump_memory_to_file, dump_value_to_file, restore_command):
5751 Use gdb::unique_xmalloc_ptr. Update.
5752 * cli/cli-cmds.c (find_and_open_script): Use
5753 gdb::unique_xmalloc_ptr.
5754 * tracefile-tfile.c (tfile_open): Use gdb::unique_xmalloc_ptr.
5755 * symmisc.c (maintenance_print_symbols)
5756 (maintenance_print_msymbols): Use gdb::unique_xmalloc_ptr.
5757 * symfile.c (symfile_bfd_open, generic_load)
5758 (add_symbol_file_command, remove_symbol_file_command): Use
5759 gdb::unique_xmalloc_ptr.
5760 * source.c (openp): Use gdb::unique_xmalloc_ptr.
5761 * psymtab.c (maintenance_print_psymbols): Use
5762 gdb::unique_xmalloc_ptr.
5763 * corelow.c (core_open): Use gdb::unique_xmalloc_ptr.
5764 * breakpoint.c (save_breakpoints): Use gdb::unique_xmalloc_ptr.
5765 * solib.c (solib_map_sections): Use gdb::unique_xmalloc_ptr.
5766 (reload_shared_libraries_1): Likewise.
5767
3232fabd
TT
57682017-08-05 Tom Tromey <tom@tromey.com>
5769
5770 * rust-exp.y (rust_op_ptr, set_field): Remove typedefs.
5771 (rust_op_vector, rust_set_vector): New typedefs.
5772 (current_parser): New global.
5773 (work_obstack): Change to pointer type. Update all users.
5774 (rust_ast, pstate): Remove globals.
5775 (struct rust_parser): New.
5776 (%union) <params, field_inits>: Change type.
5777 (start, tuple_expr, unit_expr, struct_expr_list, literal)
5778 (field_expr, expr_list, maybe_expr_list, type_list): Update.
5779 (ast_call_ish, ast_path, ast_function_type, ast_tuple_type)
5780 (convert_params_to_types, convert_params_to_expression): Change
5781 type of "params".
5782 (ast_string): Change type of "fields".
5783 (rust_parse): Make a rust_parser. Remove cleanups.
5784 (rust_lex_tests): Make and install an auto_obstack.
5785
f02fd774
YQ
57862017-08-04 Yao Qi <yao.qi@linaro.org>
5787
5788 * configure.srv (ipa_x32_linux_regobj): New.
5789 * linux-amd64-ipa.c (get_ipa_tdesc): Use X86_TDESC_AVX_AVX512
5790 instead of X86_TDESC_AVX512.
5791 (initialize_low_tracepoint): Call
5792 init_registers_x32_avx_avx512_linux.
5793
91975afd
YQ
57942017-08-04 Yao Qi <yao.qi@linaro.org>
5795
5796 * utils.h (gdb_argv): Add namespace std for nullptr_t.
5797
2331fa3a
RK
57982017-08-03 Ruslan Kabatsayev <b7.10110111@gmail.com>
5799
5800 * MAINTAINERS (Write After Approval): Add Ruslan Kabatsayev.
5801
744e4fe1
TT
58022017-08-03 Tom Tromey <tom@tromey.com>
5803
5804 * utils.c (make_cleanup_freeargv, do_freeargv, gdb_buildargv):
5805 Remove.
5806 * utils.h (make_cleanup_freeargv, gdb_buildargv): Remove.
5807
1c034b67
TT
58082017-08-03 Tom Tromey <tom@tromey.com>
5809
5810 * python/py-param.c (compute_enum_values): Use gdb_argv.
5811
773a1edc
TT
58122017-08-03 Tom Tromey <tom@tromey.com>
5813
5814 * utils.h (struct gdb_argv_deleter): New.
5815 (gdb_argv): New class.
5816 * utils.c (gdb_argv::reset): New method.
5817 * tracepoint.c (delete_trace_variable_command): Use gdb_argv.
5818 * tracefile.c (tsave_command): Use gdb_argv.
5819 * top.c (new_ui_command): Use gdb_argv.
5820 * symmisc.c (maintenance_print_symbols)
5821 (maintenance_print_msymbols, maintenance_expand_symtabs): Use gdb_argv.
5822 * symfile.c (symbol_file_command, generic_load)
5823 (remove_symbol_file_command): Use gdb_argv.
5824 * stack.c (backtrace_command): Use gdb_argv.
5825 * source.c (add_path, show_substitute_path_command)
5826 (unset_substitute_path_command, set_substitute_path_command):
5827 Use gdb_argv.
5828 * skip.c (skip_command): Use gdb_argv. Use gdb_buildargv.
5829 * ser-mingw.c (pipe_windows_open): Use gdb_argv.
5830 * remote.c (extended_remote_run, remote_put_command)
5831 (remote_get_command, remote_delete_command): Use gdb_argv.
5832 * remote-sim.c (gdbsim_load, gdbsim_create_inferior)
5833 (gdbsim_open): Use gdb_argv.
5834 * python/py-cmd.c (gdbpy_string_to_argv): Use gdb_argv.
5835 * psymtab.c (maintenance_print_psymbols): Use gdb_argv.
5836 * procfs.c (procfs_info_proc): Use gdb_argv.
5837 * interps.c (interpreter_exec_cmd): Use gdb_argv.
5838 * infrun.c (handle_command): Use gdb_argv.
5839 * inferior.c (add_inferior_command, clone_inferior_command):
5840 Use gdb_argv.
5841 * guile/scm-string.c (gdbscm_string_to_argv): Use gdb_argv.
5842 * exec.c (exec_file_command): Use gdb_argv.
5843 * cli/cli-cmds.c (alias_command): Use gdb_argv.
5844 * compile/compile.c (build_argc_argv): Use gdb_argv.
5845
0d50bde3
TT
58462017-08-03 Tom Tromey <tom@tromey.com>
5847
5848 * python/python.c (gdbpy_decode_line): Use unique_xmalloc_ptr.
5849
7f968c89
TT
58502017-08-03 Tom Tromey <tom@tromey.com>
5851
5852 * python/python.c (compute_python_string): Return std::string.
5853 (gdbpy_eval_from_control_command): Update.
5854 (do_start_initialization): Use std::string.
5855 * python/py-varobj.c (py_varobj_iter_next): Use string_printf, not
5856 xstrprintf.
5857 * python/py-breakpoint.c (local_setattro): Use string_printf, not
5858 xstrprintf.
5859
3c9ebddd
TT
58602017-08-03 Tom Tromey <tom@tromey.com>
5861
5862 * top.h (do_restore_instream_cleanup): Remove.
5863 * top.c (do_restore_instream_cleanup): Remove.
5864 (read_command_file): Use scoped_restore.
5865 * cli/cli-script.c (execute_user_command): Use scoped_restore.
5866
b51b225e
TT
58672017-08-03 Tom Tromey <tom@tromey.com>
5868
5869 * cli/cli-script.c (execute_user_command)
5870 (execute_control_command): Use scoped_restore.
5871
ac991630
TT
58722017-08-03 Tom Tromey <tom@tromey.com>
5873
5874 * cli/cli-script.c (do_restore_user_call_depth): Remove.
5875 (execute_user_command): Remove user_call_depth; use
5876 user_args_stack's size instead.
5877
898e0c8e
TT
58782017-08-03 Tom Tromey <tom@tromey.com>
5879
5880 * top.h (in_user_command): Remove.
5881 * top.c (in_user_command): Remove.
5882 * cli/cli-script.c (do_restore_user_call_depth)
5883 (execute_user_command): Update.
5884
26fcd5d7
TT
58852017-08-03 Tom Tromey <tom@tromey.com>
5886
5887 * valops.c (search_struct_method): Use gdb::byte_vector.
5888 * valarith.c (value_concat): Use std::vector.
5889 * target.c (memory_xfer_partial): Use gdb::byte_vector.
5890 (simple_search_memory): Likewise.
5891 * printcmd.c (find_string_backward): Use gdb::byte_vector.
5892 * mi/mi-main.c (mi_cmd_data_write_memory): Use gdb::byte_vector.
5893 * gcore.c (gcore_copy_callback): Use gdb::byte_vector.
5894 * elfread.c (elf_rel_plt_read): Use std::string.
5895 * cp-valprint.c (cp_print_value): Use gdb::byte_vector.
5896 * cli/cli-dump.c (restore_section_callback): Use
5897 gdb::byte_vector.
5898
7c218e6c
TT
58992017-08-03 Tom Tromey <tom@tromey.com>
5900
5901 * jit.c (jit_reader_load_command): Use unique_xmalloc_ptr.
5902
31b68d4a
TT
59032017-08-03 Tom Tromey <tom@tromey.com>
5904
5905 * tui/tui-regs.c (tui_restore_gdbout): Remove.
5906 (tui_register_format): Use scoped_restore.
5907
2ec845e7
TT
59082017-08-03 Tom Tromey <tom@tromey.com>
5909
5910 * reverse.c (exec_direction_default): Remove.
5911 (exec_reverse_once): Use scoped_restore.
5912 * remote.c (restore_remote_timeout): Remove.
5913 (remote_flash_erase, remote_flash_write, remote_flash_done)
5914 (readchar, remote_serial_write): Use scoped_restore.
5915 * cli/cli-script.c (struct source_cleanup_lines_args)
5916 (source_cleanup_lines): Remove.
5917 (script_from_file): Use scoped_restore.
5918 * cli/cli-cmds.c (source_verbose_cleanup): Remove.
5919 (source_command): Use scoped_restore.
5920
b3bc8453
TT
59212017-08-03 Tom Tromey <tom@tromey.com>
5922
5923 * utils.h (make_cleanup_free_so): Remove.
5924 * utils.c (do_free_so, make_cleanup_free_so): Remove.
5925 * solist.h (struct so_deleter): New.
5926 (so_list_up): New typedef.
5927 * solib-svr4.c (svr4_read_so_list): Use so_list_up.
5928
e3ad2841
TT
59292017-08-03 Tom Tromey <tom@tromey.com>
5930
5931 * utils.h (make_cleanup_restore_current_language): Remove.
5932 * utils.c (do_restore_current_language)
5933 (make_cleanup_restore_current_language): Remove.
5934 * parse.c (parse_exp_in_context_1)
5935 (parse_expression_with_language): Use
5936 scoped_restore_current_language.
5937 * mi/mi-main.c (mi_cmd_execute): Use
5938 scoped_restore_current_language.
5939 * language.h (scoped_restore_current_language): New class.
5940
b80cf838
TT
59412017-08-03 Tom Tromey <tom@tromey.com>
5942
5943 * compile/compile.c (cleanup_unlink_file): Remove.
5944 (compile_to_object): Use gdb::unlinker.
5945 (eval_compile_command): Likewise.
5946
fad0444a
TT
59472017-08-03 Tom Tromey <tom@tromey.com>
5948
5949 * utils.h (make_cleanup_fclose): Remove.
5950 * utils.c (do_fclose_cleanup, make_cleanup_fclose): Remove.
5951
6e7bc05c
TT
59522017-08-03 Tom Tromey <tom@tromey.com>
5953
5954 * top.c (open_terminal_stream): Return gdb_file_up.
5955 (new_ui_command): Update.
5956
4a45905b
TT
59572017-08-03 Tom Tromey <tom@tromey.com>
5958
5959 * source.c (print_source_lines_base, forward_search_command)
5960 (reverse_search_command): Use gdb_file_up.
5961
7cd06d6e
TT
59622017-08-03 Tom Tromey <tom@tromey.com>
5963
5964 * fbsd-nat.c (fbsd_find_memory_regions): Update.
5965
ed166945
TT
59662017-08-03 Tom Tromey <tom@tromey.com>
5967
5968 * cli/cli-cmds.c (find_and_open_script): Change return type.
5969 Remove "streamp" and "full_path" parameters.
5970 (source_script_with_search): Update.
5971 * auto-load.c (source_script_file): Update.
5972 * cli/cli-cmds.h (find_and_open_script): Change type.
5973 (open_script): New struct.
5974
d419f42d
TT
59752017-08-03 Tom Tromey <tom@tromey.com>
5976
5977 * xml-support.c (xml_fetch_content_from_file): Update.
5978 * ui-file.c (stdio_file::open): Update.
5979 * tracefile-tfile.c (tfile_start): Update.
5980 * remote.c (remote_file_put, remote_file_get): Update.
5981 * nat/linux-procfs.c (linux_proc_get_int)
5982 (linux_proc_pid_get_state, linux_proc_tid_get_name): Update.
5983 * nat/linux-osdata.c (linux_common_core_of_thread): Update.
5984 (command_from_pid, commandline_from_pid, linux_xfer_osdata_cpus)
5985 (print_sockets, linux_xfer_osdata_shm, linux_xfer_osdata_sem)
5986 (linux_xfer_osdata_msg, linux_xfer_osdata_modules): Update.
5987 * nat/linux-btrace.c (linux_determine_kernel_start): Update.
5988 * linux-nat.c (linux_proc_pending_signals): Update.
5989 * dwarf2read.c (write_psymtabs_to_index): Use gdb_file_up.
5990 (file_closer): Remove.
5991 * compile/compile.c (compile_to_object): Update.
5992 * common/filestuff.h (struct gdb_file_deleter): New.
5993 (gdb_file_up): New typedef.
5994 (gdb_fopen_cloexec): Change return type.
5995 * common/filestuff.c (gdb_fopen_cloexec): Return gdb_file_up.
5996 * cli/cli-dump.c (fopen_with_cleanup): Remove.
5997 (dump_binary_file, restore_binary_file): Update.
5998 * auto-load.c (auto_load_objfile_script_1): Update.
5999
4a2b031d
TT
60002017-08-03 Tom Tromey <tom@tromey.com>
6001
6002 * tracepoint.c (tvariables_info_1): Use ui_out_emit_table.
6003 (info_static_tracepoint_markers_command): Likewise.
6004 * solib.c (info_sharedlibrary_command): Use ui_out_emit_table.
6005 * skip.c (skip_info): Use ui_out_emit_table.
6006 * progspace.c (print_program_space): Use ui_out_emit_table.
6007 * osdata.c (info_osdata): Use ui_out_emit_table.
6008 * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions): Use
6009 ui_out_emit_table.
6010 * linux-thread-db.c (info_auto_load_libthread_db): Use
6011 ui_out_emit_table.
6012 * inferior.c (print_inferior): Use ui_out_emit_table.
6013 * gdb_bfd.c (maintenance_info_bfds): Use ui_out_emit_table.
6014 * breakpoint.c (breakpoint_1): Use ui_out_emit_table.
6015 * auto-load.c (auto_load_info_scripts): Use ui_out_emit_table.
6016 * ada-tasks.c (print_ada_task_info): Use ui_out_emit_table.
6017 * ui-out.h (class ui_out_emit_table): New.
6018
a4f320fd
MR
60192017-08-02 Maciej W. Rozycki <macro@imgtec.com>
6020
6021 * mips-tdep.c (mips_fpu_type_str): New function.
6022 (mips_dump_tdep): Call it.
6023
a2f1f308
MR
60242017-08-01 Maciej W. Rozycki <macro@imgtec.com>
6025
6026 * mips-tdep.c (mips_gdbarch_init): Use MIPS_FPU_TYPE to access
6027 `->mips_fpu_type'.
6028
7e5ed83b
XR
60292017-07-31 Xavier Roirand <roirand@adacore.com>
6030
6031 * solib-darwin.c (DYLD_VERSION_MAX): Increase value.
6032
4c9dc811
XR
60332017-07-27 Xavier Roirand <roirand@adacore.com>
6034
6035 * MAINTAINERS (Write After Approval): Add Xavier Roirand.
6036
27d41eac
YQ
60372017-07-26 Yao Qi <yao.qi@linaro.org>
6038
6039 * cli/cli-cmds.c (maintenancechecklist): New variable.
6040 * gdbcmd.h (maintenancechecklist): Declare it.
6041 * i386-linux-tdep.c (_initialize_i386_linux_tdep) [GDB_SELF_TEST]:
6042 Call i386_linux_read_description with different masks.
6043 * maint.c (maintenance_check_command): New function.
6044 (_initialize_maint_cmds): Call add_prefix_cmd.
6045 * target-descriptions.c (tdesc_reg): override operator != and ==.
6046 (tdesc_type): Likewise.
6047 (tdesc_feature): Likewise.
6048 (target_desc): Likewise.
6049 [GDB_SELF_TEST] (selftests::record_xml_tdesc): New function.
6050 (maintenance_check_xml_descriptions): New function.
6051 (_initialize_target_descriptions) Add command "xml-descriptions".
6052 * target-descriptions.h (selftests::record_xml_tdesc): Declare.
6053
ea03d0d3
YQ
60542017-07-26 Yao Qi <yao.qi@linaro.org>
6055
6056 * i386-linux-tdep.c: Don't include features/i386/i386-*linux.c.
6057 Include features/i386/32bit-*.c.
6058 (i386_linux_read_description): Generate target description if it
6059 doesn't exist.
6060 (_initialize_i386_linux_tdep): Don't call _initialize_tdesc_i386
6061 functions.
6062 * features/i386/32bit-linux.c: Re-generated.
6063 * features/i386/32bit-sse.c: Likewise.
6064 * target-descriptions.c (print_c_feature::visit): Print code to
6065 set register number if needed.
6066 (print_c_feature) <m_next_regnum>: New field.
6067
25aa13e5
YQ
60682017-07-26 Yao Qi <yao.qi@linaro.org>
6069
6070 * features/Makefile (CFILES): Rename with TDESC_CFILES.
6071 (FEATURE_XMLFILES): New.
6072 (FEATURE_CFILES): New.
6073 New rules.
6074 (clean-cfiles): Remove generated c files.
6075 * features/i386/32bit-avx.c: Generated.
6076 * features/i386/32bit-avx512.c: Generated.
6077 * features/i386/32bit-core.c: Generated.
6078 * features/i386/32bit-linux.c: Generated.
6079 * features/i386/32bit-mpx.c: Generated.
6080 * features/i386/32bit-pkeys.c: Generated.
6081 * features/i386/32bit-sse.c: Generated.
6082 * target-descriptions.c: Include algorithm.
6083 (tdesc_element_visitor): Add method visit_end.
6084 (print_c_tdesc): Implement visit_end.
6085 (print_c_tdesc:: m_filename_after_features): Move it to
6086 protected.
6087 (print_c_feature): New class.
6088 (maint_print_c_tdesc_cmd): Use print_c_feature if XML file
6089 name starts with "i386/32bit-".
6090
6eb1e6a8
YQ
60912017-07-26 Yao Qi <yao.qi@linaro.org>
6092
6093 * target-descriptions.c (tdesc_element_visitor): New class.
6094 (tdesc_element): New class.
6095 (tdesc_reg): Inherit from tdesc_element.
6096 (tdesc_reg::accept): New function.
6097 (tdesc_type): Inherit from tdesc_element.
6098 (tdesc_type::accept): New function.
6099 (tdesc_feature): Inherit from tdesc_element.
6100 (tdesc_feature::accept): New function.
6101 (target_desc): Inherit from tdesc_element.
6102 (target_desc::target_desc): New.
6103 (target_desc::~target_desc): New.
6104 (target_desc::accept): New.
6105 (allocate_target_description): Use new.
6106 (free_target_description): Use delete.
6107 (print_c_tdesc): New class.
6108 (maint_print_c_tdesc_cmd): Adjust.
6109
6110 * features/aarch64.c: Re-generated.
6111 * features/arc-arcompact.c: Re-generated.
6112 * features/arc-v2.c: Re-generated.
6113 * features/arm/arm-with-iwmmxt.c: Re-generated.
6114 * features/arm/arm-with-m.c: Re-generated.
6115 * features/arm/arm-with-m-fpa-layout.c: Re-generated.
6116 * features/arm/arm-with-m-vfp-d16.c: Re-generated.
6117 * features/arm/arm-with-neon.c: Re-generated.
6118 * features/arm/arm-with-vfpv2.c: Re-generated.
6119 * features/arm/arm-with-vfpv3.c: Re-generated.
6120 * features/i386/amd64-avx-avx512.c: Re-generated.
6121 * features/i386/amd64-avx-avx512-linux.c: Re-generated.
6122 * features/i386/amd64-avx.c: Re-generated.
6123 * features/i386/amd64-avx-linux.c: Re-generated.
6124 * features/i386/amd64-avx-mpx-avx512-pku.c: Re-generated.
6125 * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Re-generated.
6126 * features/i386/amd64-avx-mpx.c: Re-generated.
6127 * features/i386/amd64-avx-mpx-linux.c: Re-generated.
6128 * features/i386/amd64.c: Re-generated.
6129 * features/i386/amd64-linux.c: Re-generated.
6130 * features/i386/amd64-mpx.c: Re-generated.
6131 * features/i386/amd64-mpx-linux.c: Re-generated.
6132 * features/i386/i386-avx-avx512.c: Re-generated.
6133 * features/i386/i386-avx-avx512-linux.c: Re-generated.
6134 * features/i386/i386-avx.c: Re-generated.
6135 * features/i386/i386-avx-linux.c: Re-generated.
6136 * features/i386/i386-avx-mpx-avx512-pku.c: Re-generated.
6137 * features/i386/i386-avx-mpx-avx512-pku-linux.c: Re-generated.
6138 * features/i386/i386-avx-mpx.c: Re-generated.
6139 * features/i386/i386-avx-mpx-linux.c: Re-generated.
6140 * features/i386/i386.c: Re-generated.
6141 * features/i386/i386-linux.c: Re-generated.
6142 * features/i386/i386-mmx.c: Re-generated.
6143 * features/i386/i386-mmx-linux.c: Re-generated.
6144 * features/i386/i386-mpx.c: Re-generated.
6145 * features/i386/i386-mpx-linux.c: Re-generated.
6146 * features/i386/x32-avx-avx512.c: Re-generated.
6147 * features/i386/x32-avx-avx512-linux.c: Re-generated.
6148 * features/i386/x32-avx.c: Re-generated.
6149 * features/i386/x32-avx-linux.c: Re-generated.
6150 * features/i386/x32.c: Re-generated.
6151 * features/i386/x32-linux.c: Re-generated.
6152 * features/microblaze.c: Re-generated.
6153 * features/microblaze-with-stack-protect.c: Re-generated.
6154 * features/mips64-dsp-linux.c: Re-generated.
6155 * features/mips64-linux.c: Re-generated.
6156 * features/mips-dsp-linux.c: Re-generated.
6157 * features/mips-linux.c: Re-generated.
6158 * features/nds32.c: Re-generated.
6159 * features/nios2.c: Re-generated.
6160 * features/nios2-linux.c: Re-generated.
6161 * features/rs6000/powerpc-32.c: Re-generated.
6162 * features/rs6000/powerpc-32l.c: Re-generated.
6163 * features/rs6000/powerpc-403.c: Re-generated.
6164 * features/rs6000/powerpc-403gc.c : Re-generated.
6165 * features/rs6000/powerpc-405.c: Re-generated.
6166 * features/rs6000/powerpc-505.c: Re-generated.
6167 * features/rs6000/powerpc-601.c: Re-generated.
6168 * features/rs6000/powerpc-602.c: Re-generated.
6169 * features/rs6000/powerpc-603.c: Re-generated.
6170 * features/rs6000/powerpc-604.c: Re-generated.
6171 * features/rs6000/powerpc-64.c: Re-generated.
6172 * features/rs6000/powerpc-64l.c: Re-generated.
6173 * features/rs6000/powerpc-7400.c: Re-generated.
6174 * features/rs6000/powerpc-750.c: Re-generated.
6175 * features/rs6000/powerpc-860.c: Re-generated.
6176 * features/rs6000/powerpc-altivec32.c: Re-generated.
6177 * features/rs6000/powerpc-altivec32l.c: Re-generated.
6178 * features/rs6000/powerpc-altivec64.c: Re-generated.
6179 * features/rs6000/powerpc-altivec64l.c: Re-generated.
6180 * features/rs6000/powerpc-cell32l.c: Re-generated.
6181 * features/rs6000/powerpc-cell64l.c: Re-generated.
6182 * features/rs6000/powerpc-e500.c: Re-generated.
6183 * features/rs6000/powerpc-e500l.c: Re-generated.
6184 * features/rs6000/powerpc-isa205-32l.c: Re-generated.
6185 * features/rs6000/powerpc-isa205-64l.c: Re-generated.
6186 * features/rs6000/powerpc-isa205-altivec32l.c: Re-generated.
6187 * features/rs6000/powerpc-isa205-altivec64l.c: Re-generated.
6188 * features/rs6000/powerpc-isa205-vsx32l.c: Re-generated.
6189 * features/rs6000/powerpc-isa205-vsx64l.c: Re-generated.
6190 * features/rs6000/powerpc-vsx32.c: Re-generated.
6191 * features/rs6000/powerpc-vsx32l.c: Re-generated.
6192 * features/rs6000/powerpc-vsx64.c: Re-generated.
6193 * features/rs6000/powerpc-vsx64l.c: Re-generated.
6194 * features/rs6000/rs6000.c: Re-generated.
6195 * features/s390-linux32.c: Re-generated.
6196 * features/s390-linux32v1.c: Re-generated.
6197 * features/s390-linux32v2.c: Re-generated.
6198 * features/s390-linux64.c: Re-generated.
6199 * features/s390-linux64v1.c: Re-generated.
6200 * features/s390-linux64v2.c: Re-generated.
6201 * features/s390-te-linux64.c: Re-generated.
6202 * features/s390-tevx-linux64.c: Re-generated.
6203 * features/s390-vx-linux64.c: Re-generated.
6204 * features/s390x-linux64.c: Re-generated.
6205 * features/s390x-linux64v1.c: Re-generated.
6206 * features/s390x-linux64v2.c: Re-generated.
6207 * features/s390x-te-linux64.c: Re-generated.
6208 * features/s390x-tevx-linux64.c: Re-generated.
6209 * features/s390x-vx-linux64.c: Re-generated.
6210 * features/sparc/sparc32-solaris.c: Re-generated.
6211 * features/sparc/sparc64-solaris.c: Re-generated.
6212 * features/tic6x-c62x.c: Re-generated.
6213 * features/tic6x-c62x-linux.c: Re-generated.
6214 * features/tic6x-c64x.c: Re-generated.
6215 * features/tic6x-c64x-linux.c: Re-generated.
6216 * features/tic6x-c64xp.c: Re-generated.
6217 * features/tic6x-c64xp-linux.c: Re-generated.
6218
35b4818d
YQ
62192017-07-26 Yao Qi <yao.qi@linaro.org>
6220
6221 * i386-linux-tdep.c (i386_linux_read_description): New function.
6222 (i386_linux_core_read_description): Call
6223 i386_linux_read_description.
6224 * i386-linux-tdep.h (i386_linux_read_description): Declare.
6225 (tdesc_i386_linux, tdesc_i386_mmx_linux): Remove declarations.
6226 (tdesc_i386_avx_linux, tdesc_i386_mpx_linux): Likewise
6227 (tdesc_i386_avx_mpx_linux, tdesc_i386_avx_avx512_linux): Likewise.
6228 (tdesc_i386_avx_mpx_avx512_pku_linux): Likewise.
6229 * x86-linux-nat.c (x86_linux_read_description): Call
6230 i386_linux_read_description.
6231
8e2141c6
YQ
62322017-07-26 Yao Qi <yao.qi@linaro.org>
6233
6234 * NEWS: Mention it.
6235 * features/Makefile (%.c: %.xml): Pass the xml file name to
6236 command "maint print c-tdesc".
6237 * target-descriptions.c (maint_print_c_tdesc_cmd): Get file
6238 name from 'arg'.
6239
b468ff4c
YQ
62402017-07-26 Yao Qi <yao.qi@linaro.org>
6241
6242 * target-descriptions.c (target_desc): Add ctor and dtor. Do
6243 in-class initialization.
6244 (tdesc_create_feature): Call new instead of XCNEW.
6245 (free_target_description): Ue delete.
6246
b9c0e1b4
JB
62472017-07-25 John Baldwin <jhb@FreeBSD.org>
6248
6249 * configure.nat: Add "-lkvm" for NetBSD/sparc64 and fix typo.
6250
a04b5337
YQ
62512017-07-25 Yao Qi <yao.qi@linaro.org>
6252
6253 * amd64-tdep.c (amd64_init_abi): Make argument default_tdesc
6254 constant.
6255 (amd64_x32_init_abi): Likewise.
6256 * amd64-tdep.h (amd64_init_abi): Update declaration.
6257 (amd64_x32_init_abi): Likewise.
6258
02ad7fc2
YQ
62592017-07-25 Yao Qi <yao.qi@linaro.org>
6260
6261 PR tdep/21717
6262 * arm-linux-nat.c (arm_linux_fetch_inferior_registers): Update
6263 condition for FPSCR.
6264 (arm_linux_store_inferior_registers): Likewise.
6265
b6f48cb0
TT
62662017-07-22 Tom Tromey <tom@tromey.com>
6267
6268 * break-catch-syscall.c (struct catch_syscall_inferior_data)
6269 <syscalls_counts>: Now a std::vector.
6270 (get_catch_syscall_inferior_data): Use "new".
6271 (catch_syscall_inferior_data_cleanup): Use "delete".
6272 (insert_catch_syscall, remove_catch_syscall)
6273 (clear_syscall_counts): Update.
6274
e12c9b7a
TT
62752017-07-22 Tom Tromey <tom@tromey.com>
6276
6277 * break-catch-syscall.c (syscall_catchpoint)
6278 <syscalls_to_be_caught>: Now a std::vector<int>
6279 (~syscall_catchpoint): Remove.
6280 (insert_catch_syscall, remove_catch_syscall)
6281 (breakpoint_hit_catch_syscall, print_one_catch_syscall)
6282 (print_mention_catch_syscall, print_recreate_catch_syscall):
6283 Update.
6284 (create_syscall_event_catchpoint): Change type of "filter"
6285 parameter.
6286 (catch_syscall_split_args): Return a std::vector.
6287 (catch_syscall_command_1, catching_syscall_number_1): Update.
6288
4fa8aeac
TT
62892017-07-22 Tom Tromey <tom@tromey.com>
6290
6291 * break-catch-throw.c (struct exception_catchpoint)
6292 <exception_rx>: Now a std::string.
6293 (~exception_catchpoint): Remove.
6294 (print_one_detail_exception_catchpoint): Update.
6295 (handle_gnu_v3_exceptions): Change type of except_rx.
6296 (extract_exception_regexp): Return a std::string.
6297 (catch_exception_command_1): Update.
6298
f746a154
TT
62992017-07-22 Tom Tromey <tom@tromey.com>
6300
6301 * break-catch-sig.c (gdb_signal_type): Remove typedef.
6302 (struct signal_catchpoint) <signals_to_be_caught>: Now a
6303 std::vector.
6304 <catch_all>: Now a bool.
6305 (~signal_catchpoint): Remove.
6306 (signal_catchpoint_insert_location)
6307 (signal_catchpoint_remove_location)
6308 (signal_catchpoint_breakpoint_hit, signal_catchpoint_print_one)
6309 (signal_catchpoint_print_mention)
6310 (signal_catchpoint_print_recreate)
6311 (signal_catchpoint_explains_signal): Update.
6312 (create_signal_catchpoint): Change type of "filter" and
6313 "catch_all".
6314 (catch_signal_split_args): Return a std::vector. Change type of
6315 "catch_all".
6316 (catch_signal_command): Update.
6317
47e77640
PA
63182017-07-20 Pedro Alves <palves@redhat.com>
6319
6320 * ada-lang.c (ada_language_defn): Make extern.
6321 (_initialize_ada_language): Remove add_language call.
6322 * c-lang.c (c_language_defn, cplus_language_defn)
6323 (asm_language_defn, minimal_language_defn): Make extern.
6324 (_initialize_c_language): Delete.
6325 * completer.c (compare_cstrings): Delete, moved to utils.h.
6326 * d-lang.c (d_language_defn): Make extern.
6327 (_initialize_d_language): Remove add_language calls.
6328 * defs.h (enum language): Add comment.
6329 * f-lang.c (f_language_defn): Make extern.
6330 (_initialize_f_language): Remove add_language call.
6331 * go-lang.c (go_language_defn): Make extern.
6332 (_initialize_go_language): Remove add_language call.
6333 * language.c: Include <algorithm>.
6334 (languages): Redefine as const array.
6335 (languages_size, languages_allocsize, DEFAULT_ALLOCSIZE): Delete.
6336 (set_language_command): Handle "local". Use for-range loop.
6337 (set_language): Remove loop.
6338 (language_enum): Rewrite.
6339 (language_def, language_str): Remove loops.
6340 (add_language): Delete.
6341 (add_set_language_command): New, based on add_languages.
6342 (skip_language_trampoline): Adjust.
6343 (local_language_defn): Delete.
6344 (language_gdbarch_post_init): Adjust.
6345 (_initialize_language): Remove add_language calls. Call
6346 add_set_language_command.
6347 * language.h (add_language): Delete.
6348 (auto_language_defn)
6349 (unknown_language_defn, minimal_language_defn, ada_language_defn)
6350 (asm_language_defn, c_language_defn, cplus_language_defn)
6351 (d_language_defn, f_language_defn, go_language_defn)
6352 (m2_language_defn, objc_language_defn, opencl_language_defn)
6353 (pascal_language_defn, rust_language_defn): Declare.
6354 * m2-lang.c (m2_language_defn): Make extern.
6355 (_initialize_m2_language): Remove add_language call.
6356 * objc-lang.c (objc_language_defn): Make extern.
6357 (_initialize_objc_language): Remove add_language call.
6358 * opencl-lang.c (opencl_language_defn): Make extern.
6359 (_initialize_opencl_language): Remove add_language call.
6360 * p-lang.c (pascal_language_defn): Make extern.
6361 (_initialize_pascal_language): Delete.
6362 * rust-lang.c (rust_language_defn): Make extern.
6363 (_initialize_rust_language): Delete.
6364 * utils.h (compare_cstrings): New static inline function.
6365
edb0c9cb
PA
63662017-07-20 Pedro Alves <palves@redhat.com>
6367
6368 * ada-lang.c (ada_to_fixed_type_1): Adjust.
6369 (get_var_value): Constify parameters.
6370 (get_int_var_value): Change prototype.
6371 (to_fixed_range_type): Adjust.
6372 * ada-lang.h (get_int_var_value): Change prototype.
6373
a778f165
PA
63742017-07-20 Pedro Alves <palves@redhat.com>
6375
6376 * dwarf2read.c (dw2_lookup_symbol): Use
6377 SYMBOL_MATCHES_SEARCH_NAME.
6378 * psymtab.c (psym_lookup_symbol): Use SYMBOL_MATCHES_SEARCH_NAME.
6379
42edd901
PA
63802017-07-20 Pedro Alves <palves@redhat.com>
6381
6382 * block.c (block_iter_name_step, block_iter_name_first)
6383 (block_iter_name_next): Delete.
6384 (block_lookup_symbol_primary): Adjust to use
6385 dict_iter_match_first/dict_iter_match_next.
6386 * block.h (block_iter_name_first, block_iter_name_next): Delete
6387 declarations.
6388 (ALL_BLOCK_SYMBOLS_WITH_NAME): Adjust to use
6389 dict_iter_match_first/dict_iter_match_next.
6390
cf325299
PA
63912017-07-20 Pedro Alves <palves@redhat.com>
6392
6393 * cp-support.c (cp_find_first_component_aux): Add missing case for
6394 end of string.
6395
c5ed0576
DB
63962017-07-18 David Blaikie <dblaikie@gmail.com>
6397
6398 * dwarf2read.c (create_cus_hash_table): Re-add lost initialization
6399 of dwo_cu's dwo_file.
6400
27841e76
YQ
64012017-07-18 Yao Qi <yao.qi@linaro.org>
6402
6403 * remote.c (store_registers_using_G): Remove one line comment.
6404
cfb7e58b
YQ
64052017-07-18 Yao Qi <yao.qi@linaro.org>
6406
6407 * regcache.c (regcache_cpy): Simplify it.
6408 (regcache::cpy_no_passthrough): Remove it.
6409 * regcache.h (cpy_no_passthrough): Remove it.
6410 (regcache_dup, regcache_cpy): Update comments.
6411
386535dd
PA
64122017-07-18 Pedro Alves <palves@redhat.com>
6413
6414 * remote-sim.c (sim_command_completer): Adjust to work with a
6415 completion_tracker instead of a VEC.
6416
c45ec17c
PA
64172017-07-17 Pedro Alves <palves@redhat.com>
6418
6419 * completer.c (complete_source_filenames): New function.
6420 (complete_address_and_linespec_locations): New function.
6421 (location_completer): Use complete_address_and_linespec_locations.
6422 (completion_tracker::build_completion_result): Honor the tracker's
6423 request to suppress append.
6424 * completer.h (completion_tracker::suppress_append_ws)
6425 (completion_tracker::set_suppress_append_ws): New methods.
6426 (completion_tracker::m_suppress_append_ws): New field.
6427 (complete_source_filenames): New declaration.
6428 * linespec.c (linespec_complete_what): New.
6429 (struct ls_parser) <complete_what, completion_word,
6430 completion_quote_char, completion_quote_end, completion_tracker>:
6431 New fields.
6432 (string_find_incomplete_keyword_at_end): New.
6433 (linespec_lexer_lex_string): Record quote char. If in completion
6434 mode, don't throw.
6435 (linespec_lexer_consume_token): Advance the completion word point.
6436 (linespec_lexer_peek_token): Save/restore completion info.
6437 (save_stream_and_consume_token): New.
6438 (set_completion_after_number): New.
6439 (linespec_parse_basic): Set what to complete next depending on
6440 token. Handle function and label completions specially.
6441 (parse_linespec): Disable objc shortcut in completion mode. Set
6442 what to complete next depending on token type. Skip keyword if in
6443 completion mode.
6444 (complete_linespec_component, linespec_complete): New.
6445 * linespec.h (linespec_complete): Declare.
6446
be966d42
PA
64472017-07-17 Pedro Alves <palves@redhat.com>
6448
6449 * linespec.c (linespec_lexer_lex_string, find_toplevel_char):
6450 Handle 'operator<' / 'operator<<'.
6451
a2459270
PA
64522017-07-17 Pedro Alves <palves@redhat.com>
6453
6454 * completer.c (collect_explicit_location_matches): Handle
6455 MATCH_LABEL.
6456 (convert_explicit_location_to_linespec): New, factored out from
6457 ...
6458 (convert_explicit_location_to_sals): ... this.
6459 (complete_label): New.
6460 (linespec_complete_label, find_label_symbols_in_block): New.
6461 (find_label_symbols): Add completion_mode parameter and adjust to
6462 call find_label_symbols_in_block.
6463 * linespec.h (linespec_complete_label): Declare.
6464
c6756f62
PA
64652017-07-17 Pedro Alves <palves@redhat.com>
6466
6467 * ada-lang.c (ada_collect_symbol_completion_matches): Add
6468 complete_symbol_mode parameter.
6469 * cli/cli-cmds.c (complete_command): Get the completion result out
6470 of the handle_brkchars tracker if used a custom word point.
6471 * completer.c: Include "linespec.h".
6472 (enum explicit_location_match_type) <MATCH_LINE>: New enumerator.
6473 (advance_to_expression_complete_word_point): New.
6474 (completion_tracker::completes_to_completion_word): New.
6475 (complete_files_symbols): Pass down
6476 complete_symbol_mode::EXPRESSION.
6477 (explicit_options, probe_options): New.
6478 (collect_explicit_location_matches): Complete on the
6479 explictit_loc->foo instead of word. Use
6480 linespec_complete_function. Handle MATCH_LINE. Handle offering
6481 keyword and options completions.
6482 (backup_text_ptr): Delete.
6483 (skip_keyword): New.
6484 (complete_explicit_location): Remove 'word' parameter. Add
6485 language, quoted_arg_start and quoted_arg_end parameters.
6486 Rewrite, parsing left to right.
6487 (location_completer): Rewrite.
6488 (location_completer_handle_brkchars): New function.
6489 (symbol_completer): Pass down complete_symbol_mode::EXPRESSION.
6490 (enum complete_line_internal_reason): Adjust comments.
6491 (completion_tracker::discard_completions): New.
6492 (completer_handle_brkchars_func_for_completer): Handle
6493 location_completer.
6494 (gdb_custom_word_point_brkchars)
6495 (gdb_org_rl_basic_quote_characters): New.
6496 (gdb_completion_word_break_characters_throw)
6497 (completion_find_completion_word): Handle trackers that use a
6498 custom word point.
6499 (completion_tracker::advance_custom_word_point_by): New.
6500 (completion_tracker::build_completion_result): Don't rely on
6501 readline appending the quote char.
6502 (gdb_rl_attempted_completion_function_throw): Handle trackers that
6503 use a custom word point.
6504 (gdb_rl_attempted_completion_function): Restore
6505 rl_basic_quote_characters.
6506 * completer.h (class completion_tracker): Extend intro comment.
6507 (completion_tracker::set_quote_char)
6508 (completion_tracker::quote_char)
6509 (completion_tracker::set_use_custom_word_point)
6510 (completion_tracker::use_custom_word_point)
6511 (completion_tracker::custom_word_point)
6512 (completion_tracker::set_custom_word_point)
6513 (completion_tracker::advance_custom_word_point_by)
6514 (completion_tracker::completes_to_completion_word)
6515 (completion_tracker::discard_completions): New methods.
6516 (completion_tracker::m_quote_char)
6517 (completion_tracker::m_use_custom_word_point)
6518 (completion_tracker::m_custom_word_point): New fields.
6519 (advance_to_expression_complete_word_point): Declare.
6520 * f-lang.c (f_collect_symbol_completion_matches): Add
6521 complete_symbol_mode parameter.
6522 * language.h (struct language_defn)
6523 <la_collect_symbol_completion_matches>: Add complete_symbol_mode
6524 parameter.
6525 * linespec.c (linespec_keywords): Add NULL terminator. Make extern.
6526 (linespec_complete_function): New function.
6527 (linespec_lexer_lex_keyword): Adjust.
6528 * linespec.h (linespec_keywords, linespec_complete_function): New
6529 declarations.
6530 * location.c (find_end_quote): New function.
6531 (explicit_location_lex_one): Add explicit_completion_info
6532 parameter. Save quoting info. Don't throw if being called for
6533 completion. Don't handle Ada operators here.
6534 (is_cp_operator, skip_op_false_positives, first_of)
6535 (explicit_location_lex_one_function): New function.
6536 (string_to_explicit_location): Replace 'dont_throw' parameter with
6537 an explicit_completion_info pointer parameter. Handle it. Don't
6538 use explicit_location_lex_one to lex function names. Use
6539 explicit_location_lex_one_function instead.
6540 * location.h (struct explicit_completion_info): New.
6541 (string_to_explicit_location): Replace 'dont_throw' parameter with
6542 an explicit_completion_info pointer parameter.
6543 * symtab.c (default_collect_symbol_completion_matches_break_on):
6544 Add complete_symbol_mode parameter. Handle LINESPEC mode.
6545 (default_collect_symbol_completion_matches)
6546 (collect_symbol_completion_matches): Add complete_symbol_mode
6547 parameter.
6548 (collect_symbol_completion_matches_type): Pass down
6549 complete_symbol_mode::EXPRESSION.
6550 (collect_file_symbol_completion_matches): Add complete_symbol_mode
6551 parameter. Handle LINESPEC mode.
6552 * symtab.h (complete_symbol_mode): New.
6553 (default_collect_symbol_completion_matches_break_on)
6554 (default_collect_symbol_completion_matches)
6555 (collect_symbol_completion_matches)
6556 (collect_file_symbol_completion_matches): Add complete_symbol_mode
6557 parameter.
6558
1d550c82
PA
65592017-07-17 Pedro Alves <palves@redhat.com>
6560
6561 * utils.c (enum class strncmp_iw_mode): New.
6562 (strcmp_iw): Rename to ...
6563 (strncmp_iw_with_mode): ... this. Add string2_len and mode
6564 parameters. Handle them.
6565 (strncmp_iw): New.
6566 (strcmp_iw): Reimplement as wrapper around strncmp_iw_with_mode.
6567 * utils.h (strncmp_iw): Declare.
6568 (strcmp_iw): Move describing comments here.
6569
8090b426
PA
65702017-07-17 Pedro Alves <palves@redhat.com>
6571
6572 * c-exp.y (operator_stoken): Use CP_OPERATOR_LEN and
6573 CP_OPERATOR_STR.
6574 * c-typeprint.c (is_type_conversion_operator): Use
6575 CP_OPERATOR_STR.
6576 * cp-support.c (LENGTH_OF_OPERATOR): Delete.
6577 (cp_find_first_component_aux): Use CP_OPERATOR_STR and
6578 CP_OPERATOR_LEN.
6579 * cp-support.h (CP_OPERATOR_STR, CP_OPERATOR_LEN): New.
6580 * gnu-v2-abi.c (gnuv2_is_operator_name): Use CP_OPERATOR_STR.
6581 * gnu-v3-abi.c (gnuv3_is_operator_name): Use CP_OPERATOR_STR.
6582 * linespec.c (linespec_lexer_lex_string): Use CP_OPERATOR_LEN and
6583 CP_OPERATOR_STR.
6584 * location.c: Include "cp-support.h".
6585 (explicit_location_lex_one): Use CP_OPERATOR_LEN and
6586 CP_OPERATOR_STR.
6587 * symtab.c (operator_chars): Use CP_OPERATOR_STR and
6588 CP_OPERATOR_LEN.
6589
6a2c1b87
PA
65902017-07-17 Pedro Alves <palves@redhat.com>
6591
6592 * cli/cli-cmds.c (complete_command): Use a completion tracker
6593 along with completion_find_completion_word for handle_brkchars
6594 phase.
6595 * completer.c (RL_QF_SINGLE_QUOTE, RL_QF_DOUBLE_QUOTE)
6596 (RL_QF_BACKSLASH, RL_QF_OTHER_QUOTE): New.
6597 (struct gdb_rl_completion_word_info): New.
6598 (gdb_rl_find_completion_word): New.
6599 (completion_find_completion_word): New.
6600 * completer.h (completion_find_completion_word): Declare.
6601
eb3ff9a5
PA
66022017-07-17 Pedro Alves <palves@redhat.com>
6603
6604 * ada-lang.c (symbol_completion_match): Adjust comments.
6605 (symbol_completion_add): Replace vector parameter with
6606 completion_tracker parameter. Use it.
6607 (ada_make_symbol_completion_list): Rename to...
6608 (ada_collect_symbol_completion_matches): ... this. Add
6609 completion_tracker parameter and use it.
6610 (ada_language_defn): Adjust.
6611 * break-catch-syscall.c (catch_syscall_completer): Adjust
6612 prototype and work with completion_tracker instead of VEC.
6613 * breakpoint.c (condition_completer): Adjust prototype and work
6614 with completion_tracker instead of VEC.
6615 * c-lang.c (c_language_defn, cplus_language_defn)
6616 (asm_language_defn, minimal_language_defn): Adjust to renames.
6617 * cli/cli-cmds.c (complete_command): Rework using
6618 completion_tracker. Catch exceptions when completing.
6619 * cli/cli-decode.c (integer_unlimited_completer)
6620 (complete_on_cmdlist, complete_on_enum): Adjust prototype and work
6621 with completion_tracker instead of VEC.
6622 * command.h (struct completion_tracker): Forward declare.
6623 (completer_ftype, completer_handle_brkchars_ftype): Change
6624 types.
6625 (complete_on_cmdlist, complete_on_enum): Adjust.
6626 * completer.c: Include <algorithm>.
6627 (struct gdb_completer_state): New.
6628 (current_completion): New global.
6629 (readline_line_completion_function): Delete.
6630 (noop_completer, filename_completer)
6631 (filename_completer_handle_brkchars, complete_files_symbols)
6632 (linespec_location_completer): Adjust to work with a
6633 completion_tracker instead of a VEC.
6634 (string_or_empty): New.
6635 (collect_explicit_location_matches): Adjust to work with a
6636 completion_tracker instead of a VEC.
6637 (explicit_location_completer): Rename to ...
6638 (complete_explicit_location): ... this and adjust to work with a
6639 completion_tracker instead of a VEC.
6640 (location_completer): Adjust to work with a completion_tracker
6641 instead of a VEC.
6642 (add_struct_fields): Adjust to work with a completion_list instead
6643 of VEC.
6644 (expression_completer): Rename to ...
6645 (complete_expression): ... this and adjust to work with a
6646 completion_tracker instead of a VEC. Use complete_files_symbols.
6647 (expression_completer): Reimplement on top of complete_expression.
6648 (symbol_completer): Adjust to work with a completion_tracker
6649 instead of a VEC.
6650 (enum complete_line_internal_reason): Add describing comments.
6651 (complete_line_internal_normal_command): Adjust to work with a
6652 completion_tracker instead of a VEC.
6653 (complete_line_internal): Rename to ...
6654 (complete_line_internal_1): ... this and adjust to work with a
6655 completion_tracker instead of a VEC. Assert TEXT is NULL in the
6656 handle_brkchars phase.
6657 (new_completion_tracker): Delete.
6658 (complete_line_internal): Reimplement as TRY/CATCH wrapper around
6659 complete_line_internal_1.
6660 (free_completion_tracker): Delete.
6661 (INITIAL_COMPLETION_HTAB_SIZE): New.
6662 (completion_tracker::completion_tracker)
6663 (completion_tracker::~completion_tracker): New.
6664 (maybe_add_completion): Delete.
6665 (completion_tracker::maybe_add_completion)
6666 (completion_tracker::add_completion)
6667 (completion_tracker::add_completions): New.
6668 (throw_max_completions_reached_error): Delete.
6669 (complete_line): Adjust to work with a completion_tracker instead
6670 of a VEC. Don't create a completion_tracker_t or check for max
6671 completions here.
6672 (command_completer, command_completer_handle_brkchars)
6673 (signal_completer, reg_or_group_completer_1)
6674 (reg_or_group_completer, default_completer_handle_brkchars):
6675 Adjust to work with a completion_tracker.
6676 (gdb_completion_word_break_characters_throw): New.
6677 (gdb_completion_word_break_characters): Reimplement.
6678 (line_completion_function): Delete.
6679 (completion_tracker::recompute_lowest_common_denominator)
6680 (expand_preserving_ws)
6681 (completion_tracker::build_completion_result)
6682 (completion_result::completion_result)
6683 (completion_result::completion_result)
6684 (completion_result::~completion_result)
6685 (completion_result::completion_result)
6686 (completion_result::release_match_list, compare_cstrings)
6687 (completion_result::sort_match_list)
6688 (completion_result::reset_match_list)
6689 (gdb_rl_attempted_completion_function_throw)
6690 (gdb_rl_attempted_completion_function): New.
6691 * completer.h (completion_list, struct completion_result)
6692 (class completion_tracker): New.
6693 (complete_line): Add completion_tracker parameter.
6694 (readline_line_completion_function): Delete.
6695 (gdb_rl_attempted_completion_function): New.
6696 (noop_completer, filename_completer, expression_completer)
6697 (location_completer, symbol_completer, command_completer)
6698 (signal_completer, reg_or_group_completer): Update prototypes.
6699 (completion_tracker_t, new_completion_tracker)
6700 (make_cleanup_free_completion_tracker): Delete.
6701 (enum maybe_add_completion_enum): Delete.
6702 (maybe_add_completion): Delete.
6703 (throw_max_completions_reached_error): Delete.
6704 * corefile.c (complete_set_gnutarget): Adjust to work with a
6705 completion_tracker instead of a VEC.
6706 * cp-abi.c (cp_abi_completer): Adjust to work with a
6707 completion_tracker instead of a VEC.
6708 * d-lang.c (d_language_defn): Adjust.
6709 * disasm.c (disassembler_options_completer): Adjust to work with a
6710 completion_tracker instead of a VEC.
6711 * f-lang.c (f_make_symbol_completion_list): Rename to ...
6712 (f_collect_symbol_completion_matches): ... this. Adjust to work
6713 with a completion_tracker instead of a VEC.
6714 (f_language_defn): Adjust.
6715 * go-lang.c (go_language_defn): Adjust.
6716 * guile/scm-cmd.c (cmdscm_add_completion, cmdscm_completer):
6717 Adjust to work with a completion_tracker instead of a VEC.
6718 * infrun.c (handle_completer): Likewise.
6719 * interps.c (interpreter_completer): Likewise.
6720 * interps.h (interpreter_completer): Likewise.
6721 * language.c (unknown_language_defn, auto_language_defn)
6722 (local_language_defn): Adjust.
6723 * language.h (language_defn::la_make_symbol_completion_list):
6724 Rename to ...
6725 (language_defn::la_collect_symbol_completion_matches): ... this
6726 and adjust to work with a completion_tracker instead of a VEC.
6727 * m2-lang.c (m2_language_defn): Adjust.
6728 * objc-lang.c (objc_language_defn): Adjust.
6729 * opencl-lang.c (opencl_language_defn): Adjust.
6730 * p-lang.c (pascal_language_defn): Adjust.
6731 * python/py-cmd.c (cmdpy_completer_helper): Handle NULL word.
6732 (cmdpy_completer_handle_brkchars, cmdpy_completer): Adjust to work
6733 with a completion_tracker.
6734 * rust-lang.c (rust_language_defn): Adjust.
6735 * symtab.c (free_completion_list, do_free_completion_list)
6736 (return_val, completion_tracker): Delete.
6737 (completion_list_add_name, completion_list_add_symbol)
6738 (completion_list_add_msymbol, completion_list_objc_symbol)
6739 (completion_list_add_fields, add_symtab_completions): Add
6740 completion_tracker parameter and use it.
6741 (default_make_symbol_completion_list_break_on_1): Rename to...
6742 (default_collect_symbol_completion_matches_break_on): ... this.
6743 Add completion_tracker parameter and use it instead of allocating
6744 a completion tracker here.
6745 (default_make_symbol_completion_list_break_on): Delete old
6746 implementation.
6747 (default_make_symbol_completion_list): Delete.
6748 (default_collect_symbol_completion_matches): New.
6749 (make_symbol_completion_list): Delete.
6750 (collect_symbol_completion_matches): New.
6751 (make_symbol_completion_type): Rename to ...
6752 (collect_symbol_completion_matches_type): ... this. Add
6753 completion_tracker parameter and use it instead of VEC.
6754 (make_file_symbol_completion_list_1): Rename to...
6755 (collect_file_symbol_completion_matches): ... this. Add
6756 completion_tracker parameter and use it instead of VEC.
6757 (make_file_symbol_completion_list): Delete.
6758 (add_filename_to_list): Use completion_list instead of a VEC.
6759 (add_partial_filename_data::list): Now a completion_list.
6760 (make_source_files_completion_list): Work with a completion_list
6761 instead of a VEC.
6762 * symtab.h: Include "completer.h".
6763 (default_make_symbol_completion_list_break_on)
6764 (default_make_symbol_completion_list, make_symbol_completion_list)
6765 (make_symbol_completion_type, make_file_symbol_completion_list)
6766 (make_source_files_completion_list): Delete.
6767 (default_collect_symbol_completion_matches_break_on)
6768 (default_collect_symbol_completion_matches)
6769 (collect_symbol_completion_matches)
6770 (collect_symbol_completion_matches_type)
6771 (collect_file_symbol_completion_matches)
6772 (make_source_files_completion_list): New.
6773 * top.c (init_main): Don't install a rl_completion_entry_function
6774 hook. Install a rl_attempted_completion_function hook instead.
6775 * tui/tui-layout.c (layout_completer): Adjust to work with a
6776 completion_tracker.
6777 * tui/tui-regs.c (tui_reggroup_completer):
6778 * tui/tui-win.c (window_name_completer, focus_completer)
6779 (winheight_completer): Adjust to work with a completion_tracker.
6780 * value.c: Include "completer.h".
6781 (complete_internalvar): Adjust to work with a completion_tracker.
6782 * value.h (complete_internalvar): Likewise.
6783
6e1dbf8c
PA
67842017-07-17 Pedro Alves <palves@redhat.com>
6785
6786 * cli/cli-decode.c (set_cmd_completer_handle_brkchars): Adjust to
6787 renames.
6788 * cli/cli-decode.h (struct cmd_list_element) <completer>: Move
6789 comments to completer_ftype's declaration.
6790 <completer_handle_brkchars>: Change type to
6791 completer_handle_brkchars_ftype.
6792 * command.h (completer_ftype): Add describing comment and give
6793 names to parameters.
6794 (completer_ftype_void): Rename to ...
6795 (completer_handle_brkchars_ftype) ... this. Add describing comment.
6796 (set_cmd_completer_handle_brkchars): Adjust.
6797 * completer.c (filename_completer_handle_brkchars): New function.
6798 (complete_line_internal_normal_command): New function, factored
6799 out from ...
6800 (complete_line_internal): ... here.
6801 (command_completer_handle_brkchars)
6802 (default_completer_handle_brkchars)
6803 (completer_handle_brkchars_func_for_completer): New functions.
6804 * completer.h (set_gdb_completion_word_break_characters): Delete
6805 declaration.
6806 (completer_handle_brkchars_func_for_completer): New declaration.
6807 * python/py-cmd.c (cmdpy_completer_handle_brkchars): Adjust to use
6808 completer_handle_brkchars_func_for_completer.
6809
78b13106
PA
68102017-07-17 Pedro Alves <palves@redhat.com>
6811
6812 * completer.c (symbol_completer): New function, based on
6813 make_symbol_completion_list_fn.
6814 * completer.h (symbol_completer): New declaration.
6815 * guile/scm-cmd.c (cmdscm_completers): Adjust.
6816 * python/py-cmd.c (completers): Adjust.
6817 * symtab.c (make_symbol_completion_list_fn): Delete.
6818 * symtab.h (make_symbol_completion_list_fn): Delete.
6819 * cli/cli-decode.c (add_cmd): Adjust.
6820
bbf2f4df
PA
68212017-07-17 Pedro Alves <palves@redhat.com>
6822
6823 * Makefile.in (COMMON_OBS): Add filename-seen-cache.o.
6824 * dwarf2read.c: Include "filename-seen-cache.h".
6825 * dwarf2read.c (dwarf2_per_objfile) <filenames_cache>: New field.
6826 (dw2_map_symbol_filenames): Build and use a filenames_seen_cache.
6827 * filename-seen-cache.c: New file.
6828 * filename-seen-cache.h: New file.
6829 * symtab.c: Include "filename-seen-cache.h".
6830 (struct filename_seen_cache, INITIAL_FILENAME_SEEN_CACHE_SIZE)
6831 (create_filename_seen_cache, clear_filename_seen_cache)
6832 (delete_filename_seen_cache, filename_seen): Delete, parts moved
6833 to filename-seen-cache.h/filename-seen-cache.c.
6834 (output_source_filename, sources_info)
6835 (maybe_add_partial_symtab_filename)
6836 (make_source_files_completion_list): Adjust to use
6837 filename_seen_cache.
6838
330cdd98
PA
68392017-07-17 Pedro Alves <palves@redhat.com>
6840
6841 * dwarf2read.c (dwarf2_per_objfile): In-class initialize all
6842 fields.
6843 (dwarf2_per_objfile::dwarf2_per_objfile(objfile*, const
6844 dwarf2_debug_sections*)): New.
6845 (dwarf2_per_objfile::dwarf2_per_objfile(const
6846 dwarf2_per_objfile&)): Declare as deleted.
6847 (dwarf2_per_objfile::operator=): Declare as deleted.
6848 (dwarf2_per_objfile::dwarf2_per_objfile)
6849 (dwarf2_per_objfile::~dwarf2_per_objfile)
6850 (dwarf2_per_objfile::free_cached_comp_units): New.
6851 (dwarf2_has_info): dwarf2_per_objfile initialization code moved to
6852 ctor. Call dwarf2_per_objfile's ctor manually.
6853 (dwarf2_locate_sections): Deleted/refactored as ...
6854 (dwarf2_per_objfile::locate_sections): ... this new method.
6855 (free_cached_comp_units): Defer to
6856 dwarf2_per_objfile::free_cached_comp_units.
6857 (dwarf2_free_objfile): Call dwarf2_per_objfile's dtor manually.
6858
8880f2a9
TT
68592017-07-14 Tom Tromey <tom@tromey.com>
6860
6861 PR rust/21764:
6862 * rust-exp.y (convert_ast_to_expression): Add "want_type"
6863 parameter.
6864 <UNOP_SIZEOF>: Split into separate case.
6865 <UNOP_VAR_VALUE>: Handle want_type. Add error case.
6866
65547233
TT
68672017-07-14 Tom Tromey <tom@tromey.com>
6868
6869 PR rust/21763:
6870 * symtab.c (symbol_matches_domain): Add language_rust to special
6871 case.
6872 * rust-exp.y (convert_ast_to_expression) <OP_VAR_VALUE>: Don't
6873 treat LOC_TYPEDEF symbols as variables.
6874
8f14146e
PA
68752017-07-14 Pedro Alves <palves@redhat.com>
6876
6877 * symtab.c (make_file_symbol_completion_list_1): Iterate over
6878 symtabs matching all symtabs with SRCFILE as file name instead of
6879 only considering the first hit, with lookup_symtab.
6880
2347965c
SM
68812017-07-14 Simon Marchi <simon.marchi@ericsson.com>
6882
6883 * ax-gdb.c (gen_aggregate_elt_ref): Remove operand_name and
6884 operator_name parameters.
6885 (gen_expr): Update function call.
6886
40f4af28
SM
68872017-07-14 Simon Marchi <simon.marchi@ericsson.com>
6888
6889 * dwarf2loc.h (dwarf2_compile_expr_to_ax): Remove gdbarch
6890 parameter.
6891 * symtab.h (struct symbol_computed_ops::tracepoint_var_ref):
6892 Likewise.
6893 * dwarf2loc.c (dwarf2_compile_expr_to_ax): Remove gdbarch
6894 parameter, use agent_expr::gdbarch instead, update function
6895 calls.
6896 (locexpr_tracepoint_var_ref): Likewise.
6897 (loclist_tracepoint_var_ref): Likewise.
6898 * ax-gdb.c (gen_trace_static_fields): Likewise.
6899 (gen_traced_pop): Likewise.
6900 (gen_frame_args_address): Likewise.
6901 (gen_frame_locals_address): Likewise.
6902 (gen_var_ref): Likewise.
6903 (gen_struct_ref_recursive): Likewise.
6904 (gen_static_field): Likewise.
6905 (gen_maybe_namespace_elt): Likewise.
6906 (gen_expr): Likewise.
6907 (gen_trace_for_var): Likewise.
6908 (gen_trace_for_expr): Likewise.
6909 (gen_trace_for_return_address): Likewise.
6910
053f8057
SM
69112017-07-14 Simon Marchi <simon.marchi@ericsson.com>
6912
6913 * ax-gdb.c (gen_deref, gen_address_of): Remove unused ax
6914 parameter.
6915 (gen_struct_ref, gen_expr, gen_expr_binop_rest): Update call.
6916
6661ad48
SM
69172017-07-14 Simon Marchi <simon.marchi@ericsson.com>
6918
6919 * ax-gdb.c (gen_usual_unary): Remove exp parameter, get gdbarch
6920 from ax, update calls.
6921 (gen_usual_arithmetic): Likewise.
6922 (gen_integral_promotions): Likewise.
6923 (gen_bitfield_ref): Likewise.
6924 (gen_primitive_field): Likewise.
6925 (gen_struct_ref_recursive): Likewise.
6926 (gen_struct_ref): Likewise.
6927 (gen_maybe_namespace_elt): Likewise.
6928 (gen_struct_elt_for_reference): Likewise.
6929 (gen_namespace_elt): Likewise.
6930 (gen_aggregate_elt_ref): Likewise.
6931 (gen_expr): Get gdbarch from ax, update calls.
6932 (gen_expr_binop_rest): Likewise.
6933
c55a47e7
PA
69342017-07-13 Pedro Alves <palves@redhat.com>
6935
6936 * amd64-darwin-tdep.c (x86_darwin_init_abi_64): Pass tdesc_amd64
6937 as default tdesc.
6938 * amd64-dicos-tdep.c (amd64_dicos_init_abi):
6939 * amd64-fbsd-tdep.c (amd64fbsd_init_abi):
6940 * amd64-linux-tdep.c (amd64_linux_init_abi): Pass
6941 tdesc_amd64_linux as default tdesc. Get final tdesc from the
6942 tdep.
6943 (amd64_x32_linux_init_abi): Pass tdesc_x32_linux as default tdesc.
6944 Get final tdesc from the tdep.
6945 * amd64-nbsd-tdep.c (amd64nbsd_init_abi): Pass tdesc_amd64 as
6946 default tdesc.
6947 * amd64-obsd-tdep.c (amd64obsd_init_abi): Likewise.
6948 * amd64-sol2-tdep.c (amd64_sol2_init_abi): Likewise.
6949 * amd64-tdep.c (amd64_init_abi): Add 'default_tdesc' parameter.
6950 Use it as default tdesc.
6951 (amd64_x32_init_abi): Add 'default_tdesc' parameter, and pass it
6952 down to amd_init_abi. No longer handle fallback tdesc here.
6953 * amd64-tdep.h (tdesc_x32): Declare.
6954 (amd64_init_abi, amd64_x32_init_abi): Add 'default_tdesc'
6955 parameter.
6956 * amd64-windows-tdep.c (amd64_windows_init_abi): Pass tdesc_amd64
6957 as default tdesc.
6958
55efceab
AA
69592017-07-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
6960
6961 * s390-linux-tdep.c (s390_process_record): Add support for
6962 instructions new in arch12.
6963
0aa37b65
JB
69642017-07-11 John Baldwin <jhb@FreeBSD.org>
6965
6966 * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers): Use
6967 PT_GETFSBASE and PT_GETGSBASE.
6968 (amd64bsd_store_inferior_registers): Use PT_SETFSBASE and
6969 PT_SETGSBASE.
6970
48aeef91
JB
69712017-07-11 John Baldwin <jhb@FreeBSD.org>
6972
6973 * features/Makefile (amd64.dat, amd64-avx.dat, amd64-mpx.dat)
6974 (amd64-avx-mpx.dat, amd64-avx-avx512.dat)
6975 (amd64-avx-mpx-avx512-pku.dat): Add i386/64bit-segments.xml in
6976 those rules.
6977 * features/i386/amd64-avx-avx512.xml: Add 64bit-segments.xml.
6978 * features/i386/amd64-avx-mpx-avx512-pku.xml: Add 64bit-segments.xml.
6979 * features/i386/amd64-avx-mpx.xml: Add 64bit-segments.xml.
6980 * features/i386/amd64-avx.xml: Add 64bit-segments.xml.
6981 * features/i386/amd64-mpx.xml: Add 64bit-segments.xml.
6982 * features/i386/amd64.xml: Add 64bit-segments.xml.
6983 * features/i386/amd64-avx-avx512.c: Regenerated.
6984 * features/i386/amd64-avx-mpx-avx512-pku.c: Regenerated.
6985 * features/i386/amd64-avx-mpx.c: Regenerated.
6986 * features/i386/amd64-avx.c: Regenerated.
6987 * features/i386/amd64-mpx.c: Regenerated.
6988 * features/i386/amd64.c: Regenerated.
6989 * regformats/i386/amd64-avx-avx512.dat: Regenerated.
6990 * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Regenerated.
6991 * regformats/i386/amd64-avx-mpx.dat: Regenerated.
6992 * regformats/i386/amd64-avx.dat: Regenerated.
6993 * regformats/i386/amd64-mpx.dat: Regenerated.
6994 * regformats/i386/amd64.dat: Regenerated.
6995
77c501bc
YQ
69962017-07-10 Yao Qi <yao.qi@linaro.org>
6997
6998 * features/i386/amd64-avx-avx512-linux.c: Re-generated.
6999 * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Re-generated.
7000
6dc8d757
AK
70012017-07-10 Anton Kolesov <Anton.Kolesov@synopsys.com>
7002
7003 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add setenv and
7004 unsetenv.
7005 * gnulib/aclocal.m4: Regenerate.
7006 * gnulib/config.in: Regenerate.
7007 * gnulib/configure: Regenerate.
7008 * gnulib/import/Makefile.am: Regenerate.
7009 * gnulib/import/Makefile.in: Regenerate.
7010 * gnulib/import/m4/gnulib-cache.m4: Regenerate.
7011 * gnulib/import/m4/gnulib-comp.m4: Regenerate.
7012 * gnulib/import/m4/environ.m4: New file.
7013 * gnulib/import/m4/setenv.m4: New file.
7014 * gnulib/import/setenv.c: New file.
7015 * gnulib/import/unsetenv.c: New file.
7016
266934d1
SM
70172017-07-09 Simon Marchi <simon.marchi@ericsson.com>
7018
7019 * compile/compile-loc2c.c (do_compile_dwarf_expr_to_c): Read
7020 address when op is DW_OP_addr.
7021
03278692
TT
70222017-07-09 Tom Tromey <tom@tromey.com>
7023
7024 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Reverse size
7025 check and apply to outer type.
7026
4b654465
JB
70272017-07-07 John Baldwin <jhb@FreeBSD.org>
7028
7029 * fbsd-tdep.c (LWPINFO_OFFSET, LWPINFO_PL_FLAGS)
7030 (LWPINFO64_PL_SIGINFO, LWPINFO32_PL_SIGINFO, PL_FLAG_SI)
7031 (SIZE64_SIGINFO_T, SIZE32_SIGINFO_T, fbsd_core_xfer_siginfo): New.
7032 (fbsd_init_abi): Install gdbarch "core_xfer_siginfo" method.
7033
2af9fc44
JB
70342017-07-07 John Baldwin <jhb@FreeBSD.org>
7035
7036 * fbsd-tdep.c (fbsd_core_thread_name): Use thread_section_name.
7037
382b69bb
JB
70382017-07-07 John Baldwin <jhb@FreeBSD.org>
7039
7040 * corelow.c (get_core_siginfo): Remove.
7041 (core_xfer_partial): Use the gdbarch "core_xfer_siginfo" method
7042 instead of get_core_siginfo.
7043 * gdbarch.sh (core_xfer_siginfo): New gdbarch callback.
7044 * gdbarch.h: Re-generate.
7045 * gdbarch.c: Re-generate.
7046 * linux-tdep.c (linux_core_xfer_siginfo): New.
7047 (linux_init_abi): Install gdbarch "core_xfer_siginfo" method.
7048
6e5eab33
JB
70492017-07-07 John Baldwin <jhb@FreeBSD.org>
7050
7051 * corelow.c (thread_section_name): Move to ...
7052 * gdbcore.h (thread_section_name): ... here.
7053
929edea9
JB
70542017-07-07 John Baldwin <jhb@FreeBSD.org>
7055
7056 * fbsd-nat.c [PT_LWPINFO && __LP64__] (union sigval32)
7057 (struct siginfo32): New.
7058 [PT_LWPINFO] (fbsd_siginfo_size, fbsd_convert_siginfo): New.
7059 (fbsd_xfer_partial) [PT_LWPINFO]: Handle TARGET_OBJECT_SIGNAL_INFO
7060 via ptrace(PT_LWPINFO).
7061
762c974a
JB
70622017-07-07 John Baldwin <jhb@FreeBSD.org>
7063
7064 * fbsd-tdep.c (fbsd_gdbarch_data_handle, struct fbsd_gdbarch_data)
7065 (init_fbsd_gdbarch_data, get_fbsd_gdbarch_data)
7066 (fbsd_get_siginfo_type): New.
7067 (fbsd_init_abi): Install gdbarch "get_siginfo_type" method.
7068 (_initialize_fbsd_tdep): New.
7069
33c5cd75
DB
70702017-07-06 David Blaikie <dblaikie@gmail.com>
7071
7072 * dwarf2read.c (struct dwo_file): Use a htab of dwo_unit* (rather than
7073 a singular dwo_unit*) to support multiple CUs in the same way that
7074 multiple TUs are supported.
7075 (create_cus_hash_table): Replace create_dwo_cu with a function for
7076 parsing multiple CUs from a DWO file.
7077 (open_and_init_dwo_file): Use create_cus_hash_table rather than
7078 create_dwo_cu.
7079 (lookup_dwo_cutu): Lookup CU in the hash table in the dwo_file with
7080 htab_find, rather than comparing the signature to a singleton CU in
7081 the dwo_file.
7082
8455d262
PA
70832017-07-06 Pedro Alves <palves@redhat.com>
7084
7085 * python/py-unwind.c (pyuw_dealloc_cache): Fix for loop condition.
7086
4da3eb35
PA
70872017-07-04 Pedro Alves <palves@redhat.com>
7088
7089 * gdbtypes.c (recursive_dump_type): Don't reference TYPE_STATIC.
7090 * gdbtypes.h (TYPE_STATIC): Delete.
7091 (struct fn_field) <is_public, is_abstract, is_static, is_final,
7092 is_synchronized, is_native>: Delete.
7093 <dummy>: Bump.
7094 (TYPE_FN_FIELD_PUBLIC, TYPE_FN_FIELD_STATIC, TYPE_FN_FIELD_FINAL)
7095 (TYPE_FN_FIELD_SYNCHRONIZED, TYPE_FN_FIELD_NATIVE)
7096 (TYPE_FN_FIELD_ABSTRACT): Delete.
7097
5bfd255c
SM
70982017-07-03 Simon Marchi <simon.marchi@ericsson.com>
7099
7100 * buffer.h (buffer_finish): Fix spelling mistakes.
7101
25c54127
EZ
71022017-07-01 Eli Zaretskii <eliz@gnu.org>
7103
7104 * .dir-locals.el: Automatically switch to C-style comments in
7105 versions of Emacs that support the feature.
7106
dc4bde35
SDJ
71072017-06-30 Sergio Durigan Junior <sergiodj@redhat.com>
7108 Pedro Alves <palves@redhat.com>
7109
7110 PR cli/21688
7111 * cli/cli-script.c (command_name_equals_not_inline): Remove function.
7112 (process_next_line): New variable 'inline_cmd'.
7113 Adjust 'if' clauses for "python", "compile" and "guile" to use
7114 'command_name_equals' and check for '!inline_cmd'.
7115
51ed89aa
SDJ
71162017-06-30 Sergio Durigan Junior <sergiodj@redhat.com>
7117
7118 PR cli/21688
7119 * cli/cli-script.c (command_name_equals_not_inline): New function.
7120 (process_next_line): Adjust 'if' clauses for "python", "compile"
7121 and "guile" to use command_name_equals_not_inline.
7122
eb17d413
PA
71232017-06-29 Pedro Alves <palves@redhat.com>
7124
7125 * completer.c (expression_completer): Call
7126 linespec_location_completer instead of location_completer.
7127
195bcdd5
PA
71282017-06-29 Pedro Alves <palves@redhat.com>
7129
7130 * completer.c (expression_completer): Remove code that recomputes
7131 'text' from 'word'.
7132
adc764e7
YQ
71332017-06-29 Yao Qi <yao.qi@linaro.org>
7134
7135 * regformats/regdat.sh: Generate code with
7136 "ifndef IN_PROCESS_AGENT".
7137
6e75794e
PA
71382017-06-28 Pedro Alves <palves@redhat.com>
7139
7140 * command.h: Include "common/scoped_restore.h".
7141
bc491f2e
YQ
71422017-06-28 Yao Qi <yao.qi@linaro.org>
7143
7144 * mi/mi-cmd-break.c (mi_argv_to_format): Use obstack_grow_str
7145 instead of obstack_grow.
7146
41664b45
DG
71472017-06-28 Doug Gilmore <Doug.Gilmore@imgtec.com>
7148
7149 PR gdb/21337
7150 * symfile.c (reread_symbols): Call objfiles_changed just before
7151 read_symbols.
7152
6da67eb1
PA
71532017-06-27 Pedro Alves <palves@redhat.com>
7154
7155 * symtab.c (COMPLETION_LIST_ADD_SYMBOL)
7156 (MCOMPLETION_LIST_ADD_SYMBOL): Delete macros, replace with ...
7157 (completion_list_add_symbol, completion_list_add_msymbol):
7158 ... these new functions.
7159 (add_symtab_completions)
7160 (default_make_symbol_completion_list_break_on_1): Adjust.
7161
23732b1e
PA
71622017-06-27 Pedro Alves <palves@redhat.com>
7163
7164 * objfiles.c (get_objfile_bfd_data): Call bfd_alloc instead of
7165 bfd_zalloc. Call objfile_per_bfd_storage's ctor.
7166 (free_objfile_per_bfd_storage): Call objfile_per_bfd_storage's
7167 dtor.
7168 * objfiles.h (objfile_per_bfd_storage): Add ctor. Make
7169 'storage_obstack' field an auto_obstack. In-class initialize all
7170 non-bitfield fields. Make minsyms_read bool.
7171 * symfile.c (read_symbols): Adjust.
7172
a4d1e79a
AH
71732017-06-27 Alan Hayward <alan.hayward@arm.com>
7174
7175 * remote-sim.c (gdbsim_fetch_register): Use byte_vector.
7176 (gdbsim_store_register): Likewise.
7177
8268c778
PA
71782017-06-27 Pedro Alves <palves@redhat.com>
7179
7180 * c-exp.y (name_obstack): Now an auto_obstack.
7181 (yylex): Use auto_obstack::clear.
7182 (c_parse): Use auto_obstack::clear instead of reinitializing and
7183 freeing the obstack.
7184 * c-lang.c (evaluate_subexp_c): Use auto_obstack.
7185 * d-exp.y (name_obstack): Now an auto_obstack.
7186 (yylex): Use auto_obstack::clear.
7187 (d_parse): Use auto_obstack::clear instead of reinitializing and
7188 freeing the obstack.
7189 * dwarf2loc.c (fetch_const_value_from_synthetic_pointer): Use
7190 auto_obstack.
7191 * dwarf2read.c (create_addrmap_from_index)
7192 (dwarf2_build_psymtabs_hard)
7193 (update_enumeration_type_from_children): Likewise.
7194 * gdb_obstack.h (auto_obstack): New type.
7195 * go-exp.y (name_obstack): Now an auto_obstack.
7196 (build_packaged_name): Use auto_obstack::clear.
7197 (go_parse): Use auto_obstack::clear instead of reinitializing and
7198 freeing the obstack.
7199 * linux-tdep.c (linux_make_mappings_corefile_notes): Use
7200 auto_obstack.
7201 * printcmd.c (printf_wide_c_string, ui_printf): Use auto_obstack.
7202 * rust-exp.y (work_obstack): Now an auto_obstack.
7203 (rust_parse, rust_lex_tests): Use auto_obstack::clear instead of
7204 reinitializing and freeing the obstack.
7205 * utils.c (do_obstack_free, make_cleanup_obstack_free): Delete.
7206 (host_char_to_target): Use auto_obstack.
7207 * utils.h (make_cleanup_obstack_free): Delete declaration.
7208 * valprint.c (generic_emit_char, generic_printstr): Use
7209 auto_obstack.
7210
db665f42
SM
72112017-06-27 Simon Marchi <simon.marchi@ericsson.com>
7212
7213 * darwin-nat.c (darwin_check_new_threads): Don't handle dummy
7214 thread.
7215 (darwin_init_thread_list): Don't update dummy thread.
7216 (darwin_create_inferior, darwin_attach): Don't add a dummy thread.
7217
873c0814
SM
72182017-06-26 Simon Marchi <simon.marchi@ericsson.com>
7219
7220 * record-full.c (netorder16): Remove.
7221
8b5a7a6e
SM
72222017-06-26 Simon Marchi <simon.marchi@ericsson.com>
7223
7224 * common/diagnostics.h: Define macros for GCC.
7225 (DIAGNOSTIC_IGNORE_UNUSED_FUNCTION): New macro.
7226 * common/vec.h: Include diagnostics.h.
7227 (DIAGNOSTIC_IGNORE_UNUSED_VEC_FUNCTION): New macro.
7228 (DEF_VEC_I, DEF_VEC_P, DEF_VEC_O): Ignore -Wunused-function
7229 warning.
7230
d1435379
SM
72312017-06-26 Simon Marchi <simon.marchi@ericsson.com>
7232
7233 * common/diagnostics.h (DIAGNOSTIC_IGNORE_DEPRECATED_REGISTER):
7234 New macro.
7235 * ada-lex.l: Ignore deprecated register warnings.
7236
cc75e0fd
SM
72372017-06-25 Simon Marchi <simon.marchi@ericsson.com>
7238
7239 * main.c (get_init_files): Replace "SYSTEM_GDBINIT +
7240 datadir_len" with "&SYSTEM_GDBINIT[datadir_len]".
7241
07809eaf
SM
72422017-06-25 Simon Marchi <simon.marchi@ericsson.com>
7243
7244 * dtrace-probe.c (dtrace_process_dof_probe): Put semi-colon on
7245 its own line.
7246
f076f034
SM
72472017-06-25 Simon Marchi <simon.marchi@ericsson.com>
7248
7249 * nat/x86-dregs.c (x86_show_dr): Print registers one per line.
7250
0dd5cbc5
AH
72512017-06-23 Alan Hayward <alan.hayward@arm.com>
7252
7253 * xtensa-tdep.c (XTENSA_MAX_REGISTER_SIZE): Add.
7254 (xtensa_register_write_masked): Use XTENSA_MAX_REGISTER_SIZE.
7255 (xtensa_register_read_masked): Likewise.
7256
d4c6ce5b
SDJ
72572017-06-22 Sergio Durigan Junior <sergiodj@redhat.com>
7258
7259 * common/environ.c (gdb_environ::unset): Update comment.
7260
16892a03
AH
72612017-06-22 Alan Hayward <alan.hayward@arm.com>
7262
7263 * python/py-unwind.c (pyuw_sniffer): Allocate space for
7264 registers.
7265
d7dcbefc
AH
72662017-06-22 Alan Hayward <alan.hayward@arm.com>
7267
7268 * record-full.c (record_full_exec_insn): Use byte_vector.
7269
b30ff123
YQ
72702017-06-22 Yao Qi <yao.qi@linaro.org>
7271
7272 * regformats/i386/amd64-avx-mpx-avx512-pku-linux.dat: Regenerated.
7273 * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Regenerated.
7274
4fa847d7
AH
72752017-06-22 Alan Hayward <alan.hayward@arm.com>
7276
7277 * remote.c (cached_reg): Move from here...
7278 * regcache.h (cached_reg): ...to here.
7279 * python/py-unwind.c (struct reg_info): Remove.
7280 (cached_frame_info): Use cached_reg_t.
7281 (pyuw_prev_register): Likewise.
7282 (pyuw_sniffer): Use cached_reg_t and allocate registers.
7283 (pyuw_dealloc_cache): Free all registers.
7284
f4906a9a
PA
72852017-06-22 Pedro Alves <palves@redhat.com>
7286 Simon Marchi <simon.marchi@ericsson.com>
7287
7288 * unittests/environ-selftests.c (run_tests): Ignore -Wself-move
7289 warning.
7290 * common/diagnostics.h: New file.
7291
b45a1208
PA
72922017-06-22 Pedro Alves <palves@redhat.com>
7293
7294 * common/agent.h: Add include guards.
7295
e4da2c61
SM
72962017-06-21 Simon Marchi <simon.marchi@ericsson.com>
7297
7298 * target.h (struct target_ops) <to_xfer_partial>: Update doc to
7299 talk about addressable units instead of bytes.
7300
96160d60
SDJ
73012017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
7302
7303 * common/environ.c (gdb_environ::unset): Use '::iterator' instead
7304 of '::const_iterator'.
7305
9a6c7d9c
SDJ
73062017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
7307
7308 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
7309 'unittests/environ-selftests.c'.
7310 (SUBDIR_UNITTESTS_OBS): Add 'environ-selftests.o'.
7311 * charset.c (find_charset_names): Declare object 'iconv_env'.
7312 Update code to use 'iconv_env' object. Remove call to
7313 'free_environ'.
7314 * common/environ.c: Include <utility>.
7315 (make_environ): Delete function.
7316 (free_environ): Delete function.
7317 (gdb_environ::clear): New function.
7318 (gdb_environ::operator=): New function.
7319 (gdb_environ::get): Likewise.
7320 (environ_vector): Delete function.
7321 (set_in_environ): Delete function.
7322 (gdb_environ::set): New function.
7323 (unset_in_environ): Delete function.
7324 (gdb_environ::unset): New function.
7325 (gdb_environ::envp): Likewise.
7326 * common/environ.h: Include <vector>.
7327 (struct gdb_environ): Delete; transform into...
7328 (class gdb_environ): ... this class.
7329 (free_environ): Delete prototype.
7330 (init_environ, get_in_environ, set_in_environ, unset_in_environ,
7331 environ_vector): Likewise.
7332 * infcmd.c (run_command_1): Update code to call
7333 'envp' from 'gdb_environ' class.
7334 (environment_info): Update code to call methods from 'gdb_environ'
7335 class.
7336 (unset_environment_command): Likewise.
7337 (path_info): Likewise.
7338 (path_command): Likewise.
7339 * inferior.c (inferior::~inferior): Delete call to 'free_environ'.
7340 (inferior::inferior): Initialize 'environment' using the host's
7341 information.
7342 * inferior.h: Remove forward declaration of 'struct gdb_environ'.
7343 Include "environ.h".
7344 (class inferior) <environment>: Change type from 'struct
7345 gdb_environ' to 'gdb_environ'.
7346 * mi/mi-cmd-env.c (mi_cmd_env_path): Update code to call
7347 methods from 'gdb_environ' class.
7348 * solib.c (solib_find_1): Likewise
7349 * unittests/environ-selftests.c: New file.
7350
75c554cf
YQ
73512017-06-20 Yao Qi <yao.qi@linaro.org>
7352
7353 * features/i386/i386-linux.xml: Exchange the order of including
7354 32bit-linux.xml and 32bit-sse.xml.
7355 * features/i386/i386-linux.c: Regenerated.
7356
72ddacb7
YQ
73572017-06-20 Yao Qi <yao.qi@linaro.org>
7358
7359 * target-descriptions.c (tdesc_reg): Add ctor, dtor.
7360 Delete copy ctor and assignment operator.
7361 (tdesc_type): Likewise.
7362 (tdesc_feature): Likewise.
7363 (tdesc_free_reg): Remove.
7364 (tdesc_create_reg): Use new.
7365 (tdesc_free_type): Remove.
7366 (tdesc_create_vector): Use new.
7367 (tdesc_create_union): Likewise.
7368 (tdesc_create_flags): Likewise.
7369 (tdesc_create_enum): Likewise.
7370 (tdesc_free_feature): Delete.
7371 (free_target_description): Use delete.
7372
325c9fd4
JB
73732017-06-19 John Baldwin <jhb@FreeBSD.org>
7374
7375 * mips-tdep.c (print_gp_register_row): Don't error for unavailable
7376 registers.
7377
16b7a719
PA
73782017-06-19 Pedro Alves <palves@redhat.com>
7379
7380 * dwarf2read.c (write_psymtabs_to_index): Construct file_closer
7381 after gdb::unlinker.
7382
1c8e01c9
SDJ
73832017-06-19 Sergio Durigan Junior <sergiodj@redhat.com>
7384
7385 * mi/mi-cm-env.c (_initialize_mi_cmd_env): Use getenv instead of
7386 gdb_environ to access an environment variable.
7387
ffce45d2
TP
73882017-06-18 Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
7389
7390 * nat/linux-ptrace.c (linux_fork_to_function): Add cast to
7391 gdb_byte*.
7392
1d4fbac9
SM
73932017-06-17 Simon Marchi <simon.marchi@ericsson.com>
7394
7395 * nat/fork-inferior.h (trace_start_error): Add ATTRIBUTE_PRINTF.
7396
8465943a
SM
73972017-06-17 Simon Marchi <simon.marchi@ericsson.com>
7398
7399 * configure: Re-generate.
7400 * warning.m4 (build_warnings): Add -Wno-mismatched-tags.
7401
3e019bdc
SM
74022017-06-17 Simon Marchi <simon.marchi@ericsson.com>
7403
7404 * configure: Re-generate.
7405 * warning.m4: Pass -Werror to compiler when checking for
7406 supported warning flags.
7407
cf0dd6f0
SM
74082017-06-17 Simon Marchi <simon.marchi@ericsson.com>
7409
7410 * Makefile.in (COMPILE.pre): Add "-x c++".
7411
6f98355c
YQ
74122017-06-16 Alan Hayward <alan.hayward@arm.com>
7413 Pedro Alves <palves@redhat.com>
7414 Yao Qi <yao.qi@linaro.org>
7415
7416 * defs.h (RequireLongest): New.
7417 (extract_integer): Declare function template.
7418 (extract_signed_integer): Remove the declaration, but define it
7419 static inline.
7420 (extract_unsigned_integer): Likewise.
7421 (store_integer): Declare function template.
7422 (store_signed_integer): Remove the declaration, but define it
7423 static inline.
7424 (store_unsigned_integer): Likewise.
7425 * findvar.c (extract_integer): New function template.
7426 (extract_signed_integer): Remove.
7427 (extract_unsigned_integer): Remove.
7428 (extract_integer<LONGEST>, extract_integer<ULONGEST>): Explicit
7429 instantiations.
7430 (store_integer): New function template.
7431 (store_signed_integer): Remove.
7432 (store_unsigned_integer): Remove.
7433 (store_integer): Explicit instantiations.
7434 * regcache.c (regcache_raw_read_signed): Update.
7435 (regcache::raw_read): New function.
7436 (regcache::raw_read_signed): Remove.
7437 (regcache::raw_read_unsigned): Remove.
7438 (regcache_raw_read_unsigned): Update.
7439 (regcache_raw_write_unsigned): Update.
7440 (regcache::raw_write_signed): Remove.
7441 (regcache::raw_write): New function.
7442 (regcache_cooked_read_signed): Update.
7443 (regcache::raw_write_unsigned): Remove.
7444 (regcache::cooked_read_signed): Remove.
7445 (regcache_cooked_read_unsigned): Update.
7446 (regcache::cooked_read_unsigned): Remove.
7447 (regcache_cooked_write_signed): Update.
7448 (regcache_cooked_write_unsigned): Update.
7449 * regcache.h (regcache) <raw_read_signed>: Remove.
7450 <raw_write_signed, raw_read_unsigned, raw_write_unsigned>: Remove.
7451 <raw_read, raw_write>: New.
7452 <cooked_read_signed, cooked_write_signed>: Remove.
7453 <cooked_write_unsigned, cooked_read_unsigned>: Remove.
7454 <cooked_read, cooked_write>: New.
7455 * sh64-tdep.c (sh64_pseudo_register_read): Update.
7456 (sh64_pseudo_register_write): Update.
7457
a87dc45a
AK
74582017-06-16 Anton Kolesov <anton.kolesov@synopsys.com>
7459
7460 * arc-tdep.c (arc_disassembler_options): New variable.
7461 (arc_gdbarch_init): Set and use it. Use arc_delayed_print_insn instead
7462 of default_print_insn.
7463 (arc_delayed_print_insn): Set info->section when needed,
7464 use default_print_insn to retrieve a disassembler.
7465
45159d6a
SDJ
74662017-06-14 Sergio Durigan Junior <sergiodj@redhat.com>
7467
7468 PR gdb/21574
7469 * infcmd.c (_initialize_infcmd): Expand "help run" documentation
7470 to mention $SHELL and startup-with-shell.
7471
b46c4cf0
MF
74722017-06-14 Max Filippov <jcmvbkbc@gmail.com>
7473
7474 * MAINTAINERS: Move Maxim Grigoriev to the Past Maintainers.
7475
6394c606
YQ
74762017-06-14 Yao Qi <yao.qi@linaro.org>
7477
7478 * aarch64-tdep.c (aarch64_gdb_print_insn): Call
7479 default_print_insn instead of print_insn_aarch64.
7480 * arm-tdep.c (gdb_print_insn_arm): Call
7481 default_print_insn instead of print_insn_big_arm
7482 and print_insn_little_arm.
7483 * i386-tdep.c (i386_print_insn): Call default_print_insn
7484 instead of print_insn_i386.
7485 * ia64-tdep.c (ia64_print_insn): Call
7486 default_print_insn instead of print_insn_ia64.
7487 * mips-tdep.c (gdb_print_insn_mips): Call
7488 default_print_insn instead of print_insn_big_mips
7489 and print_insn_little_mips.
7490 * spu-tdep.c (gdb_print_insn_spu): Call default_print_insn
7491 instead of print_insn_spu.
7492
d5722aa2
PA
74932017-06-14 Pedro Alves <palves@redhat.com>
7494
7495 * ada-lang.c: Include "common/byte-vector.h".
7496 (ada_value_primitive_packed_val): Use gdb::byte_vector.
7497 * charset.c (wchar_iterator::iterate): Resize the vector instead
7498 of reserving it.
7499 * common/byte-vector.h: Include "common/def-vector.h".
7500 (wchar_iterator::m_out): Now a gdb::def_vector<gdb_wchar_t>.
7501 * cli/cli-dump.c: Include "common/byte-vector.h".
7502 (dump_memory_to_file, restore_binary_file): Use gdb::byte_vector.
7503 * common/byte-vector.h: New file.
7504 * common/def-vector.h: New file.
7505 * common/default-init-alloc.h: New file.
7506 * dwarf2loc.c: Include "common/byte-vector.h".
7507 (rw_pieced_value): Use gdb::byte_vector, and resize the vector
7508 instead of reserving it.
7509 * dwarf2read.c: Include "common/byte-vector.h".
7510 (data_buf::m_vec): Now a gdb::byte_vector.
7511 * gdb_regex.c: Include "common/def-vector.h".
7512 (compiled_regex::compiled_regex): Use gdb::def_vector<char>.
7513 * mi/mi-main.c: Include "common/byte-vector.h".
7514 (mi_cmd_data_read_memory): Use gdb::byte_vector.
7515 * printcmd.c: Include "common/byte-vector.h".
7516 (print_scalar_formatted): Use gdb::byte_vector.
7517 * valprint.c: Include "common/byte-vector.h".
7518 (maybe_negate_by_bytes, print_decimal_chars): Use
7519 gdb::byte_vector.
7520
01ec7a27
SM
75212017-06-13 Simon Marchi <simon.marchi@ericsson.com>
7522
7523 * darwin-nat.c: Include "nat/fork-inferior.h".
7524
848d9074
SM
75252017-06-13 Simon Marchi <simon.marchi@ericsson.com>
7526
7527 * configure.nat: Factor out Darwin bits that are not
7528 architecture-specific. Add fork-inferior.o.
7529
3b912944
SM
75302017-06-13 Simon Marchi <simon.marchi@ericsson.com>
7531
7532 * configure.nat: Factor out AIX bits that are not
7533 architecture-specific. Add fork-inferior.o.
7534
55acdf22
AA
75352017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
7536
7537 * dwarf2loc.c (rw_pieced_value): New. Merge logic from...
7538 (read_pieced_value, write_pieced_value): ...here. Reduce to
7539 wrappers that just call rw_pieced_value.
7540
f65e2044
AA
75412017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
7542
7543 * dwarf2loc.c (write_pieced_value): When writing the data for a
7544 memory piece, use write_memory_with_notification instead of
7545 write_memory.
7546
23f945bf
AA
75472017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
7548
7549 * valops.c (read_value_memory): Change embedded_offset to
7550 represent a bit offset instead of a byte offset.
7551 * value.h (read_value_memory): Adjust comment.
7552
f236533e
AA
75532017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
7554
7555 * dwarf2loc.c (read_pieced_value): Remove unnecessary variables
7556 dest_offset_bits and source_offset_bits.
7557 (write_pieced_value): Likewise.
7558
65d84b76
AA
75592017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
7560
7561 * dwarf2loc.c (read_pieced_value): Respect the piece offset, as
7562 given by DW_OP_bit_piece.
7563 (write_pieced_value): Likewise.
7564
242d31ab
AA
75652017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
7566
7567 * dwarf2loc.c (read_pieced_value): Move the buffer allocation and
7568 some other preparations to the places where sufficient information
7569 is available.
7570 (write_pieced_value): Likewise.
7571
03c8af18
AA
75722017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
7573
7574 * dwarf2loc.c (bits_to_bytes): New function.
7575 (read_pieced_value): Fix offset calculations for register pieces
7576 on big-endian targets.
7577 (write_pieced_value): Likewise.
7578
840989c1
AA
75792017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
7580
7581 * dwarf2loc.c (read_pieced_value): Remove buffer_size variable.
7582 (write_pieced_value): Likewise.
7583
359b19bb
AA
75842017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
7585
7586 * dwarf2loc.c (write_pieced_value): When writing to a bit-field,
7587 transfer the source value's least significant bits, instead of its
7588 lowest-addressed ones. Rename type_len to max_offset.
7589 (read_pieced_value): Mirror above changes to write_pieced_value as
7590 applicable.
7591
07c9ca3b
AA
75922017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
7593
7594 * dwarf2loc.c (write_pieced_value): In DWARF_VALUE_MEMORY,
7595 truncate full bytes from dest_offset_bits before using it as an
7596 offset into the buffer.
7597
f1cc9874
AA
75982017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
7599
7600 * dwarf2loc.c (write_pieced_value): Include transfer size in
7601 byte-wise check.
7602
cdaac320
AA
76032017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
7604
7605 * dwarf2loc.c (write_pieced_value): Fix copy/paste error in the
7606 calculation of this_size.
7607
af547a96
AA
76082017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
7609
7610 * dwarf2loc.c (read_pieced_value): Respect parent value's offset
7611 when targeting a bit-field.
7612 (write_pieced_value): Likewise.
7613
ddd7882a
AA
76142017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
7615
7616 * dwarf2loc.c (struct piece_closure) <addr_size>: Remove field.
7617 (allocate_piece_closure): Drop addr_size parameter.
7618 (dwarf2_evaluate_loc_desc_full): Adjust call to
7619 allocate_piece_closure.
7620
e9352324
AA
76212017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
7622
7623 PR gdb/21226
7624 * dwarf2loc.c (read_pieced_value): Anchor stack value pieces at
7625 the LSB end, independent of endianness.
7626
d5d1163e
AA
76272017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
7628
7629 * dwarf2loc.c (write_pieced_value): Fix order of calculations for
7630 size capping.
7631
032bb6ea
YQ
76322017-06-13 Yao Qi <yao.qi@linaro.org>
7633
7634 * mips-linux-nat.c: Move include features/mips*-linux.c to
7635 mips-linux-tdep.c.
7636 (_initialize_mips_linux_nat): Move initialize_tdesc_mips* calls
7637 to mips-linux-tdep.c.
7638 * mips-linux-tdep.c: Include features/mips*-linux.c
7639 (_initialize_mips_linux_tdep): Call initialize_tdesc_mips*
7640 functions.
7641 * mips-linux-tdep.h (tdesc_mips_linux): Declare.
7642 (tdesc_mips_dsp_linux, tdesc_mips64_linux): Declare.
7643 (tdesc_mips64_dsp_linux): Declare.
7644
f12f6bad
TT
76452017-06-12 Tom Tromey <tom@tromey.com>
7646
7647 * valprint.h (val_print_type_code_int): Remove.
7648 * valprint.c (generic_val_print_int): Always call
7649 val_print_scalar_formatted.
7650 (val_print_type_code_int): Remove.
7651 * printcmd.c (print_scalar_formatted): Handle options->format==0.
7652 * f-valprint.c (f_val_print): Use val_print_scalar_formatted.
7653 * c-valprint.c (c_val_print_int): Use val_print_scalar_formatted.
7654 * ada-valprint.c (ada_val_print_num): Use
7655 val_print_scalar_formatted.
7656
d9109c80
TT
76572017-06-12 Tom Tromey <tom@tromey.com>
7658
7659 * printcmd.c (print_scalar_formatted): Unify the two switches.
7660 Don't convert scalars to LONGEST.
7661
4ac0cb1c
TT
76622017-06-12 Tom Tromey <tom@tromey.com>
7663
7664 PR exp/16225:
7665 * valprint.h (print_decimal_chars): Update.
7666 * valprint.c (maybe_negate_by_bytes): New function.
7667 (print_decimal_chars): Add "is_signed" argument.
7668 * printcmd.c (print_scalar_formatted): Update.
7669
30a25466
TT
76702017-06-12 Tom Tromey <tom@tromey.com>
7671
7672 PR exp/16225:
7673 * valprint.h (print_binary_chars, print_hex_chars): Update.
7674 * valprint.c (val_print_type_code_int): Update.
7675 (print_binary_chars): Add "zero_pad" argument.
7676 (emit_octal_digit): New function.
7677 (print_octal_chars): Don't zero-pad.
7678 (print_decimal_chars): Likewise.
7679 (print_hex_chars): Add "zero_pad" argument.
7680 * sh64-tdep.c (sh64_do_fp_register): Update.
7681 * regcache.c (regcache::dump): Update.
7682 * printcmd.c (print_scalar_formatted): Update.
7683 * infcmd.c (default_print_one_register_info): Update.
7684
b3464d03
PA
76852017-06-12 Pedro Alves <palves@redhat.com>
7686 Alan Hayward <alan.hayward@arm.com>
7687
7688 * mips-tdep.c (MAX_MIPS_ABI_REGSIZE): New.
7689 (mips_eabi_push_dummy_call): Rename local 'regsize' to
7690 'abi_regsize'. Rename local array 'valbuf' to 'ref_valbuf', and
7691 use MAX_MIPS_ABI_REGSIZE instead of MAX_REGISTER_SIZE to size it.
7692 Assert that abi_regsize bytes fit in 'ref_valbuf'.
7693
4b76cda9
PA
76942017-06-12 Pedro Alves <palves@redhat.com>
7695
7696 * dwarf2read.c (mapped_symtab::data): Now a vector of
7697 symtab_index_entry instead of vector of
7698 std::unique_ptr<symtab_index_entry>. All users adjusted to check
7699 whether an element's name is NULL instead of checking whether the
7700 element itself is NULL.
7701 (find_slot): Change return type. Adjust.
7702 (hash_expand, , add_index_entry, uniquify_cu_indices)
7703 (write_hash_table): Adjust.
7704
e8f8bcb3
PA
77052017-06-12 Pedro Alves <palves@redhat.com>
7706
7707 * dwarf2read.c (recursively_count_psymbols): New function.
7708 (write_psymtabs_to_index): Call it to compute number of psyms and
7709 pass estimate size of psyms_seen to unordered_set's ctor.
7710
70a1152b
PA
77112017-06-12 Pedro Alves <palves@redhat.com>
7712
7713 * dwarf2read.c (write_hash_table): Check if key already exists
7714 before emplacing.
7715
c2f134ac
PA
77162017-06-12 Pedro Alves <palves@redhat.com>
7717
7718 * dwarf2read.c (data_buf::append_space): Rename to...
7719 (data_buf::grow): ... this, and make private. Adjust all callers.
7720 (data_buf::append_uint): New method.
7721 (add_address_entry, write_one_signatured_type)
7722 (write_psymtabs_to_index): Use it.
7723
a81e6d4d
PA
77242017-06-12 Pedro Alves <palves@redhat.com>
7725
7726 * dwarf2read.c (file_write(FILE *, const void *, size_t)): Delete.
7727 (file_write (FILE *, const std::vector<Elem>&)): Delete.
7728 (data_buf::file_write): Call ::fwrite directly.
7729
6fd931f2
PA
77302017-06-12 Pedro Alves <palves@redhat.com>
7731
7732 * dwarf2read.c (uniquify_cu_indices): Use std::unique and
7733 std::vector::erase.
7734
bc8f2430
JK
77352017-06-12 Jan Kratochvil <jan.kratochvil@redhat.com>
7736
7737 Code cleanup: C++ify .gdb_index producer.
7738 * dwarf2read.c: Include <unordered_set> and <unordered_map>.
7739 (MAYBE_SWAP) [WORDS_BIGENDIAN]: Cast to offset_type.
7740 (struct strtab_entry, hash_strtab_entry, eq_strtab_entry)
7741 (create_strtab, add_string): Remove.
7742 (file_write, data_buf): New.
7743 (struct symtab_index_entry): Use std::vector for cu_indices.
7744 (struct mapped_symtab): Use std::vector for data.
7745 (hash_symtab_entry, eq_symtab_entry, delete_symtab_entry)
7746 (create_symbol_hash_table, create_mapped_symtab, cleanup_mapped_symtab):
7747 Remove.
7748 (find_slot): Change return type. Update it to the new data structures.
7749 (hash_expand, add_index_entry): Update it to the new data structures.
7750 (offset_type_compare): Remove.
7751 (uniquify_cu_indices): Update it to the new data structures.
7752 (c_str_view, c_str_view_hasher, vector_hasher): New.
7753 (add_indices_to_cpool): Remove.
7754 (write_hash_table): Update it to the new data structures.
7755 (struct psymtab_cu_index_map, hash_psymtab_cu_index)
7756 (eq_psymtab_cu_index): Remove.
7757 (psym_index_map): New typedef.
7758 (struct addrmap_index_data): Change addr_obstack pointer to data_buf
7759 reference and std::unordered_map for cu_index_htab.
7760 (add_address_entry, add_address_entry_worker, write_address_map)
7761 (write_psymbols): Update it to the new data structures.
7762 (write_obstack): Remove.
7763 (struct signatured_type_index_data): Change types_list to a data_buf
7764 reference and psyms_seen to a std::unordered_set reference.
7765 (write_one_signatured_type, recursively_write_psymbols)
7766 (write_psymtabs_to_index): Update it to the new data structures.
7767
c4dcb155
SM
77682017-06-11 Simon Marchi <simon.marchi@ericsson.com>
7769
7770 * NEWS (Changes since GDB 8.0): Announce {set,show} debug
7771 separate-debug-file commands.
7772 * symfile.h (separate_debug_file_debug): New global.
7773 * symfile.c (separate_debug_file_debug): New global.
7774 (separate_debug_file_exists, find_separate_debug_file): Add
7775 debug output.
7776 (_initialize_symfile): Add "set debug separate-debug-file"
7777 command.
7778 * build-id.c (build_id_to_debug_bfd,
7779 find_separate_debug_file_by_buildid): Add debug output.
7780
6d45d4b4
SM
77812017-06-10 Simon Marchi <simon.marchi@polymtl.ca>
7782
7783 * gdbarch.sh (displaced_step_free_closure): Remove.
7784 * gdbarch.h, gdbarch.c: Re-generate.
7785 * aarch64-linux-tdep.c (aarch64_linux_init_abi): Don't set
7786 displaced_step_free_closure.
7787 * amd64-linux-tdep.c (amd64_linux_init_abi_common): Likewise.
7788 * arm-linux-tdep.c (arm_linux_init_abi): Likewise.
7789 * i386-linux-tdep.c (i386_linux_init_abi): Likewise.
7790 * rs6000-aix-tdep.c (rs6000_aix_init_osabi): Likewise.
7791 * rs6000-tdep.c (rs6000_gdbarch_init): Likewise.
7792 * s390-linux-tdep.c (s390_gdbarch_init): Likewise.
7793 * arch-utils.h (simple_displaced_step_free_closure): Remove.
7794 * arch-utils.c (simple_displaced_step_free_closure): Remove.
7795 * infrun.c (displaced_step_clear): Call xfree instead of
7796 gdbarch_displaced_step_free_closure.
7797
2f91880f
SDJ
77982017-06-08 Sergio Durigan Junior <sergiodj@redhat.com>
7799
7800 * common/common-utils.c (stringify_argv): Check for "arg[0] !=
7801 NULL".
7802
b8b6e72f
AH
78032017-06-08 Alan Hayward <alan.hayward@arm.com>
7804
7805 * mn10300-tdep.c (MN10300_MAX_REGISTER_SIZE): Add.
7806 (mn10300_extract_return_value): Use MN10300_MAX_REGISTER_SIZE.
7807 (mn10300_push_dummy_call): Likewise.
7808
5369082e
AH
78092017-06-08 Alan Hayward <alan.hayward@arm.com>
7810
7811 * mi/mi-main.c (register_changed_p): Use value_contents_eq.
7812
ff4ca5ac
AH
78132017-06-08 Alan Hayward <alan.hayward@arm.com>
7814
7815 * mi/mi-main.c (register_changed_p): Use cooked_read_value.
7816
aefd8b33
SDJ
78172017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
7818
7819 * NEWS (Changes since GDB 8.0): Announce that GDBserver is now
7820 able to start inferiors using a shell.
7821 (New remote packets): Announce new packet "QStartupWithShell".
7822 * remote.c: Add PACKET_QStartupWithShell.
7823 (extended_remote_create_inferior): Handle new
7824 PACKET_QStartupWithShell.
7825 (remote_protocol_features) <QStartupWithShell>: New entry for
7826 PACKET_QStartupWithShell.
7827 (_initialize_remote): Call "add_packet_config_cmd" for
7828 QStartupShell.
7829
2090129c
SDJ
78302017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
7831 Pedro Alves <palves@redhat.com>
7832
7833 * Makefile.in (HFILES_NO_SRCDIR): Add "common/common-inferior.h"
7834 and "nat/fork-inferior.h".
7835 * common/common-inferior.h: New file, with contents from
7836 "gdb/inferior.h".
7837 * commom/common-utils.c: Include "common-utils.h".
7838 (stringify_argv): New function.
7839 * common/common-utils.h (stringify_argv): New prototype.
7840 * configure.nat: Add "fork-inferior.o" as a dependency for
7841 "*linux*", "fbsd*" and "nbsd*" hosts.
7842 * corefile.c (get_exec_file): Update comment.
7843 * darwin-nat.c (darwin_ptrace_him): Call "gdb_startup_inferior"
7844 instead of "startup_inferior".
7845 (darwin_create_inferior): Call "add_thread_silent" after
7846 "fork_inferior".
7847 * fork-child.c: Cleanup unnecessary includes.
7848 (SHELL_FILE): Move to "common/common-fork-child.c".
7849 (environ): Likewise.
7850 (exec_wrapper): Initialize.
7851 (get_exec_wrapper): New function.
7852 (breakup_args): Move to "common/common-fork-child.c"; rename to
7853 "breakup_args_for_exec".
7854 (escape_bang_in_quoted_argument): Move to
7855 "common/common-fork-child.c".
7856 (saved_ui): New variable.
7857 (prefork_hook): New function.
7858 (postfork_hook): Likewise.
7859 (postfork_child_hook): Likewise.
7860 (gdb_startup_inferior): Likewise.
7861 (fork_inferior): Move to "common/common-fork-child.c". Update
7862 function to support gdbserver.
7863 (startup_inferior): Likewise.
7864 * gdbcore.h (get_exec_file): Remove declaration.
7865 * gnu-nat.c (gnu_create_inferior): Call "gdb_startup_inferior"
7866 instead of "startup_inferior". Call "add_thread_silent" after
7867 "fork_inferior".
7868 * inf-ptrace.c: Include "nat/fork-inferior.h" and "utils.h".
7869 (inf_ptrace_create_inferior): Call "gdb_startup_inferior"
7870 instead of "startup_inferior". Call "add_thread_silent" after
7871 "fork_inferior".
7872 * inferior.h: Include "common-inferior.h".
7873 (trace_start_error): Move to "common/common-utils.h".
7874 (trace_start_error_with_name): Likewise.
7875 (fork_inferior): Move prototype to "nat/fork-inferior.h".
7876 (startup_inferior): Likewise.
7877 (gdb_startup_inferior): New prototype.
7878 * nat/fork-inferior.c: New file, with contents from "fork-child.c".
7879 * nat/fork-inferior.h: New file.
7880 * procfs.c (procfs_init_inferior): Call "gdb_startup_inferior"
7881 instead of "startup_inferior". Call "add_thread_silent" after
7882 "fork_inferior".
7883 * target.h (target_terminal_init): Move prototype to
7884 "target/target.h".
7885 (target_terminal_inferior): Likewise.
7886 (target_terminal_ours): Likewise.
7887 * target/target.h (target_terminal_init): New prototype, moved
7888 from "target.h".
7889 (target_terminal_inferior): Likewise.
7890 (target_terminal_ours): Likewise.
7891 * utils.c (gdb_flush_out_err): New function.
7892
043a4934
SDJ
78932017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
7894
7895 * Makefile.in (HFILES_NO_SRCDIR): Add "common/common-gdbthread.h".
7896 * common/common-gdbthread.h: New file, with parts from
7897 "gdb/gdbthread.h".
7898 * gdbthread.h: Include "common-gdbthread.h".
7899 (switch_to_thread): Moved to "common/common-gdbthread.h".
7900
15652511
SDJ
79012017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
7902
7903 * Makefile.in (SFILES): Add "common/job-control.c".
7904 (HFILES_NO_SRCDIR): Add "common/job-control.h".
7905 (COMMON_OBS): Add "job-control.o".
7906 * common/job-control.c: New file, with contents from
7907 "gdb/inflow.c".
7908 * common/job-control.h: New file, with contents from "terminal.h".
7909 * fork-child.c: Include "job-control.h".
7910 * inflow.c: Include "job-control.h".
7911 (gdb_setpgid): Move to "common/common-inflow.c".
7912 (_initialize_inflow): Move setting of "job_control" to
7913 "handle_job_control".
7914 * terminal.h (job_control): Moved to "common/common-terminal.h".
7915 (gdb_setpgid): Likewise.
7916 * top.c: Include "job_control.h".
7917 * utils.c: Likewise.
7918 (job_control): Moved to "job-control.c".
7919
2d7cc5c7
PA
79202017-06-07 Pedro Alves <palves@redhat.com>
7921
7922 * Makefile.in (SFILES): Add gdb_regex.c.
7923 (COMMON_OBS): Add gdb_regex.o.
7924 * ada-lang.c (ada_add_standard_exceptions)
7925 (ada_add_exceptions_from_frame, name_matches_regex)
7926 (ada_add_global_exceptions, ada_exceptions_list_1): Change regex
7927 parameter type to compiled_regex. Adjust.
7928 (ada_exceptions_list): Use compiled_regex.
7929 * break-catch-throw.c (exception_catchpoint::pattern): Now a
7930 std::unique_ptr<compiled_regex>.
7931 (exception_catchpoint::~exception_catchpoint): Remove regfree
7932 call.
7933 (check_status_exception_catchpoint): Adjust to use compiled_regex.
7934 (handle_gnu_v3_exceptions): Adjust to use compiled_regex.
7935 * breakpoint.c (solib_catchpoint::compiled): Now a
7936 std::unique_ptr<compiled_regex>.
7937 (solib_catchpoint::~solib_catchpoint): Remove regfree call.
7938 (check_status_catch_solib): Adjust to use compiled_regex.
7939 (add_solib_catchpoint): Adjust to use compiled_regex.
7940 * cli/cli-cmds.c (apropos_command): Use compiled_regex.
7941 * cli/cli-decode.c (apropos_cmd): Change regex parameter to
7942 compiled_regex reference. Adjust to use it.
7943 * cli/cli-decode.h: Remove struct re_pattern_buffer forward
7944 declaration. Include "gdb_regex.h".
7945 (apropos_cmd): Change regex parameter to compiled_regex reference.
7946 * gdb_regex.c: New file.
7947 * gdb_regex.h (make_regfree_cleanup, get_regcomp_error): Delete
7948 declarations.
7949 (class compiled_regex): New.
7950 * linux-tdep.c: Include "common/gdb_optional.h".
7951 (struct mapping_regexes): New, factored out from
7952 mapping_is_anonymous_p, and adjusted to use compiled_regex.
7953 (mapping_is_anonymous_p): Use mapping_regexes wrapped in a
7954 gdb::optional and remove cleanups. Adjust to compiled_regex.
7955 * probe.c: Include "common/gdb_optional.h".
7956 (collect_probes): Use compiled_regex and gdb::optional and remove
7957 cleanups.
7958 * skip.c: Include "common/gdb_optional.h".
7959 (skiplist_entry::compiled_function_regexp): Now a
7960 gdb::optional<compiled_regex>.
7961 (skiplist_entry::compiled_function_regexp_is_valid): Delete field.
7962 (free_skiplist_entry): Remove regfree call.
7963 (compile_skip_regexp, skip_rfunction_p): Adjust to use
7964 compiled_regex and gdb::optional.
7965 * symtab.c: Include "common/gdb_optional.h".
7966 (search_symbols): Use compiled_regex and gdb::optional.
7967 * utils.c (do_regfree_cleanup, make_regfree_cleanup)
7968 (get_regcomp_error, compile_rx_or_error): Delete. Some bits moved
7969 to gdb_regex.c.
7970
50d6adef
AH
79712017-06-07 Alan Hayward <alan.hayward@arm.com>
7972
7973 * regcache.c (regcache::save): Avoid buffer use.
7974 (regcache::dump): Likewise.
7975
4a8a33c8
AH
79762017-06-07 Alan Hayward <alan.hayward@arm.com>
7977
7978 * sh-tdep.c (sh_pseudo_register_read): Remove
7979 MAX_REGISTER_SIZE.
7980 (sh_pseudo_register_write): Likewise.
7981 * sh64-tdep.c (sh64_pseudo_register_read): Likewise.
7982 (sh64_pseudo_register_write): Likewise
7983
d1be909e
AH
79842017-06-07 Alan Hayward <alan.hayward@arm.com>
7985
7986 * aarch64-tdep.c (aarch64_store_return_value): Use
7987 V_REGISTER_SIZE.
7988 (aarch64_pseudo_read_value): Likewise.
7989 (aarch64_pseudo_write): Likewise.
7990
f4a65042
YQ
79912017-06-06 Yao Qi <yao.qi@linaro.org>
7992
7993 * regformats/regdef.h (set_register_cache): Remove the
7994 declaration.
7995
9f7fb0aa
AH
79962017-06-06 Alan Hayward <alan.hayward@arm.com>
7997
7998 * frame.c (frame_unwind_register_signed): Use
7999 frame_unwind_register_value.
8000
e1e01040
PA
80012017-06-06 Pedro Alves <palves@redhat.com>
8002
8003 PR breakpoints/21553
8004 * breakpoint.c (create_breakpoints_sal_default)
8005 (init_breakpoint_sal, create_breakpoint_sal): Use
8006 gdb::unique_xmalloc_ptr for string parameters.
8007 (create_breakpoint): Constify 'extra_string' and 'cond_string'
8008 parameters. Replace cleanups with gdb::unique_xmalloc_ptr.
8009 (base_breakpoint_create_breakpoints_sal)
8010 (bkpt_create_breakpoints_sal, tracepoint_create_breakpoints_sal)
8011 (strace_marker_create_breakpoints_sal)
8012 (create_breakpoints_sal_default): Use gdb::unique_xmalloc_ptr for
8013 string parameters.
8014 * breakpoint.h (breakpoint_ops::create_breakpoints_sal): Use
8015 gdb::unique_xmalloc_ptr for string parameters.
8016 (create_breakpoint): Constify 'extra_string' and 'cond_string'
8017 parameters.
8018
fbe654c8
AH
80192017-06-06 Alan Hayward <alan.hayward@arm.com>
8020
8021 * alpha-tdep.c (alpha_register_to_value): Use
8022 get_frame_register_value.
8023 (alpha_value_to_register): Use ALPHA_REGISTER_SIZE.
8024
ae0d01d6
AH
80252017-06-06 Alan Hayward <alan.hayward@arm.com>
8026
8027 * ia64-tdep.c (IA64_MAX_FP_REGISTER_SIZE) Add.
8028 (ia64_register_to_value): Use IA64_MAX_FP_REGISTER_SIZE.
8029 (ia64_value_to_register): Likewise.
8030 (ia64_extract_return_value): Likewise.
8031 (ia64_store_return_value): Likewise.
8032 (ia64_push_dummy_call): Likewise.
8033
49cf576c
JB
80342017-06-04 Joel Brobecker <brobecker@adacore.com>
8035
8036 GDB 8.0 released.
8037
26b6a6ab
SM
80382017-06-03 Simon Marchi <simon.marchi@ericsson.com>
8039
8040 * x86-linux-nat.c (struct arch_lwp_info): Remove.
8041
22827c51
SM
80422017-06-03 Simon Marchi <simon.marchi@polymtl.ca>
8043
8044 * linux-nat.c (linux_nat_post_attach_wait): Remove FIRST
8045 parameter.
8046 (linux_nat_attach): Adjust call to linux_nat_post_attach_wait.
8047
0e05cf3a
SM
80482017-06-02 Simon Marchi <simon.marchi@ericsson.com>
8049
8050 * event-loop.c (poll_timers): Unallocate timer using delete
8051 instead of xfree.
8052
c1fc2657
SM
80532017-06-02 Simon Marchi <simon.marchi@polymtl.ca>
8054
8055 * breakpoint.h (struct breakpoint_ops) <dtor>: Remove.
8056 (struct breakpoint) <~breakpoint>: New.
8057 (struct watchpoint): Inherit from breakpoint.
8058 <~watchpoint>: New.
8059 <base>: Remove.
8060 (struct tracepoint): Inherit from breakpoint.
8061 <base>: Remove.
8062 * breakpoint.c (longjmp_breakpoint_ops): Remove.
8063 (struct longjmp_breakpoint): Inherit from breakpoint.
8064 <~longjmp_breakpoint>: New.
8065 <base>: Remove.
8066 (new_breakpoint_from_type): Remove casts.
8067 (watchpoint_in_thread_scope): Remove reference to base field.
8068 (watchpoint_del_at_next_stop): Likewise.
8069 (update_watchpoint): Likewise.
8070 (watchpoint_check): Likewise.
8071 (bpstat_check_watchpoint): Likewise.
8072 (set_longjmp_breakpoint): Likewise.
8073 (struct fork_catchpoint): Inherit from breakpoint.
8074 <base>: Remove.
8075 (struct solib_catchpoint): Inherit from breakpoint.
8076 <~solib_catchpoint>: New.
8077 <base>: Remove.
8078 (dtor_catch_solib): Change to ...
8079 (solib_catchpoint::~solib_catchpoint): ... this.
8080 (breakpoint_hit_catch_solib): Remove reference to base field.
8081 (add_solib_catchpoint): Likewise.
8082 (create_fork_vfork_event_catchpoint): Likewise.
8083 (struct exec_catchpoint): Inherit from breakpoint.
8084 <~exec_catchpoint>: New.
8085 <base>: Remove.
8086 (dtor_catch_exec): Change to ...
8087 (exec_catchpoint::~exec_catchpoint): ... this.
8088 (dtor_watchpoint): Change to ...
8089 (watchpoint::~watchpoint): ... this.
8090 (watch_command_1): Remove reference to base field.
8091 (catch_exec_command_1): Likewise.
8092 (base_breakpoint_dtor): Change to ...
8093 (breakpoint::~breakpoint): ... this.
8094 (base_breakpoint_ops): Remove dtor field value.
8095 (longjmp_bkpt_dtor): Change to ...
8096 (longjmp_breakpoint::~longjmp_breakpoint): ... this.
8097 (strace_marker_create_breakpoints_sal): Remove reference to base
8098 field.
8099 (delete_breakpoint): Don't manually call breakpoint destructor.
8100 (create_tracepoint_from_upload): Remove reference to base field.
8101 (trace_pass_set_count): Likewise.
8102 (initialize_breakpoint_ops): Don't initialize
8103 momentary_breakpoint_ops, don't set dtors.
8104 * ada-lang.c (struct ada_catchpoint): Inherit from breakpoint.
8105 <~ada_catchpoint>: New.
8106 <base>: Remove.
8107 (create_excep_cond_exprs): Remove reference to base field.
8108 (dtor_exception): Change to ...
8109 (ada_catchpoint::~ada_catchpoint): ... this.
8110 (dtor_catch_exception): Remove.
8111 (dtor_catch_exception_unhandled): Remove.
8112 (dtor_catch_assert): Remove.
8113 (create_ada_exception_catchpoint): Remove reference to base
8114 field.
8115 (initialize_ada_catchpoint_ops): Don't set dtors.
8116 * break-catch-sig.c (struct signal_catchpoint): Inherit from
8117 breakpoint.
8118 <~signal_catchpoint>: New.
8119 <base>: Remove.
8120 (signal_catchpoint_dtor): Change to ...
8121 (signal_catchpoint::~signal_catchpoint): ... this.
8122 (create_signal_catchpoint): Remove reference to base field.
8123 (initialize_signal_catchpoint_ops): Don't set dtor.
8124 * break-catch-syscall.c (struct syscall_catchpoint): Inherit
8125 from breakpoint.
8126 <~syscall_catchpoint>: New.
8127 <base>: Remove.
8128 (dtor_catch_syscall): Change to ...
8129 (syscall_catchpoint::~syscall_catchpoint): ... this.
8130 (create_syscall_event_catchpoint): Remove reference to base
8131 field.
8132 (initialize_syscall_catchpoint_ops): Don't set dtor.
8133 * break-catch-throw.c (struct exception_catchpoint): Inherit
8134 from breakpoint.
8135 <~exception_catchpoint>: New.
8136 <base>: Remove.
8137 (dtor_exception_catchpoint): Change to ...
8138 (exception_catchpoint::~exception_catchpoint): ... this.
8139 (handle_gnu_v3_exceptions): Remove reference to base field.
8140 (initialize_throw_catchpoint_ops): Don't set dtor.
8141 * ctf.c (ctf_get_traceframe_address): Remove reference to base
8142 field.
8143 * remote.c (remote_get_tracepoint_status): Likewise.
8144 * tracefile-tfile.c (tfile_get_traceframe_address): Likewise.
8145 * tracefile.c (tracefile_fetch_registers): Likewise.
8146 * tracepoint.c (actions_command): Likewise.
8147 (validate_actionline): Likewise.
8148 (tfind_1): Likewise.
8149 (get_traceframe_location): Likewise.
8150 (find_matching_tracepoint_location): Likewise.
8151 (parse_tracepoint_status): Likewise.
8152 * mi/mi-cmd-break.c (mi_cmd_break_passcount): Likewise.
8153
3b0871f4
SM
81542017-06-02 Simon Marchi <simon.marchi@polymtl.ca>
8155
8156 * breakpoint.c (struct longjmp_breakpoint): New struct.
8157 (is_tracepoint_type): Change return type to bool.
8158 (is_longjmp_type): New function.
8159 (new_breakpoint_from_type): Handle longjmp kinds of breakpoints.
8160 (set_raw_breakpoint_without_location): Use
8161 new_breakpoint_from_type.
8162 (set_raw_breakpoint): Likewise.
8163
a5e364af
SM
81642017-06-02 Simon Marchi <simon.marchi@polymtl.ca>
8165
8166 * breakpoint.c (new_breakpoint_from_type): New function.
8167 (create_breakpoint_sal): Use new_breakpoint_from_type and
8168 unique_ptr.
8169 (create_breakpoint): Likewise.
8170
ae3b3f34
SM
81712017-05-31 Simon Marchi <simon.marchi@ericsson.com>
8172
8173 * memattr.c (mem_info_command): Rename to ...
8174 (info_mem_command): ... this.
8175 (mem_enable_command): Rename to ...
8176 (enable_mem_command): ... this.
8177 (mem_disable_command): Rename to ...
8178 (disable_mem_command): ... this.
8179 (mem_delete_command): Rename to ...
8180 (delete_mem_command): ... this.
8181 (_initialize_mem): Adjust function names.
8182
13ace077
MM
81832017-05-31 Markus Metzger <markus.t.metzger@intel.com>
8184
8185 * btrace.c (handle_pt_insn_events): New.
8186 (ftrace_add_pt): Call handle_pt_insn_events. Rename ERRCODE into
8187 STATUS. Split into this and ...
8188 (handle_pt_insn_event_flags): ... this.
8189
c56ccc05
MM
81902017-05-31 Markus Metzger <markus.t.metzger@intel.com>
8191
8192 * configure.ac: Check for pt_insn_event, struct pt_insn.enabled,
8193 and struct pt_insn.resynced.
8194 * configure: Regenerated.
8195 * config.in: Regenerated.
8196
08c3f6d2
TW
81972017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
8198
8199 * btrace.c (ftrace_find_call_by_number): New function.
8200 (ftrace_new_function): Store objects, not pointers.
8201 (ftrace_find_call_by_number, ftrace_new_return, ftrace_new_switch,
8202 ftrace_new_gap, ftrace_update_function,
8203 ftrace_compute_global_level_offset, btrace_stich_bts, btrace_clear,
8204 btrace_insn_get, btrace_insn_get_error, btrace_insn_end,
8205 btrace_insn_next, btrace_insn_prev, ptrace_find_insn_by_number,
8206 btrace_ends_with_single_insn, btrace_call_get): Account for
8207 btrace_thread_info::functions now storing objects.
8208 * btrace.h (struct btrace_thread_info): Add constructor.
8209 (struct btrace_thread_info) <functions>: Make std::vector.
8210 (struct btrace_thread_info) <prev, next, up, insn, errcode, flags):
8211 Initialize with default values.
8212 * record-btrace.c (record_btrace_frame_sniffer): Account for
8213 btrace_thread_info::functions now storing objects.
8214
8ffd39f2
TW
82152017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
8216
8217 * btrace.c: Remove typedef bfun_s.
8218 (ftrace_new_gap): Directly add gaps to the list of gaps.
8219 (btrace_bridge_gaps, btrace_compute_ftrace_bts, pt_btrace_insn_flags,
8220 ftrace_add_pt, btrace_compute_ftrace_pt, btrace_compute_ftrace_1,
8221 btrace_finalize_ftrace, btrace_compute_ftrace): Use std::vector
8222 instead of gdb VEC.
8223
4aeb0dfc
TW
82242017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
8225
8226 * btrace.c (ftrace_fixup_caller, ftrace_new_return, ftrace_connect_bfun,
8227 ftrace_bridge_gap): Replace references to btrace_thread_info::segment
8228 with btrace_thread_info::next_segment and
8229 btrace_thread_info::prev_segment.
8230 * btrace.h: Remove struct btrace_func_link.
8231 (struct btrace_function): Replace pair of function segment pointers
8232 with pair of indices.
8233 * python/py-record-btrace.c (btpy_call_prev_sibling,
8234 btpy_call_next_sibling): Replace references to
8235 btrace_thread_info::segment with btrace_thread_info::next_segment and
8236 btrace_thread_info::prev_segment.
8237 * record-btrace.c (record_btrace_frame_this_id): Use
8238 btrace_find_call_by_number.
8239
eb8f2b9c
TW
82402017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
8241
8242 * btrace.c (ftrace_new_function, ftrace_fixup_level,
8243 ftrace_connect_bfun, ftrace_bridge_gap, btrace_bridge_gaps,
8244 btrace_insn_next, btrace_insn_prev): Remove references to
8245 btrace_thread_info::flow.
8246 * btrace.h (struct btrace_function): Remove FLOW.
8247
42bfe59e
TW
82482017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
8249
8250 * btrace.c (ftrace_find_call_by_number): New function.
8251 (ftrace_update_caller, ftrace_new_call, ftrace_new_tailcall,
8252 ftrace_get_caller, ftrace_find_call, ftrace_new_return,
8253 ftrace_match_backtrace, ftrace_connect_bfun, ftrace_connect_backtrace,
8254 ftrace_bridge_gap, btrace_bridge_gaps): Use btrace_function::up as an
8255 index.
8256 * btrace.h (struct btrace_function): Turn UP into an index.
8257 * python/py-record-btrace.c (btpy_call_up): Use btrace_function::up
8258 as an index.
8259 * record-btrace.c (record_btrace_frame_unwind_stop_reason,
8260 record_btrace_frame_prev_register, record_btrace_frame_sniffer,
8261 record_btrace_tailcall_frame_sniffe): Use btrace_find_call_by_number.
8262
b54b03bd
TW
82632017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
8264
8265 * btrace.c (ftrace_new_function, ftrace_new_call, ftrace_new_tailcall,
8266 ftrace_new_return, ftrace_new_switch, ftrace_new_gap,
8267 ftrace_update_function, ftrace_compute_global_level_offset,
8268 btrace_compute_ftrace_bts, ftrace_add_pt, btrace_compute_ftrace_pt,
8269 btrace_stitch_bts, btrace_fetch, btrace_clear, btrace_insn_number,
8270 btrace_insn_end, btrace_is_empty): Remove references to
8271 btrace_thread_info::begin and btrace_thread_info::end.
8272 * btrace.h (struct btrace_thread_info): Remove BEGIN and END.
8273 (struct btrace_thread_info) <functions>: Adjust comment.
8274 * record-btrace.c (record_btrace_start_replaying): Remove reference to
8275 btrace_thread_info::begin.
8276
8286623c
TW
82772017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
8278
8279 * btrace.c (ftrace_new_function, ftrace_new_call, ftrace_new_tailcall,
8280 ftrace_new_return, ftrace_new_switch, ftrace_new_gap,
8281 ftrace_update_function): Remove arguments that implicitly were always
8282 BTINFO->END.
8283 (btrace_compute_ftrace_bts, ftrace_add_pt, btrace_compute_ftrace_pt):
8284 Don't pass BTINFO->END.
8285
a0f1b963
TW
82862017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
8287
8288 * btrace.c: (btrace_insn_get, btrace_insn_get_error, btrace_insn_number,
8289 btrace_insn_begin, btrace_insn_end, btrace_insn_next, btrace_insn_prev,
8290 btrace_find_insn_by_number): Replace function segment pointer with
8291 index.
8292 (btrace_insn_cmp): Simplify.
8293 * btrace.h: (struct btrace_insn_iterator) Rename index to
8294 insn_index. Replace function segment pointer with index into function
8295 segment vector.
8296 * record-btrace.c (record_btrace_call_history): Replace function
8297 segment pointer use with index.
8298 (record_btrace_frame_sniffer): Retrieve function call segment through
8299 vector.
8300 (record_btrace_set_replay): Remove defunc't safety check.
8301
f158f208
TW
83022017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
8303
8304 * btrace.c (btrace_ends_with_single_insn): New function.
8305 (btrace_call_get, btrace_call_number, btrace_call_begin,
8306 btrace_call_end, btrace_call_next, btrace_call_prev,
8307 btrace_find_call_by_number): Use index into call segment vector
8308 instead of pointer.
8309 (btrace_call_cmp): Simplify.
8310 * btrace.h (struct btrace_call_iterator): Replace function call segment
8311 pointer with index into vector.
8312 * record-btrace.c (record_btrace_call_history): Use index instead of
8313 pointer.
8314
521103fd
TW
83152017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
8316
8317 * btrace.c (btrace_insn_begin, btrace_insn_end,
8318 btrace_find_insn_by_number): Add btinfo to iterator.
8319 * btrace.h (struct btrace_insn_iterator): Add btinfo.
8320
17b89b34
TW
83212017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
8322
8323 * btrace.c (ftrace_new_function): Add btrace_thread_info to arguments
8324 and save pointers directly.
8325 (ftrace_new_call, ftrace_new_tailcall, ftrace_new_return,
8326 ftrace_new_switch, ftrace_new_gap, ftrace_update_function,
8327 ftrace_add_pt): Add btrace_thread_info to arguments. Adjust for
8328 changed signature of functions.
8329 (btrace_compute_ftrace_pt): Adjust for changed signature of functions.
8330 (btrace_fetch): Remove code that adds btrace_function pointers to
8331 vector of btrace_functions.
8332 (btrace_clear): Simplify freeing vector of btrace_functions.
8333
2b51eddc
TW
83342017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
8335
8336 * btrace.c (btrace_fetch, btrace_clear, btrace_find_insn_by_number):
8337 Replace VEC_* with std::vector functions.
8338 * btrace.h: Add include: vector. Remove typedef for DEF_VEC_P.
8339 (struct btrace_thread_info)<functions>: Change type to std::vector.
8340
db6be0d5
SM
83412017-05-30 Simon Marchi <simon.marchi@ericsson.com>
8342
8343 * NEWS (Changes in GDB 8.0): Remove extra empty line. Move
8344 "Removed targets and native configurations" up. Merge duplicate
8345 "New commands" sub-sections. Add "New options" sub-sections.
8346
b057297a
AH
83472017-05-26 Alan Hayward <alan.hayward@arm.com>
8348
8349 * defs.h (copy_integer_to_size): New declaration.
8350 * findvar.c (copy_integer_to_size): New function.
8351 (do_cint_test): New selftest function.
8352 (copy_integer_to_size_test): Likewise.
8353 (_initialize_findvar): Likewise.
8354 * mips-fbsd-tdep.c (mips_fbsd_supply_reg): Use raw_supply_integer.
8355 (mips_fbsd_collect_reg): Use raw_collect_integer.
8356 * mips-linux-tdep.c (supply_32bit_reg): Use raw_supply_integer.
8357 (mips64_fill_gregset): Use raw_collect_integer
8358 (mips64_fill_fpregset): Use raw_supply_integer.
8359 * regcache.c (regcache::raw_supply_integer): New function.
8360 (regcache::raw_collect_integer): Likewise.
8361 * regcache.h: (regcache::raw_supply_integer): New declaration.
8362 (regcache::raw_collect_integer): Likewise.
8363
b77b02a5
YQ
83642017-05-24 Yao Qi <yao.qi@linaro.org>
8365
8366 * Makefile.in (SFILES): Add gdbarch-selftests.c.
8367 (COMMON_OBS): Add gdbarch-selftests.o.
8368 * frame.c [GDB_SELF_TESTS] (create_new_frame): New function.
8369 * frame.h [GDB_SELF_TESTS] (create_new_frame): Declare.
8370 * gdbarch-selftests.c: New file.
8371 * regcache.h (regcache) <~regcache>: Mark it virtual if
8372 GDB_SELF_TEST.
8373 <raw_write>: Likewise.
8374
e521e87e
YQ
83752017-05-24 Yao Qi <yao.qi@linaro.org>
8376
8377 * regcache.c (current_regcache): Change it to
8378 regcache::current_regcache.
8379 (regcache_observer_target_changed): Update.
8380 (regcache_thread_ptid_changed): Make it a regcache static
8381 method.
8382 (regcache_thread_ptid_changed): Update.
8383 (class regcache_access): New.
8384 (current_regcache_test): Update.
8385 (_initialize_regcache): Update.
8386 * regcache.h: Include forward_list.
8387 (regcache): Declare regcache_thread_ptid_changed and declare
8388 registers_changed_ptid as friend.
8389
d8e07dda
YQ
83902017-05-24 Yao Qi <yao.qi@linaro.org>
8391
8392 * i387-tdep.c (i387_register_to_value): Use register_size
8393 instead of TYPE_LENGTH.
8394 * m68k-tdep.c (m68k_register_to_value): Likewise.
8395
8c8f9122
YQ
83962017-05-24 Yao Qi <yao.qi@linaro.org>
8397
8398 * i387-tdep.c (i387_convert_register_p): Return false if type
8399 code isn't TYPE_CODE_FLT.
8400
68fce50f
YQ
84012017-05-24 Yao Qi <yao.qi@linaro.org>
8402
8403 * alpha-tdep.c (alpha_convert_register_p): Return true if type
8404 length is 4.
8405 (alpha_register_to_value): Remove type length check.
8406 (alpha_value_to_register): Likewise.
8407
88954b49
YQ
84082017-05-24 Yao Qi <yao.qi@linaro.org>
8409
8410 * ia64-tdep.c (ia64_convert_register_p): Check type's code is
8411 TYPE_CODE_FLT.
8412
e3ec9b69
YQ
84132017-05-24 Yao Qi <yao.qi@linaro.org>
8414
8415 * m68k-tdep.c (m68k_convert_register_p): Check type's code is
8416 TYPE_CODE_FLT or not.
8417
cdd238da
YQ
84182017-05-24 Yao Qi <yao.qi@linaro.org>
8419
8420 * alpha-tdep.c (alpha_gdbarch_init): Use XCNEW instead of XNEW.
8421 * avr-tdep.c (avr_gdbarch_init): Likewise.
8422 * bfin-tdep.c (bfin_gdbarch_init): Likewise.
8423 * cris-tdep.c (cris_gdbarch_init): Likewise.
8424 * ft32-tdep.c (ft32_gdbarch_init): Likewise.
8425 * lm32-tdep.c (lm32_gdbarch_init): Likewise.
8426 * m32r-tdep.c (m32r_gdbarch_init): Likewise.
8427 * m68hc11-tdep.c (m68hc11_gdbarch_init): Likewise.
8428 * mep-tdep.c (mep_gdbarch_init): Likewise.
8429 * microblaze-tdep.c (microblaze_gdbarch_init): Likewise.
8430 * mips-tdep.c (mips_gdbarch_init): Likewise.
8431 * mn10300-tdep.c (mn10300_gdbarch_init): Likewise.
8432 * moxie-tdep.c (moxie_gdbarch_init): Likewise.
8433 * msp430-tdep.c (msp430_gdbarch_init): Likewise.
8434 * sh64-tdep.c (sh64_gdbarch_init): Likewise.
8435 * v850-tdep.c (v850_gdbarch_init): Likewise.
8436
7a3929c4
YQ
84372017-05-24 Yao Qi <yao.qi@linaro.org>
8438
8439 * selftest-arch.c (tests_with_arch): Call registers_changed
8440 and reinit_frame_cache.
8441 * selftest.c (run_self_tests): Likewise.
8442
f4985dba
YQ
84432017-05-24 Yao Qi <yao.qi@linaro.org>
8444
8445 * rs6000-tdep.c (gdb_print_insn_powerpc): Remove.
8446 (rs6000_gdbarch_init): Don't call set_gdbarch_print_insn.
8447
ab20fa4a
YQ
84482017-05-24 Yao Qi <yao.qi@linaro.org>
8449
8450 * rl78-tdep.c (rl78_gdbarch_init): Don't call
8451 set_gdbarch_print_insn.
8452
f532ab94
YQ
84532017-05-24 Yao Qi <yao.qi@linaro.org>
8454
8455 * h8300-tdep.c (h8300_gdbarch_init): Don't call
8456 set_gdbarch_print_insn.
8457
39503f82
YQ
84582017-05-24 Yao Qi <yao.qi@linaro.org>
8459
8460 * alpha-tdep.c (alpha_gdbarch_init): Don't call
8461 set_gdbarch_print_insn.
8462 * arc-tdep.c (arc_gdbarch_init): Likewise.
8463 * arch-utils.c: include dis-asm.h.
8464 (default_print_insn): New function.
8465 * arch-utils.h (default_print_insn): Declare.
8466 * avr-tdep.c (avr_gdbarch_init): Don't call set_gdbarch_print_insn.
8467 * bfin-tdep.c (bfin_gdbarch_init): Likewise.
8468 * cris-tdep.c (cris_delayed_get_disassembler): Remove.
8469 (cris_gdbarch_init): Don't call set_gdbarch_print_insn.
8470 * frv-tdep.c (frv_gdbarch_init): Likewise.
8471 * ft32-tdep.c (ft32_gdbarch_init): Likewise.
8472 * gdbarch.sh (print_insn): Use default_print_insn.
8473 * gdbarch.c: Regenerated.
8474 * hppa-tdep.c (hppa_gdbarch_init): Likewise.
8475 * iq2000-tdep.c (iq2000_gdbarch_init): Likewise.
8476 * lm32-tdep.c (lm32_gdbarch_init): Likewise.
8477 * m32c-tdep.c (m32c_gdbarch_init): Likewise.
8478 * m32r-tdep.c (m32r_gdbarch_init): Likewise.
8479 * m68hc11-tdep.c (gdb_print_insn_m68hc11): Remove.
8480 (m68hc11_gdbarch_init): Don't call set_gdbarch_print_insn.
8481 * m68k-tdep.c (m68k_gdbarch_init): Likewise.
8482 * m88k-tdep.c (m88k_gdbarch_init): Likewise.
8483 * microblaze-tdep.c (microblaze_gdbarch_init): Likewise.
8484 * mn10300-tdep.c (mn10300_gdbarch_init): Likewise.
8485 * moxie-tdep.c (moxie_gdbarch_init): Likewise.
8486 * msp430-tdep.c (msp430_gdbarch_init): Likewise.
8487 * mt-tdep.c (mt_gdbarch_init): Likewise.
8488 * nds32-tdep.c (nds32_gdbarch_init): Likewise.
8489 * nios2-tdep.c (nios2_print_insn): Remove.
8490 (nios2_gdbarch_init): Don't call set_gdbarch_print_insn.
8491 * rx-tdep.c (rx_gdbarch_init): Likewise.
8492 * s390-linux-tdep.c (s390_gdbarch_init): Likewise.
8493 * score-tdep.c (score_print_insn): Remove.
8494 (score_gdbarch_init): Don't call set_gdbarch_print_insn.
8495 * sh-tdep.c (sh_gdbarch_init): Likewise.
8496 * sh64-tdep.c (sh64_gdbarch_init): Likewise.
8497 * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
8498 * tic6x-tdep.c (tic6x_print_insn): Remove.
8499 (tic6x_gdbarch_init): Don't call set_gdbarch_print_insn.
8500 * tilegx-tdep.c (tilegx_gdbarch_init): Likewise.
8501 * v850-tdep.c (v850_gdbarch_init): Likewise.
8502 * vax-tdep.c (vax_gdbarch_init): Likewise.
8503 * xstormy16-tdep.c (xstormy16_gdbarch_init): Likewise.
8504 * xtensa-tdep.c (xtensa_gdbarch_init): Likewise.
8505
f7241d4f
JB
85062017-05-23 John Baldwin <jhb@FreeBSD.org>
8507
8508 * mips-fbsd-tdep.c (MIPS_PC_REGNUM): Remove.
8509 (MIPS_FP0_REGNUM): Remove.
8510 (MIPS_FSR_REGNUM): Remove.
8511 (mips_fbsd_supply_fpregs): Use mips_regnum.
8512 (mips_fbsd_supply_gregs): Likewise.
8513 (mips_fbsd_collect_fpregs): Likewise.
8514 (mips_fbsd_collect_gregs): Likewise.
8515
d489d81d
JB
85162017-05-23 John Baldwin <jhb@FreeBSD.org>
8517
8518 * mips-fbsd-nat.c (getregs_supplies): Fix upper bound comparison.
8519 (getpfpregs_supplies): New function.
8520 (mips_fbsd_fetch_inferior_registers): Remove early exit and use
8521 getfpregs_supplies.
8522 (mips_fbsd_store_inferior_registers): Likewise.
8523
e11b3cdc
PA
85242017-05-22 Pedro Alves <palves@redhat.com>
8525
8526 * MAINTAINERS (Host/Native): Add John Baldwin as FreeBSD
8527 maintainer.
8528
0f068fb5
AH
85292017-05-22 Alan Hayward <alan.hayward@arm.com>
8530
8531 * ppc-linux-nat.c (fetch_register): Use PPC_MAX_REGISTER_SIZE.
8532 (store_register): Likewise.
8533 * ppc-sysv-tdep.c (ppc_sysv_abi_push_dummy_call): Likewise.
8534 (get_decimal_float_return_value): Likewise.
8535 (do_ppc_sysv_return_value): Likewise.
8536 (ppc64_sysv_abi_push_integer): Likewise.
8537 (ppc64_sysv_abi_push_freg): Likewise.
8538 (ppc64_sysv_abi_return_value_base): Likewise.
8539 (ppc64_sysv_abi_return_value): Likewise.
8540 * rs6000-aix-tdep.c (rs6000_push_dummy_call): Likewise.
8541 * rs6000-lynx178-tdep.c (rs6000_lynx178_push_dummy_call): Likewise.
8542 * rs6000-nat.c: Likewise.
8543 * rs6000-tdep.c (rs6000_register_to_value): Likewise.
8544 (rs6000_value_to_register): Likewise.
8545 * ppc-tdep.h (PPC_MAX_REGISTER_SIZE): Add.
8546
e6cf65f2
TT
85472017-05-21 Tom Tromey <tom@tromey.com>
8548
8549 PR rust/21466:
8550 * rust-lang.c (rust_print_type) <TYPE_CODE_ARRAY>: Print unsized
8551 arrays as "[T]", not "[T; ]".
8552
43cc5389
TT
85532017-05-19 Tom Tromey <tom@tromey.com>
8554
8555 PR rust/21484:
8556 * rust-lang.c (exp_descriptor_rust): New function.
8557 (rust_language_defn): Use it.
8558 * p-lang.c (pascal_language_defn): Update.
8559 * opencl-lang.c (opencl_language_defn): Update.
8560 * objc-lang.c (objc_language_defn): Update.
8561 * m2-lang.c (m2_language_defn): Update.
8562 * language.h (struct language_defn)
8563 <la_watch_location_expression>: New member.
8564 * language.c (unknown_language_defn, auto_language_defn)
8565 (local_language_defn): Update.
8566 * go-lang.c (go_language_defn): Update.
8567 * f-lang.c (f_language_defn): Update.
8568 * d-lang.c (d_language_defn): Update.
8569 * c-lang.h (c_watch_location_expression): Declare.
8570 * c-lang.c (c_watch_location_expression): New function.
8571 (c_language_defn, cplus_language_defn, asm_language_defn)
8572 (minimal_language_defn): Use it.
8573 * breakpoint.c (watch_command_1): Call
8574 la_watch_location_expression.
8575 * ada-lang.c (ada_language_defn): Update.
8576
7a6e7fcc
RO
85772017-05-19 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
8578
6e7e1744
RO
8579 PR tui/21482
8580 * gdb_curses.h (NOMACROS): Define.
8581 (NCURSES_NOMACROS): Define.
8582
85832017-05-19 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
8584
8585 PR tui/21482
7a6e7fcc
RO
8586 * tui/tui-windata.c (tui_erase_data_content): Cast last mvwaddstr
8587 arg to char *.
8588 * tui/tui-wingeneral.c (box_win): Likewise.
8589 * tui/tui-winsource.c (tui_erase_source_content): Likewise.
8590 (tui_show_source_line): Likewise.
8591 (tui_show_exec_info_content): Likewise.
8592
1933fd8e
VM
85932017-05-19 Vladimir Mezentsev <vladimir.mezentsev@oracle.com>
8594
8595 * sparc-tdep.c (sparc_structure_return_p)
8596 (sparc_arg_on_registers_p): New functions.
8597 (sparc32_store_arguments): Use them.
8598 * sparc64-tdep.c (sparc64_16_byte_align_p)
8599 (sparc64_store_floating_fields, sparc64_extract_floating_fields):
8600 Handle TYPE_CODE_ARRAY.
8601
21873064
YQ
86022017-05-17 Yao Qi <yao.qi@linaro.org>
8603
8604 * cli/cli-decode.c (add_alias_cmd): New function.
8605 * command.h (add_alias_cmd): Declare.
8606 * infcmd.c (_initialize_infcmd): Don't call add_com_alias,
8607 instead call add_alias_cmd.
8608
2b351b19
PA
86092017-05-17 Pedro Alves <palves@redhat.com>
8610
8611 * Makefile.in (nat_extra_makefile_frag): Rename to ...
8612 (nat_makefile_frag): ... this. All references updated.
8613 * configure.ac: Likewise.
8614 * configure.nat: Likewise. Enhance comments.
8615 * configure: Regenerate.
8616
5f2ad7a3
RO
86172017-05-15 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
8618
8619 * procfs.c (procfs_create_inferior): Change prototype to match
8620 definition.
8621
adf3dde5
EZ
86222017-05-13 Eli Zaretskii <eliz@gnu.org>
8623
8624 * tui/tui.c (tui_enable): Cast "unknown" to 'char *' to avoid a
8625 C++ compiler warning.
8626
6830f270
TT
86272017-05-12 Tom Tromey <tom@tromey.com>
8628
8629 PR rust/21483:
8630 * rust-lang.c (rust_evaluate_subexp) <STRUCTOP_STRUCT>: Don't
8631 recurse, just call value_struct_elt directly.
8632
68f2f2e3
TT
86332017-05-12 Tom Tromey <tom@tromey.com>
8634
8635 * rust-lang.c (rust_dump_subexp_body) <STRUCTOP_ANONYMOUS,
8636 OP_RUST_ARRAY>: Fix.
8637
256afbc2
TT
86382017-05-12 Tom Tromey <tom@tromey.com>
8639
8640 * rust-lang.c (rust_print_subexp): Replace "return" with "break".
8641
94bb8dfe
YQ
86422017-05-09 Yao Qi <yao.qi@linaro.org>
8643
8644 * regcache.c: Include <forward_list>.
8645 (struct regcache_list): Remove.
8646 (current_regcache): Update.
8647 (get_thread_arch_aspace_regcache): Update for std::forward_list.
8648 (regcache_thread_ptid_changed): Likewise.
8649 (registers_changed_ptid): Likewise.
8650 (current_regcache_size): Likewise.
8651
8248946c
YQ
86522017-05-09 Yao Qi <yao.qi@linaro.org>
8653
8654 * regcache.c [GDB_SELF_TEST]: Include selftest.h.
8655 (current_regcache_size): New function.
8656 (current_regcache_test): New function.
8657 (_initialize_regcache) [GDB_SELF_TEST]: Register the unit test.
8658
313c5961
AH
86592017-05-08 Alan Hayward <alan.hayward@arm.com>
8660
8661 * mips-tdep.c (mips_o32_return_value): Remove unused buffer.
8662 (print_gp_register_row): Use get_frame_register_value.
8663
27bfc1d1
AH
86642017-05-08 Alan Hayward <alan.hayward@arm.com>
8665
8666 * mips-linux-tdep.c (mips_supply_gregset): Use raw_supply_zeroed.
8667 (mips_supply_fpregset): Likewise.
8668 (mips64_supply_gregset): Likewise.
8669
146e6c5c
AH
86702017-05-08 Alan Hayward <alan.hayward@arm.com>
8671
8672 * mn10300-linux-tdep.c (am33_supply_gregset_method): Use
8673 regcache->raw_supply_zeroed.
8674
e50f25ec
SDJ
86752017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
8676
8677 * configure.nat: Rearrange 'case' statements to match
8678 host before cpu.
8679
21ea5acd
SDJ
86802017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
8681
8682 * Makefile.in: Remove "@host_makefile_frag@". Add variables
8683 NAT_FILE, NATDEPFILES, NAT_CDEPS, LOADLIBES, MH_CFLAGS, XM_CLIBS,
8684 NAT_GENERATED_FILES, HAVE_NATIVE_GCORE_HOST. Add
8685 "@nat_extra_makefile_frag@".
8686 (Makefile): Remove dependency on "@frags@".
8687 ($(GNULIB_BUILDDIR)/Makefile): Likewise.
8688 (data-directory/Makefile): Likewise.
8689 * config/aarch64/linux.mh: Deleted; moved contents to
8690 "gdb/configure.nat".
8691 * config/alpha/alpha-linux.mh: Likewise.
8692 * config/alpha/nbsd.mh: Likewise.
8693 * config/arm/linux.mh: Likewise.
8694 * config/arm/nbsdelf.mh: Likewise.
8695 * config/i386/cygwin.mh: Likewise.
8696 * config/i386/cygwin64.mh: Likewise.
8697 * config/i386/darwin.mh: Likewise.
8698 * config/i386/fbsd.mh: Likewise.
8699 * config/i386/fbsd64.mh: Likewise.
8700 * config/i386/go32.mh: Likewise.
8701 * config/i386/i386gnu.mh: Likewise.
8702 * config/i386/i386sol2.mh: Likewise.
8703 * config/i386/linux.mh: Likewise.
8704 * config/i386/linux64.mh: Likewise.
8705 * config/i386/mingw.mh: Likewise.
8706 * config/i386/mingw64.mh: Likewise.
8707 * config/i386/nbsd64.mh: Likewise.
8708 * config/i386/nbsdelf.mh: Likewise.
8709 * config/i386/nto.mh: Likewise.
8710 * config/i386/obsd.mh: Likewise.
8711 * config/i386/obsd64.mh: Likewise.
8712 * config/i386/sol2-64.mh: Likewise.
8713 * config/ia64/linux.mh: Likewise.
8714 * config/m32r/linux.mh: Likewise.
8715 * config/m68k/linux.mh: Likewise.
8716 * config/m68k/nbsdelf.mh: Likewise.
8717 * config/m68k/obsd.mh: Likewise.
8718 * config/m88k/obsd.mh: Likewise.
8719 * config/mips/fbsd.mh: Likewise.
8720 * config/mips/linux.mh: Likewise.
8721 * config/mips/nbsd.mh: Likewise.
8722 * config/mips/obsd64.mh: Likewise.
8723 * config/pa/linux.mh: Likewise.
8724 * config/pa/nbsd.mh: Likewise.
8725 * config/pa/obsd.mh: Likewise.
8726 * config/powerpc/aix.mh: Likewise.
8727 * config/powerpc/fbsd.mh: Likewise.
8728 * config/powerpc/linux.mh: Likewise.
8729 * config/powerpc/nbsd.mh: Likewise.
8730 * config/powerpc/obsd.mh: Likewise.
8731 * config/powerpc/ppc64-linux.mh: Likewise.
8732 * config/powerpc/spu-linux.mh: Likewise.
8733 * config/s390/linux.mh: Likewise.
8734 * config/sh/nbsd.mh: Likewise.
8735 * config/sparc/fbsd.mh: Likewise.
8736 * config/sparc/linux.mh: Likewise.
8737 * config/sparc/linux64.mh: Likewise.
8738 * config/sparc/nbsd64.mh: Likewise.
8739 * config/sparc/nbsdelf.mh: Likewise.
8740 * config/sparc/obsd64.mh: Likewise.
8741 * config/sparc/sol2.mh: Likewise.
8742 * config/tilegx/linux.mh: Likewise.
8743 * config/vax/nbsdelf.mh: Likewise.
8744 * config/vax/obsd.mh: Likewise.
8745 * config/xtensa/linux.mh: Likewise.
8746 * config/i386/i386gnu.mn: New file, with excerpts from
8747 "config/i386/i386gnu.mh".
8748 * configure: Regenerate.
8749 * configure.ac: Rewrite code to use "gdb/configure.nat" instead of
8750 *.mh files under "gdb/config".
8751 * configure.nat: New file, with contents from the
8752 "gdb/config/*/*.mh" files.
8753
7ed1acaf
TW
87542017-05-05 Tim Wiederhake <tim.wiederhake@intel.com>
8755
8756 * btrace.c (btrace_clear): Free insn vector.
8757
e13cb306
PA
87582017-05-05 Pedro Alves <palves@redhat.com>
8759
8760 * warning.m4 (build_warnings): Add -Wno-error=maybe-uninitialized.
8761 * configure: Regenerate.
8762
5ed8105e
PA
87632017-05-04 Pedro Alves <palves@redhat.com>
8764
8765 * Makefile.in (SFILES): Add progspace-and-thread.c.
8766 (HFILES_NO_SRCDIR): Add progspace-and-thread.h.
8767 (COMMON_OBS): Add progspace-and-thread.o.
8768 * breakpoint.c: Include "progspace-and-thread.h".
8769 (update_inserted_breakpoint_locations)
8770 (insert_breakpoint_locations, create_longjmp_master_breakpoint):
8771 Use scoped_restore_current_pspace_and_thread.
8772 (create_std_terminate_master_breakpoint): Use
8773 scoped_restore_current_program_space.
8774 (remove_breakpoint): Use scoped_restore_current_pspace_and_thread.
8775 (print_breakpoint_location): Use
8776 scoped_restore_current_program_space.
8777 (bp_loc_is_permanent): Use
8778 scoped_restore_current_pspace_and_thread.
8779 (resolve_sal_pc): Use scoped_restore_current_pspace_and_thread.
8780 (download_tracepoint_locations): Use
8781 scoped_restore_current_pspace_and_thread.
8782 (breakpoint_re_set): Use scoped_restore_current_pspace_and_thread.
8783 * exec.c (exec_close_1): Use scoped_restore_current_program_space.
8784 (enum step_over_calls_kind): Moved from inferior.h.
8785 (class scoped_restore_current_thread): New class.
8786 * gdbthread.h (make_cleanup_restore_current_thread): Delete
8787 declaration.
8788 (scoped_restore_current_thread): New class.
8789 * infcmd.c: Include "common/gdb_optional.h".
8790 (continue_1, proceed_after_attach): Use
8791 scoped_restore_current_thread.
8792 (notice_new_inferior): Use scoped_restore_current_thread.
8793 * inferior.c: Include "progspace-and-thread.h".
8794 (restore_inferior, save_current_inferior): Delete.
8795 (add_inferior_command, clone_inferior_command): Use
8796 scoped_restore_current_pspace_and_thread.
8797 * inferior.h (scoped_restore_current_inferior): New class.
8798 * infrun.c: Include "progspace-and-thread.h" and
8799 "common/gdb_optional.h".
8800 (follow_fork_inferior): Use
8801 scoped_restore_current_pspace_and_thread.
8802 (scoped_restore_exited_inferior): New class.
8803 (handle_vfork_child_exec_or_exit): Use
8804 scoped_restore_exited_inferior,
8805 scoped_restore_current_pspace_and_thread,
8806 scoped_restore_current_thread and scoped_restore.
8807 (fetch_inferior_event): Use scoped_restore_current_thread.
8808 * linespec.c (decode_line_full, decode_line_1): Use
8809 scoped_restore_current_program_space.
8810 * mi/mi-main.c: Include "progspace-and-thread.h".
8811 (exec_continue): Use scoped_restore_current_thread.
8812 (mi_cmd_exec_run): Use scoped_restore_current_pspace_and_thread.
8813 (mi_cmd_trace_frame_collected): Use scoped_restore_current_thread.
8814 * proc-service.c (ps_pglobal_lookup): Use
8815 scoped_restore_current_program_space.
8816 * progspace-and-thread.c: New file.
8817 * progspace-and-thread.h: New file.
8818 * progspace.c (release_program_space, clone_program_space): Use
8819 scoped_restore_current_program_space.
8820 (restore_program_space, save_current_program_space)
8821 (save_current_space_and_thread): Delete.
8822 (switch_to_program_space_and_thread): Moved to
8823 progspace-and-thread.c.
8824 * progspace.h (save_current_program_space)
8825 (save_current_space_and_thread): Delete declarations.
8826 (scoped_restore_current_program_space): New class.
8827 * remote.c (remote_btrace_maybe_reopen): Use
8828 scoped_restore_current_thread.
8829 * symtab.c: Include "progspace-and-thread.h".
8830 (skip_prologue_sal): Use scoped_restore_current_pspace_and_thread.
8831 * thread.c (print_thread_info_1): Use
8832 scoped_restore_current_thread.
8833 (struct current_thread_cleanup): Delete.
8834 (do_restore_current_thread_cleanup)
8835 (restore_current_thread_cleanup_dtor): Rename/convert both to ...
8836 (scoped_restore_current_thread::~scoped_restore_current_thread):
8837 ... this new dtor.
8838 (make_cleanup_restore_current_thread): Rename/convert to ...
8839 (scoped_restore_current_thread::scoped_restore_current_thread):
8840 ... this new ctor.
8841 (thread_apply_all_command): Use scoped_restore_current_thread.
8842 (thread_apply_command): Use scoped_restore_current_thread.
8843 * tracepoint.c (tdump_command): Use scoped_restore_current_thread.
8844 * varobj.c (value_of_root_1): Use scoped_restore_current_thread.
8845
f6223dbb
PA
88462017-05-04 Pedro Alves <palves@redhat.com>
8847
8848 * thread.c (make_cleanup_restore_current_thread): Move
8849 find_thread_ptid call before the is_stopped call. Assert that the
8850 thread is found. Replace is_stopped call by checking the thread's
8851 state directly. Remove unnecessary NULL-thread check.
8852
3c3ae77e
PA
88532017-05-04 Pedro Alves <palves@redhat.com>
8854
8855 * corelow.c (thread_section_name): New class.
8856 (get_core_register_section, get_core_siginfo): Use it.
8857
45eba0ab
AA
88582017-05-04 Andreas Arnez <arnez@linux.vnet.ibm.com>
8859
8860 * corelow.c (sniff_core_bfd): Remove extra semicolon.
8861 (get_core_register_section): Remove xfree of NULL pointer.
8862
f81fdd35
AH
88632017-05-03 Alan Hayward <alan.hayward@arm.com>
8864
8865 * frv-linux-tdep.c (frv_linux_supply_gregset): Use raw_supply_zeroed.
8866 * regcache.c (regcache::raw_supply_zeroed): New function.
8867 * regcache.h (regcache::raw_supply_zeroed): New declaration.
8868
35837774
SM
88692017-05-03 Simon Marchi <simon.marchi@ericsson.com>
8870
8871 * gdbarch.sh: Remove commented out definition of
8872 TARGET_CHAR_BIT.
8873 * gdbarch.h: Re-generate.
8874
c94fee56
SDJ
88752017-05-03 Sergio Durigan Junior <sergiodj@redhat.com>
8876
8877 * configure: Regenerate.
8878
d17f7b36
SM
88792017-05-02 Simon Marchi <simon.marchi@ericsson.com>
8880
8881 * solib-target.c (solib_target_relocate_section_addresses):
8882 Remove num_section_bases, num_bases, segment_bases variables.
8883
b560ebd6
SM
88842017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
8885
8886 * common/gdb_vecs.h (DEF_VEC_I (CORE_ADDR)): Remove.
8887
f2f46dfc
SM
88882017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
8889
8890 * solib-target.c: Include <vector>
8891 (struct lm_info_target) <~lm_info_target>: Remove.
8892 <segment_bases, section_bases>: Change type to
8893 std::vector<CORE_ADDR>.
8894 (library_list_start_segment, library_list_start_section,
8895 library_list_end_library,
8896 solib_target_relocate_section_addresses): Adjust.
8897
a0ff9e1a
SM
88982017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
8899
8900 * gdbarch.sh (software_single_step): Change return type to
8901 std::vector<CORE_ADDR>.
8902 * gdbarch.c, gdbarch.h: Re-generate.
8903 * arch/arm-get-next-pcs.c (thumb_deal_with_atomic_sequence_raw):
8904 Adjust.
8905 (arm_deal_with_atomic_sequence_raw): Adjust.
8906 (thumb_get_next_pcs_raw): Adjust.
8907 (arm_get_next_pcs_raw): Adjust.
8908 (arm_get_next_pcs): Adjust.
8909 * arch/arm-get-next-pcs.h (arm_get_next_pcs): Adjust.
8910 * aarch64-tdep.c (aarch64_software_single_step): Adjust.
8911 * alpha-tdep.c (alpha_deal_with_atomic_sequence): Adjust.
8912 (alpha_software_single_step): Adjust.
8913 * alpha-tdep.h (alpha_software_single_step): Adjust.
8914 * arm-linux-tdep.c (arm_linux_software_single_step): Adjust.
8915 * arm-tdep.c (arm_software_single_step): Adjust.
8916 (arm_breakpoint_kind_from_current_state): Adjust.
8917 * arm-tdep.h (arm_software_single_step): Adjust.
8918 * breakpoint.c (insert_single_step_breakpoint): Adjust.
8919 * cris-tdep.c (cris_software_single_step): Adjust.
8920 * mips-tdep.c (mips_deal_with_atomic_sequence): Adjust.
8921 (micromips_deal_with_atomic_sequence): Adjust.
8922 (deal_with_atomic_sequence): Adjust.
8923 (mips_software_single_step): Adjust.
8924 * mips-tdep.h (mips_software_single_step): Adjust.
8925 * moxie-tdep.c (moxie_software_single_step): Adjust.
8926 * nios2-tdep.c (nios2_software_single_step): Adjust.
8927 * ppc-tdep.h (ppc_deal_with_atomic_sequence): Adjust.
8928 * rs6000-aix-tdep.c (rs6000_software_single_step): Adjust.
8929 * rs6000-tdep.c (ppc_deal_with_atomic_sequence): Adjust.
8930 * s390-linux-tdep.c (s390_software_single_step): Adjust.
8931 * sparc-tdep.c (sparc_software_single_step): Adjust.
8932 * spu-tdep.c (spu_software_single_step): Adjust.
8933 * tic6x-tdep.c (tic6x_software_single_step): Adjust.
8934
ea480a30
SM
89352017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
8936
8937 * gdbarch.sh: Use semi-colon as field separator instead of colon.
8938 * gdbarch.h: Re-generate.
8939
d050f7d7
TW
89402017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
8941
8942 * Makefile.in (SUBDIR_PYTHON_OBS): Add py-instruction.o.
8943 (SUBDIR_PYTHON_SRCS): Add py-instruction.c.
8944 * python/py-instruction.c, python/py-instruction.h: New file.
8945 * python/py-record.c: Add py-instruction.h include.
8946 (gdbpy_initialize_record): Make gdb.Instruction a super class of
8947 gdb.RecordInstruction.
8948 * python/python-internal.h: Add gdbpy_initialize_instruction
8949 declaration.
8950 * python/python.c (do_start_initialization): Add
8951 gdbpy_initialize_instruction.
8952
14f819c8
TW
89532017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
8954
8955 * python/py-record-btrace.c (BTPY_REQUIRE_VALID_CALL, btpy_call_type):
8956 Remove.
8957 (btrace_func_from_recpy_func): New function.
8958 (btpy_call_new, btpy_number, btpy_hash, btpy_richcompare): Remove.
8959 (btpy_call_level, btpy_call_symbol, btpy_call_instructions,
8960 btpy_call_up, btpy_call_prev_sibling, btpy_call_next_sibling): Rename to ...
8961 (recpy_bt_func_level, recpy_bt_func_symbol, recpy_bt_func_instructions,
8962 recpy_bt_func_up, recpy_bt_func_prev, recpy_bt_func_next): This.
8963 Also, use new helper functions.
8964 (btpy_list_item): Use new helper functions.
8965 (recpy_bt_function_call_history): Use new type name.
8966 (btpy_call_getset): Remove.
8967 (gdbpy_initialize_btrace): Remove code to initialize
8968 gdb.BtraceFunctionCall.
8969 * python/py-record-btrace.h (recpy_bt_func_number, recpy_btb_func_level,
8970 recpy_btb_func_symbol, recpy_bt_func_instructions, recpy_bt_func_up,
8971 recpy_bt_func_prev, recpy_bt_func_next): New export.
8972 * python/py-record.c (recpy_func_type): New static object.
8973 (recpy_func_new, recpy_func_level, recpy_func_symbol,
8974 recpy_func_instructions, recpy_func_up, recpy_func_prev,
8975 recpy_func_next): New function.
8976 (recpy_element_hash, recpy_element_richcompare): Updated comment.
8977 (recpy_func_getset): New static object.
8978 (gdbpy_initialize_record): Add code to initialize gdb.RecordInstruction.
8979 * python/py-record.h (recpy_func_type, recpy_func_new): New export.
8980
0ed5da75
TW
89812017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
8982
8983 * python/py-record-btrace.c (BTPY_REQUIRE_VALID_INSN): Remove.
8984 (btpy_object, btpy_insn_type, btpy_new): Remove.
8985 (btpy_list_object): Use gdb.RecordInstruction type instead of
8986 gdb.BtraceInstruction type.
8987 (btrace_insn_from_recpy_insn): New function.
8988 (btpy_insn_or_gap_new): Adjust comment. Use recpy_insn_new instead of
8989 btpy_new.
8990 (btpy_call_new, btpy_list_item): Do not use btpy_new anymore.
8991 (btpy_number, btpy_hash, btpy_call_level, btpy_call_symbol,
8992 btpy_call_instructions, btpy_call_up, btpy_call_prev_sibling,
8993 btpy_call_next_sibling, btpy_richcompare): Use recpy_element_object
8994 instead of btpy_object.
8995 (btpy_insn_sal, btpy_insn_pc, btpy_insn_size, btpy_insn_is_speculative,
8996 btpy_insn_data, btpy_insn_decode): Rename to ...
8997 (recpy_bt_insn_sal, recpy_bt_insn_pc, recpy_bt_insn_size,
8998 recpy_bt_insn_is_speculative, recpy_bt_insn_data,
8999 recpy_bt_insn_decode): This. Also, use new helper functions.
9000 (btpy_list_position, recpy_bt_goto): Use recpy_element_object and
9001 recpy_insn_type.
9002 (btpy_insn_getset): Remove.
9003 (gdbpy_initialize_btrace): Remove code to initialize
9004 gdb.BtraceInstruction. Use recpy_element_object.
9005 * python/py-record-btrace.h (recpy_bt_insn_number, recpy_bt_insn_sal,
9006 recpy_bt_insn_pc, recpy_bt_insn_data, recpy_bt_insn_decoded,
9007 recpy_bt_insn_size, recpy_bt_insn_is_speculative): New export.
9008 * python/py-record.c (recpy_insn_type): New static object.
9009 (recpy_insn_new, recpy_insn_sal, recpy_insn_pc, recpy_insn_data,
9010 recpy_insn_decoded, recpy_insn_size, recpy_insn_is_speculative,
9011 recpy_element_number, recpy_element_hash, recpy_element_richcompare):
9012 New function.
9013 (recpy_insn_getset): New static object.
9014 (gdbpy_initialize_record): Initialize gdb.RecordInstruction.
9015 * python/py-record.h (recpy_element_object): New typedef.
9016 (recpy_insn_type, recpy_insn_new): New export.
9017
913aeadd
TW
90182017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
9019
9020 * py-record-btrace.c (btpy_insn_new): Removed.
9021 (btpy_insn_or_gap_new): New function.
9022 (btpy_insn_error): Removed.
9023 (btpy_insn_sal, btpy_insn_pc, btpy_insn_size, btpy_insn_is_speculative,
9024 btpy_insn_data, btpy_insn_decode): Remove code path for gaps.
9025 (recpy_bt_replay_position, recpy_bt_begin, recpy_bt_end): Call
9026 btpy_insn_or_gap_new instead of btpy_insn_new.
9027 (btpy_insn_getset): Remove btpy_insn_error.
9028 * py-record.c (recpy_gap_type): New static object.
9029 (recpy_gap_object): New typedef.
9030 (recpy_gap_new, recpy_gap_number, recpy_gap_reason_code,
9031 recpy_gap_reason_string): New function.
9032 (recpy_gap_getset): New static object.
9033 (gdbpy_initialize_record): Initialize gdb.RecordGap type.
9034 * py-record.h (recpy_gap_new): New export.
9035
a3be24ad
TW
90362017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
9037
9038 * python/py-record.c (recpy_ptid): Remove.
9039 (recpy_record_getset): Remove recpy_ptid.
9040
ae20e79a
TW
90412017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
9042
9043 * btrace.c (btrace_fetch): Set inferior_ptid.
9044 * python/py-record-btrace.c: Add "py-record.h" include.
9045 (recpy_bt_format, recpy_bt_replay_position, recpy_bt_begin,
9046 recpy_bt_end, recpy_bt_instruction_history,
9047 recpy_bt_function_call_history, recpy_bt_goto): Use ptid stored
9048 in gdb.Record object instead of current ptid.
9049 * python/py-record.c: Include new "py-record.h" file.
9050 (recpy_record_object): Moved to py-record.h.
9051 * python/py-record.h: New file.
9052
8d0050ea
TW
90532017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
9054
9055 * python/py-record-btrace.c (BTPY_REQUIRE_VALID_INSN,
9056 BTPY_REQUIRE_VALID_CALL, recpy_bt_function_call_history): Fix
9057 indentation.
9058
3f380b50
JB
90592017-05-01 Joel Brobecker <brobecker@adacore.com>
9060
9061 * MAINTAINERS: Move Daniel Jacobowitz and Mark Kettenis to
9062 the past maintainers section.
9063
07495424
YQ
90642017-04-28 Yao Qi <yao.qi@linaro.org>
9065
9066 * infcmd.c (get_return_value): Use regcache ctor, and remove
9067 cleanup.
9068
deb1fa3e
YQ
90692017-04-28 Yao Qi <yao.qi@linaro.org>
9070 Pedro Alves <palves@redhat.com>
9071
9072 * regcache.c (regcache::regcache): New tag dispatch ctor.
9073 (do_cooked_read): Moved above.
9074 (regcache_dup): Use the tag dispatch ctor..
9075 * regcache.h (regcache): Declare ctor, delete copy ctor and
9076 assignment operator, remove friend regcache_dup.
9077
b421c83c
YQ
90782017-04-28 Yao Qi <yao.qi@linaro.org>
9079
9080 * regcache.c (regcache_dup): Assert !src->m_readonly_p and
9081 call method save instead of regcache_cpy.
9082 * regcache.h (struct regcache): Make regcache_dup a friend.
9083
ef79d9a3
YQ
90842017-04-28 Yao Qi <yao.qi@linaro.org>
9085
9086 * regcache.c (struct regcache): Move to regcache.h
9087 (regcache::arch): New method.
9088 (regcache_get_ptid): Update.
9089 (get_regcache_arch): Call arch method.
9090 (get_regcache_aspace): Call method aspace.
9091 (register_buffer): Change it to method.
9092 (regcache_save): Change it to regcache::save.
9093 (regcache_restore): Likewise.
9094 (regcache_cpy_no_passthrough): Remove the declaration.
9095 (regcache_cpy): Call methods restore and cpy_no_passthrough.
9096 (regcache_cpy_no_passthrough): Change it to method
9097 cpy_no_passthrough.
9098 (regcache_register_status): Change it to method
9099 get_register_status.
9100 (regcache_invalidate): Change it to method invalidate.
9101 (regcache_thread_ptid_changed): Use methods ptid and set_ptid.
9102 (regcache_raw_update): Change it to method raw_update.
9103 (regcache_raw_read): Likewise.
9104 (regcache_raw_read_signed): Likewise.
9105 (regcache_raw_read_unsigned): Likewise.
9106 (regcache_raw_write_signed): Likewise.
9107 (regcache_raw_write_unsigned): Likewise.
9108 (regcache_cooked_read): Likewise.
9109 (regcache_cooked_read_value): Likewise.
9110 (regcache_cooked_read_signed): Likewise.
9111 (regcache_cooked_read_unsigned): Likewise.
9112 (regcache_cooked_write_signed): Likewise.
9113 (regcache_cooked_write_unsigned): Likewise.
9114 (regcache_raw_set_cached_value): Likewise.
9115 (regcache_raw_write): Likewise.
9116 (regcache_cooked_write): Likewise.
9117 (regcache_xfer_part): Likewise.
9118 (regcache_raw_read_part): Likewise.
9119 (regcache_raw_write_part): Likewise.
9120 (regcache_cooked_read_part): Likewise.
9121 (regcache_cooked_write_part): Likewise.
9122 (regcache_raw_supply): Likewise.
9123 (regcache_raw_collect): Likewise.
9124 (regcache_transfer_regset): Likewise.
9125 (regcache_supply_regset): Likewise.
9126 (regcache_collect_regset): Likewise.
9127 (regcache_debug_print_register): Likewise.
9128 (enum regcache_dump_what): Move it to regcache.h.
9129 (regcache_dump): Change it to method dump.
9130 * regcache.h (enum regcache_dump_what): New.
9131 (class regcache): New.
9132 * target.c (target_fetch_registers): Call method
9133 debug_print_register.
9134 (target_store_registers): Likewise.
9135
f8fdb78e
SM
91362017-04-28 Simon Marchi <simon.marchi@ericsson.com>
9137
9138 * windows-nat.c (struct lm_info_windows): Initialize field.
9139 (windows_make_so): Allocate lm_info_windows with new.
9140 (windows_free_so): Free lm_info_windows with delete.
9141
9ccbfd7b
SM
91422017-04-28 Simon Marchi <simon.marchi@ericsson.com>
9143
9144 * solib-darwin.c (struct lm_info_darwin): Initialize field.
9145 (darwin_current_sos): Allocate lm_info_darwin with new, remove
9146 cleanup.
9147 (darwin_free_so): Free lm_info_darwin with delete.
9148
76e75227
SM
91492017-04-28 Simon Marchi <simon.marchi@ericsson.com>
9150
9151 * solib-svr4.h (struct lm_info_svr4): Initialize fields.
9152 <l_addr_p>: Change type to bool.
9153 * solib-svr4.c (lm_info_read): Allocate lm_info_svr4 with new.
9154 (svr4_free_so): Free lm_info_svr4 with delete.
9155 (svr4_copy_library_list): Replace memcpy with call to copy
9156 constructor.
9157 (library_list_start_library, svr4_default_sos): Allocate
9158 lm_info_svr4 with new.
9159
51046d9e
SM
91602017-04-28 Simon Marchi <simon.marchi@ericsson.com>
9161
9162 * solib-target.c (struct lm_info_target): Add destructor,
9163 initialize fields.
9164 <name>: Change type to std::string.
9165 (library_list_start_library): Allocate lm_info_target with new.
9166 (solib_target_free_library_list): Free lm_info_target with
9167 delete.
9168 (solib_target_current_sos): Adapt to std::string.
9169 (solib_target_free_so): Free lm_info_target with delete.
9170
4023ae76
SM
91712017-04-28 Simon Marchi <simon.marchi@ericsson.com>
9172
9173 * solib-frv.c (struct lm_info_frv): Add destructor, initialize
9174 fields.
9175 (frv_current_sos): Allocate lm_info_frv with new.
9176 (frv_relocate_main_executable): Free lm_info_frv with delete,
9177 allocate with new.
9178 (frv_clear_solib, frv_free_so): Free lm_info_frv with delete.
9179
af43057b
SM
91802017-04-28 Simon Marchi <simon.marchi@ericsson.com>
9181
9182 * solib-frv.c (struct lm_info_frv): Fix indentation.
9183
b0911207
SM
91842017-04-28 Simon Marchi <simon.marchi@ericsson.com>
9185
9186 * solib-dsbt.c (struct lm_info_dsbt): Add destructor, initialize
9187 map field.
9188 (dsbt_current_sos): Allocate lm_info_dsbt with new.
9189 (dsbt_relocate_main_executable): Free lm_info_dsbt with delete
9190 and allocate with new.
9191 (dsbt_clear_solib, dsbt_free_so): Free lm_info_dsbt with delete.
9192
6c401f72
SM
91932017-04-28 Simon Marchi <simon.marchi@ericsson.com>
9194
9195 * solib-aix.c (struct lm_info_aix): Initialize fields in-class.
9196 <filename, member_name>: Change type to std::string.
9197 (solib_aix_new_lm_info, solib_aix_xfree_lm_info): Remove.
9198 (library_list_start_library): Allocate lm_info_aix with new.
9199 (solib_aix_free_library_list, solib_aix_free_so): Free with delete.
9200 (solib_aix_current_sos): Adapt to std::string, copy lm_info_aix
9201 with copy constructor.
9202
d0e449a1
SM
92032017-04-28 Simon Marchi <simon.marchi@ericsson.com>
9204
9205 * solist.h (struct lm_info): Remove.
9206 (struct lm_info_base): New class.
9207 (struct so_list) <lm_info>: Change type to lm_info_base *.
9208 * nto-tdep.c (struct lm_info): Remove.
9209 (lm_addr): Adjust.
9210 * solib-aix.c (struct lm_info): Rename to ...
9211 (struct lm_info_aix): ... this. Extend lm_info_base.
9212 (lm_info_p): Rename to ...
9213 (lm_info_aix_p): ... this, and adjust.
9214 (solib_aix_new_lm_info, solib_aix_xfree_lm_info,
9215 solib_aix_parse_libraries, library_list_start_library,
9216 solib_aix_free_library_list, solib_aix_parse_libraries,
9217 solib_aix_get_library_list,
9218 solib_aix_relocate_section_addresses, solib_aix_free_so,
9219 solib_aix_get_section_offsets,
9220 solib_aix_solib_create_inferior_hook, solib_aix_current_sos):
9221 Adjust.
9222 (struct solib_aix_inferior_data) <library_list>: Adjust.
9223 * solib-darwin.c (struct lm_info): Rename to ...
9224 (struct lm_info_darwin): ... this. Extend lm_info_base.
9225 (darwin_current_sos, darwin_relocate_section_addresses): Adjust.
9226 * solib-dsbt.c (struct lm_info): Rename to ...
9227 (struct lm_info_dsbt): ... this. Extend lm_info_base.
9228 (struct dsbt_info) <main_executable_lm_info): Adjust.
9229 (dsbt_current_sos, dsbt_relocate_main_executable, dsbt_free_so,
9230 dsbt_relocate_section_addresses): Adjust.
9231 * solib-frv.c (struct lm_info): Rename to ...
9232 (struct lm_info_frv): ... this. Extend lm_info_base.
9233 (main_executable_lm_info): Adjust.
9234 (frv_current_sos, frv_relocate_main_executable, frv_free_so,
9235 frv_relocate_section_addresses, frv_fdpic_find_global_pointer,
9236 find_canonical_descriptor_in_load_object,
9237 frv_fdpic_find_canonical_descriptor): Adjust.
9238 * solib-svr4.c (struct lm_info): Move to solib-svr4.h, renamed
9239 to lm_info_svr4.
9240 (lm_info_read, lm_addr_check, svr4_keep_data_in_core,
9241 svr4_clear_so, svr4_copy_library_list,
9242 library_list_start_library, svr4_default_sos, svr4_read_so_list,
9243 svr4_current_sos, svr4_fetch_objfile_link_map,
9244 solist_update_incremental): Adjust.
9245 * solib-svr4.h (struct lm_info_svr4): Move here from
9246 solib-svr4.c.
9247 * solib-target.c (struct lm_info): Rename to ...
9248 (struct lm_info_target): ... this. Extend lm_info_base.
9249 (lm_info_p): Rename to ...
9250 (lm_info_target_p): ... this.
9251 (solib_target_parse_libraries, library_list_start_segment,
9252 library_list_start_section, library_list_start_library,
9253 library_list_end_library, solib_target_free_library_list,
9254 solib_target_current_sos, solib_target_free_so,
9255 solib_target_relocate_section_addresses): Adjust.
9256 * windows-nat.c (struct lm_info): Rename to ...
9257 (struct lm_info_windows): ... this. Extend lm_info_base.
9258 (windows_make_so, handle_load_dll, handle_unload_dll,
9259 windows_xfer_shared_libraries): Adjust.
9260
434a4023
SM
92612017-04-28 Simon Marchi <simon.marchi@ericsson.com>
9262
9263 * solib-darwin.c (struct darwin_so_list): Remove.
9264 (darwin_current_sos): Allocate an so_list object instead of a
9265 darwin_so_list, separately allocate an lm_info object.
9266 (darwin_free_so): Free lm_info.
9267
428544e8
JB
92682017-04-28 John Baldwin <jhb@FreeBSD.org>
9269
9270 * mips-tdep.c (print_gp_register_row): Replace printf_filtered
9271 with fprintf_filtered.
9272
4621115f
YQ
92732017-04-28 Yao Qi <yao.qi@linaro.org>
9274
9275 * regcache.c (regcache::regcache): New function.
9276 (regcache::~regcache): New function.
9277 (regcache_xmalloc_1): Remove.
9278 (regcache_xmalloc): Call new regcache.
9279 (regcache_xfree): Call delete regcache.
9280 (get_thread_arch_aspace_regcache): Call new regcache.
9281
339053c2
YQ
92822017-04-28 Yao Qi <yao.qi@linaro.org>
9283
9284 * mips-linux-nat.c (mips_linux_new_thread): Use ptid method
9285 lwp instead of ptid_get_lwp.
9286
7974a605
YQ
92872017-04-28 Yao Qi <yao.qi@linaro.org>
9288
9289 * mips-linux-nat.c (mips_linux_new_thread): Get lwpid from
9290 lwp_info instead of getting from inferior_ptid.
9291
e15c3eb4
KS
92922017-04-27 Keith Seitz <keiths@redhat.com>
9293
9294 * gdbtypes.c (LVALUE_REFERENCE_TO_RVALUE_BINDING_BADNESS)
9295 DIFFERENT_REFERENCE_TYPE_BADNESS): Remove.
9296 (CV_CONVERSION_BADNESS): Define.
9297 (rank_one_type): Remove overly restrictive rvalue reference
9298 rank checks.
9299 Add cv-qualifier checks and subranks for type equality.
9300 * gdbtypes.h (REFERENCE_CONVERSION_RVALUE,
9301 REFERENCE_CONVERSION_CONST_LVALUE, CV_CONVERSION_BADNESS,
9302 CV_CONVERSION_CONST, CV_CONVERSION_VOLATILE): Declare.
9303
72bc1d24
SM
93042017-04-27 Simon Marchi <simon.marchi@ericsson.com>
9305
9306 * python/py-inferior.c (inferior_to_inferior_object): Increment reference
9307 count when creating the object.
9308
55bcecda
UW
93092017-04-27 Sangamesh Mallayya <sangamesh.swamy@in.ibm.com>
9310 Ulrich Weigand <uweigand@de.ibm.com>
9311
9312 * xcoffread.c (read_xcoff_symtab): Read correct function auxiliary
9313 entry if xlc -qfuncsect or gcc -ffunction-sections compiler option
9314 is used in AIX.
9315 (read_xcoff_symtab): Handle C_WEAKEXT storage class.
9316 (process_xcoff_symbol): Likewise.
9317 (scan_xcoff_symtab): Likewise.
9318
5c99fcf8
AH
93192017-04-26 Alan Hayward <alan.hayward@arm.com>
9320
9321 * ia64-tdep.c (examine_prologue): Use get_frame_register_unsigned.
9322 (ia64_sigtramp_frame_prev_register): Use read_memory_unsigned_integer.
9323 (ia64_access_reg): Use get_frame_register_unsigned.
9324 (ia64_access_rse_reg): Likewise.
9325 (ia64_libunwind_frame_prev_register): Likewise.
9326
b41c5a85
JW
93272017-04-26 Jiong Wang <jiong.wang@arm.com>
9328
9329 * gdbarch.sh: New gdbarch method execute_dwarf_cfa_vendor_op.
9330 * gdbarch.c: Regenerated.
9331 * gdbarch.h: Regenerated.
9332 * dwarf2-frame.c (dwarf2_frame_state_alloc_regs): Made the
9333 visibility external.
9334 (execute_cfa_program): Call execute_dwarf_cfa_vendor_op for CFI
9335 between DW_CFA_lo_user and DW_CFA_high_user inclusive.
9336 (enum cfa_how_kind): Move to ...
9337 (struct dwarf2_frame_state_reg_info): Likewise.
9338 (struct dwarf2_frame_state): Likewise.
9339 * dwarf2-frame.h: ... here.
9340 (dwarf2_frame_state_alloc_regs): New declaration.
9341 * sparc-tdep.c (sparc_execute_dwarf_cfa_vendor_op): New function.
9342 (sparc32_gdbarch_init): Register execute_dwarf_cfa_vendor_op hook.
9343
c185f580
AH
93442017-04-26 Alan Hayward <alan.hayward@arm.com>
9345
9346 * xtensa-tdep.c (xtensa_pseudo_register_read): Use
9347 regcache_raw_read_unsigned.
9348 (xtensa_pseudo_register_write): Likewise.
9349
19c45594
AH
93502017-04-26 Alan Hayward <alan.hayward@arm.com>
9351
9352 * nds32-tdep.c (nds32_pseudo_register_read): Abort on errors.
9353 (nds32_pseudo_register_write): Likewise.
9354
4658f12e
YQ
93552017-04-25 Yao Qi <yao.qi@linaro.org>
9356
9357 * regcache.c (struct regcache) <readonly_p>: Change its type
9358 to bool.
9359 (regcache_xmalloc_1): Update parameter type and callers update.
9360
d581dda8
YQ
93612017-04-25 Yao Qi <yao.qi@linaro.org>
9362
9363 * aarch64-tdep.c (aarch64_gdbarch_init): Don't call
9364 set_gdbarch_wchar_bit.
9365 * arm-tdep.c (arm_gdbarch_init): Likewise.
9366
debed3db
PA
93672017-04-25 Pedro Alves <palves@redhat.com>
9368
9369 * common/poison.h [!HAVE_IS_TRIVIALLY_COPYABLE] (IsRelocatable)
9370 (BothAreRelocatable, memcopy, memmove): Don't define.
9371 * common/traits.h (__has_feature, HAVE_IS_TRIVIALLY_COPYABLE): New
9372 macros.
9373
b0b92aeb
PA
93742017-04-25 Pedro Alves <palves@redhat.com>
9375
9376 * common/common-defs.h: Include "common/poison.h".
9377 * common/function-view.h: (Not, Or, Requires): Move to traits.h
9378 and adjust.
9379 * common/poison.h: New file.
9380 * common/traits.h: Include <type_traits>.
9381 (Not, Or, Requires): New, moved from common/function-view.h.
9382
16c4d54a
PA
93832017-04-25 Pedro Alves <palves@redhat.com>
9384
9385 * breakpoint.h (struct breakpoint): In-class initialize all
9386 fields. Make boolean fields "bool".
9387 * breakpoint.c (init_raw_breakpoint_without_location): Remove
9388 memset call and initializations no longer necessary.
9389
b5c36682
PA
93902017-04-25 Pedro Alves <palves@redhat.com>
9391
9392 * btrace.c (pt_btrace_insn_flags): Change parameter type to
9393 reference.
9394 (pt_btrace_insn): New function.
9395 (ftrace_add_pt): Remove memset call and use pt_btrace_insn.
9396
5625a286
PA
93972017-04-25 Pedro Alves <palves@redhat.com>
9398
9399 * ada-lang.c (ada_catchpoint_location): Now a "class". Remove
9400 "base" field and inherit from "bp_location" instead. Add
9401 non-default ctor.
9402 (allocate_location_exception): Use new non-default ctor.
9403 * breakpoint.c (get_first_locp_gte_addr): Remove memset call.
9404 (init_bp_location): Convert to ...
9405 (bp_location::bp_location): ... this new ctor, and remove memset
9406 call.
9407 (base_breakpoint_allocate_location): Use the new non-default ctor.
9408 * breakpoint.h (bp_location): Now a class. Declare default and
9409 non-default ctors. In-class initialize all members.
9410 (init_bp_location): Remove declaration.
9411
23bcc18f
PA
94122017-04-25 Pedro Alves <palves@redhat.com>
9413
9414 * common/enum-flags.h (enum_flags): Don't implement copy ctor and
9415 assignment operator.
9416
e1ba3053
YQ
94172017-04-24 Yao Qi <yao.qi@linaro.org>
9418
9419 * doublest.c (convert_doublest_to_floatformat): Call
9420 floatformat_totalsize_bytes.
9421
10f489e5
TT
94222017-04-22 Tom Tromey <tom@tromey.com>
9423
9424 * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries): Use
9425 ui_out_emit_list.
9426 * stack.c (print_frame): Use ui_out_emit_list.
9427 * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Use
9428 ui_out_emit_list.
9429 * mi/mi-main.c (print_one_inferior)
9430 (mi_cmd_data_list_register_names)
9431 (mi_cmd_data_list_register_values, mi_cmd_list_features)
9432 (mi_cmd_list_target_features, mi_cmd_trace_frame_collected): Use
9433 ui_out_emit_list.
9434 * mi/mi-interp.c (mi_on_normal_stop_1): Use ui_out_emit_list.
9435 (mi_output_solib_attribs): Use ui_out_emit_list,
9436 ui_out_emit_tuple.
9437 * mi/mi-cmd-var.c (varobj_update_one): Use ui_out_emit_list.
9438 * mi/mi-cmd-stack.c (mi_cmd_stack_list_frames)
9439 (mi_cmd_stack_list_args, list_args_or_locals): Use
9440 ui_out_emit_list.
9441 * disasm.c (do_assembly_only): Use ui_out_emit_list.
9442 * breakpoint.c (print_solib_event, output_thread_groups): Use
9443 ui_out_emit_list.
9444
0092b74d
TT
94452017-04-22 Tom Tromey <tom@tromey.com>
9446
9447 * mi/mi-main.c (print_variable_or_computed): Use ui_out_emit_tuple.
9448 * mi/mi-cmd-var.c (varobj_update_one): Use ui_out_emit_tuple.
9449 * mi/mi-cmd-stack.c (list_arg_or_local): Use ui_out_emit_tuple.
9450
a14a62dd
TT
94512017-04-22 Tom Tromey <tom@tromey.com>
9452
9453 * tracepoint.c (tvariables_info_1)
9454 (print_one_static_tracepoint_marker): Use ui_out_emit_tuple.
9455
46b9c129
TT
94562017-04-22 Tom Tromey <tom@tromey.com>
9457
9458 * stack.c (print_frame_arg): Use ui_out_emit_tuple,
9459 annotate_arg_emitter.
9460 * breakpoint.c (print_mention_watchpoint)
9461 (print_mention_masked_watchpoint): Use ui_out_emit_tuple.
9462 * annotate.h (struct annotate_arg_emitter): New.
9463
2e783024
TT
94642017-04-22 Tom Tromey <tom@tromey.com>
9465
9466 * record-btrace.c (record_btrace_insn_history)
9467 (record_btrace_insn_history_range, record_btrace_call_history)
9468 (record_btrace_call_history_range): Use ui_out_emit_tuple.
9469 * thread.c (do_captured_list_thread_ids, print_thread_info_1): Use
9470 ui_out_emit_tuple.
9471 * stack.c (print_frame_info): Use ui_out_emit_tuple.
9472 * solib.c (info_sharedlibrary_command): Use ui_out_emit_tuple.
9473 * skip.c (skip_info): Use ui_out_emit_tuple.
9474 * remote.c (show_remote_cmd): Use ui_out_emit_tuple.
9475 * progspace.c (print_program_space): Use ui_out_emit_tuple.
9476 * probe.c (info_probes_for_ops): Use ui_out_emit_tuple.
9477 * osdata.c (info_osdata): Use ui_out_emit_tuple.
9478 * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Use
9479 ui_out_emit_tuple.
9480 * mi/mi-main.c (print_one_inferior, list_available_thread_groups)
9481 (output_register, mi_cmd_data_read_memory)
9482 (mi_cmd_data_read_memory_bytes, mi_load_progress)
9483 (mi_cmd_trace_frame_collected): Use ui_out_emit_tuple.
9484 * mi/mi-cmd-var.c (mi_cmd_var_list_children, varobj_update_one):
9485 Use ui_out_emit_tuple.
9486 * mi/mi-cmd-stack.c (mi_cmd_stack_list_args): Use
9487 ui_out_emit_tuple.
9488 * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions)
9489 (mi_cmd_info_gdb_mi_command): Use ui_out_emit_tuple.
9490 * linux-thread-db.c (info_auto_load_libthread_db): Use
9491 ui_out_emit_tuple.
9492 * inferior.c (print_inferior): Use ui_out_emit_tuple.
9493 * gdb_bfd.c (print_one_bfd): Use ui_out_emit_tuple.
9494 * disasm.c (do_mixed_source_and_assembly_deprecated)
9495 (do_mixed_source_and_assembly): Use ui_out_emit_tuple.
9496 * cp-abi.c (list_cp_abis): Use ui_out_emit_tuple.
9497 * cli/cli-setshow.c (cmd_show_list): Use ui_out_emit_tuple.
9498 * breakpoint.c (print_one_breakpoint_location)
9499 (print_one_breakpoint): Use ui_out_emit_tuple.
9500 * auto-load.c (print_script, info_auto_load_cmd): Use
9501 ui_out_emit_tuple.
9502 * ada-tasks.c (print_ada_task_info): Use ui_out_emit_tuple.
9503
9be21bb4
SM
95042017-04-21 Simon Marchi <simon.marchi@ericsson.com>
9505
9506 * thread.c (print_thread_info_1): Remove dead code.
9507
0d4c07af
JK
95082017-04-21 Jan Kratochvil <jan.kratochvil@redhat.com>
9509
9510 * aarch64-tdep.c (selftests::aarch64_process_record_test): Make it #if
9511 GDB_SELF_TEST.
9512 * arm-tdep.c (selftests::arm_record_test): Likewise.
9513
4daf993d
YQ
95142017-04-21 Yao Qi <yao.qi@linaro.org>
9515
9516 * regcache.c (regcache_restore): Remove argument 2. Replace
9517 argument 3 with regcache. Get register status from
9518 src->register_status and get register contents from
9519 register_buffer (src, regnum).
9520 (regcache_cpy): Update.
9521
a6c21d4a
PA
95222017-04-19 Pedro Alves <palves@redhat.com>
9523
9524 * gdbthread.h (thread): Add missing closing parenthesis in
9525 comment.
9526
3a3fd0fd
PA
95272017-04-19 Pedro Alves <palves@redhat.com>
9528
9529 * common/refcounted-object.h: New file.
9530 * gdbthread.h: Include "common/refcounted-object.h".
9531 (thread_info): Inherit from refcounted_object and add comments.
9532 (thread_info::incref, thread_info::decref)
9533 (thread_info::m_refcount): Delete.
9534 (thread_info::deletable): Use the refcounted_object::refcount()
9535 method.
9536 * inferior.c (current_inferior_): Add comment.
9537 (set_current_inferior): Increment/decrement refcounts.
9538 (prune_inferiors, remove_inferior_command): Skip inferiors marked
9539 not-deletable instead of comparing with the current inferior.
9540 (initialize_inferiors): Increment the initial inferior's refcount.
9541 * inferior.h (struct inferior): Forward declare.
9542 Include "common/refcounted-object.h".
9543 (current_inferior, set_current_inferior): Move declaration to
9544 before struct inferior's definition, and fix comment.
9545 (inferior): Inherit from refcounted_object. Add comments.
9546 * thread.c (switch_to_thread_no_regs): Reference the thread's
9547 inferior pointer directly instead of doing a ptid lookup.
9548 (switch_to_no_thread): New function.
9549 (switch_to_thread(thread_info *)): New function, factored out
9550 from ...
9551 (switch_to_thread(ptid_t)): ... this.
9552 (restore_current_thread): Delete.
9553 (current_thread_cleanup): Remove 'inf_id' and 'was_removable'
9554 fields, and add 'inf' field.
9555 (do_restore_current_thread_cleanup): Check whether old->inf is
9556 alive instead of looking up an inferior by ptid. Use
9557 switch_to_thread and switch_to_no_thread.
9558 (restore_current_thread_cleanup_dtor): Use old->inf directly
9559 instead of lookup up an inferior by id. Decref the inferior.
9560 Don't restore 'removable'.
9561 (make_cleanup_restore_current_thread): Same the inferior pointer
9562 in old, instead of the inferior number. Incref the inferior.
9563 Don't save/clear 'removable'.
9564
9bcb1f16
PA
95652017-04-19 Pedro Alves <palves@redhat.com>
9566
9567 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
9568 unittests/scoped_restore-selftests.c.
9569 (SUBDIR_UNITTESTS_OBS): Add scoped_restore-selftests.o.
9570 * common/scoped_restore.h (scoped_restore_base): Make "class".
9571 (scoped_restore_base::release): New public method.
9572 (scoped_restore_base::scoped_restore_base): New protected ctor.
9573 (scoped_restore_base::m_saved_var): New protected field.
9574 (scoped_restore_tmpl::scoped_restore_tmpl(T*)): Initialize the
9575 scoped_restore_base base class instead of m_saved_var directly.
9576 (scoped_restore_tmpl::scoped_restore_tmpl(T*, T2)): Likewise.
9577 (scoped_restore_tmpl::scoped_restore_tmpl(const
9578 scoped_restore_tmpl<T>&)): Likewise.
9579 (scoped_restore_tmpl::~scoped_restore_tmpl): Use the saved_var
9580 method.
9581 (scoped_restore_tmpl::saved_var): New method.
9582 (scoped_restore_tmpl::m_saved_var): Delete.
9583 * inferior.h (inferior::detaching): Now a bool.
9584 * infrun.c (prepare_for_detach): Use a scoped_restore instead of a
9585 cleanup.
9586 * unittests/scoped_restore-selftests.c: New file.
9587
26fcd539
PA
95882017-04-19 Pedro Alves <palves@redhat.com>
9589
9590 * Makefile.in (SUBDIR_UNITTESTS_SRCS, SUBDIR_UNITTESTS_OBS):
9591 Re-sort in alphabetic order.
9592
fdd243b0
PA
95932017-04-18 Pedro Alves <palves@redhat.com>
9594
9595 * xml-support.c (obstack_xml_printf): Delete.
9596 * xml-support.h (obstack_xml_printf): Delete.
9597
4895cde2
PA
95982017-04-18 Pedro Alves <palves@redhat.com>
9599
9600 * xml-support.c (gdb_xml_parser) <use_dtd, dtd_name, parse,
9601 vdebug, verror, body_text, start_element, end_element, name,
9602 user_data, set_is_xinclude, set_error, expat_parser>: New methods.
9603 <name, user_data, expat_parser, scopes, error, last_line, dtd_name,
9604 is_xinclude>: Make private and add m_ prefix.
9605 (gdb_xml_parser::body_text): New method, based on ...
9606 (gdb_xml_body_text): ... this. Adjust.
9607 (gdb_xml_parser::vdebug): New method, based on ...
9608 (gdb_xml_debug): ... this. Adjust.
9609 (gdb_xml_parser::verror): New method, based on ...
9610 (gdb_xml_error): ... this. Adjust.
9611 (gdb_xml_parser::start_element): New method, based on ...
9612 (gdb_xml_start_element): ... this. Adjust.
9613 (gdb_xml_start_element_wrapper): Defer to
9614 gdb_xml_parser::start_element and gdb_xml_parser::set_error.
9615 (gdb_xml_parser::end_element): New method, based on ...
9616 (gdb_xml_end_element_wrapper): ... this. Adjust.
9617 (gdb_xml_parser::~gdb_xml_parser): Adjust.
9618 (gdb_xml_parser::gdb_xml_parser): Adjust to field renames.
9619 (gdb_xml_parser::use_dtd): New method, based on ...
9620 (gdb_xml_use_dtd): ... this. Adjust.
9621 (gdb_xml_parser::parse): New method, based on ...
9622 (gdb_xml_parse): ... this. Adjust.
9623 (gdb_xml_parse_quick): Adjust to call the parser's parse method.
9624 (xinclude_start_include): Adjust to call the parser's name method.
9625 (xml_xinclude_default, xml_xinclude_start_doctype)
9626 (xml_xinclude_end_doctype): Adjust to call the parser's user_data
9627 method.
9628 (xml_process_xincludes): Adjust to call parser methods.
9629 * xml-support.h (gdb_xml_use_dtd, gdb_xml_parse): Delete
9630 declarations.
9631
bd8a901f
PA
96322017-04-18 Pedro Alves <palves@redhat.com>
9633
9634 * tracefile-tfile.c (tfile_write_tdesc): Adjust to use
9635 gdb::optional<std::string>.
9636 * xml-support.c: Include <string>.
9637 (scope_level::scope_level(scope_level &&))
9638 (scope_level::~scope_level): Delete.
9639 (scope_level::body): Now a std::string.
9640 (gdb_xml_body_text, gdb_xml_end_element): Adjust.
9641 (xinclude_parsing_data::xinclude_parsing_data): Add 'output'
9642 parameter.
9643 (xinclude_parsing_data::~xinclude_parsing_data): Delete.
9644 (xinclude_parsing_data::output): Now a std::string reference.
9645 (xinclude_start_include): Adjust.
9646 (xml_xinclude_default): Adjust.
9647 (xml_process_xincludes): Add 'output' parameter, and return bool.
9648 * xml-support.h (xml_process_xincludes): Add 'output' parameter,
9649 and return bool.
9650 * xml-tdesc.c: Include <unordered_map> and <string>.
9651 (tdesc_xml_cache): Delete.
9652 (tdesc_xml_cache_s): Delete.
9653 (xml_cache): Now an std::unordered_map.
9654 (tdesc_parse_xml): Adjust to use std::string and unordered_map.
9655 (target_fetch_description_xml): Change return type to
9656 gdb::optional<std::string>, and adjust.
9657 * xml-tdesc.h: Include "common/gdb_optional.h" and <string>.
9658 (target_fetch_description_xml): Change return type to
9659 gdb::optional<std::string>.
9660
d35d1958
PA
96612017-04-18 Pedro Alves <palves@redhat.com>
9662
9663 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
9664 unittests/optional-selftests.c.
9665 (SUBDIR_UNITTESTS_OBS): Add optional-selftests.o.
9666 * unittests/optional-selftests.c: New file.
9667 * unittests/optional/assignment/1.cc: New file.
9668 * unittests/optional/assignment/2.cc: New file.
9669 * unittests/optional/assignment/3.cc: New file.
9670 * unittests/optional/assignment/4.cc: New file.
9671 * unittests/optional/assignment/5.cc: New file.
9672 * unittests/optional/assignment/6.cc: New file.
9673 * unittests/optional/assignment/7.cc: New file.
9674 * unittests/optional/cons/copy.cc: New file.
9675 * unittests/optional/cons/default.cc: New file.
9676 * unittests/optional/cons/move.cc: New file.
9677 * unittests/optional/cons/value.cc: New file.
9678 * unittests/optional/in_place.cc: New file.
9679 * unittests/optional/observers/1.cc: New file.
9680 * unittests/optional/observers/2.cc: New file.
9681
22796e97
PA
96822017-04-18 Pedro Alves <palves@redhat.com>
9683
9684 * common/gdb_optional.h: Include common/traits.h.
9685 (in_place_t): New type.
9686 (in_place): New constexpr variable.
9687 (optional::optional): Remove member initialization of
9688 m_instantiated.
9689 (optional::optional(in_place_t...)): New constructor.
9690 (optional::~optional): Use reset.
9691 (optional::optional(const optional&)): New.
9692 (optional::optional(const optional&&)): New.
9693 (optional::optional(T &)): New.
9694 (optional::optional(T &&)): New.
9695 (operator::operator=(const optional &)): New.
9696 (operator::operator=(optional &&)): New.
9697 (operator::operator= (const T &))
9698 (operator::operator= (T &&))
9699 (operator::emplace (Args &&... args)): Return a T&. Use reset.
9700 (operator::reset): New.
9701 (operator::m_instantiated):: Add in-class initializer.
9702 * common/traits.h: Include <type_traits>.
9703 (struct And): New types.
9704
a7fc9b61
PA
97052017-04-18 Pedro Alves <palves@redhat.com>
9706
9707 * xml-support.c: Include <vector>.
9708 (scope_level::scope_level(const gdb_xml_element *))
9709 (scope_level::scope_level(scope_level&&)): New.
9710 (scope_level::~scope_level): New.
9711 (scope_level_s): Delete.
9712 (gdb_xml_parser::scopes): Now a std::vector.
9713 (gdb_xml_body_text, gdb_xml_start_element, gdb_xml_end_element):
9714 Use std::vector.
9715 (gdb_xml_parser::~gdb_xml_parser): Remove now unnecessary
9716 scope cleanup code.
9717 (gdb_xml_parser::gdb_xml_parser): Remove explicit initialization
9718 of the scopes member. Use std::vector::emplace_back.
9719
010151c9
PA
97202017-04-18 Pedro Alves <palves@redhat.com>
9721
9722 * xml-support.c (gdb_xml_parser): Add ctor/dtor. Make is_xinclude
9723 a bool.
9724 (gdb_xml_end_element): Change type of first parameter.
9725 (gdb_xml_cleanup): Rename to ...
9726 (gdb_xml_parser::~gdb_xml_parser): ... this.
9727 (gdb_xml_create_parser_and_cleanup): Delete with ...
9728 (gdb_xml_parser::gdb_xml_parser): ... creation parts factored out
9729 to this new ctor.
9730 (gdb_xml_parse_quick): Create a local gdb_xml_parser instead of
9731 using gdb_xml_create_parser_and_cleanup.
9732 (xinclude_parsing_data): Add ctor/dtor.
9733 (xml_xinclude_cleanup): Delete.
9734 (xml_process_xincludes): Create a local xinclude_parsing_data
9735 instead of heap-allocating one. Create a local gdb_xml_parser
9736 instead of heap-allocating one with
9737 gdb_xml_create_parser_and_cleanup.
9738
d56060f0
JB
97392017-04-18 John Baldwin <jhb@FreeBSD.org>
9740
9741 PR threads/20743
9742 * fbsd-nat.c (resume_one_thread_cb): Remove.
9743 (resume_all_threads_cb): Remove.
9744 (fbsd_resume): Use ALL_NON_EXITED_THREADS instead of
9745 iterate_over_threads.
9746
305d16a9
JB
97472017-04-17 Joel Brobecker <brobecker@adacore.com>
9748
9749 * NEWS: Create a new section for the next release branch.
9750 Rename the section of the current branch, now that it has
9751 been cut.
9752
8bb57231
JB
97532017-04-17 Joel Brobecker <brobecker@adacore.com>
9754
9755 GDB 8.0 branch created (725bf5cf125783c2a7ca4ab63d3768e220bab2db):
9756 * version.in: Bump version to 8.0.50.DATE-git.
9757
096c92dd
SDJ
97582017-04-13 Sergio Durigan Junior <sergiodj@redhat.com>
9759
9760 PR gdb/21385
9761 * windows-nat.c (windows_create_inferior): Declare 'allargs'
9762 independently of the host, and fix build breakage on Cygwin.
9763
0550c955
PA
97642017-04-13 Pedro Alves <palves@redhat.com>
9765
9766 * inferior.c (free_inferior): Convert to ...
9767 (inferior::~inferior): ... this dtor.
9768 (inferior::inferior): New ctor, factored out from ...
9769 (add_inferior_silent): ... here. Allocate the inferior with a new
9770 expression.
9771 (delete_inferior): Call delete instead of free_inferior.
9772 * inferior.h (gdb_environ, continuation): Forward declare.
9773 (inferior): Now a class. Add in-class initialization to all
9774 members. Make boolean fields bool, except 'detaching'.
9775 (inferior::inferior): New explicit ctor.
9776 (inferior::~inferior): New.
9777
e3d60dfc
PA
97782017-04-13 Pedro Alves <palves@redhat.com>
9779
9780 * inferior.c (init_inferior_list): Delete.
9781 * inferior.h (init_inferior_list): Delete.
9782
5fd69d0a
PA
97832017-04-13 Pedro Alves <palves@redhat.com>
9784
9785 PR threads/13217
9786 * gdb.threads/threadapply.exp (thr_apply_detach): New procedure.
9787 (top level): Call it twice, with different thread sets.
9788
c6609450
PA
97892017-04-13 Pedro Alves <palves@redhat.com>
9790
9791 * thread.c: Include <algorithm>.
9792 (thread_array_cleanup): Delete.
9793 (scoped_inc_dec_ref): New class.
9794 (live_threads_count): New function.
9795 (set_thread_refcount): Delete.
9796 (tp_array_compar_ascending): Now a bool.
9797 (tp_array_compar): Convert to a std::sort comparison function.
9798 (thread_apply_all_command): Use std::vector and scoped_inc_dec_ref
9799 and live_threads_count.
9800
2a00d7ce
PA
98012017-04-13 Pedro Alves <palves@redhat.com>
9802
9803 * infrun.c (follow_fork_inferior): Also switch the current
9804 inferior.
9805
441d7c93
PA
98062017-04-13 Pedro Alves <palves@redhat.com>
9807
9808 * breakpoint.c (watch_command_1): Save watchpoint-frame info
9809 before calling create_internal_breakpoint.
9810
808480f6
PA
98112017-04-13 Pedro Alves <palves@redhat.com>
9812
9813 * fork-child.c (execv_argv): New class.
9814 (breakup_args): Refactored as ...
9815 (execv_argv::init_for_no_shell): .. this method of execv_argv.
9816 Copy arguments to storage and replace separators with NULL
9817 terminators in place.
9818 (escape_bang_in_quoted_argument): Adjust to return bool.
9819 (execv_argv::execv_argv): New ctor.
9820 (execv_argv::init_for_shell): New method, factored out from
9821 fork_inferior. Don't strdup strings into the vector.
9822 (fork_inferior): Eliminate "shell" local and use execv_argv. Use
9823 Remove free_vector_argv call.
9824
ad3d022a
YQ
98252017-04-13 Yao Qi <yao.qi@linaro.org>
9826
9827 * rx-tdep.c (rx_fpsw_type): Check tdep->rx_fpsw_type instead of
9828 tdep->rx_psw_type.
9829
e6ddc3bf
YQ
98302017-04-13 Yao Qi <yao.qi@linaro.org>
9831
9832 * rl78-tdep.c (rl78_gdbarch_init): Use XCNEW instead of XNEW.
9833 * rx-tdep.c (rx_gdbarch_init): Likewise.
9834
bfb8cf90
PA
98352017-04-13 Pedro Alves <palves@redhat.com>
9836
9837 * breakpoint.h (struct breakpoint): Reindent.
9838
f5336ca5
PA
98392017-04-13 Pedro Alves <palves@redhat.com>
9840
9841 * breakpoint.c (bp_location): Rename to ...
9842 (bp_locations): ... this. All references updated.
9843 (bp_location_count): Rename to ...
9844 (bp_locations_count): ... this. All references updated.
9845 (bp_location_placed_address_before_address_max): Rename to ...
9846 (bp_locations_placed_address_before_address_max): ... this. All
9847 references updated.
9848 (bp_location_shadow_len_after_address_max): Rename to ...
9849 (bp_locations_shadow_len_after_address_max): ... this. All
9850 references updated.
9851 (bp_location_compare_addrs): Rename to ...
9852 (bp_locations_compare_addrs): ... this. All references updated.
9853 (bp_location_compare):Rename to ...
9854 (bp_locations_compare): ... this. All references updated.
9855 (bp_location_target_extensions_update): Rename to ...
9856 (bp_locations_target_extensions_update): ... this. All references
9857 updated.
9858
be628ab8
SDJ
98592017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
9860
9861 * Makefile.in (HFILES_NO_SRCDIR): Add "common/gdb_termios.h".
9862 * common/common.m4: Check headers 'termios.h', 'termio.h' and
9863 'sgtty.h'.
9864 * common/gdb_termios.h: New file, with parts of "terminal.h".
9865 * inflow.c: Include "gdb_termios.h".
9866 * ser-unix.c: Include "gdb_termios.h".
9867 * terminal.h: Move terminal-related defines to
9868 "common/gdb_termios.h".
9869
8e9e35b1
TT
98702017-04-12 Tom Tromey <tom@tromey.com>
9871
9872 * probe.c (parse_probes): Update.
9873 * location.h (delete_event_location): Don't declare.
9874 (event_location_deleter::operator()): Update.
9875 * location.c (event_location_deleter::operator()): Rename from
9876 delete_event_location.
9877 * linespec.h (linespec_result) <location>: Change type to
9878 event_location_up.
9879 * linespec.c (canonicalize_linespec, event_location_to_sals)
9880 (decode_objc): Update.
9881 (linespec_result): Don't call delete_event_location.
9882 * breakpoint.c (create_breakpoints_sal)
9883 (bkpt_probe_create_sals_from_location)
9884 (strace_marker_create_sals_from_location): Update.
9885
16e802b9
TT
98862017-04-12 Tom Tromey <tom@tromey.com>
9887
9888 * linespec.h (struct linespec_result): Add constructor and
9889 destructor.
9890 (init_linespec_result, destroy_linespec_result)
9891 (make_cleanup_destroy_linespec_result): Don't declare.
9892 * linespec.c (init_linespec_result): Remove.
9893 (linespec_result::~linespec_result): Rename from
9894 destroy_linespec_result. Update.
9895 (cleanup_linespec_result, make_cleanup_destroy_linespec_result):
9896 Remove.
9897 * breakpoint.c (create_breakpoint, break_range_command)
9898 (decode_location_default): Update.
9899 * ax-gdb.c (agent_command_1): Update.
9900
d28cd78a
TT
99012017-04-12 Tom Tromey <tom@tromey.com>
9902
9903 * remote.c (remote_download_tracepoint): Update.
9904 * python/py-breakpoint.c (bppy_get_location): Update.
9905 * guile/scm-breakpoint.c (bpscm_print_breakpoint_smob)
9906 (gdbscm_breakpoint_location): Update.
9907 * elfread.c (elf_gnu_ifunc_resolver_return_stop): Update.
9908 * breakpoint.h (struct breakpoint) <location, location_range_end>:
9909 Change type to event_location_up.
9910 * breakpoint.c (create_overlay_event_breakpoint)
9911 (create_longjmp_master_breakpoint)
9912 (create_std_terminate_master_breakpoint)
9913 (create_exception_master_breakpoint)
9914 (breakpoint_event_location_empty_p, print_breakpoint_location)
9915 (print_one_breakpoint_location, create_thread_event_breakpoint)
9916 (init_breakpoint_sal, create_breakpoint)
9917 (print_recreate_ranged_breakpoint, break_range_command)
9918 (init_ada_exception_breakpoint, say_where): Update.
9919 (base_breakpoint_dtor): Don't call delete_event_location.
9920 (bkpt_print_recreate, tracepoint_print_recreate)
9921 (dprintf_print_recreate, update_static_tracepoint)
9922 (breakpoint_re_set_default): Update.
9923
711799d5
TT
99242017-04-12 Tom Tromey <tom@tromey.com>
9925
9926 * compile/compile-loc2c.c (compute_stack_depth_worker): Change
9927 type of "to_do". Update.
9928 (compute_stack_depth): Use std::vector.
9929
52d214d3
TT
99302017-04-12 Tom Tromey <tom@tromey.com>
9931
9932 * printcmd.c (find_instruction_backward): Use std::vector.
9933
4c404b8b
TT
99342017-04-12 Tom Tromey <tom@tromey.com>
9935
9936 * symfile.c (objfilep): Remove typedef.
9937 (reread_symbols): Use a std::vector.
9938
156d9eab
TT
99392017-04-12 Tom Tromey <tom@tromey.com>
9940
9941 * mi/mi-main.c (exec_direction_forward): Remove.
9942 (exec_reverse_continue, mi_execute_command): Use scoped_restore.
9943 * guile/scm-ports.c (ioscm_with_output_to_port_worker): Use
9944 scoped_restore.
9945 * guile/guile.c (guile_repl_command, guile_command)
9946 (gdbscm_execute_gdb_command): Use scoped_restore.
9947 * go-exp.y (go_parse): Use scoped_restore.
9948 * d-exp.y (d_parse): Use scoped_restore.
9949 * cli/cli-decode.c (cmd_func): Use scoped_restore.
9950 * c-exp.y (c_parse): Use scoped_restore.
9951
4d89769a
TT
99522017-04-12 Tom Tromey <tom@tromey.com>
9953
9954 * mi/mi-parse.h (struct mi_parse): Add constructor, destructor.
9955 (mi_parse): Update return type.
9956 (mi_parse_free): Remove.
9957 * mi/mi-parse.c (mi_parse::mi_parse): New constructor.
9958 (mi_parse::~mi_parse): Rename from mi_parse_free.
9959 (mi_parse_cleanup): Remove.
9960 (mi_parse): Return a unique_ptr. Use new.
9961 * mi/mi-main.c (mi_execute_command): Update.
9962
4b217cc7
TT
99632017-04-12 Tom Tromey <tom@tromey.com>
9964
9965 * location.c (explicit_location_lex_one): Return a
9966 unique_xmalloc_ptr.
9967 (string_to_explicit_location): Update. Remove cleanups.
9968
59d3651b
TT
99692017-04-12 Tom Tromey <tom@tromey.com>
9970
9971 * gnu-v3-abi.c (value_and_voffset_p): Remove typedef.
9972 (compare_value_and_voffset): Change type. Update.
9973 (compute_vtable_size): Change type of "offset_vec".
9974 (gnuv3_print_vtable): Use std::vector. Remove cleanups.
9975 (gnuv3_get_typeid): Remove extraneous declaration.
9976
b24b0d6c
TT
99772017-04-12 Tom Tromey <tom@tromey.com>
9978
9979 * charset.h (wchar_iterator): Fix comment.
9980
80a3b8c5
TT
99812017-04-12 Tom Tromey <tom@tromey.com>
9982
9983 * charset.c (iconv_wrapper): New class.
9984 (cleanup_iconv): Remove.
9985 (convert_between_encodings): Use it.
9986
c83dd867
TT
99872017-04-12 Tom Tromey <tom@tromey.com>
9988
9989 * symfile.h (increment_reading_symtab): Update type.
9990 * symfile.c (decrement_reading_symtab): Remove.
9991 (increment_reading_symtab): Return a scoped_restore_tmpl<int>.
9992 * psymtab.c (psymtab_to_symtab): Update.
9993 * dwarf2read.c (dw2_instantiate_symtab): Update.
9994
0e8621a0
TT
99952017-04-12 Tom Tromey <tom@tromey.com>
9996
9997 * jit.c (struct jit_reader): Declare separately. Add constructor
9998 and destructor. Change type of "handle".
9999 (loaded_jit_reader): Define separately.
10000 (jit_reader_load): Update. New "new".
10001 (jit_reader_unload_command): Use "delete".
10002 * gdb-dlfcn.h (struct dlclose_deleter): New.
10003 (gdb_dlhandle_up): New typedef.
10004 (gdb_dlopen, gdb_dlsym): Update types.
10005 (gdb_dlclose): Remove.
10006 * gdb-dlfcn.c (gdb_dlopen): Return a gdb_dlhandle_up.
10007 (gdb_dlsym): Change type of "handle".
10008 (make_cleanup_dlclose): Remove.
10009 (dlclose_deleter::operator()): Rename from gdb_dlclose.
10010 * compile/compile-c-support.c (load_libcc): Update.
10011
67d89901
TT
100122017-04-12 Tom Tromey <tom@tromey.com>
10013
10014 * symtab.h (find_pcs_for_symtab_line): Change return type.
10015 * symtab.c (find_pcs_for_symtab_line): Change return type.
10016 * python/py-linetable.c (build_line_table_tuple_from_pcs): Change
10017 type of "vec". Update.
10018 (ltpy_get_pcs_for_line): Update.
10019 * linespec.c (decode_digits_ordinary): Update.
10020
93921405
TT
100212017-04-12 Tom Tromey <tom@tromey.com>
10022
10023 * tracepoint.c (actions_command): Update.
10024 * python/python.c (python_command, python_interactive_command):
10025 Update.
10026 * mi/mi-cmd-break.c (mi_cmd_break_commands): Update.
10027 * guile/guile.c (guile_command): Update.
10028 * defs.h (read_command_lines, read_command_lines_1): Return
10029 command_line_up.
10030 (command_lines_deleter): New struct.
10031 (command_line_up): New typedef.
10032 * compile/compile.c (compile_code_command)
10033 (compile_print_command): Update.
10034 * cli/cli-script.h (get_command_line, copy_command_lines): Return
10035 command_line_up.
10036 (make_cleanup_free_command_lines): Remove.
10037 * cli/cli-script.c (get_command_line, read_command_lines_1)
10038 (copy_command_lines): Return command_line_up.
10039 (while_command, if_command, read_command_lines, define_command)
10040 (document_command): Update.
10041 (do_free_command_lines_cleanup, make_cleanup_free_command_lines):
10042 Remove.
10043 * breakpoint.h (breakpoint_set_commands): Change type of
10044 "commands".
10045 * breakpoint.c (breakpoint_set_commands): Change type of
10046 "commands". Update.
10047 (do_map_commands_command, update_dprintf_command_list)
10048 (create_tracepoint_from_upload): Update.
10049
ffc2605c
TT
100502017-04-12 Tom Tromey <tom@tromey.com>
10051
10052 * tracepoint.c (scope_info): Update.
10053 * spu-tdep.c (spu_catch_start): Update.
10054 * python/python.c (gdbpy_decode_line): Update.
10055 * python/py-finishbreakpoint.c (bpfinishpy_init): Update.
10056 * python/py-breakpoint.c (bppy_init): Update.
10057 * probe.c (parse_probes): Update.
10058 * mi/mi-cmd-break.c (mi_cmd_break_insert_1): Update.
10059 * location.h (event_location_deleter): New struct.
10060 (event_location_up): New typedef.
10061 (new_linespec_location, new_address_location, new_probe_location)
10062 (new_explicit_location, copy_event_location)
10063 (string_to_event_location, string_to_event_location_basic)
10064 (string_to_explicit_location): Update return type.
10065 (make_cleanup_delete_event_location): Remove.
10066 * location.c (new_linespec_location, new_address_location)
10067 (new_probe_location, new_explicit_location, copy_event_location):
10068 Return event_location_up.
10069 (delete_event_location_cleanup)
10070 (make_cleanup_delete_event_location): Remove.
10071 (string_to_explicit_location, string_to_event_location_basic)
10072 (string_to_event_location): Return event_location_up.
10073 * linespec.c (canonicalize_linespec, event_location_to_sals)
10074 (decode_line_with_current_source)
10075 (decode_line_with_last_displayed, decode_objc): Update.
10076 * guile/scm-breakpoint.c (gdbscm_register_breakpoint_x): Update.
10077 * completer.c (location_completer): Update.
10078 * cli/cli-cmds.c (edit_command, list_command): Update.
10079 * breakpoint.c (create_overlay_event_breakpoint)
10080 (create_longjmp_master_breakpoint)
10081 (create_std_terminate_master_breakpoint)
10082 (create_exception_master_breakpoint)
10083 (create_thread_event_breakpoint): Update.
10084 (init_breakpoint_sal): Update. Remove some dead code.
10085 (create_breakpoint_sal): Change type of "location". Update.
10086 (create_breakpoints_sal, create_breakpoint, break_command_1)
10087 (dprintf_command, break_range_command, until_break_command)
10088 (init_ada_exception_breakpoint)
10089 (strace_marker_create_sals_from_location)
10090 (update_static_tracepoint, trace_command, ftrace_command)
10091 (strace_command, create_tracepoint_from_upload): Update.
10092 * break-catch-throw.c (re_set_exception_catchpoint): Update.
10093 * ax-gdb.c (agent_command_1): Update.
10094
8f10c932
PA
100952017-04-12 Pedro Alves <palves@redhat.com>
10096
10097 * Makefile.in (ALL_TARGET_OBS): Add i386-go32-tdep.o.
10098 * configure.tgt: Handle i[34567]86-*-go32* and
10099 i[34567]86-*-msdosdjgpp*.
10100 * i386-tdep.c (i386_svr4_reg_to_regnum):
10101 Make extern.
10102 (i386_go32_init_abi, i386_coff_osabi_sniffer): Moved to
10103 i386-go32-tdep.c.
10104 (_initialize_i386_tdep): DJGPP bits moved to i386-go32-tdep.c.
10105 * i386-go32-tdep.c: New file.
10106 * i386-tdep.h (tdesc_i386_mmx, i386_svr4_reg_to_regnum): New
10107 declarations.
10108
0a31ccfb
SM
101092017-04-12 Simon Marchi <simon.marchi@ericsson.com>
10110
10111 * aix-thread.c (pd_status2str): Change return type to const char *.
10112
e9bb3fbb
PA
101132017-04-12 Pedro Alves <palves@redhat.com>
10114
10115 * i386-tdep.c (i386_elf_init_abi, i386_go32_init_abi): Remove
10116 calls to set_gdbarch_gnu_triplet_regexp.
10117
53375380
PA
101182017-04-12 Pedro Alves <palves@redhat.com>
10119
10120 PR gdb/21323
10121 * c-lang.c (cplus_primitive_types) <cplus_primitive_type_wchar_t>:
10122 New enum value.
10123 (cplus_language_arch_info): Register cplus_primitive_type_wchar_t.
10124 * gdbtypes.h (struct builtin_type) <builtin_wchar>: New field.
10125 * gdbtypes.c (gdbtypes_post_init): Create the "wchar_t" type.
10126 * gdbarch.sh (wchar_bit, wchar_signed): New per-arch values.
10127 * gdbarch.h, gdbarch.c: Regenerate.
10128 * aarch64-tdep.c (aarch64_gdbarch_init): Override
10129 gdbarch_wchar_bit and gdbarch_wchar_signed.
10130 * alpha-tdep.c (alpha_gdbarch_init): Likewise.
10131 * arm-tdep.c (arm_gdbarch_init): Likewise.
10132 * avr-tdep.c (avr_gdbarch_init): Likewise.
10133 * h8300-tdep.c (h8300_gdbarch_init): Likewise.
10134 * i386-nto-tdep.c (i386nto_init_abi): Likewise.
10135 * i386-tdep.c (i386_go32_init_abi): Likewise.
10136 * m32r-tdep.c (m32r_gdbarch_init): Likewise.
10137 * moxie-tdep.c (moxie_gdbarch_init): Likewise.
10138 * nds32-tdep.c (nds32_gdbarch_init): Likewise.
10139 * rs6000-aix-tdep.c (rs6000_aix_init_osabi): Likewise.
10140 * sh-tdep.c (sh_gdbarch_init): Likewise.
10141 * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
10142 * sparc64-tdep.c (sparc64_init_abi): Likewise.
10143 * windows-tdep.c (windows_init_abi): Likewise.
10144 * xstormy16-tdep.c (xstormy16_gdbarch_init): Likewise.
10145
53e710ac
PA
101462017-04-12 Pedro Alves <palves@redhat.com>
10147
10148 PR c++/21323
10149 * c-lang.c (cplus_primitive_types) <cplus_primitive_type_char16_t,
10150 cplus_primitive_type_char32_t>: New enum values.
10151 (cplus_language_arch_info): Register cplus_primitive_type_char16_t
10152 and cplus_primitive_type_char32_t.
10153 * dwarf2read.c (read_base_type) <DW_ATE_UTF>: If bit size is 16 or
10154 32, use the archtecture's built-in type for char16_t and char32_t,
10155 respectively. Otherwise, fallback to init_integer_type as before,
10156 but make the type unsigned, and issue a complaint.
10157 * gdbtypes.c (gdbtypes_post_init): Make char16_t and char32_t unsigned.
10158
ab0538b8
AH
101592017-04-12 Alan Hayward <alan.hayward@arm.com>
10160
5e0e0422 10161 * m32r-tdep.c (M32R_ARG_REGISTER_SIZE): Added.
ab0538b8
AH
10162 (m32r_push_dummy_call): Use M32R_ARG_REGISTER_SIZE.
10163
5430098f
SDJ
101642017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
10165
10166 * windows-nat.c (windows_create_inferior): Declare 'toexec' as
10167 'const char *'.
10168
7c5ded6a
SDJ
101692017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
10170
10171 * common/common-utils.c (free_vector_argv): New function.
10172 * common/common-utils.h: Include <vector>.
10173 (free_vector_argv): New prototype.
10174 * darwin-nat.c (darwin_create_inferior): Rewrite function
10175 prototype in order to constify "exec_file" and accept a
10176 "std::string" for "allargs".
10177 * fork-child.c: Include <vector>.
10178 (breakup_args): Rewrite function, using C++.
10179 (fork_inferior): Rewrite function header, constify "exec_file_arg"
10180 and accept "std::string" for "allargs". Update the code to
10181 calculate "argv" based on "allargs". Update calls to "exec_fun"
10182 and "execvp".
10183 * gnu-nat.c (gnu_create_inferior): Rewrite function prototype in
10184 order to constify "exec_file" and accept a "std::string" for
10185 "allargs".
10186 * go32-nat.c (go32_create_inferior): Likewise.
10187 * inf-ptrace.c (inf_ptrace_create_inferior): Likewise.
10188 * infcmd.c (run_command_1): Constify "exec_file". Use
10189 "std::string" for inferior arguments.
10190 * inferior.h (fork_inferior): Update prototype.
10191 * linux-nat.c (linux_nat_create_inferior): Rewrite function
10192 prototype in order to constify "exec_file" and accept a
10193 "std::string" for "allargs".
10194 * nto-procfs.c (procfs_create_inferior): Likewise.
10195 * procfs.c (procfs_create_inferior): Likewise.
10196 * remote-sim.c (gdbsim_create_inferior): Likewise.
10197 * remote.c (extended_remote_run): Update code to accept
10198 "std::string" as argument.
10199 (extended_remote_create_inferior): Rewrite function prototype in
10200 order to constify "exec_file" and accept a "std::string" for
10201 "allargs".
10202 * rs6000-nat.c (super_create_inferior): Likewise.
10203 (rs6000_create_inferior): Likewise.
10204 * target.h (struct target_ops) <to_create_inferior>: Likewise.
10205 * windows-nat.c (windows_create_inferior): Likewise.
10206
ae0eee42
PA
102072017-04-11 Pedro Alves <palves@redhat.com>
10208
10209 * thread.c: Fix whitespace throughout.
10210
a6acac06
PR
102112017-04-11 Philipp Rudo <prudo@linux.vnet.ibm.com>
10212
10213 * linux-nat.c (linux_nat_detach): Remove delete_lwp call.
10214
64403bd1
AH
102152017-04-11 Alan Hayward <alan.hayward@arm.com>
10216
10217 * arm-tdep.c (arm_store_return_value): Use FP_REGISTER_SIZE
10218
a5bef50f
SDJ
102192017-04-10 Sergio Durigan Junior <sergiodj@redhat.com>
10220
10221 PR gdb/21364
10222 * osdata.c (info_osdata): Check if 'type' is an empty string
10223 instead of NULL.
10224
9295a5a9
PA
102252017-04-10 Pedro Alves <palves@redhat.com>
10226
10227 * thread.c (add_thread_silent, delete_thread_1, find_thread_ptid)
10228 (ptid_to_global_thread_id, in_thread_list)
10229 (do_captured_list_thread_ids, set_resumed, set_running)
10230 (set_executing, set_stop_requested, finish_thread_state)
10231 (validate_registers_access, can_access_registers_ptid)
10232 (print_thread_info_1, switch_to_thread)
10233 (do_restore_current_thread_cleanup)
10234 (make_cleanup_restore_current_thread, thread_command)
10235 (thread_name_command): Use operator== instead of ptid_equal.
10236
996812e3
PA
102372017-04-10 Pedro Alves <palves@redhat.com>
10238
10239 * thread.c (struct current_thread_cleanup) <next>: Delete field.
10240 (current_thread_cleanup_chain): Delete.
10241 (restore_current_thread_cleanup_dtor)
10242 (make_cleanup_restore_current_thread): Remove references to
10243 current_thread_cleanup_chain.
10244
845b344f
AH
102452017-04-10 Alan Hayward <alan.hayward@arm.com>
10246
10247 * msp430-tdep.c (msp430_pseudo_register_read): Never return
10248 REG_UNKNOWN.
10249
803bdfe4
YQ
102502017-04-10 Yao Qi <yao.qi@linaro.org>
10251
10252 PR gdb/19942
10253 * gdbthread.h (thread_info::deletable): New method.
10254 (thread_info::incref): New method.
10255 (thread_info::decref): New method.
10256 (thread_info::refcount): Move it to private.
10257 * infrun.c (save_stop_context): Call inc_refcount.
10258 (release_stop_context_cleanup): Likewise.
10259 * thread.c (set_thread_exited): New function.
10260 (init_thread_list): Delete "tp" only it is deletable, otherwise
10261 call set_thread_exited.
10262 (delete_thread_1): Call set_thread_exited.
10263 (current_thread_cleanup) <inferior_pid>: Remove.
10264 <thread>: New field.
10265 (restore_current_thread_ptid_changed): Removed.
10266 (do_restore_current_thread_cleanup): Adjust.
10267 (restore_current_thread_cleanup_dtor): Don't call
10268 find_thread_ptid.
10269 (set_thread_refcount): Use dec_refcount.
10270 (make_cleanup_restore_current_thread): Adjust.
10271 (thread_apply_all_command): Call inc_refcount.
10272 (_initialize_thread): Don't call
10273 observer_attach_thread_ptid_changed.
10274
8c25b497
YQ
102752017-04-10 Yao Qi <yao.qi@linaro.org>
10276
10277 * thread.c (delete_thread_1): Hoist code on marking thread as
10278 exited.
10279
8473b447
SM
102802017-04-09 Simon Marchi <simon.marchi@polymtl.ca>
10281
10282 * windows-nat.c (windows_detach): Initialize ptid with
10283 minus_one_ptid.
10284
6670ec13
SM
102852017-04-07 Simon Marchi <simon.marchi@ericsson.com>
10286
10287 * unittests/ptid-selftests.c: Fix erroneous assert messages.
10288
ba2f91bb
AH
102892017-04-07 Alan Hayward <alan.hayward@arm.com>
10290
10291 * bfin-tdep.c (BFIN_MAX_REGISTER_SIZE): Add.
10292 (bfin_pseudo_register_read): Use BFIN_MAX_REGISTER_SIZE.
10293 (bfin_pseudo_register_write): Likewise
10294
436252de
SM
102952017-04-06 Simon Marchi <simon.marchi@ericsson.com>
10296
10297 * common/ptid.h (struct ptid): Change to...
10298 (class ptid_t): ... this.
10299 <ptid_t>: New constructors.
10300 <pid, lwp_p, lwp, tid_p, tid, is_pid, operator==, operator!=,
10301 matches>: New methods.
10302 <make_null, make_minus_one>: New static methods.
10303 <pid>: Rename to...
10304 <m_pid>: ...this.
10305 <lwp>: Rename to...
10306 <m_lwp>: ...this.
10307 <tid>: Rename to...
10308 <m_tid>: ...this.
10309 (ptid_build, ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal,
10310 ptid_is_pid, ptid_lwp_p, ptid_tid_p, ptid_match): Take ptid arguments
10311 as references, move comment to class ptid_t.
10312 * common/ptid.c (null_ptid, minus_one_ptid): Initialize with
10313 ptid_t static methods.
10314 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_tid,
10315 ptid_equal, ptid_is_pid, ptid_lwp_p, ptid_tid_p, ptid_match):
10316 Take ptid arguments as references, implement using ptid_t methods.
10317 * unittests/ptid-selftests.c: New file.
10318 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
10319 unittests/ptid-selftests.c.
10320 (SUBDIR_UNITTESTS_OBS): Add unittests/ptid-selftests.o.
10321
0dedf377
TP
103222017-04-06 Thomas Preud'homme <thomas.preudhomme@arm.com>
10323
10324 * python/python.c (python_run_simple_file): Cast mode literal to
10325 non-const char pointer as expected by PyFile_FromString.
10326
4e9868d4
SM
103272017-04-05 Simon Marchi <simon.marchi@ericsson.com>
10328
10329 * common/ptid.c (ptid_lwp_p, ptid_tid_p): Remove comparison with
10330 minus_one_ptid and null_ptid.
10331
9bf2a700
PA
103322017-04-05 Pedro Alves <palves@redhat.com>
10333
10334 * warning.m4 (build_warnings): Remove -Wno-write-strings.
10335 * configure: Regenerate.
10336
a121b7c1
PA
103372017-04-05 Pedro Alves <palves@redhat.com>
10338
10339 * ada-exp.y (yyerror): Constify.
10340 * ada-lang.c (bound_name, get_selections)
10341 (ada_variant_discrim_type)
10342 (ada_variant_discrim_name, ada_value_struct_elt)
10343 (ada_lookup_struct_elt_type, is_unchecked_variant)
10344 (ada_which_variant_applies, standard_exc, ada_get_next_arg)
10345 (catch_ada_exception_command_split)
10346 (catch_ada_assert_command_split, catch_assert_command)
10347 (ada_op_name): Constify.
10348 * ada-lang.h (ada_yyerror, get_selections)
10349 (ada_variant_discrim_name, ada_value_struct_elt): Constify.
10350 * arc-tdep.c (arc_print_frame_cache): Constify.
10351 * arm-tdep.c (arm_skip_stub): Constify.
10352 * ax-gdb.c (gen_binop, gen_struct_ref_recursive, gen_struct_ref)
10353 (gen_aggregate_elt_ref): Constify.
10354 * bcache.c (print_bcache_statistics): Constify.
10355 * bcache.h (print_bcache_statistics): Constify.
10356 * break-catch-throw.c (catch_exception_command_1):
10357 * breakpoint.c (struct ep_type_description::description):
10358 Constify.
10359 (add_solib_catchpoint): Constify.
10360 (catch_fork_command_1): Add cast.
10361 (add_catch_command): Constify.
10362 * breakpoint.h (add_catch_command, add_solib_catchpoint):
10363 Constify.
10364 * bsd-uthread.c (bsd_uthread_state): Constify.
10365 * buildsym.c (patch_subfile_names): Constify.
10366 * buildsym.h (next_symbol_text_func, patch_subfile_names):
10367 Constify.
10368 * c-exp.y (yyerror): Constify.
10369 (token::oper): Constify.
10370 * c-lang.h (c_yyerror, cp_print_class_member): Constify.
10371 * c-varobj.c (cplus_describe_child): Constify.
10372 * charset.c (find_charset_names): Add cast.
10373 (find_charset_names): Constify array and add const_cast.
10374 * cli/cli-cmds.c (complete_command, cd_command): Constify.
10375 (edit_command): Constify.
10376 * cli/cli-decode.c (lookup_cmd): Constify.
10377 * cli/cli-dump.c (dump_memory_command, dump_value_command):
10378 Constify.
10379 (struct dump_context): Constify.
10380 (add_dump_command, restore_command): Constify.
10381 * cli/cli-script.c (get_command_line): Constify.
10382 * cli/cli-script.h (get_command_line): Constify.
10383 * cli/cli-utils.c (check_for_argument): Constify.
10384 * cli/cli-utils.h (check_for_argument): Constify.
10385 * coff-pe-read.c (struct read_pe_section_data): Constify.
10386 * command.h (lookup_cmd): Constify.
10387 * common/print-utils.c (decimal2str): Constify.
10388 * completer.c (gdb_print_filename): Constify.
10389 * corefile.c (set_gnutarget): Constify.
10390 * cp-name-parser.y (yyerror): Constify.
10391 * cp-valprint.c (cp_print_class_member): Constify.
10392 * cris-tdep.c (cris_register_name, crisv32_register_name):
10393 Constify.
10394 * d-exp.y (yyerror): Constify.
10395 (struct token::oper): Constify.
10396 * d-lang.h (d_yyerror): Constify.
10397 * dbxread.c (struct header_file_location::name): Constify.
10398 (add_old_header_file, add_new_header_file, last_function_name)
10399 (dbx_next_symbol_text, add_bincl_to_list)
10400 (find_corresponding_bincl_psymtab, set_namestring)
10401 (find_stab_function_addr, read_dbx_symtab, start_psymtab)
10402 (dbx_end_psymtab, read_ofile_symtab, process_one_symbol):
10403 * defs.h (command_line_input, print_address_symbolic)
10404 (deprecated_readline_begin_hook): Constify.
10405 * dwarf2read.c (anonymous_struct_prefix, dwarf_bool_name):
10406 Constify.
10407 * event-top.c (handle_line_of_input): Constify and add cast.
10408 * exceptions.c (catch_errors): Constify.
10409 * exceptions.h (catch_errors): Constify.
10410 * expprint.c (print_subexp_standard, op_string, op_name)
10411 (op_name_standard, dump_raw_expression, dump_raw_expression):
10412 * expression.h (op_name, op_string, dump_raw_expression):
10413 Constify.
10414 * f-exp.y (yyerror): Constify.
10415 (struct token::oper): Constify.
10416 (struct f77_boolean_val::name): Constify.
10417 * f-lang.c (f_word_break_characters): Constify.
10418 * f-lang.h (f_yyerror): Constify.
10419 * fork-child.c (fork_inferior): Add cast.
10420 * frv-tdep.c (struct gdbarch_tdep::register_names): Constify.
10421 (new_variant): Constify.
10422 * gdbarch.sh (pstring_ptr, pstring_list): Constify.
10423 * gdbarch.c: Regenerate.
10424 * gdbcore.h (set_gnutarget): Constify.
10425 * go-exp.y (yyerror): Constify.
10426 (token::oper): Constify.
10427 * go-lang.h (go_yyerror): Constify.
10428 * go32-nat.c (go32_sysinfo): Constify.
10429 * guile/scm-breakpoint.c (gdbscm_breakpoint_expression): Constify.
10430 * guile/scm-cmd.c (cmdscm_function): Constify.
10431 * guile/scm-param.c (pascm_param_value): Constify.
10432 * h8300-tdep.c (h8300_register_name, h8300s_register_name)
10433 (h8300sx_register_name): Constify.
10434 * hppa-tdep.c (hppa32_register_name, hppa64_register_name):
10435 Constify.
10436 * ia64-tdep.c (ia64_register_names): Constify.
10437 * infcmd.c (construct_inferior_arguments): Constify.
10438 (path_command, attach_post_wait): Constify.
10439 * language.c (show_range_command, show_case_command)
10440 (unk_lang_error): Constify.
10441 * language.h (language_defn::la_error)
10442 (language_defn::la_name_of_this): Constify.
10443 * linespec.c (decode_line_2): Constify.
10444 * linux-thread-db.c (thread_db_err_str): Constify.
10445 * lm32-tdep.c (lm32_register_name): Constify.
10446 * m2-exp.y (yyerror): Constify.
10447 * m2-lang.h (m2_yyerror): Constify.
10448 * m32r-tdep.c (m32r_register_names): Constify and make static.
10449 * m68hc11-tdep.c (m68hc11_register_names): Constify.
10450 * m88k-tdep.c (m88k_register_name): Constify.
10451 * macroexp.c (appendmem): Constify.
10452 * mdebugread.c (fdr_name, add_data_symbol, parse_type)
10453 (upgrade_type, parse_external, parse_partial_symbols)
10454 (mdebug_next_symbol_text, cross_ref, mylookup_symbol, new_psymtab)
10455 (new_symbol): Constify.
10456 * memattr.c (mem_info_command): Constify.
10457 * mep-tdep.c (register_name_from_keyword): Constify.
10458 * mi/mi-cmd-env.c (mi_cmd_env_path, _initialize_mi_cmd_env):
10459 Constify.
10460 * mi/mi-cmd-stack.c (list_args_or_locals): Constify.
10461 * mi/mi-cmd-var.c (mi_cmd_var_show_attributes): Constify.
10462 * mi/mi-main.c (captured_mi_execute_command): Constify and add
10463 cast.
10464 (mi_execute_async_cli_command): Constify.
10465 * mips-tdep.c (mips_register_name): Constify.
10466 * mn10300-tdep.c (register_name, mn10300_generic_register_name)
10467 (am33_register_name, am33_2_register_name)
10468 * moxie-tdep.c (moxie_register_names): Constify.
10469 * nat/linux-osdata.c (osdata_type): Constify fields.
10470 * nto-tdep.c (nto_parse_redirection): Constify.
10471 * objc-lang.c (lookup_struct_typedef, lookup_objc_class)
10472 (lookup_child_selector): Constify.
10473 (objc_methcall::name): Constify.
10474 * objc-lang.h (lookup_objc_class, lookup_child_selector)
10475 (lookup_struct_typedef): Constify.
10476 * objfiles.c (pc_in_section): Constify.
10477 * objfiles.h (pc_in_section): Constify.
10478 * p-exp.y (struct token::oper): Constify.
10479 (yyerror): Constify.
10480 * p-lang.h (pascal_yyerror): Constify.
10481 * parser-defs.h (op_name_standard): Constify.
10482 (op_print::string): Constify.
10483 (exp_descriptor::op_name): Constify.
10484 * printcmd.c (print_address_symbolic): Constify.
10485 * psymtab.c (print_partial_symbols): Constify.
10486 * python/py-breakpoint.c (stop_func): Constify.
10487 (bppy_get_expression): Constify.
10488 * python/py-cmd.c (cmdpy_completer::name): Constify.
10489 (cmdpy_function): Constify.
10490 * python/py-event.c (evpy_add_attribute)
10491 (gdbpy_initialize_event_generic): Constify.
10492 * python/py-event.h (evpy_add_attribute)
10493 (gdbpy_initialize_event_generic): Constify.
10494 * python/py-evts.c (add_new_registry): Constify.
10495 * python/py-finishbreakpoint.c (outofscope_func): Constify.
10496 * python/py-framefilter.c (get_py_iter_from_func): Constify.
10497 * python/py-inferior.c (get_buffer): Add cast.
10498 * python/py-param.c (parm_constant::name): Constify.
10499 * python/py-unwind.c (fprint_frame_id): Constify.
10500 * python/python.c (gdbpy_parameter_value): Constify.
10501 * remote-fileio.c (remote_fio_func_map): Make 'name' const.
10502 * remote.c (memory_packet_config::name): Constify.
10503 (show_packet_config_cmd, remote_write_bytes)
10504 (remote_buffer_add_string):
10505 * reverse.c (exec_reverse_once): Constify.
10506 * rs6000-tdep.c (variant::name, variant::description): Constify.
10507 * rust-exp.y (rustyyerror): Constify.
10508 * rust-lang.c (rust_op_name): Constify.
10509 * rust-lang.h (rustyyerror): Constify.
10510 * serial.h (serial_ops::name): Constify.
10511 * sh-tdep.c (sh_sh_register_name, sh_sh3_register_name)
10512 (sh_sh3e_register_name, sh_sh2e_register_name)
10513 (sh_sh2a_register_name, sh_sh2a_nofpu_register_name)
10514 (sh_sh_dsp_register_name, sh_sh3_dsp_register_name)
10515 (sh_sh4_register_name, sh_sh4_nofpu_register_name)
10516 (sh_sh4al_dsp_register_name): Constify.
10517 * sh64-tdep.c (sh64_register_name): Constify.
10518 * solib-darwin.c (lookup_symbol_from_bfd): Constify.
10519 * spu-tdep.c (spu_register_name, info_spu_dma_cmdlist): Constify.
10520 * stabsread.c (patch_block_stabs, read_type_number)
10521 (ref_map::stabs, ref_add, process_reference)
10522 (symbol_reference_defined, define_symbol, define_symbol)
10523 (error_type, read_type, read_member_functions, read_cpp_abbrev)
10524 (read_one_struct_field, read_struct_fields, read_baseclasses)
10525 (read_tilde_fields, read_struct_type, read_array_type)
10526 (read_enum_type, read_sun_builtin_type, read_sun_floating_type)
10527 (read_huge_number, read_range_type, read_args, common_block_start)
10528 (find_name_end): Constify.
10529 * stabsread.h (common_block_start, define_symbol)
10530 (process_one_symbol, symbol_reference_defined, ref_add):
10531 * symfile.c (get_section_index, add_symbol_file_command):
10532 * symfile.h (get_section_index): Constify.
10533 * target-descriptions.c (tdesc_type::name): Constify.
10534 (tdesc_free_type): Add cast.
10535 * target.c (find_default_run_target):
10536 (add_deprecated_target_alias, find_default_run_target)
10537 (target_announce_detach): Constify.
10538 (do_option): Constify.
10539 * target.h (add_deprecated_target_alias): Constify.
10540 * thread.c (print_thread_info_1): Constify.
10541 * top.c (deprecated_readline_begin_hook, command_line_input):
10542 Constify.
10543 (init_main): Add casts.
10544 * top.h (handle_line_of_input): Constify.
10545 * tracefile-tfile.c (tfile_write_uploaded_tsv): Constify.
10546 * tracepoint.c (tvariables_info_1, trace_status_mi): Constify.
10547 (tfind_command): Rename to ...
10548 (tfind_command_1): ... this and constify.
10549 (tfind_command): New function.
10550 (tfind_end_command, tfind_start_command): Adjust.
10551 (encode_source_string): Constify.
10552 * tracepoint.h (encode_source_string): Constify.
10553 * tui/tui-data.c (tui_partial_win_by_name): Constify.
10554 * tui/tui-data.h (tui_partial_win_by_name): Constify.
10555 * tui/tui-source.c (tui_set_source_content_nil): Constify.
10556 * tui/tui-source.h (tui_set_source_content_nil): Constify.
10557 * tui/tui-win.c (parse_scrolling_args): Constify.
10558 * tui/tui-windata.c (tui_erase_data_content): Constify.
10559 * tui/tui-windata.h (tui_erase_data_content): Constify.
10560 * tui/tui-winsource.c (tui_erase_source_content): Constify.
10561 * tui/tui.c (tui_enable): Add cast.
10562 * utils.c (defaulted_query): Constify.
10563 (init_page_info): Add cast.
10564 (puts_debug, subset_compare): Constify.
10565 * utils.h (subset_compare): Constify.
10566 * varobj.c (varobj_format_string): Constify.
10567 * varobj.h (varobj_format_string): Constify.
10568 * vax-tdep.c (vax_register_name): Constify.
10569 * windows-nat.c (windows_detach): Constify.
10570 * xcoffread.c (process_linenos, xcoff_next_symbol_text): Constify.
10571 * xml-support.c (gdb_xml_end_element): Constify.
10572 * xml-tdesc.c (tdesc_start_reg): Constify.
10573 * xstormy16-tdep.c (xstormy16_register_name): Constify.
10574 * xtensa-tdep.c (xtensa_find_register_by_name): Constify.
10575 * xtensa-tdep.h (xtensa_register_t::name): Constify.
10576
995816ba
PA
105772017-04-05 Pedro Alves <palves@redhat.com>
10578
10579 * proc-api.c (struct trans): Constify.
10580 (procfs_note): Constify.
10581 * proc-events.c (struct trans, syscall_table):
10582 * proc-flags.c (struct trans): Constify.
10583 * proc-utils.h (procfs_note): Constify.
10584 * proc-why.c (struct trans): Constify.
10585 * procfs.c (dead_procinfo, find_syscall, proc_warn, proc_error)
10586 (procfs_detach): Constify.
10587 * sol-thread.c (struct string_map): Constify.
10588 (td_err_string, td_state_string): Constify.
10589
3e83a920
PA
105902017-04-05 Pedro Alves <palves@redhat.com>
10591
10592 * proc-api.c (procfs_filename): Don't initialize
10593 procfs_filename.
10594 (prepare_to_trace): Assume procfs_filename is non-NULL.
10595 (_initialize_proc_api): Give procfs_filename a default value here.
10596
63160a43
PA
105972017-04-05 Pedro Alves <palves@redhat.com>
10598
10599 * break-catch-throw.c (handle_gnu_v3_exceptions): Constify
10600 'cond_string' parameter.
10601 (extract_exception_regexp): Constify 'string' parameter.
10602 (catch_exception_command_1): Constify.
10603 * breakpoint.c (init_catchpoint)
10604 (create_fork_vfork_event_catchpoint): Constify 'cond_string'
10605 parameter.
10606 (ep_parse_optional_if_clause, catch_fork_command_1)
10607 (catch_exec_command_1): Constify.
10608 * breakpoint.h (init_catchpoint): Constify 'cond_string'
10609 parameter.
10610 (ep_parse_optional_if_clause): Constify.
10611 * cli/cli-utils.c (remove_trailing_whitespace)
10612 (check_for_argument): Constify.
10613 * cli/cli-utils.h (remove_trailing_whitespace): Constify and add
10614 non-const overload.
10615 (check_for_argument): Likewise.
10616
9b2eba3d
PA
106172017-04-05 Pedro Alves <palves@redhat.com>
10618
10619 * event-top.c (command_line_handler): Add cast to execute_command
10620 call.
10621 * record-btrace.c (cmd_record_btrace_bts_start)
10622 (cmd_record_btrace_pt_start, cmd_record_btrace_start)
10623 (cmd_record_btrace_start): Add cast to execute_command call.
10624 * record-full.c (record_full_goto_insn):
10625 * record.c (record_start, record_stop): Add cast to
10626 execute_command_to_string calls.
10627 (cmd_record_start): Add cast to execute_command calls.
10628
2adadf51
PA
106292017-04-05 Pedro Alves <palves@redhat.com>
10630
10631 * python/python-internal.h (gdb_PyArg_ParseTupleAndKeywords): New
10632 static inline function.
10633 * python/py-arch.c (archpy_disassemble): Constify 'keywords'
10634 array and use gdb_PyArg_ParseTupleAndKeywords.
10635 * python/py-cmd.c (cmdpy_init): Likewise.
10636 * python/py-finishbreakpoint.c (bpfinishpy_init): Likewise.
10637 * python/py-inferior.c (infpy_read_memory, infpy_write_memory)
10638 (infpy_search_memory): Likewise.
10639 * python/py-objfile.c (objfpy_add_separate_debug_file)
10640 (gdbpy_lookup_objfile): Likewise.
10641 * python/py-symbol.c (gdbpy_lookup_symbol)
10642 (gdbpy_lookup_global_symbol): Likewise.
10643 * python/py-type.c (gdbpy_lookup_type): Likewise.
10644 * python/py-value.c (valpy_lazy_string, valpy_string): Likewise.
10645 * python/python.c (execute_gdb_command, gdbpy_write, gdbpy_flush):
10646 Likewise.
10647
0d1f4ceb
PA
106482017-04-05 Pedro Alves <palves@redhat.com>
10649
10650 * python/python-internal.h (gdb_PyGetSetDef): New type.
10651 * python/py-block.c (block_object_getset)
10652 (breakpoint_object_getset): Now a gdb_PyGetSetDef array.
10653 * python/py-event.c (event_object_getset)
10654 (finish_breakpoint_object_getset): Likewise.
10655 * python/py-inferior.c (inferior_object_getset): Likewise.
10656 * python/py-infthread.c (thread_object_getset): Likewise.
10657 * python/py-lazy-string.c (lazy_string_object_getset): Likewise.
10658 * python/py-linetable.c (linetable_entry_object_getset): Likewise.
10659 * python/py-objfile.c (objfile_getset): Likewise.
10660 * python/py-progspace.c (pspace_getset): Likewise.
10661 * python/py-record-btrace.c (btpy_insn_getset, btpy_call_getset):
10662 Likewise.
10663 * python/py-record.c (recpy_record_getset): Likewise.
10664 * python/py-symbol.c (symbol_object_getset): Likewise.
10665 * python/py-symtab.c (symtab_object_getset, sal_object_getset):
10666 Likewise.
10667 * python/py-type.c (type_object_getset, field_object_getset):
10668 Likewise.
10669 * python/py-value.c (value_object_getset): Likewise.
10670
4d759979
PA
106712017-04-05 Pedro Alves <palves@redhat.com>
10672
10673 * python/python-internal.h (gdb_PyObject_CallMethod)
10674 (gdb_PyErr_NewException, gdb_PySys_GetObject, gdb_PySys_SetPath):
10675 New functions.
10676 (GDB_PYSYS_SETPATH_CHAR, PyObject_CallMethod, PyErr_NewException)
10677 (PySys_GetObject, PySys_SetPath): New macros.
10678
fdf9e36f
PA
106792017-04-05 Pedro Alves <palves@redhat.com>
10680
10681 * mi/mi-cmd-info.c (mi_cmd_info_os): Call info_osdata instead of
10682 info_osdata_command.
10683 * osdata.c (info_osdata_command): Rename to ...
10684 (info_osdata): ... this. Constify 'type' parameter, and remove
10685 the 'from_tty' parameter. Accept NULL TYPE.
10686 (info_osdata_command): New function.
10687 * osdata.h (info_osdata_command): Remove declaration.
10688 (info_osdata): New declaration.
10689
9f33b8b7
PA
106902017-04-05 Pedro Alves <palves@redhat.com>
10691
10692 * mi/mi-cmd-break.c (mi_cmd_break_insert_1, mi_cmd_break_insert)
10693 (mi_cmd_dprintf_insert, mi_cmd_break_passcount)
10694 (mi_cmd_break_watch, mi_cmd_break_commands): Constify 'command'
10695 parameter.
10696 * mi/mi-cmd-catch.c (mi_cmd_catch_assert, mi_cmd_catch_exception)
10697 (mi_cmd_catch_load, mi_cmd_catch_unload): Constify cmd' parameter.
10698 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Constify 'command'
10699 parameter.
10700 * mi/mi-cmd-env.c (mi_cmd_env_pwd, mi_cmd_env_cd, mi_cmd_env_path)
10701 (mi_cmd_env_dir, mi_cmd_inferior_tty_set, _cmd_inferior_tty_show)
10702 * mi/mi-cmd-file.c (mi_cmd_file_list_exec_source_file)
10703 (mi_cmd_file_list_exec_source_files)
10704 (mi_cmd_file_list_shared_libraries): Constify 'command' parameter.
10705 * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions)
10706 (mi_cmd_info_gdb_mi_command, mi_cmd_info_os): Constify 'command'
10707 parameter.
10708 * mi/mi-cmd-stack.c (mi_cmd_enable_frame_filters)
10709 (mi_cmd_stack_list_frames, mi_cmd_stack_info_depth)
10710 (mi_cmd_stack_list_locals, mi_cmd_stack_list_args)
10711 (mi_cmd_stack_list_variables, mi_cmd_stack_select_frame)
10712 (mi_cmd_stack_info_frame): Constify 'command' parameter.
10713 * mi/mi-cmd-target.c (mi_cmd_target_file_get)
10714 (mi_cmd_target_file_put, mi_cmd_target_file_delete): Constify
10715 'command' parameter.
10716 * mi/mi-cmd-var.c (mi_cmd_var_create, mi_cmd_var_delete)
10717 (mi_cmd_var_set_format, mi_cmd_var_set_visualizer)
10718 (mi_cmd_var_set_frozen, mi_cmd_var_show_format)
10719 (mi_cmd_var_info_num_children, mi_cmd_var_list_children)
10720 (mi_cmd_var_info_type, mi_cmd_var_info_path_expression)
10721 (mi_cmd_var_info_expression, mi_cmd_var_show_attributes)
10722 (mi_cmd_var_evaluate_expression, mi_cmd_var_assign)
10723 (mi_cmd_var_update, mi_cmd_enable_pretty_printing)
10724 (mi_cmd_var_set_update_range): Constify 'command' parameter.
10725 * mi/mi-cmds.h (mi_cmd_argv_ftype): Constify 'command' parameter.
10726 * mi/mi-interp.c (mi_cmd_interpreter_exec): Constify 'command'
10727 parameter.
10728 * mi/mi-main.c (mi_cmd_gdb_exit, mi_cmd_exec_next)
10729 (mi_cmd_exec_next_instruction, mi_cmd_exec_step)
10730 (mi_cmd_exec_step_instruction, mi_cmd_exec_finish)
10731 (mi_cmd_exec_return ,mi_cmd_exec_jump, mi_cmd_exec_continue)
10732 (mi_cmd_exec_interrupt, mi_cmd_exec_run, mi_cmd_target_detach)
10733 (mi_cmd_target_flash_erase, mi_cmd_thread_select)
10734 (mi_cmd_thread_list_ids, mi_cmd_thread_info)
10735 (mi_cmd_list_thread_groups, mi_cmd_data_list_register_names)
10736 (mi_cmd_data_list_changed_registers)
10737 (mi_cmd_data_write_register_values)
10738 (mi_cmd_data_evaluate_expression, mi_cmd_data_read_memory)
10739 (mi_cmd_data_read_memory_bytes, mi_cmd_data_write_memory)
10740 (mi_cmd_data_write_memory_bytes, mi_cmd_enable_timings)
10741 (mi_cmd_list_features, mi_cmd_list_target_features)
10742 (mi_cmd_add_inferior, mi_cmd_remove_inferior)
10743 (mi_cmd_trace_define_variable, mi_cmd_trace_list_variables)
10744 (mi_cmd_trace_find, mi_cmd_trace_save, mi_cmd_trace_start)
10745 (mi_cmd_trace_status, mi_cmd_trace_stop, mi_cmd_ada_task_info)
10746 (mi_cmd_trace_frame_collected): Constify 'command'
10747 parameter.
10748 * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Constify
10749 'command' parameter.
10750
67cb5b2d
PA
107512017-04-05 Pedro Alves <palves@redhat.com>
10752
10753 * ada-lang.c (ada_completer_word_break_characters): Now a const
10754 array.
10755 (ada_get_gdb_completer_word_break_characters): Constify.
10756 * completer.c (gdb_completer_command_word_break_characters)
10757 (gdb_completer_file_name_break_characters)
10758 (gdb_completer_quote_characters): Now const arrays.
10759 (get_gdb_completer_quote_characters): Constify.
10760 (set_rl_completer_word_break_characters): New function.
10761 (set_gdb_completion_word_break_characters)
10762 (complete_line_internal): Use it.
10763 * completer.h (get_gdb_completer_quote_characters): Constify.
10764 (set_rl_completer_word_break_characters): Declare.
10765 * f-lang.c (f_word_break_characters): Constify.
10766 * language.c (default_word_break_characters): Constify.
10767 * language.h (language_defn::la_word_break_characters): Constify.
10768 (default_word_break_characters): Constify.
10769 * top.c (init_main): Use set_rl_completer_word_break_characters.
10770
7a114964
PA
107712017-04-05 Pedro Alves <palves@redhat.com>
10772
10773 * aix-thread.c (aix_thread_pid_to_str)
10774 (aix_thread_extra_thread_info): Constify.
10775 * bsd-kvm.c (bsd_kvm_pid_to_str): Constify.
10776 * bsd-uthread.c (bsd_uthread_extra_thread_info)
10777 (bsd_uthread_pid_to_str): Constify.
10778 * corelow.c (core_pid_to_str): Constify.
10779 * darwin-nat.c (darwin_pid_to_str): Constify.
10780 * fbsd-nat.c (fbsd_pid_to_str): Constify.
10781 * fbsd-tdep.c (fbsd_core_pid_to_str, gdbarch_core_pid_to_str):
10782 Constify.
10783 * gnu-nat.c (gnu_pid_to_str): Constify.
10784 * go32-nat.c (go32_pid_to_str): Constify.
10785 * i386-cygwin-tdep.c (i386_windows_core_pid_to_str): Constify.
10786 * inf-ptrace.c (inf_ptrace_pid_to_str): Constify.
10787 * inferior.c (inferior_pid_to_str): Constify.
10788 * linux-nat.c (linux_nat_pid_to_str): Constify.
10789 * linux-tdep.c (linux_core_pid_to_str): Constify.
10790 * linux-thread-db.c (thread_db_pid_to_str)
10791 (thread_db_extra_thread_info): Constify.
10792 * nto-tdep.c (nto_extra_thread_info): Constify.
10793 * nto-tdep.h (nto_extra_thread_info): Constify.
10794 * obsd-nat.c (obsd_pid_to_str): Constify.
10795 * procfs.c (procfs_pid_to_str): Constify.
10796 * ravenscar-thread.c (ravenscar_extra_thread_info)
10797 (ravenscar_pid_to_str): Constify.
10798 * remote-sim.c (gdbsim_pid_to_str): Constify.
10799 * remote.c (remote_threads_extra_info, remote_pid_to_str):
10800 Constify.
10801 * sol-thread.c (solaris_pid_to_str): Constify.
10802 * sol2-tdep.c (sol2_core_pid_to_str): Constify.
10803 * sol2-tdep.h (sol2_core_pid_to_str): Constify.
10804 * target.c (default_pid_to_str, target_pid_to_str)
10805 (normal_pid_to_str, default_pid_to_str): Constify.
10806 * target.h (target_ops::to_pid_to_str)
10807 (target_ops::to_extra_thread_info): Constify.
10808 (target_pid_to_str, normal_pid_to_str): Constify.
10809 * windows-nat.c (windows_pid_to_str): Constify.
10810 * gdbarch.sh (core_pid_to_str): Constify.
10811 * target-delegates.c: Regenerate.
10812 * gdbarch.h, gdbarch.c: Regenerate.
10813
69bbf465
PA
108142017-04-05 Pedro Alves <palves@redhat.com>
10815
10816 * main.c (captured_main_1): Use gdb::unique_xmalloc_ptr to manage
10817 the memory of the temporary warning_pre_print override.
10818 * utils.c (warning_pre_print): Constify.
10819 * utils.h (warning_pre_print): Constify.
10820
be47f9e8
PA
108212017-04-05 Pedro Alves <palves@redhat.com>
10822
10823 * cli/cli-cmds.c (shell_escape): Constify 'arg' parameter.
10824 (shell_command): New function.
10825 (make_command): Use std::string.
10826 (init_cli_cmds): Register shell_command instead of shell_escape.
10827
bde6261a
PA
108282017-04-05 Pedro Alves <palves@redhat.com>
10829
10830 * breakpoint.c (dprintf_function, dprintf_channel): Don't initialize.
10831 * tracepoint.c (default_collect): Don't initialize.
10832
b38ef47f
PA
108332017-04-05 Pedro Alves <palves@redhat.com>
10834
10835 * macroexp.c (macro_buffer::shared): Now a bool.
10836 (init_buffer): Update.
10837 (init_shared_buffer): Constify 'addr' parameter.
10838 (substitute_args, expand, macro_expand, macro_expand_next): Remove
10839 casts.
10840
f995bbe8
PA
108412017-04-05 Pedro Alves <palves@redhat.com>
10842
10843 * arm-tdep.c (show_disassembly_style_sfunc): Constify local.
10844 * disasm.c (set_disassembler_options): Constify local.
10845 * i386-tdep.c (i386_print_insn): Remove cast and FIXME comment.
10846
4a596fe2
SDJ
108472017-04-05 Sergio Durigan Junior <sergiodj@redhat.com>
10848
10849 PR gdb/21352
10850 * tracefile.c (tsave_command): Fix argument parsing for '-r'
10851 option.
10852
2cad08ea
YQ
108532017-04-05 Yao Qi <yao.qi@linaro.org>
10854
10855 * frame.c (frame_unwind_register_unsigned): Call
10856 frame_unwind_register_value.
10857
55a98976
YQ
108582017-04-05 Yao Qi <yao.qi@linaro.org>
10859
10860 * gdb.threads/thread-specific-bp.exp (check_thread_specific_breakpoint):
10861 Use gdb_test_multiple, and don't match anchor.
10862
4ac40124
PA
108632017-04-05 Pedro Alves <palves@redhat.com>
10864
10865 * MAINTAINERS (Global Maintainers): Add Simon Marchi.
10866 (Write After Approval): Remove Simon Marchi.
10867
c053b654
PA
108682017-04-05 Pedro Alves <palves@redhat.com>
10869
10870 * common/gdb_optional.h (optional::optional): Make constexpr and
10871 initialize m_dummy.
10872
4c7bf4f9
JB
108732017-04-04 John Baldwin <jhb@FreeBSD.org>
10874
10875 * amd64-fbsd-tdep.c: Remove "bsd-uthread.h" include.
10876 (amd64fbsd_jmp_buf_reg_offset): Remove.
10877 (amd64fbsd_supply_uthread): Remove function.
10878 (amd64fbsd_collect_uthread): Remove function.
10879 (amd64fbsd_init_abi): Don't set bsd-uthread callbacks.
10880 * configure.tgt (i[34567]86-*-freebsd*): Remove bsd-uthread.o.
10881 (x86_64-*-freebsd*): Remove bsd-uthread.o.
10882 (fbsd-nat.c): Update comment.
10883 * i386-fbsd-tdep.c: Remove "bsd-uthread.h" include.
10884 (i386fbsd_jmp_buf_reg_offset): Remove.
10885 (i386fbsd_supply_uthread): Remove function.
10886 (i386fbsd_collect_uthread): Remove function.
10887 (i386fbsd_init_abi): Don't set bsd-uthread callbacks.
10888
1e1a8bef
JB
108892017-04-04 John Baldwin <jhb@FreeBSD.org>
10890
10891 * Makefile.in (ALL_64_TARGET_OBS): Remove alpha-fbsd-tdep.o.
10892 (ALLDEPFILES): Remove alpha-fbsd-tdep.c
10893 * NEWS: Mention that support for FreeBSD/alpha was removed.
10894 * alpha-fbsd-tdep.c: Delete file.
10895 * config/alpha/fbsd.mh: Delete file.
10896 * configure.host: Delete alpha*-*-freebsd* and
10897 alpha*-*-kfreebsd*-gnu.
10898 * configure.tgt: Delete alpha*-*-freebsd* and
10899 alpha*-*-kfreebsd*-gnu.
10900
49907934
JB
109012017-04-04 John Baldwin <jhb@FreeBSD.org>
10902
10903 * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers,
10904 amd64bsd_store_inferior_registers): Use ptid from regcache.
10905
6f77053d
PA
109062017-04-04 Pedro Alves <palves@redhat.com>
10907
10908 * dwarf2read.c (lnp_state_machine): Now a class. Initialize all
10909 data fields, make them private and add "m_" prefixes.
10910 (lnp_state_machine::lnp_state_machine): New ctor.
10911 (record_line, check_line_address, handle_set_discriminator)
10912 (handle_set_address, handle_advance_pc, handle_special_opcode)
10913 (handle_advance_line, handle_set_file, handle_negate_stmt)
10914 (handle_const_add_pc, handle_fixed_advance_pc, handle_copy)
10915 (end_sequence, advance_line): New methods.
10916 (m_gdbarch, m_record_lines_p): New fields.
10917 (lnp_reader_state): Delete.
10918 (dwarf_record_line): Rename to ...
10919 (lnp_state_machine::record_line): ... adjust.
10920 (init_lnp_state_machine): Delete.
10921 (lnp_state_machine::lnp_state_machine): New.
10922 (check_line_address): Rename to ...
10923 (lnp_state_machine::check_line_address): This.
10924 (dwarf_decode_lines_1): Remove reference to "reader_state".
10925 Adjust lnp_state_machine having a non-default ctor. Use bool.
10926 State machine internal state manipulation moved to
10927 lnp_state_machine methods.
10928
9c541725
PA
109292017-04-04 Pedro Alves <palves@redhat.com>
10930
10931 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
10932 unittests/offset-type-selftests.c.
10933 (SUBDIR_UNITTESTS_OBS): Add offset-type-selftests.o.
10934 * common/offset-type.h: New file.
10935 * common/preprocessor.h: New file.
10936 * common/traits.h: New file.
10937 * common/valid-expr.h: New file.
10938 * dwarf2expr.c: Include "common/underlying.h". Adjust to use
10939 sect_offset and cu_offset strong typedefs throughout.
10940 * dwarf2expr.h: Adjust to use sect_offset and cu_offset strong
10941 typedefs throughout.
10942 * dwarf2loc.c: Include "common/underlying.h". Adjust to use
10943 sect_offset and cu_offset strong typedefs throughout.
10944 * dwarf2read.c: Adjust to use sect_offset and cu_offset strong
10945 typedefs throughout.
10946 * gdbtypes.h: Include "common/offset-type.h".
10947 (cu_offset): Now an offset type (strong typedef) instead of a
10948 struct.
10949 (sect_offset): Likewise.
10950 (union call_site_parameter_u): Rename "param_offset" field to
10951 "param_cu_off".
10952 * unittests/offset-type-selftests.c: New file.
10953
ecfb656c
PA
109542017-04-04 Pedro Alves <palves@redhat.com>
10955
10956 * common/underlying.h: New file.
10957 * dwarf2read.c: Include "common/gdb_optional.h" and
10958 "common/underlying.h".
10959 (dir_index, file_name_index): New types.
10960 (file_entry): Use them.
10961 (file_entry::include): Use to_underlying.
10962 (line_header::add_file_name): Use dir_index.
10963 (read_formatted_entries): Use gdb::optional. Read form before
10964 writting to file_entry.
10965 (dwarf_decode_line_header): Use dir_index.
10966 (lnp_state_machine::current_file): Use to_underlying.
10967 (lnp_state_machine::file): Change type to file_name_index.
10968 (dwarf_record_line): Use to_underlying.
10969 (init_lnp_state_machine): Use file_name_index.
10970 (dwarf_decode_lines_1): Use dir_index and file_name_index.
10971
d194f1fe
PA
109722017-04-04 Pedro Alves <palves@redhat.com>
10973
10974 * common/gdb_optional.h (gdb::optiona): Add operator->, operator*,
10975 operator bool, has_value and get methods.
10976
fff8551c
PA
109772017-04-04 Pedro Alves <palves@redhat.com>
10978
10979 * dwarf2read.c (struct file_entry): Add ctors, and initialize all
10980 fields.
10981 (line_header): Initialize all data fields. Change type of
10982 standard_opcode_lengths to std::unique_ptr<unsigned char[]>.
10983 Change type of include_dirs to std::vector<const char *>. Remove
10984 num_include_dirs, include_dirs_size. Change type of file_names to
10985 std::vector<file_entry>. Remove num_file_names, file_names_size.
10986 (line_header::line_header): New.
10987 (line_header::add_include_dir, line_header::add_file_name): New
10988 methods.
10989 (line_header::include_dir_at): Remove NULL check.
10990 (line_header::file_name_at): Add const overload.
10991 (line_header_up): New unique_ptr typedef.
10992 (dw2_get_file_names_reader): Use line_header_up. Adjust to use
10993 std::vector. Remove free_line_header call.
10994 (dwarf2_build_include_psymtabs): Use line_header_up. Remove
10995 free_line_header call.
10996 (free_cu_line_header): Delete.
10997 (handle_DW_AT_stmt_list, handle_DW_AT_stmt_list)
10998 (setup_type_unit_groups): Use line_header_up instead of cleanups.
10999 Adjust to use std::vector.
11000 (free_line_header): Delete.
11001 (free_line_header_voidp): Use delete.
11002 (add_include_dir): Replace with ...
11003 (line_header::add_include_dir): ... this method. Use std::vector.
11004 (add_file_name): Replace with ...
11005 (line_header::add_file_name): ... this method. Use std::vector.
11006 (add_include_dir_stub): Delete.
11007 (read_formatted_entries): Remove memset.
11008 (dwarf_decode_line_header): Return a line_header_up instead of a
11009 raw pointer. Remove cleanup handling. Pass lambdas to
11010 read_formatted_entries. Adjust to use line_header methods.
11011 (dwarf_decode_lines_1): Adjust to use line_header methods.
11012 (dwarf_decode_lines, file_file_name, file_full_name): Adjust to
11013 use std::vector.
11014
d62a8ae2
SM
110152017-04-04 Simon Marchi <simon.marchi@polymtl.ca>
11016
11017 * remote.c (set_general_thread, set_continue_thread): Use ptid_t
11018 instead of struct ptid.
11019
db3a1dc7
AH
110202017-05-04 Alan Hayward <alan.hayward@arm.com>
11021
11022 * frame.c (get_frame_register_bytes): Unwind using value.
11023 (put_frame_register_bytes): Likewise.
11024
b1b45502
IB
110252017-03-30 Iain Buclaw <ibuclaw@gdcproject.org>
11026
11027 * d-exp.y (type_aggregate_p): Treat TYPE_CODE_MODULE as being
11028 aggregate-like.
11029
ec13808e
JK
110302017-03-29 Jan Kratochvil <jan.kratochvil@redhat.com>
11031
11032 * auto-load.c (auto_load_section_scripts): Check SEC_HAS_CONTENTS.
11033
12316564
YQ
110342017-03-29 Yao Qi <yao.qi@linaro.org>
11035
11036 * gdbthread.h (struct thread_info): Declare constructor and
11037 destructor. Add some in-class member initializers.
11038 * thread.c (free_thread): Remove.
11039 (init_thread_list): Call delete instead of free_thread.
11040 (new_thread): Call thread_info constructor.
11041 (thread_info::thread_info): New function.
11042 (thread_info::~thread_info): New function.
11043 (delete_thread_1): Call delete instead of free_thread.
11044 (make_cleanup_restore_current_thread): Move tp and frame to
11045 inner block.
11046
fe5f7374
AK
110472017-03-28 Anton Kolesov <anton.kolesov@synopsys.com>
11048
11049 * arc-tdep.c (arc_frame_cache): Add support for prologue analysis.
11050 (arc_skip_prologue): Likewise.
11051 (arc_make_frame_cache): Likewise.
11052 (arc_pv_get_operand): New function.
11053 (arc_is_in_prologue): Likewise.
11054 (arc_analyze_prologue): Likewise.
11055 (arc_print_frame_cache): Likewise.
11056 (MAX_PROLOGUE_LENGTH): New constant.
11057
eea78757
AK
110582017-03-28 Anton Kolesov <anton.kolesov@synopsys.com>
11059
11060 * configure.tgt: Add arc-insn.o.
11061 * arc-tdep.c (arc_delayed_print_insn): Make non-static.
11062 (dump_arc_instruction_command): New function.
11063 (arc_fprintf_disasm): Likewise.
11064 (arc_disassemble_info): Likewise.
11065 (arc_insn_get_operand_value): Likewise.
11066 (arc_insn_get_operand_value_signed): Likewise.
11067 (arc_insn_get_memory_base_reg): Likewise.
11068 (arc_insn_get_memory_offset): Likewise.
11069 (arc_insn_get_branch_target): Likewise.
11070 (arc_insn_dump): Likewise.
11071 (arc_insn_get_linear_next_pc): Likewise.
11072 * arc-tdep.h (arc_delayed_print_insn): Add function declaration.
11073 (arc_disassemble_info): Likewise.
11074 (arc_insn_get_branch_target): Likewise.
11075 (arc_insn_get_linear_next_pc): Likewise.
11076 * NEWS: Mention new "maint print arc arc-instruction".
11077
3be78afd
AK
110782017-03-28 Anton Kolesov <anton.kolesov@synopsys.com>
11079
11080 * arc-tdep (maintenance_print_arc_list): New variable.
11081 (maintenance_print_arc_command): New function.
11082
296ec4fa
AK
110832017-03-28 Anton Kolesov <anton.kolesov@synopsys.com>
11084
11085 * arc-tdep.c (core_v2_register_names, core_arcompact_register_names)
11086 Add "limm" and "reserved".
11087 (arc_cannot_fetch_register, arc_cannot_store_register): Add
11088 ARC_RESERVED_REGNUM and ARC_LIMM_REGNUM.
11089 * arc-tdep.h (arc_regnum): Likewise.
11090
f74f865e
MF
110912017-03-27 Max Filippov <jcmvbkbc@gmail.com>
11092
11093 * xtensa-linux-nat.c (fill_gregset): Call regcache_raw_collect
11094 for THREADPTR register.
11095 (supply_gregset_reg): Call regcache_raw_supply for THREADPTR
11096 register.
11097 * xtensa-tdep.c (XTENSA_DBREGN_UREG): New definition.
11098 (xtensa_derive_tdep): Initialize tdep->threadptr_regnum.
11099 * xtensa-tdep.h (gdbarch_tdep::threadptr_regnum): New field.
11100
0d0bf81a
MF
111012017-03-27 Max Filippov <jcmvbkbc@gmail.com>
11102
11103 * xtensa-tdep.c (xtensa_pseudo_register_read): Treat all
11104 registers above gdbarch_num_regs (gdbarch) as privileged in
11105 call0 ABI.
11106
0ce4291e
MF
111072017-03-27 Max Filippov <jcmvbkbc@gmail.com>
11108
11109 * xtensa-linux-nat.c (fill_gregset): Call regcache_raw_collect
11110 for a single specified register or for all registers in
11111 a0_base..a0_base + C0_NREGS range.
11112 (supply_gregset_reg): Call regcache_raw_supply for a single
11113 specified register or for all registers in a0_base..a0_base +
11114 C0_NREGS range.
11115
c56054f9
MF
111162017-03-27 Max Filippov <jcmvbkbc@gmail.com>
11117
11118 * arch/xtensa.h (C0_NREGS): Add definition.
11119 * xtensa-tdep.c (C0_NREGS): Remove definition.
11120
a4398628
MF
111212017-03-27 Max Filippov <jcmvbkbc@gmail.com>
11122
11123 * xtensa-tdep.c (xtensa_scan_prologue, call0_analyze_prologue):
11124 Drop xtensa_default_isa initialization.
11125 (xtensa_gdbarch_init): Initialize xtensa_default_isa.
11126
8c43009f
PA
111272017-03-27 Pedro Alves <palves@redhat.com>
11128
11129 * dwarf2read.c (file_entry) <dir_index>: Add comment.
11130 (file_entry::include_dir): New method.
11131 (line_header::include_dir_at, line_header::file_name_at): New
11132 methods.
11133 (setup_type_unit_groups, setup_type_unit_groups)
11134 (psymtab_include_file_name): Simplify using the new methods.
11135 (lnp_state_machine) <the_line_header>: New field.
11136 <file>: Add comment.
11137 (lnp_state_machine::current_file): New method.
11138 (dwarf_record_line): Simplify using the new methods.
11139 (init_lnp_state_machine): Initialize the "the_line_header" field.
11140 (dwarf_decode_lines_1, dwarf_decode_lines, file_file_name):
11141 Simplify using the new methods.
11142
a7e80b9e
PA
111432017-03-27 Pedro Alves <palves@redhat.com>
11144
11145 * cp-name-parser.y (make_empty): Delete.
11146 (demangler_special, nested_name, ptr_operator, array_indicator)
11147 (direct_declarator, declarator_1): Use fill_comp instead of
11148 make_empty.
11149
21047726
PA
111502017-03-27 Pedro Alves <palves@redhat.com>
11151
11152 * xml-support.h (gdb_xml_debug): Pass a "first-to-check" argument
11153 to ATTRIBUTE_PRINTF.
11154 * solib-target.c (library_list_start_list): Print "string" not
11155 "version".
11156 * xml-tdesc.c (tdesc_start_field): Pass "field_name" to
11157 gdb_xml_error call.
11158
d721ba37
PA
111592017-03-27 Pedro Alves <palves@redhat.com>
11160
11161 * dwarf2read.c (struct file_and_directory): New.
11162 (dwarf2_get_dwz_file): Adjust to use std::string.
11163 (dw2_get_file_names_reader): Adjust to use file_and_directory.
11164 (find_file_and_directory): Adjust to return a file_and_directory
11165 object.
11166 (read_file_scope): Adjust to use file_and_directory. Remove
11167 make_cleanup/do_cleanups calls.
11168 (open_and_init_dwp_file): Adjust to use std::string. Remove
11169 make_cleanup/do_cleanups calls.
11170 * python/python.c (do_start_initialization): Adjust to ldirname
11171 returning a std::string.
11172 * utils.c (ldirname): Now returns a std::string.
11173 * utils.h (ldirname): Change return type to std::string.
11174 * xml-syscall.c (xml_init_syscalls_info): Adjust to ldirname
11175 returning a std::string.
11176 * xml-tdesc.c (file_read_description_xml): Likewise.
11177
ed771251
AH
111782017-03-24 Alan Hayward <alan.hayward@arm.com>
11179
11180 * regcache.c (regcache_debug_print_register): New function.
11181 * regcache.h (regcache_debug_print_register): New declaration.
11182 * target.c (debug_print_register): Remove.
11183 (target_fetch_registers): Call regcache_debug_print_register.
11184 (target_store_registers): Likewise.
11185
568c1b9f
PB
111862017-03-24 Pádraig Brady <pbrady@fb.com>
11187
11188 * dwarf2read.c (setup_type_unit_groups): Ensure dir_index doesn't
11189 reference beyond the 'lh->include_dirs' array before accessing to
11190 it.
11191 (psymtab_include_file_name): Likewise.
11192 (dwarf_decode_lines_1): Likewise.
11193 (dwarf_decode_lines): Likewise.
11194 (file_file_name): Likewise.
11195
3e00d44f
SM
111962017-03-23 Simon Marchi <simon.marchi@ericsson.com>
11197
11198 * fbsd-tdep.c (fbsd_corefile_thread): Don't set/restore
11199 inferior_ptid.
11200 * proc-service.c (ps_lgetregs, ps_lsetregs, ps_lgetfpregs,
11201 ps_lsetfpregs): Likewise.
11202 * regcache.c (regcache_raw_update, regcache_raw_write): Likewise.
11203 * sol-thread.c (ps_lgetregs, ps_lsetregs, ps_lgetfpregs,
11204 ps_lsetfpregs): Likewise.
11205 * target.c (target_fetch_registers, target_store_registers):
11206 Remove asserts.
11207
077ae656
AH
112082017-03-23 Alan Hayward <alan.hayward@arm.com>
11209
11210 * sol-thread.c (sol_thread_store_registers): Remove regcache calls.
11211
1e2b521d
YQ
112122017-03-23 Yao Qi <yao.qi@linaro.org>
11213
11214 * aarch64-tdep.c (aarch64_process_record_test): Declare.
11215 (_initialize_aarch64_tdep): Register it.
11216 (aarch64_record_load_store): Handle PRFM instruction.
11217 (aarch64_process_record_test): New function.
11218
33877125
YQ
112192017-03-23 Yao Qi <yao.qi@linaro.org>
11220
11221 * aarch64-tdep.c (aarch64_record_load_store): Fix code
11222 indentation.
11223
a0eef940
YQ
112242017-03-23 Yao Qi <yao.qi@linaro.org>
11225
11226 * aarch64-tdep.c: Remove AARCH64_RECORD_FAILURE.
11227
3f2a3564
PR
112282017-03-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
11229
11230 python/python.c (do_start_initialization): Fix memory leak.
11231
b67aeab0
SM
112322017-03-22 Simon Marchi <simon.marchi@polymtl.ca>
11233
11234 * inf-ptrace.c (inf_ptrace_xfer_partial): Get pid from ptid
11235 using get_ptrace_pid.
11236 * linux-nat.c (linux_nat_xfer_partial): Don't set/restore
11237 inferior_ptid.
11238 (linux_proc_xfer_partial, linux_proc_xfer_spu): Use lwp of
11239 inferior_ptid instead of pid.
11240
ffdbe864
YQ
112412017-03-22 Yao Qi <yao.qi@linaro.org>
11242
11243 * aarch64-tdep.c: Wrap locally used classes in anonymous
11244 namespace.
11245 * arm-tdep.c: Likewise.
11246 * linespec.c: Likewise.
11247 * ui-out.c: Likewise.
11248
9d736fbf
JG
112492017-03-22 Jonah Graham <jonah@kichwacoders.com>
11250
11251 PR gdb/19637
11252 * python/lib/gdb/printer/bound_registers.py: Import sys.
11253
3de88e9a
SM
112542017-03-21 Simon Marchi <simon.marchi@ericsson.com>
11255
11256 * windows-nat.c (do_windows_fetch_inferior_registers): Add
11257 windows_thread_info parameter and use it instead of
11258 current_thread.
11259 (windows_fetch_inferior_registers): Don't set current_thread,
11260 pass the thread to do_windows_fetch_inferior_registers. Use
11261 ptid from regcache instead of inferior_ptid.
11262 (do_windows_store_inferior_registers): Add windows_thread_info
11263 parameter and use it instead of current_thread.
11264 (windows_store_inferior_registers): Don't set current_thread,
11265 pass the thread to do_windows_store_inferior_registers. Use
11266 ptid from regcache instead of inferior_ptid.
11267
0e7b8f61
SM
112682017-03-21 Simon Marchi <simon.marchi@ericsson.com>
11269
11270 * ser-mingw.c (ser_windows_raw): Remove reference to
11271 struct serial::current_timeout.
11272
5badf10a
IR
112732017-03-21 Ivo Raisr <ivo.raisr@oracle.com>
11274
11275 PR tdep/20928
11276 * gdb/sparc-tdep.h (gdbarch_tdep) <sparc64_ccr_type>: New field.
11277 * gdb/sparc64-tdep.c (sparc64_ccr_type): New function.
11278 (sparc64_fsr_type): Fix %fsr decoding.
11279
cee59b3f
TW
112802017-03-21 Tim Wiederhake <tim.wiederhake@intel.com>
11281
11282 * python/py-record-btrace.c (btpy_insn_data): Change return type
11283 for Python 2.
11284
639a9038
SM
112852017-03-20 Simon Marchi <simon.marchi@polymtl.ca>
11286
11287 * spu-linux-nat.c (spu_fetch_inferior_registers,
11288 spu_store_inferior_registers): Use ptid from regcache, set and
11289 restore inferior_ptid.
11290 * spu-multiarch.c (spu_fetch_registers, spu_store_registers):
11291 Likewise.
11292
bcc0c096
SM
112932017-03-20 Simon Marchi <simon.marchi@polymtl.ca>
11294
11295 * i386-linux-nat.c (fetch_register, store_register,
11296 i386_linux_fetch_inferior_registers,
11297 i386_linux_store_inferior_registers): Use ptid from regcache.
11298 * ia64-linux-nat.c (ia64_linux_fetch_register,
11299 ia64_linux_store_register): Likewise.
11300 * inf-ptrace.c (inf_ptrace_fetch_register,
11301 inf_ptrace_store_register): Likewise.
11302 * m32r-linux-nat.c (m32r_linux_fetch_inferior_registers,
11303 m32r_linux_store_inferior_registers): Likewise.
11304 * m68k-bsd-nat.c (m68kbsd_fetch_inferior_registers,
11305 m68kbsd_store_inferior_registers): Likewise.
11306 * m68k-linux-nat.c (fetch_register, store_register,
11307 m68k_linux_fetch_inferior_registers,
11308 m68k_linux_store_inferior_registers): Likewise.
11309 * m88k-bsd-nat.c (m88kbsd_fetch_inferior_registers,
11310 m88kbsd_store_inferior_registers): Likewise.
11311 * mips-fbsd-nat.c (mips_fbsd_fetch_inferior_registers,
11312 mips_fbsd_store_inferior_registers): Likewise.
11313 * mips-linux-nat.c (mips64_linux_regsets_fetch_registers,
11314 mips64_linux_regsets_store_registers): Likewise.
11315 * mips-nbsd-nat.c (mipsnbsd_fetch_inferior_registers,
11316 mipsnbsd_store_inferior_registers): Likewise.
11317 * mips-obsd-nat.c (mips64obsd_fetch_inferior_registers,
11318 mips64obsd_store_inferior_registers): Likewise.
11319 * nto-procfs.c (procfs_fetch_registers, procfs_store_registers):
11320 Likewise.
11321 * ppc-fbsd-nat.c (ppcfbsd_fetch_inferior_registers,
11322 ppcfbsd_store_inferior_registers): Likewise.
11323 * ppc-linux-nat.c (ppc_linux_fetch_inferior_registers,
11324 ppc_linux_store_inferior_registers): Likewise.
11325 * ppc-nbsd-nat.c (ppcnbsd_fetch_inferior_registers,
11326 ppcnbsd_store_inferior_registers): Likewise.
11327 * ppc-obsd-nat.c (ppcobsd_fetch_registers,
11328 ppcobsd_store_registers): Likewise.
11329 * procfs.c (procfs_fetch_registers, procfs_store_registers):
11330 Likewise.
11331 * ravenscar-thread.c (ravenscar_fetch_registers,
11332 ravenscar_store_registers, ravenscar_prepare_to_store):
11333 Likewise.
11334 * record-btrace.c (record_btrace_fetch_registers,
11335 record_btrace_store_registers, record_btrace_prepare_to_store):
11336 Likewise.
11337 * remote-sim.c (gdbsim_fetch_register, gdbsim_store_register):
11338 Lookup inferior using ptid from regcache, instead of
11339 current_inferior.
11340 * remote.c (remote_fetch_registers, remote_store_registers): Use
11341 ptid from regcache.
11342 * rs6000-nat.c (fetch_register, store_register): Likewise.
11343 * s390-linux-nat.c (s390_linux_fetch_inferior_registers,
11344 s390_linux_store_inferior_registers): Likewise.
11345 * sh-nbsd-nat.c (shnbsd_fetch_inferior_registers,
11346 shnbsd_store_inferior_registers): Likewise.
11347 * sol-thread.c (sol_thread_fetch_registers,
11348 sol_thread_store_registers): Likewise.
11349 * sparc-nat.c (sparc_fetch_inferior_registers,
11350 sparc_store_inferior_registers): Likewise.
11351 * tilegx-linux-nat.c (fetch_inferior_registers,
11352 store_inferior_registers): Likewise.
11353 * vax-bsd-nat.c (vaxbsd_fetch_inferior_registers,
11354 vaxbsd_store_inferior_registers): Likewise.
11355 * xtensa-linux-nat.c (fetch_gregs, store_gregs, fetch_xtregs,
11356 store_xtregs): Likewise.
11357
c0f55cc6
AV
113582017-03-20 Artemiy Volkov <artemiyv@acm.org>
11359
11360 PR gdb/14441
11361 * NEWS: Mention support for rvalue references in GDB and python.
11362 * doc/gdb.texinfo (C Plus Plus Expressions): Mention that GDB
11363 supports both lvalue and rvalue references.
11364
15c0a2a9
AV
113652017-03-20 Artemiy Volkov <artemiyv@acm.org>
11366
11367 PR gdb/14441
11368 * gdbtypes.c (rank_one_type): Implement overloading
11369 resolution rules regarding rvalue references.
11370
aa006118
AV
113712017-03-20 Artemiy Volkov <artemiyv@acm.org>
11372
11373 PR gdb/14441
11374 * aarch64-tdep.c (aarch64_type_align)
11375 (aarch64_extract_return_value, aarch64_store_return_value): Change
11376 lvalue reference type checks to general reference type checks.
11377 * amd64-tdep.c (amd64_classify): Likewise.
11378 * amd64-windows-tdep.c (amd64_windows_passed_by_integer_register):
11379 Likewise.
11380 * arm-tdep.c (arm_type_align, arm_extract_return_value)
11381 (arm_store_return_value): Likewise.
11382 * ax-gdb.c (gen_fetch, gen_cast): Likewise.
11383 * c-typeprint.c (c_print_type): Likewise.
11384 * c-varobj.c (adjust_value_for_child_access, c_value_of_variable)
11385 (cplus_number_of_children, cplus_describe_child): Likewise.
11386 * compile/compile-c-symbols.c (generate_vla_size): Likewise.
11387 * completer.c (expression_completer): Likewise.
11388 * cp-support.c (make_symbol_overload_list_adl_namespace):
11389 Likewise.
11390 * darwin-nat-info.c (info_mach_region_command): Likewise.
11391 * dwarf2loc.c (entry_data_value_coerce_ref)
11392 (value_of_dwarf_reg_entry): Likewise.
11393 * eval.c (ptrmath_type_p, evaluate_subexp_standard)
11394 (evaluate_subexp_for_address, evaluate_subexp_for_sizeof):
11395 Likewise.
11396 * findvar.c (extract_typed_address, store_typed_address):
11397 Likewise.
11398 * gdbtypes.c (rank_one_type): Likewise.
11399 * hppa-tdep.c (hppa64_integral_or_pointer_p): Likewise.
11400 * infcall.c (value_arg_coerce): Likewise.
11401 * language.c (pointer_type): Likewise.
11402 * m32c-tdep.c (m32c_reg_arg_type, m32c_m16c_address_to_pointer):
11403 Likewise.
11404 * m88k-tdep.c (m88k_integral_or_pointer_p): Likewise.
11405 * mn10300-tdep.c (mn10300_type_align): Likewise.
11406 * msp430-tdep.c (msp430_push_dummy_call): Likewise.
11407 * ppc-sysv-tdep.c (do_ppc_sysv_return_value)
11408 (ppc64_sysv_abi_push_param, ppc64_sysv_abi_return_value):
11409 Likewise.
11410 * printcmd.c (print_formatted, x_command): Likewise.
11411 * python/py-type.c (typy_get_composite, typy_template_argument):
11412 Likewise.
11413 * python/py-value.c (valpy_referenced_value)
11414 (valpy_get_dynamic_type, value_has_field): Likewise.
11415 * s390-linux-tdep.c (s390_function_arg_integer): Likewise.
11416 * sparc-tdep.c (sparc_integral_or_pointer_p): Likewise.
11417 * sparc64-tdep.c (sparc64_integral_or_pointer_p): Likewise.
11418 * spu-tdep.c (spu_scalar_value_p): Likewise.
11419 * symtab.c (lookup_symbol_aux): Likewise.
11420 * typeprint.c (whatis_exp, print_type_scalar): Likewise.
11421 * valarith.c (binop_types_user_defined_p, unop_user_defined_p):
11422 Likewise.
11423 * valops.c (value_cast_pointers, value_cast)
11424 (value_reinterpret_cast, value_dynamic_cast, value_addr, typecmp)
11425 (value_struct_elt, value_struct_elt_bitpos)
11426 (value_find_oload_method_list, find_overload_match)
11427 (value_rtti_indirect_type): Likewise.
11428 * valprint.c (val_print_scalar_type_p, generic_val_print):
11429 Likewise.
11430 * value.c (value_actual_type, value_as_address, unpack_long)
11431 (pack_long, pack_unsigned_long, coerce_ref_if_computed)
11432 (coerce_ref): Likewise.
11433 * varobj.c (varobj_get_value_type): Likewise.
11434
3fcf899d
AV
114352017-03-20 Artemiy Volkov <artemiyv@acm.org>
11436
11437 PR gdb/14441
11438 * doc/python.texi (Types in Python): Add TYPE_CODE_RVALUE_REF to
11439 table of constants.
11440 * python/lib/gdb/command/explore.py: Support exploring values
11441 of rvalue reference types.
11442 * python/lib/gdb/types.py: Implement get_basic_type() for
11443 rvalue reference types.
11444 * python/py-type.c (pyty_codes) <TYPE_CODE_RVALUE_REF>: New
11445 constant.
11446 * python/py-value.c (valpy_getitem): Add an rvalue reference
11447 check.
11448 (valpy_reference_value): Add new parameter "refcode".
11449 (valpy_lvalue_reference_value, valpy_rvalue_reference_value):
11450 New wrappers for valpy_reference_value().
11451 * python/py-xmethods.c (gdbpy_get_xmethod_result_type)
11452 (gdbpy_invoke_xmethod): Likewise.
11453
4297a3f0
AV
114542017-03-20 Artemiy Volkov <artemiyv@acm.org>
11455
11456 PR gdb/14441
11457 * dwarf2read.c (process_die, read_type_die_1): Handle the
11458 DW_TAG_rvalue_reference_type DIE.
11459 (read_tag_reference_type): Add new parameter "refcode".
11460
e1cb3213
AV
114612017-03-20 Artemiy Volkov <artemiyv@acm.org>
11462
11463 PR gdb/14441
11464 * c-typeprint.c (c_print_type, c_type_print_varspec_prefix)
11465 (c_type_print_modifier, c_type_print_varspec_suffix)
11466 (c_type_print_base): Support printing rvalue reference types.
11467 * c-valprint.c (c_val_print, c_value_print): Support printing
11468 rvalue reference values.
11469
e4347c89
AV
114702017-03-20 Artemiy Volkov <artemiyv@acm.org>
11471
11472 PR gdb/14441
11473 * cp-name-parser.y (ptr_operator): Handle the '&&' token in
11474 typename.
11475 * cp-support.c (replace_typedefs): Handle
11476 DEMANGLE_COMPONENT_RVALUE_REFERENCE.
11477 * python/py-type.c (typy_lookup_type): Likewise.
11478
53cc15f5
AV
114792017-03-20 Artemiy Volkov <artemiyv@acm.org>
11480
11481 PR gdb/14441
11482 * c-exp.y (ptr_operator): Handle the '&&' token in the typename.
11483 * parse.c (insert_type): Change assert statement.
11484 (follow_types): Handle rvalue reference types.
11485 * parser-defs.h (enum type_pieces) <tp_rvalue_reference>: New
11486 constant.
11487
a65cfae5
AV
114882017-03-20 Artemiy Volkov <artemiyv@acm.org>
11489
11490 PR gdb/14441
11491 * ada-lang.c (ada_evaluate_subexp): Adhere to the new
11492 value_ref() interface.
11493 * c-valprint.c (c_value_print): Likewise.
11494 * infcall.c (value_arg_coerce): Likewise.
11495 * python/py-value.c (valpy_reference_value): Likewise.
11496 * valops.c (value_cast, value_reinterpret_cast)
11497 (value_dynamic_cast, typecmp): Likewise.
11498 (value_ref): Parameterize by kind of return value reference type.
11499 * value.h (value_ref): Add new parameter "refcode".
11500
3b224330
AV
115012017-03-20 Artemiy Volkov <artemiyv@acm.org>
11502
11503 PR gdb/14441
11504 * dwarf2read.c (read_tag_reference_type): Use
11505 lookup_lvalue_reference_type() instead of lookup_reference_type().
11506 * eval.c (evaluate_subexp_standard): Likewise.
11507 * f-exp.y: Likewise.
11508 * gdbtypes.c (make_reference_type, lookup_reference_type):
11509 Generalize with rvalue reference types.
11510 (lookup_lvalue_reference_type, lookup_rvalue_reference_type): New
11511 convenience wrappers for lookup_reference_type().
11512 * gdbtypes.h (make_reference_type, lookup_reference_type): Add a
11513 reference kind parameter.
11514 (lookup_lvalue_reference_type, lookup_rvalue_reference_type): Add
11515 wrappers for lookup_reference_type().
11516 * guile/scm-type.c (gdbscm_type_reference): Use
11517 lookup_lvalue_reference_type() instead of lookup_reference_type().
11518 * guile/scm-value.c (gdbscm_value_dynamic_type): Likewise.
11519 * parse.c (follow_types): Likewise.
11520 * python/py-type.c (typy_reference, typy_lookup_type): Likewise.
11521 * python/py-value.c (valpy_get_dynamic_type, valpy_getitem):
11522 Likewise.
11523 * python/py-xmethods.c (gdbpy_get_xmethod_result_type)
11524 (gdbpy_invoke_xmethod): Likewise.
11525 * stabsread.c: Provide extra argument to make_reference_type()
11526 call.
11527 * valops.c (value_ref, value_rtti_indirect_type): Use
11528 lookup_lvalue_reference_type() instead of lookup_reference_type().
11529
f9aeb8d4
AV
115302017-03-20 Artemiy Volkov <artemiyv@acm.org>
11531
11532 PR gdb/14441
11533 * gdbtypes.h (enum type_code) <TYPE_CODE_RVALUE_REF>: New constant.
11534 (TYPE_IS_REFERENCE): New macro.
11535 (struct type): Add rvalue_reference_type field.
11536 (TYPE_RVALUE_REFERENCE_TYPE): New macro.
11537
51457a05
MAL
115382017-03-20 Marc-Andre Laperle <marc-andre.laperle@ericsson.com>
11539
11540 * NEWS: Add an entry about new '-file-list-shared-libraries' command.
11541 * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries):
11542 New function definition.
11543 * mi/mi-cmds.c (mi_cmds): Add -file-list-shared-libraries command.
11544 * mi/mi-cmds.h (mi_cmd_file_list_shared_libraries):
11545 New function declaration.
11546 * mi/mi-interp.c (mi_output_solib_attribs): New Function.
11547 * mi/mi-interp.h: New file.
11548 * solib.c (info_sharedlibrary_command): Replace for loop with
11549 ALL_SO_LIBS macro
11550 * solib.h (update_solib_list): New function declaration.
11551 (so_list_head): Move macro.
11552 * solist.h (ALL_SO_LIBS): New macro.
11553
e696b3ad
MAL
115542017-03-20 Marc-Andre Laperle <marc-andre.laperle@ericsson.com>
11555
11556 * infcmd.c (post_create_inferior): Remove unused argument in
11557 call to solib_add.
11558 * remote.c (remote_start_remote): Likewise.
11559 * solib-frv.c (frv_fetch_objfile_link_map): Likewise.
11560 * solib-svr4.c: (svr4_fetch_objfile_link_map): Likewise.
11561 (enable_break): Likewise.
11562 * solib.c (update_solib_list): Remove unused target argument
11563 and its documentation.
11564 (solib_add): Remove unused target argument. Remove unused
11565 argument in call to update_solib_list.
11566 (info_sharedlibrary_command): Remove unused argument in call
11567 to update_solib_list.
11568 (sharedlibrary_command): Remove unused argument in call to
11569 solib_add.
11570 (handle_solib_event): Likewise.
11571 (reload_shared_libraries): Likewise.
11572 * solib.h (solib_add): Remove unused target argument.
11573
dcb84eda
AA
115742017-03-20 Andreas Arnez <arnez@linux.vnet.ibm.com>
11575
11576 * s390-linux-tdep.c (is_rsi, is_rie): Remove functions.
11577 (s390_displaced_step_fixup): Cover relative branches with the
11578 default fixup handling. This fixes lack of support for some
11579 relative branch instructions.
11580
d9cb6cdc
SM
115812017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
11582
11583 * i386-gnu-nat.c (gnu_fetch_registers, gnu_store_registers): Use
11584 ptid from regcache.
11585
1afaf9f4
SM
115862017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
11587
11588 * i386-darwin-nat.c (i386_darwin_fetch_inferior_registers,
11589 i386_darwin_store_inferior_registers): Use ptid from regcache.
11590
aac12e24
SM
115912017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
11592
11593 * i386-bsd-nat.c (i386bsd_fetch_inferior_registers,
11594 i386bsd_store_inferior_registers): Use ptid from regcache.
11595
bbe1eef1
SM
115962017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
11597
11598 * hppa-obsd-nat.c (hppaobsd_fetch_registers,
11599 hppaobsd_store_registers): Use ptid from regcache.
11600
10799020
SM
116012017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
11602
11603 * hppa-nbsd-nat.c (hppanbsd_fetch_registers,
11604 hppanbsd_store_registers): Use ptid from regcache.
11605
00204cf7
SM
116062017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
11607
11608 * hppa-linux-nat.c (fetch_register, store_register): Use ptid
11609 from regcache. Use get_ptrace_pid.
11610
11a33714
SM
116112017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
11612
11613 * corelow.c (get_core_register_section): Use ptid from regcache,
11614 update doc.
11615
317cd492
SM
116162017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
11617
11618 * bsd-uthread.c (bsd_uthread_fetch_registers,
11619 bsd_uthread_store_registers): Use ptid from regcache, set and
11620 restore inferior_ptid.
11621
9ac8a7c2
SM
116222017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
11623
11624 * arm-nbsd-nat.c (fetch_register, fetch_regs, fetch_fp_register,
11625 fetch_fp_regs, store_register, store_regs, store_fp_register,
11626 store_fp_regs): Use ptid from regcache.
11627
4ac4bb6a
SM
116282017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
11629
11630 * arm-linux-nat.c (fetch_fpregs, store_fpregs, fetch_regs,
11631 store_regs, fetch_wmmx_regs, store_wmmx_regs, fetch_vfp_regs,
11632 store_vfp_regs): Use ptid from regcache.
11633
9bcbdca8
PA
116342017-03-17 Pedro Alves <palves@redhat.com>
11635
11636 PR remote/21188
11637 * ser-base.c (ser_base_wait_for): Add comment.
11638 (do_ser_base_readchar): Improve comment based on the ser-unix.c's
11639 version.
11640 * ser-unix.c (hardwire_raw): Remove reference to
11641 scb->current_timeout.
11642 (wait_for, do_hardwire_readchar, hardwire_readchar): Delete.
11643 (hardwire_ops): Install ser_base_readchar instead of
11644 hardwire_readchar.
11645 * serial.h (struct serial) <current_timeout, timeout_remaining>:
11646 Remove fields.
11647
7503099f
JG
116482017-03-17 Jonah Graham <jonah@kichwacoders.com>
11649
11650 PR gdb/19637
11651 * python/lib/gdb/printer/bound_registers.py: Add support for
11652 Python 3.
11653
7942e96e
AA
116542017-03-16 Andreas Arnez <arnez@linux.vnet.ibm.com>
11655
11656 * dwarf2loc.c (indirect_synthetic_pointer): Get data type of
11657 pointed-to DIE and pass it to dwarf2_evaluate_loc_desc_full.
11658 (dwarf2_evaluate_loc_desc_full): New parameter subobj_type; rename
11659 byte_offset to subobj_byte_offset. Fix the handling of
11660 DWARF_VALUE_STACK on big-endian targets when coming via an
11661 implicit pointer.
11662 (dwarf2_evaluate_loc_desc): Adjust call to
11663 dwarf2_evaluate_loc_desc_full.
11664 * dwarf2loc.h (dwarf2_fetch_die_type_sect_off): New declaration.
11665 * dwarf2read.c (dwarf2_fetch_die_type_sect_off): New function.
11666
ba14f379
YQ
116672017-03-16 Yao Qi <yao.qi@linaro.org>
11668
11669 * arm-tdep.c (thumb_record_misc): Decode CBNZ, CBZ, REV16,
11670 and REVSH instructions.
11671
b121eeb9
YQ
116722017-03-16 Yao Qi <yao.qi@linaro.org>
11673
11674 * arm-tdep.c [GDB_SELF_TEST]: include "selftests.h".
11675 (arm_record_test): Declare.
11676 (_initialize_arm_tdep) [GDB_SELF_TEST]: call register_self_test.
11677 (thumb_record_ld_st_reg_offset): Rewrite the opcode matching to
11678 align with the manual.
11679 (thumb_record_misc): Adjust the code order to align with the
11680 manual.
11681 (thumb2_record_decode_insn_handler): Fix instruction matching.
11682 (instruction_reader_thumb): New class.
11683 (arm_record_test): New function.
11684
728a7913
YQ
116852017-03-16 Yao Qi <yao.qi@linaro.org>
11686
11687 * arm-tdep.c (abstract_memory_reader): New class.
11688 (instruction_reader): New class.
11689 (extract_arm_insn): Add argument 'reader'. Callers updated.
11690 (decode_insn): Likewise.
11691
34b43320
DE
116922017-03-16 Doug Evans <dje@google.com>
11693
a7c0469f
DE
11694 * guile/scm-lazy-string.c (lazy_string_smob): Clarify use of LENGTH
11695 member. Change type of TYPE member to SCM. All uses updated.
11696 (lsscm_make_lazy_string_smob): Add assert.
11697 (lsscm_make_lazy_string): Flag bad length values.
11698 (lsscm_elt_type): New function.
11699 (gdbscm_lazy_string_to_value): Rewrite to use
11700 lsscm_safe_lazy_string_to_value.
11701 (lsscm_safe_lazy_string_to_value): Fix handling of TYPE_CODE_PTR.
11702 * guile/scm-value.c (gdbscm_value_to_lazy_string): Flag bad length
11703 values. Fix TYPE_CODE_PTR. Handle TYPE_CODE_ARRAY. Handle typedefs
11704 in incoming type.
11705 * guile/guile-internal.h (tyscm_scm_to_type): Declare.
11706 * guile/scm-type.c (tyscm_scm_to_type): New function.
11707
117082017-03-15 Doug Evans <dje@google.com>
11709
34b43320
DE
11710 PR python/17728, python/18439, python/18779
11711 * python/py-lazy-string.c (lazy_string_object): Clarify use of LENGTH
11712 member. Change type of TYPE member to PyObject *. All uses updated.
11713 (stpy_convert_to_value): Fix handling of TYPE_CODE_PTR.
11714 (gdbpy_create_lazy_string_object): Flag bad length values.
11715 Handle TYPE_CODE_ARRAY with possibly different user-provided length.
11716 Handle typedefs in incoming type.
11717 (stpy_lazy_string_elt_type): New function.
11718 (gdbpy_extract_lazy_string): Call it.
11719 * python/py-value.c (valpy_lazy_string): Flag bad length values.
11720 Fix handling of TYPE_CODE_PTR. Handle TYPE_CODE_ARRAY. Handle
11721 typedefs in incoming type.
11722
a3a5fecc
DE
117232017-03-16 Doug Evans <dje@google.com>
11724
11725 * guile/guile-internal.h (tyscm_scm_to_type): Declare.
11726 * guile/scm-type.c (tyscm_scm_to_type): New function.
11727
28f1c605
JW
117282017-03-16 Jiong Wang <jiong.wang@arm.com>
11729
11730 * inf-ptrace.c (inf_ptrace_peek_poke): Change the type to
11731 "ULONGEST" for "skip".
11732
87c336f6
AA
117332017-03-14 Andreas Arnez <arnez@linux.vnet.ibm.com>
11734
11735 PR gdb/21220
11736 * inf-ptrace.c (inf_ptrace_xfer_partial): In "case
11737 TARGET_OBJECT_MEMORY", extract the logic for ptrace peek/poke...
11738 (inf_ptrace_peek_poke): ...here. New function. Now also loop
11739 over ptrace peek/poke until end of buffer or error.
11740
cf81cf60
SM
117412017-03-14 Simon Marchi <simon.marchi@ericsson.com>
11742
11743 * parse.c (length_of_subexp): Make static.
11744 * parser-defs.h (length_of_subexp): Remove.
11745
a379284a
AA
117462017-03-14 Andreas Arnez <arnez@linux.vnet.ibm.com>
11747
11748 * linux-nat.c (linux_proc_xfer_partial): Handle write operations
11749 as well.
11750
8a6200ba
PA
117512017-03-14 Pedro Alves <palves@redhat.com>
11752
11753 * cp-name-parser.y (cp_demangled_name_to_comp): Update comment.
11754 (main): Use std::unique_ptr. Remove calls to
11755 cp_demangled_name_parse_free.
11756
f79ec206
SM
117572017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
11758
11759 * alpha-bsd-nat.c (alphabsd_fetch_inferior_registers,
11760 alphabsd_store_inferior_registers): Use regcache->ptid instead
11761 of inferior_ptid.
11762
edb5fb00
SM
117632017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
11764
11765 * aix-thread.c (aix_thread_fetch_registers,
11766 aix_thread_store_registers): Use regcache->ptid instead of
11767 inferior_ptid.
11768
55119686
SM
117692017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
11770
11771 * aarch64-linux-nat.c (fetch_gregs_from_thread,
11772 store_gregs_to_thread, fetch_fpregs_from_thread,
11773 store_fpregs_to_thread): Use regcache->ptid instead of
11774 inferior_ptid.
11775
6a06fbb7
SM
117762017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
11777
11778 * amd64-linux-nat.c (amd64_linux_fetch_inferior_registers,
11779 amd64_linux_fetch_inferior_registers): Use regcache->ptid
11780 instead of inferior_ptid.
11781
c6386875
SM
117822017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
11783
11784 * target.c (target_fetch_registers, target_store_registers): Add
11785 assert.
11786
ddaaf0fb
SM
117872017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
11788
11789 * regcache.h (regcache_get_ptid): New function.
11790 * regcache.c (regcache_get_ptid): New function.
11791
b9da89d1 117922017-03-13 Mark Wielaard <mark@klomp.org>
11793
11794 * cp-name-parser.y (make_empty): Initialize d_printing to zero.
11795
5f4d1085
KS
117962017-03-10 Keith Seitz <keiths@redhat.com>
11797
11798 PR c++/8218
11799 * c-typeprint.c (cp_type_print_method_args): Skip artificial arguments.
11800
c65d6b55
PA
118012017-03-08 Pedro Alves <palves@redhat.com>
11802
11803 PR gdb/18360
11804 * infrun.c (start_step_over, do_target_resume, resume)
11805 (restart_threads): Assert we're not resuming a thread that is
11806 meant to be stopped.
11807 (infrun_thread_stop_requested_callback): Delete.
11808 (infrun_thread_stop_requested): If the thread is internally
11809 stopped, queue a pending stop event and clear the thread's
11810 inline-frame state.
11811 (handle_stop_requested): New function.
11812 (handle_syscall_event, handle_inferior_event_1): Use
11813 handle_stop_requested.
11814 (handle_stop_requested): New function.
11815 (handle_signal_stop): Set the thread's stop_signal here instead of
11816 at caller.
11817 (finish_step_over): Clear step over info unconditionally.
11818 (handle_signal_stop): If the user had interrupted the event
11819 thread, consider the stop a random signal.
11820 (handle_signal_stop) <signal arrived while stepping over
11821 breakpoint>: Don't restart threads here.
11822 (stop_waiting): Don't clear step-over info here.
11823
15c22686
PA
118242017-03-08 Pedro Alves <palves@redhat.com>
11825
11826 PR 21206
11827 * common/gdb_unlinker.h (unlinker::unlinker): Attribute nonnull
11828 goes to argument 2, not 1.
11829
6e5d74e7
PA
118302017-03-08 Pedro Alves <palves@redhat.com>
11831
11832 PR cli/21218
11833 * top.c (gdb_readline_wrapper): Avoid passing NULL to
11834 display_gdb_prompt.
11835 (command_line_input): Add comment.
11836
9753a2f6
PA
118372017-03-08 Pedro Alves <palves@redhat.com>
11838
11839 PR tui/21216
11840 * tui/tui-file.c (tui_file::write): New.
11841 * tui/tui-file.h (tui_file): Override "write".
11842 * tui/tui-io.c (do_tui_putc, update_start_line): New functions,
11843 factored out from ...
11844 (tui_puts): ... here.
11845 (tui_putc): Use them.
11846 (tui_write): New function.
11847 * tui/tui-io.h (tui_write): Declare.
11848
1672e0d9
SDJ
118492017-03-07 Sergio Durigan Junior <sergiodj@redhat.com>
11850
11851 * Makefile.in (SFILES): Replace "environ.c" with
11852 "common/environ.c".
11853 (HFILES_NO_SRCDIR): Likewise, for "environ.h".
11854 * environ.c: Include "common-defs.h" instead of "defs.h. Moved
11855 to...
11856 * common/environ.c: ... here.
11857 * environ.h: Moved to...
11858 * common/environ.h: ... here.
11859
f7bb4e3a
PB
118602017-03-07 Peter Bergner <bergner@vnet.ibm.com>
11861
11862 * gdbarch.sh (pstring_ptr): New static function.
11863 (gdbarch_disassembler_options): Use it.
11864 (gdbarch_verify_disassembler_options): Print valid_disassembler_options,
11865 not valid_disassembler_option->name.
11866 * gdbarch.c: Regenerate.
11867
e45ced6c
PB
118682017-03-07 Peter Bergner <bergner@vnet.ibm.com>
11869
11870 * config/powerpc/ppc64-linux.mh (MH_CFLAGS): Delete.
11871
5f6fd321
PA
118722017-03-07 Pedro Alves <palves@redhat.com>
11873
11874 * tui/tui-regs.c (tui_restore_gdbout): Don't delete gdb_stdout.
11875
6dbb839a 118762017-03-07 Walfred Tedeschi <walfred.tedeschi@intel.com>
4a612d6f
WT
11877
11878 * i387-tdep.h (i387_reset_bnd_regs): Add function definition.
11879 * i387-tdep.c (i387_reset_bnd_regs): Add function implementation.
11880 * i386-tdep.c (i386_push_dummy_call): Call i387_reset_bnd_regs.
6dbb839a 11881 * amd64-tdep.c (amd64_push_dummy_call): Call i387_reset_bnd_regs.
4a612d6f 11882
d274ecf4
SM
118832017-03-06 Simon Marchi <simon.marchi@ericsson.com>
11884
11885 * xtensa-linux-nat.c (fetch_gregs): Remove const.
11886
df97be55
SM
118872017-03-03 Simon Marchi <simon.marchi@ericsson.com>
11888
11889 * remote.c (remote_add_target_side_commands): Use range-based
11890 for loop.
11891
7d45f3df
YQ
118922017-03-03 Yao Qi <yao.qi@linaro.org>
11893
11894 PR gdb/21165
11895 * ada-valprint.c (ada_val_print_ref): Call value_fetch_lazy if
11896 value is lazy.
11897 * valprint.c (common_val_print): Likewise.
11898
65b48a81
PB
118992017-02-28 Peter Bergner <bergner@vnet.ibm.com>
11900
11901 * NEWS: Mention new set/show disassembler-options commands.
11902 * doc/gdb.texinfo: Document new set/show disassembler-options commands.
11903 * disasm.c: Include "arch-utils.h", "gdbcmd.h" and "safe-ctype.h".
11904 (prospective_options): New static variable.
11905 (gdb_disassembler::gdb_disassembler): Initialize
11906 m_di.disassembler_options.
11907 (gdb_buffered_insn_length_init_dis): Initilize di->disassembler_options.
11908 (get_disassembler_options): New function.
11909 (set_disassembler_options): Likewise.
11910 (set_disassembler_options_sfunc): Likewise.
11911 (show_disassembler_options_sfunc): Likewise.
11912 (disassembler_options_completer): Likewise.
11913 (_initialize_disasm): Likewise.
11914 * disasm.h (get_disassembler_options): New prototype.
11915 (set_disassembler_options): Likewise.
11916 * gdbarch.sh (gdbarch_disassembler_options): New variable.
11917 (gdbarch_verify_disassembler_options): Likewise.
11918 * gdbarch.c: Regenerate.
11919 * gdbarch.h: Likewise.
11920 * arm-tdep.c (num_disassembly_options): Delete.
11921 (set_disassembly_style): Likewise.
11922 (arm_disassembler_options): New static variable.
11923 (set_disassembly_style_sfunc): Convert short style name into long
11924 option name. Call set_disassembler_options.
11925 (show_disassembly_style_sfunc): New function.
11926 (arm_gdbarch_init): Call set_gdbarch_disassembler_options and
11927 set_gdbarch_verify_disassembler_options.
11928 (_initialize_arm_tdep): Delete regnames variable and update callers.
11929 (arm_disassembler_options): Initialize.
11930 (disasm_options): New variable.
11931 (num_disassembly_options): Rename from this...
11932 (num_disassembly_styles): ...to this. Compute by scanning through
11933 disasm_options.
11934 (valid_disassembly_styles): Initialize using disasm_options.
11935 Remove calls to parse_arm_disassembler_option, get_arm_regnames and
11936 set_arm_regname_option.
11937 Pass show_disassembly_style_sfunc to the "disassembler" setshow command.
11938 * rs6000-tdep.c (powerpc_disassembler_options): New static variable.
11939 (rs6000_gdbarch_init): Call set_gdbarch_disassembler_options and
11940 set_gdbarch_verify_disassembler_options.
11941 * s390-tdep.c (s390_disassembler_options): New static variable.
11942 (s390_gdbarch_init):all set_gdbarch_disassembler_options and
11943 set_gdbarch_verify_disassembler_options.
11944
d538e36d
SM
119452017-02-27 Simon Marchi <simon.marchi@ericsson.com>
11946
11947 * remote.c (remote_add_target_side_condition): Remove "struct"
11948 keyword from range-based for loop.
11949
83621223
SM
119502017-02-27 Simon Marchi <simon.marchi@ericsson.com>
11951
11952 * remote.c (remote_add_target_side_condition): Use range-based
11953 for loop. Update comment.
11954
2123df0e
YQ
119552017-02-27 Yao Qi <yao.qi@linaro.org>
11956
11957 * f-typeprint.c (f_print_type): Check "varstring" is empty first.
11958
8e368124
AH
119592017-02-26 Alan Hayward <alan.hayward@arm.com>
11960
11961 * regcache.c (regcache_raw_update): New function.
11962 (regcache_raw_read): Move code to regcache_raw_update.
11963 * regcache.h (regcache_raw_update): New declaration.
11964 * remote.c (remote_prepare_to_store): Call regcache_raw_update.
11965
a49dd8dd
JK
119662017-02-26 Jan Kratochvil <jan.kratochvil@redhat.com>
11967
11968 * dwarf2read.c (create_debug_type_hash_table): Initialize
11969 header.signature and header.type_offset_in_tu.
11970
34e4bae9
PA
119712017-02-24 Pedro Alves <palves@redhat.com>
11972
11973 * symtab.c (make_file_symbol_completion_list_1): Use
11974 add_symtab_completions.
11975
b0e4b369
AH
119762017-02-24 Alan Hayward <alan.hayward@arm.com>
11977
11978 * stack.c (frame_info): Use frame_unwind_register_value to avoid buf.
11979
975c21ab
AH
119802017-02-24 Alan Hayward <alan.hayward@arm.com>
11981
11982 * i386-tdep.c (i386_pseudo_register_read_into_value): Use
11983 I386_MAX_REGISTER_SIZE.
11984 (i386_pseudo_register_write): Likewise.
11985 (i386_process_record): Likewise.
11986 * i387-tdep.c (i387_supply_xsave): Likewise.
11987 * m68k-linux-nat.c (fetch_register): Use M68K_MAX_REGISTER_SIZE.
11988 (store_register): Likewise.
11989
14bc53a8
PA
119902017-02-23 Pedro Alves <palves@redhat.com>
11991
11992 * ada-lang.c: Include "common/function-view.h".
11993 (ada_iterate_over_symbols): Adjust to use function_view as
11994 callback type.
11995 (struct add_partial_datum, ada_complete_symbol_matcher): Delete.
11996 (ada_make_symbol_completion_list): Use a lambda.
11997 (ada_exc_search_name_matches): Delete.
11998 (name_matches_regex): New.
11999 (ada_add_global_exceptions): Use a lambda and name_matches_regex.
12000 * compile/compile-c-support.c: Include "common/function-view.h".
12001 (print_one_macro): Change prototype to accept a ui_file pointer.
12002 (write_macro_definitions): Use a lambda.
12003 * dwarf2read.c: Include "common/function-view.h".
12004 (dw2_map_expand_apply, dw2_map_symtabs_matching_filename)
12005 (dw2_expand_symtabs_matching): Adjust to use function_view as
12006 callback type.
12007 * language.h: Include "common/function-view.h".
12008 (struct language_defn) <la_iterate_over_symbols>: Adjust to use
12009 function_view as callback type.
12010 (LA_ITERATE_OVER_SYMBOLS): Remove DATA parameter.
12011 * linespec.c: Include "common/function-view.h".
12012 (collect_info::add_symbol): New method.
12013 (struct symbol_and_data_callback, iterate_inline_only, struct
12014 symbol_matcher_data, iterate_name_matcher): Delete.
12015 (iterate_over_all_matching_symtabs): Adjust to use function_view
12016 as callback type and lambdas.
12017 (iterate_over_file_blocks): Adjust to use function_view as
12018 callback type.
12019 (decode_compound_collector): Now a class with private fields.
12020 (decode_compound_collector::release_symbols): New method.
12021 (collect_one_symbol): Rename to...
12022 (decode_compound_collector::operator()): ... this and adjust.
12023 (lookup_prefix_sym): decode_compound_collector construction bits
12024 move to decode_compound_collector ctor. Pass the
12025 decode_compound_collector object directly as callback. Remove
12026 cleanups and use decode_compound_collector::release_symbols
12027 instead.
12028 (symtab_collector): Now a class with private fields.
12029 (symtab_collector::release_symtabs): New method.
12030 (add_symtabs_to_list): Rename to...
12031 (symtab_collector::operator()): ... this and adjust.
12032 (collect_symtabs_from_filename): symtab_collector construction
12033 bits move to symtab_collector ctor. Pass the symtab_collector
12034 object directly as callback. Remove cleanups and use
12035 symtab_collector::release_symtabs instead.
12036 (collect_symbols): Delete.
12037 (add_matching_symbols_to_info): Use lambdas.
12038 * macrocmd.c (print_macro_callback): Delete.
12039 (info_macro_command): Use a lambda.
12040 (info_macros_command): Pass print_macro_definition as callable
12041 directly.
12042 (print_one_macro): Remove 'ignore' parameter.
12043 (macro_list_command): Adjust.
12044 * macrotab.c (macro_for_each_data::fn): Now a function_view.
12045 (macro_for_each_data::user_data): Delete field.
12046 (foreach_macro): Adjust to call the function_view.
12047 (macro_for_each): Adjust to use function_view as callback type.
12048 (foreach_macro_in_scope): Adjust to call the function_view.
12049 (macro_for_each_in_scope): Adjust to use function_view as callback
12050 type.
12051 * macrotab.h: Include "common/function-view.h".
12052 (macro_callback_fn): Declare a prototype instead of a pointer.
12053 Remove "user_data" parameter.
12054 (macro_for_each, macro_for_each_in_scope): Adjust to use
12055 function_view as callback type.
12056 * psymtab.c (partial_map_expand_apply)
12057 (psym_map_symtabs_matching_filename, recursively_search_psymtabs):
12058 Adjust to use function_view as callback type and to return bool.
12059 (psym_expand_symtabs_matching): Adjust to use function_view as
12060 callback types.
12061 * symfile-debug.c (debug_qf_map_symtabs_matching_filename): Adjust
12062 to use function_view as callback type and to return bool.
12063 (debug_qf_expand_symtabs_matching): Adjust to use function_view as
12064 callback types.
12065 * symfile.c (expand_symtabs_matching): Adjust to use function_view
12066 as callback types.
12067 * symfile.h: Include "common/function-view.h".
12068 (expand_symtabs_file_matcher_ftype)
12069 (expand_symtabs_symbol_matcher_ftype)
12070 (expand_symtabs_exp_notify_ftype): Remove "data" parameter and
12071 return bool.
12072 (quick_symbol_functions::map_symtabs_matching_filename)
12073 (quick_symbol_functions::expand_symtabs_matching): Adjust to use
12074 function_view as callback type and return bool.
12075 (expand_symtabs_matching): Adjust to use function_view as callback
12076 type.
12077 (maintenance_expand_name_matcher)
12078 (maintenance_expand_file_matcher): Delete.
12079 (maintenance_expand_symtabs): Use lambdas.
12080 * symtab.c (iterate_over_some_symtabs): Adjust to use
12081 function_view as callback types and return bool.
12082 (iterate_over_symtabs): Likewise. Use unique_xmalloc_ptr instead
12083 of a cleanup.
12084 (lookup_symtab_callback): Delete.
12085 (lookup_symtab): Use a lambda.
12086 (iterate_over_symbols): Adjust to use function_view as callback
12087 type.
12088 (struct search_symbols_data, search_symbols_file_matches)
12089 (search_symbols_name_matches): Delete.
12090 (search_symbols): Use a pair of lambdas.
12091 (struct add_name_data, add_macro_name, symbol_completion_matcher)
12092 (symtab_expansion_callback): Delete.
12093 (default_make_symbol_completion_list_break_on_1): Use lambdas.
12094 * symtab.h: Include "common/function-view.h".
12095 (iterate_over_some_symtabs): Adjust to use function_view as
12096 callback type and return bool.
12097 (iterate_over_symtabs): Adjust to use function_view as callback
12098 type.
12099 (symbol_found_callback_ftype): Remove 'data' parameter and return
12100 bool.
12101 (iterate_over_symbols): Adjust to use function_view as callback
12102 type.
12103
07e253aa
PA
121042017-02-23 Pedro Alves <palves@redhat.com>
12105
12106 * Makefile.in (SUBDIR_UNITTESTS_SRCS, SUBDIR_UNITTESTS_OBS): New.
12107 (%.o) <unittests/%.c>: New pattern.
12108 * configure.ac ($development): Add $(SUBDIR_UNITTESTS_OBS) to
12109 CONFIG_OBS, and $(SUBDIR_UNITTESTS_SRCS) to CONFIG_SRCS.
12110 * common/function-view.h: New file.
12111 * unittests/function-view-selftests.c: New file.
12112 * configure: Regenerate.
12113
8eaf5320
SM
121142017-02-23 Simon Marchi <simon.marchi@ericsson.com>
12115
12116 * bsd-uthread.c (bsd_uthread_thread_alive): Use ptid instead of
12117 inferior_ptid.
12118 * go32-nat.c (go32_thread_alive): Likewise.
12119
38768751
YQ
121202017-02-23 Yao Qi <yao.qi@linaro.org>
12121
12122 * varobj-iter.h (varobj_iter_delete): Call xfree instead of
12123 delete.
12124
0a8beaba
YQ
121252017-02-23 Yao Qi <yao.qi@linaro.org>
12126
12127 * varobj.c (varobj_clear_saved_item): Use delete instead of
12128 xfree.
12129 (update_dynamic_varobj_children): Likewise.
12130
58fdfd2c
JK
121312017-02-21 Jan Kratochvil <jan.kratochvil@redhat.com>
12132
12133 * dwarf2read.c (dwarf2_record_block_ranges): Add forgotten BASEADDR.
12134
1b90b139
SM
121352017-02-21 Simon Marchi <simon.marchi@ericsson.com>
12136
12137 * common/enum-flags.h (enum_flags::enum_flags): Initialize
12138 m_enum_value to 0 in default constructor.
12139
2039d74e
EBM
121402017-02-21 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
12141
12142 * rs6000-tdep.c (LOAD_AND_RESERVE_MASK): Rename from LWARX_MASK.
12143 (STORE_CONDITIONAL_MASK): Rename from STWCX_MASK.
12144 (LBARX_INSTRUCTION, LHARX_INSTRUCTION, LQARX_INSTRUCTION,
12145 STBCX_INSTRUCTION, STHCX_INSTRUCTION, STQCX_INSTRUCTION): New defines.
12146 (IS_LOAD_AND_RESERVE_INSN, IS_STORE_CONDITIONAL_INSN): New macros.
12147 (ppc_displaced_step_copy_insn): Use IS_LOAD_AND_RESERVE_INSN.
12148 (ppc_deal_with_atomic_sequence): Use IS_LOAD_AND_RESERVE_INSN and
12149 IS_STORE_CONDITIONAL_INSN.
12150
7814882a
JK
121512017-02-21 Jan Kratochvil <jan.kratochvil@redhat.com>
12152
12153 * dwarf2_rnglists_process: Initialize range_beginning and range_end.
12154
0ae60b63
JK
121552017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
12156
12157 * NEWS (Changes since GDB 7.12): Add DWARF-5.
12158
0224619f
JK
121592017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
12160
12161 * dwarf2read.c (skip_one_die, read_attribute_value)
12162 (dwarf2_const_value_attr, dump_die_shallow)
12163 (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
12164 (skip_form_bytes, attr_form_is_constant): Handle DW_FORM_data16.
12165
0af92d60
JK
121662017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
12167
12168 * dwarf2read.c (read_file_scope): Rename DW_MACRO_GNU_*.
12169 (dwarf_parse_macro_header): Accept DWARF version 5.
12170 (dwarf_decode_macro_bytes, dwarf_decode_macros): Rename DW_MACRO_GNU_*.
12171
216f72a1
JK
121722017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
12173
12174 * block.c (call_site_for_pc): Rename DW_OP_GNU_*, DW_TAG_GNU_* and
12175 DW_AT_GNU_*.
12176 * common/common-exceptions.h (enum errors): Likewise.
12177 * dwarf2-frame.c (class dwarf_expr_executor): Likewise.
12178 * dwarf2expr.c (dwarf_block_to_dwarf_reg)
12179 (dwarf_expr_context::execute_stack_op): Likewise.
12180 * dwarf2expr.h (struct dwarf_expr_context, struct dwarf_expr_piece):
12181 Likewise.
12182 * dwarf2loc.c (dwarf_evaluate_loc_desc::get_base_type)
12183 (dwarf_evaluate_loc_desc::push_dwarf_reg_entry_value)
12184 (show_entry_values_debug, call_site_to_target_addr)
12185 (func_addr_to_tail_call_list, func_verify_no_selftailcall)
12186 (dwarf_expr_reg_to_entry_parameter, dwarf_entry_parameter_to_value)
12187 (entry_data_value_free_closure, value_of_dwarf_reg_entry)
12188 (value_of_dwarf_block_entry, indirect_pieced_value)
12189 (symbol_needs_eval_context::push_dwarf_reg_entry_value):
12190 (disassemble_dwarf_expression): Likewise.
12191 * dwarf2read.c (process_die, inherit_abstract_dies)
12192 (read_call_site_scope): Likewise.
12193 * gdbtypes.h (struct func_type, struct call_site_parameter)
12194 (struct call_site): Likewise.
12195 * stack.c (read_frame_arg): Likewise.
12196 * std-operator.def (OP_VAR_ENTRY_VALUE): Likewise.
12197
43988095
JK
121982017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
12199
12200 * defs.h (read_unsigned_leb128): New declaration.
12201 * dwarf2loc.c (decode_debug_loclists_addresses): New function.
12202 (decode_debug_loc_dwo_addresses): Update DEBUG_LOC_* to DW_LLE_*.
12203 (dwarf2_find_location_expression): Call also
12204 decode_debug_loclists_addresses. Handle DWARF-5 ULEB128 length.
12205 * dwarf2loc.h (dwarf2_version): New declaration.
12206 * dwarf2read.c (struct dwarf2_per_objfile): Add loclists, line_str,
12207 rnglists.
12208 (dwarf2_elf_names): Add .debug_loclists, .debug_line_str,
12209 .debug_rnglists.
12210 (struct dwop_section_names): Add loclists_dwo.
12211 (dwop_section_names): Add .debug_loclists.dwo.
12212 (struct comp_unit_head): Add unit_type, signature, type_offset_in_tu.
12213 (struct dwarf2_per_cu_data): Add dwarf_version.
12214 (struct dwo_sections): Add loclists.
12215 (struct attr_abbrev): Add implicit_const.
12216 (read_indirect_line_string): New declaration.
12217 (read_unsigned_leb128): Delete declaration.
12218 (rcuh_kind): New definition.
12219 (read_and_check_comp_unit_head): Change parameter
12220 is_debug_types_section to section_kind.
12221 (dwarf2_locate_sections): Handle loclists, line_str and rnglists.
12222 (read_comp_unit_head): Change parameter abfd to section, add parameter
12223 section_kind. Handle DWARF-5.
12224 (error_check_comp_unit_head): Accept also DWARF version 5.
12225 (read_and_check_comp_unit_head): Change parameter
12226 is_debug_types_section to section_kind.
12227 (read_and_check_type_unit_head): Delete function.
12228 (read_abbrev_offset): Handle DWARF-5.
12229 (create_debug_type_hash_table): Add parameter section_kind. Process
12230 only DW_UT_type. Use signature and type_offset_in_tu from struct
12231 comp_unit_head.
12232 (create_debug_types_hash_table): Update create_debug_type_hash_table
12233 caller.
12234 (create_all_type_units): Call create_debug_type_hash_table.
12235 (read_cutu_die_from_dwo, init_cutu_and_read_dies): Change
12236 read_and_check_type_unit_head caller to read_and_check_comp_unit_head
12237 caller.
12238 (skip_one_die): Handle DW_FORM_implicit_const.
12239 (dwarf2_rnglists_process): New function.
12240 (dwarf2_ranges_process): Call dwarf2_rnglists_process for DWARF-5.
12241 (abbrev_table_read_table): Handle DW_FORM_implicit_const.
12242 (read_attribute_value): Handle DW_FORM_implicit_const,
12243 DW_FORM_line_strp.
12244 (read_attribute): Handle DW_FORM_implicit_const.
12245 (read_indirect_string_at_offset_from): New function from
12246 read_indirect_string_at_offset.
12247 (read_indirect_string_at_offset): Call
12248 read_indirect_string_at_offset_from.
12249 (read_indirect_line_string_at_offset): New function.
12250 (read_indirect_string): New function comment.
12251 (read_indirect_line_string): New function.
12252 (read_unsigned_leb128): Make it global.
12253 (dwarf2_string_attr): Handle DWARF-5.
12254 (add_include_dir_stub, read_formatted_entries): New functions.
12255 (dwarf_decode_line_header, dump_die_shallow, cu_debug_loc_section):
12256 Handle DWARF-5.
12257 (per_cu_header_read_in): Update read_comp_unit_head caller.
12258 (dwarf2_version): New function.
12259 * symfile.h (struct dwarf2_debug_sections): Add loclists, line_str and
12260 rnglists.
12261 * xcoffread.c (dwarf2_xcoff_names): Update struct dwarf2_debug_sections
12262 fields.
12263
22d2f3ab
JK
122642017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
12265
12266 * dwarf2read.c (abbrev_table_read_table): Read the data only once.
12267
5f46c5a5
JK
122682017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
12269
12270 * dwarf2read.c (dwarf2_ranges_process): New function from
12271 dwarf2_ranges_read.
12272 (dwarf2_ranges_read, dwarf2_record_block_ranges): Use
12273 dwarf2_ranges_process.
12274
78d4d2c5
JK
122752017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
12276
12277 * dwarf2read.c (create_debug_type_hash_table): New function from
12278 create_debug_types_hash_table.
12279 (create_debug_types_hash_table): Call create_debug_type_hash_table.
12280 (create_all_type_units, open_and_init_dwo_file): Update
12281 create_debug_types_hash_table callers.
12282
1b076f25
SDJ
122832017-02-20 Sergio Durigan Junior <sergiodj@redhat.com>
12284
12285 PR gdb/16188
12286 * fork-child.c (trace_start_error): Fix thinko. va_end should
12287 refer to 'ap', not 'args'.
12288
0db8980c
SDJ
122892017-02-20 Sergio Durigan Junior <sergiodj@redhat.com>
12290 Pedro Alves <palves@redhat.com>
12291
12292 PR gdb/16188
12293 * darwin-nat.c (darwin_ptrace_me): Check if calls to system
12294 calls succeeded.
12295 * fork-child.c (trace_start_error): New function.
12296 (trace_start_error_with_name): Likewise.
12297 * gnu-nat.c (gnu_ptrace_me): Check if call to PTRACE succeeded.
12298 * inf-ptrace.c (inf_ptrace_me): Likewise.
12299 * inferior.h (trace_start_error): New prototype.
12300 (trace_start_error_with_name): Likewise.
12301
99e8a4f9
SDJ
123022017-02-15 Sergio Durigan Junior <sergiodj@redhat.com>
12303
12304 PR gdb/21164
12305 * psymtab.c (maintenance_print_psymbols): Verify if 'argv' is not
12306 NULL before using it.
12307 * symmisc.c (maintenance_print_symbols): Likewise.
12308 (maintenance_print_msymbols): Likewise.
12309
4e746bb6
TW
123102017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
12311
12312 * NEWS: Add record Python bindings entry.
12313
123142017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
12315
12316 * Makefile.in (SUBDIR_PYTHON_OBS): Add py-record-btrace.o,
12317 py-record-full.o.
12318 (SUBDIR_PYTHON_SRCS): Add py-record-btrace.c, py-record-full.c.
12319 * python/py-record-btrace.c, python/py-record-btrace.h,
12320 python/py-record-full.c, python/py-record-full.h: New file.
12321 * python/py-record.c: Add include for py-record-btrace.h and
12322 py-record-full.h.
12323 (recpy_method, recpy_format, recpy_goto, recpy_replay_position,
12324 recpy_instruction_history, recpy_function_call_history, recpy_begin,
12325 recpy_end): Use functions from py-record-btrace.c and py-record-full.c.
12326 * python/python-internal.h (PyInt_FromSsize_t, PyInt_AsSsize_t):
12327 New definition.
12328 (gdbpy_initialize_btrace): New export.
12329 * python/python.c (_initialize_python): Add gdbpy_initialize_btrace.
12330
123312017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
12332
12333 * Makefile.in (SUBDIR_PYTHON_OBS): Add python/py-record.o.
12334 (SUBDIR_PYTHON_SRCS): Add python/py-record.c.
12335 * python/py-record.c: New file.
12336 * python/python-internal.h (gdbpy_start_recording,
12337 gdbpy_current_recording, gdpy_stop_recording,
12338 gdbpy_initialize_record): New export.
12339 * python/python.c (_initialize_python): Add gdbpy_initialize_record.
12340 (python_GdbMethods): Add gdbpy_start_recording,
12341 gdbpy_current_recording and gdbpy_stop_recording.
12342
123432017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
12344
12345 * record-btrace.c (record_btrace_record_method): New function.
12346 (init_record_btrace_ops): Initialize to_record_method.
12347 * record-full.c (record_full_record_method): New function.
12348 (init_record_full_ops, init_record_full_core_ops): Add
12349 record_full_record_method.
12350 * record.h (enum record_method): New enum.
12351 * target-debug.h (target_debug_print_enum_record_method: New define.
12352 * target-delegates.c: Regenerate.
12353 * target.c (target_record_method): New function.
12354 * target.h: Include record.h.
12355 (struct target_ops) <to_record_method>: New field.
12356 (target_record_method): New export.
12357
123582017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
12359
12360 * record.h (record_start, record_stop): New export.
12361 * record.c (record_start, record_stop): New function.
12362
123632017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
12364
12365 * btrace.c (btrace_fetch): Copy function call segments pointer
12366 into a vector.
12367 (btrace_clear): Clear the vector.
12368 (btrace_find_insn_by_number): Use binary search to find the correct
12369 function call segment.
12370 * btrace.h (brace_fun_p): New typedef.
12371 (struct btrace_thread_info) <functions>: New field.
12372
123732017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
12374
12375 * record-btrace.c (btrace_ui_out_decode_error): Move most of it ...
12376 * btrace.c (btrace_decode_error): ... here. New function.
12377 * btrace.h (btrace_decode_error): New export.
12378
123792017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
12380
12381 * btrace.c (ftrace_call_num_insn, btrace_insn_get_error): New function.
12382 (ftrace_new_function, btrace_insn_number, btrace_insn_cmp,
12383 btrace_find_insn_by_number): Remove special case for gaps.
12384 * btrace.h (btrace_insn_get_error): New export.
12385 (btrace_insn_number, btrace_find_insn_by_number): Adjust comment.
12386 * record-btrace.c (btrace_insn_history): Print number for gaps.
12387 (record_btrace_info, record_btrace_goto): Handle gaps.
12388
3f77c769
TT
123892017-02-14 Tom Tromey <tom@tromey.com>
12390
12391 PR python/13598:
12392 * python/python.c (gdbpy_before_prompt_hook): Emit before_prompt
12393 event.
12394 * python/py-evts.c (gdbpy_initialize_py_events): Add
12395 before_prompt registry.
12396 * python/py-events.h (events_object) <before_prompt>: New field.
12397
4c2c7ac6
MM
123982017-02-14 Markus Metzger <markus.t.metzger@intel.com>
12399
12400 * btrace.c (ftrace_new_switch): Preserve up link and flags.
12401
5cf30ebf
LM
124022017-02-13 Luis Machado <lgustavo@codesourcery.com>
12403
12404 * symfile (_initialize_symfile): Add usage text to the load command's
12405 help text.
12406
26a06916
SM
124072017-02-10 Simon Marchi <simon.marchi@ericsson.com>
12408
12409 * utils.c (defaulted_query): Don't query on secondary UIs.
12410
0b145e37
TT
124112017-02-10 Tom Tromey <tom@tromey.com>
12412
12413 * rust-lang.c (rust_get_disr_info): Remove unused variable.
12414
2d8365c4
TT
124152017-02-10 Tom Tromey <tom@tromey.com>
12416
12417 * python/py-value.c (valpy_richcompare_throw): Remove unnecessary
12418 "cleanup" local.
12419 * python/py-type.c (typy_legacy_template_argument): Remove
12420 unnecessary "cleanup" local.
12421
2bb8f231
TT
124222017-02-10 Tom Tromey <tom@tromey.com>
12423
12424 * python/python.c (do_start_initialization): New function, from
12425 _initialize_python.
12426 (_initialize_python): Call do_start_initialization.
12427 * python/py-linetable.c (ltpy_iternext): Use explicit returns, not
12428 goto.
12429
1bdfaf42
TT
124302017-02-10 Tom Tromey <tom@tromey.com>
12431
12432 * python/py-prettyprint.c (pretty_print_one_value): Use
12433 gdbpy_ref.
12434
88b6faea
TT
124352017-02-10 Tom Tromey <tom@tromey.com>
12436
12437 * python/py-cmd.c (cmdpy_destroyer): Use gdbpy_ref.
12438 * python/py-breakpoint.c (gdbpy_breakpoint_deleted): Use
12439 gdbpy_ref.
12440 * python/py-type.c (field_new): Use gdbpy_ref.
12441 * python/py-symtab.c (symtab_and_line_to_sal_object): Use
12442 gdbpy_ref.
12443 * python/py-progspace.c (pspy_new): Use gdbpy_ref.
12444 (py_free_pspace): Likewise.
12445 (pspace_to_pspace_object): Likewise.
12446 * python/py-objfile.c (objfpy_new): Use gdbpy_ref.
12447 (py_free_objfile): Likewise.
12448 (objfile_to_objfile_object): Likewise.
12449 * python/py-inferior.c (delete_thread_object): Use
12450 gdbpy_ref.
12451 (infpy_read_memory): Likewise.
12452 (py_free_inferior): Likewise.
12453 * python/py-evtregistry.c (create_eventregistry_object): Use
12454 gdbpy_ref.
12455 * python/py-event.c (create_event_object): Use gdbpy_ref.
12456
7780f186
TT
124572017-02-10 Tom Tromey <tom@tromey.com>
12458
12459 * python/py-ref.h (gdbpy_ref_policy): Now a template.
12460 (gdbpy_ref): Now a template; allow subclasses of PyObject to be
12461 used.
12462 * python/py-arch.c, python/py-bpevent.c, python/py-breakpoint.c,
12463 python/py-cmd.c, python/py-continueevent.c, python/py-event.c,
12464 python/py-exitedevent.c, python/py-finishbreakpoint.c,
12465 python/py-framefilter.c, python/py-function.c,
12466 python/py-inferior.c, python/py-infevents.c,
12467 python/py-linetable.c, python/py-newobjfileevent.c,
12468 python/py-param.c, python/py-prettyprint.c, python/py-ref.h,
12469 python/py-signalevent.c, python/py-stopevent.c,
12470 python/py-symbol.c, python/py-threadevent.c, python/py-type.c,
12471 python/py-unwind.c, python/py-utils.c, python/py-value.c,
12472 python/py-varobj.c, python/py-xmethods.c, python/python.c,
12473 varobj.c: Change gdbpy_ref to gdbpy_ref<>.
12474
d4b0bb18
TT
124752017-02-10 Tom Tromey <tom@tromey.com>
12476
12477 * ui-out.h (ui_out_emit_type): New class.
12478 (ui_out_emit_tuple, ui_out_emit_list): New typedefs.
12479 * python/py-framefilter.c (py_print_single_arg): Use gdb::optional
12480 and ui_out_emit_tuple.
12481 (enumerate_locals): Likewise.
12482 (py_mi_print_variables, py_print_locals, py_print_args): Use
12483 ui_out_emit_list.
12484 (py_print_frame): Use gdb::optional, ui_out_emit_tuple,
12485 ui_out_emit_list.
12486 * common/gdb_optional.h: New file.
12487
f67f945c
MG
124882017-02-10 Martin Galvan <martingalvan@sourceware.org>
12489
12490 * MAINTAINERS (Write After Approval): Update my e-mail address.
12491
18da0c51
MG
124922017-02-10 Martin Galvan <martingalvan@sourceware.org>
12493
12494 PR gdb/21122
12495 * breakpoint.c (_initialize_breakpoint): Update the help description
12496 of the 'commands' command to indicate that it takes a list argument.
12497
62c14536
SM
124982017-02-09 Simon Marchi <simon.marchi@ericsson.com>
12499
12500 * interps.c (current_interp_set_logging): Remove "return".
12501
ff6fa247
GB
125022017-02-09 Gary Benson <gbenson@redhat.com>
12503
12504 * symtab.c (add_symtab_completions): Prevent NULL pointer
12505 dereference.
12506
a474bd8e
PA
125072017-02-08 Pedro Alves <palves@redhat.com>
12508
12509 * interps.c (interp::interp): Remove reference to quiet_p.
12510 (interp_set): Make static. Remove dead "Switching to" output
12511 code.
12512 (interp_quiet_p, interp_set_quiet): Delete.
12513 (interpreter_exec_cmd): Don't set the interpreter quiet.
12514 * interps.h (interp_quiet_p): Make static.
12515 (class interp) <quiet_p>: Remove field
12516
3d7b173c
JG
125172017-02-08 Jerome Guitton <guitton@adacore.com>
12518
604c4576
JG
12519 * cli/cli-decode.c (find_command_name_length): Make it extern.
12520 * cli/cli-decode.h (find_command_name_length): Declare.
12521 * cli/cli-script.c (command_name_equals, line_first_arg):
12522 New functions.
12523 (process_next_line): Use cli-decode to parse command names.
12524 (build_command_line): Make args a constant pointer.
12525
125262017-02-08 Jerome Guitton <guitton@adacore.com>
6dbb839a 12527
3d7b173c
JG
12528 * cli-decode.c (lookup_cmd_1, lookup_cmd_composition):
12529 Remove case-insensitive search.
12530
1291063d
JM
125312017-02-07 Jose E. Marchesi <jose.marchesi@oracle.com>
12532
12533 * sparc-tdep.c (sparc32_gdbarch_init): Do not place a + operator
12534 at the end of the line. Avoids an ARI warning.
12535
20b477a7
LM
125362017-02-06 Luis Machado <lgustavo@codesourcery.com>
12537
12538 * NEWS: Mention support for record/replay of Intel 64 rdrand and
12539 rdseed instructions.
12540 i386-tdep.c (i386_process_record): Handle Intel 64 rdrand and rseed.
12541
3f7b46f2
IR
125422017-02-06 Ivo Raisr <ivo.raisr@oracle.com>
12543
12544 PR tdep/20936
12545 Provide and use sparc32 and sparc64 target description XML files.
12546 * features/sparc/sparc32-cp0.xml, features/sparc/sparc32-cpu.xml,
12547 features/sparc/sparc32-fpu.xml: New files for sparc 32-bit.
12548 * features/sparc/sparc64-cp0.xml, features/sparc/sparc64-cpu.xml,
12549 features/sparc/sparc64-fpu.xml: New files for sparc 64-bit.
12550 * features/sparc/sparc32-solaris.xml: New file.
12551 * features/sparc/sparc64-solaris.xml: New file.
12552 * features/sparc/sparc32-solaris.c: Generated.
12553 * features/sparc/sparc64-solaris.c: Generated.
12554 * sparc-tdep.h: Account for differences in target descriptions.
12555 * sparc-tdep.c (sparc32_register_name): Use target provided registers.
12556 (sparc32_register_type): Use target provided registers.
12557 (validate_tdesc_registers): New function.
12558 (sparc32_gdbarch_init): Use tdesc_has_registers.
12559 Set pseudoregister functions.
12560 * sparc64-tdep.c (sparc64_register_name): Use target provided registers.
12561 (sparc64_register_type): Use target provided registers.
12562 (sparc64_init_abi): Set pseudoregister functions.
12563
f0fd41c1
TT
125642017-02-03 Tom Tromey <tom@tromey.com>
12565
12566 PR rust/21097:
12567 * rust-lang.c (rust_print_type) <TYPE_CODE_UNION>: Handle enums
12568 with a single member.
12569
d6f9b0fb
PA
125702017-02-03 Pedro Alves <palves@redhat.com>
12571
12572 * cli/cli-interp.c (cli_interp_base::cli_interp_base)
12573 (cli_interp_base::~cli_interp_base): New.
12574 (cli_interp): New struct.
12575 (as_cli_interp): Cast the interp itself to cli_interp.
12576 (cli_interpreter_pre_command_loop): Rename to ...
12577 (cli_interp_base::pre_command_loop): ... this. Remove 'self'
12578 parameter.
12579 (cli_interpreter_init): Rename to ...
12580 (cli_interp::init): ... this. Remove 'self' parameter. Use
12581 boolean. Make extern.
12582 (cli_interpreter_resume): Rename to ...
12583 (cli_interp::resume): ... this. Remove 'data' parameter. Make
12584 extern.
12585 (cli_interpreter_suspend): Rename to ...
12586 (cli_interp::suspend): ... this. Remove 'data' parameter. Make
12587 extern.
12588 (cli_interpreter_exec): Rename to ...
12589 (cli_interp::exec): ... this. Remove 'data' parameter. Make
12590 extern.
12591 (cli_interpreter_supports_command_editing): Rename to ...
12592 (cli_interp_base::supports_command_editing): ... this. Remove
12593 'interp' parameter. Make extern.
12594 (cli_ui_out): Rename to ...
12595 (cli_interp::interp_ui_out): ... this. Remove 'interp' parameter.
12596 Make extern.
12597 (cli_set_logging): Rename to ...
12598 (cli_interp_base::set_logging): ... this. Remove 'interp'
12599 parameter. Make extern.
12600 (cli_interp_procs): Delete.
12601 (cli_interp_factory): Adjust to use "new".
12602 * cli/cli-interp.h: Include "interps.h".
12603 (struct cli_interp_base): New struct.
12604 * interps.c (struct interp): Delete. Fields moved to interps.h.
12605 (interp_new): Delete.
12606 (interp::interp, interp::~interp): New.
12607 (interp_set): Use bool, and return void. Assume the interpreter
12608 has suspend, init and resume methods, and that the all return
12609 void.
12610 (set_top_level_interpreter): interp_set returns void.
12611 (interp_ui_out): Adapt.
12612 (current_interp_set_logging): Adapt.
12613 (interp_data): Delete.
12614 (interp_pre_command_loop, interp_supports_command_editing): Adapt.
12615 (interp_exec): Adapt.
12616 (top_level_interpreter_data): Delete.
12617 * interps.h (interp_init_ftype, interp_resume_ftype)
12618 (interp_suspend_ftype, interp_exec_ftype)
12619 (interp_pre_command_loop_ftype, interp_ui_out_ftype): Delete.
12620 (class interp): New.
12621 (interp_new): Delete.
12622 (interp_set): Now returns void. Use bool.
12623 (interp_data, top_level_interpreter_data): Delete.
12624 * mi/mi-common.h: Include interps.h.
12625 (class mi_interp): Inherit from interp. Define a ctor. Declare
12626 init, resume, suspect, exec, interp_ui_out, set_logging and
12627 pre_command_loop methods.
12628 * mi/mi-interp.c (as_mi_interp): Cast the interp itself.
12629 (mi_interpreter_init): Rename to ...
12630 (mi_interp::init): ... this. Remove the 'interp' parameter, use
12631 bool, return void and make extern. Adjust.
12632 (mi_interpreter_resume): ... Rename to ...
12633 (mi_interp::resume): ... this. Remove the 'data' parameter,
12634 return void and make extern. Adjust.
12635 (mi_interpreter_suspend): ... Rename to ...
12636 (mi_interp::suspend): ... this. Remove the 'data' parameter,
12637 return void and make extern. Adjust.
12638 (mi_interpreter_exec): ... Rename to ...
12639 (mi_interp::exec): ... this. Remove the 'data' parameter and make
12640 extern. Adjust.
12641 (mi_interpreter_pre_command_loop): ... Rename to ...
12642 (mi_interp::pre_command_loop): ... this. Remove the 'self'
12643 parameter and make extern.
12644 (mi_on_normal_stop_1): Adjust.
12645 (mi_ui_out): Rename to ...
12646 (mi_interp::interp_ui_out): ... this. Remove the 'interp'
12647 parameter and make extern. Adjust.
12648 (mi_set_logging): Rename to ...
12649 (mi_interp::set_logging): ... this. Remove the 'interp'
12650 parameter and make extern. Adjust.
12651 (mi_interp_procs): Delete.
12652 (mi_interp_factory): Adjust to use 'new'.
12653 * mi/mi-main.c (mi_cmd_gdb_exit, captured_mi_execute_command)
12654 (mi_print_exception, mi_execute_command, mi_load_progress):
12655 Adjust.
12656 * tui/tui-interp.c (tui_interp): New class.
12657 (as_tui_interp): Return a tui_interp pointer.
12658 (tui_on_normal_stop, tui_on_signal_received)
12659 (tui_on_end_stepping_range, tui_on_signal_exited, tui_on_exited)
12660 (tui_on_no_history, tui_on_user_selected_context_changed): Adjust
12661 to use interp::interp_ui_out.
12662 (tui_init): Rename to ...
12663 (tui_interp::init): ... this. Remove the 'self' parameter, use
12664 bool, return void and make extern. Adjust.
12665 (tui_resume): Rename to ...
12666 (tui_interp::resume): ... this. Remove the 'data' parameter,
12667 return void and make extern. Adjust.
12668 (tui_suspend): Rename to ...
12669 (tui_interp::suspend): ... this. Remove the 'data' parameter,
12670 return void and make extern. Adjust.
12671 (tui_ui_out): Rename to ...
12672 (tui_interp::interp_ui_out): ... this. Remove the 'self'
12673 parameter, and make extern. Adjust.
12674 (tui_exec): Rename to ...
12675 (tui_interp::exec): ... this. Remove the 'data' parameter and
12676 make extern.
12677 (tui_interp_procs): Delete.
12678 (tui_interp_factory): Use "new".
12679
65c40c95
TT
126802017-02-02 Tom Tromey <tom@tromey.com>
12681
12682 * rust-exp.y (ends_raw_string, space_then_number)
12683 (rust_identifier_start_p): Return bool.
12684 * rust-lang.c (rust_tuple_type_p, rust_underscore_fields)
12685 (rust_tuple_struct_type_p, rust_tuple_variant_type_p)
12686 (rust_slice_type_p, rust_range_type_p, rust_u8_type_p)
12687 (rust_chartype_p): Return bool.
12688 (val_print_struct, rust_print_struct_def, rust_print_type):
12689 Update.
12690 * rust-lang.h (rust_tuple_type_p, rust_tuple_struct_type_p):
12691 Return bool.
12692
b50f188d
TT
126932017-02-02 Tom Tromey <tom@tromey.com>
12694
12695 * rust-lang.c: Reindent.
12696
03c85b11
TT
126972017-02-02 Tom Tromey <tom@tromey.com>
12698
12699 * rust-lang.h (rust_crate_for_block): Update.
12700 * rust-lang.c (rust_crate_for_block): Return std::string.
12701 (rust_get_disr_info): Use std:;string, not
12702 gdb::unique_xmalloc_ptr.
12703 * rust-exp.y (crate_name): Update.
12704
9b6da501
PA
127052017-02-02 Pedro Alves <palves@redhat.com>
12706
12707 * disasm-selftests.c (print_one_insn_test): Move the "verbose"
12708 field out of gdb_disassembler_test and make it static.
12709
ec4cb20b
PA
127102017-02-02 Pedro Alves <palves@redhat.com>
12711
12712 * mi/mi-common.h (struct mi_interp): Delete the mi2_interp,
12713 mi1_interp and mi_interp fields.
12714
5be5dbf0
PA
127152017-02-02 Pedro Alves <palves@redhat.com>
12716
616268b6
PA
12717 * cli/cli-interp.c (struct saved_output_files, saved_output):
12718 Moved from cli/cli-logging.c.
12719 (cli_set_logging): New function.
12720 (cli_interp_procs): Install cli_set_logging.
12721 * cli/cli-interp.h (make_logging_output, cli_set_logging):
12722 Declare.
12723 * cli/cli-logging.c (struct saved_output_files, saved_output):
12724 Moved to cli/cli-interp.c.
12725 (pop_output_files): Don't save outputs here.
12726 (make_logging_output): New function.
12727 (handle_redirections): Don't build tee nor save previous outputs
12728 here.
12729 * interps.c (current_interp_set_logging): Change prototype.
12730 Assume there's always a set_logging_proc method installed.
12731 * interps.h (interp_set_logging_ftype): Change prototype.
12732 (current_interp_set_logging): Change prototype and adjust comment.
12733 * mi/mi-interp.c (mi_set_logging): Change protototype. Adjust to
12734 use make_logging_output.
12735 * tui/tui-interp.c (tui_interp_procs): Install cli_set_logging.
127362017-02-02 Pedro Alves <palves@redhat.com>
12737
5be5dbf0
PA
12738 * cli/cli-logging.c (maybe_warn_already_logging): New factored out
12739 from ...
12740 (set_logging_overwrite): ... here.
12741 (logging_no_redirect_file): Delete.
12742 (set_logging_redirect): Don't handle redirection on the fly.
12743 Instead warn that "logging off" / "logging on" is necessary.
12744 (pop_output_files): Delete references to logging_no_redirect_file.
12745 (show_logging_command): Always speak in terms of what will happen
12746 once logging is reenabled.
12747
c99cc448
PA
127482017-02-02 Pedro Alves <palves@redhat.com>
12749
12750 * disasm.h (gdb_pretty_print_disassembler): Tweak intro comment.
12751
8b172ce7
PA
127522017-02-02 Pedro Alves <palves@redhat.com>
12753
12754 * disasm.c (gdb_pretty_print_insn): Rename to ...
12755 (gdb_pretty_print_disassembler::pretty_print_insn): ... this.
12756 Remove gdbarch parameter. Adapt to clear the object's buffers
12757 instead of allocating new buffers, and to print using the object's
12758 gdb_disassembler instead of calling gdb_print_insn.
12759 (dump_insns): Use gdb_pretty_print_disassembler.
12760 * disasm.h (gdb_pretty_print_insn): Delete declaration.
12761 (gdb_pretty_print_disassembler): New class.
12762 * record-btrace.c (btrace_insn_history): Use
12763 gdb_pretty_print_disassembler.
12764
d7e74731
PA
127652017-02-02 Pedro Alves <palves@redhat.com>
12766
12767 * ada-lang.c (type_as_string): Use string_file.
12768 * ada-valprint.c (ada_print_floating): Use string_file.
12769 * ada-varobj.c (ada_varobj_scalar_image)
12770 (ada_varobj_get_value_image): Use string_file.
12771 * aix-thread.c (aix_thread_extra_thread_info): Use string_file.
12772 * arm-tdep.c (_initialize_arm_tdep): Use string_printf.
12773 * breakpoint.c (update_inserted_breakpoint_locations)
12774 (insert_breakpoint_locations, reattach_breakpoints)
12775 (print_breakpoint_location, print_one_detail_ranged_breakpoint)
12776 (print_it_watchpoint): Use string_file.
12777 (save_breakpoints): Use stdio_file.
12778 * c-exp.y (oper): Use string_file.
12779 * cli/cli-logging.c (set_logging_redirect): Use ui_file_up and
12780 tee_file.
12781 (pop_output_files): Use delete.
12782 (handle_redirections): Use stdio_file and tee_file.
12783 * cli/cli-setshow.c (do_show_command): Use string_file.
12784 * compile/compile-c-support.c (c_compute_program): Use
12785 string_file.
12786 * compile/compile-c-symbols.c (generate_vla_size): Take a
12787 'string_file &' instead of a 'ui_file *'.
12788 (generate_c_for_for_one_variable): Take a 'string_file &' instead
12789 of a 'ui_file *'. Use string_file.
12790 (generate_c_for_variable_locations): Take a 'string_file &'
12791 instead of a 'ui_file *'.
12792 * compile/compile-internal.h (generate_c_for_for_one_variable):
12793 Take a 'string_file &' instead of a 'ui_file *'.
12794 * compile/compile-loc2c.c (push, pushf, unary, binary)
12795 (print_label, pushf_register_address, pushf_register)
12796 (do_compile_dwarf_expr_to_c): Take a 'string_file &' instead of a
12797 'ui_file *'. Adjust.
12798 * compile/compile.c (compile_to_object): Use string_file.
12799 * compile/compile.h (compile_dwarf_expr_to_c)
12800 (compile_dwarf_bounds_to_c): Take a 'string_file &' instead of a
12801 'ui_file *'.
12802 * cp-support.c (inspect_type): Use string_file and obstack_copy0.
12803 (replace_typedefs_qualified_name): Use string_file and
12804 obstack_copy0.
12805 * disasm.c (gdb_pretty_print_insn): Use string_file.
12806 (gdb_disassembly): Adjust reference the null_stream global.
12807 (do_ui_file_delete): Delete.
12808 (gdb_insn_length): Use null_stream.
12809 * dummy-frame.c (maintenance_print_dummy_frames): Use stdio_file.
12810 * dwarf2loc.c (dwarf2_compile_property_to_c)
12811 (locexpr_generate_c_location, loclist_generate_c_location): Take a
12812 'string_file &' instead of a 'ui_file *'.
12813 * dwarf2loc.h (dwarf2_compile_property_to_c): Likewise.
12814 * dwarf2read.c (do_ui_file_peek_last): Delete.
12815 (dwarf2_compute_name): Use string_file.
12816 * event-top.c (gdb_setup_readline): Use stdio_file.
12817 * gdbarch.sh (verify_gdbarch): Use string_file.
12818 * gdbtypes.c (safe_parse_type): Use null_stream.
12819 * guile/scm-breakpoint.c (gdbscm_breakpoint_commands): Use
12820 string_file.
12821 * guile/scm-disasm.c (gdbscm_print_insn_from_port): Take a
12822 'string_file *' instead of a 'ui_file *'.
12823 (gdbscm_arch_disassemble): Use string_file.
12824 * guile/scm-frame.c (frscm_print_frame_smob): Use string_file.
12825 * guile/scm-ports.c (class ioscm_file_port): Now a class that
12826 inherits from ui_file.
12827 (ioscm_file_port_delete, ioscm_file_port_rewind)
12828 (ioscm_file_port_put): Delete.
12829 (ioscm_file_port_write): Rename to ...
12830 (ioscm_file_port::write): ... this. Remove file_port_magic
12831 checks.
12832 (ioscm_file_port_new): Delete.
12833 (ioscm_with_output_to_port_worker): Use ioscm_file_port and
12834 ui_file_up.
12835 * guile/scm-type.c (tyscm_type_name): Use string_file.
12836 * guile/scm-value.c (vlscm_print_value_smob, gdbscm_value_print):
12837 Use string_file.
12838 * infcmd.c (print_return_value_1): Use string_file.
12839 * infrun.c (print_target_wait_results): Use string_file.
12840 * language.c (add_language): Use string_file.
12841 * location.c (explicit_to_string_internal): Use string_file.
12842 * main.c (captured_main_1): Use null_file.
12843 * maint.c (maintenance_print_architecture): Use stdio_file.
12844 * mi/mi-cmd-stack.c (list_arg_or_local): Use string_file.
12845 * mi/mi-common.h (struct mi_interp) <out, err, log, targ,
12846 event_channel>: Change type to mi_console_file pointer.
12847 * mi/mi-console.c (mi_console_file_fputs, mi_console_file_flush)
12848 (mi_console_file_delete): Delete.
12849 (struct mi_console_file): Delete.
12850 (mi_console_file_magic): Delete.
12851 (mi_console_file_new): Delete.
12852 (mi_console_file::mi_console_file): New.
12853 (mi_console_file_delete): Delete.
12854 (mi_console_file_fputs): Delete.
12855 (mi_console_file::write): New.
12856 (mi_console_raw_packet): Delete.
12857 (mi_console_file::flush): New.
12858 (mi_console_file_flush): Delete.
12859 (mi_console_set_raw): Rename to ...
12860 (mi_console_file::set_raw): ... this.
12861 * mi/mi-console.h (class mi_console_file): New class.
12862 (mi_console_file_new, mi_console_set_raw): Delete.
12863 * mi/mi-interp.c (mi_interpreter_init): Use mi_console_file.
12864 (mi_set_logging): Use delete and tee_file. Adjust.
12865 * mi/mi-main.c (output_register): Use string_file.
12866 (mi_cmd_data_evaluate_expression): Use string_file.
12867 (mi_cmd_data_read_memory): Use string_file.
12868 (mi_cmd_execute, print_variable_or_computed): Use string_file.
12869 * mi/mi-out.c (mi_ui_out::main_stream): New.
12870 (mi_ui_out::rewind): Use main_stream and
12871 string_file.
12872 (mi_ui_out::put): Use main_stream and string_file.
12873 (mi_ui_out::mi_ui_out): Remove 'stream' parameter.
12874 Allocate a 'string_file' instead.
12875 (mi_out_new): Don't allocate a mem_fileopen stream here.
12876 * mi/mi-out.h (mi_ui_out::mi_ui_out): Remove 'stream' parameter.
12877 (mi_ui_out::main_stream): Declare method.
12878 * printcmd.c (eval_command): Use string_file.
12879 * psymtab.c (maintenance_print_psymbols): Use stdio_file.
12880 * python/py-arch.c (archpy_disassemble): Use string_file.
12881 * python/py-breakpoint.c (bppy_get_commands): Use string_file.
12882 * python/py-frame.c (frapy_str): Use string_file.
12883 * python/py-framefilter.c (py_print_type, py_print_single_arg):
12884 Use string_file.
12885 * python/py-type.c (typy_str): Use string_file.
12886 * python/py-unwind.c (unwind_infopy_str): Use string_file.
12887 * python/py-value.c (valpy_str): Use string_file.
12888 * record-btrace.c (btrace_insn_history): Use string_file.
12889 * regcache.c (regcache_print): Use stdio_file.
12890 * reggroups.c (maintenance_print_reggroups): Use stdio_file.
12891 * remote.c (escape_buffer): Use string_file.
12892 * rust-lang.c (rust_get_disr_info): Use string_file.
12893 * serial.c (serial_open_ops_1): Use stdio_file.
12894 (do_serial_close): Use delete.
12895 * stack.c (print_frame_arg): Use string_file.
12896 (print_frame_args): Remove local mem_fileopen stream, not used.
12897 (print_frame): Use string_file.
12898 * symmisc.c (maintenance_print_symbols): Use stdio_file.
12899 * symtab.h (struct symbol_computed_ops) <generate_c_location>:
12900 Take a 'string_file *' instead of a 'ui_file *'.
12901 * top.c (new_ui): Use stdio_file and stderr_file.
12902 (free_ui): Use delete.
12903 (execute_command_to_string): Use string_file.
12904 (quit_confirm): Use string_file.
12905 * tracepoint.c (collection_list::append_exp): Use string_file.
12906 * tui/tui-disasm.c (tui_disassemble): Use string_file.
12907 * tui/tui-file.c: Don't include "ui-file.h".
12908 (enum streamtype, struct tui_stream): Delete.
12909 (tui_file_new, tui_file_delete, tui_fileopen, tui_sfileopen)
12910 (tui_file_isatty, tui_file_rewind, tui_file_put): Delete.
12911 (tui_file::tui_file): New method.
12912 (tui_file_fputs): Delete.
12913 (tui_file_get_strbuf): Delete.
12914 (tui_file::puts): New method.
12915 (tui_file_adjust_strbuf): Delete.
12916 (tui_file_flush): Delete.
12917 (tui_file::flush): New method.
12918 * tui/tui-file.h: Tweak intro comment.
12919 Include ui-file.h.
12920 (tui_fileopen, tui_sfileopen, tui_file_get_strbuf)
12921 (tui_file_adjust_strbuf): Delete declarations.
12922 (class tui_file): New class.
12923 * tui/tui-io.c (tui_initialize_io): Use tui_file.
12924 * tui/tui-regs.c (tui_restore_gdbout): Use delete.
12925 (tui_register_format): Use string_stream.
12926 * tui/tui-stack.c (tui_make_status_line): Use string_file.
12927 (tui_get_function_from_frame): Use string_file.
12928 * typeprint.c (type_to_string): Use string_file.
12929 * ui-file.c (struct ui_file, ui_file_magic, ui_file_new): Delete.
12930 (null_stream): New global.
12931 (ui_file_delete): Delete.
12932 (ui_file::ui_file): New.
12933 (null_file_isatty): Delete.
12934 (ui_file::~ui_file): New.
12935 (null_file_rewind): Delete.
12936 (ui_file::printf): New.
12937 (null_file_put): Delete.
12938 (null_file_flush): Delete.
12939 (ui_file::putstr): New.
12940 (null_file_write): Delete.
12941 (ui_file::putstrn): New.
12942 (null_file_read): Delete.
12943 (ui_file::putc): New.
12944 (null_file_fputs): Delete.
12945 (null_file_write_async_safe): Delete.
12946 (ui_file::vprintf): New.
12947 (null_file_delete): Delete.
12948 (null_file::write): New.
12949 (null_file_fseek): Delete.
12950 (null_file::puts): New.
12951 (ui_file_data): Delete.
12952 (null_file::write_async_safe): New.
12953 (gdb_flush, ui_file_isatty): Adjust.
12954 (ui_file_put, ui_file_rewind): Delete.
12955 (ui_file_write): Adjust.
12956 (ui_file_write_for_put): Delete.
12957 (ui_file_write_async_safe, ui_file_read): Adjust.
12958 (ui_file_fseek): Delete.
12959 (fputs_unfiltered): Adjust.
12960 (set_ui_file_flush, set_ui_file_isatty, set_ui_file_rewind)
12961 (set_ui_file_put, set_ui_file_write, set_ui_file_write_async_safe)
12962 (set_ui_file_read, set_ui_file_fputs, set_ui_file_fseek)
12963 (set_ui_file_data): Delete.
12964 (string_file::~string_file, string_file::write)
12965 (struct accumulated_ui_file, do_ui_file_xstrdup, ui_file_xstrdup)
12966 (do_ui_file_as_string, ui_file_as_string): Delete.
12967 (do_ui_file_obsavestring, ui_file_obsavestring): Delete.
12968 (struct mem_file): Delete.
12969 (mem_file_new): Delete.
12970 (stdio_file::stdio_file): New.
12971 (mem_file_delete): Delete.
12972 (stdio_file::stdio_file): New.
12973 (mem_fileopen): Delete.
12974 (stdio_file::~stdio_file): New.
12975 (mem_file_rewind): Delete.
12976 (stdio_file::set_stream): New.
12977 (mem_file_put): Delete.
12978 (stdio_file::open): New.
12979 (mem_file_write): Delete.
12980 (stdio_file_magic, struct stdio_file): Delete.
12981 (stdio_file_new, stdio_file_delete, stdio_file_flush): Delete.
12982 (stdio_file::flush): New.
12983 (stdio_file_read): Rename to ...
12984 (stdio_file::read): ... this. Adjust.
12985 (stdio_file_write): Rename to ...
12986 (stdio_file::write): ... this. Adjust.
12987 (stdio_file_write_async_safe): Rename to ...
12988 (stdio_file::write_async_safe) ... this. Adjust.
12989 (stdio_file_fputs): Rename to ...
12990 (stdio_file::puts) ... this. Adjust.
12991 (stdio_file_isatty): Delete.
12992 (stdio_file_fseek): Delete.
12993 (stdio_file::isatty): New.
12994 (stderr_file_write): Rename to ...
12995 (stderr_file::write) ... this. Adjust.
12996 (stderr_file_fputs): Rename to ...
12997 (stderr_file::puts) ... this. Adjust.
12998 (stderr_fileopen, stdio_fileopen, gdb_fopen): Delete.
12999 (stderr_file::stderr_file): New.
13000 (tee_file_magic): Delete.
13001 (struct tee_file): Delete.
13002 (tee_file::tee_file): New.
13003 (tee_file_new): Delete.
13004 (tee_file::~tee_file): New.
13005 (tee_file_delete): Delete.
13006 (tee_file_flush): Rename to ...
13007 (tee_file::flush): ... this. Adjust.
13008 (tee_file_write): Rename to ...
13009 (tee_file::write): ... this. Adjust.
13010 (tee_file::write_async_safe): New.
13011 (tee_file_fputs): Rename to ...
13012 (tee_file::puts): ... this. Adjust.
13013 (tee_file_isatty): Rename to ...
13014 (tee_file::isatty): ... this. Adjust.
13015 * ui-file.h (struct obstack, struct ui_file): Don't
13016 forward-declare.
13017 (ui_file_new, ui_file_flush_ftype, set_ui_file_flush)
13018 (ui_file_write_ftype)
13019 (set_ui_file_write, ui_file_fputs_ftype, set_ui_file_fputs)
13020 (ui_file_write_async_safe_ftype, set_ui_file_write_async_safe)
13021 (ui_file_read_ftype, set_ui_file_read, ui_file_isatty_ftype)
13022 (set_ui_file_isatty, ui_file_rewind_ftype, set_ui_file_rewind)
13023 (ui_file_put_method_ftype, ui_file_put_ftype, set_ui_file_put)
13024 (ui_file_delete_ftype, set_ui_file_data, ui_file_fseek_ftype)
13025 (set_ui_file_fseek): Delete.
13026 (ui_file_data, ui_file_delete, ui_file_rewind)
13027 (struct ui_file): New.
13028 (ui_file_up): New.
13029 (class null_file): New.
13030 (null_stream): Declare.
13031 (ui_file_write_for_put, ui_file_put): Delete.
13032 (ui_file_xstrdup, ui_file_as_string, ui_file_obsavestring):
13033 Delete.
13034 (ui_file_fseek, mem_fileopen, stdio_fileopen, stderr_fileopen)
13035 (gdb_fopen, tee_file_new): Delete.
13036 (struct string_file): New.
13037 (struct stdio_file): New.
13038 (stdio_file_up): New.
13039 (struct stderr_file): New.
13040 (class tee_file): New.
13041 * ui-out.c (ui_out::field_stream): Take a 'string_file &' instead
13042 of a 'ui_file *'. Adjust.
13043 * ui-out.h (class ui_out) <field_stream>: Likewise.
13044 * utils.c (do_ui_file_delete, make_cleanup_ui_file_delete)
13045 (null_stream): Delete.
13046 (error_stream): Take a 'string_file &' instead of a 'ui_file *'.
13047 Adjust.
13048 * utils.h (struct ui_file): Delete forward declaration..
13049 (make_cleanup_ui_file_delete, null_stream): Delete declarations.
13050 (error_stream): Take a 'string_file &' instead of a
13051 'ui_file *'.
13052 * varobj.c (varobj_value_get_print_value): Use string_file.
13053 * xtensa-tdep.c (xtensa_verify_config): Use string_file.
13054 * gdbarch.c: Regenerate.
13055
187808b0
PA
130562017-02-02 Pedro Alves <palves@redhat.com>
13057
13058 * disasm.c (gdb_disassembler::pretty_print_insn): Rename to...
13059 (gdb_pretty_print_insn): ... this. Now a free function. Add back
13060 a 'gdbarch' parameter. Allocate a mem_fileopen stream here.
13061 Adjust to call gdb_print_insn instead of
13062 gdb_disassembler::print_insn.
13063 (dump_insns, do_mixed_source_and_assembly_deprecated)
13064 (do_mixed_source_and_assembly, do_assembly_only): Add back a
13065 'gdbarch' parameter. Remove gdb_disassembler parameter.
13066 (gdb_disassembly): Don't allocate a gdb_disassembler here.
13067 * disasm.h (gdb_disassembler::pretty_print_insn): Delete
13068 declaration.
13069 (gdb_pretty_print_insn): Re-add declaration.
13070 * record-btrace.c (btrace_insn_history): Don't allocate a
13071 gdb_disassembler here. Adjust to call gdb_pretty_print_insn.
13072
7a8eb317
SM
130732017-02-01 Simon Marchi <simon.marchi@polymtl.ca>
13074
13075 * disasm.h (gdb_disassembly): Remove file_string parameter.
13076 * disasm.c (gdb_disassembly): Likewise.
13077 * cli/cli-cmds.c (print_disassembly): Adapt.
13078 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Likewise.
13079 * stack.c (do_gdb_disassembly): Likewise.
13080
7346ef59
AA
130812017-02-01 Andreas Arnez <arnez@linux.vnet.ibm.com>
13082
13083 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): For
13084 DWARF_VALUE_LITERAL, no longer ignore the offset on big-endian
13085 targets. And if the implicit value is longer than needed, extract
13086 the first bytes instead of the "least significant" ones.
13087
cd4007e4
MM
130882017-02-01 Markus Metzger <markus.t.metzger@intel.com>
13089
13090 * btrace.c (btrace_enable): Do not call btrace_add_pc for
13091 BTRACE_FORMAT_PT or if can_access_registers_ptid returns false.
13092 (btrace_fetch): Assert can_access_registers_ptid.
13093 * record-btrace.c (require_btrace_thread, record_btrace_info): Call
13094 validate_registers_access.
13095
cf77c34e
MM
130962017-02-01 Markus Metzger <markus.t.metzger@intel.com>
13097
13098 * gdbthread.h (can_access_registers_ptid): New.
13099 * thread.c (can_access_registers_ptid): New.
13100
be85ce7d
PA
131012017-02-01 Pedro Alves <palves@redhat.com>
13102
13103 * i386-tdep.c (i386_fast_tracepoint_valid_at): Use gdb_insn_length.
13104
29b0b251
PA
131052017-01-31 Pedro Alves <palves@redhat.com>
13106
13107 * mi/mi-interp.c (mi_breakpoint_created, mi_breakpoint_modified):
13108 Fix typos.
13109
289b5b24
PA
131102017-01-31 Pedro Alves <palves@redhat.com>
13111
13112 * stack.c (print_frame_args): Remove local mem_fileopen stream,
13113 not used.
13114
b47413b4
PA
131152017-01-31 Pedro Alves <palves@redhat.com>
13116
13117 * varobj.c (varobj_value_get_print_value): Remove xstrdup call.
13118
60adb36c
PA
131192017-01-31 Pedro Alves <palves@redhat.com>
13120
13121 * common/scoped_restore.h
13122 (scoped_restore_tmpl::scoped_restore_tmpl): Template on T2, and
13123 change the value's parameter type to T2.
13124 (make_scoped_restore): Likewise.
13125
2735833d
WT
131262017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
13127 Richard Henderson <rth@redhat.com>
13128
13129 * amd64-linux-nat.c (PTRACE_ARCH_PRCTL): New define.
13130 (amd64_linux_fetch_inferior_registers): Add case to fetch FS_BASE
13131 GS_BASE for older kernels.
13132 (amd64_linux_store_inferior_registers): Add case to store FS_BASE
13133 GS_BASE for older kernels.
13134 * amd64-linux-tdep.c (amd64_linux_gregset_reg_offset): Add FS_BASE
13135 and GS_BASE to the offset table.
13136 (amd64_linux_register_reggroup_p): Add FS_BASE and GS_BASE to the
13137 system register group.
13138 * amd64-nat.c (amd64_native_gregset_reg_offset): Implements case
13139 for older kernels.
13140 * amd64-tdep.c (amd64_init_abi): Add segment registers for the
13141 amd64 ABI.
13142 * amd64-tdep.h (amd64_regnum): Add AMD64_FSBASE_REGNUM and
13143 AMD64_GSBASE_REGNUM.
13144 (AMD64_NUM_REGS): Set to AMD64_GSBASE_REGNUM + 1.
13145 * features/Makefile (amd64-linux.dat, amd64-avx-linux.dat)
13146 (amd64-mpx-linux.dat, amd64-avx512-linux.dat, x32-linux.dat)
13147 (x32-avx-linux.dat, x32-avx512-linux.dat): Add
13148 i386/64bit-segments.xml in those rules.
13149 * features/i386/64bit-segments.xml: New file.
13150 * features/i386/amd64-avx-mpx-linux.xml: Add 64bit-segments.xml.
13151 * features/i386/amd64-avx-linux.xml: Add 64bit-segments.xml.
13152 * features/i386/amd64-avx512-linux.xml: Add 64bit-segments.xml.
13153 * features/i386/amd64-mpx-linux.xml: Add 64bit-segments.xml.
13154 * features/i386/x32-avx512-linux.xml: Add 64bit-segments.xml.
13155 * features/i386/x32-avx-linux.xml: Add 64bit-segments.xml.
13156 * features/i386/amd64-linux.xml: Add 64bit-segments.xml.
13157 * features/i386/amd64-avx-linux.c: Regenerated.
13158 * features/i386/amd64-avx-mpx-linux.c: Regenerated.
13159 * features/i386/amd64-avx-mpx.c: Regenerated.
13160 * features/i386/amd64-avx512-linux.c: Regenerated.
13161 * features/i386/amd64-linux.c: Regenerated.
13162 * features/i386/amd64-mpx-linux.c: Regenerated.
13163 * features/i386/i386-avx-mpx-linux.c: Regenerated.
13164 * features/i386/i386-avx-mpx.c: Regenerated.
13165 * features/i386/x32-avx-linux.c: Regenerated.
13166 * features/i386/x32-avx512-linux.c: Regenerated.
13167 * regformats/i386/amd64-avx-linux.dat: Regenerated.
13168 * regformats/i386/amd64-avx-mpx-linux.dat: Regenerated.
13169 * regformats/i386/amd64-avx512-linux.dat: Regenerated.
13170 * regformats/i386/amd64-linux.dat: Regenerated.
13171 * regformats/i386/amd64-mpx-linux.dat: Regenerated.
13172 * regformats/i386/x32-avx-linux.dat: Regenerated.
13173 * regformats/i386/x32-avx512-linux.dat: Regenerated.
13174 * regformats/i386/x32-linux.dat: Regenerated.
13175
8884e97e
WT
131762017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
13177
13178 * amd64-linux-tdep.h (AMD64_LINUX_ORIG_RAX_REGNUM):
13179 Set to AMD64_NUM_REGS.
13180
7005d26a
WT
131812017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
13182
13183 * amd64-nat.c (amd64_native_gregset_reg_offset): Simplify logic
13184 that checks validity of a register number.
13185
4bd2e1b2
KC
131862017-01-27 Kees Cook <keescook@google.com>
13187
13188 * gdb/arm-linux-nat.c (arm_linux_fetch_inferior_registers): Call
13189 fetch_fpregs if target has fpa registers.
13190 (arm_linux_store_inferior_registers): Call store_fpregs if target
13191 has fpa registers.
13192
7cf1de6c
AA
131932017-01-26 Andreas Arnez <arnez@linux.vnet.ibm.com>
13194
13195 * cris-tdep.c (cris_gdbarch_init): Remove check for
13196 info.byte_order and force it to BFD_ENDIAN_LITTLE.
13197
874a1c8c
AT
131982017-01-26 Antoine Tremblay <antoine.tremblay@ericsson.com>
13199
13200 * corelow.c (get_core_register_section): Check for regset
13201 existence before checking for REGSET_VARIABLE_SIZE.
13202
d8b49cf0
YQ
132032017-01-26 Yao Qi <yao.qi@linaro.org>
13204 Pedro Alves <palves@redhat.com>
13205
13206 PR gdb/20939
13207 * disasm.c (gdb_disassembler::dis_asm_memory_error): Don't
13208 call memory_error, save memaddr instead.
13209 (gdb_disassembler::print_insn): If gdbarch_print_insn returns
13210 negative, cal memory_error.
13211 * disasm.h (gdb_disassembler) <m_err_memaddr>: New field.
13212
658ca58c
YQ
132132017-01-26 Yao Qi <yao.qi@linaro.org>
13214
13215 * disasm-selftests.c (memory_error_test): New function.
13216 (_initialize_disasm_selftests): Register memory_error_test.
13217
79843d45
YQ
132182017-01-26 Yao Qi <yao.qi@linaro.org>
13219
13220 * Makefile.in (SFILES): Add disasm-selftests.c and
13221 selftest-arch.c.
13222 (COMMON_OBS): Add disasm-selftests.o and selftest-arch.o.
13223 * disasm-selftests.c: New file.
13224 * selftest-arch.c: New file.
13225 * selftest-arch.h: New file.
13226
8cafda32
YQ
132272017-01-26 Yao Qi <yao.qi@linaro.org>
13228
13229 * mep-tdep.c (mep_gdb_print_insn): Set info->arch
13230 to bfd_arch_mep. Don't return 0 if section is not
13231 found. Call print_insn_mep.
13232
e47ad6c0
YQ
132332017-01-26 Pedro Alves <palves@redhat.com>
13234 Yao Qi <yao.qi@linaro.org>
13235
13236 * arm-tdep.c: Include "disasm.h".
13237 (gdb_print_insn_arm): Update code to get gdbarch.
13238 * disasm.c (dis_asm_read_memory): Change it to
13239 gdb_disassembler::dis_asm_read_memory.
13240 (dis_asm_memory_error): Likewise.
13241 (dis_asm_print_address): Likewise.
13242 (gdb_pretty_print_insn): Change it to
13243 gdb_disassembler::pretty_print_insn.
13244 (dump_insns): Add one argument gdb_disassemlber. All
13245 callers updated.
13246 (do_mixed_source_and_assembly_deprecated): Likewise.
13247 (do_mixed_source_and_assembly): Likewise.
13248 (do_assembly_only): Likewise.
13249 (gdb_disassembler::gdb_disassembler): New.
13250 (gdb_disassembler::print_insn): New.
13251 * disasm.h (class gdb_disassembler): New.
13252 (gdb_pretty_print_insn): Remove declaration.
13253 (gdb_disassemble_info): Likewise.
13254 * guile/scm-disasm.c (class gdbscm_disassembler): New.
13255 (gdbscm_disasm_read_memory_worker): Update.
13256 (gdbscm_disasm_read_memory): Update.
13257 (gdbscm_disasm_memory_error): Remove.
13258 (gdbscm_disasm_print_address): Remove.
13259 (gdbscm_disassembler::gdbscm_disassembler): New.
13260 (gdbscm_print_insn_from_port): Update.
13261 * mips-tdep.c: Include disasm.h.
13262 (gdb_print_insn_mips): Update code to get gdbarch.
13263 * record-btrace.c (btrace_insn_history): Update.
13264 * spu-tdep.c: Include disasm.h.
13265 (struct spu_dis_asm_data): Remove.
13266 (struct spu_dis_asm_info): New.
13267 (spu_dis_asm_print_address): Use spu_dis_asm_info to get
13268 SPU id.
13269 (gdb_print_insn_spu): Cast disassemble_info to
13270 spu_dis_asm_info.
13271
80d75874
YQ
132722017-01-26 Yao Qi <yao.qi@linaro.org>
13273
13274 * disasm.c (do_ui_file_delete): Delete.
13275 (gdb_insn_length): Move code creating stream to ...
13276 * utils.c (null_stream): ... here. New function.
13277 * utils.h (null_stream): Declare.
13278
60685cd0
SM
132792017-01-23 Simon Marchi <simon.marchi@polymtl.ca>
13280
13281 * python/py-inferior.c (find_thread_object): Return directly
13282 from the loop. Remove "found" variable.
13283
eb1cdb62
JB
132842017-01-21 Joel Brobecker <brobecker@adacore.com>
13285
13286 GDB 7.12.1 released.
13287
b1ce6568
SM
132882017-01-20 Simon Marchi <simon.marchi@ericsson.com>
13289
13290 * python/py-function.c (fnpy_call): Reorder declarations to have
13291 the gdbpy_enter object declared first.
13292 * python/py-xmethods.c (gdbpy_get_xmethod_arg_types): Likewise.
13293
6f8b0407
SM
132942017-01-20 Simon Marchi <simon.marchi@ericsson.com>
13295
fec93fb1 13296 PR python/21068
6f8b0407
SM
13297 * python/python-internal.h (PyMem_RawMalloc): Define for
13298 Python < 3.4.
13299 * python/py-gdb-readline.c (gdbpy_readline_wrapper): Use
13300 PyMem_RawMalloc instead of PyMem_Malloc.
13301
78cbbba8
LM
133022017-01-20 Mike Wrighton <mike_wrighton@codesourcery.com>
13303 Luis Machado <lgustavo@codesourcery.com>
13304
13305 * NEWS (New commands): Mention flash-erase.
13306 (New MI commands): Mention target-flash-erase.
13307 * mi/mi-cmds.c (mi_cmd_target_flash_erase): Add target-flash-erase MI
13308 command.
13309 * mi/mi-cmds.h (mi_cmd_target_flash_erase): New declaration.
13310 * mi/mi-main.c (mi_cmd_target_flash_erase): New function.
13311 * target.c (flash_erase_command): New function.
13312 (initialize_targets): Add new flash-erase command.
13313 * target.h (flash_erase_command): New declaration.
13314
2132fe85
JB
133152017-01-20 Joel Brobecker <brobecker@adacore.com>
13316
13317 * nat/linux-ptrace.c: Only include <sys/procfs.h> if
13318 HAVE_SYS_PROCFS_H is defined.
13319
d1dff226
AH
133202017-01-18 Alan Hayward <alan.hayward@arm.com>
13321
13322 * remote.c (struct cached_reg): Change data into a pointer.
13323 * (stop_reply_dtr): Free data pointers before deleting vector.
13324 (process_stop_reply): Likewise.
13325 (remote_parse_stop_reply): Allocate space for data
13326
9890e433
AH
133272017-01-18 Alan Hayward <alan.hayward@arm.com>
13328
13329 * amd64-tdep.c (amd64_pseudo_register_read_value): remove
13330 MAX_REGISTER_SIZE.
13331 (amd64_pseudo_register_read_value): Likewise.
13332 * remote.c (fetch_register_using_p): Remove MAX_REGISTER_SIZE.
13333 (store_register_using_P): Likewise.
13334 * regcache.c (regcache_xfer_part): Likewise.
13335
7a36499a
IR
133362017-01-16 Ivo Raisr <ivo.raisr@oracle.com>
13337
13338 Split real and pseudo registers.
13339 * sparc-tdep.h (SPARC_CORE_REGISTERS): New macro.
13340 (sparc32_pseudo_regnum): New enum.
13341 * sparc64-tdep.h (sparc64_pseudo_regnum): New enum.
13342 * sparc-tdep.c (SPARC32_FPU_REGISTERS): New macro.
13343 (SPARC32_CP0_REGISTERS): New macro.
13344 (sparc32_pseudo_register_name): New function.
13345 (sparc32_register_name): Use sparc32_pseudo_register_name.
13346 (sparc32_pseudo_register_type): New function.
13347 (sparc32_register_type): Use sparc32_pseudo_register_type.
13348 (sparc32_pseudo_register_read, sparc32_pseudo_register_write): Handle
13349 pseudo register numbers.
13350 * sparc64-tdep.c SPARC64_FPU_REGISTERS): New macro.
13351 (SPARC64_CP0_REGISTERS): New macro.
13352 (sparc64_pseudo_register_name): New function.
13353 (sparc64_register_name): Use sparc64_pseudo_register_name.
13354 (sparc64_pseudo_register_type): New function.
13355 (sparc64_register_type): Use sparc64_pseudo_register_type.
13356 (sparc64_pseudo_register_read, sparc64_pseudo_register_write): Handle
13357 pseudo register numbers.
13358 (sparc64_store_floating_fields, sparc64_extract_floating_fields,
13359 sparc64_store_arguments): Handle pseudo register numbers.
13360
6f8976bf
YQ
133612017-01-13 Yao Qi <yao.qi@linaro.org>
13362
13363 * remote.c (REMOTE_DEBUG_MAX_CHAR): New macro.
13364 (putpkt_binary): Print only REMOTE_DEBUG_MAX_CHAR chars in debug
13365 output.
13366 (getpkt_or_notif_sane_1): Likewise.
13367
e4241ace
YQ
133682017-01-13 Yao Qi <yao.qi@linaro.org>
13369
13370 * Makefile.in (checker-headers): Use CXX and CXX_DIALET instead
13371 of CC. Pass "-x c++-header" instead of "-x c".
13372
3015c064
SM
133732017-01-12 Simon Marchi <simon.marchi@ericsson.com>
13374
13375 * remote.c (remote_can_async_p): Update comment.
13376
fde1b17d
SM
133772017-01-12 Simon Marchi <simon.marchi@ericsson.com>
13378
13379 * linux-nat.c (linux_nat_can_async_p): Update comment.
13380
ca1ca08b
SM
133812017-01-12 Simon Marchi <simon.marchi@ericsson.com>
13382
13383 * serial.c (serial_open): Forget about "pc" and "lpt" serial interface.
13384
4ad2da73
SM
133852017-01-11 Simon Marchi <simon.marchi@ericsson.com>
13386
13387 * cli/cli-decode.c (lookup_cmd_1): Fix typo in comment.
13388
c8b23b3f
TT
133892017-01-10 Tom Tromey <tom@tromey.com>
13390
13391 * python/py-type.c (typy_legacy_template_argument): Update.
13392 * cp-support.h (struct demangle_parse_info) (demangle_parse_info,
13393 ~demangle_parse_info): Declare new members.
13394 (cp_demangled_name_to_comp): Return unique_ptr.
13395 (cp_demangled_name_parse_free)
13396 (make_cleanup_cp_demangled_name_parse_free)
13397 (cp_new_demangle_parse_info): Remove.
13398 * cp-support.c (do_demangled_name_parse_free_cleanup)
13399 (make_cleanup_cp_demangled_name_parse_free): Remove.
13400 (inspect_type, cp_canonicalize_string_full)
13401 (cp_canonicalize_string): Update.
13402 (mangled_name_to_comp): Change return type.
13403 (cp_class_name_from_physname, method_name_from_physname)
13404 (cp_func_name, cp_remove_params): Update.
13405 * cp-name-parser.y (demangle_parse_info): New constructor, from
13406 cp_new_demangle_parse_info.
13407 (~demangle_parse_info): New destructor, from
13408 cp_demangled_name_parse_free.
13409 (cp_merge_demangle_parse_infos): Update.
13410 (cp_demangled_name_to_comp): Change return type.
13411
1ac32117
TT
134122017-01-10 Tom Tromey <tom@tromey.com>
13413
13414 * top.c (prevent_dont_repeat): Change return type.
13415 * python/python.c (execute_gdb_command): Use std::string.
13416 Update.
13417 * guile/guile.c (gdbscm_execute_gdb_command): Update.
13418 * command.h (prevent_dont_repeat): Change return type.
13419 * breakpoint.c (bpstat_do_actions_1): Update.
13420
0cf08227
TT
134212017-01-10 Tom Tromey <tom@tromey.com>
13422
13423 * value.h (scoped_value_mark::~scoped_value_mark): Call
13424 free_to_mark.
13425 (scoped_value_mark::free_to_mark): New method.
13426 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Use
13427 scoped_value_mark.
13428
eb115069
TT
134292017-01-10 Tom Tromey <tom@tromey.com>
13430
13431 * python/py-value.c (valpy_dereference, valpy_referenced_value)
13432 (valpy_reference_value, valpy_const_value, valpy_get_address)
13433 (valpy_get_dynamic_type, valpy_lazy_string, valpy_do_cast)
13434 (valpy_getitem, valpy_call, valpy_binop_throw, valpy_negative)
13435 (valpy_absolute, valpy_richcompare_throw): Use scoped_value_mark.
13436 * dwarf2loc.c (dwarf2_loc_desc_get_symbol_read_needs): Use
13437 scoped_value_mark.
13438 * dwarf2-frame.c (execute_stack_op): Use scoped_value_mark.
13439 * value.h (scoped_value_mark): New class.
13440
906768f9
TT
134412017-01-10 Tom Tromey <tom@tromey.com>
13442
13443 * dwarf2read.c (dwarf2_build_psymtabs): Use psymtab_discarder.
13444 * psympriv.h (make_cleanup_discard_psymtabs): Don't declare.
13445 * psymtab.c (discard_psymtabs_upto): Remove.
13446 (make_cleanup_discard_psymtabs): Remove.
13447 (struct psymtab_state): Remove.
13448
bef155c3
TT
134492017-01-10 Tom Tromey <tom@tromey.com>
13450
13451 * record-full.c (record_full_save_cleanups): Remove.
13452 (record_full_save): Use gdb::unlinker.
13453 * gcore.c (do_bfd_delete_cleanup): Remove.
13454 (gcore_command): Use gdb::unlinker, unique_xmalloc_ptr. Remove
13455 cleanups.
13456 * dwarf2read.c (unlink_if_set): Remove.
13457 (write_psymtabs_to_index): Use gdb::unlinker.
13458 * common/gdb_unlinker.h: New file.
13459
192b62ce
TT
134602017-01-10 Tom Tromey <tom@tromey.com>
13461
13462 * windows-tdep.c (windows_xfer_shared_library): Update.
13463 * windows-nat.c (windows_make_so): Update.
13464 * utils.h (make_cleanup_bfd_unref): Remove.
13465 * utils.c (do_bfd_close_cleanup, make_cleanup_bfd_unref): Remove.
13466 * symfile.h (symfile_bfd_open)
13467 (find_separate_debug_file_in_section): Return gdb_bfd_ref_ptr.
13468 * symfile.c (read_symbols, symbol_file_add)
13469 (separate_debug_file_exists): Update.
13470 (symfile_bfd_open): Return gdb_bfd_ref_ptr.
13471 (generic_load, reread_symbols): Update.
13472 * symfile-mem.c (symbol_file_add_from_memory): Update.
13473 * spu-linux-nat.c (spu_bfd_open): Return gdb_bfd_ref_ptr.
13474 (spu_symbol_file_add_from_memory): Update.
13475 * solist.h (struct target_so_ops) <bfd_open>: Return
13476 gdb_bfd_ref_ptr.
13477 (solib_bfd_fopen, solib_bfd_open): Return gdb_bfd_ref_ptr.
13478 * solib.c (solib_bfd_fopen, solib_bfd_open): Return
13479 gdb_bfd_ref_ptr.
13480 (solib_map_sections, reload_shared_libraries_1): Update.
13481 * solib-svr4.c (enable_break): Update.
13482 * solib-spu.c (spu_bfd_fopen): Return gdb_bfd_ref_ptr.
13483 * solib-frv.c (enable_break2): Update.
13484 * solib-dsbt.c (enable_break): Update.
13485 * solib-darwin.c (gdb_bfd_mach_o_fat_extract): Return
13486 gdb_bfd_ref_ptr.
13487 (darwin_solib_get_all_image_info_addr_at_init): Update.
13488 (darwin_bfd_open): Return gdb_bfd_ref_ptr.
13489 * solib-aix.c (solib_aix_bfd_open): Return gdb_bfd_ref_ptr.
13490 * record-full.c (record_full_save): Update.
13491 * python/py-objfile.c (objfpy_add_separate_debug_file): Update.
13492 * procfs.c (insert_dbx_link_bpt_in_file): Update.
13493 * minidebug.c (find_separate_debug_file_in_section): Return
13494 gdb_bfd_ref_ptr.
13495 * machoread.c (macho_add_oso_symfile): Change abfd to
13496 gdb_bfd_ref_ptr.
13497 (macho_symfile_read_all_oso): Update.
13498 (macho_check_dsym): Return gdb_bfd_ref_ptr.
13499 (macho_symfile_read): Update.
13500 * jit.c (bfd_open_from_target_memory): Return gdb_bfd_ref_ptr.
13501 (jit_bfd_try_read_symtab): Update.
13502 * gdb_bfd.h (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
13503 (gdb_bfd_openw, gdb_bfd_openr_iovec)
13504 (gdb_bfd_openr_next_archived_file, gdb_bfd_fdopenr): Return
13505 gdb_bfd_ref_ptr.
13506 (gdb_bfd_ref_policy): New struct.
13507 (gdb_bfd_ref_ptr): New typedef.
13508 * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
13509 (gdb_bfd_openw, gdb_bfd_openr_iovec)
13510 (gdb_bfd_openr_next_archived_file, gdb_bfd_fdopenr): Return
13511 gdb_bfd_ref_ptr.
13512 * gcore.h (create_gcore_bfd): Return gdb_bfd_ref_ptr.
13513 * gcore.c (create_gcore_bfd): Return gdb_bfd_ref_ptr.
13514 (gcore_command): Update.
13515 * exec.c (exec_file_attach): Update.
13516 * elfread.c (elf_symfile_read): Update.
13517 * dwarf2read.c (dwarf2_get_dwz_file): Update.
13518 (try_open_dwop_file, open_dwo_file): Return gdb_bfd_ref_ptr.
13519 (open_and_init_dwo_file): Update.
13520 (open_dwp_file): Return gdb_bfd_ref_ptr.
13521 (open_and_init_dwp_file): Update.
13522 * corelow.c (core_open): Update.
13523 * compile/compile-object-load.c (compile_object_load): Update.
13524 * common/gdb_ref_ptr.h (ref_ptr::operator->): New operator.
13525 * coffread.c (coff_symfile_read): Update.
13526 * cli/cli-dump.c (bfd_openr_or_error, bfd_openw_or_error): Return
13527 gdb_bfd_ref_ptr. Rename.
13528 (dump_bfd_file, restore_command): Update.
13529 * build-id.h (build_id_to_debug_bfd): Return gdb_bfd_ref_ptr.
13530 * build-id.c (build_id_to_debug_bfd): Return gdb_bfd_ref_ptr.
13531 (find_separate_debug_file_by_buildid): Update.
13532
50315b21
TT
135332017-01-10 Tom Tromey <tom@tromey.com>
13534
13535 * common/gdb_ref_ptr.h: New file.
13536 * python/py-ref.h (struct gdbpy_ref_policy): New.
13537 (gdbpy_ref): Now a typedef.
13538
fc4007c9
TT
135392017-01-10 Tom Tromey <tom@tromey.com>
13540
13541 * utils.h (make_cleanup_htab_delete): Don't declare.
13542 * utils.c (do_htab_delete_cleanup, make_cleanup_htab_delete):
13543 Remove.
13544 * linespec.c (decode_compound_collector): Add constructor,
13545 destructor.
13546 (lookup_prefix_sym): Remove cleanup.
13547 (symtab_collector): Add constructor, destructor.
13548 (collect_symtabs_from_filename): Remove cleanup.
13549 * disasm.c (do_mixed_source_and_assembly): Use htab_up.
13550 * compile/compile-c-symbols.c (generate_c_for_variable_locations):
13551 Use htab_up.
13552 * gnu-v3-abi.c (gnuv3_print_vtable): Use htab_up.
13553 * dwarf2read.c (dw2_expand_symtabs_matching)
13554 (dw2_map_symbol_filenames, dwarf_decode_macros)
13555 (write_psymtabs_to_index): Use htab_up.
13556 * dwarf2loc.c (func_verify_no_selftailcall)
13557 (call_site_find_chain_1, func_verify_no_selftailcall)
13558 (chain_candidate, call_site_find_chain_1): Use std::unordered_set,
13559 std::vector, gdb::unique_xmalloc_ptr.
13560 (call_sitep): Remove typedef.
13561 (dwarf2_locexpr_baton_eval): Remove unused variable.
13562
8dbcee67
TT
135632017-01-10 Tom Tromey <tom@tromey.com>
13564
13565 * python/python-internal.h (make_cleanup_py_decref)
13566 (make_cleanup_py_xdecref): Don't declare.
13567 * python/py-utils.c (py_decref, make_cleanup_py_decref)
13568 (py_xdecref, make_cleanup_py_xdecref): Remove.
13569
13df46cc
TT
135702017-01-10 Tom Tromey <tom@tromey.com>
13571
13572 * python/py-framefilter.c (py_mi_print_variables): Use gdbpy_ref.
13573 (py_print_locals, enumerate_locals, py_print_args): Use gdbpy_ref.
13574
06fc9bf7
TT
135752017-01-10 Tom Tromey <tom@tromey.com>
13576
13577 * python/py-framefilter.c (enumerate_args): Use gdbpy_ref.
13578
830a4934
TT
135792017-01-10 Tom Tromey <tom@tromey.com>
13580
13581 * python/py-utils.c (unicode_to_encoded_string)
13582 (python_string_to_target_string)
13583 (python_string_to_target_python_string)
13584 (python_string_to_host_string, gdbpy_obj_to_string)
13585 (get_addr_from_python): Use gdbpy_ref.
13586
4586d543
TT
135872017-01-10 Tom Tromey <tom@tromey.com>
13588
13589 * python/py-unwind.c (pyuw_object_attribute_to_pointer): Use
13590 gdbpy_ref.
13591
59876f8f
TT
135922017-01-10 Tom Tromey <tom@tromey.com>
13593
13594 * python/python.c (eval_python_command, gdbpy_decode_line)
13595 (gdbpy_run_events, gdbpy_start_type_printers)
13596 (gdbpy_apply_type_printers): Use gdbpy_ref.
13597
97d83487
TT
135982017-01-10 Tom Tromey <tom@tromey.com>
13599
13600 * python/py-param.c (get_doc_string, compute_enum_values): Use
13601 gdbpy_ref.
13602
9205649a
TT
136032017-01-10 Tom Tromey <tom@tromey.com>
13604
13605 * python/py-inferior.c (find_thread_object, build_inferior_list):
13606 Use gdbpy_ref.
13607
74c49d45
TT
136082017-01-10 Tom Tromey <tom@tromey.com>
13609
13610 * python/py-framefilter.c (py_print_frame): Use gdbpy_ref.
13611
16361ffb
TT
136122017-01-10 Tom Tromey <tom@tromey.com>
13613
13614 * python/py-finishbreakpoint.c (bpfinishpy_out_of_scope): Use
13615 gdbpy_ref.
13616
905f2cca
TT
136172017-01-10 Tom Tromey <tom@tromey.com>
13618
13619 * python/py-cmd.c (cmdpy_completer_helper): Use gdbpy_ref. Remove
13620 extra incref.
13621 (cmdpy_completer_handle_brkchars, cmdpy_completer, cmdpy_init):
13622 Use gdbpy_ref.
13623
64081434
TT
136242017-01-10 Tom Tromey <tom@tromey.com>
13625
13626 * python/py-breakpoint.c (gdbpy_breakpoint_cond_says_stop): Use
13627 gdbpy_ref.
13628
59e9e831
TT
136292017-01-10 Tom Tromey <tom@tromey.com>
13630
13631 * python/py-arch.c (archpy_disassemble): Use gdbpy_ref. Don't
13632 decref results of PyArg_ParseTupleAndKeywords.
13633
9de10f6d
TT
136342017-01-10 Tom Tromey <tom@tromey.com>
13635
13636 * python/python.c (python_run_simple_file): Use
13637 unique_xmalloc_ptr, gdbpy_ref.
13638
2bd5759d
TT
136392017-01-10 Tom Tromey <tom@tromey.com>
13640
13641 * python/py-prettyprint.c (print_stack_unless_memory_error)
13642 (print_string_repr, print_children): Use gdbpy_ref.
13643 (dummy_python_frame): New class.
13644 (dummy_python_frame::dummy_python_frame): Rename from
13645 push_dummy_python_frame.
13646 (py_restore_tstate): Remove.
13647
3b4e0e01
TT
136482017-01-10 Tom Tromey <tom@tromey.com>
13649
13650 * python/py-framefilter.c (py_print_frame): Use gdbpy_ref.
13651
17a22718
TT
136522017-01-10 Tom Tromey <tom@tromey.com>
13653
13654 * python/python.c (ensure_python_env, restore_python_env):
13655 Remove.
13656 * python/python-internal.h (ensure_python_env): Don't declare.
13657 * varobj.h (varobj_ensure_python_env): Don't declare.
13658 * varobj.c (varobj_ensure_python_env): Remove.
13659
68cdc557
TT
136602017-01-10 Tom Tromey <tom@tromey.com>
13661
13662 * varobj.c (varobj_value_get_print_value): Use
13663 gdbpy_enter_varobj.
13664
1eba6383
TT
136652017-01-10 Tom Tromey <tom@tromey.com>
13666
13667 * python/py-prettyprint.c (print_string_repr, print_children):
13668 Update.
13669 * python/py-lazy-string.c (gdbpy_extract_lazy_string): Change type
13670 of "encoding".
13671 * varobj.c (varobj_value_get_print_value): Update.
13672 * python/python-internal.h (gdbpy_extract_lazy_string): Update.
13673
bde7b3e3
TT
136742017-01-10 Tom Tromey <tom@tromey.com>
13675
13676 * varobj.c (varobj_get_display_hint)
13677 (dynamic_varobj_has_child_method, install_new_value_visualizer)
13678 (varobj_set_visualizer, free_variable): Use
13679 gdbpy_enter_varobj.
13680
a7785f8c
TT
136812017-01-10 Tom Tromey <tom@tromey.com>
13682
13683 * python/python.c (python_command): Use gdbpy_enter, gdbpy_ref.
13684 (do_finish_initialization): New function. Use gdbpy_ref.
13685 (gdbpy_finish_initialization): Use gdbpy_enter. Call
13686 do_finish_initialization.
13687
2865bfce
TT
136882017-01-10 Tom Tromey <tom@tromey.com>
13689
13690 * python/py-param.c (get_set_value, get_show_value): Use
13691 gdbpy_enter, gdbpy_ref.
13692
0e9dcc75
TT
136932017-01-10 Tom Tromey <tom@tromey.com>
13694
13695 * python/py-function.c (fnpy_call): Use gdbpy_enter, gdbpy_ref.
13696
12a5cedd
TT
136972017-01-10 Tom Tromey <tom@tromey.com>
13698
13699 * python/py-cmd.c (cmdpy_function): Use gdbpy_enter, gdbpy_ref.
13700
788f2586
TT
137012017-01-10 Tom Tromey <tom@tromey.com>
13702
13703 * python/py-varobj.c (py_varobj_iter_dtor, py_varobj_iter_next):
13704 Use gdbpy_enter_varobj.
13705
6cd67bea
TT
137062017-01-10 Tom Tromey <tom@tromey.com>
13707
13708 * varobj.c (gdbpy_enter_varobj): New constructor.
13709 * python/python-internal.h (gdbpy_enter_varobj): New class.
13710 * python/py-varobj.c (py_varobj_get_iterator): Use
13711 gdbpy_enter_varobj.
13712
14b122bf
TT
137132017-01-10 Tom Tromey <tom@tromey.com>
13714
13715 * python/py-xmethods.c (gdbpy_get_xmethod_result_type): Use
13716 gdbpy_enter, gdbpy_ref, unique_xmalloc_ptr.
13717 (gdbpy_invoke_xmethod): Use gdbpy_ref, gdbpy_enter.
13718 (gdbpy_get_xmethod_arg_types): Use gdbpy_ref,
13719 unique_xmalloc_ptr.
13720 (gdbpy_get_xmethod_arg_types): Use gdbpy_ref, gdbpy_enter.
13721
bf1ca3b9
TT
137222017-01-10 Tom Tromey <tom@tromey.com>
13723
13724 * python/py-xmethods.c (invoke_match_method): Use
13725 gdbpy_ref.
13726
572a5524
TT
137272017-01-10 Tom Tromey <tom@tromey.com>
13728
13729 * python/py-xmethods.c (gdbpy_get_matching_xmethod_workers): use
13730 gdbpy_enter, gdbpy_ref.
13731
396a78b6
TT
137322017-01-10 Tom Tromey <tom@tromey.com>
13733
13734 * python/python.c (python_interactive_command): Use gdbpy_enter.
13735
a88b13c7
TT
137362017-01-10 Tom Tromey <tom@tromey.com>
13737
13738 * python/python.c (gdbpy_before_prompt_hook): Use gdbpy_enter,
13739 gdbpy_ref.
13740
e9f0c363
TT
137412017-01-10 Tom Tromey <tom@tromey.com>
13742
13743 * python/py-prettyprint.c (gdbpy_apply_val_pretty_printer): Use
13744 gdbpy_enter, gdbpy_ref, unique_xmalloc_ptr.
13745
6349f452
TT
137462017-01-10 Tom Tromey <tom@tromey.com>
13747
13748 * utils.h (htab_deleter): New struct.
13749 (htab_up): New typedef.
13750 * python/py-framefilter.c (gdbpy_apply_frame_filter): Use
13751 gdbpy_enter, gdbpy_ref, htab_up.
13752
c0171de6
TT
137532017-01-10 Tom Tromey <tom@tromey.com>
13754
13755 * python/py-unwind.c (pending_frame_invalidate): Remove.
13756 (pyuw_sniffer): Use gdbpy_enter and gdbpy_ref.
13757
f18e226f
TT
137582017-01-10 Tom Tromey <tom@tromey.com>
13759
13760 * python/py-xmethods.c (gdbpy_free_xmethod_worker_data)
13761 (gdbpy_clone_xmethod_worker_data): Use gdbpy_enter.
13762
c57af3f1
TT
137632017-01-10 Tom Tromey <tom@tromey.com>
13764
13765 * python/py-type.c (save_objfile_types): Use gdbpy_enter.
13766
60e600ec
TT
137672017-01-10 Tom Tromey <tom@tromey.com>
13768
13769 * python/python.c (gdbpy_eval_from_control_command)
13770 (gdbpy_source_script, gdbpy_run_events)
13771 (gdbpy_source_objfile_script, gdbpy_execute_objfile_script)
13772 (gdbpy_free_type_printers, gdbpy_finish_initialization): Use
13773 gdbpy_enter.
13774
bf7da5b0
TT
137752017-01-10 Tom Tromey <tom@tromey.com>
13776
13777 * python/py-progspace.c (py_free_pspace): Use gdbpy_enter.
13778
2d38bced
TT
137792017-01-10 Tom Tromey <tom@tromey.com>
13780
13781 * python/py-objfile.c (py_free_objfile): Use gdbpy_enter.
13782
07bc7329
TT
137832017-01-10 Tom Tromey <tom@tromey.com>
13784
13785 * python/py-inferior.c (python_on_normal_stop, python_on_resume)
13786 (python_on_inferior_call_pre, python_on_inferior_call_post)
13787 (python_on_memory_change, python_on_register_change)
13788 (python_inferior_exit, python_new_objfile, add_thread_object)
13789 (delete_thread_object, py_free_inferior): Use gdbpy_enter.
13790
6e7c365e
TT
137912017-01-10 Tom Tromey <tom@tromey.com>
13792
13793 * python/py-finishbreakpoint.c (bpfinishpy_handle_stop)
13794 (bpfinishpy_handle_exit): Use gdbpy_enter.
13795
6ba0cd40
TT
137962017-01-10 Tom Tromey <tom@tromey.com>
13797
13798 * python/py-cmd.c (cmdpy_destroyer)
13799 (cmdpy_completer_handle_brkchars, cmdpy_completer): Use
13800 gdbpy_enter.
13801
de2dc875
TT
138022017-01-10 Tom Tromey <tom@tromey.com>
13803
13804 * python/py-breakpoint.c (gdbpy_breakpoint_cond_says_stop): Use
13805 gdbpy_enter.
13806 (gdbpy_breakpoint_has_cond): Likewise.
13807
4ecee2c4
TT
138082017-01-10 Tom Tromey <tom@tromey.com>
13809
13810 * python/python.c (gdbpy_enter): New constructor.
13811 (~gdbpy_enter): New destructor.
13812 (restore_python_env, ensure_python_env): Rewrite.
13813 * python/python-internal.h (gdbpy_enter): New class.
13814
37fce74f
TT
138152017-01-10 Tom Tromey <tom@tromey.com>
13816
13817 * python/py-symbol.c (gdbpy_lookup_symbol): Use gdbpy_ref.
13818
53a0cca3
TT
138192017-01-10 Tom Tromey <tom@tromey.com>
13820
13821 * python/py-value.c (value_has_field, get_field_flag)
13822 (get_field_type, valpy_getitem, convert_value_from_python): Use
13823 gdbpy_ref.
13824
ff3724f5
TT
138252017-01-10 Tom Tromey <tom@tromey.com>
13826
13827 * python/python.c (gdbpy_progspaces, gdbpy_objfiles): Use
13828 gdbpy_ref.
13829
0700aea5
TT
138302017-01-10 Tom Tromey <tom@tromey.com>
13831
13832 * python/py-prettyprint.c (search_pp_list)
13833 (find_pretty_printer_from_objfiles)
13834 (find_pretty_printer_from_progspace)
13835 (find_pretty_printer_from_gdb, find_pretty_printer)
13836 (gdbpy_get_display_hint, gdbpy_get_varobj_pretty_printer): Use
13837 gdbpy_ref.
13838
1bb44c9f
TT
138392017-01-10 Tom Tromey <tom@tromey.com>
13840
13841 * python/py-param.c (call_doc_function): Use gdbpy_ref.
13842
87ce03fd
TT
138432017-01-10 Tom Tromey <tom@tromey.com>
13844
13845 * python/py-linetable.c (build_line_table_tuple_from_pcs)
13846 (ltpy_get_all_source_lines): Use gdbpy_ref.
13847
ee0a3fb8
TT
138482017-01-10 Tom Tromey <tom@tromey.com>
13849
13850 * python/py-framefilter.c (extract_sym, extract_value)
13851 (get_py_iter_from_func, bootstrap_python_frame_filters): Use
13852 gdbpy_ref.
13853
bf2a52fa
TT
138542017-01-10 Tom Tromey <tom@tromey.com>
13855
13856 * python/py-breakpoint.c (gdbpy_breakpoints): Use gdbpy_ref.
13857
f59fe7f8
TT
138582017-01-10 Tom Tromey <tom@tromey.com>
13859
13860 * python/py-inferior.c (gdbpy_inferiors): Use gdbpy_ref.
13861
80bd970a
TT
138622017-01-10 Tom Tromey <tom@tromey.com>
13863
13864 * python/py-function.c (convert_values_to_python, fnpy_init): Use
13865 gdbpy_ref.
13866
d1b3de2e
TT
138672017-01-10 Tom Tromey <tom@tromey.com>
13868
13869 * python/py-cmd.c (gdbpy_string_to_argv): Use gdbpy_ref.
13870
3bb43384
TT
138712017-01-10 Tom Tromey <tom@tromey.com>
13872
13873 * python/py-type.c (convert_field, make_fielditem, typy_fields)
13874 (typy_range): Use gdbpy_ref.
13875
abf5651e
TT
138762017-01-10 Tom Tromey <tom@tromey.com>
13877
13878 * python/py-threadevent.c (create_thread_event_object): Use
13879 gdbpy_ref.
13880 * python/py-stopevent.c (create_stop_event_object): Simplify.
13881 (emit_stop_event): Use gdbpy_ref.
13882 * python/py-signalevent.c (create_signal_event_object): Use
13883 gdbpy_ref.
13884 * python/py-newobjfileevent.c (create_new_objfile_event_object)
13885 (emit_new_objfile_event, create_clear_objfiles_event_object)
13886 (emit_clear_objfiles_event): Use gdbpy_ref.
13887 * python/py-infevents.c (create_inferior_call_event_object)
13888 (create_register_changed_event_object)
13889 (create_memory_changed_event_object, emit_inferior_call_event)
13890 (emit_memory_changed_event, emit_register_changed_event): Use
13891 gdbpy_ref.
13892 * python/py-exitedevent.c (create_exited_event_object)
13893 (emit_exited_event): Use gdbpy_ref.
13894 * python/py-event.h (evpy_emit_event): Remove
13895 CPYCHECKER_STEALS_REFERENCE_TO_ARG annotation.
13896 * python/py-event.c (evpy_emit_event): Use gdbpy_ref.
13897 * python/py-continueevent.c (emit_continue_event): Use
13898 gdbpy_ref.
13899 * python/py-breakpoint.c (gdbpy_breakpoint_created)
13900 (gdbpy_breakpoint_deleted, gdbpy_breakpoint_modified): Use
13901 gdbpy_ref.
13902 * python/py-bpevent.c (create_breakpoint_event_object): Use
13903 gdbpy_ref.
13904
a68ff33e
TT
139052017-01-10 Tom Tromey <tom@tromey.com>
13906
13907 * python/py-ref.h: New file.
13908
7becfd03
SM
139092017-01-10 Simon Marchi <simon.marchi@ericsson.com>
13910
13911 * cli-out.c (cli_ui_out::do_redirect): Change return type to
13912 void.
13913 * cli-out.h (cli_ui_out::do_redirect): Likewise.
13914 * mi/mi-out.c (mi_ui_out::do_redirect): Likewise.
13915 * mi/mi-out.h (mi_ui_out::do_redirect): Likewise.
13916 * ui-out.c (ui_out::redirect): Likewise.
13917 * ui-out.h (ui_out::redirect, ui_out::do_redirect): Likewise.
13918 * cli/cli-logging.c (set_logging_redirect): Update call site of
13919 ui_out::redirect.
13920 (handle_redirections): Likewise.
13921 * scm-ports.c (ioscm_with_output_to_port_worker): Likewise.
13922 * top.c (execute_command_to_string): Likewise.
13923 * utils.c (do_ui_out_redirect_pop): Likewise.
13924
df294654
SM
139252017-01-10 Simon Marchi <simon.marchi@ericsson.com>
13926
13927 * stack.c (_initialize_stack): Update "frame" command help message.
13928
f5e6296e
IB
139292017-01-08 Iain Buclaw <ibuclaw@gdcproject.org>
13930
13931 * d-exp.y (CastExpression): Emit UNOP_CAST_TYPE.
13932
0e2d6fa6
YQ
139332017-01-06 Yao Qi <yao.qi@linaro.org>
13934
13935 * x86-linux-nat.h: Include gdb_proc_service.h.
13936
44d6d3f9
YQ
139372017-01-06 Yao Qi <yao.qi@linaro.org>
13938
13939 * ser-base.h: Include serial.h.
13940
656731fe
YQ
139412017-01-06 Yao Qi <yao.qi@linaro.org>
13942
13943 * ppc-linux-tdep.h: Include ppc-tdep.h.
13944
1ca8f924
YQ
139452017-01-06 Yao Qi <yao.qi@linaro.org>
13946
13947 * nat/amd64-linux-siginfo.h: Include signal.h.
13948
bc3008c4
YQ
139492017-01-06 Yao Qi <yao.qi@linaro.org>
13950
13951 * nat/aarch64-linux-hw-point.h: Include break-common.h.
13952
66c80d03
YQ
139532017-01-06 Yao Qi <yao.qi@linaro.org>
13954
13955 * mi/mi-parse.h: Include mi-cmds.h.
13956
051d2dda
YQ
139572017-01-06 Yao Qi <yao.qi@linaro.org>
13958
13959 * inf-loop.c: Don't include "target.h".
13960 * inf-loop.h: Include it here.
13961
8018d34f
YQ
139622017-01-06 Yao Qi <yao.qi@linaro.org>
13963
13964 * dfp.h: Include "dboulest.h" and "expression.h".
13965
c0b8369c
YQ
139662017-01-06 Yao Qi <yao.qi@linaro.org>
13967
13968 * ax-gdb.h: Include "ax.h".
13969
ad5cba2a
YQ
139702017-01-06 Yao Qi <yao.qi@linaro.org>
13971
13972 * Makefile.in (HFILES_NO_SRCDIR): Replace gdb_ptrace.h
13973 with nat/gdb_ptrace.h.
13974
1c33cd7f
YQ
139752017-01-05 Yao Qi <yao.qi@linaro.org>
13976
13977 * mips-fbsd-tdep.c (mips_fbsd_sigframe_init): Move && to
13978 new line.
13979 (mips64_fbsd_sigframe_init): Likewise.
13980
c988ac1d
JB
139812017-01-04 John Baldwin <jhb@FreeBSD.org>
13982
13983 * mips-fbsd-tdep.c (_initialize_mips_fbsd_tdep): Use
13984 GDB_OSABI_FREEBSD instead of GDB_OSABI_FREEBSD_ELF.
13985
b268007c
JB
139862017-01-04 John Baldwin <jhb@FreeBSD.org>
13987
13988 * Makefile.in (ALLDEPFILES): Add mips-fbsd-nat.c.
13989 * NEWS: Mention new FreeBSD/mips native configuration.
13990 * config/mips/fbsd.mh: New file.
13991 * configure.host: Add mips*-*-freebsd*.
13992 * mips-fbsd-nat.c: New file.
13993
387360da
JB
139942017-01-04 John Baldwin <jhb@FreeBSD.org>
13995
13996 * Makefile.in (ALL_TARGET_OBS): Add mips-fbsd-tdep.o.
13997 (ALLDEPFILES): Add mips-fbsd-tdep.c.
13998 * NEWS: Mention new FreeBSD/mips target.
13999 * configure.tgt: Add mips*-*-freebsd*.
14000 * mips-fbsd-tdep.c: New file.
14001 * mips-fbsd-tdep.h: New file.
14002
2aaaf250
YQ
140032017-01-04 Yao Qi <yao.qi@linaro.org>
14004
14005 * dwarf2loc.c (write_pieced_value): Don't use VALUE_FRAME_ID (to),
14006 use c->frame_id when the piece location is DWARF_VALUE_REGISTER.
14007
61baf725
JB
140082017-01-01 Joel Brobecker <brobecker@adacore.com>
14009
6dbb839a 14010 Update copyright year range in all GDB files.
61baf725 14011
c113e7ff 140122017-01-01 Joel Brobecker <brobecker@adacore.com>
ce0db137 14013
c113e7ff 14014 * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2016.
ce0db137 14015
c113e7ff 14016For older changes see ChangeLog-2016.
c906108c
SS
14017\f
14018Local Variables:
14019mode: change-log
14020left-margin: 8
14021fill-column: 74
14022version-control: never
57da7796 14023coding: utf-8
c906108c 14024End:
This page took 2.609343 seconds and 4 git commands to generate.