Use unique_xmalloc_ptr in darwin_current_sos
[deliverable/binutils-gdb.git] / gdb / ChangeLog
1 2018-06-18 Tom Tromey <tom@tromey.com>
2
3 * solib-darwin.c (darwin_current_sos): Use unique_xmalloc_ptr.
4
5 2018-06-18 Tom Tromey <tom@tromey.com>
6
7 * solib-frv.c (frv_relocate_main_executable): Use
8 unique_xmalloc_ptr.
9 * solib-dsbt.c (dsbt_relocate_main_executable): Use
10 unique_xmalloc_ptr.
11
12 2018-06-18 Tom Tromey <tom@tromey.com>
13
14 * objfiles.h (inhibit_section_map_updates): Update.
15 (resume_section_map_updates, resume_section_map_updates_cleanup):
16 Remove.
17 * solib-svr4.c (svr4_handle_solib_event): Update.
18 * objfiles.c (inhibit_section_map_updates): Return
19 scoped_restore_tmpl<int>.
20 (resume_section_map_updates, resume_section_map_updates_cleanup):
21 Remove.
22
23 2018-06-18 Tom Tromey <tom@tromey.com>
24
25 * valprint.h (read_string): Update.
26 * valprint.c (read_string): Change type of "buffer".
27 (val_print_string): Update.
28 * python/py-value.c (valpy_string): Update.
29 * language.h (struct language_defn) <la_get_string>: Change
30 type of "buffer".
31 (default_get_string, c_get_string): Update.
32 * language.c (default_get_string): Change type of "buffer".
33 * guile/scm-value.c (gdbscm_value_to_string): Update.
34 * c-lang.c (c_get_string): Change type of "buffer".
35
36 2018-06-18 Tom Tromey <tom@tromey.com>
37
38 * ser-mingw.c (struct pipe_state_destroyer): New.
39 (pipe_state_up): New typedef.
40 (cleanup_pipe_state): Remove.
41 (pipe_windows_open): Use pipe_state_up. Don't release argv.
42
43 2018-06-18 Tom Tromey <tom@tromey.com>
44
45 * rust-lang.h (rust_yyerror): Don't declare.
46 * rust-lang.c (rust_language_defn): Update.
47 * rust-exp.y (yyerror): Now static.
48 * parse.c (parse_exp_in_context_1): Update.
49 * p-lang.h (p_yyerror): Don't declare.
50 * p-lang.c (p_language_defn): Update.
51 * p-exp.y (yyerror): Now static.
52 * opencl-lang.c (opencl_language_defn): Update.
53 * objc-lang.c (objc_language_defn): Update.
54 * m2-lang.h (m2_yyerror): Don't declare.
55 * m2-lang.c (m2_language_defn): Update.
56 * m2-exp.y (yyerror): Now static.
57 * language.h (struct language_defn) <la_error>: Remove.
58 * language.c (unk_lang_error): Remove.
59 (unknown_language_defn, auto_language_defn): Remove.
60 * go-lang.h (go_yyerror): Don't declare.
61 * go-lang.c (go_language_defn): Update.
62 * go-exp.y (yyerror): Now static.
63 * f-lang.h (f_yyerror): Don't declare.
64 * f-lang.c (f_language_defn): Update.
65 * f-exp.y (yyerror): Now static.
66 * d-lang.h (d_yyerror): Don't declare.
67 * d-lang.c (d_language_defn): Update.
68 * d-exp.y (yyerror): Now static.
69 * c-lang.h (c_yyerror): Don't declare.
70 * c-lang.c (c_language_defn, cplus_language_defn)
71 (asm_language_defn, minimal_language_defn): Update.
72 * c-exp.y (yyerror): Now static.
73 * ada-lang.h (ada_yyerror): Don't declare.
74 * ada-lang.c (ada_language_defn): Update.
75 * ada-exp.y (yyerror): Now static.
76
77 2018-06-18 Alan Hayward <alan.hayward@arm.com>
78
79 * aarch64-linux-nat.c (fetch_sveregs_from_thread): New function.
80 (store_sveregs_to_thread): Likewise.
81 (aarch64_linux_fetch_inferior_registers): Check for SVE.
82 (aarch64_linux_store_inferior_registers): Likewise.
83 * nat/aarch64-sve-linux-ptrace.c (aarch64_sve_get_sveregs): New
84 function.
85 (aarch64_sve_regs_copy_to_regcache): Likewise.
86 (aarch64_sve_regs_copy_from_regcache): Likewise.
87 * nat/aarch64-sve-linux-ptrace.h (aarch64_sve_get_sveregs): New
88 declaration.
89 (aarch64_sve_regs_copy_to_regcache): Likewise.
90 (aarch64_sve_regs_copy_from_regcache): Likewise.
91 (sve_context): Structure from Linux headers.
92 (SVE_SIG_ZREGS_SIZE): Define from Linux headers.
93 (SVE_SIG_ZREG_SIZE): Likewise.
94 (SVE_SIG_PREG_SIZE): Likewise.
95 (SVE_SIG_FFR_SIZE): Likewise.
96 (SVE_SIG_REGS_OFFSET): Likewise.
97 (SVE_SIG_ZREGS_OFFSET): Likewise.
98 (SVE_SIG_ZREG_OFFSET): Likewise.
99 (SVE_SIG_ZREGS_SIZE): Likewise.
100 (SVE_SIG_PREGS_OFFSET): Likewise.
101 (SVE_SIG_PREG_OFFSET): Likewise.
102 (SVE_SIG_PREGS_SIZE): Likewise.
103 (SVE_SIG_FFR_OFFSET): Likewise.
104 (SVE_SIG_REGS_SIZE): Likewise.
105 (SVE_SIG_CONTEXT_SIZE): Likewise.
106 (SVE_PT_REGS_MASK): Likewise.
107 (SVE_PT_REGS_FPSIMD): Likewise.
108 (SVE_PT_REGS_SVE): Likewise.
109 (SVE_PT_VL_INHERIT): Likewise.
110 (SVE_PT_VL_ONEXEC): Likewise.
111 (SVE_PT_REGS_OFFSET): Likewise.
112 (SVE_PT_FPSIMD_OFFSET): Likewise.
113 (SVE_PT_FPSIMD_SIZE): Likewise.
114 (SVE_PT_SVE_ZREG_SIZE): Likewise.
115 (SVE_PT_SVE_PREG_SIZE): Likewise.
116 (SVE_PT_SVE_FFR_SIZE): Likewise.
117 (SVE_PT_SVE_FPSR_SIZE): Likewise.
118 (SVE_PT_SVE_FPCR_SIZE): Likewise.
119 (__SVE_SIG_TO_PT): Likewise.
120 (SVE_PT_SVE_OFFSET): Likewise.
121 (SVE_PT_SVE_ZREGS_OFFSET): Likewise.
122 (SVE_PT_SVE_ZREG_OFFSET): Likewise.
123 (SVE_PT_SVE_ZREGS_SIZE): Likewise.
124 (SVE_PT_SVE_PREGS_OFFSET): Likewise.
125 (SVE_PT_SVE_PREG_OFFSET): Likewise.
126 (SVE_PT_SVE_PREGS_SIZE): Likewise.
127 (SVE_PT_SVE_FFR_OFFSET): Likewise.
128 (SVE_PT_SVE_FPSR_OFFSET): Likewise.
129 (SVE_PT_SVE_FPCR_OFFSET): Likewise.
130 (SVE_PT_SVE_SIZE): Likewise.
131 (SVE_PT_SIZE): Likewise.
132 (HAS_SVE_STATE): New define.
133
134 2018-06-18 Alan Hayward <alan.hayward@arm.com>
135
136 * nat/aarch64-sve-linux-sigcontext.h: New file.
137 * nat/aarch64-sve-linux-ptrace.h (SVE_VQ_BYTES): Move to
138 new files.
139 (SVE_VQ_MIN): Likewise.
140 (SVE_VQ_MAX): Likewise.
141 (SVE_VL_MIN): Likewise.
142 (SVE_VL_MAX): Likewise.
143 (SVE_NUM_ZREGS): Likewise.
144 (SVE_NUM_PREGS): Likewise.
145 (sve_vl_valid): Likewise.
146 (struct user_sve_header): Likewise.
147
148 2018-06-16 Andrew Burgess <andrew.burgess@embecosm.com>
149 Richard Bunt <Richard.Bunt@arm.com>
150
151 * linux-nat.c (stop_wait_callback): Don't discard SIGSTOP if it
152 was requested by GDB.
153
154 2018-06-15 Tom de Vries <tdevries@suse.de>
155
156 * MAINTAINERS (Write After Approval): Add Tom de Vries.
157
158 2018-06-14 Simon Marchi <simon.marchi@polymtl.ca>
159
160 * gnulib/update-gnulib.sh: Print expected versions of
161 autoconf/aclocal.
162
163 2018-06-14 Simon Marchi <simon.marchi@ericsson.com>
164
165 * arch-utils.c (default_type_align): Use type_length_units.
166 * gdbtypes.c (type_align): Use type_length_units.
167
168 2018-06-14 Philippe Waroquiers <philippe.waroquiers@skynet.be>
169
170 * cli/cli-script.c (_initialize_cli_script): Fix online documentation
171 of 'define' command.
172
173 2018-06-14 Tom de Vries <tdevries@suse.de>
174
175 PR cli/22573
176 * infcmd.c (print_return_value_1): Use get_user_print_options instead of
177 get_no_prettyformat_print_options.
178
179 2018-06-13 Simon Marchi <simon.marchi@ericsson.com>
180
181 * sparc-nat.h: Include target.h.
182 * sparc64-linux-nat.c (class sparc64_linux_nat_target)
183 <fetch_registers>: Remove this argument in function call.
184 <store_registers>: Remove this argument in function call, remove
185 extra semicolon.
186 <low_forget_process>: Call sparc64_forget_process instead of
187 sparc_forget_process.
188
189 2018-06-13 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
190
191 * procfs.c (_initialize_procfs): Use add_inf_child_target.
192 (procfs_target::make_corefile_notes): Adjust to new
193 target_read_alloc return type.
194
195 2018-06-12 Andrew Burgess <andrew.burgess@embecosm.com>
196 Stephen Roberts <stephen.roberts@arm.com>
197
198 PR gdb/22882
199 * infrun.c (fetch_inferior_event): If GDB is not proceeding then
200 run INF_EXEC_COMPLETE handler, even when not calling normal_stop.
201 Move should_notify_stop local into more inner scope.
202
203 2018-06-12 Andrew Burgess <andrew.burgess@embecosm.com>
204 Stephen Roberts <stephen.roberts@arm.com>
205
206 PR gdb/22882
207 * infrun.c (resume_1): Add call to mark_async_event_handler.
208
209 2018-06-12 Andrew Burgess <andrew.burgess@embecosm.com>
210
211 * infrun.c (do_target_wait): Change old version of $pc printed.
212
213 2018-06-11 Simon Marchi <simon.marchi@ericsson.com>
214
215 * dwarf2read.c (read_index_from_section): Rename to...
216 (read_gdb_index_from_section): ... this, update all callers.
217 (dwarf2_read_index): Rename to...
218 (dwarf2_read_gdb_index): ... this, update all callers.
219
220 2018-06-11 John David Anglin <danglin@gcc.gnu.org>
221
222 * gdb/hppa-linux-nat.c
223 (hppa_linux_nat_target::fetch_inferior_registers): Rename to
224 hppa_linux_nat_target::fetch_registers.
225
226 2018-06-11 Alan Hayward <alan.hayward@arm.com>
227
228 * aarch64-tdep.c (aarch64_dwarf_reg_to_regnum): Add mappings.
229 * aarch64-tdep.h (AARCH64_DWARF_SVE_VG): Add define.
230 (AARCH64_DWARF_SVE_FFR): Likewise.
231 (AARCH64_DWARF_SVE_P0): Likewise.
232 (AARCH64_DWARF_SVE_Z0): Likewise.
233
234 2018-06-11 Alan Hayward <alan.hayward@arm.com>
235
236 * common/common-regcache.h (raw_compare): New function.
237 * regcache.c (regcache::raw_compare): Likewise.
238 * regcache.h (regcache::raw_compare): New declaration.
239
240 2018-06-11 Alan Hayward <alan.hayward@arm.com>
241
242 * common/common-regcache.h (reg_buffer_common): New structure.
243 * regcache.c (reg_buffer::invalidate): Move from detached_regcache.
244 (reg_buffer::raw_supply): Likewise.
245 (reg_buffer::raw_supply_integer): Likewise.
246 (reg_buffer::raw_supply_zeroed): Likewise.
247 (reg_buffer::raw_collect): Likewise.
248 (reg_buffer::raw_collect_integer): Likewise.
249 * regcache.h (reg_buffer::invalidate): Move from detached_regcache.
250 (reg_buffer::raw_supply): Likewise.
251 (reg_buffer::raw_supply_integer): Likewise.
252 (reg_buffer::raw_supply_zeroed): Likewise.
253 (reg_buffer::raw_collect): Likewise.
254 (reg_buffer::raw_collect_integer): Likewise.
255
256 2018-06-10 Tom Tromey <tom@tromey.com>
257
258 * remote.c (stop_reply_p): Remove typedef. Don't declare queue.
259 (class remote_state) <stop_reply_queue>: Now std::vector.
260 (remote_state::~remote_state)
261 (remote_target::stop_reply_queue_length): Update.
262 (struct queue_iter_param, remove_child_of_pending_fork)
263 (struct check_pending_event_prevents_wildcard_vcont_callback_data)
264 (check_pending_event_prevents_wildcard_vcont_callback)
265 (remove_stop_reply_for_inferior)
266 (remove_stop_reply_of_remote_state)
267 (remote_notif_remove_once_on_match)
268 (stop_reply_match_ptid_and_ws)
269 (remote_kill_child_of_pending_fork): Remove.
270 (remote_target::remove_new_fork_children)
271 (remote_target::check_pending_events_prevent_wildcard_vcont)
272 (remote_target::discard_pending_stop_replies)
273 (remote_target::discard_pending_stop_replies_in_queue)
274 (remote_target::remote_notif_remove_queued_reply)
275 (remote_target::queued_stop_reply)
276 (remote_target::push_stop_reply, remote_target::peek_stop_reply)
277 (remote_target::wait, remote_target::kill_new_fork_children)
278 (remote_target::async): Update.
279
280 2018-06-10 Tom Tromey <tom@tromey.com>
281
282 * record-full.c (record_full_arch_list_cleanups): Remove.
283 (record_full_message): Use try/catch.
284 (record_full_wait_cleanups): Remove.
285 (record_full_wait_1): Use try/catch.
286 (record_full_restore): Likewise.
287
288 2018-06-10 Tom Tromey <tom@tromey.com>
289
290 * record-full.c (record_full_breakpoint_p): Remove typedef. Don't
291 declare VEC. Add constructor.
292 <in_target_beneath>: Now bool.
293 (record_full_breakpoints): Now a std::vector, static.
294 (record_full_sync_record_breakpoints)
295 (record_full_init_record_breakpoints)
296 (record_full_target::insert_breakpoint)
297 (record_full_target::remove_breakpoint): Update. Don't use XNEW.
298
299 2018-06-10 Simon Marchi <simon.marchi@polymtl.ca>
300
301 * dwarf2read.c (process_cu_includes): Remove struct keyword.
302 * serial.c (serial_interface_lookup): Remove struct keyword.
303
304 2018-06-10 Tom Tromey <tom@tromey.com>
305
306 * procfs.c (procfs_target::xfer_partial): Use "beneath" as a
307 method.
308 * nto-procfs.c (nto_procfs_target::xfer_partial): Use "beneath" as
309 a method.
310 * go32-nat.c (go32_nat_target::xfer_partial): Use "beneath" as a
311 method.
312 * arm-linux-nat.c (arm_linux_nat_target::read_description): Use
313 "beneath" as a method.
314 * arm-fbsd-nat.c (arm_fbsd_nat_target::read_description):
315 Use "beneath" as a method.
316
317 2018-06-10 Tom Tromey <tom@tromey.com>
318
319 * tracefile.c (struct trace_file_writer_deleter): New.
320 <operator()>: Rename from trace_file_writer_xfree.
321 (trace_file_writer_up): New typedef.
322 (tsave_command, trace_save_tfile, trace_save_ctf): Update.
323
324 2018-06-09 Simon Marchi <simon.marchi@ericsson.com>
325
326 * regcache.h (reg_buffer) <~reg_buffer>: Use default destructor.
327 <m_registers, m_register_status>: Change type to
328 std::unique_ptr.
329 * regcache.c (reg_buffer::reg_buffer): Use new instead of
330 XCNEWVEC.
331
332 2018-06-09 Simon Marchi <simon.marchi@ericsson.com>
333
334 * common/common-regcache.h (enum register_status): Add
335 underlying type "signed char".
336 * regcache.h (reg_buffer) <m_register_status>: Change type to
337 register_status *.
338 * regcache.c (reg_buffer::reg_buffer): Alocate arrays of
339 register_status instead of signed char.
340 (reg_buffer::save): Use REG_UNKNOWN instead of 0.
341 (reg_buffer::get_register_status): Remove cast.
342 (readable_regcache::raw_read): Remove cast.
343 (readable_regcache::cooked_read): Remove cast.
344
345 2018-06-09 Tom Tromey <tom@tromey.com>
346
347 * source.c (reverse_search_command, forward_search_command): Use
348 scoped_fd.
349
350 2018-06-09 Tom Tromey <tom@tromey.com>
351
352 * serial.c (serial_ops_p): Remove typedef. Don't declare VEC.
353 (serial_ops_list): Now static, std::vector.
354 (serial_interface_lookup, serial_add_interface): Update.
355
356 2018-06-09 Tom Tromey <tom@tromey.com>
357
358 * dwarf2read.c (process_cu_includes): Update.
359 (process_full_comp_unit): Update.
360 * dwarf2read.h (struct dwarf2_per_objfile) <just_read_cus>: Now a
361 std::vector.
362
363 2018-06-08 Paul Koning <paul_koning@dell.com>
364
365 PR gdb/23252
366
367 * python/python.c (do_start_initialization):
368 Avoid call to internal Python API.
369 (init__gdb_module): New function.
370
371 2018-06-08 Gary Benson <gbenson@redhat.com>
372
373 * linux-thread-db.c (valprint.h): New include.
374 (struct check_thread_db_info): New structure.
375 (check_thread_db_on_load, tdb_testinfo): New static globals.
376 (check_thread_db, check_thread_db_callback): New functions.
377 (try_thread_db_load_1): Run integrity checks if requested.
378 (maintenance_check_libthread_db): New function.
379 (_initialize_thread_db): Register "maint check libthread-db"
380 and "maint set/show check-libthread-db".
381 * NEWS: Mention the above new commands.
382
383 2018-06-08 Tom Tromey <tom@tromey.com>
384
385 * windows-nat.c (windows_nat_target::xfer_partial): "beneath" is
386 now a method.
387
388 2018-06-08 Tom Tromey <tom@tromey.com>
389
390 * btrace.c (parse_xml_raw): Use gdb::unique_xmalloc_ptr.
391
392 2018-06-08 Tom Tromey <tom@tromey.com>
393
394 * common/btrace-common.h (struct btrace_data): Add constructor,
395 destructor, move assignment operator.
396 <empty, clear, fini>: New methods.
397 <format>: Initialize.
398 (btrace_data_init, btrace_data_fini, btrace_data_clear)
399 (btrace_data_empty): Don't declare.
400 * common/btrace-common.c (btrace_data_init): Remove.
401 (btrace_data::fini): Rename from btrace_data_fini.
402 (btrace_data::empty): Rename from btrace_data_empty.
403 (btrace_data::clear): Rename from btrace_data_clear. Return
404 bool.
405 * btrace.h (make_cleanup_btrace_data): Don't declare.
406 * btrace.c (btrace_add_pc, btrace_stitch_trace, btrace_clear)
407 (parse_xml_btrace): Update.
408 (do_btrace_data_cleanup, make_cleanup_btrace_data): Remove.
409 (maint_btrace_clear_packet_history_cmd): Update.
410
411 2018-06-07 Pedro Alves <palves@redhat.com>
412
413 * target.h (target_ops) <beneath>: Now a method. All references
414 updated.
415 (class target_stack): New.
416 * target.c (g_target_stack): New.
417 (g_current_top_target): Delete.
418 (current_top_target): Get the top target out of g_target_stack.
419 (target_stack::push, target_stack::unpush): New.
420 (push_target, unpush_target): Reimplement.
421 (target_is_pushed): Reimplement in terms of g_target_stack.
422 (target_ops::beneath, target_stack::find_beneath): New.
423
424 2018-06-07 Pedro Alves <palves@redhat.com>
425
426 * target.h (find_target_beneath): Delete declaration.
427 * target.c (find_target_beneath): Delete definition.
428 * aix-thread.c: All callers of find_target_beneath adjusted to
429 call target_ops::beneath instead.
430 * bsd-uthread.c: Likewise.
431 * linux-thread-db.c: Likewise.
432 * ravenscar-thread.c: Likewise.
433 * sol-thread.c: Likewise.
434 * spu-multiarch.c: Likewise.
435
436 2018-06-07 Pedro Alves <palves@redhat.com>
437
438 * target.h (target_ops) <beneath>: Now a method. All references
439 updated.
440 (target_ops) <m_beneath>: New.
441 * target.c (target_ops::beneath): New.
442 * corelow.c: Adjust all references to target_ops::beneath.
443 * linux-thread-db.c: Likewise.
444 * make-target-delegates: Likewise.
445 * record-btrace.c: Likewise.
446 * record-full.c: Likewise.
447 * remote.c: Likewise.
448 * target.c: Likewise.
449 * target-delegates.c: Regenerate.
450
451 2018-06-07 Pedro Alves <palves@redhat.com>
452
453 * target.h (target_stack): Delete.
454 (current_top_target): Declare function.
455 * target.c (target_stack): Delete.
456 (g_current_top_target): New.
457 (current_top_target): New function.
458 * auxv.c: Use current_top_target instead of target_stack
459 throughout.
460 * avr-tdep.c: Likewise.
461 * breakpoint.c: Likewise.
462 * corefile.c: Likewise.
463 * elfread.c: Likewise.
464 * eval.c: Likewise.
465 * exceptions.c: Likewise.
466 * frame.c: Likewise.
467 * gdbarch-selftests.c: Likewise.
468 * gnu-v3-abi.c: Likewise.
469 * ia64-tdep.c: Likewise.
470 * ia64-vms-tdep.c: Likewise.
471 * infcall.c: Likewise.
472 * infcmd.c: Likewise.
473 * infrun.c: Likewise.
474 * linespec.c: Likewise.
475 * linux-tdep.c: Likewise.
476 * minsyms.c: Likewise.
477 * ppc-linux-nat.c: Likewise.
478 * ppc-linux-tdep.c: Likewise.
479 * procfs.c: Likewise.
480 * regcache.c: Likewise.
481 * remote.c: Likewise.
482 * rs6000-tdep.c: Likewise.
483 * s390-linux-nat.c: Likewise.
484 * s390-tdep.c: Likewise.
485 * solib-aix.c: Likewise.
486 * solib-darwin.c: Likewise.
487 * solib-dsbt.c: Likewise.
488 * solib-spu.c: Likewise.
489 * solib-svr4.c: Likewise.
490 * solib-target.c: Likewise.
491 * sparc-tdep.c: Likewise.
492 * sparc64-tdep.c: Likewise.
493 * spu-tdep.c: Likewise.
494 * symfile.c: Likewise.
495 * symtab.c: Likewise.
496 * target-descriptions.c: Likewise.
497 * target-memory.c: Likewise.
498 * target.c: Likewise.
499 * target.h: Likewise.
500 * tracefile-tfile.c: Likewise.
501 * tracepoint.c: Likewise.
502 * valops.c: Likewise.
503 * valprint.c: Likewise.
504 * value.c: Likewise.
505 * windows-tdep.c: Likewise.
506 * mi/mi-main.c: Likewise.
507
508 2018-06-07 Tom Tromey <tom@tromey.com>
509
510 * valprint.h (build_address_symbolic): Declare.
511 * printcmd.c (print_address_symbolic): Update.
512 (build_address_symbolic): Change "name" and "filename" to
513 std::string.
514 * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn):
515 Update.
516 * defs.h (build_address_symbolic): Remove declaration.
517
518 2018-06-07 Alan Hayward <alan.hayward@arm.com>
519
520 * aarch64-tdep.c (AARCH64_SVE_V0_REGNUM): Add define.
521 (aarch64_vnv_type): Add function.
522 (aarch64_pseudo_register_name): Add V regs for SVE.
523 (aarch64_pseudo_register_type): Likewise.
524 (aarch64_pseudo_register_reggroup_p): Likewise.
525 (aarch64_pseudo_read_value_2): Use V0 offset for SVE
526 (aarch64_pseudo_read_value): Add V regs for SVE.
527 (aarch64_pseudo_write_2): Use V0 offset for SVE
528 (aarch64_pseudo_write): Add V regs for SVE.
529 * aarch64-tdep.h (struct gdbarch_tdep): Add vnv_type.
530
531 2018-06-06 Sergio Durigan Junior <sergiodj@redhat.com>
532
533 * arch/aarch64.h (sve_vq_from_vl): Guard with #ifndef.
534 (sve_vl_from_vq): Likewise.
535
536 2018-06-05 Tom Tromey <tom@tromey.com>
537
538 * cli/cli-cmds.c (show_version): Update.
539 * top.c (print_gdb_version): Add "interactive" parameter.
540 Update.
541 * main.c (captured_main_1): Update.
542 * top.h (print_gdb_version): Add "interactive" parameter and a
543 comment.
544
545 2018-06-05 David Malcolm <dmalcolm@redhat.com>
546
547 * common/enum-flags.h: Add trailing semicolon to example in
548 comment.
549
550 2018-06-05 Tom Tromey <tom@tromey.com>
551
552 PR cli/12326:
553 * NEWS: Add entry about pager.
554 * utils.c (pagination_disabled_for_command): New global.
555 (prompt_for_continue): Allow "c" response to prompt.
556 (reinitialize_more_filter): Clear
557 pagination_disabled_for_command.
558 (fputs_maybe_filtered): Check pagination_disabled_for_command.
559
560 2018-06-04 Tom Tromey <tom@tromey.com>
561
562 * ada-lang.h (ada_lookup_symbol_list): Update.
563 * ada-lang.c (resolve_subexp): Update.
564 (symbols_are_identical_enums): Change type of syms. Remove nsyms
565 parameter.
566 (remove_extra_symbols, remove_irrelevant_renamings): Likewise.
567 (ada_lookup_symbol_list_worker, ada_lookup_symbol_list): Change
568 results parameter to std::vector.
569 (ada_iterate_over_symbols, ada_lookup_symbol, get_var_value):
570 Update.
571 * ada-exp.y (block_lookup): Update.
572 (select_possible_type_sym): Change type of syms. Remove nsyms
573 parameter.
574 (write_var_or_type, write_name_assoc): Update.
575
576 2018-06-04 Joel Brobecker <brobecker@adacore.com>
577
578 * windows-nat.c (windows_nat_target::xfer_partial): Return
579 TARGET_XFER_E_IO if we need to delegate to the target beneath
580 but BENEATH is NULL.
581
582 2018-06-04 Simon Marchi <simon.marchi@ericsson.com>
583
584 * Makefile.in (config.status): Add configure.nat as a
585 dependency.
586
587 2018-06-04 Tom Tromey <tom@tromey.com>
588
589 * cp-name-parser.y (cpname_state): Add method declarations.
590 (HANDLE_QUAL): Update.
591 (cpname_state::d_grab, cpname_state::fill_comp)
592 (cpname_state::make_operator, cpname_state::make_dtor)
593 (cpname_state::make_builtin_type, cpname_state::make_name)
594 (cpname_state::d_qualify, cpname_state::d_int_type)
595 (cpname_state::d_unary, cpname_state::d_binary): Now methods.
596 (%union): Move earlier.
597
598 2018-06-04 Alan Hayward <alan.hayward@arm.com>
599
600 * elfread.c (elf_symfile_segments): Use ELF_SECTION_IN_SEGMENT.
601
602 2018-06-04 Alan Hayward <alan.hayward@arm.com>
603
604 * aarch64-tdep.c (aarch64_pseudo_read_value_1): New helper func.
605 (aarch64_pseudo_write_1): Likewise.
606 (aarch64_pseudo_read_value): Use helper.
607 (aarch64_pseudo_write): Likewise.
608
609 2018-06-04 Pedro Alves <palves@redhat.com>
610
611 * darwin-nat.c (darwin_ops): Delete.
612 (darwin_attach_pid): Use get_native_target.
613
614 2018-06-04 Alan Hayward <alan.hayward@arm.com>
615
616 * aarch64-tdep.c (aarch64_get_tdesc_vq): Use uint64_t for VQ.
617 * aarch64-tdep.h (struct gdbarch_tdep): Likewise.
618
619 2018-06-04 Alan Hayward <alan.hayward@arm.com>
620
621 * aarch64-linux-nat.c (aarch64_linux_read_description): Support SVE.
622 * aarch64-tdep.c (aarch64_get_tdesc_vq): New function.
623 (aarch64_gdbarch_init): Check for SVE.
624 * aarch64-tdep.h (gdbarch_tdep::has_sve): New function.
625
626 2018-06-04 Alan Hayward <alan.hayward@arm.com>
627
628 * aarch64-tdep.c (aarch64_read_description): Use uint64_t for VQ.
629 * aarch64-tdep.h (aarch64_read_description): Likewise.
630 * arch/aarch64.c (aarch64_create_target_description): Likewise.
631 * arch/aarch64.h (aarch64_create_target_description): Likewise.
632 * features/aarch64-sve.c (create_feature_aarch64_sve): Likewise.
633 * nat/aarch64-sve-linux-ptrace.c(aarch64_sve_get_vq): Likewise.
634 * nat/aarch64-sve-linux-ptrace.h (aarch64_sve_get_vq): Likewise.
635
636 2018-06-02 Simon Marchi <simon.marchi@ericsson.com>
637
638 * value.c (value_fetch_lazy_bitfield): New.
639 (value_fetch_lazy_memory): New.
640 (value_fetch_lazy_register): New.
641 (value_fetch_lazy): Factor out to smaller functions.
642
643 2018-06-01 Tom Tromey <tom@tromey.com>
644
645 * cp-name-parser.y (backslashable, represented): Now const.
646
647 2018-06-01 Tom Tromey <tom@tromey.com>
648
649 * cp-name-parser.y: Include parser-defs.h.
650 (parser_fprintf): Remove declaration.
651
652 2018-06-01 Tom Tromey <tom@tromey.com>
653
654 * cp-name-parser.y: Use %pure-parser, %lex-param, and
655 %parse-param.
656 (lexptr, prev_lexptr, error_lexptr, global_errmsg, demangle_info)
657 (global_result): Remove globals.
658 (struct cpname_state): New.
659 (yyparse): Don't declare.
660 (yylex, yyerror): Move declarations after %union.
661 (d_grab, fill_comp, make_operator, make_dtor, make_builtin_type)
662 (make_name): Add state parameter.
663 Update all callers.
664 (d_qualify, d_int_type, d_unary, d_binary, parse_number) Add state
665 parameter.
666 (HANDLE_QUAL, HANDLE_SPECIAL, HANDLE_TOKEN2, HANDLE_TOKEN3):
667 Update.
668 (yylex): Add lvalp, state parameters.
669 (yyerror): Add state parameter.
670 (cp_demangled_name_to_comp): Update.
671
672 2018-06-01 Tom Tromey <tom@tromey.com>
673
674 * cp-name-parser.y (parser_fprintf): Declare.
675 (GDB_YY_REMAP_PREFIX): Define.
676 Include yy-remap.h. Don't redefine yy* identifiers.
677
678 2018-06-01 Tom Tromey <tom@tromey.com>
679
680 * python/py-type.c (typy_legacy_template_argument): Update.
681 * cp-support.h (cp_demangled_name_to_comp): Update.
682 * cp-name-parser.y (cp_demangled_name_to_comp): Change errmsg
683 parameter to be a "std::string *".
684 (main): Update.
685
686 2018-06-01 H.J. Lu <hongjiu.lu@intel.com>
687
688 * ada-lex.l: Include "diagnostics.h" instead of
689 "common/diagnostics.h".
690 * unittests/environ-selftests.c: Likewise.
691 * common/diagnostics.h: Moved to ../include.
692
693 2018-06-01 Joel Brobecker <brobecker@adacore.com>
694
695 * breakpoint.c (breakpoint_re_set): Temporarily force language_mode
696 to language_mode_manual while calling breakpoint_re_set_one.
697
698 2018-06-01 Tom Tromey <tom@tromey.com>
699
700 * valops.c (value_cast_structs, destructor_name_p): Update.
701 * symtab.c (gdb_mangle_name): Update.
702 * stabsread.c (define_symbol, read_cpp_abbrev, read_baseclasses):
703 Update.
704 * p-valprint.c (pascal_object_is_vtbl_ptr_type)
705 (pascal_object_print_value_fields, pascal_object_print_value):
706 Update.
707 * p-typeprint.c (pascal_type_print_derivation_info): Update.
708 * linespec.c (find_methods): Update.
709 * gdbtypes.h (type_name_no_tag): Remove.
710 (type_name_or_error): Rename from type_name_no_tag_or_error.
711 * gdbtypes.c (type_name_no_tag): Remove.
712 (type_name_or_error): Rename from type_name_no_tag_or_error.
713 (lookup_struct_elt_type, check_typedef): Update.
714 * expprint.c (print_subexp_standard): Update.
715 * dwarf2read.c (dwarf2_add_field, load_partial_dies): Update.
716 * d-namespace.c (d_lookup_nested_symbol): Update.
717 * cp-valprint.c (cp_is_vtbl_ptr_type, cp_print_value_fields)
718 (cp_print_class_member): Update.
719 * cp-namespace.c (cp_lookup_nested_symbol): Update.
720 * completer.c (add_struct_fields): Update.
721 * c-typeprint.c (cp_type_print_derivation_info)
722 (c_type_print_varspec_prefix, c_type_print_base_struct_union):
723 Update.
724 * ada-lang.c (parse_old_style_renaming, xget_renaming_scope)
725 (ada_prefer_type, ada_is_exception_sym): Update.
726
727 2018-06-01 Tom Tromey <tom@tromey.com>
728
729 * valops.c (enum_constant_from_type, value_namespace_elt)
730 (value_maybe_namespace_elt): Update.
731 * valarith.c (find_size_for_pointer_math): Update.
732 * target-descriptions.c (make_gdb_type): Update.
733 * symmisc.c (print_symbol): Update.
734 * stabsread.c (define_symbol, read_type)
735 (complain_about_struct_wipeout, add_undefined_type)
736 (cleanup_undefined_types_1): Update.
737 * rust-lang.c (rust_tuple_type_p, rust_slice_type_p)
738 (rust_range_type_p, val_print_struct, rust_print_struct_def)
739 (rust_internal_print_type, rust_composite_type)
740 (rust_evaluate_funcall, rust_evaluate_subexp)
741 (rust_inclusive_range_type_p): Update.
742 * python/py-type.c (typy_get_tag): Update.
743 * p-typeprint.c (pascal_type_print_base): Update.
744 * mdebugread.c (parse_symbol, parse_type): Update.
745 * m2-typeprint.c (m2_long_set, m2_record_fields, m2_enum):
746 Update.
747 * guile/scm-type.c (gdbscm_type_tag): Update.
748 * go-lang.c (sixg_string_p): Update.
749 * gnu-v3-abi.c (build_gdb_vtable_type, build_std_type_info_type):
750 Update.
751 * gdbtypes.h (struct main_type) <tag_name>: Remove.
752 (TYPE_TAG_NAME): Remove.
753 * gdbtypes.c (type_name_no_tag): Simplify.
754 (check_typedef, check_types_equal, recursive_dump_type)
755 (copy_type_recursive, arch_composite_type): Update.
756 * f-typeprint.c (f_type_print_base): Update. Print "Type" prefix
757 in summary mode when needed.
758 * eval.c (evaluate_funcall): Update.
759 * dwarf2read.c (fixup_go_packaging, read_structure_type)
760 (process_structure_scope, read_enumeration_type)
761 (read_namespace_type, read_module_type, determine_prefix): Update.
762 * cp-support.c (inspect_type): Update.
763 * coffread.c (process_coff_symbol, decode_base_type): Update.
764 * c-varobj.c (c_is_path_expr_parent): Update.
765 * c-typeprint.c (c_type_print_base_struct_union): Update.
766 (c_type_print_base_1): Update. Print struct/class/union/enum in
767 summary when using C language.
768 * ax-gdb.c (gen_struct_ref, gen_namespace_elt)
769 (gen_maybe_namespace_elt): Update.
770 * ada-lang.c (ada_type_name): Simplify.
771 (empty_record, ada_template_to_fixed_record_type_1)
772 (template_to_static_fixed_type)
773 (to_record_with_fixed_variant_part, ada_check_typedef): Update.
774
775 2018-06-01 Tom Tromey <tom@tromey.com>
776
777 * dwarf2read.c (dwarf2_compute_name): Pass CU's language to
778 c_print_type.
779 * c-typeprint.c (c_print_type_1): Add "language" parameter.
780 (c_print_type): Update.
781 (c_print_type): New overload.
782 (c_type_print_varspec_prefix, c_type_print_args)
783 (c_type_print_varspec_suffix, c_print_type_no_offsets)
784 (c_type_print_base_struct_union, c_type_print_base_1)
785 (cp_type_print_method_args): Add "language" parameter.
786 (c_type_print_base): Update.
787 * c-lang.h (c_print_type): Add new overload.
788
789 2018-06-01 Tom Tromey <tom@tromey.com>
790
791 * typeprint.h (c_type_print_varspec_suffix): Don't declare.
792 * c-typeprint.c (c_type_print_varspec_suffix): Now static.
793
794 2018-06-01 Alan Hayward <alan.hayward@arm.com>
795
796 * aarch64-tdep.c (aarch64_sve_register_names): New const
797 var.
798 * arch/aarch64.h (enum aarch64_regnum): Add SVE entries.
799 (AARCH64_SVE_Z_REGS_NUM): New define.
800 (AARCH64_SVE_P_REGS_NUM): Likewise.
801 (AARCH64_SVE_NUM_REGS): Likewise.
802
803 2018-05-31 Uros Bizjak <ubizjak@gmail.com>
804
805 * nat/linux-ptrace.h [__alpha__]
806 (GDB_ARCH_IS_TRAP_BRKPT, GDB_ARCH_IS_TRAP_HWBKPT): Remove
807 definitions.
808
809 2018-05-31 Maciej W. Rozycki <macro@mips.com>
810
811 * arch-utils.c (gdbarch_info_fill): Set `default_byte_order' to
812 the endianness selected.
813 * NEWS: Document `set endian auto' mode operation update.
814
815 2018-05-31 Alan Hayward <alan.hayward@arm.com>
816
817 * Makefile.in: Add new header.
818 * gdb/arch/aarch64.h (sve_vg_from_vl): New macro.
819 (sve_vl_from_vg): Likewise.
820 (sve_vq_from_vl): Likewise.
821 (sve_vl_from_vq): Likewise.
822 (sve_vq_from_vg): Likewise.
823 (sve_vg_from_vq): Likewise.
824 * configure.nat: Add new c file.
825 * nat/aarch64-sve-linux-ptrace.c: New file.
826 * nat/aarch64-sve-linux-ptrace.h: New file.
827
828 2018-05-31 Alan Hayward <alan.hayward@arm.com>
829
830 * aarch64-linux-nat.c (aarch64_linux_read_description):
831 Add parmeter zero.
832 * aarch64-linux-tdep.c (aarch64_linux_core_read_description):
833 Likewise.
834 * aarch64-tdep.c (tdesc_aarch64_list): Add.
835 (aarch64_read_description): Use VQ to index tdesc_aarch64_list.
836 (aarch64_gdbarch_init): Add parmeter zero.
837 * aarch64-tdep.h (aarch64_read_description): Add VQ parmeter.
838 * arch/aarch64.c (aarch64_create_target_description): Check VQ.
839 * arch/aarch64.h (aarch64_create_target_description): Add VQ.
840 parmeter.
841 * doc/gdb.texinfo: Describe SVE feature
842 * features/aarch64-sve.c: New file.
843
844 2018-05-31 Omair Javaid <omair.javaid@linaro.org>
845
846 PR gdb/23210
847 * gdbarch.sh (significant_addr_bit): Default to zero when
848 not set by target architecture.
849 * gdbarch.c: Re-generated.
850 * utils.c (address_significant): Update.
851
852 2018-05-30 Joel Brobecker <brobecker@adacore.com>
853
854 * stack.c (func_command): Remove trailing newline in call to error.
855
856 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
857
858 * regcache.h (regcache_raw_collect): Remove, update callers to
859 use regcache::raw_collect.
860 * regcache.c (regcache_raw_collect): Remove.
861
862 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
863
864 * regcache.h (regcache_raw_supply): Remove, update callers to
865 use detached_regcache::raw_supply.
866 * regcache.c (regcache_raw_supply): Remove.
867
868 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
869
870 * regcache.h (regcache_cooked_write_part): Remove, update
871 callers to use regcache::cooked_write_part.
872 * regcache.c (regcache_cooked_write_part): Remove.
873
874 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
875
876 * regcache.h (regcache_cooked_read_part): Remove, update callers
877 to use readable_regcache::cooked_read_part.
878 * regcache.c (regcache_cooked_read_part): Remove.
879
880 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
881
882 * regcache.h (regcache_cooked_read_value): Remove, update
883 callers to use readable_regcache::cooked_read_value.
884 * regcache.c (regcache_cooked_read_value): Remove.
885
886 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
887
888 * regcache.h (regcache_cooked_write): Remove, update callers to
889 use regcache::cooked_write.
890 * regcache.c (regcache_cooked_write): Remove.
891
892 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
893
894 * regcache.h (regcache_invalidate): Remove, update callers to
895 use detached_regcache::invalidate instead.
896 * regcache.c (regcache_invalidate): Remove.
897
898 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
899
900 * regcache.h (regcache_raw_write_part): Remove, update callers
901 to use regcache::raw_write_part instead.
902 * regcache.c (regcache_raw_write_part): Remove.
903
904 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
905
906 * regcache.h (regcache_raw_read_part): Remove, update callers to
907 use readable_regcache::raw_read_part instead.
908 * regcache.c (regcache_raw_read_part): Remove.
909
910 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
911
912 * regcache.h (regcache_cooked_read): Remove, update callers to
913 use readable_regcache::cooked_read instead.
914 * regcache.c (regcache_cooked_read): Remove.
915
916 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
917
918 * regcache.h (regcache_raw_write): Remove, update callers to use
919 regcache::raw_write instead.
920 * regcache.c (regcache_raw_write): Remove.
921
922 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
923
924 * regcache.h (regcache_raw_read): Remove, update callers to use
925 readable_regcache::raw_read instead.
926 * regcache.c (regcache_raw_read): Remove.
927
928 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
929
930 * regcache.h (regcache_raw_update): Remove, update callers to
931 use readable_regcache::raw_update instead.
932 * regcache.c (regcache_raw_update): Remove.
933
934 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
935
936 * regcache.h (regcache_register_status): Remove, update callers
937 to use reg_buffer::get_register_status directly instead.
938 * regcache.c (regcache_register_status): Remove.
939
940 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
941
942 * regcache.h (regcache_get_ptid): Remove, update all callers to
943 call regcache::ptid instead.
944 * regcache.c (regcache_get_ptid): Remove.
945
946 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
947
948 * Makefile.in (ALL_TARGET_OBS): Add or1k-tdep.o.
949
950 2018-05-30 Pedro Alves <palves@redhat.com>
951
952 * common/common-exceptions.h (exception_rethrow): Use
953 ATTRIBUTE_NORETURN.
954
955 2018-05-29 Simon Marchi <simon.marchi@polymtl.ca>
956
957 * breakpoint.c (print_solib_event, check_status_catch_solib):
958 Remove struct keyword in range-based for loops.
959 * dbxread.c (find_corresponding_bincl_psymtab): Likewise.
960 * dwarf2read.c (compute_delayed_physnames, rust_union_quirks);
961 Likewise.
962 * linespec.c (find_superclass_methods, search_minsyms_for_name):
963 Likewise.
964 * symfile.c (addr_info_make_relative): Likewise.
965 * thread.c (value_in_thread_stack_temporaries): Likewise.
966
967 2018-05-29 Weimin Pan <weimin.pan@oracle.com>
968
969 * minsyms.h (lookup_minimal_symbol_and_objfile): Remove declaration.
970 * minsyms.c (lookup_minimal_symbol_and_objfile): Remove definition.
971 * coff-pe-read.c (add_pe_forwarded_sym): Replace
972 lookup_minimal_symbol_and_objfile with lookup_bound_minimal_symbol.
973 * glibc-tdep.c (glibc_skip_solib_resolver): Likewise.
974 * jit.c (jit_breakpoint_re_set_internal): Likewise.
975 * printcmd.c (info_address_command): Likewise.
976
977 2018-05-29 Tom Tromey <tom@tromey.com>
978
979 * windows-nat.c (handle_exception): Update fall-through comment.
980
981 2018-05-29 Tom Tromey <tom@tromey.com>
982
983 * progspace.h (so_list_ptr): Remove typedef. Don't declare VEC.
984 (struct program_space) <added_solibs>: Now a std::vector.
985 * breakpoint.c (print_solib_event): Update.
986 (check_status_catch_solib): Update.
987 * progspace.c (clear_program_space_solib_cache): Update.
988 * solib.c (update_solib_list): Update.
989
990 2018-05-29 Tom Tromey <tom@tromey.com>
991
992 * python/py-type.c (typy_richcompare): Update.
993 * guile/scm-type.c (tyscm_equal_p_type_smob): Update.
994 * gdbtypes.h (types_deeply_equal): Return bool.
995 (types_equal): Likewise.
996 * gdbtypes.c (type_equality_entry_d): Remove typedef. Don't
997 declare VEC.
998 (check_types_equal): Change worklist to std::vector. Return
999 bool.
1000 (struct type_equality_entry): Add constructor.
1001 (compare_maybe_null_strings): Return bool.
1002 (check_types_worklist): Return bool. Change worklist to
1003 std::vector.
1004 (types_deeply_equal): Use std::vector.
1005 (types_equal): Return bool.
1006 (compare_maybe_null_strings): Simplify.
1007
1008 2018-05-29 Tom Tromey <tom@tromey.com>
1009
1010 * record-btrace.c (tp_t): Remove typedef. Don't declare VEC.
1011
1012 2018-05-29 Tom Tromey <tom@tromey.com>
1013
1014 * objc-lang.h: Don't include cp-support.h.
1015 * common/gdb_vecs.h (const_char_ptr): Remove typedef. Don't
1016 declare VEC.
1017
1018 2018-05-27 Tom Tromey <tom@tromey.com>
1019
1020 * Makefile.in (DEPFILES): Don't reference REMOTE_OBS.
1021
1022 2018-05-25 Tom Tromey <tom@tromey.com>
1023
1024 * value.c (value::location): Initialize.
1025
1026 2018-05-25 Tom Tromey <tom@tromey.com>
1027
1028 * dbxread.c (init_bincl_list): Remove.
1029 (bincl_list): Now a std::vector.
1030 (bincls_allocated, next_bincl): Remove.
1031 (free_bincl_list, do_free_bincl_list_cleanup)
1032 (make_cleanup_free_bincl_list): Remove.
1033 (dbx_read_symtab, elfstab_build_psymtabs): Use scoped_restore,
1034 unique_xmalloc_ptr.
1035 (find_corresponding_bincl_psymtab, read_dbx_symtab): Update.
1036 (struct header_file_location): Add constructor.
1037 (add_bincl_to_list): Remove.
1038
1039 2018-05-25 Tom Tromey <tom@tromey.com>
1040
1041 * tui/tui.c (tui_enable): Update.
1042 * mi/mi-interp.c (mi_interp::init): Update.
1043 * interps.h (class interp) <name>: New method.
1044 <m_name>: Rename from name.
1045 (~scoped_restore_interp): Update.
1046 * interps.c (interp::interp): Update.
1047 (interp_add, interp_set, interp_lookup_existing)
1048 (current_interp_named_p): Update.
1049
1050 2018-05-25 Tom Tromey <tom@tromey.com>
1051
1052 * interps.c (interp_name): Remove.
1053 * mi/mi-interp.c (mi_interp::init): Update.
1054 * interps.h (interp_name): Remove.
1055 (~scoped_restore_interp): Update.
1056 * tui/tui.c (tui_enable): Update.
1057
1058 2018-05-25 Tom Tromey <tom@tromey.com>
1059
1060 * utils.c (fputs_maybe_filtered): Update.
1061 * linespec.c (decode_line_full): Update.
1062 * mi/mi-interp.c (mi_on_normal_stop_1, mi_tsv_modified)
1063 (mi_print_breakpoint_for_event, mi_solib_loaded)
1064 (mi_solib_unloaded, mi_command_param_changed, mi_memory_changed)
1065 (mi_user_selected_context_changed): Update.
1066 * mi/mi-main.c (mi_execute_command): Update.
1067 * cli/cli-script.c (execute_control_command): Update.
1068 * python/python.c (execute_gdb_command): Update.
1069 * solib.c (info_sharedlibrary_command): Update.
1070 * interps.c (interp_ui_out): Remove.
1071 * interps.h (interp_ui_out): Remove.
1072
1073 2018-05-25 Tom Tromey <tom@tromey.com>
1074
1075 * tui/tui-interp.c (as_tui_interp): Use dynamic_cast.
1076 * mi/mi-interp.c (as_mi_interp): Use dynamic_cast.
1077 * cli/cli-interp.c (as_cli_interp): Use dynamic_cast.
1078
1079 2018-05-25 Tom Tromey <tom@tromey.com>
1080
1081 * cli/cli-interp.c (safe_execute_command): Use scoped_restore.
1082 * interps.c (interp_exec): Use scoped_restore.
1083
1084 2018-05-25 Tom Tromey <tom@tromey.com>
1085
1086 * remote.c (remote_target::remote_file_get): Use
1087 gdb::byte_vector.
1088 (remote_target::remote_file_put): Likewise.
1089
1090 2018-05-25 Tom Tromey <tom@tromey.com>
1091
1092 * coff-pe-read.c (struct read_pe_section_data) <section_name>: Now
1093 a std::string.
1094 (get_pe_section_index, add_pe_exported_sym): Update.
1095 (read_pe_exported_syms): Use gdb::def_vector.
1096
1097 2018-05-25 Tom Tromey <tom@tromey.com>
1098
1099 * frame.c (remove_prev_frame): Remove.
1100 (get_prev_frame_if_no_cycle): Use TRY/CATCH.
1101
1102 2018-05-25 Maciej W. Rozycki <macro@mips.com>
1103
1104 * mips-linux-tdep.h (mips_supply_fpregset, mips_fill_fpregset):
1105 Remove prototypes.
1106 * mips-linux-nat.c (supply_fpregset): Always call
1107 `mips64_supply_fpregset' rather than `mips_supply_fpregset'.
1108 (fill_fpregset): Always call `mips64_fill_fpregset' rather than
1109 `mips_fill_fpregset'.
1110 * mips-linux-tdep.c (mips_supply_fpregset)
1111 (mips_supply_fpregset_wrapper, mips_fill_fpregset)
1112 (mips_fill_fpregset_wrapper): Remove functions.
1113 (mips64_supply_fpregset, mips64_fill_fpregset): Update comments.
1114 (mips_linux_fpregset): Remove variable.
1115 (mips_linux_iterate_over_regset_sections): Use
1116 `mips64_linux_fpregset' in place of `mips_linux_fpregset'.
1117 (mips_linux_o32_sigframe_init): Remove comment.
1118
1119 2018-05-25 Pedro Alves <palves@redhat.com>
1120
1121 * remote.c (struct vCont_action_support, MAXTHREADLISTRESULTS)
1122 (struct readahead_cache, struct packet_reg, struct
1123 remote_arch_state, class remote_state): Move higher up in the
1124 file.
1125 (remote_target::m_remote_state): Now an object instead of a pointer.
1126 (remote_target::get_remote_state): Adjust.
1127
1128 2018-05-24 Andrew Burgess <andrew.burgess@embecosm.com>
1129
1130 * stack.c (select_and_print_frame): Delete.
1131 (struct function_bounds): Move struct within function.
1132 (func_command): Most content moved into new function
1133 find_frame_for_function, use new function, print result, add
1134 function comment.
1135 (find_frame_for_function): New function, now returns a result.
1136
1137 2018-05-24 Philippe Waroquiers <philippe.waroquiers@skynet.be>
1138
1139 * stack.c (iterate_over_block_arg_vars): Fix comment.
1140 (print_frame_arg_vars): Pass stream in cb_data, not gdb_stdout.
1141
1142 2018-05-24 Andrew Burgess <andrew.burgess@embecosm.com>
1143
1144 PR gdb/23203
1145 * frame.c
1146 (scoped_restore_selected_frame::scoped_restore_selected_frame):
1147 Define.
1148 (scoped_restore_selected_frame::~scoped_restore_selected_frame):
1149 Define.
1150 * frame.h (class scoped_restore_selected_frame): New class.
1151 * stack.c (print_frame_local_vars): Remove catching and rethrowing
1152 of any exception, use scoped_restore_selected_frame to restore the
1153 frame instead.
1154
1155 2018-05-24 Pedro Alves <palves@redhat.com>
1156
1157 * darwin-nat.h (darwin_nat_target::create_inferior): Mark with
1158 override.
1159
1160 2018-05-23 Tom Tromey <tom@tromey.com>
1161
1162 * complaints.c (struct complaints): Remove.
1163 (symfile_complaint_book): Remove.
1164 (series): New global.
1165 (complaint_internal): Update.
1166 (clear_complaints): Update.
1167
1168 2018-05-23 Tom Tromey <tom@tromey.com>
1169
1170 * complaints.c (counters): New global.
1171 (struct complain): Remove.
1172 (struct complaints) <root>: Remove.
1173 (complaint_sentinel): Remove.
1174 (symfile_complaint_book): Update.
1175 (find_complaint) Remove.
1176 (complaint_internal, clear_complaints): Update.
1177
1178 2018-05-23 Tom Tromey <tom@tromey.com>
1179
1180 * complaints.c (struct complain) <file, line>: Remove.
1181 (find_complaint): Remove file, line parameters.
1182 (complaint_internal): Update.
1183
1184 2018-05-23 Tom Tromey <tom@tromey.com>
1185
1186 * complaints.c (vcomplaint): Remove.
1187 (complaint_internal) Merge in contents of vcomplaint.
1188
1189 2018-05-23 Tom Tromey <tom@tromey.com>
1190
1191 * complaints.c (struct complaints) <explanation>: Remove.
1192 (symfile_explanations): Remove.
1193 (symfile_complaint_book): Update.
1194 (vcomplaint): Update.
1195 (struct explanation): Remove.
1196
1197 2018-05-23 Tom Tromey <tom@tromey.com>
1198
1199 * complaints.c (symfile_complaints): Remove.
1200 (complaint_internal): Remove "complaints" parameter.
1201 (clear_complaints, vcomplaint): Remove "c" parameter.
1202 (get_complaints): Remove.
1203 * dwarf2read.c (dwarf2_statement_list_fits_in_line_number_section_complaint)
1204 (dwarf2_debug_line_missing_file_complaint)
1205 (dwarf2_debug_line_missing_end_sequence_complaint)
1206 (dwarf2_complex_location_expr_complaint)
1207 (dwarf2_const_value_length_mismatch_complaint)
1208 (dwarf2_section_buffer_overflow_complaint)
1209 (dwarf2_macro_malformed_definition_complaint)
1210 (dwarf2_invalid_attrib_class_complaint)
1211 (create_addrmap_from_index, dw2_symtab_iter_next)
1212 (dw2_expand_marked_cus)
1213 (dw2_debug_names_iterator::find_vec_in_debug_names)
1214 (dw2_debug_names_iterator::next, dw2_debug_names_iterator::next)
1215 (create_debug_type_hash_table, init_cutu_and_read_dies)
1216 (partial_die_parent_scope, add_partial_enumeration)
1217 (skip_one_die, fixup_go_packaging, quirk_rust_enum, process_die)
1218 (dwarf2_compute_name, dwarf2_physname, read_namespace_alias)
1219 (read_import_statement, read_file_scope, create_dwo_cu_reader)
1220 (create_cus_hash_table, create_dwp_hash_table)
1221 (inherit_abstract_dies, read_func_scope, read_call_site_scope)
1222 (dwarf2_rnglists_process, dwarf2_ranges_process)
1223 (dwarf2_add_type_defn, dwarf2_attach_fields_to_type)
1224 (dwarf2_add_member_fn, get_alignment, maybe_set_alignment)
1225 (handle_struct_member_die, process_structure_scope)
1226 (read_array_type, read_common_block, read_module_type)
1227 (read_tag_pointer_type, read_typedef, read_base_type)
1228 (read_subrange_type, load_partial_dies, partial_die_info::read)
1229 (partial_die_info::read, partial_die_info::read)
1230 (partial_die_info::read, read_checked_initial_length_and_offset)
1231 (dwarf2_string_attr, read_formatted_entries)
1232 (dwarf_decode_line_header)
1233 (lnp_state_machine::check_line_address, dwarf_decode_lines_1)
1234 (new_symbol, dwarf2_const_value_attr, lookup_die_type)
1235 (read_type_die_1, determine_prefix, dwarf2_get_ref_die_offset)
1236 (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
1237 (get_signatured_type, get_DW_AT_signature_type)
1238 (decode_locdesc, file_file_name, consume_improper_spaces)
1239 (skip_form_bytes, skip_unknown_opcode, dwarf_parse_macro_header)
1240 (dwarf_decode_macro_bytes, dwarf_decode_macros)
1241 (dwarf2_symbol_mark_computed, set_die_type)
1242 (read_attribute_value): Update.
1243 * stap-probe.c (handle_stap_probe, get_stap_base_address):
1244 Update.
1245 * dbxread.c (unknown_symtype_complaint)
1246 (lbrac_mismatch_complaint, repeated_header_complaint)
1247 (set_namestring, function_outside_compilation_unit_complaint)
1248 (read_dbx_symtab, process_one_symbol): Update.
1249 * gdbtypes.c (stub_noname_complaint): Update.
1250 * windows-nat.c (handle_unload_dll): Update.
1251 * coffread.c (coff_symtab_read, enter_linenos, decode_type)
1252 (decode_base_type): Update.
1253 * xcoffread.c (bf_notfound_complaint, ef_complaint)
1254 (eb_complaint, record_include_begin, record_include_end)
1255 (enter_line_range, xcoff_next_symbol_text, read_xcoff_symtab)
1256 (process_xcoff_symbol, read_symbol)
1257 (function_outside_compilation_unit_complaint)
1258 (scan_xcoff_symtab): Update.
1259 * machoread.c (macho_symtab_read, macho_add_oso_symfile): Update.
1260 * buildsym.c (finish_block_internal, make_blockvector)
1261 (end_symtab_get_static_block, augment_type_symtab): Update.
1262 * dtrace-probe.c (dtrace_process_dof)
1263 (dtrace_static_probe_ops::get_probes): Update.
1264 * complaints.h (struct complaint): Don't declare.
1265 (symfile_complaints): Remove.
1266 (complaint_internal): Remove "complaints" parameter.
1267 (complaint): Likewise.
1268 (clear_complaints): Likewise.
1269 * symfile.c (syms_from_objfile_1, finish_new_objfile)
1270 (reread_symbols): Update.
1271 * dwarf2-frame.c (dwarf2_restore_rule, execute_cfa_program)
1272 (dwarf2_frame_cache, decode_frame_entry): Update.
1273 * dwarf2loc.c (dwarf_reg_to_regnum): Update.
1274 * objc-lang.c (lookup_objc_class, lookup_child_selector)
1275 (info_selectors_command): Update.
1276 * macrotab.c (macro_include, check_for_redefinition)
1277 (macro_undef): Update.
1278 * objfiles.c (filter_overlapping_sections): Update.
1279 * stabsread.c (invalid_cpp_abbrev_complaint)
1280 (reg_value_complaint, stabs_general_complaint, dbx_lookup_type)
1281 (define_symbol, error_type, read_type, rs6000_builtin_type)
1282 (stabs_method_name_from_physname, read_member_functions)
1283 (read_cpp_abbrev, read_baseclasses, read_tilde_fields)
1284 (attach_fields_to_type, complain_about_struct_wipeout)
1285 (read_range_type, read_args, common_block_start)
1286 (common_block_end, cleanup_undefined_types_1, scan_file_globals):
1287 Update.
1288 * mdebugread.c (index_complaint, unknown_ext_complaint)
1289 (basic_type_complaint, bad_tag_guess_complaint)
1290 (bad_rfd_entry_complaint, unexpected_type_code_complaint)
1291 (reg_value_complaint, parse_symbol, parse_type, upgrade_type)
1292 (parse_procedure, parse_lines)
1293 (function_outside_compilation_unit_complaint)
1294 (parse_partial_symbols, psymtab_to_symtab_1, cross_ref)
1295 (bad_tag_guess_complaint, reg_value_complaint): Update.
1296 * cp-support.c (demangled_name_complaint): Update.
1297 * macroscope.c (sal_macro_scope): Update.
1298 * dwarf-index-write.c (class debug_names): Update.
1299
1300 2018-05-23 Tom Tromey <tom@tromey.com>
1301
1302 * complaints.c (clear_complaints): Remove "noisy" parameter.
1303 * complaints.h (clear_complaints): Update.
1304 * symfile.c (syms_from_objfile_1, finish_new_objfile)
1305 (reread_symbols): Update.
1306
1307 2018-05-23 Tom Tromey <tom@tromey.com>
1308
1309 * complaints.c (enum complaint_series): Remove FIRST_MESSAGE,
1310 SUBSEQUENT_MESSAGE.
1311 (vcomplaint, clear_complaints): Update.
1312 (symfile_explanations): Remove some messages.
1313
1314 2018-05-23 Tom Tromey <tom@tromey.com>
1315
1316 * complaints.c (internal_complaint): Remove.
1317 * complaints.h (internal_complaint): Remove.
1318
1319 2018-05-22 Maciej W. Rozycki <macro@mips.com>
1320
1321 * i387-tdep.c (i387_collect_xsave): Make `i' unsigned.
1322
1323 2018-05-22 Pedro Alves <palves@redhat.com>
1324
1325 * remote-fileio.c (remote_fileio_reply, remote_fileio_ioerror)
1326 (remote_fileio_badfd, remote_fileio_return_errno)
1327 (remote_fileio_return_success, remote_fileio_func_open)
1328 (remote_fileio_func_open, remote_fileio_func_close)
1329 (remote_fileio_func_read, remote_fileio_func_write)
1330 (remote_fileio_func_lseek, remote_fileio_func_rename)
1331 (remote_fileio_func_unlink, remote_fileio_func_stat)
1332 (remote_fileio_func_fstat, remote_fileio_func_gettimeofday)
1333 (remote_fileio_func_isatty, remote_fileio_func_system): Add
1334 remote_target parameter.
1335 (remote_fio_func_map) <func>: Add remote_target parameter.
1336 (do_remote_fileio_request, remote_fileio_request):
1337 * remote-fileio.h (remote_fileio_request):
1338 * remote-notif.c (remote_notif_ack, remote_notif_parse, ): Add
1339 remote_target parameter.
1340 (remote_notif_process, handle_notification): Adjust to pass down
1341 the remote.
1342 (remote_notif_state_allocate): Add remote_target parameter. Save
1343 it.
1344 * remote-notif.h (struct remote_target): Forward declare.
1345 (struct notif_client) <parse, ack, can_get_pending_events>: Add
1346 remote_target parameter.
1347 (struct remote_notif_state) <remote>: New field.
1348 (remote_notif_ack, remote_notif_parse): Add remote_target
1349 parameter.
1350 (remote_notif_state_allocate, remote_notif_state_allocate): Add
1351 remote_target parameter.
1352 * remote.c (OPAQUETHREADBYTES, threadref, gdb_ext_thread_info)
1353 (threads_listing_context, rmt_thread_action, protocol_feature)
1354 (packet_reg, stop_reply, stop_reply_p, enum packet_support)
1355 (packet_result, struct threads_listing_context, remote_state):
1356 Move definitions and declarations higher up.
1357 (remote_target) <~remote_target>: Declare.
1358 (remote_download_command_source, remote_file_put, remote_file_get)
1359 (remote_file_delete, remote_hostio_pread, remote_hostio_pwrite)
1360 (remote_hostio_pread_vFile, remote_hostio_send_command)
1361 (remote_hostio_set_filesystem, remote_hostio_open)
1362 (remote_hostio_close, remote_hostio_unlink, remote_state)
1363 (get_remote_state, get_remote_packet_size, get_memory_packet_size)
1364 (get_memory_write_packet_size, get_memory_read_packet_size)
1365 (append_pending_thread_resumptions, remote_detach_1)
1366 (append_resumption, remote_resume_with_vcont)
1367 (add_current_inferior_and_thread, wait_ns, wait_as)
1368 (process_stop_reply, remote_notice_new_inferior)
1369 (process_initial_stop_replies, remote_add_thread)
1370 (btrace_sync_conf, remote_btrace_maybe_reopen)
1371 (remove_new_fork_children, kill_new_fork_children)
1372 (discard_pending_stop_replies, stop_reply_queue_length)
1373 (check_pending_events_prevent_wildcard_vcont)
1374 (discard_pending_stop_replies_in_queue, stop_reply)
1375 (remote_notif_remove_queued_reply, stop_reply *queued_stop_reply)
1376 (peek_stop_reply, remote_parse_stop_reply, remote_stop_ns)
1377 (remote_interrupt_as, remote_interrupt_ns)
1378 (remote_get_noisy_reply, remote_query_attached)
1379 (remote_add_inferior, remote_current_thread, get_current_thread)
1380 (set_thread, set_general_thread, set_continue_thread)
1381 (set_general_process, write_ptid)
1382 (remote_unpack_thread_info_response, remote_get_threadinfo)
1383 (parse_threadlist_response, remote_get_threadlist)
1384 (remote_threadlist_iterator, remote_get_threads_with_ql)
1385 (remote_get_threads_with_qxfer)
1386 (remote_get_threads_with_qthreadinfo, extended_remote_restart)
1387 (get_offsets, remote_check_symbols, remote_supported_packet)
1388 (remote_query_supported, remote_packet_size)
1389 (remote_serial_quit_handler, remote_detach_pid)
1390 (remote_vcont_probe, remote_resume_with_hc)
1391 (send_interrupt_sequence, interrupt_query)
1392 (remote_notif_get_pending_events, fetch_register_using_p)
1393 (send_g_packet, process_g_packet, fetch_registers_using_g)
1394 (store_register_using_P, store_registers_using_G)
1395 (set_remote_traceframe, check_binary_download)
1396 (remote_write_bytes_aux, remote_write_bytes, remote_read_bytes_1)
1397 (remote_xfer_live_readonly_partial, remote_read_bytes)
1398 (remote_send_printf, remote_flash_write, readchar)
1399 (remote_serial_write, putpkt, putpkt_binary, skip_frame)
1400 (read_frame, getpkt, getpkt_or_notif_sane_1, getpkt_sane)
1401 (getpkt_or_notif_sane, remote_vkill, remote_kill_k)
1402 (extended_remote_disable_randomization, extended_remote_run)
1403 (send_environment_packet, extended_remote_environment_support)
1404 (extended_remote_set_inferior_cwd, remote_write_qxfer)
1405 (remote_read_qxfer, push_stop_reply, vcont_r_supported)
1406 (packet_command): Now methods of ...
1407 (remote_target): ... this class.
1408 (m_remote_state) <remote_target>: New field.
1409 (struct remote_state) <stop_reply_queue,
1410 remote_async_inferior_event_token, wait_forever_enabled_p>: New
1411 fields.
1412 (remote_state::remote_state): Allocate stop_reply_queue.
1413 (remote_state): Delete global.
1414 (get_remote_state_raw): Delete.
1415 (remote_target::get_remote_state): Allocate m_remote_state on
1416 demand.
1417 (get_current_remote_target): New.
1418 (remote_ops, extended_remote_ops): Delete.
1419 (wait_forever_enabled_p, remote_async_inferior_event_token):
1420 Delete, moved to struct remote_state.
1421 (remote_target::close): Delete self. Destruction bits split to
1422 ...
1423 (remote_target::~remote_target): ... this.
1424 (show_memory_packet_size): Adjust to use
1425 get_current_remote_target.
1426 (struct protocol_feature) <func>: Add remote_target parameter.
1427 All callers adjusted.
1428 (curr_quit_handler_target): New.
1429 (remote_serial_quit_handler): Reimplement.
1430 (remote_target::open_1): Adjust to use get_current_remote_target.
1431 Heap-allocate remote_target/extended_remote_target instances.
1432 (vcont_builder::vcont_builder): Add remote_target parameter, and
1433 save it in m_remote. All callers adjusted.
1434 (vcont_builder::m_remote): New field.
1435 (vcont_builder::restart, vcont_builder::flush)
1436 (vcont_builder::push_action): Use it.
1437 (remote_target::commit_resume): Use it.
1438 (struct queue_iter_param) <remote>: New field.
1439 (remote_target::remove_new_fork_children): Fill in 'remote' field.
1440 (check_pending_event_prevents_wildcard_vcont_callback_data): New.
1441 (check_pending_event_prevents_wildcard_vcont_callback)
1442 (remote_target::check_pending_events_prevent_wildcard_vcont)
1443 (remote_target::discard_pending_stop_replies)
1444 (remote_target::discard_pending_stop_replies_in_queue)
1445 (remote_target::remote_notif_remove_queued_reply): Fill in
1446 'remote' field.
1447 (remote_notif_get_pending_events): New.
1448 (remote_target::readchar, remote_target::remote_serial_write):
1449 Save/restore curr_quit_handler_target.
1450 (putpkt): New.
1451 (kill_new_fork_children): Fill in 'remote' field.
1452 (packet_command): Use get_current_remote_target, defer to
1453 remote_target method of same name.
1454 (scoped_remote_fd::scoped_remote_fd): Add 'remote_target'
1455 parameter, and save it in m_remote. All callers adjusted.
1456 (scoped_remote_fd::release): Use m_remote.
1457 (scoped_remote_fd::m_remote): New field.
1458 (remote_file_put, remote_file_get, remote_file_delete): Use
1459 get_current_remote_target, defer to remote_target method of same
1460 name.
1461 (remote_btrace_reset): Add remote_state paremeter. Update all
1462 callers.
1463 (remote_async_inferior_event_handler). Pass down 'data'.
1464 (remote_new_objfile): Use get_current_remote_target.
1465 (remote_target::vcont_r_supported): New.
1466 (set_range_stepping): Use get_current_remote_target and
1467 remote_target::vcont_r_supported.
1468 (_initialize_remote): Don't allocate 'remote_state' and
1469 'stop_reply_queue' globals.
1470 * remote.h (struct remote_target): Forward declare.
1471 (getpkt, putpkt, remote_notif_get_pending_events): Add
1472 'remote_target' parameter.
1473
1474 2018-05-22 Pedro Alves <palves@redhat.com>
1475
1476 * remote.c (vcont_builder): Now a class. Make all data members
1477 private.
1478 (vcont_builder) <vcont_builder, restart, flush, push_action>:
1479 Declare methods.
1480 (vcont_builder_restart): Rename to ...
1481 (vcont_builder::restart): ... this.
1482 (vcont_builder_flush): Rename to ...
1483 (vcont_builder::flush): ... this.
1484 (vcont_builder_push_action): Rename to ...
1485 (vcont_builder::push_action): ... this.
1486 (remote_target::commit_resume): Adjust.
1487
1488 2018-05-22 Pedro Alves <palves@redhat.com>
1489
1490 * remote.c (DEFAULT_MAX_MEMORY_PACKET_SIZE): Rename to ...
1491 (DEFAULT_MAX_MEMORY_PACKET_SIZE_FIXED): ... this.
1492 (get_fixed_memory_packet_size): New.
1493 (get_memory_packet_size): Use it.
1494 (set_memory_packet_size): Don't override the config size with
1495 DEFAULT_MAX_MEMORY_PACKET_SIZE.
1496 (show_memory_packet_size): Use get_fixed_memory_packet_size.
1497 Don't refer to get_memory_packet_size if not connected to a remote
1498 target. Show "(default)" if configured size is 0.
1499
1500 2018-05-22 Pedro Alves <palves@redhat.com>
1501
1502 * remote.c (remote_target::mourn_inferior): Move
1503 discard_pending_stop_replies call here from ...
1504 (_initialize_remote): ... here.
1505
1506 2018-05-22 Pedro Alves <palves@redhat.com>
1507
1508 * remote.c (compare_section_command): Remove set_general_process
1509 call.
1510
1511 2018-05-22 Pedro Alves <palves@redhat.com>
1512
1513 * remote.c (struct packet_reg, struct remote_arch_state):
1514 Move higher up in the file.
1515 (remote_state) <m_arch_states>: Store remote_arch_state values
1516 instead of remote_arch_state pointers.
1517 (remote_state::get_remote_arch_state): Adjust.
1518
1519 2018-05-22 Pedro Alves <palves@redhat.com>
1520
1521 * remote.c: Include <unordered_map>.
1522 (remote_state): Now a class.
1523 (remote_state) <get_remote_arch_state>: Declare method.
1524 <get_remote_arch_state>: New field.
1525 (remote_arch_state) <remote_arch_state>: Declare ctor.
1526 <regs>: Now a unique_ptr.
1527 (remote_gdbarch_data_handle): Delete.
1528 (get_remote_arch_state): Delete.
1529 (remote_state::get_remote_arch_state): New.
1530 (get_remote_state): Adjust to call remote_state's
1531 get_remote_arch_state method.
1532 (init_remote_state): Delete, bits factored out to ...
1533 (remote_arch_state::remote_arch_state): ... this new method.
1534 (get_remote_packet_size, get_memory_packet_size)
1535 (process_g_packet, remote_target::fetch_registers)
1536 (remote_target::prepare_to_store, store_registers_using_G)
1537 (remote_target::store_registers, remote_target::get_trace_status):
1538 Adjust to call remote_state's method.
1539 (_initialize_remote): Remove reference to
1540 remote_gdbarch_data_handle.
1541
1542 2018-05-22 Pedro Alves <palves@redhat.com>
1543
1544 * remote.c (struct readahead_cache) <invalidate, invalidate_fd,
1545 pread>: New method declarations.
1546 (remote_target::open_1): Adjust.
1547 (readahead_cache_invalidate): Rename to ...
1548 (readahead_cache::invalidate): ... this, and adjust to be a class
1549 method.
1550 (readahead_cache_invalidate_fd): Rename to ...
1551 (readahead_cache::invalidate_fd): ... this, and adjust to be a
1552 class method.
1553 (remote_hostio_pwrite): Adjust.
1554 (remote_hostio_pread_from_cache): Rename to ...
1555 (readahead_cache::pread): ... this, and adjust to be a class
1556 method.
1557 (remote_hostio_close): Adjust.
1558
1559 2018-05-22 Pedro Alves <palves@redhat.com>
1560
1561 * remote.c (remote_hostio_close_cleanup): Delete.
1562 (class scoped_remote_fd): New.
1563 (remote_file_put, remote_file_get): Use it.
1564
1565 2018-05-22 Pedro Alves <palves@redhat.com>
1566
1567 (struct vCont_action_support): Use bool and initialize all fields.
1568 (struct readahead_cache): Initialize all fields.
1569 (remote_state): Use bool and initialize all fields.
1570 (remote_state::remote_state, remote_state::~remote_state): New.
1571 (new_remote_state): Delete.
1572 (_initialize_remote): Use new to allocate remote_state.
1573
1574 2018-05-22 Pedro Alves <palves@redhat.com>
1575 張俊芝 <zjz@zjz.name>
1576
1577 PR gdb/22973
1578 * c-exp.y: Include "c-support.h".
1579 (parse_number, c_parse_escape, lex_one_token): Use TOLOWER instead
1580 of tolower. Use c_ident_is_alpha to scan names.
1581 * c-lang.c: Include "c-support.h".
1582 (convert_ucn, convert_octal, convert_hex, convert_escape): Use
1583 ISXDIGIT instead of isxdigit and ISDIGIT instead of isdigit.
1584 * c-support.h: New file, with bits factored out from ...
1585 * cp-name-parser.y: ... this file.
1586 Include "c-support.h".
1587 (cp_ident_is_alpha, cp_ident_is_alnum): Deleted, moved to
1588 c-support.h and renamed.
1589 (symbol_end, yylex): Adjust.
1590
1591 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
1592
1593 * arch/ppc-linux-common.c (ppc_linux_has_isa205): Change the
1594 parameter type to CORE_ADDR.
1595 * arch/ppc-linux-common.h (ppc_linux_has_isa205): Change the
1596 parameter type in declaration to CORE_ADDR.
1597 * ppc-linux-tdep.c (ppc_linux_core_read_description): Call
1598 target_auxv_search to get AT_HWCAP and use the result to get the
1599 target description.
1600 * ppc-linux-nat.c (ppc_linux_get_hwcap): Change the return type
1601 to CORE_ADDR. Remove the cast of the return value to unsigned
1602 long. Fix error predicate of target_auxv_search.
1603 (ppc_linux_nat_target::read_description): Change the type of the
1604 hwcap variable to CORE_ADDR.
1605
1606 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
1607
1608 * rs6000-tdep.c (rs6000_gdbarch_init): Assign 1 to have_dfp only
1609 if the size of fpscr is larger than 32 bits.
1610
1611 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
1612
1613 * ppc-linux-tdep.c (ppc_linux_vsxregset): New function.
1614 (ppc32_linux_vsxregmap): New global.
1615 (ppc32_linux_vsxregset): Initialize with ppc32_linux_vsxregmap,
1616 regcache_supply_regset, and regcache_collect_regset.
1617 * ppc-linux-tdep.h (ppc_linux_vsxregset): Declare.
1618 * ppc-linux-nat.c (supply_vsxregset, fill_vsxregset): Remove.
1619 (fetch_vsx_register, store_vsx_register): Remove.
1620 (fetch_vsx_registers): Add regno parameter. Get regset using
1621 ppc_linux_vsxregset. Use regset to supply registers.
1622 (store_vsx_registers): Add regno parameter. Get regset using
1623 ppc_linux_vsxregset. Use regset to collect registers.
1624 (fetch_register): Call fetch_vsx_registers instead of
1625 fetch_vsx_register.
1626 (store_register): Call store_vsx_registers instead of
1627 store_vsx_register.
1628 (fetch_ppc_registers): Call fetch_vsx_registers with -1 for the
1629 new regno parameter.
1630 (store_ppc_registers): Call store_vsx_registers with -1 for the
1631 new regno parameter.
1632 * rs6000-tdep.c (ppc_vsx_support_p, ppc_supply_vsxreget)
1633 (ppc_collect_vsxregset): Remove.
1634
1635 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
1636
1637 * ppc-tdep.h (struct ppc_reg_offsets): Remove vector register
1638 offset fields.
1639 * ppc-fbsd-tdep.c (ppc32_fbsd_reg_offsets): Remove initializers
1640 for vector register offset fields.
1641 (ppc64_fbsd_reg_offsets): Likewise.
1642 * ppc-nbsd-tdep.c (_initialize_ppcnbsd_tdep): Remove assignment
1643 to vector register offset fields.
1644 * ppc-obsd-tdep.c (_initialize_ppcnbsd_tdep): Remove assignment
1645 to vector register offset fields.
1646 * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Remove assignment to
1647 vector register offset fields.
1648 * rs6000-aix-tdep.c (rs6000_aix32_reg_offsets): Remove
1649 initializers for vector register offset fields.
1650 (rs6000_aix64_reg_offsets): Likewise.
1651 * rs6000-tdep.c (ppc_vrreg_offset): Remove.
1652 (ppc_supply_vrregset): Remove.
1653 (ppc_collect_vrregset): Remove.
1654 * ppc-linux-tdep.c (ppc_linux_collect_vrregset): New function.
1655 (ppc_linux_vrregset) : New function.
1656 (ppc32_le_linux_vrregmap, ppc32_be_linux_vrregmap)
1657 (ppc32_le_linux_vrregset, ppc32_be_linux_vrregset): New globals.
1658 (ppc32_linux_vrregset): Remove.
1659 (ppc_linux_iterate_over_regset_sections): Call ppc_linux_vrregset
1660 and use result instead of ppc32_linux_vrregset.
1661 (ppc32_linux_reg_offsets): Remove initializers for vector register
1662 offset fields.
1663 (ppc64_linux_reg_offsets): Likewise.
1664 * ppc-linux-tdep.h (ppc_linux_vrregset): New declaration.
1665 * ppc-linux-nat.c: Include regset.h.
1666 (gdb_vrregset_t): Adjust comment to account for little-endian
1667 mode.
1668 (supply_vrregset, fill_vrregset): Remove.
1669 (fetch_altivec_register, store_altivec_register): Remove.
1670 (fetch_altivec_registers): Add regno parameter. Get regset using
1671 ppc_linux_vrregset. Use regset to supply registers.
1672 (store_altivec_registers): Add regno parameter. Get regset using
1673 ppc_linux_vrregset. Use regset to collect registers.
1674 (fetch_register): Call fetch_altivec_registers instead of
1675 fetch_altivec_register.
1676 (store_register): Call store_altivec_registers instead of
1677 store_altivec_register.
1678 (fetch_ppc_registers): Call fetch_altivec_registers with -1 for
1679 the new regno parameter.
1680 (store_ppc_registers): Call store_altivec_registers with -1 for
1681 the new regno parameter.
1682
1683 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
1684
1685 * arch/ppc-linux-common.h (PPC_LINUX_SIZEOF_VRREGSET)
1686 (PPC_LINUX_SIZEOF_VSXREGSET): Define.
1687 * ppc-linux-nat.c (SIZEOF_VSXREGS, SIZEOF_VRREGS): Remove.
1688 (gdb_vrregset_t): Change array type size to
1689 PPC_LINUX_SIZEOF_VRREGSET.
1690 (gdb_vsxregset_t): Change array type size to
1691 PPC_LINUX_SIZEOF_VSXREGSET.
1692 * ppc-linux-tdep.c (ppc_linux_iterate_over_regset_sections):
1693 Change integer literals to PPC_LINUX_SIZEOF_VRREGSET and
1694 PPC_LINUX_SIZEOF_VSXREGSET.
1695
1696 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
1697
1698 * configure.nat <linux powerpc>: Add ppc-linux.o to NATDEPFILES.
1699 * ppc-linux-nat.c (ppc_linux_target_wordsize): Move to
1700 nat/ppc-linux.c.
1701 (ppc_linux_nat_target::auxv_parse): Get thread id tid. Call
1702 ppc_linux_target_wordsize with tid.
1703 (ppc_linux_nat_target::read_description): Call ppc_linux_target
1704 wordsize with tid.
1705 * nat/ppc-linux.c: Include nat/gdb_ptrace.h.
1706 (ppc64_64bit_inferior_p): Add static and inline specifiers.
1707 (ppc_linux_target_wordsize): Move here from ppc-linux-nat.c. Add
1708 tid parameter. Remove static specifier.
1709 * nat/ppc-linux.h (ppc64_64bit_inferior_p): Remove declaration.
1710 (ppc_linux_target_wordsize): New declaration.
1711
1712 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
1713
1714 * arch/ppc-linux-common.c: New file.
1715 * arch/ppc-linux-common.h: New file.
1716 * arch/ppc-linux-tdesc.h: New file.
1717 * configure.tgt (powerpc*-*-linux*): Add arch/ppc-linux-common.o.
1718 * Makefile.in (ALL_TARGET_OBS): Add arch/ppc-linux-common.o.
1719 (HFILES_NO_SRCDIR): Add arch/ppc-linux-common.h and
1720 arch/ppc-linux-tdesc.h.
1721 * ppc-linux-nat.c: Include arch/ppc-linux-common.h and
1722 arch/ppc-linux-tdesc.h.
1723 (ppc_linux_nat_target::read_description): Remove target
1724 description matching code. Fill a ppc_linux_features struct and
1725 call ppc_linux_match_description with it. Move comment about ISA
1726 2.05 to ppc-linux-common.c.
1727 * ppc-linux-tdep.c: Include arch/ppc-linux-common.h and
1728 arch/ppc-linux-tdesc.h.
1729 (ppc_linux_core_read_description): Remove target description
1730 matching code. Fill a ppc_linux_features struct and call
1731 ppc_linux_match_description with it.
1732 * ppc-linux-tdep.h (tdesc_powerpc_32l, tdesc_powerpc_64l)
1733 (tdesc_powerpc_altivec32l, tdesc_powerpc_altivec64l)
1734 (tdesc_powerpc_cell32l, tdesc_powerpc_cell64l)
1735 (tdesc_powerpc_vsx32l, tdesc_powerpc_vsx64l)
1736 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_64l)
1737 (tdesc_powerpc_isa205_altivec32l, tdesc_powerpc_isa205_altivec64l)
1738 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_isa205_vsx64l)
1739 (tdesc_powerpc_e500l): Remove.
1740
1741 2018-05-22 Joel Brobecker <brobecker@adacore.com>
1742
1743 * ada-lang.c (catch_assert_command): Pass empty string instead
1744 of NULL for excep_string argument.
1745
1746 2018-05-22 Maciej W. Rozycki <macro@mips.com>
1747
1748 * mips-linux-nat.c (mips64_linux_register_addr): Return -1 if
1749 the width of the requested register exceeds the width of the
1750 `ptrace' data type.
1751
1752 2018-05-21 Tom Tromey <tom@tromey.com>
1753
1754 * printcmd.c (output_command): Remove.
1755 (output_command_const): Rename to output_command.
1756 * valprint.h (output_command): Rename from output_command_const.
1757 * tracepoint.c (trace_dump_actions): Call output_command.
1758
1759 2018-05-21 Tom Tromey <tom@tromey.com>
1760
1761 * mi/mi-cmd-catch.c (mi_cmd_catch_assert)
1762 (mi_cmd_catch_exception, mi_cmd_catch_handlers): Update.
1763 * ada-lang.h (create_ada_exception_catchpoint): Update.
1764 * ada-lang.c (struct ada_catchpoint) <excep_string>: Now a
1765 std::string.
1766 (create_excep_cond_exprs, ~ada_catchpoint)
1767 (should_stop_exception, print_one_exception)
1768 (print_mention_exception, print_recreate_exception): Update.
1769 (ada_get_next_arg): Remove.
1770 (catch_ada_exception_command_split): Use std::string. Change type
1771 of "excep_string", "cond_string".
1772 (catch_ada_exception_command): Update.
1773 (create_ada_exception_catchpoint): Change type of excep_string.
1774 (ada_exception_sal): Remove excep_string parameter.
1775 (~ada_catchpoint): Remove.
1776
1777 2018-05-21 Tom Tromey <tom@tromey.com>
1778
1779 * ada-lang.c (ada_collect_symbol_completion_matches): Remove
1780 cleanup.
1781
1782 2018-05-21 Tom Tromey <tom@tromey.com>
1783
1784 * ada-lang.c (ada_exception_message_1, ada_exception_message):
1785 Return unique_xmalloc_ptr.
1786 (print_it_exception): Update.
1787
1788 2018-05-21 Tom Tromey <tom@tromey.com>
1789
1790 * tracepoint.c (trace_dump_actions): Use std::string.
1791
1792 2018-05-21 Tom Tromey <tom@tromey.com>
1793
1794 * symfile.c (reread_symbols): Use std::string for original_name.
1795
1796 2018-05-21 Tom Tromey <tom@tromey.com>
1797
1798 * dwarf2read.c (dwarf2_read_debug_names): Use std::unique_ptr.
1799 (mapped_index_base): Use DISABLE_COPY_AND_ASSIGN. Default
1800 constructor.
1801
1802 2018-05-20 Simon Marchi <simon.marchi@polymtl.ca>
1803
1804 * common/traits.h (HAVE_IS_TRIVIALLY_COPYABLE): Rename the wrong
1805 instance to...
1806 (HAVE_IS_TRIVIALLY_CONSTRUCTIBLE): ... this.
1807 * objfiles.c (get_objfile_bfd_data): Allocate
1808 objfile_per_bfd_storage with obstack_new when allocating on
1809 obstack.
1810
1811 2018-05-20 Simon Marchi <simon.marchi@ericsson.com>
1812
1813 * ada-lang.c (cache_symbol): Use XOBNEW and/or XOBNEWVEC and/or
1814 OBSTACK_ZALLOC.
1815 * dwarf2-frame.c (dwarf2_build_frame_info): Likewise.
1816 * hppa-tdep.c (hppa_init_objfile_priv_data): Likewise.
1817 * mdebugread.c (mdebug_build_psymtabs): Likewise.
1818 (add_pending): Likewise.
1819 (parse_symbol): Likewise.
1820 (parse_partial_symbols): Likewise.
1821 (psymtab_to_symtab_1): Likewise.
1822 (new_psymtab): Likewise.
1823 (elfmdebug_build_psymtabs): Likewise.
1824 * minsyms.c (terminate_minimal_symbol_table): Likewise.
1825 * objfiles.c (get_objfile_bfd_data): Likewise.
1826 (objfile_register_static_link): Likewise.
1827 * psymtab.c (allocate_psymtab): Likewise.
1828 * stabsread.c (read_member_functions): Likewise.
1829 * xcoffread.c (xcoff_end_psymtab): Likewise.
1830
1831 2018-05-20 Simon Marchi <simon.marchi@ericsson.com>
1832
1833 * common/traits.h (HAVE_IS_TRIVIALLY_COPYABLE): Define if
1834 compiler supports std::is_trivially_constructible.
1835 * common/poison.h: Include obstack.h.
1836 (IsMallocable): Define to is_trivially_constructible if the
1837 compiler supports it, define to true_type otherwise.
1838 (xobnew): New.
1839 (XOBNEW): Redefine.
1840 (xobnewvec): New.
1841 (XOBNEWVEC): Redefine.
1842 * gdb_obstack.h (obstack_zalloc): New.
1843 (OBSTACK_ZALLOC): Redefine.
1844 (obstack_calloc): New.
1845 (OBSTACK_CALLOC): Redefine.
1846 (obstack_new): New.
1847 * gdbarch.sh: Include gdb_obstack in gdbarch.h.
1848 (gdbarch_obstack): New declaration in gdbarch.h, definition in
1849 gdbarch.c.
1850 (GDBARCH_OBSTACK_CALLOC, GDBARCH_OBSTACK_ZALLOC): Use
1851 obstack_calloc/obstack_zalloc.
1852 (gdbarch_obstack_zalloc): Remove.
1853 * target-descriptions.c (tdesc_data_init): Use obstack_new.
1854
1855 2018-05-19 Philippe Waroquiers <philippe.waroquiers@skynet.be>
1856
1857 * stack.c (backtrace_command_1): Remove useless variable int i.
1858
1859 2018-05-19 Philippe Waroquiers <philippe.waroquiers@skynet.be>
1860
1861 * stack.c (print_frame_info): Fix comment.
1862
1863 2018-05-18 Tom Tromey <tom@tromey.com>
1864
1865 * dwarf2read.c (struct dwz_file): Add constructor, initializers.
1866 <dwz_bfd>: Now a gdb_bfd_ref_ptr.
1867 (~dwarf2_per_objfile): Update
1868 (dwarf2_get_dwz_file): Use new.
1869 * dwarf2read.h (struct dwarf2_per_objfile) <dwz_file>: Now a
1870 unique_ptr.
1871
1872 2018-05-18 Tom Tromey <tom@tromey.com>
1873
1874 * dwarf2read.h (struct dwarf2_per_objfile) <dwp_file>: Now a
1875 unique_ptr.
1876 * dwarf2read.c (struct dwp_file): Add constructor and
1877 initializers.
1878 (open_and_init_dwp_file): Return a unique_ptr.
1879 (dwarf2_per_objfile, create_dwp_hash_table)
1880 (create_dwo_unit_in_dwp_v1, create_dwo_unit_in_dwp_v2)
1881 (lookup_dwo_unit_in_dwp): Update.
1882 (open_and_init_dwp_file, get_dwp_file): Update.
1883
1884 2018-05-18 Tom Tromey <tom@tromey.com>
1885
1886 * dwarf2read.c (dwarf2_per_objfile): Update.
1887 (struct mapped_index): Add initializers.
1888 (dwarf2_read_index): Use new.
1889 (dw2_symtab_iter_init): Update.
1890 * dwarf2read.h (struct dwarf2_per_objfile) <index_table>: Now a
1891 unique_ptr.
1892
1893 2018-05-18 Simon Marchi <simon.marchi@ericsson.com>
1894
1895 * dwarf2read.c (mapped_index) <total_size>: Remove.
1896
1897 2018-05-18 Simon Marchi <simon.marchi@ericsson.com>
1898
1899 * unittests/format_pieces-selftests.c (test_format_specifier):
1900 Add ARI comments.
1901
1902 2018-05-18 Tom Tromey <tom@tromey.com>
1903
1904 * c-typeprint.c (maybe_print_hole): New function.
1905 (c_print_type_struct_field_offset): Update.
1906 (c_type_print_base_struct_union): Call maybe_print_hole.
1907
1908 2018-05-17 Keith Seitz <keiths@redhat.com>
1909
1910 * breakpoint.c (build_bpstat_chain): New function, moved from
1911 bpstat_stop_status.
1912 (bpstat_stop_status): Add optional parameter, `stop_chain'.
1913 If no stop chain is passed, call build_bpstat_chain to build it.
1914 * breakpoint.h (build_bpstat_chain): Declare.
1915 (bpstat_stop_status): Move documentation here from breakpoint.c.
1916 * infrun.c (handle_signal_stop): Before eliding inlined frames,
1917 build the stop chain and pass it to skip_inline_frames.
1918 Pass this stop chain to bpstat_stop_status.
1919 * inline-frame.c: Include breakpoint.h.
1920 (stopped_by_user_bp_inline_frame): New function.
1921 (skip_inline_frames): Add parameter `stop_chain'.
1922 Move documention to inline-frame.h.
1923 If non-NULL, use stopped_by_user_bp_inline_frame to determine
1924 whether the frame should be elided.
1925 * inline-frame.h (skip_inline_frames): Add parameter `stop_chain'.
1926 Add moved documentation and update for new parameter.
1927
1928 2018-05-17 Simon Marchi <simon.marchi@ericsson.com>
1929
1930 PR cli/14975
1931 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
1932 unittests/format_pieces-selftests.c.
1933 * common/format.h (format_piece) <operator==>: New.
1934 (format_pieces) <operator[]>: Remove.
1935 * common/format.c (format_pieces::format_pieces): Handle \e.
1936 * unittests/format_pieces-selftests.c: New.
1937
1938 2018-05-17 Tom Tromey <tom@tromey.com>
1939
1940 PR symtab/23010:
1941 * dwarf2read.c (load_cu, dw2_do_instantiate_symtab)
1942 (dw2_instantiate_symtab): Add skip_partial parameter.
1943 (dw2_find_last_source_symtab, dw2_map_expand_apply)
1944 (dw2_lookup_symbol, dw2_expand_symtabs_for_function)
1945 (dw2_expand_all_symtabs, dw2_expand_symtabs_with_fullname)
1946 (dw2_expand_symtabs_matching_one)
1947 (dw2_find_pc_sect_compunit_symtab)
1948 (dw2_debug_names_lookup_symbol)
1949 (dw2_debug_names_expand_symtabs_for_function): Update.
1950 (init_cutu_and_read_dies): Add skip_partial parameter.
1951 (process_psymtab_comp_unit, build_type_psymtabs_1)
1952 (process_skeletonless_type_unit, load_partial_comp_unit)
1953 (psymtab_to_symtab_1): Update.
1954 (load_full_comp_unit): Add skip_partial parameter.
1955 (process_imported_unit_die, dwarf2_read_addr_index)
1956 (follow_die_offset, dwarf2_fetch_die_loc_sect_off)
1957 (dwarf2_fetch_constant_bytes, dwarf2_fetch_die_type_sect_off)
1958 (read_signatured_type): Update.
1959
1960 2018-05-17 Simon Marchi <simon.marchi@ericsson.com>
1961
1962 * value.c (release_value): Remove unused variable.
1963 (record_latest_value): Likewise.
1964 (access_value_history): Likewise.
1965 (preserve_values): Likewise.
1966
1967 2018-05-17 Tom Tromey <tom@tromey.com>
1968
1969 * extension.h (struct ext_lang_type_printers) <py_type_printers>:
1970 Initialize.
1971
1972 2018-05-16 Maciej W. Rozycki <macro@mips.com>
1973
1974 PR gdb/22286
1975 * linux-nat-trad.c (linux_nat_trad_target::fetch_register):
1976 Also handle registers whose width is not a multiple of
1977 PTRACE_TYPE_RET.
1978 (linux_nat_trad_target::store_register): Likewise.
1979
1980 2018-05-16 Tom Tromey <tom@tromey.com>
1981
1982 * gdbcore.h (core_bfd): Redefine.
1983 * corelow.c (core_target::close): Update.
1984 (core_target_open): Update.
1985 * progspace.h (struct program_space) <cbfd>: Now a
1986 gdb_bfd_ref_ptr.
1987
1988 2018-05-16 Tom Tromey <tom@tromey.com>
1989
1990 PR cli/19551:
1991 * symfile-add-flags.h (enum symfile_add_flags)
1992 <SYMFILE_NOT_FILENAME>: New constant.
1993 * symfile.c (read_symbols): Use SYMFILE_NOT_FILENAME. Get
1994 objfile name from BFD.
1995 (symbol_file_add_with_addrs): Check SYMFILE_NOT_FILENAME.
1996 * minidebug.c (find_separate_debug_file_in_section): Put
1997 ".gnu_debugdata" into BFD's file name.
1998
1999 2018-05-16 Simon Marchi <simon.marchi@ericsson.com>
2000
2001 * regcache.c (regcache_read_ftype, regcache_write_ftype):
2002 Remove.
2003
2004 2018-05-15 Tamar Christina <tamar.christina@arm.com>
2005
2006 PR binutils/21446
2007 * aarch64-tdep.c (aarch64_analyze_prologue,
2008 aarch64_software_single_step, aarch64_displaced_step_copy_insn):
2009 Indicate not interested in errors.
2010
2011 2018-05-15 Maciej W. Rozycki <macro@mips.com>
2012
2013 * mips-linux-nat.c (mips_linux_nat_target::fetch_registers):
2014 Supply the MIPS_ZERO_REGNUM register.
2015
2016 2018-05-15 Maciej W. Rozycki <macro@mips.com>
2017
2018 * mips-tdep.c (mask_address_var): Make variable static.
2019
2020 2018-05-14 Tom Tromey <tom@tromey.com>
2021
2022 * dwarf2read.c (rust_union_quirks): Clear rust_unions.
2023
2024 2018-05-11 Andrew Burgess <andrew.burgess@embecosm.com>
2025
2026 * i387-tdep.c (i387_collect_xsave): Use FXSAVE_MXCSR_ADDR not
2027 FXSAVE_ADDR for the mxcsr register.
2028
2029 2018-05-11 Max Filippov <jcmvbkbc@gmail.com>
2030
2031 * configure.tgt (xtensa*-*-linux*): Drop gdb_target definition.
2032
2033 2018-05-11 Pedro Alves <palves@redhat.com>
2034
2035 * corelow.c (core_target) <core_target>: No longer inline.
2036 Initialize m_core_gdbarch, m_core_vec and build the section table
2037 here.
2038 <~core_target>: New.
2039 <core_gdbarch, get_core_register_section>: New methods.
2040 <m_core_section_table, m_core_vec, m_core_gdbarch>: New fields,
2041 factored out from ...
2042 <core_data, core_vec, core_gdbarch>: ... these deleted globals.
2043 (core_ops): Delete.
2044 (sniff_core_bfd): Add gdbarch parameter.
2045 (core_close): Delete, merged into ...
2046 (core_target::close): ... here. Delete self.
2047 (core_close_cleanup): Delete.
2048 (core_target_open): Allocate a core_target on the heap. Use a
2049 unique_ptr instead of a cleanup. Bits moved into the core_target
2050 ctor. Adjust to use core_target methods instead of globals.
2051 (get_core_register_section): Rename to ...
2052 (core_target::get_core_register_section): ... this and adjust.
2053 (struct get_core_registers_cb_data): New.
2054 (get_core_registers_cb): Use it. Use bool.
2055 (core_target::fetch_registers, core_target::files_info)
2056 (core_target::xfer_partial, core_target::read_description)
2057 (core_target::pid_to, core_target::thread_name): Adjust to
2058 reference class fields instead of globals.
2059 * target.h (struct target_ops_deleter, target_ops_up): New.
2060
2061 2018-05-11 Pedro Alves <palves@redhat.com>
2062
2063 * corefile.c (core_file_command): Move to corelow.c.
2064 * corelow.c (the_core_target): Delete.
2065 (core_file_command): Moved from corefile.c. Check exec_bfd
2066 instead of the_core_target. Use target_detach instead of calling
2067 into the_core_target directly.
2068 (maybe_say_no_core_file_now): New.
2069 (core_target::detach): Use it.
2070 (_initialize_corelow): Remove references to the_core_target.
2071 * gdbcore.h (the_core_target): Delete.
2072
2073 2018-05-11 Tom Tromey <tromey@redhat.com>
2074 Pedro Alves <palves@redhat.com>
2075
2076 * corefile.c (core_bfd): Remove.
2077 * gdbcore.h (core_bfd): Now a macro.
2078 * progspace.h (struct program_space) <cbfd>: New field.
2079
2080 2018-05-11 Tom Tromey <tom@tromey.com>
2081
2082 * mdebugread.c (parse_partial_symbols, psymtab_to_symtab_1): Use
2083 gdb::def_vector.
2084
2085 2018-05-10 Tom Tromey <tom@tromey.com>
2086
2087 * configure: Rebuild.
2088 * warning.m4 (AM_GDB_WARNINGS): Use -Wimplicit-fallthrough=3.
2089
2090 2018-05-10 Joel Brobecker <brobecker@adacore.com>
2091
2092 PR server/23158:
2093 * regformats/regdat.sh: Adjust script, following the addition
2094 of the new expedite_regs parameter to init_target_desc.
2095
2096 2018-05-10 Omair Javaid <omair.javaid@linaro.org>
2097
2098 PR gdb/23127
2099 * aarch64-linux-tdep.c (aarch64_linux_init_abi): Add call to
2100 set_gdbarch_significant_addr_bit.
2101 * aarch64-tdep.c (aarch64_gdbarch_init): Remove call to
2102 set_gdbarch_significant_addr_bit.
2103 * utils.c (address_significant): Update to sign extend addr.
2104
2105 2018-05-09 Max Filippov <jcmvbkbc@gmail.com>
2106
2107 * xtensa-linux-tdep.c (xtensa-tdep.h): New include.
2108 (xtensa_linux_init_abi): Limit tdep->num_regs by
2109 tdep->num_nopriv_regs.
2110 * xtensa-tdep.c (xtensa_derive_tdep): Calculate
2111 tdep->num_nopriv_regs and only copy it to tdep->num_regs if it's
2112 not initialized.
2113
2114 2018-05-08 Simon Marchi <simon.marchi@ericsson.com>
2115
2116 * unittests/string_view-selftests.c: Define GNULIB_NAMESPACE.
2117
2118 2018-05-08 Andrew Burgess <andrew.burgess@embecosm.com>
2119
2120 * common/x86-xstate.h (I387_FCTRL_INIT_VAL): New constant.
2121 (I387_MXCSR_INIT_VAL): New constant.
2122 * amd64-tdep.c (amd64_supply_xsave): Only read state from xsave
2123 buffer if it was supplied by the inferior.
2124 * i387-tdep.c (i387_supply_fsave): Use I387_MXCSR_INIT_VAL.
2125 (i387_xsave_get_clear_bv): New function.
2126 (i387_supply_xsave): Only read x87 control registers from the
2127 xsave buffer if the feature is enabled, and the state will have
2128 been written, otherwise, provide a suitable default.
2129 (i387_collect_xsave): Pre-clear all registers in xsave buffer,
2130 including x87 control registers. Update control registers if they
2131 have changed from the default value, and mark features as enabled
2132 as required.
2133 * i387-tdep.h (i387_xsave_get_clear_bv): Declare.
2134
2135 2018-05-08 Ulrich Weigand <uweigand@de.ibm.com>
2136
2137 * spu-tdep.c (info_spu_event_command): Fix output formatting.
2138
2139 2018-05-07 Tom Tromey <tom@tromey.com>
2140
2141 * configure: Rebuild.
2142 * warning.m4 (AM_GDB_WARNINGS): Add -Wduplicated-cond.
2143
2144 2018-05-07 Tom Tromey <tom@tromey.com>
2145
2146 PR tdep/20362:
2147 * arm-tdep.c (arm_record_vfp_data_proc_insn): Properly mask off D
2148 bit. Use correct value for VDIV.
2149
2150 2018-05-04 Tom Tromey <tom@tromey.com>
2151
2152 * configure: Rebuild.
2153 * warning.m4 (AM_GDB_WARNINGS): Add -Wimplicit-fallthrough.
2154
2155 2018-05-04 Tom Tromey <tom@tromey.com>
2156
2157 * linux-record.c (record_linux_system_call) <case
2158 RECORD_SYS_RECVFROM>: Add "break".
2159
2160 2018-05-04 Tom Tromey <tom@tromey.com>
2161
2162 * mi/mi-main.c (mi_cmd_trace_frame_collected) <REGISTERS_FORMAT>:
2163 Add missing "break".
2164 * mi/mi-cmd-stack.c (mi_cmd_stack_list_locals) <NO_FRAME_FILTERS>:
2165 Add missing "break".
2166
2167 2018-05-04 Tom Tromey <tom@tromey.com>
2168
2169 * rs6000-tdep.c (ppc_process_record_op4)
2170 (ppc_process_record_op63): Add fall-through comment.
2171
2172 2018-05-04 Tom Tromey <tom@tromey.com>
2173
2174 * i386-tdep.c (i386_process_record): Add fall-through comment.
2175
2176 2018-05-04 Tom Tromey <tom@tromey.com>
2177
2178 * stabsread.c (define_symbol) <case 'p'>: Add fall-through
2179 comment.
2180
2181 2018-05-04 Tom Tromey <tom@tromey.com>
2182
2183 * riscv-tdep.c (riscv_isa_xlen): Add fall-through comment.
2184 * utils.c (can_dump_core) <LIMIT_CUR>: Add fall-through comment.
2185 * eval.c (fetch_subexp_value) <MEMORY_ERROR>: Add fall-through
2186 comment.
2187 * d-valprint.c (d_val_print) <TYPE_CODE_STRUCT>: Add fall-through
2188 comment.
2189 * coffread.c (coff_symtab_read) <C_LABEL>: Add fall-through
2190 comment.
2191
2192 2018-05-04 Tom Tromey <tom@tromey.com>
2193
2194 * dwarf2loc.c (unimplemented): Add ATTRIBUTE_NORETURN.
2195
2196 2018-05-04 Tom Tromey <tom@tromey.com>
2197
2198 * s390-tdep.c (s390_process_record): Fix fall-through comments.
2199 * xcoffread.c (scan_xcoff_symtab): Move comment later.
2200 * symfile.c (section_is_mapped): Fix fall-through comment.
2201 * stabsread.c (define_symbol, read_member_functions): Fix
2202 fall-through comment.
2203 * s390-linux-tdep.c (s390_process_record): Fix fall-through
2204 comment.
2205 * remote.c (remote_wait_as): Fix fall-through comment.
2206 * p-exp.y (yylex): Fix fall-through comment.
2207 * nat/x86-dregs.c (x86_length_and_rw_bits): Fix fall-through
2208 comment.
2209 * msp430-tdep.c (msp430_gdbarch_init): Fix fall-through comment.
2210 * mdebugread.c (parse_partial_symbols): Fix fall-through comment.
2211 * jv-exp.y (yylex): Fix fall-through comment.
2212 * go-exp.y (lex_one_token): Fix fall-through comment.
2213 * gdbtypes.c (get_discrete_bounds, rank_one_type): Fix
2214 fall-through comment.
2215 * f-exp.y (yylex): Fix fall-through comment.
2216 * dwarf2read.c (process_die): Fix fall-through comments.
2217 * dbxread.c (process_one_symbol): Fix fall-through comment.
2218 * d-exp.y (lex_one_token): Fix fall-through comment.
2219 * cp-name-parser.y (yylex): Fix fall-through comment.
2220 * coffread.c (coff_symtab_read): Fix fall-through comment.
2221 * c-exp.y (lex_one_token): Fix fall-through comment.
2222 * arm-tdep.c (arm_decode_miscellaneous): Fix fall-through
2223 comment.
2224 * arch/arm.c (arm_instruction_changes_pc): Fix fall-through
2225 comment.
2226
2227 2018-05-04 Tom Tromey <tom@tromey.com>
2228
2229 PR python/22730:
2230 * NEWS: Mention gdb.execute change.
2231 * gdbcmd.h (execute_control_command): Don't declare.
2232 * python/python.c (execute_gdb_command): Use read_command_lines_1,
2233 execute_control_commands, execute_control_commands_to_string.
2234 * cli/cli-script.h (execute_control_commands)
2235 (execute_control_commands_to_string): Declare.
2236 (execute_control_command): Add from_tty parameter.
2237 * cli/cli-script.c (execute_control_commands)
2238 (execute_control_commands_to_string): New functions.
2239 (execute_user_command): Use execute_control_commands.
2240 (execute_control_command_1): Add "from_tty" parameter. Update.
2241 (execute_control_command): Likewise.
2242
2243 2018-05-04 Tom Tromey <tom@tromey.com>
2244
2245 PR python/22731:
2246 * NEWS: Mention that breakpoint commands are writable.
2247 * python/py-breakpoint.c (bppy_set_commands): New function.
2248 (breakpoint_object_getset) <"commands">: Use it.
2249
2250 2018-05-04 Tom Tromey <tom@tromey.com>
2251
2252 * tracepoint.c (actions_command): Update.
2253 * mi/mi-cmd-break.c (mi_command_line_array)
2254 (mi_command_line_array_cnt, mi_command_line_array_ptr)
2255 (mi_read_next_line): Remove.
2256 (mi_cmd_break_commands): Update.
2257 * cli/cli-script.h (read_command_lines, read_command_lines_1): Use
2258 function_view.
2259 * cli/cli-script.c (get_command_line): Update.
2260 (process_next_line): Use function_view. Constify.
2261 (recurse_read_control_structure, read_command_lines)
2262 (read_command_lines_1): Change argument types to function_view.
2263 (do_define_command, document_command): Update.
2264 * breakpoint.h (check_tracepoint_command): Don't declare.
2265 * breakpoint.c (check_tracepoint_command): Remove.
2266 (commands_command_1, create_tracepoint_from_upload): Update.
2267
2268 2018-05-04 Tom Tromey <tom@tromey.com>
2269
2270 PR gdb/11750:
2271 * cli/cli-script.h (enum command_control_type) <define_control>:
2272 New constant.
2273 * cli/cli-script.c (multi_line_command_p): Handle define_control.
2274 (build_command_line, execute_control_command_1)
2275 (process_next_line): Likewise.
2276 (do_define_command): New function, extracted from define_command.
2277 (define_command): Use it.
2278
2279 2018-05-04 Tom Tromey <tom@tromey.com>
2280
2281 * tracepoint.c (actions_command): Update.
2282 * cli/cli-script.h (read_command_lines): Update.
2283 * cli/cli-script.c (read_command_lines): Constify prompt_arg.
2284 (MAX_TMPBUF): Remove define.
2285 (define_command): Use string_printf.
2286 (document_command): Likewise.
2287 * breakpoint.c (commands_command_1): Update.
2288
2289 2018-05-04 Tom Tromey <tom@tromey.com>
2290
2291 * top.c (execute_command): Update.
2292 * cli/cli-script.h (print_command_lines): Now varargs.
2293 * cli/cli-script.c (print_command_lines): Now varargs.
2294 (execute_control_command_1) <case while_control, case if_control>:
2295 Update.
2296
2297 2018-05-04 Tom Tromey <tom@tromey.com>
2298
2299 * tracepoint.c (all_tracepoint_actions): Rename from
2300 all_tracepoint_actions_and_cleanup. Change return type.
2301 (actions_command, encode_actions_1, encode_actions)
2302 (trace_dump_actions, tdump_command): Update.
2303 * remote.c (remote_download_command_source): Update.
2304 * python/python.c (gdbpy_eval_from_control_command)
2305 (python_command, python_interactive_command): Update.
2306 * mi/mi-cmd-break.c (mi_cmd_break_commands): Update.
2307 * guile/guile.c (guile_command)
2308 (gdbscm_eval_from_control_command, guile_command): Update.
2309 * compile/compile.c (compile_code_command)
2310 (compile_print_command, compile_to_object): Update.
2311 * cli/cli-script.h (struct command_lines_deleter): New.
2312 (counted_command_line): New typedef.
2313 (struct command_line): Add constructor, destructor.
2314 <body_list>: Remove.
2315 <body_list_0, body_list_1>: New members.
2316 (command_line_up): Remove typedef.
2317 (read_command_lines, read_command_lines_1, get_command_line):
2318 Update.
2319 (copy_command_lines): Don't declare.
2320 * cli/cli-script.c (build_command_line): Use "new".
2321 (get_command_line): Return counted_command_line.
2322 (print_command_lines, execute_user_command)
2323 (execute_control_command_1, while_command, if_command): Update.
2324 (realloc_body_list): Remove.
2325 (process_next_line, recurse_read_control_structure): Update.
2326 (read_command_lines, read_command_lines_1): Return counted_command_line.
2327 (free_command_lines): Use "delete".
2328 (copy_command_lines): Remove.
2329 (define_command, document_command, show_user_1): Update.
2330 * cli/cli-decode.h (struct cmd_list_element) <user_commands>: Now
2331 a counted_command_line.
2332 * breakpoint.h (counted_command_line): Remove typedef.
2333 (breakpoint_set_commands): Update.
2334 * breakpoint.c (check_no_tracepoint_commands)
2335 (validate_commands_for_breakpoint): Update.
2336 (breakpoint_set_commands): Change commands to be a
2337 counted_command_line.
2338 (commands_command_1, update_dprintf_command_list)
2339 (create_tracepoint_from_upload): Update.
2340
2341 2018-05-04 Tom Tromey <tom@tromey.com>
2342
2343 * cli/cli-decode.h (cmd_list_element): New constructor.
2344 (~cmd_list_element): New destructor.
2345 (struct cmd_list_element): Add initializers.
2346 * cli/cli-decode.c (do_add_cmd): Use "new".
2347 (delete_cmd): Use "delete".
2348
2349 2018-05-04 Jan Kratochvil <jan.kratochvil@redhat.com>
2350 Pedro Alves <palves@redhat.com>
2351
2352 PR breakpoints/19806 and support for PR external/20207.
2353 * NEWS: Mention Aarch64 watchpoint improvements.
2354 * aarch64-linux-nat.c (aarch64_linux_stopped_data_address): Fix missed
2355 watchpoints and PR external/20207 watchpoints.
2356 * nat/aarch64-linux-hw-point.c
2357 (kernel_supports_any_contiguous_range): New.
2358 (aarch64_watchpoint_offset): New.
2359 (aarch64_watchpoint_length): Support PR external/20207 watchpoints.
2360 (aarch64_point_encode_ctrl_reg): New parameter offset, new asserts.
2361 (aarch64_point_is_aligned): Support PR external/20207 watchpoints.
2362 (aarch64_align_watchpoint): New parameters aligned_offset_p and
2363 next_addr_orig_p. Support PR external/20207 watchpoints.
2364 (aarch64_downgrade_regs): New.
2365 (aarch64_dr_state_insert_one_point): New parameters offset and
2366 addr_orig.
2367 (aarch64_dr_state_remove_one_point): Likewise.
2368 (aarch64_handle_breakpoint): Update caller.
2369 (aarch64_handle_aligned_watchpoint): Likewise.
2370 (aarch64_handle_unaligned_watchpoint): Support addr_orig and
2371 aligned_offset.
2372 (aarch64_linux_set_debug_regs): Remove const from state. Call
2373 aarch64_downgrade_regs.
2374 (aarch64_show_debug_reg_state): Print also dr_addr_orig_wp.
2375 * nat/aarch64-linux-hw-point.h (DR_CONTROL_LENGTH): Rename to ...
2376 (DR_CONTROL_MASK): ... this.
2377 (struct aarch64_debug_reg_state): New field dr_addr_orig_wp.
2378 (unsigned int aarch64_watchpoint_offset): New prototype.
2379 (aarch64_linux_set_debug_regs): Remove const from state.
2380 * utils.c (align_up, align_down): Move to ...
2381 * common/common-utils.c (align_up, align_down): ... here.
2382 * utils.h (align_up, align_down): Move to ...
2383 * common/common-utils.h (align_up, align_down): ... here.
2384
2385 2018-05-04 Joel Brobecker <brobecker@adacore.com>
2386
2387 * sparc-tdep.c (sparc_structure_return_p): Re-implement to
2388 match the ABI as summarized in GCC's gcc/config/sparc/sparc.c.
2389 (sparc_arg_by_memory_p): Renamed from sparc_arg_on_registers_p.
2390 Re-implement to match the ABI as summarized in GCC's
2391 gcc/config/sparc/sparc.c. All callers updated.
2392 (sparc32_store_arguments): Remove assertion.
2393
2394 2018-05-04 Tom Tromey <tom@tromey.com>
2395
2396 * printcmd.c: Don't include tui.h.
2397 (decode_format): Use skip_spaces.
2398
2399 2018-05-04 Tom Tromey <tom@tromey.com>
2400
2401 PR gdb/22619:
2402 * printcmd.c (last_count): New global.
2403 (x_command): Use saved count when repeating.
2404
2405 2018-05-04 Tom Tromey <tom@tromey.com>
2406
2407 * nto-procfs.c (do_closedir_cleanup): Remove.
2408 (procfs_pidlist): Use gdb_dir_up.
2409 * procfs.c (do_closedir_cleanup): Remove.
2410 (proc_update_threads): Use gdb_dir_up.
2411 * common/filestuff.h (struct gdb_dir_deleter): New.
2412 (gdb_dir_up): New typedef.
2413
2414 2018-05-04 Tom Tromey <tom@tromey.com>
2415
2416 * ada-lang.c (print_mention_exception): Use std::string.
2417
2418 2018-05-04 Tom Tromey <tom@tromey.com>
2419
2420 * ada-lang.c (create_excep_cond_exprs): Update.
2421 (ada_exception_catchpoint_cond_string): Use std::string.
2422
2423 2018-05-04 Tom Tromey <tom@tromey.com>
2424
2425 * ada-lang.c (xget_renaming_scope): Return std::string.
2426 (old_renaming_is_invisible): Update.
2427
2428 2018-05-04 Tom Tromey <tom@tromey.com>
2429
2430 * bfd-target.c (target_bfd::m_bfd): Now a gdb_bfd_ref_ptr.
2431 (target_bfd::target_bfd, target_bfd::~target_bfd): Update.
2432
2433 2018-05-04 Ulrich Weigand <uweigand@de.ibm.com>
2434
2435 * spu-linux-nat.c (spu_linux_nat_target::wait): Fix syntax error.
2436
2437 2018-05-04 Tom Tromey <tom@tromey.com>
2438
2439 * remote.c (remote_query_supported_append): Change type.
2440 (remote_check_symbols): Update.
2441
2442 2018-05-04 Paul Pluzhnikov <ppluzhnikov@google.com>
2443
2444 PR gdb/11420
2445 * configure.ac: Prepend libpython.
2446 * python/python-config.py: Likewise.
2447 * configure: Regenerate.
2448
2449 2018-05-03 Simon Marchi <simon.marchi@ericsson.com>
2450
2451 * Makefile.in (%.c: %.l): Use -t instead of --stdout.
2452
2453 2018-05-03 Pedro Alves <palves@redhat.com>
2454
2455 * s390-linux-nat.c
2456 (s390_linux_nat_target::have_continuable_watchpoint): Mark with
2457 override. Write 'true' instead of '1'.
2458 (s390_linux_nat_target::watchpoint_addr_within_range): Remove
2459 declaration.
2460
2461 2018-05-02 Pedro Alves <palves@redhat.com>
2462
2463 * aarch64-fbsd-nat.c (_initialize_aarch64_fbsd_nat): Use
2464 add_inf_child_target.
2465 * aarch64-linux-nat.c (_initialize_aarch64_linux_nat): Use
2466 add_inf_child_target.
2467 * aix-thread.c (aix_thread_target_info): New.
2468 (aix_thread_target) <shortname, longname, doc>: Delete.
2469 <info>: New.
2470 * alpha-bsd-nat.c (_initialize_alphabsd_nat): Use
2471 add_inf_child_target.
2472 * alpha-linux-nat.c (_initialize_alpha_linux_nat): Use
2473 add_inf_child_target.
2474 * amd64-fbsd-nat.c (_initialize_amd64fbsd_nat): Use
2475 add_inf_child_target.
2476 * amd64-linux-nat.c (_initialize_amd64_linux_nat): Use
2477 add_inf_child_target.
2478 * amd64-nbsd-nat.c (_initialize_amd64nbsd_nat): Use
2479 add_inf_child_target.
2480 * amd64-obsd-nat.c (_initialize_amd64obsd_nat): Use
2481 add_inf_child_target.
2482 * arm-fbsd-nat.c (_initialize_arm_fbsd_nat): Use
2483 add_inf_child_target.
2484 * arm-linux-nat.c (_initialize_arm_linux_nat): Use
2485 add_inf_child_target.
2486 * arm-nbsd-nat.c (_initialize_arm_netbsd_nat): Use
2487 add_inf_child_target.
2488 * bfd-target.c (target_bfd_target_info): New.
2489 (target_bfd) <shortname, longname, doc>: Delete.
2490 <info>: New.
2491 * bsd-kvm.c (bsd_kvm_target_info): New.
2492 (bsd_kvm_target) <shortname, longname, doc>: Delete.
2493 <info>: New.
2494 (bsd_kvm_target::open): Rename to ...
2495 (bsd_kvm_target_open): ... this. Adjust.
2496 * bsd-uthread.c (bsd_uthread_target_info): New.
2497 (bsd_uthread_target) <shortname, longname, doc>: Delete.
2498 <info>: New.
2499 * corefile.c (core_file_command): Adjust.
2500 * corelow.c (core_target_info): New.
2501 (core_target) <shortname, longname, doc>: Delete.
2502 <info>: New.
2503 (core_target::open): Rename to ...
2504 (core_target_open): ... this. Adjust.
2505 * ctf.c (ctf_target_info): New.
2506 (ctf_target) <shortname, longname, doc>: Delete.
2507 <info>: New.
2508 (ctf_target::open): Rename to ...
2509 (ctf_target_open): ... this.
2510 (_initialize_ctf): Adjust.
2511 * exec.c (exec_target_info): New.
2512 (exec_target) <shortname, longname, doc>: Delete.
2513 <info>: New.
2514 (exec_target::open): Rename to ...
2515 (exec_target_open): ... this.
2516 * gdbcore.h (core_target_open): Declare.
2517 * go32-nat.c (_initialize_go32_nat): Use add_inf_child_target.
2518 * hppa-linux-nat.c (_initialize_hppa_linux_nat): Use
2519 add_inf_child_target.
2520 * hppa-nbsd-nat.c (_initialize_hppanbsd_nat): Use
2521 add_inf_child_target.
2522 * hppa-obsd-nat.c (_initialize_hppaobsd_nat): Use
2523 add_inf_child_target.
2524 * i386-darwin-nat.c (_initialize_i386_darwin_nat): Use
2525 add_inf_child_target.
2526 * i386-fbsd-nat.c (_initialize_i386fbsd_nat): Use
2527 add_inf_child_target.
2528 * i386-gnu-nat.c (_initialize_i386gnu_nat): Use
2529 add_inf_child_target.
2530 * i386-linux-nat.c (_initialize_i386_linux_nat): Use
2531 add_inf_child_target.
2532 * i386-nbsd-nat.c (_initialize_i386nbsd_nat): Use
2533 add_inf_child_target.
2534 * i386-obsd-nat.c (_initialize_i386obsd_nat): Use
2535 add_inf_child_target.
2536 * ia64-linux-nat.c (_initialize_ia64_linux_nat): Use
2537 add_inf_child_target.
2538 * inf-child.c (inf_child_target_info): New.
2539 (inf_child_target::info): New.
2540 (inf_child_open_target): Remove 'target' parameter. Use
2541 get_native_target instead.
2542 (inf_child_target::open): Delete.
2543 (add_inf_child_target): New.
2544 * inf-child.h (inf_child_target) <shortname, longname, doc, open>:
2545 Delete.
2546 <info>: New.
2547 (add_inf_child_target): Declare.
2548 (inf_child_open_target): Declare.
2549 * linux-thread-db.c (thread_db_target_info): New.
2550 (thread_db_target) <shortname, longname, doc>: Delete.
2551 <info>: New.
2552 * m32r-linux-nat.c (_initialize_m32r_linux_nat): Use
2553 add_inf_child_target.
2554 * m68k-bsd-nat.c (_initialize_m68kbsd_nat): Use
2555 add_inf_child_target.
2556 * m68k-linux-nat.c (_initialize_m68k_linux_nat): Use
2557 add_inf_child_target.
2558 * m88k-bsd-nat.c (_initialize_m88kbsd_nat): Use
2559 add_inf_child_target.
2560 * make-target-delegates (print_class): Adjust.
2561 * mips-fbsd-nat.c (_initialize_mips_fbsd_nat): Use
2562 add_inf_child_target.
2563 * mips-linux-nat.c (_initialize_mips_linux_nat): Use
2564 add_inf_child_target.
2565 * mips-nbsd-nat.c (_initialize_mipsnbsd_nat): Use
2566 add_inf_child_target.
2567 * mips64-obsd-nat.c (_initialize_mips64obsd_nat): Use
2568 add_inf_child_target.
2569 * nto-procfs.c (nto_native_target_info): New.
2570 (nto_procfs_target_native) <shortname, longname, doc>:
2571 Delete.
2572 <info>: New.
2573 (nto_procfs_target_info): New.
2574 (nto_procfs_target_procfs) <shortname, longname, doc>:
2575 Delete.
2576 <info>: New.
2577 (init_procfs_targets): Adjust.
2578 * ppc-fbsd-nat.c (_initialize_ppcfbsd_nat): Use
2579 add_inf_child_target.
2580 * ppc-linux-nat.c (_initialize_ppc_linux_nat): Use
2581 add_inf_child_target.
2582 * ppc-nbsd-nat.c (_initialize_ppcnbsd_nat): Use
2583 add_inf_child_target.
2584 * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Use
2585 add_inf_child_target.
2586 * ravenscar-thread.c (ravenscar_target_info): New.
2587 (ravenscar_thread_target) <shortname, longname, doc>:
2588 Delete.
2589 <info>: New.
2590 * record-btrace.c (record_btrace_target_info):
2591 (record_btrace_target) <shortname, longname, doc>: Delete.
2592 <info>: New.
2593 (record_btrace_target::open): Rename to ...
2594 (record_btrace_target_open): ... this. Adjust.
2595 * record-full.c (record_longname, record_doc): New.
2596 (record_full_base_target) <shortname, longname, doc>: Delete.
2597 <info>: New.
2598 (record_full_target_info): New.
2599 (record_full_target): <shortname>: Delete.
2600 <info>: New.
2601 (record_full_core_open_1, record_full_open_1): Update comments.
2602 (record_full_base_target::open): Rename to ...
2603 (record_full_open): ... this.
2604 (cmd_record_full_restore): Update.
2605 (_initialize_record_full): Update.
2606 * remote-sim.c (remote_sim_target_info): New.
2607 (gdbsim_target) <shortname, longname, doc>: Delete.
2608 <info>: New.
2609 (gdbsim_target::open): Rename to ...
2610 (gdbsim_target_open): ... this.
2611 (_initialize_remote_sim): Adjust.
2612 * remote.c (remote_doc): New.
2613 (remote_target_info): New.
2614 (remote_target) <shortname, longname, doc>: Delete.
2615 <info>: New.
2616 (extended_remote_target_info): New.
2617 (extended_remote_target) <shortname, longname, doc>: Delete.
2618 <info>: New.
2619 (remote_target::open_1): Make static. Adjust.
2620 * rs6000-nat.c (_initialize_rs6000_nat): Use add_inf_child_target.
2621 * s390-linux-nat.c (_initialize_s390_nat): Use
2622 add_inf_child_target.
2623 * sh-nbsd-nat.c (_initialize_shnbsd_nat): Use
2624 add_inf_child_target.
2625 * sol-thread.c (thread_db_target_info): New.
2626 (sol_thread_target) <shortname, longname, doc>: Delete.
2627 <info>: New.
2628 * sparc-linux-nat.c (_initialize_sparc_linux_nat): Use
2629 add_inf_child_target.
2630 * sparc-nbsd-nat.c (_initialize_sparcnbsd_nat): Use
2631 add_inf_child_target.
2632 * sparc64-fbsd-nat.c (_initialize_sparc64fbsd_nat): Use
2633 add_inf_child_target.
2634 * sparc64-linux-nat.c (_initialize_sparc64_linux_nat): Use
2635 add_inf_child_target.
2636 * sparc64-nbsd-nat.c (_initialize_sparc64nbsd_nat): Use
2637 add_inf_child_target.
2638 * sparc64-obsd-nat.c (_initialize_sparc64obsd_nat): Use
2639 add_inf_child_target.
2640 * spu-linux-nat.c (_initialize_spu_nat): Use
2641 add_inf_child_target.
2642 * spu-multiarch.c (spu_multiarch_target_info): New.
2643 (spu_multiarch_target) <shortname, longname, doc>: Delete.
2644 <info>: New.
2645 * target-delegates.c: Regenerate.
2646 * target.c: Include <unordered_map>.
2647 (target_ops_p): Delete.
2648 (DEF_VEC_P(target_ops_p)): Delete.
2649 (target_factories): New.
2650 (test_target_info): New.
2651 (test_target_ops::info): New.
2652 (open_target): Adjust to use target_factories.
2653 (add_target_with_completer): Rename to ...
2654 (add_target): ... this. Change prototype. Register target_info
2655 and open callback in target_factories. Register target_info in
2656 command context instead of target_ops.
2657 (add_target): Delete old implementation.
2658 (add_deprecated_target_alias): Change prototype. Adjust.
2659 (the_native_target): New.
2660 (set_native_target, get_native_target): New.
2661 (find_default_run_target): Use the_native_target.
2662 (find_attach_target, find_run_target): Simplify.
2663 (target_ops::open): Delete.
2664 (dummy_target_info): New.
2665 (dummy_target::shortname, dummy_target::longname)
2666 (dummy_target::doc): Delete.
2667 (dummy_target::info): New.
2668 (debug_target::shortname, debug_target::longname)
2669 (debug_target::doc): Delete.
2670 (debug_target::info): New.
2671 * target.h (struct target_info): New.
2672 (target_ops::~target_ops): Add comment.
2673 (target_ops::info): New.
2674 (target_ops::shortname, target_ops::longname, target_ops::doc): No
2675 longer virtual. Implement in terms of target_info.
2676 (set_native_target, get_native_target): Declare.
2677 (target_open_ftype): New.
2678 (add_target, add_target_with_completer)
2679 (add_deprecated_target_alias): Change prototype.
2680 (test_target) <shortname, longname, doc>: Delete.
2681 <info>: New.
2682 * tilegx-linux-nat.c (_initialize_tile_linux_nat): Use
2683 add_inf_child_target.
2684 * tracefile-tfile.c (tfile_target_info): New.
2685 (tfile_target) <shortname, longname, doc>: Delete.
2686 <info>: New.
2687 (tfile_target::open): Rename to ...
2688 (tfile_target_open): ... this.
2689 (_initialize_tracefile_tfile): Adjust.
2690 * vax-bsd-nat.c (_initialize_vaxbsd_nat): Use
2691 add_inf_child_target.
2692 * windows-nat.c (_initialize_windows_nat): Use
2693 add_inf_child_target.
2694 * xtensa-linux-nat.c (_initialize_xtensa_linux_nat): Use
2695 add_inf_child_target.
2696
2697 2018-05-02 Pedro Alves <palves@redhat.com>
2698
2699 * linux-nat.h (linux_nat_target) <low_new_thread,
2700 low_delete_thread, low_new_fork, low_forget_process,
2701 low_prepare_to_resume, low_siginfo_fixup, low_status_is_event>:
2702 New virtual methods.
2703 (linux_nat_set_new_thread, linux_nat_set_delete_thread)
2704 (linux_nat_new_fork_ftype, linux_nat_set_new_fork)
2705 (linux_nat_forget_process_ftype, linux_nat_set_forget_process)
2706 (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
2707 (linux_nat_set_prepare_to_resume, linux_nat_set_status_is_event):
2708 Delete.
2709 * linux-fork.c (delete_fork): Adjust to call low method.
2710 * linux-nat.c (linux_nat_new_thread, linux_nat_delete_thread)
2711 (linux_nat_new_fork, linux_nat_forget_process_hook)
2712 (linux_nat_prepare_to_resume, linux_nat_siginfo_fixup)
2713 (linux_nat_status_is_event):
2714 (linux_nat_target::follow_fork, lwp_free, add_lwp, detach_one_lwp)
2715 (linux_resume_one_lwp_throw, linux_handle_extended_wait): Adjust
2716 to call low method.
2717 (sigtrap_is_event): Rename to ...
2718 (linux_nat_target::low_status_is_event): ... this.
2719 (linux_nat_set_status_is_event): Delete.
2720 (save_stop_reason, linux_nat_wait_1)
2721 (linux_nat_target::mourn_inferior, siginfo_fixup): Adjust to call
2722 low methods.
2723 (linux_nat_set_new_thread, linux_nat_set_delete_thread)
2724 (linux_nat_set_new_fork, linux_nat_set_forget_process)
2725 (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
2726 (linux_nat_set_prepare_to_resume): Delete.
2727 * aarch64-linux-nat.c: All linux_nat_set_* callbacks converted to
2728 low virtual methods.
2729 * amd64-linux-nat.c: Likewise.
2730 * arm-linux-nat.c: Likewise.
2731 * i386-linux-nat.c: Likewise.
2732 * ia64-linux-nat.c: Likewise.
2733 * mips-linux-nat.c: Likewise.
2734 * ppc-linux-nat.c: Likewise.
2735 * s390-linux-nat.c: Likewise.
2736 * sparc64-linux-nat.c: Likewise.
2737 * x86-linux-nat.c: Likewise.
2738 * x86-linux-nat.h: Include "nat/x86-linux.h".
2739 (x86_linux_nat_target) <low_new_fork, low_forget_process,
2740 low_prepare_to_resume, low_new_thread, low_delete_thread>:
2741 Override methods.
2742
2743 2018-05-02 Pedro Alves <palves@redhat.com>
2744
2745 * target.h (target_ops)
2746 <stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
2747 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint,
2748 stopped_by_watchpoint, have_continuable_watchpoint,
2749 stopped_data_address, watchpoint_addr_within_range,
2750 can_accel_watchpoint_condition, can_run, thread_alive,
2751 has_all_memory, has_memory, has_stack, has_registers,
2752 has_execution, can_async_p, is_async_p, supports_non_stop,
2753 always_non_stop_p, can_execute_reverse, supports_multi_process,
2754 supports_enable_disable_tracepoint,
2755 supports_disable_randomization, supports_string_tracing,
2756 supports_evaluation_of_breakpoint_conditions,
2757 can_run_breakpoint_commands, filesystem_is_local,
2758 can_download_tracepoint, get_trace_state_variable_value,
2759 set_trace_notes, get_tib_address, use_agent, can_use_agent,
2760 record_is_replaying, record_will_replay,
2761 augmented_libraries_svr4_read>: Adjust to return bool.
2762 * aarch64-linux-nat.c: All implementations adjusted.
2763 * aix-thread.c: All implementations adjusted.
2764 * arm-linux-nat.c: All implementations adjusted.
2765 * breakpoint.c: All implementations adjusted.
2766 * bsd-kvm.c: All implementations adjusted.
2767 * bsd-uthread.c: All implementations adjusted.
2768 * corelow.c: All implementations adjusted.
2769 * ctf.c: All implementations adjusted.
2770 * darwin-nat.c: All implementations adjusted.
2771 * darwin-nat.h: All implementations adjusted.
2772 * exec.c: All implementations adjusted.
2773 * fbsd-nat.c: All implementations adjusted.
2774 * fbsd-nat.h: All implementations adjusted.
2775 * gnu-nat.c: All implementations adjusted.
2776 * gnu-nat.h: All implementations adjusted.
2777 * go32-nat.c: All implementations adjusted.
2778 * ia64-linux-nat.c: All implementations adjusted.
2779 * inf-child.c: All implementations adjusted.
2780 * inf-child.h: All implementations adjusted.
2781 * inf-ptrace.c: All implementations adjusted.
2782 * inf-ptrace.h: All implementations adjusted.
2783 * linux-nat.c: All implementations adjusted.
2784 * linux-nat.h: All implementations adjusted.
2785 * mips-linux-nat.c: All implementations adjusted.
2786 * nto-procfs.c: All implementations adjusted.
2787 * ppc-linux-nat.c: All implementations adjusted.
2788 * procfs.c: All implementations adjusted.
2789 * ravenscar-thread.c: All implementations adjusted.
2790 * record-btrace.c: All implementations adjusted.
2791 * record-full.c: All implementations adjusted.
2792 * remote-sim.c: All implementations adjusted.
2793 * remote.c: All implementations adjusted.
2794 * s390-linux-nat.c: All implementations adjusted.
2795 * sol-thread.c: All implementations adjusted.
2796 * spu-multiarch.c: All implementations adjusted.
2797 * target-delegates.c: All implementations adjusted.
2798 * target.c: All implementations adjusted.
2799 * target.h: All implementations adjusted.
2800 * tracefile-tfile.c: All implementations adjusted.
2801 * tracefile.c: All implementations adjusted.
2802 * tracefile.h: All implementations adjusted.
2803 * windows-nat.c: All implementations adjusted.
2804 * x86-linux-nat.h: All implementations adjusted.
2805 * x86-nat.h: All implementations adjusted.
2806
2807 2018-05-02 Pedro Alves <palves@redhat.com>
2808
2809 * make-target-delegates (scan_target_h): Don't trim lines here.
2810 Replace sequences of tabs and/or whitespace with a single
2811 whitespace.
2812 (top level, parsing methods): Trim each line before processing it
2813 here.
2814
2815 2018-05-02 Pedro Alves <palves@redhat.com>
2816 John Baldwin <jhb@freebsd.org>
2817
2818 * target.h (enum strata) <debug_stratum>: New.
2819 (struct target_ops) <all delegation methods>: Replace by C++
2820 virtual methods, and drop "to_" prefix. All references updated
2821 throughout.
2822 <to_shortname, to_longname, to_doc, to_data,
2823 to_have_steppable_watchpoint, to_have_continuable_watchpoint,
2824 to_has_thread_control, to_attach_no_wait>: Delete, replaced by
2825 virtual methods. All references updated throughout.
2826 <can_attach, supports_terminal_ours, can_create_inferior,
2827 get_thread_control_capabilities, attach_no_wait>: New
2828 virtual methods.
2829 <insert_breakpoint, remove_breakpoint>: Now
2830 TARGET_DEFAULT_NORETURN methods.
2831 <info_proc>: Now returns bool.
2832 <to_magic>: Delete.
2833 (OPS_MAGIC): Delete.
2834 (current_target): Delete. All references replaced by references
2835 to ...
2836 (target_stack): ... this. New.
2837 (target_shortname, target_longname): Adjust.
2838 (target_can_run): Now a function declaration.
2839 (default_child_has_all_memory, default_child_has_memory)
2840 (default_child_has_stack, default_child_has_registers)
2841 (default_child_has_execution): Remove target_ops parameter.
2842 (complete_target_initialization): Delete.
2843 (memory_breakpoint_target): New template class.
2844 (test_target_ops): Refactor as a C++ class with virtual methods.
2845 * make-target-delegates (NAME_PART): Tighten.
2846 (POINTER_PART, CP_SYMBOL): New.
2847 (SIMPLE_RETURN_PART): Reimplement.
2848 (VEC_RETURN_PART): Expect less.
2849 (RETURN_PART, VIRTUAL_PART): New.
2850 (METHOD): Adjust to C++ virtual methods.
2851 (scan_target_h): Remove reference to C99.
2852 (dname): Output "target_ops::" prefix.
2853 (write_function_header): Adjust to output a C++ class method.
2854 (write_declaration): New.
2855 (write_delegator): Adjust to output a C++ class method.
2856 (tdname): Output "dummy_target::" prefix.
2857 (write_tdefault, write_debugmethod): Adjust to output a C++ class
2858 method.
2859 (tdefault_names, debug_names): Delete.
2860 (return_types, tdefaults, styles, argtypes_array): New.
2861 (top level): All methods are delegators.
2862 (print_class): New.
2863 (top level): Print dummy_target and debug_target classes.
2864 * target-delegates.c: Regenerate.
2865 * target-debug.h (target_debug_print_enum_info_proc_what)
2866 (target_debug_print_thread_control_capabilities)
2867 (target_debug_print_thread_info_p): New.
2868 * target.c (dummy_target): Delete.
2869 (the_dummy_target, the_debug_target): New.
2870 (target_stack): Now extern.
2871 (set_targetdebug): Push/unpush debug target.
2872 (default_child_has_all_memory, default_child_has_memory)
2873 (default_child_has_stack, default_child_has_registers)
2874 (default_child_has_execution): Remove target_ops parameter.
2875 (complete_target_initialization): Delete.
2876 (add_target_with_completer): No longer call
2877 complete_target_initialization.
2878 (target_supports_terminal_ours): Use regular delegation.
2879 (update_current_target): Delete.
2880 (push_target): No longer check magic number. Don't call
2881 update_current_target.
2882 (unpush_target): Don't call update_current_target.
2883 (target_is_pushed): No longer check magic number.
2884 (target_require_runnable): Skip for all stratums over
2885 process_stratum.
2886 (target_ops::info_proc): New.
2887 (target_info_proc): Use find_target_at and
2888 find_default_run_target.
2889 (target_supports_disable_randomization): Use regular delegation.
2890 (target_get_osdata): Use find_target_at.
2891 (target_ops::open, target_ops::close, target_ops::can_attach)
2892 (target_ops::attach, target_ops::can_create_inferior)
2893 (target_ops::create_inferior, target_ops::can_run)
2894 (target_can_run): New.
2895 (default_fileio_target): Use regular delegation.
2896 (target_ops::fileio_open, target_ops::fileio_pwrite)
2897 (target_ops::fileio_pread, target_ops::fileio_fstat)
2898 (target_ops::fileio_close, target_ops::fileio_unlink)
2899 (target_ops::fileio_readlink): New.
2900 (target_fileio_open_1, target_fileio_unlink)
2901 (target_fileio_readlink): Always call the target method. Handle
2902 FILEIO_ENOSYS.
2903 (return_zero, return_zero_has_execution): Delete.
2904 (init_dummy_target): Delete.
2905 (dummy_target::dummy_target, dummy_target::shortname)
2906 (dummy_target::longname, dummy_target::doc)
2907 (debug_target::debug_target, debug_target::shortname)
2908 (debug_target::longname, debug_target::doc): New.
2909 (target_supports_delete_record): Use regular delegation.
2910 (setup_target_debug): Delete.
2911 (maintenance_print_target_stack): Skip debug_stratum.
2912 (initialize_targets): Instantiate the_dummy_target and
2913 the_debug_target.
2914 * auxv.c (target_auxv_parse): Remove 'ops' parameter. Adjust to
2915 use target_stack.
2916 (target_auxv_search, fprint_target_auxv): Adjust.
2917 (info_auxv_command): Adjust to use target_stack.
2918 * auxv.h (target_auxv_parse): Remove 'ops' parameter.
2919 * exceptions.c (print_flush): Handle a NULL target_stack.
2920 * regcache.c (target_ops_no_register): Refactor as class with
2921 virtual methods.
2922
2923 * exec.c (exec_target): New class.
2924 (exec_ops): Now an exec_target.
2925 (exec_open, exec_close_1, exec_get_section_table)
2926 (exec_xfer_partial, exec_files_info, exec_has_memory)
2927 (exec_make_note_section): Refactor as exec_target methods.
2928 (exec_file_clear, ignore, exec_remove_breakpoint, init_exec_ops):
2929 Delete.
2930 (exec_target::find_memory_regions): New.
2931 (_initialize_exec): Don't call init_exec_ops.
2932 * gdbcore.h (exec_file_clear): Delete.
2933
2934 * corefile.c (core_target): Delete.
2935 (core_file_command): Adjust.
2936 * corelow.c (core_target): New class.
2937 (the_core_target): New.
2938 (core_close): Remove target_ops parameter.
2939 (core_close_cleanup): Adjust.
2940 (core_target::close): New.
2941 (core_open, core_detach, get_core_registers, core_files_info)
2942 (core_xfer_partial, core_thread_alive, core_read_description)
2943 (core_pid_to_str, core_thread_name, core_has_memory)
2944 (core_has_stack, core_has_registers, core_info_proc): Rework as
2945 core_target methods.
2946 (ignore, core_remove_breakpoint, init_core_ops): Delete.
2947 (_initialize_corelow): Initialize the_core_target.
2948 * gdbcore.h (core_target): Delete.
2949 (the_core_target): New.
2950
2951 * ctf.c: (ctf_target): New class.
2952 (ctf_ops): Now a ctf_target.
2953 (ctf_open, ctf_close, ctf_files_info, ctf_fetch_registers)
2954 (ctf_xfer_partial, ctf_get_trace_state_variable_value)
2955 (ctf_trace_find, ctf_traceframe_info): Refactor as ctf_target
2956 methods.
2957 (init_ctf_ops): Delete.
2958 (_initialize_ctf): Don't call it.
2959 * tracefile-tfile.c (tfile_target): New class.
2960 (tfile_ops): Now a tfile_target.
2961 (tfile_open, tfile_close, tfile_files_info)
2962 (tfile_get_tracepoint_status, tfile_trace_find)
2963 (tfile_fetch_registers, tfile_xfer_partial)
2964 (tfile_get_trace_state_variable_value, tfile_traceframe_info):
2965 Refactor as tfile_target methods.
2966 (tfile_xfer_partial_features): Remove target_ops parameter.
2967 (init_tfile_ops): Delete.
2968 (_initialize_tracefile_tfile): Don't call it.
2969 * tracefile.c (tracefile_has_all_memory, tracefile_has_memory)
2970 (tracefile_has_stack, tracefile_has_registers)
2971 (tracefile_thread_alive, tracefile_get_trace_status): Refactor as
2972 tracefile_target methods.
2973 (init_tracefile_ops): Delete.
2974 (tracefile_target::tracefile_target): New.
2975 * tracefile.h: Include "target.h".
2976 (tracefile_target): New class.
2977 (init_tracefile_ops): Delete.
2978
2979 * spu-multiarch.c (spu_multiarch_target): New class.
2980 (spu_ops): Now a spu_multiarch_target.
2981 (spu_thread_architecture, spu_region_ok_for_hw_watchpoint)
2982 (spu_fetch_registers, spu_store_registers, spu_xfer_partial)
2983 (spu_search_memory, spu_mourn_inferior): Refactor as
2984 spu_multiarch_target methods.
2985 (init_spu_ops): Delete.
2986 (_initialize_spu_multiarch): Remove references to init_spu_ops,
2987 complete_target_initialization.
2988
2989 * ravenscar-thread.c (ravenscar_thread_target): New class.
2990 (ravenscar_ops): Now a ravenscar_thread_target.
2991 (ravenscar_resume, ravenscar_wait, ravenscar_update_thread_list)
2992 (ravenscar_thread_alive, ravenscar_pid_to_str)
2993 (ravenscar_fetch_registers, ravenscar_store_registers)
2994 (ravenscar_prepare_to_store, ravenscar_stopped_by_sw_breakpoint)
2995 (ravenscar_stopped_by_hw_breakpoint)
2996 (ravenscar_stopped_by_watchpoint, ravenscar_stopped_data_address)
2997 (ravenscar_mourn_inferior, ravenscar_core_of_thread)
2998 (ravenscar_get_ada_task_ptid): Refactor as ravenscar_thread_target
2999 methods.
3000 (init_ravenscar_thread_ops): Delete.
3001 (_initialize_ravenscar): Remove references to
3002 init_ravenscar_thread_ops and complete_target_initialization.
3003
3004 * bsd-uthread.c (bsd_uthread_ops_hack): Delete.
3005 (bsd_uthread_target): New class.
3006 (bsd_uthread_ops): Now a bsd_uthread_target.
3007 (bsd_uthread_activate): Adjust to refer to bsd_uthread_ops.
3008 (bsd_uthread_close, bsd_uthread_mourn_inferior)
3009 (bsd_uthread_fetch_registers, bsd_uthread_store_registers)
3010 (bsd_uthread_wait, bsd_uthread_resume, bsd_uthread_thread_alive)
3011 (bsd_uthread_update_thread_list, bsd_uthread_extra_thread_info)
3012 (bsd_uthread_pid_to_str): Refactor as bsd_uthread_target methods.
3013 (bsd_uthread_target): Delete function.
3014 (_initialize_bsd_uthread): Remove reference to
3015 complete_target_initialization.
3016
3017 * bfd-target.c (target_bfd_data): Delete. Fields folded into ...
3018 (target_bfd): ... this new class.
3019 (target_bfd_xfer_partial, target_bfd_get_section_table)
3020 (target_bfd_close): Refactor as target_bfd methods.
3021 (target_bfd::~target_bfd): New.
3022 (target_bfd_reopen): Adjust.
3023 (target_bfd::close): New.
3024
3025 * record-btrace.c (record_btrace_target): New class.
3026 (record_btrace_ops): Now a record_btrace_target.
3027 (record_btrace_open, record_btrace_stop_recording)
3028 (record_btrace_disconnect, record_btrace_close)
3029 (record_btrace_async, record_btrace_info)
3030 (record_btrace_insn_history, record_btrace_insn_history_range)
3031 (record_btrace_insn_history_from, record_btrace_call_history)
3032 (record_btrace_call_history_range)
3033 (record_btrace_call_history_from, record_btrace_record_method)
3034 (record_btrace_is_replaying, record_btrace_will_replay)
3035 (record_btrace_xfer_partial, record_btrace_insert_breakpoint)
3036 (record_btrace_remove_breakpoint, record_btrace_fetch_registers)
3037 (record_btrace_store_registers, record_btrace_prepare_to_store)
3038 (record_btrace_to_get_unwinder)
3039 (record_btrace_to_get_tailcall_unwinder, record_btrace_resume)
3040 (record_btrace_commit_resume, record_btrace_wait)
3041 (record_btrace_stop, record_btrace_can_execute_reverse)
3042 (record_btrace_stopped_by_sw_breakpoint)
3043 (record_btrace_supports_stopped_by_sw_breakpoint)
3044 (record_btrace_stopped_by_hw_breakpoint)
3045 (record_btrace_supports_stopped_by_hw_breakpoint)
3046 (record_btrace_update_thread_list, record_btrace_thread_alive)
3047 (record_btrace_goto_begin, record_btrace_goto_end)
3048 (record_btrace_goto, record_btrace_stop_replaying_all)
3049 (record_btrace_execution_direction)
3050 (record_btrace_prepare_to_generate_core)
3051 (record_btrace_done_generating_core): Refactor as
3052 record_btrace_target methods.
3053 (init_record_btrace_ops): Delete.
3054 (_initialize_record_btrace): Remove reference to
3055 init_record_btrace_ops.
3056 * record-full.c (RECORD_FULL_IS_REPLAY): Adjust to always refer to
3057 the execution_direction global.
3058 (record_full_base_target, record_full_target)
3059 (record_full_core_target): New classes.
3060 (record_full_ops): Now a record_full_target.
3061 (record_full_core_ops): Now a record_full_core_target.
3062 (record_full_target::detach, record_full_target::disconnect)
3063 (record_full_core_target::disconnect)
3064 (record_full_target::mourn_inferior, record_full_target::kill):
3065 New.
3066 (record_full_open, record_full_close, record_full_async): Refactor
3067 as methods of the record_full_base_target class.
3068 (record_full_resume, record_full_commit_resume): Refactor
3069 as methods of the record_full_target class.
3070 (record_full_wait, record_full_stopped_by_watchpoint)
3071 (record_full_stopped_data_address)
3072 (record_full_stopped_by_sw_breakpoint)
3073 (record_full_supports_stopped_by_sw_breakpoint)
3074 (record_full_stopped_by_hw_breakpoint)
3075 (record_full_supports_stopped_by_hw_breakpoint): Refactor as
3076 methods of the record_full_base_target class.
3077 (record_full_store_registers, record_full_xfer_partial)
3078 (record_full_insert_breakpoint, record_full_remove_breakpoint):
3079 Refactor as methods of the record_full_target class.
3080 (record_full_can_execute_reverse, record_full_get_bookmark)
3081 (record_full_goto_bookmark, record_full_execution_direction)
3082 (record_full_record_method, record_full_info, record_full_delete)
3083 (record_full_is_replaying, record_full_will_replay)
3084 (record_full_goto_begin, record_full_goto_end, record_full_goto)
3085 (record_full_stop_replaying): Refactor as methods of the
3086 record_full_base_target class.
3087 (record_full_core_resume, record_full_core_kill)
3088 (record_full_core_fetch_registers)
3089 (record_full_core_prepare_to_store)
3090 (record_full_core_store_registers, record_full_core_xfer_partial)
3091 (record_full_core_insert_breakpoint)
3092 (record_full_core_remove_breakpoint)
3093 (record_full_core_has_execution): Refactor
3094 as methods of the record_full_core_target class.
3095 (record_full_base_target::supports_delete_record): New.
3096 (init_record_full_ops): Delete.
3097 (init_record_full_core_ops): Delete.
3098 (record_full_save): Refactor as method of the
3099 record_full_base_target class.
3100 (_initialize_record_full): Remove references to
3101 init_record_full_ops and init_record_full_core_ops.
3102
3103 * remote.c (remote_target, extended_remote_target): New classes.
3104 (remote_ops): Now a remote_target.
3105 (extended_remote_ops): Now an extended_remote_target.
3106 (remote_insert_fork_catchpoint, remote_remove_fork_catchpoint)
3107 (remote_insert_vfork_catchpoint, remote_remove_vfork_catchpoint)
3108 (remote_insert_exec_catchpoint, remote_remove_exec_catchpoint)
3109 (remote_pass_signals, remote_set_syscall_catchpoint)
3110 (remote_program_signals, )
3111 (remote_thread_always_alive): Remove target_ops parameter.
3112 (remote_thread_alive, remote_thread_name)
3113 (remote_update_thread_list, remote_threads_extra_info)
3114 (remote_static_tracepoint_marker_at)
3115 (remote_static_tracepoint_markers_by_strid)
3116 (remote_get_ada_task_ptid, remote_close, remote_start_remote)
3117 (remote_open): Refactor as methods of remote_target.
3118 (extended_remote_open, extended_remote_detach)
3119 (extended_remote_attach, extended_remote_post_attach):
3120 (extended_remote_supports_disable_randomization)
3121 (extended_remote_create_inferior): : Refactor as method of
3122 extended_remote_target.
3123 (remote_set_permissions, remote_open_1, remote_detach)
3124 (remote_follow_fork, remote_follow_exec, remote_disconnect)
3125 (remote_resume, remote_commit_resume, remote_stop)
3126 (remote_interrupt, remote_pass_ctrlc, remote_terminal_inferior)
3127 (remote_terminal_ours, remote_wait, remote_fetch_registers)
3128 (remote_prepare_to_store, remote_store_registers)
3129 (remote_flash_erase, remote_flash_done, remote_files_info)
3130 (remote_kill, remote_mourn, remote_insert_breakpoint)
3131 (remote_remove_breakpoint, remote_insert_watchpoint)
3132 (remote_watchpoint_addr_within_range)
3133 (remote_remove_watchpoint, remote_region_ok_for_hw_watchpoint)
3134 (remote_check_watch_resources, remote_stopped_by_sw_breakpoint)
3135 (remote_supports_stopped_by_sw_breakpoint)
3136 (remote_stopped_by_hw_breakpoint)
3137 (remote_supports_stopped_by_hw_breakpoint)
3138 (remote_stopped_by_watchpoint, remote_stopped_data_address)
3139 (remote_insert_hw_breakpoint, remote_remove_hw_breakpoint)
3140 (remote_verify_memory): Refactor as methods of remote_target.
3141 (remote_write_qxfer, remote_read_qxfer): Remove target_ops
3142 parameter.
3143 (remote_xfer_partial, remote_get_memory_xfer_limit)
3144 (remote_search_memory, remote_rcmd, remote_memory_map)
3145 (remote_pid_to_str, remote_get_thread_local_address)
3146 (remote_get_tib_address, remote_read_description): Refactor as
3147 methods of remote_target.
3148 (remote_target::fileio_open, remote_target::fileio_pwrite)
3149 (remote_target::fileio_pread, remote_target::fileio_close): New.
3150 (remote_hostio_readlink, remote_hostio_fstat)
3151 (remote_filesystem_is_local, remote_can_execute_reverse)
3152 (remote_supports_non_stop, remote_supports_disable_randomization)
3153 (remote_supports_multi_process, remote_supports_cond_breakpoints)
3154 (remote_supports_enable_disable_tracepoint)
3155 (remote_supports_string_tracing)
3156 (remote_can_run_breakpoint_commands, remote_trace_init)
3157 (remote_download_tracepoint, remote_can_download_tracepoint)
3158 (remote_download_trace_state_variable, remote_enable_tracepoint)
3159 (remote_disable_tracepoint, remote_trace_set_readonly_regions)
3160 (remote_trace_start, remote_get_trace_status)
3161 (remote_get_tracepoint_status, remote_trace_stop)
3162 (remote_trace_find, remote_get_trace_state_variable_value)
3163 (remote_save_trace_data, remote_get_raw_trace_data)
3164 (remote_set_disconnected_tracing, remote_core_of_thread)
3165 (remote_set_circular_trace_buffer, remote_traceframe_info)
3166 (remote_get_min_fast_tracepoint_insn_len)
3167 (remote_set_trace_buffer_size, remote_set_trace_notes)
3168 (remote_use_agent, remote_can_use_agent, remote_enable_btrace)
3169 (remote_disable_btrace, remote_teardown_btrace)
3170 (remote_read_btrace, remote_btrace_conf)
3171 (remote_augmented_libraries_svr4_read, remote_load)
3172 (remote_pid_to_exec_file, remote_can_do_single_step)
3173 (remote_execution_direction, remote_thread_handle_to_thread_info):
3174 Refactor as methods of remote_target.
3175 (init_remote_ops, init_extended_remote_ops): Delete.
3176 (remote_can_async_p, remote_is_async_p, remote_async)
3177 (remote_thread_events, remote_upload_tracepoints)
3178 (remote_upload_trace_state_variables): Refactor as methods of
3179 remote_target.
3180 (_initialize_remote): Remove references to init_remote_ops and
3181 init_extended_remote_ops.
3182
3183 * remote-sim.c (gdbsim_target): New class.
3184 (gdbsim_fetch_register, gdbsim_store_register, gdbsim_kill)
3185 (gdbsim_load, gdbsim_create_inferior, gdbsim_open, gdbsim_close)
3186 (gdbsim_detach, gdbsim_resume, gdbsim_interrupt)
3187 (gdbsim_wait, gdbsim_prepare_to_store, gdbsim_xfer_partial)
3188 (gdbsim_files_info, gdbsim_mourn_inferior, gdbsim_thread_alive)
3189 (gdbsim_pid_to_str, gdbsim_has_all_memory, gdbsim_has_memory):
3190 Refactor as methods of gdbsim_target.
3191 (gdbsim_ops): Now a gdbsim_target.
3192 (init_gdbsim_ops): Delete.
3193 (gdbsim_cntrl_c): Adjust.
3194 (_initialize_remote_sim): Remove reference to init_gdbsim_ops.
3195
3196 * amd64-linux-nat.c (amd64_linux_nat_target): New class.
3197 (the_amd64_linux_nat_target): New.
3198 (amd64_linux_fetch_inferior_registers)
3199 (amd64_linux_store_inferior_registers): Refactor as methods of
3200 amd64_linux_nat_target.
3201 (_initialize_amd64_linux_nat): Adjust. Set linux_target.
3202 * i386-linux-nat.c: Don't include "linux-nat.h".
3203 (i386_linux_nat_target): New class.
3204 (the_i386_linux_nat_target): New.
3205 (i386_linux_fetch_inferior_registers)
3206 (i386_linux_store_inferior_registers, i386_linux_resume): Refactor
3207 as methods of i386_linux_nat_target.
3208 (_initialize_i386_linux_nat): Adjust. Set linux_target.
3209 * inf-child.c (inf_child_ops): Delete.
3210 (inf_child_fetch_inferior_registers)
3211 (inf_child_store_inferior_registers): Delete.
3212 (inf_child_post_attach, inf_child_prepare_to_store): Refactor as
3213 methods of inf_child_target.
3214 (inf_child_target::supports_terminal_ours)
3215 (inf_child_target::terminal_init)
3216 (inf_child_target::terminal_inferior)
3217 (inf_child_target::terminal_ours_for_output)
3218 (inf_child_target::terminal_ours, inf_child_target::interrupt)
3219 (inf_child_target::pass_ctrlc, inf_child_target::terminal_info):
3220 New.
3221 (inf_child_open, inf_child_disconnect, inf_child_close)
3222 (inf_child_mourn_inferior, inf_child_maybe_unpush_target)
3223 (inf_child_post_startup_inferior, inf_child_can_run)
3224 (inf_child_pid_to_exec_file): Refactor as methods of
3225 inf_child_target.
3226 (inf_child_follow_fork): Delete.
3227 (inf_child_target::can_create_inferior)
3228 (inf_child_target::can_attach): New.
3229 (inf_child_target::has_all_memory, inf_child_target::has_memory)
3230 (inf_child_target::has_stack, inf_child_target::has_registers)
3231 (inf_child_target::has_execution): New.
3232 (inf_child_fileio_open, inf_child_fileio_pwrite)
3233 (inf_child_fileio_pread, inf_child_fileio_fstat)
3234 (inf_child_fileio_close, inf_child_fileio_unlink)
3235 (inf_child_fileio_readlink, inf_child_use_agent)
3236 (inf_child_can_use_agent): Refactor as methods of
3237 inf_child_target.
3238 (return_zero, inf_child_target): Delete.
3239 (inf_child_target::inf_child_target): New.
3240 * inf-child.h: Include "target.h".
3241 (inf_child_target): Delete function prototype.
3242 (inf_child_target): New class.
3243 (inf_child_open_target, inf_child_mourn_inferior)
3244 (inf_child_maybe_unpush_target): Delete.
3245 * inf-ptrace.c (inf_ptrace_target::~inf_ptrace_target): New.
3246 (inf_ptrace_follow_fork, inf_ptrace_insert_fork_catchpoint)
3247 (inf_ptrace_remove_fork_catchpoint, inf_ptrace_create_inferior)
3248 (inf_ptrace_post_startup_inferior, inf_ptrace_mourn_inferior)
3249 (inf_ptrace_attach, inf_ptrace_post_attach, inf_ptrace_detach)
3250 (inf_ptrace_detach_success, inf_ptrace_kill, inf_ptrace_resume)
3251 (inf_ptrace_wait, inf_ptrace_xfer_partial)
3252 (inf_ptrace_thread_alive, inf_ptrace_files_info)
3253 (inf_ptrace_pid_to_str, inf_ptrace_auxv_parse): Refactor as
3254 methods of inf_ptrace_target.
3255 (inf_ptrace_target): Delete function.
3256 * inf-ptrace.h: Include "inf-child.h".
3257 (inf_ptrace_target): Delete function declaration.
3258 (inf_ptrace_target): New class.
3259 (inf_ptrace_trad_target, inf_ptrace_detach_success): Delete.
3260 * linux-nat.c (linux_target): New.
3261 (linux_ops, linux_ops_saved, super_xfer_partial): Delete.
3262 (linux_nat_target::~linux_nat_target): New.
3263 (linux_child_post_attach, linux_child_post_startup_inferior)
3264 (linux_child_follow_fork, linux_child_insert_fork_catchpoint)
3265 (linux_child_remove_fork_catchpoint)
3266 (linux_child_insert_vfork_catchpoint)
3267 (linux_child_remove_vfork_catchpoint)
3268 (linux_child_insert_exec_catchpoint)
3269 (linux_child_remove_exec_catchpoint)
3270 (linux_child_set_syscall_catchpoint, linux_nat_pass_signals)
3271 (linux_nat_create_inferior, linux_nat_attach, linux_nat_detach)
3272 (linux_nat_resume, linux_nat_stopped_by_watchpoint)
3273 (linux_nat_stopped_data_address)
3274 (linux_nat_stopped_by_sw_breakpoint)
3275 (linux_nat_supports_stopped_by_sw_breakpoint)
3276 (linux_nat_stopped_by_hw_breakpoint)
3277 (linux_nat_supports_stopped_by_hw_breakpoint, linux_nat_wait)
3278 (linux_nat_kill, linux_nat_mourn_inferior)
3279 (linux_nat_xfer_partial, linux_nat_thread_alive)
3280 (linux_nat_update_thread_list, linux_nat_pid_to_str)
3281 (linux_nat_thread_name, linux_child_pid_to_exec_file)
3282 (linux_child_static_tracepoint_markers_by_strid)
3283 (linux_nat_is_async_p, linux_nat_can_async_p)
3284 (linux_nat_supports_non_stop, linux_nat_always_non_stop_p)
3285 (linux_nat_supports_multi_process)
3286 (linux_nat_supports_disable_randomization, linux_nat_async)
3287 (linux_nat_stop, linux_nat_close, linux_nat_thread_address_space)
3288 (linux_nat_core_of_thread, linux_nat_filesystem_is_local)
3289 (linux_nat_fileio_open, linux_nat_fileio_readlink)
3290 (linux_nat_fileio_unlink, linux_nat_thread_events): Refactor as
3291 methods of linux_nat_target.
3292 (linux_nat_wait_1, linux_xfer_siginfo, linux_proc_xfer_partial)
3293 (linux_proc_xfer_spu, linux_nat_xfer_osdata): Remove target_ops
3294 parameter.
3295 (check_stopped_by_watchpoint): Adjust.
3296 (linux_xfer_partial): Delete.
3297 (linux_target_install_ops, linux_target, linux_nat_add_target):
3298 Delete.
3299 (linux_nat_target::linux_nat_target): New.
3300 * linux-nat.h: Include "inf-ptrace.h".
3301 (linux_nat_target): New.
3302 (linux_target, linux_target_install_ops, linux_nat_add_target):
3303 Delete function declarations.
3304 (linux_target): Declare global.
3305 * linux-thread-db.c (thread_db_target): New.
3306 (thread_db_target::thread_db_target): New.
3307 (thread_db_ops): Delete.
3308 (the_thread_db_target): New.
3309 (thread_db_detach, thread_db_wait, thread_db_mourn_inferior)
3310 (thread_db_update_thread_list, thread_db_pid_to_str)
3311 (thread_db_extra_thread_info)
3312 (thread_db_thread_handle_to_thread_info)
3313 (thread_db_get_thread_local_address, thread_db_get_ada_task_ptid)
3314 (thread_db_resume): Refactor as methods of thread_db_target.
3315 (init_thread_db_ops): Delete.
3316 (_initialize_thread_db): Remove reference to init_thread_db_ops.
3317 * x86-linux-nat.c: Don't include "linux-nat.h".
3318 (super_post_startup_inferior): Delete.
3319 (x86_linux_nat_target::~x86_linux_nat_target): New.
3320 (x86_linux_child_post_startup_inferior)
3321 (x86_linux_read_description, x86_linux_enable_btrace)
3322 (x86_linux_disable_btrace, x86_linux_teardown_btrace)
3323 (x86_linux_read_btrace, x86_linux_btrace_conf): Refactor as
3324 methods of x86_linux_nat_target.
3325 (x86_linux_create_target): Delete. Bits folded ...
3326 (x86_linux_add_target): ... here. Now takes a linux_nat_target
3327 pointer.
3328 * x86-linux-nat.h: Include "linux-nat.h" and "x86-nat.h".
3329 (x86_linux_nat_target): New class.
3330 (x86_linux_create_target): Delete.
3331 (x86_linux_add_target): Now takes a linux_nat_target pointer.
3332 * x86-nat.c (x86_insert_watchpoint, x86_remove_watchpoint)
3333 (x86_region_ok_for_watchpoint, x86_stopped_data_address)
3334 (x86_stopped_by_watchpoint, x86_insert_hw_breakpoint)
3335 (x86_remove_hw_breakpoint, x86_can_use_hw_breakpoint)
3336 (x86_stopped_by_hw_breakpoint): Remove target_ops parameter and
3337 make extern.
3338 (x86_use_watchpoints): Delete.
3339 * x86-nat.h: Include "breakpoint.h" and "target.h".
3340 (x86_use_watchpoints): Delete.
3341 (x86_can_use_hw_breakpoint, x86_region_ok_for_hw_watchpoint)
3342 (x86_stopped_by_watchpoint, x86_stopped_data_address)
3343 (x86_insert_watchpoint, x86_remove_watchpoint)
3344 (x86_insert_hw_breakpoint, x86_remove_hw_breakpoint)
3345 (x86_stopped_by_hw_breakpoint): New declarations.
3346 (x86_nat_target): New template class.
3347
3348 * ppc-linux-nat.c (ppc_linux_nat_target): New class.
3349 (the_ppc_linux_nat_target): New.
3350 (ppc_linux_fetch_inferior_registers)
3351 (ppc_linux_can_use_hw_breakpoint)
3352 (ppc_linux_region_ok_for_hw_watchpoint)
3353 (ppc_linux_ranged_break_num_registers)
3354 (ppc_linux_insert_hw_breakpoint, ppc_linux_remove_hw_breakpoint)
3355 (ppc_linux_insert_mask_watchpoint)
3356 (ppc_linux_remove_mask_watchpoint)
3357 (ppc_linux_can_accel_watchpoint_condition)
3358 (ppc_linux_insert_watchpoint, ppc_linux_remove_watchpoint)
3359 (ppc_linux_stopped_data_address, ppc_linux_stopped_by_watchpoint)
3360 (ppc_linux_watchpoint_addr_within_range)
3361 (ppc_linux_masked_watch_num_registers)
3362 (ppc_linux_store_inferior_registers, ppc_linux_auxv_parse)
3363 (ppc_linux_read_description): Refactor as methods of
3364 ppc_linux_nat_target.
3365 (_initialize_ppc_linux_nat): Adjust. Set linux_target.
3366
3367 * procfs.c (procfs_xfer_partial): Delete forward declaration.
3368 (procfs_target): New class.
3369 (the_procfs_target): New.
3370 (procfs_target): Delete function.
3371 (procfs_auxv_parse, procfs_attach, procfs_detach)
3372 (procfs_fetch_registers, procfs_store_registers, procfs_wait)
3373 (procfs_xfer_partial, procfs_resume, procfs_pass_signals)
3374 (procfs_files_info, procfs_kill_inferior, procfs_mourn_inferior)
3375 (procfs_create_inferior, procfs_update_thread_list)
3376 (procfs_thread_alive, procfs_pid_to_str)
3377 (procfs_can_use_hw_breakpoint, procfs_stopped_by_watchpoint)
3378 (procfs_stopped_data_address, procfs_insert_watchpoint)
3379 (procfs_remove_watchpoint, procfs_region_ok_for_hw_watchpoint)
3380 (proc_find_memory_regions, procfs_info_proc)
3381 (procfs_make_note_section): Refactor as methods of procfs_target.
3382 (_initialize_procfs): Adjust.
3383 * sol-thread.c (sol_thread_target): New class.
3384 (sol_thread_ops): Now a sol_thread_target.
3385 (sol_thread_detach, sol_thread_resume, sol_thread_wait)
3386 (sol_thread_fetch_registers, sol_thread_store_registers)
3387 (sol_thread_xfer_partial, sol_thread_mourn_inferior)
3388 (sol_thread_alive, solaris_pid_to_str, sol_update_thread_list)
3389 (sol_get_ada_task_ptid): Refactor as methods of sol_thread_target.
3390 (init_sol_thread_ops): Delete.
3391 (_initialize_sol_thread): Adjust. Remove references to
3392 init_sol_thread_ops and complete_target_initialization.
3393
3394 * windows-nat.c (windows_nat_target): New class.
3395 (windows_fetch_inferior_registers)
3396 (windows_store_inferior_registers, windows_resume, windows_wait)
3397 (windows_attach, windows_detach, windows_pid_to_exec_file)
3398 (windows_files_info, windows_create_inferior)
3399 (windows_mourn_inferior, windows_interrupt, windows_kill_inferior)
3400 (windows_close, windows_pid_to_str, windows_xfer_partial)
3401 (windows_get_tib_address, windows_get_ada_task_ptid)
3402 (windows_thread_name, windows_thread_alive): Refactor as
3403 windows_nat_target methods.
3404 (do_initial_windows_stuff): Adjust.
3405 (windows_target): Delete function.
3406 (_initialize_windows_nat): Adjust.
3407
3408 * darwin-nat.c (darwin_resume, darwin_wait_to, darwin_interrupt)
3409 (darwin_mourn_inferior, darwin_kill_inferior)
3410 (darwin_create_inferior, darwin_attach, darwin_detach)
3411 (darwin_pid_to_str, darwin_thread_alive, darwin_xfer_partial)
3412 (darwin_pid_to_exec_file, darwin_get_ada_task_ptid)
3413 (darwin_supports_multi_process): Refactor as darwin_nat_target
3414 methods.
3415 (darwin_resume_to, darwin_files_info): Delete.
3416 (_initialize_darwin_inferior): Rename to ...
3417 (_initialize_darwin_nat): ... this. Adjust to C++ification.
3418 * darwin-nat.h: Include "inf-child.h".
3419 (darwin_nat_target): New class.
3420 (darwin_complete_target): Delete.
3421 * i386-darwin-nat.c (i386_darwin_nat_target): New class.
3422 (darwin_target): New.
3423 (i386_darwin_fetch_inferior_registers)
3424 (i386_darwin_store_inferior_registers): Refactor as methods of
3425 darwin_nat_target.
3426 (darwin_complete_target): Delete, with ...
3427 (_initialize_i386_darwin_nat): ... bits factored out here.
3428
3429 * alpha-linux-nat.c (alpha_linux_nat_target): New class.
3430 (the_alpha_linux_nat_target): New.
3431 (alpha_linux_register_u_offset): Refactor as
3432 alpha_linux_nat_target method.
3433 (_initialize_alpha_linux_nat): Adjust.
3434 * linux-nat-trad.c (inf_ptrace_register_u_offset): Delete.
3435 (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
3436 (inf_ptrace_store_register, inf_ptrace_store_registers): Refact as
3437 methods of linux_nat_trad_target.
3438 (linux_trad_target): Delete.
3439 * linux-nat-trad.h (linux_trad_target): Delete function.
3440 (linux_nat_trad_target): New class.
3441 * mips-linux-nat.c (mips_linux_nat_target): New class.
3442 (super_fetch_registers, super_store_registers, super_close):
3443 Delete.
3444 (the_mips_linux_nat_target): New.
3445 (mips64_linux_regsets_fetch_registers)
3446 (mips64_linux_regsets_store_registers)
3447 (mips64_linux_fetch_registers, mips64_linux_store_registers)
3448 (mips_linux_register_u_offset, mips_linux_read_description)
3449 (mips_linux_can_use_hw_breakpoint)
3450 (mips_linux_stopped_by_watchpoint)
3451 (mips_linux_stopped_data_address)
3452 (mips_linux_region_ok_for_hw_watchpoint)
3453 (mips_linux_insert_watchpoint, mips_linux_remove_watchpoint)
3454 (mips_linux_close): Refactor as methods of mips_linux_nat.
3455 (_initialize_mips_linux_nat): Adjust to C++ification.
3456
3457 * aix-thread.c (aix_thread_target): New class.
3458 (aix_thread_ops): Now an aix_thread_target.
3459 (aix_thread_detach, aix_thread_resume, aix_thread_wait)
3460 (aix_thread_fetch_registers, aix_thread_store_registers)
3461 (aix_thread_xfer_partial, aix_thread_mourn_inferior)
3462 (aix_thread_thread_alive, aix_thread_pid_to_str)
3463 (aix_thread_extra_thread_info, aix_thread_get_ada_task_ptid):
3464 Refactor as methods of aix_thread_target.
3465 (init_aix_thread_ops): Delete.
3466 (_initialize_aix_thread): Remove references to init_aix_thread_ops
3467 and complete_target_initialization.
3468 * rs6000-nat.c (rs6000_xfer_shared_libraries): Delete.
3469 (rs6000_nat_target): New class.
3470 (the_rs6000_nat_target): New.
3471 (rs6000_fetch_inferior_registers, rs6000_store_inferior_registers)
3472 (rs6000_xfer_partial, rs6000_wait, rs6000_create_inferior)
3473 (rs6000_xfer_shared_libraries): Refactor as rs6000_nat_target methods.
3474 (super_create_inferior): Delete.
3475 (_initialize_rs6000_nat): Adjust to C++ification.
3476
3477 * arm-linux-nat.c (arm_linux_nat_target): New class.
3478 (the_arm_linux_nat_target): New.
3479 (arm_linux_fetch_inferior_registers)
3480 (arm_linux_store_inferior_registers, arm_linux_read_description)
3481 (arm_linux_can_use_hw_breakpoint, arm_linux_insert_hw_breakpoint)
3482 (arm_linux_remove_hw_breakpoint)
3483 (arm_linux_region_ok_for_hw_watchpoint)
3484 (arm_linux_insert_watchpoint, arm_linux_remove_watchpoint)
3485 (arm_linux_stopped_data_address, arm_linux_stopped_by_watchpoint)
3486 (arm_linux_watchpoint_addr_within_range): Refactor as methods of
3487 arm_linux_nat_target.
3488 (_initialize_arm_linux_nat): Adjust to C++ification.
3489
3490 * aarch64-linux-nat.c (aarch64_linux_nat_target): New class.
3491 (the_aarch64_linux_nat_target): New.
3492 (aarch64_linux_fetch_inferior_registers)
3493 (aarch64_linux_store_inferior_registers)
3494 (aarch64_linux_child_post_startup_inferior)
3495 (aarch64_linux_read_description)
3496 (aarch64_linux_can_use_hw_breakpoint)
3497 (aarch64_linux_insert_hw_breakpoint)
3498 (aarch64_linux_remove_hw_breakpoint)
3499 (aarch64_linux_insert_watchpoint, aarch64_linux_remove_watchpoint)
3500 (aarch64_linux_region_ok_for_hw_watchpoint)
3501 (aarch64_linux_stopped_data_address)
3502 (aarch64_linux_stopped_by_watchpoint)
3503 (aarch64_linux_watchpoint_addr_within_range)
3504 (aarch64_linux_can_do_single_step): Refactor as methods of
3505 aarch64_linux_nat_target.
3506 (super_post_startup_inferior): Delete.
3507 (_initialize_aarch64_linux_nat): Adjust to C++ification.
3508
3509 * hppa-linux-nat.c (hppa_linux_nat_target): New class.
3510 (the_hppa_linux_nat_target): New.
3511 (hppa_linux_fetch_inferior_registers)
3512 (hppa_linux_store_inferior_registers): Refactor as methods of
3513 hppa_linux_nat_target.
3514 (_initialize_hppa_linux_nat): Adjust to C++ification.
3515
3516 * ia64-linux-nat.c (ia64_linux_nat_target): New class.
3517 (the_ia64_linux_nat_target): New.
3518 (ia64_linux_insert_watchpoint, ia64_linux_remove_watchpoint)
3519 (ia64_linux_stopped_data_address)
3520 (ia64_linux_stopped_by_watchpoint, ia64_linux_fetch_registers)
3521 (ia64_linux_store_registers, ia64_linux_xfer_partial): Refactor as
3522 ia64_linux_nat_target methods.
3523 (super_xfer_partial): Delete.
3524 (_initialize_ia64_linux_nat): Adjust to C++ification.
3525
3526 * m32r-linux-nat.c (m32r_linux_nat_target): New class.
3527 (the_m32r_linux_nat_target): New.
3528 (m32r_linux_fetch_inferior_registers)
3529 (m32r_linux_store_inferior_registers): Refactor as
3530 m32r_linux_nat_target methods.
3531 (_initialize_m32r_linux_nat): Adjust to C++ification.
3532
3533 * m68k-linux-nat.c (m68k_linux_nat_target): New class.
3534 (the_m68k_linux_nat_target): New.
3535 (m68k_linux_fetch_inferior_registers)
3536 (m68k_linux_store_inferior_registers): Refactor as
3537 m68k_linux_nat_target methods.
3538 (_initialize_m68k_linux_nat): Adjust to C++ification.
3539
3540 * s390-linux-nat.c (s390_linux_nat_target): New class.
3541 (the_s390_linux_nat_target): New.
3542 (s390_linux_fetch_inferior_registers)
3543 (s390_linux_store_inferior_registers, s390_stopped_by_watchpoint)
3544 (s390_insert_watchpoint, s390_remove_watchpoint)
3545 (s390_can_use_hw_breakpoint, s390_insert_hw_breakpoint)
3546 (s390_remove_hw_breakpoint, s390_region_ok_for_hw_watchpoint)
3547 (s390_auxv_parse, s390_read_description): Refactor as methods of
3548 s390_linux_nat_target.
3549 (_initialize_s390_nat): Adjust to C++ification.
3550
3551 * sparc-linux-nat.c (sparc_linux_nat_target): New class.
3552 (the_sparc_linux_nat_target): New.
3553 (_initialize_sparc_linux_nat): Adjust to C++ification.
3554 * sparc-nat.c (sparc_fetch_inferior_registers)
3555 (sparc_store_inferior_registers): Remove target_ops parameter.
3556 * sparc-nat.h (sparc_fetch_inferior_registers)
3557 (sparc_store_inferior_registers): Remove target_ops parameter.
3558 * sparc64-linux-nat.c (sparc64_linux_nat_target): New class.
3559 (the_sparc64_linux_nat_target): New.
3560 (_initialize_sparc64_linux_nat): Adjust to C++ification.
3561
3562 * spu-linux-nat.c (spu_linux_nat_target): New class.
3563 (the_spu_linux_nat_target): New.
3564 (spu_child_post_startup_inferior, spu_child_post_attach)
3565 (spu_child_wait, spu_fetch_inferior_registers)
3566 (spu_store_inferior_registers, spu_xfer_partial)
3567 (spu_can_use_hw_breakpoint): Refactor as spu_linux_nat_target
3568 methods.
3569 (_initialize_spu_nat): Adjust to C++ification.
3570
3571 * tilegx-linux-nat.c (tilegx_linux_nat_target): New class.
3572 (the_tilegx_linux_nat_target): New.
3573 (fetch_inferior_registers, store_inferior_registers):
3574 Refactor as methods.
3575 (_initialize_tile_linux_nat): Adjust to C++ification.
3576
3577 * xtensa-linux-nat.c (xtensa_linux_nat_target): New class.
3578 (the_xtensa_linux_nat_target): New.
3579 (xtensa_linux_fetch_inferior_registers)
3580 (xtensa_linux_store_inferior_registers): Refactor as
3581 xtensa_linux_nat_target methods.
3582 (_initialize_xtensa_linux_nat): Adjust to C++ification.
3583
3584 * fbsd-nat.c (USE_SIGTRAP_SIGINFO): Delete.
3585 (fbsd_pid_to_exec_file, fbsd_find_memory_regions)
3586 (fbsd_find_memory_regions, fbsd_info_proc, fbsd_xfer_partial)
3587 (fbsd_thread_alive, fbsd_pid_to_str, fbsd_thread_name)
3588 (fbsd_update_thread_list, fbsd_resume, fbsd_wait)
3589 (fbsd_stopped_by_sw_breakpoint)
3590 (fbsd_supports_stopped_by_sw_breakpoint, fbsd_follow_fork)
3591 (fbsd_insert_fork_catchpoint, fbsd_remove_fork_catchpoint)
3592 (fbsd_insert_vfork_catchpoint, fbsd_remove_vfork_catchpoint)
3593 (fbsd_post_startup_inferior, fbsd_post_attach)
3594 (fbsd_insert_exec_catchpoint, fbsd_remove_exec_catchpoint)
3595 (fbsd_set_syscall_catchpoint)
3596 (super_xfer_partial, super_resume, super_wait)
3597 (fbsd_supports_stopped_by_hw_breakpoint): Delete.
3598 (fbsd_handle_debug_trap): Remove target_ops parameter.
3599 (fbsd_nat_add_target): Delete.
3600 * fbsd-nat.h: Include "inf-ptrace.h".
3601 (fbsd_nat_add_target): Delete.
3602 (USE_SIGTRAP_SIGINFO): Define.
3603 (fbsd_nat_target): New class.
3604
3605 * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers)
3606 (amd64bsd_store_inferior_registers): Remove target_ops parameter.
3607 (amd64bsd_target): Delete.
3608 * amd64-bsd-nat.h: New file.
3609 * amd64-fbsd-nat.c: Include "amd64-bsd-nat.h" instead of
3610 "x86-bsd-nat.h".
3611 (amd64_fbsd_nat_target): New class.
3612 (the_amd64_fbsd_nat_target): New.
3613 (amd64fbsd_read_description): Refactor as method of
3614 amd64_fbsd_nat_target.
3615 (amd64_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
3616 (_initialize_amd64fbsd_nat): Adjust to C++ification.
3617 * amd64-nat.h (amd64bsd_target): Delete function declaration.
3618 * i386-bsd-nat.c (i386bsd_fetch_inferior_registers)
3619 (i386bsd_store_inferior_registers): Remove target_ops parameter.
3620 (i386bsd_target): Delete.
3621 * i386-bsd-nat.h (i386bsd_target): Delete function declaration.
3622 (i386bsd_fetch_inferior_registers)
3623 (i386bsd_store_inferior_registers): Declare.
3624 (i386_bsd_nat_target): New class.
3625 * i386-fbsd-nat.c (i386_fbsd_nat_target): New class.
3626 (the_i386_fbsd_nat_target): New.
3627 (i386fbsd_resume, i386fbsd_read_description): Refactor as
3628 i386_fbsd_nat_target methods.
3629 (i386_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
3630 (_initialize_i386fbsd_nat): Adjust to C++ification.
3631 * x86-bsd-nat.c (super_mourn_inferior): Delete.
3632 (x86bsd_mourn_inferior, x86bsd_target): Delete.
3633 (_initialize_x86_bsd_nat): Adjust to C++ification.
3634 * x86-bsd-nat.h: Include "x86-nat.h".
3635 (x86bsd_target): Delete declaration.
3636 (x86bsd_nat_target): New class.
3637
3638 * aarch64-fbsd-nat.c (aarch64_fbsd_nat_target): New class.
3639 (the_aarch64_fbsd_nat_target): New.
3640 (aarch64_fbsd_fetch_inferior_registers)
3641 (aarch64_fbsd_store_inferior_registers): Refactor as methods of
3642 aarch64_fbsd_nat_target.
3643 (_initialize_aarch64_fbsd_nat): Adjust to C++ification.
3644 * alpha-bsd-nat.c (alpha_bsd_nat_target): New class.
3645 (the_alpha_bsd_nat_target): New.
3646 (alphabsd_fetch_inferior_registers)
3647 (alphabsd_store_inferior_registers): Refactor as
3648 alpha_bsd_nat_target methods.
3649 (_initialize_alphabsd_nat): Refactor as methods of
3650 alpha_bsd_nat_target.
3651 * amd64-nbsd-nat.c: Include "amd64-bsd-nat.h".
3652 (the_amd64_nbsd_nat_target): New.
3653 (_initialize_amd64nbsd_nat): Adjust to C++ification.
3654 * amd64-obsd-nat.c: Include "amd64-bsd-nat.h".
3655 (the_amd64_obsd_nat_target): New.
3656 (_initialize_amd64obsd_nat): Adjust to C++ification.
3657 * arm-fbsd-nat.c (arm_fbsd_nat_target): New.
3658 (the_arm_fbsd_nat_target): New.
3659 (arm_fbsd_fetch_inferior_registers)
3660 (arm_fbsd_store_inferior_registers, arm_fbsd_read_description):
3661 (_initialize_arm_fbsd_nat): Refactor as methods of
3662 arm_fbsd_nat_target.
3663 (_initialize_arm_fbsd_nat): Adjust to C++ification.
3664 * arm-nbsd-nat.c (arm_netbsd_nat_target): New class.
3665 (the_arm_netbsd_nat_target): New.
3666 (armnbsd_fetch_registers, armnbsd_store_registers): Refactor as
3667 arm_netbsd_nat_target.
3668 (_initialize_arm_netbsd_nat): Adjust to C++ification.
3669 * hppa-nbsd-nat.c (hppa_nbsd_nat_target): New class.
3670 (the_hppa_nbsd_nat_target): New.
3671 (hppanbsd_fetch_registers, hppanbsd_store_registers): Refactor as
3672 hppa_nbsd_nat_target methods.
3673 (_initialize_hppanbsd_nat): Adjust to C++ification.
3674 * hppa-obsd-nat.c (hppa_obsd_nat_target): New class.
3675 (the_hppa_obsd_nat_target): New.
3676 (hppaobsd_fetch_registers, hppaobsd_store_registers): Refactor as
3677 methods of hppa_obsd_nat_target.
3678 (_initialize_hppaobsd_nat): Adjust to C++ification. Use
3679 add_target.
3680 * i386-nbsd-nat.c (the_i386_nbsd_nat_target): New.
3681 (_initialize_i386nbsd_nat): Adjust to C++ification. Use
3682 add_target.
3683 * i386-obsd-nat.c (the_i386_obsd_nat_target): New.
3684 (_initialize_i386obsd_nat): Use add_target.
3685 * m68k-bsd-nat.c (m68k_bsd_nat_target): New class.
3686 (the_m68k_bsd_nat_target): New.
3687 (m68kbsd_fetch_inferior_registers)
3688 (m68kbsd_store_inferior_registers): Refactor as methods of
3689 m68k_bsd_nat_target.
3690 (_initialize_m68kbsd_nat): Adjust to C++ification.
3691 * mips-fbsd-nat.c (mips_fbsd_nat_target): New class.
3692 (the_mips_fbsd_nat_target): New.
3693 (mips_fbsd_fetch_inferior_registers)
3694 (mips_fbsd_store_inferior_registers): Refactor as methods of
3695 mips_fbsd_nat_target.
3696 (_initialize_mips_fbsd_nat): Adjust to C++ification. Use
3697 add_target.
3698 * mips-nbsd-nat.c (mips_nbsd_nat_target): New class.
3699 (the_mips_nbsd_nat_target): New.
3700 (mipsnbsd_fetch_inferior_registers)
3701 (mipsnbsd_store_inferior_registers): Refactor as methods of
3702 mips_nbsd_nat_target.
3703 (_initialize_mipsnbsd_nat): Adjust to C++ification.
3704 * mips64-obsd-nat.c (mips64_obsd_nat_target): New class.
3705 (the_mips64_obsd_nat_target): New.
3706 (mips64obsd_fetch_inferior_registers)
3707 (mips64obsd_store_inferior_registers): Refactor as methods of
3708 mips64_obsd_nat_target.
3709 (_initialize_mips64obsd_nat): Adjust to C++ification. Use
3710 add_target.
3711 * nbsd-nat.c (nbsd_pid_to_exec_file): Refactor as method of
3712 nbsd_nat_target.
3713 * nbsd-nat.h: Include "inf-ptrace.h".
3714 (nbsd_nat_target): New class.
3715 * obsd-nat.c (obsd_pid_to_str, obsd_update_thread_list)
3716 (obsd_wait): Refactor as methods of obsd_nat_target.
3717 (obsd_add_target): Delete.
3718 * obsd-nat.h: Include "inf-ptrace.h".
3719 (obsd_nat_target): New class.
3720 * ppc-fbsd-nat.c (ppc_fbsd_nat_target): New class.
3721 (the_ppc_fbsd_nat_target): New.
3722 (ppcfbsd_fetch_inferior_registers)
3723 (ppcfbsd_store_inferior_registers): Refactor as methods of
3724 ppc_fbsd_nat_target.
3725 (_initialize_ppcfbsd_nat): Adjust to C++ification. Use
3726 add_target.
3727 * ppc-nbsd-nat.c (ppc_nbsd_nat_target): New class.
3728 (the_ppc_nbsd_nat_target): New.
3729 (ppcnbsd_fetch_inferior_registers)
3730 (ppcnbsd_store_inferior_registers): Refactor as methods of
3731 ppc_nbsd_nat_target.
3732 (_initialize_ppcnbsd_nat): Adjust to C++ification.
3733 * ppc-obsd-nat.c (ppc_obsd_nat_target): New class.
3734 (the_ppc_obsd_nat_target): New.
3735 (ppcobsd_fetch_registers, ppcobsd_store_registers): Refactor as
3736 methods of ppc_obsd_nat_target.
3737 (_initialize_ppcobsd_nat): Adjust to C++ification. Use
3738 add_target.
3739 * sh-nbsd-nat.c (sh_nbsd_nat_target): New class.
3740 (the_sh_nbsd_nat_target): New.
3741 (shnbsd_fetch_inferior_registers)
3742 (shnbsd_store_inferior_registers): Refactor as methods of
3743 sh_nbsd_nat_target.
3744 (_initialize_shnbsd_nat): Adjust to C++ification.
3745 * sparc-nat.c (sparc_xfer_wcookie): Make extern.
3746 (inf_ptrace_xfer_partial): Delete.
3747 (sparc_xfer_partial, sparc_target): Delete.
3748 * sparc-nat.h (sparc_fetch_inferior_registers)
3749 (sparc_store_inferior_registers, sparc_xfer_wcookie): Declare.
3750 (sparc_target): Delete function declaration.
3751 (sparc_target): New template class.
3752 * sparc-nbsd-nat.c (the_sparc_nbsd_nat_target): New.
3753 (_initialize_sparcnbsd_nat): Adjust to C++ification.
3754 * sparc64-fbsd-nat.c (the_sparc64_fbsd_nat_target): New.
3755 (_initialize_sparc64fbsd_nat): Adjust to C++ification. Use
3756 add_target.
3757 * sparc64-nbsd-nat.c (the_sparc64_nbsd_nat_target): New.
3758 (_initialize_sparc64nbsd_nat): Adjust to C++ification.
3759 * sparc64-obsd-nat.c (the_sparc64_obsd_nat_target): New.
3760 (_initialize_sparc64obsd_nat): Adjust to C++ification. Use
3761 add_target.
3762 * vax-bsd-nat.c (vax_bsd_nat_target): New class.
3763 (the_vax_bsd_nat_target): New.
3764 (vaxbsd_fetch_inferior_registers)
3765 (vaxbsd_store_inferior_registers): Refactor as vax_bsd_nat_target
3766 methods.
3767 (_initialize_vaxbsd_nat): Adjust to C++ification.
3768
3769 * bsd-kvm.c (bsd_kvm_target): New class.
3770 (bsd_kvm_ops): Now a bsd_kvm_target.
3771 (bsd_kvm_open, bsd_kvm_close, bsd_kvm_xfer_partial)
3772 (bsd_kvm_files_info, bsd_kvm_fetch_registers)
3773 (bsd_kvm_thread_alive, bsd_kvm_pid_to_str): Refactor as methods of
3774 bsd_kvm_target.
3775 (bsd_kvm_return_one): Delete.
3776 (bsd_kvm_add_target): Adjust to C++ification.
3777
3778 * nto-procfs.c (nto_procfs_target, nto_procfs_target_native)
3779 (nto_procfs_target_procfs): New classes.
3780 (procfs_open_1, procfs_thread_alive, procfs_update_thread_list)
3781 (procfs_files_info, procfs_pid_to_exec_file, procfs_attach)
3782 (procfs_post_attach, procfs_wait, procfs_fetch_registers)
3783 (procfs_xfer_partial, procfs_detach, procfs_insert_breakpoint)
3784 (procfs_remove_breakpoint, procfs_insert_hw_breakpoint)
3785 (procfs_remove_hw_breakpoint, procfs_resume)
3786 (procfs_mourn_inferior, procfs_create_inferior, procfs_interrupt)
3787 (procfs_kill_inferior, procfs_store_registers)
3788 (procfs_pass_signals, procfs_pid_to_str, procfs_can_run): Refactor
3789 as methods of nto_procfs_target.
3790 (nto_procfs_ops): Now an nto_procfs_target_procfs.
3791 (nto_native_ops): Delete.
3792 (procfs_open, procfs_native_open): Delete.
3793 (nto_native_ops): Now an nto_procfs_target_native.
3794 (init_procfs_targets): Adjust to C++ification.
3795 (procfs_can_use_hw_breakpoint, procfs_remove_hw_watchpoint)
3796 (procfs_insert_hw_watchpoint, procfs_stopped_by_watchpoint):
3797 Refactor as methods of nto_procfs_target.
3798
3799 * go32-nat.c (go32_nat_target): New class.
3800 (the_go32_nat_target): New.
3801 (go32_attach, go32_resume, go32_wait, go32_fetch_registers)
3802 (go32_store_registers, go32_xfer_partial, go32_files_info)
3803 (go32_kill_inferior, go32_create_inferior, go32_mourn_inferior)
3804 (go32_terminal_init, go32_terminal_info, go32_terminal_inferior)
3805 (go32_terminal_ours, go32_pass_ctrlc, go32_thread_alive)
3806 (go32_pid_to_str): Refactor as methods of go32_nat_target.
3807 (go32_target): Delete.
3808 (_initialize_go32_nat): Adjust to C++ification.
3809
3810 * gnu-nat.c (gnu_wait, gnu_resume, gnu_kill_inferior)
3811 (gnu_mourn_inferior, gnu_create_inferior, gnu_attach, gnu_detach)
3812 (gnu_stop, gnu_thread_alive, gnu_xfer_partial)
3813 (gnu_find_memory_regions, gnu_pid_to_str): Refactor as methods of
3814 gnu_nat_target.
3815 (gnu_target): Delete.
3816 * gnu-nat.h (gnu_target): Delete.
3817 (gnu_nat_target): New class.
3818 * i386-gnu-nat.c (gnu_base_target): New.
3819 (i386_gnu_nat_target): New class.
3820 (the_i386_gnu_nat_target): New.
3821 (_initialize_i386gnu_nat): Adjust to C++ification.
3822
3823 2018-05-02 Pedro Alves <palves@redhat.com>
3824
3825 * bfd-target.c (target_bfd_xclose): Rename to ...
3826 (target_bfd_close): ... this.
3827 (target_bfd_reopen): Adjust.
3828 * target.c (target_close): Remove references to to_xclose.
3829 * target.h (target_ops::to_xclose): Delete.
3830 (target_ops::to_close): Update comments.
3831
3832 2018-05-02 Pedro Alves <palves@redhat.com>
3833
3834 * alpha-linux-nat.c: Include "linux-nat-trad.h" instead of
3835 "linux-nat.h".
3836 * configure.nat (alpha-linux, linux-mips): Add linux-nat-trad.o.
3837 * inf-ptrace.c (inf_ptrace_register_u_offset)
3838 (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
3839 (inf_ptrace_store_register, inf_ptrace_store_registers)
3840 (inf_ptrace_trad_target): Move to ...
3841 * linux-nat-trad.c: ... this new file.
3842 * linux-nat-trad.h: New file.
3843 * linux-nat.c (linux_target_install_ops): Make extern.
3844 (linux_trad_target): Delete.
3845 * linux-nat.h (linux_trad_target): Delete declaration.
3846 (linux_target_install_ops): Declare.
3847 * mips-linux-nat.c: Include "linux-nat-trad.h" instead of
3848 "linux-nat.h".
3849
3850 2018-05-02 Pedro Alves <palves@redhat.com>
3851
3852 * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
3853 procfs_target/add_target here.
3854 * procfs.c (procfs_target): Make static.
3855 (_initialize_procfs): Call add_target here.
3856 * procfs.h (struct target_ops): Remove forward declaration.
3857 (procfs_target): Remove declaration.
3858 * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Delete.
3859
3860 2018-05-02 Pedro Alves <palves@redhat.com>
3861
3862 * procfs.c (procfs_stopped_by_watchpoint)
3863 (procfs_insert_watchpoint, procfs_remove_watchpoint)
3864 (procfs_region_ok_for_hw_watchpoint, procfs_stopped_data_address):
3865 Forward declare.
3866 (procfs_use_watchpoints): Delete, move contents...
3867 (procfs_target): ... here.
3868 * procfs.h (procfs_use_watchpoints): Delete declaration.
3869 * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
3870 procfs_use_watchpoints.
3871 * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Don't call
3872 procfs_use_watchpoints.
3873
3874 2018-05-02 Tom Tromey <tom@tromey.com>
3875
3876 PR python/20084:
3877 * python/python.c (gdbpy_parameter_value): Handle var_zuinteger
3878 and var_zuinteger_unlimited.
3879 * python/py-param.c (struct parm_constant): Add PARAM_ZUINTEGER
3880 and PARAM_ZUINTEGER_UNLIMITED.
3881 (set_parameter_value): Handle var_zuinteger and
3882 var_zuinteger_unlimited.
3883 (add_setshow_generic): Likewise.
3884 (parmpy_init): Likewise.
3885
3886 2018-04-28 Dan Robertson <danlrobertson89@gmail.com>
3887
3888 PR rust/23124
3889 * gdb/rust-exp.y (convert_params_to_types): Ensure that the params
3890 pointer is not null before dereferencing it.
3891
3892 2018-04-30 Tom Tromey <tom@tromey.com>
3893
3894 * darwin-nat-info.c (darwin_debug_regions_recurse): Remove use of
3895 is_mi_like_p.
3896
3897 2018-04-30 Tom Tromey <tom@tromey.com>
3898
3899 * breakpoint.c (mention): Remove use of is_mi_like_p.
3900 (print_mention_ranged_breakpoint): Likewise.
3901 * break-catch-throw.c (print_it_exception_catchpoint): Remove use
3902 of is_mi_like_p.
3903
3904 2018-04-30 Tom Tromey <tom@tromey.com>
3905
3906 * tracepoint.c (tvariables_info_1): Remove use of is_mi_like_p.
3907
3908 2018-04-30 Tom Tromey <tom@tromey.com>
3909
3910 * spu-tdep.c (info_spu_mailbox_list, info_spu_dma_cmdlist)
3911 (info_spu_event_command): Remove some uses of is_mi_like_p.
3912
3913 2018-04-30 Tom Tromey <tom@tromey.com>
3914
3915 * python/py-framefilter.c (py_print_single_arg)
3916 (enumerate_locals, py_print_args, py_print_frame): Remove some
3917 uses of is_mi_like_p.
3918
3919 2018-04-30 Tom Tromey <tom@tromey.com>
3920
3921 * ui-out.c: Update.
3922 * cli-out.h (cli_ui_out::do_is_mi_like_p): Update.
3923 * ui-out.h (ui_out::is_mi_like_p): Now const.
3924 (ui_out::do_is_mi_like_p): Now const.
3925 * mi/mi-out.h (mi_ui_out::do_is_mi_like_p): Update.
3926
3927 2018-04-30 Tom Tromey <tom@tromey.com>
3928
3929 * varobj.c (varobj_set_visualizer): Use new_reference.
3930 * python/python.c (gdbpy_decode_line): Use new_reference.
3931 * python/py-cmd.c (cmdpy_function, cmdpy_completer_helper): Use
3932 new_reference.
3933
3934 2018-04-30 Tom Tromey <tom@tromey.com>
3935
3936 * varobj.c (install_new_value): Use new_reference.
3937 * value.h (value_incref): Return void. Swap intro comment with
3938 value_decref.
3939 * value.c (set_value_parent): Use new_reference.
3940 (value_incref): Return void. Update intro comment.
3941 (release_value): Use new_reference.
3942 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Use new_reference.
3943
3944 2018-04-30 Tom Tromey <tom@tromey.com>
3945
3946 * symfile-mem.c (symbol_file_add_from_memory): Use new_reference.
3947 * gdb_bfd.h (new_bfd_ref): Remove.
3948 (gdb_bfd_open): Update comment.
3949 * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
3950 (gdb_bfd_openw, gdb_bfd_openr_iovec, gdb_bfd_record_inclusion)
3951 (gdb_bfd_fdopenr): Use new_reference.
3952 * exec.c (exec_file_attach): Use new_reference.
3953
3954 2018-04-30 Tom Tromey <tom@tromey.com>
3955
3956 * common/gdb_ref_ptr.h (ref_ptr::new_reference): New static
3957 method.
3958
3959 2018-04-30 Tom Tromey <tom@tromey.com>
3960
3961 * jit.c (jit_read_code_entry): Use type_align.
3962 * i386-tdep.c (i386_gdbarch_init): Don't call
3963 set_gdbarch_long_long_align_bit.
3964 * gdbarch.sh: Remove long_long_align_bit.
3965 * gdbarch.c, gdbarch.h: Rebuild.
3966 * arc-tdep.c (arc_type_align): New function.
3967 (arc_gdbarch_init): Use arc_type_align. Don't call
3968 set_gdbarch_long_long_align_bit.
3969
3970 2018-04-30 Tom Tromey <tom@tromey.com>
3971
3972 * rust-lang.c (rust_type_alignment): Remove.
3973 (rust_composite_type): Use type_align.
3974
3975 2018-04-30 Tom Tromey <tom@tromey.com>
3976
3977 * NEWS: Mention Type.align.
3978 * python/py-type.c (typy_get_alignof): New function.
3979 (type_object_getset): Add "alignof".
3980
3981 2018-04-30 Tom Tromey <tom@tromey.com>
3982
3983 PR exp/17095:
3984 * NEWS: Update.
3985 * std-operator.def (UNOP_ALIGNOF): New operator.
3986 * expprint.c (dump_subexp_body_standard) <case UNOP_ALIGNOF>:
3987 New.
3988 * eval.c (evaluate_subexp_standard) <case UNOP_ALIGNOF>: New.
3989 * c-lang.c (c_op_print_tab): Add alignof.
3990 * c-exp.y (ALIGNOF): New token.
3991 (exp): Add "ALIGNOF" production.
3992 (ident_tokens): Add _Alignof and alignof.
3993
3994 2018-04-30 Tom Tromey <tom@tromey.com>
3995
3996 * i386-tdep.c (i386_type_align): New function.
3997 (i386_gdbarch_init): Update.
3998 * gdbarch.sh (type_align): New method.
3999 * gdbarch.c, gdbarch.h: Rebuild.
4000 * arch-utils.h (default_type_align): Declare.
4001 * arch-utils.c (default_type_align): New function.
4002 * gdbtypes.h (TYPE_ALIGN_BITS): New define.
4003 (struct type) <align_log2>: New field.
4004 <instance_flags>: Now a bitfield.
4005 (TYPE_RAW_ALIGN): New macro.
4006 (type_align, type_raw_align, set_type_align): Declare.
4007 * gdbtypes.c (type_align, type_raw_align, set_type_align): New
4008 functions.
4009 * dwarf2read.c (quirk_rust_enum): Set type alignment.
4010 (get_alignment, maybe_set_alignment): New functions.
4011 (read_structure_type, read_enumeration_type, read_array_type)
4012 (read_set_type, read_tag_pointer_type, read_tag_reference_type)
4013 (read_subrange_type, read_base_type): Set type alignment.
4014
4015 2018-04-30 Simon Marchi <simon.marchi@ericsson.com>
4016
4017 * dwarf2read.c (read_index_from_section): Use bool.
4018
4019 2018-04-29 Fabian Groffen <grobian@gentoo.org>
4020
4021 PR gdb/22950
4022 * proc-events.c (init_syscall_table): Guard usage os SYS_uuidsys
4023 with #ifdef.
4024
4025 2018-04-29 John Reiser <jreiser@BitWagon.com>
4026
4027 PR build/22873
4028 * gdb/Makefile.in: (.c:.l, .c:.y): Write the target only in the
4029 last step, and do it atomically.
4030
4031 2018-04-27 Alexandre Oliva <aoliva@redhat.com>
4032
4033 * compile/compile-c-types.c (convert_int, convert_float):
4034 Update for C FE v1.
4035
4036 2018-04-27 Tom Tromey <tom@tromey.com>
4037
4038 PR rust/22545:
4039 * rust-lang.c (rust_inclusive_range_type_p): New function.
4040 (rust_range): Handle inclusive ranges.
4041 (rust_compute_range): Likewise.
4042 * rust-exp.y (struct rust_op) <inclusive>: New field.
4043 (DOTDOTEQ): New constant.
4044 (range_expr): Add "..=" productions.
4045 (operator_tokens): Add "..=" token.
4046 (ast_range): Add "inclusive" parameter.
4047 (convert_ast_to_expression) <case OP_RANGE>: Handle inclusive
4048 ranges.
4049 * parse.c (operator_length_standard) <case OP_RANGE>: Handle new
4050 bounds values.
4051 * expression.h (enum range_type) <NONE_BOUND_DEFAULT_EXCLUSIVE,
4052 LOW_BOUND_DEFAULT_EXCLUSIVE>: New constants.
4053 Update comments.
4054 * expprint.c (print_subexp_standard): Handle new bounds values.
4055 (dump_subexp_body_standard): Likewise.
4056
4057 2018-04-27 Tom Tromey <tom@tromey.com>
4058
4059 * configure: Rebuild.
4060 * warning.m4 (AM_GDB_WARNINGS): Add -Wsuggest-override.
4061 * dwarf2loc.c (class dwarf_evaluate_loc_desc): Use "override", not
4062 "OVERRIDE".
4063 (class symbol_needs_eval_context): Likewise.
4064 * dwarf2read.c (mock_mapped_index::symbol_name_count)
4065 (mock_mapped_index::symbol_name_at): Use "override". Remove
4066 "virtual".
4067 * dwarf2-frame.c (dwarf_expr_executor::get_addr_index): Use
4068 "override".
4069 (class dwarf_expr_executor): Use "override", not "OVERRIDE".
4070 * aarch64-tdep.c (instruction_reader::read): Use "override".
4071 (instruction_reader_test::read): Likewise.
4072 * arm-tdep.c (instruction_reader::read): Use "override".
4073 (instruction_reader_thumb::read): Likewise.
4074
4075 2018-04-26 Andrzej Kaczmarek <andrzej.kaczmarek@codecoup.pl>
4076
4077 PR remote/9665
4078 * remote.c (send_g_packet): Use putpkt/getpkt/packet_check_result
4079 instead of remote_send.
4080 (remote_send): Remove.
4081
4082 2018-04-26 Pedro Alves <palves@redhat.com>
4083
4084 * elfread.c (elf_gnu_ifunc_resolver_return_stop): Use
4085 find_function_start_sal instead of find_pc_line.
4086
4087 2018-04-26 Pedro Alves <palves@redhat.com>
4088
4089 * breakpoint.c (set_breakpoint_location_function): Handle
4090 mst_data_gnu_ifunc.
4091 * c-exp.y (variable production): Handle mst_data_gnu_ifunc.
4092 * elfread.c (elf_symtab_read): Give data symbols with
4093 BSF_GNU_INDIRECT_FUNCTION set mst_data_gnu_ifunc type.
4094 (elf_rel_plt_read): Update comment.
4095 * linespec.c (convert_linespec_to_sals): Handle
4096 mst_data_gnu_ifunc.
4097 (minsym_found): Handle mst_data_gnu_ifunc.
4098 * minsyms.c (msymbol_is_function, minimal_symbol_reader::record)
4099 (find_solib_trampoline_target): Handle mst_data_gnu_ifunc.
4100 * parse.c (find_minsym_type_and_address): Handle
4101 mst_data_gnu_ifunc.
4102 * symmisc.c (dump_msymbols): Handle mst_data_gnu_ifunc.
4103 * symtab.c (find_gnu_ifunc): Handle mst_data_gnu_ifunc.
4104 * symtab.h (minimal_symbol_type) <mst_text_gnu_ifunc>: Update
4105 comment.
4106 <mst_data_gnu_ifunc>: New enumerator.
4107
4108 2018-04-26 Pedro Alves <palves@redhat.com>
4109
4110 * minsyms.c (lookup_minimal_symbol_by_pc_section_1): Rename to ...
4111 (lookup_minimal_symbol_by_pc_section): ... this. Replace
4112 'want_trampoline' parameter by a lookup_msym_prefer parameter.
4113 Handle it.
4114 (lookup_minimal_symbol_by_pc_section): Delete old implementation.
4115 (lookup_minimal_symbol_by_pc): Adjust.
4116 (in_gnu_ifunc_stub): Prefer GNU ifunc symbols.
4117 (lookup_solib_trampoline_symbol_by_pc): Adjust.
4118 * minsyms.h (lookup_msym_prefer): New enum.
4119 (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
4120 parameter by a lookup_msym_prefer parameter.
4121
4122 2018-04-26 Pedro Alves <palves@redhat.com>
4123
4124 * elfread.c (elf_gnu_ifunc_record_cache): Check if the symbol name
4125 ends in "@plt" instead of looking at the symbol's section.
4126
4127 2018-04-26 Pedro Alves <palves@redhat.com>
4128
4129 * blockframe.c (cache_pc_function_is_gnu_ifunc): Delete. Remove
4130 all references.
4131 (find_pc_partial_function_gnu_ifunc): Rename to ...
4132 (find_pc_partial_function): ... this, and remove references to
4133 'is_gnu_ifunc_p'.
4134 (find_pc_partial_function): Delete old implementation.
4135 * symtab.h (find_pc_partial_function_gnu_ifunc): Delete.
4136
4137 2018-04-26 Pedro Alves <palves@redhat.com>
4138
4139 * linespec.c (struct bound_minimal_symbol_search_key): New.
4140 (convert_linespec_to_sals): Sort minimal symbols earlier. Don't
4141 skip first line if we found a GNU ifunc minimal symbol by name.
4142 (compare_msymbols): Change parameters to work with a destructured
4143 lhs minsym.
4144 (compare_msymbols_for_qsort, compare_msymbols_for_bsearch): New
4145 functions.
4146
4147 2018-04-26 Pedro Alves <palves@redhat.com>
4148
4149 * breakpoint.c (set_breakpoint_location_function): Don't resolve
4150 ifunc targets here. Instead, if we have an ifunc minsym, use its
4151 address/name.
4152 (add_location_to_breakpoint): Store the minsym and the objfile in
4153 the breakpoint location.
4154 * breakpoint.h (bp_location) <msymbol, objfile>: New fields.
4155 * linespec.c (minsym_found): Resolve GNU ifunc targets here.
4156 Record the minsym in the sal.
4157 * symtab.h (symtab_and_line) <msymbol>: New field.
4158
4159 2018-04-26 Pedro Alves <palves@redhat.com>
4160
4161 * elfread.c (elf_gnu_ifunc_resolve_by_got): Don't write to *ADDR_P
4162 unless we actually resolved the ifunc.
4163
4164 2018-04-26 Pedro Alves <palves@redhat.com>
4165
4166 * c-exp.y (variable production): Prefer ifunc minsyms over
4167 regular function symbols.
4168 * symtab.c (find_gnu_ifunc): New function.
4169 * minsyms.h (lookup_msym_prefer): New enum.
4170 (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
4171 parameter by a lookup_msym_prefer parameter.
4172 * symtab.h (find_gnu_ifunc): New declaration.
4173
4174 2018-04-26 Pedro Alves <palves@redhat.com>
4175
4176 * blockframe.c (find_gnu_ifunc_target_type): New function.
4177 (find_function_type): New.
4178 * eval.c (evaluate_var_msym_value): For GNU ifunc types, always
4179 return a value with a memory address.
4180 (eval_call): For calls to GNU ifunc functions, try to find the
4181 type of the target function from the type that the resolver
4182 returns.
4183 * gdbtypes.c (objfile_type): Don't install a return type for ifunc
4184 symbols.
4185 * infcall.c (find_function_return_type): Delete.
4186 (find_function_addr): Add 'function_type' parameter. For calls to
4187 GNU ifunc functions, try to find the type of the target function
4188 from the type that the resolver returns, and return it via
4189 FUNCTION_TYPE.
4190 (call_function_by_hand_dummy): Adjust to use the function type
4191 returned by find_function_addr.
4192 (find_function_addr): Add 'function_type' parameter and move
4193 description here.
4194 * symtab.h (find_function_type, find_gnu_ifunc_target_type): New
4195 declarations.
4196
4197 2018-04-26 Pedro Alves <palves@redhat.com>
4198
4199 * c-exp.y (variable production): Skip finding an alias for ifunc
4200 symbols.
4201
4202 2018-04-26 Pedro Alves <palves@redhat.com>
4203
4204 * elfread.c (elf_rel_plt_read): Look for relocations for .got.plt too.
4205
4206 2018-04-25 Pedro Alves <palves@redhat.com>
4207
4208 * infcmd.c (kill_command): Print the pid as string, not the whole
4209 thread's ptid. Add comment. s/has been killed/killed/ in output
4210 message.
4211 * remote.c (remote_detach_1): Print the pid as string, not the
4212 whole thread's ptid.
4213
4214 2018-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
4215 Sergio Durigan Junior <sergiodj@redhat.com>
4216 Pedro Alves <palves@redhat.com>
4217
4218 * infcmd.c (kill_command): Print message when inferior has
4219 been killed.
4220 * inferior.c (print_inferior_events): Remove 'static'. Set as
4221 '1'.
4222 (add_inferior): Improve message printed when
4223 'print_inferior_events' is on.
4224 (exit_inferior): Remove message printed when
4225 'print_inferior_events' is on.
4226 (detach_inferior): Improve message printed when
4227 'print_inferior_events' is on.
4228 (initialize_inferiors): Use 'add_inferior_silent' to set
4229 'current_inferior_'.
4230 * inferior.h (print_inferior_events): Declare here as
4231 'extern'.
4232 * infrun.c (follow_fork_inferior): Print '[Attaching...]' or
4233 '[Detaching...]' messages when 'print_inferior_events' is on.
4234 Use 'add_thread_silent' instead of 'add_thread'. Add '[' and ']'
4235 as prefix/suffix for messages. Remove periods. Fix erroneous
4236 'Detaching after fork from child...', replace it by '... from
4237 parent...'.
4238 (handle_vfork_child_exec_or_exit): Add '[' and ']' as
4239 prefix/suffix when printing 'Detaching...' messages. Print
4240 them when 'print_inferior_events' is on.
4241 * remote.c (remote_detach_1): Print message when detaching
4242 from inferior and '!is_fork_parent'.
4243
4244 2018-04-24 Tom Tromey <tom@tromey.com>
4245
4246 * cli-out.h: Reindent.
4247
4248 2018-04-24 Tom Tromey <tom@tromey.com>
4249
4250 * cli-out.c (cli_ui_out::out_field_fmt): Remove.
4251 (cli_ui_out::do_field_string): Use fputs_filtered.
4252 * cli-out.h (class cli_ui_out) <out_field_fmt>: Remove.
4253
4254 2018-04-23 Tom Tromey <tom@tromey.com>
4255
4256 * guile/scm-frame.c (gdbscm_frame_read_var): Use
4257 gdb::unique_xmalloc_ptr.
4258
4259 2018-04-23 Tom Tromey <tom@tromey.com>
4260
4261 * configure: Rebuild.
4262
4263 2018-04-22 Rajendra SY <rajendra.sy@gmail.com>
4264
4265 PR gdb/23095
4266 * gdb/testsuite/gdb.base/break-probes.exp: Pass shlib_load to
4267 prepare_for_testing. Set normal_bp to r_debug_state if target
4268 is bsd.
4269
4270 2018-04-21 Pedro Alves <palves@redhat.com>
4271 Rajendra SY <rajendra.sy@gmail.com>
4272
4273 * inf-ptrace.c (inf_ptrace_attach): Mark the thread as executing.
4274 * remote.c (extended_remote_attach): In all-stop mode, mark the
4275 thread as executing.
4276
4277 2018-04-19 Philippe Waroquiers <philippe.waroquiers@skynet.be>
4278
4279 * thread.c (thread_apply_all_command): Fix comment.
4280 (thread_command): Fix comment.
4281
4282 2018-04-10 Alan Hayward <alan.hayward@arm.com>
4283
4284 * common/tdesc.h (tdesc_create_feature): Remove xml filename
4285 parameter.
4286 * features/aarch64-core.c (create_feature_aarch64_core):
4287 Regenerate.
4288 * features/aarch64-fpu.c (create_feature_aarch64_fpu):
4289 Likewise.
4290 * features/i386/32bit-avx.c (create_feature_i386_32bit_avx):
4291 Likewise.
4292 * features/i386/32bit-avx512.c
4293 (create_feature_i386_32bit_avx512): Likewise.
4294 * features/i386/32bit-core.c (create_feature_i386_32bit_core):
4295 Likewise.
4296 * features/i386/32bit-linux.c (create_feature_i386_32bit_linux):
4297 Likewise.
4298 * features/i386/32bit-mpx.c (create_feature_i386_32bit_mpx):
4299 Likewise.
4300 * features/i386/32bit-pkeys.c (create_feature_i386_32bit_pkeys):
4301 Likewise.
4302 * features/i386/32bit-sse.c (create_feature_i386_32bit_sse):
4303 Likewise.
4304 * features/i386/64bit-avx.c (create_feature_i386_64bit_avx):
4305 Likewise.
4306 * features/i386/64bit-avx512.c
4307 (create_feature_i386_64bit_avx512): Likewise.
4308 * features/i386/64bit-core.c (create_feature_i386_64bit_core):
4309 Likewise.
4310 * features/i386/64bit-linux.c (create_feature_i386_64bit_linux):
4311 Likewise.
4312 * features/i386/64bit-mpx.c (create_feature_i386_64bit_mpx):
4313 Likewise.
4314 * features/i386/64bit-pkeys.c (create_feature_i386_64bit_pkeys):
4315 Likewise.
4316 * features/i386/64bit-segments.c
4317 (create_feature_i386_64bit_segments): Likewise.
4318 * features/i386/64bit-sse.c (create_feature_i386_64bit_sse):
4319 Likewise.
4320 * features/i386/x32-core.c
4321 (create_feature_i386_x32_core): Likewise.
4322 * features/tic6x-c6xp.c (create_feature_tic6x_c6xp): Likewise.
4323 * features/tic6x-core.c (create_feature_tic6x_core): Likewise.
4324 * features/tic6x-gp.c (create_feature_tic6x_gp): Likewise.
4325 * target-descriptions.c: In generated code, don't pass xml
4326 filename.
4327
4328 2018-04-18 Alan Hayward <alan.hayward@arm.com>
4329
4330 * common/tdesc.c (print_xml_feature::visit_pre): Add xml parsing.
4331 (print_xml_feature::visit_post): Likewise.
4332 (print_xml_feature::visit): Likewise.
4333 * common/tdesc.h (tdesc_get_features_xml): Use const tdesc.
4334 (print_xml_feature): Add new class.
4335 * regformats/regdat.sh: Null xmltarget on feature targets.
4336 * target-descriptions.c (struct target_desc): Add xmltarget.
4337 (maintenance_check_tdesc_xml_convert): Add unittest function.
4338 (tdesc_get_features_xml): Add function to get xml.
4339 (maintenance_check_xml_descriptions): Test xml generation.
4340 * xml-tdesc.c (string_read_description_xml): Add function.
4341 * xml-tdesc.h (string_read_description_xml): Add declaration.
4342
4343 2018-04-18 Alan Hayward <alan.hayward@arm.com>
4344
4345 * features/Makefile: Add feature marker to targets with new style
4346 target descriptions.
4347 * regformats/aarch64.dat: Regenerate.
4348 * regformats/i386/amd64-avx-avx512-linux.dat: Likewise.
4349 * regformats/i386/amd64-avx-linux.dat: Likewise.
4350 * regformats/i386/amd64-avx-mpx-avx512-pku-linux.dat: Likewise.
4351 * regformats/i386/amd64-avx-mpx-linux.dat: Likewise.
4352 * regformats/i386/amd64-linux.dat: Likewise.
4353 * regformats/i386/amd64-mpx-linux.dat: Likewise.
4354 * regformats/i386/amd64.dat: Likewise.
4355 * regformats/i386/i386-avx-avx512-linux.dat: Likewise.
4356 * regformats/i386/i386-avx-linux.dat: Likewise.
4357 * regformats/i386/i386-avx-mpx-avx512-pku-linux.dat: Likewise.
4358 * regformats/i386/i386-avx-mpx-linux.dat: Likewise.
4359 * regformats/i386/i386-linux.dat: Likewise.
4360 * regformats/i386/i386-mmx-linux.dat: Likewise.
4361 * regformats/i386/i386-mpx-linux.dat: Likewise.
4362 * regformats/i386/i386.dat: Likewise.
4363 * regformats/i386/x32-avx-avx512-linux.dat: Likewise.
4364 * regformats/i386/x32-avx-linux.dat: Likewise.
4365 * regformats/i386/x32-linux.dat: Likewise.
4366 * regformats/tic6x-c62x-linux.dat: Likewise.
4367 * regformats/tic6x-c64x-linux.dat: Likewise.
4368 * regformats/tic6x-c64xp-linux.dat: Likewise.
4369 * regformats/regdat.sh: Parse feature marker.
4370
4371 2018-04-18 Alan Hayward <alan.hayward@arm.com>
4372
4373 * common/tdesc.h (tdesc_architecture_name): Add new declaration.
4374 (tdesc_osabi_name): Likewise.
4375 * target-descriptions.c (tdesc_architecture_name): Add new
4376 function.
4377 (tdesc_osabi_name): Likewise.
4378
4379 2018-04-18 Alan Hayward <alan.hayward@arm.com>
4380
4381 * common/tdesc.c (tdesc_predefined_type): Move to here.
4382 (tdesc_named_type): Likewise.
4383 (tdesc_create_vector): Likewise.
4384 (tdesc_create_struct): Likewise.
4385 (tdesc_set_struct_size): Likewise.
4386 (tdesc_create_union): Likewise.
4387 (tdesc_create_flags): Likewise.
4388 (tdesc_create_enum): Likewise.
4389 (tdesc_add_field): Likewise.
4390 (tdesc_add_typed_bitfield): Likewise.
4391 (tdesc_add_bitfield): Likewise.
4392 (tdesc_add_flag): Likewise.
4393 (tdesc_add_enum_value): Likewise.
4394 * common/tdesc.h (struct tdesc_type_builtin): Likewise.
4395 (struct tdesc_type_vector): Likewise.
4396 (struct tdesc_type_field): Likewise.
4397 (struct tdesc_type_with_fields): Likewise.
4398 (tdesc_create_enum): Add declaration.
4399 (tdesc_add_typed_bitfield): Likewise.
4400 (tdesc_add_enum_value): Likewise.
4401 * target-descriptions.c (tdesc_type_field): Move from here.
4402 (tdesc_type_builtin): Likewise.
4403 (tdesc_type_vector): Likewise.
4404 (tdesc_type_with_fields): Likewise.
4405 (tdesc_predefined_types): Likewise.
4406 (tdesc_named_type): Likewise.
4407 (tdesc_create_vector): Likewise.
4408 (tdesc_create_struct): Likewise.
4409 (tdesc_set_struct_size): Likewise.
4410 (tdesc_create_union): Likewise.
4411 (tdesc_create_flags): Likewise.
4412 (tdesc_create_enum): Likewise.
4413 (tdesc_add_field): Likewise.
4414 (tdesc_add_typed_bitfield): Likewise.
4415 (tdesc_add_bitfield): Likewise.
4416 (tdesc_add_flag): Likewise.
4417 (tdesc_add_enum_value): Likewise.
4418 * gdb/target-descriptions.h (tdesc_create_enum): Likewise.
4419 (tdesc_add_typed_bitfield): Likewise.
4420 (tdesc_add_enum_value): Likewise.
4421
4422 2018-04-18 Alan Hayward <alan.hayward@arm.com>
4423
4424 * common/tdesc.c (tdesc_feature::accept): Move to here.
4425 (tdesc_feature::operator==): Likewise.
4426 (tdesc_create_reg): Likewise.
4427 * common/tdesc.h (tdesc_type_kind): Likewise.
4428 (struct tdesc_type): Likewise.
4429 (struct tdesc_feature): Likewise.
4430 * regformats/regdat.sh: Create a feature.
4431 * target-descriptions.c (tdesc_type_kind): Move from here.
4432 (tdesc_type): Likewise.
4433 (tdesc_type_up): Likewise.
4434 (tdesc_feature): Likewise.
4435 (tdesc_create_reg): Likewise.
4436
4437 2018-04-18 Alan Hayward <alan.hayward@arm.com>
4438
4439 * Makefile.in: Add arch/tdesc.c
4440 * common/tdesc.c: New file.
4441 * common/tdesc.h (tdesc_element_visitor): Move to here.
4442 (tdesc_element): Likewise.
4443 (tdesc_reg): Likewise.
4444 (tdesc_reg_up): Likewise.
4445 * regformats/regdef.h (reg): Add offset to constructors.
4446 * target-descriptions.c (tdesc_element_visitor): Move from here.
4447 (tdesc_element): Likewise.
4448 (tdesc_reg): Likewise.
4449 (tdesc_reg_up): Likewise.
4450
4451 2018-04-17 Tom Tromey <tom@tromey.com>
4452
4453 * dwarf2read.c (quirk_rust_enum): Conditionally drop the
4454 discriminant field.
4455
4456 2018-04-17 Tom Tromey <tom@tromey.com>
4457
4458 * dwarf2read.c (quirk_rust_enum): Handle unions correctly.
4459
4460 2018-04-17 Andreas Arnez <arnez@linux.vnet.ibm.com>
4461
4462 * symtab.c (print_symbol_info): Skip printing filename and line
4463 number when `last' is NULL.
4464 (symtab_symbol_info): Use empty string instead of NULL for first
4465 invocation of print_symbol_info.
4466 (rbreak_command): Pass NULL to `last' parameter of
4467 print_symbol_info.
4468
4469 2018-04-16 Simon Marchi <simon.marchi@ericsson.com>
4470
4471 * linux-tdep.c (linux_spu_make_corefile_notes): Return note_data
4472 instead of nullptr.
4473
4474 2018-04-16 Pedro Alves <palves@redhat.com>
4475
4476 * MAINTAINERS (sh): Remove.
4477 * Makefile.in (ALL_TARGET_OBS): Remove sh64-tdep.o.
4478 (HFILES_NO_SRCDIR): Remove sh64-tdep.h.
4479 (ALLDEPFILES): Remove sh64-tdep.c.
4480 * NEWS: Mentions that support for SH-5/SH64 is removed.
4481 * configure.tgt (sh*-*-linux*): Remove reference to sh64-tdep.o.
4482 (sh*-*-openbsd*): Ditto.
4483 (sh64-*-elf*): Remove.
4484 (sh*): Remove.
4485 * regcache.c (cooked_write_test): Remove bfd_mach_sh5 case.
4486 * sh-linux-tdep.c: Remove reference to bfd_mach_sh5.
4487 * sh-tdep.c: No longer include "sh64-tdep.h".
4488 (sh_gdbarch_init): Remove reference to bfd_mach_sh5.
4489 * sh64-tdep.c, sh64-tdep.h: Remove files.
4490
4491 2018-04-16 Pedro Alves <palves@redhat.com>
4492
4493 * MAINTAINERS: Remove m88k.
4494 * Makefile.in (ALL_TARGET_OBS): Remove m88k-tdep.o.
4495 (HFILES_NO_SRCDIR): Remove m88k-tdep.h.
4496 (ALLDEPFILES): Remove m88k-bsd-nat.c and m88k-tdep.c.
4497 * NEWS: Mention that support for m88k was removed.
4498 * configure.host (m88*-*-*): Remove support.
4499 * configure.nat (m88k-*-*): Remove support.
4500 * configure.tgt (m88*-*-openbsd*): Remove.
4501 * m88k-bsd-nat.c, m88k-tdep.c, m88k-tdep.h: Delete.
4502
4503 2018-04-15 Simon Marchi <simon.marchi@polymtl.ca>
4504
4505 * configure.tgt (x86_tobjs): New variable.
4506 (amd64_tobjs, i386_tobjs): Use it.
4507
4508 2018-04-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
4509
4510 * symtab.c (print_symbol_info): Precede the symbol definition by
4511 the line number when available.
4512 * NEWS: Advertise this enhancement.
4513
4514 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
4515
4516 * NEWS (New options): announce set/show record btrace cpu.
4517 * btrace.c: Include record-btrace.h.
4518 (btrace_compute_ftrace_pt): Skip enabling errata workarounds if
4519 the vendor is unknown.
4520 (btrace_compute_ftrace_1): Add cpu parameter. Update callers.
4521 Maybe overwrite the btrace configuration's cpu.
4522 (btrace_compute_ftrace): Add cpu parameter. Update callers.
4523 (btrace_fetch): Add cpu parameter. Update callers.
4524 (btrace_maint_update_pt_packets): Call record_btrace_get_cpu.
4525 Maybe overwrite the btrace configuration's cpu. Skip enabling
4526 errata workarounds if the vendor is unknown.
4527 * python/py-record-btrace.c: Include record-btrace.h.
4528 (recpy_bt_begin, recpy_bt_end, recpy_bt_instruction_history)
4529 (recpy_bt_function_call_history): Call record_btrace_get_cpu.
4530 * record-btrace.c (record_btrace_cpu_state_kind): New.
4531 (record_btrace_cpu): New.
4532 (set_record_btrace_cpu_cmdlist): New.
4533 (record_btrace_get_cpu): New.
4534 (require_btrace_thread, record_btrace_info)
4535 (record_btrace_resume_thread): Call record_btrace_get_cpu.
4536 (cmd_set_record_btrace_cpu_none): New.
4537 (cmd_set_record_btrace_cpu_auto): New.
4538 (cmd_set_record_btrace_cpu): New.
4539 (cmd_show_record_btrace_cpu): New.
4540 (_initialize_record_btrace): Initialize set/show record btrace cpu
4541 commands.
4542 * record-btrace.h (record_btrace_get_cpu): New.
4543
4544 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
4545
4546 * record.c (set_record_command): Fix typo in message.
4547
4548 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
4549
4550 * record-btrace.c (cmd_set_record_btrace): Print sub-commands.
4551
4552 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
4553
4554 * infrun.c (process_event_stop_test): Call
4555 gdbarch_in_indirect_branch_thunk.
4556 * gdbarch.sh (in_indirect_branch_thunk): New.
4557 * gdbarch.c: Regenerated.
4558 * gdbarch.h: Regenerated.
4559 * x86-tdep.h: New.
4560 * x86-tdep.c: New.
4561 * Makefile.in (ALL_TARGET_OBS): Add x86-tdep.o.
4562 (HFILES_NO_SRCDIR): Add x86-tdep.h.
4563 (ALLDEPFILES): Add x86-tdep.c.
4564 * arch-utils.h (default_in_indirect_branch_thunk): New.
4565 * arch-utils.c (default_in_indirect_branch_thunk): New.
4566 * i386-tdep: Include x86-tdep.h.
4567 (i386_in_indirect_branch_thunk): New.
4568 (i386_elf_init_abi): Set in_indirect_branch_thunk gdbarch
4569 function.
4570 * amd64-tdep: Include x86-tdep.h.
4571 (amd64_in_indirect_branch_thunk): New.
4572 (amd64_init_abi): Set in_indirect_branch_thunk gdbarch function.
4573
4574 2018-04-12 Jan Kratochvil <jan.kratochvil@redhat.com>
4575
4576 PR gdb/23053
4577 * dwarf-index-write.c (data_buf::grow) (write_one_signatured_type)
4578 (recursively_write_psymbols) (debug_names::recursively_write_psymbols)
4579 (debug_names::write_one_signatured_type): Fix -D_GLIBCXX_DEBUG
4580 regression.
4581
4582 2018-04-12 Tom Tromey <tom@tromey.com>
4583
4584 * rust-lang.c (rust_print_struct_def): Remove univariant code.
4585 (rust_evaluate_subexp): Likewise.
4586
4587 2018-04-12 Pedro Alves <palves@redhat.com>
4588
4589 * procfs.c (procfs_detach): Make forward declaration's prototype
4590 match definition's protototype.
4591 (proc_get_LDT_entry): Remove stale do_cleanups call.
4592
4593 2018-04-12 Pedro Alves <palves@redhat.com>
4594
4595 * target.h (target_ops::to_has_exited): Delete.
4596 (target_has_exited): Delete.
4597 * target-delegates.c: Regenerate.
4598
4599 2018-04-11 Pedro Alves <palves@redhat.com>
4600
4601 * target.c (fileio_fh_t::t): Add comment.
4602 (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
4603 (target_fileio_close): Handle a NULL target.
4604 (invalidate_fileio_fh): New.
4605 (target_close): Call it.
4606 * remote.c (remote_hostio_send_command): No longer check whether
4607 remote_desc is open.
4608
4609 2018-04-11 Pedro Alves <palves@redhat.com>
4610
4611 * target.c (fileio_fh_t): Make it a named struct instead of a
4612 typedef.
4613 (fileio_fh_t::is_closed): New method.
4614 (DEF_VEC_O (fileio_fh_t)): Remove.
4615 (fileio_fhandles): Now a std::vector.
4616 (is_closed_fileio_fh): Delete.
4617 (acquire_fileio_fd): Adjust. Rename parameters.
4618 (release_fileio_fd): Adjust.
4619 (fileio_fd_to_fh): Reimplement as a function instead of a macro.
4620 (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
4621 (target_fileio_close): Adjust.
4622
4623 2018-04-10 Simon Marchi <simon.marchi@ericsson.com>
4624
4625 * auto-load.c (auto_load_safe_path_vec_update): Iterate by
4626 index.
4627
4628 2018-04-10 Pedro Alves <palves@redhat.com>
4629
4630 * gdbthread.h (finish_thread_state_cleanup): Delete declaration.
4631 (scoped_finish_thread_state): New class.
4632 * infcmd.c (run_command_1): Use it instead of finish_thread_state
4633 cleanup.
4634 * infrun.c (proceed, prepare_for_detach, wait_for_inferior)
4635 (fetch_inferior_event, normal_stop): Likewise.
4636 * thread.c (finish_thread_state_cleanup): Delete.
4637
4638 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
4639 Pedro Alves <palves@redhat.com>
4640
4641 * value.c: Include "selftest.h" and "common/array-view.h".
4642 (struct range) <operator ==>: New.
4643 (test_ranges_contain): New.
4644 (check_ranges_vector): New.
4645 (test_insert_into_bit_range_vector): New.
4646 (_initialize_values): Register selftests.
4647 * common/array-view.h (operator==, operator!=): New.
4648
4649 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
4650
4651 * common/gdb_vecs.h (unordered_remove): Add overload that takes
4652 an iterator.
4653 * inline-frame.c: Include <algorithm>.
4654 (struct inline_state): Add constructor.
4655 (inline_state_s): Remove.
4656 (DEF_VEC_O(inline_state_s)): Remove.
4657 (inline_states): Change type to std::vector.
4658 (find_inline_frame_state): Adjust to std::vector.
4659 (allocate_inline_frame_state): Remove.
4660 (clear_inline_frame_state): Adjust to std::vector.
4661 (skip_inline_frames): Adjust to std::vector.
4662
4663 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
4664
4665 * tracepoint.h (struct trace_state_variable): Add constructor.
4666 <name>: Change type to std::string.
4667 * tracepoint.c (tsv_s): Remove.
4668 (DEF_VEC_O(tsv_s)): Remove.
4669 (tvariables): Change to std::vector.
4670 (create_trace_state_variable): Adjust to std::vector.
4671 (find_trace_state_variable): Likewise.
4672 (find_trace_state_variable_by_number): Likewise.
4673 (delete_trace_state_variable): Likewise.
4674 (trace_variable_command): Adjust to std::string.
4675 (delete_trace_variable_command): Likewise.
4676 (tvariables_info_1): Adjust to std::vector.
4677 (save_trace_state_variables): Likewise.
4678 (start_tracing): Likewise.
4679 (merge_uploaded_trace_state_variables): Adjust to std::vector
4680 and std::string.
4681 * target.h (struct target_ops)
4682 <to_download_trace_state_variable>: Pass reference to
4683 trace_state_variable.
4684 * target-debug.h (target_debug_print_const_trace_state_variable_r): New.
4685 * target-delegates.c: Re-generate.
4686 * mi/mi-interp.c (mi_tsv_created): Adjust to std::string.
4687 (mi_tsv_deleted): Likewise.
4688 * mi/mi-main.c (mi_cmd_trace_frame_collected): Likewise.
4689 * remote.c (remote_download_trace_state_variable): Change
4690 pointer to reference and adjust.
4691 * make-target-delegates (parse_argtypes): Handle references.
4692 (write_function_header): Likewise.
4693 (munge_type): Likewise.
4694
4695 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
4696
4697 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
4698 string_view-selftests.c.
4699 * unittests/basic_string_view/capacity/1.cc: Adapt to GDB
4700 testsuite.
4701 * unittests/basic_string_view/cons/char/1.cc: Likewise.
4702 * unittests/basic_string_view/cons/char/2.cc: Likewise.
4703 * unittests/basic_string_view/cons/char/3.cc: Likewise.
4704 * unittests/basic_string_view/element_access/char/1.cc:
4705 Likewise.
4706 * unittests/basic_string_view/element_access/char/empty.cc:
4707 Likewise.
4708 * unittests/basic_string_view/element_access/char/front_back.cc:
4709 Likewise.
4710 * unittests/basic_string_view/inserters/char/2.cc: Likewise.
4711 * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc:
4712 Likewise.
4713 * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc:
4714 Likewise.
4715 * unittests/basic_string_view/modifiers/swap/char/1.cc:
4716 Likewise.
4717 * unittests/basic_string_view/operations/compare/char/1.cc:
4718 Likewise.
4719 * unittests/basic_string_view/operations/compare/char/13650.cc:
4720 Likewise.
4721 * unittests/basic_string_view/operations/copy/char/1.cc:
4722 Likewise.
4723 * unittests/basic_string_view/operations/data/char/1.cc:
4724 Likewise.
4725 * unittests/basic_string_view/operations/find/char/1.cc:
4726 Likewise.
4727 * unittests/basic_string_view/operations/find/char/2.cc:
4728 Likewise.
4729 * unittests/basic_string_view/operations/find/char/3.cc:
4730 Likewise.
4731 * unittests/basic_string_view/operations/find/char/4.cc:
4732 Likewise.
4733 * unittests/basic_string_view/operations/rfind/char/1.cc:
4734 Likewise.
4735 * unittests/basic_string_view/operations/rfind/char/2.cc:
4736 Likewise.
4737 * unittests/basic_string_view/operations/rfind/char/3.cc:
4738 Likewise.
4739 * unittests/basic_string_view/operations/substr/char/1.cc:
4740 Likewise.
4741 * unittests/basic_string_view/operators/char/2.cc: Likewise.
4742 * unittests/string_view-selftests.c: New file.
4743
4744 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
4745
4746 * unittests/basic_string_view/capacity/1.cc: New file.
4747 * unittests/basic_string_view/capacity/empty_neg.cc: New file.
4748 * unittests/basic_string_view/cons/char/1.cc: New file.
4749 * unittests/basic_string_view/cons/char/2.cc: New file.
4750 * unittests/basic_string_view/cons/char/3.cc: New file.
4751 * unittests/basic_string_view/cons/wchar_t/1.cc: New file.
4752 * unittests/basic_string_view/cons/wchar_t/2.cc: New file.
4753 * unittests/basic_string_view/cons/wchar_t/3.cc: New file.
4754 * unittests/basic_string_view/element_access/char/1.cc: New file.
4755 * unittests/basic_string_view/element_access/char/2.cc: New file.
4756 * unittests/basic_string_view/element_access/char/empty.cc: New file.
4757 * unittests/basic_string_view/element_access/char/front_back.cc: New file.
4758 * unittests/basic_string_view/element_access/wchar_t/1.cc: New file.
4759 * unittests/basic_string_view/element_access/wchar_t/2.cc: New file.
4760 * unittests/basic_string_view/element_access/wchar_t/empty.cc: New file.
4761 * unittests/basic_string_view/element_access/wchar_t/front_back.cc: New file.
4762 * unittests/basic_string_view/include.cc: New file.
4763 * unittests/basic_string_view/inserters/char/1.cc: New file.
4764 * unittests/basic_string_view/inserters/char/2.cc: New file.
4765 * unittests/basic_string_view/inserters/char/3.cc: New file.
4766 * unittests/basic_string_view/inserters/pod/10081-out.cc: New file.
4767 * unittests/basic_string_view/inserters/wchar_t/1.cc: New file.
4768 * unittests/basic_string_view/inserters/wchar_t/2.cc: New file.
4769 * unittests/basic_string_view/inserters/wchar_t/3.cc: New file.
4770 * unittests/basic_string_view/literals/types.cc: New file.
4771 * unittests/basic_string_view/literals/values.cc: New file.
4772 * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc: New file.
4773 * unittests/basic_string_view/modifiers/remove_prefix/wchar_t/1.cc: New file.
4774 * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc: New file.
4775 * unittests/basic_string_view/modifiers/remove_suffix/wchar_t/1.cc: New file.
4776 * unittests/basic_string_view/modifiers/swap/char/1.cc: New file.
4777 * unittests/basic_string_view/modifiers/swap/wchar_t/1.cc: New file.
4778 * unittests/basic_string_view/operations/compare/char/1.cc: New file.
4779 * unittests/basic_string_view/operations/compare/char/13650.cc: New file.
4780 * unittests/basic_string_view/operations/compare/char/2.cc: New file.
4781 * unittests/basic_string_view/operations/compare/char/70483.cc: New file.
4782 * unittests/basic_string_view/operations/compare/wchar_t/1.cc: New file.
4783 * unittests/basic_string_view/operations/compare/wchar_t/13650.cc: New file.
4784 * unittests/basic_string_view/operations/compare/wchar_t/2.cc: New file.
4785 * unittests/basic_string_view/operations/copy/char/1.cc: New file.
4786 * unittests/basic_string_view/operations/copy/wchar_t/1.cc: New file.
4787 * unittests/basic_string_view/operations/data/char/1.cc: New file.
4788 * unittests/basic_string_view/operations/data/wchar_t/1.cc: New file.
4789 * unittests/basic_string_view/operations/find/char/1.cc: New file.
4790 * unittests/basic_string_view/operations/find/char/2.cc: New file.
4791 * unittests/basic_string_view/operations/find/char/3.cc: New file.
4792 * unittests/basic_string_view/operations/find/char/4.cc: New file.
4793 * unittests/basic_string_view/operations/find/wchar_t/1.cc: New file.
4794 * unittests/basic_string_view/operations/find/wchar_t/2.cc: New file.
4795 * unittests/basic_string_view/operations/find/wchar_t/3.cc: New file.
4796 * unittests/basic_string_view/operations/find/wchar_t/4.cc: New file.
4797 * unittests/basic_string_view/operations/rfind/char/1.cc: New file.
4798 * unittests/basic_string_view/operations/rfind/char/2.cc: New file.
4799 * unittests/basic_string_view/operations/rfind/char/3.cc: New file.
4800 * unittests/basic_string_view/operations/rfind/wchar_t/1.cc: New file.
4801 * unittests/basic_string_view/operations/rfind/wchar_t/2.cc: New file.
4802 * unittests/basic_string_view/operations/rfind/wchar_t/3.cc: New file.
4803 * unittests/basic_string_view/operations/string_conversion/1.cc: New file.
4804 * unittests/basic_string_view/operations/substr/char/1.cc: New file.
4805 * unittests/basic_string_view/operations/substr/wchar_t/1.cc: New file.
4806 * unittests/basic_string_view/operators/char/2.cc: New file.
4807 * unittests/basic_string_view/operators/wchar_t/2.cc: New file.
4808 * unittests/basic_string_view/range_access/char/1.cc: New file.
4809 * unittests/basic_string_view/range_access/wchar_t/1.cc: New file.
4810 * unittests/basic_string_view/requirements/explicit_instantiation/1.cc: New file.
4811 * unittests/basic_string_view/requirements/explicit_instantiation/char/1.cc: New file.
4812 * unittests/basic_string_view/requirements/explicit_instantiation/char16_t/1.cc: New file.
4813 * unittests/basic_string_view/requirements/explicit_instantiation/char32_t/1.cc: New file.
4814 * unittests/basic_string_view/requirements/explicit_instantiation/wchar_t/1.cc: New file.
4815 * unittests/basic_string_view/requirements/typedefs.cc: New file.
4816 * unittests/basic_string_view/typedefs.cc: New file.
4817 * unittests/basic_string_view/types/1.cc: New file.
4818
4819 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
4820
4821 * common/gdb_string_view.h: Remove libstdc++ implementation
4822 details, adjust to gdb reality.
4823 * common/gdb_string_view.tcc: Likewise.
4824 * cli/cli-script.c (struct string_view): Remove.
4825 (user_args) <m_args>: Change element type to gdb::string_view.
4826 (user_args::insert_args): Adjust.
4827
4828 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
4829
4830 * common/gdb_string_view.h: New file.
4831 * common/gdb_string_view.tcc: New file.
4832
4833 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
4834
4835 * ax_cxx_compile_stdcxx.m4: Sync with upstream.
4836 * configure: Re-generate.
4837
4838 2018-04-09 Pedro Alves <palves@redhat.com>
4839
4840 * gdbarch.sh: Include "observable.h" instead of "observer.h".
4841 (set_target_gdbarch): Call
4842 gdb::observers::architecture_changed.notify instead of
4843 observer_notify_architecture_changed.
4844
4845 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
4846
4847 * tracepoint.c (struct current_traceframe_cleanup): Remove.
4848 (do_restore_current_traceframe_cleanup): Remove.
4849 (restore_current_traceframe_cleanup_dtor): Remove.
4850 (make_cleanup_restore_current_traceframe): Remove.
4851 (scoped_restore_current_traceframe::scoped_restore_current_traceframe):
4852 New.
4853 * tracepoint.h (struct scoped_restore_current_traceframe): New.
4854 * infrun.c (fetch_inferior_event): Use
4855 scoped_restore_current_traceframe.
4856
4857 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
4858
4859 * dwarf2read.h (struct dwarf2_per_objfile) <n_type_units>:
4860 Remove.
4861 <n_allocated_type_units>: Remove.
4862 <all_type_units>: Change to std::vector.
4863 * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
4864 to std::vector change.
4865 (dwarf2_per_objfile::get_cutu): Likewise.
4866 (dwarf2_per_objfile::get_tu): Likewise.
4867 (create_signatured_type_table_from_index): Likewise.
4868 (create_signatured_type_table_from_debug_names): Likewise.
4869 (dw2_symtab_iter_next): Likewise.
4870 (dw2_print_stats): Likewise.
4871 (dw2_expand_all_symtabs): Likewise.
4872 (dw2_expand_marked_cus): Likewise.
4873 (dw2_debug_names_iterator::next): Likewise.
4874 (dwarf2_initialize_objfile): Likewise.
4875 (add_signatured_type_cu_to_table): Likewise.
4876 (create_all_type_units): Likewise.
4877 (add_type_unit): Likewise.
4878 (struct tu_abbrev_offset): Add constructor.
4879 (build_type_psymtabs_1): Adjust to std::vector change.
4880 (print_tu_stats): Likewise.
4881 * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
4882 (write_debug_names): Likewise.
4883
4884 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
4885
4886 * dwarf2read.h (struct dwarf2_per_objfile) <all_comp_units>: Likewise.
4887 Make an std::vector.
4888 <n_comp_units>: Remove.
4889 * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
4890 to std::vector change.
4891 (dwarf2_per_objfile::get_cutu): Likewise.
4892 (dwarf2_per_objfile::get_cu): Likewise.
4893 (create_cus_from_index): Likewise.
4894 (create_addrmap_from_index): Likewise.
4895 (create_addrmap_from_aranges): Likewise.
4896 (dwarf2_read_index): Likewise.
4897 (dw2_find_last_source_symtab): Likewise.
4898 (dw2_map_symtabs_matching_filename): Likewise.
4899 (dw2_symtab_iter_next): Likewise.
4900 (dw2_print_stats): Likewise.
4901 (dw2_expand_all_symtabs): Likewise.
4902 (dw2_expand_symtabs_with_fullname): Likewise.
4903 (dw2_expand_marked_cus): Likewise.
4904 (dw2_map_symbol_filenames): Likewise.
4905 (create_cus_from_debug_names): Likewise.
4906 (dwarf2_read_debug_names): Likewise.
4907 (dw2_debug_names_iterator::next): Likewise.
4908 (dwarf2_initialize_objfile): Likewise.
4909 (set_partial_user): Likewise.
4910 (dwarf2_build_psymtabs_hard): Likewise.
4911 (read_comp_units_from_section): Remove arguments, adjust to
4912 std::vector change.
4913 (create_all_comp_units): Adjust to std::vector and
4914 read_comp_units_from_section changes.
4915 (dwarf2_find_containing_comp_unit): Adjust to std::vector
4916 change.
4917 * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
4918 (psyms_seen_size): Likewise.
4919 (write_gdbindex): Likewise.
4920 (write_debug_names): Likewise.
4921
4922 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
4923
4924 * dwarf2read.c (create_cus_from_index_list): Replace objfile arg
4925 with dwarf2_per_objfile.
4926 (create_cus_from_index): Likewise.
4927 (create_signatured_type_table_from_index): Likewise.
4928 (dwarf2_read_index): Likewise.
4929 (dwarf2_initialize_objfile): Likewise.
4930 (dwarf2_fetch_die_loc_sect_off): Get dwarf2_per_objfile from
4931 per_cu rather than get_dwarf2_per_objfile.
4932
4933 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
4934
4935 * dwarf2read.h (struct signatured_type): Forward declare.
4936 (struct dwarf2_per_objfile) <get_cutu, get_cu, get_tu>:
4937 New methods.
4938 * dwarf2read.c (dwarf2_per_objfile::get_cutu): Rename from...
4939 (dw2_get_cutu): ...this.
4940 (dwarf2_per_objfile::get_cu): Rename from...
4941 (dw2_get_cu): ...this.
4942 (dwarf2_per_objfile::get_tu): New.
4943 (create_addrmap_from_index): Adjust.
4944 (create_addrmap_from_aranges): Adjust.
4945 (dw2_find_last_source_symtab): Adjust.
4946 (dw2_map_symtabs_matching_filename): Adjust.
4947 (dw2_symtab_iter_next): Adjust.
4948 (dw2_print_stats): Adjust.
4949 (dw2_expand_all_symtabs): Adjust.
4950 (dw2_expand_symtabs_with_fullname): Adjust.
4951 (dw2_expand_marked_cus): Adjust.
4952 (dw_expand_symtabs_matching_file_matcher): Adjust.
4953 (dw2_map_symbol_filenames): Adjust.
4954 (dw2_debug_names_iterator::next): Adjust.
4955 (dwarf2_initialize_objfile): Adjust.
4956 (set_partial_user): Adjust.
4957 (dwarf2_build_psymtabs_hard): Adjust.
4958
4959 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
4960
4961 * dwarf2read.c (create_signatured_type_table_from_debug_names):
4962 Remove unused variables.
4963 (dw2_map_symtabs_matching_filename): Likewise.
4964 (dwarf2_record_block_ranges): Likewise.
4965 (dwarf2_read_addr_index): Likewise.
4966 (follow_die_offset): Likewise.
4967
4968 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
4969
4970 * progspace.c (clone_program_space): Pass SYMFILE_DEFER_BP_RESET
4971 to symbol_file_add_main.
4972
4973 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
4974
4975 PR mi/22299
4976 * mi/mi-console.c (do_fputc_async_safe): New.
4977 (mi_console_file::write_async_safe): New.
4978 (mi_console_file::flush): Adjust calls to fputstrn_unfiltered.
4979 * mi/mi-console.h (class mi_console_file) <write_async_safe>:
4980 New.
4981 * ui-file.c (ui_file::putstrn): Adjust call to
4982 fputstrn_unfiltered.
4983 * utils.c (printchar): Replace do_fputs and do_fprintf
4984 parameters by do_fputc.
4985 (fputstr_filtered): Adjust call to printchar.
4986 (fputstr_unfiltered): Likewise.
4987 (fputstrn_filtered): Likewise.
4988 (fputstrn_unfiltered): Add do_fputc parameter, pass to
4989 printchar.
4990 * utils.h (do_fputc_ftype): New typedef.
4991 (fputstrn_unfiltered): Add do_fputc parameter.
4992
4993 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
4994
4995 * regformats/i386/i386-avx.dat: Remove.
4996
4997 2018-04-07 Simon Marchi <simon.marchi@ericsson.com>
4998
4999 PR gdb/22979
5000 * amd64-tdep.c (amd64_none_init_abi): New function.
5001 (amd64_x32_none_init_abi): New function.
5002 (_initialize_amd64_tdep): Register handlers for x86-64 and
5003 x64_32 with GDB_OSABI_NONE.
5004 * osabi.c (gdbarch_init_osabi): Allow running handlers for the
5005 GDB_OSABI_NONE osabi.
5006
5007 2018-04-07 Simon Marchi <simon.marchi@ericsson.com>
5008
5009 PR gdb/22980
5010 * defs.h (enum gdb_osabi): Remove GDB_OSABI_UNINITIALIZED, add
5011 GDB_OSABI_NONE.
5012 * arch-utils.c (gdbarch_info_init): Don't set info->osabi.
5013 * osabi.c (gdb_osabi_names): Add "unknown" entry.
5014
5015 2018-04-07 Simon Marchi <simon.marchi@ericsson.com>
5016
5017 * common/byte-vector.h (char_vector): New type.
5018 * target.h (target_read_alloc): Return
5019 gdb::optional<byte_vector>.
5020 (target_read_stralloc): Return gdb::optional<char_vector>.
5021 (target_get_osdata): Return gdb::optional<char_vector>.
5022 * target.c (target_read_alloc_1): Templatize. Replacement
5023 manual memory management with vector.
5024 (target_read_alloc): Change return type, adjust.
5025 (target_read_stralloc): Change return type, adjust.
5026 (target_get_osdata): Change return type, adjust.
5027 * auxv.c (struct auxv_info) <length>: Remove.
5028 <data>: Change type to gdb::optional<byte_vector>.
5029 (auxv_inferior_data_cleanup): Free auxv_info with delete.
5030 (get_auxv_inferior_data): Allocate auxv_info with new, adjust.
5031 (target_auxv_search): Adjust.
5032 (fprint_target_auxv): Adjust.
5033 * avr-tdep.c (avr_io_reg_read_command): Adjust.
5034 * linux-tdep.c (linux_spu_make_corefile_notes): Adjust.
5035 (linux_make_corefile_notes): Adjust.
5036 * osdata.c (get_osdata): Adjust.
5037 * remote.c (remote_get_threads_with_qxfer): Adjust.
5038 (remote_memory_map): Adjust.
5039 (remote_traceframe_info): Adjust.
5040 (btrace_read_config): Adjust.
5041 (remote_read_btrace): Adjust.
5042 (remote_pid_to_exec_file): Adjust.
5043 * solib-aix.c (solib_aix_get_library_list): Adjust.
5044 * solib-dsbt.c (decode_loadmap): Don't free buf.
5045 (dsbt_get_initial_loadmaps): Adjust.
5046 * solib-svr4.c (svr4_current_sos_via_xfer_libraries): Adjust.
5047 * solib-target.c (solib_target_current_sos): Adjust.
5048 * tracepoint.c (sdata_make_value): Adjust.
5049 * xml-support.c (xinclude_start_include): Adjust.
5050 (xml_fetch_content_from_file): Adjust.
5051 * xml-support.h (xml_fetch_another): Change return type.
5052 (xml_fetch_content_from_file): Change return type.
5053 * xml-syscall.c (xml_init_syscalls_info): Adjust.
5054 * xml-tdesc.c (file_read_description_xml): Adjust.
5055 (fetch_available_features_from_target): Change return type.
5056 (target_fetch_description_xml): Adjust.
5057 (target_read_description_xml): Adjust.
5058
5059 2018-04-06 Tom Tromey <tom@tromey.com>
5060
5061 * value.c (~value): Update.
5062 (struct value) <contents>: Now unique_xmalloc_ptr.
5063 (value_contents_bits_eq, allocate_value_contents)
5064 (value_contents_raw, value_contents_all_raw)
5065 (value_contents_for_printing, value_contents_for_printing_const)
5066 (set_value_enclosing_type): Update.
5067
5068 2018-04-06 Tom Tromey <tom@tromey.com>
5069
5070 * value.c (range_s): Remove typedef, VEC.
5071 (struct range): Add operator<.
5072 (range_lessthan): Remove.
5073 (ranges_contain): Change type.
5074 (~value): Update.
5075 (struct value) <unavailable, optimized_out>: Now std::vector.
5076 (value_entirely_available)
5077 (value_entirely_covered_by_range_vector)
5078 (value_entirely_unavailable, value_entirely_optimized_out):
5079 Update.
5080 (insert_into_bit_range_vector): Change argument type.
5081 (find_first_range_overlap): Likewise.
5082 (struct ranges_and_idx, value_contents_bits_eq)
5083 (require_not_optimized_out, require_available): Update.
5084 (ranges_copy_adjusted): Change argument types.
5085 (value_optimized_out, value_copy, value_fetch_lazy): Update.
5086
5087 2018-04-06 Tom Tromey <tom@tromey.com>
5088
5089 * value.c (~value): Update.
5090 (struct value) <parent>: Now a value_ref_ptr.
5091 (value_parent, set_value_parent, value_address, value_copy):
5092 Update.
5093
5094 2018-04-06 Tom Tromey <tom@tromey.com>
5095
5096 * value.c (struct value): Add constructor, destructor, and member
5097 initializers.
5098 (allocate_value_lazy, value_decref): Update.
5099
5100 2018-04-06 Tom Tromey <tom@tromey.com>
5101
5102 * value.c (struct value) <released, next>: Remove.
5103 (all_values): Now a std::vector.
5104 (allocate_value_lazy): Update.
5105 (value_next): Remove.
5106 (value_mark, value_free_to_mark, release_value)
5107 (value_release_to_mark): Update.
5108
5109 2018-04-06 Tom Tromey <tom@tromey.com>
5110
5111 * value.h (fetch_subexp_value, value_release_to_mark): Update.
5112 (free_value_chain): Remove.
5113 * value.c (free_value_chain): Remove.
5114 (value_release_to_mark): Return a std::vector.
5115 * ppc-linux-nat.c (num_memory_accesses): Change "chain" to a
5116 std::vector.
5117 (check_condition): Update.
5118 * eval.c (fetch_subexp_value): Change "val_chain" to a
5119 std::vector.
5120 * breakpoint.c (update_watchpoint): Update.
5121 (can_use_hardware_watchpoint): Change "vals" to a std::vector.
5122
5123 2018-04-06 Tom Tromey <tom@tromey.com>
5124
5125 * value.h (free_all_values): Remove.
5126 * value.c (free_all_values): Remove.
5127
5128 2018-04-06 Tom Tromey <tom@tromey.com>
5129
5130 * value.c (VALUE_HISTORY_CHUNK, struct value_history_chunk)
5131 (value_history_chain, value_history_count): Remove.
5132 (value_history): New global.
5133 (record_latest_value, access_value_history, show_values)
5134 (preserve_values): Update.
5135
5136 2018-04-06 Tom Tromey <tom@tromey.com>
5137
5138 * varobj.h (struct varobj) <value>: Now a value_ref_ptr.
5139 * varobj.c (varobj_set_display_format, varobj_set_value)
5140 (install_default_visualizer, construct_visualizer)
5141 (install_new_value, ~varobj, varobj_get_value_type)
5142 (my_value_of_variable, varobj_editable_p): Update.
5143 * c-varobj.c (c_describe_child, c_value_of_variable)
5144 (cplus_number_of_children, cplus_describe_child): Update.
5145 * ada-varobj.c (ada_number_of_children, ada_name_of_child)
5146 (ada_path_expr_of_child, ada_value_of_child, ada_type_of_child)
5147 (ada_value_of_variable, ada_value_is_changeable_p): Update.
5148
5149 2018-04-06 Tom Tromey <tom@tromey.com>
5150
5151 * printcmd.c (last_examine_address): Change type to
5152 value_ref_ptr.
5153 (do_examine, x_command): Update.
5154
5155 2018-04-06 Tom Tromey <tom@tromey.com>
5156
5157 * value.c (release_value): Update.
5158 * breakpoint.h (struct watchpoint) <val>: Now a value_ref_ptr.
5159 (struct bpstats) <val>: Now a value_ref_ptr.
5160 * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
5161 (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
5162 (~watchpoint, print_it_watchpoint, watch_command_1)
5163 (invalidate_bp_value_on_memory_change): Update.
5164
5165 2018-04-06 Tom Tromey <tom@tromey.com>
5166
5167 * varobj.c (varobj_clear_saved_item)
5168 (update_dynamic_varobj_children, install_new_value, ~varobj):
5169 Update.
5170 * value.h (value_incref): Move declaration earlier.
5171 (value_decref): Rename from value_free.
5172 (struct value_ref_policy): New.
5173 (value_ref_ptr): New typedef.
5174 (struct value_deleter): Remove.
5175 (gdb_value_up): Remove typedef.
5176 (release_value): Change return type.
5177 (release_value_or_incref): Remove.
5178 * value.c (set_value_parent): Update.
5179 (value_incref): Change return type.
5180 (value_decref): Rename from value_free.
5181 (value_free_to_mark, free_all_values, free_value_chain): Update.
5182 (release_value): Return value_ref_ptr.
5183 (release_value_or_incref): Remove.
5184 (record_latest_value, set_internalvar, clear_internalvar):
5185 Update.
5186 * stack.c (info_frame_command): Don't call value_free.
5187 * python/py-value.c (valpy_dealloc, valpy_new)
5188 (value_to_value_object): Update.
5189 * printcmd.c (do_examine): Update.
5190 * opencl-lang.c (lval_func_free_closure): Update.
5191 * mi/mi-main.c (register_changed_p): Don't call value_free.
5192 * mep-tdep.c (mep_frame_prev_register): Don't call value_free.
5193 * m88k-tdep.c (m88k_frame_prev_register): Don't call value_free.
5194 * m68hc11-tdep.c (m68hc11_frame_prev_register): Don't call
5195 value_free.
5196 * guile/scm-value.c (vlscm_free_value_smob)
5197 (vlscm_scm_from_value): Update.
5198 * frame.c (frame_register_unwind, frame_unwind_register_signed)
5199 (frame_unwind_register_unsigned, get_frame_register_bytes)
5200 (put_frame_register_bytes): Don't call value_free.
5201 * findvar.c (address_from_register): Don't call value_free.
5202 * dwarf2read.c (dwarf2_compute_name): Don't call value_free.
5203 * dwarf2loc.c (entry_data_value_free_closure)
5204 (value_of_dwarf_reg_entry, free_pieced_value_closure)
5205 (dwarf2_evaluate_loc_desc_full): Update.
5206 * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
5207 (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
5208 (~watchpoint, watch_command_1)
5209 (invalidate_bp_value_on_memory_change): Update.
5210 * alpha-tdep.c (alpha_register_to_value): Don't call value_free.
5211
5212 2018-04-06 Simon Marchi <simon.marchi@polymtl.ca>
5213
5214 PR gdb/23022
5215 * warning.m4: Add -Wno-error=deprecated-register.
5216 * configure: Re-generate.
5217
5218 2018-04-05 Tom Tromey <tom@tromey.com>
5219
5220 * linespec.h: Remove include of "vec.h".
5221
5222 2018-04-05 Tom Tromey <tom@tromey.com>
5223
5224 * linespec.c (typep): Remove typedef.
5225 (find_methods, find_superclass_methods): Take a std::vector.
5226 (find_method): Use std::vector.
5227
5228 2018-04-05 Tom Tromey <tom@tromey.com>
5229
5230 * utils.c (compare_strings): Remove.
5231 * utils.h (compare_strings): Remove.
5232 * objc-lang.h (find_imps): Update.
5233 * objc-lang.c (find_methods): Take a std::vector.
5234 (uniquify_strings, find_imps): Likewise.
5235 * linespec.c (find_methods): Take a std::vector.
5236 (decode_objc): Use std::vector.
5237 (add_all_symbol_names_from_pspace, find_superclass_methods): Take
5238 a std::vector.
5239 (find_method, find_function_symbols): Use std::vector.
5240
5241 2018-04-05 Tom Tromey <tom@tromey.com>
5242
5243 * completer.c (completion_tracker::completion_tracker): Remove
5244 cast.
5245 (completion_tracker::discard_completions): Likewise.
5246 * breakpoint.c (ambiguous_names_p): Remove cast.
5247 * ada-lang.c (_initialize_ada_language): Remove cast.
5248 * utils.h (streq): Update.
5249 (streq_hash): Add new declaration.
5250 * utils.c (streq): Return bool.
5251 (streq_hash): New function.
5252
5253 2018-04-05 Tom Tromey <tom@tromey.com>
5254
5255 * linespec.c (event_location_to_sals) <case ADDRESS_LOCATION>:
5256 Remove a string copy.
5257
5258 2018-04-05 Tom Tromey <tom@tromey.com>
5259
5260 * linespec.c (filter_results): Use std::vector.
5261 (decode_line_2, decode_line_full): Update.
5262
5263 2018-04-05 Tom Tromey <tom@tromey.com>
5264
5265 * linespec.c (canonical_to_fullform): Return std::string.
5266 (filter_results): Update.
5267 (struct decode_line_2_item): Add constructor.
5268 <fullform, displayform>: Now std::string.
5269 (decode_line_2_compare_items): Now a std::sort comparator.
5270 (decode_line_2): Update.
5271
5272 2018-04-05 Tom Tromey <tom@tromey.com>
5273
5274 * linespec.c (copy_token_string): Return a unique_xmalloc_ptr.
5275 (unexpected_linespec_error): Update.
5276 (linespec_parse_basic, parse_linespec): Update.
5277
5278 2018-04-05 Tom Tromey <tom@tromey.com>
5279
5280 * linespec.c (linespec_parse_basic): Reindent.
5281
5282 2018-04-05 Tom Tromey <tom@tromey.com>
5283
5284 * minsyms.h (iterate_over_minimal_symbols): Update.
5285 * minsyms.c (iterate_over_minimal_symbols): Take a
5286 gdb::function_view.
5287 * linespec.c (struct collect_minsyms): Remove.
5288 (compare_msyms): Now a std::sort comparator.
5289 (add_minsym): Add parameters.
5290 (search_minsyms_for_name): Update. Use std::vector.
5291
5292 2018-04-03 Tom Tromey <tom@tromey.com>
5293
5294 * mipsread.c (read_alphacoff_dynamic_symtab): Use
5295 gdb::byte_vector.
5296
5297 2018-04-02 Weimin Pan <weimin.pan@oracle.com>
5298
5299 * MAINTAINERS (Write After Approval): Add Weimin Pan.
5300
5301 2018-04-02 Weimin Pan <weimin.pan@oracle.com>
5302
5303 PR gdb/16959
5304 * cp-valprint.c: (cp_print_static_field) Fix infinite recursion when
5305 printing static type.
5306
5307 2018-04-01 Tom Tromey <tom@tromey.com>
5308
5309 * rs6000-nat.c (rs6000_ptrace_ldinfo): Return a byte_vector.
5310 (rs6000_xfer_shared_libraries): Update.
5311
5312 2018-04-01 Simon Marchi <simon.marchi@polymtl.ca>
5313
5314 * common/gdb_vecs.h (char_ptr): Remove.
5315 * tracepoint.c (encode_actions_1): Remove usage of char_ptr.
5316
5317 2018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
5318
5319 * guile/scm-utils.c (gdbscm_parse_function_args): Replace VEC
5320 with std::vector.
5321 * common/gdb_vecs.h (DEF_VEC_P (char_ptr)): Remove.
5322
5323 2018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
5324
5325 * tracepoint.h (struct uploaded_tp): Initialize fields.
5326 <actions, step_actions, cmd_strings>: Change type to
5327 std::vector<char *>.
5328 * tracepoint.c (get_uploaded_tp): Allocate with new.
5329 (free_uploaded_tps): Free with delete.
5330 (parse_tracepoint_definition): Adjust to std::vector change.
5331 * breakpoint.c (read_uploaded_action): Likewise.
5332 (create_tracepoint_from_upload): Likewise.
5333 * ctf.c (ctf_write_uploaded_tp): Likewise.
5334 (SET_ARRAY_FIELD): Likewise.
5335 * tracefile-tfile.c (tfile_write_uploaded_tp): Likewise.
5336
5337 2018-03-30 Tom Tromey <tom@tromey.com>
5338
5339 * solib-svr4.c (lm_info_read): Use gdb::byte_vector. Return
5340 std::unique_ptr.
5341 (svr4_keep_data_in_core): Update.
5342 (svr4_read_so_list): Update.
5343
5344 2018-03-30 Tom Tromey <tom@tromey.com>
5345
5346 * windows-nat.c (handle_output_debug_string, handle_exception):
5347 Update.
5348 * target.h (target_read_string): Update.
5349 * target.c (target_read_string): Change "string" to
5350 unique_xmalloc_ptr.
5351 * solib-svr4.c (open_symbol_file_object, svr4_read_so_list):
5352 Update.
5353 * solib-frv.c (frv_current_sos): Update.
5354 * solib-dsbt.c (dsbt_current_sos): Update.
5355 * solib-darwin.c (darwin_current_sos): Update.
5356 * linux-thread-db.c (inferior_has_bug): Update.
5357 * expprint.c (print_subexp_standard) <case OP_OBJC_MSGCALL>:
5358 Update. Remove alloca.
5359 * ada-lang.c (ada_main_name): Update.
5360
5361 2018-03-30 Tom Tromey <tom@tromey.com>
5362
5363 * dwarf2read.c (struct free_dwo_file_cleanup_data): Remove.
5364 (struct dwo_file_deleter): New.
5365 (dwo_file_up): New typedef.
5366 (open_and_init_dwo_file): Use dwo_file_up.
5367 (free_dwo_file_cleanup): Remove.
5368
5369 2018-03-30 Tom Tromey <tom@tromey.com>
5370
5371 * dwarf2read.c (free_dwo_file): Remove "objfile" parameter.
5372 (free_dwo_file_cleanup, free_dwo_file_from_slot): Update.
5373
5374 2018-03-30 Tom Tromey <tom@tromey.com>
5375
5376 * dwarf2read.c (class free_cached_comp_units): New class.
5377 (dw2_instantiate_symtab, dwarf2_build_psymtabs_hard): Use it.
5378 (free_cached_comp_units): Remove function.
5379
5380 2018-03-30 Tom Tromey <tom@tromey.com>
5381
5382 * utils.h (make_cleanup_unpush_target): Remove.
5383 * inf-ptrace.c (struct target_unpusher): New.
5384 (target_unpush_up) New typedef.
5385 (inf_ptrace_create_inferior, inf_ptrace_attach): Use
5386 target_unpush_up.
5387 * utils.c (do_unpush_target, make_cleanup_unpush_target): Remove.
5388
5389 2018-03-27 Tom Tromey <tom@tromey.com>
5390
5391 * utils.c (prompt_for_continue): Use unique_xmalloc_ptr.
5392
5393 2018-03-27 Pedro Alves <palves@redhat.com>
5394 Tom Tromey <tom@tromey.com>
5395
5396 * top.c (class gdb_readline_wrapper_cleanup): Add constructor,
5397 destructor. Now a class.
5398 (gdb_readline_wrapper_cleanup): Remove function.
5399 (gdb_readline_wrapper): Remove cleanups.
5400
5401 2018-03-27 Tom Tromey <tom@tromey.com>
5402
5403 * typeprint.h (struct type_print_options) <local_typedefs,
5404 global_typedefs>: Remove "struct" keyword.
5405 (class typedef_hash_table): New class.
5406 (recursively_update_typedef_hash, add_template_parameters)
5407 (create_typedef_hash, free_typedef_hash, copy_typedef_hash)
5408 (find_typedef_in_hash): Don't declare.
5409 * typeprint.c (struct typedef_hash_table): Move to typeprint.h.
5410 (typedef_hash_table::recursively_update): Rename from
5411 recursively_update_typedef_hash. Now a member.
5412 (typedef_hash_table::add_template_parameters): Rename from
5413 add_template_parameters. Now a member.
5414 (typedef_hash_table::typedef_hash_table): Now a constructor;
5415 rename from create_typedef_hash.
5416 (typedef_hash_table::~typedef_hash_table): Now a destructor;
5417 rename from free_typedef_hash.
5418 (do_free_typedef_hash, make_cleanup_free_typedef_hash)
5419 (do_free_global_table): Remove.
5420 (typedef_hash_table::typedef_hash_table): New constructor; renamed
5421 from copy_type_recursive.
5422 (create_global_typedef_table): Remove.
5423 (typedef_hash_table::find_global_typedef): Now a member of
5424 typedef_hash_table.
5425 (typedef_hash_table::find_typedef): Rename from
5426 find_typedef_in_hash; now a member.
5427 (whatis_exp): Update.
5428 * extension.h (struct ext_lang_type_printers): Add constructor and
5429 destructor.
5430 (start_ext_lang_type_printers, free_ext_lang_type_printers): Don't
5431 declare.
5432 * extension.c (ext_lang_type_printers::ext_lang_type_printers):
5433 Now a constructor; rename from start_ext_lang_type_printers.
5434 (ext_lang_type_printers): Now a destructor; rename from
5435 free_ext_lang_type_printers.
5436 * c-typeprint.c (find_typedef_for_canonicalize, c_print_type_1):
5437 Update.
5438 (c_type_print_base_struct_union): Update. Remove cleanups.
5439
5440 2018-03-27 Tom Tromey <tom@tromey.com>
5441
5442 * dwarf-index-write.c: Include <cmath>.
5443
5444 2018-03-27 Joel Brobecker <brobecker@adacore.com>
5445
5446 * NEWS: Add entry describing new "set|show varsize-limit" command.
5447 * ada-lang.c (_initialize_ada_language): Add "set/show varsize-limit"
5448 command.
5449 * printcmd.c (_initialize_printcmd): Add "set var" alias of
5450 "set variable".
5451
5452 2018-03-27 Simon Marchi <simon.marchi@ericsson.com>
5453
5454 * Makefile.in (COMMON_SFILES): Add dwarf-index-common.c and
5455 dwarf-index-write.c
5456 (HFILES_NO_SRCDIR): Add dwarf-index-common.h and dwarf2read.h.
5457 * dwarf-index-common.c: New file.
5458 * dwarf-index-common.h: New file.
5459 * dwarf-index-write.c: New file.
5460 * dwarf2read.c: Include dwarf2read.h and dwarf-index-common.h.
5461 (struct dwarf2_section_info): Move from here.
5462 (dwarf2_section_info_def): Likewise.
5463 (DEF_VEC_O (dwarf2_section_info_def)): Likewise.
5464 (offset_type): Likewise.
5465 (DW2_GDB_INDEX_SYMBOL_STATIC_SET_VALUE): Likewise.
5466 (DW2_GDB_INDEX_SYMBOL_KIND_SET_VALUE): Likewise.
5467 (DW2_GDB_INDEX_CU_SET_VALUE): Likewise.
5468 (byte_swap): Likewise.
5469 (MAYBE_SWAP): Likewise.
5470 (dwarf2_per_cu_ptr): Likewise.
5471 (DEF_VEC_P (dwarf2_per_cu_ptr)): Likewise.
5472 (struct tu_stats): Likewise.
5473 (struct dwarf2_per_objfile): Likewise.
5474 (struct dwarf2_per_cu_data): Likewise.
5475 (struct signatured_type): Likewise.
5476 (sig_type_ptr): Likewise.
5477 (DEF_VEC_P (sig_type_ptr)): Likewise.
5478 (INDEX4_SUFFIX): Likewise.
5479 (INDEX5_SUFFIX): Likewise.
5480 (DEBUG_STR_SUFFIX): Likewise.
5481 (dwarf2_read_section): Make non-static.
5482 (mapped_index_string_hash): Move from here.
5483 (dwarf5_djb_hash): Likewise.
5484 (file_write): Likewise.
5485 (class data_buf): Likewise.
5486 (struct symtab_index_entry): Likewise.
5487 (struct mapped_symtab): Likewise.
5488 (find_slot): Likewise.
5489 (hash_expand): Likewise.
5490 (add_index_entry): Likewise.
5491 (uniquify_cu_indices): Likewise.
5492 (class c_str_view): Likewise.
5493 (class c_str_view_hasher): Likewise.
5494 (class vector_hasher): Likewise.
5495 (write_hash_table): Likewise.
5496 (psym_index_map): Likewise.
5497 (struct addrmap_index_data): Likewise.
5498 (add_address_entry): Likewise.
5499 (add_address_entry_worker): Likewise.
5500 (write_address_map): Likewise.
5501 (symbol_kind): Likewise.
5502 (write_psymbols): Likewise.
5503 (struct signatured_type_index_data): Likewise.
5504 (write_one_signatured_type): Likewise.
5505 (recursively_count_psymbols): Likewise.
5506 (recursively_write_psymbols): Likewise.
5507 (class debug_names): Likewise.
5508 (check_dwarf64_offsets): Likewise.
5509 (psyms_seen_size): Likewise.
5510 (write_gdbindex): Likewise.
5511 (write_debug_names): Likewise.
5512 (assert_file_size): Likewise.
5513 (write_psymtabs_to_index): Likewise.
5514 (save_gdb_index_command): Likewise.
5515 (_initialize_dwarf2_read): Don't register the "save gdb-index"
5516 command.
5517 * dwarf2read.h: New file.
5518
5519 2018-03-27 Joel Brobecker <brobecker@adacore.com>
5520
5521 PR gdb/22670
5522 * dwarf2read.c (dwarf2_physname): Do not return the demangled
5523 symbol name if the CU's language stores symbol names in linkage
5524 format.
5525 * language.h (struct language_defn)
5526 <la_store_sym_names_in_linkage_form_p>: New field. Adjust
5527 all instances of this struct.
5528
5529 2018-03-26 Tom Tromey <tom@tromey.com>
5530
5531 * stack.c (backtrace_command_1): Remove verbose code.
5532
5533 2018-03-26 Tom Tromey <tom@tromey.com>
5534
5535 * python/py-framefilter.c (py_print_type): Don't catch
5536 exceptions. Return void.
5537 (py_print_value): Likewise.
5538 (py_print_single_arg): Likewise.
5539 (enumerate_args): Don't catch exceptions.
5540 (py_print_args): Likewise.
5541 (py_print_frame): Likewise.
5542 (gdbpy_apply_frame_filter): Catch exceptions here.
5543
5544 2018-03-26 Tom Tromey <tom@tromey.com>
5545
5546 * stack.c (_initialize_stack): Remove trailing newlines from help
5547 text. Add "Usage" line to "backtrace" help.
5548
5549 2018-03-26 Tom Tromey <tom@tromey.com>
5550
5551 PR python/16486:
5552 * python/py-framefilter.c (py_print_args): Call wrap_hint.
5553
5554 2018-03-26 Tom Tromey <tom@tromey.com>
5555
5556 * python/py-framefilter.c (py_print_single_arg): Return
5557 EXT_LANG_BT_ERROR from catch.
5558
5559 2018-03-26 Tom Tromey <tom@tromey.com>
5560
5561 PR backtrace/15584:
5562 * stack.c (backtrace_command_1): Move some code into no-filters
5563 "if".
5564
5565 2018-03-26 Tom Tromey <tom@tromey.com>
5566
5567 * python/py-framefilter.c (throw_quit_or_print_exception): New
5568 function.
5569 (gdbpy_apply_frame_filter): Use it.
5570
5571 2018-03-26 Tom Tromey <tom@tromey.com>
5572
5573 PR cli/17716:
5574 * python/py-framefilter.c (py_print_type, py_print_value)
5575 (enumerate_args, py_print_args, gdbpy_apply_frame_filter): Use
5576 RETURN_MASK_ERROR.
5577
5578 2018-03-26 Tom Tromey <tom@tromey.com>
5579
5580 * python/py-framefilter.c (enumerate_args): Use
5581 gdb::unique_xmalloc_ptr.
5582
5583 2018-03-26 Tom Tromey <tom@tromey.com>
5584
5585 * python/py-framefilter.c (py_print_frame): Return
5586 EXT_LANG_BT_OK.
5587 (gdbpy_apply_frame_filter): Update comment.
5588 * extension.h (enum ext_lang_bt_status) <EXT_LANG_BT_COMPLETED>:
5589 Remove.
5590 <EXT_LANG_BT_NO_FILTERS>: Change value.
5591
5592 2018-03-26 Tom Tromey <tom@tromey.com>
5593
5594 PR backtrace/15582:
5595 * stack.c (backtrace_command): Parse "hide" argument.
5596 * python/py-framefilter.c (py_print_frame): Handle PRINT_HIDE.
5597 * extension.h (enum frame_filter_flags) <PRINT_HIDE>: New
5598 constant.
5599
5600 2018-03-26 Tom Tromey <tom@tromey.com>
5601
5602 * stack.c (backtrace_command_1): Remove "show_locals" parameter,
5603 add "flags".
5604 (backtrace_command): Remove "fulltrace", add "flags".
5605
5606 2018-03-26 Tom Tromey <tom@tromey.com>
5607
5608 * stack.c (backtrace_command): Rewrite command line parsing.
5609
5610 2018-03-26 Simon Marchi <simon.marchi@ericsson.com>
5611
5612 * dwarf2read.c (DEF_VEC_I(offset_type)): Remove.
5613
5614 2018-03-26 Simon Marchi <simon.marchi@ericsson.com>
5615
5616 * filename-seen-cache.h: Add include guard.
5617
5618 2018-03-26 Keith Seitz <keiths@redhat.com>
5619
5620 * symfile.c (place_section): Remove "struct" from section_addr_info
5621 in comment.
5622 * windows-nat.c (struct safe_symbol_file_add_args) <addrs>: Remove
5623 "struct" keyword from section_addr_info.
5624
5625 2018-03-26 Alan Hayward <alan.hayward@arm.com>
5626
5627 * regformats/regdef.h (reg): Add constructors.
5628
5629 2018-03-25 Pedro Alves <palves@redhat.com>
5630
5631 * eval.c (evaluate_funcall): Swap OP_VAR_MSYM_VALUE/OP_VAR_VALUE
5632 if then/else bodies in var_func_name extraction.
5633
5634 2018-03-23 Weimin Pan <weimin.pan@oracle.com>
5635
5636 * minsyms.c (lookup_minimal_symbol_and_objfile): Use
5637 lookup_minimal_symbol() to find symbol entry.
5638 * minsyms.h (lookup_minimal_symbol_and_objfile): Update comment.
5639
5640 2018-03-23 Keith Seitz <keiths@redhat.com>
5641
5642 PR c++/22968
5643 * dwarf2read.c (scan_partial_symbols): Scan structs/classes for
5644 nested type definitions for C++, too.
5645
5646 2018-03-23 Tom Tromey <tom@tromey.com>
5647
5648 * machoread.c (struct oso_el): Add a constructor. Don't define as
5649 a typedef.
5650 (macho_register_oso): Remove.
5651 (macho_symtab_read): Take a std::vector.
5652 (oso_el_compare_name): Now a std::sort comparator.
5653 (macho_symfile_read_all_oso): Take a std::vector.
5654 (macho_symfile_read): Use std::vector. Remove cleanups.
5655
5656 2018-03-22 Tom Tromey <tom@tromey.com>
5657
5658 * record-full.c (record_full_exec_insn): Use gdb::byte_vector.
5659 (record_full_goto_bookmark): Use std::string.
5660
5661 2018-03-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
5662
5663 PR tdep/18295
5664 * rs6000-tdep.c (skip_prologue): Match both stwux and stdux
5665 a single mask.
5666
5667 2018-03-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
5668
5669 * rs6000-tdep.c (store_insn_p): New function.
5670 (skip_prologue): New variable alloca_reg_offset. Set lr_reg
5671 and cr_reg to their unshifted values. Use store_insn_p to
5672 match LR saves using either R1 or fdata->alloca_reg. Use
5673 store_insn_p to match CR saves. Set alloca_reg_offset
5674 when alloca_reg and framep are set. Remove lr_reg shift
5675 when assigning to fdata->lr_register.
5676
5677 2018-03-22 Andreas Arnez <arnez@linux.vnet.ibm.com>
5678
5679 * linux-tdep.c (linux_info_proc): For "info proc cmdline", print
5680 command line args instead of emitting a warning.
5681
5682 2018-03-22 Simon Marchi <simon.marchi@polymtl.ca>
5683
5684 * tracepoint.h (struct static_tracepoint_marker): Initialize
5685 fields, define default constructor, move constructor and move
5686 assignment, disable the rest.
5687 <str_id, extra>: Make std::string.
5688 (release_static_tracepoint_marker): Remove.
5689 (free_current_marker): Remove.
5690 * tracepoint.c (free_current_marker): Remove.
5691 (parse_static_tracepoint_marker_definition): Adjust to
5692 std::string, use new hex2str overload.
5693 (release_static_tracepoint_marker): Remove.
5694 (print_one_static_tracepoint_marker): Get marker by reference
5695 and adjust to std::string.
5696 (info_static_tracepoint_markers_command): Adjust to std::vector
5697 changes
5698 * target.h (static_tracepoint_marker_p): Remove typedef.
5699 (DEF_VEC_P(static_tracepoint_marker_p)): Remove.
5700 (struct target_ops) <to_static_tracepoint_marker_at>: Return
5701 bool.
5702 <to_static_tracepoint_markers_by_strid>: Return std::vector.
5703 * target-debug.h
5704 (target_debug_print_VEC_static_tracepoint_marker_p_p): Remove.
5705 (target_debug_print_std_vector_static_tracepoint_marker): New.
5706 (target_debug_print_struct_static_tracepoint_marker_p): Rename
5707 to...
5708 (target_debug_print_static_tracepoint_marker_p): ... this.
5709 * target-delegates.c: Re-generate.
5710 * breakpoint.h (struct tracepoint) <static_trace_marker_id>:
5711 Make std::string.
5712 * breakpoint.c (init_breakpoint_sal): Adjust to std::string.
5713 (decode_static_tracepoint_spec): Adjust to std::vector.
5714 (tracepoint_print_one_detail): Adjust to std::string.
5715 (strace_marker_decode_location): Adjust to std::string.
5716 (update_static_tracepoint): Adjust to std::string, remove call
5717 to release_static_tracepoint_marker.
5718 * linux-nat.c (linux_child_static_tracepoint_markers_by_strid):
5719 Adjust to std::vector.
5720 * remote.c (remote_static_tracepoint_marker_at): Return bool.
5721 (remote_static_tracepoint_markers_by_strid): Adjust to
5722 std::vector.
5723 * common/rsp-low.h (hex2str): New overload with explicit count
5724 of bytes.
5725 * common/rsp-low.c (hex2str): New overload with explicit count
5726 of bytes.
5727 * unittests/rsp-low-selftests.c (test_hex2str): New function.
5728 (_initialize_rsp_low_selftests): Add test_hex2str test.
5729 * unittests/tracepoint-selftests.c
5730 (test_parse_static_tracepoint_marker_definition): Adjust to
5731 std::string.
5732
5733 2018-03-22 Simon Marchi <simon.marchi@polymtl.ca>
5734
5735 * tracepoint.c (parse_static_tracepoint_marker_definition):
5736 Consider case where the definition is followed by more
5737 definitions.
5738 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
5739 tracepoint-selftests.c.
5740 * unittests/tracepoint-selftests.c: New.
5741
5742 2018-03-21 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
5743
5744 * MAINTAINERS (Write After Approval): Add Pedro Franco de
5745 Carvalho.
5746
5747 2018-03-20 Stephen Roberts <stephen.roberts@arm.com>
5748
5749 * symtab.c (find_pc_sect_line): fixed indentation.
5750
5751 2018-03-20 Stephen Roberts <stephen.roberts@arm.com>
5752
5753 * symtab.c (find_pc_sect_line): now uses binary search.
5754
5755 2018-03-19 Tom Tromey <tom@tromey.com>
5756
5757 * rust-exp.y (struct_expr_tail, struct_expr_list): Add plain
5758 "IDENT" production.
5759
5760 2018-03-19 Pedro Alves <palves@redhat.com>
5761 Tom Tromey <tom@tromey.com>
5762
5763 * unittests/observable-selftests.c: New file.
5764 * common/observable.h: New file.
5765 * observable.h: New file.
5766 * ada-lang.c, ada-tasks.c, agent.c, aix-thread.c, annotate.c,
5767 arm-tdep.c, auto-load.c, auxv.c, break-catch-syscall.c,
5768 breakpoint.c, bsd-uthread.c, cli/cli-interp.c, cli/cli-setshow.c,
5769 corefile.c, dummy-frame.c, event-loop.c, event-top.c, exec.c,
5770 extension.c, frame.c, gdbarch.c, guile/scm-breakpoint.c,
5771 infcall.c, infcmd.c, inferior.c, inflow.c, infrun.c, jit.c,
5772 linux-tdep.c, linux-thread-db.c, m68klinux-tdep.c,
5773 mi/mi-cmd-break.c, mi/mi-interp.c, mi/mi-main.c, objfiles.c,
5774 ppc-linux-nat.c, ppc-linux-tdep.c, printcmd.c, procfs.c,
5775 python/py-breakpoint.c, python/py-finishbreakpoint.c,
5776 python/py-inferior.c, python/py-unwind.c, ravenscar-thread.c,
5777 record-btrace.c, record-full.c, record.c, regcache.c, remote.c,
5778 riscv-tdep.c, sol-thread.c, solib-aix.c, solib-spu.c, solib.c,
5779 spu-multiarch.c, spu-tdep.c, stack.c, symfile-mem.c, symfile.c,
5780 symtab.c, thread.c, top.c, tracepoint.c, tui/tui-hooks.c,
5781 tui/tui-interp.c, valops.c: Update all users.
5782 * tui/tui-hooks.c (tui_bp_created_observer)
5783 (tui_bp_deleted_observer, tui_bp_modified_observer)
5784 (tui_inferior_exit_observer, tui_before_prompt_observer)
5785 (tui_normal_stop_observer, tui_register_changed_observer):
5786 Remove.
5787 (tui_observers_token): New global.
5788 (attach_or_detach, tui_attach_detach_observers): New functions.
5789 (tui_install_hooks, tui_remove_hooks): Use
5790 tui_attach_detach_observers.
5791 * record-btrace.c (record_btrace_thread_observer): Remove.
5792 (record_btrace_thread_observer_token): New global.
5793 * observer.sh: Remove.
5794 * observer.c: Rename to observable.c.
5795 * observable.c (namespace gdb_observers): Define new objects.
5796 (observer_debug): Move into gdb_observers namespace.
5797 (struct observer, struct observer_list, xalloc_observer_list_node)
5798 (xfree_observer_list_node, generic_observer_attach)
5799 (generic_observer_detach, generic_observer_notify): Remove.
5800 (_initialize_observer): Update.
5801 Don't include observer.inc.
5802 * Makefile.in (generated_files): Remove observer.h, observer.inc.
5803 (clean mostlyclean): Likewise.
5804 (observer.h, observer.inc): Remove targets.
5805 (SUBDIR_UNITTESTS_SRCS): Add observable-selftests.c.
5806 (COMMON_SFILES): Use observable.c, not observer.c.
5807 * .gitignore: Remove observer.h.
5808
5809 2018-03-18 Tom Tromey <tom@tromey.com>
5810
5811 * solib.c (gdb_bfd_lookup_symbol_from_symtab): Use
5812 gdb::def_vector.
5813 (bfd_lookup_symbol_from_dyn_symtab): Likewise.
5814
5815 2018-03-17 Tom Tromey <tom@tromey.com>
5816
5817 * auto-load.c (auto_load_objfile_script_1): Use std::string.
5818
5819 2018-03-17 Tom Tromey <tom@tromey.com>
5820
5821 * target.c (class scoped_target_fd): New.
5822 (target_fileio_close_cleanup): Remove.
5823 (target_fileio_read_alloc_1): Use scoped_target_fd.
5824
5825 2018-03-16 Simon Marchi <simon.marchi@polymtl.ca>
5826
5827 * silent-rules.mk: New.
5828 * Makefile.in: Include silent-rules.mk
5829 (srcdir, VPATH, top_srcdir): Move up.
5830 (COMPILE): Add ECHO_CXX.
5831 (test-cp-name-parser$(EXEEXT)): Add ECHO_CXXLD.
5832 (init.c): Add ECHO_INIT_C.
5833 (gdb$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
5834 (version.c): Add ECHO_GEN.
5835 (printcmd.o): Add ECHO_CXX.
5836 (target-float.o): Add ECHO_CXX.
5837 (ada-exp.o): Add ECHO_CXX.
5838 (stamp-xml): Add SILENCE and ECHO_GEN_XML_BUILTIN.
5839 (insight$(EXEEXT)): Add ECHO_CXXLD.
5840 * gnulib/configure.ac: Add AM_SILENT_RULES.
5841 * gnulib/aclocal.m4: Re-generate.
5842 * gnulib/configure: Re-generate.
5843 * gnulib/import/Makefile.in: Re-generate.
5844
5845 2018-03-16 Tom Tromey <tom@tromey.com>
5846
5847 * xcoffread.c (xcoff_symfile_offsets): Change type of "addrs".
5848 * utils.h (make_cleanup_free_section_addr_info): Don't declare.
5849 * utils.c (do_free_section_addr_info)
5850 (make_cleanup_free_section_addr_info): Remove.
5851 * symfile.h (struct other_sections): Add constructor.
5852 (struct section_addr_info): Remove.
5853 (section_addr_info): New typedef.
5854 (struct sym_fns) <sym_offsets>: Change type of parameter.
5855 (build_section_addr_info_from_objfile)
5856 (relative_addr_info_to_section_offsets, addr_info_make_relative)
5857 (default_symfile_offsets, symbol_file_add)
5858 (symbol_file_add_from_bfd)
5859 (build_section_addr_info_from_section_table): Update.
5860 (alloc_section_addr_info, free_section_addr_info): Don't declare.
5861 * symfile.c (alloc_section_addr_info): Remove.
5862 (build_section_addr_info_from_section_table): Change return type.
5863 Update.
5864 (build_section_addr_info_from_bfd)
5865 (build_section_addr_info_from_objfile): Likewise.
5866 (free_section_addr_info): Remove.
5867 (relative_addr_info_to_section_offsets): Change type of "addrs".
5868 (addrs_section_compar): Now a std::sort comparator.
5869 (addrs_section_sort): Change return type.
5870 (addr_info_make_relative): Change type of "addrs". Update.
5871 (default_symfile_offsets, syms_from_objfile_1)
5872 (syms_from_objfile, symbol_file_add_with_addrs): Likewise.
5873 (symbol_file_add_separate): Update.
5874 (symbol_file_add): Change type of "addrs". Update.
5875 (add_symbol_file_command): Update. Remove cleanups.
5876 * symfile-mem.c (symbol_file_add_from_memory): Update. Remove
5877 cleanups.
5878 * symfile-debug.c (debug_sym_offsets): Change type of "info".
5879 * solib.c (solib_read_symbols): Update.
5880 * objfiles.c (objfile_relocate): Update. Remove cleanups.
5881 * machoread.c (macho_symfile_offsets): Update.
5882 * jit.c (jit_bfd_try_read_symtab): Update.
5883
5884 2018-03-15 Simon Marchi <simon.marchi@polymtl.ca>
5885
5886 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
5887 unittests/utils-selftests.c.
5888 * unittests/utils-selftests.c: New file.
5889
5890 2018-03-14 Tom Tromey <tom@tromey.com>
5891
5892 PR cli/14977:
5893 * printcmd.c (printf_c_string, printf_wide_c_string): Special case
5894 for NULL.
5895
5896 2018-03-14 Tom Tromey <tom@tromey.com>
5897
5898 PR cli/19918:
5899 * printcmd.c (printf_pointer): Allow "-" in format.
5900
5901 2018-03-14 Tom Tromey <tom@tromey.com>
5902
5903 * printcmd.c (_initialize_printcmd): Add usage to printf.
5904
5905 2018-03-14 Yao Qi <qiyao@sourceware.org>
5906
5907 * MAINTAINERS: Update my email address.
5908
5909 2018-03-13 Tom Tromey <tom@tromey.com>
5910
5911 * machoread.c (macho_check_dsym): Change filenamep to a
5912 std::string*.
5913 (macho_symfile_read): Update.
5914 * symfile.c (load_command): Use std::string.
5915
5916 2018-03-12 Andrew Burgess <andrew.burgess@embecosm.com>
5917
5918 * riscv-tdep.c (riscv_sw_breakpoint_from_kind): Add localization
5919 to error message string.
5920 (riscv_register_name): Use xsnprintf instead of sprintf.
5921 (riscv_insn::fetch_instruction): Use gdb_assert instead of
5922 internal_error.
5923 (riscv_print_arg_location): Use gdb_assert_not_reached instead of
5924 error.
5925 (riscv_push_dummy_call): Likewise.
5926
5927 2018-03-12 Tom Tromey <tom@tromey.com>
5928
5929 * rs6000-aix-tdep.c (rs6000_aix_core_xfer_shared_libraries_aix):
5930 Use gdb::byte_vector.
5931 * arm-tdep.c (arm_exidx_new_objfile): Use gdb::byte_vector.
5932
5933 2018-03-12 Yao Qi <yao.qi@linaro.org>
5934
5935 * ia64-libunwind-tdep.c (libunwind_get_reg_special): Change
5936 parameter type to readable_regcache.
5937 * ia64-libunwind-tdep.h (libunwind_get_reg_special): Update
5938 the declaration.
5939
5940 2018-03-11 Tom Tromey <tom@tromey.com>
5941
5942 * dwarf2read.c (struct nextfield): Add initializers.
5943 (struct nextfnfield): Remove.
5944 (struct fnfieldlist): Add initializers. Remove "length" and
5945 "head", use std::vector.
5946 (struct decl_field_list): Remove.
5947 (struct field_info): Add initializers.
5948 <fields, baseclasses>: Now std::vector.
5949 <nbaseclasses, nfnfields, typedef_field_list_count,
5950 nested_types_list_count>: Remove.
5951 (dwarf2_add_field, dwarf2_add_type_defn)
5952 (dwarf2_attach_fields_to_type, dwarf2_add_member_fn)
5953 (dwarf2_attach_fn_fields_to_type, handle_struct_member_die)
5954 (process_structure_scope): Update.
5955
5956 2018-03-11 Tom Tromey <tom@tromey.com>
5957
5958 * dwarf2read.c (sort_tu_by_abbrev_offset): Change to be suitable
5959 for use by std::sort.
5960 (build_type_psymtabs_1): Use std::vector.
5961
5962 2018-03-09 Eli Zaretskii <eliz@gnu.org>
5963
5964 * top.c (print_gdb_configuration): Reflect LIBIPT, LIBMEMCHECK,
5965 and LIBMPFR in the printed configuration.
5966
5967 2018-03-08 Tom Tromey <tom@tromey.com>
5968
5969 * source.c (get_filename_and_charpos): Use scoped_fd.
5970 * nto-procfs.c (procfs_open_1): Use scoped_fd.
5971 (procfs_pidlist): Likewise.
5972 * procfs.c (proc_get_LDT_entry): Use scoped_fd.
5973 (iterate_over_mappings): Likewise.
5974
5975 2018-03-08 Tom Tromey <tom@tromey.com>
5976
5977 * infcall.c (struct call_return_meta_info)
5978 <stack_temporaries_enabled>: Remove.
5979 (get_call_return_value, call_function_by_hand_dummy): Update.
5980 * thread.c (disable_thread_stack_temporaries): Remove.
5981 (enable_thread_stack_temporaries): Remove.
5982 (thread_stack_temporaries_enabled_p): Return bool.
5983 (push_thread_stack_temporary, value_in_thread_stack_temporaries)
5984 (get_last_thread_stack_temporary): Update.
5985 * eval.c (evaluate_subexp): Update.
5986 * gdbthread.h (class enable_thread_stack_temporaries): Now a
5987 class, not a function.
5988 (value_ptr, value_vec): Remove typedefs.
5989 (class thread_info) <stack_temporaries_enabled>: Now bool.
5990 <stack_temporaries>: Now a std::vector.
5991 (thread_stack_temporaries_enabled_p)
5992 (value_in_thread_stack_temporaries): Return bool.
5993
5994 2018-03-08 Simon Marchi <simon.marchi@ericsson.com>
5995
5996 * remote.c (putpkt_binary): Fix omitted bytes reporting.
5997 (getpkt_or_notif_sane_1): Likewise.
5998
5999 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
6000
6001 * build-id.c (build_id_to_debug_bfd): Use std::string.
6002
6003 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
6004
6005 * build-id.c (find_separate_debug_file_by_buildid): Return
6006 std::string.
6007 * build-id.h (find_separate_debug_file_by_buildid): Return
6008 std::string.
6009 * coffread.c (coff_symfile_read): Adjust to std::string.
6010 * elfread.c (elf_symfile_read): Adjust to std::string.
6011 * symfile.c (separate_debug_file_exists): Change parameter to
6012 std::string.
6013 (find_separate_debug_file): Return std::string.
6014 (find_separate_debug_file_by_debuglink): Return std::string.
6015 * symfile.h (find_separate_debug_file_by_debuglink): Return
6016 std::string.
6017
6018 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
6019
6020 * common/xml-utils.c (xml_escape_text): Move code to...
6021 (xml_escape_text_append): ... this new function.
6022 * common/xml-utils.h (xml_escape_text_append): New declaration.
6023 * unittests/xml-utils-selftests.c (test_xml_escape_text_append):
6024 New function.
6025 (_initialize_xml_utils): register test_xml_escape_text_append as
6026 a selftest.
6027
6028 2018-03-07 Alan Hayward <alan.hayward@arm.com>
6029
6030 * defs.h: Remove MAX_REGISTER_SIZE.
6031 * regcache.c (init_regcache_descr): Remove MAX_REGISTER_SIZE
6032 asserts.
6033 * python/py-unwind.c (pyuw_sniffer): Likewise.
6034
6035 2018-03-07 Tom Tromey <tom@tromey.com>
6036
6037 * linux-tdep.c (linux_info_proc): Update.
6038 * target.h (struct target_ops) <to_fileio_readlink>: Return
6039 optional<string>.
6040 (target_fileio_readlink): Return optional<string>.
6041 * remote.c (remote_hostio_readlink): Return optional<string>.
6042 * inf-child.c (inf_child_fileio_readlink): Return
6043 optional<string>.
6044 * target.c (target_fileio_readlink): Return optional<string>.
6045
6046 2018-03-07 Andrew Burgess <andrew.burgess@embecosm.com>
6047
6048 * regcache.c (cooked_read_test): Add riscv to the list of
6049 architectures that have a save_reggroup.
6050
6051 2018-03-07 Andreas Arnez <arnez@linux.vnet.ibm.com>
6052
6053 * gnu-v3-abi.c (gnuv3_rtti_type): Add early exit if the given
6054 value is not a dynamic class object.
6055
6056 2018-03-06 Tom Tromey <tom@tromey.com>
6057
6058 * rust-exp.y: Formatting fixes.
6059
6060 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
6061
6062 * riscv-tdep.c (riscv_register_name): Remove target description
6063 support.
6064 (riscv_gdbarch_init): Remove target description check.
6065
6066 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
6067
6068 * riscv-tdep.c: Remove 'Contributed by ...' lines from header
6069 comment.
6070 * riscv-tdep.h: Likewise.
6071
6072 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
6073
6074 * riscv-tdep.c (riscv_pseudo_register_read): Delete.
6075 (riscv_pseudo_register_write): Delete.
6076 (riscv_gdbarch_init): Remove all use of pseudo registers.
6077
6078 2018-03-06 Simon Marchi <simon.marchi@polymtl.ca>
6079
6080 * record-btrace.c (btrace_print_lines): Replace cleanup
6081 parameter with RAII equivalents.
6082 (btrace_insn_history): Replace cleanup with RAII equivalents.
6083 * ui-out.h (make_cleanup_ui_out_list_begin_end,
6084 make_cleanup_ui_out_tuple_begin_end): Remove.
6085 * ui-out.c (struct ui_out_end_cleanup_data, do_cleanup_end,
6086 make_cleanup_ui_out_end, make_cleanup_ui_out_tuple_begin_end,
6087 make_cleanup_ui_out_list_begin_end): Remove.
6088
6089 2018-03-06 Simon Marchi <simon.marchi@polymtl.ca>
6090
6091 * record-btrace.c (record_btrace_maybe_mark_async_event): Change
6092 parameter types to std::vector. Use bool.
6093 (record_btrace_wait): Replace VEC(tp_t) with
6094 std::vector<thread_info *>.
6095 * common/gdb_vecs.h (unordered_remove, ordered_remove): New.
6096
6097 2018-03-06 Simon Marchi <simon.marchi@polymtl.ca>
6098
6099 * record-btrace.c (record_btrace_disable_callback): Remove.
6100 (struct scoped_btrace_disable): New.
6101 (record_btrace_open): Use scoped_btrace_disable.
6102
6103 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
6104
6105 * riscv-tdep.c (riscv_return_value): Change type to ULONGEST for
6106 reading values from registers.
6107
6108 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
6109
6110 * riscv-tdep.c (riscv_push_dummy_call): Use core_addr_to_string_nz
6111 where appropriate.
6112
6113 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
6114
6115 * riscv-tdep.c (riscv_print_arg_location): Add header comment,
6116 change parameter type. Use GDB's print functions, and use
6117 core_addr_to_string where appropriate.
6118 (riscv_push_dummy_call): Use core_addr_to_string where
6119 appropriate, update call to riscv_print_arg_location, and reindent
6120 a few lines.
6121 (riscv_return_value): Update call to riscv_print_arg_location.
6122
6123 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
6124 Tim Newsome <tim@sifive.com>
6125 Albert Ou <a0u@eecs.berkeley.edu>
6126 Darius Rad <darius@bluespec.com>
6127
6128 * Makefile.in (ALL_TARGET_OBS): Add riscv-tdep.o
6129 (HFILES_NO_SRCDIR): Add riscv-tdep.h.
6130 (ALLDEPFILES): Add riscv-tdep.c
6131 * configure.tgt: Add riscv support.
6132 * riscv-tdep.c: New file.
6133 * riscv-tdep.h: New file.
6134 * NEWS: Mention new target.
6135 * MAINTAINERS: Add entry for riscv.
6136
6137 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
6138
6139 * amd64-tdep.c (amd64_classify_aggregate): Ignore zero sized
6140 fields within aggregates.
6141
6142 2018-03-04 Simon Marchi <simon.marchi@polymtl.ca>
6143
6144 * record-btrace.c (btrace_print_lines): Change type of flags to
6145 gdb_disassembly_flags.
6146
6147 2018-03-04 John Baldwin <jhb@FreeBSD.org>
6148
6149 * fbsd-nat.c: Include "inf-ptrace.h".
6150 (USE_SIGTRAP_SIGINFO): Conditionally define.
6151 [USE_SIGTRAP_SIGINFO] (fbsd_handle_debug_trap): New function.
6152 (fbsd_wait) [USE_SIGTRAP_SIGINFO]: Call "fbsd_handle_debug_trap".
6153 [USE_SIGTRAP_SIGINFO] (fbsd_stopped_by_sw_breakpoint): New
6154 function.
6155 [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_sw_breakpoint):
6156 Likewise.
6157 [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_hw_breakpoint):
6158 Likewise.
6159 (fbsd_nat_add_target) [USE_SIGTRAP_SIGINFO]: Set
6160 "stopped_by_sw_breakpoint", "supports_stopped_by_sw_breakpoint",
6161 "supports_stopped_by_hw_breakpoint" target methods.
6162
6163 2018-03-04 John Baldwin <jhb@FreeBSD.org>
6164
6165 * NEWS (Changes since GDB 8.1): Add "set/show debug fbsd-nat".
6166 * fbsd-nat.c (debug_fbsd_nat): New variable.
6167 (show_fbsd_nat_debug): New function.
6168 (fbsd_wait): Log LWP info if "debug_fbsd_nat" is enabled.
6169 (_initialize_fbsd_nat): Add "fbsd-nat" debug boolean command.
6170
6171 2018-03-04 John Baldwin <jhb@FreeBSD.org>
6172
6173 * nat/x86-dregs.c (x86_dr_stopped_by_hw_breakpoint): New function.
6174 * nat/x86-dregs.h (x86_dr_stopped_by_hw_breakpoint): New
6175 prototype.
6176 * x86-nat.c (x86_stopped_by_hw_breakpoint): New function.
6177 (x86_use_watchpoints): Set "stopped_by_hw_breakpoint" target
6178 method.
6179
6180 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
6181
6182 * common/gdb_vecs.c (free_char_ptr_vec): Remove.
6183 * common/gdb_vecs.h (free_char_ptr_vec): Remove.
6184
6185 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
6186
6187 * charset.c (struct charset_vector): New.
6188 (charsets): Change type to charset_vector.
6189 (find_charset_names): Adjust.
6190 (add_one): Adjust.
6191 (_initialize_charset): Adjust.
6192
6193 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
6194
6195 * progspace.h (struct program_space) <deleted_solibs>: Change
6196 type to std::vector<std::string>.
6197 * progspace.c (clear_program_space_solib_cache): Adjust.
6198 * breakpoint.c (print_solib_event): Adjust.
6199 (check_status_catch_solib): Adjust.
6200 * solib.c (update_solib_list): Adjust.
6201 * ui-out.h (class ui_out) <field_string>: New overload.
6202 * ui-out.c (ui_out::field_string): New overload.
6203
6204 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
6205
6206 * progspace.h (struct program_space): Add constructor and
6207 destructor, initialize fields.
6208 (add_program_space): Remove.
6209 * progspace.c (add_program_space): Rename to...
6210 (program_space::program_space): ... this.
6211 (release_program_space): Rename to...
6212 (program_space::~program_space): ... this.
6213 (delete_program_space): Use delete to delete program_space.
6214 (initialize_progspace): Use new to allocate program_space.
6215 * inferior.c (add_inferior_with_spaces): Likewise.
6216 (clone_inferior_command): Likewise.
6217 * infrun.c (follow_fork_inferior): Likewise.
6218 (handle_vfork_child_exec_or_exit): Likewise.
6219
6220 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
6221
6222 * common/gdb_vecs.h (make_cleanup_free_char_ptr_vec): Remove.
6223 (delim_string_to_char_ptr_vec): Return std::vector of
6224 gdb::unique_xmalloc_ptr.
6225 (dirnames_to_char_ptr_vec_append): Take std::vector of
6226 gdb::unique_xmalloc_ptr.
6227 (dirnames_to_char_ptr_vec): Return std::vector of
6228 gdb::unique_xmalloc_ptr.
6229 * common/gdb_vecs.c (delim_string_to_char_ptr_vec_append):
6230 Take std::vector of gdb::unique_xmalloc_ptr, adjust the code.
6231 (delim_string_to_char_ptr_vec): Return an std::vector of
6232 gdb::unique_xmalloc_ptr, adjust the code.
6233 (dirnames_to_char_ptr_vec_append): Take an std::vector of
6234 gdb::unique_xmalloc_ptr, adjust the code.
6235 (dirnames_to_char_ptr_vec): Return an std::vector of
6236 gdb::unique_xmalloc_ptr, adjust the code.
6237 * auto-load.c (auto_load_safe_path_vec): Change type to
6238 std::vector of gdb::unique_xmalloc_ptr.
6239 (auto_load_expand_dir_vars): Return an std::vector of
6240 gdb::unique_xmalloc_ptr, adjust the code.
6241 (auto_load_safe_path_vec_update): Adjust.
6242 (filename_is_in_auto_load_safe_path_vec): Adjust.
6243 (auto_load_objfile_script_1): Adjust.
6244 * build-id.c (build_id_to_debug_bfd): Adjust.
6245 * linux-thread-db.c (thread_db_load_search): Adjust.
6246 * source.c (add_path): Adjust.
6247 (openp): Adjust.
6248 * symfile.c (find_separate_debug_file): Adjust.
6249 * utils.c (do_free_char_ptr_vec): Remove.
6250 (make_cleanup_free_char_ptr_vec): Remove.
6251
6252 2018-03-01 Sergio Durigan Junior <sergiodj@redhat.com>
6253
6254 PR gdb/22907
6255 * common/pathstuff.c: Conditionally include "<windows.h>".
6256
6257 2018-03-01 Georg Sauthoff <mail@georg.so>
6258
6259 PR gdb/22888
6260 * gcore.in: Quote variables and switch interpreter to bash.
6261
6262 2018-03-01 Tom Tromey <tom@tromey.com>
6263
6264 * dwarf2read.c (alloc_discriminant_info): Fix default_index
6265 assertion. Add assertion for discriminant_index.
6266 (quirk_rust_enum): Use correct base type name in univariant case.
6267
6268 2018-03-01 Simon Marchi <simon.marchi@ericsson.com>
6269
6270 * record.c (get_call_history_modifiers): Return a
6271 record_print_flags.
6272 (cmd_record_call_history): Adjust.
6273 * record-btrace.c (record_btrace_call_history): Adjust.
6274 (record_btrace_call_history_range): Adjust.
6275 (record_btrace_call_history_from): Adjust.
6276 * target-debug.h (target_debug_print_record_print_flags): New.
6277 * target-delegates.c: Re-generate.
6278 * target.c (target_call_history): Change flags type.
6279 (target_call_history_from): Likewise.
6280 (target_call_history_range): Likewise.
6281 * target.h (struct target_ops) <target_call_history>: Likewise.
6282 (target_call_history_from): Likewise.
6283 (target_call_history_range): Likewise.
6284
6285 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
6286 Simon Marchi <simon.marchi@polymtl.ca>
6287
6288 * common/common-utils.c: Include "sys/stat.h".
6289 (is_regular_file): Move here from "source.c"; change return
6290 type to "bool".
6291 * common/common-utils.h (is_regular_file): New prototype.
6292 * common/pathstuff.c (contains_dir_separator): New function.
6293 * common/pathstuff.h (contains_dir_separator): New prototype.
6294 * source.c: Don't include "sys/stat.h".
6295 (is_regular_file): Move to "common/common-utils.c".
6296
6297 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
6298
6299 * Makefile.in (COMMON_SFILES): Add "common/pathstuff.c".
6300 (HFILES_NO_SRCDIR): Add "common/pathstuff.h".
6301 * auto-load.c: Include "common/pathstuff.h".
6302 * common/common-def.h (current_directory): Move here.
6303 * common/gdb_tilde_expand.c (gdb_tilde_expand_up): New
6304 function.
6305 * common/gdb_tilde_expand.h (gdb_tilde_expand_up): New
6306 prototype.
6307 * common/pathstuff.c: New file.
6308 * common/pathstuff.h: New file.
6309 * compile/compile.c: Include "common/pathstuff.h".
6310 * defs.h (current_directory): Move to "common/common-defs.h".
6311 * dwarf2read.c: Include "common/pathstuff.h".
6312 * exec.c: Likewise.
6313 * guile/scm-safe-call.c: Likewise.
6314 * linux-thread-db.c: Likewise.
6315 * main.c: Likewise.
6316 * nto-tdep.c: Likewise.
6317 * objfiles.c: Likewise.
6318 * source.c: Likewise.
6319 * symtab.c: Likewise.
6320 * utils.c: Include "common/pathstuff.h".
6321 (gdb_realpath): Move to "common/pathstuff.c".
6322 (gdb_realpath_keepfile): Likewise.
6323 (gdb_abspath): Likewise.
6324 * utils.h (gdb_realpath): Move to "common/pathstuff.h".
6325 (gdb_realpath_keepfile): Likewise.
6326 (gdb_abspath): Likewise.
6327
6328 2018-02-28 John Baldwin <jhb@FreeBSD.org>
6329
6330 * fbsd-nat.c (fbsd_resume): Use PT_SETSTEP for stepping and a
6331 wildcard process pid for super_resume for kernels with a
6332 specific bug.
6333
6334 2018-02-27 Phil Muldoon <pmuldoon@redhat.com>
6335
6336 * compile/compile.c (get_args): Add additional comments
6337 explaining function.
6338
6339 2018-02-27 Simon Marchi <simon.marchi@polymtl.ca>
6340 Tom Tromey <tom@tromey.com>
6341
6342 * target.h (memory_write_request_s): Remove typedef. Don't define
6343 VEC.
6344 (target_write_memory_blocks): Change argument to std::vector.
6345 (struct memory_write_request): Add constructor.
6346 * target-memory.c (compare_block_starting_address): Return bool.
6347 Change argument types.
6348 (claim_memory): Change arguments to use std::vector.
6349 (split_regular_and_flash_blocks, blocks_to_erase)
6350 (compute_garbled_blocks): Likewise.
6351 (cleanup_request_data, cleanup_write_requests_vector): Remove.
6352 (target_write_memory_blocks): Change argument to std::vector.
6353 * symfile.c (struct load_section_data): Add constructor and
6354 destructor. Use std::vector for "requests".
6355 (struct load_progress_data): Add initializers.
6356 (load_section_callback): Update. Use "new".
6357 (clear_memory_write_data): Remove.
6358 (generic_load): Update.
6359
6360 2018-02-27 Alan Hayward <alan.hayward@arm.com>
6361
6362 * arch/aarch64.h: Use common/tdesc.h.
6363
6364 2018-02-26 Maciej W. Rozycki <macro@mips.com>
6365
6366 * mips-tdep.c (mips_gdbarch_init): Don't use a 32-bit BFD
6367 architecture with a 64-bit ABI.
6368
6369 2018-02-26 Maciej W. Rozycki <macro@mips.com>
6370
6371 * gdb/mips-tdep.c (mips_gdbarch_init): Reorder ABI determination
6372 ahead of target description loading.
6373
6374 2018-02-26 Tom Tromey <tom@tromey.com>
6375
6376 * stack.c (backtrace_command_1): Update.
6377 * python/python-internal.h (gdbpy_apply_frame_filter): Change type
6378 of "flags".
6379 * python/py-framefilter.c (py_print_frame)
6380 (gdbpy_apply_frame_filter): Change type of "flags".
6381 * mi/mi-cmd-stack.c (mi_apply_ext_lang_frame_filter): Change type
6382 of "flags".
6383 (mi_cmd_stack_list_frames, mi_cmd_stack_list_locals)
6384 (mi_cmd_stack_list_args, mi_cmd_stack_list_variables): Update.
6385 * extension.h (enum frame_filter_flag): Rename from
6386 frame_filter_flags.
6387 (frame_filter_flags): Define using DEF_ENUM_FLAGS_TYPE.
6388 (apply_ext_lang_frame_filter): Change type of "flags".
6389 * extension.c (apply_ext_lang_frame_filter): Change type of
6390 "flags".
6391 * extension-priv.h (struct extension_language_ops)
6392 <apply_frame_filter>: Change type of "flags".
6393
6394 2018-02-26 Tom Tromey <tom@tromey.com>
6395
6396 PR python/16497:
6397 * stack.c (backtrace_command_1): Set PRINT_MORE_FRAMES flag. Fix
6398 off-by-one in py_end computation.
6399 * python/py-framefilter.c (gdbpy_apply_frame_filter): Handle
6400 PRINT_MORE_FRAMES.
6401 * extension.h (enum frame_filter_flags) <PRINT_MORE_FRAMES>: New
6402 constant.
6403
6404 2018-02-26 Tom Tromey <tom@tromey.com>
6405
6406 * dwarf2read.c (struct variant_field): New.
6407 (struct nextfield) <variant>: New field.
6408 (dwarf2_add_field): Handle DW_TAG_variant_part.
6409 (dwarf2_attach_fields_to_type): Attach a discriminant_info to a
6410 discriminated union.
6411 (read_structure_type): Handle DW_TAG_variant_part.
6412 (handle_struct_member_die): New function, extracted from
6413 process_structure_scope. Handle DW_TAG_variant.
6414 (process_structure_scope): Handle discriminated unions. Call
6415 handle_struct_member_die.
6416
6417 2018-02-26 Tom Tromey <tom@tromey.com>
6418
6419 * rust-lang.h (rust_last_path_segment): Declare.
6420 * rust-lang.c (rust_last_path_segment): Now public. Change
6421 contract.
6422 (struct disr_info): Remove.
6423 (RUST_ENUM_PREFIX, RUST_ENCODED_ENUM_REAL)
6424 (RUST_ENCODED_ENUM_HIDDEN, rust_union_is_untagged)
6425 (rust_get_disr_info, rust_tuple_variant_type_p): Remove.
6426 (rust_enum_p, rust_enum_variant): New function.
6427 (rust_underscore_fields): Remove "offset" parameter.
6428 (rust_print_enum): New function.
6429 (rust_val_print) <TYPE_CODE_UNION>: Remove enum code.
6430 <TYPE_CODE_STRUCT>: Call rust_print_enum when appropriate.
6431 (rust_print_struct_def): Add "for_rust_enum" parameter. Handle
6432 enums.
6433 (rust_internal_print_type): New function, from rust_print_type.
6434 Remove enum code.
6435 (rust_print_type): Call rust_internal_print_type.
6436 (rust_evaluate_subexp) <STRUCTOP_ANONYMOUS, STRUCTOP_STRUCT>:
6437 Update enum handling.
6438 * dwarf2read.c (struct dwarf2_cu) <rust_unions>: New field.
6439 (rust_fully_qualify, alloc_discriminant_info, quirk_rust_enum)
6440 (rust_union_quirks): New functions.
6441 (process_full_comp_unit, process_full_type_unit): Call
6442 rust_union_quirks.
6443 (process_structure_scope): Update rust_unions if necessary.
6444
6445 2018-02-26 Tom Tromey <tom@tromey.com>
6446
6447 * value.h (value_union_variant): Declare.
6448 * valops.c (value_union_variant): New function.
6449 * gdbtypes.h (TYPE_FLAG_DISCRIMINATED_UNION): New macro.
6450 (struct discriminant_info): New.
6451 (enum dynamic_prop_node_kind) <DYN_PROP_DISCRIMINATED>: New
6452 enumerator.
6453 (struct main_type) <flag_discriminated_union>: New field.
6454
6455 2018-02-26 Tom Tromey <tom@tromey.com>
6456
6457 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
6458 unittests/unpack-selftests.c.
6459 * unittests/unpack-selftests.c: New file.
6460 * value.c (unpack_bits_as_long): Fix bugs in non-bitfield cases.
6461
6462 2018-02-26 Yao Qi <yao.qi@linaro.org>
6463
6464 * dwarf2read.c (struct partial_die_info) <read>: New method.
6465 (read_partial_die): Remove the declaration.
6466 (load_partial_dies): Update.
6467 (partial_die_info::partial_die_info):
6468 (read_partial_die): Change it to partial_die_info::read.
6469
6470 2018-02-26 Yao Qi <yao.qi@linaro.org>
6471
6472 * dwarf2read.c (struct partial_die_info) <fixup>: New method.
6473 (fixup_partial_die): Remove declaration.
6474 (scan_partial_symbols): Update.
6475 (partial_die_parent_scope): Likewise.
6476 (partial_die_full_name): Likewise.
6477 (fixup_partial_die): Change it to partial_die_info::fixup.
6478
6479 2018-02-26 Yao Qi <yao.qi@linaro.org>
6480
6481 * dwarf2read.c (read_partial_die): Update the declaration.
6482 (load_partial_dies): Caller update.
6483 (read_partial_die): Remove one argument abbrev_len.
6484
6485 2018-02-26 Yao Qi <yao.qi@linaro.org>
6486
6487 * dwarf2read.c (struct partial_die_info): Add ctor, delete
6488 assignment operator.
6489 (load_partial_dies): Use ctor and copy ctor.
6490 (read_partial_die): Update.
6491 (dwarf2_cu::find_partial_die): Use ctor.
6492
6493 2018-02-26 Yao Qi <yao.qi@linaro.org>
6494
6495 * dwarf2read.c (struct dwarf2_cu) <find_partial_die>: New method.
6496 (find_partial_die_in_comp_unit): Change it to
6497 dwarf2_cu::find_partial_die.
6498 (find_partial_die): Update.
6499
6500 2018-02-26 Yao Qi <yao.qi@linaro.org>
6501
6502 * dwarf2read.c (read_partial_die): Remove the code checking abbrev
6503 is NULL.
6504
6505 2018-02-26 Yao Qi <yao.qi@linaro.org>
6506
6507 * dwarf2read.c (load_partial_dies): Move the location of XOBNEW.
6508
6509 2018-02-26 Alan Hayward <alan.hayward@arm.com>
6510
6511 * arch/amd64.h: Use common/tdesc.h.
6512 * arch/i386.c: Likewise.
6513 * arch/i386.h: Likewise.
6514 * arch/tic6x.c: Likewise.
6515 * arch/tdesc.h: Move file from here...
6516 * common/tdesc.h: ...to here.
6517 * features/aarch64-core.c: Regenerate.
6518 * features/aarch64-fpu.c: Regenerate.
6519 * features/i386/32bit-avx.c: Regenerate.
6520 * features/i386/32bit-avx512.c: Regenerate.
6521 * features/i386/32bit-core.c: Regenerate.
6522 * features/i386/32bit-linux.c: Regenerate.
6523 * features/i386/32bit-mpx.c: Regenerate.
6524 * features/i386/32bit-pkeys.c: Regenerate.
6525 * features/i386/32bit-sse.c: Regenerate.
6526 * features/i386/64bit-avx.c: Regenerate.
6527 * features/i386/64bit-avx512.c: Regenerate.
6528 * features/i386/64bit-core.c: Regenerate.
6529 * features/i386/64bit-linux.c: Regenerate.
6530 * features/i386/64bit-mpx.c: Regenerate.
6531 * features/i386/64bit-pkeys.c: Regenerate.
6532 * features/i386/64bit-segments.c: Regenerate.
6533 * features/i386/64bit-sse.c: Regenerate.
6534 * features/i386/x32-core.c: Regenerate.
6535 * features/tic6x-c6xp.c: Regenerate.
6536 * features/tic6x-core.c: Regenerate.
6537 * features/tic6x-gp.c: Regenerate.
6538 * target-descriptions.c: Use common/tdesc.h.
6539 * target-descriptions.h: Likewise.
6540
6541 2018-02-24 Tom Tromey <tom@tromey.com>
6542
6543 * linux-thread-db.c (try_thread_db_load_from_pdir_1)
6544 (try_thread_db_load_from_dir, thread_db_load_search): Use
6545 std::string.
6546 (info_auto_load_libthread_db_compare): Return bool. Change
6547 argument types.
6548 (info_auto_load_libthread_db): Use std::vector, std::string.
6549 Remove cleanups.
6550
6551 2018-02-24 Tom Tromey <tom@tromey.com>
6552
6553 * i386-tdep.c (i386_fast_tracepoint_valid_at): "msg" now a
6554 std::string.
6555 * gdbarch.sh (fast_tracepoint_valid_at): Change "msg" to a
6556 std::string*.
6557 * gdbarch.c: Rebuild.
6558 * gdbarch.h: Rebuild.
6559 * breakpoint.c (check_fast_tracepoint_sals): Use std::string.
6560 * arch-utils.h (default_fast_tracepoint_valid_at): Update.
6561 * arch-utils.c (default_fast_tracepoint_valid_at): "msg" now a
6562 std::string*.
6563
6564 2018-02-23 Simon Marchi <simon.marchi@polymtl.ca>
6565
6566 * gdbtypes.h (sect_offset): Change type to uint64_t.
6567 (sect_offset_str): New function.
6568 * dwarf2read.c (create_addrmap_from_aranges): Use
6569 sect_offset_str.
6570 (error_check_comp_unit_head): Likewise.
6571 (create_debug_type_hash_table): Likewise.
6572 (read_cutu_die_from_dwo): Likewise.
6573 (init_cutu_and_read_dies): Likewise.
6574 (init_cutu_and_read_dies_no_follow): Likewise.
6575 (process_psymtab_comp_unit_reader): Likewise.
6576 (partial_die_parent_scope): Likewise.
6577 (peek_die_abbrev): Likewise.
6578 (process_queue): Likewise.
6579 (dwarf2_physname): Likewise.
6580 (read_namespace_alias): Likewise.
6581 (read_import_statement): Likewise.
6582 (create_dwo_cu_reader): Likewise.
6583 (create_cus_hash_table): Likewise.
6584 (lookup_dwo_cutu): Likewise.
6585 (inherit_abstract_dies): Likewise.
6586 (read_func_scope): Likewise.
6587 (read_call_site_scope): Likewise.
6588 (dwarf2_add_member_fn): Likewise.
6589 (read_common_block): Likewise.
6590 (read_module_type): Likewise.
6591 (read_typedef): Likewise.
6592 (read_subrange_type): Likewise.
6593 (load_partial_dies): Likewise.
6594 (read_partial_die): Likewise.
6595 (find_partial_die): Likewise.
6596 (read_str_index): Likewise.
6597 (dwarf2_string_attr): Likewise.
6598 (build_error_marker_type): Likewise.
6599 (lookup_die_type): Likewise.
6600 (dump_die_shallow): Likewise.
6601 (follow_die_ref): Likewise.
6602 (dwarf2_fetch_die_loc_sect_off): Likewise.
6603 (dwarf2_fetch_constant_bytes): Likewise.
6604 (follow_die_sig): Likewise.
6605 (get_signatured_type): Likewise.
6606 (get_DW_AT_signature_type): Likewise.
6607 (dwarf2_find_containing_comp_unit): Likewise.
6608 (set_die_type): Likewise.
6609
6610 2018-02-21 John Baldwin <jhb@FreeBSD.org>
6611
6612 * arch/aarch64.c: Include "common-defs.h".
6613 * arch/amd64.c: Likewise.
6614 * arch/i386.c: Likewise.
6615
6616 2018-02-21 Tom Tromey <tom@tromey.com>
6617
6618 * value.h: (extract_field_op): Update.
6619 * eval.c (extract_field_op): Return a const char *.
6620 * expression.h (parse_expression_for_completion): Update.
6621 * completer.c (complete_expression): Update.
6622 (add_struct_fields): Make fieldname const.
6623 * parse.c (expout_completion_name): Now a unique_xmalloc_ptr.
6624 (mark_completion_tag, parse_exp_in_context_1): Update.
6625 (parse_expression_for_completion): Change "name" to
6626 unique_xmalloc_ptr*.
6627
6628 2018-02-21 Tom Tromey <tom@tromey.com>
6629
6630 * infcall.c (call_function_by_hand_dummy): Use std::vector.
6631
6632 2018-02-21 Yao Qi <yao.qi@linaro.org>
6633
6634 * avr-tdep.c (avr_read_pc): Change parameter type to
6635 readable_regcache.
6636 * gdbarch.sh (read_pc): Likewise.
6637 * gdbarch.c: Re-generated.
6638 * gdbarch.h: Re-generated.
6639 * hppa-tdep.c (hppa_read_pc): Change parameter type to
6640 readable_regcache.
6641 * ia64-tdep.c (ia64_read_pc): Likewise.
6642 * mips-tdep.c (mips_read_pc): Likewise.
6643 * spu-tdep.c (spu_read_pc): Likewise.
6644
6645 2018-02-21 Yao Qi <yao.qi@linaro.org>
6646
6647 * Makefile.in (COMMON_SFILES): Add regcache-dump.c
6648 * regcache-dump.c: New file.
6649 * regcache.c: Move register_dump to regcache-dump.c.
6650 (maintenance_print_registers): Likewise.
6651 (maintenance_print_raw_registers): Likewise.
6652 (maintenance_print_cooked_registers): Likewise.
6653 (maintenance_print_register_groups): Likewise.
6654 (maintenance_print_remote_registers): Likewise.
6655 (_initialize_regcache): Likewise.
6656 * regcache.h (register_dump): Moved from regcache.c.
6657
6658 2018-02-21 Yao Qi <yao.qi@linaro.org>
6659
6660 * regcache.c (regcache::regcache): Update.
6661 (regcache::invalidate): Move it to detached_regcache::invalidate.
6662 (get_thread_arch_aspace_regcache): Update.
6663 (regcache::raw_update): Update.
6664 (regcache::cooked_read): Remove some code.
6665 (regcache::cooked_read_value): Likewise.
6666 (regcache::raw_write): Remove assert on m_readonly_p.
6667 (regcache::raw_supply_integer): Move it to
6668 detached_regcache::raw_supply_integer.
6669 (regcache::raw_supply_zeroed): Likewise.
6670 * regcache.h (detached_regcache) <raw_supply_integer>: New
6671 declaration.
6672 <raw_supply_zeroed, invalidate>: Likewise.
6673 (regcache) <raw_supply_integer, raw_supply_zeroed>: Removed.
6674 <invalidate>: Likewise.
6675 <m_readonly_p>: Removed.
6676
6677 2018-02-21 Yao Qi <yao.qi@linaro.org>
6678
6679 * infcmd.c (get_return_value): Let stop_regs point to
6680 get_current_regcache.
6681 * regcache.c (regcache::regcache): Remove.
6682 (register_dump_reg_buffer): New class.
6683 (regcache_print): Adjust.
6684 * regcache.h (regcache): Remove constructors.
6685
6686 2018-02-21 Yao Qi <yao.qi@linaro.org>
6687
6688 * regcache.c (class register_dump): New class.
6689 (register_dump_regcache, register_dump_none): New class.
6690 (register_dump_remote, register_dump_groups): New class.
6691 (regcache_print): Update.
6692 * regcache.h (regcache_dump_what): Move it to regcache.c.
6693 (regcache) <dump>: Remove.
6694
6695 2018-02-21 Yao Qi <yao.qi@linaro.org>
6696
6697 * jit.c (struct jit_unwind_private) <regcache>: Change its type to
6698 reg_buffer_rw *.
6699 (jit_unwind_reg_set_impl): Call raw_supply.
6700 (jit_frame_sniffer): Use reg_buffer_rw.
6701 * record-full.c (record_full_core_regbuf): Change its type.
6702 (record_full_core_open_1): Use reg_buffer_rw.
6703 (record_full_close): Likewise.
6704 (record_full_core_fetch_registers): Use regcache->raw_supply.
6705 (record_full_core_store_registers): Likewise.
6706 * regcache.c (regcache::get_register_status): Move it to
6707 reg_buffer.
6708 (regcache_raw_set_cached_value): Remove.
6709 (regcache::raw_set_cached_value): Remove.
6710 (regcache::raw_write): Call raw_supply.
6711 (regcache::raw_supply): Move it to reg_buffer_rw.
6712 * regcache.h (regcache_raw_set_cached_value): Remove.
6713 (reg_buffer_rw): New class.
6714
6715 2018-02-21 Yao Qi <yao.qi@linaro.org>
6716
6717 * dummy-frame.c (dummy_frame_cache) <prev_regcache>: Use
6718 readonly_detached_regcache.
6719 (dummy_frame_prev_register): Use regcache->cooked_read.
6720 * frame.c (frame_save_as_regcache): Change return type.
6721 (frame_pop): Update.
6722 * frame.h (frame_save_as_regcache): Update declaration.
6723 * inferior.h (get_infcall_suspend_state_regcache): Update
6724 declaration.
6725 * infrun.c (infcall_suspend_state) <registers>: use
6726 readonly_detached_regcache.
6727 (save_infcall_suspend_state): Don't use regcache_dup.
6728 (get_infcall_suspend_state_regcache): Change return type.
6729 * linux-fork.c (struct fork_info) <savedregs>: Change to
6730 readonly_detached_regcache.
6731 <pc>: New field.
6732 (fork_save_infrun_state): Don't use regcache_dup.
6733 (info_checkpoints_command): Adjust.
6734 * mi/mi-main.c (register_changed_p): Update declaration.
6735 (mi_cmd_data_list_changed_registers): Use
6736 readonly_detached_regcache.
6737 (register_changed_p): Change parameter type to
6738 readonly_detached_regcache.
6739 * ppc-linux-tdep.c (ppu2spu_cache) <regcache>: Use
6740 readonly_detached_regcache.
6741 (ppu2spu_sniffer): Construct a new readonly_detached_regcache.
6742 * regcache.c (readonly_detached_regcache::readonly_detached_regcache):
6743 New.
6744 (regcache::save): Move it to reg_buffer.
6745 (regcache::restore): Change parameter type.
6746 (regcache_dup): Remove.
6747 * regcache.h (reg_buffer) <save>: New method.
6748 (readonly_detached_regcache): New class.
6749 * spu-tdep.c (spu2ppu_cache) <regcache>: Use
6750 readonly_detached_regcache.
6751 (spu2ppu_sniffer): Construct a new readonly_detached_regcache.
6752
6753 2018-02-21 Yao Qi <yao.qi@linaro.org>
6754
6755 * frame.c (frame_save_as_regcache): Use regcache method save.
6756 (frame_pop): Use regcache method restore.
6757 * infrun.c (restore_infcall_suspend_state): Likewise.
6758 * linux-fork.c (fork_load_infrun_state): Likewise.
6759 * ppc-linux-tdep.c (ppu2spu_sniffer): User regcache method
6760 save.
6761 * regcache.c (regcache_save): Remove.
6762 (regcache::restore): More asserts.
6763 (regcache_cpy): Remove.
6764 * regcache.h (regcache_save): Remove the declaration.
6765 (regcache::restore): Move from private to public.
6766 Remove the friend declaration of regcache_cpy.
6767 (regcache_cpy): Remove declaration.
6768
6769 2018-02-21 Yao Qi <yao.qi@linaro.org>
6770
6771 * aarch64-tdep.c (aarch64_pseudo_register_read_value): Change
6772 parameter type to 'readable_regcache *'.
6773 * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
6774 * arm-tdep.c (arm_neon_quad_read): Likewise.
6775 (arm_pseudo_read): Likewise.
6776 * avr-tdep.c (avr_pseudo_register_read): Likewise.
6777 * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
6778 * frv-tdep.c (frv_pseudo_register_read): Likewise.
6779 * gdbarch.c: Re-generated.
6780 * gdbarch.h: Re-generated.
6781 * gdbarch.sh (pseudo_register_read): Change parameter type to
6782 'readable_regcache *'.
6783 (pseudo_register_read_value): Likewise.
6784 * h8300-tdep.c (pseudo_from_raw_register): Likewise.
6785 (h8300_pseudo_register_read): Likewise.
6786 * hppa-tdep.c (hppa_pseudo_register_read): Likewise.
6787 * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
6788 (i386_pseudo_register_read_into_value): Likewise.
6789 (i386_pseudo_register_read_value): Likewise.
6790 * i386-tdep.h (i386_pseudo_register_read_into_value): Update
6791 declaration.
6792 * ia64-tdep.c (ia64_pseudo_register_read): Likewise.
6793 * m32c-tdep.c (m32c_raw_read): Likewise.
6794 (m32c_read_flg): Likewise.
6795 (m32c_banked_register): Likewise.
6796 (m32c_banked_read): Likewise.
6797 (m32c_sb_read): Likewise.
6798 (m32c_part_read): Likewise.
6799 (m32c_cat_read): Likewise.
6800 (m32c_r3r2r1r0_read): Likewise.
6801 (m32c_pseudo_register_read): Likewise.
6802 * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
6803 * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
6804 (mep_pseudo_cr64_read): Likewise.
6805 (mep_pseudo_register_read): Likewise.
6806 * mips-tdep.c (mips_pseudo_register_read): Likewise.
6807 * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
6808 * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
6809 * regcache.c (regcache::raw_read): Move it to readable_regcache.
6810 (regcache::cooked_read): Likewise.
6811 (regcache::cooked_read_value): Likewise.
6812 (regcache_cooked_read_signed):
6813 (regcache::cooked_read): Likewise.
6814 * regcache.h (readable_regcache): New class.
6815 (regcache): Inherit readable_regcache. Move some methods to
6816 readable_regcache.
6817 * rl78-tdep.c (rl78_pseudo_register_read): Change
6818 parameter type to 'readable_regcache *'.
6819 * rs6000-tdep.c (do_regcache_raw_read): Remove.
6820 (e500_pseudo_register_read): Change parameter type to
6821 'readable_regcache *'.
6822 (dfp_pseudo_register_read): Likewise.
6823 (vsx_pseudo_register_read): Likewise.
6824 (efpr_pseudo_register_read): Likewise.
6825 * s390-tdep.c (s390_pseudo_register_read): Likewise.
6826 * sh-tdep.c (sh_pseudo_register_read): Likewise.
6827 * sh64-tdep.c (pseudo_register_read_portions): Likewise.
6828 (sh64_pseudo_register_read): Likewise.
6829 * sparc-tdep.c (sparc32_pseudo_register_read): Likewise.
6830 * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
6831 * spu-tdep.c (spu_pseudo_register_read_spu): Likewise.
6832 (spu_pseudo_register_read): Likewise.
6833 * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
6834 (xtensa_pseudo_register_read): Likewise.
6835
6836 2018-02-21 Yao Qi <yao.qi@linaro.org>
6837
6838 * regcache.c (regcache::regcache): Call reg_buffer ctor.
6839 (regcache::arch): Move it to reg_buffer::arch.
6840 (regcache::register_buffer): Likewise.
6841 (regcache::assert_regnum): Likewise.
6842 (regcache::num_raw_registers): Likewise.
6843 * regcache.h (reg_buffer): New class.
6844 (regcache): Inherit reg_buffer.
6845
6846 2018-02-20 Simon Marchi <simon.marchi@ericsson.com>
6847
6848 * remote-sim.c (gdb_os_printf_filtered, gdb_os_vprintf_filtered,
6849 gdb_os_evprintf_filtered, gdb_os_error): Add ATTRIBUTE_PRINTF.
6850
6851 2018-02-20 Markus Metzger <markus.t.metzger@intel.com>
6852
6853 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add mkstemp.
6854
6855 2018-02-19 Alan Hayward <alan.hayward@arm.com>
6856
6857 * Makefile.in: (COMMON_SFILES): Add common/*.c files.
6858 (SFILES): Remove common/*.c files.
6859 (COMMON_OBS): Remove some *.o files built from common/*.c files.
6860 * common/common.host: Add common reference.
6861 * configure.ac: Likewise.
6862 * configure: Regenerate.
6863
6864 2018-02-16 Yao Qi <yao.qi@linaro.org>
6865
6866 * block.c (block_namespace_info): Inherit allocate_on_obstack.
6867 (block_initialize_namespace): Use new.
6868 * dwarf2read.c (dwarf2_per_objfile): Inherit allocate_on_obstack.
6869 (dwarf2_free_objfile): Use delete.
6870 * gdbtypes.c (type_pair): Inherit allocate_on_obstack.
6871 (copy_type_recursive): Use new.
6872 * gdb_obstack.h (allocate_on_obstack): New.
6873
6874 2018-02-15 Yao Qi <yao.qi@linaro.org>
6875
6876 PR gdb/22849
6877 * inferior.c (exit_inferior_1): Reset inf->control.
6878
6879 2018-02-15 Joel Brobecker <brobecker@adacore.com>
6880
6881 * ada-lang.c (ada_to_fixed_value_create): Delete advance
6882 declaration.
6883
6884 2018-02-14 Pedro Alves <palves@redhat.com>
6885
6886 * frame-unwind.c (frame_unwind_try_unwinder): Always call
6887 frame_cleanup_after_sniffer on exception.
6888
6889 2018-02-14 Tom Tromey <tom@tromey.com>
6890
6891 * solist.h (struct target_so_ops) <bfd_open>: Make pathname
6892 const.
6893 (solib_bfd_open): Make pathname const.
6894 * solib.c (solib_bfd_open): Make pathname const.
6895 * solib-spu.c (spu_bfd_fopen): Make name const.
6896 (spu_bfd_open): Make pathname const.
6897 * solib-darwin.c (darwin_bfd_open): Make pathname const.
6898 * solib-aix.c (solib_aix_bfd_open): Make pathname const.
6899
6900 2018-02-14 Tom Tromey <tom@tromey.com>
6901
6902 * symfile.c (symfile_bfd_open): Update.
6903 * source.h (openp, source_full_path_of, find_and_open_source):
6904 Change argument type to unique_xmalloc_ptr.
6905 * source.c (openp): Take a unique_xmalloc_ptr.
6906 (source_full_path_of, find_and_open_source): Likewise.
6907 (open_source_file, symtab_to_fullname): Update.
6908 * solist.h (struct target_so_ops) <find_and_open_solib>: Take a
6909 unique_xmalloc_ptr.
6910 * solib.c (solib_find_1): Use unique_xmalloc_ptr.
6911 (exec_file_find): Update.
6912 * psymtab.c (psymtab_to_fullname): Update.
6913 * nto-tdep.h (nto_find_and_open_solib): Update.
6914 * nto-tdep.c (nto_find_and_open_solib): Change temp_path to a
6915 unique_xmalloc_ptr.
6916 * exec.c (exec_file_attach): Update.
6917 * dwarf2read.c (try_open_dwop_file): Use unique_xmalloc_ptr.
6918 * cli/cli-cmds.c (find_and_open_script): Use unique_xmalloc_ptr.
6919
6920 2018-02-14 Tom Tromey <tom@tromey.com>
6921
6922 * solib.c: Include source.h.
6923 * nto-tdep.c: Include source.h.
6924 * mi/mi-cmd-env.c: Include source.h.
6925 * infcmd.c: Include source.h.
6926 * exec.c: Include source.h.
6927 * defs.h (enum openp_flag, openp, source_full_path_of, mod_path)
6928 (add_path, directory_switch, source_path, init_source_path): Move
6929 declarations...
6930 * source.h (enum openp_flag, openp, source_full_path_of, mod_path)
6931 (add_path, directory_switch, source_path, init_source_path):
6932 ...here.
6933
6934 2018-02-14 Tom Tromey <tom@tromey.com>
6935
6936 * solist.h (exec_file_find, solib_find): Return
6937 unique_xmalloc_ptr.
6938 (solib_bfd_fopen): Take a const char *.
6939 * solib.c (solib_find_1): Return unique_xmalloc_ptr.
6940 (exec_file_find, solib_find): Likewise.
6941 (solib_bfd_fopen): Do not take ownership of "pathname".
6942 (solib_bfd_open): Use unique_xmalloc_ptr.
6943 * solib-darwin.c (darwin_bfd_open): Use unique_xmalloc_ptr.
6944 * solib-aix.c (solib_aix_bfd_open): Use unique_xmalloc_ptr.
6945 * infrun.c (follow_exec): Use unique_xmalloc_ptr.
6946 * exec.c (exec_file_locate_attach): Use unique_xmalloc_ptr.
6947
6948 2018-02-14 Joel Brobecker <brobecker@adacore.com>
6949
6950 * ada-lang.c (name_match_type_from_name): Remove reference to
6951 ada_name_for_lookup in function's documentation.
6952 * ada-lang.h (ada_name_for_lookup): Delete declaration.
6953
6954 2018-02-13 Simon Marchi <simon.marchi@polymtl.ca>
6955
6956 * defs.h (enum openp_flags): New enum.
6957 (OPF_TRY_CWD_FIRST, OPF_SEARCH_IN_PATH, OPF_RETURN_REALPATH):
6958 Move to enum openp_flags.
6959 (openp_flags): New enum flags.
6960 (openp): Change parameter type to openp_flags.
6961 * source.c (openp): Change parameter type to openp_flags.
6962 * cli/cli-cmds.c (find_and_open_script): Use openp_flags.
6963 * dwarf2read.c (try_open_dwop_file): Use openp_flags.
6964
6965 2018-02-13 Simon Marchi <simon.marchi@polymtl.ca>
6966
6967 * maint.c (_initialize_maint_cmds): Fix prefix of maint set/show
6968 per-command.
6969
6970 2018-02-12 Andrew Burgess <andrew.burgess@embecosm.com>
6971
6972 * dwarf2read.c (dwarf2_release_queue): Delete function, move body
6973 into...
6974 (class dwarf2_queue_guard): ...the destructor of this new class.
6975 (dw2_do_instantiate_symtab): Create instance of the new class
6976 dwarf2_queue_guard, remove cleanup.
6977
6978 2018-02-09 Tom Tromey <tom@tromey.com>
6979
6980 * source.c (find_source_lines): Don't reference past the end of
6981 the vector.
6982
6983 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
6984
6985 * remote.c (remote_btrace_maybe_reopen): Change error message.
6986 * btrace.c (btrace_enable): Likewise.
6987 (parse_xml_btrace): Likewise.
6988 (parse_xml_btrace_conf): Likewise.
6989
6990 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
6991
6992 * nat/linux-btrace.c (diagnose_perf_event_open_fail): New.
6993 (linux_enable_pt, linux_enable_bts): Call
6994 diagnose_perf_event_open_fail.
6995
6996 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
6997
6998 * nat/linux-btrace.c (perf_event_pt_event_type): Improve error message.
6999 Remove parameter and change return type. Update callers. Move it.
7000 (linux_enable_bts, linux_enable_pt): Improve error message.
7001 (linux_enable_pt): Remove zero buffer size check.
7002 (linux_enable_btrace): Improve error messages. Remove NULL return
7003 check.
7004
7005 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
7006
7007 * btrace.c (btrace_enable): Remove target_supports_btrace call.
7008 * nat/linux-btrace.c (perf_event_pt_event_type): Move.
7009 (kernel_supports_bts, kernel_supports_pt, linux_supports_bts)
7010 (linux_supports_pt, linux_supports_btrace): Remove.
7011 (linux_enable_bts): Call cpu_supports_bts.
7012 * nat/linux-btrace.h (linux_supports_btrace): Remove.
7013 * remote.c (remote_supports_btrace): Remove.
7014 (init_remote_ops): Remove remote_supports_btrace.
7015 * target-delegates.c: Regenerated.
7016 * target.c (target_supports_btrace): Remove.
7017 * target.h (target_ops) <to_supports_btrace>: Remove
7018 (target_supports_btrace): Remove.
7019 * x86-linux-nat.c (x86_linux_create_target): Remove
7020 linux_supports_btrace.
7021
7022 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
7023
7024 * nat/linux-btrace.c (linux_enable_btrace): Throw exception if enabling
7025 btrace failed.
7026 * x86-linux-nat.c (x86_linux_enable_btrace): Catch btrace enabling
7027 exception and use message in own exception.
7028
7029 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
7030
7031 * nat/linux-btrace.c: Include scoped_fd.h and scoped_mmap.h.
7032 (perf_event_pt_event_type): Use gdb_file_up.
7033 (linux_enable_bts, linux_enable_pt): Use gdb::unique_xmalloc_ptr,
7034 scoped_fd, and scoped_mmap.
7035
7036 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
7037
7038 * common/scoped_mmap.h: New.
7039 * unittests/scoped_mmap-selftest.c: New.
7040 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
7041 unittests/scoped_mmap-selftest.c.
7042
7043 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
7044
7045 * common/scoped_fd.h: New.
7046 * unittests/scoped_fd-selftest.c: New.
7047 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
7048 unittests/scoped_fd-selftest.c.
7049
7050 2018-02-09 Tom Tromey <tom@tromey.com>
7051
7052 * auto-load.c (auto_load_section_scripts): Use
7053 gdb::unique_xmalloc_ptr.
7054
7055 2018-02-09 Tom Tromey <tom@tromey.com>
7056
7057 * auto-load.c (execute_script_contents): Use std::string.
7058
7059 2018-02-09 Joel Brobecker <brobecker@adacore.com>
7060
7061 * NEWS <Changes in GDB 8.1>: Clarify that "rbreak" is a new
7062 Python function, rather than a new command.
7063
7064 2018-02-08 Tom Tromey <tom@tromey.com>
7065
7066 * solib.c (solib_find_1): Use std::string.
7067 (solib_bfd_fopen): Use unique_xmalloc_ptr.
7068
7069 2018-02-08 Tom Tromey <tom@tromey.com>
7070
7071 * build-id.c (build_id_to_debug_bfd): Use unique_xmalloc_ptr.
7072
7073 2018-02-08 Tom Tromey <tom@tromey.com>
7074
7075 * source.c (find_source_lines): Use gdb::def_vector.
7076
7077 2018-02-08 Tom Tromey <tom@tromey.com>
7078
7079 * macrocmd.c (struct temporary_macro_definition): New.
7080 (macro_define_command): Use temporary_macro_definition. Remove
7081 cleanups.
7082 (free_macro_definition_ptr): Remove.
7083
7084 2018-02-08 Tom Tromey <tom@tromey.com>
7085
7086 * macroexp.c (maybe_expand): Use std::string.
7087
7088 2018-02-08 Tom Tromey <tom@tromey.com>
7089
7090 * macroexp.c (struct macro_buffer): Add initializers for some
7091 members.
7092 (init_buffer, init_shared_buffer, free_buffer)
7093 (free_buffer_return_text): Remove.
7094 (macro_buffer): New constructors.
7095 (~macro_buffer): New destructor.
7096 (macro_buffer::set_shared): New method.
7097 (macro_buffer::resize_buffer, macro_buffer::appendc)
7098 (macro_buffer::appendmem): Now methods, not free functions.
7099 (set_token, append_tokens_without_splicing, stringify)
7100 (macro_stringify): Update.
7101 (gather_arguments): Change return type. Remove argc_p argument,
7102 add args_ptr argument. Use std::vector.
7103 (substitute_args): Remove argc argument. Accept std::vector.
7104 (expand): Update. Use std::vector.
7105 (scan, macro_expand, macro_expand_next): Update.
7106
7107 2018-02-08 Tom Tromey <tom@tromey.com>
7108
7109 * symtab.c (default_collect_symbol_completion_matches_break_on):
7110 Use unique_xmalloc_ptr.
7111 * macroscope.h: (sal_macro_scope, user_macro_scope)
7112 (default_macro_scope): Return unique_xmalloc_ptr.
7113 * macroscope.c (sal_macro_scope, user_macro_scope)
7114 (default_macro_scope): Return unique_xmalloc_ptr.
7115 * macroexp.h (macro_expand, macro_expand_once): Return
7116 unique_xmalloc_ptr.
7117 * macroexp.c (macro_expand, macro_expand_once): Return
7118 unique_xmalloc_ptr.
7119 * macrocmd.c (macro_expand_command, macro_expand_once_command)
7120 (info_macro_command, info_macros_command): Use
7121 unique_xmalloc_ptr.
7122 * compile/compile-c-support.c (write_macro_definitions): Use
7123 unique_xmalloc_ptr.
7124 * c-exp.y (c_parse): Use unique_xmalloc_ptr.
7125
7126 2018-02-07 Simon Marchi <simon.marchi@ericsson.com>
7127
7128 * value.c (value_static_field): Assign field type instead of
7129 containing type when returning an optimized out value.
7130
7131 2018-02-06 Yao Qi <yao.qi@linaro.org>
7132
7133 * ft32-tdep.c (ft32_read_pc): Remove.
7134 (ft32_write_pc): Remove.
7135 (ft32_gdbarch_init): Update.
7136 * m32r-tdep.c (m32r_read_pc): Remove.
7137 (m32r_gdbarch_init): Update.
7138 * mep-tdep.c (mep_read_pc): Remove.
7139 (mep_gdbarch_init): Update.
7140 * microblaze-tdep.c (microblaze_write_pc): Remove.
7141 (microblaze_gdbarch_init): Update.
7142 * mn10300-tdep.c (mn10300_read_pc): Remove.
7143 (mn10300_write_pc): Remove.
7144 (mn10300_gdbarch_init): Update.
7145 * moxie-tdep.c (moxie_read_pc): Remove.
7146 (moxie_write_pc): Remove.
7147 (moxie_gdbarch_init): Update.
7148
7149 2018-02-06 Yao Qi <yao.qi@linaro.org>
7150
7151 * expprint.c (print_subexp_standard): Handle
7152 OP_F77_UNDETERMINED_ARGLIST.
7153 (dump_subexp_body_standard): Likewise.
7154
7155 2018-02-05 Alan Hayward <alan.hayward@arm.com>
7156
7157 * target-descriptions.c (tdesc_element_visitor) Add empty
7158 implementations.
7159 (tdesc_type): Move make_gdb_type from here.
7160 (tdesc_type_builtin): Likewise.
7161 (tdesc_type_vector): Likewise.
7162 (tdesc_type_with_fields): Move make_gdb_type_ functions from here.
7163 (make_gdb_type_struct): Move from tdesc_type_with_fields.
7164 (make_gdb_type_union): Likewise.
7165 (make_gdb_type_flags): Likewise.
7166 (make_gdb_type_enum): Likewise.
7167 (make_gdb_type): New function.
7168 (tdesc_register_type): Use static make_gdb_type.
7169
7170 2018-02-05 Ruslan Kabatsayev <b7.10110111@gmail.com>
7171
7172 * infcmd.c (default_print_one_register_info): Align natural-format
7173 column values consistently one under another.
7174 (pad_to_column): New function.
7175
7176 2018-02-05 Joel Brobecker <brobecker@adacore.com>
7177
7178 * dwarf2read.c (dwarf2_physname): Move commment.
7179
7180 2018-02-01 Leszek Swirski <leszeks@google.com>
7181
7182 * varobj.c (varobj_formatted_print_options): Allow recursive
7183 pretty printing if pretty printing is enabled.
7184
7185 2018-02-01 Leszek Swirski <leszeks@google.com>
7186
7187 * c-exp.y (lex_one_token, classify_name, yylex): Don't classify
7188 names after a structop as a filename.
7189
7190 2018-02-01 Yao Qi <yao.qi@linaro.org>
7191
7192 * arm-tdep.c (arm_record_data_proc_misc_ld_str): Rewrite it.
7193 (arm_record_coproc_data_proc): Likewise.
7194
7195 2018-02-01 Yao Qi <yao.qi@linaro.org>
7196
7197 * arm-tdep.c (arm_record_extension_space): Change ret to signed.
7198
7199 2018-01-31 Nikola Prica <nikola.prica@rt-rk.com>
7200
7201 * rs6000-tdep.c (skip_prologue): Remove shifting for lr_reg and
7202 assign shifted lr_reg to fdata->lr_register when lr_reg is set.
7203
7204 2018-01-31 Pedro Alves <palves@redhat.com>
7205
7206 * darwin-nat.c (darwin_interrupt): Remove ptid_t parameter.
7207 * inflow.c (child_terminal_save_inferior): Wrap reference to
7208 tcgetpgrp in HAVE_TERMIOS_H.
7209 (child_interrupt, child_pass_ctrlc): Wrap references to signal in
7210 _WIN32.
7211 * remote-sim.c (gdbsim_interrupt): Remove ptid_t parameter and
7212 always iterate over all inferiors.
7213 (gdbsim_cntrl_c): Adjust.
7214 * windows-nat.c (windows_interrupt): Remove 'ptid_t' parameter.
7215
7216 2018-01-31 Joel Brobecker <brobecker@adacore.com>
7217
7218 * gdbtypes.c (lookup_array_range_type): Make sure the array's
7219 index type is objfile-owned if the element type is as well.
7220
7221 2018-01-31 Joel Brobecker <brobecker@adacore.com>
7222
7223 GDB 8.1 released.
7224
7225 2018-01-30 Philipp Rudo <prudo@linux.vnet.ibm.com>
7226
7227 * s390-linux-tdep.c: Remove includes "features/s390-linux32.c" and
7228 "features/s390x-linux64.c".
7229 (_initialize_s390_linux_tdep): Remove initialization of tdescs
7230 s390_linux32 and s390x_linux64.
7231 (s390_linux_init_abi_31, s390_linux_init_abi_64): Don't set
7232 default tdesc.
7233 * s390-tdep.c: Include "features/s390-linux32.c" and
7234 "features/s390x-linux64.c".
7235 (s390_tdesc_valid): Add check for tdesc_has_registers.
7236 (s390_gdbarch_init): Make sure there is always a valid tdesc.
7237 (_initialize_s390_tdep): Initialize tdesc_s390_linux32 and
7238 tdesc_s390x_linux64.
7239 * s390-linux-tdep.h: Move export of tdesc_s390_linux32 and
7240 tdesc_s390x_linux64 to...
7241 * s390-tdep.h: ...here.
7242
7243 2018-01-30 Pedro Alves <palves@redhat.com>
7244
7245 PR gdb/13211
7246 * config.in, configure: Regenerate.
7247 * configure.ac: Check for getpgid.
7248 * go32-nat.c (go32_pass_ctrlc): New.
7249 (go32_target): Install it.
7250 * inf-child.c (inf_child_target): Install
7251 child_terminal_save_inferior, child_pass_ctrlc and
7252 child_interrupt.
7253 * inf-ptrace.c (inf_ptrace_interrupt): Delete.
7254 (inf_ptrace_target): No longer install it.
7255 * infcmd.c (interrupt_target_1): Adjust.
7256 * inferior.h (child_terminal_save_inferior, child_pass_ctrlc)
7257 (child_interrupt): Declare.
7258 (inferior::terminal_state): New.
7259 * inflow.c (struct terminal_info): Update comments.
7260 (inferior_process_group): Delete.
7261 (terminal_is_ours): Delete.
7262 (gdb_tty_state): New.
7263 (child_terminal_init): Adjust.
7264 (is_gdb_terminal, sharing_input_terminal_1)
7265 (sharing_input_terminal): New functions.
7266 (child_terminal_inferior): Adjust. Use sharing_input_terminal.
7267 Set the process's actual process group in the foreground if
7268 possible. Handle is_ours_for_output/is_ours distinction. Don't
7269 mark terminal as the inferior's if not sharing GDB's terminal.
7270 Don't check attach_flag.
7271 (child_terminal_ours_for_output, child_terminal_ours): Adjust to
7272 pass down a target_terminal_state.
7273 (child_terminal_save_inferior): New, factored out from ...
7274 (child_terminal_ours_1): ... this. Handle
7275 target_terminal_state::is_ours_for_output.
7276 (child_interrupt, child_pass_ctrlc): New.
7277 (inflow_inferior_exit): Clear the inferior's terminal_state.
7278 (copy_terminal_info): Copy the inferior's terminal state.
7279 (_initialize_inflow): Remove reference to terminal_is_ours.
7280 * inflow.h (inferior_process_group): Delete.
7281 * nto-procfs.c (nto_handle_sigint, procfs_interrupt): Adjust.
7282 * procfs.c (procfs_target): Don't install procfs_interrupt.
7283 (procfs_interrupt): Delete.
7284 * remote.c (remote_serial_quit_handler): Adjust.
7285 (remote_interrupt): Remove ptid parameter. Adjust.
7286 * target-delegates.c: Regenerate.
7287 * target.c: Include "terminal.h".
7288 (target_terminal::terminal_state): Rename to ...
7289 (target_terminal::m_terminal_state): ... this.
7290 (target_terminal::init): Adjust.
7291 (target_terminal::inferior): Adjust to per-inferior
7292 terminal_state.
7293 (target_terminal::restore_inferior, target_terminal_is_ours_kind): New.
7294 (target_terminal::ours, target_terminal::ours_for_output): Use
7295 target_terminal_is_ours_kind.
7296 (target_interrupt): Remove ptid parameter. Adjust.
7297 (default_target_pass_ctrlc): Adjust.
7298 * target.h (target_ops::to_terminal_save_inferior): New field.
7299 (target_ops::to_interrupt): Remove ptid_t parameter.
7300 (target_interrupt): Remove ptid_t parameter. Update comment.
7301 (target_pass_ctrlc): Update comment.
7302 * target/target.h (target_terminal_state): New scoped enum,
7303 factored out of ...
7304 (target_terminal::terminal_state): ... here.
7305 (target_terminal::inferior): Update comments.
7306 (target_terminal::restore_inferior): New.
7307 (target_terminal::is_inferior, target_terminal::is_ours)
7308 (target_terminal::is_ours_for_output): Adjust.
7309 (target_terminal::scoped_restore_terminal_state): Adjust to
7310 rename, and call restore_inferior() instead of inferior().
7311 (target_terminal::scoped_restore_terminal_state::m_state): Change
7312 type.
7313 (target_terminal::terminal_state): Rename to ...
7314 (target_terminal::m_terminal_state): ... this and change type.
7315
7316 2018-01-30 Pedro Alves <palves@redhat.com>
7317
7318 * linux-nat.c (wait_for_signal): New function.
7319 (wait_lwp, linux_nat_wait_1): Use it instead of calling sigsuspend
7320 directly.
7321 (async_terminal_is_ours)
7322 (linux_nat_terminal_inferior, linux_nat_terminal_ours): Delete.
7323 (linux_nat_add_target): Don't override
7324 to_terminal_inferior/to_terminal_ours.
7325
7326 2018-01-29 Sergio Durigan Junior <sergiodj@redhat.com>
7327
7328 * remote.c (remote_follow_fork): Don't call "detach_inferior".
7329
7330 2018-01-28 Simon Marchi <simon.marchi@ericsson.com>
7331
7332 * dwarf2read.c (free_dwo_files): Add forward-declaration.
7333 (dwarf2_per_objfile::~dwarf2_per_objfile): Move content from
7334 dwarf2_per_objfile_free here.
7335 (dwarf2_per_objfile_free): Remove.
7336 (_initialize_dwarf2_read): Don't register
7337 dwarf2_per_objfile_free as a registry cleanup.
7338
7339 2018-01-27 Eli Zaretskii <eliz@gnu.org>
7340
7341 Avoid compilation errors in MinGW native builds
7342
7343 The error is triggered by including python-internal.h, and the
7344 error message is:
7345
7346 In file included from d:\usr\lib\gcc\mingw32\6.3.0\include\c++\math.h:36:0,
7347 from build-gnulib/import/math.h:27,
7348 from d:/usr/Python26/include/pyport.h:235,
7349 from d:/usr/Python26/include/Python.h:58,
7350 from python/python-internal.h:94,
7351 from python/py-arch.c:24:
7352 d:\usr\lib\gcc\mingw32\6.3.0\include\c++\cmath:1157:11: error: '::hypot' has not been declared
7353 using ::hypot;
7354 ^~~~~
7355
7356 This happens because Python headers define 'hypot' to expand t
7357 '_hypot' in the Windows builds.
7358 * python/python-internal.h (_hypot) [__MINGW32__]: Define back to
7359 'hypoth'. This avoids a compilation error.
7360
7361 2018-01-26 Alan Hayward <alan.hayward@arm.com>
7362
7363 * MAINTAINERS (Write After Approval): Fix ordering.
7364
7365 2018-01-26 Alan Hayward <alan.hayward@arm.com>
7366
7367 * MAINTAINERS (Write After Approval): Add Alan Hayward.
7368
7369 2018-01-26 Alan Modra <amodra@gmail.com>
7370
7371 * ppc-linux-tdep.c (powerpc32_plt_stub): Make const.
7372 (powerpc32_plt_stub_so_1): Rename from powerpc32_plt_stub_so.
7373 Remove nop. Make const. Comment.
7374 (powerpc32_plt_stub_so_2): New.
7375 (POWERPC32_PLT_CHECK_LEN): Rename from POWERPC32_PLT_STUB_LEN.
7376 Correct count. Update uses.
7377 (ppc_skip_trampoline_code): Match powerpc32_plt_stub_so_2 too.
7378 Move common code reading PLT entry word. Correct
7379 powerpc32_plt_stub PLT address calculation.
7380 * ppc64-tdep.c (ppc64_standard_linkage1): Make const.
7381 (ppc64_standard_linkage2, ppc64_standard_linkage3): Likewise.
7382 (ppc64_standard_linkage4, ppc64_standard_linkage5): Likewise.
7383 (ppc64_standard_linkage6, ppc64_standard_linkage7): Likewise.
7384 (ppc64_standard_linkage8): Likewise.
7385 * rs6000-tdep.c (ppc_insns_match_pattern): Make pattern const.
7386 Correct insns description.
7387 * ppc-tdep.h (ppc_insns_match_pattern): Update prototype.
7388
7389 2018-01-24 Pedro Alves <palves@redhat.com>
7390
7391 GCC PR libstdc++/83906
7392 * gdbtypes.c (operator==(const dynamic_prop &,
7393 const dynamic_prop &)): New.
7394 (operator==(const range_bounds &, const range_bounds &)): New.
7395 (check_types_equal): Use them instead of memcmp.
7396 * gdbtypes.h (operator==(const dynamic_prop &,
7397 const dynamic_prop &)): Declare.
7398 (operator!=(const dynamic_prop &, const dynamic_prop &)): Declare.
7399 (operator==(const range_bounds &, const range_bounds &)): Declare.
7400 (operator!=(const range_bounds &, const range_bounds &)): Declare.
7401
7402 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
7403
7404 * s390-linux-tdep.c (s390_record_address_mask)
7405 (s390_record_calc_disp_common, s390_record_calc_disp)
7406 (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
7407 (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
7408 (s390_process_record): Move to s390-tdep.c.
7409 (s390_linux_init_abi_any): Adjust.
7410 * s390-tdep.c (s390_record_address_mask)
7411 (s390_record_calc_disp_common, s390_record_calc_disp)
7412 (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
7413 (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
7414 (s390_process_record): Moved from s390-linux-tdep.c
7415 (s390_gdbarch_init): Adjust.
7416
7417 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
7418
7419 * s390-linux-nat.c (s390-tdep.h): New include.
7420 * Makefile.in (ALL_TARGET_OBS): Add s390-tdep.o.
7421 (HFILES_NO_SRCDIR): Add s390-tdep.h.
7422 (ALLDEPFILES): Add s390-tdep.c.
7423 * configure.tgt (s390*-*-linux*): Add s390-tdep.o.
7424 * s390-linux-tdep.h (HWCAP_S390_*, S390_*_REGNUM): Move to...
7425 * s390-tdep.h: ...this. New file.
7426 * s390-linux-tdep.c (s390-tdep.h): New include.
7427 (_initialize_s390_tdep): Rename to...
7428 (_initialize_s390_linux_tdep): ...this and adjust.
7429 (s390_abi_kind, s390_vector_abi_kind, gdbarch_tdep)
7430 (enum named opcodes, S390_NUM_GPRS, S390_NUM_FPRS): Move to
7431 s390-tdep.h.
7432 (s390_break_insn, s390_breakpoint, s390_readinstruction, is_ri)
7433 (is_ril, is_rr, is_rre, is_rs, is_rsy, is_rx, is_rxy)
7434 (s390_is_partial_instruction, s390_software_single_step)
7435 (is_non_branch_ril, s390_displaced_step_copy_insn)
7436 (s390_displaced_step_fixup, s390_displaced_step_hw_singlestep)
7437 (s390_prologue_data, s390_addr, s390_store, s390_load)
7438 (s390_check_for_saved, s390_analyze_prologue, s390_skip_prologue)
7439 (s390_register_call_saved, s390_guess_tracepoint_registers)
7440 (s390_register_name, s390_dwarf_regmap, s390_dwarf_reg_to_regnum)
7441 (regnum_is_gpr_full, regnum_is_vxr_full, s390_value_from_register)
7442 (s390_pseudo_register_name, s390_pseudo_register_type)
7443 (s390_pseudo_register_read, s390_pseudo_register_write)
7444 (s390_pseudo_register_reggroup_p, s390_ax_pseudo_register_collect)
7445 (s390_ax_pseudo_register_push_stack, s390_gen_return_address)
7446 (s390_addr_bits_remove, s390_address_class_type_flags)
7447 (s390_address_class_type_flags_to_name)
7448 (s390_address_class_name_to_type_flags, s390_effective_inner_type)
7449 (s390_function_arg_float, s390_function_arg_vector)
7450 (is_power_of_two, s390_function_arg_integer, s390_arg_state)
7451 (s390_handle_arg, s390_push_dummy_call, s390_dummy_id)
7452 (s390_frame_align, s390_register_return_value, s390_return_value)
7453 (s390_stack_frame_destroyed_p, s390_unwind_pc, s390_unwind_sp)
7454 (s390_unwind_pseudo_register, s390_adjust_frame_regnum)
7455 (s390_dwarf2_prev_register, s390_dwarf2_frame_init_reg)
7456 (s390_trad_frame_prev_register, s390_unwind_cache)
7457 (s390_prologue_frame_unwind_cache)
7458 (s390_backchain_frame_unwind_cache, s390_frame_unwind_cache)
7459 (s390_frame_this_id, s390_frame_prev_register, s390_frame_unwind)
7460 (s390_stub_unwind_cache, s390_stub_frame_unwind_cache)
7461 (s390_stub_frame_this_id, s390_stub_frame_prev_register)
7462 (s390_stub_frame_sniffer, s390_stub_frame_unwind)
7463 (s390_frame_base_address, s390_local_base_address)
7464 (s390_frame_base, s390_gcc_target_options)
7465 (s390_gnu_triplet_regexp, s390_stap_is_single_operand)
7466 (s390_validate_reg_range, s390_tdesc_valid)
7467 (s390_gdbarch_tdep_alloc, s390_gdbarch_init): Move to...
7468 * s390-tdep.c: ...this. New file.
7469
7470 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
7471
7472 * s390-linux-tdep.c (gdbarch_tdep.s390_syscall_record): New hook.
7473 (s390_process_record, s390_gdbarch_tdep_alloc)
7474 (s390_linux_init_abi_any): Use/set new hook.
7475
7476 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
7477
7478 * s390-linux-tdep.c (osabi.h): New include.
7479 (s390_linux_init_abi_31, s390_linux_init_abi_64)
7480 (s390_linux_init_abi_any): New functions.
7481 (s390_gdbarch_init, _initialize_s390_tdep): Adjust.
7482
7483 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
7484
7485 * s390-linux-tdep.c (s390_gdbarch_init): Use gdb_assert for
7486 tdesc_has_registers check
7487
7488 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
7489
7490 * s390-linux-tdep.c (s390_tdesc_valid): New function.
7491 (s390_validate_reg_range): New macro.
7492 (s390_gdbarch_init): Adjust.
7493
7494 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
7495
7496 * s390-linux-tdep.c (gdbarch_tdep) <tdesc>: New field.
7497 (s390_gdbarch_tdep_alloc): Adjust.
7498 (s390_gdbarch_init): Adjust.
7499
7500 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
7501
7502 * s390-linux-tdep.c (gdbarch_tdep) <have_linux_v1, have_linux_v2>
7503 <have_tdb>: Change type to bool.
7504 (s390_gdbarch_tdep_alloc): Adjust.
7505 (s390_gdbarch_init): Adjust.
7506
7507 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
7508
7509 * s390-linux-tdep (s390_abi_kind) <ABI_NONE>: New default field.
7510 (gdbarch_tdep) <have_upper, have_vx>: New fields.
7511 (s390_gdbarch_tdep_alloc): New function.
7512 (s390_gdbarch_init): Allocate tdep at start and use its fields
7513 instead of separate variables.
7514
7515 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
7516
7517 * s390-linux-tdep.c (s390_gdbarch_init): Remove duplicate checks
7518 when looking for cached gdbarch and add comment for remaining.
7519
7520 2018-01-22 Pedro Alves <palves@redhat.com>
7521 Sergio Durigan Junior <sergiodj@redhat.com>
7522
7523 * typeprint.c (whatis_exp): Initialize "val" in the "whatis type"
7524 case.
7525
7526 2018-01-22 Maciej W. Rozycki <macro@mips.com>
7527
7528 * MAINTAINERS: Update my company e-mail address.
7529
7530 2018-01-22 Yao Qi <yao.qi@linaro.org>
7531
7532 * regcache.c (cooked_write_test): New function.
7533 (_initialize_regcache): Register the test.
7534
7535 2018-01-22 Yao Qi <yao.qi@linaro.org>
7536
7537 * ia64-tdep.c (ia64_pseudo_register_read): Call
7538 regcache->cooked_read instead of regcache_cooked_read_unsigned.
7539 * m32c-tdep.c (m32c_cat_read): Likewise.
7540 (m32c_r3r2r1r0_read): Likewise.
7541 * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
7542 * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
7543
7544 2018-01-22 Yao Qi <yao.qi@linaro.org>
7545
7546 * aarch64-tdep.c (aarch64_pseudo_read_value): Call regcache
7547 method raw_read instead of regcache_raw_read.
7548 * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
7549 * arm-tdep.c (arm_neon_quad_read): Likewise.
7550 * avr-tdep.c (avr_pseudo_register_read): Likewise.
7551 * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
7552 * frv-tdep.c (frv_pseudo_register_read): Likewise.
7553 * h8300-tdep.c (h8300_pseudo_register_read): Likewise.
7554 * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
7555 (i386_pseudo_register_read_into_value): Likewise.
7556 * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
7557 * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
7558 * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
7559 * rl78-tdep.c (rl78_pseudo_register_read): Likewise.
7560 * s390-linux-tdep.c (s390_pseudo_register_read): Likewise.
7561 * sparc-tdep.c (sparc32_pseudo_register_read): Likewise.
7562 * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
7563 * spu-tdep.c (spu_pseudo_register_read_spu): Likewise.
7564 * xtensa-tdep.c (xtensa_pseudo_register_read): Likewise.
7565
7566 2018-01-22 Yao Qi <yao.qi@linaro.org>
7567
7568 * Makefile.in (ALL_TARGET_OBS): Remove mt-tdep.o.
7569 * configure.tgt: Remove target mt.
7570 * mt-tdep.c: Remove.
7571 * regcache.c (cooked_read_test): Remove the check for mt.
7572
7573 2018-01-22 Yao Qi <yao.qi@linaro.org>
7574
7575 * jit.c (jit_frame_prev_register): Call regcache::cooked_read
7576 instead of gdbarch_pseudo_register_read_value.
7577
7578 2018-01-22 Joel Brobecker <brobecker@adacore.com>
7579
7580 * dwarf2read.c (need_gnat_info): Return nonzero if the cu's
7581 language is Ada.
7582
7583 2018-01-22 Joel Brobecker <brobecker@adacore.com>
7584
7585 * linespec.c (create_sals_line_offset): Remove code that preserved
7586 the symtab_and_line's line number.
7587
7588 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
7589
7590 * varobj.c (varobj_create): Don't set valid_block when creating a
7591 floating varobj.
7592
7593 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
7594
7595 * varobj.c (varobj_create): Remove out of date comment.
7596
7597 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
7598
7599 PR mi/20395
7600 * ada-exp.y (write_var_from_sym): Pass extra parameter when
7601 updating innermost block.
7602 * parse.c (innermost_block_tracker::update): Take extra type
7603 parameter, and check types match before updating innermost block.
7604 (write_dollar_variable): Update innermost block for registers.
7605 * parser-defs.h (enum innermost_block_tracker_type): New enum.
7606 (innermost_block_tracker::innermost_block_tracker): Initialise
7607 m_types member.
7608 (innermost_block_tracker::reset): Take type parameter.
7609 (innermost_block_tracker::update): Take type parameter, and pass
7610 type through as needed.
7611 (innermost_block_tracker::m_types): New member.
7612 * varobj.c (varobj_create): Pass type when reseting innermost
7613 block.
7614
7615 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
7616
7617 * ada-exp.y (write_var_from_sym): Switch to innermost_block API.
7618 * ada-lang.c (resolve_subexp): Likewise.
7619 * breakpoint.c (set_breakpoint_condition) Likewise.
7620 (watch_command_1) Likewise.
7621 * c-exp.y (variable): Likewise.
7622 * d-exp.y (PrimaryExpression): Likewise.
7623 * f-exp.y (variable): Likewise.
7624 * go-exp.y (variable): Likewise.
7625 * m2-exp.y (variable): Likewise.
7626 * objfiles.c (objfile::~objfile): Likewise.
7627 * p-exp.y (variable): Likewise.
7628 * parse.c (innermost_block): Change type.
7629 * parser-defs.h (class innermost_block_tracker): New.
7630 (innermost_block): Change to innermost_block_tracker.
7631 * printcmd.c (display_command): Switch to innermost_block API.
7632 (do_one_display): Likewise.
7633 * rust-exp.y (do_one_display): Likewise.
7634 * symfile.c (clear_symtab_users): Likewise.
7635 * varobj.c (varobj_create): Switch to innermost_block API, replace
7636 use of innermost_block with block stored on varobj object.
7637
7638 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
7639
7640 * expression.h (innermost_block): Remove declaration.
7641 * varobj.c: Add 'parser-defs.h' include.
7642
7643 2018-01-19 Tom Tromey <tom@tromey.com>
7644
7645 * rust-lang.c (rust_lookup_symbol_nonlocal): Look up qualified
7646 symbols in the static and global blocks.
7647
7648 2018-01-19 James Clarke <jrtc27@jrtc27.com>
7649
7650 * nat/linux-ptrace.c: Remove unnecessary reinclusion of
7651 gdb_ptrace.h, and move including gdb_wait.h ...
7652 * nat/linux-ptrace.h: ... to here.
7653
7654 2018-01-19 Simon Marchi <simon.marchi@ericsson.com>
7655
7656 * inf-ptrace.c (inf_ptrace_detach): Adjust call to
7657 inf_ptrace_detach_success.
7658 (inf_ptrace_detach_success): Add inferior parameter, use it
7659 instead of inferior_ptid, pass it to detach_inferior.
7660 * inf-ptrace.h (inf_ptrace_detach_success): Add inferior
7661 parameter.
7662 * inferior.c (detach_inferior): Add overload that takes an
7663 inferior object.
7664 * inferior.h (detach_inferior): Likewise.
7665 * linux-nat.c (linux_nat_detach): Use the inf parameter, don't
7666 use inferior_ptid, adjust call to inf_ptrace_detach_success.
7667 * linux-thread-db.c (thread_db_detach): Use inf parameter.
7668
7669 2018-01-19 Simon Marchi <simon.marchi@ericsson.com>
7670
7671 * target.h (struct target_ops) <to_detach>: Add inferior
7672 parameter.
7673 (target_detach): Likewise.
7674 * target.c (dispose_inferior): Pass inferior down.
7675 (target_detach): Pass inferior down. Assert that it is equal to
7676 the current inferior.
7677 * aix-thread.c (aix_thread_detach): Pass inferior down.
7678 * corefile.c (core_file_command): Pass current_inferior() down.
7679 * corelow.c (core_detach): Add inferior parameter.
7680 * darwin-nat.c (darwin_detach): Likewise.
7681 * gnu-nat.c (gnu_detach): Likewise.
7682 * inf-ptrace.c (inf_ptrace_detach): Likewise.
7683 * infcmd.c (detach_command): Pass current_inferior() down to
7684 target_detach.
7685 * infrun.c (follow_fork_inferior): Pass parent_inf to
7686 target_detach.
7687 (handle_vfork_child_exec_or_exit): Pass inf->vfork_parent to
7688 target_detach.
7689 * linux-nat.c (linux_nat_detach): Add inferior parameter.
7690 * linux-thread-db.c (thread_db_detach): Likewise.
7691 * nto-procfs.c (procfs_detach): Likewise.
7692 * procfs.c (procfs_detach): Likewise.
7693 * record.c (record_detach): Likewise.
7694 * record.h (struct inferior): Forward-declare.
7695 (record_detach): Add inferior parameter.
7696 * remote-sim.c (gdbsim_detach): Likewise.
7697 * remote.c (remote_detach_1): Likewise.
7698 (remote_detach): Likewise.
7699 (extended_remote_detach): Likewise.
7700 * sol-thread.c (sol_thread_detach): Likewise.
7701 * target-debug.h (target_debug_print_inferior_p): New macro.
7702 * target-delegates.c: Re-generate.
7703 * top.c (kill_or_detach): Pass inferior down to target_detach.
7704 * windows-nat.c (windows_detach): Add inferior parameter.
7705
7706 2018-01-19 Simon Marchi <simon.marchi@ericsson.com>
7707
7708 * target.h (struct target_ops) <to_detach>: Remove args
7709 parameter.
7710 (target_detach): Likewise.
7711 * target.c (dispose_inferior): Adjust.
7712 (target_detach): Remove args parameter, adjust.
7713 * aix-thread.c (aix_thread_detach): Adjust.
7714 * corefile.c (core_file_command): Adjust.
7715 * corelow.c (core_detach): Adjust.
7716 * darwin-nat.c (darwin_detach): Adjust.
7717 * gnu-nat.c (gnu_detach): Adjust.
7718 * inf-ptrace.c (inf_ptrace_detach): Adjust.
7719 * infcmd.c (detach_command): Adjust
7720 * infrun.c (follow_fork_inferior): Adjust.
7721 (handle_vfork_child_exec_or_exit): Adjust.
7722 * linux-fork.c (linux_fork_detach): Remove args parameter.
7723 * linux-fork.h (linux_fork_detach): Likewise.
7724 * linux-nat.c (linux_nat_detach): Likewise, and adjust.
7725 * linux-thread-db.c (thread_db_detach): Likewise.
7726 * nto-procfs.c (procfs_detach): Likewise.
7727 * procfs.c (procfs_detach): Likewise.
7728 (do_detach): Remove signo parameter.
7729 * record.c (record_detach): Remove args parameter.
7730 * record.h (record_detach): Likewise.
7731 * remote-sim.c (gdbsim_detach): Likewise.
7732 * remote.c (remote_detach_1): Likewise.
7733 (remote_detach): Likewise.
7734 (extended_remote_detach): Likewise.
7735 * sol-thread.c (sol_thread_detach): Likewise.
7736 * target-delegates.c: Re-generate.
7737 * top.c (struct qt_args) <args>: Remove field.
7738 (kill_or_detach): Don't pass args.
7739 (quit_force): Don't set args.
7740 * windows-nat.c (windows_detach): Remove args parameter.
7741
7742 2018-01-19 Yao Qi <yao.qi@linaro.org>
7743
7744 * arm-linux-tdep.c (arm_linux_gcc_target_options): New function.
7745 (arm_linux_init_abi): Install it.
7746
7747 2018-01-19 Yao Qi <yao.qi@linaro.org>
7748
7749 * osabi.c (gdb_osabi_names): Extend the regexp for
7750 arm-linux-gnueabihf.
7751
7752 2018-01-18 Yao Qi <yao.qi@linaro.org>
7753
7754 * dwarf2read.c (abbrev_table) <abbrevs>: Rename it to
7755 m_abbrevs.
7756 (abbrev_table::add_abbrev): Update.
7757 (abbrev_table::lookup_abbrev): Update.
7758
7759 2018-01-18 Yao Qi <yao.qi@linaro.org>
7760
7761 * ppc-linux-tdep.c (ppu2spu_prev_register): Call cooked_read.
7762
7763 2018-01-17 Sergio Durigan Junior <sergiodj@redhat.com>
7764
7765 * compile/compile.c (compile_to_object): Convert "triplet_rx"
7766 to "std::string".
7767
7768 2018-01-17 Tom Tromey <tom@tromey.com>
7769
7770 * dwarf2read.c (symbolp): Remove typedef. Don't instantiate VEC.
7771
7772 2018-01-17 Tom Tromey <tom@tromey.com>
7773
7774 * gdbtypes.h (add_dyn_prop): Remove objfile parameter.
7775 * gdbtypes.c (add_dyn_prop): Remove objfile parameter.
7776 (create_array_type_with_stride): Update.
7777 * dwarf2read.c (set_die_type): Update.
7778
7779 2018-01-17 Tom Tromey <tom@tromey.com>
7780
7781 * dwarf2read.c (delayed_method_info): Remove typedef.
7782 (dwarf2_cu::method_info): Now a std::vector.
7783 (add_to_method_list): Update.
7784 (free_delayed_list): Remove.
7785 (compute_delayed_physnames): Update.
7786 (process_full_comp_unit, process_full_type_unit): Clear the method
7787 list. Remove cleanups.
7788 (psymtab_include_file_name): Add name_holder parameter. Use
7789 unique_xmalloc_ptr.
7790 (dwarf_decode_lines): Update.
7791
7792 2018-01-17 Tom Tromey <tom@tromey.com>
7793 Simon Marchi <simon.marchi@ericsson.com>
7794
7795 * dwarf2read.c (struct dwarf2_cu): Add constructor, destructor.
7796 (dwarf2_per_objfile::free_cached_comp_units)
7797 (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
7798 (init_cutu_and_read_dies_no_follow): Update.
7799 (dwarf2_cu::dwarf2_cu): Rename from init_one_comp_unit.
7800 (dwarf2_cu::~dwarf2_cu): New.
7801 (free_heap_comp_unit, free_stack_comp_unit): Remove.
7802 (age_cached_comp_units, free_one_cached_comp_unit): Update.
7803
7804 2018-01-17 Tom Tromey <tom@tromey.com>
7805 Simon Marchi <simon.marchi@ericsson.com>
7806
7807 * dwarf2read.c (struct dwarf2_cu) <abbrev_table>: Remove.
7808 (struct die_reader_specs) <abbrev_table>: New member.
7809 (struct abbrev_table): Add constructor.
7810 <alloc_abbrev, add_abbrev, lookup_abbrev>: Declare.
7811 <abbrev_obstack>: Now an auto_obstack.
7812 (abbrev_table_up): New typedef.
7813 (init_cu_die_reader): Add abbrev_table parameter.
7814 (read_cutu_die_from_dwo): Remove abbrev_table_provided parameter.
7815 Add result_dwo_abbrev_table.
7816 (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
7817 (init_cutu_and_read_dies_no_follow, build_type_psymtabs_1):
7818 Update.
7819 (peek_die_abbrev): Take die_reader_specs, not dwarf_cu as
7820 parameter.
7821 (skip_children): Update.
7822 (abbrev_table::alloc_abbrev): Rename from
7823 abbrev_table_alloc_abbrev.
7824 (abbrev_table::add_abbrev): Rename from abbrev_table_add_abbrev.
7825 (abbrev_table::lookup_abbrev): Rename from
7826 abbrev_table_lookup_abbrev.
7827 (abbrev_table_read_table): Return abbrev_table_up.
7828 (abbrev_table_free, abbrev_table_free_cleanup)
7829 (dwarf2_read_abbrevs, dwarf2_free_abbrev_table): Remove.
7830 (load_partial_dies): Update.
7831
7832 2018-01-17 Tom Tromey <tom@tromey.com>
7833
7834 * dwarf2read.c (dwarf2_compute_name): Update comment.
7835 (read_func_scope, read_variable): Update.
7836 (new_symbol): Remove.
7837 (new_symbol_full): Rename to new_symbol.
7838
7839 2018-01-17 Mike Gulick <mgulick@mathworks.com>
7840
7841 PR gdb/16577
7842 * gdb_bfd.c (gdb_bfd_map_section): If unable to read object file, issue
7843 a warning instead of throwing an error, set section size to 0 and return
7844 NULL.
7845 * gdb_bfd.h (gdb_bfd_map_section): Update description.
7846
7847 2018-01-17 Simon Marchi <simon.marchi@ericsson.com>
7848
7849 * nat/linux-ptrace.h (linux_ptrace_attach_fail_reason): Return
7850 std::string.
7851 (linux_ptrace_attach_fail_reason_string): Likewise.
7852 * nat/linux-ptrace.c (linux_ptrace_attach_fail_reason):
7853 Likewise.
7854 (linux_ptrace_attach_fail_reason_string): Likewise.
7855 * linux-nat.c (attach_proc_task_lwp_callback): Adjust.
7856
7857 2018-01-17 Simon Marchi <simon.marchi@ericsson.com>
7858
7859 * linux-nat.c (linux_nat_attach): Remove xstrdup.
7860
7861 2018-01-17 Eldar Abusalimov <eldar.abusalimov@jetbrains.com>
7862
7863 PR gdb/21559
7864 * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
7865 checking for fs_base/gs_base fields in struct user_regs_struct.
7866 * configure: Regenerate.
7867
7868 2018-01-17 Yao Qi <yao.qi@linaro.org>
7869
7870 * aarch64-linux-tdep.c (aarch64_linux_gcc_target_options): New
7871 function.
7872 (aarch64_linux_init_abi): Install it to gdbarch hook
7873 gcc_target_options.
7874
7875 2018-01-15 Pedro Alves <palves@redhat.com>
7876
7877 * common/signals-state-save-restore.c
7878 (save_original_signals_state): Fix typos.
7879
7880 2017-01-12 Tom Tromey <tom@tromey.com>
7881 Sergio Durigan Junior <sergiodj@redhat.com>
7882
7883 * Makefile.in (install-only): Install gdb-add-index.
7884
7885 2018-01-12 John Baldwin <jhb@FreeBSD.org>
7886
7887 * fbsd-tdep.c (KVE_PROTECTION): Correct value.
7888
7889 2018-01-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
7890
7891 * infrun.c (keep_going_pass_signal): Clear step-over info when
7892 insert_breakpoints fails.
7893
7894 2018-01-11 Pedro Alves <palves@redhat.com>
7895
7896 PR gdb/22583
7897 * infrun.c (resume): Rename to ...
7898 (resume_1): ... this.
7899 (resume): Reimplement as wrapper around resume_1.
7900
7901 2018-01-11 Pedro Alves <palves@redhat.com>
7902
7903 PR remote/22597
7904 * remote.c (remote_parse_stop_reply): Default to the last-set
7905 general thread instead of to 'magic_null_ptid'.
7906
7907 2018-01-10 Pedro Alves <palves@redhat.com>
7908
7909 * language.h (language_get_symbol_name_matcher): Rename ...
7910 (get_symbol_name_matcher): ... this.
7911 * language.c (language_get_symbol_name_matcher): Ditto.
7912 * dictionary.c, linespec.c, minsyms.c, psymtab.c, symtab.c: All
7913 callers adjusted.
7914
7915 2018-01-10 Pedro Alves <palves@redhat.com>
7916
7917 PR gdb/22670
7918 * dwarf2read.c
7919 (gdb_index_symbol_name_matcher::gdb_index_symbol_name_matcher):
7920 Adjust to use language_get_symbol_name_matcher instead of
7921 language_defn::la_get_symbol_name_matcher.
7922 * language.c (language_get_symbol_name_matcher): If in Ada mode
7923 and the lookup name is a verbatim match, return Ada's matcher.
7924 * language.h (language_get_symbol_name_matcher): Adjust comment.
7925 (ada_lookup_name_info::verbatim_p):: New method.
7926
7927 2018-01-10 Pedro Alves <palves@redhat.com>
7928
7929 PR gdb/22670
7930 * ada-lang.c (ada_collect_symbol_completion_matches): If the
7931 minsym's language is language_auto or language_cplus, pass down
7932 language_ada instead.
7933 * symtab.c (compare_symbol_name): Don't frob symbol language here.
7934
7935 2018-01-10 Pedro Alves <palves@redhat.com>
7936
7937 PR gdb/22670
7938 * minsyms.c (linkage_name_str): New function.
7939 (iterate_over_minimal_symbols): Use it.
7940
7941 2018-01-09 John Baldwin <jhb@FreeBSD.org>
7942
7943 * NEWS: Document that 'info proc' now works on FreeBSD.
7944
7945 2018-01-09 John Baldwin <jhb@FreeBSD.org>
7946
7947 * configure.ac: Check for kinfo_getfile in libutil.
7948 * configure: Regenerate.
7949 * config.in: Regenerate.
7950 * fbsd-nat.c: Include "fbsd-tdep.h".
7951 (fbsd_fetch_cmdline): New.
7952 (fbsd_fetch_kinfo_proc): Move earlier and change to return a bool
7953 rather than calling error.
7954 (fbsd_info_proc): New.
7955 (fbsd_thread_name): Report error if fbsd_fetch_kinfo_proc fails.
7956 (fbsd_wait): Report warning if fbsd_fetch_kinfo_proc fails.
7957 (fbsd_nat_add_target): Set "to_info_proc" to "fbsd_info_proc".
7958
7959 2018-01-09 John Baldwin <jhb@FreeBSD.org>
7960
7961 * fbsd-nat.c (struct free_deleter): Remove.
7962 (fbsd_find_memory_regions): Use gdb::unique_xmalloc_ptr<>.
7963
7964 2018-01-09 John Baldwin <jhb@FreeBSD.org>
7965
7966 * fbsd-nat.c (fbsd_pid_to_exec_file) [KERN_PROC_PATHNAME]: Return
7967 NULL for an empty pathname.
7968
7969 2018-01-09 John Baldwin <jhb@FreeBSD.org>
7970
7971 * fbsd-tdep.c (KVE_STRUCTSIZE, KVE_START, KVE_END, KVE_OFFSET)
7972 (KVE_FLAGS, KVE_PROTECTION, KVE_PATH, KINFO_VME_PROT_READ)
7973 (KINFO_VME_PROT_WRITE, KINFO_VME_PROT_EXEC, KINFO_VME_FLAG_COW)
7974 (KINFO_VME_FLAG_NEEDS_COPY, KINFO_VME_FLAG_NOCOREDUMP)
7975 (KINFO_VME_FLAG_SUPER, KINFO_VME_FLAG_GROWS_UP)
7976 (KINFO_VME_FLAG_GROWS_DOWN, KF_STRUCTSIZE, KF_TYPE, KF_FD)
7977 (KF_PATH, KINFO_FILE_TYPE_VNODE, KINFO_FILE_FD_TYPE_CWD)
7978 (KINFO_FILE_FD_TYPE_TEXT, SIG_WORDS, struct kinfo_proc_layout)
7979 (kinfo_proc_layout_32, kinfo_proc_layout_i386)
7980 (kinfo_proc_layout_64, fbsd_vm_map_entry_flags)
7981 (fbsd_core_info_proc_mappings, fbsd_core_vnode_path)
7982 (fbsd_core_fetch_timeval, fbsd_print_sigset)
7983 (fbsd_core_info_proc_status, fbsd_core_info_proc): New.
7984 (fbsd_init_abi): Install gdbarch "core_info_proc" method.
7985 * fbsd-tdep.h (fbsd_vm_map_entry_flags): New.
7986
7987 2018-01-08 Samuel Thibault <samuel.thibault@ens-lyon.org>
7988
7989 * gdb/gnu-nat.c: Include <elf.h> and <link.h>.
7990 (gnu_xfer_auxv): New function.
7991 (gnu_xfer_partial): Call gnu_xfer_auxv when `object' is
7992 TARGET_OBJECT_AUXV.
7993
7994 2018-01-08 Yao Qi <yao.qi@linaro.org>
7995 Simon Marchi <simon.marchi@ericsson.com>
7996
7997 * Makefile.in (COMMON_SFILES): Remove selftest-arch.c and
7998 common/selftest.c.
7999 (COMMON_OBS): Remove selftest.o.
8000 * configure.ac: Append selftest-arch.c and common/selftest.c to
8001 CONFIG_SRCS. Append selftest-arch.o and selftest.o to COMMON_OBS.
8002 * configure: Re-generated.
8003 * maint.c (maintenance_selftest): Wrap selftests::run_tests with
8004 GDB_SELF_TEST.
8005 (maintenance_info_selftests): Likewise.
8006
8007 2018-01-08 Xavier Roirand <roirand@adacore.com>
8008
8009 * ada-valprint.c (val_print_packed_array_elements): Use
8010 proper number of elements when printing an array indexed
8011 by an enumeration type.
8012
8013 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
8014
8015 * dwarf2read.c (struct dwarf2_cu) <dwarf2_per_objfile>: Remove.
8016 (dw2_get_file_names_reader): Adjust.
8017 (lookup_dwo_signatured_type): Adjust.
8018 (lookup_dwp_signatured_type): Adjust.
8019 (lookup_signatured_type): Adjust.
8020 (create_type_unit_group): Adjust.
8021 (get_type_unit_group): Adjust.
8022 (process_psymtab_comp_unit_reader): Adjust.
8023 (build_type_psymtabs_reader): Adjust.
8024 (scan_partial_symbols): Adjust.
8025 (add_partial_symbol): Adjust.
8026 (add_partial_subprogram): Adjust.
8027 (peek_die_abbrev): Adjust.
8028 (fixup_go_packaging): Adjust.
8029 (process_imported_unit_die): Adjust.
8030 (dwarf2_compute_name): Adjust.
8031 (dwarf2_physname): Adjust.
8032 (read_import_statement): Adjust.
8033 (handle_DW_AT_stmt_list): Adjust.
8034 (read_file_scope): Adjust.
8035 (read_func_scope): Adjust.
8036 (read_lexical_block_scope): Adjust.
8037 (read_call_site_scope): Adjust.
8038 (read_variable): Adjust.
8039 (dwarf2_rnglists_process): Adjust.
8040 (dwarf2_ranges_process): Adjust.
8041 (dwarf2_ranges_read): Adjust.
8042 (dwarf2_get_pc_bounds): Adjust.
8043 (dwarf2_record_block_ranges): Adjust.
8044 (dwarf2_add_field): Adjust.
8045 (dwarf2_add_member_fn): Adjust.
8046 (read_structure_type): Adjust.
8047 (process_structure_scope): Adjust.
8048 (read_enumeration_type): Adjust.
8049 (read_array_type): Adjust.
8050 (mark_common_block_symbol_computed): Adjust.
8051 (read_common_block): Adjust.
8052 (read_namespace_type): Adjust.
8053 (read_namespace): Adjust.
8054 (read_module_type): Adjust.
8055 (read_tag_pointer_type): Adjust.
8056 (read_tag_ptr_to_member_type): Adjust.
8057 (read_tag_string_type): Adjust.
8058 (read_subroutine_type): Adjust.
8059 (read_typedef): Adjust.
8060 (read_base_type): Adjust.
8061 (attr_to_dynamic_prop): Adjust.
8062 (read_subrange_type): Adjust.
8063 (read_unspecified_type): Adjust.
8064 (dwarf2_read_abbrevs): Adjust.
8065 (load_partial_dies): Adjust.
8066 (read_partial_die): Adjust.
8067 (find_partial_die): Adjust.
8068 (guess_partial_die_structure_name): Adjust.
8069 (fixup_partial_die): Adjust.
8070 (read_attribute_value): Adjust.
8071 (read_addr_index): Adjust.
8072 (read_addr_index_from_leb128): Adjust.
8073 (read_str_index): Adjust.
8074 (dwarf2_string_attr): Adjust.
8075 (get_debug_line_section): Adjust.
8076 (dwarf_decode_line_header): Adjust.
8077 (lnp_state_machine::check_line_address): Adjust.
8078 (dwarf_decode_lines_1): Adjust.
8079 (dwarf_decode_lines): Adjust.
8080 (dwarf2_start_symtab): Adjust.
8081 (var_decode_location): Adjust.
8082 (new_symbol_full): Adjust.
8083 (dwarf2_const_value_data): Adjust.
8084 (dwarf2_const_value_attr): Adjust.
8085 (dwarf2_const_value): Adjust.
8086 (die_type): Adjust.
8087 (die_containing_type): Adjust.
8088 (build_error_marker_type): Adjust.
8089 (lookup_die_type): Adjust.
8090 (guess_full_die_structure_name): Adjust.
8091 (anonymous_struct_prefix): Adjust.
8092 (determine_prefix): Adjust.
8093 (dwarf2_name): Adjust.
8094 (follow_die_ref_or_sig): Adjust.
8095 (follow_die_offset): Adjust.
8096 (follow_die_ref): Adjust.
8097 (follow_die_sig_1): Adjust.
8098 (follow_die_sig): Adjust.
8099 (get_signatured_type): Adjust.
8100 (get_DW_AT_signature_type): Adjust.
8101 (decode_locdesc): Adjust.
8102 (dwarf_decode_macros): Adjust.
8103 (cu_debug_loc_section): Adjust.
8104 (fill_in_loclist_baton): Adjust.
8105 (dwarf2_symbol_mark_computed): Adjust.
8106 (init_one_comp_unit): Don't assign
8107 dwarf2_cu::dwarf2_per_objfile.
8108 (set_die_type): Adjust.
8109
8110 2018-01-07 Simon Marchi <simon.marchi@ericsson.com>
8111
8112 * dwarf2read.c (struct mapped_debug_names): Add constructor.
8113 <dwarf2_per_objfile>: New field.
8114 (dwarf2_per_objfile): Remove global.
8115 (get_dwarf2_per_objfile): New function.
8116 (set_dwarf2_per_objfile): New function.
8117 (dwarf2_build_psymtabs_hard): Change objfile parameter to
8118 dwarf2_per_objfile.
8119 (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
8120 (read_abbrev_offset): Likewise.
8121 (read_indirect_string): Likewise.
8122 (read_indirect_line_string): Likewise.
8123 (read_indirect_string_at_offset): Likewise.
8124 (read_indirect_string_from_dwz): Likewise.
8125 (dwarf2_find_containing_comp_unit): Change objfile parameter to
8126 dwarf2_per_objfile.
8127 (age_cached_comp_units): Add dwarf2_per_objfile parameter.
8128 (create_all_comp_units): Change objfile parameter to
8129 dwarf2_per_objfile.
8130 (create_all_type_units): Likewise.
8131 (process_queue): Add dwarf2_per_objfile parameter.
8132 (read_and_check_comp_unit_head): Likewise.
8133 (lookup_dwo_unit_in_dwp): Likewise.
8134 (get_dwp_file): Likewise.
8135 (process_cu_includes): Likewise.
8136 (struct free_dwo_file_cleanup_data): New struct.
8137 (dwarf2_has_info): Use get_dwarf2_per_objfile and
8138 set_dwarf2_per_objfile.
8139 (dwarf2_get_dwz_file): Add dwarf2_per_objfile parameter.
8140 (dw2_do_instantiate_symtab): Get dwarf2_per_objfile from
8141 context, adjust calls.
8142 (dw2_instantiate_symtab): Likewise.
8143 (dw2_get_cutu): Add dwarf2_per_objfile parameter.
8144 (dw2_get_cu): Likewise.
8145 (create_cu_from_index_list): Change objfile parameter to
8146 dwarf2_per_objfile.
8147 (create_cus_from_index_list): Get dwarf2_per_objfile from
8148 context, adjust calls.
8149 (create_cus_from_index): Likewise.
8150 (create_signatured_type_table_from_index): Change objfile
8151 parameter to dwarf2_per_objfile.
8152 (create_signatured_type_table_from_debug_names): Change objfile
8153 parameter to dwarf2_per_objfile.
8154 (create_addrmap_from_index): Likewise.
8155 (create_addrmap_from_aranges): Likewise.
8156 (dwarf2_read_index): Use get_dwarf2_per_objfile, adjust calls.
8157 (dw2_setup): Remove.
8158 (dw2_get_file_names_reader): Get dwarf2_per_objfile from
8159 context.
8160 (dw2_find_last_source_symtab): Get dwarf2_per_objfile using
8161 get_dwarf2_per_objfile.
8162 (dw2_forget_cached_source_info): Likewise.
8163 (dw2_map_symtabs_matching_filename): Likewise.
8164 (struct dw2_symtab_iterator) <index>: Remove.
8165 <dwarf2_per_objfile>: New field.
8166 (dw2_symtab_iter_init): Replace index parameter with
8167 dwarf2_per_objfile.
8168 (dw2_symtab_iter_next): Use dwarf2_per_objfile from iter.
8169 (dw2_lookup_symbol): Use get_dwarf2_per_objfile and adjust.
8170 (dw2_print_stats): Likewise.
8171 (dw2_dump): Likewise.
8172 (dw2_expand_symtabs_for_function): Likewise.
8173 (dw2_expand_all_symtabs): Likewise.
8174 (dw2_expand_symtabs_with_fullname): Likewise.
8175 (dw2_expand_marked_cus): Replace index and objfile parameters
8176 with dwarf2_per_objfile.
8177 (dw_expand_symtabs_matching_file_matcher): Add
8178 dwarf2_per_objfile parameter and adjust calls.
8179 (dw2_expand_symtabs_matching): Use get_dwarf2_per_objfile and
8180 adjust calls.
8181 (dw2_find_pc_sect_compunit_symtab): Don't call dw2_setup.
8182 (dw2_map_symbol_filenames): Use get_dwarf2_per_objfile and
8183 adjust calls.
8184 (create_cus_from_debug_names_list): Replace objfile parameter
8185 with dwarf2_per_objfile and adjust calls.
8186 (create_cus_from_debug_names): Likewise.
8187 (dwarf2_read_debug_names): Likewise.
8188 (mapped_debug_names::namei_to_name): Adjust call.
8189 (dw2_debug_names_iterator::next): Likewise.
8190 (dw2_debug_names_iterator::find_vec_in_debug_names): Likewise.
8191 (dw2_debug_names_lookup_symbol): Use get_dwarf2_per_objfile.
8192 (dw2_debug_names_dump): Likewise.
8193 (dw2_debug_names_expand_symtabs_for_function): Likewise.
8194 (dw2_debug_names_expand_symtabs_matching): Likewise.
8195 (dwarf2_initialize_objfile): Likewise.
8196 (dwarf2_build_psymtabs): Likewise.
8197 (get_abbrev_section_for_cu): Get dwarf2_per_objfile from
8198 this_cu.
8199 (error_check_comp_unit_head): Add dwarf2_per_objfile parameter.
8200 (read_and_check_comp_unit_head): Likewise.
8201 (read_abbrev_offset): Likewise.
8202 (create_debug_type_hash_table): Likewise.
8203 (create_debug_types_hash_table): Likewise.
8204 (create_all_type_units): Replace objfile parameter with
8205 dwarf2_per_objfile.
8206 (add_type_unit): Add dwarf2_per_objfile parameter.
8207 (fill_in_sig_entry_from_dwo_entry): Replace objfile parameter
8208 with dwarf2_per_objfile.
8209 (lookup_dwo_signatured_type): Get dwarf2_per_objfile from cu.
8210 (lookup_dwp_signatured_type): Likewise.
8211 (lookup_signatured_type): Likewise.
8212 (read_cutu_die_from_dwo): Likewise.
8213 (init_tu_and_read_dwo_dies): Likewise.
8214 (init_cutu_and_read_dies): Likewise.
8215 (init_cutu_and_read_dies_no_follow): Likewise.
8216 (allocate_type_unit_groups_table): Add objfile parameter.
8217 (create_type_unit_group): Use dwarf2_per_objfile from cu.
8218 (get_type_unit_group): Likewise.
8219 (process_psymtab_comp_unit): Update call.
8220 (build_type_psymtabs_reader): Use dwarf2_per_objfile from cu.
8221 (build_type_psymtabs_1): Add dwarf2_per_objfile parameter.
8222 (print_tu_stats): Likewise.
8223 (build_type_psymtab_dependencies): Use dwarf2_per_objfile passed
8224 in void* parameter.
8225 (build_type_psymtabs): Change objfile parameter to
8226 dwarf2_per_objfile.
8227 (process_skeletonless_type_unit): Use dwarf2_per_objfile
8228 passed in void* parameter.
8229 (process_skeletonless_type_units): Change objfile parameter to
8230 dwarf2_per_objfile.
8231 (set_partial_user): Likewise.
8232 (dwarf2_build_psymtabs_hard): Likewise.
8233 (read_comp_units_from_section): Likewise.
8234 (create_all_comp_units): Likewise.
8235 (scan_partial_symbols): Update calls.
8236 (add_partial_symbol): Likewise.
8237 (dwarf2_read_symtab): Use get_dwarf2_per_objfile.
8238 (maybe_queue_comp_unit): Use dwarf2_read_symtab from cu.
8239 (process_queue): Add dwarf2_per_objfile parameter.
8240 (get_compunit_symtab): Use dwarf2_per_objfile from cu.
8241 (compute_compunit_symtab_includes): Likewise.
8242 (process_cu_includes): Add dwarf2_per_objfile parameter.
8243 (process_full_comp_unit): Use dwarf2_per_objfile from cu.
8244 (process_full_type_unit): Likewise.
8245 (process_imported_unit_die): Update call.
8246 (handle_DW_AT_stmt_list): Use dwarf2_per_objfile from cu.
8247 (read_file_scope): Likewise.
8248 (allocate_dwo_file_hash_table): Add objfile parameter.
8249 (lookup_dwo_file_slot): Add dwarf2_per_objfile parameter.
8250 (create_cus_hash_table): Likewise.
8251 (create_dwp_hash_table): Likewise.
8252 (create_dwo_unit_in_dwp_v1): Likewise.
8253 (create_dwp_v2_section): Likewise.
8254 (create_dwo_unit_in_dwp_v2): Likewise.
8255 (lookup_dwo_unit_in_dwp): Likewise.
8256 (try_open_dwop_file): Likewise.
8257 (open_dwo_file): Likewise. Use dwarf2_per_objfile from cu.
8258 (open_and_init_dwo_file): Use dwarf2_per_objfile from cu, update
8259 cleanup to include a reference to dwarf2_per_objfile.
8260 (open_dwp_file): Add dwarf2_per_objfile parameter.
8261 (open_and_init_dwp_file): Likewise.
8262 (get_dwp_file): Likewise.
8263 (lookup_dwo_cutu): Use dwarf2_per_objfile from cu.
8264 (queue_and_load_all_dwo_tus): Update call.
8265 (free_dwo_file_cleanup): Use dwarf2_per_objfile from cleanup
8266 data.
8267 (dwarf2_rnglists_process): Use dwarf2_per_objfile from cu.
8268 (dwarf2_ranges_process): Likewise.
8269 (dwarf2_get_pc_bounds): Likewise.
8270 (mark_common_block_symbol_computed): Likewise.
8271 (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
8272 (dwarf2_read_abbrevs): Update call.
8273 (read_partial_die): Use dwarf2_per_objfile from cu.
8274 (find_partial_die): Likewise.
8275 (fixup_partial_die): Likewise.
8276 (read_attribute_value): Likewise.
8277 (read_indirect_string_at_offset_from): Add objfile parameter.
8278 (read_indirect_string_at_offset): Add dwarf2_per_objfile
8279 parameter.
8280 (read_indirect_string_from_dwz): Add objfile parameter.
8281 (read_indirect_string): Add objfile parameter.
8282 (read_addr_index_1): Add dwarf2_per_objfile parameter.
8283 (read_addr_index): Use dwarf2_per_objfile from cu.
8284 (dwarf2_read_addr_index): Use dwarf2_per_objfile from cu, don't
8285 call dw2_setup.
8286 (read_str_index): Use dwarf2_per_objfile from cu.
8287 (get_debug_line_section): Likewise.
8288 (read_formatted_entries): Add dwarf2_per_objfile parameter.
8289 (dwarf_decode_line_header): Use dwarf2_per_objfile from cu.
8290 (new_symbol_full): Use dwarf2_per_objfile from cu.
8291 (build_error_marker_type): Likewise.
8292 (lookup_die_type): Likewise.
8293 (determine_prefix): Likewise.
8294 (follow_die_offset): Likewise.
8295 (dwarf2_fetch_die_loc_sect_off): Use get_dwarf2_per_objfile.
8296 (dwarf2_fetch_constant_bytes): Don't call dw2_setup.
8297 (dwarf2_fetch_die_type_sect_off): Likewise.
8298 (dwarf2_get_die_type): Likewise.
8299 (follow_die_sig_1): Use dwarf2_per_objfile from cu.
8300 (get_signatured_type): Likewise.
8301 (get_DW_AT_signature_type): Likewise.
8302 (dwarf_decode_macro_bytes): Add dwarf2_per_objfile parameter.
8303 (dwarf_decode_macros): Use dwarf2_per_objfile from cu.
8304 (cu_debug_loc_section): Likewise.
8305 (fill_in_loclist_baton): Likewise.
8306 (dwarf2_symbol_mark_computed): Likewise.
8307 (dwarf2_find_containing_comp_unit): Change objfile parameter to
8308 dwarf2_per_objfile.
8309 (free_cached_comp_units): Use dwarf2_per_objfile passed in void*
8310 parameter.
8311 (age_cached_comp_units): Add dwarf2_per_objfile parameter.
8312 (free_one_cached_comp_unit): Use dwarf2_per_objfile from cu.
8313 (dwarf2_free_objfile): Use get_dwarf2_per_objfile.
8314 (set_die_type): Use dwarf2_free_objfile from cu.
8315 (get_die_type_at_offset): Likewise.
8316 (dwarf2_per_objfile_free): Don't assign global variable.
8317 (debug_names) <constructor>: Add dwarf2_per_objfile
8318 parameter, update m_debugstrlookup construction.
8319 (debug_names::debug_str_lookup): Add dwarf2_per_objfile
8320 parameter.
8321 <m_dwarf2_per_objfile>: New field.
8322 <lookup>: Use m_dwarf2_per_objfile.
8323 (check_dwarf64_offsets): Add dwarf2_per_objfile parameter.
8324 (psyms_seen_size): Likewise.
8325 (write_gdbindex): Replace objfile parameter with
8326 dwarf2_per_objfile.
8327 (write_debug_names): Likewise.
8328 (write_psymtabs_to_index): Likewise.
8329 (save_gdb_index_command): Use get_dwarf2_per_objfile, update
8330 calls.
8331
8332 2018-01-07 Simon Marchi <simon.marchi@ericsson.com>
8333
8334 * dwarf2read.c (struct dwarf2_cu) <objfile>: Remove.
8335 <dwarf2_per_objfile>: New field.
8336 (struct dwarf2_per_cu_data) <objfile>: Remove.
8337 <dwarf2_per_objfile>: New field.
8338 (create_cu_from_index_list): Assign dwarf2_per_objfile instead
8339 of objfile.
8340 (create_signatured_type_table_from_index): Likewise.
8341 (create_debug_type_hash_table): Likewise.
8342 (fill_in_sig_entry_from_dwo_entry): Likewise.
8343 (lookup_dwo_unit): Access objfile through dwarf2_per_objfile.
8344 (create_type_unit_group): Assign dwarf2_per_objfile instead of
8345 objfile.
8346 (create_partial_symtab): Access objfile through
8347 dwarf2_per_objfile.
8348 (process_psymtab_comp_unit_reader): Likewise.
8349 (read_comp_units_from_section): Likewise.
8350 (scan_partial_symbols): Likewise.
8351 (add_partial_symbol): Likewise.
8352 (add_partial_subprogram): Likewise.
8353 (peek_die_abbrev): Likewise.
8354 (fixup_go_packaging): Likewise.
8355 (process_full_comp_unit): Likewise.
8356 (process_full_type_unit): Likewise.
8357 (process_imported_unit_die): Likewise.
8358 (dwarf2_compute_name): Likewise.
8359 (dwarf2_physname): Likewise.
8360 (read_import_statement): Likewise.
8361 (create_cus_hash_table): Assign dwarf2_physname instead of
8362 objfile.
8363 (read_func_scope): Access objfile through dwarf2_per_objfile.
8364 (read_lexical_block_scope): Likewise.
8365 (read_call_site_scope): Likewise.
8366 (read_variable): Likewise.
8367 (dwarf2_rnglists_process): Likewise.
8368 (dwarf2_ranges_process): Likewise.
8369 (dwarf2_ranges_read): Likewise.
8370 (dwarf2_record_block_ranges): Likewise.
8371 (dwarf2_add_field): Likewise.
8372 (dwarf2_add_member_fn): Likewise.
8373 (read_structure_type): Likewise.
8374 (process_structure_scope): Likewise.
8375 (read_enumeration_type): Likewise.
8376 (read_array_type): Likewise.
8377 (read_common_block): Likewise.
8378 (read_namespace_type): Likewise.
8379 (read_namespace): Likewise.
8380 (read_module_type): Likewise.
8381 (read_tag_pointer_type): Likewise.
8382 (read_tag_ptr_to_member_type): Likewise.
8383 (read_tag_string_type): Likewise.
8384 (read_subroutine_type): Likewise.
8385 (read_typedef): Likewise.
8386 (read_base_type): Likewise.
8387 (attr_to_dynamic_prop): Likewise.
8388 (read_subrange_type): Likewise.
8389 (read_unspecified_type): Likewise.
8390 (load_partial_dies): Likewise.
8391 (read_partial_die): Likewise.
8392 (find_partial_die): Likewise.
8393 (guess_partial_die_structure_name): Likewise.
8394 (fixup_partial_die): Likewise.
8395 (read_attribute_value): Likewise.
8396 (read_addr_index_from_leb128): Likewise.
8397 (dwarf2_read_addr_index): Likewise.
8398 (dwarf2_string_attr): Likewise.
8399 (lnp_state_machine::check_line_address): Likewise.
8400 (dwarf_decode_lines_1): Likewise.
8401 (dwarf_decode_lines): Likewise.
8402 (dwarf2_start_symtab): Likewise.
8403 (var_decode_location): Likewise.
8404 (new_symbol_full): Likewise.
8405 (dwarf2_const_value_data): Likewise.
8406 (dwarf2_const_value_attr): Likewise.
8407 (dwarf2_const_value): Likewise.
8408 (die_type): Likewise.
8409 (die_containing_type): Likewise.
8410 (lookup_die_type): Likewise.
8411 (guess_full_die_structure_name): Likewise.
8412 (anonymous_struct_prefix): Likewise.
8413 (dwarf2_name): Likewise.
8414 (follow_die_ref_or_sig): Likewise.
8415 (follow_die_offset): Likewise.
8416 (follow_die_ref): Likewise.
8417 (dwarf2_fetch_die_loc_sect_off): Likewise.
8418 (dwarf2_fetch_constant_bytes): Likewise.
8419 (dwarf2_fetch_die_type_sect_off): Likewise.
8420 (dwarf2_get_die_type): Likewise.
8421 (follow_die_sig): Likewise.
8422 (decode_locdesc): Likewise.
8423 (dwarf2_per_cu_objfile): Likewise.
8424 (dwarf2_per_cu_text_offset): Likewise.
8425 (init_one_comp_unit): Assign dwarf2_per_objfile instead of
8426 objfile.
8427 (set_die_type): Access objfile through
8428 dwarf2_per_objfile.
8429
8430 2018-01-07 Simon Marchi <simon.marchi@ericsson.com>
8431
8432 * valprint.c (converted_character_d): Remove typedef.
8433 (DEF_VEC_O (converted_character_d)): Remove.
8434 (count_next_character): Use std::vector.
8435 (print_converted_chars_to_obstack): Likewise.
8436 (generic_printstr): Likewise.
8437
8438 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
8439
8440 * xml-support.h (struct gdb_xml_value): Add constructor.
8441 <value>: Change type to unique_xmalloc_ptr.
8442 (gdb_xml_value_s): Remove typedef.
8443 (DEF_VEC_O (gdb_xml_value_s)): Remove.
8444 (gdb_xml_element_start_handler): Change parameter type to
8445 std::vector.
8446 (xml_find_attribute): Likewise.
8447 * xml-support.c (xml_find_attribute): Change parameter type to
8448 std::vector and adjust.
8449 (gdb_xml_values_cleanup): Remove.
8450 (gdb_xml_parser::start_element): Adjust to std::vector.
8451 (xinclude_start_include): Change paraeter type to std::vector
8452 and adjust.
8453 * btrace.c (check_xml_btrace_version): Likewise.
8454 (parse_xml_btrace_block): Likewise.
8455 (parse_xml_btrace_pt_config_cpu): Likewise.
8456 (parse_xml_btrace_pt): Likewise.
8457 (parse_xml_btrace_conf_bts): Likewise.
8458 (parse_xml_btrace_conf_pt): Likewise.
8459 * memory-map.c (memory_map_start_memory): Likewise.
8460 (memory_map_start_property): Likewise.
8461 * osdata.c (osdata_start_osdata): Likewise.
8462 (osdata_start_item): Likewise.
8463 (osdata_start_column): Likewise.
8464 * remote.c (start_thread): Likewise.
8465 * solib-aix.c (library_list_start_library): Likewise.
8466 (library_list_start_list): Likewise.
8467 * solib-svr4.c (library_list_start_library): Likewise.
8468 (svr4_library_list_start_list): Likewise.
8469 * solib-target.c (library_list_start_segment): Likewise.
8470 (library_list_start_section): Likewise.
8471 (library_list_start_library): Likewise.
8472 (library_list_start_list): Likewise.
8473 * tracepoint.c (traceframe_info_start_memory): Likewise.
8474 (traceframe_info_start_tvar): Likewise.
8475 * xml-syscall.c (syscall_start_syscall): Likewise.
8476 * xml-tdesc.c (tdesc_start_target): Likewise.
8477 (tdesc_start_feature): Likewise.
8478 (tdesc_start_reg): Likewise.
8479 (tdesc_start_union): Likewise.
8480 (tdesc_start_struct): Likewise.
8481 (tdesc_start_flags): Likewise.
8482 (tdesc_start_enum): Likewise.
8483 (tdesc_start_field): Likewise.
8484 (tdesc_start_enum_value): Likewise.
8485 (tdesc_start_vector): Likewise.
8486
8487 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
8488
8489 * extension.h (struct xmethod_worker) <clone>: Remove.
8490 * python/py-xmethods.c (struct python_xmethod_worker) <clone>:
8491 Remove.
8492 (python_xmethod_worker::clone): Remove.
8493 * valops.c (find_overload_match): Use std::move instead of
8494 clone.
8495
8496 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
8497
8498 * extension-priv.h (enum ext_lang_rc): Remove, move to extension.h.
8499 (struct extension_language_ops) <clone_xmethod_worker_data>: Remove.
8500 <free_xmethod_worker_data>: Remove.
8501 <get_matching_xmethod_workers>: Chance VEC to std::vector.
8502 <get_xmethod_arg_types>: Remove.
8503 <get_xmethod_result_type>: Remove.
8504 <invoke_xmethod>: Remove.
8505 * extension.c (new_xmethod_worker): Remove.
8506 (clone_xmethod_worker): Remove.
8507 (get_matching_xmethod_workers): Return void, pass std::vector by
8508 pointer.
8509 (get_xmethod_arg_types): Rename to...
8510 (xmethod_worker::get_arg_types): ... this, and adjust.
8511 (get_xmethod_result_type): Rename to...
8512 (xmethod_worker::get_result_type): ... this, and adjust.
8513 (invoke_xmethod): Remove.
8514 (free_xmethod_worker): Remove.
8515 (free_xmethod_worker_vec): Remove.
8516 * extension.h (enum ext_lang_rc): Move here from
8517 extension-priv.h.
8518 (struct xmethod_worker): Add constructor and destructor.
8519 <data>: Remove.
8520 <value>: Remove.
8521 <invoke, clone, do_get_result_type, do_get_arg_types>: New
8522 virtual pure methods.
8523 <get_arg_types, get_result_type>: New methods.
8524 (xmethod_worker_ptr): Remove typedef.
8525 (DEF_VEC_P (xmethod_worker_ptr)): Remove.
8526 (xmethod_worker_vec): Remove typedef.
8527 (xmethod_worker_up): New typedef.
8528 (invoke_xmethod): Remove.
8529 (clone_xmethod_worker): Remove.
8530 (free_xmethod_worker): Remove.
8531 (free_xmethod_worker_vec): Remove.
8532 (get_xmethod_arg_types): Remove.
8533 (get_xmethod_result_type): Remove.
8534 * valops.c (find_method_list): Use std::vector, don't use
8535 intermediate vector.
8536 (value_find_oload_method_list): Use std::vector.
8537 (find_overload_match): Use std::vector.
8538 (find_oload_champ): Use std::vector.
8539 * value.c (value_free): Use operator delete.
8540 (value_of_xmethod): Rename to...
8541 (value_from_xmethod): ... this. Don't assign
8542 xmethod_worker::value, take rvalue-reference.
8543 (result_type_of_xmethod): Adjust.
8544 (call_xmethod): Adjust.
8545 * value.h: Include extension.h.
8546 (struct xmethod_worker): Don't forward-declare.
8547 (value_of_xmethod): Rename to...
8548 (value_from_xmethod): ... this, take rvalue-reference.
8549 * python/py-xmethods.c (struct gdbpy_worker_data): Rename to...
8550 (struct python_xmethod_worker): ... this, add constructor and
8551 destructor.
8552 <invoke, clone, do_get_arg_types, do_get_result_type>: Implement.
8553 (gdbpy_free_xmethod_worker_data): Rename to...
8554 (python_xmethod_worker::~python_xmethod_worker): ... this and
8555 adjust.
8556 (gdbpy_clone_xmethod_worker_data): Rename to...
8557 (python_xmethod_worker::clone): ... this and adjust.
8558 (gdbpy_get_matching_xmethod_workers): Use std::vector, don't use
8559 temporary vector.
8560 (gdbpy_get_xmethod_arg_types): Rename to...
8561 (python_xmethod_worker::do_get_arg_types): ... this and adjust.
8562 (gdbpy_get_xmethod_result_type): Rename to...
8563 (python_xmethod_worker::do_get_result_type): ... this and
8564 adjust.
8565 (gdbpy_invoke_xmethod): Rename to...
8566 (python_xmethod_worker::invoke): ... this and adjust.
8567 (new_python_xmethod_worker): Rename to...
8568 (python_xmethod_worker::python_xmethod_worker): ... this and
8569 adjust.
8570 * python/python-internal.h (gdbpy_clone_xmethod_worker_data):
8571 Remove.
8572 (gdbpy_free_xmethod_worker_data): Remove.
8573 (gdbpy_get_matching_xmethod_workers): Use std::vector.
8574 (gdbpy_get_xmethod_arg_types): Remove.
8575 (gdbpy_get_xmethod_result_type): Remove.
8576 (gdbpy_invoke_xmethod): Remove.
8577 * python/python.c (python_extension_ops): Remove obsolete
8578 callbacks.
8579
8580 2018-01-05 Pedro Alves <palves@redhat.com>
8581
8582 PR gdb/18653
8583 * common/signals-state-save-restore.c
8584 (save_original_signals_state): New parameter 'quiet'. Warn if we
8585 find a custom handler preinstalled, instead of internal erroring.
8586 But only warn if !quiet.
8587 * common/signals-state-save-restore.h
8588 (save_original_signals_state): New parameter 'quiet'.
8589 * main.c (captured_main_1): Move save_original_signals_state call
8590 after option handling, and pass QUIET.
8591
8592 2018-01-05 Pedro Alves <palves@redhat.com>
8593
8594 * spu-tdep.c (spu_catch_start): Pass
8595 symbol_name_match_type::SEARCH_NAME to block_lookup_symbol.
8596
8597 2018-01-05 Pedro Alves <palves@redhat.com>
8598
8599 PR gdb/22670
8600 * ada-lang.c (literal_symbol_name_matcher): New function.
8601 (ada_get_symbol_name_matcher): Use it for
8602 symbol_name_match_type::SEARCH_NAME.
8603 * block.c (block_lookup_symbol): New parameter 'match_type'. Pass
8604 it down instead of assuming symbol_name_match_type::FULL.
8605 * block.h (block_lookup_symbol): New parameter 'match_type'.
8606 * c-valprint.c (print_unpacked_pointer): Use
8607 lookup_symbol_search_name instead of lookup_symbol.
8608 * compile/compile-object-load.c (get_out_value_type): Pass down
8609 symbol_name_match_type::SEARCH_NAME.
8610 * cp-namespace.c (cp_basic_lookup_symbol): Pass down
8611 symbol_name_match_type::FULL.
8612 * cp-support.c (cp_get_symbol_name_matcher): Handle
8613 symbol_name_match_type::SEARCH_NAME.
8614 * infrun.c (insert_exception_resume_breakpoint): Use
8615 lookup_symbol_search_name.
8616 * p-valprint.c (pascal_val_print): Use lookup_symbol_search_name.
8617 * psymtab.c (maintenance_check_psymtabs): Use
8618 symbol_name_match_type::SEARCH_NAME and SYMBOL_SEARCH_NAME.
8619 * stack.c (print_frame_args): Use lookup_symbol_search_name and
8620 SYMBOL_SEARCH_NAME.
8621 * symtab.c (lookup_local_symbol): Don't demangle the lookup name
8622 if symbol_name_match_type::SEARCH_NAME.
8623 (lookup_symbol_in_language): Pass down
8624 symbol_name_match_type::FULL.
8625 (lookup_symbol_search_name): New.
8626 (lookup_language_this): Pass down
8627 symbol_name_match_type::SEARCH_NAME.
8628 (lookup_symbol_aux, lookup_local_symbol): New parameter
8629 'match_type'. Pass it down.
8630 * symtab.h (symbol_name_match_type::SEARCH_NAME): New enumerator.
8631 (lookup_symbol_search_name): New declaration.
8632 (lookup_symbol_in_block): New 'match_type' parameter.
8633
8634 2018-01-05 Pedro Alves <palves@redhat.com>
8635
8636 PR gdb/22670
8637 * ada-lang.c (ada_lookup_encoded_symbol): Reimplement in terms of
8638 ada_lookup_symbol.
8639 (ada_lookup_symbol): Reimplement in terms of
8640 ada_lookup_symbol_list, bits factored out from
8641 ada_lookup_encoded_symbol.
8642
8643 2018-01-05 Joel Brobecker <brobecker@adacore.com>
8644
8645 * ada-exp.y (write_object_renaming): When subscripting an array
8646 using a symbol as the index, pass the block in call to
8647 ada_lookup_encoded_symbol when looking that symbol up.
8648
8649 2018-01-05 Jerome Guitton <guitton@adacore.com>
8650
8651 * ada-lang.c (ada_array_length): Use ada_index_type instead of
8652 TYPE_INDEX_TYPE.
8653
8654 2018-01-05 Joel Brobecker <brobecker@adacore.com>
8655
8656 * ada-lang.c (ada_to_fixed_value_create): Add handling of
8657 the case where VALUE_LVAL (val0) is not lval_memory.
8658
8659 2018-01-05 Xavier Roirand <roirand@adacore.com>
8660
8661 * ada-valprint.c (print_optional_low_bound): Handle
8662 character-indexed array printing like boolean-indexed array
8663 printing.
8664
8665 2018-01-05 Joel Brobecker <brobecker@adacore.com>
8666
8667 * NEWS: Create a new section for the next release branch.
8668 Rename the section of the current branch, now that it has
8669 been cut.
8670
8671 2018-01-05 Joel Brobecker <brobecker@adacore.com>
8672
8673 GDB 8.1 branch created (5219ac6237c272b938c28517bf371429260c71e7):
8674 * version.in: Bump version to 8.1.50.DATE-git.
8675
8676 2018-01-03 Xavier Roirand <roirand@adacore.com>
8677
8678 * ada-lang.h (ada_exception_catchpoint_kind) <ada_catch_handlers>:
8679 Add field.
8680 * ada-lang.c (struct exception_support_info) <catch_handlers_sym>:
8681 Add field.
8682 (default_exception_support_info) <catch_handlers_sym>: Add field.
8683 (exception_support_info_fallback) <catch_handlers_sym>: Add field.
8684 (ada_exception_name_addr_1): Add "catch handlers" handling.
8685 (ada_exception_catchpoint_cond_string) <ex>: New parameter.
8686 Update all callers.
8687 (create_excep_cond_exprs) <ex>: Add parameter.
8688 (re_set_exception): Update create_excep_cond_exprs call.
8689 (print_it_exception, print_one_exception, print_mention_exception)
8690 (print_recreate_exception): Add "catch handler" handling.
8691 (allocate_location_catch_handlers, re_set_catch_handlers)
8692 (check_status_catch_handlers, print_it_catch_handlers)
8693 (print_one_catch_handlers, print_mention_catch_handlers)
8694 (print_recreate_catch_handlers): New function.
8695 (catch_handlers_breakpoint_ops): New variable.
8696 (catch_ada_exception_command_split) <is_catch_handlers_cmd>:
8697 Add parameter. Add "catch handler" handling.
8698 (ada_exception_sym_name, ada_exception_breakpoint_ops):
8699 Add "catch handler" handling.
8700 (ada_exception_catchpoint_cond_string): Add "catch handler"
8701 handling.
8702 (create_ada_exception_catchpoint): Update create_excep_cond_exprs
8703 call.
8704 (catch_ada_handlers_command): New function.
8705 (initialize_ada_catchpoint_ops): Initialize "catch handlers"
8706 operations structure.
8707 (_initialize_ada_language): Add "catch handlers" command entry.
8708 * NEWS: Document "catch handlers" feature.
8709
8710 2018-01-02 Joel Brobecker <brobecker@adacore.com>
8711
8712 * ada-lang.c (ada_value_slice_from_ptr): Take array stride into
8713 account when creating the array type of the slice.
8714 (ada_value_slice): Likewise.
8715
8716 2018-01-02 Joel Brobecker <brobecker@adacore.com>
8717
8718 * gdbtypes.h (enum dynamic_prop_node_kind) <DYN_PROP_BYTE_STRIDE>:
8719 New enum value.
8720 (create_array_type_with_stride): Add byte_stride_prop parameter.
8721 * gdbtypes.c (create_array_type_with_stride) <byte_stride_prop>:
8722 New parameter. Update all callers in this file.
8723 (array_type_has_dynamic_stride): New function.
8724 (is_dynamic_type_internal, resolve_dynamic_array): Add handling
8725 of arrays with dynamic byte strides.
8726 * dwarf2read.c (read_array_type): Add support for dynamic
8727 DW_AT_byte_stride attributes.
8728
8729 2018-01-02 Joel Brobecker <brobecker@adacore.com>
8730
8731 * dwarf2read.c (read_unspecified_type): Treat
8732 DW_TAG_enumeration_type DIEs from Ada units as stubs.
8733
8734 2018-01-01 Joel Brobecker <brobecker@adacore.com>
8735
8736 Update copyright year range in all GDB files.
8737
8738 2018-01-01 Joel Brobecker <brobecker@adacore.com>
8739
8740 * copyright.py (BY_HAND): Remove gdb/testsuite/gdb.base/step-line.inp
8741 and gdb/testsuite/gdb.base/step-line.c.
8742
8743 2018-01-01 Joel Brobecker <brobecker@adacore.com>
8744
8745 * copyright.py (main): Dump the contents of
8746 MULTIPLE_COPYRIGHT_HEADERS (separately) from BY_HAND,
8747 even if BY_HAND is empty.
8748
8749 2018-01-01 Joel Brobecker <brobecker@adacore.com>
8750
8751 * top.c (print_gdb_version): Update Copyright year in version
8752 message.
8753
8754 2018-01-01 Joel Brobecker <brobecker@adacore.com>
8755
8756 * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2017.
8757
8758 For older changes see ChangeLog-2017.
8759 \f
8760 Local Variables:
8761 mode: change-log
8762 left-margin: 8
8763 fill-column: 74
8764 version-control: never
8765 coding: utf-8
8766 End:
This page took 0.258215 seconds and 4 git commands to generate.