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