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