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