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