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