linux_nat_target: More low methods
[binutils-gdb.git] / gdb / ChangeLog
1 2018-05-02 Pedro Alves <palves@redhat.com>
2
3 * linux-nat.h (linux_nat_target) <low_new_thread,
4 low_delete_thread, low_new_fork, low_forget_process,
5 low_prepare_to_resume, low_siginfo_fixup, low_status_is_event>:
6 New virtual methods.
7 (linux_nat_set_new_thread, linux_nat_set_delete_thread)
8 (linux_nat_new_fork_ftype, linux_nat_set_new_fork)
9 (linux_nat_forget_process_ftype, linux_nat_set_forget_process)
10 (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
11 (linux_nat_set_prepare_to_resume, linux_nat_set_status_is_event):
12 Delete.
13 * linux-fork.c (delete_fork): Adjust to call low method.
14 * linux-nat.c (linux_nat_new_thread, linux_nat_delete_thread)
15 (linux_nat_new_fork, linux_nat_forget_process_hook)
16 (linux_nat_prepare_to_resume, linux_nat_siginfo_fixup)
17 (linux_nat_status_is_event):
18 (linux_nat_target::follow_fork, lwp_free, add_lwp, detach_one_lwp)
19 (linux_resume_one_lwp_throw, linux_handle_extended_wait): Adjust
20 to call low method.
21 (sigtrap_is_event): Rename to ...
22 (linux_nat_target::low_status_is_event): ... this.
23 (linux_nat_set_status_is_event): Delete.
24 (save_stop_reason, linux_nat_wait_1)
25 (linux_nat_target::mourn_inferior, siginfo_fixup): Adjust to call
26 low methods.
27 (linux_nat_set_new_thread, linux_nat_set_delete_thread)
28 (linux_nat_set_new_fork, linux_nat_set_forget_process)
29 (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
30 (linux_nat_set_prepare_to_resume): Delete.
31 * aarch64-linux-nat.c: All linux_nat_set_* callbacks converted to
32 low virtual methods.
33 * amd64-linux-nat.c: Likewise.
34 * arm-linux-nat.c: Likewise.
35 * i386-linux-nat.c: Likewise.
36 * ia64-linux-nat.c: Likewise.
37 * mips-linux-nat.c: Likewise.
38 * ppc-linux-nat.c: Likewise.
39 * s390-linux-nat.c: Likewise.
40 * sparc64-linux-nat.c: Likewise.
41 * x86-linux-nat.c: Likewise.
42 * x86-linux-nat.h: Include "nat/x86-linux.h".
43 (x86_linux_nat_target) <low_new_fork, low_forget_process,
44 low_prepare_to_resume, low_new_thread, low_delete_thread>:
45 Override methods.
46
47 2018-05-02 Pedro Alves <palves@redhat.com>
48
49 * target.h (target_ops)
50 <stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
51 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint,
52 stopped_by_watchpoint, have_continuable_watchpoint,
53 stopped_data_address, watchpoint_addr_within_range,
54 can_accel_watchpoint_condition, can_run, thread_alive,
55 has_all_memory, has_memory, has_stack, has_registers,
56 has_execution, can_async_p, is_async_p, supports_non_stop,
57 always_non_stop_p, can_execute_reverse, supports_multi_process,
58 supports_enable_disable_tracepoint,
59 supports_disable_randomization, supports_string_tracing,
60 supports_evaluation_of_breakpoint_conditions,
61 can_run_breakpoint_commands, filesystem_is_local,
62 can_download_tracepoint, get_trace_state_variable_value,
63 set_trace_notes, get_tib_address, use_agent, can_use_agent,
64 record_is_replaying, record_will_replay,
65 augmented_libraries_svr4_read>: Adjust to return bool.
66 * aarch64-linux-nat.c: All implementations adjusted.
67 * aix-thread.c: All implementations adjusted.
68 * arm-linux-nat.c: All implementations adjusted.
69 * breakpoint.c: All implementations adjusted.
70 * bsd-kvm.c: All implementations adjusted.
71 * bsd-uthread.c: All implementations adjusted.
72 * corelow.c: All implementations adjusted.
73 * ctf.c: All implementations adjusted.
74 * darwin-nat.c: All implementations adjusted.
75 * darwin-nat.h: All implementations adjusted.
76 * exec.c: All implementations adjusted.
77 * fbsd-nat.c: All implementations adjusted.
78 * fbsd-nat.h: All implementations adjusted.
79 * gnu-nat.c: All implementations adjusted.
80 * gnu-nat.h: All implementations adjusted.
81 * go32-nat.c: All implementations adjusted.
82 * ia64-linux-nat.c: All implementations adjusted.
83 * inf-child.c: All implementations adjusted.
84 * inf-child.h: All implementations adjusted.
85 * inf-ptrace.c: All implementations adjusted.
86 * inf-ptrace.h: All implementations adjusted.
87 * linux-nat.c: All implementations adjusted.
88 * linux-nat.h: All implementations adjusted.
89 * mips-linux-nat.c: All implementations adjusted.
90 * nto-procfs.c: All implementations adjusted.
91 * ppc-linux-nat.c: All implementations adjusted.
92 * procfs.c: All implementations adjusted.
93 * ravenscar-thread.c: All implementations adjusted.
94 * record-btrace.c: All implementations adjusted.
95 * record-full.c: All implementations adjusted.
96 * remote-sim.c: All implementations adjusted.
97 * remote.c: All implementations adjusted.
98 * s390-linux-nat.c: All implementations adjusted.
99 * sol-thread.c: All implementations adjusted.
100 * spu-multiarch.c: All implementations adjusted.
101 * target-delegates.c: All implementations adjusted.
102 * target.c: All implementations adjusted.
103 * target.h: All implementations adjusted.
104 * tracefile-tfile.c: All implementations adjusted.
105 * tracefile.c: All implementations adjusted.
106 * tracefile.h: All implementations adjusted.
107 * windows-nat.c: All implementations adjusted.
108 * x86-linux-nat.h: All implementations adjusted.
109 * x86-nat.h: All implementations adjusted.
110
111 2018-05-02 Pedro Alves <palves@redhat.com>
112
113 * make-target-delegates (scan_target_h): Don't trim lines here.
114 Replace sequences of tabs and/or whitespace with a single
115 whitespace.
116 (top level, parsing methods): Trim each line before processing it
117 here.
118
119 2018-05-02 Pedro Alves <palves@redhat.com>
120 John Baldwin <jhb@freebsd.org>
121
122 * target.h (enum strata) <debug_stratum>: New.
123 (struct target_ops) <all delegation methods>: Replace by C++
124 virtual methods, and drop "to_" prefix. All references updated
125 throughout.
126 <to_shortname, to_longname, to_doc, to_data,
127 to_have_steppable_watchpoint, to_have_continuable_watchpoint,
128 to_has_thread_control, to_attach_no_wait>: Delete, replaced by
129 virtual methods. All references updated throughout.
130 <can_attach, supports_terminal_ours, can_create_inferior,
131 get_thread_control_capabilities, attach_no_wait>: New
132 virtual methods.
133 <insert_breakpoint, remove_breakpoint>: Now
134 TARGET_DEFAULT_NORETURN methods.
135 <info_proc>: Now returns bool.
136 <to_magic>: Delete.
137 (OPS_MAGIC): Delete.
138 (current_target): Delete. All references replaced by references
139 to ...
140 (target_stack): ... this. New.
141 (target_shortname, target_longname): Adjust.
142 (target_can_run): Now a function declaration.
143 (default_child_has_all_memory, default_child_has_memory)
144 (default_child_has_stack, default_child_has_registers)
145 (default_child_has_execution): Remove target_ops parameter.
146 (complete_target_initialization): Delete.
147 (memory_breakpoint_target): New template class.
148 (test_target_ops): Refactor as a C++ class with virtual methods.
149 * make-target-delegates (NAME_PART): Tighten.
150 (POINTER_PART, CP_SYMBOL): New.
151 (SIMPLE_RETURN_PART): Reimplement.
152 (VEC_RETURN_PART): Expect less.
153 (RETURN_PART, VIRTUAL_PART): New.
154 (METHOD): Adjust to C++ virtual methods.
155 (scan_target_h): Remove reference to C99.
156 (dname): Output "target_ops::" prefix.
157 (write_function_header): Adjust to output a C++ class method.
158 (write_declaration): New.
159 (write_delegator): Adjust to output a C++ class method.
160 (tdname): Output "dummy_target::" prefix.
161 (write_tdefault, write_debugmethod): Adjust to output a C++ class
162 method.
163 (tdefault_names, debug_names): Delete.
164 (return_types, tdefaults, styles, argtypes_array): New.
165 (top level): All methods are delegators.
166 (print_class): New.
167 (top level): Print dummy_target and debug_target classes.
168 * target-delegates.c: Regenerate.
169 * target-debug.h (target_debug_print_enum_info_proc_what)
170 (target_debug_print_thread_control_capabilities)
171 (target_debug_print_thread_info_p): New.
172 * target.c (dummy_target): Delete.
173 (the_dummy_target, the_debug_target): New.
174 (target_stack): Now extern.
175 (set_targetdebug): Push/unpush debug target.
176 (default_child_has_all_memory, default_child_has_memory)
177 (default_child_has_stack, default_child_has_registers)
178 (default_child_has_execution): Remove target_ops parameter.
179 (complete_target_initialization): Delete.
180 (add_target_with_completer): No longer call
181 complete_target_initialization.
182 (target_supports_terminal_ours): Use regular delegation.
183 (update_current_target): Delete.
184 (push_target): No longer check magic number. Don't call
185 update_current_target.
186 (unpush_target): Don't call update_current_target.
187 (target_is_pushed): No longer check magic number.
188 (target_require_runnable): Skip for all stratums over
189 process_stratum.
190 (target_ops::info_proc): New.
191 (target_info_proc): Use find_target_at and
192 find_default_run_target.
193 (target_supports_disable_randomization): Use regular delegation.
194 (target_get_osdata): Use find_target_at.
195 (target_ops::open, target_ops::close, target_ops::can_attach)
196 (target_ops::attach, target_ops::can_create_inferior)
197 (target_ops::create_inferior, target_ops::can_run)
198 (target_can_run): New.
199 (default_fileio_target): Use regular delegation.
200 (target_ops::fileio_open, target_ops::fileio_pwrite)
201 (target_ops::fileio_pread, target_ops::fileio_fstat)
202 (target_ops::fileio_close, target_ops::fileio_unlink)
203 (target_ops::fileio_readlink): New.
204 (target_fileio_open_1, target_fileio_unlink)
205 (target_fileio_readlink): Always call the target method. Handle
206 FILEIO_ENOSYS.
207 (return_zero, return_zero_has_execution): Delete.
208 (init_dummy_target): Delete.
209 (dummy_target::dummy_target, dummy_target::shortname)
210 (dummy_target::longname, dummy_target::doc)
211 (debug_target::debug_target, debug_target::shortname)
212 (debug_target::longname, debug_target::doc): New.
213 (target_supports_delete_record): Use regular delegation.
214 (setup_target_debug): Delete.
215 (maintenance_print_target_stack): Skip debug_stratum.
216 (initialize_targets): Instantiate the_dummy_target and
217 the_debug_target.
218 * auxv.c (target_auxv_parse): Remove 'ops' parameter. Adjust to
219 use target_stack.
220 (target_auxv_search, fprint_target_auxv): Adjust.
221 (info_auxv_command): Adjust to use target_stack.
222 * auxv.h (target_auxv_parse): Remove 'ops' parameter.
223 * exceptions.c (print_flush): Handle a NULL target_stack.
224 * regcache.c (target_ops_no_register): Refactor as class with
225 virtual methods.
226
227 * exec.c (exec_target): New class.
228 (exec_ops): Now an exec_target.
229 (exec_open, exec_close_1, exec_get_section_table)
230 (exec_xfer_partial, exec_files_info, exec_has_memory)
231 (exec_make_note_section): Refactor as exec_target methods.
232 (exec_file_clear, ignore, exec_remove_breakpoint, init_exec_ops):
233 Delete.
234 (exec_target::find_memory_regions): New.
235 (_initialize_exec): Don't call init_exec_ops.
236 * gdbcore.h (exec_file_clear): Delete.
237
238 * corefile.c (core_target): Delete.
239 (core_file_command): Adjust.
240 * corelow.c (core_target): New class.
241 (the_core_target): New.
242 (core_close): Remove target_ops parameter.
243 (core_close_cleanup): Adjust.
244 (core_target::close): New.
245 (core_open, core_detach, get_core_registers, core_files_info)
246 (core_xfer_partial, core_thread_alive, core_read_description)
247 (core_pid_to_str, core_thread_name, core_has_memory)
248 (core_has_stack, core_has_registers, core_info_proc): Rework as
249 core_target methods.
250 (ignore, core_remove_breakpoint, init_core_ops): Delete.
251 (_initialize_corelow): Initialize the_core_target.
252 * gdbcore.h (core_target): Delete.
253 (the_core_target): New.
254
255 * ctf.c: (ctf_target): New class.
256 (ctf_ops): Now a ctf_target.
257 (ctf_open, ctf_close, ctf_files_info, ctf_fetch_registers)
258 (ctf_xfer_partial, ctf_get_trace_state_variable_value)
259 (ctf_trace_find, ctf_traceframe_info): Refactor as ctf_target
260 methods.
261 (init_ctf_ops): Delete.
262 (_initialize_ctf): Don't call it.
263 * tracefile-tfile.c (tfile_target): New class.
264 (tfile_ops): Now a tfile_target.
265 (tfile_open, tfile_close, tfile_files_info)
266 (tfile_get_tracepoint_status, tfile_trace_find)
267 (tfile_fetch_registers, tfile_xfer_partial)
268 (tfile_get_trace_state_variable_value, tfile_traceframe_info):
269 Refactor as tfile_target methods.
270 (tfile_xfer_partial_features): Remove target_ops parameter.
271 (init_tfile_ops): Delete.
272 (_initialize_tracefile_tfile): Don't call it.
273 * tracefile.c (tracefile_has_all_memory, tracefile_has_memory)
274 (tracefile_has_stack, tracefile_has_registers)
275 (tracefile_thread_alive, tracefile_get_trace_status): Refactor as
276 tracefile_target methods.
277 (init_tracefile_ops): Delete.
278 (tracefile_target::tracefile_target): New.
279 * tracefile.h: Include "target.h".
280 (tracefile_target): New class.
281 (init_tracefile_ops): Delete.
282
283 * spu-multiarch.c (spu_multiarch_target): New class.
284 (spu_ops): Now a spu_multiarch_target.
285 (spu_thread_architecture, spu_region_ok_for_hw_watchpoint)
286 (spu_fetch_registers, spu_store_registers, spu_xfer_partial)
287 (spu_search_memory, spu_mourn_inferior): Refactor as
288 spu_multiarch_target methods.
289 (init_spu_ops): Delete.
290 (_initialize_spu_multiarch): Remove references to init_spu_ops,
291 complete_target_initialization.
292
293 * ravenscar-thread.c (ravenscar_thread_target): New class.
294 (ravenscar_ops): Now a ravenscar_thread_target.
295 (ravenscar_resume, ravenscar_wait, ravenscar_update_thread_list)
296 (ravenscar_thread_alive, ravenscar_pid_to_str)
297 (ravenscar_fetch_registers, ravenscar_store_registers)
298 (ravenscar_prepare_to_store, ravenscar_stopped_by_sw_breakpoint)
299 (ravenscar_stopped_by_hw_breakpoint)
300 (ravenscar_stopped_by_watchpoint, ravenscar_stopped_data_address)
301 (ravenscar_mourn_inferior, ravenscar_core_of_thread)
302 (ravenscar_get_ada_task_ptid): Refactor as ravenscar_thread_target
303 methods.
304 (init_ravenscar_thread_ops): Delete.
305 (_initialize_ravenscar): Remove references to
306 init_ravenscar_thread_ops and complete_target_initialization.
307
308 * bsd-uthread.c (bsd_uthread_ops_hack): Delete.
309 (bsd_uthread_target): New class.
310 (bsd_uthread_ops): Now a bsd_uthread_target.
311 (bsd_uthread_activate): Adjust to refer to bsd_uthread_ops.
312 (bsd_uthread_close, bsd_uthread_mourn_inferior)
313 (bsd_uthread_fetch_registers, bsd_uthread_store_registers)
314 (bsd_uthread_wait, bsd_uthread_resume, bsd_uthread_thread_alive)
315 (bsd_uthread_update_thread_list, bsd_uthread_extra_thread_info)
316 (bsd_uthread_pid_to_str): Refactor as bsd_uthread_target methods.
317 (bsd_uthread_target): Delete function.
318 (_initialize_bsd_uthread): Remove reference to
319 complete_target_initialization.
320
321 * bfd-target.c (target_bfd_data): Delete. Fields folded into ...
322 (target_bfd): ... this new class.
323 (target_bfd_xfer_partial, target_bfd_get_section_table)
324 (target_bfd_close): Refactor as target_bfd methods.
325 (target_bfd::~target_bfd): New.
326 (target_bfd_reopen): Adjust.
327 (target_bfd::close): New.
328
329 * record-btrace.c (record_btrace_target): New class.
330 (record_btrace_ops): Now a record_btrace_target.
331 (record_btrace_open, record_btrace_stop_recording)
332 (record_btrace_disconnect, record_btrace_close)
333 (record_btrace_async, record_btrace_info)
334 (record_btrace_insn_history, record_btrace_insn_history_range)
335 (record_btrace_insn_history_from, record_btrace_call_history)
336 (record_btrace_call_history_range)
337 (record_btrace_call_history_from, record_btrace_record_method)
338 (record_btrace_is_replaying, record_btrace_will_replay)
339 (record_btrace_xfer_partial, record_btrace_insert_breakpoint)
340 (record_btrace_remove_breakpoint, record_btrace_fetch_registers)
341 (record_btrace_store_registers, record_btrace_prepare_to_store)
342 (record_btrace_to_get_unwinder)
343 (record_btrace_to_get_tailcall_unwinder, record_btrace_resume)
344 (record_btrace_commit_resume, record_btrace_wait)
345 (record_btrace_stop, record_btrace_can_execute_reverse)
346 (record_btrace_stopped_by_sw_breakpoint)
347 (record_btrace_supports_stopped_by_sw_breakpoint)
348 (record_btrace_stopped_by_hw_breakpoint)
349 (record_btrace_supports_stopped_by_hw_breakpoint)
350 (record_btrace_update_thread_list, record_btrace_thread_alive)
351 (record_btrace_goto_begin, record_btrace_goto_end)
352 (record_btrace_goto, record_btrace_stop_replaying_all)
353 (record_btrace_execution_direction)
354 (record_btrace_prepare_to_generate_core)
355 (record_btrace_done_generating_core): Refactor as
356 record_btrace_target methods.
357 (init_record_btrace_ops): Delete.
358 (_initialize_record_btrace): Remove reference to
359 init_record_btrace_ops.
360 * record-full.c (RECORD_FULL_IS_REPLAY): Adjust to always refer to
361 the execution_direction global.
362 (record_full_base_target, record_full_target)
363 (record_full_core_target): New classes.
364 (record_full_ops): Now a record_full_target.
365 (record_full_core_ops): Now a record_full_core_target.
366 (record_full_target::detach, record_full_target::disconnect)
367 (record_full_core_target::disconnect)
368 (record_full_target::mourn_inferior, record_full_target::kill):
369 New.
370 (record_full_open, record_full_close, record_full_async): Refactor
371 as methods of the record_full_base_target class.
372 (record_full_resume, record_full_commit_resume): Refactor
373 as methods of the record_full_target class.
374 (record_full_wait, record_full_stopped_by_watchpoint)
375 (record_full_stopped_data_address)
376 (record_full_stopped_by_sw_breakpoint)
377 (record_full_supports_stopped_by_sw_breakpoint)
378 (record_full_stopped_by_hw_breakpoint)
379 (record_full_supports_stopped_by_hw_breakpoint): Refactor as
380 methods of the record_full_base_target class.
381 (record_full_store_registers, record_full_xfer_partial)
382 (record_full_insert_breakpoint, record_full_remove_breakpoint):
383 Refactor as methods of the record_full_target class.
384 (record_full_can_execute_reverse, record_full_get_bookmark)
385 (record_full_goto_bookmark, record_full_execution_direction)
386 (record_full_record_method, record_full_info, record_full_delete)
387 (record_full_is_replaying, record_full_will_replay)
388 (record_full_goto_begin, record_full_goto_end, record_full_goto)
389 (record_full_stop_replaying): Refactor as methods of the
390 record_full_base_target class.
391 (record_full_core_resume, record_full_core_kill)
392 (record_full_core_fetch_registers)
393 (record_full_core_prepare_to_store)
394 (record_full_core_store_registers, record_full_core_xfer_partial)
395 (record_full_core_insert_breakpoint)
396 (record_full_core_remove_breakpoint)
397 (record_full_core_has_execution): Refactor
398 as methods of the record_full_core_target class.
399 (record_full_base_target::supports_delete_record): New.
400 (init_record_full_ops): Delete.
401 (init_record_full_core_ops): Delete.
402 (record_full_save): Refactor as method of the
403 record_full_base_target class.
404 (_initialize_record_full): Remove references to
405 init_record_full_ops and init_record_full_core_ops.
406
407 * remote.c (remote_target, extended_remote_target): New classes.
408 (remote_ops): Now a remote_target.
409 (extended_remote_ops): Now an extended_remote_target.
410 (remote_insert_fork_catchpoint, remote_remove_fork_catchpoint)
411 (remote_insert_vfork_catchpoint, remote_remove_vfork_catchpoint)
412 (remote_insert_exec_catchpoint, remote_remove_exec_catchpoint)
413 (remote_pass_signals, remote_set_syscall_catchpoint)
414 (remote_program_signals, )
415 (remote_thread_always_alive): Remove target_ops parameter.
416 (remote_thread_alive, remote_thread_name)
417 (remote_update_thread_list, remote_threads_extra_info)
418 (remote_static_tracepoint_marker_at)
419 (remote_static_tracepoint_markers_by_strid)
420 (remote_get_ada_task_ptid, remote_close, remote_start_remote)
421 (remote_open): Refactor as methods of remote_target.
422 (extended_remote_open, extended_remote_detach)
423 (extended_remote_attach, extended_remote_post_attach):
424 (extended_remote_supports_disable_randomization)
425 (extended_remote_create_inferior): : Refactor as method of
426 extended_remote_target.
427 (remote_set_permissions, remote_open_1, remote_detach)
428 (remote_follow_fork, remote_follow_exec, remote_disconnect)
429 (remote_resume, remote_commit_resume, remote_stop)
430 (remote_interrupt, remote_pass_ctrlc, remote_terminal_inferior)
431 (remote_terminal_ours, remote_wait, remote_fetch_registers)
432 (remote_prepare_to_store, remote_store_registers)
433 (remote_flash_erase, remote_flash_done, remote_files_info)
434 (remote_kill, remote_mourn, remote_insert_breakpoint)
435 (remote_remove_breakpoint, remote_insert_watchpoint)
436 (remote_watchpoint_addr_within_range)
437 (remote_remove_watchpoint, remote_region_ok_for_hw_watchpoint)
438 (remote_check_watch_resources, remote_stopped_by_sw_breakpoint)
439 (remote_supports_stopped_by_sw_breakpoint)
440 (remote_stopped_by_hw_breakpoint)
441 (remote_supports_stopped_by_hw_breakpoint)
442 (remote_stopped_by_watchpoint, remote_stopped_data_address)
443 (remote_insert_hw_breakpoint, remote_remove_hw_breakpoint)
444 (remote_verify_memory): Refactor as methods of remote_target.
445 (remote_write_qxfer, remote_read_qxfer): Remove target_ops
446 parameter.
447 (remote_xfer_partial, remote_get_memory_xfer_limit)
448 (remote_search_memory, remote_rcmd, remote_memory_map)
449 (remote_pid_to_str, remote_get_thread_local_address)
450 (remote_get_tib_address, remote_read_description): Refactor as
451 methods of remote_target.
452 (remote_target::fileio_open, remote_target::fileio_pwrite)
453 (remote_target::fileio_pread, remote_target::fileio_close): New.
454 (remote_hostio_readlink, remote_hostio_fstat)
455 (remote_filesystem_is_local, remote_can_execute_reverse)
456 (remote_supports_non_stop, remote_supports_disable_randomization)
457 (remote_supports_multi_process, remote_supports_cond_breakpoints)
458 (remote_supports_enable_disable_tracepoint)
459 (remote_supports_string_tracing)
460 (remote_can_run_breakpoint_commands, remote_trace_init)
461 (remote_download_tracepoint, remote_can_download_tracepoint)
462 (remote_download_trace_state_variable, remote_enable_tracepoint)
463 (remote_disable_tracepoint, remote_trace_set_readonly_regions)
464 (remote_trace_start, remote_get_trace_status)
465 (remote_get_tracepoint_status, remote_trace_stop)
466 (remote_trace_find, remote_get_trace_state_variable_value)
467 (remote_save_trace_data, remote_get_raw_trace_data)
468 (remote_set_disconnected_tracing, remote_core_of_thread)
469 (remote_set_circular_trace_buffer, remote_traceframe_info)
470 (remote_get_min_fast_tracepoint_insn_len)
471 (remote_set_trace_buffer_size, remote_set_trace_notes)
472 (remote_use_agent, remote_can_use_agent, remote_enable_btrace)
473 (remote_disable_btrace, remote_teardown_btrace)
474 (remote_read_btrace, remote_btrace_conf)
475 (remote_augmented_libraries_svr4_read, remote_load)
476 (remote_pid_to_exec_file, remote_can_do_single_step)
477 (remote_execution_direction, remote_thread_handle_to_thread_info):
478 Refactor as methods of remote_target.
479 (init_remote_ops, init_extended_remote_ops): Delete.
480 (remote_can_async_p, remote_is_async_p, remote_async)
481 (remote_thread_events, remote_upload_tracepoints)
482 (remote_upload_trace_state_variables): Refactor as methods of
483 remote_target.
484 (_initialize_remote): Remove references to init_remote_ops and
485 init_extended_remote_ops.
486
487 * remote-sim.c (gdbsim_target): New class.
488 (gdbsim_fetch_register, gdbsim_store_register, gdbsim_kill)
489 (gdbsim_load, gdbsim_create_inferior, gdbsim_open, gdbsim_close)
490 (gdbsim_detach, gdbsim_resume, gdbsim_interrupt)
491 (gdbsim_wait, gdbsim_prepare_to_store, gdbsim_xfer_partial)
492 (gdbsim_files_info, gdbsim_mourn_inferior, gdbsim_thread_alive)
493 (gdbsim_pid_to_str, gdbsim_has_all_memory, gdbsim_has_memory):
494 Refactor as methods of gdbsim_target.
495 (gdbsim_ops): Now a gdbsim_target.
496 (init_gdbsim_ops): Delete.
497 (gdbsim_cntrl_c): Adjust.
498 (_initialize_remote_sim): Remove reference to init_gdbsim_ops.
499
500 * amd64-linux-nat.c (amd64_linux_nat_target): New class.
501 (the_amd64_linux_nat_target): New.
502 (amd64_linux_fetch_inferior_registers)
503 (amd64_linux_store_inferior_registers): Refactor as methods of
504 amd64_linux_nat_target.
505 (_initialize_amd64_linux_nat): Adjust. Set linux_target.
506 * i386-linux-nat.c: Don't include "linux-nat.h".
507 (i386_linux_nat_target): New class.
508 (the_i386_linux_nat_target): New.
509 (i386_linux_fetch_inferior_registers)
510 (i386_linux_store_inferior_registers, i386_linux_resume): Refactor
511 as methods of i386_linux_nat_target.
512 (_initialize_i386_linux_nat): Adjust. Set linux_target.
513 * inf-child.c (inf_child_ops): Delete.
514 (inf_child_fetch_inferior_registers)
515 (inf_child_store_inferior_registers): Delete.
516 (inf_child_post_attach, inf_child_prepare_to_store): Refactor as
517 methods of inf_child_target.
518 (inf_child_target::supports_terminal_ours)
519 (inf_child_target::terminal_init)
520 (inf_child_target::terminal_inferior)
521 (inf_child_target::terminal_ours_for_output)
522 (inf_child_target::terminal_ours, inf_child_target::interrupt)
523 (inf_child_target::pass_ctrlc, inf_child_target::terminal_info):
524 New.
525 (inf_child_open, inf_child_disconnect, inf_child_close)
526 (inf_child_mourn_inferior, inf_child_maybe_unpush_target)
527 (inf_child_post_startup_inferior, inf_child_can_run)
528 (inf_child_pid_to_exec_file): Refactor as methods of
529 inf_child_target.
530 (inf_child_follow_fork): Delete.
531 (inf_child_target::can_create_inferior)
532 (inf_child_target::can_attach): New.
533 (inf_child_target::has_all_memory, inf_child_target::has_memory)
534 (inf_child_target::has_stack, inf_child_target::has_registers)
535 (inf_child_target::has_execution): New.
536 (inf_child_fileio_open, inf_child_fileio_pwrite)
537 (inf_child_fileio_pread, inf_child_fileio_fstat)
538 (inf_child_fileio_close, inf_child_fileio_unlink)
539 (inf_child_fileio_readlink, inf_child_use_agent)
540 (inf_child_can_use_agent): Refactor as methods of
541 inf_child_target.
542 (return_zero, inf_child_target): Delete.
543 (inf_child_target::inf_child_target): New.
544 * inf-child.h: Include "target.h".
545 (inf_child_target): Delete function prototype.
546 (inf_child_target): New class.
547 (inf_child_open_target, inf_child_mourn_inferior)
548 (inf_child_maybe_unpush_target): Delete.
549 * inf-ptrace.c (inf_ptrace_target::~inf_ptrace_target): New.
550 (inf_ptrace_follow_fork, inf_ptrace_insert_fork_catchpoint)
551 (inf_ptrace_remove_fork_catchpoint, inf_ptrace_create_inferior)
552 (inf_ptrace_post_startup_inferior, inf_ptrace_mourn_inferior)
553 (inf_ptrace_attach, inf_ptrace_post_attach, inf_ptrace_detach)
554 (inf_ptrace_detach_success, inf_ptrace_kill, inf_ptrace_resume)
555 (inf_ptrace_wait, inf_ptrace_xfer_partial)
556 (inf_ptrace_thread_alive, inf_ptrace_files_info)
557 (inf_ptrace_pid_to_str, inf_ptrace_auxv_parse): Refactor as
558 methods of inf_ptrace_target.
559 (inf_ptrace_target): Delete function.
560 * inf-ptrace.h: Include "inf-child.h".
561 (inf_ptrace_target): Delete function declaration.
562 (inf_ptrace_target): New class.
563 (inf_ptrace_trad_target, inf_ptrace_detach_success): Delete.
564 * linux-nat.c (linux_target): New.
565 (linux_ops, linux_ops_saved, super_xfer_partial): Delete.
566 (linux_nat_target::~linux_nat_target): New.
567 (linux_child_post_attach, linux_child_post_startup_inferior)
568 (linux_child_follow_fork, linux_child_insert_fork_catchpoint)
569 (linux_child_remove_fork_catchpoint)
570 (linux_child_insert_vfork_catchpoint)
571 (linux_child_remove_vfork_catchpoint)
572 (linux_child_insert_exec_catchpoint)
573 (linux_child_remove_exec_catchpoint)
574 (linux_child_set_syscall_catchpoint, linux_nat_pass_signals)
575 (linux_nat_create_inferior, linux_nat_attach, linux_nat_detach)
576 (linux_nat_resume, linux_nat_stopped_by_watchpoint)
577 (linux_nat_stopped_data_address)
578 (linux_nat_stopped_by_sw_breakpoint)
579 (linux_nat_supports_stopped_by_sw_breakpoint)
580 (linux_nat_stopped_by_hw_breakpoint)
581 (linux_nat_supports_stopped_by_hw_breakpoint, linux_nat_wait)
582 (linux_nat_kill, linux_nat_mourn_inferior)
583 (linux_nat_xfer_partial, linux_nat_thread_alive)
584 (linux_nat_update_thread_list, linux_nat_pid_to_str)
585 (linux_nat_thread_name, linux_child_pid_to_exec_file)
586 (linux_child_static_tracepoint_markers_by_strid)
587 (linux_nat_is_async_p, linux_nat_can_async_p)
588 (linux_nat_supports_non_stop, linux_nat_always_non_stop_p)
589 (linux_nat_supports_multi_process)
590 (linux_nat_supports_disable_randomization, linux_nat_async)
591 (linux_nat_stop, linux_nat_close, linux_nat_thread_address_space)
592 (linux_nat_core_of_thread, linux_nat_filesystem_is_local)
593 (linux_nat_fileio_open, linux_nat_fileio_readlink)
594 (linux_nat_fileio_unlink, linux_nat_thread_events): Refactor as
595 methods of linux_nat_target.
596 (linux_nat_wait_1, linux_xfer_siginfo, linux_proc_xfer_partial)
597 (linux_proc_xfer_spu, linux_nat_xfer_osdata): Remove target_ops
598 parameter.
599 (check_stopped_by_watchpoint): Adjust.
600 (linux_xfer_partial): Delete.
601 (linux_target_install_ops, linux_target, linux_nat_add_target):
602 Delete.
603 (linux_nat_target::linux_nat_target): New.
604 * linux-nat.h: Include "inf-ptrace.h".
605 (linux_nat_target): New.
606 (linux_target, linux_target_install_ops, linux_nat_add_target):
607 Delete function declarations.
608 (linux_target): Declare global.
609 * linux-thread-db.c (thread_db_target): New.
610 (thread_db_target::thread_db_target): New.
611 (thread_db_ops): Delete.
612 (the_thread_db_target): New.
613 (thread_db_detach, thread_db_wait, thread_db_mourn_inferior)
614 (thread_db_update_thread_list, thread_db_pid_to_str)
615 (thread_db_extra_thread_info)
616 (thread_db_thread_handle_to_thread_info)
617 (thread_db_get_thread_local_address, thread_db_get_ada_task_ptid)
618 (thread_db_resume): Refactor as methods of thread_db_target.
619 (init_thread_db_ops): Delete.
620 (_initialize_thread_db): Remove reference to init_thread_db_ops.
621 * x86-linux-nat.c: Don't include "linux-nat.h".
622 (super_post_startup_inferior): Delete.
623 (x86_linux_nat_target::~x86_linux_nat_target): New.
624 (x86_linux_child_post_startup_inferior)
625 (x86_linux_read_description, x86_linux_enable_btrace)
626 (x86_linux_disable_btrace, x86_linux_teardown_btrace)
627 (x86_linux_read_btrace, x86_linux_btrace_conf): Refactor as
628 methods of x86_linux_nat_target.
629 (x86_linux_create_target): Delete. Bits folded ...
630 (x86_linux_add_target): ... here. Now takes a linux_nat_target
631 pointer.
632 * x86-linux-nat.h: Include "linux-nat.h" and "x86-nat.h".
633 (x86_linux_nat_target): New class.
634 (x86_linux_create_target): Delete.
635 (x86_linux_add_target): Now takes a linux_nat_target pointer.
636 * x86-nat.c (x86_insert_watchpoint, x86_remove_watchpoint)
637 (x86_region_ok_for_watchpoint, x86_stopped_data_address)
638 (x86_stopped_by_watchpoint, x86_insert_hw_breakpoint)
639 (x86_remove_hw_breakpoint, x86_can_use_hw_breakpoint)
640 (x86_stopped_by_hw_breakpoint): Remove target_ops parameter and
641 make extern.
642 (x86_use_watchpoints): Delete.
643 * x86-nat.h: Include "breakpoint.h" and "target.h".
644 (x86_use_watchpoints): Delete.
645 (x86_can_use_hw_breakpoint, x86_region_ok_for_hw_watchpoint)
646 (x86_stopped_by_watchpoint, x86_stopped_data_address)
647 (x86_insert_watchpoint, x86_remove_watchpoint)
648 (x86_insert_hw_breakpoint, x86_remove_hw_breakpoint)
649 (x86_stopped_by_hw_breakpoint): New declarations.
650 (x86_nat_target): New template class.
651
652 * ppc-linux-nat.c (ppc_linux_nat_target): New class.
653 (the_ppc_linux_nat_target): New.
654 (ppc_linux_fetch_inferior_registers)
655 (ppc_linux_can_use_hw_breakpoint)
656 (ppc_linux_region_ok_for_hw_watchpoint)
657 (ppc_linux_ranged_break_num_registers)
658 (ppc_linux_insert_hw_breakpoint, ppc_linux_remove_hw_breakpoint)
659 (ppc_linux_insert_mask_watchpoint)
660 (ppc_linux_remove_mask_watchpoint)
661 (ppc_linux_can_accel_watchpoint_condition)
662 (ppc_linux_insert_watchpoint, ppc_linux_remove_watchpoint)
663 (ppc_linux_stopped_data_address, ppc_linux_stopped_by_watchpoint)
664 (ppc_linux_watchpoint_addr_within_range)
665 (ppc_linux_masked_watch_num_registers)
666 (ppc_linux_store_inferior_registers, ppc_linux_auxv_parse)
667 (ppc_linux_read_description): Refactor as methods of
668 ppc_linux_nat_target.
669 (_initialize_ppc_linux_nat): Adjust. Set linux_target.
670
671 * procfs.c (procfs_xfer_partial): Delete forward declaration.
672 (procfs_target): New class.
673 (the_procfs_target): New.
674 (procfs_target): Delete function.
675 (procfs_auxv_parse, procfs_attach, procfs_detach)
676 (procfs_fetch_registers, procfs_store_registers, procfs_wait)
677 (procfs_xfer_partial, procfs_resume, procfs_pass_signals)
678 (procfs_files_info, procfs_kill_inferior, procfs_mourn_inferior)
679 (procfs_create_inferior, procfs_update_thread_list)
680 (procfs_thread_alive, procfs_pid_to_str)
681 (procfs_can_use_hw_breakpoint, procfs_stopped_by_watchpoint)
682 (procfs_stopped_data_address, procfs_insert_watchpoint)
683 (procfs_remove_watchpoint, procfs_region_ok_for_hw_watchpoint)
684 (proc_find_memory_regions, procfs_info_proc)
685 (procfs_make_note_section): Refactor as methods of procfs_target.
686 (_initialize_procfs): Adjust.
687 * sol-thread.c (sol_thread_target): New class.
688 (sol_thread_ops): Now a sol_thread_target.
689 (sol_thread_detach, sol_thread_resume, sol_thread_wait)
690 (sol_thread_fetch_registers, sol_thread_store_registers)
691 (sol_thread_xfer_partial, sol_thread_mourn_inferior)
692 (sol_thread_alive, solaris_pid_to_str, sol_update_thread_list)
693 (sol_get_ada_task_ptid): Refactor as methods of sol_thread_target.
694 (init_sol_thread_ops): Delete.
695 (_initialize_sol_thread): Adjust. Remove references to
696 init_sol_thread_ops and complete_target_initialization.
697
698 * windows-nat.c (windows_nat_target): New class.
699 (windows_fetch_inferior_registers)
700 (windows_store_inferior_registers, windows_resume, windows_wait)
701 (windows_attach, windows_detach, windows_pid_to_exec_file)
702 (windows_files_info, windows_create_inferior)
703 (windows_mourn_inferior, windows_interrupt, windows_kill_inferior)
704 (windows_close, windows_pid_to_str, windows_xfer_partial)
705 (windows_get_tib_address, windows_get_ada_task_ptid)
706 (windows_thread_name, windows_thread_alive): Refactor as
707 windows_nat_target methods.
708 (do_initial_windows_stuff): Adjust.
709 (windows_target): Delete function.
710 (_initialize_windows_nat): Adjust.
711
712 * darwin-nat.c (darwin_resume, darwin_wait_to, darwin_interrupt)
713 (darwin_mourn_inferior, darwin_kill_inferior)
714 (darwin_create_inferior, darwin_attach, darwin_detach)
715 (darwin_pid_to_str, darwin_thread_alive, darwin_xfer_partial)
716 (darwin_pid_to_exec_file, darwin_get_ada_task_ptid)
717 (darwin_supports_multi_process): Refactor as darwin_nat_target
718 methods.
719 (darwin_resume_to, darwin_files_info): Delete.
720 (_initialize_darwin_inferior): Rename to ...
721 (_initialize_darwin_nat): ... this. Adjust to C++ification.
722 * darwin-nat.h: Include "inf-child.h".
723 (darwin_nat_target): New class.
724 (darwin_complete_target): Delete.
725 * i386-darwin-nat.c (i386_darwin_nat_target): New class.
726 (darwin_target): New.
727 (i386_darwin_fetch_inferior_registers)
728 (i386_darwin_store_inferior_registers): Refactor as methods of
729 darwin_nat_target.
730 (darwin_complete_target): Delete, with ...
731 (_initialize_i386_darwin_nat): ... bits factored out here.
732
733 * alpha-linux-nat.c (alpha_linux_nat_target): New class.
734 (the_alpha_linux_nat_target): New.
735 (alpha_linux_register_u_offset): Refactor as
736 alpha_linux_nat_target method.
737 (_initialize_alpha_linux_nat): Adjust.
738 * linux-nat-trad.c (inf_ptrace_register_u_offset): Delete.
739 (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
740 (inf_ptrace_store_register, inf_ptrace_store_registers): Refact as
741 methods of linux_nat_trad_target.
742 (linux_trad_target): Delete.
743 * linux-nat-trad.h (linux_trad_target): Delete function.
744 (linux_nat_trad_target): New class.
745 * mips-linux-nat.c (mips_linux_nat_target): New class.
746 (super_fetch_registers, super_store_registers, super_close):
747 Delete.
748 (the_mips_linux_nat_target): New.
749 (mips64_linux_regsets_fetch_registers)
750 (mips64_linux_regsets_store_registers)
751 (mips64_linux_fetch_registers, mips64_linux_store_registers)
752 (mips_linux_register_u_offset, mips_linux_read_description)
753 (mips_linux_can_use_hw_breakpoint)
754 (mips_linux_stopped_by_watchpoint)
755 (mips_linux_stopped_data_address)
756 (mips_linux_region_ok_for_hw_watchpoint)
757 (mips_linux_insert_watchpoint, mips_linux_remove_watchpoint)
758 (mips_linux_close): Refactor as methods of mips_linux_nat.
759 (_initialize_mips_linux_nat): Adjust to C++ification.
760
761 * aix-thread.c (aix_thread_target): New class.
762 (aix_thread_ops): Now an aix_thread_target.
763 (aix_thread_detach, aix_thread_resume, aix_thread_wait)
764 (aix_thread_fetch_registers, aix_thread_store_registers)
765 (aix_thread_xfer_partial, aix_thread_mourn_inferior)
766 (aix_thread_thread_alive, aix_thread_pid_to_str)
767 (aix_thread_extra_thread_info, aix_thread_get_ada_task_ptid):
768 Refactor as methods of aix_thread_target.
769 (init_aix_thread_ops): Delete.
770 (_initialize_aix_thread): Remove references to init_aix_thread_ops
771 and complete_target_initialization.
772 * rs6000-nat.c (rs6000_xfer_shared_libraries): Delete.
773 (rs6000_nat_target): New class.
774 (the_rs6000_nat_target): New.
775 (rs6000_fetch_inferior_registers, rs6000_store_inferior_registers)
776 (rs6000_xfer_partial, rs6000_wait, rs6000_create_inferior)
777 (rs6000_xfer_shared_libraries): Refactor as rs6000_nat_target methods.
778 (super_create_inferior): Delete.
779 (_initialize_rs6000_nat): Adjust to C++ification.
780
781 * arm-linux-nat.c (arm_linux_nat_target): New class.
782 (the_arm_linux_nat_target): New.
783 (arm_linux_fetch_inferior_registers)
784 (arm_linux_store_inferior_registers, arm_linux_read_description)
785 (arm_linux_can_use_hw_breakpoint, arm_linux_insert_hw_breakpoint)
786 (arm_linux_remove_hw_breakpoint)
787 (arm_linux_region_ok_for_hw_watchpoint)
788 (arm_linux_insert_watchpoint, arm_linux_remove_watchpoint)
789 (arm_linux_stopped_data_address, arm_linux_stopped_by_watchpoint)
790 (arm_linux_watchpoint_addr_within_range): Refactor as methods of
791 arm_linux_nat_target.
792 (_initialize_arm_linux_nat): Adjust to C++ification.
793
794 * aarch64-linux-nat.c (aarch64_linux_nat_target): New class.
795 (the_aarch64_linux_nat_target): New.
796 (aarch64_linux_fetch_inferior_registers)
797 (aarch64_linux_store_inferior_registers)
798 (aarch64_linux_child_post_startup_inferior)
799 (aarch64_linux_read_description)
800 (aarch64_linux_can_use_hw_breakpoint)
801 (aarch64_linux_insert_hw_breakpoint)
802 (aarch64_linux_remove_hw_breakpoint)
803 (aarch64_linux_insert_watchpoint, aarch64_linux_remove_watchpoint)
804 (aarch64_linux_region_ok_for_hw_watchpoint)
805 (aarch64_linux_stopped_data_address)
806 (aarch64_linux_stopped_by_watchpoint)
807 (aarch64_linux_watchpoint_addr_within_range)
808 (aarch64_linux_can_do_single_step): Refactor as methods of
809 aarch64_linux_nat_target.
810 (super_post_startup_inferior): Delete.
811 (_initialize_aarch64_linux_nat): Adjust to C++ification.
812
813 * hppa-linux-nat.c (hppa_linux_nat_target): New class.
814 (the_hppa_linux_nat_target): New.
815 (hppa_linux_fetch_inferior_registers)
816 (hppa_linux_store_inferior_registers): Refactor as methods of
817 hppa_linux_nat_target.
818 (_initialize_hppa_linux_nat): Adjust to C++ification.
819
820 * ia64-linux-nat.c (ia64_linux_nat_target): New class.
821 (the_ia64_linux_nat_target): New.
822 (ia64_linux_insert_watchpoint, ia64_linux_remove_watchpoint)
823 (ia64_linux_stopped_data_address)
824 (ia64_linux_stopped_by_watchpoint, ia64_linux_fetch_registers)
825 (ia64_linux_store_registers, ia64_linux_xfer_partial): Refactor as
826 ia64_linux_nat_target methods.
827 (super_xfer_partial): Delete.
828 (_initialize_ia64_linux_nat): Adjust to C++ification.
829
830 * m32r-linux-nat.c (m32r_linux_nat_target): New class.
831 (the_m32r_linux_nat_target): New.
832 (m32r_linux_fetch_inferior_registers)
833 (m32r_linux_store_inferior_registers): Refactor as
834 m32r_linux_nat_target methods.
835 (_initialize_m32r_linux_nat): Adjust to C++ification.
836
837 * m68k-linux-nat.c (m68k_linux_nat_target): New class.
838 (the_m68k_linux_nat_target): New.
839 (m68k_linux_fetch_inferior_registers)
840 (m68k_linux_store_inferior_registers): Refactor as
841 m68k_linux_nat_target methods.
842 (_initialize_m68k_linux_nat): Adjust to C++ification.
843
844 * s390-linux-nat.c (s390_linux_nat_target): New class.
845 (the_s390_linux_nat_target): New.
846 (s390_linux_fetch_inferior_registers)
847 (s390_linux_store_inferior_registers, s390_stopped_by_watchpoint)
848 (s390_insert_watchpoint, s390_remove_watchpoint)
849 (s390_can_use_hw_breakpoint, s390_insert_hw_breakpoint)
850 (s390_remove_hw_breakpoint, s390_region_ok_for_hw_watchpoint)
851 (s390_auxv_parse, s390_read_description): Refactor as methods of
852 s390_linux_nat_target.
853 (_initialize_s390_nat): Adjust to C++ification.
854
855 * sparc-linux-nat.c (sparc_linux_nat_target): New class.
856 (the_sparc_linux_nat_target): New.
857 (_initialize_sparc_linux_nat): Adjust to C++ification.
858 * sparc-nat.c (sparc_fetch_inferior_registers)
859 (sparc_store_inferior_registers): Remove target_ops parameter.
860 * sparc-nat.h (sparc_fetch_inferior_registers)
861 (sparc_store_inferior_registers): Remove target_ops parameter.
862 * sparc64-linux-nat.c (sparc64_linux_nat_target): New class.
863 (the_sparc64_linux_nat_target): New.
864 (_initialize_sparc64_linux_nat): Adjust to C++ification.
865
866 * spu-linux-nat.c (spu_linux_nat_target): New class.
867 (the_spu_linux_nat_target): New.
868 (spu_child_post_startup_inferior, spu_child_post_attach)
869 (spu_child_wait, spu_fetch_inferior_registers)
870 (spu_store_inferior_registers, spu_xfer_partial)
871 (spu_can_use_hw_breakpoint): Refactor as spu_linux_nat_target
872 methods.
873 (_initialize_spu_nat): Adjust to C++ification.
874
875 * tilegx-linux-nat.c (tilegx_linux_nat_target): New class.
876 (the_tilegx_linux_nat_target): New.
877 (fetch_inferior_registers, store_inferior_registers):
878 Refactor as methods.
879 (_initialize_tile_linux_nat): Adjust to C++ification.
880
881 * xtensa-linux-nat.c (xtensa_linux_nat_target): New class.
882 (the_xtensa_linux_nat_target): New.
883 (xtensa_linux_fetch_inferior_registers)
884 (xtensa_linux_store_inferior_registers): Refactor as
885 xtensa_linux_nat_target methods.
886 (_initialize_xtensa_linux_nat): Adjust to C++ification.
887
888 * fbsd-nat.c (USE_SIGTRAP_SIGINFO): Delete.
889 (fbsd_pid_to_exec_file, fbsd_find_memory_regions)
890 (fbsd_find_memory_regions, fbsd_info_proc, fbsd_xfer_partial)
891 (fbsd_thread_alive, fbsd_pid_to_str, fbsd_thread_name)
892 (fbsd_update_thread_list, fbsd_resume, fbsd_wait)
893 (fbsd_stopped_by_sw_breakpoint)
894 (fbsd_supports_stopped_by_sw_breakpoint, fbsd_follow_fork)
895 (fbsd_insert_fork_catchpoint, fbsd_remove_fork_catchpoint)
896 (fbsd_insert_vfork_catchpoint, fbsd_remove_vfork_catchpoint)
897 (fbsd_post_startup_inferior, fbsd_post_attach)
898 (fbsd_insert_exec_catchpoint, fbsd_remove_exec_catchpoint)
899 (fbsd_set_syscall_catchpoint)
900 (super_xfer_partial, super_resume, super_wait)
901 (fbsd_supports_stopped_by_hw_breakpoint): Delete.
902 (fbsd_handle_debug_trap): Remove target_ops parameter.
903 (fbsd_nat_add_target): Delete.
904 * fbsd-nat.h: Include "inf-ptrace.h".
905 (fbsd_nat_add_target): Delete.
906 (USE_SIGTRAP_SIGINFO): Define.
907 (fbsd_nat_target): New class.
908
909 * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers)
910 (amd64bsd_store_inferior_registers): Remove target_ops parameter.
911 (amd64bsd_target): Delete.
912 * amd64-bsd-nat.h: New file.
913 * amd64-fbsd-nat.c: Include "amd64-bsd-nat.h" instead of
914 "x86-bsd-nat.h".
915 (amd64_fbsd_nat_target): New class.
916 (the_amd64_fbsd_nat_target): New.
917 (amd64fbsd_read_description): Refactor as method of
918 amd64_fbsd_nat_target.
919 (amd64_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
920 (_initialize_amd64fbsd_nat): Adjust to C++ification.
921 * amd64-nat.h (amd64bsd_target): Delete function declaration.
922 * i386-bsd-nat.c (i386bsd_fetch_inferior_registers)
923 (i386bsd_store_inferior_registers): Remove target_ops parameter.
924 (i386bsd_target): Delete.
925 * i386-bsd-nat.h (i386bsd_target): Delete function declaration.
926 (i386bsd_fetch_inferior_registers)
927 (i386bsd_store_inferior_registers): Declare.
928 (i386_bsd_nat_target): New class.
929 * i386-fbsd-nat.c (i386_fbsd_nat_target): New class.
930 (the_i386_fbsd_nat_target): New.
931 (i386fbsd_resume, i386fbsd_read_description): Refactor as
932 i386_fbsd_nat_target methods.
933 (i386_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
934 (_initialize_i386fbsd_nat): Adjust to C++ification.
935 * x86-bsd-nat.c (super_mourn_inferior): Delete.
936 (x86bsd_mourn_inferior, x86bsd_target): Delete.
937 (_initialize_x86_bsd_nat): Adjust to C++ification.
938 * x86-bsd-nat.h: Include "x86-nat.h".
939 (x86bsd_target): Delete declaration.
940 (x86bsd_nat_target): New class.
941
942 * aarch64-fbsd-nat.c (aarch64_fbsd_nat_target): New class.
943 (the_aarch64_fbsd_nat_target): New.
944 (aarch64_fbsd_fetch_inferior_registers)
945 (aarch64_fbsd_store_inferior_registers): Refactor as methods of
946 aarch64_fbsd_nat_target.
947 (_initialize_aarch64_fbsd_nat): Adjust to C++ification.
948 * alpha-bsd-nat.c (alpha_bsd_nat_target): New class.
949 (the_alpha_bsd_nat_target): New.
950 (alphabsd_fetch_inferior_registers)
951 (alphabsd_store_inferior_registers): Refactor as
952 alpha_bsd_nat_target methods.
953 (_initialize_alphabsd_nat): Refactor as methods of
954 alpha_bsd_nat_target.
955 * amd64-nbsd-nat.c: Include "amd64-bsd-nat.h".
956 (the_amd64_nbsd_nat_target): New.
957 (_initialize_amd64nbsd_nat): Adjust to C++ification.
958 * amd64-obsd-nat.c: Include "amd64-bsd-nat.h".
959 (the_amd64_obsd_nat_target): New.
960 (_initialize_amd64obsd_nat): Adjust to C++ification.
961 * arm-fbsd-nat.c (arm_fbsd_nat_target): New.
962 (the_arm_fbsd_nat_target): New.
963 (arm_fbsd_fetch_inferior_registers)
964 (arm_fbsd_store_inferior_registers, arm_fbsd_read_description):
965 (_initialize_arm_fbsd_nat): Refactor as methods of
966 arm_fbsd_nat_target.
967 (_initialize_arm_fbsd_nat): Adjust to C++ification.
968 * arm-nbsd-nat.c (arm_netbsd_nat_target): New class.
969 (the_arm_netbsd_nat_target): New.
970 (armnbsd_fetch_registers, armnbsd_store_registers): Refactor as
971 arm_netbsd_nat_target.
972 (_initialize_arm_netbsd_nat): Adjust to C++ification.
973 * hppa-nbsd-nat.c (hppa_nbsd_nat_target): New class.
974 (the_hppa_nbsd_nat_target): New.
975 (hppanbsd_fetch_registers, hppanbsd_store_registers): Refactor as
976 hppa_nbsd_nat_target methods.
977 (_initialize_hppanbsd_nat): Adjust to C++ification.
978 * hppa-obsd-nat.c (hppa_obsd_nat_target): New class.
979 (the_hppa_obsd_nat_target): New.
980 (hppaobsd_fetch_registers, hppaobsd_store_registers): Refactor as
981 methods of hppa_obsd_nat_target.
982 (_initialize_hppaobsd_nat): Adjust to C++ification. Use
983 add_target.
984 * i386-nbsd-nat.c (the_i386_nbsd_nat_target): New.
985 (_initialize_i386nbsd_nat): Adjust to C++ification. Use
986 add_target.
987 * i386-obsd-nat.c (the_i386_obsd_nat_target): New.
988 (_initialize_i386obsd_nat): Use add_target.
989 * m68k-bsd-nat.c (m68k_bsd_nat_target): New class.
990 (the_m68k_bsd_nat_target): New.
991 (m68kbsd_fetch_inferior_registers)
992 (m68kbsd_store_inferior_registers): Refactor as methods of
993 m68k_bsd_nat_target.
994 (_initialize_m68kbsd_nat): Adjust to C++ification.
995 * mips-fbsd-nat.c (mips_fbsd_nat_target): New class.
996 (the_mips_fbsd_nat_target): New.
997 (mips_fbsd_fetch_inferior_registers)
998 (mips_fbsd_store_inferior_registers): Refactor as methods of
999 mips_fbsd_nat_target.
1000 (_initialize_mips_fbsd_nat): Adjust to C++ification. Use
1001 add_target.
1002 * mips-nbsd-nat.c (mips_nbsd_nat_target): New class.
1003 (the_mips_nbsd_nat_target): New.
1004 (mipsnbsd_fetch_inferior_registers)
1005 (mipsnbsd_store_inferior_registers): Refactor as methods of
1006 mips_nbsd_nat_target.
1007 (_initialize_mipsnbsd_nat): Adjust to C++ification.
1008 * mips64-obsd-nat.c (mips64_obsd_nat_target): New class.
1009 (the_mips64_obsd_nat_target): New.
1010 (mips64obsd_fetch_inferior_registers)
1011 (mips64obsd_store_inferior_registers): Refactor as methods of
1012 mips64_obsd_nat_target.
1013 (_initialize_mips64obsd_nat): Adjust to C++ification. Use
1014 add_target.
1015 * nbsd-nat.c (nbsd_pid_to_exec_file): Refactor as method of
1016 nbsd_nat_target.
1017 * nbsd-nat.h: Include "inf-ptrace.h".
1018 (nbsd_nat_target): New class.
1019 * obsd-nat.c (obsd_pid_to_str, obsd_update_thread_list)
1020 (obsd_wait): Refactor as methods of obsd_nat_target.
1021 (obsd_add_target): Delete.
1022 * obsd-nat.h: Include "inf-ptrace.h".
1023 (obsd_nat_target): New class.
1024 * ppc-fbsd-nat.c (ppc_fbsd_nat_target): New class.
1025 (the_ppc_fbsd_nat_target): New.
1026 (ppcfbsd_fetch_inferior_registers)
1027 (ppcfbsd_store_inferior_registers): Refactor as methods of
1028 ppc_fbsd_nat_target.
1029 (_initialize_ppcfbsd_nat): Adjust to C++ification. Use
1030 add_target.
1031 * ppc-nbsd-nat.c (ppc_nbsd_nat_target): New class.
1032 (the_ppc_nbsd_nat_target): New.
1033 (ppcnbsd_fetch_inferior_registers)
1034 (ppcnbsd_store_inferior_registers): Refactor as methods of
1035 ppc_nbsd_nat_target.
1036 (_initialize_ppcnbsd_nat): Adjust to C++ification.
1037 * ppc-obsd-nat.c (ppc_obsd_nat_target): New class.
1038 (the_ppc_obsd_nat_target): New.
1039 (ppcobsd_fetch_registers, ppcobsd_store_registers): Refactor as
1040 methods of ppc_obsd_nat_target.
1041 (_initialize_ppcobsd_nat): Adjust to C++ification. Use
1042 add_target.
1043 * sh-nbsd-nat.c (sh_nbsd_nat_target): New class.
1044 (the_sh_nbsd_nat_target): New.
1045 (shnbsd_fetch_inferior_registers)
1046 (shnbsd_store_inferior_registers): Refactor as methods of
1047 sh_nbsd_nat_target.
1048 (_initialize_shnbsd_nat): Adjust to C++ification.
1049 * sparc-nat.c (sparc_xfer_wcookie): Make extern.
1050 (inf_ptrace_xfer_partial): Delete.
1051 (sparc_xfer_partial, sparc_target): Delete.
1052 * sparc-nat.h (sparc_fetch_inferior_registers)
1053 (sparc_store_inferior_registers, sparc_xfer_wcookie): Declare.
1054 (sparc_target): Delete function declaration.
1055 (sparc_target): New template class.
1056 * sparc-nbsd-nat.c (the_sparc_nbsd_nat_target): New.
1057 (_initialize_sparcnbsd_nat): Adjust to C++ification.
1058 * sparc64-fbsd-nat.c (the_sparc64_fbsd_nat_target): New.
1059 (_initialize_sparc64fbsd_nat): Adjust to C++ification. Use
1060 add_target.
1061 * sparc64-nbsd-nat.c (the_sparc64_nbsd_nat_target): New.
1062 (_initialize_sparc64nbsd_nat): Adjust to C++ification.
1063 * sparc64-obsd-nat.c (the_sparc64_obsd_nat_target): New.
1064 (_initialize_sparc64obsd_nat): Adjust to C++ification. Use
1065 add_target.
1066 * vax-bsd-nat.c (vax_bsd_nat_target): New class.
1067 (the_vax_bsd_nat_target): New.
1068 (vaxbsd_fetch_inferior_registers)
1069 (vaxbsd_store_inferior_registers): Refactor as vax_bsd_nat_target
1070 methods.
1071 (_initialize_vaxbsd_nat): Adjust to C++ification.
1072
1073 * bsd-kvm.c (bsd_kvm_target): New class.
1074 (bsd_kvm_ops): Now a bsd_kvm_target.
1075 (bsd_kvm_open, bsd_kvm_close, bsd_kvm_xfer_partial)
1076 (bsd_kvm_files_info, bsd_kvm_fetch_registers)
1077 (bsd_kvm_thread_alive, bsd_kvm_pid_to_str): Refactor as methods of
1078 bsd_kvm_target.
1079 (bsd_kvm_return_one): Delete.
1080 (bsd_kvm_add_target): Adjust to C++ification.
1081
1082 * nto-procfs.c (nto_procfs_target, nto_procfs_target_native)
1083 (nto_procfs_target_procfs): New classes.
1084 (procfs_open_1, procfs_thread_alive, procfs_update_thread_list)
1085 (procfs_files_info, procfs_pid_to_exec_file, procfs_attach)
1086 (procfs_post_attach, procfs_wait, procfs_fetch_registers)
1087 (procfs_xfer_partial, procfs_detach, procfs_insert_breakpoint)
1088 (procfs_remove_breakpoint, procfs_insert_hw_breakpoint)
1089 (procfs_remove_hw_breakpoint, procfs_resume)
1090 (procfs_mourn_inferior, procfs_create_inferior, procfs_interrupt)
1091 (procfs_kill_inferior, procfs_store_registers)
1092 (procfs_pass_signals, procfs_pid_to_str, procfs_can_run): Refactor
1093 as methods of nto_procfs_target.
1094 (nto_procfs_ops): Now an nto_procfs_target_procfs.
1095 (nto_native_ops): Delete.
1096 (procfs_open, procfs_native_open): Delete.
1097 (nto_native_ops): Now an nto_procfs_target_native.
1098 (init_procfs_targets): Adjust to C++ification.
1099 (procfs_can_use_hw_breakpoint, procfs_remove_hw_watchpoint)
1100 (procfs_insert_hw_watchpoint, procfs_stopped_by_watchpoint):
1101 Refactor as methods of nto_procfs_target.
1102
1103 * go32-nat.c (go32_nat_target): New class.
1104 (the_go32_nat_target): New.
1105 (go32_attach, go32_resume, go32_wait, go32_fetch_registers)
1106 (go32_store_registers, go32_xfer_partial, go32_files_info)
1107 (go32_kill_inferior, go32_create_inferior, go32_mourn_inferior)
1108 (go32_terminal_init, go32_terminal_info, go32_terminal_inferior)
1109 (go32_terminal_ours, go32_pass_ctrlc, go32_thread_alive)
1110 (go32_pid_to_str): Refactor as methods of go32_nat_target.
1111 (go32_target): Delete.
1112 (_initialize_go32_nat): Adjust to C++ification.
1113
1114 * gnu-nat.c (gnu_wait, gnu_resume, gnu_kill_inferior)
1115 (gnu_mourn_inferior, gnu_create_inferior, gnu_attach, gnu_detach)
1116 (gnu_stop, gnu_thread_alive, gnu_xfer_partial)
1117 (gnu_find_memory_regions, gnu_pid_to_str): Refactor as methods of
1118 gnu_nat_target.
1119 (gnu_target): Delete.
1120 * gnu-nat.h (gnu_target): Delete.
1121 (gnu_nat_target): New class.
1122 * i386-gnu-nat.c (gnu_base_target): New.
1123 (i386_gnu_nat_target): New class.
1124 (the_i386_gnu_nat_target): New.
1125 (_initialize_i386gnu_nat): Adjust to C++ification.
1126
1127 2018-05-02 Pedro Alves <palves@redhat.com>
1128
1129 * bfd-target.c (target_bfd_xclose): Rename to ...
1130 (target_bfd_close): ... this.
1131 (target_bfd_reopen): Adjust.
1132 * target.c (target_close): Remove references to to_xclose.
1133 * target.h (target_ops::to_xclose): Delete.
1134 (target_ops::to_close): Update comments.
1135
1136 2018-05-02 Pedro Alves <palves@redhat.com>
1137
1138 * alpha-linux-nat.c: Include "linux-nat-trad.h" instead of
1139 "linux-nat.h".
1140 * configure.nat (alpha-linux, linux-mips): Add linux-nat-trad.o.
1141 * inf-ptrace.c (inf_ptrace_register_u_offset)
1142 (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
1143 (inf_ptrace_store_register, inf_ptrace_store_registers)
1144 (inf_ptrace_trad_target): Move to ...
1145 * linux-nat-trad.c: ... this new file.
1146 * linux-nat-trad.h: New file.
1147 * linux-nat.c (linux_target_install_ops): Make extern.
1148 (linux_trad_target): Delete.
1149 * linux-nat.h (linux_trad_target): Delete declaration.
1150 (linux_target_install_ops): Declare.
1151 * mips-linux-nat.c: Include "linux-nat-trad.h" instead of
1152 "linux-nat.h".
1153
1154 2018-05-02 Pedro Alves <palves@redhat.com>
1155
1156 * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
1157 procfs_target/add_target here.
1158 * procfs.c (procfs_target): Make static.
1159 (_initialize_procfs): Call add_target here.
1160 * procfs.h (struct target_ops): Remove forward declaration.
1161 (procfs_target): Remove declaration.
1162 * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Delete.
1163
1164 2018-05-02 Pedro Alves <palves@redhat.com>
1165
1166 * procfs.c (procfs_stopped_by_watchpoint)
1167 (procfs_insert_watchpoint, procfs_remove_watchpoint)
1168 (procfs_region_ok_for_hw_watchpoint, procfs_stopped_data_address):
1169 Forward declare.
1170 (procfs_use_watchpoints): Delete, move contents...
1171 (procfs_target): ... here.
1172 * procfs.h (procfs_use_watchpoints): Delete declaration.
1173 * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
1174 procfs_use_watchpoints.
1175 * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Don't call
1176 procfs_use_watchpoints.
1177
1178 2018-05-02 Tom Tromey <tom@tromey.com>
1179
1180 PR python/20084:
1181 * python/python.c (gdbpy_parameter_value): Handle var_zuinteger
1182 and var_zuinteger_unlimited.
1183 * python/py-param.c (struct parm_constant): Add PARAM_ZUINTEGER
1184 and PARAM_ZUINTEGER_UNLIMITED.
1185 (set_parameter_value): Handle var_zuinteger and
1186 var_zuinteger_unlimited.
1187 (add_setshow_generic): Likewise.
1188 (parmpy_init): Likewise.
1189
1190 2018-04-28 Dan Robertson <danlrobertson89@gmail.com>
1191
1192 PR rust/23124
1193 * gdb/rust-exp.y (convert_params_to_types): Ensure that the params
1194 pointer is not null before dereferencing it.
1195
1196 2018-04-30 Tom Tromey <tom@tromey.com>
1197
1198 * darwin-nat-info.c (darwin_debug_regions_recurse): Remove use of
1199 is_mi_like_p.
1200
1201 2018-04-30 Tom Tromey <tom@tromey.com>
1202
1203 * breakpoint.c (mention): Remove use of is_mi_like_p.
1204 (print_mention_ranged_breakpoint): Likewise.
1205 * break-catch-throw.c (print_it_exception_catchpoint): Remove use
1206 of is_mi_like_p.
1207
1208 2018-04-30 Tom Tromey <tom@tromey.com>
1209
1210 * tracepoint.c (tvariables_info_1): Remove use of is_mi_like_p.
1211
1212 2018-04-30 Tom Tromey <tom@tromey.com>
1213
1214 * spu-tdep.c (info_spu_mailbox_list, info_spu_dma_cmdlist)
1215 (info_spu_event_command): Remove some uses of is_mi_like_p.
1216
1217 2018-04-30 Tom Tromey <tom@tromey.com>
1218
1219 * python/py-framefilter.c (py_print_single_arg)
1220 (enumerate_locals, py_print_args, py_print_frame): Remove some
1221 uses of is_mi_like_p.
1222
1223 2018-04-30 Tom Tromey <tom@tromey.com>
1224
1225 * ui-out.c: Update.
1226 * cli-out.h (cli_ui_out::do_is_mi_like_p): Update.
1227 * ui-out.h (ui_out::is_mi_like_p): Now const.
1228 (ui_out::do_is_mi_like_p): Now const.
1229 * mi/mi-out.h (mi_ui_out::do_is_mi_like_p): Update.
1230
1231 2018-04-30 Tom Tromey <tom@tromey.com>
1232
1233 * varobj.c (varobj_set_visualizer): Use new_reference.
1234 * python/python.c (gdbpy_decode_line): Use new_reference.
1235 * python/py-cmd.c (cmdpy_function, cmdpy_completer_helper): Use
1236 new_reference.
1237
1238 2018-04-30 Tom Tromey <tom@tromey.com>
1239
1240 * varobj.c (install_new_value): Use new_reference.
1241 * value.h (value_incref): Return void. Swap intro comment with
1242 value_decref.
1243 * value.c (set_value_parent): Use new_reference.
1244 (value_incref): Return void. Update intro comment.
1245 (release_value): Use new_reference.
1246 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Use new_reference.
1247
1248 2018-04-30 Tom Tromey <tom@tromey.com>
1249
1250 * symfile-mem.c (symbol_file_add_from_memory): Use new_reference.
1251 * gdb_bfd.h (new_bfd_ref): Remove.
1252 (gdb_bfd_open): Update comment.
1253 * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
1254 (gdb_bfd_openw, gdb_bfd_openr_iovec, gdb_bfd_record_inclusion)
1255 (gdb_bfd_fdopenr): Use new_reference.
1256 * exec.c (exec_file_attach): Use new_reference.
1257
1258 2018-04-30 Tom Tromey <tom@tromey.com>
1259
1260 * common/gdb_ref_ptr.h (ref_ptr::new_reference): New static
1261 method.
1262
1263 2018-04-30 Tom Tromey <tom@tromey.com>
1264
1265 * jit.c (jit_read_code_entry): Use type_align.
1266 * i386-tdep.c (i386_gdbarch_init): Don't call
1267 set_gdbarch_long_long_align_bit.
1268 * gdbarch.sh: Remove long_long_align_bit.
1269 * gdbarch.c, gdbarch.h: Rebuild.
1270 * arc-tdep.c (arc_type_align): New function.
1271 (arc_gdbarch_init): Use arc_type_align. Don't call
1272 set_gdbarch_long_long_align_bit.
1273
1274 2018-04-30 Tom Tromey <tom@tromey.com>
1275
1276 * rust-lang.c (rust_type_alignment): Remove.
1277 (rust_composite_type): Use type_align.
1278
1279 2018-04-30 Tom Tromey <tom@tromey.com>
1280
1281 * NEWS: Mention Type.align.
1282 * python/py-type.c (typy_get_alignof): New function.
1283 (type_object_getset): Add "alignof".
1284
1285 2018-04-30 Tom Tromey <tom@tromey.com>
1286
1287 PR exp/17095:
1288 * NEWS: Update.
1289 * std-operator.def (UNOP_ALIGNOF): New operator.
1290 * expprint.c (dump_subexp_body_standard) <case UNOP_ALIGNOF>:
1291 New.
1292 * eval.c (evaluate_subexp_standard) <case UNOP_ALIGNOF>: New.
1293 * c-lang.c (c_op_print_tab): Add alignof.
1294 * c-exp.y (ALIGNOF): New token.
1295 (exp): Add "ALIGNOF" production.
1296 (ident_tokens): Add _Alignof and alignof.
1297
1298 2018-04-30 Tom Tromey <tom@tromey.com>
1299
1300 * i386-tdep.c (i386_type_align): New function.
1301 (i386_gdbarch_init): Update.
1302 * gdbarch.sh (type_align): New method.
1303 * gdbarch.c, gdbarch.h: Rebuild.
1304 * arch-utils.h (default_type_align): Declare.
1305 * arch-utils.c (default_type_align): New function.
1306 * gdbtypes.h (TYPE_ALIGN_BITS): New define.
1307 (struct type) <align_log2>: New field.
1308 <instance_flags>: Now a bitfield.
1309 (TYPE_RAW_ALIGN): New macro.
1310 (type_align, type_raw_align, set_type_align): Declare.
1311 * gdbtypes.c (type_align, type_raw_align, set_type_align): New
1312 functions.
1313 * dwarf2read.c (quirk_rust_enum): Set type alignment.
1314 (get_alignment, maybe_set_alignment): New functions.
1315 (read_structure_type, read_enumeration_type, read_array_type)
1316 (read_set_type, read_tag_pointer_type, read_tag_reference_type)
1317 (read_subrange_type, read_base_type): Set type alignment.
1318
1319 2018-04-30 Simon Marchi <simon.marchi@ericsson.com>
1320
1321 * dwarf2read.c (read_index_from_section): Use bool.
1322
1323 2018-04-29 Fabian Groffen <grobian@gentoo.org>
1324
1325 PR gdb/22950
1326 * proc-events.c (init_syscall_table): Guard usage os SYS_uuidsys
1327 with #ifdef.
1328
1329 2018-04-29 John Reiser <jreiser@BitWagon.com>
1330
1331 PR build/22873
1332 * gdb/Makefile.in: (.c:.l, .c:.y): Write the target only in the
1333 last step, and do it atomically.
1334
1335 2018-04-27 Alexandre Oliva <aoliva@redhat.com>
1336
1337 * compile/compile-c-types.c (convert_int, convert_float):
1338 Update for C FE v1.
1339
1340 2018-04-27 Tom Tromey <tom@tromey.com>
1341
1342 PR rust/22545:
1343 * rust-lang.c (rust_inclusive_range_type_p): New function.
1344 (rust_range): Handle inclusive ranges.
1345 (rust_compute_range): Likewise.
1346 * rust-exp.y (struct rust_op) <inclusive>: New field.
1347 (DOTDOTEQ): New constant.
1348 (range_expr): Add "..=" productions.
1349 (operator_tokens): Add "..=" token.
1350 (ast_range): Add "inclusive" parameter.
1351 (convert_ast_to_expression) <case OP_RANGE>: Handle inclusive
1352 ranges.
1353 * parse.c (operator_length_standard) <case OP_RANGE>: Handle new
1354 bounds values.
1355 * expression.h (enum range_type) <NONE_BOUND_DEFAULT_EXCLUSIVE,
1356 LOW_BOUND_DEFAULT_EXCLUSIVE>: New constants.
1357 Update comments.
1358 * expprint.c (print_subexp_standard): Handle new bounds values.
1359 (dump_subexp_body_standard): Likewise.
1360
1361 2018-04-27 Tom Tromey <tom@tromey.com>
1362
1363 * configure: Rebuild.
1364 * warning.m4 (AM_GDB_WARNINGS): Add -Wsuggest-override.
1365 * dwarf2loc.c (class dwarf_evaluate_loc_desc): Use "override", not
1366 "OVERRIDE".
1367 (class symbol_needs_eval_context): Likewise.
1368 * dwarf2read.c (mock_mapped_index::symbol_name_count)
1369 (mock_mapped_index::symbol_name_at): Use "override". Remove
1370 "virtual".
1371 * dwarf2-frame.c (dwarf_expr_executor::get_addr_index): Use
1372 "override".
1373 (class dwarf_expr_executor): Use "override", not "OVERRIDE".
1374 * aarch64-tdep.c (instruction_reader::read): Use "override".
1375 (instruction_reader_test::read): Likewise.
1376 * arm-tdep.c (instruction_reader::read): Use "override".
1377 (instruction_reader_thumb::read): Likewise.
1378
1379 2018-04-26 Andrzej Kaczmarek <andrzej.kaczmarek@codecoup.pl>
1380
1381 PR remote/9665
1382 * remote.c (send_g_packet): Use putpkt/getpkt/packet_check_result
1383 instead of remote_send.
1384 (remote_send): Remove.
1385
1386 2018-04-26 Pedro Alves <palves@redhat.com>
1387
1388 * elfread.c (elf_gnu_ifunc_resolver_return_stop): Use
1389 find_function_start_sal instead of find_pc_line.
1390
1391 2018-04-26 Pedro Alves <palves@redhat.com>
1392
1393 * breakpoint.c (set_breakpoint_location_function): Handle
1394 mst_data_gnu_ifunc.
1395 * c-exp.y (variable production): Handle mst_data_gnu_ifunc.
1396 * elfread.c (elf_symtab_read): Give data symbols with
1397 BSF_GNU_INDIRECT_FUNCTION set mst_data_gnu_ifunc type.
1398 (elf_rel_plt_read): Update comment.
1399 * linespec.c (convert_linespec_to_sals): Handle
1400 mst_data_gnu_ifunc.
1401 (minsym_found): Handle mst_data_gnu_ifunc.
1402 * minsyms.c (msymbol_is_function, minimal_symbol_reader::record)
1403 (find_solib_trampoline_target): Handle mst_data_gnu_ifunc.
1404 * parse.c (find_minsym_type_and_address): Handle
1405 mst_data_gnu_ifunc.
1406 * symmisc.c (dump_msymbols): Handle mst_data_gnu_ifunc.
1407 * symtab.c (find_gnu_ifunc): Handle mst_data_gnu_ifunc.
1408 * symtab.h (minimal_symbol_type) <mst_text_gnu_ifunc>: Update
1409 comment.
1410 <mst_data_gnu_ifunc>: New enumerator.
1411
1412 2018-04-26 Pedro Alves <palves@redhat.com>
1413
1414 * minsyms.c (lookup_minimal_symbol_by_pc_section_1): Rename to ...
1415 (lookup_minimal_symbol_by_pc_section): ... this. Replace
1416 'want_trampoline' parameter by a lookup_msym_prefer parameter.
1417 Handle it.
1418 (lookup_minimal_symbol_by_pc_section): Delete old implementation.
1419 (lookup_minimal_symbol_by_pc): Adjust.
1420 (in_gnu_ifunc_stub): Prefer GNU ifunc symbols.
1421 (lookup_solib_trampoline_symbol_by_pc): Adjust.
1422 * minsyms.h (lookup_msym_prefer): New enum.
1423 (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
1424 parameter by a lookup_msym_prefer parameter.
1425
1426 2018-04-26 Pedro Alves <palves@redhat.com>
1427
1428 * elfread.c (elf_gnu_ifunc_record_cache): Check if the symbol name
1429 ends in "@plt" instead of looking at the symbol's section.
1430
1431 2018-04-26 Pedro Alves <palves@redhat.com>
1432
1433 * blockframe.c (cache_pc_function_is_gnu_ifunc): Delete. Remove
1434 all references.
1435 (find_pc_partial_function_gnu_ifunc): Rename to ...
1436 (find_pc_partial_function): ... this, and remove references to
1437 'is_gnu_ifunc_p'.
1438 (find_pc_partial_function): Delete old implementation.
1439 * symtab.h (find_pc_partial_function_gnu_ifunc): Delete.
1440
1441 2018-04-26 Pedro Alves <palves@redhat.com>
1442
1443 * linespec.c (struct bound_minimal_symbol_search_key): New.
1444 (convert_linespec_to_sals): Sort minimal symbols earlier. Don't
1445 skip first line if we found a GNU ifunc minimal symbol by name.
1446 (compare_msymbols): Change parameters to work with a destructured
1447 lhs minsym.
1448 (compare_msymbols_for_qsort, compare_msymbols_for_bsearch): New
1449 functions.
1450
1451 2018-04-26 Pedro Alves <palves@redhat.com>
1452
1453 * breakpoint.c (set_breakpoint_location_function): Don't resolve
1454 ifunc targets here. Instead, if we have an ifunc minsym, use its
1455 address/name.
1456 (add_location_to_breakpoint): Store the minsym and the objfile in
1457 the breakpoint location.
1458 * breakpoint.h (bp_location) <msymbol, objfile>: New fields.
1459 * linespec.c (minsym_found): Resolve GNU ifunc targets here.
1460 Record the minsym in the sal.
1461 * symtab.h (symtab_and_line) <msymbol>: New field.
1462
1463 2018-04-26 Pedro Alves <palves@redhat.com>
1464
1465 * elfread.c (elf_gnu_ifunc_resolve_by_got): Don't write to *ADDR_P
1466 unless we actually resolved the ifunc.
1467
1468 2018-04-26 Pedro Alves <palves@redhat.com>
1469
1470 * c-exp.y (variable production): Prefer ifunc minsyms over
1471 regular function symbols.
1472 * symtab.c (find_gnu_ifunc): New function.
1473 * minsyms.h (lookup_msym_prefer): New enum.
1474 (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
1475 parameter by a lookup_msym_prefer parameter.
1476 * symtab.h (find_gnu_ifunc): New declaration.
1477
1478 2018-04-26 Pedro Alves <palves@redhat.com>
1479
1480 * blockframe.c (find_gnu_ifunc_target_type): New function.
1481 (find_function_type): New.
1482 * eval.c (evaluate_var_msym_value): For GNU ifunc types, always
1483 return a value with a memory address.
1484 (eval_call): For calls to GNU ifunc functions, try to find the
1485 type of the target function from the type that the resolver
1486 returns.
1487 * gdbtypes.c (objfile_type): Don't install a return type for ifunc
1488 symbols.
1489 * infcall.c (find_function_return_type): Delete.
1490 (find_function_addr): Add 'function_type' parameter. For calls to
1491 GNU ifunc functions, try to find the type of the target function
1492 from the type that the resolver returns, and return it via
1493 FUNCTION_TYPE.
1494 (call_function_by_hand_dummy): Adjust to use the function type
1495 returned by find_function_addr.
1496 (find_function_addr): Add 'function_type' parameter and move
1497 description here.
1498 * symtab.h (find_function_type, find_gnu_ifunc_target_type): New
1499 declarations.
1500
1501 2018-04-26 Pedro Alves <palves@redhat.com>
1502
1503 * c-exp.y (variable production): Skip finding an alias for ifunc
1504 symbols.
1505
1506 2018-04-26 Pedro Alves <palves@redhat.com>
1507
1508 * elfread.c (elf_rel_plt_read): Look for relocations for .got.plt too.
1509
1510 2018-04-25 Pedro Alves <palves@redhat.com>
1511
1512 * infcmd.c (kill_command): Print the pid as string, not the whole
1513 thread's ptid. Add comment. s/has been killed/killed/ in output
1514 message.
1515 * remote.c (remote_detach_1): Print the pid as string, not the
1516 whole thread's ptid.
1517
1518 2018-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
1519 Sergio Durigan Junior <sergiodj@redhat.com>
1520 Pedro Alves <palves@redhat.com>
1521
1522 * infcmd.c (kill_command): Print message when inferior has
1523 been killed.
1524 * inferior.c (print_inferior_events): Remove 'static'. Set as
1525 '1'.
1526 (add_inferior): Improve message printed when
1527 'print_inferior_events' is on.
1528 (exit_inferior): Remove message printed when
1529 'print_inferior_events' is on.
1530 (detach_inferior): Improve message printed when
1531 'print_inferior_events' is on.
1532 (initialize_inferiors): Use 'add_inferior_silent' to set
1533 'current_inferior_'.
1534 * inferior.h (print_inferior_events): Declare here as
1535 'extern'.
1536 * infrun.c (follow_fork_inferior): Print '[Attaching...]' or
1537 '[Detaching...]' messages when 'print_inferior_events' is on.
1538 Use 'add_thread_silent' instead of 'add_thread'. Add '[' and ']'
1539 as prefix/suffix for messages. Remove periods. Fix erroneous
1540 'Detaching after fork from child...', replace it by '... from
1541 parent...'.
1542 (handle_vfork_child_exec_or_exit): Add '[' and ']' as
1543 prefix/suffix when printing 'Detaching...' messages. Print
1544 them when 'print_inferior_events' is on.
1545 * remote.c (remote_detach_1): Print message when detaching
1546 from inferior and '!is_fork_parent'.
1547
1548 2018-04-24 Tom Tromey <tom@tromey.com>
1549
1550 * cli-out.h: Reindent.
1551
1552 2018-04-24 Tom Tromey <tom@tromey.com>
1553
1554 * cli-out.c (cli_ui_out::out_field_fmt): Remove.
1555 (cli_ui_out::do_field_string): Use fputs_filtered.
1556 * cli-out.h (class cli_ui_out) <out_field_fmt>: Remove.
1557
1558 2018-04-23 Tom Tromey <tom@tromey.com>
1559
1560 * guile/scm-frame.c (gdbscm_frame_read_var): Use
1561 gdb::unique_xmalloc_ptr.
1562
1563 2018-04-23 Tom Tromey <tom@tromey.com>
1564
1565 * configure: Rebuild.
1566
1567 2018-04-22 Rajendra SY <rajendra.sy@gmail.com>
1568
1569 PR gdb/23095
1570 * gdb/testsuite/gdb.base/break-probes.exp: Pass shlib_load to
1571 prepare_for_testing. Set normal_bp to r_debug_state if target
1572 is bsd.
1573
1574 2018-04-21 Pedro Alves <palves@redhat.com>
1575 Rajendra SY <rajendra.sy@gmail.com>
1576
1577 * inf-ptrace.c (inf_ptrace_attach): Mark the thread as executing.
1578 * remote.c (extended_remote_attach): In all-stop mode, mark the
1579 thread as executing.
1580
1581 2018-04-19 Philippe Waroquiers <philippe.waroquiers@skynet.be>
1582
1583 * thread.c (thread_apply_all_command): Fix comment.
1584 (thread_command): Fix comment.
1585
1586 2018-04-10 Alan Hayward <alan.hayward@arm.com>
1587
1588 * common/tdesc.h (tdesc_create_feature): Remove xml filename
1589 parameter.
1590 * features/aarch64-core.c (create_feature_aarch64_core):
1591 Regenerate.
1592 * features/aarch64-fpu.c (create_feature_aarch64_fpu):
1593 Likewise.
1594 * features/i386/32bit-avx.c (create_feature_i386_32bit_avx):
1595 Likewise.
1596 * features/i386/32bit-avx512.c
1597 (create_feature_i386_32bit_avx512): Likewise.
1598 * features/i386/32bit-core.c (create_feature_i386_32bit_core):
1599 Likewise.
1600 * features/i386/32bit-linux.c (create_feature_i386_32bit_linux):
1601 Likewise.
1602 * features/i386/32bit-mpx.c (create_feature_i386_32bit_mpx):
1603 Likewise.
1604 * features/i386/32bit-pkeys.c (create_feature_i386_32bit_pkeys):
1605 Likewise.
1606 * features/i386/32bit-sse.c (create_feature_i386_32bit_sse):
1607 Likewise.
1608 * features/i386/64bit-avx.c (create_feature_i386_64bit_avx):
1609 Likewise.
1610 * features/i386/64bit-avx512.c
1611 (create_feature_i386_64bit_avx512): Likewise.
1612 * features/i386/64bit-core.c (create_feature_i386_64bit_core):
1613 Likewise.
1614 * features/i386/64bit-linux.c (create_feature_i386_64bit_linux):
1615 Likewise.
1616 * features/i386/64bit-mpx.c (create_feature_i386_64bit_mpx):
1617 Likewise.
1618 * features/i386/64bit-pkeys.c (create_feature_i386_64bit_pkeys):
1619 Likewise.
1620 * features/i386/64bit-segments.c
1621 (create_feature_i386_64bit_segments): Likewise.
1622 * features/i386/64bit-sse.c (create_feature_i386_64bit_sse):
1623 Likewise.
1624 * features/i386/x32-core.c
1625 (create_feature_i386_x32_core): Likewise.
1626 * features/tic6x-c6xp.c (create_feature_tic6x_c6xp): Likewise.
1627 * features/tic6x-core.c (create_feature_tic6x_core): Likewise.
1628 * features/tic6x-gp.c (create_feature_tic6x_gp): Likewise.
1629 * target-descriptions.c: In generated code, don't pass xml
1630 filename.
1631
1632 2018-04-18 Alan Hayward <alan.hayward@arm.com>
1633
1634 * common/tdesc.c (print_xml_feature::visit_pre): Add xml parsing.
1635 (print_xml_feature::visit_post): Likewise.
1636 (print_xml_feature::visit): Likewise.
1637 * common/tdesc.h (tdesc_get_features_xml): Use const tdesc.
1638 (print_xml_feature): Add new class.
1639 * regformats/regdat.sh: Null xmltarget on feature targets.
1640 * target-descriptions.c (struct target_desc): Add xmltarget.
1641 (maintenance_check_tdesc_xml_convert): Add unittest function.
1642 (tdesc_get_features_xml): Add function to get xml.
1643 (maintenance_check_xml_descriptions): Test xml generation.
1644 * xml-tdesc.c (string_read_description_xml): Add function.
1645 * xml-tdesc.h (string_read_description_xml): Add declaration.
1646
1647 2018-04-18 Alan Hayward <alan.hayward@arm.com>
1648
1649 * features/Makefile: Add feature marker to targets with new style
1650 target descriptions.
1651 * regformats/aarch64.dat: Regenerate.
1652 * regformats/i386/amd64-avx-avx512-linux.dat: Likewise.
1653 * regformats/i386/amd64-avx-linux.dat: Likewise.
1654 * regformats/i386/amd64-avx-mpx-avx512-pku-linux.dat: Likewise.
1655 * regformats/i386/amd64-avx-mpx-linux.dat: Likewise.
1656 * regformats/i386/amd64-linux.dat: Likewise.
1657 * regformats/i386/amd64-mpx-linux.dat: Likewise.
1658 * regformats/i386/amd64.dat: Likewise.
1659 * regformats/i386/i386-avx-avx512-linux.dat: Likewise.
1660 * regformats/i386/i386-avx-linux.dat: Likewise.
1661 * regformats/i386/i386-avx-mpx-avx512-pku-linux.dat: Likewise.
1662 * regformats/i386/i386-avx-mpx-linux.dat: Likewise.
1663 * regformats/i386/i386-linux.dat: Likewise.
1664 * regformats/i386/i386-mmx-linux.dat: Likewise.
1665 * regformats/i386/i386-mpx-linux.dat: Likewise.
1666 * regformats/i386/i386.dat: Likewise.
1667 * regformats/i386/x32-avx-avx512-linux.dat: Likewise.
1668 * regformats/i386/x32-avx-linux.dat: Likewise.
1669 * regformats/i386/x32-linux.dat: Likewise.
1670 * regformats/tic6x-c62x-linux.dat: Likewise.
1671 * regformats/tic6x-c64x-linux.dat: Likewise.
1672 * regformats/tic6x-c64xp-linux.dat: Likewise.
1673 * regformats/regdat.sh: Parse feature marker.
1674
1675 2018-04-18 Alan Hayward <alan.hayward@arm.com>
1676
1677 * common/tdesc.h (tdesc_architecture_name): Add new declaration.
1678 (tdesc_osabi_name): Likewise.
1679 * target-descriptions.c (tdesc_architecture_name): Add new
1680 function.
1681 (tdesc_osabi_name): Likewise.
1682
1683 2018-04-18 Alan Hayward <alan.hayward@arm.com>
1684
1685 * common/tdesc.c (tdesc_predefined_type): Move to here.
1686 (tdesc_named_type): Likewise.
1687 (tdesc_create_vector): Likewise.
1688 (tdesc_create_struct): Likewise.
1689 (tdesc_set_struct_size): Likewise.
1690 (tdesc_create_union): Likewise.
1691 (tdesc_create_flags): Likewise.
1692 (tdesc_create_enum): Likewise.
1693 (tdesc_add_field): Likewise.
1694 (tdesc_add_typed_bitfield): Likewise.
1695 (tdesc_add_bitfield): Likewise.
1696 (tdesc_add_flag): Likewise.
1697 (tdesc_add_enum_value): Likewise.
1698 * common/tdesc.h (struct tdesc_type_builtin): Likewise.
1699 (struct tdesc_type_vector): Likewise.
1700 (struct tdesc_type_field): Likewise.
1701 (struct tdesc_type_with_fields): Likewise.
1702 (tdesc_create_enum): Add declaration.
1703 (tdesc_add_typed_bitfield): Likewise.
1704 (tdesc_add_enum_value): Likewise.
1705 * target-descriptions.c (tdesc_type_field): Move from here.
1706 (tdesc_type_builtin): Likewise.
1707 (tdesc_type_vector): Likewise.
1708 (tdesc_type_with_fields): Likewise.
1709 (tdesc_predefined_types): Likewise.
1710 (tdesc_named_type): Likewise.
1711 (tdesc_create_vector): Likewise.
1712 (tdesc_create_struct): Likewise.
1713 (tdesc_set_struct_size): Likewise.
1714 (tdesc_create_union): Likewise.
1715 (tdesc_create_flags): Likewise.
1716 (tdesc_create_enum): Likewise.
1717 (tdesc_add_field): Likewise.
1718 (tdesc_add_typed_bitfield): Likewise.
1719 (tdesc_add_bitfield): Likewise.
1720 (tdesc_add_flag): Likewise.
1721 (tdesc_add_enum_value): Likewise.
1722 * gdb/target-descriptions.h (tdesc_create_enum): Likewise.
1723 (tdesc_add_typed_bitfield): Likewise.
1724 (tdesc_add_enum_value): Likewise.
1725
1726 2018-04-18 Alan Hayward <alan.hayward@arm.com>
1727
1728 * common/tdesc.c (tdesc_feature::accept): Move to here.
1729 (tdesc_feature::operator==): Likewise.
1730 (tdesc_create_reg): Likewise.
1731 * common/tdesc.h (tdesc_type_kind): Likewise.
1732 (struct tdesc_type): Likewise.
1733 (struct tdesc_feature): Likewise.
1734 * regformats/regdat.sh: Create a feature.
1735 * target-descriptions.c (tdesc_type_kind): Move from here.
1736 (tdesc_type): Likewise.
1737 (tdesc_type_up): Likewise.
1738 (tdesc_feature): Likewise.
1739 (tdesc_create_reg): Likewise.
1740
1741 2018-04-18 Alan Hayward <alan.hayward@arm.com>
1742
1743 * Makefile.in: Add arch/tdesc.c
1744 * common/tdesc.c: New file.
1745 * common/tdesc.h (tdesc_element_visitor): Move to here.
1746 (tdesc_element): Likewise.
1747 (tdesc_reg): Likewise.
1748 (tdesc_reg_up): Likewise.
1749 * regformats/regdef.h (reg): Add offset to constructors.
1750 * target-descriptions.c (tdesc_element_visitor): Move from here.
1751 (tdesc_element): Likewise.
1752 (tdesc_reg): Likewise.
1753 (tdesc_reg_up): Likewise.
1754
1755 2018-04-17 Tom Tromey <tom@tromey.com>
1756
1757 * dwarf2read.c (quirk_rust_enum): Conditionally drop the
1758 discriminant field.
1759
1760 2018-04-17 Tom Tromey <tom@tromey.com>
1761
1762 * dwarf2read.c (quirk_rust_enum): Handle unions correctly.
1763
1764 2018-04-17 Andreas Arnez <arnez@linux.vnet.ibm.com>
1765
1766 * symtab.c (print_symbol_info): Skip printing filename and line
1767 number when `last' is NULL.
1768 (symtab_symbol_info): Use empty string instead of NULL for first
1769 invocation of print_symbol_info.
1770 (rbreak_command): Pass NULL to `last' parameter of
1771 print_symbol_info.
1772
1773 2018-04-16 Simon Marchi <simon.marchi@ericsson.com>
1774
1775 * linux-tdep.c (linux_spu_make_corefile_notes): Return note_data
1776 instead of nullptr.
1777
1778 2018-04-16 Pedro Alves <palves@redhat.com>
1779
1780 * MAINTAINERS (sh): Remove.
1781 * Makefile.in (ALL_TARGET_OBS): Remove sh64-tdep.o.
1782 (HFILES_NO_SRCDIR): Remove sh64-tdep.h.
1783 (ALLDEPFILES): Remove sh64-tdep.c.
1784 * NEWS: Mentions that support for SH-5/SH64 is removed.
1785 * configure.tgt (sh*-*-linux*): Remove reference to sh64-tdep.o.
1786 (sh*-*-openbsd*): Ditto.
1787 (sh64-*-elf*): Remove.
1788 (sh*): Remove.
1789 * regcache.c (cooked_write_test): Remove bfd_mach_sh5 case.
1790 * sh-linux-tdep.c: Remove reference to bfd_mach_sh5.
1791 * sh-tdep.c: No longer include "sh64-tdep.h".
1792 (sh_gdbarch_init): Remove reference to bfd_mach_sh5.
1793 * sh64-tdep.c, sh64-tdep.h: Remove files.
1794
1795 2018-04-16 Pedro Alves <palves@redhat.com>
1796
1797 * MAINTAINERS: Remove m88k.
1798 * Makefile.in (ALL_TARGET_OBS): Remove m88k-tdep.o.
1799 (HFILES_NO_SRCDIR): Remove m88k-tdep.h.
1800 (ALLDEPFILES): Remove m88k-bsd-nat.c and m88k-tdep.c.
1801 * NEWS: Mention that support for m88k was removed.
1802 * configure.host (m88*-*-*): Remove support.
1803 * configure.nat (m88k-*-*): Remove support.
1804 * configure.tgt (m88*-*-openbsd*): Remove.
1805 * m88k-bsd-nat.c, m88k-tdep.c, m88k-tdep.h: Delete.
1806
1807 2018-04-15 Simon Marchi <simon.marchi@polymtl.ca>
1808
1809 * configure.tgt (x86_tobjs): New variable.
1810 (amd64_tobjs, i386_tobjs): Use it.
1811
1812 2018-04-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
1813
1814 * symtab.c (print_symbol_info): Precede the symbol definition by
1815 the line number when available.
1816 * NEWS: Advertise this enhancement.
1817
1818 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
1819
1820 * NEWS (New options): announce set/show record btrace cpu.
1821 * btrace.c: Include record-btrace.h.
1822 (btrace_compute_ftrace_pt): Skip enabling errata workarounds if
1823 the vendor is unknown.
1824 (btrace_compute_ftrace_1): Add cpu parameter. Update callers.
1825 Maybe overwrite the btrace configuration's cpu.
1826 (btrace_compute_ftrace): Add cpu parameter. Update callers.
1827 (btrace_fetch): Add cpu parameter. Update callers.
1828 (btrace_maint_update_pt_packets): Call record_btrace_get_cpu.
1829 Maybe overwrite the btrace configuration's cpu. Skip enabling
1830 errata workarounds if the vendor is unknown.
1831 * python/py-record-btrace.c: Include record-btrace.h.
1832 (recpy_bt_begin, recpy_bt_end, recpy_bt_instruction_history)
1833 (recpy_bt_function_call_history): Call record_btrace_get_cpu.
1834 * record-btrace.c (record_btrace_cpu_state_kind): New.
1835 (record_btrace_cpu): New.
1836 (set_record_btrace_cpu_cmdlist): New.
1837 (record_btrace_get_cpu): New.
1838 (require_btrace_thread, record_btrace_info)
1839 (record_btrace_resume_thread): Call record_btrace_get_cpu.
1840 (cmd_set_record_btrace_cpu_none): New.
1841 (cmd_set_record_btrace_cpu_auto): New.
1842 (cmd_set_record_btrace_cpu): New.
1843 (cmd_show_record_btrace_cpu): New.
1844 (_initialize_record_btrace): Initialize set/show record btrace cpu
1845 commands.
1846 * record-btrace.h (record_btrace_get_cpu): New.
1847
1848 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
1849
1850 * record.c (set_record_command): Fix typo in message.
1851
1852 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
1853
1854 * record-btrace.c (cmd_set_record_btrace): Print sub-commands.
1855
1856 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
1857
1858 * infrun.c (process_event_stop_test): Call
1859 gdbarch_in_indirect_branch_thunk.
1860 * gdbarch.sh (in_indirect_branch_thunk): New.
1861 * gdbarch.c: Regenerated.
1862 * gdbarch.h: Regenerated.
1863 * x86-tdep.h: New.
1864 * x86-tdep.c: New.
1865 * Makefile.in (ALL_TARGET_OBS): Add x86-tdep.o.
1866 (HFILES_NO_SRCDIR): Add x86-tdep.h.
1867 (ALLDEPFILES): Add x86-tdep.c.
1868 * arch-utils.h (default_in_indirect_branch_thunk): New.
1869 * arch-utils.c (default_in_indirect_branch_thunk): New.
1870 * i386-tdep: Include x86-tdep.h.
1871 (i386_in_indirect_branch_thunk): New.
1872 (i386_elf_init_abi): Set in_indirect_branch_thunk gdbarch
1873 function.
1874 * amd64-tdep: Include x86-tdep.h.
1875 (amd64_in_indirect_branch_thunk): New.
1876 (amd64_init_abi): Set in_indirect_branch_thunk gdbarch function.
1877
1878 2018-04-12 Jan Kratochvil <jan.kratochvil@redhat.com>
1879
1880 PR gdb/23053
1881 * dwarf-index-write.c (data_buf::grow) (write_one_signatured_type)
1882 (recursively_write_psymbols) (debug_names::recursively_write_psymbols)
1883 (debug_names::write_one_signatured_type): Fix -D_GLIBCXX_DEBUG
1884 regression.
1885
1886 2018-04-12 Tom Tromey <tom@tromey.com>
1887
1888 * rust-lang.c (rust_print_struct_def): Remove univariant code.
1889 (rust_evaluate_subexp): Likewise.
1890
1891 2018-04-12 Pedro Alves <palves@redhat.com>
1892
1893 * procfs.c (procfs_detach): Make forward declaration's prototype
1894 match definition's protototype.
1895 (proc_get_LDT_entry): Remove stale do_cleanups call.
1896
1897 2018-04-12 Pedro Alves <palves@redhat.com>
1898
1899 * target.h (target_ops::to_has_exited): Delete.
1900 (target_has_exited): Delete.
1901 * target-delegates.c: Regenerate.
1902
1903 2018-04-11 Pedro Alves <palves@redhat.com>
1904
1905 * target.c (fileio_fh_t::t): Add comment.
1906 (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
1907 (target_fileio_close): Handle a NULL target.
1908 (invalidate_fileio_fh): New.
1909 (target_close): Call it.
1910 * remote.c (remote_hostio_send_command): No longer check whether
1911 remote_desc is open.
1912
1913 2018-04-11 Pedro Alves <palves@redhat.com>
1914
1915 * target.c (fileio_fh_t): Make it a named struct instead of a
1916 typedef.
1917 (fileio_fh_t::is_closed): New method.
1918 (DEF_VEC_O (fileio_fh_t)): Remove.
1919 (fileio_fhandles): Now a std::vector.
1920 (is_closed_fileio_fh): Delete.
1921 (acquire_fileio_fd): Adjust. Rename parameters.
1922 (release_fileio_fd): Adjust.
1923 (fileio_fd_to_fh): Reimplement as a function instead of a macro.
1924 (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
1925 (target_fileio_close): Adjust.
1926
1927 2018-04-10 Simon Marchi <simon.marchi@ericsson.com>
1928
1929 * auto-load.c (auto_load_safe_path_vec_update): Iterate by
1930 index.
1931
1932 2018-04-10 Pedro Alves <palves@redhat.com>
1933
1934 * gdbthread.h (finish_thread_state_cleanup): Delete declaration.
1935 (scoped_finish_thread_state): New class.
1936 * infcmd.c (run_command_1): Use it instead of finish_thread_state
1937 cleanup.
1938 * infrun.c (proceed, prepare_for_detach, wait_for_inferior)
1939 (fetch_inferior_event, normal_stop): Likewise.
1940 * thread.c (finish_thread_state_cleanup): Delete.
1941
1942 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
1943 Pedro Alves <palves@redhat.com>
1944
1945 * value.c: Include "selftest.h" and "common/array-view.h".
1946 (struct range) <operator ==>: New.
1947 (test_ranges_contain): New.
1948 (check_ranges_vector): New.
1949 (test_insert_into_bit_range_vector): New.
1950 (_initialize_values): Register selftests.
1951 * common/array-view.h (operator==, operator!=): New.
1952
1953 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
1954
1955 * common/gdb_vecs.h (unordered_remove): Add overload that takes
1956 an iterator.
1957 * inline-frame.c: Include <algorithm>.
1958 (struct inline_state): Add constructor.
1959 (inline_state_s): Remove.
1960 (DEF_VEC_O(inline_state_s)): Remove.
1961 (inline_states): Change type to std::vector.
1962 (find_inline_frame_state): Adjust to std::vector.
1963 (allocate_inline_frame_state): Remove.
1964 (clear_inline_frame_state): Adjust to std::vector.
1965 (skip_inline_frames): Adjust to std::vector.
1966
1967 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
1968
1969 * tracepoint.h (struct trace_state_variable): Add constructor.
1970 <name>: Change type to std::string.
1971 * tracepoint.c (tsv_s): Remove.
1972 (DEF_VEC_O(tsv_s)): Remove.
1973 (tvariables): Change to std::vector.
1974 (create_trace_state_variable): Adjust to std::vector.
1975 (find_trace_state_variable): Likewise.
1976 (find_trace_state_variable_by_number): Likewise.
1977 (delete_trace_state_variable): Likewise.
1978 (trace_variable_command): Adjust to std::string.
1979 (delete_trace_variable_command): Likewise.
1980 (tvariables_info_1): Adjust to std::vector.
1981 (save_trace_state_variables): Likewise.
1982 (start_tracing): Likewise.
1983 (merge_uploaded_trace_state_variables): Adjust to std::vector
1984 and std::string.
1985 * target.h (struct target_ops)
1986 <to_download_trace_state_variable>: Pass reference to
1987 trace_state_variable.
1988 * target-debug.h (target_debug_print_const_trace_state_variable_r): New.
1989 * target-delegates.c: Re-generate.
1990 * mi/mi-interp.c (mi_tsv_created): Adjust to std::string.
1991 (mi_tsv_deleted): Likewise.
1992 * mi/mi-main.c (mi_cmd_trace_frame_collected): Likewise.
1993 * remote.c (remote_download_trace_state_variable): Change
1994 pointer to reference and adjust.
1995 * make-target-delegates (parse_argtypes): Handle references.
1996 (write_function_header): Likewise.
1997 (munge_type): Likewise.
1998
1999 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
2000
2001 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
2002 string_view-selftests.c.
2003 * unittests/basic_string_view/capacity/1.cc: Adapt to GDB
2004 testsuite.
2005 * unittests/basic_string_view/cons/char/1.cc: Likewise.
2006 * unittests/basic_string_view/cons/char/2.cc: Likewise.
2007 * unittests/basic_string_view/cons/char/3.cc: Likewise.
2008 * unittests/basic_string_view/element_access/char/1.cc:
2009 Likewise.
2010 * unittests/basic_string_view/element_access/char/empty.cc:
2011 Likewise.
2012 * unittests/basic_string_view/element_access/char/front_back.cc:
2013 Likewise.
2014 * unittests/basic_string_view/inserters/char/2.cc: Likewise.
2015 * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc:
2016 Likewise.
2017 * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc:
2018 Likewise.
2019 * unittests/basic_string_view/modifiers/swap/char/1.cc:
2020 Likewise.
2021 * unittests/basic_string_view/operations/compare/char/1.cc:
2022 Likewise.
2023 * unittests/basic_string_view/operations/compare/char/13650.cc:
2024 Likewise.
2025 * unittests/basic_string_view/operations/copy/char/1.cc:
2026 Likewise.
2027 * unittests/basic_string_view/operations/data/char/1.cc:
2028 Likewise.
2029 * unittests/basic_string_view/operations/find/char/1.cc:
2030 Likewise.
2031 * unittests/basic_string_view/operations/find/char/2.cc:
2032 Likewise.
2033 * unittests/basic_string_view/operations/find/char/3.cc:
2034 Likewise.
2035 * unittests/basic_string_view/operations/find/char/4.cc:
2036 Likewise.
2037 * unittests/basic_string_view/operations/rfind/char/1.cc:
2038 Likewise.
2039 * unittests/basic_string_view/operations/rfind/char/2.cc:
2040 Likewise.
2041 * unittests/basic_string_view/operations/rfind/char/3.cc:
2042 Likewise.
2043 * unittests/basic_string_view/operations/substr/char/1.cc:
2044 Likewise.
2045 * unittests/basic_string_view/operators/char/2.cc: Likewise.
2046 * unittests/string_view-selftests.c: New file.
2047
2048 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
2049
2050 * unittests/basic_string_view/capacity/1.cc: New file.
2051 * unittests/basic_string_view/capacity/empty_neg.cc: New file.
2052 * unittests/basic_string_view/cons/char/1.cc: New file.
2053 * unittests/basic_string_view/cons/char/2.cc: New file.
2054 * unittests/basic_string_view/cons/char/3.cc: New file.
2055 * unittests/basic_string_view/cons/wchar_t/1.cc: New file.
2056 * unittests/basic_string_view/cons/wchar_t/2.cc: New file.
2057 * unittests/basic_string_view/cons/wchar_t/3.cc: New file.
2058 * unittests/basic_string_view/element_access/char/1.cc: New file.
2059 * unittests/basic_string_view/element_access/char/2.cc: New file.
2060 * unittests/basic_string_view/element_access/char/empty.cc: New file.
2061 * unittests/basic_string_view/element_access/char/front_back.cc: New file.
2062 * unittests/basic_string_view/element_access/wchar_t/1.cc: New file.
2063 * unittests/basic_string_view/element_access/wchar_t/2.cc: New file.
2064 * unittests/basic_string_view/element_access/wchar_t/empty.cc: New file.
2065 * unittests/basic_string_view/element_access/wchar_t/front_back.cc: New file.
2066 * unittests/basic_string_view/include.cc: New file.
2067 * unittests/basic_string_view/inserters/char/1.cc: New file.
2068 * unittests/basic_string_view/inserters/char/2.cc: New file.
2069 * unittests/basic_string_view/inserters/char/3.cc: New file.
2070 * unittests/basic_string_view/inserters/pod/10081-out.cc: New file.
2071 * unittests/basic_string_view/inserters/wchar_t/1.cc: New file.
2072 * unittests/basic_string_view/inserters/wchar_t/2.cc: New file.
2073 * unittests/basic_string_view/inserters/wchar_t/3.cc: New file.
2074 * unittests/basic_string_view/literals/types.cc: New file.
2075 * unittests/basic_string_view/literals/values.cc: New file.
2076 * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc: New file.
2077 * unittests/basic_string_view/modifiers/remove_prefix/wchar_t/1.cc: New file.
2078 * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc: New file.
2079 * unittests/basic_string_view/modifiers/remove_suffix/wchar_t/1.cc: New file.
2080 * unittests/basic_string_view/modifiers/swap/char/1.cc: New file.
2081 * unittests/basic_string_view/modifiers/swap/wchar_t/1.cc: New file.
2082 * unittests/basic_string_view/operations/compare/char/1.cc: New file.
2083 * unittests/basic_string_view/operations/compare/char/13650.cc: New file.
2084 * unittests/basic_string_view/operations/compare/char/2.cc: New file.
2085 * unittests/basic_string_view/operations/compare/char/70483.cc: New file.
2086 * unittests/basic_string_view/operations/compare/wchar_t/1.cc: New file.
2087 * unittests/basic_string_view/operations/compare/wchar_t/13650.cc: New file.
2088 * unittests/basic_string_view/operations/compare/wchar_t/2.cc: New file.
2089 * unittests/basic_string_view/operations/copy/char/1.cc: New file.
2090 * unittests/basic_string_view/operations/copy/wchar_t/1.cc: New file.
2091 * unittests/basic_string_view/operations/data/char/1.cc: New file.
2092 * unittests/basic_string_view/operations/data/wchar_t/1.cc: New file.
2093 * unittests/basic_string_view/operations/find/char/1.cc: New file.
2094 * unittests/basic_string_view/operations/find/char/2.cc: New file.
2095 * unittests/basic_string_view/operations/find/char/3.cc: New file.
2096 * unittests/basic_string_view/operations/find/char/4.cc: New file.
2097 * unittests/basic_string_view/operations/find/wchar_t/1.cc: New file.
2098 * unittests/basic_string_view/operations/find/wchar_t/2.cc: New file.
2099 * unittests/basic_string_view/operations/find/wchar_t/3.cc: New file.
2100 * unittests/basic_string_view/operations/find/wchar_t/4.cc: New file.
2101 * unittests/basic_string_view/operations/rfind/char/1.cc: New file.
2102 * unittests/basic_string_view/operations/rfind/char/2.cc: New file.
2103 * unittests/basic_string_view/operations/rfind/char/3.cc: New file.
2104 * unittests/basic_string_view/operations/rfind/wchar_t/1.cc: New file.
2105 * unittests/basic_string_view/operations/rfind/wchar_t/2.cc: New file.
2106 * unittests/basic_string_view/operations/rfind/wchar_t/3.cc: New file.
2107 * unittests/basic_string_view/operations/string_conversion/1.cc: New file.
2108 * unittests/basic_string_view/operations/substr/char/1.cc: New file.
2109 * unittests/basic_string_view/operations/substr/wchar_t/1.cc: New file.
2110 * unittests/basic_string_view/operators/char/2.cc: New file.
2111 * unittests/basic_string_view/operators/wchar_t/2.cc: New file.
2112 * unittests/basic_string_view/range_access/char/1.cc: New file.
2113 * unittests/basic_string_view/range_access/wchar_t/1.cc: New file.
2114 * unittests/basic_string_view/requirements/explicit_instantiation/1.cc: New file.
2115 * unittests/basic_string_view/requirements/explicit_instantiation/char/1.cc: New file.
2116 * unittests/basic_string_view/requirements/explicit_instantiation/char16_t/1.cc: New file.
2117 * unittests/basic_string_view/requirements/explicit_instantiation/char32_t/1.cc: New file.
2118 * unittests/basic_string_view/requirements/explicit_instantiation/wchar_t/1.cc: New file.
2119 * unittests/basic_string_view/requirements/typedefs.cc: New file.
2120 * unittests/basic_string_view/typedefs.cc: New file.
2121 * unittests/basic_string_view/types/1.cc: New file.
2122
2123 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
2124
2125 * common/gdb_string_view.h: Remove libstdc++ implementation
2126 details, adjust to gdb reality.
2127 * common/gdb_string_view.tcc: Likewise.
2128 * cli/cli-script.c (struct string_view): Remove.
2129 (user_args) <m_args>: Change element type to gdb::string_view.
2130 (user_args::insert_args): Adjust.
2131
2132 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
2133
2134 * common/gdb_string_view.h: New file.
2135 * common/gdb_string_view.tcc: New file.
2136
2137 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
2138
2139 * ax_cxx_compile_stdcxx.m4: Sync with upstream.
2140 * configure: Re-generate.
2141
2142 2018-04-09 Pedro Alves <palves@redhat.com>
2143
2144 * gdbarch.sh: Include "observable.h" instead of "observer.h".
2145 (set_target_gdbarch): Call
2146 gdb::observers::architecture_changed.notify instead of
2147 observer_notify_architecture_changed.
2148
2149 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
2150
2151 * tracepoint.c (struct current_traceframe_cleanup): Remove.
2152 (do_restore_current_traceframe_cleanup): Remove.
2153 (restore_current_traceframe_cleanup_dtor): Remove.
2154 (make_cleanup_restore_current_traceframe): Remove.
2155 (scoped_restore_current_traceframe::scoped_restore_current_traceframe):
2156 New.
2157 * tracepoint.h (struct scoped_restore_current_traceframe): New.
2158 * infrun.c (fetch_inferior_event): Use
2159 scoped_restore_current_traceframe.
2160
2161 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
2162
2163 * dwarf2read.h (struct dwarf2_per_objfile) <n_type_units>:
2164 Remove.
2165 <n_allocated_type_units>: Remove.
2166 <all_type_units>: Change to std::vector.
2167 * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
2168 to std::vector change.
2169 (dwarf2_per_objfile::get_cutu): Likewise.
2170 (dwarf2_per_objfile::get_tu): Likewise.
2171 (create_signatured_type_table_from_index): Likewise.
2172 (create_signatured_type_table_from_debug_names): Likewise.
2173 (dw2_symtab_iter_next): Likewise.
2174 (dw2_print_stats): Likewise.
2175 (dw2_expand_all_symtabs): Likewise.
2176 (dw2_expand_marked_cus): Likewise.
2177 (dw2_debug_names_iterator::next): Likewise.
2178 (dwarf2_initialize_objfile): Likewise.
2179 (add_signatured_type_cu_to_table): Likewise.
2180 (create_all_type_units): Likewise.
2181 (add_type_unit): Likewise.
2182 (struct tu_abbrev_offset): Add constructor.
2183 (build_type_psymtabs_1): Adjust to std::vector change.
2184 (print_tu_stats): Likewise.
2185 * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
2186 (write_debug_names): Likewise.
2187
2188 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
2189
2190 * dwarf2read.h (struct dwarf2_per_objfile) <all_comp_units>: Likewise.
2191 Make an std::vector.
2192 <n_comp_units>: Remove.
2193 * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
2194 to std::vector change.
2195 (dwarf2_per_objfile::get_cutu): Likewise.
2196 (dwarf2_per_objfile::get_cu): Likewise.
2197 (create_cus_from_index): Likewise.
2198 (create_addrmap_from_index): Likewise.
2199 (create_addrmap_from_aranges): Likewise.
2200 (dwarf2_read_index): Likewise.
2201 (dw2_find_last_source_symtab): Likewise.
2202 (dw2_map_symtabs_matching_filename): Likewise.
2203 (dw2_symtab_iter_next): Likewise.
2204 (dw2_print_stats): Likewise.
2205 (dw2_expand_all_symtabs): Likewise.
2206 (dw2_expand_symtabs_with_fullname): Likewise.
2207 (dw2_expand_marked_cus): Likewise.
2208 (dw2_map_symbol_filenames): Likewise.
2209 (create_cus_from_debug_names): Likewise.
2210 (dwarf2_read_debug_names): Likewise.
2211 (dw2_debug_names_iterator::next): Likewise.
2212 (dwarf2_initialize_objfile): Likewise.
2213 (set_partial_user): Likewise.
2214 (dwarf2_build_psymtabs_hard): Likewise.
2215 (read_comp_units_from_section): Remove arguments, adjust to
2216 std::vector change.
2217 (create_all_comp_units): Adjust to std::vector and
2218 read_comp_units_from_section changes.
2219 (dwarf2_find_containing_comp_unit): Adjust to std::vector
2220 change.
2221 * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
2222 (psyms_seen_size): Likewise.
2223 (write_gdbindex): Likewise.
2224 (write_debug_names): Likewise.
2225
2226 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
2227
2228 * dwarf2read.c (create_cus_from_index_list): Replace objfile arg
2229 with dwarf2_per_objfile.
2230 (create_cus_from_index): Likewise.
2231 (create_signatured_type_table_from_index): Likewise.
2232 (dwarf2_read_index): Likewise.
2233 (dwarf2_initialize_objfile): Likewise.
2234 (dwarf2_fetch_die_loc_sect_off): Get dwarf2_per_objfile from
2235 per_cu rather than get_dwarf2_per_objfile.
2236
2237 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
2238
2239 * dwarf2read.h (struct signatured_type): Forward declare.
2240 (struct dwarf2_per_objfile) <get_cutu, get_cu, get_tu>:
2241 New methods.
2242 * dwarf2read.c (dwarf2_per_objfile::get_cutu): Rename from...
2243 (dw2_get_cutu): ...this.
2244 (dwarf2_per_objfile::get_cu): Rename from...
2245 (dw2_get_cu): ...this.
2246 (dwarf2_per_objfile::get_tu): New.
2247 (create_addrmap_from_index): Adjust.
2248 (create_addrmap_from_aranges): Adjust.
2249 (dw2_find_last_source_symtab): Adjust.
2250 (dw2_map_symtabs_matching_filename): Adjust.
2251 (dw2_symtab_iter_next): Adjust.
2252 (dw2_print_stats): Adjust.
2253 (dw2_expand_all_symtabs): Adjust.
2254 (dw2_expand_symtabs_with_fullname): Adjust.
2255 (dw2_expand_marked_cus): Adjust.
2256 (dw_expand_symtabs_matching_file_matcher): Adjust.
2257 (dw2_map_symbol_filenames): Adjust.
2258 (dw2_debug_names_iterator::next): Adjust.
2259 (dwarf2_initialize_objfile): Adjust.
2260 (set_partial_user): Adjust.
2261 (dwarf2_build_psymtabs_hard): Adjust.
2262
2263 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
2264
2265 * dwarf2read.c (create_signatured_type_table_from_debug_names):
2266 Remove unused variables.
2267 (dw2_map_symtabs_matching_filename): Likewise.
2268 (dwarf2_record_block_ranges): Likewise.
2269 (dwarf2_read_addr_index): Likewise.
2270 (follow_die_offset): Likewise.
2271
2272 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
2273
2274 * progspace.c (clone_program_space): Pass SYMFILE_DEFER_BP_RESET
2275 to symbol_file_add_main.
2276
2277 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
2278
2279 PR mi/22299
2280 * mi/mi-console.c (do_fputc_async_safe): New.
2281 (mi_console_file::write_async_safe): New.
2282 (mi_console_file::flush): Adjust calls to fputstrn_unfiltered.
2283 * mi/mi-console.h (class mi_console_file) <write_async_safe>:
2284 New.
2285 * ui-file.c (ui_file::putstrn): Adjust call to
2286 fputstrn_unfiltered.
2287 * utils.c (printchar): Replace do_fputs and do_fprintf
2288 parameters by do_fputc.
2289 (fputstr_filtered): Adjust call to printchar.
2290 (fputstr_unfiltered): Likewise.
2291 (fputstrn_filtered): Likewise.
2292 (fputstrn_unfiltered): Add do_fputc parameter, pass to
2293 printchar.
2294 * utils.h (do_fputc_ftype): New typedef.
2295 (fputstrn_unfiltered): Add do_fputc parameter.
2296
2297 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
2298
2299 * regformats/i386/i386-avx.dat: Remove.
2300
2301 2018-04-07 Simon Marchi <simon.marchi@ericsson.com>
2302
2303 PR gdb/22979
2304 * amd64-tdep.c (amd64_none_init_abi): New function.
2305 (amd64_x32_none_init_abi): New function.
2306 (_initialize_amd64_tdep): Register handlers for x86-64 and
2307 x64_32 with GDB_OSABI_NONE.
2308 * osabi.c (gdbarch_init_osabi): Allow running handlers for the
2309 GDB_OSABI_NONE osabi.
2310
2311 2018-04-07 Simon Marchi <simon.marchi@ericsson.com>
2312
2313 PR gdb/22980
2314 * defs.h (enum gdb_osabi): Remove GDB_OSABI_UNINITIALIZED, add
2315 GDB_OSABI_NONE.
2316 * arch-utils.c (gdbarch_info_init): Don't set info->osabi.
2317 * osabi.c (gdb_osabi_names): Add "unknown" entry.
2318
2319 2018-04-07 Simon Marchi <simon.marchi@ericsson.com>
2320
2321 * common/byte-vector.h (char_vector): New type.
2322 * target.h (target_read_alloc): Return
2323 gdb::optional<byte_vector>.
2324 (target_read_stralloc): Return gdb::optional<char_vector>.
2325 (target_get_osdata): Return gdb::optional<char_vector>.
2326 * target.c (target_read_alloc_1): Templatize. Replacement
2327 manual memory management with vector.
2328 (target_read_alloc): Change return type, adjust.
2329 (target_read_stralloc): Change return type, adjust.
2330 (target_get_osdata): Change return type, adjust.
2331 * auxv.c (struct auxv_info) <length>: Remove.
2332 <data>: Change type to gdb::optional<byte_vector>.
2333 (auxv_inferior_data_cleanup): Free auxv_info with delete.
2334 (get_auxv_inferior_data): Allocate auxv_info with new, adjust.
2335 (target_auxv_search): Adjust.
2336 (fprint_target_auxv): Adjust.
2337 * avr-tdep.c (avr_io_reg_read_command): Adjust.
2338 * linux-tdep.c (linux_spu_make_corefile_notes): Adjust.
2339 (linux_make_corefile_notes): Adjust.
2340 * osdata.c (get_osdata): Adjust.
2341 * remote.c (remote_get_threads_with_qxfer): Adjust.
2342 (remote_memory_map): Adjust.
2343 (remote_traceframe_info): Adjust.
2344 (btrace_read_config): Adjust.
2345 (remote_read_btrace): Adjust.
2346 (remote_pid_to_exec_file): Adjust.
2347 * solib-aix.c (solib_aix_get_library_list): Adjust.
2348 * solib-dsbt.c (decode_loadmap): Don't free buf.
2349 (dsbt_get_initial_loadmaps): Adjust.
2350 * solib-svr4.c (svr4_current_sos_via_xfer_libraries): Adjust.
2351 * solib-target.c (solib_target_current_sos): Adjust.
2352 * tracepoint.c (sdata_make_value): Adjust.
2353 * xml-support.c (xinclude_start_include): Adjust.
2354 (xml_fetch_content_from_file): Adjust.
2355 * xml-support.h (xml_fetch_another): Change return type.
2356 (xml_fetch_content_from_file): Change return type.
2357 * xml-syscall.c (xml_init_syscalls_info): Adjust.
2358 * xml-tdesc.c (file_read_description_xml): Adjust.
2359 (fetch_available_features_from_target): Change return type.
2360 (target_fetch_description_xml): Adjust.
2361 (target_read_description_xml): Adjust.
2362
2363 2018-04-06 Tom Tromey <tom@tromey.com>
2364
2365 * value.c (~value): Update.
2366 (struct value) <contents>: Now unique_xmalloc_ptr.
2367 (value_contents_bits_eq, allocate_value_contents)
2368 (value_contents_raw, value_contents_all_raw)
2369 (value_contents_for_printing, value_contents_for_printing_const)
2370 (set_value_enclosing_type): Update.
2371
2372 2018-04-06 Tom Tromey <tom@tromey.com>
2373
2374 * value.c (range_s): Remove typedef, VEC.
2375 (struct range): Add operator<.
2376 (range_lessthan): Remove.
2377 (ranges_contain): Change type.
2378 (~value): Update.
2379 (struct value) <unavailable, optimized_out>: Now std::vector.
2380 (value_entirely_available)
2381 (value_entirely_covered_by_range_vector)
2382 (value_entirely_unavailable, value_entirely_optimized_out):
2383 Update.
2384 (insert_into_bit_range_vector): Change argument type.
2385 (find_first_range_overlap): Likewise.
2386 (struct ranges_and_idx, value_contents_bits_eq)
2387 (require_not_optimized_out, require_available): Update.
2388 (ranges_copy_adjusted): Change argument types.
2389 (value_optimized_out, value_copy, value_fetch_lazy): Update.
2390
2391 2018-04-06 Tom Tromey <tom@tromey.com>
2392
2393 * value.c (~value): Update.
2394 (struct value) <parent>: Now a value_ref_ptr.
2395 (value_parent, set_value_parent, value_address, value_copy):
2396 Update.
2397
2398 2018-04-06 Tom Tromey <tom@tromey.com>
2399
2400 * value.c (struct value): Add constructor, destructor, and member
2401 initializers.
2402 (allocate_value_lazy, value_decref): Update.
2403
2404 2018-04-06 Tom Tromey <tom@tromey.com>
2405
2406 * value.c (struct value) <released, next>: Remove.
2407 (all_values): Now a std::vector.
2408 (allocate_value_lazy): Update.
2409 (value_next): Remove.
2410 (value_mark, value_free_to_mark, release_value)
2411 (value_release_to_mark): Update.
2412
2413 2018-04-06 Tom Tromey <tom@tromey.com>
2414
2415 * value.h (fetch_subexp_value, value_release_to_mark): Update.
2416 (free_value_chain): Remove.
2417 * value.c (free_value_chain): Remove.
2418 (value_release_to_mark): Return a std::vector.
2419 * ppc-linux-nat.c (num_memory_accesses): Change "chain" to a
2420 std::vector.
2421 (check_condition): Update.
2422 * eval.c (fetch_subexp_value): Change "val_chain" to a
2423 std::vector.
2424 * breakpoint.c (update_watchpoint): Update.
2425 (can_use_hardware_watchpoint): Change "vals" to a std::vector.
2426
2427 2018-04-06 Tom Tromey <tom@tromey.com>
2428
2429 * value.h (free_all_values): Remove.
2430 * value.c (free_all_values): Remove.
2431
2432 2018-04-06 Tom Tromey <tom@tromey.com>
2433
2434 * value.c (VALUE_HISTORY_CHUNK, struct value_history_chunk)
2435 (value_history_chain, value_history_count): Remove.
2436 (value_history): New global.
2437 (record_latest_value, access_value_history, show_values)
2438 (preserve_values): Update.
2439
2440 2018-04-06 Tom Tromey <tom@tromey.com>
2441
2442 * varobj.h (struct varobj) <value>: Now a value_ref_ptr.
2443 * varobj.c (varobj_set_display_format, varobj_set_value)
2444 (install_default_visualizer, construct_visualizer)
2445 (install_new_value, ~varobj, varobj_get_value_type)
2446 (my_value_of_variable, varobj_editable_p): Update.
2447 * c-varobj.c (c_describe_child, c_value_of_variable)
2448 (cplus_number_of_children, cplus_describe_child): Update.
2449 * ada-varobj.c (ada_number_of_children, ada_name_of_child)
2450 (ada_path_expr_of_child, ada_value_of_child, ada_type_of_child)
2451 (ada_value_of_variable, ada_value_is_changeable_p): Update.
2452
2453 2018-04-06 Tom Tromey <tom@tromey.com>
2454
2455 * printcmd.c (last_examine_address): Change type to
2456 value_ref_ptr.
2457 (do_examine, x_command): Update.
2458
2459 2018-04-06 Tom Tromey <tom@tromey.com>
2460
2461 * value.c (release_value): Update.
2462 * breakpoint.h (struct watchpoint) <val>: Now a value_ref_ptr.
2463 (struct bpstats) <val>: Now a value_ref_ptr.
2464 * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
2465 (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
2466 (~watchpoint, print_it_watchpoint, watch_command_1)
2467 (invalidate_bp_value_on_memory_change): Update.
2468
2469 2018-04-06 Tom Tromey <tom@tromey.com>
2470
2471 * varobj.c (varobj_clear_saved_item)
2472 (update_dynamic_varobj_children, install_new_value, ~varobj):
2473 Update.
2474 * value.h (value_incref): Move declaration earlier.
2475 (value_decref): Rename from value_free.
2476 (struct value_ref_policy): New.
2477 (value_ref_ptr): New typedef.
2478 (struct value_deleter): Remove.
2479 (gdb_value_up): Remove typedef.
2480 (release_value): Change return type.
2481 (release_value_or_incref): Remove.
2482 * value.c (set_value_parent): Update.
2483 (value_incref): Change return type.
2484 (value_decref): Rename from value_free.
2485 (value_free_to_mark, free_all_values, free_value_chain): Update.
2486 (release_value): Return value_ref_ptr.
2487 (release_value_or_incref): Remove.
2488 (record_latest_value, set_internalvar, clear_internalvar):
2489 Update.
2490 * stack.c (info_frame_command): Don't call value_free.
2491 * python/py-value.c (valpy_dealloc, valpy_new)
2492 (value_to_value_object): Update.
2493 * printcmd.c (do_examine): Update.
2494 * opencl-lang.c (lval_func_free_closure): Update.
2495 * mi/mi-main.c (register_changed_p): Don't call value_free.
2496 * mep-tdep.c (mep_frame_prev_register): Don't call value_free.
2497 * m88k-tdep.c (m88k_frame_prev_register): Don't call value_free.
2498 * m68hc11-tdep.c (m68hc11_frame_prev_register): Don't call
2499 value_free.
2500 * guile/scm-value.c (vlscm_free_value_smob)
2501 (vlscm_scm_from_value): Update.
2502 * frame.c (frame_register_unwind, frame_unwind_register_signed)
2503 (frame_unwind_register_unsigned, get_frame_register_bytes)
2504 (put_frame_register_bytes): Don't call value_free.
2505 * findvar.c (address_from_register): Don't call value_free.
2506 * dwarf2read.c (dwarf2_compute_name): Don't call value_free.
2507 * dwarf2loc.c (entry_data_value_free_closure)
2508 (value_of_dwarf_reg_entry, free_pieced_value_closure)
2509 (dwarf2_evaluate_loc_desc_full): Update.
2510 * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
2511 (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
2512 (~watchpoint, watch_command_1)
2513 (invalidate_bp_value_on_memory_change): Update.
2514 * alpha-tdep.c (alpha_register_to_value): Don't call value_free.
2515
2516 2018-04-06 Simon Marchi <simon.marchi@polymtl.ca>
2517
2518 PR gdb/23022
2519 * warning.m4: Add -Wno-error=deprecated-register.
2520 * configure: Re-generate.
2521
2522 2018-04-05 Tom Tromey <tom@tromey.com>
2523
2524 * linespec.h: Remove include of "vec.h".
2525
2526 2018-04-05 Tom Tromey <tom@tromey.com>
2527
2528 * linespec.c (typep): Remove typedef.
2529 (find_methods, find_superclass_methods): Take a std::vector.
2530 (find_method): Use std::vector.
2531
2532 2018-04-05 Tom Tromey <tom@tromey.com>
2533
2534 * utils.c (compare_strings): Remove.
2535 * utils.h (compare_strings): Remove.
2536 * objc-lang.h (find_imps): Update.
2537 * objc-lang.c (find_methods): Take a std::vector.
2538 (uniquify_strings, find_imps): Likewise.
2539 * linespec.c (find_methods): Take a std::vector.
2540 (decode_objc): Use std::vector.
2541 (add_all_symbol_names_from_pspace, find_superclass_methods): Take
2542 a std::vector.
2543 (find_method, find_function_symbols): Use std::vector.
2544
2545 2018-04-05 Tom Tromey <tom@tromey.com>
2546
2547 * completer.c (completion_tracker::completion_tracker): Remove
2548 cast.
2549 (completion_tracker::discard_completions): Likewise.
2550 * breakpoint.c (ambiguous_names_p): Remove cast.
2551 * ada-lang.c (_initialize_ada_language): Remove cast.
2552 * utils.h (streq): Update.
2553 (streq_hash): Add new declaration.
2554 * utils.c (streq): Return bool.
2555 (streq_hash): New function.
2556
2557 2018-04-05 Tom Tromey <tom@tromey.com>
2558
2559 * linespec.c (event_location_to_sals) <case ADDRESS_LOCATION>:
2560 Remove a string copy.
2561
2562 2018-04-05 Tom Tromey <tom@tromey.com>
2563
2564 * linespec.c (filter_results): Use std::vector.
2565 (decode_line_2, decode_line_full): Update.
2566
2567 2018-04-05 Tom Tromey <tom@tromey.com>
2568
2569 * linespec.c (canonical_to_fullform): Return std::string.
2570 (filter_results): Update.
2571 (struct decode_line_2_item): Add constructor.
2572 <fullform, displayform>: Now std::string.
2573 (decode_line_2_compare_items): Now a std::sort comparator.
2574 (decode_line_2): Update.
2575
2576 2018-04-05 Tom Tromey <tom@tromey.com>
2577
2578 * linespec.c (copy_token_string): Return a unique_xmalloc_ptr.
2579 (unexpected_linespec_error): Update.
2580 (linespec_parse_basic, parse_linespec): Update.
2581
2582 2018-04-05 Tom Tromey <tom@tromey.com>
2583
2584 * linespec.c (linespec_parse_basic): Reindent.
2585
2586 2018-04-05 Tom Tromey <tom@tromey.com>
2587
2588 * minsyms.h (iterate_over_minimal_symbols): Update.
2589 * minsyms.c (iterate_over_minimal_symbols): Take a
2590 gdb::function_view.
2591 * linespec.c (struct collect_minsyms): Remove.
2592 (compare_msyms): Now a std::sort comparator.
2593 (add_minsym): Add parameters.
2594 (search_minsyms_for_name): Update. Use std::vector.
2595
2596 2018-04-03 Tom Tromey <tom@tromey.com>
2597
2598 * mipsread.c (read_alphacoff_dynamic_symtab): Use
2599 gdb::byte_vector.
2600
2601 2018-04-02 Weimin Pan <weimin.pan@oracle.com>
2602
2603 * MAINTAINERS (Write After Approval): Add Weimin Pan.
2604
2605 2018-04-02 Weimin Pan <weimin.pan@oracle.com>
2606
2607 PR gdb/16959
2608 * cp-valprint.c: (cp_print_static_field) Fix infinite recursion when
2609 printing static type.
2610
2611 2018-04-01 Tom Tromey <tom@tromey.com>
2612
2613 * rs6000-nat.c (rs6000_ptrace_ldinfo): Return a byte_vector.
2614 (rs6000_xfer_shared_libraries): Update.
2615
2616 2018-04-01 Simon Marchi <simon.marchi@polymtl.ca>
2617
2618 * common/gdb_vecs.h (char_ptr): Remove.
2619 * tracepoint.c (encode_actions_1): Remove usage of char_ptr.
2620
2621 2018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
2622
2623 * guile/scm-utils.c (gdbscm_parse_function_args): Replace VEC
2624 with std::vector.
2625 * common/gdb_vecs.h (DEF_VEC_P (char_ptr)): Remove.
2626
2627 2018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
2628
2629 * tracepoint.h (struct uploaded_tp): Initialize fields.
2630 <actions, step_actions, cmd_strings>: Change type to
2631 std::vector<char *>.
2632 * tracepoint.c (get_uploaded_tp): Allocate with new.
2633 (free_uploaded_tps): Free with delete.
2634 (parse_tracepoint_definition): Adjust to std::vector change.
2635 * breakpoint.c (read_uploaded_action): Likewise.
2636 (create_tracepoint_from_upload): Likewise.
2637 * ctf.c (ctf_write_uploaded_tp): Likewise.
2638 (SET_ARRAY_FIELD): Likewise.
2639 * tracefile-tfile.c (tfile_write_uploaded_tp): Likewise.
2640
2641 2018-03-30 Tom Tromey <tom@tromey.com>
2642
2643 * solib-svr4.c (lm_info_read): Use gdb::byte_vector. Return
2644 std::unique_ptr.
2645 (svr4_keep_data_in_core): Update.
2646 (svr4_read_so_list): Update.
2647
2648 2018-03-30 Tom Tromey <tom@tromey.com>
2649
2650 * windows-nat.c (handle_output_debug_string, handle_exception):
2651 Update.
2652 * target.h (target_read_string): Update.
2653 * target.c (target_read_string): Change "string" to
2654 unique_xmalloc_ptr.
2655 * solib-svr4.c (open_symbol_file_object, svr4_read_so_list):
2656 Update.
2657 * solib-frv.c (frv_current_sos): Update.
2658 * solib-dsbt.c (dsbt_current_sos): Update.
2659 * solib-darwin.c (darwin_current_sos): Update.
2660 * linux-thread-db.c (inferior_has_bug): Update.
2661 * expprint.c (print_subexp_standard) <case OP_OBJC_MSGCALL>:
2662 Update. Remove alloca.
2663 * ada-lang.c (ada_main_name): Update.
2664
2665 2018-03-30 Tom Tromey <tom@tromey.com>
2666
2667 * dwarf2read.c (struct free_dwo_file_cleanup_data): Remove.
2668 (struct dwo_file_deleter): New.
2669 (dwo_file_up): New typedef.
2670 (open_and_init_dwo_file): Use dwo_file_up.
2671 (free_dwo_file_cleanup): Remove.
2672
2673 2018-03-30 Tom Tromey <tom@tromey.com>
2674
2675 * dwarf2read.c (free_dwo_file): Remove "objfile" parameter.
2676 (free_dwo_file_cleanup, free_dwo_file_from_slot): Update.
2677
2678 2018-03-30 Tom Tromey <tom@tromey.com>
2679
2680 * dwarf2read.c (class free_cached_comp_units): New class.
2681 (dw2_instantiate_symtab, dwarf2_build_psymtabs_hard): Use it.
2682 (free_cached_comp_units): Remove function.
2683
2684 2018-03-30 Tom Tromey <tom@tromey.com>
2685
2686 * utils.h (make_cleanup_unpush_target): Remove.
2687 * inf-ptrace.c (struct target_unpusher): New.
2688 (target_unpush_up) New typedef.
2689 (inf_ptrace_create_inferior, inf_ptrace_attach): Use
2690 target_unpush_up.
2691 * utils.c (do_unpush_target, make_cleanup_unpush_target): Remove.
2692
2693 2018-03-27 Tom Tromey <tom@tromey.com>
2694
2695 * utils.c (prompt_for_continue): Use unique_xmalloc_ptr.
2696
2697 2018-03-27 Pedro Alves <palves@redhat.com>
2698 Tom Tromey <tom@tromey.com>
2699
2700 * top.c (class gdb_readline_wrapper_cleanup): Add constructor,
2701 destructor. Now a class.
2702 (gdb_readline_wrapper_cleanup): Remove function.
2703 (gdb_readline_wrapper): Remove cleanups.
2704
2705 2018-03-27 Tom Tromey <tom@tromey.com>
2706
2707 * typeprint.h (struct type_print_options) <local_typedefs,
2708 global_typedefs>: Remove "struct" keyword.
2709 (class typedef_hash_table): New class.
2710 (recursively_update_typedef_hash, add_template_parameters)
2711 (create_typedef_hash, free_typedef_hash, copy_typedef_hash)
2712 (find_typedef_in_hash): Don't declare.
2713 * typeprint.c (struct typedef_hash_table): Move to typeprint.h.
2714 (typedef_hash_table::recursively_update): Rename from
2715 recursively_update_typedef_hash. Now a member.
2716 (typedef_hash_table::add_template_parameters): Rename from
2717 add_template_parameters. Now a member.
2718 (typedef_hash_table::typedef_hash_table): Now a constructor;
2719 rename from create_typedef_hash.
2720 (typedef_hash_table::~typedef_hash_table): Now a destructor;
2721 rename from free_typedef_hash.
2722 (do_free_typedef_hash, make_cleanup_free_typedef_hash)
2723 (do_free_global_table): Remove.
2724 (typedef_hash_table::typedef_hash_table): New constructor; renamed
2725 from copy_type_recursive.
2726 (create_global_typedef_table): Remove.
2727 (typedef_hash_table::find_global_typedef): Now a member of
2728 typedef_hash_table.
2729 (typedef_hash_table::find_typedef): Rename from
2730 find_typedef_in_hash; now a member.
2731 (whatis_exp): Update.
2732 * extension.h (struct ext_lang_type_printers): Add constructor and
2733 destructor.
2734 (start_ext_lang_type_printers, free_ext_lang_type_printers): Don't
2735 declare.
2736 * extension.c (ext_lang_type_printers::ext_lang_type_printers):
2737 Now a constructor; rename from start_ext_lang_type_printers.
2738 (ext_lang_type_printers): Now a destructor; rename from
2739 free_ext_lang_type_printers.
2740 * c-typeprint.c (find_typedef_for_canonicalize, c_print_type_1):
2741 Update.
2742 (c_type_print_base_struct_union): Update. Remove cleanups.
2743
2744 2018-03-27 Tom Tromey <tom@tromey.com>
2745
2746 * dwarf-index-write.c: Include <cmath>.
2747
2748 2018-03-27 Joel Brobecker <brobecker@adacore.com>
2749
2750 * NEWS: Add entry describing new "set|show varsize-limit" command.
2751 * ada-lang.c (_initialize_ada_language): Add "set/show varsize-limit"
2752 command.
2753 * printcmd.c (_initialize_printcmd): Add "set var" alias of
2754 "set variable".
2755
2756 2018-03-27 Simon Marchi <simon.marchi@ericsson.com>
2757
2758 * Makefile.in (COMMON_SFILES): Add dwarf-index-common.c and
2759 dwarf-index-write.c
2760 (HFILES_NO_SRCDIR): Add dwarf-index-common.h and dwarf2read.h.
2761 * dwarf-index-common.c: New file.
2762 * dwarf-index-common.h: New file.
2763 * dwarf-index-write.c: New file.
2764 * dwarf2read.c: Include dwarf2read.h and dwarf-index-common.h.
2765 (struct dwarf2_section_info): Move from here.
2766 (dwarf2_section_info_def): Likewise.
2767 (DEF_VEC_O (dwarf2_section_info_def)): Likewise.
2768 (offset_type): Likewise.
2769 (DW2_GDB_INDEX_SYMBOL_STATIC_SET_VALUE): Likewise.
2770 (DW2_GDB_INDEX_SYMBOL_KIND_SET_VALUE): Likewise.
2771 (DW2_GDB_INDEX_CU_SET_VALUE): Likewise.
2772 (byte_swap): Likewise.
2773 (MAYBE_SWAP): Likewise.
2774 (dwarf2_per_cu_ptr): Likewise.
2775 (DEF_VEC_P (dwarf2_per_cu_ptr)): Likewise.
2776 (struct tu_stats): Likewise.
2777 (struct dwarf2_per_objfile): Likewise.
2778 (struct dwarf2_per_cu_data): Likewise.
2779 (struct signatured_type): Likewise.
2780 (sig_type_ptr): Likewise.
2781 (DEF_VEC_P (sig_type_ptr)): Likewise.
2782 (INDEX4_SUFFIX): Likewise.
2783 (INDEX5_SUFFIX): Likewise.
2784 (DEBUG_STR_SUFFIX): Likewise.
2785 (dwarf2_read_section): Make non-static.
2786 (mapped_index_string_hash): Move from here.
2787 (dwarf5_djb_hash): Likewise.
2788 (file_write): Likewise.
2789 (class data_buf): Likewise.
2790 (struct symtab_index_entry): Likewise.
2791 (struct mapped_symtab): Likewise.
2792 (find_slot): Likewise.
2793 (hash_expand): Likewise.
2794 (add_index_entry): Likewise.
2795 (uniquify_cu_indices): Likewise.
2796 (class c_str_view): Likewise.
2797 (class c_str_view_hasher): Likewise.
2798 (class vector_hasher): Likewise.
2799 (write_hash_table): Likewise.
2800 (psym_index_map): Likewise.
2801 (struct addrmap_index_data): Likewise.
2802 (add_address_entry): Likewise.
2803 (add_address_entry_worker): Likewise.
2804 (write_address_map): Likewise.
2805 (symbol_kind): Likewise.
2806 (write_psymbols): Likewise.
2807 (struct signatured_type_index_data): Likewise.
2808 (write_one_signatured_type): Likewise.
2809 (recursively_count_psymbols): Likewise.
2810 (recursively_write_psymbols): Likewise.
2811 (class debug_names): Likewise.
2812 (check_dwarf64_offsets): Likewise.
2813 (psyms_seen_size): Likewise.
2814 (write_gdbindex): Likewise.
2815 (write_debug_names): Likewise.
2816 (assert_file_size): Likewise.
2817 (write_psymtabs_to_index): Likewise.
2818 (save_gdb_index_command): Likewise.
2819 (_initialize_dwarf2_read): Don't register the "save gdb-index"
2820 command.
2821 * dwarf2read.h: New file.
2822
2823 2018-03-27 Joel Brobecker <brobecker@adacore.com>
2824
2825 PR gdb/22670
2826 * dwarf2read.c (dwarf2_physname): Do not return the demangled
2827 symbol name if the CU's language stores symbol names in linkage
2828 format.
2829 * language.h (struct language_defn)
2830 <la_store_sym_names_in_linkage_form_p>: New field. Adjust
2831 all instances of this struct.
2832
2833 2018-03-26 Tom Tromey <tom@tromey.com>
2834
2835 * stack.c (backtrace_command_1): Remove verbose code.
2836
2837 2018-03-26 Tom Tromey <tom@tromey.com>
2838
2839 * python/py-framefilter.c (py_print_type): Don't catch
2840 exceptions. Return void.
2841 (py_print_value): Likewise.
2842 (py_print_single_arg): Likewise.
2843 (enumerate_args): Don't catch exceptions.
2844 (py_print_args): Likewise.
2845 (py_print_frame): Likewise.
2846 (gdbpy_apply_frame_filter): Catch exceptions here.
2847
2848 2018-03-26 Tom Tromey <tom@tromey.com>
2849
2850 * stack.c (_initialize_stack): Remove trailing newlines from help
2851 text. Add "Usage" line to "backtrace" help.
2852
2853 2018-03-26 Tom Tromey <tom@tromey.com>
2854
2855 PR python/16486:
2856 * python/py-framefilter.c (py_print_args): Call wrap_hint.
2857
2858 2018-03-26 Tom Tromey <tom@tromey.com>
2859
2860 * python/py-framefilter.c (py_print_single_arg): Return
2861 EXT_LANG_BT_ERROR from catch.
2862
2863 2018-03-26 Tom Tromey <tom@tromey.com>
2864
2865 PR backtrace/15584:
2866 * stack.c (backtrace_command_1): Move some code into no-filters
2867 "if".
2868
2869 2018-03-26 Tom Tromey <tom@tromey.com>
2870
2871 * python/py-framefilter.c (throw_quit_or_print_exception): New
2872 function.
2873 (gdbpy_apply_frame_filter): Use it.
2874
2875 2018-03-26 Tom Tromey <tom@tromey.com>
2876
2877 PR cli/17716:
2878 * python/py-framefilter.c (py_print_type, py_print_value)
2879 (enumerate_args, py_print_args, gdbpy_apply_frame_filter): Use
2880 RETURN_MASK_ERROR.
2881
2882 2018-03-26 Tom Tromey <tom@tromey.com>
2883
2884 * python/py-framefilter.c (enumerate_args): Use
2885 gdb::unique_xmalloc_ptr.
2886
2887 2018-03-26 Tom Tromey <tom@tromey.com>
2888
2889 * python/py-framefilter.c (py_print_frame): Return
2890 EXT_LANG_BT_OK.
2891 (gdbpy_apply_frame_filter): Update comment.
2892 * extension.h (enum ext_lang_bt_status) <EXT_LANG_BT_COMPLETED>:
2893 Remove.
2894 <EXT_LANG_BT_NO_FILTERS>: Change value.
2895
2896 2018-03-26 Tom Tromey <tom@tromey.com>
2897
2898 PR backtrace/15582:
2899 * stack.c (backtrace_command): Parse "hide" argument.
2900 * python/py-framefilter.c (py_print_frame): Handle PRINT_HIDE.
2901 * extension.h (enum frame_filter_flags) <PRINT_HIDE>: New
2902 constant.
2903
2904 2018-03-26 Tom Tromey <tom@tromey.com>
2905
2906 * stack.c (backtrace_command_1): Remove "show_locals" parameter,
2907 add "flags".
2908 (backtrace_command): Remove "fulltrace", add "flags".
2909
2910 2018-03-26 Tom Tromey <tom@tromey.com>
2911
2912 * stack.c (backtrace_command): Rewrite command line parsing.
2913
2914 2018-03-26 Simon Marchi <simon.marchi@ericsson.com>
2915
2916 * dwarf2read.c (DEF_VEC_I(offset_type)): Remove.
2917
2918 2018-03-26 Simon Marchi <simon.marchi@ericsson.com>
2919
2920 * filename-seen-cache.h: Add include guard.
2921
2922 2018-03-26 Keith Seitz <keiths@redhat.com>
2923
2924 * symfile.c (place_section): Remove "struct" from section_addr_info
2925 in comment.
2926 * windows-nat.c (struct safe_symbol_file_add_args) <addrs>: Remove
2927 "struct" keyword from section_addr_info.
2928
2929 2018-03-26 Alan Hayward <alan.hayward@arm.com>
2930
2931 * regformats/regdef.h (reg): Add constructors.
2932
2933 2018-03-25 Pedro Alves <palves@redhat.com>
2934
2935 * eval.c (evaluate_funcall): Swap OP_VAR_MSYM_VALUE/OP_VAR_VALUE
2936 if then/else bodies in var_func_name extraction.
2937
2938 2018-03-23 Weimin Pan <weimin.pan@oracle.com>
2939
2940 * minsyms.c (lookup_minimal_symbol_and_objfile): Use
2941 lookup_minimal_symbol() to find symbol entry.
2942 * minsyms.h (lookup_minimal_symbol_and_objfile): Update comment.
2943
2944 2018-03-23 Keith Seitz <keiths@redhat.com>
2945
2946 PR c++/22968
2947 * dwarf2read.c (scan_partial_symbols): Scan structs/classes for
2948 nested type definitions for C++, too.
2949
2950 2018-03-23 Tom Tromey <tom@tromey.com>
2951
2952 * machoread.c (struct oso_el): Add a constructor. Don't define as
2953 a typedef.
2954 (macho_register_oso): Remove.
2955 (macho_symtab_read): Take a std::vector.
2956 (oso_el_compare_name): Now a std::sort comparator.
2957 (macho_symfile_read_all_oso): Take a std::vector.
2958 (macho_symfile_read): Use std::vector. Remove cleanups.
2959
2960 2018-03-22 Tom Tromey <tom@tromey.com>
2961
2962 * record-full.c (record_full_exec_insn): Use gdb::byte_vector.
2963 (record_full_goto_bookmark): Use std::string.
2964
2965 2018-03-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
2966
2967 PR tdep/18295
2968 * rs6000-tdep.c (skip_prologue): Match both stwux and stdux
2969 a single mask.
2970
2971 2018-03-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
2972
2973 * rs6000-tdep.c (store_insn_p): New function.
2974 (skip_prologue): New variable alloca_reg_offset. Set lr_reg
2975 and cr_reg to their unshifted values. Use store_insn_p to
2976 match LR saves using either R1 or fdata->alloca_reg. Use
2977 store_insn_p to match CR saves. Set alloca_reg_offset
2978 when alloca_reg and framep are set. Remove lr_reg shift
2979 when assigning to fdata->lr_register.
2980
2981 2018-03-22 Andreas Arnez <arnez@linux.vnet.ibm.com>
2982
2983 * linux-tdep.c (linux_info_proc): For "info proc cmdline", print
2984 command line args instead of emitting a warning.
2985
2986 2018-03-22 Simon Marchi <simon.marchi@polymtl.ca>
2987
2988 * tracepoint.h (struct static_tracepoint_marker): Initialize
2989 fields, define default constructor, move constructor and move
2990 assignment, disable the rest.
2991 <str_id, extra>: Make std::string.
2992 (release_static_tracepoint_marker): Remove.
2993 (free_current_marker): Remove.
2994 * tracepoint.c (free_current_marker): Remove.
2995 (parse_static_tracepoint_marker_definition): Adjust to
2996 std::string, use new hex2str overload.
2997 (release_static_tracepoint_marker): Remove.
2998 (print_one_static_tracepoint_marker): Get marker by reference
2999 and adjust to std::string.
3000 (info_static_tracepoint_markers_command): Adjust to std::vector
3001 changes
3002 * target.h (static_tracepoint_marker_p): Remove typedef.
3003 (DEF_VEC_P(static_tracepoint_marker_p)): Remove.
3004 (struct target_ops) <to_static_tracepoint_marker_at>: Return
3005 bool.
3006 <to_static_tracepoint_markers_by_strid>: Return std::vector.
3007 * target-debug.h
3008 (target_debug_print_VEC_static_tracepoint_marker_p_p): Remove.
3009 (target_debug_print_std_vector_static_tracepoint_marker): New.
3010 (target_debug_print_struct_static_tracepoint_marker_p): Rename
3011 to...
3012 (target_debug_print_static_tracepoint_marker_p): ... this.
3013 * target-delegates.c: Re-generate.
3014 * breakpoint.h (struct tracepoint) <static_trace_marker_id>:
3015 Make std::string.
3016 * breakpoint.c (init_breakpoint_sal): Adjust to std::string.
3017 (decode_static_tracepoint_spec): Adjust to std::vector.
3018 (tracepoint_print_one_detail): Adjust to std::string.
3019 (strace_marker_decode_location): Adjust to std::string.
3020 (update_static_tracepoint): Adjust to std::string, remove call
3021 to release_static_tracepoint_marker.
3022 * linux-nat.c (linux_child_static_tracepoint_markers_by_strid):
3023 Adjust to std::vector.
3024 * remote.c (remote_static_tracepoint_marker_at): Return bool.
3025 (remote_static_tracepoint_markers_by_strid): Adjust to
3026 std::vector.
3027 * common/rsp-low.h (hex2str): New overload with explicit count
3028 of bytes.
3029 * common/rsp-low.c (hex2str): New overload with explicit count
3030 of bytes.
3031 * unittests/rsp-low-selftests.c (test_hex2str): New function.
3032 (_initialize_rsp_low_selftests): Add test_hex2str test.
3033 * unittests/tracepoint-selftests.c
3034 (test_parse_static_tracepoint_marker_definition): Adjust to
3035 std::string.
3036
3037 2018-03-22 Simon Marchi <simon.marchi@polymtl.ca>
3038
3039 * tracepoint.c (parse_static_tracepoint_marker_definition):
3040 Consider case where the definition is followed by more
3041 definitions.
3042 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
3043 tracepoint-selftests.c.
3044 * unittests/tracepoint-selftests.c: New.
3045
3046 2018-03-21 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
3047
3048 * MAINTAINERS (Write After Approval): Add Pedro Franco de
3049 Carvalho.
3050
3051 2018-03-20 Stephen Roberts <stephen.roberts@arm.com>
3052
3053 * symtab.c (find_pc_sect_line): fixed indentation.
3054
3055 2018-03-20 Stephen Roberts <stephen.roberts@arm.com>
3056
3057 * symtab.c (find_pc_sect_line): now uses binary search.
3058
3059 2018-03-19 Tom Tromey <tom@tromey.com>
3060
3061 * rust-exp.y (struct_expr_tail, struct_expr_list): Add plain
3062 "IDENT" production.
3063
3064 2018-03-19 Pedro Alves <palves@redhat.com>
3065 Tom Tromey <tom@tromey.com>
3066
3067 * unittests/observable-selftests.c: New file.
3068 * common/observable.h: New file.
3069 * observable.h: New file.
3070 * ada-lang.c, ada-tasks.c, agent.c, aix-thread.c, annotate.c,
3071 arm-tdep.c, auto-load.c, auxv.c, break-catch-syscall.c,
3072 breakpoint.c, bsd-uthread.c, cli/cli-interp.c, cli/cli-setshow.c,
3073 corefile.c, dummy-frame.c, event-loop.c, event-top.c, exec.c,
3074 extension.c, frame.c, gdbarch.c, guile/scm-breakpoint.c,
3075 infcall.c, infcmd.c, inferior.c, inflow.c, infrun.c, jit.c,
3076 linux-tdep.c, linux-thread-db.c, m68klinux-tdep.c,
3077 mi/mi-cmd-break.c, mi/mi-interp.c, mi/mi-main.c, objfiles.c,
3078 ppc-linux-nat.c, ppc-linux-tdep.c, printcmd.c, procfs.c,
3079 python/py-breakpoint.c, python/py-finishbreakpoint.c,
3080 python/py-inferior.c, python/py-unwind.c, ravenscar-thread.c,
3081 record-btrace.c, record-full.c, record.c, regcache.c, remote.c,
3082 riscv-tdep.c, sol-thread.c, solib-aix.c, solib-spu.c, solib.c,
3083 spu-multiarch.c, spu-tdep.c, stack.c, symfile-mem.c, symfile.c,
3084 symtab.c, thread.c, top.c, tracepoint.c, tui/tui-hooks.c,
3085 tui/tui-interp.c, valops.c: Update all users.
3086 * tui/tui-hooks.c (tui_bp_created_observer)
3087 (tui_bp_deleted_observer, tui_bp_modified_observer)
3088 (tui_inferior_exit_observer, tui_before_prompt_observer)
3089 (tui_normal_stop_observer, tui_register_changed_observer):
3090 Remove.
3091 (tui_observers_token): New global.
3092 (attach_or_detach, tui_attach_detach_observers): New functions.
3093 (tui_install_hooks, tui_remove_hooks): Use
3094 tui_attach_detach_observers.
3095 * record-btrace.c (record_btrace_thread_observer): Remove.
3096 (record_btrace_thread_observer_token): New global.
3097 * observer.sh: Remove.
3098 * observer.c: Rename to observable.c.
3099 * observable.c (namespace gdb_observers): Define new objects.
3100 (observer_debug): Move into gdb_observers namespace.
3101 (struct observer, struct observer_list, xalloc_observer_list_node)
3102 (xfree_observer_list_node, generic_observer_attach)
3103 (generic_observer_detach, generic_observer_notify): Remove.
3104 (_initialize_observer): Update.
3105 Don't include observer.inc.
3106 * Makefile.in (generated_files): Remove observer.h, observer.inc.
3107 (clean mostlyclean): Likewise.
3108 (observer.h, observer.inc): Remove targets.
3109 (SUBDIR_UNITTESTS_SRCS): Add observable-selftests.c.
3110 (COMMON_SFILES): Use observable.c, not observer.c.
3111 * .gitignore: Remove observer.h.
3112
3113 2018-03-18 Tom Tromey <tom@tromey.com>
3114
3115 * solib.c (gdb_bfd_lookup_symbol_from_symtab): Use
3116 gdb::def_vector.
3117 (bfd_lookup_symbol_from_dyn_symtab): Likewise.
3118
3119 2018-03-17 Tom Tromey <tom@tromey.com>
3120
3121 * auto-load.c (auto_load_objfile_script_1): Use std::string.
3122
3123 2018-03-17 Tom Tromey <tom@tromey.com>
3124
3125 * target.c (class scoped_target_fd): New.
3126 (target_fileio_close_cleanup): Remove.
3127 (target_fileio_read_alloc_1): Use scoped_target_fd.
3128
3129 2018-03-16 Simon Marchi <simon.marchi@polymtl.ca>
3130
3131 * silent-rules.mk: New.
3132 * Makefile.in: Include silent-rules.mk
3133 (srcdir, VPATH, top_srcdir): Move up.
3134 (COMPILE): Add ECHO_CXX.
3135 (test-cp-name-parser$(EXEEXT)): Add ECHO_CXXLD.
3136 (init.c): Add ECHO_INIT_C.
3137 (gdb$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
3138 (version.c): Add ECHO_GEN.
3139 (printcmd.o): Add ECHO_CXX.
3140 (target-float.o): Add ECHO_CXX.
3141 (ada-exp.o): Add ECHO_CXX.
3142 (stamp-xml): Add SILENCE and ECHO_GEN_XML_BUILTIN.
3143 (insight$(EXEEXT)): Add ECHO_CXXLD.
3144 * gnulib/configure.ac: Add AM_SILENT_RULES.
3145 * gnulib/aclocal.m4: Re-generate.
3146 * gnulib/configure: Re-generate.
3147 * gnulib/import/Makefile.in: Re-generate.
3148
3149 2018-03-16 Tom Tromey <tom@tromey.com>
3150
3151 * xcoffread.c (xcoff_symfile_offsets): Change type of "addrs".
3152 * utils.h (make_cleanup_free_section_addr_info): Don't declare.
3153 * utils.c (do_free_section_addr_info)
3154 (make_cleanup_free_section_addr_info): Remove.
3155 * symfile.h (struct other_sections): Add constructor.
3156 (struct section_addr_info): Remove.
3157 (section_addr_info): New typedef.
3158 (struct sym_fns) <sym_offsets>: Change type of parameter.
3159 (build_section_addr_info_from_objfile)
3160 (relative_addr_info_to_section_offsets, addr_info_make_relative)
3161 (default_symfile_offsets, symbol_file_add)
3162 (symbol_file_add_from_bfd)
3163 (build_section_addr_info_from_section_table): Update.
3164 (alloc_section_addr_info, free_section_addr_info): Don't declare.
3165 * symfile.c (alloc_section_addr_info): Remove.
3166 (build_section_addr_info_from_section_table): Change return type.
3167 Update.
3168 (build_section_addr_info_from_bfd)
3169 (build_section_addr_info_from_objfile): Likewise.
3170 (free_section_addr_info): Remove.
3171 (relative_addr_info_to_section_offsets): Change type of "addrs".
3172 (addrs_section_compar): Now a std::sort comparator.
3173 (addrs_section_sort): Change return type.
3174 (addr_info_make_relative): Change type of "addrs". Update.
3175 (default_symfile_offsets, syms_from_objfile_1)
3176 (syms_from_objfile, symbol_file_add_with_addrs): Likewise.
3177 (symbol_file_add_separate): Update.
3178 (symbol_file_add): Change type of "addrs". Update.
3179 (add_symbol_file_command): Update. Remove cleanups.
3180 * symfile-mem.c (symbol_file_add_from_memory): Update. Remove
3181 cleanups.
3182 * symfile-debug.c (debug_sym_offsets): Change type of "info".
3183 * solib.c (solib_read_symbols): Update.
3184 * objfiles.c (objfile_relocate): Update. Remove cleanups.
3185 * machoread.c (macho_symfile_offsets): Update.
3186 * jit.c (jit_bfd_try_read_symtab): Update.
3187
3188 2018-03-15 Simon Marchi <simon.marchi@polymtl.ca>
3189
3190 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
3191 unittests/utils-selftests.c.
3192 * unittests/utils-selftests.c: New file.
3193
3194 2018-03-14 Tom Tromey <tom@tromey.com>
3195
3196 PR cli/14977:
3197 * printcmd.c (printf_c_string, printf_wide_c_string): Special case
3198 for NULL.
3199
3200 2018-03-14 Tom Tromey <tom@tromey.com>
3201
3202 PR cli/19918:
3203 * printcmd.c (printf_pointer): Allow "-" in format.
3204
3205 2018-03-14 Tom Tromey <tom@tromey.com>
3206
3207 * printcmd.c (_initialize_printcmd): Add usage to printf.
3208
3209 2018-03-14 Yao Qi <qiyao@sourceware.org>
3210
3211 * MAINTAINERS: Update my email address.
3212
3213 2018-03-13 Tom Tromey <tom@tromey.com>
3214
3215 * machoread.c (macho_check_dsym): Change filenamep to a
3216 std::string*.
3217 (macho_symfile_read): Update.
3218 * symfile.c (load_command): Use std::string.
3219
3220 2018-03-12 Andrew Burgess <andrew.burgess@embecosm.com>
3221
3222 * riscv-tdep.c (riscv_sw_breakpoint_from_kind): Add localization
3223 to error message string.
3224 (riscv_register_name): Use xsnprintf instead of sprintf.
3225 (riscv_insn::fetch_instruction): Use gdb_assert instead of
3226 internal_error.
3227 (riscv_print_arg_location): Use gdb_assert_not_reached instead of
3228 error.
3229 (riscv_push_dummy_call): Likewise.
3230
3231 2018-03-12 Tom Tromey <tom@tromey.com>
3232
3233 * rs6000-aix-tdep.c (rs6000_aix_core_xfer_shared_libraries_aix):
3234 Use gdb::byte_vector.
3235 * arm-tdep.c (arm_exidx_new_objfile): Use gdb::byte_vector.
3236
3237 2018-03-12 Yao Qi <yao.qi@linaro.org>
3238
3239 * ia64-libunwind-tdep.c (libunwind_get_reg_special): Change
3240 parameter type to readable_regcache.
3241 * ia64-libunwind-tdep.h (libunwind_get_reg_special): Update
3242 the declaration.
3243
3244 2018-03-11 Tom Tromey <tom@tromey.com>
3245
3246 * dwarf2read.c (struct nextfield): Add initializers.
3247 (struct nextfnfield): Remove.
3248 (struct fnfieldlist): Add initializers. Remove "length" and
3249 "head", use std::vector.
3250 (struct decl_field_list): Remove.
3251 (struct field_info): Add initializers.
3252 <fields, baseclasses>: Now std::vector.
3253 <nbaseclasses, nfnfields, typedef_field_list_count,
3254 nested_types_list_count>: Remove.
3255 (dwarf2_add_field, dwarf2_add_type_defn)
3256 (dwarf2_attach_fields_to_type, dwarf2_add_member_fn)
3257 (dwarf2_attach_fn_fields_to_type, handle_struct_member_die)
3258 (process_structure_scope): Update.
3259
3260 2018-03-11 Tom Tromey <tom@tromey.com>
3261
3262 * dwarf2read.c (sort_tu_by_abbrev_offset): Change to be suitable
3263 for use by std::sort.
3264 (build_type_psymtabs_1): Use std::vector.
3265
3266 2018-03-09 Eli Zaretskii <eliz@gnu.org>
3267
3268 * top.c (print_gdb_configuration): Reflect LIBIPT, LIBMEMCHECK,
3269 and LIBMPFR in the printed configuration.
3270
3271 2018-03-08 Tom Tromey <tom@tromey.com>
3272
3273 * source.c (get_filename_and_charpos): Use scoped_fd.
3274 * nto-procfs.c (procfs_open_1): Use scoped_fd.
3275 (procfs_pidlist): Likewise.
3276 * procfs.c (proc_get_LDT_entry): Use scoped_fd.
3277 (iterate_over_mappings): Likewise.
3278
3279 2018-03-08 Tom Tromey <tom@tromey.com>
3280
3281 * infcall.c (struct call_return_meta_info)
3282 <stack_temporaries_enabled>: Remove.
3283 (get_call_return_value, call_function_by_hand_dummy): Update.
3284 * thread.c (disable_thread_stack_temporaries): Remove.
3285 (enable_thread_stack_temporaries): Remove.
3286 (thread_stack_temporaries_enabled_p): Return bool.
3287 (push_thread_stack_temporary, value_in_thread_stack_temporaries)
3288 (get_last_thread_stack_temporary): Update.
3289 * eval.c (evaluate_subexp): Update.
3290 * gdbthread.h (class enable_thread_stack_temporaries): Now a
3291 class, not a function.
3292 (value_ptr, value_vec): Remove typedefs.
3293 (class thread_info) <stack_temporaries_enabled>: Now bool.
3294 <stack_temporaries>: Now a std::vector.
3295 (thread_stack_temporaries_enabled_p)
3296 (value_in_thread_stack_temporaries): Return bool.
3297
3298 2018-03-08 Simon Marchi <simon.marchi@ericsson.com>
3299
3300 * remote.c (putpkt_binary): Fix omitted bytes reporting.
3301 (getpkt_or_notif_sane_1): Likewise.
3302
3303 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
3304
3305 * build-id.c (build_id_to_debug_bfd): Use std::string.
3306
3307 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
3308
3309 * build-id.c (find_separate_debug_file_by_buildid): Return
3310 std::string.
3311 * build-id.h (find_separate_debug_file_by_buildid): Return
3312 std::string.
3313 * coffread.c (coff_symfile_read): Adjust to std::string.
3314 * elfread.c (elf_symfile_read): Adjust to std::string.
3315 * symfile.c (separate_debug_file_exists): Change parameter to
3316 std::string.
3317 (find_separate_debug_file): Return std::string.
3318 (find_separate_debug_file_by_debuglink): Return std::string.
3319 * symfile.h (find_separate_debug_file_by_debuglink): Return
3320 std::string.
3321
3322 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
3323
3324 * common/xml-utils.c (xml_escape_text): Move code to...
3325 (xml_escape_text_append): ... this new function.
3326 * common/xml-utils.h (xml_escape_text_append): New declaration.
3327 * unittests/xml-utils-selftests.c (test_xml_escape_text_append):
3328 New function.
3329 (_initialize_xml_utils): register test_xml_escape_text_append as
3330 a selftest.
3331
3332 2018-03-07 Alan Hayward <alan.hayward@arm.com>
3333
3334 * defs.h: Remove MAX_REGISTER_SIZE.
3335 * regcache.c (init_regcache_descr): Remove MAX_REGISTER_SIZE
3336 asserts.
3337 * python/py-unwind.c (pyuw_sniffer): Likewise.
3338
3339 2018-03-07 Tom Tromey <tom@tromey.com>
3340
3341 * linux-tdep.c (linux_info_proc): Update.
3342 * target.h (struct target_ops) <to_fileio_readlink>: Return
3343 optional<string>.
3344 (target_fileio_readlink): Return optional<string>.
3345 * remote.c (remote_hostio_readlink): Return optional<string>.
3346 * inf-child.c (inf_child_fileio_readlink): Return
3347 optional<string>.
3348 * target.c (target_fileio_readlink): Return optional<string>.
3349
3350 2018-03-07 Andrew Burgess <andrew.burgess@embecosm.com>
3351
3352 * regcache.c (cooked_read_test): Add riscv to the list of
3353 architectures that have a save_reggroup.
3354
3355 2018-03-07 Andreas Arnez <arnez@linux.vnet.ibm.com>
3356
3357 * gnu-v3-abi.c (gnuv3_rtti_type): Add early exit if the given
3358 value is not a dynamic class object.
3359
3360 2018-03-06 Tom Tromey <tom@tromey.com>
3361
3362 * rust-exp.y: Formatting fixes.
3363
3364 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
3365
3366 * riscv-tdep.c (riscv_register_name): Remove target description
3367 support.
3368 (riscv_gdbarch_init): Remove target description check.
3369
3370 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
3371
3372 * riscv-tdep.c: Remove 'Contributed by ...' lines from header
3373 comment.
3374 * riscv-tdep.h: Likewise.
3375
3376 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
3377
3378 * riscv-tdep.c (riscv_pseudo_register_read): Delete.
3379 (riscv_pseudo_register_write): Delete.
3380 (riscv_gdbarch_init): Remove all use of pseudo registers.
3381
3382 2018-03-06 Simon Marchi <simon.marchi@polymtl.ca>
3383
3384 * record-btrace.c (btrace_print_lines): Replace cleanup
3385 parameter with RAII equivalents.
3386 (btrace_insn_history): Replace cleanup with RAII equivalents.
3387 * ui-out.h (make_cleanup_ui_out_list_begin_end,
3388 make_cleanup_ui_out_tuple_begin_end): Remove.
3389 * ui-out.c (struct ui_out_end_cleanup_data, do_cleanup_end,
3390 make_cleanup_ui_out_end, make_cleanup_ui_out_tuple_begin_end,
3391 make_cleanup_ui_out_list_begin_end): Remove.
3392
3393 2018-03-06 Simon Marchi <simon.marchi@polymtl.ca>
3394
3395 * record-btrace.c (record_btrace_maybe_mark_async_event): Change
3396 parameter types to std::vector. Use bool.
3397 (record_btrace_wait): Replace VEC(tp_t) with
3398 std::vector<thread_info *>.
3399 * common/gdb_vecs.h (unordered_remove, ordered_remove): New.
3400
3401 2018-03-06 Simon Marchi <simon.marchi@polymtl.ca>
3402
3403 * record-btrace.c (record_btrace_disable_callback): Remove.
3404 (struct scoped_btrace_disable): New.
3405 (record_btrace_open): Use scoped_btrace_disable.
3406
3407 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
3408
3409 * riscv-tdep.c (riscv_return_value): Change type to ULONGEST for
3410 reading values from registers.
3411
3412 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
3413
3414 * riscv-tdep.c (riscv_push_dummy_call): Use core_addr_to_string_nz
3415 where appropriate.
3416
3417 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
3418
3419 * riscv-tdep.c (riscv_print_arg_location): Add header comment,
3420 change parameter type. Use GDB's print functions, and use
3421 core_addr_to_string where appropriate.
3422 (riscv_push_dummy_call): Use core_addr_to_string where
3423 appropriate, update call to riscv_print_arg_location, and reindent
3424 a few lines.
3425 (riscv_return_value): Update call to riscv_print_arg_location.
3426
3427 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
3428 Tim Newsome <tim@sifive.com>
3429 Albert Ou <a0u@eecs.berkeley.edu>
3430 Darius Rad <darius@bluespec.com>
3431
3432 * Makefile.in (ALL_TARGET_OBS): Add riscv-tdep.o
3433 (HFILES_NO_SRCDIR): Add riscv-tdep.h.
3434 (ALLDEPFILES): Add riscv-tdep.c
3435 * configure.tgt: Add riscv support.
3436 * riscv-tdep.c: New file.
3437 * riscv-tdep.h: New file.
3438 * NEWS: Mention new target.
3439 * MAINTAINERS: Add entry for riscv.
3440
3441 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
3442
3443 * amd64-tdep.c (amd64_classify_aggregate): Ignore zero sized
3444 fields within aggregates.
3445
3446 2018-03-04 Simon Marchi <simon.marchi@polymtl.ca>
3447
3448 * record-btrace.c (btrace_print_lines): Change type of flags to
3449 gdb_disassembly_flags.
3450
3451 2018-03-04 John Baldwin <jhb@FreeBSD.org>
3452
3453 * fbsd-nat.c: Include "inf-ptrace.h".
3454 (USE_SIGTRAP_SIGINFO): Conditionally define.
3455 [USE_SIGTRAP_SIGINFO] (fbsd_handle_debug_trap): New function.
3456 (fbsd_wait) [USE_SIGTRAP_SIGINFO]: Call "fbsd_handle_debug_trap".
3457 [USE_SIGTRAP_SIGINFO] (fbsd_stopped_by_sw_breakpoint): New
3458 function.
3459 [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_sw_breakpoint):
3460 Likewise.
3461 [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_hw_breakpoint):
3462 Likewise.
3463 (fbsd_nat_add_target) [USE_SIGTRAP_SIGINFO]: Set
3464 "stopped_by_sw_breakpoint", "supports_stopped_by_sw_breakpoint",
3465 "supports_stopped_by_hw_breakpoint" target methods.
3466
3467 2018-03-04 John Baldwin <jhb@FreeBSD.org>
3468
3469 * NEWS (Changes since GDB 8.1): Add "set/show debug fbsd-nat".
3470 * fbsd-nat.c (debug_fbsd_nat): New variable.
3471 (show_fbsd_nat_debug): New function.
3472 (fbsd_wait): Log LWP info if "debug_fbsd_nat" is enabled.
3473 (_initialize_fbsd_nat): Add "fbsd-nat" debug boolean command.
3474
3475 2018-03-04 John Baldwin <jhb@FreeBSD.org>
3476
3477 * nat/x86-dregs.c (x86_dr_stopped_by_hw_breakpoint): New function.
3478 * nat/x86-dregs.h (x86_dr_stopped_by_hw_breakpoint): New
3479 prototype.
3480 * x86-nat.c (x86_stopped_by_hw_breakpoint): New function.
3481 (x86_use_watchpoints): Set "stopped_by_hw_breakpoint" target
3482 method.
3483
3484 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
3485
3486 * common/gdb_vecs.c (free_char_ptr_vec): Remove.
3487 * common/gdb_vecs.h (free_char_ptr_vec): Remove.
3488
3489 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
3490
3491 * charset.c (struct charset_vector): New.
3492 (charsets): Change type to charset_vector.
3493 (find_charset_names): Adjust.
3494 (add_one): Adjust.
3495 (_initialize_charset): Adjust.
3496
3497 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
3498
3499 * progspace.h (struct program_space) <deleted_solibs>: Change
3500 type to std::vector<std::string>.
3501 * progspace.c (clear_program_space_solib_cache): Adjust.
3502 * breakpoint.c (print_solib_event): Adjust.
3503 (check_status_catch_solib): Adjust.
3504 * solib.c (update_solib_list): Adjust.
3505 * ui-out.h (class ui_out) <field_string>: New overload.
3506 * ui-out.c (ui_out::field_string): New overload.
3507
3508 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
3509
3510 * progspace.h (struct program_space): Add constructor and
3511 destructor, initialize fields.
3512 (add_program_space): Remove.
3513 * progspace.c (add_program_space): Rename to...
3514 (program_space::program_space): ... this.
3515 (release_program_space): Rename to...
3516 (program_space::~program_space): ... this.
3517 (delete_program_space): Use delete to delete program_space.
3518 (initialize_progspace): Use new to allocate program_space.
3519 * inferior.c (add_inferior_with_spaces): Likewise.
3520 (clone_inferior_command): Likewise.
3521 * infrun.c (follow_fork_inferior): Likewise.
3522 (handle_vfork_child_exec_or_exit): Likewise.
3523
3524 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
3525
3526 * common/gdb_vecs.h (make_cleanup_free_char_ptr_vec): Remove.
3527 (delim_string_to_char_ptr_vec): Return std::vector of
3528 gdb::unique_xmalloc_ptr.
3529 (dirnames_to_char_ptr_vec_append): Take std::vector of
3530 gdb::unique_xmalloc_ptr.
3531 (dirnames_to_char_ptr_vec): Return std::vector of
3532 gdb::unique_xmalloc_ptr.
3533 * common/gdb_vecs.c (delim_string_to_char_ptr_vec_append):
3534 Take std::vector of gdb::unique_xmalloc_ptr, adjust the code.
3535 (delim_string_to_char_ptr_vec): Return an std::vector of
3536 gdb::unique_xmalloc_ptr, adjust the code.
3537 (dirnames_to_char_ptr_vec_append): Take an std::vector of
3538 gdb::unique_xmalloc_ptr, adjust the code.
3539 (dirnames_to_char_ptr_vec): Return an std::vector of
3540 gdb::unique_xmalloc_ptr, adjust the code.
3541 * auto-load.c (auto_load_safe_path_vec): Change type to
3542 std::vector of gdb::unique_xmalloc_ptr.
3543 (auto_load_expand_dir_vars): Return an std::vector of
3544 gdb::unique_xmalloc_ptr, adjust the code.
3545 (auto_load_safe_path_vec_update): Adjust.
3546 (filename_is_in_auto_load_safe_path_vec): Adjust.
3547 (auto_load_objfile_script_1): Adjust.
3548 * build-id.c (build_id_to_debug_bfd): Adjust.
3549 * linux-thread-db.c (thread_db_load_search): Adjust.
3550 * source.c (add_path): Adjust.
3551 (openp): Adjust.
3552 * symfile.c (find_separate_debug_file): Adjust.
3553 * utils.c (do_free_char_ptr_vec): Remove.
3554 (make_cleanup_free_char_ptr_vec): Remove.
3555
3556 2018-03-01 Sergio Durigan Junior <sergiodj@redhat.com>
3557
3558 PR gdb/22907
3559 * common/pathstuff.c: Conditionally include "<windows.h>".
3560
3561 2018-03-01 Georg Sauthoff <mail@georg.so>
3562
3563 PR gdb/22888
3564 * gcore.in: Quote variables and switch interpreter to bash.
3565
3566 2018-03-01 Tom Tromey <tom@tromey.com>
3567
3568 * dwarf2read.c (alloc_discriminant_info): Fix default_index
3569 assertion. Add assertion for discriminant_index.
3570 (quirk_rust_enum): Use correct base type name in univariant case.
3571
3572 2018-03-01 Simon Marchi <simon.marchi@ericsson.com>
3573
3574 * record.c (get_call_history_modifiers): Return a
3575 record_print_flags.
3576 (cmd_record_call_history): Adjust.
3577 * record-btrace.c (record_btrace_call_history): Adjust.
3578 (record_btrace_call_history_range): Adjust.
3579 (record_btrace_call_history_from): Adjust.
3580 * target-debug.h (target_debug_print_record_print_flags): New.
3581 * target-delegates.c: Re-generate.
3582 * target.c (target_call_history): Change flags type.
3583 (target_call_history_from): Likewise.
3584 (target_call_history_range): Likewise.
3585 * target.h (struct target_ops) <target_call_history>: Likewise.
3586 (target_call_history_from): Likewise.
3587 (target_call_history_range): Likewise.
3588
3589 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
3590 Simon Marchi <simon.marchi@polymtl.ca>
3591
3592 * common/common-utils.c: Include "sys/stat.h".
3593 (is_regular_file): Move here from "source.c"; change return
3594 type to "bool".
3595 * common/common-utils.h (is_regular_file): New prototype.
3596 * common/pathstuff.c (contains_dir_separator): New function.
3597 * common/pathstuff.h (contains_dir_separator): New prototype.
3598 * source.c: Don't include "sys/stat.h".
3599 (is_regular_file): Move to "common/common-utils.c".
3600
3601 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
3602
3603 * Makefile.in (COMMON_SFILES): Add "common/pathstuff.c".
3604 (HFILES_NO_SRCDIR): Add "common/pathstuff.h".
3605 * auto-load.c: Include "common/pathstuff.h".
3606 * common/common-def.h (current_directory): Move here.
3607 * common/gdb_tilde_expand.c (gdb_tilde_expand_up): New
3608 function.
3609 * common/gdb_tilde_expand.h (gdb_tilde_expand_up): New
3610 prototype.
3611 * common/pathstuff.c: New file.
3612 * common/pathstuff.h: New file.
3613 * compile/compile.c: Include "common/pathstuff.h".
3614 * defs.h (current_directory): Move to "common/common-defs.h".
3615 * dwarf2read.c: Include "common/pathstuff.h".
3616 * exec.c: Likewise.
3617 * guile/scm-safe-call.c: Likewise.
3618 * linux-thread-db.c: Likewise.
3619 * main.c: Likewise.
3620 * nto-tdep.c: Likewise.
3621 * objfiles.c: Likewise.
3622 * source.c: Likewise.
3623 * symtab.c: Likewise.
3624 * utils.c: Include "common/pathstuff.h".
3625 (gdb_realpath): Move to "common/pathstuff.c".
3626 (gdb_realpath_keepfile): Likewise.
3627 (gdb_abspath): Likewise.
3628 * utils.h (gdb_realpath): Move to "common/pathstuff.h".
3629 (gdb_realpath_keepfile): Likewise.
3630 (gdb_abspath): Likewise.
3631
3632 2018-02-28 John Baldwin <jhb@FreeBSD.org>
3633
3634 * fbsd-nat.c (fbsd_resume): Use PT_SETSTEP for stepping and a
3635 wildcard process pid for super_resume for kernels with a
3636 specific bug.
3637
3638 2018-02-27 Phil Muldoon <pmuldoon@redhat.com>
3639
3640 * compile/compile.c (get_args): Add additional comments
3641 explaining function.
3642
3643 2018-02-27 Simon Marchi <simon.marchi@polymtl.ca>
3644 Tom Tromey <tom@tromey.com>
3645
3646 * target.h (memory_write_request_s): Remove typedef. Don't define
3647 VEC.
3648 (target_write_memory_blocks): Change argument to std::vector.
3649 (struct memory_write_request): Add constructor.
3650 * target-memory.c (compare_block_starting_address): Return bool.
3651 Change argument types.
3652 (claim_memory): Change arguments to use std::vector.
3653 (split_regular_and_flash_blocks, blocks_to_erase)
3654 (compute_garbled_blocks): Likewise.
3655 (cleanup_request_data, cleanup_write_requests_vector): Remove.
3656 (target_write_memory_blocks): Change argument to std::vector.
3657 * symfile.c (struct load_section_data): Add constructor and
3658 destructor. Use std::vector for "requests".
3659 (struct load_progress_data): Add initializers.
3660 (load_section_callback): Update. Use "new".
3661 (clear_memory_write_data): Remove.
3662 (generic_load): Update.
3663
3664 2018-02-27 Alan Hayward <alan.hayward@arm.com>
3665
3666 * arch/aarch64.h: Use common/tdesc.h.
3667
3668 2018-02-26 Maciej W. Rozycki <macro@mips.com>
3669
3670 * mips-tdep.c (mips_gdbarch_init): Don't use a 32-bit BFD
3671 architecture with a 64-bit ABI.
3672
3673 2018-02-26 Maciej W. Rozycki <macro@mips.com>
3674
3675 * gdb/mips-tdep.c (mips_gdbarch_init): Reorder ABI determination
3676 ahead of target description loading.
3677
3678 2018-02-26 Tom Tromey <tom@tromey.com>
3679
3680 * stack.c (backtrace_command_1): Update.
3681 * python/python-internal.h (gdbpy_apply_frame_filter): Change type
3682 of "flags".
3683 * python/py-framefilter.c (py_print_frame)
3684 (gdbpy_apply_frame_filter): Change type of "flags".
3685 * mi/mi-cmd-stack.c (mi_apply_ext_lang_frame_filter): Change type
3686 of "flags".
3687 (mi_cmd_stack_list_frames, mi_cmd_stack_list_locals)
3688 (mi_cmd_stack_list_args, mi_cmd_stack_list_variables): Update.
3689 * extension.h (enum frame_filter_flag): Rename from
3690 frame_filter_flags.
3691 (frame_filter_flags): Define using DEF_ENUM_FLAGS_TYPE.
3692 (apply_ext_lang_frame_filter): Change type of "flags".
3693 * extension.c (apply_ext_lang_frame_filter): Change type of
3694 "flags".
3695 * extension-priv.h (struct extension_language_ops)
3696 <apply_frame_filter>: Change type of "flags".
3697
3698 2018-02-26 Tom Tromey <tom@tromey.com>
3699
3700 PR python/16497:
3701 * stack.c (backtrace_command_1): Set PRINT_MORE_FRAMES flag. Fix
3702 off-by-one in py_end computation.
3703 * python/py-framefilter.c (gdbpy_apply_frame_filter): Handle
3704 PRINT_MORE_FRAMES.
3705 * extension.h (enum frame_filter_flags) <PRINT_MORE_FRAMES>: New
3706 constant.
3707
3708 2018-02-26 Tom Tromey <tom@tromey.com>
3709
3710 * dwarf2read.c (struct variant_field): New.
3711 (struct nextfield) <variant>: New field.
3712 (dwarf2_add_field): Handle DW_TAG_variant_part.
3713 (dwarf2_attach_fields_to_type): Attach a discriminant_info to a
3714 discriminated union.
3715 (read_structure_type): Handle DW_TAG_variant_part.
3716 (handle_struct_member_die): New function, extracted from
3717 process_structure_scope. Handle DW_TAG_variant.
3718 (process_structure_scope): Handle discriminated unions. Call
3719 handle_struct_member_die.
3720
3721 2018-02-26 Tom Tromey <tom@tromey.com>
3722
3723 * rust-lang.h (rust_last_path_segment): Declare.
3724 * rust-lang.c (rust_last_path_segment): Now public. Change
3725 contract.
3726 (struct disr_info): Remove.
3727 (RUST_ENUM_PREFIX, RUST_ENCODED_ENUM_REAL)
3728 (RUST_ENCODED_ENUM_HIDDEN, rust_union_is_untagged)
3729 (rust_get_disr_info, rust_tuple_variant_type_p): Remove.
3730 (rust_enum_p, rust_enum_variant): New function.
3731 (rust_underscore_fields): Remove "offset" parameter.
3732 (rust_print_enum): New function.
3733 (rust_val_print) <TYPE_CODE_UNION>: Remove enum code.
3734 <TYPE_CODE_STRUCT>: Call rust_print_enum when appropriate.
3735 (rust_print_struct_def): Add "for_rust_enum" parameter. Handle
3736 enums.
3737 (rust_internal_print_type): New function, from rust_print_type.
3738 Remove enum code.
3739 (rust_print_type): Call rust_internal_print_type.
3740 (rust_evaluate_subexp) <STRUCTOP_ANONYMOUS, STRUCTOP_STRUCT>:
3741 Update enum handling.
3742 * dwarf2read.c (struct dwarf2_cu) <rust_unions>: New field.
3743 (rust_fully_qualify, alloc_discriminant_info, quirk_rust_enum)
3744 (rust_union_quirks): New functions.
3745 (process_full_comp_unit, process_full_type_unit): Call
3746 rust_union_quirks.
3747 (process_structure_scope): Update rust_unions if necessary.
3748
3749 2018-02-26 Tom Tromey <tom@tromey.com>
3750
3751 * value.h (value_union_variant): Declare.
3752 * valops.c (value_union_variant): New function.
3753 * gdbtypes.h (TYPE_FLAG_DISCRIMINATED_UNION): New macro.
3754 (struct discriminant_info): New.
3755 (enum dynamic_prop_node_kind) <DYN_PROP_DISCRIMINATED>: New
3756 enumerator.
3757 (struct main_type) <flag_discriminated_union>: New field.
3758
3759 2018-02-26 Tom Tromey <tom@tromey.com>
3760
3761 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
3762 unittests/unpack-selftests.c.
3763 * unittests/unpack-selftests.c: New file.
3764 * value.c (unpack_bits_as_long): Fix bugs in non-bitfield cases.
3765
3766 2018-02-26 Yao Qi <yao.qi@linaro.org>
3767
3768 * dwarf2read.c (struct partial_die_info) <read>: New method.
3769 (read_partial_die): Remove the declaration.
3770 (load_partial_dies): Update.
3771 (partial_die_info::partial_die_info):
3772 (read_partial_die): Change it to partial_die_info::read.
3773
3774 2018-02-26 Yao Qi <yao.qi@linaro.org>
3775
3776 * dwarf2read.c (struct partial_die_info) <fixup>: New method.
3777 (fixup_partial_die): Remove declaration.
3778 (scan_partial_symbols): Update.
3779 (partial_die_parent_scope): Likewise.
3780 (partial_die_full_name): Likewise.
3781 (fixup_partial_die): Change it to partial_die_info::fixup.
3782
3783 2018-02-26 Yao Qi <yao.qi@linaro.org>
3784
3785 * dwarf2read.c (read_partial_die): Update the declaration.
3786 (load_partial_dies): Caller update.
3787 (read_partial_die): Remove one argument abbrev_len.
3788
3789 2018-02-26 Yao Qi <yao.qi@linaro.org>
3790
3791 * dwarf2read.c (struct partial_die_info): Add ctor, delete
3792 assignment operator.
3793 (load_partial_dies): Use ctor and copy ctor.
3794 (read_partial_die): Update.
3795 (dwarf2_cu::find_partial_die): Use ctor.
3796
3797 2018-02-26 Yao Qi <yao.qi@linaro.org>
3798
3799 * dwarf2read.c (struct dwarf2_cu) <find_partial_die>: New method.
3800 (find_partial_die_in_comp_unit): Change it to
3801 dwarf2_cu::find_partial_die.
3802 (find_partial_die): Update.
3803
3804 2018-02-26 Yao Qi <yao.qi@linaro.org>
3805
3806 * dwarf2read.c (read_partial_die): Remove the code checking abbrev
3807 is NULL.
3808
3809 2018-02-26 Yao Qi <yao.qi@linaro.org>
3810
3811 * dwarf2read.c (load_partial_dies): Move the location of XOBNEW.
3812
3813 2018-02-26 Alan Hayward <alan.hayward@arm.com>
3814
3815 * arch/amd64.h: Use common/tdesc.h.
3816 * arch/i386.c: Likewise.
3817 * arch/i386.h: Likewise.
3818 * arch/tic6x.c: Likewise.
3819 * arch/tdesc.h: Move file from here...
3820 * common/tdesc.h: ...to here.
3821 * features/aarch64-core.c: Regenerate.
3822 * features/aarch64-fpu.c: Regenerate.
3823 * features/i386/32bit-avx.c: Regenerate.
3824 * features/i386/32bit-avx512.c: Regenerate.
3825 * features/i386/32bit-core.c: Regenerate.
3826 * features/i386/32bit-linux.c: Regenerate.
3827 * features/i386/32bit-mpx.c: Regenerate.
3828 * features/i386/32bit-pkeys.c: Regenerate.
3829 * features/i386/32bit-sse.c: Regenerate.
3830 * features/i386/64bit-avx.c: Regenerate.
3831 * features/i386/64bit-avx512.c: Regenerate.
3832 * features/i386/64bit-core.c: Regenerate.
3833 * features/i386/64bit-linux.c: Regenerate.
3834 * features/i386/64bit-mpx.c: Regenerate.
3835 * features/i386/64bit-pkeys.c: Regenerate.
3836 * features/i386/64bit-segments.c: Regenerate.
3837 * features/i386/64bit-sse.c: Regenerate.
3838 * features/i386/x32-core.c: Regenerate.
3839 * features/tic6x-c6xp.c: Regenerate.
3840 * features/tic6x-core.c: Regenerate.
3841 * features/tic6x-gp.c: Regenerate.
3842 * target-descriptions.c: Use common/tdesc.h.
3843 * target-descriptions.h: Likewise.
3844
3845 2018-02-24 Tom Tromey <tom@tromey.com>
3846
3847 * linux-thread-db.c (try_thread_db_load_from_pdir_1)
3848 (try_thread_db_load_from_dir, thread_db_load_search): Use
3849 std::string.
3850 (info_auto_load_libthread_db_compare): Return bool. Change
3851 argument types.
3852 (info_auto_load_libthread_db): Use std::vector, std::string.
3853 Remove cleanups.
3854
3855 2018-02-24 Tom Tromey <tom@tromey.com>
3856
3857 * i386-tdep.c (i386_fast_tracepoint_valid_at): "msg" now a
3858 std::string.
3859 * gdbarch.sh (fast_tracepoint_valid_at): Change "msg" to a
3860 std::string*.
3861 * gdbarch.c: Rebuild.
3862 * gdbarch.h: Rebuild.
3863 * breakpoint.c (check_fast_tracepoint_sals): Use std::string.
3864 * arch-utils.h (default_fast_tracepoint_valid_at): Update.
3865 * arch-utils.c (default_fast_tracepoint_valid_at): "msg" now a
3866 std::string*.
3867
3868 2018-02-23 Simon Marchi <simon.marchi@polymtl.ca>
3869
3870 * gdbtypes.h (sect_offset): Change type to uint64_t.
3871 (sect_offset_str): New function.
3872 * dwarf2read.c (create_addrmap_from_aranges): Use
3873 sect_offset_str.
3874 (error_check_comp_unit_head): Likewise.
3875 (create_debug_type_hash_table): Likewise.
3876 (read_cutu_die_from_dwo): Likewise.
3877 (init_cutu_and_read_dies): Likewise.
3878 (init_cutu_and_read_dies_no_follow): Likewise.
3879 (process_psymtab_comp_unit_reader): Likewise.
3880 (partial_die_parent_scope): Likewise.
3881 (peek_die_abbrev): Likewise.
3882 (process_queue): Likewise.
3883 (dwarf2_physname): Likewise.
3884 (read_namespace_alias): Likewise.
3885 (read_import_statement): Likewise.
3886 (create_dwo_cu_reader): Likewise.
3887 (create_cus_hash_table): Likewise.
3888 (lookup_dwo_cutu): Likewise.
3889 (inherit_abstract_dies): Likewise.
3890 (read_func_scope): Likewise.
3891 (read_call_site_scope): Likewise.
3892 (dwarf2_add_member_fn): Likewise.
3893 (read_common_block): Likewise.
3894 (read_module_type): Likewise.
3895 (read_typedef): Likewise.
3896 (read_subrange_type): Likewise.
3897 (load_partial_dies): Likewise.
3898 (read_partial_die): Likewise.
3899 (find_partial_die): Likewise.
3900 (read_str_index): Likewise.
3901 (dwarf2_string_attr): Likewise.
3902 (build_error_marker_type): Likewise.
3903 (lookup_die_type): Likewise.
3904 (dump_die_shallow): Likewise.
3905 (follow_die_ref): Likewise.
3906 (dwarf2_fetch_die_loc_sect_off): Likewise.
3907 (dwarf2_fetch_constant_bytes): Likewise.
3908 (follow_die_sig): Likewise.
3909 (get_signatured_type): Likewise.
3910 (get_DW_AT_signature_type): Likewise.
3911 (dwarf2_find_containing_comp_unit): Likewise.
3912 (set_die_type): Likewise.
3913
3914 2018-02-21 John Baldwin <jhb@FreeBSD.org>
3915
3916 * arch/aarch64.c: Include "common-defs.h".
3917 * arch/amd64.c: Likewise.
3918 * arch/i386.c: Likewise.
3919
3920 2018-02-21 Tom Tromey <tom@tromey.com>
3921
3922 * value.h: (extract_field_op): Update.
3923 * eval.c (extract_field_op): Return a const char *.
3924 * expression.h (parse_expression_for_completion): Update.
3925 * completer.c (complete_expression): Update.
3926 (add_struct_fields): Make fieldname const.
3927 * parse.c (expout_completion_name): Now a unique_xmalloc_ptr.
3928 (mark_completion_tag, parse_exp_in_context_1): Update.
3929 (parse_expression_for_completion): Change "name" to
3930 unique_xmalloc_ptr*.
3931
3932 2018-02-21 Tom Tromey <tom@tromey.com>
3933
3934 * infcall.c (call_function_by_hand_dummy): Use std::vector.
3935
3936 2018-02-21 Yao Qi <yao.qi@linaro.org>
3937
3938 * avr-tdep.c (avr_read_pc): Change parameter type to
3939 readable_regcache.
3940 * gdbarch.sh (read_pc): Likewise.
3941 * gdbarch.c: Re-generated.
3942 * gdbarch.h: Re-generated.
3943 * hppa-tdep.c (hppa_read_pc): Change parameter type to
3944 readable_regcache.
3945 * ia64-tdep.c (ia64_read_pc): Likewise.
3946 * mips-tdep.c (mips_read_pc): Likewise.
3947 * spu-tdep.c (spu_read_pc): Likewise.
3948
3949 2018-02-21 Yao Qi <yao.qi@linaro.org>
3950
3951 * Makefile.in (COMMON_SFILES): Add regcache-dump.c
3952 * regcache-dump.c: New file.
3953 * regcache.c: Move register_dump to regcache-dump.c.
3954 (maintenance_print_registers): Likewise.
3955 (maintenance_print_raw_registers): Likewise.
3956 (maintenance_print_cooked_registers): Likewise.
3957 (maintenance_print_register_groups): Likewise.
3958 (maintenance_print_remote_registers): Likewise.
3959 (_initialize_regcache): Likewise.
3960 * regcache.h (register_dump): Moved from regcache.c.
3961
3962 2018-02-21 Yao Qi <yao.qi@linaro.org>
3963
3964 * regcache.c (regcache::regcache): Update.
3965 (regcache::invalidate): Move it to detached_regcache::invalidate.
3966 (get_thread_arch_aspace_regcache): Update.
3967 (regcache::raw_update): Update.
3968 (regcache::cooked_read): Remove some code.
3969 (regcache::cooked_read_value): Likewise.
3970 (regcache::raw_write): Remove assert on m_readonly_p.
3971 (regcache::raw_supply_integer): Move it to
3972 detached_regcache::raw_supply_integer.
3973 (regcache::raw_supply_zeroed): Likewise.
3974 * regcache.h (detached_regcache) <raw_supply_integer>: New
3975 declaration.
3976 <raw_supply_zeroed, invalidate>: Likewise.
3977 (regcache) <raw_supply_integer, raw_supply_zeroed>: Removed.
3978 <invalidate>: Likewise.
3979 <m_readonly_p>: Removed.
3980
3981 2018-02-21 Yao Qi <yao.qi@linaro.org>
3982
3983 * infcmd.c (get_return_value): Let stop_regs point to
3984 get_current_regcache.
3985 * regcache.c (regcache::regcache): Remove.
3986 (register_dump_reg_buffer): New class.
3987 (regcache_print): Adjust.
3988 * regcache.h (regcache): Remove constructors.
3989
3990 2018-02-21 Yao Qi <yao.qi@linaro.org>
3991
3992 * regcache.c (class register_dump): New class.
3993 (register_dump_regcache, register_dump_none): New class.
3994 (register_dump_remote, register_dump_groups): New class.
3995 (regcache_print): Update.
3996 * regcache.h (regcache_dump_what): Move it to regcache.c.
3997 (regcache) <dump>: Remove.
3998
3999 2018-02-21 Yao Qi <yao.qi@linaro.org>
4000
4001 * jit.c (struct jit_unwind_private) <regcache>: Change its type to
4002 reg_buffer_rw *.
4003 (jit_unwind_reg_set_impl): Call raw_supply.
4004 (jit_frame_sniffer): Use reg_buffer_rw.
4005 * record-full.c (record_full_core_regbuf): Change its type.
4006 (record_full_core_open_1): Use reg_buffer_rw.
4007 (record_full_close): Likewise.
4008 (record_full_core_fetch_registers): Use regcache->raw_supply.
4009 (record_full_core_store_registers): Likewise.
4010 * regcache.c (regcache::get_register_status): Move it to
4011 reg_buffer.
4012 (regcache_raw_set_cached_value): Remove.
4013 (regcache::raw_set_cached_value): Remove.
4014 (regcache::raw_write): Call raw_supply.
4015 (regcache::raw_supply): Move it to reg_buffer_rw.
4016 * regcache.h (regcache_raw_set_cached_value): Remove.
4017 (reg_buffer_rw): New class.
4018
4019 2018-02-21 Yao Qi <yao.qi@linaro.org>
4020
4021 * dummy-frame.c (dummy_frame_cache) <prev_regcache>: Use
4022 readonly_detached_regcache.
4023 (dummy_frame_prev_register): Use regcache->cooked_read.
4024 * frame.c (frame_save_as_regcache): Change return type.
4025 (frame_pop): Update.
4026 * frame.h (frame_save_as_regcache): Update declaration.
4027 * inferior.h (get_infcall_suspend_state_regcache): Update
4028 declaration.
4029 * infrun.c (infcall_suspend_state) <registers>: use
4030 readonly_detached_regcache.
4031 (save_infcall_suspend_state): Don't use regcache_dup.
4032 (get_infcall_suspend_state_regcache): Change return type.
4033 * linux-fork.c (struct fork_info) <savedregs>: Change to
4034 readonly_detached_regcache.
4035 <pc>: New field.
4036 (fork_save_infrun_state): Don't use regcache_dup.
4037 (info_checkpoints_command): Adjust.
4038 * mi/mi-main.c (register_changed_p): Update declaration.
4039 (mi_cmd_data_list_changed_registers): Use
4040 readonly_detached_regcache.
4041 (register_changed_p): Change parameter type to
4042 readonly_detached_regcache.
4043 * ppc-linux-tdep.c (ppu2spu_cache) <regcache>: Use
4044 readonly_detached_regcache.
4045 (ppu2spu_sniffer): Construct a new readonly_detached_regcache.
4046 * regcache.c (readonly_detached_regcache::readonly_detached_regcache):
4047 New.
4048 (regcache::save): Move it to reg_buffer.
4049 (regcache::restore): Change parameter type.
4050 (regcache_dup): Remove.
4051 * regcache.h (reg_buffer) <save>: New method.
4052 (readonly_detached_regcache): New class.
4053 * spu-tdep.c (spu2ppu_cache) <regcache>: Use
4054 readonly_detached_regcache.
4055 (spu2ppu_sniffer): Construct a new readonly_detached_regcache.
4056
4057 2018-02-21 Yao Qi <yao.qi@linaro.org>
4058
4059 * frame.c (frame_save_as_regcache): Use regcache method save.
4060 (frame_pop): Use regcache method restore.
4061 * infrun.c (restore_infcall_suspend_state): Likewise.
4062 * linux-fork.c (fork_load_infrun_state): Likewise.
4063 * ppc-linux-tdep.c (ppu2spu_sniffer): User regcache method
4064 save.
4065 * regcache.c (regcache_save): Remove.
4066 (regcache::restore): More asserts.
4067 (regcache_cpy): Remove.
4068 * regcache.h (regcache_save): Remove the declaration.
4069 (regcache::restore): Move from private to public.
4070 Remove the friend declaration of regcache_cpy.
4071 (regcache_cpy): Remove declaration.
4072
4073 2018-02-21 Yao Qi <yao.qi@linaro.org>
4074
4075 * aarch64-tdep.c (aarch64_pseudo_register_read_value): Change
4076 parameter type to 'readable_regcache *'.
4077 * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
4078 * arm-tdep.c (arm_neon_quad_read): Likewise.
4079 (arm_pseudo_read): Likewise.
4080 * avr-tdep.c (avr_pseudo_register_read): Likewise.
4081 * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
4082 * frv-tdep.c (frv_pseudo_register_read): Likewise.
4083 * gdbarch.c: Re-generated.
4084 * gdbarch.h: Re-generated.
4085 * gdbarch.sh (pseudo_register_read): Change parameter type to
4086 'readable_regcache *'.
4087 (pseudo_register_read_value): Likewise.
4088 * h8300-tdep.c (pseudo_from_raw_register): Likewise.
4089 (h8300_pseudo_register_read): Likewise.
4090 * hppa-tdep.c (hppa_pseudo_register_read): Likewise.
4091 * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
4092 (i386_pseudo_register_read_into_value): Likewise.
4093 (i386_pseudo_register_read_value): Likewise.
4094 * i386-tdep.h (i386_pseudo_register_read_into_value): Update
4095 declaration.
4096 * ia64-tdep.c (ia64_pseudo_register_read): Likewise.
4097 * m32c-tdep.c (m32c_raw_read): Likewise.
4098 (m32c_read_flg): Likewise.
4099 (m32c_banked_register): Likewise.
4100 (m32c_banked_read): Likewise.
4101 (m32c_sb_read): Likewise.
4102 (m32c_part_read): Likewise.
4103 (m32c_cat_read): Likewise.
4104 (m32c_r3r2r1r0_read): Likewise.
4105 (m32c_pseudo_register_read): Likewise.
4106 * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
4107 * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
4108 (mep_pseudo_cr64_read): Likewise.
4109 (mep_pseudo_register_read): Likewise.
4110 * mips-tdep.c (mips_pseudo_register_read): Likewise.
4111 * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
4112 * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
4113 * regcache.c (regcache::raw_read): Move it to readable_regcache.
4114 (regcache::cooked_read): Likewise.
4115 (regcache::cooked_read_value): Likewise.
4116 (regcache_cooked_read_signed):
4117 (regcache::cooked_read): Likewise.
4118 * regcache.h (readable_regcache): New class.
4119 (regcache): Inherit readable_regcache. Move some methods to
4120 readable_regcache.
4121 * rl78-tdep.c (rl78_pseudo_register_read): Change
4122 parameter type to 'readable_regcache *'.
4123 * rs6000-tdep.c (do_regcache_raw_read): Remove.
4124 (e500_pseudo_register_read): Change parameter type to
4125 'readable_regcache *'.
4126 (dfp_pseudo_register_read): Likewise.
4127 (vsx_pseudo_register_read): Likewise.
4128 (efpr_pseudo_register_read): Likewise.
4129 * s390-tdep.c (s390_pseudo_register_read): Likewise.
4130 * sh-tdep.c (sh_pseudo_register_read): Likewise.
4131 * sh64-tdep.c (pseudo_register_read_portions): Likewise.
4132 (sh64_pseudo_register_read): Likewise.
4133 * sparc-tdep.c (sparc32_pseudo_register_read): Likewise.
4134 * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
4135 * spu-tdep.c (spu_pseudo_register_read_spu): Likewise.
4136 (spu_pseudo_register_read): Likewise.
4137 * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
4138 (xtensa_pseudo_register_read): Likewise.
4139
4140 2018-02-21 Yao Qi <yao.qi@linaro.org>
4141
4142 * regcache.c (regcache::regcache): Call reg_buffer ctor.
4143 (regcache::arch): Move it to reg_buffer::arch.
4144 (regcache::register_buffer): Likewise.
4145 (regcache::assert_regnum): Likewise.
4146 (regcache::num_raw_registers): Likewise.
4147 * regcache.h (reg_buffer): New class.
4148 (regcache): Inherit reg_buffer.
4149
4150 2018-02-20 Simon Marchi <simon.marchi@ericsson.com>
4151
4152 * remote-sim.c (gdb_os_printf_filtered, gdb_os_vprintf_filtered,
4153 gdb_os_evprintf_filtered, gdb_os_error): Add ATTRIBUTE_PRINTF.
4154
4155 2018-02-20 Markus Metzger <markus.t.metzger@intel.com>
4156
4157 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add mkstemp.
4158
4159 2018-02-19 Alan Hayward <alan.hayward@arm.com>
4160
4161 * Makefile.in: (COMMON_SFILES): Add common/*.c files.
4162 (SFILES): Remove common/*.c files.
4163 (COMMON_OBS): Remove some *.o files built from common/*.c files.
4164 * common/common.host: Add common reference.
4165 * configure.ac: Likewise.
4166 * configure: Regenerate.
4167
4168 2018-02-16 Yao Qi <yao.qi@linaro.org>
4169
4170 * block.c (block_namespace_info): Inherit allocate_on_obstack.
4171 (block_initialize_namespace): Use new.
4172 * dwarf2read.c (dwarf2_per_objfile): Inherit allocate_on_obstack.
4173 (dwarf2_free_objfile): Use delete.
4174 * gdbtypes.c (type_pair): Inherit allocate_on_obstack.
4175 (copy_type_recursive): Use new.
4176 * gdb_obstack.h (allocate_on_obstack): New.
4177
4178 2018-02-15 Yao Qi <yao.qi@linaro.org>
4179
4180 PR gdb/22849
4181 * inferior.c (exit_inferior_1): Reset inf->control.
4182
4183 2018-02-15 Joel Brobecker <brobecker@adacore.com>
4184
4185 * ada-lang.c (ada_to_fixed_value_create): Delete advance
4186 declaration.
4187
4188 2018-02-14 Pedro Alves <palves@redhat.com>
4189
4190 * frame-unwind.c (frame_unwind_try_unwinder): Always call
4191 frame_cleanup_after_sniffer on exception.
4192
4193 2018-02-14 Tom Tromey <tom@tromey.com>
4194
4195 * solist.h (struct target_so_ops) <bfd_open>: Make pathname
4196 const.
4197 (solib_bfd_open): Make pathname const.
4198 * solib.c (solib_bfd_open): Make pathname const.
4199 * solib-spu.c (spu_bfd_fopen): Make name const.
4200 (spu_bfd_open): Make pathname const.
4201 * solib-darwin.c (darwin_bfd_open): Make pathname const.
4202 * solib-aix.c (solib_aix_bfd_open): Make pathname const.
4203
4204 2018-02-14 Tom Tromey <tom@tromey.com>
4205
4206 * symfile.c (symfile_bfd_open): Update.
4207 * source.h (openp, source_full_path_of, find_and_open_source):
4208 Change argument type to unique_xmalloc_ptr.
4209 * source.c (openp): Take a unique_xmalloc_ptr.
4210 (source_full_path_of, find_and_open_source): Likewise.
4211 (open_source_file, symtab_to_fullname): Update.
4212 * solist.h (struct target_so_ops) <find_and_open_solib>: Take a
4213 unique_xmalloc_ptr.
4214 * solib.c (solib_find_1): Use unique_xmalloc_ptr.
4215 (exec_file_find): Update.
4216 * psymtab.c (psymtab_to_fullname): Update.
4217 * nto-tdep.h (nto_find_and_open_solib): Update.
4218 * nto-tdep.c (nto_find_and_open_solib): Change temp_path to a
4219 unique_xmalloc_ptr.
4220 * exec.c (exec_file_attach): Update.
4221 * dwarf2read.c (try_open_dwop_file): Use unique_xmalloc_ptr.
4222 * cli/cli-cmds.c (find_and_open_script): Use unique_xmalloc_ptr.
4223
4224 2018-02-14 Tom Tromey <tom@tromey.com>
4225
4226 * solib.c: Include source.h.
4227 * nto-tdep.c: Include source.h.
4228 * mi/mi-cmd-env.c: Include source.h.
4229 * infcmd.c: Include source.h.
4230 * exec.c: Include source.h.
4231 * defs.h (enum openp_flag, openp, source_full_path_of, mod_path)
4232 (add_path, directory_switch, source_path, init_source_path): Move
4233 declarations...
4234 * source.h (enum openp_flag, openp, source_full_path_of, mod_path)
4235 (add_path, directory_switch, source_path, init_source_path):
4236 ...here.
4237
4238 2018-02-14 Tom Tromey <tom@tromey.com>
4239
4240 * solist.h (exec_file_find, solib_find): Return
4241 unique_xmalloc_ptr.
4242 (solib_bfd_fopen): Take a const char *.
4243 * solib.c (solib_find_1): Return unique_xmalloc_ptr.
4244 (exec_file_find, solib_find): Likewise.
4245 (solib_bfd_fopen): Do not take ownership of "pathname".
4246 (solib_bfd_open): Use unique_xmalloc_ptr.
4247 * solib-darwin.c (darwin_bfd_open): Use unique_xmalloc_ptr.
4248 * solib-aix.c (solib_aix_bfd_open): Use unique_xmalloc_ptr.
4249 * infrun.c (follow_exec): Use unique_xmalloc_ptr.
4250 * exec.c (exec_file_locate_attach): Use unique_xmalloc_ptr.
4251
4252 2018-02-14 Joel Brobecker <brobecker@adacore.com>
4253
4254 * ada-lang.c (name_match_type_from_name): Remove reference to
4255 ada_name_for_lookup in function's documentation.
4256 * ada-lang.h (ada_name_for_lookup): Delete declaration.
4257
4258 2018-02-13 Simon Marchi <simon.marchi@polymtl.ca>
4259
4260 * defs.h (enum openp_flags): New enum.
4261 (OPF_TRY_CWD_FIRST, OPF_SEARCH_IN_PATH, OPF_RETURN_REALPATH):
4262 Move to enum openp_flags.
4263 (openp_flags): New enum flags.
4264 (openp): Change parameter type to openp_flags.
4265 * source.c (openp): Change parameter type to openp_flags.
4266 * cli/cli-cmds.c (find_and_open_script): Use openp_flags.
4267 * dwarf2read.c (try_open_dwop_file): Use openp_flags.
4268
4269 2018-02-13 Simon Marchi <simon.marchi@polymtl.ca>
4270
4271 * maint.c (_initialize_maint_cmds): Fix prefix of maint set/show
4272 per-command.
4273
4274 2018-02-12 Andrew Burgess <andrew.burgess@embecosm.com>
4275
4276 * dwarf2read.c (dwarf2_release_queue): Delete function, move body
4277 into...
4278 (class dwarf2_queue_guard): ...the destructor of this new class.
4279 (dw2_do_instantiate_symtab): Create instance of the new class
4280 dwarf2_queue_guard, remove cleanup.
4281
4282 2018-02-09 Tom Tromey <tom@tromey.com>
4283
4284 * source.c (find_source_lines): Don't reference past the end of
4285 the vector.
4286
4287 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
4288
4289 * remote.c (remote_btrace_maybe_reopen): Change error message.
4290 * btrace.c (btrace_enable): Likewise.
4291 (parse_xml_btrace): Likewise.
4292 (parse_xml_btrace_conf): Likewise.
4293
4294 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
4295
4296 * nat/linux-btrace.c (diagnose_perf_event_open_fail): New.
4297 (linux_enable_pt, linux_enable_bts): Call
4298 diagnose_perf_event_open_fail.
4299
4300 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
4301
4302 * nat/linux-btrace.c (perf_event_pt_event_type): Improve error message.
4303 Remove parameter and change return type. Update callers. Move it.
4304 (linux_enable_bts, linux_enable_pt): Improve error message.
4305 (linux_enable_pt): Remove zero buffer size check.
4306 (linux_enable_btrace): Improve error messages. Remove NULL return
4307 check.
4308
4309 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
4310
4311 * btrace.c (btrace_enable): Remove target_supports_btrace call.
4312 * nat/linux-btrace.c (perf_event_pt_event_type): Move.
4313 (kernel_supports_bts, kernel_supports_pt, linux_supports_bts)
4314 (linux_supports_pt, linux_supports_btrace): Remove.
4315 (linux_enable_bts): Call cpu_supports_bts.
4316 * nat/linux-btrace.h (linux_supports_btrace): Remove.
4317 * remote.c (remote_supports_btrace): Remove.
4318 (init_remote_ops): Remove remote_supports_btrace.
4319 * target-delegates.c: Regenerated.
4320 * target.c (target_supports_btrace): Remove.
4321 * target.h (target_ops) <to_supports_btrace>: Remove
4322 (target_supports_btrace): Remove.
4323 * x86-linux-nat.c (x86_linux_create_target): Remove
4324 linux_supports_btrace.
4325
4326 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
4327
4328 * nat/linux-btrace.c (linux_enable_btrace): Throw exception if enabling
4329 btrace failed.
4330 * x86-linux-nat.c (x86_linux_enable_btrace): Catch btrace enabling
4331 exception and use message in own exception.
4332
4333 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
4334
4335 * nat/linux-btrace.c: Include scoped_fd.h and scoped_mmap.h.
4336 (perf_event_pt_event_type): Use gdb_file_up.
4337 (linux_enable_bts, linux_enable_pt): Use gdb::unique_xmalloc_ptr,
4338 scoped_fd, and scoped_mmap.
4339
4340 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
4341
4342 * common/scoped_mmap.h: New.
4343 * unittests/scoped_mmap-selftest.c: New.
4344 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
4345 unittests/scoped_mmap-selftest.c.
4346
4347 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
4348
4349 * common/scoped_fd.h: New.
4350 * unittests/scoped_fd-selftest.c: New.
4351 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
4352 unittests/scoped_fd-selftest.c.
4353
4354 2018-02-09 Tom Tromey <tom@tromey.com>
4355
4356 * auto-load.c (auto_load_section_scripts): Use
4357 gdb::unique_xmalloc_ptr.
4358
4359 2018-02-09 Tom Tromey <tom@tromey.com>
4360
4361 * auto-load.c (execute_script_contents): Use std::string.
4362
4363 2018-02-09 Joel Brobecker <brobecker@adacore.com>
4364
4365 * NEWS <Changes in GDB 8.1>: Clarify that "rbreak" is a new
4366 Python function, rather than a new command.
4367
4368 2018-02-08 Tom Tromey <tom@tromey.com>
4369
4370 * solib.c (solib_find_1): Use std::string.
4371 (solib_bfd_fopen): Use unique_xmalloc_ptr.
4372
4373 2018-02-08 Tom Tromey <tom@tromey.com>
4374
4375 * build-id.c (build_id_to_debug_bfd): Use unique_xmalloc_ptr.
4376
4377 2018-02-08 Tom Tromey <tom@tromey.com>
4378
4379 * source.c (find_source_lines): Use gdb::def_vector.
4380
4381 2018-02-08 Tom Tromey <tom@tromey.com>
4382
4383 * macrocmd.c (struct temporary_macro_definition): New.
4384 (macro_define_command): Use temporary_macro_definition. Remove
4385 cleanups.
4386 (free_macro_definition_ptr): Remove.
4387
4388 2018-02-08 Tom Tromey <tom@tromey.com>
4389
4390 * macroexp.c (maybe_expand): Use std::string.
4391
4392 2018-02-08 Tom Tromey <tom@tromey.com>
4393
4394 * macroexp.c (struct macro_buffer): Add initializers for some
4395 members.
4396 (init_buffer, init_shared_buffer, free_buffer)
4397 (free_buffer_return_text): Remove.
4398 (macro_buffer): New constructors.
4399 (~macro_buffer): New destructor.
4400 (macro_buffer::set_shared): New method.
4401 (macro_buffer::resize_buffer, macro_buffer::appendc)
4402 (macro_buffer::appendmem): Now methods, not free functions.
4403 (set_token, append_tokens_without_splicing, stringify)
4404 (macro_stringify): Update.
4405 (gather_arguments): Change return type. Remove argc_p argument,
4406 add args_ptr argument. Use std::vector.
4407 (substitute_args): Remove argc argument. Accept std::vector.
4408 (expand): Update. Use std::vector.
4409 (scan, macro_expand, macro_expand_next): Update.
4410
4411 2018-02-08 Tom Tromey <tom@tromey.com>
4412
4413 * symtab.c (default_collect_symbol_completion_matches_break_on):
4414 Use unique_xmalloc_ptr.
4415 * macroscope.h: (sal_macro_scope, user_macro_scope)
4416 (default_macro_scope): Return unique_xmalloc_ptr.
4417 * macroscope.c (sal_macro_scope, user_macro_scope)
4418 (default_macro_scope): Return unique_xmalloc_ptr.
4419 * macroexp.h (macro_expand, macro_expand_once): Return
4420 unique_xmalloc_ptr.
4421 * macroexp.c (macro_expand, macro_expand_once): Return
4422 unique_xmalloc_ptr.
4423 * macrocmd.c (macro_expand_command, macro_expand_once_command)
4424 (info_macro_command, info_macros_command): Use
4425 unique_xmalloc_ptr.
4426 * compile/compile-c-support.c (write_macro_definitions): Use
4427 unique_xmalloc_ptr.
4428 * c-exp.y (c_parse): Use unique_xmalloc_ptr.
4429
4430 2018-02-07 Simon Marchi <simon.marchi@ericsson.com>
4431
4432 * value.c (value_static_field): Assign field type instead of
4433 containing type when returning an optimized out value.
4434
4435 2018-02-06 Yao Qi <yao.qi@linaro.org>
4436
4437 * ft32-tdep.c (ft32_read_pc): Remove.
4438 (ft32_write_pc): Remove.
4439 (ft32_gdbarch_init): Update.
4440 * m32r-tdep.c (m32r_read_pc): Remove.
4441 (m32r_gdbarch_init): Update.
4442 * mep-tdep.c (mep_read_pc): Remove.
4443 (mep_gdbarch_init): Update.
4444 * microblaze-tdep.c (microblaze_write_pc): Remove.
4445 (microblaze_gdbarch_init): Update.
4446 * mn10300-tdep.c (mn10300_read_pc): Remove.
4447 (mn10300_write_pc): Remove.
4448 (mn10300_gdbarch_init): Update.
4449 * moxie-tdep.c (moxie_read_pc): Remove.
4450 (moxie_write_pc): Remove.
4451 (moxie_gdbarch_init): Update.
4452
4453 2018-02-06 Yao Qi <yao.qi@linaro.org>
4454
4455 * expprint.c (print_subexp_standard): Handle
4456 OP_F77_UNDETERMINED_ARGLIST.
4457 (dump_subexp_body_standard): Likewise.
4458
4459 2018-02-05 Alan Hayward <alan.hayward@arm.com>
4460
4461 * target-descriptions.c (tdesc_element_visitor) Add empty
4462 implementations.
4463 (tdesc_type): Move make_gdb_type from here.
4464 (tdesc_type_builtin): Likewise.
4465 (tdesc_type_vector): Likewise.
4466 (tdesc_type_with_fields): Move make_gdb_type_ functions from here.
4467 (make_gdb_type_struct): Move from tdesc_type_with_fields.
4468 (make_gdb_type_union): Likewise.
4469 (make_gdb_type_flags): Likewise.
4470 (make_gdb_type_enum): Likewise.
4471 (make_gdb_type): New function.
4472 (tdesc_register_type): Use static make_gdb_type.
4473
4474 2018-02-05 Ruslan Kabatsayev <b7.10110111@gmail.com>
4475
4476 * infcmd.c (default_print_one_register_info): Align natural-format
4477 column values consistently one under another.
4478 (pad_to_column): New function.
4479
4480 2018-02-05 Joel Brobecker <brobecker@adacore.com>
4481
4482 * dwarf2read.c (dwarf2_physname): Move commment.
4483
4484 2018-02-01 Leszek Swirski <leszeks@google.com>
4485
4486 * varobj.c (varobj_formatted_print_options): Allow recursive
4487 pretty printing if pretty printing is enabled.
4488
4489 2018-02-01 Leszek Swirski <leszeks@google.com>
4490
4491 * c-exp.y (lex_one_token, classify_name, yylex): Don't classify
4492 names after a structop as a filename.
4493
4494 2018-02-01 Yao Qi <yao.qi@linaro.org>
4495
4496 * arm-tdep.c (arm_record_data_proc_misc_ld_str): Rewrite it.
4497 (arm_record_coproc_data_proc): Likewise.
4498
4499 2018-02-01 Yao Qi <yao.qi@linaro.org>
4500
4501 * arm-tdep.c (arm_record_extension_space): Change ret to signed.
4502
4503 2018-01-31 Nikola Prica <nikola.prica@rt-rk.com>
4504
4505 * rs6000-tdep.c (skip_prologue): Remove shifting for lr_reg and
4506 assign shifted lr_reg to fdata->lr_register when lr_reg is set.
4507
4508 2018-01-31 Pedro Alves <palves@redhat.com>
4509
4510 * darwin-nat.c (darwin_interrupt): Remove ptid_t parameter.
4511 * inflow.c (child_terminal_save_inferior): Wrap reference to
4512 tcgetpgrp in HAVE_TERMIOS_H.
4513 (child_interrupt, child_pass_ctrlc): Wrap references to signal in
4514 _WIN32.
4515 * remote-sim.c (gdbsim_interrupt): Remove ptid_t parameter and
4516 always iterate over all inferiors.
4517 (gdbsim_cntrl_c): Adjust.
4518 * windows-nat.c (windows_interrupt): Remove 'ptid_t' parameter.
4519
4520 2018-01-31 Joel Brobecker <brobecker@adacore.com>
4521
4522 * gdbtypes.c (lookup_array_range_type): Make sure the array's
4523 index type is objfile-owned if the element type is as well.
4524
4525 2018-01-31 Joel Brobecker <brobecker@adacore.com>
4526
4527 GDB 8.1 released.
4528
4529 2018-01-30 Philipp Rudo <prudo@linux.vnet.ibm.com>
4530
4531 * s390-linux-tdep.c: Remove includes "features/s390-linux32.c" and
4532 "features/s390x-linux64.c".
4533 (_initialize_s390_linux_tdep): Remove initialization of tdescs
4534 s390_linux32 and s390x_linux64.
4535 (s390_linux_init_abi_31, s390_linux_init_abi_64): Don't set
4536 default tdesc.
4537 * s390-tdep.c: Include "features/s390-linux32.c" and
4538 "features/s390x-linux64.c".
4539 (s390_tdesc_valid): Add check for tdesc_has_registers.
4540 (s390_gdbarch_init): Make sure there is always a valid tdesc.
4541 (_initialize_s390_tdep): Initialize tdesc_s390_linux32 and
4542 tdesc_s390x_linux64.
4543 * s390-linux-tdep.h: Move export of tdesc_s390_linux32 and
4544 tdesc_s390x_linux64 to...
4545 * s390-tdep.h: ...here.
4546
4547 2018-01-30 Pedro Alves <palves@redhat.com>
4548
4549 PR gdb/13211
4550 * config.in, configure: Regenerate.
4551 * configure.ac: Check for getpgid.
4552 * go32-nat.c (go32_pass_ctrlc): New.
4553 (go32_target): Install it.
4554 * inf-child.c (inf_child_target): Install
4555 child_terminal_save_inferior, child_pass_ctrlc and
4556 child_interrupt.
4557 * inf-ptrace.c (inf_ptrace_interrupt): Delete.
4558 (inf_ptrace_target): No longer install it.
4559 * infcmd.c (interrupt_target_1): Adjust.
4560 * inferior.h (child_terminal_save_inferior, child_pass_ctrlc)
4561 (child_interrupt): Declare.
4562 (inferior::terminal_state): New.
4563 * inflow.c (struct terminal_info): Update comments.
4564 (inferior_process_group): Delete.
4565 (terminal_is_ours): Delete.
4566 (gdb_tty_state): New.
4567 (child_terminal_init): Adjust.
4568 (is_gdb_terminal, sharing_input_terminal_1)
4569 (sharing_input_terminal): New functions.
4570 (child_terminal_inferior): Adjust. Use sharing_input_terminal.
4571 Set the process's actual process group in the foreground if
4572 possible. Handle is_ours_for_output/is_ours distinction. Don't
4573 mark terminal as the inferior's if not sharing GDB's terminal.
4574 Don't check attach_flag.
4575 (child_terminal_ours_for_output, child_terminal_ours): Adjust to
4576 pass down a target_terminal_state.
4577 (child_terminal_save_inferior): New, factored out from ...
4578 (child_terminal_ours_1): ... this. Handle
4579 target_terminal_state::is_ours_for_output.
4580 (child_interrupt, child_pass_ctrlc): New.
4581 (inflow_inferior_exit): Clear the inferior's terminal_state.
4582 (copy_terminal_info): Copy the inferior's terminal state.
4583 (_initialize_inflow): Remove reference to terminal_is_ours.
4584 * inflow.h (inferior_process_group): Delete.
4585 * nto-procfs.c (nto_handle_sigint, procfs_interrupt): Adjust.
4586 * procfs.c (procfs_target): Don't install procfs_interrupt.
4587 (procfs_interrupt): Delete.
4588 * remote.c (remote_serial_quit_handler): Adjust.
4589 (remote_interrupt): Remove ptid parameter. Adjust.
4590 * target-delegates.c: Regenerate.
4591 * target.c: Include "terminal.h".
4592 (target_terminal::terminal_state): Rename to ...
4593 (target_terminal::m_terminal_state): ... this.
4594 (target_terminal::init): Adjust.
4595 (target_terminal::inferior): Adjust to per-inferior
4596 terminal_state.
4597 (target_terminal::restore_inferior, target_terminal_is_ours_kind): New.
4598 (target_terminal::ours, target_terminal::ours_for_output): Use
4599 target_terminal_is_ours_kind.
4600 (target_interrupt): Remove ptid parameter. Adjust.
4601 (default_target_pass_ctrlc): Adjust.
4602 * target.h (target_ops::to_terminal_save_inferior): New field.
4603 (target_ops::to_interrupt): Remove ptid_t parameter.
4604 (target_interrupt): Remove ptid_t parameter. Update comment.
4605 (target_pass_ctrlc): Update comment.
4606 * target/target.h (target_terminal_state): New scoped enum,
4607 factored out of ...
4608 (target_terminal::terminal_state): ... here.
4609 (target_terminal::inferior): Update comments.
4610 (target_terminal::restore_inferior): New.
4611 (target_terminal::is_inferior, target_terminal::is_ours)
4612 (target_terminal::is_ours_for_output): Adjust.
4613 (target_terminal::scoped_restore_terminal_state): Adjust to
4614 rename, and call restore_inferior() instead of inferior().
4615 (target_terminal::scoped_restore_terminal_state::m_state): Change
4616 type.
4617 (target_terminal::terminal_state): Rename to ...
4618 (target_terminal::m_terminal_state): ... this and change type.
4619
4620 2018-01-30 Pedro Alves <palves@redhat.com>
4621
4622 * linux-nat.c (wait_for_signal): New function.
4623 (wait_lwp, linux_nat_wait_1): Use it instead of calling sigsuspend
4624 directly.
4625 (async_terminal_is_ours)
4626 (linux_nat_terminal_inferior, linux_nat_terminal_ours): Delete.
4627 (linux_nat_add_target): Don't override
4628 to_terminal_inferior/to_terminal_ours.
4629
4630 2018-01-29 Sergio Durigan Junior <sergiodj@redhat.com>
4631
4632 * remote.c (remote_follow_fork): Don't call "detach_inferior".
4633
4634 2018-01-28 Simon Marchi <simon.marchi@ericsson.com>
4635
4636 * dwarf2read.c (free_dwo_files): Add forward-declaration.
4637 (dwarf2_per_objfile::~dwarf2_per_objfile): Move content from
4638 dwarf2_per_objfile_free here.
4639 (dwarf2_per_objfile_free): Remove.
4640 (_initialize_dwarf2_read): Don't register
4641 dwarf2_per_objfile_free as a registry cleanup.
4642
4643 2018-01-27 Eli Zaretskii <eliz@gnu.org>
4644
4645 Avoid compilation errors in MinGW native builds
4646
4647 The error is triggered by including python-internal.h, and the
4648 error message is:
4649
4650 In file included from d:\usr\lib\gcc\mingw32\6.3.0\include\c++\math.h:36:0,
4651 from build-gnulib/import/math.h:27,
4652 from d:/usr/Python26/include/pyport.h:235,
4653 from d:/usr/Python26/include/Python.h:58,
4654 from python/python-internal.h:94,
4655 from python/py-arch.c:24:
4656 d:\usr\lib\gcc\mingw32\6.3.0\include\c++\cmath:1157:11: error: '::hypot' has not been declared
4657 using ::hypot;
4658 ^~~~~
4659
4660 This happens because Python headers define 'hypot' to expand t
4661 '_hypot' in the Windows builds.
4662 * python/python-internal.h (_hypot) [__MINGW32__]: Define back to
4663 'hypoth'. This avoids a compilation error.
4664
4665 2018-01-26 Alan Hayward <alan.hayward@arm.com>
4666
4667 * MAINTAINERS (Write After Approval): Fix ordering.
4668
4669 2018-01-26 Alan Hayward <alan.hayward@arm.com>
4670
4671 * MAINTAINERS (Write After Approval): Add Alan Hayward.
4672
4673 2018-01-26 Alan Modra <amodra@gmail.com>
4674
4675 * ppc-linux-tdep.c (powerpc32_plt_stub): Make const.
4676 (powerpc32_plt_stub_so_1): Rename from powerpc32_plt_stub_so.
4677 Remove nop. Make const. Comment.
4678 (powerpc32_plt_stub_so_2): New.
4679 (POWERPC32_PLT_CHECK_LEN): Rename from POWERPC32_PLT_STUB_LEN.
4680 Correct count. Update uses.
4681 (ppc_skip_trampoline_code): Match powerpc32_plt_stub_so_2 too.
4682 Move common code reading PLT entry word. Correct
4683 powerpc32_plt_stub PLT address calculation.
4684 * ppc64-tdep.c (ppc64_standard_linkage1): Make const.
4685 (ppc64_standard_linkage2, ppc64_standard_linkage3): Likewise.
4686 (ppc64_standard_linkage4, ppc64_standard_linkage5): Likewise.
4687 (ppc64_standard_linkage6, ppc64_standard_linkage7): Likewise.
4688 (ppc64_standard_linkage8): Likewise.
4689 * rs6000-tdep.c (ppc_insns_match_pattern): Make pattern const.
4690 Correct insns description.
4691 * ppc-tdep.h (ppc_insns_match_pattern): Update prototype.
4692
4693 2018-01-24 Pedro Alves <palves@redhat.com>
4694
4695 GCC PR libstdc++/83906
4696 * gdbtypes.c (operator==(const dynamic_prop &,
4697 const dynamic_prop &)): New.
4698 (operator==(const range_bounds &, const range_bounds &)): New.
4699 (check_types_equal): Use them instead of memcmp.
4700 * gdbtypes.h (operator==(const dynamic_prop &,
4701 const dynamic_prop &)): Declare.
4702 (operator!=(const dynamic_prop &, const dynamic_prop &)): Declare.
4703 (operator==(const range_bounds &, const range_bounds &)): Declare.
4704 (operator!=(const range_bounds &, const range_bounds &)): Declare.
4705
4706 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
4707
4708 * s390-linux-tdep.c (s390_record_address_mask)
4709 (s390_record_calc_disp_common, s390_record_calc_disp)
4710 (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
4711 (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
4712 (s390_process_record): Move to s390-tdep.c.
4713 (s390_linux_init_abi_any): Adjust.
4714 * s390-tdep.c (s390_record_address_mask)
4715 (s390_record_calc_disp_common, s390_record_calc_disp)
4716 (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
4717 (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
4718 (s390_process_record): Moved from s390-linux-tdep.c
4719 (s390_gdbarch_init): Adjust.
4720
4721 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
4722
4723 * s390-linux-nat.c (s390-tdep.h): New include.
4724 * Makefile.in (ALL_TARGET_OBS): Add s390-tdep.o.
4725 (HFILES_NO_SRCDIR): Add s390-tdep.h.
4726 (ALLDEPFILES): Add s390-tdep.c.
4727 * configure.tgt (s390*-*-linux*): Add s390-tdep.o.
4728 * s390-linux-tdep.h (HWCAP_S390_*, S390_*_REGNUM): Move to...
4729 * s390-tdep.h: ...this. New file.
4730 * s390-linux-tdep.c (s390-tdep.h): New include.
4731 (_initialize_s390_tdep): Rename to...
4732 (_initialize_s390_linux_tdep): ...this and adjust.
4733 (s390_abi_kind, s390_vector_abi_kind, gdbarch_tdep)
4734 (enum named opcodes, S390_NUM_GPRS, S390_NUM_FPRS): Move to
4735 s390-tdep.h.
4736 (s390_break_insn, s390_breakpoint, s390_readinstruction, is_ri)
4737 (is_ril, is_rr, is_rre, is_rs, is_rsy, is_rx, is_rxy)
4738 (s390_is_partial_instruction, s390_software_single_step)
4739 (is_non_branch_ril, s390_displaced_step_copy_insn)
4740 (s390_displaced_step_fixup, s390_displaced_step_hw_singlestep)
4741 (s390_prologue_data, s390_addr, s390_store, s390_load)
4742 (s390_check_for_saved, s390_analyze_prologue, s390_skip_prologue)
4743 (s390_register_call_saved, s390_guess_tracepoint_registers)
4744 (s390_register_name, s390_dwarf_regmap, s390_dwarf_reg_to_regnum)
4745 (regnum_is_gpr_full, regnum_is_vxr_full, s390_value_from_register)
4746 (s390_pseudo_register_name, s390_pseudo_register_type)
4747 (s390_pseudo_register_read, s390_pseudo_register_write)
4748 (s390_pseudo_register_reggroup_p, s390_ax_pseudo_register_collect)
4749 (s390_ax_pseudo_register_push_stack, s390_gen_return_address)
4750 (s390_addr_bits_remove, s390_address_class_type_flags)
4751 (s390_address_class_type_flags_to_name)
4752 (s390_address_class_name_to_type_flags, s390_effective_inner_type)
4753 (s390_function_arg_float, s390_function_arg_vector)
4754 (is_power_of_two, s390_function_arg_integer, s390_arg_state)
4755 (s390_handle_arg, s390_push_dummy_call, s390_dummy_id)
4756 (s390_frame_align, s390_register_return_value, s390_return_value)
4757 (s390_stack_frame_destroyed_p, s390_unwind_pc, s390_unwind_sp)
4758 (s390_unwind_pseudo_register, s390_adjust_frame_regnum)
4759 (s390_dwarf2_prev_register, s390_dwarf2_frame_init_reg)
4760 (s390_trad_frame_prev_register, s390_unwind_cache)
4761 (s390_prologue_frame_unwind_cache)
4762 (s390_backchain_frame_unwind_cache, s390_frame_unwind_cache)
4763 (s390_frame_this_id, s390_frame_prev_register, s390_frame_unwind)
4764 (s390_stub_unwind_cache, s390_stub_frame_unwind_cache)
4765 (s390_stub_frame_this_id, s390_stub_frame_prev_register)
4766 (s390_stub_frame_sniffer, s390_stub_frame_unwind)
4767 (s390_frame_base_address, s390_local_base_address)
4768 (s390_frame_base, s390_gcc_target_options)
4769 (s390_gnu_triplet_regexp, s390_stap_is_single_operand)
4770 (s390_validate_reg_range, s390_tdesc_valid)
4771 (s390_gdbarch_tdep_alloc, s390_gdbarch_init): Move to...
4772 * s390-tdep.c: ...this. New file.
4773
4774 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
4775
4776 * s390-linux-tdep.c (gdbarch_tdep.s390_syscall_record): New hook.
4777 (s390_process_record, s390_gdbarch_tdep_alloc)
4778 (s390_linux_init_abi_any): Use/set new hook.
4779
4780 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
4781
4782 * s390-linux-tdep.c (osabi.h): New include.
4783 (s390_linux_init_abi_31, s390_linux_init_abi_64)
4784 (s390_linux_init_abi_any): New functions.
4785 (s390_gdbarch_init, _initialize_s390_tdep): Adjust.
4786
4787 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
4788
4789 * s390-linux-tdep.c (s390_gdbarch_init): Use gdb_assert for
4790 tdesc_has_registers check
4791
4792 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
4793
4794 * s390-linux-tdep.c (s390_tdesc_valid): New function.
4795 (s390_validate_reg_range): New macro.
4796 (s390_gdbarch_init): Adjust.
4797
4798 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
4799
4800 * s390-linux-tdep.c (gdbarch_tdep) <tdesc>: New field.
4801 (s390_gdbarch_tdep_alloc): Adjust.
4802 (s390_gdbarch_init): Adjust.
4803
4804 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
4805
4806 * s390-linux-tdep.c (gdbarch_tdep) <have_linux_v1, have_linux_v2>
4807 <have_tdb>: Change type to bool.
4808 (s390_gdbarch_tdep_alloc): Adjust.
4809 (s390_gdbarch_init): Adjust.
4810
4811 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
4812
4813 * s390-linux-tdep (s390_abi_kind) <ABI_NONE>: New default field.
4814 (gdbarch_tdep) <have_upper, have_vx>: New fields.
4815 (s390_gdbarch_tdep_alloc): New function.
4816 (s390_gdbarch_init): Allocate tdep at start and use its fields
4817 instead of separate variables.
4818
4819 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
4820
4821 * s390-linux-tdep.c (s390_gdbarch_init): Remove duplicate checks
4822 when looking for cached gdbarch and add comment for remaining.
4823
4824 2018-01-22 Pedro Alves <palves@redhat.com>
4825 Sergio Durigan Junior <sergiodj@redhat.com>
4826
4827 * typeprint.c (whatis_exp): Initialize "val" in the "whatis type"
4828 case.
4829
4830 2018-01-22 Maciej W. Rozycki <macro@mips.com>
4831
4832 * MAINTAINERS: Update my company e-mail address.
4833
4834 2018-01-22 Yao Qi <yao.qi@linaro.org>
4835
4836 * regcache.c (cooked_write_test): New function.
4837 (_initialize_regcache): Register the test.
4838
4839 2018-01-22 Yao Qi <yao.qi@linaro.org>
4840
4841 * ia64-tdep.c (ia64_pseudo_register_read): Call
4842 regcache->cooked_read instead of regcache_cooked_read_unsigned.
4843 * m32c-tdep.c (m32c_cat_read): Likewise.
4844 (m32c_r3r2r1r0_read): Likewise.
4845 * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
4846 * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
4847
4848 2018-01-22 Yao Qi <yao.qi@linaro.org>
4849
4850 * aarch64-tdep.c (aarch64_pseudo_read_value): Call regcache
4851 method raw_read instead of regcache_raw_read.
4852 * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
4853 * arm-tdep.c (arm_neon_quad_read): Likewise.
4854 * avr-tdep.c (avr_pseudo_register_read): Likewise.
4855 * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
4856 * frv-tdep.c (frv_pseudo_register_read): Likewise.
4857 * h8300-tdep.c (h8300_pseudo_register_read): Likewise.
4858 * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
4859 (i386_pseudo_register_read_into_value): Likewise.
4860 * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
4861 * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
4862 * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
4863 * rl78-tdep.c (rl78_pseudo_register_read): Likewise.
4864 * s390-linux-tdep.c (s390_pseudo_register_read): Likewise.
4865 * sparc-tdep.c (sparc32_pseudo_register_read): Likewise.
4866 * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
4867 * spu-tdep.c (spu_pseudo_register_read_spu): Likewise.
4868 * xtensa-tdep.c (xtensa_pseudo_register_read): Likewise.
4869
4870 2018-01-22 Yao Qi <yao.qi@linaro.org>
4871
4872 * Makefile.in (ALL_TARGET_OBS): Remove mt-tdep.o.
4873 * configure.tgt: Remove target mt.
4874 * mt-tdep.c: Remove.
4875 * regcache.c (cooked_read_test): Remove the check for mt.
4876
4877 2018-01-22 Yao Qi <yao.qi@linaro.org>
4878
4879 * jit.c (jit_frame_prev_register): Call regcache::cooked_read
4880 instead of gdbarch_pseudo_register_read_value.
4881
4882 2018-01-22 Joel Brobecker <brobecker@adacore.com>
4883
4884 * dwarf2read.c (need_gnat_info): Return nonzero if the cu's
4885 language is Ada.
4886
4887 2018-01-22 Joel Brobecker <brobecker@adacore.com>
4888
4889 * linespec.c (create_sals_line_offset): Remove code that preserved
4890 the symtab_and_line's line number.
4891
4892 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
4893
4894 * varobj.c (varobj_create): Don't set valid_block when creating a
4895 floating varobj.
4896
4897 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
4898
4899 * varobj.c (varobj_create): Remove out of date comment.
4900
4901 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
4902
4903 PR mi/20395
4904 * ada-exp.y (write_var_from_sym): Pass extra parameter when
4905 updating innermost block.
4906 * parse.c (innermost_block_tracker::update): Take extra type
4907 parameter, and check types match before updating innermost block.
4908 (write_dollar_variable): Update innermost block for registers.
4909 * parser-defs.h (enum innermost_block_tracker_type): New enum.
4910 (innermost_block_tracker::innermost_block_tracker): Initialise
4911 m_types member.
4912 (innermost_block_tracker::reset): Take type parameter.
4913 (innermost_block_tracker::update): Take type parameter, and pass
4914 type through as needed.
4915 (innermost_block_tracker::m_types): New member.
4916 * varobj.c (varobj_create): Pass type when reseting innermost
4917 block.
4918
4919 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
4920
4921 * ada-exp.y (write_var_from_sym): Switch to innermost_block API.
4922 * ada-lang.c (resolve_subexp): Likewise.
4923 * breakpoint.c (set_breakpoint_condition) Likewise.
4924 (watch_command_1) Likewise.
4925 * c-exp.y (variable): Likewise.
4926 * d-exp.y (PrimaryExpression): Likewise.
4927 * f-exp.y (variable): Likewise.
4928 * go-exp.y (variable): Likewise.
4929 * m2-exp.y (variable): Likewise.
4930 * objfiles.c (objfile::~objfile): Likewise.
4931 * p-exp.y (variable): Likewise.
4932 * parse.c (innermost_block): Change type.
4933 * parser-defs.h (class innermost_block_tracker): New.
4934 (innermost_block): Change to innermost_block_tracker.
4935 * printcmd.c (display_command): Switch to innermost_block API.
4936 (do_one_display): Likewise.
4937 * rust-exp.y (do_one_display): Likewise.
4938 * symfile.c (clear_symtab_users): Likewise.
4939 * varobj.c (varobj_create): Switch to innermost_block API, replace
4940 use of innermost_block with block stored on varobj object.
4941
4942 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
4943
4944 * expression.h (innermost_block): Remove declaration.
4945 * varobj.c: Add 'parser-defs.h' include.
4946
4947 2018-01-19 Tom Tromey <tom@tromey.com>
4948
4949 * rust-lang.c (rust_lookup_symbol_nonlocal): Look up qualified
4950 symbols in the static and global blocks.
4951
4952 2018-01-19 James Clarke <jrtc27@jrtc27.com>
4953
4954 * nat/linux-ptrace.c: Remove unnecessary reinclusion of
4955 gdb_ptrace.h, and move including gdb_wait.h ...
4956 * nat/linux-ptrace.h: ... to here.
4957
4958 2018-01-19 Simon Marchi <simon.marchi@ericsson.com>
4959
4960 * inf-ptrace.c (inf_ptrace_detach): Adjust call to
4961 inf_ptrace_detach_success.
4962 (inf_ptrace_detach_success): Add inferior parameter, use it
4963 instead of inferior_ptid, pass it to detach_inferior.
4964 * inf-ptrace.h (inf_ptrace_detach_success): Add inferior
4965 parameter.
4966 * inferior.c (detach_inferior): Add overload that takes an
4967 inferior object.
4968 * inferior.h (detach_inferior): Likewise.
4969 * linux-nat.c (linux_nat_detach): Use the inf parameter, don't
4970 use inferior_ptid, adjust call to inf_ptrace_detach_success.
4971 * linux-thread-db.c (thread_db_detach): Use inf parameter.
4972
4973 2018-01-19 Simon Marchi <simon.marchi@ericsson.com>
4974
4975 * target.h (struct target_ops) <to_detach>: Add inferior
4976 parameter.
4977 (target_detach): Likewise.
4978 * target.c (dispose_inferior): Pass inferior down.
4979 (target_detach): Pass inferior down. Assert that it is equal to
4980 the current inferior.
4981 * aix-thread.c (aix_thread_detach): Pass inferior down.
4982 * corefile.c (core_file_command): Pass current_inferior() down.
4983 * corelow.c (core_detach): Add inferior parameter.
4984 * darwin-nat.c (darwin_detach): Likewise.
4985 * gnu-nat.c (gnu_detach): Likewise.
4986 * inf-ptrace.c (inf_ptrace_detach): Likewise.
4987 * infcmd.c (detach_command): Pass current_inferior() down to
4988 target_detach.
4989 * infrun.c (follow_fork_inferior): Pass parent_inf to
4990 target_detach.
4991 (handle_vfork_child_exec_or_exit): Pass inf->vfork_parent to
4992 target_detach.
4993 * linux-nat.c (linux_nat_detach): Add inferior parameter.
4994 * linux-thread-db.c (thread_db_detach): Likewise.
4995 * nto-procfs.c (procfs_detach): Likewise.
4996 * procfs.c (procfs_detach): Likewise.
4997 * record.c (record_detach): Likewise.
4998 * record.h (struct inferior): Forward-declare.
4999 (record_detach): Add inferior parameter.
5000 * remote-sim.c (gdbsim_detach): Likewise.
5001 * remote.c (remote_detach_1): Likewise.
5002 (remote_detach): Likewise.
5003 (extended_remote_detach): Likewise.
5004 * sol-thread.c (sol_thread_detach): Likewise.
5005 * target-debug.h (target_debug_print_inferior_p): New macro.
5006 * target-delegates.c: Re-generate.
5007 * top.c (kill_or_detach): Pass inferior down to target_detach.
5008 * windows-nat.c (windows_detach): Add inferior parameter.
5009
5010 2018-01-19 Simon Marchi <simon.marchi@ericsson.com>
5011
5012 * target.h (struct target_ops) <to_detach>: Remove args
5013 parameter.
5014 (target_detach): Likewise.
5015 * target.c (dispose_inferior): Adjust.
5016 (target_detach): Remove args parameter, adjust.
5017 * aix-thread.c (aix_thread_detach): Adjust.
5018 * corefile.c (core_file_command): Adjust.
5019 * corelow.c (core_detach): Adjust.
5020 * darwin-nat.c (darwin_detach): Adjust.
5021 * gnu-nat.c (gnu_detach): Adjust.
5022 * inf-ptrace.c (inf_ptrace_detach): Adjust.
5023 * infcmd.c (detach_command): Adjust
5024 * infrun.c (follow_fork_inferior): Adjust.
5025 (handle_vfork_child_exec_or_exit): Adjust.
5026 * linux-fork.c (linux_fork_detach): Remove args parameter.
5027 * linux-fork.h (linux_fork_detach): Likewise.
5028 * linux-nat.c (linux_nat_detach): Likewise, and adjust.
5029 * linux-thread-db.c (thread_db_detach): Likewise.
5030 * nto-procfs.c (procfs_detach): Likewise.
5031 * procfs.c (procfs_detach): Likewise.
5032 (do_detach): Remove signo parameter.
5033 * record.c (record_detach): Remove args parameter.
5034 * record.h (record_detach): Likewise.
5035 * remote-sim.c (gdbsim_detach): Likewise.
5036 * remote.c (remote_detach_1): Likewise.
5037 (remote_detach): Likewise.
5038 (extended_remote_detach): Likewise.
5039 * sol-thread.c (sol_thread_detach): Likewise.
5040 * target-delegates.c: Re-generate.
5041 * top.c (struct qt_args) <args>: Remove field.
5042 (kill_or_detach): Don't pass args.
5043 (quit_force): Don't set args.
5044 * windows-nat.c (windows_detach): Remove args parameter.
5045
5046 2018-01-19 Yao Qi <yao.qi@linaro.org>
5047
5048 * arm-linux-tdep.c (arm_linux_gcc_target_options): New function.
5049 (arm_linux_init_abi): Install it.
5050
5051 2018-01-19 Yao Qi <yao.qi@linaro.org>
5052
5053 * osabi.c (gdb_osabi_names): Extend the regexp for
5054 arm-linux-gnueabihf.
5055
5056 2018-01-18 Yao Qi <yao.qi@linaro.org>
5057
5058 * dwarf2read.c (abbrev_table) <abbrevs>: Rename it to
5059 m_abbrevs.
5060 (abbrev_table::add_abbrev): Update.
5061 (abbrev_table::lookup_abbrev): Update.
5062
5063 2018-01-18 Yao Qi <yao.qi@linaro.org>
5064
5065 * ppc-linux-tdep.c (ppu2spu_prev_register): Call cooked_read.
5066
5067 2018-01-17 Sergio Durigan Junior <sergiodj@redhat.com>
5068
5069 * compile/compile.c (compile_to_object): Convert "triplet_rx"
5070 to "std::string".
5071
5072 2018-01-17 Tom Tromey <tom@tromey.com>
5073
5074 * dwarf2read.c (symbolp): Remove typedef. Don't instantiate VEC.
5075
5076 2018-01-17 Tom Tromey <tom@tromey.com>
5077
5078 * gdbtypes.h (add_dyn_prop): Remove objfile parameter.
5079 * gdbtypes.c (add_dyn_prop): Remove objfile parameter.
5080 (create_array_type_with_stride): Update.
5081 * dwarf2read.c (set_die_type): Update.
5082
5083 2018-01-17 Tom Tromey <tom@tromey.com>
5084
5085 * dwarf2read.c (delayed_method_info): Remove typedef.
5086 (dwarf2_cu::method_info): Now a std::vector.
5087 (add_to_method_list): Update.
5088 (free_delayed_list): Remove.
5089 (compute_delayed_physnames): Update.
5090 (process_full_comp_unit, process_full_type_unit): Clear the method
5091 list. Remove cleanups.
5092 (psymtab_include_file_name): Add name_holder parameter. Use
5093 unique_xmalloc_ptr.
5094 (dwarf_decode_lines): Update.
5095
5096 2018-01-17 Tom Tromey <tom@tromey.com>
5097 Simon Marchi <simon.marchi@ericsson.com>
5098
5099 * dwarf2read.c (struct dwarf2_cu): Add constructor, destructor.
5100 (dwarf2_per_objfile::free_cached_comp_units)
5101 (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
5102 (init_cutu_and_read_dies_no_follow): Update.
5103 (dwarf2_cu::dwarf2_cu): Rename from init_one_comp_unit.
5104 (dwarf2_cu::~dwarf2_cu): New.
5105 (free_heap_comp_unit, free_stack_comp_unit): Remove.
5106 (age_cached_comp_units, free_one_cached_comp_unit): Update.
5107
5108 2018-01-17 Tom Tromey <tom@tromey.com>
5109 Simon Marchi <simon.marchi@ericsson.com>
5110
5111 * dwarf2read.c (struct dwarf2_cu) <abbrev_table>: Remove.
5112 (struct die_reader_specs) <abbrev_table>: New member.
5113 (struct abbrev_table): Add constructor.
5114 <alloc_abbrev, add_abbrev, lookup_abbrev>: Declare.
5115 <abbrev_obstack>: Now an auto_obstack.
5116 (abbrev_table_up): New typedef.
5117 (init_cu_die_reader): Add abbrev_table parameter.
5118 (read_cutu_die_from_dwo): Remove abbrev_table_provided parameter.
5119 Add result_dwo_abbrev_table.
5120 (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
5121 (init_cutu_and_read_dies_no_follow, build_type_psymtabs_1):
5122 Update.
5123 (peek_die_abbrev): Take die_reader_specs, not dwarf_cu as
5124 parameter.
5125 (skip_children): Update.
5126 (abbrev_table::alloc_abbrev): Rename from
5127 abbrev_table_alloc_abbrev.
5128 (abbrev_table::add_abbrev): Rename from abbrev_table_add_abbrev.
5129 (abbrev_table::lookup_abbrev): Rename from
5130 abbrev_table_lookup_abbrev.
5131 (abbrev_table_read_table): Return abbrev_table_up.
5132 (abbrev_table_free, abbrev_table_free_cleanup)
5133 (dwarf2_read_abbrevs, dwarf2_free_abbrev_table): Remove.
5134 (load_partial_dies): Update.
5135
5136 2018-01-17 Tom Tromey <tom@tromey.com>
5137
5138 * dwarf2read.c (dwarf2_compute_name): Update comment.
5139 (read_func_scope, read_variable): Update.
5140 (new_symbol): Remove.
5141 (new_symbol_full): Rename to new_symbol.
5142
5143 2018-01-17 Mike Gulick <mgulick@mathworks.com>
5144
5145 PR gdb/16577
5146 * gdb_bfd.c (gdb_bfd_map_section): If unable to read object file, issue
5147 a warning instead of throwing an error, set section size to 0 and return
5148 NULL.
5149 * gdb_bfd.h (gdb_bfd_map_section): Update description.
5150
5151 2018-01-17 Simon Marchi <simon.marchi@ericsson.com>
5152
5153 * nat/linux-ptrace.h (linux_ptrace_attach_fail_reason): Return
5154 std::string.
5155 (linux_ptrace_attach_fail_reason_string): Likewise.
5156 * nat/linux-ptrace.c (linux_ptrace_attach_fail_reason):
5157 Likewise.
5158 (linux_ptrace_attach_fail_reason_string): Likewise.
5159 * linux-nat.c (attach_proc_task_lwp_callback): Adjust.
5160
5161 2018-01-17 Simon Marchi <simon.marchi@ericsson.com>
5162
5163 * linux-nat.c (linux_nat_attach): Remove xstrdup.
5164
5165 2018-01-17 Eldar Abusalimov <eldar.abusalimov@jetbrains.com>
5166
5167 PR gdb/21559
5168 * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
5169 checking for fs_base/gs_base fields in struct user_regs_struct.
5170 * configure: Regenerate.
5171
5172 2018-01-17 Yao Qi <yao.qi@linaro.org>
5173
5174 * aarch64-linux-tdep.c (aarch64_linux_gcc_target_options): New
5175 function.
5176 (aarch64_linux_init_abi): Install it to gdbarch hook
5177 gcc_target_options.
5178
5179 2018-01-15 Pedro Alves <palves@redhat.com>
5180
5181 * common/signals-state-save-restore.c
5182 (save_original_signals_state): Fix typos.
5183
5184 2017-01-12 Tom Tromey <tom@tromey.com>
5185 Sergio Durigan Junior <sergiodj@redhat.com>
5186
5187 * Makefile.in (install-only): Install gdb-add-index.
5188
5189 2018-01-12 John Baldwin <jhb@FreeBSD.org>
5190
5191 * fbsd-tdep.c (KVE_PROTECTION): Correct value.
5192
5193 2018-01-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
5194
5195 * infrun.c (keep_going_pass_signal): Clear step-over info when
5196 insert_breakpoints fails.
5197
5198 2018-01-11 Pedro Alves <palves@redhat.com>
5199
5200 PR gdb/22583
5201 * infrun.c (resume): Rename to ...
5202 (resume_1): ... this.
5203 (resume): Reimplement as wrapper around resume_1.
5204
5205 2018-01-11 Pedro Alves <palves@redhat.com>
5206
5207 PR remote/22597
5208 * remote.c (remote_parse_stop_reply): Default to the last-set
5209 general thread instead of to 'magic_null_ptid'.
5210
5211 2018-01-10 Pedro Alves <palves@redhat.com>
5212
5213 * language.h (language_get_symbol_name_matcher): Rename ...
5214 (get_symbol_name_matcher): ... this.
5215 * language.c (language_get_symbol_name_matcher): Ditto.
5216 * dictionary.c, linespec.c, minsyms.c, psymtab.c, symtab.c: All
5217 callers adjusted.
5218
5219 2018-01-10 Pedro Alves <palves@redhat.com>
5220
5221 PR gdb/22670
5222 * dwarf2read.c
5223 (gdb_index_symbol_name_matcher::gdb_index_symbol_name_matcher):
5224 Adjust to use language_get_symbol_name_matcher instead of
5225 language_defn::la_get_symbol_name_matcher.
5226 * language.c (language_get_symbol_name_matcher): If in Ada mode
5227 and the lookup name is a verbatim match, return Ada's matcher.
5228 * language.h (language_get_symbol_name_matcher): Adjust comment.
5229 (ada_lookup_name_info::verbatim_p):: New method.
5230
5231 2018-01-10 Pedro Alves <palves@redhat.com>
5232
5233 PR gdb/22670
5234 * ada-lang.c (ada_collect_symbol_completion_matches): If the
5235 minsym's language is language_auto or language_cplus, pass down
5236 language_ada instead.
5237 * symtab.c (compare_symbol_name): Don't frob symbol language here.
5238
5239 2018-01-10 Pedro Alves <palves@redhat.com>
5240
5241 PR gdb/22670
5242 * minsyms.c (linkage_name_str): New function.
5243 (iterate_over_minimal_symbols): Use it.
5244
5245 2018-01-09 John Baldwin <jhb@FreeBSD.org>
5246
5247 * NEWS: Document that 'info proc' now works on FreeBSD.
5248
5249 2018-01-09 John Baldwin <jhb@FreeBSD.org>
5250
5251 * configure.ac: Check for kinfo_getfile in libutil.
5252 * configure: Regenerate.
5253 * config.in: Regenerate.
5254 * fbsd-nat.c: Include "fbsd-tdep.h".
5255 (fbsd_fetch_cmdline): New.
5256 (fbsd_fetch_kinfo_proc): Move earlier and change to return a bool
5257 rather than calling error.
5258 (fbsd_info_proc): New.
5259 (fbsd_thread_name): Report error if fbsd_fetch_kinfo_proc fails.
5260 (fbsd_wait): Report warning if fbsd_fetch_kinfo_proc fails.
5261 (fbsd_nat_add_target): Set "to_info_proc" to "fbsd_info_proc".
5262
5263 2018-01-09 John Baldwin <jhb@FreeBSD.org>
5264
5265 * fbsd-nat.c (struct free_deleter): Remove.
5266 (fbsd_find_memory_regions): Use gdb::unique_xmalloc_ptr<>.
5267
5268 2018-01-09 John Baldwin <jhb@FreeBSD.org>
5269
5270 * fbsd-nat.c (fbsd_pid_to_exec_file) [KERN_PROC_PATHNAME]: Return
5271 NULL for an empty pathname.
5272
5273 2018-01-09 John Baldwin <jhb@FreeBSD.org>
5274
5275 * fbsd-tdep.c (KVE_STRUCTSIZE, KVE_START, KVE_END, KVE_OFFSET)
5276 (KVE_FLAGS, KVE_PROTECTION, KVE_PATH, KINFO_VME_PROT_READ)
5277 (KINFO_VME_PROT_WRITE, KINFO_VME_PROT_EXEC, KINFO_VME_FLAG_COW)
5278 (KINFO_VME_FLAG_NEEDS_COPY, KINFO_VME_FLAG_NOCOREDUMP)
5279 (KINFO_VME_FLAG_SUPER, KINFO_VME_FLAG_GROWS_UP)
5280 (KINFO_VME_FLAG_GROWS_DOWN, KF_STRUCTSIZE, KF_TYPE, KF_FD)
5281 (KF_PATH, KINFO_FILE_TYPE_VNODE, KINFO_FILE_FD_TYPE_CWD)
5282 (KINFO_FILE_FD_TYPE_TEXT, SIG_WORDS, struct kinfo_proc_layout)
5283 (kinfo_proc_layout_32, kinfo_proc_layout_i386)
5284 (kinfo_proc_layout_64, fbsd_vm_map_entry_flags)
5285 (fbsd_core_info_proc_mappings, fbsd_core_vnode_path)
5286 (fbsd_core_fetch_timeval, fbsd_print_sigset)
5287 (fbsd_core_info_proc_status, fbsd_core_info_proc): New.
5288 (fbsd_init_abi): Install gdbarch "core_info_proc" method.
5289 * fbsd-tdep.h (fbsd_vm_map_entry_flags): New.
5290
5291 2018-01-08 Samuel Thibault <samuel.thibault@ens-lyon.org>
5292
5293 * gdb/gnu-nat.c: Include <elf.h> and <link.h>.
5294 (gnu_xfer_auxv): New function.
5295 (gnu_xfer_partial): Call gnu_xfer_auxv when `object' is
5296 TARGET_OBJECT_AUXV.
5297
5298 2018-01-08 Yao Qi <yao.qi@linaro.org>
5299 Simon Marchi <simon.marchi@ericsson.com>
5300
5301 * Makefile.in (COMMON_SFILES): Remove selftest-arch.c and
5302 common/selftest.c.
5303 (COMMON_OBS): Remove selftest.o.
5304 * configure.ac: Append selftest-arch.c and common/selftest.c to
5305 CONFIG_SRCS. Append selftest-arch.o and selftest.o to COMMON_OBS.
5306 * configure: Re-generated.
5307 * maint.c (maintenance_selftest): Wrap selftests::run_tests with
5308 GDB_SELF_TEST.
5309 (maintenance_info_selftests): Likewise.
5310
5311 2018-01-08 Xavier Roirand <roirand@adacore.com>
5312
5313 * ada-valprint.c (val_print_packed_array_elements): Use
5314 proper number of elements when printing an array indexed
5315 by an enumeration type.
5316
5317 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
5318
5319 * dwarf2read.c (struct dwarf2_cu) <dwarf2_per_objfile>: Remove.
5320 (dw2_get_file_names_reader): Adjust.
5321 (lookup_dwo_signatured_type): Adjust.
5322 (lookup_dwp_signatured_type): Adjust.
5323 (lookup_signatured_type): Adjust.
5324 (create_type_unit_group): Adjust.
5325 (get_type_unit_group): Adjust.
5326 (process_psymtab_comp_unit_reader): Adjust.
5327 (build_type_psymtabs_reader): Adjust.
5328 (scan_partial_symbols): Adjust.
5329 (add_partial_symbol): Adjust.
5330 (add_partial_subprogram): Adjust.
5331 (peek_die_abbrev): Adjust.
5332 (fixup_go_packaging): Adjust.
5333 (process_imported_unit_die): Adjust.
5334 (dwarf2_compute_name): Adjust.
5335 (dwarf2_physname): Adjust.
5336 (read_import_statement): Adjust.
5337 (handle_DW_AT_stmt_list): Adjust.
5338 (read_file_scope): Adjust.
5339 (read_func_scope): Adjust.
5340 (read_lexical_block_scope): Adjust.
5341 (read_call_site_scope): Adjust.
5342 (read_variable): Adjust.
5343 (dwarf2_rnglists_process): Adjust.
5344 (dwarf2_ranges_process): Adjust.
5345 (dwarf2_ranges_read): Adjust.
5346 (dwarf2_get_pc_bounds): Adjust.
5347 (dwarf2_record_block_ranges): Adjust.
5348 (dwarf2_add_field): Adjust.
5349 (dwarf2_add_member_fn): Adjust.
5350 (read_structure_type): Adjust.
5351 (process_structure_scope): Adjust.
5352 (read_enumeration_type): Adjust.
5353 (read_array_type): Adjust.
5354 (mark_common_block_symbol_computed): Adjust.
5355 (read_common_block): Adjust.
5356 (read_namespace_type): Adjust.
5357 (read_namespace): Adjust.
5358 (read_module_type): Adjust.
5359 (read_tag_pointer_type): Adjust.
5360 (read_tag_ptr_to_member_type): Adjust.
5361 (read_tag_string_type): Adjust.
5362 (read_subroutine_type): Adjust.
5363 (read_typedef): Adjust.
5364 (read_base_type): Adjust.
5365 (attr_to_dynamic_prop): Adjust.
5366 (read_subrange_type): Adjust.
5367 (read_unspecified_type): Adjust.
5368 (dwarf2_read_abbrevs): Adjust.
5369 (load_partial_dies): Adjust.
5370 (read_partial_die): Adjust.
5371 (find_partial_die): Adjust.
5372 (guess_partial_die_structure_name): Adjust.
5373 (fixup_partial_die): Adjust.
5374 (read_attribute_value): Adjust.
5375 (read_addr_index): Adjust.
5376 (read_addr_index_from_leb128): Adjust.
5377 (read_str_index): Adjust.
5378 (dwarf2_string_attr): Adjust.
5379 (get_debug_line_section): Adjust.
5380 (dwarf_decode_line_header): Adjust.
5381 (lnp_state_machine::check_line_address): Adjust.
5382 (dwarf_decode_lines_1): Adjust.
5383 (dwarf_decode_lines): Adjust.
5384 (dwarf2_start_symtab): Adjust.
5385 (var_decode_location): Adjust.
5386 (new_symbol_full): Adjust.
5387 (dwarf2_const_value_data): Adjust.
5388 (dwarf2_const_value_attr): Adjust.
5389 (dwarf2_const_value): Adjust.
5390 (die_type): Adjust.
5391 (die_containing_type): Adjust.
5392 (build_error_marker_type): Adjust.
5393 (lookup_die_type): Adjust.
5394 (guess_full_die_structure_name): Adjust.
5395 (anonymous_struct_prefix): Adjust.
5396 (determine_prefix): Adjust.
5397 (dwarf2_name): Adjust.
5398 (follow_die_ref_or_sig): Adjust.
5399 (follow_die_offset): Adjust.
5400 (follow_die_ref): Adjust.
5401 (follow_die_sig_1): Adjust.
5402 (follow_die_sig): Adjust.
5403 (get_signatured_type): Adjust.
5404 (get_DW_AT_signature_type): Adjust.
5405 (decode_locdesc): Adjust.
5406 (dwarf_decode_macros): Adjust.
5407 (cu_debug_loc_section): Adjust.
5408 (fill_in_loclist_baton): Adjust.
5409 (dwarf2_symbol_mark_computed): Adjust.
5410 (init_one_comp_unit): Don't assign
5411 dwarf2_cu::dwarf2_per_objfile.
5412 (set_die_type): Adjust.
5413
5414 2018-01-07 Simon Marchi <simon.marchi@ericsson.com>
5415
5416 * dwarf2read.c (struct mapped_debug_names): Add constructor.
5417 <dwarf2_per_objfile>: New field.
5418 (dwarf2_per_objfile): Remove global.
5419 (get_dwarf2_per_objfile): New function.
5420 (set_dwarf2_per_objfile): New function.
5421 (dwarf2_build_psymtabs_hard): Change objfile parameter to
5422 dwarf2_per_objfile.
5423 (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
5424 (read_abbrev_offset): Likewise.
5425 (read_indirect_string): Likewise.
5426 (read_indirect_line_string): Likewise.
5427 (read_indirect_string_at_offset): Likewise.
5428 (read_indirect_string_from_dwz): Likewise.
5429 (dwarf2_find_containing_comp_unit): Change objfile parameter to
5430 dwarf2_per_objfile.
5431 (age_cached_comp_units): Add dwarf2_per_objfile parameter.
5432 (create_all_comp_units): Change objfile parameter to
5433 dwarf2_per_objfile.
5434 (create_all_type_units): Likewise.
5435 (process_queue): Add dwarf2_per_objfile parameter.
5436 (read_and_check_comp_unit_head): Likewise.
5437 (lookup_dwo_unit_in_dwp): Likewise.
5438 (get_dwp_file): Likewise.
5439 (process_cu_includes): Likewise.
5440 (struct free_dwo_file_cleanup_data): New struct.
5441 (dwarf2_has_info): Use get_dwarf2_per_objfile and
5442 set_dwarf2_per_objfile.
5443 (dwarf2_get_dwz_file): Add dwarf2_per_objfile parameter.
5444 (dw2_do_instantiate_symtab): Get dwarf2_per_objfile from
5445 context, adjust calls.
5446 (dw2_instantiate_symtab): Likewise.
5447 (dw2_get_cutu): Add dwarf2_per_objfile parameter.
5448 (dw2_get_cu): Likewise.
5449 (create_cu_from_index_list): Change objfile parameter to
5450 dwarf2_per_objfile.
5451 (create_cus_from_index_list): Get dwarf2_per_objfile from
5452 context, adjust calls.
5453 (create_cus_from_index): Likewise.
5454 (create_signatured_type_table_from_index): Change objfile
5455 parameter to dwarf2_per_objfile.
5456 (create_signatured_type_table_from_debug_names): Change objfile
5457 parameter to dwarf2_per_objfile.
5458 (create_addrmap_from_index): Likewise.
5459 (create_addrmap_from_aranges): Likewise.
5460 (dwarf2_read_index): Use get_dwarf2_per_objfile, adjust calls.
5461 (dw2_setup): Remove.
5462 (dw2_get_file_names_reader): Get dwarf2_per_objfile from
5463 context.
5464 (dw2_find_last_source_symtab): Get dwarf2_per_objfile using
5465 get_dwarf2_per_objfile.
5466 (dw2_forget_cached_source_info): Likewise.
5467 (dw2_map_symtabs_matching_filename): Likewise.
5468 (struct dw2_symtab_iterator) <index>: Remove.
5469 <dwarf2_per_objfile>: New field.
5470 (dw2_symtab_iter_init): Replace index parameter with
5471 dwarf2_per_objfile.
5472 (dw2_symtab_iter_next): Use dwarf2_per_objfile from iter.
5473 (dw2_lookup_symbol): Use get_dwarf2_per_objfile and adjust.
5474 (dw2_print_stats): Likewise.
5475 (dw2_dump): Likewise.
5476 (dw2_expand_symtabs_for_function): Likewise.
5477 (dw2_expand_all_symtabs): Likewise.
5478 (dw2_expand_symtabs_with_fullname): Likewise.
5479 (dw2_expand_marked_cus): Replace index and objfile parameters
5480 with dwarf2_per_objfile.
5481 (dw_expand_symtabs_matching_file_matcher): Add
5482 dwarf2_per_objfile parameter and adjust calls.
5483 (dw2_expand_symtabs_matching): Use get_dwarf2_per_objfile and
5484 adjust calls.
5485 (dw2_find_pc_sect_compunit_symtab): Don't call dw2_setup.
5486 (dw2_map_symbol_filenames): Use get_dwarf2_per_objfile and
5487 adjust calls.
5488 (create_cus_from_debug_names_list): Replace objfile parameter
5489 with dwarf2_per_objfile and adjust calls.
5490 (create_cus_from_debug_names): Likewise.
5491 (dwarf2_read_debug_names): Likewise.
5492 (mapped_debug_names::namei_to_name): Adjust call.
5493 (dw2_debug_names_iterator::next): Likewise.
5494 (dw2_debug_names_iterator::find_vec_in_debug_names): Likewise.
5495 (dw2_debug_names_lookup_symbol): Use get_dwarf2_per_objfile.
5496 (dw2_debug_names_dump): Likewise.
5497 (dw2_debug_names_expand_symtabs_for_function): Likewise.
5498 (dw2_debug_names_expand_symtabs_matching): Likewise.
5499 (dwarf2_initialize_objfile): Likewise.
5500 (dwarf2_build_psymtabs): Likewise.
5501 (get_abbrev_section_for_cu): Get dwarf2_per_objfile from
5502 this_cu.
5503 (error_check_comp_unit_head): Add dwarf2_per_objfile parameter.
5504 (read_and_check_comp_unit_head): Likewise.
5505 (read_abbrev_offset): Likewise.
5506 (create_debug_type_hash_table): Likewise.
5507 (create_debug_types_hash_table): Likewise.
5508 (create_all_type_units): Replace objfile parameter with
5509 dwarf2_per_objfile.
5510 (add_type_unit): Add dwarf2_per_objfile parameter.
5511 (fill_in_sig_entry_from_dwo_entry): Replace objfile parameter
5512 with dwarf2_per_objfile.
5513 (lookup_dwo_signatured_type): Get dwarf2_per_objfile from cu.
5514 (lookup_dwp_signatured_type): Likewise.
5515 (lookup_signatured_type): Likewise.
5516 (read_cutu_die_from_dwo): Likewise.
5517 (init_tu_and_read_dwo_dies): Likewise.
5518 (init_cutu_and_read_dies): Likewise.
5519 (init_cutu_and_read_dies_no_follow): Likewise.
5520 (allocate_type_unit_groups_table): Add objfile parameter.
5521 (create_type_unit_group): Use dwarf2_per_objfile from cu.
5522 (get_type_unit_group): Likewise.
5523 (process_psymtab_comp_unit): Update call.
5524 (build_type_psymtabs_reader): Use dwarf2_per_objfile from cu.
5525 (build_type_psymtabs_1): Add dwarf2_per_objfile parameter.
5526 (print_tu_stats): Likewise.
5527 (build_type_psymtab_dependencies): Use dwarf2_per_objfile passed
5528 in void* parameter.
5529 (build_type_psymtabs): Change objfile parameter to
5530 dwarf2_per_objfile.
5531 (process_skeletonless_type_unit): Use dwarf2_per_objfile
5532 passed in void* parameter.
5533 (process_skeletonless_type_units): Change objfile parameter to
5534 dwarf2_per_objfile.
5535 (set_partial_user): Likewise.
5536 (dwarf2_build_psymtabs_hard): Likewise.
5537 (read_comp_units_from_section): Likewise.
5538 (create_all_comp_units): Likewise.
5539 (scan_partial_symbols): Update calls.
5540 (add_partial_symbol): Likewise.
5541 (dwarf2_read_symtab): Use get_dwarf2_per_objfile.
5542 (maybe_queue_comp_unit): Use dwarf2_read_symtab from cu.
5543 (process_queue): Add dwarf2_per_objfile parameter.
5544 (get_compunit_symtab): Use dwarf2_per_objfile from cu.
5545 (compute_compunit_symtab_includes): Likewise.
5546 (process_cu_includes): Add dwarf2_per_objfile parameter.
5547 (process_full_comp_unit): Use dwarf2_per_objfile from cu.
5548 (process_full_type_unit): Likewise.
5549 (process_imported_unit_die): Update call.
5550 (handle_DW_AT_stmt_list): Use dwarf2_per_objfile from cu.
5551 (read_file_scope): Likewise.
5552 (allocate_dwo_file_hash_table): Add objfile parameter.
5553 (lookup_dwo_file_slot): Add dwarf2_per_objfile parameter.
5554 (create_cus_hash_table): Likewise.
5555 (create_dwp_hash_table): Likewise.
5556 (create_dwo_unit_in_dwp_v1): Likewise.
5557 (create_dwp_v2_section): Likewise.
5558 (create_dwo_unit_in_dwp_v2): Likewise.
5559 (lookup_dwo_unit_in_dwp): Likewise.
5560 (try_open_dwop_file): Likewise.
5561 (open_dwo_file): Likewise. Use dwarf2_per_objfile from cu.
5562 (open_and_init_dwo_file): Use dwarf2_per_objfile from cu, update
5563 cleanup to include a reference to dwarf2_per_objfile.
5564 (open_dwp_file): Add dwarf2_per_objfile parameter.
5565 (open_and_init_dwp_file): Likewise.
5566 (get_dwp_file): Likewise.
5567 (lookup_dwo_cutu): Use dwarf2_per_objfile from cu.
5568 (queue_and_load_all_dwo_tus): Update call.
5569 (free_dwo_file_cleanup): Use dwarf2_per_objfile from cleanup
5570 data.
5571 (dwarf2_rnglists_process): Use dwarf2_per_objfile from cu.
5572 (dwarf2_ranges_process): Likewise.
5573 (dwarf2_get_pc_bounds): Likewise.
5574 (mark_common_block_symbol_computed): Likewise.
5575 (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
5576 (dwarf2_read_abbrevs): Update call.
5577 (read_partial_die): Use dwarf2_per_objfile from cu.
5578 (find_partial_die): Likewise.
5579 (fixup_partial_die): Likewise.
5580 (read_attribute_value): Likewise.
5581 (read_indirect_string_at_offset_from): Add objfile parameter.
5582 (read_indirect_string_at_offset): Add dwarf2_per_objfile
5583 parameter.
5584 (read_indirect_string_from_dwz): Add objfile parameter.
5585 (read_indirect_string): Add objfile parameter.
5586 (read_addr_index_1): Add dwarf2_per_objfile parameter.
5587 (read_addr_index): Use dwarf2_per_objfile from cu.
5588 (dwarf2_read_addr_index): Use dwarf2_per_objfile from cu, don't
5589 call dw2_setup.
5590 (read_str_index): Use dwarf2_per_objfile from cu.
5591 (get_debug_line_section): Likewise.
5592 (read_formatted_entries): Add dwarf2_per_objfile parameter.
5593 (dwarf_decode_line_header): Use dwarf2_per_objfile from cu.
5594 (new_symbol_full): Use dwarf2_per_objfile from cu.
5595 (build_error_marker_type): Likewise.
5596 (lookup_die_type): Likewise.
5597 (determine_prefix): Likewise.
5598 (follow_die_offset): Likewise.
5599 (dwarf2_fetch_die_loc_sect_off): Use get_dwarf2_per_objfile.
5600 (dwarf2_fetch_constant_bytes): Don't call dw2_setup.
5601 (dwarf2_fetch_die_type_sect_off): Likewise.
5602 (dwarf2_get_die_type): Likewise.
5603 (follow_die_sig_1): Use dwarf2_per_objfile from cu.
5604 (get_signatured_type): Likewise.
5605 (get_DW_AT_signature_type): Likewise.
5606 (dwarf_decode_macro_bytes): Add dwarf2_per_objfile parameter.
5607 (dwarf_decode_macros): Use dwarf2_per_objfile from cu.
5608 (cu_debug_loc_section): Likewise.
5609 (fill_in_loclist_baton): Likewise.
5610 (dwarf2_symbol_mark_computed): Likewise.
5611 (dwarf2_find_containing_comp_unit): Change objfile parameter to
5612 dwarf2_per_objfile.
5613 (free_cached_comp_units): Use dwarf2_per_objfile passed in void*
5614 parameter.
5615 (age_cached_comp_units): Add dwarf2_per_objfile parameter.
5616 (free_one_cached_comp_unit): Use dwarf2_per_objfile from cu.
5617 (dwarf2_free_objfile): Use get_dwarf2_per_objfile.
5618 (set_die_type): Use dwarf2_free_objfile from cu.
5619 (get_die_type_at_offset): Likewise.
5620 (dwarf2_per_objfile_free): Don't assign global variable.
5621 (debug_names) <constructor>: Add dwarf2_per_objfile
5622 parameter, update m_debugstrlookup construction.
5623 (debug_names::debug_str_lookup): Add dwarf2_per_objfile
5624 parameter.
5625 <m_dwarf2_per_objfile>: New field.
5626 <lookup>: Use m_dwarf2_per_objfile.
5627 (check_dwarf64_offsets): Add dwarf2_per_objfile parameter.
5628 (psyms_seen_size): Likewise.
5629 (write_gdbindex): Replace objfile parameter with
5630 dwarf2_per_objfile.
5631 (write_debug_names): Likewise.
5632 (write_psymtabs_to_index): Likewise.
5633 (save_gdb_index_command): Use get_dwarf2_per_objfile, update
5634 calls.
5635
5636 2018-01-07 Simon Marchi <simon.marchi@ericsson.com>
5637
5638 * dwarf2read.c (struct dwarf2_cu) <objfile>: Remove.
5639 <dwarf2_per_objfile>: New field.
5640 (struct dwarf2_per_cu_data) <objfile>: Remove.
5641 <dwarf2_per_objfile>: New field.
5642 (create_cu_from_index_list): Assign dwarf2_per_objfile instead
5643 of objfile.
5644 (create_signatured_type_table_from_index): Likewise.
5645 (create_debug_type_hash_table): Likewise.
5646 (fill_in_sig_entry_from_dwo_entry): Likewise.
5647 (lookup_dwo_unit): Access objfile through dwarf2_per_objfile.
5648 (create_type_unit_group): Assign dwarf2_per_objfile instead of
5649 objfile.
5650 (create_partial_symtab): Access objfile through
5651 dwarf2_per_objfile.
5652 (process_psymtab_comp_unit_reader): Likewise.
5653 (read_comp_units_from_section): Likewise.
5654 (scan_partial_symbols): Likewise.
5655 (add_partial_symbol): Likewise.
5656 (add_partial_subprogram): Likewise.
5657 (peek_die_abbrev): Likewise.
5658 (fixup_go_packaging): Likewise.
5659 (process_full_comp_unit): Likewise.
5660 (process_full_type_unit): Likewise.
5661 (process_imported_unit_die): Likewise.
5662 (dwarf2_compute_name): Likewise.
5663 (dwarf2_physname): Likewise.
5664 (read_import_statement): Likewise.
5665 (create_cus_hash_table): Assign dwarf2_physname instead of
5666 objfile.
5667 (read_func_scope): Access objfile through dwarf2_per_objfile.
5668 (read_lexical_block_scope): Likewise.
5669 (read_call_site_scope): Likewise.
5670 (read_variable): Likewise.
5671 (dwarf2_rnglists_process): Likewise.
5672 (dwarf2_ranges_process): Likewise.
5673 (dwarf2_ranges_read): Likewise.
5674 (dwarf2_record_block_ranges): Likewise.
5675 (dwarf2_add_field): Likewise.
5676 (dwarf2_add_member_fn): Likewise.
5677 (read_structure_type): Likewise.
5678 (process_structure_scope): Likewise.
5679 (read_enumeration_type): Likewise.
5680 (read_array_type): Likewise.
5681 (read_common_block): Likewise.
5682 (read_namespace_type): Likewise.
5683 (read_namespace): Likewise.
5684 (read_module_type): Likewise.
5685 (read_tag_pointer_type): Likewise.
5686 (read_tag_ptr_to_member_type): Likewise.
5687 (read_tag_string_type): Likewise.
5688 (read_subroutine_type): Likewise.
5689 (read_typedef): Likewise.
5690 (read_base_type): Likewise.
5691 (attr_to_dynamic_prop): Likewise.
5692 (read_subrange_type): Likewise.
5693 (read_unspecified_type): Likewise.
5694 (load_partial_dies): Likewise.
5695 (read_partial_die): Likewise.
5696 (find_partial_die): Likewise.
5697 (guess_partial_die_structure_name): Likewise.
5698 (fixup_partial_die): Likewise.
5699 (read_attribute_value): Likewise.
5700 (read_addr_index_from_leb128): Likewise.
5701 (dwarf2_read_addr_index): Likewise.
5702 (dwarf2_string_attr): Likewise.
5703 (lnp_state_machine::check_line_address): Likewise.
5704 (dwarf_decode_lines_1): Likewise.
5705 (dwarf_decode_lines): Likewise.
5706 (dwarf2_start_symtab): Likewise.
5707 (var_decode_location): Likewise.
5708 (new_symbol_full): Likewise.
5709 (dwarf2_const_value_data): Likewise.
5710 (dwarf2_const_value_attr): Likewise.
5711 (dwarf2_const_value): Likewise.
5712 (die_type): Likewise.
5713 (die_containing_type): Likewise.
5714 (lookup_die_type): Likewise.
5715 (guess_full_die_structure_name): Likewise.
5716 (anonymous_struct_prefix): Likewise.
5717 (dwarf2_name): Likewise.
5718 (follow_die_ref_or_sig): Likewise.
5719 (follow_die_offset): Likewise.
5720 (follow_die_ref): Likewise.
5721 (dwarf2_fetch_die_loc_sect_off): Likewise.
5722 (dwarf2_fetch_constant_bytes): Likewise.
5723 (dwarf2_fetch_die_type_sect_off): Likewise.
5724 (dwarf2_get_die_type): Likewise.
5725 (follow_die_sig): Likewise.
5726 (decode_locdesc): Likewise.
5727 (dwarf2_per_cu_objfile): Likewise.
5728 (dwarf2_per_cu_text_offset): Likewise.
5729 (init_one_comp_unit): Assign dwarf2_per_objfile instead of
5730 objfile.
5731 (set_die_type): Access objfile through
5732 dwarf2_per_objfile.
5733
5734 2018-01-07 Simon Marchi <simon.marchi@ericsson.com>
5735
5736 * valprint.c (converted_character_d): Remove typedef.
5737 (DEF_VEC_O (converted_character_d)): Remove.
5738 (count_next_character): Use std::vector.
5739 (print_converted_chars_to_obstack): Likewise.
5740 (generic_printstr): Likewise.
5741
5742 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
5743
5744 * xml-support.h (struct gdb_xml_value): Add constructor.
5745 <value>: Change type to unique_xmalloc_ptr.
5746 (gdb_xml_value_s): Remove typedef.
5747 (DEF_VEC_O (gdb_xml_value_s)): Remove.
5748 (gdb_xml_element_start_handler): Change parameter type to
5749 std::vector.
5750 (xml_find_attribute): Likewise.
5751 * xml-support.c (xml_find_attribute): Change parameter type to
5752 std::vector and adjust.
5753 (gdb_xml_values_cleanup): Remove.
5754 (gdb_xml_parser::start_element): Adjust to std::vector.
5755 (xinclude_start_include): Change paraeter type to std::vector
5756 and adjust.
5757 * btrace.c (check_xml_btrace_version): Likewise.
5758 (parse_xml_btrace_block): Likewise.
5759 (parse_xml_btrace_pt_config_cpu): Likewise.
5760 (parse_xml_btrace_pt): Likewise.
5761 (parse_xml_btrace_conf_bts): Likewise.
5762 (parse_xml_btrace_conf_pt): Likewise.
5763 * memory-map.c (memory_map_start_memory): Likewise.
5764 (memory_map_start_property): Likewise.
5765 * osdata.c (osdata_start_osdata): Likewise.
5766 (osdata_start_item): Likewise.
5767 (osdata_start_column): Likewise.
5768 * remote.c (start_thread): Likewise.
5769 * solib-aix.c (library_list_start_library): Likewise.
5770 (library_list_start_list): Likewise.
5771 * solib-svr4.c (library_list_start_library): Likewise.
5772 (svr4_library_list_start_list): Likewise.
5773 * solib-target.c (library_list_start_segment): Likewise.
5774 (library_list_start_section): Likewise.
5775 (library_list_start_library): Likewise.
5776 (library_list_start_list): Likewise.
5777 * tracepoint.c (traceframe_info_start_memory): Likewise.
5778 (traceframe_info_start_tvar): Likewise.
5779 * xml-syscall.c (syscall_start_syscall): Likewise.
5780 * xml-tdesc.c (tdesc_start_target): Likewise.
5781 (tdesc_start_feature): Likewise.
5782 (tdesc_start_reg): Likewise.
5783 (tdesc_start_union): Likewise.
5784 (tdesc_start_struct): Likewise.
5785 (tdesc_start_flags): Likewise.
5786 (tdesc_start_enum): Likewise.
5787 (tdesc_start_field): Likewise.
5788 (tdesc_start_enum_value): Likewise.
5789 (tdesc_start_vector): Likewise.
5790
5791 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
5792
5793 * extension.h (struct xmethod_worker) <clone>: Remove.
5794 * python/py-xmethods.c (struct python_xmethod_worker) <clone>:
5795 Remove.
5796 (python_xmethod_worker::clone): Remove.
5797 * valops.c (find_overload_match): Use std::move instead of
5798 clone.
5799
5800 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
5801
5802 * extension-priv.h (enum ext_lang_rc): Remove, move to extension.h.
5803 (struct extension_language_ops) <clone_xmethod_worker_data>: Remove.
5804 <free_xmethod_worker_data>: Remove.
5805 <get_matching_xmethod_workers>: Chance VEC to std::vector.
5806 <get_xmethod_arg_types>: Remove.
5807 <get_xmethod_result_type>: Remove.
5808 <invoke_xmethod>: Remove.
5809 * extension.c (new_xmethod_worker): Remove.
5810 (clone_xmethod_worker): Remove.
5811 (get_matching_xmethod_workers): Return void, pass std::vector by
5812 pointer.
5813 (get_xmethod_arg_types): Rename to...
5814 (xmethod_worker::get_arg_types): ... this, and adjust.
5815 (get_xmethod_result_type): Rename to...
5816 (xmethod_worker::get_result_type): ... this, and adjust.
5817 (invoke_xmethod): Remove.
5818 (free_xmethod_worker): Remove.
5819 (free_xmethod_worker_vec): Remove.
5820 * extension.h (enum ext_lang_rc): Move here from
5821 extension-priv.h.
5822 (struct xmethod_worker): Add constructor and destructor.
5823 <data>: Remove.
5824 <value>: Remove.
5825 <invoke, clone, do_get_result_type, do_get_arg_types>: New
5826 virtual pure methods.
5827 <get_arg_types, get_result_type>: New methods.
5828 (xmethod_worker_ptr): Remove typedef.
5829 (DEF_VEC_P (xmethod_worker_ptr)): Remove.
5830 (xmethod_worker_vec): Remove typedef.
5831 (xmethod_worker_up): New typedef.
5832 (invoke_xmethod): Remove.
5833 (clone_xmethod_worker): Remove.
5834 (free_xmethod_worker): Remove.
5835 (free_xmethod_worker_vec): Remove.
5836 (get_xmethod_arg_types): Remove.
5837 (get_xmethod_result_type): Remove.
5838 * valops.c (find_method_list): Use std::vector, don't use
5839 intermediate vector.
5840 (value_find_oload_method_list): Use std::vector.
5841 (find_overload_match): Use std::vector.
5842 (find_oload_champ): Use std::vector.
5843 * value.c (value_free): Use operator delete.
5844 (value_of_xmethod): Rename to...
5845 (value_from_xmethod): ... this. Don't assign
5846 xmethod_worker::value, take rvalue-reference.
5847 (result_type_of_xmethod): Adjust.
5848 (call_xmethod): Adjust.
5849 * value.h: Include extension.h.
5850 (struct xmethod_worker): Don't forward-declare.
5851 (value_of_xmethod): Rename to...
5852 (value_from_xmethod): ... this, take rvalue-reference.
5853 * python/py-xmethods.c (struct gdbpy_worker_data): Rename to...
5854 (struct python_xmethod_worker): ... this, add constructor and
5855 destructor.
5856 <invoke, clone, do_get_arg_types, do_get_result_type>: Implement.
5857 (gdbpy_free_xmethod_worker_data): Rename to...
5858 (python_xmethod_worker::~python_xmethod_worker): ... this and
5859 adjust.
5860 (gdbpy_clone_xmethod_worker_data): Rename to...
5861 (python_xmethod_worker::clone): ... this and adjust.
5862 (gdbpy_get_matching_xmethod_workers): Use std::vector, don't use
5863 temporary vector.
5864 (gdbpy_get_xmethod_arg_types): Rename to...
5865 (python_xmethod_worker::do_get_arg_types): ... this and adjust.
5866 (gdbpy_get_xmethod_result_type): Rename to...
5867 (python_xmethod_worker::do_get_result_type): ... this and
5868 adjust.
5869 (gdbpy_invoke_xmethod): Rename to...
5870 (python_xmethod_worker::invoke): ... this and adjust.
5871 (new_python_xmethod_worker): Rename to...
5872 (python_xmethod_worker::python_xmethod_worker): ... this and
5873 adjust.
5874 * python/python-internal.h (gdbpy_clone_xmethod_worker_data):
5875 Remove.
5876 (gdbpy_free_xmethod_worker_data): Remove.
5877 (gdbpy_get_matching_xmethod_workers): Use std::vector.
5878 (gdbpy_get_xmethod_arg_types): Remove.
5879 (gdbpy_get_xmethod_result_type): Remove.
5880 (gdbpy_invoke_xmethod): Remove.
5881 * python/python.c (python_extension_ops): Remove obsolete
5882 callbacks.
5883
5884 2018-01-05 Pedro Alves <palves@redhat.com>
5885
5886 PR gdb/18653
5887 * common/signals-state-save-restore.c
5888 (save_original_signals_state): New parameter 'quiet'. Warn if we
5889 find a custom handler preinstalled, instead of internal erroring.
5890 But only warn if !quiet.
5891 * common/signals-state-save-restore.h
5892 (save_original_signals_state): New parameter 'quiet'.
5893 * main.c (captured_main_1): Move save_original_signals_state call
5894 after option handling, and pass QUIET.
5895
5896 2018-01-05 Pedro Alves <palves@redhat.com>
5897
5898 * spu-tdep.c (spu_catch_start): Pass
5899 symbol_name_match_type::SEARCH_NAME to block_lookup_symbol.
5900
5901 2018-01-05 Pedro Alves <palves@redhat.com>
5902
5903 PR gdb/22670
5904 * ada-lang.c (literal_symbol_name_matcher): New function.
5905 (ada_get_symbol_name_matcher): Use it for
5906 symbol_name_match_type::SEARCH_NAME.
5907 * block.c (block_lookup_symbol): New parameter 'match_type'. Pass
5908 it down instead of assuming symbol_name_match_type::FULL.
5909 * block.h (block_lookup_symbol): New parameter 'match_type'.
5910 * c-valprint.c (print_unpacked_pointer): Use
5911 lookup_symbol_search_name instead of lookup_symbol.
5912 * compile/compile-object-load.c (get_out_value_type): Pass down
5913 symbol_name_match_type::SEARCH_NAME.
5914 * cp-namespace.c (cp_basic_lookup_symbol): Pass down
5915 symbol_name_match_type::FULL.
5916 * cp-support.c (cp_get_symbol_name_matcher): Handle
5917 symbol_name_match_type::SEARCH_NAME.
5918 * infrun.c (insert_exception_resume_breakpoint): Use
5919 lookup_symbol_search_name.
5920 * p-valprint.c (pascal_val_print): Use lookup_symbol_search_name.
5921 * psymtab.c (maintenance_check_psymtabs): Use
5922 symbol_name_match_type::SEARCH_NAME and SYMBOL_SEARCH_NAME.
5923 * stack.c (print_frame_args): Use lookup_symbol_search_name and
5924 SYMBOL_SEARCH_NAME.
5925 * symtab.c (lookup_local_symbol): Don't demangle the lookup name
5926 if symbol_name_match_type::SEARCH_NAME.
5927 (lookup_symbol_in_language): Pass down
5928 symbol_name_match_type::FULL.
5929 (lookup_symbol_search_name): New.
5930 (lookup_language_this): Pass down
5931 symbol_name_match_type::SEARCH_NAME.
5932 (lookup_symbol_aux, lookup_local_symbol): New parameter
5933 'match_type'. Pass it down.
5934 * symtab.h (symbol_name_match_type::SEARCH_NAME): New enumerator.
5935 (lookup_symbol_search_name): New declaration.
5936 (lookup_symbol_in_block): New 'match_type' parameter.
5937
5938 2018-01-05 Pedro Alves <palves@redhat.com>
5939
5940 PR gdb/22670
5941 * ada-lang.c (ada_lookup_encoded_symbol): Reimplement in terms of
5942 ada_lookup_symbol.
5943 (ada_lookup_symbol): Reimplement in terms of
5944 ada_lookup_symbol_list, bits factored out from
5945 ada_lookup_encoded_symbol.
5946
5947 2018-01-05 Joel Brobecker <brobecker@adacore.com>
5948
5949 * ada-exp.y (write_object_renaming): When subscripting an array
5950 using a symbol as the index, pass the block in call to
5951 ada_lookup_encoded_symbol when looking that symbol up.
5952
5953 2018-01-05 Jerome Guitton <guitton@adacore.com>
5954
5955 * ada-lang.c (ada_array_length): Use ada_index_type instead of
5956 TYPE_INDEX_TYPE.
5957
5958 2018-01-05 Joel Brobecker <brobecker@adacore.com>
5959
5960 * ada-lang.c (ada_to_fixed_value_create): Add handling of
5961 the case where VALUE_LVAL (val0) is not lval_memory.
5962
5963 2018-01-05 Xavier Roirand <roirand@adacore.com>
5964
5965 * ada-valprint.c (print_optional_low_bound): Handle
5966 character-indexed array printing like boolean-indexed array
5967 printing.
5968
5969 2018-01-05 Joel Brobecker <brobecker@adacore.com>
5970
5971 * NEWS: Create a new section for the next release branch.
5972 Rename the section of the current branch, now that it has
5973 been cut.
5974
5975 2018-01-05 Joel Brobecker <brobecker@adacore.com>
5976
5977 GDB 8.1 branch created (5219ac6237c272b938c28517bf371429260c71e7):
5978 * version.in: Bump version to 8.1.50.DATE-git.
5979
5980 2018-01-03 Xavier Roirand <roirand@adacore.com>
5981
5982 * ada-lang.h (ada_exception_catchpoint_kind) <ada_catch_handlers>:
5983 Add field.
5984 * ada-lang.c (struct exception_support_info) <catch_handlers_sym>:
5985 Add field.
5986 (default_exception_support_info) <catch_handlers_sym>: Add field.
5987 (exception_support_info_fallback) <catch_handlers_sym>: Add field.
5988 (ada_exception_name_addr_1): Add "catch handlers" handling.
5989 (ada_exception_catchpoint_cond_string) <ex>: New parameter.
5990 Update all callers.
5991 (create_excep_cond_exprs) <ex>: Add parameter.
5992 (re_set_exception): Update create_excep_cond_exprs call.
5993 (print_it_exception, print_one_exception, print_mention_exception)
5994 (print_recreate_exception): Add "catch handler" handling.
5995 (allocate_location_catch_handlers, re_set_catch_handlers)
5996 (check_status_catch_handlers, print_it_catch_handlers)
5997 (print_one_catch_handlers, print_mention_catch_handlers)
5998 (print_recreate_catch_handlers): New function.
5999 (catch_handlers_breakpoint_ops): New variable.
6000 (catch_ada_exception_command_split) <is_catch_handlers_cmd>:
6001 Add parameter. Add "catch handler" handling.
6002 (ada_exception_sym_name, ada_exception_breakpoint_ops):
6003 Add "catch handler" handling.
6004 (ada_exception_catchpoint_cond_string): Add "catch handler"
6005 handling.
6006 (create_ada_exception_catchpoint): Update create_excep_cond_exprs
6007 call.
6008 (catch_ada_handlers_command): New function.
6009 (initialize_ada_catchpoint_ops): Initialize "catch handlers"
6010 operations structure.
6011 (_initialize_ada_language): Add "catch handlers" command entry.
6012 * NEWS: Document "catch handlers" feature.
6013
6014 2018-01-02 Joel Brobecker <brobecker@adacore.com>
6015
6016 * ada-lang.c (ada_value_slice_from_ptr): Take array stride into
6017 account when creating the array type of the slice.
6018 (ada_value_slice): Likewise.
6019
6020 2018-01-02 Joel Brobecker <brobecker@adacore.com>
6021
6022 * gdbtypes.h (enum dynamic_prop_node_kind) <DYN_PROP_BYTE_STRIDE>:
6023 New enum value.
6024 (create_array_type_with_stride): Add byte_stride_prop parameter.
6025 * gdbtypes.c (create_array_type_with_stride) <byte_stride_prop>:
6026 New parameter. Update all callers in this file.
6027 (array_type_has_dynamic_stride): New function.
6028 (is_dynamic_type_internal, resolve_dynamic_array): Add handling
6029 of arrays with dynamic byte strides.
6030 * dwarf2read.c (read_array_type): Add support for dynamic
6031 DW_AT_byte_stride attributes.
6032
6033 2018-01-02 Joel Brobecker <brobecker@adacore.com>
6034
6035 * dwarf2read.c (read_unspecified_type): Treat
6036 DW_TAG_enumeration_type DIEs from Ada units as stubs.
6037
6038 2018-01-01 Joel Brobecker <brobecker@adacore.com>
6039
6040 Update copyright year range in all GDB files.
6041
6042 2018-01-01 Joel Brobecker <brobecker@adacore.com>
6043
6044 * copyright.py (BY_HAND): Remove gdb/testsuite/gdb.base/step-line.inp
6045 and gdb/testsuite/gdb.base/step-line.c.
6046
6047 2018-01-01 Joel Brobecker <brobecker@adacore.com>
6048
6049 * copyright.py (main): Dump the contents of
6050 MULTIPLE_COPYRIGHT_HEADERS (separately) from BY_HAND,
6051 even if BY_HAND is empty.
6052
6053 2018-01-01 Joel Brobecker <brobecker@adacore.com>
6054
6055 * top.c (print_gdb_version): Update Copyright year in version
6056 message.
6057
6058 2018-01-01 Joel Brobecker <brobecker@adacore.com>
6059
6060 * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2017.
6061
6062 For older changes see ChangeLog-2017.
6063 \f
6064 Local Variables:
6065 mode: change-log
6066 left-margin: 8
6067 fill-column: 74
6068 version-control: never
6069 coding: utf-8
6070 End: