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