Remove two cleanups using std::string
[deliverable/binutils-gdb.git] / gdb / ChangeLog
1 2018-03-13 Tom Tromey <tom@tromey.com>
2
3 * machoread.c (macho_check_dsym): Change filenamep to a
4 std::string*.
5 (macho_symfile_read): Update.
6 * symfile.c (load_command): Use std::string.
7
8 2018-03-12 Andrew Burgess <andrew.burgess@embecosm.com>
9
10 * riscv-tdep.c (riscv_sw_breakpoint_from_kind): Add localization
11 to error message string.
12 (riscv_register_name): Use xsnprintf instead of sprintf.
13 (riscv_insn::fetch_instruction): Use gdb_assert instead of
14 internal_error.
15 (riscv_print_arg_location): Use gdb_assert_not_reached instead of
16 error.
17 (riscv_push_dummy_call): Likewise.
18
19 2018-03-12 Tom Tromey <tom@tromey.com>
20
21 * rs6000-aix-tdep.c (rs6000_aix_core_xfer_shared_libraries_aix):
22 Use gdb::byte_vector.
23 * arm-tdep.c (arm_exidx_new_objfile): Use gdb::byte_vector.
24
25 2018-03-12 Yao Qi <yao.qi@linaro.org>
26
27 * ia64-libunwind-tdep.c (libunwind_get_reg_special): Change
28 parameter type to readable_regcache.
29 * ia64-libunwind-tdep.h (libunwind_get_reg_special): Update
30 the declaration.
31
32 2018-03-11 Tom Tromey <tom@tromey.com>
33
34 * dwarf2read.c (struct nextfield): Add initializers.
35 (struct nextfnfield): Remove.
36 (struct fnfieldlist): Add initializers. Remove "length" and
37 "head", use std::vector.
38 (struct decl_field_list): Remove.
39 (struct field_info): Add initializers.
40 <fields, baseclasses>: Now std::vector.
41 <nbaseclasses, nfnfields, typedef_field_list_count,
42 nested_types_list_count>: Remove.
43 (dwarf2_add_field, dwarf2_add_type_defn)
44 (dwarf2_attach_fields_to_type, dwarf2_add_member_fn)
45 (dwarf2_attach_fn_fields_to_type, handle_struct_member_die)
46 (process_structure_scope): Update.
47
48 2018-03-11 Tom Tromey <tom@tromey.com>
49
50 * dwarf2read.c (sort_tu_by_abbrev_offset): Change to be suitable
51 for use by std::sort.
52 (build_type_psymtabs_1): Use std::vector.
53
54 2018-03-09 Eli Zaretskii <eliz@gnu.org>
55
56 * top.c (print_gdb_configuration): Reflect LIBIPT, LIBMEMCHECK,
57 and LIBMPFR in the printed configuration.
58
59 2018-03-08 Tom Tromey <tom@tromey.com>
60
61 * source.c (get_filename_and_charpos): Use scoped_fd.
62 * nto-procfs.c (procfs_open_1): Use scoped_fd.
63 (procfs_pidlist): Likewise.
64 * procfs.c (proc_get_LDT_entry): Use scoped_fd.
65 (iterate_over_mappings): Likewise.
66
67 2018-03-08 Tom Tromey <tom@tromey.com>
68
69 * infcall.c (struct call_return_meta_info)
70 <stack_temporaries_enabled>: Remove.
71 (get_call_return_value, call_function_by_hand_dummy): Update.
72 * thread.c (disable_thread_stack_temporaries): Remove.
73 (enable_thread_stack_temporaries): Remove.
74 (thread_stack_temporaries_enabled_p): Return bool.
75 (push_thread_stack_temporary, value_in_thread_stack_temporaries)
76 (get_last_thread_stack_temporary): Update.
77 * eval.c (evaluate_subexp): Update.
78 * gdbthread.h (class enable_thread_stack_temporaries): Now a
79 class, not a function.
80 (value_ptr, value_vec): Remove typedefs.
81 (class thread_info) <stack_temporaries_enabled>: Now bool.
82 <stack_temporaries>: Now a std::vector.
83 (thread_stack_temporaries_enabled_p)
84 (value_in_thread_stack_temporaries): Return bool.
85
86 2018-03-08 Simon Marchi <simon.marchi@ericsson.com>
87
88 * remote.c (putpkt_binary): Fix omitted bytes reporting.
89 (getpkt_or_notif_sane_1): Likewise.
90
91 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
92
93 * build-id.c (build_id_to_debug_bfd): Use std::string.
94
95 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
96
97 * build-id.c (find_separate_debug_file_by_buildid): Return
98 std::string.
99 * build-id.h (find_separate_debug_file_by_buildid): Return
100 std::string.
101 * coffread.c (coff_symfile_read): Adjust to std::string.
102 * elfread.c (elf_symfile_read): Adjust to std::string.
103 * symfile.c (separate_debug_file_exists): Change parameter to
104 std::string.
105 (find_separate_debug_file): Return std::string.
106 (find_separate_debug_file_by_debuglink): Return std::string.
107 * symfile.h (find_separate_debug_file_by_debuglink): Return
108 std::string.
109
110 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
111
112 * common/xml-utils.c (xml_escape_text): Move code to...
113 (xml_escape_text_append): ... this new function.
114 * common/xml-utils.h (xml_escape_text_append): New declaration.
115 * unittests/xml-utils-selftests.c (test_xml_escape_text_append):
116 New function.
117 (_initialize_xml_utils): register test_xml_escape_text_append as
118 a selftest.
119
120 2018-03-07 Alan Hayward <alan.hayward@arm.com>
121
122 * defs.h: Remove MAX_REGISTER_SIZE.
123 * regcache.c (init_regcache_descr): Remove MAX_REGISTER_SIZE
124 asserts.
125 * python/py-unwind.c (pyuw_sniffer): Likewise.
126
127 2018-03-07 Tom Tromey <tom@tromey.com>
128
129 * linux-tdep.c (linux_info_proc): Update.
130 * target.h (struct target_ops) <to_fileio_readlink>: Return
131 optional<string>.
132 (target_fileio_readlink): Return optional<string>.
133 * remote.c (remote_hostio_readlink): Return optional<string>.
134 * inf-child.c (inf_child_fileio_readlink): Return
135 optional<string>.
136 * target.c (target_fileio_readlink): Return optional<string>.
137
138 2018-03-07 Andrew Burgess <andrew.burgess@embecosm.com>
139
140 * regcache.c (cooked_read_test): Add riscv to the list of
141 architectures that have a save_reggroup.
142
143 2018-03-07 Andreas Arnez <arnez@linux.vnet.ibm.com>
144
145 * gnu-v3-abi.c (gnuv3_rtti_type): Add early exit if the given
146 value is not a dynamic class object.
147
148 2018-03-06 Tom Tromey <tom@tromey.com>
149
150 * rust-exp.y: Formatting fixes.
151
152 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
153
154 * riscv-tdep.c (riscv_register_name): Remove target description
155 support.
156 (riscv_gdbarch_init): Remove target description check.
157
158 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
159
160 * riscv-tdep.c: Remove 'Contributed by ...' lines from header
161 comment.
162 * riscv-tdep.h: Likewise.
163
164 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
165
166 * riscv-tdep.c (riscv_pseudo_register_read): Delete.
167 (riscv_pseudo_register_write): Delete.
168 (riscv_gdbarch_init): Remove all use of pseudo registers.
169
170 2018-03-06 Simon Marchi <simon.marchi@polymtl.ca>
171
172 * record-btrace.c (btrace_print_lines): Replace cleanup
173 parameter with RAII equivalents.
174 (btrace_insn_history): Replace cleanup with RAII equivalents.
175 * ui-out.h (make_cleanup_ui_out_list_begin_end,
176 make_cleanup_ui_out_tuple_begin_end): Remove.
177 * ui-out.c (struct ui_out_end_cleanup_data, do_cleanup_end,
178 make_cleanup_ui_out_end, make_cleanup_ui_out_tuple_begin_end,
179 make_cleanup_ui_out_list_begin_end): Remove.
180
181 2018-03-06 Simon Marchi <simon.marchi@polymtl.ca>
182
183 * record-btrace.c (record_btrace_maybe_mark_async_event): Change
184 parameter types to std::vector. Use bool.
185 (record_btrace_wait): Replace VEC(tp_t) with
186 std::vector<thread_info *>.
187 * common/gdb_vecs.h (unordered_remove, ordered_remove): New.
188
189 2018-03-06 Simon Marchi <simon.marchi@polymtl.ca>
190
191 * record-btrace.c (record_btrace_disable_callback): Remove.
192 (struct scoped_btrace_disable): New.
193 (record_btrace_open): Use scoped_btrace_disable.
194
195 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
196
197 * riscv-tdep.c (riscv_return_value): Change type to ULONGEST for
198 reading values from registers.
199
200 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
201
202 * riscv-tdep.c (riscv_push_dummy_call): Use core_addr_to_string_nz
203 where appropriate.
204
205 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
206
207 * riscv-tdep.c (riscv_print_arg_location): Add header comment,
208 change parameter type. Use GDB's print functions, and use
209 core_addr_to_string where appropriate.
210 (riscv_push_dummy_call): Use core_addr_to_string where
211 appropriate, update call to riscv_print_arg_location, and reindent
212 a few lines.
213 (riscv_return_value): Update call to riscv_print_arg_location.
214
215 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
216 Tim Newsome <tim@sifive.com>
217 Albert Ou <a0u@eecs.berkeley.edu>
218 Darius Rad <darius@bluespec.com>
219
220 * Makefile.in (ALL_TARGET_OBS): Add riscv-tdep.o
221 (HFILES_NO_SRCDIR): Add riscv-tdep.h.
222 (ALLDEPFILES): Add riscv-tdep.c
223 * configure.tgt: Add riscv support.
224 * riscv-tdep.c: New file.
225 * riscv-tdep.h: New file.
226 * NEWS: Mention new target.
227 * MAINTAINERS: Add entry for riscv.
228
229 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
230
231 * amd64-tdep.c (amd64_classify_aggregate): Ignore zero sized
232 fields within aggregates.
233
234 2018-03-04 Simon Marchi <simon.marchi@polymtl.ca>
235
236 * record-btrace.c (btrace_print_lines): Change type of flags to
237 gdb_disassembly_flags.
238
239 2018-03-04 John Baldwin <jhb@FreeBSD.org>
240
241 * fbsd-nat.c: Include "inf-ptrace.h".
242 (USE_SIGTRAP_SIGINFO): Conditionally define.
243 [USE_SIGTRAP_SIGINFO] (fbsd_handle_debug_trap): New function.
244 (fbsd_wait) [USE_SIGTRAP_SIGINFO]: Call "fbsd_handle_debug_trap".
245 [USE_SIGTRAP_SIGINFO] (fbsd_stopped_by_sw_breakpoint): New
246 function.
247 [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_sw_breakpoint):
248 Likewise.
249 [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_hw_breakpoint):
250 Likewise.
251 (fbsd_nat_add_target) [USE_SIGTRAP_SIGINFO]: Set
252 "stopped_by_sw_breakpoint", "supports_stopped_by_sw_breakpoint",
253 "supports_stopped_by_hw_breakpoint" target methods.
254
255 2018-03-04 John Baldwin <jhb@FreeBSD.org>
256
257 * NEWS (Changes since GDB 8.1): Add "set/show debug fbsd-nat".
258 * fbsd-nat.c (debug_fbsd_nat): New variable.
259 (show_fbsd_nat_debug): New function.
260 (fbsd_wait): Log LWP info if "debug_fbsd_nat" is enabled.
261 (_initialize_fbsd_nat): Add "fbsd-nat" debug boolean command.
262
263 2018-03-04 John Baldwin <jhb@FreeBSD.org>
264
265 * nat/x86-dregs.c (x86_dr_stopped_by_hw_breakpoint): New function.
266 * nat/x86-dregs.h (x86_dr_stopped_by_hw_breakpoint): New
267 prototype.
268 * x86-nat.c (x86_stopped_by_hw_breakpoint): New function.
269 (x86_use_watchpoints): Set "stopped_by_hw_breakpoint" target
270 method.
271
272 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
273
274 * common/gdb_vecs.c (free_char_ptr_vec): Remove.
275 * common/gdb_vecs.h (free_char_ptr_vec): Remove.
276
277 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
278
279 * charset.c (struct charset_vector): New.
280 (charsets): Change type to charset_vector.
281 (find_charset_names): Adjust.
282 (add_one): Adjust.
283 (_initialize_charset): Adjust.
284
285 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
286
287 * progspace.h (struct program_space) <deleted_solibs>: Change
288 type to std::vector<std::string>.
289 * progspace.c (clear_program_space_solib_cache): Adjust.
290 * breakpoint.c (print_solib_event): Adjust.
291 (check_status_catch_solib): Adjust.
292 * solib.c (update_solib_list): Adjust.
293 * ui-out.h (class ui_out) <field_string>: New overload.
294 * ui-out.c (ui_out::field_string): New overload.
295
296 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
297
298 * progspace.h (struct program_space): Add constructor and
299 destructor, initialize fields.
300 (add_program_space): Remove.
301 * progspace.c (add_program_space): Rename to...
302 (program_space::program_space): ... this.
303 (release_program_space): Rename to...
304 (program_space::~program_space): ... this.
305 (delete_program_space): Use delete to delete program_space.
306 (initialize_progspace): Use new to allocate program_space.
307 * inferior.c (add_inferior_with_spaces): Likewise.
308 (clone_inferior_command): Likewise.
309 * infrun.c (follow_fork_inferior): Likewise.
310 (handle_vfork_child_exec_or_exit): Likewise.
311
312 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
313
314 * common/gdb_vecs.h (make_cleanup_free_char_ptr_vec): Remove.
315 (delim_string_to_char_ptr_vec): Return std::vector of
316 gdb::unique_xmalloc_ptr.
317 (dirnames_to_char_ptr_vec_append): Take std::vector of
318 gdb::unique_xmalloc_ptr.
319 (dirnames_to_char_ptr_vec): Return std::vector of
320 gdb::unique_xmalloc_ptr.
321 * common/gdb_vecs.c (delim_string_to_char_ptr_vec_append):
322 Take std::vector of gdb::unique_xmalloc_ptr, adjust the code.
323 (delim_string_to_char_ptr_vec): Return an std::vector of
324 gdb::unique_xmalloc_ptr, adjust the code.
325 (dirnames_to_char_ptr_vec_append): Take an std::vector of
326 gdb::unique_xmalloc_ptr, adjust the code.
327 (dirnames_to_char_ptr_vec): Return an std::vector of
328 gdb::unique_xmalloc_ptr, adjust the code.
329 * auto-load.c (auto_load_safe_path_vec): Change type to
330 std::vector of gdb::unique_xmalloc_ptr.
331 (auto_load_expand_dir_vars): Return an std::vector of
332 gdb::unique_xmalloc_ptr, adjust the code.
333 (auto_load_safe_path_vec_update): Adjust.
334 (filename_is_in_auto_load_safe_path_vec): Adjust.
335 (auto_load_objfile_script_1): Adjust.
336 * build-id.c (build_id_to_debug_bfd): Adjust.
337 * linux-thread-db.c (thread_db_load_search): Adjust.
338 * source.c (add_path): Adjust.
339 (openp): Adjust.
340 * symfile.c (find_separate_debug_file): Adjust.
341 * utils.c (do_free_char_ptr_vec): Remove.
342 (make_cleanup_free_char_ptr_vec): Remove.
343
344 2018-03-01 Sergio Durigan Junior <sergiodj@redhat.com>
345
346 PR gdb/22907
347 * common/pathstuff.c: Conditionally include "<windows.h>".
348
349 2018-03-01 Georg Sauthoff <mail@georg.so>
350
351 PR gdb/22888
352 * gcore.in: Quote variables and switch interpreter to bash.
353
354 2018-03-01 Tom Tromey <tom@tromey.com>
355
356 * dwarf2read.c (alloc_discriminant_info): Fix default_index
357 assertion. Add assertion for discriminant_index.
358 (quirk_rust_enum): Use correct base type name in univariant case.
359
360 2018-03-01 Simon Marchi <simon.marchi@ericsson.com>
361
362 * record.c (get_call_history_modifiers): Return a
363 record_print_flags.
364 (cmd_record_call_history): Adjust.
365 * record-btrace.c (record_btrace_call_history): Adjust.
366 (record_btrace_call_history_range): Adjust.
367 (record_btrace_call_history_from): Adjust.
368 * target-debug.h (target_debug_print_record_print_flags): New.
369 * target-delegates.c: Re-generate.
370 * target.c (target_call_history): Change flags type.
371 (target_call_history_from): Likewise.
372 (target_call_history_range): Likewise.
373 * target.h (struct target_ops) <target_call_history>: Likewise.
374 (target_call_history_from): Likewise.
375 (target_call_history_range): Likewise.
376
377 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
378 Simon Marchi <simon.marchi@polymtl.ca>
379
380 * common/common-utils.c: Include "sys/stat.h".
381 (is_regular_file): Move here from "source.c"; change return
382 type to "bool".
383 * common/common-utils.h (is_regular_file): New prototype.
384 * common/pathstuff.c (contains_dir_separator): New function.
385 * common/pathstuff.h (contains_dir_separator): New prototype.
386 * source.c: Don't include "sys/stat.h".
387 (is_regular_file): Move to "common/common-utils.c".
388
389 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
390
391 * Makefile.in (COMMON_SFILES): Add "common/pathstuff.c".
392 (HFILES_NO_SRCDIR): Add "common/pathstuff.h".
393 * auto-load.c: Include "common/pathstuff.h".
394 * common/common-def.h (current_directory): Move here.
395 * common/gdb_tilde_expand.c (gdb_tilde_expand_up): New
396 function.
397 * common/gdb_tilde_expand.h (gdb_tilde_expand_up): New
398 prototype.
399 * common/pathstuff.c: New file.
400 * common/pathstuff.h: New file.
401 * compile/compile.c: Include "common/pathstuff.h".
402 * defs.h (current_directory): Move to "common/common-defs.h".
403 * dwarf2read.c: Include "common/pathstuff.h".
404 * exec.c: Likewise.
405 * guile/scm-safe-call.c: Likewise.
406 * linux-thread-db.c: Likewise.
407 * main.c: Likewise.
408 * nto-tdep.c: Likewise.
409 * objfiles.c: Likewise.
410 * source.c: Likewise.
411 * symtab.c: Likewise.
412 * utils.c: Include "common/pathstuff.h".
413 (gdb_realpath): Move to "common/pathstuff.c".
414 (gdb_realpath_keepfile): Likewise.
415 (gdb_abspath): Likewise.
416 * utils.h (gdb_realpath): Move to "common/pathstuff.h".
417 (gdb_realpath_keepfile): Likewise.
418 (gdb_abspath): Likewise.
419
420 2018-02-28 John Baldwin <jhb@FreeBSD.org>
421
422 * fbsd-nat.c (fbsd_resume): Use PT_SETSTEP for stepping and a
423 wildcard process pid for super_resume for kernels with a
424 specific bug.
425
426 2018-02-27 Phil Muldoon <pmuldoon@redhat.com>
427
428 * compile/compile.c (get_args): Add additional comments
429 explaining function.
430
431 2018-02-27 Simon Marchi <simon.marchi@polymtl.ca>
432 Tom Tromey <tom@tromey.com>
433
434 * target.h (memory_write_request_s): Remove typedef. Don't define
435 VEC.
436 (target_write_memory_blocks): Change argument to std::vector.
437 (struct memory_write_request): Add constructor.
438 * target-memory.c (compare_block_starting_address): Return bool.
439 Change argument types.
440 (claim_memory): Change arguments to use std::vector.
441 (split_regular_and_flash_blocks, blocks_to_erase)
442 (compute_garbled_blocks): Likewise.
443 (cleanup_request_data, cleanup_write_requests_vector): Remove.
444 (target_write_memory_blocks): Change argument to std::vector.
445 * symfile.c (struct load_section_data): Add constructor and
446 destructor. Use std::vector for "requests".
447 (struct load_progress_data): Add initializers.
448 (load_section_callback): Update. Use "new".
449 (clear_memory_write_data): Remove.
450 (generic_load): Update.
451
452 2018-02-27 Alan Hayward <alan.hayward@arm.com>
453
454 * arch/aarch64.h: Use common/tdesc.h.
455
456 2018-02-26 Maciej W. Rozycki <macro@mips.com>
457
458 * mips-tdep.c (mips_gdbarch_init): Don't use a 32-bit BFD
459 architecture with a 64-bit ABI.
460
461 2018-02-26 Maciej W. Rozycki <macro@mips.com>
462
463 * gdb/mips-tdep.c (mips_gdbarch_init): Reorder ABI determination
464 ahead of target description loading.
465
466 2018-02-26 Tom Tromey <tom@tromey.com>
467
468 * stack.c (backtrace_command_1): Update.
469 * python/python-internal.h (gdbpy_apply_frame_filter): Change type
470 of "flags".
471 * python/py-framefilter.c (py_print_frame)
472 (gdbpy_apply_frame_filter): Change type of "flags".
473 * mi/mi-cmd-stack.c (mi_apply_ext_lang_frame_filter): Change type
474 of "flags".
475 (mi_cmd_stack_list_frames, mi_cmd_stack_list_locals)
476 (mi_cmd_stack_list_args, mi_cmd_stack_list_variables): Update.
477 * extension.h (enum frame_filter_flag): Rename from
478 frame_filter_flags.
479 (frame_filter_flags): Define using DEF_ENUM_FLAGS_TYPE.
480 (apply_ext_lang_frame_filter): Change type of "flags".
481 * extension.c (apply_ext_lang_frame_filter): Change type of
482 "flags".
483 * extension-priv.h (struct extension_language_ops)
484 <apply_frame_filter>: Change type of "flags".
485
486 2018-02-26 Tom Tromey <tom@tromey.com>
487
488 PR python/16497:
489 * stack.c (backtrace_command_1): Set PRINT_MORE_FRAMES flag. Fix
490 off-by-one in py_end computation.
491 * python/py-framefilter.c (gdbpy_apply_frame_filter): Handle
492 PRINT_MORE_FRAMES.
493 * extension.h (enum frame_filter_flags) <PRINT_MORE_FRAMES>: New
494 constant.
495
496 2018-02-26 Tom Tromey <tom@tromey.com>
497
498 * dwarf2read.c (struct variant_field): New.
499 (struct nextfield) <variant>: New field.
500 (dwarf2_add_field): Handle DW_TAG_variant_part.
501 (dwarf2_attach_fields_to_type): Attach a discriminant_info to a
502 discriminated union.
503 (read_structure_type): Handle DW_TAG_variant_part.
504 (handle_struct_member_die): New function, extracted from
505 process_structure_scope. Handle DW_TAG_variant.
506 (process_structure_scope): Handle discriminated unions. Call
507 handle_struct_member_die.
508
509 2018-02-26 Tom Tromey <tom@tromey.com>
510
511 * rust-lang.h (rust_last_path_segment): Declare.
512 * rust-lang.c (rust_last_path_segment): Now public. Change
513 contract.
514 (struct disr_info): Remove.
515 (RUST_ENUM_PREFIX, RUST_ENCODED_ENUM_REAL)
516 (RUST_ENCODED_ENUM_HIDDEN, rust_union_is_untagged)
517 (rust_get_disr_info, rust_tuple_variant_type_p): Remove.
518 (rust_enum_p, rust_enum_variant): New function.
519 (rust_underscore_fields): Remove "offset" parameter.
520 (rust_print_enum): New function.
521 (rust_val_print) <TYPE_CODE_UNION>: Remove enum code.
522 <TYPE_CODE_STRUCT>: Call rust_print_enum when appropriate.
523 (rust_print_struct_def): Add "for_rust_enum" parameter. Handle
524 enums.
525 (rust_internal_print_type): New function, from rust_print_type.
526 Remove enum code.
527 (rust_print_type): Call rust_internal_print_type.
528 (rust_evaluate_subexp) <STRUCTOP_ANONYMOUS, STRUCTOP_STRUCT>:
529 Update enum handling.
530 * dwarf2read.c (struct dwarf2_cu) <rust_unions>: New field.
531 (rust_fully_qualify, alloc_discriminant_info, quirk_rust_enum)
532 (rust_union_quirks): New functions.
533 (process_full_comp_unit, process_full_type_unit): Call
534 rust_union_quirks.
535 (process_structure_scope): Update rust_unions if necessary.
536
537 2018-02-26 Tom Tromey <tom@tromey.com>
538
539 * value.h (value_union_variant): Declare.
540 * valops.c (value_union_variant): New function.
541 * gdbtypes.h (TYPE_FLAG_DISCRIMINATED_UNION): New macro.
542 (struct discriminant_info): New.
543 (enum dynamic_prop_node_kind) <DYN_PROP_DISCRIMINATED>: New
544 enumerator.
545 (struct main_type) <flag_discriminated_union>: New field.
546
547 2018-02-26 Tom Tromey <tom@tromey.com>
548
549 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
550 unittests/unpack-selftests.c.
551 * unittests/unpack-selftests.c: New file.
552 * value.c (unpack_bits_as_long): Fix bugs in non-bitfield cases.
553
554 2018-02-26 Yao Qi <yao.qi@linaro.org>
555
556 * dwarf2read.c (struct partial_die_info) <read>: New method.
557 (read_partial_die): Remove the declaration.
558 (load_partial_dies): Update.
559 (partial_die_info::partial_die_info):
560 (read_partial_die): Change it to partial_die_info::read.
561
562 2018-02-26 Yao Qi <yao.qi@linaro.org>
563
564 * dwarf2read.c (struct partial_die_info) <fixup>: New method.
565 (fixup_partial_die): Remove declaration.
566 (scan_partial_symbols): Update.
567 (partial_die_parent_scope): Likewise.
568 (partial_die_full_name): Likewise.
569 (fixup_partial_die): Change it to partial_die_info::fixup.
570
571 2018-02-26 Yao Qi <yao.qi@linaro.org>
572
573 * dwarf2read.c (read_partial_die): Update the declaration.
574 (load_partial_dies): Caller update.
575 (read_partial_die): Remove one argument abbrev_len.
576
577 2018-02-26 Yao Qi <yao.qi@linaro.org>
578
579 * dwarf2read.c (struct partial_die_info): Add ctor, delete
580 assignment operator.
581 (load_partial_dies): Use ctor and copy ctor.
582 (read_partial_die): Update.
583 (dwarf2_cu::find_partial_die): Use ctor.
584
585 2018-02-26 Yao Qi <yao.qi@linaro.org>
586
587 * dwarf2read.c (struct dwarf2_cu) <find_partial_die>: New method.
588 (find_partial_die_in_comp_unit): Change it to
589 dwarf2_cu::find_partial_die.
590 (find_partial_die): Update.
591
592 2018-02-26 Yao Qi <yao.qi@linaro.org>
593
594 * dwarf2read.c (read_partial_die): Remove the code checking abbrev
595 is NULL.
596
597 2018-02-26 Yao Qi <yao.qi@linaro.org>
598
599 * dwarf2read.c (load_partial_dies): Move the location of XOBNEW.
600
601 2018-02-26 Alan Hayward <alan.hayward@arm.com>
602
603 * arch/amd64.h: Use common/tdesc.h.
604 * arch/i386.c: Likewise.
605 * arch/i386.h: Likewise.
606 * arch/tic6x.c: Likewise.
607 * arch/tdesc.h: Move file from here...
608 * common/tdesc.h: ...to here.
609 * features/aarch64-core.c: Regenerate.
610 * features/aarch64-fpu.c: Regenerate.
611 * features/i386/32bit-avx.c: Regenerate.
612 * features/i386/32bit-avx512.c: Regenerate.
613 * features/i386/32bit-core.c: Regenerate.
614 * features/i386/32bit-linux.c: Regenerate.
615 * features/i386/32bit-mpx.c: Regenerate.
616 * features/i386/32bit-pkeys.c: Regenerate.
617 * features/i386/32bit-sse.c: Regenerate.
618 * features/i386/64bit-avx.c: Regenerate.
619 * features/i386/64bit-avx512.c: Regenerate.
620 * features/i386/64bit-core.c: Regenerate.
621 * features/i386/64bit-linux.c: Regenerate.
622 * features/i386/64bit-mpx.c: Regenerate.
623 * features/i386/64bit-pkeys.c: Regenerate.
624 * features/i386/64bit-segments.c: Regenerate.
625 * features/i386/64bit-sse.c: Regenerate.
626 * features/i386/x32-core.c: Regenerate.
627 * features/tic6x-c6xp.c: Regenerate.
628 * features/tic6x-core.c: Regenerate.
629 * features/tic6x-gp.c: Regenerate.
630 * target-descriptions.c: Use common/tdesc.h.
631 * target-descriptions.h: Likewise.
632
633 2018-02-24 Tom Tromey <tom@tromey.com>
634
635 * linux-thread-db.c (try_thread_db_load_from_pdir_1)
636 (try_thread_db_load_from_dir, thread_db_load_search): Use
637 std::string.
638 (info_auto_load_libthread_db_compare): Return bool. Change
639 argument types.
640 (info_auto_load_libthread_db): Use std::vector, std::string.
641 Remove cleanups.
642
643 2018-02-24 Tom Tromey <tom@tromey.com>
644
645 * i386-tdep.c (i386_fast_tracepoint_valid_at): "msg" now a
646 std::string.
647 * gdbarch.sh (fast_tracepoint_valid_at): Change "msg" to a
648 std::string*.
649 * gdbarch.c: Rebuild.
650 * gdbarch.h: Rebuild.
651 * breakpoint.c (check_fast_tracepoint_sals): Use std::string.
652 * arch-utils.h (default_fast_tracepoint_valid_at): Update.
653 * arch-utils.c (default_fast_tracepoint_valid_at): "msg" now a
654 std::string*.
655
656 2018-02-23 Simon Marchi <simon.marchi@polymtl.ca>
657
658 * gdbtypes.h (sect_offset): Change type to uint64_t.
659 (sect_offset_str): New function.
660 * dwarf2read.c (create_addrmap_from_aranges): Use
661 sect_offset_str.
662 (error_check_comp_unit_head): Likewise.
663 (create_debug_type_hash_table): Likewise.
664 (read_cutu_die_from_dwo): Likewise.
665 (init_cutu_and_read_dies): Likewise.
666 (init_cutu_and_read_dies_no_follow): Likewise.
667 (process_psymtab_comp_unit_reader): Likewise.
668 (partial_die_parent_scope): Likewise.
669 (peek_die_abbrev): Likewise.
670 (process_queue): Likewise.
671 (dwarf2_physname): Likewise.
672 (read_namespace_alias): Likewise.
673 (read_import_statement): Likewise.
674 (create_dwo_cu_reader): Likewise.
675 (create_cus_hash_table): Likewise.
676 (lookup_dwo_cutu): Likewise.
677 (inherit_abstract_dies): Likewise.
678 (read_func_scope): Likewise.
679 (read_call_site_scope): Likewise.
680 (dwarf2_add_member_fn): Likewise.
681 (read_common_block): Likewise.
682 (read_module_type): Likewise.
683 (read_typedef): Likewise.
684 (read_subrange_type): Likewise.
685 (load_partial_dies): Likewise.
686 (read_partial_die): Likewise.
687 (find_partial_die): Likewise.
688 (read_str_index): Likewise.
689 (dwarf2_string_attr): Likewise.
690 (build_error_marker_type): Likewise.
691 (lookup_die_type): Likewise.
692 (dump_die_shallow): Likewise.
693 (follow_die_ref): Likewise.
694 (dwarf2_fetch_die_loc_sect_off): Likewise.
695 (dwarf2_fetch_constant_bytes): Likewise.
696 (follow_die_sig): Likewise.
697 (get_signatured_type): Likewise.
698 (get_DW_AT_signature_type): Likewise.
699 (dwarf2_find_containing_comp_unit): Likewise.
700 (set_die_type): Likewise.
701
702 2018-02-21 John Baldwin <jhb@FreeBSD.org>
703
704 * arch/aarch64.c: Include "common-defs.h".
705 * arch/amd64.c: Likewise.
706 * arch/i386.c: Likewise.
707
708 2018-02-21 Tom Tromey <tom@tromey.com>
709
710 * value.h: (extract_field_op): Update.
711 * eval.c (extract_field_op): Return a const char *.
712 * expression.h (parse_expression_for_completion): Update.
713 * completer.c (complete_expression): Update.
714 (add_struct_fields): Make fieldname const.
715 * parse.c (expout_completion_name): Now a unique_xmalloc_ptr.
716 (mark_completion_tag, parse_exp_in_context_1): Update.
717 (parse_expression_for_completion): Change "name" to
718 unique_xmalloc_ptr*.
719
720 2018-02-21 Tom Tromey <tom@tromey.com>
721
722 * infcall.c (call_function_by_hand_dummy): Use std::vector.
723
724 2018-02-21 Yao Qi <yao.qi@linaro.org>
725
726 * avr-tdep.c (avr_read_pc): Change parameter type to
727 readable_regcache.
728 * gdbarch.sh (read_pc): Likewise.
729 * gdbarch.c: Re-generated.
730 * gdbarch.h: Re-generated.
731 * hppa-tdep.c (hppa_read_pc): Change parameter type to
732 readable_regcache.
733 * ia64-tdep.c (ia64_read_pc): Likewise.
734 * mips-tdep.c (mips_read_pc): Likewise.
735 * spu-tdep.c (spu_read_pc): Likewise.
736
737 2018-02-21 Yao Qi <yao.qi@linaro.org>
738
739 * Makefile.in (COMMON_SFILES): Add regcache-dump.c
740 * regcache-dump.c: New file.
741 * regcache.c: Move register_dump to regcache-dump.c.
742 (maintenance_print_registers): Likewise.
743 (maintenance_print_raw_registers): Likewise.
744 (maintenance_print_cooked_registers): Likewise.
745 (maintenance_print_register_groups): Likewise.
746 (maintenance_print_remote_registers): Likewise.
747 (_initialize_regcache): Likewise.
748 * regcache.h (register_dump): Moved from regcache.c.
749
750 2018-02-21 Yao Qi <yao.qi@linaro.org>
751
752 * regcache.c (regcache::regcache): Update.
753 (regcache::invalidate): Move it to detached_regcache::invalidate.
754 (get_thread_arch_aspace_regcache): Update.
755 (regcache::raw_update): Update.
756 (regcache::cooked_read): Remove some code.
757 (regcache::cooked_read_value): Likewise.
758 (regcache::raw_write): Remove assert on m_readonly_p.
759 (regcache::raw_supply_integer): Move it to
760 detached_regcache::raw_supply_integer.
761 (regcache::raw_supply_zeroed): Likewise.
762 * regcache.h (detached_regcache) <raw_supply_integer>: New
763 declaration.
764 <raw_supply_zeroed, invalidate>: Likewise.
765 (regcache) <raw_supply_integer, raw_supply_zeroed>: Removed.
766 <invalidate>: Likewise.
767 <m_readonly_p>: Removed.
768
769 2018-02-21 Yao Qi <yao.qi@linaro.org>
770
771 * infcmd.c (get_return_value): Let stop_regs point to
772 get_current_regcache.
773 * regcache.c (regcache::regcache): Remove.
774 (register_dump_reg_buffer): New class.
775 (regcache_print): Adjust.
776 * regcache.h (regcache): Remove constructors.
777
778 2018-02-21 Yao Qi <yao.qi@linaro.org>
779
780 * regcache.c (class register_dump): New class.
781 (register_dump_regcache, register_dump_none): New class.
782 (register_dump_remote, register_dump_groups): New class.
783 (regcache_print): Update.
784 * regcache.h (regcache_dump_what): Move it to regcache.c.
785 (regcache) <dump>: Remove.
786
787 2018-02-21 Yao Qi <yao.qi@linaro.org>
788
789 * jit.c (struct jit_unwind_private) <regcache>: Change its type to
790 reg_buffer_rw *.
791 (jit_unwind_reg_set_impl): Call raw_supply.
792 (jit_frame_sniffer): Use reg_buffer_rw.
793 * record-full.c (record_full_core_regbuf): Change its type.
794 (record_full_core_open_1): Use reg_buffer_rw.
795 (record_full_close): Likewise.
796 (record_full_core_fetch_registers): Use regcache->raw_supply.
797 (record_full_core_store_registers): Likewise.
798 * regcache.c (regcache::get_register_status): Move it to
799 reg_buffer.
800 (regcache_raw_set_cached_value): Remove.
801 (regcache::raw_set_cached_value): Remove.
802 (regcache::raw_write): Call raw_supply.
803 (regcache::raw_supply): Move it to reg_buffer_rw.
804 * regcache.h (regcache_raw_set_cached_value): Remove.
805 (reg_buffer_rw): New class.
806
807 2018-02-21 Yao Qi <yao.qi@linaro.org>
808
809 * dummy-frame.c (dummy_frame_cache) <prev_regcache>: Use
810 readonly_detached_regcache.
811 (dummy_frame_prev_register): Use regcache->cooked_read.
812 * frame.c (frame_save_as_regcache): Change return type.
813 (frame_pop): Update.
814 * frame.h (frame_save_as_regcache): Update declaration.
815 * inferior.h (get_infcall_suspend_state_regcache): Update
816 declaration.
817 * infrun.c (infcall_suspend_state) <registers>: use
818 readonly_detached_regcache.
819 (save_infcall_suspend_state): Don't use regcache_dup.
820 (get_infcall_suspend_state_regcache): Change return type.
821 * linux-fork.c (struct fork_info) <savedregs>: Change to
822 readonly_detached_regcache.
823 <pc>: New field.
824 (fork_save_infrun_state): Don't use regcache_dup.
825 (info_checkpoints_command): Adjust.
826 * mi/mi-main.c (register_changed_p): Update declaration.
827 (mi_cmd_data_list_changed_registers): Use
828 readonly_detached_regcache.
829 (register_changed_p): Change parameter type to
830 readonly_detached_regcache.
831 * ppc-linux-tdep.c (ppu2spu_cache) <regcache>: Use
832 readonly_detached_regcache.
833 (ppu2spu_sniffer): Construct a new readonly_detached_regcache.
834 * regcache.c (readonly_detached_regcache::readonly_detached_regcache):
835 New.
836 (regcache::save): Move it to reg_buffer.
837 (regcache::restore): Change parameter type.
838 (regcache_dup): Remove.
839 * regcache.h (reg_buffer) <save>: New method.
840 (readonly_detached_regcache): New class.
841 * spu-tdep.c (spu2ppu_cache) <regcache>: Use
842 readonly_detached_regcache.
843 (spu2ppu_sniffer): Construct a new readonly_detached_regcache.
844
845 2018-02-21 Yao Qi <yao.qi@linaro.org>
846
847 * frame.c (frame_save_as_regcache): Use regcache method save.
848 (frame_pop): Use regcache method restore.
849 * infrun.c (restore_infcall_suspend_state): Likewise.
850 * linux-fork.c (fork_load_infrun_state): Likewise.
851 * ppc-linux-tdep.c (ppu2spu_sniffer): User regcache method
852 save.
853 * regcache.c (regcache_save): Remove.
854 (regcache::restore): More asserts.
855 (regcache_cpy): Remove.
856 * regcache.h (regcache_save): Remove the declaration.
857 (regcache::restore): Move from private to public.
858 Remove the friend declaration of regcache_cpy.
859 (regcache_cpy): Remove declaration.
860
861 2018-02-21 Yao Qi <yao.qi@linaro.org>
862
863 * aarch64-tdep.c (aarch64_pseudo_register_read_value): Change
864 parameter type to 'readable_regcache *'.
865 * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
866 * arm-tdep.c (arm_neon_quad_read): Likewise.
867 (arm_pseudo_read): Likewise.
868 * avr-tdep.c (avr_pseudo_register_read): Likewise.
869 * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
870 * frv-tdep.c (frv_pseudo_register_read): Likewise.
871 * gdbarch.c: Re-generated.
872 * gdbarch.h: Re-generated.
873 * gdbarch.sh (pseudo_register_read): Change parameter type to
874 'readable_regcache *'.
875 (pseudo_register_read_value): Likewise.
876 * h8300-tdep.c (pseudo_from_raw_register): Likewise.
877 (h8300_pseudo_register_read): Likewise.
878 * hppa-tdep.c (hppa_pseudo_register_read): Likewise.
879 * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
880 (i386_pseudo_register_read_into_value): Likewise.
881 (i386_pseudo_register_read_value): Likewise.
882 * i386-tdep.h (i386_pseudo_register_read_into_value): Update
883 declaration.
884 * ia64-tdep.c (ia64_pseudo_register_read): Likewise.
885 * m32c-tdep.c (m32c_raw_read): Likewise.
886 (m32c_read_flg): Likewise.
887 (m32c_banked_register): Likewise.
888 (m32c_banked_read): Likewise.
889 (m32c_sb_read): Likewise.
890 (m32c_part_read): Likewise.
891 (m32c_cat_read): Likewise.
892 (m32c_r3r2r1r0_read): Likewise.
893 (m32c_pseudo_register_read): Likewise.
894 * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
895 * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
896 (mep_pseudo_cr64_read): Likewise.
897 (mep_pseudo_register_read): Likewise.
898 * mips-tdep.c (mips_pseudo_register_read): Likewise.
899 * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
900 * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
901 * regcache.c (regcache::raw_read): Move it to readable_regcache.
902 (regcache::cooked_read): Likewise.
903 (regcache::cooked_read_value): Likewise.
904 (regcache_cooked_read_signed):
905 (regcache::cooked_read): Likewise.
906 * regcache.h (readable_regcache): New class.
907 (regcache): Inherit readable_regcache. Move some methods to
908 readable_regcache.
909 * rl78-tdep.c (rl78_pseudo_register_read): Change
910 parameter type to 'readable_regcache *'.
911 * rs6000-tdep.c (do_regcache_raw_read): Remove.
912 (e500_pseudo_register_read): Change parameter type to
913 'readable_regcache *'.
914 (dfp_pseudo_register_read): Likewise.
915 (vsx_pseudo_register_read): Likewise.
916 (efpr_pseudo_register_read): Likewise.
917 * s390-tdep.c (s390_pseudo_register_read): Likewise.
918 * sh-tdep.c (sh_pseudo_register_read): Likewise.
919 * sh64-tdep.c (pseudo_register_read_portions): Likewise.
920 (sh64_pseudo_register_read): Likewise.
921 * sparc-tdep.c (sparc32_pseudo_register_read): Likewise.
922 * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
923 * spu-tdep.c (spu_pseudo_register_read_spu): Likewise.
924 (spu_pseudo_register_read): Likewise.
925 * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
926 (xtensa_pseudo_register_read): Likewise.
927
928 2018-02-21 Yao Qi <yao.qi@linaro.org>
929
930 * regcache.c (regcache::regcache): Call reg_buffer ctor.
931 (regcache::arch): Move it to reg_buffer::arch.
932 (regcache::register_buffer): Likewise.
933 (regcache::assert_regnum): Likewise.
934 (regcache::num_raw_registers): Likewise.
935 * regcache.h (reg_buffer): New class.
936 (regcache): Inherit reg_buffer.
937
938 2018-02-20 Simon Marchi <simon.marchi@ericsson.com>
939
940 * remote-sim.c (gdb_os_printf_filtered, gdb_os_vprintf_filtered,
941 gdb_os_evprintf_filtered, gdb_os_error): Add ATTRIBUTE_PRINTF.
942
943 2018-02-20 Markus Metzger <markus.t.metzger@intel.com>
944
945 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add mkstemp.
946
947 2018-02-19 Alan Hayward <alan.hayward@arm.com>
948
949 * Makefile.in: (COMMON_SFILES): Add common/*.c files.
950 (SFILES): Remove common/*.c files.
951 (COMMON_OBS): Remove some *.o files built from common/*.c files.
952 * common/common.host: Add common reference.
953 * configure.ac: Likewise.
954 * configure: Regenerate.
955
956 2018-02-16 Yao Qi <yao.qi@linaro.org>
957
958 * block.c (block_namespace_info): Inherit allocate_on_obstack.
959 (block_initialize_namespace): Use new.
960 * dwarf2read.c (dwarf2_per_objfile): Inherit allocate_on_obstack.
961 (dwarf2_free_objfile): Use delete.
962 * gdbtypes.c (type_pair): Inherit allocate_on_obstack.
963 (copy_type_recursive): Use new.
964 * gdb_obstack.h (allocate_on_obstack): New.
965
966 2018-02-15 Yao Qi <yao.qi@linaro.org>
967
968 PR gdb/22849
969 * inferior.c (exit_inferior_1): Reset inf->control.
970
971 2018-02-15 Joel Brobecker <brobecker@adacore.com>
972
973 * ada-lang.c (ada_to_fixed_value_create): Delete advance
974 declaration.
975
976 2018-02-14 Pedro Alves <palves@redhat.com>
977
978 * frame-unwind.c (frame_unwind_try_unwinder): Always call
979 frame_cleanup_after_sniffer on exception.
980
981 2018-02-14 Tom Tromey <tom@tromey.com>
982
983 * solist.h (struct target_so_ops) <bfd_open>: Make pathname
984 const.
985 (solib_bfd_open): Make pathname const.
986 * solib.c (solib_bfd_open): Make pathname const.
987 * solib-spu.c (spu_bfd_fopen): Make name const.
988 (spu_bfd_open): Make pathname const.
989 * solib-darwin.c (darwin_bfd_open): Make pathname const.
990 * solib-aix.c (solib_aix_bfd_open): Make pathname const.
991
992 2018-02-14 Tom Tromey <tom@tromey.com>
993
994 * symfile.c (symfile_bfd_open): Update.
995 * source.h (openp, source_full_path_of, find_and_open_source):
996 Change argument type to unique_xmalloc_ptr.
997 * source.c (openp): Take a unique_xmalloc_ptr.
998 (source_full_path_of, find_and_open_source): Likewise.
999 (open_source_file, symtab_to_fullname): Update.
1000 * solist.h (struct target_so_ops) <find_and_open_solib>: Take a
1001 unique_xmalloc_ptr.
1002 * solib.c (solib_find_1): Use unique_xmalloc_ptr.
1003 (exec_file_find): Update.
1004 * psymtab.c (psymtab_to_fullname): Update.
1005 * nto-tdep.h (nto_find_and_open_solib): Update.
1006 * nto-tdep.c (nto_find_and_open_solib): Change temp_path to a
1007 unique_xmalloc_ptr.
1008 * exec.c (exec_file_attach): Update.
1009 * dwarf2read.c (try_open_dwop_file): Use unique_xmalloc_ptr.
1010 * cli/cli-cmds.c (find_and_open_script): Use unique_xmalloc_ptr.
1011
1012 2018-02-14 Tom Tromey <tom@tromey.com>
1013
1014 * solib.c: Include source.h.
1015 * nto-tdep.c: Include source.h.
1016 * mi/mi-cmd-env.c: Include source.h.
1017 * infcmd.c: Include source.h.
1018 * exec.c: Include source.h.
1019 * defs.h (enum openp_flag, openp, source_full_path_of, mod_path)
1020 (add_path, directory_switch, source_path, init_source_path): Move
1021 declarations...
1022 * source.h (enum openp_flag, openp, source_full_path_of, mod_path)
1023 (add_path, directory_switch, source_path, init_source_path):
1024 ...here.
1025
1026 2018-02-14 Tom Tromey <tom@tromey.com>
1027
1028 * solist.h (exec_file_find, solib_find): Return
1029 unique_xmalloc_ptr.
1030 (solib_bfd_fopen): Take a const char *.
1031 * solib.c (solib_find_1): Return unique_xmalloc_ptr.
1032 (exec_file_find, solib_find): Likewise.
1033 (solib_bfd_fopen): Do not take ownership of "pathname".
1034 (solib_bfd_open): Use unique_xmalloc_ptr.
1035 * solib-darwin.c (darwin_bfd_open): Use unique_xmalloc_ptr.
1036 * solib-aix.c (solib_aix_bfd_open): Use unique_xmalloc_ptr.
1037 * infrun.c (follow_exec): Use unique_xmalloc_ptr.
1038 * exec.c (exec_file_locate_attach): Use unique_xmalloc_ptr.
1039
1040 2018-02-14 Joel Brobecker <brobecker@adacore.com>
1041
1042 * ada-lang.c (name_match_type_from_name): Remove reference to
1043 ada_name_for_lookup in function's documentation.
1044 * ada-lang.h (ada_name_for_lookup): Delete declaration.
1045
1046 2018-02-13 Simon Marchi <simon.marchi@polymtl.ca>
1047
1048 * defs.h (enum openp_flags): New enum.
1049 (OPF_TRY_CWD_FIRST, OPF_SEARCH_IN_PATH, OPF_RETURN_REALPATH):
1050 Move to enum openp_flags.
1051 (openp_flags): New enum flags.
1052 (openp): Change parameter type to openp_flags.
1053 * source.c (openp): Change parameter type to openp_flags.
1054 * cli/cli-cmds.c (find_and_open_script): Use openp_flags.
1055 * dwarf2read.c (try_open_dwop_file): Use openp_flags.
1056
1057 2018-02-13 Simon Marchi <simon.marchi@polymtl.ca>
1058
1059 * maint.c (_initialize_maint_cmds): Fix prefix of maint set/show
1060 per-command.
1061
1062 2018-02-12 Andrew Burgess <andrew.burgess@embecosm.com>
1063
1064 * dwarf2read.c (dwarf2_release_queue): Delete function, move body
1065 into...
1066 (class dwarf2_queue_guard): ...the destructor of this new class.
1067 (dw2_do_instantiate_symtab): Create instance of the new class
1068 dwarf2_queue_guard, remove cleanup.
1069
1070 2018-02-09 Tom Tromey <tom@tromey.com>
1071
1072 * source.c (find_source_lines): Don't reference past the end of
1073 the vector.
1074
1075 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
1076
1077 * remote.c (remote_btrace_maybe_reopen): Change error message.
1078 * btrace.c (btrace_enable): Likewise.
1079 (parse_xml_btrace): Likewise.
1080 (parse_xml_btrace_conf): Likewise.
1081
1082 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
1083
1084 * nat/linux-btrace.c (diagnose_perf_event_open_fail): New.
1085 (linux_enable_pt, linux_enable_bts): Call
1086 diagnose_perf_event_open_fail.
1087
1088 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
1089
1090 * nat/linux-btrace.c (perf_event_pt_event_type): Improve error message.
1091 Remove parameter and change return type. Update callers. Move it.
1092 (linux_enable_bts, linux_enable_pt): Improve error message.
1093 (linux_enable_pt): Remove zero buffer size check.
1094 (linux_enable_btrace): Improve error messages. Remove NULL return
1095 check.
1096
1097 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
1098
1099 * btrace.c (btrace_enable): Remove target_supports_btrace call.
1100 * nat/linux-btrace.c (perf_event_pt_event_type): Move.
1101 (kernel_supports_bts, kernel_supports_pt, linux_supports_bts)
1102 (linux_supports_pt, linux_supports_btrace): Remove.
1103 (linux_enable_bts): Call cpu_supports_bts.
1104 * nat/linux-btrace.h (linux_supports_btrace): Remove.
1105 * remote.c (remote_supports_btrace): Remove.
1106 (init_remote_ops): Remove remote_supports_btrace.
1107 * target-delegates.c: Regenerated.
1108 * target.c (target_supports_btrace): Remove.
1109 * target.h (target_ops) <to_supports_btrace>: Remove
1110 (target_supports_btrace): Remove.
1111 * x86-linux-nat.c (x86_linux_create_target): Remove
1112 linux_supports_btrace.
1113
1114 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
1115
1116 * nat/linux-btrace.c (linux_enable_btrace): Throw exception if enabling
1117 btrace failed.
1118 * x86-linux-nat.c (x86_linux_enable_btrace): Catch btrace enabling
1119 exception and use message in own exception.
1120
1121 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
1122
1123 * nat/linux-btrace.c: Include scoped_fd.h and scoped_mmap.h.
1124 (perf_event_pt_event_type): Use gdb_file_up.
1125 (linux_enable_bts, linux_enable_pt): Use gdb::unique_xmalloc_ptr,
1126 scoped_fd, and scoped_mmap.
1127
1128 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
1129
1130 * common/scoped_mmap.h: New.
1131 * unittests/scoped_mmap-selftest.c: New.
1132 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
1133 unittests/scoped_mmap-selftest.c.
1134
1135 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
1136
1137 * common/scoped_fd.h: New.
1138 * unittests/scoped_fd-selftest.c: New.
1139 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
1140 unittests/scoped_fd-selftest.c.
1141
1142 2018-02-09 Tom Tromey <tom@tromey.com>
1143
1144 * auto-load.c (auto_load_section_scripts): Use
1145 gdb::unique_xmalloc_ptr.
1146
1147 2018-02-09 Tom Tromey <tom@tromey.com>
1148
1149 * auto-load.c (execute_script_contents): Use std::string.
1150
1151 2018-02-09 Joel Brobecker <brobecker@adacore.com>
1152
1153 * NEWS <Changes in GDB 8.1>: Clarify that "rbreak" is a new
1154 Python function, rather than a new command.
1155
1156 2018-02-08 Tom Tromey <tom@tromey.com>
1157
1158 * solib.c (solib_find_1): Use std::string.
1159 (solib_bfd_fopen): Use unique_xmalloc_ptr.
1160
1161 2018-02-08 Tom Tromey <tom@tromey.com>
1162
1163 * build-id.c (build_id_to_debug_bfd): Use unique_xmalloc_ptr.
1164
1165 2018-02-08 Tom Tromey <tom@tromey.com>
1166
1167 * source.c (find_source_lines): Use gdb::def_vector.
1168
1169 2018-02-08 Tom Tromey <tom@tromey.com>
1170
1171 * macrocmd.c (struct temporary_macro_definition): New.
1172 (macro_define_command): Use temporary_macro_definition. Remove
1173 cleanups.
1174 (free_macro_definition_ptr): Remove.
1175
1176 2018-02-08 Tom Tromey <tom@tromey.com>
1177
1178 * macroexp.c (maybe_expand): Use std::string.
1179
1180 2018-02-08 Tom Tromey <tom@tromey.com>
1181
1182 * macroexp.c (struct macro_buffer): Add initializers for some
1183 members.
1184 (init_buffer, init_shared_buffer, free_buffer)
1185 (free_buffer_return_text): Remove.
1186 (macro_buffer): New constructors.
1187 (~macro_buffer): New destructor.
1188 (macro_buffer::set_shared): New method.
1189 (macro_buffer::resize_buffer, macro_buffer::appendc)
1190 (macro_buffer::appendmem): Now methods, not free functions.
1191 (set_token, append_tokens_without_splicing, stringify)
1192 (macro_stringify): Update.
1193 (gather_arguments): Change return type. Remove argc_p argument,
1194 add args_ptr argument. Use std::vector.
1195 (substitute_args): Remove argc argument. Accept std::vector.
1196 (expand): Update. Use std::vector.
1197 (scan, macro_expand, macro_expand_next): Update.
1198
1199 2018-02-08 Tom Tromey <tom@tromey.com>
1200
1201 * symtab.c (default_collect_symbol_completion_matches_break_on):
1202 Use unique_xmalloc_ptr.
1203 * macroscope.h: (sal_macro_scope, user_macro_scope)
1204 (default_macro_scope): Return unique_xmalloc_ptr.
1205 * macroscope.c (sal_macro_scope, user_macro_scope)
1206 (default_macro_scope): Return unique_xmalloc_ptr.
1207 * macroexp.h (macro_expand, macro_expand_once): Return
1208 unique_xmalloc_ptr.
1209 * macroexp.c (macro_expand, macro_expand_once): Return
1210 unique_xmalloc_ptr.
1211 * macrocmd.c (macro_expand_command, macro_expand_once_command)
1212 (info_macro_command, info_macros_command): Use
1213 unique_xmalloc_ptr.
1214 * compile/compile-c-support.c (write_macro_definitions): Use
1215 unique_xmalloc_ptr.
1216 * c-exp.y (c_parse): Use unique_xmalloc_ptr.
1217
1218 2018-02-07 Simon Marchi <simon.marchi@ericsson.com>
1219
1220 * value.c (value_static_field): Assign field type instead of
1221 containing type when returning an optimized out value.
1222
1223 2018-02-06 Yao Qi <yao.qi@linaro.org>
1224
1225 * ft32-tdep.c (ft32_read_pc): Remove.
1226 (ft32_write_pc): Remove.
1227 (ft32_gdbarch_init): Update.
1228 * m32r-tdep.c (m32r_read_pc): Remove.
1229 (m32r_gdbarch_init): Update.
1230 * mep-tdep.c (mep_read_pc): Remove.
1231 (mep_gdbarch_init): Update.
1232 * microblaze-tdep.c (microblaze_write_pc): Remove.
1233 (microblaze_gdbarch_init): Update.
1234 * mn10300-tdep.c (mn10300_read_pc): Remove.
1235 (mn10300_write_pc): Remove.
1236 (mn10300_gdbarch_init): Update.
1237 * moxie-tdep.c (moxie_read_pc): Remove.
1238 (moxie_write_pc): Remove.
1239 (moxie_gdbarch_init): Update.
1240
1241 2018-02-06 Yao Qi <yao.qi@linaro.org>
1242
1243 * expprint.c (print_subexp_standard): Handle
1244 OP_F77_UNDETERMINED_ARGLIST.
1245 (dump_subexp_body_standard): Likewise.
1246
1247 2018-02-05 Alan Hayward <alan.hayward@arm.com>
1248
1249 * target-descriptions.c (tdesc_element_visitor) Add empty
1250 implementations.
1251 (tdesc_type): Move make_gdb_type from here.
1252 (tdesc_type_builtin): Likewise.
1253 (tdesc_type_vector): Likewise.
1254 (tdesc_type_with_fields): Move make_gdb_type_ functions from here.
1255 (make_gdb_type_struct): Move from tdesc_type_with_fields.
1256 (make_gdb_type_union): Likewise.
1257 (make_gdb_type_flags): Likewise.
1258 (make_gdb_type_enum): Likewise.
1259 (make_gdb_type): New function.
1260 (tdesc_register_type): Use static make_gdb_type.
1261
1262 2018-02-05 Ruslan Kabatsayev <b7.10110111@gmail.com>
1263
1264 * infcmd.c (default_print_one_register_info): Align natural-format
1265 column values consistently one under another.
1266 (pad_to_column): New function.
1267
1268 2018-02-05 Joel Brobecker <brobecker@adacore.com>
1269
1270 * dwarf2read.c (dwarf2_physname): Move commment.
1271
1272 2018-02-01 Leszek Swirski <leszeks@google.com>
1273
1274 * varobj.c (varobj_formatted_print_options): Allow recursive
1275 pretty printing if pretty printing is enabled.
1276
1277 2018-02-01 Leszek Swirski <leszeks@google.com>
1278
1279 * c-exp.y (lex_one_token, classify_name, yylex): Don't classify
1280 names after a structop as a filename.
1281
1282 2018-02-01 Yao Qi <yao.qi@linaro.org>
1283
1284 * arm-tdep.c (arm_record_data_proc_misc_ld_str): Rewrite it.
1285 (arm_record_coproc_data_proc): Likewise.
1286
1287 2018-02-01 Yao Qi <yao.qi@linaro.org>
1288
1289 * arm-tdep.c (arm_record_extension_space): Change ret to signed.
1290
1291 2018-01-31 Nikola Prica <nikola.prica@rt-rk.com>
1292
1293 * rs6000-tdep.c (skip_prologue): Remove shifting for lr_reg and
1294 assign shifted lr_reg to fdata->lr_register when lr_reg is set.
1295
1296 2018-01-31 Pedro Alves <palves@redhat.com>
1297
1298 * darwin-nat.c (darwin_interrupt): Remove ptid_t parameter.
1299 * inflow.c (child_terminal_save_inferior): Wrap reference to
1300 tcgetpgrp in HAVE_TERMIOS_H.
1301 (child_interrupt, child_pass_ctrlc): Wrap references to signal in
1302 _WIN32.
1303 * remote-sim.c (gdbsim_interrupt): Remove ptid_t parameter and
1304 always iterate over all inferiors.
1305 (gdbsim_cntrl_c): Adjust.
1306 * windows-nat.c (windows_interrupt): Remove 'ptid_t' parameter.
1307
1308 2018-01-31 Joel Brobecker <brobecker@adacore.com>
1309
1310 * gdbtypes.c (lookup_array_range_type): Make sure the array's
1311 index type is objfile-owned if the element type is as well.
1312
1313 2018-01-31 Joel Brobecker <brobecker@adacore.com>
1314
1315 GDB 8.1 released.
1316
1317 2018-01-30 Philipp Rudo <prudo@linux.vnet.ibm.com>
1318
1319 * s390-linux-tdep.c: Remove includes "features/s390-linux32.c" and
1320 "features/s390x-linux64.c".
1321 (_initialize_s390_linux_tdep): Remove initialization of tdescs
1322 s390_linux32 and s390x_linux64.
1323 (s390_linux_init_abi_31, s390_linux_init_abi_64): Don't set
1324 default tdesc.
1325 * s390-tdep.c: Include "features/s390-linux32.c" and
1326 "features/s390x-linux64.c".
1327 (s390_tdesc_valid): Add check for tdesc_has_registers.
1328 (s390_gdbarch_init): Make sure there is always a valid tdesc.
1329 (_initialize_s390_tdep): Initialize tdesc_s390_linux32 and
1330 tdesc_s390x_linux64.
1331 * s390-linux-tdep.h: Move export of tdesc_s390_linux32 and
1332 tdesc_s390x_linux64 to...
1333 * s390-tdep.h: ...here.
1334
1335 2018-01-30 Pedro Alves <palves@redhat.com>
1336
1337 PR gdb/13211
1338 * config.in, configure: Regenerate.
1339 * configure.ac: Check for getpgid.
1340 * go32-nat.c (go32_pass_ctrlc): New.
1341 (go32_target): Install it.
1342 * inf-child.c (inf_child_target): Install
1343 child_terminal_save_inferior, child_pass_ctrlc and
1344 child_interrupt.
1345 * inf-ptrace.c (inf_ptrace_interrupt): Delete.
1346 (inf_ptrace_target): No longer install it.
1347 * infcmd.c (interrupt_target_1): Adjust.
1348 * inferior.h (child_terminal_save_inferior, child_pass_ctrlc)
1349 (child_interrupt): Declare.
1350 (inferior::terminal_state): New.
1351 * inflow.c (struct terminal_info): Update comments.
1352 (inferior_process_group): Delete.
1353 (terminal_is_ours): Delete.
1354 (gdb_tty_state): New.
1355 (child_terminal_init): Adjust.
1356 (is_gdb_terminal, sharing_input_terminal_1)
1357 (sharing_input_terminal): New functions.
1358 (child_terminal_inferior): Adjust. Use sharing_input_terminal.
1359 Set the process's actual process group in the foreground if
1360 possible. Handle is_ours_for_output/is_ours distinction. Don't
1361 mark terminal as the inferior's if not sharing GDB's terminal.
1362 Don't check attach_flag.
1363 (child_terminal_ours_for_output, child_terminal_ours): Adjust to
1364 pass down a target_terminal_state.
1365 (child_terminal_save_inferior): New, factored out from ...
1366 (child_terminal_ours_1): ... this. Handle
1367 target_terminal_state::is_ours_for_output.
1368 (child_interrupt, child_pass_ctrlc): New.
1369 (inflow_inferior_exit): Clear the inferior's terminal_state.
1370 (copy_terminal_info): Copy the inferior's terminal state.
1371 (_initialize_inflow): Remove reference to terminal_is_ours.
1372 * inflow.h (inferior_process_group): Delete.
1373 * nto-procfs.c (nto_handle_sigint, procfs_interrupt): Adjust.
1374 * procfs.c (procfs_target): Don't install procfs_interrupt.
1375 (procfs_interrupt): Delete.
1376 * remote.c (remote_serial_quit_handler): Adjust.
1377 (remote_interrupt): Remove ptid parameter. Adjust.
1378 * target-delegates.c: Regenerate.
1379 * target.c: Include "terminal.h".
1380 (target_terminal::terminal_state): Rename to ...
1381 (target_terminal::m_terminal_state): ... this.
1382 (target_terminal::init): Adjust.
1383 (target_terminal::inferior): Adjust to per-inferior
1384 terminal_state.
1385 (target_terminal::restore_inferior, target_terminal_is_ours_kind): New.
1386 (target_terminal::ours, target_terminal::ours_for_output): Use
1387 target_terminal_is_ours_kind.
1388 (target_interrupt): Remove ptid parameter. Adjust.
1389 (default_target_pass_ctrlc): Adjust.
1390 * target.h (target_ops::to_terminal_save_inferior): New field.
1391 (target_ops::to_interrupt): Remove ptid_t parameter.
1392 (target_interrupt): Remove ptid_t parameter. Update comment.
1393 (target_pass_ctrlc): Update comment.
1394 * target/target.h (target_terminal_state): New scoped enum,
1395 factored out of ...
1396 (target_terminal::terminal_state): ... here.
1397 (target_terminal::inferior): Update comments.
1398 (target_terminal::restore_inferior): New.
1399 (target_terminal::is_inferior, target_terminal::is_ours)
1400 (target_terminal::is_ours_for_output): Adjust.
1401 (target_terminal::scoped_restore_terminal_state): Adjust to
1402 rename, and call restore_inferior() instead of inferior().
1403 (target_terminal::scoped_restore_terminal_state::m_state): Change
1404 type.
1405 (target_terminal::terminal_state): Rename to ...
1406 (target_terminal::m_terminal_state): ... this and change type.
1407
1408 2018-01-30 Pedro Alves <palves@redhat.com>
1409
1410 * linux-nat.c (wait_for_signal): New function.
1411 (wait_lwp, linux_nat_wait_1): Use it instead of calling sigsuspend
1412 directly.
1413 (async_terminal_is_ours)
1414 (linux_nat_terminal_inferior, linux_nat_terminal_ours): Delete.
1415 (linux_nat_add_target): Don't override
1416 to_terminal_inferior/to_terminal_ours.
1417
1418 2018-01-29 Sergio Durigan Junior <sergiodj@redhat.com>
1419
1420 * remote.c (remote_follow_fork): Don't call "detach_inferior".
1421
1422 2018-01-28 Simon Marchi <simon.marchi@ericsson.com>
1423
1424 * dwarf2read.c (free_dwo_files): Add forward-declaration.
1425 (dwarf2_per_objfile::~dwarf2_per_objfile): Move content from
1426 dwarf2_per_objfile_free here.
1427 (dwarf2_per_objfile_free): Remove.
1428 (_initialize_dwarf2_read): Don't register
1429 dwarf2_per_objfile_free as a registry cleanup.
1430
1431 2018-01-27 Eli Zaretskii <eliz@gnu.org>
1432
1433 Avoid compilation errors in MinGW native builds
1434
1435 The error is triggered by including python-internal.h, and the
1436 error message is:
1437
1438 In file included from d:\usr\lib\gcc\mingw32\6.3.0\include\c++\math.h:36:0,
1439 from build-gnulib/import/math.h:27,
1440 from d:/usr/Python26/include/pyport.h:235,
1441 from d:/usr/Python26/include/Python.h:58,
1442 from python/python-internal.h:94,
1443 from python/py-arch.c:24:
1444 d:\usr\lib\gcc\mingw32\6.3.0\include\c++\cmath:1157:11: error: '::hypot' has not been declared
1445 using ::hypot;
1446 ^~~~~
1447
1448 This happens because Python headers define 'hypot' to expand t
1449 '_hypot' in the Windows builds.
1450 * python/python-internal.h (_hypot) [__MINGW32__]: Define back to
1451 'hypoth'. This avoids a compilation error.
1452
1453 2018-01-26 Alan Hayward <alan.hayward@arm.com>
1454
1455 * MAINTAINERS (Write After Approval): Fix ordering.
1456
1457 2018-01-26 Alan Hayward <alan.hayward@arm.com>
1458
1459 * MAINTAINERS (Write After Approval): Add Alan Hayward.
1460
1461 2018-01-26 Alan Modra <amodra@gmail.com>
1462
1463 * ppc-linux-tdep.c (powerpc32_plt_stub): Make const.
1464 (powerpc32_plt_stub_so_1): Rename from powerpc32_plt_stub_so.
1465 Remove nop. Make const. Comment.
1466 (powerpc32_plt_stub_so_2): New.
1467 (POWERPC32_PLT_CHECK_LEN): Rename from POWERPC32_PLT_STUB_LEN.
1468 Correct count. Update uses.
1469 (ppc_skip_trampoline_code): Match powerpc32_plt_stub_so_2 too.
1470 Move common code reading PLT entry word. Correct
1471 powerpc32_plt_stub PLT address calculation.
1472 * ppc64-tdep.c (ppc64_standard_linkage1): Make const.
1473 (ppc64_standard_linkage2, ppc64_standard_linkage3): Likewise.
1474 (ppc64_standard_linkage4, ppc64_standard_linkage5): Likewise.
1475 (ppc64_standard_linkage6, ppc64_standard_linkage7): Likewise.
1476 (ppc64_standard_linkage8): Likewise.
1477 * rs6000-tdep.c (ppc_insns_match_pattern): Make pattern const.
1478 Correct insns description.
1479 * ppc-tdep.h (ppc_insns_match_pattern): Update prototype.
1480
1481 2018-01-24 Pedro Alves <palves@redhat.com>
1482
1483 GCC PR libstdc++/83906
1484 * gdbtypes.c (operator==(const dynamic_prop &,
1485 const dynamic_prop &)): New.
1486 (operator==(const range_bounds &, const range_bounds &)): New.
1487 (check_types_equal): Use them instead of memcmp.
1488 * gdbtypes.h (operator==(const dynamic_prop &,
1489 const dynamic_prop &)): Declare.
1490 (operator!=(const dynamic_prop &, const dynamic_prop &)): Declare.
1491 (operator==(const range_bounds &, const range_bounds &)): Declare.
1492 (operator!=(const range_bounds &, const range_bounds &)): Declare.
1493
1494 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
1495
1496 * s390-linux-tdep.c (s390_record_address_mask)
1497 (s390_record_calc_disp_common, s390_record_calc_disp)
1498 (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
1499 (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
1500 (s390_process_record): Move to s390-tdep.c.
1501 (s390_linux_init_abi_any): Adjust.
1502 * s390-tdep.c (s390_record_address_mask)
1503 (s390_record_calc_disp_common, s390_record_calc_disp)
1504 (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
1505 (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
1506 (s390_process_record): Moved from s390-linux-tdep.c
1507 (s390_gdbarch_init): Adjust.
1508
1509 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
1510
1511 * s390-linux-nat.c (s390-tdep.h): New include.
1512 * Makefile.in (ALL_TARGET_OBS): Add s390-tdep.o.
1513 (HFILES_NO_SRCDIR): Add s390-tdep.h.
1514 (ALLDEPFILES): Add s390-tdep.c.
1515 * configure.tgt (s390*-*-linux*): Add s390-tdep.o.
1516 * s390-linux-tdep.h (HWCAP_S390_*, S390_*_REGNUM): Move to...
1517 * s390-tdep.h: ...this. New file.
1518 * s390-linux-tdep.c (s390-tdep.h): New include.
1519 (_initialize_s390_tdep): Rename to...
1520 (_initialize_s390_linux_tdep): ...this and adjust.
1521 (s390_abi_kind, s390_vector_abi_kind, gdbarch_tdep)
1522 (enum named opcodes, S390_NUM_GPRS, S390_NUM_FPRS): Move to
1523 s390-tdep.h.
1524 (s390_break_insn, s390_breakpoint, s390_readinstruction, is_ri)
1525 (is_ril, is_rr, is_rre, is_rs, is_rsy, is_rx, is_rxy)
1526 (s390_is_partial_instruction, s390_software_single_step)
1527 (is_non_branch_ril, s390_displaced_step_copy_insn)
1528 (s390_displaced_step_fixup, s390_displaced_step_hw_singlestep)
1529 (s390_prologue_data, s390_addr, s390_store, s390_load)
1530 (s390_check_for_saved, s390_analyze_prologue, s390_skip_prologue)
1531 (s390_register_call_saved, s390_guess_tracepoint_registers)
1532 (s390_register_name, s390_dwarf_regmap, s390_dwarf_reg_to_regnum)
1533 (regnum_is_gpr_full, regnum_is_vxr_full, s390_value_from_register)
1534 (s390_pseudo_register_name, s390_pseudo_register_type)
1535 (s390_pseudo_register_read, s390_pseudo_register_write)
1536 (s390_pseudo_register_reggroup_p, s390_ax_pseudo_register_collect)
1537 (s390_ax_pseudo_register_push_stack, s390_gen_return_address)
1538 (s390_addr_bits_remove, s390_address_class_type_flags)
1539 (s390_address_class_type_flags_to_name)
1540 (s390_address_class_name_to_type_flags, s390_effective_inner_type)
1541 (s390_function_arg_float, s390_function_arg_vector)
1542 (is_power_of_two, s390_function_arg_integer, s390_arg_state)
1543 (s390_handle_arg, s390_push_dummy_call, s390_dummy_id)
1544 (s390_frame_align, s390_register_return_value, s390_return_value)
1545 (s390_stack_frame_destroyed_p, s390_unwind_pc, s390_unwind_sp)
1546 (s390_unwind_pseudo_register, s390_adjust_frame_regnum)
1547 (s390_dwarf2_prev_register, s390_dwarf2_frame_init_reg)
1548 (s390_trad_frame_prev_register, s390_unwind_cache)
1549 (s390_prologue_frame_unwind_cache)
1550 (s390_backchain_frame_unwind_cache, s390_frame_unwind_cache)
1551 (s390_frame_this_id, s390_frame_prev_register, s390_frame_unwind)
1552 (s390_stub_unwind_cache, s390_stub_frame_unwind_cache)
1553 (s390_stub_frame_this_id, s390_stub_frame_prev_register)
1554 (s390_stub_frame_sniffer, s390_stub_frame_unwind)
1555 (s390_frame_base_address, s390_local_base_address)
1556 (s390_frame_base, s390_gcc_target_options)
1557 (s390_gnu_triplet_regexp, s390_stap_is_single_operand)
1558 (s390_validate_reg_range, s390_tdesc_valid)
1559 (s390_gdbarch_tdep_alloc, s390_gdbarch_init): Move to...
1560 * s390-tdep.c: ...this. New file.
1561
1562 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
1563
1564 * s390-linux-tdep.c (gdbarch_tdep.s390_syscall_record): New hook.
1565 (s390_process_record, s390_gdbarch_tdep_alloc)
1566 (s390_linux_init_abi_any): Use/set new hook.
1567
1568 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
1569
1570 * s390-linux-tdep.c (osabi.h): New include.
1571 (s390_linux_init_abi_31, s390_linux_init_abi_64)
1572 (s390_linux_init_abi_any): New functions.
1573 (s390_gdbarch_init, _initialize_s390_tdep): Adjust.
1574
1575 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
1576
1577 * s390-linux-tdep.c (s390_gdbarch_init): Use gdb_assert for
1578 tdesc_has_registers check
1579
1580 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
1581
1582 * s390-linux-tdep.c (s390_tdesc_valid): New function.
1583 (s390_validate_reg_range): New macro.
1584 (s390_gdbarch_init): Adjust.
1585
1586 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
1587
1588 * s390-linux-tdep.c (gdbarch_tdep) <tdesc>: New field.
1589 (s390_gdbarch_tdep_alloc): Adjust.
1590 (s390_gdbarch_init): Adjust.
1591
1592 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
1593
1594 * s390-linux-tdep.c (gdbarch_tdep) <have_linux_v1, have_linux_v2>
1595 <have_tdb>: Change type to bool.
1596 (s390_gdbarch_tdep_alloc): Adjust.
1597 (s390_gdbarch_init): Adjust.
1598
1599 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
1600
1601 * s390-linux-tdep (s390_abi_kind) <ABI_NONE>: New default field.
1602 (gdbarch_tdep) <have_upper, have_vx>: New fields.
1603 (s390_gdbarch_tdep_alloc): New function.
1604 (s390_gdbarch_init): Allocate tdep at start and use its fields
1605 instead of separate variables.
1606
1607 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
1608
1609 * s390-linux-tdep.c (s390_gdbarch_init): Remove duplicate checks
1610 when looking for cached gdbarch and add comment for remaining.
1611
1612 2018-01-22 Pedro Alves <palves@redhat.com>
1613 Sergio Durigan Junior <sergiodj@redhat.com>
1614
1615 * typeprint.c (whatis_exp): Initialize "val" in the "whatis type"
1616 case.
1617
1618 2018-01-22 Maciej W. Rozycki <macro@mips.com>
1619
1620 * MAINTAINERS: Update my company e-mail address.
1621
1622 2018-01-22 Yao Qi <yao.qi@linaro.org>
1623
1624 * regcache.c (cooked_write_test): New function.
1625 (_initialize_regcache): Register the test.
1626
1627 2018-01-22 Yao Qi <yao.qi@linaro.org>
1628
1629 * ia64-tdep.c (ia64_pseudo_register_read): Call
1630 regcache->cooked_read instead of regcache_cooked_read_unsigned.
1631 * m32c-tdep.c (m32c_cat_read): Likewise.
1632 (m32c_r3r2r1r0_read): Likewise.
1633 * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
1634 * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
1635
1636 2018-01-22 Yao Qi <yao.qi@linaro.org>
1637
1638 * aarch64-tdep.c (aarch64_pseudo_read_value): Call regcache
1639 method raw_read instead of regcache_raw_read.
1640 * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
1641 * arm-tdep.c (arm_neon_quad_read): Likewise.
1642 * avr-tdep.c (avr_pseudo_register_read): Likewise.
1643 * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
1644 * frv-tdep.c (frv_pseudo_register_read): Likewise.
1645 * h8300-tdep.c (h8300_pseudo_register_read): Likewise.
1646 * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
1647 (i386_pseudo_register_read_into_value): Likewise.
1648 * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
1649 * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
1650 * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
1651 * rl78-tdep.c (rl78_pseudo_register_read): Likewise.
1652 * s390-linux-tdep.c (s390_pseudo_register_read): Likewise.
1653 * sparc-tdep.c (sparc32_pseudo_register_read): Likewise.
1654 * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
1655 * spu-tdep.c (spu_pseudo_register_read_spu): Likewise.
1656 * xtensa-tdep.c (xtensa_pseudo_register_read): Likewise.
1657
1658 2018-01-22 Yao Qi <yao.qi@linaro.org>
1659
1660 * Makefile.in (ALL_TARGET_OBS): Remove mt-tdep.o.
1661 * configure.tgt: Remove target mt.
1662 * mt-tdep.c: Remove.
1663 * regcache.c (cooked_read_test): Remove the check for mt.
1664
1665 2018-01-22 Yao Qi <yao.qi@linaro.org>
1666
1667 * jit.c (jit_frame_prev_register): Call regcache::cooked_read
1668 instead of gdbarch_pseudo_register_read_value.
1669
1670 2018-01-22 Joel Brobecker <brobecker@adacore.com>
1671
1672 * dwarf2read.c (need_gnat_info): Return nonzero if the cu's
1673 language is Ada.
1674
1675 2018-01-22 Joel Brobecker <brobecker@adacore.com>
1676
1677 * linespec.c (create_sals_line_offset): Remove code that preserved
1678 the symtab_and_line's line number.
1679
1680 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
1681
1682 * varobj.c (varobj_create): Don't set valid_block when creating a
1683 floating varobj.
1684
1685 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
1686
1687 * varobj.c (varobj_create): Remove out of date comment.
1688
1689 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
1690
1691 PR mi/20395
1692 * ada-exp.y (write_var_from_sym): Pass extra parameter when
1693 updating innermost block.
1694 * parse.c (innermost_block_tracker::update): Take extra type
1695 parameter, and check types match before updating innermost block.
1696 (write_dollar_variable): Update innermost block for registers.
1697 * parser-defs.h (enum innermost_block_tracker_type): New enum.
1698 (innermost_block_tracker::innermost_block_tracker): Initialise
1699 m_types member.
1700 (innermost_block_tracker::reset): Take type parameter.
1701 (innermost_block_tracker::update): Take type parameter, and pass
1702 type through as needed.
1703 (innermost_block_tracker::m_types): New member.
1704 * varobj.c (varobj_create): Pass type when reseting innermost
1705 block.
1706
1707 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
1708
1709 * ada-exp.y (write_var_from_sym): Switch to innermost_block API.
1710 * ada-lang.c (resolve_subexp): Likewise.
1711 * breakpoint.c (set_breakpoint_condition) Likewise.
1712 (watch_command_1) Likewise.
1713 * c-exp.y (variable): Likewise.
1714 * d-exp.y (PrimaryExpression): Likewise.
1715 * f-exp.y (variable): Likewise.
1716 * go-exp.y (variable): Likewise.
1717 * m2-exp.y (variable): Likewise.
1718 * objfiles.c (objfile::~objfile): Likewise.
1719 * p-exp.y (variable): Likewise.
1720 * parse.c (innermost_block): Change type.
1721 * parser-defs.h (class innermost_block_tracker): New.
1722 (innermost_block): Change to innermost_block_tracker.
1723 * printcmd.c (display_command): Switch to innermost_block API.
1724 (do_one_display): Likewise.
1725 * rust-exp.y (do_one_display): Likewise.
1726 * symfile.c (clear_symtab_users): Likewise.
1727 * varobj.c (varobj_create): Switch to innermost_block API, replace
1728 use of innermost_block with block stored on varobj object.
1729
1730 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
1731
1732 * expression.h (innermost_block): Remove declaration.
1733 * varobj.c: Add 'parser-defs.h' include.
1734
1735 2018-01-19 Tom Tromey <tom@tromey.com>
1736
1737 * rust-lang.c (rust_lookup_symbol_nonlocal): Look up qualified
1738 symbols in the static and global blocks.
1739
1740 2018-01-19 James Clarke <jrtc27@jrtc27.com>
1741
1742 * nat/linux-ptrace.c: Remove unnecessary reinclusion of
1743 gdb_ptrace.h, and move including gdb_wait.h ...
1744 * nat/linux-ptrace.h: ... to here.
1745
1746 2018-01-19 Simon Marchi <simon.marchi@ericsson.com>
1747
1748 * inf-ptrace.c (inf_ptrace_detach): Adjust call to
1749 inf_ptrace_detach_success.
1750 (inf_ptrace_detach_success): Add inferior parameter, use it
1751 instead of inferior_ptid, pass it to detach_inferior.
1752 * inf-ptrace.h (inf_ptrace_detach_success): Add inferior
1753 parameter.
1754 * inferior.c (detach_inferior): Add overload that takes an
1755 inferior object.
1756 * inferior.h (detach_inferior): Likewise.
1757 * linux-nat.c (linux_nat_detach): Use the inf parameter, don't
1758 use inferior_ptid, adjust call to inf_ptrace_detach_success.
1759 * linux-thread-db.c (thread_db_detach): Use inf parameter.
1760
1761 2018-01-19 Simon Marchi <simon.marchi@ericsson.com>
1762
1763 * target.h (struct target_ops) <to_detach>: Add inferior
1764 parameter.
1765 (target_detach): Likewise.
1766 * target.c (dispose_inferior): Pass inferior down.
1767 (target_detach): Pass inferior down. Assert that it is equal to
1768 the current inferior.
1769 * aix-thread.c (aix_thread_detach): Pass inferior down.
1770 * corefile.c (core_file_command): Pass current_inferior() down.
1771 * corelow.c (core_detach): Add inferior parameter.
1772 * darwin-nat.c (darwin_detach): Likewise.
1773 * gnu-nat.c (gnu_detach): Likewise.
1774 * inf-ptrace.c (inf_ptrace_detach): Likewise.
1775 * infcmd.c (detach_command): Pass current_inferior() down to
1776 target_detach.
1777 * infrun.c (follow_fork_inferior): Pass parent_inf to
1778 target_detach.
1779 (handle_vfork_child_exec_or_exit): Pass inf->vfork_parent to
1780 target_detach.
1781 * linux-nat.c (linux_nat_detach): Add inferior parameter.
1782 * linux-thread-db.c (thread_db_detach): Likewise.
1783 * nto-procfs.c (procfs_detach): Likewise.
1784 * procfs.c (procfs_detach): Likewise.
1785 * record.c (record_detach): Likewise.
1786 * record.h (struct inferior): Forward-declare.
1787 (record_detach): Add inferior parameter.
1788 * remote-sim.c (gdbsim_detach): Likewise.
1789 * remote.c (remote_detach_1): Likewise.
1790 (remote_detach): Likewise.
1791 (extended_remote_detach): Likewise.
1792 * sol-thread.c (sol_thread_detach): Likewise.
1793 * target-debug.h (target_debug_print_inferior_p): New macro.
1794 * target-delegates.c: Re-generate.
1795 * top.c (kill_or_detach): Pass inferior down to target_detach.
1796 * windows-nat.c (windows_detach): Add inferior parameter.
1797
1798 2018-01-19 Simon Marchi <simon.marchi@ericsson.com>
1799
1800 * target.h (struct target_ops) <to_detach>: Remove args
1801 parameter.
1802 (target_detach): Likewise.
1803 * target.c (dispose_inferior): Adjust.
1804 (target_detach): Remove args parameter, adjust.
1805 * aix-thread.c (aix_thread_detach): Adjust.
1806 * corefile.c (core_file_command): Adjust.
1807 * corelow.c (core_detach): Adjust.
1808 * darwin-nat.c (darwin_detach): Adjust.
1809 * gnu-nat.c (gnu_detach): Adjust.
1810 * inf-ptrace.c (inf_ptrace_detach): Adjust.
1811 * infcmd.c (detach_command): Adjust
1812 * infrun.c (follow_fork_inferior): Adjust.
1813 (handle_vfork_child_exec_or_exit): Adjust.
1814 * linux-fork.c (linux_fork_detach): Remove args parameter.
1815 * linux-fork.h (linux_fork_detach): Likewise.
1816 * linux-nat.c (linux_nat_detach): Likewise, and adjust.
1817 * linux-thread-db.c (thread_db_detach): Likewise.
1818 * nto-procfs.c (procfs_detach): Likewise.
1819 * procfs.c (procfs_detach): Likewise.
1820 (do_detach): Remove signo parameter.
1821 * record.c (record_detach): Remove args parameter.
1822 * record.h (record_detach): Likewise.
1823 * remote-sim.c (gdbsim_detach): Likewise.
1824 * remote.c (remote_detach_1): Likewise.
1825 (remote_detach): Likewise.
1826 (extended_remote_detach): Likewise.
1827 * sol-thread.c (sol_thread_detach): Likewise.
1828 * target-delegates.c: Re-generate.
1829 * top.c (struct qt_args) <args>: Remove field.
1830 (kill_or_detach): Don't pass args.
1831 (quit_force): Don't set args.
1832 * windows-nat.c (windows_detach): Remove args parameter.
1833
1834 2018-01-19 Yao Qi <yao.qi@linaro.org>
1835
1836 * arm-linux-tdep.c (arm_linux_gcc_target_options): New function.
1837 (arm_linux_init_abi): Install it.
1838
1839 2018-01-19 Yao Qi <yao.qi@linaro.org>
1840
1841 * osabi.c (gdb_osabi_names): Extend the regexp for
1842 arm-linux-gnueabihf.
1843
1844 2018-01-18 Yao Qi <yao.qi@linaro.org>
1845
1846 * dwarf2read.c (abbrev_table) <abbrevs>: Rename it to
1847 m_abbrevs.
1848 (abbrev_table::add_abbrev): Update.
1849 (abbrev_table::lookup_abbrev): Update.
1850
1851 2018-01-18 Yao Qi <yao.qi@linaro.org>
1852
1853 * ppc-linux-tdep.c (ppu2spu_prev_register): Call cooked_read.
1854
1855 2018-01-17 Sergio Durigan Junior <sergiodj@redhat.com>
1856
1857 * compile/compile.c (compile_to_object): Convert "triplet_rx"
1858 to "std::string".
1859
1860 2018-01-17 Tom Tromey <tom@tromey.com>
1861
1862 * dwarf2read.c (symbolp): Remove typedef. Don't instantiate VEC.
1863
1864 2018-01-17 Tom Tromey <tom@tromey.com>
1865
1866 * gdbtypes.h (add_dyn_prop): Remove objfile parameter.
1867 * gdbtypes.c (add_dyn_prop): Remove objfile parameter.
1868 (create_array_type_with_stride): Update.
1869 * dwarf2read.c (set_die_type): Update.
1870
1871 2018-01-17 Tom Tromey <tom@tromey.com>
1872
1873 * dwarf2read.c (delayed_method_info): Remove typedef.
1874 (dwarf2_cu::method_info): Now a std::vector.
1875 (add_to_method_list): Update.
1876 (free_delayed_list): Remove.
1877 (compute_delayed_physnames): Update.
1878 (process_full_comp_unit, process_full_type_unit): Clear the method
1879 list. Remove cleanups.
1880 (psymtab_include_file_name): Add name_holder parameter. Use
1881 unique_xmalloc_ptr.
1882 (dwarf_decode_lines): Update.
1883
1884 2018-01-17 Tom Tromey <tom@tromey.com>
1885 Simon Marchi <simon.marchi@ericsson.com>
1886
1887 * dwarf2read.c (struct dwarf2_cu): Add constructor, destructor.
1888 (dwarf2_per_objfile::free_cached_comp_units)
1889 (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
1890 (init_cutu_and_read_dies_no_follow): Update.
1891 (dwarf2_cu::dwarf2_cu): Rename from init_one_comp_unit.
1892 (dwarf2_cu::~dwarf2_cu): New.
1893 (free_heap_comp_unit, free_stack_comp_unit): Remove.
1894 (age_cached_comp_units, free_one_cached_comp_unit): Update.
1895
1896 2018-01-17 Tom Tromey <tom@tromey.com>
1897 Simon Marchi <simon.marchi@ericsson.com>
1898
1899 * dwarf2read.c (struct dwarf2_cu) <abbrev_table>: Remove.
1900 (struct die_reader_specs) <abbrev_table>: New member.
1901 (struct abbrev_table): Add constructor.
1902 <alloc_abbrev, add_abbrev, lookup_abbrev>: Declare.
1903 <abbrev_obstack>: Now an auto_obstack.
1904 (abbrev_table_up): New typedef.
1905 (init_cu_die_reader): Add abbrev_table parameter.
1906 (read_cutu_die_from_dwo): Remove abbrev_table_provided parameter.
1907 Add result_dwo_abbrev_table.
1908 (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
1909 (init_cutu_and_read_dies_no_follow, build_type_psymtabs_1):
1910 Update.
1911 (peek_die_abbrev): Take die_reader_specs, not dwarf_cu as
1912 parameter.
1913 (skip_children): Update.
1914 (abbrev_table::alloc_abbrev): Rename from
1915 abbrev_table_alloc_abbrev.
1916 (abbrev_table::add_abbrev): Rename from abbrev_table_add_abbrev.
1917 (abbrev_table::lookup_abbrev): Rename from
1918 abbrev_table_lookup_abbrev.
1919 (abbrev_table_read_table): Return abbrev_table_up.
1920 (abbrev_table_free, abbrev_table_free_cleanup)
1921 (dwarf2_read_abbrevs, dwarf2_free_abbrev_table): Remove.
1922 (load_partial_dies): Update.
1923
1924 2018-01-17 Tom Tromey <tom@tromey.com>
1925
1926 * dwarf2read.c (dwarf2_compute_name): Update comment.
1927 (read_func_scope, read_variable): Update.
1928 (new_symbol): Remove.
1929 (new_symbol_full): Rename to new_symbol.
1930
1931 2018-01-17 Mike Gulick <mgulick@mathworks.com>
1932
1933 PR gdb/16577
1934 * gdb_bfd.c (gdb_bfd_map_section): If unable to read object file, issue
1935 a warning instead of throwing an error, set section size to 0 and return
1936 NULL.
1937 * gdb_bfd.h (gdb_bfd_map_section): Update description.
1938
1939 2018-01-17 Simon Marchi <simon.marchi@ericsson.com>
1940
1941 * nat/linux-ptrace.h (linux_ptrace_attach_fail_reason): Return
1942 std::string.
1943 (linux_ptrace_attach_fail_reason_string): Likewise.
1944 * nat/linux-ptrace.c (linux_ptrace_attach_fail_reason):
1945 Likewise.
1946 (linux_ptrace_attach_fail_reason_string): Likewise.
1947 * linux-nat.c (attach_proc_task_lwp_callback): Adjust.
1948
1949 2018-01-17 Simon Marchi <simon.marchi@ericsson.com>
1950
1951 * linux-nat.c (linux_nat_attach): Remove xstrdup.
1952
1953 2018-01-17 Eldar Abusalimov <eldar.abusalimov@jetbrains.com>
1954
1955 PR gdb/21559
1956 * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
1957 checking for fs_base/gs_base fields in struct user_regs_struct.
1958 * configure: Regenerate.
1959
1960 2018-01-17 Yao Qi <yao.qi@linaro.org>
1961
1962 * aarch64-linux-tdep.c (aarch64_linux_gcc_target_options): New
1963 function.
1964 (aarch64_linux_init_abi): Install it to gdbarch hook
1965 gcc_target_options.
1966
1967 2018-01-15 Pedro Alves <palves@redhat.com>
1968
1969 * common/signals-state-save-restore.c
1970 (save_original_signals_state): Fix typos.
1971
1972 2017-01-12 Tom Tromey <tom@tromey.com>
1973 Sergio Durigan Junior <sergiodj@redhat.com>
1974
1975 * Makefile.in (install-only): Install gdb-add-index.
1976
1977 2018-01-12 John Baldwin <jhb@FreeBSD.org>
1978
1979 * fbsd-tdep.c (KVE_PROTECTION): Correct value.
1980
1981 2018-01-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
1982
1983 * infrun.c (keep_going_pass_signal): Clear step-over info when
1984 insert_breakpoints fails.
1985
1986 2018-01-11 Pedro Alves <palves@redhat.com>
1987
1988 PR gdb/22583
1989 * infrun.c (resume): Rename to ...
1990 (resume_1): ... this.
1991 (resume): Reimplement as wrapper around resume_1.
1992
1993 2018-01-11 Pedro Alves <palves@redhat.com>
1994
1995 PR remote/22597
1996 * remote.c (remote_parse_stop_reply): Default to the last-set
1997 general thread instead of to 'magic_null_ptid'.
1998
1999 2018-01-10 Pedro Alves <palves@redhat.com>
2000
2001 * language.h (language_get_symbol_name_matcher): Rename ...
2002 (get_symbol_name_matcher): ... this.
2003 * language.c (language_get_symbol_name_matcher): Ditto.
2004 * dictionary.c, linespec.c, minsyms.c, psymtab.c, symtab.c: All
2005 callers adjusted.
2006
2007 2018-01-10 Pedro Alves <palves@redhat.com>
2008
2009 PR gdb/22670
2010 * dwarf2read.c
2011 (gdb_index_symbol_name_matcher::gdb_index_symbol_name_matcher):
2012 Adjust to use language_get_symbol_name_matcher instead of
2013 language_defn::la_get_symbol_name_matcher.
2014 * language.c (language_get_symbol_name_matcher): If in Ada mode
2015 and the lookup name is a verbatim match, return Ada's matcher.
2016 * language.h (language_get_symbol_name_matcher): Adjust comment.
2017 (ada_lookup_name_info::verbatim_p):: New method.
2018
2019 2018-01-10 Pedro Alves <palves@redhat.com>
2020
2021 PR gdb/22670
2022 * ada-lang.c (ada_collect_symbol_completion_matches): If the
2023 minsym's language is language_auto or language_cplus, pass down
2024 language_ada instead.
2025 * symtab.c (compare_symbol_name): Don't frob symbol language here.
2026
2027 2018-01-10 Pedro Alves <palves@redhat.com>
2028
2029 PR gdb/22670
2030 * minsyms.c (linkage_name_str): New function.
2031 (iterate_over_minimal_symbols): Use it.
2032
2033 2018-01-09 John Baldwin <jhb@FreeBSD.org>
2034
2035 * NEWS: Document that 'info proc' now works on FreeBSD.
2036
2037 2018-01-09 John Baldwin <jhb@FreeBSD.org>
2038
2039 * configure.ac: Check for kinfo_getfile in libutil.
2040 * configure: Regenerate.
2041 * config.in: Regenerate.
2042 * fbsd-nat.c: Include "fbsd-tdep.h".
2043 (fbsd_fetch_cmdline): New.
2044 (fbsd_fetch_kinfo_proc): Move earlier and change to return a bool
2045 rather than calling error.
2046 (fbsd_info_proc): New.
2047 (fbsd_thread_name): Report error if fbsd_fetch_kinfo_proc fails.
2048 (fbsd_wait): Report warning if fbsd_fetch_kinfo_proc fails.
2049 (fbsd_nat_add_target): Set "to_info_proc" to "fbsd_info_proc".
2050
2051 2018-01-09 John Baldwin <jhb@FreeBSD.org>
2052
2053 * fbsd-nat.c (struct free_deleter): Remove.
2054 (fbsd_find_memory_regions): Use gdb::unique_xmalloc_ptr<>.
2055
2056 2018-01-09 John Baldwin <jhb@FreeBSD.org>
2057
2058 * fbsd-nat.c (fbsd_pid_to_exec_file) [KERN_PROC_PATHNAME]: Return
2059 NULL for an empty pathname.
2060
2061 2018-01-09 John Baldwin <jhb@FreeBSD.org>
2062
2063 * fbsd-tdep.c (KVE_STRUCTSIZE, KVE_START, KVE_END, KVE_OFFSET)
2064 (KVE_FLAGS, KVE_PROTECTION, KVE_PATH, KINFO_VME_PROT_READ)
2065 (KINFO_VME_PROT_WRITE, KINFO_VME_PROT_EXEC, KINFO_VME_FLAG_COW)
2066 (KINFO_VME_FLAG_NEEDS_COPY, KINFO_VME_FLAG_NOCOREDUMP)
2067 (KINFO_VME_FLAG_SUPER, KINFO_VME_FLAG_GROWS_UP)
2068 (KINFO_VME_FLAG_GROWS_DOWN, KF_STRUCTSIZE, KF_TYPE, KF_FD)
2069 (KF_PATH, KINFO_FILE_TYPE_VNODE, KINFO_FILE_FD_TYPE_CWD)
2070 (KINFO_FILE_FD_TYPE_TEXT, SIG_WORDS, struct kinfo_proc_layout)
2071 (kinfo_proc_layout_32, kinfo_proc_layout_i386)
2072 (kinfo_proc_layout_64, fbsd_vm_map_entry_flags)
2073 (fbsd_core_info_proc_mappings, fbsd_core_vnode_path)
2074 (fbsd_core_fetch_timeval, fbsd_print_sigset)
2075 (fbsd_core_info_proc_status, fbsd_core_info_proc): New.
2076 (fbsd_init_abi): Install gdbarch "core_info_proc" method.
2077 * fbsd-tdep.h (fbsd_vm_map_entry_flags): New.
2078
2079 2018-01-08 Samuel Thibault <samuel.thibault@ens-lyon.org>
2080
2081 * gdb/gnu-nat.c: Include <elf.h> and <link.h>.
2082 (gnu_xfer_auxv): New function.
2083 (gnu_xfer_partial): Call gnu_xfer_auxv when `object' is
2084 TARGET_OBJECT_AUXV.
2085
2086 2018-01-08 Yao Qi <yao.qi@linaro.org>
2087 Simon Marchi <simon.marchi@ericsson.com>
2088
2089 * Makefile.in (COMMON_SFILES): Remove selftest-arch.c and
2090 common/selftest.c.
2091 (COMMON_OBS): Remove selftest.o.
2092 * configure.ac: Append selftest-arch.c and common/selftest.c to
2093 CONFIG_SRCS. Append selftest-arch.o and selftest.o to COMMON_OBS.
2094 * configure: Re-generated.
2095 * maint.c (maintenance_selftest): Wrap selftests::run_tests with
2096 GDB_SELF_TEST.
2097 (maintenance_info_selftests): Likewise.
2098
2099 2018-01-08 Xavier Roirand <roirand@adacore.com>
2100
2101 * ada-valprint.c (val_print_packed_array_elements): Use
2102 proper number of elements when printing an array indexed
2103 by an enumeration type.
2104
2105 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
2106
2107 * dwarf2read.c (struct dwarf2_cu) <dwarf2_per_objfile>: Remove.
2108 (dw2_get_file_names_reader): Adjust.
2109 (lookup_dwo_signatured_type): Adjust.
2110 (lookup_dwp_signatured_type): Adjust.
2111 (lookup_signatured_type): Adjust.
2112 (create_type_unit_group): Adjust.
2113 (get_type_unit_group): Adjust.
2114 (process_psymtab_comp_unit_reader): Adjust.
2115 (build_type_psymtabs_reader): Adjust.
2116 (scan_partial_symbols): Adjust.
2117 (add_partial_symbol): Adjust.
2118 (add_partial_subprogram): Adjust.
2119 (peek_die_abbrev): Adjust.
2120 (fixup_go_packaging): Adjust.
2121 (process_imported_unit_die): Adjust.
2122 (dwarf2_compute_name): Adjust.
2123 (dwarf2_physname): Adjust.
2124 (read_import_statement): Adjust.
2125 (handle_DW_AT_stmt_list): Adjust.
2126 (read_file_scope): Adjust.
2127 (read_func_scope): Adjust.
2128 (read_lexical_block_scope): Adjust.
2129 (read_call_site_scope): Adjust.
2130 (read_variable): Adjust.
2131 (dwarf2_rnglists_process): Adjust.
2132 (dwarf2_ranges_process): Adjust.
2133 (dwarf2_ranges_read): Adjust.
2134 (dwarf2_get_pc_bounds): Adjust.
2135 (dwarf2_record_block_ranges): Adjust.
2136 (dwarf2_add_field): Adjust.
2137 (dwarf2_add_member_fn): Adjust.
2138 (read_structure_type): Adjust.
2139 (process_structure_scope): Adjust.
2140 (read_enumeration_type): Adjust.
2141 (read_array_type): Adjust.
2142 (mark_common_block_symbol_computed): Adjust.
2143 (read_common_block): Adjust.
2144 (read_namespace_type): Adjust.
2145 (read_namespace): Adjust.
2146 (read_module_type): Adjust.
2147 (read_tag_pointer_type): Adjust.
2148 (read_tag_ptr_to_member_type): Adjust.
2149 (read_tag_string_type): Adjust.
2150 (read_subroutine_type): Adjust.
2151 (read_typedef): Adjust.
2152 (read_base_type): Adjust.
2153 (attr_to_dynamic_prop): Adjust.
2154 (read_subrange_type): Adjust.
2155 (read_unspecified_type): Adjust.
2156 (dwarf2_read_abbrevs): Adjust.
2157 (load_partial_dies): Adjust.
2158 (read_partial_die): Adjust.
2159 (find_partial_die): Adjust.
2160 (guess_partial_die_structure_name): Adjust.
2161 (fixup_partial_die): Adjust.
2162 (read_attribute_value): Adjust.
2163 (read_addr_index): Adjust.
2164 (read_addr_index_from_leb128): Adjust.
2165 (read_str_index): Adjust.
2166 (dwarf2_string_attr): Adjust.
2167 (get_debug_line_section): Adjust.
2168 (dwarf_decode_line_header): Adjust.
2169 (lnp_state_machine::check_line_address): Adjust.
2170 (dwarf_decode_lines_1): Adjust.
2171 (dwarf_decode_lines): Adjust.
2172 (dwarf2_start_symtab): Adjust.
2173 (var_decode_location): Adjust.
2174 (new_symbol_full): Adjust.
2175 (dwarf2_const_value_data): Adjust.
2176 (dwarf2_const_value_attr): Adjust.
2177 (dwarf2_const_value): Adjust.
2178 (die_type): Adjust.
2179 (die_containing_type): Adjust.
2180 (build_error_marker_type): Adjust.
2181 (lookup_die_type): Adjust.
2182 (guess_full_die_structure_name): Adjust.
2183 (anonymous_struct_prefix): Adjust.
2184 (determine_prefix): Adjust.
2185 (dwarf2_name): Adjust.
2186 (follow_die_ref_or_sig): Adjust.
2187 (follow_die_offset): Adjust.
2188 (follow_die_ref): Adjust.
2189 (follow_die_sig_1): Adjust.
2190 (follow_die_sig): Adjust.
2191 (get_signatured_type): Adjust.
2192 (get_DW_AT_signature_type): Adjust.
2193 (decode_locdesc): Adjust.
2194 (dwarf_decode_macros): Adjust.
2195 (cu_debug_loc_section): Adjust.
2196 (fill_in_loclist_baton): Adjust.
2197 (dwarf2_symbol_mark_computed): Adjust.
2198 (init_one_comp_unit): Don't assign
2199 dwarf2_cu::dwarf2_per_objfile.
2200 (set_die_type): Adjust.
2201
2202 2018-01-07 Simon Marchi <simon.marchi@ericsson.com>
2203
2204 * dwarf2read.c (struct mapped_debug_names): Add constructor.
2205 <dwarf2_per_objfile>: New field.
2206 (dwarf2_per_objfile): Remove global.
2207 (get_dwarf2_per_objfile): New function.
2208 (set_dwarf2_per_objfile): New function.
2209 (dwarf2_build_psymtabs_hard): Change objfile parameter to
2210 dwarf2_per_objfile.
2211 (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
2212 (read_abbrev_offset): Likewise.
2213 (read_indirect_string): Likewise.
2214 (read_indirect_line_string): Likewise.
2215 (read_indirect_string_at_offset): Likewise.
2216 (read_indirect_string_from_dwz): Likewise.
2217 (dwarf2_find_containing_comp_unit): Change objfile parameter to
2218 dwarf2_per_objfile.
2219 (age_cached_comp_units): Add dwarf2_per_objfile parameter.
2220 (create_all_comp_units): Change objfile parameter to
2221 dwarf2_per_objfile.
2222 (create_all_type_units): Likewise.
2223 (process_queue): Add dwarf2_per_objfile parameter.
2224 (read_and_check_comp_unit_head): Likewise.
2225 (lookup_dwo_unit_in_dwp): Likewise.
2226 (get_dwp_file): Likewise.
2227 (process_cu_includes): Likewise.
2228 (struct free_dwo_file_cleanup_data): New struct.
2229 (dwarf2_has_info): Use get_dwarf2_per_objfile and
2230 set_dwarf2_per_objfile.
2231 (dwarf2_get_dwz_file): Add dwarf2_per_objfile parameter.
2232 (dw2_do_instantiate_symtab): Get dwarf2_per_objfile from
2233 context, adjust calls.
2234 (dw2_instantiate_symtab): Likewise.
2235 (dw2_get_cutu): Add dwarf2_per_objfile parameter.
2236 (dw2_get_cu): Likewise.
2237 (create_cu_from_index_list): Change objfile parameter to
2238 dwarf2_per_objfile.
2239 (create_cus_from_index_list): Get dwarf2_per_objfile from
2240 context, adjust calls.
2241 (create_cus_from_index): Likewise.
2242 (create_signatured_type_table_from_index): Change objfile
2243 parameter to dwarf2_per_objfile.
2244 (create_signatured_type_table_from_debug_names): Change objfile
2245 parameter to dwarf2_per_objfile.
2246 (create_addrmap_from_index): Likewise.
2247 (create_addrmap_from_aranges): Likewise.
2248 (dwarf2_read_index): Use get_dwarf2_per_objfile, adjust calls.
2249 (dw2_setup): Remove.
2250 (dw2_get_file_names_reader): Get dwarf2_per_objfile from
2251 context.
2252 (dw2_find_last_source_symtab): Get dwarf2_per_objfile using
2253 get_dwarf2_per_objfile.
2254 (dw2_forget_cached_source_info): Likewise.
2255 (dw2_map_symtabs_matching_filename): Likewise.
2256 (struct dw2_symtab_iterator) <index>: Remove.
2257 <dwarf2_per_objfile>: New field.
2258 (dw2_symtab_iter_init): Replace index parameter with
2259 dwarf2_per_objfile.
2260 (dw2_symtab_iter_next): Use dwarf2_per_objfile from iter.
2261 (dw2_lookup_symbol): Use get_dwarf2_per_objfile and adjust.
2262 (dw2_print_stats): Likewise.
2263 (dw2_dump): Likewise.
2264 (dw2_expand_symtabs_for_function): Likewise.
2265 (dw2_expand_all_symtabs): Likewise.
2266 (dw2_expand_symtabs_with_fullname): Likewise.
2267 (dw2_expand_marked_cus): Replace index and objfile parameters
2268 with dwarf2_per_objfile.
2269 (dw_expand_symtabs_matching_file_matcher): Add
2270 dwarf2_per_objfile parameter and adjust calls.
2271 (dw2_expand_symtabs_matching): Use get_dwarf2_per_objfile and
2272 adjust calls.
2273 (dw2_find_pc_sect_compunit_symtab): Don't call dw2_setup.
2274 (dw2_map_symbol_filenames): Use get_dwarf2_per_objfile and
2275 adjust calls.
2276 (create_cus_from_debug_names_list): Replace objfile parameter
2277 with dwarf2_per_objfile and adjust calls.
2278 (create_cus_from_debug_names): Likewise.
2279 (dwarf2_read_debug_names): Likewise.
2280 (mapped_debug_names::namei_to_name): Adjust call.
2281 (dw2_debug_names_iterator::next): Likewise.
2282 (dw2_debug_names_iterator::find_vec_in_debug_names): Likewise.
2283 (dw2_debug_names_lookup_symbol): Use get_dwarf2_per_objfile.
2284 (dw2_debug_names_dump): Likewise.
2285 (dw2_debug_names_expand_symtabs_for_function): Likewise.
2286 (dw2_debug_names_expand_symtabs_matching): Likewise.
2287 (dwarf2_initialize_objfile): Likewise.
2288 (dwarf2_build_psymtabs): Likewise.
2289 (get_abbrev_section_for_cu): Get dwarf2_per_objfile from
2290 this_cu.
2291 (error_check_comp_unit_head): Add dwarf2_per_objfile parameter.
2292 (read_and_check_comp_unit_head): Likewise.
2293 (read_abbrev_offset): Likewise.
2294 (create_debug_type_hash_table): Likewise.
2295 (create_debug_types_hash_table): Likewise.
2296 (create_all_type_units): Replace objfile parameter with
2297 dwarf2_per_objfile.
2298 (add_type_unit): Add dwarf2_per_objfile parameter.
2299 (fill_in_sig_entry_from_dwo_entry): Replace objfile parameter
2300 with dwarf2_per_objfile.
2301 (lookup_dwo_signatured_type): Get dwarf2_per_objfile from cu.
2302 (lookup_dwp_signatured_type): Likewise.
2303 (lookup_signatured_type): Likewise.
2304 (read_cutu_die_from_dwo): Likewise.
2305 (init_tu_and_read_dwo_dies): Likewise.
2306 (init_cutu_and_read_dies): Likewise.
2307 (init_cutu_and_read_dies_no_follow): Likewise.
2308 (allocate_type_unit_groups_table): Add objfile parameter.
2309 (create_type_unit_group): Use dwarf2_per_objfile from cu.
2310 (get_type_unit_group): Likewise.
2311 (process_psymtab_comp_unit): Update call.
2312 (build_type_psymtabs_reader): Use dwarf2_per_objfile from cu.
2313 (build_type_psymtabs_1): Add dwarf2_per_objfile parameter.
2314 (print_tu_stats): Likewise.
2315 (build_type_psymtab_dependencies): Use dwarf2_per_objfile passed
2316 in void* parameter.
2317 (build_type_psymtabs): Change objfile parameter to
2318 dwarf2_per_objfile.
2319 (process_skeletonless_type_unit): Use dwarf2_per_objfile
2320 passed in void* parameter.
2321 (process_skeletonless_type_units): Change objfile parameter to
2322 dwarf2_per_objfile.
2323 (set_partial_user): Likewise.
2324 (dwarf2_build_psymtabs_hard): Likewise.
2325 (read_comp_units_from_section): Likewise.
2326 (create_all_comp_units): Likewise.
2327 (scan_partial_symbols): Update calls.
2328 (add_partial_symbol): Likewise.
2329 (dwarf2_read_symtab): Use get_dwarf2_per_objfile.
2330 (maybe_queue_comp_unit): Use dwarf2_read_symtab from cu.
2331 (process_queue): Add dwarf2_per_objfile parameter.
2332 (get_compunit_symtab): Use dwarf2_per_objfile from cu.
2333 (compute_compunit_symtab_includes): Likewise.
2334 (process_cu_includes): Add dwarf2_per_objfile parameter.
2335 (process_full_comp_unit): Use dwarf2_per_objfile from cu.
2336 (process_full_type_unit): Likewise.
2337 (process_imported_unit_die): Update call.
2338 (handle_DW_AT_stmt_list): Use dwarf2_per_objfile from cu.
2339 (read_file_scope): Likewise.
2340 (allocate_dwo_file_hash_table): Add objfile parameter.
2341 (lookup_dwo_file_slot): Add dwarf2_per_objfile parameter.
2342 (create_cus_hash_table): Likewise.
2343 (create_dwp_hash_table): Likewise.
2344 (create_dwo_unit_in_dwp_v1): Likewise.
2345 (create_dwp_v2_section): Likewise.
2346 (create_dwo_unit_in_dwp_v2): Likewise.
2347 (lookup_dwo_unit_in_dwp): Likewise.
2348 (try_open_dwop_file): Likewise.
2349 (open_dwo_file): Likewise. Use dwarf2_per_objfile from cu.
2350 (open_and_init_dwo_file): Use dwarf2_per_objfile from cu, update
2351 cleanup to include a reference to dwarf2_per_objfile.
2352 (open_dwp_file): Add dwarf2_per_objfile parameter.
2353 (open_and_init_dwp_file): Likewise.
2354 (get_dwp_file): Likewise.
2355 (lookup_dwo_cutu): Use dwarf2_per_objfile from cu.
2356 (queue_and_load_all_dwo_tus): Update call.
2357 (free_dwo_file_cleanup): Use dwarf2_per_objfile from cleanup
2358 data.
2359 (dwarf2_rnglists_process): Use dwarf2_per_objfile from cu.
2360 (dwarf2_ranges_process): Likewise.
2361 (dwarf2_get_pc_bounds): Likewise.
2362 (mark_common_block_symbol_computed): Likewise.
2363 (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
2364 (dwarf2_read_abbrevs): Update call.
2365 (read_partial_die): Use dwarf2_per_objfile from cu.
2366 (find_partial_die): Likewise.
2367 (fixup_partial_die): Likewise.
2368 (read_attribute_value): Likewise.
2369 (read_indirect_string_at_offset_from): Add objfile parameter.
2370 (read_indirect_string_at_offset): Add dwarf2_per_objfile
2371 parameter.
2372 (read_indirect_string_from_dwz): Add objfile parameter.
2373 (read_indirect_string): Add objfile parameter.
2374 (read_addr_index_1): Add dwarf2_per_objfile parameter.
2375 (read_addr_index): Use dwarf2_per_objfile from cu.
2376 (dwarf2_read_addr_index): Use dwarf2_per_objfile from cu, don't
2377 call dw2_setup.
2378 (read_str_index): Use dwarf2_per_objfile from cu.
2379 (get_debug_line_section): Likewise.
2380 (read_formatted_entries): Add dwarf2_per_objfile parameter.
2381 (dwarf_decode_line_header): Use dwarf2_per_objfile from cu.
2382 (new_symbol_full): Use dwarf2_per_objfile from cu.
2383 (build_error_marker_type): Likewise.
2384 (lookup_die_type): Likewise.
2385 (determine_prefix): Likewise.
2386 (follow_die_offset): Likewise.
2387 (dwarf2_fetch_die_loc_sect_off): Use get_dwarf2_per_objfile.
2388 (dwarf2_fetch_constant_bytes): Don't call dw2_setup.
2389 (dwarf2_fetch_die_type_sect_off): Likewise.
2390 (dwarf2_get_die_type): Likewise.
2391 (follow_die_sig_1): Use dwarf2_per_objfile from cu.
2392 (get_signatured_type): Likewise.
2393 (get_DW_AT_signature_type): Likewise.
2394 (dwarf_decode_macro_bytes): Add dwarf2_per_objfile parameter.
2395 (dwarf_decode_macros): Use dwarf2_per_objfile from cu.
2396 (cu_debug_loc_section): Likewise.
2397 (fill_in_loclist_baton): Likewise.
2398 (dwarf2_symbol_mark_computed): Likewise.
2399 (dwarf2_find_containing_comp_unit): Change objfile parameter to
2400 dwarf2_per_objfile.
2401 (free_cached_comp_units): Use dwarf2_per_objfile passed in void*
2402 parameter.
2403 (age_cached_comp_units): Add dwarf2_per_objfile parameter.
2404 (free_one_cached_comp_unit): Use dwarf2_per_objfile from cu.
2405 (dwarf2_free_objfile): Use get_dwarf2_per_objfile.
2406 (set_die_type): Use dwarf2_free_objfile from cu.
2407 (get_die_type_at_offset): Likewise.
2408 (dwarf2_per_objfile_free): Don't assign global variable.
2409 (debug_names) <constructor>: Add dwarf2_per_objfile
2410 parameter, update m_debugstrlookup construction.
2411 (debug_names::debug_str_lookup): Add dwarf2_per_objfile
2412 parameter.
2413 <m_dwarf2_per_objfile>: New field.
2414 <lookup>: Use m_dwarf2_per_objfile.
2415 (check_dwarf64_offsets): Add dwarf2_per_objfile parameter.
2416 (psyms_seen_size): Likewise.
2417 (write_gdbindex): Replace objfile parameter with
2418 dwarf2_per_objfile.
2419 (write_debug_names): Likewise.
2420 (write_psymtabs_to_index): Likewise.
2421 (save_gdb_index_command): Use get_dwarf2_per_objfile, update
2422 calls.
2423
2424 2018-01-07 Simon Marchi <simon.marchi@ericsson.com>
2425
2426 * dwarf2read.c (struct dwarf2_cu) <objfile>: Remove.
2427 <dwarf2_per_objfile>: New field.
2428 (struct dwarf2_per_cu_data) <objfile>: Remove.
2429 <dwarf2_per_objfile>: New field.
2430 (create_cu_from_index_list): Assign dwarf2_per_objfile instead
2431 of objfile.
2432 (create_signatured_type_table_from_index): Likewise.
2433 (create_debug_type_hash_table): Likewise.
2434 (fill_in_sig_entry_from_dwo_entry): Likewise.
2435 (lookup_dwo_unit): Access objfile through dwarf2_per_objfile.
2436 (create_type_unit_group): Assign dwarf2_per_objfile instead of
2437 objfile.
2438 (create_partial_symtab): Access objfile through
2439 dwarf2_per_objfile.
2440 (process_psymtab_comp_unit_reader): Likewise.
2441 (read_comp_units_from_section): Likewise.
2442 (scan_partial_symbols): Likewise.
2443 (add_partial_symbol): Likewise.
2444 (add_partial_subprogram): Likewise.
2445 (peek_die_abbrev): Likewise.
2446 (fixup_go_packaging): Likewise.
2447 (process_full_comp_unit): Likewise.
2448 (process_full_type_unit): Likewise.
2449 (process_imported_unit_die): Likewise.
2450 (dwarf2_compute_name): Likewise.
2451 (dwarf2_physname): Likewise.
2452 (read_import_statement): Likewise.
2453 (create_cus_hash_table): Assign dwarf2_physname instead of
2454 objfile.
2455 (read_func_scope): Access objfile through dwarf2_per_objfile.
2456 (read_lexical_block_scope): Likewise.
2457 (read_call_site_scope): Likewise.
2458 (read_variable): Likewise.
2459 (dwarf2_rnglists_process): Likewise.
2460 (dwarf2_ranges_process): Likewise.
2461 (dwarf2_ranges_read): Likewise.
2462 (dwarf2_record_block_ranges): Likewise.
2463 (dwarf2_add_field): Likewise.
2464 (dwarf2_add_member_fn): Likewise.
2465 (read_structure_type): Likewise.
2466 (process_structure_scope): Likewise.
2467 (read_enumeration_type): Likewise.
2468 (read_array_type): Likewise.
2469 (read_common_block): Likewise.
2470 (read_namespace_type): Likewise.
2471 (read_namespace): Likewise.
2472 (read_module_type): Likewise.
2473 (read_tag_pointer_type): Likewise.
2474 (read_tag_ptr_to_member_type): Likewise.
2475 (read_tag_string_type): Likewise.
2476 (read_subroutine_type): Likewise.
2477 (read_typedef): Likewise.
2478 (read_base_type): Likewise.
2479 (attr_to_dynamic_prop): Likewise.
2480 (read_subrange_type): Likewise.
2481 (read_unspecified_type): Likewise.
2482 (load_partial_dies): Likewise.
2483 (read_partial_die): Likewise.
2484 (find_partial_die): Likewise.
2485 (guess_partial_die_structure_name): Likewise.
2486 (fixup_partial_die): Likewise.
2487 (read_attribute_value): Likewise.
2488 (read_addr_index_from_leb128): Likewise.
2489 (dwarf2_read_addr_index): Likewise.
2490 (dwarf2_string_attr): Likewise.
2491 (lnp_state_machine::check_line_address): Likewise.
2492 (dwarf_decode_lines_1): Likewise.
2493 (dwarf_decode_lines): Likewise.
2494 (dwarf2_start_symtab): Likewise.
2495 (var_decode_location): Likewise.
2496 (new_symbol_full): Likewise.
2497 (dwarf2_const_value_data): Likewise.
2498 (dwarf2_const_value_attr): Likewise.
2499 (dwarf2_const_value): Likewise.
2500 (die_type): Likewise.
2501 (die_containing_type): Likewise.
2502 (lookup_die_type): Likewise.
2503 (guess_full_die_structure_name): Likewise.
2504 (anonymous_struct_prefix): Likewise.
2505 (dwarf2_name): Likewise.
2506 (follow_die_ref_or_sig): Likewise.
2507 (follow_die_offset): Likewise.
2508 (follow_die_ref): Likewise.
2509 (dwarf2_fetch_die_loc_sect_off): Likewise.
2510 (dwarf2_fetch_constant_bytes): Likewise.
2511 (dwarf2_fetch_die_type_sect_off): Likewise.
2512 (dwarf2_get_die_type): Likewise.
2513 (follow_die_sig): Likewise.
2514 (decode_locdesc): Likewise.
2515 (dwarf2_per_cu_objfile): Likewise.
2516 (dwarf2_per_cu_text_offset): Likewise.
2517 (init_one_comp_unit): Assign dwarf2_per_objfile instead of
2518 objfile.
2519 (set_die_type): Access objfile through
2520 dwarf2_per_objfile.
2521
2522 2018-01-07 Simon Marchi <simon.marchi@ericsson.com>
2523
2524 * valprint.c (converted_character_d): Remove typedef.
2525 (DEF_VEC_O (converted_character_d)): Remove.
2526 (count_next_character): Use std::vector.
2527 (print_converted_chars_to_obstack): Likewise.
2528 (generic_printstr): Likewise.
2529
2530 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
2531
2532 * xml-support.h (struct gdb_xml_value): Add constructor.
2533 <value>: Change type to unique_xmalloc_ptr.
2534 (gdb_xml_value_s): Remove typedef.
2535 (DEF_VEC_O (gdb_xml_value_s)): Remove.
2536 (gdb_xml_element_start_handler): Change parameter type to
2537 std::vector.
2538 (xml_find_attribute): Likewise.
2539 * xml-support.c (xml_find_attribute): Change parameter type to
2540 std::vector and adjust.
2541 (gdb_xml_values_cleanup): Remove.
2542 (gdb_xml_parser::start_element): Adjust to std::vector.
2543 (xinclude_start_include): Change paraeter type to std::vector
2544 and adjust.
2545 * btrace.c (check_xml_btrace_version): Likewise.
2546 (parse_xml_btrace_block): Likewise.
2547 (parse_xml_btrace_pt_config_cpu): Likewise.
2548 (parse_xml_btrace_pt): Likewise.
2549 (parse_xml_btrace_conf_bts): Likewise.
2550 (parse_xml_btrace_conf_pt): Likewise.
2551 * memory-map.c (memory_map_start_memory): Likewise.
2552 (memory_map_start_property): Likewise.
2553 * osdata.c (osdata_start_osdata): Likewise.
2554 (osdata_start_item): Likewise.
2555 (osdata_start_column): Likewise.
2556 * remote.c (start_thread): Likewise.
2557 * solib-aix.c (library_list_start_library): Likewise.
2558 (library_list_start_list): Likewise.
2559 * solib-svr4.c (library_list_start_library): Likewise.
2560 (svr4_library_list_start_list): Likewise.
2561 * solib-target.c (library_list_start_segment): Likewise.
2562 (library_list_start_section): Likewise.
2563 (library_list_start_library): Likewise.
2564 (library_list_start_list): Likewise.
2565 * tracepoint.c (traceframe_info_start_memory): Likewise.
2566 (traceframe_info_start_tvar): Likewise.
2567 * xml-syscall.c (syscall_start_syscall): Likewise.
2568 * xml-tdesc.c (tdesc_start_target): Likewise.
2569 (tdesc_start_feature): Likewise.
2570 (tdesc_start_reg): Likewise.
2571 (tdesc_start_union): Likewise.
2572 (tdesc_start_struct): Likewise.
2573 (tdesc_start_flags): Likewise.
2574 (tdesc_start_enum): Likewise.
2575 (tdesc_start_field): Likewise.
2576 (tdesc_start_enum_value): Likewise.
2577 (tdesc_start_vector): Likewise.
2578
2579 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
2580
2581 * extension.h (struct xmethod_worker) <clone>: Remove.
2582 * python/py-xmethods.c (struct python_xmethod_worker) <clone>:
2583 Remove.
2584 (python_xmethod_worker::clone): Remove.
2585 * valops.c (find_overload_match): Use std::move instead of
2586 clone.
2587
2588 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
2589
2590 * extension-priv.h (enum ext_lang_rc): Remove, move to extension.h.
2591 (struct extension_language_ops) <clone_xmethod_worker_data>: Remove.
2592 <free_xmethod_worker_data>: Remove.
2593 <get_matching_xmethod_workers>: Chance VEC to std::vector.
2594 <get_xmethod_arg_types>: Remove.
2595 <get_xmethod_result_type>: Remove.
2596 <invoke_xmethod>: Remove.
2597 * extension.c (new_xmethod_worker): Remove.
2598 (clone_xmethod_worker): Remove.
2599 (get_matching_xmethod_workers): Return void, pass std::vector by
2600 pointer.
2601 (get_xmethod_arg_types): Rename to...
2602 (xmethod_worker::get_arg_types): ... this, and adjust.
2603 (get_xmethod_result_type): Rename to...
2604 (xmethod_worker::get_result_type): ... this, and adjust.
2605 (invoke_xmethod): Remove.
2606 (free_xmethod_worker): Remove.
2607 (free_xmethod_worker_vec): Remove.
2608 * extension.h (enum ext_lang_rc): Move here from
2609 extension-priv.h.
2610 (struct xmethod_worker): Add constructor and destructor.
2611 <data>: Remove.
2612 <value>: Remove.
2613 <invoke, clone, do_get_result_type, do_get_arg_types>: New
2614 virtual pure methods.
2615 <get_arg_types, get_result_type>: New methods.
2616 (xmethod_worker_ptr): Remove typedef.
2617 (DEF_VEC_P (xmethod_worker_ptr)): Remove.
2618 (xmethod_worker_vec): Remove typedef.
2619 (xmethod_worker_up): New typedef.
2620 (invoke_xmethod): Remove.
2621 (clone_xmethod_worker): Remove.
2622 (free_xmethod_worker): Remove.
2623 (free_xmethod_worker_vec): Remove.
2624 (get_xmethod_arg_types): Remove.
2625 (get_xmethod_result_type): Remove.
2626 * valops.c (find_method_list): Use std::vector, don't use
2627 intermediate vector.
2628 (value_find_oload_method_list): Use std::vector.
2629 (find_overload_match): Use std::vector.
2630 (find_oload_champ): Use std::vector.
2631 * value.c (value_free): Use operator delete.
2632 (value_of_xmethod): Rename to...
2633 (value_from_xmethod): ... this. Don't assign
2634 xmethod_worker::value, take rvalue-reference.
2635 (result_type_of_xmethod): Adjust.
2636 (call_xmethod): Adjust.
2637 * value.h: Include extension.h.
2638 (struct xmethod_worker): Don't forward-declare.
2639 (value_of_xmethod): Rename to...
2640 (value_from_xmethod): ... this, take rvalue-reference.
2641 * python/py-xmethods.c (struct gdbpy_worker_data): Rename to...
2642 (struct python_xmethod_worker): ... this, add constructor and
2643 destructor.
2644 <invoke, clone, do_get_arg_types, do_get_result_type>: Implement.
2645 (gdbpy_free_xmethod_worker_data): Rename to...
2646 (python_xmethod_worker::~python_xmethod_worker): ... this and
2647 adjust.
2648 (gdbpy_clone_xmethod_worker_data): Rename to...
2649 (python_xmethod_worker::clone): ... this and adjust.
2650 (gdbpy_get_matching_xmethod_workers): Use std::vector, don't use
2651 temporary vector.
2652 (gdbpy_get_xmethod_arg_types): Rename to...
2653 (python_xmethod_worker::do_get_arg_types): ... this and adjust.
2654 (gdbpy_get_xmethod_result_type): Rename to...
2655 (python_xmethod_worker::do_get_result_type): ... this and
2656 adjust.
2657 (gdbpy_invoke_xmethod): Rename to...
2658 (python_xmethod_worker::invoke): ... this and adjust.
2659 (new_python_xmethod_worker): Rename to...
2660 (python_xmethod_worker::python_xmethod_worker): ... this and
2661 adjust.
2662 * python/python-internal.h (gdbpy_clone_xmethod_worker_data):
2663 Remove.
2664 (gdbpy_free_xmethod_worker_data): Remove.
2665 (gdbpy_get_matching_xmethod_workers): Use std::vector.
2666 (gdbpy_get_xmethod_arg_types): Remove.
2667 (gdbpy_get_xmethod_result_type): Remove.
2668 (gdbpy_invoke_xmethod): Remove.
2669 * python/python.c (python_extension_ops): Remove obsolete
2670 callbacks.
2671
2672 2018-01-05 Pedro Alves <palves@redhat.com>
2673
2674 PR gdb/18653
2675 * common/signals-state-save-restore.c
2676 (save_original_signals_state): New parameter 'quiet'. Warn if we
2677 find a custom handler preinstalled, instead of internal erroring.
2678 But only warn if !quiet.
2679 * common/signals-state-save-restore.h
2680 (save_original_signals_state): New parameter 'quiet'.
2681 * main.c (captured_main_1): Move save_original_signals_state call
2682 after option handling, and pass QUIET.
2683
2684 2018-01-05 Pedro Alves <palves@redhat.com>
2685
2686 * spu-tdep.c (spu_catch_start): Pass
2687 symbol_name_match_type::SEARCH_NAME to block_lookup_symbol.
2688
2689 2018-01-05 Pedro Alves <palves@redhat.com>
2690
2691 PR gdb/22670
2692 * ada-lang.c (literal_symbol_name_matcher): New function.
2693 (ada_get_symbol_name_matcher): Use it for
2694 symbol_name_match_type::SEARCH_NAME.
2695 * block.c (block_lookup_symbol): New parameter 'match_type'. Pass
2696 it down instead of assuming symbol_name_match_type::FULL.
2697 * block.h (block_lookup_symbol): New parameter 'match_type'.
2698 * c-valprint.c (print_unpacked_pointer): Use
2699 lookup_symbol_search_name instead of lookup_symbol.
2700 * compile/compile-object-load.c (get_out_value_type): Pass down
2701 symbol_name_match_type::SEARCH_NAME.
2702 * cp-namespace.c (cp_basic_lookup_symbol): Pass down
2703 symbol_name_match_type::FULL.
2704 * cp-support.c (cp_get_symbol_name_matcher): Handle
2705 symbol_name_match_type::SEARCH_NAME.
2706 * infrun.c (insert_exception_resume_breakpoint): Use
2707 lookup_symbol_search_name.
2708 * p-valprint.c (pascal_val_print): Use lookup_symbol_search_name.
2709 * psymtab.c (maintenance_check_psymtabs): Use
2710 symbol_name_match_type::SEARCH_NAME and SYMBOL_SEARCH_NAME.
2711 * stack.c (print_frame_args): Use lookup_symbol_search_name and
2712 SYMBOL_SEARCH_NAME.
2713 * symtab.c (lookup_local_symbol): Don't demangle the lookup name
2714 if symbol_name_match_type::SEARCH_NAME.
2715 (lookup_symbol_in_language): Pass down
2716 symbol_name_match_type::FULL.
2717 (lookup_symbol_search_name): New.
2718 (lookup_language_this): Pass down
2719 symbol_name_match_type::SEARCH_NAME.
2720 (lookup_symbol_aux, lookup_local_symbol): New parameter
2721 'match_type'. Pass it down.
2722 * symtab.h (symbol_name_match_type::SEARCH_NAME): New enumerator.
2723 (lookup_symbol_search_name): New declaration.
2724 (lookup_symbol_in_block): New 'match_type' parameter.
2725
2726 2018-01-05 Pedro Alves <palves@redhat.com>
2727
2728 PR gdb/22670
2729 * ada-lang.c (ada_lookup_encoded_symbol): Reimplement in terms of
2730 ada_lookup_symbol.
2731 (ada_lookup_symbol): Reimplement in terms of
2732 ada_lookup_symbol_list, bits factored out from
2733 ada_lookup_encoded_symbol.
2734
2735 2018-01-05 Joel Brobecker <brobecker@adacore.com>
2736
2737 * ada-exp.y (write_object_renaming): When subscripting an array
2738 using a symbol as the index, pass the block in call to
2739 ada_lookup_encoded_symbol when looking that symbol up.
2740
2741 2018-01-05 Jerome Guitton <guitton@adacore.com>
2742
2743 * ada-lang.c (ada_array_length): Use ada_index_type instead of
2744 TYPE_INDEX_TYPE.
2745
2746 2018-01-05 Joel Brobecker <brobecker@adacore.com>
2747
2748 * ada-lang.c (ada_to_fixed_value_create): Add handling of
2749 the case where VALUE_LVAL (val0) is not lval_memory.
2750
2751 2018-01-05 Xavier Roirand <roirand@adacore.com>
2752
2753 * ada-valprint.c (print_optional_low_bound): Handle
2754 character-indexed array printing like boolean-indexed array
2755 printing.
2756
2757 2018-01-05 Joel Brobecker <brobecker@adacore.com>
2758
2759 * NEWS: Create a new section for the next release branch.
2760 Rename the section of the current branch, now that it has
2761 been cut.
2762
2763 2018-01-05 Joel Brobecker <brobecker@adacore.com>
2764
2765 GDB 8.1 branch created (5219ac6237c272b938c28517bf371429260c71e7):
2766 * version.in: Bump version to 8.1.50.DATE-git.
2767
2768 2018-01-03 Xavier Roirand <roirand@adacore.com>
2769
2770 * ada-lang.h (ada_exception_catchpoint_kind) <ada_catch_handlers>:
2771 Add field.
2772 * ada-lang.c (struct exception_support_info) <catch_handlers_sym>:
2773 Add field.
2774 (default_exception_support_info) <catch_handlers_sym>: Add field.
2775 (exception_support_info_fallback) <catch_handlers_sym>: Add field.
2776 (ada_exception_name_addr_1): Add "catch handlers" handling.
2777 (ada_exception_catchpoint_cond_string) <ex>: New parameter.
2778 Update all callers.
2779 (create_excep_cond_exprs) <ex>: Add parameter.
2780 (re_set_exception): Update create_excep_cond_exprs call.
2781 (print_it_exception, print_one_exception, print_mention_exception)
2782 (print_recreate_exception): Add "catch handler" handling.
2783 (allocate_location_catch_handlers, re_set_catch_handlers)
2784 (check_status_catch_handlers, print_it_catch_handlers)
2785 (print_one_catch_handlers, print_mention_catch_handlers)
2786 (print_recreate_catch_handlers): New function.
2787 (catch_handlers_breakpoint_ops): New variable.
2788 (catch_ada_exception_command_split) <is_catch_handlers_cmd>:
2789 Add parameter. Add "catch handler" handling.
2790 (ada_exception_sym_name, ada_exception_breakpoint_ops):
2791 Add "catch handler" handling.
2792 (ada_exception_catchpoint_cond_string): Add "catch handler"
2793 handling.
2794 (create_ada_exception_catchpoint): Update create_excep_cond_exprs
2795 call.
2796 (catch_ada_handlers_command): New function.
2797 (initialize_ada_catchpoint_ops): Initialize "catch handlers"
2798 operations structure.
2799 (_initialize_ada_language): Add "catch handlers" command entry.
2800 * NEWS: Document "catch handlers" feature.
2801
2802 2018-01-02 Joel Brobecker <brobecker@adacore.com>
2803
2804 * ada-lang.c (ada_value_slice_from_ptr): Take array stride into
2805 account when creating the array type of the slice.
2806 (ada_value_slice): Likewise.
2807
2808 2018-01-02 Joel Brobecker <brobecker@adacore.com>
2809
2810 * gdbtypes.h (enum dynamic_prop_node_kind) <DYN_PROP_BYTE_STRIDE>:
2811 New enum value.
2812 (create_array_type_with_stride): Add byte_stride_prop parameter.
2813 * gdbtypes.c (create_array_type_with_stride) <byte_stride_prop>:
2814 New parameter. Update all callers in this file.
2815 (array_type_has_dynamic_stride): New function.
2816 (is_dynamic_type_internal, resolve_dynamic_array): Add handling
2817 of arrays with dynamic byte strides.
2818 * dwarf2read.c (read_array_type): Add support for dynamic
2819 DW_AT_byte_stride attributes.
2820
2821 2018-01-02 Joel Brobecker <brobecker@adacore.com>
2822
2823 * dwarf2read.c (read_unspecified_type): Treat
2824 DW_TAG_enumeration_type DIEs from Ada units as stubs.
2825
2826 2018-01-01 Joel Brobecker <brobecker@adacore.com>
2827
2828 Update copyright year range in all GDB files.
2829
2830 2018-01-01 Joel Brobecker <brobecker@adacore.com>
2831
2832 * copyright.py (BY_HAND): Remove gdb/testsuite/gdb.base/step-line.inp
2833 and gdb/testsuite/gdb.base/step-line.c.
2834
2835 2018-01-01 Joel Brobecker <brobecker@adacore.com>
2836
2837 * copyright.py (main): Dump the contents of
2838 MULTIPLE_COPYRIGHT_HEADERS (separately) from BY_HAND,
2839 even if BY_HAND is empty.
2840
2841 2018-01-01 Joel Brobecker <brobecker@adacore.com>
2842
2843 * top.c (print_gdb_version): Update Copyright year in version
2844 message.
2845
2846 2018-01-01 Joel Brobecker <brobecker@adacore.com>
2847
2848 * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2017.
2849
2850 For older changes see ChangeLog-2017.
2851 \f
2852 Local Variables:
2853 mode: change-log
2854 left-margin: 8
2855 fill-column: 74
2856 version-control: never
2857 coding: utf-8
2858 End:
This page took 0.120816 seconds and 4 git commands to generate.