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