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