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