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