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