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