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