666f0783e29d55f169f200fc266f40b65521b572
[deliverable/binutils-gdb.git] / gdb / ChangeLog
1 2018-11-30 Andrew Burgess <andrew.burgess@embecosm.com>
2
3 * arch/riscv.h (riscv_gdbarch_features::hash): New method.
4 * arch/riscv.c (struct riscv_gdbarch_features_hasher): New.
5 (riscv_tdesc_cache): New global.
6 (riscv_create_target_description): Look in the cache before
7 creating a new target description.
8
9 2018-11-30 Andrew Burgess <andrew.burgess@embecosm.com>
10
11 * arch/riscv.h (riscv_gdb_features::operator==): New.
12 (riscv_gdb_features::operator!=): New.
13 * riscv-tdep.c (riscv_gdbarch_init): Make use of the inequality
14 operator.
15
16 2018-11-30 Andrew Burgess <andrew.burgess@embecosm.com>
17
18 * arch/riscv.h (riscv_create_target_description): Make return type
19 const.
20 * arch/riscv.c (riscv_create_target_description): Likewise.
21 * riscv-tdep.c (riscv_find_default_target_description): Likewise.
22
23 2018-11-30 Jan Kratochvil <jan.kratochvil@redhat.com>
24 Keith Seitz <keiths@redhat.com>
25 Tom Tromey <tom@tromey.com>
26 Sergio Durigan Junior <sergiodj@redhat.com>
27
28 https://bugzilla.redhat.com/show_bug.cgi?id=1613614
29 * dwarf2read.c (dwarf2_find_containing_comp_unit): Add
30 'mid_cu->length' to '*cu_off' when checking if 'sect_off' is
31 inside the CU.
32
33 2018-11-30 Pedro Alves <palves@redhat.com>
34
35 * aix-thread.c (aix_thread_target) <aix_thread_target>: Delete.
36 <stratum>: New override.
37 * bfd-target.c (aix_thread_target) <aix_thread_target>: Delete.
38 <stratum>: New override.
39 * bsd-uthread.c (bsd_uthread_target) <bsd_uthread_target>: Delete.
40 <stratum>: New override.
41 * exec.c (exec_target) <exec_target>: Delete.
42 <stratum>: New override.
43 * gdbarch-selftests.c (register_to_value_test): Adjust to use the
44 stratum method instead of the to_stratum field.
45 * linux-thread-db.c (thread_db_target) <thread_db_target>: Delete.
46 <stratum>: New override.
47 (thread_db_target::thread_db_target): Delete.
48 * make-target-delegates (print_class): Don't print a ctor
49 declaration. Print a stratum method override declaration.
50 * process-stratum-target.h (process_stratum_target)
51 <process_stratum_target>: Delete.
52 <stratum>: New override.
53 * ravenscar-thread.c (ravenscar_thread_target)
54 <ravenscar_thread_target>: Delete.
55 <stratum>: New override.
56 * record-btrace.c (record_btrace_target)
57 <record_btrace_target>: Delete.
58 <stratum>: New override.
59 * record-full.c (record_full_base_target)
60 <record_full_base_target>: Delete.
61 <stratum>: New override.
62 * record.c (record_disconnect, record_detach)
63 (record_mourn_inferior, record_kill): Adjust to use the stratum
64 method instead of the to_stratum field.
65 * regcache.c (cooked_read_test, cooked_write_test): Likewise.
66 * sol-thread.c (sol_thread_target)
67 <sol_thread_target>: Delete.
68 <stratum>: New override.
69 * spu-multiarch.c (spu_multiarch_target)
70 <spu_multiarch_target>: Delete.
71 <stratum>: New override.
72 * target-delegates.c: Regenerate.
73 * target.c (target_stack::push, target_stack::unpush)
74 (pop_all_targets_above, pop_all_targets_at_and_above)
75 (info_target_command, target_require_runnable)
76 (target_stack::find_beneath): Adjust to use the stratum method
77 instead of the to_stratum field.
78 (dummy_target::dummy_target): Delete.
79 (dummy_target::stratum): New.
80 (debug_target::debug_target): Delete.
81 (debug_target::stratum): New.
82 (maintenance_print_target_stack): Adjust to use the stratum method
83 instead of the to_stratum field.
84 * target.h (struct target_ops) <stratum>: New method.
85 <to_stratum>: Delete.
86 <is_pushed>: Adjust to use the stratum method
87 instead of the to_stratum field.
88
89 2018-11-30 Pedro Alves <palves@redhat.com>
90
91 * corelow.c (core_target) <has_all_memory, has_execution>: New
92 overrides.
93 * inf-child.c (inf_child_target::has_all_memory)
94 (inf_child_target::has_memory, inf_child_target::has_stack)
95 (inf_child_target::has_registers)
96 (inf_child_target::has_execution): Delete.
97 * inf-child.h (inf_child_target) <has_all_memory, has_memory,
98 has_stack, has_registers, has_execution>: Delete.
99 * process-stratum-target.c
100 (process_stratum_target::has_all_memory)
101 (process_stratum_target::has_memory)
102 (process_stratum_target::has_stack)
103 (process_stratum_target::has_registers)
104 (process_stratum_target::has_execution): New.
105 * process-stratum-target.h (process_stratum_target)
106 <has_all_memory, has_memory, has_stack, has_registers,
107 has_execution>: New method overrides.
108 * ravenscar-thread.c (ravenscar_thread_target) <has_all_memory,
109 has_memory, has_stack, has_registers, has_execution>: Delete.
110 * remote-sim.c (gdbsim_target) <has_stack, has_registers,
111 has_execution>: Delete.
112 * remote.c (remote_target) <has_all_memory, has_memory, has_stack,
113 has_registers, has_execution>: Delete.
114 * target.c (default_child_has_all_memory)
115 (default_child_has_memory, default_child_has_stack)
116 (default_child_has_registers, default_child_has_execution):
117 Delete.
118 * target.h (default_child_has_all_memory)
119 (default_child_has_memory, default_child_has_stack)
120 (default_child_has_registers, default_child_has_execution):
121 Delete.
122 * tracefile.h (tracefile_target) <has_execution>: New override.
123
124 2018-11-30 Pedro Alves <palves@redhat.com>
125
126 * Makefile.in (COMMON_SFILES): Add process-stratum-target.c.
127 * bsd-kvm.c: Include "process-stratum-target.h".
128 (bsd_kvm_target): Now inherits from process_stratum_target.
129 (bsd_kvm_target::bsd_kvm_target): Default it.
130 * corelow.c: Include "process-stratum-target.h".
131 (core_target): Now inherits from process_stratum_target.
132 (core_target::core_target): Don't set to_stratum here.
133 * inf-child.c (inf_child_target::inf_child_target): Delete.
134 * inf-child.h: Include "process-stratum-target.h".
135 (inf_child_target): Inherit from process_stratum_target.
136 (inf_child_target) <inf_child_target>: Default it.
137 <can_async_p, supports_non_stop, supports_disable_randomization>:
138 Delete overrides.
139 * process-stratum-target.c: New file.
140 * process-stratum-target.h: New file.
141 * remote-sim.c: Include "process-stratum-target.h".
142 (gdbsim_target): Inherit from process_stratum_target.
143 <gdbsim_target>: Default it.
144 * remote.c: Include "process-stratum-target.h".
145 (remote_target): Inherit from process_stratum_target.
146 <remote_target>: Default it.
147 * target.c (default_thread_address_space)
148 (default_thread_architecture): Delete.
149 * target.h (target_ops) <thread_architecture>: Now returns NULL by
150 default.
151 <thread_address_space>: Ditto.
152 * test-target.h: Include "process-stratum-target.h" instead of
153 "target.h".
154 (test_target_ops): Inherit from process_stratum_target.
155 <test_target_ops>: Default it.
156 * tracefile.c (tracefile_target::tracefile_target): Delete.
157 * tracefile.h: Include "process-stratum-target.h".
158 (tracefile_target): Inherit from process_stratum_target.
159 <tracefile_target>: Default it.
160 * target-delegates.c: Regenerate.
161
162 2018-11-30 Pedro Alves <palves@redhat.com>
163
164 * Makefile.in (COMMON_SFILES): Add test-target.c.
165 * gdbarch-selftests.c: Include "test-target.h".
166 * regcache.c: Include "test-target.h".
167 * target.c (test_target_info, test_target_ops::info): Move to ...
168 * test-target.c: ... this new file.
169 * target.h (test_target_ops): Move to ...
170 * test-target.h: ... this new file.
171
172 2018-11-29 Philippe Waroquiers <philippe.waroquiers@skynet.be>
173
174 * source.c (forward_search_command): Fix leak by using
175 xrealloc even for the first allocation in the loop, as buf
176 is static.
177
178 2018-11-29 Rajendra SY <rajendra.sy@gmail.com>
179
180 PR gdb/23093
181 * gdb/fbsd-tdep.c (fbsd_gdb_signal_from_target)
182 (fbsd_gdb_signal_to_target): New.
183 (fbsd_init_abi): Install gdbarch "signal_from_target" and
184 "signal_to_target" methods.
185
186 2018-11-29 Tom Tromey <tom@tromey.com>
187
188 * valarith.c (value_x_unop): Don't set argvec[3].
189
190 2018-11-26 Simon Marchi <simon.marchi@ericsson.com>
191
192 PR gdb/23917
193 * sparc-linux-nat.c (sparc_linux_nat_target): Remove extraneous
194 semicolon.
195
196 2018-11-26 Pedro Alves <palves@redhat.com>
197
198 * procfs.c (procfs_notice_thread): Replace uses of
199 in_thread_list/is_exited with find_thread_ptid/THREAD_EXITED.
200 * sol-thread.c (sol_thread_target::wait)
201 (sol_update_thread_list_callback): Likewise.
202
203 2018-11-25 Tom Tromey <tom@tromey.com>
204
205 * ui-out.c (ui_out::field_fmt): Remove comment.
206 * tui/tui-out.c (tui_ui_out::do_field_fmt): Remove comment.
207 * mi/mi-out.c (mi_ui_out::do_field_fmt): Remove comment.
208
209 2018-11-24 Philippe Waroquiers <philippe.waroquiers@skynet.be>
210
211 * source.c (open_source_file): Leak fixed in '8e6a5953e1d Fix 4K
212 leak in open_source_file' has been partially undone by '2179fbc36d23
213 Return scoped_fd from open_source_file'. Re-add the transfer of
214 current s->fullname to the unique_xmalloc_ptr fullname given
215 to find_and_open_source.
216
217 2018-11-23 Pedro Alves <palves@redhat.com>
218
219 * gdbthread.h (enum thread_state): Move comments here.
220 (is_running, is_stopped, is_exited): Remove declarations.
221
222 2018-11-22 Pedro Alves <palves@redhat.com>
223
224 * Makefile.in (COMMON_SFILES): Add thread-iter.c.
225 * breakpoint.c (breakpoints_should_be_inserted_now): Replace
226 ALL_NON_EXITED_THREADS with all_non_exited_threads.
227 (print_one_breakpoint_location): Replace ALL_INFERIORS with
228 all_inferiors.
229 * bsd-kvm.c: Include inferior.h.
230 * btrace.c (btrace_free_objfile): Replace ALL_NON_EXITED_THREADS
231 with all_non_exited_threads.
232 * common/filtered-iterator.h: New.
233 * common/safe-iterator.h: New.
234 * corelow.c (core_target_open): Don't call init_thread_list here.
235 * darwin-nat.c (thread_info_from_private_thread_info): Replace
236 ALL_THREADS with all_threads.
237 * fbsd-nat.c (fbsd_nat_target::resume): Replace
238 ALL_NON_EXITED_THREADS with inf->non_exited_threads.
239 * fbsd-tdep.c (fbsd_make_corefile_notes): Replace
240 ALL_NON_EXITED_THREADS with inf->non_exited_threads.
241 * fork-child.c (postfork_hook): Don't call init_thread_list here.
242 * gdbarch-selftests.c (register_to_value_test): Adjust.
243 * gdbthread.h: Don't include "inferior.h" here.
244 (struct inferior): Forward declare.
245 (enum step_over_calls_kind): Moved here from inferior.h.
246 (thread_info::deletable): Definition moved to thread.c.
247 (find_thread_ptid (inferior *, ptid_t)): Declare.
248 (ALL_THREADS, ALL_THREADS_BY_INFERIOR, ALL_THREADS_SAFE): Delete.
249 Include "thread-iter.h".
250 (all_threads, all_non_exited_threads, all_threads_safe): New.
251 (any_thread_p): Declare.
252 (thread_list): Delete.
253 * infcmd.c (signal_command): Replace ALL_NON_EXITED_THREADS with
254 all_non_exited_threads.
255 (proceed_after_attach_callback): Delete.
256 (proceed_after_attach): Take an inferior pointer instead of an
257 integer PID. Adjust to use range-for.
258 (attach_post_wait): Pass down inferior pointer instead of pid.
259 Use range-for instead of ALL_NON_EXITED_THREADS.
260 (detach_command): Remove init_thread_list call.
261 * inferior-iter.h: New.
262 * inferior.c (struct delete_thread_of_inferior_arg): Delete.
263 (delete_thread_of_inferior): Delete.
264 (delete_inferior, exit_inferior_1): Use range-for with
265 inf->threads_safe() instead of iterate_over_threads.
266 (inferior_appeared): Call init_thread_list here.
267 (discard_all_inferiors): Use all_non_exited_inferiors.
268 (find_inferior_id, find_inferior_pid): Use all_inferiors.
269 (iterate_over_inferiors): Use all_inferiors_safe.
270 (have_inferiors, number_of_live_inferiors): Use
271 all_non_exited_inferiors.
272 (number_of_inferiors): Use all_inferiors and std::distance.
273 (print_inferior): Use all_inferiors.
274 * inferior.h: Include gdbthread.h.
275 (enum step_over_calls_kind): Moved to gdbthread.h.
276 (struct inferior) <thread_list>: New field.
277 <threads, non_exited_threads, threads_safe>: New methods.
278 (ALL_INFERIORS): Delete.
279 Include "inferior-iter.h".
280 (ALL_NON_EXITED_INFERIORS): Delete.
281 (all_inferiors_safe, all_inferiors, all_non_exited_inferiors): New
282 functions.
283 * inflow.c (child_interrupt, child_pass_ctrlc): Replace
284 ALL_NON_EXITED_THREADS with all_non_exited_threads.
285 * infrun.c (follow_exec): Use all_threads_safe.
286 (clear_proceed_status, proceed): Use all_non_exited_threads.
287 (init_wait_for_inferior): Don't clear inline frame state here.
288 (infrun_thread_stop_requested, for_each_just_stopped_thread): Use
289 all_threads instead of ALL_NON_EXITED_THREADS.
290 (random_pending_event_thread): Use all_non_exited_threads instead
291 of ALL_NON_EXITED_THREADS. Use a lambda for repeated code.
292 (clean_up_just_stopped_threads_fsms): Use all_non_exited_threads
293 instead of ALL_NON_EXITED_THREADS.
294 (handle_no_resumed): Use all_non_exited_threads instead of
295 ALL_NON_EXITED_THREADS. Use all_inferiors instead of
296 ALL_INFERIORS.
297 (restart_threads, switch_back_to_stepped_thread): Use
298 all_non_exited_threads instead of ALL_NON_EXITED_THREADS.
299 * linux-nat.c (check_zombie_leaders): Replace ALL_INFERIORS with
300 all_inferiors.
301 (kill_unfollowed_fork_children): Use inf->non_exited_threads
302 instead of ALL_NON_EXITED_THREADS.
303 * linux-tdep.c (linux_make_corefile_notes): Use
304 inf->non_exited_threads instead of ALL_NON_EXITED_THREADS.
305 * linux-thread-db.c (thread_db_target::update_thread_list):
306 Replace ALL_INFERIORS with all_inferiors.
307 (thread_db_target::thread_handle_to_thread_info): Use
308 inf->non_exited_threads instead of ALL_NON_EXITED_THREADS.
309 * mi/mi-interp.c (multiple_inferiors_p): New.
310 (mi_on_resume_1): Simplify using all_non_exited_threads and
311 multiple_inferiors_p.
312 * mi/mi-main.c (mi_cmd_thread_list_ids): Use all_non_exited_threads
313 instead of ALL_NON_EXITED_THREADS.
314 * nto-procfs.c (nto_procfs_target::open): Don't call
315 init_thread_list here.
316 * record-btrace.c (record_btrace_target_open)
317 (record_btrace_target::stop_recording)
318 (record_btrace_target::close)
319 (record_btrace_target::record_is_replaying)
320 (record_btrace_target::resume, record_btrace_target::wait)
321 (record_btrace_target::record_stop_replaying): Use
322 all_non_exited_threads instead of ALL_NON_EXITED_THREADS.
323 * record-full.c (record_full_wait_1): Use all_non_exited_threads
324 instead of ALL_NON_EXITED_THREADS.
325 * regcache.c (cooked_read_test): Remove reference to global
326 thread_list.
327 * remote-sim.c (gdbsim_target::create_inferior): Don't call
328 init_thread_list here.
329 * remote.c (remote_target::update_thread_list): Use
330 all_threads_safe instead of ALL_NON_EXITED_THREADS.
331 (remote_target::process_initial_stop_replies): Replace
332 ALL_INFERIORS with all_non_exited_inferiors and use
333 all_non_exited_threads instead of ALL_NON_EXITED_THREADS.
334 (remote_target::open_1): Don't call init_thread_list here.
335 (remote_target::append_pending_thread_resumptions)
336 (remote_target::remote_resume_with_hc): Use all_non_exited_threads
337 instead of ALL_NON_EXITED_THREADS.
338 (remote_target::commit_resume)
339 (remote_target::remove_new_fork_children): Replace ALL_INFERIORS
340 with all_non_exited_inferiors and use all_non_exited_threads
341 instead of ALL_NON_EXITED_THREADS.
342 (remote_target::kill_new_fork_children): Use
343 all_non_exited_threads instead of ALL_NON_EXITED_THREADS. Remove
344 init_thread_list and init_wait_for_inferior calls.
345 (remote_target::remote_btrace_maybe_reopen)
346 (remote_target::thread_handle_to_thread_info): Use
347 all_non_exited_threads instead of ALL_NON_EXITED_THREADS.
348 * target.c (target_terminal::restore_inferior)
349 (target_terminal_is_ours_kind): Replace ALL_INFERIORS with
350 all_non_exited_inferiors.
351 * thread-iter.c: New file.
352 * thread-iter.h: New file.
353 * thread.c: Include "inline-frame.h".
354 (thread_list): Delete.
355 (clear_thread_inferior_resources): Call clear_inline_frame_state.
356 (init_thread_list): Use all_threads_safe instead of
357 ALL_THREADS_SAFE. Adjust to per-inferior thread lists.
358 (new_thread): Adjust to per-inferior thread lists.
359 (add_thread_silent): Pass inferior to find_thread_ptid.
360 (thread_info::deletable): New, moved from the header.
361 (delete_thread_1): Adjust to per-inferior thread lists.
362 (find_thread_global_id): Use inf->threads().
363 (find_thread_ptid): Use find_inferior_ptid and pass inferior to
364 find_thread_ptid.
365 (find_thread_ptid(inferior*, ptid_t)): New overload.
366 (iterate_over_threads): Use all_threads_safe.
367 (any_thread_p): New.
368 (thread_count): Use all_threads and std::distance.
369 (live_threads_count): Use all_non_exited_threads and
370 std::distance.
371 (valid_global_thread_id): Use all_threads.
372 (in_thread_list): Use find_thread_ptid.
373 (first_thread_of_inferior): Adjust to per-inferior thread lists.
374 (any_thread_of_inferior, any_live_thread_of_inferior): Use
375 inf->non_exited_threads().
376 (prune_threads, delete_exited_threads): Use all_threads_safe.
377 (thread_change_ptid): Pass inferior pointer to find_thread_ptid.
378 (set_resumed, set_running): Use all_non_exited_threads.
379 (is_thread_state, is_stopped, is_exited, is_running)
380 (is_executing): Delete.
381 (set_executing, set_stop_requested, finish_thread_state): Use
382 all_non_exited_threads.
383 (print_thread_info_1): Use all_inferiors and all_threads.
384 (thread_apply_all_command): Use all_non_exited_threads.
385 (thread_find_command): Use all_threads.
386 (update_threads_executing): Use all_non_exited_threads.
387 * tid-parse.c (parse_thread_id): Use inf->threads.
388 * x86-bsd-nat.c (x86bsd_dr_set): Use inf->non_exited_threads ().
389
390 2018-11-22 Pedro Alves <palves@redhat.com>
391
392 * infrun.c (follow_exec) <set follow-exec new>: Add thread and
393 switch to it before calling into try_open_exec_file.
394
395 2018-11-22 Pedro Alves <palves@redhat.com>
396
397 * cli/cli-interp.c (cli_on_user_selected_context_changed): Use
398 inferior_thread instead of find_thread_ptid, and only when
399 inferior_ptid is not null_ptid.
400 * inferior.c (add_inferior): Don't include target_pid_to_str
401 output when the inferior is not started.
402 * python/py-inferior.c (python_on_normal_stop): Don't use
403 find_thread_ptid.
404 (tui_on_user_selected_context_changed): Use inferior_thread
405 instead of find_thread_ptid, and only when inferior_ptid is not
406 null_ptid.
407
408 2018-11-21 Benno Fünfstück <benno.fuenfstueck@gmail.com>
409
410 PR python/23714
411 * gdb/python/python.c (execute_gdb_command): Call
412 prevent_dont_repeat earlier to avoid affecting dont_repeat.
413
414 2018-11-21 Andrew Burgess <andrew.burgess@embecosm.com>
415
416 * Makefile.in (ALL_TARGET_OBS): Add arch/riscv.o.
417 (HFILES_NO_SRCDIR): Add arch/riscv.h.
418 * arch/riscv.c: New file.
419 * arch/riscv.h: New file.
420 * configure.tgt: Add cpu_obs list of riscv, move riscv-tdep.o into
421 this list, and add arch/riscv.o.
422 * features/Makefile: Add riscv features.
423 * features/riscv/32bit-cpu.c: New file.
424 * features/riscv/32bit-cpu.xml: New file.
425 * features/riscv/32bit-csr.c: New file.
426 * features/riscv/32bit-csr.xml: New file.
427 * features/riscv/32bit-fpu.c: New file.
428 * features/riscv/32bit-fpu.xml: New file.
429 * features/riscv/64bit-cpu.c: New file.
430 * features/riscv/64bit-cpu.xml: New file.
431 * features/riscv/64bit-csr.c: New file.
432 * features/riscv/64bit-csr.xml: New file.
433 * features/riscv/64bit-fpu.c: New file.
434 * features/riscv/64bit-fpu.xml: New file.
435 * features/riscv/rebuild-csr-xml.sh: New file.
436 * riscv-tdep.c: Add 'arch/riscv.h' include.
437 (riscv_gdb_reg_names): Delete.
438 (csr_reggroup): New global.
439 (struct riscv_register_alias): Delete.
440 (struct riscv_register_feature): New structure.
441 (riscv_register_aliases): Delete.
442 (riscv_xreg_feature): New global.
443 (riscv_freg_feature): New global.
444 (riscv_virtual_feature): New global.
445 (riscv_csr_feature): New global.
446 (riscv_create_csr_aliases): New function.
447 (riscv_read_misa_reg): Delete.
448 (riscv_has_feature): Delete.
449 (riscv_isa_xlen): Simplify, just return cached xlen.
450 (riscv_isa_flen): Simplify, just return cached flen.
451 (riscv_has_fp_abi): Update for changes in struct gdbarch_tdep.
452 (riscv_register_name): Update to make use of tdesc_register_name.
453 Look up xreg and freg names in the new globals riscv_xreg_feature
454 and riscv_freg_feature. Don't supply csr aliases here.
455 (riscv_fpreg_q_type): Delete.
456 (riscv_register_type): Use tdesc_register_type in almost all
457 cases, override the returned type in a few specific cases only.
458 (riscv_print_one_register_info): Handle errors reading registers.
459 (riscv_register_reggroup_p): Use tdesc_register_in_reggroup_p for
460 registers that are otherwise unknown to GDB. Also check the
461 csr_reggroup.
462 (riscv_print_registers_info): Remove assert about upper register
463 number, and use gdbarch_register_reggroup_p instead of
464 short-cutting.
465 (riscv_find_default_target_description): New function.
466 (riscv_check_tdesc_feature): New function.
467 (riscv_add_reggroups): New function.
468 (riscv_setup_register_aliases): New function.
469 (riscv_init_reggroups): New function.
470 (_initialize_riscv_tdep): Add calls to setup CSR aliases, and
471 setup register groups. Register new riscv debug variable.
472 * riscv-tdep.h: Add 'arch/riscv.h' include.
473 (struct gdbarch_tdep): Remove abi union, and add
474 riscv_gdbarch_features field. Remove cached quad floating point
475 type, and provide initialisation for double type field.
476 * target-descriptions.c (maint_print_c_tdesc_cmd): Add riscv to
477 the list of targets using the feature based target descriptions.
478 * NEWS: Mention target description support.
479
480 2018-11-21 Pedro Alves <palves@redhat.com>
481
482 * valops.c (find_method_list, value_find_oload_method_list)
483 (find_overload_match, find_oload_champ): Rename parameters and
484 locals.
485
486 2018-11-21 Pedro Alves <palves@redhat.com>
487
488 * valops.c (find_method_list): Replace pointer and length
489 parameters with an gdb::array_view. Adjust.
490 (value_find_oload_method_list): Likewise.
491 (find_overload_match): Use gdb::array_view for methods list.
492 Adjust to find_oload_champ interface change.
493 (find_oload_champ): 'xm_worker_vec' parameter now a pointer/array.
494 'num_fns' parameter now a size_t. Eliminate 'fn_count' local.
495
496 2018-11-21 Pedro Alves <palves@redhat.com>
497
498 * gdbtypes.c (compare_badness): Change type of parameters to const
499 reference. Adjust to badness_vector being a std::vector now.
500 (rank_function): Adjust to badness_vector being a std::vector now.
501 * gdbtypes.h (badness_vector): Now a typedef to std::vector.
502 (LENGTH_MATCH): Delete.
503 (compare_badness): Change type of parameters to const reference.
504 (rank_function): Return a badness_vector by value now.
505 (find_overload_match): Adjust to badness_vector being a
506 std::vector now. Remove cleanups.
507 (find_oload_champ_namespace): 'oload_champ_bv' parameter now a
508 badness_vector pointer.
509 (find_oload_champ_namespace_loop): 'oload_champ_bv' parameter now
510 a badness_vector pointer. Adjust to badness_vector being a
511 std::vector now. Remove cleanups.
512 (find_oload_champ): 'oload_champ_bv' parameter now
513 a badness_vector pointer. Adjust to badness_vector being a
514 std::vector now. Remove cleanups.
515
516 2018-11-21 Pedro Alves <palves@redhat.com>
517
518 * cp-support.c (sym_return_val_size, sym_return_val_index)
519 (sym_return_val): Delete.
520 (overload_list_add_symbol): Add std::vector parameter. Adjust to
521 add to the vector.
522 (make_symbol_overload_list): Adjust to return a std::vector
523 instead of maintaining a global open coded vector.
524 (make_symbol_overload_list_block): Add std::vector parameter.
525 (make_symbol_overload_list_block): Rename to ...
526 (add_symbol_overload_list_block): ... this and add std::vector
527 parameter.
528 (make_symbol_overload_list_namespace): Rename to ...
529 (add_symbol_overload_list_namespace): ... this and add std::vector
530 parameter.
531 (make_symbol_overload_list_adl_namespace): Rename to ...
532 (add_symbol_overload_list_adl_namespace): ... this and add
533 std::vector parameter.
534 (make_symbol_overload_list_adl): Delete.
535 (add_symbol_overload_list_adl): New.
536 (make_symbol_overload_list_using): Rename to ...
537 (add_symbol_overload_list_using): ... this and add std::vector
538 parameter.
539 (make_symbol_overload_list_qualified): Rename to ...
540 (add_symbol_overload_list_qualified): ... this and add std::vector
541 parameter.
542 * cp-support.h: Include "common/array-view.h" and <vector>.
543 (make_symbol_overload_list): Change return type to std::vector.
544 (make_symbol_overload_list_adl): Delete declaration.
545 (add_symbol_overload_list_adl): New declaration.
546 * valops.c (find_overload_match): Local 'oload_syms' now a
547 std::vector.
548 (find_oload_champ_namespace): 'oload_syms' parameter now a
549 std::vector pointer.
550 (find_oload_champ_namespace_loop): 'oload_syms' parameter now a
551 std::vector pointer. Adjust to new make_symbol_overload_list
552 interface.
553
554 2018-11-21 Pedro Alves <palves@redhat.com>
555
556 * common/array-view.h (array_view::splice(size_type, size_t)): New.
557 (array_view::splice(size_type)): New.
558 * eval.c (eval_call, evaluate_funcall): Adjust to use array_view.
559 * extension.c (xmethod_worker::get_arg_types): Adjust to return an
560 std::vector.
561 (xmethod_worker::get_result_type): Adjust to use gdb::array_view.
562 * extension.h: Include "common/array-view.h".
563 (xmethod_worker::invoke): Adjust to use gdb::array_view.
564 (xmethod_worker::get_arg_types): Adjust to return an std::vector.
565 (xmethod_worker::get_result_type): Adjust to use gdb::array_view.
566 (xmethod_worker::do_get_arg_types): Adjust to use std::vector.
567 (xmethod_worker::do_get_result_type): Adjust to use
568 gdb::array_view.
569 * gdbtypes.c (rank_function): Adjust to use gdb::array_view.
570 * gdbtypes.h: Include "common/array-view.h".
571 (rank_function): Adjust to use gdb::array_view.
572 * python/py-xmethods.c (python_xmethod_worker::invoke)
573 (python_xmethod_worker::do_get_arg_types)
574 (python_xmethod_worker::do_get_result_type)
575 (python_xmethod_worker::invoke): Adjust to new interfaces.
576 * valarith.c (value_user_defined_cpp_op, value_user_defined_op)
577 (value_x_binop, value_x_unop): Adjust to use gdb::array_view.
578 * valops.c (find_overload_match, find_oload_champ_namespace)
579 (find_oload_champ_namespace_loop, find_oload_champ): Adjust to use
580 gdb:array_view and the new xmethod_worker interfaces.
581 * value.c (result_type_of_xmethod, call_xmethod): Adjust to use
582 gdb::array_view.
583 * value.h (find_overload_match, result_type_of_xmethod)
584 (call_xmethod): Adjust to use gdb::array_view.
585 * unittests/array-view-selftests.c: Add slicing tests.
586
587 2018-11-21 Pedro Alves <palves@redhat.com>
588
589 * ada-lang.c (ada_evaluate_subexp): Adjust to pass an array_view.
590 * common/array-view.h (make_array_view): New.
591 * compile/compile-object-run.c (compile_object_run): Adjust to
592 pass an array_view.
593 * elfread.c (elf_gnu_ifunc_resolve_addr): Adjust.
594 * eval.c (eval_call): Adjust to pass an array_view.
595 (evaluate_subexp_standard): Adjust to pass an array_view.
596 * gcore.c (call_target_sbrk): Adjust to pass an array_view.
597 * guile/scm-value.c (gdbscm_value_call): Likewise.
598 * infcall.c (push_dummy_code): Replace pointer + size parameters
599 with an array_view parameter.
600 (call_function_by_hand, call_function_by_hand_dummy): Likewise and
601 adjust.
602 * infcall.h: Include "common/array-view.h".
603 (call_function_by_hand, call_function_by_hand_dummy): Replace
604 pointer + size parameters with an array_view parameter.
605 * linux-fork.c (inferior_call_waitpid): Adjust to use array_view.
606 * linux-tdep.c (linux_infcall_mmap): Likewise.
607 * objc-lang.c (lookup_objc_class, lookup_child_selector)
608 (value_nsstring, print_object_command): Likewise.
609 * python/py-value.c (valpy_call): Likewise.
610 * rust-lang.c (rust_evaluate_funcall): Likewise.
611 * spu-tdep.c (flush_ea_cache): Likewise.
612 * valarith.c (value_x_binop, value_x_unop): Likewise.
613 * valops.c (value_allocate_space_in_inferior): Likewise.
614 * unittests/array-view-selftests.c (run_tests): Add
615 gdb::make_array_view test.
616
617 2018-11-20 Andrew Burgess <andrew.burgess@embecosm.com>
618
619 * cli-out.c (cli_ui_out::do_field_int): Use string_printf rather
620 than a fixed size buffer.
621
622 2018-11-20 Andrew Burgess <andrew.burgess@embecosm.com>
623
624 * breakpoint.c (print_one_breakpoint_location): Reduce whitespace,
625 and remove insertion of extra spaces in GDB's output.
626 * cli-out.c (cli_ui_out::do_field_fmt): Update header comment.
627 Layout field into a temporary buffer, and then output it as a
628 string field.
629
630 2018-11-20 Philippe Waroquiers <philippe.waroquiers@skynet.be>
631
632 * NEWS: Document the language choice done by
633 'info [types|functions|variables]|rbreak'.
634
635 2018-11-20 Philippe Waroquiers <philippe.waroquiers@skynet.be>
636
637 * symtab.c (treg_matches_sym_type_name): Use
638 scoped_switch_to_sym_language_if_auto instead of local logic.
639 (print_symbol_info): Use scoped_switch_to_sym_language_if_auto
640 to switch to SYM language when language mode is auto.
641
642 2018-11-20 Philippe Waroquiers <philippe.waroquiers@skynet.be>
643
644 * language.h (scoped_switch_to_sym_language_if_auto): New class.
645
646 2018-11-20 Philippe Waroquiers <philippe.waroquiers@skynet.be>
647
648 * symtab.c (search_symbols): Properly check absence of type regexp
649 before entering the loop scanning the minimal symbols.
650
651 2018-11-20 John Darrington <john@darrington.wattle.id.au>
652
653 * s12z-tdep.c (s12z_extract_return_value): New function.
654 (inv_reg_perm) New array.
655 (s12z_return_value): Populate readbuf if non-null.
656
657 2018-11-20 Eli Zaretskii <eliz@gnu.org>
658
659 * common/filestuff.c (gdb_fopen_cloexec): Disable use of "e" mode
660 with 'fopen' also if O_CLOEXEC is equal to O_NOINHERIT, to cater
661 to MinGW fixed by Gnulib.
662 (O_NOINHERIT): Define if not defined.
663
664 2018-11-19 John Darrington <john@darrington.wattle.id.au>
665
666 * s12z-tdep.c (s12z_frame_cache): Add an assertion.
667
668 2018-11-19 Simon Marchi <simon.marchi@polymtl.ca>
669
670 * infrun.c (displaced_step_inferior_state) <next>: Remove.
671
672 2018-11-19 Tom Tromey <tom@tromey.com>
673
674 * source.c (get_filename_and_charpos): Return void.
675
676 2018-11-19 Simon Marchi <simon.marchi@polymtl.ca>
677
678 * skip.c (_initialize_step_skip): Fix "info skip" help.
679
680 2018-11-16 Tom Tromey <tom@tromey.com>
681
682 PR rust/23625:
683 * rust-lang.c (rust_internal_print_type): Handle TYPE_CODE_PTR.
684
685 2018-11-19 Simon Marchi <simon.marchi@ericsson.com>
686
687 * infrun.c (displaced_step_inferior_states): Change type to
688 std::forward_list.
689 (get_displaced_stepping_state): Adjust.
690 (displaced_step_in_progress_any_inferior): Adjust.
691 (add_displaced_stepping_state): Adjust.
692 (remove_displaced_stepping_state): Adjust.
693
694 2018-11-18 Tom Tromey <tom@tromey.com>
695
696 PR build/23814:
697 * target-delegates.c: Rebuild.
698 * ia64-linux-nat.c (class ia64_linux_nat_target)
699 <have_steppable_watchpoint>: Use override. Return true, not 1.
700 (ia64_linux_nat_target::can_use_hw_breakpoint): Rename. Remove
701 "self" argument.
702 (ia64_linux_nat_target::low_new_thread): Rename.
703 (class ia64_linux_nat_target) <read_description>: Don't declare.
704 * target.h (struct target_ops) <have_steppable_watchpoint>: Return
705 bool.
706
707 2018-11-16 Alan Hayward <alan.hayward@arm.com>
708
709 PR gdb/22736:
710 * aarch64-tdep.c (aarch64_push_dummy_call): Remove
711 lang_struct_return code.
712
713 2018-11-16 Alan Hayward <alan.hayward@arm.com>
714
715 * aarch64-tdep.c (aarch64_push_dummy_call): Replace arg with
716 return_method.
717 * alpha-tdep.c (alpha_push_dummy_call): Likewise.
718 * amd64-tdep.c (amd64_push_arguments): Likewise.
719 (amd64_push_dummy_call): Likewise.
720 * amd64-windows-tdep.c (amd64_windows_push_arguments): Likewise.
721 * arc-tdep.c (arc_push_dummy_call): Likewise.
722 * arm-tdep.c (arm_push_dummy_call): Likewise.
723 * avr-tdep.c (avr_push_dummy_call): Likewise.
724 * bfin-tdep.c (bfin_push_dummy_call): Likewise.
725 * cris-tdep.c (cris_push_dummy_call): Likewise.
726 * csky-tdep.c (csky_push_dummy_call): Likewise.
727 * frv-tdep.c (frv_push_dummy_call): Likewise.
728 * gdbarch.c: Regenerate.
729 * gdbarch.h: Regenerate.
730 * gdbarch.sh (gdbarch_push_dummy_call): Replace arg with
731 return_method.
732 * h8300-tdep.c (h8300_push_dummy_call): Likewise.
733 * hppa-tdep.c (hppa32_push_dummy_call): Likewise.
734 (hppa64_push_dummy_call): Likewise.
735 * i386-darwin-tdep.c (i386_darwin_push_dummy_call): Likewise.
736 * i386-tdep.c (i386_push_dummy_call): Likewise.
737 * ia64-tdep.c (ia64_push_dummy_call): Likewise.
738 * infcall.c (call_function_by_hand_dummy): Likewise.
739 * iq2000-tdep.c (iq2000_push_dummy_call): Likewise.
740 * lm32-tdep.c (lm32_push_dummy_call): Likewise.
741 * m32c-tdep.c (m32c_push_dummy_call): Likewise.
742 * m32r-tdep.c (m32r_push_dummy_call): Likewise.
743 * m68hc11-tdep.c (m68hc11_push_dummy_call): Likewise.
744 * m68k-tdep.c (m68k_push_dummy_call): Likewise.
745 * mep-tdep.c (mep_push_dummy_call): Likewise.
746 * mips-tdep.c (mips_eabi_push_dummy_call): Likewise.
747 (mips_n32n64_push_dummy_call): Likewise.
748 (mips_o32_push_dummy_call): Likewise.
749 (mips_o64_push_dummy_call): Likewise.
750 * mn10300-tdep.c (mn10300_push_dummy_call): Likewise.
751 * msp430-tdep.c (msp430_push_dummy_call): Likewise.
752 * nds32-tdep.c (nds32_push_dummy_call): Likewise.
753 * nios2-tdep.c (nios2_push_dummy_call): Likewise.
754 * or1k-tdep.c (or1k_push_dummy_call): Likewise.
755 * ppc-sysv-tdep.c (ppc_sysv_abi_push_dummy_call): Likewise.
756 (ppc64_sysv_abi_push_dummy_call): Likewise.
757 * ppc-tdep.h (ppc_sysv_abi_push_dummy_call): Likewise.
758 (ppc64_sysv_abi_push_dummy_call): Likewise.
759 * riscv-tdep.c (riscv_push_dummy_call): Likewise.
760 * rl78-tdep.c (rl78_push_dummy_call): Likewise.
761 * rs6000-aix-tdep.c (rs6000_push_dummy_call): Likewise.
762 * rs6000-lynx178-tdep.c (rs6000_lynx178_push_dummy_call): Likewise.
763 * rx-tdep.c (rx_push_dummy_call): Likewise.
764 * s390-tdep.c (s390_push_dummy_call): Likewise.
765 * score-tdep.c (score_push_dummy_call): Likewise.
766 * sh-tdep.c (sh_push_dummy_call_fpu): Likewise.
767 (sh_push_dummy_call_nofpu): Likewise.
768 * sparc-tdep.c (sparc32_store_arguments): Likewise.
769 (sparc32_push_dummy_call): Likewise.
770 * sparc64-tdep.c (sparc64_store_arguments): Likewise.
771 (sparc64_push_dummy_call): Likewise.
772 * spu-tdep.c (spu_push_dummy_call): Likewise.
773 * tic6x-tdep.c (tic6x_push_dummy_call): Likewise.
774 * tilegx-tdep.c (tilegx_push_dummy_call): Likewise.
775 * v850-tdep.c (v850_push_dummy_call): Likewise.
776 * vax-tdep.c (vax_push_dummy_call): Likewise.
777 * xstormy16-tdep.c (xstormy16_push_dummy_call): Likewise.
778 * xtensa-tdep.c (xtensa_push_dummy_call): Likewise.
779
780 2018-11-16 Alan Hayward <alan.hayward@arm.com>
781
782 * gdbarch.sh (enum function_call_return_method): Add enum.
783 * gdbarch.h: Regenerate.
784 * infcall.c (call_function_by_hand_dummy): Replace vars with enum.
785
786 2018-11-15 Joel Brobecker <brobecker@adacore.com>
787
788 * unittests/copy_bitwise-selftests.c: New file.
789 * utils.c (selftests::bits_to_str, selftests::check_copy_bitwise)
790 (selftests::copy_bitwise_tests): Delete, moving this code to
791 unittests/copy_bitwise-selftests.c instead.
792 (_initialize_utils): Do not register copy_bitwise tests.
793 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
794 unittests/copy_bitwise-selftests.c.
795
796 2018-11-14 Joel Brobecker <brobecker@adacore.com>
797
798 * ada-lang.c (move_bits): Delete. Update all callers to use
799 copy_bitwise instead.
800 * dwarf2loc.c (copy_bitwise, bits_to_str::bits_to_str)
801 (selftests::check_copy_bitwise, selftests::copy_bitwise_tests):
802 Move from here to utils.c.
803 (_initialize_dwarf2loc): Remove call to register copy_bitwise
804 selftests.
805 * utils.h (copy_bitwise): Add declaration.
806 * utils.c (copy_bitwise, bits_to_str::bits_to_str)
807 (selftests::check_copy_bitwise, selftests::copy_bitwise_tests):
808 Moved here from dwarf2loc.c.
809 (_initialize_utils): Register copy_bitwise selftests.
810
811 2018-11-14 Jim Wilson <jimw@sifive.com>
812
813 * riscv-tdep.c (struct riscv_arg_info): New field is_unnamed.
814 (riscv_call_arg_scalar_int): If unnamed arg with twice xlen alignment,
815 then increment next_regnum if odd.
816 (riscv_arg_location): New arg is_unnamed. Set ainfo->is_unnamed.
817 (riscv_push_dummy_call): New local ftype. Call check_typedef to set
818 function type. Pass new arg to riscv_arg_location based on function
819 type.
820 (riscv_return_value): Pass new arg to riscv_arg_location.
821
822 * riscv-tdep.c (BIGGEST_ALIGNMENT): New.
823 (riscv_type_alignment) <TYPE_CODE_ARRAY>: If TYPE_VECTOR, return min
824 of TYPE_LENGTH and BIGGEST_ALIGNMENT.
825
826 * riscv-tdep.c (riscv_call_arg_scalar_int): Use std::min when
827 setting len. New local align, set to max of arg align and xlen,
828 and pass to first riscv_assign_stack_location call.
829
830 2018-11-12 Simon Marchi <simon.marchi@polymtl.ca>
831
832 * skip.c (complete_skip_number): New function.
833 (_initialize_step_skip): Add completers to some skip commands.
834
835 2018-11-09 Tom Tromey <tom@tromey.com>
836
837 * remote.c (remote_g_packet_guess_s): Remove typedef and DEF_VEC.
838 (struct remote_g_packet_data): Derive from allocate_on_obstack.
839 <guesses>: Now a std::vector.
840 (remote_g_packet_data_init, register_remote_g_packet_guess):
841 Update.
842 (remote_read_description_p): Update. Return bool.
843 (remote_target::read_description): Update.
844 (struct remote_g_packet_guess): Add constructor.
845
846 2018-11-09 Tom Tromey <tom@tromey.com>
847
848 * common/scoped_fd.h (class scoped_fd): Add move constructor and
849 move assignment operator.
850 * psymtab.c (psymtab_to_fullname): Update.
851 * source.h (open_source_file): Return scoped_fd.
852 (find_and_open_source): Likewise.
853 * source.c (open_source_file): Return scoped_fd.
854 (get_filename_and_charpos): Update.
855 (print_source_lines_base): Update. Use scoped_fd::to_file.
856 (forward_search_command): Likewise.
857 (reverse_search_command): Likewise.
858 (find_and_open_source): Return scoped_fd.
859 * tui/tui-source.c (tui_set_source_content): Update. Use
860 gdb_file_up.
861
862 2018-11-09 John Baldwin <jhb@FreeBSD.org>
863
864 * minsyms.c (minimal_symbol_reader::install): Fix unsigned
865 overflow.
866
867 2018-11-09 Hafiz Abid Qadeer <abidh@codesourcery.com>
868
869 * configure: Regenerate.
870
871 2018-11-09 Tom de Vries <tdevries@suse.de>
872
873 * symtab.c (symbol_set_names): Call symbol_find_demangled_name
874 unconditionally, to set the language of the symbol. Manage freeing
875 returned pointer using gdb::unique_xmalloc_ptr.
876
877 2018-11-08 Tom Tromey <tom@tromey.com>
878
879 * record.c (require_record_target): Upper-case "<TAB>".
880
881 2018-11-08 Tom Tromey <tom@tromey.com>
882
883 * python/lib/gdb/command/pretty_printers.py
884 (InfoPrettyPrinter.invoke): Don't indent "objfile" heading.
885
886 2018-11-08 Tom Tromey <tom@tromey.com>
887
888 PR gdb/23555:
889 PR gdb/23838:
890 * target.h (target_supports_terminal_ours): Return bool.
891 * target.c (target_supports_terminal_ours): Handle case where
892 current_top_target returns nullptr. Return bool.
893
894 2018-11-08 Joel Brobecker <brobecker@adacore.com>
895
896 * aarch64-tdep.c (aapcs_is_vfp_call_or_return_candidate_1):
897 return the correct count for potential HFAs.
898
899 2018-11-08 Jan Beulich <jbeulich@suse.com>
900
901 * i387-tdep.c (i387_supply_xsave): Split handling of
902 X86_XSTATE_ZMM_H and X86_XSTATE_ZMM.
903 (i387_collect_xsave): Likewise.
904
905 2018-11-08 Andrew Burgess <andrew.burgess@embecosm.com>
906
907 * riscv-tdep.c (riscv_insn::decode): Update header comment.
908 (riscv_frame_this_id): Catch errors thrown while building the
909 frame cache, leave the frame id as the default, which is the outer
910 frame id.
911
912 2018-11-07 Joel Brobecker <brobecker@adacore.com>
913
914 * ada-lang.c (read_atcb): Only set task_info->called_task if
915 task_info->state == Entry_Caller_Sleep.
916 (print_ada_task_info): Do not check task_info->state before
917 checking task_info->called_task.
918 (info_task): Likewise.
919
920 2018-11-07 Joel Brobecker <brobecker@adacore.com>
921
922 * ada-tasks.c (read_atcb): Clear task_info before computing
923 the value of each of its fields.
924
925 2018-11-07 Andrew Burgess <andrew.burgess@embecosm.com>
926
927 * dwarf2read.c (dwarf2_init_integer_type): Check for name being
928 NULL before dereferencing it.
929
930 2018-11-06 Tom de Vries <tdevries@suse.de>
931
932 * linux-tdep.c (linux_vsyscall_range_raw): Use xmalloc to allocate
933 program headers.
934
935 2018-11-06 Max Filippov <jcmvbkbc@gmail.com>
936
937 * configure.tgt (xtensa*-*-linux*): Change to xtensa*-*-*linux*
938 so that it applies to uclinux as well.
939
940 2018-11-06 Marius Muench <marius.muench@eurecom.fr>
941
942 * arm-tdep.c (arm_scan_prologue): Don't dereference FP reg
943 when on AAPCS.
944
945 2018-11-06 John Baldwin <jhb@FreeBSD.org>
946
947 * riscv-fbsd-nat.c (getregs_supplies): Return true for
948 RISCV_CSR_SSTATUS_REGNUM.
949
950 2018-11-04 Philippe Waroquiers <philippe.waroquiers@skynet.be>
951
952 * source.c (open_source_file): Fix leak by transferring the
953 current s->fullname to the unique_xmalloc_ptr fullname given
954 to find_and_open_source.
955
956 2018-11-04 Tom Tromey <tom@tromey.com>
957
958 * varobj.c (install_default_visualizer): Update.
959 * python/python-internal.h (gdbpy_get_varobj_pretty_printer):
960 Return gdbpy_ref.
961 * python/py-prettyprint.c (search_pp_list): Return gdbpy_ref.
962 (find_pretty_printer_from_progspace)
963 (find_pretty_printer_from_gdb, find_pretty_printer)
964 (gdbpy_get_varobj_pretty_printer): Return gdbpy_ref.
965 (gdbpy_get_varobj_pretty_printer, gdbpy_default_visualizer):
966 Update.
967
968 2018-11-04 Tom Tromey <tom@tromey.com>
969
970 * python/python.c (gdbpy_parameter_value): Update.
971 * python/python-internal.h (python_string_to_unicode)
972 (python_string_to_target_python_string)
973 (host_string_to_python_string): Return gdbpy_ref.
974 * python/py-utils.c (python_string_to_unicode)
975 (unicode_to_encoded_python_string)
976 (unicode_to_target_python_string)
977 (python_string_to_target_string)
978 (python_string_to_target_python_string): Return gdbpy_ref.
979 (python_string_to_host_string): Update.
980 (host_string_to_python_string): Return gdbpy_ref.
981 * python/py-symtab.c (stpy_get_filename, stpy_get_producer)
982 (stpy_fullname): Update.
983 * python/py-progspace.c (pspy_get_filename, pspy_solib_name):
984 Update.
985 * python/py-prettyprint.c (print_string_repr): Update.
986 * python/py-objfile.c (objfpy_get_filename, objfpy_get_username)
987 (objfpy_get_build_id): Update.
988 * python/py-breakpoint.c (bppy_get_location)
989 (bppy_get_expression, bppy_get_condition, bppy_get_commands):
990 Update.
991
992 2018-11-04 Tom Tromey <tom@tromey.com>
993
994 * python/python-internal.h (gdb_py_object_from_longest)
995 (gdb_py_object_from_ulongest): Return gdbpy_ref.
996 * python/py-value.c (valpy_int): Update.
997 * python/py-utils.c (gdb_py_object_from_longest): Return
998 gdbpy_ref.
999 (gdb_py_object_from_ulongest): Likewise.
1000 * python/py-type.c (typy_get_alignof): Update.
1001 * python/py-linetable.c (ltpy_get_all_source_lines)
1002 (ltpy_entry_get_line, ltpy_entry_get_pc): Update.
1003 * python/py-block.c (blpy_get_start, blpy_get_end): Update.
1004
1005 2018-11-03 Philippe Waroquiers <philippe.waroquiers@skynet.be>
1006
1007 * ada-lang.c (_initialize_ada_language): Fix typo.
1008
1009 2018-11-03 Philippe Waroquiers <philippe.waroquiers@skynet.be>
1010
1011 * language.c (type): Remove.
1012 (_initialize_language): Remove assignment to type.
1013
1014 2018-11-02 Joel Brobecker <brobecker@adacore.com>
1015
1016 * aarch64-ravenscar-thread.h, aarch64-ravenscar-thread.c: New files.
1017 * aarch64-tdep.c: #include "aarch64-ravenscar-thread.h".
1018 (aarch64_gdbarch_init): Add call to register_aarch64_ravenscar_ops.
1019 * Makefile.in (ALL_64_TARGET_OBS): Add aarch64-ravenscar-thread.o.
1020 (HFILES_NO_SRCDIR): Add aarch64-ravenscar-thread.h.
1021 (ALLDEPFILES): Add aarch64-ravenscar-thread.c.
1022 * configure.tgt (cpu_obs) [aarch64*-*-*]: Add ravenscar-thread.o
1023 and aarch64-ravenscar-thread.o.
1024 * NEWS: Add entry documenting Ravenscar tasking support
1025 on AArch64 ELF.
1026
1027 2018-11-02 Matthew Malcomson <matthew.malcomson@arm.com>
1028
1029 * symtab.c (info_functions_command): Initialize quiet flag.
1030 * stack.c (info_args_command): Likewise.
1031
1032 2018-11-01 Jim Wilson <jimw@sifive.com>
1033
1034 * riscv-tdep.c (riscv_breakpoint_kind_from_pc): New local unaligned_p.
1035 Set if pcptr if unaligned. Return 2 if unaligned_p true. Update
1036 debugging messages.
1037
1038 2018-11-01 Joel Brobecker <brobecker@adacore.com>
1039
1040 * ada-lang.c (ada_watch_location_expression): New function.
1041 (ada_language_defn): Set la_watch_location_expression to
1042 ada_watch_location_expression.
1043
1044 2018-11-01 Joel Brobecker <brobecker@adacore.com>
1045
1046 * print-utils.c (int_string): Remove unnecessary trailing spaces.
1047
1048 2018-11-01 Joel Brobecker <brobecker@adacore.com>
1049
1050 * rs6000-tdep.c (skip_prologue): Fix potential negative left
1051 shifting.
1052
1053 2018-11-01 Jerome Guitton <guitton@adacore.com>
1054 Joel Brobecker <brobecker@adacore.com>
1055
1056 * defs.h (enum gdb_osabi): Add GDB_OSABI_PIKEOS.
1057 * osabi.c (gdb_osabi_names): Add name for GDB_OSABI_PIKEOS.
1058 * arm-pikeos-tdep.c: New file.
1059 * configure.tgt: Add arm-pikeos-tdep.o to the case of ARM
1060 embedded system.
1061 * Makefile.in (ALL_TARGET_OBS): Add arm-pikeos-tdep.o.
1062
1063 2018-11-01 Simon Marchi <simon.marchi@ericsson.com>
1064
1065 * common/pathstuff.c (get_standard_temp_dir): New.
1066 * common/pathstuff.h (get_standard_temp_dir): New.
1067 * config.in: Re-generate.
1068 * configure: Re-generate.
1069 * configure.ac: Don't check for mkdtemp.
1070 * gnulib/aclocal-m4-deps.mk: Re-generate.
1071 * gnulib/aclocal.m4: Re-generate.
1072 * gnulib/config.in: Re-generate.
1073 * gnulib/configure: Re-generate.
1074 * gnulib/import/Makefile.am: Re-generate.
1075 * gnulib/import/Makefile.in: Re-generate.
1076 * gnulib/import/m4/gnulib-cache.m4: Re-generate.
1077 * gnulib/import/m4/gnulib-comp.m4: Re-generate.
1078 * gnulib/import/m4/mkdtemp.m4: New file.
1079 * gnulib/import/mkdtemp.c: New file.
1080 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES):
1081 Add mkdtemp module.
1082 * unittests/mkdir-recursive-selftests.c (test): Use
1083 get_standard_temp_dir.
1084 (_initialize_mkdir_recursive_selftests): Remove HAVE_MKDTEMP
1085 ifdef.
1086 * compile/compile.c (get_compile_file_tempdir): Likewise.
1087
1088 2018-11-01 Sangamesh Mallayya <sangamesh.swamy@in.ibm.com>
1089
1090 * rs6000-aix-tdep.c: Include "trad-frame.h" and "frame-unwind.h".
1091 (SIG_FRAME_LR_OFFSET64): New define.
1092 (SIG_FRAME_FP_OFFSET64): New define.
1093 (aix_sighandle_frame_cache): New Function.
1094 (aix_sighandle_frame_this_id): New Function.
1095 (aix_sighandle_frame_prev_register): New Function.
1096 (aix_sighandle_frame_sniffer): New Function.
1097 (aix_sighandle_frame_unwind): New global variable.
1098 (rs6000_aix_init_osabi): Install new frame unwinder.
1099
1100 2018-10-31 Sergio Durigan Junior <sergiodj@redhat.com>
1101
1102 PR gdb/23835
1103 * common/common-defs.h: Don't redefine _FORTIFY_SOURCE if it's
1104 already defined.
1105
1106 2018-10-31 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
1107
1108 * ppc-linux-nat.c: Include nat/linux-ptrace.h.
1109
1110 2018-10-31 Andrew Burgess <andrew.burgess@embecosm.com>
1111
1112 * dwarf2read.c (struct dwarf2_cu): Add producer_is_icc field.
1113 (producer_is_icc): New function.
1114 (check_producer): Set producer_is_icc field on dwarf2_cu.
1115 (dwarf2_init_integer_type): New function.
1116 (read_base_type): Call dwarf2_init_integer_type instead of
1117 init_integer_type in all cases.
1118 (dwarf2_cu::dwarf2_cu): Initialise producer_is_icc field.
1119 * valprint.c (maybe_negate_by_bytes): Add an assertion that the
1120 LEN is greater than 0.
1121
1122 2018-10-30 Tom Tromey <tom@tromey.com>
1123
1124 * main.c (captured_main_1): Check return value of bfd_init.
1125
1126 2018-10-29 Sergio Durigan Junior <sergiodj@redhat.com>
1127
1128 * common/offset-type.h (DEFINE_OFFSET_REL_OP): Delete.
1129 Adjust comments.
1130
1131 2018-10-29 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
1132
1133 * procfs.c: Include common/pathstuff.h.
1134
1135 2018-10-28 Andrew Burgess <andrew.burgess@embecosm.com>
1136
1137 * riscv-linux-nat.c (riscv_linux_nat_target::fetch_registers):
1138 Add missing braces. No functional change.
1139
1140 2018-10-27 Philippe Waroquiers <philippe.waroquiers@skynet.be>
1141
1142 * macrocmd.c (info_macro_command): Use report_unrecognized_option_error
1143 to report a bad option and fix indentation.
1144 * demangle.c (demangle_command): Use report_unrecognized_option_error
1145 to report a bad option and correctly report the bad option.
1146
1147 2018-10-27 Tom Tromey <tom@tromey.com>
1148
1149 PR cli/23364:
1150 * darwin-nat.c (copied_shell): New global.
1151 (may_have_sip): Rename from should_disable_startup_with_shell.
1152 (copy_shell_to_cache, maybe_cache_shell): New functions.
1153 (darwin_nat_target::create_inferior): Update. Use
1154 copied_shell.
1155
1156 2018-10-27 Tom Tromey <tom@tromey.com>
1157
1158 * unittests/scoped_fd-selftests.c (test_to_file): New function.
1159 (run_tests): Call test_to_file.
1160 * dwarf-index-write.c (write_psymtabs_to_index): Do not reopen
1161 temporary files.
1162 * common/scoped_fd.h (scoped_fd::to_file): New method.
1163
1164 2018-10-27 Tom Tromey <tom@tromey.com>
1165
1166 * unittests/scoped_mmap-selftests.c (test_normal): Use
1167 gdb_mkostemp_cloexec.
1168 * unittests/scoped_fd-selftests.c (test_destroy, test_release):
1169 Use gdb_mkostemp_cloexec.
1170 * gnulib/aclocal-m4-deps.mk, gnulib/aclocal.m4,
1171 gnulib/config.in, gnulib/configure,
1172 gnulib/import/Makefile.am, gnulib/import/Makefile.in,
1173 gnulib/import/m4/gnulib-cache.m4,
1174 gnulib/import/m4/gnulib-comp.m4: Update.
1175 * gnulib/import/m4/mkostemp.m4: New file.
1176 * gnulib/import/m4/mkstemp.m4: Remove.
1177 * gnulib/import/mkostemp.c: New file.
1178 * gnulib/import/mkstemp.m4: Remove.
1179 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Remove
1180 mkstemp, add mkostemp. Apply new patch.
1181 * gnulib/import/stdlib.in.h: Apply patch.
1182 * gnulib/patches/0002-mkostemp-mkostemps-Fix-compilation-error-in-C-mode-o.patch:
1183 New file.
1184 * dwarf-index-write.c (write_psymtabs_to_index): Use
1185 gdb_mkostemp_cloexec.
1186 * common/filestuff.h (gdb_mkostemp_cloexec): New function.
1187
1188 2018-10-27 Tom Tromey <tom@tromey.com>
1189
1190 * unittests/mkdir-recursive-selftests.c: New file.
1191 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
1192 unittests/mkdir-recursive-selftests.c.
1193 * dwarf-index-cache.c (mkdir_recursive): Move to
1194 common/filestuff.c.
1195 (index_cache::store): Check return value of mkdir_recursive.
1196 (create_dir_and_check, test_mkdir_recursive): Move to new file.
1197 (_initialize_index_cache): Don't register test.
1198 * common/filestuff.h (mkdir_recursive): Declare.
1199 * common/filestuff.c (mkdir_recursive): Move from
1200 dwarf-index-cache.c. Return bool.
1201
1202 2018-10-27 Tom Tromey <tom@tromey.com>
1203
1204 * dwarf-index-write.c (write_psymtabs_to_index): Move
1205 make_temp_filename to common/pathstuff.c.
1206 * common/pathstuff.h (make_temp_filename): Declare.
1207 * common/pathstuff.c (make_temp_filename): New function, moved
1208 from dwarf-index-write.c.
1209
1210 2018-10-27 Tom Tromey <tom@tromey.com>
1211
1212 * procfs.c (procfs_target::create_inferior): Use get_shell.
1213 * cli/cli-cmds.c (shell_escape): Use get_shell.
1214 * windows-nat.c (windows_nat_target::create_inferior): Use
1215 get_shell.
1216 * common/pathstuff.c (get_shell): New function.
1217 * nat/fork-inferior.c (SHELL_FILE, get_startup_shell): Remove.
1218 (fork_inferior): Use get_shell.
1219 * common/pathstuff.h (get_shell): Declare.
1220
1221 2018-10-27 Philippe Waroquiers <philippe.waroquiers@skynet.be>
1222
1223 * NEWS: Mention changes to 'info [args|functions|locals|variables]'
1224
1225 2018-10-27 Philippe Waroquiers <philippe.waroquiers@skynet.be>
1226
1227 * stack.c (print_variable_and_value_data): Add preg and treg.
1228 (print_frame_local_vars): Add quiet, regexp and t_regexp arguments,
1229 and update callers.
1230 (print_frame_arg_vars): Likewise.
1231 (prepare_reg): New function.
1232 (info_locals_command): Extract info print args and use them.
1233 (info_args_command): Likewise.
1234 (_initialize_stack): Modify on-line help.
1235 * symtab.c (treg_matches_sym_type_name): New function.
1236 (search_symbols): New arg t_regexp.
1237 (symtab_symbol_info): New args quiet, regexp, t_regexp.
1238 (info_variables_command): Extract info print args and use them.
1239 (info_functions_command): Likewise.
1240 (info_types_command): Update call to symtab_symbol_info.
1241 (_initialize_symtab): Modify on-line help.
1242 * symtab.h (treg_matches_sym_type_name): New function.
1243 (search_symbols): New t_regexp arg.
1244
1245 2018-10-27 Philippe Waroquiers <philippe.waroquiers@skynet.be>
1246
1247 * cli-utils.c (extract_arg_maybe_quoted): New function.
1248 (extract_info_print_args): New function.
1249 (info_print_args_help): New function.
1250 (report_unrecognized_option_error): New function.
1251 * cli-utils.h (extract_arg_maybe_quoted): New function.
1252 (extract_info_print_args): New function.
1253 (info_print_args_help): New function.
1254 (report_unrecognized_option_error): New function.
1255
1256 2018-10-26 Tom Tromey <tom@tromey.com>
1257
1258 * dwarf2read.c (recursively_compute_inclusions): Use std::vector.
1259 (compute_compunit_symtab_includes): Update.
1260 * symtab.h: (symtab_ptr): Remove typedef. Don't define a VEC.
1261 (compunit_symtab_ptr): Likewise.
1262
1263 2018-10-26 John Baldwin <jhb@FreeBSD.org>
1264
1265 * fbsd-tdep.c (fbsd_print_auxv_entry): Only use
1266 default_print_auxv_entry for specific tag values.
1267
1268 2018-10-26 John Baldwin <jhb@FreeBSD.org>
1269
1270 * fbsd-tdep.c (fbsd_print_auxv_entry): Handle AT_FREEBSD_HWCAP2.
1271
1272 2018-10-26 Jim Wilson <jimw@sifive.com>
1273
1274 * riscv-linux-tdep.c: Include tramp-frame.h and trad-frame.h.
1275 (riscv_linux_sigframe_init): Declare.
1276 (RISCV_INST_LI_A7_SIGRETURN, RISCV_INT_ECALL): New.
1277 (riscv_linux_sigframe): New.
1278 (SIGFRAME_SIGINFO_SIZE, UCONTEXT_MCONTEXT_OFFSET): New.
1279 (riscv_linux_sigframe_init): Define.
1280 (riscv_linux_init_abi): Call tramp_frame_prepend_unwinder.
1281
1282 * riscv-tdep.c (riscv_isa_xlen): Refer to riscv-tdep.h comment.
1283 (riscv_isa_flen): Likewise. Drop static.
1284 * riscv-tdep.h (riscv_isa_xlen): Move riscv-tdep.c comment to here.
1285 (riscv_isa_flen): Likewise. Declare.
1286
1287 2018-10-26 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
1288 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
1289
1290 * arch/ppc-linux-tdesc.h (tdesc_powerpc_isa207_htm_vsx32l)
1291 (tdesc_powerpc_isa207_htm_vsx64l): Declare.
1292 * arch/ppc-linux-common.h (PPC_LINUX_SIZEOF_TM_SPRREGSET)
1293 (PPC32_LINUX_SIZEOF_CGPRREGSET, PPC64_LINUX_SIZEOF_CGPRREGSET)
1294 (PPC_LINUX_SIZEOF_CFPRREGSET, PPC_LINUX_SIZEOF_CVMXREGSET)
1295 (PPC_LINUX_SIZEOF_CVSXREGSET, PPC_LINUX_SIZEOF_CPPRREGSET)
1296 (PPC_LINUX_SIZEOF_CDSCRREGSET, PPC_LINUX_SIZEOF_CTARREGSET):
1297 Define.
1298 (struct ppc_linux_features) <htm>: New field.
1299 (ppc_linux_no_features): Add initializer for htm field.
1300 * arch/ppc-linux-common.c (ppc_linux_match_description): Return
1301 new tdescs.
1302 * nat/ppc-linux.h (PPC_FEATURE2_HTM, NT_PPC_TM_CGPR)
1303 (NT_PPC_TM_CFPR, NT_PPC_TM_CVMX, NT_PPC_TM_CVSX)
1304 (NT_PPC_TM_SPR, NT_PPC_TM_CTAR, NT_PPC_TM_CPPR, NT_PPC_TM_CDSCR):
1305 Define if not already defined.
1306 * features/Makefile (WHICH): Add rs6000/powerpc-isa207-htm-vsx32l
1307 and rs6000/powerpc-isa207-htm-vsx64l.
1308 (XMLTOC): Add rs6000/powerpc-isa207-htm-vsx32l.xml and
1309 rs6000/powerpc-isa207-htm-vsx64l.xml.
1310 * features/rs6000/power-htm-spr.xml: New file.
1311 * features/rs6000/power-htm-core.xml: New file.
1312 * features/rs6000/power64-htm-core.xml: New file.
1313 * features/rs6000/power-htm-fpu.xml: New file.
1314 * features/rs6000/power-htm-altivec.xml: New file.
1315 * features/rs6000/power-htm-vsx.xml: New file.
1316 * features/rs6000/power-htm-ppr.xml: New file.
1317 * features/rs6000/power-htm-dscr.xml: New file.
1318 * features/rs6000/power-htm-tar.xml: New file.
1319 * features/rs6000/powerpc-isa207-htm-vsx32l.xml: New file.
1320 * features/rs6000/powerpc-isa207-htm-vsx64l.xml: New file.
1321 * features/rs6000/powerpc-isa207-htm-vsx32l.c: Generate.
1322 * features/rs6000/powerpc-isa207-htm-vsx64l.c: Generate.
1323 * regformats/rs6000/powerpc-isa207-htm-vsx32l.dat: Generate.
1324 * regformats/rs6000/powerpc-isa207-htm-vsx64l.dat: Generate.
1325 * ppc-linux-nat.c (fetch_register, fetch_ppc_registers): Call
1326 fetch_regset with HTM regsets.
1327 (store_register, store_ppc_registers): Call store_regset with HTM
1328 regsets.
1329 (ppc_linux_nat_target::read_description): Set htm field in the
1330 features struct if needed.
1331 * ppc-linux-tdep.c: Include
1332 features/rs6000/powerpc-isa207-htm-vsx32l.c and
1333 features/rs6000/powerpc-isa207-htm-vsx64l.c.
1334 (ppc32_regmap_tm_spr, ppc32_regmap_cgpr, ppc64_le_regmap_cgpr)
1335 (ppc64_be_regmap_cgpr, ppc32_regmap_cfpr, ppc32_le_regmap_cvmx)
1336 (ppc32_be_regmap_cvmx, ppc32_regmap_cvsx, ppc32_regmap_cppr)
1337 (ppc32_regmap_cdscr, ppc32_regmap_ctar): New globals.
1338 (ppc32_linux_tm_sprregset, ppc32_linux_cgprregset)
1339 (ppc64_be_linux_cgprregset, ppc64_le_linux_cgprregset)
1340 (ppc32_linux_cfprregset, ppc32_le_linux_cvmxregset)
1341 (ppc32_be_linux_cvmxregset, ppc32_linux_cvsxregset)
1342 (ppc32_linux_cpprregset, ppc32_linux_cdscrregset)
1343 (ppc32_linux_ctarregset): New globals.
1344 (ppc_linux_cgprregset, ppc_linux_cvmxregset): New functions.
1345 (ppc_linux_collect_core_cpgrregset): New function.
1346 (ppc_linux_iterate_over_regset_sections): Call back with the htm
1347 regsets.
1348 (ppc_linux_core_read_description): Check if the tm spr section is
1349 present and set htm in the features struct.
1350 (_initialize_ppc_linux_tdep): Call
1351 initialize_tdesc_powerpc_isa207_htm_vsx32l and
1352 initialize_tdesc_powerpc_isa207_htm_vsx64l.
1353 * ppc-linux-tdep.h (ppc_linux_cgprregset, ppc_linux_cvmxregset):
1354 Declare.
1355 (ppc32_linux_tm_sprregset, ppc32_linux_cfprregset)
1356 (ppc32_linux_cvsxregset, ppc32_linux_cpprregset)
1357 (ppc32_linux_cdscrregset, ppc32_linux_ctarregset): Declare.
1358 * ppc-tdep.h (struct gdbarch_tdep) <have_htm_spr, have_htm_core>:
1359 New fields.
1360 <have_htm_fpu, have_htm_altivec, have_htm_vsx>:
1361 Likewise.
1362 <ppc_cppr_regnum, ppc_cdscr_regnum, ppc_ctar_regnum>: Likewise.
1363 <ppc_cdl0_regnum, ppc_cvsr0_regnum, ppc_cefpr0_regnum>: Likewise.
1364 (enum) <PPC_TFHAR_REGNUM, PPC_TEXASR_REGNUM, PPC_TFIAR_REGNUM>:
1365 New enum fields.
1366 <PPC_CR0_REGNUM, PPC_CCR_REGNUM, PPC_CXER_REGNUM>: Likewise.
1367 <PPC_CLR_REGNUM, PPC_CCTR_REGNUM, PPC_CF0_REGNUM>: Likewise.
1368 <PPC_CFPSCR_REGNUM, PPC_CVR0_REGNUM, PPC_CVSCR_REGNUM>: Likewise.
1369 <PPC_CVRSAVE_REGNUM, PPC_CVSR0_UPPER_REGNUM>: Likewise.
1370 <PPC_CPPR_REGNUM, PPC_CDSCR_REGNUM>: Likewise.
1371 <PPC_CTAR_REGNUM>: Likewise.
1372 (PPC_IS_TMSPR_REGNUM, PPC_IS_CKPTGP_REGNUM, PPC_IS_CKPTFP_REGNUM)
1373 (PPC_IS_CKPTVMX_REGNUM, PPC_IS_CKPTVSX_REGNUM): Define.
1374 * rs6000-tdep.c (IS_CDFP_PSEUDOREG, IS_CVSX_PSEUDOREG)
1375 (IS_CEFP_PSEUDOREG): Define.
1376 (rs6000_register_name): Hide the upper halves of checkpointed VSX
1377 registers. Return names for the checkpointed DFP, VSX, and EFP
1378 pseudo registers.
1379 (rs6000_pseudo_register_type): Remove initial assert and raise an
1380 internal error in the else clause instead. Return types for the
1381 checkpointed DFP, VSX, and EFP pseudo registers.
1382 (dfp_pseudo_register_read, dfp_pseudo_register_write): Handle
1383 checkpointed DFP pseudo registers.
1384 (vsx_pseudo_register_read, vsx_pseudo_register_write): Handle
1385 checkpointed VSX pseudo registers.
1386 (efp_pseudo_register_read, efp_pseudo_register_write): Rename
1387 from efpr_pseudo_register_read and
1388 efpr_pseudo_register_write. Handle checkpointed EFP pseudo
1389 registers.
1390 (rs6000_pseudo_register_read, rs6000_pseudo_register_write):
1391 Handle checkpointed DFP, VSX, and EFP registers.
1392 (dfp_ax_pseudo_register_collect, vsx_ax_pseudo_register_collect)
1393 (efp_ax_pseudo_register_collect): New functions.
1394 (rs6000_ax_pseudo_register_collect): Move DFP, VSX and EFP pseudo
1395 register logic to new functions. Handle checkpointed DFP, VSX,
1396 and EFP pseudo registers.
1397 (rs6000_gdbarch_init): Look for and validate the htm features.
1398 Include checkpointed DFP, VSX and EFP pseudo-registers.
1399 * NEWS: Mention access to PPR, DSCR, TAR, EBB/PMU registers and
1400 HTM registers.
1401
1402 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
1403
1404 * rs6000-tdep.c (rs6000_gdbarch_init): Reject tdescs with vsx but
1405 without altivec or fpu.
1406
1407 2018-10-26 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
1408 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
1409
1410 * arch/ppc-linux-common.h (PPC_LINUX_SIZEOF_EBBREGSET)
1411 (PPC_LINUX_SIZEOF_PMUREGSET): Declare.
1412 * nat/ppc-linux.h (PPC_FEATURE2_EBB, NT_PPC_EBB, NT_PPC_PMU):
1413 Define if not already defined.
1414 * features/rs6000/power-ebb.xml: New file.
1415 * features/rs6000/power-linux-pmu.xml: New file.
1416 * features/rs6000/powerpc-isa207-vsx32l.xml: Include ebb and pmu
1417 features.
1418 * features/rs6000/powerpc-isa207-vsx64l.xml: Likewise.
1419 * features/rs6000/powerpc-isa207-vsx32l.c: Re-generate.
1420 * features/rs6000/powerpc-isa207-vsx64l.c: Re-generate.
1421 * regformats/rs6000/powerpc-isa207-vsx32l.dat: Re-generate.
1422 * regformats/rs6000/powerpc-isa207-vsx64l.dat: Re-generate.
1423 * ppc-linux-nat.c (fetch_register, fetch_ppc_registers): Call
1424 fetch_regset with ebb and pmu regsets.
1425 (store_register, store_ppc_registers): Call store_regset with ebb
1426 and pmu regsets.
1427 (ppc_linux_nat_target::read_description): Set isa207 field in the
1428 features struct if ebb and pmu are avaiable.
1429 * ppc-linux-tdep.c (ppc32_regmap_ebb, ppc32_regmap_pmu)
1430 (ppc32_linux_ebbregset, ppc32_linux_pmuregset): New globals.
1431 (ppc_linux_iterate_over_regset_sections): Call back with the ebb
1432 and pmu regsets.
1433 (ppc_linux_core_read_description): Check if the pmu section is
1434 present and set isa207 in the features struct.
1435 * ppc-linux-tdep.h (ppc32_linux_ebbregset)
1436 (ppc32_linux_pmuregset): Declare.
1437 * ppc-tdep.h (struct gdbarch_tdep) <ppc_mmcr0_regnum>: New field.
1438 <ppc_mmcr2_regnum, ppc_siar_regnum, ppc_sdar_regnum>: New fields.
1439 <ppc_sier_regnum>: New field.
1440 (enum): <PPC_BESCR_REGNUM, PPC_EBBHR_REGNUM, PPC_EBBRR_REGNUM>:
1441 New enum values.
1442 <PPC_MMCR0_REGNUM, PPC_MMCR2_REGNUM, PPC_SIAR_REGNUM>: New enum
1443 values.
1444 <PPC_SDAR_REGNUM, PPC_SIER_REGNUM>: New enum values.
1445 (PPC_IS_EBB_REGNUM, PPC_IS_PMU_REGNUM): Define.
1446 * rs6000-tdep.c (rs6000_gdbarch_init): Look for and validate the
1447 ebb and pmu features.
1448
1449 2018-10-26 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
1450 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
1451
1452 * arch/ppc-linux-tdesc.h (tdesc_powerpc_isa207_vsx32l)
1453 (tdesc_powerpc_isa207_vsx64l): Declare.
1454 * arch/ppc-linux-common.h (PPC_LINUX_SIZEOF_TARREGSET): Define.
1455 (struct ppc_linux_features) <isa207>: New field.
1456 (ppc_linux_no_features): Add initializer for isa207 field.
1457 * arch/ppc-linux-common.c (ppc_linux_match_description): Return
1458 new tdescs.
1459 * nat/ppc-linux.h (PPC_FEATURE2_ARCH_2_07, PPC_FEATURE2_TAR)
1460 (NT_PPC_TAR): Define if not already defined.
1461 * features/Makefile (WHICH): Add rs6000/powerpc-isa207-vsx32l and
1462 rs6000/powerpc-isa207-vsx64l.
1463 (XMLTOC): Add rs6000/powerpc-isa207-vsx32l.xml and
1464 rs6000/powerpc-isa207-vsx64l.xml.
1465 * features/rs6000/power-tar.xml: New file.
1466 * features/rs6000/powerpc-isa207-vsx32l.xml: New file.
1467 * features/rs6000/powerpc-isa207-vsx64l.xml: New file.
1468 * features/rs6000/powerpc-isa207-vsx32l.c: Generate.
1469 * features/rs6000/powerpc-isa207-vsx64l.c: Generate.
1470 * regformats/rs6000/powerpc-isa207-vsx32l.dat: Generate.
1471 * regformats/rs6000/powerpc-isa207-vsx64l.dat: Generate.
1472 * ppc-linux-nat.c (fetch_register, fetch_ppc_registers): Call
1473 fetch_regset with the TAR regset.
1474 (store_register, store_ppc_registers): Call store_regset with the
1475 TAR regset.
1476 (ppc_linux_nat_target::read_description): Set isa207 field in the
1477 features struct if needed.
1478 * ppc-linux-tdep.c: Include
1479 features/rs6000/powerpc-isa207-vsx32l.c and
1480 features/rs6000/powerpc-isa207-vsx64l.c.
1481 (ppc32_regmap_tar, ppc32_linux_tarregset): New globals.
1482 (ppc_linux_iterate_over_regset_sections): Call back with the tar
1483 regset.
1484 (ppc_linux_core_read_description): Check if the tar section is
1485 present and set isa207 in the features struct.
1486 (_initialize_ppc_linux_tdep): Call
1487 initialize_tdesc_powerpc_isa207_vsx32l and
1488 initialize_tdesc_powerpc_isa207_vsx64l.
1489 * ppc-linux-tdep.h (ppc32_linux_tarregset): Declare.
1490 * ppc-tdep.h (gdbarch_tdep) <ppc_tar_regnum>: New field.
1491 (enum) <PPC_TAR_REGNUM>: New enum value.
1492 * rs6000-tdep.c (rs6000_gdbarch_init): Look for and validate tar
1493 feature.
1494 (ppc_process_record_op31): Record changes to TAR.
1495
1496 2018-10-26 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
1497 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
1498
1499 * arch/ppc-linux-tdesc.h (tdesc_powerpc_isa205_ppr_dscr_vsx32l)
1500 (tdesc_powerpc_isa205_ppr_dscr_vsx64l): Declare.
1501 * arch/ppc-linux-common.h (PPC_LINUX_SIZEOF_PPRREGSET)
1502 (PPC_LINUX_SIZEOF_DSCRREGSET): Define.
1503 (struct ppc_linux_features) <ppr_dscr>: New field.
1504 (ppc_linux_no_features): Add initializer for ppr_dscr field.
1505 * arch/ppc-linux-common.c (ppc_linux_match_description): Return
1506 new tdescs.
1507 * nat/ppc-linux.h (PPC_FEATURE2_DSCR, NT_PPC_PPR, NT_PPC_DSCR):
1508 Define if not already defined.
1509 * features/Makefile (WHICH): Add
1510 rs6000/powerpc-isa205-ppr-dscr-vsx32l and
1511 rs6000/powerpc-isa205-ppr-dscr-vsx64l.
1512 (XMLTOC): Add rs6000/powerpc-isa205-ppr-dscr-vsx32l.xml and
1513 rs6000/powerpc-isa205-ppr-dscr-vsx64l.xml.
1514 * features/rs6000/power-dscr.xml: New file.
1515 * features/rs6000/power-ppr.xml: New file.
1516 * features/rs6000/powerpc-isa205-ppr-dscr-vsx32l.xml: New file.
1517 * features/rs6000/powerpc-isa205-ppr-dscr-vsx64l.xml: New file.
1518 * features/rs6000/powerpc-isa205-ppr-dscr-vsx32l.c: Generate.
1519 * features/rs6000/powerpc-isa205-ppr-dscr-vsx64l.c: Generate.
1520 * regformats/rs6000/powerpc-isa205-ppr-dscr-vsx32l.dat: Generate.
1521 * regformats/rs6000/powerpc-isa205-ppr-dscr-vsx64l.dat: Generate.
1522 * ppc-linux-nat.c: Include <sys/uio.h>.
1523 (fetch_regset, store_regset, check_regset): New functions.
1524 (fetch_register, fetch_ppc_registers): Call fetch_regset with
1525 DSCR and PPR regsets.
1526 (store_register, store_ppc_registers): Call store_regset with
1527 DSCR and PPR regsets.
1528 (ppc_linux_get_hwcap2): New function.
1529 (ppc_linux_nat_target::read_description): Call
1530 ppc_linux_get_hwcap2 and check_regset, set ppr_dscr field in the
1531 features struct if needed.
1532 * ppc-linux-tdep.c: Include
1533 features/rs6000/powerpc-isa205-ppr-dscr-vsx32l.c and
1534 features/rs6000/powerpc-isa205-ppr-dscr-vsx64l.c.
1535 (ppc32_regmap_ppr, ppc32_regmap_dscr, ppc32_linux_pprregset)
1536 (ppc32_linux_dscrregset): New globals.
1537 (ppc_linux_iterate_over_regset_sections): Call back with the ppr
1538 and dscr regsets.
1539 (ppc_linux_core_read_description): Check if the ppr and dscr
1540 sections are present and set ppr_dscr in the features struct.
1541 (_initialize_ppc_linux_tdep): Call
1542 initialize_tdesc_powerpc_isa205_ppr_dscr_vsx32l and
1543 initialize_tdesc_powerpc_isa205_ppr_dscr_vsx64l.
1544 * ppc-linux-tdep.h (ppc32_linux_pprregset)
1545 (ppc32_linux_dscrregset): Declare.
1546 * ppc-tdep.h (struct gdbarch_tdep) <ppc_ppr_regnum>: New field.
1547 <ppc_dscr_regnum>: New field.
1548 (enum) <PPC_PPR_REGNUM, PPC_DSCR_REGNUM>: New enum values.
1549 * rs6000-tdep.c (rs6000_gdbarch_init): Look for and validate ppr
1550 and dscr features.
1551 (ppc_process_record_op31): Record changes to PPR and DSCR.
1552
1553 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
1554
1555 * rs6000-tdep.c (rs6000_gdbarch_init): Replace line wrapping by a
1556 second initializer line for the have_* variables. Initialize
1557 have_fpu to 0 instead of 1.
1558
1559 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
1560
1561 * arch/ppc-linux-common.c (ppc_linux_match_description):
1562 Parenthesize tdesc assignements and indent them properly.
1563
1564 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
1565
1566 * ppc-linux-nat.c (fetch_register): Change if statement to else
1567 if.
1568 (store_register): Likewise.
1569
1570 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
1571
1572 * rs6000-tdep.c: Remove reggroups.h include.
1573 (rs6000_pseudo_register_reggroup_p): Remove.
1574 (rs6000_gdbarch_init): Remove call to
1575 set_tdesc_pseudo_register_reggroup_p.
1576
1577 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
1578
1579 * reggroups.c (default_register_reggroup_p): Return true for
1580 decfloat registers and float_reggroup.
1581
1582 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
1583
1584 * ppc-linux-tdep.c (ppc_linux_collect_vrregset): Remove.
1585 (ppc32_le_linux_vrregset, ppc32_be_linux_vrregset): Replace
1586 ppc_linux_collect_vrregset by regcache_collect_regset.
1587
1588 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
1589
1590 * linux-tdep.c (linux_collect_regset_section_cb): Use
1591 std::vector<gdb_byte> instead of char * and malloc for buf.
1592 Remove xfree.
1593
1594 2018-10-26 Sangamesh Mallayya <sangamesh.swamy@in.ibm.com>
1595
1596 * xcoffread.c (read_xcoff_symtab): Pass deduced language to
1597 symtab_start instead of always using language_unknown.
1598
1599 2018-10-26 Andrew Burgess <andrew.burgess@embecosm.com>
1600
1601 * riscv-tdep.c (riscv_read_misa_reg): Update comment, remove
1602 READ_P parameter, catch and ignore register access errors from
1603 either the old or new MISA location.
1604 (riscv_has_feature): Update call to riscv_read_misa_reg.
1605
1606 2018-10-25 Andrew Burgess <andrew.burgess@embecosm.com>
1607
1608 * python/py-function.c (convert_values_to_python): Return
1609 gdbpy_ref<>. Add header comment.
1610 (fnpy_call): Adjust.
1611
1612 2018-10-25 Andrew Burgess <andrew.burgess@embecosm.com>
1613
1614 * python/py-cmd.c (cmdpy_completer_helper): Return gdbpy_ref<>.
1615 (cmdpy_completer_handle_brkchars): Adjust.
1616 (cmdpy_completer): Adjust.
1617
1618 2018-10-25 Andrew Burgess <andrew.burgess@embecosm.com>
1619
1620 * riscv-linux-nat.c (riscv_linux_nat_target::fetch_registers):
1621 Pass correct regnum to raw_supply_zeroed.
1622
1623 2018-10-23 Hafiz Abid Qadeer <abidh@codesourcery.com>
1624
1625 * regcache.c (cooked_read_test): Add CSKY to the list of
1626 architectures with a save_reggroup
1627
1628 2018-10-23 Simon Marchi <simon.marchi@polymtl.ca>
1629
1630 PR gdb/23368
1631 * infrun.c (follow_exec): In the follow_exec_mode_new case,
1632 transfer terminal state from old new new inferior.
1633 * terminal.h (swap_terminal_info): New function.
1634 * inflow.c (swap_terminal_info): New function.
1635
1636 2018-10-23 Tom Tromey <tom@tromey.com>
1637
1638 * record-btrace.c (get_thread_current_frame_id): Rename from
1639 get_thread_current_frame. Return a frame_id.
1640 (record_btrace_start_replaying): Update.
1641
1642 2018-10-23 Andrew Burgess <andrew.burgess@embecosm.com>
1643
1644 * riscv-tdep.c (riscv_register_name): Use the user-friendly names
1645 for CSRs.
1646
1647 2018-10-23 Joel Brobecker <brobecker@adacore.com>
1648
1649 * riscv-tdep.c (riscv_gdbarch_init): Set the gdbarch's
1650 have_nonsteppable_watchpoint attribute to 1.
1651
1652 2018-10-23 Andrew Burgess <andrew.burgess@embecosm.com>
1653
1654 * riscv-tdep.c (riscv_gdb_reg_names): Update comment, and all
1655 register names.
1656 (struct register_alias): Rename to...
1657 (struct riscv_register_alias): ...this, and update comment.
1658 (riscv_register_aliases): Update type, and alias names. Remove
1659 CSR names from this list.
1660 (riscv_register_name): Use riscv_gdb_reg_names for int and float
1661 register names. Add an extra assertion.
1662 (riscv_is_regnum_a_named_csr): New function.
1663 (riscv_register_reggroup_p): Use riscv_is_regnum_a_named_csr.
1664
1665 2018-10-23 John Darrington <john@darrington.wattle.id.au>
1666
1667 * configure.tgt: Add configuration for s12z.
1668 * s12z-tdep.c: New file.
1669 * NEWS: Mention new target.
1670
1671 2018-10-22 Jim Wilson <jimw@sifive.com>
1672
1673 * riscv-tdep.c (riscv_push_dummy_call) <in_reg>: Check for value in
1674 FP reg smaller than FP reg size, and fill with -1 instead of 0.
1675
1676 * riscv-tdep.c (riscv_fpreg_d_type, riscv_fpreg_q_type): New.
1677 (riscv_register_type): Use them.
1678 (riscv_print_one_register_info): Handle union of floats same as float.
1679 * riscv-tdep.h (struct gdbarch_tdep): Add riscv_fpreg_d_type and
1680 riscv_fpreg_q_type fields.
1681
1682 2018-10-21 Simon Marchi <simon.marchi@ericsson.com>
1683
1684 * gdbarch.sh (gdbarch_num_cooked_regs): New.
1685 * gdbarch.h: Re-generate.
1686 * ax-gdb.c (gen_expr): Use gdbarch_num_cooked_regs.
1687 * dwarf2-frame.c (dwarf2_frame_cache): Likewise.
1688 * eval.c (evaluate_subexp_standard): Likewise.
1689 * findvar.c (value_of_register): Likewise.
1690 (value_of_register_lazy): Likewise.
1691 (address_from_register): Likewise.
1692 * frame.c (get_frame_register_bytes): Likewise.
1693 * gdbarch-selftests.c (register_to_value_test): Likewise.
1694 * h8300-tdep.c (h8300_register_type): Likewise.
1695 * i386-tdep.c (i386_dbx_reg_to_regnum): Likewise.
1696 (i386_svr4_reg_to_regnum): Likewise.
1697 * infcmd.c (default_print_registers_info): Likewise.
1698 (registers_info): Likewise.
1699 (print_vector_info): Likewise.
1700 (default_print_float_info): Likewise.
1701 * m68hc11-tdep.c (m68hc11_frame_unwind_cache): Likewise.
1702 * mdebugread.c (mdebug_reg_to_regnum): Likewise.
1703 * mi/mi-main.c (mi_cmd_data_list_register_names): Likewise.
1704 (mi_cmd_data_list_changed_registers): Likewise.
1705 (mi_cmd_data_list_register_values): Likewise.
1706 (mi_cmd_data_write_register_values): Likewise.
1707 (mi_cmd_trace_frame_collected): Likewise.
1708 * mips-tdep.c (print_gp_register_row): Likewise.
1709 (mips_print_registers_info): Likewise.
1710 * nds32-tdep.c (nds32_gdbarch_init): Likewise.
1711 * regcache.c (init_regcache_descr): Likewise.
1712 (register_size): Likewise.
1713 (register_dump::dump): Likewise.
1714 (cooked_read_test): Likewise.
1715 (cooked_write_test): Likewise.
1716 * rs6000-tdep.c (rs6000_register_sim_regno): Likewise.
1717 (rs6000_gdbarch_init): Likewise.
1718 * stabsread.c (stab_reg_to_regnum): Likewise.
1719 * stack.c (info_frame_command): Likewise.
1720 * target-descriptions.c (tdesc_register_name): Likewise.
1721 * trad-frame.c (trad_frame_alloc_saved_regs): Likewise.
1722 * tui/tui-regs.c (tui_show_register_group): Likewise.
1723 * user-regs.c (user_reg_map_name_to_regnum): Likewise.
1724 (user_reg_map_regnum_to_name): Likewise.
1725 (value_of_user_reg): Likewise.
1726 (maintenance_print_user_registers): Likewise.
1727 * xtensa-tdep.c (xtensa_find_register_by_name): Likewise.
1728 (xtensa_register_name): Likewise.
1729 (xtensa_register_type): Likewise.
1730 (xtensa_reg_to_regnum): Likewise.
1731 (xtensa_pseudo_register_read): Likewise.
1732 (xtensa_pseudo_register_write): Likewise.
1733
1734 2018-10-21 Simon Marchi <simon.marchi@polymtl.ca>
1735
1736 * amd64-tdep.c (amd64_pseudo_register_read_value): Use
1737 correctly-sized buffer with raw_read.
1738 (amd64_pseudo_register_write): Use correctly-sized buffer for
1739 raw_read/raw_write.
1740
1741 2018-10-19 Philippe Waroquiers <philippe.waroquiers@skynet.be>
1742
1743 * typeprint.c (_initialize_typeprint): Fix wrong prefixname arg
1744 in add_prefix_cmd of set print type.
1745
1746 2018-10-19 Tom Tromey <tom@tromey.com>
1747
1748 PR tui/18388:
1749 * NEWS: Mention tabset deprecation.
1750 * tui/tui-win.c (tui_tab_width, internal_tab_width): New globals.
1751 (update_tab_width): New function.
1752 (tui_set_tab_width, tui_show_tab_width): New functions.
1753 (tui_set_tab_width_command): Use update_tab_width.
1754 (_initialize_tui_win): Move to end of file. Deprecate "tabset".
1755 Add new "set tui tab-width" command.
1756 * tui/tui-source.c (tui_set_source_content): Update.
1757 * tui/tui-disasm.c (tui_set_disassem_content): Update.
1758 * tui/tui-data.h (tui_default_tab_len, tui_set_default_tab_len):
1759 Don't declare.
1760 (tui_tab_width): Declare.
1761 * tui/tui-data.c (default_tab_len, tui_default_tab_len)
1762 (tui_set_default_tab_len): Remove.
1763
1764 2018-10-19 Tom Tromey <tom@tromey.com>
1765
1766 * tui/tui-io.h (key_is_start_sequence, key_is_end_sequence)
1767 (key_is_backspace, tui_getc): Don't declare.
1768 * tui/tui-io.c (key_is_start_sequence): Now static.
1769 (key_is_end_sequence, key_is_backspace): Remove.
1770 (tui_getc): Now static.
1771
1772 2018-10-19 Tom Tromey <tom@tromey.com>
1773
1774 * symfile.c (reread_symbols): Clear "static_links".
1775
1776 2018-10-19 Alan Hayward <alan.hayward@arm.com>
1777
1778 * aarch64-linux-tdep.c (AARCH64_SIGCONTEXT_RESERVED_SIZE): New
1779 define.
1780 (aarch64_linux_sigframe_init): Extra boundary checks.
1781
1782 2018-10-19 Andreas Arnez <arnez@linux.ibm.com>
1783
1784 * s390-tdep.c (s390_pseudo_register_type): For v0-v15 don't yield
1785 the possibly non-existent tdesc type 'vec128', but the type of raw
1786 register v16 instead.
1787
1788 2018-10-19 Gary Benson <gbenson@redhat.com>
1789
1790 * cli/cli-interp.c (cli_interp::~cli_interp): New function.
1791
1792 2018-10-18 Sergio Durigan Junior <sergiodj@redhat.com>
1793
1794 PR cli/23785
1795 * cli/cli-dump.c (restore_binary_file): Check if "file" is
1796 NULL.
1797
1798 2018-10-17 Paul Koning <paul_koning@dell.com>
1799
1800 * charset.c (convert_between_encodings): Fix unsigned overflow.
1801
1802 2018-10-17 John Baldwin <jhb@FreeBSD.org>
1803
1804 * fbsd-nat.c (fbsd_nat_target::info_proc) Use
1805 fbsd_info_proc_mappings_header and fbsd_info_proc_mappings_entry.
1806 * fbsd-tdep.c (fbsd_vm_map_entry_flags): Mark static.
1807 (fbsd_info_proc_mappings_header, fbsd_info_proc_mappings_entry):
1808 New functions.
1809 (fbsd_core_info_proc_mappings): Use fbsd_info_proc_mappings_header
1810 and fbsd_info_proc_mappings_header.
1811 * fbsd-tdep.h (fbsd_vm_map_entry_flags): Remove.
1812 (fbsd_info_proc_mappings_header, fbsd_info_proc_mappings_entry):
1813 New.
1814
1815 2018-10-17 Joel Brobecker <brobecker@adacore.com>
1816
1817 * MAINTAINERS (Responsible Maintainers): Add Rainer Orth as
1818 Solaris Maintainer.
1819
1820 2018-10-15 Tom Tromey <tom@tromey.com>
1821
1822 * tui/tui.c (strcat_to_buf): Remove casts.
1823 * tui/tui-winsource.c (tui_show_source_line)
1824 (tui_set_is_exec_point_at, tui_line_is_displayed): Remove casts.
1825 * tui/tui-wingeneral.c (tui_refresh_win, box_win): Remove casts.
1826 * tui/tui-windata.c (tui_first_data_item_displayed)
1827 (tui_delete_data_content_windows, tui_erase_data_content)
1828 (tui_display_all_data, tui_display_data_from)
1829 (tui_refresh_data_win, tui_vertical_data_scroll): Remove casts.
1830 * tui/tui-win.c (tui_set_win_height)
1831 (make_invisible_and_set_new_height, parse_scrolling_args): Remove
1832 casts.
1833 * tui/tui-win.c (tui_resize_all): Remove casts.
1834 (tui_scroll_backward_command, tui_set_focus)
1835 (tui_set_tab_width_command): Likewise.
1836 * tui/tui-source.c (tui_vertical_source_scroll): Remove cast.
1837 * tui/tui-regs.c (tui_show_register_group): Remove cast.
1838 * tui/tui-layout.c (tui_set_layout_by_name): Remove cast.
1839 * tui/tui-disasm.c (tui_vertical_disassem_scroll): Remove cast.
1840 * tui/tui-data.c (tui_partial_win_by_name, tui_free_win_content):
1841 Remove casts.
1842
1843 2018-10-15 Simon Marchi <simon.marchi@ericsson.com>
1844
1845 * MAINTAINERS (Responsible Maintainers): Add Alan Hayward as
1846 AArch64/ARM maintainer.
1847
1848 2018-10-11 Gary Benson <gbenson@redhat.com>
1849
1850 * interps.h (interp::m_name): Make private and mutable.
1851 * interps.c (interp::~interp): Free m_name.
1852
1853 2018-10-10 Sergio Durigan Junior <sergiodj@redhat.com>
1854 Simon Marchi <simark@simark.ca>
1855
1856 * README (`configure' options): Add documentation for new
1857 "--enable-unit-tests" option.
1858 * acinclude.m4: Include "selftest.m4".
1859 * configure: Regenerate.
1860 * configure.ac: Use "GDB_AC_SELFTEST".
1861 * maint.c (maintenance_selftest): Update message informing
1862 that selftests have been disabled.
1863 (maintenance_info_selftests): Likewise.
1864 * selftest.m4: New file.
1865
1866 2018-10-10 Gary Benson <gbenson@redhat.com>
1867
1868 * remote.c (remote_target::remote_send_printf): Add
1869 missing va_end found by Coverity.
1870
1871 2018-10-10 Markus Metzger <markus.t.metzger@intel.com>
1872
1873 * btrace.c (ftrace_update_function): Add indirect jump heuristic.
1874
1875 2018-10-09 Tom Tromey <tom@tromey.com>
1876
1877 * configure: Rebuild.
1878 * sanitize.m4 (AM_GDB_UBSAN): Default to no.
1879 * NEWS: Update --enable-ubsan documentation.
1880
1881 2018-10-09 Gary Benson <gbenson@redhat.com>
1882
1883 * dwarf2read.c (create_dwp_hash_table): Fix buffer overrun
1884 found by Coverity.
1885
1886 2018-10-08 Tom Tromey <tom@tromey.com>
1887
1888 * riscv-fbsd-tdep.c (riscv_fbsd_sigframe_init): Remove unused
1889 variable.
1890 (riscv_fbsd_init_abi): Likewise.
1891
1892 2018-10-08 Weimin Pan <weimin.pan@oracle.com>
1893 * valops.c (value_struct_elt_for_reference): Rename local variable
1894 to work around the shadowing a previous local warning.
1895
1896 2018-10-08 John Baldwin <jhb@FreeBSD.org>
1897
1898 * Makefile.in (ALLDEPFILES): Add riscv-fbsd-nat.c.
1899 * NEWS: Mention new FreeBSD/riscv native configuration.
1900 * configure.host: Add riscv*-*-freebsd*.
1901 * configure.nat: Likewise.
1902 * riscv-fbsd-nat.c: New file.
1903
1904 2018-10-08 John Baldwin <jhb@FreeBSD.org>
1905
1906 * Makefile.in (ALL_TARGET_OBS): Add riscv-fbsd-tdep.o.
1907 (HFILES_NO_SRCDIR): Add riscv-fbsd-tdep.h.
1908 (ALLDEPFILES): Add riscv-fbsd-tdep.c.
1909 * NEWS: Mention new FreeBSD/riscv target.
1910 * configure.tgt: Add riscv*-*-freebsd*.
1911 * riscv-fbsd-tdep.c: New file.
1912 * riscv-fbsd-tdep.h: New file.
1913
1914 2018-10-08 John Baldwin <jhb@FreeBSD.org>
1915
1916 * regcache.h (struct regcache_map_entry): Note that this type can
1917 be used with traditional frame caches.
1918 * trad-frame.c (trad_frame_set_reg_regmap): New.
1919 * trad-frame.h (trad_frame_set_reg_regmap): New.
1920
1921 2018-10-08 Weimin Pan <weimin.pan@oracle.com>
1922
1923 PR c++/16841
1924 * valops.c (get_virtual_base_offset): New function.
1925 (value_struct_elt_for_reference): Use it to get virtual base offset
1926 and add it in calculating class member address.
1927
1928 2018-10-08 John Darrington <john@darrington.wattle.id.au>
1929
1930 * dwarf2read.c (dwarf2_cu) <producer_is_codewarrior>: New field.
1931 (check_producer): Check if the producer is codewarrior.
1932 (producer_is_codewarrior): New function.
1933 (lnp_state_machine::record_line): Ignore is_stmt flag for records
1934 produced by codewarrior.
1935 (dwarf2_cu::dwarf2_cu): Initialize producer_is_codewarrior.
1936
1937 2018-10-06 Tom Tromey <tom@tromey.com>
1938
1939 PR python/19399:
1940 * python/py-inferior.c: Add "architecture" entry.
1941 (infpy_architecture): New function.
1942
1943 2018-10-06 Tom Tromey <tom@tromey.com>
1944
1945 PR python/21765:
1946 * python/py-symbol.c (gdbpy_initialize_symbols): Redefine
1947 SYMBOL_VARIABLES_DOMAIN, SYMBOL_FUNCTIONS_DOMAIN,
1948 SYMBOL_TYPES_DOMAIN. Define SYMBOL_MODULE_DOMAIN,
1949 SYMBOL_COMMON_BLOCK_DOMAIN, SYMBOL_LOC_COMMON_BLOCK.
1950
1951 2018-10-06 Tom Tromey <tom@tromey.com>
1952
1953 PR build/17077:
1954 * Makefile.in (OPCODES_CFLAGS): Remove "-I$(OPCODES_SRC)/..".
1955 * arc-tdep.c, frv-tdep.c, lm32-tdep.c, mep-tdep.c,
1956 microblaze-tdep.c, or1k-tdep.h: Use ../opcodes, not opcodes, in
1957 #include.
1958
1959 2018-10-06 Tom Tromey <tom@tromey.com>
1960
1961 * python/py-breakpoint.c (bppy_get_location): Handle a
1962 bp_breakpoint without a location.
1963
1964 2018-10-06 Tom Tromey <tom@tromey.com>
1965
1966 * python/lib/gdb/function/strfns.py (_MemEq, _StrLen, _StrEq)
1967 (_RegEx): Reformat help text.
1968 * python/lib/gdb/function/caller_is.py (CallerIs, CallerMatches)
1969 (AnyCallerIs, AnyCallerMatches): Reformat help text.
1970 * python/lib/gdb/function/as_string.py (_AsString): Reformat help
1971 text.
1972 * python/lib/gdb/command/xmethods.py (InfoXMethod)
1973 (EnableXMethod, DisableXMethod): Remove help indentation.
1974 Capitalize meta-syntactic variables.
1975 * python/lib/gdb/command/unwinders.py (InfoUnwinder)
1976 (EnableUnwinder, DisableUnwinder): Remove help indentation.
1977 Capitalize meta-syntactic variables.
1978 * python/lib/gdb/command/explore.py (ExploreCommand)
1979 (ExploreValueCommand, ExploreTypeCommand): Reformat help text.
1980 * python/lib/gdb/command/type_printers.py (InfoTypePrinter)
1981 (EnableTypePrinter, DisableTypePrinter): Remove help indentation.
1982 * python/lib/gdb/command/pretty_printers.py (InfoPrettyPrinter):
1983 Remove help indentation.
1984 (EnablePrettyPrinter, DisablePrettyPrinter): Likewise.
1985 * python/lib/gdb/command/frame_filters.py (EnableFrameFilter)
1986 (DisableFrameFilter, SetFrameFilterPriority)
1987 (ShowFrameFilterPriority, InfoFrameFilter): Reword help text.
1988
1989 2018-10-06 Tom Tromey <tom@tromey.com>
1990
1991 PR tui/28819:
1992 * tui/tui-io.c (gdb_wgetch): New function.
1993 (tui_mld_getc, tui_getc): Use it.
1994
1995 2018-10-05 Tom Tromey <tom@tromey.com>
1996
1997 * sol-thread.c (sol_thread_target::wait): Rename inner
1998 "save_ptid".
1999
2000 2018-10-04 Tom Tromey <tom@tromey.com>
2001
2002 * configure: Rebuild.
2003 * warning.m4 (AM_GDB_WARNINGS): Add -Wshadow=local.
2004
2005 2018-10-04 Tom Tromey <tom@tromey.com>
2006
2007 * guile/scm-frame.c (gdbscm_frame_read_var): Remove inner
2008 declaration of "block".
2009
2010 2018-10-04 Tom Tromey <tom@tromey.com>
2011
2012 * common/filestuff.c (fdwalk): Remove inner declaration of
2013 "result".
2014
2015 2018-10-04 Tom Tromey <tom@tromey.com>
2016
2017 * msp430-tdep.c (msp430_push_dummy_call): Rename inner
2018 "structs_addr" and hoist declaration.
2019
2020 2018-10-04 Tom Tromey <tom@tromey.com>
2021
2022 * linux-tdep.c (linux_make_mappings_corefile_notes): Introduce new
2023 variable "size".
2024
2025 2018-10-04 Tom Tromey <tom@tromey.com>
2026
2027 * mdebugread.c (parse_partial_symbols): Use std::string.
2028
2029 2018-10-04 Tom Tromey <tom@tromey.com>
2030
2031 * ctf.c (SET_ARRAY_FIELD): Rename "u32".
2032 * p-valprint.c (pascal_val_print): Split inner "i" variable.
2033 * xtensa-tdep.c (xtensa_push_dummy_call): Declare "i" in loop
2034 header.
2035 * xstormy16-tdep.c (xstormy16_push_dummy_call): Declare "val" in
2036 more inner scope.
2037 * xcoffread.c (read_xcoff_symtab): Rename inner "symbol".
2038 * varobj.c (varobj_update): Rename inner "newobj",
2039 "type_changed".
2040 * valprint.c (generic_emit_char): Rename inner "buf".
2041 * valops.c (find_overload_match): Rename inner "temp".
2042 (value_struct_elt_for_reference): Declare "v" in more inner
2043 scope.
2044 * v850-tdep.c (v850_push_dummy_call): Rename "len".
2045 * unittests/array-view-selftests.c (run_tests): Rename inner
2046 "vec".
2047 * tui/tui-stack.c (tui_show_frame_info): Declare "i" in loop
2048 header.
2049 * tracepoint.c (merge_uploaded_trace_state_variables): Declare
2050 "tsv" in more inner scope.
2051 (print_one_static_tracepoint_marker): Rename inner
2052 "tuple_emitter".
2053 * tic6x-tdep.c (tic6x_analyze_prologue): Declare "inst" lower.
2054 (tic6x_push_dummy_call): Don't redeclare "addr".
2055 * target-float.c: Declare "dto" lower.
2056 * symtab.c (lookup_local_symbol): Rename inner "sym".
2057 (find_pc_sect_line): Rename inner "pc".
2058 * stack.c (print_frame): Don't redeclare "gdbarch".
2059 (return_command): Rename inner "gdbarch".
2060 * s390-tdep.c (s390_prologue_frame_unwind_cache): Renam inner
2061 "sp".
2062 * rust-lang.c (rust_internal_print_type): Declare "i" in loop
2063 header.
2064 * rs6000-tdep.c (ppc_process_record): Rename inner "addr".
2065 * riscv-tdep.c (riscv_push_dummy_call): Declare "info" in inner
2066 scope.
2067 * remote.c (remote_target::update_thread_list): Don't redeclare
2068 "tp".
2069 (remote_target::process_initial_stop_replies): Rename inner
2070 "thread".
2071 (remote_target::remote_parse_stop_reply): Don't redeclare "p".
2072 (remote_target::wait_as): Don't redeclare "stop_reply".
2073 (remote_target::get_thread_local_address): Rename inner
2074 "result".
2075 (remote_target::get_tib_address): Likewise.
2076
2077 * regcache.c (cooked_read_test): Rename "regnum".
2078 * record-btrace.c (cmd_record_btrace_start): Rename inner
2079 "exception".
2080 * ppc-sysv-tdep.c (ppc64_sysv_abi_return_value): Declare "i" in
2081 loop header.
2082 * ppc-linux-tdep.c (ppc_linux_syscall_record): Declare "i" in loop
2083 header.
2084 (ppu2spu_sniffer): Rename inner "buf".
2085 * parse.c (operator_check_standard): Rename inner "type",
2086 "objfile".
2087 * p-valprint.c (pascal_val_print): Introduce new scope for
2088 "low_bound", "high_bound".
2089 * p-exp.y (yylex): Declare "i" in loop header.
2090 * objfiles.c (objfile_relocate1): Declare "i" in loop header.
2091 Lower declaration of "s".
2092 * nios2-tdep.c (nios2_analyze_prologue): Declare "i" in loop
2093 header.
2094 (nios2_push_dummy_call): Rename "len".
2095 * nat/linux-osdata.c (linux_xfer_osdata_cpus): Rename static
2096 "buf".
2097 (linux_xfer_osdata_fds, linux_xfer_osdata_shm)
2098 (linux_xfer_osdata_sem, linux_xfer_osdata_msg)
2099 (linux_xfer_osdata_modules): Likewise.
2100 * mips-tdep.c (mips_eabi_push_dummy_call): Rename outer "len".
2101 (mips_n32n64_push_dummy_call, mips_o32_push_dummy_call)
2102 (mips_o64_push_dummy_call): Likewise.
2103 * microblaze-tdep.c (microblaze_analyze_prologue): Rename inner
2104 "op".
2105 * mi/mi-main.c (list_available_thread_groups): Rename inner
2106 "tuple_emitter".
2107 (mi_cmd_data_read_memory): Rename inner "opts".
2108 * mi/mi-cmd-var.c (varobj_update_one): Rename inner
2109 "tuple_emitter".
2110 * mep-tdep.c (mep_analyze_prologue): Declare "rn" in loop header.
2111 * mdebugread.c (parse_symbol): Rename inner "b". Declare "f" in
2112 more inner scope.
2113 (parse_partial_symbols): Rename inner "pst", "p", "name"
2114 * main.c (captured_main_1): Rename inner "i"s.
2115 * machoread.c (macho_symfile_read_all_oso): Don't redeclare
2116 "oso2".
2117 * linux-tdep.c (linux_info_proc): Rename inner "filename".
2118 * linespec.c (linespec_lexer_lex_string): Rename inner "p".
2119 * infrun.c (handle_no_resumed): Don't redeclare "thread".
2120 (handle_signal_stop): Rename inner "gdbarch".
2121 (handle_command): Declare "signum" in loop header.
2122 * ia64-tdep.c (ia64_pseudo_register_read): Don't redeclare
2123 "status".
2124 (examine_prologue): Rename inner "sol" and "sof".
2125 (ia64_extract_return_value): Rename inner "val". Declare another
2126 "val" in a more inner scope.
2127 * hppa-bsd-tdep.c (hppabsd_find_global_pointer): Declare "buf" in
2128 inner scope.
2129 * guile/scm-symbol.c (gdbscm_lookup_symbol): Rename inner
2130 "except".
2131 * findvar.c (default_read_var_value): Don't redeclare "addr".
2132 * f-exp.y (yylex): Declare "i" in loop header.
2133 * eval.c (evaluate_subexp_standard): Don't redeclare "type".
2134 Rename inner "type", "expect_type".
2135 (evaluate_subexp_for_sizeof): Rename inner "pc".
2136 * elfread.c (elf_symfile_read): Rename inner "abfd".
2137 * dwarf2read.c (read_debug_names_from_section): Don't redeclare
2138 "bytes_read".
2139 (process_psymtab_comp_unit_reader): Don't redeclare "gdbarch".
2140 (add_partial_subprogram): Rename inner "lowpc" and "highpc".
2141 (dwarf_decode_line_header): Rename inner "lh".
2142 * dwarf2loc.c (dwarf2_compile_expr_to_ax): Don't redeclare
2143 "offset". Declare "i" in loop header.
2144 (disassemble_dwarf_expression): Rename inner "addr_size".
2145 * dwarf2expr.c (dwarf_expr_context::execute_stack_op): Rename
2146 inner "result".
2147 (dwarf_expr_context::execute_stack_op): Rename inner "offset".
2148 * dwarf2-frame.c (decode_frame_entry_1): Rename inner "length"s.
2149 * disasm.c (do_mixed_source_and_assembly_deprecated): Rename inner
2150 "inner_list_emitter".
2151 (do_mixed_source_and_assembly): Rename inner "tuple_emitter".
2152 * disasm-selftests.c (print_one_insn_test): Wrap "bplen"
2153 declaration in a block.
2154 * csky-tdep.c (csky_analyze_prologue): Declare "offset" lower.
2155 * cp-valprint.c (cp_print_value_fields): Don't redeclare
2156 "obstack_final_size".
2157 * cp-support.c (inspect_type): Declare "i" in loop header.
2158 * compile/compile.c (compile_instance::insert_symbol_error):
2159 Rename inner "e".
2160 * common/agent.c (agent_run_command): Remove inner "ret"
2161 declaration.
2162 * coffread.c (coff_symfile_read): Rename inner "name".
2163 (coff_symfile_read): Rename inner "abfd".
2164 * cli/cli-utils.c (get_number_trailer): Rename inner "val".
2165 * cli/cli-cmds.c (print_disassembly): Rename inner "low" and
2166 "high".
2167 * c-exp.y (lex_one_token): Move "len" declaration lower.
2168 * breakpoint.c (create_longjmp_master_breakpoint): Don't redeclare
2169 "gdbarch".
2170 (create_exception_master_breakpoint): Likewise. Don't redeclare
2171 "b".
2172 (watch_command_1): Declare "mark" later.
2173 (clear_command): Don't shadow "a" or "b".
2174 (delete_command): Rename inner "b".
2175 (delete_trace_command): Likewise.
2176 * arm-tdep.c (thumb_process_displaced_32bit_insn): Rename inner
2177 "op".
2178 (arm_gdbarch_init): Remove inner "e_flags".
2179 * arch/arm-get-next-pcs.c (thumb_get_next_pcs_raw): Declare
2180 "offset" in inner blocks.
2181
2182 2018-10-04 Simon Marchi <simon.marchi@ericsson.com>
2183
2184 * dwarf-index-write.c (file_write): Don't write if the vector is
2185 empty.
2186
2187 2018-10-05 Tom de Vries <tdevries@suse.de>
2188
2189 * python/py-progspace.c (pspy_solib_name): Fix type mismatch in
2190 PyArg_ParseTuple call.
2191
2192 2018-10-05 Tom de Vries <tdevries@suse.de>
2193
2194 * python/py-record-btrace.c (recpy_bt_goto): Fix type mismatch in
2195 PyArg_ParseTuple call.
2196
2197 2018-10-04 Joel Brobecker <brobecker@adacore.com>
2198
2199 * psymtab.c (recursively_search_psymtabs): Reformat parameters
2200 to avoid exceeding 80 characters per line limit.
2201
2202 2018-10-04 Tom Tromey <tom@tromey.com>
2203
2204 * symfile.c (syms_from_objfile_1, finish_new_objfile)
2205 (reread_symbols): Update.
2206 * complaints.h (clear_complaints): Remove argument.
2207 * complaints.c (enum complaint_series): Remove.
2208 (series): Remove global.
2209 (complaint_internal): Update.
2210 (clear_complaints): Remove argument.
2211
2212 2018-10-04 Tom Tromey <tom@tromey.com>
2213
2214 * symfile.c (symbol_file_add_with_addrs): Do not print "no
2215 debugging symbols" message if there is a separate debug objfile.
2216
2217 2018-10-04 Tom Tromey <tom@tromey.com>
2218
2219 PR cli/19551:
2220 * symfile.c (symbol_file_add_with_addrs): Update output.
2221 * psymtab.c (require_partial_symbols): Update output.
2222
2223 2018-10-04 Tom Tromey <tom@tromey.com>
2224
2225 PR cli/22234:
2226 * complaints.c: Emit \n.
2227
2228 2018-10-04 Tom Tromey <tom@tromey.com>
2229
2230 * symfile.c (symbol_file_add_with_addrs, symbol_file_clear)
2231 (separate_debug_file_exists, find_separate_debug_file)
2232 (add_symbol_file_command, reread_symbols, allocate_symtab)
2233 (allocate_compunit_symtab): Use filtered printing, not
2234 unfiltered.
2235 * psymtab.c (require_partial_symbols, dump_psymtab)
2236 (allocate_psymtab): Use filtered printing, not unfiltered.
2237
2238 2018-10-04 Tom Tromey <tom@tromey.com>
2239
2240 * complaints.c (complaint_internal): Correctly check complaint
2241 count.
2242
2243 2018-10-04 Tom Tromey <tom@tromey.com>
2244
2245 * complaints.h (struct complaints): Remove declaration.
2246 * complaints.c (clear_complaints): Remove an unused variable.
2247
2248 2018-10-04 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
2249
2250 * MAINTAINERS (Write After Approval): Add self.
2251
2252 2018-10-03 Tom Tromey <tom@tromey.com>
2253
2254 * guile/scm-value.c (gdbscm_value_to_string): Initialize
2255 "buffer_contents".
2256 * coffread.c (coff_symtab_read): Initialize "newobj".
2257
2258 2018-10-03 Simon Marchi <simon.marchi@polymtl.ca>
2259
2260 * dwarf2read.c (read_func_scope): Remove struct keyword in
2261 range-based for.
2262
2263 2018-10-03 Tom Tromey <tom@tromey.com>
2264
2265 * README: Mention --enable-ubsan.
2266 * NEWS: Mention --enable-ubsan.
2267 * acinclude.m4: Include sanitize.m4.
2268 * configure: Rebuild.
2269 * configure.ac: Call AM_GDB_UBSAN.
2270 * sanitize.m4: New file.
2271
2272 2018-10-03 Tom Tromey <tom@tromey.com>
2273
2274 * expression.h (enum exp_opcode): Use uint8_t as base type.
2275 * expprint.c (op_name): Handle invalid opcodes.
2276
2277 2018-10-03 Tom Tromey <tom@tromey.com>
2278
2279 * parse.c (prefixify_expression): Add assert.
2280 (parse_exp_in_context_1): Throw exception if the expression is
2281 empty.
2282
2283 2018-10-03 Tom Tromey <tom@tromey.com>
2284
2285 * dwarf2read.c (read_signed_leb128): Work in ULONGEST.
2286
2287 2018-10-03 Tom Tromey <tom@tromey.com>
2288
2289 * c-exp.y (parse_number): Work in unsigned. Remove casts.
2290
2291 2018-10-03 Tom Tromey <tom@tromey.com>
2292
2293 * dwarf2read.c (read_subrange_type): Make "negative_mask"
2294 unsigned.
2295
2296 2018-10-03 Tom Tromey <tom@tromey.com>
2297
2298 * findvar.c (extract_integer): Do work in an unsigned type.
2299
2300 2018-10-03 Tom Tromey <tom@tromey.com>
2301
2302 * common/enum-flags.h (enum_flags::operator~): Add static assert.
2303 * symfile-add-flags.h (enum symfile_add_flag): Use unsigned as
2304 base type.
2305 * objfile-flags.h (enum objfile_flag): Use unsigned as base type.
2306 * gdbtypes.h (enum type_instance_flag_value): Use unsigned as base
2307 type.
2308 * c-lang.h (enum c_string_type_values): Use unsigned as base
2309 type.
2310 * btrace.h (enum btrace_thread_flag): Use unsigned as base type.
2311
2312 2018-10-03 Tom Tromey <tom@tromey.com>
2313
2314 * dwarf2-frame.h (dwarf2_frame_state_reg_info)
2315 <~dwarf2_frame_state_reg_info>: Update.
2316 <dwarf2_frame_state_reg_info>: Update.
2317 <alloc_regs>: Add assertion. Update.
2318 <reg>: Now a std::vector.
2319 <num_regs>: Remove.
2320 <swap>: Update.
2321 * dwarf2-frame.c (dwarf2_restore_rule, execute_cfa_program)
2322 (execute_cfa_program_test, dwarf2_frame_cache): Update.
2323
2324 2018-10-03 Tom Tromey <tom@tromey.com>
2325
2326 * namespace.c (add_using_directive): Don't pass NULL to memcpy.
2327
2328 2018-10-03 Philippe Waroquiers <philippe.waroquiers@skynet.be>
2329
2330 * tid-parse.c (tid_is_in_list): Fix wrong 'See' comment.
2331
2332 2018-10-02 Tom Tromey <tom@tromey.com>
2333
2334 * aarch64-linux-tdep.c (aarch64_linux_sigframe_init): Use pulongest.
2335
2336 2018-10-02 John Darrington <john@darrington.wattle.id.au>
2337
2338 * NEWS: Mention changed commands.
2339 * ser-uds.c: New file.
2340 * configure.ac (SER_HARDWIRE): Add ser-uds.o.
2341 * configure: Regenerate.
2342 * Makefile.in: Add new file.
2343 * serial.c (serial_open): Check if filename is a socket
2344 and lookup the appropriate interface accordingly.
2345
2346 2018-10-01 Alan Hayward <alan.hayward@arm.com>
2347
2348 * aarch64-linux-tdep.c (AARCH64_SIGCONTEXT_RESERVED_OFFSET): Add
2349 define.
2350 (AARCH64_EXTRA_MAGIC): Likewise.
2351 (AARCH64_FPSIMD_MAGIC): Likewise.
2352 (AARCH64_SVE_MAGIC): Likewise.
2353 (AARCH64_EXTRA_DATAP_OFFSET): Likewise.
2354 (AARCH64_FPSIMD_FPSR_OFFSET): Likewise.
2355 (AARCH64_FPSIMD_FPCR_OFFSET): Likewise.
2356 (AARCH64_FPSIMD_V0_OFFSET): Likewise.
2357 (AARCH64_FPSIMD_VREG_SIZE): Likewise.
2358 (AARCH64_SVE_CONTEXT_VL_OFFSET): Likewise.
2359 (AARCH64_SVE_CONTEXT_REGS_OFFSET): Likewise.
2360 (AARCH64_SVE_CONTEXT_P_REGS_OFFSET): Likewise.
2361 (AARCH64_SVE_CONTEXT_FFR_OFFSET): Likewise.
2362 (AARCH64_SVE_CONTEXT_SIZE): Likewise.
2363 (read_aarch64_ctx): Add function.
2364 (aarch64_linux_sigframe_init): Detect FP registers.
2365
2366 2018-10-01 Alan Hayward <alan.hayward@arm.com>
2367
2368 * aarch64-tdep.c (AARCH64_Q0_REGNUM): Move to here.
2369 (AARCH64_D0_REGNUM): Likewise.
2370 (AARCH64_S0_REGNUM): Likewise.
2371 (AARCH64_H0_REGNUM): Likewise.
2372 (AARCH64_B0_REGNUM): Likewise.
2373 (AARCH64_SVE_V0_REGNUM): Likewise.
2374 * arch/aarch64.h (AARCH64_Q0_REGNUM): Move from 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
2381 2018-10-01 Gary Benson <gbenson@redhat.com>
2382
2383 * gdb_proc_service.h (gdb_prfpregset_t): Remove typedef.
2384 * proc-service.c (ps_lgetfpregs, ps_lsetfpregs): Use
2385 prfpregset_t instead of gdb_prfpregset_t.
2386 * configure.ac (PRFPREGSET_T_BROKEN): Remove check.
2387 * configure, config.in: Rebuild.
2388
2389 2018-10-01 Gary Benson <gbenson@redhat.com>
2390
2391 * common/gdb_proc_service.h: New file, factored out from...
2392 * gdb_proc_service.h: Moved common code to the above file.
2393 * Makefile.in (HFILES_NO_SRCDIR): Add the above new file.
2394
2395 2018-10-01 Gary Benson <gbenson@redhat.com>
2396
2397 * gdb_proc_service.h: Use elf_gregset_t if prgregset_t is
2398 undefined. Use elf_fpregset_t if prfpregset_t is undefined.
2399
2400 2018-10-01 Gary Benson <gbenson@redhat.com>
2401
2402 * configure.ac: Check if sys/procfs.h defines elf_fpregset_t.
2403 (AC_CHECK_HEADERS): Check for linux/elf.h.
2404 * configure, config.in: Rebuild.
2405 * gdb_proc_service.h: Include linux/elf.h if sys/procfs.h
2406 doesn't define elf_fpregset_t.
2407
2408 2018-10-01 Gary Benson <gbenson@redhat.com>
2409
2410 * gdb_proc_service.h: Whitespace change.
2411
2412 2018-10-01 Tom Tromey <tom@tromey.com>
2413
2414 * unittests/scoped_mmap-selftests.c: Don't check HAVE_UNISTD_H.
2415 * unittests/scoped_fd-selftests.c: Don't check HAVE_UNISTD_H.
2416 * common/scoped_fd.h: Don't check HAVE_UNISTD_H.
2417
2418 2018-10-01 Tom Tromey <tom@tromey.com>
2419
2420 * README: Minor change.
2421
2422 2018-09-30 Pedro Alves <palves@redhat.com>
2423
2424 * darwin-nat-info.c (darwin_debug_regions_recurse)
2425 (info_mach_exceptions_command): Remove unused local variables.
2426 * darwin-nat.c (darwin_decode_notify_message)
2427 (darwin_nat_target::resume, darwin_nat_target::mourn_inferior)
2428 (darwin_stop_inferior, darwin_setup_exceptions)
2429 (darwin_nat_target::kill, darwin_attach_pid, darwin_ptrace_him)
2430 (darwin_nat_target::attach, darwin_nat_target::detach)
2431 (darwin_read_write_inferior, darwin_read_dyld_info): Remove unused
2432 local variables.
2433 * i386-darwin-nat.c (i386_darwin_dr_set): Remove unused local
2434 variables.
2435
2436 2018-09-29 Tom Tromey <tom@tromey.com>
2437
2438 * README: Remove some leftover text.
2439
2440 2018-09-29 Tom Tromey <tom@tromey.com>
2441
2442 * PROBLEMS: Rewrite.
2443 * README: Update.
2444
2445 2018-09-28 John Baldwin <jhb@FreeBSD.org>
2446
2447 * disasm-selftests.c (print_one_insn_test): Add bfd_arch_riscv to
2448 case with explicit breakpoint kind.
2449 * riscv-tdep.c (show_use_compressed_breakpoints): Remove
2450 'additional_info' and related logic.
2451 (riscv_debug_breakpoints): New variable.
2452 (riscv_breakpoint_kind_from_pc): Use the length of the existing
2453 instruction to determine the breakpoint kind.
2454 (_initialize_riscv_tdep): Add 'set/show debug riscv breakpoints'
2455 flag. Update description of 'set/show riscv
2456 use-compressed-breakpoints' flag.
2457
2458 2018-09-28 Andrew Burgess <andrew.burgess@embecosm.com>
2459
2460 (NEWS): Mention changes to frame related commands.
2461 * cli/cli-decode.c (add_cmd_suppress_notification): New function.
2462 (add_prefix_cmd_suppress_notification): New function.
2463 (add_com_suppress_notification): Call
2464 add_cmd_suppress_notification.
2465 * command.h (add_cmd_suppress_notification): Declare.
2466 (add_prefix_cmd_suppress_notification): Declare.
2467 * mi/mi-cmd-stack.c: Add 'safe-ctype.h' include.
2468 (parse_frame_specification): Moved from stack.c, with
2469 simplification to handle a single argument.
2470 (mi_cmd_stack_select_frame): Use parse_frame_specification, the
2471 switch to the selected frame. Add a header comment.
2472 * stack.c: Remove 'safe-ctype.h' include.
2473 (find_frame_for_function): Add declaration.
2474 (find_frame_for_address): New function.
2475 (parse_frame_specification): Moved into mi/mi-cmd-stack.c.
2476 (frame_selection_by_function_completer): New function.
2477 (info_frame_command): Rename to...
2478 (info_frame_command_core): ...this, and update parameter types.
2479 (select_frame_command): Rename to...
2480 (select_frame_command_core): ...this, and update parameter types.
2481 (frame_command): Rename to...
2482 (frame_command_core): ...this, and update parameter types.
2483 (class frame_command_helper): New class to wrap implementations of
2484 frame related sub-commands.
2485 (frame_apply_cmd_list): New static global.
2486 (frame_cmd_list): Make static.
2487 (select_frame_cmd_list): New global for sub-commands.
2488 (info_frame_cmd_list): New global for sub-commands.
2489 (_initialize_stack): Register sub-commands for 'frame',
2490 'select-frame', and 'info frame'. Update 'frame apply' commands
2491 to use frame_apply_cmd_list. Move function local static
2492 frame_apply_list to file static frame_apply_cmd_list for
2493 consistency.
2494 * stack.h (select_frame_command): Delete declarationn.
2495 (select_frame_for_mi): Declare new function.
2496
2497 2018-09-26 Andrew Burgess <andrew.burgess@embecosm.com>
2498
2499 * riscv-tdep.c (riscv_insn::decode): Decode c.lui.
2500 (riscv_scan_prologue): Split handling of AUIPC, LUI, ADD, ADDI,
2501 and NOP.
2502
2503 2018-09-26 Simon Marchi <simon.marchi@ericsson.com>
2504
2505 * elf32-nds32.c (elf32_nds32_allocate_dynrelocs): Remove.
2506
2507 2018-09-26 Tom Tromey <tom@tromey.com>
2508
2509 * valops.c (auto_abandon): Remove dead code.
2510
2511 2018-09-26 Tom Tromey <tom@tromey.com>
2512
2513 * tui/tui-win.c (WIN_HEIGHT_USAGE): Remove extra ">"s.
2514
2515 2018-09-24 Tom Tromey <tom@tromey.com>
2516
2517 * common/pathstuff.c (get_standard_cache_dir): Make
2518 "xdg_cache_home" and "home" const.
2519 * top.c (init_history): Make "tmpenv" const.
2520 * main.c (get_init_files): Make "homedir" const.
2521
2522 2018-09-23 Tom Tromey <tom@tromey.com>
2523
2524 PR python/18852:
2525 * python/py-param.c (get_set_value): Use gdbpy_handle_exception.
2526
2527 2018-09-23 Tom Tromey <tom@tromey.com>
2528
2529 * python/py-function.c (fnpy_call): Use gdbpy_handle_exception.
2530 * python/py-cmd.c (cmdpy_function): Use gdbpy_handle_exception.
2531 * python/python-internal.h (gdbpy_handle_exception): Declare.
2532 * python/py-utils.c (gdbpy_handle_exception): New function.
2533
2534 2018-09-23 Tom Tromey <tom@tromey.com>
2535
2536 PR python/17284:
2537 * python/py-type.c (typy_template_argument): Check for negative
2538 argument number.
2539
2540 2018-09-23 Tom Tromey <tom@tromey.com>
2541
2542 PR python/14062:
2543 * python/python.c (gdbpy_run_events): Do not ignore exceptions.
2544
2545 2018-09-23 Tom Tromey <tom@tromey.com>
2546
2547 PR python/18170:
2548 * python/py-value.c (valpy_int): Allow conversion from pointer
2549 type.
2550
2551 2018-09-23 Tom Tromey <tom@tromey.com>
2552
2553 PR python/20126:
2554 * python/py-value.c (valpy_int): Respect type sign.
2555
2556 2018-09-23 Tom Tromey <tom@tromey.com>
2557
2558 PR python/18352;
2559 * python/py-value.c (valpy_float): Allow conversions from int or
2560 char.
2561 (valpy_int, valpy_long): Allow conversions from float.
2562
2563 2018-09-23 Tom Tromey <tom@tromey.com>
2564
2565 * ctf.c (ctf_start): Use gdb_fopen_cloexec.
2566 * common/scoped_mmap.c (mmap_file): Use gdb_open_cloexec.
2567
2568 2018-09-23 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
2569
2570 * amd64-sol2-tdep.c (amd64_sol2_sigtramp_p): Also recognize
2571 __sighndlr.
2572 * i386-sol2-tdep.c (i386_sol2_sigtramp_p): Likewise.
2573
2574 2018-08-02 Jon Turney <jon.turney@dronecode.org.uk>
2575
2576 * windows-nat.c (windows_nat_target::wait): Remove a spurious
2577 target_terminal::ours().
2578
2579 2018-09-23 Simon Marchi <simon.marchi@ericsson.com>
2580
2581 * aarch64-linux-tdep.c (aarch64_linux_supply_sve_regset): Change type
2582 of vl to ULONGEST.
2583
2584 2018-09-21 Yacov Simhony <ysimhony@gmail.com>
2585
2586 * breakpoint.c (update_inserted_breakpoint_locations): Remove
2587 redundant condition.
2588
2589 2018-09-20 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
2590
2591 * proc-utils.h (PROC_CTL_WORD_TYPE): Remove.
2592
2593 * procfs.c: Don't check for PR_MODEL_NATIVE definition.
2594 * sparc-sol2-nat.c: Likewise. Remove Linux, __arch64__ references.
2595 * sol-thread.c (ps_pdmodel): Don't guard definition.
2596
2597 * procfs.c: Fix formatting.
2598
2599 * procfs.c (sysset_t_alloc): Remove.
2600 (create_procinfo): Use XNEW instead of sysset_t_alloc.
2601 (procfs_debug_inferior): Likewise.
2602 (procfs_set_exec_trap): Likewise.
2603 (proc_set_traced_sysentry): Don't allocate argp dynamically.
2604 (proc_set_traced_sysexit): Likewise.
2605
2606 * procfs.c (create_procinfo): Use xsnprintf to fix ARI warning.
2607 (dead_procinfo): Likewise.
2608 (proc_warn): Likewise.
2609 (proc_error): Likewise.
2610 (proc_get_LDT_entry): Likewise.
2611 (do_attach): Likewise.
2612 (procfs_target::pid_to_str): Likewise.
2613 (iterate_over_mappings): Likewise.
2614
2615 * procfs.c (create_procinfo): Fix ARI warning.
2616 (proc_get_status): Likewise.
2617 (proc_stop_process): Likewise.
2618 (proc_run_process): Likewise.
2619 (proc_kill): Likewise.
2620 (proc_get_LDT_entry): Likewise.
2621 (procfs_find_LDT_entry): Likewise.
2622 (proc_update_threads): Likewise.
2623 (proc_iterate_over_threads): Likewise.
2624 (do_attach): Likewise.
2625 (procfs_xfer_memory): Likewise.
2626 (invalidate_cache): Likewise.
2627 (procfs_target::resume): Likewise.
2628 (procfs_init_inferior): Likewise.
2629 (procfs_set_exec_trap): Likewise.
2630 (procfs_target::thread_alive): Likewise.
2631 (procfs_target::pid_to_exec_file): Likewise.
2632 (iterate_over_mappings): Likewise.
2633 (procfs_target::make_corefile_notes): Likewise.
2634 * sol-thread.c (sol_thread_target::thread_alive): Likewise.
2635
2636 * procfs.c (procfs_find_LDT_entry): Silence ARI warning.
2637 (procfs_find_LDT_entry): Likewise.
2638 * sol-thread.c (ps_lgetLDT): Likewise.
2639
2640 2018-09-20 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
2641
2642 PR tdep/17903
2643 * procfs.c (procfs_target): Declare pid_to_exec_file.
2644 (procfs_target::pid_to_exec_file): New.
2645
2646 2018-09-20 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
2647
2648 * auxv.c (default_print_auxv_entry): Reflect AT_SUN_CAP_HW1
2649 renaming.
2650 Handle AT_SUN_EMULATOR, AT_SUN_BRANDNAME, AT_SUN_BRAND_AUX1,
2651 AT_SUN_BRAND_AUX2, AT_SUN_BRAND_AUX3, AT_SUN_CAP_HW2.
2652
2653 2018-09-20 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
2654
2655 * i386-v4-nat.c (regmap, supply_gregset, fill_gregset)
2656 (supply_fpregset, fill_fpregset): Move ...
2657 * i386-sol2-nat.c [PR_MODEL_NATIVE != PR_MODEL_LP64]: ... here.
2658 Remove HAVE_GREGSET_T, HAVE_FPREGET_T guards.
2659 Remove references to ioctl-based procfs.
2660 Include <sys/reg.h>.
2661 Remove PR_MODEL_NATIVE guards.
2662 * configure.nat <sol2, i386> (NATDEPFILES): Remove i386-v4-nat.o.
2663 * Makefile.in (ALLDEPFILES): Remove i386-v4-nat.c.
2664
2665 2018-09-19 Xavier Roirand <roirand@adacore.com>
2666
2667 PR gdb/20981:
2668 * solib-darwin.c (darwin_get_dyld_bfd): New function.
2669 (darwin_solib_get_all_image_info_addr_at_init): Update call.
2670 (darwin_solib_create_inferior_hook): Handle unrelocated dyld.
2671
2672 2018-09-19 John Baldwin <jhb@FreeBSD.org>
2673
2674 * fbsd-tdep.c (fbsd_print_sockaddr_in): Style fix.
2675 (fbsd_print_sockaddr_in6): Likewise.
2676
2677 2018-09-19 Richard Bunt <richard.bunt@arm.com>
2678 Chris January <chris.january@arm.com>
2679
2680 * eval.c (skip_undetermined_arglist): Skip argument list helper.
2681 (evaluate_subexp_standard): Return a dummy type when
2682 honoring EVAL_SKIP in OP_VAR_VALUE and handle skipping in the
2683 OP_F77_UNDETERMINED_ARGLIST case.
2684 * expression.h (enum noside): Update comment.
2685
2686 2018-09-19 George Vasick <george.vasick@oracle.com>
2687
2688 * solib-svr4.c (svr4_same_1): Also handle amd64 ld.so.1.
2689
2690 2018-09-19 Stefan Teleman <stefan.teleman@oracle.com>
2691 April Chin <april.chin@oracle.com>
2692 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
2693
2694 * procfs.c (MAX_PROC_NAME_SIZE): Allow for 6-digit PID_MAX and
2695 uint_t lwpid_t.
2696 (create_procinfo): Print pids in /proc without leading zeros.
2697
2698 2018-09-18 Sandra Loosemore <sandra@codesourcery.com>
2699
2700 * nios2-tdep.c (nios2_gcc_target_options): New.
2701 (nios2_gdb_arch_init): Install new hook.
2702
2703 2018-09-18 Simon Marchi <simon.marchi@ericsson.com>
2704
2705 * patches/0001-Fix-PR-gdb-23558-Use-system-s-getcwd-when-cross-comp.patch:
2706 New file.
2707 * update-gnulib.sh: Apply patch.
2708 * configure: Re-generate.
2709
2710 2018-09-18 John Baldwin <jhb@FreeBSD.org>
2711
2712 * infcmd.c (_initialize_infcmd): Remove "running" from "info proc"
2713 description. Make "info proc" command descriptions more
2714 consistent.
2715
2716 2018-09-18 John Baldwin <jhb@FreeBSD.org>
2717
2718 * NEWS: Mention 'info proc files' command.
2719
2720 2018-09-18 John Baldwin <jhb@FreeBSD.org>
2721
2722 * fbsd-nat.c (fbsd_nat_target::info_proc): List open file
2723 descriptors for IP_FILES and IP_ALL.
2724
2725 2018-09-18 John Baldwin <jhb@FreeBSD.org>
2726
2727 * fbsd-tdep.c (KF_FLAGS, KF_OFFSET, KF_VNODE_TYPE, KF_SOCK_DOMAIN)
2728 (KF_SOCK_TYPE, KF_SOCK_PROTOCOL, KF_SA_LOCAL, KF_SA_PEER)
2729 (KINFO_FILE_TYPE_SOCKET, KINFO_FILE_TYPE_PIPE)
2730 (KINFO_FILE_TYPE_FIFO, KINFO_FILE_TYPE_KQUEUE)
2731 (KINFO_FILE_TYPE_CRYPTO, KINFO_FILE_TYPE_MQUEUE)
2732 (KINFO_FILE_TYPE_SHM, KINFO_FILE_TYPE_SEM, KINFO_FILE_TYPE_PTS)
2733 (KINFO_FILE_TYPE_PROCDESC, KINFO_FILE_FD_TYPE_ROOT)
2734 (KINFO_FILE_FD_TYPE_JAIL, KINFO_FILE_FD_TYPE_TRACE)
2735 (KINFO_FILE_FD_TYPE_CTTY, KINFO_FILE_FLAG_READ)
2736 (KINFO_FILE_FLAG_WRITE, KINFO_FILE_FLAG_APPEND)
2737 (KINFO_FILE_FLAG_ASYNC, KINFO_FILE_FLAG_FSYNC)
2738 (KINFO_FILE_FLAG_NONBLOCK, KINFO_FILE_FLAG_DIRECT)
2739 (KINFO_FILE_FLAG_HASLOCK, KINFO_FILE_FLAG_EXEC)
2740 (KINFO_FILE_VTYPE_VREG, KINFO_FILE_VTYPE_VDIR)
2741 (KINFO_FILE_VTYPE_VCHR, KINFO_FILE_VTYPE_VLNK)
2742 (KINFO_FILE_VTYPE_VSOCK, KINFO_FILE_VTYPE_VFIFO, FBSD_AF_UNIX)
2743 (FBSD_AF_INET, FBSD_AF_INET6, FBSD_SOCK_STREAM, FBSD_SOCK_DGRAM)
2744 (FBSD_SOCK_SEQPACKET, FBSD_IPPROTO_ICMP, FBSD_IPPROTO_TCP)
2745 (FBSD_IPPROTO_UDP, FBSD_IPPROTO_SCTP): New defines.
2746 (struct fbsd_sockaddr_in, struct fbsd_sockaddr_in6)
2747 (struct fbsd_sockaddr_un): New types.
2748 (fbsd_file_fd, fbsd_file_type, fbsd_file_flags, fbsd_ipproto)
2749 (fbsd_print_sockaddr_in, fbsd_print_sockaddr_in6)
2750 (fbsd_info_proc_files_header, fbsd_info_proc_files_entry)
2751 (fbsd_core_info_proc_files): New functions.
2752 (fbsd_core_info_proc): List open file descriptors for IP_FILES and
2753 IP_ALL.
2754 * fbsd-tdep.h (fbsd_info_proc_files_header)
2755 (fbsd_info_proc_files_entry): New.
2756
2757 2018-09-18 John Baldwin <jhb@FreeBSD.org>
2758
2759 * defs.h (enum info_proc_what) [IP_FILES]: New value.
2760 * infcmd.c (info_proc_cmd_files): New function.
2761 (_initialize_infcmd): Register 'info proc files' command.
2762
2763 2018-09-18 John Baldwin <jhb@FreeBSD.org>
2764
2765 * gnulib/aclocal-m4-deps.mk: Re-generate.
2766 * gnulib/aclocal.m4: Re-generate.
2767 * gnulib/config.in: Re-generate.
2768 * gnulib/configure: Re-generate.
2769 * gnulib/import/Makefile.am: Re-generate.
2770 * gnulib/import/Makefile.in: Re-generate.
2771 * gnulib/import/m4/gnulib-cache.m4: Re-generate.
2772 * gnulib/import/m4/gnulib-comp.m4: Re-generate.
2773 * gnulib/import/arpa_inet.in.h: New file.
2774 * gnulib/import/inet_ntop.c: New file.
2775 * gnulib/import/m4/arpa_inet_h.m4: New file.
2776 * gnulib/import/m4/inet_ntop.m4: New file.
2777 * gnulib/import/m4/netinet_in_h.m4: New file.
2778 * gnulib/import/m4/socklen.m4: New file.
2779 * gnulib/import/m4/sockpfaf.m4: New file.
2780 * gnulib/import/m4/stdalign.m4: New file.
2781 * gnulib/import/m4/sys_uio_h.m4: New file.
2782 * gnulib/import/netinet_in.in.h: New file.
2783 * gnulib/import/stdalign.in.h: New file.
2784 * gnulib/import/sys_socket.c: New file.
2785 * gnulib/import/sys_socket.in.h: New file.
2786 * gnulib/import/sys_uio.in.h: New file.
2787 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add inet_ntop
2788 module.
2789
2790 2018-09-18 John Baldwin <jhb@FreeBSD.org>
2791
2792 * gnulib/aclocal-m4-deps.mk: New file.
2793 * gnulib/update-gnulib.sh: Generate "aclocal-m4-deps.mk"
2794 deterministically.
2795
2796 2018-09-18 John Baldwin <jhb@FreeBSD.org>
2797
2798 * fbsd-tdep.c (fbsd_core_vnode_path): Use KF_PATH instead of
2799 KVE_PATH.
2800
2801 2018-09-18 Tom Tromey <tom@tromey.com>
2802
2803 * compile/compile-object-load.c (struct
2804 link_hash_table_cleanup_data): Add constructor and destructor.
2805 Use DISABLE_COPY_AND_ASSIGN.
2806 (~link_hash_table_cleanup_data): Rename from
2807 link_hash_table_free. Now a destructor.
2808 (copy_sections): Use gdb::unique_xmalloc_ptr. Remove cleanups.
2809
2810 2018-09-18 Tom Tromey <tom@tromey.com>
2811
2812 * compile/compile-object-run.c (do_module_cleanup): Use delete.
2813 * compile/compile-object-load.c (struct munmap_list): Move to
2814 header file.
2815 (munmap_list::add): Rename from munmap_list_add; rewrite.
2816 (munmap_list::~munmap_list): Rename from munmap_list_free.
2817 (munmap_listp_free_cleanup): Remove.
2818 (compile_object_load): Update.
2819 * compile/compile-object-load.h (struct munmap_list): Move from
2820 compile-object-load.c. Rewrite.
2821
2822 2018-09-18 Alan Hayward <alan.hayward@arm.com>
2823
2824 * aarch64-tdep.c (pass_in_v): Use register size.
2825 (aarch64_extract_return_value): Likewise.
2826 (aarch64_store_return_value): Likewise.
2827
2828 2018-09-18 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
2829
2830 * utils.c (dump_core) [HAVE_SETRLIMIT]: Cast RLIM_INFINITY to
2831 rlim_t.
2832
2833 2018-09-17 Philippe Waroquiers <philippe.waroquiers@skynet.be>
2834
2835 * python/lib/gdb/command/frame_filters.py (EnableFrameFilter):
2836 Fix short help line.
2837
2838 2018-09-17 Tom Tromey <tom@tromey.com>
2839
2840 PR python/20445:
2841 * configure: Rebuild.
2842 * configure.ac: Conditionally use -DNDEBUG for Python.
2843
2844 2018-09-17 Tom Tromey <tom@tromey.com>
2845
2846 * configure: Rebuild.
2847 * configure.ac: Use gmp as a library dependency when checking for
2848 mpfr.
2849
2850 2018-09-17 Pedro Alves <palves@redhat.com>
2851
2852 * python/py-inferior.c (find_inferior_object): Delete.
2853
2854 2018-09-17 Simon Marchi <simon.marchi@ericsson.com>
2855
2856 * compile/compile-cplus-types.c
2857 (compile_cplus_instance::enter_scope): Don't use new_scope after
2858 std::move.
2859
2860 2018-09-17 Tom Tromey <tom@tromey.com>
2861
2862 * common/pathstuff.c (get_standard_cache_dir): Use
2863 ~/Library/Caches on macOS.
2864 * common/pathstuff.h (get_standard_cache_dir): Update comment.
2865
2866 2018-09-17 Simon Marchi <simon.marchi@polymtl.ca>
2867
2868 PR python/23669
2869 * breakpoint.c (commands_cmd_element): New.
2870 (_initialize_breakpoint): Assign commands_cmd_element.
2871 * breakpoint.h (commands_cmd_element): New.
2872 * cli/cli-script.c (while_cmd_element, if_command,
2873 define_cmd_element): New.
2874 (command_name_equals): Remove.
2875 (process_next_line): Compare commands by pointer, not by name.
2876 (_initialize_cli_script): Assign the various cmd_list_element
2877 variables.
2878 * compile/compile.c (compile_cmd_element): New.
2879 (_initialize_compile): Assign compile_cmd_element.
2880 * compile/compile.h (compile_cmd_element): New.
2881 * guile/guile.c (guile_cmd_element): New.
2882 (install_gdb_commands): Assign guile_cmd_element.
2883 * guile/guile.h (guile_cmd_element): New.
2884 * python/python.c (python_cmd_element): New.
2885 (_initialize_python): Assign python_cmd_element.
2886 * python/python.h (python_cmd_element): New.
2887 * tracepoint.c (while_stepping_cmd_element): New.
2888 (_initialize_tracepoint): Assign while_stepping_cmd_element.
2889 * tracepoint.h (while_stepping_cmd_element): New.
2890
2891 2018-09-17 Tom Tromey <tom@tromey.com>
2892
2893 * infrun.c (save_infcall_suspend_state): Return
2894 infcall_suspend_state_up.
2895 (save_infcall_control_state): Return infcall_control_state_up.
2896 * inferior.h (save_infcall_suspend_state)
2897 (save_infcall_control_state): Declare later. Return unique
2898 pointers.
2899
2900 2018-09-17 Tom Tromey <tom@tromey.com>
2901
2902 * infrun.c (struct stop_context): Declare constructor,
2903 destructor, "changed" method.
2904 (stop_context::stop_context): Rename from save_stop_context.
2905 (stop_context::~stop_context): Rename from
2906 release_stop_context_cleanup.
2907 (normal_stop): Update.
2908 (stop_context::changed): Rename from stop_context_changed. Return
2909 bool.
2910
2911 2018-09-17 Tom Tromey <tom@tromey.com>
2912
2913 * inferior.h (struct infcall_suspend_state_deleter): New.
2914 (infcall_suspend_state_up): New typedef.
2915 (struct infcall_control_state_deleter): New.
2916 (infcall_control_state_up): New typedef.
2917 (make_cleanup_restore_infcall_suspend_state)
2918 (make_cleanup_restore_infcall_control_state): Don't declare.
2919 * infcall.c (call_function_by_hand_dummy): Update.
2920 * infrun.c (do_restore_infcall_suspend_state_cleanup)
2921 (make_cleanup_restore_infcall_suspend_state): Remove.
2922 (do_restore_infcall_control_state_cleanup)
2923 (make_cleanup_restore_infcall_control_state): Remove.
2924
2925 2018-09-17 Tom Tromey <tom@tromey.com>
2926
2927 * gdbthread.h (struct thread_control_state): Add initializer.
2928 (class thread_info) <control>: Remove initializer.
2929 * inferior.h (struct inferior_control_state): Add initializer.
2930 (class inferior) <control>: Remove initializer.
2931 (exit_inferior_1): Update.
2932 * infrun.c (struct infcall_control_state): Add constructors.
2933 (save_infcall_control_state): Use new.
2934 (restore_infcall_control_state, discard_infcall_control_state):
2935 Use delete.
2936
2937 2018-09-17 Tom Tromey <tom@tromey.com>
2938
2939 * infrun.c (struct infcall_suspend_state) <registers>: Now a
2940 unique_ptr.
2941 <siginfo_data>: Now a unique_xmalloc_ptr.
2942 (save_infcall_suspend_state, restore_infcall_suspend_state)
2943 (discard_infcall_suspend_state)
2944 (get_infcall_suspend_state_regcache): Update.
2945
2946 2018-09-17 Tom Tromey <tom@tromey.com>
2947
2948 * gdbthread.h (struct thread_suspend_state): Add initializers.
2949 (class thread_info) <suspend>: Remove initializer.
2950 * infrun.c (struct infcall_suspend_state): Add initializers.
2951 (save_infcall_suspend_state): Use new.
2952 (discard_infcall_suspend_state): Use delete.
2953
2954 2018-09-16 Tom Tromey <tom@tromey.com>
2955
2956 * python/python-internal.h (CPYCHECKER_STEALS_REFERENCE_TO_ARG):
2957 Remove.
2958 * python/py-varobj.c (py_varobj_iter_ctor): Change pyiter to
2959 rvalue reference. Remove CPYCHECKER_STEALS_REFERENCE_TO_ARG.
2960 (py_varobj_iter_new): Likewise.
2961 (py_varobj_get_iterator): Use gdbpy_ref.
2962
2963 2018-09-16 Tom Tromey <tom@tromey.com>
2964
2965 * python/py-threadevent.c (py_get_event_thread): Simplify.
2966 * python/py-inferior.c (infpy_thread_from_thread_handle):
2967 Return immediately after calling thread_to_thread_object. Use
2968 Py_RETURN_NONE.
2969 (thread_to_thread_object): Set the exception on a NULL return.
2970
2971 2018-09-16 Simon Marchi <simon.marchi@polymtl.ca>
2972
2973 * Makefile.in (LIBGDB_OBS): Sort COMMON_OBS.
2974
2975 2018-09-16 Tom Tromey <tom@tromey.com>
2976
2977 * python/python-internal.h (CPYCHECKER_RETURNS_BORROWED_REF):
2978 Remove.
2979
2980 2018-09-16 Tom Tromey <tom@tromey.com>
2981
2982 * python/python-internal.h (thread_to_thread_object): Change
2983 return type.
2984 * python/py-inferior.c (thread_to_thread_object): Return a new
2985 reference.
2986 (infpy_thread_from_thread_handle): Update.
2987 * python/py-infthread.c (gdbpy_selected_thread): Update.
2988 * python/py-stopevent.c (create_stop_event_object): Update.
2989 * python/py-threadevent.c (py_get_event_thread): Return a new
2990 reference.
2991 (py_get_event_thread): Update.
2992 * python/py-event.h (py_get_event_thread): Change return type.
2993 * python/py-continueevent.c (create_continue_event_object):
2994 Update.
2995
2996 2018-09-16 Tom Tromey <tom@tromey.com>
2997
2998 * python/py-progspace.c (pspy_get_objfiles): Update.
2999 * python/python-internal.h (objfile_to_objfile_object): Change
3000 return type.
3001 * python/py-newobjfileevent.c (create_new_objfile_event_object):
3002 Update.
3003 * python/py-xmethods.c (gdbpy_get_matching_xmethod_workers):
3004 Update.
3005 * python/python.c (gdbpy_get_current_objfile): Update.
3006 (gdbpy_objfiles): Update.
3007 * python/py-objfile.c (objfpy_get_owner, gdbpy_lookup_objfile):
3008 Update.
3009 (objfile_to_objfile_object): Return a new reference.
3010 * python/py-symtab.c (stpy_get_objfile): Update.
3011 * python/py-prettyprint.c (find_pretty_printer_from_objfiles):
3012 Update.
3013
3014 2018-09-16 Tom Tromey <tom@tromey.com>
3015
3016 * python/py-inferior.c (infpy_get_progspace): Update.
3017 * python/python-internal.h (pspace_to_pspace_object): Change
3018 return type.
3019 * python/py-newobjfileevent.c
3020 (create_clear_objfiles_event_object): Update.
3021 * python/py-xmethods.c (gdbpy_get_matching_xmethod_workers):
3022 Update.
3023 * python/python.c (gdbpy_get_current_progspace): Update.
3024 (gdbpy_progspaces): Update.
3025 * python/py-progspace.c (pspace_to_pspace_object): Return a new
3026 reference.
3027 * python/py-objfile.c (objfpy_get_progspace): Update.
3028 * python/py-prettyprint.c (find_pretty_printer_from_progspace):
3029 Update.
3030
3031 2018-09-16 Tom Tromey <tom@tromey.com>
3032
3033 * python/lib/gdb/__init__.py (current_progspace, objfiles)
3034 (solib_name, block_for_pc, find_pc_line): New functions.
3035 (execute_unwinders): Update.
3036 * python/py-block.c (gdbpy_block_for_pc): Remove.
3037 * python/py-inferior.c (infpy_get_progspace): New function.
3038 (inferior_object_getset) <progspace>: Add.
3039 * python/py-progspace.c (pspy_objfiles): Rewrite.
3040 (pspy_solib_name, pspy_block_for_pc)
3041 (pspy_find_pc_line, pspy_is_valid): New functions.
3042 (progspace_object_methods): Add entries for solib_name,
3043 block_for_pc, find_pc_line, is_valid.
3044 * python/python-internal.h (gdbpy_block_for_pc)
3045 (build_objfiles_list): Don't declare.
3046 * python/python.c: Don't include solib.h.
3047 (gdbpy_solib_name, gdbpy_find_pc_line)
3048 (gdbpy_get_current_progspace, build_objfiles_list)
3049 (gdbpy_objfiles): Remove.
3050 (GdbMethods) <current_progspace, objfiles, block_for_pc,
3051 solib_name, find_pc_line>: Remove entries.
3052
3053 2018-09-16 Tom Tromey <tom@tromey.com>
3054
3055 * top.c (new_ui_command): Use GNU style for metasyntactic
3056 variables.
3057 * breakpoint.c (stopat_command): Use GNU style for metasyntactic
3058 variables.
3059 * maint.c (maintenance_translate_address): Remove "<>" around
3060 text.
3061 * interps.c (interpreter_exec_cmd): Use GNU style for
3062 metasyntactic variables.
3063 * nto-procfs.c (nto_procfs_target_info): Use GNU style for
3064 metasyntactic variables.
3065 * tracepoint.c (tfind_range_command): Use GNU style for
3066 metasyntactic variables.
3067 (tfind_outside_command): Likewise.
3068 (_initialize_tracepoint): Likewise.
3069 * remote.c (extended_remote_target::create_inferior): Use GNU
3070 style for metasyntactic variables.
3071 * sparc64-tdep.c (adi_examine_command): Use GNU style for
3072 metasyntactic variables.
3073 (adi_assign_command): Likewise.
3074
3075 2018-09-16 Tom Tromey <tom@tromey.com>
3076
3077 * disasm.c (show_disassembler_options_sfunc): Use GNU style for
3078 metasyntactic variables. Print message if no disassembler options
3079 are available.
3080
3081 2018-09-15 Tom Tromey <tom@tromey.com>
3082
3083 * infcmd.c (get_inferior_args): Return const char *.
3084 * inferior.h (get_inferior_args): Return type now const.
3085 * linux-tdep.c (linux_fill_prpsinfo): Update.
3086 * procfs.c (procfs_target::make_corefile_notes): Update.
3087
3088 2018-09-07 Tom Tromey <tom@tromey.com>
3089
3090 * python/python.c (execute_gdb_command): Call bpstat_do_actions
3091 inside the TRY.
3092
3093 2018-09-14 Sandra Loosemore <sandra@codesourcery.com>
3094
3095 * nios2-tdep.c (nios2_type_align): New.
3096 (nios2_gdb_arch_init): Install type_align hook.
3097
3098 2018-09-10 Andrew Burgess <andrew.burgess@embecosm.com>
3099
3100 * eval.c (fake_method::fake_method): Call xzalloc directly for a
3101 type that is neither object file owned, nor gdbarch owned.
3102 * gdbtypes.c (get_type_gdbarch): Add an assert that returned
3103 gdbarch is non-NULL.
3104 (alloc_type_instance): Allocate non-objfile owned types on the
3105 gdbarch obstack.
3106 (copy_type_recursive): Allocate TYPE_FIELDS and TYPE_RANGE_DATA
3107 using TYPE_ALLOC to ensure memory is allocated on the correct
3108 obstack.
3109 * gdbtypes.h (TYPE_ALLOC): Allocate space on either the objfile
3110 obstack, or the gdbarch obstack.
3111 (TYPE_ZALLOC): Rewrite using TYPE_ALLOC.
3112
3113 2018-09-14 Tom Tromey <tom@tromey.com>
3114
3115 * infcall.c (call_function_by_hand_dummy): Remove unnecessary
3116 block.
3117
3118 2018-09-14 Tom Tromey <tom@tromey.com>
3119
3120 * nat/fork-inferior.c (get_startup_shell): Remove "static".
3121
3122 2018-09-13 Tom Tromey <tom@tromey.com>
3123
3124 * python/py-inferior.c (infpy_thread_from_thread_handle): Now
3125 static.
3126
3127 2018-09-13 Tom Tromey <tom@tromey.com>
3128
3129 * exec.c (try_open_exec_file): Use std::string.
3130
3131 2018-09-13 Tom Tromey <tom@tromey.com>
3132
3133 * utils.h (gdb_bfd_errmsg): Return std::string.
3134 * exec.c (exec_file_attach): Update.
3135 * compile/compile-object-load.c (compile_object_load): Update.
3136 * utils.c (gdb_bfd_errmsg): Return std::string.
3137
3138 2018-09-13 Tom Tromey <tom@tromey.com>
3139
3140 * procfs.c (struct procinfo_deleter): New.
3141 (procinfo_up): New typedef.
3142 (do_destroy_procinfo_cleanup): Remove.
3143 (procfs_target::info_proc): Use procinfo_up. Remove cleanups.
3144
3145 2018-09-13 Tom Tromey <tom@tromey.com>
3146
3147 * source.c (add_path): Use gdb::unique_xmalloc_ptr.
3148
3149 2018-09-13 Simon Marchi <simon.marchi@ericsson.com>
3150 2018-09-13 Tom Tromey <tom@tromey.com>
3151
3152 * python/py-progspace.c (PSPY_REQUIRE_VALID): New macro.
3153 (pspy_get_objfiles): New function.
3154 (progspace_object_methods): New.
3155 (pspace_object_type): Add tp_methods callback.
3156 * python/python-internal.h (build_objfiles_list): New
3157 declaration.
3158 * python/python.c (build_objfiles_list): New function.
3159 (gdbpy_objfiles): Implement using build_objfiles_list.
3160 * NEWS: Mention the Progspace.objfiles method.
3161
3162 2018-09-13 Simon Marchi <simon.marchi@ericsson.com>
3163
3164 * python/py-inferior.c (infpy_get_progspace): New function.
3165 (inferior_object_getset): Add progspace property.
3166 * NEWS: Mention the new property.
3167
3168 2018-09-13 Tom Tromey <tom@tromey.com>
3169
3170 PR rust/23650:
3171 * rust-lang.c (rust_evaluate_subexp): Use field name, not "foo".
3172
3173 2018-09-13 Tom Tromey <tom@tromey.com>
3174
3175 PR rust/23626:
3176 * rust-lang.c (rust_enum_variant): Now static.
3177 (rust_empty_enum_p): New function.
3178 (rust_print_enum, rust_evaluate_subexp, rust_print_struct_def):
3179 Handle empty enum.
3180
3181 2018-09-13 Simon Marchi <simon.marchi@ericsson.com>
3182
3183 * python/py-inferior.c (infpy_repr): New.
3184 (inferior_object_type): Register infpy_repr.
3185 * python/py-objfile.c (objfpy_repr): New.
3186 (objfile_object_type): Register objfpy_repr.
3187
3188 2018-09-12 John Baldwin <jhb@FreeBSD.org>
3189
3190 * fbsd-nat.c (fbsd_nat_target::info_proc): Remove unused variable.
3191
3192 2018-09-12 John Baldwin <jhb@FreeBSD.org>
3193
3194 * aarch64-fbsd-tdep.h (AARCH64_FBSD_SIZEOF_GREGSET): Fix comment
3195 typo.
3196
3197 2018-09-12 Sergio Durigan Junior <sergiodj@redhat.com>
3198
3199 * common/common-utils.c: Don't include '<sys/stat.h>'.
3200 (is_regular_file): Move to...
3201 * common/filestuff.c (is_regular_file): ... here.
3202 * common/common-utils.h (is_regular_file): Move to...
3203 * common/filestuff.h (is_regular_file): ... here.
3204
3205 2018-09-12 Simon Marchi <simon.marchi@ericsson.com>
3206
3207 * skip.c (debug_skip): New variable.
3208 (skiplist_entry::do_skip_file_p): Add debug output.
3209 (skiplist_entry::do_skip_gfile_p): Likewise.
3210 (skiplist_entry::skip_function_p): Likewise.
3211 (_initialize_step_skip): Create debug command.
3212 * NEWS: Mention set/show debug skip.
3213
3214 2018-09-11 Xavier Roirand <roirand@adacore.com>
3215
3216 * darwin-nat.c (should_disable_startup_with_shell):
3217 New function.
3218 (darwin_nat_target::create_inferior): Add call.
3219
3220 2018-09-11 Xavier Roirand <roirand@adacore.com>
3221
3222 * darwin-nat.h (struct darwin_thread_info) <gdb_port,
3223 inf_port, msg_state>: Initialize.
3224 (struct darwin_thread_info) <signaled, single_step>: Change
3225 type and initialize.
3226 (struct darwin_thread_info) <event>: Initialize.
3227
3228 2018-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
3229
3230 PR gdb/23555
3231 PR gdb/23558
3232 * gnulib/import/m4/getcwd-path-max.m4: Add cross-compilation
3233 guesses.
3234
3235 2018-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
3236
3237 Revert:
3238 2018-08-29 Sergio Durigan Junior <sergiodj@redhat.com>
3239
3240 PR gdb/23555
3241 PR gdb/23558
3242 * gnulib/aclocal.m4: Regenerate.
3243 * gnulib/config.in: Regenerate.
3244 * gnulib/configure: Regenerate.
3245 * gnulib/import/Makefile.am: Update.
3246 * gnulib/import/Makefile.in: Update.
3247 * gnulib/import/extra/snippet/_Noreturn.h: Rename to...
3248 * gnulib/import/_Noreturn.h: ... this.
3249 * gnulib/import/alloca.in.h: Update.
3250 * gnulib/import/extra/snippet/arg-nonnull.h: Rename to...
3251 * gnulib/import/arg-nonnull.h: ... this.
3252 * gnulib/import/assure.h: Update.
3253 * gnulib/import/at-func.c: Update.
3254 * gnulib/import/basename-lgpl.c: Update.
3255 * gnulib/import/extra/snippet/c++defs.h: Rename to...
3256 * gnulib/import/c++defs.h: ... this.
3257 * gnulib/import/canonicalize-lgpl.c: Update.
3258 * gnulib/import/cdefs.h: Update.
3259 * gnulib/import/chdir-long.c: Update.
3260 * gnulib/import/chdir-long.h: Update.
3261 * gnulib/import/cloexec.c: Update.
3262 * gnulib/import/cloexec.h: Update.
3263 * gnulib/import/close.c: Update.
3264 * gnulib/import/closedir.c: Update.
3265 * gnulib/import/config.charset: Update.
3266 * gnulib/import/dirent-private.h: Update.
3267 * gnulib/import/dirent.in.h: Update.
3268 * gnulib/import/dirfd.c: Update.
3269 * gnulib/import/dirname-lgpl.c: Update.
3270 * gnulib/import/dirname.h: Update.
3271 * gnulib/import/dosname.h: Update.
3272 * gnulib/import/dup-safer-flag.c: Update.
3273 * gnulib/import/dup-safer.c: Update.
3274 * gnulib/import/dup.c: Update.
3275 * gnulib/import/dup2.c: Update.
3276 * gnulib/import/errno.in.h: Update.
3277 * gnulib/import/error.c: Update.
3278 * gnulib/import/error.h: Update.
3279 * gnulib/import/exitfail.c: Update.
3280 * gnulib/import/exitfail.h: Update.
3281 * gnulib/import/extra/update-copyright: Update.
3282 * gnulib/import/fchdir.c: Update.
3283 * gnulib/import/fcntl.c: Update.
3284 * gnulib/import/fcntl.in.h: Update.
3285 * gnulib/import/fd-hook.c: Update.
3286 * gnulib/import/fd-hook.h: Update.
3287 * gnulib/import/fd-safer-flag.c: Update.
3288 * gnulib/import/fd-safer.c: Update.
3289 * gnulib/import/fdopendir.c: Update.
3290 * gnulib/import/filename.h: Update.
3291 * gnulib/import/filenamecat-lgpl.c: Update.
3292 * gnulib/import/filenamecat.h: Update.
3293 * gnulib/import/flexmember.h: Update.
3294 * gnulib/import/float+.h: Update.
3295 * gnulib/import/float.c: Update.
3296 * gnulib/import/float.in.h: Update.
3297 * gnulib/import/fnmatch.c: Update.
3298 * gnulib/import/fnmatch.in.h: Update.
3299 * gnulib/import/fnmatch_loop.c: Update.
3300 * gnulib/import/fpucw.h: Update.
3301 * gnulib/import/frexp.c: Update.
3302 * gnulib/import/frexpl.c: Update.
3303 * gnulib/import/fstat.c: Update.
3304 * gnulib/import/fstatat.c: Update.
3305 * gnulib/import/getcwd-lgpl.c: Update.
3306 * gnulib/import/getcwd.c: Update.
3307 * gnulib/import/getdtablesize.c: Update.
3308 * gnulib/import/getlogin_r.c: Update.
3309 * gnulib/import/getprogname.c: Update.
3310 * gnulib/import/getprogname.h: Update.
3311 * gnulib/import/gettext.h: Update.
3312 * gnulib/import/gettimeofday.c: Update.
3313 * gnulib/import/glob-libc.h: Update.
3314 * gnulib/import/glob.c: Update.
3315 * gnulib/import/glob.in.h: Update.
3316 * gnulib/import/glob_internal.h: Update.
3317 * gnulib/import/glob_pattern_p.c: Update.
3318 * gnulib/import/globfree.c: Update.
3319 * gnulib/import/hard-locale.c: Update.
3320 * gnulib/import/hard-locale.h: Update.
3321 * gnulib/import/intprops.h: Update.
3322 * gnulib/import/inttypes.in.h: Update.
3323 * gnulib/import/isnan.c: Update.
3324 * gnulib/import/isnand-nolibm.h: Update.
3325 * gnulib/import/isnand.c: Update.
3326 * gnulib/import/isnanl-nolibm.h: Update.
3327 * gnulib/import/isnanl.c: Update.
3328 * gnulib/import/itold.c: Update.
3329 * gnulib/import/libc-config.h: Update.
3330 * gnulib/import/limits.in.h: Update.
3331 * gnulib/import/localcharset.c: Update.
3332 * gnulib/import/localcharset.h: Update.
3333 * gnulib/import/localtime-buffer.c: Update.
3334 * gnulib/import/localtime-buffer.h: Update.
3335 * gnulib/import/lstat.c: Update.
3336 * gnulib/import/m4/00gnulib.m4: Update.
3337 * gnulib/import/m4/__inline.m4: Update.
3338 * gnulib/import/m4/absolute-header.m4: Update.
3339 * gnulib/import/m4/alloca.m4: Update.
3340 * gnulib/import/m4/builtin-expect.m4: Update.
3341 * gnulib/import/m4/canonicalize.m4: Update.
3342 * gnulib/import/m4/chdir-long.m4: Update.
3343 * gnulib/import/m4/close.m4: Update.
3344 * gnulib/import/m4/closedir.m4: Update.
3345 * gnulib/import/m4/configmake.m4: Update.
3346 * gnulib/import/m4/d-ino.m4: Update.
3347 * gnulib/import/m4/d-type.m4: Update.
3348 * gnulib/import/m4/dirent_h.m4: Update.
3349 * gnulib/import/m4/dirfd.m4: Update.
3350 * gnulib/import/m4/dirname.m4: Update.
3351 * gnulib/import/m4/double-slash-root.m4: Update.
3352 * gnulib/import/m4/dup.m4: Update.
3353 * gnulib/import/m4/dup2.m4: Update.
3354 * gnulib/import/m4/eealloc.m4: Update.
3355 * gnulib/import/m4/environ.m4: Update.
3356 * gnulib/import/m4/errno_h.m4: Update.
3357 * gnulib/import/m4/error.m4: Update.
3358 * gnulib/import/m4/exponentd.m4: Update.
3359 * gnulib/import/m4/exponentl.m4: Update.
3360 * gnulib/import/m4/extensions.m4: Update.
3361 * gnulib/import/m4/extern-inline.m4: Update.
3362 * gnulib/import/m4/fchdir.m4: Update.
3363 * gnulib/import/m4/fcntl-o.m4: Update.
3364 * gnulib/import/m4/fcntl.m4: Update.
3365 * gnulib/import/m4/fcntl_h.m4: Update.
3366 * gnulib/import/m4/fdopendir.m4: Update.
3367 * gnulib/import/m4/filenamecat.m4: Update.
3368 * gnulib/import/m4/flexmember.m4: Update.
3369 * gnulib/import/m4/float_h.m4: Update.
3370 * gnulib/import/m4/fnmatch.m4: Update.
3371 * gnulib/import/m4/fnmatch_h.m4: Update.
3372 * gnulib/import/m4/fpieee.m4: Update.
3373 * gnulib/import/m4/frexp.m4: Update.
3374 * gnulib/import/m4/frexpl.m4: Update.
3375 * gnulib/import/m4/fstat.m4: Update.
3376 * gnulib/import/m4/fstatat.m4: Update.
3377 * gnulib/import/m4/getcwd-abort-bug.m4: Update.
3378 * gnulib/import/m4/getcwd-path-max.m4: Update.
3379 * gnulib/import/m4/getcwd.m4: Update.
3380 * gnulib/import/m4/getdtablesize.m4: Update.
3381 * gnulib/import/m4/getlogin.m4: Update.
3382 * gnulib/import/m4/getlogin_r.m4: Update.
3383 * gnulib/import/m4/getpagesize.m4: Update.
3384 * gnulib/import/m4/getprogname.m4: Update.
3385 * gnulib/import/m4/gettimeofday.m4: Update.
3386 * gnulib/import/m4/glibc21.m4: Update.
3387 * gnulib/import/m4/glob.m4: Update.
3388 * gnulib/import/m4/glob_h.m4: Update.
3389 * gnulib/import/m4/gnulib-cache.m4: Update.
3390 * gnulib/import/m4/gnulib-common.m4: Update.
3391 * gnulib/import/m4/gnulib-comp.m4: Update.
3392 * gnulib/import/m4/gnulib-tool.m4: Update.
3393 * gnulib/import/m4/hard-locale.m4: Update.
3394 * gnulib/import/m4/include_next.m4: Update.
3395 * gnulib/import/m4/inttypes-pri.m4: Update.
3396 * gnulib/import/m4/inttypes.m4: Update.
3397 * gnulib/import/m4/isnand.m4: Update.
3398 * gnulib/import/m4/isnanl.m4: Update.
3399 * gnulib/import/m4/largefile.m4: Update.
3400 * gnulib/import/m4/limits-h.m4: Update.
3401 * gnulib/import/m4/localcharset.m4: Update.
3402 * gnulib/import/m4/locale-fr.m4: Update.
3403 * gnulib/import/m4/locale-ja.m4: Update.
3404 * gnulib/import/m4/locale-zh.m4: Update.
3405 * gnulib/import/m4/localtime-buffer.m4: Update.
3406 * gnulib/import/m4/longlong.m4: Update.
3407 * gnulib/import/m4/lstat.m4: Update.
3408 * gnulib/import/m4/malloc.m4: Update.
3409 * gnulib/import/m4/malloca.m4: Update.
3410 * gnulib/import/m4/math_h.m4: Update.
3411 * gnulib/import/m4/mbrtowc.m4: Update.
3412 * gnulib/import/m4/mbsinit.m4: Update.
3413 * gnulib/import/m4/mbsrtowcs.m4: Update.
3414 * gnulib/import/m4/mbstate_t.m4: Update.
3415 * gnulib/import/m4/memchr.m4: Update.
3416 * gnulib/import/m4/memmem.m4: Update.
3417 * gnulib/import/m4/mempcpy.m4: Update.
3418 * gnulib/import/m4/memrchr.m4: Update.
3419 * gnulib/import/m4/mkdir.m4: Update.
3420 * gnulib/import/m4/mkstemp.m4: Update.
3421 * gnulib/import/m4/mmap-anon.m4: Update.
3422 * gnulib/import/m4/mode_t.m4: Update.
3423 * gnulib/import/m4/msvc-inval.m4: Update.
3424 * gnulib/import/m4/msvc-nothrow.m4: Update.
3425 * gnulib/import/m4/multiarch.m4: Update.
3426 * gnulib/import/m4/nocrash.m4: Update.
3427 * gnulib/import/m4/off_t.m4: Update.
3428 * gnulib/import/m4/onceonly.m4: Update.
3429 * gnulib/import/m4/open-cloexec.m4: Update.
3430 * gnulib/import/m4/open.m4: Update.
3431 * gnulib/import/m4/openat.m4: Update.
3432 * gnulib/import/m4/opendir.m4: Update.
3433 * gnulib/import/m4/pathmax.m4: Update.
3434 * gnulib/import/m4/rawmemchr.m4: Update.
3435 * gnulib/import/m4/readdir.m4: Update.
3436 * gnulib/import/m4/readlink.m4: Update.
3437 * gnulib/import/m4/realloc.m4: Update.
3438 * gnulib/import/m4/rename.m4: Update.
3439 * gnulib/import/m4/rewinddir.m4: Update.
3440 * gnulib/import/m4/rmdir.m4: Update.
3441 * gnulib/import/m4/save-cwd.m4: Update.
3442 * gnulib/import/m4/secure_getenv.m4: Update.
3443 * gnulib/import/m4/setenv.m4: Update.
3444 * gnulib/import/m4/signal_h.m4: Update.
3445 * gnulib/import/m4/ssize_t.m4: Update.
3446 * gnulib/import/m4/stat-time.m4: Update.
3447 * gnulib/import/m4/stat.m4: Update.
3448 * gnulib/import/m4/std-gnu11.m4: Update.
3449 * gnulib/import/m4/stdbool.m4: Update.
3450 * gnulib/import/m4/stddef_h.m4: Update.
3451 * gnulib/import/m4/stdint.m4: Update.
3452 * gnulib/import/m4/stdio_h.m4: Update.
3453 * gnulib/import/m4/stdlib_h.m4: Update.
3454 * gnulib/import/m4/strchrnul.m4: Update.
3455 * gnulib/import/m4/strdup.m4: Update.
3456 * gnulib/import/m4/strerror.m4: Update.
3457 * gnulib/import/m4/string_h.m4: Update.
3458 * gnulib/import/m4/strstr.m4: Update.
3459 * gnulib/import/m4/strtok_r.m4: Update.
3460 * gnulib/import/m4/sys_socket_h.m4: Update.
3461 * gnulib/import/m4/sys_stat_h.m4: Update.
3462 * gnulib/import/m4/sys_time_h.m4: Update.
3463 * gnulib/import/m4/sys_types_h.m4: Update.
3464 * gnulib/import/m4/tempname.m4: Update.
3465 * gnulib/import/m4/time_h.m4: Update.
3466 * gnulib/import/m4/unistd-safer.m4: Update.
3467 * gnulib/import/m4/unistd_h.m4: Update.
3468 * gnulib/import/m4/warn-on-use.m4: Update.
3469 * gnulib/import/m4/wchar_h.m4: Update.
3470 * gnulib/import/m4/wchar_t.m4: Update.
3471 * gnulib/import/m4/wctype_h.m4: Update.
3472 * gnulib/import/m4/wint_t.m4: Update.
3473 * gnulib/import/malloc.c: Update.
3474 * gnulib/import/malloc/scratch_buffer.h: Update.
3475 * gnulib/import/malloc/scratch_buffer_grow.c: Update.
3476 * gnulib/import/malloc/scratch_buffer_grow_preserve.c: Update.
3477 * gnulib/import/malloc/scratch_buffer_set_array_size.c: Update.
3478 * gnulib/import/malloca.c: Update.
3479 * gnulib/import/malloca.h: Update.
3480 * gnulib/import/malloca.valgrind: Update.
3481 * gnulib/import/math.in.h: Update.
3482 * gnulib/import/mbrtowc.c: Update.
3483 * gnulib/import/mbsinit.c: Update.
3484 * gnulib/import/mbsrtowcs-impl.h: Update.
3485 * gnulib/import/mbsrtowcs-state.c: Update.
3486 * gnulib/import/mbsrtowcs.c: Update.
3487 * gnulib/import/memchr.c: Update.
3488 * gnulib/import/memmem.c: Update.
3489 * gnulib/import/mempcpy.c: Update.
3490 * gnulib/import/memrchr.c: Update.
3491 * gnulib/import/mkdir.c: Update.
3492 * gnulib/import/mkstemp.c: Update.
3493 * gnulib/import/msvc-inval.c: Update.
3494 * gnulib/import/msvc-inval.h: Update.
3495 * gnulib/import/msvc-nothrow.c: Update.
3496 * gnulib/import/msvc-nothrow.h: Update.
3497 * gnulib/import/open.c: Update.
3498 * gnulib/import/openat-die.c: Update.
3499 * gnulib/import/openat-priv.h: Update.
3500 * gnulib/import/openat-proc.c: Update.
3501 * gnulib/import/openat.c: Update.
3502 * gnulib/import/openat.h: Update.
3503 * gnulib/import/opendir.c: Update.
3504 * gnulib/import/pathmax.h: Update.
3505 * gnulib/import/pipe-safer.c: Update.
3506 * gnulib/import/rawmemchr.c: Update.
3507 * gnulib/import/readdir.c: Update.
3508 * gnulib/import/readlink.c: Update.
3509 * gnulib/import/realloc.c: Update.
3510 * gnulib/import/ref-add.sin: Update.
3511 * gnulib/import/ref-del.sin: Update.
3512 * gnulib/import/rename.c: Update.
3513 * gnulib/import/rewinddir.c: Update.
3514 * gnulib/import/rmdir.c: Update.
3515 * gnulib/import/same-inode.h: Update.
3516 * gnulib/import/save-cwd.c: Update.
3517 * gnulib/import/save-cwd.h: Update.
3518 * gnulib/import/scratch_buffer.h: Update.
3519 * gnulib/import/secure_getenv.c: Update.
3520 * gnulib/import/setenv.c: Update.
3521 * gnulib/import/signal.in.h: Update.
3522 * gnulib/import/stat-time.c: Update.
3523 * gnulib/import/stat-time.h: Update.
3524 * gnulib/import/stat-w32.c: Update.
3525 * gnulib/import/stat-w32.h: Update.
3526 * gnulib/import/stat.c: Update.
3527 * gnulib/import/stdbool.in.h: Update.
3528 * gnulib/import/stddef.in.h: Update.
3529 * gnulib/import/stdint.in.h: Update.
3530 * gnulib/import/stdio.in.h: Update.
3531 * gnulib/import/stdlib.in.h: Update.
3532 * gnulib/import/str-two-way.h: Update.
3533 * gnulib/import/strchrnul.c: Update.
3534 * gnulib/import/strdup.c: Update.
3535 * gnulib/import/streq.h: Update.
3536 * gnulib/import/strerror-override.c: Update.
3537 * gnulib/import/strerror-override.h: Update.
3538 * gnulib/import/strerror.c: Update.
3539 * gnulib/import/string.in.h: Update.
3540 * gnulib/import/stripslash.c: Update.
3541 * gnulib/import/strnlen1.c: Update.
3542 * gnulib/import/strnlen1.h: Update.
3543 * gnulib/import/strstr.c: Update.
3544 * gnulib/import/strtok_r.c: Update.
3545 * gnulib/import/sys_stat.in.h: Update.
3546 * gnulib/import/sys_time.in.h: Update.
3547 * gnulib/import/sys_types.in.h: Update.
3548 * gnulib/import/tempname.c: Update.
3549 * gnulib/import/tempname.h: Update.
3550 * gnulib/import/time.in.h: Update.
3551 * gnulib/import/unistd--.h: Update.
3552 * gnulib/import/unistd-safer.h: Update.
3553 * gnulib/import/unistd.in.h: Update.
3554 * gnulib/import/unsetenv.c: Update.
3555 * gnulib/import/verify.h: Update.
3556 * gnulib/import/extra/snippet/warn-on-use.h: Update.
3557 * gnulib/import/wchar.in.h: Update.
3558 * gnulib/import/wctype.in.h: Update.
3559 * gnulib/import/xalloc-oversized.h: Update.
3560 * gnulib/update-gnulib.sh (GNULIB_COMMIT_SHA1): Set to
3561 "53e2c179f26a890fa6685af4b6c1397ee370433b".
3562
3563 2018-09-10 Simon Marchi <simon.marchi@ericsson.com>
3564
3565 * record-btrace.c (get_thread_current_frame): Remove
3566 old_inferior_ptid.
3567
3568 2018-09-10 Jerome Guitton <guitton@adacore.com>
3569
3570 * ada-lang.c (ada_value_struct_elt): Call ada_to_fixed_type
3571 with check_tag to 1 if and only if the type is tagged and the
3572 component being searched cannot been found in the current
3573 view. Otherwise, always call ada_to_fixed_type with
3574 check_tag to 0.
3575
3576 2018-09-10 Xavier Roirand <roirand@adacore.com>
3577
3578 * ada-lang.c (ada_is_access_to_unconstrained_array): Remove static
3579 declaration.
3580 * ada-lang.h: add ada_is_access_to_unconstrained_array prototype.
3581 * ada-varobj.c (ada_varobj_get_number_of_children,
3582 ada_varobj_describe_child, ada_value_is_changeable_p): Cleanup code.
3583
3584 2018-09-10 Xavier Roirand <roirand@adacore.com>
3585
3586 * ada-valprint.c (ada_value_print): Use type instead of
3587 enclosing type.
3588
3589 2018-09-10 Xavier Roirand <roirand@adacore.com>
3590
3591 * ada-lang.c (ada_value_subscript): Handle case when parameter is
3592 an array of access to unconstrained array.
3593
3594 2018-09-10 Xavier Roirand <roirand@adacore.com>
3595
3596 * ada-lang.c (ada_is_access_to_unconstrained_array): New function.
3597 (ada_check_typedef): Use it.
3598
3599 2018-09-10 Xavier Roirand <roirand@adacore.com>
3600
3601 * ada-varobj.c (ada_varobj_describe_struct_child)
3602 (ada_varobj_describe_child): Handle union case like struct one.
3603
3604 2018-09-10 Tom Tromey <tom@tromey.com>
3605
3606 PR python/18380:
3607 * python/python.c (_initialize_python): Make example in "python"
3608 help work in Python 3.
3609
3610 2018-09-10 Eli Zaretskii <eliz@gnu.org>
3611
3612 * Makefile.in (transformed_name): Use INSTALL_SCRIPT instead of
3613 INSTALL_PROGRAM to install gdb-add-index.sh. Don't append
3614 $(EXEEXT) to the script, as it is not a program.
3615
3616 2018-09-09 Simon Marchi <simon.marchi@ericsson.com>
3617
3618 * python/py-prettyprint.c (pretty_print_one_value): Return
3619 gdbpy_ref<>.
3620 (print_string_repr): Adjust.
3621 (apply_varobj_pretty_printer): Return gdbpy_ref<>.
3622 * python/python-internal.h (apply_varobj_pretty_printer): Return
3623 gdbpy_ref<>.
3624 * varobj.c (varobj_value_get_print_value): Adjust.
3625
3626 2018-09-08 Tom Tromey <tom@tromey.com>
3627
3628 PR python/16047:
3629 * python/py-prettyprint.c (pretty_print_one_value): Check for
3630 to_string method.
3631
3632 2018-09-08 Joel Brobecker <brobecker@adacore.com>
3633
3634 * ada-lang.c (resolve_subexp): Pass correct OPLEN in call to
3635 replace_operator_with_call.
3636
3637 2018-09-08 Joel Brobecker <brobecker@adacore.com>
3638
3639 * ada-lang.c (ada_value_cast): Remove unnecessary parentheses.
3640
3641 2018-09-08 Joel Brobecker <brobecker@adacore.com>
3642
3643 * ada-typeprint.c (print_range): Print the bounds using TYPE
3644 rather than its TYPE_TARGET_TYPE.
3645
3646 2018-09-08 Joel Brobecker <brobecker@adacore.com>
3647
3648 * ada-lang.c (ada_to_fixed_value): Minor reformatting in
3649 call to ada_to_fixed_value_create.
3650
3651 2018-09-08 Jerome Guitton <guitton@adacore.com>
3652
3653 * ada-lang.c (ada_decode): strip dot prefix in symbol name.
3654
3655 2018-09-08 Joel Brobecker <brobecker@adacore.com>
3656
3657 * ada-lang.c (ada_exception_sal): Replace gdb_assert calls
3658 by calls to error.
3659
3660 2018-09-08 Joel Brobecker <brobecker@adacore.com>
3661
3662 * ada-lang.c (ada_unhandled_exception_name_addr_from_raise):
3663 Move update of loop variable "fi".
3664
3665 2018-09-08 Joel Brobecker <brobecker@adacore.com>
3666
3667 * ada-lang.c (value_assign_to_component): In the case of
3668 big-endian targets, extract the bits of the given VAL
3669 using an src_offset of zero if container is not a scalar.
3670
3671 2018-09-06 Simon Ser <contact@emersion.fr>
3672
3673 PR gdb/23105
3674 * fbsd-nat.c (fbsd_nat_target::xfer_partial): Add support for
3675 TARGET_OBJECT_FREEBSD_VMMAP and TARGET_OBJECT_FREEBSD_PS_STRINGS.
3676 * fbsd-tdep.c (fbsd_make_note_desc): New.
3677 (fbsd_make_corefile_notes): Write NT_PROCSTAT_AUXV,
3678 NT_PROCSTAT_VMMAP and NT_PROCSTAT_PS_STRINGS notes.
3679 * target.h (enum target_object) Add FreeBSD-specific
3680 TARGET_OBJECT_FREEBSD_VMMAP and TARGET_OBJECT_FREEBSD_PS_STRINGS.
3681
3682 2018-09-06 Simon Marchi <simon.marchi@ericsson.com>
3683
3684 * compile/compile-c.h (generate_c_for_variable_locations):
3685 Change reference to pointer.
3686 * compile/compile-c-support.c (compile_program) <compute>:
3687 Likewise.
3688 * compile/compile-c-symbols.c (generate_vla_size): Likewise.
3689 (generate_c_for_for_one_variable): Likewise
3690 (generate_c_for_variable_locations): Likewise
3691 * compile/compile-c-types.c (compile_c_instance::convert_type):
3692 Likewise
3693 * compile/compile-cplus-symbols.c (convert_one_symbol):
3694 std::move the scope passed to enter_scope.
3695 * compile/compile-cplus-types.c
3696 (compile_cplus_instance::enter_scope): Make parameter
3697 rvalue-reference.
3698 (compile_cplus_instance::new_scope): Change reference to
3699 pointer.
3700 (compile_cplus_instance::convert_type): Likewise
3701 (compile_cplus_convert_typedef): std::move the scope passed to
3702 enter_scope.
3703 (compile_cplus_convert_struct_or_union): Likewise.
3704 (compile_cplus_convert_enum): Likewise.
3705 (compile_cplus_convert_namespace): Likewise.
3706 * compile/compile-cplus.h (compile_cplus_instance)
3707 <enter_scope>: Make parameter rvalue-reference.
3708 * compile/compile-internal.h (compile_instance)
3709 <get_cached_type>: Likewise
3710 * compile/compile-loc2c.c (push): Likewise
3711 (pushf): Likewise
3712 (unary): Likewise
3713 (binary): Likewise
3714 (print_label): Likewise
3715 (pushf_register_address): Likewise
3716 (pushf_register): Likewise
3717 (do_compile_dwarf_expr_to_c): Likewise
3718 (compile_dwarf_expr_to_c): Likewise
3719 (compile_dwarf_bounds_to_c): Likewise
3720 * compile/compile.c (compile_instance::get_cached_type):
3721 Likewise
3722 * compile/compile.h (compile_dwarf_expr_to_c): Likewise.
3723 (compile_dwarf_bounds_to_c): Likewise
3724 * dwarf2loc.c (locexpr_generate_c_location): Likewise.
3725 (dwarf2_compile_property_to_c): Likewise
3726 * dwarf2loc.h (dwarf2_compile_property_to_c): Likewise
3727 * symtab.h (struct symbol_computed_ops) <generate_c_location>:
3728 Likewise
3729
3730 2018-09-06 Simon Marchi <simon.marchi@ericsson.com>
3731
3732 * tui/tui-data.h (struct tui_win_element) <highlight>: Remove.
3733 * tui/tui-data.c (init_content_element): Don't initialize it.
3734
3735 2018-09-06 Simon Marchi <simon.marchi@ericsson.com>
3736
3737 * tui/tui-data.h (struct tui_win_info)
3738 <detail::opaque>: Remove.
3739 * tui/tui-data.c (init_win_info): Remove assignment.
3740
3741 2018-09-05 Tom Tromey <tom@tromey.com>
3742
3743 * warning.m4 (AM_GDB_WARNINGS): Add -Wformat when testing
3744 -Wformat-nonliteral.
3745 * target-float.c (host_float_ops<T>::to_string)
3746 (host_float_ops<T>::from_string): Use
3747 DIAGNOSTIC_IGNORE_FORMAT_NONLITERAL.
3748 * configure: Rebuild.
3749
3750 2018-09-05 Simon Marchi <simon.marchi@ericsson.com>
3751
3752 * printcmd.c (printf_c_string): Use
3753 DIAGNOSTIC_IGNORE_FORMAT_NONLITERAL.
3754 (printf_wide_c_string, printf_pointer, ui_printf): Likewise.
3755
3756 2018-09-05 Tom Tromey <tom@tromey.com>
3757
3758 * cli/cli-cmds.c (shell_escape, edit_command): Remove cast.
3759
3760 2018-09-05 Tom de Vries <tdevries@suse.de>
3761
3762 * dwarf2loc.c (sect_variable_value): Call indirect_synthetic_pointer
3763 with resolve_abstract_p == true.
3764 (indirect_synthetic_pointer): Add resolve_abstract_p parameter,
3765 defaulting to false. Propagate resolve_abstract_p to
3766 dwarf2_fetch_die_loc_sect_off.
3767 * dwarf2loc.h (dwarf2_fetch_die_loc_sect_off): Add resolve_abstract_p
3768 parameter, defaulting to false.
3769 * dwarf2read.c (read_variable): Add variable to abstract_to_concrete.
3770 (dwarf2_fetch_die_loc_sect_off): Add and handle resolve_abstract_p
3771 parameter.
3772 * dwarf2read.h (struct die_info): Forward-declare.
3773 (die_info_ptr): New typedef.
3774 (struct dwarf2_per_objfile): Add abstract_to_concrete field.
3775
3776 2018-09-05 Joel Brobecker <brobecker@adacore.com>
3777
3778 GDB 8.2 released.
3779
3780 2018-09-04 Sergio Durigan Junior <sergiodj@redhat.com>
3781 Pedro Alves <palves@redhat.com>
3782
3783 * gnulib/Makefile.in (aclocal_m4_deps): Move to
3784 "aclocal-m4-deps.mk". Include file here.
3785 $(srcdir)/aclocal.m4: Add "configure.ac".
3786 * gnulib/aclocal-m4-deps.mk: New file.
3787 * gnulib/update-gnulib.sh: Automatically update
3788 "aclocal-m4-deps.mk".
3789
3790 2018-09-04 Tom Tromey <tom@tromey.com>
3791
3792 * configure: Rebuild.
3793 * configure.ac: Remove multi-ice code.
3794
3795 2018-09-04 Tom Tromey <tom@tromey.com>
3796
3797 * Makefile.in (GDB_WARN_CFLAGS_NO_DEFS): Remove.
3798 (ada-exp.o): Update.
3799
3800 2018-09-04 Tom Tromey <tom@tromey.com>
3801
3802 * Makefile.in (printcmd.o, target-float.o): Remove.
3803 (GDB_WARN_CFLAGS_NO_FORMAT): Remove.
3804
3805 2018-09-04 Tom Tromey <tom@tromey.com>
3806
3807 * gnulib/Makefile.in: Remove obsolete comment.
3808 * Makefile.in: Remove obsolete comment.
3809
3810 2018-09-04 Andrew Burgess <andrew.burgess@embecosm.com>
3811
3812 * riscv-tdep.c (riscv_frame_cache): Fix ARI warning, don't end a
3813 line with '+'.
3814
3815 2018-09-03 Andrew Burgess <andrew.burgess@embecosm.com>
3816
3817 * riscv-tdep.c: Add 'prologue-value.h' include.
3818 (struct riscv_unwind_cache): New struct.
3819 (riscv_debug_unwinder): New global.
3820 (riscv_scan_prologue): Update arguments, capture register details
3821 from prologue scan.
3822 (riscv_skip_prologue): Reformat arguments line, move end of
3823 prologue calculation into riscv_scan_prologue.
3824 (riscv_frame_cache): Update return type, create
3825 riscv_unwind_cache, scan the prologue, and fill in remaining cache
3826 details.
3827 (riscv_frame_this_id): Use frame id computed in riscv_frame_cache.
3828 (riscv_frame_prev_register): Use the trad_frame within the
3829 riscv_unwind_cache.
3830 (_initialize_riscv_tdep): Add 'set/show debug riscv unwinder'
3831 flag.
3832
3833 2018-09-03 Andrew Burgess <andrew.burgess@embecosm.com>
3834
3835 * trad-frame.h (trad_frame_set_realreg): Declare.
3836 (trad_frame_set_addr): Declare.
3837 * trad-frame.c (trad_frame_set_realreg): Define new function.
3838 (trad_frame_set_addr): Define new function.
3839 (trad_frame_set_reg_realreg): Use new function.
3840 (trad_frame_set_reg_addr): Use new function.
3841
3842 2018-09-01 Keith Seitz <keiths@redhat.com>
3843
3844 * compile/compile-cplus-types.c (compile_cplus_debug_output_1): Use
3845 pulongest instead of "%lld".
3846 * compile/compile-cplus-symbols.c (gcc_cplus_convert_symbol): Remove
3847 ATTRIBUTE_UNUSED.
3848
3849 2018-08-31 Tom Tromey <tom@tromey.com>
3850
3851 * dwarf2read.c (dwarf2_add_field): Set the TYPE_LENGTH of the
3852 variant part type.
3853
3854 2018-08-31 Pedro Alves <palves@redhat.com>
3855
3856 * gdbarch.h: Regenerate.
3857
3858 2018-08-31 Pedro Alves <palves@redhat.com>
3859
3860 * gdbarch.sh (have_nonsteppable_watchpoint): Add comment.
3861 * target.h (Hardware watchpoint interfaces): Describe
3862 continuable/steppable/non-steppable watchpoints.
3863 * gdbarch.h, gdbarch.c: Regenerate.
3864
3865 2018-08-31 Pedro Alves <palves@redhat.com>
3866
3867 * nto-procfs.c (nto_procfs_target::have_continuable_watchpoint):
3868 Delete.
3869 * s390-linux-nat.c
3870 (s390_linux_nat_target::have_continuable_watchpoint): Delete.
3871 * target.h (target_ops::have_continuable_watchpoint): Delete.
3872 (target_have_continuable_watchpoint): Delete.
3873 * x86-nat.h (x86_nat_target::have_continuable_watchpoint): Delete.
3874 * target-delegates.c: Regenerate.
3875
3876 2018-08-31 Sergio Durigan Junior <sergiodj@redhat.com>
3877
3878 * gnulib/Makefile.in (aclocal_m4_deps): Update according to
3879 the files present in "gnulib/import/m4/".
3880
3881 2018-08-30 Andrew Burgess <andrew.burgess@embecosm.com>
3882
3883 * riscv-tdep.c (riscv_insn::decode): Decode c.addi4spn, c.sd,
3884 c.sw, c.swsp, and c.sdsp.
3885
3886 2018-08-30 Andrew Burgess <andrew.burgess@embecosm.com>
3887
3888 * riscv-tdep.c (struct riscv_inferior_data): Delete.
3889 (riscv_read_misa_reg): Don't cache value read into inferior data.
3890 (riscv_new_inferior_data): Delete.
3891 (riscv_inferior_data_cleanup): Delete.
3892 (riscv_inferior_data): Delete.
3893 (riscv_invalidate_inferior_data): Delete.
3894 (_initialize_riscv_tdep): Remove initialisation of inferior data.
3895
3896 2018-08-30 Simon Marchi <simon.marchi@ericsson.com>
3897
3898 * compile/compile-cplus-types.c
3899 (compile_cplus_instance::leave_scope): Take the address of scope
3900 object.
3901 (compile_cplus_instance::convert_qualified_base): Compare quals
3902 to 0.
3903
3904 2018-08-30 Keith Seitz <keiths@redhat.com>
3905
3906 * compile/compile-cplus-types.c (compile_cplus_instance::enter_scope):
3907 Use "%s" and host_address_to_string instead of "%p" in printf.
3908
3909 2018-08-29 Keith Seitz <keiths@redhat.com>
3910
3911 * Makefile.in (SUBDIR_GCC_COMPILE_SRCS): Add compile-cplus-symbols.c
3912 and compile-cplus-types.c.
3913 (HFILES_NO_SRCDIR): Add gcc-cp-plugin.h.
3914 * c-lang.c (cplus_language_defn): Set C++ compile functions.
3915 * c-lang.h (cplus_get_compile_context, cplus_compute_program):
3916 Declare.
3917 * compile/compile-c-support.c: Include compile-cplus.h.
3918 (load_libcompile): Templatize.
3919 (get_compile_context): "New" function.
3920 (c_get_compile_context): Use get_compile_context.
3921 (cplus_get_compile_context): New function.
3922 (cplus_push_user_expression, cplus_pop_user_expression)
3923 (cplus_add_code_header, cplus_add_input, cplus_compile_program)
3924 (cplus_compute_program): Define new structs/functions.
3925 * compile/compile-cplus-symmbols.c: New file.
3926 * compile/compile-cplus-types.c: New file.
3927 * compile/compile-cplus.h: New file.
3928 * compile/compile-internal.h (debug_compile_oracle, GCC_TYPE_NONE):
3929 Declare.
3930 * compile/compile-object-load.c (get_out_value_type): Use
3931 strncmp_iw when comparing symbol names.
3932 (compile_object_load): Add mst_bss and mst_data.
3933 * compile/compile.c (_initialize_compile): Remove
3934 -Wno-implicit-function-declaration from `compile_args'.
3935 * compile/gcc-cp-plugin.h: New file.
3936 * NEWS: Mention C++ compile support and new debug options.
3937
3938 2018-08-29 Keith Seitz <keiths@redhat.com>
3939
3940 * linespec.c (collect_info::add_symbol): Make virtual.
3941 (struct symbol_searcher_collect_info): New struct.
3942 (symbol_searcher::find_all_symbols): New method.
3943 * symtab.h (class symbol_searcher): New class.
3944
3945 2018-08-29 Keith Seitz <keiths@redhat.com>
3946
3947 * linespec.c (struct linespec) <function_symbols, label_symbols>:
3948 Change to vector of block_symbol. Update all users.
3949 (struct collect_info) <symbols>: Likewise.
3950 (collect_info::add_symbol): Take block_symbol as argument.
3951 Update all callers.
3952 (decode_compound_collector) <m_symbols>: Change type to vector
3953 of block_symbol. Update all users.
3954 (decode_compound_collector::operator ()): Change parameter type
3955 to block_symbol.
3956 (find_method, find_function_symbols, find_linespec_symbols)
3957 (find_label_symbols_in_block, find_label_symbols): Change symbol
3958 vectors to block_symbol vectors.
3959 * symtab.h (symbol_found_callback_ftype): Change parameter type to
3960 block_symbol.
3961
3962 2018-08-29 Keith Seitz <keiths@redhat.com>
3963
3964 * linespec.c (symbolp): Remove typedef and VEC definitions.
3965 (bound_minimal_symbol_d): Likewise.
3966
3967 2018-08-29 Keith Seitz <keiths@redhat.com>
3968
3969 * linespec.c (decode_compound_collector::decode_compound_collector):
3970 Remove initialization for `m_symtabs'.
3971 (decode_compound_collector::release_symbols): Change return type
3972 to std::vector. Update all callers.
3973 (class decode_compound_collector) <m_symbols>: Change type to
3974 std::vector.
3975 (lookup_prefix_sym): Change return type to std::vector. Update all
3976 callers.
3977 (compare_symbols): Remove.
3978 (std_compare_symbols): Rename to `compare_symbols'.
3979 (find_method): Change `sym_classes' parameter to std::vector.
3980 Update all callers. Use std::sort to sort sym_classes.
3981 (find_linespec_symbols): Remove cleanup.
3982
3983 2018-08-29 Keith Seitz <keiths@redhat.com>
3984
3985 * linespec.c (struct linespec) <minimal_symbols>: Change type to
3986 std::vector. Update all users.
3987 (convert_linespec_to_sals): Use std::sort to sort minimal symbols.
3988 (struct collect_info) <minimal_symbols>: Likewise.
3989 (compare_msymbols): Return bool. Change parameters to const
3990 bound_minimal_symbol references.
3991 (find_method, find_function_symbols, find_linespec_symbols): Change
3992 `minsyms' parameter to std::vector. Update all callers.
3993
3994 2018-08-29 Keith Seitz <keiths@redhat.com>
3995
3996 * linespec.c (struct linespec) <label_symbols>: Change type to
3997 std::vector. Update all users.
3998 (find_label_symbols_in_block): Change `result' parameter to
3999 std::vector. Update all callers.
4000 (find_label_symbols): Return std::vector. Update all callers.
4001
4002 2018-08-29 Keith Seitz <keiths@redhat.com>
4003
4004 * linespec.c (struct linespec) <function_symbols>: Change type to
4005 std::vector. Update all users.
4006 (struct collect_info) <function_symbols>: Likewise.
4007 (convert_linespec_to_sals): Use std::sort to sort function_symbols.
4008 (std_compare_symbols): New function.
4009 (find_method, find_function_symbols, find_linespec_symbols)
4010 (find_label_symbols_in_block): Change `symbols' parameter to
4011 std::vector. Update all callers.
4012 (find_label_symbols): Likewise for `function_symbols' and
4013 `label_funcs_ret'.
4014
4015 2018-08-29 Keith Seitz <keiths@redhat.com>
4016
4017 * linespec.c (symtab_vector_up): Define.
4018 (struct linespec) <file_symtabs>: Change type to std::vector *.
4019 Update all uses.
4020 (struct collect_info) <file_symtabs>: Likewise.
4021 (collect_symtabs_from_filename): Return symtab_vector_up.
4022 Update all callers.
4023 (decode_objc): Remove cleanup.
4024 (symtab_collector::symtab_collector): Initialize `m_symtabs'.
4025 (symtab_collector::release_symtabs): Return symtab_vector_up.
4026 Update all callers.
4027 (class symtab_collector) <m_symtabs>: Change type to symtab_vector_up.
4028 Update all users.
4029 (collect_symtabs_from_filename, symtabs_from_filename): Return
4030 symtab_vector_up. Update all callers.
4031
4032 2018-08-29 Tom Tromey <tom@tromey.com>
4033
4034 * csky-tdep.c (csky_analyze_prologue): Use
4035 core_addr_to_string_nz.
4036
4037 2018-08-29 Tom Tromey <tom@tromey.com>
4038
4039 * windows-nat.c (struct xlate_exception) <them>: Change type to
4040 DWORD.
4041 (xlate): Fix formatting. Remove last entry.
4042 (struct xlate_exception, xlate): Comment out.
4043 (windows_nat_target::resume): Use ranged for.
4044
4045 2018-08-29 Jim Wilson <jimw@sifive.com>
4046
4047 * riscv-linux-nat.c: Include elf/common.h instead of elf.h.
4048 (riscv_linux_nat_target::fetch_registers): Use NT_FPREGSET instead
4049 of NT_PRFPREG.
4050 (riscv_linux_nat_target::store_registers): Likewise.
4051
4052 2018-08-29 Sergio Durigan Junior <sergiodj@redhat.com>
4053
4054 PR gdb/23555
4055 PR gdb/23558
4056 * gnulib/aclocal.m4: Regenerate.
4057 * gnulib/config.in: Regenerate.
4058 * gnulib/configure: Regenerate.
4059 * gnulib/import/Makefile.am: Update.
4060 * gnulib/import/Makefile.in: Update.
4061 * gnulib/import/extra/snippet/_Noreturn.h: Rename to...
4062 * gnulib/import/_Noreturn.h: ... this.
4063 * gnulib/import/alloca.in.h: Update.
4064 * gnulib/import/extra/snippet/arg-nonnull.h: Rename to...
4065 * gnulib/import/arg-nonnull.h: ... this.
4066 * gnulib/import/assure.h: Update.
4067 * gnulib/import/at-func.c: Update.
4068 * gnulib/import/basename-lgpl.c: Update.
4069 * gnulib/import/extra/snippet/c++defs.h: Rename to...
4070 * gnulib/import/c++defs.h: ... this.
4071 * gnulib/import/canonicalize-lgpl.c: Update.
4072 * gnulib/import/cdefs.h: Update.
4073 * gnulib/import/chdir-long.c: Update.
4074 * gnulib/import/chdir-long.h: Update.
4075 * gnulib/import/cloexec.c: Update.
4076 * gnulib/import/cloexec.h: Update.
4077 * gnulib/import/close.c: Update.
4078 * gnulib/import/closedir.c: Update.
4079 * gnulib/import/config.charset: Update.
4080 * gnulib/import/dirent-private.h: Update.
4081 * gnulib/import/dirent.in.h: Update.
4082 * gnulib/import/dirfd.c: Update.
4083 * gnulib/import/dirname-lgpl.c: Update.
4084 * gnulib/import/dirname.h: Update.
4085 * gnulib/import/dosname.h: Update.
4086 * gnulib/import/dup-safer-flag.c: Update.
4087 * gnulib/import/dup-safer.c: Update.
4088 * gnulib/import/dup.c: Update.
4089 * gnulib/import/dup2.c: Update.
4090 * gnulib/import/errno.in.h: Update.
4091 * gnulib/import/error.c: Update.
4092 * gnulib/import/error.h: Update.
4093 * gnulib/import/exitfail.c: Update.
4094 * gnulib/import/exitfail.h: Update.
4095 * gnulib/import/extra/update-copyright: Update.
4096 * gnulib/import/fchdir.c: Update.
4097 * gnulib/import/fcntl.c: Update.
4098 * gnulib/import/fcntl.in.h: Update.
4099 * gnulib/import/fd-hook.c: Update.
4100 * gnulib/import/fd-hook.h: Update.
4101 * gnulib/import/fd-safer-flag.c: Update.
4102 * gnulib/import/fd-safer.c: Update.
4103 * gnulib/import/fdopendir.c: Update.
4104 * gnulib/import/filename.h: Update.
4105 * gnulib/import/filenamecat-lgpl.c: Update.
4106 * gnulib/import/filenamecat.h: Update.
4107 * gnulib/import/flexmember.h: Update.
4108 * gnulib/import/float+.h: Update.
4109 * gnulib/import/float.c: Update.
4110 * gnulib/import/float.in.h: Update.
4111 * gnulib/import/fnmatch.c: Update.
4112 * gnulib/import/fnmatch.in.h: Update.
4113 * gnulib/import/fnmatch_loop.c: Update.
4114 * gnulib/import/fpucw.h: Update.
4115 * gnulib/import/frexp.c: Update.
4116 * gnulib/import/frexpl.c: Update.
4117 * gnulib/import/fstat.c: Update.
4118 * gnulib/import/fstatat.c: Update.
4119 * gnulib/import/getcwd-lgpl.c: Update.
4120 * gnulib/import/getcwd.c: Update.
4121 * gnulib/import/getdtablesize.c: Update.
4122 * gnulib/import/getlogin_r.c: Update.
4123 * gnulib/import/getprogname.c: Update.
4124 * gnulib/import/getprogname.h: Update.
4125 * gnulib/import/gettext.h: Update.
4126 * gnulib/import/gettimeofday.c: Update.
4127 * gnulib/import/glob-libc.h: Update.
4128 * gnulib/import/glob.c: Update.
4129 * gnulib/import/glob.in.h: Update.
4130 * gnulib/import/glob_internal.h: Update.
4131 * gnulib/import/glob_pattern_p.c: Update.
4132 * gnulib/import/globfree.c: Update.
4133 * gnulib/import/hard-locale.c: Update.
4134 * gnulib/import/hard-locale.h: Update.
4135 * gnulib/import/intprops.h: Update.
4136 * gnulib/import/inttypes.in.h: Update.
4137 * gnulib/import/isnan.c: Update.
4138 * gnulib/import/isnand-nolibm.h: Update.
4139 * gnulib/import/isnand.c: Update.
4140 * gnulib/import/isnanl-nolibm.h: Update.
4141 * gnulib/import/isnanl.c: Update.
4142 * gnulib/import/itold.c: Update.
4143 * gnulib/import/libc-config.h: Update.
4144 * gnulib/import/limits.in.h: Update.
4145 * gnulib/import/localcharset.c: Update.
4146 * gnulib/import/localcharset.h: Update.
4147 * gnulib/import/localtime-buffer.c: Update.
4148 * gnulib/import/localtime-buffer.h: Update.
4149 * gnulib/import/lstat.c: Update.
4150 * gnulib/import/m4/00gnulib.m4: Update.
4151 * gnulib/import/m4/__inline.m4: Update.
4152 * gnulib/import/m4/absolute-header.m4: Update.
4153 * gnulib/import/m4/alloca.m4: Update.
4154 * gnulib/import/m4/builtin-expect.m4: Update.
4155 * gnulib/import/m4/canonicalize.m4: Update.
4156 * gnulib/import/m4/chdir-long.m4: Update.
4157 * gnulib/import/m4/close.m4: Update.
4158 * gnulib/import/m4/closedir.m4: Update.
4159 * gnulib/import/m4/configmake.m4: Update.
4160 * gnulib/import/m4/d-ino.m4: Update.
4161 * gnulib/import/m4/d-type.m4: Update.
4162 * gnulib/import/m4/dirent_h.m4: Update.
4163 * gnulib/import/m4/dirfd.m4: Update.
4164 * gnulib/import/m4/dirname.m4: Update.
4165 * gnulib/import/m4/double-slash-root.m4: Update.
4166 * gnulib/import/m4/dup.m4: Update.
4167 * gnulib/import/m4/dup2.m4: Update.
4168 * gnulib/import/m4/eealloc.m4: Update.
4169 * gnulib/import/m4/environ.m4: Update.
4170 * gnulib/import/m4/errno_h.m4: Update.
4171 * gnulib/import/m4/error.m4: Update.
4172 * gnulib/import/m4/exponentd.m4: Update.
4173 * gnulib/import/m4/exponentl.m4: Update.
4174 * gnulib/import/m4/extensions.m4: Update.
4175 * gnulib/import/m4/extern-inline.m4: Update.
4176 * gnulib/import/m4/fchdir.m4: Update.
4177 * gnulib/import/m4/fcntl-o.m4: Update.
4178 * gnulib/import/m4/fcntl.m4: Update.
4179 * gnulib/import/m4/fcntl_h.m4: Update.
4180 * gnulib/import/m4/fdopendir.m4: Update.
4181 * gnulib/import/m4/filenamecat.m4: Update.
4182 * gnulib/import/m4/flexmember.m4: Update.
4183 * gnulib/import/m4/float_h.m4: Update.
4184 * gnulib/import/m4/fnmatch.m4: Update.
4185 * gnulib/import/m4/fnmatch_h.m4: Update.
4186 * gnulib/import/m4/fpieee.m4: Update.
4187 * gnulib/import/m4/frexp.m4: Update.
4188 * gnulib/import/m4/frexpl.m4: Update.
4189 * gnulib/import/m4/fstat.m4: Update.
4190 * gnulib/import/m4/fstatat.m4: Update.
4191 * gnulib/import/m4/getcwd-abort-bug.m4: Update.
4192 * gnulib/import/m4/getcwd-path-max.m4: Update.
4193 * gnulib/import/m4/getcwd.m4: Update.
4194 * gnulib/import/m4/getdtablesize.m4: Update.
4195 * gnulib/import/m4/getlogin.m4: Update.
4196 * gnulib/import/m4/getlogin_r.m4: Update.
4197 * gnulib/import/m4/getpagesize.m4: Update.
4198 * gnulib/import/m4/getprogname.m4: Update.
4199 * gnulib/import/m4/gettimeofday.m4: Update.
4200 * gnulib/import/m4/glibc21.m4: Update.
4201 * gnulib/import/m4/glob.m4: Update.
4202 * gnulib/import/m4/glob_h.m4: Update.
4203 * gnulib/import/m4/gnulib-cache.m4: Update.
4204 * gnulib/import/m4/gnulib-common.m4: Update.
4205 * gnulib/import/m4/gnulib-comp.m4: Update.
4206 * gnulib/import/m4/gnulib-tool.m4: Update.
4207 * gnulib/import/m4/hard-locale.m4: Update.
4208 * gnulib/import/m4/include_next.m4: Update.
4209 * gnulib/import/m4/inttypes-pri.m4: Update.
4210 * gnulib/import/m4/inttypes.m4: Update.
4211 * gnulib/import/m4/isnand.m4: Update.
4212 * gnulib/import/m4/isnanl.m4: Update.
4213 * gnulib/import/m4/largefile.m4: Update.
4214 * gnulib/import/m4/limits-h.m4: Update.
4215 * gnulib/import/m4/localcharset.m4: Update.
4216 * gnulib/import/m4/locale-fr.m4: Update.
4217 * gnulib/import/m4/locale-ja.m4: Update.
4218 * gnulib/import/m4/locale-zh.m4: Update.
4219 * gnulib/import/m4/localtime-buffer.m4: Update.
4220 * gnulib/import/m4/longlong.m4: Update.
4221 * gnulib/import/m4/lstat.m4: Update.
4222 * gnulib/import/m4/malloc.m4: Update.
4223 * gnulib/import/m4/malloca.m4: Update.
4224 * gnulib/import/m4/math_h.m4: Update.
4225 * gnulib/import/m4/mbrtowc.m4: Update.
4226 * gnulib/import/m4/mbsinit.m4: Update.
4227 * gnulib/import/m4/mbsrtowcs.m4: Update.
4228 * gnulib/import/m4/mbstate_t.m4: Update.
4229 * gnulib/import/m4/memchr.m4: Update.
4230 * gnulib/import/m4/memmem.m4: Update.
4231 * gnulib/import/m4/mempcpy.m4: Update.
4232 * gnulib/import/m4/memrchr.m4: Update.
4233 * gnulib/import/m4/mkdir.m4: Update.
4234 * gnulib/import/m4/mkstemp.m4: Update.
4235 * gnulib/import/m4/mmap-anon.m4: Update.
4236 * gnulib/import/m4/mode_t.m4: Update.
4237 * gnulib/import/m4/msvc-inval.m4: Update.
4238 * gnulib/import/m4/msvc-nothrow.m4: Update.
4239 * gnulib/import/m4/multiarch.m4: Update.
4240 * gnulib/import/m4/nocrash.m4: Update.
4241 * gnulib/import/m4/off_t.m4: Update.
4242 * gnulib/import/m4/onceonly.m4: Update.
4243 * gnulib/import/m4/open-cloexec.m4: Update.
4244 * gnulib/import/m4/open.m4: Update.
4245 * gnulib/import/m4/openat.m4: Update.
4246 * gnulib/import/m4/opendir.m4: Update.
4247 * gnulib/import/m4/pathmax.m4: Update.
4248 * gnulib/import/m4/rawmemchr.m4: Update.
4249 * gnulib/import/m4/readdir.m4: Update.
4250 * gnulib/import/m4/readlink.m4: Update.
4251 * gnulib/import/m4/realloc.m4: Update.
4252 * gnulib/import/m4/rename.m4: Update.
4253 * gnulib/import/m4/rewinddir.m4: Update.
4254 * gnulib/import/m4/rmdir.m4: Update.
4255 * gnulib/import/m4/save-cwd.m4: Update.
4256 * gnulib/import/m4/secure_getenv.m4: Update.
4257 * gnulib/import/m4/setenv.m4: Update.
4258 * gnulib/import/m4/signal_h.m4: Update.
4259 * gnulib/import/m4/ssize_t.m4: Update.
4260 * gnulib/import/m4/stat-time.m4: Update.
4261 * gnulib/import/m4/stat.m4: Update.
4262 * gnulib/import/m4/std-gnu11.m4: Update.
4263 * gnulib/import/m4/stdbool.m4: Update.
4264 * gnulib/import/m4/stddef_h.m4: Update.
4265 * gnulib/import/m4/stdint.m4: Update.
4266 * gnulib/import/m4/stdio_h.m4: Update.
4267 * gnulib/import/m4/stdlib_h.m4: Update.
4268 * gnulib/import/m4/strchrnul.m4: Update.
4269 * gnulib/import/m4/strdup.m4: Update.
4270 * gnulib/import/m4/strerror.m4: Update.
4271 * gnulib/import/m4/string_h.m4: Update.
4272 * gnulib/import/m4/strstr.m4: Update.
4273 * gnulib/import/m4/strtok_r.m4: Update.
4274 * gnulib/import/m4/sys_socket_h.m4: Update.
4275 * gnulib/import/m4/sys_stat_h.m4: Update.
4276 * gnulib/import/m4/sys_time_h.m4: Update.
4277 * gnulib/import/m4/sys_types_h.m4: Update.
4278 * gnulib/import/m4/tempname.m4: Update.
4279 * gnulib/import/m4/time_h.m4: Update.
4280 * gnulib/import/m4/unistd-safer.m4: Update.
4281 * gnulib/import/m4/unistd_h.m4: Update.
4282 * gnulib/import/m4/warn-on-use.m4: Update.
4283 * gnulib/import/m4/wchar_h.m4: Update.
4284 * gnulib/import/m4/wchar_t.m4: Update.
4285 * gnulib/import/m4/wctype_h.m4: Update.
4286 * gnulib/import/m4/wint_t.m4: Update.
4287 * gnulib/import/malloc.c: Update.
4288 * gnulib/import/malloc/scratch_buffer.h: Update.
4289 * gnulib/import/malloc/scratch_buffer_grow.c: Update.
4290 * gnulib/import/malloc/scratch_buffer_grow_preserve.c: Update.
4291 * gnulib/import/malloc/scratch_buffer_set_array_size.c: Update.
4292 * gnulib/import/malloca.c: Update.
4293 * gnulib/import/malloca.h: Update.
4294 * gnulib/import/malloca.valgrind: Update.
4295 * gnulib/import/math.in.h: Update.
4296 * gnulib/import/mbrtowc.c: Update.
4297 * gnulib/import/mbsinit.c: Update.
4298 * gnulib/import/mbsrtowcs-impl.h: Update.
4299 * gnulib/import/mbsrtowcs-state.c: Update.
4300 * gnulib/import/mbsrtowcs.c: Update.
4301 * gnulib/import/memchr.c: Update.
4302 * gnulib/import/memmem.c: Update.
4303 * gnulib/import/mempcpy.c: Update.
4304 * gnulib/import/memrchr.c: Update.
4305 * gnulib/import/mkdir.c: Update.
4306 * gnulib/import/mkstemp.c: Update.
4307 * gnulib/import/msvc-inval.c: Update.
4308 * gnulib/import/msvc-inval.h: Update.
4309 * gnulib/import/msvc-nothrow.c: Update.
4310 * gnulib/import/msvc-nothrow.h: Update.
4311 * gnulib/import/open.c: Update.
4312 * gnulib/import/openat-die.c: Update.
4313 * gnulib/import/openat-priv.h: Update.
4314 * gnulib/import/openat-proc.c: Update.
4315 * gnulib/import/openat.c: Update.
4316 * gnulib/import/openat.h: Update.
4317 * gnulib/import/opendir.c: Update.
4318 * gnulib/import/pathmax.h: Update.
4319 * gnulib/import/pipe-safer.c: Update.
4320 * gnulib/import/rawmemchr.c: Update.
4321 * gnulib/import/readdir.c: Update.
4322 * gnulib/import/readlink.c: Update.
4323 * gnulib/import/realloc.c: Update.
4324 * gnulib/import/ref-add.sin: Update.
4325 * gnulib/import/ref-del.sin: Update.
4326 * gnulib/import/rename.c: Update.
4327 * gnulib/import/rewinddir.c: Update.
4328 * gnulib/import/rmdir.c: Update.
4329 * gnulib/import/same-inode.h: Update.
4330 * gnulib/import/save-cwd.c: Update.
4331 * gnulib/import/save-cwd.h: Update.
4332 * gnulib/import/scratch_buffer.h: Update.
4333 * gnulib/import/secure_getenv.c: Update.
4334 * gnulib/import/setenv.c: Update.
4335 * gnulib/import/signal.in.h: Update.
4336 * gnulib/import/stat-time.c: Update.
4337 * gnulib/import/stat-time.h: Update.
4338 * gnulib/import/stat-w32.c: Update.
4339 * gnulib/import/stat-w32.h: Update.
4340 * gnulib/import/stat.c: Update.
4341 * gnulib/import/stdbool.in.h: Update.
4342 * gnulib/import/stddef.in.h: Update.
4343 * gnulib/import/stdint.in.h: Update.
4344 * gnulib/import/stdio.in.h: Update.
4345 * gnulib/import/stdlib.in.h: Update.
4346 * gnulib/import/str-two-way.h: Update.
4347 * gnulib/import/strchrnul.c: Update.
4348 * gnulib/import/strdup.c: Update.
4349 * gnulib/import/streq.h: Update.
4350 * gnulib/import/strerror-override.c: Update.
4351 * gnulib/import/strerror-override.h: Update.
4352 * gnulib/import/strerror.c: Update.
4353 * gnulib/import/string.in.h: Update.
4354 * gnulib/import/stripslash.c: Update.
4355 * gnulib/import/strnlen1.c: Update.
4356 * gnulib/import/strnlen1.h: Update.
4357 * gnulib/import/strstr.c: Update.
4358 * gnulib/import/strtok_r.c: Update.
4359 * gnulib/import/sys_stat.in.h: Update.
4360 * gnulib/import/sys_time.in.h: Update.
4361 * gnulib/import/sys_types.in.h: Update.
4362 * gnulib/import/tempname.c: Update.
4363 * gnulib/import/tempname.h: Update.
4364 * gnulib/import/time.in.h: Update.
4365 * gnulib/import/unistd--.h: Update.
4366 * gnulib/import/unistd-safer.h: Update.
4367 * gnulib/import/unistd.in.h: Update.
4368 * gnulib/import/unsetenv.c: Update.
4369 * gnulib/import/verify.h: Update.
4370 * gnulib/import/extra/snippet/warn-on-use.h: Update.
4371 * gnulib/import/wchar.in.h: Update.
4372 * gnulib/import/wctype.in.h: Update.
4373 * gnulib/import/xalloc-oversized.h: Update.
4374 * gnulib/update-gnulib.sh (GNULIB_COMMIT_SHA1): Set to
4375 "53e2c179f26a890fa6685af4b6c1397ee370433b".
4376
4377 2018-08-16 Gary Benson <gbenson@redhat.com>
4378
4379 PR gdb/13000:
4380 * gdb/main.c (captured_main_1): Exit with nonzero status
4381 in batch mode if the last command to be executed failed.
4382 * NEWS: Mention the above.
4383
4384 2018-08-29 Simon Marchi <simon.marchi@ericsson.com>
4385
4386 * csky-tdep.c (csky_memory_insert_breakpoint): Remove newline at
4387 end of warning message.
4388
4389 2018-08-29 Alan Hayward <alan.hayward@arm.com>
4390
4391 PR gdb/22943:
4392 * aarch64-tdep.c (is_hfa_or_hva): Remove function.
4393 (aarch64_extract_return_value): Use
4394 aapcs_is_vfp_call_or_return_candidate.
4395 (aarch64_return_in_memory): Likewise.
4396 (aarch64_store_return_value): Likewise.
4397
4398 2018-08-29 Alan Hayward <alan.hayward@arm.com>
4399
4400 * aarch64-tdep.c
4401 (aapcs_is_vfp_call_or_return_candidate): Make static
4402 (pass_in_v_or_stack): Remove function.
4403 (pass_in_v_vfp_candidate): New function.
4404 (aarch64_push_dummy_call): Check for float register candidates.
4405
4406 2018-08-29 Alan Hayward <alan.hayward@arm.com>
4407
4408 * aarch64-tdep.c (HA_MAX_NUM_FLDS): New macro.
4409 (aapcs_is_vfp_call_or_return_candidate_1): New function.
4410 (aapcs_is_vfp_call_or_return_candidate): Likewise.
4411
4412 2018-08-28 Simon Marchi <simon.marchi@polymtl.ca>
4413
4414 PR build/23399
4415 * common/agent.c (IPA_SYM_STRUCT_NAME): Define.
4416 (struct ipa_sym_addresses): Rename to...
4417 (struct ipa_sym_addresses_common): ... this.
4418 * common/agent.h (IPA_SYM): Use IPA_SYM_STRUCT_NAME.
4419
4420 2018-08-28 Tom Tromey <tom@tromey.com>
4421
4422 * c-exp.y (struct token_and_value): Remove typedef and DEF_VEC.
4423 (token_fifo): Now a std::vector.
4424 (yylex, c_parse): Update.
4425 * d-exp.y (struct token_and_value): Remove typedef and DEF_VEC.
4426 (token_fifo): Now a std::vector.
4427 (yylex, d_parse): Update.
4428 * go-exp.y (struct token_and_value): Remove typedef and DEF_VEC.
4429 (token_fifo): Now a std::vector.
4430 (yylex, go_parse): Update.
4431
4432 2018-08-28 Simon Marchi <simon.marchi@ericsson.com>
4433
4434 * parser-defs.h (struct type_stack) <elements>: Change type to
4435 std::vector<union type_stack_elt>.
4436 <depth, size>: Remove.
4437 * parse.c (parse_exp_in_context_1): Adjust.
4438 (type_stack_reserve): Remove.
4439 (check_type_stack_depth): Remove.
4440 (insert_into_type_stack): Adjust to std::vector.
4441 (insert_type): Likewise.
4442 (push_type): Likewise.
4443 (push_type_int): Likewise.
4444 (insert_type_address_space): Likewise.
4445 (pop_type): Likewise.
4446 (pop_type_int): Likewise.
4447 (pop_typelist): Likewise.
4448 (pop_type_stack): Likewise.
4449 (append_type_stack): Likewise.
4450 (push_type_stack): Likewise.
4451 (get_type_stack): Likewise.
4452 (type_stack_cleanup): Likewise.
4453 (push_typelist): Likewise.
4454 (follow_types): Likewise.
4455 (_initialize_parse): Likewise.
4456
4457 2018-08-28 Hafiz Abid Qadeer <abidh@codesourcery.com>
4458
4459 * NEWS: Mention csky target.
4460
4461 2018-08-28 Jiangshuai Li <jiangshuai_li@c-sky.com>
4462 Hafiz Abid Qadeer <abidh@codesourcery.com>
4463 Don Breazeal <donb@codesourcery.com>
4464
4465 * csky-linux-tdep.c: New file.
4466 * csky-tdep.c: Likewise.
4467 * csky-tdep.h: Likewise.
4468 * Makefile.in (ALL_TARGET_OBS): Add csky-linux-tdep.o and
4469 csky-tdep.o.
4470 (HFILES_NO_SRCDIR): Add csky-tdep.h.
4471 (ALLDEPFILES): Add csky-linux-tdep.c and csky-tdep.c
4472 * configure.tgt: Add csky support.
4473
4474 2018-08-27 Jan Vrany <jan.vrany@fit.cvut.cz>
4475
4476 * python/py-framefilter.c (py_print_frame): Print frame architecture
4477 when printing on an MI output.
4478
4479 2018-08-27 Tom Tromey <tom@tromey.com>
4480
4481 PR build/23087:
4482 * configure: Rebuild.
4483 * warning.m4 (AM_GDB_WARNINGS): Remove -Wno-narrowing.
4484
4485 2018-08-27 Tom Tromey <tom@tromey.com>
4486
4487 * aarch64-linux-tdep.c
4488 (aarch64_linux_iterate_over_regset_sections) <sve_regmap>: Add
4489 casts to int.
4490
4491 2018-08-27 Tom Tromey <tom@tromey.com>
4492
4493 * ppc64-tdep.c (insn_d, insn_ds, insn_xfx): Add casts to
4494 unsigned.
4495 (ppc64_standard_linkage1, ppc64_standard_linkage2)
4496 (ppc64_standard_linkage3, ppc64_standard_linkage4)
4497 (ppc64_standard_linkage5, ppc64_standard_linkage6)
4498 (ppc64_standard_linkage7, ppc64_standard_linkage8): Add casts to
4499 unsigned.
4500
4501 2018-08-27 Tom Tromey <tom@tromey.com>
4502
4503 * xtensa-tdep.h (XTREG_END): Add cast to unsigned.
4504 (XTENSA_GDBARCH_TDEP_INSTANTIATE): Likewise.
4505
4506 2018-08-27 Tom Tromey <tom@tromey.com>
4507
4508 * tramp-frame.h (TRAMP_SENTINEL_INSN): Redefine.
4509 * tilegx-linux-tdep.c (tilegx_linux_rt_sigframe): Use
4510 ULONGEST_MAX.
4511 * tic6x-linux-tdep.c (tic6x_linux_rt_sigreturn_tramp_frame): Use
4512 ULONGEST_MAX.
4513 * sparc64-linux-tdep.c (sparc64_linux_rt_sigframe): Use
4514 ULONGEST_MAX.
4515 * sparc-linux-tdep.c (sparc32_linux_sigframe)
4516 (sparc32_linux_rt_sigframe): Use ULONGEST_MAX.
4517 * ppc-nbsd-tdep.c (ppcnbsd_sigtramp, ppcnbsd2_sigtramp): Use
4518 ULONGEST_MAX.
4519 * ppc-linux-tdep.c (ppc32_linux_sigaction_tramp_frame)
4520 (ppc64_linux_sigaction_tramp_frame)
4521 (ppc32_linux_sighandler_tramp_frame)
4522 (ppc64_linux_sighandler_tramp_frame): Use ULONGEST_MAX.
4523 * nios2-linux-tdep.c (nios2_r1_linux_rt_sigreturn_tramp_frame)
4524 (nios2_r2_linux_rt_sigreturn_tramp_frame): Use ULONGEST_MAX.
4525 * mn10300-linux-tdep.c (am33_linux_sigframe)
4526 (am33_linux_rt_sigframe): Use ULONGEST_MAX.
4527 * mips64-obsd-tdep.c (mips64obsd_sigframe): Use ULONGEST_MAX.
4528 * mips-linux-tdep.c (mips_linux_o32_sigframe)
4529 (mips_linux_o32_rt_sigframe, mips_linux_n32_rt_sigframe)
4530 (mips_linux_n64_rt_sigframe, micromips_linux_o32_sigframe)
4531 (micromips_linux_o32_rt_sigframe, micromips_linux_n32_rt_sigframe)
4532 (micromips_linux_n64_rt_sigframe): Use ULONGEST_MAX.
4533 * mips-fbsd-tdep.c (mips_fbsd_sigframe, mipsn32_fbsd_sigframe)
4534 (mips64_fbsd_sigframe): Use ULONGEST_MAX.
4535 * microblaze-linux-tdep.c
4536 (microblaze_linux_sighandler_tramp_frame): Use ULONGEST_MAX.
4537 * i386-nbsd-tdep.c (i386nbsd_sigtramp_sc16, i386nbsd_sigtramp_sc2)
4538 (i386nbsd_sigtramp_si2, i386nbsd_sigtramp_si31)
4539 (i386nbsd_sigtramp_si4): Use ULONGEST_MAX.
4540 * hppa-nbsd-tdep.c (hppanbsd_sigtramp_si4): Use ULONGEST_MAX.
4541 * common/common-types.h (ULONGEST_MAX): New define.
4542 (CORE_ADDR_MAX): Fix formatting.
4543 * bfin-linux-tdep.c (bfin_linux_sigframe): Use ULONGEST_MAX.
4544 * arm-obsd-tdep.c (armobsd_sigframe): Use ULONGEST_MAX.
4545 * arm-linux-tdep.c (arm_linux_sigreturn_tramp_frame)
4546 (arm_linux_rt_sigreturn_tramp_frame)
4547 (arm_eabi_linux_sigreturn_tramp_frame)
4548 (arm_eabi_linux_rt_sigreturn_tramp_frame)
4549 (thumb2_eabi_linux_sigreturn_tramp_frame)
4550 (thumb2_eabi_linux_rt_sigreturn_tramp_frame)
4551 (arm_linux_restart_syscall_tramp_frame)
4552 (arm_kernel_linux_restart_syscall_tramp_frame): Use ULONGEST_MAX.
4553 * arm-fbsd-tdep.c (arm_fbsd_sigframe): Use ULONGEST_MAX.
4554 * aarch64-linux-tdep.c (aarch64_linux_rt_sigframe): Use
4555 ULONGEST_MAX.
4556 * aarch64-fbsd-tdep.c (aarch64_fbsd_sigframe): Use ULONGEST_MAX.
4557
4558 2018-08-27 Tom Tromey <tom@tromey.com>
4559
4560 * rs6000-tdep.c (ppc_deal_with_atomic_sequence): Use
4561 CORE_ADDR_MAX.
4562 * mips-tdep.c (mips_deal_with_atomic_sequence)
4563 (micromips_deal_with_atomic_sequence): Use CORE_ADDR_MAX.
4564 * arch/arm-get-next-pcs.c (thumb_deal_with_atomic_sequence_raw)
4565 (arm_deal_with_atomic_sequence_raw): Use CORE_ADDR_MAX.
4566 * alpha-tdep.c (alpha_deal_with_atomic_sequence): Use
4567 CORE_ADDR_MAX.
4568 * aarch64-tdep.c (aarch64_software_single_step): Use
4569 CORE_ADDR_MAX.
4570
4571 2018-08-27 Tom Tromey <tom@tromey.com>
4572
4573 * linespec.c (complete_linespec_component): Add cast to "char".
4574 * completer.c (completion_tracker::build_completion_result): Add
4575 cast to "char".
4576
4577 2018-08-26 Simon Marchi <simon.marchi@polymtl.ca>
4578
4579 * solist.h (struct solist, struct target_so_ops): Fix
4580 indentation.
4581
4582 2018-08-26 Simon Marchi <simon.marchi@polymtl.ca>
4583
4584 * ada-tasks.c (ada_task_info_s): Remove typedef.
4585 (DEF_VEC_O(ada_task_info_s)): Remove.
4586 (struct ada_tasks_inferior_data): Initialize fields.
4587 <task_list>: Make an std::vector.
4588 (get_ada_tasks_inferior_data): Allocate with new.
4589 (ada_get_task_number): Adjust.
4590 (get_task_number_from_id): Likewise.
4591 (valid_task_id): Likewise.
4592 (ada_get_task_info_from_ptid): Likewise.
4593 (iterate_over_live_ada_tasks): Likewise.
4594 (add_ada_task): Likewise.
4595 (read_known_tasks): Likewise.
4596 (ada_build_task_list): Likewise.
4597 (print_ada_task_info): Likewise.
4598 (info_task): Likewise.
4599 (task_command_1): Likewise.
4600
4601 2018-08-26 Simon Marchi <simon.marchi@polymtl.ca>
4602
4603 * ada-lang.c (add_angle_brackets): Return std::string.
4604
4605 2018-08-25 Simon Marchi <simon.marchi@polymtl.ca>
4606
4607 * python/py-threadevent.c (py_get_event_thread): Initialize
4608 pythread.
4609
4610 2018-08-24 Pedro Alves <palves@redhat.com>
4611
4612 * python/py-bpevent.c (create_breakpoint_event_object): Use
4613 copy-initialization.
4614 * python/py-continueevent.c (emit_continue_event): Use
4615 copy-initialization.
4616 * python/py-exitedevent.c (create_exited_event_object): Return a
4617 gdbpy_ref<>.
4618 (emit_exited_event): Use copy-initialization.
4619 * python/py-inferior.c (python_new_inferior)
4620 (python_inferior_deleted, add_thread_object): Use
4621 copy-initialization.
4622 * python/py-infevents.c (create_inferior_call_event_object)
4623 (create_register_changed_event_object)
4624 (create_memory_changed_event_object): Return a gdbpy_ref<>.
4625 (emit_inferior_call_event, emit_memory_changed_event)
4626 (emit_register_changed_event): Use copy-initialization.
4627 * python/py-newobjfileevent.c (create_new_objfile_event_object):
4628 Return a gdbpy_ref<>.
4629 (emit_new_objfile_event): Use copy-initialization.
4630 (create_clear_objfiles_event_object): Return a gdbpy_ref<>.
4631 (emit_clear_objfiles_event): Use copy-initialization.
4632 * python/py-signalevent.c (create_signal_event_object): Use
4633 copy-initialization.
4634 * python/py-threadevent.c (create_thread_event_object): Use
4635 copy-initialization.
4636
4637 2018-08-24 Pedro Alves <palves@redhat.com>
4638 Simon Marchi <simon.marchi@ericsson.com>
4639
4640 PR gdb/23379
4641 * python/py-continueevent.c: Include "gdbthread.h".
4642 (create_continue_event_object): Add intro comment. Add 'ptid'
4643 parameter. Use it to find thread to pass to
4644 create_thread_event_object.
4645 (emit_continue_event): Pass PTID down to
4646 create_continue_event_object.
4647 * python/py-event.h (py_get_event_thread): Declare.
4648 (create_thread_event_object): Remove default from 'thread'
4649 parameter.
4650 * python/py-stopevent.c (create_stop_event_object): Use
4651 py_get_event_thread.
4652 * python/py-threadevent.c (get_event_thread): Rename to ...
4653 (py_get_event_thread): ... this, make extern, add 'ptid' parameter
4654 and use it to find the thread.
4655 (create_thread_event_object): Assert that THREAD isn't null.
4656 Don't find the event thread here.
4657
4658 2018-08-23 Kevin Buettner <kevinb@redhat.com>
4659
4660 * block.h (blockrange, blockranges): New struct declarations.
4661 (struct block): Add new field named `ranges'.
4662 (BLOCK_RANGES, BLOCK_NRANGES, BLOCK_RANGE, BLOCK_CONTIGUOUS_P)
4663 (BLOCK_RANGE_START, BLOCK_RANGE_END, BLOCK_ENTRY_PC): New
4664 macros for accessing ranges in struct block.
4665 (make_blockranges): New declaration.
4666 block.c (make_blockranges): New function.
4667 * dwarf2read.c (dwarf2_record_block_ranges): Fill in BLOCK_RANGES
4668 for block.
4669 * symtab.h (find_pc_partial_function): Add new parameter `block'.
4670 * blockframe.c (cache_pc_function_block): New static global.
4671 (clear_pc_function_cache): Clear cache_pc_function_block.
4672 (find_pc_partial_function): Move comment to symtab.h. Add
4673 support for non-contiguous blocks.
4674 * cli/cli-cmds.c (block.h): Include.
4675 (print_disassembly): Handle printing of non-contiguous blocks.
4676 (disassemble_current_function): Likewise.
4677 (disassemble_command): Likewise.
4678
4679 * ax-gdb.c (gen_var_ref): Use BLOCK_ENTRY_PC in place of
4680 BLOCK_START.
4681 * blockframe.c (get_pc_function_start): Likewise.
4682 * compile/compile-c-symbols.c (convert_one_symbol): Likewise.
4683 (gcc_symbol_address): Likewise.
4684 * compile/compile-object-run.c (compile_object_run): Likewise.
4685 * compile/compile.c (get_expr_block_and_pc): Likewise.
4686 * dwarf2loc.c (dwarf2_find_location_expression): Likewise.
4687 (func_addr_to_tail_call_list): Likewise.
4688 * findvar.c (default_read_var_value): Likewise.
4689 * inline-frame.c (inline_frame_this_id): Likewise.
4690 (skip-inline_frames): Likewise.
4691 * infcmd.c (until_next_command): Likewise.
4692 * linespec.c (convert_linespec_to_sals): Likewise.
4693 * parse.c (parse_exp_in_context_1): Likewise.
4694 * printcmd.c (build_address_symbolic): likewise.
4695 (info_address_command): Likewise.
4696 symtab.c (find_function_start_sal): Likewise.
4697 (skip_prologue_sal): Likewise.
4698 (find_function_alias_target): Likewise.
4699 (find_gnu_ifunc): Likewise.
4700 * stack.c (find_frame_funname): Likewise.
4701 * symtab.c (fixup_symbol_section): Likewise.
4702 (find_function_start_sal): Likewise.
4703 (skip_prologue_sal): Likewsie.
4704 (find_function_alias_target): Likewise.
4705 (find_gnu_ifunc): Likewise.
4706 * tracepoint.c (info_scope_command): Likewise.
4707 * value.c (value_fn_field): Likewise.
4708
4709 * infrun.c (fill_in_stop_func): Use find_function_entry_range_from_pc
4710 in place of find_pc_partial_function.
4711 * blockframe.c (find_function_entry_range_from_pc): New function.
4712 * symtab.h (find_function_entry_range_from_pc): Declare and document.
4713 * objfiles.c (objfile_relocate1): Relocate start and end addresses
4714 for each range in a block.
4715
4716
4717 2018-08-23 Xavier Roirand <roirand@adacore.com>
4718
4719 * machoread.c (macho_symfile_read_all_oso): Remove uneeded
4720 incrementation.
4721
4722 2018-08-22 Simon Marchi <simon.marchi@polymtl.ca>
4723
4724 * solib-svr4.c (read_program_headers_from_bfd): Return
4725 gdb::optional<gdb::byte_vector>.
4726 (svr4_exec_displacement): Adjust.
4727
4728 2018-08-22 Simon Marchi <simon.marchi@polymtl.ca>
4729
4730 * solib-svr4.c (read_program_header): Return
4731 gdb::optional<gdb::byte_vector>, remove p_sect_size param.
4732 (find_program_interpreter): Return
4733 gdb::optional<gdb::byte_vector>.
4734 (scan_dyntag_auxv): Adjust.
4735 (enable_break): Adjust.
4736 (svr4_exec_displacement): Adjust.
4737
4738 2018-08-22 Simon Marchi <simon.marchi@polymtl.ca>
4739
4740 * inf-child.h (inf_child_target) <terminal_save_inferior>: New.
4741 * inf-child.c (inf_child_target::terminal_save_inferior): New.
4742
4743 2018-08-22 Simon Marchi <simon.marchi@polymtl.ca>
4744
4745 * guile/scm-string.c (gdbscm_scm_from_printf): Use
4746 string_vprintf.
4747 * guile/scm-utils.c (gdbscm_printf): Likewise.
4748 * serial.c (serial_printf): Likewise.
4749 * xml-support.c (gdb_xml_parser::vdebug): Likewise.
4750
4751 2018-08-22 Jan Vrany <jan.vrany@fit.cvut.cz>
4752
4753 * stack.c (print_frame): Print frame architecture when printing on
4754 an MI output.
4755 * NEWS: Mention new "arch" attribute in frame output.
4756
4757 2018-08-21 Alan Hayward <alan.hayward@arm.com>
4758
4759 * arch/aarch64.h (aarch64_regnum): Update comment.
4760
4761 2018-08-21 Alan Hayward <alan.hayward@arm.com>
4762
4763 * NEWS: Add SVE to 8.2 section.
4764
4765 2018-08-21 Pedro Alves <palves@redhat.com>
4766
4767 * guile/scm-utils.c (gdbscm_parse_function_args_1): New, factored
4768 out from gdbscm_parse_function_args.
4769 (gdbscm_parse_function_args): Rework to use gdbscm_wrap and
4770 gdbscm_parse_function_args_1.
4771
4772 2018-08-21 Simon Marchi <simon.marchi@ericsson.com>
4773
4774 PR gdb/17816
4775 * m32c-tdep.c (m32c_decode_srcdest4): Remove unnecessary ternary
4776 operator.
4777
4778 2018-08-19 Simon Marchi <simon.marchi@polymtl.ca>
4779
4780 * solib-svr4.c (svr4_exec_displacement): Fix formatting.
4781
4782 2018-08-19 Michael Spang <spang@google.com>
4783
4784 PR gdb/11786
4785 * solib-svr4.c (svr4_exec_displacement): Ignore memsz fields
4786 for PT_TLS segments.
4787
4788 2018-08-18 Kevin Buettner <kevinb@redhat.com>
4789
4790 * dwarf2expr.h (struct dwarf_expr_context): Add virtual method
4791 dwarf_variable_value.
4792 * dwarf2-frame.c (class dwarf_expr_executor):
4793 Add override for dwarf_variable_value.
4794 * dwarf2loc.c (class dwarf_evaluate_loc_desc): Likewise.
4795 (class symbol_needs_eval_context): Likewise.
4796 (indirect_synthetic_pointer): Add forward declaration.
4797 (sect_variable_value): New function.
4798 (dwarf2_compile_expr_to_ax): Add case for DW_OP_GNU_variable_value.
4799 * dwarf2expr.c (dwarf_expr_context::execute_stack_op): Add case
4800 for DW_OP_GNU_variable_value.
4801
4802 2018-08-16 Tom Tromey <tom@tromey.com>
4803
4804 * top.c (read_command_file): Update.
4805 (command_line_input): Remove "repeat" argument.
4806 * ada-lang.c (get_selections): Update.
4807 * linespec.c (decode_line_2): Update.
4808 * defs.h (command_line_input): Remove argument.
4809 * cli/cli-script.c (read_next_line): Update.
4810 * python/py-gdb-readline.c: Update.
4811
4812 2018-08-17 Tom Tromey <tom@tromey.com>
4813
4814 * cli/cli-script.c (read_next_line): Pass 0 as repeat argument to
4815 command_line_input.
4816
4817 2018-08-15 Tom Tromey <tom@tromey.com>
4818
4819 * aarch64-linux-tdep.c (aarch64_linux_core_read_vq): Use pulongest.
4820
4821 2018-08-14 Jan Vrany <jan.vrany@fit.cvut.cz>
4822
4823 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Add -a option.
4824 If used, use find_pc_partial_function to find address range
4825 to disassemble.
4826 * mi/mi-main.c (mi_cmd_list_features): Report
4827 "data-disassemble-a-option" feature.
4828 * NEWS: Mention new -data-disassemble option -a.
4829
4830 2018-08-13 Tom Tromey <tom@tromey.com>
4831
4832 * common/common-defs.h (_FORTIFY_SOURCE): Define.
4833
4834 2018-08-13 Alan Hayward <alan.hayward@arm.com>
4835
4836 * aarch64-linux-tdep.c (aarch64_linux_supply_sve_regset): New function.
4837 (aarch64_linux_collect_sve_regset): Likewise.
4838 (aarch64_linux_iterate_over_regset_sections): Check for SVE.
4839 * regcache.h (regcache_map_entry_size): New function.
4840
4841 2018-08-13 Alan Hayward <alan.hayward@arm.com>
4842
4843 * aarch64-linux-tdep.c (SVE_HEADER_SIZE_LENGTH): Add define.
4844 (SVE_HEADER_MAX_SIZE_LENGTH): Likewise.
4845 (SVE_HEADER_VL_LENGTH): Likewise.
4846 (SVE_HEADER_MAX_VL_LENGTH): Likewise.
4847 (SVE_HEADER_FLAGS_LENGTH): Likewise.
4848 (SVE_HEADER_RESERVED_LENGTH): Likewise.
4849 (SVE_HEADER_SIZE_OFFSET): Likewise.
4850 (SVE_HEADER_MAX_SIZE_OFFSET): Likewise.
4851 (SVE_HEADER_VL_OFFSET): Likewise.
4852 (SVE_HEADER_MAX_VL_OFFSET): Likewise.
4853 (SVE_HEADER_FLAGS_OFFSET): Likewise.
4854 (SVE_HEADER_RESERVED_OFFSET): Likewise.
4855 (SVE_HEADER_SIZE): Likewise.
4856 (aarch64_linux_core_read_vq): Add function.
4857 (aarch64_linux_core_read_description): Check for SVE section.
4858
4859 2018-08-13 Alan Hayward <alan.hayward@arm.com>
4860
4861 * aarch64-fbsd-tdep.c
4862 (aarch64_fbsd_iterate_over_regset_sections): Add supply_size and
4863 collect_size.
4864 * aarch64-linux-tdep.c
4865 (aarch64_linux_iterate_over_regset_sections): Likewise.
4866 * alpha-linux-tdep.c
4867 (alpha_linux_iterate_over_regset_sections):
4868 * alpha-nbsd-tdep.c
4869 (alphanbsd_iterate_over_regset_sections): Likewise.
4870 * amd64-fbsd-tdep.c
4871 (amd64fbsd_iterate_over_regset_sections): Likewise.
4872 * amd64-linux-tdep.c
4873 (amd64_linux_iterate_over_regset_sections): Likewise.
4874 * arm-bsd-tdep.c
4875 (armbsd_iterate_over_regset_sections): Likewise.
4876 * arm-fbsd-tdep.c
4877 (arm_fbsd_iterate_over_regset_sections): Likewise.
4878 * arm-linux-tdep.c
4879 (arm_linux_iterate_over_regset_sections): Likewise.
4880 * corelow.c (get_core_registers_cb): Likewise.
4881 (core_target::fetch_registers): Likewise.
4882 * fbsd-tdep.c (fbsd_collect_regset_section_cb): Likewise.
4883 * frv-linux-tdep.c (frv_linux_iterate_over_regset_sections): Likewise.
4884 * gdbarch.h (void): Regenerate.
4885 * gdbarch.sh: Add supply_size and collect_size.
4886 * hppa-linux-tdep.c (hppa_linux_iterate_over_regset_sections): Likewise.
4887 * hppa-nbsd-tdep.c (hppanbsd_iterate_over_regset_sections): Likewise.
4888 * hppa-obsd-tdep.c (hppaobsd_iterate_over_regset_sections): Likewise.
4889 * i386-fbsd-tdep.c (i386fbsd_iterate_over_regset_sections): Likewise.
4890 * i386-linux-tdep.c (i386_linux_iterate_over_regset_sections): Likewise.
4891 * i386-tdep.c (i386_iterate_over_regset_sections): Likewise.
4892 * ia64-linux-tdep.c (ia64_linux_iterate_over_regset_sections): Likewise.
4893 * linux-tdep.c (linux_collect_regset_section_cb): Likewise.
4894 * m32r-linux-tdep.c (m32r_linux_iterate_over_regset_sections): Likewise.
4895 * m68k-bsd-tdep.c (m68kbsd_iterate_over_regset_sections): Likewise.
4896 * m68k-linux-tdep.c (m68k_linux_iterate_over_regset_sections): Likewise.
4897 * mips-fbsd-tdep.c (mips_fbsd_iterate_over_regset_sections): Likewise.
4898 * mips-linux-tdep.c (mips_linux_iterate_over_regset_sections): Likewise.
4899 * mips-nbsd-tdep.c (mipsnbsd_iterate_over_regset_sections): Likewise.
4900 * mips64-obsd-tdep.c (mips64obsd_iterate_over_regset_sections):
4901 Likewise.
4902 * mn10300-linux-tdep.c (am33_iterate_over_regset_sections): Likewise.
4903 * nios2-linux-tdep.c (nios2_iterate_over_regset_sections): Likewise.
4904 * ppc-fbsd-tdep.c (ppcfbsd_iterate_over_regset_sections): Likewise.
4905 * ppc-linux-tdep.c (ppc_linux_iterate_over_regset_sections): Likewise.
4906 * ppc-nbsd-tdep.c (ppcnbsd_iterate_over_regset_sections): Likewise.
4907 * ppc-obsd-tdep.c (ppcobsd_iterate_over_regset_sections): Likewise.
4908 * riscv-linux-tdep.c (riscv_linux_iterate_over_regset_sections):
4909 Likewise.
4910 * rs6000-aix-tdep.c (rs6000_aix_iterate_over_regset_sections): Likewise.
4911 * s390-linux-tdep.c (s390_iterate_over_regset_sections): Likewise.
4912 * score-tdep.c (score7_linux_iterate_over_regset_sections): Likewise.
4913 * sh-tdep.c (sh_iterate_over_regset_sections): Likewise.
4914 * sparc-tdep.c (sparc_iterate_over_regset_sections): Likewise.
4915 * tilegx-linux-tdep.c (tilegx_iterate_over_regset_sections): Likewise.
4916 * vax-tdep.c (vax_iterate_over_regset_sections): Likewise.
4917 * xtensa-tdep.c (xtensa_iterate_over_regset_sections): Likewise.
4918
4919 2018-08-10 Simon Marchi <simon.marchi@ericsson.com>
4920
4921 * nat/linux-osdata.c (commandline_from_pid): Replace xstrprintf
4922 with string_printf.
4923
4924 2018-08-10 Keith Seitz <keiths@redhat.com>
4925
4926 * compile/compile-c-support.c (add_code_header, add_code_footer):
4927 Move into policy class.
4928 (c_push_user_expression, pop_user_expression_nop)
4929 (c_add_code_header, c_add_code_footer, c_add_input): New policy class.
4930 (compile_program): New host class.
4931 (c_compile_program): New typedef.
4932 (c_compute_porgram): Use c_compile_program.
4933
4934 2018-08-10 Keith Seitz <keiths@redhat.com>
4935
4936 * compile/compile-internal.h (compile_instance::~compile_instance):
4937 Remove calls to htab_delete.
4938 <m_type_map, m_symbol_err_map>: Switch type to htab_up.
4939 * compile.c (compile_instance::compile_instance): Initialize
4940 htab unique pointers.
4941 (compile_instance::get_cached_type, compile_instance::insert_type)
4942 (compile_instance::error_symbol_once): Update for unique_ptr.
4943
4944 2018-08-10 Keith Seitz <keiths@redhat.com>
4945
4946 * compile/compile-c-symbols.c (struct symbol_error)
4947 (hash_symbol_error, eq_symbol_error, del_symbol_error)
4948 (compile_instance::insert_symbol_error)
4949 (compile_instance::error_symbol_once): Move to ...
4950 * compile/compile.c: ... here.
4951
4952 2018-08-10 Keith Seitz <keiths@redhat.com>
4953
4954 * compile/compile-c-support.c (c_get_compile_context): Use `new'
4955 instead of `new_compile_instance'.
4956 * compile/compile-c-symbols.c (compile_instance::insert_symbol_error):
4957 Update description.
4958 If the symbol error map is not initialized, create it.
4959 (generate_c_for_for_one_symbol): Do not check/initialize
4960 the symbol error map.
4961 * compile/compile-c-types.c (compile_c_instance): Make a class.
4962 Update all callers.
4963 (compile_instance::compile_instance): Initialize the type cache.
4964 (get_cached_type): New function.
4965 (insert_type): Update description.
4966 (compile_c_instance::m_default_cflags): Define.
4967 (convert_type): Update description. Use get_cached_type.
4968 (delete_instance): Moved to destructor.
4969 (new_compile_instance): Moved to constructor.
4970 * compile/compile-c.h (compile_c_instance): Make class inheriting
4971 from compile_instance.
4972 <base>: Remove field.
4973 <type_map, symbol_err_map>: Move to base class.
4974 <c_plugin>: Rename to `m_plugin' and remove pointer type.
4975 * compile/compile-internal.h (compile_instance): Make class.
4976 <type_map_t, symbol_err_map_t>: Define.
4977 <fe>: Rename to `m_gcc_fe'.
4978 <scope, block, gcc_target_options>: Add `m_' prefix.
4979 <m_type_map, m_symbol_err_map>: New fields, moved from
4980 compile_c_instance.
4981 <destroy>: Remove.
4982 (convert_type, new_compile_instance): Remove.
4983 * compile/compile.c (cleanup_compile_instance): Remove.
4984 (compile_to_object): Use unique_ptr to eliminate cleanups.
4985 (compile_instance::set_print_callback, compile_instance::version)
4986 (compile_instance::set_verbose)
4987 (compile_instance::set_driver_filename)
4988 (compile_instance::set_triplet_regexp)
4989 (compile_instance::set_arguments)
4990 (compile_instance::set_source_file)
4991 (compile_instance::compile): Define.
4992
4993 2018-08-10 Keith Seitz <keiths@redhat.com>
4994
4995 * Makefile.in (HFILES_NO_SRCDIR): Add compile/gcc-c-plugin.h.
4996 * compile/compile-c-types.c: Define GCC_METHODN macros and include
4997 gcc-c-fe.def to define C plugin.
4998 (delete_instance): Delete `c_plugin'.
4999 (new_compile_instance): Initialize `c_plugin'.
5000 * compile/compile-c.h: Include gcc_c_plugin.h.
5001 (struct compile_c_instance) <c_plugin>: New member.
5002 * gcc-c-plugin.h: New file.
5003 Update all callers with API change.
5004
5005 2018-08-10 Keith Seitz <keiths@redhat.com>
5006
5007 * Makefile.in (SUBDIR_GCC_COMPILE_SRCS): Move header files ...
5008 (HFILES_NO_SRCDIR): ... to here.
5009 Add compile-internal.h and compile-c.h.
5010 * compile/compile-c-support.c: Include compile-c.h.
5011 * compile/compile-c-symbols.c: Include compile-c.h.
5012 (generate_c_for_variable_locations): Update comment.
5013 * compile/compile-c-types.c: Include compile-c.h.
5014 * compile/compile-c.h: New file -- moved C language declarations
5015 from other files here.
5016 * compile/compile-internal.h: Do not include hashtab.h or
5017 common/enum-flags.h.
5018 (gcc_qualifiers_flags, struct compile_c_instance, C_CTX)
5019 (gcc_convert_symbol, gcc_symbol_address)
5020 (generate_c_for_variable_locations, c_get_mode_for_size)
5021 (c_get_range_decl_name): Definitions moved to compile-c.h.
5022 * compile/compile-loc2c.c: Include compile-c.h.
5023
5024 2018-08-10 Keith Seitz <keiths@redhat.com>
5025
5026 * compile/compile-c-symbols.c (symbol_substitution_name): Rename to ...
5027 (c_symbol_substitution_name): ... this.
5028 Update all callers.
5029
5030 2018-08-10 Keith Seitz <keiths@redhat.com>
5031
5032 * compile/compile-c-support.c (c_compute_program): Use
5033 unique_xmalloc_ptr to eliminate cleanup.
5034 * compile/compile-c-symbols.c (generate_c_for_variable_locations):
5035 Return a unique_xmalloc_ptr and eliminate cleanup.
5036 * compile/compile-internal.h (generate_c_for_variable_locations):
5037 Return unique_xmalloc_ptr and update description.
5038
5039 2018-08-10 Alan Hayward <alan.hayward@arm.com>
5040
5041 * corelow.c (core_target::get_core_register_section): Rename
5042 min_size to section_min_size.
5043
5044 2018-08-09 Jim Wilson <jimw@sifive.com>
5045
5046 * Makefile.in (ALL_TARGET_OBS): Add riscv-linux-tdep.c.
5047 (ALLDEPFILES): Add riscv-linux-nat.c, and riscv-linux-tdep.c.
5048 * NEWS: Mention new GNU/Linux RISC-V target.
5049 * configure.host: Add riscv*-*-linux*.
5050 * configure.nat: Add riscv*.
5051 * configure.tgt: Add riscv*-*-linux*.
5052 * riscv-linux-nat.c: New file.
5053 * riscv-linux-tdep.c: New file.
5054
5055 2018-08-09 Andrew Burgess <andrew.burgess@embecosm.com>
5056
5057 * infrun.c (resume): Make static, add forward declaration.
5058 (proceed): Update header comment.
5059 * infrun.h (resume): Delete declaration.
5060
5061 2018-08-09 Tom Tromey <tom@tromey.com>
5062
5063 * riscv-tdep.h: Minor formatting fixes.
5064
5065 2018-08-09 Simon Marchi <simon.marchi@ericsson.com>
5066
5067 * common/scoped_mmap.c (mmap_file): Silence ARI warning.
5068 * dwarf-index-cache.c (create_dir_and_check): Likewise.
5069 (test_mkdir_recursive): Likewise.
5070 * dwarf-index-write.c (write_psymtabs_to_index): Likewise.
5071
5072 2018-08-09 Andrew Burgess <andrew.burgess@embecosm.com>
5073
5074 * valarith.c (value_subscripted_rvalue): If an array is not in
5075 memory, and we don't know the upper bound, then we can't know that
5076 the requested element exists or not.
5077
5078 2018-08-08 Simon Marchi <simon.marchi@ericsson.com>
5079
5080 * target.c (str_comma_list_concat_elem): Fix typo in comment.
5081 (target_options_to_string): Add comment.
5082
5083 2018-08-08 Tom Tromey <tom@tromey.com>
5084
5085 * unittests/scoped_mmap-selftests.c: Check result of "write".
5086
5087 2018-08-08 Jim Wilson <jimw@sifive.com>
5088
5089 * riscv-tdep.c (enum opcode): Add jump, branch, lr, and sc opcodes.
5090 (decode_register_index_short): New.
5091 (decode_j_type_insn, decode_cj_type_insn): New.
5092 (decode_b_type_insn, decode_cb_type_insn): New.
5093 (riscv_insn::decode): Add support for jumps, branches, lr, and sc. New
5094 local xlen. Check xlen when decoding ambiguous compressed insns. In
5095 compressed decode, use is_c_lui_insn instead of is_lui_insn, and
5096 is_c_sw_insn instead of is_sw_insn.
5097 (riscv_next_pc, riscv_next_pc_atomic_sequence): New.
5098 (riscv_software_single_step): New.
5099 * riscv-tdep.h (riscv_software_single_step): Declare.
5100
5101 * riscv-tdep.c (riscv_isa_xlen): Drop static.
5102 * riscv-tdep.h (riscv_isa_xlen): Add extern declaration.
5103
5104 2018-08-08 Andrew Burgess <andrew.burgess@embecosm.com>
5105
5106 PR gdb/18050:
5107 * target.c (dispose_inferior): Don't dispose of inferiors that are
5108 already killed.
5109
5110 2018-08-08 Szabolcs Nagy <szabolcs.nagy@arm.com>
5111
5112 * remote.c (remote_target::download_tracepoint): Change char* to
5113 const char*.
5114
5115 2018-08-07 Simon Marchi <simon.marchi@polymtl.ca>
5116
5117 * target.h (target_options_to_string): Return an std::string.
5118 * target.c (str_comma_list_concat_elem): Return void, use
5119 std::string.
5120 (do_option): Likewise.
5121 (target_options_to_string): Return an std::string.
5122 * linux-nat.c (linux_nat_target::wait): Adjust.
5123 * target-debug.h (target_debug_print_options): Adjust.
5124
5125 2018-08-07 Tom Tromey <tom@tromey.com>
5126
5127 * Makefile.in (CPPFLAGS): New variable.
5128 (INTERNAL_CPPFLAGS): Use it.
5129
5130 2018-08-07 Simon Marchi <simon.marchi@ericsson.com>
5131
5132 * NEWS: Mention the index cache.
5133
5134 2018-08-07 Simon Marchi <simon.marchi@ericsson.com>
5135
5136 * common/pathstuff.h (get_standard_cache_dir): New.
5137 * common/pathstuff.c (get_standard_cache_dir): New.
5138 * build-id.h (build_id_to_string): New.
5139 * dwarf-index-common.h (INDEX4_SUFFIX, INDEX5_SUFFIX,
5140 DEBUG_STR_SUFFIX): Move to here.
5141 * dwarf-index-write.c (INDEX4_SUFFIX, INDEX5_SUFFIX,
5142 DEBUG_STR_SUFFIX): Move from there.
5143 (write_psymtabs_to_index): Make non-static, add basename
5144 parameter. Write to temporary files, rename when done.
5145 (save_gdb_index_command): Adjust call to
5146 write_psymtabs_to_index.
5147 * dwarf2read.h (dwarf2_per_objfile) <index_cache_res>: New
5148 field.
5149 * dwarf2read.c (dwz_file) <index_cache_res>: New field.
5150 (get_gdb_index_contents_from_cache): New.
5151 (get_gdb_index_contents_from_cache_dwz): New.
5152 (dwarf2_initialize_objfile): Read index from cache.
5153 (dwarf2_build_psymtabs): Save to index.
5154 * dwarf-index-cache.h: New file.
5155 * dwarf-index-cache.c: New file.
5156 * dwarf-index-write.h: New file.
5157
5158 2018-08-07 Simon Marchi <simon.marchi@ericsson.com>
5159
5160 * gnulib/aclocal.m4: Re-generate.
5161 * gnulib/config.in: Re-generate.
5162 * gnulib/configure: Re-generate.
5163 * gnulib/import/Makefile.am: Re-generate.
5164 * gnulib/import/Makefile.in: Re-generate.
5165 * gnulib/import/m4/gnulib-cache.m4: Re-generate.
5166 * gnulib/import/m4/gnulib-comp.m4: Re-generate.
5167 * gnulib/import/m4/mkdir.m4: New file.
5168 * gnulib/import/mkdir.c: New file.
5169 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add mkdir
5170 module.
5171
5172 2018-08-07 Simon Marchi <simon.marchi@ericsson.com>
5173
5174 * Makefile.in (COMMON_SFILES): Add common/scoped_mmap.c.
5175 * common/scoped_mmap.c: New file.
5176 * common/scoped_mmap.h (destroy): New method.
5177 (~scoped_mmap, reset): Use destroy.
5178 (scoped_mmap): New move constructor.
5179 (mmap_file): New declaration.
5180 * unittests/scoped_mmap-selftests.c (test_normal,
5181 test_invalid_filename, run_tests): New functions.
5182 (_initialize_scoped_mmap_selftests): Register selftest.
5183
5184 2018-08-07 Simon Marchi <simon.marchi@ericsson.com>
5185
5186 * dwarf2read.c (read_gdb_index_from_section): Rename to...
5187 (read_gdb_index_from_buffer): ... this. Remove section
5188 parameter, add buffer parameter.
5189 (get_gdb_index_contents_ftype,
5190 get_gdb_index_contents_dwz_ftype): New typedefs.
5191 (dwarf2_read_gdb_index): Add callback parameters to get the
5192 index contents.
5193 (get_gdb_index_contents_from_section): New.
5194 (dwarf2_initialize_objfile): Update call to
5195 dwarf2_read_gdb_index.
5196
5197 2018-08-07 Simon Marchi <simon.marchi@ericsson.com>
5198
5199 * common/filestuff.h (gdb_fopen_cloexec): New overload.
5200 (gdb_open_cloexec): Likewise.
5201 * nat/linux-osdata.c (command_from_pid): Use string_printf.
5202 (commandline_from_pid): Likewise.
5203 (linux_xfer_osdata_threads): Likewise.
5204 (linux_xfer_osdata_fds): Likewise.
5205 * ada-lang.c (is_package_name): Likewise.
5206 * auxv.c (procfs_xfer_auxv): Likewise.
5207 * breakpoint.c (print_one_breakpoint_location): Use
5208 uiout::field_fmt.
5209 (print_one_catch_solib): Use string_printf.
5210 * coff-pe-read.c (add_pe_exported_sym): Likewise.
5211 (add_pe_forwarded_sym): Likewise.
5212 * dwarf2read.c (create_type_unit_group): Likewise.
5213 (build_error_marker_type): Likewise.
5214 * infcall.c (get_function_name): Likewise.
5215 * valprint.c (print_converted_chars_to_obstack): Likewise.
5216 * xtensa-tdep.c (xtensa_register_type): Likewise.
5217
5218 2018-08-06 Simon Marchi <simon.marchi@ericsson.com>
5219
5220 * remote.c (remote_target::download_tracepoint): Fix format
5221 string errors.
5222
5223 2018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
5224
5225 * tracefile.c: Include common/byte-vector.h.
5226 (trace_save): Change type of buf to gdb::byte_vector. Initialize
5227 with trace_regblock_size if needed. Update uses of buf.
5228
5229 2018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
5230
5231 * tracepoint.h (collection_list) <m_regs_mask>: Change type to
5232 std::vector<unsigned char>.
5233 * tracepoint.c (collection_list::collection_list): Remove
5234 m_regs_mask initializer from initializer list. Resize
5235 m_regs_mask using the largest remote register number.
5236 (collection_list::add_remote_register): Remove size check on
5237 m_regs_mask. Use at to access element.
5238 (collection_list::stringify): Change type of temp_buf to
5239 gdb::char_vector. Update uses of temp_buf. Resize if needed to
5240 stringify the register mask. Use pack_hex_byte for the register
5241 mask.
5242
5243 2018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
5244
5245 * tracepoint.h (class collection_list) <add_register>: Remove.
5246 <add_remote_register, add_ax_registers, add_local_register>:
5247 Declare.
5248 <add_memrange>: Add scope parameter.
5249 * tracepoint.c (encode_actions_1): Likewise.
5250 (collection_list::add_register): Rename to ...
5251 (collection_list::add_remote_register): ... this. Update
5252 comment.
5253 (collection_list::add_ax_registers, add_local_register): New
5254 methods.
5255 (collection_list::add_memrange): Add scope parameter. Call
5256 add_local_register instead of add_register.
5257 (finalize_tracepoint_aexpr): New function.
5258 (collection_list::collect_symbol): Update calls to add_memrange.
5259 Call add_local_register instead of add_register. Call
5260 add_ax_registers. Call finalize_tracepoint_aexpr.
5261 (encode_actions_1): Get remote regnos for $reg action. Call
5262 add_remote_register, add_ax_registers, and add_local_register.
5263 Update call to add_memrange. Call finalize_tracepoint_aexpr.
5264 (validate_actionline): Call finalize_tracepoint_aexpr.
5265
5266 2018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
5267
5268 * remote.c (remote_target::download_tracepoint): Remove BUF_SIZE.
5269 Replace array buf with gdb::char_vector buf, of size
5270 get_remote_packet_size (). Replace references to buf and
5271 BUF_SIZE to buf.data () and buf.size (). Replace strcpy, strcat
5272 and xsnprintf with snprintf. Raise errors if the buffer is too
5273 small.
5274
5275 2018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
5276
5277 * remote.c (remote_target::download_tracepoint): Fix the has_more
5278 predicate in the QTDP action list iteration.
5279
5280 2018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
5281
5282 * remote.c (remote_target::download_tracepoint): Fix indentation
5283 in for block.
5284
5285 2018-08-06 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
5286
5287 * proc-api.c (_initialize_proc_api): Remove c, unused.
5288 * procfs.c (procfs_init_inferior): Remove signals, unused.
5289 (procfs_target::make_corefile_notes): Remove old_chain, fpregs,
5290 unused.
5291
5292 2018-08-06 Sergey Korolev <s.korolev@ndmsystems.com>
5293 Andrew Burgess <andrew.burgess@embecosm.com>
5294
5295 * linux-nat.c (linux_nat_target::follow_fork): Avoid using
5296 'W_STOPCODE (0)' as this could be ambiguous.
5297
5298 2018-08-03 Sergio Durigan Junior <sergiodj@redhat.com>
5299
5300 * ser-tcp.c (net_open): Fix thinko when deciding whether to
5301 disable TCP's Nagle algorithm (use "ai_protocol" instead of
5302 "ai_socktype").
5303
5304 2018-08-02 Tom Tromey <tom@tromey.com>
5305
5306 PR symtab/16842.
5307 * dwarf2read.c (read_func_scope): Set symtab on template parameter
5308 symbols.
5309 (process_structure_scope): Likewise.
5310
5311 2018-08-02 Xavier Roirand <roirand@adacore.com>
5312
5313 PR gdb/22629:
5314 * darwin-nat.c (darwin_kill_inferior): Fix handling of
5315 kill inferior.
5316
5317 2018-08-02 Tom Tromey <tom@tromey.com>
5318
5319 * darwin-nat.c (find_inferior_task_it, darwin_find_thread)
5320 (darwin_suspend_inferior, darwin_resume_inferior)
5321 (darwin_decode_notify_message, darwin_resume_inferior_threads)
5322 (darwin_check_new_threads): Check result of get_darwin_inferior.
5323
5324 2018-07-31 Joel Brobecker <brobecker@adacore.com>
5325
5326 GDB 8.1.1 released.
5327
5328 2018-07-31 Jan Vrany <jan.vrany@fit.cvut.cz>
5329
5330 * varobj.c (varobj_get_path_expr_parent): Report an error if
5331 parent is a dynamic varobj.
5332
5333 2018-07-31 Simon Marchi <simon.marchi@ericsson.com>
5334
5335 * gnulib/aclocal.m4: Re-generate.
5336 * gnulib/config.in: Re-generate.
5337 * gnulib/configure: Re-generate.
5338 * gnulib/import/Makefile.in: Re-generate.
5339 * gnulib/import/m4/gnulib-comp.m4: Re-generate.
5340 * gnulib/import/m4/onceonly.m4: Re-generate.
5341
5342 2018-07-31 Simon Marchi <simon.marchi@ericsson.com>
5343
5344 * target-descriptions.c (struct xml_test_tdesc): New.
5345 (xml_tdesc): Change type to std::vector<xml_test_tdesc>.
5346 (record_xml_tdesc): Update.
5347 (maintenance_check_xml_descriptions): Update.
5348 * target-descriptions.h (record_xml_tdesc): Update comment.
5349
5350 2018-07-30 Andrew Burgess <andrew.burgess@embecosm.com>
5351
5352 * eval.c (evaluate_subexp_for_sizeof): Check for array type before
5353 checking array bounds are defined.
5354
5355 2018-07-30 Tom Tromey <tom@tromey.com>
5356
5357 * nat/linux-osdata.c (pid_pgid_entry::operator<): Fix
5358 irreflexivity violation.
5359
5360 2018-07-30 Tom Tromey <tom@tromey.com>
5361
5362 * cli/cli-decode.c (lookup_cmd): Remove lint code.
5363 * value.c (unpack_long): Remove lint code.
5364 * valops.c (value_ind): Remove lint code.
5365 * valarith.c (value_x_binop, value_x_unop, value_equal)
5366 (value_pos): Remove lint code.
5367
5368 2018-07-28 Tom de Vries <tdevries@suse.de>
5369
5370 * eval.c (evaluate_subexp_for_sizeof): Interpret size of dynamic type
5371 with undefined upper bound as <optimized out>.
5372
5373 2018-07-27 Sergio Durigan Junior <sergiodj@redhat.com>
5374
5375 * gcore.in: Rename variable "name" to "prefix". Expand
5376 "usage" text.
5377
5378 2018-07-14 Jon Turney <jon.turney@dronecode.org.uk>
5379
5380 * windows-nat.c (windows_nat_target::create_inferior): Update to
5381 call close() in global namespace.
5382
5383 2018-07-26 Tom Tromey <tom@tromey.com>
5384
5385 * dwarf-index-write.c (add_address_entry): Don't add objfile
5386 offsets.
5387 * dbxread.c (find_stab_function): Rename from
5388 find_stab_function_addr. Return a bound_minimal_symbol.
5389 (read_dbx_symtab): Use raw_text_low, raw_text_high.
5390 Don't add objfile offsets.
5391 (end_psymtab): Use raw_text_low, raw_text_high,
5392 MSYMBOL_VALUE_RAW_ADDRESS.
5393 (read_ofile_symtab): Update.
5394 (process_one_symbol): Update.
5395 * dwarf2read.c (create_addrmap_from_index): Don't add objfile
5396 offsets.
5397 (dw2_relocate): Remove.
5398 (dw2_find_pc_sect_symtab): Bias PC by the text offset before
5399 searching addrmap.
5400 (dwarf2_gdb_index_functions, dwarf2_debug_names_functions):
5401 Update.
5402 (process_psymtab_comp_unit_reader, add_partial_symbol)
5403 (add_partial_subprogram, dwarf2_ranges_read): Update.
5404 (load_partial_dies): Update.
5405 (add_address_entry): Don't add objfile offsets.
5406 (dwarf2_build_include_psymtabs): Update.
5407 (create_addrmap_from_aranges): Don't add objfile offsets.
5408 (dw2_find_pc_sect_compunit_symtab): Update.
5409 * mdebugread.c (parse_symbol): Don't add objfile offsets.
5410 (parse_lines): Remove 'pst' parameter, replace with 'textlow'.
5411 Update.
5412 (parse_partial_symbols): Don't add objfile offsets. Use
5413 raw_text_low, raw_text_high. Update.
5414 (handle_psymbol_enumerators, psymtab_to_symtab_1): Update.
5415 * objfiles.c (objfile_relocate1): Don't relocate psymtabs_addrmap
5416 or call 'relocate' quick function. Clear psymbol_map.
5417 * psympriv.h (struct partial_symbol) <address>: Add section
5418 offset.
5419 <set_unrelocated_address>: Rename from set_address.
5420 <raw_text_low, raw_text_high>: New methods.
5421 <text_low, text_high>: Add objfile parameter.
5422 (add_psymbol_to_bcache): Add 'section' parameter. Call
5423 set_unrelocated_address.
5424 * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
5425 (find_pc_psymbol): Update.
5426 (fixup_psymbol_section, relocate_psymtabs): Remove.
5427 (dump_psymtab, psym_functions): Update.
5428 (add_psymbol_to_bcache, add_psymbol_to_list): Add 'section'
5429 parameter.
5430 (maintenance_info_psymtabs, maintenance_check_psymtabs): Update.
5431 (start_psymtab_common): Update.
5432 * symfile-debug.c (debug_qf_relocate): Remove.
5433 (debug_sym_quick_functions): Update.
5434 * symfile.h (struct quick_symbol_functions) <relocate>: Remove.
5435 * xcoffread.c (scan_xcoff_symtab): Don't add objfile offsets.
5436 Update.
5437
5438 2018-07-26 Tom Tromey <tromey@redhat.com>
5439
5440 * dbxread.c (end_psymtab): Use text_high_valid and
5441 text_low_valid.
5442 * mdebugread.c (parse_partial_symbols): Use text_low_valid.
5443 (psymtab_to_symtab_1): Use text_high_valid and text_low_valid.
5444 * psympriv.h (struct partial_symtab) <m_text_low, m_text_high>:
5445 Update comment.
5446 <text_low_valid, text_high_valid>: New fields.
5447 <set_text_low, set_text_high>: Update.
5448 * xcoffread.c (scan_xcoff_symtab): Use text_low_valid.
5449
5450 2018-07-26 Tom Tromey <tom@tromey.com>
5451
5452 * dbxread.c (read_dbx_symtab, end_psymtab, read_ofile_symtab):
5453 Update.
5454 * dwarf2read.c (dwarf2_create_include_psymtab): Don't initialize
5455 textlow and texthigh fields.
5456 (process_psymtab_comp_unit_reader, dwarf2_build_include_psymtabs):
5457 Update.
5458 * mdebugread.c (parse_lines, parse_partial_symbols)
5459 (psymtab_to_symtab_1): Update.
5460 * psympriv.h (struct partial_symtab) <m_text_low, m_text_high>:
5461 Rename fields. Update comment. Now private.
5462 <text_low, text_high, set_text_low, set_text_high>: New methods.
5463 * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
5464 (find_pc_sect_psymbol, relocate_psymtabs, dump_psymtab)
5465 (start_psymtab_common, maintenance_info_psymtabs)
5466 (maintenance_check_psymtabs): Update.
5467 * xcoffread.c (xcoff_end_psymtab): Don't initialize textlow and
5468 texthigh fields.
5469 (scan_xcoff_symtab): Update.
5470
5471 2018-07-26 Tom Tromey <tromey@redhat.com>
5472
5473 * psympriv.h (struct partial_symbol) <unrelocated_address,
5474 address, set_address>: New methods.
5475 * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymbol)
5476 (fixup_psymbol_section, relocate_psymtabs): Update.
5477 (print_partial_symbols): Add 'objfile' parameter. Update.
5478 (dump_psymtab, add_psymbol_to_bcache, psym_fill_psymbol_map):
5479 Update.
5480
5481 2018-07-26 Tom Tromey <tom@tromey.com>
5482
5483 * dwarf-index-write.c (write_psymbols, debug_names::insert)
5484 (debug_names::write_psymbols): Update.
5485 * psympriv.h (struct partial_symbol): Derive from
5486 general_symbol_info.
5487 <obj_section>: New method.
5488 (PSYMBOL_DOMAIN, PSYMBOL_CLASS): Remove.n
5489 * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
5490 (find_pc_sect_psymbol, fixup_psymbol_section)
5491 (match_partial_symbol, lookup_partial_symbol, relocate_psymtabs)
5492 (print_partial_symbols, recursively_search_psymtabs)
5493 (compare_psymbols, psymbol_hash, psymbol_compare)
5494 (add_psymbol_to_bcache, maintenance_check_psymtabs)
5495 (psymbol_name_matches, psym_fill_psymbol_map): Update.
5496
5497 2018-07-26 Tom Tromey <tromey@redhat.com>
5498
5499 * dbxread.c (end_psymtab): Remove dead code.
5500
5501 2018-07-26 Andrew Burgess <andrew.burgess@embecosm.com>
5502
5503 * dwarf2-frame-tailcall.c (tailcall_frame_sniffer): Exit early if
5504 DWARF unwinders are disabled.
5505 * dwarf2-frame.c: Add dwarf2read.h include.
5506 (dwarf2_frame_sniffer): Exit early if DWARF unwinders are
5507 disabled.
5508 (dwarf2_frame_unwinders_enabled_p): Define.
5509 (show_dwarf_unwinders_enabled_p): New function.
5510 (_initialize_dwarf2_frame): Register switch to control DWARF
5511 unwinder use.
5512 * dwarf2-frame.h (dwarf2_frame_unwinders_enabled_p): Declare.
5513 * dwarf2read.c (set_dwarf_cmdlist): Remove static keyword.
5514 (show_dwarf_cmdlist): Remove static keyword.
5515 * dwarf2read.h (set_dwarf_cmdlist): Declare.
5516 (show_dwarf_cmdlist): Declare.
5517 * NEWS: Document new feature.
5518
5519 2018-07-26 Tom de Vries <tdevries@suse.de>
5520
5521 PR breakpoints/23366
5522 * infcmd.c (info_program_command): Handle ptid == minus_one_ptid.
5523
5524 2018-07-26 Tom de Vries <tdevries@suse.de>
5525
5526 * dwarf2read.c (read_subrange_type): Warn if DW_AT_upper_bound or
5527 DW_AT_count can't be translated to a dynamic prop.
5528
5529 2018-07-25 Tom de Vries <tdevries@suse.de>
5530
5531 * dwarf2loc.c (dwarf2_locexpr_baton_eval): Wrap ctx.eval call in
5532 try/catch.
5533
5534 2018-07-25 Jan Vrany <jan.vrany@fit.cvut.cz>
5535
5536 * breakpoint.c (enable_disable_bp_num_loc): Notify observers.
5537
5538 2018-07-25 Joel Brobecker <brobecker@adacore.com>
5539
5540 * MAINTAINERS (Global Maintainers): Add Tom Tromey.
5541
5542 2018-07-24 Keith Seitz <keiths@redhat.comt
5543
5544 PR symtab/23010
5545 * dwarf2read.c (dw2_add_symbol_to_list): New function.
5546 (fixup_go_packaging, new_symbol): Use dw2_add_symbol_to_list
5547 instead of add_symbol_to_list.
5548 (read_file_scope): Call prepare_one_comp_unit before reading
5549 any other DIEs.
5550
5551 2018-07-24 Simon Marchi <simon.marchi@ericsson.com>
5552
5553 * common/scoped_mmap.h (class scoped_mmap): Fix indentation.
5554
5555 2018-07-24 Tom Tromey <tom@tromey.com>
5556
5557 * utils.c (malloc, realloc, free): Don't declare.
5558 * configure, config.in: Rebuild.
5559 * configure.ac: Don't check for declarations of free, malloc, or
5560 realloc.
5561
5562 2018-07-22 Simon Marchi <simon.marchi@polymtl.ca>
5563
5564 * aarch64-linux-nat.c
5565 (aarch64_linux_nat_target::stopped_data_address): Remove unused
5566 variable.
5567 * arm-linux-nat.c (fetch_regs): Likewise.
5568 (store_regs): Likewise.
5569 (fetch_vfp_regs): Likewise.
5570 (store_vfp_regs): Likewise.
5571 (arm_linux_nat_target::insert_hw_breakpoint): Likewise.
5572 (arm_linux_nat_target::remove_hw_breakpoint): Likewise.
5573 (arm_linux_nat_target::insert_watchpoint): Likewise.
5574 (arm_linux_nat_target::remove_watchpoint): Likewise.
5575 * mips-linux-nat.c (mips_linux_nat_target::insert_watchpoint):
5576 Likewise.
5577 * nat/aarch64-sve-linux-ptrace.c (aarch64_sve_get_sveregs):
5578 Likewise.
5579 * ppc-linux-nat.c (fetch_register): Likewise.
5580 (fetch_all_gp_regs): Likewise.
5581 (fetch_ppc_registers): Likewise.
5582 (store_all_gp_regs): Likewise.
5583 (store_ppc_registers): Likewise.
5584 (hwdebug_insert_point): Likewise.
5585 (can_use_watchpoint_cond_accel): Likewise.
5586 * remote-sim.c (gdb_os_write_stdout): Likewise.
5587
5588 2018-07-22 Simon Marchi <simon.marchi@polymtl.ca>
5589 Tom Tromey <tom@tromey.com>
5590
5591 * warning.m4 (AM_GDB_WARNINGS): Add -Wunused-variable and special
5592 test for it.
5593 * configure: Rebuild.
5594
5595 2018-07-22 Tom Tromey <tom@tromey.com>
5596
5597 * regformats/regdat.sh: Define xmltarget_${name} inside
5598 #ifndef IN_PROCESS_AGENT.
5599
5600 2018-07-22 Tom Tromey <tom@tromey.com>
5601
5602 * value.c (value_fetch_lazy_bitfield): Remove unused variable.
5603
5604 2018-07-22 Tom Tromey <tom@tromey.com>
5605
5606 * symfile.c (reread_symbols): Notify iter, not objfile.
5607
5608 2018-07-22 Tom Tromey <tom@tromey.com>
5609
5610 * ravenscar-thread.c (ravenscar_thread_target::store_registers):
5611 Use arch_ops.
5612 (ravenscar_thread_target::prepare_to_store): Likewise.
5613
5614 2018-07-22 Tom Tromey <tom@tromey.com>
5615
5616 * python/py-prettyprint.c (gdbpy_apply_val_pretty_printer): Remove
5617 unused variable. Call value_fetch_lazy when needed.
5618 * guile/scm-pretty-print.c (gdbscm_apply_val_pretty_printer):
5619 Remove unused variable. Call value_fetch_lazy when needed.
5620
5621 2018-07-22 Tom Tromey <tom@tromey.com>
5622
5623 * m32c-tdep.c (mark_dma): Return void.
5624 (make_regs): Remove unused declarations.
5625
5626 2018-07-22 Tom Tromey <tom@tromey.com>
5627
5628 * guile/scm-cmd.c (gdbscm_dont_repeat): Call
5629 cmdscm_get_valid_command_smob_arg_unsafe for effect.
5630 * guile/scm-block.c (gdbscm_make_block_syms_iter): Call
5631 bkscm_get_valid_block_smob_arg_unsafe for effect.
5632
5633 2018-07-22 Tom Tromey <tom@tromey.com>
5634
5635 * bfin-tdep.c (bfin_push_dummy_call): Use arg_type, not
5636 value_type.
5637
5638 2018-07-22 Tom Tromey <tom@tromey.com>
5639
5640 * windows-nat.c (saved_context): Conditionally define.
5641 * remote.c (remote_target::remote_btrace_maybe_reopen):
5642 Conditionally declare "warned".
5643 * inflow.c (sigquit_ours): Conditionally define.
5644 (new_tty): Move "tty" declaration inside #if.
5645 * guile/guile.c (guile_datadir): Conditionally define.
5646 * charset.c (set_be_le_names): Move some declarations inside #if.
5647 * btrace.c (parse_xml_btrace): Move "errcode" declaration inside
5648 #if.
5649 (parse_xml_btrace_conf): Likewise.
5650
5651 2018-07-22 Tom Tromey <tom@tromey.com>
5652
5653 * spu-tdep.c (spu_get_overlay_table): Remove unused variable.
5654
5655 2018-07-22 Tom Tromey <tom@tromey.com>
5656
5657 * guile/scm-value.c (gdbscm_value_call): Remove unused variables.
5658 * guile/scm-math.c (vlscm_unop_gdbthrow, vlscm_binop_gdbthrow)
5659 (vlscm_convert_typed_value_from_scheme): Remove unused variable.
5660 * buildsym-legacy.c (get_macro_table): Remove unused variable.
5661 * stack.c (frame_apply_level_command): Remove unused variable.
5662 * tic6x-tdep.c (tic6x_push_dummy_call): Remove unused variable.
5663 * sparc64-tdep.c (adi_examine_command): Remove unused variable.
5664 * rs6000-lynx178-tdep.c (rs6000_lynx178_push_dummy_call): Remove
5665 unused variable.
5666 * nios2-tdep.c (nios2_push_dummy_call): Remove unused variable.
5667 * mep-tdep.c (mep_push_dummy_call): Remove unused variable.
5668 * ada-lang.c (ada_lookup_symbol_list_worker): Remove unused
5669 variable.
5670 * amd64-tdep.c (amd64_supply_xsave): Remove unused variable.
5671 * arm-tdep.c (arm_record_data_proc_misc_ld_str): Remove unused
5672 variable.
5673 * breakpoint.c (check_no_tracepoint_commands, update_watchpoint):
5674 Remove unused variable.
5675 * cli/cli-script.c (recurse_read_control_structure): Remove unused
5676 variable.
5677 * common/tdesc.c (print_xml_feature::visit): Remove unused
5678 variable.
5679 * compile/compile-object-load.c (store_regs): Remove unused
5680 variables.
5681 * complaints.c (clear_complaints): Remove unused variable.
5682 * corelow.c (core_target_open): Remove unused variable.
5683 * fbsd-tdep.c (fbsd_core_info_proc_status): Remove unused
5684 variable.
5685 * guile/scm-frame.c (gdbscm_frame_read_var): Remove unused
5686 variable.
5687 * guile/scm-symtab.c (stscm_print_sal_smob): Remove unused
5688 variable.
5689 * guile/scm-type.c (gdbscm_field_baseclass_p): Remove unused
5690 variable.
5691 * guile/scm-utils.c (gdbscm_parse_function_args): Remove unused
5692 variable.
5693 * hppa-tdep.c (hppa_stub_frame_unwind_cache): Remove unused
5694 variable.
5695 * ia64-tdep.c (examine_prologue): Remove unused variable.
5696 * infcall.c (run_inferior_call): Remove unused variable.
5697 * inferior.c (exit_inferior): Remove unused variable.
5698 * infrun.c (infrun_thread_ptid_changed): Remove unused variable.
5699 * linespec.c (decode_line_2): Remove unused variable.
5700 * linux-nat.c (super_close): Remove.
5701 * linux-tdep.c (linux_info_proc): Remove unused variable.
5702 * mi/mi-main.c (mi_execute_command): Remove unused variable.
5703 * microblaze-linux-tdep.c (microblaze_linux_sigtramp_cache):
5704 Remove unused variable.
5705 * parse.c (find_minsym_type_and_address): Remove unused variable.
5706 * printcmd.c (info_symbol_command, printf_floating): Remove unused
5707 variable.
5708 * python/py-breakpoint.c (bppy_set_commands): Remove unused
5709 variable.
5710 * python/py-unwind.c (unwind_infopy_dealloc): Remove unused
5711 variables.
5712 * record-btrace.c (record_btrace_target::store_registers): Remove
5713 unused variable.
5714 (cmd_show_record_btrace_cpu): Remove unused variable.
5715 * riscv-tdep.c (riscv_register_reggroup_p)
5716 (riscv_push_dummy_call, riscv_return_value): Remove unused
5717 variable.
5718 * rust-exp.y (literal): Remove unused variable.
5719 * rust-lang.c (rust_evaluate_subexp) <OP_RUST_ARARAY>: Remove
5720 unused variable.
5721 <STRUCTOP_ANONYMOUS>: Likewise.
5722 * s390-linux-tdep.c (s390_linux_init_abi_31)
5723 (s390_linux_init_abi_64): Remove unused variable.
5724 * ser-ming2.c (ser_windows_read_prim, pipe_select_thread)
5725 (file_select_thread, net_windows_open, _initialize_ser_windows):
5726 Remove unused variables.
5727 * symtab.c (find_pc_sect_line): Remove unused variable.
5728 * target-memory.c (compute_garbled_blocks): Remove unused
5729 variable.
5730 (target_write_memory_blocks): Remove unused variable.
5731 * target.c (target_stack::unpush): Remove unused variables.
5732 * tracepoint.c (start_tracing, all_tracepoint_actions)
5733 (merge_uploaded_trace_state_variables)
5734 (print_one_static_tracepoint_marker): Remove unused variable.
5735 * unittests/basic_string_view/element_access/char/1.cc (test01):
5736 Remove unused variable.
5737 * windows-nat.c (windows_continue, windows_add_all_dlls)
5738 (do_initial_windows_stuff, windows_nat_target::create_inferior):
5739 Remove unused variables.
5740
5741 2018-07-21 Simon Marchi <simon.marchi@polymtl.ca>
5742
5743 * arm-tdep.c (arm_gdbarch_init): Declare attr_arch and
5744 attr_profile in HAVE_ELF.
5745 * rs6000-tdep.c (bfd_uses_spe_extensions): Declare vector_abi in
5746 HAVE_ELF.
5747
5748 2018-07-20 Simon Marchi <simon.marchi@polymtl.ca>
5749
5750 * frame.c (frame_register_unwind): Change parameter name.
5751 (frame_unwind_register): Likewise.
5752 (frame_unwind_register_value): Likewise.
5753 (frame_unwind_register_signed): Likewise.
5754 (frame_unwind_register_unsigned): Likewise.
5755 * frame.h (frame_register_unwind): Likewise.
5756 (frame_unwind_register): Likewise.
5757 (frame_unwind_register_value): Likewise.
5758 (frame_unwind_register_signed): Likewise.
5759 (frame_unwind_register_unsigned): Likewise.
5760 (frame_unwind_arch): Likewise.
5761
5762 2018-07-20 Maciej W. Rozycki <macro@mips.com>
5763
5764 * MAINTAINERS: Update my e-mail address, downgrade to MIPS I-IV
5765 ISA maintenance.
5766
5767 2018-07-20 Maciej W. Rozycki <macro@mips.com>
5768
5769 * mips-linux-nat.c (mips_linux_nat_target::read_description):
5770 Call `get_ptrace_pid' rather than extracting the ptrace PID by
5771 hand.
5772
5773 2018-07-20 Keith Seitz <keiths@redhat.com>
5774
5775 * buildsym.h (struct buildsym_compunit) <m_objfile, m_subfiles,
5776 m_main_subfile, m_comp_dir, m_producer, m_debugformat,
5777 m_compunit_symtab, m_language>: Add "m_" prefix.
5778 Update all uses.
5779 * buildsym.c: Update all uses.
5780
5781 2018-07-20 Tom Tromey <tom@tromey.com>
5782
5783 * buildsym-legacy.h (record_line): Don't use record_line_ftype.
5784 * buildsym.h (record_line_ftype): Remove typedef.
5785
5786 2018-07-20 Tom Tromey <tom@tromey.com>
5787
5788 * buildsym-legacy.h (augment_type_symtab): Don't declare.
5789 (end_expandable_symtab): Likewise.
5790 (end_symtab_get_static_block): Likewise.
5791 (end_symtab_from_static_block): Likewise.
5792 * buildsym-legacy.c (augment_type_symtab): Remove.
5793 (end_expandable_symtab): Remove.
5794 (end_symtab_get_static_block): Remove.
5795 (end_symtab_from_static_block): Remove.
5796
5797 2018-07-20 Tom Tromey <tom@tromey.com>
5798
5799 * dwarf2read.c: Include buildsym.h.
5800 (struct dwarf2_cu) <builder>: New method.
5801 (fixup_go_packaging): Update.
5802 (process_full_comp_unit, process_full_type_unit): Update. Don't
5803 use scoped_free_pendings.
5804 (using_directives): Add "cu" parameter, remove "language".
5805 (read_import_statement, setup_type_unit_groups, )
5806 (read_func_scope, read_lexical_block_scope)
5807 (dwarf2_record_block_ranges, read_namespace): Update.
5808 (lnp_state_machine::lnp_state_machine): Add cu parameter.
5809 (lnp_state_machine::handle_end_sequence): Update.
5810 (class lnp_state_machine) <m_cu>: New member.
5811 <m_record_line_callback>: Remove.
5812 <m_currently_recording_lines>: New member.
5813 (lnp_state_machine::handle_set_file): Update.
5814 (noop_record_line): Remove.
5815 (dwarf_record_line_p): Add cu parameter.
5816 (dwarf_record_line_1, dwarf_finish_line): Likewise.
5817 (lnp_state_machine::record_line)
5818 (lnp_state_machine::lnp_state_machine)
5819 (lnp_state_machine::check_line_address, dwarf_decode_lines_1)
5820 (dwarf_decode_lines): Update.
5821 (dwarf2_start_subfile): Add cu parameter.
5822 (dwarf2_start_symtab, new_symbol): Update.
5823 (macro_start_file, dwarf_decode_macro_bytes): Add cu parameter.
5824 Remove dwarf2_per_objfile parameter.
5825 (dwarf_decode_macros): Update.
5826
5827 2018-07-20 Tom Tromey <tom@tromey.com>
5828
5829 * stabsread.c (define_symbol): Update.
5830 * buildsym-legacy.h (get_buildsym_compunit): Declare.
5831 * dwarf2read.c (new_symbol): Update.
5832 * cp-support.h (cp_scan_for_anonymous_namespaces): Update.
5833 * cp-namespace.c: Include buildsym.h.
5834 (cp_scan_for_anonymous_namespaces): Add "compunit" parameter.
5835 * buildsym-legacy.c (get_buildsym_compunit): New function.
5836
5837 2018-07-20 Tom Tromey <tom@tromey.com>
5838
5839 * xcoffread.c: Include buildsym-legacy.h.
5840 * windows-nat.c: Include buildsym-legacy.h.
5841 * stabsread.c: Include buildsym-legacy.h.
5842 * mdebugread.c: Include buildsym-legacy.h.
5843 * buildsym-legacy.h: New file.
5844 * buildsym-legacy.c: New file, from buildsym.c.
5845 * go32-nat.c: Include buildsym-legacy.h.
5846 * dwarf2read.c: Include buildsym-legacy.h.
5847 * dbxread.c: Include buildsym-legacy.h.
5848 * cp-namespace.c: Include buildsym-legacy.h.
5849 * coffread.c: Include buildsym-legacy.h.
5850 * buildsym.h: Move some contents to buildsym-legacy.h.
5851 * buildsym.c: Include buildsym-legacy.h. Move many functions to
5852 buildsym-legacy.c.
5853 * Makefile.in (HFILES_NO_SRCDIR): Add buildsym-legacy.h.
5854
5855 2018-07-20 Tom Tromey <tom@tromey.com>
5856
5857 * buildsym.h (struct buildsym_compunit): Move from buildsym.c.
5858 * buildsym.c (struct buildsym_compunit): Move to buildsym.h.
5859 (buildsym_compunit::buildsym_compunit)
5860 (buildsym_compunit::~buildsym_compunit)
5861 (buildsym_compunit::get_macro_table): Define.
5862
5863 2018-07-20 Tom Tromey <tom@tromey.com>
5864
5865 * buildsym.c (reset_symtab_globals): Remove.
5866 (buildsym_compunit::end_symtab_from_static_block): Update.
5867 (buildsym_compunit::augment_type_symtab): Update.
5868 (end_symtab_from_static_block): Call free_buildsym_compunit.
5869 (augment_type_symtab, end_symtab, end_expandable_symtab):
5870 Likewise.
5871
5872 2018-07-20 Tom Tromey <tom@tromey.com>
5873
5874 * arch-utils.c: Do not include buildsym.h.
5875 * mipsread.c: Do not include buildsym.h.
5876 * machoread.c: Do not include buildsym.h.
5877 * elfread.c: Do not include buildsym.h.
5878
5879 2018-07-20 Tom Tromey <tom@tromey.com>
5880
5881 * buildsym.c (buildsym_compunit::buildsym_compunit): Do more
5882 initialization.
5883 (buildsym_compunit): Add new constructor.
5884 (struct buildsym_compunit) <get_last_source_file, finish_block,
5885 record_block_range, start_subfile, patch_subfile_names,
5886 push_subfile, pop_subfile, record_line, get_compunit_symtab,
5887 set_last_source_start_addr, get_last_source_start_addr,
5888 get_local_using_directives, set_local_using_directives,
5889 get_global_using_directives, outermost_context_p,
5890 get_current_context_stack, get_context_stack_depth,
5891 get_current_subfile, get_local_symbols, get_file_symbols,
5892 get_global_symbols, record_debugformat, record_producer,
5893 push_context, pop_context, end_symtab_get_static_block,
5894 end_symtab_from_static_block, end_symtab, end_expandable_symtab>:
5895 New public methods.
5896 <record_pending_block, finish_block_internal, make_blockvector,
5897 watch_main_source_file_lossage, end_symtab_with_blockvector>: New
5898 private methods.
5899 Update all users.
5900
5901 2018-05-22 Tom Tromey <tom@tromey.com>
5902
5903 * buildsym.c (record_pending_block): Move earlier. Remove objfile
5904 parameter.
5905 (finish_block_internal): Update.
5906
5907 2018-07-20 Tom Tromey <tom@tromey.com>
5908
5909 * buildsym.c (record_pending_block): Move earlier. Remove objfile
5910 parameter.
5911 (finish_block_internal): Update.
5912
5913 2018-07-20 Tom Tromey <tom@tromey.com>
5914
5915 * buildsym.h (EXTERN): Don't define or undef.
5916 * buildsym.c (EXTERN): Don't define.
5917
5918 2018-07-20 Tom Tromey <tom@tromey.com>
5919
5920 * buildsym.c: Remove TODO comment.
5921
5922 2018-07-20 Tom Tromey <tom@tromey.com>
5923
5924 * coffread.c (coff_symtab_read): Update.
5925 * xcoffread.c (xcoff_psymtab_to_symtab_1): Update.
5926 (xcoff_new_init): Update.
5927 * mipsread.c (mipscoff_new_init): Update.
5928 * mdebugread.c (mdebug_build_psymtabs): Update.
5929 * elfread.c (elf_new_init): Update.
5930 * dwarf2read.c (process_full_comp_unit, process_full_type_unit):
5931 Update.
5932 * dbxread.c (dbx_new_init, dbx_psymtab_to_symtab_1)
5933 (coffstab_build_psymtabs, elfstab_build_psymtabs)
5934 (stabsect_build_psymtabs): Update.
5935 * buildsym.h (buildsym_init): Don't declare.
5936 * buildsym.c: Update comment.
5937 (prepare_for_building): Remove.
5938 (start_symtab, restart_symtab): Update.
5939 (reset_symtab_globals): Update comment.
5940 (buildsym_init): Remove.
5941
5942 2018-07-20 Tom Tromey <tom@tromey.com>
5943
5944 * xcoffread.c (read_xcoff_symtab, process_xcoff_symbol): Update.
5945 * stabsread.c (patch_block_stabs, define_symbol, read_type)
5946 (read_enum_type, common_block_start, common_block_end)
5947 (cleanup_undefined_types_1, finish_global_stabs): Update.
5948 * mdebugread.c (psymtab_to_symtab_1): Update.
5949 * dwarf2read.c (fixup_go_packaging, read_func_scope)
5950 (read_lexical_block_scope, new_symbol): Update.
5951 * dbxread.c (process_one_symbol): Update.
5952 * coffread.c (coff_symtab_read, process_coff_symbol)
5953 (coff_read_enum_type): Update.
5954 * buildsym.h (file_symbols, global_symbols, local_symbols): Don't
5955 declare.
5956 (get_local_symbols, get_file_symbols, get_global_symbols): New
5957 functions.
5958 * buildsym.c (~buildsym_compunit): Clean up m_file_symbols and
5959 m_global_symbols.
5960 <m_file_symbols, m_local_symbols, m_global_symbols>: New members.
5961 (~scoped_free_pendings): Update.
5962 (finish_block, prepare_for_building, reset_symtab_globals)
5963 (end_symtab_get_static_block, end_symtab_with_blockvector)
5964 (augment_type_symtab, push_context): Update.
5965 (get_local_symbols, get_file_symbols, get_global_symbols): New
5966 functions.
5967 (buildsym_init): Update.
5968
5969 2018-07-20 Tom Tromey <tom@tromey.com>
5970
5971 * dwarf2read.c (process_full_comp_unit): Do not set list_in_scope.
5972 (process_full_type_unit): Likewise.
5973 (dwarf2_start_symtab): Set list_in_scope.
5974
5975 2018-07-20 Tom Tromey <tom@tromey.com>
5976
5977 * dwarf2read.c (process_psymtab_comp_unit_reader)
5978 (build_type_psymtabs_reader): Do not set list_in_scope.
5979
5980 2018-07-20 Tom Tromey <tom@tromey.com>
5981
5982 * buildsym.c (free_pendings): Remove.
5983 (add_symbol_to_list, scoped_free_pendings)
5984 (finish_block_internal, buildsym_init): Update.
5985
5986 2018-07-20 Tom Tromey <tom@tromey.com>
5987
5988 * xcoffread.c (read_xcoff_symtab): Update.
5989 * dwarf2read.c (read_func_scope, read_lexical_block_scope):
5990 Update.
5991 * dbxread.c (process_one_symbol): Update.
5992 * coffread.c (coff_symtab_read): Update.
5993 * buildsym.h (finish_block): Update.
5994 * buildsym.c (finish_block): Remove "listhead" argument.
5995 (end_symtab_get_static_block): Update.
5996
5997 2018-07-20 Tom Tromey <tom@tromey.com>
5998
5999 * buildsym.h (class scoped_free_pendings): Remove constructor.
6000 * buildsym.c (struct buildsym_compunit) <free_pending_blocks>: New
6001 method.
6002 <m_pending_block_obstack, m_pending_blocks>: New members.
6003 (pending_block_obstack, pending_blocks): Remove.
6004 (scoped_free_pendings::scoped_free_pendings): Default.
6005 (~scoped_free_pendings): Update.
6006 (free_pending_blocks): Remove.
6007 (finish_block_internal, record_pending_block, make_blockvector)
6008 (end_symtab_get_static_block, augment_type_symtab, push_context)
6009 (buildsym_init): Update.
6010
6011 2018-07-20 Tom Tromey <tom@tromey.com>
6012
6013 * buildsym.c (struct buildsym_compunit) <m_pending_addrmap,
6014 m_pending_addrmap_obstack, m_pending_addrmap_interesting>: New
6015 members.
6016 (pending_addrmap, pending_addrmap_obstack)
6017 (pending_addrmap_interesting): Remove.
6018 (scoped_free_pendings, record_block_range, make_blockvector)
6019 (prepare_for_building, reset_symtab_globals, buildsym_init):
6020 Update.
6021
6022 2018-07-20 Tom Tromey <tom@tromey.com>
6023
6024 * xcoffread.c (process_linenos): Update.
6025 * stabsread.c (define_symbol, read_type, read_enum_type): Update.
6026 * mdebugread.c (psymtab_to_symtab_1): Update.
6027 * dwarf2read.c (setup_type_unit_groups)
6028 (lnp_state_machine::handle_set_file, dwarf_record_line_p)
6029 (lnp_state_machine::record_line, dwarf_decode_lines): Update.
6030 * dbxread.c (process_one_symbol): Update.
6031 * coffread.c (coff_symtab_read, enter_linenos)
6032 (process_coff_symbol): Update.
6033 * buildsym.h (current_subfile): Don't declare.
6034 (get_current_subfile): Declare.
6035 * buildsym.c (struct buildsym_compunit) <m_current_subfile>: New
6036 member.
6037 (start_subfile, free_buildsym_compunit, push_subfile)
6038 (prepare_for_building, start_symtab): Update.
6039 (get_current_subfile): New function.
6040
6041 2018-07-20 Tom Tromey <tom@tromey.com>
6042
6043 * coffread.c (coff_symtab_read): Update.
6044 * xcoffread.c (read_xcoff_symtab): Update.
6045 * dwarf2read.c (new_symbol): Update.
6046 (read_func_scope, read_lexical_block_scope): Update.
6047 * dbxread.c (process_one_symbol): Update.
6048 * buildsym.h (context_stack, context_stack_depth): Don't declare.
6049 (outermost_context_p): Remove macro.
6050 (outermost_context_p, get_current_context_stack)
6051 (get_context_stack_depth): Declare.
6052 (pop_context): Return struct context_stack.
6053 * buildsym.c (struct buildsym_compunit) <m_context_stack: New
6054 member.
6055 (context_stack_size): Remove.
6056 (INITIAL_CONTEXT_STACK_SIZE): Remove.
6057 (prepare_for_building, end_symtab_get_static_block)
6058 (augment_type_symtab, push_context): Update.
6059 (pop_context): Return struct context_stack.
6060 (outermost_context_p, get_current_context_stack)
6061 (get_context_stack_depth): New functions.
6062 (buildsym_init): Update.
6063
6064 2018-07-20 Tom Tromey <tom@tromey.com>
6065
6066 * rust-exp.y: Now a pure parser. Update all rules.
6067 (%union): Move earlier.
6068 (current_parser, work_obstack): Remove globals.
6069 (rust_parser, ~rust_parser): Update.
6070 (class rust_parser) <copy_name, concat3, crate_name, super_name,
6071 lex_character, lex_number, lex_string, lex_identifier,
6072 rust_lookup_type, convert_params_to_types, convert_ast_to_type,
6073 convert_name, convert_params_to_expression,
6074 convert_ast_to_expression, ast_basic_type, ast_operation,
6075 ast_compound_assignment, rust_op, ast_literal, ast_dliteral,
6076 ast_structop, ast_structop_anonymous, ast_unary, ast_cast,
6077 ast_call_ish, ast_path, ast_string, ast_struct, ast_range,
6078 ast_array_type, ast_slice_type, ast_reference_type,
6079 ast_pointer_type, ast_function_type, ast_tuple_type>: New methods.
6080 (rust_parse): Update.
6081 (rustyyerror, rustyylex): Add parser parameter.
6082 (rust_lex_test_one, rust_lex_int_test, rust_lex_exception_test)
6083 (rust_lex_stringish_test, rust_lex_test_sequence)
6084 (rust_lex_test_trailing_dot, rust_lex_test_completion)
6085 (rust_lex_test_push_back, rust_lex_tests): Update.
6086
6087 2018-07-19 Pedro Alves <palves@redhat.com>
6088
6089 * guile/guile-internal.h (gdbscm_scm_to_c_string): Now returns a
6090 gdb::unique_xmalloc_ptr.
6091 * guile/scm-breakpoint.c (gdbscm_set_breakpoint_condition_x):
6092 Adjust to use dbscm_wrap and gdb::unique_xmalloc_ptr.
6093 * guile/scm-exception.c (gdbscm_exception_message_to_string): Use
6094 copy-initialization.
6095 * guile/scm-pretty-print.c (ppscm_print_children): Use
6096 gdb::unique_xmalloc_ptr instead of cleanups.
6097 (gdbscm_apply_val_pretty_printer): Remove cleanups.
6098 * guile/scm-string.c (gdbscm_scm_to_c_string): Now returns a
6099 gdb::unique_xmalloc_ptr.
6100 * guile/scm-type.c (gdbscm_type_field, gdbscm_type_has_field_p):
6101 Adjust to use gdb::unique_xmalloc_ptr.
6102 * guile/scm-utils.c (extract_arg): Adjust.
6103 * guile/scm-value.c (gdbscm_value_field): Adjust to use
6104 gdb::unique_xmalloc_ptr instead of a cleanup.
6105
6106 2018-07-19 Tom Tromey <tom@tromey.com>
6107
6108 * utils.c (do_value_free_to_mark)
6109 (make_cleanup_value_free_to_mark): Remove.
6110 * utils.h (make_cleanup_value_free_to_mark): Remove.
6111
6112 2018-07-19 Pedro Alves <palves@redhat.com>
6113
6114 * guile/guile-internal.h (gdbscm_wrap): Really make 'args' a
6115 forwarding reference.
6116
6117 2018-07-18 Pedro Alves <palves@redhat.com>
6118
6119 * guile/guile.c (gdbscm_execute_gdb_command): Adjust to use
6120 gdbscm_wrap. Use gdb::unique_xmalloc_ptr<char> instead of a
6121 cleanup.
6122
6123 2018-07-18 Pedro Alves <palves@redhat.com>
6124
6125 * guile/guile-internal.h: Add comment about mixing GDB and Scheme
6126 exceptions.
6127 (GDBSCM_HANDLE_GDB_EXCEPTION_WITH_CLEANUPS): Delete.
6128 (gdbscm_wrap): New.
6129 * guile/scm-frame.c (gdbscm_frame_read_register): Use xfree
6130 directly instead of a cleanup.
6131 * guile/scm-math.c (vlscm_unop_gdbthrow): New, factored out from ...
6132 (vlscm_unop): ... this. Reimplement using gdbscm_wrap.
6133 (vlscm_binop_gdbthrow): New, factored out from ...
6134 (vlscm_binop): ... this. Reimplement using gdbscm_wrap.
6135 (vlscm_rich_compare): Use gdbscm_wrap.
6136 * guile/scm-symbol.c (gdbscm_lookup_symbol): Use xfree directly
6137 instead of a cleanup.
6138 (gdbscm_lookup_global_symbol): Use xfree directly instead of a
6139 cleanup.
6140 * guile/scm-type.c (gdbscm_type_field, gdbscm_type_has_field_p):
6141 Use xfree directly instead of a cleanup.
6142 * guile/scm-value.c (gdbscm_make_value, gdbscm_make_lazy_value):
6143 Adjust to use gdbscm_wrap and scoped_value_mark.
6144 (gdbscm_value_optimized_out_p): Adjust to use gdbscm_wrap.
6145 (gdbscm_value_address, gdbscm_value_dereference)
6146 (gdbscm_value_referenced_value): Adjust to use gdbscm_wrap and
6147 scoped_value_mark.
6148 (gdbscm_value_dynamic_type): Use scoped_value_mark.
6149 (vlscm_do_cast, gdbscm_value_field): Adjust to use gdbscm_wrap and
6150 scoped_value_mark.
6151 (gdbscm_value_subscript, gdbscm_value_call): Adjust to use
6152 gdbscm_wrap and scoped_value_mark.
6153 (gdbscm_value_to_string): Use xfree directly instead of a
6154 cleanup. Move 'buffer' unique_ptr to TRY scope.
6155 (gdbscm_value_to_lazy_string): Use xfree directly instead of a
6156 cleanup. Move 'buffer' unique_ptr to TRY scope. Use
6157 scoped_value_mark.
6158 (gdbscm_value_fetch_lazy_x): Use gdbscm_wrap.
6159 (gdbscm_parse_and_eval): Adjust to use gdbscm_wrap and
6160 scoped_value_mark.
6161 (gdbscm_history_ref, gdbscm_history_append_x): Adjust to use
6162 gdbscm_wrap.
6163
6164 2018-07-18 Tom de Vries <tdevries@suse.de>
6165
6166 * findvar.c (default_read_var_value): Also resolve dynamic type for
6167 LOC_OPTIMIZED_OUT vars.
6168
6169 2018-07-18 Maciej W. Rozycki <macro@mips.com>
6170
6171 * mips-tdep.c (micromips_next_pc): Add SYSCALL instruction
6172 decoding.
6173
6174 2018-07-17 Tom Tromey <tom@tromey.com>
6175
6176 * guile/scm-param.c (pascm_set_func, pascm_show_func)
6177 (compute_enum_list, pascm_set_param_value_x)
6178 (gdbscm_parameter_value): Update.
6179 * guile/guile-internal.h (gdbscm_scm_to_string): Update.
6180 (gdbscm_scm_to_host_string): Update.
6181 * guile/scm-math.c (vlscm_convert_typed_value_from_scheme):
6182 Update.
6183 * guile/scm-cmd.c (cmdscm_add_completion): Update.
6184 * guile/scm-pretty-print.c (ppscm_print_string_repr): Update.
6185 * guile/scm-string.c (gdbscm_scm_to_string): Return
6186 unique_xmalloc_ptr.
6187 (gdbscm_scm_to_host_string): Likewise.
6188
6189 2018-07-17 Tom Tromey <tom@tromey.com>
6190
6191 * guile/guile.c (gdbscm_eval_from_control_command): Update.
6192 * guile/guile-internal.h (gdbscm_safe_eval_string): Update.
6193 * guile/scm-objfile.c (gdbscm_execute_objfile_script): Update.
6194 * guile/scm-safe-call.c (gdbscm_safe_eval_string): Return
6195 unique_xmalloc_ptr.
6196
6197 2018-07-17 Tom Tromey <tom@tromey.com>
6198
6199 * guile/scm-param.c (pascm_signal_setshow_error): Update.
6200 * guile/guile-internal.h (gdbscm_exception_message_to_string):
6201 Update.
6202 * guile/scm-cmd.c (cmdscm_function): Update.
6203 * guile/scm-pretty-print.c
6204 (ppscm_print_exception_unless_memory_error): Update.
6205 * guile/scm-exception.c (gdbscm_exception_message_to_string):
6206 Return unique_xmalloc_ptr.
6207
6208 2018-07-17 Tom Tromey <tom@tromey.com>
6209
6210 * guile/scm-pretty-print.c (ppscm_make_pp_type_error_exception):
6211 Use string_printf.
6212
6213 2018-07-17 Jim Wilson <jimw@sifive.com>
6214
6215 * riscv-tdep.c (riscv_has_feature): Delete comment that refers to
6216 set_gdbarch_decr_pc_after_break. Call riscv_read_misa_reg always.
6217 (riscv_gdbarch_init): Delete local has_compressed_isa. Delete now
6218 unecessary braces after EF_RISCV_RVC test. Delete call to
6219 set_gdbarch_decr_pc_after_break.
6220
6221 * riscv-tdep.h (DECLARE_CSR): Use RISCV_FIRST_CSR_REGNUM instead of
6222 RISCV_LAST_FP_REGNUM + 1.
6223 (RSICV_CSR_LEGACY_MISA_REGNUM): Add RISCV_FIRST_CSR_REGNUM.
6224
6225 2018-07-17 Tom Tromey <tom@tromey.com>
6226
6227 * configure.ac: Remove --disable-gdbcli.
6228 * configure: Rebuild.
6229 * Makefile.in (SUBDIR_CLI_DEPS, SUBDIR_CLI_LDFLAGS)
6230 (SUBDIR_CLI_CFLAGS): Remove.
6231 (SFILES): Use SUBDIR_CLI_SRCS.
6232 (COMMON_OBS): Use SUBDIR_CLI_OBS.
6233
6234 2018-07-17 Tom Tromey <tom@tromey.com>
6235
6236 PR gdb/18624:
6237 * coffread.c (coff_symtab_read): Use scoped_free_pendings.
6238
6239 2018-07-16 Jim Wilson <jimw@sifive.com>
6240
6241 * riscv-tdep.c (riscv_gdbarch_init): Call gdbarch_init_osabi.
6242
6243 2018-07-16 Simon Marchi <simon.marchi@ericsson.com>
6244
6245 * ia64-libunwind-tdep.c (libunwind_frame_cache): Remove unused
6246 variable.
6247 (libunwind_frame_sniffer): Likewise.
6248 (libunwind_frame_prev_register): Likewise.
6249 (libunwind_sigtramp_frame_sniffer): Likewise.
6250 * ia64-tdep.c (ia64_access_reg): Likewise.
6251 (ia64_access_rse_reg): Likewise.
6252 (ia64_libunwind_sigtramp_frame_this_id): Likewise.
6253 * ia64-vms-tdep.c (ia64_vms_find_proc_info_x): Likewise.
6254
6255 2018-07-16 Simon Marchi <simon.marchi@ericsson.com>
6256
6257 * ia64-vms-tdep.c (ia64_vms_find_proc_info_x): Add cast.
6258
6259 2018-07-16 Simon Marchi <simon.marchi@ericsson.com>
6260
6261 * remote-sim.c (gdbsim_target::close,
6262 gdbsim_target::mourn_inferior): Remove unused variables.
6263
6264 2018-07-16 Simon Marchi <simon.marchi@polymtl.ca>
6265
6266 * ia64-tdep.c (ktab_buf): New global.
6267 (getunwind_table): Return a gdb::optional<gdb::byte_vector>.
6268 (get_kernel_table): Adjust.
6269
6270 2018-07-16 Tom Tromey <tom@tromey.com>
6271
6272 * xcoffread.c (read_xcoff_symtab): Use outermost_context_p.
6273 * dwarf2read.c (using_directives, new_symbol): Use
6274 outermost_context_p.
6275 * dbxread.c (process_one_symbol): Use outermost_context_p.
6276 * coffread.c (coff_symtab_read): Use outermost_context_p.
6277
6278 2018-07-16 Tom Tromey <tom@tromey.com>
6279
6280 * dwarf2read.c (using_directives, read_func_scope)
6281 (read_lexical_block_scope): Update.
6282 * cp-namespace.c (cp_scan_for_anonymous_namespaces): Update.
6283 * buildsym.h (local_using_directives, global_using_directives):
6284 Don't declare.
6285 (get_local_using_directives, set_local_using_directives)
6286 (get_global_using_directives): Declare.
6287 * buildsym.c (struct buildsym_compunit) <m_local_using_directives,
6288 m_global_using_directives>: New members.
6289 (finish_block_internal, prepare_for_building)
6290 (reset_symtab_globals, end_symtab_get_static_block)
6291 (push_context): Update.
6292 (get_local_using_directives, set_local_using_directives)
6293 (get_global_using_directives): New functions.
6294 (buildsym_init): Update.
6295
6296 2018-07-16 Tom Tromey <tom@tromey.com>
6297
6298 * xcoffread.c (xcoff_initial_scan): Don't call
6299 free_pending_blocks.
6300 * dbxread.c (dbx_symfile_read): Don't call free_pending_blocks.
6301 * buildsym.h (class scoped_free_pendings): Add constructor.
6302 (free_pending_blocks): Don't declare.
6303 * buildsym.c (scoped_free_pendings::scoped_free_pendings): New.
6304 (free_pending_blocks): Now static.
6305
6306 2018-07-16 Tom Tromey <tom@tromey.com>
6307
6308 * buildsym.h (push_subfile, pop_subfile): Update declarations.
6309 * buildsym.c (struct buildsym_compunit) <m_subfile_stack>: New
6310 member.
6311 (struct subfile_stack): Remove.
6312 (subfile_stack): Remove.
6313 (push_subfile, pop_subfile, buildsym_init): Update.
6314
6315 2018-07-16 Tom Tromey <tom@tromey.com>
6316
6317 * buildsym.c (push_subfile): Use gdb_assert.
6318 (pop_subfile): Use gdb_assert.
6319
6320 2018-07-16 Tom Tromey <tom@tromey.com>
6321
6322 * buildsym.h (merge_symbol_lists): Remove.
6323 * buildsym.c (merge_symbol_lists): Remove.
6324
6325 2018-07-16 Tom Tromey <tom@tromey.com>
6326
6327 * stabsread.c (scan_file_globals): Update comment.
6328 * stabsread.h (scan_file_globals): Move from buildsym.h.
6329 * buildsym.h (scan_file_globals): Move to stabsread.h.
6330
6331 2018-07-16 Tom Tromey <tom@tromey.com>
6332
6333 * xcoffread.c (xcoff_new_init): Update.
6334 * mipsread.c (mipscoff_new_init): Update.
6335 * mdebugread.c (mdebug_build_psymtabs): Update.
6336 * elfread.c (elf_new_init): Update.
6337 * dbxread.c (dbx_new_init, coffstab_build_psymtabs)
6338 (elfstab_build_psymtabs, stabsect_build_psymtabs): Update.
6339 * buildsym.h (buildsym_new_init): Don't declare.
6340 * buildsym.c (buildsym_new_init): Remove.
6341
6342 2018-07-16 Tom Tromey <tom@tromey.com>
6343
6344 * stabsread.h (within_function): Move from buildsym.h.
6345 * stabsread.c (start_stabs): Clear within_function.
6346 * coffread.c (coff_start_symtab): Clear within_function.
6347 * buildsym.h (within_function): Move to stabsread.h.
6348 * buildsym.c (prepare_for_building): Update.
6349
6350 2018-07-16 Tom Tromey <tom@tromey.com>
6351
6352 * stabsread.h (processing_gcc_compilation): Move from buildsym.h.
6353 * dwarf2read.c (dwarf2_start_symtab): Don't set
6354 processing_gcc_compilation.
6355 * buildsym.h (processing_gcc_compilation): Move to stabsread.h.
6356
6357 2018-07-16 Tom Tromey <tom@tromey.com>
6358
6359 * stabsread.h (HASHSIZE, hashname, symnum, next_symbol_text)
6360 (next_symbol_text_func): Move from buildsym.h.
6361 * stabsread.c (hashname): Move from buildsym.c.
6362 * buildsym.h (HASHSIZE, symnum, next_symbol_text)
6363 (next_symbol_text_func, hashname): Move to stabsread.h.
6364 * buildsym.c: Don't include bcache.h
6365 (hashname): Move to stasbread.c.
6366
6367 2018-07-16 Tom Tromey <tom@tromey.com>
6368
6369 * buildsym.h (context_stack_size): Don't declare.
6370 * buildsym.c (context_stack_size): New global.
6371
6372 2018-07-16 Tom Tromey <tom@tromey.com>
6373
6374 * dbxread.c (processing_acc_compilation): New global.
6375 * buildsym.h (processing_acc_compilation): Don't declare.
6376
6377 2018-07-16 Tom Tromey <tom@tromey.com>
6378
6379 * xcoffread.c (aix_process_linenos, complete_symtab): Update.
6380 * dbxread.c (read_ofile_symtab): Update.
6381 * coffread.c (coff_start_symtab, coff_end_symtab): Update.
6382 * buildsym.h (last_source_start_addr): Remove.
6383 (set_last_source_start_addr, get_last_source_start_addr):
6384 Declare.
6385 * buildsym.c (buildsym_compunit::buildsym_compunit): Add last_addr
6386 parameter.
6387 (struct buildsym_compunit) <m_last_source_start_addr>: New
6388 member.
6389 (prepare_for_building): Remove start_addr parameter.
6390 (start_symtab, restart_symtab, end_symtab_get_static_block)
6391 (end_symtab_with_blockvector): Update.
6392 (set_last_source_start_addr, get_last_source_start_addr): New
6393 functions.
6394
6395 2018-07-16 Tom Tromey <tom@tromey.com>
6396
6397 * buildsym.c (struct buildsym_compunit) <m_have_line_numbers>: New
6398 member.
6399 (have_line_numbers): Remove.
6400 (record_line, prepare_for_building, end_symtab_get_static_block)
6401 (augment_type_symtab): Update.
6402
6403 2018-07-16 Tom Tromey <tom@tromey.com>
6404
6405 * buildsym.c (~buildsym_compunit): Free the macro table.
6406 (struct buildsym_compunit) <get_macro_table, release_macros>: New
6407 methods.
6408 <m_pending_macros>: New member.
6409 (pending_macros): Remove.
6410 (~scoped_free_pendings, get_macro_table, prepare_for_building)
6411 (reset_symtab_globals, end_symtab_get_static_block)
6412 (end_symtab_with_blockvector, augment_type_symtab)
6413 (buildsym_init): Update.
6414
6415 2018-07-16 Tom Tromey <tom@tromey.com>
6416
6417 * buildsym.c (buildsym_compunit::buildsym_compunit): Add name
6418 parameter.
6419 (buildsym_compunit::set_last_source_file): New method.
6420 <m_last_source_file>: New member.
6421 (prepare_for_building): Remove "name" parameter.
6422 (start_symtab, restart_symtab, reset_symtab_globals): Update.
6423 (last_source_file): Remove.
6424 (set_last_source_file, get_last_source_file): Update.
6425
6426 2018-07-16 Tom Tromey <tom@tromey.com>
6427
6428 * buildsym.c (prepare_for_building): Add assert.
6429
6430 2018-07-16 Tom Tromey <tom@tromey.com>
6431
6432 * buildsym.c (~buildsym_compunit): Update.
6433 (struct buildsym_compunit) <comp_unit>: Now a unique_xmalloc_ptr.
6434 (start_subfile, patch_subfile_names)
6435 (end_symtab_with_blockvector): Update.
6436
6437 2018-07-16 Tom Tromey <tom@tromey.com>
6438
6439 * buildsym.c (struct buildsym_compunit): Add constructor,
6440 destructor, initializers.
6441 (start_buildsym_compunit): Remove.
6442 (free_buildsym_compunit): Use "delete".
6443 (start_symtab, restart_symtab): Use "new".
6444
6445 2018-07-13 Simon Marchi <simon.marchi@polymtl.ca>
6446
6447 * symfile.c (set_objfile_default_section_offset): Remove struct
6448 keyword.
6449
6450 2018-07-14 Stafford Horne <shorne@gmail.com>
6451
6452 * (Responsible Maintainers): Add myself as or1k maintainer.
6453
6454 2018-07-13 Tom Tromey <tom@tromey.com>
6455
6456 * symfile.c (set_objfile_default_section_offset): Use extra braces
6457 around initializer.
6458
6459 2018-07-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
6460
6461 * s390-tdep.c (s390_displaced_step_fixup): Adjust PC for a
6462 non-branching basr.
6463
6464 2018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
6465
6466 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
6467 unittests/cli-utils-selftests.c
6468 * unittests/cli-utils-selftests.c: New file.
6469
6470 2018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
6471
6472 * NEWS: Mention new commands. Mention change to 'thread apply'.
6473
6474 2018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
6475
6476 * thread.c (thr_try_catch_cmd): New function.
6477 (thread_apply_all_command): Handle qcs flags.
6478 (thread_apply_command): Handle qcs flags.
6479 (taas_command): New function.
6480 (tfaas_command): New function.
6481 (_initialize_thread): Update to setup the new commands 'taas
6482 and 'tfaas'. Change doc string for 'thread apply'.
6483
6484 2018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
6485
6486 * stack.c: (trailing_outermost_frame): New function, mostly
6487 extracted from backtrace_command_1.
6488 (leading_innermost_frame): New function.
6489 (backtrace_command_1): Update to call trailing_outermost_frame.
6490 (frame_apply_command_count): New function.
6491 (frame_apply_level_command): New function.
6492 (frame_apply_all_command): New function.
6493 (frame_apply_command): New function.
6494 (faas_command): New function.
6495 (frame_cmd_list): New variable.
6496 (_initialize_stack): Update to setup the new commands 'frame apply'
6497 and 'faas'.
6498
6499 2018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
6500
6501 * cli-utils.c (number_or_range_parser::get_number): Only handle
6502 numbers or convenience var as numbers.
6503 (parse_flags): New function.
6504 (parse_flags_qcs): New function.
6505 (number_or_range_parser::finished): Ensure parsing end is detected
6506 before end of string.
6507 * cli-utils.h (parse_flags): New function.
6508 (parse_flags_qcs): New function.
6509 (number_or_range_parser): Remove m_finished bool.
6510 (number_or_range_parser::skip_range): Set m_in_range to false.
6511
6512 2018-07-12 Sergio Durigan Junior <sergiodj@redhat.com>
6513
6514 * ser-tcp.c (try_connect): Declare 'ioarg' as 'u_long' if building
6515 on Windows.
6516
6517 2018-07-11 Sergio Durigan Junior <sergiodj@redhat.com>
6518 Jan Kratochvil <jan.kratochvil@redhat.com>
6519 Paul Fertser <fercerpav@gmail.com>
6520 Tsutomu Seki <sekiriki@gmail.com>
6521 Pedro Alves <palves@redhat.com>
6522
6523 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
6524 'unittests/parse-connection-spec-selftests.c'.
6525 (COMMON_SFILES): Add 'common/netstuff.c'.
6526 (HFILES_NO_SRCDIR): Add 'common/netstuff.h'.
6527 * NEWS (Changes since GDB 8.2): Mention IPv6 support.
6528 * common/netstuff.c: New file.
6529 * common/netstuff.h: New file.
6530 * ser-tcp.c: Include 'netstuff.h' and 'wspiapi.h'.
6531 (wait_for_connect): Update comment. New parameter
6532 'gdb::optional<int> sock' instead of 'struct serial *scb'.
6533 Use 'sock' directly instead of 'scb->fd'.
6534 (try_connect): New function, with code from 'net_open'.
6535 (net_open): Rewrite main loop to deal with multiple
6536 sockets/addresses. Handle IPv6-style hostnames; implement
6537 support for IPv6 connections.
6538 * unittests/parse-connection-spec-selftests.c: New file.
6539
6540 2018-07-11 Pedro Alves <palves@redhat.com>
6541
6542 PR gdb/23377
6543 * remote.c (remote_target::remote_detach_pid): Call
6544 set_current_process.
6545
6546 2018-07-11 Pedro Alves <palves@redhat.com>
6547
6548 * h8300-tdep.c (h8300_gdbarch_init): Remove
6549 set_gdbarch_ecoff_reg_to_regnum calls.
6550
6551 2018-07-11 Sergio Durigan Junior <sergiodj@redhat.com>
6552
6553 PR c++/23373
6554 * c-typeprint.c (c_type_print_base_struct_union): Don't print
6555 offsets/sizes for static members of a class/struct.
6556
6557 2018-07-11 Alan Hayward <alan.hayward@arm.com>
6558
6559 * target-descriptions.c (tdesc_register_bitsize): Rename.
6560 * target-descriptions.h (tdesc_register_bitsize): Likewise.
6561 * rs6000-tdep.c (rs6000_gdbarch_init): Use new name.
6562 * aarch64-tdep.c (aarch64_get_tdesc_vq): Convert size.
6563
6564 2018-07-10 Tom Tromey <tom@tromey.com>
6565
6566 * breakpoint.c (moribund_locations): Now static and a
6567 std::vector.
6568 (breakpoint_init_inferior, moribund_breakpoint_here_p)
6569 (build_bpstat_chain, update_global_location_list)
6570 (breakpoint_retire_moribund): Update.
6571 * breakpoint.h (bp_location_p): Remove typedef. Don't declare
6572 VEC.
6573
6574 2018-07-10 Andrew Burgess <andrew.burgess@embecosm.com>
6575
6576 * riscv-tdep.c (riscv_is_fp_regno_p): New function.
6577 (riscv_register_reggroup_p): Use new function, remove unneeded
6578 parenthesis.
6579 (riscv_push_dummy_call): Extend assert to compare against xlen or
6580 flen based on register type.
6581
6582 2018-07-10 Andrew Burgess <andrew.burgess@embecosm.com>
6583
6584 * riscv-tdep.c (riscv_print_arg_location): Use TYPE_SAFE_NAME.
6585
6586 2018-07-09 Andrew Burgess <andrew.burgess@embecosm.com>
6587
6588 * remote.c (show_hardware_watchpoint_limit): New function.
6589 (show_hardware_watchpoint_length_limit): New function.
6590 (show_hardware_breakpoint_limit): New function.
6591 (_initialize_remote): Use add_setshow_zuinteger_unlimited_cmd
6592 where appropriate, update help text.
6593
6594 2018-07-09 Tom Tromey <tom@tromey.com>
6595
6596 * Makefile.in (CDEPS): Don't mention XM_CDEPS.
6597 (CLIBS): Don't mention NAT_CLIBS.
6598
6599 2018-07-09 Tom Tromey <tom@tromey.com>
6600
6601 * Makefile.in (ADD_FILES, ADD_DEPS): Remove.
6602 (LIBGDB_OBS, clean mostlyclean): Update.
6603 (gdb$(EXEEXT), insight$(EXEEXT)): Update.
6604
6605 2018-07-09 Tom Tromey <tom@tromey.com>
6606
6607 * Makefile.in (%.c: %.y): Use ECHO_YACC.
6608 (%.c: %.l): Use ECHO_LEX. Just fail if flex not available.
6609 * silent-rules.mk (ECHO_YACC, ECHO_LEX): New variables.
6610
6611 2018-07-09 Tom Tromey <tom@tromey.com>
6612
6613 * Makefile.in (ALLDEPFILES): Remove exec.c.
6614 (COMMON_OBS): Remove exec.o.
6615 (COMMON_SFILES): Add exec.c.
6616
6617 2018-07-09 Tom Tromey <tom@tromey.com>
6618
6619 * Makefile.in (LINT, LINTFLAGS, LINTFILES, lint): Remove.
6620
6621 2018-07-09 Tom Tromey <tom@tromey.com>
6622
6623 * Makefile.in (clean mostlyclean): Remove stamp-version.
6624 (version.c): Depend on stamp-version.
6625 (stamp-version): New rule, from version.c rule.
6626
6627 2018-07-09 Tom Tromey <tom@tromey.com>
6628
6629 * Makefile.in (init.c): Depend on stamp-init.
6630 (stamp-init): New rule, from init.c rule.
6631 (clean mostlyclean): Remove stamp-init.
6632
6633 2018-07-09 Tom Tromey <tom@tromey.com>
6634
6635 * Makefile.in (INIT_FILES): Remove CONFIG_SRCS,
6636 SUBDIR_GCC_COMPILE_SRCS.
6637
6638 2018-07-09 Tom Tromey <tom@tromey.com>
6639
6640 * Makefile.in (init.c): Remove some unused sed rules.
6641
6642 2018-07-09 Tom Tromey <tom@tromey.com>
6643
6644 * Makefile.in (TSOBS): Remove.
6645 (INIT_FILES): Update.
6646 (LIBGDB_OBS): Update.
6647 (COMMON_SFILES): Add inflow.c.
6648 (SFILES): Remove inflow.c.
6649
6650 2018-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
6651
6652 * contrib/gdb-add-index.sh ($dwarf5): New, use it.
6653
6654 2018-07-07 Simon Marchi <simon.marchi@polymtl.ca>
6655
6656 * ia64-libunwind-tdep.c (get_reg_name, get_fpreg_name,
6657 get_saveloc_name, is_signal_frame_name, step_name,
6658 init_remote_name, create_addr_space_name,
6659 destroy_addr_space_name, search_unwind_table_name,
6660 find_dyn_list_name): Constify.
6661
6662 2018-07-05 Simon Marchi <simon.marchi@polymtl.ca>
6663
6664 * darwin-nat.c (darwin_pthread_kill): New function.
6665 (darwin_resume_thread): Use darwin_pthread_kill.
6666
6667 2018-07-05 Tom de Vries <tdevries@suse.de>
6668
6669 * macroexp.c (macro_buffer) <operator=>: New member function.
6670
6671 2018-07-04 Tom Tromey <tom@tromey.com>
6672
6673 * darwin-nat.c (darwin_attach_pid): Use exit_inferior.
6674
6675 2018-07-04 Simon Marchi <simon.marchi@polymtl.ca>
6676
6677 * common/common-defs.h (HAVE_USEFUL_SBRK): Define.
6678 * main.c: Use HAVE_USEFUL_SBRK instead of HAVE_SBRK.
6679 * maint.c: Likewise.
6680 * top.c: Likewise.
6681
6682 2018-07-04 Joel Brobecker <brobecker@adacore.com>
6683
6684 * NEWS: Create a new section for the next release branch.
6685 Rename the section of the current branch, now that it has
6686 been cut.
6687
6688 2018-07-04 Joel Brobecker <brobecker@adacore.com>
6689
6690 GDB 8.2 branch created (1b919490e8ba30bf1d6941df0ed112b0e557017e):
6691 * version.in: Bump version to 8.2.50.DATE-git.
6692
6693 2018-07-04 Vyacheslav Barinov <v.barinov@samsung.com>
6694 Pedro Alves <palves@redhat.com>
6695
6696 * linux-nat.c (linux_init_ptrace): Rename to ...
6697 (linux_init_ptrace_procfs): ... this. Call
6698 linux_proc_init_warnings.
6699 (linux_nat_target::post_attach)
6700 (linux_nat_target::post_startup_inferior): Adjust.
6701 * nat/linux-procfs.c (linux_proc_init_warnings): Define function.
6702 * nat/linux-procfs.h (linux_proc_init_warnings): Declare function.
6703
6704 2018-07-04 Tom de Vries <tdevries@suse.de>
6705
6706 * dwarf2read.c (error_check_comp_unit_head): Move dwarf version
6707 check ...
6708 (read_comp_unit_head): ... here.
6709
6710 2018-07-03 Tom Tromey <tom@tromey.com>
6711
6712 * tracepoint.c (process_tracepoint_on_disconnect, start_tracing)
6713 (stop_tracing, tstatus_command)
6714 (find_matching_tracepoint_location, merge_uploaded_tracepoints)
6715 (print_one_static_tracepoint_marker): Update.
6716 * breakpoint.c (static_tracepoints_here, all_tracepoints): Return
6717 std::vector.
6718 * breakpoint.h (breakpoint_p): Remove typedef. Don't declare
6719 VEC.
6720 (all_tracepoints, static_tracepoints_here): Return std::vector.
6721
6722 2018-07-03 Tom Tromey <tom@tromey.com>
6723
6724 * common/ptid.c (ptid_equal): Remove.
6725 * common/ptid.h (ptid_equal): Don't declare.
6726 * ada-tasks.c: Update.
6727 * breakpoint.c: Update.
6728 * common/agent.c: Update.
6729 * corelow.c: Update.
6730 * darwin-nat-info.c: Update.
6731 * darwin-nat.c: Update.
6732 * dcache.c: Update.
6733 * dtrace-probe.c: Update.
6734 * dummy-frame.c: Update.
6735 * fbsd-nat.c: Update.
6736 * frame.c: Update.
6737 * gdbthread.h: Update.
6738 * gnu-nat.c: Update.
6739 * go32-nat.c: Update.
6740 * inf-loop.c: Update.
6741 * inf-ptrace.c: Update.
6742 * infcall.c: Update.
6743 * infcmd.c: Update.
6744 * inflow.c: Update.
6745 * infrun.c: Update.
6746 * linux-fork.c: Update.
6747 * linux-nat.c: Update.
6748 * linux-thread-db.c: Update.
6749 * mi/mi-cmd-var.c: Update.
6750 * mi/mi-interp.c: Update.
6751 * mi/mi-main.c: Update.
6752 * nto-procfs.c: Update.
6753 * ppc-linux-tdep.c: Update.
6754 * procfs.c: Update.
6755 * python/py-inferior.c: Update.
6756 * python/py-record-btrace.c: Update.
6757 * python/py-record.c: Update.
6758 * ravenscar-thread.c: Update.
6759 * regcache.c: Update.
6760 * remote-sim.c: Update.
6761 * remote.c: Update.
6762 * sol-thread.c: Update.
6763 * solib.c: Update.
6764 * target.c: Update.
6765 * tui/tui-stack.c: Update.
6766 * varobj.c: Update.
6767 * windows-nat.c: Update.
6768 * windows-tdep.c: Update.
6769
6770 2018-07-03 Tom Tromey <tom@tromey.com>
6771
6772 * common/ptid.c (ptid_match): Remove.
6773 * common/ptid.h (ptid_match): Don't declare.
6774 * fbsd-nat.c: Update.
6775 * infcmd.c: Update.
6776 * infrun.c: Update.
6777 * linux-nat.c: Update.
6778 * record-btrace.c: Update.
6779 * regcache.c: Update.
6780 * remote.c: Update.
6781
6782 2018-07-03 Tom Tromey <tom@tromey.com>
6783
6784 * common/ptid.c (ptid_tid_p): Remove.
6785 * common/ptid.h (ptid_tid_p): Don't declare.
6786 * sol-thread.c: Update.
6787
6788 2018-07-03 Tom Tromey <tom@tromey.com>
6789
6790 * common/ptid.c (ptid_lwp_p): Remove.
6791 * common/ptid.h (ptid_lwp_p): Don't declare.
6792 * fbsd-nat.c: Update.
6793 * linux-nat.c: Update.
6794 * nat/linux-procfs.c: Update.
6795 * nat/x86-linux-dregs.c: Update.
6796 * sol-thread.c: Update.
6797
6798 2018-07-03 Tom Tromey <tom@tromey.com>
6799
6800 * common/ptid.c (ptid_is_pid): Remove.
6801 * common/ptid.h (ptid_is_pid): Don't declare.
6802 * infrun.c: Update.
6803 * linux-nat.c: Update.
6804 * mi/mi-interp.c: Update.
6805 * remote.c: Update.
6806 * thread.c: Update.
6807
6808 2018-07-03 Tom Tromey <tom@tromey.com>
6809
6810 * common/ptid.c (ptid_get_tid): Remove.
6811 * common/ptid.h (ptid_get_tid): Don't declare.
6812 * ada-tasks.c: Update.
6813 * aix-thread.c: Update.
6814 * bsd-uthread.c: Update.
6815 * darwin-nat.c: Update.
6816 * fbsd-nat.c: Update.
6817 * i386-darwin-nat.c: Update.
6818 * infrun.c: Update.
6819 * linux-tdep.c: Update.
6820 * nto-procfs.c: Update.
6821 * ppc-ravenscar-thread.c: Update.
6822 * python/py-infthread.c: Update.
6823 * ravenscar-thread.c: Update.
6824 * sol-thread.c: Update.
6825 * sparc-ravenscar-thread.c: Update.
6826 * windows-nat.c: Update.
6827
6828 2018-07-03 Tom Tromey <tom@tromey.com>
6829
6830 * common/ptid.c (ptid_get_lwp): Remove.
6831 * common/ptid.h (ptid_get_lwp): Don't declare.
6832 * aarch64-linux-nat.c: Update.
6833 * ada-tasks.c: Update.
6834 * aix-thread.c: Update.
6835 * amd64-linux-nat.c: Update.
6836 * arm-linux-nat.c: Update.
6837 * corelow.c: Update.
6838 * fbsd-nat.c: Update.
6839 * fbsd-tdep.c: Update.
6840 * gnu-nat.c: Update.
6841 * i386-cygwin-tdep.c: Update.
6842 * i386-gnu-nat.c: Update.
6843 * i386-linux-nat.c: Update.
6844 * ia64-linux-nat.c: Update.
6845 * inf-ptrace.c: Update.
6846 * infrun.c: Update.
6847 * linux-fork.c: Update.
6848 * linux-nat.c: Update.
6849 * linux-tdep.c: Update.
6850 * linux-thread-db.c: Update.
6851 * mips-linux-nat.c: Update.
6852 * nat/aarch64-linux-hw-point.c: Update.
6853 * nat/aarch64-linux.c: Update.
6854 * nat/linux-btrace.c: Update.
6855 * nat/linux-osdata.c: Update.
6856 * nat/linux-procfs.c: Update.
6857 * nat/x86-linux-dregs.c: Update.
6858 * obsd-nat.c: Update.
6859 * ppc-fbsd-nat.c: Update.
6860 * ppc-linux-nat.c: Update.
6861 * procfs.c: Update.
6862 * python/py-infthread.c: Update.
6863 * ravenscar-thread.c: Update.
6864 * remote.c: Update.
6865 * s390-linux-nat.c: Update.
6866 * sol-thread.c: Update.
6867 * sol2-tdep.c: Update.
6868 * spu-linux-nat.c: Update.
6869 * x86-linux-nat.c: Update.
6870 * xtensa-linux-nat.c: Update.
6871
6872 2018-07-03 Tom Tromey <tom@tromey.com>
6873
6874 * common/ptid.c (ptid_get_pid): Remove.
6875 * common/ptid.h (ptid_get_pid): Don't declare.
6876 * aarch64-linux-nat.c: Update.
6877 * ada-lang.c: Update.
6878 * aix-thread.c: Update.
6879 * alpha-bsd-nat.c: Update.
6880 * amd64-fbsd-nat.c: Update.
6881 * amd64-linux-nat.c: Update.
6882 * arm-linux-nat.c: Update.
6883 * arm-nbsd-nat.c: Update.
6884 * auxv.c: Update.
6885 * break-catch-syscall.c: Update.
6886 * breakpoint.c: Update.
6887 * bsd-uthread.c: Update.
6888 * corelow.c: Update.
6889 * ctf.c: Update.
6890 * darwin-nat.c: Update.
6891 * fbsd-nat.c: Update.
6892 * fbsd-tdep.c: Update.
6893 * gcore.c: Update.
6894 * gnu-nat.c: Update.
6895 * hppa-nbsd-nat.c: Update.
6896 * hppa-obsd-nat.c: Update.
6897 * i386-fbsd-nat.c: Update.
6898 * ia64-linux-nat.c: Update.
6899 * inf-ptrace.c: Update.
6900 * infcmd.c: Update.
6901 * inferior.c: Update.
6902 * inferior.h: Update.
6903 * inflow.c: Update.
6904 * infrun.c: Update.
6905 * linux-fork.c: Update.
6906 * linux-nat.c: Update.
6907 * linux-tdep.c: Update.
6908 * linux-thread-db.c: Update.
6909 * m68k-bsd-nat.c: Update.
6910 * mi/mi-interp.c: Update.
6911 * mi/mi-main.c: Update.
6912 * mips-linux-nat.c: Update.
6913 * mips-nbsd-nat.c: Update.
6914 * mips64-obsd-nat.c: Update.
6915 * nat/aarch64-linux-hw-point.c: Update.
6916 * nat/aarch64-linux.c: Update.
6917 * nat/linux-btrace.c: Update.
6918 * nat/linux-osdata.c: Update.
6919 * nat/linux-procfs.c: Update.
6920 * nat/x86-linux-dregs.c: Update.
6921 * nto-procfs.c: Update.
6922 * obsd-nat.c: Update.
6923 * ppc-linux-nat.c: Update.
6924 * ppc-nbsd-nat.c: Update.
6925 * ppc-obsd-nat.c: Update.
6926 * proc-service.c: Update.
6927 * procfs.c: Update.
6928 * python/py-inferior.c: Update.
6929 * python/py-infthread.c: Update.
6930 * ravenscar-thread.c: Update.
6931 * record.c: Update.
6932 * remote-sim.c: Update.
6933 * remote.c: Update.
6934 * rs6000-nat.c: Update.
6935 * s390-linux-nat.c: Update.
6936 * sh-nbsd-nat.c: Update.
6937 * sol-thread.c: Update.
6938 * sparc-nat.c: Update.
6939 * sparc64-tdep.c: Update.
6940 * spu-linux-nat.c: Update.
6941 * spu-tdep.c: Update.
6942 * target-debug.h: Update.
6943 * target.c: Update.
6944 * thread.c: Update.
6945 * tid-parse.c: Update.
6946 * tracefile-tfile.c: Update.
6947 * vax-bsd-nat.c: Update.
6948 * windows-nat.c: Update.
6949 * x86-linux-nat.c: Update.
6950 * x86-nat.c: Update.
6951
6952 2018-07-03 Tom Tromey <tom@tromey.com>
6953
6954 * common/ptid.c (pid_to_ptid): Remove.
6955 * common/ptid.h (pid_to_ptid): Don't declare.
6956 * aix-thread.c: Update.
6957 * arm-linux-nat.c: Update.
6958 * common/ptid.c: Update.
6959 * common/ptid.h: Update.
6960 * corelow.c: Update.
6961 * ctf.c: Update.
6962 * darwin-nat.c: Update.
6963 * fbsd-nat.c: Update.
6964 * fork-child.c: Update.
6965 * gnu-nat.c: Update.
6966 * go32-nat.c: Update.
6967 * inf-ptrace.c: Update.
6968 * infcmd.c: Update.
6969 * inferior.c: Update.
6970 * infrun.c: Update.
6971 * linux-fork.c: Update.
6972 * linux-nat.c: Update.
6973 * nat/aarch64-linux-hw-point.c: Update.
6974 * nat/fork-inferior.c: Update.
6975 * nat/x86-linux-dregs.c: Update.
6976 * nto-procfs.c: Update.
6977 * obsd-nat.c: Update.
6978 * procfs.c: Update.
6979 * progspace.c: Update.
6980 * remote.c: Update.
6981 * rs6000-nat.c: Update.
6982 * s390-linux-nat.c: Update.
6983 * sol-thread.c: Update.
6984 * spu-linux-nat.c: Update.
6985 * target.c: Update.
6986 * top.c: Update.
6987 * tracefile-tfile.c: Update.
6988 * windows-nat.c: Update.
6989
6990 2018-07-03 Tom Tromey <tom@tromey.com>
6991
6992 * common/ptid.h (ptid_build): Don't declare.
6993 * common/ptid.c (ptid_build): Remove.
6994 * aix-thread.c: Update.
6995 * bsd-kvm.c: Update.
6996 * bsd-uthread.c: Update.
6997 * common/agent.c: Update.
6998 * common/ptid.c: Update.
6999 * common/ptid.h: Update.
7000 * corelow.c: Update.
7001 * darwin-nat.c: Update.
7002 * fbsd-nat.c: Update.
7003 * gnu-nat.c: Update.
7004 * linux-fork.c: Update.
7005 * linux-nat.c: Update.
7006 * linux-thread-db.c: Update.
7007 * nat/linux-osdata.c: Update.
7008 * nat/linux-procfs.c: Update.
7009 * nto-procfs.c: Update.
7010 * obsd-nat.c: Update.
7011 * proc-service.c: Update.
7012 * procfs.c: Update.
7013 * ravenscar-thread.c: Update.
7014 * remote-sim.c: Update.
7015 * remote.c: Update.
7016 * sol-thread.c: Update.
7017 * target.c: Update.
7018 * windows-nat.c: Update.
7019
7020 2018-07-03 Tom Tromey <tom@tromey.com>
7021
7022 * infrun.c (follow_exec): Use exit_inferior_silent.
7023 * inferior.c (exit_inferior_num_silent): Remove.
7024 * inferior.h (exit_inferior_num_silent): Don't declare.
7025
7026 2018-07-03 Tom Tromey <tom@tromey.com>
7027
7028 PR cli/23340:
7029 * darwin-nat.c (darwin_attach_pid): Reset inferior and
7030 inferior_ptid on error.
7031
7032 2018-07-02 Maciej W. Rozycki <macro@mips.com>
7033 Simon Marchi <simon.marchi@polymtl.ca>
7034
7035 PR tdep/8282
7036 * disasm.h (gdb_disassembler): Add
7037 `m_disassembler_options_holder'. member
7038 * disasm.c (get_all_disassembler_options): New function.
7039 (gdb_disassembler::gdb_disassembler): Use it.
7040 (gdb_buffered_insn_length_init_dis): Likewise.
7041 (gdb_buffered_insn_length): Adjust accordingly.
7042 (set_disassembler_options): Handle options with arguments.
7043 (show_disassembler_options_sfunc): Likewise. Add a leading new
7044 line if showing options with descriptions.
7045 (disassembler_options_completer): Adapt to using the
7046 `disasm_options_and_args_t' structure.
7047 * mips-tdep.c (mips_disassembler_options): New variable.
7048 (mips_disassembler_options_o32): Likewise.
7049 (mips_disassembler_options_n32): Likewise.
7050 (mips_disassembler_options_n64): Likewise.
7051 (gdb_print_insn_mips): Don't set `disassembler_options'.
7052 (gdb_print_insn_mips_n32, gdb_print_insn_mips_n64): Remove
7053 functions.
7054 (mips_gdbarch_init): Always set `gdbarch_print_insn' to
7055 `gdb_print_insn_mips'. Set `gdbarch_disassembler_options',
7056 `gdbarch_disassembler_options_implicit' and
7057 `gdbarch_valid_disassembler_options'.
7058 * arm-tdep.c (_initialize_arm_tdep): Adapt to using the
7059 `disasm_options_and_args_t' structure.
7060 * gdbarch.sh (disassembler_options_implicit): New `gdbarch'
7061 method.
7062 (valid_disassembler_options): Switch from `disasm_options_t' to
7063 the `disasm_options_and_args_t' structure.
7064 * NEWS: Document `set disassembler-options' support for the MIPS
7065 target.
7066 * gdbarch.h: Regenerate.
7067 * gdbarch.c: Regenerate.
7068
7069 2018-07-02 Sebastian Huber <sebastian.huber@embedded-brains.de>
7070
7071 * riscv-tdep.c (riscv_register_aliases): Swap "fp" and "s0" entries.
7072
7073 2018-06-29 Joel Brobecker <brobecker@adacore.com>
7074
7075 * amd64-darwin-tdep.c (x86_darwin_init_abi_64): Add missing
7076 parameter in call to amd64_target_description.
7077 * amd64-dicos-tdep.c (amd64_dicos_init_abi): Likewise.
7078 * amd64-fbsd-tdep.c (amd64fbsd_core_read_description)
7079 (amd64fbsd_init_abi): Likewise.
7080 * amd64-nbsd-tdep.c (amd64nbsd_init_abi): Likewise.
7081 * amd64-obsd-tdep.c (amd64obsd_init_abi): Likewise.
7082 * amd64-sol2-tdep.c (amd64_sol2_init_abi): Likewise.
7083 * amd64-fbsd-nat.c (amd64_fbsd_nat_target): Likewise.
7084
7085 2018-06-29 Pedro Alves <palves@redhat.com>
7086
7087 * gdb/amd64-tdep.h (amd64_create_target_description): Add
7088 "segments" parameter.
7089 * gdb/amd64-tdep.c (amd64_none_init_abi, amd64_x32_none_init_abi)
7090 (_initialize_amd64_tdep): Update call to
7091 amd64_create_target_description.
7092 (amd64_target_description): Add "segments" parameter. Adjust
7093 the implementation to use it.
7094 * gdb/amd64-linux-tdep.c (amd64_linux_read_description): Update
7095 call to amd64_create_target_description.
7096 * gdb/amd64-windows-tdep.c (amd64_windows_init_abi): Likewise.
7097 * gdb/arch/amd64.h (amd64_create_target_description): Add
7098 "segments" register.
7099 * gdb/arch/amd64.c (amd64_create_target_description): Add
7100 "segments" parameter. Call create_feature_i386_64bit_segments
7101 only if SEGMENTS is true.
7102 * gdb/gdbserver/win32-i386-low.c (i386_arch_setup): Update
7103 call to amd64_create_target_description.
7104
7105 2018-06-29 Pedro Alves <palves@redhat.com>
7106
7107 * thread.c (thread_target_id_str): New, factored out from ...
7108 (print_thread_info_1): ... here. Use it to compute the max
7109 "Target Id" column width.
7110
7111 2018-06-29 Pedro Alves <palves@redhat.com>
7112
7113 * remote.c (remote_target::extra_thread_info): Delete
7114 'display_buf' and 'n' locals. from the cache, regardless of
7115 packet mechanims is in use. Use cache for qThreadExtra and qP
7116 methods too.
7117
7118 2018-06-29 Pedro Alves <palves@redhat.com>
7119
7120 * blockframe.c (find_pc_sect_containing_function): New function.
7121 * breakpoint.c (print_breakpoint_location): Don't call
7122 find_pc_sect_function.
7123 * linespec.c (create_sals_line_offset): Record the location's
7124 symbol in the sal.
7125 * linespec.c (convert_address_location_to_sals): Fill in sal's
7126 symbol with find_pc_sect_containing_function.
7127 * symtab.c (find_function_start_sal): Rename to ...
7128 (find_function_start_sal_1): ... this.
7129 (find_function_start_sal): Reimplement as wrapper around
7130 find_function_start_sal_1, and use
7131 find_pc_sect_containing_function to fill in the sal's symbol.
7132 (find_function_start_sal(symbol*, bool)): Adjust.
7133 * symtab.h (find_pc_function, find_pc_sect_function): Adjust
7134 comments.
7135 (find_pc_sect_containing_function): Declare.
7136
7137 2018-06-29 Pedro Alves <palves@redhat.com>
7138
7139 * inline-frame.c (stopped_by_user_bp_inline_frame): Return
7140 true if the the location has no symbol.
7141
7142 2018-06-28 Tom Tromey <tom@tromey.com>
7143
7144 * NEWS: Mention --enable-codesign.
7145 * silent-rules.mk (ECHO_SIGN): New variable.
7146 * configure.ac: Add --enable-codesign.
7147 * configure: Rebuild.
7148 * Makefile.in (CODESIGN, CODESIGN_CERT): New variables.
7149 (gdb$(EXEEXT)): Optionally invoke codesign.
7150
7151 2018-06-28 Pedro Alves <palves@redhat.com>
7152
7153 * gdbthread.h (struct thread_suspend_state) <stop_pc>: Extend
7154 comments.
7155 (switch_to_thread_no_regs): Adjust comment.
7156 * infcmd.c (stop_pc): Delete.
7157 (post_create_inferior, info_program_command): Replace references
7158 to stop_pc with references to thread_info->suspend.stop_pc.
7159 * inferior.h (stop_pc): Delete declaration.
7160 * infrun.c (proceed, handle_syscall_event, fill_in_stop_func)
7161 (handle_inferior_event_1, handle_signal_stop)
7162 (process_event_stop_test, keep_going_stepped_thread)
7163 (handle_step_into_function, handle_step_into_function_backward)
7164 (print_stop_location): Replace references to stop_pc with
7165 references to thread_info->suspend.stop_pc.
7166 (struct infcall_suspend_state) <stop_pc>: Delete field.
7167 (save_infcall_suspend_state, restore_infcall_suspend_state):
7168 Remove references to inf_stat->stop_pc.
7169 * linux-fork.c (fork_load_infrun_state): Likewise.
7170 * record-btrace.c (record_btrace_set_replay): Likewise.
7171 * record-full.c (record_full_goto_entry): Likewise.
7172 * remote.c (print_one_stopped_thread): Likewise.
7173 * target.c (target_resume): Extend comment.
7174 * thread.c (set_executing_thread): New.
7175 (set_executing): Use it.
7176 (switch_to_thread_no_regs, switch_to_no_thread, switch_to_thread):
7177 Remove references to stop_pc.
7178
7179 2018-06-28 Pedro Alves <palves@redhat.com>
7180
7181 * infrun.c (handle_inferior_event_1) <TARGET_WAITKIND_EXECD>:
7182 Moving fetching stop_pc until after ecs->event_thread is refreshed.
7183
7184 2018-06-28 Tom Tromey <tom@tromey.com>
7185
7186 * coffread.c (coff_symfile_finish): Update.
7187 * xcoffread.c (xcoff_symfile_finish): Update.
7188 * elfread.c (elf_symfile_finish): Update.
7189 * symfile.h (dwarf2_free_objfile): Don't declare.
7190 * dwarf2read.c (_initialize_dwarf2_read): Use
7191 register_objfile_data_with_cleanup.
7192 (dwarf2_free_objfile): Now static. Change signature.
7193
7194 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
7195
7196 * symfile.c (add_symbol_file_command, _initialize_symfile): Add
7197 option "-o" to add-symbol-file-load to add an offset to each
7198 section's load address.
7199 * symfile.c (set_objfile_default_section_offset): New function.
7200
7201 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
7202
7203 * symfile.c (add_symbol_file_command): Make sure that sections
7204 with the same name are sorted in the same order.
7205
7206 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
7207
7208 * symfile.c (add_symbol_file_command, _initialize_symfile): Do not
7209 require the second argument. If omitted, load sections at the
7210 addresses specified in the file.
7211
7212 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
7213
7214 * symfile.c (symbol_file_command, symbol_file_add_main_1)
7215 (_initialize_symfile): Add option "-o" to symbol-file to add an
7216 offset to each section of the symbol file.
7217
7218 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
7219
7220 * MAINTAINERS (Write After Approval): Add Petr Tesarik.
7221
7222 2018-06-27 Tom Tromey <tom@tromey.com>
7223
7224 * stack.c (_initialize_stack): Update "func" help text.
7225
7226 2018-06-27 Tom Tromey <tom@tromey.com>
7227
7228 * python/py-unwind.c (unwind_info_object) <saved_regs>: Now a
7229 std::vector.
7230 (unwind_infopy_str, pyuw_create_unwind_info)
7231 (unwind_infopy_add_saved_register, pyuw_sniffer)
7232 (unwind_infopy_dealloc, unwind_infopy_add_saved_register):
7233 Update.
7234 (struct saved_reg): Add constructor.
7235 <value>: Now a gdbpy_ref<>.
7236
7237 2018-06-27 Tom Tromey <tom@tromey.com>
7238
7239 * machoread.c (macho_symfile_read): Define "symbol_table" earlier.
7240
7241 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
7242
7243 * gdb-gdb.py.in: Format using autopep8.
7244
7245 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
7246
7247 * gdb-gdb.py.in (CoreAddrPrettyPrinter): New class.
7248 (type_lookup_function): Recognize CORE_ADDR values.
7249
7250 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
7251
7252 * gdb-gdb.py.in (StructMainTypePrettyPrinter) <to_string>: Don't
7253 print tag_name.
7254
7255 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
7256
7257 * gdb-gdb.py.in (TypeFlag) <__cmp__>: Remove.
7258 <__lt__>: Add.
7259
7260 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
7261
7262 * gdb-gdb.py: Move to...
7263 * gdb-gdb.py.in: ... here.
7264 * configure.ac (AC_CONFIG_FILES): Add gdb-gdb.py.
7265 * Makefile.in (all): Add gdb-gdb.gdb and gdb-gdb.py as
7266 dependencies.
7267 (distclean): Remove gdb-gdb.py when cleaning.
7268 (gdb-gdb.py, gdb-gdb.gdb): New rules.
7269 * configure: Re-generate.
7270
7271 2018-06-27 Pedro Alves <palves@redhat.com>
7272
7273 * proc-service.c (get_ps_regcache): New.
7274 (ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
7275 (ps_lsetfpregs): Use it.
7276
7277 2018-06-27 Omair Javaid <omair.javaid@linaro.org>
7278
7279 PR gdb/21695
7280 * dwarf2read.c (lnp_state_machine::check_line_address): Update
7281 declaration.
7282 (dwarf_decode_lines_1): Adjust.
7283
7284 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
7285
7286 * fbsd-nat.h (class fbsd_nat_target) <find_memory_regions>: Add
7287 override.
7288 <info_proc>: Likewise.
7289
7290 2018-06-26 Joel Brobecker <brobecker@adacore.com>
7291
7292 * windows-nat.c (do_windows_fetch_inferior_registers): Rename
7293 to windows_fetch_one_register, and only handle the case of
7294 fetching one register. Move the code that reloads the context
7295 and iterates over all registers if R is negative to...
7296 (windows_nat_target::fetch_registers): ... here.
7297 (do_windows_store_inferior_registers): Rename to
7298 windows_store_one_register, and only handle the case of storing
7299 one register. Move the code that handles the case where r is
7300 negative to...
7301 (windows_nat_target::store_registers) ... here.
7302
7303 2018-06-26 Tom Tromey <tom@tromey.com>
7304
7305 PR rust/22574:
7306 * typeprint.c (whatis_exp): Allow ptype/o for Rust.
7307 * rust-lang.c (rust_print_struct_def): Add podata parameter.
7308 Update.
7309 (rust_internal_print_type): Add podata parameter.
7310 (rust_print_type): Update.
7311
7312 2018-06-26 Tom Tromey <tom@tromey.com>
7313
7314 * typeprint.h (struct print_offset_data) <update, finish,
7315 maybe_print_hole>: New methods.
7316 <indentation>: New constant.
7317 * typeprint.c (print_offset_data::indentation): Define.
7318 (print_offset_data::maybe_print_hole, print_offset_data::update)
7319 (print_offset_data::finish): Move from c-typeprint.c and rename.
7320 * c-typeprint.c (OFFSET_SPC_LEN): Remove.
7321 (print_spaces_filtered_with_print_options): Update.
7322 (c_print_type_union_field_offset, maybe_print_hole)
7323 (c_print_type_struct_field_offset): Move to typeprint.c and
7324 rename.
7325 (c_type_print_base_struct_union): Update.
7326
7327 2018-06-25 Pedro Alves <palves@redhat.com>
7328
7329 * gdbthread.h (thread_info_ref, delete_thread)
7330 (delete_thread_silent, first_thread_of_inferior)
7331 (any_thread_of_inferior, switch_to_thread)
7332 (enable_thread_stack_temporaries)
7333 (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
7334 (get_last_thread_stack_temporary)
7335 (value_in_thread_stack_temporaries, can_access_registers_thread):
7336 Spell out "struct thread_info" instead of just "thread_info".
7337 * inferior.h (notice_new_inferior): Likewise.
7338
7339 2018-06-25 Pedro Alves <palves@redhat.com>
7340
7341 * windows-nat.c (windows_delete_thread): Use find_thread_ptid and
7342 pass thread_info pointer to delete_thread.
7343 (windows_nat_target::detach): Pass inferior pointer to
7344 detach_inferior.
7345 * aix-thread.c (sync_threadlists): Pass thread_info pointer to
7346 delete_thread.
7347 * bsd-kvm.c (bsd_kvm_target::close): Use discard_all_inferiors.
7348 * darwin-nat.c (darwin_check_new_threads): Use find_thread_ptid
7349 and pass a thread_info pointer to delete_thread.
7350 * fbsd-nat.c (fbsd_nat_target::wait): Use find_thread_ptid and
7351 pass thread_info pointer to delete_thread.
7352 * go32-nat.c (go32_nat_target::mourn_inferior): Remove
7353 delete_thread_silent call.
7354 * procfs.c (procfs_target::detach): Pass inferior pointer to
7355 detach_inferior.
7356 (procfs_target::wait): Pass thread_info pointer to delete_thread.
7357 * remote-sim.c (gdbsim_target::mourn_inferior): Remove
7358 delete_thread_silent call.
7359 * windows-nat.c (windows_delete_thread): Use find_thread_ptid and
7360 pass thread_info pointer to delete_thread.
7361 (windows_nat_target::detach): Pass inferior pointer to
7362 delete_inferior.
7363
7364 2018-06-22 Alan Hayward <alan.hayward@arm.com>
7365
7366 * regcache.c (readable_regcache::read_part): Fix asserts.
7367 (reg_buffer::raw_collect_part): New function.
7368 (regcache::write_part): Fix asserts.
7369 (reg_buffer::raw_supply_part): New function.
7370 (regcache::transfer_regset_register): New helper function.
7371 (regcache::transfer_regset): Call new functions.
7372 (regcache_supply_regset): Use gdb_byte*.
7373 (regcache::supply_regset): Likewise.
7374 (regcache_collect_regset): Likewise.
7375 (regcache::collect_regset): Likewise.
7376 * regcache.h (reg_buffer::raw_collect_part): New declaration.
7377 (reg_buffer::raw_supply_part): Likewise.
7378 (regcache::transfer_regset_register): Likewise.
7379 (regcache::transfer_regset): Use gdb_byte*.
7380
7381 2018-06-22 Alan Hayward <alan.hayward@arm.com>
7382
7383 * nat/aarch64-sve-linux-ptrace.h (HAS_SVE_STATE): Use &.
7384
7385 2018-06-21 Pedro Alves <palves@redhat.com>
7386
7387 * ada-lang.h (ada_get_task_number): Take a thread_info pointer
7388 instead of a ptid_t. All callers adjusted.
7389 * ada-tasks.c (ada_get_task_number): Likewise. All callers
7390 adjusted.
7391 (print_ada_task_info, display_current_task_id, task_command_1):
7392 Adjust.
7393 * breakpoint.c (watchpoint_in_thread_scope): Adjust to use
7394 inferior_thread.
7395 (breakpoint_kind): Adjust.
7396 (remove_breakpoints_pid): Rename to ...
7397 (remove_breakpoints_inf): ... this. Adjust to take an inferior
7398 pointer. All callers adjusted.
7399 (bpstat_clear_actions): Use inferior_thread.
7400 (get_bpstat_thread): New.
7401 (bpstat_do_actions): Use it.
7402 (bpstat_check_breakpoint_conditions, bpstat_stop_status): Adjust
7403 to take a thread_info pointer. All callers adjusted.
7404 (set_longjmp_breakpoint_for_call_dummy, set_momentary_breakpoint)
7405 (breakpoint_re_set_thread): Use inferior_thread.
7406 * breakpoint.h (struct inferior): Forward declare.
7407 (bpstat_stop_status): Update.
7408 (remove_breakpoints_pid): Delete.
7409 (remove_breakpoints_inf): New.
7410 * bsd-uthread.c (bsd_uthread_target::wait)
7411 (bsd_uthread_target::update_thread_list): Use find_thread_ptid.
7412 * btrace.c (btrace_add_pc, btrace_enable, btrace_fetch)
7413 (maint_btrace_packet_history_cmd)
7414 (maint_btrace_clear_packet_history_cmd): Adjust.
7415 (maint_btrace_clear_cmd, maint_info_btrace_cmd): Adjust to use
7416 inferior_thread.
7417 * cli/cli-interp.c: Include "inferior.h".
7418 * common/refcounted-object.h (struct
7419 refcounted_object_ref_policy): New.
7420 * compile/compile-object-load.c: Include gdbthread.h.
7421 (store_regs): Use inferior_thread.
7422 * corelow.c (core_target::close): Use current_inferior.
7423 (core_target_open): Adjust to use first_thread_of_inferior and use
7424 the current inferior.
7425 * ctf.c (ctf_target::close): Adjust to use current_inferior.
7426 * dummy-frame.c (dummy_frame_id) <ptid>: Delete, replaced by ...
7427 <thread>: ... this new field. All references adjusted.
7428 (dummy_frame_pop, dummy_frame_discard, register_dummy_frame_dtor):
7429 Take a thread_info pointer instead of a ptid_t.
7430 * dummy-frame.h (dummy_frame_push, dummy_frame_pop)
7431 (dummy_frame_discard, register_dummy_frame_dtor): Take a
7432 thread_info pointer instead of a ptid_t.
7433 * elfread.c: Include "inferior.h".
7434 (elf_gnu_ifunc_resolver_stop, elf_gnu_ifunc_resolver_return_stop):
7435 Use inferior_thread.
7436 * eval.c (evaluate_subexp): Likewise.
7437 * frame.c (frame_pop, has_stack_frames, find_frame_sal): Use
7438 inferior_thread.
7439 * gdb_proc_service.h (struct thread_info): Forward declare.
7440 (struct ps_prochandle) <ptid>: Delete, replaced by ...
7441 <thread>: ... this new field. All references adjusted.
7442 * gdbarch.h, gdbarch.c: Regenerate.
7443 * gdbarch.sh (get_syscall_number): Replace 'ptid' parameter with a
7444 'thread' parameter. All implementations and callers adjusted.
7445 * gdbthread.h (thread_info) <set_running>: New method.
7446 (delete_thread, delete_thread_silent): Take a thread_info pointer
7447 instead of a ptid.
7448 (global_thread_id_to_ptid, ptid_to_global_thread_id): Delete.
7449 (first_thread_of_process): Delete, replaced by ...
7450 (first_thread_of_inferior): ... this new function. All callers
7451 adjusted.
7452 (any_live_thread_of_process): Delete, replaced by ...
7453 (any_live_thread_of_inferior): ... this new function. All callers
7454 adjusted.
7455 (switch_to_thread, switch_to_no_thread): Declare.
7456 (is_executing): Delete.
7457 (enable_thread_stack_temporaries): Update comment.
7458 <enable_thread_stack_temporaries>: Take a thread_info pointer
7459 instead of a ptid_t. Incref the thread.
7460 <~enable_thread_stack_temporaries>: Decref the thread.
7461 <m_ptid>: Delete
7462 <m_thr>: New.
7463 (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
7464 (get_last_thread_stack_temporary)
7465 (value_in_thread_stack_temporaries, can_access_registers_thread):
7466 Take a thread_info pointer instead of a ptid_t. All callers
7467 adjusted.
7468 * infcall.c (get_call_return_value): Use inferior_thread.
7469 (run_inferior_call): Work with thread pointers instead of ptid_t.
7470 (call_function_by_hand_dummy): Work with thread pointers instead
7471 of ptid_t. Use thread_info_ref.
7472 * infcmd.c (proceed_thread_callback): Access thread's state
7473 directly.
7474 (ensure_valid_thread, ensure_not_running): Use inferior_thread,
7475 access thread's state directly.
7476 (continue_command): Use inferior_thread.
7477 (info_program_command): Use find_thread_ptid and access thread
7478 state directly.
7479 (proceed_after_attach_callback): Use thread state directly.
7480 (notice_new_inferior): Take a thread_info pointer instead of a
7481 ptid_t. All callers adjusted.
7482 (exit_inferior): Take an inferior pointer instead of a pid. All
7483 callers adjusted.
7484 (exit_inferior_silent): New.
7485 (detach_inferior): Delete.
7486 (valid_gdb_inferior_id, pid_to_gdb_inferior_id)
7487 (gdb_inferior_id_to_pid, in_inferior_list): Delete.
7488 (detach_inferior_command, kill_inferior_command): Use
7489 find_inferior_id instead of valid_gdb_inferior_id and
7490 gdb_inferior_id_to_pid.
7491 (inferior_command): Use inferior and thread pointers.
7492 * inferior.h (struct thread_info): Forward declare.
7493 (notice_new_inferior): Take a thread_info pointer instead of a
7494 ptid_t. All callers adjusted.
7495 (detach_inferior): Delete declaration.
7496 (exit_inferior, exit_inferior_silent): Take an inferior pointer
7497 instead of a pid. All callers adjusted.
7498 (gdb_inferior_id_to_pid, pid_to_gdb_inferior_id, in_inferior_list)
7499 (valid_gdb_inferior_id): Delete.
7500 * infrun.c (follow_fork_inferior, proceed_after_vfork_done)
7501 (handle_vfork_child_exec_or_exit, follow_exec): Adjust.
7502 (struct displaced_step_inferior_state) <pid>: Delete, replaced by
7503 ...
7504 <inf>: ... this new field.
7505 <step_ptid>: Delete, replaced by ...
7506 <step_thread>: ... this new field.
7507 (get_displaced_stepping_state): Take an inferior pointer instead
7508 of a pid. All callers adjusted.
7509 (displaced_step_in_progress_any_inferior): Adjust.
7510 (displaced_step_in_progress_thread): Take a thread pointer instead
7511 of a ptid_t. All callers adjusted.
7512 (displaced_step_in_progress, add_displaced_stepping_state): Take
7513 an inferior pointer instead of a pid. All callers adjusted.
7514 (get_displaced_step_closure_by_addr): Adjust.
7515 (remove_displaced_stepping_state): Take an inferior pointer
7516 instead of a pid. All callers adjusted.
7517 (displaced_step_prepare_throw, displaced_step_prepare)
7518 (displaced_step_fixup): Take a thread pointer instead of a ptid_t.
7519 All callers adjusted.
7520 (start_step_over): Adjust.
7521 (infrun_thread_ptid_changed): Remove bit updating ptids in the
7522 displaced step queue.
7523 (do_target_resume): Adjust.
7524 (fetch_inferior_event): Use inferior_thread.
7525 (context_switch, get_inferior_stop_soon): Take an
7526 execution_control_state pointer instead of a ptid_t. All callers
7527 adjusted.
7528 (switch_to_thread_cleanup): Delete.
7529 (stop_all_threads): Use scoped_restore_current_thread.
7530 * inline-frame.c: Include "gdbthread.h".
7531 (inline_state) <inline_state>: Take a thread pointer instead of a
7532 ptid_t. All callers adjusted.
7533 <ptid>: Delete, replaced by ...
7534 <thread>: ... this new field.
7535 (find_inline_frame_state): Take a thread pointer instead of a
7536 ptid_t. All callers adjusted.
7537 (skip_inline_frames, step_into_inline_frame)
7538 (inline_skipped_frames, inline_skipped_symbol): Take a thread
7539 pointer instead of a ptid_t. All callers adjusted.
7540 * inline-frame.h (skip_inline_frames, step_into_inline_frame)
7541 (inline_skipped_frames, inline_skipped_symbol): Likewise.
7542 * linux-fork.c (delete_checkpoint_command): Adjust to use thread
7543 pointers directly.
7544 * linux-nat.c (get_detach_signal): Likewise.
7545 * linux-thread-db.c (thread_from_lwp): New 'stopped' parameter.
7546 (thread_db_notice_clone): Adjust.
7547 (thread_db_find_new_threads_silently)
7548 (thread_db_find_new_threads_2, thread_db_find_new_threads_1): Take
7549 a thread pointer instead of a ptid_t. All callers adjusted.
7550 * mi/mi-cmd-var.c: Include "inferior.h".
7551 (mi_cmd_var_update_iter): Update to use thread pointers.
7552 * mi/mi-interp.c (mi_new_thread): Update to use the thread's
7553 inferior directly.
7554 (mi_output_running_pid, mi_inferior_count): Delete, bits factored
7555 out to ...
7556 (mi_output_running): ... this new function.
7557 (mi_on_resume_1): Adjust to use it.
7558 (mi_user_selected_context_changed): Adjust to use inferior_thread.
7559 * mi/mi-main.c (proceed_thread): Adjust to use thread pointers
7560 directly.
7561 (interrupt_thread_callback): : Adjust to use thread and inferior
7562 pointers.
7563 * proc-service.c: Include "gdbthread.h".
7564 (ps_pglobal_lookup): Adjust to use the thread's inferior directly.
7565 * progspace-and-thread.c: Include "inferior.h".
7566 * progspace.c: Include "inferior.h".
7567 * python/py-exitedevent.c (create_exited_event_object): Adjust to
7568 hold a reference to an inferior_object.
7569 * python/py-finishbreakpoint.c (bpfinishpy_init): Adjust to use
7570 inferior_thread.
7571 * python/py-inferior.c (struct inferior_object): Give the type a
7572 tag name instead of a typedef.
7573 (python_on_normal_stop): No need to check if the current thread is
7574 listed.
7575 (inferior_to_inferior_object): Change return type to
7576 inferior_object. All callers adjusted.
7577 (find_thread_object): Delete, bits factored out to ...
7578 (thread_to_thread_object): ... this new function.
7579 * python/py-infthread.c (create_thread_object): Use
7580 inferior_to_inferior_object.
7581 (thpy_is_stopped): Use thread pointer directly.
7582 (gdbpy_selected_thread): Use inferior_thread.
7583 * python/py-record-btrace.c (btpy_list_object) <ptid>: Delete
7584 field, replaced with ...
7585 <thread>: ... this new field. All users adjusted.
7586 (btpy_insn_or_gap_new): Drop const.
7587 (btpy_list_new): Take a thread pointer instead of a ptid_t. All
7588 callers adjusted.
7589 * python/py-record.c: Include "gdbthread.h".
7590 (recpy_insn_new, recpy_func_new): Take a thread pointer instead of
7591 a ptid_t. All callers adjusted.
7592 (gdbpy_current_recording): Use inferior_thread.
7593 * python/py-record.h (recpy_record_object) <ptid>: Delete
7594 field, replaced with ...
7595 <thread>: ... this new field. All users adjusted.
7596 (recpy_element_object) <ptid>: Delete
7597 field, replaced with ...
7598 <thread>: ... this new field. All users adjusted.
7599 (recpy_insn_new, recpy_func_new): Take a thread pointer instead of
7600 a ptid_t. All callers adjusted.
7601 * python/py-threadevent.c: Include "gdbthread.h".
7602 (get_event_thread): Use thread_to_thread_object.
7603 * python/python-internal.h (struct inferior_object): Forward
7604 declare.
7605 (find_thread_object, find_inferior_object): Delete declarations.
7606 (thread_to_thread_object, inferior_to_inferior_object): New
7607 declarations.
7608 * record-btrace.c: Include "inferior.h".
7609 (require_btrace_thread): Use inferior_thread.
7610 (record_btrace_frame_sniffer)
7611 (record_btrace_tailcall_frame_sniffer): Use inferior_thread.
7612 (get_thread_current_frame): Use scoped_restore_current_thread and
7613 switch_to_thread.
7614 (get_thread_current_frame): Use thread pointer directly.
7615 (record_btrace_replay_at_breakpoint): Use thread's inferior
7616 pointer directly.
7617 * record-full.c: Include "inferior.h".
7618 * regcache.c: Include "gdbthread.h".
7619 (get_thread_arch_regcache): Use the inferior's address space
7620 directly.
7621 (get_thread_regcache, registers_changed_thread): New.
7622 * regcache.h (get_thread_regcache(thread_info *thread)): New
7623 overload.
7624 (registers_changed_thread): New.
7625 (remote_target) <remote_detach_1>: Swap order of parameters.
7626 (remote_add_thread): <remote_add_thread>: Return the new thread.
7627 (get_remote_thread_info(ptid_t)): New overload.
7628 (remote_target::remote_notice_new_inferior): Use thread pointers
7629 directly.
7630 (remote_target::process_initial_stop_replies): Use
7631 thread_info::set_running.
7632 (remote_target::remote_detach_1, remote_target::detach)
7633 (extended_remote_target::detach): Adjust.
7634 * stack.c (frame_show_address): Use inferior_thread.
7635 * target-debug.h (target_debug_print_thread_info_pp): New.
7636 * target-delegates.c: Regenerate.
7637 * target.c (default_thread_address_space): Delete.
7638 (memory_xfer_partial_1): Use current_inferior.
7639 (target_detach): Use current_inferior.
7640 (target_thread_address_space): Delete.
7641 (generic_mourn_inferior): Use current_inferior.
7642 * target.h (struct target_ops) <thread_address_space>: Delete.
7643 (target_thread_address_space): Delete.
7644 * thread.c (init_thread_list): Use ALL_THREADS_SAFE. Use thread
7645 pointers directly.
7646 (delete_thread_1, delete_thread, delete_thread_silent): Take a
7647 thread pointer instead of a ptid_t. Adjust all callers.
7648 (ptid_to_global_thread_id, global_thread_id_to_ptid): Delete.
7649 (first_thread_of_process): Delete, replaced by ...
7650 (first_thread_of_inferior): ... this new function. All callers
7651 adjusted.
7652 (any_thread_of_process): Rename to ...
7653 (any_thread_of_inferior): ... this, and take an inferior pointer.
7654 (any_live_thread_of_process): Rename to ...
7655 (any_live_thread_of_inferior): ... this, and take an inferior
7656 pointer.
7657 (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
7658 (value_in_thread_stack_temporaries)
7659 (get_last_thread_stack_temporary): Take a thread pointer instead
7660 of a ptid_t. Adjust all callers.
7661 (thread_info::set_running): New.
7662 (validate_registers_access): Use inferior_thread.
7663 (can_access_registers_ptid): Rename to ...
7664 (can_access_registers_thread): ... this, and take a thread
7665 pointer.
7666 (print_thread_info_1): Adjust to compare thread pointers instead
7667 of ptids.
7668 (switch_to_no_thread, switch_to_thread): Make extern.
7669 (scoped_restore_current_thread::~scoped_restore_current_thread):
7670 Use m_thread pointer directly.
7671 (scoped_restore_current_thread::scoped_restore_current_thread):
7672 Use inferior_thread.
7673 (thread_command): Use thread pointer directly.
7674 (thread_num_make_value_helper): Use inferior_thread.
7675 * top.c (execute_command): Use inferior_thread.
7676 * tui/tui-interp.c: Include "inferior.h".
7677 * varobj.c (varobj_create): Use inferior_thread.
7678 (value_of_root_1): Use find_thread_global_id instead of
7679 global_thread_id_to_ptid.
7680
7681 2018-06-21 Alan Hayward <alan.hayward@arm.com>
7682
7683 * regcache.c (readable_regcache::read_part): Avoid memcpy when
7684 possible.
7685 (regcache::write_part): Likewise.
7686 (readable_regcache::cooked_read_part): Update comment.
7687 (readable_regcache::cooked_write_part): Likewise.
7688 * regcache.h: (readable_regcache::read_part): Likewise.
7689 (regcache::write_part): Likewise.
7690
7691 2018-06-21 Richard Bunt <richard.bunt@arm.com>
7692 Dirk Schubert <dirk.schubert@arm.com>
7693
7694 * aarch64-linux-nat.c (post_attach): New.
7695 (aarch64_linux_nat_target::post_attach): Override post_attach to
7696 record the number of hardware debug registers.
7697
7698 2018-06-20 Tom Tromey <tom@tromey.com>
7699
7700 * python/py-param.c (add_setshow_generic): Make parameters const.
7701 (parmpy_init): Update.
7702
7703 2018-06-20 Simon Marchi <simon.marchi@polymtl.ca>
7704
7705 * regcache.h (regcache_cooked_read_ftype): Rename to...
7706 (register_read_ftype): ...this, change type to function_view.
7707 (class reg_buffer) <save>: Remove src parameter.
7708 (readonly_detached_regcache) <readonly_detached_regcache>: Make
7709 parameter non-const in first overload. Remove src parameter in
7710 second overload.
7711 * regcache.c (do_cooked_read): Remove.
7712 (readonly_detached_regcache::readonly_detached_regcache): Make
7713 parameter non-const, adjust call to other constructor.
7714 (reg_buffer::save): Remove src parameter.
7715 * frame.c (do_frame_register_read): Remove.
7716 (frame_save_as_regcache): Use lambda function.
7717 * ppc-linux-tdep.c (ppu2spu_unwind_register): Change type of src
7718 parameter to ppu2spu_data *.
7719 (ppu2spu_sniffer): Use lambda function.
7720
7721 2018-06-20 Simon Marchi <simon.marchi@polymtl.ca>
7722
7723 * record-full.c (record_full_target::insert_breakpoint): Remove
7724 "struct" keyword, add const.
7725
7726 2018-06-19 Simon Marchi <simon.marchi@ericsson.com>
7727
7728 * common/common-defs.h (PACKAGE_NAME, PACKAGE_VERSION,
7729 PACKAGE_STRING, PACKAGE_TARNAME): Undefine.
7730 * configure.ac: Remove AC_PREREQ, add missing quoting.
7731 * gnulib/configure.ac: Modernize usage of
7732 AC_INIT/AM_INIT_AUTOMAKE. Remove AC_PREREQ.
7733 * gnulib/update-gnulib.sh (AUTOCONF_VERSION): Bump to 2.69.
7734 (AUTOMAKE_VERSION): Bump to 1.15.1.
7735 * configure: Re-generate.
7736 * config.in: Re-generate.
7737 * aclocal.m4: Re-generate.
7738 * gnulib/aclocal.m4: Re-generate.
7739 * gnulib/config.in: Re-generate.
7740 * gnulib/configure: Re-generate.
7741 * gnulib/import/Makefile.in: Re-generate.
7742
7743 2018-06-19 Pedro Alves <palves@redhat.com>
7744
7745 * minsyms.c (msym_prefer_to_msym_type): New, factored out from ...
7746 (lookup_minimal_symbol_by_pc_section): ... here with
7747 gdb_assert_not_reached added.
7748
7749 2018-06-19 Pedro Alves <palves@redhat.com>
7750
7751 * inline-frame.c (stopped_by_user_bp_inline_frame): Replace PC
7752 parameter with a block parameter. Compare location's block symbol
7753 with the frame's block instead of addresses.
7754 (skip_inline_frames): Pass the current block instead of the
7755 frame's address. Break out as soon as we determine the frame
7756 should not be skipped.
7757
7758 2018-06-18 Tom Tromey <tom@tromey.com>
7759
7760 * solib-aix.c (solib_aix_get_section_offsets): Return
7761 unique_xmalloc_ptr.
7762 (solib_aix_solib_create_inferior_hook): Update.
7763
7764 2018-06-18 Tom Tromey <tom@tromey.com>
7765
7766 * solib-darwin.c (darwin_current_sos): Use unique_xmalloc_ptr.
7767
7768 2018-06-18 Tom Tromey <tom@tromey.com>
7769
7770 * solib-frv.c (frv_relocate_main_executable): Use
7771 unique_xmalloc_ptr.
7772 * solib-dsbt.c (dsbt_relocate_main_executable): Use
7773 unique_xmalloc_ptr.
7774
7775 2018-06-18 Tom Tromey <tom@tromey.com>
7776
7777 * objfiles.h (inhibit_section_map_updates): Update.
7778 (resume_section_map_updates, resume_section_map_updates_cleanup):
7779 Remove.
7780 * solib-svr4.c (svr4_handle_solib_event): Update.
7781 * objfiles.c (inhibit_section_map_updates): Return
7782 scoped_restore_tmpl<int>.
7783 (resume_section_map_updates, resume_section_map_updates_cleanup):
7784 Remove.
7785
7786 2018-06-18 Tom Tromey <tom@tromey.com>
7787
7788 * valprint.h (read_string): Update.
7789 * valprint.c (read_string): Change type of "buffer".
7790 (val_print_string): Update.
7791 * python/py-value.c (valpy_string): Update.
7792 * language.h (struct language_defn) <la_get_string>: Change
7793 type of "buffer".
7794 (default_get_string, c_get_string): Update.
7795 * language.c (default_get_string): Change type of "buffer".
7796 * guile/scm-value.c (gdbscm_value_to_string): Update.
7797 * c-lang.c (c_get_string): Change type of "buffer".
7798
7799 2018-06-18 Tom Tromey <tom@tromey.com>
7800
7801 * ser-mingw.c (struct pipe_state_destroyer): New.
7802 (pipe_state_up): New typedef.
7803 (cleanup_pipe_state): Remove.
7804 (pipe_windows_open): Use pipe_state_up. Don't release argv.
7805
7806 2018-06-18 Tom Tromey <tom@tromey.com>
7807
7808 * rust-lang.h (rust_yyerror): Don't declare.
7809 * rust-lang.c (rust_language_defn): Update.
7810 * rust-exp.y (yyerror): Now static.
7811 * parse.c (parse_exp_in_context_1): Update.
7812 * p-lang.h (p_yyerror): Don't declare.
7813 * p-lang.c (p_language_defn): Update.
7814 * p-exp.y (yyerror): Now static.
7815 * opencl-lang.c (opencl_language_defn): Update.
7816 * objc-lang.c (objc_language_defn): Update.
7817 * m2-lang.h (m2_yyerror): Don't declare.
7818 * m2-lang.c (m2_language_defn): Update.
7819 * m2-exp.y (yyerror): Now static.
7820 * language.h (struct language_defn) <la_error>: Remove.
7821 * language.c (unk_lang_error): Remove.
7822 (unknown_language_defn, auto_language_defn): Remove.
7823 * go-lang.h (go_yyerror): Don't declare.
7824 * go-lang.c (go_language_defn): Update.
7825 * go-exp.y (yyerror): Now static.
7826 * f-lang.h (f_yyerror): Don't declare.
7827 * f-lang.c (f_language_defn): Update.
7828 * f-exp.y (yyerror): Now static.
7829 * d-lang.h (d_yyerror): Don't declare.
7830 * d-lang.c (d_language_defn): Update.
7831 * d-exp.y (yyerror): Now static.
7832 * c-lang.h (c_yyerror): Don't declare.
7833 * c-lang.c (c_language_defn, cplus_language_defn)
7834 (asm_language_defn, minimal_language_defn): Update.
7835 * c-exp.y (yyerror): Now static.
7836 * ada-lang.h (ada_yyerror): Don't declare.
7837 * ada-lang.c (ada_language_defn): Update.
7838 * ada-exp.y (yyerror): Now static.
7839
7840 2018-06-18 Alan Hayward <alan.hayward@arm.com>
7841
7842 * aarch64-linux-nat.c (fetch_sveregs_from_thread): New function.
7843 (store_sveregs_to_thread): Likewise.
7844 (aarch64_linux_fetch_inferior_registers): Check for SVE.
7845 (aarch64_linux_store_inferior_registers): Likewise.
7846 * nat/aarch64-sve-linux-ptrace.c (aarch64_sve_get_sveregs): New
7847 function.
7848 (aarch64_sve_regs_copy_to_regcache): Likewise.
7849 (aarch64_sve_regs_copy_from_regcache): Likewise.
7850 * nat/aarch64-sve-linux-ptrace.h (aarch64_sve_get_sveregs): New
7851 declaration.
7852 (aarch64_sve_regs_copy_to_regcache): Likewise.
7853 (aarch64_sve_regs_copy_from_regcache): Likewise.
7854 (sve_context): Structure from Linux headers.
7855 (SVE_SIG_ZREGS_SIZE): Define from Linux headers.
7856 (SVE_SIG_ZREG_SIZE): Likewise.
7857 (SVE_SIG_PREG_SIZE): Likewise.
7858 (SVE_SIG_FFR_SIZE): Likewise.
7859 (SVE_SIG_REGS_OFFSET): Likewise.
7860 (SVE_SIG_ZREGS_OFFSET): Likewise.
7861 (SVE_SIG_ZREG_OFFSET): Likewise.
7862 (SVE_SIG_ZREGS_SIZE): Likewise.
7863 (SVE_SIG_PREGS_OFFSET): Likewise.
7864 (SVE_SIG_PREG_OFFSET): Likewise.
7865 (SVE_SIG_PREGS_SIZE): Likewise.
7866 (SVE_SIG_FFR_OFFSET): Likewise.
7867 (SVE_SIG_REGS_SIZE): Likewise.
7868 (SVE_SIG_CONTEXT_SIZE): Likewise.
7869 (SVE_PT_REGS_MASK): Likewise.
7870 (SVE_PT_REGS_FPSIMD): Likewise.
7871 (SVE_PT_REGS_SVE): Likewise.
7872 (SVE_PT_VL_INHERIT): Likewise.
7873 (SVE_PT_VL_ONEXEC): Likewise.
7874 (SVE_PT_REGS_OFFSET): Likewise.
7875 (SVE_PT_FPSIMD_OFFSET): Likewise.
7876 (SVE_PT_FPSIMD_SIZE): Likewise.
7877 (SVE_PT_SVE_ZREG_SIZE): Likewise.
7878 (SVE_PT_SVE_PREG_SIZE): Likewise.
7879 (SVE_PT_SVE_FFR_SIZE): Likewise.
7880 (SVE_PT_SVE_FPSR_SIZE): Likewise.
7881 (SVE_PT_SVE_FPCR_SIZE): Likewise.
7882 (__SVE_SIG_TO_PT): Likewise.
7883 (SVE_PT_SVE_OFFSET): Likewise.
7884 (SVE_PT_SVE_ZREGS_OFFSET): Likewise.
7885 (SVE_PT_SVE_ZREG_OFFSET): Likewise.
7886 (SVE_PT_SVE_ZREGS_SIZE): Likewise.
7887 (SVE_PT_SVE_PREGS_OFFSET): Likewise.
7888 (SVE_PT_SVE_PREG_OFFSET): Likewise.
7889 (SVE_PT_SVE_PREGS_SIZE): Likewise.
7890 (SVE_PT_SVE_FFR_OFFSET): Likewise.
7891 (SVE_PT_SVE_FPSR_OFFSET): Likewise.
7892 (SVE_PT_SVE_FPCR_OFFSET): Likewise.
7893 (SVE_PT_SVE_SIZE): Likewise.
7894 (SVE_PT_SIZE): Likewise.
7895 (HAS_SVE_STATE): New define.
7896
7897 2018-06-18 Alan Hayward <alan.hayward@arm.com>
7898
7899 * nat/aarch64-sve-linux-sigcontext.h: New file.
7900 * nat/aarch64-sve-linux-ptrace.h (SVE_VQ_BYTES): Move to
7901 new files.
7902 (SVE_VQ_MIN): Likewise.
7903 (SVE_VQ_MAX): Likewise.
7904 (SVE_VL_MIN): Likewise.
7905 (SVE_VL_MAX): Likewise.
7906 (SVE_NUM_ZREGS): Likewise.
7907 (SVE_NUM_PREGS): Likewise.
7908 (sve_vl_valid): Likewise.
7909 (struct user_sve_header): Likewise.
7910
7911 2018-06-16 Andrew Burgess <andrew.burgess@embecosm.com>
7912 Richard Bunt <Richard.Bunt@arm.com>
7913
7914 * linux-nat.c (stop_wait_callback): Don't discard SIGSTOP if it
7915 was requested by GDB.
7916
7917 2018-06-15 Tom de Vries <tdevries@suse.de>
7918
7919 * MAINTAINERS (Write After Approval): Add Tom de Vries.
7920
7921 2018-06-14 Simon Marchi <simon.marchi@polymtl.ca>
7922
7923 * gnulib/update-gnulib.sh: Print expected versions of
7924 autoconf/aclocal.
7925
7926 2018-06-14 Simon Marchi <simon.marchi@ericsson.com>
7927
7928 * arch-utils.c (default_type_align): Use type_length_units.
7929 * gdbtypes.c (type_align): Use type_length_units.
7930
7931 2018-06-14 Philippe Waroquiers <philippe.waroquiers@skynet.be>
7932
7933 * cli/cli-script.c (_initialize_cli_script): Fix online documentation
7934 of 'define' command.
7935
7936 2018-06-14 Tom de Vries <tdevries@suse.de>
7937
7938 PR cli/22573
7939 * infcmd.c (print_return_value_1): Use get_user_print_options instead of
7940 get_no_prettyformat_print_options.
7941
7942 2018-06-13 Simon Marchi <simon.marchi@ericsson.com>
7943
7944 * sparc-nat.h: Include target.h.
7945 * sparc64-linux-nat.c (class sparc64_linux_nat_target)
7946 <fetch_registers>: Remove this argument in function call.
7947 <store_registers>: Remove this argument in function call, remove
7948 extra semicolon.
7949 <low_forget_process>: Call sparc64_forget_process instead of
7950 sparc_forget_process.
7951
7952 2018-06-13 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
7953
7954 * procfs.c (_initialize_procfs): Use add_inf_child_target.
7955 (procfs_target::make_corefile_notes): Adjust to new
7956 target_read_alloc return type.
7957
7958 2018-06-12 Andrew Burgess <andrew.burgess@embecosm.com>
7959 Stephen Roberts <stephen.roberts@arm.com>
7960
7961 PR gdb/22882
7962 * infrun.c (fetch_inferior_event): If GDB is not proceeding then
7963 run INF_EXEC_COMPLETE handler, even when not calling normal_stop.
7964 Move should_notify_stop local into more inner scope.
7965
7966 2018-06-12 Andrew Burgess <andrew.burgess@embecosm.com>
7967 Stephen Roberts <stephen.roberts@arm.com>
7968
7969 PR gdb/22882
7970 * infrun.c (resume_1): Add call to mark_async_event_handler.
7971
7972 2018-06-12 Andrew Burgess <andrew.burgess@embecosm.com>
7973
7974 * infrun.c (do_target_wait): Change old version of $pc printed.
7975
7976 2018-06-11 Simon Marchi <simon.marchi@ericsson.com>
7977
7978 * dwarf2read.c (read_index_from_section): Rename to...
7979 (read_gdb_index_from_section): ... this, update all callers.
7980 (dwarf2_read_index): Rename to...
7981 (dwarf2_read_gdb_index): ... this, update all callers.
7982
7983 2018-06-11 John David Anglin <danglin@gcc.gnu.org>
7984
7985 * hppa-linux-nat.c
7986 (hppa_linux_nat_target::fetch_inferior_registers): Rename to
7987 hppa_linux_nat_target::fetch_registers.
7988
7989 2018-06-11 Alan Hayward <alan.hayward@arm.com>
7990
7991 * aarch64-tdep.c (aarch64_dwarf_reg_to_regnum): Add mappings.
7992 * aarch64-tdep.h (AARCH64_DWARF_SVE_VG): Add define.
7993 (AARCH64_DWARF_SVE_FFR): Likewise.
7994 (AARCH64_DWARF_SVE_P0): Likewise.
7995 (AARCH64_DWARF_SVE_Z0): Likewise.
7996
7997 2018-06-11 Alan Hayward <alan.hayward@arm.com>
7998
7999 * common/common-regcache.h (raw_compare): New function.
8000 * regcache.c (regcache::raw_compare): Likewise.
8001 * regcache.h (regcache::raw_compare): New declaration.
8002
8003 2018-06-11 Alan Hayward <alan.hayward@arm.com>
8004
8005 * common/common-regcache.h (reg_buffer_common): New structure.
8006 * regcache.c (reg_buffer::invalidate): Move from detached_regcache.
8007 (reg_buffer::raw_supply): Likewise.
8008 (reg_buffer::raw_supply_integer): Likewise.
8009 (reg_buffer::raw_supply_zeroed): Likewise.
8010 (reg_buffer::raw_collect): Likewise.
8011 (reg_buffer::raw_collect_integer): Likewise.
8012 * regcache.h (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
8019 2018-06-10 Tom Tromey <tom@tromey.com>
8020
8021 * remote.c (stop_reply_p): Remove typedef. Don't declare queue.
8022 (class remote_state) <stop_reply_queue>: Now std::vector.
8023 (remote_state::~remote_state)
8024 (remote_target::stop_reply_queue_length): Update.
8025 (struct queue_iter_param, remove_child_of_pending_fork)
8026 (struct check_pending_event_prevents_wildcard_vcont_callback_data)
8027 (check_pending_event_prevents_wildcard_vcont_callback)
8028 (remove_stop_reply_for_inferior)
8029 (remove_stop_reply_of_remote_state)
8030 (remote_notif_remove_once_on_match)
8031 (stop_reply_match_ptid_and_ws)
8032 (remote_kill_child_of_pending_fork): Remove.
8033 (remote_target::remove_new_fork_children)
8034 (remote_target::check_pending_events_prevent_wildcard_vcont)
8035 (remote_target::discard_pending_stop_replies)
8036 (remote_target::discard_pending_stop_replies_in_queue)
8037 (remote_target::remote_notif_remove_queued_reply)
8038 (remote_target::queued_stop_reply)
8039 (remote_target::push_stop_reply, remote_target::peek_stop_reply)
8040 (remote_target::wait, remote_target::kill_new_fork_children)
8041 (remote_target::async): Update.
8042
8043 2018-06-10 Tom Tromey <tom@tromey.com>
8044
8045 * record-full.c (record_full_arch_list_cleanups): Remove.
8046 (record_full_message): Use try/catch.
8047 (record_full_wait_cleanups): Remove.
8048 (record_full_wait_1): Use try/catch.
8049 (record_full_restore): Likewise.
8050
8051 2018-06-10 Tom Tromey <tom@tromey.com>
8052
8053 * record-full.c (record_full_breakpoint_p): Remove typedef. Don't
8054 declare VEC. Add constructor.
8055 <in_target_beneath>: Now bool.
8056 (record_full_breakpoints): Now a std::vector, static.
8057 (record_full_sync_record_breakpoints)
8058 (record_full_init_record_breakpoints)
8059 (record_full_target::insert_breakpoint)
8060 (record_full_target::remove_breakpoint): Update. Don't use XNEW.
8061
8062 2018-06-10 Simon Marchi <simon.marchi@polymtl.ca>
8063
8064 * dwarf2read.c (process_cu_includes): Remove struct keyword.
8065 * serial.c (serial_interface_lookup): Remove struct keyword.
8066
8067 2018-06-10 Tom Tromey <tom@tromey.com>
8068
8069 * procfs.c (procfs_target::xfer_partial): Use "beneath" as a
8070 method.
8071 * nto-procfs.c (nto_procfs_target::xfer_partial): Use "beneath" as
8072 a method.
8073 * go32-nat.c (go32_nat_target::xfer_partial): Use "beneath" as a
8074 method.
8075 * arm-linux-nat.c (arm_linux_nat_target::read_description): Use
8076 "beneath" as a method.
8077 * arm-fbsd-nat.c (arm_fbsd_nat_target::read_description):
8078 Use "beneath" as a method.
8079
8080 2018-06-10 Tom Tromey <tom@tromey.com>
8081
8082 * tracefile.c (struct trace_file_writer_deleter): New.
8083 <operator()>: Rename from trace_file_writer_xfree.
8084 (trace_file_writer_up): New typedef.
8085 (tsave_command, trace_save_tfile, trace_save_ctf): Update.
8086
8087 2018-06-09 Simon Marchi <simon.marchi@ericsson.com>
8088
8089 * regcache.h (reg_buffer) <~reg_buffer>: Use default destructor.
8090 <m_registers, m_register_status>: Change type to
8091 std::unique_ptr.
8092 * regcache.c (reg_buffer::reg_buffer): Use new instead of
8093 XCNEWVEC.
8094
8095 2018-06-09 Simon Marchi <simon.marchi@ericsson.com>
8096
8097 * common/common-regcache.h (enum register_status): Add
8098 underlying type "signed char".
8099 * regcache.h (reg_buffer) <m_register_status>: Change type to
8100 register_status *.
8101 * regcache.c (reg_buffer::reg_buffer): Alocate arrays of
8102 register_status instead of signed char.
8103 (reg_buffer::save): Use REG_UNKNOWN instead of 0.
8104 (reg_buffer::get_register_status): Remove cast.
8105 (readable_regcache::raw_read): Remove cast.
8106 (readable_regcache::cooked_read): Remove cast.
8107
8108 2018-06-09 Tom Tromey <tom@tromey.com>
8109
8110 * source.c (reverse_search_command, forward_search_command): Use
8111 scoped_fd.
8112
8113 2018-06-09 Tom Tromey <tom@tromey.com>
8114
8115 * serial.c (serial_ops_p): Remove typedef. Don't declare VEC.
8116 (serial_ops_list): Now static, std::vector.
8117 (serial_interface_lookup, serial_add_interface): Update.
8118
8119 2018-06-09 Tom Tromey <tom@tromey.com>
8120
8121 * dwarf2read.c (process_cu_includes): Update.
8122 (process_full_comp_unit): Update.
8123 * dwarf2read.h (struct dwarf2_per_objfile) <just_read_cus>: Now a
8124 std::vector.
8125
8126 2018-06-08 Paul Koning <paul_koning@dell.com>
8127
8128 PR gdb/23252
8129
8130 * python/python.c (do_start_initialization):
8131 Avoid call to internal Python API.
8132 (init__gdb_module): New function.
8133
8134 2018-06-08 Gary Benson <gbenson@redhat.com>
8135
8136 * linux-thread-db.c (valprint.h): New include.
8137 (struct check_thread_db_info): New structure.
8138 (check_thread_db_on_load, tdb_testinfo): New static globals.
8139 (check_thread_db, check_thread_db_callback): New functions.
8140 (try_thread_db_load_1): Run integrity checks if requested.
8141 (maintenance_check_libthread_db): New function.
8142 (_initialize_thread_db): Register "maint check libthread-db"
8143 and "maint set/show check-libthread-db".
8144 * NEWS: Mention the above new commands.
8145
8146 2018-06-08 Tom Tromey <tom@tromey.com>
8147
8148 * windows-nat.c (windows_nat_target::xfer_partial): "beneath" is
8149 now a method.
8150
8151 2018-06-08 Tom Tromey <tom@tromey.com>
8152
8153 * btrace.c (parse_xml_raw): Use gdb::unique_xmalloc_ptr.
8154
8155 2018-06-08 Tom Tromey <tom@tromey.com>
8156
8157 * common/btrace-common.h (struct btrace_data): Add constructor,
8158 destructor, move assignment operator.
8159 <empty, clear, fini>: New methods.
8160 <format>: Initialize.
8161 (btrace_data_init, btrace_data_fini, btrace_data_clear)
8162 (btrace_data_empty): Don't declare.
8163 * common/btrace-common.c (btrace_data_init): Remove.
8164 (btrace_data::fini): Rename from btrace_data_fini.
8165 (btrace_data::empty): Rename from btrace_data_empty.
8166 (btrace_data::clear): Rename from btrace_data_clear. Return
8167 bool.
8168 * btrace.h (make_cleanup_btrace_data): Don't declare.
8169 * btrace.c (btrace_add_pc, btrace_stitch_trace, btrace_clear)
8170 (parse_xml_btrace): Update.
8171 (do_btrace_data_cleanup, make_cleanup_btrace_data): Remove.
8172 (maint_btrace_clear_packet_history_cmd): Update.
8173
8174 2018-06-07 Pedro Alves <palves@redhat.com>
8175
8176 * target.h (target_ops) <beneath>: Now a method. All references
8177 updated.
8178 (class target_stack): New.
8179 * target.c (g_target_stack): New.
8180 (g_current_top_target): Delete.
8181 (current_top_target): Get the top target out of g_target_stack.
8182 (target_stack::push, target_stack::unpush): New.
8183 (push_target, unpush_target): Reimplement.
8184 (target_is_pushed): Reimplement in terms of g_target_stack.
8185 (target_ops::beneath, target_stack::find_beneath): New.
8186
8187 2018-06-07 Pedro Alves <palves@redhat.com>
8188
8189 * target.h (find_target_beneath): Delete declaration.
8190 * target.c (find_target_beneath): Delete definition.
8191 * aix-thread.c: All callers of find_target_beneath adjusted to
8192 call target_ops::beneath instead.
8193 * bsd-uthread.c: Likewise.
8194 * linux-thread-db.c: Likewise.
8195 * ravenscar-thread.c: Likewise.
8196 * sol-thread.c: Likewise.
8197 * spu-multiarch.c: Likewise.
8198
8199 2018-06-07 Pedro Alves <palves@redhat.com>
8200
8201 * target.h (target_ops) <beneath>: Now a method. All references
8202 updated.
8203 (target_ops) <m_beneath>: New.
8204 * target.c (target_ops::beneath): New.
8205 * corelow.c: Adjust all references to target_ops::beneath.
8206 * linux-thread-db.c: Likewise.
8207 * make-target-delegates: Likewise.
8208 * record-btrace.c: Likewise.
8209 * record-full.c: Likewise.
8210 * remote.c: Likewise.
8211 * target.c: Likewise.
8212 * target-delegates.c: Regenerate.
8213
8214 2018-06-07 Pedro Alves <palves@redhat.com>
8215
8216 * target.h (target_stack): Delete.
8217 (current_top_target): Declare function.
8218 * target.c (target_stack): Delete.
8219 (g_current_top_target): New.
8220 (current_top_target): New function.
8221 * auxv.c: Use current_top_target instead of target_stack
8222 throughout.
8223 * avr-tdep.c: Likewise.
8224 * breakpoint.c: Likewise.
8225 * corefile.c: Likewise.
8226 * elfread.c: Likewise.
8227 * eval.c: Likewise.
8228 * exceptions.c: Likewise.
8229 * frame.c: Likewise.
8230 * gdbarch-selftests.c: Likewise.
8231 * gnu-v3-abi.c: Likewise.
8232 * ia64-tdep.c: Likewise.
8233 * ia64-vms-tdep.c: Likewise.
8234 * infcall.c: Likewise.
8235 * infcmd.c: Likewise.
8236 * infrun.c: Likewise.
8237 * linespec.c: Likewise.
8238 * linux-tdep.c: Likewise.
8239 * minsyms.c: Likewise.
8240 * ppc-linux-nat.c: Likewise.
8241 * ppc-linux-tdep.c: Likewise.
8242 * procfs.c: Likewise.
8243 * regcache.c: Likewise.
8244 * remote.c: Likewise.
8245 * rs6000-tdep.c: Likewise.
8246 * s390-linux-nat.c: Likewise.
8247 * s390-tdep.c: Likewise.
8248 * solib-aix.c: Likewise.
8249 * solib-darwin.c: Likewise.
8250 * solib-dsbt.c: Likewise.
8251 * solib-spu.c: Likewise.
8252 * solib-svr4.c: Likewise.
8253 * solib-target.c: Likewise.
8254 * sparc-tdep.c: Likewise.
8255 * sparc64-tdep.c: Likewise.
8256 * spu-tdep.c: Likewise.
8257 * symfile.c: Likewise.
8258 * symtab.c: Likewise.
8259 * target-descriptions.c: Likewise.
8260 * target-memory.c: Likewise.
8261 * target.c: Likewise.
8262 * target.h: Likewise.
8263 * tracefile-tfile.c: Likewise.
8264 * tracepoint.c: Likewise.
8265 * valops.c: Likewise.
8266 * valprint.c: Likewise.
8267 * value.c: Likewise.
8268 * windows-tdep.c: Likewise.
8269 * mi/mi-main.c: Likewise.
8270
8271 2018-06-07 Tom Tromey <tom@tromey.com>
8272
8273 * valprint.h (build_address_symbolic): Declare.
8274 * printcmd.c (print_address_symbolic): Update.
8275 (build_address_symbolic): Change "name" and "filename" to
8276 std::string.
8277 * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn):
8278 Update.
8279 * defs.h (build_address_symbolic): Remove declaration.
8280
8281 2018-06-07 Alan Hayward <alan.hayward@arm.com>
8282
8283 * aarch64-tdep.c (AARCH64_SVE_V0_REGNUM): Add define.
8284 (aarch64_vnv_type): Add function.
8285 (aarch64_pseudo_register_name): Add V regs for SVE.
8286 (aarch64_pseudo_register_type): Likewise.
8287 (aarch64_pseudo_register_reggroup_p): Likewise.
8288 (aarch64_pseudo_read_value_2): Use V0 offset for SVE
8289 (aarch64_pseudo_read_value): Add V regs for SVE.
8290 (aarch64_pseudo_write_2): Use V0 offset for SVE
8291 (aarch64_pseudo_write): Add V regs for SVE.
8292 * aarch64-tdep.h (struct gdbarch_tdep): Add vnv_type.
8293
8294 2018-06-06 Sergio Durigan Junior <sergiodj@redhat.com>
8295
8296 * arch/aarch64.h (sve_vq_from_vl): Guard with #ifndef.
8297 (sve_vl_from_vq): Likewise.
8298
8299 2018-06-05 Tom Tromey <tom@tromey.com>
8300
8301 * cli/cli-cmds.c (show_version): Update.
8302 * top.c (print_gdb_version): Add "interactive" parameter.
8303 Update.
8304 * main.c (captured_main_1): Update.
8305 * top.h (print_gdb_version): Add "interactive" parameter and a
8306 comment.
8307
8308 2018-06-05 David Malcolm <dmalcolm@redhat.com>
8309
8310 * common/enum-flags.h: Add trailing semicolon to example in
8311 comment.
8312
8313 2018-06-05 Tom Tromey <tom@tromey.com>
8314
8315 PR cli/12326:
8316 * NEWS: Add entry about pager.
8317 * utils.c (pagination_disabled_for_command): New global.
8318 (prompt_for_continue): Allow "c" response to prompt.
8319 (reinitialize_more_filter): Clear
8320 pagination_disabled_for_command.
8321 (fputs_maybe_filtered): Check pagination_disabled_for_command.
8322
8323 2018-06-04 Tom Tromey <tom@tromey.com>
8324
8325 * ada-lang.h (ada_lookup_symbol_list): Update.
8326 * ada-lang.c (resolve_subexp): Update.
8327 (symbols_are_identical_enums): Change type of syms. Remove nsyms
8328 parameter.
8329 (remove_extra_symbols, remove_irrelevant_renamings): Likewise.
8330 (ada_lookup_symbol_list_worker, ada_lookup_symbol_list): Change
8331 results parameter to std::vector.
8332 (ada_iterate_over_symbols, ada_lookup_symbol, get_var_value):
8333 Update.
8334 * ada-exp.y (block_lookup): Update.
8335 (select_possible_type_sym): Change type of syms. Remove nsyms
8336 parameter.
8337 (write_var_or_type, write_name_assoc): Update.
8338
8339 2018-06-04 Joel Brobecker <brobecker@adacore.com>
8340
8341 * windows-nat.c (windows_nat_target::xfer_partial): Return
8342 TARGET_XFER_E_IO if we need to delegate to the target beneath
8343 but BENEATH is NULL.
8344
8345 2018-06-04 Simon Marchi <simon.marchi@ericsson.com>
8346
8347 * Makefile.in (config.status): Add configure.nat as a
8348 dependency.
8349
8350 2018-06-04 Tom Tromey <tom@tromey.com>
8351
8352 * cp-name-parser.y (cpname_state): Add method declarations.
8353 (HANDLE_QUAL): Update.
8354 (cpname_state::d_grab, cpname_state::fill_comp)
8355 (cpname_state::make_operator, cpname_state::make_dtor)
8356 (cpname_state::make_builtin_type, cpname_state::make_name)
8357 (cpname_state::d_qualify, cpname_state::d_int_type)
8358 (cpname_state::d_unary, cpname_state::d_binary): Now methods.
8359 (%union): Move earlier.
8360
8361 2018-06-04 Alan Hayward <alan.hayward@arm.com>
8362
8363 * elfread.c (elf_symfile_segments): Use ELF_SECTION_IN_SEGMENT.
8364
8365 2018-06-04 Alan Hayward <alan.hayward@arm.com>
8366
8367 * aarch64-tdep.c (aarch64_pseudo_read_value_1): New helper func.
8368 (aarch64_pseudo_write_1): Likewise.
8369 (aarch64_pseudo_read_value): Use helper.
8370 (aarch64_pseudo_write): Likewise.
8371
8372 2018-06-04 Pedro Alves <palves@redhat.com>
8373
8374 * darwin-nat.c (darwin_ops): Delete.
8375 (darwin_attach_pid): Use get_native_target.
8376
8377 2018-06-04 Alan Hayward <alan.hayward@arm.com>
8378
8379 * aarch64-tdep.c (aarch64_get_tdesc_vq): Use uint64_t for VQ.
8380 * aarch64-tdep.h (struct gdbarch_tdep): Likewise.
8381
8382 2018-06-04 Alan Hayward <alan.hayward@arm.com>
8383
8384 * aarch64-linux-nat.c (aarch64_linux_read_description): Support SVE.
8385 * aarch64-tdep.c (aarch64_get_tdesc_vq): New function.
8386 (aarch64_gdbarch_init): Check for SVE.
8387 * aarch64-tdep.h (gdbarch_tdep::has_sve): New function.
8388
8389 2018-06-04 Alan Hayward <alan.hayward@arm.com>
8390
8391 * aarch64-tdep.c (aarch64_read_description): Use uint64_t for VQ.
8392 * aarch64-tdep.h (aarch64_read_description): Likewise.
8393 * arch/aarch64.c (aarch64_create_target_description): Likewise.
8394 * arch/aarch64.h (aarch64_create_target_description): Likewise.
8395 * features/aarch64-sve.c (create_feature_aarch64_sve): Likewise.
8396 * nat/aarch64-sve-linux-ptrace.c(aarch64_sve_get_vq): Likewise.
8397 * nat/aarch64-sve-linux-ptrace.h (aarch64_sve_get_vq): Likewise.
8398
8399 2018-06-02 Simon Marchi <simon.marchi@ericsson.com>
8400
8401 * value.c (value_fetch_lazy_bitfield): New.
8402 (value_fetch_lazy_memory): New.
8403 (value_fetch_lazy_register): New.
8404 (value_fetch_lazy): Factor out to smaller functions.
8405
8406 2018-06-01 Tom Tromey <tom@tromey.com>
8407
8408 * cp-name-parser.y (backslashable, represented): Now const.
8409
8410 2018-06-01 Tom Tromey <tom@tromey.com>
8411
8412 * cp-name-parser.y: Include parser-defs.h.
8413 (parser_fprintf): Remove declaration.
8414
8415 2018-06-01 Tom Tromey <tom@tromey.com>
8416
8417 * cp-name-parser.y: Use %pure-parser, %lex-param, and
8418 %parse-param.
8419 (lexptr, prev_lexptr, error_lexptr, global_errmsg, demangle_info)
8420 (global_result): Remove globals.
8421 (struct cpname_state): New.
8422 (yyparse): Don't declare.
8423 (yylex, yyerror): Move declarations after %union.
8424 (d_grab, fill_comp, make_operator, make_dtor, make_builtin_type)
8425 (make_name): Add state parameter.
8426 Update all callers.
8427 (d_qualify, d_int_type, d_unary, d_binary, parse_number) Add state
8428 parameter.
8429 (HANDLE_QUAL, HANDLE_SPECIAL, HANDLE_TOKEN2, HANDLE_TOKEN3):
8430 Update.
8431 (yylex): Add lvalp, state parameters.
8432 (yyerror): Add state parameter.
8433 (cp_demangled_name_to_comp): Update.
8434
8435 2018-06-01 Tom Tromey <tom@tromey.com>
8436
8437 * cp-name-parser.y (parser_fprintf): Declare.
8438 (GDB_YY_REMAP_PREFIX): Define.
8439 Include yy-remap.h. Don't redefine yy* identifiers.
8440
8441 2018-06-01 Tom Tromey <tom@tromey.com>
8442
8443 * python/py-type.c (typy_legacy_template_argument): Update.
8444 * cp-support.h (cp_demangled_name_to_comp): Update.
8445 * cp-name-parser.y (cp_demangled_name_to_comp): Change errmsg
8446 parameter to be a "std::string *".
8447 (main): Update.
8448
8449 2018-06-01 H.J. Lu <hongjiu.lu@intel.com>
8450
8451 * ada-lex.l: Include "diagnostics.h" instead of
8452 "common/diagnostics.h".
8453 * unittests/environ-selftests.c: Likewise.
8454 * common/diagnostics.h: Moved to ../include.
8455
8456 2018-06-01 Joel Brobecker <brobecker@adacore.com>
8457
8458 * breakpoint.c (breakpoint_re_set): Temporarily force language_mode
8459 to language_mode_manual while calling breakpoint_re_set_one.
8460
8461 2018-06-01 Tom Tromey <tom@tromey.com>
8462
8463 * valops.c (value_cast_structs, destructor_name_p): Update.
8464 * symtab.c (gdb_mangle_name): Update.
8465 * stabsread.c (define_symbol, read_cpp_abbrev, read_baseclasses):
8466 Update.
8467 * p-valprint.c (pascal_object_is_vtbl_ptr_type)
8468 (pascal_object_print_value_fields, pascal_object_print_value):
8469 Update.
8470 * p-typeprint.c (pascal_type_print_derivation_info): Update.
8471 * linespec.c (find_methods): Update.
8472 * gdbtypes.h (type_name_no_tag): Remove.
8473 (type_name_or_error): Rename from type_name_no_tag_or_error.
8474 * gdbtypes.c (type_name_no_tag): Remove.
8475 (type_name_or_error): Rename from type_name_no_tag_or_error.
8476 (lookup_struct_elt_type, check_typedef): Update.
8477 * expprint.c (print_subexp_standard): Update.
8478 * dwarf2read.c (dwarf2_add_field, load_partial_dies): Update.
8479 * d-namespace.c (d_lookup_nested_symbol): Update.
8480 * cp-valprint.c (cp_is_vtbl_ptr_type, cp_print_value_fields)
8481 (cp_print_class_member): Update.
8482 * cp-namespace.c (cp_lookup_nested_symbol): Update.
8483 * completer.c (add_struct_fields): Update.
8484 * c-typeprint.c (cp_type_print_derivation_info)
8485 (c_type_print_varspec_prefix, c_type_print_base_struct_union):
8486 Update.
8487 * ada-lang.c (parse_old_style_renaming, xget_renaming_scope)
8488 (ada_prefer_type, ada_is_exception_sym): Update.
8489
8490 2018-06-01 Tom Tromey <tom@tromey.com>
8491
8492 * valops.c (enum_constant_from_type, value_namespace_elt)
8493 (value_maybe_namespace_elt): Update.
8494 * valarith.c (find_size_for_pointer_math): Update.
8495 * target-descriptions.c (make_gdb_type): Update.
8496 * symmisc.c (print_symbol): Update.
8497 * stabsread.c (define_symbol, read_type)
8498 (complain_about_struct_wipeout, add_undefined_type)
8499 (cleanup_undefined_types_1): Update.
8500 * rust-lang.c (rust_tuple_type_p, rust_slice_type_p)
8501 (rust_range_type_p, val_print_struct, rust_print_struct_def)
8502 (rust_internal_print_type, rust_composite_type)
8503 (rust_evaluate_funcall, rust_evaluate_subexp)
8504 (rust_inclusive_range_type_p): Update.
8505 * python/py-type.c (typy_get_tag): Update.
8506 * p-typeprint.c (pascal_type_print_base): Update.
8507 * mdebugread.c (parse_symbol, parse_type): Update.
8508 * m2-typeprint.c (m2_long_set, m2_record_fields, m2_enum):
8509 Update.
8510 * guile/scm-type.c (gdbscm_type_tag): Update.
8511 * go-lang.c (sixg_string_p): Update.
8512 * gnu-v3-abi.c (build_gdb_vtable_type, build_std_type_info_type):
8513 Update.
8514 * gdbtypes.h (struct main_type) <tag_name>: Remove.
8515 (TYPE_TAG_NAME): Remove.
8516 * gdbtypes.c (type_name_no_tag): Simplify.
8517 (check_typedef, check_types_equal, recursive_dump_type)
8518 (copy_type_recursive, arch_composite_type): Update.
8519 * f-typeprint.c (f_type_print_base): Update. Print "Type" prefix
8520 in summary mode when needed.
8521 * eval.c (evaluate_funcall): Update.
8522 * dwarf2read.c (fixup_go_packaging, read_structure_type)
8523 (process_structure_scope, read_enumeration_type)
8524 (read_namespace_type, read_module_type, determine_prefix): Update.
8525 * cp-support.c (inspect_type): Update.
8526 * coffread.c (process_coff_symbol, decode_base_type): Update.
8527 * c-varobj.c (c_is_path_expr_parent): Update.
8528 * c-typeprint.c (c_type_print_base_struct_union): Update.
8529 (c_type_print_base_1): Update. Print struct/class/union/enum in
8530 summary when using C language.
8531 * ax-gdb.c (gen_struct_ref, gen_namespace_elt)
8532 (gen_maybe_namespace_elt): Update.
8533 * ada-lang.c (ada_type_name): Simplify.
8534 (empty_record, ada_template_to_fixed_record_type_1)
8535 (template_to_static_fixed_type)
8536 (to_record_with_fixed_variant_part, ada_check_typedef): Update.
8537
8538 2018-06-01 Tom Tromey <tom@tromey.com>
8539
8540 * dwarf2read.c (dwarf2_compute_name): Pass CU's language to
8541 c_print_type.
8542 * c-typeprint.c (c_print_type_1): Add "language" parameter.
8543 (c_print_type): Update.
8544 (c_print_type): New overload.
8545 (c_type_print_varspec_prefix, c_type_print_args)
8546 (c_type_print_varspec_suffix, c_print_type_no_offsets)
8547 (c_type_print_base_struct_union, c_type_print_base_1)
8548 (cp_type_print_method_args): Add "language" parameter.
8549 (c_type_print_base): Update.
8550 * c-lang.h (c_print_type): Add new overload.
8551
8552 2018-06-01 Tom Tromey <tom@tromey.com>
8553
8554 * typeprint.h (c_type_print_varspec_suffix): Don't declare.
8555 * c-typeprint.c (c_type_print_varspec_suffix): Now static.
8556
8557 2018-06-01 Alan Hayward <alan.hayward@arm.com>
8558
8559 * aarch64-tdep.c (aarch64_sve_register_names): New const
8560 var.
8561 * arch/aarch64.h (enum aarch64_regnum): Add SVE entries.
8562 (AARCH64_SVE_Z_REGS_NUM): New define.
8563 (AARCH64_SVE_P_REGS_NUM): Likewise.
8564 (AARCH64_SVE_NUM_REGS): Likewise.
8565
8566 2018-05-31 Uros Bizjak <ubizjak@gmail.com>
8567
8568 * nat/linux-ptrace.h [__alpha__]
8569 (GDB_ARCH_IS_TRAP_BRKPT, GDB_ARCH_IS_TRAP_HWBKPT): Remove
8570 definitions.
8571
8572 2018-05-31 Maciej W. Rozycki <macro@mips.com>
8573
8574 * arch-utils.c (gdbarch_info_fill): Set `default_byte_order' to
8575 the endianness selected.
8576 * NEWS: Document `set endian auto' mode operation update.
8577
8578 2018-05-31 Alan Hayward <alan.hayward@arm.com>
8579
8580 * Makefile.in: Add new header.
8581 * gdb/arch/aarch64.h (sve_vg_from_vl): New macro.
8582 (sve_vl_from_vg): Likewise.
8583 (sve_vq_from_vl): Likewise.
8584 (sve_vl_from_vq): Likewise.
8585 (sve_vq_from_vg): Likewise.
8586 (sve_vg_from_vq): Likewise.
8587 * configure.nat: Add new c file.
8588 * nat/aarch64-sve-linux-ptrace.c: New file.
8589 * nat/aarch64-sve-linux-ptrace.h: New file.
8590
8591 2018-05-31 Alan Hayward <alan.hayward@arm.com>
8592
8593 * aarch64-linux-nat.c (aarch64_linux_read_description):
8594 Add parmeter zero.
8595 * aarch64-linux-tdep.c (aarch64_linux_core_read_description):
8596 Likewise.
8597 * aarch64-tdep.c (tdesc_aarch64_list): Add.
8598 (aarch64_read_description): Use VQ to index tdesc_aarch64_list.
8599 (aarch64_gdbarch_init): Add parmeter zero.
8600 * aarch64-tdep.h (aarch64_read_description): Add VQ parmeter.
8601 * arch/aarch64.c (aarch64_create_target_description): Check VQ.
8602 * arch/aarch64.h (aarch64_create_target_description): Add VQ.
8603 parmeter.
8604 * doc/gdb.texinfo: Describe SVE feature
8605 * features/aarch64-sve.c: New file.
8606
8607 2018-05-31 Omair Javaid <omair.javaid@linaro.org>
8608
8609 PR gdb/23210
8610 * gdbarch.sh (significant_addr_bit): Default to zero when
8611 not set by target architecture.
8612 * gdbarch.c: Re-generated.
8613 * utils.c (address_significant): Update.
8614
8615 2018-05-30 Joel Brobecker <brobecker@adacore.com>
8616
8617 * stack.c (func_command): Remove trailing newline in call to error.
8618
8619 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
8620
8621 * regcache.h (regcache_raw_collect): Remove, update callers to
8622 use regcache::raw_collect.
8623 * regcache.c (regcache_raw_collect): Remove.
8624
8625 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
8626
8627 * regcache.h (regcache_raw_supply): Remove, update callers to
8628 use detached_regcache::raw_supply.
8629 * regcache.c (regcache_raw_supply): Remove.
8630
8631 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
8632
8633 * regcache.h (regcache_cooked_write_part): Remove, update
8634 callers to use regcache::cooked_write_part.
8635 * regcache.c (regcache_cooked_write_part): Remove.
8636
8637 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
8638
8639 * regcache.h (regcache_cooked_read_part): Remove, update callers
8640 to use readable_regcache::cooked_read_part.
8641 * regcache.c (regcache_cooked_read_part): Remove.
8642
8643 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
8644
8645 * regcache.h (regcache_cooked_read_value): Remove, update
8646 callers to use readable_regcache::cooked_read_value.
8647 * regcache.c (regcache_cooked_read_value): Remove.
8648
8649 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
8650
8651 * regcache.h (regcache_cooked_write): Remove, update callers to
8652 use regcache::cooked_write.
8653 * regcache.c (regcache_cooked_write): Remove.
8654
8655 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
8656
8657 * regcache.h (regcache_invalidate): Remove, update callers to
8658 use detached_regcache::invalidate instead.
8659 * regcache.c (regcache_invalidate): Remove.
8660
8661 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
8662
8663 * regcache.h (regcache_raw_write_part): Remove, update callers
8664 to use regcache::raw_write_part instead.
8665 * regcache.c (regcache_raw_write_part): Remove.
8666
8667 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
8668
8669 * regcache.h (regcache_raw_read_part): Remove, update callers to
8670 use readable_regcache::raw_read_part instead.
8671 * regcache.c (regcache_raw_read_part): Remove.
8672
8673 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
8674
8675 * regcache.h (regcache_cooked_read): Remove, update callers to
8676 use readable_regcache::cooked_read instead.
8677 * regcache.c (regcache_cooked_read): Remove.
8678
8679 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
8680
8681 * regcache.h (regcache_raw_write): Remove, update callers to use
8682 regcache::raw_write instead.
8683 * regcache.c (regcache_raw_write): Remove.
8684
8685 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
8686
8687 * regcache.h (regcache_raw_read): Remove, update callers to use
8688 readable_regcache::raw_read instead.
8689 * regcache.c (regcache_raw_read): Remove.
8690
8691 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
8692
8693 * regcache.h (regcache_raw_update): Remove, update callers to
8694 use readable_regcache::raw_update instead.
8695 * regcache.c (regcache_raw_update): Remove.
8696
8697 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
8698
8699 * regcache.h (regcache_register_status): Remove, update callers
8700 to use reg_buffer::get_register_status directly instead.
8701 * regcache.c (regcache_register_status): Remove.
8702
8703 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
8704
8705 * regcache.h (regcache_get_ptid): Remove, update all callers to
8706 call regcache::ptid instead.
8707 * regcache.c (regcache_get_ptid): Remove.
8708
8709 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
8710
8711 * Makefile.in (ALL_TARGET_OBS): Add or1k-tdep.o.
8712
8713 2018-05-30 Pedro Alves <palves@redhat.com>
8714
8715 * common/common-exceptions.h (exception_rethrow): Use
8716 ATTRIBUTE_NORETURN.
8717
8718 2018-05-29 Simon Marchi <simon.marchi@polymtl.ca>
8719
8720 * breakpoint.c (print_solib_event, check_status_catch_solib):
8721 Remove struct keyword in range-based for loops.
8722 * dbxread.c (find_corresponding_bincl_psymtab): Likewise.
8723 * dwarf2read.c (compute_delayed_physnames, rust_union_quirks);
8724 Likewise.
8725 * linespec.c (find_superclass_methods, search_minsyms_for_name):
8726 Likewise.
8727 * symfile.c (addr_info_make_relative): Likewise.
8728 * thread.c (value_in_thread_stack_temporaries): Likewise.
8729
8730 2018-06-12 Weimin Pan <weimin.pan@oracle.com>
8731
8732 PR gdb/16841
8733 * valops.c (value_struct_elt_for_reference): Call check_typedef on
8734 aggregate type to get its real type before accessing it.
8735
8736 2018-05-29 Weimin Pan <weimin.pan@oracle.com>
8737
8738 * minsyms.h (lookup_minimal_symbol_and_objfile): Remove declaration.
8739 * minsyms.c (lookup_minimal_symbol_and_objfile): Remove definition.
8740 * coff-pe-read.c (add_pe_forwarded_sym): Replace
8741 lookup_minimal_symbol_and_objfile with lookup_bound_minimal_symbol.
8742 * glibc-tdep.c (glibc_skip_solib_resolver): Likewise.
8743 * jit.c (jit_breakpoint_re_set_internal): Likewise.
8744 * printcmd.c (info_address_command): Likewise.
8745
8746 2018-05-29 Tom Tromey <tom@tromey.com>
8747
8748 * windows-nat.c (handle_exception): Update fall-through comment.
8749
8750 2018-05-29 Tom Tromey <tom@tromey.com>
8751
8752 * progspace.h (so_list_ptr): Remove typedef. Don't declare VEC.
8753 (struct program_space) <added_solibs>: Now a std::vector.
8754 * breakpoint.c (print_solib_event): Update.
8755 (check_status_catch_solib): Update.
8756 * progspace.c (clear_program_space_solib_cache): Update.
8757 * solib.c (update_solib_list): Update.
8758
8759 2018-05-29 Tom Tromey <tom@tromey.com>
8760
8761 * python/py-type.c (typy_richcompare): Update.
8762 * guile/scm-type.c (tyscm_equal_p_type_smob): Update.
8763 * gdbtypes.h (types_deeply_equal): Return bool.
8764 (types_equal): Likewise.
8765 * gdbtypes.c (type_equality_entry_d): Remove typedef. Don't
8766 declare VEC.
8767 (check_types_equal): Change worklist to std::vector. Return
8768 bool.
8769 (struct type_equality_entry): Add constructor.
8770 (compare_maybe_null_strings): Return bool.
8771 (check_types_worklist): Return bool. Change worklist to
8772 std::vector.
8773 (types_deeply_equal): Use std::vector.
8774 (types_equal): Return bool.
8775 (compare_maybe_null_strings): Simplify.
8776
8777 2018-05-29 Tom Tromey <tom@tromey.com>
8778
8779 * record-btrace.c (tp_t): Remove typedef. Don't declare VEC.
8780
8781 2018-05-29 Tom Tromey <tom@tromey.com>
8782
8783 * objc-lang.h: Don't include cp-support.h.
8784 * common/gdb_vecs.h (const_char_ptr): Remove typedef. Don't
8785 declare VEC.
8786
8787 2018-05-27 Tom Tromey <tom@tromey.com>
8788
8789 * Makefile.in (DEPFILES): Don't reference REMOTE_OBS.
8790
8791 2018-05-25 Tom Tromey <tom@tromey.com>
8792
8793 * value.c (value::location): Initialize.
8794
8795 2018-05-25 Tom Tromey <tom@tromey.com>
8796
8797 * dbxread.c (init_bincl_list): Remove.
8798 (bincl_list): Now a std::vector.
8799 (bincls_allocated, next_bincl): Remove.
8800 (free_bincl_list, do_free_bincl_list_cleanup)
8801 (make_cleanup_free_bincl_list): Remove.
8802 (dbx_read_symtab, elfstab_build_psymtabs): Use scoped_restore,
8803 unique_xmalloc_ptr.
8804 (find_corresponding_bincl_psymtab, read_dbx_symtab): Update.
8805 (struct header_file_location): Add constructor.
8806 (add_bincl_to_list): Remove.
8807
8808 2018-05-25 Tom Tromey <tom@tromey.com>
8809
8810 * tui/tui.c (tui_enable): Update.
8811 * mi/mi-interp.c (mi_interp::init): Update.
8812 * interps.h (class interp) <name>: New method.
8813 <m_name>: Rename from name.
8814 (~scoped_restore_interp): Update.
8815 * interps.c (interp::interp): Update.
8816 (interp_add, interp_set, interp_lookup_existing)
8817 (current_interp_named_p): Update.
8818
8819 2018-05-25 Tom Tromey <tom@tromey.com>
8820
8821 * interps.c (interp_name): Remove.
8822 * mi/mi-interp.c (mi_interp::init): Update.
8823 * interps.h (interp_name): Remove.
8824 (~scoped_restore_interp): Update.
8825 * tui/tui.c (tui_enable): Update.
8826
8827 2018-05-25 Tom Tromey <tom@tromey.com>
8828
8829 * utils.c (fputs_maybe_filtered): Update.
8830 * linespec.c (decode_line_full): Update.
8831 * mi/mi-interp.c (mi_on_normal_stop_1, mi_tsv_modified)
8832 (mi_print_breakpoint_for_event, mi_solib_loaded)
8833 (mi_solib_unloaded, mi_command_param_changed, mi_memory_changed)
8834 (mi_user_selected_context_changed): Update.
8835 * mi/mi-main.c (mi_execute_command): Update.
8836 * cli/cli-script.c (execute_control_command): Update.
8837 * python/python.c (execute_gdb_command): Update.
8838 * solib.c (info_sharedlibrary_command): Update.
8839 * interps.c (interp_ui_out): Remove.
8840 * interps.h (interp_ui_out): Remove.
8841
8842 2018-05-25 Tom Tromey <tom@tromey.com>
8843
8844 * tui/tui-interp.c (as_tui_interp): Use dynamic_cast.
8845 * mi/mi-interp.c (as_mi_interp): Use dynamic_cast.
8846 * cli/cli-interp.c (as_cli_interp): Use dynamic_cast.
8847
8848 2018-05-25 Tom Tromey <tom@tromey.com>
8849
8850 * cli/cli-interp.c (safe_execute_command): Use scoped_restore.
8851 * interps.c (interp_exec): Use scoped_restore.
8852
8853 2018-05-25 Tom Tromey <tom@tromey.com>
8854
8855 * remote.c (remote_target::remote_file_get): Use
8856 gdb::byte_vector.
8857 (remote_target::remote_file_put): Likewise.
8858
8859 2018-05-25 Tom Tromey <tom@tromey.com>
8860
8861 * coff-pe-read.c (struct read_pe_section_data) <section_name>: Now
8862 a std::string.
8863 (get_pe_section_index, add_pe_exported_sym): Update.
8864 (read_pe_exported_syms): Use gdb::def_vector.
8865
8866 2018-05-25 Tom Tromey <tom@tromey.com>
8867
8868 * frame.c (remove_prev_frame): Remove.
8869 (get_prev_frame_if_no_cycle): Use TRY/CATCH.
8870
8871 2018-05-25 Maciej W. Rozycki <macro@mips.com>
8872
8873 * mips-linux-tdep.h (mips_supply_fpregset, mips_fill_fpregset):
8874 Remove prototypes.
8875 * mips-linux-nat.c (supply_fpregset): Always call
8876 `mips64_supply_fpregset' rather than `mips_supply_fpregset'.
8877 (fill_fpregset): Always call `mips64_fill_fpregset' rather than
8878 `mips_fill_fpregset'.
8879 * mips-linux-tdep.c (mips_supply_fpregset)
8880 (mips_supply_fpregset_wrapper, mips_fill_fpregset)
8881 (mips_fill_fpregset_wrapper): Remove functions.
8882 (mips64_supply_fpregset, mips64_fill_fpregset): Update comments.
8883 (mips_linux_fpregset): Remove variable.
8884 (mips_linux_iterate_over_regset_sections): Use
8885 `mips64_linux_fpregset' in place of `mips_linux_fpregset'.
8886 (mips_linux_o32_sigframe_init): Remove comment.
8887
8888 2018-05-25 Pedro Alves <palves@redhat.com>
8889
8890 * remote.c (struct vCont_action_support, MAXTHREADLISTRESULTS)
8891 (struct readahead_cache, struct packet_reg, struct
8892 remote_arch_state, class remote_state): Move higher up in the
8893 file.
8894 (remote_target::m_remote_state): Now an object instead of a pointer.
8895 (remote_target::get_remote_state): Adjust.
8896
8897 2018-05-24 Andrew Burgess <andrew.burgess@embecosm.com>
8898
8899 * stack.c (select_and_print_frame): Delete.
8900 (struct function_bounds): Move struct within function.
8901 (func_command): Most content moved into new function
8902 find_frame_for_function, use new function, print result, add
8903 function comment.
8904 (find_frame_for_function): New function, now returns a result.
8905
8906 2018-05-24 Philippe Waroquiers <philippe.waroquiers@skynet.be>
8907
8908 * stack.c (iterate_over_block_arg_vars): Fix comment.
8909 (print_frame_arg_vars): Pass stream in cb_data, not gdb_stdout.
8910
8911 2018-05-24 Andrew Burgess <andrew.burgess@embecosm.com>
8912
8913 PR gdb/23203
8914 * frame.c
8915 (scoped_restore_selected_frame::scoped_restore_selected_frame):
8916 Define.
8917 (scoped_restore_selected_frame::~scoped_restore_selected_frame):
8918 Define.
8919 * frame.h (class scoped_restore_selected_frame): New class.
8920 * stack.c (print_frame_local_vars): Remove catching and rethrowing
8921 of any exception, use scoped_restore_selected_frame to restore the
8922 frame instead.
8923
8924 2018-05-24 Pedro Alves <palves@redhat.com>
8925
8926 * darwin-nat.h (darwin_nat_target::create_inferior): Mark with
8927 override.
8928
8929 2018-05-23 Tom Tromey <tom@tromey.com>
8930
8931 * complaints.c (struct complaints): Remove.
8932 (symfile_complaint_book): Remove.
8933 (series): New global.
8934 (complaint_internal): Update.
8935 (clear_complaints): Update.
8936
8937 2018-05-23 Tom Tromey <tom@tromey.com>
8938
8939 * complaints.c (counters): New global.
8940 (struct complain): Remove.
8941 (struct complaints) <root>: Remove.
8942 (complaint_sentinel): Remove.
8943 (symfile_complaint_book): Update.
8944 (find_complaint) Remove.
8945 (complaint_internal, clear_complaints): Update.
8946
8947 2018-05-23 Tom Tromey <tom@tromey.com>
8948
8949 * complaints.c (struct complain) <file, line>: Remove.
8950 (find_complaint): Remove file, line parameters.
8951 (complaint_internal): Update.
8952
8953 2018-05-23 Tom Tromey <tom@tromey.com>
8954
8955 * complaints.c (vcomplaint): Remove.
8956 (complaint_internal) Merge in contents of vcomplaint.
8957
8958 2018-05-23 Tom Tromey <tom@tromey.com>
8959
8960 * complaints.c (struct complaints) <explanation>: Remove.
8961 (symfile_explanations): Remove.
8962 (symfile_complaint_book): Update.
8963 (vcomplaint): Update.
8964 (struct explanation): Remove.
8965
8966 2018-05-23 Tom Tromey <tom@tromey.com>
8967
8968 * complaints.c (symfile_complaints): Remove.
8969 (complaint_internal): Remove "complaints" parameter.
8970 (clear_complaints, vcomplaint): Remove "c" parameter.
8971 (get_complaints): Remove.
8972 * dwarf2read.c (dwarf2_statement_list_fits_in_line_number_section_complaint)
8973 (dwarf2_debug_line_missing_file_complaint)
8974 (dwarf2_debug_line_missing_end_sequence_complaint)
8975 (dwarf2_complex_location_expr_complaint)
8976 (dwarf2_const_value_length_mismatch_complaint)
8977 (dwarf2_section_buffer_overflow_complaint)
8978 (dwarf2_macro_malformed_definition_complaint)
8979 (dwarf2_invalid_attrib_class_complaint)
8980 (create_addrmap_from_index, dw2_symtab_iter_next)
8981 (dw2_expand_marked_cus)
8982 (dw2_debug_names_iterator::find_vec_in_debug_names)
8983 (dw2_debug_names_iterator::next, dw2_debug_names_iterator::next)
8984 (create_debug_type_hash_table, init_cutu_and_read_dies)
8985 (partial_die_parent_scope, add_partial_enumeration)
8986 (skip_one_die, fixup_go_packaging, quirk_rust_enum, process_die)
8987 (dwarf2_compute_name, dwarf2_physname, read_namespace_alias)
8988 (read_import_statement, read_file_scope, create_dwo_cu_reader)
8989 (create_cus_hash_table, create_dwp_hash_table)
8990 (inherit_abstract_dies, read_func_scope, read_call_site_scope)
8991 (dwarf2_rnglists_process, dwarf2_ranges_process)
8992 (dwarf2_add_type_defn, dwarf2_attach_fields_to_type)
8993 (dwarf2_add_member_fn, get_alignment, maybe_set_alignment)
8994 (handle_struct_member_die, process_structure_scope)
8995 (read_array_type, read_common_block, read_module_type)
8996 (read_tag_pointer_type, read_typedef, read_base_type)
8997 (read_subrange_type, load_partial_dies, partial_die_info::read)
8998 (partial_die_info::read, partial_die_info::read)
8999 (partial_die_info::read, read_checked_initial_length_and_offset)
9000 (dwarf2_string_attr, read_formatted_entries)
9001 (dwarf_decode_line_header)
9002 (lnp_state_machine::check_line_address, dwarf_decode_lines_1)
9003 (new_symbol, dwarf2_const_value_attr, lookup_die_type)
9004 (read_type_die_1, determine_prefix, dwarf2_get_ref_die_offset)
9005 (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
9006 (get_signatured_type, get_DW_AT_signature_type)
9007 (decode_locdesc, file_file_name, consume_improper_spaces)
9008 (skip_form_bytes, skip_unknown_opcode, dwarf_parse_macro_header)
9009 (dwarf_decode_macro_bytes, dwarf_decode_macros)
9010 (dwarf2_symbol_mark_computed, set_die_type)
9011 (read_attribute_value): Update.
9012 * stap-probe.c (handle_stap_probe, get_stap_base_address):
9013 Update.
9014 * dbxread.c (unknown_symtype_complaint)
9015 (lbrac_mismatch_complaint, repeated_header_complaint)
9016 (set_namestring, function_outside_compilation_unit_complaint)
9017 (read_dbx_symtab, process_one_symbol): Update.
9018 * gdbtypes.c (stub_noname_complaint): Update.
9019 * windows-nat.c (handle_unload_dll): Update.
9020 * coffread.c (coff_symtab_read, enter_linenos, decode_type)
9021 (decode_base_type): Update.
9022 * xcoffread.c (bf_notfound_complaint, ef_complaint)
9023 (eb_complaint, record_include_begin, record_include_end)
9024 (enter_line_range, xcoff_next_symbol_text, read_xcoff_symtab)
9025 (process_xcoff_symbol, read_symbol)
9026 (function_outside_compilation_unit_complaint)
9027 (scan_xcoff_symtab): Update.
9028 * machoread.c (macho_symtab_read, macho_add_oso_symfile): Update.
9029 * buildsym.c (finish_block_internal, make_blockvector)
9030 (end_symtab_get_static_block, augment_type_symtab): Update.
9031 * dtrace-probe.c (dtrace_process_dof)
9032 (dtrace_static_probe_ops::get_probes): Update.
9033 * complaints.h (struct complaint): Don't declare.
9034 (symfile_complaints): Remove.
9035 (complaint_internal): Remove "complaints" parameter.
9036 (complaint): Likewise.
9037 (clear_complaints): Likewise.
9038 * symfile.c (syms_from_objfile_1, finish_new_objfile)
9039 (reread_symbols): Update.
9040 * dwarf2-frame.c (dwarf2_restore_rule, execute_cfa_program)
9041 (dwarf2_frame_cache, decode_frame_entry): Update.
9042 * dwarf2loc.c (dwarf_reg_to_regnum): Update.
9043 * objc-lang.c (lookup_objc_class, lookup_child_selector)
9044 (info_selectors_command): Update.
9045 * macrotab.c (macro_include, check_for_redefinition)
9046 (macro_undef): Update.
9047 * objfiles.c (filter_overlapping_sections): Update.
9048 * stabsread.c (invalid_cpp_abbrev_complaint)
9049 (reg_value_complaint, stabs_general_complaint, dbx_lookup_type)
9050 (define_symbol, error_type, read_type, rs6000_builtin_type)
9051 (stabs_method_name_from_physname, read_member_functions)
9052 (read_cpp_abbrev, read_baseclasses, read_tilde_fields)
9053 (attach_fields_to_type, complain_about_struct_wipeout)
9054 (read_range_type, read_args, common_block_start)
9055 (common_block_end, cleanup_undefined_types_1, scan_file_globals):
9056 Update.
9057 * mdebugread.c (index_complaint, unknown_ext_complaint)
9058 (basic_type_complaint, bad_tag_guess_complaint)
9059 (bad_rfd_entry_complaint, unexpected_type_code_complaint)
9060 (reg_value_complaint, parse_symbol, parse_type, upgrade_type)
9061 (parse_procedure, parse_lines)
9062 (function_outside_compilation_unit_complaint)
9063 (parse_partial_symbols, psymtab_to_symtab_1, cross_ref)
9064 (bad_tag_guess_complaint, reg_value_complaint): Update.
9065 * cp-support.c (demangled_name_complaint): Update.
9066 * macroscope.c (sal_macro_scope): Update.
9067 * dwarf-index-write.c (class debug_names): Update.
9068
9069 2018-05-23 Tom Tromey <tom@tromey.com>
9070
9071 * complaints.c (clear_complaints): Remove "noisy" parameter.
9072 * complaints.h (clear_complaints): Update.
9073 * symfile.c (syms_from_objfile_1, finish_new_objfile)
9074 (reread_symbols): Update.
9075
9076 2018-05-23 Tom Tromey <tom@tromey.com>
9077
9078 * complaints.c (enum complaint_series): Remove FIRST_MESSAGE,
9079 SUBSEQUENT_MESSAGE.
9080 (vcomplaint, clear_complaints): Update.
9081 (symfile_explanations): Remove some messages.
9082
9083 2018-05-23 Tom Tromey <tom@tromey.com>
9084
9085 * complaints.c (internal_complaint): Remove.
9086 * complaints.h (internal_complaint): Remove.
9087
9088 2018-05-22 Maciej W. Rozycki <macro@mips.com>
9089
9090 * i387-tdep.c (i387_collect_xsave): Make `i' unsigned.
9091
9092 2018-05-22 Pedro Alves <palves@redhat.com>
9093
9094 * remote-fileio.c (remote_fileio_reply, remote_fileio_ioerror)
9095 (remote_fileio_badfd, remote_fileio_return_errno)
9096 (remote_fileio_return_success, remote_fileio_func_open)
9097 (remote_fileio_func_open, remote_fileio_func_close)
9098 (remote_fileio_func_read, remote_fileio_func_write)
9099 (remote_fileio_func_lseek, remote_fileio_func_rename)
9100 (remote_fileio_func_unlink, remote_fileio_func_stat)
9101 (remote_fileio_func_fstat, remote_fileio_func_gettimeofday)
9102 (remote_fileio_func_isatty, remote_fileio_func_system): Add
9103 remote_target parameter.
9104 (remote_fio_func_map) <func>: Add remote_target parameter.
9105 (do_remote_fileio_request, remote_fileio_request):
9106 * remote-fileio.h (remote_fileio_request):
9107 * remote-notif.c (remote_notif_ack, remote_notif_parse, ): Add
9108 remote_target parameter.
9109 (remote_notif_process, handle_notification): Adjust to pass down
9110 the remote.
9111 (remote_notif_state_allocate): Add remote_target parameter. Save
9112 it.
9113 * remote-notif.h (struct remote_target): Forward declare.
9114 (struct notif_client) <parse, ack, can_get_pending_events>: Add
9115 remote_target parameter.
9116 (struct remote_notif_state) <remote>: New field.
9117 (remote_notif_ack, remote_notif_parse): Add remote_target
9118 parameter.
9119 (remote_notif_state_allocate, remote_notif_state_allocate): Add
9120 remote_target parameter.
9121 * remote.c (OPAQUETHREADBYTES, threadref, gdb_ext_thread_info)
9122 (threads_listing_context, rmt_thread_action, protocol_feature)
9123 (packet_reg, stop_reply, stop_reply_p, enum packet_support)
9124 (packet_result, struct threads_listing_context, remote_state):
9125 Move definitions and declarations higher up.
9126 (remote_target) <~remote_target>: Declare.
9127 (remote_download_command_source, remote_file_put, remote_file_get)
9128 (remote_file_delete, remote_hostio_pread, remote_hostio_pwrite)
9129 (remote_hostio_pread_vFile, remote_hostio_send_command)
9130 (remote_hostio_set_filesystem, remote_hostio_open)
9131 (remote_hostio_close, remote_hostio_unlink, remote_state)
9132 (get_remote_state, get_remote_packet_size, get_memory_packet_size)
9133 (get_memory_write_packet_size, get_memory_read_packet_size)
9134 (append_pending_thread_resumptions, remote_detach_1)
9135 (append_resumption, remote_resume_with_vcont)
9136 (add_current_inferior_and_thread, wait_ns, wait_as)
9137 (process_stop_reply, remote_notice_new_inferior)
9138 (process_initial_stop_replies, remote_add_thread)
9139 (btrace_sync_conf, remote_btrace_maybe_reopen)
9140 (remove_new_fork_children, kill_new_fork_children)
9141 (discard_pending_stop_replies, stop_reply_queue_length)
9142 (check_pending_events_prevent_wildcard_vcont)
9143 (discard_pending_stop_replies_in_queue, stop_reply)
9144 (remote_notif_remove_queued_reply, stop_reply *queued_stop_reply)
9145 (peek_stop_reply, remote_parse_stop_reply, remote_stop_ns)
9146 (remote_interrupt_as, remote_interrupt_ns)
9147 (remote_get_noisy_reply, remote_query_attached)
9148 (remote_add_inferior, remote_current_thread, get_current_thread)
9149 (set_thread, set_general_thread, set_continue_thread)
9150 (set_general_process, write_ptid)
9151 (remote_unpack_thread_info_response, remote_get_threadinfo)
9152 (parse_threadlist_response, remote_get_threadlist)
9153 (remote_threadlist_iterator, remote_get_threads_with_ql)
9154 (remote_get_threads_with_qxfer)
9155 (remote_get_threads_with_qthreadinfo, extended_remote_restart)
9156 (get_offsets, remote_check_symbols, remote_supported_packet)
9157 (remote_query_supported, remote_packet_size)
9158 (remote_serial_quit_handler, remote_detach_pid)
9159 (remote_vcont_probe, remote_resume_with_hc)
9160 (send_interrupt_sequence, interrupt_query)
9161 (remote_notif_get_pending_events, fetch_register_using_p)
9162 (send_g_packet, process_g_packet, fetch_registers_using_g)
9163 (store_register_using_P, store_registers_using_G)
9164 (set_remote_traceframe, check_binary_download)
9165 (remote_write_bytes_aux, remote_write_bytes, remote_read_bytes_1)
9166 (remote_xfer_live_readonly_partial, remote_read_bytes)
9167 (remote_send_printf, remote_flash_write, readchar)
9168 (remote_serial_write, putpkt, putpkt_binary, skip_frame)
9169 (read_frame, getpkt, getpkt_or_notif_sane_1, getpkt_sane)
9170 (getpkt_or_notif_sane, remote_vkill, remote_kill_k)
9171 (extended_remote_disable_randomization, extended_remote_run)
9172 (send_environment_packet, extended_remote_environment_support)
9173 (extended_remote_set_inferior_cwd, remote_write_qxfer)
9174 (remote_read_qxfer, push_stop_reply, vcont_r_supported)
9175 (packet_command): Now methods of ...
9176 (remote_target): ... this class.
9177 (m_remote_state) <remote_target>: New field.
9178 (struct remote_state) <stop_reply_queue,
9179 remote_async_inferior_event_token, wait_forever_enabled_p>: New
9180 fields.
9181 (remote_state::remote_state): Allocate stop_reply_queue.
9182 (remote_state): Delete global.
9183 (get_remote_state_raw): Delete.
9184 (remote_target::get_remote_state): Allocate m_remote_state on
9185 demand.
9186 (get_current_remote_target): New.
9187 (remote_ops, extended_remote_ops): Delete.
9188 (wait_forever_enabled_p, remote_async_inferior_event_token):
9189 Delete, moved to struct remote_state.
9190 (remote_target::close): Delete self. Destruction bits split to
9191 ...
9192 (remote_target::~remote_target): ... this.
9193 (show_memory_packet_size): Adjust to use
9194 get_current_remote_target.
9195 (struct protocol_feature) <func>: Add remote_target parameter.
9196 All callers adjusted.
9197 (curr_quit_handler_target): New.
9198 (remote_serial_quit_handler): Reimplement.
9199 (remote_target::open_1): Adjust to use get_current_remote_target.
9200 Heap-allocate remote_target/extended_remote_target instances.
9201 (vcont_builder::vcont_builder): Add remote_target parameter, and
9202 save it in m_remote. All callers adjusted.
9203 (vcont_builder::m_remote): New field.
9204 (vcont_builder::restart, vcont_builder::flush)
9205 (vcont_builder::push_action): Use it.
9206 (remote_target::commit_resume): Use it.
9207 (struct queue_iter_param) <remote>: New field.
9208 (remote_target::remove_new_fork_children): Fill in 'remote' field.
9209 (check_pending_event_prevents_wildcard_vcont_callback_data): New.
9210 (check_pending_event_prevents_wildcard_vcont_callback)
9211 (remote_target::check_pending_events_prevent_wildcard_vcont)
9212 (remote_target::discard_pending_stop_replies)
9213 (remote_target::discard_pending_stop_replies_in_queue)
9214 (remote_target::remote_notif_remove_queued_reply): Fill in
9215 'remote' field.
9216 (remote_notif_get_pending_events): New.
9217 (remote_target::readchar, remote_target::remote_serial_write):
9218 Save/restore curr_quit_handler_target.
9219 (putpkt): New.
9220 (kill_new_fork_children): Fill in 'remote' field.
9221 (packet_command): Use get_current_remote_target, defer to
9222 remote_target method of same name.
9223 (scoped_remote_fd::scoped_remote_fd): Add 'remote_target'
9224 parameter, and save it in m_remote. All callers adjusted.
9225 (scoped_remote_fd::release): Use m_remote.
9226 (scoped_remote_fd::m_remote): New field.
9227 (remote_file_put, remote_file_get, remote_file_delete): Use
9228 get_current_remote_target, defer to remote_target method of same
9229 name.
9230 (remote_btrace_reset): Add remote_state paremeter. Update all
9231 callers.
9232 (remote_async_inferior_event_handler). Pass down 'data'.
9233 (remote_new_objfile): Use get_current_remote_target.
9234 (remote_target::vcont_r_supported): New.
9235 (set_range_stepping): Use get_current_remote_target and
9236 remote_target::vcont_r_supported.
9237 (_initialize_remote): Don't allocate 'remote_state' and
9238 'stop_reply_queue' globals.
9239 * remote.h (struct remote_target): Forward declare.
9240 (getpkt, putpkt, remote_notif_get_pending_events): Add
9241 'remote_target' parameter.
9242
9243 2018-05-22 Pedro Alves <palves@redhat.com>
9244
9245 * remote.c (vcont_builder): Now a class. Make all data members
9246 private.
9247 (vcont_builder) <vcont_builder, restart, flush, push_action>:
9248 Declare methods.
9249 (vcont_builder_restart): Rename to ...
9250 (vcont_builder::restart): ... this.
9251 (vcont_builder_flush): Rename to ...
9252 (vcont_builder::flush): ... this.
9253 (vcont_builder_push_action): Rename to ...
9254 (vcont_builder::push_action): ... this.
9255 (remote_target::commit_resume): Adjust.
9256
9257 2018-05-22 Pedro Alves <palves@redhat.com>
9258
9259 * remote.c (DEFAULT_MAX_MEMORY_PACKET_SIZE): Rename to ...
9260 (DEFAULT_MAX_MEMORY_PACKET_SIZE_FIXED): ... this.
9261 (get_fixed_memory_packet_size): New.
9262 (get_memory_packet_size): Use it.
9263 (set_memory_packet_size): Don't override the config size with
9264 DEFAULT_MAX_MEMORY_PACKET_SIZE.
9265 (show_memory_packet_size): Use get_fixed_memory_packet_size.
9266 Don't refer to get_memory_packet_size if not connected to a remote
9267 target. Show "(default)" if configured size is 0.
9268
9269 2018-05-22 Pedro Alves <palves@redhat.com>
9270
9271 * remote.c (remote_target::mourn_inferior): Move
9272 discard_pending_stop_replies call here from ...
9273 (_initialize_remote): ... here.
9274
9275 2018-05-22 Pedro Alves <palves@redhat.com>
9276
9277 * remote.c (compare_section_command): Remove set_general_process
9278 call.
9279
9280 2018-05-22 Pedro Alves <palves@redhat.com>
9281
9282 * remote.c (struct packet_reg, struct remote_arch_state):
9283 Move higher up in the file.
9284 (remote_state) <m_arch_states>: Store remote_arch_state values
9285 instead of remote_arch_state pointers.
9286 (remote_state::get_remote_arch_state): Adjust.
9287
9288 2018-05-22 Pedro Alves <palves@redhat.com>
9289
9290 * remote.c: Include <unordered_map>.
9291 (remote_state): Now a class.
9292 (remote_state) <get_remote_arch_state>: Declare method.
9293 <get_remote_arch_state>: New field.
9294 (remote_arch_state) <remote_arch_state>: Declare ctor.
9295 <regs>: Now a unique_ptr.
9296 (remote_gdbarch_data_handle): Delete.
9297 (get_remote_arch_state): Delete.
9298 (remote_state::get_remote_arch_state): New.
9299 (get_remote_state): Adjust to call remote_state's
9300 get_remote_arch_state method.
9301 (init_remote_state): Delete, bits factored out to ...
9302 (remote_arch_state::remote_arch_state): ... this new method.
9303 (get_remote_packet_size, get_memory_packet_size)
9304 (process_g_packet, remote_target::fetch_registers)
9305 (remote_target::prepare_to_store, store_registers_using_G)
9306 (remote_target::store_registers, remote_target::get_trace_status):
9307 Adjust to call remote_state's method.
9308 (_initialize_remote): Remove reference to
9309 remote_gdbarch_data_handle.
9310
9311 2018-05-22 Pedro Alves <palves@redhat.com>
9312
9313 * remote.c (struct readahead_cache) <invalidate, invalidate_fd,
9314 pread>: New method declarations.
9315 (remote_target::open_1): Adjust.
9316 (readahead_cache_invalidate): Rename to ...
9317 (readahead_cache::invalidate): ... this, and adjust to be a class
9318 method.
9319 (readahead_cache_invalidate_fd): Rename to ...
9320 (readahead_cache::invalidate_fd): ... this, and adjust to be a
9321 class method.
9322 (remote_hostio_pwrite): Adjust.
9323 (remote_hostio_pread_from_cache): Rename to ...
9324 (readahead_cache::pread): ... this, and adjust to be a class
9325 method.
9326 (remote_hostio_close): Adjust.
9327
9328 2018-05-22 Pedro Alves <palves@redhat.com>
9329
9330 * remote.c (remote_hostio_close_cleanup): Delete.
9331 (class scoped_remote_fd): New.
9332 (remote_file_put, remote_file_get): Use it.
9333
9334 2018-05-22 Pedro Alves <palves@redhat.com>
9335
9336 (struct vCont_action_support): Use bool and initialize all fields.
9337 (struct readahead_cache): Initialize all fields.
9338 (remote_state): Use bool and initialize all fields.
9339 (remote_state::remote_state, remote_state::~remote_state): New.
9340 (new_remote_state): Delete.
9341 (_initialize_remote): Use new to allocate remote_state.
9342
9343 2018-05-22 Pedro Alves <palves@redhat.com>
9344 張俊芝 <zjz@zjz.name>
9345
9346 PR gdb/22973
9347 * c-exp.y: Include "c-support.h".
9348 (parse_number, c_parse_escape, lex_one_token): Use TOLOWER instead
9349 of tolower. Use c_ident_is_alpha to scan names.
9350 * c-lang.c: Include "c-support.h".
9351 (convert_ucn, convert_octal, convert_hex, convert_escape): Use
9352 ISXDIGIT instead of isxdigit and ISDIGIT instead of isdigit.
9353 * c-support.h: New file, with bits factored out from ...
9354 * cp-name-parser.y: ... this file.
9355 Include "c-support.h".
9356 (cp_ident_is_alpha, cp_ident_is_alnum): Deleted, moved to
9357 c-support.h and renamed.
9358 (symbol_end, yylex): Adjust.
9359
9360 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
9361
9362 * arch/ppc-linux-common.c (ppc_linux_has_isa205): Change the
9363 parameter type to CORE_ADDR.
9364 * arch/ppc-linux-common.h (ppc_linux_has_isa205): Change the
9365 parameter type in declaration to CORE_ADDR.
9366 * ppc-linux-tdep.c (ppc_linux_core_read_description): Call
9367 target_auxv_search to get AT_HWCAP and use the result to get the
9368 target description.
9369 * ppc-linux-nat.c (ppc_linux_get_hwcap): Change the return type
9370 to CORE_ADDR. Remove the cast of the return value to unsigned
9371 long. Fix error predicate of target_auxv_search.
9372 (ppc_linux_nat_target::read_description): Change the type of the
9373 hwcap variable to CORE_ADDR.
9374
9375 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
9376
9377 * rs6000-tdep.c (rs6000_gdbarch_init): Assign 1 to have_dfp only
9378 if the size of fpscr is larger than 32 bits.
9379
9380 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
9381
9382 * ppc-linux-tdep.c (ppc_linux_vsxregset): New function.
9383 (ppc32_linux_vsxregmap): New global.
9384 (ppc32_linux_vsxregset): Initialize with ppc32_linux_vsxregmap,
9385 regcache_supply_regset, and regcache_collect_regset.
9386 * ppc-linux-tdep.h (ppc_linux_vsxregset): Declare.
9387 * ppc-linux-nat.c (supply_vsxregset, fill_vsxregset): Remove.
9388 (fetch_vsx_register, store_vsx_register): Remove.
9389 (fetch_vsx_registers): Add regno parameter. Get regset using
9390 ppc_linux_vsxregset. Use regset to supply registers.
9391 (store_vsx_registers): Add regno parameter. Get regset using
9392 ppc_linux_vsxregset. Use regset to collect registers.
9393 (fetch_register): Call fetch_vsx_registers instead of
9394 fetch_vsx_register.
9395 (store_register): Call store_vsx_registers instead of
9396 store_vsx_register.
9397 (fetch_ppc_registers): Call fetch_vsx_registers with -1 for the
9398 new regno parameter.
9399 (store_ppc_registers): Call store_vsx_registers with -1 for the
9400 new regno parameter.
9401 * rs6000-tdep.c (ppc_vsx_support_p, ppc_supply_vsxreget)
9402 (ppc_collect_vsxregset): Remove.
9403
9404 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
9405
9406 * ppc-tdep.h (struct ppc_reg_offsets): Remove vector register
9407 offset fields.
9408 * ppc-fbsd-tdep.c (ppc32_fbsd_reg_offsets): Remove initializers
9409 for vector register offset fields.
9410 (ppc64_fbsd_reg_offsets): Likewise.
9411 * ppc-nbsd-tdep.c (_initialize_ppcnbsd_tdep): Remove assignment
9412 to vector register offset fields.
9413 * ppc-obsd-tdep.c (_initialize_ppcnbsd_tdep): Remove assignment
9414 to vector register offset fields.
9415 * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Remove assignment to
9416 vector register offset fields.
9417 * rs6000-aix-tdep.c (rs6000_aix32_reg_offsets): Remove
9418 initializers for vector register offset fields.
9419 (rs6000_aix64_reg_offsets): Likewise.
9420 * rs6000-tdep.c (ppc_vrreg_offset): Remove.
9421 (ppc_supply_vrregset): Remove.
9422 (ppc_collect_vrregset): Remove.
9423 * ppc-linux-tdep.c (ppc_linux_collect_vrregset): New function.
9424 (ppc_linux_vrregset) : New function.
9425 (ppc32_le_linux_vrregmap, ppc32_be_linux_vrregmap)
9426 (ppc32_le_linux_vrregset, ppc32_be_linux_vrregset): New globals.
9427 (ppc32_linux_vrregset): Remove.
9428 (ppc_linux_iterate_over_regset_sections): Call ppc_linux_vrregset
9429 and use result instead of ppc32_linux_vrregset.
9430 (ppc32_linux_reg_offsets): Remove initializers for vector register
9431 offset fields.
9432 (ppc64_linux_reg_offsets): Likewise.
9433 * ppc-linux-tdep.h (ppc_linux_vrregset): New declaration.
9434 * ppc-linux-nat.c: Include regset.h.
9435 (gdb_vrregset_t): Adjust comment to account for little-endian
9436 mode.
9437 (supply_vrregset, fill_vrregset): Remove.
9438 (fetch_altivec_register, store_altivec_register): Remove.
9439 (fetch_altivec_registers): Add regno parameter. Get regset using
9440 ppc_linux_vrregset. Use regset to supply registers.
9441 (store_altivec_registers): Add regno parameter. Get regset using
9442 ppc_linux_vrregset. Use regset to collect registers.
9443 (fetch_register): Call fetch_altivec_registers instead of
9444 fetch_altivec_register.
9445 (store_register): Call store_altivec_registers instead of
9446 store_altivec_register.
9447 (fetch_ppc_registers): Call fetch_altivec_registers with -1 for
9448 the new regno parameter.
9449 (store_ppc_registers): Call store_altivec_registers with -1 for
9450 the new regno parameter.
9451
9452 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
9453
9454 * arch/ppc-linux-common.h (PPC_LINUX_SIZEOF_VRREGSET)
9455 (PPC_LINUX_SIZEOF_VSXREGSET): Define.
9456 * ppc-linux-nat.c (SIZEOF_VSXREGS, SIZEOF_VRREGS): Remove.
9457 (gdb_vrregset_t): Change array type size to
9458 PPC_LINUX_SIZEOF_VRREGSET.
9459 (gdb_vsxregset_t): Change array type size to
9460 PPC_LINUX_SIZEOF_VSXREGSET.
9461 * ppc-linux-tdep.c (ppc_linux_iterate_over_regset_sections):
9462 Change integer literals to PPC_LINUX_SIZEOF_VRREGSET and
9463 PPC_LINUX_SIZEOF_VSXREGSET.
9464
9465 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
9466
9467 * configure.nat <linux powerpc>: Add ppc-linux.o to NATDEPFILES.
9468 * ppc-linux-nat.c (ppc_linux_target_wordsize): Move to
9469 nat/ppc-linux.c.
9470 (ppc_linux_nat_target::auxv_parse): Get thread id tid. Call
9471 ppc_linux_target_wordsize with tid.
9472 (ppc_linux_nat_target::read_description): Call ppc_linux_target
9473 wordsize with tid.
9474 * nat/ppc-linux.c: Include nat/gdb_ptrace.h.
9475 (ppc64_64bit_inferior_p): Add static and inline specifiers.
9476 (ppc_linux_target_wordsize): Move here from ppc-linux-nat.c. Add
9477 tid parameter. Remove static specifier.
9478 * nat/ppc-linux.h (ppc64_64bit_inferior_p): Remove declaration.
9479 (ppc_linux_target_wordsize): New declaration.
9480
9481 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
9482
9483 * arch/ppc-linux-common.c: New file.
9484 * arch/ppc-linux-common.h: New file.
9485 * arch/ppc-linux-tdesc.h: New file.
9486 * configure.tgt (powerpc*-*-linux*): Add arch/ppc-linux-common.o.
9487 * Makefile.in (ALL_TARGET_OBS): Add arch/ppc-linux-common.o.
9488 (HFILES_NO_SRCDIR): Add arch/ppc-linux-common.h and
9489 arch/ppc-linux-tdesc.h.
9490 * ppc-linux-nat.c: Include arch/ppc-linux-common.h and
9491 arch/ppc-linux-tdesc.h.
9492 (ppc_linux_nat_target::read_description): Remove target
9493 description matching code. Fill a ppc_linux_features struct and
9494 call ppc_linux_match_description with it. Move comment about ISA
9495 2.05 to ppc-linux-common.c.
9496 * ppc-linux-tdep.c: Include arch/ppc-linux-common.h and
9497 arch/ppc-linux-tdesc.h.
9498 (ppc_linux_core_read_description): Remove target description
9499 matching code. Fill a ppc_linux_features struct and call
9500 ppc_linux_match_description with it.
9501 * ppc-linux-tdep.h (tdesc_powerpc_32l, tdesc_powerpc_64l)
9502 (tdesc_powerpc_altivec32l, tdesc_powerpc_altivec64l)
9503 (tdesc_powerpc_cell32l, tdesc_powerpc_cell64l)
9504 (tdesc_powerpc_vsx32l, tdesc_powerpc_vsx64l)
9505 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_64l)
9506 (tdesc_powerpc_isa205_altivec32l, tdesc_powerpc_isa205_altivec64l)
9507 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_isa205_vsx64l)
9508 (tdesc_powerpc_e500l): Remove.
9509
9510 2018-05-22 Joel Brobecker <brobecker@adacore.com>
9511
9512 * ada-lang.c (catch_assert_command): Pass empty string instead
9513 of NULL for excep_string argument.
9514
9515 2018-05-22 Maciej W. Rozycki <macro@mips.com>
9516
9517 * mips-linux-nat.c (mips64_linux_register_addr): Return -1 if
9518 the width of the requested register exceeds the width of the
9519 `ptrace' data type.
9520
9521 2018-05-21 Tom Tromey <tom@tromey.com>
9522
9523 * printcmd.c (output_command): Remove.
9524 (output_command_const): Rename to output_command.
9525 * valprint.h (output_command): Rename from output_command_const.
9526 * tracepoint.c (trace_dump_actions): Call output_command.
9527
9528 2018-05-21 Tom Tromey <tom@tromey.com>
9529
9530 * mi/mi-cmd-catch.c (mi_cmd_catch_assert)
9531 (mi_cmd_catch_exception, mi_cmd_catch_handlers): Update.
9532 * ada-lang.h (create_ada_exception_catchpoint): Update.
9533 * ada-lang.c (struct ada_catchpoint) <excep_string>: Now a
9534 std::string.
9535 (create_excep_cond_exprs, ~ada_catchpoint)
9536 (should_stop_exception, print_one_exception)
9537 (print_mention_exception, print_recreate_exception): Update.
9538 (ada_get_next_arg): Remove.
9539 (catch_ada_exception_command_split): Use std::string. Change type
9540 of "excep_string", "cond_string".
9541 (catch_ada_exception_command): Update.
9542 (create_ada_exception_catchpoint): Change type of excep_string.
9543 (ada_exception_sal): Remove excep_string parameter.
9544 (~ada_catchpoint): Remove.
9545
9546 2018-05-21 Tom Tromey <tom@tromey.com>
9547
9548 * ada-lang.c (ada_collect_symbol_completion_matches): Remove
9549 cleanup.
9550
9551 2018-05-21 Tom Tromey <tom@tromey.com>
9552
9553 * ada-lang.c (ada_exception_message_1, ada_exception_message):
9554 Return unique_xmalloc_ptr.
9555 (print_it_exception): Update.
9556
9557 2018-05-21 Tom Tromey <tom@tromey.com>
9558
9559 * tracepoint.c (trace_dump_actions): Use std::string.
9560
9561 2018-05-21 Tom Tromey <tom@tromey.com>
9562
9563 * symfile.c (reread_symbols): Use std::string for original_name.
9564
9565 2018-05-21 Tom Tromey <tom@tromey.com>
9566
9567 * dwarf2read.c (dwarf2_read_debug_names): Use std::unique_ptr.
9568 (mapped_index_base): Use DISABLE_COPY_AND_ASSIGN. Default
9569 constructor.
9570
9571 2018-05-20 Simon Marchi <simon.marchi@polymtl.ca>
9572
9573 * common/traits.h (HAVE_IS_TRIVIALLY_COPYABLE): Rename the wrong
9574 instance to...
9575 (HAVE_IS_TRIVIALLY_CONSTRUCTIBLE): ... this.
9576 * objfiles.c (get_objfile_bfd_data): Allocate
9577 objfile_per_bfd_storage with obstack_new when allocating on
9578 obstack.
9579
9580 2018-05-20 Simon Marchi <simon.marchi@ericsson.com>
9581
9582 * ada-lang.c (cache_symbol): Use XOBNEW and/or XOBNEWVEC and/or
9583 OBSTACK_ZALLOC.
9584 * dwarf2-frame.c (dwarf2_build_frame_info): Likewise.
9585 * hppa-tdep.c (hppa_init_objfile_priv_data): Likewise.
9586 * mdebugread.c (mdebug_build_psymtabs): Likewise.
9587 (add_pending): Likewise.
9588 (parse_symbol): Likewise.
9589 (parse_partial_symbols): Likewise.
9590 (psymtab_to_symtab_1): Likewise.
9591 (new_psymtab): Likewise.
9592 (elfmdebug_build_psymtabs): Likewise.
9593 * minsyms.c (terminate_minimal_symbol_table): Likewise.
9594 * objfiles.c (get_objfile_bfd_data): Likewise.
9595 (objfile_register_static_link): Likewise.
9596 * psymtab.c (allocate_psymtab): Likewise.
9597 * stabsread.c (read_member_functions): Likewise.
9598 * xcoffread.c (xcoff_end_psymtab): Likewise.
9599
9600 2018-05-20 Simon Marchi <simon.marchi@ericsson.com>
9601
9602 * common/traits.h (HAVE_IS_TRIVIALLY_COPYABLE): Define if
9603 compiler supports std::is_trivially_constructible.
9604 * common/poison.h: Include obstack.h.
9605 (IsMallocable): Define to is_trivially_constructible if the
9606 compiler supports it, define to true_type otherwise.
9607 (xobnew): New.
9608 (XOBNEW): Redefine.
9609 (xobnewvec): New.
9610 (XOBNEWVEC): Redefine.
9611 * gdb_obstack.h (obstack_zalloc): New.
9612 (OBSTACK_ZALLOC): Redefine.
9613 (obstack_calloc): New.
9614 (OBSTACK_CALLOC): Redefine.
9615 (obstack_new): New.
9616 * gdbarch.sh: Include gdb_obstack in gdbarch.h.
9617 (gdbarch_obstack): New declaration in gdbarch.h, definition in
9618 gdbarch.c.
9619 (GDBARCH_OBSTACK_CALLOC, GDBARCH_OBSTACK_ZALLOC): Use
9620 obstack_calloc/obstack_zalloc.
9621 (gdbarch_obstack_zalloc): Remove.
9622 * target-descriptions.c (tdesc_data_init): Use obstack_new.
9623
9624 2018-05-19 Philippe Waroquiers <philippe.waroquiers@skynet.be>
9625
9626 * stack.c (backtrace_command_1): Remove useless variable int i.
9627
9628 2018-05-19 Philippe Waroquiers <philippe.waroquiers@skynet.be>
9629
9630 * stack.c (print_frame_info): Fix comment.
9631
9632 2018-05-18 Tom Tromey <tom@tromey.com>
9633
9634 * dwarf2read.c (struct dwz_file): Add constructor, initializers.
9635 <dwz_bfd>: Now a gdb_bfd_ref_ptr.
9636 (~dwarf2_per_objfile): Update
9637 (dwarf2_get_dwz_file): Use new.
9638 * dwarf2read.h (struct dwarf2_per_objfile) <dwz_file>: Now a
9639 unique_ptr.
9640
9641 2018-05-18 Tom Tromey <tom@tromey.com>
9642
9643 * dwarf2read.h (struct dwarf2_per_objfile) <dwp_file>: Now a
9644 unique_ptr.
9645 * dwarf2read.c (struct dwp_file): Add constructor and
9646 initializers.
9647 (open_and_init_dwp_file): Return a unique_ptr.
9648 (dwarf2_per_objfile, create_dwp_hash_table)
9649 (create_dwo_unit_in_dwp_v1, create_dwo_unit_in_dwp_v2)
9650 (lookup_dwo_unit_in_dwp): Update.
9651 (open_and_init_dwp_file, get_dwp_file): Update.
9652
9653 2018-05-18 Tom Tromey <tom@tromey.com>
9654
9655 * dwarf2read.c (dwarf2_per_objfile): Update.
9656 (struct mapped_index): Add initializers.
9657 (dwarf2_read_index): Use new.
9658 (dw2_symtab_iter_init): Update.
9659 * dwarf2read.h (struct dwarf2_per_objfile) <index_table>: Now a
9660 unique_ptr.
9661
9662 2018-05-18 Simon Marchi <simon.marchi@ericsson.com>
9663
9664 * dwarf2read.c (mapped_index) <total_size>: Remove.
9665
9666 2018-05-18 Simon Marchi <simon.marchi@ericsson.com>
9667
9668 * unittests/format_pieces-selftests.c (test_format_specifier):
9669 Add ARI comments.
9670
9671 2018-05-18 Tom Tromey <tom@tromey.com>
9672
9673 * c-typeprint.c (maybe_print_hole): New function.
9674 (c_print_type_struct_field_offset): Update.
9675 (c_type_print_base_struct_union): Call maybe_print_hole.
9676
9677 2018-05-17 Keith Seitz <keiths@redhat.com>
9678
9679 * breakpoint.c (build_bpstat_chain): New function, moved from
9680 bpstat_stop_status.
9681 (bpstat_stop_status): Add optional parameter, `stop_chain'.
9682 If no stop chain is passed, call build_bpstat_chain to build it.
9683 * breakpoint.h (build_bpstat_chain): Declare.
9684 (bpstat_stop_status): Move documentation here from breakpoint.c.
9685 * infrun.c (handle_signal_stop): Before eliding inlined frames,
9686 build the stop chain and pass it to skip_inline_frames.
9687 Pass this stop chain to bpstat_stop_status.
9688 * inline-frame.c: Include breakpoint.h.
9689 (stopped_by_user_bp_inline_frame): New function.
9690 (skip_inline_frames): Add parameter `stop_chain'.
9691 Move documention to inline-frame.h.
9692 If non-NULL, use stopped_by_user_bp_inline_frame to determine
9693 whether the frame should be elided.
9694 * inline-frame.h (skip_inline_frames): Add parameter `stop_chain'.
9695 Add moved documentation and update for new parameter.
9696
9697 2018-05-17 Simon Marchi <simon.marchi@ericsson.com>
9698
9699 PR cli/14975
9700 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
9701 unittests/format_pieces-selftests.c.
9702 * common/format.h (format_piece) <operator==>: New.
9703 (format_pieces) <operator[]>: Remove.
9704 * common/format.c (format_pieces::format_pieces): Handle \e.
9705 * unittests/format_pieces-selftests.c: New.
9706
9707 2018-05-17 Tom Tromey <tom@tromey.com>
9708
9709 PR symtab/23010:
9710 * dwarf2read.c (load_cu, dw2_do_instantiate_symtab)
9711 (dw2_instantiate_symtab): Add skip_partial parameter.
9712 (dw2_find_last_source_symtab, dw2_map_expand_apply)
9713 (dw2_lookup_symbol, dw2_expand_symtabs_for_function)
9714 (dw2_expand_all_symtabs, dw2_expand_symtabs_with_fullname)
9715 (dw2_expand_symtabs_matching_one)
9716 (dw2_find_pc_sect_compunit_symtab)
9717 (dw2_debug_names_lookup_symbol)
9718 (dw2_debug_names_expand_symtabs_for_function): Update.
9719 (init_cutu_and_read_dies): Add skip_partial parameter.
9720 (process_psymtab_comp_unit, build_type_psymtabs_1)
9721 (process_skeletonless_type_unit, load_partial_comp_unit)
9722 (psymtab_to_symtab_1): Update.
9723 (load_full_comp_unit): Add skip_partial parameter.
9724 (process_imported_unit_die, dwarf2_read_addr_index)
9725 (follow_die_offset, dwarf2_fetch_die_loc_sect_off)
9726 (dwarf2_fetch_constant_bytes, dwarf2_fetch_die_type_sect_off)
9727 (read_signatured_type): Update.
9728
9729 2018-05-17 Simon Marchi <simon.marchi@ericsson.com>
9730
9731 * value.c (release_value): Remove unused variable.
9732 (record_latest_value): Likewise.
9733 (access_value_history): Likewise.
9734 (preserve_values): Likewise.
9735
9736 2018-05-17 Tom Tromey <tom@tromey.com>
9737
9738 * extension.h (struct ext_lang_type_printers) <py_type_printers>:
9739 Initialize.
9740
9741 2018-05-16 Maciej W. Rozycki <macro@mips.com>
9742
9743 PR gdb/22286
9744 * linux-nat-trad.c (linux_nat_trad_target::fetch_register):
9745 Also handle registers whose width is not a multiple of
9746 PTRACE_TYPE_RET.
9747 (linux_nat_trad_target::store_register): Likewise.
9748
9749 2018-05-16 Tom Tromey <tom@tromey.com>
9750
9751 * gdbcore.h (core_bfd): Redefine.
9752 * corelow.c (core_target::close): Update.
9753 (core_target_open): Update.
9754 * progspace.h (struct program_space) <cbfd>: Now a
9755 gdb_bfd_ref_ptr.
9756
9757 2018-05-16 Tom Tromey <tom@tromey.com>
9758
9759 PR cli/19551:
9760 * symfile-add-flags.h (enum symfile_add_flags)
9761 <SYMFILE_NOT_FILENAME>: New constant.
9762 * symfile.c (read_symbols): Use SYMFILE_NOT_FILENAME. Get
9763 objfile name from BFD.
9764 (symbol_file_add_with_addrs): Check SYMFILE_NOT_FILENAME.
9765 * minidebug.c (find_separate_debug_file_in_section): Put
9766 ".gnu_debugdata" into BFD's file name.
9767
9768 2018-05-16 Simon Marchi <simon.marchi@ericsson.com>
9769
9770 * regcache.c (regcache_read_ftype, regcache_write_ftype):
9771 Remove.
9772
9773 2018-05-15 Tamar Christina <tamar.christina@arm.com>
9774
9775 PR binutils/21446
9776 * aarch64-tdep.c (aarch64_analyze_prologue,
9777 aarch64_software_single_step, aarch64_displaced_step_copy_insn):
9778 Indicate not interested in errors.
9779
9780 2018-05-15 Maciej W. Rozycki <macro@mips.com>
9781
9782 * mips-linux-nat.c (mips_linux_nat_target::fetch_registers):
9783 Supply the MIPS_ZERO_REGNUM register.
9784
9785 2018-05-15 Maciej W. Rozycki <macro@mips.com>
9786
9787 * mips-tdep.c (mask_address_var): Make variable static.
9788
9789 2018-05-14 Tom Tromey <tom@tromey.com>
9790
9791 * dwarf2read.c (rust_union_quirks): Clear rust_unions.
9792
9793 2018-05-11 Andrew Burgess <andrew.burgess@embecosm.com>
9794
9795 * i387-tdep.c (i387_collect_xsave): Use FXSAVE_MXCSR_ADDR not
9796 FXSAVE_ADDR for the mxcsr register.
9797
9798 2018-05-11 Max Filippov <jcmvbkbc@gmail.com>
9799
9800 * configure.tgt (xtensa*-*-linux*): Drop gdb_target definition.
9801
9802 2018-05-11 Pedro Alves <palves@redhat.com>
9803
9804 * corelow.c (core_target) <core_target>: No longer inline.
9805 Initialize m_core_gdbarch, m_core_vec and build the section table
9806 here.
9807 <~core_target>: New.
9808 <core_gdbarch, get_core_register_section>: New methods.
9809 <m_core_section_table, m_core_vec, m_core_gdbarch>: New fields,
9810 factored out from ...
9811 <core_data, core_vec, core_gdbarch>: ... these deleted globals.
9812 (core_ops): Delete.
9813 (sniff_core_bfd): Add gdbarch parameter.
9814 (core_close): Delete, merged into ...
9815 (core_target::close): ... here. Delete self.
9816 (core_close_cleanup): Delete.
9817 (core_target_open): Allocate a core_target on the heap. Use a
9818 unique_ptr instead of a cleanup. Bits moved into the core_target
9819 ctor. Adjust to use core_target methods instead of globals.
9820 (get_core_register_section): Rename to ...
9821 (core_target::get_core_register_section): ... this and adjust.
9822 (struct get_core_registers_cb_data): New.
9823 (get_core_registers_cb): Use it. Use bool.
9824 (core_target::fetch_registers, core_target::files_info)
9825 (core_target::xfer_partial, core_target::read_description)
9826 (core_target::pid_to, core_target::thread_name): Adjust to
9827 reference class fields instead of globals.
9828 * target.h (struct target_ops_deleter, target_ops_up): New.
9829
9830 2018-05-11 Pedro Alves <palves@redhat.com>
9831
9832 * corefile.c (core_file_command): Move to corelow.c.
9833 * corelow.c (the_core_target): Delete.
9834 (core_file_command): Moved from corefile.c. Check exec_bfd
9835 instead of the_core_target. Use target_detach instead of calling
9836 into the_core_target directly.
9837 (maybe_say_no_core_file_now): New.
9838 (core_target::detach): Use it.
9839 (_initialize_corelow): Remove references to the_core_target.
9840 * gdbcore.h (the_core_target): Delete.
9841
9842 2018-05-11 Tom Tromey <tromey@redhat.com>
9843 Pedro Alves <palves@redhat.com>
9844
9845 * corefile.c (core_bfd): Remove.
9846 * gdbcore.h (core_bfd): Now a macro.
9847 * progspace.h (struct program_space) <cbfd>: New field.
9848
9849 2018-05-11 Tom Tromey <tom@tromey.com>
9850
9851 * mdebugread.c (parse_partial_symbols, psymtab_to_symtab_1): Use
9852 gdb::def_vector.
9853
9854 2018-05-10 Tom Tromey <tom@tromey.com>
9855
9856 * configure: Rebuild.
9857 * warning.m4 (AM_GDB_WARNINGS): Use -Wimplicit-fallthrough=3.
9858
9859 2018-05-10 Joel Brobecker <brobecker@adacore.com>
9860
9861 PR server/23158:
9862 * regformats/regdat.sh: Adjust script, following the addition
9863 of the new expedite_regs parameter to init_target_desc.
9864
9865 2018-05-10 Omair Javaid <omair.javaid@linaro.org>
9866
9867 PR gdb/23127
9868 * aarch64-linux-tdep.c (aarch64_linux_init_abi): Add call to
9869 set_gdbarch_significant_addr_bit.
9870 * aarch64-tdep.c (aarch64_gdbarch_init): Remove call to
9871 set_gdbarch_significant_addr_bit.
9872 * utils.c (address_significant): Update to sign extend addr.
9873
9874 2018-05-09 Max Filippov <jcmvbkbc@gmail.com>
9875
9876 * xtensa-linux-tdep.c (xtensa-tdep.h): New include.
9877 (xtensa_linux_init_abi): Limit tdep->num_regs by
9878 tdep->num_nopriv_regs.
9879 * xtensa-tdep.c (xtensa_derive_tdep): Calculate
9880 tdep->num_nopriv_regs and only copy it to tdep->num_regs if it's
9881 not initialized.
9882
9883 2018-05-08 Simon Marchi <simon.marchi@ericsson.com>
9884
9885 * unittests/string_view-selftests.c: Define GNULIB_NAMESPACE.
9886
9887 2018-05-08 Andrew Burgess <andrew.burgess@embecosm.com>
9888
9889 * common/x86-xstate.h (I387_FCTRL_INIT_VAL): New constant.
9890 (I387_MXCSR_INIT_VAL): New constant.
9891 * amd64-tdep.c (amd64_supply_xsave): Only read state from xsave
9892 buffer if it was supplied by the inferior.
9893 * i387-tdep.c (i387_supply_fsave): Use I387_MXCSR_INIT_VAL.
9894 (i387_xsave_get_clear_bv): New function.
9895 (i387_supply_xsave): Only read x87 control registers from the
9896 xsave buffer if the feature is enabled, and the state will have
9897 been written, otherwise, provide a suitable default.
9898 (i387_collect_xsave): Pre-clear all registers in xsave buffer,
9899 including x87 control registers. Update control registers if they
9900 have changed from the default value, and mark features as enabled
9901 as required.
9902 * i387-tdep.h (i387_xsave_get_clear_bv): Declare.
9903
9904 2018-05-08 Ulrich Weigand <uweigand@de.ibm.com>
9905
9906 * spu-tdep.c (info_spu_event_command): Fix output formatting.
9907
9908 2018-05-07 Tom Tromey <tom@tromey.com>
9909
9910 * configure: Rebuild.
9911 * warning.m4 (AM_GDB_WARNINGS): Add -Wduplicated-cond.
9912
9913 2018-05-07 Tom Tromey <tom@tromey.com>
9914
9915 PR tdep/20362:
9916 * arm-tdep.c (arm_record_vfp_data_proc_insn): Properly mask off D
9917 bit. Use correct value for VDIV.
9918
9919 2018-05-04 Tom Tromey <tom@tromey.com>
9920
9921 * configure: Rebuild.
9922 * warning.m4 (AM_GDB_WARNINGS): Add -Wimplicit-fallthrough.
9923
9924 2018-05-04 Tom Tromey <tom@tromey.com>
9925
9926 * linux-record.c (record_linux_system_call) <case
9927 RECORD_SYS_RECVFROM>: Add "break".
9928
9929 2018-05-04 Tom Tromey <tom@tromey.com>
9930
9931 * mi/mi-main.c (mi_cmd_trace_frame_collected) <REGISTERS_FORMAT>:
9932 Add missing "break".
9933 * mi/mi-cmd-stack.c (mi_cmd_stack_list_locals) <NO_FRAME_FILTERS>:
9934 Add missing "break".
9935
9936 2018-05-04 Tom Tromey <tom@tromey.com>
9937
9938 * rs6000-tdep.c (ppc_process_record_op4)
9939 (ppc_process_record_op63): Add fall-through comment.
9940
9941 2018-05-04 Tom Tromey <tom@tromey.com>
9942
9943 * i386-tdep.c (i386_process_record): Add fall-through comment.
9944
9945 2018-05-04 Tom Tromey <tom@tromey.com>
9946
9947 * stabsread.c (define_symbol) <case 'p'>: Add fall-through
9948 comment.
9949
9950 2018-05-04 Tom Tromey <tom@tromey.com>
9951
9952 * riscv-tdep.c (riscv_isa_xlen): Add fall-through comment.
9953 * utils.c (can_dump_core) <LIMIT_CUR>: Add fall-through comment.
9954 * eval.c (fetch_subexp_value) <MEMORY_ERROR>: Add fall-through
9955 comment.
9956 * d-valprint.c (d_val_print) <TYPE_CODE_STRUCT>: Add fall-through
9957 comment.
9958 * coffread.c (coff_symtab_read) <C_LABEL>: Add fall-through
9959 comment.
9960
9961 2018-05-04 Tom Tromey <tom@tromey.com>
9962
9963 * dwarf2loc.c (unimplemented): Add ATTRIBUTE_NORETURN.
9964
9965 2018-05-04 Tom Tromey <tom@tromey.com>
9966
9967 * s390-tdep.c (s390_process_record): Fix fall-through comments.
9968 * xcoffread.c (scan_xcoff_symtab): Move comment later.
9969 * symfile.c (section_is_mapped): Fix fall-through comment.
9970 * stabsread.c (define_symbol, read_member_functions): Fix
9971 fall-through comment.
9972 * s390-linux-tdep.c (s390_process_record): Fix fall-through
9973 comment.
9974 * remote.c (remote_wait_as): Fix fall-through comment.
9975 * p-exp.y (yylex): Fix fall-through comment.
9976 * nat/x86-dregs.c (x86_length_and_rw_bits): Fix fall-through
9977 comment.
9978 * msp430-tdep.c (msp430_gdbarch_init): Fix fall-through comment.
9979 * mdebugread.c (parse_partial_symbols): Fix fall-through comment.
9980 * jv-exp.y (yylex): Fix fall-through comment.
9981 * go-exp.y (lex_one_token): Fix fall-through comment.
9982 * gdbtypes.c (get_discrete_bounds, rank_one_type): Fix
9983 fall-through comment.
9984 * f-exp.y (yylex): Fix fall-through comment.
9985 * dwarf2read.c (process_die): Fix fall-through comments.
9986 * dbxread.c (process_one_symbol): Fix fall-through comment.
9987 * d-exp.y (lex_one_token): Fix fall-through comment.
9988 * cp-name-parser.y (yylex): Fix fall-through comment.
9989 * coffread.c (coff_symtab_read): Fix fall-through comment.
9990 * c-exp.y (lex_one_token): Fix fall-through comment.
9991 * arm-tdep.c (arm_decode_miscellaneous): Fix fall-through
9992 comment.
9993 * arch/arm.c (arm_instruction_changes_pc): Fix fall-through
9994 comment.
9995
9996 2018-05-04 Tom Tromey <tom@tromey.com>
9997
9998 PR python/22730:
9999 * NEWS: Mention gdb.execute change.
10000 * gdbcmd.h (execute_control_command): Don't declare.
10001 * python/python.c (execute_gdb_command): Use read_command_lines_1,
10002 execute_control_commands, execute_control_commands_to_string.
10003 * cli/cli-script.h (execute_control_commands)
10004 (execute_control_commands_to_string): Declare.
10005 (execute_control_command): Add from_tty parameter.
10006 * cli/cli-script.c (execute_control_commands)
10007 (execute_control_commands_to_string): New functions.
10008 (execute_user_command): Use execute_control_commands.
10009 (execute_control_command_1): Add "from_tty" parameter. Update.
10010 (execute_control_command): Likewise.
10011
10012 2018-05-04 Tom Tromey <tom@tromey.com>
10013
10014 PR python/22731:
10015 * NEWS: Mention that breakpoint commands are writable.
10016 * python/py-breakpoint.c (bppy_set_commands): New function.
10017 (breakpoint_object_getset) <"commands">: Use it.
10018
10019 2018-05-04 Tom Tromey <tom@tromey.com>
10020
10021 * tracepoint.c (actions_command): Update.
10022 * mi/mi-cmd-break.c (mi_command_line_array)
10023 (mi_command_line_array_cnt, mi_command_line_array_ptr)
10024 (mi_read_next_line): Remove.
10025 (mi_cmd_break_commands): Update.
10026 * cli/cli-script.h (read_command_lines, read_command_lines_1): Use
10027 function_view.
10028 * cli/cli-script.c (get_command_line): Update.
10029 (process_next_line): Use function_view. Constify.
10030 (recurse_read_control_structure, read_command_lines)
10031 (read_command_lines_1): Change argument types to function_view.
10032 (do_define_command, document_command): Update.
10033 * breakpoint.h (check_tracepoint_command): Don't declare.
10034 * breakpoint.c (check_tracepoint_command): Remove.
10035 (commands_command_1, create_tracepoint_from_upload): Update.
10036
10037 2018-05-04 Tom Tromey <tom@tromey.com>
10038
10039 PR gdb/11750:
10040 * cli/cli-script.h (enum command_control_type) <define_control>:
10041 New constant.
10042 * cli/cli-script.c (multi_line_command_p): Handle define_control.
10043 (build_command_line, execute_control_command_1)
10044 (process_next_line): Likewise.
10045 (do_define_command): New function, extracted from define_command.
10046 (define_command): Use it.
10047
10048 2018-05-04 Tom Tromey <tom@tromey.com>
10049
10050 * tracepoint.c (actions_command): Update.
10051 * cli/cli-script.h (read_command_lines): Update.
10052 * cli/cli-script.c (read_command_lines): Constify prompt_arg.
10053 (MAX_TMPBUF): Remove define.
10054 (define_command): Use string_printf.
10055 (document_command): Likewise.
10056 * breakpoint.c (commands_command_1): Update.
10057
10058 2018-05-04 Tom Tromey <tom@tromey.com>
10059
10060 * top.c (execute_command): Update.
10061 * cli/cli-script.h (print_command_lines): Now varargs.
10062 * cli/cli-script.c (print_command_lines): Now varargs.
10063 (execute_control_command_1) <case while_control, case if_control>:
10064 Update.
10065
10066 2018-05-04 Tom Tromey <tom@tromey.com>
10067
10068 * tracepoint.c (all_tracepoint_actions): Rename from
10069 all_tracepoint_actions_and_cleanup. Change return type.
10070 (actions_command, encode_actions_1, encode_actions)
10071 (trace_dump_actions, tdump_command): Update.
10072 * remote.c (remote_download_command_source): Update.
10073 * python/python.c (gdbpy_eval_from_control_command)
10074 (python_command, python_interactive_command): Update.
10075 * mi/mi-cmd-break.c (mi_cmd_break_commands): Update.
10076 * guile/guile.c (guile_command)
10077 (gdbscm_eval_from_control_command, guile_command): Update.
10078 * compile/compile.c (compile_code_command)
10079 (compile_print_command, compile_to_object): Update.
10080 * cli/cli-script.h (struct command_lines_deleter): New.
10081 (counted_command_line): New typedef.
10082 (struct command_line): Add constructor, destructor.
10083 <body_list>: Remove.
10084 <body_list_0, body_list_1>: New members.
10085 (command_line_up): Remove typedef.
10086 (read_command_lines, read_command_lines_1, get_command_line):
10087 Update.
10088 (copy_command_lines): Don't declare.
10089 * cli/cli-script.c (build_command_line): Use "new".
10090 (get_command_line): Return counted_command_line.
10091 (print_command_lines, execute_user_command)
10092 (execute_control_command_1, while_command, if_command): Update.
10093 (realloc_body_list): Remove.
10094 (process_next_line, recurse_read_control_structure): Update.
10095 (read_command_lines, read_command_lines_1): Return counted_command_line.
10096 (free_command_lines): Use "delete".
10097 (copy_command_lines): Remove.
10098 (define_command, document_command, show_user_1): Update.
10099 * cli/cli-decode.h (struct cmd_list_element) <user_commands>: Now
10100 a counted_command_line.
10101 * breakpoint.h (counted_command_line): Remove typedef.
10102 (breakpoint_set_commands): Update.
10103 * breakpoint.c (check_no_tracepoint_commands)
10104 (validate_commands_for_breakpoint): Update.
10105 (breakpoint_set_commands): Change commands to be a
10106 counted_command_line.
10107 (commands_command_1, update_dprintf_command_list)
10108 (create_tracepoint_from_upload): Update.
10109
10110 2018-05-04 Tom Tromey <tom@tromey.com>
10111
10112 * cli/cli-decode.h (cmd_list_element): New constructor.
10113 (~cmd_list_element): New destructor.
10114 (struct cmd_list_element): Add initializers.
10115 * cli/cli-decode.c (do_add_cmd): Use "new".
10116 (delete_cmd): Use "delete".
10117
10118 2018-05-04 Jan Kratochvil <jan.kratochvil@redhat.com>
10119 Pedro Alves <palves@redhat.com>
10120
10121 PR breakpoints/19806 and support for PR external/20207.
10122 * NEWS: Mention Aarch64 watchpoint improvements.
10123 * aarch64-linux-nat.c (aarch64_linux_stopped_data_address): Fix missed
10124 watchpoints and PR external/20207 watchpoints.
10125 * nat/aarch64-linux-hw-point.c
10126 (kernel_supports_any_contiguous_range): New.
10127 (aarch64_watchpoint_offset): New.
10128 (aarch64_watchpoint_length): Support PR external/20207 watchpoints.
10129 (aarch64_point_encode_ctrl_reg): New parameter offset, new asserts.
10130 (aarch64_point_is_aligned): Support PR external/20207 watchpoints.
10131 (aarch64_align_watchpoint): New parameters aligned_offset_p and
10132 next_addr_orig_p. Support PR external/20207 watchpoints.
10133 (aarch64_downgrade_regs): New.
10134 (aarch64_dr_state_insert_one_point): New parameters offset and
10135 addr_orig.
10136 (aarch64_dr_state_remove_one_point): Likewise.
10137 (aarch64_handle_breakpoint): Update caller.
10138 (aarch64_handle_aligned_watchpoint): Likewise.
10139 (aarch64_handle_unaligned_watchpoint): Support addr_orig and
10140 aligned_offset.
10141 (aarch64_linux_set_debug_regs): Remove const from state. Call
10142 aarch64_downgrade_regs.
10143 (aarch64_show_debug_reg_state): Print also dr_addr_orig_wp.
10144 * nat/aarch64-linux-hw-point.h (DR_CONTROL_LENGTH): Rename to ...
10145 (DR_CONTROL_MASK): ... this.
10146 (struct aarch64_debug_reg_state): New field dr_addr_orig_wp.
10147 (unsigned int aarch64_watchpoint_offset): New prototype.
10148 (aarch64_linux_set_debug_regs): Remove const from state.
10149 * utils.c (align_up, align_down): Move to ...
10150 * common/common-utils.c (align_up, align_down): ... here.
10151 * utils.h (align_up, align_down): Move to ...
10152 * common/common-utils.h (align_up, align_down): ... here.
10153
10154 2018-05-04 Joel Brobecker <brobecker@adacore.com>
10155
10156 * sparc-tdep.c (sparc_structure_return_p): Re-implement to
10157 match the ABI as summarized in GCC's gcc/config/sparc/sparc.c.
10158 (sparc_arg_by_memory_p): Renamed from sparc_arg_on_registers_p.
10159 Re-implement to match the ABI as summarized in GCC's
10160 gcc/config/sparc/sparc.c. All callers updated.
10161 (sparc32_store_arguments): Remove assertion.
10162
10163 2018-05-04 Tom Tromey <tom@tromey.com>
10164
10165 * printcmd.c: Don't include tui.h.
10166 (decode_format): Use skip_spaces.
10167
10168 2018-05-04 Tom Tromey <tom@tromey.com>
10169
10170 PR gdb/22619:
10171 * printcmd.c (last_count): New global.
10172 (x_command): Use saved count when repeating.
10173
10174 2018-05-04 Tom Tromey <tom@tromey.com>
10175
10176 * nto-procfs.c (do_closedir_cleanup): Remove.
10177 (procfs_pidlist): Use gdb_dir_up.
10178 * procfs.c (do_closedir_cleanup): Remove.
10179 (proc_update_threads): Use gdb_dir_up.
10180 * common/filestuff.h (struct gdb_dir_deleter): New.
10181 (gdb_dir_up): New typedef.
10182
10183 2018-05-04 Tom Tromey <tom@tromey.com>
10184
10185 * ada-lang.c (print_mention_exception): Use std::string.
10186
10187 2018-05-04 Tom Tromey <tom@tromey.com>
10188
10189 * ada-lang.c (create_excep_cond_exprs): Update.
10190 (ada_exception_catchpoint_cond_string): Use std::string.
10191
10192 2018-05-04 Tom Tromey <tom@tromey.com>
10193
10194 * ada-lang.c (xget_renaming_scope): Return std::string.
10195 (old_renaming_is_invisible): Update.
10196
10197 2018-05-04 Tom Tromey <tom@tromey.com>
10198
10199 * bfd-target.c (target_bfd::m_bfd): Now a gdb_bfd_ref_ptr.
10200 (target_bfd::target_bfd, target_bfd::~target_bfd): Update.
10201
10202 2018-05-04 Ulrich Weigand <uweigand@de.ibm.com>
10203
10204 * spu-linux-nat.c (spu_linux_nat_target::wait): Fix syntax error.
10205
10206 2018-05-04 Tom Tromey <tom@tromey.com>
10207
10208 * remote.c (remote_query_supported_append): Change type.
10209 (remote_check_symbols): Update.
10210
10211 2018-05-04 Paul Pluzhnikov <ppluzhnikov@google.com>
10212
10213 PR gdb/11420
10214 * configure.ac: Prepend libpython.
10215 * python/python-config.py: Likewise.
10216 * configure: Regenerate.
10217
10218 2018-05-03 Simon Marchi <simon.marchi@ericsson.com>
10219
10220 * Makefile.in (%.c: %.l): Use -t instead of --stdout.
10221
10222 2018-05-03 Pedro Alves <palves@redhat.com>
10223
10224 * s390-linux-nat.c
10225 (s390_linux_nat_target::have_continuable_watchpoint): Mark with
10226 override. Write 'true' instead of '1'.
10227 (s390_linux_nat_target::watchpoint_addr_within_range): Remove
10228 declaration.
10229
10230 2018-05-02 Pedro Alves <palves@redhat.com>
10231
10232 * aarch64-fbsd-nat.c (_initialize_aarch64_fbsd_nat): Use
10233 add_inf_child_target.
10234 * aarch64-linux-nat.c (_initialize_aarch64_linux_nat): Use
10235 add_inf_child_target.
10236 * aix-thread.c (aix_thread_target_info): New.
10237 (aix_thread_target) <shortname, longname, doc>: Delete.
10238 <info>: New.
10239 * alpha-bsd-nat.c (_initialize_alphabsd_nat): Use
10240 add_inf_child_target.
10241 * alpha-linux-nat.c (_initialize_alpha_linux_nat): Use
10242 add_inf_child_target.
10243 * amd64-fbsd-nat.c (_initialize_amd64fbsd_nat): Use
10244 add_inf_child_target.
10245 * amd64-linux-nat.c (_initialize_amd64_linux_nat): Use
10246 add_inf_child_target.
10247 * amd64-nbsd-nat.c (_initialize_amd64nbsd_nat): Use
10248 add_inf_child_target.
10249 * amd64-obsd-nat.c (_initialize_amd64obsd_nat): Use
10250 add_inf_child_target.
10251 * arm-fbsd-nat.c (_initialize_arm_fbsd_nat): Use
10252 add_inf_child_target.
10253 * arm-linux-nat.c (_initialize_arm_linux_nat): Use
10254 add_inf_child_target.
10255 * arm-nbsd-nat.c (_initialize_arm_netbsd_nat): Use
10256 add_inf_child_target.
10257 * bfd-target.c (target_bfd_target_info): New.
10258 (target_bfd) <shortname, longname, doc>: Delete.
10259 <info>: New.
10260 * bsd-kvm.c (bsd_kvm_target_info): New.
10261 (bsd_kvm_target) <shortname, longname, doc>: Delete.
10262 <info>: New.
10263 (bsd_kvm_target::open): Rename to ...
10264 (bsd_kvm_target_open): ... this. Adjust.
10265 * bsd-uthread.c (bsd_uthread_target_info): New.
10266 (bsd_uthread_target) <shortname, longname, doc>: Delete.
10267 <info>: New.
10268 * corefile.c (core_file_command): Adjust.
10269 * corelow.c (core_target_info): New.
10270 (core_target) <shortname, longname, doc>: Delete.
10271 <info>: New.
10272 (core_target::open): Rename to ...
10273 (core_target_open): ... this. Adjust.
10274 * ctf.c (ctf_target_info): New.
10275 (ctf_target) <shortname, longname, doc>: Delete.
10276 <info>: New.
10277 (ctf_target::open): Rename to ...
10278 (ctf_target_open): ... this.
10279 (_initialize_ctf): Adjust.
10280 * exec.c (exec_target_info): New.
10281 (exec_target) <shortname, longname, doc>: Delete.
10282 <info>: New.
10283 (exec_target::open): Rename to ...
10284 (exec_target_open): ... this.
10285 * gdbcore.h (core_target_open): Declare.
10286 * go32-nat.c (_initialize_go32_nat): Use add_inf_child_target.
10287 * hppa-linux-nat.c (_initialize_hppa_linux_nat): Use
10288 add_inf_child_target.
10289 * hppa-nbsd-nat.c (_initialize_hppanbsd_nat): Use
10290 add_inf_child_target.
10291 * hppa-obsd-nat.c (_initialize_hppaobsd_nat): Use
10292 add_inf_child_target.
10293 * i386-darwin-nat.c (_initialize_i386_darwin_nat): Use
10294 add_inf_child_target.
10295 * i386-fbsd-nat.c (_initialize_i386fbsd_nat): Use
10296 add_inf_child_target.
10297 * i386-gnu-nat.c (_initialize_i386gnu_nat): Use
10298 add_inf_child_target.
10299 * i386-linux-nat.c (_initialize_i386_linux_nat): Use
10300 add_inf_child_target.
10301 * i386-nbsd-nat.c (_initialize_i386nbsd_nat): Use
10302 add_inf_child_target.
10303 * i386-obsd-nat.c (_initialize_i386obsd_nat): Use
10304 add_inf_child_target.
10305 * ia64-linux-nat.c (_initialize_ia64_linux_nat): Use
10306 add_inf_child_target.
10307 * inf-child.c (inf_child_target_info): New.
10308 (inf_child_target::info): New.
10309 (inf_child_open_target): Remove 'target' parameter. Use
10310 get_native_target instead.
10311 (inf_child_target::open): Delete.
10312 (add_inf_child_target): New.
10313 * inf-child.h (inf_child_target) <shortname, longname, doc, open>:
10314 Delete.
10315 <info>: New.
10316 (add_inf_child_target): Declare.
10317 (inf_child_open_target): Declare.
10318 * linux-thread-db.c (thread_db_target_info): New.
10319 (thread_db_target) <shortname, longname, doc>: Delete.
10320 <info>: New.
10321 * m32r-linux-nat.c (_initialize_m32r_linux_nat): Use
10322 add_inf_child_target.
10323 * m68k-bsd-nat.c (_initialize_m68kbsd_nat): Use
10324 add_inf_child_target.
10325 * m68k-linux-nat.c (_initialize_m68k_linux_nat): Use
10326 add_inf_child_target.
10327 * m88k-bsd-nat.c (_initialize_m88kbsd_nat): Use
10328 add_inf_child_target.
10329 * make-target-delegates (print_class): Adjust.
10330 * mips-fbsd-nat.c (_initialize_mips_fbsd_nat): Use
10331 add_inf_child_target.
10332 * mips-linux-nat.c (_initialize_mips_linux_nat): Use
10333 add_inf_child_target.
10334 * mips-nbsd-nat.c (_initialize_mipsnbsd_nat): Use
10335 add_inf_child_target.
10336 * mips64-obsd-nat.c (_initialize_mips64obsd_nat): Use
10337 add_inf_child_target.
10338 * nto-procfs.c (nto_native_target_info): New.
10339 (nto_procfs_target_native) <shortname, longname, doc>:
10340 Delete.
10341 <info>: New.
10342 (nto_procfs_target_info): New.
10343 (nto_procfs_target_procfs) <shortname, longname, doc>:
10344 Delete.
10345 <info>: New.
10346 (init_procfs_targets): Adjust.
10347 * ppc-fbsd-nat.c (_initialize_ppcfbsd_nat): Use
10348 add_inf_child_target.
10349 * ppc-linux-nat.c (_initialize_ppc_linux_nat): Use
10350 add_inf_child_target.
10351 * ppc-nbsd-nat.c (_initialize_ppcnbsd_nat): Use
10352 add_inf_child_target.
10353 * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Use
10354 add_inf_child_target.
10355 * ravenscar-thread.c (ravenscar_target_info): New.
10356 (ravenscar_thread_target) <shortname, longname, doc>:
10357 Delete.
10358 <info>: New.
10359 * record-btrace.c (record_btrace_target_info):
10360 (record_btrace_target) <shortname, longname, doc>: Delete.
10361 <info>: New.
10362 (record_btrace_target::open): Rename to ...
10363 (record_btrace_target_open): ... this. Adjust.
10364 * record-full.c (record_longname, record_doc): New.
10365 (record_full_base_target) <shortname, longname, doc>: Delete.
10366 <info>: New.
10367 (record_full_target_info): New.
10368 (record_full_target): <shortname>: Delete.
10369 <info>: New.
10370 (record_full_core_open_1, record_full_open_1): Update comments.
10371 (record_full_base_target::open): Rename to ...
10372 (record_full_open): ... this.
10373 (cmd_record_full_restore): Update.
10374 (_initialize_record_full): Update.
10375 * remote-sim.c (remote_sim_target_info): New.
10376 (gdbsim_target) <shortname, longname, doc>: Delete.
10377 <info>: New.
10378 (gdbsim_target::open): Rename to ...
10379 (gdbsim_target_open): ... this.
10380 (_initialize_remote_sim): Adjust.
10381 * remote.c (remote_doc): New.
10382 (remote_target_info): New.
10383 (remote_target) <shortname, longname, doc>: Delete.
10384 <info>: New.
10385 (extended_remote_target_info): New.
10386 (extended_remote_target) <shortname, longname, doc>: Delete.
10387 <info>: New.
10388 (remote_target::open_1): Make static. Adjust.
10389 * rs6000-nat.c (_initialize_rs6000_nat): Use add_inf_child_target.
10390 * s390-linux-nat.c (_initialize_s390_nat): Use
10391 add_inf_child_target.
10392 * sh-nbsd-nat.c (_initialize_shnbsd_nat): Use
10393 add_inf_child_target.
10394 * sol-thread.c (thread_db_target_info): New.
10395 (sol_thread_target) <shortname, longname, doc>: Delete.
10396 <info>: New.
10397 * sparc-linux-nat.c (_initialize_sparc_linux_nat): Use
10398 add_inf_child_target.
10399 * sparc-nbsd-nat.c (_initialize_sparcnbsd_nat): Use
10400 add_inf_child_target.
10401 * sparc64-fbsd-nat.c (_initialize_sparc64fbsd_nat): Use
10402 add_inf_child_target.
10403 * sparc64-linux-nat.c (_initialize_sparc64_linux_nat): Use
10404 add_inf_child_target.
10405 * sparc64-nbsd-nat.c (_initialize_sparc64nbsd_nat): Use
10406 add_inf_child_target.
10407 * sparc64-obsd-nat.c (_initialize_sparc64obsd_nat): Use
10408 add_inf_child_target.
10409 * spu-linux-nat.c (_initialize_spu_nat): Use
10410 add_inf_child_target.
10411 * spu-multiarch.c (spu_multiarch_target_info): New.
10412 (spu_multiarch_target) <shortname, longname, doc>: Delete.
10413 <info>: New.
10414 * target-delegates.c: Regenerate.
10415 * target.c: Include <unordered_map>.
10416 (target_ops_p): Delete.
10417 (DEF_VEC_P(target_ops_p)): Delete.
10418 (target_factories): New.
10419 (test_target_info): New.
10420 (test_target_ops::info): New.
10421 (open_target): Adjust to use target_factories.
10422 (add_target_with_completer): Rename to ...
10423 (add_target): ... this. Change prototype. Register target_info
10424 and open callback in target_factories. Register target_info in
10425 command context instead of target_ops.
10426 (add_target): Delete old implementation.
10427 (add_deprecated_target_alias): Change prototype. Adjust.
10428 (the_native_target): New.
10429 (set_native_target, get_native_target): New.
10430 (find_default_run_target): Use the_native_target.
10431 (find_attach_target, find_run_target): Simplify.
10432 (target_ops::open): Delete.
10433 (dummy_target_info): New.
10434 (dummy_target::shortname, dummy_target::longname)
10435 (dummy_target::doc): Delete.
10436 (dummy_target::info): New.
10437 (debug_target::shortname, debug_target::longname)
10438 (debug_target::doc): Delete.
10439 (debug_target::info): New.
10440 * target.h (struct target_info): New.
10441 (target_ops::~target_ops): Add comment.
10442 (target_ops::info): New.
10443 (target_ops::shortname, target_ops::longname, target_ops::doc): No
10444 longer virtual. Implement in terms of target_info.
10445 (set_native_target, get_native_target): Declare.
10446 (target_open_ftype): New.
10447 (add_target, add_target_with_completer)
10448 (add_deprecated_target_alias): Change prototype.
10449 (test_target) <shortname, longname, doc>: Delete.
10450 <info>: New.
10451 * tilegx-linux-nat.c (_initialize_tile_linux_nat): Use
10452 add_inf_child_target.
10453 * tracefile-tfile.c (tfile_target_info): New.
10454 (tfile_target) <shortname, longname, doc>: Delete.
10455 <info>: New.
10456 (tfile_target::open): Rename to ...
10457 (tfile_target_open): ... this.
10458 (_initialize_tracefile_tfile): Adjust.
10459 * vax-bsd-nat.c (_initialize_vaxbsd_nat): Use
10460 add_inf_child_target.
10461 * windows-nat.c (_initialize_windows_nat): Use
10462 add_inf_child_target.
10463 * xtensa-linux-nat.c (_initialize_xtensa_linux_nat): Use
10464 add_inf_child_target.
10465
10466 2018-05-02 Pedro Alves <palves@redhat.com>
10467
10468 * linux-nat.h (linux_nat_target) <low_new_thread,
10469 low_delete_thread, low_new_fork, low_forget_process,
10470 low_prepare_to_resume, low_siginfo_fixup, low_status_is_event>:
10471 New virtual methods.
10472 (linux_nat_set_new_thread, linux_nat_set_delete_thread)
10473 (linux_nat_new_fork_ftype, linux_nat_set_new_fork)
10474 (linux_nat_forget_process_ftype, linux_nat_set_forget_process)
10475 (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
10476 (linux_nat_set_prepare_to_resume, linux_nat_set_status_is_event):
10477 Delete.
10478 * linux-fork.c (delete_fork): Adjust to call low method.
10479 * linux-nat.c (linux_nat_new_thread, linux_nat_delete_thread)
10480 (linux_nat_new_fork, linux_nat_forget_process_hook)
10481 (linux_nat_prepare_to_resume, linux_nat_siginfo_fixup)
10482 (linux_nat_status_is_event):
10483 (linux_nat_target::follow_fork, lwp_free, add_lwp, detach_one_lwp)
10484 (linux_resume_one_lwp_throw, linux_handle_extended_wait): Adjust
10485 to call low method.
10486 (sigtrap_is_event): Rename to ...
10487 (linux_nat_target::low_status_is_event): ... this.
10488 (linux_nat_set_status_is_event): Delete.
10489 (save_stop_reason, linux_nat_wait_1)
10490 (linux_nat_target::mourn_inferior, siginfo_fixup): Adjust to call
10491 low methods.
10492 (linux_nat_set_new_thread, linux_nat_set_delete_thread)
10493 (linux_nat_set_new_fork, linux_nat_set_forget_process)
10494 (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
10495 (linux_nat_set_prepare_to_resume): Delete.
10496 * aarch64-linux-nat.c: All linux_nat_set_* callbacks converted to
10497 low virtual methods.
10498 * amd64-linux-nat.c: Likewise.
10499 * arm-linux-nat.c: Likewise.
10500 * i386-linux-nat.c: Likewise.
10501 * ia64-linux-nat.c: Likewise.
10502 * mips-linux-nat.c: Likewise.
10503 * ppc-linux-nat.c: Likewise.
10504 * s390-linux-nat.c: Likewise.
10505 * sparc64-linux-nat.c: Likewise.
10506 * x86-linux-nat.c: Likewise.
10507 * x86-linux-nat.h: Include "nat/x86-linux.h".
10508 (x86_linux_nat_target) <low_new_fork, low_forget_process,
10509 low_prepare_to_resume, low_new_thread, low_delete_thread>:
10510 Override methods.
10511
10512 2018-05-02 Pedro Alves <palves@redhat.com>
10513
10514 * target.h (target_ops)
10515 <stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
10516 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint,
10517 stopped_by_watchpoint, have_continuable_watchpoint,
10518 stopped_data_address, watchpoint_addr_within_range,
10519 can_accel_watchpoint_condition, can_run, thread_alive,
10520 has_all_memory, has_memory, has_stack, has_registers,
10521 has_execution, can_async_p, is_async_p, supports_non_stop,
10522 always_non_stop_p, can_execute_reverse, supports_multi_process,
10523 supports_enable_disable_tracepoint,
10524 supports_disable_randomization, supports_string_tracing,
10525 supports_evaluation_of_breakpoint_conditions,
10526 can_run_breakpoint_commands, filesystem_is_local,
10527 can_download_tracepoint, get_trace_state_variable_value,
10528 set_trace_notes, get_tib_address, use_agent, can_use_agent,
10529 record_is_replaying, record_will_replay,
10530 augmented_libraries_svr4_read>: Adjust to return bool.
10531 * aarch64-linux-nat.c: All implementations adjusted.
10532 * aix-thread.c: All implementations adjusted.
10533 * arm-linux-nat.c: All implementations adjusted.
10534 * breakpoint.c: All implementations adjusted.
10535 * bsd-kvm.c: All implementations adjusted.
10536 * bsd-uthread.c: All implementations adjusted.
10537 * corelow.c: All implementations adjusted.
10538 * ctf.c: All implementations adjusted.
10539 * darwin-nat.c: All implementations adjusted.
10540 * darwin-nat.h: All implementations adjusted.
10541 * exec.c: All implementations adjusted.
10542 * fbsd-nat.c: All implementations adjusted.
10543 * fbsd-nat.h: All implementations adjusted.
10544 * gnu-nat.c: All implementations adjusted.
10545 * gnu-nat.h: All implementations adjusted.
10546 * go32-nat.c: All implementations adjusted.
10547 * ia64-linux-nat.c: All implementations adjusted.
10548 * inf-child.c: All implementations adjusted.
10549 * inf-child.h: All implementations adjusted.
10550 * inf-ptrace.c: All implementations adjusted.
10551 * inf-ptrace.h: All implementations adjusted.
10552 * linux-nat.c: All implementations adjusted.
10553 * linux-nat.h: All implementations adjusted.
10554 * mips-linux-nat.c: All implementations adjusted.
10555 * nto-procfs.c: All implementations adjusted.
10556 * ppc-linux-nat.c: All implementations adjusted.
10557 * procfs.c: All implementations adjusted.
10558 * ravenscar-thread.c: All implementations adjusted.
10559 * record-btrace.c: All implementations adjusted.
10560 * record-full.c: All implementations adjusted.
10561 * remote-sim.c: All implementations adjusted.
10562 * remote.c: All implementations adjusted.
10563 * s390-linux-nat.c: All implementations adjusted.
10564 * sol-thread.c: All implementations adjusted.
10565 * spu-multiarch.c: All implementations adjusted.
10566 * target-delegates.c: All implementations adjusted.
10567 * target.c: All implementations adjusted.
10568 * target.h: All implementations adjusted.
10569 * tracefile-tfile.c: All implementations adjusted.
10570 * tracefile.c: All implementations adjusted.
10571 * tracefile.h: All implementations adjusted.
10572 * windows-nat.c: All implementations adjusted.
10573 * x86-linux-nat.h: All implementations adjusted.
10574 * x86-nat.h: All implementations adjusted.
10575
10576 2018-05-02 Pedro Alves <palves@redhat.com>
10577
10578 * make-target-delegates (scan_target_h): Don't trim lines here.
10579 Replace sequences of tabs and/or whitespace with a single
10580 whitespace.
10581 (top level, parsing methods): Trim each line before processing it
10582 here.
10583
10584 2018-05-02 Pedro Alves <palves@redhat.com>
10585 John Baldwin <jhb@freebsd.org>
10586
10587 * target.h (enum strata) <debug_stratum>: New.
10588 (struct target_ops) <all delegation methods>: Replace by C++
10589 virtual methods, and drop "to_" prefix. All references updated
10590 throughout.
10591 <to_shortname, to_longname, to_doc, to_data,
10592 to_have_steppable_watchpoint, to_have_continuable_watchpoint,
10593 to_has_thread_control, to_attach_no_wait>: Delete, replaced by
10594 virtual methods. All references updated throughout.
10595 <can_attach, supports_terminal_ours, can_create_inferior,
10596 get_thread_control_capabilities, attach_no_wait>: New
10597 virtual methods.
10598 <insert_breakpoint, remove_breakpoint>: Now
10599 TARGET_DEFAULT_NORETURN methods.
10600 <info_proc>: Now returns bool.
10601 <to_magic>: Delete.
10602 (OPS_MAGIC): Delete.
10603 (current_target): Delete. All references replaced by references
10604 to ...
10605 (target_stack): ... this. New.
10606 (target_shortname, target_longname): Adjust.
10607 (target_can_run): Now a function declaration.
10608 (default_child_has_all_memory, default_child_has_memory)
10609 (default_child_has_stack, default_child_has_registers)
10610 (default_child_has_execution): Remove target_ops parameter.
10611 (complete_target_initialization): Delete.
10612 (memory_breakpoint_target): New template class.
10613 (test_target_ops): Refactor as a C++ class with virtual methods.
10614 * make-target-delegates (NAME_PART): Tighten.
10615 (POINTER_PART, CP_SYMBOL): New.
10616 (SIMPLE_RETURN_PART): Reimplement.
10617 (VEC_RETURN_PART): Expect less.
10618 (RETURN_PART, VIRTUAL_PART): New.
10619 (METHOD): Adjust to C++ virtual methods.
10620 (scan_target_h): Remove reference to C99.
10621 (dname): Output "target_ops::" prefix.
10622 (write_function_header): Adjust to output a C++ class method.
10623 (write_declaration): New.
10624 (write_delegator): Adjust to output a C++ class method.
10625 (tdname): Output "dummy_target::" prefix.
10626 (write_tdefault, write_debugmethod): Adjust to output a C++ class
10627 method.
10628 (tdefault_names, debug_names): Delete.
10629 (return_types, tdefaults, styles, argtypes_array): New.
10630 (top level): All methods are delegators.
10631 (print_class): New.
10632 (top level): Print dummy_target and debug_target classes.
10633 * target-delegates.c: Regenerate.
10634 * target-debug.h (target_debug_print_enum_info_proc_what)
10635 (target_debug_print_thread_control_capabilities)
10636 (target_debug_print_thread_info_p): New.
10637 * target.c (dummy_target): Delete.
10638 (the_dummy_target, the_debug_target): New.
10639 (target_stack): Now extern.
10640 (set_targetdebug): Push/unpush debug target.
10641 (default_child_has_all_memory, default_child_has_memory)
10642 (default_child_has_stack, default_child_has_registers)
10643 (default_child_has_execution): Remove target_ops parameter.
10644 (complete_target_initialization): Delete.
10645 (add_target_with_completer): No longer call
10646 complete_target_initialization.
10647 (target_supports_terminal_ours): Use regular delegation.
10648 (update_current_target): Delete.
10649 (push_target): No longer check magic number. Don't call
10650 update_current_target.
10651 (unpush_target): Don't call update_current_target.
10652 (target_is_pushed): No longer check magic number.
10653 (target_require_runnable): Skip for all stratums over
10654 process_stratum.
10655 (target_ops::info_proc): New.
10656 (target_info_proc): Use find_target_at and
10657 find_default_run_target.
10658 (target_supports_disable_randomization): Use regular delegation.
10659 (target_get_osdata): Use find_target_at.
10660 (target_ops::open, target_ops::close, target_ops::can_attach)
10661 (target_ops::attach, target_ops::can_create_inferior)
10662 (target_ops::create_inferior, target_ops::can_run)
10663 (target_can_run): New.
10664 (default_fileio_target): Use regular delegation.
10665 (target_ops::fileio_open, target_ops::fileio_pwrite)
10666 (target_ops::fileio_pread, target_ops::fileio_fstat)
10667 (target_ops::fileio_close, target_ops::fileio_unlink)
10668 (target_ops::fileio_readlink): New.
10669 (target_fileio_open_1, target_fileio_unlink)
10670 (target_fileio_readlink): Always call the target method. Handle
10671 FILEIO_ENOSYS.
10672 (return_zero, return_zero_has_execution): Delete.
10673 (init_dummy_target): Delete.
10674 (dummy_target::dummy_target, dummy_target::shortname)
10675 (dummy_target::longname, dummy_target::doc)
10676 (debug_target::debug_target, debug_target::shortname)
10677 (debug_target::longname, debug_target::doc): New.
10678 (target_supports_delete_record): Use regular delegation.
10679 (setup_target_debug): Delete.
10680 (maintenance_print_target_stack): Skip debug_stratum.
10681 (initialize_targets): Instantiate the_dummy_target and
10682 the_debug_target.
10683 * auxv.c (target_auxv_parse): Remove 'ops' parameter. Adjust to
10684 use target_stack.
10685 (target_auxv_search, fprint_target_auxv): Adjust.
10686 (info_auxv_command): Adjust to use target_stack.
10687 * auxv.h (target_auxv_parse): Remove 'ops' parameter.
10688 * exceptions.c (print_flush): Handle a NULL target_stack.
10689 * regcache.c (target_ops_no_register): Refactor as class with
10690 virtual methods.
10691
10692 * exec.c (exec_target): New class.
10693 (exec_ops): Now an exec_target.
10694 (exec_open, exec_close_1, exec_get_section_table)
10695 (exec_xfer_partial, exec_files_info, exec_has_memory)
10696 (exec_make_note_section): Refactor as exec_target methods.
10697 (exec_file_clear, ignore, exec_remove_breakpoint, init_exec_ops):
10698 Delete.
10699 (exec_target::find_memory_regions): New.
10700 (_initialize_exec): Don't call init_exec_ops.
10701 * gdbcore.h (exec_file_clear): Delete.
10702
10703 * corefile.c (core_target): Delete.
10704 (core_file_command): Adjust.
10705 * corelow.c (core_target): New class.
10706 (the_core_target): New.
10707 (core_close): Remove target_ops parameter.
10708 (core_close_cleanup): Adjust.
10709 (core_target::close): New.
10710 (core_open, core_detach, get_core_registers, core_files_info)
10711 (core_xfer_partial, core_thread_alive, core_read_description)
10712 (core_pid_to_str, core_thread_name, core_has_memory)
10713 (core_has_stack, core_has_registers, core_info_proc): Rework as
10714 core_target methods.
10715 (ignore, core_remove_breakpoint, init_core_ops): Delete.
10716 (_initialize_corelow): Initialize the_core_target.
10717 * gdbcore.h (core_target): Delete.
10718 (the_core_target): New.
10719
10720 * ctf.c: (ctf_target): New class.
10721 (ctf_ops): Now a ctf_target.
10722 (ctf_open, ctf_close, ctf_files_info, ctf_fetch_registers)
10723 (ctf_xfer_partial, ctf_get_trace_state_variable_value)
10724 (ctf_trace_find, ctf_traceframe_info): Refactor as ctf_target
10725 methods.
10726 (init_ctf_ops): Delete.
10727 (_initialize_ctf): Don't call it.
10728 * tracefile-tfile.c (tfile_target): New class.
10729 (tfile_ops): Now a tfile_target.
10730 (tfile_open, tfile_close, tfile_files_info)
10731 (tfile_get_tracepoint_status, tfile_trace_find)
10732 (tfile_fetch_registers, tfile_xfer_partial)
10733 (tfile_get_trace_state_variable_value, tfile_traceframe_info):
10734 Refactor as tfile_target methods.
10735 (tfile_xfer_partial_features): Remove target_ops parameter.
10736 (init_tfile_ops): Delete.
10737 (_initialize_tracefile_tfile): Don't call it.
10738 * tracefile.c (tracefile_has_all_memory, tracefile_has_memory)
10739 (tracefile_has_stack, tracefile_has_registers)
10740 (tracefile_thread_alive, tracefile_get_trace_status): Refactor as
10741 tracefile_target methods.
10742 (init_tracefile_ops): Delete.
10743 (tracefile_target::tracefile_target): New.
10744 * tracefile.h: Include "target.h".
10745 (tracefile_target): New class.
10746 (init_tracefile_ops): Delete.
10747
10748 * spu-multiarch.c (spu_multiarch_target): New class.
10749 (spu_ops): Now a spu_multiarch_target.
10750 (spu_thread_architecture, spu_region_ok_for_hw_watchpoint)
10751 (spu_fetch_registers, spu_store_registers, spu_xfer_partial)
10752 (spu_search_memory, spu_mourn_inferior): Refactor as
10753 spu_multiarch_target methods.
10754 (init_spu_ops): Delete.
10755 (_initialize_spu_multiarch): Remove references to init_spu_ops,
10756 complete_target_initialization.
10757
10758 * ravenscar-thread.c (ravenscar_thread_target): New class.
10759 (ravenscar_ops): Now a ravenscar_thread_target.
10760 (ravenscar_resume, ravenscar_wait, ravenscar_update_thread_list)
10761 (ravenscar_thread_alive, ravenscar_pid_to_str)
10762 (ravenscar_fetch_registers, ravenscar_store_registers)
10763 (ravenscar_prepare_to_store, ravenscar_stopped_by_sw_breakpoint)
10764 (ravenscar_stopped_by_hw_breakpoint)
10765 (ravenscar_stopped_by_watchpoint, ravenscar_stopped_data_address)
10766 (ravenscar_mourn_inferior, ravenscar_core_of_thread)
10767 (ravenscar_get_ada_task_ptid): Refactor as ravenscar_thread_target
10768 methods.
10769 (init_ravenscar_thread_ops): Delete.
10770 (_initialize_ravenscar): Remove references to
10771 init_ravenscar_thread_ops and complete_target_initialization.
10772
10773 * bsd-uthread.c (bsd_uthread_ops_hack): Delete.
10774 (bsd_uthread_target): New class.
10775 (bsd_uthread_ops): Now a bsd_uthread_target.
10776 (bsd_uthread_activate): Adjust to refer to bsd_uthread_ops.
10777 (bsd_uthread_close, bsd_uthread_mourn_inferior)
10778 (bsd_uthread_fetch_registers, bsd_uthread_store_registers)
10779 (bsd_uthread_wait, bsd_uthread_resume, bsd_uthread_thread_alive)
10780 (bsd_uthread_update_thread_list, bsd_uthread_extra_thread_info)
10781 (bsd_uthread_pid_to_str): Refactor as bsd_uthread_target methods.
10782 (bsd_uthread_target): Delete function.
10783 (_initialize_bsd_uthread): Remove reference to
10784 complete_target_initialization.
10785
10786 * bfd-target.c (target_bfd_data): Delete. Fields folded into ...
10787 (target_bfd): ... this new class.
10788 (target_bfd_xfer_partial, target_bfd_get_section_table)
10789 (target_bfd_close): Refactor as target_bfd methods.
10790 (target_bfd::~target_bfd): New.
10791 (target_bfd_reopen): Adjust.
10792 (target_bfd::close): New.
10793
10794 * record-btrace.c (record_btrace_target): New class.
10795 (record_btrace_ops): Now a record_btrace_target.
10796 (record_btrace_open, record_btrace_stop_recording)
10797 (record_btrace_disconnect, record_btrace_close)
10798 (record_btrace_async, record_btrace_info)
10799 (record_btrace_insn_history, record_btrace_insn_history_range)
10800 (record_btrace_insn_history_from, record_btrace_call_history)
10801 (record_btrace_call_history_range)
10802 (record_btrace_call_history_from, record_btrace_record_method)
10803 (record_btrace_is_replaying, record_btrace_will_replay)
10804 (record_btrace_xfer_partial, record_btrace_insert_breakpoint)
10805 (record_btrace_remove_breakpoint, record_btrace_fetch_registers)
10806 (record_btrace_store_registers, record_btrace_prepare_to_store)
10807 (record_btrace_to_get_unwinder)
10808 (record_btrace_to_get_tailcall_unwinder, record_btrace_resume)
10809 (record_btrace_commit_resume, record_btrace_wait)
10810 (record_btrace_stop, record_btrace_can_execute_reverse)
10811 (record_btrace_stopped_by_sw_breakpoint)
10812 (record_btrace_supports_stopped_by_sw_breakpoint)
10813 (record_btrace_stopped_by_hw_breakpoint)
10814 (record_btrace_supports_stopped_by_hw_breakpoint)
10815 (record_btrace_update_thread_list, record_btrace_thread_alive)
10816 (record_btrace_goto_begin, record_btrace_goto_end)
10817 (record_btrace_goto, record_btrace_stop_replaying_all)
10818 (record_btrace_execution_direction)
10819 (record_btrace_prepare_to_generate_core)
10820 (record_btrace_done_generating_core): Refactor as
10821 record_btrace_target methods.
10822 (init_record_btrace_ops): Delete.
10823 (_initialize_record_btrace): Remove reference to
10824 init_record_btrace_ops.
10825 * record-full.c (RECORD_FULL_IS_REPLAY): Adjust to always refer to
10826 the execution_direction global.
10827 (record_full_base_target, record_full_target)
10828 (record_full_core_target): New classes.
10829 (record_full_ops): Now a record_full_target.
10830 (record_full_core_ops): Now a record_full_core_target.
10831 (record_full_target::detach, record_full_target::disconnect)
10832 (record_full_core_target::disconnect)
10833 (record_full_target::mourn_inferior, record_full_target::kill):
10834 New.
10835 (record_full_open, record_full_close, record_full_async): Refactor
10836 as methods of the record_full_base_target class.
10837 (record_full_resume, record_full_commit_resume): Refactor
10838 as methods of the record_full_target class.
10839 (record_full_wait, record_full_stopped_by_watchpoint)
10840 (record_full_stopped_data_address)
10841 (record_full_stopped_by_sw_breakpoint)
10842 (record_full_supports_stopped_by_sw_breakpoint)
10843 (record_full_stopped_by_hw_breakpoint)
10844 (record_full_supports_stopped_by_hw_breakpoint): Refactor as
10845 methods of the record_full_base_target class.
10846 (record_full_store_registers, record_full_xfer_partial)
10847 (record_full_insert_breakpoint, record_full_remove_breakpoint):
10848 Refactor as methods of the record_full_target class.
10849 (record_full_can_execute_reverse, record_full_get_bookmark)
10850 (record_full_goto_bookmark, record_full_execution_direction)
10851 (record_full_record_method, record_full_info, record_full_delete)
10852 (record_full_is_replaying, record_full_will_replay)
10853 (record_full_goto_begin, record_full_goto_end, record_full_goto)
10854 (record_full_stop_replaying): Refactor as methods of the
10855 record_full_base_target class.
10856 (record_full_core_resume, record_full_core_kill)
10857 (record_full_core_fetch_registers)
10858 (record_full_core_prepare_to_store)
10859 (record_full_core_store_registers, record_full_core_xfer_partial)
10860 (record_full_core_insert_breakpoint)
10861 (record_full_core_remove_breakpoint)
10862 (record_full_core_has_execution): Refactor
10863 as methods of the record_full_core_target class.
10864 (record_full_base_target::supports_delete_record): New.
10865 (init_record_full_ops): Delete.
10866 (init_record_full_core_ops): Delete.
10867 (record_full_save): Refactor as method of the
10868 record_full_base_target class.
10869 (_initialize_record_full): Remove references to
10870 init_record_full_ops and init_record_full_core_ops.
10871
10872 * remote.c (remote_target, extended_remote_target): New classes.
10873 (remote_ops): Now a remote_target.
10874 (extended_remote_ops): Now an extended_remote_target.
10875 (remote_insert_fork_catchpoint, remote_remove_fork_catchpoint)
10876 (remote_insert_vfork_catchpoint, remote_remove_vfork_catchpoint)
10877 (remote_insert_exec_catchpoint, remote_remove_exec_catchpoint)
10878 (remote_pass_signals, remote_set_syscall_catchpoint)
10879 (remote_program_signals, )
10880 (remote_thread_always_alive): Remove target_ops parameter.
10881 (remote_thread_alive, remote_thread_name)
10882 (remote_update_thread_list, remote_threads_extra_info)
10883 (remote_static_tracepoint_marker_at)
10884 (remote_static_tracepoint_markers_by_strid)
10885 (remote_get_ada_task_ptid, remote_close, remote_start_remote)
10886 (remote_open): Refactor as methods of remote_target.
10887 (extended_remote_open, extended_remote_detach)
10888 (extended_remote_attach, extended_remote_post_attach):
10889 (extended_remote_supports_disable_randomization)
10890 (extended_remote_create_inferior): : Refactor as method of
10891 extended_remote_target.
10892 (remote_set_permissions, remote_open_1, remote_detach)
10893 (remote_follow_fork, remote_follow_exec, remote_disconnect)
10894 (remote_resume, remote_commit_resume, remote_stop)
10895 (remote_interrupt, remote_pass_ctrlc, remote_terminal_inferior)
10896 (remote_terminal_ours, remote_wait, remote_fetch_registers)
10897 (remote_prepare_to_store, remote_store_registers)
10898 (remote_flash_erase, remote_flash_done, remote_files_info)
10899 (remote_kill, remote_mourn, remote_insert_breakpoint)
10900 (remote_remove_breakpoint, remote_insert_watchpoint)
10901 (remote_watchpoint_addr_within_range)
10902 (remote_remove_watchpoint, remote_region_ok_for_hw_watchpoint)
10903 (remote_check_watch_resources, remote_stopped_by_sw_breakpoint)
10904 (remote_supports_stopped_by_sw_breakpoint)
10905 (remote_stopped_by_hw_breakpoint)
10906 (remote_supports_stopped_by_hw_breakpoint)
10907 (remote_stopped_by_watchpoint, remote_stopped_data_address)
10908 (remote_insert_hw_breakpoint, remote_remove_hw_breakpoint)
10909 (remote_verify_memory): Refactor as methods of remote_target.
10910 (remote_write_qxfer, remote_read_qxfer): Remove target_ops
10911 parameter.
10912 (remote_xfer_partial, remote_get_memory_xfer_limit)
10913 (remote_search_memory, remote_rcmd, remote_memory_map)
10914 (remote_pid_to_str, remote_get_thread_local_address)
10915 (remote_get_tib_address, remote_read_description): Refactor as
10916 methods of remote_target.
10917 (remote_target::fileio_open, remote_target::fileio_pwrite)
10918 (remote_target::fileio_pread, remote_target::fileio_close): New.
10919 (remote_hostio_readlink, remote_hostio_fstat)
10920 (remote_filesystem_is_local, remote_can_execute_reverse)
10921 (remote_supports_non_stop, remote_supports_disable_randomization)
10922 (remote_supports_multi_process, remote_supports_cond_breakpoints)
10923 (remote_supports_enable_disable_tracepoint)
10924 (remote_supports_string_tracing)
10925 (remote_can_run_breakpoint_commands, remote_trace_init)
10926 (remote_download_tracepoint, remote_can_download_tracepoint)
10927 (remote_download_trace_state_variable, remote_enable_tracepoint)
10928 (remote_disable_tracepoint, remote_trace_set_readonly_regions)
10929 (remote_trace_start, remote_get_trace_status)
10930 (remote_get_tracepoint_status, remote_trace_stop)
10931 (remote_trace_find, remote_get_trace_state_variable_value)
10932 (remote_save_trace_data, remote_get_raw_trace_data)
10933 (remote_set_disconnected_tracing, remote_core_of_thread)
10934 (remote_set_circular_trace_buffer, remote_traceframe_info)
10935 (remote_get_min_fast_tracepoint_insn_len)
10936 (remote_set_trace_buffer_size, remote_set_trace_notes)
10937 (remote_use_agent, remote_can_use_agent, remote_enable_btrace)
10938 (remote_disable_btrace, remote_teardown_btrace)
10939 (remote_read_btrace, remote_btrace_conf)
10940 (remote_augmented_libraries_svr4_read, remote_load)
10941 (remote_pid_to_exec_file, remote_can_do_single_step)
10942 (remote_execution_direction, remote_thread_handle_to_thread_info):
10943 Refactor as methods of remote_target.
10944 (init_remote_ops, init_extended_remote_ops): Delete.
10945 (remote_can_async_p, remote_is_async_p, remote_async)
10946 (remote_thread_events, remote_upload_tracepoints)
10947 (remote_upload_trace_state_variables): Refactor as methods of
10948 remote_target.
10949 (_initialize_remote): Remove references to init_remote_ops and
10950 init_extended_remote_ops.
10951
10952 * remote-sim.c (gdbsim_target): New class.
10953 (gdbsim_fetch_register, gdbsim_store_register, gdbsim_kill)
10954 (gdbsim_load, gdbsim_create_inferior, gdbsim_open, gdbsim_close)
10955 (gdbsim_detach, gdbsim_resume, gdbsim_interrupt)
10956 (gdbsim_wait, gdbsim_prepare_to_store, gdbsim_xfer_partial)
10957 (gdbsim_files_info, gdbsim_mourn_inferior, gdbsim_thread_alive)
10958 (gdbsim_pid_to_str, gdbsim_has_all_memory, gdbsim_has_memory):
10959 Refactor as methods of gdbsim_target.
10960 (gdbsim_ops): Now a gdbsim_target.
10961 (init_gdbsim_ops): Delete.
10962 (gdbsim_cntrl_c): Adjust.
10963 (_initialize_remote_sim): Remove reference to init_gdbsim_ops.
10964
10965 * amd64-linux-nat.c (amd64_linux_nat_target): New class.
10966 (the_amd64_linux_nat_target): New.
10967 (amd64_linux_fetch_inferior_registers)
10968 (amd64_linux_store_inferior_registers): Refactor as methods of
10969 amd64_linux_nat_target.
10970 (_initialize_amd64_linux_nat): Adjust. Set linux_target.
10971 * i386-linux-nat.c: Don't include "linux-nat.h".
10972 (i386_linux_nat_target): New class.
10973 (the_i386_linux_nat_target): New.
10974 (i386_linux_fetch_inferior_registers)
10975 (i386_linux_store_inferior_registers, i386_linux_resume): Refactor
10976 as methods of i386_linux_nat_target.
10977 (_initialize_i386_linux_nat): Adjust. Set linux_target.
10978 * inf-child.c (inf_child_ops): Delete.
10979 (inf_child_fetch_inferior_registers)
10980 (inf_child_store_inferior_registers): Delete.
10981 (inf_child_post_attach, inf_child_prepare_to_store): Refactor as
10982 methods of inf_child_target.
10983 (inf_child_target::supports_terminal_ours)
10984 (inf_child_target::terminal_init)
10985 (inf_child_target::terminal_inferior)
10986 (inf_child_target::terminal_ours_for_output)
10987 (inf_child_target::terminal_ours, inf_child_target::interrupt)
10988 (inf_child_target::pass_ctrlc, inf_child_target::terminal_info):
10989 New.
10990 (inf_child_open, inf_child_disconnect, inf_child_close)
10991 (inf_child_mourn_inferior, inf_child_maybe_unpush_target)
10992 (inf_child_post_startup_inferior, inf_child_can_run)
10993 (inf_child_pid_to_exec_file): Refactor as methods of
10994 inf_child_target.
10995 (inf_child_follow_fork): Delete.
10996 (inf_child_target::can_create_inferior)
10997 (inf_child_target::can_attach): New.
10998 (inf_child_target::has_all_memory, inf_child_target::has_memory)
10999 (inf_child_target::has_stack, inf_child_target::has_registers)
11000 (inf_child_target::has_execution): New.
11001 (inf_child_fileio_open, inf_child_fileio_pwrite)
11002 (inf_child_fileio_pread, inf_child_fileio_fstat)
11003 (inf_child_fileio_close, inf_child_fileio_unlink)
11004 (inf_child_fileio_readlink, inf_child_use_agent)
11005 (inf_child_can_use_agent): Refactor as methods of
11006 inf_child_target.
11007 (return_zero, inf_child_target): Delete.
11008 (inf_child_target::inf_child_target): New.
11009 * inf-child.h: Include "target.h".
11010 (inf_child_target): Delete function prototype.
11011 (inf_child_target): New class.
11012 (inf_child_open_target, inf_child_mourn_inferior)
11013 (inf_child_maybe_unpush_target): Delete.
11014 * inf-ptrace.c (inf_ptrace_target::~inf_ptrace_target): New.
11015 (inf_ptrace_follow_fork, inf_ptrace_insert_fork_catchpoint)
11016 (inf_ptrace_remove_fork_catchpoint, inf_ptrace_create_inferior)
11017 (inf_ptrace_post_startup_inferior, inf_ptrace_mourn_inferior)
11018 (inf_ptrace_attach, inf_ptrace_post_attach, inf_ptrace_detach)
11019 (inf_ptrace_detach_success, inf_ptrace_kill, inf_ptrace_resume)
11020 (inf_ptrace_wait, inf_ptrace_xfer_partial)
11021 (inf_ptrace_thread_alive, inf_ptrace_files_info)
11022 (inf_ptrace_pid_to_str, inf_ptrace_auxv_parse): Refactor as
11023 methods of inf_ptrace_target.
11024 (inf_ptrace_target): Delete function.
11025 * inf-ptrace.h: Include "inf-child.h".
11026 (inf_ptrace_target): Delete function declaration.
11027 (inf_ptrace_target): New class.
11028 (inf_ptrace_trad_target, inf_ptrace_detach_success): Delete.
11029 * linux-nat.c (linux_target): New.
11030 (linux_ops, linux_ops_saved, super_xfer_partial): Delete.
11031 (linux_nat_target::~linux_nat_target): New.
11032 (linux_child_post_attach, linux_child_post_startup_inferior)
11033 (linux_child_follow_fork, linux_child_insert_fork_catchpoint)
11034 (linux_child_remove_fork_catchpoint)
11035 (linux_child_insert_vfork_catchpoint)
11036 (linux_child_remove_vfork_catchpoint)
11037 (linux_child_insert_exec_catchpoint)
11038 (linux_child_remove_exec_catchpoint)
11039 (linux_child_set_syscall_catchpoint, linux_nat_pass_signals)
11040 (linux_nat_create_inferior, linux_nat_attach, linux_nat_detach)
11041 (linux_nat_resume, linux_nat_stopped_by_watchpoint)
11042 (linux_nat_stopped_data_address)
11043 (linux_nat_stopped_by_sw_breakpoint)
11044 (linux_nat_supports_stopped_by_sw_breakpoint)
11045 (linux_nat_stopped_by_hw_breakpoint)
11046 (linux_nat_supports_stopped_by_hw_breakpoint, linux_nat_wait)
11047 (linux_nat_kill, linux_nat_mourn_inferior)
11048 (linux_nat_xfer_partial, linux_nat_thread_alive)
11049 (linux_nat_update_thread_list, linux_nat_pid_to_str)
11050 (linux_nat_thread_name, linux_child_pid_to_exec_file)
11051 (linux_child_static_tracepoint_markers_by_strid)
11052 (linux_nat_is_async_p, linux_nat_can_async_p)
11053 (linux_nat_supports_non_stop, linux_nat_always_non_stop_p)
11054 (linux_nat_supports_multi_process)
11055 (linux_nat_supports_disable_randomization, linux_nat_async)
11056 (linux_nat_stop, linux_nat_close, linux_nat_thread_address_space)
11057 (linux_nat_core_of_thread, linux_nat_filesystem_is_local)
11058 (linux_nat_fileio_open, linux_nat_fileio_readlink)
11059 (linux_nat_fileio_unlink, linux_nat_thread_events): Refactor as
11060 methods of linux_nat_target.
11061 (linux_nat_wait_1, linux_xfer_siginfo, linux_proc_xfer_partial)
11062 (linux_proc_xfer_spu, linux_nat_xfer_osdata): Remove target_ops
11063 parameter.
11064 (check_stopped_by_watchpoint): Adjust.
11065 (linux_xfer_partial): Delete.
11066 (linux_target_install_ops, linux_target, linux_nat_add_target):
11067 Delete.
11068 (linux_nat_target::linux_nat_target): New.
11069 * linux-nat.h: Include "inf-ptrace.h".
11070 (linux_nat_target): New.
11071 (linux_target, linux_target_install_ops, linux_nat_add_target):
11072 Delete function declarations.
11073 (linux_target): Declare global.
11074 * linux-thread-db.c (thread_db_target): New.
11075 (thread_db_target::thread_db_target): New.
11076 (thread_db_ops): Delete.
11077 (the_thread_db_target): New.
11078 (thread_db_detach, thread_db_wait, thread_db_mourn_inferior)
11079 (thread_db_update_thread_list, thread_db_pid_to_str)
11080 (thread_db_extra_thread_info)
11081 (thread_db_thread_handle_to_thread_info)
11082 (thread_db_get_thread_local_address, thread_db_get_ada_task_ptid)
11083 (thread_db_resume): Refactor as methods of thread_db_target.
11084 (init_thread_db_ops): Delete.
11085 (_initialize_thread_db): Remove reference to init_thread_db_ops.
11086 * x86-linux-nat.c: Don't include "linux-nat.h".
11087 (super_post_startup_inferior): Delete.
11088 (x86_linux_nat_target::~x86_linux_nat_target): New.
11089 (x86_linux_child_post_startup_inferior)
11090 (x86_linux_read_description, x86_linux_enable_btrace)
11091 (x86_linux_disable_btrace, x86_linux_teardown_btrace)
11092 (x86_linux_read_btrace, x86_linux_btrace_conf): Refactor as
11093 methods of x86_linux_nat_target.
11094 (x86_linux_create_target): Delete. Bits folded ...
11095 (x86_linux_add_target): ... here. Now takes a linux_nat_target
11096 pointer.
11097 * x86-linux-nat.h: Include "linux-nat.h" and "x86-nat.h".
11098 (x86_linux_nat_target): New class.
11099 (x86_linux_create_target): Delete.
11100 (x86_linux_add_target): Now takes a linux_nat_target pointer.
11101 * x86-nat.c (x86_insert_watchpoint, x86_remove_watchpoint)
11102 (x86_region_ok_for_watchpoint, x86_stopped_data_address)
11103 (x86_stopped_by_watchpoint, x86_insert_hw_breakpoint)
11104 (x86_remove_hw_breakpoint, x86_can_use_hw_breakpoint)
11105 (x86_stopped_by_hw_breakpoint): Remove target_ops parameter and
11106 make extern.
11107 (x86_use_watchpoints): Delete.
11108 * x86-nat.h: Include "breakpoint.h" and "target.h".
11109 (x86_use_watchpoints): Delete.
11110 (x86_can_use_hw_breakpoint, x86_region_ok_for_hw_watchpoint)
11111 (x86_stopped_by_watchpoint, x86_stopped_data_address)
11112 (x86_insert_watchpoint, x86_remove_watchpoint)
11113 (x86_insert_hw_breakpoint, x86_remove_hw_breakpoint)
11114 (x86_stopped_by_hw_breakpoint): New declarations.
11115 (x86_nat_target): New template class.
11116
11117 * ppc-linux-nat.c (ppc_linux_nat_target): New class.
11118 (the_ppc_linux_nat_target): New.
11119 (ppc_linux_fetch_inferior_registers)
11120 (ppc_linux_can_use_hw_breakpoint)
11121 (ppc_linux_region_ok_for_hw_watchpoint)
11122 (ppc_linux_ranged_break_num_registers)
11123 (ppc_linux_insert_hw_breakpoint, ppc_linux_remove_hw_breakpoint)
11124 (ppc_linux_insert_mask_watchpoint)
11125 (ppc_linux_remove_mask_watchpoint)
11126 (ppc_linux_can_accel_watchpoint_condition)
11127 (ppc_linux_insert_watchpoint, ppc_linux_remove_watchpoint)
11128 (ppc_linux_stopped_data_address, ppc_linux_stopped_by_watchpoint)
11129 (ppc_linux_watchpoint_addr_within_range)
11130 (ppc_linux_masked_watch_num_registers)
11131 (ppc_linux_store_inferior_registers, ppc_linux_auxv_parse)
11132 (ppc_linux_read_description): Refactor as methods of
11133 ppc_linux_nat_target.
11134 (_initialize_ppc_linux_nat): Adjust. Set linux_target.
11135
11136 * procfs.c (procfs_xfer_partial): Delete forward declaration.
11137 (procfs_target): New class.
11138 (the_procfs_target): New.
11139 (procfs_target): Delete function.
11140 (procfs_auxv_parse, procfs_attach, procfs_detach)
11141 (procfs_fetch_registers, procfs_store_registers, procfs_wait)
11142 (procfs_xfer_partial, procfs_resume, procfs_pass_signals)
11143 (procfs_files_info, procfs_kill_inferior, procfs_mourn_inferior)
11144 (procfs_create_inferior, procfs_update_thread_list)
11145 (procfs_thread_alive, procfs_pid_to_str)
11146 (procfs_can_use_hw_breakpoint, procfs_stopped_by_watchpoint)
11147 (procfs_stopped_data_address, procfs_insert_watchpoint)
11148 (procfs_remove_watchpoint, procfs_region_ok_for_hw_watchpoint)
11149 (proc_find_memory_regions, procfs_info_proc)
11150 (procfs_make_note_section): Refactor as methods of procfs_target.
11151 (_initialize_procfs): Adjust.
11152 * sol-thread.c (sol_thread_target): New class.
11153 (sol_thread_ops): Now a sol_thread_target.
11154 (sol_thread_detach, sol_thread_resume, sol_thread_wait)
11155 (sol_thread_fetch_registers, sol_thread_store_registers)
11156 (sol_thread_xfer_partial, sol_thread_mourn_inferior)
11157 (sol_thread_alive, solaris_pid_to_str, sol_update_thread_list)
11158 (sol_get_ada_task_ptid): Refactor as methods of sol_thread_target.
11159 (init_sol_thread_ops): Delete.
11160 (_initialize_sol_thread): Adjust. Remove references to
11161 init_sol_thread_ops and complete_target_initialization.
11162
11163 * windows-nat.c (windows_nat_target): New class.
11164 (windows_fetch_inferior_registers)
11165 (windows_store_inferior_registers, windows_resume, windows_wait)
11166 (windows_attach, windows_detach, windows_pid_to_exec_file)
11167 (windows_files_info, windows_create_inferior)
11168 (windows_mourn_inferior, windows_interrupt, windows_kill_inferior)
11169 (windows_close, windows_pid_to_str, windows_xfer_partial)
11170 (windows_get_tib_address, windows_get_ada_task_ptid)
11171 (windows_thread_name, windows_thread_alive): Refactor as
11172 windows_nat_target methods.
11173 (do_initial_windows_stuff): Adjust.
11174 (windows_target): Delete function.
11175 (_initialize_windows_nat): Adjust.
11176
11177 * darwin-nat.c (darwin_resume, darwin_wait_to, darwin_interrupt)
11178 (darwin_mourn_inferior, darwin_kill_inferior)
11179 (darwin_create_inferior, darwin_attach, darwin_detach)
11180 (darwin_pid_to_str, darwin_thread_alive, darwin_xfer_partial)
11181 (darwin_pid_to_exec_file, darwin_get_ada_task_ptid)
11182 (darwin_supports_multi_process): Refactor as darwin_nat_target
11183 methods.
11184 (darwin_resume_to, darwin_files_info): Delete.
11185 (_initialize_darwin_inferior): Rename to ...
11186 (_initialize_darwin_nat): ... this. Adjust to C++ification.
11187 * darwin-nat.h: Include "inf-child.h".
11188 (darwin_nat_target): New class.
11189 (darwin_complete_target): Delete.
11190 * i386-darwin-nat.c (i386_darwin_nat_target): New class.
11191 (darwin_target): New.
11192 (i386_darwin_fetch_inferior_registers)
11193 (i386_darwin_store_inferior_registers): Refactor as methods of
11194 darwin_nat_target.
11195 (darwin_complete_target): Delete, with ...
11196 (_initialize_i386_darwin_nat): ... bits factored out here.
11197
11198 * alpha-linux-nat.c (alpha_linux_nat_target): New class.
11199 (the_alpha_linux_nat_target): New.
11200 (alpha_linux_register_u_offset): Refactor as
11201 alpha_linux_nat_target method.
11202 (_initialize_alpha_linux_nat): Adjust.
11203 * linux-nat-trad.c (inf_ptrace_register_u_offset): Delete.
11204 (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
11205 (inf_ptrace_store_register, inf_ptrace_store_registers): Refact as
11206 methods of linux_nat_trad_target.
11207 (linux_trad_target): Delete.
11208 * linux-nat-trad.h (linux_trad_target): Delete function.
11209 (linux_nat_trad_target): New class.
11210 * mips-linux-nat.c (mips_linux_nat_target): New class.
11211 (super_fetch_registers, super_store_registers, super_close):
11212 Delete.
11213 (the_mips_linux_nat_target): New.
11214 (mips64_linux_regsets_fetch_registers)
11215 (mips64_linux_regsets_store_registers)
11216 (mips64_linux_fetch_registers, mips64_linux_store_registers)
11217 (mips_linux_register_u_offset, mips_linux_read_description)
11218 (mips_linux_can_use_hw_breakpoint)
11219 (mips_linux_stopped_by_watchpoint)
11220 (mips_linux_stopped_data_address)
11221 (mips_linux_region_ok_for_hw_watchpoint)
11222 (mips_linux_insert_watchpoint, mips_linux_remove_watchpoint)
11223 (mips_linux_close): Refactor as methods of mips_linux_nat.
11224 (_initialize_mips_linux_nat): Adjust to C++ification.
11225
11226 * aix-thread.c (aix_thread_target): New class.
11227 (aix_thread_ops): Now an aix_thread_target.
11228 (aix_thread_detach, aix_thread_resume, aix_thread_wait)
11229 (aix_thread_fetch_registers, aix_thread_store_registers)
11230 (aix_thread_xfer_partial, aix_thread_mourn_inferior)
11231 (aix_thread_thread_alive, aix_thread_pid_to_str)
11232 (aix_thread_extra_thread_info, aix_thread_get_ada_task_ptid):
11233 Refactor as methods of aix_thread_target.
11234 (init_aix_thread_ops): Delete.
11235 (_initialize_aix_thread): Remove references to init_aix_thread_ops
11236 and complete_target_initialization.
11237 * rs6000-nat.c (rs6000_xfer_shared_libraries): Delete.
11238 (rs6000_nat_target): New class.
11239 (the_rs6000_nat_target): New.
11240 (rs6000_fetch_inferior_registers, rs6000_store_inferior_registers)
11241 (rs6000_xfer_partial, rs6000_wait, rs6000_create_inferior)
11242 (rs6000_xfer_shared_libraries): Refactor as rs6000_nat_target methods.
11243 (super_create_inferior): Delete.
11244 (_initialize_rs6000_nat): Adjust to C++ification.
11245
11246 * arm-linux-nat.c (arm_linux_nat_target): New class.
11247 (the_arm_linux_nat_target): New.
11248 (arm_linux_fetch_inferior_registers)
11249 (arm_linux_store_inferior_registers, arm_linux_read_description)
11250 (arm_linux_can_use_hw_breakpoint, arm_linux_insert_hw_breakpoint)
11251 (arm_linux_remove_hw_breakpoint)
11252 (arm_linux_region_ok_for_hw_watchpoint)
11253 (arm_linux_insert_watchpoint, arm_linux_remove_watchpoint)
11254 (arm_linux_stopped_data_address, arm_linux_stopped_by_watchpoint)
11255 (arm_linux_watchpoint_addr_within_range): Refactor as methods of
11256 arm_linux_nat_target.
11257 (_initialize_arm_linux_nat): Adjust to C++ification.
11258
11259 * aarch64-linux-nat.c (aarch64_linux_nat_target): New class.
11260 (the_aarch64_linux_nat_target): New.
11261 (aarch64_linux_fetch_inferior_registers)
11262 (aarch64_linux_store_inferior_registers)
11263 (aarch64_linux_child_post_startup_inferior)
11264 (aarch64_linux_read_description)
11265 (aarch64_linux_can_use_hw_breakpoint)
11266 (aarch64_linux_insert_hw_breakpoint)
11267 (aarch64_linux_remove_hw_breakpoint)
11268 (aarch64_linux_insert_watchpoint, aarch64_linux_remove_watchpoint)
11269 (aarch64_linux_region_ok_for_hw_watchpoint)
11270 (aarch64_linux_stopped_data_address)
11271 (aarch64_linux_stopped_by_watchpoint)
11272 (aarch64_linux_watchpoint_addr_within_range)
11273 (aarch64_linux_can_do_single_step): Refactor as methods of
11274 aarch64_linux_nat_target.
11275 (super_post_startup_inferior): Delete.
11276 (_initialize_aarch64_linux_nat): Adjust to C++ification.
11277
11278 * hppa-linux-nat.c (hppa_linux_nat_target): New class.
11279 (the_hppa_linux_nat_target): New.
11280 (hppa_linux_fetch_inferior_registers)
11281 (hppa_linux_store_inferior_registers): Refactor as methods of
11282 hppa_linux_nat_target.
11283 (_initialize_hppa_linux_nat): Adjust to C++ification.
11284
11285 * ia64-linux-nat.c (ia64_linux_nat_target): New class.
11286 (the_ia64_linux_nat_target): New.
11287 (ia64_linux_insert_watchpoint, ia64_linux_remove_watchpoint)
11288 (ia64_linux_stopped_data_address)
11289 (ia64_linux_stopped_by_watchpoint, ia64_linux_fetch_registers)
11290 (ia64_linux_store_registers, ia64_linux_xfer_partial): Refactor as
11291 ia64_linux_nat_target methods.
11292 (super_xfer_partial): Delete.
11293 (_initialize_ia64_linux_nat): Adjust to C++ification.
11294
11295 * m32r-linux-nat.c (m32r_linux_nat_target): New class.
11296 (the_m32r_linux_nat_target): New.
11297 (m32r_linux_fetch_inferior_registers)
11298 (m32r_linux_store_inferior_registers): Refactor as
11299 m32r_linux_nat_target methods.
11300 (_initialize_m32r_linux_nat): Adjust to C++ification.
11301
11302 * m68k-linux-nat.c (m68k_linux_nat_target): New class.
11303 (the_m68k_linux_nat_target): New.
11304 (m68k_linux_fetch_inferior_registers)
11305 (m68k_linux_store_inferior_registers): Refactor as
11306 m68k_linux_nat_target methods.
11307 (_initialize_m68k_linux_nat): Adjust to C++ification.
11308
11309 * s390-linux-nat.c (s390_linux_nat_target): New class.
11310 (the_s390_linux_nat_target): New.
11311 (s390_linux_fetch_inferior_registers)
11312 (s390_linux_store_inferior_registers, s390_stopped_by_watchpoint)
11313 (s390_insert_watchpoint, s390_remove_watchpoint)
11314 (s390_can_use_hw_breakpoint, s390_insert_hw_breakpoint)
11315 (s390_remove_hw_breakpoint, s390_region_ok_for_hw_watchpoint)
11316 (s390_auxv_parse, s390_read_description): Refactor as methods of
11317 s390_linux_nat_target.
11318 (_initialize_s390_nat): Adjust to C++ification.
11319
11320 * sparc-linux-nat.c (sparc_linux_nat_target): New class.
11321 (the_sparc_linux_nat_target): New.
11322 (_initialize_sparc_linux_nat): Adjust to C++ification.
11323 * sparc-nat.c (sparc_fetch_inferior_registers)
11324 (sparc_store_inferior_registers): Remove target_ops parameter.
11325 * sparc-nat.h (sparc_fetch_inferior_registers)
11326 (sparc_store_inferior_registers): Remove target_ops parameter.
11327 * sparc64-linux-nat.c (sparc64_linux_nat_target): New class.
11328 (the_sparc64_linux_nat_target): New.
11329 (_initialize_sparc64_linux_nat): Adjust to C++ification.
11330
11331 * spu-linux-nat.c (spu_linux_nat_target): New class.
11332 (the_spu_linux_nat_target): New.
11333 (spu_child_post_startup_inferior, spu_child_post_attach)
11334 (spu_child_wait, spu_fetch_inferior_registers)
11335 (spu_store_inferior_registers, spu_xfer_partial)
11336 (spu_can_use_hw_breakpoint): Refactor as spu_linux_nat_target
11337 methods.
11338 (_initialize_spu_nat): Adjust to C++ification.
11339
11340 * tilegx-linux-nat.c (tilegx_linux_nat_target): New class.
11341 (the_tilegx_linux_nat_target): New.
11342 (fetch_inferior_registers, store_inferior_registers):
11343 Refactor as methods.
11344 (_initialize_tile_linux_nat): Adjust to C++ification.
11345
11346 * xtensa-linux-nat.c (xtensa_linux_nat_target): New class.
11347 (the_xtensa_linux_nat_target): New.
11348 (xtensa_linux_fetch_inferior_registers)
11349 (xtensa_linux_store_inferior_registers): Refactor as
11350 xtensa_linux_nat_target methods.
11351 (_initialize_xtensa_linux_nat): Adjust to C++ification.
11352
11353 * fbsd-nat.c (USE_SIGTRAP_SIGINFO): Delete.
11354 (fbsd_pid_to_exec_file, fbsd_find_memory_regions)
11355 (fbsd_find_memory_regions, fbsd_info_proc, fbsd_xfer_partial)
11356 (fbsd_thread_alive, fbsd_pid_to_str, fbsd_thread_name)
11357 (fbsd_update_thread_list, fbsd_resume, fbsd_wait)
11358 (fbsd_stopped_by_sw_breakpoint)
11359 (fbsd_supports_stopped_by_sw_breakpoint, fbsd_follow_fork)
11360 (fbsd_insert_fork_catchpoint, fbsd_remove_fork_catchpoint)
11361 (fbsd_insert_vfork_catchpoint, fbsd_remove_vfork_catchpoint)
11362 (fbsd_post_startup_inferior, fbsd_post_attach)
11363 (fbsd_insert_exec_catchpoint, fbsd_remove_exec_catchpoint)
11364 (fbsd_set_syscall_catchpoint)
11365 (super_xfer_partial, super_resume, super_wait)
11366 (fbsd_supports_stopped_by_hw_breakpoint): Delete.
11367 (fbsd_handle_debug_trap): Remove target_ops parameter.
11368 (fbsd_nat_add_target): Delete.
11369 * fbsd-nat.h: Include "inf-ptrace.h".
11370 (fbsd_nat_add_target): Delete.
11371 (USE_SIGTRAP_SIGINFO): Define.
11372 (fbsd_nat_target): New class.
11373
11374 * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers)
11375 (amd64bsd_store_inferior_registers): Remove target_ops parameter.
11376 (amd64bsd_target): Delete.
11377 * amd64-bsd-nat.h: New file.
11378 * amd64-fbsd-nat.c: Include "amd64-bsd-nat.h" instead of
11379 "x86-bsd-nat.h".
11380 (amd64_fbsd_nat_target): New class.
11381 (the_amd64_fbsd_nat_target): New.
11382 (amd64fbsd_read_description): Refactor as method of
11383 amd64_fbsd_nat_target.
11384 (amd64_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
11385 (_initialize_amd64fbsd_nat): Adjust to C++ification.
11386 * amd64-nat.h (amd64bsd_target): Delete function declaration.
11387 * i386-bsd-nat.c (i386bsd_fetch_inferior_registers)
11388 (i386bsd_store_inferior_registers): Remove target_ops parameter.
11389 (i386bsd_target): Delete.
11390 * i386-bsd-nat.h (i386bsd_target): Delete function declaration.
11391 (i386bsd_fetch_inferior_registers)
11392 (i386bsd_store_inferior_registers): Declare.
11393 (i386_bsd_nat_target): New class.
11394 * i386-fbsd-nat.c (i386_fbsd_nat_target): New class.
11395 (the_i386_fbsd_nat_target): New.
11396 (i386fbsd_resume, i386fbsd_read_description): Refactor as
11397 i386_fbsd_nat_target methods.
11398 (i386_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
11399 (_initialize_i386fbsd_nat): Adjust to C++ification.
11400 * x86-bsd-nat.c (super_mourn_inferior): Delete.
11401 (x86bsd_mourn_inferior, x86bsd_target): Delete.
11402 (_initialize_x86_bsd_nat): Adjust to C++ification.
11403 * x86-bsd-nat.h: Include "x86-nat.h".
11404 (x86bsd_target): Delete declaration.
11405 (x86bsd_nat_target): New class.
11406
11407 * aarch64-fbsd-nat.c (aarch64_fbsd_nat_target): New class.
11408 (the_aarch64_fbsd_nat_target): New.
11409 (aarch64_fbsd_fetch_inferior_registers)
11410 (aarch64_fbsd_store_inferior_registers): Refactor as methods of
11411 aarch64_fbsd_nat_target.
11412 (_initialize_aarch64_fbsd_nat): Adjust to C++ification.
11413 * alpha-bsd-nat.c (alpha_bsd_nat_target): New class.
11414 (the_alpha_bsd_nat_target): New.
11415 (alphabsd_fetch_inferior_registers)
11416 (alphabsd_store_inferior_registers): Refactor as
11417 alpha_bsd_nat_target methods.
11418 (_initialize_alphabsd_nat): Refactor as methods of
11419 alpha_bsd_nat_target.
11420 * amd64-nbsd-nat.c: Include "amd64-bsd-nat.h".
11421 (the_amd64_nbsd_nat_target): New.
11422 (_initialize_amd64nbsd_nat): Adjust to C++ification.
11423 * amd64-obsd-nat.c: Include "amd64-bsd-nat.h".
11424 (the_amd64_obsd_nat_target): New.
11425 (_initialize_amd64obsd_nat): Adjust to C++ification.
11426 * arm-fbsd-nat.c (arm_fbsd_nat_target): New.
11427 (the_arm_fbsd_nat_target): New.
11428 (arm_fbsd_fetch_inferior_registers)
11429 (arm_fbsd_store_inferior_registers, arm_fbsd_read_description):
11430 (_initialize_arm_fbsd_nat): Refactor as methods of
11431 arm_fbsd_nat_target.
11432 (_initialize_arm_fbsd_nat): Adjust to C++ification.
11433 * arm-nbsd-nat.c (arm_netbsd_nat_target): New class.
11434 (the_arm_netbsd_nat_target): New.
11435 (armnbsd_fetch_registers, armnbsd_store_registers): Refactor as
11436 arm_netbsd_nat_target.
11437 (_initialize_arm_netbsd_nat): Adjust to C++ification.
11438 * hppa-nbsd-nat.c (hppa_nbsd_nat_target): New class.
11439 (the_hppa_nbsd_nat_target): New.
11440 (hppanbsd_fetch_registers, hppanbsd_store_registers): Refactor as
11441 hppa_nbsd_nat_target methods.
11442 (_initialize_hppanbsd_nat): Adjust to C++ification.
11443 * hppa-obsd-nat.c (hppa_obsd_nat_target): New class.
11444 (the_hppa_obsd_nat_target): New.
11445 (hppaobsd_fetch_registers, hppaobsd_store_registers): Refactor as
11446 methods of hppa_obsd_nat_target.
11447 (_initialize_hppaobsd_nat): Adjust to C++ification. Use
11448 add_target.
11449 * i386-nbsd-nat.c (the_i386_nbsd_nat_target): New.
11450 (_initialize_i386nbsd_nat): Adjust to C++ification. Use
11451 add_target.
11452 * i386-obsd-nat.c (the_i386_obsd_nat_target): New.
11453 (_initialize_i386obsd_nat): Use add_target.
11454 * m68k-bsd-nat.c (m68k_bsd_nat_target): New class.
11455 (the_m68k_bsd_nat_target): New.
11456 (m68kbsd_fetch_inferior_registers)
11457 (m68kbsd_store_inferior_registers): Refactor as methods of
11458 m68k_bsd_nat_target.
11459 (_initialize_m68kbsd_nat): Adjust to C++ification.
11460 * mips-fbsd-nat.c (mips_fbsd_nat_target): New class.
11461 (the_mips_fbsd_nat_target): New.
11462 (mips_fbsd_fetch_inferior_registers)
11463 (mips_fbsd_store_inferior_registers): Refactor as methods of
11464 mips_fbsd_nat_target.
11465 (_initialize_mips_fbsd_nat): Adjust to C++ification. Use
11466 add_target.
11467 * mips-nbsd-nat.c (mips_nbsd_nat_target): New class.
11468 (the_mips_nbsd_nat_target): New.
11469 (mipsnbsd_fetch_inferior_registers)
11470 (mipsnbsd_store_inferior_registers): Refactor as methods of
11471 mips_nbsd_nat_target.
11472 (_initialize_mipsnbsd_nat): Adjust to C++ification.
11473 * mips64-obsd-nat.c (mips64_obsd_nat_target): New class.
11474 (the_mips64_obsd_nat_target): New.
11475 (mips64obsd_fetch_inferior_registers)
11476 (mips64obsd_store_inferior_registers): Refactor as methods of
11477 mips64_obsd_nat_target.
11478 (_initialize_mips64obsd_nat): Adjust to C++ification. Use
11479 add_target.
11480 * nbsd-nat.c (nbsd_pid_to_exec_file): Refactor as method of
11481 nbsd_nat_target.
11482 * nbsd-nat.h: Include "inf-ptrace.h".
11483 (nbsd_nat_target): New class.
11484 * obsd-nat.c (obsd_pid_to_str, obsd_update_thread_list)
11485 (obsd_wait): Refactor as methods of obsd_nat_target.
11486 (obsd_add_target): Delete.
11487 * obsd-nat.h: Include "inf-ptrace.h".
11488 (obsd_nat_target): New class.
11489 * ppc-fbsd-nat.c (ppc_fbsd_nat_target): New class.
11490 (the_ppc_fbsd_nat_target): New.
11491 (ppcfbsd_fetch_inferior_registers)
11492 (ppcfbsd_store_inferior_registers): Refactor as methods of
11493 ppc_fbsd_nat_target.
11494 (_initialize_ppcfbsd_nat): Adjust to C++ification. Use
11495 add_target.
11496 * ppc-nbsd-nat.c (ppc_nbsd_nat_target): New class.
11497 (the_ppc_nbsd_nat_target): New.
11498 (ppcnbsd_fetch_inferior_registers)
11499 (ppcnbsd_store_inferior_registers): Refactor as methods of
11500 ppc_nbsd_nat_target.
11501 (_initialize_ppcnbsd_nat): Adjust to C++ification.
11502 * ppc-obsd-nat.c (ppc_obsd_nat_target): New class.
11503 (the_ppc_obsd_nat_target): New.
11504 (ppcobsd_fetch_registers, ppcobsd_store_registers): Refactor as
11505 methods of ppc_obsd_nat_target.
11506 (_initialize_ppcobsd_nat): Adjust to C++ification. Use
11507 add_target.
11508 * sh-nbsd-nat.c (sh_nbsd_nat_target): New class.
11509 (the_sh_nbsd_nat_target): New.
11510 (shnbsd_fetch_inferior_registers)
11511 (shnbsd_store_inferior_registers): Refactor as methods of
11512 sh_nbsd_nat_target.
11513 (_initialize_shnbsd_nat): Adjust to C++ification.
11514 * sparc-nat.c (sparc_xfer_wcookie): Make extern.
11515 (inf_ptrace_xfer_partial): Delete.
11516 (sparc_xfer_partial, sparc_target): Delete.
11517 * sparc-nat.h (sparc_fetch_inferior_registers)
11518 (sparc_store_inferior_registers, sparc_xfer_wcookie): Declare.
11519 (sparc_target): Delete function declaration.
11520 (sparc_target): New template class.
11521 * sparc-nbsd-nat.c (the_sparc_nbsd_nat_target): New.
11522 (_initialize_sparcnbsd_nat): Adjust to C++ification.
11523 * sparc64-fbsd-nat.c (the_sparc64_fbsd_nat_target): New.
11524 (_initialize_sparc64fbsd_nat): Adjust to C++ification. Use
11525 add_target.
11526 * sparc64-nbsd-nat.c (the_sparc64_nbsd_nat_target): New.
11527 (_initialize_sparc64nbsd_nat): Adjust to C++ification.
11528 * sparc64-obsd-nat.c (the_sparc64_obsd_nat_target): New.
11529 (_initialize_sparc64obsd_nat): Adjust to C++ification. Use
11530 add_target.
11531 * vax-bsd-nat.c (vax_bsd_nat_target): New class.
11532 (the_vax_bsd_nat_target): New.
11533 (vaxbsd_fetch_inferior_registers)
11534 (vaxbsd_store_inferior_registers): Refactor as vax_bsd_nat_target
11535 methods.
11536 (_initialize_vaxbsd_nat): Adjust to C++ification.
11537
11538 * bsd-kvm.c (bsd_kvm_target): New class.
11539 (bsd_kvm_ops): Now a bsd_kvm_target.
11540 (bsd_kvm_open, bsd_kvm_close, bsd_kvm_xfer_partial)
11541 (bsd_kvm_files_info, bsd_kvm_fetch_registers)
11542 (bsd_kvm_thread_alive, bsd_kvm_pid_to_str): Refactor as methods of
11543 bsd_kvm_target.
11544 (bsd_kvm_return_one): Delete.
11545 (bsd_kvm_add_target): Adjust to C++ification.
11546
11547 * nto-procfs.c (nto_procfs_target, nto_procfs_target_native)
11548 (nto_procfs_target_procfs): New classes.
11549 (procfs_open_1, procfs_thread_alive, procfs_update_thread_list)
11550 (procfs_files_info, procfs_pid_to_exec_file, procfs_attach)
11551 (procfs_post_attach, procfs_wait, procfs_fetch_registers)
11552 (procfs_xfer_partial, procfs_detach, procfs_insert_breakpoint)
11553 (procfs_remove_breakpoint, procfs_insert_hw_breakpoint)
11554 (procfs_remove_hw_breakpoint, procfs_resume)
11555 (procfs_mourn_inferior, procfs_create_inferior, procfs_interrupt)
11556 (procfs_kill_inferior, procfs_store_registers)
11557 (procfs_pass_signals, procfs_pid_to_str, procfs_can_run): Refactor
11558 as methods of nto_procfs_target.
11559 (nto_procfs_ops): Now an nto_procfs_target_procfs.
11560 (nto_native_ops): Delete.
11561 (procfs_open, procfs_native_open): Delete.
11562 (nto_native_ops): Now an nto_procfs_target_native.
11563 (init_procfs_targets): Adjust to C++ification.
11564 (procfs_can_use_hw_breakpoint, procfs_remove_hw_watchpoint)
11565 (procfs_insert_hw_watchpoint, procfs_stopped_by_watchpoint):
11566 Refactor as methods of nto_procfs_target.
11567
11568 * go32-nat.c (go32_nat_target): New class.
11569 (the_go32_nat_target): New.
11570 (go32_attach, go32_resume, go32_wait, go32_fetch_registers)
11571 (go32_store_registers, go32_xfer_partial, go32_files_info)
11572 (go32_kill_inferior, go32_create_inferior, go32_mourn_inferior)
11573 (go32_terminal_init, go32_terminal_info, go32_terminal_inferior)
11574 (go32_terminal_ours, go32_pass_ctrlc, go32_thread_alive)
11575 (go32_pid_to_str): Refactor as methods of go32_nat_target.
11576 (go32_target): Delete.
11577 (_initialize_go32_nat): Adjust to C++ification.
11578
11579 * gnu-nat.c (gnu_wait, gnu_resume, gnu_kill_inferior)
11580 (gnu_mourn_inferior, gnu_create_inferior, gnu_attach, gnu_detach)
11581 (gnu_stop, gnu_thread_alive, gnu_xfer_partial)
11582 (gnu_find_memory_regions, gnu_pid_to_str): Refactor as methods of
11583 gnu_nat_target.
11584 (gnu_target): Delete.
11585 * gnu-nat.h (gnu_target): Delete.
11586 (gnu_nat_target): New class.
11587 * i386-gnu-nat.c (gnu_base_target): New.
11588 (i386_gnu_nat_target): New class.
11589 (the_i386_gnu_nat_target): New.
11590 (_initialize_i386gnu_nat): Adjust to C++ification.
11591
11592 2018-05-02 Pedro Alves <palves@redhat.com>
11593
11594 * bfd-target.c (target_bfd_xclose): Rename to ...
11595 (target_bfd_close): ... this.
11596 (target_bfd_reopen): Adjust.
11597 * target.c (target_close): Remove references to to_xclose.
11598 * target.h (target_ops::to_xclose): Delete.
11599 (target_ops::to_close): Update comments.
11600
11601 2018-05-02 Pedro Alves <palves@redhat.com>
11602
11603 * alpha-linux-nat.c: Include "linux-nat-trad.h" instead of
11604 "linux-nat.h".
11605 * configure.nat (alpha-linux, linux-mips): Add linux-nat-trad.o.
11606 * inf-ptrace.c (inf_ptrace_register_u_offset)
11607 (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
11608 (inf_ptrace_store_register, inf_ptrace_store_registers)
11609 (inf_ptrace_trad_target): Move to ...
11610 * linux-nat-trad.c: ... this new file.
11611 * linux-nat-trad.h: New file.
11612 * linux-nat.c (linux_target_install_ops): Make extern.
11613 (linux_trad_target): Delete.
11614 * linux-nat.h (linux_trad_target): Delete declaration.
11615 (linux_target_install_ops): Declare.
11616 * mips-linux-nat.c: Include "linux-nat-trad.h" instead of
11617 "linux-nat.h".
11618
11619 2018-05-02 Pedro Alves <palves@redhat.com>
11620
11621 * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
11622 procfs_target/add_target here.
11623 * procfs.c (procfs_target): Make static.
11624 (_initialize_procfs): Call add_target here.
11625 * procfs.h (struct target_ops): Remove forward declaration.
11626 (procfs_target): Remove declaration.
11627 * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Delete.
11628
11629 2018-05-02 Pedro Alves <palves@redhat.com>
11630
11631 * procfs.c (procfs_stopped_by_watchpoint)
11632 (procfs_insert_watchpoint, procfs_remove_watchpoint)
11633 (procfs_region_ok_for_hw_watchpoint, procfs_stopped_data_address):
11634 Forward declare.
11635 (procfs_use_watchpoints): Delete, move contents...
11636 (procfs_target): ... here.
11637 * procfs.h (procfs_use_watchpoints): Delete declaration.
11638 * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
11639 procfs_use_watchpoints.
11640 * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Don't call
11641 procfs_use_watchpoints.
11642
11643 2018-05-02 Tom Tromey <tom@tromey.com>
11644
11645 PR python/20084:
11646 * python/python.c (gdbpy_parameter_value): Handle var_zuinteger
11647 and var_zuinteger_unlimited.
11648 * python/py-param.c (struct parm_constant): Add PARAM_ZUINTEGER
11649 and PARAM_ZUINTEGER_UNLIMITED.
11650 (set_parameter_value): Handle var_zuinteger and
11651 var_zuinteger_unlimited.
11652 (add_setshow_generic): Likewise.
11653 (parmpy_init): Likewise.
11654
11655 2018-04-28 Dan Robertson <danlrobertson89@gmail.com>
11656
11657 PR rust/23124
11658 * gdb/rust-exp.y (convert_params_to_types): Ensure that the params
11659 pointer is not null before dereferencing it.
11660
11661 2018-04-30 Tom Tromey <tom@tromey.com>
11662
11663 * darwin-nat-info.c (darwin_debug_regions_recurse): Remove use of
11664 is_mi_like_p.
11665
11666 2018-04-30 Tom Tromey <tom@tromey.com>
11667
11668 * breakpoint.c (mention): Remove use of is_mi_like_p.
11669 (print_mention_ranged_breakpoint): Likewise.
11670 * break-catch-throw.c (print_it_exception_catchpoint): Remove use
11671 of is_mi_like_p.
11672
11673 2018-04-30 Tom Tromey <tom@tromey.com>
11674
11675 * tracepoint.c (tvariables_info_1): Remove use of is_mi_like_p.
11676
11677 2018-04-30 Tom Tromey <tom@tromey.com>
11678
11679 * spu-tdep.c (info_spu_mailbox_list, info_spu_dma_cmdlist)
11680 (info_spu_event_command): Remove some uses of is_mi_like_p.
11681
11682 2018-04-30 Tom Tromey <tom@tromey.com>
11683
11684 * python/py-framefilter.c (py_print_single_arg)
11685 (enumerate_locals, py_print_args, py_print_frame): Remove some
11686 uses of is_mi_like_p.
11687
11688 2018-04-30 Tom Tromey <tom@tromey.com>
11689
11690 * ui-out.c: Update.
11691 * cli-out.h (cli_ui_out::do_is_mi_like_p): Update.
11692 * ui-out.h (ui_out::is_mi_like_p): Now const.
11693 (ui_out::do_is_mi_like_p): Now const.
11694 * mi/mi-out.h (mi_ui_out::do_is_mi_like_p): Update.
11695
11696 2018-04-30 Tom Tromey <tom@tromey.com>
11697
11698 * varobj.c (varobj_set_visualizer): Use new_reference.
11699 * python/python.c (gdbpy_decode_line): Use new_reference.
11700 * python/py-cmd.c (cmdpy_function, cmdpy_completer_helper): Use
11701 new_reference.
11702
11703 2018-04-30 Tom Tromey <tom@tromey.com>
11704
11705 * varobj.c (install_new_value): Use new_reference.
11706 * value.h (value_incref): Return void. Swap intro comment with
11707 value_decref.
11708 * value.c (set_value_parent): Use new_reference.
11709 (value_incref): Return void. Update intro comment.
11710 (release_value): Use new_reference.
11711 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Use new_reference.
11712
11713 2018-04-30 Tom Tromey <tom@tromey.com>
11714
11715 * symfile-mem.c (symbol_file_add_from_memory): Use new_reference.
11716 * gdb_bfd.h (new_bfd_ref): Remove.
11717 (gdb_bfd_open): Update comment.
11718 * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
11719 (gdb_bfd_openw, gdb_bfd_openr_iovec, gdb_bfd_record_inclusion)
11720 (gdb_bfd_fdopenr): Use new_reference.
11721 * exec.c (exec_file_attach): Use new_reference.
11722
11723 2018-04-30 Tom Tromey <tom@tromey.com>
11724
11725 * common/gdb_ref_ptr.h (ref_ptr::new_reference): New static
11726 method.
11727
11728 2018-04-30 Tom Tromey <tom@tromey.com>
11729
11730 * jit.c (jit_read_code_entry): Use type_align.
11731 * i386-tdep.c (i386_gdbarch_init): Don't call
11732 set_gdbarch_long_long_align_bit.
11733 * gdbarch.sh: Remove long_long_align_bit.
11734 * gdbarch.c, gdbarch.h: Rebuild.
11735 * arc-tdep.c (arc_type_align): New function.
11736 (arc_gdbarch_init): Use arc_type_align. Don't call
11737 set_gdbarch_long_long_align_bit.
11738
11739 2018-04-30 Tom Tromey <tom@tromey.com>
11740
11741 * rust-lang.c (rust_type_alignment): Remove.
11742 (rust_composite_type): Use type_align.
11743
11744 2018-04-30 Tom Tromey <tom@tromey.com>
11745
11746 * NEWS: Mention Type.align.
11747 * python/py-type.c (typy_get_alignof): New function.
11748 (type_object_getset): Add "alignof".
11749
11750 2018-04-30 Tom Tromey <tom@tromey.com>
11751
11752 PR exp/17095:
11753 * NEWS: Update.
11754 * std-operator.def (UNOP_ALIGNOF): New operator.
11755 * expprint.c (dump_subexp_body_standard) <case UNOP_ALIGNOF>:
11756 New.
11757 * eval.c (evaluate_subexp_standard) <case UNOP_ALIGNOF>: New.
11758 * c-lang.c (c_op_print_tab): Add alignof.
11759 * c-exp.y (ALIGNOF): New token.
11760 (exp): Add "ALIGNOF" production.
11761 (ident_tokens): Add _Alignof and alignof.
11762
11763 2018-04-30 Tom Tromey <tom@tromey.com>
11764
11765 * i386-tdep.c (i386_type_align): New function.
11766 (i386_gdbarch_init): Update.
11767 * gdbarch.sh (type_align): New method.
11768 * gdbarch.c, gdbarch.h: Rebuild.
11769 * arch-utils.h (default_type_align): Declare.
11770 * arch-utils.c (default_type_align): New function.
11771 * gdbtypes.h (TYPE_ALIGN_BITS): New define.
11772 (struct type) <align_log2>: New field.
11773 <instance_flags>: Now a bitfield.
11774 (TYPE_RAW_ALIGN): New macro.
11775 (type_align, type_raw_align, set_type_align): Declare.
11776 * gdbtypes.c (type_align, type_raw_align, set_type_align): New
11777 functions.
11778 * dwarf2read.c (quirk_rust_enum): Set type alignment.
11779 (get_alignment, maybe_set_alignment): New functions.
11780 (read_structure_type, read_enumeration_type, read_array_type)
11781 (read_set_type, read_tag_pointer_type, read_tag_reference_type)
11782 (read_subrange_type, read_base_type): Set type alignment.
11783
11784 2018-04-30 Simon Marchi <simon.marchi@ericsson.com>
11785
11786 * dwarf2read.c (read_index_from_section): Use bool.
11787
11788 2018-04-29 Fabian Groffen <grobian@gentoo.org>
11789
11790 PR gdb/22950
11791 * proc-events.c (init_syscall_table): Guard usage os SYS_uuidsys
11792 with #ifdef.
11793
11794 2018-04-29 John Reiser <jreiser@BitWagon.com>
11795
11796 PR build/22873
11797 * gdb/Makefile.in: (.c:.l, .c:.y): Write the target only in the
11798 last step, and do it atomically.
11799
11800 2018-04-27 Alexandre Oliva <aoliva@redhat.com>
11801
11802 * compile/compile-c-types.c (convert_int, convert_float):
11803 Update for C FE v1.
11804
11805 2018-04-27 Tom Tromey <tom@tromey.com>
11806
11807 PR rust/22545:
11808 * rust-lang.c (rust_inclusive_range_type_p): New function.
11809 (rust_range): Handle inclusive ranges.
11810 (rust_compute_range): Likewise.
11811 * rust-exp.y (struct rust_op) <inclusive>: New field.
11812 (DOTDOTEQ): New constant.
11813 (range_expr): Add "..=" productions.
11814 (operator_tokens): Add "..=" token.
11815 (ast_range): Add "inclusive" parameter.
11816 (convert_ast_to_expression) <case OP_RANGE>: Handle inclusive
11817 ranges.
11818 * parse.c (operator_length_standard) <case OP_RANGE>: Handle new
11819 bounds values.
11820 * expression.h (enum range_type) <NONE_BOUND_DEFAULT_EXCLUSIVE,
11821 LOW_BOUND_DEFAULT_EXCLUSIVE>: New constants.
11822 Update comments.
11823 * expprint.c (print_subexp_standard): Handle new bounds values.
11824 (dump_subexp_body_standard): Likewise.
11825
11826 2018-04-27 Tom Tromey <tom@tromey.com>
11827
11828 * configure: Rebuild.
11829 * warning.m4 (AM_GDB_WARNINGS): Add -Wsuggest-override.
11830 * dwarf2loc.c (class dwarf_evaluate_loc_desc): Use "override", not
11831 "OVERRIDE".
11832 (class symbol_needs_eval_context): Likewise.
11833 * dwarf2read.c (mock_mapped_index::symbol_name_count)
11834 (mock_mapped_index::symbol_name_at): Use "override". Remove
11835 "virtual".
11836 * dwarf2-frame.c (dwarf_expr_executor::get_addr_index): Use
11837 "override".
11838 (class dwarf_expr_executor): Use "override", not "OVERRIDE".
11839 * aarch64-tdep.c (instruction_reader::read): Use "override".
11840 (instruction_reader_test::read): Likewise.
11841 * arm-tdep.c (instruction_reader::read): Use "override".
11842 (instruction_reader_thumb::read): Likewise.
11843
11844 2018-04-26 Andrzej Kaczmarek <andrzej.kaczmarek@codecoup.pl>
11845
11846 PR remote/9665
11847 * remote.c (send_g_packet): Use putpkt/getpkt/packet_check_result
11848 instead of remote_send.
11849 (remote_send): Remove.
11850
11851 2018-04-26 Pedro Alves <palves@redhat.com>
11852
11853 * elfread.c (elf_gnu_ifunc_resolver_return_stop): Use
11854 find_function_start_sal instead of find_pc_line.
11855
11856 2018-04-26 Pedro Alves <palves@redhat.com>
11857
11858 * breakpoint.c (set_breakpoint_location_function): Handle
11859 mst_data_gnu_ifunc.
11860 * c-exp.y (variable production): Handle mst_data_gnu_ifunc.
11861 * elfread.c (elf_symtab_read): Give data symbols with
11862 BSF_GNU_INDIRECT_FUNCTION set mst_data_gnu_ifunc type.
11863 (elf_rel_plt_read): Update comment.
11864 * linespec.c (convert_linespec_to_sals): Handle
11865 mst_data_gnu_ifunc.
11866 (minsym_found): Handle mst_data_gnu_ifunc.
11867 * minsyms.c (msymbol_is_function, minimal_symbol_reader::record)
11868 (find_solib_trampoline_target): Handle mst_data_gnu_ifunc.
11869 * parse.c (find_minsym_type_and_address): Handle
11870 mst_data_gnu_ifunc.
11871 * symmisc.c (dump_msymbols): Handle mst_data_gnu_ifunc.
11872 * symtab.c (find_gnu_ifunc): Handle mst_data_gnu_ifunc.
11873 * symtab.h (minimal_symbol_type) <mst_text_gnu_ifunc>: Update
11874 comment.
11875 <mst_data_gnu_ifunc>: New enumerator.
11876
11877 2018-04-26 Pedro Alves <palves@redhat.com>
11878
11879 * minsyms.c (lookup_minimal_symbol_by_pc_section_1): Rename to ...
11880 (lookup_minimal_symbol_by_pc_section): ... this. Replace
11881 'want_trampoline' parameter by a lookup_msym_prefer parameter.
11882 Handle it.
11883 (lookup_minimal_symbol_by_pc_section): Delete old implementation.
11884 (lookup_minimal_symbol_by_pc): Adjust.
11885 (in_gnu_ifunc_stub): Prefer GNU ifunc symbols.
11886 (lookup_solib_trampoline_symbol_by_pc): Adjust.
11887 * minsyms.h (lookup_msym_prefer): New enum.
11888 (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
11889 parameter by a lookup_msym_prefer parameter.
11890
11891 2018-04-26 Pedro Alves <palves@redhat.com>
11892
11893 * elfread.c (elf_gnu_ifunc_record_cache): Check if the symbol name
11894 ends in "@plt" instead of looking at the symbol's section.
11895
11896 2018-04-26 Pedro Alves <palves@redhat.com>
11897
11898 * blockframe.c (cache_pc_function_is_gnu_ifunc): Delete. Remove
11899 all references.
11900 (find_pc_partial_function_gnu_ifunc): Rename to ...
11901 (find_pc_partial_function): ... this, and remove references to
11902 'is_gnu_ifunc_p'.
11903 (find_pc_partial_function): Delete old implementation.
11904 * symtab.h (find_pc_partial_function_gnu_ifunc): Delete.
11905
11906 2018-04-26 Pedro Alves <palves@redhat.com>
11907
11908 * linespec.c (struct bound_minimal_symbol_search_key): New.
11909 (convert_linespec_to_sals): Sort minimal symbols earlier. Don't
11910 skip first line if we found a GNU ifunc minimal symbol by name.
11911 (compare_msymbols): Change parameters to work with a destructured
11912 lhs minsym.
11913 (compare_msymbols_for_qsort, compare_msymbols_for_bsearch): New
11914 functions.
11915
11916 2018-04-26 Pedro Alves <palves@redhat.com>
11917
11918 * breakpoint.c (set_breakpoint_location_function): Don't resolve
11919 ifunc targets here. Instead, if we have an ifunc minsym, use its
11920 address/name.
11921 (add_location_to_breakpoint): Store the minsym and the objfile in
11922 the breakpoint location.
11923 * breakpoint.h (bp_location) <msymbol, objfile>: New fields.
11924 * linespec.c (minsym_found): Resolve GNU ifunc targets here.
11925 Record the minsym in the sal.
11926 * symtab.h (symtab_and_line) <msymbol>: New field.
11927
11928 2018-04-26 Pedro Alves <palves@redhat.com>
11929
11930 * elfread.c (elf_gnu_ifunc_resolve_by_got): Don't write to *ADDR_P
11931 unless we actually resolved the ifunc.
11932
11933 2018-04-26 Pedro Alves <palves@redhat.com>
11934
11935 * c-exp.y (variable production): Prefer ifunc minsyms over
11936 regular function symbols.
11937 * symtab.c (find_gnu_ifunc): New function.
11938 * minsyms.h (lookup_msym_prefer): New enum.
11939 (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
11940 parameter by a lookup_msym_prefer parameter.
11941 * symtab.h (find_gnu_ifunc): New declaration.
11942
11943 2018-04-26 Pedro Alves <palves@redhat.com>
11944
11945 * blockframe.c (find_gnu_ifunc_target_type): New function.
11946 (find_function_type): New.
11947 * eval.c (evaluate_var_msym_value): For GNU ifunc types, always
11948 return a value with a memory address.
11949 (eval_call): For calls to GNU ifunc functions, try to find the
11950 type of the target function from the type that the resolver
11951 returns.
11952 * gdbtypes.c (objfile_type): Don't install a return type for ifunc
11953 symbols.
11954 * infcall.c (find_function_return_type): Delete.
11955 (find_function_addr): Add 'function_type' parameter. For calls to
11956 GNU ifunc functions, try to find the type of the target function
11957 from the type that the resolver returns, and return it via
11958 FUNCTION_TYPE.
11959 (call_function_by_hand_dummy): Adjust to use the function type
11960 returned by find_function_addr.
11961 (find_function_addr): Add 'function_type' parameter and move
11962 description here.
11963 * symtab.h (find_function_type, find_gnu_ifunc_target_type): New
11964 declarations.
11965
11966 2018-04-26 Pedro Alves <palves@redhat.com>
11967
11968 * c-exp.y (variable production): Skip finding an alias for ifunc
11969 symbols.
11970
11971 2018-04-26 Pedro Alves <palves@redhat.com>
11972
11973 * elfread.c (elf_rel_plt_read): Look for relocations for .got.plt too.
11974
11975 2018-04-25 Pedro Alves <palves@redhat.com>
11976
11977 * infcmd.c (kill_command): Print the pid as string, not the whole
11978 thread's ptid. Add comment. s/has been killed/killed/ in output
11979 message.
11980 * remote.c (remote_detach_1): Print the pid as string, not the
11981 whole thread's ptid.
11982
11983 2018-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
11984 Sergio Durigan Junior <sergiodj@redhat.com>
11985 Pedro Alves <palves@redhat.com>
11986
11987 * infcmd.c (kill_command): Print message when inferior has
11988 been killed.
11989 * inferior.c (print_inferior_events): Remove 'static'. Set as
11990 '1'.
11991 (add_inferior): Improve message printed when
11992 'print_inferior_events' is on.
11993 (exit_inferior): Remove message printed when
11994 'print_inferior_events' is on.
11995 (detach_inferior): Improve message printed when
11996 'print_inferior_events' is on.
11997 (initialize_inferiors): Use 'add_inferior_silent' to set
11998 'current_inferior_'.
11999 * inferior.h (print_inferior_events): Declare here as
12000 'extern'.
12001 * infrun.c (follow_fork_inferior): Print '[Attaching...]' or
12002 '[Detaching...]' messages when 'print_inferior_events' is on.
12003 Use 'add_thread_silent' instead of 'add_thread'. Add '[' and ']'
12004 as prefix/suffix for messages. Remove periods. Fix erroneous
12005 'Detaching after fork from child...', replace it by '... from
12006 parent...'.
12007 (handle_vfork_child_exec_or_exit): Add '[' and ']' as
12008 prefix/suffix when printing 'Detaching...' messages. Print
12009 them when 'print_inferior_events' is on.
12010 * remote.c (remote_detach_1): Print message when detaching
12011 from inferior and '!is_fork_parent'.
12012
12013 2018-04-24 Tom Tromey <tom@tromey.com>
12014
12015 * cli-out.h: Reindent.
12016
12017 2018-04-24 Tom Tromey <tom@tromey.com>
12018
12019 * cli-out.c (cli_ui_out::out_field_fmt): Remove.
12020 (cli_ui_out::do_field_string): Use fputs_filtered.
12021 * cli-out.h (class cli_ui_out) <out_field_fmt>: Remove.
12022
12023 2018-04-23 Tom Tromey <tom@tromey.com>
12024
12025 * guile/scm-frame.c (gdbscm_frame_read_var): Use
12026 gdb::unique_xmalloc_ptr.
12027
12028 2018-04-23 Tom Tromey <tom@tromey.com>
12029
12030 * configure: Rebuild.
12031
12032 2018-04-22 Rajendra SY <rajendra.sy@gmail.com>
12033
12034 PR gdb/23095
12035 * gdb/testsuite/gdb.base/break-probes.exp: Pass shlib_load to
12036 prepare_for_testing. Set normal_bp to r_debug_state if target
12037 is bsd.
12038
12039 2018-04-21 Pedro Alves <palves@redhat.com>
12040 Rajendra SY <rajendra.sy@gmail.com>
12041
12042 * inf-ptrace.c (inf_ptrace_attach): Mark the thread as executing.
12043 * remote.c (extended_remote_attach): In all-stop mode, mark the
12044 thread as executing.
12045
12046 2018-04-19 Philippe Waroquiers <philippe.waroquiers@skynet.be>
12047
12048 * thread.c (thread_apply_all_command): Fix comment.
12049 (thread_command): Fix comment.
12050
12051 2018-04-10 Alan Hayward <alan.hayward@arm.com>
12052
12053 * common/tdesc.h (tdesc_create_feature): Remove xml filename
12054 parameter.
12055 * features/aarch64-core.c (create_feature_aarch64_core):
12056 Regenerate.
12057 * features/aarch64-fpu.c (create_feature_aarch64_fpu):
12058 Likewise.
12059 * features/i386/32bit-avx.c (create_feature_i386_32bit_avx):
12060 Likewise.
12061 * features/i386/32bit-avx512.c
12062 (create_feature_i386_32bit_avx512): Likewise.
12063 * features/i386/32bit-core.c (create_feature_i386_32bit_core):
12064 Likewise.
12065 * features/i386/32bit-linux.c (create_feature_i386_32bit_linux):
12066 Likewise.
12067 * features/i386/32bit-mpx.c (create_feature_i386_32bit_mpx):
12068 Likewise.
12069 * features/i386/32bit-pkeys.c (create_feature_i386_32bit_pkeys):
12070 Likewise.
12071 * features/i386/32bit-sse.c (create_feature_i386_32bit_sse):
12072 Likewise.
12073 * features/i386/64bit-avx.c (create_feature_i386_64bit_avx):
12074 Likewise.
12075 * features/i386/64bit-avx512.c
12076 (create_feature_i386_64bit_avx512): Likewise.
12077 * features/i386/64bit-core.c (create_feature_i386_64bit_core):
12078 Likewise.
12079 * features/i386/64bit-linux.c (create_feature_i386_64bit_linux):
12080 Likewise.
12081 * features/i386/64bit-mpx.c (create_feature_i386_64bit_mpx):
12082 Likewise.
12083 * features/i386/64bit-pkeys.c (create_feature_i386_64bit_pkeys):
12084 Likewise.
12085 * features/i386/64bit-segments.c
12086 (create_feature_i386_64bit_segments): Likewise.
12087 * features/i386/64bit-sse.c (create_feature_i386_64bit_sse):
12088 Likewise.
12089 * features/i386/x32-core.c
12090 (create_feature_i386_x32_core): Likewise.
12091 * features/tic6x-c6xp.c (create_feature_tic6x_c6xp): Likewise.
12092 * features/tic6x-core.c (create_feature_tic6x_core): Likewise.
12093 * features/tic6x-gp.c (create_feature_tic6x_gp): Likewise.
12094 * target-descriptions.c: In generated code, don't pass xml
12095 filename.
12096
12097 2018-04-18 Alan Hayward <alan.hayward@arm.com>
12098
12099 * common/tdesc.c (print_xml_feature::visit_pre): Add xml parsing.
12100 (print_xml_feature::visit_post): Likewise.
12101 (print_xml_feature::visit): Likewise.
12102 * common/tdesc.h (tdesc_get_features_xml): Use const tdesc.
12103 (print_xml_feature): Add new class.
12104 * regformats/regdat.sh: Null xmltarget on feature targets.
12105 * target-descriptions.c (struct target_desc): Add xmltarget.
12106 (maintenance_check_tdesc_xml_convert): Add unittest function.
12107 (tdesc_get_features_xml): Add function to get xml.
12108 (maintenance_check_xml_descriptions): Test xml generation.
12109 * xml-tdesc.c (string_read_description_xml): Add function.
12110 * xml-tdesc.h (string_read_description_xml): Add declaration.
12111
12112 2018-04-18 Alan Hayward <alan.hayward@arm.com>
12113
12114 * features/Makefile: Add feature marker to targets with new style
12115 target descriptions.
12116 * regformats/aarch64.dat: Regenerate.
12117 * regformats/i386/amd64-avx-avx512-linux.dat: Likewise.
12118 * regformats/i386/amd64-avx-linux.dat: Likewise.
12119 * regformats/i386/amd64-avx-mpx-avx512-pku-linux.dat: Likewise.
12120 * regformats/i386/amd64-avx-mpx-linux.dat: Likewise.
12121 * regformats/i386/amd64-linux.dat: Likewise.
12122 * regformats/i386/amd64-mpx-linux.dat: Likewise.
12123 * regformats/i386/amd64.dat: Likewise.
12124 * regformats/i386/i386-avx-avx512-linux.dat: Likewise.
12125 * regformats/i386/i386-avx-linux.dat: Likewise.
12126 * regformats/i386/i386-avx-mpx-avx512-pku-linux.dat: Likewise.
12127 * regformats/i386/i386-avx-mpx-linux.dat: Likewise.
12128 * regformats/i386/i386-linux.dat: Likewise.
12129 * regformats/i386/i386-mmx-linux.dat: Likewise.
12130 * regformats/i386/i386-mpx-linux.dat: Likewise.
12131 * regformats/i386/i386.dat: Likewise.
12132 * regformats/i386/x32-avx-avx512-linux.dat: Likewise.
12133 * regformats/i386/x32-avx-linux.dat: Likewise.
12134 * regformats/i386/x32-linux.dat: Likewise.
12135 * regformats/tic6x-c62x-linux.dat: Likewise.
12136 * regformats/tic6x-c64x-linux.dat: Likewise.
12137 * regformats/tic6x-c64xp-linux.dat: Likewise.
12138 * regformats/regdat.sh: Parse feature marker.
12139
12140 2018-04-18 Alan Hayward <alan.hayward@arm.com>
12141
12142 * common/tdesc.h (tdesc_architecture_name): Add new declaration.
12143 (tdesc_osabi_name): Likewise.
12144 * target-descriptions.c (tdesc_architecture_name): Add new
12145 function.
12146 (tdesc_osabi_name): Likewise.
12147
12148 2018-04-18 Alan Hayward <alan.hayward@arm.com>
12149
12150 * common/tdesc.c (tdesc_predefined_type): Move to here.
12151 (tdesc_named_type): Likewise.
12152 (tdesc_create_vector): Likewise.
12153 (tdesc_create_struct): Likewise.
12154 (tdesc_set_struct_size): Likewise.
12155 (tdesc_create_union): Likewise.
12156 (tdesc_create_flags): Likewise.
12157 (tdesc_create_enum): Likewise.
12158 (tdesc_add_field): Likewise.
12159 (tdesc_add_typed_bitfield): Likewise.
12160 (tdesc_add_bitfield): Likewise.
12161 (tdesc_add_flag): Likewise.
12162 (tdesc_add_enum_value): Likewise.
12163 * common/tdesc.h (struct tdesc_type_builtin): Likewise.
12164 (struct tdesc_type_vector): Likewise.
12165 (struct tdesc_type_field): Likewise.
12166 (struct tdesc_type_with_fields): Likewise.
12167 (tdesc_create_enum): Add declaration.
12168 (tdesc_add_typed_bitfield): Likewise.
12169 (tdesc_add_enum_value): Likewise.
12170 * target-descriptions.c (tdesc_type_field): Move from here.
12171 (tdesc_type_builtin): Likewise.
12172 (tdesc_type_vector): Likewise.
12173 (tdesc_type_with_fields): Likewise.
12174 (tdesc_predefined_types): Likewise.
12175 (tdesc_named_type): Likewise.
12176 (tdesc_create_vector): Likewise.
12177 (tdesc_create_struct): Likewise.
12178 (tdesc_set_struct_size): Likewise.
12179 (tdesc_create_union): Likewise.
12180 (tdesc_create_flags): Likewise.
12181 (tdesc_create_enum): Likewise.
12182 (tdesc_add_field): Likewise.
12183 (tdesc_add_typed_bitfield): Likewise.
12184 (tdesc_add_bitfield): Likewise.
12185 (tdesc_add_flag): Likewise.
12186 (tdesc_add_enum_value): Likewise.
12187 * gdb/target-descriptions.h (tdesc_create_enum): Likewise.
12188 (tdesc_add_typed_bitfield): Likewise.
12189 (tdesc_add_enum_value): Likewise.
12190
12191 2018-04-18 Alan Hayward <alan.hayward@arm.com>
12192
12193 * common/tdesc.c (tdesc_feature::accept): Move to here.
12194 (tdesc_feature::operator==): Likewise.
12195 (tdesc_create_reg): Likewise.
12196 * common/tdesc.h (tdesc_type_kind): Likewise.
12197 (struct tdesc_type): Likewise.
12198 (struct tdesc_feature): Likewise.
12199 * regformats/regdat.sh: Create a feature.
12200 * target-descriptions.c (tdesc_type_kind): Move from here.
12201 (tdesc_type): Likewise.
12202 (tdesc_type_up): Likewise.
12203 (tdesc_feature): Likewise.
12204 (tdesc_create_reg): Likewise.
12205
12206 2018-04-18 Alan Hayward <alan.hayward@arm.com>
12207
12208 * Makefile.in: Add arch/tdesc.c
12209 * common/tdesc.c: New file.
12210 * common/tdesc.h (tdesc_element_visitor): Move to here.
12211 (tdesc_element): Likewise.
12212 (tdesc_reg): Likewise.
12213 (tdesc_reg_up): Likewise.
12214 * regformats/regdef.h (reg): Add offset to constructors.
12215 * target-descriptions.c (tdesc_element_visitor): Move from here.
12216 (tdesc_element): Likewise.
12217 (tdesc_reg): Likewise.
12218 (tdesc_reg_up): Likewise.
12219
12220 2018-04-17 Tom Tromey <tom@tromey.com>
12221
12222 * dwarf2read.c (quirk_rust_enum): Conditionally drop the
12223 discriminant field.
12224
12225 2018-04-17 Tom Tromey <tom@tromey.com>
12226
12227 * dwarf2read.c (quirk_rust_enum): Handle unions correctly.
12228
12229 2018-04-17 Andreas Arnez <arnez@linux.vnet.ibm.com>
12230
12231 * symtab.c (print_symbol_info): Skip printing filename and line
12232 number when `last' is NULL.
12233 (symtab_symbol_info): Use empty string instead of NULL for first
12234 invocation of print_symbol_info.
12235 (rbreak_command): Pass NULL to `last' parameter of
12236 print_symbol_info.
12237
12238 2018-04-16 Simon Marchi <simon.marchi@ericsson.com>
12239
12240 * linux-tdep.c (linux_spu_make_corefile_notes): Return note_data
12241 instead of nullptr.
12242
12243 2018-04-16 Pedro Alves <palves@redhat.com>
12244
12245 * MAINTAINERS (sh): Remove.
12246 * Makefile.in (ALL_TARGET_OBS): Remove sh64-tdep.o.
12247 (HFILES_NO_SRCDIR): Remove sh64-tdep.h.
12248 (ALLDEPFILES): Remove sh64-tdep.c.
12249 * NEWS: Mentions that support for SH-5/SH64 is removed.
12250 * configure.tgt (sh*-*-linux*): Remove reference to sh64-tdep.o.
12251 (sh*-*-openbsd*): Ditto.
12252 (sh64-*-elf*): Remove.
12253 (sh*): Remove.
12254 * regcache.c (cooked_write_test): Remove bfd_mach_sh5 case.
12255 * sh-linux-tdep.c: Remove reference to bfd_mach_sh5.
12256 * sh-tdep.c: No longer include "sh64-tdep.h".
12257 (sh_gdbarch_init): Remove reference to bfd_mach_sh5.
12258 * sh64-tdep.c, sh64-tdep.h: Remove files.
12259
12260 2018-04-16 Pedro Alves <palves@redhat.com>
12261
12262 * MAINTAINERS: Remove m88k.
12263 * Makefile.in (ALL_TARGET_OBS): Remove m88k-tdep.o.
12264 (HFILES_NO_SRCDIR): Remove m88k-tdep.h.
12265 (ALLDEPFILES): Remove m88k-bsd-nat.c and m88k-tdep.c.
12266 * NEWS: Mention that support for m88k was removed.
12267 * configure.host (m88*-*-*): Remove support.
12268 * configure.nat (m88k-*-*): Remove support.
12269 * configure.tgt (m88*-*-openbsd*): Remove.
12270 * m88k-bsd-nat.c, m88k-tdep.c, m88k-tdep.h: Delete.
12271
12272 2018-04-15 Simon Marchi <simon.marchi@polymtl.ca>
12273
12274 * configure.tgt (x86_tobjs): New variable.
12275 (amd64_tobjs, i386_tobjs): Use it.
12276
12277 2018-04-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
12278
12279 * symtab.c (print_symbol_info): Precede the symbol definition by
12280 the line number when available.
12281 * NEWS: Advertise this enhancement.
12282
12283 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
12284
12285 * NEWS (New options): announce set/show record btrace cpu.
12286 * btrace.c: Include record-btrace.h.
12287 (btrace_compute_ftrace_pt): Skip enabling errata workarounds if
12288 the vendor is unknown.
12289 (btrace_compute_ftrace_1): Add cpu parameter. Update callers.
12290 Maybe overwrite the btrace configuration's cpu.
12291 (btrace_compute_ftrace): Add cpu parameter. Update callers.
12292 (btrace_fetch): Add cpu parameter. Update callers.
12293 (btrace_maint_update_pt_packets): Call record_btrace_get_cpu.
12294 Maybe overwrite the btrace configuration's cpu. Skip enabling
12295 errata workarounds if the vendor is unknown.
12296 * python/py-record-btrace.c: Include record-btrace.h.
12297 (recpy_bt_begin, recpy_bt_end, recpy_bt_instruction_history)
12298 (recpy_bt_function_call_history): Call record_btrace_get_cpu.
12299 * record-btrace.c (record_btrace_cpu_state_kind): New.
12300 (record_btrace_cpu): New.
12301 (set_record_btrace_cpu_cmdlist): New.
12302 (record_btrace_get_cpu): New.
12303 (require_btrace_thread, record_btrace_info)
12304 (record_btrace_resume_thread): Call record_btrace_get_cpu.
12305 (cmd_set_record_btrace_cpu_none): New.
12306 (cmd_set_record_btrace_cpu_auto): New.
12307 (cmd_set_record_btrace_cpu): New.
12308 (cmd_show_record_btrace_cpu): New.
12309 (_initialize_record_btrace): Initialize set/show record btrace cpu
12310 commands.
12311 * record-btrace.h (record_btrace_get_cpu): New.
12312
12313 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
12314
12315 * record.c (set_record_command): Fix typo in message.
12316
12317 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
12318
12319 * record-btrace.c (cmd_set_record_btrace): Print sub-commands.
12320
12321 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
12322
12323 * infrun.c (process_event_stop_test): Call
12324 gdbarch_in_indirect_branch_thunk.
12325 * gdbarch.sh (in_indirect_branch_thunk): New.
12326 * gdbarch.c: Regenerated.
12327 * gdbarch.h: Regenerated.
12328 * x86-tdep.h: New.
12329 * x86-tdep.c: New.
12330 * Makefile.in (ALL_TARGET_OBS): Add x86-tdep.o.
12331 (HFILES_NO_SRCDIR): Add x86-tdep.h.
12332 (ALLDEPFILES): Add x86-tdep.c.
12333 * arch-utils.h (default_in_indirect_branch_thunk): New.
12334 * arch-utils.c (default_in_indirect_branch_thunk): New.
12335 * i386-tdep: Include x86-tdep.h.
12336 (i386_in_indirect_branch_thunk): New.
12337 (i386_elf_init_abi): Set in_indirect_branch_thunk gdbarch
12338 function.
12339 * amd64-tdep: Include x86-tdep.h.
12340 (amd64_in_indirect_branch_thunk): New.
12341 (amd64_init_abi): Set in_indirect_branch_thunk gdbarch function.
12342
12343 2018-04-12 Jan Kratochvil <jan.kratochvil@redhat.com>
12344
12345 PR gdb/23053
12346 * dwarf-index-write.c (data_buf::grow) (write_one_signatured_type)
12347 (recursively_write_psymbols) (debug_names::recursively_write_psymbols)
12348 (debug_names::write_one_signatured_type): Fix -D_GLIBCXX_DEBUG
12349 regression.
12350
12351 2018-04-12 Tom Tromey <tom@tromey.com>
12352
12353 * rust-lang.c (rust_print_struct_def): Remove univariant code.
12354 (rust_evaluate_subexp): Likewise.
12355
12356 2018-04-12 Pedro Alves <palves@redhat.com>
12357
12358 * procfs.c (procfs_detach): Make forward declaration's prototype
12359 match definition's protototype.
12360 (proc_get_LDT_entry): Remove stale do_cleanups call.
12361
12362 2018-04-12 Pedro Alves <palves@redhat.com>
12363
12364 * target.h (target_ops::to_has_exited): Delete.
12365 (target_has_exited): Delete.
12366 * target-delegates.c: Regenerate.
12367
12368 2018-04-11 Pedro Alves <palves@redhat.com>
12369
12370 * target.c (fileio_fh_t::t): Add comment.
12371 (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
12372 (target_fileio_close): Handle a NULL target.
12373 (invalidate_fileio_fh): New.
12374 (target_close): Call it.
12375 * remote.c (remote_hostio_send_command): No longer check whether
12376 remote_desc is open.
12377
12378 2018-04-11 Pedro Alves <palves@redhat.com>
12379
12380 * target.c (fileio_fh_t): Make it a named struct instead of a
12381 typedef.
12382 (fileio_fh_t::is_closed): New method.
12383 (DEF_VEC_O (fileio_fh_t)): Remove.
12384 (fileio_fhandles): Now a std::vector.
12385 (is_closed_fileio_fh): Delete.
12386 (acquire_fileio_fd): Adjust. Rename parameters.
12387 (release_fileio_fd): Adjust.
12388 (fileio_fd_to_fh): Reimplement as a function instead of a macro.
12389 (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
12390 (target_fileio_close): Adjust.
12391
12392 2018-04-10 Simon Marchi <simon.marchi@ericsson.com>
12393
12394 * auto-load.c (auto_load_safe_path_vec_update): Iterate by
12395 index.
12396
12397 2018-04-10 Pedro Alves <palves@redhat.com>
12398
12399 * gdbthread.h (finish_thread_state_cleanup): Delete declaration.
12400 (scoped_finish_thread_state): New class.
12401 * infcmd.c (run_command_1): Use it instead of finish_thread_state
12402 cleanup.
12403 * infrun.c (proceed, prepare_for_detach, wait_for_inferior)
12404 (fetch_inferior_event, normal_stop): Likewise.
12405 * thread.c (finish_thread_state_cleanup): Delete.
12406
12407 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
12408 Pedro Alves <palves@redhat.com>
12409
12410 * value.c: Include "selftest.h" and "common/array-view.h".
12411 (struct range) <operator ==>: New.
12412 (test_ranges_contain): New.
12413 (check_ranges_vector): New.
12414 (test_insert_into_bit_range_vector): New.
12415 (_initialize_values): Register selftests.
12416 * common/array-view.h (operator==, operator!=): New.
12417
12418 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
12419
12420 * common/gdb_vecs.h (unordered_remove): Add overload that takes
12421 an iterator.
12422 * inline-frame.c: Include <algorithm>.
12423 (struct inline_state): Add constructor.
12424 (inline_state_s): Remove.
12425 (DEF_VEC_O(inline_state_s)): Remove.
12426 (inline_states): Change type to std::vector.
12427 (find_inline_frame_state): Adjust to std::vector.
12428 (allocate_inline_frame_state): Remove.
12429 (clear_inline_frame_state): Adjust to std::vector.
12430 (skip_inline_frames): Adjust to std::vector.
12431
12432 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
12433
12434 * tracepoint.h (struct trace_state_variable): Add constructor.
12435 <name>: Change type to std::string.
12436 * tracepoint.c (tsv_s): Remove.
12437 (DEF_VEC_O(tsv_s)): Remove.
12438 (tvariables): Change to std::vector.
12439 (create_trace_state_variable): Adjust to std::vector.
12440 (find_trace_state_variable): Likewise.
12441 (find_trace_state_variable_by_number): Likewise.
12442 (delete_trace_state_variable): Likewise.
12443 (trace_variable_command): Adjust to std::string.
12444 (delete_trace_variable_command): Likewise.
12445 (tvariables_info_1): Adjust to std::vector.
12446 (save_trace_state_variables): Likewise.
12447 (start_tracing): Likewise.
12448 (merge_uploaded_trace_state_variables): Adjust to std::vector
12449 and std::string.
12450 * target.h (struct target_ops)
12451 <to_download_trace_state_variable>: Pass reference to
12452 trace_state_variable.
12453 * target-debug.h (target_debug_print_const_trace_state_variable_r): New.
12454 * target-delegates.c: Re-generate.
12455 * mi/mi-interp.c (mi_tsv_created): Adjust to std::string.
12456 (mi_tsv_deleted): Likewise.
12457 * mi/mi-main.c (mi_cmd_trace_frame_collected): Likewise.
12458 * remote.c (remote_download_trace_state_variable): Change
12459 pointer to reference and adjust.
12460 * make-target-delegates (parse_argtypes): Handle references.
12461 (write_function_header): Likewise.
12462 (munge_type): Likewise.
12463
12464 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
12465
12466 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
12467 string_view-selftests.c.
12468 * unittests/basic_string_view/capacity/1.cc: Adapt to GDB
12469 testsuite.
12470 * unittests/basic_string_view/cons/char/1.cc: Likewise.
12471 * unittests/basic_string_view/cons/char/2.cc: Likewise.
12472 * unittests/basic_string_view/cons/char/3.cc: Likewise.
12473 * unittests/basic_string_view/element_access/char/1.cc:
12474 Likewise.
12475 * unittests/basic_string_view/element_access/char/empty.cc:
12476 Likewise.
12477 * unittests/basic_string_view/element_access/char/front_back.cc:
12478 Likewise.
12479 * unittests/basic_string_view/inserters/char/2.cc: Likewise.
12480 * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc:
12481 Likewise.
12482 * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc:
12483 Likewise.
12484 * unittests/basic_string_view/modifiers/swap/char/1.cc:
12485 Likewise.
12486 * unittests/basic_string_view/operations/compare/char/1.cc:
12487 Likewise.
12488 * unittests/basic_string_view/operations/compare/char/13650.cc:
12489 Likewise.
12490 * unittests/basic_string_view/operations/copy/char/1.cc:
12491 Likewise.
12492 * unittests/basic_string_view/operations/data/char/1.cc:
12493 Likewise.
12494 * unittests/basic_string_view/operations/find/char/1.cc:
12495 Likewise.
12496 * unittests/basic_string_view/operations/find/char/2.cc:
12497 Likewise.
12498 * unittests/basic_string_view/operations/find/char/3.cc:
12499 Likewise.
12500 * unittests/basic_string_view/operations/find/char/4.cc:
12501 Likewise.
12502 * unittests/basic_string_view/operations/rfind/char/1.cc:
12503 Likewise.
12504 * unittests/basic_string_view/operations/rfind/char/2.cc:
12505 Likewise.
12506 * unittests/basic_string_view/operations/rfind/char/3.cc:
12507 Likewise.
12508 * unittests/basic_string_view/operations/substr/char/1.cc:
12509 Likewise.
12510 * unittests/basic_string_view/operators/char/2.cc: Likewise.
12511 * unittests/string_view-selftests.c: New file.
12512
12513 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
12514
12515 * unittests/basic_string_view/capacity/1.cc: New file.
12516 * unittests/basic_string_view/capacity/empty_neg.cc: New file.
12517 * unittests/basic_string_view/cons/char/1.cc: New file.
12518 * unittests/basic_string_view/cons/char/2.cc: New file.
12519 * unittests/basic_string_view/cons/char/3.cc: New file.
12520 * unittests/basic_string_view/cons/wchar_t/1.cc: New file.
12521 * unittests/basic_string_view/cons/wchar_t/2.cc: New file.
12522 * unittests/basic_string_view/cons/wchar_t/3.cc: New file.
12523 * unittests/basic_string_view/element_access/char/1.cc: New file.
12524 * unittests/basic_string_view/element_access/char/2.cc: New file.
12525 * unittests/basic_string_view/element_access/char/empty.cc: New file.
12526 * unittests/basic_string_view/element_access/char/front_back.cc: New file.
12527 * unittests/basic_string_view/element_access/wchar_t/1.cc: New file.
12528 * unittests/basic_string_view/element_access/wchar_t/2.cc: New file.
12529 * unittests/basic_string_view/element_access/wchar_t/empty.cc: New file.
12530 * unittests/basic_string_view/element_access/wchar_t/front_back.cc: New file.
12531 * unittests/basic_string_view/include.cc: New file.
12532 * unittests/basic_string_view/inserters/char/1.cc: New file.
12533 * unittests/basic_string_view/inserters/char/2.cc: New file.
12534 * unittests/basic_string_view/inserters/char/3.cc: New file.
12535 * unittests/basic_string_view/inserters/pod/10081-out.cc: New file.
12536 * unittests/basic_string_view/inserters/wchar_t/1.cc: New file.
12537 * unittests/basic_string_view/inserters/wchar_t/2.cc: New file.
12538 * unittests/basic_string_view/inserters/wchar_t/3.cc: New file.
12539 * unittests/basic_string_view/literals/types.cc: New file.
12540 * unittests/basic_string_view/literals/values.cc: New file.
12541 * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc: New file.
12542 * unittests/basic_string_view/modifiers/remove_prefix/wchar_t/1.cc: New file.
12543 * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc: New file.
12544 * unittests/basic_string_view/modifiers/remove_suffix/wchar_t/1.cc: New file.
12545 * unittests/basic_string_view/modifiers/swap/char/1.cc: New file.
12546 * unittests/basic_string_view/modifiers/swap/wchar_t/1.cc: New file.
12547 * unittests/basic_string_view/operations/compare/char/1.cc: New file.
12548 * unittests/basic_string_view/operations/compare/char/13650.cc: New file.
12549 * unittests/basic_string_view/operations/compare/char/2.cc: New file.
12550 * unittests/basic_string_view/operations/compare/char/70483.cc: New file.
12551 * unittests/basic_string_view/operations/compare/wchar_t/1.cc: New file.
12552 * unittests/basic_string_view/operations/compare/wchar_t/13650.cc: New file.
12553 * unittests/basic_string_view/operations/compare/wchar_t/2.cc: New file.
12554 * unittests/basic_string_view/operations/copy/char/1.cc: New file.
12555 * unittests/basic_string_view/operations/copy/wchar_t/1.cc: New file.
12556 * unittests/basic_string_view/operations/data/char/1.cc: New file.
12557 * unittests/basic_string_view/operations/data/wchar_t/1.cc: New file.
12558 * unittests/basic_string_view/operations/find/char/1.cc: New file.
12559 * unittests/basic_string_view/operations/find/char/2.cc: New file.
12560 * unittests/basic_string_view/operations/find/char/3.cc: New file.
12561 * unittests/basic_string_view/operations/find/char/4.cc: New file.
12562 * unittests/basic_string_view/operations/find/wchar_t/1.cc: New file.
12563 * unittests/basic_string_view/operations/find/wchar_t/2.cc: New file.
12564 * unittests/basic_string_view/operations/find/wchar_t/3.cc: New file.
12565 * unittests/basic_string_view/operations/find/wchar_t/4.cc: New file.
12566 * unittests/basic_string_view/operations/rfind/char/1.cc: New file.
12567 * unittests/basic_string_view/operations/rfind/char/2.cc: New file.
12568 * unittests/basic_string_view/operations/rfind/char/3.cc: New file.
12569 * unittests/basic_string_view/operations/rfind/wchar_t/1.cc: New file.
12570 * unittests/basic_string_view/operations/rfind/wchar_t/2.cc: New file.
12571 * unittests/basic_string_view/operations/rfind/wchar_t/3.cc: New file.
12572 * unittests/basic_string_view/operations/string_conversion/1.cc: New file.
12573 * unittests/basic_string_view/operations/substr/char/1.cc: New file.
12574 * unittests/basic_string_view/operations/substr/wchar_t/1.cc: New file.
12575 * unittests/basic_string_view/operators/char/2.cc: New file.
12576 * unittests/basic_string_view/operators/wchar_t/2.cc: New file.
12577 * unittests/basic_string_view/range_access/char/1.cc: New file.
12578 * unittests/basic_string_view/range_access/wchar_t/1.cc: New file.
12579 * unittests/basic_string_view/requirements/explicit_instantiation/1.cc: New file.
12580 * unittests/basic_string_view/requirements/explicit_instantiation/char/1.cc: New file.
12581 * unittests/basic_string_view/requirements/explicit_instantiation/char16_t/1.cc: New file.
12582 * unittests/basic_string_view/requirements/explicit_instantiation/char32_t/1.cc: New file.
12583 * unittests/basic_string_view/requirements/explicit_instantiation/wchar_t/1.cc: New file.
12584 * unittests/basic_string_view/requirements/typedefs.cc: New file.
12585 * unittests/basic_string_view/typedefs.cc: New file.
12586 * unittests/basic_string_view/types/1.cc: New file.
12587
12588 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
12589
12590 * common/gdb_string_view.h: Remove libstdc++ implementation
12591 details, adjust to gdb reality.
12592 * common/gdb_string_view.tcc: Likewise.
12593 * cli/cli-script.c (struct string_view): Remove.
12594 (user_args) <m_args>: Change element type to gdb::string_view.
12595 (user_args::insert_args): Adjust.
12596
12597 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
12598
12599 * common/gdb_string_view.h: New file.
12600 * common/gdb_string_view.tcc: New file.
12601
12602 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
12603
12604 * ax_cxx_compile_stdcxx.m4: Sync with upstream.
12605 * configure: Re-generate.
12606
12607 2018-04-09 Pedro Alves <palves@redhat.com>
12608
12609 * gdbarch.sh: Include "observable.h" instead of "observer.h".
12610 (set_target_gdbarch): Call
12611 gdb::observers::architecture_changed.notify instead of
12612 observer_notify_architecture_changed.
12613
12614 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
12615
12616 * tracepoint.c (struct current_traceframe_cleanup): Remove.
12617 (do_restore_current_traceframe_cleanup): Remove.
12618 (restore_current_traceframe_cleanup_dtor): Remove.
12619 (make_cleanup_restore_current_traceframe): Remove.
12620 (scoped_restore_current_traceframe::scoped_restore_current_traceframe):
12621 New.
12622 * tracepoint.h (struct scoped_restore_current_traceframe): New.
12623 * infrun.c (fetch_inferior_event): Use
12624 scoped_restore_current_traceframe.
12625
12626 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
12627
12628 * dwarf2read.h (struct dwarf2_per_objfile) <n_type_units>:
12629 Remove.
12630 <n_allocated_type_units>: Remove.
12631 <all_type_units>: Change to std::vector.
12632 * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
12633 to std::vector change.
12634 (dwarf2_per_objfile::get_cutu): Likewise.
12635 (dwarf2_per_objfile::get_tu): Likewise.
12636 (create_signatured_type_table_from_index): Likewise.
12637 (create_signatured_type_table_from_debug_names): Likewise.
12638 (dw2_symtab_iter_next): Likewise.
12639 (dw2_print_stats): Likewise.
12640 (dw2_expand_all_symtabs): Likewise.
12641 (dw2_expand_marked_cus): Likewise.
12642 (dw2_debug_names_iterator::next): Likewise.
12643 (dwarf2_initialize_objfile): Likewise.
12644 (add_signatured_type_cu_to_table): Likewise.
12645 (create_all_type_units): Likewise.
12646 (add_type_unit): Likewise.
12647 (struct tu_abbrev_offset): Add constructor.
12648 (build_type_psymtabs_1): Adjust to std::vector change.
12649 (print_tu_stats): Likewise.
12650 * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
12651 (write_debug_names): Likewise.
12652
12653 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
12654
12655 * dwarf2read.h (struct dwarf2_per_objfile) <all_comp_units>: Likewise.
12656 Make an std::vector.
12657 <n_comp_units>: Remove.
12658 * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
12659 to std::vector change.
12660 (dwarf2_per_objfile::get_cutu): Likewise.
12661 (dwarf2_per_objfile::get_cu): Likewise.
12662 (create_cus_from_index): Likewise.
12663 (create_addrmap_from_index): Likewise.
12664 (create_addrmap_from_aranges): Likewise.
12665 (dwarf2_read_index): Likewise.
12666 (dw2_find_last_source_symtab): Likewise.
12667 (dw2_map_symtabs_matching_filename): Likewise.
12668 (dw2_symtab_iter_next): Likewise.
12669 (dw2_print_stats): Likewise.
12670 (dw2_expand_all_symtabs): Likewise.
12671 (dw2_expand_symtabs_with_fullname): Likewise.
12672 (dw2_expand_marked_cus): Likewise.
12673 (dw2_map_symbol_filenames): Likewise.
12674 (create_cus_from_debug_names): Likewise.
12675 (dwarf2_read_debug_names): Likewise.
12676 (dw2_debug_names_iterator::next): Likewise.
12677 (dwarf2_initialize_objfile): Likewise.
12678 (set_partial_user): Likewise.
12679 (dwarf2_build_psymtabs_hard): Likewise.
12680 (read_comp_units_from_section): Remove arguments, adjust to
12681 std::vector change.
12682 (create_all_comp_units): Adjust to std::vector and
12683 read_comp_units_from_section changes.
12684 (dwarf2_find_containing_comp_unit): Adjust to std::vector
12685 change.
12686 * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
12687 (psyms_seen_size): Likewise.
12688 (write_gdbindex): Likewise.
12689 (write_debug_names): Likewise.
12690
12691 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
12692
12693 * dwarf2read.c (create_cus_from_index_list): Replace objfile arg
12694 with dwarf2_per_objfile.
12695 (create_cus_from_index): Likewise.
12696 (create_signatured_type_table_from_index): Likewise.
12697 (dwarf2_read_index): Likewise.
12698 (dwarf2_initialize_objfile): Likewise.
12699 (dwarf2_fetch_die_loc_sect_off): Get dwarf2_per_objfile from
12700 per_cu rather than get_dwarf2_per_objfile.
12701
12702 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
12703
12704 * dwarf2read.h (struct signatured_type): Forward declare.
12705 (struct dwarf2_per_objfile) <get_cutu, get_cu, get_tu>:
12706 New methods.
12707 * dwarf2read.c (dwarf2_per_objfile::get_cutu): Rename from...
12708 (dw2_get_cutu): ...this.
12709 (dwarf2_per_objfile::get_cu): Rename from...
12710 (dw2_get_cu): ...this.
12711 (dwarf2_per_objfile::get_tu): New.
12712 (create_addrmap_from_index): Adjust.
12713 (create_addrmap_from_aranges): Adjust.
12714 (dw2_find_last_source_symtab): Adjust.
12715 (dw2_map_symtabs_matching_filename): Adjust.
12716 (dw2_symtab_iter_next): Adjust.
12717 (dw2_print_stats): Adjust.
12718 (dw2_expand_all_symtabs): Adjust.
12719 (dw2_expand_symtabs_with_fullname): Adjust.
12720 (dw2_expand_marked_cus): Adjust.
12721 (dw_expand_symtabs_matching_file_matcher): Adjust.
12722 (dw2_map_symbol_filenames): Adjust.
12723 (dw2_debug_names_iterator::next): Adjust.
12724 (dwarf2_initialize_objfile): Adjust.
12725 (set_partial_user): Adjust.
12726 (dwarf2_build_psymtabs_hard): Adjust.
12727
12728 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
12729
12730 * dwarf2read.c (create_signatured_type_table_from_debug_names):
12731 Remove unused variables.
12732 (dw2_map_symtabs_matching_filename): Likewise.
12733 (dwarf2_record_block_ranges): Likewise.
12734 (dwarf2_read_addr_index): Likewise.
12735 (follow_die_offset): Likewise.
12736
12737 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
12738
12739 * progspace.c (clone_program_space): Pass SYMFILE_DEFER_BP_RESET
12740 to symbol_file_add_main.
12741
12742 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
12743
12744 PR mi/22299
12745 * mi/mi-console.c (do_fputc_async_safe): New.
12746 (mi_console_file::write_async_safe): New.
12747 (mi_console_file::flush): Adjust calls to fputstrn_unfiltered.
12748 * mi/mi-console.h (class mi_console_file) <write_async_safe>:
12749 New.
12750 * ui-file.c (ui_file::putstrn): Adjust call to
12751 fputstrn_unfiltered.
12752 * utils.c (printchar): Replace do_fputs and do_fprintf
12753 parameters by do_fputc.
12754 (fputstr_filtered): Adjust call to printchar.
12755 (fputstr_unfiltered): Likewise.
12756 (fputstrn_filtered): Likewise.
12757 (fputstrn_unfiltered): Add do_fputc parameter, pass to
12758 printchar.
12759 * utils.h (do_fputc_ftype): New typedef.
12760 (fputstrn_unfiltered): Add do_fputc parameter.
12761
12762 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
12763
12764 * regformats/i386/i386-avx.dat: Remove.
12765
12766 2018-04-07 Simon Marchi <simon.marchi@ericsson.com>
12767
12768 PR gdb/22979
12769 * amd64-tdep.c (amd64_none_init_abi): New function.
12770 (amd64_x32_none_init_abi): New function.
12771 (_initialize_amd64_tdep): Register handlers for x86-64 and
12772 x64_32 with GDB_OSABI_NONE.
12773 * osabi.c (gdbarch_init_osabi): Allow running handlers for the
12774 GDB_OSABI_NONE osabi.
12775
12776 2018-04-07 Simon Marchi <simon.marchi@ericsson.com>
12777
12778 PR gdb/22980
12779 * defs.h (enum gdb_osabi): Remove GDB_OSABI_UNINITIALIZED, add
12780 GDB_OSABI_NONE.
12781 * arch-utils.c (gdbarch_info_init): Don't set info->osabi.
12782 * osabi.c (gdb_osabi_names): Add "unknown" entry.
12783
12784 2018-04-07 Simon Marchi <simon.marchi@ericsson.com>
12785
12786 * common/byte-vector.h (char_vector): New type.
12787 * target.h (target_read_alloc): Return
12788 gdb::optional<byte_vector>.
12789 (target_read_stralloc): Return gdb::optional<char_vector>.
12790 (target_get_osdata): Return gdb::optional<char_vector>.
12791 * target.c (target_read_alloc_1): Templatize. Replacement
12792 manual memory management with vector.
12793 (target_read_alloc): Change return type, adjust.
12794 (target_read_stralloc): Change return type, adjust.
12795 (target_get_osdata): Change return type, adjust.
12796 * auxv.c (struct auxv_info) <length>: Remove.
12797 <data>: Change type to gdb::optional<byte_vector>.
12798 (auxv_inferior_data_cleanup): Free auxv_info with delete.
12799 (get_auxv_inferior_data): Allocate auxv_info with new, adjust.
12800 (target_auxv_search): Adjust.
12801 (fprint_target_auxv): Adjust.
12802 * avr-tdep.c (avr_io_reg_read_command): Adjust.
12803 * linux-tdep.c (linux_spu_make_corefile_notes): Adjust.
12804 (linux_make_corefile_notes): Adjust.
12805 * osdata.c (get_osdata): Adjust.
12806 * remote.c (remote_get_threads_with_qxfer): Adjust.
12807 (remote_memory_map): Adjust.
12808 (remote_traceframe_info): Adjust.
12809 (btrace_read_config): Adjust.
12810 (remote_read_btrace): Adjust.
12811 (remote_pid_to_exec_file): Adjust.
12812 * solib-aix.c (solib_aix_get_library_list): Adjust.
12813 * solib-dsbt.c (decode_loadmap): Don't free buf.
12814 (dsbt_get_initial_loadmaps): Adjust.
12815 * solib-svr4.c (svr4_current_sos_via_xfer_libraries): Adjust.
12816 * solib-target.c (solib_target_current_sos): Adjust.
12817 * tracepoint.c (sdata_make_value): Adjust.
12818 * xml-support.c (xinclude_start_include): Adjust.
12819 (xml_fetch_content_from_file): Adjust.
12820 * xml-support.h (xml_fetch_another): Change return type.
12821 (xml_fetch_content_from_file): Change return type.
12822 * xml-syscall.c (xml_init_syscalls_info): Adjust.
12823 * xml-tdesc.c (file_read_description_xml): Adjust.
12824 (fetch_available_features_from_target): Change return type.
12825 (target_fetch_description_xml): Adjust.
12826 (target_read_description_xml): Adjust.
12827
12828 2018-04-06 Tom Tromey <tom@tromey.com>
12829
12830 * value.c (~value): Update.
12831 (struct value) <contents>: Now unique_xmalloc_ptr.
12832 (value_contents_bits_eq, allocate_value_contents)
12833 (value_contents_raw, value_contents_all_raw)
12834 (value_contents_for_printing, value_contents_for_printing_const)
12835 (set_value_enclosing_type): Update.
12836
12837 2018-04-06 Tom Tromey <tom@tromey.com>
12838
12839 * value.c (range_s): Remove typedef, VEC.
12840 (struct range): Add operator<.
12841 (range_lessthan): Remove.
12842 (ranges_contain): Change type.
12843 (~value): Update.
12844 (struct value) <unavailable, optimized_out>: Now std::vector.
12845 (value_entirely_available)
12846 (value_entirely_covered_by_range_vector)
12847 (value_entirely_unavailable, value_entirely_optimized_out):
12848 Update.
12849 (insert_into_bit_range_vector): Change argument type.
12850 (find_first_range_overlap): Likewise.
12851 (struct ranges_and_idx, value_contents_bits_eq)
12852 (require_not_optimized_out, require_available): Update.
12853 (ranges_copy_adjusted): Change argument types.
12854 (value_optimized_out, value_copy, value_fetch_lazy): Update.
12855
12856 2018-04-06 Tom Tromey <tom@tromey.com>
12857
12858 * value.c (~value): Update.
12859 (struct value) <parent>: Now a value_ref_ptr.
12860 (value_parent, set_value_parent, value_address, value_copy):
12861 Update.
12862
12863 2018-04-06 Tom Tromey <tom@tromey.com>
12864
12865 * value.c (struct value): Add constructor, destructor, and member
12866 initializers.
12867 (allocate_value_lazy, value_decref): Update.
12868
12869 2018-04-06 Tom Tromey <tom@tromey.com>
12870
12871 * value.c (struct value) <released, next>: Remove.
12872 (all_values): Now a std::vector.
12873 (allocate_value_lazy): Update.
12874 (value_next): Remove.
12875 (value_mark, value_free_to_mark, release_value)
12876 (value_release_to_mark): Update.
12877
12878 2018-04-06 Tom Tromey <tom@tromey.com>
12879
12880 * value.h (fetch_subexp_value, value_release_to_mark): Update.
12881 (free_value_chain): Remove.
12882 * value.c (free_value_chain): Remove.
12883 (value_release_to_mark): Return a std::vector.
12884 * ppc-linux-nat.c (num_memory_accesses): Change "chain" to a
12885 std::vector.
12886 (check_condition): Update.
12887 * eval.c (fetch_subexp_value): Change "val_chain" to a
12888 std::vector.
12889 * breakpoint.c (update_watchpoint): Update.
12890 (can_use_hardware_watchpoint): Change "vals" to a std::vector.
12891
12892 2018-04-06 Tom Tromey <tom@tromey.com>
12893
12894 * value.h (free_all_values): Remove.
12895 * value.c (free_all_values): Remove.
12896
12897 2018-04-06 Tom Tromey <tom@tromey.com>
12898
12899 * value.c (VALUE_HISTORY_CHUNK, struct value_history_chunk)
12900 (value_history_chain, value_history_count): Remove.
12901 (value_history): New global.
12902 (record_latest_value, access_value_history, show_values)
12903 (preserve_values): Update.
12904
12905 2018-04-06 Tom Tromey <tom@tromey.com>
12906
12907 * varobj.h (struct varobj) <value>: Now a value_ref_ptr.
12908 * varobj.c (varobj_set_display_format, varobj_set_value)
12909 (install_default_visualizer, construct_visualizer)
12910 (install_new_value, ~varobj, varobj_get_value_type)
12911 (my_value_of_variable, varobj_editable_p): Update.
12912 * c-varobj.c (c_describe_child, c_value_of_variable)
12913 (cplus_number_of_children, cplus_describe_child): Update.
12914 * ada-varobj.c (ada_number_of_children, ada_name_of_child)
12915 (ada_path_expr_of_child, ada_value_of_child, ada_type_of_child)
12916 (ada_value_of_variable, ada_value_is_changeable_p): Update.
12917
12918 2018-04-06 Tom Tromey <tom@tromey.com>
12919
12920 * printcmd.c (last_examine_address): Change type to
12921 value_ref_ptr.
12922 (do_examine, x_command): Update.
12923
12924 2018-04-06 Tom Tromey <tom@tromey.com>
12925
12926 * value.c (release_value): Update.
12927 * breakpoint.h (struct watchpoint) <val>: Now a value_ref_ptr.
12928 (struct bpstats) <val>: Now a value_ref_ptr.
12929 * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
12930 (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
12931 (~watchpoint, print_it_watchpoint, watch_command_1)
12932 (invalidate_bp_value_on_memory_change): Update.
12933
12934 2018-04-06 Tom Tromey <tom@tromey.com>
12935
12936 * varobj.c (varobj_clear_saved_item)
12937 (update_dynamic_varobj_children, install_new_value, ~varobj):
12938 Update.
12939 * value.h (value_incref): Move declaration earlier.
12940 (value_decref): Rename from value_free.
12941 (struct value_ref_policy): New.
12942 (value_ref_ptr): New typedef.
12943 (struct value_deleter): Remove.
12944 (gdb_value_up): Remove typedef.
12945 (release_value): Change return type.
12946 (release_value_or_incref): Remove.
12947 * value.c (set_value_parent): Update.
12948 (value_incref): Change return type.
12949 (value_decref): Rename from value_free.
12950 (value_free_to_mark, free_all_values, free_value_chain): Update.
12951 (release_value): Return value_ref_ptr.
12952 (release_value_or_incref): Remove.
12953 (record_latest_value, set_internalvar, clear_internalvar):
12954 Update.
12955 * stack.c (info_frame_command): Don't call value_free.
12956 * python/py-value.c (valpy_dealloc, valpy_new)
12957 (value_to_value_object): Update.
12958 * printcmd.c (do_examine): Update.
12959 * opencl-lang.c (lval_func_free_closure): Update.
12960 * mi/mi-main.c (register_changed_p): Don't call value_free.
12961 * mep-tdep.c (mep_frame_prev_register): Don't call value_free.
12962 * m88k-tdep.c (m88k_frame_prev_register): Don't call value_free.
12963 * m68hc11-tdep.c (m68hc11_frame_prev_register): Don't call
12964 value_free.
12965 * guile/scm-value.c (vlscm_free_value_smob)
12966 (vlscm_scm_from_value): Update.
12967 * frame.c (frame_register_unwind, frame_unwind_register_signed)
12968 (frame_unwind_register_unsigned, get_frame_register_bytes)
12969 (put_frame_register_bytes): Don't call value_free.
12970 * findvar.c (address_from_register): Don't call value_free.
12971 * dwarf2read.c (dwarf2_compute_name): Don't call value_free.
12972 * dwarf2loc.c (entry_data_value_free_closure)
12973 (value_of_dwarf_reg_entry, free_pieced_value_closure)
12974 (dwarf2_evaluate_loc_desc_full): Update.
12975 * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
12976 (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
12977 (~watchpoint, watch_command_1)
12978 (invalidate_bp_value_on_memory_change): Update.
12979 * alpha-tdep.c (alpha_register_to_value): Don't call value_free.
12980
12981 2018-04-06 Simon Marchi <simon.marchi@polymtl.ca>
12982
12983 PR gdb/23022
12984 * warning.m4: Add -Wno-error=deprecated-register.
12985 * configure: Re-generate.
12986
12987 2018-04-05 Tom Tromey <tom@tromey.com>
12988
12989 * linespec.h: Remove include of "vec.h".
12990
12991 2018-04-05 Tom Tromey <tom@tromey.com>
12992
12993 * linespec.c (typep): Remove typedef.
12994 (find_methods, find_superclass_methods): Take a std::vector.
12995 (find_method): Use std::vector.
12996
12997 2018-04-05 Tom Tromey <tom@tromey.com>
12998
12999 * utils.c (compare_strings): Remove.
13000 * utils.h (compare_strings): Remove.
13001 * objc-lang.h (find_imps): Update.
13002 * objc-lang.c (find_methods): Take a std::vector.
13003 (uniquify_strings, find_imps): Likewise.
13004 * linespec.c (find_methods): Take a std::vector.
13005 (decode_objc): Use std::vector.
13006 (add_all_symbol_names_from_pspace, find_superclass_methods): Take
13007 a std::vector.
13008 (find_method, find_function_symbols): Use std::vector.
13009
13010 2018-04-05 Tom Tromey <tom@tromey.com>
13011
13012 * completer.c (completion_tracker::completion_tracker): Remove
13013 cast.
13014 (completion_tracker::discard_completions): Likewise.
13015 * breakpoint.c (ambiguous_names_p): Remove cast.
13016 * ada-lang.c (_initialize_ada_language): Remove cast.
13017 * utils.h (streq): Update.
13018 (streq_hash): Add new declaration.
13019 * utils.c (streq): Return bool.
13020 (streq_hash): New function.
13021
13022 2018-04-05 Tom Tromey <tom@tromey.com>
13023
13024 * linespec.c (event_location_to_sals) <case ADDRESS_LOCATION>:
13025 Remove a string copy.
13026
13027 2018-04-05 Tom Tromey <tom@tromey.com>
13028
13029 * linespec.c (filter_results): Use std::vector.
13030 (decode_line_2, decode_line_full): Update.
13031
13032 2018-04-05 Tom Tromey <tom@tromey.com>
13033
13034 * linespec.c (canonical_to_fullform): Return std::string.
13035 (filter_results): Update.
13036 (struct decode_line_2_item): Add constructor.
13037 <fullform, displayform>: Now std::string.
13038 (decode_line_2_compare_items): Now a std::sort comparator.
13039 (decode_line_2): Update.
13040
13041 2018-04-05 Tom Tromey <tom@tromey.com>
13042
13043 * linespec.c (copy_token_string): Return a unique_xmalloc_ptr.
13044 (unexpected_linespec_error): Update.
13045 (linespec_parse_basic, parse_linespec): Update.
13046
13047 2018-04-05 Tom Tromey <tom@tromey.com>
13048
13049 * linespec.c (linespec_parse_basic): Reindent.
13050
13051 2018-04-05 Tom Tromey <tom@tromey.com>
13052
13053 * minsyms.h (iterate_over_minimal_symbols): Update.
13054 * minsyms.c (iterate_over_minimal_symbols): Take a
13055 gdb::function_view.
13056 * linespec.c (struct collect_minsyms): Remove.
13057 (compare_msyms): Now a std::sort comparator.
13058 (add_minsym): Add parameters.
13059 (search_minsyms_for_name): Update. Use std::vector.
13060
13061 2018-04-03 Tom Tromey <tom@tromey.com>
13062
13063 * mipsread.c (read_alphacoff_dynamic_symtab): Use
13064 gdb::byte_vector.
13065
13066 2018-04-02 Weimin Pan <weimin.pan@oracle.com>
13067
13068 * MAINTAINERS (Write After Approval): Add Weimin Pan.
13069
13070 2018-04-02 Weimin Pan <weimin.pan@oracle.com>
13071
13072 PR gdb/16959
13073 * cp-valprint.c: (cp_print_static_field) Fix infinite recursion when
13074 printing static type.
13075
13076 2018-04-01 Tom Tromey <tom@tromey.com>
13077
13078 * rs6000-nat.c (rs6000_ptrace_ldinfo): Return a byte_vector.
13079 (rs6000_xfer_shared_libraries): Update.
13080
13081 2018-04-01 Simon Marchi <simon.marchi@polymtl.ca>
13082
13083 * common/gdb_vecs.h (char_ptr): Remove.
13084 * tracepoint.c (encode_actions_1): Remove usage of char_ptr.
13085
13086 2018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
13087
13088 * guile/scm-utils.c (gdbscm_parse_function_args): Replace VEC
13089 with std::vector.
13090 * common/gdb_vecs.h (DEF_VEC_P (char_ptr)): Remove.
13091
13092 2018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
13093
13094 * tracepoint.h (struct uploaded_tp): Initialize fields.
13095 <actions, step_actions, cmd_strings>: Change type to
13096 std::vector<char *>.
13097 * tracepoint.c (get_uploaded_tp): Allocate with new.
13098 (free_uploaded_tps): Free with delete.
13099 (parse_tracepoint_definition): Adjust to std::vector change.
13100 * breakpoint.c (read_uploaded_action): Likewise.
13101 (create_tracepoint_from_upload): Likewise.
13102 * ctf.c (ctf_write_uploaded_tp): Likewise.
13103 (SET_ARRAY_FIELD): Likewise.
13104 * tracefile-tfile.c (tfile_write_uploaded_tp): Likewise.
13105
13106 2018-03-30 Tom Tromey <tom@tromey.com>
13107
13108 * solib-svr4.c (lm_info_read): Use gdb::byte_vector. Return
13109 std::unique_ptr.
13110 (svr4_keep_data_in_core): Update.
13111 (svr4_read_so_list): Update.
13112
13113 2018-03-30 Tom Tromey <tom@tromey.com>
13114
13115 * windows-nat.c (handle_output_debug_string, handle_exception):
13116 Update.
13117 * target.h (target_read_string): Update.
13118 * target.c (target_read_string): Change "string" to
13119 unique_xmalloc_ptr.
13120 * solib-svr4.c (open_symbol_file_object, svr4_read_so_list):
13121 Update.
13122 * solib-frv.c (frv_current_sos): Update.
13123 * solib-dsbt.c (dsbt_current_sos): Update.
13124 * solib-darwin.c (darwin_current_sos): Update.
13125 * linux-thread-db.c (inferior_has_bug): Update.
13126 * expprint.c (print_subexp_standard) <case OP_OBJC_MSGCALL>:
13127 Update. Remove alloca.
13128 * ada-lang.c (ada_main_name): Update.
13129
13130 2018-03-30 Tom Tromey <tom@tromey.com>
13131
13132 * dwarf2read.c (struct free_dwo_file_cleanup_data): Remove.
13133 (struct dwo_file_deleter): New.
13134 (dwo_file_up): New typedef.
13135 (open_and_init_dwo_file): Use dwo_file_up.
13136 (free_dwo_file_cleanup): Remove.
13137
13138 2018-03-30 Tom Tromey <tom@tromey.com>
13139
13140 * dwarf2read.c (free_dwo_file): Remove "objfile" parameter.
13141 (free_dwo_file_cleanup, free_dwo_file_from_slot): Update.
13142
13143 2018-03-30 Tom Tromey <tom@tromey.com>
13144
13145 * dwarf2read.c (class free_cached_comp_units): New class.
13146 (dw2_instantiate_symtab, dwarf2_build_psymtabs_hard): Use it.
13147 (free_cached_comp_units): Remove function.
13148
13149 2018-03-30 Tom Tromey <tom@tromey.com>
13150
13151 * utils.h (make_cleanup_unpush_target): Remove.
13152 * inf-ptrace.c (struct target_unpusher): New.
13153 (target_unpush_up) New typedef.
13154 (inf_ptrace_create_inferior, inf_ptrace_attach): Use
13155 target_unpush_up.
13156 * utils.c (do_unpush_target, make_cleanup_unpush_target): Remove.
13157
13158 2018-03-27 Tom Tromey <tom@tromey.com>
13159
13160 * utils.c (prompt_for_continue): Use unique_xmalloc_ptr.
13161
13162 2018-03-27 Pedro Alves <palves@redhat.com>
13163 Tom Tromey <tom@tromey.com>
13164
13165 * top.c (class gdb_readline_wrapper_cleanup): Add constructor,
13166 destructor. Now a class.
13167 (gdb_readline_wrapper_cleanup): Remove function.
13168 (gdb_readline_wrapper): Remove cleanups.
13169
13170 2018-03-27 Tom Tromey <tom@tromey.com>
13171
13172 * typeprint.h (struct type_print_options) <local_typedefs,
13173 global_typedefs>: Remove "struct" keyword.
13174 (class typedef_hash_table): New class.
13175 (recursively_update_typedef_hash, add_template_parameters)
13176 (create_typedef_hash, free_typedef_hash, copy_typedef_hash)
13177 (find_typedef_in_hash): Don't declare.
13178 * typeprint.c (struct typedef_hash_table): Move to typeprint.h.
13179 (typedef_hash_table::recursively_update): Rename from
13180 recursively_update_typedef_hash. Now a member.
13181 (typedef_hash_table::add_template_parameters): Rename from
13182 add_template_parameters. Now a member.
13183 (typedef_hash_table::typedef_hash_table): Now a constructor;
13184 rename from create_typedef_hash.
13185 (typedef_hash_table::~typedef_hash_table): Now a destructor;
13186 rename from free_typedef_hash.
13187 (do_free_typedef_hash, make_cleanup_free_typedef_hash)
13188 (do_free_global_table): Remove.
13189 (typedef_hash_table::typedef_hash_table): New constructor; renamed
13190 from copy_type_recursive.
13191 (create_global_typedef_table): Remove.
13192 (typedef_hash_table::find_global_typedef): Now a member of
13193 typedef_hash_table.
13194 (typedef_hash_table::find_typedef): Rename from
13195 find_typedef_in_hash; now a member.
13196 (whatis_exp): Update.
13197 * extension.h (struct ext_lang_type_printers): Add constructor and
13198 destructor.
13199 (start_ext_lang_type_printers, free_ext_lang_type_printers): Don't
13200 declare.
13201 * extension.c (ext_lang_type_printers::ext_lang_type_printers):
13202 Now a constructor; rename from start_ext_lang_type_printers.
13203 (ext_lang_type_printers): Now a destructor; rename from
13204 free_ext_lang_type_printers.
13205 * c-typeprint.c (find_typedef_for_canonicalize, c_print_type_1):
13206 Update.
13207 (c_type_print_base_struct_union): Update. Remove cleanups.
13208
13209 2018-03-27 Tom Tromey <tom@tromey.com>
13210
13211 * dwarf-index-write.c: Include <cmath>.
13212
13213 2018-03-27 Joel Brobecker <brobecker@adacore.com>
13214
13215 * NEWS: Add entry describing new "set|show varsize-limit" command.
13216 * ada-lang.c (_initialize_ada_language): Add "set/show varsize-limit"
13217 command.
13218 * printcmd.c (_initialize_printcmd): Add "set var" alias of
13219 "set variable".
13220
13221 2018-03-27 Simon Marchi <simon.marchi@ericsson.com>
13222
13223 * Makefile.in (COMMON_SFILES): Add dwarf-index-common.c and
13224 dwarf-index-write.c
13225 (HFILES_NO_SRCDIR): Add dwarf-index-common.h and dwarf2read.h.
13226 * dwarf-index-common.c: New file.
13227 * dwarf-index-common.h: New file.
13228 * dwarf-index-write.c: New file.
13229 * dwarf2read.c: Include dwarf2read.h and dwarf-index-common.h.
13230 (struct dwarf2_section_info): Move from here.
13231 (dwarf2_section_info_def): Likewise.
13232 (DEF_VEC_O (dwarf2_section_info_def)): Likewise.
13233 (offset_type): Likewise.
13234 (DW2_GDB_INDEX_SYMBOL_STATIC_SET_VALUE): Likewise.
13235 (DW2_GDB_INDEX_SYMBOL_KIND_SET_VALUE): Likewise.
13236 (DW2_GDB_INDEX_CU_SET_VALUE): Likewise.
13237 (byte_swap): Likewise.
13238 (MAYBE_SWAP): Likewise.
13239 (dwarf2_per_cu_ptr): Likewise.
13240 (DEF_VEC_P (dwarf2_per_cu_ptr)): Likewise.
13241 (struct tu_stats): Likewise.
13242 (struct dwarf2_per_objfile): Likewise.
13243 (struct dwarf2_per_cu_data): Likewise.
13244 (struct signatured_type): Likewise.
13245 (sig_type_ptr): Likewise.
13246 (DEF_VEC_P (sig_type_ptr)): Likewise.
13247 (INDEX4_SUFFIX): Likewise.
13248 (INDEX5_SUFFIX): Likewise.
13249 (DEBUG_STR_SUFFIX): Likewise.
13250 (dwarf2_read_section): Make non-static.
13251 (mapped_index_string_hash): Move from here.
13252 (dwarf5_djb_hash): Likewise.
13253 (file_write): Likewise.
13254 (class data_buf): Likewise.
13255 (struct symtab_index_entry): Likewise.
13256 (struct mapped_symtab): Likewise.
13257 (find_slot): Likewise.
13258 (hash_expand): Likewise.
13259 (add_index_entry): Likewise.
13260 (uniquify_cu_indices): Likewise.
13261 (class c_str_view): Likewise.
13262 (class c_str_view_hasher): Likewise.
13263 (class vector_hasher): Likewise.
13264 (write_hash_table): Likewise.
13265 (psym_index_map): Likewise.
13266 (struct addrmap_index_data): Likewise.
13267 (add_address_entry): Likewise.
13268 (add_address_entry_worker): Likewise.
13269 (write_address_map): Likewise.
13270 (symbol_kind): Likewise.
13271 (write_psymbols): Likewise.
13272 (struct signatured_type_index_data): Likewise.
13273 (write_one_signatured_type): Likewise.
13274 (recursively_count_psymbols): Likewise.
13275 (recursively_write_psymbols): Likewise.
13276 (class debug_names): Likewise.
13277 (check_dwarf64_offsets): Likewise.
13278 (psyms_seen_size): Likewise.
13279 (write_gdbindex): Likewise.
13280 (write_debug_names): Likewise.
13281 (assert_file_size): Likewise.
13282 (write_psymtabs_to_index): Likewise.
13283 (save_gdb_index_command): Likewise.
13284 (_initialize_dwarf2_read): Don't register the "save gdb-index"
13285 command.
13286 * dwarf2read.h: New file.
13287
13288 2018-03-27 Joel Brobecker <brobecker@adacore.com>
13289
13290 PR gdb/22670
13291 * dwarf2read.c (dwarf2_physname): Do not return the demangled
13292 symbol name if the CU's language stores symbol names in linkage
13293 format.
13294 * language.h (struct language_defn)
13295 <la_store_sym_names_in_linkage_form_p>: New field. Adjust
13296 all instances of this struct.
13297
13298 2018-03-26 Tom Tromey <tom@tromey.com>
13299
13300 * stack.c (backtrace_command_1): Remove verbose code.
13301
13302 2018-03-26 Tom Tromey <tom@tromey.com>
13303
13304 * python/py-framefilter.c (py_print_type): Don't catch
13305 exceptions. Return void.
13306 (py_print_value): Likewise.
13307 (py_print_single_arg): Likewise.
13308 (enumerate_args): Don't catch exceptions.
13309 (py_print_args): Likewise.
13310 (py_print_frame): Likewise.
13311 (gdbpy_apply_frame_filter): Catch exceptions here.
13312
13313 2018-03-26 Tom Tromey <tom@tromey.com>
13314
13315 * stack.c (_initialize_stack): Remove trailing newlines from help
13316 text. Add "Usage" line to "backtrace" help.
13317
13318 2018-03-26 Tom Tromey <tom@tromey.com>
13319
13320 PR python/16486:
13321 * python/py-framefilter.c (py_print_args): Call wrap_hint.
13322
13323 2018-03-26 Tom Tromey <tom@tromey.com>
13324
13325 * python/py-framefilter.c (py_print_single_arg): Return
13326 EXT_LANG_BT_ERROR from catch.
13327
13328 2018-03-26 Tom Tromey <tom@tromey.com>
13329
13330 PR backtrace/15584:
13331 * stack.c (backtrace_command_1): Move some code into no-filters
13332 "if".
13333
13334 2018-03-26 Tom Tromey <tom@tromey.com>
13335
13336 * python/py-framefilter.c (throw_quit_or_print_exception): New
13337 function.
13338 (gdbpy_apply_frame_filter): Use it.
13339
13340 2018-03-26 Tom Tromey <tom@tromey.com>
13341
13342 PR cli/17716:
13343 * python/py-framefilter.c (py_print_type, py_print_value)
13344 (enumerate_args, py_print_args, gdbpy_apply_frame_filter): Use
13345 RETURN_MASK_ERROR.
13346
13347 2018-03-26 Tom Tromey <tom@tromey.com>
13348
13349 * python/py-framefilter.c (enumerate_args): Use
13350 gdb::unique_xmalloc_ptr.
13351
13352 2018-03-26 Tom Tromey <tom@tromey.com>
13353
13354 * python/py-framefilter.c (py_print_frame): Return
13355 EXT_LANG_BT_OK.
13356 (gdbpy_apply_frame_filter): Update comment.
13357 * extension.h (enum ext_lang_bt_status) <EXT_LANG_BT_COMPLETED>:
13358 Remove.
13359 <EXT_LANG_BT_NO_FILTERS>: Change value.
13360
13361 2018-03-26 Tom Tromey <tom@tromey.com>
13362
13363 PR backtrace/15582:
13364 * stack.c (backtrace_command): Parse "hide" argument.
13365 * python/py-framefilter.c (py_print_frame): Handle PRINT_HIDE.
13366 * extension.h (enum frame_filter_flags) <PRINT_HIDE>: New
13367 constant.
13368
13369 2018-03-26 Tom Tromey <tom@tromey.com>
13370
13371 * stack.c (backtrace_command_1): Remove "show_locals" parameter,
13372 add "flags".
13373 (backtrace_command): Remove "fulltrace", add "flags".
13374
13375 2018-03-26 Tom Tromey <tom@tromey.com>
13376
13377 * stack.c (backtrace_command): Rewrite command line parsing.
13378
13379 2018-03-26 Simon Marchi <simon.marchi@ericsson.com>
13380
13381 * dwarf2read.c (DEF_VEC_I(offset_type)): Remove.
13382
13383 2018-03-26 Simon Marchi <simon.marchi@ericsson.com>
13384
13385 * filename-seen-cache.h: Add include guard.
13386
13387 2018-03-26 Keith Seitz <keiths@redhat.com>
13388
13389 * symfile.c (place_section): Remove "struct" from section_addr_info
13390 in comment.
13391 * windows-nat.c (struct safe_symbol_file_add_args) <addrs>: Remove
13392 "struct" keyword from section_addr_info.
13393
13394 2018-03-26 Alan Hayward <alan.hayward@arm.com>
13395
13396 * regformats/regdef.h (reg): Add constructors.
13397
13398 2018-03-25 Pedro Alves <palves@redhat.com>
13399
13400 * eval.c (evaluate_funcall): Swap OP_VAR_MSYM_VALUE/OP_VAR_VALUE
13401 if then/else bodies in var_func_name extraction.
13402
13403 2018-03-23 Weimin Pan <weimin.pan@oracle.com>
13404
13405 * minsyms.c (lookup_minimal_symbol_and_objfile): Use
13406 lookup_minimal_symbol() to find symbol entry.
13407 * minsyms.h (lookup_minimal_symbol_and_objfile): Update comment.
13408
13409 2018-03-23 Keith Seitz <keiths@redhat.com>
13410
13411 PR c++/22968
13412 * dwarf2read.c (scan_partial_symbols): Scan structs/classes for
13413 nested type definitions for C++, too.
13414
13415 2018-03-23 Tom Tromey <tom@tromey.com>
13416
13417 * machoread.c (struct oso_el): Add a constructor. Don't define as
13418 a typedef.
13419 (macho_register_oso): Remove.
13420 (macho_symtab_read): Take a std::vector.
13421 (oso_el_compare_name): Now a std::sort comparator.
13422 (macho_symfile_read_all_oso): Take a std::vector.
13423 (macho_symfile_read): Use std::vector. Remove cleanups.
13424
13425 2018-03-22 Tom Tromey <tom@tromey.com>
13426
13427 * record-full.c (record_full_exec_insn): Use gdb::byte_vector.
13428 (record_full_goto_bookmark): Use std::string.
13429
13430 2018-03-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
13431
13432 PR tdep/18295
13433 * rs6000-tdep.c (skip_prologue): Match both stwux and stdux
13434 a single mask.
13435
13436 2018-03-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
13437
13438 * rs6000-tdep.c (store_insn_p): New function.
13439 (skip_prologue): New variable alloca_reg_offset. Set lr_reg
13440 and cr_reg to their unshifted values. Use store_insn_p to
13441 match LR saves using either R1 or fdata->alloca_reg. Use
13442 store_insn_p to match CR saves. Set alloca_reg_offset
13443 when alloca_reg and framep are set. Remove lr_reg shift
13444 when assigning to fdata->lr_register.
13445
13446 2018-03-22 Andreas Arnez <arnez@linux.vnet.ibm.com>
13447
13448 * linux-tdep.c (linux_info_proc): For "info proc cmdline", print
13449 command line args instead of emitting a warning.
13450
13451 2018-03-22 Simon Marchi <simon.marchi@polymtl.ca>
13452
13453 * tracepoint.h (struct static_tracepoint_marker): Initialize
13454 fields, define default constructor, move constructor and move
13455 assignment, disable the rest.
13456 <str_id, extra>: Make std::string.
13457 (release_static_tracepoint_marker): Remove.
13458 (free_current_marker): Remove.
13459 * tracepoint.c (free_current_marker): Remove.
13460 (parse_static_tracepoint_marker_definition): Adjust to
13461 std::string, use new hex2str overload.
13462 (release_static_tracepoint_marker): Remove.
13463 (print_one_static_tracepoint_marker): Get marker by reference
13464 and adjust to std::string.
13465 (info_static_tracepoint_markers_command): Adjust to std::vector
13466 changes
13467 * target.h (static_tracepoint_marker_p): Remove typedef.
13468 (DEF_VEC_P(static_tracepoint_marker_p)): Remove.
13469 (struct target_ops) <to_static_tracepoint_marker_at>: Return
13470 bool.
13471 <to_static_tracepoint_markers_by_strid>: Return std::vector.
13472 * target-debug.h
13473 (target_debug_print_VEC_static_tracepoint_marker_p_p): Remove.
13474 (target_debug_print_std_vector_static_tracepoint_marker): New.
13475 (target_debug_print_struct_static_tracepoint_marker_p): Rename
13476 to...
13477 (target_debug_print_static_tracepoint_marker_p): ... this.
13478 * target-delegates.c: Re-generate.
13479 * breakpoint.h (struct tracepoint) <static_trace_marker_id>:
13480 Make std::string.
13481 * breakpoint.c (init_breakpoint_sal): Adjust to std::string.
13482 (decode_static_tracepoint_spec): Adjust to std::vector.
13483 (tracepoint_print_one_detail): Adjust to std::string.
13484 (strace_marker_decode_location): Adjust to std::string.
13485 (update_static_tracepoint): Adjust to std::string, remove call
13486 to release_static_tracepoint_marker.
13487 * linux-nat.c (linux_child_static_tracepoint_markers_by_strid):
13488 Adjust to std::vector.
13489 * remote.c (remote_static_tracepoint_marker_at): Return bool.
13490 (remote_static_tracepoint_markers_by_strid): Adjust to
13491 std::vector.
13492 * common/rsp-low.h (hex2str): New overload with explicit count
13493 of bytes.
13494 * common/rsp-low.c (hex2str): New overload with explicit count
13495 of bytes.
13496 * unittests/rsp-low-selftests.c (test_hex2str): New function.
13497 (_initialize_rsp_low_selftests): Add test_hex2str test.
13498 * unittests/tracepoint-selftests.c
13499 (test_parse_static_tracepoint_marker_definition): Adjust to
13500 std::string.
13501
13502 2018-03-22 Simon Marchi <simon.marchi@polymtl.ca>
13503
13504 * tracepoint.c (parse_static_tracepoint_marker_definition):
13505 Consider case where the definition is followed by more
13506 definitions.
13507 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
13508 tracepoint-selftests.c.
13509 * unittests/tracepoint-selftests.c: New.
13510
13511 2018-03-21 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
13512
13513 * MAINTAINERS (Write After Approval): Add Pedro Franco de
13514 Carvalho.
13515
13516 2018-03-20 Stephen Roberts <stephen.roberts@arm.com>
13517
13518 * symtab.c (find_pc_sect_line): fixed indentation.
13519
13520 2018-03-20 Stephen Roberts <stephen.roberts@arm.com>
13521
13522 * symtab.c (find_pc_sect_line): now uses binary search.
13523
13524 2018-03-19 Tom Tromey <tom@tromey.com>
13525
13526 * rust-exp.y (struct_expr_tail, struct_expr_list): Add plain
13527 "IDENT" production.
13528
13529 2018-03-19 Pedro Alves <palves@redhat.com>
13530 Tom Tromey <tom@tromey.com>
13531
13532 * unittests/observable-selftests.c: New file.
13533 * common/observable.h: New file.
13534 * observable.h: New file.
13535 * ada-lang.c, ada-tasks.c, agent.c, aix-thread.c, annotate.c,
13536 arm-tdep.c, auto-load.c, auxv.c, break-catch-syscall.c,
13537 breakpoint.c, bsd-uthread.c, cli/cli-interp.c, cli/cli-setshow.c,
13538 corefile.c, dummy-frame.c, event-loop.c, event-top.c, exec.c,
13539 extension.c, frame.c, gdbarch.c, guile/scm-breakpoint.c,
13540 infcall.c, infcmd.c, inferior.c, inflow.c, infrun.c, jit.c,
13541 linux-tdep.c, linux-thread-db.c, m68klinux-tdep.c,
13542 mi/mi-cmd-break.c, mi/mi-interp.c, mi/mi-main.c, objfiles.c,
13543 ppc-linux-nat.c, ppc-linux-tdep.c, printcmd.c, procfs.c,
13544 python/py-breakpoint.c, python/py-finishbreakpoint.c,
13545 python/py-inferior.c, python/py-unwind.c, ravenscar-thread.c,
13546 record-btrace.c, record-full.c, record.c, regcache.c, remote.c,
13547 riscv-tdep.c, sol-thread.c, solib-aix.c, solib-spu.c, solib.c,
13548 spu-multiarch.c, spu-tdep.c, stack.c, symfile-mem.c, symfile.c,
13549 symtab.c, thread.c, top.c, tracepoint.c, tui/tui-hooks.c,
13550 tui/tui-interp.c, valops.c: Update all users.
13551 * tui/tui-hooks.c (tui_bp_created_observer)
13552 (tui_bp_deleted_observer, tui_bp_modified_observer)
13553 (tui_inferior_exit_observer, tui_before_prompt_observer)
13554 (tui_normal_stop_observer, tui_register_changed_observer):
13555 Remove.
13556 (tui_observers_token): New global.
13557 (attach_or_detach, tui_attach_detach_observers): New functions.
13558 (tui_install_hooks, tui_remove_hooks): Use
13559 tui_attach_detach_observers.
13560 * record-btrace.c (record_btrace_thread_observer): Remove.
13561 (record_btrace_thread_observer_token): New global.
13562 * observer.sh: Remove.
13563 * observer.c: Rename to observable.c.
13564 * observable.c (namespace gdb_observers): Define new objects.
13565 (observer_debug): Move into gdb_observers namespace.
13566 (struct observer, struct observer_list, xalloc_observer_list_node)
13567 (xfree_observer_list_node, generic_observer_attach)
13568 (generic_observer_detach, generic_observer_notify): Remove.
13569 (_initialize_observer): Update.
13570 Don't include observer.inc.
13571 * Makefile.in (generated_files): Remove observer.h, observer.inc.
13572 (clean mostlyclean): Likewise.
13573 (observer.h, observer.inc): Remove targets.
13574 (SUBDIR_UNITTESTS_SRCS): Add observable-selftests.c.
13575 (COMMON_SFILES): Use observable.c, not observer.c.
13576 * .gitignore: Remove observer.h.
13577
13578 2018-03-18 Tom Tromey <tom@tromey.com>
13579
13580 * solib.c (gdb_bfd_lookup_symbol_from_symtab): Use
13581 gdb::def_vector.
13582 (bfd_lookup_symbol_from_dyn_symtab): Likewise.
13583
13584 2018-03-17 Tom Tromey <tom@tromey.com>
13585
13586 * auto-load.c (auto_load_objfile_script_1): Use std::string.
13587
13588 2018-03-17 Tom Tromey <tom@tromey.com>
13589
13590 * target.c (class scoped_target_fd): New.
13591 (target_fileio_close_cleanup): Remove.
13592 (target_fileio_read_alloc_1): Use scoped_target_fd.
13593
13594 2018-03-16 Simon Marchi <simon.marchi@polymtl.ca>
13595
13596 * silent-rules.mk: New.
13597 * Makefile.in: Include silent-rules.mk
13598 (srcdir, VPATH, top_srcdir): Move up.
13599 (COMPILE): Add ECHO_CXX.
13600 (test-cp-name-parser$(EXEEXT)): Add ECHO_CXXLD.
13601 (init.c): Add ECHO_INIT_C.
13602 (gdb$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
13603 (version.c): Add ECHO_GEN.
13604 (printcmd.o): Add ECHO_CXX.
13605 (target-float.o): Add ECHO_CXX.
13606 (ada-exp.o): Add ECHO_CXX.
13607 (stamp-xml): Add SILENCE and ECHO_GEN_XML_BUILTIN.
13608 (insight$(EXEEXT)): Add ECHO_CXXLD.
13609 * gnulib/configure.ac: Add AM_SILENT_RULES.
13610 * gnulib/aclocal.m4: Re-generate.
13611 * gnulib/configure: Re-generate.
13612 * gnulib/import/Makefile.in: Re-generate.
13613
13614 2018-03-16 Tom Tromey <tom@tromey.com>
13615
13616 * xcoffread.c (xcoff_symfile_offsets): Change type of "addrs".
13617 * utils.h (make_cleanup_free_section_addr_info): Don't declare.
13618 * utils.c (do_free_section_addr_info)
13619 (make_cleanup_free_section_addr_info): Remove.
13620 * symfile.h (struct other_sections): Add constructor.
13621 (struct section_addr_info): Remove.
13622 (section_addr_info): New typedef.
13623 (struct sym_fns) <sym_offsets>: Change type of parameter.
13624 (build_section_addr_info_from_objfile)
13625 (relative_addr_info_to_section_offsets, addr_info_make_relative)
13626 (default_symfile_offsets, symbol_file_add)
13627 (symbol_file_add_from_bfd)
13628 (build_section_addr_info_from_section_table): Update.
13629 (alloc_section_addr_info, free_section_addr_info): Don't declare.
13630 * symfile.c (alloc_section_addr_info): Remove.
13631 (build_section_addr_info_from_section_table): Change return type.
13632 Update.
13633 (build_section_addr_info_from_bfd)
13634 (build_section_addr_info_from_objfile): Likewise.
13635 (free_section_addr_info): Remove.
13636 (relative_addr_info_to_section_offsets): Change type of "addrs".
13637 (addrs_section_compar): Now a std::sort comparator.
13638 (addrs_section_sort): Change return type.
13639 (addr_info_make_relative): Change type of "addrs". Update.
13640 (default_symfile_offsets, syms_from_objfile_1)
13641 (syms_from_objfile, symbol_file_add_with_addrs): Likewise.
13642 (symbol_file_add_separate): Update.
13643 (symbol_file_add): Change type of "addrs". Update.
13644 (add_symbol_file_command): Update. Remove cleanups.
13645 * symfile-mem.c (symbol_file_add_from_memory): Update. Remove
13646 cleanups.
13647 * symfile-debug.c (debug_sym_offsets): Change type of "info".
13648 * solib.c (solib_read_symbols): Update.
13649 * objfiles.c (objfile_relocate): Update. Remove cleanups.
13650 * machoread.c (macho_symfile_offsets): Update.
13651 * jit.c (jit_bfd_try_read_symtab): Update.
13652
13653 2018-03-15 Simon Marchi <simon.marchi@polymtl.ca>
13654
13655 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
13656 unittests/utils-selftests.c.
13657 * unittests/utils-selftests.c: New file.
13658
13659 2018-03-14 Tom Tromey <tom@tromey.com>
13660
13661 PR cli/14977:
13662 * printcmd.c (printf_c_string, printf_wide_c_string): Special case
13663 for NULL.
13664
13665 2018-03-14 Tom Tromey <tom@tromey.com>
13666
13667 PR cli/19918:
13668 * printcmd.c (printf_pointer): Allow "-" in format.
13669
13670 2018-03-14 Tom Tromey <tom@tromey.com>
13671
13672 * printcmd.c (_initialize_printcmd): Add usage to printf.
13673
13674 2018-03-14 Yao Qi <qiyao@sourceware.org>
13675
13676 * MAINTAINERS: Update my email address.
13677
13678 2018-03-13 Tom Tromey <tom@tromey.com>
13679
13680 * machoread.c (macho_check_dsym): Change filenamep to a
13681 std::string*.
13682 (macho_symfile_read): Update.
13683 * symfile.c (load_command): Use std::string.
13684
13685 2018-03-12 Andrew Burgess <andrew.burgess@embecosm.com>
13686
13687 * riscv-tdep.c (riscv_sw_breakpoint_from_kind): Add localization
13688 to error message string.
13689 (riscv_register_name): Use xsnprintf instead of sprintf.
13690 (riscv_insn::fetch_instruction): Use gdb_assert instead of
13691 internal_error.
13692 (riscv_print_arg_location): Use gdb_assert_not_reached instead of
13693 error.
13694 (riscv_push_dummy_call): Likewise.
13695
13696 2018-03-12 Tom Tromey <tom@tromey.com>
13697
13698 * rs6000-aix-tdep.c (rs6000_aix_core_xfer_shared_libraries_aix):
13699 Use gdb::byte_vector.
13700 * arm-tdep.c (arm_exidx_new_objfile): Use gdb::byte_vector.
13701
13702 2018-03-12 Yao Qi <yao.qi@linaro.org>
13703
13704 * ia64-libunwind-tdep.c (libunwind_get_reg_special): Change
13705 parameter type to readable_regcache.
13706 * ia64-libunwind-tdep.h (libunwind_get_reg_special): Update
13707 the declaration.
13708
13709 2018-03-11 Tom Tromey <tom@tromey.com>
13710
13711 * dwarf2read.c (struct nextfield): Add initializers.
13712 (struct nextfnfield): Remove.
13713 (struct fnfieldlist): Add initializers. Remove "length" and
13714 "head", use std::vector.
13715 (struct decl_field_list): Remove.
13716 (struct field_info): Add initializers.
13717 <fields, baseclasses>: Now std::vector.
13718 <nbaseclasses, nfnfields, typedef_field_list_count,
13719 nested_types_list_count>: Remove.
13720 (dwarf2_add_field, dwarf2_add_type_defn)
13721 (dwarf2_attach_fields_to_type, dwarf2_add_member_fn)
13722 (dwarf2_attach_fn_fields_to_type, handle_struct_member_die)
13723 (process_structure_scope): Update.
13724
13725 2018-03-11 Tom Tromey <tom@tromey.com>
13726
13727 * dwarf2read.c (sort_tu_by_abbrev_offset): Change to be suitable
13728 for use by std::sort.
13729 (build_type_psymtabs_1): Use std::vector.
13730
13731 2018-03-09 Eli Zaretskii <eliz@gnu.org>
13732
13733 * top.c (print_gdb_configuration): Reflect LIBIPT, LIBMEMCHECK,
13734 and LIBMPFR in the printed configuration.
13735
13736 2018-03-08 Tom Tromey <tom@tromey.com>
13737
13738 * source.c (get_filename_and_charpos): Use scoped_fd.
13739 * nto-procfs.c (procfs_open_1): Use scoped_fd.
13740 (procfs_pidlist): Likewise.
13741 * procfs.c (proc_get_LDT_entry): Use scoped_fd.
13742 (iterate_over_mappings): Likewise.
13743
13744 2018-03-08 Tom Tromey <tom@tromey.com>
13745
13746 * infcall.c (struct call_return_meta_info)
13747 <stack_temporaries_enabled>: Remove.
13748 (get_call_return_value, call_function_by_hand_dummy): Update.
13749 * thread.c (disable_thread_stack_temporaries): Remove.
13750 (enable_thread_stack_temporaries): Remove.
13751 (thread_stack_temporaries_enabled_p): Return bool.
13752 (push_thread_stack_temporary, value_in_thread_stack_temporaries)
13753 (get_last_thread_stack_temporary): Update.
13754 * eval.c (evaluate_subexp): Update.
13755 * gdbthread.h (class enable_thread_stack_temporaries): Now a
13756 class, not a function.
13757 (value_ptr, value_vec): Remove typedefs.
13758 (class thread_info) <stack_temporaries_enabled>: Now bool.
13759 <stack_temporaries>: Now a std::vector.
13760 (thread_stack_temporaries_enabled_p)
13761 (value_in_thread_stack_temporaries): Return bool.
13762
13763 2018-03-08 Simon Marchi <simon.marchi@ericsson.com>
13764
13765 * remote.c (putpkt_binary): Fix omitted bytes reporting.
13766 (getpkt_or_notif_sane_1): Likewise.
13767
13768 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
13769
13770 * build-id.c (build_id_to_debug_bfd): Use std::string.
13771
13772 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
13773
13774 * build-id.c (find_separate_debug_file_by_buildid): Return
13775 std::string.
13776 * build-id.h (find_separate_debug_file_by_buildid): Return
13777 std::string.
13778 * coffread.c (coff_symfile_read): Adjust to std::string.
13779 * elfread.c (elf_symfile_read): Adjust to std::string.
13780 * symfile.c (separate_debug_file_exists): Change parameter to
13781 std::string.
13782 (find_separate_debug_file): Return std::string.
13783 (find_separate_debug_file_by_debuglink): Return std::string.
13784 * symfile.h (find_separate_debug_file_by_debuglink): Return
13785 std::string.
13786
13787 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
13788
13789 * common/xml-utils.c (xml_escape_text): Move code to...
13790 (xml_escape_text_append): ... this new function.
13791 * common/xml-utils.h (xml_escape_text_append): New declaration.
13792 * unittests/xml-utils-selftests.c (test_xml_escape_text_append):
13793 New function.
13794 (_initialize_xml_utils): register test_xml_escape_text_append as
13795 a selftest.
13796
13797 2018-03-07 Alan Hayward <alan.hayward@arm.com>
13798
13799 * defs.h: Remove MAX_REGISTER_SIZE.
13800 * regcache.c (init_regcache_descr): Remove MAX_REGISTER_SIZE
13801 asserts.
13802 * python/py-unwind.c (pyuw_sniffer): Likewise.
13803
13804 2018-03-07 Tom Tromey <tom@tromey.com>
13805
13806 * linux-tdep.c (linux_info_proc): Update.
13807 * target.h (struct target_ops) <to_fileio_readlink>: Return
13808 optional<string>.
13809 (target_fileio_readlink): Return optional<string>.
13810 * remote.c (remote_hostio_readlink): Return optional<string>.
13811 * inf-child.c (inf_child_fileio_readlink): Return
13812 optional<string>.
13813 * target.c (target_fileio_readlink): Return optional<string>.
13814
13815 2018-03-07 Andrew Burgess <andrew.burgess@embecosm.com>
13816
13817 * regcache.c (cooked_read_test): Add riscv to the list of
13818 architectures that have a save_reggroup.
13819
13820 2018-03-07 Andreas Arnez <arnez@linux.vnet.ibm.com>
13821
13822 * gnu-v3-abi.c (gnuv3_rtti_type): Add early exit if the given
13823 value is not a dynamic class object.
13824
13825 2018-03-06 Tom Tromey <tom@tromey.com>
13826
13827 * rust-exp.y: Formatting fixes.
13828
13829 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
13830
13831 * riscv-tdep.c (riscv_register_name): Remove target description
13832 support.
13833 (riscv_gdbarch_init): Remove target description check.
13834
13835 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
13836
13837 * riscv-tdep.c: Remove 'Contributed by ...' lines from header
13838 comment.
13839 * riscv-tdep.h: Likewise.
13840
13841 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
13842
13843 * riscv-tdep.c (riscv_pseudo_register_read): Delete.
13844 (riscv_pseudo_register_write): Delete.
13845 (riscv_gdbarch_init): Remove all use of pseudo registers.
13846
13847 2018-03-06 Simon Marchi <simon.marchi@polymtl.ca>
13848
13849 * record-btrace.c (btrace_print_lines): Replace cleanup
13850 parameter with RAII equivalents.
13851 (btrace_insn_history): Replace cleanup with RAII equivalents.
13852 * ui-out.h (make_cleanup_ui_out_list_begin_end,
13853 make_cleanup_ui_out_tuple_begin_end): Remove.
13854 * ui-out.c (struct ui_out_end_cleanup_data, do_cleanup_end,
13855 make_cleanup_ui_out_end, make_cleanup_ui_out_tuple_begin_end,
13856 make_cleanup_ui_out_list_begin_end): Remove.
13857
13858 2018-03-06 Simon Marchi <simon.marchi@polymtl.ca>
13859
13860 * record-btrace.c (record_btrace_maybe_mark_async_event): Change
13861 parameter types to std::vector. Use bool.
13862 (record_btrace_wait): Replace VEC(tp_t) with
13863 std::vector<thread_info *>.
13864 * common/gdb_vecs.h (unordered_remove, ordered_remove): New.
13865
13866 2018-03-06 Simon Marchi <simon.marchi@polymtl.ca>
13867
13868 * record-btrace.c (record_btrace_disable_callback): Remove.
13869 (struct scoped_btrace_disable): New.
13870 (record_btrace_open): Use scoped_btrace_disable.
13871
13872 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
13873
13874 * riscv-tdep.c (riscv_return_value): Change type to ULONGEST for
13875 reading values from registers.
13876
13877 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
13878
13879 * riscv-tdep.c (riscv_push_dummy_call): Use core_addr_to_string_nz
13880 where appropriate.
13881
13882 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
13883
13884 * riscv-tdep.c (riscv_print_arg_location): Add header comment,
13885 change parameter type. Use GDB's print functions, and use
13886 core_addr_to_string where appropriate.
13887 (riscv_push_dummy_call): Use core_addr_to_string where
13888 appropriate, update call to riscv_print_arg_location, and reindent
13889 a few lines.
13890 (riscv_return_value): Update call to riscv_print_arg_location.
13891
13892 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
13893 Tim Newsome <tim@sifive.com>
13894 Albert Ou <a0u@eecs.berkeley.edu>
13895 Darius Rad <darius@bluespec.com>
13896
13897 * Makefile.in (ALL_TARGET_OBS): Add riscv-tdep.o
13898 (HFILES_NO_SRCDIR): Add riscv-tdep.h.
13899 (ALLDEPFILES): Add riscv-tdep.c
13900 * configure.tgt: Add riscv support.
13901 * riscv-tdep.c: New file.
13902 * riscv-tdep.h: New file.
13903 * NEWS: Mention new target.
13904 * MAINTAINERS: Add entry for riscv.
13905
13906 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
13907
13908 * amd64-tdep.c (amd64_classify_aggregate): Ignore zero sized
13909 fields within aggregates.
13910
13911 2018-03-04 Simon Marchi <simon.marchi@polymtl.ca>
13912
13913 * record-btrace.c (btrace_print_lines): Change type of flags to
13914 gdb_disassembly_flags.
13915
13916 2018-03-04 John Baldwin <jhb@FreeBSD.org>
13917
13918 * fbsd-nat.c: Include "inf-ptrace.h".
13919 (USE_SIGTRAP_SIGINFO): Conditionally define.
13920 [USE_SIGTRAP_SIGINFO] (fbsd_handle_debug_trap): New function.
13921 (fbsd_wait) [USE_SIGTRAP_SIGINFO]: Call "fbsd_handle_debug_trap".
13922 [USE_SIGTRAP_SIGINFO] (fbsd_stopped_by_sw_breakpoint): New
13923 function.
13924 [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_sw_breakpoint):
13925 Likewise.
13926 [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_hw_breakpoint):
13927 Likewise.
13928 (fbsd_nat_add_target) [USE_SIGTRAP_SIGINFO]: Set
13929 "stopped_by_sw_breakpoint", "supports_stopped_by_sw_breakpoint",
13930 "supports_stopped_by_hw_breakpoint" target methods.
13931
13932 2018-03-04 John Baldwin <jhb@FreeBSD.org>
13933
13934 * NEWS (Changes since GDB 8.1): Add "set/show debug fbsd-nat".
13935 * fbsd-nat.c (debug_fbsd_nat): New variable.
13936 (show_fbsd_nat_debug): New function.
13937 (fbsd_wait): Log LWP info if "debug_fbsd_nat" is enabled.
13938 (_initialize_fbsd_nat): Add "fbsd-nat" debug boolean command.
13939
13940 2018-03-04 John Baldwin <jhb@FreeBSD.org>
13941
13942 * nat/x86-dregs.c (x86_dr_stopped_by_hw_breakpoint): New function.
13943 * nat/x86-dregs.h (x86_dr_stopped_by_hw_breakpoint): New
13944 prototype.
13945 * x86-nat.c (x86_stopped_by_hw_breakpoint): New function.
13946 (x86_use_watchpoints): Set "stopped_by_hw_breakpoint" target
13947 method.
13948
13949 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
13950
13951 * common/gdb_vecs.c (free_char_ptr_vec): Remove.
13952 * common/gdb_vecs.h (free_char_ptr_vec): Remove.
13953
13954 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
13955
13956 * charset.c (struct charset_vector): New.
13957 (charsets): Change type to charset_vector.
13958 (find_charset_names): Adjust.
13959 (add_one): Adjust.
13960 (_initialize_charset): Adjust.
13961
13962 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
13963
13964 * progspace.h (struct program_space) <deleted_solibs>: Change
13965 type to std::vector<std::string>.
13966 * progspace.c (clear_program_space_solib_cache): Adjust.
13967 * breakpoint.c (print_solib_event): Adjust.
13968 (check_status_catch_solib): Adjust.
13969 * solib.c (update_solib_list): Adjust.
13970 * ui-out.h (class ui_out) <field_string>: New overload.
13971 * ui-out.c (ui_out::field_string): New overload.
13972
13973 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
13974
13975 * progspace.h (struct program_space): Add constructor and
13976 destructor, initialize fields.
13977 (add_program_space): Remove.
13978 * progspace.c (add_program_space): Rename to...
13979 (program_space::program_space): ... this.
13980 (release_program_space): Rename to...
13981 (program_space::~program_space): ... this.
13982 (delete_program_space): Use delete to delete program_space.
13983 (initialize_progspace): Use new to allocate program_space.
13984 * inferior.c (add_inferior_with_spaces): Likewise.
13985 (clone_inferior_command): Likewise.
13986 * infrun.c (follow_fork_inferior): Likewise.
13987 (handle_vfork_child_exec_or_exit): Likewise.
13988
13989 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
13990
13991 * common/gdb_vecs.h (make_cleanup_free_char_ptr_vec): Remove.
13992 (delim_string_to_char_ptr_vec): Return std::vector of
13993 gdb::unique_xmalloc_ptr.
13994 (dirnames_to_char_ptr_vec_append): Take std::vector of
13995 gdb::unique_xmalloc_ptr.
13996 (dirnames_to_char_ptr_vec): Return std::vector of
13997 gdb::unique_xmalloc_ptr.
13998 * common/gdb_vecs.c (delim_string_to_char_ptr_vec_append):
13999 Take std::vector of gdb::unique_xmalloc_ptr, adjust the code.
14000 (delim_string_to_char_ptr_vec): Return an std::vector of
14001 gdb::unique_xmalloc_ptr, adjust the code.
14002 (dirnames_to_char_ptr_vec_append): Take an std::vector of
14003 gdb::unique_xmalloc_ptr, adjust the code.
14004 (dirnames_to_char_ptr_vec): Return an std::vector of
14005 gdb::unique_xmalloc_ptr, adjust the code.
14006 * auto-load.c (auto_load_safe_path_vec): Change type to
14007 std::vector of gdb::unique_xmalloc_ptr.
14008 (auto_load_expand_dir_vars): Return an std::vector of
14009 gdb::unique_xmalloc_ptr, adjust the code.
14010 (auto_load_safe_path_vec_update): Adjust.
14011 (filename_is_in_auto_load_safe_path_vec): Adjust.
14012 (auto_load_objfile_script_1): Adjust.
14013 * build-id.c (build_id_to_debug_bfd): Adjust.
14014 * linux-thread-db.c (thread_db_load_search): Adjust.
14015 * source.c (add_path): Adjust.
14016 (openp): Adjust.
14017 * symfile.c (find_separate_debug_file): Adjust.
14018 * utils.c (do_free_char_ptr_vec): Remove.
14019 (make_cleanup_free_char_ptr_vec): Remove.
14020
14021 2018-03-01 Sergio Durigan Junior <sergiodj@redhat.com>
14022
14023 PR gdb/22907
14024 * common/pathstuff.c: Conditionally include "<windows.h>".
14025
14026 2018-03-01 Georg Sauthoff <mail@georg.so>
14027
14028 PR gdb/22888
14029 * gcore.in: Quote variables and switch interpreter to bash.
14030
14031 2018-03-01 Tom Tromey <tom@tromey.com>
14032
14033 * dwarf2read.c (alloc_discriminant_info): Fix default_index
14034 assertion. Add assertion for discriminant_index.
14035 (quirk_rust_enum): Use correct base type name in univariant case.
14036
14037 2018-03-01 Simon Marchi <simon.marchi@ericsson.com>
14038
14039 * record.c (get_call_history_modifiers): Return a
14040 record_print_flags.
14041 (cmd_record_call_history): Adjust.
14042 * record-btrace.c (record_btrace_call_history): Adjust.
14043 (record_btrace_call_history_range): Adjust.
14044 (record_btrace_call_history_from): Adjust.
14045 * target-debug.h (target_debug_print_record_print_flags): New.
14046 * target-delegates.c: Re-generate.
14047 * target.c (target_call_history): Change flags type.
14048 (target_call_history_from): Likewise.
14049 (target_call_history_range): Likewise.
14050 * target.h (struct target_ops) <target_call_history>: Likewise.
14051 (target_call_history_from): Likewise.
14052 (target_call_history_range): Likewise.
14053
14054 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
14055 Simon Marchi <simon.marchi@polymtl.ca>
14056
14057 * common/common-utils.c: Include "sys/stat.h".
14058 (is_regular_file): Move here from "source.c"; change return
14059 type to "bool".
14060 * common/common-utils.h (is_regular_file): New prototype.
14061 * common/pathstuff.c (contains_dir_separator): New function.
14062 * common/pathstuff.h (contains_dir_separator): New prototype.
14063 * source.c: Don't include "sys/stat.h".
14064 (is_regular_file): Move to "common/common-utils.c".
14065
14066 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
14067
14068 * Makefile.in (COMMON_SFILES): Add "common/pathstuff.c".
14069 (HFILES_NO_SRCDIR): Add "common/pathstuff.h".
14070 * auto-load.c: Include "common/pathstuff.h".
14071 * common/common-def.h (current_directory): Move here.
14072 * common/gdb_tilde_expand.c (gdb_tilde_expand_up): New
14073 function.
14074 * common/gdb_tilde_expand.h (gdb_tilde_expand_up): New
14075 prototype.
14076 * common/pathstuff.c: New file.
14077 * common/pathstuff.h: New file.
14078 * compile/compile.c: Include "common/pathstuff.h".
14079 * defs.h (current_directory): Move to "common/common-defs.h".
14080 * dwarf2read.c: Include "common/pathstuff.h".
14081 * exec.c: Likewise.
14082 * guile/scm-safe-call.c: Likewise.
14083 * linux-thread-db.c: Likewise.
14084 * main.c: Likewise.
14085 * nto-tdep.c: Likewise.
14086 * objfiles.c: Likewise.
14087 * source.c: Likewise.
14088 * symtab.c: Likewise.
14089 * utils.c: Include "common/pathstuff.h".
14090 (gdb_realpath): Move to "common/pathstuff.c".
14091 (gdb_realpath_keepfile): Likewise.
14092 (gdb_abspath): Likewise.
14093 * utils.h (gdb_realpath): Move to "common/pathstuff.h".
14094 (gdb_realpath_keepfile): Likewise.
14095 (gdb_abspath): Likewise.
14096
14097 2018-02-28 John Baldwin <jhb@FreeBSD.org>
14098
14099 * fbsd-nat.c (fbsd_resume): Use PT_SETSTEP for stepping and a
14100 wildcard process pid for super_resume for kernels with a
14101 specific bug.
14102
14103 2018-02-27 Phil Muldoon <pmuldoon@redhat.com>
14104
14105 * compile/compile.c (get_args): Add additional comments
14106 explaining function.
14107
14108 2018-02-27 Simon Marchi <simon.marchi@polymtl.ca>
14109 Tom Tromey <tom@tromey.com>
14110
14111 * target.h (memory_write_request_s): Remove typedef. Don't define
14112 VEC.
14113 (target_write_memory_blocks): Change argument to std::vector.
14114 (struct memory_write_request): Add constructor.
14115 * target-memory.c (compare_block_starting_address): Return bool.
14116 Change argument types.
14117 (claim_memory): Change arguments to use std::vector.
14118 (split_regular_and_flash_blocks, blocks_to_erase)
14119 (compute_garbled_blocks): Likewise.
14120 (cleanup_request_data, cleanup_write_requests_vector): Remove.
14121 (target_write_memory_blocks): Change argument to std::vector.
14122 * symfile.c (struct load_section_data): Add constructor and
14123 destructor. Use std::vector for "requests".
14124 (struct load_progress_data): Add initializers.
14125 (load_section_callback): Update. Use "new".
14126 (clear_memory_write_data): Remove.
14127 (generic_load): Update.
14128
14129 2018-02-27 Alan Hayward <alan.hayward@arm.com>
14130
14131 * arch/aarch64.h: Use common/tdesc.h.
14132
14133 2018-02-26 Maciej W. Rozycki <macro@mips.com>
14134
14135 * mips-tdep.c (mips_gdbarch_init): Don't use a 32-bit BFD
14136 architecture with a 64-bit ABI.
14137
14138 2018-02-26 Maciej W. Rozycki <macro@mips.com>
14139
14140 * gdb/mips-tdep.c (mips_gdbarch_init): Reorder ABI determination
14141 ahead of target description loading.
14142
14143 2018-02-26 Tom Tromey <tom@tromey.com>
14144
14145 * stack.c (backtrace_command_1): Update.
14146 * python/python-internal.h (gdbpy_apply_frame_filter): Change type
14147 of "flags".
14148 * python/py-framefilter.c (py_print_frame)
14149 (gdbpy_apply_frame_filter): Change type of "flags".
14150 * mi/mi-cmd-stack.c (mi_apply_ext_lang_frame_filter): Change type
14151 of "flags".
14152 (mi_cmd_stack_list_frames, mi_cmd_stack_list_locals)
14153 (mi_cmd_stack_list_args, mi_cmd_stack_list_variables): Update.
14154 * extension.h (enum frame_filter_flag): Rename from
14155 frame_filter_flags.
14156 (frame_filter_flags): Define using DEF_ENUM_FLAGS_TYPE.
14157 (apply_ext_lang_frame_filter): Change type of "flags".
14158 * extension.c (apply_ext_lang_frame_filter): Change type of
14159 "flags".
14160 * extension-priv.h (struct extension_language_ops)
14161 <apply_frame_filter>: Change type of "flags".
14162
14163 2018-02-26 Tom Tromey <tom@tromey.com>
14164
14165 PR python/16497:
14166 * stack.c (backtrace_command_1): Set PRINT_MORE_FRAMES flag. Fix
14167 off-by-one in py_end computation.
14168 * python/py-framefilter.c (gdbpy_apply_frame_filter): Handle
14169 PRINT_MORE_FRAMES.
14170 * extension.h (enum frame_filter_flags) <PRINT_MORE_FRAMES>: New
14171 constant.
14172
14173 2018-02-26 Tom Tromey <tom@tromey.com>
14174
14175 * dwarf2read.c (struct variant_field): New.
14176 (struct nextfield) <variant>: New field.
14177 (dwarf2_add_field): Handle DW_TAG_variant_part.
14178 (dwarf2_attach_fields_to_type): Attach a discriminant_info to a
14179 discriminated union.
14180 (read_structure_type): Handle DW_TAG_variant_part.
14181 (handle_struct_member_die): New function, extracted from
14182 process_structure_scope. Handle DW_TAG_variant.
14183 (process_structure_scope): Handle discriminated unions. Call
14184 handle_struct_member_die.
14185
14186 2018-02-26 Tom Tromey <tom@tromey.com>
14187
14188 * rust-lang.h (rust_last_path_segment): Declare.
14189 * rust-lang.c (rust_last_path_segment): Now public. Change
14190 contract.
14191 (struct disr_info): Remove.
14192 (RUST_ENUM_PREFIX, RUST_ENCODED_ENUM_REAL)
14193 (RUST_ENCODED_ENUM_HIDDEN, rust_union_is_untagged)
14194 (rust_get_disr_info, rust_tuple_variant_type_p): Remove.
14195 (rust_enum_p, rust_enum_variant): New function.
14196 (rust_underscore_fields): Remove "offset" parameter.
14197 (rust_print_enum): New function.
14198 (rust_val_print) <TYPE_CODE_UNION>: Remove enum code.
14199 <TYPE_CODE_STRUCT>: Call rust_print_enum when appropriate.
14200 (rust_print_struct_def): Add "for_rust_enum" parameter. Handle
14201 enums.
14202 (rust_internal_print_type): New function, from rust_print_type.
14203 Remove enum code.
14204 (rust_print_type): Call rust_internal_print_type.
14205 (rust_evaluate_subexp) <STRUCTOP_ANONYMOUS, STRUCTOP_STRUCT>:
14206 Update enum handling.
14207 * dwarf2read.c (struct dwarf2_cu) <rust_unions>: New field.
14208 (rust_fully_qualify, alloc_discriminant_info, quirk_rust_enum)
14209 (rust_union_quirks): New functions.
14210 (process_full_comp_unit, process_full_type_unit): Call
14211 rust_union_quirks.
14212 (process_structure_scope): Update rust_unions if necessary.
14213
14214 2018-02-26 Tom Tromey <tom@tromey.com>
14215
14216 * value.h (value_union_variant): Declare.
14217 * valops.c (value_union_variant): New function.
14218 * gdbtypes.h (TYPE_FLAG_DISCRIMINATED_UNION): New macro.
14219 (struct discriminant_info): New.
14220 (enum dynamic_prop_node_kind) <DYN_PROP_DISCRIMINATED>: New
14221 enumerator.
14222 (struct main_type) <flag_discriminated_union>: New field.
14223
14224 2018-02-26 Tom Tromey <tom@tromey.com>
14225
14226 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
14227 unittests/unpack-selftests.c.
14228 * unittests/unpack-selftests.c: New file.
14229 * value.c (unpack_bits_as_long): Fix bugs in non-bitfield cases.
14230
14231 2018-02-26 Yao Qi <yao.qi@linaro.org>
14232
14233 * dwarf2read.c (struct partial_die_info) <read>: New method.
14234 (read_partial_die): Remove the declaration.
14235 (load_partial_dies): Update.
14236 (partial_die_info::partial_die_info):
14237 (read_partial_die): Change it to partial_die_info::read.
14238
14239 2018-02-26 Yao Qi <yao.qi@linaro.org>
14240
14241 * dwarf2read.c (struct partial_die_info) <fixup>: New method.
14242 (fixup_partial_die): Remove declaration.
14243 (scan_partial_symbols): Update.
14244 (partial_die_parent_scope): Likewise.
14245 (partial_die_full_name): Likewise.
14246 (fixup_partial_die): Change it to partial_die_info::fixup.
14247
14248 2018-02-26 Yao Qi <yao.qi@linaro.org>
14249
14250 * dwarf2read.c (read_partial_die): Update the declaration.
14251 (load_partial_dies): Caller update.
14252 (read_partial_die): Remove one argument abbrev_len.
14253
14254 2018-02-26 Yao Qi <yao.qi@linaro.org>
14255
14256 * dwarf2read.c (struct partial_die_info): Add ctor, delete
14257 assignment operator.
14258 (load_partial_dies): Use ctor and copy ctor.
14259 (read_partial_die): Update.
14260 (dwarf2_cu::find_partial_die): Use ctor.
14261
14262 2018-02-26 Yao Qi <yao.qi@linaro.org>
14263
14264 * dwarf2read.c (struct dwarf2_cu) <find_partial_die>: New method.
14265 (find_partial_die_in_comp_unit): Change it to
14266 dwarf2_cu::find_partial_die.
14267 (find_partial_die): Update.
14268
14269 2018-02-26 Yao Qi <yao.qi@linaro.org>
14270
14271 * dwarf2read.c (read_partial_die): Remove the code checking abbrev
14272 is NULL.
14273
14274 2018-02-26 Yao Qi <yao.qi@linaro.org>
14275
14276 * dwarf2read.c (load_partial_dies): Move the location of XOBNEW.
14277
14278 2018-02-26 Alan Hayward <alan.hayward@arm.com>
14279
14280 * arch/amd64.h: Use common/tdesc.h.
14281 * arch/i386.c: Likewise.
14282 * arch/i386.h: Likewise.
14283 * arch/tic6x.c: Likewise.
14284 * arch/tdesc.h: Move file from here...
14285 * common/tdesc.h: ...to here.
14286 * features/aarch64-core.c: Regenerate.
14287 * features/aarch64-fpu.c: Regenerate.
14288 * features/i386/32bit-avx.c: Regenerate.
14289 * features/i386/32bit-avx512.c: Regenerate.
14290 * features/i386/32bit-core.c: Regenerate.
14291 * features/i386/32bit-linux.c: Regenerate.
14292 * features/i386/32bit-mpx.c: Regenerate.
14293 * features/i386/32bit-pkeys.c: Regenerate.
14294 * features/i386/32bit-sse.c: Regenerate.
14295 * features/i386/64bit-avx.c: Regenerate.
14296 * features/i386/64bit-avx512.c: Regenerate.
14297 * features/i386/64bit-core.c: Regenerate.
14298 * features/i386/64bit-linux.c: Regenerate.
14299 * features/i386/64bit-mpx.c: Regenerate.
14300 * features/i386/64bit-pkeys.c: Regenerate.
14301 * features/i386/64bit-segments.c: Regenerate.
14302 * features/i386/64bit-sse.c: Regenerate.
14303 * features/i386/x32-core.c: Regenerate.
14304 * features/tic6x-c6xp.c: Regenerate.
14305 * features/tic6x-core.c: Regenerate.
14306 * features/tic6x-gp.c: Regenerate.
14307 * target-descriptions.c: Use common/tdesc.h.
14308 * target-descriptions.h: Likewise.
14309
14310 2018-02-24 Tom Tromey <tom@tromey.com>
14311
14312 * linux-thread-db.c (try_thread_db_load_from_pdir_1)
14313 (try_thread_db_load_from_dir, thread_db_load_search): Use
14314 std::string.
14315 (info_auto_load_libthread_db_compare): Return bool. Change
14316 argument types.
14317 (info_auto_load_libthread_db): Use std::vector, std::string.
14318 Remove cleanups.
14319
14320 2018-02-24 Tom Tromey <tom@tromey.com>
14321
14322 * i386-tdep.c (i386_fast_tracepoint_valid_at): "msg" now a
14323 std::string.
14324 * gdbarch.sh (fast_tracepoint_valid_at): Change "msg" to a
14325 std::string*.
14326 * gdbarch.c: Rebuild.
14327 * gdbarch.h: Rebuild.
14328 * breakpoint.c (check_fast_tracepoint_sals): Use std::string.
14329 * arch-utils.h (default_fast_tracepoint_valid_at): Update.
14330 * arch-utils.c (default_fast_tracepoint_valid_at): "msg" now a
14331 std::string*.
14332
14333 2018-02-23 Simon Marchi <simon.marchi@polymtl.ca>
14334
14335 * gdbtypes.h (sect_offset): Change type to uint64_t.
14336 (sect_offset_str): New function.
14337 * dwarf2read.c (create_addrmap_from_aranges): Use
14338 sect_offset_str.
14339 (error_check_comp_unit_head): Likewise.
14340 (create_debug_type_hash_table): Likewise.
14341 (read_cutu_die_from_dwo): Likewise.
14342 (init_cutu_and_read_dies): Likewise.
14343 (init_cutu_and_read_dies_no_follow): Likewise.
14344 (process_psymtab_comp_unit_reader): Likewise.
14345 (partial_die_parent_scope): Likewise.
14346 (peek_die_abbrev): Likewise.
14347 (process_queue): Likewise.
14348 (dwarf2_physname): Likewise.
14349 (read_namespace_alias): Likewise.
14350 (read_import_statement): Likewise.
14351 (create_dwo_cu_reader): Likewise.
14352 (create_cus_hash_table): Likewise.
14353 (lookup_dwo_cutu): Likewise.
14354 (inherit_abstract_dies): Likewise.
14355 (read_func_scope): Likewise.
14356 (read_call_site_scope): Likewise.
14357 (dwarf2_add_member_fn): Likewise.
14358 (read_common_block): Likewise.
14359 (read_module_type): Likewise.
14360 (read_typedef): Likewise.
14361 (read_subrange_type): Likewise.
14362 (load_partial_dies): Likewise.
14363 (read_partial_die): Likewise.
14364 (find_partial_die): Likewise.
14365 (read_str_index): Likewise.
14366 (dwarf2_string_attr): Likewise.
14367 (build_error_marker_type): Likewise.
14368 (lookup_die_type): Likewise.
14369 (dump_die_shallow): Likewise.
14370 (follow_die_ref): Likewise.
14371 (dwarf2_fetch_die_loc_sect_off): Likewise.
14372 (dwarf2_fetch_constant_bytes): Likewise.
14373 (follow_die_sig): Likewise.
14374 (get_signatured_type): Likewise.
14375 (get_DW_AT_signature_type): Likewise.
14376 (dwarf2_find_containing_comp_unit): Likewise.
14377 (set_die_type): Likewise.
14378
14379 2018-02-21 John Baldwin <jhb@FreeBSD.org>
14380
14381 * arch/aarch64.c: Include "common-defs.h".
14382 * arch/amd64.c: Likewise.
14383 * arch/i386.c: Likewise.
14384
14385 2018-02-21 Tom Tromey <tom@tromey.com>
14386
14387 * value.h: (extract_field_op): Update.
14388 * eval.c (extract_field_op): Return a const char *.
14389 * expression.h (parse_expression_for_completion): Update.
14390 * completer.c (complete_expression): Update.
14391 (add_struct_fields): Make fieldname const.
14392 * parse.c (expout_completion_name): Now a unique_xmalloc_ptr.
14393 (mark_completion_tag, parse_exp_in_context_1): Update.
14394 (parse_expression_for_completion): Change "name" to
14395 unique_xmalloc_ptr*.
14396
14397 2018-02-21 Tom Tromey <tom@tromey.com>
14398
14399 * infcall.c (call_function_by_hand_dummy): Use std::vector.
14400
14401 2018-02-21 Yao Qi <yao.qi@linaro.org>
14402
14403 * avr-tdep.c (avr_read_pc): Change parameter type to
14404 readable_regcache.
14405 * gdbarch.sh (read_pc): Likewise.
14406 * gdbarch.c: Re-generated.
14407 * gdbarch.h: Re-generated.
14408 * hppa-tdep.c (hppa_read_pc): Change parameter type to
14409 readable_regcache.
14410 * ia64-tdep.c (ia64_read_pc): Likewise.
14411 * mips-tdep.c (mips_read_pc): Likewise.
14412 * spu-tdep.c (spu_read_pc): Likewise.
14413
14414 2018-02-21 Yao Qi <yao.qi@linaro.org>
14415
14416 * Makefile.in (COMMON_SFILES): Add regcache-dump.c
14417 * regcache-dump.c: New file.
14418 * regcache.c: Move register_dump to regcache-dump.c.
14419 (maintenance_print_registers): Likewise.
14420 (maintenance_print_raw_registers): Likewise.
14421 (maintenance_print_cooked_registers): Likewise.
14422 (maintenance_print_register_groups): Likewise.
14423 (maintenance_print_remote_registers): Likewise.
14424 (_initialize_regcache): Likewise.
14425 * regcache.h (register_dump): Moved from regcache.c.
14426
14427 2018-02-21 Yao Qi <yao.qi@linaro.org>
14428
14429 * regcache.c (regcache::regcache): Update.
14430 (regcache::invalidate): Move it to detached_regcache::invalidate.
14431 (get_thread_arch_aspace_regcache): Update.
14432 (regcache::raw_update): Update.
14433 (regcache::cooked_read): Remove some code.
14434 (regcache::cooked_read_value): Likewise.
14435 (regcache::raw_write): Remove assert on m_readonly_p.
14436 (regcache::raw_supply_integer): Move it to
14437 detached_regcache::raw_supply_integer.
14438 (regcache::raw_supply_zeroed): Likewise.
14439 * regcache.h (detached_regcache) <raw_supply_integer>: New
14440 declaration.
14441 <raw_supply_zeroed, invalidate>: Likewise.
14442 (regcache) <raw_supply_integer, raw_supply_zeroed>: Removed.
14443 <invalidate>: Likewise.
14444 <m_readonly_p>: Removed.
14445
14446 2018-02-21 Yao Qi <yao.qi@linaro.org>
14447
14448 * infcmd.c (get_return_value): Let stop_regs point to
14449 get_current_regcache.
14450 * regcache.c (regcache::regcache): Remove.
14451 (register_dump_reg_buffer): New class.
14452 (regcache_print): Adjust.
14453 * regcache.h (regcache): Remove constructors.
14454
14455 2018-02-21 Yao Qi <yao.qi@linaro.org>
14456
14457 * regcache.c (class register_dump): New class.
14458 (register_dump_regcache, register_dump_none): New class.
14459 (register_dump_remote, register_dump_groups): New class.
14460 (regcache_print): Update.
14461 * regcache.h (regcache_dump_what): Move it to regcache.c.
14462 (regcache) <dump>: Remove.
14463
14464 2018-02-21 Yao Qi <yao.qi@linaro.org>
14465
14466 * jit.c (struct jit_unwind_private) <regcache>: Change its type to
14467 reg_buffer_rw *.
14468 (jit_unwind_reg_set_impl): Call raw_supply.
14469 (jit_frame_sniffer): Use reg_buffer_rw.
14470 * record-full.c (record_full_core_regbuf): Change its type.
14471 (record_full_core_open_1): Use reg_buffer_rw.
14472 (record_full_close): Likewise.
14473 (record_full_core_fetch_registers): Use regcache->raw_supply.
14474 (record_full_core_store_registers): Likewise.
14475 * regcache.c (regcache::get_register_status): Move it to
14476 reg_buffer.
14477 (regcache_raw_set_cached_value): Remove.
14478 (regcache::raw_set_cached_value): Remove.
14479 (regcache::raw_write): Call raw_supply.
14480 (regcache::raw_supply): Move it to reg_buffer_rw.
14481 * regcache.h (regcache_raw_set_cached_value): Remove.
14482 (reg_buffer_rw): New class.
14483
14484 2018-02-21 Yao Qi <yao.qi@linaro.org>
14485
14486 * dummy-frame.c (dummy_frame_cache) <prev_regcache>: Use
14487 readonly_detached_regcache.
14488 (dummy_frame_prev_register): Use regcache->cooked_read.
14489 * frame.c (frame_save_as_regcache): Change return type.
14490 (frame_pop): Update.
14491 * frame.h (frame_save_as_regcache): Update declaration.
14492 * inferior.h (get_infcall_suspend_state_regcache): Update
14493 declaration.
14494 * infrun.c (infcall_suspend_state) <registers>: use
14495 readonly_detached_regcache.
14496 (save_infcall_suspend_state): Don't use regcache_dup.
14497 (get_infcall_suspend_state_regcache): Change return type.
14498 * linux-fork.c (struct fork_info) <savedregs>: Change to
14499 readonly_detached_regcache.
14500 <pc>: New field.
14501 (fork_save_infrun_state): Don't use regcache_dup.
14502 (info_checkpoints_command): Adjust.
14503 * mi/mi-main.c (register_changed_p): Update declaration.
14504 (mi_cmd_data_list_changed_registers): Use
14505 readonly_detached_regcache.
14506 (register_changed_p): Change parameter type to
14507 readonly_detached_regcache.
14508 * ppc-linux-tdep.c (ppu2spu_cache) <regcache>: Use
14509 readonly_detached_regcache.
14510 (ppu2spu_sniffer): Construct a new readonly_detached_regcache.
14511 * regcache.c (readonly_detached_regcache::readonly_detached_regcache):
14512 New.
14513 (regcache::save): Move it to reg_buffer.
14514 (regcache::restore): Change parameter type.
14515 (regcache_dup): Remove.
14516 * regcache.h (reg_buffer) <save>: New method.
14517 (readonly_detached_regcache): New class.
14518 * spu-tdep.c (spu2ppu_cache) <regcache>: Use
14519 readonly_detached_regcache.
14520 (spu2ppu_sniffer): Construct a new readonly_detached_regcache.
14521
14522 2018-02-21 Yao Qi <yao.qi@linaro.org>
14523
14524 * frame.c (frame_save_as_regcache): Use regcache method save.
14525 (frame_pop): Use regcache method restore.
14526 * infrun.c (restore_infcall_suspend_state): Likewise.
14527 * linux-fork.c (fork_load_infrun_state): Likewise.
14528 * ppc-linux-tdep.c (ppu2spu_sniffer): User regcache method
14529 save.
14530 * regcache.c (regcache_save): Remove.
14531 (regcache::restore): More asserts.
14532 (regcache_cpy): Remove.
14533 * regcache.h (regcache_save): Remove the declaration.
14534 (regcache::restore): Move from private to public.
14535 Remove the friend declaration of regcache_cpy.
14536 (regcache_cpy): Remove declaration.
14537
14538 2018-02-21 Yao Qi <yao.qi@linaro.org>
14539
14540 * aarch64-tdep.c (aarch64_pseudo_register_read_value): Change
14541 parameter type to 'readable_regcache *'.
14542 * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
14543 * arm-tdep.c (arm_neon_quad_read): Likewise.
14544 (arm_pseudo_read): Likewise.
14545 * avr-tdep.c (avr_pseudo_register_read): Likewise.
14546 * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
14547 * frv-tdep.c (frv_pseudo_register_read): Likewise.
14548 * gdbarch.c: Re-generated.
14549 * gdbarch.h: Re-generated.
14550 * gdbarch.sh (pseudo_register_read): Change parameter type to
14551 'readable_regcache *'.
14552 (pseudo_register_read_value): Likewise.
14553 * h8300-tdep.c (pseudo_from_raw_register): Likewise.
14554 (h8300_pseudo_register_read): Likewise.
14555 * hppa-tdep.c (hppa_pseudo_register_read): Likewise.
14556 * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
14557 (i386_pseudo_register_read_into_value): Likewise.
14558 (i386_pseudo_register_read_value): Likewise.
14559 * i386-tdep.h (i386_pseudo_register_read_into_value): Update
14560 declaration.
14561 * ia64-tdep.c (ia64_pseudo_register_read): Likewise.
14562 * m32c-tdep.c (m32c_raw_read): Likewise.
14563 (m32c_read_flg): Likewise.
14564 (m32c_banked_register): Likewise.
14565 (m32c_banked_read): Likewise.
14566 (m32c_sb_read): Likewise.
14567 (m32c_part_read): Likewise.
14568 (m32c_cat_read): Likewise.
14569 (m32c_r3r2r1r0_read): Likewise.
14570 (m32c_pseudo_register_read): Likewise.
14571 * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
14572 * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
14573 (mep_pseudo_cr64_read): Likewise.
14574 (mep_pseudo_register_read): Likewise.
14575 * mips-tdep.c (mips_pseudo_register_read): Likewise.
14576 * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
14577 * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
14578 * regcache.c (regcache::raw_read): Move it to readable_regcache.
14579 (regcache::cooked_read): Likewise.
14580 (regcache::cooked_read_value): Likewise.
14581 (regcache_cooked_read_signed):
14582 (regcache::cooked_read): Likewise.
14583 * regcache.h (readable_regcache): New class.
14584 (regcache): Inherit readable_regcache. Move some methods to
14585 readable_regcache.
14586 * rl78-tdep.c (rl78_pseudo_register_read): Change
14587 parameter type to 'readable_regcache *'.
14588 * rs6000-tdep.c (do_regcache_raw_read): Remove.
14589 (e500_pseudo_register_read): Change parameter type to
14590 'readable_regcache *'.
14591 (dfp_pseudo_register_read): Likewise.
14592 (vsx_pseudo_register_read): Likewise.
14593 (efpr_pseudo_register_read): Likewise.
14594 * s390-tdep.c (s390_pseudo_register_read): Likewise.
14595 * sh-tdep.c (sh_pseudo_register_read): Likewise.
14596 * sh64-tdep.c (pseudo_register_read_portions): Likewise.
14597 (sh64_pseudo_register_read): Likewise.
14598 * sparc-tdep.c (sparc32_pseudo_register_read): Likewise.
14599 * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
14600 * spu-tdep.c (spu_pseudo_register_read_spu): Likewise.
14601 (spu_pseudo_register_read): Likewise.
14602 * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
14603 (xtensa_pseudo_register_read): Likewise.
14604
14605 2018-02-21 Yao Qi <yao.qi@linaro.org>
14606
14607 * regcache.c (regcache::regcache): Call reg_buffer ctor.
14608 (regcache::arch): Move it to reg_buffer::arch.
14609 (regcache::register_buffer): Likewise.
14610 (regcache::assert_regnum): Likewise.
14611 (regcache::num_raw_registers): Likewise.
14612 * regcache.h (reg_buffer): New class.
14613 (regcache): Inherit reg_buffer.
14614
14615 2018-02-20 Simon Marchi <simon.marchi@ericsson.com>
14616
14617 * remote-sim.c (gdb_os_printf_filtered, gdb_os_vprintf_filtered,
14618 gdb_os_evprintf_filtered, gdb_os_error): Add ATTRIBUTE_PRINTF.
14619
14620 2018-02-20 Markus Metzger <markus.t.metzger@intel.com>
14621
14622 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add mkstemp.
14623
14624 2018-02-19 Alan Hayward <alan.hayward@arm.com>
14625
14626 * Makefile.in: (COMMON_SFILES): Add common/*.c files.
14627 (SFILES): Remove common/*.c files.
14628 (COMMON_OBS): Remove some *.o files built from common/*.c files.
14629 * common/common.host: Add common reference.
14630 * configure.ac: Likewise.
14631 * configure: Regenerate.
14632
14633 2018-02-16 Yao Qi <yao.qi@linaro.org>
14634
14635 * block.c (block_namespace_info): Inherit allocate_on_obstack.
14636 (block_initialize_namespace): Use new.
14637 * dwarf2read.c (dwarf2_per_objfile): Inherit allocate_on_obstack.
14638 (dwarf2_free_objfile): Use delete.
14639 * gdbtypes.c (type_pair): Inherit allocate_on_obstack.
14640 (copy_type_recursive): Use new.
14641 * gdb_obstack.h (allocate_on_obstack): New.
14642
14643 2018-02-15 Yao Qi <yao.qi@linaro.org>
14644
14645 PR gdb/22849
14646 * inferior.c (exit_inferior_1): Reset inf->control.
14647
14648 2018-02-15 Joel Brobecker <brobecker@adacore.com>
14649
14650 * ada-lang.c (ada_to_fixed_value_create): Delete advance
14651 declaration.
14652
14653 2018-02-14 Pedro Alves <palves@redhat.com>
14654
14655 * frame-unwind.c (frame_unwind_try_unwinder): Always call
14656 frame_cleanup_after_sniffer on exception.
14657
14658 2018-02-14 Tom Tromey <tom@tromey.com>
14659
14660 * solist.h (struct target_so_ops) <bfd_open>: Make pathname
14661 const.
14662 (solib_bfd_open): Make pathname const.
14663 * solib.c (solib_bfd_open): Make pathname const.
14664 * solib-spu.c (spu_bfd_fopen): Make name const.
14665 (spu_bfd_open): Make pathname const.
14666 * solib-darwin.c (darwin_bfd_open): Make pathname const.
14667 * solib-aix.c (solib_aix_bfd_open): Make pathname const.
14668
14669 2018-02-14 Tom Tromey <tom@tromey.com>
14670
14671 * symfile.c (symfile_bfd_open): Update.
14672 * source.h (openp, source_full_path_of, find_and_open_source):
14673 Change argument type to unique_xmalloc_ptr.
14674 * source.c (openp): Take a unique_xmalloc_ptr.
14675 (source_full_path_of, find_and_open_source): Likewise.
14676 (open_source_file, symtab_to_fullname): Update.
14677 * solist.h (struct target_so_ops) <find_and_open_solib>: Take a
14678 unique_xmalloc_ptr.
14679 * solib.c (solib_find_1): Use unique_xmalloc_ptr.
14680 (exec_file_find): Update.
14681 * psymtab.c (psymtab_to_fullname): Update.
14682 * nto-tdep.h (nto_find_and_open_solib): Update.
14683 * nto-tdep.c (nto_find_and_open_solib): Change temp_path to a
14684 unique_xmalloc_ptr.
14685 * exec.c (exec_file_attach): Update.
14686 * dwarf2read.c (try_open_dwop_file): Use unique_xmalloc_ptr.
14687 * cli/cli-cmds.c (find_and_open_script): Use unique_xmalloc_ptr.
14688
14689 2018-02-14 Tom Tromey <tom@tromey.com>
14690
14691 * solib.c: Include source.h.
14692 * nto-tdep.c: Include source.h.
14693 * mi/mi-cmd-env.c: Include source.h.
14694 * infcmd.c: Include source.h.
14695 * exec.c: Include source.h.
14696 * defs.h (enum openp_flag, openp, source_full_path_of, mod_path)
14697 (add_path, directory_switch, source_path, init_source_path): Move
14698 declarations...
14699 * source.h (enum openp_flag, openp, source_full_path_of, mod_path)
14700 (add_path, directory_switch, source_path, init_source_path):
14701 ...here.
14702
14703 2018-02-14 Tom Tromey <tom@tromey.com>
14704
14705 * solist.h (exec_file_find, solib_find): Return
14706 unique_xmalloc_ptr.
14707 (solib_bfd_fopen): Take a const char *.
14708 * solib.c (solib_find_1): Return unique_xmalloc_ptr.
14709 (exec_file_find, solib_find): Likewise.
14710 (solib_bfd_fopen): Do not take ownership of "pathname".
14711 (solib_bfd_open): Use unique_xmalloc_ptr.
14712 * solib-darwin.c (darwin_bfd_open): Use unique_xmalloc_ptr.
14713 * solib-aix.c (solib_aix_bfd_open): Use unique_xmalloc_ptr.
14714 * infrun.c (follow_exec): Use unique_xmalloc_ptr.
14715 * exec.c (exec_file_locate_attach): Use unique_xmalloc_ptr.
14716
14717 2018-02-14 Joel Brobecker <brobecker@adacore.com>
14718
14719 * ada-lang.c (name_match_type_from_name): Remove reference to
14720 ada_name_for_lookup in function's documentation.
14721 * ada-lang.h (ada_name_for_lookup): Delete declaration.
14722
14723 2018-02-13 Simon Marchi <simon.marchi@polymtl.ca>
14724
14725 * defs.h (enum openp_flags): New enum.
14726 (OPF_TRY_CWD_FIRST, OPF_SEARCH_IN_PATH, OPF_RETURN_REALPATH):
14727 Move to enum openp_flags.
14728 (openp_flags): New enum flags.
14729 (openp): Change parameter type to openp_flags.
14730 * source.c (openp): Change parameter type to openp_flags.
14731 * cli/cli-cmds.c (find_and_open_script): Use openp_flags.
14732 * dwarf2read.c (try_open_dwop_file): Use openp_flags.
14733
14734 2018-02-13 Simon Marchi <simon.marchi@polymtl.ca>
14735
14736 * maint.c (_initialize_maint_cmds): Fix prefix of maint set/show
14737 per-command.
14738
14739 2018-02-12 Andrew Burgess <andrew.burgess@embecosm.com>
14740
14741 * dwarf2read.c (dwarf2_release_queue): Delete function, move body
14742 into...
14743 (class dwarf2_queue_guard): ...the destructor of this new class.
14744 (dw2_do_instantiate_symtab): Create instance of the new class
14745 dwarf2_queue_guard, remove cleanup.
14746
14747 2018-02-09 Tom Tromey <tom@tromey.com>
14748
14749 * source.c (find_source_lines): Don't reference past the end of
14750 the vector.
14751
14752 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
14753
14754 * remote.c (remote_btrace_maybe_reopen): Change error message.
14755 * btrace.c (btrace_enable): Likewise.
14756 (parse_xml_btrace): Likewise.
14757 (parse_xml_btrace_conf): Likewise.
14758
14759 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
14760
14761 * nat/linux-btrace.c (diagnose_perf_event_open_fail): New.
14762 (linux_enable_pt, linux_enable_bts): Call
14763 diagnose_perf_event_open_fail.
14764
14765 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
14766
14767 * nat/linux-btrace.c (perf_event_pt_event_type): Improve error message.
14768 Remove parameter and change return type. Update callers. Move it.
14769 (linux_enable_bts, linux_enable_pt): Improve error message.
14770 (linux_enable_pt): Remove zero buffer size check.
14771 (linux_enable_btrace): Improve error messages. Remove NULL return
14772 check.
14773
14774 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
14775
14776 * btrace.c (btrace_enable): Remove target_supports_btrace call.
14777 * nat/linux-btrace.c (perf_event_pt_event_type): Move.
14778 (kernel_supports_bts, kernel_supports_pt, linux_supports_bts)
14779 (linux_supports_pt, linux_supports_btrace): Remove.
14780 (linux_enable_bts): Call cpu_supports_bts.
14781 * nat/linux-btrace.h (linux_supports_btrace): Remove.
14782 * remote.c (remote_supports_btrace): Remove.
14783 (init_remote_ops): Remove remote_supports_btrace.
14784 * target-delegates.c: Regenerated.
14785 * target.c (target_supports_btrace): Remove.
14786 * target.h (target_ops) <to_supports_btrace>: Remove
14787 (target_supports_btrace): Remove.
14788 * x86-linux-nat.c (x86_linux_create_target): Remove
14789 linux_supports_btrace.
14790
14791 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
14792
14793 * nat/linux-btrace.c (linux_enable_btrace): Throw exception if enabling
14794 btrace failed.
14795 * x86-linux-nat.c (x86_linux_enable_btrace): Catch btrace enabling
14796 exception and use message in own exception.
14797
14798 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
14799
14800 * nat/linux-btrace.c: Include scoped_fd.h and scoped_mmap.h.
14801 (perf_event_pt_event_type): Use gdb_file_up.
14802 (linux_enable_bts, linux_enable_pt): Use gdb::unique_xmalloc_ptr,
14803 scoped_fd, and scoped_mmap.
14804
14805 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
14806
14807 * common/scoped_mmap.h: New.
14808 * unittests/scoped_mmap-selftest.c: New.
14809 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
14810 unittests/scoped_mmap-selftest.c.
14811
14812 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
14813
14814 * common/scoped_fd.h: New.
14815 * unittests/scoped_fd-selftest.c: New.
14816 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
14817 unittests/scoped_fd-selftest.c.
14818
14819 2018-02-09 Tom Tromey <tom@tromey.com>
14820
14821 * auto-load.c (auto_load_section_scripts): Use
14822 gdb::unique_xmalloc_ptr.
14823
14824 2018-02-09 Tom Tromey <tom@tromey.com>
14825
14826 * auto-load.c (execute_script_contents): Use std::string.
14827
14828 2018-02-09 Joel Brobecker <brobecker@adacore.com>
14829
14830 * NEWS <Changes in GDB 8.1>: Clarify that "rbreak" is a new
14831 Python function, rather than a new command.
14832
14833 2018-02-08 Tom Tromey <tom@tromey.com>
14834
14835 * solib.c (solib_find_1): Use std::string.
14836 (solib_bfd_fopen): Use unique_xmalloc_ptr.
14837
14838 2018-02-08 Tom Tromey <tom@tromey.com>
14839
14840 * build-id.c (build_id_to_debug_bfd): Use unique_xmalloc_ptr.
14841
14842 2018-02-08 Tom Tromey <tom@tromey.com>
14843
14844 * source.c (find_source_lines): Use gdb::def_vector.
14845
14846 2018-02-08 Tom Tromey <tom@tromey.com>
14847
14848 * macrocmd.c (struct temporary_macro_definition): New.
14849 (macro_define_command): Use temporary_macro_definition. Remove
14850 cleanups.
14851 (free_macro_definition_ptr): Remove.
14852
14853 2018-02-08 Tom Tromey <tom@tromey.com>
14854
14855 * macroexp.c (maybe_expand): Use std::string.
14856
14857 2018-02-08 Tom Tromey <tom@tromey.com>
14858
14859 * macroexp.c (struct macro_buffer): Add initializers for some
14860 members.
14861 (init_buffer, init_shared_buffer, free_buffer)
14862 (free_buffer_return_text): Remove.
14863 (macro_buffer): New constructors.
14864 (~macro_buffer): New destructor.
14865 (macro_buffer::set_shared): New method.
14866 (macro_buffer::resize_buffer, macro_buffer::appendc)
14867 (macro_buffer::appendmem): Now methods, not free functions.
14868 (set_token, append_tokens_without_splicing, stringify)
14869 (macro_stringify): Update.
14870 (gather_arguments): Change return type. Remove argc_p argument,
14871 add args_ptr argument. Use std::vector.
14872 (substitute_args): Remove argc argument. Accept std::vector.
14873 (expand): Update. Use std::vector.
14874 (scan, macro_expand, macro_expand_next): Update.
14875
14876 2018-02-08 Tom Tromey <tom@tromey.com>
14877
14878 * symtab.c (default_collect_symbol_completion_matches_break_on):
14879 Use unique_xmalloc_ptr.
14880 * macroscope.h: (sal_macro_scope, user_macro_scope)
14881 (default_macro_scope): Return unique_xmalloc_ptr.
14882 * macroscope.c (sal_macro_scope, user_macro_scope)
14883 (default_macro_scope): Return unique_xmalloc_ptr.
14884 * macroexp.h (macro_expand, macro_expand_once): Return
14885 unique_xmalloc_ptr.
14886 * macroexp.c (macro_expand, macro_expand_once): Return
14887 unique_xmalloc_ptr.
14888 * macrocmd.c (macro_expand_command, macro_expand_once_command)
14889 (info_macro_command, info_macros_command): Use
14890 unique_xmalloc_ptr.
14891 * compile/compile-c-support.c (write_macro_definitions): Use
14892 unique_xmalloc_ptr.
14893 * c-exp.y (c_parse): Use unique_xmalloc_ptr.
14894
14895 2018-02-07 Simon Marchi <simon.marchi@ericsson.com>
14896
14897 * value.c (value_static_field): Assign field type instead of
14898 containing type when returning an optimized out value.
14899
14900 2018-02-06 Yao Qi <yao.qi@linaro.org>
14901
14902 * ft32-tdep.c (ft32_read_pc): Remove.
14903 (ft32_write_pc): Remove.
14904 (ft32_gdbarch_init): Update.
14905 * m32r-tdep.c (m32r_read_pc): Remove.
14906 (m32r_gdbarch_init): Update.
14907 * mep-tdep.c (mep_read_pc): Remove.
14908 (mep_gdbarch_init): Update.
14909 * microblaze-tdep.c (microblaze_write_pc): Remove.
14910 (microblaze_gdbarch_init): Update.
14911 * mn10300-tdep.c (mn10300_read_pc): Remove.
14912 (mn10300_write_pc): Remove.
14913 (mn10300_gdbarch_init): Update.
14914 * moxie-tdep.c (moxie_read_pc): Remove.
14915 (moxie_write_pc): Remove.
14916 (moxie_gdbarch_init): Update.
14917
14918 2018-02-06 Yao Qi <yao.qi@linaro.org>
14919
14920 * expprint.c (print_subexp_standard): Handle
14921 OP_F77_UNDETERMINED_ARGLIST.
14922 (dump_subexp_body_standard): Likewise.
14923
14924 2018-02-05 Alan Hayward <alan.hayward@arm.com>
14925
14926 * target-descriptions.c (tdesc_element_visitor) Add empty
14927 implementations.
14928 (tdesc_type): Move make_gdb_type from here.
14929 (tdesc_type_builtin): Likewise.
14930 (tdesc_type_vector): Likewise.
14931 (tdesc_type_with_fields): Move make_gdb_type_ functions from here.
14932 (make_gdb_type_struct): Move from tdesc_type_with_fields.
14933 (make_gdb_type_union): Likewise.
14934 (make_gdb_type_flags): Likewise.
14935 (make_gdb_type_enum): Likewise.
14936 (make_gdb_type): New function.
14937 (tdesc_register_type): Use static make_gdb_type.
14938
14939 2018-02-05 Ruslan Kabatsayev <b7.10110111@gmail.com>
14940
14941 * infcmd.c (default_print_one_register_info): Align natural-format
14942 column values consistently one under another.
14943 (pad_to_column): New function.
14944
14945 2018-02-05 Joel Brobecker <brobecker@adacore.com>
14946
14947 * dwarf2read.c (dwarf2_physname): Move commment.
14948
14949 2018-02-01 Leszek Swirski <leszeks@google.com>
14950
14951 * varobj.c (varobj_formatted_print_options): Allow recursive
14952 pretty printing if pretty printing is enabled.
14953
14954 2018-02-01 Leszek Swirski <leszeks@google.com>
14955
14956 * c-exp.y (lex_one_token, classify_name, yylex): Don't classify
14957 names after a structop as a filename.
14958
14959 2018-02-01 Yao Qi <yao.qi@linaro.org>
14960
14961 * arm-tdep.c (arm_record_data_proc_misc_ld_str): Rewrite it.
14962 (arm_record_coproc_data_proc): Likewise.
14963
14964 2018-02-01 Yao Qi <yao.qi@linaro.org>
14965
14966 * arm-tdep.c (arm_record_extension_space): Change ret to signed.
14967
14968 2018-01-31 Nikola Prica <nikola.prica@rt-rk.com>
14969
14970 * rs6000-tdep.c (skip_prologue): Remove shifting for lr_reg and
14971 assign shifted lr_reg to fdata->lr_register when lr_reg is set.
14972
14973 2018-01-31 Pedro Alves <palves@redhat.com>
14974
14975 * darwin-nat.c (darwin_interrupt): Remove ptid_t parameter.
14976 * inflow.c (child_terminal_save_inferior): Wrap reference to
14977 tcgetpgrp in HAVE_TERMIOS_H.
14978 (child_interrupt, child_pass_ctrlc): Wrap references to signal in
14979 _WIN32.
14980 * remote-sim.c (gdbsim_interrupt): Remove ptid_t parameter and
14981 always iterate over all inferiors.
14982 (gdbsim_cntrl_c): Adjust.
14983 * windows-nat.c (windows_interrupt): Remove 'ptid_t' parameter.
14984
14985 2018-01-31 Joel Brobecker <brobecker@adacore.com>
14986
14987 * gdbtypes.c (lookup_array_range_type): Make sure the array's
14988 index type is objfile-owned if the element type is as well.
14989
14990 2018-01-31 Joel Brobecker <brobecker@adacore.com>
14991
14992 GDB 8.1 released.
14993
14994 2018-01-30 Philipp Rudo <prudo@linux.vnet.ibm.com>
14995
14996 * s390-linux-tdep.c: Remove includes "features/s390-linux32.c" and
14997 "features/s390x-linux64.c".
14998 (_initialize_s390_linux_tdep): Remove initialization of tdescs
14999 s390_linux32 and s390x_linux64.
15000 (s390_linux_init_abi_31, s390_linux_init_abi_64): Don't set
15001 default tdesc.
15002 * s390-tdep.c: Include "features/s390-linux32.c" and
15003 "features/s390x-linux64.c".
15004 (s390_tdesc_valid): Add check for tdesc_has_registers.
15005 (s390_gdbarch_init): Make sure there is always a valid tdesc.
15006 (_initialize_s390_tdep): Initialize tdesc_s390_linux32 and
15007 tdesc_s390x_linux64.
15008 * s390-linux-tdep.h: Move export of tdesc_s390_linux32 and
15009 tdesc_s390x_linux64 to...
15010 * s390-tdep.h: ...here.
15011
15012 2018-01-30 Pedro Alves <palves@redhat.com>
15013
15014 PR gdb/13211
15015 * config.in, configure: Regenerate.
15016 * configure.ac: Check for getpgid.
15017 * go32-nat.c (go32_pass_ctrlc): New.
15018 (go32_target): Install it.
15019 * inf-child.c (inf_child_target): Install
15020 child_terminal_save_inferior, child_pass_ctrlc and
15021 child_interrupt.
15022 * inf-ptrace.c (inf_ptrace_interrupt): Delete.
15023 (inf_ptrace_target): No longer install it.
15024 * infcmd.c (interrupt_target_1): Adjust.
15025 * inferior.h (child_terminal_save_inferior, child_pass_ctrlc)
15026 (child_interrupt): Declare.
15027 (inferior::terminal_state): New.
15028 * inflow.c (struct terminal_info): Update comments.
15029 (inferior_process_group): Delete.
15030 (terminal_is_ours): Delete.
15031 (gdb_tty_state): New.
15032 (child_terminal_init): Adjust.
15033 (is_gdb_terminal, sharing_input_terminal_1)
15034 (sharing_input_terminal): New functions.
15035 (child_terminal_inferior): Adjust. Use sharing_input_terminal.
15036 Set the process's actual process group in the foreground if
15037 possible. Handle is_ours_for_output/is_ours distinction. Don't
15038 mark terminal as the inferior's if not sharing GDB's terminal.
15039 Don't check attach_flag.
15040 (child_terminal_ours_for_output, child_terminal_ours): Adjust to
15041 pass down a target_terminal_state.
15042 (child_terminal_save_inferior): New, factored out from ...
15043 (child_terminal_ours_1): ... this. Handle
15044 target_terminal_state::is_ours_for_output.
15045 (child_interrupt, child_pass_ctrlc): New.
15046 (inflow_inferior_exit): Clear the inferior's terminal_state.
15047 (copy_terminal_info): Copy the inferior's terminal state.
15048 (_initialize_inflow): Remove reference to terminal_is_ours.
15049 * inflow.h (inferior_process_group): Delete.
15050 * nto-procfs.c (nto_handle_sigint, procfs_interrupt): Adjust.
15051 * procfs.c (procfs_target): Don't install procfs_interrupt.
15052 (procfs_interrupt): Delete.
15053 * remote.c (remote_serial_quit_handler): Adjust.
15054 (remote_interrupt): Remove ptid parameter. Adjust.
15055 * target-delegates.c: Regenerate.
15056 * target.c: Include "terminal.h".
15057 (target_terminal::terminal_state): Rename to ...
15058 (target_terminal::m_terminal_state): ... this.
15059 (target_terminal::init): Adjust.
15060 (target_terminal::inferior): Adjust to per-inferior
15061 terminal_state.
15062 (target_terminal::restore_inferior, target_terminal_is_ours_kind): New.
15063 (target_terminal::ours, target_terminal::ours_for_output): Use
15064 target_terminal_is_ours_kind.
15065 (target_interrupt): Remove ptid parameter. Adjust.
15066 (default_target_pass_ctrlc): Adjust.
15067 * target.h (target_ops::to_terminal_save_inferior): New field.
15068 (target_ops::to_interrupt): Remove ptid_t parameter.
15069 (target_interrupt): Remove ptid_t parameter. Update comment.
15070 (target_pass_ctrlc): Update comment.
15071 * target/target.h (target_terminal_state): New scoped enum,
15072 factored out of ...
15073 (target_terminal::terminal_state): ... here.
15074 (target_terminal::inferior): Update comments.
15075 (target_terminal::restore_inferior): New.
15076 (target_terminal::is_inferior, target_terminal::is_ours)
15077 (target_terminal::is_ours_for_output): Adjust.
15078 (target_terminal::scoped_restore_terminal_state): Adjust to
15079 rename, and call restore_inferior() instead of inferior().
15080 (target_terminal::scoped_restore_terminal_state::m_state): Change
15081 type.
15082 (target_terminal::terminal_state): Rename to ...
15083 (target_terminal::m_terminal_state): ... this and change type.
15084
15085 2018-01-30 Pedro Alves <palves@redhat.com>
15086
15087 * linux-nat.c (wait_for_signal): New function.
15088 (wait_lwp, linux_nat_wait_1): Use it instead of calling sigsuspend
15089 directly.
15090 (async_terminal_is_ours)
15091 (linux_nat_terminal_inferior, linux_nat_terminal_ours): Delete.
15092 (linux_nat_add_target): Don't override
15093 to_terminal_inferior/to_terminal_ours.
15094
15095 2018-01-29 Sergio Durigan Junior <sergiodj@redhat.com>
15096
15097 * remote.c (remote_follow_fork): Don't call "detach_inferior".
15098
15099 2018-01-28 Simon Marchi <simon.marchi@ericsson.com>
15100
15101 * dwarf2read.c (free_dwo_files): Add forward-declaration.
15102 (dwarf2_per_objfile::~dwarf2_per_objfile): Move content from
15103 dwarf2_per_objfile_free here.
15104 (dwarf2_per_objfile_free): Remove.
15105 (_initialize_dwarf2_read): Don't register
15106 dwarf2_per_objfile_free as a registry cleanup.
15107
15108 2018-01-27 Eli Zaretskii <eliz@gnu.org>
15109
15110 Avoid compilation errors in MinGW native builds
15111
15112 The error is triggered by including python-internal.h, and the
15113 error message is:
15114
15115 In file included from d:\usr\lib\gcc\mingw32\6.3.0\include\c++\math.h:36:0,
15116 from build-gnulib/import/math.h:27,
15117 from d:/usr/Python26/include/pyport.h:235,
15118 from d:/usr/Python26/include/Python.h:58,
15119 from python/python-internal.h:94,
15120 from python/py-arch.c:24:
15121 d:\usr\lib\gcc\mingw32\6.3.0\include\c++\cmath:1157:11: error: '::hypot' has not been declared
15122 using ::hypot;
15123 ^~~~~
15124
15125 This happens because Python headers define 'hypot' to expand t
15126 '_hypot' in the Windows builds.
15127 * python/python-internal.h (_hypot) [__MINGW32__]: Define back to
15128 'hypoth'. This avoids a compilation error.
15129
15130 2018-01-26 Alan Hayward <alan.hayward@arm.com>
15131
15132 * MAINTAINERS (Write After Approval): Fix ordering.
15133
15134 2018-01-26 Alan Hayward <alan.hayward@arm.com>
15135
15136 * MAINTAINERS (Write After Approval): Add Alan Hayward.
15137
15138 2018-01-26 Alan Modra <amodra@gmail.com>
15139
15140 * ppc-linux-tdep.c (powerpc32_plt_stub): Make const.
15141 (powerpc32_plt_stub_so_1): Rename from powerpc32_plt_stub_so.
15142 Remove nop. Make const. Comment.
15143 (powerpc32_plt_stub_so_2): New.
15144 (POWERPC32_PLT_CHECK_LEN): Rename from POWERPC32_PLT_STUB_LEN.
15145 Correct count. Update uses.
15146 (ppc_skip_trampoline_code): Match powerpc32_plt_stub_so_2 too.
15147 Move common code reading PLT entry word. Correct
15148 powerpc32_plt_stub PLT address calculation.
15149 * ppc64-tdep.c (ppc64_standard_linkage1): Make const.
15150 (ppc64_standard_linkage2, ppc64_standard_linkage3): Likewise.
15151 (ppc64_standard_linkage4, ppc64_standard_linkage5): Likewise.
15152 (ppc64_standard_linkage6, ppc64_standard_linkage7): Likewise.
15153 (ppc64_standard_linkage8): Likewise.
15154 * rs6000-tdep.c (ppc_insns_match_pattern): Make pattern const.
15155 Correct insns description.
15156 * ppc-tdep.h (ppc_insns_match_pattern): Update prototype.
15157
15158 2018-01-24 Pedro Alves <palves@redhat.com>
15159
15160 GCC PR libstdc++/83906
15161 * gdbtypes.c (operator==(const dynamic_prop &,
15162 const dynamic_prop &)): New.
15163 (operator==(const range_bounds &, const range_bounds &)): New.
15164 (check_types_equal): Use them instead of memcmp.
15165 * gdbtypes.h (operator==(const dynamic_prop &,
15166 const dynamic_prop &)): Declare.
15167 (operator!=(const dynamic_prop &, const dynamic_prop &)): Declare.
15168 (operator==(const range_bounds &, const range_bounds &)): Declare.
15169 (operator!=(const range_bounds &, const range_bounds &)): Declare.
15170
15171 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
15172
15173 * s390-linux-tdep.c (s390_record_address_mask)
15174 (s390_record_calc_disp_common, s390_record_calc_disp)
15175 (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
15176 (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
15177 (s390_process_record): Move to s390-tdep.c.
15178 (s390_linux_init_abi_any): Adjust.
15179 * s390-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): Moved from s390-linux-tdep.c
15184 (s390_gdbarch_init): Adjust.
15185
15186 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
15187
15188 * s390-linux-nat.c (s390-tdep.h): New include.
15189 * Makefile.in (ALL_TARGET_OBS): Add s390-tdep.o.
15190 (HFILES_NO_SRCDIR): Add s390-tdep.h.
15191 (ALLDEPFILES): Add s390-tdep.c.
15192 * configure.tgt (s390*-*-linux*): Add s390-tdep.o.
15193 * s390-linux-tdep.h (HWCAP_S390_*, S390_*_REGNUM): Move to...
15194 * s390-tdep.h: ...this. New file.
15195 * s390-linux-tdep.c (s390-tdep.h): New include.
15196 (_initialize_s390_tdep): Rename to...
15197 (_initialize_s390_linux_tdep): ...this and adjust.
15198 (s390_abi_kind, s390_vector_abi_kind, gdbarch_tdep)
15199 (enum named opcodes, S390_NUM_GPRS, S390_NUM_FPRS): Move to
15200 s390-tdep.h.
15201 (s390_break_insn, s390_breakpoint, s390_readinstruction, is_ri)
15202 (is_ril, is_rr, is_rre, is_rs, is_rsy, is_rx, is_rxy)
15203 (s390_is_partial_instruction, s390_software_single_step)
15204 (is_non_branch_ril, s390_displaced_step_copy_insn)
15205 (s390_displaced_step_fixup, s390_displaced_step_hw_singlestep)
15206 (s390_prologue_data, s390_addr, s390_store, s390_load)
15207 (s390_check_for_saved, s390_analyze_prologue, s390_skip_prologue)
15208 (s390_register_call_saved, s390_guess_tracepoint_registers)
15209 (s390_register_name, s390_dwarf_regmap, s390_dwarf_reg_to_regnum)
15210 (regnum_is_gpr_full, regnum_is_vxr_full, s390_value_from_register)
15211 (s390_pseudo_register_name, s390_pseudo_register_type)
15212 (s390_pseudo_register_read, s390_pseudo_register_write)
15213 (s390_pseudo_register_reggroup_p, s390_ax_pseudo_register_collect)
15214 (s390_ax_pseudo_register_push_stack, s390_gen_return_address)
15215 (s390_addr_bits_remove, s390_address_class_type_flags)
15216 (s390_address_class_type_flags_to_name)
15217 (s390_address_class_name_to_type_flags, s390_effective_inner_type)
15218 (s390_function_arg_float, s390_function_arg_vector)
15219 (is_power_of_two, s390_function_arg_integer, s390_arg_state)
15220 (s390_handle_arg, s390_push_dummy_call, s390_dummy_id)
15221 (s390_frame_align, s390_register_return_value, s390_return_value)
15222 (s390_stack_frame_destroyed_p, s390_unwind_pc, s390_unwind_sp)
15223 (s390_unwind_pseudo_register, s390_adjust_frame_regnum)
15224 (s390_dwarf2_prev_register, s390_dwarf2_frame_init_reg)
15225 (s390_trad_frame_prev_register, s390_unwind_cache)
15226 (s390_prologue_frame_unwind_cache)
15227 (s390_backchain_frame_unwind_cache, s390_frame_unwind_cache)
15228 (s390_frame_this_id, s390_frame_prev_register, s390_frame_unwind)
15229 (s390_stub_unwind_cache, s390_stub_frame_unwind_cache)
15230 (s390_stub_frame_this_id, s390_stub_frame_prev_register)
15231 (s390_stub_frame_sniffer, s390_stub_frame_unwind)
15232 (s390_frame_base_address, s390_local_base_address)
15233 (s390_frame_base, s390_gcc_target_options)
15234 (s390_gnu_triplet_regexp, s390_stap_is_single_operand)
15235 (s390_validate_reg_range, s390_tdesc_valid)
15236 (s390_gdbarch_tdep_alloc, s390_gdbarch_init): Move to...
15237 * s390-tdep.c: ...this. New file.
15238
15239 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
15240
15241 * s390-linux-tdep.c (gdbarch_tdep.s390_syscall_record): New hook.
15242 (s390_process_record, s390_gdbarch_tdep_alloc)
15243 (s390_linux_init_abi_any): Use/set new hook.
15244
15245 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
15246
15247 * s390-linux-tdep.c (osabi.h): New include.
15248 (s390_linux_init_abi_31, s390_linux_init_abi_64)
15249 (s390_linux_init_abi_any): New functions.
15250 (s390_gdbarch_init, _initialize_s390_tdep): Adjust.
15251
15252 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
15253
15254 * s390-linux-tdep.c (s390_gdbarch_init): Use gdb_assert for
15255 tdesc_has_registers check
15256
15257 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
15258
15259 * s390-linux-tdep.c (s390_tdesc_valid): New function.
15260 (s390_validate_reg_range): New macro.
15261 (s390_gdbarch_init): Adjust.
15262
15263 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
15264
15265 * s390-linux-tdep.c (gdbarch_tdep) <tdesc>: New field.
15266 (s390_gdbarch_tdep_alloc): Adjust.
15267 (s390_gdbarch_init): Adjust.
15268
15269 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
15270
15271 * s390-linux-tdep.c (gdbarch_tdep) <have_linux_v1, have_linux_v2>
15272 <have_tdb>: Change type to bool.
15273 (s390_gdbarch_tdep_alloc): Adjust.
15274 (s390_gdbarch_init): Adjust.
15275
15276 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
15277
15278 * s390-linux-tdep (s390_abi_kind) <ABI_NONE>: New default field.
15279 (gdbarch_tdep) <have_upper, have_vx>: New fields.
15280 (s390_gdbarch_tdep_alloc): New function.
15281 (s390_gdbarch_init): Allocate tdep at start and use its fields
15282 instead of separate variables.
15283
15284 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
15285
15286 * s390-linux-tdep.c (s390_gdbarch_init): Remove duplicate checks
15287 when looking for cached gdbarch and add comment for remaining.
15288
15289 2018-01-22 Pedro Alves <palves@redhat.com>
15290 Sergio Durigan Junior <sergiodj@redhat.com>
15291
15292 * typeprint.c (whatis_exp): Initialize "val" in the "whatis type"
15293 case.
15294
15295 2018-01-22 Maciej W. Rozycki <macro@mips.com>
15296
15297 * MAINTAINERS: Update my company e-mail address.
15298
15299 2018-01-22 Yao Qi <yao.qi@linaro.org>
15300
15301 * regcache.c (cooked_write_test): New function.
15302 (_initialize_regcache): Register the test.
15303
15304 2018-01-22 Yao Qi <yao.qi@linaro.org>
15305
15306 * ia64-tdep.c (ia64_pseudo_register_read): Call
15307 regcache->cooked_read instead of regcache_cooked_read_unsigned.
15308 * m32c-tdep.c (m32c_cat_read): Likewise.
15309 (m32c_r3r2r1r0_read): Likewise.
15310 * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
15311 * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
15312
15313 2018-01-22 Yao Qi <yao.qi@linaro.org>
15314
15315 * aarch64-tdep.c (aarch64_pseudo_read_value): Call regcache
15316 method raw_read instead of regcache_raw_read.
15317 * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
15318 * arm-tdep.c (arm_neon_quad_read): Likewise.
15319 * avr-tdep.c (avr_pseudo_register_read): Likewise.
15320 * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
15321 * frv-tdep.c (frv_pseudo_register_read): Likewise.
15322 * h8300-tdep.c (h8300_pseudo_register_read): Likewise.
15323 * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
15324 (i386_pseudo_register_read_into_value): Likewise.
15325 * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
15326 * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
15327 * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
15328 * rl78-tdep.c (rl78_pseudo_register_read): Likewise.
15329 * s390-linux-tdep.c (s390_pseudo_register_read): Likewise.
15330 * sparc-tdep.c (sparc32_pseudo_register_read): Likewise.
15331 * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
15332 * spu-tdep.c (spu_pseudo_register_read_spu): Likewise.
15333 * xtensa-tdep.c (xtensa_pseudo_register_read): Likewise.
15334
15335 2018-01-22 Yao Qi <yao.qi@linaro.org>
15336
15337 * Makefile.in (ALL_TARGET_OBS): Remove mt-tdep.o.
15338 * configure.tgt: Remove target mt.
15339 * mt-tdep.c: Remove.
15340 * regcache.c (cooked_read_test): Remove the check for mt.
15341
15342 2018-01-22 Yao Qi <yao.qi@linaro.org>
15343
15344 * jit.c (jit_frame_prev_register): Call regcache::cooked_read
15345 instead of gdbarch_pseudo_register_read_value.
15346
15347 2018-01-22 Joel Brobecker <brobecker@adacore.com>
15348
15349 * dwarf2read.c (need_gnat_info): Return nonzero if the cu's
15350 language is Ada.
15351
15352 2018-01-22 Joel Brobecker <brobecker@adacore.com>
15353
15354 * linespec.c (create_sals_line_offset): Remove code that preserved
15355 the symtab_and_line's line number.
15356
15357 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
15358
15359 * varobj.c (varobj_create): Don't set valid_block when creating a
15360 floating varobj.
15361
15362 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
15363
15364 * varobj.c (varobj_create): Remove out of date comment.
15365
15366 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
15367
15368 PR mi/20395
15369 * ada-exp.y (write_var_from_sym): Pass extra parameter when
15370 updating innermost block.
15371 * parse.c (innermost_block_tracker::update): Take extra type
15372 parameter, and check types match before updating innermost block.
15373 (write_dollar_variable): Update innermost block for registers.
15374 * parser-defs.h (enum innermost_block_tracker_type): New enum.
15375 (innermost_block_tracker::innermost_block_tracker): Initialise
15376 m_types member.
15377 (innermost_block_tracker::reset): Take type parameter.
15378 (innermost_block_tracker::update): Take type parameter, and pass
15379 type through as needed.
15380 (innermost_block_tracker::m_types): New member.
15381 * varobj.c (varobj_create): Pass type when reseting innermost
15382 block.
15383
15384 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
15385
15386 * ada-exp.y (write_var_from_sym): Switch to innermost_block API.
15387 * ada-lang.c (resolve_subexp): Likewise.
15388 * breakpoint.c (set_breakpoint_condition) Likewise.
15389 (watch_command_1) Likewise.
15390 * c-exp.y (variable): Likewise.
15391 * d-exp.y (PrimaryExpression): Likewise.
15392 * f-exp.y (variable): Likewise.
15393 * go-exp.y (variable): Likewise.
15394 * m2-exp.y (variable): Likewise.
15395 * objfiles.c (objfile::~objfile): Likewise.
15396 * p-exp.y (variable): Likewise.
15397 * parse.c (innermost_block): Change type.
15398 * parser-defs.h (class innermost_block_tracker): New.
15399 (innermost_block): Change to innermost_block_tracker.
15400 * printcmd.c (display_command): Switch to innermost_block API.
15401 (do_one_display): Likewise.
15402 * rust-exp.y (do_one_display): Likewise.
15403 * symfile.c (clear_symtab_users): Likewise.
15404 * varobj.c (varobj_create): Switch to innermost_block API, replace
15405 use of innermost_block with block stored on varobj object.
15406
15407 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
15408
15409 * expression.h (innermost_block): Remove declaration.
15410 * varobj.c: Add 'parser-defs.h' include.
15411
15412 2018-01-19 Tom Tromey <tom@tromey.com>
15413
15414 * rust-lang.c (rust_lookup_symbol_nonlocal): Look up qualified
15415 symbols in the static and global blocks.
15416
15417 2018-01-19 James Clarke <jrtc27@jrtc27.com>
15418
15419 * nat/linux-ptrace.c: Remove unnecessary reinclusion of
15420 gdb_ptrace.h, and move including gdb_wait.h ...
15421 * nat/linux-ptrace.h: ... to here.
15422
15423 2018-01-19 Simon Marchi <simon.marchi@ericsson.com>
15424
15425 * inf-ptrace.c (inf_ptrace_detach): Adjust call to
15426 inf_ptrace_detach_success.
15427 (inf_ptrace_detach_success): Add inferior parameter, use it
15428 instead of inferior_ptid, pass it to detach_inferior.
15429 * inf-ptrace.h (inf_ptrace_detach_success): Add inferior
15430 parameter.
15431 * inferior.c (detach_inferior): Add overload that takes an
15432 inferior object.
15433 * inferior.h (detach_inferior): Likewise.
15434 * linux-nat.c (linux_nat_detach): Use the inf parameter, don't
15435 use inferior_ptid, adjust call to inf_ptrace_detach_success.
15436 * linux-thread-db.c (thread_db_detach): Use inf parameter.
15437
15438 2018-01-19 Simon Marchi <simon.marchi@ericsson.com>
15439
15440 * target.h (struct target_ops) <to_detach>: Add inferior
15441 parameter.
15442 (target_detach): Likewise.
15443 * target.c (dispose_inferior): Pass inferior down.
15444 (target_detach): Pass inferior down. Assert that it is equal to
15445 the current inferior.
15446 * aix-thread.c (aix_thread_detach): Pass inferior down.
15447 * corefile.c (core_file_command): Pass current_inferior() down.
15448 * corelow.c (core_detach): Add inferior parameter.
15449 * darwin-nat.c (darwin_detach): Likewise.
15450 * gnu-nat.c (gnu_detach): Likewise.
15451 * inf-ptrace.c (inf_ptrace_detach): Likewise.
15452 * infcmd.c (detach_command): Pass current_inferior() down to
15453 target_detach.
15454 * infrun.c (follow_fork_inferior): Pass parent_inf to
15455 target_detach.
15456 (handle_vfork_child_exec_or_exit): Pass inf->vfork_parent to
15457 target_detach.
15458 * linux-nat.c (linux_nat_detach): Add inferior parameter.
15459 * linux-thread-db.c (thread_db_detach): Likewise.
15460 * nto-procfs.c (procfs_detach): Likewise.
15461 * procfs.c (procfs_detach): Likewise.
15462 * record.c (record_detach): Likewise.
15463 * record.h (struct inferior): Forward-declare.
15464 (record_detach): Add inferior parameter.
15465 * remote-sim.c (gdbsim_detach): Likewise.
15466 * remote.c (remote_detach_1): Likewise.
15467 (remote_detach): Likewise.
15468 (extended_remote_detach): Likewise.
15469 * sol-thread.c (sol_thread_detach): Likewise.
15470 * target-debug.h (target_debug_print_inferior_p): New macro.
15471 * target-delegates.c: Re-generate.
15472 * top.c (kill_or_detach): Pass inferior down to target_detach.
15473 * windows-nat.c (windows_detach): Add inferior parameter.
15474
15475 2018-01-19 Simon Marchi <simon.marchi@ericsson.com>
15476
15477 * target.h (struct target_ops) <to_detach>: Remove args
15478 parameter.
15479 (target_detach): Likewise.
15480 * target.c (dispose_inferior): Adjust.
15481 (target_detach): Remove args parameter, adjust.
15482 * aix-thread.c (aix_thread_detach): Adjust.
15483 * corefile.c (core_file_command): Adjust.
15484 * corelow.c (core_detach): Adjust.
15485 * darwin-nat.c (darwin_detach): Adjust.
15486 * gnu-nat.c (gnu_detach): Adjust.
15487 * inf-ptrace.c (inf_ptrace_detach): Adjust.
15488 * infcmd.c (detach_command): Adjust
15489 * infrun.c (follow_fork_inferior): Adjust.
15490 (handle_vfork_child_exec_or_exit): Adjust.
15491 * linux-fork.c (linux_fork_detach): Remove args parameter.
15492 * linux-fork.h (linux_fork_detach): Likewise.
15493 * linux-nat.c (linux_nat_detach): Likewise, and adjust.
15494 * linux-thread-db.c (thread_db_detach): Likewise.
15495 * nto-procfs.c (procfs_detach): Likewise.
15496 * procfs.c (procfs_detach): Likewise.
15497 (do_detach): Remove signo parameter.
15498 * record.c (record_detach): Remove args parameter.
15499 * record.h (record_detach): Likewise.
15500 * remote-sim.c (gdbsim_detach): Likewise.
15501 * remote.c (remote_detach_1): Likewise.
15502 (remote_detach): Likewise.
15503 (extended_remote_detach): Likewise.
15504 * sol-thread.c (sol_thread_detach): Likewise.
15505 * target-delegates.c: Re-generate.
15506 * top.c (struct qt_args) <args>: Remove field.
15507 (kill_or_detach): Don't pass args.
15508 (quit_force): Don't set args.
15509 * windows-nat.c (windows_detach): Remove args parameter.
15510
15511 2018-01-19 Yao Qi <yao.qi@linaro.org>
15512
15513 * arm-linux-tdep.c (arm_linux_gcc_target_options): New function.
15514 (arm_linux_init_abi): Install it.
15515
15516 2018-01-19 Yao Qi <yao.qi@linaro.org>
15517
15518 * osabi.c (gdb_osabi_names): Extend the regexp for
15519 arm-linux-gnueabihf.
15520
15521 2018-01-18 Yao Qi <yao.qi@linaro.org>
15522
15523 * dwarf2read.c (abbrev_table) <abbrevs>: Rename it to
15524 m_abbrevs.
15525 (abbrev_table::add_abbrev): Update.
15526 (abbrev_table::lookup_abbrev): Update.
15527
15528 2018-01-18 Yao Qi <yao.qi@linaro.org>
15529
15530 * ppc-linux-tdep.c (ppu2spu_prev_register): Call cooked_read.
15531
15532 2018-01-17 Sergio Durigan Junior <sergiodj@redhat.com>
15533
15534 * compile/compile.c (compile_to_object): Convert "triplet_rx"
15535 to "std::string".
15536
15537 2018-01-17 Tom Tromey <tom@tromey.com>
15538
15539 * dwarf2read.c (symbolp): Remove typedef. Don't instantiate VEC.
15540
15541 2018-01-17 Tom Tromey <tom@tromey.com>
15542
15543 * gdbtypes.h (add_dyn_prop): Remove objfile parameter.
15544 * gdbtypes.c (add_dyn_prop): Remove objfile parameter.
15545 (create_array_type_with_stride): Update.
15546 * dwarf2read.c (set_die_type): Update.
15547
15548 2018-01-17 Tom Tromey <tom@tromey.com>
15549
15550 * dwarf2read.c (delayed_method_info): Remove typedef.
15551 (dwarf2_cu::method_info): Now a std::vector.
15552 (add_to_method_list): Update.
15553 (free_delayed_list): Remove.
15554 (compute_delayed_physnames): Update.
15555 (process_full_comp_unit, process_full_type_unit): Clear the method
15556 list. Remove cleanups.
15557 (psymtab_include_file_name): Add name_holder parameter. Use
15558 unique_xmalloc_ptr.
15559 (dwarf_decode_lines): Update.
15560
15561 2018-01-17 Tom Tromey <tom@tromey.com>
15562 Simon Marchi <simon.marchi@ericsson.com>
15563
15564 * dwarf2read.c (struct dwarf2_cu): Add constructor, destructor.
15565 (dwarf2_per_objfile::free_cached_comp_units)
15566 (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
15567 (init_cutu_and_read_dies_no_follow): Update.
15568 (dwarf2_cu::dwarf2_cu): Rename from init_one_comp_unit.
15569 (dwarf2_cu::~dwarf2_cu): New.
15570 (free_heap_comp_unit, free_stack_comp_unit): Remove.
15571 (age_cached_comp_units, free_one_cached_comp_unit): Update.
15572
15573 2018-01-17 Tom Tromey <tom@tromey.com>
15574 Simon Marchi <simon.marchi@ericsson.com>
15575
15576 * dwarf2read.c (struct dwarf2_cu) <abbrev_table>: Remove.
15577 (struct die_reader_specs) <abbrev_table>: New member.
15578 (struct abbrev_table): Add constructor.
15579 <alloc_abbrev, add_abbrev, lookup_abbrev>: Declare.
15580 <abbrev_obstack>: Now an auto_obstack.
15581 (abbrev_table_up): New typedef.
15582 (init_cu_die_reader): Add abbrev_table parameter.
15583 (read_cutu_die_from_dwo): Remove abbrev_table_provided parameter.
15584 Add result_dwo_abbrev_table.
15585 (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
15586 (init_cutu_and_read_dies_no_follow, build_type_psymtabs_1):
15587 Update.
15588 (peek_die_abbrev): Take die_reader_specs, not dwarf_cu as
15589 parameter.
15590 (skip_children): Update.
15591 (abbrev_table::alloc_abbrev): Rename from
15592 abbrev_table_alloc_abbrev.
15593 (abbrev_table::add_abbrev): Rename from abbrev_table_add_abbrev.
15594 (abbrev_table::lookup_abbrev): Rename from
15595 abbrev_table_lookup_abbrev.
15596 (abbrev_table_read_table): Return abbrev_table_up.
15597 (abbrev_table_free, abbrev_table_free_cleanup)
15598 (dwarf2_read_abbrevs, dwarf2_free_abbrev_table): Remove.
15599 (load_partial_dies): Update.
15600
15601 2018-01-17 Tom Tromey <tom@tromey.com>
15602
15603 * dwarf2read.c (dwarf2_compute_name): Update comment.
15604 (read_func_scope, read_variable): Update.
15605 (new_symbol): Remove.
15606 (new_symbol_full): Rename to new_symbol.
15607
15608 2018-01-17 Mike Gulick <mgulick@mathworks.com>
15609
15610 PR gdb/16577
15611 * gdb_bfd.c (gdb_bfd_map_section): If unable to read object file, issue
15612 a warning instead of throwing an error, set section size to 0 and return
15613 NULL.
15614 * gdb_bfd.h (gdb_bfd_map_section): Update description.
15615
15616 2018-01-17 Simon Marchi <simon.marchi@ericsson.com>
15617
15618 * nat/linux-ptrace.h (linux_ptrace_attach_fail_reason): Return
15619 std::string.
15620 (linux_ptrace_attach_fail_reason_string): Likewise.
15621 * nat/linux-ptrace.c (linux_ptrace_attach_fail_reason):
15622 Likewise.
15623 (linux_ptrace_attach_fail_reason_string): Likewise.
15624 * linux-nat.c (attach_proc_task_lwp_callback): Adjust.
15625
15626 2018-01-17 Simon Marchi <simon.marchi@ericsson.com>
15627
15628 * linux-nat.c (linux_nat_attach): Remove xstrdup.
15629
15630 2018-01-17 Eldar Abusalimov <eldar.abusalimov@jetbrains.com>
15631
15632 PR gdb/21559
15633 * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
15634 checking for fs_base/gs_base fields in struct user_regs_struct.
15635 * configure: Regenerate.
15636
15637 2018-01-17 Yao Qi <yao.qi@linaro.org>
15638
15639 * aarch64-linux-tdep.c (aarch64_linux_gcc_target_options): New
15640 function.
15641 (aarch64_linux_init_abi): Install it to gdbarch hook
15642 gcc_target_options.
15643
15644 2018-01-15 Pedro Alves <palves@redhat.com>
15645
15646 * common/signals-state-save-restore.c
15647 (save_original_signals_state): Fix typos.
15648
15649 2017-01-12 Tom Tromey <tom@tromey.com>
15650 Sergio Durigan Junior <sergiodj@redhat.com>
15651
15652 * Makefile.in (install-only): Install gdb-add-index.
15653
15654 2018-01-12 John Baldwin <jhb@FreeBSD.org>
15655
15656 * fbsd-tdep.c (KVE_PROTECTION): Correct value.
15657
15658 2018-01-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
15659
15660 * infrun.c (keep_going_pass_signal): Clear step-over info when
15661 insert_breakpoints fails.
15662
15663 2018-01-11 Pedro Alves <palves@redhat.com>
15664
15665 PR gdb/22583
15666 * infrun.c (resume): Rename to ...
15667 (resume_1): ... this.
15668 (resume): Reimplement as wrapper around resume_1.
15669
15670 2018-01-11 Pedro Alves <palves@redhat.com>
15671
15672 PR remote/22597
15673 * remote.c (remote_parse_stop_reply): Default to the last-set
15674 general thread instead of to 'magic_null_ptid'.
15675
15676 2018-01-10 Pedro Alves <palves@redhat.com>
15677
15678 * language.h (language_get_symbol_name_matcher): Rename ...
15679 (get_symbol_name_matcher): ... this.
15680 * language.c (language_get_symbol_name_matcher): Ditto.
15681 * dictionary.c, linespec.c, minsyms.c, psymtab.c, symtab.c: All
15682 callers adjusted.
15683
15684 2018-01-10 Pedro Alves <palves@redhat.com>
15685
15686 PR gdb/22670
15687 * dwarf2read.c
15688 (gdb_index_symbol_name_matcher::gdb_index_symbol_name_matcher):
15689 Adjust to use language_get_symbol_name_matcher instead of
15690 language_defn::la_get_symbol_name_matcher.
15691 * language.c (language_get_symbol_name_matcher): If in Ada mode
15692 and the lookup name is a verbatim match, return Ada's matcher.
15693 * language.h (language_get_symbol_name_matcher): Adjust comment.
15694 (ada_lookup_name_info::verbatim_p):: New method.
15695
15696 2018-01-10 Pedro Alves <palves@redhat.com>
15697
15698 PR gdb/22670
15699 * ada-lang.c (ada_collect_symbol_completion_matches): If the
15700 minsym's language is language_auto or language_cplus, pass down
15701 language_ada instead.
15702 * symtab.c (compare_symbol_name): Don't frob symbol language here.
15703
15704 2018-01-10 Pedro Alves <palves@redhat.com>
15705
15706 PR gdb/22670
15707 * minsyms.c (linkage_name_str): New function.
15708 (iterate_over_minimal_symbols): Use it.
15709
15710 2018-01-09 John Baldwin <jhb@FreeBSD.org>
15711
15712 * NEWS: Document that 'info proc' now works on FreeBSD.
15713
15714 2018-01-09 John Baldwin <jhb@FreeBSD.org>
15715
15716 * configure.ac: Check for kinfo_getfile in libutil.
15717 * configure: Regenerate.
15718 * config.in: Regenerate.
15719 * fbsd-nat.c: Include "fbsd-tdep.h".
15720 (fbsd_fetch_cmdline): New.
15721 (fbsd_fetch_kinfo_proc): Move earlier and change to return a bool
15722 rather than calling error.
15723 (fbsd_info_proc): New.
15724 (fbsd_thread_name): Report error if fbsd_fetch_kinfo_proc fails.
15725 (fbsd_wait): Report warning if fbsd_fetch_kinfo_proc fails.
15726 (fbsd_nat_add_target): Set "to_info_proc" to "fbsd_info_proc".
15727
15728 2018-01-09 John Baldwin <jhb@FreeBSD.org>
15729
15730 * fbsd-nat.c (struct free_deleter): Remove.
15731 (fbsd_find_memory_regions): Use gdb::unique_xmalloc_ptr<>.
15732
15733 2018-01-09 John Baldwin <jhb@FreeBSD.org>
15734
15735 * fbsd-nat.c (fbsd_pid_to_exec_file) [KERN_PROC_PATHNAME]: Return
15736 NULL for an empty pathname.
15737
15738 2018-01-09 John Baldwin <jhb@FreeBSD.org>
15739
15740 * fbsd-tdep.c (KVE_STRUCTSIZE, KVE_START, KVE_END, KVE_OFFSET)
15741 (KVE_FLAGS, KVE_PROTECTION, KVE_PATH, KINFO_VME_PROT_READ)
15742 (KINFO_VME_PROT_WRITE, KINFO_VME_PROT_EXEC, KINFO_VME_FLAG_COW)
15743 (KINFO_VME_FLAG_NEEDS_COPY, KINFO_VME_FLAG_NOCOREDUMP)
15744 (KINFO_VME_FLAG_SUPER, KINFO_VME_FLAG_GROWS_UP)
15745 (KINFO_VME_FLAG_GROWS_DOWN, KF_STRUCTSIZE, KF_TYPE, KF_FD)
15746 (KF_PATH, KINFO_FILE_TYPE_VNODE, KINFO_FILE_FD_TYPE_CWD)
15747 (KINFO_FILE_FD_TYPE_TEXT, SIG_WORDS, struct kinfo_proc_layout)
15748 (kinfo_proc_layout_32, kinfo_proc_layout_i386)
15749 (kinfo_proc_layout_64, fbsd_vm_map_entry_flags)
15750 (fbsd_core_info_proc_mappings, fbsd_core_vnode_path)
15751 (fbsd_core_fetch_timeval, fbsd_print_sigset)
15752 (fbsd_core_info_proc_status, fbsd_core_info_proc): New.
15753 (fbsd_init_abi): Install gdbarch "core_info_proc" method.
15754 * fbsd-tdep.h (fbsd_vm_map_entry_flags): New.
15755
15756 2018-01-08 Samuel Thibault <samuel.thibault@ens-lyon.org>
15757
15758 * gdb/gnu-nat.c: Include <elf.h> and <link.h>.
15759 (gnu_xfer_auxv): New function.
15760 (gnu_xfer_partial): Call gnu_xfer_auxv when `object' is
15761 TARGET_OBJECT_AUXV.
15762
15763 2018-01-08 Yao Qi <yao.qi@linaro.org>
15764 Simon Marchi <simon.marchi@ericsson.com>
15765
15766 * Makefile.in (COMMON_SFILES): Remove selftest-arch.c and
15767 common/selftest.c.
15768 (COMMON_OBS): Remove selftest.o.
15769 * configure.ac: Append selftest-arch.c and common/selftest.c to
15770 CONFIG_SRCS. Append selftest-arch.o and selftest.o to COMMON_OBS.
15771 * configure: Re-generated.
15772 * maint.c (maintenance_selftest): Wrap selftests::run_tests with
15773 GDB_SELF_TEST.
15774 (maintenance_info_selftests): Likewise.
15775
15776 2018-01-08 Xavier Roirand <roirand@adacore.com>
15777
15778 * ada-valprint.c (val_print_packed_array_elements): Use
15779 proper number of elements when printing an array indexed
15780 by an enumeration type.
15781
15782 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
15783
15784 * dwarf2read.c (struct dwarf2_cu) <dwarf2_per_objfile>: Remove.
15785 (dw2_get_file_names_reader): Adjust.
15786 (lookup_dwo_signatured_type): Adjust.
15787 (lookup_dwp_signatured_type): Adjust.
15788 (lookup_signatured_type): Adjust.
15789 (create_type_unit_group): Adjust.
15790 (get_type_unit_group): Adjust.
15791 (process_psymtab_comp_unit_reader): Adjust.
15792 (build_type_psymtabs_reader): Adjust.
15793 (scan_partial_symbols): Adjust.
15794 (add_partial_symbol): Adjust.
15795 (add_partial_subprogram): Adjust.
15796 (peek_die_abbrev): Adjust.
15797 (fixup_go_packaging): Adjust.
15798 (process_imported_unit_die): Adjust.
15799 (dwarf2_compute_name): Adjust.
15800 (dwarf2_physname): Adjust.
15801 (read_import_statement): Adjust.
15802 (handle_DW_AT_stmt_list): Adjust.
15803 (read_file_scope): Adjust.
15804 (read_func_scope): Adjust.
15805 (read_lexical_block_scope): Adjust.
15806 (read_call_site_scope): Adjust.
15807 (read_variable): Adjust.
15808 (dwarf2_rnglists_process): Adjust.
15809 (dwarf2_ranges_process): Adjust.
15810 (dwarf2_ranges_read): Adjust.
15811 (dwarf2_get_pc_bounds): Adjust.
15812 (dwarf2_record_block_ranges): Adjust.
15813 (dwarf2_add_field): Adjust.
15814 (dwarf2_add_member_fn): Adjust.
15815 (read_structure_type): Adjust.
15816 (process_structure_scope): Adjust.
15817 (read_enumeration_type): Adjust.
15818 (read_array_type): Adjust.
15819 (mark_common_block_symbol_computed): Adjust.
15820 (read_common_block): Adjust.
15821 (read_namespace_type): Adjust.
15822 (read_namespace): Adjust.
15823 (read_module_type): Adjust.
15824 (read_tag_pointer_type): Adjust.
15825 (read_tag_ptr_to_member_type): Adjust.
15826 (read_tag_string_type): Adjust.
15827 (read_subroutine_type): Adjust.
15828 (read_typedef): Adjust.
15829 (read_base_type): Adjust.
15830 (attr_to_dynamic_prop): Adjust.
15831 (read_subrange_type): Adjust.
15832 (read_unspecified_type): Adjust.
15833 (dwarf2_read_abbrevs): Adjust.
15834 (load_partial_dies): Adjust.
15835 (read_partial_die): Adjust.
15836 (find_partial_die): Adjust.
15837 (guess_partial_die_structure_name): Adjust.
15838 (fixup_partial_die): Adjust.
15839 (read_attribute_value): Adjust.
15840 (read_addr_index): Adjust.
15841 (read_addr_index_from_leb128): Adjust.
15842 (read_str_index): Adjust.
15843 (dwarf2_string_attr): Adjust.
15844 (get_debug_line_section): Adjust.
15845 (dwarf_decode_line_header): Adjust.
15846 (lnp_state_machine::check_line_address): Adjust.
15847 (dwarf_decode_lines_1): Adjust.
15848 (dwarf_decode_lines): Adjust.
15849 (dwarf2_start_symtab): Adjust.
15850 (var_decode_location): Adjust.
15851 (new_symbol_full): Adjust.
15852 (dwarf2_const_value_data): Adjust.
15853 (dwarf2_const_value_attr): Adjust.
15854 (dwarf2_const_value): Adjust.
15855 (die_type): Adjust.
15856 (die_containing_type): Adjust.
15857 (build_error_marker_type): Adjust.
15858 (lookup_die_type): Adjust.
15859 (guess_full_die_structure_name): Adjust.
15860 (anonymous_struct_prefix): Adjust.
15861 (determine_prefix): Adjust.
15862 (dwarf2_name): Adjust.
15863 (follow_die_ref_or_sig): Adjust.
15864 (follow_die_offset): Adjust.
15865 (follow_die_ref): Adjust.
15866 (follow_die_sig_1): Adjust.
15867 (follow_die_sig): Adjust.
15868 (get_signatured_type): Adjust.
15869 (get_DW_AT_signature_type): Adjust.
15870 (decode_locdesc): Adjust.
15871 (dwarf_decode_macros): Adjust.
15872 (cu_debug_loc_section): Adjust.
15873 (fill_in_loclist_baton): Adjust.
15874 (dwarf2_symbol_mark_computed): Adjust.
15875 (init_one_comp_unit): Don't assign
15876 dwarf2_cu::dwarf2_per_objfile.
15877 (set_die_type): Adjust.
15878
15879 2018-01-07 Simon Marchi <simon.marchi@ericsson.com>
15880
15881 * dwarf2read.c (struct mapped_debug_names): Add constructor.
15882 <dwarf2_per_objfile>: New field.
15883 (dwarf2_per_objfile): Remove global.
15884 (get_dwarf2_per_objfile): New function.
15885 (set_dwarf2_per_objfile): New function.
15886 (dwarf2_build_psymtabs_hard): Change objfile parameter to
15887 dwarf2_per_objfile.
15888 (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
15889 (read_abbrev_offset): Likewise.
15890 (read_indirect_string): Likewise.
15891 (read_indirect_line_string): Likewise.
15892 (read_indirect_string_at_offset): Likewise.
15893 (read_indirect_string_from_dwz): Likewise.
15894 (dwarf2_find_containing_comp_unit): Change objfile parameter to
15895 dwarf2_per_objfile.
15896 (age_cached_comp_units): Add dwarf2_per_objfile parameter.
15897 (create_all_comp_units): Change objfile parameter to
15898 dwarf2_per_objfile.
15899 (create_all_type_units): Likewise.
15900 (process_queue): Add dwarf2_per_objfile parameter.
15901 (read_and_check_comp_unit_head): Likewise.
15902 (lookup_dwo_unit_in_dwp): Likewise.
15903 (get_dwp_file): Likewise.
15904 (process_cu_includes): Likewise.
15905 (struct free_dwo_file_cleanup_data): New struct.
15906 (dwarf2_has_info): Use get_dwarf2_per_objfile and
15907 set_dwarf2_per_objfile.
15908 (dwarf2_get_dwz_file): Add dwarf2_per_objfile parameter.
15909 (dw2_do_instantiate_symtab): Get dwarf2_per_objfile from
15910 context, adjust calls.
15911 (dw2_instantiate_symtab): Likewise.
15912 (dw2_get_cutu): Add dwarf2_per_objfile parameter.
15913 (dw2_get_cu): Likewise.
15914 (create_cu_from_index_list): Change objfile parameter to
15915 dwarf2_per_objfile.
15916 (create_cus_from_index_list): Get dwarf2_per_objfile from
15917 context, adjust calls.
15918 (create_cus_from_index): Likewise.
15919 (create_signatured_type_table_from_index): Change objfile
15920 parameter to dwarf2_per_objfile.
15921 (create_signatured_type_table_from_debug_names): Change objfile
15922 parameter to dwarf2_per_objfile.
15923 (create_addrmap_from_index): Likewise.
15924 (create_addrmap_from_aranges): Likewise.
15925 (dwarf2_read_index): Use get_dwarf2_per_objfile, adjust calls.
15926 (dw2_setup): Remove.
15927 (dw2_get_file_names_reader): Get dwarf2_per_objfile from
15928 context.
15929 (dw2_find_last_source_symtab): Get dwarf2_per_objfile using
15930 get_dwarf2_per_objfile.
15931 (dw2_forget_cached_source_info): Likewise.
15932 (dw2_map_symtabs_matching_filename): Likewise.
15933 (struct dw2_symtab_iterator) <index>: Remove.
15934 <dwarf2_per_objfile>: New field.
15935 (dw2_symtab_iter_init): Replace index parameter with
15936 dwarf2_per_objfile.
15937 (dw2_symtab_iter_next): Use dwarf2_per_objfile from iter.
15938 (dw2_lookup_symbol): Use get_dwarf2_per_objfile and adjust.
15939 (dw2_print_stats): Likewise.
15940 (dw2_dump): Likewise.
15941 (dw2_expand_symtabs_for_function): Likewise.
15942 (dw2_expand_all_symtabs): Likewise.
15943 (dw2_expand_symtabs_with_fullname): Likewise.
15944 (dw2_expand_marked_cus): Replace index and objfile parameters
15945 with dwarf2_per_objfile.
15946 (dw_expand_symtabs_matching_file_matcher): Add
15947 dwarf2_per_objfile parameter and adjust calls.
15948 (dw2_expand_symtabs_matching): Use get_dwarf2_per_objfile and
15949 adjust calls.
15950 (dw2_find_pc_sect_compunit_symtab): Don't call dw2_setup.
15951 (dw2_map_symbol_filenames): Use get_dwarf2_per_objfile and
15952 adjust calls.
15953 (create_cus_from_debug_names_list): Replace objfile parameter
15954 with dwarf2_per_objfile and adjust calls.
15955 (create_cus_from_debug_names): Likewise.
15956 (dwarf2_read_debug_names): Likewise.
15957 (mapped_debug_names::namei_to_name): Adjust call.
15958 (dw2_debug_names_iterator::next): Likewise.
15959 (dw2_debug_names_iterator::find_vec_in_debug_names): Likewise.
15960 (dw2_debug_names_lookup_symbol): Use get_dwarf2_per_objfile.
15961 (dw2_debug_names_dump): Likewise.
15962 (dw2_debug_names_expand_symtabs_for_function): Likewise.
15963 (dw2_debug_names_expand_symtabs_matching): Likewise.
15964 (dwarf2_initialize_objfile): Likewise.
15965 (dwarf2_build_psymtabs): Likewise.
15966 (get_abbrev_section_for_cu): Get dwarf2_per_objfile from
15967 this_cu.
15968 (error_check_comp_unit_head): Add dwarf2_per_objfile parameter.
15969 (read_and_check_comp_unit_head): Likewise.
15970 (read_abbrev_offset): Likewise.
15971 (create_debug_type_hash_table): Likewise.
15972 (create_debug_types_hash_table): Likewise.
15973 (create_all_type_units): Replace objfile parameter with
15974 dwarf2_per_objfile.
15975 (add_type_unit): Add dwarf2_per_objfile parameter.
15976 (fill_in_sig_entry_from_dwo_entry): Replace objfile parameter
15977 with dwarf2_per_objfile.
15978 (lookup_dwo_signatured_type): Get dwarf2_per_objfile from cu.
15979 (lookup_dwp_signatured_type): Likewise.
15980 (lookup_signatured_type): Likewise.
15981 (read_cutu_die_from_dwo): Likewise.
15982 (init_tu_and_read_dwo_dies): Likewise.
15983 (init_cutu_and_read_dies): Likewise.
15984 (init_cutu_and_read_dies_no_follow): Likewise.
15985 (allocate_type_unit_groups_table): Add objfile parameter.
15986 (create_type_unit_group): Use dwarf2_per_objfile from cu.
15987 (get_type_unit_group): Likewise.
15988 (process_psymtab_comp_unit): Update call.
15989 (build_type_psymtabs_reader): Use dwarf2_per_objfile from cu.
15990 (build_type_psymtabs_1): Add dwarf2_per_objfile parameter.
15991 (print_tu_stats): Likewise.
15992 (build_type_psymtab_dependencies): Use dwarf2_per_objfile passed
15993 in void* parameter.
15994 (build_type_psymtabs): Change objfile parameter to
15995 dwarf2_per_objfile.
15996 (process_skeletonless_type_unit): Use dwarf2_per_objfile
15997 passed in void* parameter.
15998 (process_skeletonless_type_units): Change objfile parameter to
15999 dwarf2_per_objfile.
16000 (set_partial_user): Likewise.
16001 (dwarf2_build_psymtabs_hard): Likewise.
16002 (read_comp_units_from_section): Likewise.
16003 (create_all_comp_units): Likewise.
16004 (scan_partial_symbols): Update calls.
16005 (add_partial_symbol): Likewise.
16006 (dwarf2_read_symtab): Use get_dwarf2_per_objfile.
16007 (maybe_queue_comp_unit): Use dwarf2_read_symtab from cu.
16008 (process_queue): Add dwarf2_per_objfile parameter.
16009 (get_compunit_symtab): Use dwarf2_per_objfile from cu.
16010 (compute_compunit_symtab_includes): Likewise.
16011 (process_cu_includes): Add dwarf2_per_objfile parameter.
16012 (process_full_comp_unit): Use dwarf2_per_objfile from cu.
16013 (process_full_type_unit): Likewise.
16014 (process_imported_unit_die): Update call.
16015 (handle_DW_AT_stmt_list): Use dwarf2_per_objfile from cu.
16016 (read_file_scope): Likewise.
16017 (allocate_dwo_file_hash_table): Add objfile parameter.
16018 (lookup_dwo_file_slot): Add dwarf2_per_objfile parameter.
16019 (create_cus_hash_table): Likewise.
16020 (create_dwp_hash_table): Likewise.
16021 (create_dwo_unit_in_dwp_v1): Likewise.
16022 (create_dwp_v2_section): Likewise.
16023 (create_dwo_unit_in_dwp_v2): Likewise.
16024 (lookup_dwo_unit_in_dwp): Likewise.
16025 (try_open_dwop_file): Likewise.
16026 (open_dwo_file): Likewise. Use dwarf2_per_objfile from cu.
16027 (open_and_init_dwo_file): Use dwarf2_per_objfile from cu, update
16028 cleanup to include a reference to dwarf2_per_objfile.
16029 (open_dwp_file): Add dwarf2_per_objfile parameter.
16030 (open_and_init_dwp_file): Likewise.
16031 (get_dwp_file): Likewise.
16032 (lookup_dwo_cutu): Use dwarf2_per_objfile from cu.
16033 (queue_and_load_all_dwo_tus): Update call.
16034 (free_dwo_file_cleanup): Use dwarf2_per_objfile from cleanup
16035 data.
16036 (dwarf2_rnglists_process): Use dwarf2_per_objfile from cu.
16037 (dwarf2_ranges_process): Likewise.
16038 (dwarf2_get_pc_bounds): Likewise.
16039 (mark_common_block_symbol_computed): Likewise.
16040 (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
16041 (dwarf2_read_abbrevs): Update call.
16042 (read_partial_die): Use dwarf2_per_objfile from cu.
16043 (find_partial_die): Likewise.
16044 (fixup_partial_die): Likewise.
16045 (read_attribute_value): Likewise.
16046 (read_indirect_string_at_offset_from): Add objfile parameter.
16047 (read_indirect_string_at_offset): Add dwarf2_per_objfile
16048 parameter.
16049 (read_indirect_string_from_dwz): Add objfile parameter.
16050 (read_indirect_string): Add objfile parameter.
16051 (read_addr_index_1): Add dwarf2_per_objfile parameter.
16052 (read_addr_index): Use dwarf2_per_objfile from cu.
16053 (dwarf2_read_addr_index): Use dwarf2_per_objfile from cu, don't
16054 call dw2_setup.
16055 (read_str_index): Use dwarf2_per_objfile from cu.
16056 (get_debug_line_section): Likewise.
16057 (read_formatted_entries): Add dwarf2_per_objfile parameter.
16058 (dwarf_decode_line_header): Use dwarf2_per_objfile from cu.
16059 (new_symbol_full): Use dwarf2_per_objfile from cu.
16060 (build_error_marker_type): Likewise.
16061 (lookup_die_type): Likewise.
16062 (determine_prefix): Likewise.
16063 (follow_die_offset): Likewise.
16064 (dwarf2_fetch_die_loc_sect_off): Use get_dwarf2_per_objfile.
16065 (dwarf2_fetch_constant_bytes): Don't call dw2_setup.
16066 (dwarf2_fetch_die_type_sect_off): Likewise.
16067 (dwarf2_get_die_type): Likewise.
16068 (follow_die_sig_1): Use dwarf2_per_objfile from cu.
16069 (get_signatured_type): Likewise.
16070 (get_DW_AT_signature_type): Likewise.
16071 (dwarf_decode_macro_bytes): Add dwarf2_per_objfile parameter.
16072 (dwarf_decode_macros): Use dwarf2_per_objfile from cu.
16073 (cu_debug_loc_section): Likewise.
16074 (fill_in_loclist_baton): Likewise.
16075 (dwarf2_symbol_mark_computed): Likewise.
16076 (dwarf2_find_containing_comp_unit): Change objfile parameter to
16077 dwarf2_per_objfile.
16078 (free_cached_comp_units): Use dwarf2_per_objfile passed in void*
16079 parameter.
16080 (age_cached_comp_units): Add dwarf2_per_objfile parameter.
16081 (free_one_cached_comp_unit): Use dwarf2_per_objfile from cu.
16082 (dwarf2_free_objfile): Use get_dwarf2_per_objfile.
16083 (set_die_type): Use dwarf2_free_objfile from cu.
16084 (get_die_type_at_offset): Likewise.
16085 (dwarf2_per_objfile_free): Don't assign global variable.
16086 (debug_names) <constructor>: Add dwarf2_per_objfile
16087 parameter, update m_debugstrlookup construction.
16088 (debug_names::debug_str_lookup): Add dwarf2_per_objfile
16089 parameter.
16090 <m_dwarf2_per_objfile>: New field.
16091 <lookup>: Use m_dwarf2_per_objfile.
16092 (check_dwarf64_offsets): Add dwarf2_per_objfile parameter.
16093 (psyms_seen_size): Likewise.
16094 (write_gdbindex): Replace objfile parameter with
16095 dwarf2_per_objfile.
16096 (write_debug_names): Likewise.
16097 (write_psymtabs_to_index): Likewise.
16098 (save_gdb_index_command): Use get_dwarf2_per_objfile, update
16099 calls.
16100
16101 2018-01-07 Simon Marchi <simon.marchi@ericsson.com>
16102
16103 * dwarf2read.c (struct dwarf2_cu) <objfile>: Remove.
16104 <dwarf2_per_objfile>: New field.
16105 (struct dwarf2_per_cu_data) <objfile>: Remove.
16106 <dwarf2_per_objfile>: New field.
16107 (create_cu_from_index_list): Assign dwarf2_per_objfile instead
16108 of objfile.
16109 (create_signatured_type_table_from_index): Likewise.
16110 (create_debug_type_hash_table): Likewise.
16111 (fill_in_sig_entry_from_dwo_entry): Likewise.
16112 (lookup_dwo_unit): Access objfile through dwarf2_per_objfile.
16113 (create_type_unit_group): Assign dwarf2_per_objfile instead of
16114 objfile.
16115 (create_partial_symtab): Access objfile through
16116 dwarf2_per_objfile.
16117 (process_psymtab_comp_unit_reader): Likewise.
16118 (read_comp_units_from_section): Likewise.
16119 (scan_partial_symbols): Likewise.
16120 (add_partial_symbol): Likewise.
16121 (add_partial_subprogram): Likewise.
16122 (peek_die_abbrev): Likewise.
16123 (fixup_go_packaging): Likewise.
16124 (process_full_comp_unit): Likewise.
16125 (process_full_type_unit): Likewise.
16126 (process_imported_unit_die): Likewise.
16127 (dwarf2_compute_name): Likewise.
16128 (dwarf2_physname): Likewise.
16129 (read_import_statement): Likewise.
16130 (create_cus_hash_table): Assign dwarf2_physname instead of
16131 objfile.
16132 (read_func_scope): Access objfile through dwarf2_per_objfile.
16133 (read_lexical_block_scope): Likewise.
16134 (read_call_site_scope): Likewise.
16135 (read_variable): Likewise.
16136 (dwarf2_rnglists_process): Likewise.
16137 (dwarf2_ranges_process): Likewise.
16138 (dwarf2_ranges_read): Likewise.
16139 (dwarf2_record_block_ranges): Likewise.
16140 (dwarf2_add_field): Likewise.
16141 (dwarf2_add_member_fn): Likewise.
16142 (read_structure_type): Likewise.
16143 (process_structure_scope): Likewise.
16144 (read_enumeration_type): Likewise.
16145 (read_array_type): Likewise.
16146 (read_common_block): Likewise.
16147 (read_namespace_type): Likewise.
16148 (read_namespace): Likewise.
16149 (read_module_type): Likewise.
16150 (read_tag_pointer_type): Likewise.
16151 (read_tag_ptr_to_member_type): Likewise.
16152 (read_tag_string_type): Likewise.
16153 (read_subroutine_type): Likewise.
16154 (read_typedef): Likewise.
16155 (read_base_type): Likewise.
16156 (attr_to_dynamic_prop): Likewise.
16157 (read_subrange_type): Likewise.
16158 (read_unspecified_type): Likewise.
16159 (load_partial_dies): Likewise.
16160 (read_partial_die): Likewise.
16161 (find_partial_die): Likewise.
16162 (guess_partial_die_structure_name): Likewise.
16163 (fixup_partial_die): Likewise.
16164 (read_attribute_value): Likewise.
16165 (read_addr_index_from_leb128): Likewise.
16166 (dwarf2_read_addr_index): Likewise.
16167 (dwarf2_string_attr): Likewise.
16168 (lnp_state_machine::check_line_address): Likewise.
16169 (dwarf_decode_lines_1): Likewise.
16170 (dwarf_decode_lines): Likewise.
16171 (dwarf2_start_symtab): Likewise.
16172 (var_decode_location): Likewise.
16173 (new_symbol_full): Likewise.
16174 (dwarf2_const_value_data): Likewise.
16175 (dwarf2_const_value_attr): Likewise.
16176 (dwarf2_const_value): Likewise.
16177 (die_type): Likewise.
16178 (die_containing_type): Likewise.
16179 (lookup_die_type): Likewise.
16180 (guess_full_die_structure_name): Likewise.
16181 (anonymous_struct_prefix): Likewise.
16182 (dwarf2_name): Likewise.
16183 (follow_die_ref_or_sig): Likewise.
16184 (follow_die_offset): Likewise.
16185 (follow_die_ref): Likewise.
16186 (dwarf2_fetch_die_loc_sect_off): Likewise.
16187 (dwarf2_fetch_constant_bytes): Likewise.
16188 (dwarf2_fetch_die_type_sect_off): Likewise.
16189 (dwarf2_get_die_type): Likewise.
16190 (follow_die_sig): Likewise.
16191 (decode_locdesc): Likewise.
16192 (dwarf2_per_cu_objfile): Likewise.
16193 (dwarf2_per_cu_text_offset): Likewise.
16194 (init_one_comp_unit): Assign dwarf2_per_objfile instead of
16195 objfile.
16196 (set_die_type): Access objfile through
16197 dwarf2_per_objfile.
16198
16199 2018-01-07 Simon Marchi <simon.marchi@ericsson.com>
16200
16201 * valprint.c (converted_character_d): Remove typedef.
16202 (DEF_VEC_O (converted_character_d)): Remove.
16203 (count_next_character): Use std::vector.
16204 (print_converted_chars_to_obstack): Likewise.
16205 (generic_printstr): Likewise.
16206
16207 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
16208
16209 * xml-support.h (struct gdb_xml_value): Add constructor.
16210 <value>: Change type to unique_xmalloc_ptr.
16211 (gdb_xml_value_s): Remove typedef.
16212 (DEF_VEC_O (gdb_xml_value_s)): Remove.
16213 (gdb_xml_element_start_handler): Change parameter type to
16214 std::vector.
16215 (xml_find_attribute): Likewise.
16216 * xml-support.c (xml_find_attribute): Change parameter type to
16217 std::vector and adjust.
16218 (gdb_xml_values_cleanup): Remove.
16219 (gdb_xml_parser::start_element): Adjust to std::vector.
16220 (xinclude_start_include): Change paraeter type to std::vector
16221 and adjust.
16222 * btrace.c (check_xml_btrace_version): Likewise.
16223 (parse_xml_btrace_block): Likewise.
16224 (parse_xml_btrace_pt_config_cpu): Likewise.
16225 (parse_xml_btrace_pt): Likewise.
16226 (parse_xml_btrace_conf_bts): Likewise.
16227 (parse_xml_btrace_conf_pt): Likewise.
16228 * memory-map.c (memory_map_start_memory): Likewise.
16229 (memory_map_start_property): Likewise.
16230 * osdata.c (osdata_start_osdata): Likewise.
16231 (osdata_start_item): Likewise.
16232 (osdata_start_column): Likewise.
16233 * remote.c (start_thread): Likewise.
16234 * solib-aix.c (library_list_start_library): Likewise.
16235 (library_list_start_list): Likewise.
16236 * solib-svr4.c (library_list_start_library): Likewise.
16237 (svr4_library_list_start_list): Likewise.
16238 * solib-target.c (library_list_start_segment): Likewise.
16239 (library_list_start_section): Likewise.
16240 (library_list_start_library): Likewise.
16241 (library_list_start_list): Likewise.
16242 * tracepoint.c (traceframe_info_start_memory): Likewise.
16243 (traceframe_info_start_tvar): Likewise.
16244 * xml-syscall.c (syscall_start_syscall): Likewise.
16245 * xml-tdesc.c (tdesc_start_target): Likewise.
16246 (tdesc_start_feature): Likewise.
16247 (tdesc_start_reg): Likewise.
16248 (tdesc_start_union): Likewise.
16249 (tdesc_start_struct): Likewise.
16250 (tdesc_start_flags): Likewise.
16251 (tdesc_start_enum): Likewise.
16252 (tdesc_start_field): Likewise.
16253 (tdesc_start_enum_value): Likewise.
16254 (tdesc_start_vector): Likewise.
16255
16256 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
16257
16258 * extension.h (struct xmethod_worker) <clone>: Remove.
16259 * python/py-xmethods.c (struct python_xmethod_worker) <clone>:
16260 Remove.
16261 (python_xmethod_worker::clone): Remove.
16262 * valops.c (find_overload_match): Use std::move instead of
16263 clone.
16264
16265 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
16266
16267 * extension-priv.h (enum ext_lang_rc): Remove, move to extension.h.
16268 (struct extension_language_ops) <clone_xmethod_worker_data>: Remove.
16269 <free_xmethod_worker_data>: Remove.
16270 <get_matching_xmethod_workers>: Chance VEC to std::vector.
16271 <get_xmethod_arg_types>: Remove.
16272 <get_xmethod_result_type>: Remove.
16273 <invoke_xmethod>: Remove.
16274 * extension.c (new_xmethod_worker): Remove.
16275 (clone_xmethod_worker): Remove.
16276 (get_matching_xmethod_workers): Return void, pass std::vector by
16277 pointer.
16278 (get_xmethod_arg_types): Rename to...
16279 (xmethod_worker::get_arg_types): ... this, and adjust.
16280 (get_xmethod_result_type): Rename to...
16281 (xmethod_worker::get_result_type): ... this, and adjust.
16282 (invoke_xmethod): Remove.
16283 (free_xmethod_worker): Remove.
16284 (free_xmethod_worker_vec): Remove.
16285 * extension.h (enum ext_lang_rc): Move here from
16286 extension-priv.h.
16287 (struct xmethod_worker): Add constructor and destructor.
16288 <data>: Remove.
16289 <value>: Remove.
16290 <invoke, clone, do_get_result_type, do_get_arg_types>: New
16291 virtual pure methods.
16292 <get_arg_types, get_result_type>: New methods.
16293 (xmethod_worker_ptr): Remove typedef.
16294 (DEF_VEC_P (xmethod_worker_ptr)): Remove.
16295 (xmethod_worker_vec): Remove typedef.
16296 (xmethod_worker_up): New typedef.
16297 (invoke_xmethod): Remove.
16298 (clone_xmethod_worker): Remove.
16299 (free_xmethod_worker): Remove.
16300 (free_xmethod_worker_vec): Remove.
16301 (get_xmethod_arg_types): Remove.
16302 (get_xmethod_result_type): Remove.
16303 * valops.c (find_method_list): Use std::vector, don't use
16304 intermediate vector.
16305 (value_find_oload_method_list): Use std::vector.
16306 (find_overload_match): Use std::vector.
16307 (find_oload_champ): Use std::vector.
16308 * value.c (value_free): Use operator delete.
16309 (value_of_xmethod): Rename to...
16310 (value_from_xmethod): ... this. Don't assign
16311 xmethod_worker::value, take rvalue-reference.
16312 (result_type_of_xmethod): Adjust.
16313 (call_xmethod): Adjust.
16314 * value.h: Include extension.h.
16315 (struct xmethod_worker): Don't forward-declare.
16316 (value_of_xmethod): Rename to...
16317 (value_from_xmethod): ... this, take rvalue-reference.
16318 * python/py-xmethods.c (struct gdbpy_worker_data): Rename to...
16319 (struct python_xmethod_worker): ... this, add constructor and
16320 destructor.
16321 <invoke, clone, do_get_arg_types, do_get_result_type>: Implement.
16322 (gdbpy_free_xmethod_worker_data): Rename to...
16323 (python_xmethod_worker::~python_xmethod_worker): ... this and
16324 adjust.
16325 (gdbpy_clone_xmethod_worker_data): Rename to...
16326 (python_xmethod_worker::clone): ... this and adjust.
16327 (gdbpy_get_matching_xmethod_workers): Use std::vector, don't use
16328 temporary vector.
16329 (gdbpy_get_xmethod_arg_types): Rename to...
16330 (python_xmethod_worker::do_get_arg_types): ... this and adjust.
16331 (gdbpy_get_xmethod_result_type): Rename to...
16332 (python_xmethod_worker::do_get_result_type): ... this and
16333 adjust.
16334 (gdbpy_invoke_xmethod): Rename to...
16335 (python_xmethod_worker::invoke): ... this and adjust.
16336 (new_python_xmethod_worker): Rename to...
16337 (python_xmethod_worker::python_xmethod_worker): ... this and
16338 adjust.
16339 * python/python-internal.h (gdbpy_clone_xmethod_worker_data):
16340 Remove.
16341 (gdbpy_free_xmethod_worker_data): Remove.
16342 (gdbpy_get_matching_xmethod_workers): Use std::vector.
16343 (gdbpy_get_xmethod_arg_types): Remove.
16344 (gdbpy_get_xmethod_result_type): Remove.
16345 (gdbpy_invoke_xmethod): Remove.
16346 * python/python.c (python_extension_ops): Remove obsolete
16347 callbacks.
16348
16349 2018-01-05 Pedro Alves <palves@redhat.com>
16350
16351 PR gdb/18653
16352 * common/signals-state-save-restore.c
16353 (save_original_signals_state): New parameter 'quiet'. Warn if we
16354 find a custom handler preinstalled, instead of internal erroring.
16355 But only warn if !quiet.
16356 * common/signals-state-save-restore.h
16357 (save_original_signals_state): New parameter 'quiet'.
16358 * main.c (captured_main_1): Move save_original_signals_state call
16359 after option handling, and pass QUIET.
16360
16361 2018-01-05 Pedro Alves <palves@redhat.com>
16362
16363 * spu-tdep.c (spu_catch_start): Pass
16364 symbol_name_match_type::SEARCH_NAME to block_lookup_symbol.
16365
16366 2018-01-05 Pedro Alves <palves@redhat.com>
16367
16368 PR gdb/22670
16369 * ada-lang.c (literal_symbol_name_matcher): New function.
16370 (ada_get_symbol_name_matcher): Use it for
16371 symbol_name_match_type::SEARCH_NAME.
16372 * block.c (block_lookup_symbol): New parameter 'match_type'. Pass
16373 it down instead of assuming symbol_name_match_type::FULL.
16374 * block.h (block_lookup_symbol): New parameter 'match_type'.
16375 * c-valprint.c (print_unpacked_pointer): Use
16376 lookup_symbol_search_name instead of lookup_symbol.
16377 * compile/compile-object-load.c (get_out_value_type): Pass down
16378 symbol_name_match_type::SEARCH_NAME.
16379 * cp-namespace.c (cp_basic_lookup_symbol): Pass down
16380 symbol_name_match_type::FULL.
16381 * cp-support.c (cp_get_symbol_name_matcher): Handle
16382 symbol_name_match_type::SEARCH_NAME.
16383 * infrun.c (insert_exception_resume_breakpoint): Use
16384 lookup_symbol_search_name.
16385 * p-valprint.c (pascal_val_print): Use lookup_symbol_search_name.
16386 * psymtab.c (maintenance_check_psymtabs): Use
16387 symbol_name_match_type::SEARCH_NAME and SYMBOL_SEARCH_NAME.
16388 * stack.c (print_frame_args): Use lookup_symbol_search_name and
16389 SYMBOL_SEARCH_NAME.
16390 * symtab.c (lookup_local_symbol): Don't demangle the lookup name
16391 if symbol_name_match_type::SEARCH_NAME.
16392 (lookup_symbol_in_language): Pass down
16393 symbol_name_match_type::FULL.
16394 (lookup_symbol_search_name): New.
16395 (lookup_language_this): Pass down
16396 symbol_name_match_type::SEARCH_NAME.
16397 (lookup_symbol_aux, lookup_local_symbol): New parameter
16398 'match_type'. Pass it down.
16399 * symtab.h (symbol_name_match_type::SEARCH_NAME): New enumerator.
16400 (lookup_symbol_search_name): New declaration.
16401 (lookup_symbol_in_block): New 'match_type' parameter.
16402
16403 2018-01-05 Pedro Alves <palves@redhat.com>
16404
16405 PR gdb/22670
16406 * ada-lang.c (ada_lookup_encoded_symbol): Reimplement in terms of
16407 ada_lookup_symbol.
16408 (ada_lookup_symbol): Reimplement in terms of
16409 ada_lookup_symbol_list, bits factored out from
16410 ada_lookup_encoded_symbol.
16411
16412 2018-01-05 Joel Brobecker <brobecker@adacore.com>
16413
16414 * ada-exp.y (write_object_renaming): When subscripting an array
16415 using a symbol as the index, pass the block in call to
16416 ada_lookup_encoded_symbol when looking that symbol up.
16417
16418 2018-01-05 Jerome Guitton <guitton@adacore.com>
16419
16420 * ada-lang.c (ada_array_length): Use ada_index_type instead of
16421 TYPE_INDEX_TYPE.
16422
16423 2018-01-05 Joel Brobecker <brobecker@adacore.com>
16424
16425 * ada-lang.c (ada_to_fixed_value_create): Add handling of
16426 the case where VALUE_LVAL (val0) is not lval_memory.
16427
16428 2018-01-05 Xavier Roirand <roirand@adacore.com>
16429
16430 * ada-valprint.c (print_optional_low_bound): Handle
16431 character-indexed array printing like boolean-indexed array
16432 printing.
16433
16434 2018-01-05 Joel Brobecker <brobecker@adacore.com>
16435
16436 * NEWS: Create a new section for the next release branch.
16437 Rename the section of the current branch, now that it has
16438 been cut.
16439
16440 2018-01-05 Joel Brobecker <brobecker@adacore.com>
16441
16442 GDB 8.1 branch created (5219ac6237c272b938c28517bf371429260c71e7):
16443 * version.in: Bump version to 8.1.50.DATE-git.
16444
16445 2018-01-03 Xavier Roirand <roirand@adacore.com>
16446
16447 * ada-lang.h (ada_exception_catchpoint_kind) <ada_catch_handlers>:
16448 Add field.
16449 * ada-lang.c (struct exception_support_info) <catch_handlers_sym>:
16450 Add field.
16451 (default_exception_support_info) <catch_handlers_sym>: Add field.
16452 (exception_support_info_fallback) <catch_handlers_sym>: Add field.
16453 (ada_exception_name_addr_1): Add "catch handlers" handling.
16454 (ada_exception_catchpoint_cond_string) <ex>: New parameter.
16455 Update all callers.
16456 (create_excep_cond_exprs) <ex>: Add parameter.
16457 (re_set_exception): Update create_excep_cond_exprs call.
16458 (print_it_exception, print_one_exception, print_mention_exception)
16459 (print_recreate_exception): Add "catch handler" handling.
16460 (allocate_location_catch_handlers, re_set_catch_handlers)
16461 (check_status_catch_handlers, print_it_catch_handlers)
16462 (print_one_catch_handlers, print_mention_catch_handlers)
16463 (print_recreate_catch_handlers): New function.
16464 (catch_handlers_breakpoint_ops): New variable.
16465 (catch_ada_exception_command_split) <is_catch_handlers_cmd>:
16466 Add parameter. Add "catch handler" handling.
16467 (ada_exception_sym_name, ada_exception_breakpoint_ops):
16468 Add "catch handler" handling.
16469 (ada_exception_catchpoint_cond_string): Add "catch handler"
16470 handling.
16471 (create_ada_exception_catchpoint): Update create_excep_cond_exprs
16472 call.
16473 (catch_ada_handlers_command): New function.
16474 (initialize_ada_catchpoint_ops): Initialize "catch handlers"
16475 operations structure.
16476 (_initialize_ada_language): Add "catch handlers" command entry.
16477 * NEWS: Document "catch handlers" feature.
16478
16479 2018-01-02 Joel Brobecker <brobecker@adacore.com>
16480
16481 * ada-lang.c (ada_value_slice_from_ptr): Take array stride into
16482 account when creating the array type of the slice.
16483 (ada_value_slice): Likewise.
16484
16485 2018-01-02 Joel Brobecker <brobecker@adacore.com>
16486
16487 * gdbtypes.h (enum dynamic_prop_node_kind) <DYN_PROP_BYTE_STRIDE>:
16488 New enum value.
16489 (create_array_type_with_stride): Add byte_stride_prop parameter.
16490 * gdbtypes.c (create_array_type_with_stride) <byte_stride_prop>:
16491 New parameter. Update all callers in this file.
16492 (array_type_has_dynamic_stride): New function.
16493 (is_dynamic_type_internal, resolve_dynamic_array): Add handling
16494 of arrays with dynamic byte strides.
16495 * dwarf2read.c (read_array_type): Add support for dynamic
16496 DW_AT_byte_stride attributes.
16497
16498 2018-01-02 Joel Brobecker <brobecker@adacore.com>
16499
16500 * dwarf2read.c (read_unspecified_type): Treat
16501 DW_TAG_enumeration_type DIEs from Ada units as stubs.
16502
16503 2018-01-01 Joel Brobecker <brobecker@adacore.com>
16504
16505 Update copyright year range in all GDB files.
16506
16507 2018-01-01, 18 Joel Brobecker <brobecker@adacore.com>
16508
16509 * copyright.py (BY_HAND): Remove gdb/testsuite/gdb.base/step-line.inp
16510 and gdb/testsuite/gdb.base/step-line.c.
16511
16512 2018-01-01 Joel Brobecker <brobecker@adacore.com>
16513
16514 * copyright.py (main): Dump the contents of
16515 MULTIPLE_COPYRIGHT_HEADERS (separately) from BY_HAND,
16516 even if BY_HAND is empty.
16517
16518 2018-01-01 Joel Brobecker <brobecker@adacore.com>
16519
16520 * top.c (print_gdb_version): Update Copyright year in version
16521 message.
16522
16523 2018-01-01 Joel Brobecker <brobecker@adacore.com>
16524
16525 * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2017.
16526
16527 For older changes see ChangeLog-2017.
16528 \f
16529 Local Variables:
16530 mode: change-log
16531 left-margin: 8
16532 fill-column: 74
16533 version-control: never
16534 coding: utf-8
16535 End:
This page took 0.505451 seconds and 3 git commands to generate.