1 2018-11-30 Andrew Burgess <andrew.burgess@embecosm.com>
3 * riscv-linux-nat.c: Add 'inferior.h' and 'target-descriptions.h'
5 (riscv_linux_nat_target::read_description): New method.
7 2018-11-30 Andrew Burgess <andrew.burgess@embecosm.com>
9 * arch/riscv.h (riscv_gdbarch_features::hash): New method.
10 * arch/riscv.c (struct riscv_gdbarch_features_hasher): New.
11 (riscv_tdesc_cache): New global.
12 (riscv_create_target_description): Look in the cache before
13 creating a new target description.
15 2018-11-30 Andrew Burgess <andrew.burgess@embecosm.com>
17 * arch/riscv.h (riscv_gdb_features::operator==): New.
18 (riscv_gdb_features::operator!=): New.
19 * riscv-tdep.c (riscv_gdbarch_init): Make use of the inequality
22 2018-11-30 Andrew Burgess <andrew.burgess@embecosm.com>
24 * arch/riscv.h (riscv_create_target_description): Make return type
26 * arch/riscv.c (riscv_create_target_description): Likewise.
27 * riscv-tdep.c (riscv_find_default_target_description): Likewise.
29 2018-11-30 Jan Kratochvil <jan.kratochvil@redhat.com>
30 Keith Seitz <keiths@redhat.com>
31 Tom Tromey <tom@tromey.com>
32 Sergio Durigan Junior <sergiodj@redhat.com>
34 https://bugzilla.redhat.com/show_bug.cgi?id=1613614
35 * dwarf2read.c (dwarf2_find_containing_comp_unit): Add
36 'mid_cu->length' to '*cu_off' when checking if 'sect_off' is
39 2018-11-30 Pedro Alves <palves@redhat.com>
41 * aix-thread.c (aix_thread_target) <aix_thread_target>: Delete.
42 <stratum>: New override.
43 * bfd-target.c (aix_thread_target) <aix_thread_target>: Delete.
44 <stratum>: New override.
45 * bsd-uthread.c (bsd_uthread_target) <bsd_uthread_target>: Delete.
46 <stratum>: New override.
47 * exec.c (exec_target) <exec_target>: Delete.
48 <stratum>: New override.
49 * gdbarch-selftests.c (register_to_value_test): Adjust to use the
50 stratum method instead of the to_stratum field.
51 * linux-thread-db.c (thread_db_target) <thread_db_target>: Delete.
52 <stratum>: New override.
53 (thread_db_target::thread_db_target): Delete.
54 * make-target-delegates (print_class): Don't print a ctor
55 declaration. Print a stratum method override declaration.
56 * process-stratum-target.h (process_stratum_target)
57 <process_stratum_target>: Delete.
58 <stratum>: New override.
59 * ravenscar-thread.c (ravenscar_thread_target)
60 <ravenscar_thread_target>: Delete.
61 <stratum>: New override.
62 * record-btrace.c (record_btrace_target)
63 <record_btrace_target>: Delete.
64 <stratum>: New override.
65 * record-full.c (record_full_base_target)
66 <record_full_base_target>: Delete.
67 <stratum>: New override.
68 * record.c (record_disconnect, record_detach)
69 (record_mourn_inferior, record_kill): Adjust to use the stratum
70 method instead of the to_stratum field.
71 * regcache.c (cooked_read_test, cooked_write_test): Likewise.
72 * sol-thread.c (sol_thread_target)
73 <sol_thread_target>: Delete.
74 <stratum>: New override.
75 * spu-multiarch.c (spu_multiarch_target)
76 <spu_multiarch_target>: Delete.
77 <stratum>: New override.
78 * target-delegates.c: Regenerate.
79 * target.c (target_stack::push, target_stack::unpush)
80 (pop_all_targets_above, pop_all_targets_at_and_above)
81 (info_target_command, target_require_runnable)
82 (target_stack::find_beneath): Adjust to use the stratum method
83 instead of the to_stratum field.
84 (dummy_target::dummy_target): Delete.
85 (dummy_target::stratum): New.
86 (debug_target::debug_target): Delete.
87 (debug_target::stratum): New.
88 (maintenance_print_target_stack): Adjust to use the stratum method
89 instead of the to_stratum field.
90 * target.h (struct target_ops) <stratum>: New method.
92 <is_pushed>: Adjust to use the stratum method
93 instead of the to_stratum field.
95 2018-11-30 Pedro Alves <palves@redhat.com>
97 * corelow.c (core_target) <has_all_memory, has_execution>: New
99 * inf-child.c (inf_child_target::has_all_memory)
100 (inf_child_target::has_memory, inf_child_target::has_stack)
101 (inf_child_target::has_registers)
102 (inf_child_target::has_execution): Delete.
103 * inf-child.h (inf_child_target) <has_all_memory, has_memory,
104 has_stack, has_registers, has_execution>: Delete.
105 * process-stratum-target.c
106 (process_stratum_target::has_all_memory)
107 (process_stratum_target::has_memory)
108 (process_stratum_target::has_stack)
109 (process_stratum_target::has_registers)
110 (process_stratum_target::has_execution): New.
111 * process-stratum-target.h (process_stratum_target)
112 <has_all_memory, has_memory, has_stack, has_registers,
113 has_execution>: New method overrides.
114 * ravenscar-thread.c (ravenscar_thread_target) <has_all_memory,
115 has_memory, has_stack, has_registers, has_execution>: Delete.
116 * remote-sim.c (gdbsim_target) <has_stack, has_registers,
117 has_execution>: Delete.
118 * remote.c (remote_target) <has_all_memory, has_memory, has_stack,
119 has_registers, has_execution>: Delete.
120 * target.c (default_child_has_all_memory)
121 (default_child_has_memory, default_child_has_stack)
122 (default_child_has_registers, default_child_has_execution):
124 * target.h (default_child_has_all_memory)
125 (default_child_has_memory, default_child_has_stack)
126 (default_child_has_registers, default_child_has_execution):
128 * tracefile.h (tracefile_target) <has_execution>: New override.
130 2018-11-30 Pedro Alves <palves@redhat.com>
132 * Makefile.in (COMMON_SFILES): Add process-stratum-target.c.
133 * bsd-kvm.c: Include "process-stratum-target.h".
134 (bsd_kvm_target): Now inherits from process_stratum_target.
135 (bsd_kvm_target::bsd_kvm_target): Default it.
136 * corelow.c: Include "process-stratum-target.h".
137 (core_target): Now inherits from process_stratum_target.
138 (core_target::core_target): Don't set to_stratum here.
139 * inf-child.c (inf_child_target::inf_child_target): Delete.
140 * inf-child.h: Include "process-stratum-target.h".
141 (inf_child_target): Inherit from process_stratum_target.
142 (inf_child_target) <inf_child_target>: Default it.
143 <can_async_p, supports_non_stop, supports_disable_randomization>:
145 * process-stratum-target.c: New file.
146 * process-stratum-target.h: New file.
147 * remote-sim.c: Include "process-stratum-target.h".
148 (gdbsim_target): Inherit from process_stratum_target.
149 <gdbsim_target>: Default it.
150 * remote.c: Include "process-stratum-target.h".
151 (remote_target): Inherit from process_stratum_target.
152 <remote_target>: Default it.
153 * target.c (default_thread_address_space)
154 (default_thread_architecture): Delete.
155 * target.h (target_ops) <thread_architecture>: Now returns NULL by
157 <thread_address_space>: Ditto.
158 * test-target.h: Include "process-stratum-target.h" instead of
160 (test_target_ops): Inherit from process_stratum_target.
161 <test_target_ops>: Default it.
162 * tracefile.c (tracefile_target::tracefile_target): Delete.
163 * tracefile.h: Include "process-stratum-target.h".
164 (tracefile_target): Inherit from process_stratum_target.
165 <tracefile_target>: Default it.
166 * target-delegates.c: Regenerate.
168 2018-11-30 Pedro Alves <palves@redhat.com>
170 * Makefile.in (COMMON_SFILES): Add test-target.c.
171 * gdbarch-selftests.c: Include "test-target.h".
172 * regcache.c: Include "test-target.h".
173 * target.c (test_target_info, test_target_ops::info): Move to ...
174 * test-target.c: ... this new file.
175 * target.h (test_target_ops): Move to ...
176 * test-target.h: ... this new file.
178 2018-11-29 Philippe Waroquiers <philippe.waroquiers@skynet.be>
180 * source.c (forward_search_command): Fix leak by using
181 xrealloc even for the first allocation in the loop, as buf
184 2018-11-29 Rajendra SY <rajendra.sy@gmail.com>
187 * gdb/fbsd-tdep.c (fbsd_gdb_signal_from_target)
188 (fbsd_gdb_signal_to_target): New.
189 (fbsd_init_abi): Install gdbarch "signal_from_target" and
190 "signal_to_target" methods.
192 2018-11-29 Tom Tromey <tom@tromey.com>
194 * valarith.c (value_x_unop): Don't set argvec[3].
196 2018-11-26 Simon Marchi <simon.marchi@ericsson.com>
199 * sparc-linux-nat.c (sparc_linux_nat_target): Remove extraneous
202 2018-11-26 Pedro Alves <palves@redhat.com>
204 * procfs.c (procfs_notice_thread): Replace uses of
205 in_thread_list/is_exited with find_thread_ptid/THREAD_EXITED.
206 * sol-thread.c (sol_thread_target::wait)
207 (sol_update_thread_list_callback): Likewise.
209 2018-11-25 Tom Tromey <tom@tromey.com>
211 * ui-out.c (ui_out::field_fmt): Remove comment.
212 * tui/tui-out.c (tui_ui_out::do_field_fmt): Remove comment.
213 * mi/mi-out.c (mi_ui_out::do_field_fmt): Remove comment.
215 2018-11-24 Philippe Waroquiers <philippe.waroquiers@skynet.be>
217 * source.c (open_source_file): Leak fixed in '8e6a5953e1d Fix 4K
218 leak in open_source_file' has been partially undone by '2179fbc36d23
219 Return scoped_fd from open_source_file'. Re-add the transfer of
220 current s->fullname to the unique_xmalloc_ptr fullname given
221 to find_and_open_source.
223 2018-11-23 Pedro Alves <palves@redhat.com>
225 * gdbthread.h (enum thread_state): Move comments here.
226 (is_running, is_stopped, is_exited): Remove declarations.
228 2018-11-22 Pedro Alves <palves@redhat.com>
230 * Makefile.in (COMMON_SFILES): Add thread-iter.c.
231 * breakpoint.c (breakpoints_should_be_inserted_now): Replace
232 ALL_NON_EXITED_THREADS with all_non_exited_threads.
233 (print_one_breakpoint_location): Replace ALL_INFERIORS with
235 * bsd-kvm.c: Include inferior.h.
236 * btrace.c (btrace_free_objfile): Replace ALL_NON_EXITED_THREADS
237 with all_non_exited_threads.
238 * common/filtered-iterator.h: New.
239 * common/safe-iterator.h: New.
240 * corelow.c (core_target_open): Don't call init_thread_list here.
241 * darwin-nat.c (thread_info_from_private_thread_info): Replace
242 ALL_THREADS with all_threads.
243 * fbsd-nat.c (fbsd_nat_target::resume): Replace
244 ALL_NON_EXITED_THREADS with inf->non_exited_threads.
245 * fbsd-tdep.c (fbsd_make_corefile_notes): Replace
246 ALL_NON_EXITED_THREADS with inf->non_exited_threads.
247 * fork-child.c (postfork_hook): Don't call init_thread_list here.
248 * gdbarch-selftests.c (register_to_value_test): Adjust.
249 * gdbthread.h: Don't include "inferior.h" here.
250 (struct inferior): Forward declare.
251 (enum step_over_calls_kind): Moved here from inferior.h.
252 (thread_info::deletable): Definition moved to thread.c.
253 (find_thread_ptid (inferior *, ptid_t)): Declare.
254 (ALL_THREADS, ALL_THREADS_BY_INFERIOR, ALL_THREADS_SAFE): Delete.
255 Include "thread-iter.h".
256 (all_threads, all_non_exited_threads, all_threads_safe): New.
257 (any_thread_p): Declare.
258 (thread_list): Delete.
259 * infcmd.c (signal_command): Replace ALL_NON_EXITED_THREADS with
260 all_non_exited_threads.
261 (proceed_after_attach_callback): Delete.
262 (proceed_after_attach): Take an inferior pointer instead of an
263 integer PID. Adjust to use range-for.
264 (attach_post_wait): Pass down inferior pointer instead of pid.
265 Use range-for instead of ALL_NON_EXITED_THREADS.
266 (detach_command): Remove init_thread_list call.
267 * inferior-iter.h: New.
268 * inferior.c (struct delete_thread_of_inferior_arg): Delete.
269 (delete_thread_of_inferior): Delete.
270 (delete_inferior, exit_inferior_1): Use range-for with
271 inf->threads_safe() instead of iterate_over_threads.
272 (inferior_appeared): Call init_thread_list here.
273 (discard_all_inferiors): Use all_non_exited_inferiors.
274 (find_inferior_id, find_inferior_pid): Use all_inferiors.
275 (iterate_over_inferiors): Use all_inferiors_safe.
276 (have_inferiors, number_of_live_inferiors): Use
277 all_non_exited_inferiors.
278 (number_of_inferiors): Use all_inferiors and std::distance.
279 (print_inferior): Use all_inferiors.
280 * inferior.h: Include gdbthread.h.
281 (enum step_over_calls_kind): Moved to gdbthread.h.
282 (struct inferior) <thread_list>: New field.
283 <threads, non_exited_threads, threads_safe>: New methods.
284 (ALL_INFERIORS): Delete.
285 Include "inferior-iter.h".
286 (ALL_NON_EXITED_INFERIORS): Delete.
287 (all_inferiors_safe, all_inferiors, all_non_exited_inferiors): New
289 * inflow.c (child_interrupt, child_pass_ctrlc): Replace
290 ALL_NON_EXITED_THREADS with all_non_exited_threads.
291 * infrun.c (follow_exec): Use all_threads_safe.
292 (clear_proceed_status, proceed): Use all_non_exited_threads.
293 (init_wait_for_inferior): Don't clear inline frame state here.
294 (infrun_thread_stop_requested, for_each_just_stopped_thread): Use
295 all_threads instead of ALL_NON_EXITED_THREADS.
296 (random_pending_event_thread): Use all_non_exited_threads instead
297 of ALL_NON_EXITED_THREADS. Use a lambda for repeated code.
298 (clean_up_just_stopped_threads_fsms): Use all_non_exited_threads
299 instead of ALL_NON_EXITED_THREADS.
300 (handle_no_resumed): Use all_non_exited_threads instead of
301 ALL_NON_EXITED_THREADS. Use all_inferiors instead of
303 (restart_threads, switch_back_to_stepped_thread): Use
304 all_non_exited_threads instead of ALL_NON_EXITED_THREADS.
305 * linux-nat.c (check_zombie_leaders): Replace ALL_INFERIORS with
307 (kill_unfollowed_fork_children): Use inf->non_exited_threads
308 instead of ALL_NON_EXITED_THREADS.
309 * linux-tdep.c (linux_make_corefile_notes): Use
310 inf->non_exited_threads instead of ALL_NON_EXITED_THREADS.
311 * linux-thread-db.c (thread_db_target::update_thread_list):
312 Replace ALL_INFERIORS with all_inferiors.
313 (thread_db_target::thread_handle_to_thread_info): Use
314 inf->non_exited_threads instead of ALL_NON_EXITED_THREADS.
315 * mi/mi-interp.c (multiple_inferiors_p): New.
316 (mi_on_resume_1): Simplify using all_non_exited_threads and
317 multiple_inferiors_p.
318 * mi/mi-main.c (mi_cmd_thread_list_ids): Use all_non_exited_threads
319 instead of ALL_NON_EXITED_THREADS.
320 * nto-procfs.c (nto_procfs_target::open): Don't call
321 init_thread_list here.
322 * record-btrace.c (record_btrace_target_open)
323 (record_btrace_target::stop_recording)
324 (record_btrace_target::close)
325 (record_btrace_target::record_is_replaying)
326 (record_btrace_target::resume, record_btrace_target::wait)
327 (record_btrace_target::record_stop_replaying): Use
328 all_non_exited_threads instead of ALL_NON_EXITED_THREADS.
329 * record-full.c (record_full_wait_1): Use all_non_exited_threads
330 instead of ALL_NON_EXITED_THREADS.
331 * regcache.c (cooked_read_test): Remove reference to global
333 * remote-sim.c (gdbsim_target::create_inferior): Don't call
334 init_thread_list here.
335 * remote.c (remote_target::update_thread_list): Use
336 all_threads_safe instead of ALL_NON_EXITED_THREADS.
337 (remote_target::process_initial_stop_replies): Replace
338 ALL_INFERIORS with all_non_exited_inferiors and use
339 all_non_exited_threads instead of ALL_NON_EXITED_THREADS.
340 (remote_target::open_1): Don't call init_thread_list here.
341 (remote_target::append_pending_thread_resumptions)
342 (remote_target::remote_resume_with_hc): Use all_non_exited_threads
343 instead of ALL_NON_EXITED_THREADS.
344 (remote_target::commit_resume)
345 (remote_target::remove_new_fork_children): Replace ALL_INFERIORS
346 with all_non_exited_inferiors and use all_non_exited_threads
347 instead of ALL_NON_EXITED_THREADS.
348 (remote_target::kill_new_fork_children): Use
349 all_non_exited_threads instead of ALL_NON_EXITED_THREADS. Remove
350 init_thread_list and init_wait_for_inferior calls.
351 (remote_target::remote_btrace_maybe_reopen)
352 (remote_target::thread_handle_to_thread_info): Use
353 all_non_exited_threads instead of ALL_NON_EXITED_THREADS.
354 * target.c (target_terminal::restore_inferior)
355 (target_terminal_is_ours_kind): Replace ALL_INFERIORS with
356 all_non_exited_inferiors.
357 * thread-iter.c: New file.
358 * thread-iter.h: New file.
359 * thread.c: Include "inline-frame.h".
360 (thread_list): Delete.
361 (clear_thread_inferior_resources): Call clear_inline_frame_state.
362 (init_thread_list): Use all_threads_safe instead of
363 ALL_THREADS_SAFE. Adjust to per-inferior thread lists.
364 (new_thread): Adjust to per-inferior thread lists.
365 (add_thread_silent): Pass inferior to find_thread_ptid.
366 (thread_info::deletable): New, moved from the header.
367 (delete_thread_1): Adjust to per-inferior thread lists.
368 (find_thread_global_id): Use inf->threads().
369 (find_thread_ptid): Use find_inferior_ptid and pass inferior to
371 (find_thread_ptid(inferior*, ptid_t)): New overload.
372 (iterate_over_threads): Use all_threads_safe.
374 (thread_count): Use all_threads and std::distance.
375 (live_threads_count): Use all_non_exited_threads and
377 (valid_global_thread_id): Use all_threads.
378 (in_thread_list): Use find_thread_ptid.
379 (first_thread_of_inferior): Adjust to per-inferior thread lists.
380 (any_thread_of_inferior, any_live_thread_of_inferior): Use
381 inf->non_exited_threads().
382 (prune_threads, delete_exited_threads): Use all_threads_safe.
383 (thread_change_ptid): Pass inferior pointer to find_thread_ptid.
384 (set_resumed, set_running): Use all_non_exited_threads.
385 (is_thread_state, is_stopped, is_exited, is_running)
386 (is_executing): Delete.
387 (set_executing, set_stop_requested, finish_thread_state): Use
388 all_non_exited_threads.
389 (print_thread_info_1): Use all_inferiors and all_threads.
390 (thread_apply_all_command): Use all_non_exited_threads.
391 (thread_find_command): Use all_threads.
392 (update_threads_executing): Use all_non_exited_threads.
393 * tid-parse.c (parse_thread_id): Use inf->threads.
394 * x86-bsd-nat.c (x86bsd_dr_set): Use inf->non_exited_threads ().
396 2018-11-22 Pedro Alves <palves@redhat.com>
398 * infrun.c (follow_exec) <set follow-exec new>: Add thread and
399 switch to it before calling into try_open_exec_file.
401 2018-11-22 Pedro Alves <palves@redhat.com>
403 * cli/cli-interp.c (cli_on_user_selected_context_changed): Use
404 inferior_thread instead of find_thread_ptid, and only when
405 inferior_ptid is not null_ptid.
406 * inferior.c (add_inferior): Don't include target_pid_to_str
407 output when the inferior is not started.
408 * python/py-inferior.c (python_on_normal_stop): Don't use
410 (tui_on_user_selected_context_changed): Use inferior_thread
411 instead of find_thread_ptid, and only when inferior_ptid is not
414 2018-11-21 Benno Fünfstück <benno.fuenfstueck@gmail.com>
417 * gdb/python/python.c (execute_gdb_command): Call
418 prevent_dont_repeat earlier to avoid affecting dont_repeat.
420 2018-11-21 Andrew Burgess <andrew.burgess@embecosm.com>
422 * Makefile.in (ALL_TARGET_OBS): Add arch/riscv.o.
423 (HFILES_NO_SRCDIR): Add arch/riscv.h.
424 * arch/riscv.c: New file.
425 * arch/riscv.h: New file.
426 * configure.tgt: Add cpu_obs list of riscv, move riscv-tdep.o into
427 this list, and add arch/riscv.o.
428 * features/Makefile: Add riscv features.
429 * features/riscv/32bit-cpu.c: New file.
430 * features/riscv/32bit-cpu.xml: New file.
431 * features/riscv/32bit-csr.c: New file.
432 * features/riscv/32bit-csr.xml: New file.
433 * features/riscv/32bit-fpu.c: New file.
434 * features/riscv/32bit-fpu.xml: New file.
435 * features/riscv/64bit-cpu.c: New file.
436 * features/riscv/64bit-cpu.xml: New file.
437 * features/riscv/64bit-csr.c: New file.
438 * features/riscv/64bit-csr.xml: New file.
439 * features/riscv/64bit-fpu.c: New file.
440 * features/riscv/64bit-fpu.xml: New file.
441 * features/riscv/rebuild-csr-xml.sh: New file.
442 * riscv-tdep.c: Add 'arch/riscv.h' include.
443 (riscv_gdb_reg_names): Delete.
444 (csr_reggroup): New global.
445 (struct riscv_register_alias): Delete.
446 (struct riscv_register_feature): New structure.
447 (riscv_register_aliases): Delete.
448 (riscv_xreg_feature): New global.
449 (riscv_freg_feature): New global.
450 (riscv_virtual_feature): New global.
451 (riscv_csr_feature): New global.
452 (riscv_create_csr_aliases): New function.
453 (riscv_read_misa_reg): Delete.
454 (riscv_has_feature): Delete.
455 (riscv_isa_xlen): Simplify, just return cached xlen.
456 (riscv_isa_flen): Simplify, just return cached flen.
457 (riscv_has_fp_abi): Update for changes in struct gdbarch_tdep.
458 (riscv_register_name): Update to make use of tdesc_register_name.
459 Look up xreg and freg names in the new globals riscv_xreg_feature
460 and riscv_freg_feature. Don't supply csr aliases here.
461 (riscv_fpreg_q_type): Delete.
462 (riscv_register_type): Use tdesc_register_type in almost all
463 cases, override the returned type in a few specific cases only.
464 (riscv_print_one_register_info): Handle errors reading registers.
465 (riscv_register_reggroup_p): Use tdesc_register_in_reggroup_p for
466 registers that are otherwise unknown to GDB. Also check the
468 (riscv_print_registers_info): Remove assert about upper register
469 number, and use gdbarch_register_reggroup_p instead of
471 (riscv_find_default_target_description): New function.
472 (riscv_check_tdesc_feature): New function.
473 (riscv_add_reggroups): New function.
474 (riscv_setup_register_aliases): New function.
475 (riscv_init_reggroups): New function.
476 (_initialize_riscv_tdep): Add calls to setup CSR aliases, and
477 setup register groups. Register new riscv debug variable.
478 * riscv-tdep.h: Add 'arch/riscv.h' include.
479 (struct gdbarch_tdep): Remove abi union, and add
480 riscv_gdbarch_features field. Remove cached quad floating point
481 type, and provide initialisation for double type field.
482 * target-descriptions.c (maint_print_c_tdesc_cmd): Add riscv to
483 the list of targets using the feature based target descriptions.
484 * NEWS: Mention target description support.
486 2018-11-21 Pedro Alves <palves@redhat.com>
488 * valops.c (find_method_list, value_find_oload_method_list)
489 (find_overload_match, find_oload_champ): Rename parameters and
492 2018-11-21 Pedro Alves <palves@redhat.com>
494 * valops.c (find_method_list): Replace pointer and length
495 parameters with an gdb::array_view. Adjust.
496 (value_find_oload_method_list): Likewise.
497 (find_overload_match): Use gdb::array_view for methods list.
498 Adjust to find_oload_champ interface change.
499 (find_oload_champ): 'xm_worker_vec' parameter now a pointer/array.
500 'num_fns' parameter now a size_t. Eliminate 'fn_count' local.
502 2018-11-21 Pedro Alves <palves@redhat.com>
504 * gdbtypes.c (compare_badness): Change type of parameters to const
505 reference. Adjust to badness_vector being a std::vector now.
506 (rank_function): Adjust to badness_vector being a std::vector now.
507 * gdbtypes.h (badness_vector): Now a typedef to std::vector.
508 (LENGTH_MATCH): Delete.
509 (compare_badness): Change type of parameters to const reference.
510 (rank_function): Return a badness_vector by value now.
511 (find_overload_match): Adjust to badness_vector being a
512 std::vector now. Remove cleanups.
513 (find_oload_champ_namespace): 'oload_champ_bv' parameter now a
514 badness_vector pointer.
515 (find_oload_champ_namespace_loop): 'oload_champ_bv' parameter now
516 a badness_vector pointer. Adjust to badness_vector being a
517 std::vector now. Remove cleanups.
518 (find_oload_champ): 'oload_champ_bv' parameter now
519 a badness_vector pointer. Adjust to badness_vector being a
520 std::vector now. Remove cleanups.
522 2018-11-21 Pedro Alves <palves@redhat.com>
524 * cp-support.c (sym_return_val_size, sym_return_val_index)
525 (sym_return_val): Delete.
526 (overload_list_add_symbol): Add std::vector parameter. Adjust to
528 (make_symbol_overload_list): Adjust to return a std::vector
529 instead of maintaining a global open coded vector.
530 (make_symbol_overload_list_block): Add std::vector parameter.
531 (make_symbol_overload_list_block): Rename to ...
532 (add_symbol_overload_list_block): ... this and add std::vector
534 (make_symbol_overload_list_namespace): Rename to ...
535 (add_symbol_overload_list_namespace): ... this and add std::vector
537 (make_symbol_overload_list_adl_namespace): Rename to ...
538 (add_symbol_overload_list_adl_namespace): ... this and add
539 std::vector parameter.
540 (make_symbol_overload_list_adl): Delete.
541 (add_symbol_overload_list_adl): New.
542 (make_symbol_overload_list_using): Rename to ...
543 (add_symbol_overload_list_using): ... this and add std::vector
545 (make_symbol_overload_list_qualified): Rename to ...
546 (add_symbol_overload_list_qualified): ... this and add std::vector
548 * cp-support.h: Include "common/array-view.h" and <vector>.
549 (make_symbol_overload_list): Change return type to std::vector.
550 (make_symbol_overload_list_adl): Delete declaration.
551 (add_symbol_overload_list_adl): New declaration.
552 * valops.c (find_overload_match): Local 'oload_syms' now a
554 (find_oload_champ_namespace): 'oload_syms' parameter now a
556 (find_oload_champ_namespace_loop): 'oload_syms' parameter now a
557 std::vector pointer. Adjust to new make_symbol_overload_list
560 2018-11-21 Pedro Alves <palves@redhat.com>
562 * common/array-view.h (array_view::splice(size_type, size_t)): New.
563 (array_view::splice(size_type)): New.
564 * eval.c (eval_call, evaluate_funcall): Adjust to use array_view.
565 * extension.c (xmethod_worker::get_arg_types): Adjust to return an
567 (xmethod_worker::get_result_type): Adjust to use gdb::array_view.
568 * extension.h: Include "common/array-view.h".
569 (xmethod_worker::invoke): Adjust to use gdb::array_view.
570 (xmethod_worker::get_arg_types): Adjust to return an std::vector.
571 (xmethod_worker::get_result_type): Adjust to use gdb::array_view.
572 (xmethod_worker::do_get_arg_types): Adjust to use std::vector.
573 (xmethod_worker::do_get_result_type): Adjust to use
575 * gdbtypes.c (rank_function): Adjust to use gdb::array_view.
576 * gdbtypes.h: Include "common/array-view.h".
577 (rank_function): Adjust to use gdb::array_view.
578 * python/py-xmethods.c (python_xmethod_worker::invoke)
579 (python_xmethod_worker::do_get_arg_types)
580 (python_xmethod_worker::do_get_result_type)
581 (python_xmethod_worker::invoke): Adjust to new interfaces.
582 * valarith.c (value_user_defined_cpp_op, value_user_defined_op)
583 (value_x_binop, value_x_unop): Adjust to use gdb::array_view.
584 * valops.c (find_overload_match, find_oload_champ_namespace)
585 (find_oload_champ_namespace_loop, find_oload_champ): Adjust to use
586 gdb:array_view and the new xmethod_worker interfaces.
587 * value.c (result_type_of_xmethod, call_xmethod): Adjust to use
589 * value.h (find_overload_match, result_type_of_xmethod)
590 (call_xmethod): Adjust to use gdb::array_view.
591 * unittests/array-view-selftests.c: Add slicing tests.
593 2018-11-21 Pedro Alves <palves@redhat.com>
595 * ada-lang.c (ada_evaluate_subexp): Adjust to pass an array_view.
596 * common/array-view.h (make_array_view): New.
597 * compile/compile-object-run.c (compile_object_run): Adjust to
599 * elfread.c (elf_gnu_ifunc_resolve_addr): Adjust.
600 * eval.c (eval_call): Adjust to pass an array_view.
601 (evaluate_subexp_standard): Adjust to pass an array_view.
602 * gcore.c (call_target_sbrk): Adjust to pass an array_view.
603 * guile/scm-value.c (gdbscm_value_call): Likewise.
604 * infcall.c (push_dummy_code): Replace pointer + size parameters
605 with an array_view parameter.
606 (call_function_by_hand, call_function_by_hand_dummy): Likewise and
608 * infcall.h: Include "common/array-view.h".
609 (call_function_by_hand, call_function_by_hand_dummy): Replace
610 pointer + size parameters with an array_view parameter.
611 * linux-fork.c (inferior_call_waitpid): Adjust to use array_view.
612 * linux-tdep.c (linux_infcall_mmap): Likewise.
613 * objc-lang.c (lookup_objc_class, lookup_child_selector)
614 (value_nsstring, print_object_command): Likewise.
615 * python/py-value.c (valpy_call): Likewise.
616 * rust-lang.c (rust_evaluate_funcall): Likewise.
617 * spu-tdep.c (flush_ea_cache): Likewise.
618 * valarith.c (value_x_binop, value_x_unop): Likewise.
619 * valops.c (value_allocate_space_in_inferior): Likewise.
620 * unittests/array-view-selftests.c (run_tests): Add
621 gdb::make_array_view test.
623 2018-11-20 Andrew Burgess <andrew.burgess@embecosm.com>
625 * cli-out.c (cli_ui_out::do_field_int): Use string_printf rather
626 than a fixed size buffer.
628 2018-11-20 Andrew Burgess <andrew.burgess@embecosm.com>
630 * breakpoint.c (print_one_breakpoint_location): Reduce whitespace,
631 and remove insertion of extra spaces in GDB's output.
632 * cli-out.c (cli_ui_out::do_field_fmt): Update header comment.
633 Layout field into a temporary buffer, and then output it as a
636 2018-11-20 Philippe Waroquiers <philippe.waroquiers@skynet.be>
638 * NEWS: Document the language choice done by
639 'info [types|functions|variables]|rbreak'.
641 2018-11-20 Philippe Waroquiers <philippe.waroquiers@skynet.be>
643 * symtab.c (treg_matches_sym_type_name): Use
644 scoped_switch_to_sym_language_if_auto instead of local logic.
645 (print_symbol_info): Use scoped_switch_to_sym_language_if_auto
646 to switch to SYM language when language mode is auto.
648 2018-11-20 Philippe Waroquiers <philippe.waroquiers@skynet.be>
650 * language.h (scoped_switch_to_sym_language_if_auto): New class.
652 2018-11-20 Philippe Waroquiers <philippe.waroquiers@skynet.be>
654 * symtab.c (search_symbols): Properly check absence of type regexp
655 before entering the loop scanning the minimal symbols.
657 2018-11-20 John Darrington <john@darrington.wattle.id.au>
659 * s12z-tdep.c (s12z_extract_return_value): New function.
660 (inv_reg_perm) New array.
661 (s12z_return_value): Populate readbuf if non-null.
663 2018-11-20 Eli Zaretskii <eliz@gnu.org>
665 * common/filestuff.c (gdb_fopen_cloexec): Disable use of "e" mode
666 with 'fopen' also if O_CLOEXEC is equal to O_NOINHERIT, to cater
667 to MinGW fixed by Gnulib.
668 (O_NOINHERIT): Define if not defined.
670 2018-11-19 John Darrington <john@darrington.wattle.id.au>
672 * s12z-tdep.c (s12z_frame_cache): Add an assertion.
674 2018-11-19 Simon Marchi <simon.marchi@polymtl.ca>
676 * infrun.c (displaced_step_inferior_state) <next>: Remove.
678 2018-11-19 Tom Tromey <tom@tromey.com>
680 * source.c (get_filename_and_charpos): Return void.
682 2018-11-19 Simon Marchi <simon.marchi@polymtl.ca>
684 * skip.c (_initialize_step_skip): Fix "info skip" help.
686 2018-11-16 Tom Tromey <tom@tromey.com>
689 * rust-lang.c (rust_internal_print_type): Handle TYPE_CODE_PTR.
691 2018-11-19 Simon Marchi <simon.marchi@ericsson.com>
693 * infrun.c (displaced_step_inferior_states): Change type to
695 (get_displaced_stepping_state): Adjust.
696 (displaced_step_in_progress_any_inferior): Adjust.
697 (add_displaced_stepping_state): Adjust.
698 (remove_displaced_stepping_state): Adjust.
700 2018-11-18 Tom Tromey <tom@tromey.com>
703 * target-delegates.c: Rebuild.
704 * ia64-linux-nat.c (class ia64_linux_nat_target)
705 <have_steppable_watchpoint>: Use override. Return true, not 1.
706 (ia64_linux_nat_target::can_use_hw_breakpoint): Rename. Remove
708 (ia64_linux_nat_target::low_new_thread): Rename.
709 (class ia64_linux_nat_target) <read_description>: Don't declare.
710 * target.h (struct target_ops) <have_steppable_watchpoint>: Return
713 2018-11-16 Alan Hayward <alan.hayward@arm.com>
716 * aarch64-tdep.c (aarch64_push_dummy_call): Remove
717 lang_struct_return code.
719 2018-11-16 Alan Hayward <alan.hayward@arm.com>
721 * aarch64-tdep.c (aarch64_push_dummy_call): Replace arg with
723 * alpha-tdep.c (alpha_push_dummy_call): Likewise.
724 * amd64-tdep.c (amd64_push_arguments): Likewise.
725 (amd64_push_dummy_call): Likewise.
726 * amd64-windows-tdep.c (amd64_windows_push_arguments): Likewise.
727 * arc-tdep.c (arc_push_dummy_call): Likewise.
728 * arm-tdep.c (arm_push_dummy_call): Likewise.
729 * avr-tdep.c (avr_push_dummy_call): Likewise.
730 * bfin-tdep.c (bfin_push_dummy_call): Likewise.
731 * cris-tdep.c (cris_push_dummy_call): Likewise.
732 * csky-tdep.c (csky_push_dummy_call): Likewise.
733 * frv-tdep.c (frv_push_dummy_call): Likewise.
734 * gdbarch.c: Regenerate.
735 * gdbarch.h: Regenerate.
736 * gdbarch.sh (gdbarch_push_dummy_call): Replace arg with
738 * h8300-tdep.c (h8300_push_dummy_call): Likewise.
739 * hppa-tdep.c (hppa32_push_dummy_call): Likewise.
740 (hppa64_push_dummy_call): Likewise.
741 * i386-darwin-tdep.c (i386_darwin_push_dummy_call): Likewise.
742 * i386-tdep.c (i386_push_dummy_call): Likewise.
743 * ia64-tdep.c (ia64_push_dummy_call): Likewise.
744 * infcall.c (call_function_by_hand_dummy): Likewise.
745 * iq2000-tdep.c (iq2000_push_dummy_call): Likewise.
746 * lm32-tdep.c (lm32_push_dummy_call): Likewise.
747 * m32c-tdep.c (m32c_push_dummy_call): Likewise.
748 * m32r-tdep.c (m32r_push_dummy_call): Likewise.
749 * m68hc11-tdep.c (m68hc11_push_dummy_call): Likewise.
750 * m68k-tdep.c (m68k_push_dummy_call): Likewise.
751 * mep-tdep.c (mep_push_dummy_call): Likewise.
752 * mips-tdep.c (mips_eabi_push_dummy_call): Likewise.
753 (mips_n32n64_push_dummy_call): Likewise.
754 (mips_o32_push_dummy_call): Likewise.
755 (mips_o64_push_dummy_call): Likewise.
756 * mn10300-tdep.c (mn10300_push_dummy_call): Likewise.
757 * msp430-tdep.c (msp430_push_dummy_call): Likewise.
758 * nds32-tdep.c (nds32_push_dummy_call): Likewise.
759 * nios2-tdep.c (nios2_push_dummy_call): Likewise.
760 * or1k-tdep.c (or1k_push_dummy_call): Likewise.
761 * ppc-sysv-tdep.c (ppc_sysv_abi_push_dummy_call): Likewise.
762 (ppc64_sysv_abi_push_dummy_call): Likewise.
763 * ppc-tdep.h (ppc_sysv_abi_push_dummy_call): Likewise.
764 (ppc64_sysv_abi_push_dummy_call): Likewise.
765 * riscv-tdep.c (riscv_push_dummy_call): Likewise.
766 * rl78-tdep.c (rl78_push_dummy_call): Likewise.
767 * rs6000-aix-tdep.c (rs6000_push_dummy_call): Likewise.
768 * rs6000-lynx178-tdep.c (rs6000_lynx178_push_dummy_call): Likewise.
769 * rx-tdep.c (rx_push_dummy_call): Likewise.
770 * s390-tdep.c (s390_push_dummy_call): Likewise.
771 * score-tdep.c (score_push_dummy_call): Likewise.
772 * sh-tdep.c (sh_push_dummy_call_fpu): Likewise.
773 (sh_push_dummy_call_nofpu): Likewise.
774 * sparc-tdep.c (sparc32_store_arguments): Likewise.
775 (sparc32_push_dummy_call): Likewise.
776 * sparc64-tdep.c (sparc64_store_arguments): Likewise.
777 (sparc64_push_dummy_call): Likewise.
778 * spu-tdep.c (spu_push_dummy_call): Likewise.
779 * tic6x-tdep.c (tic6x_push_dummy_call): Likewise.
780 * tilegx-tdep.c (tilegx_push_dummy_call): Likewise.
781 * v850-tdep.c (v850_push_dummy_call): Likewise.
782 * vax-tdep.c (vax_push_dummy_call): Likewise.
783 * xstormy16-tdep.c (xstormy16_push_dummy_call): Likewise.
784 * xtensa-tdep.c (xtensa_push_dummy_call): Likewise.
786 2018-11-16 Alan Hayward <alan.hayward@arm.com>
788 * gdbarch.sh (enum function_call_return_method): Add enum.
789 * gdbarch.h: Regenerate.
790 * infcall.c (call_function_by_hand_dummy): Replace vars with enum.
792 2018-11-15 Joel Brobecker <brobecker@adacore.com>
794 * unittests/copy_bitwise-selftests.c: New file.
795 * utils.c (selftests::bits_to_str, selftests::check_copy_bitwise)
796 (selftests::copy_bitwise_tests): Delete, moving this code to
797 unittests/copy_bitwise-selftests.c instead.
798 (_initialize_utils): Do not register copy_bitwise tests.
799 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
800 unittests/copy_bitwise-selftests.c.
802 2018-11-14 Joel Brobecker <brobecker@adacore.com>
804 * ada-lang.c (move_bits): Delete. Update all callers to use
805 copy_bitwise instead.
806 * dwarf2loc.c (copy_bitwise, bits_to_str::bits_to_str)
807 (selftests::check_copy_bitwise, selftests::copy_bitwise_tests):
808 Move from here to utils.c.
809 (_initialize_dwarf2loc): Remove call to register copy_bitwise
811 * utils.h (copy_bitwise): Add declaration.
812 * utils.c (copy_bitwise, bits_to_str::bits_to_str)
813 (selftests::check_copy_bitwise, selftests::copy_bitwise_tests):
814 Moved here from dwarf2loc.c.
815 (_initialize_utils): Register copy_bitwise selftests.
817 2018-11-14 Jim Wilson <jimw@sifive.com>
819 * riscv-tdep.c (struct riscv_arg_info): New field is_unnamed.
820 (riscv_call_arg_scalar_int): If unnamed arg with twice xlen alignment,
821 then increment next_regnum if odd.
822 (riscv_arg_location): New arg is_unnamed. Set ainfo->is_unnamed.
823 (riscv_push_dummy_call): New local ftype. Call check_typedef to set
824 function type. Pass new arg to riscv_arg_location based on function
826 (riscv_return_value): Pass new arg to riscv_arg_location.
828 * riscv-tdep.c (BIGGEST_ALIGNMENT): New.
829 (riscv_type_alignment) <TYPE_CODE_ARRAY>: If TYPE_VECTOR, return min
830 of TYPE_LENGTH and BIGGEST_ALIGNMENT.
832 * riscv-tdep.c (riscv_call_arg_scalar_int): Use std::min when
833 setting len. New local align, set to max of arg align and xlen,
834 and pass to first riscv_assign_stack_location call.
836 2018-11-12 Simon Marchi <simon.marchi@polymtl.ca>
838 * skip.c (complete_skip_number): New function.
839 (_initialize_step_skip): Add completers to some skip commands.
841 2018-11-09 Tom Tromey <tom@tromey.com>
843 * remote.c (remote_g_packet_guess_s): Remove typedef and DEF_VEC.
844 (struct remote_g_packet_data): Derive from allocate_on_obstack.
845 <guesses>: Now a std::vector.
846 (remote_g_packet_data_init, register_remote_g_packet_guess):
848 (remote_read_description_p): Update. Return bool.
849 (remote_target::read_description): Update.
850 (struct remote_g_packet_guess): Add constructor.
852 2018-11-09 Tom Tromey <tom@tromey.com>
854 * common/scoped_fd.h (class scoped_fd): Add move constructor and
855 move assignment operator.
856 * psymtab.c (psymtab_to_fullname): Update.
857 * source.h (open_source_file): Return scoped_fd.
858 (find_and_open_source): Likewise.
859 * source.c (open_source_file): Return scoped_fd.
860 (get_filename_and_charpos): Update.
861 (print_source_lines_base): Update. Use scoped_fd::to_file.
862 (forward_search_command): Likewise.
863 (reverse_search_command): Likewise.
864 (find_and_open_source): Return scoped_fd.
865 * tui/tui-source.c (tui_set_source_content): Update. Use
868 2018-11-09 John Baldwin <jhb@FreeBSD.org>
870 * minsyms.c (minimal_symbol_reader::install): Fix unsigned
873 2018-11-09 Hafiz Abid Qadeer <abidh@codesourcery.com>
875 * configure: Regenerate.
877 2018-11-09 Tom de Vries <tdevries@suse.de>
879 * symtab.c (symbol_set_names): Call symbol_find_demangled_name
880 unconditionally, to set the language of the symbol. Manage freeing
881 returned pointer using gdb::unique_xmalloc_ptr.
883 2018-11-08 Tom Tromey <tom@tromey.com>
885 * record.c (require_record_target): Upper-case "<TAB>".
887 2018-11-08 Tom Tromey <tom@tromey.com>
889 * python/lib/gdb/command/pretty_printers.py
890 (InfoPrettyPrinter.invoke): Don't indent "objfile" heading.
892 2018-11-08 Tom Tromey <tom@tromey.com>
896 * target.h (target_supports_terminal_ours): Return bool.
897 * target.c (target_supports_terminal_ours): Handle case where
898 current_top_target returns nullptr. Return bool.
900 2018-11-08 Joel Brobecker <brobecker@adacore.com>
902 * aarch64-tdep.c (aapcs_is_vfp_call_or_return_candidate_1):
903 return the correct count for potential HFAs.
905 2018-11-08 Jan Beulich <jbeulich@suse.com>
907 * i387-tdep.c (i387_supply_xsave): Split handling of
908 X86_XSTATE_ZMM_H and X86_XSTATE_ZMM.
909 (i387_collect_xsave): Likewise.
911 2018-11-08 Andrew Burgess <andrew.burgess@embecosm.com>
913 * riscv-tdep.c (riscv_insn::decode): Update header comment.
914 (riscv_frame_this_id): Catch errors thrown while building the
915 frame cache, leave the frame id as the default, which is the outer
918 2018-11-07 Joel Brobecker <brobecker@adacore.com>
920 * ada-lang.c (read_atcb): Only set task_info->called_task if
921 task_info->state == Entry_Caller_Sleep.
922 (print_ada_task_info): Do not check task_info->state before
923 checking task_info->called_task.
924 (info_task): Likewise.
926 2018-11-07 Joel Brobecker <brobecker@adacore.com>
928 * ada-tasks.c (read_atcb): Clear task_info before computing
929 the value of each of its fields.
931 2018-11-07 Andrew Burgess <andrew.burgess@embecosm.com>
933 * dwarf2read.c (dwarf2_init_integer_type): Check for name being
934 NULL before dereferencing it.
936 2018-11-06 Tom de Vries <tdevries@suse.de>
938 * linux-tdep.c (linux_vsyscall_range_raw): Use xmalloc to allocate
941 2018-11-06 Max Filippov <jcmvbkbc@gmail.com>
943 * configure.tgt (xtensa*-*-linux*): Change to xtensa*-*-*linux*
944 so that it applies to uclinux as well.
946 2018-11-06 Marius Muench <marius.muench@eurecom.fr>
948 * arm-tdep.c (arm_scan_prologue): Don't dereference FP reg
951 2018-11-06 John Baldwin <jhb@FreeBSD.org>
953 * riscv-fbsd-nat.c (getregs_supplies): Return true for
954 RISCV_CSR_SSTATUS_REGNUM.
956 2018-11-04 Philippe Waroquiers <philippe.waroquiers@skynet.be>
958 * source.c (open_source_file): Fix leak by transferring the
959 current s->fullname to the unique_xmalloc_ptr fullname given
960 to find_and_open_source.
962 2018-11-04 Tom Tromey <tom@tromey.com>
964 * varobj.c (install_default_visualizer): Update.
965 * python/python-internal.h (gdbpy_get_varobj_pretty_printer):
967 * python/py-prettyprint.c (search_pp_list): Return gdbpy_ref.
968 (find_pretty_printer_from_progspace)
969 (find_pretty_printer_from_gdb, find_pretty_printer)
970 (gdbpy_get_varobj_pretty_printer): Return gdbpy_ref.
971 (gdbpy_get_varobj_pretty_printer, gdbpy_default_visualizer):
974 2018-11-04 Tom Tromey <tom@tromey.com>
976 * python/python.c (gdbpy_parameter_value): Update.
977 * python/python-internal.h (python_string_to_unicode)
978 (python_string_to_target_python_string)
979 (host_string_to_python_string): Return gdbpy_ref.
980 * python/py-utils.c (python_string_to_unicode)
981 (unicode_to_encoded_python_string)
982 (unicode_to_target_python_string)
983 (python_string_to_target_string)
984 (python_string_to_target_python_string): Return gdbpy_ref.
985 (python_string_to_host_string): Update.
986 (host_string_to_python_string): Return gdbpy_ref.
987 * python/py-symtab.c (stpy_get_filename, stpy_get_producer)
988 (stpy_fullname): Update.
989 * python/py-progspace.c (pspy_get_filename, pspy_solib_name):
991 * python/py-prettyprint.c (print_string_repr): Update.
992 * python/py-objfile.c (objfpy_get_filename, objfpy_get_username)
993 (objfpy_get_build_id): Update.
994 * python/py-breakpoint.c (bppy_get_location)
995 (bppy_get_expression, bppy_get_condition, bppy_get_commands):
998 2018-11-04 Tom Tromey <tom@tromey.com>
1000 * python/python-internal.h (gdb_py_object_from_longest)
1001 (gdb_py_object_from_ulongest): Return gdbpy_ref.
1002 * python/py-value.c (valpy_int): Update.
1003 * python/py-utils.c (gdb_py_object_from_longest): Return
1005 (gdb_py_object_from_ulongest): Likewise.
1006 * python/py-type.c (typy_get_alignof): Update.
1007 * python/py-linetable.c (ltpy_get_all_source_lines)
1008 (ltpy_entry_get_line, ltpy_entry_get_pc): Update.
1009 * python/py-block.c (blpy_get_start, blpy_get_end): Update.
1011 2018-11-03 Philippe Waroquiers <philippe.waroquiers@skynet.be>
1013 * ada-lang.c (_initialize_ada_language): Fix typo.
1015 2018-11-03 Philippe Waroquiers <philippe.waroquiers@skynet.be>
1017 * language.c (type): Remove.
1018 (_initialize_language): Remove assignment to type.
1020 2018-11-02 Joel Brobecker <brobecker@adacore.com>
1022 * aarch64-ravenscar-thread.h, aarch64-ravenscar-thread.c: New files.
1023 * aarch64-tdep.c: #include "aarch64-ravenscar-thread.h".
1024 (aarch64_gdbarch_init): Add call to register_aarch64_ravenscar_ops.
1025 * Makefile.in (ALL_64_TARGET_OBS): Add aarch64-ravenscar-thread.o.
1026 (HFILES_NO_SRCDIR): Add aarch64-ravenscar-thread.h.
1027 (ALLDEPFILES): Add aarch64-ravenscar-thread.c.
1028 * configure.tgt (cpu_obs) [aarch64*-*-*]: Add ravenscar-thread.o
1029 and aarch64-ravenscar-thread.o.
1030 * NEWS: Add entry documenting Ravenscar tasking support
1033 2018-11-02 Matthew Malcomson <matthew.malcomson@arm.com>
1035 * symtab.c (info_functions_command): Initialize quiet flag.
1036 * stack.c (info_args_command): Likewise.
1038 2018-11-01 Jim Wilson <jimw@sifive.com>
1040 * riscv-tdep.c (riscv_breakpoint_kind_from_pc): New local unaligned_p.
1041 Set if pcptr if unaligned. Return 2 if unaligned_p true. Update
1044 2018-11-01 Joel Brobecker <brobecker@adacore.com>
1046 * ada-lang.c (ada_watch_location_expression): New function.
1047 (ada_language_defn): Set la_watch_location_expression to
1048 ada_watch_location_expression.
1050 2018-11-01 Joel Brobecker <brobecker@adacore.com>
1052 * print-utils.c (int_string): Remove unnecessary trailing spaces.
1054 2018-11-01 Joel Brobecker <brobecker@adacore.com>
1056 * rs6000-tdep.c (skip_prologue): Fix potential negative left
1059 2018-11-01 Jerome Guitton <guitton@adacore.com>
1060 Joel Brobecker <brobecker@adacore.com>
1062 * defs.h (enum gdb_osabi): Add GDB_OSABI_PIKEOS.
1063 * osabi.c (gdb_osabi_names): Add name for GDB_OSABI_PIKEOS.
1064 * arm-pikeos-tdep.c: New file.
1065 * configure.tgt: Add arm-pikeos-tdep.o to the case of ARM
1067 * Makefile.in (ALL_TARGET_OBS): Add arm-pikeos-tdep.o.
1069 2018-11-01 Simon Marchi <simon.marchi@ericsson.com>
1071 * common/pathstuff.c (get_standard_temp_dir): New.
1072 * common/pathstuff.h (get_standard_temp_dir): New.
1073 * config.in: Re-generate.
1074 * configure: Re-generate.
1075 * configure.ac: Don't check for mkdtemp.
1076 * gnulib/aclocal-m4-deps.mk: Re-generate.
1077 * gnulib/aclocal.m4: Re-generate.
1078 * gnulib/config.in: Re-generate.
1079 * gnulib/configure: Re-generate.
1080 * gnulib/import/Makefile.am: Re-generate.
1081 * gnulib/import/Makefile.in: Re-generate.
1082 * gnulib/import/m4/gnulib-cache.m4: Re-generate.
1083 * gnulib/import/m4/gnulib-comp.m4: Re-generate.
1084 * gnulib/import/m4/mkdtemp.m4: New file.
1085 * gnulib/import/mkdtemp.c: New file.
1086 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES):
1088 * unittests/mkdir-recursive-selftests.c (test): Use
1089 get_standard_temp_dir.
1090 (_initialize_mkdir_recursive_selftests): Remove HAVE_MKDTEMP
1092 * compile/compile.c (get_compile_file_tempdir): Likewise.
1094 2018-11-01 Sangamesh Mallayya <sangamesh.swamy@in.ibm.com>
1096 * rs6000-aix-tdep.c: Include "trad-frame.h" and "frame-unwind.h".
1097 (SIG_FRAME_LR_OFFSET64): New define.
1098 (SIG_FRAME_FP_OFFSET64): New define.
1099 (aix_sighandle_frame_cache): New Function.
1100 (aix_sighandle_frame_this_id): New Function.
1101 (aix_sighandle_frame_prev_register): New Function.
1102 (aix_sighandle_frame_sniffer): New Function.
1103 (aix_sighandle_frame_unwind): New global variable.
1104 (rs6000_aix_init_osabi): Install new frame unwinder.
1106 2018-10-31 Sergio Durigan Junior <sergiodj@redhat.com>
1109 * common/common-defs.h: Don't redefine _FORTIFY_SOURCE if it's
1112 2018-10-31 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
1114 * ppc-linux-nat.c: Include nat/linux-ptrace.h.
1116 2018-10-31 Andrew Burgess <andrew.burgess@embecosm.com>
1118 * dwarf2read.c (struct dwarf2_cu): Add producer_is_icc field.
1119 (producer_is_icc): New function.
1120 (check_producer): Set producer_is_icc field on dwarf2_cu.
1121 (dwarf2_init_integer_type): New function.
1122 (read_base_type): Call dwarf2_init_integer_type instead of
1123 init_integer_type in all cases.
1124 (dwarf2_cu::dwarf2_cu): Initialise producer_is_icc field.
1125 * valprint.c (maybe_negate_by_bytes): Add an assertion that the
1126 LEN is greater than 0.
1128 2018-10-30 Tom Tromey <tom@tromey.com>
1130 * main.c (captured_main_1): Check return value of bfd_init.
1132 2018-10-29 Sergio Durigan Junior <sergiodj@redhat.com>
1134 * common/offset-type.h (DEFINE_OFFSET_REL_OP): Delete.
1137 2018-10-29 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
1139 * procfs.c: Include common/pathstuff.h.
1141 2018-10-28 Andrew Burgess <andrew.burgess@embecosm.com>
1143 * riscv-linux-nat.c (riscv_linux_nat_target::fetch_registers):
1144 Add missing braces. No functional change.
1146 2018-10-27 Philippe Waroquiers <philippe.waroquiers@skynet.be>
1148 * macrocmd.c (info_macro_command): Use report_unrecognized_option_error
1149 to report a bad option and fix indentation.
1150 * demangle.c (demangle_command): Use report_unrecognized_option_error
1151 to report a bad option and correctly report the bad option.
1153 2018-10-27 Tom Tromey <tom@tromey.com>
1156 * darwin-nat.c (copied_shell): New global.
1157 (may_have_sip): Rename from should_disable_startup_with_shell.
1158 (copy_shell_to_cache, maybe_cache_shell): New functions.
1159 (darwin_nat_target::create_inferior): Update. Use
1162 2018-10-27 Tom Tromey <tom@tromey.com>
1164 * unittests/scoped_fd-selftests.c (test_to_file): New function.
1165 (run_tests): Call test_to_file.
1166 * dwarf-index-write.c (write_psymtabs_to_index): Do not reopen
1168 * common/scoped_fd.h (scoped_fd::to_file): New method.
1170 2018-10-27 Tom Tromey <tom@tromey.com>
1172 * unittests/scoped_mmap-selftests.c (test_normal): Use
1173 gdb_mkostemp_cloexec.
1174 * unittests/scoped_fd-selftests.c (test_destroy, test_release):
1175 Use gdb_mkostemp_cloexec.
1176 * gnulib/aclocal-m4-deps.mk, gnulib/aclocal.m4,
1177 gnulib/config.in, gnulib/configure,
1178 gnulib/import/Makefile.am, gnulib/import/Makefile.in,
1179 gnulib/import/m4/gnulib-cache.m4,
1180 gnulib/import/m4/gnulib-comp.m4: Update.
1181 * gnulib/import/m4/mkostemp.m4: New file.
1182 * gnulib/import/m4/mkstemp.m4: Remove.
1183 * gnulib/import/mkostemp.c: New file.
1184 * gnulib/import/mkstemp.m4: Remove.
1185 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Remove
1186 mkstemp, add mkostemp. Apply new patch.
1187 * gnulib/import/stdlib.in.h: Apply patch.
1188 * gnulib/patches/0002-mkostemp-mkostemps-Fix-compilation-error-in-C-mode-o.patch:
1190 * dwarf-index-write.c (write_psymtabs_to_index): Use
1191 gdb_mkostemp_cloexec.
1192 * common/filestuff.h (gdb_mkostemp_cloexec): New function.
1194 2018-10-27 Tom Tromey <tom@tromey.com>
1196 * unittests/mkdir-recursive-selftests.c: New file.
1197 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
1198 unittests/mkdir-recursive-selftests.c.
1199 * dwarf-index-cache.c (mkdir_recursive): Move to
1201 (index_cache::store): Check return value of mkdir_recursive.
1202 (create_dir_and_check, test_mkdir_recursive): Move to new file.
1203 (_initialize_index_cache): Don't register test.
1204 * common/filestuff.h (mkdir_recursive): Declare.
1205 * common/filestuff.c (mkdir_recursive): Move from
1206 dwarf-index-cache.c. Return bool.
1208 2018-10-27 Tom Tromey <tom@tromey.com>
1210 * dwarf-index-write.c (write_psymtabs_to_index): Move
1211 make_temp_filename to common/pathstuff.c.
1212 * common/pathstuff.h (make_temp_filename): Declare.
1213 * common/pathstuff.c (make_temp_filename): New function, moved
1214 from dwarf-index-write.c.
1216 2018-10-27 Tom Tromey <tom@tromey.com>
1218 * procfs.c (procfs_target::create_inferior): Use get_shell.
1219 * cli/cli-cmds.c (shell_escape): Use get_shell.
1220 * windows-nat.c (windows_nat_target::create_inferior): Use
1222 * common/pathstuff.c (get_shell): New function.
1223 * nat/fork-inferior.c (SHELL_FILE, get_startup_shell): Remove.
1224 (fork_inferior): Use get_shell.
1225 * common/pathstuff.h (get_shell): Declare.
1227 2018-10-27 Philippe Waroquiers <philippe.waroquiers@skynet.be>
1229 * NEWS: Mention changes to 'info [args|functions|locals|variables]'
1231 2018-10-27 Philippe Waroquiers <philippe.waroquiers@skynet.be>
1233 * stack.c (print_variable_and_value_data): Add preg and treg.
1234 (print_frame_local_vars): Add quiet, regexp and t_regexp arguments,
1236 (print_frame_arg_vars): Likewise.
1237 (prepare_reg): New function.
1238 (info_locals_command): Extract info print args and use them.
1239 (info_args_command): Likewise.
1240 (_initialize_stack): Modify on-line help.
1241 * symtab.c (treg_matches_sym_type_name): New function.
1242 (search_symbols): New arg t_regexp.
1243 (symtab_symbol_info): New args quiet, regexp, t_regexp.
1244 (info_variables_command): Extract info print args and use them.
1245 (info_functions_command): Likewise.
1246 (info_types_command): Update call to symtab_symbol_info.
1247 (_initialize_symtab): Modify on-line help.
1248 * symtab.h (treg_matches_sym_type_name): New function.
1249 (search_symbols): New t_regexp arg.
1251 2018-10-27 Philippe Waroquiers <philippe.waroquiers@skynet.be>
1253 * cli-utils.c (extract_arg_maybe_quoted): New function.
1254 (extract_info_print_args): New function.
1255 (info_print_args_help): New function.
1256 (report_unrecognized_option_error): New function.
1257 * cli-utils.h (extract_arg_maybe_quoted): New function.
1258 (extract_info_print_args): New function.
1259 (info_print_args_help): New function.
1260 (report_unrecognized_option_error): New function.
1262 2018-10-26 Tom Tromey <tom@tromey.com>
1264 * dwarf2read.c (recursively_compute_inclusions): Use std::vector.
1265 (compute_compunit_symtab_includes): Update.
1266 * symtab.h: (symtab_ptr): Remove typedef. Don't define a VEC.
1267 (compunit_symtab_ptr): Likewise.
1269 2018-10-26 John Baldwin <jhb@FreeBSD.org>
1271 * fbsd-tdep.c (fbsd_print_auxv_entry): Only use
1272 default_print_auxv_entry for specific tag values.
1274 2018-10-26 John Baldwin <jhb@FreeBSD.org>
1276 * fbsd-tdep.c (fbsd_print_auxv_entry): Handle AT_FREEBSD_HWCAP2.
1278 2018-10-26 Jim Wilson <jimw@sifive.com>
1280 * riscv-linux-tdep.c: Include tramp-frame.h and trad-frame.h.
1281 (riscv_linux_sigframe_init): Declare.
1282 (RISCV_INST_LI_A7_SIGRETURN, RISCV_INT_ECALL): New.
1283 (riscv_linux_sigframe): New.
1284 (SIGFRAME_SIGINFO_SIZE, UCONTEXT_MCONTEXT_OFFSET): New.
1285 (riscv_linux_sigframe_init): Define.
1286 (riscv_linux_init_abi): Call tramp_frame_prepend_unwinder.
1288 * riscv-tdep.c (riscv_isa_xlen): Refer to riscv-tdep.h comment.
1289 (riscv_isa_flen): Likewise. Drop static.
1290 * riscv-tdep.h (riscv_isa_xlen): Move riscv-tdep.c comment to here.
1291 (riscv_isa_flen): Likewise. Declare.
1293 2018-10-26 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
1294 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
1296 * arch/ppc-linux-tdesc.h (tdesc_powerpc_isa207_htm_vsx32l)
1297 (tdesc_powerpc_isa207_htm_vsx64l): Declare.
1298 * arch/ppc-linux-common.h (PPC_LINUX_SIZEOF_TM_SPRREGSET)
1299 (PPC32_LINUX_SIZEOF_CGPRREGSET, PPC64_LINUX_SIZEOF_CGPRREGSET)
1300 (PPC_LINUX_SIZEOF_CFPRREGSET, PPC_LINUX_SIZEOF_CVMXREGSET)
1301 (PPC_LINUX_SIZEOF_CVSXREGSET, PPC_LINUX_SIZEOF_CPPRREGSET)
1302 (PPC_LINUX_SIZEOF_CDSCRREGSET, PPC_LINUX_SIZEOF_CTARREGSET):
1304 (struct ppc_linux_features) <htm>: New field.
1305 (ppc_linux_no_features): Add initializer for htm field.
1306 * arch/ppc-linux-common.c (ppc_linux_match_description): Return
1308 * nat/ppc-linux.h (PPC_FEATURE2_HTM, NT_PPC_TM_CGPR)
1309 (NT_PPC_TM_CFPR, NT_PPC_TM_CVMX, NT_PPC_TM_CVSX)
1310 (NT_PPC_TM_SPR, NT_PPC_TM_CTAR, NT_PPC_TM_CPPR, NT_PPC_TM_CDSCR):
1311 Define if not already defined.
1312 * features/Makefile (WHICH): Add rs6000/powerpc-isa207-htm-vsx32l
1313 and rs6000/powerpc-isa207-htm-vsx64l.
1314 (XMLTOC): Add rs6000/powerpc-isa207-htm-vsx32l.xml and
1315 rs6000/powerpc-isa207-htm-vsx64l.xml.
1316 * features/rs6000/power-htm-spr.xml: New file.
1317 * features/rs6000/power-htm-core.xml: New file.
1318 * features/rs6000/power64-htm-core.xml: New file.
1319 * features/rs6000/power-htm-fpu.xml: New file.
1320 * features/rs6000/power-htm-altivec.xml: New file.
1321 * features/rs6000/power-htm-vsx.xml: New file.
1322 * features/rs6000/power-htm-ppr.xml: New file.
1323 * features/rs6000/power-htm-dscr.xml: New file.
1324 * features/rs6000/power-htm-tar.xml: New file.
1325 * features/rs6000/powerpc-isa207-htm-vsx32l.xml: New file.
1326 * features/rs6000/powerpc-isa207-htm-vsx64l.xml: New file.
1327 * features/rs6000/powerpc-isa207-htm-vsx32l.c: Generate.
1328 * features/rs6000/powerpc-isa207-htm-vsx64l.c: Generate.
1329 * regformats/rs6000/powerpc-isa207-htm-vsx32l.dat: Generate.
1330 * regformats/rs6000/powerpc-isa207-htm-vsx64l.dat: Generate.
1331 * ppc-linux-nat.c (fetch_register, fetch_ppc_registers): Call
1332 fetch_regset with HTM regsets.
1333 (store_register, store_ppc_registers): Call store_regset with HTM
1335 (ppc_linux_nat_target::read_description): Set htm field in the
1336 features struct if needed.
1337 * ppc-linux-tdep.c: Include
1338 features/rs6000/powerpc-isa207-htm-vsx32l.c and
1339 features/rs6000/powerpc-isa207-htm-vsx64l.c.
1340 (ppc32_regmap_tm_spr, ppc32_regmap_cgpr, ppc64_le_regmap_cgpr)
1341 (ppc64_be_regmap_cgpr, ppc32_regmap_cfpr, ppc32_le_regmap_cvmx)
1342 (ppc32_be_regmap_cvmx, ppc32_regmap_cvsx, ppc32_regmap_cppr)
1343 (ppc32_regmap_cdscr, ppc32_regmap_ctar): New globals.
1344 (ppc32_linux_tm_sprregset, ppc32_linux_cgprregset)
1345 (ppc64_be_linux_cgprregset, ppc64_le_linux_cgprregset)
1346 (ppc32_linux_cfprregset, ppc32_le_linux_cvmxregset)
1347 (ppc32_be_linux_cvmxregset, ppc32_linux_cvsxregset)
1348 (ppc32_linux_cpprregset, ppc32_linux_cdscrregset)
1349 (ppc32_linux_ctarregset): New globals.
1350 (ppc_linux_cgprregset, ppc_linux_cvmxregset): New functions.
1351 (ppc_linux_collect_core_cpgrregset): New function.
1352 (ppc_linux_iterate_over_regset_sections): Call back with the htm
1354 (ppc_linux_core_read_description): Check if the tm spr section is
1355 present and set htm in the features struct.
1356 (_initialize_ppc_linux_tdep): Call
1357 initialize_tdesc_powerpc_isa207_htm_vsx32l and
1358 initialize_tdesc_powerpc_isa207_htm_vsx64l.
1359 * ppc-linux-tdep.h (ppc_linux_cgprregset, ppc_linux_cvmxregset):
1361 (ppc32_linux_tm_sprregset, ppc32_linux_cfprregset)
1362 (ppc32_linux_cvsxregset, ppc32_linux_cpprregset)
1363 (ppc32_linux_cdscrregset, ppc32_linux_ctarregset): Declare.
1364 * ppc-tdep.h (struct gdbarch_tdep) <have_htm_spr, have_htm_core>:
1366 <have_htm_fpu, have_htm_altivec, have_htm_vsx>:
1368 <ppc_cppr_regnum, ppc_cdscr_regnum, ppc_ctar_regnum>: Likewise.
1369 <ppc_cdl0_regnum, ppc_cvsr0_regnum, ppc_cefpr0_regnum>: Likewise.
1370 (enum) <PPC_TFHAR_REGNUM, PPC_TEXASR_REGNUM, PPC_TFIAR_REGNUM>:
1372 <PPC_CR0_REGNUM, PPC_CCR_REGNUM, PPC_CXER_REGNUM>: Likewise.
1373 <PPC_CLR_REGNUM, PPC_CCTR_REGNUM, PPC_CF0_REGNUM>: Likewise.
1374 <PPC_CFPSCR_REGNUM, PPC_CVR0_REGNUM, PPC_CVSCR_REGNUM>: Likewise.
1375 <PPC_CVRSAVE_REGNUM, PPC_CVSR0_UPPER_REGNUM>: Likewise.
1376 <PPC_CPPR_REGNUM, PPC_CDSCR_REGNUM>: Likewise.
1377 <PPC_CTAR_REGNUM>: Likewise.
1378 (PPC_IS_TMSPR_REGNUM, PPC_IS_CKPTGP_REGNUM, PPC_IS_CKPTFP_REGNUM)
1379 (PPC_IS_CKPTVMX_REGNUM, PPC_IS_CKPTVSX_REGNUM): Define.
1380 * rs6000-tdep.c (IS_CDFP_PSEUDOREG, IS_CVSX_PSEUDOREG)
1381 (IS_CEFP_PSEUDOREG): Define.
1382 (rs6000_register_name): Hide the upper halves of checkpointed VSX
1383 registers. Return names for the checkpointed DFP, VSX, and EFP
1385 (rs6000_pseudo_register_type): Remove initial assert and raise an
1386 internal error in the else clause instead. Return types for the
1387 checkpointed DFP, VSX, and EFP pseudo registers.
1388 (dfp_pseudo_register_read, dfp_pseudo_register_write): Handle
1389 checkpointed DFP pseudo registers.
1390 (vsx_pseudo_register_read, vsx_pseudo_register_write): Handle
1391 checkpointed VSX pseudo registers.
1392 (efp_pseudo_register_read, efp_pseudo_register_write): Rename
1393 from efpr_pseudo_register_read and
1394 efpr_pseudo_register_write. Handle checkpointed EFP pseudo
1396 (rs6000_pseudo_register_read, rs6000_pseudo_register_write):
1397 Handle checkpointed DFP, VSX, and EFP registers.
1398 (dfp_ax_pseudo_register_collect, vsx_ax_pseudo_register_collect)
1399 (efp_ax_pseudo_register_collect): New functions.
1400 (rs6000_ax_pseudo_register_collect): Move DFP, VSX and EFP pseudo
1401 register logic to new functions. Handle checkpointed DFP, VSX,
1402 and EFP pseudo registers.
1403 (rs6000_gdbarch_init): Look for and validate the htm features.
1404 Include checkpointed DFP, VSX and EFP pseudo-registers.
1405 * NEWS: Mention access to PPR, DSCR, TAR, EBB/PMU registers and
1408 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
1410 * rs6000-tdep.c (rs6000_gdbarch_init): Reject tdescs with vsx but
1411 without altivec or fpu.
1413 2018-10-26 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
1414 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
1416 * arch/ppc-linux-common.h (PPC_LINUX_SIZEOF_EBBREGSET)
1417 (PPC_LINUX_SIZEOF_PMUREGSET): Declare.
1418 * nat/ppc-linux.h (PPC_FEATURE2_EBB, NT_PPC_EBB, NT_PPC_PMU):
1419 Define if not already defined.
1420 * features/rs6000/power-ebb.xml: New file.
1421 * features/rs6000/power-linux-pmu.xml: New file.
1422 * features/rs6000/powerpc-isa207-vsx32l.xml: Include ebb and pmu
1424 * features/rs6000/powerpc-isa207-vsx64l.xml: Likewise.
1425 * features/rs6000/powerpc-isa207-vsx32l.c: Re-generate.
1426 * features/rs6000/powerpc-isa207-vsx64l.c: Re-generate.
1427 * regformats/rs6000/powerpc-isa207-vsx32l.dat: Re-generate.
1428 * regformats/rs6000/powerpc-isa207-vsx64l.dat: Re-generate.
1429 * ppc-linux-nat.c (fetch_register, fetch_ppc_registers): Call
1430 fetch_regset with ebb and pmu regsets.
1431 (store_register, store_ppc_registers): Call store_regset with ebb
1433 (ppc_linux_nat_target::read_description): Set isa207 field in the
1434 features struct if ebb and pmu are avaiable.
1435 * ppc-linux-tdep.c (ppc32_regmap_ebb, ppc32_regmap_pmu)
1436 (ppc32_linux_ebbregset, ppc32_linux_pmuregset): New globals.
1437 (ppc_linux_iterate_over_regset_sections): Call back with the ebb
1439 (ppc_linux_core_read_description): Check if the pmu section is
1440 present and set isa207 in the features struct.
1441 * ppc-linux-tdep.h (ppc32_linux_ebbregset)
1442 (ppc32_linux_pmuregset): Declare.
1443 * ppc-tdep.h (struct gdbarch_tdep) <ppc_mmcr0_regnum>: New field.
1444 <ppc_mmcr2_regnum, ppc_siar_regnum, ppc_sdar_regnum>: New fields.
1445 <ppc_sier_regnum>: New field.
1446 (enum): <PPC_BESCR_REGNUM, PPC_EBBHR_REGNUM, PPC_EBBRR_REGNUM>:
1448 <PPC_MMCR0_REGNUM, PPC_MMCR2_REGNUM, PPC_SIAR_REGNUM>: New enum
1450 <PPC_SDAR_REGNUM, PPC_SIER_REGNUM>: New enum values.
1451 (PPC_IS_EBB_REGNUM, PPC_IS_PMU_REGNUM): Define.
1452 * rs6000-tdep.c (rs6000_gdbarch_init): Look for and validate the
1453 ebb and pmu features.
1455 2018-10-26 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
1456 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
1458 * arch/ppc-linux-tdesc.h (tdesc_powerpc_isa207_vsx32l)
1459 (tdesc_powerpc_isa207_vsx64l): Declare.
1460 * arch/ppc-linux-common.h (PPC_LINUX_SIZEOF_TARREGSET): Define.
1461 (struct ppc_linux_features) <isa207>: New field.
1462 (ppc_linux_no_features): Add initializer for isa207 field.
1463 * arch/ppc-linux-common.c (ppc_linux_match_description): Return
1465 * nat/ppc-linux.h (PPC_FEATURE2_ARCH_2_07, PPC_FEATURE2_TAR)
1466 (NT_PPC_TAR): Define if not already defined.
1467 * features/Makefile (WHICH): Add rs6000/powerpc-isa207-vsx32l and
1468 rs6000/powerpc-isa207-vsx64l.
1469 (XMLTOC): Add rs6000/powerpc-isa207-vsx32l.xml and
1470 rs6000/powerpc-isa207-vsx64l.xml.
1471 * features/rs6000/power-tar.xml: New file.
1472 * features/rs6000/powerpc-isa207-vsx32l.xml: New file.
1473 * features/rs6000/powerpc-isa207-vsx64l.xml: New file.
1474 * features/rs6000/powerpc-isa207-vsx32l.c: Generate.
1475 * features/rs6000/powerpc-isa207-vsx64l.c: Generate.
1476 * regformats/rs6000/powerpc-isa207-vsx32l.dat: Generate.
1477 * regformats/rs6000/powerpc-isa207-vsx64l.dat: Generate.
1478 * ppc-linux-nat.c (fetch_register, fetch_ppc_registers): Call
1479 fetch_regset with the TAR regset.
1480 (store_register, store_ppc_registers): Call store_regset with the
1482 (ppc_linux_nat_target::read_description): Set isa207 field in the
1483 features struct if needed.
1484 * ppc-linux-tdep.c: Include
1485 features/rs6000/powerpc-isa207-vsx32l.c and
1486 features/rs6000/powerpc-isa207-vsx64l.c.
1487 (ppc32_regmap_tar, ppc32_linux_tarregset): New globals.
1488 (ppc_linux_iterate_over_regset_sections): Call back with the tar
1490 (ppc_linux_core_read_description): Check if the tar section is
1491 present and set isa207 in the features struct.
1492 (_initialize_ppc_linux_tdep): Call
1493 initialize_tdesc_powerpc_isa207_vsx32l and
1494 initialize_tdesc_powerpc_isa207_vsx64l.
1495 * ppc-linux-tdep.h (ppc32_linux_tarregset): Declare.
1496 * ppc-tdep.h (gdbarch_tdep) <ppc_tar_regnum>: New field.
1497 (enum) <PPC_TAR_REGNUM>: New enum value.
1498 * rs6000-tdep.c (rs6000_gdbarch_init): Look for and validate tar
1500 (ppc_process_record_op31): Record changes to TAR.
1502 2018-10-26 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
1503 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
1505 * arch/ppc-linux-tdesc.h (tdesc_powerpc_isa205_ppr_dscr_vsx32l)
1506 (tdesc_powerpc_isa205_ppr_dscr_vsx64l): Declare.
1507 * arch/ppc-linux-common.h (PPC_LINUX_SIZEOF_PPRREGSET)
1508 (PPC_LINUX_SIZEOF_DSCRREGSET): Define.
1509 (struct ppc_linux_features) <ppr_dscr>: New field.
1510 (ppc_linux_no_features): Add initializer for ppr_dscr field.
1511 * arch/ppc-linux-common.c (ppc_linux_match_description): Return
1513 * nat/ppc-linux.h (PPC_FEATURE2_DSCR, NT_PPC_PPR, NT_PPC_DSCR):
1514 Define if not already defined.
1515 * features/Makefile (WHICH): Add
1516 rs6000/powerpc-isa205-ppr-dscr-vsx32l and
1517 rs6000/powerpc-isa205-ppr-dscr-vsx64l.
1518 (XMLTOC): Add rs6000/powerpc-isa205-ppr-dscr-vsx32l.xml and
1519 rs6000/powerpc-isa205-ppr-dscr-vsx64l.xml.
1520 * features/rs6000/power-dscr.xml: New file.
1521 * features/rs6000/power-ppr.xml: New file.
1522 * features/rs6000/powerpc-isa205-ppr-dscr-vsx32l.xml: New file.
1523 * features/rs6000/powerpc-isa205-ppr-dscr-vsx64l.xml: New file.
1524 * features/rs6000/powerpc-isa205-ppr-dscr-vsx32l.c: Generate.
1525 * features/rs6000/powerpc-isa205-ppr-dscr-vsx64l.c: Generate.
1526 * regformats/rs6000/powerpc-isa205-ppr-dscr-vsx32l.dat: Generate.
1527 * regformats/rs6000/powerpc-isa205-ppr-dscr-vsx64l.dat: Generate.
1528 * ppc-linux-nat.c: Include <sys/uio.h>.
1529 (fetch_regset, store_regset, check_regset): New functions.
1530 (fetch_register, fetch_ppc_registers): Call fetch_regset with
1531 DSCR and PPR regsets.
1532 (store_register, store_ppc_registers): Call store_regset with
1533 DSCR and PPR regsets.
1534 (ppc_linux_get_hwcap2): New function.
1535 (ppc_linux_nat_target::read_description): Call
1536 ppc_linux_get_hwcap2 and check_regset, set ppr_dscr field in the
1537 features struct if needed.
1538 * ppc-linux-tdep.c: Include
1539 features/rs6000/powerpc-isa205-ppr-dscr-vsx32l.c and
1540 features/rs6000/powerpc-isa205-ppr-dscr-vsx64l.c.
1541 (ppc32_regmap_ppr, ppc32_regmap_dscr, ppc32_linux_pprregset)
1542 (ppc32_linux_dscrregset): New globals.
1543 (ppc_linux_iterate_over_regset_sections): Call back with the ppr
1545 (ppc_linux_core_read_description): Check if the ppr and dscr
1546 sections are present and set ppr_dscr in the features struct.
1547 (_initialize_ppc_linux_tdep): Call
1548 initialize_tdesc_powerpc_isa205_ppr_dscr_vsx32l and
1549 initialize_tdesc_powerpc_isa205_ppr_dscr_vsx64l.
1550 * ppc-linux-tdep.h (ppc32_linux_pprregset)
1551 (ppc32_linux_dscrregset): Declare.
1552 * ppc-tdep.h (struct gdbarch_tdep) <ppc_ppr_regnum>: New field.
1553 <ppc_dscr_regnum>: New field.
1554 (enum) <PPC_PPR_REGNUM, PPC_DSCR_REGNUM>: New enum values.
1555 * rs6000-tdep.c (rs6000_gdbarch_init): Look for and validate ppr
1557 (ppc_process_record_op31): Record changes to PPR and DSCR.
1559 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
1561 * rs6000-tdep.c (rs6000_gdbarch_init): Replace line wrapping by a
1562 second initializer line for the have_* variables. Initialize
1563 have_fpu to 0 instead of 1.
1565 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
1567 * arch/ppc-linux-common.c (ppc_linux_match_description):
1568 Parenthesize tdesc assignements and indent them properly.
1570 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
1572 * ppc-linux-nat.c (fetch_register): Change if statement to else
1574 (store_register): Likewise.
1576 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
1578 * rs6000-tdep.c: Remove reggroups.h include.
1579 (rs6000_pseudo_register_reggroup_p): Remove.
1580 (rs6000_gdbarch_init): Remove call to
1581 set_tdesc_pseudo_register_reggroup_p.
1583 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
1585 * reggroups.c (default_register_reggroup_p): Return true for
1586 decfloat registers and float_reggroup.
1588 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
1590 * ppc-linux-tdep.c (ppc_linux_collect_vrregset): Remove.
1591 (ppc32_le_linux_vrregset, ppc32_be_linux_vrregset): Replace
1592 ppc_linux_collect_vrregset by regcache_collect_regset.
1594 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
1596 * linux-tdep.c (linux_collect_regset_section_cb): Use
1597 std::vector<gdb_byte> instead of char * and malloc for buf.
1600 2018-10-26 Sangamesh Mallayya <sangamesh.swamy@in.ibm.com>
1602 * xcoffread.c (read_xcoff_symtab): Pass deduced language to
1603 symtab_start instead of always using language_unknown.
1605 2018-10-26 Andrew Burgess <andrew.burgess@embecosm.com>
1607 * riscv-tdep.c (riscv_read_misa_reg): Update comment, remove
1608 READ_P parameter, catch and ignore register access errors from
1609 either the old or new MISA location.
1610 (riscv_has_feature): Update call to riscv_read_misa_reg.
1612 2018-10-25 Andrew Burgess <andrew.burgess@embecosm.com>
1614 * python/py-function.c (convert_values_to_python): Return
1615 gdbpy_ref<>. Add header comment.
1616 (fnpy_call): Adjust.
1618 2018-10-25 Andrew Burgess <andrew.burgess@embecosm.com>
1620 * python/py-cmd.c (cmdpy_completer_helper): Return gdbpy_ref<>.
1621 (cmdpy_completer_handle_brkchars): Adjust.
1622 (cmdpy_completer): Adjust.
1624 2018-10-25 Andrew Burgess <andrew.burgess@embecosm.com>
1626 * riscv-linux-nat.c (riscv_linux_nat_target::fetch_registers):
1627 Pass correct regnum to raw_supply_zeroed.
1629 2018-10-23 Hafiz Abid Qadeer <abidh@codesourcery.com>
1631 * regcache.c (cooked_read_test): Add CSKY to the list of
1632 architectures with a save_reggroup
1634 2018-10-23 Simon Marchi <simon.marchi@polymtl.ca>
1637 * infrun.c (follow_exec): In the follow_exec_mode_new case,
1638 transfer terminal state from old new new inferior.
1639 * terminal.h (swap_terminal_info): New function.
1640 * inflow.c (swap_terminal_info): New function.
1642 2018-10-23 Tom Tromey <tom@tromey.com>
1644 * record-btrace.c (get_thread_current_frame_id): Rename from
1645 get_thread_current_frame. Return a frame_id.
1646 (record_btrace_start_replaying): Update.
1648 2018-10-23 Andrew Burgess <andrew.burgess@embecosm.com>
1650 * riscv-tdep.c (riscv_register_name): Use the user-friendly names
1653 2018-10-23 Joel Brobecker <brobecker@adacore.com>
1655 * riscv-tdep.c (riscv_gdbarch_init): Set the gdbarch's
1656 have_nonsteppable_watchpoint attribute to 1.
1658 2018-10-23 Andrew Burgess <andrew.burgess@embecosm.com>
1660 * riscv-tdep.c (riscv_gdb_reg_names): Update comment, and all
1662 (struct register_alias): Rename to...
1663 (struct riscv_register_alias): ...this, and update comment.
1664 (riscv_register_aliases): Update type, and alias names. Remove
1665 CSR names from this list.
1666 (riscv_register_name): Use riscv_gdb_reg_names for int and float
1667 register names. Add an extra assertion.
1668 (riscv_is_regnum_a_named_csr): New function.
1669 (riscv_register_reggroup_p): Use riscv_is_regnum_a_named_csr.
1671 2018-10-23 John Darrington <john@darrington.wattle.id.au>
1673 * configure.tgt: Add configuration for s12z.
1674 * s12z-tdep.c: New file.
1675 * NEWS: Mention new target.
1677 2018-10-22 Jim Wilson <jimw@sifive.com>
1679 * riscv-tdep.c (riscv_push_dummy_call) <in_reg>: Check for value in
1680 FP reg smaller than FP reg size, and fill with -1 instead of 0.
1682 * riscv-tdep.c (riscv_fpreg_d_type, riscv_fpreg_q_type): New.
1683 (riscv_register_type): Use them.
1684 (riscv_print_one_register_info): Handle union of floats same as float.
1685 * riscv-tdep.h (struct gdbarch_tdep): Add riscv_fpreg_d_type and
1686 riscv_fpreg_q_type fields.
1688 2018-10-21 Simon Marchi <simon.marchi@ericsson.com>
1690 * gdbarch.sh (gdbarch_num_cooked_regs): New.
1691 * gdbarch.h: Re-generate.
1692 * ax-gdb.c (gen_expr): Use gdbarch_num_cooked_regs.
1693 * dwarf2-frame.c (dwarf2_frame_cache): Likewise.
1694 * eval.c (evaluate_subexp_standard): Likewise.
1695 * findvar.c (value_of_register): Likewise.
1696 (value_of_register_lazy): Likewise.
1697 (address_from_register): Likewise.
1698 * frame.c (get_frame_register_bytes): Likewise.
1699 * gdbarch-selftests.c (register_to_value_test): Likewise.
1700 * h8300-tdep.c (h8300_register_type): Likewise.
1701 * i386-tdep.c (i386_dbx_reg_to_regnum): Likewise.
1702 (i386_svr4_reg_to_regnum): Likewise.
1703 * infcmd.c (default_print_registers_info): Likewise.
1704 (registers_info): Likewise.
1705 (print_vector_info): Likewise.
1706 (default_print_float_info): Likewise.
1707 * m68hc11-tdep.c (m68hc11_frame_unwind_cache): Likewise.
1708 * mdebugread.c (mdebug_reg_to_regnum): Likewise.
1709 * mi/mi-main.c (mi_cmd_data_list_register_names): Likewise.
1710 (mi_cmd_data_list_changed_registers): Likewise.
1711 (mi_cmd_data_list_register_values): Likewise.
1712 (mi_cmd_data_write_register_values): Likewise.
1713 (mi_cmd_trace_frame_collected): Likewise.
1714 * mips-tdep.c (print_gp_register_row): Likewise.
1715 (mips_print_registers_info): Likewise.
1716 * nds32-tdep.c (nds32_gdbarch_init): Likewise.
1717 * regcache.c (init_regcache_descr): Likewise.
1718 (register_size): Likewise.
1719 (register_dump::dump): Likewise.
1720 (cooked_read_test): Likewise.
1721 (cooked_write_test): Likewise.
1722 * rs6000-tdep.c (rs6000_register_sim_regno): Likewise.
1723 (rs6000_gdbarch_init): Likewise.
1724 * stabsread.c (stab_reg_to_regnum): Likewise.
1725 * stack.c (info_frame_command): Likewise.
1726 * target-descriptions.c (tdesc_register_name): Likewise.
1727 * trad-frame.c (trad_frame_alloc_saved_regs): Likewise.
1728 * tui/tui-regs.c (tui_show_register_group): Likewise.
1729 * user-regs.c (user_reg_map_name_to_regnum): Likewise.
1730 (user_reg_map_regnum_to_name): Likewise.
1731 (value_of_user_reg): Likewise.
1732 (maintenance_print_user_registers): Likewise.
1733 * xtensa-tdep.c (xtensa_find_register_by_name): Likewise.
1734 (xtensa_register_name): Likewise.
1735 (xtensa_register_type): Likewise.
1736 (xtensa_reg_to_regnum): Likewise.
1737 (xtensa_pseudo_register_read): Likewise.
1738 (xtensa_pseudo_register_write): Likewise.
1740 2018-10-21 Simon Marchi <simon.marchi@polymtl.ca>
1742 * amd64-tdep.c (amd64_pseudo_register_read_value): Use
1743 correctly-sized buffer with raw_read.
1744 (amd64_pseudo_register_write): Use correctly-sized buffer for
1747 2018-10-19 Philippe Waroquiers <philippe.waroquiers@skynet.be>
1749 * typeprint.c (_initialize_typeprint): Fix wrong prefixname arg
1750 in add_prefix_cmd of set print type.
1752 2018-10-19 Tom Tromey <tom@tromey.com>
1755 * NEWS: Mention tabset deprecation.
1756 * tui/tui-win.c (tui_tab_width, internal_tab_width): New globals.
1757 (update_tab_width): New function.
1758 (tui_set_tab_width, tui_show_tab_width): New functions.
1759 (tui_set_tab_width_command): Use update_tab_width.
1760 (_initialize_tui_win): Move to end of file. Deprecate "tabset".
1761 Add new "set tui tab-width" command.
1762 * tui/tui-source.c (tui_set_source_content): Update.
1763 * tui/tui-disasm.c (tui_set_disassem_content): Update.
1764 * tui/tui-data.h (tui_default_tab_len, tui_set_default_tab_len):
1766 (tui_tab_width): Declare.
1767 * tui/tui-data.c (default_tab_len, tui_default_tab_len)
1768 (tui_set_default_tab_len): Remove.
1770 2018-10-19 Tom Tromey <tom@tromey.com>
1772 * tui/tui-io.h (key_is_start_sequence, key_is_end_sequence)
1773 (key_is_backspace, tui_getc): Don't declare.
1774 * tui/tui-io.c (key_is_start_sequence): Now static.
1775 (key_is_end_sequence, key_is_backspace): Remove.
1776 (tui_getc): Now static.
1778 2018-10-19 Tom Tromey <tom@tromey.com>
1780 * symfile.c (reread_symbols): Clear "static_links".
1782 2018-10-19 Alan Hayward <alan.hayward@arm.com>
1784 * aarch64-linux-tdep.c (AARCH64_SIGCONTEXT_RESERVED_SIZE): New
1786 (aarch64_linux_sigframe_init): Extra boundary checks.
1788 2018-10-19 Andreas Arnez <arnez@linux.ibm.com>
1790 * s390-tdep.c (s390_pseudo_register_type): For v0-v15 don't yield
1791 the possibly non-existent tdesc type 'vec128', but the type of raw
1792 register v16 instead.
1794 2018-10-19 Gary Benson <gbenson@redhat.com>
1796 * cli/cli-interp.c (cli_interp::~cli_interp): New function.
1798 2018-10-18 Sergio Durigan Junior <sergiodj@redhat.com>
1801 * cli/cli-dump.c (restore_binary_file): Check if "file" is
1804 2018-10-17 Paul Koning <paul_koning@dell.com>
1806 * charset.c (convert_between_encodings): Fix unsigned overflow.
1808 2018-10-17 John Baldwin <jhb@FreeBSD.org>
1810 * fbsd-nat.c (fbsd_nat_target::info_proc) Use
1811 fbsd_info_proc_mappings_header and fbsd_info_proc_mappings_entry.
1812 * fbsd-tdep.c (fbsd_vm_map_entry_flags): Mark static.
1813 (fbsd_info_proc_mappings_header, fbsd_info_proc_mappings_entry):
1815 (fbsd_core_info_proc_mappings): Use fbsd_info_proc_mappings_header
1816 and fbsd_info_proc_mappings_header.
1817 * fbsd-tdep.h (fbsd_vm_map_entry_flags): Remove.
1818 (fbsd_info_proc_mappings_header, fbsd_info_proc_mappings_entry):
1821 2018-10-17 Joel Brobecker <brobecker@adacore.com>
1823 * MAINTAINERS (Responsible Maintainers): Add Rainer Orth as
1826 2018-10-15 Tom Tromey <tom@tromey.com>
1828 * tui/tui.c (strcat_to_buf): Remove casts.
1829 * tui/tui-winsource.c (tui_show_source_line)
1830 (tui_set_is_exec_point_at, tui_line_is_displayed): Remove casts.
1831 * tui/tui-wingeneral.c (tui_refresh_win, box_win): Remove casts.
1832 * tui/tui-windata.c (tui_first_data_item_displayed)
1833 (tui_delete_data_content_windows, tui_erase_data_content)
1834 (tui_display_all_data, tui_display_data_from)
1835 (tui_refresh_data_win, tui_vertical_data_scroll): Remove casts.
1836 * tui/tui-win.c (tui_set_win_height)
1837 (make_invisible_and_set_new_height, parse_scrolling_args): Remove
1839 * tui/tui-win.c (tui_resize_all): Remove casts.
1840 (tui_scroll_backward_command, tui_set_focus)
1841 (tui_set_tab_width_command): Likewise.
1842 * tui/tui-source.c (tui_vertical_source_scroll): Remove cast.
1843 * tui/tui-regs.c (tui_show_register_group): Remove cast.
1844 * tui/tui-layout.c (tui_set_layout_by_name): Remove cast.
1845 * tui/tui-disasm.c (tui_vertical_disassem_scroll): Remove cast.
1846 * tui/tui-data.c (tui_partial_win_by_name, tui_free_win_content):
1849 2018-10-15 Simon Marchi <simon.marchi@ericsson.com>
1851 * MAINTAINERS (Responsible Maintainers): Add Alan Hayward as
1852 AArch64/ARM maintainer.
1854 2018-10-11 Gary Benson <gbenson@redhat.com>
1856 * interps.h (interp::m_name): Make private and mutable.
1857 * interps.c (interp::~interp): Free m_name.
1859 2018-10-10 Sergio Durigan Junior <sergiodj@redhat.com>
1860 Simon Marchi <simark@simark.ca>
1862 * README (`configure' options): Add documentation for new
1863 "--enable-unit-tests" option.
1864 * acinclude.m4: Include "selftest.m4".
1865 * configure: Regenerate.
1866 * configure.ac: Use "GDB_AC_SELFTEST".
1867 * maint.c (maintenance_selftest): Update message informing
1868 that selftests have been disabled.
1869 (maintenance_info_selftests): Likewise.
1870 * selftest.m4: New file.
1872 2018-10-10 Gary Benson <gbenson@redhat.com>
1874 * remote.c (remote_target::remote_send_printf): Add
1875 missing va_end found by Coverity.
1877 2018-10-10 Markus Metzger <markus.t.metzger@intel.com>
1879 * btrace.c (ftrace_update_function): Add indirect jump heuristic.
1881 2018-10-09 Tom Tromey <tom@tromey.com>
1883 * configure: Rebuild.
1884 * sanitize.m4 (AM_GDB_UBSAN): Default to no.
1885 * NEWS: Update --enable-ubsan documentation.
1887 2018-10-09 Gary Benson <gbenson@redhat.com>
1889 * dwarf2read.c (create_dwp_hash_table): Fix buffer overrun
1892 2018-10-08 Tom Tromey <tom@tromey.com>
1894 * riscv-fbsd-tdep.c (riscv_fbsd_sigframe_init): Remove unused
1896 (riscv_fbsd_init_abi): Likewise.
1898 2018-10-08 Weimin Pan <weimin.pan@oracle.com>
1899 * valops.c (value_struct_elt_for_reference): Rename local variable
1900 to work around the shadowing a previous local warning.
1902 2018-10-08 John Baldwin <jhb@FreeBSD.org>
1904 * Makefile.in (ALLDEPFILES): Add riscv-fbsd-nat.c.
1905 * NEWS: Mention new FreeBSD/riscv native configuration.
1906 * configure.host: Add riscv*-*-freebsd*.
1907 * configure.nat: Likewise.
1908 * riscv-fbsd-nat.c: New file.
1910 2018-10-08 John Baldwin <jhb@FreeBSD.org>
1912 * Makefile.in (ALL_TARGET_OBS): Add riscv-fbsd-tdep.o.
1913 (HFILES_NO_SRCDIR): Add riscv-fbsd-tdep.h.
1914 (ALLDEPFILES): Add riscv-fbsd-tdep.c.
1915 * NEWS: Mention new FreeBSD/riscv target.
1916 * configure.tgt: Add riscv*-*-freebsd*.
1917 * riscv-fbsd-tdep.c: New file.
1918 * riscv-fbsd-tdep.h: New file.
1920 2018-10-08 John Baldwin <jhb@FreeBSD.org>
1922 * regcache.h (struct regcache_map_entry): Note that this type can
1923 be used with traditional frame caches.
1924 * trad-frame.c (trad_frame_set_reg_regmap): New.
1925 * trad-frame.h (trad_frame_set_reg_regmap): New.
1927 2018-10-08 Weimin Pan <weimin.pan@oracle.com>
1930 * valops.c (get_virtual_base_offset): New function.
1931 (value_struct_elt_for_reference): Use it to get virtual base offset
1932 and add it in calculating class member address.
1934 2018-10-08 John Darrington <john@darrington.wattle.id.au>
1936 * dwarf2read.c (dwarf2_cu) <producer_is_codewarrior>: New field.
1937 (check_producer): Check if the producer is codewarrior.
1938 (producer_is_codewarrior): New function.
1939 (lnp_state_machine::record_line): Ignore is_stmt flag for records
1940 produced by codewarrior.
1941 (dwarf2_cu::dwarf2_cu): Initialize producer_is_codewarrior.
1943 2018-10-06 Tom Tromey <tom@tromey.com>
1946 * python/py-inferior.c: Add "architecture" entry.
1947 (infpy_architecture): New function.
1949 2018-10-06 Tom Tromey <tom@tromey.com>
1952 * python/py-symbol.c (gdbpy_initialize_symbols): Redefine
1953 SYMBOL_VARIABLES_DOMAIN, SYMBOL_FUNCTIONS_DOMAIN,
1954 SYMBOL_TYPES_DOMAIN. Define SYMBOL_MODULE_DOMAIN,
1955 SYMBOL_COMMON_BLOCK_DOMAIN, SYMBOL_LOC_COMMON_BLOCK.
1957 2018-10-06 Tom Tromey <tom@tromey.com>
1960 * Makefile.in (OPCODES_CFLAGS): Remove "-I$(OPCODES_SRC)/..".
1961 * arc-tdep.c, frv-tdep.c, lm32-tdep.c, mep-tdep.c,
1962 microblaze-tdep.c, or1k-tdep.h: Use ../opcodes, not opcodes, in
1965 2018-10-06 Tom Tromey <tom@tromey.com>
1967 * python/py-breakpoint.c (bppy_get_location): Handle a
1968 bp_breakpoint without a location.
1970 2018-10-06 Tom Tromey <tom@tromey.com>
1972 * python/lib/gdb/function/strfns.py (_MemEq, _StrLen, _StrEq)
1973 (_RegEx): Reformat help text.
1974 * python/lib/gdb/function/caller_is.py (CallerIs, CallerMatches)
1975 (AnyCallerIs, AnyCallerMatches): Reformat help text.
1976 * python/lib/gdb/function/as_string.py (_AsString): Reformat help
1978 * python/lib/gdb/command/xmethods.py (InfoXMethod)
1979 (EnableXMethod, DisableXMethod): Remove help indentation.
1980 Capitalize meta-syntactic variables.
1981 * python/lib/gdb/command/unwinders.py (InfoUnwinder)
1982 (EnableUnwinder, DisableUnwinder): Remove help indentation.
1983 Capitalize meta-syntactic variables.
1984 * python/lib/gdb/command/explore.py (ExploreCommand)
1985 (ExploreValueCommand, ExploreTypeCommand): Reformat help text.
1986 * python/lib/gdb/command/type_printers.py (InfoTypePrinter)
1987 (EnableTypePrinter, DisableTypePrinter): Remove help indentation.
1988 * python/lib/gdb/command/pretty_printers.py (InfoPrettyPrinter):
1989 Remove help indentation.
1990 (EnablePrettyPrinter, DisablePrettyPrinter): Likewise.
1991 * python/lib/gdb/command/frame_filters.py (EnableFrameFilter)
1992 (DisableFrameFilter, SetFrameFilterPriority)
1993 (ShowFrameFilterPriority, InfoFrameFilter): Reword help text.
1995 2018-10-06 Tom Tromey <tom@tromey.com>
1998 * tui/tui-io.c (gdb_wgetch): New function.
1999 (tui_mld_getc, tui_getc): Use it.
2001 2018-10-05 Tom Tromey <tom@tromey.com>
2003 * sol-thread.c (sol_thread_target::wait): Rename inner
2006 2018-10-04 Tom Tromey <tom@tromey.com>
2008 * configure: Rebuild.
2009 * warning.m4 (AM_GDB_WARNINGS): Add -Wshadow=local.
2011 2018-10-04 Tom Tromey <tom@tromey.com>
2013 * guile/scm-frame.c (gdbscm_frame_read_var): Remove inner
2014 declaration of "block".
2016 2018-10-04 Tom Tromey <tom@tromey.com>
2018 * common/filestuff.c (fdwalk): Remove inner declaration of
2021 2018-10-04 Tom Tromey <tom@tromey.com>
2023 * msp430-tdep.c (msp430_push_dummy_call): Rename inner
2024 "structs_addr" and hoist declaration.
2026 2018-10-04 Tom Tromey <tom@tromey.com>
2028 * linux-tdep.c (linux_make_mappings_corefile_notes): Introduce new
2031 2018-10-04 Tom Tromey <tom@tromey.com>
2033 * mdebugread.c (parse_partial_symbols): Use std::string.
2035 2018-10-04 Tom Tromey <tom@tromey.com>
2037 * ctf.c (SET_ARRAY_FIELD): Rename "u32".
2038 * p-valprint.c (pascal_val_print): Split inner "i" variable.
2039 * xtensa-tdep.c (xtensa_push_dummy_call): Declare "i" in loop
2041 * xstormy16-tdep.c (xstormy16_push_dummy_call): Declare "val" in
2043 * xcoffread.c (read_xcoff_symtab): Rename inner "symbol".
2044 * varobj.c (varobj_update): Rename inner "newobj",
2046 * valprint.c (generic_emit_char): Rename inner "buf".
2047 * valops.c (find_overload_match): Rename inner "temp".
2048 (value_struct_elt_for_reference): Declare "v" in more inner
2050 * v850-tdep.c (v850_push_dummy_call): Rename "len".
2051 * unittests/array-view-selftests.c (run_tests): Rename inner
2053 * tui/tui-stack.c (tui_show_frame_info): Declare "i" in loop
2055 * tracepoint.c (merge_uploaded_trace_state_variables): Declare
2056 "tsv" in more inner scope.
2057 (print_one_static_tracepoint_marker): Rename inner
2059 * tic6x-tdep.c (tic6x_analyze_prologue): Declare "inst" lower.
2060 (tic6x_push_dummy_call): Don't redeclare "addr".
2061 * target-float.c: Declare "dto" lower.
2062 * symtab.c (lookup_local_symbol): Rename inner "sym".
2063 (find_pc_sect_line): Rename inner "pc".
2064 * stack.c (print_frame): Don't redeclare "gdbarch".
2065 (return_command): Rename inner "gdbarch".
2066 * s390-tdep.c (s390_prologue_frame_unwind_cache): Renam inner
2068 * rust-lang.c (rust_internal_print_type): Declare "i" in loop
2070 * rs6000-tdep.c (ppc_process_record): Rename inner "addr".
2071 * riscv-tdep.c (riscv_push_dummy_call): Declare "info" in inner
2073 * remote.c (remote_target::update_thread_list): Don't redeclare
2075 (remote_target::process_initial_stop_replies): Rename inner
2077 (remote_target::remote_parse_stop_reply): Don't redeclare "p".
2078 (remote_target::wait_as): Don't redeclare "stop_reply".
2079 (remote_target::get_thread_local_address): Rename inner
2081 (remote_target::get_tib_address): Likewise.
2083 * regcache.c (cooked_read_test): Rename "regnum".
2084 * record-btrace.c (cmd_record_btrace_start): Rename inner
2086 * ppc-sysv-tdep.c (ppc64_sysv_abi_return_value): Declare "i" in
2088 * ppc-linux-tdep.c (ppc_linux_syscall_record): Declare "i" in loop
2090 (ppu2spu_sniffer): Rename inner "buf".
2091 * parse.c (operator_check_standard): Rename inner "type",
2093 * p-valprint.c (pascal_val_print): Introduce new scope for
2094 "low_bound", "high_bound".
2095 * p-exp.y (yylex): Declare "i" in loop header.
2096 * objfiles.c (objfile_relocate1): Declare "i" in loop header.
2097 Lower declaration of "s".
2098 * nios2-tdep.c (nios2_analyze_prologue): Declare "i" in loop
2100 (nios2_push_dummy_call): Rename "len".
2101 * nat/linux-osdata.c (linux_xfer_osdata_cpus): Rename static
2103 (linux_xfer_osdata_fds, linux_xfer_osdata_shm)
2104 (linux_xfer_osdata_sem, linux_xfer_osdata_msg)
2105 (linux_xfer_osdata_modules): Likewise.
2106 * mips-tdep.c (mips_eabi_push_dummy_call): Rename outer "len".
2107 (mips_n32n64_push_dummy_call, mips_o32_push_dummy_call)
2108 (mips_o64_push_dummy_call): Likewise.
2109 * microblaze-tdep.c (microblaze_analyze_prologue): Rename inner
2111 * mi/mi-main.c (list_available_thread_groups): Rename inner
2113 (mi_cmd_data_read_memory): Rename inner "opts".
2114 * mi/mi-cmd-var.c (varobj_update_one): Rename inner
2116 * mep-tdep.c (mep_analyze_prologue): Declare "rn" in loop header.
2117 * mdebugread.c (parse_symbol): Rename inner "b". Declare "f" in
2119 (parse_partial_symbols): Rename inner "pst", "p", "name"
2120 * main.c (captured_main_1): Rename inner "i"s.
2121 * machoread.c (macho_symfile_read_all_oso): Don't redeclare
2123 * linux-tdep.c (linux_info_proc): Rename inner "filename".
2124 * linespec.c (linespec_lexer_lex_string): Rename inner "p".
2125 * infrun.c (handle_no_resumed): Don't redeclare "thread".
2126 (handle_signal_stop): Rename inner "gdbarch".
2127 (handle_command): Declare "signum" in loop header.
2128 * ia64-tdep.c (ia64_pseudo_register_read): Don't redeclare
2130 (examine_prologue): Rename inner "sol" and "sof".
2131 (ia64_extract_return_value): Rename inner "val". Declare another
2132 "val" in a more inner scope.
2133 * hppa-bsd-tdep.c (hppabsd_find_global_pointer): Declare "buf" in
2135 * guile/scm-symbol.c (gdbscm_lookup_symbol): Rename inner
2137 * findvar.c (default_read_var_value): Don't redeclare "addr".
2138 * f-exp.y (yylex): Declare "i" in loop header.
2139 * eval.c (evaluate_subexp_standard): Don't redeclare "type".
2140 Rename inner "type", "expect_type".
2141 (evaluate_subexp_for_sizeof): Rename inner "pc".
2142 * elfread.c (elf_symfile_read): Rename inner "abfd".
2143 * dwarf2read.c (read_debug_names_from_section): Don't redeclare
2145 (process_psymtab_comp_unit_reader): Don't redeclare "gdbarch".
2146 (add_partial_subprogram): Rename inner "lowpc" and "highpc".
2147 (dwarf_decode_line_header): Rename inner "lh".
2148 * dwarf2loc.c (dwarf2_compile_expr_to_ax): Don't redeclare
2149 "offset". Declare "i" in loop header.
2150 (disassemble_dwarf_expression): Rename inner "addr_size".
2151 * dwarf2expr.c (dwarf_expr_context::execute_stack_op): Rename
2153 (dwarf_expr_context::execute_stack_op): Rename inner "offset".
2154 * dwarf2-frame.c (decode_frame_entry_1): Rename inner "length"s.
2155 * disasm.c (do_mixed_source_and_assembly_deprecated): Rename inner
2156 "inner_list_emitter".
2157 (do_mixed_source_and_assembly): Rename inner "tuple_emitter".
2158 * disasm-selftests.c (print_one_insn_test): Wrap "bplen"
2159 declaration in a block.
2160 * csky-tdep.c (csky_analyze_prologue): Declare "offset" lower.
2161 * cp-valprint.c (cp_print_value_fields): Don't redeclare
2162 "obstack_final_size".
2163 * cp-support.c (inspect_type): Declare "i" in loop header.
2164 * compile/compile.c (compile_instance::insert_symbol_error):
2166 * common/agent.c (agent_run_command): Remove inner "ret"
2168 * coffread.c (coff_symfile_read): Rename inner "name".
2169 (coff_symfile_read): Rename inner "abfd".
2170 * cli/cli-utils.c (get_number_trailer): Rename inner "val".
2171 * cli/cli-cmds.c (print_disassembly): Rename inner "low" and
2173 * c-exp.y (lex_one_token): Move "len" declaration lower.
2174 * breakpoint.c (create_longjmp_master_breakpoint): Don't redeclare
2176 (create_exception_master_breakpoint): Likewise. Don't redeclare
2178 (watch_command_1): Declare "mark" later.
2179 (clear_command): Don't shadow "a" or "b".
2180 (delete_command): Rename inner "b".
2181 (delete_trace_command): Likewise.
2182 * arm-tdep.c (thumb_process_displaced_32bit_insn): Rename inner
2184 (arm_gdbarch_init): Remove inner "e_flags".
2185 * arch/arm-get-next-pcs.c (thumb_get_next_pcs_raw): Declare
2186 "offset" in inner blocks.
2188 2018-10-04 Simon Marchi <simon.marchi@ericsson.com>
2190 * dwarf-index-write.c (file_write): Don't write if the vector is
2193 2018-10-05 Tom de Vries <tdevries@suse.de>
2195 * python/py-progspace.c (pspy_solib_name): Fix type mismatch in
2196 PyArg_ParseTuple call.
2198 2018-10-05 Tom de Vries <tdevries@suse.de>
2200 * python/py-record-btrace.c (recpy_bt_goto): Fix type mismatch in
2201 PyArg_ParseTuple call.
2203 2018-10-04 Joel Brobecker <brobecker@adacore.com>
2205 * psymtab.c (recursively_search_psymtabs): Reformat parameters
2206 to avoid exceeding 80 characters per line limit.
2208 2018-10-04 Tom Tromey <tom@tromey.com>
2210 * symfile.c (syms_from_objfile_1, finish_new_objfile)
2211 (reread_symbols): Update.
2212 * complaints.h (clear_complaints): Remove argument.
2213 * complaints.c (enum complaint_series): Remove.
2214 (series): Remove global.
2215 (complaint_internal): Update.
2216 (clear_complaints): Remove argument.
2218 2018-10-04 Tom Tromey <tom@tromey.com>
2220 * symfile.c (symbol_file_add_with_addrs): Do not print "no
2221 debugging symbols" message if there is a separate debug objfile.
2223 2018-10-04 Tom Tromey <tom@tromey.com>
2226 * symfile.c (symbol_file_add_with_addrs): Update output.
2227 * psymtab.c (require_partial_symbols): Update output.
2229 2018-10-04 Tom Tromey <tom@tromey.com>
2232 * complaints.c: Emit \n.
2234 2018-10-04 Tom Tromey <tom@tromey.com>
2236 * symfile.c (symbol_file_add_with_addrs, symbol_file_clear)
2237 (separate_debug_file_exists, find_separate_debug_file)
2238 (add_symbol_file_command, reread_symbols, allocate_symtab)
2239 (allocate_compunit_symtab): Use filtered printing, not
2241 * psymtab.c (require_partial_symbols, dump_psymtab)
2242 (allocate_psymtab): Use filtered printing, not unfiltered.
2244 2018-10-04 Tom Tromey <tom@tromey.com>
2246 * complaints.c (complaint_internal): Correctly check complaint
2249 2018-10-04 Tom Tromey <tom@tromey.com>
2251 * complaints.h (struct complaints): Remove declaration.
2252 * complaints.c (clear_complaints): Remove an unused variable.
2254 2018-10-04 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
2256 * MAINTAINERS (Write After Approval): Add self.
2258 2018-10-03 Tom Tromey <tom@tromey.com>
2260 * guile/scm-value.c (gdbscm_value_to_string): Initialize
2262 * coffread.c (coff_symtab_read): Initialize "newobj".
2264 2018-10-03 Simon Marchi <simon.marchi@polymtl.ca>
2266 * dwarf2read.c (read_func_scope): Remove struct keyword in
2269 2018-10-03 Tom Tromey <tom@tromey.com>
2271 * README: Mention --enable-ubsan.
2272 * NEWS: Mention --enable-ubsan.
2273 * acinclude.m4: Include sanitize.m4.
2274 * configure: Rebuild.
2275 * configure.ac: Call AM_GDB_UBSAN.
2276 * sanitize.m4: New file.
2278 2018-10-03 Tom Tromey <tom@tromey.com>
2280 * expression.h (enum exp_opcode): Use uint8_t as base type.
2281 * expprint.c (op_name): Handle invalid opcodes.
2283 2018-10-03 Tom Tromey <tom@tromey.com>
2285 * parse.c (prefixify_expression): Add assert.
2286 (parse_exp_in_context_1): Throw exception if the expression is
2289 2018-10-03 Tom Tromey <tom@tromey.com>
2291 * dwarf2read.c (read_signed_leb128): Work in ULONGEST.
2293 2018-10-03 Tom Tromey <tom@tromey.com>
2295 * c-exp.y (parse_number): Work in unsigned. Remove casts.
2297 2018-10-03 Tom Tromey <tom@tromey.com>
2299 * dwarf2read.c (read_subrange_type): Make "negative_mask"
2302 2018-10-03 Tom Tromey <tom@tromey.com>
2304 * findvar.c (extract_integer): Do work in an unsigned type.
2306 2018-10-03 Tom Tromey <tom@tromey.com>
2308 * common/enum-flags.h (enum_flags::operator~): Add static assert.
2309 * symfile-add-flags.h (enum symfile_add_flag): Use unsigned as
2311 * objfile-flags.h (enum objfile_flag): Use unsigned as base type.
2312 * gdbtypes.h (enum type_instance_flag_value): Use unsigned as base
2314 * c-lang.h (enum c_string_type_values): Use unsigned as base
2316 * btrace.h (enum btrace_thread_flag): Use unsigned as base type.
2318 2018-10-03 Tom Tromey <tom@tromey.com>
2320 * dwarf2-frame.h (dwarf2_frame_state_reg_info)
2321 <~dwarf2_frame_state_reg_info>: Update.
2322 <dwarf2_frame_state_reg_info>: Update.
2323 <alloc_regs>: Add assertion. Update.
2324 <reg>: Now a std::vector.
2327 * dwarf2-frame.c (dwarf2_restore_rule, execute_cfa_program)
2328 (execute_cfa_program_test, dwarf2_frame_cache): Update.
2330 2018-10-03 Tom Tromey <tom@tromey.com>
2332 * namespace.c (add_using_directive): Don't pass NULL to memcpy.
2334 2018-10-03 Philippe Waroquiers <philippe.waroquiers@skynet.be>
2336 * tid-parse.c (tid_is_in_list): Fix wrong 'See' comment.
2338 2018-10-02 Tom Tromey <tom@tromey.com>
2340 * aarch64-linux-tdep.c (aarch64_linux_sigframe_init): Use pulongest.
2342 2018-10-02 John Darrington <john@darrington.wattle.id.au>
2344 * NEWS: Mention changed commands.
2345 * ser-uds.c: New file.
2346 * configure.ac (SER_HARDWIRE): Add ser-uds.o.
2347 * configure: Regenerate.
2348 * Makefile.in: Add new file.
2349 * serial.c (serial_open): Check if filename is a socket
2350 and lookup the appropriate interface accordingly.
2352 2018-10-01 Alan Hayward <alan.hayward@arm.com>
2354 * aarch64-linux-tdep.c (AARCH64_SIGCONTEXT_RESERVED_OFFSET): Add
2356 (AARCH64_EXTRA_MAGIC): Likewise.
2357 (AARCH64_FPSIMD_MAGIC): Likewise.
2358 (AARCH64_SVE_MAGIC): Likewise.
2359 (AARCH64_EXTRA_DATAP_OFFSET): Likewise.
2360 (AARCH64_FPSIMD_FPSR_OFFSET): Likewise.
2361 (AARCH64_FPSIMD_FPCR_OFFSET): Likewise.
2362 (AARCH64_FPSIMD_V0_OFFSET): Likewise.
2363 (AARCH64_FPSIMD_VREG_SIZE): Likewise.
2364 (AARCH64_SVE_CONTEXT_VL_OFFSET): Likewise.
2365 (AARCH64_SVE_CONTEXT_REGS_OFFSET): Likewise.
2366 (AARCH64_SVE_CONTEXT_P_REGS_OFFSET): Likewise.
2367 (AARCH64_SVE_CONTEXT_FFR_OFFSET): Likewise.
2368 (AARCH64_SVE_CONTEXT_SIZE): Likewise.
2369 (read_aarch64_ctx): Add function.
2370 (aarch64_linux_sigframe_init): Detect FP registers.
2372 2018-10-01 Alan Hayward <alan.hayward@arm.com>
2374 * aarch64-tdep.c (AARCH64_Q0_REGNUM): Move to here.
2375 (AARCH64_D0_REGNUM): Likewise.
2376 (AARCH64_S0_REGNUM): Likewise.
2377 (AARCH64_H0_REGNUM): Likewise.
2378 (AARCH64_B0_REGNUM): Likewise.
2379 (AARCH64_SVE_V0_REGNUM): Likewise.
2380 * arch/aarch64.h (AARCH64_Q0_REGNUM): Move from here.
2381 (AARCH64_D0_REGNUM): Likewise.
2382 (AARCH64_S0_REGNUM): Likewise.
2383 (AARCH64_H0_REGNUM): Likewise.
2384 (AARCH64_B0_REGNUM): Likewise.
2385 (AARCH64_SVE_V0_REGNUM): Likewise.
2387 2018-10-01 Gary Benson <gbenson@redhat.com>
2389 * gdb_proc_service.h (gdb_prfpregset_t): Remove typedef.
2390 * proc-service.c (ps_lgetfpregs, ps_lsetfpregs): Use
2391 prfpregset_t instead of gdb_prfpregset_t.
2392 * configure.ac (PRFPREGSET_T_BROKEN): Remove check.
2393 * configure, config.in: Rebuild.
2395 2018-10-01 Gary Benson <gbenson@redhat.com>
2397 * common/gdb_proc_service.h: New file, factored out from...
2398 * gdb_proc_service.h: Moved common code to the above file.
2399 * Makefile.in (HFILES_NO_SRCDIR): Add the above new file.
2401 2018-10-01 Gary Benson <gbenson@redhat.com>
2403 * gdb_proc_service.h: Use elf_gregset_t if prgregset_t is
2404 undefined. Use elf_fpregset_t if prfpregset_t is undefined.
2406 2018-10-01 Gary Benson <gbenson@redhat.com>
2408 * configure.ac: Check if sys/procfs.h defines elf_fpregset_t.
2409 (AC_CHECK_HEADERS): Check for linux/elf.h.
2410 * configure, config.in: Rebuild.
2411 * gdb_proc_service.h: Include linux/elf.h if sys/procfs.h
2412 doesn't define elf_fpregset_t.
2414 2018-10-01 Gary Benson <gbenson@redhat.com>
2416 * gdb_proc_service.h: Whitespace change.
2418 2018-10-01 Tom Tromey <tom@tromey.com>
2420 * unittests/scoped_mmap-selftests.c: Don't check HAVE_UNISTD_H.
2421 * unittests/scoped_fd-selftests.c: Don't check HAVE_UNISTD_H.
2422 * common/scoped_fd.h: Don't check HAVE_UNISTD_H.
2424 2018-10-01 Tom Tromey <tom@tromey.com>
2426 * README: Minor change.
2428 2018-09-30 Pedro Alves <palves@redhat.com>
2430 * darwin-nat-info.c (darwin_debug_regions_recurse)
2431 (info_mach_exceptions_command): Remove unused local variables.
2432 * darwin-nat.c (darwin_decode_notify_message)
2433 (darwin_nat_target::resume, darwin_nat_target::mourn_inferior)
2434 (darwin_stop_inferior, darwin_setup_exceptions)
2435 (darwin_nat_target::kill, darwin_attach_pid, darwin_ptrace_him)
2436 (darwin_nat_target::attach, darwin_nat_target::detach)
2437 (darwin_read_write_inferior, darwin_read_dyld_info): Remove unused
2439 * i386-darwin-nat.c (i386_darwin_dr_set): Remove unused local
2442 2018-09-29 Tom Tromey <tom@tromey.com>
2444 * README: Remove some leftover text.
2446 2018-09-29 Tom Tromey <tom@tromey.com>
2448 * PROBLEMS: Rewrite.
2451 2018-09-28 John Baldwin <jhb@FreeBSD.org>
2453 * disasm-selftests.c (print_one_insn_test): Add bfd_arch_riscv to
2454 case with explicit breakpoint kind.
2455 * riscv-tdep.c (show_use_compressed_breakpoints): Remove
2456 'additional_info' and related logic.
2457 (riscv_debug_breakpoints): New variable.
2458 (riscv_breakpoint_kind_from_pc): Use the length of the existing
2459 instruction to determine the breakpoint kind.
2460 (_initialize_riscv_tdep): Add 'set/show debug riscv breakpoints'
2461 flag. Update description of 'set/show riscv
2462 use-compressed-breakpoints' flag.
2464 2018-09-28 Andrew Burgess <andrew.burgess@embecosm.com>
2466 (NEWS): Mention changes to frame related commands.
2467 * cli/cli-decode.c (add_cmd_suppress_notification): New function.
2468 (add_prefix_cmd_suppress_notification): New function.
2469 (add_com_suppress_notification): Call
2470 add_cmd_suppress_notification.
2471 * command.h (add_cmd_suppress_notification): Declare.
2472 (add_prefix_cmd_suppress_notification): Declare.
2473 * mi/mi-cmd-stack.c: Add 'safe-ctype.h' include.
2474 (parse_frame_specification): Moved from stack.c, with
2475 simplification to handle a single argument.
2476 (mi_cmd_stack_select_frame): Use parse_frame_specification, the
2477 switch to the selected frame. Add a header comment.
2478 * stack.c: Remove 'safe-ctype.h' include.
2479 (find_frame_for_function): Add declaration.
2480 (find_frame_for_address): New function.
2481 (parse_frame_specification): Moved into mi/mi-cmd-stack.c.
2482 (frame_selection_by_function_completer): New function.
2483 (info_frame_command): Rename to...
2484 (info_frame_command_core): ...this, and update parameter types.
2485 (select_frame_command): Rename to...
2486 (select_frame_command_core): ...this, and update parameter types.
2487 (frame_command): Rename to...
2488 (frame_command_core): ...this, and update parameter types.
2489 (class frame_command_helper): New class to wrap implementations of
2490 frame related sub-commands.
2491 (frame_apply_cmd_list): New static global.
2492 (frame_cmd_list): Make static.
2493 (select_frame_cmd_list): New global for sub-commands.
2494 (info_frame_cmd_list): New global for sub-commands.
2495 (_initialize_stack): Register sub-commands for 'frame',
2496 'select-frame', and 'info frame'. Update 'frame apply' commands
2497 to use frame_apply_cmd_list. Move function local static
2498 frame_apply_list to file static frame_apply_cmd_list for
2500 * stack.h (select_frame_command): Delete declarationn.
2501 (select_frame_for_mi): Declare new function.
2503 2018-09-26 Andrew Burgess <andrew.burgess@embecosm.com>
2505 * riscv-tdep.c (riscv_insn::decode): Decode c.lui.
2506 (riscv_scan_prologue): Split handling of AUIPC, LUI, ADD, ADDI,
2509 2018-09-26 Simon Marchi <simon.marchi@ericsson.com>
2511 * elf32-nds32.c (elf32_nds32_allocate_dynrelocs): Remove.
2513 2018-09-26 Tom Tromey <tom@tromey.com>
2515 * valops.c (auto_abandon): Remove dead code.
2517 2018-09-26 Tom Tromey <tom@tromey.com>
2519 * tui/tui-win.c (WIN_HEIGHT_USAGE): Remove extra ">"s.
2521 2018-09-24 Tom Tromey <tom@tromey.com>
2523 * common/pathstuff.c (get_standard_cache_dir): Make
2524 "xdg_cache_home" and "home" const.
2525 * top.c (init_history): Make "tmpenv" const.
2526 * main.c (get_init_files): Make "homedir" const.
2528 2018-09-23 Tom Tromey <tom@tromey.com>
2531 * python/py-param.c (get_set_value): Use gdbpy_handle_exception.
2533 2018-09-23 Tom Tromey <tom@tromey.com>
2535 * python/py-function.c (fnpy_call): Use gdbpy_handle_exception.
2536 * python/py-cmd.c (cmdpy_function): Use gdbpy_handle_exception.
2537 * python/python-internal.h (gdbpy_handle_exception): Declare.
2538 * python/py-utils.c (gdbpy_handle_exception): New function.
2540 2018-09-23 Tom Tromey <tom@tromey.com>
2543 * python/py-type.c (typy_template_argument): Check for negative
2546 2018-09-23 Tom Tromey <tom@tromey.com>
2549 * python/python.c (gdbpy_run_events): Do not ignore exceptions.
2551 2018-09-23 Tom Tromey <tom@tromey.com>
2554 * python/py-value.c (valpy_int): Allow conversion from pointer
2557 2018-09-23 Tom Tromey <tom@tromey.com>
2560 * python/py-value.c (valpy_int): Respect type sign.
2562 2018-09-23 Tom Tromey <tom@tromey.com>
2565 * python/py-value.c (valpy_float): Allow conversions from int or
2567 (valpy_int, valpy_long): Allow conversions from float.
2569 2018-09-23 Tom Tromey <tom@tromey.com>
2571 * ctf.c (ctf_start): Use gdb_fopen_cloexec.
2572 * common/scoped_mmap.c (mmap_file): Use gdb_open_cloexec.
2574 2018-09-23 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
2576 * amd64-sol2-tdep.c (amd64_sol2_sigtramp_p): Also recognize
2578 * i386-sol2-tdep.c (i386_sol2_sigtramp_p): Likewise.
2580 2018-08-02 Jon Turney <jon.turney@dronecode.org.uk>
2582 * windows-nat.c (windows_nat_target::wait): Remove a spurious
2583 target_terminal::ours().
2585 2018-09-23 Simon Marchi <simon.marchi@ericsson.com>
2587 * aarch64-linux-tdep.c (aarch64_linux_supply_sve_regset): Change type
2590 2018-09-21 Yacov Simhony <ysimhony@gmail.com>
2592 * breakpoint.c (update_inserted_breakpoint_locations): Remove
2593 redundant condition.
2595 2018-09-20 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
2597 * proc-utils.h (PROC_CTL_WORD_TYPE): Remove.
2599 * procfs.c: Don't check for PR_MODEL_NATIVE definition.
2600 * sparc-sol2-nat.c: Likewise. Remove Linux, __arch64__ references.
2601 * sol-thread.c (ps_pdmodel): Don't guard definition.
2603 * procfs.c: Fix formatting.
2605 * procfs.c (sysset_t_alloc): Remove.
2606 (create_procinfo): Use XNEW instead of sysset_t_alloc.
2607 (procfs_debug_inferior): Likewise.
2608 (procfs_set_exec_trap): Likewise.
2609 (proc_set_traced_sysentry): Don't allocate argp dynamically.
2610 (proc_set_traced_sysexit): Likewise.
2612 * procfs.c (create_procinfo): Use xsnprintf to fix ARI warning.
2613 (dead_procinfo): Likewise.
2614 (proc_warn): Likewise.
2615 (proc_error): Likewise.
2616 (proc_get_LDT_entry): Likewise.
2617 (do_attach): Likewise.
2618 (procfs_target::pid_to_str): Likewise.
2619 (iterate_over_mappings): Likewise.
2621 * procfs.c (create_procinfo): Fix ARI warning.
2622 (proc_get_status): Likewise.
2623 (proc_stop_process): Likewise.
2624 (proc_run_process): Likewise.
2625 (proc_kill): Likewise.
2626 (proc_get_LDT_entry): Likewise.
2627 (procfs_find_LDT_entry): Likewise.
2628 (proc_update_threads): Likewise.
2629 (proc_iterate_over_threads): Likewise.
2630 (do_attach): Likewise.
2631 (procfs_xfer_memory): Likewise.
2632 (invalidate_cache): Likewise.
2633 (procfs_target::resume): Likewise.
2634 (procfs_init_inferior): Likewise.
2635 (procfs_set_exec_trap): Likewise.
2636 (procfs_target::thread_alive): Likewise.
2637 (procfs_target::pid_to_exec_file): Likewise.
2638 (iterate_over_mappings): Likewise.
2639 (procfs_target::make_corefile_notes): Likewise.
2640 * sol-thread.c (sol_thread_target::thread_alive): Likewise.
2642 * procfs.c (procfs_find_LDT_entry): Silence ARI warning.
2643 (procfs_find_LDT_entry): Likewise.
2644 * sol-thread.c (ps_lgetLDT): Likewise.
2646 2018-09-20 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
2649 * procfs.c (procfs_target): Declare pid_to_exec_file.
2650 (procfs_target::pid_to_exec_file): New.
2652 2018-09-20 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
2654 * auxv.c (default_print_auxv_entry): Reflect AT_SUN_CAP_HW1
2656 Handle AT_SUN_EMULATOR, AT_SUN_BRANDNAME, AT_SUN_BRAND_AUX1,
2657 AT_SUN_BRAND_AUX2, AT_SUN_BRAND_AUX3, AT_SUN_CAP_HW2.
2659 2018-09-20 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
2661 * i386-v4-nat.c (regmap, supply_gregset, fill_gregset)
2662 (supply_fpregset, fill_fpregset): Move ...
2663 * i386-sol2-nat.c [PR_MODEL_NATIVE != PR_MODEL_LP64]: ... here.
2664 Remove HAVE_GREGSET_T, HAVE_FPREGET_T guards.
2665 Remove references to ioctl-based procfs.
2666 Include <sys/reg.h>.
2667 Remove PR_MODEL_NATIVE guards.
2668 * configure.nat <sol2, i386> (NATDEPFILES): Remove i386-v4-nat.o.
2669 * Makefile.in (ALLDEPFILES): Remove i386-v4-nat.c.
2671 2018-09-19 Xavier Roirand <roirand@adacore.com>
2674 * solib-darwin.c (darwin_get_dyld_bfd): New function.
2675 (darwin_solib_get_all_image_info_addr_at_init): Update call.
2676 (darwin_solib_create_inferior_hook): Handle unrelocated dyld.
2678 2018-09-19 John Baldwin <jhb@FreeBSD.org>
2680 * fbsd-tdep.c (fbsd_print_sockaddr_in): Style fix.
2681 (fbsd_print_sockaddr_in6): Likewise.
2683 2018-09-19 Richard Bunt <richard.bunt@arm.com>
2684 Chris January <chris.january@arm.com>
2686 * eval.c (skip_undetermined_arglist): Skip argument list helper.
2687 (evaluate_subexp_standard): Return a dummy type when
2688 honoring EVAL_SKIP in OP_VAR_VALUE and handle skipping in the
2689 OP_F77_UNDETERMINED_ARGLIST case.
2690 * expression.h (enum noside): Update comment.
2692 2018-09-19 George Vasick <george.vasick@oracle.com>
2694 * solib-svr4.c (svr4_same_1): Also handle amd64 ld.so.1.
2696 2018-09-19 Stefan Teleman <stefan.teleman@oracle.com>
2697 April Chin <april.chin@oracle.com>
2698 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
2700 * procfs.c (MAX_PROC_NAME_SIZE): Allow for 6-digit PID_MAX and
2702 (create_procinfo): Print pids in /proc without leading zeros.
2704 2018-09-18 Sandra Loosemore <sandra@codesourcery.com>
2706 * nios2-tdep.c (nios2_gcc_target_options): New.
2707 (nios2_gdb_arch_init): Install new hook.
2709 2018-09-18 Simon Marchi <simon.marchi@ericsson.com>
2711 * patches/0001-Fix-PR-gdb-23558-Use-system-s-getcwd-when-cross-comp.patch:
2713 * update-gnulib.sh: Apply patch.
2714 * configure: Re-generate.
2716 2018-09-18 John Baldwin <jhb@FreeBSD.org>
2718 * infcmd.c (_initialize_infcmd): Remove "running" from "info proc"
2719 description. Make "info proc" command descriptions more
2722 2018-09-18 John Baldwin <jhb@FreeBSD.org>
2724 * NEWS: Mention 'info proc files' command.
2726 2018-09-18 John Baldwin <jhb@FreeBSD.org>
2728 * fbsd-nat.c (fbsd_nat_target::info_proc): List open file
2729 descriptors for IP_FILES and IP_ALL.
2731 2018-09-18 John Baldwin <jhb@FreeBSD.org>
2733 * fbsd-tdep.c (KF_FLAGS, KF_OFFSET, KF_VNODE_TYPE, KF_SOCK_DOMAIN)
2734 (KF_SOCK_TYPE, KF_SOCK_PROTOCOL, KF_SA_LOCAL, KF_SA_PEER)
2735 (KINFO_FILE_TYPE_SOCKET, KINFO_FILE_TYPE_PIPE)
2736 (KINFO_FILE_TYPE_FIFO, KINFO_FILE_TYPE_KQUEUE)
2737 (KINFO_FILE_TYPE_CRYPTO, KINFO_FILE_TYPE_MQUEUE)
2738 (KINFO_FILE_TYPE_SHM, KINFO_FILE_TYPE_SEM, KINFO_FILE_TYPE_PTS)
2739 (KINFO_FILE_TYPE_PROCDESC, KINFO_FILE_FD_TYPE_ROOT)
2740 (KINFO_FILE_FD_TYPE_JAIL, KINFO_FILE_FD_TYPE_TRACE)
2741 (KINFO_FILE_FD_TYPE_CTTY, KINFO_FILE_FLAG_READ)
2742 (KINFO_FILE_FLAG_WRITE, KINFO_FILE_FLAG_APPEND)
2743 (KINFO_FILE_FLAG_ASYNC, KINFO_FILE_FLAG_FSYNC)
2744 (KINFO_FILE_FLAG_NONBLOCK, KINFO_FILE_FLAG_DIRECT)
2745 (KINFO_FILE_FLAG_HASLOCK, KINFO_FILE_FLAG_EXEC)
2746 (KINFO_FILE_VTYPE_VREG, KINFO_FILE_VTYPE_VDIR)
2747 (KINFO_FILE_VTYPE_VCHR, KINFO_FILE_VTYPE_VLNK)
2748 (KINFO_FILE_VTYPE_VSOCK, KINFO_FILE_VTYPE_VFIFO, FBSD_AF_UNIX)
2749 (FBSD_AF_INET, FBSD_AF_INET6, FBSD_SOCK_STREAM, FBSD_SOCK_DGRAM)
2750 (FBSD_SOCK_SEQPACKET, FBSD_IPPROTO_ICMP, FBSD_IPPROTO_TCP)
2751 (FBSD_IPPROTO_UDP, FBSD_IPPROTO_SCTP): New defines.
2752 (struct fbsd_sockaddr_in, struct fbsd_sockaddr_in6)
2753 (struct fbsd_sockaddr_un): New types.
2754 (fbsd_file_fd, fbsd_file_type, fbsd_file_flags, fbsd_ipproto)
2755 (fbsd_print_sockaddr_in, fbsd_print_sockaddr_in6)
2756 (fbsd_info_proc_files_header, fbsd_info_proc_files_entry)
2757 (fbsd_core_info_proc_files): New functions.
2758 (fbsd_core_info_proc): List open file descriptors for IP_FILES and
2760 * fbsd-tdep.h (fbsd_info_proc_files_header)
2761 (fbsd_info_proc_files_entry): New.
2763 2018-09-18 John Baldwin <jhb@FreeBSD.org>
2765 * defs.h (enum info_proc_what) [IP_FILES]: New value.
2766 * infcmd.c (info_proc_cmd_files): New function.
2767 (_initialize_infcmd): Register 'info proc files' command.
2769 2018-09-18 John Baldwin <jhb@FreeBSD.org>
2771 * gnulib/aclocal-m4-deps.mk: Re-generate.
2772 * gnulib/aclocal.m4: Re-generate.
2773 * gnulib/config.in: Re-generate.
2774 * gnulib/configure: Re-generate.
2775 * gnulib/import/Makefile.am: Re-generate.
2776 * gnulib/import/Makefile.in: Re-generate.
2777 * gnulib/import/m4/gnulib-cache.m4: Re-generate.
2778 * gnulib/import/m4/gnulib-comp.m4: Re-generate.
2779 * gnulib/import/arpa_inet.in.h: New file.
2780 * gnulib/import/inet_ntop.c: New file.
2781 * gnulib/import/m4/arpa_inet_h.m4: New file.
2782 * gnulib/import/m4/inet_ntop.m4: New file.
2783 * gnulib/import/m4/netinet_in_h.m4: New file.
2784 * gnulib/import/m4/socklen.m4: New file.
2785 * gnulib/import/m4/sockpfaf.m4: New file.
2786 * gnulib/import/m4/stdalign.m4: New file.
2787 * gnulib/import/m4/sys_uio_h.m4: New file.
2788 * gnulib/import/netinet_in.in.h: New file.
2789 * gnulib/import/stdalign.in.h: New file.
2790 * gnulib/import/sys_socket.c: New file.
2791 * gnulib/import/sys_socket.in.h: New file.
2792 * gnulib/import/sys_uio.in.h: New file.
2793 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add inet_ntop
2796 2018-09-18 John Baldwin <jhb@FreeBSD.org>
2798 * gnulib/aclocal-m4-deps.mk: New file.
2799 * gnulib/update-gnulib.sh: Generate "aclocal-m4-deps.mk"
2802 2018-09-18 John Baldwin <jhb@FreeBSD.org>
2804 * fbsd-tdep.c (fbsd_core_vnode_path): Use KF_PATH instead of
2807 2018-09-18 Tom Tromey <tom@tromey.com>
2809 * compile/compile-object-load.c (struct
2810 link_hash_table_cleanup_data): Add constructor and destructor.
2811 Use DISABLE_COPY_AND_ASSIGN.
2812 (~link_hash_table_cleanup_data): Rename from
2813 link_hash_table_free. Now a destructor.
2814 (copy_sections): Use gdb::unique_xmalloc_ptr. Remove cleanups.
2816 2018-09-18 Tom Tromey <tom@tromey.com>
2818 * compile/compile-object-run.c (do_module_cleanup): Use delete.
2819 * compile/compile-object-load.c (struct munmap_list): Move to
2821 (munmap_list::add): Rename from munmap_list_add; rewrite.
2822 (munmap_list::~munmap_list): Rename from munmap_list_free.
2823 (munmap_listp_free_cleanup): Remove.
2824 (compile_object_load): Update.
2825 * compile/compile-object-load.h (struct munmap_list): Move from
2826 compile-object-load.c. Rewrite.
2828 2018-09-18 Alan Hayward <alan.hayward@arm.com>
2830 * aarch64-tdep.c (pass_in_v): Use register size.
2831 (aarch64_extract_return_value): Likewise.
2832 (aarch64_store_return_value): Likewise.
2834 2018-09-18 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
2836 * utils.c (dump_core) [HAVE_SETRLIMIT]: Cast RLIM_INFINITY to
2839 2018-09-17 Philippe Waroquiers <philippe.waroquiers@skynet.be>
2841 * python/lib/gdb/command/frame_filters.py (EnableFrameFilter):
2842 Fix short help line.
2844 2018-09-17 Tom Tromey <tom@tromey.com>
2847 * configure: Rebuild.
2848 * configure.ac: Conditionally use -DNDEBUG for Python.
2850 2018-09-17 Tom Tromey <tom@tromey.com>
2852 * configure: Rebuild.
2853 * configure.ac: Use gmp as a library dependency when checking for
2856 2018-09-17 Pedro Alves <palves@redhat.com>
2858 * python/py-inferior.c (find_inferior_object): Delete.
2860 2018-09-17 Simon Marchi <simon.marchi@ericsson.com>
2862 * compile/compile-cplus-types.c
2863 (compile_cplus_instance::enter_scope): Don't use new_scope after
2866 2018-09-17 Tom Tromey <tom@tromey.com>
2868 * common/pathstuff.c (get_standard_cache_dir): Use
2869 ~/Library/Caches on macOS.
2870 * common/pathstuff.h (get_standard_cache_dir): Update comment.
2872 2018-09-17 Simon Marchi <simon.marchi@polymtl.ca>
2875 * breakpoint.c (commands_cmd_element): New.
2876 (_initialize_breakpoint): Assign commands_cmd_element.
2877 * breakpoint.h (commands_cmd_element): New.
2878 * cli/cli-script.c (while_cmd_element, if_command,
2879 define_cmd_element): New.
2880 (command_name_equals): Remove.
2881 (process_next_line): Compare commands by pointer, not by name.
2882 (_initialize_cli_script): Assign the various cmd_list_element
2884 * compile/compile.c (compile_cmd_element): New.
2885 (_initialize_compile): Assign compile_cmd_element.
2886 * compile/compile.h (compile_cmd_element): New.
2887 * guile/guile.c (guile_cmd_element): New.
2888 (install_gdb_commands): Assign guile_cmd_element.
2889 * guile/guile.h (guile_cmd_element): New.
2890 * python/python.c (python_cmd_element): New.
2891 (_initialize_python): Assign python_cmd_element.
2892 * python/python.h (python_cmd_element): New.
2893 * tracepoint.c (while_stepping_cmd_element): New.
2894 (_initialize_tracepoint): Assign while_stepping_cmd_element.
2895 * tracepoint.h (while_stepping_cmd_element): New.
2897 2018-09-17 Tom Tromey <tom@tromey.com>
2899 * infrun.c (save_infcall_suspend_state): Return
2900 infcall_suspend_state_up.
2901 (save_infcall_control_state): Return infcall_control_state_up.
2902 * inferior.h (save_infcall_suspend_state)
2903 (save_infcall_control_state): Declare later. Return unique
2906 2018-09-17 Tom Tromey <tom@tromey.com>
2908 * infrun.c (struct stop_context): Declare constructor,
2909 destructor, "changed" method.
2910 (stop_context::stop_context): Rename from save_stop_context.
2911 (stop_context::~stop_context): Rename from
2912 release_stop_context_cleanup.
2913 (normal_stop): Update.
2914 (stop_context::changed): Rename from stop_context_changed. Return
2917 2018-09-17 Tom Tromey <tom@tromey.com>
2919 * inferior.h (struct infcall_suspend_state_deleter): New.
2920 (infcall_suspend_state_up): New typedef.
2921 (struct infcall_control_state_deleter): New.
2922 (infcall_control_state_up): New typedef.
2923 (make_cleanup_restore_infcall_suspend_state)
2924 (make_cleanup_restore_infcall_control_state): Don't declare.
2925 * infcall.c (call_function_by_hand_dummy): Update.
2926 * infrun.c (do_restore_infcall_suspend_state_cleanup)
2927 (make_cleanup_restore_infcall_suspend_state): Remove.
2928 (do_restore_infcall_control_state_cleanup)
2929 (make_cleanup_restore_infcall_control_state): Remove.
2931 2018-09-17 Tom Tromey <tom@tromey.com>
2933 * gdbthread.h (struct thread_control_state): Add initializer.
2934 (class thread_info) <control>: Remove initializer.
2935 * inferior.h (struct inferior_control_state): Add initializer.
2936 (class inferior) <control>: Remove initializer.
2937 (exit_inferior_1): Update.
2938 * infrun.c (struct infcall_control_state): Add constructors.
2939 (save_infcall_control_state): Use new.
2940 (restore_infcall_control_state, discard_infcall_control_state):
2943 2018-09-17 Tom Tromey <tom@tromey.com>
2945 * infrun.c (struct infcall_suspend_state) <registers>: Now a
2947 <siginfo_data>: Now a unique_xmalloc_ptr.
2948 (save_infcall_suspend_state, restore_infcall_suspend_state)
2949 (discard_infcall_suspend_state)
2950 (get_infcall_suspend_state_regcache): Update.
2952 2018-09-17 Tom Tromey <tom@tromey.com>
2954 * gdbthread.h (struct thread_suspend_state): Add initializers.
2955 (class thread_info) <suspend>: Remove initializer.
2956 * infrun.c (struct infcall_suspend_state): Add initializers.
2957 (save_infcall_suspend_state): Use new.
2958 (discard_infcall_suspend_state): Use delete.
2960 2018-09-16 Tom Tromey <tom@tromey.com>
2962 * python/python-internal.h (CPYCHECKER_STEALS_REFERENCE_TO_ARG):
2964 * python/py-varobj.c (py_varobj_iter_ctor): Change pyiter to
2965 rvalue reference. Remove CPYCHECKER_STEALS_REFERENCE_TO_ARG.
2966 (py_varobj_iter_new): Likewise.
2967 (py_varobj_get_iterator): Use gdbpy_ref.
2969 2018-09-16 Tom Tromey <tom@tromey.com>
2971 * python/py-threadevent.c (py_get_event_thread): Simplify.
2972 * python/py-inferior.c (infpy_thread_from_thread_handle):
2973 Return immediately after calling thread_to_thread_object. Use
2975 (thread_to_thread_object): Set the exception on a NULL return.
2977 2018-09-16 Simon Marchi <simon.marchi@polymtl.ca>
2979 * Makefile.in (LIBGDB_OBS): Sort COMMON_OBS.
2981 2018-09-16 Tom Tromey <tom@tromey.com>
2983 * python/python-internal.h (CPYCHECKER_RETURNS_BORROWED_REF):
2986 2018-09-16 Tom Tromey <tom@tromey.com>
2988 * python/python-internal.h (thread_to_thread_object): Change
2990 * python/py-inferior.c (thread_to_thread_object): Return a new
2992 (infpy_thread_from_thread_handle): Update.
2993 * python/py-infthread.c (gdbpy_selected_thread): Update.
2994 * python/py-stopevent.c (create_stop_event_object): Update.
2995 * python/py-threadevent.c (py_get_event_thread): Return a new
2997 (py_get_event_thread): Update.
2998 * python/py-event.h (py_get_event_thread): Change return type.
2999 * python/py-continueevent.c (create_continue_event_object):
3002 2018-09-16 Tom Tromey <tom@tromey.com>
3004 * python/py-progspace.c (pspy_get_objfiles): Update.
3005 * python/python-internal.h (objfile_to_objfile_object): Change
3007 * python/py-newobjfileevent.c (create_new_objfile_event_object):
3009 * python/py-xmethods.c (gdbpy_get_matching_xmethod_workers):
3011 * python/python.c (gdbpy_get_current_objfile): Update.
3012 (gdbpy_objfiles): Update.
3013 * python/py-objfile.c (objfpy_get_owner, gdbpy_lookup_objfile):
3015 (objfile_to_objfile_object): Return a new reference.
3016 * python/py-symtab.c (stpy_get_objfile): Update.
3017 * python/py-prettyprint.c (find_pretty_printer_from_objfiles):
3020 2018-09-16 Tom Tromey <tom@tromey.com>
3022 * python/py-inferior.c (infpy_get_progspace): Update.
3023 * python/python-internal.h (pspace_to_pspace_object): Change
3025 * python/py-newobjfileevent.c
3026 (create_clear_objfiles_event_object): Update.
3027 * python/py-xmethods.c (gdbpy_get_matching_xmethod_workers):
3029 * python/python.c (gdbpy_get_current_progspace): Update.
3030 (gdbpy_progspaces): Update.
3031 * python/py-progspace.c (pspace_to_pspace_object): Return a new
3033 * python/py-objfile.c (objfpy_get_progspace): Update.
3034 * python/py-prettyprint.c (find_pretty_printer_from_progspace):
3037 2018-09-16 Tom Tromey <tom@tromey.com>
3039 * python/lib/gdb/__init__.py (current_progspace, objfiles)
3040 (solib_name, block_for_pc, find_pc_line): New functions.
3041 (execute_unwinders): Update.
3042 * python/py-block.c (gdbpy_block_for_pc): Remove.
3043 * python/py-inferior.c (infpy_get_progspace): New function.
3044 (inferior_object_getset) <progspace>: Add.
3045 * python/py-progspace.c (pspy_objfiles): Rewrite.
3046 (pspy_solib_name, pspy_block_for_pc)
3047 (pspy_find_pc_line, pspy_is_valid): New functions.
3048 (progspace_object_methods): Add entries for solib_name,
3049 block_for_pc, find_pc_line, is_valid.
3050 * python/python-internal.h (gdbpy_block_for_pc)
3051 (build_objfiles_list): Don't declare.
3052 * python/python.c: Don't include solib.h.
3053 (gdbpy_solib_name, gdbpy_find_pc_line)
3054 (gdbpy_get_current_progspace, build_objfiles_list)
3055 (gdbpy_objfiles): Remove.
3056 (GdbMethods) <current_progspace, objfiles, block_for_pc,
3057 solib_name, find_pc_line>: Remove entries.
3059 2018-09-16 Tom Tromey <tom@tromey.com>
3061 * top.c (new_ui_command): Use GNU style for metasyntactic
3063 * breakpoint.c (stopat_command): Use GNU style for metasyntactic
3065 * maint.c (maintenance_translate_address): Remove "<>" around
3067 * interps.c (interpreter_exec_cmd): Use GNU style for
3068 metasyntactic variables.
3069 * nto-procfs.c (nto_procfs_target_info): Use GNU style for
3070 metasyntactic variables.
3071 * tracepoint.c (tfind_range_command): Use GNU style for
3072 metasyntactic variables.
3073 (tfind_outside_command): Likewise.
3074 (_initialize_tracepoint): Likewise.
3075 * remote.c (extended_remote_target::create_inferior): Use GNU
3076 style for metasyntactic variables.
3077 * sparc64-tdep.c (adi_examine_command): Use GNU style for
3078 metasyntactic variables.
3079 (adi_assign_command): Likewise.
3081 2018-09-16 Tom Tromey <tom@tromey.com>
3083 * disasm.c (show_disassembler_options_sfunc): Use GNU style for
3084 metasyntactic variables. Print message if no disassembler options
3087 2018-09-15 Tom Tromey <tom@tromey.com>
3089 * infcmd.c (get_inferior_args): Return const char *.
3090 * inferior.h (get_inferior_args): Return type now const.
3091 * linux-tdep.c (linux_fill_prpsinfo): Update.
3092 * procfs.c (procfs_target::make_corefile_notes): Update.
3094 2018-09-07 Tom Tromey <tom@tromey.com>
3096 * python/python.c (execute_gdb_command): Call bpstat_do_actions
3099 2018-09-14 Sandra Loosemore <sandra@codesourcery.com>
3101 * nios2-tdep.c (nios2_type_align): New.
3102 (nios2_gdb_arch_init): Install type_align hook.
3104 2018-09-10 Andrew Burgess <andrew.burgess@embecosm.com>
3106 * eval.c (fake_method::fake_method): Call xzalloc directly for a
3107 type that is neither object file owned, nor gdbarch owned.
3108 * gdbtypes.c (get_type_gdbarch): Add an assert that returned
3109 gdbarch is non-NULL.
3110 (alloc_type_instance): Allocate non-objfile owned types on the
3112 (copy_type_recursive): Allocate TYPE_FIELDS and TYPE_RANGE_DATA
3113 using TYPE_ALLOC to ensure memory is allocated on the correct
3115 * gdbtypes.h (TYPE_ALLOC): Allocate space on either the objfile
3116 obstack, or the gdbarch obstack.
3117 (TYPE_ZALLOC): Rewrite using TYPE_ALLOC.
3119 2018-09-14 Tom Tromey <tom@tromey.com>
3121 * infcall.c (call_function_by_hand_dummy): Remove unnecessary
3124 2018-09-14 Tom Tromey <tom@tromey.com>
3126 * nat/fork-inferior.c (get_startup_shell): Remove "static".
3128 2018-09-13 Tom Tromey <tom@tromey.com>
3130 * python/py-inferior.c (infpy_thread_from_thread_handle): Now
3133 2018-09-13 Tom Tromey <tom@tromey.com>
3135 * exec.c (try_open_exec_file): Use std::string.
3137 2018-09-13 Tom Tromey <tom@tromey.com>
3139 * utils.h (gdb_bfd_errmsg): Return std::string.
3140 * exec.c (exec_file_attach): Update.
3141 * compile/compile-object-load.c (compile_object_load): Update.
3142 * utils.c (gdb_bfd_errmsg): Return std::string.
3144 2018-09-13 Tom Tromey <tom@tromey.com>
3146 * procfs.c (struct procinfo_deleter): New.
3147 (procinfo_up): New typedef.
3148 (do_destroy_procinfo_cleanup): Remove.
3149 (procfs_target::info_proc): Use procinfo_up. Remove cleanups.
3151 2018-09-13 Tom Tromey <tom@tromey.com>
3153 * source.c (add_path): Use gdb::unique_xmalloc_ptr.
3155 2018-09-13 Simon Marchi <simon.marchi@ericsson.com>
3156 2018-09-13 Tom Tromey <tom@tromey.com>
3158 * python/py-progspace.c (PSPY_REQUIRE_VALID): New macro.
3159 (pspy_get_objfiles): New function.
3160 (progspace_object_methods): New.
3161 (pspace_object_type): Add tp_methods callback.
3162 * python/python-internal.h (build_objfiles_list): New
3164 * python/python.c (build_objfiles_list): New function.
3165 (gdbpy_objfiles): Implement using build_objfiles_list.
3166 * NEWS: Mention the Progspace.objfiles method.
3168 2018-09-13 Simon Marchi <simon.marchi@ericsson.com>
3170 * python/py-inferior.c (infpy_get_progspace): New function.
3171 (inferior_object_getset): Add progspace property.
3172 * NEWS: Mention the new property.
3174 2018-09-13 Tom Tromey <tom@tromey.com>
3177 * rust-lang.c (rust_evaluate_subexp): Use field name, not "foo".
3179 2018-09-13 Tom Tromey <tom@tromey.com>
3182 * rust-lang.c (rust_enum_variant): Now static.
3183 (rust_empty_enum_p): New function.
3184 (rust_print_enum, rust_evaluate_subexp, rust_print_struct_def):
3187 2018-09-13 Simon Marchi <simon.marchi@ericsson.com>
3189 * python/py-inferior.c (infpy_repr): New.
3190 (inferior_object_type): Register infpy_repr.
3191 * python/py-objfile.c (objfpy_repr): New.
3192 (objfile_object_type): Register objfpy_repr.
3194 2018-09-12 John Baldwin <jhb@FreeBSD.org>
3196 * fbsd-nat.c (fbsd_nat_target::info_proc): Remove unused variable.
3198 2018-09-12 John Baldwin <jhb@FreeBSD.org>
3200 * aarch64-fbsd-tdep.h (AARCH64_FBSD_SIZEOF_GREGSET): Fix comment
3203 2018-09-12 Sergio Durigan Junior <sergiodj@redhat.com>
3205 * common/common-utils.c: Don't include '<sys/stat.h>'.
3206 (is_regular_file): Move to...
3207 * common/filestuff.c (is_regular_file): ... here.
3208 * common/common-utils.h (is_regular_file): Move to...
3209 * common/filestuff.h (is_regular_file): ... here.
3211 2018-09-12 Simon Marchi <simon.marchi@ericsson.com>
3213 * skip.c (debug_skip): New variable.
3214 (skiplist_entry::do_skip_file_p): Add debug output.
3215 (skiplist_entry::do_skip_gfile_p): Likewise.
3216 (skiplist_entry::skip_function_p): Likewise.
3217 (_initialize_step_skip): Create debug command.
3218 * NEWS: Mention set/show debug skip.
3220 2018-09-11 Xavier Roirand <roirand@adacore.com>
3222 * darwin-nat.c (should_disable_startup_with_shell):
3224 (darwin_nat_target::create_inferior): Add call.
3226 2018-09-11 Xavier Roirand <roirand@adacore.com>
3228 * darwin-nat.h (struct darwin_thread_info) <gdb_port,
3229 inf_port, msg_state>: Initialize.
3230 (struct darwin_thread_info) <signaled, single_step>: Change
3231 type and initialize.
3232 (struct darwin_thread_info) <event>: Initialize.
3234 2018-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
3238 * gnulib/import/m4/getcwd-path-max.m4: Add cross-compilation
3241 2018-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
3244 2018-08-29 Sergio Durigan Junior <sergiodj@redhat.com>
3248 * gnulib/aclocal.m4: Regenerate.
3249 * gnulib/config.in: Regenerate.
3250 * gnulib/configure: Regenerate.
3251 * gnulib/import/Makefile.am: Update.
3252 * gnulib/import/Makefile.in: Update.
3253 * gnulib/import/extra/snippet/_Noreturn.h: Rename to...
3254 * gnulib/import/_Noreturn.h: ... this.
3255 * gnulib/import/alloca.in.h: Update.
3256 * gnulib/import/extra/snippet/arg-nonnull.h: Rename to...
3257 * gnulib/import/arg-nonnull.h: ... this.
3258 * gnulib/import/assure.h: Update.
3259 * gnulib/import/at-func.c: Update.
3260 * gnulib/import/basename-lgpl.c: Update.
3261 * gnulib/import/extra/snippet/c++defs.h: Rename to...
3262 * gnulib/import/c++defs.h: ... this.
3263 * gnulib/import/canonicalize-lgpl.c: Update.
3264 * gnulib/import/cdefs.h: Update.
3265 * gnulib/import/chdir-long.c: Update.
3266 * gnulib/import/chdir-long.h: Update.
3267 * gnulib/import/cloexec.c: Update.
3268 * gnulib/import/cloexec.h: Update.
3269 * gnulib/import/close.c: Update.
3270 * gnulib/import/closedir.c: Update.
3271 * gnulib/import/config.charset: Update.
3272 * gnulib/import/dirent-private.h: Update.
3273 * gnulib/import/dirent.in.h: Update.
3274 * gnulib/import/dirfd.c: Update.
3275 * gnulib/import/dirname-lgpl.c: Update.
3276 * gnulib/import/dirname.h: Update.
3277 * gnulib/import/dosname.h: Update.
3278 * gnulib/import/dup-safer-flag.c: Update.
3279 * gnulib/import/dup-safer.c: Update.
3280 * gnulib/import/dup.c: Update.
3281 * gnulib/import/dup2.c: Update.
3282 * gnulib/import/errno.in.h: Update.
3283 * gnulib/import/error.c: Update.
3284 * gnulib/import/error.h: Update.
3285 * gnulib/import/exitfail.c: Update.
3286 * gnulib/import/exitfail.h: Update.
3287 * gnulib/import/extra/update-copyright: Update.
3288 * gnulib/import/fchdir.c: Update.
3289 * gnulib/import/fcntl.c: Update.
3290 * gnulib/import/fcntl.in.h: Update.
3291 * gnulib/import/fd-hook.c: Update.
3292 * gnulib/import/fd-hook.h: Update.
3293 * gnulib/import/fd-safer-flag.c: Update.
3294 * gnulib/import/fd-safer.c: Update.
3295 * gnulib/import/fdopendir.c: Update.
3296 * gnulib/import/filename.h: Update.
3297 * gnulib/import/filenamecat-lgpl.c: Update.
3298 * gnulib/import/filenamecat.h: Update.
3299 * gnulib/import/flexmember.h: Update.
3300 * gnulib/import/float+.h: Update.
3301 * gnulib/import/float.c: Update.
3302 * gnulib/import/float.in.h: Update.
3303 * gnulib/import/fnmatch.c: Update.
3304 * gnulib/import/fnmatch.in.h: Update.
3305 * gnulib/import/fnmatch_loop.c: Update.
3306 * gnulib/import/fpucw.h: Update.
3307 * gnulib/import/frexp.c: Update.
3308 * gnulib/import/frexpl.c: Update.
3309 * gnulib/import/fstat.c: Update.
3310 * gnulib/import/fstatat.c: Update.
3311 * gnulib/import/getcwd-lgpl.c: Update.
3312 * gnulib/import/getcwd.c: Update.
3313 * gnulib/import/getdtablesize.c: Update.
3314 * gnulib/import/getlogin_r.c: Update.
3315 * gnulib/import/getprogname.c: Update.
3316 * gnulib/import/getprogname.h: Update.
3317 * gnulib/import/gettext.h: Update.
3318 * gnulib/import/gettimeofday.c: Update.
3319 * gnulib/import/glob-libc.h: Update.
3320 * gnulib/import/glob.c: Update.
3321 * gnulib/import/glob.in.h: Update.
3322 * gnulib/import/glob_internal.h: Update.
3323 * gnulib/import/glob_pattern_p.c: Update.
3324 * gnulib/import/globfree.c: Update.
3325 * gnulib/import/hard-locale.c: Update.
3326 * gnulib/import/hard-locale.h: Update.
3327 * gnulib/import/intprops.h: Update.
3328 * gnulib/import/inttypes.in.h: Update.
3329 * gnulib/import/isnan.c: Update.
3330 * gnulib/import/isnand-nolibm.h: Update.
3331 * gnulib/import/isnand.c: Update.
3332 * gnulib/import/isnanl-nolibm.h: Update.
3333 * gnulib/import/isnanl.c: Update.
3334 * gnulib/import/itold.c: Update.
3335 * gnulib/import/libc-config.h: Update.
3336 * gnulib/import/limits.in.h: Update.
3337 * gnulib/import/localcharset.c: Update.
3338 * gnulib/import/localcharset.h: Update.
3339 * gnulib/import/localtime-buffer.c: Update.
3340 * gnulib/import/localtime-buffer.h: Update.
3341 * gnulib/import/lstat.c: Update.
3342 * gnulib/import/m4/00gnulib.m4: Update.
3343 * gnulib/import/m4/__inline.m4: Update.
3344 * gnulib/import/m4/absolute-header.m4: Update.
3345 * gnulib/import/m4/alloca.m4: Update.
3346 * gnulib/import/m4/builtin-expect.m4: Update.
3347 * gnulib/import/m4/canonicalize.m4: Update.
3348 * gnulib/import/m4/chdir-long.m4: Update.
3349 * gnulib/import/m4/close.m4: Update.
3350 * gnulib/import/m4/closedir.m4: Update.
3351 * gnulib/import/m4/configmake.m4: Update.
3352 * gnulib/import/m4/d-ino.m4: Update.
3353 * gnulib/import/m4/d-type.m4: Update.
3354 * gnulib/import/m4/dirent_h.m4: Update.
3355 * gnulib/import/m4/dirfd.m4: Update.
3356 * gnulib/import/m4/dirname.m4: Update.
3357 * gnulib/import/m4/double-slash-root.m4: Update.
3358 * gnulib/import/m4/dup.m4: Update.
3359 * gnulib/import/m4/dup2.m4: Update.
3360 * gnulib/import/m4/eealloc.m4: Update.
3361 * gnulib/import/m4/environ.m4: Update.
3362 * gnulib/import/m4/errno_h.m4: Update.
3363 * gnulib/import/m4/error.m4: Update.
3364 * gnulib/import/m4/exponentd.m4: Update.
3365 * gnulib/import/m4/exponentl.m4: Update.
3366 * gnulib/import/m4/extensions.m4: Update.
3367 * gnulib/import/m4/extern-inline.m4: Update.
3368 * gnulib/import/m4/fchdir.m4: Update.
3369 * gnulib/import/m4/fcntl-o.m4: Update.
3370 * gnulib/import/m4/fcntl.m4: Update.
3371 * gnulib/import/m4/fcntl_h.m4: Update.
3372 * gnulib/import/m4/fdopendir.m4: Update.
3373 * gnulib/import/m4/filenamecat.m4: Update.
3374 * gnulib/import/m4/flexmember.m4: Update.
3375 * gnulib/import/m4/float_h.m4: Update.
3376 * gnulib/import/m4/fnmatch.m4: Update.
3377 * gnulib/import/m4/fnmatch_h.m4: Update.
3378 * gnulib/import/m4/fpieee.m4: Update.
3379 * gnulib/import/m4/frexp.m4: Update.
3380 * gnulib/import/m4/frexpl.m4: Update.
3381 * gnulib/import/m4/fstat.m4: Update.
3382 * gnulib/import/m4/fstatat.m4: Update.
3383 * gnulib/import/m4/getcwd-abort-bug.m4: Update.
3384 * gnulib/import/m4/getcwd-path-max.m4: Update.
3385 * gnulib/import/m4/getcwd.m4: Update.
3386 * gnulib/import/m4/getdtablesize.m4: Update.
3387 * gnulib/import/m4/getlogin.m4: Update.
3388 * gnulib/import/m4/getlogin_r.m4: Update.
3389 * gnulib/import/m4/getpagesize.m4: Update.
3390 * gnulib/import/m4/getprogname.m4: Update.
3391 * gnulib/import/m4/gettimeofday.m4: Update.
3392 * gnulib/import/m4/glibc21.m4: Update.
3393 * gnulib/import/m4/glob.m4: Update.
3394 * gnulib/import/m4/glob_h.m4: Update.
3395 * gnulib/import/m4/gnulib-cache.m4: Update.
3396 * gnulib/import/m4/gnulib-common.m4: Update.
3397 * gnulib/import/m4/gnulib-comp.m4: Update.
3398 * gnulib/import/m4/gnulib-tool.m4: Update.
3399 * gnulib/import/m4/hard-locale.m4: Update.
3400 * gnulib/import/m4/include_next.m4: Update.
3401 * gnulib/import/m4/inttypes-pri.m4: Update.
3402 * gnulib/import/m4/inttypes.m4: Update.
3403 * gnulib/import/m4/isnand.m4: Update.
3404 * gnulib/import/m4/isnanl.m4: Update.
3405 * gnulib/import/m4/largefile.m4: Update.
3406 * gnulib/import/m4/limits-h.m4: Update.
3407 * gnulib/import/m4/localcharset.m4: Update.
3408 * gnulib/import/m4/locale-fr.m4: Update.
3409 * gnulib/import/m4/locale-ja.m4: Update.
3410 * gnulib/import/m4/locale-zh.m4: Update.
3411 * gnulib/import/m4/localtime-buffer.m4: Update.
3412 * gnulib/import/m4/longlong.m4: Update.
3413 * gnulib/import/m4/lstat.m4: Update.
3414 * gnulib/import/m4/malloc.m4: Update.
3415 * gnulib/import/m4/malloca.m4: Update.
3416 * gnulib/import/m4/math_h.m4: Update.
3417 * gnulib/import/m4/mbrtowc.m4: Update.
3418 * gnulib/import/m4/mbsinit.m4: Update.
3419 * gnulib/import/m4/mbsrtowcs.m4: Update.
3420 * gnulib/import/m4/mbstate_t.m4: Update.
3421 * gnulib/import/m4/memchr.m4: Update.
3422 * gnulib/import/m4/memmem.m4: Update.
3423 * gnulib/import/m4/mempcpy.m4: Update.
3424 * gnulib/import/m4/memrchr.m4: Update.
3425 * gnulib/import/m4/mkdir.m4: Update.
3426 * gnulib/import/m4/mkstemp.m4: Update.
3427 * gnulib/import/m4/mmap-anon.m4: Update.
3428 * gnulib/import/m4/mode_t.m4: Update.
3429 * gnulib/import/m4/msvc-inval.m4: Update.
3430 * gnulib/import/m4/msvc-nothrow.m4: Update.
3431 * gnulib/import/m4/multiarch.m4: Update.
3432 * gnulib/import/m4/nocrash.m4: Update.
3433 * gnulib/import/m4/off_t.m4: Update.
3434 * gnulib/import/m4/onceonly.m4: Update.
3435 * gnulib/import/m4/open-cloexec.m4: Update.
3436 * gnulib/import/m4/open.m4: Update.
3437 * gnulib/import/m4/openat.m4: Update.
3438 * gnulib/import/m4/opendir.m4: Update.
3439 * gnulib/import/m4/pathmax.m4: Update.
3440 * gnulib/import/m4/rawmemchr.m4: Update.
3441 * gnulib/import/m4/readdir.m4: Update.
3442 * gnulib/import/m4/readlink.m4: Update.
3443 * gnulib/import/m4/realloc.m4: Update.
3444 * gnulib/import/m4/rename.m4: Update.
3445 * gnulib/import/m4/rewinddir.m4: Update.
3446 * gnulib/import/m4/rmdir.m4: Update.
3447 * gnulib/import/m4/save-cwd.m4: Update.
3448 * gnulib/import/m4/secure_getenv.m4: Update.
3449 * gnulib/import/m4/setenv.m4: Update.
3450 * gnulib/import/m4/signal_h.m4: Update.
3451 * gnulib/import/m4/ssize_t.m4: Update.
3452 * gnulib/import/m4/stat-time.m4: Update.
3453 * gnulib/import/m4/stat.m4: Update.
3454 * gnulib/import/m4/std-gnu11.m4: Update.
3455 * gnulib/import/m4/stdbool.m4: Update.
3456 * gnulib/import/m4/stddef_h.m4: Update.
3457 * gnulib/import/m4/stdint.m4: Update.
3458 * gnulib/import/m4/stdio_h.m4: Update.
3459 * gnulib/import/m4/stdlib_h.m4: Update.
3460 * gnulib/import/m4/strchrnul.m4: Update.
3461 * gnulib/import/m4/strdup.m4: Update.
3462 * gnulib/import/m4/strerror.m4: Update.
3463 * gnulib/import/m4/string_h.m4: Update.
3464 * gnulib/import/m4/strstr.m4: Update.
3465 * gnulib/import/m4/strtok_r.m4: Update.
3466 * gnulib/import/m4/sys_socket_h.m4: Update.
3467 * gnulib/import/m4/sys_stat_h.m4: Update.
3468 * gnulib/import/m4/sys_time_h.m4: Update.
3469 * gnulib/import/m4/sys_types_h.m4: Update.
3470 * gnulib/import/m4/tempname.m4: Update.
3471 * gnulib/import/m4/time_h.m4: Update.
3472 * gnulib/import/m4/unistd-safer.m4: Update.
3473 * gnulib/import/m4/unistd_h.m4: Update.
3474 * gnulib/import/m4/warn-on-use.m4: Update.
3475 * gnulib/import/m4/wchar_h.m4: Update.
3476 * gnulib/import/m4/wchar_t.m4: Update.
3477 * gnulib/import/m4/wctype_h.m4: Update.
3478 * gnulib/import/m4/wint_t.m4: Update.
3479 * gnulib/import/malloc.c: Update.
3480 * gnulib/import/malloc/scratch_buffer.h: Update.
3481 * gnulib/import/malloc/scratch_buffer_grow.c: Update.
3482 * gnulib/import/malloc/scratch_buffer_grow_preserve.c: Update.
3483 * gnulib/import/malloc/scratch_buffer_set_array_size.c: Update.
3484 * gnulib/import/malloca.c: Update.
3485 * gnulib/import/malloca.h: Update.
3486 * gnulib/import/malloca.valgrind: Update.
3487 * gnulib/import/math.in.h: Update.
3488 * gnulib/import/mbrtowc.c: Update.
3489 * gnulib/import/mbsinit.c: Update.
3490 * gnulib/import/mbsrtowcs-impl.h: Update.
3491 * gnulib/import/mbsrtowcs-state.c: Update.
3492 * gnulib/import/mbsrtowcs.c: Update.
3493 * gnulib/import/memchr.c: Update.
3494 * gnulib/import/memmem.c: Update.
3495 * gnulib/import/mempcpy.c: Update.
3496 * gnulib/import/memrchr.c: Update.
3497 * gnulib/import/mkdir.c: Update.
3498 * gnulib/import/mkstemp.c: Update.
3499 * gnulib/import/msvc-inval.c: Update.
3500 * gnulib/import/msvc-inval.h: Update.
3501 * gnulib/import/msvc-nothrow.c: Update.
3502 * gnulib/import/msvc-nothrow.h: Update.
3503 * gnulib/import/open.c: Update.
3504 * gnulib/import/openat-die.c: Update.
3505 * gnulib/import/openat-priv.h: Update.
3506 * gnulib/import/openat-proc.c: Update.
3507 * gnulib/import/openat.c: Update.
3508 * gnulib/import/openat.h: Update.
3509 * gnulib/import/opendir.c: Update.
3510 * gnulib/import/pathmax.h: Update.
3511 * gnulib/import/pipe-safer.c: Update.
3512 * gnulib/import/rawmemchr.c: Update.
3513 * gnulib/import/readdir.c: Update.
3514 * gnulib/import/readlink.c: Update.
3515 * gnulib/import/realloc.c: Update.
3516 * gnulib/import/ref-add.sin: Update.
3517 * gnulib/import/ref-del.sin: Update.
3518 * gnulib/import/rename.c: Update.
3519 * gnulib/import/rewinddir.c: Update.
3520 * gnulib/import/rmdir.c: Update.
3521 * gnulib/import/same-inode.h: Update.
3522 * gnulib/import/save-cwd.c: Update.
3523 * gnulib/import/save-cwd.h: Update.
3524 * gnulib/import/scratch_buffer.h: Update.
3525 * gnulib/import/secure_getenv.c: Update.
3526 * gnulib/import/setenv.c: Update.
3527 * gnulib/import/signal.in.h: Update.
3528 * gnulib/import/stat-time.c: Update.
3529 * gnulib/import/stat-time.h: Update.
3530 * gnulib/import/stat-w32.c: Update.
3531 * gnulib/import/stat-w32.h: Update.
3532 * gnulib/import/stat.c: Update.
3533 * gnulib/import/stdbool.in.h: Update.
3534 * gnulib/import/stddef.in.h: Update.
3535 * gnulib/import/stdint.in.h: Update.
3536 * gnulib/import/stdio.in.h: Update.
3537 * gnulib/import/stdlib.in.h: Update.
3538 * gnulib/import/str-two-way.h: Update.
3539 * gnulib/import/strchrnul.c: Update.
3540 * gnulib/import/strdup.c: Update.
3541 * gnulib/import/streq.h: Update.
3542 * gnulib/import/strerror-override.c: Update.
3543 * gnulib/import/strerror-override.h: Update.
3544 * gnulib/import/strerror.c: Update.
3545 * gnulib/import/string.in.h: Update.
3546 * gnulib/import/stripslash.c: Update.
3547 * gnulib/import/strnlen1.c: Update.
3548 * gnulib/import/strnlen1.h: Update.
3549 * gnulib/import/strstr.c: Update.
3550 * gnulib/import/strtok_r.c: Update.
3551 * gnulib/import/sys_stat.in.h: Update.
3552 * gnulib/import/sys_time.in.h: Update.
3553 * gnulib/import/sys_types.in.h: Update.
3554 * gnulib/import/tempname.c: Update.
3555 * gnulib/import/tempname.h: Update.
3556 * gnulib/import/time.in.h: Update.
3557 * gnulib/import/unistd--.h: Update.
3558 * gnulib/import/unistd-safer.h: Update.
3559 * gnulib/import/unistd.in.h: Update.
3560 * gnulib/import/unsetenv.c: Update.
3561 * gnulib/import/verify.h: Update.
3562 * gnulib/import/extra/snippet/warn-on-use.h: Update.
3563 * gnulib/import/wchar.in.h: Update.
3564 * gnulib/import/wctype.in.h: Update.
3565 * gnulib/import/xalloc-oversized.h: Update.
3566 * gnulib/update-gnulib.sh (GNULIB_COMMIT_SHA1): Set to
3567 "53e2c179f26a890fa6685af4b6c1397ee370433b".
3569 2018-09-10 Simon Marchi <simon.marchi@ericsson.com>
3571 * record-btrace.c (get_thread_current_frame): Remove
3574 2018-09-10 Jerome Guitton <guitton@adacore.com>
3576 * ada-lang.c (ada_value_struct_elt): Call ada_to_fixed_type
3577 with check_tag to 1 if and only if the type is tagged and the
3578 component being searched cannot been found in the current
3579 view. Otherwise, always call ada_to_fixed_type with
3582 2018-09-10 Xavier Roirand <roirand@adacore.com>
3584 * ada-lang.c (ada_is_access_to_unconstrained_array): Remove static
3586 * ada-lang.h: add ada_is_access_to_unconstrained_array prototype.
3587 * ada-varobj.c (ada_varobj_get_number_of_children,
3588 ada_varobj_describe_child, ada_value_is_changeable_p): Cleanup code.
3590 2018-09-10 Xavier Roirand <roirand@adacore.com>
3592 * ada-valprint.c (ada_value_print): Use type instead of
3595 2018-09-10 Xavier Roirand <roirand@adacore.com>
3597 * ada-lang.c (ada_value_subscript): Handle case when parameter is
3598 an array of access to unconstrained array.
3600 2018-09-10 Xavier Roirand <roirand@adacore.com>
3602 * ada-lang.c (ada_is_access_to_unconstrained_array): New function.
3603 (ada_check_typedef): Use it.
3605 2018-09-10 Xavier Roirand <roirand@adacore.com>
3607 * ada-varobj.c (ada_varobj_describe_struct_child)
3608 (ada_varobj_describe_child): Handle union case like struct one.
3610 2018-09-10 Tom Tromey <tom@tromey.com>
3613 * python/python.c (_initialize_python): Make example in "python"
3614 help work in Python 3.
3616 2018-09-10 Eli Zaretskii <eliz@gnu.org>
3618 * Makefile.in (transformed_name): Use INSTALL_SCRIPT instead of
3619 INSTALL_PROGRAM to install gdb-add-index.sh. Don't append
3620 $(EXEEXT) to the script, as it is not a program.
3622 2018-09-09 Simon Marchi <simon.marchi@ericsson.com>
3624 * python/py-prettyprint.c (pretty_print_one_value): Return
3626 (print_string_repr): Adjust.
3627 (apply_varobj_pretty_printer): Return gdbpy_ref<>.
3628 * python/python-internal.h (apply_varobj_pretty_printer): Return
3630 * varobj.c (varobj_value_get_print_value): Adjust.
3632 2018-09-08 Tom Tromey <tom@tromey.com>
3635 * python/py-prettyprint.c (pretty_print_one_value): Check for
3638 2018-09-08 Joel Brobecker <brobecker@adacore.com>
3640 * ada-lang.c (resolve_subexp): Pass correct OPLEN in call to
3641 replace_operator_with_call.
3643 2018-09-08 Joel Brobecker <brobecker@adacore.com>
3645 * ada-lang.c (ada_value_cast): Remove unnecessary parentheses.
3647 2018-09-08 Joel Brobecker <brobecker@adacore.com>
3649 * ada-typeprint.c (print_range): Print the bounds using TYPE
3650 rather than its TYPE_TARGET_TYPE.
3652 2018-09-08 Joel Brobecker <brobecker@adacore.com>
3654 * ada-lang.c (ada_to_fixed_value): Minor reformatting in
3655 call to ada_to_fixed_value_create.
3657 2018-09-08 Jerome Guitton <guitton@adacore.com>
3659 * ada-lang.c (ada_decode): strip dot prefix in symbol name.
3661 2018-09-08 Joel Brobecker <brobecker@adacore.com>
3663 * ada-lang.c (ada_exception_sal): Replace gdb_assert calls
3666 2018-09-08 Joel Brobecker <brobecker@adacore.com>
3668 * ada-lang.c (ada_unhandled_exception_name_addr_from_raise):
3669 Move update of loop variable "fi".
3671 2018-09-08 Joel Brobecker <brobecker@adacore.com>
3673 * ada-lang.c (value_assign_to_component): In the case of
3674 big-endian targets, extract the bits of the given VAL
3675 using an src_offset of zero if container is not a scalar.
3677 2018-09-06 Simon Ser <contact@emersion.fr>
3680 * fbsd-nat.c (fbsd_nat_target::xfer_partial): Add support for
3681 TARGET_OBJECT_FREEBSD_VMMAP and TARGET_OBJECT_FREEBSD_PS_STRINGS.
3682 * fbsd-tdep.c (fbsd_make_note_desc): New.
3683 (fbsd_make_corefile_notes): Write NT_PROCSTAT_AUXV,
3684 NT_PROCSTAT_VMMAP and NT_PROCSTAT_PS_STRINGS notes.
3685 * target.h (enum target_object) Add FreeBSD-specific
3686 TARGET_OBJECT_FREEBSD_VMMAP and TARGET_OBJECT_FREEBSD_PS_STRINGS.
3688 2018-09-06 Simon Marchi <simon.marchi@ericsson.com>
3690 * compile/compile-c.h (generate_c_for_variable_locations):
3691 Change reference to pointer.
3692 * compile/compile-c-support.c (compile_program) <compute>:
3694 * compile/compile-c-symbols.c (generate_vla_size): Likewise.
3695 (generate_c_for_for_one_variable): Likewise
3696 (generate_c_for_variable_locations): Likewise
3697 * compile/compile-c-types.c (compile_c_instance::convert_type):
3699 * compile/compile-cplus-symbols.c (convert_one_symbol):
3700 std::move the scope passed to enter_scope.
3701 * compile/compile-cplus-types.c
3702 (compile_cplus_instance::enter_scope): Make parameter
3704 (compile_cplus_instance::new_scope): Change reference to
3706 (compile_cplus_instance::convert_type): Likewise
3707 (compile_cplus_convert_typedef): std::move the scope passed to
3709 (compile_cplus_convert_struct_or_union): Likewise.
3710 (compile_cplus_convert_enum): Likewise.
3711 (compile_cplus_convert_namespace): Likewise.
3712 * compile/compile-cplus.h (compile_cplus_instance)
3713 <enter_scope>: Make parameter rvalue-reference.
3714 * compile/compile-internal.h (compile_instance)
3715 <get_cached_type>: Likewise
3716 * compile/compile-loc2c.c (push): Likewise
3720 (print_label): Likewise
3721 (pushf_register_address): Likewise
3722 (pushf_register): Likewise
3723 (do_compile_dwarf_expr_to_c): Likewise
3724 (compile_dwarf_expr_to_c): Likewise
3725 (compile_dwarf_bounds_to_c): Likewise
3726 * compile/compile.c (compile_instance::get_cached_type):
3728 * compile/compile.h (compile_dwarf_expr_to_c): Likewise.
3729 (compile_dwarf_bounds_to_c): Likewise
3730 * dwarf2loc.c (locexpr_generate_c_location): Likewise.
3731 (dwarf2_compile_property_to_c): Likewise
3732 * dwarf2loc.h (dwarf2_compile_property_to_c): Likewise
3733 * symtab.h (struct symbol_computed_ops) <generate_c_location>:
3736 2018-09-06 Simon Marchi <simon.marchi@ericsson.com>
3738 * tui/tui-data.h (struct tui_win_element) <highlight>: Remove.
3739 * tui/tui-data.c (init_content_element): Don't initialize it.
3741 2018-09-06 Simon Marchi <simon.marchi@ericsson.com>
3743 * tui/tui-data.h (struct tui_win_info)
3744 <detail::opaque>: Remove.
3745 * tui/tui-data.c (init_win_info): Remove assignment.
3747 2018-09-05 Tom Tromey <tom@tromey.com>
3749 * warning.m4 (AM_GDB_WARNINGS): Add -Wformat when testing
3750 -Wformat-nonliteral.
3751 * target-float.c (host_float_ops<T>::to_string)
3752 (host_float_ops<T>::from_string): Use
3753 DIAGNOSTIC_IGNORE_FORMAT_NONLITERAL.
3754 * configure: Rebuild.
3756 2018-09-05 Simon Marchi <simon.marchi@ericsson.com>
3758 * printcmd.c (printf_c_string): Use
3759 DIAGNOSTIC_IGNORE_FORMAT_NONLITERAL.
3760 (printf_wide_c_string, printf_pointer, ui_printf): Likewise.
3762 2018-09-05 Tom Tromey <tom@tromey.com>
3764 * cli/cli-cmds.c (shell_escape, edit_command): Remove cast.
3766 2018-09-05 Tom de Vries <tdevries@suse.de>
3768 * dwarf2loc.c (sect_variable_value): Call indirect_synthetic_pointer
3769 with resolve_abstract_p == true.
3770 (indirect_synthetic_pointer): Add resolve_abstract_p parameter,
3771 defaulting to false. Propagate resolve_abstract_p to
3772 dwarf2_fetch_die_loc_sect_off.
3773 * dwarf2loc.h (dwarf2_fetch_die_loc_sect_off): Add resolve_abstract_p
3774 parameter, defaulting to false.
3775 * dwarf2read.c (read_variable): Add variable to abstract_to_concrete.
3776 (dwarf2_fetch_die_loc_sect_off): Add and handle resolve_abstract_p
3778 * dwarf2read.h (struct die_info): Forward-declare.
3779 (die_info_ptr): New typedef.
3780 (struct dwarf2_per_objfile): Add abstract_to_concrete field.
3782 2018-09-05 Joel Brobecker <brobecker@adacore.com>
3786 2018-09-04 Sergio Durigan Junior <sergiodj@redhat.com>
3787 Pedro Alves <palves@redhat.com>
3789 * gnulib/Makefile.in (aclocal_m4_deps): Move to
3790 "aclocal-m4-deps.mk". Include file here.
3791 $(srcdir)/aclocal.m4: Add "configure.ac".
3792 * gnulib/aclocal-m4-deps.mk: New file.
3793 * gnulib/update-gnulib.sh: Automatically update
3794 "aclocal-m4-deps.mk".
3796 2018-09-04 Tom Tromey <tom@tromey.com>
3798 * configure: Rebuild.
3799 * configure.ac: Remove multi-ice code.
3801 2018-09-04 Tom Tromey <tom@tromey.com>
3803 * Makefile.in (GDB_WARN_CFLAGS_NO_DEFS): Remove.
3804 (ada-exp.o): Update.
3806 2018-09-04 Tom Tromey <tom@tromey.com>
3808 * Makefile.in (printcmd.o, target-float.o): Remove.
3809 (GDB_WARN_CFLAGS_NO_FORMAT): Remove.
3811 2018-09-04 Tom Tromey <tom@tromey.com>
3813 * gnulib/Makefile.in: Remove obsolete comment.
3814 * Makefile.in: Remove obsolete comment.
3816 2018-09-04 Andrew Burgess <andrew.burgess@embecosm.com>
3818 * riscv-tdep.c (riscv_frame_cache): Fix ARI warning, don't end a
3821 2018-09-03 Andrew Burgess <andrew.burgess@embecosm.com>
3823 * riscv-tdep.c: Add 'prologue-value.h' include.
3824 (struct riscv_unwind_cache): New struct.
3825 (riscv_debug_unwinder): New global.
3826 (riscv_scan_prologue): Update arguments, capture register details
3828 (riscv_skip_prologue): Reformat arguments line, move end of
3829 prologue calculation into riscv_scan_prologue.
3830 (riscv_frame_cache): Update return type, create
3831 riscv_unwind_cache, scan the prologue, and fill in remaining cache
3833 (riscv_frame_this_id): Use frame id computed in riscv_frame_cache.
3834 (riscv_frame_prev_register): Use the trad_frame within the
3836 (_initialize_riscv_tdep): Add 'set/show debug riscv unwinder'
3839 2018-09-03 Andrew Burgess <andrew.burgess@embecosm.com>
3841 * trad-frame.h (trad_frame_set_realreg): Declare.
3842 (trad_frame_set_addr): Declare.
3843 * trad-frame.c (trad_frame_set_realreg): Define new function.
3844 (trad_frame_set_addr): Define new function.
3845 (trad_frame_set_reg_realreg): Use new function.
3846 (trad_frame_set_reg_addr): Use new function.
3848 2018-09-01 Keith Seitz <keiths@redhat.com>
3850 * compile/compile-cplus-types.c (compile_cplus_debug_output_1): Use
3851 pulongest instead of "%lld".
3852 * compile/compile-cplus-symbols.c (gcc_cplus_convert_symbol): Remove
3855 2018-08-31 Tom Tromey <tom@tromey.com>
3857 * dwarf2read.c (dwarf2_add_field): Set the TYPE_LENGTH of the
3860 2018-08-31 Pedro Alves <palves@redhat.com>
3862 * gdbarch.h: Regenerate.
3864 2018-08-31 Pedro Alves <palves@redhat.com>
3866 * gdbarch.sh (have_nonsteppable_watchpoint): Add comment.
3867 * target.h (Hardware watchpoint interfaces): Describe
3868 continuable/steppable/non-steppable watchpoints.
3869 * gdbarch.h, gdbarch.c: Regenerate.
3871 2018-08-31 Pedro Alves <palves@redhat.com>
3873 * nto-procfs.c (nto_procfs_target::have_continuable_watchpoint):
3876 (s390_linux_nat_target::have_continuable_watchpoint): Delete.
3877 * target.h (target_ops::have_continuable_watchpoint): Delete.
3878 (target_have_continuable_watchpoint): Delete.
3879 * x86-nat.h (x86_nat_target::have_continuable_watchpoint): Delete.
3880 * target-delegates.c: Regenerate.
3882 2018-08-31 Sergio Durigan Junior <sergiodj@redhat.com>
3884 * gnulib/Makefile.in (aclocal_m4_deps): Update according to
3885 the files present in "gnulib/import/m4/".
3887 2018-08-30 Andrew Burgess <andrew.burgess@embecosm.com>
3889 * riscv-tdep.c (riscv_insn::decode): Decode c.addi4spn, c.sd,
3890 c.sw, c.swsp, and c.sdsp.
3892 2018-08-30 Andrew Burgess <andrew.burgess@embecosm.com>
3894 * riscv-tdep.c (struct riscv_inferior_data): Delete.
3895 (riscv_read_misa_reg): Don't cache value read into inferior data.
3896 (riscv_new_inferior_data): Delete.
3897 (riscv_inferior_data_cleanup): Delete.
3898 (riscv_inferior_data): Delete.
3899 (riscv_invalidate_inferior_data): Delete.
3900 (_initialize_riscv_tdep): Remove initialisation of inferior data.
3902 2018-08-30 Simon Marchi <simon.marchi@ericsson.com>
3904 * compile/compile-cplus-types.c
3905 (compile_cplus_instance::leave_scope): Take the address of scope
3907 (compile_cplus_instance::convert_qualified_base): Compare quals
3910 2018-08-30 Keith Seitz <keiths@redhat.com>
3912 * compile/compile-cplus-types.c (compile_cplus_instance::enter_scope):
3913 Use "%s" and host_address_to_string instead of "%p" in printf.
3915 2018-08-29 Keith Seitz <keiths@redhat.com>
3917 * Makefile.in (SUBDIR_GCC_COMPILE_SRCS): Add compile-cplus-symbols.c
3918 and compile-cplus-types.c.
3919 (HFILES_NO_SRCDIR): Add gcc-cp-plugin.h.
3920 * c-lang.c (cplus_language_defn): Set C++ compile functions.
3921 * c-lang.h (cplus_get_compile_context, cplus_compute_program):
3923 * compile/compile-c-support.c: Include compile-cplus.h.
3924 (load_libcompile): Templatize.
3925 (get_compile_context): "New" function.
3926 (c_get_compile_context): Use get_compile_context.
3927 (cplus_get_compile_context): New function.
3928 (cplus_push_user_expression, cplus_pop_user_expression)
3929 (cplus_add_code_header, cplus_add_input, cplus_compile_program)
3930 (cplus_compute_program): Define new structs/functions.
3931 * compile/compile-cplus-symmbols.c: New file.
3932 * compile/compile-cplus-types.c: New file.
3933 * compile/compile-cplus.h: New file.
3934 * compile/compile-internal.h (debug_compile_oracle, GCC_TYPE_NONE):
3936 * compile/compile-object-load.c (get_out_value_type): Use
3937 strncmp_iw when comparing symbol names.
3938 (compile_object_load): Add mst_bss and mst_data.
3939 * compile/compile.c (_initialize_compile): Remove
3940 -Wno-implicit-function-declaration from `compile_args'.
3941 * compile/gcc-cp-plugin.h: New file.
3942 * NEWS: Mention C++ compile support and new debug options.
3944 2018-08-29 Keith Seitz <keiths@redhat.com>
3946 * linespec.c (collect_info::add_symbol): Make virtual.
3947 (struct symbol_searcher_collect_info): New struct.
3948 (symbol_searcher::find_all_symbols): New method.
3949 * symtab.h (class symbol_searcher): New class.
3951 2018-08-29 Keith Seitz <keiths@redhat.com>
3953 * linespec.c (struct linespec) <function_symbols, label_symbols>:
3954 Change to vector of block_symbol. Update all users.
3955 (struct collect_info) <symbols>: Likewise.
3956 (collect_info::add_symbol): Take block_symbol as argument.
3958 (decode_compound_collector) <m_symbols>: Change type to vector
3959 of block_symbol. Update all users.
3960 (decode_compound_collector::operator ()): Change parameter type
3962 (find_method, find_function_symbols, find_linespec_symbols)
3963 (find_label_symbols_in_block, find_label_symbols): Change symbol
3964 vectors to block_symbol vectors.
3965 * symtab.h (symbol_found_callback_ftype): Change parameter type to
3968 2018-08-29 Keith Seitz <keiths@redhat.com>
3970 * linespec.c (symbolp): Remove typedef and VEC definitions.
3971 (bound_minimal_symbol_d): Likewise.
3973 2018-08-29 Keith Seitz <keiths@redhat.com>
3975 * linespec.c (decode_compound_collector::decode_compound_collector):
3976 Remove initialization for `m_symtabs'.
3977 (decode_compound_collector::release_symbols): Change return type
3978 to std::vector. Update all callers.
3979 (class decode_compound_collector) <m_symbols>: Change type to
3981 (lookup_prefix_sym): Change return type to std::vector. Update all
3983 (compare_symbols): Remove.
3984 (std_compare_symbols): Rename to `compare_symbols'.
3985 (find_method): Change `sym_classes' parameter to std::vector.
3986 Update all callers. Use std::sort to sort sym_classes.
3987 (find_linespec_symbols): Remove cleanup.
3989 2018-08-29 Keith Seitz <keiths@redhat.com>
3991 * linespec.c (struct linespec) <minimal_symbols>: Change type to
3992 std::vector. Update all users.
3993 (convert_linespec_to_sals): Use std::sort to sort minimal symbols.
3994 (struct collect_info) <minimal_symbols>: Likewise.
3995 (compare_msymbols): Return bool. Change parameters to const
3996 bound_minimal_symbol references.
3997 (find_method, find_function_symbols, find_linespec_symbols): Change
3998 `minsyms' parameter to std::vector. Update all callers.
4000 2018-08-29 Keith Seitz <keiths@redhat.com>
4002 * linespec.c (struct linespec) <label_symbols>: Change type to
4003 std::vector. Update all users.
4004 (find_label_symbols_in_block): Change `result' parameter to
4005 std::vector. Update all callers.
4006 (find_label_symbols): Return std::vector. Update all callers.
4008 2018-08-29 Keith Seitz <keiths@redhat.com>
4010 * linespec.c (struct linespec) <function_symbols>: Change type to
4011 std::vector. Update all users.
4012 (struct collect_info) <function_symbols>: Likewise.
4013 (convert_linespec_to_sals): Use std::sort to sort function_symbols.
4014 (std_compare_symbols): New function.
4015 (find_method, find_function_symbols, find_linespec_symbols)
4016 (find_label_symbols_in_block): Change `symbols' parameter to
4017 std::vector. Update all callers.
4018 (find_label_symbols): Likewise for `function_symbols' and
4021 2018-08-29 Keith Seitz <keiths@redhat.com>
4023 * linespec.c (symtab_vector_up): Define.
4024 (struct linespec) <file_symtabs>: Change type to std::vector *.
4026 (struct collect_info) <file_symtabs>: Likewise.
4027 (collect_symtabs_from_filename): Return symtab_vector_up.
4029 (decode_objc): Remove cleanup.
4030 (symtab_collector::symtab_collector): Initialize `m_symtabs'.
4031 (symtab_collector::release_symtabs): Return symtab_vector_up.
4033 (class symtab_collector) <m_symtabs>: Change type to symtab_vector_up.
4035 (collect_symtabs_from_filename, symtabs_from_filename): Return
4036 symtab_vector_up. Update all callers.
4038 2018-08-29 Tom Tromey <tom@tromey.com>
4040 * csky-tdep.c (csky_analyze_prologue): Use
4041 core_addr_to_string_nz.
4043 2018-08-29 Tom Tromey <tom@tromey.com>
4045 * windows-nat.c (struct xlate_exception) <them>: Change type to
4047 (xlate): Fix formatting. Remove last entry.
4048 (struct xlate_exception, xlate): Comment out.
4049 (windows_nat_target::resume): Use ranged for.
4051 2018-08-29 Jim Wilson <jimw@sifive.com>
4053 * riscv-linux-nat.c: Include elf/common.h instead of elf.h.
4054 (riscv_linux_nat_target::fetch_registers): Use NT_FPREGSET instead
4056 (riscv_linux_nat_target::store_registers): Likewise.
4058 2018-08-29 Sergio Durigan Junior <sergiodj@redhat.com>
4062 * gnulib/aclocal.m4: Regenerate.
4063 * gnulib/config.in: Regenerate.
4064 * gnulib/configure: Regenerate.
4065 * gnulib/import/Makefile.am: Update.
4066 * gnulib/import/Makefile.in: Update.
4067 * gnulib/import/extra/snippet/_Noreturn.h: Rename to...
4068 * gnulib/import/_Noreturn.h: ... this.
4069 * gnulib/import/alloca.in.h: Update.
4070 * gnulib/import/extra/snippet/arg-nonnull.h: Rename to...
4071 * gnulib/import/arg-nonnull.h: ... this.
4072 * gnulib/import/assure.h: Update.
4073 * gnulib/import/at-func.c: Update.
4074 * gnulib/import/basename-lgpl.c: Update.
4075 * gnulib/import/extra/snippet/c++defs.h: Rename to...
4076 * gnulib/import/c++defs.h: ... this.
4077 * gnulib/import/canonicalize-lgpl.c: Update.
4078 * gnulib/import/cdefs.h: Update.
4079 * gnulib/import/chdir-long.c: Update.
4080 * gnulib/import/chdir-long.h: Update.
4081 * gnulib/import/cloexec.c: Update.
4082 * gnulib/import/cloexec.h: Update.
4083 * gnulib/import/close.c: Update.
4084 * gnulib/import/closedir.c: Update.
4085 * gnulib/import/config.charset: Update.
4086 * gnulib/import/dirent-private.h: Update.
4087 * gnulib/import/dirent.in.h: Update.
4088 * gnulib/import/dirfd.c: Update.
4089 * gnulib/import/dirname-lgpl.c: Update.
4090 * gnulib/import/dirname.h: Update.
4091 * gnulib/import/dosname.h: Update.
4092 * gnulib/import/dup-safer-flag.c: Update.
4093 * gnulib/import/dup-safer.c: Update.
4094 * gnulib/import/dup.c: Update.
4095 * gnulib/import/dup2.c: Update.
4096 * gnulib/import/errno.in.h: Update.
4097 * gnulib/import/error.c: Update.
4098 * gnulib/import/error.h: Update.
4099 * gnulib/import/exitfail.c: Update.
4100 * gnulib/import/exitfail.h: Update.
4101 * gnulib/import/extra/update-copyright: Update.
4102 * gnulib/import/fchdir.c: Update.
4103 * gnulib/import/fcntl.c: Update.
4104 * gnulib/import/fcntl.in.h: Update.
4105 * gnulib/import/fd-hook.c: Update.
4106 * gnulib/import/fd-hook.h: Update.
4107 * gnulib/import/fd-safer-flag.c: Update.
4108 * gnulib/import/fd-safer.c: Update.
4109 * gnulib/import/fdopendir.c: Update.
4110 * gnulib/import/filename.h: Update.
4111 * gnulib/import/filenamecat-lgpl.c: Update.
4112 * gnulib/import/filenamecat.h: Update.
4113 * gnulib/import/flexmember.h: Update.
4114 * gnulib/import/float+.h: Update.
4115 * gnulib/import/float.c: Update.
4116 * gnulib/import/float.in.h: Update.
4117 * gnulib/import/fnmatch.c: Update.
4118 * gnulib/import/fnmatch.in.h: Update.
4119 * gnulib/import/fnmatch_loop.c: Update.
4120 * gnulib/import/fpucw.h: Update.
4121 * gnulib/import/frexp.c: Update.
4122 * gnulib/import/frexpl.c: Update.
4123 * gnulib/import/fstat.c: Update.
4124 * gnulib/import/fstatat.c: Update.
4125 * gnulib/import/getcwd-lgpl.c: Update.
4126 * gnulib/import/getcwd.c: Update.
4127 * gnulib/import/getdtablesize.c: Update.
4128 * gnulib/import/getlogin_r.c: Update.
4129 * gnulib/import/getprogname.c: Update.
4130 * gnulib/import/getprogname.h: Update.
4131 * gnulib/import/gettext.h: Update.
4132 * gnulib/import/gettimeofday.c: Update.
4133 * gnulib/import/glob-libc.h: Update.
4134 * gnulib/import/glob.c: Update.
4135 * gnulib/import/glob.in.h: Update.
4136 * gnulib/import/glob_internal.h: Update.
4137 * gnulib/import/glob_pattern_p.c: Update.
4138 * gnulib/import/globfree.c: Update.
4139 * gnulib/import/hard-locale.c: Update.
4140 * gnulib/import/hard-locale.h: Update.
4141 * gnulib/import/intprops.h: Update.
4142 * gnulib/import/inttypes.in.h: Update.
4143 * gnulib/import/isnan.c: Update.
4144 * gnulib/import/isnand-nolibm.h: Update.
4145 * gnulib/import/isnand.c: Update.
4146 * gnulib/import/isnanl-nolibm.h: Update.
4147 * gnulib/import/isnanl.c: Update.
4148 * gnulib/import/itold.c: Update.
4149 * gnulib/import/libc-config.h: Update.
4150 * gnulib/import/limits.in.h: Update.
4151 * gnulib/import/localcharset.c: Update.
4152 * gnulib/import/localcharset.h: Update.
4153 * gnulib/import/localtime-buffer.c: Update.
4154 * gnulib/import/localtime-buffer.h: Update.
4155 * gnulib/import/lstat.c: Update.
4156 * gnulib/import/m4/00gnulib.m4: Update.
4157 * gnulib/import/m4/__inline.m4: Update.
4158 * gnulib/import/m4/absolute-header.m4: Update.
4159 * gnulib/import/m4/alloca.m4: Update.
4160 * gnulib/import/m4/builtin-expect.m4: Update.
4161 * gnulib/import/m4/canonicalize.m4: Update.
4162 * gnulib/import/m4/chdir-long.m4: Update.
4163 * gnulib/import/m4/close.m4: Update.
4164 * gnulib/import/m4/closedir.m4: Update.
4165 * gnulib/import/m4/configmake.m4: Update.
4166 * gnulib/import/m4/d-ino.m4: Update.
4167 * gnulib/import/m4/d-type.m4: Update.
4168 * gnulib/import/m4/dirent_h.m4: Update.
4169 * gnulib/import/m4/dirfd.m4: Update.
4170 * gnulib/import/m4/dirname.m4: Update.
4171 * gnulib/import/m4/double-slash-root.m4: Update.
4172 * gnulib/import/m4/dup.m4: Update.
4173 * gnulib/import/m4/dup2.m4: Update.
4174 * gnulib/import/m4/eealloc.m4: Update.
4175 * gnulib/import/m4/environ.m4: Update.
4176 * gnulib/import/m4/errno_h.m4: Update.
4177 * gnulib/import/m4/error.m4: Update.
4178 * gnulib/import/m4/exponentd.m4: Update.
4179 * gnulib/import/m4/exponentl.m4: Update.
4180 * gnulib/import/m4/extensions.m4: Update.
4181 * gnulib/import/m4/extern-inline.m4: Update.
4182 * gnulib/import/m4/fchdir.m4: Update.
4183 * gnulib/import/m4/fcntl-o.m4: Update.
4184 * gnulib/import/m4/fcntl.m4: Update.
4185 * gnulib/import/m4/fcntl_h.m4: Update.
4186 * gnulib/import/m4/fdopendir.m4: Update.
4187 * gnulib/import/m4/filenamecat.m4: Update.
4188 * gnulib/import/m4/flexmember.m4: Update.
4189 * gnulib/import/m4/float_h.m4: Update.
4190 * gnulib/import/m4/fnmatch.m4: Update.
4191 * gnulib/import/m4/fnmatch_h.m4: Update.
4192 * gnulib/import/m4/fpieee.m4: Update.
4193 * gnulib/import/m4/frexp.m4: Update.
4194 * gnulib/import/m4/frexpl.m4: Update.
4195 * gnulib/import/m4/fstat.m4: Update.
4196 * gnulib/import/m4/fstatat.m4: Update.
4197 * gnulib/import/m4/getcwd-abort-bug.m4: Update.
4198 * gnulib/import/m4/getcwd-path-max.m4: Update.
4199 * gnulib/import/m4/getcwd.m4: Update.
4200 * gnulib/import/m4/getdtablesize.m4: Update.
4201 * gnulib/import/m4/getlogin.m4: Update.
4202 * gnulib/import/m4/getlogin_r.m4: Update.
4203 * gnulib/import/m4/getpagesize.m4: Update.
4204 * gnulib/import/m4/getprogname.m4: Update.
4205 * gnulib/import/m4/gettimeofday.m4: Update.
4206 * gnulib/import/m4/glibc21.m4: Update.
4207 * gnulib/import/m4/glob.m4: Update.
4208 * gnulib/import/m4/glob_h.m4: Update.
4209 * gnulib/import/m4/gnulib-cache.m4: Update.
4210 * gnulib/import/m4/gnulib-common.m4: Update.
4211 * gnulib/import/m4/gnulib-comp.m4: Update.
4212 * gnulib/import/m4/gnulib-tool.m4: Update.
4213 * gnulib/import/m4/hard-locale.m4: Update.
4214 * gnulib/import/m4/include_next.m4: Update.
4215 * gnulib/import/m4/inttypes-pri.m4: Update.
4216 * gnulib/import/m4/inttypes.m4: Update.
4217 * gnulib/import/m4/isnand.m4: Update.
4218 * gnulib/import/m4/isnanl.m4: Update.
4219 * gnulib/import/m4/largefile.m4: Update.
4220 * gnulib/import/m4/limits-h.m4: Update.
4221 * gnulib/import/m4/localcharset.m4: Update.
4222 * gnulib/import/m4/locale-fr.m4: Update.
4223 * gnulib/import/m4/locale-ja.m4: Update.
4224 * gnulib/import/m4/locale-zh.m4: Update.
4225 * gnulib/import/m4/localtime-buffer.m4: Update.
4226 * gnulib/import/m4/longlong.m4: Update.
4227 * gnulib/import/m4/lstat.m4: Update.
4228 * gnulib/import/m4/malloc.m4: Update.
4229 * gnulib/import/m4/malloca.m4: Update.
4230 * gnulib/import/m4/math_h.m4: Update.
4231 * gnulib/import/m4/mbrtowc.m4: Update.
4232 * gnulib/import/m4/mbsinit.m4: Update.
4233 * gnulib/import/m4/mbsrtowcs.m4: Update.
4234 * gnulib/import/m4/mbstate_t.m4: Update.
4235 * gnulib/import/m4/memchr.m4: Update.
4236 * gnulib/import/m4/memmem.m4: Update.
4237 * gnulib/import/m4/mempcpy.m4: Update.
4238 * gnulib/import/m4/memrchr.m4: Update.
4239 * gnulib/import/m4/mkdir.m4: Update.
4240 * gnulib/import/m4/mkstemp.m4: Update.
4241 * gnulib/import/m4/mmap-anon.m4: Update.
4242 * gnulib/import/m4/mode_t.m4: Update.
4243 * gnulib/import/m4/msvc-inval.m4: Update.
4244 * gnulib/import/m4/msvc-nothrow.m4: Update.
4245 * gnulib/import/m4/multiarch.m4: Update.
4246 * gnulib/import/m4/nocrash.m4: Update.
4247 * gnulib/import/m4/off_t.m4: Update.
4248 * gnulib/import/m4/onceonly.m4: Update.
4249 * gnulib/import/m4/open-cloexec.m4: Update.
4250 * gnulib/import/m4/open.m4: Update.
4251 * gnulib/import/m4/openat.m4: Update.
4252 * gnulib/import/m4/opendir.m4: Update.
4253 * gnulib/import/m4/pathmax.m4: Update.
4254 * gnulib/import/m4/rawmemchr.m4: Update.
4255 * gnulib/import/m4/readdir.m4: Update.
4256 * gnulib/import/m4/readlink.m4: Update.
4257 * gnulib/import/m4/realloc.m4: Update.
4258 * gnulib/import/m4/rename.m4: Update.
4259 * gnulib/import/m4/rewinddir.m4: Update.
4260 * gnulib/import/m4/rmdir.m4: Update.
4261 * gnulib/import/m4/save-cwd.m4: Update.
4262 * gnulib/import/m4/secure_getenv.m4: Update.
4263 * gnulib/import/m4/setenv.m4: Update.
4264 * gnulib/import/m4/signal_h.m4: Update.
4265 * gnulib/import/m4/ssize_t.m4: Update.
4266 * gnulib/import/m4/stat-time.m4: Update.
4267 * gnulib/import/m4/stat.m4: Update.
4268 * gnulib/import/m4/std-gnu11.m4: Update.
4269 * gnulib/import/m4/stdbool.m4: Update.
4270 * gnulib/import/m4/stddef_h.m4: Update.
4271 * gnulib/import/m4/stdint.m4: Update.
4272 * gnulib/import/m4/stdio_h.m4: Update.
4273 * gnulib/import/m4/stdlib_h.m4: Update.
4274 * gnulib/import/m4/strchrnul.m4: Update.
4275 * gnulib/import/m4/strdup.m4: Update.
4276 * gnulib/import/m4/strerror.m4: Update.
4277 * gnulib/import/m4/string_h.m4: Update.
4278 * gnulib/import/m4/strstr.m4: Update.
4279 * gnulib/import/m4/strtok_r.m4: Update.
4280 * gnulib/import/m4/sys_socket_h.m4: Update.
4281 * gnulib/import/m4/sys_stat_h.m4: Update.
4282 * gnulib/import/m4/sys_time_h.m4: Update.
4283 * gnulib/import/m4/sys_types_h.m4: Update.
4284 * gnulib/import/m4/tempname.m4: Update.
4285 * gnulib/import/m4/time_h.m4: Update.
4286 * gnulib/import/m4/unistd-safer.m4: Update.
4287 * gnulib/import/m4/unistd_h.m4: Update.
4288 * gnulib/import/m4/warn-on-use.m4: Update.
4289 * gnulib/import/m4/wchar_h.m4: Update.
4290 * gnulib/import/m4/wchar_t.m4: Update.
4291 * gnulib/import/m4/wctype_h.m4: Update.
4292 * gnulib/import/m4/wint_t.m4: Update.
4293 * gnulib/import/malloc.c: Update.
4294 * gnulib/import/malloc/scratch_buffer.h: Update.
4295 * gnulib/import/malloc/scratch_buffer_grow.c: Update.
4296 * gnulib/import/malloc/scratch_buffer_grow_preserve.c: Update.
4297 * gnulib/import/malloc/scratch_buffer_set_array_size.c: Update.
4298 * gnulib/import/malloca.c: Update.
4299 * gnulib/import/malloca.h: Update.
4300 * gnulib/import/malloca.valgrind: Update.
4301 * gnulib/import/math.in.h: Update.
4302 * gnulib/import/mbrtowc.c: Update.
4303 * gnulib/import/mbsinit.c: Update.
4304 * gnulib/import/mbsrtowcs-impl.h: Update.
4305 * gnulib/import/mbsrtowcs-state.c: Update.
4306 * gnulib/import/mbsrtowcs.c: Update.
4307 * gnulib/import/memchr.c: Update.
4308 * gnulib/import/memmem.c: Update.
4309 * gnulib/import/mempcpy.c: Update.
4310 * gnulib/import/memrchr.c: Update.
4311 * gnulib/import/mkdir.c: Update.
4312 * gnulib/import/mkstemp.c: Update.
4313 * gnulib/import/msvc-inval.c: Update.
4314 * gnulib/import/msvc-inval.h: Update.
4315 * gnulib/import/msvc-nothrow.c: Update.
4316 * gnulib/import/msvc-nothrow.h: Update.
4317 * gnulib/import/open.c: Update.
4318 * gnulib/import/openat-die.c: Update.
4319 * gnulib/import/openat-priv.h: Update.
4320 * gnulib/import/openat-proc.c: Update.
4321 * gnulib/import/openat.c: Update.
4322 * gnulib/import/openat.h: Update.
4323 * gnulib/import/opendir.c: Update.
4324 * gnulib/import/pathmax.h: Update.
4325 * gnulib/import/pipe-safer.c: Update.
4326 * gnulib/import/rawmemchr.c: Update.
4327 * gnulib/import/readdir.c: Update.
4328 * gnulib/import/readlink.c: Update.
4329 * gnulib/import/realloc.c: Update.
4330 * gnulib/import/ref-add.sin: Update.
4331 * gnulib/import/ref-del.sin: Update.
4332 * gnulib/import/rename.c: Update.
4333 * gnulib/import/rewinddir.c: Update.
4334 * gnulib/import/rmdir.c: Update.
4335 * gnulib/import/same-inode.h: Update.
4336 * gnulib/import/save-cwd.c: Update.
4337 * gnulib/import/save-cwd.h: Update.
4338 * gnulib/import/scratch_buffer.h: Update.
4339 * gnulib/import/secure_getenv.c: Update.
4340 * gnulib/import/setenv.c: Update.
4341 * gnulib/import/signal.in.h: Update.
4342 * gnulib/import/stat-time.c: Update.
4343 * gnulib/import/stat-time.h: Update.
4344 * gnulib/import/stat-w32.c: Update.
4345 * gnulib/import/stat-w32.h: Update.
4346 * gnulib/import/stat.c: Update.
4347 * gnulib/import/stdbool.in.h: Update.
4348 * gnulib/import/stddef.in.h: Update.
4349 * gnulib/import/stdint.in.h: Update.
4350 * gnulib/import/stdio.in.h: Update.
4351 * gnulib/import/stdlib.in.h: Update.
4352 * gnulib/import/str-two-way.h: Update.
4353 * gnulib/import/strchrnul.c: Update.
4354 * gnulib/import/strdup.c: Update.
4355 * gnulib/import/streq.h: Update.
4356 * gnulib/import/strerror-override.c: Update.
4357 * gnulib/import/strerror-override.h: Update.
4358 * gnulib/import/strerror.c: Update.
4359 * gnulib/import/string.in.h: Update.
4360 * gnulib/import/stripslash.c: Update.
4361 * gnulib/import/strnlen1.c: Update.
4362 * gnulib/import/strnlen1.h: Update.
4363 * gnulib/import/strstr.c: Update.
4364 * gnulib/import/strtok_r.c: Update.
4365 * gnulib/import/sys_stat.in.h: Update.
4366 * gnulib/import/sys_time.in.h: Update.
4367 * gnulib/import/sys_types.in.h: Update.
4368 * gnulib/import/tempname.c: Update.
4369 * gnulib/import/tempname.h: Update.
4370 * gnulib/import/time.in.h: Update.
4371 * gnulib/import/unistd--.h: Update.
4372 * gnulib/import/unistd-safer.h: Update.
4373 * gnulib/import/unistd.in.h: Update.
4374 * gnulib/import/unsetenv.c: Update.
4375 * gnulib/import/verify.h: Update.
4376 * gnulib/import/extra/snippet/warn-on-use.h: Update.
4377 * gnulib/import/wchar.in.h: Update.
4378 * gnulib/import/wctype.in.h: Update.
4379 * gnulib/import/xalloc-oversized.h: Update.
4380 * gnulib/update-gnulib.sh (GNULIB_COMMIT_SHA1): Set to
4381 "53e2c179f26a890fa6685af4b6c1397ee370433b".
4383 2018-08-16 Gary Benson <gbenson@redhat.com>
4386 * gdb/main.c (captured_main_1): Exit with nonzero status
4387 in batch mode if the last command to be executed failed.
4388 * NEWS: Mention the above.
4390 2018-08-29 Simon Marchi <simon.marchi@ericsson.com>
4392 * csky-tdep.c (csky_memory_insert_breakpoint): Remove newline at
4393 end of warning message.
4395 2018-08-29 Alan Hayward <alan.hayward@arm.com>
4398 * aarch64-tdep.c (is_hfa_or_hva): Remove function.
4399 (aarch64_extract_return_value): Use
4400 aapcs_is_vfp_call_or_return_candidate.
4401 (aarch64_return_in_memory): Likewise.
4402 (aarch64_store_return_value): Likewise.
4404 2018-08-29 Alan Hayward <alan.hayward@arm.com>
4407 (aapcs_is_vfp_call_or_return_candidate): Make static
4408 (pass_in_v_or_stack): Remove function.
4409 (pass_in_v_vfp_candidate): New function.
4410 (aarch64_push_dummy_call): Check for float register candidates.
4412 2018-08-29 Alan Hayward <alan.hayward@arm.com>
4414 * aarch64-tdep.c (HA_MAX_NUM_FLDS): New macro.
4415 (aapcs_is_vfp_call_or_return_candidate_1): New function.
4416 (aapcs_is_vfp_call_or_return_candidate): Likewise.
4418 2018-08-28 Simon Marchi <simon.marchi@polymtl.ca>
4421 * common/agent.c (IPA_SYM_STRUCT_NAME): Define.
4422 (struct ipa_sym_addresses): Rename to...
4423 (struct ipa_sym_addresses_common): ... this.
4424 * common/agent.h (IPA_SYM): Use IPA_SYM_STRUCT_NAME.
4426 2018-08-28 Tom Tromey <tom@tromey.com>
4428 * c-exp.y (struct token_and_value): Remove typedef and DEF_VEC.
4429 (token_fifo): Now a std::vector.
4430 (yylex, c_parse): Update.
4431 * d-exp.y (struct token_and_value): Remove typedef and DEF_VEC.
4432 (token_fifo): Now a std::vector.
4433 (yylex, d_parse): Update.
4434 * go-exp.y (struct token_and_value): Remove typedef and DEF_VEC.
4435 (token_fifo): Now a std::vector.
4436 (yylex, go_parse): Update.
4438 2018-08-28 Simon Marchi <simon.marchi@ericsson.com>
4440 * parser-defs.h (struct type_stack) <elements>: Change type to
4441 std::vector<union type_stack_elt>.
4442 <depth, size>: Remove.
4443 * parse.c (parse_exp_in_context_1): Adjust.
4444 (type_stack_reserve): Remove.
4445 (check_type_stack_depth): Remove.
4446 (insert_into_type_stack): Adjust to std::vector.
4447 (insert_type): Likewise.
4448 (push_type): Likewise.
4449 (push_type_int): Likewise.
4450 (insert_type_address_space): Likewise.
4451 (pop_type): Likewise.
4452 (pop_type_int): Likewise.
4453 (pop_typelist): Likewise.
4454 (pop_type_stack): Likewise.
4455 (append_type_stack): Likewise.
4456 (push_type_stack): Likewise.
4457 (get_type_stack): Likewise.
4458 (type_stack_cleanup): Likewise.
4459 (push_typelist): Likewise.
4460 (follow_types): Likewise.
4461 (_initialize_parse): Likewise.
4463 2018-08-28 Hafiz Abid Qadeer <abidh@codesourcery.com>
4465 * NEWS: Mention csky target.
4467 2018-08-28 Jiangshuai Li <jiangshuai_li@c-sky.com>
4468 Hafiz Abid Qadeer <abidh@codesourcery.com>
4469 Don Breazeal <donb@codesourcery.com>
4471 * csky-linux-tdep.c: New file.
4472 * csky-tdep.c: Likewise.
4473 * csky-tdep.h: Likewise.
4474 * Makefile.in (ALL_TARGET_OBS): Add csky-linux-tdep.o and
4476 (HFILES_NO_SRCDIR): Add csky-tdep.h.
4477 (ALLDEPFILES): Add csky-linux-tdep.c and csky-tdep.c
4478 * configure.tgt: Add csky support.
4480 2018-08-27 Jan Vrany <jan.vrany@fit.cvut.cz>
4482 * python/py-framefilter.c (py_print_frame): Print frame architecture
4483 when printing on an MI output.
4485 2018-08-27 Tom Tromey <tom@tromey.com>
4488 * configure: Rebuild.
4489 * warning.m4 (AM_GDB_WARNINGS): Remove -Wno-narrowing.
4491 2018-08-27 Tom Tromey <tom@tromey.com>
4493 * aarch64-linux-tdep.c
4494 (aarch64_linux_iterate_over_regset_sections) <sve_regmap>: Add
4497 2018-08-27 Tom Tromey <tom@tromey.com>
4499 * ppc64-tdep.c (insn_d, insn_ds, insn_xfx): Add casts to
4501 (ppc64_standard_linkage1, ppc64_standard_linkage2)
4502 (ppc64_standard_linkage3, ppc64_standard_linkage4)
4503 (ppc64_standard_linkage5, ppc64_standard_linkage6)
4504 (ppc64_standard_linkage7, ppc64_standard_linkage8): Add casts to
4507 2018-08-27 Tom Tromey <tom@tromey.com>
4509 * xtensa-tdep.h (XTREG_END): Add cast to unsigned.
4510 (XTENSA_GDBARCH_TDEP_INSTANTIATE): Likewise.
4512 2018-08-27 Tom Tromey <tom@tromey.com>
4514 * tramp-frame.h (TRAMP_SENTINEL_INSN): Redefine.
4515 * tilegx-linux-tdep.c (tilegx_linux_rt_sigframe): Use
4517 * tic6x-linux-tdep.c (tic6x_linux_rt_sigreturn_tramp_frame): Use
4519 * sparc64-linux-tdep.c (sparc64_linux_rt_sigframe): Use
4521 * sparc-linux-tdep.c (sparc32_linux_sigframe)
4522 (sparc32_linux_rt_sigframe): Use ULONGEST_MAX.
4523 * ppc-nbsd-tdep.c (ppcnbsd_sigtramp, ppcnbsd2_sigtramp): Use
4525 * ppc-linux-tdep.c (ppc32_linux_sigaction_tramp_frame)
4526 (ppc64_linux_sigaction_tramp_frame)
4527 (ppc32_linux_sighandler_tramp_frame)
4528 (ppc64_linux_sighandler_tramp_frame): Use ULONGEST_MAX.
4529 * nios2-linux-tdep.c (nios2_r1_linux_rt_sigreturn_tramp_frame)
4530 (nios2_r2_linux_rt_sigreturn_tramp_frame): Use ULONGEST_MAX.
4531 * mn10300-linux-tdep.c (am33_linux_sigframe)
4532 (am33_linux_rt_sigframe): Use ULONGEST_MAX.
4533 * mips64-obsd-tdep.c (mips64obsd_sigframe): Use ULONGEST_MAX.
4534 * mips-linux-tdep.c (mips_linux_o32_sigframe)
4535 (mips_linux_o32_rt_sigframe, mips_linux_n32_rt_sigframe)
4536 (mips_linux_n64_rt_sigframe, micromips_linux_o32_sigframe)
4537 (micromips_linux_o32_rt_sigframe, micromips_linux_n32_rt_sigframe)
4538 (micromips_linux_n64_rt_sigframe): Use ULONGEST_MAX.
4539 * mips-fbsd-tdep.c (mips_fbsd_sigframe, mipsn32_fbsd_sigframe)
4540 (mips64_fbsd_sigframe): Use ULONGEST_MAX.
4541 * microblaze-linux-tdep.c
4542 (microblaze_linux_sighandler_tramp_frame): Use ULONGEST_MAX.
4543 * i386-nbsd-tdep.c (i386nbsd_sigtramp_sc16, i386nbsd_sigtramp_sc2)
4544 (i386nbsd_sigtramp_si2, i386nbsd_sigtramp_si31)
4545 (i386nbsd_sigtramp_si4): Use ULONGEST_MAX.
4546 * hppa-nbsd-tdep.c (hppanbsd_sigtramp_si4): Use ULONGEST_MAX.
4547 * common/common-types.h (ULONGEST_MAX): New define.
4548 (CORE_ADDR_MAX): Fix formatting.
4549 * bfin-linux-tdep.c (bfin_linux_sigframe): Use ULONGEST_MAX.
4550 * arm-obsd-tdep.c (armobsd_sigframe): Use ULONGEST_MAX.
4551 * arm-linux-tdep.c (arm_linux_sigreturn_tramp_frame)
4552 (arm_linux_rt_sigreturn_tramp_frame)
4553 (arm_eabi_linux_sigreturn_tramp_frame)
4554 (arm_eabi_linux_rt_sigreturn_tramp_frame)
4555 (thumb2_eabi_linux_sigreturn_tramp_frame)
4556 (thumb2_eabi_linux_rt_sigreturn_tramp_frame)
4557 (arm_linux_restart_syscall_tramp_frame)
4558 (arm_kernel_linux_restart_syscall_tramp_frame): Use ULONGEST_MAX.
4559 * arm-fbsd-tdep.c (arm_fbsd_sigframe): Use ULONGEST_MAX.
4560 * aarch64-linux-tdep.c (aarch64_linux_rt_sigframe): Use
4562 * aarch64-fbsd-tdep.c (aarch64_fbsd_sigframe): Use ULONGEST_MAX.
4564 2018-08-27 Tom Tromey <tom@tromey.com>
4566 * rs6000-tdep.c (ppc_deal_with_atomic_sequence): Use
4568 * mips-tdep.c (mips_deal_with_atomic_sequence)
4569 (micromips_deal_with_atomic_sequence): Use CORE_ADDR_MAX.
4570 * arch/arm-get-next-pcs.c (thumb_deal_with_atomic_sequence_raw)
4571 (arm_deal_with_atomic_sequence_raw): Use CORE_ADDR_MAX.
4572 * alpha-tdep.c (alpha_deal_with_atomic_sequence): Use
4574 * aarch64-tdep.c (aarch64_software_single_step): Use
4577 2018-08-27 Tom Tromey <tom@tromey.com>
4579 * linespec.c (complete_linespec_component): Add cast to "char".
4580 * completer.c (completion_tracker::build_completion_result): Add
4583 2018-08-26 Simon Marchi <simon.marchi@polymtl.ca>
4585 * solist.h (struct solist, struct target_so_ops): Fix
4588 2018-08-26 Simon Marchi <simon.marchi@polymtl.ca>
4590 * ada-tasks.c (ada_task_info_s): Remove typedef.
4591 (DEF_VEC_O(ada_task_info_s)): Remove.
4592 (struct ada_tasks_inferior_data): Initialize fields.
4593 <task_list>: Make an std::vector.
4594 (get_ada_tasks_inferior_data): Allocate with new.
4595 (ada_get_task_number): Adjust.
4596 (get_task_number_from_id): Likewise.
4597 (valid_task_id): Likewise.
4598 (ada_get_task_info_from_ptid): Likewise.
4599 (iterate_over_live_ada_tasks): Likewise.
4600 (add_ada_task): Likewise.
4601 (read_known_tasks): Likewise.
4602 (ada_build_task_list): Likewise.
4603 (print_ada_task_info): Likewise.
4604 (info_task): Likewise.
4605 (task_command_1): Likewise.
4607 2018-08-26 Simon Marchi <simon.marchi@polymtl.ca>
4609 * ada-lang.c (add_angle_brackets): Return std::string.
4611 2018-08-25 Simon Marchi <simon.marchi@polymtl.ca>
4613 * python/py-threadevent.c (py_get_event_thread): Initialize
4616 2018-08-24 Pedro Alves <palves@redhat.com>
4618 * python/py-bpevent.c (create_breakpoint_event_object): Use
4619 copy-initialization.
4620 * python/py-continueevent.c (emit_continue_event): Use
4621 copy-initialization.
4622 * python/py-exitedevent.c (create_exited_event_object): Return a
4624 (emit_exited_event): Use copy-initialization.
4625 * python/py-inferior.c (python_new_inferior)
4626 (python_inferior_deleted, add_thread_object): Use
4627 copy-initialization.
4628 * python/py-infevents.c (create_inferior_call_event_object)
4629 (create_register_changed_event_object)
4630 (create_memory_changed_event_object): Return a gdbpy_ref<>.
4631 (emit_inferior_call_event, emit_memory_changed_event)
4632 (emit_register_changed_event): Use copy-initialization.
4633 * python/py-newobjfileevent.c (create_new_objfile_event_object):
4634 Return a gdbpy_ref<>.
4635 (emit_new_objfile_event): Use copy-initialization.
4636 (create_clear_objfiles_event_object): Return a gdbpy_ref<>.
4637 (emit_clear_objfiles_event): Use copy-initialization.
4638 * python/py-signalevent.c (create_signal_event_object): Use
4639 copy-initialization.
4640 * python/py-threadevent.c (create_thread_event_object): Use
4641 copy-initialization.
4643 2018-08-24 Pedro Alves <palves@redhat.com>
4644 Simon Marchi <simon.marchi@ericsson.com>
4647 * python/py-continueevent.c: Include "gdbthread.h".
4648 (create_continue_event_object): Add intro comment. Add 'ptid'
4649 parameter. Use it to find thread to pass to
4650 create_thread_event_object.
4651 (emit_continue_event): Pass PTID down to
4652 create_continue_event_object.
4653 * python/py-event.h (py_get_event_thread): Declare.
4654 (create_thread_event_object): Remove default from 'thread'
4656 * python/py-stopevent.c (create_stop_event_object): Use
4657 py_get_event_thread.
4658 * python/py-threadevent.c (get_event_thread): Rename to ...
4659 (py_get_event_thread): ... this, make extern, add 'ptid' parameter
4660 and use it to find the thread.
4661 (create_thread_event_object): Assert that THREAD isn't null.
4662 Don't find the event thread here.
4664 2018-08-23 Kevin Buettner <kevinb@redhat.com>
4666 * block.h (blockrange, blockranges): New struct declarations.
4667 (struct block): Add new field named `ranges'.
4668 (BLOCK_RANGES, BLOCK_NRANGES, BLOCK_RANGE, BLOCK_CONTIGUOUS_P)
4669 (BLOCK_RANGE_START, BLOCK_RANGE_END, BLOCK_ENTRY_PC): New
4670 macros for accessing ranges in struct block.
4671 (make_blockranges): New declaration.
4672 block.c (make_blockranges): New function.
4673 * dwarf2read.c (dwarf2_record_block_ranges): Fill in BLOCK_RANGES
4675 * symtab.h (find_pc_partial_function): Add new parameter `block'.
4676 * blockframe.c (cache_pc_function_block): New static global.
4677 (clear_pc_function_cache): Clear cache_pc_function_block.
4678 (find_pc_partial_function): Move comment to symtab.h. Add
4679 support for non-contiguous blocks.
4680 * cli/cli-cmds.c (block.h): Include.
4681 (print_disassembly): Handle printing of non-contiguous blocks.
4682 (disassemble_current_function): Likewise.
4683 (disassemble_command): Likewise.
4685 * ax-gdb.c (gen_var_ref): Use BLOCK_ENTRY_PC in place of
4687 * blockframe.c (get_pc_function_start): Likewise.
4688 * compile/compile-c-symbols.c (convert_one_symbol): Likewise.
4689 (gcc_symbol_address): Likewise.
4690 * compile/compile-object-run.c (compile_object_run): Likewise.
4691 * compile/compile.c (get_expr_block_and_pc): Likewise.
4692 * dwarf2loc.c (dwarf2_find_location_expression): Likewise.
4693 (func_addr_to_tail_call_list): Likewise.
4694 * findvar.c (default_read_var_value): Likewise.
4695 * inline-frame.c (inline_frame_this_id): Likewise.
4696 (skip-inline_frames): Likewise.
4697 * infcmd.c (until_next_command): Likewise.
4698 * linespec.c (convert_linespec_to_sals): Likewise.
4699 * parse.c (parse_exp_in_context_1): Likewise.
4700 * printcmd.c (build_address_symbolic): likewise.
4701 (info_address_command): Likewise.
4702 symtab.c (find_function_start_sal): Likewise.
4703 (skip_prologue_sal): Likewise.
4704 (find_function_alias_target): Likewise.
4705 (find_gnu_ifunc): Likewise.
4706 * stack.c (find_frame_funname): Likewise.
4707 * symtab.c (fixup_symbol_section): Likewise.
4708 (find_function_start_sal): Likewise.
4709 (skip_prologue_sal): Likewsie.
4710 (find_function_alias_target): Likewise.
4711 (find_gnu_ifunc): Likewise.
4712 * tracepoint.c (info_scope_command): Likewise.
4713 * value.c (value_fn_field): Likewise.
4715 * infrun.c (fill_in_stop_func): Use find_function_entry_range_from_pc
4716 in place of find_pc_partial_function.
4717 * blockframe.c (find_function_entry_range_from_pc): New function.
4718 * symtab.h (find_function_entry_range_from_pc): Declare and document.
4719 * objfiles.c (objfile_relocate1): Relocate start and end addresses
4720 for each range in a block.
4723 2018-08-23 Xavier Roirand <roirand@adacore.com>
4725 * machoread.c (macho_symfile_read_all_oso): Remove uneeded
4728 2018-08-22 Simon Marchi <simon.marchi@polymtl.ca>
4730 * solib-svr4.c (read_program_headers_from_bfd): Return
4731 gdb::optional<gdb::byte_vector>.
4732 (svr4_exec_displacement): Adjust.
4734 2018-08-22 Simon Marchi <simon.marchi@polymtl.ca>
4736 * solib-svr4.c (read_program_header): Return
4737 gdb::optional<gdb::byte_vector>, remove p_sect_size param.
4738 (find_program_interpreter): Return
4739 gdb::optional<gdb::byte_vector>.
4740 (scan_dyntag_auxv): Adjust.
4741 (enable_break): Adjust.
4742 (svr4_exec_displacement): Adjust.
4744 2018-08-22 Simon Marchi <simon.marchi@polymtl.ca>
4746 * inf-child.h (inf_child_target) <terminal_save_inferior>: New.
4747 * inf-child.c (inf_child_target::terminal_save_inferior): New.
4749 2018-08-22 Simon Marchi <simon.marchi@polymtl.ca>
4751 * guile/scm-string.c (gdbscm_scm_from_printf): Use
4753 * guile/scm-utils.c (gdbscm_printf): Likewise.
4754 * serial.c (serial_printf): Likewise.
4755 * xml-support.c (gdb_xml_parser::vdebug): Likewise.
4757 2018-08-22 Jan Vrany <jan.vrany@fit.cvut.cz>
4759 * stack.c (print_frame): Print frame architecture when printing on
4761 * NEWS: Mention new "arch" attribute in frame output.
4763 2018-08-21 Alan Hayward <alan.hayward@arm.com>
4765 * arch/aarch64.h (aarch64_regnum): Update comment.
4767 2018-08-21 Alan Hayward <alan.hayward@arm.com>
4769 * NEWS: Add SVE to 8.2 section.
4771 2018-08-21 Pedro Alves <palves@redhat.com>
4773 * guile/scm-utils.c (gdbscm_parse_function_args_1): New, factored
4774 out from gdbscm_parse_function_args.
4775 (gdbscm_parse_function_args): Rework to use gdbscm_wrap and
4776 gdbscm_parse_function_args_1.
4778 2018-08-21 Simon Marchi <simon.marchi@ericsson.com>
4781 * m32c-tdep.c (m32c_decode_srcdest4): Remove unnecessary ternary
4784 2018-08-19 Simon Marchi <simon.marchi@polymtl.ca>
4786 * solib-svr4.c (svr4_exec_displacement): Fix formatting.
4788 2018-08-19 Michael Spang <spang@google.com>
4791 * solib-svr4.c (svr4_exec_displacement): Ignore memsz fields
4792 for PT_TLS segments.
4794 2018-08-18 Kevin Buettner <kevinb@redhat.com>
4796 * dwarf2expr.h (struct dwarf_expr_context): Add virtual method
4797 dwarf_variable_value.
4798 * dwarf2-frame.c (class dwarf_expr_executor):
4799 Add override for dwarf_variable_value.
4800 * dwarf2loc.c (class dwarf_evaluate_loc_desc): Likewise.
4801 (class symbol_needs_eval_context): Likewise.
4802 (indirect_synthetic_pointer): Add forward declaration.
4803 (sect_variable_value): New function.
4804 (dwarf2_compile_expr_to_ax): Add case for DW_OP_GNU_variable_value.
4805 * dwarf2expr.c (dwarf_expr_context::execute_stack_op): Add case
4806 for DW_OP_GNU_variable_value.
4808 2018-08-16 Tom Tromey <tom@tromey.com>
4810 * top.c (read_command_file): Update.
4811 (command_line_input): Remove "repeat" argument.
4812 * ada-lang.c (get_selections): Update.
4813 * linespec.c (decode_line_2): Update.
4814 * defs.h (command_line_input): Remove argument.
4815 * cli/cli-script.c (read_next_line): Update.
4816 * python/py-gdb-readline.c: Update.
4818 2018-08-17 Tom Tromey <tom@tromey.com>
4820 * cli/cli-script.c (read_next_line): Pass 0 as repeat argument to
4823 2018-08-15 Tom Tromey <tom@tromey.com>
4825 * aarch64-linux-tdep.c (aarch64_linux_core_read_vq): Use pulongest.
4827 2018-08-14 Jan Vrany <jan.vrany@fit.cvut.cz>
4829 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Add -a option.
4830 If used, use find_pc_partial_function to find address range
4832 * mi/mi-main.c (mi_cmd_list_features): Report
4833 "data-disassemble-a-option" feature.
4834 * NEWS: Mention new -data-disassemble option -a.
4836 2018-08-13 Tom Tromey <tom@tromey.com>
4838 * common/common-defs.h (_FORTIFY_SOURCE): Define.
4840 2018-08-13 Alan Hayward <alan.hayward@arm.com>
4842 * aarch64-linux-tdep.c (aarch64_linux_supply_sve_regset): New function.
4843 (aarch64_linux_collect_sve_regset): Likewise.
4844 (aarch64_linux_iterate_over_regset_sections): Check for SVE.
4845 * regcache.h (regcache_map_entry_size): New function.
4847 2018-08-13 Alan Hayward <alan.hayward@arm.com>
4849 * aarch64-linux-tdep.c (SVE_HEADER_SIZE_LENGTH): Add define.
4850 (SVE_HEADER_MAX_SIZE_LENGTH): Likewise.
4851 (SVE_HEADER_VL_LENGTH): Likewise.
4852 (SVE_HEADER_MAX_VL_LENGTH): Likewise.
4853 (SVE_HEADER_FLAGS_LENGTH): Likewise.
4854 (SVE_HEADER_RESERVED_LENGTH): Likewise.
4855 (SVE_HEADER_SIZE_OFFSET): Likewise.
4856 (SVE_HEADER_MAX_SIZE_OFFSET): Likewise.
4857 (SVE_HEADER_VL_OFFSET): Likewise.
4858 (SVE_HEADER_MAX_VL_OFFSET): Likewise.
4859 (SVE_HEADER_FLAGS_OFFSET): Likewise.
4860 (SVE_HEADER_RESERVED_OFFSET): Likewise.
4861 (SVE_HEADER_SIZE): Likewise.
4862 (aarch64_linux_core_read_vq): Add function.
4863 (aarch64_linux_core_read_description): Check for SVE section.
4865 2018-08-13 Alan Hayward <alan.hayward@arm.com>
4867 * aarch64-fbsd-tdep.c
4868 (aarch64_fbsd_iterate_over_regset_sections): Add supply_size and
4870 * aarch64-linux-tdep.c
4871 (aarch64_linux_iterate_over_regset_sections): Likewise.
4872 * alpha-linux-tdep.c
4873 (alpha_linux_iterate_over_regset_sections):
4875 (alphanbsd_iterate_over_regset_sections): Likewise.
4877 (amd64fbsd_iterate_over_regset_sections): Likewise.
4878 * amd64-linux-tdep.c
4879 (amd64_linux_iterate_over_regset_sections): Likewise.
4881 (armbsd_iterate_over_regset_sections): Likewise.
4883 (arm_fbsd_iterate_over_regset_sections): Likewise.
4885 (arm_linux_iterate_over_regset_sections): Likewise.
4886 * corelow.c (get_core_registers_cb): Likewise.
4887 (core_target::fetch_registers): Likewise.
4888 * fbsd-tdep.c (fbsd_collect_regset_section_cb): Likewise.
4889 * frv-linux-tdep.c (frv_linux_iterate_over_regset_sections): Likewise.
4890 * gdbarch.h (void): Regenerate.
4891 * gdbarch.sh: Add supply_size and collect_size.
4892 * hppa-linux-tdep.c (hppa_linux_iterate_over_regset_sections): Likewise.
4893 * hppa-nbsd-tdep.c (hppanbsd_iterate_over_regset_sections): Likewise.
4894 * hppa-obsd-tdep.c (hppaobsd_iterate_over_regset_sections): Likewise.
4895 * i386-fbsd-tdep.c (i386fbsd_iterate_over_regset_sections): Likewise.
4896 * i386-linux-tdep.c (i386_linux_iterate_over_regset_sections): Likewise.
4897 * i386-tdep.c (i386_iterate_over_regset_sections): Likewise.
4898 * ia64-linux-tdep.c (ia64_linux_iterate_over_regset_sections): Likewise.
4899 * linux-tdep.c (linux_collect_regset_section_cb): Likewise.
4900 * m32r-linux-tdep.c (m32r_linux_iterate_over_regset_sections): Likewise.
4901 * m68k-bsd-tdep.c (m68kbsd_iterate_over_regset_sections): Likewise.
4902 * m68k-linux-tdep.c (m68k_linux_iterate_over_regset_sections): Likewise.
4903 * mips-fbsd-tdep.c (mips_fbsd_iterate_over_regset_sections): Likewise.
4904 * mips-linux-tdep.c (mips_linux_iterate_over_regset_sections): Likewise.
4905 * mips-nbsd-tdep.c (mipsnbsd_iterate_over_regset_sections): Likewise.
4906 * mips64-obsd-tdep.c (mips64obsd_iterate_over_regset_sections):
4908 * mn10300-linux-tdep.c (am33_iterate_over_regset_sections): Likewise.
4909 * nios2-linux-tdep.c (nios2_iterate_over_regset_sections): Likewise.
4910 * ppc-fbsd-tdep.c (ppcfbsd_iterate_over_regset_sections): Likewise.
4911 * ppc-linux-tdep.c (ppc_linux_iterate_over_regset_sections): Likewise.
4912 * ppc-nbsd-tdep.c (ppcnbsd_iterate_over_regset_sections): Likewise.
4913 * ppc-obsd-tdep.c (ppcobsd_iterate_over_regset_sections): Likewise.
4914 * riscv-linux-tdep.c (riscv_linux_iterate_over_regset_sections):
4916 * rs6000-aix-tdep.c (rs6000_aix_iterate_over_regset_sections): Likewise.
4917 * s390-linux-tdep.c (s390_iterate_over_regset_sections): Likewise.
4918 * score-tdep.c (score7_linux_iterate_over_regset_sections): Likewise.
4919 * sh-tdep.c (sh_iterate_over_regset_sections): Likewise.
4920 * sparc-tdep.c (sparc_iterate_over_regset_sections): Likewise.
4921 * tilegx-linux-tdep.c (tilegx_iterate_over_regset_sections): Likewise.
4922 * vax-tdep.c (vax_iterate_over_regset_sections): Likewise.
4923 * xtensa-tdep.c (xtensa_iterate_over_regset_sections): Likewise.
4925 2018-08-10 Simon Marchi <simon.marchi@ericsson.com>
4927 * nat/linux-osdata.c (commandline_from_pid): Replace xstrprintf
4930 2018-08-10 Keith Seitz <keiths@redhat.com>
4932 * compile/compile-c-support.c (add_code_header, add_code_footer):
4933 Move into policy class.
4934 (c_push_user_expression, pop_user_expression_nop)
4935 (c_add_code_header, c_add_code_footer, c_add_input): New policy class.
4936 (compile_program): New host class.
4937 (c_compile_program): New typedef.
4938 (c_compute_porgram): Use c_compile_program.
4940 2018-08-10 Keith Seitz <keiths@redhat.com>
4942 * compile/compile-internal.h (compile_instance::~compile_instance):
4943 Remove calls to htab_delete.
4944 <m_type_map, m_symbol_err_map>: Switch type to htab_up.
4945 * compile.c (compile_instance::compile_instance): Initialize
4946 htab unique pointers.
4947 (compile_instance::get_cached_type, compile_instance::insert_type)
4948 (compile_instance::error_symbol_once): Update for unique_ptr.
4950 2018-08-10 Keith Seitz <keiths@redhat.com>
4952 * compile/compile-c-symbols.c (struct symbol_error)
4953 (hash_symbol_error, eq_symbol_error, del_symbol_error)
4954 (compile_instance::insert_symbol_error)
4955 (compile_instance::error_symbol_once): Move to ...
4956 * compile/compile.c: ... here.
4958 2018-08-10 Keith Seitz <keiths@redhat.com>
4960 * compile/compile-c-support.c (c_get_compile_context): Use `new'
4961 instead of `new_compile_instance'.
4962 * compile/compile-c-symbols.c (compile_instance::insert_symbol_error):
4964 If the symbol error map is not initialized, create it.
4965 (generate_c_for_for_one_symbol): Do not check/initialize
4966 the symbol error map.
4967 * compile/compile-c-types.c (compile_c_instance): Make a class.
4969 (compile_instance::compile_instance): Initialize the type cache.
4970 (get_cached_type): New function.
4971 (insert_type): Update description.
4972 (compile_c_instance::m_default_cflags): Define.
4973 (convert_type): Update description. Use get_cached_type.
4974 (delete_instance): Moved to destructor.
4975 (new_compile_instance): Moved to constructor.
4976 * compile/compile-c.h (compile_c_instance): Make class inheriting
4977 from compile_instance.
4978 <base>: Remove field.
4979 <type_map, symbol_err_map>: Move to base class.
4980 <c_plugin>: Rename to `m_plugin' and remove pointer type.
4981 * compile/compile-internal.h (compile_instance): Make class.
4982 <type_map_t, symbol_err_map_t>: Define.
4983 <fe>: Rename to `m_gcc_fe'.
4984 <scope, block, gcc_target_options>: Add `m_' prefix.
4985 <m_type_map, m_symbol_err_map>: New fields, moved from
4988 (convert_type, new_compile_instance): Remove.
4989 * compile/compile.c (cleanup_compile_instance): Remove.
4990 (compile_to_object): Use unique_ptr to eliminate cleanups.
4991 (compile_instance::set_print_callback, compile_instance::version)
4992 (compile_instance::set_verbose)
4993 (compile_instance::set_driver_filename)
4994 (compile_instance::set_triplet_regexp)
4995 (compile_instance::set_arguments)
4996 (compile_instance::set_source_file)
4997 (compile_instance::compile): Define.
4999 2018-08-10 Keith Seitz <keiths@redhat.com>
5001 * Makefile.in (HFILES_NO_SRCDIR): Add compile/gcc-c-plugin.h.
5002 * compile/compile-c-types.c: Define GCC_METHODN macros and include
5003 gcc-c-fe.def to define C plugin.
5004 (delete_instance): Delete `c_plugin'.
5005 (new_compile_instance): Initialize `c_plugin'.
5006 * compile/compile-c.h: Include gcc_c_plugin.h.
5007 (struct compile_c_instance) <c_plugin>: New member.
5008 * gcc-c-plugin.h: New file.
5009 Update all callers with API change.
5011 2018-08-10 Keith Seitz <keiths@redhat.com>
5013 * Makefile.in (SUBDIR_GCC_COMPILE_SRCS): Move header files ...
5014 (HFILES_NO_SRCDIR): ... to here.
5015 Add compile-internal.h and compile-c.h.
5016 * compile/compile-c-support.c: Include compile-c.h.
5017 * compile/compile-c-symbols.c: Include compile-c.h.
5018 (generate_c_for_variable_locations): Update comment.
5019 * compile/compile-c-types.c: Include compile-c.h.
5020 * compile/compile-c.h: New file -- moved C language declarations
5021 from other files here.
5022 * compile/compile-internal.h: Do not include hashtab.h or
5023 common/enum-flags.h.
5024 (gcc_qualifiers_flags, struct compile_c_instance, C_CTX)
5025 (gcc_convert_symbol, gcc_symbol_address)
5026 (generate_c_for_variable_locations, c_get_mode_for_size)
5027 (c_get_range_decl_name): Definitions moved to compile-c.h.
5028 * compile/compile-loc2c.c: Include compile-c.h.
5030 2018-08-10 Keith Seitz <keiths@redhat.com>
5032 * compile/compile-c-symbols.c (symbol_substitution_name): Rename to ...
5033 (c_symbol_substitution_name): ... this.
5036 2018-08-10 Keith Seitz <keiths@redhat.com>
5038 * compile/compile-c-support.c (c_compute_program): Use
5039 unique_xmalloc_ptr to eliminate cleanup.
5040 * compile/compile-c-symbols.c (generate_c_for_variable_locations):
5041 Return a unique_xmalloc_ptr and eliminate cleanup.
5042 * compile/compile-internal.h (generate_c_for_variable_locations):
5043 Return unique_xmalloc_ptr and update description.
5045 2018-08-10 Alan Hayward <alan.hayward@arm.com>
5047 * corelow.c (core_target::get_core_register_section): Rename
5048 min_size to section_min_size.
5050 2018-08-09 Jim Wilson <jimw@sifive.com>
5052 * Makefile.in (ALL_TARGET_OBS): Add riscv-linux-tdep.c.
5053 (ALLDEPFILES): Add riscv-linux-nat.c, and riscv-linux-tdep.c.
5054 * NEWS: Mention new GNU/Linux RISC-V target.
5055 * configure.host: Add riscv*-*-linux*.
5056 * configure.nat: Add riscv*.
5057 * configure.tgt: Add riscv*-*-linux*.
5058 * riscv-linux-nat.c: New file.
5059 * riscv-linux-tdep.c: New file.
5061 2018-08-09 Andrew Burgess <andrew.burgess@embecosm.com>
5063 * infrun.c (resume): Make static, add forward declaration.
5064 (proceed): Update header comment.
5065 * infrun.h (resume): Delete declaration.
5067 2018-08-09 Tom Tromey <tom@tromey.com>
5069 * riscv-tdep.h: Minor formatting fixes.
5071 2018-08-09 Simon Marchi <simon.marchi@ericsson.com>
5073 * common/scoped_mmap.c (mmap_file): Silence ARI warning.
5074 * dwarf-index-cache.c (create_dir_and_check): Likewise.
5075 (test_mkdir_recursive): Likewise.
5076 * dwarf-index-write.c (write_psymtabs_to_index): Likewise.
5078 2018-08-09 Andrew Burgess <andrew.burgess@embecosm.com>
5080 * valarith.c (value_subscripted_rvalue): If an array is not in
5081 memory, and we don't know the upper bound, then we can't know that
5082 the requested element exists or not.
5084 2018-08-08 Simon Marchi <simon.marchi@ericsson.com>
5086 * target.c (str_comma_list_concat_elem): Fix typo in comment.
5087 (target_options_to_string): Add comment.
5089 2018-08-08 Tom Tromey <tom@tromey.com>
5091 * unittests/scoped_mmap-selftests.c: Check result of "write".
5093 2018-08-08 Jim Wilson <jimw@sifive.com>
5095 * riscv-tdep.c (enum opcode): Add jump, branch, lr, and sc opcodes.
5096 (decode_register_index_short): New.
5097 (decode_j_type_insn, decode_cj_type_insn): New.
5098 (decode_b_type_insn, decode_cb_type_insn): New.
5099 (riscv_insn::decode): Add support for jumps, branches, lr, and sc. New
5100 local xlen. Check xlen when decoding ambiguous compressed insns. In
5101 compressed decode, use is_c_lui_insn instead of is_lui_insn, and
5102 is_c_sw_insn instead of is_sw_insn.
5103 (riscv_next_pc, riscv_next_pc_atomic_sequence): New.
5104 (riscv_software_single_step): New.
5105 * riscv-tdep.h (riscv_software_single_step): Declare.
5107 * riscv-tdep.c (riscv_isa_xlen): Drop static.
5108 * riscv-tdep.h (riscv_isa_xlen): Add extern declaration.
5110 2018-08-08 Andrew Burgess <andrew.burgess@embecosm.com>
5113 * target.c (dispose_inferior): Don't dispose of inferiors that are
5116 2018-08-08 Szabolcs Nagy <szabolcs.nagy@arm.com>
5118 * remote.c (remote_target::download_tracepoint): Change char* to
5121 2018-08-07 Simon Marchi <simon.marchi@polymtl.ca>
5123 * target.h (target_options_to_string): Return an std::string.
5124 * target.c (str_comma_list_concat_elem): Return void, use
5126 (do_option): Likewise.
5127 (target_options_to_string): Return an std::string.
5128 * linux-nat.c (linux_nat_target::wait): Adjust.
5129 * target-debug.h (target_debug_print_options): Adjust.
5131 2018-08-07 Tom Tromey <tom@tromey.com>
5133 * Makefile.in (CPPFLAGS): New variable.
5134 (INTERNAL_CPPFLAGS): Use it.
5136 2018-08-07 Simon Marchi <simon.marchi@ericsson.com>
5138 * NEWS: Mention the index cache.
5140 2018-08-07 Simon Marchi <simon.marchi@ericsson.com>
5142 * common/pathstuff.h (get_standard_cache_dir): New.
5143 * common/pathstuff.c (get_standard_cache_dir): New.
5144 * build-id.h (build_id_to_string): New.
5145 * dwarf-index-common.h (INDEX4_SUFFIX, INDEX5_SUFFIX,
5146 DEBUG_STR_SUFFIX): Move to here.
5147 * dwarf-index-write.c (INDEX4_SUFFIX, INDEX5_SUFFIX,
5148 DEBUG_STR_SUFFIX): Move from there.
5149 (write_psymtabs_to_index): Make non-static, add basename
5150 parameter. Write to temporary files, rename when done.
5151 (save_gdb_index_command): Adjust call to
5152 write_psymtabs_to_index.
5153 * dwarf2read.h (dwarf2_per_objfile) <index_cache_res>: New
5155 * dwarf2read.c (dwz_file) <index_cache_res>: New field.
5156 (get_gdb_index_contents_from_cache): New.
5157 (get_gdb_index_contents_from_cache_dwz): New.
5158 (dwarf2_initialize_objfile): Read index from cache.
5159 (dwarf2_build_psymtabs): Save to index.
5160 * dwarf-index-cache.h: New file.
5161 * dwarf-index-cache.c: New file.
5162 * dwarf-index-write.h: New file.
5164 2018-08-07 Simon Marchi <simon.marchi@ericsson.com>
5166 * gnulib/aclocal.m4: Re-generate.
5167 * gnulib/config.in: Re-generate.
5168 * gnulib/configure: Re-generate.
5169 * gnulib/import/Makefile.am: Re-generate.
5170 * gnulib/import/Makefile.in: Re-generate.
5171 * gnulib/import/m4/gnulib-cache.m4: Re-generate.
5172 * gnulib/import/m4/gnulib-comp.m4: Re-generate.
5173 * gnulib/import/m4/mkdir.m4: New file.
5174 * gnulib/import/mkdir.c: New file.
5175 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add mkdir
5178 2018-08-07 Simon Marchi <simon.marchi@ericsson.com>
5180 * Makefile.in (COMMON_SFILES): Add common/scoped_mmap.c.
5181 * common/scoped_mmap.c: New file.
5182 * common/scoped_mmap.h (destroy): New method.
5183 (~scoped_mmap, reset): Use destroy.
5184 (scoped_mmap): New move constructor.
5185 (mmap_file): New declaration.
5186 * unittests/scoped_mmap-selftests.c (test_normal,
5187 test_invalid_filename, run_tests): New functions.
5188 (_initialize_scoped_mmap_selftests): Register selftest.
5190 2018-08-07 Simon Marchi <simon.marchi@ericsson.com>
5192 * dwarf2read.c (read_gdb_index_from_section): Rename to...
5193 (read_gdb_index_from_buffer): ... this. Remove section
5194 parameter, add buffer parameter.
5195 (get_gdb_index_contents_ftype,
5196 get_gdb_index_contents_dwz_ftype): New typedefs.
5197 (dwarf2_read_gdb_index): Add callback parameters to get the
5199 (get_gdb_index_contents_from_section): New.
5200 (dwarf2_initialize_objfile): Update call to
5201 dwarf2_read_gdb_index.
5203 2018-08-07 Simon Marchi <simon.marchi@ericsson.com>
5205 * common/filestuff.h (gdb_fopen_cloexec): New overload.
5206 (gdb_open_cloexec): Likewise.
5207 * nat/linux-osdata.c (command_from_pid): Use string_printf.
5208 (commandline_from_pid): Likewise.
5209 (linux_xfer_osdata_threads): Likewise.
5210 (linux_xfer_osdata_fds): Likewise.
5211 * ada-lang.c (is_package_name): Likewise.
5212 * auxv.c (procfs_xfer_auxv): Likewise.
5213 * breakpoint.c (print_one_breakpoint_location): Use
5215 (print_one_catch_solib): Use string_printf.
5216 * coff-pe-read.c (add_pe_exported_sym): Likewise.
5217 (add_pe_forwarded_sym): Likewise.
5218 * dwarf2read.c (create_type_unit_group): Likewise.
5219 (build_error_marker_type): Likewise.
5220 * infcall.c (get_function_name): Likewise.
5221 * valprint.c (print_converted_chars_to_obstack): Likewise.
5222 * xtensa-tdep.c (xtensa_register_type): Likewise.
5224 2018-08-06 Simon Marchi <simon.marchi@ericsson.com>
5226 * remote.c (remote_target::download_tracepoint): Fix format
5229 2018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
5231 * tracefile.c: Include common/byte-vector.h.
5232 (trace_save): Change type of buf to gdb::byte_vector. Initialize
5233 with trace_regblock_size if needed. Update uses of buf.
5235 2018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
5237 * tracepoint.h (collection_list) <m_regs_mask>: Change type to
5238 std::vector<unsigned char>.
5239 * tracepoint.c (collection_list::collection_list): Remove
5240 m_regs_mask initializer from initializer list. Resize
5241 m_regs_mask using the largest remote register number.
5242 (collection_list::add_remote_register): Remove size check on
5243 m_regs_mask. Use at to access element.
5244 (collection_list::stringify): Change type of temp_buf to
5245 gdb::char_vector. Update uses of temp_buf. Resize if needed to
5246 stringify the register mask. Use pack_hex_byte for the register
5249 2018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
5251 * tracepoint.h (class collection_list) <add_register>: Remove.
5252 <add_remote_register, add_ax_registers, add_local_register>:
5254 <add_memrange>: Add scope parameter.
5255 * tracepoint.c (encode_actions_1): Likewise.
5256 (collection_list::add_register): Rename to ...
5257 (collection_list::add_remote_register): ... this. Update
5259 (collection_list::add_ax_registers, add_local_register): New
5261 (collection_list::add_memrange): Add scope parameter. Call
5262 add_local_register instead of add_register.
5263 (finalize_tracepoint_aexpr): New function.
5264 (collection_list::collect_symbol): Update calls to add_memrange.
5265 Call add_local_register instead of add_register. Call
5266 add_ax_registers. Call finalize_tracepoint_aexpr.
5267 (encode_actions_1): Get remote regnos for $reg action. Call
5268 add_remote_register, add_ax_registers, and add_local_register.
5269 Update call to add_memrange. Call finalize_tracepoint_aexpr.
5270 (validate_actionline): Call finalize_tracepoint_aexpr.
5272 2018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
5274 * remote.c (remote_target::download_tracepoint): Remove BUF_SIZE.
5275 Replace array buf with gdb::char_vector buf, of size
5276 get_remote_packet_size (). Replace references to buf and
5277 BUF_SIZE to buf.data () and buf.size (). Replace strcpy, strcat
5278 and xsnprintf with snprintf. Raise errors if the buffer is too
5281 2018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
5283 * remote.c (remote_target::download_tracepoint): Fix the has_more
5284 predicate in the QTDP action list iteration.
5286 2018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
5288 * remote.c (remote_target::download_tracepoint): Fix indentation
5291 2018-08-06 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
5293 * proc-api.c (_initialize_proc_api): Remove c, unused.
5294 * procfs.c (procfs_init_inferior): Remove signals, unused.
5295 (procfs_target::make_corefile_notes): Remove old_chain, fpregs,
5298 2018-08-06 Sergey Korolev <s.korolev@ndmsystems.com>
5299 Andrew Burgess <andrew.burgess@embecosm.com>
5301 * linux-nat.c (linux_nat_target::follow_fork): Avoid using
5302 'W_STOPCODE (0)' as this could be ambiguous.
5304 2018-08-03 Sergio Durigan Junior <sergiodj@redhat.com>
5306 * ser-tcp.c (net_open): Fix thinko when deciding whether to
5307 disable TCP's Nagle algorithm (use "ai_protocol" instead of
5310 2018-08-02 Tom Tromey <tom@tromey.com>
5313 * dwarf2read.c (read_func_scope): Set symtab on template parameter
5315 (process_structure_scope): Likewise.
5317 2018-08-02 Xavier Roirand <roirand@adacore.com>
5320 * darwin-nat.c (darwin_kill_inferior): Fix handling of
5323 2018-08-02 Tom Tromey <tom@tromey.com>
5325 * darwin-nat.c (find_inferior_task_it, darwin_find_thread)
5326 (darwin_suspend_inferior, darwin_resume_inferior)
5327 (darwin_decode_notify_message, darwin_resume_inferior_threads)
5328 (darwin_check_new_threads): Check result of get_darwin_inferior.
5330 2018-07-31 Joel Brobecker <brobecker@adacore.com>
5334 2018-07-31 Jan Vrany <jan.vrany@fit.cvut.cz>
5336 * varobj.c (varobj_get_path_expr_parent): Report an error if
5337 parent is a dynamic varobj.
5339 2018-07-31 Simon Marchi <simon.marchi@ericsson.com>
5341 * gnulib/aclocal.m4: Re-generate.
5342 * gnulib/config.in: Re-generate.
5343 * gnulib/configure: Re-generate.
5344 * gnulib/import/Makefile.in: Re-generate.
5345 * gnulib/import/m4/gnulib-comp.m4: Re-generate.
5346 * gnulib/import/m4/onceonly.m4: Re-generate.
5348 2018-07-31 Simon Marchi <simon.marchi@ericsson.com>
5350 * target-descriptions.c (struct xml_test_tdesc): New.
5351 (xml_tdesc): Change type to std::vector<xml_test_tdesc>.
5352 (record_xml_tdesc): Update.
5353 (maintenance_check_xml_descriptions): Update.
5354 * target-descriptions.h (record_xml_tdesc): Update comment.
5356 2018-07-30 Andrew Burgess <andrew.burgess@embecosm.com>
5358 * eval.c (evaluate_subexp_for_sizeof): Check for array type before
5359 checking array bounds are defined.
5361 2018-07-30 Tom Tromey <tom@tromey.com>
5363 * nat/linux-osdata.c (pid_pgid_entry::operator<): Fix
5364 irreflexivity violation.
5366 2018-07-30 Tom Tromey <tom@tromey.com>
5368 * cli/cli-decode.c (lookup_cmd): Remove lint code.
5369 * value.c (unpack_long): Remove lint code.
5370 * valops.c (value_ind): Remove lint code.
5371 * valarith.c (value_x_binop, value_x_unop, value_equal)
5372 (value_pos): Remove lint code.
5374 2018-07-28 Tom de Vries <tdevries@suse.de>
5376 * eval.c (evaluate_subexp_for_sizeof): Interpret size of dynamic type
5377 with undefined upper bound as <optimized out>.
5379 2018-07-27 Sergio Durigan Junior <sergiodj@redhat.com>
5381 * gcore.in: Rename variable "name" to "prefix". Expand
5384 2018-07-14 Jon Turney <jon.turney@dronecode.org.uk>
5386 * windows-nat.c (windows_nat_target::create_inferior): Update to
5387 call close() in global namespace.
5389 2018-07-26 Tom Tromey <tom@tromey.com>
5391 * dwarf-index-write.c (add_address_entry): Don't add objfile
5393 * dbxread.c (find_stab_function): Rename from
5394 find_stab_function_addr. Return a bound_minimal_symbol.
5395 (read_dbx_symtab): Use raw_text_low, raw_text_high.
5396 Don't add objfile offsets.
5397 (end_psymtab): Use raw_text_low, raw_text_high,
5398 MSYMBOL_VALUE_RAW_ADDRESS.
5399 (read_ofile_symtab): Update.
5400 (process_one_symbol): Update.
5401 * dwarf2read.c (create_addrmap_from_index): Don't add objfile
5403 (dw2_relocate): Remove.
5404 (dw2_find_pc_sect_symtab): Bias PC by the text offset before
5406 (dwarf2_gdb_index_functions, dwarf2_debug_names_functions):
5408 (process_psymtab_comp_unit_reader, add_partial_symbol)
5409 (add_partial_subprogram, dwarf2_ranges_read): Update.
5410 (load_partial_dies): Update.
5411 (add_address_entry): Don't add objfile offsets.
5412 (dwarf2_build_include_psymtabs): Update.
5413 (create_addrmap_from_aranges): Don't add objfile offsets.
5414 (dw2_find_pc_sect_compunit_symtab): Update.
5415 * mdebugread.c (parse_symbol): Don't add objfile offsets.
5416 (parse_lines): Remove 'pst' parameter, replace with 'textlow'.
5418 (parse_partial_symbols): Don't add objfile offsets. Use
5419 raw_text_low, raw_text_high. Update.
5420 (handle_psymbol_enumerators, psymtab_to_symtab_1): Update.
5421 * objfiles.c (objfile_relocate1): Don't relocate psymtabs_addrmap
5422 or call 'relocate' quick function. Clear psymbol_map.
5423 * psympriv.h (struct partial_symbol) <address>: Add section
5425 <set_unrelocated_address>: Rename from set_address.
5426 <raw_text_low, raw_text_high>: New methods.
5427 <text_low, text_high>: Add objfile parameter.
5428 (add_psymbol_to_bcache): Add 'section' parameter. Call
5429 set_unrelocated_address.
5430 * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
5431 (find_pc_psymbol): Update.
5432 (fixup_psymbol_section, relocate_psymtabs): Remove.
5433 (dump_psymtab, psym_functions): Update.
5434 (add_psymbol_to_bcache, add_psymbol_to_list): Add 'section'
5436 (maintenance_info_psymtabs, maintenance_check_psymtabs): Update.
5437 (start_psymtab_common): Update.
5438 * symfile-debug.c (debug_qf_relocate): Remove.
5439 (debug_sym_quick_functions): Update.
5440 * symfile.h (struct quick_symbol_functions) <relocate>: Remove.
5441 * xcoffread.c (scan_xcoff_symtab): Don't add objfile offsets.
5444 2018-07-26 Tom Tromey <tromey@redhat.com>
5446 * dbxread.c (end_psymtab): Use text_high_valid and
5448 * mdebugread.c (parse_partial_symbols): Use text_low_valid.
5449 (psymtab_to_symtab_1): Use text_high_valid and text_low_valid.
5450 * psympriv.h (struct partial_symtab) <m_text_low, m_text_high>:
5452 <text_low_valid, text_high_valid>: New fields.
5453 <set_text_low, set_text_high>: Update.
5454 * xcoffread.c (scan_xcoff_symtab): Use text_low_valid.
5456 2018-07-26 Tom Tromey <tom@tromey.com>
5458 * dbxread.c (read_dbx_symtab, end_psymtab, read_ofile_symtab):
5460 * dwarf2read.c (dwarf2_create_include_psymtab): Don't initialize
5461 textlow and texthigh fields.
5462 (process_psymtab_comp_unit_reader, dwarf2_build_include_psymtabs):
5464 * mdebugread.c (parse_lines, parse_partial_symbols)
5465 (psymtab_to_symtab_1): Update.
5466 * psympriv.h (struct partial_symtab) <m_text_low, m_text_high>:
5467 Rename fields. Update comment. Now private.
5468 <text_low, text_high, set_text_low, set_text_high>: New methods.
5469 * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
5470 (find_pc_sect_psymbol, relocate_psymtabs, dump_psymtab)
5471 (start_psymtab_common, maintenance_info_psymtabs)
5472 (maintenance_check_psymtabs): Update.
5473 * xcoffread.c (xcoff_end_psymtab): Don't initialize textlow and
5475 (scan_xcoff_symtab): Update.
5477 2018-07-26 Tom Tromey <tromey@redhat.com>
5479 * psympriv.h (struct partial_symbol) <unrelocated_address,
5480 address, set_address>: New methods.
5481 * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymbol)
5482 (fixup_psymbol_section, relocate_psymtabs): Update.
5483 (print_partial_symbols): Add 'objfile' parameter. Update.
5484 (dump_psymtab, add_psymbol_to_bcache, psym_fill_psymbol_map):
5487 2018-07-26 Tom Tromey <tom@tromey.com>
5489 * dwarf-index-write.c (write_psymbols, debug_names::insert)
5490 (debug_names::write_psymbols): Update.
5491 * psympriv.h (struct partial_symbol): Derive from
5492 general_symbol_info.
5493 <obj_section>: New method.
5494 (PSYMBOL_DOMAIN, PSYMBOL_CLASS): Remove.n
5495 * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
5496 (find_pc_sect_psymbol, fixup_psymbol_section)
5497 (match_partial_symbol, lookup_partial_symbol, relocate_psymtabs)
5498 (print_partial_symbols, recursively_search_psymtabs)
5499 (compare_psymbols, psymbol_hash, psymbol_compare)
5500 (add_psymbol_to_bcache, maintenance_check_psymtabs)
5501 (psymbol_name_matches, psym_fill_psymbol_map): Update.
5503 2018-07-26 Tom Tromey <tromey@redhat.com>
5505 * dbxread.c (end_psymtab): Remove dead code.
5507 2018-07-26 Andrew Burgess <andrew.burgess@embecosm.com>
5509 * dwarf2-frame-tailcall.c (tailcall_frame_sniffer): Exit early if
5510 DWARF unwinders are disabled.
5511 * dwarf2-frame.c: Add dwarf2read.h include.
5512 (dwarf2_frame_sniffer): Exit early if DWARF unwinders are
5514 (dwarf2_frame_unwinders_enabled_p): Define.
5515 (show_dwarf_unwinders_enabled_p): New function.
5516 (_initialize_dwarf2_frame): Register switch to control DWARF
5518 * dwarf2-frame.h (dwarf2_frame_unwinders_enabled_p): Declare.
5519 * dwarf2read.c (set_dwarf_cmdlist): Remove static keyword.
5520 (show_dwarf_cmdlist): Remove static keyword.
5521 * dwarf2read.h (set_dwarf_cmdlist): Declare.
5522 (show_dwarf_cmdlist): Declare.
5523 * NEWS: Document new feature.
5525 2018-07-26 Tom de Vries <tdevries@suse.de>
5527 PR breakpoints/23366
5528 * infcmd.c (info_program_command): Handle ptid == minus_one_ptid.
5530 2018-07-26 Tom de Vries <tdevries@suse.de>
5532 * dwarf2read.c (read_subrange_type): Warn if DW_AT_upper_bound or
5533 DW_AT_count can't be translated to a dynamic prop.
5535 2018-07-25 Tom de Vries <tdevries@suse.de>
5537 * dwarf2loc.c (dwarf2_locexpr_baton_eval): Wrap ctx.eval call in
5540 2018-07-25 Jan Vrany <jan.vrany@fit.cvut.cz>
5542 * breakpoint.c (enable_disable_bp_num_loc): Notify observers.
5544 2018-07-25 Joel Brobecker <brobecker@adacore.com>
5546 * MAINTAINERS (Global Maintainers): Add Tom Tromey.
5548 2018-07-24 Keith Seitz <keiths@redhat.comt
5551 * dwarf2read.c (dw2_add_symbol_to_list): New function.
5552 (fixup_go_packaging, new_symbol): Use dw2_add_symbol_to_list
5553 instead of add_symbol_to_list.
5554 (read_file_scope): Call prepare_one_comp_unit before reading
5557 2018-07-24 Simon Marchi <simon.marchi@ericsson.com>
5559 * common/scoped_mmap.h (class scoped_mmap): Fix indentation.
5561 2018-07-24 Tom Tromey <tom@tromey.com>
5563 * utils.c (malloc, realloc, free): Don't declare.
5564 * configure, config.in: Rebuild.
5565 * configure.ac: Don't check for declarations of free, malloc, or
5568 2018-07-22 Simon Marchi <simon.marchi@polymtl.ca>
5570 * aarch64-linux-nat.c
5571 (aarch64_linux_nat_target::stopped_data_address): Remove unused
5573 * arm-linux-nat.c (fetch_regs): Likewise.
5574 (store_regs): Likewise.
5575 (fetch_vfp_regs): Likewise.
5576 (store_vfp_regs): Likewise.
5577 (arm_linux_nat_target::insert_hw_breakpoint): Likewise.
5578 (arm_linux_nat_target::remove_hw_breakpoint): Likewise.
5579 (arm_linux_nat_target::insert_watchpoint): Likewise.
5580 (arm_linux_nat_target::remove_watchpoint): Likewise.
5581 * mips-linux-nat.c (mips_linux_nat_target::insert_watchpoint):
5583 * nat/aarch64-sve-linux-ptrace.c (aarch64_sve_get_sveregs):
5585 * ppc-linux-nat.c (fetch_register): Likewise.
5586 (fetch_all_gp_regs): Likewise.
5587 (fetch_ppc_registers): Likewise.
5588 (store_all_gp_regs): Likewise.
5589 (store_ppc_registers): Likewise.
5590 (hwdebug_insert_point): Likewise.
5591 (can_use_watchpoint_cond_accel): Likewise.
5592 * remote-sim.c (gdb_os_write_stdout): Likewise.
5594 2018-07-22 Simon Marchi <simon.marchi@polymtl.ca>
5595 Tom Tromey <tom@tromey.com>
5597 * warning.m4 (AM_GDB_WARNINGS): Add -Wunused-variable and special
5599 * configure: Rebuild.
5601 2018-07-22 Tom Tromey <tom@tromey.com>
5603 * regformats/regdat.sh: Define xmltarget_${name} inside
5604 #ifndef IN_PROCESS_AGENT.
5606 2018-07-22 Tom Tromey <tom@tromey.com>
5608 * value.c (value_fetch_lazy_bitfield): Remove unused variable.
5610 2018-07-22 Tom Tromey <tom@tromey.com>
5612 * symfile.c (reread_symbols): Notify iter, not objfile.
5614 2018-07-22 Tom Tromey <tom@tromey.com>
5616 * ravenscar-thread.c (ravenscar_thread_target::store_registers):
5618 (ravenscar_thread_target::prepare_to_store): Likewise.
5620 2018-07-22 Tom Tromey <tom@tromey.com>
5622 * python/py-prettyprint.c (gdbpy_apply_val_pretty_printer): Remove
5623 unused variable. Call value_fetch_lazy when needed.
5624 * guile/scm-pretty-print.c (gdbscm_apply_val_pretty_printer):
5625 Remove unused variable. Call value_fetch_lazy when needed.
5627 2018-07-22 Tom Tromey <tom@tromey.com>
5629 * m32c-tdep.c (mark_dma): Return void.
5630 (make_regs): Remove unused declarations.
5632 2018-07-22 Tom Tromey <tom@tromey.com>
5634 * guile/scm-cmd.c (gdbscm_dont_repeat): Call
5635 cmdscm_get_valid_command_smob_arg_unsafe for effect.
5636 * guile/scm-block.c (gdbscm_make_block_syms_iter): Call
5637 bkscm_get_valid_block_smob_arg_unsafe for effect.
5639 2018-07-22 Tom Tromey <tom@tromey.com>
5641 * bfin-tdep.c (bfin_push_dummy_call): Use arg_type, not
5644 2018-07-22 Tom Tromey <tom@tromey.com>
5646 * windows-nat.c (saved_context): Conditionally define.
5647 * remote.c (remote_target::remote_btrace_maybe_reopen):
5648 Conditionally declare "warned".
5649 * inflow.c (sigquit_ours): Conditionally define.
5650 (new_tty): Move "tty" declaration inside #if.
5651 * guile/guile.c (guile_datadir): Conditionally define.
5652 * charset.c (set_be_le_names): Move some declarations inside #if.
5653 * btrace.c (parse_xml_btrace): Move "errcode" declaration inside
5655 (parse_xml_btrace_conf): Likewise.
5657 2018-07-22 Tom Tromey <tom@tromey.com>
5659 * spu-tdep.c (spu_get_overlay_table): Remove unused variable.
5661 2018-07-22 Tom Tromey <tom@tromey.com>
5663 * guile/scm-value.c (gdbscm_value_call): Remove unused variables.
5664 * guile/scm-math.c (vlscm_unop_gdbthrow, vlscm_binop_gdbthrow)
5665 (vlscm_convert_typed_value_from_scheme): Remove unused variable.
5666 * buildsym-legacy.c (get_macro_table): Remove unused variable.
5667 * stack.c (frame_apply_level_command): Remove unused variable.
5668 * tic6x-tdep.c (tic6x_push_dummy_call): Remove unused variable.
5669 * sparc64-tdep.c (adi_examine_command): Remove unused variable.
5670 * rs6000-lynx178-tdep.c (rs6000_lynx178_push_dummy_call): Remove
5672 * nios2-tdep.c (nios2_push_dummy_call): Remove unused variable.
5673 * mep-tdep.c (mep_push_dummy_call): Remove unused variable.
5674 * ada-lang.c (ada_lookup_symbol_list_worker): Remove unused
5676 * amd64-tdep.c (amd64_supply_xsave): Remove unused variable.
5677 * arm-tdep.c (arm_record_data_proc_misc_ld_str): Remove unused
5679 * breakpoint.c (check_no_tracepoint_commands, update_watchpoint):
5680 Remove unused variable.
5681 * cli/cli-script.c (recurse_read_control_structure): Remove unused
5683 * common/tdesc.c (print_xml_feature::visit): Remove unused
5685 * compile/compile-object-load.c (store_regs): Remove unused
5687 * complaints.c (clear_complaints): Remove unused variable.
5688 * corelow.c (core_target_open): Remove unused variable.
5689 * fbsd-tdep.c (fbsd_core_info_proc_status): Remove unused
5691 * guile/scm-frame.c (gdbscm_frame_read_var): Remove unused
5693 * guile/scm-symtab.c (stscm_print_sal_smob): Remove unused
5695 * guile/scm-type.c (gdbscm_field_baseclass_p): Remove unused
5697 * guile/scm-utils.c (gdbscm_parse_function_args): Remove unused
5699 * hppa-tdep.c (hppa_stub_frame_unwind_cache): Remove unused
5701 * ia64-tdep.c (examine_prologue): Remove unused variable.
5702 * infcall.c (run_inferior_call): Remove unused variable.
5703 * inferior.c (exit_inferior): Remove unused variable.
5704 * infrun.c (infrun_thread_ptid_changed): Remove unused variable.
5705 * linespec.c (decode_line_2): Remove unused variable.
5706 * linux-nat.c (super_close): Remove.
5707 * linux-tdep.c (linux_info_proc): Remove unused variable.
5708 * mi/mi-main.c (mi_execute_command): Remove unused variable.
5709 * microblaze-linux-tdep.c (microblaze_linux_sigtramp_cache):
5710 Remove unused variable.
5711 * parse.c (find_minsym_type_and_address): Remove unused variable.
5712 * printcmd.c (info_symbol_command, printf_floating): Remove unused
5714 * python/py-breakpoint.c (bppy_set_commands): Remove unused
5716 * python/py-unwind.c (unwind_infopy_dealloc): Remove unused
5718 * record-btrace.c (record_btrace_target::store_registers): Remove
5720 (cmd_show_record_btrace_cpu): Remove unused variable.
5721 * riscv-tdep.c (riscv_register_reggroup_p)
5722 (riscv_push_dummy_call, riscv_return_value): Remove unused
5724 * rust-exp.y (literal): Remove unused variable.
5725 * rust-lang.c (rust_evaluate_subexp) <OP_RUST_ARARAY>: Remove
5727 <STRUCTOP_ANONYMOUS>: Likewise.
5728 * s390-linux-tdep.c (s390_linux_init_abi_31)
5729 (s390_linux_init_abi_64): Remove unused variable.
5730 * ser-ming2.c (ser_windows_read_prim, pipe_select_thread)
5731 (file_select_thread, net_windows_open, _initialize_ser_windows):
5732 Remove unused variables.
5733 * symtab.c (find_pc_sect_line): Remove unused variable.
5734 * target-memory.c (compute_garbled_blocks): Remove unused
5736 (target_write_memory_blocks): Remove unused variable.
5737 * target.c (target_stack::unpush): Remove unused variables.
5738 * tracepoint.c (start_tracing, all_tracepoint_actions)
5739 (merge_uploaded_trace_state_variables)
5740 (print_one_static_tracepoint_marker): Remove unused variable.
5741 * unittests/basic_string_view/element_access/char/1.cc (test01):
5742 Remove unused variable.
5743 * windows-nat.c (windows_continue, windows_add_all_dlls)
5744 (do_initial_windows_stuff, windows_nat_target::create_inferior):
5745 Remove unused variables.
5747 2018-07-21 Simon Marchi <simon.marchi@polymtl.ca>
5749 * arm-tdep.c (arm_gdbarch_init): Declare attr_arch and
5750 attr_profile in HAVE_ELF.
5751 * rs6000-tdep.c (bfd_uses_spe_extensions): Declare vector_abi in
5754 2018-07-20 Simon Marchi <simon.marchi@polymtl.ca>
5756 * frame.c (frame_register_unwind): Change parameter name.
5757 (frame_unwind_register): Likewise.
5758 (frame_unwind_register_value): Likewise.
5759 (frame_unwind_register_signed): Likewise.
5760 (frame_unwind_register_unsigned): Likewise.
5761 * frame.h (frame_register_unwind): Likewise.
5762 (frame_unwind_register): Likewise.
5763 (frame_unwind_register_value): Likewise.
5764 (frame_unwind_register_signed): Likewise.
5765 (frame_unwind_register_unsigned): Likewise.
5766 (frame_unwind_arch): Likewise.
5768 2018-07-20 Maciej W. Rozycki <macro@mips.com>
5770 * MAINTAINERS: Update my e-mail address, downgrade to MIPS I-IV
5773 2018-07-20 Maciej W. Rozycki <macro@mips.com>
5775 * mips-linux-nat.c (mips_linux_nat_target::read_description):
5776 Call `get_ptrace_pid' rather than extracting the ptrace PID by
5779 2018-07-20 Keith Seitz <keiths@redhat.com>
5781 * buildsym.h (struct buildsym_compunit) <m_objfile, m_subfiles,
5782 m_main_subfile, m_comp_dir, m_producer, m_debugformat,
5783 m_compunit_symtab, m_language>: Add "m_" prefix.
5785 * buildsym.c: Update all uses.
5787 2018-07-20 Tom Tromey <tom@tromey.com>
5789 * buildsym-legacy.h (record_line): Don't use record_line_ftype.
5790 * buildsym.h (record_line_ftype): Remove typedef.
5792 2018-07-20 Tom Tromey <tom@tromey.com>
5794 * buildsym-legacy.h (augment_type_symtab): Don't declare.
5795 (end_expandable_symtab): Likewise.
5796 (end_symtab_get_static_block): Likewise.
5797 (end_symtab_from_static_block): Likewise.
5798 * buildsym-legacy.c (augment_type_symtab): Remove.
5799 (end_expandable_symtab): Remove.
5800 (end_symtab_get_static_block): Remove.
5801 (end_symtab_from_static_block): Remove.
5803 2018-07-20 Tom Tromey <tom@tromey.com>
5805 * dwarf2read.c: Include buildsym.h.
5806 (struct dwarf2_cu) <builder>: New method.
5807 (fixup_go_packaging): Update.
5808 (process_full_comp_unit, process_full_type_unit): Update. Don't
5809 use scoped_free_pendings.
5810 (using_directives): Add "cu" parameter, remove "language".
5811 (read_import_statement, setup_type_unit_groups, )
5812 (read_func_scope, read_lexical_block_scope)
5813 (dwarf2_record_block_ranges, read_namespace): Update.
5814 (lnp_state_machine::lnp_state_machine): Add cu parameter.
5815 (lnp_state_machine::handle_end_sequence): Update.
5816 (class lnp_state_machine) <m_cu>: New member.
5817 <m_record_line_callback>: Remove.
5818 <m_currently_recording_lines>: New member.
5819 (lnp_state_machine::handle_set_file): Update.
5820 (noop_record_line): Remove.
5821 (dwarf_record_line_p): Add cu parameter.
5822 (dwarf_record_line_1, dwarf_finish_line): Likewise.
5823 (lnp_state_machine::record_line)
5824 (lnp_state_machine::lnp_state_machine)
5825 (lnp_state_machine::check_line_address, dwarf_decode_lines_1)
5826 (dwarf_decode_lines): Update.
5827 (dwarf2_start_subfile): Add cu parameter.
5828 (dwarf2_start_symtab, new_symbol): Update.
5829 (macro_start_file, dwarf_decode_macro_bytes): Add cu parameter.
5830 Remove dwarf2_per_objfile parameter.
5831 (dwarf_decode_macros): Update.
5833 2018-07-20 Tom Tromey <tom@tromey.com>
5835 * stabsread.c (define_symbol): Update.
5836 * buildsym-legacy.h (get_buildsym_compunit): Declare.
5837 * dwarf2read.c (new_symbol): Update.
5838 * cp-support.h (cp_scan_for_anonymous_namespaces): Update.
5839 * cp-namespace.c: Include buildsym.h.
5840 (cp_scan_for_anonymous_namespaces): Add "compunit" parameter.
5841 * buildsym-legacy.c (get_buildsym_compunit): New function.
5843 2018-07-20 Tom Tromey <tom@tromey.com>
5845 * xcoffread.c: Include buildsym-legacy.h.
5846 * windows-nat.c: Include buildsym-legacy.h.
5847 * stabsread.c: Include buildsym-legacy.h.
5848 * mdebugread.c: Include buildsym-legacy.h.
5849 * buildsym-legacy.h: New file.
5850 * buildsym-legacy.c: New file, from buildsym.c.
5851 * go32-nat.c: Include buildsym-legacy.h.
5852 * dwarf2read.c: Include buildsym-legacy.h.
5853 * dbxread.c: Include buildsym-legacy.h.
5854 * cp-namespace.c: Include buildsym-legacy.h.
5855 * coffread.c: Include buildsym-legacy.h.
5856 * buildsym.h: Move some contents to buildsym-legacy.h.
5857 * buildsym.c: Include buildsym-legacy.h. Move many functions to
5859 * Makefile.in (HFILES_NO_SRCDIR): Add buildsym-legacy.h.
5861 2018-07-20 Tom Tromey <tom@tromey.com>
5863 * buildsym.h (struct buildsym_compunit): Move from buildsym.c.
5864 * buildsym.c (struct buildsym_compunit): Move to buildsym.h.
5865 (buildsym_compunit::buildsym_compunit)
5866 (buildsym_compunit::~buildsym_compunit)
5867 (buildsym_compunit::get_macro_table): Define.
5869 2018-07-20 Tom Tromey <tom@tromey.com>
5871 * buildsym.c (reset_symtab_globals): Remove.
5872 (buildsym_compunit::end_symtab_from_static_block): Update.
5873 (buildsym_compunit::augment_type_symtab): Update.
5874 (end_symtab_from_static_block): Call free_buildsym_compunit.
5875 (augment_type_symtab, end_symtab, end_expandable_symtab):
5878 2018-07-20 Tom Tromey <tom@tromey.com>
5880 * arch-utils.c: Do not include buildsym.h.
5881 * mipsread.c: Do not include buildsym.h.
5882 * machoread.c: Do not include buildsym.h.
5883 * elfread.c: Do not include buildsym.h.
5885 2018-07-20 Tom Tromey <tom@tromey.com>
5887 * buildsym.c (buildsym_compunit::buildsym_compunit): Do more
5889 (buildsym_compunit): Add new constructor.
5890 (struct buildsym_compunit) <get_last_source_file, finish_block,
5891 record_block_range, start_subfile, patch_subfile_names,
5892 push_subfile, pop_subfile, record_line, get_compunit_symtab,
5893 set_last_source_start_addr, get_last_source_start_addr,
5894 get_local_using_directives, set_local_using_directives,
5895 get_global_using_directives, outermost_context_p,
5896 get_current_context_stack, get_context_stack_depth,
5897 get_current_subfile, get_local_symbols, get_file_symbols,
5898 get_global_symbols, record_debugformat, record_producer,
5899 push_context, pop_context, end_symtab_get_static_block,
5900 end_symtab_from_static_block, end_symtab, end_expandable_symtab>:
5902 <record_pending_block, finish_block_internal, make_blockvector,
5903 watch_main_source_file_lossage, end_symtab_with_blockvector>: New
5907 2018-05-22 Tom Tromey <tom@tromey.com>
5909 * buildsym.c (record_pending_block): Move earlier. Remove objfile
5911 (finish_block_internal): Update.
5913 2018-07-20 Tom Tromey <tom@tromey.com>
5915 * buildsym.c (record_pending_block): Move earlier. Remove objfile
5917 (finish_block_internal): Update.
5919 2018-07-20 Tom Tromey <tom@tromey.com>
5921 * buildsym.h (EXTERN): Don't define or undef.
5922 * buildsym.c (EXTERN): Don't define.
5924 2018-07-20 Tom Tromey <tom@tromey.com>
5926 * buildsym.c: Remove TODO comment.
5928 2018-07-20 Tom Tromey <tom@tromey.com>
5930 * coffread.c (coff_symtab_read): Update.
5931 * xcoffread.c (xcoff_psymtab_to_symtab_1): Update.
5932 (xcoff_new_init): Update.
5933 * mipsread.c (mipscoff_new_init): Update.
5934 * mdebugread.c (mdebug_build_psymtabs): Update.
5935 * elfread.c (elf_new_init): Update.
5936 * dwarf2read.c (process_full_comp_unit, process_full_type_unit):
5938 * dbxread.c (dbx_new_init, dbx_psymtab_to_symtab_1)
5939 (coffstab_build_psymtabs, elfstab_build_psymtabs)
5940 (stabsect_build_psymtabs): Update.
5941 * buildsym.h (buildsym_init): Don't declare.
5942 * buildsym.c: Update comment.
5943 (prepare_for_building): Remove.
5944 (start_symtab, restart_symtab): Update.
5945 (reset_symtab_globals): Update comment.
5946 (buildsym_init): Remove.
5948 2018-07-20 Tom Tromey <tom@tromey.com>
5950 * xcoffread.c (read_xcoff_symtab, process_xcoff_symbol): Update.
5951 * stabsread.c (patch_block_stabs, define_symbol, read_type)
5952 (read_enum_type, common_block_start, common_block_end)
5953 (cleanup_undefined_types_1, finish_global_stabs): Update.
5954 * mdebugread.c (psymtab_to_symtab_1): Update.
5955 * dwarf2read.c (fixup_go_packaging, read_func_scope)
5956 (read_lexical_block_scope, new_symbol): Update.
5957 * dbxread.c (process_one_symbol): Update.
5958 * coffread.c (coff_symtab_read, process_coff_symbol)
5959 (coff_read_enum_type): Update.
5960 * buildsym.h (file_symbols, global_symbols, local_symbols): Don't
5962 (get_local_symbols, get_file_symbols, get_global_symbols): New
5964 * buildsym.c (~buildsym_compunit): Clean up m_file_symbols and
5966 <m_file_symbols, m_local_symbols, m_global_symbols>: New members.
5967 (~scoped_free_pendings): Update.
5968 (finish_block, prepare_for_building, reset_symtab_globals)
5969 (end_symtab_get_static_block, end_symtab_with_blockvector)
5970 (augment_type_symtab, push_context): Update.
5971 (get_local_symbols, get_file_symbols, get_global_symbols): New
5973 (buildsym_init): Update.
5975 2018-07-20 Tom Tromey <tom@tromey.com>
5977 * dwarf2read.c (process_full_comp_unit): Do not set list_in_scope.
5978 (process_full_type_unit): Likewise.
5979 (dwarf2_start_symtab): Set list_in_scope.
5981 2018-07-20 Tom Tromey <tom@tromey.com>
5983 * dwarf2read.c (process_psymtab_comp_unit_reader)
5984 (build_type_psymtabs_reader): Do not set list_in_scope.
5986 2018-07-20 Tom Tromey <tom@tromey.com>
5988 * buildsym.c (free_pendings): Remove.
5989 (add_symbol_to_list, scoped_free_pendings)
5990 (finish_block_internal, buildsym_init): Update.
5992 2018-07-20 Tom Tromey <tom@tromey.com>
5994 * xcoffread.c (read_xcoff_symtab): Update.
5995 * dwarf2read.c (read_func_scope, read_lexical_block_scope):
5997 * dbxread.c (process_one_symbol): Update.
5998 * coffread.c (coff_symtab_read): Update.
5999 * buildsym.h (finish_block): Update.
6000 * buildsym.c (finish_block): Remove "listhead" argument.
6001 (end_symtab_get_static_block): Update.
6003 2018-07-20 Tom Tromey <tom@tromey.com>
6005 * buildsym.h (class scoped_free_pendings): Remove constructor.
6006 * buildsym.c (struct buildsym_compunit) <free_pending_blocks>: New
6008 <m_pending_block_obstack, m_pending_blocks>: New members.
6009 (pending_block_obstack, pending_blocks): Remove.
6010 (scoped_free_pendings::scoped_free_pendings): Default.
6011 (~scoped_free_pendings): Update.
6012 (free_pending_blocks): Remove.
6013 (finish_block_internal, record_pending_block, make_blockvector)
6014 (end_symtab_get_static_block, augment_type_symtab, push_context)
6015 (buildsym_init): Update.
6017 2018-07-20 Tom Tromey <tom@tromey.com>
6019 * buildsym.c (struct buildsym_compunit) <m_pending_addrmap,
6020 m_pending_addrmap_obstack, m_pending_addrmap_interesting>: New
6022 (pending_addrmap, pending_addrmap_obstack)
6023 (pending_addrmap_interesting): Remove.
6024 (scoped_free_pendings, record_block_range, make_blockvector)
6025 (prepare_for_building, reset_symtab_globals, buildsym_init):
6028 2018-07-20 Tom Tromey <tom@tromey.com>
6030 * xcoffread.c (process_linenos): Update.
6031 * stabsread.c (define_symbol, read_type, read_enum_type): Update.
6032 * mdebugread.c (psymtab_to_symtab_1): Update.
6033 * dwarf2read.c (setup_type_unit_groups)
6034 (lnp_state_machine::handle_set_file, dwarf_record_line_p)
6035 (lnp_state_machine::record_line, dwarf_decode_lines): Update.
6036 * dbxread.c (process_one_symbol): Update.
6037 * coffread.c (coff_symtab_read, enter_linenos)
6038 (process_coff_symbol): Update.
6039 * buildsym.h (current_subfile): Don't declare.
6040 (get_current_subfile): Declare.
6041 * buildsym.c (struct buildsym_compunit) <m_current_subfile>: New
6043 (start_subfile, free_buildsym_compunit, push_subfile)
6044 (prepare_for_building, start_symtab): Update.
6045 (get_current_subfile): New function.
6047 2018-07-20 Tom Tromey <tom@tromey.com>
6049 * coffread.c (coff_symtab_read): Update.
6050 * xcoffread.c (read_xcoff_symtab): Update.
6051 * dwarf2read.c (new_symbol): Update.
6052 (read_func_scope, read_lexical_block_scope): Update.
6053 * dbxread.c (process_one_symbol): Update.
6054 * buildsym.h (context_stack, context_stack_depth): Don't declare.
6055 (outermost_context_p): Remove macro.
6056 (outermost_context_p, get_current_context_stack)
6057 (get_context_stack_depth): Declare.
6058 (pop_context): Return struct context_stack.
6059 * buildsym.c (struct buildsym_compunit) <m_context_stack: New
6061 (context_stack_size): Remove.
6062 (INITIAL_CONTEXT_STACK_SIZE): Remove.
6063 (prepare_for_building, end_symtab_get_static_block)
6064 (augment_type_symtab, push_context): Update.
6065 (pop_context): Return struct context_stack.
6066 (outermost_context_p, get_current_context_stack)
6067 (get_context_stack_depth): New functions.
6068 (buildsym_init): Update.
6070 2018-07-20 Tom Tromey <tom@tromey.com>
6072 * rust-exp.y: Now a pure parser. Update all rules.
6073 (%union): Move earlier.
6074 (current_parser, work_obstack): Remove globals.
6075 (rust_parser, ~rust_parser): Update.
6076 (class rust_parser) <copy_name, concat3, crate_name, super_name,
6077 lex_character, lex_number, lex_string, lex_identifier,
6078 rust_lookup_type, convert_params_to_types, convert_ast_to_type,
6079 convert_name, convert_params_to_expression,
6080 convert_ast_to_expression, ast_basic_type, ast_operation,
6081 ast_compound_assignment, rust_op, ast_literal, ast_dliteral,
6082 ast_structop, ast_structop_anonymous, ast_unary, ast_cast,
6083 ast_call_ish, ast_path, ast_string, ast_struct, ast_range,
6084 ast_array_type, ast_slice_type, ast_reference_type,
6085 ast_pointer_type, ast_function_type, ast_tuple_type>: New methods.
6086 (rust_parse): Update.
6087 (rustyyerror, rustyylex): Add parser parameter.
6088 (rust_lex_test_one, rust_lex_int_test, rust_lex_exception_test)
6089 (rust_lex_stringish_test, rust_lex_test_sequence)
6090 (rust_lex_test_trailing_dot, rust_lex_test_completion)
6091 (rust_lex_test_push_back, rust_lex_tests): Update.
6093 2018-07-19 Pedro Alves <palves@redhat.com>
6095 * guile/guile-internal.h (gdbscm_scm_to_c_string): Now returns a
6096 gdb::unique_xmalloc_ptr.
6097 * guile/scm-breakpoint.c (gdbscm_set_breakpoint_condition_x):
6098 Adjust to use dbscm_wrap and gdb::unique_xmalloc_ptr.
6099 * guile/scm-exception.c (gdbscm_exception_message_to_string): Use
6100 copy-initialization.
6101 * guile/scm-pretty-print.c (ppscm_print_children): Use
6102 gdb::unique_xmalloc_ptr instead of cleanups.
6103 (gdbscm_apply_val_pretty_printer): Remove cleanups.
6104 * guile/scm-string.c (gdbscm_scm_to_c_string): Now returns a
6105 gdb::unique_xmalloc_ptr.
6106 * guile/scm-type.c (gdbscm_type_field, gdbscm_type_has_field_p):
6107 Adjust to use gdb::unique_xmalloc_ptr.
6108 * guile/scm-utils.c (extract_arg): Adjust.
6109 * guile/scm-value.c (gdbscm_value_field): Adjust to use
6110 gdb::unique_xmalloc_ptr instead of a cleanup.
6112 2018-07-19 Tom Tromey <tom@tromey.com>
6114 * utils.c (do_value_free_to_mark)
6115 (make_cleanup_value_free_to_mark): Remove.
6116 * utils.h (make_cleanup_value_free_to_mark): Remove.
6118 2018-07-19 Pedro Alves <palves@redhat.com>
6120 * guile/guile-internal.h (gdbscm_wrap): Really make 'args' a
6121 forwarding reference.
6123 2018-07-18 Pedro Alves <palves@redhat.com>
6125 * guile/guile.c (gdbscm_execute_gdb_command): Adjust to use
6126 gdbscm_wrap. Use gdb::unique_xmalloc_ptr<char> instead of a
6129 2018-07-18 Pedro Alves <palves@redhat.com>
6131 * guile/guile-internal.h: Add comment about mixing GDB and Scheme
6133 (GDBSCM_HANDLE_GDB_EXCEPTION_WITH_CLEANUPS): Delete.
6135 * guile/scm-frame.c (gdbscm_frame_read_register): Use xfree
6136 directly instead of a cleanup.
6137 * guile/scm-math.c (vlscm_unop_gdbthrow): New, factored out from ...
6138 (vlscm_unop): ... this. Reimplement using gdbscm_wrap.
6139 (vlscm_binop_gdbthrow): New, factored out from ...
6140 (vlscm_binop): ... this. Reimplement using gdbscm_wrap.
6141 (vlscm_rich_compare): Use gdbscm_wrap.
6142 * guile/scm-symbol.c (gdbscm_lookup_symbol): Use xfree directly
6143 instead of a cleanup.
6144 (gdbscm_lookup_global_symbol): Use xfree directly instead of a
6146 * guile/scm-type.c (gdbscm_type_field, gdbscm_type_has_field_p):
6147 Use xfree directly instead of a cleanup.
6148 * guile/scm-value.c (gdbscm_make_value, gdbscm_make_lazy_value):
6149 Adjust to use gdbscm_wrap and scoped_value_mark.
6150 (gdbscm_value_optimized_out_p): Adjust to use gdbscm_wrap.
6151 (gdbscm_value_address, gdbscm_value_dereference)
6152 (gdbscm_value_referenced_value): Adjust to use gdbscm_wrap and
6154 (gdbscm_value_dynamic_type): Use scoped_value_mark.
6155 (vlscm_do_cast, gdbscm_value_field): Adjust to use gdbscm_wrap and
6157 (gdbscm_value_subscript, gdbscm_value_call): Adjust to use
6158 gdbscm_wrap and scoped_value_mark.
6159 (gdbscm_value_to_string): Use xfree directly instead of a
6160 cleanup. Move 'buffer' unique_ptr to TRY scope.
6161 (gdbscm_value_to_lazy_string): Use xfree directly instead of a
6162 cleanup. Move 'buffer' unique_ptr to TRY scope. Use
6164 (gdbscm_value_fetch_lazy_x): Use gdbscm_wrap.
6165 (gdbscm_parse_and_eval): Adjust to use gdbscm_wrap and
6167 (gdbscm_history_ref, gdbscm_history_append_x): Adjust to use
6170 2018-07-18 Tom de Vries <tdevries@suse.de>
6172 * findvar.c (default_read_var_value): Also resolve dynamic type for
6173 LOC_OPTIMIZED_OUT vars.
6175 2018-07-18 Maciej W. Rozycki <macro@mips.com>
6177 * mips-tdep.c (micromips_next_pc): Add SYSCALL instruction
6180 2018-07-17 Tom Tromey <tom@tromey.com>
6182 * guile/scm-param.c (pascm_set_func, pascm_show_func)
6183 (compute_enum_list, pascm_set_param_value_x)
6184 (gdbscm_parameter_value): Update.
6185 * guile/guile-internal.h (gdbscm_scm_to_string): Update.
6186 (gdbscm_scm_to_host_string): Update.
6187 * guile/scm-math.c (vlscm_convert_typed_value_from_scheme):
6189 * guile/scm-cmd.c (cmdscm_add_completion): Update.
6190 * guile/scm-pretty-print.c (ppscm_print_string_repr): Update.
6191 * guile/scm-string.c (gdbscm_scm_to_string): Return
6193 (gdbscm_scm_to_host_string): Likewise.
6195 2018-07-17 Tom Tromey <tom@tromey.com>
6197 * guile/guile.c (gdbscm_eval_from_control_command): Update.
6198 * guile/guile-internal.h (gdbscm_safe_eval_string): Update.
6199 * guile/scm-objfile.c (gdbscm_execute_objfile_script): Update.
6200 * guile/scm-safe-call.c (gdbscm_safe_eval_string): Return
6203 2018-07-17 Tom Tromey <tom@tromey.com>
6205 * guile/scm-param.c (pascm_signal_setshow_error): Update.
6206 * guile/guile-internal.h (gdbscm_exception_message_to_string):
6208 * guile/scm-cmd.c (cmdscm_function): Update.
6209 * guile/scm-pretty-print.c
6210 (ppscm_print_exception_unless_memory_error): Update.
6211 * guile/scm-exception.c (gdbscm_exception_message_to_string):
6212 Return unique_xmalloc_ptr.
6214 2018-07-17 Tom Tromey <tom@tromey.com>
6216 * guile/scm-pretty-print.c (ppscm_make_pp_type_error_exception):
6219 2018-07-17 Jim Wilson <jimw@sifive.com>
6221 * riscv-tdep.c (riscv_has_feature): Delete comment that refers to
6222 set_gdbarch_decr_pc_after_break. Call riscv_read_misa_reg always.
6223 (riscv_gdbarch_init): Delete local has_compressed_isa. Delete now
6224 unecessary braces after EF_RISCV_RVC test. Delete call to
6225 set_gdbarch_decr_pc_after_break.
6227 * riscv-tdep.h (DECLARE_CSR): Use RISCV_FIRST_CSR_REGNUM instead of
6228 RISCV_LAST_FP_REGNUM + 1.
6229 (RSICV_CSR_LEGACY_MISA_REGNUM): Add RISCV_FIRST_CSR_REGNUM.
6231 2018-07-17 Tom Tromey <tom@tromey.com>
6233 * configure.ac: Remove --disable-gdbcli.
6234 * configure: Rebuild.
6235 * Makefile.in (SUBDIR_CLI_DEPS, SUBDIR_CLI_LDFLAGS)
6236 (SUBDIR_CLI_CFLAGS): Remove.
6237 (SFILES): Use SUBDIR_CLI_SRCS.
6238 (COMMON_OBS): Use SUBDIR_CLI_OBS.
6240 2018-07-17 Tom Tromey <tom@tromey.com>
6243 * coffread.c (coff_symtab_read): Use scoped_free_pendings.
6245 2018-07-16 Jim Wilson <jimw@sifive.com>
6247 * riscv-tdep.c (riscv_gdbarch_init): Call gdbarch_init_osabi.
6249 2018-07-16 Simon Marchi <simon.marchi@ericsson.com>
6251 * ia64-libunwind-tdep.c (libunwind_frame_cache): Remove unused
6253 (libunwind_frame_sniffer): Likewise.
6254 (libunwind_frame_prev_register): Likewise.
6255 (libunwind_sigtramp_frame_sniffer): Likewise.
6256 * ia64-tdep.c (ia64_access_reg): Likewise.
6257 (ia64_access_rse_reg): Likewise.
6258 (ia64_libunwind_sigtramp_frame_this_id): Likewise.
6259 * ia64-vms-tdep.c (ia64_vms_find_proc_info_x): Likewise.
6261 2018-07-16 Simon Marchi <simon.marchi@ericsson.com>
6263 * ia64-vms-tdep.c (ia64_vms_find_proc_info_x): Add cast.
6265 2018-07-16 Simon Marchi <simon.marchi@ericsson.com>
6267 * remote-sim.c (gdbsim_target::close,
6268 gdbsim_target::mourn_inferior): Remove unused variables.
6270 2018-07-16 Simon Marchi <simon.marchi@polymtl.ca>
6272 * ia64-tdep.c (ktab_buf): New global.
6273 (getunwind_table): Return a gdb::optional<gdb::byte_vector>.
6274 (get_kernel_table): Adjust.
6276 2018-07-16 Tom Tromey <tom@tromey.com>
6278 * xcoffread.c (read_xcoff_symtab): Use outermost_context_p.
6279 * dwarf2read.c (using_directives, new_symbol): Use
6280 outermost_context_p.
6281 * dbxread.c (process_one_symbol): Use outermost_context_p.
6282 * coffread.c (coff_symtab_read): Use outermost_context_p.
6284 2018-07-16 Tom Tromey <tom@tromey.com>
6286 * dwarf2read.c (using_directives, read_func_scope)
6287 (read_lexical_block_scope): Update.
6288 * cp-namespace.c (cp_scan_for_anonymous_namespaces): Update.
6289 * buildsym.h (local_using_directives, global_using_directives):
6291 (get_local_using_directives, set_local_using_directives)
6292 (get_global_using_directives): Declare.
6293 * buildsym.c (struct buildsym_compunit) <m_local_using_directives,
6294 m_global_using_directives>: New members.
6295 (finish_block_internal, prepare_for_building)
6296 (reset_symtab_globals, end_symtab_get_static_block)
6297 (push_context): Update.
6298 (get_local_using_directives, set_local_using_directives)
6299 (get_global_using_directives): New functions.
6300 (buildsym_init): Update.
6302 2018-07-16 Tom Tromey <tom@tromey.com>
6304 * xcoffread.c (xcoff_initial_scan): Don't call
6305 free_pending_blocks.
6306 * dbxread.c (dbx_symfile_read): Don't call free_pending_blocks.
6307 * buildsym.h (class scoped_free_pendings): Add constructor.
6308 (free_pending_blocks): Don't declare.
6309 * buildsym.c (scoped_free_pendings::scoped_free_pendings): New.
6310 (free_pending_blocks): Now static.
6312 2018-07-16 Tom Tromey <tom@tromey.com>
6314 * buildsym.h (push_subfile, pop_subfile): Update declarations.
6315 * buildsym.c (struct buildsym_compunit) <m_subfile_stack>: New
6317 (struct subfile_stack): Remove.
6318 (subfile_stack): Remove.
6319 (push_subfile, pop_subfile, buildsym_init): Update.
6321 2018-07-16 Tom Tromey <tom@tromey.com>
6323 * buildsym.c (push_subfile): Use gdb_assert.
6324 (pop_subfile): Use gdb_assert.
6326 2018-07-16 Tom Tromey <tom@tromey.com>
6328 * buildsym.h (merge_symbol_lists): Remove.
6329 * buildsym.c (merge_symbol_lists): Remove.
6331 2018-07-16 Tom Tromey <tom@tromey.com>
6333 * stabsread.c (scan_file_globals): Update comment.
6334 * stabsread.h (scan_file_globals): Move from buildsym.h.
6335 * buildsym.h (scan_file_globals): Move to stabsread.h.
6337 2018-07-16 Tom Tromey <tom@tromey.com>
6339 * xcoffread.c (xcoff_new_init): Update.
6340 * mipsread.c (mipscoff_new_init): Update.
6341 * mdebugread.c (mdebug_build_psymtabs): Update.
6342 * elfread.c (elf_new_init): Update.
6343 * dbxread.c (dbx_new_init, coffstab_build_psymtabs)
6344 (elfstab_build_psymtabs, stabsect_build_psymtabs): Update.
6345 * buildsym.h (buildsym_new_init): Don't declare.
6346 * buildsym.c (buildsym_new_init): Remove.
6348 2018-07-16 Tom Tromey <tom@tromey.com>
6350 * stabsread.h (within_function): Move from buildsym.h.
6351 * stabsread.c (start_stabs): Clear within_function.
6352 * coffread.c (coff_start_symtab): Clear within_function.
6353 * buildsym.h (within_function): Move to stabsread.h.
6354 * buildsym.c (prepare_for_building): Update.
6356 2018-07-16 Tom Tromey <tom@tromey.com>
6358 * stabsread.h (processing_gcc_compilation): Move from buildsym.h.
6359 * dwarf2read.c (dwarf2_start_symtab): Don't set
6360 processing_gcc_compilation.
6361 * buildsym.h (processing_gcc_compilation): Move to stabsread.h.
6363 2018-07-16 Tom Tromey <tom@tromey.com>
6365 * stabsread.h (HASHSIZE, hashname, symnum, next_symbol_text)
6366 (next_symbol_text_func): Move from buildsym.h.
6367 * stabsread.c (hashname): Move from buildsym.c.
6368 * buildsym.h (HASHSIZE, symnum, next_symbol_text)
6369 (next_symbol_text_func, hashname): Move to stabsread.h.
6370 * buildsym.c: Don't include bcache.h
6371 (hashname): Move to stasbread.c.
6373 2018-07-16 Tom Tromey <tom@tromey.com>
6375 * buildsym.h (context_stack_size): Don't declare.
6376 * buildsym.c (context_stack_size): New global.
6378 2018-07-16 Tom Tromey <tom@tromey.com>
6380 * dbxread.c (processing_acc_compilation): New global.
6381 * buildsym.h (processing_acc_compilation): Don't declare.
6383 2018-07-16 Tom Tromey <tom@tromey.com>
6385 * xcoffread.c (aix_process_linenos, complete_symtab): Update.
6386 * dbxread.c (read_ofile_symtab): Update.
6387 * coffread.c (coff_start_symtab, coff_end_symtab): Update.
6388 * buildsym.h (last_source_start_addr): Remove.
6389 (set_last_source_start_addr, get_last_source_start_addr):
6391 * buildsym.c (buildsym_compunit::buildsym_compunit): Add last_addr
6393 (struct buildsym_compunit) <m_last_source_start_addr>: New
6395 (prepare_for_building): Remove start_addr parameter.
6396 (start_symtab, restart_symtab, end_symtab_get_static_block)
6397 (end_symtab_with_blockvector): Update.
6398 (set_last_source_start_addr, get_last_source_start_addr): New
6401 2018-07-16 Tom Tromey <tom@tromey.com>
6403 * buildsym.c (struct buildsym_compunit) <m_have_line_numbers>: New
6405 (have_line_numbers): Remove.
6406 (record_line, prepare_for_building, end_symtab_get_static_block)
6407 (augment_type_symtab): Update.
6409 2018-07-16 Tom Tromey <tom@tromey.com>
6411 * buildsym.c (~buildsym_compunit): Free the macro table.
6412 (struct buildsym_compunit) <get_macro_table, release_macros>: New
6414 <m_pending_macros>: New member.
6415 (pending_macros): Remove.
6416 (~scoped_free_pendings, get_macro_table, prepare_for_building)
6417 (reset_symtab_globals, end_symtab_get_static_block)
6418 (end_symtab_with_blockvector, augment_type_symtab)
6419 (buildsym_init): Update.
6421 2018-07-16 Tom Tromey <tom@tromey.com>
6423 * buildsym.c (buildsym_compunit::buildsym_compunit): Add name
6425 (buildsym_compunit::set_last_source_file): New method.
6426 <m_last_source_file>: New member.
6427 (prepare_for_building): Remove "name" parameter.
6428 (start_symtab, restart_symtab, reset_symtab_globals): Update.
6429 (last_source_file): Remove.
6430 (set_last_source_file, get_last_source_file): Update.
6432 2018-07-16 Tom Tromey <tom@tromey.com>
6434 * buildsym.c (prepare_for_building): Add assert.
6436 2018-07-16 Tom Tromey <tom@tromey.com>
6438 * buildsym.c (~buildsym_compunit): Update.
6439 (struct buildsym_compunit) <comp_unit>: Now a unique_xmalloc_ptr.
6440 (start_subfile, patch_subfile_names)
6441 (end_symtab_with_blockvector): Update.
6443 2018-07-16 Tom Tromey <tom@tromey.com>
6445 * buildsym.c (struct buildsym_compunit): Add constructor,
6446 destructor, initializers.
6447 (start_buildsym_compunit): Remove.
6448 (free_buildsym_compunit): Use "delete".
6449 (start_symtab, restart_symtab): Use "new".
6451 2018-07-13 Simon Marchi <simon.marchi@polymtl.ca>
6453 * symfile.c (set_objfile_default_section_offset): Remove struct
6456 2018-07-14 Stafford Horne <shorne@gmail.com>
6458 * (Responsible Maintainers): Add myself as or1k maintainer.
6460 2018-07-13 Tom Tromey <tom@tromey.com>
6462 * symfile.c (set_objfile_default_section_offset): Use extra braces
6465 2018-07-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
6467 * s390-tdep.c (s390_displaced_step_fixup): Adjust PC for a
6470 2018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
6472 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
6473 unittests/cli-utils-selftests.c
6474 * unittests/cli-utils-selftests.c: New file.
6476 2018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
6478 * NEWS: Mention new commands. Mention change to 'thread apply'.
6480 2018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
6482 * thread.c (thr_try_catch_cmd): New function.
6483 (thread_apply_all_command): Handle qcs flags.
6484 (thread_apply_command): Handle qcs flags.
6485 (taas_command): New function.
6486 (tfaas_command): New function.
6487 (_initialize_thread): Update to setup the new commands 'taas
6488 and 'tfaas'. Change doc string for 'thread apply'.
6490 2018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
6492 * stack.c: (trailing_outermost_frame): New function, mostly
6493 extracted from backtrace_command_1.
6494 (leading_innermost_frame): New function.
6495 (backtrace_command_1): Update to call trailing_outermost_frame.
6496 (frame_apply_command_count): New function.
6497 (frame_apply_level_command): New function.
6498 (frame_apply_all_command): New function.
6499 (frame_apply_command): New function.
6500 (faas_command): New function.
6501 (frame_cmd_list): New variable.
6502 (_initialize_stack): Update to setup the new commands 'frame apply'
6505 2018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
6507 * cli-utils.c (number_or_range_parser::get_number): Only handle
6508 numbers or convenience var as numbers.
6509 (parse_flags): New function.
6510 (parse_flags_qcs): New function.
6511 (number_or_range_parser::finished): Ensure parsing end is detected
6512 before end of string.
6513 * cli-utils.h (parse_flags): New function.
6514 (parse_flags_qcs): New function.
6515 (number_or_range_parser): Remove m_finished bool.
6516 (number_or_range_parser::skip_range): Set m_in_range to false.
6518 2018-07-12 Sergio Durigan Junior <sergiodj@redhat.com>
6520 * ser-tcp.c (try_connect): Declare 'ioarg' as 'u_long' if building
6523 2018-07-11 Sergio Durigan Junior <sergiodj@redhat.com>
6524 Jan Kratochvil <jan.kratochvil@redhat.com>
6525 Paul Fertser <fercerpav@gmail.com>
6526 Tsutomu Seki <sekiriki@gmail.com>
6527 Pedro Alves <palves@redhat.com>
6529 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
6530 'unittests/parse-connection-spec-selftests.c'.
6531 (COMMON_SFILES): Add 'common/netstuff.c'.
6532 (HFILES_NO_SRCDIR): Add 'common/netstuff.h'.
6533 * NEWS (Changes since GDB 8.2): Mention IPv6 support.
6534 * common/netstuff.c: New file.
6535 * common/netstuff.h: New file.
6536 * ser-tcp.c: Include 'netstuff.h' and 'wspiapi.h'.
6537 (wait_for_connect): Update comment. New parameter
6538 'gdb::optional<int> sock' instead of 'struct serial *scb'.
6539 Use 'sock' directly instead of 'scb->fd'.
6540 (try_connect): New function, with code from 'net_open'.
6541 (net_open): Rewrite main loop to deal with multiple
6542 sockets/addresses. Handle IPv6-style hostnames; implement
6543 support for IPv6 connections.
6544 * unittests/parse-connection-spec-selftests.c: New file.
6546 2018-07-11 Pedro Alves <palves@redhat.com>
6549 * remote.c (remote_target::remote_detach_pid): Call
6550 set_current_process.
6552 2018-07-11 Pedro Alves <palves@redhat.com>
6554 * h8300-tdep.c (h8300_gdbarch_init): Remove
6555 set_gdbarch_ecoff_reg_to_regnum calls.
6557 2018-07-11 Sergio Durigan Junior <sergiodj@redhat.com>
6560 * c-typeprint.c (c_type_print_base_struct_union): Don't print
6561 offsets/sizes for static members of a class/struct.
6563 2018-07-11 Alan Hayward <alan.hayward@arm.com>
6565 * target-descriptions.c (tdesc_register_bitsize): Rename.
6566 * target-descriptions.h (tdesc_register_bitsize): Likewise.
6567 * rs6000-tdep.c (rs6000_gdbarch_init): Use new name.
6568 * aarch64-tdep.c (aarch64_get_tdesc_vq): Convert size.
6570 2018-07-10 Tom Tromey <tom@tromey.com>
6572 * breakpoint.c (moribund_locations): Now static and a
6574 (breakpoint_init_inferior, moribund_breakpoint_here_p)
6575 (build_bpstat_chain, update_global_location_list)
6576 (breakpoint_retire_moribund): Update.
6577 * breakpoint.h (bp_location_p): Remove typedef. Don't declare
6580 2018-07-10 Andrew Burgess <andrew.burgess@embecosm.com>
6582 * riscv-tdep.c (riscv_is_fp_regno_p): New function.
6583 (riscv_register_reggroup_p): Use new function, remove unneeded
6585 (riscv_push_dummy_call): Extend assert to compare against xlen or
6586 flen based on register type.
6588 2018-07-10 Andrew Burgess <andrew.burgess@embecosm.com>
6590 * riscv-tdep.c (riscv_print_arg_location): Use TYPE_SAFE_NAME.
6592 2018-07-09 Andrew Burgess <andrew.burgess@embecosm.com>
6594 * remote.c (show_hardware_watchpoint_limit): New function.
6595 (show_hardware_watchpoint_length_limit): New function.
6596 (show_hardware_breakpoint_limit): New function.
6597 (_initialize_remote): Use add_setshow_zuinteger_unlimited_cmd
6598 where appropriate, update help text.
6600 2018-07-09 Tom Tromey <tom@tromey.com>
6602 * Makefile.in (CDEPS): Don't mention XM_CDEPS.
6603 (CLIBS): Don't mention NAT_CLIBS.
6605 2018-07-09 Tom Tromey <tom@tromey.com>
6607 * Makefile.in (ADD_FILES, ADD_DEPS): Remove.
6608 (LIBGDB_OBS, clean mostlyclean): Update.
6609 (gdb$(EXEEXT), insight$(EXEEXT)): Update.
6611 2018-07-09 Tom Tromey <tom@tromey.com>
6613 * Makefile.in (%.c: %.y): Use ECHO_YACC.
6614 (%.c: %.l): Use ECHO_LEX. Just fail if flex not available.
6615 * silent-rules.mk (ECHO_YACC, ECHO_LEX): New variables.
6617 2018-07-09 Tom Tromey <tom@tromey.com>
6619 * Makefile.in (ALLDEPFILES): Remove exec.c.
6620 (COMMON_OBS): Remove exec.o.
6621 (COMMON_SFILES): Add exec.c.
6623 2018-07-09 Tom Tromey <tom@tromey.com>
6625 * Makefile.in (LINT, LINTFLAGS, LINTFILES, lint): Remove.
6627 2018-07-09 Tom Tromey <tom@tromey.com>
6629 * Makefile.in (clean mostlyclean): Remove stamp-version.
6630 (version.c): Depend on stamp-version.
6631 (stamp-version): New rule, from version.c rule.
6633 2018-07-09 Tom Tromey <tom@tromey.com>
6635 * Makefile.in (init.c): Depend on stamp-init.
6636 (stamp-init): New rule, from init.c rule.
6637 (clean mostlyclean): Remove stamp-init.
6639 2018-07-09 Tom Tromey <tom@tromey.com>
6641 * Makefile.in (INIT_FILES): Remove CONFIG_SRCS,
6642 SUBDIR_GCC_COMPILE_SRCS.
6644 2018-07-09 Tom Tromey <tom@tromey.com>
6646 * Makefile.in (init.c): Remove some unused sed rules.
6648 2018-07-09 Tom Tromey <tom@tromey.com>
6650 * Makefile.in (TSOBS): Remove.
6651 (INIT_FILES): Update.
6652 (LIBGDB_OBS): Update.
6653 (COMMON_SFILES): Add inflow.c.
6654 (SFILES): Remove inflow.c.
6656 2018-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
6658 * contrib/gdb-add-index.sh ($dwarf5): New, use it.
6660 2018-07-07 Simon Marchi <simon.marchi@polymtl.ca>
6662 * ia64-libunwind-tdep.c (get_reg_name, get_fpreg_name,
6663 get_saveloc_name, is_signal_frame_name, step_name,
6664 init_remote_name, create_addr_space_name,
6665 destroy_addr_space_name, search_unwind_table_name,
6666 find_dyn_list_name): Constify.
6668 2018-07-05 Simon Marchi <simon.marchi@polymtl.ca>
6670 * darwin-nat.c (darwin_pthread_kill): New function.
6671 (darwin_resume_thread): Use darwin_pthread_kill.
6673 2018-07-05 Tom de Vries <tdevries@suse.de>
6675 * macroexp.c (macro_buffer) <operator=>: New member function.
6677 2018-07-04 Tom Tromey <tom@tromey.com>
6679 * darwin-nat.c (darwin_attach_pid): Use exit_inferior.
6681 2018-07-04 Simon Marchi <simon.marchi@polymtl.ca>
6683 * common/common-defs.h (HAVE_USEFUL_SBRK): Define.
6684 * main.c: Use HAVE_USEFUL_SBRK instead of HAVE_SBRK.
6685 * maint.c: Likewise.
6688 2018-07-04 Joel Brobecker <brobecker@adacore.com>
6690 * NEWS: Create a new section for the next release branch.
6691 Rename the section of the current branch, now that it has
6694 2018-07-04 Joel Brobecker <brobecker@adacore.com>
6696 GDB 8.2 branch created (1b919490e8ba30bf1d6941df0ed112b0e557017e):
6697 * version.in: Bump version to 8.2.50.DATE-git.
6699 2018-07-04 Vyacheslav Barinov <v.barinov@samsung.com>
6700 Pedro Alves <palves@redhat.com>
6702 * linux-nat.c (linux_init_ptrace): Rename to ...
6703 (linux_init_ptrace_procfs): ... this. Call
6704 linux_proc_init_warnings.
6705 (linux_nat_target::post_attach)
6706 (linux_nat_target::post_startup_inferior): Adjust.
6707 * nat/linux-procfs.c (linux_proc_init_warnings): Define function.
6708 * nat/linux-procfs.h (linux_proc_init_warnings): Declare function.
6710 2018-07-04 Tom de Vries <tdevries@suse.de>
6712 * dwarf2read.c (error_check_comp_unit_head): Move dwarf version
6714 (read_comp_unit_head): ... here.
6716 2018-07-03 Tom Tromey <tom@tromey.com>
6718 * tracepoint.c (process_tracepoint_on_disconnect, start_tracing)
6719 (stop_tracing, tstatus_command)
6720 (find_matching_tracepoint_location, merge_uploaded_tracepoints)
6721 (print_one_static_tracepoint_marker): Update.
6722 * breakpoint.c (static_tracepoints_here, all_tracepoints): Return
6724 * breakpoint.h (breakpoint_p): Remove typedef. Don't declare
6726 (all_tracepoints, static_tracepoints_here): Return std::vector.
6728 2018-07-03 Tom Tromey <tom@tromey.com>
6730 * common/ptid.c (ptid_equal): Remove.
6731 * common/ptid.h (ptid_equal): Don't declare.
6732 * ada-tasks.c: Update.
6733 * breakpoint.c: Update.
6734 * common/agent.c: Update.
6735 * corelow.c: Update.
6736 * darwin-nat-info.c: Update.
6737 * darwin-nat.c: Update.
6739 * dtrace-probe.c: Update.
6740 * dummy-frame.c: Update.
6741 * fbsd-nat.c: Update.
6743 * gdbthread.h: Update.
6744 * gnu-nat.c: Update.
6745 * go32-nat.c: Update.
6746 * inf-loop.c: Update.
6747 * inf-ptrace.c: Update.
6748 * infcall.c: Update.
6752 * linux-fork.c: Update.
6753 * linux-nat.c: Update.
6754 * linux-thread-db.c: Update.
6755 * mi/mi-cmd-var.c: Update.
6756 * mi/mi-interp.c: Update.
6757 * mi/mi-main.c: Update.
6758 * nto-procfs.c: Update.
6759 * ppc-linux-tdep.c: Update.
6761 * python/py-inferior.c: Update.
6762 * python/py-record-btrace.c: Update.
6763 * python/py-record.c: Update.
6764 * ravenscar-thread.c: Update.
6765 * regcache.c: Update.
6766 * remote-sim.c: Update.
6768 * sol-thread.c: Update.
6771 * tui/tui-stack.c: Update.
6773 * windows-nat.c: Update.
6774 * windows-tdep.c: Update.
6776 2018-07-03 Tom Tromey <tom@tromey.com>
6778 * common/ptid.c (ptid_match): Remove.
6779 * common/ptid.h (ptid_match): Don't declare.
6780 * fbsd-nat.c: Update.
6783 * linux-nat.c: Update.
6784 * record-btrace.c: Update.
6785 * regcache.c: Update.
6788 2018-07-03 Tom Tromey <tom@tromey.com>
6790 * common/ptid.c (ptid_tid_p): Remove.
6791 * common/ptid.h (ptid_tid_p): Don't declare.
6792 * sol-thread.c: Update.
6794 2018-07-03 Tom Tromey <tom@tromey.com>
6796 * common/ptid.c (ptid_lwp_p): Remove.
6797 * common/ptid.h (ptid_lwp_p): Don't declare.
6798 * fbsd-nat.c: Update.
6799 * linux-nat.c: Update.
6800 * nat/linux-procfs.c: Update.
6801 * nat/x86-linux-dregs.c: Update.
6802 * sol-thread.c: Update.
6804 2018-07-03 Tom Tromey <tom@tromey.com>
6806 * common/ptid.c (ptid_is_pid): Remove.
6807 * common/ptid.h (ptid_is_pid): Don't declare.
6809 * linux-nat.c: Update.
6810 * mi/mi-interp.c: Update.
6814 2018-07-03 Tom Tromey <tom@tromey.com>
6816 * common/ptid.c (ptid_get_tid): Remove.
6817 * common/ptid.h (ptid_get_tid): Don't declare.
6818 * ada-tasks.c: Update.
6819 * aix-thread.c: Update.
6820 * bsd-uthread.c: Update.
6821 * darwin-nat.c: Update.
6822 * fbsd-nat.c: Update.
6823 * i386-darwin-nat.c: Update.
6825 * linux-tdep.c: Update.
6826 * nto-procfs.c: Update.
6827 * ppc-ravenscar-thread.c: Update.
6828 * python/py-infthread.c: Update.
6829 * ravenscar-thread.c: Update.
6830 * sol-thread.c: Update.
6831 * sparc-ravenscar-thread.c: Update.
6832 * windows-nat.c: Update.
6834 2018-07-03 Tom Tromey <tom@tromey.com>
6836 * common/ptid.c (ptid_get_lwp): Remove.
6837 * common/ptid.h (ptid_get_lwp): Don't declare.
6838 * aarch64-linux-nat.c: Update.
6839 * ada-tasks.c: Update.
6840 * aix-thread.c: Update.
6841 * amd64-linux-nat.c: Update.
6842 * arm-linux-nat.c: Update.
6843 * corelow.c: Update.
6844 * fbsd-nat.c: Update.
6845 * fbsd-tdep.c: Update.
6846 * gnu-nat.c: Update.
6847 * i386-cygwin-tdep.c: Update.
6848 * i386-gnu-nat.c: Update.
6849 * i386-linux-nat.c: Update.
6850 * ia64-linux-nat.c: Update.
6851 * inf-ptrace.c: Update.
6853 * linux-fork.c: Update.
6854 * linux-nat.c: Update.
6855 * linux-tdep.c: Update.
6856 * linux-thread-db.c: Update.
6857 * mips-linux-nat.c: Update.
6858 * nat/aarch64-linux-hw-point.c: Update.
6859 * nat/aarch64-linux.c: Update.
6860 * nat/linux-btrace.c: Update.
6861 * nat/linux-osdata.c: Update.
6862 * nat/linux-procfs.c: Update.
6863 * nat/x86-linux-dregs.c: Update.
6864 * obsd-nat.c: Update.
6865 * ppc-fbsd-nat.c: Update.
6866 * ppc-linux-nat.c: Update.
6868 * python/py-infthread.c: Update.
6869 * ravenscar-thread.c: Update.
6871 * s390-linux-nat.c: Update.
6872 * sol-thread.c: Update.
6873 * sol2-tdep.c: Update.
6874 * spu-linux-nat.c: Update.
6875 * x86-linux-nat.c: Update.
6876 * xtensa-linux-nat.c: Update.
6878 2018-07-03 Tom Tromey <tom@tromey.com>
6880 * common/ptid.c (ptid_get_pid): Remove.
6881 * common/ptid.h (ptid_get_pid): Don't declare.
6882 * aarch64-linux-nat.c: Update.
6883 * ada-lang.c: Update.
6884 * aix-thread.c: Update.
6885 * alpha-bsd-nat.c: Update.
6886 * amd64-fbsd-nat.c: Update.
6887 * amd64-linux-nat.c: Update.
6888 * arm-linux-nat.c: Update.
6889 * arm-nbsd-nat.c: Update.
6891 * break-catch-syscall.c: Update.
6892 * breakpoint.c: Update.
6893 * bsd-uthread.c: Update.
6894 * corelow.c: Update.
6896 * darwin-nat.c: Update.
6897 * fbsd-nat.c: Update.
6898 * fbsd-tdep.c: Update.
6900 * gnu-nat.c: Update.
6901 * hppa-nbsd-nat.c: Update.
6902 * hppa-obsd-nat.c: Update.
6903 * i386-fbsd-nat.c: Update.
6904 * ia64-linux-nat.c: Update.
6905 * inf-ptrace.c: Update.
6907 * inferior.c: Update.
6908 * inferior.h: Update.
6911 * linux-fork.c: Update.
6912 * linux-nat.c: Update.
6913 * linux-tdep.c: Update.
6914 * linux-thread-db.c: Update.
6915 * m68k-bsd-nat.c: Update.
6916 * mi/mi-interp.c: Update.
6917 * mi/mi-main.c: Update.
6918 * mips-linux-nat.c: Update.
6919 * mips-nbsd-nat.c: Update.
6920 * mips64-obsd-nat.c: Update.
6921 * nat/aarch64-linux-hw-point.c: Update.
6922 * nat/aarch64-linux.c: Update.
6923 * nat/linux-btrace.c: Update.
6924 * nat/linux-osdata.c: Update.
6925 * nat/linux-procfs.c: Update.
6926 * nat/x86-linux-dregs.c: Update.
6927 * nto-procfs.c: Update.
6928 * obsd-nat.c: Update.
6929 * ppc-linux-nat.c: Update.
6930 * ppc-nbsd-nat.c: Update.
6931 * ppc-obsd-nat.c: Update.
6932 * proc-service.c: Update.
6934 * python/py-inferior.c: Update.
6935 * python/py-infthread.c: Update.
6936 * ravenscar-thread.c: Update.
6938 * remote-sim.c: Update.
6940 * rs6000-nat.c: Update.
6941 * s390-linux-nat.c: Update.
6942 * sh-nbsd-nat.c: Update.
6943 * sol-thread.c: Update.
6944 * sparc-nat.c: Update.
6945 * sparc64-tdep.c: Update.
6946 * spu-linux-nat.c: Update.
6947 * spu-tdep.c: Update.
6948 * target-debug.h: Update.
6951 * tid-parse.c: Update.
6952 * tracefile-tfile.c: Update.
6953 * vax-bsd-nat.c: Update.
6954 * windows-nat.c: Update.
6955 * x86-linux-nat.c: Update.
6956 * x86-nat.c: Update.
6958 2018-07-03 Tom Tromey <tom@tromey.com>
6960 * common/ptid.c (pid_to_ptid): Remove.
6961 * common/ptid.h (pid_to_ptid): Don't declare.
6962 * aix-thread.c: Update.
6963 * arm-linux-nat.c: Update.
6964 * common/ptid.c: Update.
6965 * common/ptid.h: Update.
6966 * corelow.c: Update.
6968 * darwin-nat.c: Update.
6969 * fbsd-nat.c: Update.
6970 * fork-child.c: Update.
6971 * gnu-nat.c: Update.
6972 * go32-nat.c: Update.
6973 * inf-ptrace.c: Update.
6975 * inferior.c: Update.
6977 * linux-fork.c: Update.
6978 * linux-nat.c: Update.
6979 * nat/aarch64-linux-hw-point.c: Update.
6980 * nat/fork-inferior.c: Update.
6981 * nat/x86-linux-dregs.c: Update.
6982 * nto-procfs.c: Update.
6983 * obsd-nat.c: Update.
6985 * progspace.c: Update.
6987 * rs6000-nat.c: Update.
6988 * s390-linux-nat.c: Update.
6989 * sol-thread.c: Update.
6990 * spu-linux-nat.c: Update.
6993 * tracefile-tfile.c: Update.
6994 * windows-nat.c: Update.
6996 2018-07-03 Tom Tromey <tom@tromey.com>
6998 * common/ptid.h (ptid_build): Don't declare.
6999 * common/ptid.c (ptid_build): Remove.
7000 * aix-thread.c: Update.
7001 * bsd-kvm.c: Update.
7002 * bsd-uthread.c: Update.
7003 * common/agent.c: Update.
7004 * common/ptid.c: Update.
7005 * common/ptid.h: Update.
7006 * corelow.c: Update.
7007 * darwin-nat.c: Update.
7008 * fbsd-nat.c: Update.
7009 * gnu-nat.c: Update.
7010 * linux-fork.c: Update.
7011 * linux-nat.c: Update.
7012 * linux-thread-db.c: Update.
7013 * nat/linux-osdata.c: Update.
7014 * nat/linux-procfs.c: Update.
7015 * nto-procfs.c: Update.
7016 * obsd-nat.c: Update.
7017 * proc-service.c: Update.
7019 * ravenscar-thread.c: Update.
7020 * remote-sim.c: Update.
7022 * sol-thread.c: Update.
7024 * windows-nat.c: Update.
7026 2018-07-03 Tom Tromey <tom@tromey.com>
7028 * infrun.c (follow_exec): Use exit_inferior_silent.
7029 * inferior.c (exit_inferior_num_silent): Remove.
7030 * inferior.h (exit_inferior_num_silent): Don't declare.
7032 2018-07-03 Tom Tromey <tom@tromey.com>
7035 * darwin-nat.c (darwin_attach_pid): Reset inferior and
7036 inferior_ptid on error.
7038 2018-07-02 Maciej W. Rozycki <macro@mips.com>
7039 Simon Marchi <simon.marchi@polymtl.ca>
7042 * disasm.h (gdb_disassembler): Add
7043 `m_disassembler_options_holder'. member
7044 * disasm.c (get_all_disassembler_options): New function.
7045 (gdb_disassembler::gdb_disassembler): Use it.
7046 (gdb_buffered_insn_length_init_dis): Likewise.
7047 (gdb_buffered_insn_length): Adjust accordingly.
7048 (set_disassembler_options): Handle options with arguments.
7049 (show_disassembler_options_sfunc): Likewise. Add a leading new
7050 line if showing options with descriptions.
7051 (disassembler_options_completer): Adapt to using the
7052 `disasm_options_and_args_t' structure.
7053 * mips-tdep.c (mips_disassembler_options): New variable.
7054 (mips_disassembler_options_o32): Likewise.
7055 (mips_disassembler_options_n32): Likewise.
7056 (mips_disassembler_options_n64): Likewise.
7057 (gdb_print_insn_mips): Don't set `disassembler_options'.
7058 (gdb_print_insn_mips_n32, gdb_print_insn_mips_n64): Remove
7060 (mips_gdbarch_init): Always set `gdbarch_print_insn' to
7061 `gdb_print_insn_mips'. Set `gdbarch_disassembler_options',
7062 `gdbarch_disassembler_options_implicit' and
7063 `gdbarch_valid_disassembler_options'.
7064 * arm-tdep.c (_initialize_arm_tdep): Adapt to using the
7065 `disasm_options_and_args_t' structure.
7066 * gdbarch.sh (disassembler_options_implicit): New `gdbarch'
7068 (valid_disassembler_options): Switch from `disasm_options_t' to
7069 the `disasm_options_and_args_t' structure.
7070 * NEWS: Document `set disassembler-options' support for the MIPS
7072 * gdbarch.h: Regenerate.
7073 * gdbarch.c: Regenerate.
7075 2018-07-02 Sebastian Huber <sebastian.huber@embedded-brains.de>
7077 * riscv-tdep.c (riscv_register_aliases): Swap "fp" and "s0" entries.
7079 2018-06-29 Joel Brobecker <brobecker@adacore.com>
7081 * amd64-darwin-tdep.c (x86_darwin_init_abi_64): Add missing
7082 parameter in call to amd64_target_description.
7083 * amd64-dicos-tdep.c (amd64_dicos_init_abi): Likewise.
7084 * amd64-fbsd-tdep.c (amd64fbsd_core_read_description)
7085 (amd64fbsd_init_abi): Likewise.
7086 * amd64-nbsd-tdep.c (amd64nbsd_init_abi): Likewise.
7087 * amd64-obsd-tdep.c (amd64obsd_init_abi): Likewise.
7088 * amd64-sol2-tdep.c (amd64_sol2_init_abi): Likewise.
7089 * amd64-fbsd-nat.c (amd64_fbsd_nat_target): Likewise.
7091 2018-06-29 Pedro Alves <palves@redhat.com>
7093 * gdb/amd64-tdep.h (amd64_create_target_description): Add
7094 "segments" parameter.
7095 * gdb/amd64-tdep.c (amd64_none_init_abi, amd64_x32_none_init_abi)
7096 (_initialize_amd64_tdep): Update call to
7097 amd64_create_target_description.
7098 (amd64_target_description): Add "segments" parameter. Adjust
7099 the implementation to use it.
7100 * gdb/amd64-linux-tdep.c (amd64_linux_read_description): Update
7101 call to amd64_create_target_description.
7102 * gdb/amd64-windows-tdep.c (amd64_windows_init_abi): Likewise.
7103 * gdb/arch/amd64.h (amd64_create_target_description): Add
7104 "segments" register.
7105 * gdb/arch/amd64.c (amd64_create_target_description): Add
7106 "segments" parameter. Call create_feature_i386_64bit_segments
7107 only if SEGMENTS is true.
7108 * gdb/gdbserver/win32-i386-low.c (i386_arch_setup): Update
7109 call to amd64_create_target_description.
7111 2018-06-29 Pedro Alves <palves@redhat.com>
7113 * thread.c (thread_target_id_str): New, factored out from ...
7114 (print_thread_info_1): ... here. Use it to compute the max
7115 "Target Id" column width.
7117 2018-06-29 Pedro Alves <palves@redhat.com>
7119 * remote.c (remote_target::extra_thread_info): Delete
7120 'display_buf' and 'n' locals. from the cache, regardless of
7121 packet mechanims is in use. Use cache for qThreadExtra and qP
7124 2018-06-29 Pedro Alves <palves@redhat.com>
7126 * blockframe.c (find_pc_sect_containing_function): New function.
7127 * breakpoint.c (print_breakpoint_location): Don't call
7128 find_pc_sect_function.
7129 * linespec.c (create_sals_line_offset): Record the location's
7131 * linespec.c (convert_address_location_to_sals): Fill in sal's
7132 symbol with find_pc_sect_containing_function.
7133 * symtab.c (find_function_start_sal): Rename to ...
7134 (find_function_start_sal_1): ... this.
7135 (find_function_start_sal): Reimplement as wrapper around
7136 find_function_start_sal_1, and use
7137 find_pc_sect_containing_function to fill in the sal's symbol.
7138 (find_function_start_sal(symbol*, bool)): Adjust.
7139 * symtab.h (find_pc_function, find_pc_sect_function): Adjust
7141 (find_pc_sect_containing_function): Declare.
7143 2018-06-29 Pedro Alves <palves@redhat.com>
7145 * inline-frame.c (stopped_by_user_bp_inline_frame): Return
7146 true if the the location has no symbol.
7148 2018-06-28 Tom Tromey <tom@tromey.com>
7150 * NEWS: Mention --enable-codesign.
7151 * silent-rules.mk (ECHO_SIGN): New variable.
7152 * configure.ac: Add --enable-codesign.
7153 * configure: Rebuild.
7154 * Makefile.in (CODESIGN, CODESIGN_CERT): New variables.
7155 (gdb$(EXEEXT)): Optionally invoke codesign.
7157 2018-06-28 Pedro Alves <palves@redhat.com>
7159 * gdbthread.h (struct thread_suspend_state) <stop_pc>: Extend
7161 (switch_to_thread_no_regs): Adjust comment.
7162 * infcmd.c (stop_pc): Delete.
7163 (post_create_inferior, info_program_command): Replace references
7164 to stop_pc with references to thread_info->suspend.stop_pc.
7165 * inferior.h (stop_pc): Delete declaration.
7166 * infrun.c (proceed, handle_syscall_event, fill_in_stop_func)
7167 (handle_inferior_event_1, handle_signal_stop)
7168 (process_event_stop_test, keep_going_stepped_thread)
7169 (handle_step_into_function, handle_step_into_function_backward)
7170 (print_stop_location): Replace references to stop_pc with
7171 references to thread_info->suspend.stop_pc.
7172 (struct infcall_suspend_state) <stop_pc>: Delete field.
7173 (save_infcall_suspend_state, restore_infcall_suspend_state):
7174 Remove references to inf_stat->stop_pc.
7175 * linux-fork.c (fork_load_infrun_state): Likewise.
7176 * record-btrace.c (record_btrace_set_replay): Likewise.
7177 * record-full.c (record_full_goto_entry): Likewise.
7178 * remote.c (print_one_stopped_thread): Likewise.
7179 * target.c (target_resume): Extend comment.
7180 * thread.c (set_executing_thread): New.
7181 (set_executing): Use it.
7182 (switch_to_thread_no_regs, switch_to_no_thread, switch_to_thread):
7183 Remove references to stop_pc.
7185 2018-06-28 Pedro Alves <palves@redhat.com>
7187 * infrun.c (handle_inferior_event_1) <TARGET_WAITKIND_EXECD>:
7188 Moving fetching stop_pc until after ecs->event_thread is refreshed.
7190 2018-06-28 Tom Tromey <tom@tromey.com>
7192 * coffread.c (coff_symfile_finish): Update.
7193 * xcoffread.c (xcoff_symfile_finish): Update.
7194 * elfread.c (elf_symfile_finish): Update.
7195 * symfile.h (dwarf2_free_objfile): Don't declare.
7196 * dwarf2read.c (_initialize_dwarf2_read): Use
7197 register_objfile_data_with_cleanup.
7198 (dwarf2_free_objfile): Now static. Change signature.
7200 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
7202 * symfile.c (add_symbol_file_command, _initialize_symfile): Add
7203 option "-o" to add-symbol-file-load to add an offset to each
7204 section's load address.
7205 * symfile.c (set_objfile_default_section_offset): New function.
7207 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
7209 * symfile.c (add_symbol_file_command): Make sure that sections
7210 with the same name are sorted in the same order.
7212 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
7214 * symfile.c (add_symbol_file_command, _initialize_symfile): Do not
7215 require the second argument. If omitted, load sections at the
7216 addresses specified in the file.
7218 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
7220 * symfile.c (symbol_file_command, symbol_file_add_main_1)
7221 (_initialize_symfile): Add option "-o" to symbol-file to add an
7222 offset to each section of the symbol file.
7224 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
7226 * MAINTAINERS (Write After Approval): Add Petr Tesarik.
7228 2018-06-27 Tom Tromey <tom@tromey.com>
7230 * stack.c (_initialize_stack): Update "func" help text.
7232 2018-06-27 Tom Tromey <tom@tromey.com>
7234 * python/py-unwind.c (unwind_info_object) <saved_regs>: Now a
7236 (unwind_infopy_str, pyuw_create_unwind_info)
7237 (unwind_infopy_add_saved_register, pyuw_sniffer)
7238 (unwind_infopy_dealloc, unwind_infopy_add_saved_register):
7240 (struct saved_reg): Add constructor.
7241 <value>: Now a gdbpy_ref<>.
7243 2018-06-27 Tom Tromey <tom@tromey.com>
7245 * machoread.c (macho_symfile_read): Define "symbol_table" earlier.
7247 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
7249 * gdb-gdb.py.in: Format using autopep8.
7251 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
7253 * gdb-gdb.py.in (CoreAddrPrettyPrinter): New class.
7254 (type_lookup_function): Recognize CORE_ADDR values.
7256 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
7258 * gdb-gdb.py.in (StructMainTypePrettyPrinter) <to_string>: Don't
7261 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
7263 * gdb-gdb.py.in (TypeFlag) <__cmp__>: Remove.
7266 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
7268 * gdb-gdb.py: Move to...
7269 * gdb-gdb.py.in: ... here.
7270 * configure.ac (AC_CONFIG_FILES): Add gdb-gdb.py.
7271 * Makefile.in (all): Add gdb-gdb.gdb and gdb-gdb.py as
7273 (distclean): Remove gdb-gdb.py when cleaning.
7274 (gdb-gdb.py, gdb-gdb.gdb): New rules.
7275 * configure: Re-generate.
7277 2018-06-27 Pedro Alves <palves@redhat.com>
7279 * proc-service.c (get_ps_regcache): New.
7280 (ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
7281 (ps_lsetfpregs): Use it.
7283 2018-06-27 Omair Javaid <omair.javaid@linaro.org>
7286 * dwarf2read.c (lnp_state_machine::check_line_address): Update
7288 (dwarf_decode_lines_1): Adjust.
7290 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
7292 * fbsd-nat.h (class fbsd_nat_target) <find_memory_regions>: Add
7294 <info_proc>: Likewise.
7296 2018-06-26 Joel Brobecker <brobecker@adacore.com>
7298 * windows-nat.c (do_windows_fetch_inferior_registers): Rename
7299 to windows_fetch_one_register, and only handle the case of
7300 fetching one register. Move the code that reloads the context
7301 and iterates over all registers if R is negative to...
7302 (windows_nat_target::fetch_registers): ... here.
7303 (do_windows_store_inferior_registers): Rename to
7304 windows_store_one_register, and only handle the case of storing
7305 one register. Move the code that handles the case where r is
7307 (windows_nat_target::store_registers) ... here.
7309 2018-06-26 Tom Tromey <tom@tromey.com>
7312 * typeprint.c (whatis_exp): Allow ptype/o for Rust.
7313 * rust-lang.c (rust_print_struct_def): Add podata parameter.
7315 (rust_internal_print_type): Add podata parameter.
7316 (rust_print_type): Update.
7318 2018-06-26 Tom Tromey <tom@tromey.com>
7320 * typeprint.h (struct print_offset_data) <update, finish,
7321 maybe_print_hole>: New methods.
7322 <indentation>: New constant.
7323 * typeprint.c (print_offset_data::indentation): Define.
7324 (print_offset_data::maybe_print_hole, print_offset_data::update)
7325 (print_offset_data::finish): Move from c-typeprint.c and rename.
7326 * c-typeprint.c (OFFSET_SPC_LEN): Remove.
7327 (print_spaces_filtered_with_print_options): Update.
7328 (c_print_type_union_field_offset, maybe_print_hole)
7329 (c_print_type_struct_field_offset): Move to typeprint.c and
7331 (c_type_print_base_struct_union): Update.
7333 2018-06-25 Pedro Alves <palves@redhat.com>
7335 * gdbthread.h (thread_info_ref, delete_thread)
7336 (delete_thread_silent, first_thread_of_inferior)
7337 (any_thread_of_inferior, switch_to_thread)
7338 (enable_thread_stack_temporaries)
7339 (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
7340 (get_last_thread_stack_temporary)
7341 (value_in_thread_stack_temporaries, can_access_registers_thread):
7342 Spell out "struct thread_info" instead of just "thread_info".
7343 * inferior.h (notice_new_inferior): Likewise.
7345 2018-06-25 Pedro Alves <palves@redhat.com>
7347 * windows-nat.c (windows_delete_thread): Use find_thread_ptid and
7348 pass thread_info pointer to delete_thread.
7349 (windows_nat_target::detach): Pass inferior pointer to
7351 * aix-thread.c (sync_threadlists): Pass thread_info pointer to
7353 * bsd-kvm.c (bsd_kvm_target::close): Use discard_all_inferiors.
7354 * darwin-nat.c (darwin_check_new_threads): Use find_thread_ptid
7355 and pass a thread_info pointer to delete_thread.
7356 * fbsd-nat.c (fbsd_nat_target::wait): Use find_thread_ptid and
7357 pass thread_info pointer to delete_thread.
7358 * go32-nat.c (go32_nat_target::mourn_inferior): Remove
7359 delete_thread_silent call.
7360 * procfs.c (procfs_target::detach): Pass inferior pointer to
7362 (procfs_target::wait): Pass thread_info pointer to delete_thread.
7363 * remote-sim.c (gdbsim_target::mourn_inferior): Remove
7364 delete_thread_silent call.
7365 * windows-nat.c (windows_delete_thread): Use find_thread_ptid and
7366 pass thread_info pointer to delete_thread.
7367 (windows_nat_target::detach): Pass inferior pointer to
7370 2018-06-22 Alan Hayward <alan.hayward@arm.com>
7372 * regcache.c (readable_regcache::read_part): Fix asserts.
7373 (reg_buffer::raw_collect_part): New function.
7374 (regcache::write_part): Fix asserts.
7375 (reg_buffer::raw_supply_part): New function.
7376 (regcache::transfer_regset_register): New helper function.
7377 (regcache::transfer_regset): Call new functions.
7378 (regcache_supply_regset): Use gdb_byte*.
7379 (regcache::supply_regset): Likewise.
7380 (regcache_collect_regset): Likewise.
7381 (regcache::collect_regset): Likewise.
7382 * regcache.h (reg_buffer::raw_collect_part): New declaration.
7383 (reg_buffer::raw_supply_part): Likewise.
7384 (regcache::transfer_regset_register): Likewise.
7385 (regcache::transfer_regset): Use gdb_byte*.
7387 2018-06-22 Alan Hayward <alan.hayward@arm.com>
7389 * nat/aarch64-sve-linux-ptrace.h (HAS_SVE_STATE): Use &.
7391 2018-06-21 Pedro Alves <palves@redhat.com>
7393 * ada-lang.h (ada_get_task_number): Take a thread_info pointer
7394 instead of a ptid_t. All callers adjusted.
7395 * ada-tasks.c (ada_get_task_number): Likewise. All callers
7397 (print_ada_task_info, display_current_task_id, task_command_1):
7399 * breakpoint.c (watchpoint_in_thread_scope): Adjust to use
7401 (breakpoint_kind): Adjust.
7402 (remove_breakpoints_pid): Rename to ...
7403 (remove_breakpoints_inf): ... this. Adjust to take an inferior
7404 pointer. All callers adjusted.
7405 (bpstat_clear_actions): Use inferior_thread.
7406 (get_bpstat_thread): New.
7407 (bpstat_do_actions): Use it.
7408 (bpstat_check_breakpoint_conditions, bpstat_stop_status): Adjust
7409 to take a thread_info pointer. All callers adjusted.
7410 (set_longjmp_breakpoint_for_call_dummy, set_momentary_breakpoint)
7411 (breakpoint_re_set_thread): Use inferior_thread.
7412 * breakpoint.h (struct inferior): Forward declare.
7413 (bpstat_stop_status): Update.
7414 (remove_breakpoints_pid): Delete.
7415 (remove_breakpoints_inf): New.
7416 * bsd-uthread.c (bsd_uthread_target::wait)
7417 (bsd_uthread_target::update_thread_list): Use find_thread_ptid.
7418 * btrace.c (btrace_add_pc, btrace_enable, btrace_fetch)
7419 (maint_btrace_packet_history_cmd)
7420 (maint_btrace_clear_packet_history_cmd): Adjust.
7421 (maint_btrace_clear_cmd, maint_info_btrace_cmd): Adjust to use
7423 * cli/cli-interp.c: Include "inferior.h".
7424 * common/refcounted-object.h (struct
7425 refcounted_object_ref_policy): New.
7426 * compile/compile-object-load.c: Include gdbthread.h.
7427 (store_regs): Use inferior_thread.
7428 * corelow.c (core_target::close): Use current_inferior.
7429 (core_target_open): Adjust to use first_thread_of_inferior and use
7430 the current inferior.
7431 * ctf.c (ctf_target::close): Adjust to use current_inferior.
7432 * dummy-frame.c (dummy_frame_id) <ptid>: Delete, replaced by ...
7433 <thread>: ... this new field. All references adjusted.
7434 (dummy_frame_pop, dummy_frame_discard, register_dummy_frame_dtor):
7435 Take a thread_info pointer instead of a ptid_t.
7436 * dummy-frame.h (dummy_frame_push, dummy_frame_pop)
7437 (dummy_frame_discard, register_dummy_frame_dtor): Take a
7438 thread_info pointer instead of a ptid_t.
7439 * elfread.c: Include "inferior.h".
7440 (elf_gnu_ifunc_resolver_stop, elf_gnu_ifunc_resolver_return_stop):
7441 Use inferior_thread.
7442 * eval.c (evaluate_subexp): Likewise.
7443 * frame.c (frame_pop, has_stack_frames, find_frame_sal): Use
7445 * gdb_proc_service.h (struct thread_info): Forward declare.
7446 (struct ps_prochandle) <ptid>: Delete, replaced by ...
7447 <thread>: ... this new field. All references adjusted.
7448 * gdbarch.h, gdbarch.c: Regenerate.
7449 * gdbarch.sh (get_syscall_number): Replace 'ptid' parameter with a
7450 'thread' parameter. All implementations and callers adjusted.
7451 * gdbthread.h (thread_info) <set_running>: New method.
7452 (delete_thread, delete_thread_silent): Take a thread_info pointer
7454 (global_thread_id_to_ptid, ptid_to_global_thread_id): Delete.
7455 (first_thread_of_process): Delete, replaced by ...
7456 (first_thread_of_inferior): ... this new function. All callers
7458 (any_live_thread_of_process): Delete, replaced by ...
7459 (any_live_thread_of_inferior): ... this new function. All callers
7461 (switch_to_thread, switch_to_no_thread): Declare.
7462 (is_executing): Delete.
7463 (enable_thread_stack_temporaries): Update comment.
7464 <enable_thread_stack_temporaries>: Take a thread_info pointer
7465 instead of a ptid_t. Incref the thread.
7466 <~enable_thread_stack_temporaries>: Decref the thread.
7469 (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
7470 (get_last_thread_stack_temporary)
7471 (value_in_thread_stack_temporaries, can_access_registers_thread):
7472 Take a thread_info pointer instead of a ptid_t. All callers
7474 * infcall.c (get_call_return_value): Use inferior_thread.
7475 (run_inferior_call): Work with thread pointers instead of ptid_t.
7476 (call_function_by_hand_dummy): Work with thread pointers instead
7477 of ptid_t. Use thread_info_ref.
7478 * infcmd.c (proceed_thread_callback): Access thread's state
7480 (ensure_valid_thread, ensure_not_running): Use inferior_thread,
7481 access thread's state directly.
7482 (continue_command): Use inferior_thread.
7483 (info_program_command): Use find_thread_ptid and access thread
7485 (proceed_after_attach_callback): Use thread state directly.
7486 (notice_new_inferior): Take a thread_info pointer instead of a
7487 ptid_t. All callers adjusted.
7488 (exit_inferior): Take an inferior pointer instead of a pid. All
7490 (exit_inferior_silent): New.
7491 (detach_inferior): Delete.
7492 (valid_gdb_inferior_id, pid_to_gdb_inferior_id)
7493 (gdb_inferior_id_to_pid, in_inferior_list): Delete.
7494 (detach_inferior_command, kill_inferior_command): Use
7495 find_inferior_id instead of valid_gdb_inferior_id and
7496 gdb_inferior_id_to_pid.
7497 (inferior_command): Use inferior and thread pointers.
7498 * inferior.h (struct thread_info): Forward declare.
7499 (notice_new_inferior): Take a thread_info pointer instead of a
7500 ptid_t. All callers adjusted.
7501 (detach_inferior): Delete declaration.
7502 (exit_inferior, exit_inferior_silent): Take an inferior pointer
7503 instead of a pid. All callers adjusted.
7504 (gdb_inferior_id_to_pid, pid_to_gdb_inferior_id, in_inferior_list)
7505 (valid_gdb_inferior_id): Delete.
7506 * infrun.c (follow_fork_inferior, proceed_after_vfork_done)
7507 (handle_vfork_child_exec_or_exit, follow_exec): Adjust.
7508 (struct displaced_step_inferior_state) <pid>: Delete, replaced by
7510 <inf>: ... this new field.
7511 <step_ptid>: Delete, replaced by ...
7512 <step_thread>: ... this new field.
7513 (get_displaced_stepping_state): Take an inferior pointer instead
7514 of a pid. All callers adjusted.
7515 (displaced_step_in_progress_any_inferior): Adjust.
7516 (displaced_step_in_progress_thread): Take a thread pointer instead
7517 of a ptid_t. All callers adjusted.
7518 (displaced_step_in_progress, add_displaced_stepping_state): Take
7519 an inferior pointer instead of a pid. All callers adjusted.
7520 (get_displaced_step_closure_by_addr): Adjust.
7521 (remove_displaced_stepping_state): Take an inferior pointer
7522 instead of a pid. All callers adjusted.
7523 (displaced_step_prepare_throw, displaced_step_prepare)
7524 (displaced_step_fixup): Take a thread pointer instead of a ptid_t.
7525 All callers adjusted.
7526 (start_step_over): Adjust.
7527 (infrun_thread_ptid_changed): Remove bit updating ptids in the
7528 displaced step queue.
7529 (do_target_resume): Adjust.
7530 (fetch_inferior_event): Use inferior_thread.
7531 (context_switch, get_inferior_stop_soon): Take an
7532 execution_control_state pointer instead of a ptid_t. All callers
7534 (switch_to_thread_cleanup): Delete.
7535 (stop_all_threads): Use scoped_restore_current_thread.
7536 * inline-frame.c: Include "gdbthread.h".
7537 (inline_state) <inline_state>: Take a thread pointer instead of a
7538 ptid_t. All callers adjusted.
7539 <ptid>: Delete, replaced by ...
7540 <thread>: ... this new field.
7541 (find_inline_frame_state): Take a thread pointer instead of a
7542 ptid_t. All callers adjusted.
7543 (skip_inline_frames, step_into_inline_frame)
7544 (inline_skipped_frames, inline_skipped_symbol): Take a thread
7545 pointer instead of a ptid_t. All callers adjusted.
7546 * inline-frame.h (skip_inline_frames, step_into_inline_frame)
7547 (inline_skipped_frames, inline_skipped_symbol): Likewise.
7548 * linux-fork.c (delete_checkpoint_command): Adjust to use thread
7550 * linux-nat.c (get_detach_signal): Likewise.
7551 * linux-thread-db.c (thread_from_lwp): New 'stopped' parameter.
7552 (thread_db_notice_clone): Adjust.
7553 (thread_db_find_new_threads_silently)
7554 (thread_db_find_new_threads_2, thread_db_find_new_threads_1): Take
7555 a thread pointer instead of a ptid_t. All callers adjusted.
7556 * mi/mi-cmd-var.c: Include "inferior.h".
7557 (mi_cmd_var_update_iter): Update to use thread pointers.
7558 * mi/mi-interp.c (mi_new_thread): Update to use the thread's
7560 (mi_output_running_pid, mi_inferior_count): Delete, bits factored
7562 (mi_output_running): ... this new function.
7563 (mi_on_resume_1): Adjust to use it.
7564 (mi_user_selected_context_changed): Adjust to use inferior_thread.
7565 * mi/mi-main.c (proceed_thread): Adjust to use thread pointers
7567 (interrupt_thread_callback): : Adjust to use thread and inferior
7569 * proc-service.c: Include "gdbthread.h".
7570 (ps_pglobal_lookup): Adjust to use the thread's inferior directly.
7571 * progspace-and-thread.c: Include "inferior.h".
7572 * progspace.c: Include "inferior.h".
7573 * python/py-exitedevent.c (create_exited_event_object): Adjust to
7574 hold a reference to an inferior_object.
7575 * python/py-finishbreakpoint.c (bpfinishpy_init): Adjust to use
7577 * python/py-inferior.c (struct inferior_object): Give the type a
7578 tag name instead of a typedef.
7579 (python_on_normal_stop): No need to check if the current thread is
7581 (inferior_to_inferior_object): Change return type to
7582 inferior_object. All callers adjusted.
7583 (find_thread_object): Delete, bits factored out to ...
7584 (thread_to_thread_object): ... this new function.
7585 * python/py-infthread.c (create_thread_object): Use
7586 inferior_to_inferior_object.
7587 (thpy_is_stopped): Use thread pointer directly.
7588 (gdbpy_selected_thread): Use inferior_thread.
7589 * python/py-record-btrace.c (btpy_list_object) <ptid>: Delete
7590 field, replaced with ...
7591 <thread>: ... this new field. All users adjusted.
7592 (btpy_insn_or_gap_new): Drop const.
7593 (btpy_list_new): Take a thread pointer instead of a ptid_t. All
7595 * python/py-record.c: Include "gdbthread.h".
7596 (recpy_insn_new, recpy_func_new): Take a thread pointer instead of
7597 a ptid_t. All callers adjusted.
7598 (gdbpy_current_recording): Use inferior_thread.
7599 * python/py-record.h (recpy_record_object) <ptid>: Delete
7600 field, replaced with ...
7601 <thread>: ... this new field. All users adjusted.
7602 (recpy_element_object) <ptid>: Delete
7603 field, replaced with ...
7604 <thread>: ... this new field. All users adjusted.
7605 (recpy_insn_new, recpy_func_new): Take a thread pointer instead of
7606 a ptid_t. All callers adjusted.
7607 * python/py-threadevent.c: Include "gdbthread.h".
7608 (get_event_thread): Use thread_to_thread_object.
7609 * python/python-internal.h (struct inferior_object): Forward
7611 (find_thread_object, find_inferior_object): Delete declarations.
7612 (thread_to_thread_object, inferior_to_inferior_object): New
7614 * record-btrace.c: Include "inferior.h".
7615 (require_btrace_thread): Use inferior_thread.
7616 (record_btrace_frame_sniffer)
7617 (record_btrace_tailcall_frame_sniffer): Use inferior_thread.
7618 (get_thread_current_frame): Use scoped_restore_current_thread and
7620 (get_thread_current_frame): Use thread pointer directly.
7621 (record_btrace_replay_at_breakpoint): Use thread's inferior
7623 * record-full.c: Include "inferior.h".
7624 * regcache.c: Include "gdbthread.h".
7625 (get_thread_arch_regcache): Use the inferior's address space
7627 (get_thread_regcache, registers_changed_thread): New.
7628 * regcache.h (get_thread_regcache(thread_info *thread)): New
7630 (registers_changed_thread): New.
7631 (remote_target) <remote_detach_1>: Swap order of parameters.
7632 (remote_add_thread): <remote_add_thread>: Return the new thread.
7633 (get_remote_thread_info(ptid_t)): New overload.
7634 (remote_target::remote_notice_new_inferior): Use thread pointers
7636 (remote_target::process_initial_stop_replies): Use
7637 thread_info::set_running.
7638 (remote_target::remote_detach_1, remote_target::detach)
7639 (extended_remote_target::detach): Adjust.
7640 * stack.c (frame_show_address): Use inferior_thread.
7641 * target-debug.h (target_debug_print_thread_info_pp): New.
7642 * target-delegates.c: Regenerate.
7643 * target.c (default_thread_address_space): Delete.
7644 (memory_xfer_partial_1): Use current_inferior.
7645 (target_detach): Use current_inferior.
7646 (target_thread_address_space): Delete.
7647 (generic_mourn_inferior): Use current_inferior.
7648 * target.h (struct target_ops) <thread_address_space>: Delete.
7649 (target_thread_address_space): Delete.
7650 * thread.c (init_thread_list): Use ALL_THREADS_SAFE. Use thread
7652 (delete_thread_1, delete_thread, delete_thread_silent): Take a
7653 thread pointer instead of a ptid_t. Adjust all callers.
7654 (ptid_to_global_thread_id, global_thread_id_to_ptid): Delete.
7655 (first_thread_of_process): Delete, replaced by ...
7656 (first_thread_of_inferior): ... this new function. All callers
7658 (any_thread_of_process): Rename to ...
7659 (any_thread_of_inferior): ... this, and take an inferior pointer.
7660 (any_live_thread_of_process): Rename to ...
7661 (any_live_thread_of_inferior): ... this, and take an inferior
7663 (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
7664 (value_in_thread_stack_temporaries)
7665 (get_last_thread_stack_temporary): Take a thread pointer instead
7666 of a ptid_t. Adjust all callers.
7667 (thread_info::set_running): New.
7668 (validate_registers_access): Use inferior_thread.
7669 (can_access_registers_ptid): Rename to ...
7670 (can_access_registers_thread): ... this, and take a thread
7672 (print_thread_info_1): Adjust to compare thread pointers instead
7674 (switch_to_no_thread, switch_to_thread): Make extern.
7675 (scoped_restore_current_thread::~scoped_restore_current_thread):
7676 Use m_thread pointer directly.
7677 (scoped_restore_current_thread::scoped_restore_current_thread):
7678 Use inferior_thread.
7679 (thread_command): Use thread pointer directly.
7680 (thread_num_make_value_helper): Use inferior_thread.
7681 * top.c (execute_command): Use inferior_thread.
7682 * tui/tui-interp.c: Include "inferior.h".
7683 * varobj.c (varobj_create): Use inferior_thread.
7684 (value_of_root_1): Use find_thread_global_id instead of
7685 global_thread_id_to_ptid.
7687 2018-06-21 Alan Hayward <alan.hayward@arm.com>
7689 * regcache.c (readable_regcache::read_part): Avoid memcpy when
7691 (regcache::write_part): Likewise.
7692 (readable_regcache::cooked_read_part): Update comment.
7693 (readable_regcache::cooked_write_part): Likewise.
7694 * regcache.h: (readable_regcache::read_part): Likewise.
7695 (regcache::write_part): Likewise.
7697 2018-06-21 Richard Bunt <richard.bunt@arm.com>
7698 Dirk Schubert <dirk.schubert@arm.com>
7700 * aarch64-linux-nat.c (post_attach): New.
7701 (aarch64_linux_nat_target::post_attach): Override post_attach to
7702 record the number of hardware debug registers.
7704 2018-06-20 Tom Tromey <tom@tromey.com>
7706 * python/py-param.c (add_setshow_generic): Make parameters const.
7707 (parmpy_init): Update.
7709 2018-06-20 Simon Marchi <simon.marchi@polymtl.ca>
7711 * regcache.h (regcache_cooked_read_ftype): Rename to...
7712 (register_read_ftype): ...this, change type to function_view.
7713 (class reg_buffer) <save>: Remove src parameter.
7714 (readonly_detached_regcache) <readonly_detached_regcache>: Make
7715 parameter non-const in first overload. Remove src parameter in
7717 * regcache.c (do_cooked_read): Remove.
7718 (readonly_detached_regcache::readonly_detached_regcache): Make
7719 parameter non-const, adjust call to other constructor.
7720 (reg_buffer::save): Remove src parameter.
7721 * frame.c (do_frame_register_read): Remove.
7722 (frame_save_as_regcache): Use lambda function.
7723 * ppc-linux-tdep.c (ppu2spu_unwind_register): Change type of src
7724 parameter to ppu2spu_data *.
7725 (ppu2spu_sniffer): Use lambda function.
7727 2018-06-20 Simon Marchi <simon.marchi@polymtl.ca>
7729 * record-full.c (record_full_target::insert_breakpoint): Remove
7730 "struct" keyword, add const.
7732 2018-06-19 Simon Marchi <simon.marchi@ericsson.com>
7734 * common/common-defs.h (PACKAGE_NAME, PACKAGE_VERSION,
7735 PACKAGE_STRING, PACKAGE_TARNAME): Undefine.
7736 * configure.ac: Remove AC_PREREQ, add missing quoting.
7737 * gnulib/configure.ac: Modernize usage of
7738 AC_INIT/AM_INIT_AUTOMAKE. Remove AC_PREREQ.
7739 * gnulib/update-gnulib.sh (AUTOCONF_VERSION): Bump to 2.69.
7740 (AUTOMAKE_VERSION): Bump to 1.15.1.
7741 * configure: Re-generate.
7742 * config.in: Re-generate.
7743 * aclocal.m4: Re-generate.
7744 * gnulib/aclocal.m4: Re-generate.
7745 * gnulib/config.in: Re-generate.
7746 * gnulib/configure: Re-generate.
7747 * gnulib/import/Makefile.in: Re-generate.
7749 2018-06-19 Pedro Alves <palves@redhat.com>
7751 * minsyms.c (msym_prefer_to_msym_type): New, factored out from ...
7752 (lookup_minimal_symbol_by_pc_section): ... here with
7753 gdb_assert_not_reached added.
7755 2018-06-19 Pedro Alves <palves@redhat.com>
7757 * inline-frame.c (stopped_by_user_bp_inline_frame): Replace PC
7758 parameter with a block parameter. Compare location's block symbol
7759 with the frame's block instead of addresses.
7760 (skip_inline_frames): Pass the current block instead of the
7761 frame's address. Break out as soon as we determine the frame
7762 should not be skipped.
7764 2018-06-18 Tom Tromey <tom@tromey.com>
7766 * solib-aix.c (solib_aix_get_section_offsets): Return
7768 (solib_aix_solib_create_inferior_hook): Update.
7770 2018-06-18 Tom Tromey <tom@tromey.com>
7772 * solib-darwin.c (darwin_current_sos): Use unique_xmalloc_ptr.
7774 2018-06-18 Tom Tromey <tom@tromey.com>
7776 * solib-frv.c (frv_relocate_main_executable): Use
7778 * solib-dsbt.c (dsbt_relocate_main_executable): Use
7781 2018-06-18 Tom Tromey <tom@tromey.com>
7783 * objfiles.h (inhibit_section_map_updates): Update.
7784 (resume_section_map_updates, resume_section_map_updates_cleanup):
7786 * solib-svr4.c (svr4_handle_solib_event): Update.
7787 * objfiles.c (inhibit_section_map_updates): Return
7788 scoped_restore_tmpl<int>.
7789 (resume_section_map_updates, resume_section_map_updates_cleanup):
7792 2018-06-18 Tom Tromey <tom@tromey.com>
7794 * valprint.h (read_string): Update.
7795 * valprint.c (read_string): Change type of "buffer".
7796 (val_print_string): Update.
7797 * python/py-value.c (valpy_string): Update.
7798 * language.h (struct language_defn) <la_get_string>: Change
7800 (default_get_string, c_get_string): Update.
7801 * language.c (default_get_string): Change type of "buffer".
7802 * guile/scm-value.c (gdbscm_value_to_string): Update.
7803 * c-lang.c (c_get_string): Change type of "buffer".
7805 2018-06-18 Tom Tromey <tom@tromey.com>
7807 * ser-mingw.c (struct pipe_state_destroyer): New.
7808 (pipe_state_up): New typedef.
7809 (cleanup_pipe_state): Remove.
7810 (pipe_windows_open): Use pipe_state_up. Don't release argv.
7812 2018-06-18 Tom Tromey <tom@tromey.com>
7814 * rust-lang.h (rust_yyerror): Don't declare.
7815 * rust-lang.c (rust_language_defn): Update.
7816 * rust-exp.y (yyerror): Now static.
7817 * parse.c (parse_exp_in_context_1): Update.
7818 * p-lang.h (p_yyerror): Don't declare.
7819 * p-lang.c (p_language_defn): Update.
7820 * p-exp.y (yyerror): Now static.
7821 * opencl-lang.c (opencl_language_defn): Update.
7822 * objc-lang.c (objc_language_defn): Update.
7823 * m2-lang.h (m2_yyerror): Don't declare.
7824 * m2-lang.c (m2_language_defn): Update.
7825 * m2-exp.y (yyerror): Now static.
7826 * language.h (struct language_defn) <la_error>: Remove.
7827 * language.c (unk_lang_error): Remove.
7828 (unknown_language_defn, auto_language_defn): Remove.
7829 * go-lang.h (go_yyerror): Don't declare.
7830 * go-lang.c (go_language_defn): Update.
7831 * go-exp.y (yyerror): Now static.
7832 * f-lang.h (f_yyerror): Don't declare.
7833 * f-lang.c (f_language_defn): Update.
7834 * f-exp.y (yyerror): Now static.
7835 * d-lang.h (d_yyerror): Don't declare.
7836 * d-lang.c (d_language_defn): Update.
7837 * d-exp.y (yyerror): Now static.
7838 * c-lang.h (c_yyerror): Don't declare.
7839 * c-lang.c (c_language_defn, cplus_language_defn)
7840 (asm_language_defn, minimal_language_defn): Update.
7841 * c-exp.y (yyerror): Now static.
7842 * ada-lang.h (ada_yyerror): Don't declare.
7843 * ada-lang.c (ada_language_defn): Update.
7844 * ada-exp.y (yyerror): Now static.
7846 2018-06-18 Alan Hayward <alan.hayward@arm.com>
7848 * aarch64-linux-nat.c (fetch_sveregs_from_thread): New function.
7849 (store_sveregs_to_thread): Likewise.
7850 (aarch64_linux_fetch_inferior_registers): Check for SVE.
7851 (aarch64_linux_store_inferior_registers): Likewise.
7852 * nat/aarch64-sve-linux-ptrace.c (aarch64_sve_get_sveregs): New
7854 (aarch64_sve_regs_copy_to_regcache): Likewise.
7855 (aarch64_sve_regs_copy_from_regcache): Likewise.
7856 * nat/aarch64-sve-linux-ptrace.h (aarch64_sve_get_sveregs): New
7858 (aarch64_sve_regs_copy_to_regcache): Likewise.
7859 (aarch64_sve_regs_copy_from_regcache): Likewise.
7860 (sve_context): Structure from Linux headers.
7861 (SVE_SIG_ZREGS_SIZE): Define from Linux headers.
7862 (SVE_SIG_ZREG_SIZE): Likewise.
7863 (SVE_SIG_PREG_SIZE): Likewise.
7864 (SVE_SIG_FFR_SIZE): Likewise.
7865 (SVE_SIG_REGS_OFFSET): Likewise.
7866 (SVE_SIG_ZREGS_OFFSET): Likewise.
7867 (SVE_SIG_ZREG_OFFSET): Likewise.
7868 (SVE_SIG_ZREGS_SIZE): Likewise.
7869 (SVE_SIG_PREGS_OFFSET): Likewise.
7870 (SVE_SIG_PREG_OFFSET): Likewise.
7871 (SVE_SIG_PREGS_SIZE): Likewise.
7872 (SVE_SIG_FFR_OFFSET): Likewise.
7873 (SVE_SIG_REGS_SIZE): Likewise.
7874 (SVE_SIG_CONTEXT_SIZE): Likewise.
7875 (SVE_PT_REGS_MASK): Likewise.
7876 (SVE_PT_REGS_FPSIMD): Likewise.
7877 (SVE_PT_REGS_SVE): Likewise.
7878 (SVE_PT_VL_INHERIT): Likewise.
7879 (SVE_PT_VL_ONEXEC): Likewise.
7880 (SVE_PT_REGS_OFFSET): Likewise.
7881 (SVE_PT_FPSIMD_OFFSET): Likewise.
7882 (SVE_PT_FPSIMD_SIZE): Likewise.
7883 (SVE_PT_SVE_ZREG_SIZE): Likewise.
7884 (SVE_PT_SVE_PREG_SIZE): Likewise.
7885 (SVE_PT_SVE_FFR_SIZE): Likewise.
7886 (SVE_PT_SVE_FPSR_SIZE): Likewise.
7887 (SVE_PT_SVE_FPCR_SIZE): Likewise.
7888 (__SVE_SIG_TO_PT): Likewise.
7889 (SVE_PT_SVE_OFFSET): Likewise.
7890 (SVE_PT_SVE_ZREGS_OFFSET): Likewise.
7891 (SVE_PT_SVE_ZREG_OFFSET): Likewise.
7892 (SVE_PT_SVE_ZREGS_SIZE): Likewise.
7893 (SVE_PT_SVE_PREGS_OFFSET): Likewise.
7894 (SVE_PT_SVE_PREG_OFFSET): Likewise.
7895 (SVE_PT_SVE_PREGS_SIZE): Likewise.
7896 (SVE_PT_SVE_FFR_OFFSET): Likewise.
7897 (SVE_PT_SVE_FPSR_OFFSET): Likewise.
7898 (SVE_PT_SVE_FPCR_OFFSET): Likewise.
7899 (SVE_PT_SVE_SIZE): Likewise.
7900 (SVE_PT_SIZE): Likewise.
7901 (HAS_SVE_STATE): New define.
7903 2018-06-18 Alan Hayward <alan.hayward@arm.com>
7905 * nat/aarch64-sve-linux-sigcontext.h: New file.
7906 * nat/aarch64-sve-linux-ptrace.h (SVE_VQ_BYTES): Move to
7908 (SVE_VQ_MIN): Likewise.
7909 (SVE_VQ_MAX): Likewise.
7910 (SVE_VL_MIN): Likewise.
7911 (SVE_VL_MAX): Likewise.
7912 (SVE_NUM_ZREGS): Likewise.
7913 (SVE_NUM_PREGS): Likewise.
7914 (sve_vl_valid): Likewise.
7915 (struct user_sve_header): Likewise.
7917 2018-06-16 Andrew Burgess <andrew.burgess@embecosm.com>
7918 Richard Bunt <Richard.Bunt@arm.com>
7920 * linux-nat.c (stop_wait_callback): Don't discard SIGSTOP if it
7921 was requested by GDB.
7923 2018-06-15 Tom de Vries <tdevries@suse.de>
7925 * MAINTAINERS (Write After Approval): Add Tom de Vries.
7927 2018-06-14 Simon Marchi <simon.marchi@polymtl.ca>
7929 * gnulib/update-gnulib.sh: Print expected versions of
7932 2018-06-14 Simon Marchi <simon.marchi@ericsson.com>
7934 * arch-utils.c (default_type_align): Use type_length_units.
7935 * gdbtypes.c (type_align): Use type_length_units.
7937 2018-06-14 Philippe Waroquiers <philippe.waroquiers@skynet.be>
7939 * cli/cli-script.c (_initialize_cli_script): Fix online documentation
7940 of 'define' command.
7942 2018-06-14 Tom de Vries <tdevries@suse.de>
7945 * infcmd.c (print_return_value_1): Use get_user_print_options instead of
7946 get_no_prettyformat_print_options.
7948 2018-06-13 Simon Marchi <simon.marchi@ericsson.com>
7950 * sparc-nat.h: Include target.h.
7951 * sparc64-linux-nat.c (class sparc64_linux_nat_target)
7952 <fetch_registers>: Remove this argument in function call.
7953 <store_registers>: Remove this argument in function call, remove
7955 <low_forget_process>: Call sparc64_forget_process instead of
7956 sparc_forget_process.
7958 2018-06-13 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
7960 * procfs.c (_initialize_procfs): Use add_inf_child_target.
7961 (procfs_target::make_corefile_notes): Adjust to new
7962 target_read_alloc return type.
7964 2018-06-12 Andrew Burgess <andrew.burgess@embecosm.com>
7965 Stephen Roberts <stephen.roberts@arm.com>
7968 * infrun.c (fetch_inferior_event): If GDB is not proceeding then
7969 run INF_EXEC_COMPLETE handler, even when not calling normal_stop.
7970 Move should_notify_stop local into more inner scope.
7972 2018-06-12 Andrew Burgess <andrew.burgess@embecosm.com>
7973 Stephen Roberts <stephen.roberts@arm.com>
7976 * infrun.c (resume_1): Add call to mark_async_event_handler.
7978 2018-06-12 Andrew Burgess <andrew.burgess@embecosm.com>
7980 * infrun.c (do_target_wait): Change old version of $pc printed.
7982 2018-06-11 Simon Marchi <simon.marchi@ericsson.com>
7984 * dwarf2read.c (read_index_from_section): Rename to...
7985 (read_gdb_index_from_section): ... this, update all callers.
7986 (dwarf2_read_index): Rename to...
7987 (dwarf2_read_gdb_index): ... this, update all callers.
7989 2018-06-11 John David Anglin <danglin@gcc.gnu.org>
7992 (hppa_linux_nat_target::fetch_inferior_registers): Rename to
7993 hppa_linux_nat_target::fetch_registers.
7995 2018-06-11 Alan Hayward <alan.hayward@arm.com>
7997 * aarch64-tdep.c (aarch64_dwarf_reg_to_regnum): Add mappings.
7998 * aarch64-tdep.h (AARCH64_DWARF_SVE_VG): Add define.
7999 (AARCH64_DWARF_SVE_FFR): Likewise.
8000 (AARCH64_DWARF_SVE_P0): Likewise.
8001 (AARCH64_DWARF_SVE_Z0): Likewise.
8003 2018-06-11 Alan Hayward <alan.hayward@arm.com>
8005 * common/common-regcache.h (raw_compare): New function.
8006 * regcache.c (regcache::raw_compare): Likewise.
8007 * regcache.h (regcache::raw_compare): New declaration.
8009 2018-06-11 Alan Hayward <alan.hayward@arm.com>
8011 * common/common-regcache.h (reg_buffer_common): New structure.
8012 * regcache.c (reg_buffer::invalidate): Move from detached_regcache.
8013 (reg_buffer::raw_supply): Likewise.
8014 (reg_buffer::raw_supply_integer): Likewise.
8015 (reg_buffer::raw_supply_zeroed): Likewise.
8016 (reg_buffer::raw_collect): Likewise.
8017 (reg_buffer::raw_collect_integer): Likewise.
8018 * regcache.h (reg_buffer::invalidate): Move from detached_regcache.
8019 (reg_buffer::raw_supply): Likewise.
8020 (reg_buffer::raw_supply_integer): Likewise.
8021 (reg_buffer::raw_supply_zeroed): Likewise.
8022 (reg_buffer::raw_collect): Likewise.
8023 (reg_buffer::raw_collect_integer): Likewise.
8025 2018-06-10 Tom Tromey <tom@tromey.com>
8027 * remote.c (stop_reply_p): Remove typedef. Don't declare queue.
8028 (class remote_state) <stop_reply_queue>: Now std::vector.
8029 (remote_state::~remote_state)
8030 (remote_target::stop_reply_queue_length): Update.
8031 (struct queue_iter_param, remove_child_of_pending_fork)
8032 (struct check_pending_event_prevents_wildcard_vcont_callback_data)
8033 (check_pending_event_prevents_wildcard_vcont_callback)
8034 (remove_stop_reply_for_inferior)
8035 (remove_stop_reply_of_remote_state)
8036 (remote_notif_remove_once_on_match)
8037 (stop_reply_match_ptid_and_ws)
8038 (remote_kill_child_of_pending_fork): Remove.
8039 (remote_target::remove_new_fork_children)
8040 (remote_target::check_pending_events_prevent_wildcard_vcont)
8041 (remote_target::discard_pending_stop_replies)
8042 (remote_target::discard_pending_stop_replies_in_queue)
8043 (remote_target::remote_notif_remove_queued_reply)
8044 (remote_target::queued_stop_reply)
8045 (remote_target::push_stop_reply, remote_target::peek_stop_reply)
8046 (remote_target::wait, remote_target::kill_new_fork_children)
8047 (remote_target::async): Update.
8049 2018-06-10 Tom Tromey <tom@tromey.com>
8051 * record-full.c (record_full_arch_list_cleanups): Remove.
8052 (record_full_message): Use try/catch.
8053 (record_full_wait_cleanups): Remove.
8054 (record_full_wait_1): Use try/catch.
8055 (record_full_restore): Likewise.
8057 2018-06-10 Tom Tromey <tom@tromey.com>
8059 * record-full.c (record_full_breakpoint_p): Remove typedef. Don't
8060 declare VEC. Add constructor.
8061 <in_target_beneath>: Now bool.
8062 (record_full_breakpoints): Now a std::vector, static.
8063 (record_full_sync_record_breakpoints)
8064 (record_full_init_record_breakpoints)
8065 (record_full_target::insert_breakpoint)
8066 (record_full_target::remove_breakpoint): Update. Don't use XNEW.
8068 2018-06-10 Simon Marchi <simon.marchi@polymtl.ca>
8070 * dwarf2read.c (process_cu_includes): Remove struct keyword.
8071 * serial.c (serial_interface_lookup): Remove struct keyword.
8073 2018-06-10 Tom Tromey <tom@tromey.com>
8075 * procfs.c (procfs_target::xfer_partial): Use "beneath" as a
8077 * nto-procfs.c (nto_procfs_target::xfer_partial): Use "beneath" as
8079 * go32-nat.c (go32_nat_target::xfer_partial): Use "beneath" as a
8081 * arm-linux-nat.c (arm_linux_nat_target::read_description): Use
8082 "beneath" as a method.
8083 * arm-fbsd-nat.c (arm_fbsd_nat_target::read_description):
8084 Use "beneath" as a method.
8086 2018-06-10 Tom Tromey <tom@tromey.com>
8088 * tracefile.c (struct trace_file_writer_deleter): New.
8089 <operator()>: Rename from trace_file_writer_xfree.
8090 (trace_file_writer_up): New typedef.
8091 (tsave_command, trace_save_tfile, trace_save_ctf): Update.
8093 2018-06-09 Simon Marchi <simon.marchi@ericsson.com>
8095 * regcache.h (reg_buffer) <~reg_buffer>: Use default destructor.
8096 <m_registers, m_register_status>: Change type to
8098 * regcache.c (reg_buffer::reg_buffer): Use new instead of
8101 2018-06-09 Simon Marchi <simon.marchi@ericsson.com>
8103 * common/common-regcache.h (enum register_status): Add
8104 underlying type "signed char".
8105 * regcache.h (reg_buffer) <m_register_status>: Change type to
8107 * regcache.c (reg_buffer::reg_buffer): Alocate arrays of
8108 register_status instead of signed char.
8109 (reg_buffer::save): Use REG_UNKNOWN instead of 0.
8110 (reg_buffer::get_register_status): Remove cast.
8111 (readable_regcache::raw_read): Remove cast.
8112 (readable_regcache::cooked_read): Remove cast.
8114 2018-06-09 Tom Tromey <tom@tromey.com>
8116 * source.c (reverse_search_command, forward_search_command): Use
8119 2018-06-09 Tom Tromey <tom@tromey.com>
8121 * serial.c (serial_ops_p): Remove typedef. Don't declare VEC.
8122 (serial_ops_list): Now static, std::vector.
8123 (serial_interface_lookup, serial_add_interface): Update.
8125 2018-06-09 Tom Tromey <tom@tromey.com>
8127 * dwarf2read.c (process_cu_includes): Update.
8128 (process_full_comp_unit): Update.
8129 * dwarf2read.h (struct dwarf2_per_objfile) <just_read_cus>: Now a
8132 2018-06-08 Paul Koning <paul_koning@dell.com>
8136 * python/python.c (do_start_initialization):
8137 Avoid call to internal Python API.
8138 (init__gdb_module): New function.
8140 2018-06-08 Gary Benson <gbenson@redhat.com>
8142 * linux-thread-db.c (valprint.h): New include.
8143 (struct check_thread_db_info): New structure.
8144 (check_thread_db_on_load, tdb_testinfo): New static globals.
8145 (check_thread_db, check_thread_db_callback): New functions.
8146 (try_thread_db_load_1): Run integrity checks if requested.
8147 (maintenance_check_libthread_db): New function.
8148 (_initialize_thread_db): Register "maint check libthread-db"
8149 and "maint set/show check-libthread-db".
8150 * NEWS: Mention the above new commands.
8152 2018-06-08 Tom Tromey <tom@tromey.com>
8154 * windows-nat.c (windows_nat_target::xfer_partial): "beneath" is
8157 2018-06-08 Tom Tromey <tom@tromey.com>
8159 * btrace.c (parse_xml_raw): Use gdb::unique_xmalloc_ptr.
8161 2018-06-08 Tom Tromey <tom@tromey.com>
8163 * common/btrace-common.h (struct btrace_data): Add constructor,
8164 destructor, move assignment operator.
8165 <empty, clear, fini>: New methods.
8166 <format>: Initialize.
8167 (btrace_data_init, btrace_data_fini, btrace_data_clear)
8168 (btrace_data_empty): Don't declare.
8169 * common/btrace-common.c (btrace_data_init): Remove.
8170 (btrace_data::fini): Rename from btrace_data_fini.
8171 (btrace_data::empty): Rename from btrace_data_empty.
8172 (btrace_data::clear): Rename from btrace_data_clear. Return
8174 * btrace.h (make_cleanup_btrace_data): Don't declare.
8175 * btrace.c (btrace_add_pc, btrace_stitch_trace, btrace_clear)
8176 (parse_xml_btrace): Update.
8177 (do_btrace_data_cleanup, make_cleanup_btrace_data): Remove.
8178 (maint_btrace_clear_packet_history_cmd): Update.
8180 2018-06-07 Pedro Alves <palves@redhat.com>
8182 * target.h (target_ops) <beneath>: Now a method. All references
8184 (class target_stack): New.
8185 * target.c (g_target_stack): New.
8186 (g_current_top_target): Delete.
8187 (current_top_target): Get the top target out of g_target_stack.
8188 (target_stack::push, target_stack::unpush): New.
8189 (push_target, unpush_target): Reimplement.
8190 (target_is_pushed): Reimplement in terms of g_target_stack.
8191 (target_ops::beneath, target_stack::find_beneath): New.
8193 2018-06-07 Pedro Alves <palves@redhat.com>
8195 * target.h (find_target_beneath): Delete declaration.
8196 * target.c (find_target_beneath): Delete definition.
8197 * aix-thread.c: All callers of find_target_beneath adjusted to
8198 call target_ops::beneath instead.
8199 * bsd-uthread.c: Likewise.
8200 * linux-thread-db.c: Likewise.
8201 * ravenscar-thread.c: Likewise.
8202 * sol-thread.c: Likewise.
8203 * spu-multiarch.c: Likewise.
8205 2018-06-07 Pedro Alves <palves@redhat.com>
8207 * target.h (target_ops) <beneath>: Now a method. All references
8209 (target_ops) <m_beneath>: New.
8210 * target.c (target_ops::beneath): New.
8211 * corelow.c: Adjust all references to target_ops::beneath.
8212 * linux-thread-db.c: Likewise.
8213 * make-target-delegates: Likewise.
8214 * record-btrace.c: Likewise.
8215 * record-full.c: Likewise.
8216 * remote.c: Likewise.
8217 * target.c: Likewise.
8218 * target-delegates.c: Regenerate.
8220 2018-06-07 Pedro Alves <palves@redhat.com>
8222 * target.h (target_stack): Delete.
8223 (current_top_target): Declare function.
8224 * target.c (target_stack): Delete.
8225 (g_current_top_target): New.
8226 (current_top_target): New function.
8227 * auxv.c: Use current_top_target instead of target_stack
8229 * avr-tdep.c: Likewise.
8230 * breakpoint.c: Likewise.
8231 * corefile.c: Likewise.
8232 * elfread.c: Likewise.
8234 * exceptions.c: Likewise.
8235 * frame.c: Likewise.
8236 * gdbarch-selftests.c: Likewise.
8237 * gnu-v3-abi.c: Likewise.
8238 * ia64-tdep.c: Likewise.
8239 * ia64-vms-tdep.c: Likewise.
8240 * infcall.c: Likewise.
8241 * infcmd.c: Likewise.
8242 * infrun.c: Likewise.
8243 * linespec.c: Likewise.
8244 * linux-tdep.c: Likewise.
8245 * minsyms.c: Likewise.
8246 * ppc-linux-nat.c: Likewise.
8247 * ppc-linux-tdep.c: Likewise.
8248 * procfs.c: Likewise.
8249 * regcache.c: Likewise.
8250 * remote.c: Likewise.
8251 * rs6000-tdep.c: Likewise.
8252 * s390-linux-nat.c: Likewise.
8253 * s390-tdep.c: Likewise.
8254 * solib-aix.c: Likewise.
8255 * solib-darwin.c: Likewise.
8256 * solib-dsbt.c: Likewise.
8257 * solib-spu.c: Likewise.
8258 * solib-svr4.c: Likewise.
8259 * solib-target.c: Likewise.
8260 * sparc-tdep.c: Likewise.
8261 * sparc64-tdep.c: Likewise.
8262 * spu-tdep.c: Likewise.
8263 * symfile.c: Likewise.
8264 * symtab.c: Likewise.
8265 * target-descriptions.c: Likewise.
8266 * target-memory.c: Likewise.
8267 * target.c: Likewise.
8268 * target.h: Likewise.
8269 * tracefile-tfile.c: Likewise.
8270 * tracepoint.c: Likewise.
8271 * valops.c: Likewise.
8272 * valprint.c: Likewise.
8273 * value.c: Likewise.
8274 * windows-tdep.c: Likewise.
8275 * mi/mi-main.c: Likewise.
8277 2018-06-07 Tom Tromey <tom@tromey.com>
8279 * valprint.h (build_address_symbolic): Declare.
8280 * printcmd.c (print_address_symbolic): Update.
8281 (build_address_symbolic): Change "name" and "filename" to
8283 * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn):
8285 * defs.h (build_address_symbolic): Remove declaration.
8287 2018-06-07 Alan Hayward <alan.hayward@arm.com>
8289 * aarch64-tdep.c (AARCH64_SVE_V0_REGNUM): Add define.
8290 (aarch64_vnv_type): Add function.
8291 (aarch64_pseudo_register_name): Add V regs for SVE.
8292 (aarch64_pseudo_register_type): Likewise.
8293 (aarch64_pseudo_register_reggroup_p): Likewise.
8294 (aarch64_pseudo_read_value_2): Use V0 offset for SVE
8295 (aarch64_pseudo_read_value): Add V regs for SVE.
8296 (aarch64_pseudo_write_2): Use V0 offset for SVE
8297 (aarch64_pseudo_write): Add V regs for SVE.
8298 * aarch64-tdep.h (struct gdbarch_tdep): Add vnv_type.
8300 2018-06-06 Sergio Durigan Junior <sergiodj@redhat.com>
8302 * arch/aarch64.h (sve_vq_from_vl): Guard with #ifndef.
8303 (sve_vl_from_vq): Likewise.
8305 2018-06-05 Tom Tromey <tom@tromey.com>
8307 * cli/cli-cmds.c (show_version): Update.
8308 * top.c (print_gdb_version): Add "interactive" parameter.
8310 * main.c (captured_main_1): Update.
8311 * top.h (print_gdb_version): Add "interactive" parameter and a
8314 2018-06-05 David Malcolm <dmalcolm@redhat.com>
8316 * common/enum-flags.h: Add trailing semicolon to example in
8319 2018-06-05 Tom Tromey <tom@tromey.com>
8322 * NEWS: Add entry about pager.
8323 * utils.c (pagination_disabled_for_command): New global.
8324 (prompt_for_continue): Allow "c" response to prompt.
8325 (reinitialize_more_filter): Clear
8326 pagination_disabled_for_command.
8327 (fputs_maybe_filtered): Check pagination_disabled_for_command.
8329 2018-06-04 Tom Tromey <tom@tromey.com>
8331 * ada-lang.h (ada_lookup_symbol_list): Update.
8332 * ada-lang.c (resolve_subexp): Update.
8333 (symbols_are_identical_enums): Change type of syms. Remove nsyms
8335 (remove_extra_symbols, remove_irrelevant_renamings): Likewise.
8336 (ada_lookup_symbol_list_worker, ada_lookup_symbol_list): Change
8337 results parameter to std::vector.
8338 (ada_iterate_over_symbols, ada_lookup_symbol, get_var_value):
8340 * ada-exp.y (block_lookup): Update.
8341 (select_possible_type_sym): Change type of syms. Remove nsyms
8343 (write_var_or_type, write_name_assoc): Update.
8345 2018-06-04 Joel Brobecker <brobecker@adacore.com>
8347 * windows-nat.c (windows_nat_target::xfer_partial): Return
8348 TARGET_XFER_E_IO if we need to delegate to the target beneath
8349 but BENEATH is NULL.
8351 2018-06-04 Simon Marchi <simon.marchi@ericsson.com>
8353 * Makefile.in (config.status): Add configure.nat as a
8356 2018-06-04 Tom Tromey <tom@tromey.com>
8358 * cp-name-parser.y (cpname_state): Add method declarations.
8359 (HANDLE_QUAL): Update.
8360 (cpname_state::d_grab, cpname_state::fill_comp)
8361 (cpname_state::make_operator, cpname_state::make_dtor)
8362 (cpname_state::make_builtin_type, cpname_state::make_name)
8363 (cpname_state::d_qualify, cpname_state::d_int_type)
8364 (cpname_state::d_unary, cpname_state::d_binary): Now methods.
8365 (%union): Move earlier.
8367 2018-06-04 Alan Hayward <alan.hayward@arm.com>
8369 * elfread.c (elf_symfile_segments): Use ELF_SECTION_IN_SEGMENT.
8371 2018-06-04 Alan Hayward <alan.hayward@arm.com>
8373 * aarch64-tdep.c (aarch64_pseudo_read_value_1): New helper func.
8374 (aarch64_pseudo_write_1): Likewise.
8375 (aarch64_pseudo_read_value): Use helper.
8376 (aarch64_pseudo_write): Likewise.
8378 2018-06-04 Pedro Alves <palves@redhat.com>
8380 * darwin-nat.c (darwin_ops): Delete.
8381 (darwin_attach_pid): Use get_native_target.
8383 2018-06-04 Alan Hayward <alan.hayward@arm.com>
8385 * aarch64-tdep.c (aarch64_get_tdesc_vq): Use uint64_t for VQ.
8386 * aarch64-tdep.h (struct gdbarch_tdep): Likewise.
8388 2018-06-04 Alan Hayward <alan.hayward@arm.com>
8390 * aarch64-linux-nat.c (aarch64_linux_read_description): Support SVE.
8391 * aarch64-tdep.c (aarch64_get_tdesc_vq): New function.
8392 (aarch64_gdbarch_init): Check for SVE.
8393 * aarch64-tdep.h (gdbarch_tdep::has_sve): New function.
8395 2018-06-04 Alan Hayward <alan.hayward@arm.com>
8397 * aarch64-tdep.c (aarch64_read_description): Use uint64_t for VQ.
8398 * aarch64-tdep.h (aarch64_read_description): Likewise.
8399 * arch/aarch64.c (aarch64_create_target_description): Likewise.
8400 * arch/aarch64.h (aarch64_create_target_description): Likewise.
8401 * features/aarch64-sve.c (create_feature_aarch64_sve): Likewise.
8402 * nat/aarch64-sve-linux-ptrace.c(aarch64_sve_get_vq): Likewise.
8403 * nat/aarch64-sve-linux-ptrace.h (aarch64_sve_get_vq): Likewise.
8405 2018-06-02 Simon Marchi <simon.marchi@ericsson.com>
8407 * value.c (value_fetch_lazy_bitfield): New.
8408 (value_fetch_lazy_memory): New.
8409 (value_fetch_lazy_register): New.
8410 (value_fetch_lazy): Factor out to smaller functions.
8412 2018-06-01 Tom Tromey <tom@tromey.com>
8414 * cp-name-parser.y (backslashable, represented): Now const.
8416 2018-06-01 Tom Tromey <tom@tromey.com>
8418 * cp-name-parser.y: Include parser-defs.h.
8419 (parser_fprintf): Remove declaration.
8421 2018-06-01 Tom Tromey <tom@tromey.com>
8423 * cp-name-parser.y: Use %pure-parser, %lex-param, and
8425 (lexptr, prev_lexptr, error_lexptr, global_errmsg, demangle_info)
8426 (global_result): Remove globals.
8427 (struct cpname_state): New.
8428 (yyparse): Don't declare.
8429 (yylex, yyerror): Move declarations after %union.
8430 (d_grab, fill_comp, make_operator, make_dtor, make_builtin_type)
8431 (make_name): Add state parameter.
8433 (d_qualify, d_int_type, d_unary, d_binary, parse_number) Add state
8435 (HANDLE_QUAL, HANDLE_SPECIAL, HANDLE_TOKEN2, HANDLE_TOKEN3):
8437 (yylex): Add lvalp, state parameters.
8438 (yyerror): Add state parameter.
8439 (cp_demangled_name_to_comp): Update.
8441 2018-06-01 Tom Tromey <tom@tromey.com>
8443 * cp-name-parser.y (parser_fprintf): Declare.
8444 (GDB_YY_REMAP_PREFIX): Define.
8445 Include yy-remap.h. Don't redefine yy* identifiers.
8447 2018-06-01 Tom Tromey <tom@tromey.com>
8449 * python/py-type.c (typy_legacy_template_argument): Update.
8450 * cp-support.h (cp_demangled_name_to_comp): Update.
8451 * cp-name-parser.y (cp_demangled_name_to_comp): Change errmsg
8452 parameter to be a "std::string *".
8455 2018-06-01 H.J. Lu <hongjiu.lu@intel.com>
8457 * ada-lex.l: Include "diagnostics.h" instead of
8458 "common/diagnostics.h".
8459 * unittests/environ-selftests.c: Likewise.
8460 * common/diagnostics.h: Moved to ../include.
8462 2018-06-01 Joel Brobecker <brobecker@adacore.com>
8464 * breakpoint.c (breakpoint_re_set): Temporarily force language_mode
8465 to language_mode_manual while calling breakpoint_re_set_one.
8467 2018-06-01 Tom Tromey <tom@tromey.com>
8469 * valops.c (value_cast_structs, destructor_name_p): Update.
8470 * symtab.c (gdb_mangle_name): Update.
8471 * stabsread.c (define_symbol, read_cpp_abbrev, read_baseclasses):
8473 * p-valprint.c (pascal_object_is_vtbl_ptr_type)
8474 (pascal_object_print_value_fields, pascal_object_print_value):
8476 * p-typeprint.c (pascal_type_print_derivation_info): Update.
8477 * linespec.c (find_methods): Update.
8478 * gdbtypes.h (type_name_no_tag): Remove.
8479 (type_name_or_error): Rename from type_name_no_tag_or_error.
8480 * gdbtypes.c (type_name_no_tag): Remove.
8481 (type_name_or_error): Rename from type_name_no_tag_or_error.
8482 (lookup_struct_elt_type, check_typedef): Update.
8483 * expprint.c (print_subexp_standard): Update.
8484 * dwarf2read.c (dwarf2_add_field, load_partial_dies): Update.
8485 * d-namespace.c (d_lookup_nested_symbol): Update.
8486 * cp-valprint.c (cp_is_vtbl_ptr_type, cp_print_value_fields)
8487 (cp_print_class_member): Update.
8488 * cp-namespace.c (cp_lookup_nested_symbol): Update.
8489 * completer.c (add_struct_fields): Update.
8490 * c-typeprint.c (cp_type_print_derivation_info)
8491 (c_type_print_varspec_prefix, c_type_print_base_struct_union):
8493 * ada-lang.c (parse_old_style_renaming, xget_renaming_scope)
8494 (ada_prefer_type, ada_is_exception_sym): Update.
8496 2018-06-01 Tom Tromey <tom@tromey.com>
8498 * valops.c (enum_constant_from_type, value_namespace_elt)
8499 (value_maybe_namespace_elt): Update.
8500 * valarith.c (find_size_for_pointer_math): Update.
8501 * target-descriptions.c (make_gdb_type): Update.
8502 * symmisc.c (print_symbol): Update.
8503 * stabsread.c (define_symbol, read_type)
8504 (complain_about_struct_wipeout, add_undefined_type)
8505 (cleanup_undefined_types_1): Update.
8506 * rust-lang.c (rust_tuple_type_p, rust_slice_type_p)
8507 (rust_range_type_p, val_print_struct, rust_print_struct_def)
8508 (rust_internal_print_type, rust_composite_type)
8509 (rust_evaluate_funcall, rust_evaluate_subexp)
8510 (rust_inclusive_range_type_p): Update.
8511 * python/py-type.c (typy_get_tag): Update.
8512 * p-typeprint.c (pascal_type_print_base): Update.
8513 * mdebugread.c (parse_symbol, parse_type): Update.
8514 * m2-typeprint.c (m2_long_set, m2_record_fields, m2_enum):
8516 * guile/scm-type.c (gdbscm_type_tag): Update.
8517 * go-lang.c (sixg_string_p): Update.
8518 * gnu-v3-abi.c (build_gdb_vtable_type, build_std_type_info_type):
8520 * gdbtypes.h (struct main_type) <tag_name>: Remove.
8521 (TYPE_TAG_NAME): Remove.
8522 * gdbtypes.c (type_name_no_tag): Simplify.
8523 (check_typedef, check_types_equal, recursive_dump_type)
8524 (copy_type_recursive, arch_composite_type): Update.
8525 * f-typeprint.c (f_type_print_base): Update. Print "Type" prefix
8526 in summary mode when needed.
8527 * eval.c (evaluate_funcall): Update.
8528 * dwarf2read.c (fixup_go_packaging, read_structure_type)
8529 (process_structure_scope, read_enumeration_type)
8530 (read_namespace_type, read_module_type, determine_prefix): Update.
8531 * cp-support.c (inspect_type): Update.
8532 * coffread.c (process_coff_symbol, decode_base_type): Update.
8533 * c-varobj.c (c_is_path_expr_parent): Update.
8534 * c-typeprint.c (c_type_print_base_struct_union): Update.
8535 (c_type_print_base_1): Update. Print struct/class/union/enum in
8536 summary when using C language.
8537 * ax-gdb.c (gen_struct_ref, gen_namespace_elt)
8538 (gen_maybe_namespace_elt): Update.
8539 * ada-lang.c (ada_type_name): Simplify.
8540 (empty_record, ada_template_to_fixed_record_type_1)
8541 (template_to_static_fixed_type)
8542 (to_record_with_fixed_variant_part, ada_check_typedef): Update.
8544 2018-06-01 Tom Tromey <tom@tromey.com>
8546 * dwarf2read.c (dwarf2_compute_name): Pass CU's language to
8548 * c-typeprint.c (c_print_type_1): Add "language" parameter.
8549 (c_print_type): Update.
8550 (c_print_type): New overload.
8551 (c_type_print_varspec_prefix, c_type_print_args)
8552 (c_type_print_varspec_suffix, c_print_type_no_offsets)
8553 (c_type_print_base_struct_union, c_type_print_base_1)
8554 (cp_type_print_method_args): Add "language" parameter.
8555 (c_type_print_base): Update.
8556 * c-lang.h (c_print_type): Add new overload.
8558 2018-06-01 Tom Tromey <tom@tromey.com>
8560 * typeprint.h (c_type_print_varspec_suffix): Don't declare.
8561 * c-typeprint.c (c_type_print_varspec_suffix): Now static.
8563 2018-06-01 Alan Hayward <alan.hayward@arm.com>
8565 * aarch64-tdep.c (aarch64_sve_register_names): New const
8567 * arch/aarch64.h (enum aarch64_regnum): Add SVE entries.
8568 (AARCH64_SVE_Z_REGS_NUM): New define.
8569 (AARCH64_SVE_P_REGS_NUM): Likewise.
8570 (AARCH64_SVE_NUM_REGS): Likewise.
8572 2018-05-31 Uros Bizjak <ubizjak@gmail.com>
8574 * nat/linux-ptrace.h [__alpha__]
8575 (GDB_ARCH_IS_TRAP_BRKPT, GDB_ARCH_IS_TRAP_HWBKPT): Remove
8578 2018-05-31 Maciej W. Rozycki <macro@mips.com>
8580 * arch-utils.c (gdbarch_info_fill): Set `default_byte_order' to
8581 the endianness selected.
8582 * NEWS: Document `set endian auto' mode operation update.
8584 2018-05-31 Alan Hayward <alan.hayward@arm.com>
8586 * Makefile.in: Add new header.
8587 * gdb/arch/aarch64.h (sve_vg_from_vl): New macro.
8588 (sve_vl_from_vg): Likewise.
8589 (sve_vq_from_vl): Likewise.
8590 (sve_vl_from_vq): Likewise.
8591 (sve_vq_from_vg): Likewise.
8592 (sve_vg_from_vq): Likewise.
8593 * configure.nat: Add new c file.
8594 * nat/aarch64-sve-linux-ptrace.c: New file.
8595 * nat/aarch64-sve-linux-ptrace.h: New file.
8597 2018-05-31 Alan Hayward <alan.hayward@arm.com>
8599 * aarch64-linux-nat.c (aarch64_linux_read_description):
8601 * aarch64-linux-tdep.c (aarch64_linux_core_read_description):
8603 * aarch64-tdep.c (tdesc_aarch64_list): Add.
8604 (aarch64_read_description): Use VQ to index tdesc_aarch64_list.
8605 (aarch64_gdbarch_init): Add parmeter zero.
8606 * aarch64-tdep.h (aarch64_read_description): Add VQ parmeter.
8607 * arch/aarch64.c (aarch64_create_target_description): Check VQ.
8608 * arch/aarch64.h (aarch64_create_target_description): Add VQ.
8610 * doc/gdb.texinfo: Describe SVE feature
8611 * features/aarch64-sve.c: New file.
8613 2018-05-31 Omair Javaid <omair.javaid@linaro.org>
8616 * gdbarch.sh (significant_addr_bit): Default to zero when
8617 not set by target architecture.
8618 * gdbarch.c: Re-generated.
8619 * utils.c (address_significant): Update.
8621 2018-05-30 Joel Brobecker <brobecker@adacore.com>
8623 * stack.c (func_command): Remove trailing newline in call to error.
8625 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
8627 * regcache.h (regcache_raw_collect): Remove, update callers to
8628 use regcache::raw_collect.
8629 * regcache.c (regcache_raw_collect): Remove.
8631 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
8633 * regcache.h (regcache_raw_supply): Remove, update callers to
8634 use detached_regcache::raw_supply.
8635 * regcache.c (regcache_raw_supply): Remove.
8637 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
8639 * regcache.h (regcache_cooked_write_part): Remove, update
8640 callers to use regcache::cooked_write_part.
8641 * regcache.c (regcache_cooked_write_part): Remove.
8643 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
8645 * regcache.h (regcache_cooked_read_part): Remove, update callers
8646 to use readable_regcache::cooked_read_part.
8647 * regcache.c (regcache_cooked_read_part): Remove.
8649 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
8651 * regcache.h (regcache_cooked_read_value): Remove, update
8652 callers to use readable_regcache::cooked_read_value.
8653 * regcache.c (regcache_cooked_read_value): Remove.
8655 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
8657 * regcache.h (regcache_cooked_write): Remove, update callers to
8658 use regcache::cooked_write.
8659 * regcache.c (regcache_cooked_write): Remove.
8661 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
8663 * regcache.h (regcache_invalidate): Remove, update callers to
8664 use detached_regcache::invalidate instead.
8665 * regcache.c (regcache_invalidate): Remove.
8667 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
8669 * regcache.h (regcache_raw_write_part): Remove, update callers
8670 to use regcache::raw_write_part instead.
8671 * regcache.c (regcache_raw_write_part): Remove.
8673 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
8675 * regcache.h (regcache_raw_read_part): Remove, update callers to
8676 use readable_regcache::raw_read_part instead.
8677 * regcache.c (regcache_raw_read_part): Remove.
8679 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
8681 * regcache.h (regcache_cooked_read): Remove, update callers to
8682 use readable_regcache::cooked_read instead.
8683 * regcache.c (regcache_cooked_read): Remove.
8685 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
8687 * regcache.h (regcache_raw_write): Remove, update callers to use
8688 regcache::raw_write instead.
8689 * regcache.c (regcache_raw_write): Remove.
8691 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
8693 * regcache.h (regcache_raw_read): Remove, update callers to use
8694 readable_regcache::raw_read instead.
8695 * regcache.c (regcache_raw_read): Remove.
8697 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
8699 * regcache.h (regcache_raw_update): Remove, update callers to
8700 use readable_regcache::raw_update instead.
8701 * regcache.c (regcache_raw_update): Remove.
8703 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
8705 * regcache.h (regcache_register_status): Remove, update callers
8706 to use reg_buffer::get_register_status directly instead.
8707 * regcache.c (regcache_register_status): Remove.
8709 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
8711 * regcache.h (regcache_get_ptid): Remove, update all callers to
8712 call regcache::ptid instead.
8713 * regcache.c (regcache_get_ptid): Remove.
8715 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
8717 * Makefile.in (ALL_TARGET_OBS): Add or1k-tdep.o.
8719 2018-05-30 Pedro Alves <palves@redhat.com>
8721 * common/common-exceptions.h (exception_rethrow): Use
8724 2018-05-29 Simon Marchi <simon.marchi@polymtl.ca>
8726 * breakpoint.c (print_solib_event, check_status_catch_solib):
8727 Remove struct keyword in range-based for loops.
8728 * dbxread.c (find_corresponding_bincl_psymtab): Likewise.
8729 * dwarf2read.c (compute_delayed_physnames, rust_union_quirks);
8731 * linespec.c (find_superclass_methods, search_minsyms_for_name):
8733 * symfile.c (addr_info_make_relative): Likewise.
8734 * thread.c (value_in_thread_stack_temporaries): Likewise.
8736 2018-06-12 Weimin Pan <weimin.pan@oracle.com>
8739 * valops.c (value_struct_elt_for_reference): Call check_typedef on
8740 aggregate type to get its real type before accessing it.
8742 2018-05-29 Weimin Pan <weimin.pan@oracle.com>
8744 * minsyms.h (lookup_minimal_symbol_and_objfile): Remove declaration.
8745 * minsyms.c (lookup_minimal_symbol_and_objfile): Remove definition.
8746 * coff-pe-read.c (add_pe_forwarded_sym): Replace
8747 lookup_minimal_symbol_and_objfile with lookup_bound_minimal_symbol.
8748 * glibc-tdep.c (glibc_skip_solib_resolver): Likewise.
8749 * jit.c (jit_breakpoint_re_set_internal): Likewise.
8750 * printcmd.c (info_address_command): Likewise.
8752 2018-05-29 Tom Tromey <tom@tromey.com>
8754 * windows-nat.c (handle_exception): Update fall-through comment.
8756 2018-05-29 Tom Tromey <tom@tromey.com>
8758 * progspace.h (so_list_ptr): Remove typedef. Don't declare VEC.
8759 (struct program_space) <added_solibs>: Now a std::vector.
8760 * breakpoint.c (print_solib_event): Update.
8761 (check_status_catch_solib): Update.
8762 * progspace.c (clear_program_space_solib_cache): Update.
8763 * solib.c (update_solib_list): Update.
8765 2018-05-29 Tom Tromey <tom@tromey.com>
8767 * python/py-type.c (typy_richcompare): Update.
8768 * guile/scm-type.c (tyscm_equal_p_type_smob): Update.
8769 * gdbtypes.h (types_deeply_equal): Return bool.
8770 (types_equal): Likewise.
8771 * gdbtypes.c (type_equality_entry_d): Remove typedef. Don't
8773 (check_types_equal): Change worklist to std::vector. Return
8775 (struct type_equality_entry): Add constructor.
8776 (compare_maybe_null_strings): Return bool.
8777 (check_types_worklist): Return bool. Change worklist to
8779 (types_deeply_equal): Use std::vector.
8780 (types_equal): Return bool.
8781 (compare_maybe_null_strings): Simplify.
8783 2018-05-29 Tom Tromey <tom@tromey.com>
8785 * record-btrace.c (tp_t): Remove typedef. Don't declare VEC.
8787 2018-05-29 Tom Tromey <tom@tromey.com>
8789 * objc-lang.h: Don't include cp-support.h.
8790 * common/gdb_vecs.h (const_char_ptr): Remove typedef. Don't
8793 2018-05-27 Tom Tromey <tom@tromey.com>
8795 * Makefile.in (DEPFILES): Don't reference REMOTE_OBS.
8797 2018-05-25 Tom Tromey <tom@tromey.com>
8799 * value.c (value::location): Initialize.
8801 2018-05-25 Tom Tromey <tom@tromey.com>
8803 * dbxread.c (init_bincl_list): Remove.
8804 (bincl_list): Now a std::vector.
8805 (bincls_allocated, next_bincl): Remove.
8806 (free_bincl_list, do_free_bincl_list_cleanup)
8807 (make_cleanup_free_bincl_list): Remove.
8808 (dbx_read_symtab, elfstab_build_psymtabs): Use scoped_restore,
8810 (find_corresponding_bincl_psymtab, read_dbx_symtab): Update.
8811 (struct header_file_location): Add constructor.
8812 (add_bincl_to_list): Remove.
8814 2018-05-25 Tom Tromey <tom@tromey.com>
8816 * tui/tui.c (tui_enable): Update.
8817 * mi/mi-interp.c (mi_interp::init): Update.
8818 * interps.h (class interp) <name>: New method.
8819 <m_name>: Rename from name.
8820 (~scoped_restore_interp): Update.
8821 * interps.c (interp::interp): Update.
8822 (interp_add, interp_set, interp_lookup_existing)
8823 (current_interp_named_p): Update.
8825 2018-05-25 Tom Tromey <tom@tromey.com>
8827 * interps.c (interp_name): Remove.
8828 * mi/mi-interp.c (mi_interp::init): Update.
8829 * interps.h (interp_name): Remove.
8830 (~scoped_restore_interp): Update.
8831 * tui/tui.c (tui_enable): Update.
8833 2018-05-25 Tom Tromey <tom@tromey.com>
8835 * utils.c (fputs_maybe_filtered): Update.
8836 * linespec.c (decode_line_full): Update.
8837 * mi/mi-interp.c (mi_on_normal_stop_1, mi_tsv_modified)
8838 (mi_print_breakpoint_for_event, mi_solib_loaded)
8839 (mi_solib_unloaded, mi_command_param_changed, mi_memory_changed)
8840 (mi_user_selected_context_changed): Update.
8841 * mi/mi-main.c (mi_execute_command): Update.
8842 * cli/cli-script.c (execute_control_command): Update.
8843 * python/python.c (execute_gdb_command): Update.
8844 * solib.c (info_sharedlibrary_command): Update.
8845 * interps.c (interp_ui_out): Remove.
8846 * interps.h (interp_ui_out): Remove.
8848 2018-05-25 Tom Tromey <tom@tromey.com>
8850 * tui/tui-interp.c (as_tui_interp): Use dynamic_cast.
8851 * mi/mi-interp.c (as_mi_interp): Use dynamic_cast.
8852 * cli/cli-interp.c (as_cli_interp): Use dynamic_cast.
8854 2018-05-25 Tom Tromey <tom@tromey.com>
8856 * cli/cli-interp.c (safe_execute_command): Use scoped_restore.
8857 * interps.c (interp_exec): Use scoped_restore.
8859 2018-05-25 Tom Tromey <tom@tromey.com>
8861 * remote.c (remote_target::remote_file_get): Use
8863 (remote_target::remote_file_put): Likewise.
8865 2018-05-25 Tom Tromey <tom@tromey.com>
8867 * coff-pe-read.c (struct read_pe_section_data) <section_name>: Now
8869 (get_pe_section_index, add_pe_exported_sym): Update.
8870 (read_pe_exported_syms): Use gdb::def_vector.
8872 2018-05-25 Tom Tromey <tom@tromey.com>
8874 * frame.c (remove_prev_frame): Remove.
8875 (get_prev_frame_if_no_cycle): Use TRY/CATCH.
8877 2018-05-25 Maciej W. Rozycki <macro@mips.com>
8879 * mips-linux-tdep.h (mips_supply_fpregset, mips_fill_fpregset):
8881 * mips-linux-nat.c (supply_fpregset): Always call
8882 `mips64_supply_fpregset' rather than `mips_supply_fpregset'.
8883 (fill_fpregset): Always call `mips64_fill_fpregset' rather than
8884 `mips_fill_fpregset'.
8885 * mips-linux-tdep.c (mips_supply_fpregset)
8886 (mips_supply_fpregset_wrapper, mips_fill_fpregset)
8887 (mips_fill_fpregset_wrapper): Remove functions.
8888 (mips64_supply_fpregset, mips64_fill_fpregset): Update comments.
8889 (mips_linux_fpregset): Remove variable.
8890 (mips_linux_iterate_over_regset_sections): Use
8891 `mips64_linux_fpregset' in place of `mips_linux_fpregset'.
8892 (mips_linux_o32_sigframe_init): Remove comment.
8894 2018-05-25 Pedro Alves <palves@redhat.com>
8896 * remote.c (struct vCont_action_support, MAXTHREADLISTRESULTS)
8897 (struct readahead_cache, struct packet_reg, struct
8898 remote_arch_state, class remote_state): Move higher up in the
8900 (remote_target::m_remote_state): Now an object instead of a pointer.
8901 (remote_target::get_remote_state): Adjust.
8903 2018-05-24 Andrew Burgess <andrew.burgess@embecosm.com>
8905 * stack.c (select_and_print_frame): Delete.
8906 (struct function_bounds): Move struct within function.
8907 (func_command): Most content moved into new function
8908 find_frame_for_function, use new function, print result, add
8910 (find_frame_for_function): New function, now returns a result.
8912 2018-05-24 Philippe Waroquiers <philippe.waroquiers@skynet.be>
8914 * stack.c (iterate_over_block_arg_vars): Fix comment.
8915 (print_frame_arg_vars): Pass stream in cb_data, not gdb_stdout.
8917 2018-05-24 Andrew Burgess <andrew.burgess@embecosm.com>
8921 (scoped_restore_selected_frame::scoped_restore_selected_frame):
8923 (scoped_restore_selected_frame::~scoped_restore_selected_frame):
8925 * frame.h (class scoped_restore_selected_frame): New class.
8926 * stack.c (print_frame_local_vars): Remove catching and rethrowing
8927 of any exception, use scoped_restore_selected_frame to restore the
8930 2018-05-24 Pedro Alves <palves@redhat.com>
8932 * darwin-nat.h (darwin_nat_target::create_inferior): Mark with
8935 2018-05-23 Tom Tromey <tom@tromey.com>
8937 * complaints.c (struct complaints): Remove.
8938 (symfile_complaint_book): Remove.
8939 (series): New global.
8940 (complaint_internal): Update.
8941 (clear_complaints): Update.
8943 2018-05-23 Tom Tromey <tom@tromey.com>
8945 * complaints.c (counters): New global.
8946 (struct complain): Remove.
8947 (struct complaints) <root>: Remove.
8948 (complaint_sentinel): Remove.
8949 (symfile_complaint_book): Update.
8950 (find_complaint) Remove.
8951 (complaint_internal, clear_complaints): Update.
8953 2018-05-23 Tom Tromey <tom@tromey.com>
8955 * complaints.c (struct complain) <file, line>: Remove.
8956 (find_complaint): Remove file, line parameters.
8957 (complaint_internal): Update.
8959 2018-05-23 Tom Tromey <tom@tromey.com>
8961 * complaints.c (vcomplaint): Remove.
8962 (complaint_internal) Merge in contents of vcomplaint.
8964 2018-05-23 Tom Tromey <tom@tromey.com>
8966 * complaints.c (struct complaints) <explanation>: Remove.
8967 (symfile_explanations): Remove.
8968 (symfile_complaint_book): Update.
8969 (vcomplaint): Update.
8970 (struct explanation): Remove.
8972 2018-05-23 Tom Tromey <tom@tromey.com>
8974 * complaints.c (symfile_complaints): Remove.
8975 (complaint_internal): Remove "complaints" parameter.
8976 (clear_complaints, vcomplaint): Remove "c" parameter.
8977 (get_complaints): Remove.
8978 * dwarf2read.c (dwarf2_statement_list_fits_in_line_number_section_complaint)
8979 (dwarf2_debug_line_missing_file_complaint)
8980 (dwarf2_debug_line_missing_end_sequence_complaint)
8981 (dwarf2_complex_location_expr_complaint)
8982 (dwarf2_const_value_length_mismatch_complaint)
8983 (dwarf2_section_buffer_overflow_complaint)
8984 (dwarf2_macro_malformed_definition_complaint)
8985 (dwarf2_invalid_attrib_class_complaint)
8986 (create_addrmap_from_index, dw2_symtab_iter_next)
8987 (dw2_expand_marked_cus)
8988 (dw2_debug_names_iterator::find_vec_in_debug_names)
8989 (dw2_debug_names_iterator::next, dw2_debug_names_iterator::next)
8990 (create_debug_type_hash_table, init_cutu_and_read_dies)
8991 (partial_die_parent_scope, add_partial_enumeration)
8992 (skip_one_die, fixup_go_packaging, quirk_rust_enum, process_die)
8993 (dwarf2_compute_name, dwarf2_physname, read_namespace_alias)
8994 (read_import_statement, read_file_scope, create_dwo_cu_reader)
8995 (create_cus_hash_table, create_dwp_hash_table)
8996 (inherit_abstract_dies, read_func_scope, read_call_site_scope)
8997 (dwarf2_rnglists_process, dwarf2_ranges_process)
8998 (dwarf2_add_type_defn, dwarf2_attach_fields_to_type)
8999 (dwarf2_add_member_fn, get_alignment, maybe_set_alignment)
9000 (handle_struct_member_die, process_structure_scope)
9001 (read_array_type, read_common_block, read_module_type)
9002 (read_tag_pointer_type, read_typedef, read_base_type)
9003 (read_subrange_type, load_partial_dies, partial_die_info::read)
9004 (partial_die_info::read, partial_die_info::read)
9005 (partial_die_info::read, read_checked_initial_length_and_offset)
9006 (dwarf2_string_attr, read_formatted_entries)
9007 (dwarf_decode_line_header)
9008 (lnp_state_machine::check_line_address, dwarf_decode_lines_1)
9009 (new_symbol, dwarf2_const_value_attr, lookup_die_type)
9010 (read_type_die_1, determine_prefix, dwarf2_get_ref_die_offset)
9011 (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
9012 (get_signatured_type, get_DW_AT_signature_type)
9013 (decode_locdesc, file_file_name, consume_improper_spaces)
9014 (skip_form_bytes, skip_unknown_opcode, dwarf_parse_macro_header)
9015 (dwarf_decode_macro_bytes, dwarf_decode_macros)
9016 (dwarf2_symbol_mark_computed, set_die_type)
9017 (read_attribute_value): Update.
9018 * stap-probe.c (handle_stap_probe, get_stap_base_address):
9020 * dbxread.c (unknown_symtype_complaint)
9021 (lbrac_mismatch_complaint, repeated_header_complaint)
9022 (set_namestring, function_outside_compilation_unit_complaint)
9023 (read_dbx_symtab, process_one_symbol): Update.
9024 * gdbtypes.c (stub_noname_complaint): Update.
9025 * windows-nat.c (handle_unload_dll): Update.
9026 * coffread.c (coff_symtab_read, enter_linenos, decode_type)
9027 (decode_base_type): Update.
9028 * xcoffread.c (bf_notfound_complaint, ef_complaint)
9029 (eb_complaint, record_include_begin, record_include_end)
9030 (enter_line_range, xcoff_next_symbol_text, read_xcoff_symtab)
9031 (process_xcoff_symbol, read_symbol)
9032 (function_outside_compilation_unit_complaint)
9033 (scan_xcoff_symtab): Update.
9034 * machoread.c (macho_symtab_read, macho_add_oso_symfile): Update.
9035 * buildsym.c (finish_block_internal, make_blockvector)
9036 (end_symtab_get_static_block, augment_type_symtab): Update.
9037 * dtrace-probe.c (dtrace_process_dof)
9038 (dtrace_static_probe_ops::get_probes): Update.
9039 * complaints.h (struct complaint): Don't declare.
9040 (symfile_complaints): Remove.
9041 (complaint_internal): Remove "complaints" parameter.
9042 (complaint): Likewise.
9043 (clear_complaints): Likewise.
9044 * symfile.c (syms_from_objfile_1, finish_new_objfile)
9045 (reread_symbols): Update.
9046 * dwarf2-frame.c (dwarf2_restore_rule, execute_cfa_program)
9047 (dwarf2_frame_cache, decode_frame_entry): Update.
9048 * dwarf2loc.c (dwarf_reg_to_regnum): Update.
9049 * objc-lang.c (lookup_objc_class, lookup_child_selector)
9050 (info_selectors_command): Update.
9051 * macrotab.c (macro_include, check_for_redefinition)
9052 (macro_undef): Update.
9053 * objfiles.c (filter_overlapping_sections): Update.
9054 * stabsread.c (invalid_cpp_abbrev_complaint)
9055 (reg_value_complaint, stabs_general_complaint, dbx_lookup_type)
9056 (define_symbol, error_type, read_type, rs6000_builtin_type)
9057 (stabs_method_name_from_physname, read_member_functions)
9058 (read_cpp_abbrev, read_baseclasses, read_tilde_fields)
9059 (attach_fields_to_type, complain_about_struct_wipeout)
9060 (read_range_type, read_args, common_block_start)
9061 (common_block_end, cleanup_undefined_types_1, scan_file_globals):
9063 * mdebugread.c (index_complaint, unknown_ext_complaint)
9064 (basic_type_complaint, bad_tag_guess_complaint)
9065 (bad_rfd_entry_complaint, unexpected_type_code_complaint)
9066 (reg_value_complaint, parse_symbol, parse_type, upgrade_type)
9067 (parse_procedure, parse_lines)
9068 (function_outside_compilation_unit_complaint)
9069 (parse_partial_symbols, psymtab_to_symtab_1, cross_ref)
9070 (bad_tag_guess_complaint, reg_value_complaint): Update.
9071 * cp-support.c (demangled_name_complaint): Update.
9072 * macroscope.c (sal_macro_scope): Update.
9073 * dwarf-index-write.c (class debug_names): Update.
9075 2018-05-23 Tom Tromey <tom@tromey.com>
9077 * complaints.c (clear_complaints): Remove "noisy" parameter.
9078 * complaints.h (clear_complaints): Update.
9079 * symfile.c (syms_from_objfile_1, finish_new_objfile)
9080 (reread_symbols): Update.
9082 2018-05-23 Tom Tromey <tom@tromey.com>
9084 * complaints.c (enum complaint_series): Remove FIRST_MESSAGE,
9086 (vcomplaint, clear_complaints): Update.
9087 (symfile_explanations): Remove some messages.
9089 2018-05-23 Tom Tromey <tom@tromey.com>
9091 * complaints.c (internal_complaint): Remove.
9092 * complaints.h (internal_complaint): Remove.
9094 2018-05-22 Maciej W. Rozycki <macro@mips.com>
9096 * i387-tdep.c (i387_collect_xsave): Make `i' unsigned.
9098 2018-05-22 Pedro Alves <palves@redhat.com>
9100 * remote-fileio.c (remote_fileio_reply, remote_fileio_ioerror)
9101 (remote_fileio_badfd, remote_fileio_return_errno)
9102 (remote_fileio_return_success, remote_fileio_func_open)
9103 (remote_fileio_func_open, remote_fileio_func_close)
9104 (remote_fileio_func_read, remote_fileio_func_write)
9105 (remote_fileio_func_lseek, remote_fileio_func_rename)
9106 (remote_fileio_func_unlink, remote_fileio_func_stat)
9107 (remote_fileio_func_fstat, remote_fileio_func_gettimeofday)
9108 (remote_fileio_func_isatty, remote_fileio_func_system): Add
9109 remote_target parameter.
9110 (remote_fio_func_map) <func>: Add remote_target parameter.
9111 (do_remote_fileio_request, remote_fileio_request):
9112 * remote-fileio.h (remote_fileio_request):
9113 * remote-notif.c (remote_notif_ack, remote_notif_parse, ): Add
9114 remote_target parameter.
9115 (remote_notif_process, handle_notification): Adjust to pass down
9117 (remote_notif_state_allocate): Add remote_target parameter. Save
9119 * remote-notif.h (struct remote_target): Forward declare.
9120 (struct notif_client) <parse, ack, can_get_pending_events>: Add
9121 remote_target parameter.
9122 (struct remote_notif_state) <remote>: New field.
9123 (remote_notif_ack, remote_notif_parse): Add remote_target
9125 (remote_notif_state_allocate, remote_notif_state_allocate): Add
9126 remote_target parameter.
9127 * remote.c (OPAQUETHREADBYTES, threadref, gdb_ext_thread_info)
9128 (threads_listing_context, rmt_thread_action, protocol_feature)
9129 (packet_reg, stop_reply, stop_reply_p, enum packet_support)
9130 (packet_result, struct threads_listing_context, remote_state):
9131 Move definitions and declarations higher up.
9132 (remote_target) <~remote_target>: Declare.
9133 (remote_download_command_source, remote_file_put, remote_file_get)
9134 (remote_file_delete, remote_hostio_pread, remote_hostio_pwrite)
9135 (remote_hostio_pread_vFile, remote_hostio_send_command)
9136 (remote_hostio_set_filesystem, remote_hostio_open)
9137 (remote_hostio_close, remote_hostio_unlink, remote_state)
9138 (get_remote_state, get_remote_packet_size, get_memory_packet_size)
9139 (get_memory_write_packet_size, get_memory_read_packet_size)
9140 (append_pending_thread_resumptions, remote_detach_1)
9141 (append_resumption, remote_resume_with_vcont)
9142 (add_current_inferior_and_thread, wait_ns, wait_as)
9143 (process_stop_reply, remote_notice_new_inferior)
9144 (process_initial_stop_replies, remote_add_thread)
9145 (btrace_sync_conf, remote_btrace_maybe_reopen)
9146 (remove_new_fork_children, kill_new_fork_children)
9147 (discard_pending_stop_replies, stop_reply_queue_length)
9148 (check_pending_events_prevent_wildcard_vcont)
9149 (discard_pending_stop_replies_in_queue, stop_reply)
9150 (remote_notif_remove_queued_reply, stop_reply *queued_stop_reply)
9151 (peek_stop_reply, remote_parse_stop_reply, remote_stop_ns)
9152 (remote_interrupt_as, remote_interrupt_ns)
9153 (remote_get_noisy_reply, remote_query_attached)
9154 (remote_add_inferior, remote_current_thread, get_current_thread)
9155 (set_thread, set_general_thread, set_continue_thread)
9156 (set_general_process, write_ptid)
9157 (remote_unpack_thread_info_response, remote_get_threadinfo)
9158 (parse_threadlist_response, remote_get_threadlist)
9159 (remote_threadlist_iterator, remote_get_threads_with_ql)
9160 (remote_get_threads_with_qxfer)
9161 (remote_get_threads_with_qthreadinfo, extended_remote_restart)
9162 (get_offsets, remote_check_symbols, remote_supported_packet)
9163 (remote_query_supported, remote_packet_size)
9164 (remote_serial_quit_handler, remote_detach_pid)
9165 (remote_vcont_probe, remote_resume_with_hc)
9166 (send_interrupt_sequence, interrupt_query)
9167 (remote_notif_get_pending_events, fetch_register_using_p)
9168 (send_g_packet, process_g_packet, fetch_registers_using_g)
9169 (store_register_using_P, store_registers_using_G)
9170 (set_remote_traceframe, check_binary_download)
9171 (remote_write_bytes_aux, remote_write_bytes, remote_read_bytes_1)
9172 (remote_xfer_live_readonly_partial, remote_read_bytes)
9173 (remote_send_printf, remote_flash_write, readchar)
9174 (remote_serial_write, putpkt, putpkt_binary, skip_frame)
9175 (read_frame, getpkt, getpkt_or_notif_sane_1, getpkt_sane)
9176 (getpkt_or_notif_sane, remote_vkill, remote_kill_k)
9177 (extended_remote_disable_randomization, extended_remote_run)
9178 (send_environment_packet, extended_remote_environment_support)
9179 (extended_remote_set_inferior_cwd, remote_write_qxfer)
9180 (remote_read_qxfer, push_stop_reply, vcont_r_supported)
9181 (packet_command): Now methods of ...
9182 (remote_target): ... this class.
9183 (m_remote_state) <remote_target>: New field.
9184 (struct remote_state) <stop_reply_queue,
9185 remote_async_inferior_event_token, wait_forever_enabled_p>: New
9187 (remote_state::remote_state): Allocate stop_reply_queue.
9188 (remote_state): Delete global.
9189 (get_remote_state_raw): Delete.
9190 (remote_target::get_remote_state): Allocate m_remote_state on
9192 (get_current_remote_target): New.
9193 (remote_ops, extended_remote_ops): Delete.
9194 (wait_forever_enabled_p, remote_async_inferior_event_token):
9195 Delete, moved to struct remote_state.
9196 (remote_target::close): Delete self. Destruction bits split to
9198 (remote_target::~remote_target): ... this.
9199 (show_memory_packet_size): Adjust to use
9200 get_current_remote_target.
9201 (struct protocol_feature) <func>: Add remote_target parameter.
9202 All callers adjusted.
9203 (curr_quit_handler_target): New.
9204 (remote_serial_quit_handler): Reimplement.
9205 (remote_target::open_1): Adjust to use get_current_remote_target.
9206 Heap-allocate remote_target/extended_remote_target instances.
9207 (vcont_builder::vcont_builder): Add remote_target parameter, and
9208 save it in m_remote. All callers adjusted.
9209 (vcont_builder::m_remote): New field.
9210 (vcont_builder::restart, vcont_builder::flush)
9211 (vcont_builder::push_action): Use it.
9212 (remote_target::commit_resume): Use it.
9213 (struct queue_iter_param) <remote>: New field.
9214 (remote_target::remove_new_fork_children): Fill in 'remote' field.
9215 (check_pending_event_prevents_wildcard_vcont_callback_data): New.
9216 (check_pending_event_prevents_wildcard_vcont_callback)
9217 (remote_target::check_pending_events_prevent_wildcard_vcont)
9218 (remote_target::discard_pending_stop_replies)
9219 (remote_target::discard_pending_stop_replies_in_queue)
9220 (remote_target::remote_notif_remove_queued_reply): Fill in
9222 (remote_notif_get_pending_events): New.
9223 (remote_target::readchar, remote_target::remote_serial_write):
9224 Save/restore curr_quit_handler_target.
9226 (kill_new_fork_children): Fill in 'remote' field.
9227 (packet_command): Use get_current_remote_target, defer to
9228 remote_target method of same name.
9229 (scoped_remote_fd::scoped_remote_fd): Add 'remote_target'
9230 parameter, and save it in m_remote. All callers adjusted.
9231 (scoped_remote_fd::release): Use m_remote.
9232 (scoped_remote_fd::m_remote): New field.
9233 (remote_file_put, remote_file_get, remote_file_delete): Use
9234 get_current_remote_target, defer to remote_target method of same
9236 (remote_btrace_reset): Add remote_state paremeter. Update all
9238 (remote_async_inferior_event_handler). Pass down 'data'.
9239 (remote_new_objfile): Use get_current_remote_target.
9240 (remote_target::vcont_r_supported): New.
9241 (set_range_stepping): Use get_current_remote_target and
9242 remote_target::vcont_r_supported.
9243 (_initialize_remote): Don't allocate 'remote_state' and
9244 'stop_reply_queue' globals.
9245 * remote.h (struct remote_target): Forward declare.
9246 (getpkt, putpkt, remote_notif_get_pending_events): Add
9247 'remote_target' parameter.
9249 2018-05-22 Pedro Alves <palves@redhat.com>
9251 * remote.c (vcont_builder): Now a class. Make all data members
9253 (vcont_builder) <vcont_builder, restart, flush, push_action>:
9255 (vcont_builder_restart): Rename to ...
9256 (vcont_builder::restart): ... this.
9257 (vcont_builder_flush): Rename to ...
9258 (vcont_builder::flush): ... this.
9259 (vcont_builder_push_action): Rename to ...
9260 (vcont_builder::push_action): ... this.
9261 (remote_target::commit_resume): Adjust.
9263 2018-05-22 Pedro Alves <palves@redhat.com>
9265 * remote.c (DEFAULT_MAX_MEMORY_PACKET_SIZE): Rename to ...
9266 (DEFAULT_MAX_MEMORY_PACKET_SIZE_FIXED): ... this.
9267 (get_fixed_memory_packet_size): New.
9268 (get_memory_packet_size): Use it.
9269 (set_memory_packet_size): Don't override the config size with
9270 DEFAULT_MAX_MEMORY_PACKET_SIZE.
9271 (show_memory_packet_size): Use get_fixed_memory_packet_size.
9272 Don't refer to get_memory_packet_size if not connected to a remote
9273 target. Show "(default)" if configured size is 0.
9275 2018-05-22 Pedro Alves <palves@redhat.com>
9277 * remote.c (remote_target::mourn_inferior): Move
9278 discard_pending_stop_replies call here from ...
9279 (_initialize_remote): ... here.
9281 2018-05-22 Pedro Alves <palves@redhat.com>
9283 * remote.c (compare_section_command): Remove set_general_process
9286 2018-05-22 Pedro Alves <palves@redhat.com>
9288 * remote.c (struct packet_reg, struct remote_arch_state):
9289 Move higher up in the file.
9290 (remote_state) <m_arch_states>: Store remote_arch_state values
9291 instead of remote_arch_state pointers.
9292 (remote_state::get_remote_arch_state): Adjust.
9294 2018-05-22 Pedro Alves <palves@redhat.com>
9296 * remote.c: Include <unordered_map>.
9297 (remote_state): Now a class.
9298 (remote_state) <get_remote_arch_state>: Declare method.
9299 <get_remote_arch_state>: New field.
9300 (remote_arch_state) <remote_arch_state>: Declare ctor.
9301 <regs>: Now a unique_ptr.
9302 (remote_gdbarch_data_handle): Delete.
9303 (get_remote_arch_state): Delete.
9304 (remote_state::get_remote_arch_state): New.
9305 (get_remote_state): Adjust to call remote_state's
9306 get_remote_arch_state method.
9307 (init_remote_state): Delete, bits factored out to ...
9308 (remote_arch_state::remote_arch_state): ... this new method.
9309 (get_remote_packet_size, get_memory_packet_size)
9310 (process_g_packet, remote_target::fetch_registers)
9311 (remote_target::prepare_to_store, store_registers_using_G)
9312 (remote_target::store_registers, remote_target::get_trace_status):
9313 Adjust to call remote_state's method.
9314 (_initialize_remote): Remove reference to
9315 remote_gdbarch_data_handle.
9317 2018-05-22 Pedro Alves <palves@redhat.com>
9319 * remote.c (struct readahead_cache) <invalidate, invalidate_fd,
9320 pread>: New method declarations.
9321 (remote_target::open_1): Adjust.
9322 (readahead_cache_invalidate): Rename to ...
9323 (readahead_cache::invalidate): ... this, and adjust to be a class
9325 (readahead_cache_invalidate_fd): Rename to ...
9326 (readahead_cache::invalidate_fd): ... this, and adjust to be a
9328 (remote_hostio_pwrite): Adjust.
9329 (remote_hostio_pread_from_cache): Rename to ...
9330 (readahead_cache::pread): ... this, and adjust to be a class
9332 (remote_hostio_close): Adjust.
9334 2018-05-22 Pedro Alves <palves@redhat.com>
9336 * remote.c (remote_hostio_close_cleanup): Delete.
9337 (class scoped_remote_fd): New.
9338 (remote_file_put, remote_file_get): Use it.
9340 2018-05-22 Pedro Alves <palves@redhat.com>
9342 (struct vCont_action_support): Use bool and initialize all fields.
9343 (struct readahead_cache): Initialize all fields.
9344 (remote_state): Use bool and initialize all fields.
9345 (remote_state::remote_state, remote_state::~remote_state): New.
9346 (new_remote_state): Delete.
9347 (_initialize_remote): Use new to allocate remote_state.
9349 2018-05-22 Pedro Alves <palves@redhat.com>
9353 * c-exp.y: Include "c-support.h".
9354 (parse_number, c_parse_escape, lex_one_token): Use TOLOWER instead
9355 of tolower. Use c_ident_is_alpha to scan names.
9356 * c-lang.c: Include "c-support.h".
9357 (convert_ucn, convert_octal, convert_hex, convert_escape): Use
9358 ISXDIGIT instead of isxdigit and ISDIGIT instead of isdigit.
9359 * c-support.h: New file, with bits factored out from ...
9360 * cp-name-parser.y: ... this file.
9361 Include "c-support.h".
9362 (cp_ident_is_alpha, cp_ident_is_alnum): Deleted, moved to
9363 c-support.h and renamed.
9364 (symbol_end, yylex): Adjust.
9366 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
9368 * arch/ppc-linux-common.c (ppc_linux_has_isa205): Change the
9369 parameter type to CORE_ADDR.
9370 * arch/ppc-linux-common.h (ppc_linux_has_isa205): Change the
9371 parameter type in declaration to CORE_ADDR.
9372 * ppc-linux-tdep.c (ppc_linux_core_read_description): Call
9373 target_auxv_search to get AT_HWCAP and use the result to get the
9375 * ppc-linux-nat.c (ppc_linux_get_hwcap): Change the return type
9376 to CORE_ADDR. Remove the cast of the return value to unsigned
9377 long. Fix error predicate of target_auxv_search.
9378 (ppc_linux_nat_target::read_description): Change the type of the
9379 hwcap variable to CORE_ADDR.
9381 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
9383 * rs6000-tdep.c (rs6000_gdbarch_init): Assign 1 to have_dfp only
9384 if the size of fpscr is larger than 32 bits.
9386 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
9388 * ppc-linux-tdep.c (ppc_linux_vsxregset): New function.
9389 (ppc32_linux_vsxregmap): New global.
9390 (ppc32_linux_vsxregset): Initialize with ppc32_linux_vsxregmap,
9391 regcache_supply_regset, and regcache_collect_regset.
9392 * ppc-linux-tdep.h (ppc_linux_vsxregset): Declare.
9393 * ppc-linux-nat.c (supply_vsxregset, fill_vsxregset): Remove.
9394 (fetch_vsx_register, store_vsx_register): Remove.
9395 (fetch_vsx_registers): Add regno parameter. Get regset using
9396 ppc_linux_vsxregset. Use regset to supply registers.
9397 (store_vsx_registers): Add regno parameter. Get regset using
9398 ppc_linux_vsxregset. Use regset to collect registers.
9399 (fetch_register): Call fetch_vsx_registers instead of
9401 (store_register): Call store_vsx_registers instead of
9403 (fetch_ppc_registers): Call fetch_vsx_registers with -1 for the
9404 new regno parameter.
9405 (store_ppc_registers): Call store_vsx_registers with -1 for the
9406 new regno parameter.
9407 * rs6000-tdep.c (ppc_vsx_support_p, ppc_supply_vsxreget)
9408 (ppc_collect_vsxregset): Remove.
9410 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
9412 * ppc-tdep.h (struct ppc_reg_offsets): Remove vector register
9414 * ppc-fbsd-tdep.c (ppc32_fbsd_reg_offsets): Remove initializers
9415 for vector register offset fields.
9416 (ppc64_fbsd_reg_offsets): Likewise.
9417 * ppc-nbsd-tdep.c (_initialize_ppcnbsd_tdep): Remove assignment
9418 to vector register offset fields.
9419 * ppc-obsd-tdep.c (_initialize_ppcnbsd_tdep): Remove assignment
9420 to vector register offset fields.
9421 * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Remove assignment to
9422 vector register offset fields.
9423 * rs6000-aix-tdep.c (rs6000_aix32_reg_offsets): Remove
9424 initializers for vector register offset fields.
9425 (rs6000_aix64_reg_offsets): Likewise.
9426 * rs6000-tdep.c (ppc_vrreg_offset): Remove.
9427 (ppc_supply_vrregset): Remove.
9428 (ppc_collect_vrregset): Remove.
9429 * ppc-linux-tdep.c (ppc_linux_collect_vrregset): New function.
9430 (ppc_linux_vrregset) : New function.
9431 (ppc32_le_linux_vrregmap, ppc32_be_linux_vrregmap)
9432 (ppc32_le_linux_vrregset, ppc32_be_linux_vrregset): New globals.
9433 (ppc32_linux_vrregset): Remove.
9434 (ppc_linux_iterate_over_regset_sections): Call ppc_linux_vrregset
9435 and use result instead of ppc32_linux_vrregset.
9436 (ppc32_linux_reg_offsets): Remove initializers for vector register
9438 (ppc64_linux_reg_offsets): Likewise.
9439 * ppc-linux-tdep.h (ppc_linux_vrregset): New declaration.
9440 * ppc-linux-nat.c: Include regset.h.
9441 (gdb_vrregset_t): Adjust comment to account for little-endian
9443 (supply_vrregset, fill_vrregset): Remove.
9444 (fetch_altivec_register, store_altivec_register): Remove.
9445 (fetch_altivec_registers): Add regno parameter. Get regset using
9446 ppc_linux_vrregset. Use regset to supply registers.
9447 (store_altivec_registers): Add regno parameter. Get regset using
9448 ppc_linux_vrregset. Use regset to collect registers.
9449 (fetch_register): Call fetch_altivec_registers instead of
9450 fetch_altivec_register.
9451 (store_register): Call store_altivec_registers instead of
9452 store_altivec_register.
9453 (fetch_ppc_registers): Call fetch_altivec_registers with -1 for
9454 the new regno parameter.
9455 (store_ppc_registers): Call store_altivec_registers with -1 for
9456 the new regno parameter.
9458 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
9460 * arch/ppc-linux-common.h (PPC_LINUX_SIZEOF_VRREGSET)
9461 (PPC_LINUX_SIZEOF_VSXREGSET): Define.
9462 * ppc-linux-nat.c (SIZEOF_VSXREGS, SIZEOF_VRREGS): Remove.
9463 (gdb_vrregset_t): Change array type size to
9464 PPC_LINUX_SIZEOF_VRREGSET.
9465 (gdb_vsxregset_t): Change array type size to
9466 PPC_LINUX_SIZEOF_VSXREGSET.
9467 * ppc-linux-tdep.c (ppc_linux_iterate_over_regset_sections):
9468 Change integer literals to PPC_LINUX_SIZEOF_VRREGSET and
9469 PPC_LINUX_SIZEOF_VSXREGSET.
9471 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
9473 * configure.nat <linux powerpc>: Add ppc-linux.o to NATDEPFILES.
9474 * ppc-linux-nat.c (ppc_linux_target_wordsize): Move to
9476 (ppc_linux_nat_target::auxv_parse): Get thread id tid. Call
9477 ppc_linux_target_wordsize with tid.
9478 (ppc_linux_nat_target::read_description): Call ppc_linux_target
9480 * nat/ppc-linux.c: Include nat/gdb_ptrace.h.
9481 (ppc64_64bit_inferior_p): Add static and inline specifiers.
9482 (ppc_linux_target_wordsize): Move here from ppc-linux-nat.c. Add
9483 tid parameter. Remove static specifier.
9484 * nat/ppc-linux.h (ppc64_64bit_inferior_p): Remove declaration.
9485 (ppc_linux_target_wordsize): New declaration.
9487 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
9489 * arch/ppc-linux-common.c: New file.
9490 * arch/ppc-linux-common.h: New file.
9491 * arch/ppc-linux-tdesc.h: New file.
9492 * configure.tgt (powerpc*-*-linux*): Add arch/ppc-linux-common.o.
9493 * Makefile.in (ALL_TARGET_OBS): Add arch/ppc-linux-common.o.
9494 (HFILES_NO_SRCDIR): Add arch/ppc-linux-common.h and
9495 arch/ppc-linux-tdesc.h.
9496 * ppc-linux-nat.c: Include arch/ppc-linux-common.h and
9497 arch/ppc-linux-tdesc.h.
9498 (ppc_linux_nat_target::read_description): Remove target
9499 description matching code. Fill a ppc_linux_features struct and
9500 call ppc_linux_match_description with it. Move comment about ISA
9501 2.05 to ppc-linux-common.c.
9502 * ppc-linux-tdep.c: Include arch/ppc-linux-common.h and
9503 arch/ppc-linux-tdesc.h.
9504 (ppc_linux_core_read_description): Remove target description
9505 matching code. Fill a ppc_linux_features struct and call
9506 ppc_linux_match_description with it.
9507 * ppc-linux-tdep.h (tdesc_powerpc_32l, tdesc_powerpc_64l)
9508 (tdesc_powerpc_altivec32l, tdesc_powerpc_altivec64l)
9509 (tdesc_powerpc_cell32l, tdesc_powerpc_cell64l)
9510 (tdesc_powerpc_vsx32l, tdesc_powerpc_vsx64l)
9511 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_64l)
9512 (tdesc_powerpc_isa205_altivec32l, tdesc_powerpc_isa205_altivec64l)
9513 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_isa205_vsx64l)
9514 (tdesc_powerpc_e500l): Remove.
9516 2018-05-22 Joel Brobecker <brobecker@adacore.com>
9518 * ada-lang.c (catch_assert_command): Pass empty string instead
9519 of NULL for excep_string argument.
9521 2018-05-22 Maciej W. Rozycki <macro@mips.com>
9523 * mips-linux-nat.c (mips64_linux_register_addr): Return -1 if
9524 the width of the requested register exceeds the width of the
9527 2018-05-21 Tom Tromey <tom@tromey.com>
9529 * printcmd.c (output_command): Remove.
9530 (output_command_const): Rename to output_command.
9531 * valprint.h (output_command): Rename from output_command_const.
9532 * tracepoint.c (trace_dump_actions): Call output_command.
9534 2018-05-21 Tom Tromey <tom@tromey.com>
9536 * mi/mi-cmd-catch.c (mi_cmd_catch_assert)
9537 (mi_cmd_catch_exception, mi_cmd_catch_handlers): Update.
9538 * ada-lang.h (create_ada_exception_catchpoint): Update.
9539 * ada-lang.c (struct ada_catchpoint) <excep_string>: Now a
9541 (create_excep_cond_exprs, ~ada_catchpoint)
9542 (should_stop_exception, print_one_exception)
9543 (print_mention_exception, print_recreate_exception): Update.
9544 (ada_get_next_arg): Remove.
9545 (catch_ada_exception_command_split): Use std::string. Change type
9546 of "excep_string", "cond_string".
9547 (catch_ada_exception_command): Update.
9548 (create_ada_exception_catchpoint): Change type of excep_string.
9549 (ada_exception_sal): Remove excep_string parameter.
9550 (~ada_catchpoint): Remove.
9552 2018-05-21 Tom Tromey <tom@tromey.com>
9554 * ada-lang.c (ada_collect_symbol_completion_matches): Remove
9557 2018-05-21 Tom Tromey <tom@tromey.com>
9559 * ada-lang.c (ada_exception_message_1, ada_exception_message):
9560 Return unique_xmalloc_ptr.
9561 (print_it_exception): Update.
9563 2018-05-21 Tom Tromey <tom@tromey.com>
9565 * tracepoint.c (trace_dump_actions): Use std::string.
9567 2018-05-21 Tom Tromey <tom@tromey.com>
9569 * symfile.c (reread_symbols): Use std::string for original_name.
9571 2018-05-21 Tom Tromey <tom@tromey.com>
9573 * dwarf2read.c (dwarf2_read_debug_names): Use std::unique_ptr.
9574 (mapped_index_base): Use DISABLE_COPY_AND_ASSIGN. Default
9577 2018-05-20 Simon Marchi <simon.marchi@polymtl.ca>
9579 * common/traits.h (HAVE_IS_TRIVIALLY_COPYABLE): Rename the wrong
9581 (HAVE_IS_TRIVIALLY_CONSTRUCTIBLE): ... this.
9582 * objfiles.c (get_objfile_bfd_data): Allocate
9583 objfile_per_bfd_storage with obstack_new when allocating on
9586 2018-05-20 Simon Marchi <simon.marchi@ericsson.com>
9588 * ada-lang.c (cache_symbol): Use XOBNEW and/or XOBNEWVEC and/or
9590 * dwarf2-frame.c (dwarf2_build_frame_info): Likewise.
9591 * hppa-tdep.c (hppa_init_objfile_priv_data): Likewise.
9592 * mdebugread.c (mdebug_build_psymtabs): Likewise.
9593 (add_pending): Likewise.
9594 (parse_symbol): Likewise.
9595 (parse_partial_symbols): Likewise.
9596 (psymtab_to_symtab_1): Likewise.
9597 (new_psymtab): Likewise.
9598 (elfmdebug_build_psymtabs): Likewise.
9599 * minsyms.c (terminate_minimal_symbol_table): Likewise.
9600 * objfiles.c (get_objfile_bfd_data): Likewise.
9601 (objfile_register_static_link): Likewise.
9602 * psymtab.c (allocate_psymtab): Likewise.
9603 * stabsread.c (read_member_functions): Likewise.
9604 * xcoffread.c (xcoff_end_psymtab): Likewise.
9606 2018-05-20 Simon Marchi <simon.marchi@ericsson.com>
9608 * common/traits.h (HAVE_IS_TRIVIALLY_COPYABLE): Define if
9609 compiler supports std::is_trivially_constructible.
9610 * common/poison.h: Include obstack.h.
9611 (IsMallocable): Define to is_trivially_constructible if the
9612 compiler supports it, define to true_type otherwise.
9616 (XOBNEWVEC): Redefine.
9617 * gdb_obstack.h (obstack_zalloc): New.
9618 (OBSTACK_ZALLOC): Redefine.
9619 (obstack_calloc): New.
9620 (OBSTACK_CALLOC): Redefine.
9622 * gdbarch.sh: Include gdb_obstack in gdbarch.h.
9623 (gdbarch_obstack): New declaration in gdbarch.h, definition in
9625 (GDBARCH_OBSTACK_CALLOC, GDBARCH_OBSTACK_ZALLOC): Use
9626 obstack_calloc/obstack_zalloc.
9627 (gdbarch_obstack_zalloc): Remove.
9628 * target-descriptions.c (tdesc_data_init): Use obstack_new.
9630 2018-05-19 Philippe Waroquiers <philippe.waroquiers@skynet.be>
9632 * stack.c (backtrace_command_1): Remove useless variable int i.
9634 2018-05-19 Philippe Waroquiers <philippe.waroquiers@skynet.be>
9636 * stack.c (print_frame_info): Fix comment.
9638 2018-05-18 Tom Tromey <tom@tromey.com>
9640 * dwarf2read.c (struct dwz_file): Add constructor, initializers.
9641 <dwz_bfd>: Now a gdb_bfd_ref_ptr.
9642 (~dwarf2_per_objfile): Update
9643 (dwarf2_get_dwz_file): Use new.
9644 * dwarf2read.h (struct dwarf2_per_objfile) <dwz_file>: Now a
9647 2018-05-18 Tom Tromey <tom@tromey.com>
9649 * dwarf2read.h (struct dwarf2_per_objfile) <dwp_file>: Now a
9651 * dwarf2read.c (struct dwp_file): Add constructor and
9653 (open_and_init_dwp_file): Return a unique_ptr.
9654 (dwarf2_per_objfile, create_dwp_hash_table)
9655 (create_dwo_unit_in_dwp_v1, create_dwo_unit_in_dwp_v2)
9656 (lookup_dwo_unit_in_dwp): Update.
9657 (open_and_init_dwp_file, get_dwp_file): Update.
9659 2018-05-18 Tom Tromey <tom@tromey.com>
9661 * dwarf2read.c (dwarf2_per_objfile): Update.
9662 (struct mapped_index): Add initializers.
9663 (dwarf2_read_index): Use new.
9664 (dw2_symtab_iter_init): Update.
9665 * dwarf2read.h (struct dwarf2_per_objfile) <index_table>: Now a
9668 2018-05-18 Simon Marchi <simon.marchi@ericsson.com>
9670 * dwarf2read.c (mapped_index) <total_size>: Remove.
9672 2018-05-18 Simon Marchi <simon.marchi@ericsson.com>
9674 * unittests/format_pieces-selftests.c (test_format_specifier):
9677 2018-05-18 Tom Tromey <tom@tromey.com>
9679 * c-typeprint.c (maybe_print_hole): New function.
9680 (c_print_type_struct_field_offset): Update.
9681 (c_type_print_base_struct_union): Call maybe_print_hole.
9683 2018-05-17 Keith Seitz <keiths@redhat.com>
9685 * breakpoint.c (build_bpstat_chain): New function, moved from
9687 (bpstat_stop_status): Add optional parameter, `stop_chain'.
9688 If no stop chain is passed, call build_bpstat_chain to build it.
9689 * breakpoint.h (build_bpstat_chain): Declare.
9690 (bpstat_stop_status): Move documentation here from breakpoint.c.
9691 * infrun.c (handle_signal_stop): Before eliding inlined frames,
9692 build the stop chain and pass it to skip_inline_frames.
9693 Pass this stop chain to bpstat_stop_status.
9694 * inline-frame.c: Include breakpoint.h.
9695 (stopped_by_user_bp_inline_frame): New function.
9696 (skip_inline_frames): Add parameter `stop_chain'.
9697 Move documention to inline-frame.h.
9698 If non-NULL, use stopped_by_user_bp_inline_frame to determine
9699 whether the frame should be elided.
9700 * inline-frame.h (skip_inline_frames): Add parameter `stop_chain'.
9701 Add moved documentation and update for new parameter.
9703 2018-05-17 Simon Marchi <simon.marchi@ericsson.com>
9706 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
9707 unittests/format_pieces-selftests.c.
9708 * common/format.h (format_piece) <operator==>: New.
9709 (format_pieces) <operator[]>: Remove.
9710 * common/format.c (format_pieces::format_pieces): Handle \e.
9711 * unittests/format_pieces-selftests.c: New.
9713 2018-05-17 Tom Tromey <tom@tromey.com>
9716 * dwarf2read.c (load_cu, dw2_do_instantiate_symtab)
9717 (dw2_instantiate_symtab): Add skip_partial parameter.
9718 (dw2_find_last_source_symtab, dw2_map_expand_apply)
9719 (dw2_lookup_symbol, dw2_expand_symtabs_for_function)
9720 (dw2_expand_all_symtabs, dw2_expand_symtabs_with_fullname)
9721 (dw2_expand_symtabs_matching_one)
9722 (dw2_find_pc_sect_compunit_symtab)
9723 (dw2_debug_names_lookup_symbol)
9724 (dw2_debug_names_expand_symtabs_for_function): Update.
9725 (init_cutu_and_read_dies): Add skip_partial parameter.
9726 (process_psymtab_comp_unit, build_type_psymtabs_1)
9727 (process_skeletonless_type_unit, load_partial_comp_unit)
9728 (psymtab_to_symtab_1): Update.
9729 (load_full_comp_unit): Add skip_partial parameter.
9730 (process_imported_unit_die, dwarf2_read_addr_index)
9731 (follow_die_offset, dwarf2_fetch_die_loc_sect_off)
9732 (dwarf2_fetch_constant_bytes, dwarf2_fetch_die_type_sect_off)
9733 (read_signatured_type): Update.
9735 2018-05-17 Simon Marchi <simon.marchi@ericsson.com>
9737 * value.c (release_value): Remove unused variable.
9738 (record_latest_value): Likewise.
9739 (access_value_history): Likewise.
9740 (preserve_values): Likewise.
9742 2018-05-17 Tom Tromey <tom@tromey.com>
9744 * extension.h (struct ext_lang_type_printers) <py_type_printers>:
9747 2018-05-16 Maciej W. Rozycki <macro@mips.com>
9750 * linux-nat-trad.c (linux_nat_trad_target::fetch_register):
9751 Also handle registers whose width is not a multiple of
9753 (linux_nat_trad_target::store_register): Likewise.
9755 2018-05-16 Tom Tromey <tom@tromey.com>
9757 * gdbcore.h (core_bfd): Redefine.
9758 * corelow.c (core_target::close): Update.
9759 (core_target_open): Update.
9760 * progspace.h (struct program_space) <cbfd>: Now a
9763 2018-05-16 Tom Tromey <tom@tromey.com>
9766 * symfile-add-flags.h (enum symfile_add_flags)
9767 <SYMFILE_NOT_FILENAME>: New constant.
9768 * symfile.c (read_symbols): Use SYMFILE_NOT_FILENAME. Get
9769 objfile name from BFD.
9770 (symbol_file_add_with_addrs): Check SYMFILE_NOT_FILENAME.
9771 * minidebug.c (find_separate_debug_file_in_section): Put
9772 ".gnu_debugdata" into BFD's file name.
9774 2018-05-16 Simon Marchi <simon.marchi@ericsson.com>
9776 * regcache.c (regcache_read_ftype, regcache_write_ftype):
9779 2018-05-15 Tamar Christina <tamar.christina@arm.com>
9782 * aarch64-tdep.c (aarch64_analyze_prologue,
9783 aarch64_software_single_step, aarch64_displaced_step_copy_insn):
9784 Indicate not interested in errors.
9786 2018-05-15 Maciej W. Rozycki <macro@mips.com>
9788 * mips-linux-nat.c (mips_linux_nat_target::fetch_registers):
9789 Supply the MIPS_ZERO_REGNUM register.
9791 2018-05-15 Maciej W. Rozycki <macro@mips.com>
9793 * mips-tdep.c (mask_address_var): Make variable static.
9795 2018-05-14 Tom Tromey <tom@tromey.com>
9797 * dwarf2read.c (rust_union_quirks): Clear rust_unions.
9799 2018-05-11 Andrew Burgess <andrew.burgess@embecosm.com>
9801 * i387-tdep.c (i387_collect_xsave): Use FXSAVE_MXCSR_ADDR not
9802 FXSAVE_ADDR for the mxcsr register.
9804 2018-05-11 Max Filippov <jcmvbkbc@gmail.com>
9806 * configure.tgt (xtensa*-*-linux*): Drop gdb_target definition.
9808 2018-05-11 Pedro Alves <palves@redhat.com>
9810 * corelow.c (core_target) <core_target>: No longer inline.
9811 Initialize m_core_gdbarch, m_core_vec and build the section table
9813 <~core_target>: New.
9814 <core_gdbarch, get_core_register_section>: New methods.
9815 <m_core_section_table, m_core_vec, m_core_gdbarch>: New fields,
9816 factored out from ...
9817 <core_data, core_vec, core_gdbarch>: ... these deleted globals.
9819 (sniff_core_bfd): Add gdbarch parameter.
9820 (core_close): Delete, merged into ...
9821 (core_target::close): ... here. Delete self.
9822 (core_close_cleanup): Delete.
9823 (core_target_open): Allocate a core_target on the heap. Use a
9824 unique_ptr instead of a cleanup. Bits moved into the core_target
9825 ctor. Adjust to use core_target methods instead of globals.
9826 (get_core_register_section): Rename to ...
9827 (core_target::get_core_register_section): ... this and adjust.
9828 (struct get_core_registers_cb_data): New.
9829 (get_core_registers_cb): Use it. Use bool.
9830 (core_target::fetch_registers, core_target::files_info)
9831 (core_target::xfer_partial, core_target::read_description)
9832 (core_target::pid_to, core_target::thread_name): Adjust to
9833 reference class fields instead of globals.
9834 * target.h (struct target_ops_deleter, target_ops_up): New.
9836 2018-05-11 Pedro Alves <palves@redhat.com>
9838 * corefile.c (core_file_command): Move to corelow.c.
9839 * corelow.c (the_core_target): Delete.
9840 (core_file_command): Moved from corefile.c. Check exec_bfd
9841 instead of the_core_target. Use target_detach instead of calling
9842 into the_core_target directly.
9843 (maybe_say_no_core_file_now): New.
9844 (core_target::detach): Use it.
9845 (_initialize_corelow): Remove references to the_core_target.
9846 * gdbcore.h (the_core_target): Delete.
9848 2018-05-11 Tom Tromey <tromey@redhat.com>
9849 Pedro Alves <palves@redhat.com>
9851 * corefile.c (core_bfd): Remove.
9852 * gdbcore.h (core_bfd): Now a macro.
9853 * progspace.h (struct program_space) <cbfd>: New field.
9855 2018-05-11 Tom Tromey <tom@tromey.com>
9857 * mdebugread.c (parse_partial_symbols, psymtab_to_symtab_1): Use
9860 2018-05-10 Tom Tromey <tom@tromey.com>
9862 * configure: Rebuild.
9863 * warning.m4 (AM_GDB_WARNINGS): Use -Wimplicit-fallthrough=3.
9865 2018-05-10 Joel Brobecker <brobecker@adacore.com>
9868 * regformats/regdat.sh: Adjust script, following the addition
9869 of the new expedite_regs parameter to init_target_desc.
9871 2018-05-10 Omair Javaid <omair.javaid@linaro.org>
9874 * aarch64-linux-tdep.c (aarch64_linux_init_abi): Add call to
9875 set_gdbarch_significant_addr_bit.
9876 * aarch64-tdep.c (aarch64_gdbarch_init): Remove call to
9877 set_gdbarch_significant_addr_bit.
9878 * utils.c (address_significant): Update to sign extend addr.
9880 2018-05-09 Max Filippov <jcmvbkbc@gmail.com>
9882 * xtensa-linux-tdep.c (xtensa-tdep.h): New include.
9883 (xtensa_linux_init_abi): Limit tdep->num_regs by
9884 tdep->num_nopriv_regs.
9885 * xtensa-tdep.c (xtensa_derive_tdep): Calculate
9886 tdep->num_nopriv_regs and only copy it to tdep->num_regs if it's
9889 2018-05-08 Simon Marchi <simon.marchi@ericsson.com>
9891 * unittests/string_view-selftests.c: Define GNULIB_NAMESPACE.
9893 2018-05-08 Andrew Burgess <andrew.burgess@embecosm.com>
9895 * common/x86-xstate.h (I387_FCTRL_INIT_VAL): New constant.
9896 (I387_MXCSR_INIT_VAL): New constant.
9897 * amd64-tdep.c (amd64_supply_xsave): Only read state from xsave
9898 buffer if it was supplied by the inferior.
9899 * i387-tdep.c (i387_supply_fsave): Use I387_MXCSR_INIT_VAL.
9900 (i387_xsave_get_clear_bv): New function.
9901 (i387_supply_xsave): Only read x87 control registers from the
9902 xsave buffer if the feature is enabled, and the state will have
9903 been written, otherwise, provide a suitable default.
9904 (i387_collect_xsave): Pre-clear all registers in xsave buffer,
9905 including x87 control registers. Update control registers if they
9906 have changed from the default value, and mark features as enabled
9908 * i387-tdep.h (i387_xsave_get_clear_bv): Declare.
9910 2018-05-08 Ulrich Weigand <uweigand@de.ibm.com>
9912 * spu-tdep.c (info_spu_event_command): Fix output formatting.
9914 2018-05-07 Tom Tromey <tom@tromey.com>
9916 * configure: Rebuild.
9917 * warning.m4 (AM_GDB_WARNINGS): Add -Wduplicated-cond.
9919 2018-05-07 Tom Tromey <tom@tromey.com>
9922 * arm-tdep.c (arm_record_vfp_data_proc_insn): Properly mask off D
9923 bit. Use correct value for VDIV.
9925 2018-05-04 Tom Tromey <tom@tromey.com>
9927 * configure: Rebuild.
9928 * warning.m4 (AM_GDB_WARNINGS): Add -Wimplicit-fallthrough.
9930 2018-05-04 Tom Tromey <tom@tromey.com>
9932 * linux-record.c (record_linux_system_call) <case
9933 RECORD_SYS_RECVFROM>: Add "break".
9935 2018-05-04 Tom Tromey <tom@tromey.com>
9937 * mi/mi-main.c (mi_cmd_trace_frame_collected) <REGISTERS_FORMAT>:
9938 Add missing "break".
9939 * mi/mi-cmd-stack.c (mi_cmd_stack_list_locals) <NO_FRAME_FILTERS>:
9940 Add missing "break".
9942 2018-05-04 Tom Tromey <tom@tromey.com>
9944 * rs6000-tdep.c (ppc_process_record_op4)
9945 (ppc_process_record_op63): Add fall-through comment.
9947 2018-05-04 Tom Tromey <tom@tromey.com>
9949 * i386-tdep.c (i386_process_record): Add fall-through comment.
9951 2018-05-04 Tom Tromey <tom@tromey.com>
9953 * stabsread.c (define_symbol) <case 'p'>: Add fall-through
9956 2018-05-04 Tom Tromey <tom@tromey.com>
9958 * riscv-tdep.c (riscv_isa_xlen): Add fall-through comment.
9959 * utils.c (can_dump_core) <LIMIT_CUR>: Add fall-through comment.
9960 * eval.c (fetch_subexp_value) <MEMORY_ERROR>: Add fall-through
9962 * d-valprint.c (d_val_print) <TYPE_CODE_STRUCT>: Add fall-through
9964 * coffread.c (coff_symtab_read) <C_LABEL>: Add fall-through
9967 2018-05-04 Tom Tromey <tom@tromey.com>
9969 * dwarf2loc.c (unimplemented): Add ATTRIBUTE_NORETURN.
9971 2018-05-04 Tom Tromey <tom@tromey.com>
9973 * s390-tdep.c (s390_process_record): Fix fall-through comments.
9974 * xcoffread.c (scan_xcoff_symtab): Move comment later.
9975 * symfile.c (section_is_mapped): Fix fall-through comment.
9976 * stabsread.c (define_symbol, read_member_functions): Fix
9977 fall-through comment.
9978 * s390-linux-tdep.c (s390_process_record): Fix fall-through
9980 * remote.c (remote_wait_as): Fix fall-through comment.
9981 * p-exp.y (yylex): Fix fall-through comment.
9982 * nat/x86-dregs.c (x86_length_and_rw_bits): Fix fall-through
9984 * msp430-tdep.c (msp430_gdbarch_init): Fix fall-through comment.
9985 * mdebugread.c (parse_partial_symbols): Fix fall-through comment.
9986 * jv-exp.y (yylex): Fix fall-through comment.
9987 * go-exp.y (lex_one_token): Fix fall-through comment.
9988 * gdbtypes.c (get_discrete_bounds, rank_one_type): Fix
9989 fall-through comment.
9990 * f-exp.y (yylex): Fix fall-through comment.
9991 * dwarf2read.c (process_die): Fix fall-through comments.
9992 * dbxread.c (process_one_symbol): Fix fall-through comment.
9993 * d-exp.y (lex_one_token): Fix fall-through comment.
9994 * cp-name-parser.y (yylex): Fix fall-through comment.
9995 * coffread.c (coff_symtab_read): Fix fall-through comment.
9996 * c-exp.y (lex_one_token): Fix fall-through comment.
9997 * arm-tdep.c (arm_decode_miscellaneous): Fix fall-through
9999 * arch/arm.c (arm_instruction_changes_pc): Fix fall-through
10002 2018-05-04 Tom Tromey <tom@tromey.com>
10005 * NEWS: Mention gdb.execute change.
10006 * gdbcmd.h (execute_control_command): Don't declare.
10007 * python/python.c (execute_gdb_command): Use read_command_lines_1,
10008 execute_control_commands, execute_control_commands_to_string.
10009 * cli/cli-script.h (execute_control_commands)
10010 (execute_control_commands_to_string): Declare.
10011 (execute_control_command): Add from_tty parameter.
10012 * cli/cli-script.c (execute_control_commands)
10013 (execute_control_commands_to_string): New functions.
10014 (execute_user_command): Use execute_control_commands.
10015 (execute_control_command_1): Add "from_tty" parameter. Update.
10016 (execute_control_command): Likewise.
10018 2018-05-04 Tom Tromey <tom@tromey.com>
10021 * NEWS: Mention that breakpoint commands are writable.
10022 * python/py-breakpoint.c (bppy_set_commands): New function.
10023 (breakpoint_object_getset) <"commands">: Use it.
10025 2018-05-04 Tom Tromey <tom@tromey.com>
10027 * tracepoint.c (actions_command): Update.
10028 * mi/mi-cmd-break.c (mi_command_line_array)
10029 (mi_command_line_array_cnt, mi_command_line_array_ptr)
10030 (mi_read_next_line): Remove.
10031 (mi_cmd_break_commands): Update.
10032 * cli/cli-script.h (read_command_lines, read_command_lines_1): Use
10034 * cli/cli-script.c (get_command_line): Update.
10035 (process_next_line): Use function_view. Constify.
10036 (recurse_read_control_structure, read_command_lines)
10037 (read_command_lines_1): Change argument types to function_view.
10038 (do_define_command, document_command): Update.
10039 * breakpoint.h (check_tracepoint_command): Don't declare.
10040 * breakpoint.c (check_tracepoint_command): Remove.
10041 (commands_command_1, create_tracepoint_from_upload): Update.
10043 2018-05-04 Tom Tromey <tom@tromey.com>
10046 * cli/cli-script.h (enum command_control_type) <define_control>:
10048 * cli/cli-script.c (multi_line_command_p): Handle define_control.
10049 (build_command_line, execute_control_command_1)
10050 (process_next_line): Likewise.
10051 (do_define_command): New function, extracted from define_command.
10052 (define_command): Use it.
10054 2018-05-04 Tom Tromey <tom@tromey.com>
10056 * tracepoint.c (actions_command): Update.
10057 * cli/cli-script.h (read_command_lines): Update.
10058 * cli/cli-script.c (read_command_lines): Constify prompt_arg.
10059 (MAX_TMPBUF): Remove define.
10060 (define_command): Use string_printf.
10061 (document_command): Likewise.
10062 * breakpoint.c (commands_command_1): Update.
10064 2018-05-04 Tom Tromey <tom@tromey.com>
10066 * top.c (execute_command): Update.
10067 * cli/cli-script.h (print_command_lines): Now varargs.
10068 * cli/cli-script.c (print_command_lines): Now varargs.
10069 (execute_control_command_1) <case while_control, case if_control>:
10072 2018-05-04 Tom Tromey <tom@tromey.com>
10074 * tracepoint.c (all_tracepoint_actions): Rename from
10075 all_tracepoint_actions_and_cleanup. Change return type.
10076 (actions_command, encode_actions_1, encode_actions)
10077 (trace_dump_actions, tdump_command): Update.
10078 * remote.c (remote_download_command_source): Update.
10079 * python/python.c (gdbpy_eval_from_control_command)
10080 (python_command, python_interactive_command): Update.
10081 * mi/mi-cmd-break.c (mi_cmd_break_commands): Update.
10082 * guile/guile.c (guile_command)
10083 (gdbscm_eval_from_control_command, guile_command): Update.
10084 * compile/compile.c (compile_code_command)
10085 (compile_print_command, compile_to_object): Update.
10086 * cli/cli-script.h (struct command_lines_deleter): New.
10087 (counted_command_line): New typedef.
10088 (struct command_line): Add constructor, destructor.
10089 <body_list>: Remove.
10090 <body_list_0, body_list_1>: New members.
10091 (command_line_up): Remove typedef.
10092 (read_command_lines, read_command_lines_1, get_command_line):
10094 (copy_command_lines): Don't declare.
10095 * cli/cli-script.c (build_command_line): Use "new".
10096 (get_command_line): Return counted_command_line.
10097 (print_command_lines, execute_user_command)
10098 (execute_control_command_1, while_command, if_command): Update.
10099 (realloc_body_list): Remove.
10100 (process_next_line, recurse_read_control_structure): Update.
10101 (read_command_lines, read_command_lines_1): Return counted_command_line.
10102 (free_command_lines): Use "delete".
10103 (copy_command_lines): Remove.
10104 (define_command, document_command, show_user_1): Update.
10105 * cli/cli-decode.h (struct cmd_list_element) <user_commands>: Now
10106 a counted_command_line.
10107 * breakpoint.h (counted_command_line): Remove typedef.
10108 (breakpoint_set_commands): Update.
10109 * breakpoint.c (check_no_tracepoint_commands)
10110 (validate_commands_for_breakpoint): Update.
10111 (breakpoint_set_commands): Change commands to be a
10112 counted_command_line.
10113 (commands_command_1, update_dprintf_command_list)
10114 (create_tracepoint_from_upload): Update.
10116 2018-05-04 Tom Tromey <tom@tromey.com>
10118 * cli/cli-decode.h (cmd_list_element): New constructor.
10119 (~cmd_list_element): New destructor.
10120 (struct cmd_list_element): Add initializers.
10121 * cli/cli-decode.c (do_add_cmd): Use "new".
10122 (delete_cmd): Use "delete".
10124 2018-05-04 Jan Kratochvil <jan.kratochvil@redhat.com>
10125 Pedro Alves <palves@redhat.com>
10127 PR breakpoints/19806 and support for PR external/20207.
10128 * NEWS: Mention Aarch64 watchpoint improvements.
10129 * aarch64-linux-nat.c (aarch64_linux_stopped_data_address): Fix missed
10130 watchpoints and PR external/20207 watchpoints.
10131 * nat/aarch64-linux-hw-point.c
10132 (kernel_supports_any_contiguous_range): New.
10133 (aarch64_watchpoint_offset): New.
10134 (aarch64_watchpoint_length): Support PR external/20207 watchpoints.
10135 (aarch64_point_encode_ctrl_reg): New parameter offset, new asserts.
10136 (aarch64_point_is_aligned): Support PR external/20207 watchpoints.
10137 (aarch64_align_watchpoint): New parameters aligned_offset_p and
10138 next_addr_orig_p. Support PR external/20207 watchpoints.
10139 (aarch64_downgrade_regs): New.
10140 (aarch64_dr_state_insert_one_point): New parameters offset and
10142 (aarch64_dr_state_remove_one_point): Likewise.
10143 (aarch64_handle_breakpoint): Update caller.
10144 (aarch64_handle_aligned_watchpoint): Likewise.
10145 (aarch64_handle_unaligned_watchpoint): Support addr_orig and
10147 (aarch64_linux_set_debug_regs): Remove const from state. Call
10148 aarch64_downgrade_regs.
10149 (aarch64_show_debug_reg_state): Print also dr_addr_orig_wp.
10150 * nat/aarch64-linux-hw-point.h (DR_CONTROL_LENGTH): Rename to ...
10151 (DR_CONTROL_MASK): ... this.
10152 (struct aarch64_debug_reg_state): New field dr_addr_orig_wp.
10153 (unsigned int aarch64_watchpoint_offset): New prototype.
10154 (aarch64_linux_set_debug_regs): Remove const from state.
10155 * utils.c (align_up, align_down): Move to ...
10156 * common/common-utils.c (align_up, align_down): ... here.
10157 * utils.h (align_up, align_down): Move to ...
10158 * common/common-utils.h (align_up, align_down): ... here.
10160 2018-05-04 Joel Brobecker <brobecker@adacore.com>
10162 * sparc-tdep.c (sparc_structure_return_p): Re-implement to
10163 match the ABI as summarized in GCC's gcc/config/sparc/sparc.c.
10164 (sparc_arg_by_memory_p): Renamed from sparc_arg_on_registers_p.
10165 Re-implement to match the ABI as summarized in GCC's
10166 gcc/config/sparc/sparc.c. All callers updated.
10167 (sparc32_store_arguments): Remove assertion.
10169 2018-05-04 Tom Tromey <tom@tromey.com>
10171 * printcmd.c: Don't include tui.h.
10172 (decode_format): Use skip_spaces.
10174 2018-05-04 Tom Tromey <tom@tromey.com>
10177 * printcmd.c (last_count): New global.
10178 (x_command): Use saved count when repeating.
10180 2018-05-04 Tom Tromey <tom@tromey.com>
10182 * nto-procfs.c (do_closedir_cleanup): Remove.
10183 (procfs_pidlist): Use gdb_dir_up.
10184 * procfs.c (do_closedir_cleanup): Remove.
10185 (proc_update_threads): Use gdb_dir_up.
10186 * common/filestuff.h (struct gdb_dir_deleter): New.
10187 (gdb_dir_up): New typedef.
10189 2018-05-04 Tom Tromey <tom@tromey.com>
10191 * ada-lang.c (print_mention_exception): Use std::string.
10193 2018-05-04 Tom Tromey <tom@tromey.com>
10195 * ada-lang.c (create_excep_cond_exprs): Update.
10196 (ada_exception_catchpoint_cond_string): Use std::string.
10198 2018-05-04 Tom Tromey <tom@tromey.com>
10200 * ada-lang.c (xget_renaming_scope): Return std::string.
10201 (old_renaming_is_invisible): Update.
10203 2018-05-04 Tom Tromey <tom@tromey.com>
10205 * bfd-target.c (target_bfd::m_bfd): Now a gdb_bfd_ref_ptr.
10206 (target_bfd::target_bfd, target_bfd::~target_bfd): Update.
10208 2018-05-04 Ulrich Weigand <uweigand@de.ibm.com>
10210 * spu-linux-nat.c (spu_linux_nat_target::wait): Fix syntax error.
10212 2018-05-04 Tom Tromey <tom@tromey.com>
10214 * remote.c (remote_query_supported_append): Change type.
10215 (remote_check_symbols): Update.
10217 2018-05-04 Paul Pluzhnikov <ppluzhnikov@google.com>
10220 * configure.ac: Prepend libpython.
10221 * python/python-config.py: Likewise.
10222 * configure: Regenerate.
10224 2018-05-03 Simon Marchi <simon.marchi@ericsson.com>
10226 * Makefile.in (%.c: %.l): Use -t instead of --stdout.
10228 2018-05-03 Pedro Alves <palves@redhat.com>
10231 (s390_linux_nat_target::have_continuable_watchpoint): Mark with
10232 override. Write 'true' instead of '1'.
10233 (s390_linux_nat_target::watchpoint_addr_within_range): Remove
10236 2018-05-02 Pedro Alves <palves@redhat.com>
10238 * aarch64-fbsd-nat.c (_initialize_aarch64_fbsd_nat): Use
10239 add_inf_child_target.
10240 * aarch64-linux-nat.c (_initialize_aarch64_linux_nat): Use
10241 add_inf_child_target.
10242 * aix-thread.c (aix_thread_target_info): New.
10243 (aix_thread_target) <shortname, longname, doc>: Delete.
10245 * alpha-bsd-nat.c (_initialize_alphabsd_nat): Use
10246 add_inf_child_target.
10247 * alpha-linux-nat.c (_initialize_alpha_linux_nat): Use
10248 add_inf_child_target.
10249 * amd64-fbsd-nat.c (_initialize_amd64fbsd_nat): Use
10250 add_inf_child_target.
10251 * amd64-linux-nat.c (_initialize_amd64_linux_nat): Use
10252 add_inf_child_target.
10253 * amd64-nbsd-nat.c (_initialize_amd64nbsd_nat): Use
10254 add_inf_child_target.
10255 * amd64-obsd-nat.c (_initialize_amd64obsd_nat): Use
10256 add_inf_child_target.
10257 * arm-fbsd-nat.c (_initialize_arm_fbsd_nat): Use
10258 add_inf_child_target.
10259 * arm-linux-nat.c (_initialize_arm_linux_nat): Use
10260 add_inf_child_target.
10261 * arm-nbsd-nat.c (_initialize_arm_netbsd_nat): Use
10262 add_inf_child_target.
10263 * bfd-target.c (target_bfd_target_info): New.
10264 (target_bfd) <shortname, longname, doc>: Delete.
10266 * bsd-kvm.c (bsd_kvm_target_info): New.
10267 (bsd_kvm_target) <shortname, longname, doc>: Delete.
10269 (bsd_kvm_target::open): Rename to ...
10270 (bsd_kvm_target_open): ... this. Adjust.
10271 * bsd-uthread.c (bsd_uthread_target_info): New.
10272 (bsd_uthread_target) <shortname, longname, doc>: Delete.
10274 * corefile.c (core_file_command): Adjust.
10275 * corelow.c (core_target_info): New.
10276 (core_target) <shortname, longname, doc>: Delete.
10278 (core_target::open): Rename to ...
10279 (core_target_open): ... this. Adjust.
10280 * ctf.c (ctf_target_info): New.
10281 (ctf_target) <shortname, longname, doc>: Delete.
10283 (ctf_target::open): Rename to ...
10284 (ctf_target_open): ... this.
10285 (_initialize_ctf): Adjust.
10286 * exec.c (exec_target_info): New.
10287 (exec_target) <shortname, longname, doc>: Delete.
10289 (exec_target::open): Rename to ...
10290 (exec_target_open): ... this.
10291 * gdbcore.h (core_target_open): Declare.
10292 * go32-nat.c (_initialize_go32_nat): Use add_inf_child_target.
10293 * hppa-linux-nat.c (_initialize_hppa_linux_nat): Use
10294 add_inf_child_target.
10295 * hppa-nbsd-nat.c (_initialize_hppanbsd_nat): Use
10296 add_inf_child_target.
10297 * hppa-obsd-nat.c (_initialize_hppaobsd_nat): Use
10298 add_inf_child_target.
10299 * i386-darwin-nat.c (_initialize_i386_darwin_nat): Use
10300 add_inf_child_target.
10301 * i386-fbsd-nat.c (_initialize_i386fbsd_nat): Use
10302 add_inf_child_target.
10303 * i386-gnu-nat.c (_initialize_i386gnu_nat): Use
10304 add_inf_child_target.
10305 * i386-linux-nat.c (_initialize_i386_linux_nat): Use
10306 add_inf_child_target.
10307 * i386-nbsd-nat.c (_initialize_i386nbsd_nat): Use
10308 add_inf_child_target.
10309 * i386-obsd-nat.c (_initialize_i386obsd_nat): Use
10310 add_inf_child_target.
10311 * ia64-linux-nat.c (_initialize_ia64_linux_nat): Use
10312 add_inf_child_target.
10313 * inf-child.c (inf_child_target_info): New.
10314 (inf_child_target::info): New.
10315 (inf_child_open_target): Remove 'target' parameter. Use
10316 get_native_target instead.
10317 (inf_child_target::open): Delete.
10318 (add_inf_child_target): New.
10319 * inf-child.h (inf_child_target) <shortname, longname, doc, open>:
10322 (add_inf_child_target): Declare.
10323 (inf_child_open_target): Declare.
10324 * linux-thread-db.c (thread_db_target_info): New.
10325 (thread_db_target) <shortname, longname, doc>: Delete.
10327 * m32r-linux-nat.c (_initialize_m32r_linux_nat): Use
10328 add_inf_child_target.
10329 * m68k-bsd-nat.c (_initialize_m68kbsd_nat): Use
10330 add_inf_child_target.
10331 * m68k-linux-nat.c (_initialize_m68k_linux_nat): Use
10332 add_inf_child_target.
10333 * m88k-bsd-nat.c (_initialize_m88kbsd_nat): Use
10334 add_inf_child_target.
10335 * make-target-delegates (print_class): Adjust.
10336 * mips-fbsd-nat.c (_initialize_mips_fbsd_nat): Use
10337 add_inf_child_target.
10338 * mips-linux-nat.c (_initialize_mips_linux_nat): Use
10339 add_inf_child_target.
10340 * mips-nbsd-nat.c (_initialize_mipsnbsd_nat): Use
10341 add_inf_child_target.
10342 * mips64-obsd-nat.c (_initialize_mips64obsd_nat): Use
10343 add_inf_child_target.
10344 * nto-procfs.c (nto_native_target_info): New.
10345 (nto_procfs_target_native) <shortname, longname, doc>:
10348 (nto_procfs_target_info): New.
10349 (nto_procfs_target_procfs) <shortname, longname, doc>:
10352 (init_procfs_targets): Adjust.
10353 * ppc-fbsd-nat.c (_initialize_ppcfbsd_nat): Use
10354 add_inf_child_target.
10355 * ppc-linux-nat.c (_initialize_ppc_linux_nat): Use
10356 add_inf_child_target.
10357 * ppc-nbsd-nat.c (_initialize_ppcnbsd_nat): Use
10358 add_inf_child_target.
10359 * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Use
10360 add_inf_child_target.
10361 * ravenscar-thread.c (ravenscar_target_info): New.
10362 (ravenscar_thread_target) <shortname, longname, doc>:
10365 * record-btrace.c (record_btrace_target_info):
10366 (record_btrace_target) <shortname, longname, doc>: Delete.
10368 (record_btrace_target::open): Rename to ...
10369 (record_btrace_target_open): ... this. Adjust.
10370 * record-full.c (record_longname, record_doc): New.
10371 (record_full_base_target) <shortname, longname, doc>: Delete.
10373 (record_full_target_info): New.
10374 (record_full_target): <shortname>: Delete.
10376 (record_full_core_open_1, record_full_open_1): Update comments.
10377 (record_full_base_target::open): Rename to ...
10378 (record_full_open): ... this.
10379 (cmd_record_full_restore): Update.
10380 (_initialize_record_full): Update.
10381 * remote-sim.c (remote_sim_target_info): New.
10382 (gdbsim_target) <shortname, longname, doc>: Delete.
10384 (gdbsim_target::open): Rename to ...
10385 (gdbsim_target_open): ... this.
10386 (_initialize_remote_sim): Adjust.
10387 * remote.c (remote_doc): New.
10388 (remote_target_info): New.
10389 (remote_target) <shortname, longname, doc>: Delete.
10391 (extended_remote_target_info): New.
10392 (extended_remote_target) <shortname, longname, doc>: Delete.
10394 (remote_target::open_1): Make static. Adjust.
10395 * rs6000-nat.c (_initialize_rs6000_nat): Use add_inf_child_target.
10396 * s390-linux-nat.c (_initialize_s390_nat): Use
10397 add_inf_child_target.
10398 * sh-nbsd-nat.c (_initialize_shnbsd_nat): Use
10399 add_inf_child_target.
10400 * sol-thread.c (thread_db_target_info): New.
10401 (sol_thread_target) <shortname, longname, doc>: Delete.
10403 * sparc-linux-nat.c (_initialize_sparc_linux_nat): Use
10404 add_inf_child_target.
10405 * sparc-nbsd-nat.c (_initialize_sparcnbsd_nat): Use
10406 add_inf_child_target.
10407 * sparc64-fbsd-nat.c (_initialize_sparc64fbsd_nat): Use
10408 add_inf_child_target.
10409 * sparc64-linux-nat.c (_initialize_sparc64_linux_nat): Use
10410 add_inf_child_target.
10411 * sparc64-nbsd-nat.c (_initialize_sparc64nbsd_nat): Use
10412 add_inf_child_target.
10413 * sparc64-obsd-nat.c (_initialize_sparc64obsd_nat): Use
10414 add_inf_child_target.
10415 * spu-linux-nat.c (_initialize_spu_nat): Use
10416 add_inf_child_target.
10417 * spu-multiarch.c (spu_multiarch_target_info): New.
10418 (spu_multiarch_target) <shortname, longname, doc>: Delete.
10420 * target-delegates.c: Regenerate.
10421 * target.c: Include <unordered_map>.
10422 (target_ops_p): Delete.
10423 (DEF_VEC_P(target_ops_p)): Delete.
10424 (target_factories): New.
10425 (test_target_info): New.
10426 (test_target_ops::info): New.
10427 (open_target): Adjust to use target_factories.
10428 (add_target_with_completer): Rename to ...
10429 (add_target): ... this. Change prototype. Register target_info
10430 and open callback in target_factories. Register target_info in
10431 command context instead of target_ops.
10432 (add_target): Delete old implementation.
10433 (add_deprecated_target_alias): Change prototype. Adjust.
10434 (the_native_target): New.
10435 (set_native_target, get_native_target): New.
10436 (find_default_run_target): Use the_native_target.
10437 (find_attach_target, find_run_target): Simplify.
10438 (target_ops::open): Delete.
10439 (dummy_target_info): New.
10440 (dummy_target::shortname, dummy_target::longname)
10441 (dummy_target::doc): Delete.
10442 (dummy_target::info): New.
10443 (debug_target::shortname, debug_target::longname)
10444 (debug_target::doc): Delete.
10445 (debug_target::info): New.
10446 * target.h (struct target_info): New.
10447 (target_ops::~target_ops): Add comment.
10448 (target_ops::info): New.
10449 (target_ops::shortname, target_ops::longname, target_ops::doc): No
10450 longer virtual. Implement in terms of target_info.
10451 (set_native_target, get_native_target): Declare.
10452 (target_open_ftype): New.
10453 (add_target, add_target_with_completer)
10454 (add_deprecated_target_alias): Change prototype.
10455 (test_target) <shortname, longname, doc>: Delete.
10457 * tilegx-linux-nat.c (_initialize_tile_linux_nat): Use
10458 add_inf_child_target.
10459 * tracefile-tfile.c (tfile_target_info): New.
10460 (tfile_target) <shortname, longname, doc>: Delete.
10462 (tfile_target::open): Rename to ...
10463 (tfile_target_open): ... this.
10464 (_initialize_tracefile_tfile): Adjust.
10465 * vax-bsd-nat.c (_initialize_vaxbsd_nat): Use
10466 add_inf_child_target.
10467 * windows-nat.c (_initialize_windows_nat): Use
10468 add_inf_child_target.
10469 * xtensa-linux-nat.c (_initialize_xtensa_linux_nat): Use
10470 add_inf_child_target.
10472 2018-05-02 Pedro Alves <palves@redhat.com>
10474 * linux-nat.h (linux_nat_target) <low_new_thread,
10475 low_delete_thread, low_new_fork, low_forget_process,
10476 low_prepare_to_resume, low_siginfo_fixup, low_status_is_event>:
10477 New virtual methods.
10478 (linux_nat_set_new_thread, linux_nat_set_delete_thread)
10479 (linux_nat_new_fork_ftype, linux_nat_set_new_fork)
10480 (linux_nat_forget_process_ftype, linux_nat_set_forget_process)
10481 (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
10482 (linux_nat_set_prepare_to_resume, linux_nat_set_status_is_event):
10484 * linux-fork.c (delete_fork): Adjust to call low method.
10485 * linux-nat.c (linux_nat_new_thread, linux_nat_delete_thread)
10486 (linux_nat_new_fork, linux_nat_forget_process_hook)
10487 (linux_nat_prepare_to_resume, linux_nat_siginfo_fixup)
10488 (linux_nat_status_is_event):
10489 (linux_nat_target::follow_fork, lwp_free, add_lwp, detach_one_lwp)
10490 (linux_resume_one_lwp_throw, linux_handle_extended_wait): Adjust
10491 to call low method.
10492 (sigtrap_is_event): Rename to ...
10493 (linux_nat_target::low_status_is_event): ... this.
10494 (linux_nat_set_status_is_event): Delete.
10495 (save_stop_reason, linux_nat_wait_1)
10496 (linux_nat_target::mourn_inferior, siginfo_fixup): Adjust to call
10498 (linux_nat_set_new_thread, linux_nat_set_delete_thread)
10499 (linux_nat_set_new_fork, linux_nat_set_forget_process)
10500 (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
10501 (linux_nat_set_prepare_to_resume): Delete.
10502 * aarch64-linux-nat.c: All linux_nat_set_* callbacks converted to
10503 low virtual methods.
10504 * amd64-linux-nat.c: Likewise.
10505 * arm-linux-nat.c: Likewise.
10506 * i386-linux-nat.c: Likewise.
10507 * ia64-linux-nat.c: Likewise.
10508 * mips-linux-nat.c: Likewise.
10509 * ppc-linux-nat.c: Likewise.
10510 * s390-linux-nat.c: Likewise.
10511 * sparc64-linux-nat.c: Likewise.
10512 * x86-linux-nat.c: Likewise.
10513 * x86-linux-nat.h: Include "nat/x86-linux.h".
10514 (x86_linux_nat_target) <low_new_fork, low_forget_process,
10515 low_prepare_to_resume, low_new_thread, low_delete_thread>:
10518 2018-05-02 Pedro Alves <palves@redhat.com>
10520 * target.h (target_ops)
10521 <stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
10522 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint,
10523 stopped_by_watchpoint, have_continuable_watchpoint,
10524 stopped_data_address, watchpoint_addr_within_range,
10525 can_accel_watchpoint_condition, can_run, thread_alive,
10526 has_all_memory, has_memory, has_stack, has_registers,
10527 has_execution, can_async_p, is_async_p, supports_non_stop,
10528 always_non_stop_p, can_execute_reverse, supports_multi_process,
10529 supports_enable_disable_tracepoint,
10530 supports_disable_randomization, supports_string_tracing,
10531 supports_evaluation_of_breakpoint_conditions,
10532 can_run_breakpoint_commands, filesystem_is_local,
10533 can_download_tracepoint, get_trace_state_variable_value,
10534 set_trace_notes, get_tib_address, use_agent, can_use_agent,
10535 record_is_replaying, record_will_replay,
10536 augmented_libraries_svr4_read>: Adjust to return bool.
10537 * aarch64-linux-nat.c: All implementations adjusted.
10538 * aix-thread.c: All implementations adjusted.
10539 * arm-linux-nat.c: All implementations adjusted.
10540 * breakpoint.c: All implementations adjusted.
10541 * bsd-kvm.c: All implementations adjusted.
10542 * bsd-uthread.c: All implementations adjusted.
10543 * corelow.c: All implementations adjusted.
10544 * ctf.c: All implementations adjusted.
10545 * darwin-nat.c: All implementations adjusted.
10546 * darwin-nat.h: All implementations adjusted.
10547 * exec.c: All implementations adjusted.
10548 * fbsd-nat.c: All implementations adjusted.
10549 * fbsd-nat.h: All implementations adjusted.
10550 * gnu-nat.c: All implementations adjusted.
10551 * gnu-nat.h: All implementations adjusted.
10552 * go32-nat.c: All implementations adjusted.
10553 * ia64-linux-nat.c: All implementations adjusted.
10554 * inf-child.c: All implementations adjusted.
10555 * inf-child.h: All implementations adjusted.
10556 * inf-ptrace.c: All implementations adjusted.
10557 * inf-ptrace.h: All implementations adjusted.
10558 * linux-nat.c: All implementations adjusted.
10559 * linux-nat.h: All implementations adjusted.
10560 * mips-linux-nat.c: All implementations adjusted.
10561 * nto-procfs.c: All implementations adjusted.
10562 * ppc-linux-nat.c: All implementations adjusted.
10563 * procfs.c: All implementations adjusted.
10564 * ravenscar-thread.c: All implementations adjusted.
10565 * record-btrace.c: All implementations adjusted.
10566 * record-full.c: All implementations adjusted.
10567 * remote-sim.c: All implementations adjusted.
10568 * remote.c: All implementations adjusted.
10569 * s390-linux-nat.c: All implementations adjusted.
10570 * sol-thread.c: All implementations adjusted.
10571 * spu-multiarch.c: All implementations adjusted.
10572 * target-delegates.c: All implementations adjusted.
10573 * target.c: All implementations adjusted.
10574 * target.h: All implementations adjusted.
10575 * tracefile-tfile.c: All implementations adjusted.
10576 * tracefile.c: All implementations adjusted.
10577 * tracefile.h: All implementations adjusted.
10578 * windows-nat.c: All implementations adjusted.
10579 * x86-linux-nat.h: All implementations adjusted.
10580 * x86-nat.h: All implementations adjusted.
10582 2018-05-02 Pedro Alves <palves@redhat.com>
10584 * make-target-delegates (scan_target_h): Don't trim lines here.
10585 Replace sequences of tabs and/or whitespace with a single
10587 (top level, parsing methods): Trim each line before processing it
10590 2018-05-02 Pedro Alves <palves@redhat.com>
10591 John Baldwin <jhb@freebsd.org>
10593 * target.h (enum strata) <debug_stratum>: New.
10594 (struct target_ops) <all delegation methods>: Replace by C++
10595 virtual methods, and drop "to_" prefix. All references updated
10597 <to_shortname, to_longname, to_doc, to_data,
10598 to_have_steppable_watchpoint, to_have_continuable_watchpoint,
10599 to_has_thread_control, to_attach_no_wait>: Delete, replaced by
10600 virtual methods. All references updated throughout.
10601 <can_attach, supports_terminal_ours, can_create_inferior,
10602 get_thread_control_capabilities, attach_no_wait>: New
10604 <insert_breakpoint, remove_breakpoint>: Now
10605 TARGET_DEFAULT_NORETURN methods.
10606 <info_proc>: Now returns bool.
10607 <to_magic>: Delete.
10608 (OPS_MAGIC): Delete.
10609 (current_target): Delete. All references replaced by references
10611 (target_stack): ... this. New.
10612 (target_shortname, target_longname): Adjust.
10613 (target_can_run): Now a function declaration.
10614 (default_child_has_all_memory, default_child_has_memory)
10615 (default_child_has_stack, default_child_has_registers)
10616 (default_child_has_execution): Remove target_ops parameter.
10617 (complete_target_initialization): Delete.
10618 (memory_breakpoint_target): New template class.
10619 (test_target_ops): Refactor as a C++ class with virtual methods.
10620 * make-target-delegates (NAME_PART): Tighten.
10621 (POINTER_PART, CP_SYMBOL): New.
10622 (SIMPLE_RETURN_PART): Reimplement.
10623 (VEC_RETURN_PART): Expect less.
10624 (RETURN_PART, VIRTUAL_PART): New.
10625 (METHOD): Adjust to C++ virtual methods.
10626 (scan_target_h): Remove reference to C99.
10627 (dname): Output "target_ops::" prefix.
10628 (write_function_header): Adjust to output a C++ class method.
10629 (write_declaration): New.
10630 (write_delegator): Adjust to output a C++ class method.
10631 (tdname): Output "dummy_target::" prefix.
10632 (write_tdefault, write_debugmethod): Adjust to output a C++ class
10634 (tdefault_names, debug_names): Delete.
10635 (return_types, tdefaults, styles, argtypes_array): New.
10636 (top level): All methods are delegators.
10637 (print_class): New.
10638 (top level): Print dummy_target and debug_target classes.
10639 * target-delegates.c: Regenerate.
10640 * target-debug.h (target_debug_print_enum_info_proc_what)
10641 (target_debug_print_thread_control_capabilities)
10642 (target_debug_print_thread_info_p): New.
10643 * target.c (dummy_target): Delete.
10644 (the_dummy_target, the_debug_target): New.
10645 (target_stack): Now extern.
10646 (set_targetdebug): Push/unpush debug target.
10647 (default_child_has_all_memory, default_child_has_memory)
10648 (default_child_has_stack, default_child_has_registers)
10649 (default_child_has_execution): Remove target_ops parameter.
10650 (complete_target_initialization): Delete.
10651 (add_target_with_completer): No longer call
10652 complete_target_initialization.
10653 (target_supports_terminal_ours): Use regular delegation.
10654 (update_current_target): Delete.
10655 (push_target): No longer check magic number. Don't call
10656 update_current_target.
10657 (unpush_target): Don't call update_current_target.
10658 (target_is_pushed): No longer check magic number.
10659 (target_require_runnable): Skip for all stratums over
10661 (target_ops::info_proc): New.
10662 (target_info_proc): Use find_target_at and
10663 find_default_run_target.
10664 (target_supports_disable_randomization): Use regular delegation.
10665 (target_get_osdata): Use find_target_at.
10666 (target_ops::open, target_ops::close, target_ops::can_attach)
10667 (target_ops::attach, target_ops::can_create_inferior)
10668 (target_ops::create_inferior, target_ops::can_run)
10669 (target_can_run): New.
10670 (default_fileio_target): Use regular delegation.
10671 (target_ops::fileio_open, target_ops::fileio_pwrite)
10672 (target_ops::fileio_pread, target_ops::fileio_fstat)
10673 (target_ops::fileio_close, target_ops::fileio_unlink)
10674 (target_ops::fileio_readlink): New.
10675 (target_fileio_open_1, target_fileio_unlink)
10676 (target_fileio_readlink): Always call the target method. Handle
10678 (return_zero, return_zero_has_execution): Delete.
10679 (init_dummy_target): Delete.
10680 (dummy_target::dummy_target, dummy_target::shortname)
10681 (dummy_target::longname, dummy_target::doc)
10682 (debug_target::debug_target, debug_target::shortname)
10683 (debug_target::longname, debug_target::doc): New.
10684 (target_supports_delete_record): Use regular delegation.
10685 (setup_target_debug): Delete.
10686 (maintenance_print_target_stack): Skip debug_stratum.
10687 (initialize_targets): Instantiate the_dummy_target and
10689 * auxv.c (target_auxv_parse): Remove 'ops' parameter. Adjust to
10691 (target_auxv_search, fprint_target_auxv): Adjust.
10692 (info_auxv_command): Adjust to use target_stack.
10693 * auxv.h (target_auxv_parse): Remove 'ops' parameter.
10694 * exceptions.c (print_flush): Handle a NULL target_stack.
10695 * regcache.c (target_ops_no_register): Refactor as class with
10698 * exec.c (exec_target): New class.
10699 (exec_ops): Now an exec_target.
10700 (exec_open, exec_close_1, exec_get_section_table)
10701 (exec_xfer_partial, exec_files_info, exec_has_memory)
10702 (exec_make_note_section): Refactor as exec_target methods.
10703 (exec_file_clear, ignore, exec_remove_breakpoint, init_exec_ops):
10705 (exec_target::find_memory_regions): New.
10706 (_initialize_exec): Don't call init_exec_ops.
10707 * gdbcore.h (exec_file_clear): Delete.
10709 * corefile.c (core_target): Delete.
10710 (core_file_command): Adjust.
10711 * corelow.c (core_target): New class.
10712 (the_core_target): New.
10713 (core_close): Remove target_ops parameter.
10714 (core_close_cleanup): Adjust.
10715 (core_target::close): New.
10716 (core_open, core_detach, get_core_registers, core_files_info)
10717 (core_xfer_partial, core_thread_alive, core_read_description)
10718 (core_pid_to_str, core_thread_name, core_has_memory)
10719 (core_has_stack, core_has_registers, core_info_proc): Rework as
10720 core_target methods.
10721 (ignore, core_remove_breakpoint, init_core_ops): Delete.
10722 (_initialize_corelow): Initialize the_core_target.
10723 * gdbcore.h (core_target): Delete.
10724 (the_core_target): New.
10726 * ctf.c: (ctf_target): New class.
10727 (ctf_ops): Now a ctf_target.
10728 (ctf_open, ctf_close, ctf_files_info, ctf_fetch_registers)
10729 (ctf_xfer_partial, ctf_get_trace_state_variable_value)
10730 (ctf_trace_find, ctf_traceframe_info): Refactor as ctf_target
10732 (init_ctf_ops): Delete.
10733 (_initialize_ctf): Don't call it.
10734 * tracefile-tfile.c (tfile_target): New class.
10735 (tfile_ops): Now a tfile_target.
10736 (tfile_open, tfile_close, tfile_files_info)
10737 (tfile_get_tracepoint_status, tfile_trace_find)
10738 (tfile_fetch_registers, tfile_xfer_partial)
10739 (tfile_get_trace_state_variable_value, tfile_traceframe_info):
10740 Refactor as tfile_target methods.
10741 (tfile_xfer_partial_features): Remove target_ops parameter.
10742 (init_tfile_ops): Delete.
10743 (_initialize_tracefile_tfile): Don't call it.
10744 * tracefile.c (tracefile_has_all_memory, tracefile_has_memory)
10745 (tracefile_has_stack, tracefile_has_registers)
10746 (tracefile_thread_alive, tracefile_get_trace_status): Refactor as
10747 tracefile_target methods.
10748 (init_tracefile_ops): Delete.
10749 (tracefile_target::tracefile_target): New.
10750 * tracefile.h: Include "target.h".
10751 (tracefile_target): New class.
10752 (init_tracefile_ops): Delete.
10754 * spu-multiarch.c (spu_multiarch_target): New class.
10755 (spu_ops): Now a spu_multiarch_target.
10756 (spu_thread_architecture, spu_region_ok_for_hw_watchpoint)
10757 (spu_fetch_registers, spu_store_registers, spu_xfer_partial)
10758 (spu_search_memory, spu_mourn_inferior): Refactor as
10759 spu_multiarch_target methods.
10760 (init_spu_ops): Delete.
10761 (_initialize_spu_multiarch): Remove references to init_spu_ops,
10762 complete_target_initialization.
10764 * ravenscar-thread.c (ravenscar_thread_target): New class.
10765 (ravenscar_ops): Now a ravenscar_thread_target.
10766 (ravenscar_resume, ravenscar_wait, ravenscar_update_thread_list)
10767 (ravenscar_thread_alive, ravenscar_pid_to_str)
10768 (ravenscar_fetch_registers, ravenscar_store_registers)
10769 (ravenscar_prepare_to_store, ravenscar_stopped_by_sw_breakpoint)
10770 (ravenscar_stopped_by_hw_breakpoint)
10771 (ravenscar_stopped_by_watchpoint, ravenscar_stopped_data_address)
10772 (ravenscar_mourn_inferior, ravenscar_core_of_thread)
10773 (ravenscar_get_ada_task_ptid): Refactor as ravenscar_thread_target
10775 (init_ravenscar_thread_ops): Delete.
10776 (_initialize_ravenscar): Remove references to
10777 init_ravenscar_thread_ops and complete_target_initialization.
10779 * bsd-uthread.c (bsd_uthread_ops_hack): Delete.
10780 (bsd_uthread_target): New class.
10781 (bsd_uthread_ops): Now a bsd_uthread_target.
10782 (bsd_uthread_activate): Adjust to refer to bsd_uthread_ops.
10783 (bsd_uthread_close, bsd_uthread_mourn_inferior)
10784 (bsd_uthread_fetch_registers, bsd_uthread_store_registers)
10785 (bsd_uthread_wait, bsd_uthread_resume, bsd_uthread_thread_alive)
10786 (bsd_uthread_update_thread_list, bsd_uthread_extra_thread_info)
10787 (bsd_uthread_pid_to_str): Refactor as bsd_uthread_target methods.
10788 (bsd_uthread_target): Delete function.
10789 (_initialize_bsd_uthread): Remove reference to
10790 complete_target_initialization.
10792 * bfd-target.c (target_bfd_data): Delete. Fields folded into ...
10793 (target_bfd): ... this new class.
10794 (target_bfd_xfer_partial, target_bfd_get_section_table)
10795 (target_bfd_close): Refactor as target_bfd methods.
10796 (target_bfd::~target_bfd): New.
10797 (target_bfd_reopen): Adjust.
10798 (target_bfd::close): New.
10800 * record-btrace.c (record_btrace_target): New class.
10801 (record_btrace_ops): Now a record_btrace_target.
10802 (record_btrace_open, record_btrace_stop_recording)
10803 (record_btrace_disconnect, record_btrace_close)
10804 (record_btrace_async, record_btrace_info)
10805 (record_btrace_insn_history, record_btrace_insn_history_range)
10806 (record_btrace_insn_history_from, record_btrace_call_history)
10807 (record_btrace_call_history_range)
10808 (record_btrace_call_history_from, record_btrace_record_method)
10809 (record_btrace_is_replaying, record_btrace_will_replay)
10810 (record_btrace_xfer_partial, record_btrace_insert_breakpoint)
10811 (record_btrace_remove_breakpoint, record_btrace_fetch_registers)
10812 (record_btrace_store_registers, record_btrace_prepare_to_store)
10813 (record_btrace_to_get_unwinder)
10814 (record_btrace_to_get_tailcall_unwinder, record_btrace_resume)
10815 (record_btrace_commit_resume, record_btrace_wait)
10816 (record_btrace_stop, record_btrace_can_execute_reverse)
10817 (record_btrace_stopped_by_sw_breakpoint)
10818 (record_btrace_supports_stopped_by_sw_breakpoint)
10819 (record_btrace_stopped_by_hw_breakpoint)
10820 (record_btrace_supports_stopped_by_hw_breakpoint)
10821 (record_btrace_update_thread_list, record_btrace_thread_alive)
10822 (record_btrace_goto_begin, record_btrace_goto_end)
10823 (record_btrace_goto, record_btrace_stop_replaying_all)
10824 (record_btrace_execution_direction)
10825 (record_btrace_prepare_to_generate_core)
10826 (record_btrace_done_generating_core): Refactor as
10827 record_btrace_target methods.
10828 (init_record_btrace_ops): Delete.
10829 (_initialize_record_btrace): Remove reference to
10830 init_record_btrace_ops.
10831 * record-full.c (RECORD_FULL_IS_REPLAY): Adjust to always refer to
10832 the execution_direction global.
10833 (record_full_base_target, record_full_target)
10834 (record_full_core_target): New classes.
10835 (record_full_ops): Now a record_full_target.
10836 (record_full_core_ops): Now a record_full_core_target.
10837 (record_full_target::detach, record_full_target::disconnect)
10838 (record_full_core_target::disconnect)
10839 (record_full_target::mourn_inferior, record_full_target::kill):
10841 (record_full_open, record_full_close, record_full_async): Refactor
10842 as methods of the record_full_base_target class.
10843 (record_full_resume, record_full_commit_resume): Refactor
10844 as methods of the record_full_target class.
10845 (record_full_wait, record_full_stopped_by_watchpoint)
10846 (record_full_stopped_data_address)
10847 (record_full_stopped_by_sw_breakpoint)
10848 (record_full_supports_stopped_by_sw_breakpoint)
10849 (record_full_stopped_by_hw_breakpoint)
10850 (record_full_supports_stopped_by_hw_breakpoint): Refactor as
10851 methods of the record_full_base_target class.
10852 (record_full_store_registers, record_full_xfer_partial)
10853 (record_full_insert_breakpoint, record_full_remove_breakpoint):
10854 Refactor as methods of the record_full_target class.
10855 (record_full_can_execute_reverse, record_full_get_bookmark)
10856 (record_full_goto_bookmark, record_full_execution_direction)
10857 (record_full_record_method, record_full_info, record_full_delete)
10858 (record_full_is_replaying, record_full_will_replay)
10859 (record_full_goto_begin, record_full_goto_end, record_full_goto)
10860 (record_full_stop_replaying): Refactor as methods of the
10861 record_full_base_target class.
10862 (record_full_core_resume, record_full_core_kill)
10863 (record_full_core_fetch_registers)
10864 (record_full_core_prepare_to_store)
10865 (record_full_core_store_registers, record_full_core_xfer_partial)
10866 (record_full_core_insert_breakpoint)
10867 (record_full_core_remove_breakpoint)
10868 (record_full_core_has_execution): Refactor
10869 as methods of the record_full_core_target class.
10870 (record_full_base_target::supports_delete_record): New.
10871 (init_record_full_ops): Delete.
10872 (init_record_full_core_ops): Delete.
10873 (record_full_save): Refactor as method of the
10874 record_full_base_target class.
10875 (_initialize_record_full): Remove references to
10876 init_record_full_ops and init_record_full_core_ops.
10878 * remote.c (remote_target, extended_remote_target): New classes.
10879 (remote_ops): Now a remote_target.
10880 (extended_remote_ops): Now an extended_remote_target.
10881 (remote_insert_fork_catchpoint, remote_remove_fork_catchpoint)
10882 (remote_insert_vfork_catchpoint, remote_remove_vfork_catchpoint)
10883 (remote_insert_exec_catchpoint, remote_remove_exec_catchpoint)
10884 (remote_pass_signals, remote_set_syscall_catchpoint)
10885 (remote_program_signals, )
10886 (remote_thread_always_alive): Remove target_ops parameter.
10887 (remote_thread_alive, remote_thread_name)
10888 (remote_update_thread_list, remote_threads_extra_info)
10889 (remote_static_tracepoint_marker_at)
10890 (remote_static_tracepoint_markers_by_strid)
10891 (remote_get_ada_task_ptid, remote_close, remote_start_remote)
10892 (remote_open): Refactor as methods of remote_target.
10893 (extended_remote_open, extended_remote_detach)
10894 (extended_remote_attach, extended_remote_post_attach):
10895 (extended_remote_supports_disable_randomization)
10896 (extended_remote_create_inferior): : Refactor as method of
10897 extended_remote_target.
10898 (remote_set_permissions, remote_open_1, remote_detach)
10899 (remote_follow_fork, remote_follow_exec, remote_disconnect)
10900 (remote_resume, remote_commit_resume, remote_stop)
10901 (remote_interrupt, remote_pass_ctrlc, remote_terminal_inferior)
10902 (remote_terminal_ours, remote_wait, remote_fetch_registers)
10903 (remote_prepare_to_store, remote_store_registers)
10904 (remote_flash_erase, remote_flash_done, remote_files_info)
10905 (remote_kill, remote_mourn, remote_insert_breakpoint)
10906 (remote_remove_breakpoint, remote_insert_watchpoint)
10907 (remote_watchpoint_addr_within_range)
10908 (remote_remove_watchpoint, remote_region_ok_for_hw_watchpoint)
10909 (remote_check_watch_resources, remote_stopped_by_sw_breakpoint)
10910 (remote_supports_stopped_by_sw_breakpoint)
10911 (remote_stopped_by_hw_breakpoint)
10912 (remote_supports_stopped_by_hw_breakpoint)
10913 (remote_stopped_by_watchpoint, remote_stopped_data_address)
10914 (remote_insert_hw_breakpoint, remote_remove_hw_breakpoint)
10915 (remote_verify_memory): Refactor as methods of remote_target.
10916 (remote_write_qxfer, remote_read_qxfer): Remove target_ops
10918 (remote_xfer_partial, remote_get_memory_xfer_limit)
10919 (remote_search_memory, remote_rcmd, remote_memory_map)
10920 (remote_pid_to_str, remote_get_thread_local_address)
10921 (remote_get_tib_address, remote_read_description): Refactor as
10922 methods of remote_target.
10923 (remote_target::fileio_open, remote_target::fileio_pwrite)
10924 (remote_target::fileio_pread, remote_target::fileio_close): New.
10925 (remote_hostio_readlink, remote_hostio_fstat)
10926 (remote_filesystem_is_local, remote_can_execute_reverse)
10927 (remote_supports_non_stop, remote_supports_disable_randomization)
10928 (remote_supports_multi_process, remote_supports_cond_breakpoints)
10929 (remote_supports_enable_disable_tracepoint)
10930 (remote_supports_string_tracing)
10931 (remote_can_run_breakpoint_commands, remote_trace_init)
10932 (remote_download_tracepoint, remote_can_download_tracepoint)
10933 (remote_download_trace_state_variable, remote_enable_tracepoint)
10934 (remote_disable_tracepoint, remote_trace_set_readonly_regions)
10935 (remote_trace_start, remote_get_trace_status)
10936 (remote_get_tracepoint_status, remote_trace_stop)
10937 (remote_trace_find, remote_get_trace_state_variable_value)
10938 (remote_save_trace_data, remote_get_raw_trace_data)
10939 (remote_set_disconnected_tracing, remote_core_of_thread)
10940 (remote_set_circular_trace_buffer, remote_traceframe_info)
10941 (remote_get_min_fast_tracepoint_insn_len)
10942 (remote_set_trace_buffer_size, remote_set_trace_notes)
10943 (remote_use_agent, remote_can_use_agent, remote_enable_btrace)
10944 (remote_disable_btrace, remote_teardown_btrace)
10945 (remote_read_btrace, remote_btrace_conf)
10946 (remote_augmented_libraries_svr4_read, remote_load)
10947 (remote_pid_to_exec_file, remote_can_do_single_step)
10948 (remote_execution_direction, remote_thread_handle_to_thread_info):
10949 Refactor as methods of remote_target.
10950 (init_remote_ops, init_extended_remote_ops): Delete.
10951 (remote_can_async_p, remote_is_async_p, remote_async)
10952 (remote_thread_events, remote_upload_tracepoints)
10953 (remote_upload_trace_state_variables): Refactor as methods of
10955 (_initialize_remote): Remove references to init_remote_ops and
10956 init_extended_remote_ops.
10958 * remote-sim.c (gdbsim_target): New class.
10959 (gdbsim_fetch_register, gdbsim_store_register, gdbsim_kill)
10960 (gdbsim_load, gdbsim_create_inferior, gdbsim_open, gdbsim_close)
10961 (gdbsim_detach, gdbsim_resume, gdbsim_interrupt)
10962 (gdbsim_wait, gdbsim_prepare_to_store, gdbsim_xfer_partial)
10963 (gdbsim_files_info, gdbsim_mourn_inferior, gdbsim_thread_alive)
10964 (gdbsim_pid_to_str, gdbsim_has_all_memory, gdbsim_has_memory):
10965 Refactor as methods of gdbsim_target.
10966 (gdbsim_ops): Now a gdbsim_target.
10967 (init_gdbsim_ops): Delete.
10968 (gdbsim_cntrl_c): Adjust.
10969 (_initialize_remote_sim): Remove reference to init_gdbsim_ops.
10971 * amd64-linux-nat.c (amd64_linux_nat_target): New class.
10972 (the_amd64_linux_nat_target): New.
10973 (amd64_linux_fetch_inferior_registers)
10974 (amd64_linux_store_inferior_registers): Refactor as methods of
10975 amd64_linux_nat_target.
10976 (_initialize_amd64_linux_nat): Adjust. Set linux_target.
10977 * i386-linux-nat.c: Don't include "linux-nat.h".
10978 (i386_linux_nat_target): New class.
10979 (the_i386_linux_nat_target): New.
10980 (i386_linux_fetch_inferior_registers)
10981 (i386_linux_store_inferior_registers, i386_linux_resume): Refactor
10982 as methods of i386_linux_nat_target.
10983 (_initialize_i386_linux_nat): Adjust. Set linux_target.
10984 * inf-child.c (inf_child_ops): Delete.
10985 (inf_child_fetch_inferior_registers)
10986 (inf_child_store_inferior_registers): Delete.
10987 (inf_child_post_attach, inf_child_prepare_to_store): Refactor as
10988 methods of inf_child_target.
10989 (inf_child_target::supports_terminal_ours)
10990 (inf_child_target::terminal_init)
10991 (inf_child_target::terminal_inferior)
10992 (inf_child_target::terminal_ours_for_output)
10993 (inf_child_target::terminal_ours, inf_child_target::interrupt)
10994 (inf_child_target::pass_ctrlc, inf_child_target::terminal_info):
10996 (inf_child_open, inf_child_disconnect, inf_child_close)
10997 (inf_child_mourn_inferior, inf_child_maybe_unpush_target)
10998 (inf_child_post_startup_inferior, inf_child_can_run)
10999 (inf_child_pid_to_exec_file): Refactor as methods of
11001 (inf_child_follow_fork): Delete.
11002 (inf_child_target::can_create_inferior)
11003 (inf_child_target::can_attach): New.
11004 (inf_child_target::has_all_memory, inf_child_target::has_memory)
11005 (inf_child_target::has_stack, inf_child_target::has_registers)
11006 (inf_child_target::has_execution): New.
11007 (inf_child_fileio_open, inf_child_fileio_pwrite)
11008 (inf_child_fileio_pread, inf_child_fileio_fstat)
11009 (inf_child_fileio_close, inf_child_fileio_unlink)
11010 (inf_child_fileio_readlink, inf_child_use_agent)
11011 (inf_child_can_use_agent): Refactor as methods of
11013 (return_zero, inf_child_target): Delete.
11014 (inf_child_target::inf_child_target): New.
11015 * inf-child.h: Include "target.h".
11016 (inf_child_target): Delete function prototype.
11017 (inf_child_target): New class.
11018 (inf_child_open_target, inf_child_mourn_inferior)
11019 (inf_child_maybe_unpush_target): Delete.
11020 * inf-ptrace.c (inf_ptrace_target::~inf_ptrace_target): New.
11021 (inf_ptrace_follow_fork, inf_ptrace_insert_fork_catchpoint)
11022 (inf_ptrace_remove_fork_catchpoint, inf_ptrace_create_inferior)
11023 (inf_ptrace_post_startup_inferior, inf_ptrace_mourn_inferior)
11024 (inf_ptrace_attach, inf_ptrace_post_attach, inf_ptrace_detach)
11025 (inf_ptrace_detach_success, inf_ptrace_kill, inf_ptrace_resume)
11026 (inf_ptrace_wait, inf_ptrace_xfer_partial)
11027 (inf_ptrace_thread_alive, inf_ptrace_files_info)
11028 (inf_ptrace_pid_to_str, inf_ptrace_auxv_parse): Refactor as
11029 methods of inf_ptrace_target.
11030 (inf_ptrace_target): Delete function.
11031 * inf-ptrace.h: Include "inf-child.h".
11032 (inf_ptrace_target): Delete function declaration.
11033 (inf_ptrace_target): New class.
11034 (inf_ptrace_trad_target, inf_ptrace_detach_success): Delete.
11035 * linux-nat.c (linux_target): New.
11036 (linux_ops, linux_ops_saved, super_xfer_partial): Delete.
11037 (linux_nat_target::~linux_nat_target): New.
11038 (linux_child_post_attach, linux_child_post_startup_inferior)
11039 (linux_child_follow_fork, linux_child_insert_fork_catchpoint)
11040 (linux_child_remove_fork_catchpoint)
11041 (linux_child_insert_vfork_catchpoint)
11042 (linux_child_remove_vfork_catchpoint)
11043 (linux_child_insert_exec_catchpoint)
11044 (linux_child_remove_exec_catchpoint)
11045 (linux_child_set_syscall_catchpoint, linux_nat_pass_signals)
11046 (linux_nat_create_inferior, linux_nat_attach, linux_nat_detach)
11047 (linux_nat_resume, linux_nat_stopped_by_watchpoint)
11048 (linux_nat_stopped_data_address)
11049 (linux_nat_stopped_by_sw_breakpoint)
11050 (linux_nat_supports_stopped_by_sw_breakpoint)
11051 (linux_nat_stopped_by_hw_breakpoint)
11052 (linux_nat_supports_stopped_by_hw_breakpoint, linux_nat_wait)
11053 (linux_nat_kill, linux_nat_mourn_inferior)
11054 (linux_nat_xfer_partial, linux_nat_thread_alive)
11055 (linux_nat_update_thread_list, linux_nat_pid_to_str)
11056 (linux_nat_thread_name, linux_child_pid_to_exec_file)
11057 (linux_child_static_tracepoint_markers_by_strid)
11058 (linux_nat_is_async_p, linux_nat_can_async_p)
11059 (linux_nat_supports_non_stop, linux_nat_always_non_stop_p)
11060 (linux_nat_supports_multi_process)
11061 (linux_nat_supports_disable_randomization, linux_nat_async)
11062 (linux_nat_stop, linux_nat_close, linux_nat_thread_address_space)
11063 (linux_nat_core_of_thread, linux_nat_filesystem_is_local)
11064 (linux_nat_fileio_open, linux_nat_fileio_readlink)
11065 (linux_nat_fileio_unlink, linux_nat_thread_events): Refactor as
11066 methods of linux_nat_target.
11067 (linux_nat_wait_1, linux_xfer_siginfo, linux_proc_xfer_partial)
11068 (linux_proc_xfer_spu, linux_nat_xfer_osdata): Remove target_ops
11070 (check_stopped_by_watchpoint): Adjust.
11071 (linux_xfer_partial): Delete.
11072 (linux_target_install_ops, linux_target, linux_nat_add_target):
11074 (linux_nat_target::linux_nat_target): New.
11075 * linux-nat.h: Include "inf-ptrace.h".
11076 (linux_nat_target): New.
11077 (linux_target, linux_target_install_ops, linux_nat_add_target):
11078 Delete function declarations.
11079 (linux_target): Declare global.
11080 * linux-thread-db.c (thread_db_target): New.
11081 (thread_db_target::thread_db_target): New.
11082 (thread_db_ops): Delete.
11083 (the_thread_db_target): New.
11084 (thread_db_detach, thread_db_wait, thread_db_mourn_inferior)
11085 (thread_db_update_thread_list, thread_db_pid_to_str)
11086 (thread_db_extra_thread_info)
11087 (thread_db_thread_handle_to_thread_info)
11088 (thread_db_get_thread_local_address, thread_db_get_ada_task_ptid)
11089 (thread_db_resume): Refactor as methods of thread_db_target.
11090 (init_thread_db_ops): Delete.
11091 (_initialize_thread_db): Remove reference to init_thread_db_ops.
11092 * x86-linux-nat.c: Don't include "linux-nat.h".
11093 (super_post_startup_inferior): Delete.
11094 (x86_linux_nat_target::~x86_linux_nat_target): New.
11095 (x86_linux_child_post_startup_inferior)
11096 (x86_linux_read_description, x86_linux_enable_btrace)
11097 (x86_linux_disable_btrace, x86_linux_teardown_btrace)
11098 (x86_linux_read_btrace, x86_linux_btrace_conf): Refactor as
11099 methods of x86_linux_nat_target.
11100 (x86_linux_create_target): Delete. Bits folded ...
11101 (x86_linux_add_target): ... here. Now takes a linux_nat_target
11103 * x86-linux-nat.h: Include "linux-nat.h" and "x86-nat.h".
11104 (x86_linux_nat_target): New class.
11105 (x86_linux_create_target): Delete.
11106 (x86_linux_add_target): Now takes a linux_nat_target pointer.
11107 * x86-nat.c (x86_insert_watchpoint, x86_remove_watchpoint)
11108 (x86_region_ok_for_watchpoint, x86_stopped_data_address)
11109 (x86_stopped_by_watchpoint, x86_insert_hw_breakpoint)
11110 (x86_remove_hw_breakpoint, x86_can_use_hw_breakpoint)
11111 (x86_stopped_by_hw_breakpoint): Remove target_ops parameter and
11113 (x86_use_watchpoints): Delete.
11114 * x86-nat.h: Include "breakpoint.h" and "target.h".
11115 (x86_use_watchpoints): Delete.
11116 (x86_can_use_hw_breakpoint, x86_region_ok_for_hw_watchpoint)
11117 (x86_stopped_by_watchpoint, x86_stopped_data_address)
11118 (x86_insert_watchpoint, x86_remove_watchpoint)
11119 (x86_insert_hw_breakpoint, x86_remove_hw_breakpoint)
11120 (x86_stopped_by_hw_breakpoint): New declarations.
11121 (x86_nat_target): New template class.
11123 * ppc-linux-nat.c (ppc_linux_nat_target): New class.
11124 (the_ppc_linux_nat_target): New.
11125 (ppc_linux_fetch_inferior_registers)
11126 (ppc_linux_can_use_hw_breakpoint)
11127 (ppc_linux_region_ok_for_hw_watchpoint)
11128 (ppc_linux_ranged_break_num_registers)
11129 (ppc_linux_insert_hw_breakpoint, ppc_linux_remove_hw_breakpoint)
11130 (ppc_linux_insert_mask_watchpoint)
11131 (ppc_linux_remove_mask_watchpoint)
11132 (ppc_linux_can_accel_watchpoint_condition)
11133 (ppc_linux_insert_watchpoint, ppc_linux_remove_watchpoint)
11134 (ppc_linux_stopped_data_address, ppc_linux_stopped_by_watchpoint)
11135 (ppc_linux_watchpoint_addr_within_range)
11136 (ppc_linux_masked_watch_num_registers)
11137 (ppc_linux_store_inferior_registers, ppc_linux_auxv_parse)
11138 (ppc_linux_read_description): Refactor as methods of
11139 ppc_linux_nat_target.
11140 (_initialize_ppc_linux_nat): Adjust. Set linux_target.
11142 * procfs.c (procfs_xfer_partial): Delete forward declaration.
11143 (procfs_target): New class.
11144 (the_procfs_target): New.
11145 (procfs_target): Delete function.
11146 (procfs_auxv_parse, procfs_attach, procfs_detach)
11147 (procfs_fetch_registers, procfs_store_registers, procfs_wait)
11148 (procfs_xfer_partial, procfs_resume, procfs_pass_signals)
11149 (procfs_files_info, procfs_kill_inferior, procfs_mourn_inferior)
11150 (procfs_create_inferior, procfs_update_thread_list)
11151 (procfs_thread_alive, procfs_pid_to_str)
11152 (procfs_can_use_hw_breakpoint, procfs_stopped_by_watchpoint)
11153 (procfs_stopped_data_address, procfs_insert_watchpoint)
11154 (procfs_remove_watchpoint, procfs_region_ok_for_hw_watchpoint)
11155 (proc_find_memory_regions, procfs_info_proc)
11156 (procfs_make_note_section): Refactor as methods of procfs_target.
11157 (_initialize_procfs): Adjust.
11158 * sol-thread.c (sol_thread_target): New class.
11159 (sol_thread_ops): Now a sol_thread_target.
11160 (sol_thread_detach, sol_thread_resume, sol_thread_wait)
11161 (sol_thread_fetch_registers, sol_thread_store_registers)
11162 (sol_thread_xfer_partial, sol_thread_mourn_inferior)
11163 (sol_thread_alive, solaris_pid_to_str, sol_update_thread_list)
11164 (sol_get_ada_task_ptid): Refactor as methods of sol_thread_target.
11165 (init_sol_thread_ops): Delete.
11166 (_initialize_sol_thread): Adjust. Remove references to
11167 init_sol_thread_ops and complete_target_initialization.
11169 * windows-nat.c (windows_nat_target): New class.
11170 (windows_fetch_inferior_registers)
11171 (windows_store_inferior_registers, windows_resume, windows_wait)
11172 (windows_attach, windows_detach, windows_pid_to_exec_file)
11173 (windows_files_info, windows_create_inferior)
11174 (windows_mourn_inferior, windows_interrupt, windows_kill_inferior)
11175 (windows_close, windows_pid_to_str, windows_xfer_partial)
11176 (windows_get_tib_address, windows_get_ada_task_ptid)
11177 (windows_thread_name, windows_thread_alive): Refactor as
11178 windows_nat_target methods.
11179 (do_initial_windows_stuff): Adjust.
11180 (windows_target): Delete function.
11181 (_initialize_windows_nat): Adjust.
11183 * darwin-nat.c (darwin_resume, darwin_wait_to, darwin_interrupt)
11184 (darwin_mourn_inferior, darwin_kill_inferior)
11185 (darwin_create_inferior, darwin_attach, darwin_detach)
11186 (darwin_pid_to_str, darwin_thread_alive, darwin_xfer_partial)
11187 (darwin_pid_to_exec_file, darwin_get_ada_task_ptid)
11188 (darwin_supports_multi_process): Refactor as darwin_nat_target
11190 (darwin_resume_to, darwin_files_info): Delete.
11191 (_initialize_darwin_inferior): Rename to ...
11192 (_initialize_darwin_nat): ... this. Adjust to C++ification.
11193 * darwin-nat.h: Include "inf-child.h".
11194 (darwin_nat_target): New class.
11195 (darwin_complete_target): Delete.
11196 * i386-darwin-nat.c (i386_darwin_nat_target): New class.
11197 (darwin_target): New.
11198 (i386_darwin_fetch_inferior_registers)
11199 (i386_darwin_store_inferior_registers): Refactor as methods of
11201 (darwin_complete_target): Delete, with ...
11202 (_initialize_i386_darwin_nat): ... bits factored out here.
11204 * alpha-linux-nat.c (alpha_linux_nat_target): New class.
11205 (the_alpha_linux_nat_target): New.
11206 (alpha_linux_register_u_offset): Refactor as
11207 alpha_linux_nat_target method.
11208 (_initialize_alpha_linux_nat): Adjust.
11209 * linux-nat-trad.c (inf_ptrace_register_u_offset): Delete.
11210 (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
11211 (inf_ptrace_store_register, inf_ptrace_store_registers): Refact as
11212 methods of linux_nat_trad_target.
11213 (linux_trad_target): Delete.
11214 * linux-nat-trad.h (linux_trad_target): Delete function.
11215 (linux_nat_trad_target): New class.
11216 * mips-linux-nat.c (mips_linux_nat_target): New class.
11217 (super_fetch_registers, super_store_registers, super_close):
11219 (the_mips_linux_nat_target): New.
11220 (mips64_linux_regsets_fetch_registers)
11221 (mips64_linux_regsets_store_registers)
11222 (mips64_linux_fetch_registers, mips64_linux_store_registers)
11223 (mips_linux_register_u_offset, mips_linux_read_description)
11224 (mips_linux_can_use_hw_breakpoint)
11225 (mips_linux_stopped_by_watchpoint)
11226 (mips_linux_stopped_data_address)
11227 (mips_linux_region_ok_for_hw_watchpoint)
11228 (mips_linux_insert_watchpoint, mips_linux_remove_watchpoint)
11229 (mips_linux_close): Refactor as methods of mips_linux_nat.
11230 (_initialize_mips_linux_nat): Adjust to C++ification.
11232 * aix-thread.c (aix_thread_target): New class.
11233 (aix_thread_ops): Now an aix_thread_target.
11234 (aix_thread_detach, aix_thread_resume, aix_thread_wait)
11235 (aix_thread_fetch_registers, aix_thread_store_registers)
11236 (aix_thread_xfer_partial, aix_thread_mourn_inferior)
11237 (aix_thread_thread_alive, aix_thread_pid_to_str)
11238 (aix_thread_extra_thread_info, aix_thread_get_ada_task_ptid):
11239 Refactor as methods of aix_thread_target.
11240 (init_aix_thread_ops): Delete.
11241 (_initialize_aix_thread): Remove references to init_aix_thread_ops
11242 and complete_target_initialization.
11243 * rs6000-nat.c (rs6000_xfer_shared_libraries): Delete.
11244 (rs6000_nat_target): New class.
11245 (the_rs6000_nat_target): New.
11246 (rs6000_fetch_inferior_registers, rs6000_store_inferior_registers)
11247 (rs6000_xfer_partial, rs6000_wait, rs6000_create_inferior)
11248 (rs6000_xfer_shared_libraries): Refactor as rs6000_nat_target methods.
11249 (super_create_inferior): Delete.
11250 (_initialize_rs6000_nat): Adjust to C++ification.
11252 * arm-linux-nat.c (arm_linux_nat_target): New class.
11253 (the_arm_linux_nat_target): New.
11254 (arm_linux_fetch_inferior_registers)
11255 (arm_linux_store_inferior_registers, arm_linux_read_description)
11256 (arm_linux_can_use_hw_breakpoint, arm_linux_insert_hw_breakpoint)
11257 (arm_linux_remove_hw_breakpoint)
11258 (arm_linux_region_ok_for_hw_watchpoint)
11259 (arm_linux_insert_watchpoint, arm_linux_remove_watchpoint)
11260 (arm_linux_stopped_data_address, arm_linux_stopped_by_watchpoint)
11261 (arm_linux_watchpoint_addr_within_range): Refactor as methods of
11262 arm_linux_nat_target.
11263 (_initialize_arm_linux_nat): Adjust to C++ification.
11265 * aarch64-linux-nat.c (aarch64_linux_nat_target): New class.
11266 (the_aarch64_linux_nat_target): New.
11267 (aarch64_linux_fetch_inferior_registers)
11268 (aarch64_linux_store_inferior_registers)
11269 (aarch64_linux_child_post_startup_inferior)
11270 (aarch64_linux_read_description)
11271 (aarch64_linux_can_use_hw_breakpoint)
11272 (aarch64_linux_insert_hw_breakpoint)
11273 (aarch64_linux_remove_hw_breakpoint)
11274 (aarch64_linux_insert_watchpoint, aarch64_linux_remove_watchpoint)
11275 (aarch64_linux_region_ok_for_hw_watchpoint)
11276 (aarch64_linux_stopped_data_address)
11277 (aarch64_linux_stopped_by_watchpoint)
11278 (aarch64_linux_watchpoint_addr_within_range)
11279 (aarch64_linux_can_do_single_step): Refactor as methods of
11280 aarch64_linux_nat_target.
11281 (super_post_startup_inferior): Delete.
11282 (_initialize_aarch64_linux_nat): Adjust to C++ification.
11284 * hppa-linux-nat.c (hppa_linux_nat_target): New class.
11285 (the_hppa_linux_nat_target): New.
11286 (hppa_linux_fetch_inferior_registers)
11287 (hppa_linux_store_inferior_registers): Refactor as methods of
11288 hppa_linux_nat_target.
11289 (_initialize_hppa_linux_nat): Adjust to C++ification.
11291 * ia64-linux-nat.c (ia64_linux_nat_target): New class.
11292 (the_ia64_linux_nat_target): New.
11293 (ia64_linux_insert_watchpoint, ia64_linux_remove_watchpoint)
11294 (ia64_linux_stopped_data_address)
11295 (ia64_linux_stopped_by_watchpoint, ia64_linux_fetch_registers)
11296 (ia64_linux_store_registers, ia64_linux_xfer_partial): Refactor as
11297 ia64_linux_nat_target methods.
11298 (super_xfer_partial): Delete.
11299 (_initialize_ia64_linux_nat): Adjust to C++ification.
11301 * m32r-linux-nat.c (m32r_linux_nat_target): New class.
11302 (the_m32r_linux_nat_target): New.
11303 (m32r_linux_fetch_inferior_registers)
11304 (m32r_linux_store_inferior_registers): Refactor as
11305 m32r_linux_nat_target methods.
11306 (_initialize_m32r_linux_nat): Adjust to C++ification.
11308 * m68k-linux-nat.c (m68k_linux_nat_target): New class.
11309 (the_m68k_linux_nat_target): New.
11310 (m68k_linux_fetch_inferior_registers)
11311 (m68k_linux_store_inferior_registers): Refactor as
11312 m68k_linux_nat_target methods.
11313 (_initialize_m68k_linux_nat): Adjust to C++ification.
11315 * s390-linux-nat.c (s390_linux_nat_target): New class.
11316 (the_s390_linux_nat_target): New.
11317 (s390_linux_fetch_inferior_registers)
11318 (s390_linux_store_inferior_registers, s390_stopped_by_watchpoint)
11319 (s390_insert_watchpoint, s390_remove_watchpoint)
11320 (s390_can_use_hw_breakpoint, s390_insert_hw_breakpoint)
11321 (s390_remove_hw_breakpoint, s390_region_ok_for_hw_watchpoint)
11322 (s390_auxv_parse, s390_read_description): Refactor as methods of
11323 s390_linux_nat_target.
11324 (_initialize_s390_nat): Adjust to C++ification.
11326 * sparc-linux-nat.c (sparc_linux_nat_target): New class.
11327 (the_sparc_linux_nat_target): New.
11328 (_initialize_sparc_linux_nat): Adjust to C++ification.
11329 * sparc-nat.c (sparc_fetch_inferior_registers)
11330 (sparc_store_inferior_registers): Remove target_ops parameter.
11331 * sparc-nat.h (sparc_fetch_inferior_registers)
11332 (sparc_store_inferior_registers): Remove target_ops parameter.
11333 * sparc64-linux-nat.c (sparc64_linux_nat_target): New class.
11334 (the_sparc64_linux_nat_target): New.
11335 (_initialize_sparc64_linux_nat): Adjust to C++ification.
11337 * spu-linux-nat.c (spu_linux_nat_target): New class.
11338 (the_spu_linux_nat_target): New.
11339 (spu_child_post_startup_inferior, spu_child_post_attach)
11340 (spu_child_wait, spu_fetch_inferior_registers)
11341 (spu_store_inferior_registers, spu_xfer_partial)
11342 (spu_can_use_hw_breakpoint): Refactor as spu_linux_nat_target
11344 (_initialize_spu_nat): Adjust to C++ification.
11346 * tilegx-linux-nat.c (tilegx_linux_nat_target): New class.
11347 (the_tilegx_linux_nat_target): New.
11348 (fetch_inferior_registers, store_inferior_registers):
11349 Refactor as methods.
11350 (_initialize_tile_linux_nat): Adjust to C++ification.
11352 * xtensa-linux-nat.c (xtensa_linux_nat_target): New class.
11353 (the_xtensa_linux_nat_target): New.
11354 (xtensa_linux_fetch_inferior_registers)
11355 (xtensa_linux_store_inferior_registers): Refactor as
11356 xtensa_linux_nat_target methods.
11357 (_initialize_xtensa_linux_nat): Adjust to C++ification.
11359 * fbsd-nat.c (USE_SIGTRAP_SIGINFO): Delete.
11360 (fbsd_pid_to_exec_file, fbsd_find_memory_regions)
11361 (fbsd_find_memory_regions, fbsd_info_proc, fbsd_xfer_partial)
11362 (fbsd_thread_alive, fbsd_pid_to_str, fbsd_thread_name)
11363 (fbsd_update_thread_list, fbsd_resume, fbsd_wait)
11364 (fbsd_stopped_by_sw_breakpoint)
11365 (fbsd_supports_stopped_by_sw_breakpoint, fbsd_follow_fork)
11366 (fbsd_insert_fork_catchpoint, fbsd_remove_fork_catchpoint)
11367 (fbsd_insert_vfork_catchpoint, fbsd_remove_vfork_catchpoint)
11368 (fbsd_post_startup_inferior, fbsd_post_attach)
11369 (fbsd_insert_exec_catchpoint, fbsd_remove_exec_catchpoint)
11370 (fbsd_set_syscall_catchpoint)
11371 (super_xfer_partial, super_resume, super_wait)
11372 (fbsd_supports_stopped_by_hw_breakpoint): Delete.
11373 (fbsd_handle_debug_trap): Remove target_ops parameter.
11374 (fbsd_nat_add_target): Delete.
11375 * fbsd-nat.h: Include "inf-ptrace.h".
11376 (fbsd_nat_add_target): Delete.
11377 (USE_SIGTRAP_SIGINFO): Define.
11378 (fbsd_nat_target): New class.
11380 * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers)
11381 (amd64bsd_store_inferior_registers): Remove target_ops parameter.
11382 (amd64bsd_target): Delete.
11383 * amd64-bsd-nat.h: New file.
11384 * amd64-fbsd-nat.c: Include "amd64-bsd-nat.h" instead of
11386 (amd64_fbsd_nat_target): New class.
11387 (the_amd64_fbsd_nat_target): New.
11388 (amd64fbsd_read_description): Refactor as method of
11389 amd64_fbsd_nat_target.
11390 (amd64_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
11391 (_initialize_amd64fbsd_nat): Adjust to C++ification.
11392 * amd64-nat.h (amd64bsd_target): Delete function declaration.
11393 * i386-bsd-nat.c (i386bsd_fetch_inferior_registers)
11394 (i386bsd_store_inferior_registers): Remove target_ops parameter.
11395 (i386bsd_target): Delete.
11396 * i386-bsd-nat.h (i386bsd_target): Delete function declaration.
11397 (i386bsd_fetch_inferior_registers)
11398 (i386bsd_store_inferior_registers): Declare.
11399 (i386_bsd_nat_target): New class.
11400 * i386-fbsd-nat.c (i386_fbsd_nat_target): New class.
11401 (the_i386_fbsd_nat_target): New.
11402 (i386fbsd_resume, i386fbsd_read_description): Refactor as
11403 i386_fbsd_nat_target methods.
11404 (i386_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
11405 (_initialize_i386fbsd_nat): Adjust to C++ification.
11406 * x86-bsd-nat.c (super_mourn_inferior): Delete.
11407 (x86bsd_mourn_inferior, x86bsd_target): Delete.
11408 (_initialize_x86_bsd_nat): Adjust to C++ification.
11409 * x86-bsd-nat.h: Include "x86-nat.h".
11410 (x86bsd_target): Delete declaration.
11411 (x86bsd_nat_target): New class.
11413 * aarch64-fbsd-nat.c (aarch64_fbsd_nat_target): New class.
11414 (the_aarch64_fbsd_nat_target): New.
11415 (aarch64_fbsd_fetch_inferior_registers)
11416 (aarch64_fbsd_store_inferior_registers): Refactor as methods of
11417 aarch64_fbsd_nat_target.
11418 (_initialize_aarch64_fbsd_nat): Adjust to C++ification.
11419 * alpha-bsd-nat.c (alpha_bsd_nat_target): New class.
11420 (the_alpha_bsd_nat_target): New.
11421 (alphabsd_fetch_inferior_registers)
11422 (alphabsd_store_inferior_registers): Refactor as
11423 alpha_bsd_nat_target methods.
11424 (_initialize_alphabsd_nat): Refactor as methods of
11425 alpha_bsd_nat_target.
11426 * amd64-nbsd-nat.c: Include "amd64-bsd-nat.h".
11427 (the_amd64_nbsd_nat_target): New.
11428 (_initialize_amd64nbsd_nat): Adjust to C++ification.
11429 * amd64-obsd-nat.c: Include "amd64-bsd-nat.h".
11430 (the_amd64_obsd_nat_target): New.
11431 (_initialize_amd64obsd_nat): Adjust to C++ification.
11432 * arm-fbsd-nat.c (arm_fbsd_nat_target): New.
11433 (the_arm_fbsd_nat_target): New.
11434 (arm_fbsd_fetch_inferior_registers)
11435 (arm_fbsd_store_inferior_registers, arm_fbsd_read_description):
11436 (_initialize_arm_fbsd_nat): Refactor as methods of
11437 arm_fbsd_nat_target.
11438 (_initialize_arm_fbsd_nat): Adjust to C++ification.
11439 * arm-nbsd-nat.c (arm_netbsd_nat_target): New class.
11440 (the_arm_netbsd_nat_target): New.
11441 (armnbsd_fetch_registers, armnbsd_store_registers): Refactor as
11442 arm_netbsd_nat_target.
11443 (_initialize_arm_netbsd_nat): Adjust to C++ification.
11444 * hppa-nbsd-nat.c (hppa_nbsd_nat_target): New class.
11445 (the_hppa_nbsd_nat_target): New.
11446 (hppanbsd_fetch_registers, hppanbsd_store_registers): Refactor as
11447 hppa_nbsd_nat_target methods.
11448 (_initialize_hppanbsd_nat): Adjust to C++ification.
11449 * hppa-obsd-nat.c (hppa_obsd_nat_target): New class.
11450 (the_hppa_obsd_nat_target): New.
11451 (hppaobsd_fetch_registers, hppaobsd_store_registers): Refactor as
11452 methods of hppa_obsd_nat_target.
11453 (_initialize_hppaobsd_nat): Adjust to C++ification. Use
11455 * i386-nbsd-nat.c (the_i386_nbsd_nat_target): New.
11456 (_initialize_i386nbsd_nat): Adjust to C++ification. Use
11458 * i386-obsd-nat.c (the_i386_obsd_nat_target): New.
11459 (_initialize_i386obsd_nat): Use add_target.
11460 * m68k-bsd-nat.c (m68k_bsd_nat_target): New class.
11461 (the_m68k_bsd_nat_target): New.
11462 (m68kbsd_fetch_inferior_registers)
11463 (m68kbsd_store_inferior_registers): Refactor as methods of
11464 m68k_bsd_nat_target.
11465 (_initialize_m68kbsd_nat): Adjust to C++ification.
11466 * mips-fbsd-nat.c (mips_fbsd_nat_target): New class.
11467 (the_mips_fbsd_nat_target): New.
11468 (mips_fbsd_fetch_inferior_registers)
11469 (mips_fbsd_store_inferior_registers): Refactor as methods of
11470 mips_fbsd_nat_target.
11471 (_initialize_mips_fbsd_nat): Adjust to C++ification. Use
11473 * mips-nbsd-nat.c (mips_nbsd_nat_target): New class.
11474 (the_mips_nbsd_nat_target): New.
11475 (mipsnbsd_fetch_inferior_registers)
11476 (mipsnbsd_store_inferior_registers): Refactor as methods of
11477 mips_nbsd_nat_target.
11478 (_initialize_mipsnbsd_nat): Adjust to C++ification.
11479 * mips64-obsd-nat.c (mips64_obsd_nat_target): New class.
11480 (the_mips64_obsd_nat_target): New.
11481 (mips64obsd_fetch_inferior_registers)
11482 (mips64obsd_store_inferior_registers): Refactor as methods of
11483 mips64_obsd_nat_target.
11484 (_initialize_mips64obsd_nat): Adjust to C++ification. Use
11486 * nbsd-nat.c (nbsd_pid_to_exec_file): Refactor as method of
11488 * nbsd-nat.h: Include "inf-ptrace.h".
11489 (nbsd_nat_target): New class.
11490 * obsd-nat.c (obsd_pid_to_str, obsd_update_thread_list)
11491 (obsd_wait): Refactor as methods of obsd_nat_target.
11492 (obsd_add_target): Delete.
11493 * obsd-nat.h: Include "inf-ptrace.h".
11494 (obsd_nat_target): New class.
11495 * ppc-fbsd-nat.c (ppc_fbsd_nat_target): New class.
11496 (the_ppc_fbsd_nat_target): New.
11497 (ppcfbsd_fetch_inferior_registers)
11498 (ppcfbsd_store_inferior_registers): Refactor as methods of
11499 ppc_fbsd_nat_target.
11500 (_initialize_ppcfbsd_nat): Adjust to C++ification. Use
11502 * ppc-nbsd-nat.c (ppc_nbsd_nat_target): New class.
11503 (the_ppc_nbsd_nat_target): New.
11504 (ppcnbsd_fetch_inferior_registers)
11505 (ppcnbsd_store_inferior_registers): Refactor as methods of
11506 ppc_nbsd_nat_target.
11507 (_initialize_ppcnbsd_nat): Adjust to C++ification.
11508 * ppc-obsd-nat.c (ppc_obsd_nat_target): New class.
11509 (the_ppc_obsd_nat_target): New.
11510 (ppcobsd_fetch_registers, ppcobsd_store_registers): Refactor as
11511 methods of ppc_obsd_nat_target.
11512 (_initialize_ppcobsd_nat): Adjust to C++ification. Use
11514 * sh-nbsd-nat.c (sh_nbsd_nat_target): New class.
11515 (the_sh_nbsd_nat_target): New.
11516 (shnbsd_fetch_inferior_registers)
11517 (shnbsd_store_inferior_registers): Refactor as methods of
11518 sh_nbsd_nat_target.
11519 (_initialize_shnbsd_nat): Adjust to C++ification.
11520 * sparc-nat.c (sparc_xfer_wcookie): Make extern.
11521 (inf_ptrace_xfer_partial): Delete.
11522 (sparc_xfer_partial, sparc_target): Delete.
11523 * sparc-nat.h (sparc_fetch_inferior_registers)
11524 (sparc_store_inferior_registers, sparc_xfer_wcookie): Declare.
11525 (sparc_target): Delete function declaration.
11526 (sparc_target): New template class.
11527 * sparc-nbsd-nat.c (the_sparc_nbsd_nat_target): New.
11528 (_initialize_sparcnbsd_nat): Adjust to C++ification.
11529 * sparc64-fbsd-nat.c (the_sparc64_fbsd_nat_target): New.
11530 (_initialize_sparc64fbsd_nat): Adjust to C++ification. Use
11532 * sparc64-nbsd-nat.c (the_sparc64_nbsd_nat_target): New.
11533 (_initialize_sparc64nbsd_nat): Adjust to C++ification.
11534 * sparc64-obsd-nat.c (the_sparc64_obsd_nat_target): New.
11535 (_initialize_sparc64obsd_nat): Adjust to C++ification. Use
11537 * vax-bsd-nat.c (vax_bsd_nat_target): New class.
11538 (the_vax_bsd_nat_target): New.
11539 (vaxbsd_fetch_inferior_registers)
11540 (vaxbsd_store_inferior_registers): Refactor as vax_bsd_nat_target
11542 (_initialize_vaxbsd_nat): Adjust to C++ification.
11544 * bsd-kvm.c (bsd_kvm_target): New class.
11545 (bsd_kvm_ops): Now a bsd_kvm_target.
11546 (bsd_kvm_open, bsd_kvm_close, bsd_kvm_xfer_partial)
11547 (bsd_kvm_files_info, bsd_kvm_fetch_registers)
11548 (bsd_kvm_thread_alive, bsd_kvm_pid_to_str): Refactor as methods of
11550 (bsd_kvm_return_one): Delete.
11551 (bsd_kvm_add_target): Adjust to C++ification.
11553 * nto-procfs.c (nto_procfs_target, nto_procfs_target_native)
11554 (nto_procfs_target_procfs): New classes.
11555 (procfs_open_1, procfs_thread_alive, procfs_update_thread_list)
11556 (procfs_files_info, procfs_pid_to_exec_file, procfs_attach)
11557 (procfs_post_attach, procfs_wait, procfs_fetch_registers)
11558 (procfs_xfer_partial, procfs_detach, procfs_insert_breakpoint)
11559 (procfs_remove_breakpoint, procfs_insert_hw_breakpoint)
11560 (procfs_remove_hw_breakpoint, procfs_resume)
11561 (procfs_mourn_inferior, procfs_create_inferior, procfs_interrupt)
11562 (procfs_kill_inferior, procfs_store_registers)
11563 (procfs_pass_signals, procfs_pid_to_str, procfs_can_run): Refactor
11564 as methods of nto_procfs_target.
11565 (nto_procfs_ops): Now an nto_procfs_target_procfs.
11566 (nto_native_ops): Delete.
11567 (procfs_open, procfs_native_open): Delete.
11568 (nto_native_ops): Now an nto_procfs_target_native.
11569 (init_procfs_targets): Adjust to C++ification.
11570 (procfs_can_use_hw_breakpoint, procfs_remove_hw_watchpoint)
11571 (procfs_insert_hw_watchpoint, procfs_stopped_by_watchpoint):
11572 Refactor as methods of nto_procfs_target.
11574 * go32-nat.c (go32_nat_target): New class.
11575 (the_go32_nat_target): New.
11576 (go32_attach, go32_resume, go32_wait, go32_fetch_registers)
11577 (go32_store_registers, go32_xfer_partial, go32_files_info)
11578 (go32_kill_inferior, go32_create_inferior, go32_mourn_inferior)
11579 (go32_terminal_init, go32_terminal_info, go32_terminal_inferior)
11580 (go32_terminal_ours, go32_pass_ctrlc, go32_thread_alive)
11581 (go32_pid_to_str): Refactor as methods of go32_nat_target.
11582 (go32_target): Delete.
11583 (_initialize_go32_nat): Adjust to C++ification.
11585 * gnu-nat.c (gnu_wait, gnu_resume, gnu_kill_inferior)
11586 (gnu_mourn_inferior, gnu_create_inferior, gnu_attach, gnu_detach)
11587 (gnu_stop, gnu_thread_alive, gnu_xfer_partial)
11588 (gnu_find_memory_regions, gnu_pid_to_str): Refactor as methods of
11590 (gnu_target): Delete.
11591 * gnu-nat.h (gnu_target): Delete.
11592 (gnu_nat_target): New class.
11593 * i386-gnu-nat.c (gnu_base_target): New.
11594 (i386_gnu_nat_target): New class.
11595 (the_i386_gnu_nat_target): New.
11596 (_initialize_i386gnu_nat): Adjust to C++ification.
11598 2018-05-02 Pedro Alves <palves@redhat.com>
11600 * bfd-target.c (target_bfd_xclose): Rename to ...
11601 (target_bfd_close): ... this.
11602 (target_bfd_reopen): Adjust.
11603 * target.c (target_close): Remove references to to_xclose.
11604 * target.h (target_ops::to_xclose): Delete.
11605 (target_ops::to_close): Update comments.
11607 2018-05-02 Pedro Alves <palves@redhat.com>
11609 * alpha-linux-nat.c: Include "linux-nat-trad.h" instead of
11611 * configure.nat (alpha-linux, linux-mips): Add linux-nat-trad.o.
11612 * inf-ptrace.c (inf_ptrace_register_u_offset)
11613 (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
11614 (inf_ptrace_store_register, inf_ptrace_store_registers)
11615 (inf_ptrace_trad_target): Move to ...
11616 * linux-nat-trad.c: ... this new file.
11617 * linux-nat-trad.h: New file.
11618 * linux-nat.c (linux_target_install_ops): Make extern.
11619 (linux_trad_target): Delete.
11620 * linux-nat.h (linux_trad_target): Delete declaration.
11621 (linux_target_install_ops): Declare.
11622 * mips-linux-nat.c: Include "linux-nat-trad.h" instead of
11625 2018-05-02 Pedro Alves <palves@redhat.com>
11627 * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
11628 procfs_target/add_target here.
11629 * procfs.c (procfs_target): Make static.
11630 (_initialize_procfs): Call add_target here.
11631 * procfs.h (struct target_ops): Remove forward declaration.
11632 (procfs_target): Remove declaration.
11633 * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Delete.
11635 2018-05-02 Pedro Alves <palves@redhat.com>
11637 * procfs.c (procfs_stopped_by_watchpoint)
11638 (procfs_insert_watchpoint, procfs_remove_watchpoint)
11639 (procfs_region_ok_for_hw_watchpoint, procfs_stopped_data_address):
11641 (procfs_use_watchpoints): Delete, move contents...
11642 (procfs_target): ... here.
11643 * procfs.h (procfs_use_watchpoints): Delete declaration.
11644 * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
11645 procfs_use_watchpoints.
11646 * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Don't call
11647 procfs_use_watchpoints.
11649 2018-05-02 Tom Tromey <tom@tromey.com>
11652 * python/python.c (gdbpy_parameter_value): Handle var_zuinteger
11653 and var_zuinteger_unlimited.
11654 * python/py-param.c (struct parm_constant): Add PARAM_ZUINTEGER
11655 and PARAM_ZUINTEGER_UNLIMITED.
11656 (set_parameter_value): Handle var_zuinteger and
11657 var_zuinteger_unlimited.
11658 (add_setshow_generic): Likewise.
11659 (parmpy_init): Likewise.
11661 2018-04-28 Dan Robertson <danlrobertson89@gmail.com>
11664 * gdb/rust-exp.y (convert_params_to_types): Ensure that the params
11665 pointer is not null before dereferencing it.
11667 2018-04-30 Tom Tromey <tom@tromey.com>
11669 * darwin-nat-info.c (darwin_debug_regions_recurse): Remove use of
11672 2018-04-30 Tom Tromey <tom@tromey.com>
11674 * breakpoint.c (mention): Remove use of is_mi_like_p.
11675 (print_mention_ranged_breakpoint): Likewise.
11676 * break-catch-throw.c (print_it_exception_catchpoint): Remove use
11679 2018-04-30 Tom Tromey <tom@tromey.com>
11681 * tracepoint.c (tvariables_info_1): Remove use of is_mi_like_p.
11683 2018-04-30 Tom Tromey <tom@tromey.com>
11685 * spu-tdep.c (info_spu_mailbox_list, info_spu_dma_cmdlist)
11686 (info_spu_event_command): Remove some uses of is_mi_like_p.
11688 2018-04-30 Tom Tromey <tom@tromey.com>
11690 * python/py-framefilter.c (py_print_single_arg)
11691 (enumerate_locals, py_print_args, py_print_frame): Remove some
11692 uses of is_mi_like_p.
11694 2018-04-30 Tom Tromey <tom@tromey.com>
11696 * ui-out.c: Update.
11697 * cli-out.h (cli_ui_out::do_is_mi_like_p): Update.
11698 * ui-out.h (ui_out::is_mi_like_p): Now const.
11699 (ui_out::do_is_mi_like_p): Now const.
11700 * mi/mi-out.h (mi_ui_out::do_is_mi_like_p): Update.
11702 2018-04-30 Tom Tromey <tom@tromey.com>
11704 * varobj.c (varobj_set_visualizer): Use new_reference.
11705 * python/python.c (gdbpy_decode_line): Use new_reference.
11706 * python/py-cmd.c (cmdpy_function, cmdpy_completer_helper): Use
11709 2018-04-30 Tom Tromey <tom@tromey.com>
11711 * varobj.c (install_new_value): Use new_reference.
11712 * value.h (value_incref): Return void. Swap intro comment with
11714 * value.c (set_value_parent): Use new_reference.
11715 (value_incref): Return void. Update intro comment.
11716 (release_value): Use new_reference.
11717 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Use new_reference.
11719 2018-04-30 Tom Tromey <tom@tromey.com>
11721 * symfile-mem.c (symbol_file_add_from_memory): Use new_reference.
11722 * gdb_bfd.h (new_bfd_ref): Remove.
11723 (gdb_bfd_open): Update comment.
11724 * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
11725 (gdb_bfd_openw, gdb_bfd_openr_iovec, gdb_bfd_record_inclusion)
11726 (gdb_bfd_fdopenr): Use new_reference.
11727 * exec.c (exec_file_attach): Use new_reference.
11729 2018-04-30 Tom Tromey <tom@tromey.com>
11731 * common/gdb_ref_ptr.h (ref_ptr::new_reference): New static
11734 2018-04-30 Tom Tromey <tom@tromey.com>
11736 * jit.c (jit_read_code_entry): Use type_align.
11737 * i386-tdep.c (i386_gdbarch_init): Don't call
11738 set_gdbarch_long_long_align_bit.
11739 * gdbarch.sh: Remove long_long_align_bit.
11740 * gdbarch.c, gdbarch.h: Rebuild.
11741 * arc-tdep.c (arc_type_align): New function.
11742 (arc_gdbarch_init): Use arc_type_align. Don't call
11743 set_gdbarch_long_long_align_bit.
11745 2018-04-30 Tom Tromey <tom@tromey.com>
11747 * rust-lang.c (rust_type_alignment): Remove.
11748 (rust_composite_type): Use type_align.
11750 2018-04-30 Tom Tromey <tom@tromey.com>
11752 * NEWS: Mention Type.align.
11753 * python/py-type.c (typy_get_alignof): New function.
11754 (type_object_getset): Add "alignof".
11756 2018-04-30 Tom Tromey <tom@tromey.com>
11760 * std-operator.def (UNOP_ALIGNOF): New operator.
11761 * expprint.c (dump_subexp_body_standard) <case UNOP_ALIGNOF>:
11763 * eval.c (evaluate_subexp_standard) <case UNOP_ALIGNOF>: New.
11764 * c-lang.c (c_op_print_tab): Add alignof.
11765 * c-exp.y (ALIGNOF): New token.
11766 (exp): Add "ALIGNOF" production.
11767 (ident_tokens): Add _Alignof and alignof.
11769 2018-04-30 Tom Tromey <tom@tromey.com>
11771 * i386-tdep.c (i386_type_align): New function.
11772 (i386_gdbarch_init): Update.
11773 * gdbarch.sh (type_align): New method.
11774 * gdbarch.c, gdbarch.h: Rebuild.
11775 * arch-utils.h (default_type_align): Declare.
11776 * arch-utils.c (default_type_align): New function.
11777 * gdbtypes.h (TYPE_ALIGN_BITS): New define.
11778 (struct type) <align_log2>: New field.
11779 <instance_flags>: Now a bitfield.
11780 (TYPE_RAW_ALIGN): New macro.
11781 (type_align, type_raw_align, set_type_align): Declare.
11782 * gdbtypes.c (type_align, type_raw_align, set_type_align): New
11784 * dwarf2read.c (quirk_rust_enum): Set type alignment.
11785 (get_alignment, maybe_set_alignment): New functions.
11786 (read_structure_type, read_enumeration_type, read_array_type)
11787 (read_set_type, read_tag_pointer_type, read_tag_reference_type)
11788 (read_subrange_type, read_base_type): Set type alignment.
11790 2018-04-30 Simon Marchi <simon.marchi@ericsson.com>
11792 * dwarf2read.c (read_index_from_section): Use bool.
11794 2018-04-29 Fabian Groffen <grobian@gentoo.org>
11797 * proc-events.c (init_syscall_table): Guard usage os SYS_uuidsys
11800 2018-04-29 John Reiser <jreiser@BitWagon.com>
11803 * gdb/Makefile.in: (.c:.l, .c:.y): Write the target only in the
11804 last step, and do it atomically.
11806 2018-04-27 Alexandre Oliva <aoliva@redhat.com>
11808 * compile/compile-c-types.c (convert_int, convert_float):
11809 Update for C FE v1.
11811 2018-04-27 Tom Tromey <tom@tromey.com>
11814 * rust-lang.c (rust_inclusive_range_type_p): New function.
11815 (rust_range): Handle inclusive ranges.
11816 (rust_compute_range): Likewise.
11817 * rust-exp.y (struct rust_op) <inclusive>: New field.
11818 (DOTDOTEQ): New constant.
11819 (range_expr): Add "..=" productions.
11820 (operator_tokens): Add "..=" token.
11821 (ast_range): Add "inclusive" parameter.
11822 (convert_ast_to_expression) <case OP_RANGE>: Handle inclusive
11824 * parse.c (operator_length_standard) <case OP_RANGE>: Handle new
11826 * expression.h (enum range_type) <NONE_BOUND_DEFAULT_EXCLUSIVE,
11827 LOW_BOUND_DEFAULT_EXCLUSIVE>: New constants.
11829 * expprint.c (print_subexp_standard): Handle new bounds values.
11830 (dump_subexp_body_standard): Likewise.
11832 2018-04-27 Tom Tromey <tom@tromey.com>
11834 * configure: Rebuild.
11835 * warning.m4 (AM_GDB_WARNINGS): Add -Wsuggest-override.
11836 * dwarf2loc.c (class dwarf_evaluate_loc_desc): Use "override", not
11838 (class symbol_needs_eval_context): Likewise.
11839 * dwarf2read.c (mock_mapped_index::symbol_name_count)
11840 (mock_mapped_index::symbol_name_at): Use "override". Remove
11842 * dwarf2-frame.c (dwarf_expr_executor::get_addr_index): Use
11844 (class dwarf_expr_executor): Use "override", not "OVERRIDE".
11845 * aarch64-tdep.c (instruction_reader::read): Use "override".
11846 (instruction_reader_test::read): Likewise.
11847 * arm-tdep.c (instruction_reader::read): Use "override".
11848 (instruction_reader_thumb::read): Likewise.
11850 2018-04-26 Andrzej Kaczmarek <andrzej.kaczmarek@codecoup.pl>
11853 * remote.c (send_g_packet): Use putpkt/getpkt/packet_check_result
11854 instead of remote_send.
11855 (remote_send): Remove.
11857 2018-04-26 Pedro Alves <palves@redhat.com>
11859 * elfread.c (elf_gnu_ifunc_resolver_return_stop): Use
11860 find_function_start_sal instead of find_pc_line.
11862 2018-04-26 Pedro Alves <palves@redhat.com>
11864 * breakpoint.c (set_breakpoint_location_function): Handle
11865 mst_data_gnu_ifunc.
11866 * c-exp.y (variable production): Handle mst_data_gnu_ifunc.
11867 * elfread.c (elf_symtab_read): Give data symbols with
11868 BSF_GNU_INDIRECT_FUNCTION set mst_data_gnu_ifunc type.
11869 (elf_rel_plt_read): Update comment.
11870 * linespec.c (convert_linespec_to_sals): Handle
11871 mst_data_gnu_ifunc.
11872 (minsym_found): Handle mst_data_gnu_ifunc.
11873 * minsyms.c (msymbol_is_function, minimal_symbol_reader::record)
11874 (find_solib_trampoline_target): Handle mst_data_gnu_ifunc.
11875 * parse.c (find_minsym_type_and_address): Handle
11876 mst_data_gnu_ifunc.
11877 * symmisc.c (dump_msymbols): Handle mst_data_gnu_ifunc.
11878 * symtab.c (find_gnu_ifunc): Handle mst_data_gnu_ifunc.
11879 * symtab.h (minimal_symbol_type) <mst_text_gnu_ifunc>: Update
11881 <mst_data_gnu_ifunc>: New enumerator.
11883 2018-04-26 Pedro Alves <palves@redhat.com>
11885 * minsyms.c (lookup_minimal_symbol_by_pc_section_1): Rename to ...
11886 (lookup_minimal_symbol_by_pc_section): ... this. Replace
11887 'want_trampoline' parameter by a lookup_msym_prefer parameter.
11889 (lookup_minimal_symbol_by_pc_section): Delete old implementation.
11890 (lookup_minimal_symbol_by_pc): Adjust.
11891 (in_gnu_ifunc_stub): Prefer GNU ifunc symbols.
11892 (lookup_solib_trampoline_symbol_by_pc): Adjust.
11893 * minsyms.h (lookup_msym_prefer): New enum.
11894 (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
11895 parameter by a lookup_msym_prefer parameter.
11897 2018-04-26 Pedro Alves <palves@redhat.com>
11899 * elfread.c (elf_gnu_ifunc_record_cache): Check if the symbol name
11900 ends in "@plt" instead of looking at the symbol's section.
11902 2018-04-26 Pedro Alves <palves@redhat.com>
11904 * blockframe.c (cache_pc_function_is_gnu_ifunc): Delete. Remove
11906 (find_pc_partial_function_gnu_ifunc): Rename to ...
11907 (find_pc_partial_function): ... this, and remove references to
11909 (find_pc_partial_function): Delete old implementation.
11910 * symtab.h (find_pc_partial_function_gnu_ifunc): Delete.
11912 2018-04-26 Pedro Alves <palves@redhat.com>
11914 * linespec.c (struct bound_minimal_symbol_search_key): New.
11915 (convert_linespec_to_sals): Sort minimal symbols earlier. Don't
11916 skip first line if we found a GNU ifunc minimal symbol by name.
11917 (compare_msymbols): Change parameters to work with a destructured
11919 (compare_msymbols_for_qsort, compare_msymbols_for_bsearch): New
11922 2018-04-26 Pedro Alves <palves@redhat.com>
11924 * breakpoint.c (set_breakpoint_location_function): Don't resolve
11925 ifunc targets here. Instead, if we have an ifunc minsym, use its
11927 (add_location_to_breakpoint): Store the minsym and the objfile in
11928 the breakpoint location.
11929 * breakpoint.h (bp_location) <msymbol, objfile>: New fields.
11930 * linespec.c (minsym_found): Resolve GNU ifunc targets here.
11931 Record the minsym in the sal.
11932 * symtab.h (symtab_and_line) <msymbol>: New field.
11934 2018-04-26 Pedro Alves <palves@redhat.com>
11936 * elfread.c (elf_gnu_ifunc_resolve_by_got): Don't write to *ADDR_P
11937 unless we actually resolved the ifunc.
11939 2018-04-26 Pedro Alves <palves@redhat.com>
11941 * c-exp.y (variable production): Prefer ifunc minsyms over
11942 regular function symbols.
11943 * symtab.c (find_gnu_ifunc): New function.
11944 * minsyms.h (lookup_msym_prefer): New enum.
11945 (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
11946 parameter by a lookup_msym_prefer parameter.
11947 * symtab.h (find_gnu_ifunc): New declaration.
11949 2018-04-26 Pedro Alves <palves@redhat.com>
11951 * blockframe.c (find_gnu_ifunc_target_type): New function.
11952 (find_function_type): New.
11953 * eval.c (evaluate_var_msym_value): For GNU ifunc types, always
11954 return a value with a memory address.
11955 (eval_call): For calls to GNU ifunc functions, try to find the
11956 type of the target function from the type that the resolver
11958 * gdbtypes.c (objfile_type): Don't install a return type for ifunc
11960 * infcall.c (find_function_return_type): Delete.
11961 (find_function_addr): Add 'function_type' parameter. For calls to
11962 GNU ifunc functions, try to find the type of the target function
11963 from the type that the resolver returns, and return it via
11965 (call_function_by_hand_dummy): Adjust to use the function type
11966 returned by find_function_addr.
11967 (find_function_addr): Add 'function_type' parameter and move
11969 * symtab.h (find_function_type, find_gnu_ifunc_target_type): New
11972 2018-04-26 Pedro Alves <palves@redhat.com>
11974 * c-exp.y (variable production): Skip finding an alias for ifunc
11977 2018-04-26 Pedro Alves <palves@redhat.com>
11979 * elfread.c (elf_rel_plt_read): Look for relocations for .got.plt too.
11981 2018-04-25 Pedro Alves <palves@redhat.com>
11983 * infcmd.c (kill_command): Print the pid as string, not the whole
11984 thread's ptid. Add comment. s/has been killed/killed/ in output
11986 * remote.c (remote_detach_1): Print the pid as string, not the
11987 whole thread's ptid.
11989 2018-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
11990 Sergio Durigan Junior <sergiodj@redhat.com>
11991 Pedro Alves <palves@redhat.com>
11993 * infcmd.c (kill_command): Print message when inferior has
11995 * inferior.c (print_inferior_events): Remove 'static'. Set as
11997 (add_inferior): Improve message printed when
11998 'print_inferior_events' is on.
11999 (exit_inferior): Remove message printed when
12000 'print_inferior_events' is on.
12001 (detach_inferior): Improve message printed when
12002 'print_inferior_events' is on.
12003 (initialize_inferiors): Use 'add_inferior_silent' to set
12004 'current_inferior_'.
12005 * inferior.h (print_inferior_events): Declare here as
12007 * infrun.c (follow_fork_inferior): Print '[Attaching...]' or
12008 '[Detaching...]' messages when 'print_inferior_events' is on.
12009 Use 'add_thread_silent' instead of 'add_thread'. Add '[' and ']'
12010 as prefix/suffix for messages. Remove periods. Fix erroneous
12011 'Detaching after fork from child...', replace it by '... from
12013 (handle_vfork_child_exec_or_exit): Add '[' and ']' as
12014 prefix/suffix when printing 'Detaching...' messages. Print
12015 them when 'print_inferior_events' is on.
12016 * remote.c (remote_detach_1): Print message when detaching
12017 from inferior and '!is_fork_parent'.
12019 2018-04-24 Tom Tromey <tom@tromey.com>
12021 * cli-out.h: Reindent.
12023 2018-04-24 Tom Tromey <tom@tromey.com>
12025 * cli-out.c (cli_ui_out::out_field_fmt): Remove.
12026 (cli_ui_out::do_field_string): Use fputs_filtered.
12027 * cli-out.h (class cli_ui_out) <out_field_fmt>: Remove.
12029 2018-04-23 Tom Tromey <tom@tromey.com>
12031 * guile/scm-frame.c (gdbscm_frame_read_var): Use
12032 gdb::unique_xmalloc_ptr.
12034 2018-04-23 Tom Tromey <tom@tromey.com>
12036 * configure: Rebuild.
12038 2018-04-22 Rajendra SY <rajendra.sy@gmail.com>
12041 * gdb/testsuite/gdb.base/break-probes.exp: Pass shlib_load to
12042 prepare_for_testing. Set normal_bp to r_debug_state if target
12045 2018-04-21 Pedro Alves <palves@redhat.com>
12046 Rajendra SY <rajendra.sy@gmail.com>
12048 * inf-ptrace.c (inf_ptrace_attach): Mark the thread as executing.
12049 * remote.c (extended_remote_attach): In all-stop mode, mark the
12050 thread as executing.
12052 2018-04-19 Philippe Waroquiers <philippe.waroquiers@skynet.be>
12054 * thread.c (thread_apply_all_command): Fix comment.
12055 (thread_command): Fix comment.
12057 2018-04-10 Alan Hayward <alan.hayward@arm.com>
12059 * common/tdesc.h (tdesc_create_feature): Remove xml filename
12061 * features/aarch64-core.c (create_feature_aarch64_core):
12063 * features/aarch64-fpu.c (create_feature_aarch64_fpu):
12065 * features/i386/32bit-avx.c (create_feature_i386_32bit_avx):
12067 * features/i386/32bit-avx512.c
12068 (create_feature_i386_32bit_avx512): Likewise.
12069 * features/i386/32bit-core.c (create_feature_i386_32bit_core):
12071 * features/i386/32bit-linux.c (create_feature_i386_32bit_linux):
12073 * features/i386/32bit-mpx.c (create_feature_i386_32bit_mpx):
12075 * features/i386/32bit-pkeys.c (create_feature_i386_32bit_pkeys):
12077 * features/i386/32bit-sse.c (create_feature_i386_32bit_sse):
12079 * features/i386/64bit-avx.c (create_feature_i386_64bit_avx):
12081 * features/i386/64bit-avx512.c
12082 (create_feature_i386_64bit_avx512): Likewise.
12083 * features/i386/64bit-core.c (create_feature_i386_64bit_core):
12085 * features/i386/64bit-linux.c (create_feature_i386_64bit_linux):
12087 * features/i386/64bit-mpx.c (create_feature_i386_64bit_mpx):
12089 * features/i386/64bit-pkeys.c (create_feature_i386_64bit_pkeys):
12091 * features/i386/64bit-segments.c
12092 (create_feature_i386_64bit_segments): Likewise.
12093 * features/i386/64bit-sse.c (create_feature_i386_64bit_sse):
12095 * features/i386/x32-core.c
12096 (create_feature_i386_x32_core): Likewise.
12097 * features/tic6x-c6xp.c (create_feature_tic6x_c6xp): Likewise.
12098 * features/tic6x-core.c (create_feature_tic6x_core): Likewise.
12099 * features/tic6x-gp.c (create_feature_tic6x_gp): Likewise.
12100 * target-descriptions.c: In generated code, don't pass xml
12103 2018-04-18 Alan Hayward <alan.hayward@arm.com>
12105 * common/tdesc.c (print_xml_feature::visit_pre): Add xml parsing.
12106 (print_xml_feature::visit_post): Likewise.
12107 (print_xml_feature::visit): Likewise.
12108 * common/tdesc.h (tdesc_get_features_xml): Use const tdesc.
12109 (print_xml_feature): Add new class.
12110 * regformats/regdat.sh: Null xmltarget on feature targets.
12111 * target-descriptions.c (struct target_desc): Add xmltarget.
12112 (maintenance_check_tdesc_xml_convert): Add unittest function.
12113 (tdesc_get_features_xml): Add function to get xml.
12114 (maintenance_check_xml_descriptions): Test xml generation.
12115 * xml-tdesc.c (string_read_description_xml): Add function.
12116 * xml-tdesc.h (string_read_description_xml): Add declaration.
12118 2018-04-18 Alan Hayward <alan.hayward@arm.com>
12120 * features/Makefile: Add feature marker to targets with new style
12121 target descriptions.
12122 * regformats/aarch64.dat: Regenerate.
12123 * regformats/i386/amd64-avx-avx512-linux.dat: Likewise.
12124 * regformats/i386/amd64-avx-linux.dat: Likewise.
12125 * regformats/i386/amd64-avx-mpx-avx512-pku-linux.dat: Likewise.
12126 * regformats/i386/amd64-avx-mpx-linux.dat: Likewise.
12127 * regformats/i386/amd64-linux.dat: Likewise.
12128 * regformats/i386/amd64-mpx-linux.dat: Likewise.
12129 * regformats/i386/amd64.dat: Likewise.
12130 * regformats/i386/i386-avx-avx512-linux.dat: Likewise.
12131 * regformats/i386/i386-avx-linux.dat: Likewise.
12132 * regformats/i386/i386-avx-mpx-avx512-pku-linux.dat: Likewise.
12133 * regformats/i386/i386-avx-mpx-linux.dat: Likewise.
12134 * regformats/i386/i386-linux.dat: Likewise.
12135 * regformats/i386/i386-mmx-linux.dat: Likewise.
12136 * regformats/i386/i386-mpx-linux.dat: Likewise.
12137 * regformats/i386/i386.dat: Likewise.
12138 * regformats/i386/x32-avx-avx512-linux.dat: Likewise.
12139 * regformats/i386/x32-avx-linux.dat: Likewise.
12140 * regformats/i386/x32-linux.dat: Likewise.
12141 * regformats/tic6x-c62x-linux.dat: Likewise.
12142 * regformats/tic6x-c64x-linux.dat: Likewise.
12143 * regformats/tic6x-c64xp-linux.dat: Likewise.
12144 * regformats/regdat.sh: Parse feature marker.
12146 2018-04-18 Alan Hayward <alan.hayward@arm.com>
12148 * common/tdesc.h (tdesc_architecture_name): Add new declaration.
12149 (tdesc_osabi_name): Likewise.
12150 * target-descriptions.c (tdesc_architecture_name): Add new
12152 (tdesc_osabi_name): Likewise.
12154 2018-04-18 Alan Hayward <alan.hayward@arm.com>
12156 * common/tdesc.c (tdesc_predefined_type): Move to here.
12157 (tdesc_named_type): Likewise.
12158 (tdesc_create_vector): Likewise.
12159 (tdesc_create_struct): Likewise.
12160 (tdesc_set_struct_size): Likewise.
12161 (tdesc_create_union): Likewise.
12162 (tdesc_create_flags): Likewise.
12163 (tdesc_create_enum): Likewise.
12164 (tdesc_add_field): Likewise.
12165 (tdesc_add_typed_bitfield): Likewise.
12166 (tdesc_add_bitfield): Likewise.
12167 (tdesc_add_flag): Likewise.
12168 (tdesc_add_enum_value): Likewise.
12169 * common/tdesc.h (struct tdesc_type_builtin): Likewise.
12170 (struct tdesc_type_vector): Likewise.
12171 (struct tdesc_type_field): Likewise.
12172 (struct tdesc_type_with_fields): Likewise.
12173 (tdesc_create_enum): Add declaration.
12174 (tdesc_add_typed_bitfield): Likewise.
12175 (tdesc_add_enum_value): Likewise.
12176 * target-descriptions.c (tdesc_type_field): Move from here.
12177 (tdesc_type_builtin): Likewise.
12178 (tdesc_type_vector): Likewise.
12179 (tdesc_type_with_fields): Likewise.
12180 (tdesc_predefined_types): Likewise.
12181 (tdesc_named_type): Likewise.
12182 (tdesc_create_vector): Likewise.
12183 (tdesc_create_struct): Likewise.
12184 (tdesc_set_struct_size): Likewise.
12185 (tdesc_create_union): Likewise.
12186 (tdesc_create_flags): Likewise.
12187 (tdesc_create_enum): Likewise.
12188 (tdesc_add_field): Likewise.
12189 (tdesc_add_typed_bitfield): Likewise.
12190 (tdesc_add_bitfield): Likewise.
12191 (tdesc_add_flag): Likewise.
12192 (tdesc_add_enum_value): Likewise.
12193 * gdb/target-descriptions.h (tdesc_create_enum): Likewise.
12194 (tdesc_add_typed_bitfield): Likewise.
12195 (tdesc_add_enum_value): Likewise.
12197 2018-04-18 Alan Hayward <alan.hayward@arm.com>
12199 * common/tdesc.c (tdesc_feature::accept): Move to here.
12200 (tdesc_feature::operator==): Likewise.
12201 (tdesc_create_reg): Likewise.
12202 * common/tdesc.h (tdesc_type_kind): Likewise.
12203 (struct tdesc_type): Likewise.
12204 (struct tdesc_feature): Likewise.
12205 * regformats/regdat.sh: Create a feature.
12206 * target-descriptions.c (tdesc_type_kind): Move from here.
12207 (tdesc_type): Likewise.
12208 (tdesc_type_up): Likewise.
12209 (tdesc_feature): Likewise.
12210 (tdesc_create_reg): Likewise.
12212 2018-04-18 Alan Hayward <alan.hayward@arm.com>
12214 * Makefile.in: Add arch/tdesc.c
12215 * common/tdesc.c: New file.
12216 * common/tdesc.h (tdesc_element_visitor): Move to here.
12217 (tdesc_element): Likewise.
12218 (tdesc_reg): Likewise.
12219 (tdesc_reg_up): Likewise.
12220 * regformats/regdef.h (reg): Add offset to constructors.
12221 * target-descriptions.c (tdesc_element_visitor): Move from here.
12222 (tdesc_element): Likewise.
12223 (tdesc_reg): Likewise.
12224 (tdesc_reg_up): Likewise.
12226 2018-04-17 Tom Tromey <tom@tromey.com>
12228 * dwarf2read.c (quirk_rust_enum): Conditionally drop the
12229 discriminant field.
12231 2018-04-17 Tom Tromey <tom@tromey.com>
12233 * dwarf2read.c (quirk_rust_enum): Handle unions correctly.
12235 2018-04-17 Andreas Arnez <arnez@linux.vnet.ibm.com>
12237 * symtab.c (print_symbol_info): Skip printing filename and line
12238 number when `last' is NULL.
12239 (symtab_symbol_info): Use empty string instead of NULL for first
12240 invocation of print_symbol_info.
12241 (rbreak_command): Pass NULL to `last' parameter of
12244 2018-04-16 Simon Marchi <simon.marchi@ericsson.com>
12246 * linux-tdep.c (linux_spu_make_corefile_notes): Return note_data
12247 instead of nullptr.
12249 2018-04-16 Pedro Alves <palves@redhat.com>
12251 * MAINTAINERS (sh): Remove.
12252 * Makefile.in (ALL_TARGET_OBS): Remove sh64-tdep.o.
12253 (HFILES_NO_SRCDIR): Remove sh64-tdep.h.
12254 (ALLDEPFILES): Remove sh64-tdep.c.
12255 * NEWS: Mentions that support for SH-5/SH64 is removed.
12256 * configure.tgt (sh*-*-linux*): Remove reference to sh64-tdep.o.
12257 (sh*-*-openbsd*): Ditto.
12258 (sh64-*-elf*): Remove.
12260 * regcache.c (cooked_write_test): Remove bfd_mach_sh5 case.
12261 * sh-linux-tdep.c: Remove reference to bfd_mach_sh5.
12262 * sh-tdep.c: No longer include "sh64-tdep.h".
12263 (sh_gdbarch_init): Remove reference to bfd_mach_sh5.
12264 * sh64-tdep.c, sh64-tdep.h: Remove files.
12266 2018-04-16 Pedro Alves <palves@redhat.com>
12268 * MAINTAINERS: Remove m88k.
12269 * Makefile.in (ALL_TARGET_OBS): Remove m88k-tdep.o.
12270 (HFILES_NO_SRCDIR): Remove m88k-tdep.h.
12271 (ALLDEPFILES): Remove m88k-bsd-nat.c and m88k-tdep.c.
12272 * NEWS: Mention that support for m88k was removed.
12273 * configure.host (m88*-*-*): Remove support.
12274 * configure.nat (m88k-*-*): Remove support.
12275 * configure.tgt (m88*-*-openbsd*): Remove.
12276 * m88k-bsd-nat.c, m88k-tdep.c, m88k-tdep.h: Delete.
12278 2018-04-15 Simon Marchi <simon.marchi@polymtl.ca>
12280 * configure.tgt (x86_tobjs): New variable.
12281 (amd64_tobjs, i386_tobjs): Use it.
12283 2018-04-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
12285 * symtab.c (print_symbol_info): Precede the symbol definition by
12286 the line number when available.
12287 * NEWS: Advertise this enhancement.
12289 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
12291 * NEWS (New options): announce set/show record btrace cpu.
12292 * btrace.c: Include record-btrace.h.
12293 (btrace_compute_ftrace_pt): Skip enabling errata workarounds if
12294 the vendor is unknown.
12295 (btrace_compute_ftrace_1): Add cpu parameter. Update callers.
12296 Maybe overwrite the btrace configuration's cpu.
12297 (btrace_compute_ftrace): Add cpu parameter. Update callers.
12298 (btrace_fetch): Add cpu parameter. Update callers.
12299 (btrace_maint_update_pt_packets): Call record_btrace_get_cpu.
12300 Maybe overwrite the btrace configuration's cpu. Skip enabling
12301 errata workarounds if the vendor is unknown.
12302 * python/py-record-btrace.c: Include record-btrace.h.
12303 (recpy_bt_begin, recpy_bt_end, recpy_bt_instruction_history)
12304 (recpy_bt_function_call_history): Call record_btrace_get_cpu.
12305 * record-btrace.c (record_btrace_cpu_state_kind): New.
12306 (record_btrace_cpu): New.
12307 (set_record_btrace_cpu_cmdlist): New.
12308 (record_btrace_get_cpu): New.
12309 (require_btrace_thread, record_btrace_info)
12310 (record_btrace_resume_thread): Call record_btrace_get_cpu.
12311 (cmd_set_record_btrace_cpu_none): New.
12312 (cmd_set_record_btrace_cpu_auto): New.
12313 (cmd_set_record_btrace_cpu): New.
12314 (cmd_show_record_btrace_cpu): New.
12315 (_initialize_record_btrace): Initialize set/show record btrace cpu
12317 * record-btrace.h (record_btrace_get_cpu): New.
12319 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
12321 * record.c (set_record_command): Fix typo in message.
12323 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
12325 * record-btrace.c (cmd_set_record_btrace): Print sub-commands.
12327 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
12329 * infrun.c (process_event_stop_test): Call
12330 gdbarch_in_indirect_branch_thunk.
12331 * gdbarch.sh (in_indirect_branch_thunk): New.
12332 * gdbarch.c: Regenerated.
12333 * gdbarch.h: Regenerated.
12336 * Makefile.in (ALL_TARGET_OBS): Add x86-tdep.o.
12337 (HFILES_NO_SRCDIR): Add x86-tdep.h.
12338 (ALLDEPFILES): Add x86-tdep.c.
12339 * arch-utils.h (default_in_indirect_branch_thunk): New.
12340 * arch-utils.c (default_in_indirect_branch_thunk): New.
12341 * i386-tdep: Include x86-tdep.h.
12342 (i386_in_indirect_branch_thunk): New.
12343 (i386_elf_init_abi): Set in_indirect_branch_thunk gdbarch
12345 * amd64-tdep: Include x86-tdep.h.
12346 (amd64_in_indirect_branch_thunk): New.
12347 (amd64_init_abi): Set in_indirect_branch_thunk gdbarch function.
12349 2018-04-12 Jan Kratochvil <jan.kratochvil@redhat.com>
12352 * dwarf-index-write.c (data_buf::grow) (write_one_signatured_type)
12353 (recursively_write_psymbols) (debug_names::recursively_write_psymbols)
12354 (debug_names::write_one_signatured_type): Fix -D_GLIBCXX_DEBUG
12357 2018-04-12 Tom Tromey <tom@tromey.com>
12359 * rust-lang.c (rust_print_struct_def): Remove univariant code.
12360 (rust_evaluate_subexp): Likewise.
12362 2018-04-12 Pedro Alves <palves@redhat.com>
12364 * procfs.c (procfs_detach): Make forward declaration's prototype
12365 match definition's protototype.
12366 (proc_get_LDT_entry): Remove stale do_cleanups call.
12368 2018-04-12 Pedro Alves <palves@redhat.com>
12370 * target.h (target_ops::to_has_exited): Delete.
12371 (target_has_exited): Delete.
12372 * target-delegates.c: Regenerate.
12374 2018-04-11 Pedro Alves <palves@redhat.com>
12376 * target.c (fileio_fh_t::t): Add comment.
12377 (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
12378 (target_fileio_close): Handle a NULL target.
12379 (invalidate_fileio_fh): New.
12380 (target_close): Call it.
12381 * remote.c (remote_hostio_send_command): No longer check whether
12382 remote_desc is open.
12384 2018-04-11 Pedro Alves <palves@redhat.com>
12386 * target.c (fileio_fh_t): Make it a named struct instead of a
12388 (fileio_fh_t::is_closed): New method.
12389 (DEF_VEC_O (fileio_fh_t)): Remove.
12390 (fileio_fhandles): Now a std::vector.
12391 (is_closed_fileio_fh): Delete.
12392 (acquire_fileio_fd): Adjust. Rename parameters.
12393 (release_fileio_fd): Adjust.
12394 (fileio_fd_to_fh): Reimplement as a function instead of a macro.
12395 (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
12396 (target_fileio_close): Adjust.
12398 2018-04-10 Simon Marchi <simon.marchi@ericsson.com>
12400 * auto-load.c (auto_load_safe_path_vec_update): Iterate by
12403 2018-04-10 Pedro Alves <palves@redhat.com>
12405 * gdbthread.h (finish_thread_state_cleanup): Delete declaration.
12406 (scoped_finish_thread_state): New class.
12407 * infcmd.c (run_command_1): Use it instead of finish_thread_state
12409 * infrun.c (proceed, prepare_for_detach, wait_for_inferior)
12410 (fetch_inferior_event, normal_stop): Likewise.
12411 * thread.c (finish_thread_state_cleanup): Delete.
12413 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
12414 Pedro Alves <palves@redhat.com>
12416 * value.c: Include "selftest.h" and "common/array-view.h".
12417 (struct range) <operator ==>: New.
12418 (test_ranges_contain): New.
12419 (check_ranges_vector): New.
12420 (test_insert_into_bit_range_vector): New.
12421 (_initialize_values): Register selftests.
12422 * common/array-view.h (operator==, operator!=): New.
12424 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
12426 * common/gdb_vecs.h (unordered_remove): Add overload that takes
12428 * inline-frame.c: Include <algorithm>.
12429 (struct inline_state): Add constructor.
12430 (inline_state_s): Remove.
12431 (DEF_VEC_O(inline_state_s)): Remove.
12432 (inline_states): Change type to std::vector.
12433 (find_inline_frame_state): Adjust to std::vector.
12434 (allocate_inline_frame_state): Remove.
12435 (clear_inline_frame_state): Adjust to std::vector.
12436 (skip_inline_frames): Adjust to std::vector.
12438 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
12440 * tracepoint.h (struct trace_state_variable): Add constructor.
12441 <name>: Change type to std::string.
12442 * tracepoint.c (tsv_s): Remove.
12443 (DEF_VEC_O(tsv_s)): Remove.
12444 (tvariables): Change to std::vector.
12445 (create_trace_state_variable): Adjust to std::vector.
12446 (find_trace_state_variable): Likewise.
12447 (find_trace_state_variable_by_number): Likewise.
12448 (delete_trace_state_variable): Likewise.
12449 (trace_variable_command): Adjust to std::string.
12450 (delete_trace_variable_command): Likewise.
12451 (tvariables_info_1): Adjust to std::vector.
12452 (save_trace_state_variables): Likewise.
12453 (start_tracing): Likewise.
12454 (merge_uploaded_trace_state_variables): Adjust to std::vector
12456 * target.h (struct target_ops)
12457 <to_download_trace_state_variable>: Pass reference to
12458 trace_state_variable.
12459 * target-debug.h (target_debug_print_const_trace_state_variable_r): New.
12460 * target-delegates.c: Re-generate.
12461 * mi/mi-interp.c (mi_tsv_created): Adjust to std::string.
12462 (mi_tsv_deleted): Likewise.
12463 * mi/mi-main.c (mi_cmd_trace_frame_collected): Likewise.
12464 * remote.c (remote_download_trace_state_variable): Change
12465 pointer to reference and adjust.
12466 * make-target-delegates (parse_argtypes): Handle references.
12467 (write_function_header): Likewise.
12468 (munge_type): Likewise.
12470 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
12472 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
12473 string_view-selftests.c.
12474 * unittests/basic_string_view/capacity/1.cc: Adapt to GDB
12476 * unittests/basic_string_view/cons/char/1.cc: Likewise.
12477 * unittests/basic_string_view/cons/char/2.cc: Likewise.
12478 * unittests/basic_string_view/cons/char/3.cc: Likewise.
12479 * unittests/basic_string_view/element_access/char/1.cc:
12481 * unittests/basic_string_view/element_access/char/empty.cc:
12483 * unittests/basic_string_view/element_access/char/front_back.cc:
12485 * unittests/basic_string_view/inserters/char/2.cc: Likewise.
12486 * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc:
12488 * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc:
12490 * unittests/basic_string_view/modifiers/swap/char/1.cc:
12492 * unittests/basic_string_view/operations/compare/char/1.cc:
12494 * unittests/basic_string_view/operations/compare/char/13650.cc:
12496 * unittests/basic_string_view/operations/copy/char/1.cc:
12498 * unittests/basic_string_view/operations/data/char/1.cc:
12500 * unittests/basic_string_view/operations/find/char/1.cc:
12502 * unittests/basic_string_view/operations/find/char/2.cc:
12504 * unittests/basic_string_view/operations/find/char/3.cc:
12506 * unittests/basic_string_view/operations/find/char/4.cc:
12508 * unittests/basic_string_view/operations/rfind/char/1.cc:
12510 * unittests/basic_string_view/operations/rfind/char/2.cc:
12512 * unittests/basic_string_view/operations/rfind/char/3.cc:
12514 * unittests/basic_string_view/operations/substr/char/1.cc:
12516 * unittests/basic_string_view/operators/char/2.cc: Likewise.
12517 * unittests/string_view-selftests.c: New file.
12519 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
12521 * unittests/basic_string_view/capacity/1.cc: New file.
12522 * unittests/basic_string_view/capacity/empty_neg.cc: New file.
12523 * unittests/basic_string_view/cons/char/1.cc: New file.
12524 * unittests/basic_string_view/cons/char/2.cc: New file.
12525 * unittests/basic_string_view/cons/char/3.cc: New file.
12526 * unittests/basic_string_view/cons/wchar_t/1.cc: New file.
12527 * unittests/basic_string_view/cons/wchar_t/2.cc: New file.
12528 * unittests/basic_string_view/cons/wchar_t/3.cc: New file.
12529 * unittests/basic_string_view/element_access/char/1.cc: New file.
12530 * unittests/basic_string_view/element_access/char/2.cc: New file.
12531 * unittests/basic_string_view/element_access/char/empty.cc: New file.
12532 * unittests/basic_string_view/element_access/char/front_back.cc: New file.
12533 * unittests/basic_string_view/element_access/wchar_t/1.cc: New file.
12534 * unittests/basic_string_view/element_access/wchar_t/2.cc: New file.
12535 * unittests/basic_string_view/element_access/wchar_t/empty.cc: New file.
12536 * unittests/basic_string_view/element_access/wchar_t/front_back.cc: New file.
12537 * unittests/basic_string_view/include.cc: New file.
12538 * unittests/basic_string_view/inserters/char/1.cc: New file.
12539 * unittests/basic_string_view/inserters/char/2.cc: New file.
12540 * unittests/basic_string_view/inserters/char/3.cc: New file.
12541 * unittests/basic_string_view/inserters/pod/10081-out.cc: New file.
12542 * unittests/basic_string_view/inserters/wchar_t/1.cc: New file.
12543 * unittests/basic_string_view/inserters/wchar_t/2.cc: New file.
12544 * unittests/basic_string_view/inserters/wchar_t/3.cc: New file.
12545 * unittests/basic_string_view/literals/types.cc: New file.
12546 * unittests/basic_string_view/literals/values.cc: New file.
12547 * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc: New file.
12548 * unittests/basic_string_view/modifiers/remove_prefix/wchar_t/1.cc: New file.
12549 * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc: New file.
12550 * unittests/basic_string_view/modifiers/remove_suffix/wchar_t/1.cc: New file.
12551 * unittests/basic_string_view/modifiers/swap/char/1.cc: New file.
12552 * unittests/basic_string_view/modifiers/swap/wchar_t/1.cc: New file.
12553 * unittests/basic_string_view/operations/compare/char/1.cc: New file.
12554 * unittests/basic_string_view/operations/compare/char/13650.cc: New file.
12555 * unittests/basic_string_view/operations/compare/char/2.cc: New file.
12556 * unittests/basic_string_view/operations/compare/char/70483.cc: New file.
12557 * unittests/basic_string_view/operations/compare/wchar_t/1.cc: New file.
12558 * unittests/basic_string_view/operations/compare/wchar_t/13650.cc: New file.
12559 * unittests/basic_string_view/operations/compare/wchar_t/2.cc: New file.
12560 * unittests/basic_string_view/operations/copy/char/1.cc: New file.
12561 * unittests/basic_string_view/operations/copy/wchar_t/1.cc: New file.
12562 * unittests/basic_string_view/operations/data/char/1.cc: New file.
12563 * unittests/basic_string_view/operations/data/wchar_t/1.cc: New file.
12564 * unittests/basic_string_view/operations/find/char/1.cc: New file.
12565 * unittests/basic_string_view/operations/find/char/2.cc: New file.
12566 * unittests/basic_string_view/operations/find/char/3.cc: New file.
12567 * unittests/basic_string_view/operations/find/char/4.cc: New file.
12568 * unittests/basic_string_view/operations/find/wchar_t/1.cc: New file.
12569 * unittests/basic_string_view/operations/find/wchar_t/2.cc: New file.
12570 * unittests/basic_string_view/operations/find/wchar_t/3.cc: New file.
12571 * unittests/basic_string_view/operations/find/wchar_t/4.cc: New file.
12572 * unittests/basic_string_view/operations/rfind/char/1.cc: New file.
12573 * unittests/basic_string_view/operations/rfind/char/2.cc: New file.
12574 * unittests/basic_string_view/operations/rfind/char/3.cc: New file.
12575 * unittests/basic_string_view/operations/rfind/wchar_t/1.cc: New file.
12576 * unittests/basic_string_view/operations/rfind/wchar_t/2.cc: New file.
12577 * unittests/basic_string_view/operations/rfind/wchar_t/3.cc: New file.
12578 * unittests/basic_string_view/operations/string_conversion/1.cc: New file.
12579 * unittests/basic_string_view/operations/substr/char/1.cc: New file.
12580 * unittests/basic_string_view/operations/substr/wchar_t/1.cc: New file.
12581 * unittests/basic_string_view/operators/char/2.cc: New file.
12582 * unittests/basic_string_view/operators/wchar_t/2.cc: New file.
12583 * unittests/basic_string_view/range_access/char/1.cc: New file.
12584 * unittests/basic_string_view/range_access/wchar_t/1.cc: New file.
12585 * unittests/basic_string_view/requirements/explicit_instantiation/1.cc: New file.
12586 * unittests/basic_string_view/requirements/explicit_instantiation/char/1.cc: New file.
12587 * unittests/basic_string_view/requirements/explicit_instantiation/char16_t/1.cc: New file.
12588 * unittests/basic_string_view/requirements/explicit_instantiation/char32_t/1.cc: New file.
12589 * unittests/basic_string_view/requirements/explicit_instantiation/wchar_t/1.cc: New file.
12590 * unittests/basic_string_view/requirements/typedefs.cc: New file.
12591 * unittests/basic_string_view/typedefs.cc: New file.
12592 * unittests/basic_string_view/types/1.cc: New file.
12594 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
12596 * common/gdb_string_view.h: Remove libstdc++ implementation
12597 details, adjust to gdb reality.
12598 * common/gdb_string_view.tcc: Likewise.
12599 * cli/cli-script.c (struct string_view): Remove.
12600 (user_args) <m_args>: Change element type to gdb::string_view.
12601 (user_args::insert_args): Adjust.
12603 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
12605 * common/gdb_string_view.h: New file.
12606 * common/gdb_string_view.tcc: New file.
12608 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
12610 * ax_cxx_compile_stdcxx.m4: Sync with upstream.
12611 * configure: Re-generate.
12613 2018-04-09 Pedro Alves <palves@redhat.com>
12615 * gdbarch.sh: Include "observable.h" instead of "observer.h".
12616 (set_target_gdbarch): Call
12617 gdb::observers::architecture_changed.notify instead of
12618 observer_notify_architecture_changed.
12620 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
12622 * tracepoint.c (struct current_traceframe_cleanup): Remove.
12623 (do_restore_current_traceframe_cleanup): Remove.
12624 (restore_current_traceframe_cleanup_dtor): Remove.
12625 (make_cleanup_restore_current_traceframe): Remove.
12626 (scoped_restore_current_traceframe::scoped_restore_current_traceframe):
12628 * tracepoint.h (struct scoped_restore_current_traceframe): New.
12629 * infrun.c (fetch_inferior_event): Use
12630 scoped_restore_current_traceframe.
12632 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
12634 * dwarf2read.h (struct dwarf2_per_objfile) <n_type_units>:
12636 <n_allocated_type_units>: Remove.
12637 <all_type_units>: Change to std::vector.
12638 * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
12639 to std::vector change.
12640 (dwarf2_per_objfile::get_cutu): Likewise.
12641 (dwarf2_per_objfile::get_tu): Likewise.
12642 (create_signatured_type_table_from_index): Likewise.
12643 (create_signatured_type_table_from_debug_names): Likewise.
12644 (dw2_symtab_iter_next): Likewise.
12645 (dw2_print_stats): Likewise.
12646 (dw2_expand_all_symtabs): Likewise.
12647 (dw2_expand_marked_cus): Likewise.
12648 (dw2_debug_names_iterator::next): Likewise.
12649 (dwarf2_initialize_objfile): Likewise.
12650 (add_signatured_type_cu_to_table): Likewise.
12651 (create_all_type_units): Likewise.
12652 (add_type_unit): Likewise.
12653 (struct tu_abbrev_offset): Add constructor.
12654 (build_type_psymtabs_1): Adjust to std::vector change.
12655 (print_tu_stats): Likewise.
12656 * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
12657 (write_debug_names): Likewise.
12659 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
12661 * dwarf2read.h (struct dwarf2_per_objfile) <all_comp_units>: Likewise.
12662 Make an std::vector.
12663 <n_comp_units>: Remove.
12664 * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
12665 to std::vector change.
12666 (dwarf2_per_objfile::get_cutu): Likewise.
12667 (dwarf2_per_objfile::get_cu): Likewise.
12668 (create_cus_from_index): Likewise.
12669 (create_addrmap_from_index): Likewise.
12670 (create_addrmap_from_aranges): Likewise.
12671 (dwarf2_read_index): Likewise.
12672 (dw2_find_last_source_symtab): Likewise.
12673 (dw2_map_symtabs_matching_filename): Likewise.
12674 (dw2_symtab_iter_next): Likewise.
12675 (dw2_print_stats): Likewise.
12676 (dw2_expand_all_symtabs): Likewise.
12677 (dw2_expand_symtabs_with_fullname): Likewise.
12678 (dw2_expand_marked_cus): Likewise.
12679 (dw2_map_symbol_filenames): Likewise.
12680 (create_cus_from_debug_names): Likewise.
12681 (dwarf2_read_debug_names): Likewise.
12682 (dw2_debug_names_iterator::next): Likewise.
12683 (dwarf2_initialize_objfile): Likewise.
12684 (set_partial_user): Likewise.
12685 (dwarf2_build_psymtabs_hard): Likewise.
12686 (read_comp_units_from_section): Remove arguments, adjust to
12687 std::vector change.
12688 (create_all_comp_units): Adjust to std::vector and
12689 read_comp_units_from_section changes.
12690 (dwarf2_find_containing_comp_unit): Adjust to std::vector
12692 * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
12693 (psyms_seen_size): Likewise.
12694 (write_gdbindex): Likewise.
12695 (write_debug_names): Likewise.
12697 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
12699 * dwarf2read.c (create_cus_from_index_list): Replace objfile arg
12700 with dwarf2_per_objfile.
12701 (create_cus_from_index): Likewise.
12702 (create_signatured_type_table_from_index): Likewise.
12703 (dwarf2_read_index): Likewise.
12704 (dwarf2_initialize_objfile): Likewise.
12705 (dwarf2_fetch_die_loc_sect_off): Get dwarf2_per_objfile from
12706 per_cu rather than get_dwarf2_per_objfile.
12708 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
12710 * dwarf2read.h (struct signatured_type): Forward declare.
12711 (struct dwarf2_per_objfile) <get_cutu, get_cu, get_tu>:
12713 * dwarf2read.c (dwarf2_per_objfile::get_cutu): Rename from...
12714 (dw2_get_cutu): ...this.
12715 (dwarf2_per_objfile::get_cu): Rename from...
12716 (dw2_get_cu): ...this.
12717 (dwarf2_per_objfile::get_tu): New.
12718 (create_addrmap_from_index): Adjust.
12719 (create_addrmap_from_aranges): Adjust.
12720 (dw2_find_last_source_symtab): Adjust.
12721 (dw2_map_symtabs_matching_filename): Adjust.
12722 (dw2_symtab_iter_next): Adjust.
12723 (dw2_print_stats): Adjust.
12724 (dw2_expand_all_symtabs): Adjust.
12725 (dw2_expand_symtabs_with_fullname): Adjust.
12726 (dw2_expand_marked_cus): Adjust.
12727 (dw_expand_symtabs_matching_file_matcher): Adjust.
12728 (dw2_map_symbol_filenames): Adjust.
12729 (dw2_debug_names_iterator::next): Adjust.
12730 (dwarf2_initialize_objfile): Adjust.
12731 (set_partial_user): Adjust.
12732 (dwarf2_build_psymtabs_hard): Adjust.
12734 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
12736 * dwarf2read.c (create_signatured_type_table_from_debug_names):
12737 Remove unused variables.
12738 (dw2_map_symtabs_matching_filename): Likewise.
12739 (dwarf2_record_block_ranges): Likewise.
12740 (dwarf2_read_addr_index): Likewise.
12741 (follow_die_offset): Likewise.
12743 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
12745 * progspace.c (clone_program_space): Pass SYMFILE_DEFER_BP_RESET
12746 to symbol_file_add_main.
12748 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
12751 * mi/mi-console.c (do_fputc_async_safe): New.
12752 (mi_console_file::write_async_safe): New.
12753 (mi_console_file::flush): Adjust calls to fputstrn_unfiltered.
12754 * mi/mi-console.h (class mi_console_file) <write_async_safe>:
12756 * ui-file.c (ui_file::putstrn): Adjust call to
12757 fputstrn_unfiltered.
12758 * utils.c (printchar): Replace do_fputs and do_fprintf
12759 parameters by do_fputc.
12760 (fputstr_filtered): Adjust call to printchar.
12761 (fputstr_unfiltered): Likewise.
12762 (fputstrn_filtered): Likewise.
12763 (fputstrn_unfiltered): Add do_fputc parameter, pass to
12765 * utils.h (do_fputc_ftype): New typedef.
12766 (fputstrn_unfiltered): Add do_fputc parameter.
12768 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
12770 * regformats/i386/i386-avx.dat: Remove.
12772 2018-04-07 Simon Marchi <simon.marchi@ericsson.com>
12775 * amd64-tdep.c (amd64_none_init_abi): New function.
12776 (amd64_x32_none_init_abi): New function.
12777 (_initialize_amd64_tdep): Register handlers for x86-64 and
12778 x64_32 with GDB_OSABI_NONE.
12779 * osabi.c (gdbarch_init_osabi): Allow running handlers for the
12780 GDB_OSABI_NONE osabi.
12782 2018-04-07 Simon Marchi <simon.marchi@ericsson.com>
12785 * defs.h (enum gdb_osabi): Remove GDB_OSABI_UNINITIALIZED, add
12787 * arch-utils.c (gdbarch_info_init): Don't set info->osabi.
12788 * osabi.c (gdb_osabi_names): Add "unknown" entry.
12790 2018-04-07 Simon Marchi <simon.marchi@ericsson.com>
12792 * common/byte-vector.h (char_vector): New type.
12793 * target.h (target_read_alloc): Return
12794 gdb::optional<byte_vector>.
12795 (target_read_stralloc): Return gdb::optional<char_vector>.
12796 (target_get_osdata): Return gdb::optional<char_vector>.
12797 * target.c (target_read_alloc_1): Templatize. Replacement
12798 manual memory management with vector.
12799 (target_read_alloc): Change return type, adjust.
12800 (target_read_stralloc): Change return type, adjust.
12801 (target_get_osdata): Change return type, adjust.
12802 * auxv.c (struct auxv_info) <length>: Remove.
12803 <data>: Change type to gdb::optional<byte_vector>.
12804 (auxv_inferior_data_cleanup): Free auxv_info with delete.
12805 (get_auxv_inferior_data): Allocate auxv_info with new, adjust.
12806 (target_auxv_search): Adjust.
12807 (fprint_target_auxv): Adjust.
12808 * avr-tdep.c (avr_io_reg_read_command): Adjust.
12809 * linux-tdep.c (linux_spu_make_corefile_notes): Adjust.
12810 (linux_make_corefile_notes): Adjust.
12811 * osdata.c (get_osdata): Adjust.
12812 * remote.c (remote_get_threads_with_qxfer): Adjust.
12813 (remote_memory_map): Adjust.
12814 (remote_traceframe_info): Adjust.
12815 (btrace_read_config): Adjust.
12816 (remote_read_btrace): Adjust.
12817 (remote_pid_to_exec_file): Adjust.
12818 * solib-aix.c (solib_aix_get_library_list): Adjust.
12819 * solib-dsbt.c (decode_loadmap): Don't free buf.
12820 (dsbt_get_initial_loadmaps): Adjust.
12821 * solib-svr4.c (svr4_current_sos_via_xfer_libraries): Adjust.
12822 * solib-target.c (solib_target_current_sos): Adjust.
12823 * tracepoint.c (sdata_make_value): Adjust.
12824 * xml-support.c (xinclude_start_include): Adjust.
12825 (xml_fetch_content_from_file): Adjust.
12826 * xml-support.h (xml_fetch_another): Change return type.
12827 (xml_fetch_content_from_file): Change return type.
12828 * xml-syscall.c (xml_init_syscalls_info): Adjust.
12829 * xml-tdesc.c (file_read_description_xml): Adjust.
12830 (fetch_available_features_from_target): Change return type.
12831 (target_fetch_description_xml): Adjust.
12832 (target_read_description_xml): Adjust.
12834 2018-04-06 Tom Tromey <tom@tromey.com>
12836 * value.c (~value): Update.
12837 (struct value) <contents>: Now unique_xmalloc_ptr.
12838 (value_contents_bits_eq, allocate_value_contents)
12839 (value_contents_raw, value_contents_all_raw)
12840 (value_contents_for_printing, value_contents_for_printing_const)
12841 (set_value_enclosing_type): Update.
12843 2018-04-06 Tom Tromey <tom@tromey.com>
12845 * value.c (range_s): Remove typedef, VEC.
12846 (struct range): Add operator<.
12847 (range_lessthan): Remove.
12848 (ranges_contain): Change type.
12850 (struct value) <unavailable, optimized_out>: Now std::vector.
12851 (value_entirely_available)
12852 (value_entirely_covered_by_range_vector)
12853 (value_entirely_unavailable, value_entirely_optimized_out):
12855 (insert_into_bit_range_vector): Change argument type.
12856 (find_first_range_overlap): Likewise.
12857 (struct ranges_and_idx, value_contents_bits_eq)
12858 (require_not_optimized_out, require_available): Update.
12859 (ranges_copy_adjusted): Change argument types.
12860 (value_optimized_out, value_copy, value_fetch_lazy): Update.
12862 2018-04-06 Tom Tromey <tom@tromey.com>
12864 * value.c (~value): Update.
12865 (struct value) <parent>: Now a value_ref_ptr.
12866 (value_parent, set_value_parent, value_address, value_copy):
12869 2018-04-06 Tom Tromey <tom@tromey.com>
12871 * value.c (struct value): Add constructor, destructor, and member
12873 (allocate_value_lazy, value_decref): Update.
12875 2018-04-06 Tom Tromey <tom@tromey.com>
12877 * value.c (struct value) <released, next>: Remove.
12878 (all_values): Now a std::vector.
12879 (allocate_value_lazy): Update.
12880 (value_next): Remove.
12881 (value_mark, value_free_to_mark, release_value)
12882 (value_release_to_mark): Update.
12884 2018-04-06 Tom Tromey <tom@tromey.com>
12886 * value.h (fetch_subexp_value, value_release_to_mark): Update.
12887 (free_value_chain): Remove.
12888 * value.c (free_value_chain): Remove.
12889 (value_release_to_mark): Return a std::vector.
12890 * ppc-linux-nat.c (num_memory_accesses): Change "chain" to a
12892 (check_condition): Update.
12893 * eval.c (fetch_subexp_value): Change "val_chain" to a
12895 * breakpoint.c (update_watchpoint): Update.
12896 (can_use_hardware_watchpoint): Change "vals" to a std::vector.
12898 2018-04-06 Tom Tromey <tom@tromey.com>
12900 * value.h (free_all_values): Remove.
12901 * value.c (free_all_values): Remove.
12903 2018-04-06 Tom Tromey <tom@tromey.com>
12905 * value.c (VALUE_HISTORY_CHUNK, struct value_history_chunk)
12906 (value_history_chain, value_history_count): Remove.
12907 (value_history): New global.
12908 (record_latest_value, access_value_history, show_values)
12909 (preserve_values): Update.
12911 2018-04-06 Tom Tromey <tom@tromey.com>
12913 * varobj.h (struct varobj) <value>: Now a value_ref_ptr.
12914 * varobj.c (varobj_set_display_format, varobj_set_value)
12915 (install_default_visualizer, construct_visualizer)
12916 (install_new_value, ~varobj, varobj_get_value_type)
12917 (my_value_of_variable, varobj_editable_p): Update.
12918 * c-varobj.c (c_describe_child, c_value_of_variable)
12919 (cplus_number_of_children, cplus_describe_child): Update.
12920 * ada-varobj.c (ada_number_of_children, ada_name_of_child)
12921 (ada_path_expr_of_child, ada_value_of_child, ada_type_of_child)
12922 (ada_value_of_variable, ada_value_is_changeable_p): Update.
12924 2018-04-06 Tom Tromey <tom@tromey.com>
12926 * printcmd.c (last_examine_address): Change type to
12928 (do_examine, x_command): Update.
12930 2018-04-06 Tom Tromey <tom@tromey.com>
12932 * value.c (release_value): Update.
12933 * breakpoint.h (struct watchpoint) <val>: Now a value_ref_ptr.
12934 (struct bpstats) <val>: Now a value_ref_ptr.
12935 * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
12936 (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
12937 (~watchpoint, print_it_watchpoint, watch_command_1)
12938 (invalidate_bp_value_on_memory_change): Update.
12940 2018-04-06 Tom Tromey <tom@tromey.com>
12942 * varobj.c (varobj_clear_saved_item)
12943 (update_dynamic_varobj_children, install_new_value, ~varobj):
12945 * value.h (value_incref): Move declaration earlier.
12946 (value_decref): Rename from value_free.
12947 (struct value_ref_policy): New.
12948 (value_ref_ptr): New typedef.
12949 (struct value_deleter): Remove.
12950 (gdb_value_up): Remove typedef.
12951 (release_value): Change return type.
12952 (release_value_or_incref): Remove.
12953 * value.c (set_value_parent): Update.
12954 (value_incref): Change return type.
12955 (value_decref): Rename from value_free.
12956 (value_free_to_mark, free_all_values, free_value_chain): Update.
12957 (release_value): Return value_ref_ptr.
12958 (release_value_or_incref): Remove.
12959 (record_latest_value, set_internalvar, clear_internalvar):
12961 * stack.c (info_frame_command): Don't call value_free.
12962 * python/py-value.c (valpy_dealloc, valpy_new)
12963 (value_to_value_object): Update.
12964 * printcmd.c (do_examine): Update.
12965 * opencl-lang.c (lval_func_free_closure): Update.
12966 * mi/mi-main.c (register_changed_p): Don't call value_free.
12967 * mep-tdep.c (mep_frame_prev_register): Don't call value_free.
12968 * m88k-tdep.c (m88k_frame_prev_register): Don't call value_free.
12969 * m68hc11-tdep.c (m68hc11_frame_prev_register): Don't call
12971 * guile/scm-value.c (vlscm_free_value_smob)
12972 (vlscm_scm_from_value): Update.
12973 * frame.c (frame_register_unwind, frame_unwind_register_signed)
12974 (frame_unwind_register_unsigned, get_frame_register_bytes)
12975 (put_frame_register_bytes): Don't call value_free.
12976 * findvar.c (address_from_register): Don't call value_free.
12977 * dwarf2read.c (dwarf2_compute_name): Don't call value_free.
12978 * dwarf2loc.c (entry_data_value_free_closure)
12979 (value_of_dwarf_reg_entry, free_pieced_value_closure)
12980 (dwarf2_evaluate_loc_desc_full): Update.
12981 * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
12982 (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
12983 (~watchpoint, watch_command_1)
12984 (invalidate_bp_value_on_memory_change): Update.
12985 * alpha-tdep.c (alpha_register_to_value): Don't call value_free.
12987 2018-04-06 Simon Marchi <simon.marchi@polymtl.ca>
12990 * warning.m4: Add -Wno-error=deprecated-register.
12991 * configure: Re-generate.
12993 2018-04-05 Tom Tromey <tom@tromey.com>
12995 * linespec.h: Remove include of "vec.h".
12997 2018-04-05 Tom Tromey <tom@tromey.com>
12999 * linespec.c (typep): Remove typedef.
13000 (find_methods, find_superclass_methods): Take a std::vector.
13001 (find_method): Use std::vector.
13003 2018-04-05 Tom Tromey <tom@tromey.com>
13005 * utils.c (compare_strings): Remove.
13006 * utils.h (compare_strings): Remove.
13007 * objc-lang.h (find_imps): Update.
13008 * objc-lang.c (find_methods): Take a std::vector.
13009 (uniquify_strings, find_imps): Likewise.
13010 * linespec.c (find_methods): Take a std::vector.
13011 (decode_objc): Use std::vector.
13012 (add_all_symbol_names_from_pspace, find_superclass_methods): Take
13014 (find_method, find_function_symbols): Use std::vector.
13016 2018-04-05 Tom Tromey <tom@tromey.com>
13018 * completer.c (completion_tracker::completion_tracker): Remove
13020 (completion_tracker::discard_completions): Likewise.
13021 * breakpoint.c (ambiguous_names_p): Remove cast.
13022 * ada-lang.c (_initialize_ada_language): Remove cast.
13023 * utils.h (streq): Update.
13024 (streq_hash): Add new declaration.
13025 * utils.c (streq): Return bool.
13026 (streq_hash): New function.
13028 2018-04-05 Tom Tromey <tom@tromey.com>
13030 * linespec.c (event_location_to_sals) <case ADDRESS_LOCATION>:
13031 Remove a string copy.
13033 2018-04-05 Tom Tromey <tom@tromey.com>
13035 * linespec.c (filter_results): Use std::vector.
13036 (decode_line_2, decode_line_full): Update.
13038 2018-04-05 Tom Tromey <tom@tromey.com>
13040 * linespec.c (canonical_to_fullform): Return std::string.
13041 (filter_results): Update.
13042 (struct decode_line_2_item): Add constructor.
13043 <fullform, displayform>: Now std::string.
13044 (decode_line_2_compare_items): Now a std::sort comparator.
13045 (decode_line_2): Update.
13047 2018-04-05 Tom Tromey <tom@tromey.com>
13049 * linespec.c (copy_token_string): Return a unique_xmalloc_ptr.
13050 (unexpected_linespec_error): Update.
13051 (linespec_parse_basic, parse_linespec): Update.
13053 2018-04-05 Tom Tromey <tom@tromey.com>
13055 * linespec.c (linespec_parse_basic): Reindent.
13057 2018-04-05 Tom Tromey <tom@tromey.com>
13059 * minsyms.h (iterate_over_minimal_symbols): Update.
13060 * minsyms.c (iterate_over_minimal_symbols): Take a
13061 gdb::function_view.
13062 * linespec.c (struct collect_minsyms): Remove.
13063 (compare_msyms): Now a std::sort comparator.
13064 (add_minsym): Add parameters.
13065 (search_minsyms_for_name): Update. Use std::vector.
13067 2018-04-03 Tom Tromey <tom@tromey.com>
13069 * mipsread.c (read_alphacoff_dynamic_symtab): Use
13072 2018-04-02 Weimin Pan <weimin.pan@oracle.com>
13074 * MAINTAINERS (Write After Approval): Add Weimin Pan.
13076 2018-04-02 Weimin Pan <weimin.pan@oracle.com>
13079 * cp-valprint.c: (cp_print_static_field) Fix infinite recursion when
13080 printing static type.
13082 2018-04-01 Tom Tromey <tom@tromey.com>
13084 * rs6000-nat.c (rs6000_ptrace_ldinfo): Return a byte_vector.
13085 (rs6000_xfer_shared_libraries): Update.
13087 2018-04-01 Simon Marchi <simon.marchi@polymtl.ca>
13089 * common/gdb_vecs.h (char_ptr): Remove.
13090 * tracepoint.c (encode_actions_1): Remove usage of char_ptr.
13092 2018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
13094 * guile/scm-utils.c (gdbscm_parse_function_args): Replace VEC
13096 * common/gdb_vecs.h (DEF_VEC_P (char_ptr)): Remove.
13098 2018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
13100 * tracepoint.h (struct uploaded_tp): Initialize fields.
13101 <actions, step_actions, cmd_strings>: Change type to
13102 std::vector<char *>.
13103 * tracepoint.c (get_uploaded_tp): Allocate with new.
13104 (free_uploaded_tps): Free with delete.
13105 (parse_tracepoint_definition): Adjust to std::vector change.
13106 * breakpoint.c (read_uploaded_action): Likewise.
13107 (create_tracepoint_from_upload): Likewise.
13108 * ctf.c (ctf_write_uploaded_tp): Likewise.
13109 (SET_ARRAY_FIELD): Likewise.
13110 * tracefile-tfile.c (tfile_write_uploaded_tp): Likewise.
13112 2018-03-30 Tom Tromey <tom@tromey.com>
13114 * solib-svr4.c (lm_info_read): Use gdb::byte_vector. Return
13116 (svr4_keep_data_in_core): Update.
13117 (svr4_read_so_list): Update.
13119 2018-03-30 Tom Tromey <tom@tromey.com>
13121 * windows-nat.c (handle_output_debug_string, handle_exception):
13123 * target.h (target_read_string): Update.
13124 * target.c (target_read_string): Change "string" to
13125 unique_xmalloc_ptr.
13126 * solib-svr4.c (open_symbol_file_object, svr4_read_so_list):
13128 * solib-frv.c (frv_current_sos): Update.
13129 * solib-dsbt.c (dsbt_current_sos): Update.
13130 * solib-darwin.c (darwin_current_sos): Update.
13131 * linux-thread-db.c (inferior_has_bug): Update.
13132 * expprint.c (print_subexp_standard) <case OP_OBJC_MSGCALL>:
13133 Update. Remove alloca.
13134 * ada-lang.c (ada_main_name): Update.
13136 2018-03-30 Tom Tromey <tom@tromey.com>
13138 * dwarf2read.c (struct free_dwo_file_cleanup_data): Remove.
13139 (struct dwo_file_deleter): New.
13140 (dwo_file_up): New typedef.
13141 (open_and_init_dwo_file): Use dwo_file_up.
13142 (free_dwo_file_cleanup): Remove.
13144 2018-03-30 Tom Tromey <tom@tromey.com>
13146 * dwarf2read.c (free_dwo_file): Remove "objfile" parameter.
13147 (free_dwo_file_cleanup, free_dwo_file_from_slot): Update.
13149 2018-03-30 Tom Tromey <tom@tromey.com>
13151 * dwarf2read.c (class free_cached_comp_units): New class.
13152 (dw2_instantiate_symtab, dwarf2_build_psymtabs_hard): Use it.
13153 (free_cached_comp_units): Remove function.
13155 2018-03-30 Tom Tromey <tom@tromey.com>
13157 * utils.h (make_cleanup_unpush_target): Remove.
13158 * inf-ptrace.c (struct target_unpusher): New.
13159 (target_unpush_up) New typedef.
13160 (inf_ptrace_create_inferior, inf_ptrace_attach): Use
13162 * utils.c (do_unpush_target, make_cleanup_unpush_target): Remove.
13164 2018-03-27 Tom Tromey <tom@tromey.com>
13166 * utils.c (prompt_for_continue): Use unique_xmalloc_ptr.
13168 2018-03-27 Pedro Alves <palves@redhat.com>
13169 Tom Tromey <tom@tromey.com>
13171 * top.c (class gdb_readline_wrapper_cleanup): Add constructor,
13172 destructor. Now a class.
13173 (gdb_readline_wrapper_cleanup): Remove function.
13174 (gdb_readline_wrapper): Remove cleanups.
13176 2018-03-27 Tom Tromey <tom@tromey.com>
13178 * typeprint.h (struct type_print_options) <local_typedefs,
13179 global_typedefs>: Remove "struct" keyword.
13180 (class typedef_hash_table): New class.
13181 (recursively_update_typedef_hash, add_template_parameters)
13182 (create_typedef_hash, free_typedef_hash, copy_typedef_hash)
13183 (find_typedef_in_hash): Don't declare.
13184 * typeprint.c (struct typedef_hash_table): Move to typeprint.h.
13185 (typedef_hash_table::recursively_update): Rename from
13186 recursively_update_typedef_hash. Now a member.
13187 (typedef_hash_table::add_template_parameters): Rename from
13188 add_template_parameters. Now a member.
13189 (typedef_hash_table::typedef_hash_table): Now a constructor;
13190 rename from create_typedef_hash.
13191 (typedef_hash_table::~typedef_hash_table): Now a destructor;
13192 rename from free_typedef_hash.
13193 (do_free_typedef_hash, make_cleanup_free_typedef_hash)
13194 (do_free_global_table): Remove.
13195 (typedef_hash_table::typedef_hash_table): New constructor; renamed
13196 from copy_type_recursive.
13197 (create_global_typedef_table): Remove.
13198 (typedef_hash_table::find_global_typedef): Now a member of
13199 typedef_hash_table.
13200 (typedef_hash_table::find_typedef): Rename from
13201 find_typedef_in_hash; now a member.
13202 (whatis_exp): Update.
13203 * extension.h (struct ext_lang_type_printers): Add constructor and
13205 (start_ext_lang_type_printers, free_ext_lang_type_printers): Don't
13207 * extension.c (ext_lang_type_printers::ext_lang_type_printers):
13208 Now a constructor; rename from start_ext_lang_type_printers.
13209 (ext_lang_type_printers): Now a destructor; rename from
13210 free_ext_lang_type_printers.
13211 * c-typeprint.c (find_typedef_for_canonicalize, c_print_type_1):
13213 (c_type_print_base_struct_union): Update. Remove cleanups.
13215 2018-03-27 Tom Tromey <tom@tromey.com>
13217 * dwarf-index-write.c: Include <cmath>.
13219 2018-03-27 Joel Brobecker <brobecker@adacore.com>
13221 * NEWS: Add entry describing new "set|show varsize-limit" command.
13222 * ada-lang.c (_initialize_ada_language): Add "set/show varsize-limit"
13224 * printcmd.c (_initialize_printcmd): Add "set var" alias of
13227 2018-03-27 Simon Marchi <simon.marchi@ericsson.com>
13229 * Makefile.in (COMMON_SFILES): Add dwarf-index-common.c and
13230 dwarf-index-write.c
13231 (HFILES_NO_SRCDIR): Add dwarf-index-common.h and dwarf2read.h.
13232 * dwarf-index-common.c: New file.
13233 * dwarf-index-common.h: New file.
13234 * dwarf-index-write.c: New file.
13235 * dwarf2read.c: Include dwarf2read.h and dwarf-index-common.h.
13236 (struct dwarf2_section_info): Move from here.
13237 (dwarf2_section_info_def): Likewise.
13238 (DEF_VEC_O (dwarf2_section_info_def)): Likewise.
13239 (offset_type): Likewise.
13240 (DW2_GDB_INDEX_SYMBOL_STATIC_SET_VALUE): Likewise.
13241 (DW2_GDB_INDEX_SYMBOL_KIND_SET_VALUE): Likewise.
13242 (DW2_GDB_INDEX_CU_SET_VALUE): Likewise.
13243 (byte_swap): Likewise.
13244 (MAYBE_SWAP): Likewise.
13245 (dwarf2_per_cu_ptr): Likewise.
13246 (DEF_VEC_P (dwarf2_per_cu_ptr)): Likewise.
13247 (struct tu_stats): Likewise.
13248 (struct dwarf2_per_objfile): Likewise.
13249 (struct dwarf2_per_cu_data): Likewise.
13250 (struct signatured_type): Likewise.
13251 (sig_type_ptr): Likewise.
13252 (DEF_VEC_P (sig_type_ptr)): Likewise.
13253 (INDEX4_SUFFIX): Likewise.
13254 (INDEX5_SUFFIX): Likewise.
13255 (DEBUG_STR_SUFFIX): Likewise.
13256 (dwarf2_read_section): Make non-static.
13257 (mapped_index_string_hash): Move from here.
13258 (dwarf5_djb_hash): Likewise.
13259 (file_write): Likewise.
13260 (class data_buf): Likewise.
13261 (struct symtab_index_entry): Likewise.
13262 (struct mapped_symtab): Likewise.
13263 (find_slot): Likewise.
13264 (hash_expand): Likewise.
13265 (add_index_entry): Likewise.
13266 (uniquify_cu_indices): Likewise.
13267 (class c_str_view): Likewise.
13268 (class c_str_view_hasher): Likewise.
13269 (class vector_hasher): Likewise.
13270 (write_hash_table): Likewise.
13271 (psym_index_map): Likewise.
13272 (struct addrmap_index_data): Likewise.
13273 (add_address_entry): Likewise.
13274 (add_address_entry_worker): Likewise.
13275 (write_address_map): Likewise.
13276 (symbol_kind): Likewise.
13277 (write_psymbols): Likewise.
13278 (struct signatured_type_index_data): Likewise.
13279 (write_one_signatured_type): Likewise.
13280 (recursively_count_psymbols): Likewise.
13281 (recursively_write_psymbols): Likewise.
13282 (class debug_names): Likewise.
13283 (check_dwarf64_offsets): Likewise.
13284 (psyms_seen_size): Likewise.
13285 (write_gdbindex): Likewise.
13286 (write_debug_names): Likewise.
13287 (assert_file_size): Likewise.
13288 (write_psymtabs_to_index): Likewise.
13289 (save_gdb_index_command): Likewise.
13290 (_initialize_dwarf2_read): Don't register the "save gdb-index"
13292 * dwarf2read.h: New file.
13294 2018-03-27 Joel Brobecker <brobecker@adacore.com>
13297 * dwarf2read.c (dwarf2_physname): Do not return the demangled
13298 symbol name if the CU's language stores symbol names in linkage
13300 * language.h (struct language_defn)
13301 <la_store_sym_names_in_linkage_form_p>: New field. Adjust
13302 all instances of this struct.
13304 2018-03-26 Tom Tromey <tom@tromey.com>
13306 * stack.c (backtrace_command_1): Remove verbose code.
13308 2018-03-26 Tom Tromey <tom@tromey.com>
13310 * python/py-framefilter.c (py_print_type): Don't catch
13311 exceptions. Return void.
13312 (py_print_value): Likewise.
13313 (py_print_single_arg): Likewise.
13314 (enumerate_args): Don't catch exceptions.
13315 (py_print_args): Likewise.
13316 (py_print_frame): Likewise.
13317 (gdbpy_apply_frame_filter): Catch exceptions here.
13319 2018-03-26 Tom Tromey <tom@tromey.com>
13321 * stack.c (_initialize_stack): Remove trailing newlines from help
13322 text. Add "Usage" line to "backtrace" help.
13324 2018-03-26 Tom Tromey <tom@tromey.com>
13327 * python/py-framefilter.c (py_print_args): Call wrap_hint.
13329 2018-03-26 Tom Tromey <tom@tromey.com>
13331 * python/py-framefilter.c (py_print_single_arg): Return
13332 EXT_LANG_BT_ERROR from catch.
13334 2018-03-26 Tom Tromey <tom@tromey.com>
13336 PR backtrace/15584:
13337 * stack.c (backtrace_command_1): Move some code into no-filters
13340 2018-03-26 Tom Tromey <tom@tromey.com>
13342 * python/py-framefilter.c (throw_quit_or_print_exception): New
13344 (gdbpy_apply_frame_filter): Use it.
13346 2018-03-26 Tom Tromey <tom@tromey.com>
13349 * python/py-framefilter.c (py_print_type, py_print_value)
13350 (enumerate_args, py_print_args, gdbpy_apply_frame_filter): Use
13353 2018-03-26 Tom Tromey <tom@tromey.com>
13355 * python/py-framefilter.c (enumerate_args): Use
13356 gdb::unique_xmalloc_ptr.
13358 2018-03-26 Tom Tromey <tom@tromey.com>
13360 * python/py-framefilter.c (py_print_frame): Return
13362 (gdbpy_apply_frame_filter): Update comment.
13363 * extension.h (enum ext_lang_bt_status) <EXT_LANG_BT_COMPLETED>:
13365 <EXT_LANG_BT_NO_FILTERS>: Change value.
13367 2018-03-26 Tom Tromey <tom@tromey.com>
13369 PR backtrace/15582:
13370 * stack.c (backtrace_command): Parse "hide" argument.
13371 * python/py-framefilter.c (py_print_frame): Handle PRINT_HIDE.
13372 * extension.h (enum frame_filter_flags) <PRINT_HIDE>: New
13375 2018-03-26 Tom Tromey <tom@tromey.com>
13377 * stack.c (backtrace_command_1): Remove "show_locals" parameter,
13379 (backtrace_command): Remove "fulltrace", add "flags".
13381 2018-03-26 Tom Tromey <tom@tromey.com>
13383 * stack.c (backtrace_command): Rewrite command line parsing.
13385 2018-03-26 Simon Marchi <simon.marchi@ericsson.com>
13387 * dwarf2read.c (DEF_VEC_I(offset_type)): Remove.
13389 2018-03-26 Simon Marchi <simon.marchi@ericsson.com>
13391 * filename-seen-cache.h: Add include guard.
13393 2018-03-26 Keith Seitz <keiths@redhat.com>
13395 * symfile.c (place_section): Remove "struct" from section_addr_info
13397 * windows-nat.c (struct safe_symbol_file_add_args) <addrs>: Remove
13398 "struct" keyword from section_addr_info.
13400 2018-03-26 Alan Hayward <alan.hayward@arm.com>
13402 * regformats/regdef.h (reg): Add constructors.
13404 2018-03-25 Pedro Alves <palves@redhat.com>
13406 * eval.c (evaluate_funcall): Swap OP_VAR_MSYM_VALUE/OP_VAR_VALUE
13407 if then/else bodies in var_func_name extraction.
13409 2018-03-23 Weimin Pan <weimin.pan@oracle.com>
13411 * minsyms.c (lookup_minimal_symbol_and_objfile): Use
13412 lookup_minimal_symbol() to find symbol entry.
13413 * minsyms.h (lookup_minimal_symbol_and_objfile): Update comment.
13415 2018-03-23 Keith Seitz <keiths@redhat.com>
13418 * dwarf2read.c (scan_partial_symbols): Scan structs/classes for
13419 nested type definitions for C++, too.
13421 2018-03-23 Tom Tromey <tom@tromey.com>
13423 * machoread.c (struct oso_el): Add a constructor. Don't define as
13425 (macho_register_oso): Remove.
13426 (macho_symtab_read): Take a std::vector.
13427 (oso_el_compare_name): Now a std::sort comparator.
13428 (macho_symfile_read_all_oso): Take a std::vector.
13429 (macho_symfile_read): Use std::vector. Remove cleanups.
13431 2018-03-22 Tom Tromey <tom@tromey.com>
13433 * record-full.c (record_full_exec_insn): Use gdb::byte_vector.
13434 (record_full_goto_bookmark): Use std::string.
13436 2018-03-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
13439 * rs6000-tdep.c (skip_prologue): Match both stwux and stdux
13442 2018-03-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
13444 * rs6000-tdep.c (store_insn_p): New function.
13445 (skip_prologue): New variable alloca_reg_offset. Set lr_reg
13446 and cr_reg to their unshifted values. Use store_insn_p to
13447 match LR saves using either R1 or fdata->alloca_reg. Use
13448 store_insn_p to match CR saves. Set alloca_reg_offset
13449 when alloca_reg and framep are set. Remove lr_reg shift
13450 when assigning to fdata->lr_register.
13452 2018-03-22 Andreas Arnez <arnez@linux.vnet.ibm.com>
13454 * linux-tdep.c (linux_info_proc): For "info proc cmdline", print
13455 command line args instead of emitting a warning.
13457 2018-03-22 Simon Marchi <simon.marchi@polymtl.ca>
13459 * tracepoint.h (struct static_tracepoint_marker): Initialize
13460 fields, define default constructor, move constructor and move
13461 assignment, disable the rest.
13462 <str_id, extra>: Make std::string.
13463 (release_static_tracepoint_marker): Remove.
13464 (free_current_marker): Remove.
13465 * tracepoint.c (free_current_marker): Remove.
13466 (parse_static_tracepoint_marker_definition): Adjust to
13467 std::string, use new hex2str overload.
13468 (release_static_tracepoint_marker): Remove.
13469 (print_one_static_tracepoint_marker): Get marker by reference
13470 and adjust to std::string.
13471 (info_static_tracepoint_markers_command): Adjust to std::vector
13473 * target.h (static_tracepoint_marker_p): Remove typedef.
13474 (DEF_VEC_P(static_tracepoint_marker_p)): Remove.
13475 (struct target_ops) <to_static_tracepoint_marker_at>: Return
13477 <to_static_tracepoint_markers_by_strid>: Return std::vector.
13479 (target_debug_print_VEC_static_tracepoint_marker_p_p): Remove.
13480 (target_debug_print_std_vector_static_tracepoint_marker): New.
13481 (target_debug_print_struct_static_tracepoint_marker_p): Rename
13483 (target_debug_print_static_tracepoint_marker_p): ... this.
13484 * target-delegates.c: Re-generate.
13485 * breakpoint.h (struct tracepoint) <static_trace_marker_id>:
13487 * breakpoint.c (init_breakpoint_sal): Adjust to std::string.
13488 (decode_static_tracepoint_spec): Adjust to std::vector.
13489 (tracepoint_print_one_detail): Adjust to std::string.
13490 (strace_marker_decode_location): Adjust to std::string.
13491 (update_static_tracepoint): Adjust to std::string, remove call
13492 to release_static_tracepoint_marker.
13493 * linux-nat.c (linux_child_static_tracepoint_markers_by_strid):
13494 Adjust to std::vector.
13495 * remote.c (remote_static_tracepoint_marker_at): Return bool.
13496 (remote_static_tracepoint_markers_by_strid): Adjust to
13498 * common/rsp-low.h (hex2str): New overload with explicit count
13500 * common/rsp-low.c (hex2str): New overload with explicit count
13502 * unittests/rsp-low-selftests.c (test_hex2str): New function.
13503 (_initialize_rsp_low_selftests): Add test_hex2str test.
13504 * unittests/tracepoint-selftests.c
13505 (test_parse_static_tracepoint_marker_definition): Adjust to
13508 2018-03-22 Simon Marchi <simon.marchi@polymtl.ca>
13510 * tracepoint.c (parse_static_tracepoint_marker_definition):
13511 Consider case where the definition is followed by more
13513 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
13514 tracepoint-selftests.c.
13515 * unittests/tracepoint-selftests.c: New.
13517 2018-03-21 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
13519 * MAINTAINERS (Write After Approval): Add Pedro Franco de
13522 2018-03-20 Stephen Roberts <stephen.roberts@arm.com>
13524 * symtab.c (find_pc_sect_line): fixed indentation.
13526 2018-03-20 Stephen Roberts <stephen.roberts@arm.com>
13528 * symtab.c (find_pc_sect_line): now uses binary search.
13530 2018-03-19 Tom Tromey <tom@tromey.com>
13532 * rust-exp.y (struct_expr_tail, struct_expr_list): Add plain
13533 "IDENT" production.
13535 2018-03-19 Pedro Alves <palves@redhat.com>
13536 Tom Tromey <tom@tromey.com>
13538 * unittests/observable-selftests.c: New file.
13539 * common/observable.h: New file.
13540 * observable.h: New file.
13541 * ada-lang.c, ada-tasks.c, agent.c, aix-thread.c, annotate.c,
13542 arm-tdep.c, auto-load.c, auxv.c, break-catch-syscall.c,
13543 breakpoint.c, bsd-uthread.c, cli/cli-interp.c, cli/cli-setshow.c,
13544 corefile.c, dummy-frame.c, event-loop.c, event-top.c, exec.c,
13545 extension.c, frame.c, gdbarch.c, guile/scm-breakpoint.c,
13546 infcall.c, infcmd.c, inferior.c, inflow.c, infrun.c, jit.c,
13547 linux-tdep.c, linux-thread-db.c, m68klinux-tdep.c,
13548 mi/mi-cmd-break.c, mi/mi-interp.c, mi/mi-main.c, objfiles.c,
13549 ppc-linux-nat.c, ppc-linux-tdep.c, printcmd.c, procfs.c,
13550 python/py-breakpoint.c, python/py-finishbreakpoint.c,
13551 python/py-inferior.c, python/py-unwind.c, ravenscar-thread.c,
13552 record-btrace.c, record-full.c, record.c, regcache.c, remote.c,
13553 riscv-tdep.c, sol-thread.c, solib-aix.c, solib-spu.c, solib.c,
13554 spu-multiarch.c, spu-tdep.c, stack.c, symfile-mem.c, symfile.c,
13555 symtab.c, thread.c, top.c, tracepoint.c, tui/tui-hooks.c,
13556 tui/tui-interp.c, valops.c: Update all users.
13557 * tui/tui-hooks.c (tui_bp_created_observer)
13558 (tui_bp_deleted_observer, tui_bp_modified_observer)
13559 (tui_inferior_exit_observer, tui_before_prompt_observer)
13560 (tui_normal_stop_observer, tui_register_changed_observer):
13562 (tui_observers_token): New global.
13563 (attach_or_detach, tui_attach_detach_observers): New functions.
13564 (tui_install_hooks, tui_remove_hooks): Use
13565 tui_attach_detach_observers.
13566 * record-btrace.c (record_btrace_thread_observer): Remove.
13567 (record_btrace_thread_observer_token): New global.
13568 * observer.sh: Remove.
13569 * observer.c: Rename to observable.c.
13570 * observable.c (namespace gdb_observers): Define new objects.
13571 (observer_debug): Move into gdb_observers namespace.
13572 (struct observer, struct observer_list, xalloc_observer_list_node)
13573 (xfree_observer_list_node, generic_observer_attach)
13574 (generic_observer_detach, generic_observer_notify): Remove.
13575 (_initialize_observer): Update.
13576 Don't include observer.inc.
13577 * Makefile.in (generated_files): Remove observer.h, observer.inc.
13578 (clean mostlyclean): Likewise.
13579 (observer.h, observer.inc): Remove targets.
13580 (SUBDIR_UNITTESTS_SRCS): Add observable-selftests.c.
13581 (COMMON_SFILES): Use observable.c, not observer.c.
13582 * .gitignore: Remove observer.h.
13584 2018-03-18 Tom Tromey <tom@tromey.com>
13586 * solib.c (gdb_bfd_lookup_symbol_from_symtab): Use
13588 (bfd_lookup_symbol_from_dyn_symtab): Likewise.
13590 2018-03-17 Tom Tromey <tom@tromey.com>
13592 * auto-load.c (auto_load_objfile_script_1): Use std::string.
13594 2018-03-17 Tom Tromey <tom@tromey.com>
13596 * target.c (class scoped_target_fd): New.
13597 (target_fileio_close_cleanup): Remove.
13598 (target_fileio_read_alloc_1): Use scoped_target_fd.
13600 2018-03-16 Simon Marchi <simon.marchi@polymtl.ca>
13602 * silent-rules.mk: New.
13603 * Makefile.in: Include silent-rules.mk
13604 (srcdir, VPATH, top_srcdir): Move up.
13605 (COMPILE): Add ECHO_CXX.
13606 (test-cp-name-parser$(EXEEXT)): Add ECHO_CXXLD.
13607 (init.c): Add ECHO_INIT_C.
13608 (gdb$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
13609 (version.c): Add ECHO_GEN.
13610 (printcmd.o): Add ECHO_CXX.
13611 (target-float.o): Add ECHO_CXX.
13612 (ada-exp.o): Add ECHO_CXX.
13613 (stamp-xml): Add SILENCE and ECHO_GEN_XML_BUILTIN.
13614 (insight$(EXEEXT)): Add ECHO_CXXLD.
13615 * gnulib/configure.ac: Add AM_SILENT_RULES.
13616 * gnulib/aclocal.m4: Re-generate.
13617 * gnulib/configure: Re-generate.
13618 * gnulib/import/Makefile.in: Re-generate.
13620 2018-03-16 Tom Tromey <tom@tromey.com>
13622 * xcoffread.c (xcoff_symfile_offsets): Change type of "addrs".
13623 * utils.h (make_cleanup_free_section_addr_info): Don't declare.
13624 * utils.c (do_free_section_addr_info)
13625 (make_cleanup_free_section_addr_info): Remove.
13626 * symfile.h (struct other_sections): Add constructor.
13627 (struct section_addr_info): Remove.
13628 (section_addr_info): New typedef.
13629 (struct sym_fns) <sym_offsets>: Change type of parameter.
13630 (build_section_addr_info_from_objfile)
13631 (relative_addr_info_to_section_offsets, addr_info_make_relative)
13632 (default_symfile_offsets, symbol_file_add)
13633 (symbol_file_add_from_bfd)
13634 (build_section_addr_info_from_section_table): Update.
13635 (alloc_section_addr_info, free_section_addr_info): Don't declare.
13636 * symfile.c (alloc_section_addr_info): Remove.
13637 (build_section_addr_info_from_section_table): Change return type.
13639 (build_section_addr_info_from_bfd)
13640 (build_section_addr_info_from_objfile): Likewise.
13641 (free_section_addr_info): Remove.
13642 (relative_addr_info_to_section_offsets): Change type of "addrs".
13643 (addrs_section_compar): Now a std::sort comparator.
13644 (addrs_section_sort): Change return type.
13645 (addr_info_make_relative): Change type of "addrs". Update.
13646 (default_symfile_offsets, syms_from_objfile_1)
13647 (syms_from_objfile, symbol_file_add_with_addrs): Likewise.
13648 (symbol_file_add_separate): Update.
13649 (symbol_file_add): Change type of "addrs". Update.
13650 (add_symbol_file_command): Update. Remove cleanups.
13651 * symfile-mem.c (symbol_file_add_from_memory): Update. Remove
13653 * symfile-debug.c (debug_sym_offsets): Change type of "info".
13654 * solib.c (solib_read_symbols): Update.
13655 * objfiles.c (objfile_relocate): Update. Remove cleanups.
13656 * machoread.c (macho_symfile_offsets): Update.
13657 * jit.c (jit_bfd_try_read_symtab): Update.
13659 2018-03-15 Simon Marchi <simon.marchi@polymtl.ca>
13661 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
13662 unittests/utils-selftests.c.
13663 * unittests/utils-selftests.c: New file.
13665 2018-03-14 Tom Tromey <tom@tromey.com>
13668 * printcmd.c (printf_c_string, printf_wide_c_string): Special case
13671 2018-03-14 Tom Tromey <tom@tromey.com>
13674 * printcmd.c (printf_pointer): Allow "-" in format.
13676 2018-03-14 Tom Tromey <tom@tromey.com>
13678 * printcmd.c (_initialize_printcmd): Add usage to printf.
13680 2018-03-14 Yao Qi <qiyao@sourceware.org>
13682 * MAINTAINERS: Update my email address.
13684 2018-03-13 Tom Tromey <tom@tromey.com>
13686 * machoread.c (macho_check_dsym): Change filenamep to a
13688 (macho_symfile_read): Update.
13689 * symfile.c (load_command): Use std::string.
13691 2018-03-12 Andrew Burgess <andrew.burgess@embecosm.com>
13693 * riscv-tdep.c (riscv_sw_breakpoint_from_kind): Add localization
13694 to error message string.
13695 (riscv_register_name): Use xsnprintf instead of sprintf.
13696 (riscv_insn::fetch_instruction): Use gdb_assert instead of
13698 (riscv_print_arg_location): Use gdb_assert_not_reached instead of
13700 (riscv_push_dummy_call): Likewise.
13702 2018-03-12 Tom Tromey <tom@tromey.com>
13704 * rs6000-aix-tdep.c (rs6000_aix_core_xfer_shared_libraries_aix):
13705 Use gdb::byte_vector.
13706 * arm-tdep.c (arm_exidx_new_objfile): Use gdb::byte_vector.
13708 2018-03-12 Yao Qi <yao.qi@linaro.org>
13710 * ia64-libunwind-tdep.c (libunwind_get_reg_special): Change
13711 parameter type to readable_regcache.
13712 * ia64-libunwind-tdep.h (libunwind_get_reg_special): Update
13715 2018-03-11 Tom Tromey <tom@tromey.com>
13717 * dwarf2read.c (struct nextfield): Add initializers.
13718 (struct nextfnfield): Remove.
13719 (struct fnfieldlist): Add initializers. Remove "length" and
13720 "head", use std::vector.
13721 (struct decl_field_list): Remove.
13722 (struct field_info): Add initializers.
13723 <fields, baseclasses>: Now std::vector.
13724 <nbaseclasses, nfnfields, typedef_field_list_count,
13725 nested_types_list_count>: Remove.
13726 (dwarf2_add_field, dwarf2_add_type_defn)
13727 (dwarf2_attach_fields_to_type, dwarf2_add_member_fn)
13728 (dwarf2_attach_fn_fields_to_type, handle_struct_member_die)
13729 (process_structure_scope): Update.
13731 2018-03-11 Tom Tromey <tom@tromey.com>
13733 * dwarf2read.c (sort_tu_by_abbrev_offset): Change to be suitable
13734 for use by std::sort.
13735 (build_type_psymtabs_1): Use std::vector.
13737 2018-03-09 Eli Zaretskii <eliz@gnu.org>
13739 * top.c (print_gdb_configuration): Reflect LIBIPT, LIBMEMCHECK,
13740 and LIBMPFR in the printed configuration.
13742 2018-03-08 Tom Tromey <tom@tromey.com>
13744 * source.c (get_filename_and_charpos): Use scoped_fd.
13745 * nto-procfs.c (procfs_open_1): Use scoped_fd.
13746 (procfs_pidlist): Likewise.
13747 * procfs.c (proc_get_LDT_entry): Use scoped_fd.
13748 (iterate_over_mappings): Likewise.
13750 2018-03-08 Tom Tromey <tom@tromey.com>
13752 * infcall.c (struct call_return_meta_info)
13753 <stack_temporaries_enabled>: Remove.
13754 (get_call_return_value, call_function_by_hand_dummy): Update.
13755 * thread.c (disable_thread_stack_temporaries): Remove.
13756 (enable_thread_stack_temporaries): Remove.
13757 (thread_stack_temporaries_enabled_p): Return bool.
13758 (push_thread_stack_temporary, value_in_thread_stack_temporaries)
13759 (get_last_thread_stack_temporary): Update.
13760 * eval.c (evaluate_subexp): Update.
13761 * gdbthread.h (class enable_thread_stack_temporaries): Now a
13762 class, not a function.
13763 (value_ptr, value_vec): Remove typedefs.
13764 (class thread_info) <stack_temporaries_enabled>: Now bool.
13765 <stack_temporaries>: Now a std::vector.
13766 (thread_stack_temporaries_enabled_p)
13767 (value_in_thread_stack_temporaries): Return bool.
13769 2018-03-08 Simon Marchi <simon.marchi@ericsson.com>
13771 * remote.c (putpkt_binary): Fix omitted bytes reporting.
13772 (getpkt_or_notif_sane_1): Likewise.
13774 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
13776 * build-id.c (build_id_to_debug_bfd): Use std::string.
13778 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
13780 * build-id.c (find_separate_debug_file_by_buildid): Return
13782 * build-id.h (find_separate_debug_file_by_buildid): Return
13784 * coffread.c (coff_symfile_read): Adjust to std::string.
13785 * elfread.c (elf_symfile_read): Adjust to std::string.
13786 * symfile.c (separate_debug_file_exists): Change parameter to
13788 (find_separate_debug_file): Return std::string.
13789 (find_separate_debug_file_by_debuglink): Return std::string.
13790 * symfile.h (find_separate_debug_file_by_debuglink): Return
13793 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
13795 * common/xml-utils.c (xml_escape_text): Move code to...
13796 (xml_escape_text_append): ... this new function.
13797 * common/xml-utils.h (xml_escape_text_append): New declaration.
13798 * unittests/xml-utils-selftests.c (test_xml_escape_text_append):
13800 (_initialize_xml_utils): register test_xml_escape_text_append as
13803 2018-03-07 Alan Hayward <alan.hayward@arm.com>
13805 * defs.h: Remove MAX_REGISTER_SIZE.
13806 * regcache.c (init_regcache_descr): Remove MAX_REGISTER_SIZE
13808 * python/py-unwind.c (pyuw_sniffer): Likewise.
13810 2018-03-07 Tom Tromey <tom@tromey.com>
13812 * linux-tdep.c (linux_info_proc): Update.
13813 * target.h (struct target_ops) <to_fileio_readlink>: Return
13815 (target_fileio_readlink): Return optional<string>.
13816 * remote.c (remote_hostio_readlink): Return optional<string>.
13817 * inf-child.c (inf_child_fileio_readlink): Return
13819 * target.c (target_fileio_readlink): Return optional<string>.
13821 2018-03-07 Andrew Burgess <andrew.burgess@embecosm.com>
13823 * regcache.c (cooked_read_test): Add riscv to the list of
13824 architectures that have a save_reggroup.
13826 2018-03-07 Andreas Arnez <arnez@linux.vnet.ibm.com>
13828 * gnu-v3-abi.c (gnuv3_rtti_type): Add early exit if the given
13829 value is not a dynamic class object.
13831 2018-03-06 Tom Tromey <tom@tromey.com>
13833 * rust-exp.y: Formatting fixes.
13835 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
13837 * riscv-tdep.c (riscv_register_name): Remove target description
13839 (riscv_gdbarch_init): Remove target description check.
13841 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
13843 * riscv-tdep.c: Remove 'Contributed by ...' lines from header
13845 * riscv-tdep.h: Likewise.
13847 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
13849 * riscv-tdep.c (riscv_pseudo_register_read): Delete.
13850 (riscv_pseudo_register_write): Delete.
13851 (riscv_gdbarch_init): Remove all use of pseudo registers.
13853 2018-03-06 Simon Marchi <simon.marchi@polymtl.ca>
13855 * record-btrace.c (btrace_print_lines): Replace cleanup
13856 parameter with RAII equivalents.
13857 (btrace_insn_history): Replace cleanup with RAII equivalents.
13858 * ui-out.h (make_cleanup_ui_out_list_begin_end,
13859 make_cleanup_ui_out_tuple_begin_end): Remove.
13860 * ui-out.c (struct ui_out_end_cleanup_data, do_cleanup_end,
13861 make_cleanup_ui_out_end, make_cleanup_ui_out_tuple_begin_end,
13862 make_cleanup_ui_out_list_begin_end): Remove.
13864 2018-03-06 Simon Marchi <simon.marchi@polymtl.ca>
13866 * record-btrace.c (record_btrace_maybe_mark_async_event): Change
13867 parameter types to std::vector. Use bool.
13868 (record_btrace_wait): Replace VEC(tp_t) with
13869 std::vector<thread_info *>.
13870 * common/gdb_vecs.h (unordered_remove, ordered_remove): New.
13872 2018-03-06 Simon Marchi <simon.marchi@polymtl.ca>
13874 * record-btrace.c (record_btrace_disable_callback): Remove.
13875 (struct scoped_btrace_disable): New.
13876 (record_btrace_open): Use scoped_btrace_disable.
13878 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
13880 * riscv-tdep.c (riscv_return_value): Change type to ULONGEST for
13881 reading values from registers.
13883 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
13885 * riscv-tdep.c (riscv_push_dummy_call): Use core_addr_to_string_nz
13888 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
13890 * riscv-tdep.c (riscv_print_arg_location): Add header comment,
13891 change parameter type. Use GDB's print functions, and use
13892 core_addr_to_string where appropriate.
13893 (riscv_push_dummy_call): Use core_addr_to_string where
13894 appropriate, update call to riscv_print_arg_location, and reindent
13896 (riscv_return_value): Update call to riscv_print_arg_location.
13898 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
13899 Tim Newsome <tim@sifive.com>
13900 Albert Ou <a0u@eecs.berkeley.edu>
13901 Darius Rad <darius@bluespec.com>
13903 * Makefile.in (ALL_TARGET_OBS): Add riscv-tdep.o
13904 (HFILES_NO_SRCDIR): Add riscv-tdep.h.
13905 (ALLDEPFILES): Add riscv-tdep.c
13906 * configure.tgt: Add riscv support.
13907 * riscv-tdep.c: New file.
13908 * riscv-tdep.h: New file.
13909 * NEWS: Mention new target.
13910 * MAINTAINERS: Add entry for riscv.
13912 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
13914 * amd64-tdep.c (amd64_classify_aggregate): Ignore zero sized
13915 fields within aggregates.
13917 2018-03-04 Simon Marchi <simon.marchi@polymtl.ca>
13919 * record-btrace.c (btrace_print_lines): Change type of flags to
13920 gdb_disassembly_flags.
13922 2018-03-04 John Baldwin <jhb@FreeBSD.org>
13924 * fbsd-nat.c: Include "inf-ptrace.h".
13925 (USE_SIGTRAP_SIGINFO): Conditionally define.
13926 [USE_SIGTRAP_SIGINFO] (fbsd_handle_debug_trap): New function.
13927 (fbsd_wait) [USE_SIGTRAP_SIGINFO]: Call "fbsd_handle_debug_trap".
13928 [USE_SIGTRAP_SIGINFO] (fbsd_stopped_by_sw_breakpoint): New
13930 [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_sw_breakpoint):
13932 [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_hw_breakpoint):
13934 (fbsd_nat_add_target) [USE_SIGTRAP_SIGINFO]: Set
13935 "stopped_by_sw_breakpoint", "supports_stopped_by_sw_breakpoint",
13936 "supports_stopped_by_hw_breakpoint" target methods.
13938 2018-03-04 John Baldwin <jhb@FreeBSD.org>
13940 * NEWS (Changes since GDB 8.1): Add "set/show debug fbsd-nat".
13941 * fbsd-nat.c (debug_fbsd_nat): New variable.
13942 (show_fbsd_nat_debug): New function.
13943 (fbsd_wait): Log LWP info if "debug_fbsd_nat" is enabled.
13944 (_initialize_fbsd_nat): Add "fbsd-nat" debug boolean command.
13946 2018-03-04 John Baldwin <jhb@FreeBSD.org>
13948 * nat/x86-dregs.c (x86_dr_stopped_by_hw_breakpoint): New function.
13949 * nat/x86-dregs.h (x86_dr_stopped_by_hw_breakpoint): New
13951 * x86-nat.c (x86_stopped_by_hw_breakpoint): New function.
13952 (x86_use_watchpoints): Set "stopped_by_hw_breakpoint" target
13955 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
13957 * common/gdb_vecs.c (free_char_ptr_vec): Remove.
13958 * common/gdb_vecs.h (free_char_ptr_vec): Remove.
13960 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
13962 * charset.c (struct charset_vector): New.
13963 (charsets): Change type to charset_vector.
13964 (find_charset_names): Adjust.
13966 (_initialize_charset): Adjust.
13968 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
13970 * progspace.h (struct program_space) <deleted_solibs>: Change
13971 type to std::vector<std::string>.
13972 * progspace.c (clear_program_space_solib_cache): Adjust.
13973 * breakpoint.c (print_solib_event): Adjust.
13974 (check_status_catch_solib): Adjust.
13975 * solib.c (update_solib_list): Adjust.
13976 * ui-out.h (class ui_out) <field_string>: New overload.
13977 * ui-out.c (ui_out::field_string): New overload.
13979 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
13981 * progspace.h (struct program_space): Add constructor and
13982 destructor, initialize fields.
13983 (add_program_space): Remove.
13984 * progspace.c (add_program_space): Rename to...
13985 (program_space::program_space): ... this.
13986 (release_program_space): Rename to...
13987 (program_space::~program_space): ... this.
13988 (delete_program_space): Use delete to delete program_space.
13989 (initialize_progspace): Use new to allocate program_space.
13990 * inferior.c (add_inferior_with_spaces): Likewise.
13991 (clone_inferior_command): Likewise.
13992 * infrun.c (follow_fork_inferior): Likewise.
13993 (handle_vfork_child_exec_or_exit): Likewise.
13995 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
13997 * common/gdb_vecs.h (make_cleanup_free_char_ptr_vec): Remove.
13998 (delim_string_to_char_ptr_vec): Return std::vector of
13999 gdb::unique_xmalloc_ptr.
14000 (dirnames_to_char_ptr_vec_append): Take std::vector of
14001 gdb::unique_xmalloc_ptr.
14002 (dirnames_to_char_ptr_vec): Return std::vector of
14003 gdb::unique_xmalloc_ptr.
14004 * common/gdb_vecs.c (delim_string_to_char_ptr_vec_append):
14005 Take std::vector of gdb::unique_xmalloc_ptr, adjust the code.
14006 (delim_string_to_char_ptr_vec): Return an std::vector of
14007 gdb::unique_xmalloc_ptr, adjust the code.
14008 (dirnames_to_char_ptr_vec_append): Take an std::vector of
14009 gdb::unique_xmalloc_ptr, adjust the code.
14010 (dirnames_to_char_ptr_vec): Return an std::vector of
14011 gdb::unique_xmalloc_ptr, adjust the code.
14012 * auto-load.c (auto_load_safe_path_vec): Change type to
14013 std::vector of gdb::unique_xmalloc_ptr.
14014 (auto_load_expand_dir_vars): Return an std::vector of
14015 gdb::unique_xmalloc_ptr, adjust the code.
14016 (auto_load_safe_path_vec_update): Adjust.
14017 (filename_is_in_auto_load_safe_path_vec): Adjust.
14018 (auto_load_objfile_script_1): Adjust.
14019 * build-id.c (build_id_to_debug_bfd): Adjust.
14020 * linux-thread-db.c (thread_db_load_search): Adjust.
14021 * source.c (add_path): Adjust.
14023 * symfile.c (find_separate_debug_file): Adjust.
14024 * utils.c (do_free_char_ptr_vec): Remove.
14025 (make_cleanup_free_char_ptr_vec): Remove.
14027 2018-03-01 Sergio Durigan Junior <sergiodj@redhat.com>
14030 * common/pathstuff.c: Conditionally include "<windows.h>".
14032 2018-03-01 Georg Sauthoff <mail@georg.so>
14035 * gcore.in: Quote variables and switch interpreter to bash.
14037 2018-03-01 Tom Tromey <tom@tromey.com>
14039 * dwarf2read.c (alloc_discriminant_info): Fix default_index
14040 assertion. Add assertion for discriminant_index.
14041 (quirk_rust_enum): Use correct base type name in univariant case.
14043 2018-03-01 Simon Marchi <simon.marchi@ericsson.com>
14045 * record.c (get_call_history_modifiers): Return a
14046 record_print_flags.
14047 (cmd_record_call_history): Adjust.
14048 * record-btrace.c (record_btrace_call_history): Adjust.
14049 (record_btrace_call_history_range): Adjust.
14050 (record_btrace_call_history_from): Adjust.
14051 * target-debug.h (target_debug_print_record_print_flags): New.
14052 * target-delegates.c: Re-generate.
14053 * target.c (target_call_history): Change flags type.
14054 (target_call_history_from): Likewise.
14055 (target_call_history_range): Likewise.
14056 * target.h (struct target_ops) <target_call_history>: Likewise.
14057 (target_call_history_from): Likewise.
14058 (target_call_history_range): Likewise.
14060 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
14061 Simon Marchi <simon.marchi@polymtl.ca>
14063 * common/common-utils.c: Include "sys/stat.h".
14064 (is_regular_file): Move here from "source.c"; change return
14066 * common/common-utils.h (is_regular_file): New prototype.
14067 * common/pathstuff.c (contains_dir_separator): New function.
14068 * common/pathstuff.h (contains_dir_separator): New prototype.
14069 * source.c: Don't include "sys/stat.h".
14070 (is_regular_file): Move to "common/common-utils.c".
14072 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
14074 * Makefile.in (COMMON_SFILES): Add "common/pathstuff.c".
14075 (HFILES_NO_SRCDIR): Add "common/pathstuff.h".
14076 * auto-load.c: Include "common/pathstuff.h".
14077 * common/common-def.h (current_directory): Move here.
14078 * common/gdb_tilde_expand.c (gdb_tilde_expand_up): New
14080 * common/gdb_tilde_expand.h (gdb_tilde_expand_up): New
14082 * common/pathstuff.c: New file.
14083 * common/pathstuff.h: New file.
14084 * compile/compile.c: Include "common/pathstuff.h".
14085 * defs.h (current_directory): Move to "common/common-defs.h".
14086 * dwarf2read.c: Include "common/pathstuff.h".
14087 * exec.c: Likewise.
14088 * guile/scm-safe-call.c: Likewise.
14089 * linux-thread-db.c: Likewise.
14090 * main.c: Likewise.
14091 * nto-tdep.c: Likewise.
14092 * objfiles.c: Likewise.
14093 * source.c: Likewise.
14094 * symtab.c: Likewise.
14095 * utils.c: Include "common/pathstuff.h".
14096 (gdb_realpath): Move to "common/pathstuff.c".
14097 (gdb_realpath_keepfile): Likewise.
14098 (gdb_abspath): Likewise.
14099 * utils.h (gdb_realpath): Move to "common/pathstuff.h".
14100 (gdb_realpath_keepfile): Likewise.
14101 (gdb_abspath): Likewise.
14103 2018-02-28 John Baldwin <jhb@FreeBSD.org>
14105 * fbsd-nat.c (fbsd_resume): Use PT_SETSTEP for stepping and a
14106 wildcard process pid for super_resume for kernels with a
14109 2018-02-27 Phil Muldoon <pmuldoon@redhat.com>
14111 * compile/compile.c (get_args): Add additional comments
14112 explaining function.
14114 2018-02-27 Simon Marchi <simon.marchi@polymtl.ca>
14115 Tom Tromey <tom@tromey.com>
14117 * target.h (memory_write_request_s): Remove typedef. Don't define
14119 (target_write_memory_blocks): Change argument to std::vector.
14120 (struct memory_write_request): Add constructor.
14121 * target-memory.c (compare_block_starting_address): Return bool.
14122 Change argument types.
14123 (claim_memory): Change arguments to use std::vector.
14124 (split_regular_and_flash_blocks, blocks_to_erase)
14125 (compute_garbled_blocks): Likewise.
14126 (cleanup_request_data, cleanup_write_requests_vector): Remove.
14127 (target_write_memory_blocks): Change argument to std::vector.
14128 * symfile.c (struct load_section_data): Add constructor and
14129 destructor. Use std::vector for "requests".
14130 (struct load_progress_data): Add initializers.
14131 (load_section_callback): Update. Use "new".
14132 (clear_memory_write_data): Remove.
14133 (generic_load): Update.
14135 2018-02-27 Alan Hayward <alan.hayward@arm.com>
14137 * arch/aarch64.h: Use common/tdesc.h.
14139 2018-02-26 Maciej W. Rozycki <macro@mips.com>
14141 * mips-tdep.c (mips_gdbarch_init): Don't use a 32-bit BFD
14142 architecture with a 64-bit ABI.
14144 2018-02-26 Maciej W. Rozycki <macro@mips.com>
14146 * gdb/mips-tdep.c (mips_gdbarch_init): Reorder ABI determination
14147 ahead of target description loading.
14149 2018-02-26 Tom Tromey <tom@tromey.com>
14151 * stack.c (backtrace_command_1): Update.
14152 * python/python-internal.h (gdbpy_apply_frame_filter): Change type
14154 * python/py-framefilter.c (py_print_frame)
14155 (gdbpy_apply_frame_filter): Change type of "flags".
14156 * mi/mi-cmd-stack.c (mi_apply_ext_lang_frame_filter): Change type
14158 (mi_cmd_stack_list_frames, mi_cmd_stack_list_locals)
14159 (mi_cmd_stack_list_args, mi_cmd_stack_list_variables): Update.
14160 * extension.h (enum frame_filter_flag): Rename from
14161 frame_filter_flags.
14162 (frame_filter_flags): Define using DEF_ENUM_FLAGS_TYPE.
14163 (apply_ext_lang_frame_filter): Change type of "flags".
14164 * extension.c (apply_ext_lang_frame_filter): Change type of
14166 * extension-priv.h (struct extension_language_ops)
14167 <apply_frame_filter>: Change type of "flags".
14169 2018-02-26 Tom Tromey <tom@tromey.com>
14172 * stack.c (backtrace_command_1): Set PRINT_MORE_FRAMES flag. Fix
14173 off-by-one in py_end computation.
14174 * python/py-framefilter.c (gdbpy_apply_frame_filter): Handle
14176 * extension.h (enum frame_filter_flags) <PRINT_MORE_FRAMES>: New
14179 2018-02-26 Tom Tromey <tom@tromey.com>
14181 * dwarf2read.c (struct variant_field): New.
14182 (struct nextfield) <variant>: New field.
14183 (dwarf2_add_field): Handle DW_TAG_variant_part.
14184 (dwarf2_attach_fields_to_type): Attach a discriminant_info to a
14185 discriminated union.
14186 (read_structure_type): Handle DW_TAG_variant_part.
14187 (handle_struct_member_die): New function, extracted from
14188 process_structure_scope. Handle DW_TAG_variant.
14189 (process_structure_scope): Handle discriminated unions. Call
14190 handle_struct_member_die.
14192 2018-02-26 Tom Tromey <tom@tromey.com>
14194 * rust-lang.h (rust_last_path_segment): Declare.
14195 * rust-lang.c (rust_last_path_segment): Now public. Change
14197 (struct disr_info): Remove.
14198 (RUST_ENUM_PREFIX, RUST_ENCODED_ENUM_REAL)
14199 (RUST_ENCODED_ENUM_HIDDEN, rust_union_is_untagged)
14200 (rust_get_disr_info, rust_tuple_variant_type_p): Remove.
14201 (rust_enum_p, rust_enum_variant): New function.
14202 (rust_underscore_fields): Remove "offset" parameter.
14203 (rust_print_enum): New function.
14204 (rust_val_print) <TYPE_CODE_UNION>: Remove enum code.
14205 <TYPE_CODE_STRUCT>: Call rust_print_enum when appropriate.
14206 (rust_print_struct_def): Add "for_rust_enum" parameter. Handle
14208 (rust_internal_print_type): New function, from rust_print_type.
14210 (rust_print_type): Call rust_internal_print_type.
14211 (rust_evaluate_subexp) <STRUCTOP_ANONYMOUS, STRUCTOP_STRUCT>:
14212 Update enum handling.
14213 * dwarf2read.c (struct dwarf2_cu) <rust_unions>: New field.
14214 (rust_fully_qualify, alloc_discriminant_info, quirk_rust_enum)
14215 (rust_union_quirks): New functions.
14216 (process_full_comp_unit, process_full_type_unit): Call
14218 (process_structure_scope): Update rust_unions if necessary.
14220 2018-02-26 Tom Tromey <tom@tromey.com>
14222 * value.h (value_union_variant): Declare.
14223 * valops.c (value_union_variant): New function.
14224 * gdbtypes.h (TYPE_FLAG_DISCRIMINATED_UNION): New macro.
14225 (struct discriminant_info): New.
14226 (enum dynamic_prop_node_kind) <DYN_PROP_DISCRIMINATED>: New
14228 (struct main_type) <flag_discriminated_union>: New field.
14230 2018-02-26 Tom Tromey <tom@tromey.com>
14232 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
14233 unittests/unpack-selftests.c.
14234 * unittests/unpack-selftests.c: New file.
14235 * value.c (unpack_bits_as_long): Fix bugs in non-bitfield cases.
14237 2018-02-26 Yao Qi <yao.qi@linaro.org>
14239 * dwarf2read.c (struct partial_die_info) <read>: New method.
14240 (read_partial_die): Remove the declaration.
14241 (load_partial_dies): Update.
14242 (partial_die_info::partial_die_info):
14243 (read_partial_die): Change it to partial_die_info::read.
14245 2018-02-26 Yao Qi <yao.qi@linaro.org>
14247 * dwarf2read.c (struct partial_die_info) <fixup>: New method.
14248 (fixup_partial_die): Remove declaration.
14249 (scan_partial_symbols): Update.
14250 (partial_die_parent_scope): Likewise.
14251 (partial_die_full_name): Likewise.
14252 (fixup_partial_die): Change it to partial_die_info::fixup.
14254 2018-02-26 Yao Qi <yao.qi@linaro.org>
14256 * dwarf2read.c (read_partial_die): Update the declaration.
14257 (load_partial_dies): Caller update.
14258 (read_partial_die): Remove one argument abbrev_len.
14260 2018-02-26 Yao Qi <yao.qi@linaro.org>
14262 * dwarf2read.c (struct partial_die_info): Add ctor, delete
14263 assignment operator.
14264 (load_partial_dies): Use ctor and copy ctor.
14265 (read_partial_die): Update.
14266 (dwarf2_cu::find_partial_die): Use ctor.
14268 2018-02-26 Yao Qi <yao.qi@linaro.org>
14270 * dwarf2read.c (struct dwarf2_cu) <find_partial_die>: New method.
14271 (find_partial_die_in_comp_unit): Change it to
14272 dwarf2_cu::find_partial_die.
14273 (find_partial_die): Update.
14275 2018-02-26 Yao Qi <yao.qi@linaro.org>
14277 * dwarf2read.c (read_partial_die): Remove the code checking abbrev
14280 2018-02-26 Yao Qi <yao.qi@linaro.org>
14282 * dwarf2read.c (load_partial_dies): Move the location of XOBNEW.
14284 2018-02-26 Alan Hayward <alan.hayward@arm.com>
14286 * arch/amd64.h: Use common/tdesc.h.
14287 * arch/i386.c: Likewise.
14288 * arch/i386.h: Likewise.
14289 * arch/tic6x.c: Likewise.
14290 * arch/tdesc.h: Move file from here...
14291 * common/tdesc.h: ...to here.
14292 * features/aarch64-core.c: Regenerate.
14293 * features/aarch64-fpu.c: Regenerate.
14294 * features/i386/32bit-avx.c: Regenerate.
14295 * features/i386/32bit-avx512.c: Regenerate.
14296 * features/i386/32bit-core.c: Regenerate.
14297 * features/i386/32bit-linux.c: Regenerate.
14298 * features/i386/32bit-mpx.c: Regenerate.
14299 * features/i386/32bit-pkeys.c: Regenerate.
14300 * features/i386/32bit-sse.c: Regenerate.
14301 * features/i386/64bit-avx.c: Regenerate.
14302 * features/i386/64bit-avx512.c: Regenerate.
14303 * features/i386/64bit-core.c: Regenerate.
14304 * features/i386/64bit-linux.c: Regenerate.
14305 * features/i386/64bit-mpx.c: Regenerate.
14306 * features/i386/64bit-pkeys.c: Regenerate.
14307 * features/i386/64bit-segments.c: Regenerate.
14308 * features/i386/64bit-sse.c: Regenerate.
14309 * features/i386/x32-core.c: Regenerate.
14310 * features/tic6x-c6xp.c: Regenerate.
14311 * features/tic6x-core.c: Regenerate.
14312 * features/tic6x-gp.c: Regenerate.
14313 * target-descriptions.c: Use common/tdesc.h.
14314 * target-descriptions.h: Likewise.
14316 2018-02-24 Tom Tromey <tom@tromey.com>
14318 * linux-thread-db.c (try_thread_db_load_from_pdir_1)
14319 (try_thread_db_load_from_dir, thread_db_load_search): Use
14321 (info_auto_load_libthread_db_compare): Return bool. Change
14323 (info_auto_load_libthread_db): Use std::vector, std::string.
14326 2018-02-24 Tom Tromey <tom@tromey.com>
14328 * i386-tdep.c (i386_fast_tracepoint_valid_at): "msg" now a
14330 * gdbarch.sh (fast_tracepoint_valid_at): Change "msg" to a
14332 * gdbarch.c: Rebuild.
14333 * gdbarch.h: Rebuild.
14334 * breakpoint.c (check_fast_tracepoint_sals): Use std::string.
14335 * arch-utils.h (default_fast_tracepoint_valid_at): Update.
14336 * arch-utils.c (default_fast_tracepoint_valid_at): "msg" now a
14339 2018-02-23 Simon Marchi <simon.marchi@polymtl.ca>
14341 * gdbtypes.h (sect_offset): Change type to uint64_t.
14342 (sect_offset_str): New function.
14343 * dwarf2read.c (create_addrmap_from_aranges): Use
14345 (error_check_comp_unit_head): Likewise.
14346 (create_debug_type_hash_table): Likewise.
14347 (read_cutu_die_from_dwo): Likewise.
14348 (init_cutu_and_read_dies): Likewise.
14349 (init_cutu_and_read_dies_no_follow): Likewise.
14350 (process_psymtab_comp_unit_reader): Likewise.
14351 (partial_die_parent_scope): Likewise.
14352 (peek_die_abbrev): Likewise.
14353 (process_queue): Likewise.
14354 (dwarf2_physname): Likewise.
14355 (read_namespace_alias): Likewise.
14356 (read_import_statement): Likewise.
14357 (create_dwo_cu_reader): Likewise.
14358 (create_cus_hash_table): Likewise.
14359 (lookup_dwo_cutu): Likewise.
14360 (inherit_abstract_dies): Likewise.
14361 (read_func_scope): Likewise.
14362 (read_call_site_scope): Likewise.
14363 (dwarf2_add_member_fn): Likewise.
14364 (read_common_block): Likewise.
14365 (read_module_type): Likewise.
14366 (read_typedef): Likewise.
14367 (read_subrange_type): Likewise.
14368 (load_partial_dies): Likewise.
14369 (read_partial_die): Likewise.
14370 (find_partial_die): Likewise.
14371 (read_str_index): Likewise.
14372 (dwarf2_string_attr): Likewise.
14373 (build_error_marker_type): Likewise.
14374 (lookup_die_type): Likewise.
14375 (dump_die_shallow): Likewise.
14376 (follow_die_ref): Likewise.
14377 (dwarf2_fetch_die_loc_sect_off): Likewise.
14378 (dwarf2_fetch_constant_bytes): Likewise.
14379 (follow_die_sig): Likewise.
14380 (get_signatured_type): Likewise.
14381 (get_DW_AT_signature_type): Likewise.
14382 (dwarf2_find_containing_comp_unit): Likewise.
14383 (set_die_type): Likewise.
14385 2018-02-21 John Baldwin <jhb@FreeBSD.org>
14387 * arch/aarch64.c: Include "common-defs.h".
14388 * arch/amd64.c: Likewise.
14389 * arch/i386.c: Likewise.
14391 2018-02-21 Tom Tromey <tom@tromey.com>
14393 * value.h: (extract_field_op): Update.
14394 * eval.c (extract_field_op): Return a const char *.
14395 * expression.h (parse_expression_for_completion): Update.
14396 * completer.c (complete_expression): Update.
14397 (add_struct_fields): Make fieldname const.
14398 * parse.c (expout_completion_name): Now a unique_xmalloc_ptr.
14399 (mark_completion_tag, parse_exp_in_context_1): Update.
14400 (parse_expression_for_completion): Change "name" to
14401 unique_xmalloc_ptr*.
14403 2018-02-21 Tom Tromey <tom@tromey.com>
14405 * infcall.c (call_function_by_hand_dummy): Use std::vector.
14407 2018-02-21 Yao Qi <yao.qi@linaro.org>
14409 * avr-tdep.c (avr_read_pc): Change parameter type to
14411 * gdbarch.sh (read_pc): Likewise.
14412 * gdbarch.c: Re-generated.
14413 * gdbarch.h: Re-generated.
14414 * hppa-tdep.c (hppa_read_pc): Change parameter type to
14416 * ia64-tdep.c (ia64_read_pc): Likewise.
14417 * mips-tdep.c (mips_read_pc): Likewise.
14418 * spu-tdep.c (spu_read_pc): Likewise.
14420 2018-02-21 Yao Qi <yao.qi@linaro.org>
14422 * Makefile.in (COMMON_SFILES): Add regcache-dump.c
14423 * regcache-dump.c: New file.
14424 * regcache.c: Move register_dump to regcache-dump.c.
14425 (maintenance_print_registers): Likewise.
14426 (maintenance_print_raw_registers): Likewise.
14427 (maintenance_print_cooked_registers): Likewise.
14428 (maintenance_print_register_groups): Likewise.
14429 (maintenance_print_remote_registers): Likewise.
14430 (_initialize_regcache): Likewise.
14431 * regcache.h (register_dump): Moved from regcache.c.
14433 2018-02-21 Yao Qi <yao.qi@linaro.org>
14435 * regcache.c (regcache::regcache): Update.
14436 (regcache::invalidate): Move it to detached_regcache::invalidate.
14437 (get_thread_arch_aspace_regcache): Update.
14438 (regcache::raw_update): Update.
14439 (regcache::cooked_read): Remove some code.
14440 (regcache::cooked_read_value): Likewise.
14441 (regcache::raw_write): Remove assert on m_readonly_p.
14442 (regcache::raw_supply_integer): Move it to
14443 detached_regcache::raw_supply_integer.
14444 (regcache::raw_supply_zeroed): Likewise.
14445 * regcache.h (detached_regcache) <raw_supply_integer>: New
14447 <raw_supply_zeroed, invalidate>: Likewise.
14448 (regcache) <raw_supply_integer, raw_supply_zeroed>: Removed.
14449 <invalidate>: Likewise.
14450 <m_readonly_p>: Removed.
14452 2018-02-21 Yao Qi <yao.qi@linaro.org>
14454 * infcmd.c (get_return_value): Let stop_regs point to
14455 get_current_regcache.
14456 * regcache.c (regcache::regcache): Remove.
14457 (register_dump_reg_buffer): New class.
14458 (regcache_print): Adjust.
14459 * regcache.h (regcache): Remove constructors.
14461 2018-02-21 Yao Qi <yao.qi@linaro.org>
14463 * regcache.c (class register_dump): New class.
14464 (register_dump_regcache, register_dump_none): New class.
14465 (register_dump_remote, register_dump_groups): New class.
14466 (regcache_print): Update.
14467 * regcache.h (regcache_dump_what): Move it to regcache.c.
14468 (regcache) <dump>: Remove.
14470 2018-02-21 Yao Qi <yao.qi@linaro.org>
14472 * jit.c (struct jit_unwind_private) <regcache>: Change its type to
14474 (jit_unwind_reg_set_impl): Call raw_supply.
14475 (jit_frame_sniffer): Use reg_buffer_rw.
14476 * record-full.c (record_full_core_regbuf): Change its type.
14477 (record_full_core_open_1): Use reg_buffer_rw.
14478 (record_full_close): Likewise.
14479 (record_full_core_fetch_registers): Use regcache->raw_supply.
14480 (record_full_core_store_registers): Likewise.
14481 * regcache.c (regcache::get_register_status): Move it to
14483 (regcache_raw_set_cached_value): Remove.
14484 (regcache::raw_set_cached_value): Remove.
14485 (regcache::raw_write): Call raw_supply.
14486 (regcache::raw_supply): Move it to reg_buffer_rw.
14487 * regcache.h (regcache_raw_set_cached_value): Remove.
14488 (reg_buffer_rw): New class.
14490 2018-02-21 Yao Qi <yao.qi@linaro.org>
14492 * dummy-frame.c (dummy_frame_cache) <prev_regcache>: Use
14493 readonly_detached_regcache.
14494 (dummy_frame_prev_register): Use regcache->cooked_read.
14495 * frame.c (frame_save_as_regcache): Change return type.
14496 (frame_pop): Update.
14497 * frame.h (frame_save_as_regcache): Update declaration.
14498 * inferior.h (get_infcall_suspend_state_regcache): Update
14500 * infrun.c (infcall_suspend_state) <registers>: use
14501 readonly_detached_regcache.
14502 (save_infcall_suspend_state): Don't use regcache_dup.
14503 (get_infcall_suspend_state_regcache): Change return type.
14504 * linux-fork.c (struct fork_info) <savedregs>: Change to
14505 readonly_detached_regcache.
14507 (fork_save_infrun_state): Don't use regcache_dup.
14508 (info_checkpoints_command): Adjust.
14509 * mi/mi-main.c (register_changed_p): Update declaration.
14510 (mi_cmd_data_list_changed_registers): Use
14511 readonly_detached_regcache.
14512 (register_changed_p): Change parameter type to
14513 readonly_detached_regcache.
14514 * ppc-linux-tdep.c (ppu2spu_cache) <regcache>: Use
14515 readonly_detached_regcache.
14516 (ppu2spu_sniffer): Construct a new readonly_detached_regcache.
14517 * regcache.c (readonly_detached_regcache::readonly_detached_regcache):
14519 (regcache::save): Move it to reg_buffer.
14520 (regcache::restore): Change parameter type.
14521 (regcache_dup): Remove.
14522 * regcache.h (reg_buffer) <save>: New method.
14523 (readonly_detached_regcache): New class.
14524 * spu-tdep.c (spu2ppu_cache) <regcache>: Use
14525 readonly_detached_regcache.
14526 (spu2ppu_sniffer): Construct a new readonly_detached_regcache.
14528 2018-02-21 Yao Qi <yao.qi@linaro.org>
14530 * frame.c (frame_save_as_regcache): Use regcache method save.
14531 (frame_pop): Use regcache method restore.
14532 * infrun.c (restore_infcall_suspend_state): Likewise.
14533 * linux-fork.c (fork_load_infrun_state): Likewise.
14534 * ppc-linux-tdep.c (ppu2spu_sniffer): User regcache method
14536 * regcache.c (regcache_save): Remove.
14537 (regcache::restore): More asserts.
14538 (regcache_cpy): Remove.
14539 * regcache.h (regcache_save): Remove the declaration.
14540 (regcache::restore): Move from private to public.
14541 Remove the friend declaration of regcache_cpy.
14542 (regcache_cpy): Remove declaration.
14544 2018-02-21 Yao Qi <yao.qi@linaro.org>
14546 * aarch64-tdep.c (aarch64_pseudo_register_read_value): Change
14547 parameter type to 'readable_regcache *'.
14548 * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
14549 * arm-tdep.c (arm_neon_quad_read): Likewise.
14550 (arm_pseudo_read): Likewise.
14551 * avr-tdep.c (avr_pseudo_register_read): Likewise.
14552 * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
14553 * frv-tdep.c (frv_pseudo_register_read): Likewise.
14554 * gdbarch.c: Re-generated.
14555 * gdbarch.h: Re-generated.
14556 * gdbarch.sh (pseudo_register_read): Change parameter type to
14557 'readable_regcache *'.
14558 (pseudo_register_read_value): Likewise.
14559 * h8300-tdep.c (pseudo_from_raw_register): Likewise.
14560 (h8300_pseudo_register_read): Likewise.
14561 * hppa-tdep.c (hppa_pseudo_register_read): Likewise.
14562 * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
14563 (i386_pseudo_register_read_into_value): Likewise.
14564 (i386_pseudo_register_read_value): Likewise.
14565 * i386-tdep.h (i386_pseudo_register_read_into_value): Update
14567 * ia64-tdep.c (ia64_pseudo_register_read): Likewise.
14568 * m32c-tdep.c (m32c_raw_read): Likewise.
14569 (m32c_read_flg): Likewise.
14570 (m32c_banked_register): Likewise.
14571 (m32c_banked_read): Likewise.
14572 (m32c_sb_read): Likewise.
14573 (m32c_part_read): Likewise.
14574 (m32c_cat_read): Likewise.
14575 (m32c_r3r2r1r0_read): Likewise.
14576 (m32c_pseudo_register_read): Likewise.
14577 * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
14578 * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
14579 (mep_pseudo_cr64_read): Likewise.
14580 (mep_pseudo_register_read): Likewise.
14581 * mips-tdep.c (mips_pseudo_register_read): Likewise.
14582 * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
14583 * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
14584 * regcache.c (regcache::raw_read): Move it to readable_regcache.
14585 (regcache::cooked_read): Likewise.
14586 (regcache::cooked_read_value): Likewise.
14587 (regcache_cooked_read_signed):
14588 (regcache::cooked_read): Likewise.
14589 * regcache.h (readable_regcache): New class.
14590 (regcache): Inherit readable_regcache. Move some methods to
14592 * rl78-tdep.c (rl78_pseudo_register_read): Change
14593 parameter type to 'readable_regcache *'.
14594 * rs6000-tdep.c (do_regcache_raw_read): Remove.
14595 (e500_pseudo_register_read): Change parameter type to
14596 'readable_regcache *'.
14597 (dfp_pseudo_register_read): Likewise.
14598 (vsx_pseudo_register_read): Likewise.
14599 (efpr_pseudo_register_read): Likewise.
14600 * s390-tdep.c (s390_pseudo_register_read): Likewise.
14601 * sh-tdep.c (sh_pseudo_register_read): Likewise.
14602 * sh64-tdep.c (pseudo_register_read_portions): Likewise.
14603 (sh64_pseudo_register_read): Likewise.
14604 * sparc-tdep.c (sparc32_pseudo_register_read): Likewise.
14605 * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
14606 * spu-tdep.c (spu_pseudo_register_read_spu): Likewise.
14607 (spu_pseudo_register_read): Likewise.
14608 * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
14609 (xtensa_pseudo_register_read): Likewise.
14611 2018-02-21 Yao Qi <yao.qi@linaro.org>
14613 * regcache.c (regcache::regcache): Call reg_buffer ctor.
14614 (regcache::arch): Move it to reg_buffer::arch.
14615 (regcache::register_buffer): Likewise.
14616 (regcache::assert_regnum): Likewise.
14617 (regcache::num_raw_registers): Likewise.
14618 * regcache.h (reg_buffer): New class.
14619 (regcache): Inherit reg_buffer.
14621 2018-02-20 Simon Marchi <simon.marchi@ericsson.com>
14623 * remote-sim.c (gdb_os_printf_filtered, gdb_os_vprintf_filtered,
14624 gdb_os_evprintf_filtered, gdb_os_error): Add ATTRIBUTE_PRINTF.
14626 2018-02-20 Markus Metzger <markus.t.metzger@intel.com>
14628 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add mkstemp.
14630 2018-02-19 Alan Hayward <alan.hayward@arm.com>
14632 * Makefile.in: (COMMON_SFILES): Add common/*.c files.
14633 (SFILES): Remove common/*.c files.
14634 (COMMON_OBS): Remove some *.o files built from common/*.c files.
14635 * common/common.host: Add common reference.
14636 * configure.ac: Likewise.
14637 * configure: Regenerate.
14639 2018-02-16 Yao Qi <yao.qi@linaro.org>
14641 * block.c (block_namespace_info): Inherit allocate_on_obstack.
14642 (block_initialize_namespace): Use new.
14643 * dwarf2read.c (dwarf2_per_objfile): Inherit allocate_on_obstack.
14644 (dwarf2_free_objfile): Use delete.
14645 * gdbtypes.c (type_pair): Inherit allocate_on_obstack.
14646 (copy_type_recursive): Use new.
14647 * gdb_obstack.h (allocate_on_obstack): New.
14649 2018-02-15 Yao Qi <yao.qi@linaro.org>
14652 * inferior.c (exit_inferior_1): Reset inf->control.
14654 2018-02-15 Joel Brobecker <brobecker@adacore.com>
14656 * ada-lang.c (ada_to_fixed_value_create): Delete advance
14659 2018-02-14 Pedro Alves <palves@redhat.com>
14661 * frame-unwind.c (frame_unwind_try_unwinder): Always call
14662 frame_cleanup_after_sniffer on exception.
14664 2018-02-14 Tom Tromey <tom@tromey.com>
14666 * solist.h (struct target_so_ops) <bfd_open>: Make pathname
14668 (solib_bfd_open): Make pathname const.
14669 * solib.c (solib_bfd_open): Make pathname const.
14670 * solib-spu.c (spu_bfd_fopen): Make name const.
14671 (spu_bfd_open): Make pathname const.
14672 * solib-darwin.c (darwin_bfd_open): Make pathname const.
14673 * solib-aix.c (solib_aix_bfd_open): Make pathname const.
14675 2018-02-14 Tom Tromey <tom@tromey.com>
14677 * symfile.c (symfile_bfd_open): Update.
14678 * source.h (openp, source_full_path_of, find_and_open_source):
14679 Change argument type to unique_xmalloc_ptr.
14680 * source.c (openp): Take a unique_xmalloc_ptr.
14681 (source_full_path_of, find_and_open_source): Likewise.
14682 (open_source_file, symtab_to_fullname): Update.
14683 * solist.h (struct target_so_ops) <find_and_open_solib>: Take a
14684 unique_xmalloc_ptr.
14685 * solib.c (solib_find_1): Use unique_xmalloc_ptr.
14686 (exec_file_find): Update.
14687 * psymtab.c (psymtab_to_fullname): Update.
14688 * nto-tdep.h (nto_find_and_open_solib): Update.
14689 * nto-tdep.c (nto_find_and_open_solib): Change temp_path to a
14690 unique_xmalloc_ptr.
14691 * exec.c (exec_file_attach): Update.
14692 * dwarf2read.c (try_open_dwop_file): Use unique_xmalloc_ptr.
14693 * cli/cli-cmds.c (find_and_open_script): Use unique_xmalloc_ptr.
14695 2018-02-14 Tom Tromey <tom@tromey.com>
14697 * solib.c: Include source.h.
14698 * nto-tdep.c: Include source.h.
14699 * mi/mi-cmd-env.c: Include source.h.
14700 * infcmd.c: Include source.h.
14701 * exec.c: Include source.h.
14702 * defs.h (enum openp_flag, openp, source_full_path_of, mod_path)
14703 (add_path, directory_switch, source_path, init_source_path): Move
14705 * source.h (enum openp_flag, openp, source_full_path_of, mod_path)
14706 (add_path, directory_switch, source_path, init_source_path):
14709 2018-02-14 Tom Tromey <tom@tromey.com>
14711 * solist.h (exec_file_find, solib_find): Return
14712 unique_xmalloc_ptr.
14713 (solib_bfd_fopen): Take a const char *.
14714 * solib.c (solib_find_1): Return unique_xmalloc_ptr.
14715 (exec_file_find, solib_find): Likewise.
14716 (solib_bfd_fopen): Do not take ownership of "pathname".
14717 (solib_bfd_open): Use unique_xmalloc_ptr.
14718 * solib-darwin.c (darwin_bfd_open): Use unique_xmalloc_ptr.
14719 * solib-aix.c (solib_aix_bfd_open): Use unique_xmalloc_ptr.
14720 * infrun.c (follow_exec): Use unique_xmalloc_ptr.
14721 * exec.c (exec_file_locate_attach): Use unique_xmalloc_ptr.
14723 2018-02-14 Joel Brobecker <brobecker@adacore.com>
14725 * ada-lang.c (name_match_type_from_name): Remove reference to
14726 ada_name_for_lookup in function's documentation.
14727 * ada-lang.h (ada_name_for_lookup): Delete declaration.
14729 2018-02-13 Simon Marchi <simon.marchi@polymtl.ca>
14731 * defs.h (enum openp_flags): New enum.
14732 (OPF_TRY_CWD_FIRST, OPF_SEARCH_IN_PATH, OPF_RETURN_REALPATH):
14733 Move to enum openp_flags.
14734 (openp_flags): New enum flags.
14735 (openp): Change parameter type to openp_flags.
14736 * source.c (openp): Change parameter type to openp_flags.
14737 * cli/cli-cmds.c (find_and_open_script): Use openp_flags.
14738 * dwarf2read.c (try_open_dwop_file): Use openp_flags.
14740 2018-02-13 Simon Marchi <simon.marchi@polymtl.ca>
14742 * maint.c (_initialize_maint_cmds): Fix prefix of maint set/show
14745 2018-02-12 Andrew Burgess <andrew.burgess@embecosm.com>
14747 * dwarf2read.c (dwarf2_release_queue): Delete function, move body
14749 (class dwarf2_queue_guard): ...the destructor of this new class.
14750 (dw2_do_instantiate_symtab): Create instance of the new class
14751 dwarf2_queue_guard, remove cleanup.
14753 2018-02-09 Tom Tromey <tom@tromey.com>
14755 * source.c (find_source_lines): Don't reference past the end of
14758 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
14760 * remote.c (remote_btrace_maybe_reopen): Change error message.
14761 * btrace.c (btrace_enable): Likewise.
14762 (parse_xml_btrace): Likewise.
14763 (parse_xml_btrace_conf): Likewise.
14765 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
14767 * nat/linux-btrace.c (diagnose_perf_event_open_fail): New.
14768 (linux_enable_pt, linux_enable_bts): Call
14769 diagnose_perf_event_open_fail.
14771 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
14773 * nat/linux-btrace.c (perf_event_pt_event_type): Improve error message.
14774 Remove parameter and change return type. Update callers. Move it.
14775 (linux_enable_bts, linux_enable_pt): Improve error message.
14776 (linux_enable_pt): Remove zero buffer size check.
14777 (linux_enable_btrace): Improve error messages. Remove NULL return
14780 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
14782 * btrace.c (btrace_enable): Remove target_supports_btrace call.
14783 * nat/linux-btrace.c (perf_event_pt_event_type): Move.
14784 (kernel_supports_bts, kernel_supports_pt, linux_supports_bts)
14785 (linux_supports_pt, linux_supports_btrace): Remove.
14786 (linux_enable_bts): Call cpu_supports_bts.
14787 * nat/linux-btrace.h (linux_supports_btrace): Remove.
14788 * remote.c (remote_supports_btrace): Remove.
14789 (init_remote_ops): Remove remote_supports_btrace.
14790 * target-delegates.c: Regenerated.
14791 * target.c (target_supports_btrace): Remove.
14792 * target.h (target_ops) <to_supports_btrace>: Remove
14793 (target_supports_btrace): Remove.
14794 * x86-linux-nat.c (x86_linux_create_target): Remove
14795 linux_supports_btrace.
14797 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
14799 * nat/linux-btrace.c (linux_enable_btrace): Throw exception if enabling
14801 * x86-linux-nat.c (x86_linux_enable_btrace): Catch btrace enabling
14802 exception and use message in own exception.
14804 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
14806 * nat/linux-btrace.c: Include scoped_fd.h and scoped_mmap.h.
14807 (perf_event_pt_event_type): Use gdb_file_up.
14808 (linux_enable_bts, linux_enable_pt): Use gdb::unique_xmalloc_ptr,
14809 scoped_fd, and scoped_mmap.
14811 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
14813 * common/scoped_mmap.h: New.
14814 * unittests/scoped_mmap-selftest.c: New.
14815 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
14816 unittests/scoped_mmap-selftest.c.
14818 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
14820 * common/scoped_fd.h: New.
14821 * unittests/scoped_fd-selftest.c: New.
14822 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
14823 unittests/scoped_fd-selftest.c.
14825 2018-02-09 Tom Tromey <tom@tromey.com>
14827 * auto-load.c (auto_load_section_scripts): Use
14828 gdb::unique_xmalloc_ptr.
14830 2018-02-09 Tom Tromey <tom@tromey.com>
14832 * auto-load.c (execute_script_contents): Use std::string.
14834 2018-02-09 Joel Brobecker <brobecker@adacore.com>
14836 * NEWS <Changes in GDB 8.1>: Clarify that "rbreak" is a new
14837 Python function, rather than a new command.
14839 2018-02-08 Tom Tromey <tom@tromey.com>
14841 * solib.c (solib_find_1): Use std::string.
14842 (solib_bfd_fopen): Use unique_xmalloc_ptr.
14844 2018-02-08 Tom Tromey <tom@tromey.com>
14846 * build-id.c (build_id_to_debug_bfd): Use unique_xmalloc_ptr.
14848 2018-02-08 Tom Tromey <tom@tromey.com>
14850 * source.c (find_source_lines): Use gdb::def_vector.
14852 2018-02-08 Tom Tromey <tom@tromey.com>
14854 * macrocmd.c (struct temporary_macro_definition): New.
14855 (macro_define_command): Use temporary_macro_definition. Remove
14857 (free_macro_definition_ptr): Remove.
14859 2018-02-08 Tom Tromey <tom@tromey.com>
14861 * macroexp.c (maybe_expand): Use std::string.
14863 2018-02-08 Tom Tromey <tom@tromey.com>
14865 * macroexp.c (struct macro_buffer): Add initializers for some
14867 (init_buffer, init_shared_buffer, free_buffer)
14868 (free_buffer_return_text): Remove.
14869 (macro_buffer): New constructors.
14870 (~macro_buffer): New destructor.
14871 (macro_buffer::set_shared): New method.
14872 (macro_buffer::resize_buffer, macro_buffer::appendc)
14873 (macro_buffer::appendmem): Now methods, not free functions.
14874 (set_token, append_tokens_without_splicing, stringify)
14875 (macro_stringify): Update.
14876 (gather_arguments): Change return type. Remove argc_p argument,
14877 add args_ptr argument. Use std::vector.
14878 (substitute_args): Remove argc argument. Accept std::vector.
14879 (expand): Update. Use std::vector.
14880 (scan, macro_expand, macro_expand_next): Update.
14882 2018-02-08 Tom Tromey <tom@tromey.com>
14884 * symtab.c (default_collect_symbol_completion_matches_break_on):
14885 Use unique_xmalloc_ptr.
14886 * macroscope.h: (sal_macro_scope, user_macro_scope)
14887 (default_macro_scope): Return unique_xmalloc_ptr.
14888 * macroscope.c (sal_macro_scope, user_macro_scope)
14889 (default_macro_scope): Return unique_xmalloc_ptr.
14890 * macroexp.h (macro_expand, macro_expand_once): Return
14891 unique_xmalloc_ptr.
14892 * macroexp.c (macro_expand, macro_expand_once): Return
14893 unique_xmalloc_ptr.
14894 * macrocmd.c (macro_expand_command, macro_expand_once_command)
14895 (info_macro_command, info_macros_command): Use
14896 unique_xmalloc_ptr.
14897 * compile/compile-c-support.c (write_macro_definitions): Use
14898 unique_xmalloc_ptr.
14899 * c-exp.y (c_parse): Use unique_xmalloc_ptr.
14901 2018-02-07 Simon Marchi <simon.marchi@ericsson.com>
14903 * value.c (value_static_field): Assign field type instead of
14904 containing type when returning an optimized out value.
14906 2018-02-06 Yao Qi <yao.qi@linaro.org>
14908 * ft32-tdep.c (ft32_read_pc): Remove.
14909 (ft32_write_pc): Remove.
14910 (ft32_gdbarch_init): Update.
14911 * m32r-tdep.c (m32r_read_pc): Remove.
14912 (m32r_gdbarch_init): Update.
14913 * mep-tdep.c (mep_read_pc): Remove.
14914 (mep_gdbarch_init): Update.
14915 * microblaze-tdep.c (microblaze_write_pc): Remove.
14916 (microblaze_gdbarch_init): Update.
14917 * mn10300-tdep.c (mn10300_read_pc): Remove.
14918 (mn10300_write_pc): Remove.
14919 (mn10300_gdbarch_init): Update.
14920 * moxie-tdep.c (moxie_read_pc): Remove.
14921 (moxie_write_pc): Remove.
14922 (moxie_gdbarch_init): Update.
14924 2018-02-06 Yao Qi <yao.qi@linaro.org>
14926 * expprint.c (print_subexp_standard): Handle
14927 OP_F77_UNDETERMINED_ARGLIST.
14928 (dump_subexp_body_standard): Likewise.
14930 2018-02-05 Alan Hayward <alan.hayward@arm.com>
14932 * target-descriptions.c (tdesc_element_visitor) Add empty
14934 (tdesc_type): Move make_gdb_type from here.
14935 (tdesc_type_builtin): Likewise.
14936 (tdesc_type_vector): Likewise.
14937 (tdesc_type_with_fields): Move make_gdb_type_ functions from here.
14938 (make_gdb_type_struct): Move from tdesc_type_with_fields.
14939 (make_gdb_type_union): Likewise.
14940 (make_gdb_type_flags): Likewise.
14941 (make_gdb_type_enum): Likewise.
14942 (make_gdb_type): New function.
14943 (tdesc_register_type): Use static make_gdb_type.
14945 2018-02-05 Ruslan Kabatsayev <b7.10110111@gmail.com>
14947 * infcmd.c (default_print_one_register_info): Align natural-format
14948 column values consistently one under another.
14949 (pad_to_column): New function.
14951 2018-02-05 Joel Brobecker <brobecker@adacore.com>
14953 * dwarf2read.c (dwarf2_physname): Move commment.
14955 2018-02-01 Leszek Swirski <leszeks@google.com>
14957 * varobj.c (varobj_formatted_print_options): Allow recursive
14958 pretty printing if pretty printing is enabled.
14960 2018-02-01 Leszek Swirski <leszeks@google.com>
14962 * c-exp.y (lex_one_token, classify_name, yylex): Don't classify
14963 names after a structop as a filename.
14965 2018-02-01 Yao Qi <yao.qi@linaro.org>
14967 * arm-tdep.c (arm_record_data_proc_misc_ld_str): Rewrite it.
14968 (arm_record_coproc_data_proc): Likewise.
14970 2018-02-01 Yao Qi <yao.qi@linaro.org>
14972 * arm-tdep.c (arm_record_extension_space): Change ret to signed.
14974 2018-01-31 Nikola Prica <nikola.prica@rt-rk.com>
14976 * rs6000-tdep.c (skip_prologue): Remove shifting for lr_reg and
14977 assign shifted lr_reg to fdata->lr_register when lr_reg is set.
14979 2018-01-31 Pedro Alves <palves@redhat.com>
14981 * darwin-nat.c (darwin_interrupt): Remove ptid_t parameter.
14982 * inflow.c (child_terminal_save_inferior): Wrap reference to
14983 tcgetpgrp in HAVE_TERMIOS_H.
14984 (child_interrupt, child_pass_ctrlc): Wrap references to signal in
14986 * remote-sim.c (gdbsim_interrupt): Remove ptid_t parameter and
14987 always iterate over all inferiors.
14988 (gdbsim_cntrl_c): Adjust.
14989 * windows-nat.c (windows_interrupt): Remove 'ptid_t' parameter.
14991 2018-01-31 Joel Brobecker <brobecker@adacore.com>
14993 * gdbtypes.c (lookup_array_range_type): Make sure the array's
14994 index type is objfile-owned if the element type is as well.
14996 2018-01-31 Joel Brobecker <brobecker@adacore.com>
15000 2018-01-30 Philipp Rudo <prudo@linux.vnet.ibm.com>
15002 * s390-linux-tdep.c: Remove includes "features/s390-linux32.c" and
15003 "features/s390x-linux64.c".
15004 (_initialize_s390_linux_tdep): Remove initialization of tdescs
15005 s390_linux32 and s390x_linux64.
15006 (s390_linux_init_abi_31, s390_linux_init_abi_64): Don't set
15008 * s390-tdep.c: Include "features/s390-linux32.c" and
15009 "features/s390x-linux64.c".
15010 (s390_tdesc_valid): Add check for tdesc_has_registers.
15011 (s390_gdbarch_init): Make sure there is always a valid tdesc.
15012 (_initialize_s390_tdep): Initialize tdesc_s390_linux32 and
15013 tdesc_s390x_linux64.
15014 * s390-linux-tdep.h: Move export of tdesc_s390_linux32 and
15015 tdesc_s390x_linux64 to...
15016 * s390-tdep.h: ...here.
15018 2018-01-30 Pedro Alves <palves@redhat.com>
15021 * config.in, configure: Regenerate.
15022 * configure.ac: Check for getpgid.
15023 * go32-nat.c (go32_pass_ctrlc): New.
15024 (go32_target): Install it.
15025 * inf-child.c (inf_child_target): Install
15026 child_terminal_save_inferior, child_pass_ctrlc and
15028 * inf-ptrace.c (inf_ptrace_interrupt): Delete.
15029 (inf_ptrace_target): No longer install it.
15030 * infcmd.c (interrupt_target_1): Adjust.
15031 * inferior.h (child_terminal_save_inferior, child_pass_ctrlc)
15032 (child_interrupt): Declare.
15033 (inferior::terminal_state): New.
15034 * inflow.c (struct terminal_info): Update comments.
15035 (inferior_process_group): Delete.
15036 (terminal_is_ours): Delete.
15037 (gdb_tty_state): New.
15038 (child_terminal_init): Adjust.
15039 (is_gdb_terminal, sharing_input_terminal_1)
15040 (sharing_input_terminal): New functions.
15041 (child_terminal_inferior): Adjust. Use sharing_input_terminal.
15042 Set the process's actual process group in the foreground if
15043 possible. Handle is_ours_for_output/is_ours distinction. Don't
15044 mark terminal as the inferior's if not sharing GDB's terminal.
15045 Don't check attach_flag.
15046 (child_terminal_ours_for_output, child_terminal_ours): Adjust to
15047 pass down a target_terminal_state.
15048 (child_terminal_save_inferior): New, factored out from ...
15049 (child_terminal_ours_1): ... this. Handle
15050 target_terminal_state::is_ours_for_output.
15051 (child_interrupt, child_pass_ctrlc): New.
15052 (inflow_inferior_exit): Clear the inferior's terminal_state.
15053 (copy_terminal_info): Copy the inferior's terminal state.
15054 (_initialize_inflow): Remove reference to terminal_is_ours.
15055 * inflow.h (inferior_process_group): Delete.
15056 * nto-procfs.c (nto_handle_sigint, procfs_interrupt): Adjust.
15057 * procfs.c (procfs_target): Don't install procfs_interrupt.
15058 (procfs_interrupt): Delete.
15059 * remote.c (remote_serial_quit_handler): Adjust.
15060 (remote_interrupt): Remove ptid parameter. Adjust.
15061 * target-delegates.c: Regenerate.
15062 * target.c: Include "terminal.h".
15063 (target_terminal::terminal_state): Rename to ...
15064 (target_terminal::m_terminal_state): ... this.
15065 (target_terminal::init): Adjust.
15066 (target_terminal::inferior): Adjust to per-inferior
15068 (target_terminal::restore_inferior, target_terminal_is_ours_kind): New.
15069 (target_terminal::ours, target_terminal::ours_for_output): Use
15070 target_terminal_is_ours_kind.
15071 (target_interrupt): Remove ptid parameter. Adjust.
15072 (default_target_pass_ctrlc): Adjust.
15073 * target.h (target_ops::to_terminal_save_inferior): New field.
15074 (target_ops::to_interrupt): Remove ptid_t parameter.
15075 (target_interrupt): Remove ptid_t parameter. Update comment.
15076 (target_pass_ctrlc): Update comment.
15077 * target/target.h (target_terminal_state): New scoped enum,
15078 factored out of ...
15079 (target_terminal::terminal_state): ... here.
15080 (target_terminal::inferior): Update comments.
15081 (target_terminal::restore_inferior): New.
15082 (target_terminal::is_inferior, target_terminal::is_ours)
15083 (target_terminal::is_ours_for_output): Adjust.
15084 (target_terminal::scoped_restore_terminal_state): Adjust to
15085 rename, and call restore_inferior() instead of inferior().
15086 (target_terminal::scoped_restore_terminal_state::m_state): Change
15088 (target_terminal::terminal_state): Rename to ...
15089 (target_terminal::m_terminal_state): ... this and change type.
15091 2018-01-30 Pedro Alves <palves@redhat.com>
15093 * linux-nat.c (wait_for_signal): New function.
15094 (wait_lwp, linux_nat_wait_1): Use it instead of calling sigsuspend
15096 (async_terminal_is_ours)
15097 (linux_nat_terminal_inferior, linux_nat_terminal_ours): Delete.
15098 (linux_nat_add_target): Don't override
15099 to_terminal_inferior/to_terminal_ours.
15101 2018-01-29 Sergio Durigan Junior <sergiodj@redhat.com>
15103 * remote.c (remote_follow_fork): Don't call "detach_inferior".
15105 2018-01-28 Simon Marchi <simon.marchi@ericsson.com>
15107 * dwarf2read.c (free_dwo_files): Add forward-declaration.
15108 (dwarf2_per_objfile::~dwarf2_per_objfile): Move content from
15109 dwarf2_per_objfile_free here.
15110 (dwarf2_per_objfile_free): Remove.
15111 (_initialize_dwarf2_read): Don't register
15112 dwarf2_per_objfile_free as a registry cleanup.
15114 2018-01-27 Eli Zaretskii <eliz@gnu.org>
15116 Avoid compilation errors in MinGW native builds
15118 The error is triggered by including python-internal.h, and the
15121 In file included from d:\usr\lib\gcc\mingw32\6.3.0\include\c++\math.h:36:0,
15122 from build-gnulib/import/math.h:27,
15123 from d:/usr/Python26/include/pyport.h:235,
15124 from d:/usr/Python26/include/Python.h:58,
15125 from python/python-internal.h:94,
15126 from python/py-arch.c:24:
15127 d:\usr\lib\gcc\mingw32\6.3.0\include\c++\cmath:1157:11: error: '::hypot' has not been declared
15131 This happens because Python headers define 'hypot' to expand t
15132 '_hypot' in the Windows builds.
15133 * python/python-internal.h (_hypot) [__MINGW32__]: Define back to
15134 'hypoth'. This avoids a compilation error.
15136 2018-01-26 Alan Hayward <alan.hayward@arm.com>
15138 * MAINTAINERS (Write After Approval): Fix ordering.
15140 2018-01-26 Alan Hayward <alan.hayward@arm.com>
15142 * MAINTAINERS (Write After Approval): Add Alan Hayward.
15144 2018-01-26 Alan Modra <amodra@gmail.com>
15146 * ppc-linux-tdep.c (powerpc32_plt_stub): Make const.
15147 (powerpc32_plt_stub_so_1): Rename from powerpc32_plt_stub_so.
15148 Remove nop. Make const. Comment.
15149 (powerpc32_plt_stub_so_2): New.
15150 (POWERPC32_PLT_CHECK_LEN): Rename from POWERPC32_PLT_STUB_LEN.
15151 Correct count. Update uses.
15152 (ppc_skip_trampoline_code): Match powerpc32_plt_stub_so_2 too.
15153 Move common code reading PLT entry word. Correct
15154 powerpc32_plt_stub PLT address calculation.
15155 * ppc64-tdep.c (ppc64_standard_linkage1): Make const.
15156 (ppc64_standard_linkage2, ppc64_standard_linkage3): Likewise.
15157 (ppc64_standard_linkage4, ppc64_standard_linkage5): Likewise.
15158 (ppc64_standard_linkage6, ppc64_standard_linkage7): Likewise.
15159 (ppc64_standard_linkage8): Likewise.
15160 * rs6000-tdep.c (ppc_insns_match_pattern): Make pattern const.
15161 Correct insns description.
15162 * ppc-tdep.h (ppc_insns_match_pattern): Update prototype.
15164 2018-01-24 Pedro Alves <palves@redhat.com>
15166 GCC PR libstdc++/83906
15167 * gdbtypes.c (operator==(const dynamic_prop &,
15168 const dynamic_prop &)): New.
15169 (operator==(const range_bounds &, const range_bounds &)): New.
15170 (check_types_equal): Use them instead of memcmp.
15171 * gdbtypes.h (operator==(const dynamic_prop &,
15172 const dynamic_prop &)): Declare.
15173 (operator!=(const dynamic_prop &, const dynamic_prop &)): Declare.
15174 (operator==(const range_bounds &, const range_bounds &)): Declare.
15175 (operator!=(const range_bounds &, const range_bounds &)): Declare.
15177 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
15179 * s390-linux-tdep.c (s390_record_address_mask)
15180 (s390_record_calc_disp_common, s390_record_calc_disp)
15181 (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
15182 (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
15183 (s390_process_record): Move to s390-tdep.c.
15184 (s390_linux_init_abi_any): Adjust.
15185 * s390-tdep.c (s390_record_address_mask)
15186 (s390_record_calc_disp_common, s390_record_calc_disp)
15187 (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
15188 (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
15189 (s390_process_record): Moved from s390-linux-tdep.c
15190 (s390_gdbarch_init): Adjust.
15192 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
15194 * s390-linux-nat.c (s390-tdep.h): New include.
15195 * Makefile.in (ALL_TARGET_OBS): Add s390-tdep.o.
15196 (HFILES_NO_SRCDIR): Add s390-tdep.h.
15197 (ALLDEPFILES): Add s390-tdep.c.
15198 * configure.tgt (s390*-*-linux*): Add s390-tdep.o.
15199 * s390-linux-tdep.h (HWCAP_S390_*, S390_*_REGNUM): Move to...
15200 * s390-tdep.h: ...this. New file.
15201 * s390-linux-tdep.c (s390-tdep.h): New include.
15202 (_initialize_s390_tdep): Rename to...
15203 (_initialize_s390_linux_tdep): ...this and adjust.
15204 (s390_abi_kind, s390_vector_abi_kind, gdbarch_tdep)
15205 (enum named opcodes, S390_NUM_GPRS, S390_NUM_FPRS): Move to
15207 (s390_break_insn, s390_breakpoint, s390_readinstruction, is_ri)
15208 (is_ril, is_rr, is_rre, is_rs, is_rsy, is_rx, is_rxy)
15209 (s390_is_partial_instruction, s390_software_single_step)
15210 (is_non_branch_ril, s390_displaced_step_copy_insn)
15211 (s390_displaced_step_fixup, s390_displaced_step_hw_singlestep)
15212 (s390_prologue_data, s390_addr, s390_store, s390_load)
15213 (s390_check_for_saved, s390_analyze_prologue, s390_skip_prologue)
15214 (s390_register_call_saved, s390_guess_tracepoint_registers)
15215 (s390_register_name, s390_dwarf_regmap, s390_dwarf_reg_to_regnum)
15216 (regnum_is_gpr_full, regnum_is_vxr_full, s390_value_from_register)
15217 (s390_pseudo_register_name, s390_pseudo_register_type)
15218 (s390_pseudo_register_read, s390_pseudo_register_write)
15219 (s390_pseudo_register_reggroup_p, s390_ax_pseudo_register_collect)
15220 (s390_ax_pseudo_register_push_stack, s390_gen_return_address)
15221 (s390_addr_bits_remove, s390_address_class_type_flags)
15222 (s390_address_class_type_flags_to_name)
15223 (s390_address_class_name_to_type_flags, s390_effective_inner_type)
15224 (s390_function_arg_float, s390_function_arg_vector)
15225 (is_power_of_two, s390_function_arg_integer, s390_arg_state)
15226 (s390_handle_arg, s390_push_dummy_call, s390_dummy_id)
15227 (s390_frame_align, s390_register_return_value, s390_return_value)
15228 (s390_stack_frame_destroyed_p, s390_unwind_pc, s390_unwind_sp)
15229 (s390_unwind_pseudo_register, s390_adjust_frame_regnum)
15230 (s390_dwarf2_prev_register, s390_dwarf2_frame_init_reg)
15231 (s390_trad_frame_prev_register, s390_unwind_cache)
15232 (s390_prologue_frame_unwind_cache)
15233 (s390_backchain_frame_unwind_cache, s390_frame_unwind_cache)
15234 (s390_frame_this_id, s390_frame_prev_register, s390_frame_unwind)
15235 (s390_stub_unwind_cache, s390_stub_frame_unwind_cache)
15236 (s390_stub_frame_this_id, s390_stub_frame_prev_register)
15237 (s390_stub_frame_sniffer, s390_stub_frame_unwind)
15238 (s390_frame_base_address, s390_local_base_address)
15239 (s390_frame_base, s390_gcc_target_options)
15240 (s390_gnu_triplet_regexp, s390_stap_is_single_operand)
15241 (s390_validate_reg_range, s390_tdesc_valid)
15242 (s390_gdbarch_tdep_alloc, s390_gdbarch_init): Move to...
15243 * s390-tdep.c: ...this. New file.
15245 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
15247 * s390-linux-tdep.c (gdbarch_tdep.s390_syscall_record): New hook.
15248 (s390_process_record, s390_gdbarch_tdep_alloc)
15249 (s390_linux_init_abi_any): Use/set new hook.
15251 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
15253 * s390-linux-tdep.c (osabi.h): New include.
15254 (s390_linux_init_abi_31, s390_linux_init_abi_64)
15255 (s390_linux_init_abi_any): New functions.
15256 (s390_gdbarch_init, _initialize_s390_tdep): Adjust.
15258 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
15260 * s390-linux-tdep.c (s390_gdbarch_init): Use gdb_assert for
15261 tdesc_has_registers check
15263 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
15265 * s390-linux-tdep.c (s390_tdesc_valid): New function.
15266 (s390_validate_reg_range): New macro.
15267 (s390_gdbarch_init): Adjust.
15269 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
15271 * s390-linux-tdep.c (gdbarch_tdep) <tdesc>: New field.
15272 (s390_gdbarch_tdep_alloc): Adjust.
15273 (s390_gdbarch_init): Adjust.
15275 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
15277 * s390-linux-tdep.c (gdbarch_tdep) <have_linux_v1, have_linux_v2>
15278 <have_tdb>: Change type to bool.
15279 (s390_gdbarch_tdep_alloc): Adjust.
15280 (s390_gdbarch_init): Adjust.
15282 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
15284 * s390-linux-tdep (s390_abi_kind) <ABI_NONE>: New default field.
15285 (gdbarch_tdep) <have_upper, have_vx>: New fields.
15286 (s390_gdbarch_tdep_alloc): New function.
15287 (s390_gdbarch_init): Allocate tdep at start and use its fields
15288 instead of separate variables.
15290 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
15292 * s390-linux-tdep.c (s390_gdbarch_init): Remove duplicate checks
15293 when looking for cached gdbarch and add comment for remaining.
15295 2018-01-22 Pedro Alves <palves@redhat.com>
15296 Sergio Durigan Junior <sergiodj@redhat.com>
15298 * typeprint.c (whatis_exp): Initialize "val" in the "whatis type"
15301 2018-01-22 Maciej W. Rozycki <macro@mips.com>
15303 * MAINTAINERS: Update my company e-mail address.
15305 2018-01-22 Yao Qi <yao.qi@linaro.org>
15307 * regcache.c (cooked_write_test): New function.
15308 (_initialize_regcache): Register the test.
15310 2018-01-22 Yao Qi <yao.qi@linaro.org>
15312 * ia64-tdep.c (ia64_pseudo_register_read): Call
15313 regcache->cooked_read instead of regcache_cooked_read_unsigned.
15314 * m32c-tdep.c (m32c_cat_read): Likewise.
15315 (m32c_r3r2r1r0_read): Likewise.
15316 * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
15317 * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
15319 2018-01-22 Yao Qi <yao.qi@linaro.org>
15321 * aarch64-tdep.c (aarch64_pseudo_read_value): Call regcache
15322 method raw_read instead of regcache_raw_read.
15323 * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
15324 * arm-tdep.c (arm_neon_quad_read): Likewise.
15325 * avr-tdep.c (avr_pseudo_register_read): Likewise.
15326 * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
15327 * frv-tdep.c (frv_pseudo_register_read): Likewise.
15328 * h8300-tdep.c (h8300_pseudo_register_read): Likewise.
15329 * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
15330 (i386_pseudo_register_read_into_value): Likewise.
15331 * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
15332 * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
15333 * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
15334 * rl78-tdep.c (rl78_pseudo_register_read): Likewise.
15335 * s390-linux-tdep.c (s390_pseudo_register_read): Likewise.
15336 * sparc-tdep.c (sparc32_pseudo_register_read): Likewise.
15337 * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
15338 * spu-tdep.c (spu_pseudo_register_read_spu): Likewise.
15339 * xtensa-tdep.c (xtensa_pseudo_register_read): Likewise.
15341 2018-01-22 Yao Qi <yao.qi@linaro.org>
15343 * Makefile.in (ALL_TARGET_OBS): Remove mt-tdep.o.
15344 * configure.tgt: Remove target mt.
15345 * mt-tdep.c: Remove.
15346 * regcache.c (cooked_read_test): Remove the check for mt.
15348 2018-01-22 Yao Qi <yao.qi@linaro.org>
15350 * jit.c (jit_frame_prev_register): Call regcache::cooked_read
15351 instead of gdbarch_pseudo_register_read_value.
15353 2018-01-22 Joel Brobecker <brobecker@adacore.com>
15355 * dwarf2read.c (need_gnat_info): Return nonzero if the cu's
15358 2018-01-22 Joel Brobecker <brobecker@adacore.com>
15360 * linespec.c (create_sals_line_offset): Remove code that preserved
15361 the symtab_and_line's line number.
15363 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
15365 * varobj.c (varobj_create): Don't set valid_block when creating a
15368 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
15370 * varobj.c (varobj_create): Remove out of date comment.
15372 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
15375 * ada-exp.y (write_var_from_sym): Pass extra parameter when
15376 updating innermost block.
15377 * parse.c (innermost_block_tracker::update): Take extra type
15378 parameter, and check types match before updating innermost block.
15379 (write_dollar_variable): Update innermost block for registers.
15380 * parser-defs.h (enum innermost_block_tracker_type): New enum.
15381 (innermost_block_tracker::innermost_block_tracker): Initialise
15383 (innermost_block_tracker::reset): Take type parameter.
15384 (innermost_block_tracker::update): Take type parameter, and pass
15385 type through as needed.
15386 (innermost_block_tracker::m_types): New member.
15387 * varobj.c (varobj_create): Pass type when reseting innermost
15390 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
15392 * ada-exp.y (write_var_from_sym): Switch to innermost_block API.
15393 * ada-lang.c (resolve_subexp): Likewise.
15394 * breakpoint.c (set_breakpoint_condition) Likewise.
15395 (watch_command_1) Likewise.
15396 * c-exp.y (variable): Likewise.
15397 * d-exp.y (PrimaryExpression): Likewise.
15398 * f-exp.y (variable): Likewise.
15399 * go-exp.y (variable): Likewise.
15400 * m2-exp.y (variable): Likewise.
15401 * objfiles.c (objfile::~objfile): Likewise.
15402 * p-exp.y (variable): Likewise.
15403 * parse.c (innermost_block): Change type.
15404 * parser-defs.h (class innermost_block_tracker): New.
15405 (innermost_block): Change to innermost_block_tracker.
15406 * printcmd.c (display_command): Switch to innermost_block API.
15407 (do_one_display): Likewise.
15408 * rust-exp.y (do_one_display): Likewise.
15409 * symfile.c (clear_symtab_users): Likewise.
15410 * varobj.c (varobj_create): Switch to innermost_block API, replace
15411 use of innermost_block with block stored on varobj object.
15413 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
15415 * expression.h (innermost_block): Remove declaration.
15416 * varobj.c: Add 'parser-defs.h' include.
15418 2018-01-19 Tom Tromey <tom@tromey.com>
15420 * rust-lang.c (rust_lookup_symbol_nonlocal): Look up qualified
15421 symbols in the static and global blocks.
15423 2018-01-19 James Clarke <jrtc27@jrtc27.com>
15425 * nat/linux-ptrace.c: Remove unnecessary reinclusion of
15426 gdb_ptrace.h, and move including gdb_wait.h ...
15427 * nat/linux-ptrace.h: ... to here.
15429 2018-01-19 Simon Marchi <simon.marchi@ericsson.com>
15431 * inf-ptrace.c (inf_ptrace_detach): Adjust call to
15432 inf_ptrace_detach_success.
15433 (inf_ptrace_detach_success): Add inferior parameter, use it
15434 instead of inferior_ptid, pass it to detach_inferior.
15435 * inf-ptrace.h (inf_ptrace_detach_success): Add inferior
15437 * inferior.c (detach_inferior): Add overload that takes an
15439 * inferior.h (detach_inferior): Likewise.
15440 * linux-nat.c (linux_nat_detach): Use the inf parameter, don't
15441 use inferior_ptid, adjust call to inf_ptrace_detach_success.
15442 * linux-thread-db.c (thread_db_detach): Use inf parameter.
15444 2018-01-19 Simon Marchi <simon.marchi@ericsson.com>
15446 * target.h (struct target_ops) <to_detach>: Add inferior
15448 (target_detach): Likewise.
15449 * target.c (dispose_inferior): Pass inferior down.
15450 (target_detach): Pass inferior down. Assert that it is equal to
15451 the current inferior.
15452 * aix-thread.c (aix_thread_detach): Pass inferior down.
15453 * corefile.c (core_file_command): Pass current_inferior() down.
15454 * corelow.c (core_detach): Add inferior parameter.
15455 * darwin-nat.c (darwin_detach): Likewise.
15456 * gnu-nat.c (gnu_detach): Likewise.
15457 * inf-ptrace.c (inf_ptrace_detach): Likewise.
15458 * infcmd.c (detach_command): Pass current_inferior() down to
15460 * infrun.c (follow_fork_inferior): Pass parent_inf to
15462 (handle_vfork_child_exec_or_exit): Pass inf->vfork_parent to
15464 * linux-nat.c (linux_nat_detach): Add inferior parameter.
15465 * linux-thread-db.c (thread_db_detach): Likewise.
15466 * nto-procfs.c (procfs_detach): Likewise.
15467 * procfs.c (procfs_detach): Likewise.
15468 * record.c (record_detach): Likewise.
15469 * record.h (struct inferior): Forward-declare.
15470 (record_detach): Add inferior parameter.
15471 * remote-sim.c (gdbsim_detach): Likewise.
15472 * remote.c (remote_detach_1): Likewise.
15473 (remote_detach): Likewise.
15474 (extended_remote_detach): Likewise.
15475 * sol-thread.c (sol_thread_detach): Likewise.
15476 * target-debug.h (target_debug_print_inferior_p): New macro.
15477 * target-delegates.c: Re-generate.
15478 * top.c (kill_or_detach): Pass inferior down to target_detach.
15479 * windows-nat.c (windows_detach): Add inferior parameter.
15481 2018-01-19 Simon Marchi <simon.marchi@ericsson.com>
15483 * target.h (struct target_ops) <to_detach>: Remove args
15485 (target_detach): Likewise.
15486 * target.c (dispose_inferior): Adjust.
15487 (target_detach): Remove args parameter, adjust.
15488 * aix-thread.c (aix_thread_detach): Adjust.
15489 * corefile.c (core_file_command): Adjust.
15490 * corelow.c (core_detach): Adjust.
15491 * darwin-nat.c (darwin_detach): Adjust.
15492 * gnu-nat.c (gnu_detach): Adjust.
15493 * inf-ptrace.c (inf_ptrace_detach): Adjust.
15494 * infcmd.c (detach_command): Adjust
15495 * infrun.c (follow_fork_inferior): Adjust.
15496 (handle_vfork_child_exec_or_exit): Adjust.
15497 * linux-fork.c (linux_fork_detach): Remove args parameter.
15498 * linux-fork.h (linux_fork_detach): Likewise.
15499 * linux-nat.c (linux_nat_detach): Likewise, and adjust.
15500 * linux-thread-db.c (thread_db_detach): Likewise.
15501 * nto-procfs.c (procfs_detach): Likewise.
15502 * procfs.c (procfs_detach): Likewise.
15503 (do_detach): Remove signo parameter.
15504 * record.c (record_detach): Remove args parameter.
15505 * record.h (record_detach): Likewise.
15506 * remote-sim.c (gdbsim_detach): Likewise.
15507 * remote.c (remote_detach_1): Likewise.
15508 (remote_detach): Likewise.
15509 (extended_remote_detach): Likewise.
15510 * sol-thread.c (sol_thread_detach): Likewise.
15511 * target-delegates.c: Re-generate.
15512 * top.c (struct qt_args) <args>: Remove field.
15513 (kill_or_detach): Don't pass args.
15514 (quit_force): Don't set args.
15515 * windows-nat.c (windows_detach): Remove args parameter.
15517 2018-01-19 Yao Qi <yao.qi@linaro.org>
15519 * arm-linux-tdep.c (arm_linux_gcc_target_options): New function.
15520 (arm_linux_init_abi): Install it.
15522 2018-01-19 Yao Qi <yao.qi@linaro.org>
15524 * osabi.c (gdb_osabi_names): Extend the regexp for
15525 arm-linux-gnueabihf.
15527 2018-01-18 Yao Qi <yao.qi@linaro.org>
15529 * dwarf2read.c (abbrev_table) <abbrevs>: Rename it to
15531 (abbrev_table::add_abbrev): Update.
15532 (abbrev_table::lookup_abbrev): Update.
15534 2018-01-18 Yao Qi <yao.qi@linaro.org>
15536 * ppc-linux-tdep.c (ppu2spu_prev_register): Call cooked_read.
15538 2018-01-17 Sergio Durigan Junior <sergiodj@redhat.com>
15540 * compile/compile.c (compile_to_object): Convert "triplet_rx"
15543 2018-01-17 Tom Tromey <tom@tromey.com>
15545 * dwarf2read.c (symbolp): Remove typedef. Don't instantiate VEC.
15547 2018-01-17 Tom Tromey <tom@tromey.com>
15549 * gdbtypes.h (add_dyn_prop): Remove objfile parameter.
15550 * gdbtypes.c (add_dyn_prop): Remove objfile parameter.
15551 (create_array_type_with_stride): Update.
15552 * dwarf2read.c (set_die_type): Update.
15554 2018-01-17 Tom Tromey <tom@tromey.com>
15556 * dwarf2read.c (delayed_method_info): Remove typedef.
15557 (dwarf2_cu::method_info): Now a std::vector.
15558 (add_to_method_list): Update.
15559 (free_delayed_list): Remove.
15560 (compute_delayed_physnames): Update.
15561 (process_full_comp_unit, process_full_type_unit): Clear the method
15562 list. Remove cleanups.
15563 (psymtab_include_file_name): Add name_holder parameter. Use
15564 unique_xmalloc_ptr.
15565 (dwarf_decode_lines): Update.
15567 2018-01-17 Tom Tromey <tom@tromey.com>
15568 Simon Marchi <simon.marchi@ericsson.com>
15570 * dwarf2read.c (struct dwarf2_cu): Add constructor, destructor.
15571 (dwarf2_per_objfile::free_cached_comp_units)
15572 (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
15573 (init_cutu_and_read_dies_no_follow): Update.
15574 (dwarf2_cu::dwarf2_cu): Rename from init_one_comp_unit.
15575 (dwarf2_cu::~dwarf2_cu): New.
15576 (free_heap_comp_unit, free_stack_comp_unit): Remove.
15577 (age_cached_comp_units, free_one_cached_comp_unit): Update.
15579 2018-01-17 Tom Tromey <tom@tromey.com>
15580 Simon Marchi <simon.marchi@ericsson.com>
15582 * dwarf2read.c (struct dwarf2_cu) <abbrev_table>: Remove.
15583 (struct die_reader_specs) <abbrev_table>: New member.
15584 (struct abbrev_table): Add constructor.
15585 <alloc_abbrev, add_abbrev, lookup_abbrev>: Declare.
15586 <abbrev_obstack>: Now an auto_obstack.
15587 (abbrev_table_up): New typedef.
15588 (init_cu_die_reader): Add abbrev_table parameter.
15589 (read_cutu_die_from_dwo): Remove abbrev_table_provided parameter.
15590 Add result_dwo_abbrev_table.
15591 (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
15592 (init_cutu_and_read_dies_no_follow, build_type_psymtabs_1):
15594 (peek_die_abbrev): Take die_reader_specs, not dwarf_cu as
15596 (skip_children): Update.
15597 (abbrev_table::alloc_abbrev): Rename from
15598 abbrev_table_alloc_abbrev.
15599 (abbrev_table::add_abbrev): Rename from abbrev_table_add_abbrev.
15600 (abbrev_table::lookup_abbrev): Rename from
15601 abbrev_table_lookup_abbrev.
15602 (abbrev_table_read_table): Return abbrev_table_up.
15603 (abbrev_table_free, abbrev_table_free_cleanup)
15604 (dwarf2_read_abbrevs, dwarf2_free_abbrev_table): Remove.
15605 (load_partial_dies): Update.
15607 2018-01-17 Tom Tromey <tom@tromey.com>
15609 * dwarf2read.c (dwarf2_compute_name): Update comment.
15610 (read_func_scope, read_variable): Update.
15611 (new_symbol): Remove.
15612 (new_symbol_full): Rename to new_symbol.
15614 2018-01-17 Mike Gulick <mgulick@mathworks.com>
15617 * gdb_bfd.c (gdb_bfd_map_section): If unable to read object file, issue
15618 a warning instead of throwing an error, set section size to 0 and return
15620 * gdb_bfd.h (gdb_bfd_map_section): Update description.
15622 2018-01-17 Simon Marchi <simon.marchi@ericsson.com>
15624 * nat/linux-ptrace.h (linux_ptrace_attach_fail_reason): Return
15626 (linux_ptrace_attach_fail_reason_string): Likewise.
15627 * nat/linux-ptrace.c (linux_ptrace_attach_fail_reason):
15629 (linux_ptrace_attach_fail_reason_string): Likewise.
15630 * linux-nat.c (attach_proc_task_lwp_callback): Adjust.
15632 2018-01-17 Simon Marchi <simon.marchi@ericsson.com>
15634 * linux-nat.c (linux_nat_attach): Remove xstrdup.
15636 2018-01-17 Eldar Abusalimov <eldar.abusalimov@jetbrains.com>
15639 * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
15640 checking for fs_base/gs_base fields in struct user_regs_struct.
15641 * configure: Regenerate.
15643 2018-01-17 Yao Qi <yao.qi@linaro.org>
15645 * aarch64-linux-tdep.c (aarch64_linux_gcc_target_options): New
15647 (aarch64_linux_init_abi): Install it to gdbarch hook
15648 gcc_target_options.
15650 2018-01-15 Pedro Alves <palves@redhat.com>
15652 * common/signals-state-save-restore.c
15653 (save_original_signals_state): Fix typos.
15655 2017-01-12 Tom Tromey <tom@tromey.com>
15656 Sergio Durigan Junior <sergiodj@redhat.com>
15658 * Makefile.in (install-only): Install gdb-add-index.
15660 2018-01-12 John Baldwin <jhb@FreeBSD.org>
15662 * fbsd-tdep.c (KVE_PROTECTION): Correct value.
15664 2018-01-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
15666 * infrun.c (keep_going_pass_signal): Clear step-over info when
15667 insert_breakpoints fails.
15669 2018-01-11 Pedro Alves <palves@redhat.com>
15672 * infrun.c (resume): Rename to ...
15673 (resume_1): ... this.
15674 (resume): Reimplement as wrapper around resume_1.
15676 2018-01-11 Pedro Alves <palves@redhat.com>
15679 * remote.c (remote_parse_stop_reply): Default to the last-set
15680 general thread instead of to 'magic_null_ptid'.
15682 2018-01-10 Pedro Alves <palves@redhat.com>
15684 * language.h (language_get_symbol_name_matcher): Rename ...
15685 (get_symbol_name_matcher): ... this.
15686 * language.c (language_get_symbol_name_matcher): Ditto.
15687 * dictionary.c, linespec.c, minsyms.c, psymtab.c, symtab.c: All
15690 2018-01-10 Pedro Alves <palves@redhat.com>
15694 (gdb_index_symbol_name_matcher::gdb_index_symbol_name_matcher):
15695 Adjust to use language_get_symbol_name_matcher instead of
15696 language_defn::la_get_symbol_name_matcher.
15697 * language.c (language_get_symbol_name_matcher): If in Ada mode
15698 and the lookup name is a verbatim match, return Ada's matcher.
15699 * language.h (language_get_symbol_name_matcher): Adjust comment.
15700 (ada_lookup_name_info::verbatim_p):: New method.
15702 2018-01-10 Pedro Alves <palves@redhat.com>
15705 * ada-lang.c (ada_collect_symbol_completion_matches): If the
15706 minsym's language is language_auto or language_cplus, pass down
15707 language_ada instead.
15708 * symtab.c (compare_symbol_name): Don't frob symbol language here.
15710 2018-01-10 Pedro Alves <palves@redhat.com>
15713 * minsyms.c (linkage_name_str): New function.
15714 (iterate_over_minimal_symbols): Use it.
15716 2018-01-09 John Baldwin <jhb@FreeBSD.org>
15718 * NEWS: Document that 'info proc' now works on FreeBSD.
15720 2018-01-09 John Baldwin <jhb@FreeBSD.org>
15722 * configure.ac: Check for kinfo_getfile in libutil.
15723 * configure: Regenerate.
15724 * config.in: Regenerate.
15725 * fbsd-nat.c: Include "fbsd-tdep.h".
15726 (fbsd_fetch_cmdline): New.
15727 (fbsd_fetch_kinfo_proc): Move earlier and change to return a bool
15728 rather than calling error.
15729 (fbsd_info_proc): New.
15730 (fbsd_thread_name): Report error if fbsd_fetch_kinfo_proc fails.
15731 (fbsd_wait): Report warning if fbsd_fetch_kinfo_proc fails.
15732 (fbsd_nat_add_target): Set "to_info_proc" to "fbsd_info_proc".
15734 2018-01-09 John Baldwin <jhb@FreeBSD.org>
15736 * fbsd-nat.c (struct free_deleter): Remove.
15737 (fbsd_find_memory_regions): Use gdb::unique_xmalloc_ptr<>.
15739 2018-01-09 John Baldwin <jhb@FreeBSD.org>
15741 * fbsd-nat.c (fbsd_pid_to_exec_file) [KERN_PROC_PATHNAME]: Return
15742 NULL for an empty pathname.
15744 2018-01-09 John Baldwin <jhb@FreeBSD.org>
15746 * fbsd-tdep.c (KVE_STRUCTSIZE, KVE_START, KVE_END, KVE_OFFSET)
15747 (KVE_FLAGS, KVE_PROTECTION, KVE_PATH, KINFO_VME_PROT_READ)
15748 (KINFO_VME_PROT_WRITE, KINFO_VME_PROT_EXEC, KINFO_VME_FLAG_COW)
15749 (KINFO_VME_FLAG_NEEDS_COPY, KINFO_VME_FLAG_NOCOREDUMP)
15750 (KINFO_VME_FLAG_SUPER, KINFO_VME_FLAG_GROWS_UP)
15751 (KINFO_VME_FLAG_GROWS_DOWN, KF_STRUCTSIZE, KF_TYPE, KF_FD)
15752 (KF_PATH, KINFO_FILE_TYPE_VNODE, KINFO_FILE_FD_TYPE_CWD)
15753 (KINFO_FILE_FD_TYPE_TEXT, SIG_WORDS, struct kinfo_proc_layout)
15754 (kinfo_proc_layout_32, kinfo_proc_layout_i386)
15755 (kinfo_proc_layout_64, fbsd_vm_map_entry_flags)
15756 (fbsd_core_info_proc_mappings, fbsd_core_vnode_path)
15757 (fbsd_core_fetch_timeval, fbsd_print_sigset)
15758 (fbsd_core_info_proc_status, fbsd_core_info_proc): New.
15759 (fbsd_init_abi): Install gdbarch "core_info_proc" method.
15760 * fbsd-tdep.h (fbsd_vm_map_entry_flags): New.
15762 2018-01-08 Samuel Thibault <samuel.thibault@ens-lyon.org>
15764 * gdb/gnu-nat.c: Include <elf.h> and <link.h>.
15765 (gnu_xfer_auxv): New function.
15766 (gnu_xfer_partial): Call gnu_xfer_auxv when `object' is
15767 TARGET_OBJECT_AUXV.
15769 2018-01-08 Yao Qi <yao.qi@linaro.org>
15770 Simon Marchi <simon.marchi@ericsson.com>
15772 * Makefile.in (COMMON_SFILES): Remove selftest-arch.c and
15774 (COMMON_OBS): Remove selftest.o.
15775 * configure.ac: Append selftest-arch.c and common/selftest.c to
15776 CONFIG_SRCS. Append selftest-arch.o and selftest.o to COMMON_OBS.
15777 * configure: Re-generated.
15778 * maint.c (maintenance_selftest): Wrap selftests::run_tests with
15780 (maintenance_info_selftests): Likewise.
15782 2018-01-08 Xavier Roirand <roirand@adacore.com>
15784 * ada-valprint.c (val_print_packed_array_elements): Use
15785 proper number of elements when printing an array indexed
15786 by an enumeration type.
15788 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
15790 * dwarf2read.c (struct dwarf2_cu) <dwarf2_per_objfile>: Remove.
15791 (dw2_get_file_names_reader): Adjust.
15792 (lookup_dwo_signatured_type): Adjust.
15793 (lookup_dwp_signatured_type): Adjust.
15794 (lookup_signatured_type): Adjust.
15795 (create_type_unit_group): Adjust.
15796 (get_type_unit_group): Adjust.
15797 (process_psymtab_comp_unit_reader): Adjust.
15798 (build_type_psymtabs_reader): Adjust.
15799 (scan_partial_symbols): Adjust.
15800 (add_partial_symbol): Adjust.
15801 (add_partial_subprogram): Adjust.
15802 (peek_die_abbrev): Adjust.
15803 (fixup_go_packaging): Adjust.
15804 (process_imported_unit_die): Adjust.
15805 (dwarf2_compute_name): Adjust.
15806 (dwarf2_physname): Adjust.
15807 (read_import_statement): Adjust.
15808 (handle_DW_AT_stmt_list): Adjust.
15809 (read_file_scope): Adjust.
15810 (read_func_scope): Adjust.
15811 (read_lexical_block_scope): Adjust.
15812 (read_call_site_scope): Adjust.
15813 (read_variable): Adjust.
15814 (dwarf2_rnglists_process): Adjust.
15815 (dwarf2_ranges_process): Adjust.
15816 (dwarf2_ranges_read): Adjust.
15817 (dwarf2_get_pc_bounds): Adjust.
15818 (dwarf2_record_block_ranges): Adjust.
15819 (dwarf2_add_field): Adjust.
15820 (dwarf2_add_member_fn): Adjust.
15821 (read_structure_type): Adjust.
15822 (process_structure_scope): Adjust.
15823 (read_enumeration_type): Adjust.
15824 (read_array_type): Adjust.
15825 (mark_common_block_symbol_computed): Adjust.
15826 (read_common_block): Adjust.
15827 (read_namespace_type): Adjust.
15828 (read_namespace): Adjust.
15829 (read_module_type): Adjust.
15830 (read_tag_pointer_type): Adjust.
15831 (read_tag_ptr_to_member_type): Adjust.
15832 (read_tag_string_type): Adjust.
15833 (read_subroutine_type): Adjust.
15834 (read_typedef): Adjust.
15835 (read_base_type): Adjust.
15836 (attr_to_dynamic_prop): Adjust.
15837 (read_subrange_type): Adjust.
15838 (read_unspecified_type): Adjust.
15839 (dwarf2_read_abbrevs): Adjust.
15840 (load_partial_dies): Adjust.
15841 (read_partial_die): Adjust.
15842 (find_partial_die): Adjust.
15843 (guess_partial_die_structure_name): Adjust.
15844 (fixup_partial_die): Adjust.
15845 (read_attribute_value): Adjust.
15846 (read_addr_index): Adjust.
15847 (read_addr_index_from_leb128): Adjust.
15848 (read_str_index): Adjust.
15849 (dwarf2_string_attr): Adjust.
15850 (get_debug_line_section): Adjust.
15851 (dwarf_decode_line_header): Adjust.
15852 (lnp_state_machine::check_line_address): Adjust.
15853 (dwarf_decode_lines_1): Adjust.
15854 (dwarf_decode_lines): Adjust.
15855 (dwarf2_start_symtab): Adjust.
15856 (var_decode_location): Adjust.
15857 (new_symbol_full): Adjust.
15858 (dwarf2_const_value_data): Adjust.
15859 (dwarf2_const_value_attr): Adjust.
15860 (dwarf2_const_value): Adjust.
15861 (die_type): Adjust.
15862 (die_containing_type): Adjust.
15863 (build_error_marker_type): Adjust.
15864 (lookup_die_type): Adjust.
15865 (guess_full_die_structure_name): Adjust.
15866 (anonymous_struct_prefix): Adjust.
15867 (determine_prefix): Adjust.
15868 (dwarf2_name): Adjust.
15869 (follow_die_ref_or_sig): Adjust.
15870 (follow_die_offset): Adjust.
15871 (follow_die_ref): Adjust.
15872 (follow_die_sig_1): Adjust.
15873 (follow_die_sig): Adjust.
15874 (get_signatured_type): Adjust.
15875 (get_DW_AT_signature_type): Adjust.
15876 (decode_locdesc): Adjust.
15877 (dwarf_decode_macros): Adjust.
15878 (cu_debug_loc_section): Adjust.
15879 (fill_in_loclist_baton): Adjust.
15880 (dwarf2_symbol_mark_computed): Adjust.
15881 (init_one_comp_unit): Don't assign
15882 dwarf2_cu::dwarf2_per_objfile.
15883 (set_die_type): Adjust.
15885 2018-01-07 Simon Marchi <simon.marchi@ericsson.com>
15887 * dwarf2read.c (struct mapped_debug_names): Add constructor.
15888 <dwarf2_per_objfile>: New field.
15889 (dwarf2_per_objfile): Remove global.
15890 (get_dwarf2_per_objfile): New function.
15891 (set_dwarf2_per_objfile): New function.
15892 (dwarf2_build_psymtabs_hard): Change objfile parameter to
15893 dwarf2_per_objfile.
15894 (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
15895 (read_abbrev_offset): Likewise.
15896 (read_indirect_string): Likewise.
15897 (read_indirect_line_string): Likewise.
15898 (read_indirect_string_at_offset): Likewise.
15899 (read_indirect_string_from_dwz): Likewise.
15900 (dwarf2_find_containing_comp_unit): Change objfile parameter to
15901 dwarf2_per_objfile.
15902 (age_cached_comp_units): Add dwarf2_per_objfile parameter.
15903 (create_all_comp_units): Change objfile parameter to
15904 dwarf2_per_objfile.
15905 (create_all_type_units): Likewise.
15906 (process_queue): Add dwarf2_per_objfile parameter.
15907 (read_and_check_comp_unit_head): Likewise.
15908 (lookup_dwo_unit_in_dwp): Likewise.
15909 (get_dwp_file): Likewise.
15910 (process_cu_includes): Likewise.
15911 (struct free_dwo_file_cleanup_data): New struct.
15912 (dwarf2_has_info): Use get_dwarf2_per_objfile and
15913 set_dwarf2_per_objfile.
15914 (dwarf2_get_dwz_file): Add dwarf2_per_objfile parameter.
15915 (dw2_do_instantiate_symtab): Get dwarf2_per_objfile from
15916 context, adjust calls.
15917 (dw2_instantiate_symtab): Likewise.
15918 (dw2_get_cutu): Add dwarf2_per_objfile parameter.
15919 (dw2_get_cu): Likewise.
15920 (create_cu_from_index_list): Change objfile parameter to
15921 dwarf2_per_objfile.
15922 (create_cus_from_index_list): Get dwarf2_per_objfile from
15923 context, adjust calls.
15924 (create_cus_from_index): Likewise.
15925 (create_signatured_type_table_from_index): Change objfile
15926 parameter to dwarf2_per_objfile.
15927 (create_signatured_type_table_from_debug_names): Change objfile
15928 parameter to dwarf2_per_objfile.
15929 (create_addrmap_from_index): Likewise.
15930 (create_addrmap_from_aranges): Likewise.
15931 (dwarf2_read_index): Use get_dwarf2_per_objfile, adjust calls.
15932 (dw2_setup): Remove.
15933 (dw2_get_file_names_reader): Get dwarf2_per_objfile from
15935 (dw2_find_last_source_symtab): Get dwarf2_per_objfile using
15936 get_dwarf2_per_objfile.
15937 (dw2_forget_cached_source_info): Likewise.
15938 (dw2_map_symtabs_matching_filename): Likewise.
15939 (struct dw2_symtab_iterator) <index>: Remove.
15940 <dwarf2_per_objfile>: New field.
15941 (dw2_symtab_iter_init): Replace index parameter with
15942 dwarf2_per_objfile.
15943 (dw2_symtab_iter_next): Use dwarf2_per_objfile from iter.
15944 (dw2_lookup_symbol): Use get_dwarf2_per_objfile and adjust.
15945 (dw2_print_stats): Likewise.
15946 (dw2_dump): Likewise.
15947 (dw2_expand_symtabs_for_function): Likewise.
15948 (dw2_expand_all_symtabs): Likewise.
15949 (dw2_expand_symtabs_with_fullname): Likewise.
15950 (dw2_expand_marked_cus): Replace index and objfile parameters
15951 with dwarf2_per_objfile.
15952 (dw_expand_symtabs_matching_file_matcher): Add
15953 dwarf2_per_objfile parameter and adjust calls.
15954 (dw2_expand_symtabs_matching): Use get_dwarf2_per_objfile and
15956 (dw2_find_pc_sect_compunit_symtab): Don't call dw2_setup.
15957 (dw2_map_symbol_filenames): Use get_dwarf2_per_objfile and
15959 (create_cus_from_debug_names_list): Replace objfile parameter
15960 with dwarf2_per_objfile and adjust calls.
15961 (create_cus_from_debug_names): Likewise.
15962 (dwarf2_read_debug_names): Likewise.
15963 (mapped_debug_names::namei_to_name): Adjust call.
15964 (dw2_debug_names_iterator::next): Likewise.
15965 (dw2_debug_names_iterator::find_vec_in_debug_names): Likewise.
15966 (dw2_debug_names_lookup_symbol): Use get_dwarf2_per_objfile.
15967 (dw2_debug_names_dump): Likewise.
15968 (dw2_debug_names_expand_symtabs_for_function): Likewise.
15969 (dw2_debug_names_expand_symtabs_matching): Likewise.
15970 (dwarf2_initialize_objfile): Likewise.
15971 (dwarf2_build_psymtabs): Likewise.
15972 (get_abbrev_section_for_cu): Get dwarf2_per_objfile from
15974 (error_check_comp_unit_head): Add dwarf2_per_objfile parameter.
15975 (read_and_check_comp_unit_head): Likewise.
15976 (read_abbrev_offset): Likewise.
15977 (create_debug_type_hash_table): Likewise.
15978 (create_debug_types_hash_table): Likewise.
15979 (create_all_type_units): Replace objfile parameter with
15980 dwarf2_per_objfile.
15981 (add_type_unit): Add dwarf2_per_objfile parameter.
15982 (fill_in_sig_entry_from_dwo_entry): Replace objfile parameter
15983 with dwarf2_per_objfile.
15984 (lookup_dwo_signatured_type): Get dwarf2_per_objfile from cu.
15985 (lookup_dwp_signatured_type): Likewise.
15986 (lookup_signatured_type): Likewise.
15987 (read_cutu_die_from_dwo): Likewise.
15988 (init_tu_and_read_dwo_dies): Likewise.
15989 (init_cutu_and_read_dies): Likewise.
15990 (init_cutu_and_read_dies_no_follow): Likewise.
15991 (allocate_type_unit_groups_table): Add objfile parameter.
15992 (create_type_unit_group): Use dwarf2_per_objfile from cu.
15993 (get_type_unit_group): Likewise.
15994 (process_psymtab_comp_unit): Update call.
15995 (build_type_psymtabs_reader): Use dwarf2_per_objfile from cu.
15996 (build_type_psymtabs_1): Add dwarf2_per_objfile parameter.
15997 (print_tu_stats): Likewise.
15998 (build_type_psymtab_dependencies): Use dwarf2_per_objfile passed
15999 in void* parameter.
16000 (build_type_psymtabs): Change objfile parameter to
16001 dwarf2_per_objfile.
16002 (process_skeletonless_type_unit): Use dwarf2_per_objfile
16003 passed in void* parameter.
16004 (process_skeletonless_type_units): Change objfile parameter to
16005 dwarf2_per_objfile.
16006 (set_partial_user): Likewise.
16007 (dwarf2_build_psymtabs_hard): Likewise.
16008 (read_comp_units_from_section): Likewise.
16009 (create_all_comp_units): Likewise.
16010 (scan_partial_symbols): Update calls.
16011 (add_partial_symbol): Likewise.
16012 (dwarf2_read_symtab): Use get_dwarf2_per_objfile.
16013 (maybe_queue_comp_unit): Use dwarf2_read_symtab from cu.
16014 (process_queue): Add dwarf2_per_objfile parameter.
16015 (get_compunit_symtab): Use dwarf2_per_objfile from cu.
16016 (compute_compunit_symtab_includes): Likewise.
16017 (process_cu_includes): Add dwarf2_per_objfile parameter.
16018 (process_full_comp_unit): Use dwarf2_per_objfile from cu.
16019 (process_full_type_unit): Likewise.
16020 (process_imported_unit_die): Update call.
16021 (handle_DW_AT_stmt_list): Use dwarf2_per_objfile from cu.
16022 (read_file_scope): Likewise.
16023 (allocate_dwo_file_hash_table): Add objfile parameter.
16024 (lookup_dwo_file_slot): Add dwarf2_per_objfile parameter.
16025 (create_cus_hash_table): Likewise.
16026 (create_dwp_hash_table): Likewise.
16027 (create_dwo_unit_in_dwp_v1): Likewise.
16028 (create_dwp_v2_section): Likewise.
16029 (create_dwo_unit_in_dwp_v2): Likewise.
16030 (lookup_dwo_unit_in_dwp): Likewise.
16031 (try_open_dwop_file): Likewise.
16032 (open_dwo_file): Likewise. Use dwarf2_per_objfile from cu.
16033 (open_and_init_dwo_file): Use dwarf2_per_objfile from cu, update
16034 cleanup to include a reference to dwarf2_per_objfile.
16035 (open_dwp_file): Add dwarf2_per_objfile parameter.
16036 (open_and_init_dwp_file): Likewise.
16037 (get_dwp_file): Likewise.
16038 (lookup_dwo_cutu): Use dwarf2_per_objfile from cu.
16039 (queue_and_load_all_dwo_tus): Update call.
16040 (free_dwo_file_cleanup): Use dwarf2_per_objfile from cleanup
16042 (dwarf2_rnglists_process): Use dwarf2_per_objfile from cu.
16043 (dwarf2_ranges_process): Likewise.
16044 (dwarf2_get_pc_bounds): Likewise.
16045 (mark_common_block_symbol_computed): Likewise.
16046 (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
16047 (dwarf2_read_abbrevs): Update call.
16048 (read_partial_die): Use dwarf2_per_objfile from cu.
16049 (find_partial_die): Likewise.
16050 (fixup_partial_die): Likewise.
16051 (read_attribute_value): Likewise.
16052 (read_indirect_string_at_offset_from): Add objfile parameter.
16053 (read_indirect_string_at_offset): Add dwarf2_per_objfile
16055 (read_indirect_string_from_dwz): Add objfile parameter.
16056 (read_indirect_string): Add objfile parameter.
16057 (read_addr_index_1): Add dwarf2_per_objfile parameter.
16058 (read_addr_index): Use dwarf2_per_objfile from cu.
16059 (dwarf2_read_addr_index): Use dwarf2_per_objfile from cu, don't
16061 (read_str_index): Use dwarf2_per_objfile from cu.
16062 (get_debug_line_section): Likewise.
16063 (read_formatted_entries): Add dwarf2_per_objfile parameter.
16064 (dwarf_decode_line_header): Use dwarf2_per_objfile from cu.
16065 (new_symbol_full): Use dwarf2_per_objfile from cu.
16066 (build_error_marker_type): Likewise.
16067 (lookup_die_type): Likewise.
16068 (determine_prefix): Likewise.
16069 (follow_die_offset): Likewise.
16070 (dwarf2_fetch_die_loc_sect_off): Use get_dwarf2_per_objfile.
16071 (dwarf2_fetch_constant_bytes): Don't call dw2_setup.
16072 (dwarf2_fetch_die_type_sect_off): Likewise.
16073 (dwarf2_get_die_type): Likewise.
16074 (follow_die_sig_1): Use dwarf2_per_objfile from cu.
16075 (get_signatured_type): Likewise.
16076 (get_DW_AT_signature_type): Likewise.
16077 (dwarf_decode_macro_bytes): Add dwarf2_per_objfile parameter.
16078 (dwarf_decode_macros): Use dwarf2_per_objfile from cu.
16079 (cu_debug_loc_section): Likewise.
16080 (fill_in_loclist_baton): Likewise.
16081 (dwarf2_symbol_mark_computed): Likewise.
16082 (dwarf2_find_containing_comp_unit): Change objfile parameter to
16083 dwarf2_per_objfile.
16084 (free_cached_comp_units): Use dwarf2_per_objfile passed in void*
16086 (age_cached_comp_units): Add dwarf2_per_objfile parameter.
16087 (free_one_cached_comp_unit): Use dwarf2_per_objfile from cu.
16088 (dwarf2_free_objfile): Use get_dwarf2_per_objfile.
16089 (set_die_type): Use dwarf2_free_objfile from cu.
16090 (get_die_type_at_offset): Likewise.
16091 (dwarf2_per_objfile_free): Don't assign global variable.
16092 (debug_names) <constructor>: Add dwarf2_per_objfile
16093 parameter, update m_debugstrlookup construction.
16094 (debug_names::debug_str_lookup): Add dwarf2_per_objfile
16096 <m_dwarf2_per_objfile>: New field.
16097 <lookup>: Use m_dwarf2_per_objfile.
16098 (check_dwarf64_offsets): Add dwarf2_per_objfile parameter.
16099 (psyms_seen_size): Likewise.
16100 (write_gdbindex): Replace objfile parameter with
16101 dwarf2_per_objfile.
16102 (write_debug_names): Likewise.
16103 (write_psymtabs_to_index): Likewise.
16104 (save_gdb_index_command): Use get_dwarf2_per_objfile, update
16107 2018-01-07 Simon Marchi <simon.marchi@ericsson.com>
16109 * dwarf2read.c (struct dwarf2_cu) <objfile>: Remove.
16110 <dwarf2_per_objfile>: New field.
16111 (struct dwarf2_per_cu_data) <objfile>: Remove.
16112 <dwarf2_per_objfile>: New field.
16113 (create_cu_from_index_list): Assign dwarf2_per_objfile instead
16115 (create_signatured_type_table_from_index): Likewise.
16116 (create_debug_type_hash_table): Likewise.
16117 (fill_in_sig_entry_from_dwo_entry): Likewise.
16118 (lookup_dwo_unit): Access objfile through dwarf2_per_objfile.
16119 (create_type_unit_group): Assign dwarf2_per_objfile instead of
16121 (create_partial_symtab): Access objfile through
16122 dwarf2_per_objfile.
16123 (process_psymtab_comp_unit_reader): Likewise.
16124 (read_comp_units_from_section): Likewise.
16125 (scan_partial_symbols): Likewise.
16126 (add_partial_symbol): Likewise.
16127 (add_partial_subprogram): Likewise.
16128 (peek_die_abbrev): Likewise.
16129 (fixup_go_packaging): Likewise.
16130 (process_full_comp_unit): Likewise.
16131 (process_full_type_unit): Likewise.
16132 (process_imported_unit_die): Likewise.
16133 (dwarf2_compute_name): Likewise.
16134 (dwarf2_physname): Likewise.
16135 (read_import_statement): Likewise.
16136 (create_cus_hash_table): Assign dwarf2_physname instead of
16138 (read_func_scope): Access objfile through dwarf2_per_objfile.
16139 (read_lexical_block_scope): Likewise.
16140 (read_call_site_scope): Likewise.
16141 (read_variable): Likewise.
16142 (dwarf2_rnglists_process): Likewise.
16143 (dwarf2_ranges_process): Likewise.
16144 (dwarf2_ranges_read): Likewise.
16145 (dwarf2_record_block_ranges): Likewise.
16146 (dwarf2_add_field): Likewise.
16147 (dwarf2_add_member_fn): Likewise.
16148 (read_structure_type): Likewise.
16149 (process_structure_scope): Likewise.
16150 (read_enumeration_type): Likewise.
16151 (read_array_type): Likewise.
16152 (read_common_block): Likewise.
16153 (read_namespace_type): Likewise.
16154 (read_namespace): Likewise.
16155 (read_module_type): Likewise.
16156 (read_tag_pointer_type): Likewise.
16157 (read_tag_ptr_to_member_type): Likewise.
16158 (read_tag_string_type): Likewise.
16159 (read_subroutine_type): Likewise.
16160 (read_typedef): Likewise.
16161 (read_base_type): Likewise.
16162 (attr_to_dynamic_prop): Likewise.
16163 (read_subrange_type): Likewise.
16164 (read_unspecified_type): Likewise.
16165 (load_partial_dies): Likewise.
16166 (read_partial_die): Likewise.
16167 (find_partial_die): Likewise.
16168 (guess_partial_die_structure_name): Likewise.
16169 (fixup_partial_die): Likewise.
16170 (read_attribute_value): Likewise.
16171 (read_addr_index_from_leb128): Likewise.
16172 (dwarf2_read_addr_index): Likewise.
16173 (dwarf2_string_attr): Likewise.
16174 (lnp_state_machine::check_line_address): Likewise.
16175 (dwarf_decode_lines_1): Likewise.
16176 (dwarf_decode_lines): Likewise.
16177 (dwarf2_start_symtab): Likewise.
16178 (var_decode_location): Likewise.
16179 (new_symbol_full): Likewise.
16180 (dwarf2_const_value_data): Likewise.
16181 (dwarf2_const_value_attr): Likewise.
16182 (dwarf2_const_value): Likewise.
16183 (die_type): Likewise.
16184 (die_containing_type): Likewise.
16185 (lookup_die_type): Likewise.
16186 (guess_full_die_structure_name): Likewise.
16187 (anonymous_struct_prefix): Likewise.
16188 (dwarf2_name): Likewise.
16189 (follow_die_ref_or_sig): Likewise.
16190 (follow_die_offset): Likewise.
16191 (follow_die_ref): Likewise.
16192 (dwarf2_fetch_die_loc_sect_off): Likewise.
16193 (dwarf2_fetch_constant_bytes): Likewise.
16194 (dwarf2_fetch_die_type_sect_off): Likewise.
16195 (dwarf2_get_die_type): Likewise.
16196 (follow_die_sig): Likewise.
16197 (decode_locdesc): Likewise.
16198 (dwarf2_per_cu_objfile): Likewise.
16199 (dwarf2_per_cu_text_offset): Likewise.
16200 (init_one_comp_unit): Assign dwarf2_per_objfile instead of
16202 (set_die_type): Access objfile through
16203 dwarf2_per_objfile.
16205 2018-01-07 Simon Marchi <simon.marchi@ericsson.com>
16207 * valprint.c (converted_character_d): Remove typedef.
16208 (DEF_VEC_O (converted_character_d)): Remove.
16209 (count_next_character): Use std::vector.
16210 (print_converted_chars_to_obstack): Likewise.
16211 (generic_printstr): Likewise.
16213 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
16215 * xml-support.h (struct gdb_xml_value): Add constructor.
16216 <value>: Change type to unique_xmalloc_ptr.
16217 (gdb_xml_value_s): Remove typedef.
16218 (DEF_VEC_O (gdb_xml_value_s)): Remove.
16219 (gdb_xml_element_start_handler): Change parameter type to
16221 (xml_find_attribute): Likewise.
16222 * xml-support.c (xml_find_attribute): Change parameter type to
16223 std::vector and adjust.
16224 (gdb_xml_values_cleanup): Remove.
16225 (gdb_xml_parser::start_element): Adjust to std::vector.
16226 (xinclude_start_include): Change paraeter type to std::vector
16228 * btrace.c (check_xml_btrace_version): Likewise.
16229 (parse_xml_btrace_block): Likewise.
16230 (parse_xml_btrace_pt_config_cpu): Likewise.
16231 (parse_xml_btrace_pt): Likewise.
16232 (parse_xml_btrace_conf_bts): Likewise.
16233 (parse_xml_btrace_conf_pt): Likewise.
16234 * memory-map.c (memory_map_start_memory): Likewise.
16235 (memory_map_start_property): Likewise.
16236 * osdata.c (osdata_start_osdata): Likewise.
16237 (osdata_start_item): Likewise.
16238 (osdata_start_column): Likewise.
16239 * remote.c (start_thread): Likewise.
16240 * solib-aix.c (library_list_start_library): Likewise.
16241 (library_list_start_list): Likewise.
16242 * solib-svr4.c (library_list_start_library): Likewise.
16243 (svr4_library_list_start_list): Likewise.
16244 * solib-target.c (library_list_start_segment): Likewise.
16245 (library_list_start_section): Likewise.
16246 (library_list_start_library): Likewise.
16247 (library_list_start_list): Likewise.
16248 * tracepoint.c (traceframe_info_start_memory): Likewise.
16249 (traceframe_info_start_tvar): Likewise.
16250 * xml-syscall.c (syscall_start_syscall): Likewise.
16251 * xml-tdesc.c (tdesc_start_target): Likewise.
16252 (tdesc_start_feature): Likewise.
16253 (tdesc_start_reg): Likewise.
16254 (tdesc_start_union): Likewise.
16255 (tdesc_start_struct): Likewise.
16256 (tdesc_start_flags): Likewise.
16257 (tdesc_start_enum): Likewise.
16258 (tdesc_start_field): Likewise.
16259 (tdesc_start_enum_value): Likewise.
16260 (tdesc_start_vector): Likewise.
16262 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
16264 * extension.h (struct xmethod_worker) <clone>: Remove.
16265 * python/py-xmethods.c (struct python_xmethod_worker) <clone>:
16267 (python_xmethod_worker::clone): Remove.
16268 * valops.c (find_overload_match): Use std::move instead of
16271 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
16273 * extension-priv.h (enum ext_lang_rc): Remove, move to extension.h.
16274 (struct extension_language_ops) <clone_xmethod_worker_data>: Remove.
16275 <free_xmethod_worker_data>: Remove.
16276 <get_matching_xmethod_workers>: Chance VEC to std::vector.
16277 <get_xmethod_arg_types>: Remove.
16278 <get_xmethod_result_type>: Remove.
16279 <invoke_xmethod>: Remove.
16280 * extension.c (new_xmethod_worker): Remove.
16281 (clone_xmethod_worker): Remove.
16282 (get_matching_xmethod_workers): Return void, pass std::vector by
16284 (get_xmethod_arg_types): Rename to...
16285 (xmethod_worker::get_arg_types): ... this, and adjust.
16286 (get_xmethod_result_type): Rename to...
16287 (xmethod_worker::get_result_type): ... this, and adjust.
16288 (invoke_xmethod): Remove.
16289 (free_xmethod_worker): Remove.
16290 (free_xmethod_worker_vec): Remove.
16291 * extension.h (enum ext_lang_rc): Move here from
16293 (struct xmethod_worker): Add constructor and destructor.
16296 <invoke, clone, do_get_result_type, do_get_arg_types>: New
16297 virtual pure methods.
16298 <get_arg_types, get_result_type>: New methods.
16299 (xmethod_worker_ptr): Remove typedef.
16300 (DEF_VEC_P (xmethod_worker_ptr)): Remove.
16301 (xmethod_worker_vec): Remove typedef.
16302 (xmethod_worker_up): New typedef.
16303 (invoke_xmethod): Remove.
16304 (clone_xmethod_worker): Remove.
16305 (free_xmethod_worker): Remove.
16306 (free_xmethod_worker_vec): Remove.
16307 (get_xmethod_arg_types): Remove.
16308 (get_xmethod_result_type): Remove.
16309 * valops.c (find_method_list): Use std::vector, don't use
16310 intermediate vector.
16311 (value_find_oload_method_list): Use std::vector.
16312 (find_overload_match): Use std::vector.
16313 (find_oload_champ): Use std::vector.
16314 * value.c (value_free): Use operator delete.
16315 (value_of_xmethod): Rename to...
16316 (value_from_xmethod): ... this. Don't assign
16317 xmethod_worker::value, take rvalue-reference.
16318 (result_type_of_xmethod): Adjust.
16319 (call_xmethod): Adjust.
16320 * value.h: Include extension.h.
16321 (struct xmethod_worker): Don't forward-declare.
16322 (value_of_xmethod): Rename to...
16323 (value_from_xmethod): ... this, take rvalue-reference.
16324 * python/py-xmethods.c (struct gdbpy_worker_data): Rename to...
16325 (struct python_xmethod_worker): ... this, add constructor and
16327 <invoke, clone, do_get_arg_types, do_get_result_type>: Implement.
16328 (gdbpy_free_xmethod_worker_data): Rename to...
16329 (python_xmethod_worker::~python_xmethod_worker): ... this and
16331 (gdbpy_clone_xmethod_worker_data): Rename to...
16332 (python_xmethod_worker::clone): ... this and adjust.
16333 (gdbpy_get_matching_xmethod_workers): Use std::vector, don't use
16335 (gdbpy_get_xmethod_arg_types): Rename to...
16336 (python_xmethod_worker::do_get_arg_types): ... this and adjust.
16337 (gdbpy_get_xmethod_result_type): Rename to...
16338 (python_xmethod_worker::do_get_result_type): ... this and
16340 (gdbpy_invoke_xmethod): Rename to...
16341 (python_xmethod_worker::invoke): ... this and adjust.
16342 (new_python_xmethod_worker): Rename to...
16343 (python_xmethod_worker::python_xmethod_worker): ... this and
16345 * python/python-internal.h (gdbpy_clone_xmethod_worker_data):
16347 (gdbpy_free_xmethod_worker_data): Remove.
16348 (gdbpy_get_matching_xmethod_workers): Use std::vector.
16349 (gdbpy_get_xmethod_arg_types): Remove.
16350 (gdbpy_get_xmethod_result_type): Remove.
16351 (gdbpy_invoke_xmethod): Remove.
16352 * python/python.c (python_extension_ops): Remove obsolete
16355 2018-01-05 Pedro Alves <palves@redhat.com>
16358 * common/signals-state-save-restore.c
16359 (save_original_signals_state): New parameter 'quiet'. Warn if we
16360 find a custom handler preinstalled, instead of internal erroring.
16361 But only warn if !quiet.
16362 * common/signals-state-save-restore.h
16363 (save_original_signals_state): New parameter 'quiet'.
16364 * main.c (captured_main_1): Move save_original_signals_state call
16365 after option handling, and pass QUIET.
16367 2018-01-05 Pedro Alves <palves@redhat.com>
16369 * spu-tdep.c (spu_catch_start): Pass
16370 symbol_name_match_type::SEARCH_NAME to block_lookup_symbol.
16372 2018-01-05 Pedro Alves <palves@redhat.com>
16375 * ada-lang.c (literal_symbol_name_matcher): New function.
16376 (ada_get_symbol_name_matcher): Use it for
16377 symbol_name_match_type::SEARCH_NAME.
16378 * block.c (block_lookup_symbol): New parameter 'match_type'. Pass
16379 it down instead of assuming symbol_name_match_type::FULL.
16380 * block.h (block_lookup_symbol): New parameter 'match_type'.
16381 * c-valprint.c (print_unpacked_pointer): Use
16382 lookup_symbol_search_name instead of lookup_symbol.
16383 * compile/compile-object-load.c (get_out_value_type): Pass down
16384 symbol_name_match_type::SEARCH_NAME.
16385 * cp-namespace.c (cp_basic_lookup_symbol): Pass down
16386 symbol_name_match_type::FULL.
16387 * cp-support.c (cp_get_symbol_name_matcher): Handle
16388 symbol_name_match_type::SEARCH_NAME.
16389 * infrun.c (insert_exception_resume_breakpoint): Use
16390 lookup_symbol_search_name.
16391 * p-valprint.c (pascal_val_print): Use lookup_symbol_search_name.
16392 * psymtab.c (maintenance_check_psymtabs): Use
16393 symbol_name_match_type::SEARCH_NAME and SYMBOL_SEARCH_NAME.
16394 * stack.c (print_frame_args): Use lookup_symbol_search_name and
16395 SYMBOL_SEARCH_NAME.
16396 * symtab.c (lookup_local_symbol): Don't demangle the lookup name
16397 if symbol_name_match_type::SEARCH_NAME.
16398 (lookup_symbol_in_language): Pass down
16399 symbol_name_match_type::FULL.
16400 (lookup_symbol_search_name): New.
16401 (lookup_language_this): Pass down
16402 symbol_name_match_type::SEARCH_NAME.
16403 (lookup_symbol_aux, lookup_local_symbol): New parameter
16404 'match_type'. Pass it down.
16405 * symtab.h (symbol_name_match_type::SEARCH_NAME): New enumerator.
16406 (lookup_symbol_search_name): New declaration.
16407 (lookup_symbol_in_block): New 'match_type' parameter.
16409 2018-01-05 Pedro Alves <palves@redhat.com>
16412 * ada-lang.c (ada_lookup_encoded_symbol): Reimplement in terms of
16414 (ada_lookup_symbol): Reimplement in terms of
16415 ada_lookup_symbol_list, bits factored out from
16416 ada_lookup_encoded_symbol.
16418 2018-01-05 Joel Brobecker <brobecker@adacore.com>
16420 * ada-exp.y (write_object_renaming): When subscripting an array
16421 using a symbol as the index, pass the block in call to
16422 ada_lookup_encoded_symbol when looking that symbol up.
16424 2018-01-05 Jerome Guitton <guitton@adacore.com>
16426 * ada-lang.c (ada_array_length): Use ada_index_type instead of
16429 2018-01-05 Joel Brobecker <brobecker@adacore.com>
16431 * ada-lang.c (ada_to_fixed_value_create): Add handling of
16432 the case where VALUE_LVAL (val0) is not lval_memory.
16434 2018-01-05 Xavier Roirand <roirand@adacore.com>
16436 * ada-valprint.c (print_optional_low_bound): Handle
16437 character-indexed array printing like boolean-indexed array
16440 2018-01-05 Joel Brobecker <brobecker@adacore.com>
16442 * NEWS: Create a new section for the next release branch.
16443 Rename the section of the current branch, now that it has
16446 2018-01-05 Joel Brobecker <brobecker@adacore.com>
16448 GDB 8.1 branch created (5219ac6237c272b938c28517bf371429260c71e7):
16449 * version.in: Bump version to 8.1.50.DATE-git.
16451 2018-01-03 Xavier Roirand <roirand@adacore.com>
16453 * ada-lang.h (ada_exception_catchpoint_kind) <ada_catch_handlers>:
16455 * ada-lang.c (struct exception_support_info) <catch_handlers_sym>:
16457 (default_exception_support_info) <catch_handlers_sym>: Add field.
16458 (exception_support_info_fallback) <catch_handlers_sym>: Add field.
16459 (ada_exception_name_addr_1): Add "catch handlers" handling.
16460 (ada_exception_catchpoint_cond_string) <ex>: New parameter.
16461 Update all callers.
16462 (create_excep_cond_exprs) <ex>: Add parameter.
16463 (re_set_exception): Update create_excep_cond_exprs call.
16464 (print_it_exception, print_one_exception, print_mention_exception)
16465 (print_recreate_exception): Add "catch handler" handling.
16466 (allocate_location_catch_handlers, re_set_catch_handlers)
16467 (check_status_catch_handlers, print_it_catch_handlers)
16468 (print_one_catch_handlers, print_mention_catch_handlers)
16469 (print_recreate_catch_handlers): New function.
16470 (catch_handlers_breakpoint_ops): New variable.
16471 (catch_ada_exception_command_split) <is_catch_handlers_cmd>:
16472 Add parameter. Add "catch handler" handling.
16473 (ada_exception_sym_name, ada_exception_breakpoint_ops):
16474 Add "catch handler" handling.
16475 (ada_exception_catchpoint_cond_string): Add "catch handler"
16477 (create_ada_exception_catchpoint): Update create_excep_cond_exprs
16479 (catch_ada_handlers_command): New function.
16480 (initialize_ada_catchpoint_ops): Initialize "catch handlers"
16481 operations structure.
16482 (_initialize_ada_language): Add "catch handlers" command entry.
16483 * NEWS: Document "catch handlers" feature.
16485 2018-01-02 Joel Brobecker <brobecker@adacore.com>
16487 * ada-lang.c (ada_value_slice_from_ptr): Take array stride into
16488 account when creating the array type of the slice.
16489 (ada_value_slice): Likewise.
16491 2018-01-02 Joel Brobecker <brobecker@adacore.com>
16493 * gdbtypes.h (enum dynamic_prop_node_kind) <DYN_PROP_BYTE_STRIDE>:
16495 (create_array_type_with_stride): Add byte_stride_prop parameter.
16496 * gdbtypes.c (create_array_type_with_stride) <byte_stride_prop>:
16497 New parameter. Update all callers in this file.
16498 (array_type_has_dynamic_stride): New function.
16499 (is_dynamic_type_internal, resolve_dynamic_array): Add handling
16500 of arrays with dynamic byte strides.
16501 * dwarf2read.c (read_array_type): Add support for dynamic
16502 DW_AT_byte_stride attributes.
16504 2018-01-02 Joel Brobecker <brobecker@adacore.com>
16506 * dwarf2read.c (read_unspecified_type): Treat
16507 DW_TAG_enumeration_type DIEs from Ada units as stubs.
16509 2018-01-01 Joel Brobecker <brobecker@adacore.com>
16511 Update copyright year range in all GDB files.
16513 2018-01-01, 18 Joel Brobecker <brobecker@adacore.com>
16515 * copyright.py (BY_HAND): Remove gdb/testsuite/gdb.base/step-line.inp
16516 and gdb/testsuite/gdb.base/step-line.c.
16518 2018-01-01 Joel Brobecker <brobecker@adacore.com>
16520 * copyright.py (main): Dump the contents of
16521 MULTIPLE_COPYRIGHT_HEADERS (separately) from BY_HAND,
16522 even if BY_HAND is empty.
16524 2018-01-01 Joel Brobecker <brobecker@adacore.com>
16526 * top.c (print_gdb_version): Update Copyright year in version
16529 2018-01-01 Joel Brobecker <brobecker@adacore.com>
16531 * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2017.
16533 For older changes see ChangeLog-2017.
16539 version-control: never