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