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