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