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