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