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