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