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