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