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