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