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