Revert "Add support for the readnever concept"
[external/binutils.git] / gdb / ChangeLog
1 2017-12-01  Joel Brobecker  <brobecker@adacore.com>
2
3         * ada-lang.c (symbol_list_obstack): Delete.
4         (resolve_subexp): Make sure "candidates" gets xfree'ed.
5         (ada_lookup_symbol_list_worker): Remove the limitation that
6         the result is only good until the next call, now making it
7         the responsibility of the caller to free the result when no
8         longer needed.  Adjust the function's intro comment accordingly.
9         (ada_lookup_symbol_list): Adjust the function's intro comment.
10         (ada_iterate_over_symbols): Make sure "results" gets xfree'ed.
11         (ada_lookup_encoded_symbol, get_var_value): Likewise.
12         (_initialize_ada_language): Remove symbol_list_obstack
13         initialization.
14         * ada-exp.y (block_lookup): Make sure "syms" gets xfree'ed.
15         (write_var_or_type, write_name_assoc): Likewise.
16
17 2017-12-01  Tom Tromey  <tom@tromey.com>
18
19         * Makefile.in (all_deps_files): New variable.
20         Include .Po files using all_deps_files.
21
22 2017-12-01  Joel Brobecker  <brobecker@adacore.com>
23
24         * MAINTAINERS: Update list of maintainers, moving those who
25         stepped down or became inactive to the "Past Maintainers"
26         section.
27
28 2017-11-30  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
29
30         * configure.ac Don't check for sys/fault.h, sys/syscall.h,
31         sys/proc.h.
32         (NEW_PROC_API): Remove.
33         (prsysent_t, pr_sigset_t, pr_sigaction64_t, pr_siginfo64_t):
34         Likewise.
35         * common/common.m4 (GDB_AC_COMMON): Don't check for sys/syscall.h.
36         * configure: Regenerate.
37         * config.in: Regenerate.
38         * gdbserver/configure: Regenerate.
39         * gdbserver/config.in: Regenerate.
40
41         * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Remove
42         NEW_PROC_API test.
43         * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Likewise.
44
45         * linux-btrace.c: Remove HAVE_SYS_SYSCALL_H test.
46
47         * proc-api.c: Remove !NEW_PROC_API support.
48         Remove HAVE_SYS_PROC_H and HAVE_SYS_USER_H tests.
49         Remove tests for macros always defined on Solaris.
50         * proc-events.c: Remove !NEW_PROC_API support.
51         Remove Remove HAVE_SYS_SYSCALL_H, HAVE_SYS_PROC_H and
52         HAVE_SYS_USER_H tests.
53         (init_syscall_table): Remove non-Solaris syscalls.
54         Remove tests for syscalls present on all Solaris versions.
55         Add missing Solaris 10+ syscalls.
56         (signal_table): Remove non-Solaris signals.
57         Remove tests for signals present on all Solaris versions.
58         (fault_table): Remove non-Solaris faults.
59         Remove tests for faults present on all Solaris versions.
60         * proc-flags.c: Remove !NEW_PROC_API support.
61         (pr_flag_table): Remove non-Solaris and pre-Solaris 7 comments.
62         Remove non-Solaris flags.
63         * proc-why.c: Remove !NEW_PROC_API support.
64         (pr_why_table): Remove meaningless comments.
65         Remove tests for reasons present on all Solaris versions.
66         Remove OSF/1 cases.
67         (proc_prettyfprint_why): Likewise.
68
69         * procfs.c: Remove !NEW_PROC_API and DYNAMIC_SYSCALLS support.
70         Remove HAVE_SYS_FAULT_H and HAVE_SYS_SYSCALL_H tests.
71         Remove WA_READ test, IRIX watchpoint support.
72         (gdb_sigset_t, gdb_sigaction_t, gdb_siginfo_t): Replace by base
73         types.  Change users.
74         (gdb_praddset, gdb_prdelset, gdb_premptysysset, gdb_praddsysset)
75         (gdb_prdelset, gdb_pr_issyssetmember): Replace by base macros.
76         Change callers.
77         Remove CTL_PROC_NAME_FMT tests.
78         (gdb_prstatus_t, gdb_lwpstatus_t): Replace by base types.  Change
79         users.
80         (sysset_t_size): Remove.  Use sizeof (sysset_t) in callers.
81         Remove PROCFS_DONT_PIOCSSIG_CURSIG support.
82         (proc_modify_flag): Replace GDBRESET by PCUNSET.
83         Remove PR_ASYNC, PR_KLC tests.
84         (proc_unset_inherit_on_fork): Remove PR_ASYNC test.
85         (proc_parent_pid): Remove PCWATCH etc. tests.
86         (proc_set_watchpoint): Remove !PCWATCH && !PIOCSWATCH support.
87         Remove PCAGENT test.
88         (proc_get_nthreads) [PIOCNTHR && PIOCTLIST]: Remove.
89         Remove SYS_lwpcreate || SYS_lwp_create test.
90         (proc_get_current_thread): Likewise.
91         [PIOCNTHR && PIOCTLIST]: Remove.
92         [PIOCLSTATUS]: Remove.
93         (procfs_debug_inferior): Remove non-Solaris cases, conditionals.
94         [PRFS_STOPEXEC]: Remove.
95         (syscall_is_lwp_exit): Remove non-Solaris cases, conditionals.
96         (syscall_is_exit): Likewise.
97         (syscall_is_exec): Likewise.
98         (syscall_is_lwp_create): Likewise.
99         Remove SYS_syssgi support.
100         (procfs_wait): Remove PR_ASYNC, !PIOCSSPCACT tests.
101         [SYS_syssgi]: Remove.
102         Remove non-Solaris cases, conditionals.
103         (unconditionally_kill_inferior) [PROCFS_NEED_PIOCSSIG_FOR_KILL]:
104         Remove.
105         (procfs_init_inferior) [SYS_syssgi]: Remove.
106         (procfs_set_exec_trap) [PRFS_STOPEXEC]: Remove.
107         (procfs_inferior_created) [SYS_syssgi]: Remove.
108         (procfs_set_watchpoint): Remove !AIX5 test.
109         (procfs_stopped_by_watchpoint): Remove FLTWATCH test, FLTKWATCH
110         case.
111         (mappingflags) [MA_PHYS]: Remove.
112         (info_mappings_callback): Remove PCAGENT test.
113         Remove PIOCOPENLWP || PCAGENT test.
114
115 2017-11-30  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
116
117         * sol-thread.c (info_solthreads): Constify args.
118         Cast args to void *.
119
120 2017-11-29  John Baldwin  <jhb@FreeBSD.org>
121
122         * target-float.c [HAVE_LIBMPFR]: Define MPFR_USE_INTMAX_T.
123
124 2017-11-29  Joel Brobecker  <brobecker@adacore.com>
125
126         * ada-lang.c (to_fixed_range_type): Make sure that the size
127         of the range type being returned is the same as the size
128         of the range type being fixed.
129
130 2017-11-29  Pedro Alves  <palves@redhat.com>
131
132         PR c++/19436
133         * NEWS: Mention setting breakpoints on functions with C++ ABI
134         tags.
135         * completer.h (completion_match_for_lcd) <match,
136         mark_ignored_range>: New methods.
137         <finish>: Consider ignored ranges.
138         <clear>: Clear ignored ranges.
139         <m_ignored_ranges, m_finished_storage>: New fields.
140         * cp-support.c (cp_search_name_hash): Ignore ABI tags.
141         (cp_symbol_name_matches_1, cp_fq_symbol_name_matches): Pass the
142         completion_match_for_lcd pointer to strncmp_iw_with_mode.
143         (test_cp_symbol_name_cmp): Add [abi:...] tags unit tests.
144         * language.c (default_symbol_name_matcher): Pass the
145         completion_match_for_lcd pointer to strncmp_iw_with_mode.
146         * linespec.c (linespec_lexer_lex_string): Don't tokenize ABI tags.
147         * utils.c (skip_abi_tag): New function.
148         (strncmp_iw_with_mode): Add completion_match_for_lcd parameter.
149         Handle ABI tags.
150         * utils.h (strncmp_iw_with_mode): Add completion_match_for_lcd
151         parameter.
152
153 2017-11-29  Pedro Alves  <palves@redhat.com>
154
155         PR c++/19436
156         * NEWS: Mention setting breakpoints on functions with C++ ABI
157         tags.
158         * completer.h (completion_match_for_lcd) <match,
159         mark_ignored_range>: New methods.
160         <finish>: Consider ignored ranges.
161         <clear>: Clear ignored ranges.
162         <m_ignored_ranges, m_finished_storage>: New fields.
163         * cp-support.c (cp_search_name_hash): Ignore ABI tags.
164         (cp_symbol_name_matches_1, cp_fq_symbol_name_matches): Pass the
165         completion_match_for_lcd pointer to strncmp_iw_with_mode.
166         (test_cp_symbol_name_cmp): Add [abi:...] tags unit tests.
167         * language.c (default_symbol_name_matcher): Pass the
168         completion_match_for_lcd pointer to strncmp_iw_with_mode.
169         * linespec.c (linespec_lexer_lex_string): Don't tokenize ABI tags.
170         * utils.c (skip_abi_tag): New function.
171         (strncmp_iw_with_mode): Add completion_match_for_lcd parameter.
172         Handle ABI tags.
173         * utils.h (strncmp_iw_with_mode): Add completion_match_for_lcd
174         parameter.
175
176 2017-11-29  Pedro Alves  <palves@redhat.com>
177
178         * NEWS: Mention that breakpoints on C++ functions are now set on
179         on all namespaces/classes by default, and mention "break
180         -qualified".
181         * ax-gdb.c (agent_command_1): Adjust to pass a
182         symbol_name_match_type to new_linespec_location.
183         * breakpoint.c (parse_breakpoint_sals): Adjust to
184         get_linespec_location's return type change.
185         (strace_marker_create_sals_from_location): Adjust to pass a
186         symbol_name_match_type to new_linespec_location.
187         (strace_marker_decode_location): Adjust to get_linespec_location's
188         return type change.
189         (strace_command): Adjust to pass a symbol_name_match_type to
190         new_linespec_location.
191         (LOCATION_HELP_STRING): Add paragraph about wildmatching, and
192         mention "-qualified".
193         * c-lang.c (cplus_language_defn): Install cp_search_name_hash.
194         * completer.c (explicit_location_match_type::MATCH_QUALIFIED): New
195         enumerator.
196         (complete_address_and_linespec_locations): New parameter
197         'match_type'.  Pass it down.
198         (explicit_options): Add "-qualified".
199         (collect_explicit_location_matches): Pass the requested match type
200         to the linespec completers.  Handle MATCH_QUALIFIED.
201         (location_completer): Handle "-qualified" combined with linespecs.
202         * cp-support.c (cp_search_name_hash): New.
203         (cp_symbol_name_matches_1): Implement wild matching for C++.
204         (cp_fq_symbol_name_matches): Reimplement.
205         (cp_get_symbol_name_matcher): Return different matchers depending
206         on the lookup name's match type.
207         (selftests::test_cp_symbol_name_matches): Add wild matching tests.
208         * cp-support.h (cp_search_name_hash): New declaration.
209         * dwarf2read.c
210         (selftests::dw2_expand_symtabs_matching::test_symbols): Add
211         symbols.
212         (test_dw2_expand_symtabs_matching_symbol): Add wild matching
213         tests.
214         * guile/scm-breakpoint.c (gdbscm_register_breakpoint_x): Adjust to
215         pass a symbol_name_match_type to new_linespec_location.
216         * linespec.c (linespec_parse_basic): Lookup function symbols using
217         the parser's symbol name match type.
218         (convert_explicit_location_to_linespec): New
219         symbol_name_match_type parameter.  Pass it down to
220         find_linespec_symbols.
221         (convert_explicit_location_to_sals): Pass the location's name
222         match type to convert_explicit_location_to_linespec.
223         (parse_linespec): New match_type parameter.  Save it in the
224         parser.
225         (linespec_parser_new): Default to symbol_name_match_type::WILD.
226         (linespec_complete_function): New symbol_name_match_type
227         parameter.  Use it.
228         (complete_linespec_component): Pass down the parser's recorded
229         name match type.
230         (linespec_complete_label): New symbol_name_match_type parameter.
231         Use it.
232         (linespec_complete): New symbol_name_match_type parameter.  Save
233         it in the parser and pass it down.  Adjust to
234         get_linespec_location's prototype change.
235         (find_function_symbols, find_linespec_symbols): New
236         symbol_name_match_type parameter.  Pass it down instead of
237         assuming symbol_name_match_type::WILD.
238         * linespec.h (linespec_complete, linespec_complete_function)
239         (linespec_complete_label): New symbol_name_match_type parameter.
240         * location.c (event_location::linespec_location): Now a struct
241         linespec_location.
242         (EL_LINESPEC): Adjust.
243         (initialize_explicit_location): Default to
244         symbol_name_match_type::WILD.
245         (new_linespec_location): New symbol_name_match_type parameter.
246         Record it in the location.
247         (get_linespec_location): Now returns a struct linespec_location.
248         (new_explicit_location): Also copy func_name_match_type.
249         (explicit_to_string_internal)
250         (string_to_explicit_location): Handle "-qualified".
251         (copy_event_location): Adjust to LINESPEC_LOCATION type change.
252         Copy symbol_name_match_type fields.
253         (event_location_deleter::operator()): Adjust to LINESPEC_LOCATION
254         type change.
255         (event_location_to_string): Adjust to LINESPEC_LOCATION type
256         change.  Handle "-qualfied".
257         (string_to_explicit_location): Handle "-qualified".
258         (string_to_event_location_basic): New symbol_name_match_type
259         parameter.  Pass it down.
260         (string_to_event_location): Handle "-qualified".
261         * location.h (struct linespec_location): New.
262         (explicit_location::func_name_match_type): New field.
263         (new_linespec_location): Now returns a const linespec_location *.
264         (string_to_event_location_basic): New symbol_name_match_type
265         parameter.
266         (explicit_completion_info::saw_explicit_location_option): New
267         field.
268         * mi/mi-cmd-break.c (mi_cmd_break_insert_1): Adjust to pass a
269         symbol_name_match_type to new_linespec_location.
270         * python/py-breakpoint.c (bppy_init): Likewise.
271         * python/python.c (gdbpy_decode_line): Likewise.
272
273 2017-11-29  Pedro Alves  <palves@redhat.com>
274
275         * ada-lang.c (ada_lookup_name_info::matches): Change type of
276         parameter from completion_match to completion_match_result.
277         Adjust.
278         (do_wild_match, do_full_match, ada_symbol_name_matches): Likewise.
279         * completer.c (completion_tracker::maybe_add_completion): Add
280         match_for_lcd parameter and use it.
281         (completion_tracker::add_completion): Likewise.
282         * completer.h (class completion_match_for_lcd): New class.
283         (completion_match_result::match_for_lcd): New field.
284         (completion_match_result::set_match): New method.
285         (completion_tracker): Add comments.
286         (completion_tracker::add_completion): Add match_for_lcd parameter.
287         (completion_tracker::reset_completion_match_result): Reset
288         match_for_lcd too.
289         (completion_tracker::maybe_add_completion): Add match_for_lcd
290         parameter.
291         (completion_tracker::m_lowest_common_denominator_unique): Extend
292         comments.
293         * cp-support.c (cp_symbol_name_matches_1)
294         (cp_fq_symbol_name_matches): Change type of parameter from
295         completion_match to completion_match_result.  Adjust.
296         * language.c (default_symbol_name_matcher): Change type of
297         parameter from completion_match to completion_match_result.
298         Adjust.
299         * language.h (completion_match_for_lcd): Forward declare.
300         (default_symbol_name_matcher): Change type of parameter from
301         completion_match to completion_match_result.
302         * symtab.c (compare_symbol_name): Adjust.
303         (completion_list_add_name): Pass the match_for_lcd to the tracker.
304         * symtab.h (ada_lookup_name_info::matches): Change type of
305         parameter from completion_match to completion_match_result.
306         (symbol_name_matcher_ftype): Likewise, and update comments.
307
308 2017-11-29  Pedro Alves  <palves@redhat.com>
309
310         * linespec.c (minsym_found, add_minsym): Use msymbol_is_function.
311         * minsyms.c (msymbol_is_text): Delete.
312         (msymbol_is_function): New function.
313         * minsyms.h (msymbol_is_text): Delete.
314         (msymbol_is_function): New declaration.
315         * symtab.c (find_function_alias_target): Use msymbol_is_function.
316
317 2017-11-29  Tom Tromey  <tom@tromey.com>
318
319         * Makefile.in (distclean): Handle the case where rmdir fails.
320
321 2017-11-29  Tom Tromey  <tom@tromey.com>
322
323         * symfile.c (_initialize_symfile): Update usage text for
324         add-symbol-file, symbol-file, load.
325
326 2017-11-29  Tom Tromey  <tom@tromey.com>
327
328         * symfile.c (add_symbol_file_command): Error if some arguments to
329         -s are missing.  Change unrecognized-argument error message.
330         (_initialize_symfile): Fix usage text for add-symbol-file.
331
332 2017-11-27  Tom Tromey  <tom@tromey.com>
333
334         * Makefile.in (REMOTE_OBS): Remove.
335         (SFILES): Remove remote sources.
336         (COMMON_SFILES): Add remote sources.
337         (ALLDEPFILES): Remove dcache.c.
338
339 2017-11-27  Tom Tromey  <tom@tromey.com>
340
341         * Makefile.in (SUBDIR_TARGET_SRCS, SUBDIR_TARGET_OBS): New
342         variables.
343         (SFILES): Use SUBDIR_TARGET_SRCS.
344         (COMMON_OBS): Use SUBDIR_TARGET_OBS.  Remove waitstatus.o.
345         (CONFIG_SRC_SUBDIR): Add target.
346         (%.o): Remove target rule.
347
348 2017-11-27  Tom Tromey  <tom@tromey.com>
349
350         * Makefile.in (COMMON_OBS): Remove filename-seen-cache.o,
351         registry.o, thread-fsm.o, debug.o.
352         (COMMON_SFILES): Add filename-seen-cache.c, registry.c,
353         thread-fsm.c, debug.c.
354
355 2017-11-27  Tom Tromey  <tom@tromey.com>
356
357         * Makefile.in (COMMON_SFILES): New.
358         (SFILES): Move some entries to COMMON_SFILES.
359         (COMMON_OBS): Use COMMON_SFILES.
360
361 2017-11-27  Tom Tromey  <tom@tromey.com>
362
363         * Makefile.in (YYFILES): Update comment.
364         (YYOBJ): Redefine.
365
366 2017-11-27  Tom Tromey  <tom@tromey.com>
367
368         * Makefile.in (SUBDIR_PYTHON_OBS): Redefine.
369         (CONFIG_SRC_SUBDIR): Add python.
370         (%.o): Remove python rule.
371         (python/%.o): New rule.
372         * configure: Rebuild.
373         * configure.ac (CONFIG_OBS): Refer to python/python.o
374
375 2017-11-27  Tom Tromey  <tom@tromey.com>
376
377         * configure: Rebuild.
378         * configure.ac (CONFIG_OBS): Refer to guile/guile.o.
379         * Makefile.in (SUBDIR_GUILE_OBS): Redefine.
380         (CONFIG_SRC_SUBDIR): Add guile.
381         (%.o): Remove guile rule.
382
383 2017-11-27  Tom Tromey  <tom@tromey.com>
384
385         * Makefile.in (SUBDIR_UNITTESTS_OBS): Redefine.
386         (%.o): Remove unittests rule.
387         (CONFIG_SRC_SUBDIR): Add unittests.
388
389 2017-11-27  Tom Tromey  <tom@tromey.com>
390
391         * Makefile.in (SUBDIR_TUI_OBS): Redefine.
392         (CONFIG_SRC_SUBDIR): Add tui.
393         (%.o): Remove tui rule.
394
395 2017-11-27  Tom Tromey  <tom@tromey.com>
396
397         * Makefile.in (SUBDIR_GCC_COMPILE_OBS): Redefine.
398         (%.o): Remove compile rule.
399         (CONFIG_SRC_SUBDIR): Add compile.
400
401 2017-11-27  Tom Tromey  <tom@tromey.com>
402
403         * Makefile.in (SUBDIR_MI_OBS): Redefine.
404         (%.o): Remove mi rule.
405         (CONFIG_SRC_SUBDIR): Add mi.
406         (COMMON_OBS): Use mi/mi-common.o
407
408 2017-11-27  Tom Tromey  <tom@tromey.com>
409
410         * Makefile.in (SUBDIR_CLI_OBS): Redefine.
411         (%.o): Remove cli rule.
412         (CONFIG_SRC_SUBDIR): Add cli.
413
414 2017-11-27  Tom Tromey  <tom@tromey.com>
415
416         * configure.ac (CONFIG_SRC_SUBDIR): Don't subst.
417         * configure: Rebuild.
418         * Makefile.in (CONFIG_SRC_SUBDIR): Redefine.
419         (CONFIG_DEP_SUBDIR): New variable.
420         (%.o): Add order-only dependency.
421         ($(CONFIG_DEP_SUBDIR)): New target.
422
423 2017-11-26  Dominik Czarnota  <dominik.b.czarnota@gmail.com>
424
425         PR gdb/21945
426         * findcmd.c (_initialize_mem_search): Update find command help
427         text.
428
429 2017-11-26  Simon Marchi  <simon.marchi@polymtl.ca>
430
431         * python/python.c (do_start_initialization): Change progname
432         type to gdb::unique_xmalloc_ptr.  Release the pointer when using
433         Python 2.
434
435 2017-11-26  Tom Tromey  <tom@tromey.com>
436
437         * common/format.h: Add include guards.
438
439 2017-11-26  Tom Tromey  <tom@tromey.com>
440
441         * nat/linux-personality.h (class
442         maybe_disable_address_space_randomization): New class.
443         (maybe_disable_address_space_randomization): Don't declare
444         function.
445         * nat/linux-personality.c (restore_personality)
446         (make_disable_asr_cleanup): Remove.
447         (maybe_disable_address_space_randomization): Now a constructor.
448         (~maybe_disable_address_space_randomization): New destructor.
449         * linux-nat.c (linux_nat_create_inferior): Update.
450
451 2017-11-26  Tom Tromey  <tom@tromey.com>
452
453         * gcore.c (write_gcore_file_1): Use gdb::unique_xmalloc_ptr.
454
455 2017-11-26  Ulrich Weigand  <uweigand@de.ibm.com>
456
457         * spu-tdep.c (spu_software_single_step): Access SPU_LSLR_REGNUM as
458         "cooked" register.  Access only first four bytes of branch target
459         registers.
460
461 2017-11-25  Sergio Durigan Junior  <sergiodj@redhat.com>
462
463         PR gdb/22491
464         * stap-probe.c (relocate_address): New function.
465         (stap_probe::get_relocated_address): Use 'relocate_address'.
466         (stap_probe::set_semaphore): Use 'relocate_address' and pass
467         'm_sem_addr'.
468         (stap_probe::clear_semaphore): Likewise.
469
470 2017-11-25  Pedro Alves  <palves@redhat.com>
471
472         * dictionary.c: Include "safe-ctype.h".
473         * minsyms.c: Include "safe-ctype.h".
474         * minsyms.c (SYMBOL_HASH_NEXT): Use TOLOWER instead of tolower.
475
476 2017-11-25   Pedro Alves  <palves@redhat.com>
477
478         * completer.c (complete_line_internal_1): Skip spaces until the
479         start of the command.
480
481 2017-11-24  Pedro Alves  <palves@redhat.com>
482
483         * cp-support.c (cp_symbol_name_matches_1): New, factored out from
484         cp_fq_symbol_name_matches.  Pass language_cplus to
485         strncmp_with_mode.
486         (cp_fq_symbol_name_matches): Call cp_symbol_name_matches_1.
487         (selftests::test_cp_symbol_name_cmp): New.
488         (_initialize_cp_support): Register "cp_symbol_name_matches"
489         selftests.
490         * language.c (default_symbol_name_matcher): Pass language_minimal
491         to strncmp_iw_with_mode.
492         * utils.c: Include "cp-support.h" and <algorithm>.
493         (valid_identifier_name_char, cp_skip_operator_token, skip_ws)
494         (cp_is_operator): New functions.
495         (strncmp_iw_with_mode): Use them.  Add language parameter.  Don't
496         skip whitespace in the symbol name when the lookup name doesn't
497         have spaces, and vice versa.
498         (strncmp_iw, strcmp_iw): Pass language to strncmp_iw_with_mode.
499         * utils.h (strncmp_iw_with_mode): Add language parameter.
500
501 2017-11-24  Joel Brobecker  <brobecker@adacore.com>
502
503         * ada-lang.c (ada_exception_message_1, ada_exception_message):
504         New functions.
505         (print_it_exception): If available, display the exception
506         message as well.
507         * NEWS: Document new feature.
508
509 2017-11-24  Ulrich Weigand  <uweigand@de.ibm.com>
510
511         * configure.nat <spu-linux>: Add fork-inferior.o to NATDEPFILES.
512
513 2017-11-24  Philipp Rudo  <prudo@linux.vnet.ibm.com>
514
515         * dtrace-probe.c (dtrace_probe::build_arg_exprs)
516         (dtrace_probe::is_enabled, dtrace_probe::enable)
517         (dtrace_probe::disable): Remove keyword 'struct' at for-range
518         variable
519         * probe.c (gen_ui_out_table_header_info)
520         (print_ui_out_not_applicables):  Remove keyword 'struct' at
521         for-range variable
522
523 2017-11-24  Alan Hayward  <alan.hayward@arm.com>
524
525         * configure.tgt: Add arch/aarch64.o
526
527 2017-11-24  Simon Marchi  <simon.marchi@polymtl.ca>
528
529         * common/common-utils.h: Include poison.h.
530         (xfree): Remove declaration, add definition with static_assert.
531         * common/common-utils.c (xfree): Remove.
532         * common/poison.h (IsMallocatable): Define.
533         (IsFreeable): Define.
534         (free): Delete for non-freeable types.
535         (xnew): New.
536         (XNEW): Undef and redefine.
537         (xcnew): New.
538         (XCNEW): Undef and redefine.
539         (xdelete): New.
540         (XDELETE): Undef and redefine.
541         (xnewvec): New.
542         (XNEWVEC): Undef and redefine.
543         (xcnewvec): New.
544         (XCNEWVEC): Undef and redefine.
545         (xresizevec): New.
546         (XRESIZEVEC): Undef and redefine.
547         (xdeletevec): New.
548         (XDELETEVEC): Undef and redefine.
549         (xnewvar): New.
550         (XNEWVAR): Undef and redefine.
551         (xcnewvar): New.
552         (XCNEWVAR): Undef and redefine.
553         (xresizevar): New.
554         (XRESIZEVAR): Undef and redefine.
555
556 2017-11-24  Simon Marchi  <simon.marchi@polymtl.ca>
557
558         * gdbthread.h (private_thread_info): Define structure type, add
559         virtual pure destructor.
560         (thread_info) <priv>: Change type to unique_ptr.
561         <private_dtor>: Remove.
562         * thread.c (add_thread_with_info): Adjust to use of unique_ptr.
563         (private_thread_info::~private_thread_info): Provide default
564         implementation.
565         (thread_info::~thread_info): Don't call private_dtor nor
566         manually free priv.
567         * aix-thread.c (private_thread_info): Rename to ...
568         (aix_thread_info): ... this.
569         (get_aix_thread_info): New.
570         (sync_threadlists): Adjust.
571         (iter_tid): Adjust.
572         (aix_thread_resume): Adjust.
573         (aix_thread_fetch_registers): Adjust.
574         (aix_thread_store_registers): Adjust.
575         (aix_thread_extra_thread_info): Adjust.
576         * darwin-nat.h (private_thread_info): Rename to ...
577         (darwin_thread_info): ... this.
578         (get_darwin_thread_info): New.
579         * darwin-nat.c (darwin_init_thread_list): Adjust.
580         (darwin_check_new_threads): Adjust.
581         (thread_info_from_private_thread_info): Adjust.
582         * linux-thread-db.c (private_thread_info): Rename to ...
583         (thread_db_thread_info): ... this, initialize fields.
584         (get_thread_db_thread_info): New.
585         <dying>: Change type to bool.
586         (update_thread_state): Adjust to type rename.
587         (record_thread): Adjust to type rename an use of unique_ptr.
588         (thread_db_pid_to_str): Likewise.
589         (thread_db_extra_thread_info): Likewise.
590         (thread_db_thread_handle_to_thread_info): Likewise.
591         (thread_db_get_thread_local_address): Likewise.
592         * nto-tdep.h (private_thread_info): Rename to ...
593         (nto_thread_info): ... this, initialize fields.
594         (get_nto_thread_info): New.
595         <name>: Change type to std::string.
596         * nto-tdep.c (nto_extra_thread_info): Adjust to type rename and
597         use of unique_ptr.
598         * nto-procfs.c (update_thread_private_data_name): Adjust to
599         std::string change, allocate nto_private_thread_info with new.
600         (update_thread_private_data): Adjust to unique_ptr.
601         * remote.c (private_thread_info): Rename to ...
602         (remote_thread_info): ... this, initialize data members with
603         default values.
604         <extra, name>: Change type to std::string.
605         <thread_handle>: Change type to non-pointer.
606         (free_private_thread_info): Remove.
607         (get_private_info_thread): Rename to...
608         (get_remote_thread_info): ... this, change return type, adjust to
609         use of unique_ptr, use remote_thread_info constructor.
610         (remote_add_thread): Adjust.
611         (get_private_info_ptid): Rename to...
612         (get_remote_thread_info): ...this, change return type.
613         (remote_thread_name): Use get_remote_thread_info, adjust to
614         change to std::string.
615         (struct thread_item) <~thread_item>: Remove.
616         <thread_handle>: Make non pointer.
617         (start_thread): Adjust to thread_item::thread_handle type
618         change.
619         (remote_update_thread_list): Adjust to type name change, move
620         strings from temporary to long-lived object instead of
621         duplicating.
622         (remote_threads_extra_info): Use get_remote_thread_info.
623         (process_initial_stop_replies): Likewise.
624         (resume_clear_thread_private_info): Likewise.
625         (remote_resume): Adjust to type name change.
626         (remote_commit_resume): Use get_remote_thread_info.
627         (process_stop_reply): Adjust to type name change.
628         (remote_stopped_by_sw_breakpoint): Use get_remote_thread_info.
629         (remote_stopped_by_hw_breakpoint): Likewise.
630         (remote_stopped_by_watchpoint): Likewise.
631         (remote_stopped_data_address): Likewise.
632         (remote_core_of_thread): Likewise.
633         (remote_thread_handle_to_thread_info): Use
634         get_private_info_thread, adjust to thread_handle field type
635         change.
636
637 2017-11-24  Simon Marchi  <simon.marchi@polymtl.ca>
638
639         * remote.c (struct thread_item): Add constructor, disable copy
640         construction and copy assignment, define default move
641         construction and move assignment.
642         <extra, name>: Change type to std::string.
643         <core>: Initialize.
644         <thread_handle>: Make non-pointer.
645         (thread_item_t): Remove typedef.
646         (DEF_VEC_O(thread_item_t)): Remove.
647         (threads_listing_context) <contains_thread>: New method.
648         <remove_thread>: New method.
649         <items>: Change type to std::vector.
650         (clear_threads_listing_context): Remove.
651         (threads_listing_context_remove): Remove.
652         (remote_newthread_step): Use thread_item constructor, adjust to
653         change to std::vector.
654         (start_thread): Use thread_item constructor, adjust to change to
655         std::vector.
656         (end_thread): Adjust to change to std::vector and std::string.
657         (remote_get_threads_with_qthreadinfo): Use thread_item
658         constructor, adjust to std::vector.
659         (remote_update_thread_list): Adjust to change to std::vector and
660         std::string, use threads_listing_context methods.
661         (remove_child_of_pending_fork): Adjust.
662         (remove_new_fork_children): Adjust.
663         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add rsp-low-selftests.c.
664         (SUBDIR_UNITTESTS_OBS): Add rsp-low-selftests.o.
665         * unittests/rsp-low-selftests.c: New file.
666         * common/rsp-low.h: Include common/byte-vector.h.
667         (hex2bin): New overload.
668         * common/rsp-low.c (hex2bin): New overload.
669
670 2017-11-24  Simon Marchi  <simon.marchi@ericsson.com>
671
672         * inferior.h (private_inferior): Define structure type, add
673         virtual pure destructor.
674         (inferior) <priv>: Change type to unique_ptr.
675         * inferior.c (private_inferior::~private_inferior): Provide
676         default implementation.
677         (inferior::~inferior): Don't free priv field.
678         (exit_inferior_1): Likewise.
679         * darwin-nat.h (struct darwin_exception_info): Initialize fields.
680         (darwin_exception_info): Remove typedef.
681         (DEF_VEC_O (darwin_thread_t)); Remove.
682         (private_inferior): Rename to ...
683         (darwin_private_inferior): ... this, extend private_inferior.
684         (get_darwin_inferior): New.
685         <threads>: Change type to std::vector of darwin_thread_t pointers.
686         * darwin-nat.c (darwin_check_new_threads): Adjust.
687         (find_inferior_task_it): Adjust.
688         (darwin_find_thread); Adjust.
689         (darwin_suspend_inferior): Adjust.
690         (darwin_resume_inferior): Adjust.
691         (darwin_find_new_inferior): Adjust.
692         (darwin_decode_notify_message): Adjust.
693         (darwin_send_reply): Adjust.
694         (darwin_resume_inferior_threads): Adjust.
695         (darwin_suspend_inferior_threads): Adjust.
696         (darwin_decode_message): Adjust.
697         (darwin_wait): Adjust.
698         (darwin_interrupt): Adjust.
699         (darwin_deallocate_threads): Adjust.
700         (darwin_mourn_inferior): Adjust, don't free private data.
701         (darwin_reply_to_all_pending_messages): Adjust.
702         (darwin_stop_inferior): Adjust.
703         (darwin_setup_exceptions): Adjust.
704         (darwin_kill_inferior): Adjust.
705         (darwin_setup_request_notification): Adjust.
706         (darwin_attach_pid): Adjust.
707         (darwin_init_thread_list): Adjust.
708         (darwin_setup_fake_stop_event): Adjust.
709         (darwin_attach): Adjust.
710         (darwin_detach): Adjust.
711         (darwin_xfer_partial): Adjust.
712         (set_enable_mach_exceptions): Adjust.
713         (darwin_pid_to_exec_file): Adjust.
714         (darwin_get_ada_task_ptid): Adjust.
715         * darwin-nat-info.c (get_task_from_args): Adjust.
716         (info_mach_ports_command): Adjust.
717         (info_mach_region_command): Adjust.
718         (info_mach_exceptions_command): Adjust.
719         * remote.c (private_inferior): Rename to ...
720         (remote_private_inferior): ... this, initialize fields.
721         (get_remote_inferior); New.
722         (remote_commit_resume): Use get_remote_inferior.
723         (check_pending_event_prevents_wildcard_vcont_callback): Likewise.
724
725 2017-11-24  Pedro Alves  <palves@redhat.com>
726
727         * NEWS: Mention linespecs and explicit locations, and completion
728         improvements.
729
730 2017-11-24  Yao Qi  <yao.qi@linaro.org>
731
732         * regcache.c (regcache::dump): Remove footnote_register_size.
733
734 2017-11-24  Yao Qi  <yao.qi@linaro.org>
735
736         * regcache.c (cooked_read_test): Add more test for readonly
737         regcache.
738
739 2017-11-24  Yao Qi  <yao.qi@linaro.org>
740
741         * gdbarch-selftests.c (test_target_has_registers): Move it to
742         target.c.
743         (test_target_has_stack): Likewise.
744         (test_target_has_memory): Likewise.
745         (test_target_prepare_to_store): Likewise.
746         (test_target_store_registers): Likewise.
747         (test_target_ops): Likewise.
748         * regcache.c: Include selftest-arch.h and gdbthread.h.
749         (target_ops_no_register): New class.
750         (test_target_fetch_registers): New.
751         (test_target_store_registers): New.
752         (test_target_xfer_partial): New.
753         (readwrite_regcache): New.
754         (cooked_read_test): New.
755         (_initialize_regcache): Register the test.
756         * target.c: (test_target_has_registers): Moved from
757         gdbarch-selftests.c.
758         (test_target_has_stack): Likewise.
759         (test_target_has_memory): Likewise.
760         (test_target_prepare_to_store): Likewise.
761         (test_target_store_registers): Likewise.
762         * target.h (test_target_ops): New class.
763
764 2017-11-24  Alan Hayward  <alan.hayward@arm.com>
765
766         * aarch64-tdep.c (_initialize_aarch64_tdep): Add target desc
767         selftest.
768
769 2017-11-24  Alan Hayward  <alan.hayward@arm.com>
770
771         * aarch64-tdep.c (_initialize_aarch64_tdep): Remove init.
772         * arch/aarch64.c (aarch64_create_target_description): Create
773         new target description.
774         * features/Makefile: Add new files.
775         * features/aarch64.c: Remove file.
776         * features/aarch64-core.c: New autogenerated file.
777         * features/aarch64-fpu.c: New autogenerated file.
778         * target-descriptions.c (maint_print_c_tdesc_cmd): Check for aarch64.
779
780 2017-11-24  Alan Hayward  <alan.hayward@arm.com>
781
782         * Makefile.in: Add new files.
783         * aarch64-linux-nat.c (aarch64_linux_read_description): Call
784         aarch64_read_description.
785         * aarch64-linux-tdep.c (aarch64_linux_core_read_description):
786         Call aarch64_read_description.
787         * aarch64-tdep.c (aarch64_read_description): New function.
788         (aarch64_gdbarch_init): Call aarch64_read_description.
789         * aarch64-tdep.h (aarch64_read_description): New function.
790         * arch/aarch64.c: New file.
791         * configure.tgt: Add new files.
792
793 2017-11-24  Yao Qi  <yao.qi@linaro.org>
794
795         * mi/mi-main.c (register_changed_p): Update.
796         * value.c (value_contents_bits_eq): Change return type.
797         (value_contents_eq): Likewise.
798         * value.h: Update comments.
799
800 2017-11-24  Yao Qi  <yao.qi@linaro.org>
801
802         * mi/mi-main.c (mi_cmd_data_list_changed_registers): Remove
803         local 'changed'.  Remove error.
804         (register_changed_p): Change return type to bool.
805
806 2017-11-24  Yao Qi  <yao.qi@linaro.org>
807
808         * arch/tic6x.c: New file.
809         * arch/tic6x.h: New file.
810         * features/Makefile (FEATURE_XMLFILES): Add tic6x-c6xp.xml,
811         tic6x-core.xml and tic6x-gp.xml.
812         * features/tic6x-c6xp.c: Generated.
813         * features/tic6x-core.c: Generated.
814         * features/tic6x-gp.c: Generated.
815         * target-descriptions.c (maint_print_c_tdesc_cmd): Match
816         "tic6x-".
817
818 2017-11-23  Simon Marchi  <simon.marchi@ericsson.com>
819
820         * mi/mi-main.c (list_available_thread_groups): Change map value
821         type to std::vector.
822
823 2017-11-23  Simon Marchi  <simon.marchi@ericsson.com>
824
825         * osdata.c (osdata_end_column, get_osdata): Remove std::move.
826
827 2017-11-23  Simon Marchi  <simon.marchi@ericsson.com>
828
829         * varobj.c (struct varobj_dynamic) <children_requested_>: Rename
830         back to...
831         <children_requested>: ... this.
832         (varobj_get_num_children, varobj_update): Adjust.
833
834 2017-11-23  Simon Marchi  <simon.marchi@ericsson.com>
835
836         * ada-varobj.c (ada_value_is_changeable_p): Change int to bool where applicable.
837         (ada_value_has_mutated): Likewise.
838         * c-varobj.c (varobj_is_anonymous_child): Likewise.
839         (c_is_path_expr_parent): Likewise.
840         * mi/mi-cmd-var.c (varobj_update_one): Likewise.
841         (mi_cmd_var_set_frozen): Likewise.
842         (mi_cmd_var_update_iter): Likewise.
843         (mi_cmd_var_update): Likewise.
844         * varobj.c (pretty_printing): Likewise.
845         (varobj_enable_pretty_printing): Likewise.
846         (struct varobj_root) <floating, is_valid>: Likewise.
847         (struct varobj_dynamic) <children_requested>: Likewise.
848         (delete_variable): Likewise.
849         (delete_variable_1): Likewise.
850         (install_variable): Likewise.
851         (update_type_if_necessary): Likewise.
852         (install_new_value): Likewise.
853         (value_of_root): Likewise.
854         (is_root_p): Likewise.
855         (varobj_create): Likewise.
856         (varobj_delete): Likewise.
857         (varobj_has_more): Likewise.
858         (varobj_set_frozen): Likewise.
859         (varobj_get_frozen): Likewise.
860         (install_dynamic_child): Likewise.
861         (dynamic_varobj_has_child_method): Likewise.
862         (update_dynamic_varobj_children): Likewise.
863         (varobj_get_num_children): Likewise.
864         (varobj_list_children): Likewise.
865         (is_path_expr_parent): Likewise.
866         (varobj_default_is_path_expr_parent): Likewise.
867         (varobj_is_dynamic_p): Likewise.
868         (varobj_set_value): Likewise.
869         (varobj_value_has_mutated): Likewise.
870         (varobj_update): Likewise.
871         (check_scope): Likewise.
872         (value_of_root_1): Likewise.
873         (varobj_value_get_print_value): Likewise.
874         (varobj_editable_p): Likewise.
875         (varobj_value_is_changeable_p): Likewise.
876         (varobj_floating_p): Likewise.
877         (varobj_default_value_is_changeable_p): Likewise.
878         (varobj_invalidate_iter): Likewise.
879         * varobj.h (struct varobj_update_result) <type_changed,
880         children_changed, changed, value_installed>: Likewise.
881         (struct varobj) <updated, frozen, not_fetched>: Likewise.
882         (struct lang_varobj_ops) <value_is_changeable_p,
883         value_has_mutated, is_path_expr_parent>: Likewise.
884         (varobj_delete): Likewise.
885         (varobj_set_frozen): Likewise.
886         (varobj_get_frozen): Likewise.
887         (varobj_set_value): Likewise.
888         (varobj_update): Likewise.
889         (varobj_editable_p): Likewise.
890         (varobj_floating_p): Likewise.
891         (varobj_has_more): Likewise.
892         (varobj_is_dynamic_p): Likewise.
893         (varobj_default_value_is_changeable_p): Likewise.
894         (varobj_value_is_changeable_p): Likewise.
895         (varobj_is_anonymous_child): Likewise.
896         (varobj_default_is_path_expr_parent): Likewise.
897
898 2017-11-22  Sergio Durigan Junior  <sergiodj@redhat.com>
899
900         * dtrace-probe.c (struct probe_ops dtrace_probe_ops): Delete.
901         (struct dtrace_probe_arg) <dtrace_probe_arg>: New constructor.
902         <type_str>: Convert to 'std::string'.
903         <expr>: Convert to 'expression_up'.
904         (dtrace_probe_arg_s): Delete type and VEC.
905         (dtrace_probe_enabler_s): Likewise.
906         (struct dtrace_probe): Replace by...
907         (class dtrace_static_probe_ops): ...this and...
908         (class dtrace_probe): ...this.
909         (dtrace_probe_is_linespec): Rename to...
910         (dtrace_static_probe_ops::is_linespec): ...this.  Adjust code
911         to reflect change.
912         (dtrace_process_dof_probe): Use 'std::vector' instead of VEC.
913         Adjust code.  Create new instance of 'dtrace_probe'.
914         (dtrace_build_arg_exprs): Rename to...
915         (dtrace_probe::build_arg_exprs): ...this.  Adjust code to
916         reflect change.
917         (dtrace_get_probes): Rename to...
918         (dtrace_static_probe_ops::get_probes): ...this.  Adjust code
919         to reflect change.
920         (dtrace_get_arg): Rename to...
921         (dtrace_probe::get_arg_by_number): ...this.  Adjust code to
922         reflect change.
923         (dtrace_probe_is_enabled): Rename to...
924         (dtrace_probe::is_enabled): ...this.  Adjust code to reflect
925         change.
926         (dtrace_get_probe_address): Rename to...
927         (dtrace_probe::get_relocated_address): ...this.  Adjust code
928         to reflect change.
929         (dtrace_get_probe_argument_count): Rename to...
930         (dtrace_probe::get_argument_count): ...this.  Adjust code to
931         reflect change.
932         (dtrace_can_evaluate_probe_arguments): Rename to...
933         (dtrace_probe::can_evaluate_arguments): ...this.  Adjust code
934         to reflect change.
935         (dtrace_evaluate_probe_argument): Rename to...
936         (dtrace_probe::evaluate_argument): ...this.  Adjust code to
937         reflect change.
938         (dtrace_compile_to_ax): Rename to...
939         (dtrace_probe::compile_to_ax): ...this.  Adjust code to
940         reflect change.
941         (dtrace_probe_destroy): Delete.
942         (dtrace_type_name): Rename to...
943         (dtrace_static_probe_ops::type_name): ...this.  Adjust code to
944         reflect change.
945         (dtrace_probe::get_static_ops): New method.
946         (dtrace_gen_info_probes_table_header): Rename to...
947         (dtrace_static_probe_ops::gen_info_probes_table_header):
948         ...this.  Adjust code to reflect change.
949         (dtrace_gen_info_probes_table_values): Rename to...
950         (dtrace_probe::gen_info_probes_table_values): ...this.  Adjust
951         code to reflect change.
952         (dtrace_enable_probe): Rename to...
953         (dtrace_probe::enable_probe): ...this.  Adjust code to reflect
954         change.
955         (dtrace_disable_probe): Rename to...
956         (dtrace_probe::disable_probe): ...this.  Adjust code to reflect
957         change.
958         (struct probe_ops dtrace_probe_ops): Delete.
959         (info_probes_dtrace_command): Call 'info_probes_for_spops'
960         instead of 'info_probes_for_ops'.
961         (_initialize_dtrace_probe): Use 'all_static_probe_ops' instead
962         of 'all_probe_ops'.
963
964 2017-11-22  Sergio Durigan Junior  <sergiodj@redhat.com>
965             Simon Marchi  <simark@simark.ca>
966
967         * stap-probe.c (struct probe_ops stap_probe_ops): Delete
968         variable.
969         (struct stap_probe_arg) <stap_probe_arg>: New constructor.
970         <aexpr>: Change type to 'expression_up'.
971         (stap_probe_arg_s): Delete type and VEC.
972         (struct stap_probe): Delete.  Replace by...
973         (class stap_static_probe_ops): ...this and...
974         (class stap_probe): ...this.  Rename variables to add 'm_'
975         prefix.  Do not use 'union' for arguments anymore.
976         (stap_get_expected_argument_type): Receive probe name instead
977         of 'struct stap_probe'.  Adjust code.
978         (stap_parse_probe_arguments): Rename to...
979         (stap_probe::parse_arguments): ...this.  Adjust code to
980         reflect change.
981         (stap_get_probe_address): Rename to...
982         (stap_probe::get_relocated_address): ...this.  Adjust code
983         to reflect change.
984         (stap_get_probe_argument_count): Rename to...
985         (stap_probe::get_argument_count): ...this.  Adjust code
986         to reflect change.
987         (stap_get_arg): Rename to...
988         (stap_probe::get_arg_by_number'): ...this. Adjust code to
989         reflect change.
990         (can_evaluate_probe_arguments): Rename to...
991         (stap_probe::can_evaluate_arguments): ...this.  Adjust code
992         to reflect change.
993         (stap_evaluate_probe_argument): Rename to...
994         (stap_probe::evaluate_argument): ...this.  Adjust code
995         to reflect change.
996         (stap_compile_to_ax): Rename to...
997         (stap_probe::compile_to_ax): ...this.  Adjust code to
998         reflect change.
999         (stap_probe_destroy): Delete.
1000         (stap_modify_semaphore): Adjust comment.
1001         (stap_set_semaphore): Rename to...
1002         (stap_probe::set_semaphore): ...this.  Adjust code to reflect
1003         change.
1004         (stap_clear_semaphore): Rename to...
1005         (stap_probe::clear_semaphore): ...this.  Adjust code to
1006         reflect change.
1007         (stap_probe::get_static_ops): New method.
1008         (handle_stap_probe): Adjust code to create instance of
1009         'stap_probe'.
1010         (stap_get_probes): Rename to...
1011         (stap_static_probe_ops::get_probes): ...this.  Adjust code to
1012         reflect change.
1013         (stap_probe_is_linespec): Rename to...
1014         (stap_static_probe_ops::is_linespec): ...this.  Adjust code to
1015         reflect change.
1016         (stap_type_name): Rename to...
1017         (stap_static_probe_ops::type_name): ...this.  Adjust code to
1018         reflect change.
1019         (stap_gen_info_probes_table_header): Rename to...
1020         (stap_static_probe_ops::gen_info_probes_table_header):
1021         ...this.  Adjust code to reflect change.
1022         (stap_gen_info_probes_table_values): Rename to...
1023         (stap_probe::gen_info_probes_table_values): ...this.  Adjust
1024         code to reflect change.
1025         (struct probe_ops stap_probe_ops): Delete.
1026         (info_probes_stap_command): Use 'info_probes_for_spops'
1027         instead of 'info_probes_for_ops'.
1028         (_initialize_stap_probe): Use 'all_static_probe_ops' instead
1029         of 'all_probe_ops'.
1030
1031 2017-11-22  Sergio Durigan Junior  <sergiodj@redhat.com>
1032
1033         * break-catch-throw.c (fetch_probe_arguments): Use
1034         'probe.prob' instead of 'probe.probe'.
1035         * breakpoint.c (create_longjmp_master_breakpoint): Call
1036         'can_evaluate_arguments' and 'get_relocated_address' methods
1037         from probe.
1038         (create_exception_master_breakpoint): Likewise.
1039         (add_location_to_breakpoint): Use 'sal->prob' instead of
1040         'sal->probe'.
1041         (bkpt_probe_insert_location): Call 'set_semaphore' method from
1042         probe.
1043         (bkpt_probe_remove_location): Likewise, for 'clear_semaphore'.
1044         * elfread.c (elf_get_probes): Use 'static_probe_ops' instead
1045         of 'probe_ops'.
1046         (probe_key_free): Call 'delete' on probe.
1047         (check_exception_resume): Use 'probe.prob' instead of
1048         'probe.probe'.
1049         * location.c (string_to_event_location_basic): Call
1050         'probe_linespec_to_static_ops'.
1051         * probe.c (class any_static_probe_ops): New class.
1052         (any_static_probe_ops any_static_probe_ops): New variable.
1053         (parse_probes_in_pspace): Receive 'static_probe_ops' as
1054         argument.  Adjust code to reflect change.
1055         (parse_probes): Use 'static_probe_ops' instead of
1056         'probe_ops'.  Adjust code to reflect change.
1057         (find_probes_in_objfile): Call methods to get name and
1058         provider from probe.
1059         (find_probe_by_pc): Use 'result.prob' instead of
1060         'result.probe'.  Call 'get_relocated_address' method from
1061         probe.
1062         (collect_probes): Adjust comment and argument list to receive
1063         'static_probe_ops' instead of 'probe_ops'.  Adjust code to
1064         reflect change.  Call necessary methods from probe.
1065         (compare_probes): Call methods to get name and provider from
1066         probes.
1067         (gen_ui_out_table_header_info): Receive 'static_probe_ops'
1068         instead of 'probe_ops'.  Use 'std::vector' instead of VEC,
1069         adjust code accordingly.
1070         (print_ui_out_not_applicables): Likewise.
1071         (info_probes_for_ops): Rename to...
1072         (info_probes_for_spops): ...this.  Receive 'static_probe_ops'
1073         as argument instead of 'probe_ops'.  Adjust code.  Call
1074         necessary methods from probe.
1075         (info_probes_command): Use 'info_probes_for_spops'.
1076         (enable_probes_command): Pass correct argument to
1077         'collect_probes'.  Call methods from probe.
1078         (disable_probes_command): Likewise.
1079         (get_probe_address): Move to 'any_static_probe_ops::get_address'.
1080         (get_probe_argument_count): Move to
1081         'any_static_probe_ops::get_argument_count'.
1082         (can_evaluate_probe_arguments): Move to
1083         'any_static_probe_ops::can_evaluate_arguments'.
1084         (evaluate_probe_argument): Move to
1085         'any_static_probe_ops::evaluate_argument'.
1086         (probe_safe_evaluate_at_pc): Use 'probe.prob' instead of
1087         'probe.probe'.
1088         (probe_linespec_to_ops): Rename to...
1089         (probe_linespec_to_static_ops): ...this.  Adjust code.
1090         (probe_any_is_linespec): Rename to...
1091         (any_static_probe_ops::is_linespec): ...this.
1092         (probe_any_get_probes): Rename to...
1093         (any_static_probe_ops::get_probes): ...this.
1094         (any_static_probe_ops::type_name): New method.
1095         (any_static_probe_ops::gen_info_probes_table_header): New
1096         method.
1097         (compute_probe_arg): Use 'pc_probe.prob' instead of
1098         'pc_probe.probe'.  Call methods from probe.
1099         (compile_probe_arg): Likewise.
1100         (std::vector<const probe_ops *> all_probe_ops): Delete.
1101         (std::vector<const static_probe_ops *> all_static_probe_ops):
1102         New variable.
1103         (_initialize_probe): Use 'all_static_probe_ops' instead of
1104         'all_probe_ops'.
1105         * probe.h (struct info_probe_column) <field_name>: Delete
1106         extraneous newline
1107         (info_probe_column_s): Delete type and VEC.
1108         (struct probe_ops): Delete.  Replace with...
1109         (class static_probe_ops): ...this and...
1110         (clas probe): ...this.
1111         (struct bound_probe) <bound_probe>: Delete extraneous
1112         newline.  Adjust constructor to receive 'probe' instead of
1113         'struct probe'.
1114         <probe>: Rename to...
1115         <prob>: ...this.  Delete extraneous newline.
1116         <objfile>: Delete extraneous newline.
1117         (register_probe_ops): Delete unused prototype.
1118         (info_probes_for_ops): Rename to...
1119         (info_probes_for_spops): ...this.  Adjust comment.
1120         (get_probe_address): Move to 'probe::get_address'.
1121         (get_probe_argument_count): Move to
1122         'probe::get_argument_count'.
1123         (can_evaluate_probe_arguments): Move to
1124         'probe::can_evaluate_arguments'.
1125         (evaluate_probe_argument): Move to 'probe::evaluate_argument'.
1126         * solib-svr4.c (struct svr4_info): Adjust comment.
1127         (struct probe_and_action) <probe>: Rename to...
1128         <prob>: ...this.
1129         (register_solib_event_probe): Receive 'probe' instead of
1130         'struct probe' as argument.  Use 'prob' instead of 'probe'
1131         when applicable.
1132         (solib_event_probe_action): Call 'get_argument_count' method
1133         from probe.  Adjust comment.
1134         (svr4_handle_solib_event): Adjust comment.  Call
1135         'evaluate_argument' method from probe.
1136         (svr4_create_probe_breakpoints): Call 'get_relocated_address'
1137         from probe.
1138         (svr4_create_solib_event_breakpoints): Use 'probe' instead of
1139         'struct probe'.  Call 'can_evaluate_arguments' from probe.
1140         * symfile.h: Forward declare 'class probe' instead of 'struct
1141         probe'.
1142         * symtab.h: Likewise.
1143         (struct symtab_and_line) <probe>: Rename to...
1144         <prob>: ...this.
1145         * tracepoint.c (start_tracing): Use 'prob' when applicable.
1146         Call probe methods.
1147         (stop_tracing): Likewise.
1148
1149 2017-11-22  Joel Brobecker  <brobecker@adacore.com>
1150
1151         * ravenscar-thread.c (ravenscar_inferior_created): Remove
1152         trailing newline at end of string in call to warning.
1153
1154 2017-11-22  Simon Marchi  <simon.marchi@polymtl.ca>
1155
1156         * osdata.h: Include vector isntead of vec.h.
1157         (osdata_column_s): Remove typedef.
1158         (struct osdata_column): Add constructor.
1159         <name, value>: Change type to std::string.
1160         (DEF_VEC_O (osdata_column_s)): Remove.
1161         (osdata_item_s): Remove typedef.
1162         (struct osdata_item) <columns>: Change type to std::vector.
1163         (DEF_VEC_O (osdata_item_s)): Remove.
1164         (struct osdata): Add constructor.
1165         <type>: Change type to std::string.
1166         <items>: Change type to std::vector.
1167         (osdata_p): Remove typedef.
1168         (DEF_VEC_P (osdata_p)): Remove.
1169         (osdata_parse): Return a unique_ptr.
1170         (osdata_free): Remove.
1171         (make_cleanup_osdata_free): Remove.
1172         (get_osdata): Return a unique_ptr.
1173         (get_osdata_column): Return pointer to std::string, take a
1174         reference to osdata_item as parameter.
1175         * osdata.c (struct osdata_parsing_data) <osdata>: Change type to
1176         unique_ptr.
1177         <property_name>: Change type to std::string.
1178         (osdata_start_osdata): Allocate osdata with new and adjust.
1179         (osdata_start_item): Adjust.
1180         (osdata_start_column): Adjust.
1181         (osdata_end_column): Adjust.
1182         (clear_parsing_data): Remove.
1183         (osdata_parse): Return a unique_ptr and adjust, remove cleanup.
1184         (osdata_item_clear): Remove.
1185         (get_osdata): return a unique_ptr and adjust.
1186         (get_osdata_column): Return a pointer to std::string and adjust.
1187         (info_osdata): Adjust.
1188         * mi/mi-main.c: Include <map>.
1189         (free_vector_of_osdata_items): Remove.
1190         (list_available_thread_groups): Adjust, use std::map instead of
1191         splay tree.
1192
1193 2017-11-22  Simon Marchi  <simon.marchi@ericsson.com>
1194
1195         * stack.c (iterate_over_block_locals): Add LOC_OPTIMIZED_OUT
1196         case in switch.
1197
1198 2017-11-22  Simon Marchi  <simon.marchi@polymtl.ca>
1199
1200         * varobj.h (DEF_VEC_P (varobj_p)): Remove.
1201
1202 2017-11-22  Simon Marchi  <simon.marchi@polymtl.ca>
1203
1204         * varobj.h (struct varobj_update_result): Add constructor, add
1205         move constructor, disable copy and assign, initialize fields.
1206         <newobj>: Change type to std::vector.
1207         (varobj_update): Return std::vector.
1208         * varobj.c (install_dynamic_child): Change VEC parameters to
1209         std::vector and adjust.
1210         (update_dynamic_varobj_children): Likewise.
1211         (varobj_update): Return std::vector and adjust.
1212         * mi/mi-cmd-var.c (varobj_update_one): Adjust to vector changes.
1213
1214 2017-11-22  Simon Marchi  <simon.marchi@polymtl.ca>
1215
1216         * varobj.h (struct varobj) <parent>: Remove const.
1217         <children>: Change type to std::vector.
1218         (varobj_list_children): Return std::vector const reference.
1219         (varobj_restrict_range): Change parameter type to std::vector
1220         const reference.
1221         * varobj.c (varobj_has_more): Adjust.
1222         (varobj_restrict_range): Change parameter type to std::vector
1223         const reference and adjust.
1224         (install_dynamic_child): Adjust.
1225         (update_dynamic_varobj_children): Adjust.
1226         (varobj_list_children): Return std::vector const reference and
1227         adjust.
1228         (varobj_add_child): Adjust.
1229         (update_type_if_necessary): Adjust.
1230         (varobj_update): Adjust.
1231         (delete_variable_1): Adjust.
1232         * ada-varobj.c (ada_value_has_mutated): Adjust.
1233         * mi/mi-cmd-var.c (mi_cmd_var_list_children): Adjust.
1234
1235 2017-11-22  Simon Marchi  <simon.marchi@polymtl.ca>
1236
1237         * varobj.h (struct varobj): Add constructor and destructor,
1238         initialize fields.
1239         * varobj.c (struct varobj_root): Initialize fields.
1240         (struct varobj_dynamic): Initialize fields.
1241         (varobj_create): Use unique_ptr instead of cleanup.  Create
1242         varobj with new instead of new_root_variable.
1243         (delete_variable_1): Free variable with delete instead of
1244         free_variable.
1245         (create_child_with_value): Create variable with new instead of
1246         new_variable.
1247         (varobj::varobj): New.
1248         (varobj::~varobj): New (body mostly coming from free_variable).
1249         (new_variable): Remove.
1250         (free_variable): Remove.
1251         (do_free_variable_cleanup): Remove.
1252         (make_cleanup_free_variable): Remove.
1253
1254 2017-11-22  Ulrich Weigand  <uweigand@de.ibm.com>
1255
1256         * core-regset.c: Remove file.
1257         * Makefile.in (ALLDEPFILES): Remove core-regset.c.
1258
1259 2017-11-22  Ulrich Weigand  <uweigand@de.ibm.com>
1260
1261         * NEWS: Document use of GNU MPFR.
1262         * README: Likewise.
1263
1264         * Makefile.in (LIBMPFR): Add define.
1265         (CLIBS): Add $(LIBMPFR).
1266         * configure.ac: Add --with-mpfr configure option.
1267         * configure: Regenerate.
1268         * config.in: Regenerate.
1269
1270         * target-float.c [HAVE_LIBMPFR]: Include <mpfr.h>.
1271         (class mpfr_float_ops): New type.
1272         (mpfr_float_ops::from_target): Two new overloaded functions.
1273         (mpfr_float_ops::to_target): Likewise.
1274         (mpfr_float_ops::to_string): New function.
1275         (mpfr_float_ops::from_string): Likewise.
1276         (mpfr_float_ops::to_longest): Likewise.
1277         (mpfr_float_ops::from_longest): Likewise.
1278         (mpfr_float_ops::from_ulongest): Likewise.
1279         (mpfr_float_ops::to_host_double): Likewise.
1280         (mpfr_float_ops::from_host_double): Likewise.
1281         (mpfr_float_ops::convert): Likewise.
1282         (mpfr_float_ops::binop): Likewise.
1283         (mpfr_float_ops::compare): Likewise.
1284         (get_target_float_ops): Use mpfr_float_ops if available.
1285
1286 2017-11-22  Ulrich Weigand  <uweigand@de.ibm.com>
1287
1288         * target-float.c: Do not include <math.h>.
1289         Include <cmath> and <limits>.
1290         (DOUBLEST): Do not define.
1291         (class target_float_ops): New type.
1292         (class host_float_ops): New templated type.
1293         (class decimal_float_ops): New type.
1294
1295         (floatformat_to_doublest): Rename to ...
1296         (host_float_ops<T>::from_target): ... this.  Use template type T
1297         instead of DOUBLEST.  Use C++ math routines.  Update recursive calls.
1298         (host_float_ops<T>::from_target): New overload using a type argument.
1299         (floatformat_from_doublest): Rename to ...
1300         (host_float_ops<T>::to_target): ... this.  Use template type T
1301         instead of DOUBLEST.  Use C++ math routines.  Update recursive calls.
1302         (host_float_ops<T>::to_target): New overload using a type argument.
1303         (floatformat_printf_format): New function.
1304         (struct printf_length_modifier): New templated type.
1305         (floatformat_to_string): Rename to ...
1306         (host_float_ops<T>::to_string): ... this.  Use type instead of
1307         floatformat argument.  Use floatformat_printf_format and
1308         printf_length_modifier.  Remove special handling of invalid numbers,
1309         infinities and NaN (moved to target_float_to_string).
1310         (struct scanf_length_modifier): New templated type.
1311         (floatformat_from_string): Rename to ...
1312         (host_float_ops<T>::from_string): ... this.  Use type instead of
1313         floatformat argument.  Use scanf_length_modifier.
1314         (floatformat_to_longest): Rename to ...
1315         (host_float_ops<T>::to_longest): ... this.  Use type instead of
1316         floatformat argument.  Handle out-of-range values deterministically.
1317         (floatformat_from_longest): Rename to ...
1318         (host_float_ops<T>::from_longest): ... this.  Use type instead of
1319         floatformat argument.
1320         (floatformat_from_ulongest): Rename to ...
1321         (host_float_ops<T>::from_ulongest): ... this.  Use type instead of
1322         floatformat argument.
1323         (floatformat_to_host_double): Rename to ...
1324         (host_float_ops<T>::to_host_double): ... this.  Use type instead of
1325         floatformat argument.
1326         (floatformat_from_host_double): Rename to ...
1327         (host_float_ops<T>::from_host_double): ... this.  Use type instead of
1328         floatformat argument.
1329         (floatformat_convert): Rename to ...
1330         (host_float_ops<T>::convert): ... this.  Use type instead of
1331         floatformat arguments.  Remove handling of no-op conversions.
1332         (floatformat_binop): Rename to ...
1333         (host_float_ops<T>::binop): ... this.  Use type instead of
1334         floatformat arguments.
1335         (floatformat_compare): Rename to ...
1336         (host_float_ops<T>::compare): ... this.  Use type instead of
1337         floatformat arguments.
1338
1339         (match_endianness): Use type instead of length/byte_order arguments.
1340         (set_decnumber_context): Likewise.
1341         (decimal_from_number): Likewise.  Update calls.
1342         (decimal_to_number): Likewise.
1343         (decimal_is_zero): Likewise.  Update calls.  Move to earlier in file.
1344         (decimal_float_ops::to_host_double): New dummy function.
1345         (decimal_float_ops::from_host_double): Likewise.
1346         (decimal_to_string): Rename to ...
1347         (decimal_float_ops::to_string): ... this.  Use type instead of
1348         length/byte_order arguments.  Update calls.
1349         (decimal_from_string): Rename to ...
1350         (decimal_float_ops::from_string): ... this.  Use type instead of
1351         length/byte_order arguments.  Update calls.
1352         (decimal_from_longest): Rename to ...
1353         (decimal_float_ops::from_longest): ... this.  Use type instead of
1354         length/byte_order arguments.  Update calls.
1355         (decimal_from_ulongest): Rename to ...
1356         (decimal_float_ops::from_ulongest): ... this.  Use type instead of
1357         length/byte_order arguments.  Update calls.
1358         (decimal_to_longest): Rename to ...
1359         (decimal_float_ops::to_longest): ... this.  Use type instead of
1360         length/byte_order arguments.  Update calls.
1361         (decimal_binop): Rename to ...
1362         (decimal_float_ops::binop): ... this.  Use type instead of
1363         length/byte_order arguments.  Update calls.
1364         (decimal_compare): Rename to ...
1365         (decimal_float_ops::compare): ... this.  Use type instead of
1366         length/byte_order arguments.  Update calls.
1367         (decimal_convert): Rename to ...
1368         (decimal_float_ops::convert): ... this.  Use type instead of
1369         length/byte_order arguments.  Update calls.
1370
1371         (target_float_same_category_p): New function.
1372         (target_float_same_format_p): Likewise.
1373         (target_float_format_length): Likewise.
1374         (enum target_float_ops_kind): New type.
1375         (get_target_float_ops_kind): New function.
1376         (get_target_float_ops): Three new overloaded functions.
1377
1378         (target_float_is_zero): Update call.
1379         (target_float_to_string): Add special handling of invalid numbers,
1380         infinities and NaN (moved from floatformat_to_string).  Use
1381         target_float_ops callback.
1382         (target_float_from_string): Use target_float_ops callback.
1383         (target_float_to_longest): Likewise.
1384         (target_float_from_longest): Likewise.
1385         (target_float_from_ulongest): Likewise.
1386         (target_float_to_host_double): Likewise.
1387         (target_float_from_host_double): Likewise.
1388         (target_float_convert): Add special case for no-op conversions.
1389         Use target_float_ops callback.
1390         (target_float_binop): Use target_float_ops callback.
1391         (target_float_compare): Likewise.
1392
1393 2017-11-22  Yao Qi  <yao.qi@linaro.org>
1394
1395         * python/py-gdb-readline.c (gdbpy_readline_wrapper): Use strcpy.
1396
1397 2017-11-22  Yao Qi  <yao.qi@linaro.org>
1398
1399         * cli/cli-decode.c (help_list): Use memcpy instead of strncpy.
1400         * cp-namespace.c (cp_lookup_transparent_type_loop): Likewise.
1401
1402 2017-11-21  Jerome Guitton  <guitton@adacore.com>
1403
1404         * ravenscar-thread.c (ravenscar_wait): Update inferior ptid
1405         with event ptid from the lower layer before doing the
1406         ravenscar-specific update.
1407
1408 2017-11-21  Joel Brobecker  <brobecker@adacore.com>
1409
1410         * ravenscar-thread.c (is_ravenscar_task): Also verify that
1411         the ptid's TID is nonzero.
1412
1413 2017-11-21  Joel Brobecker  <brobecker@adacore.com>
1414
1415         * ada-lang.h (ada_get_tcb_types_info): Add declaration.
1416         * ada-tasks.c (ada_get_tcb_types_info): Renames get_tcb_types_info.
1417         Make non-static.  Change return type to char *.  Adjust code
1418         accordingly.  Rewrite the function's documentation.
1419         (read_atcb): Adjust call to get_tcb_types_info accordingly.
1420         * ravenscar-thread.c (ravenscar_inferior_created): Check that
1421         we have enough debugging information in the runtime to support
1422         Ada task debugging before we enable the ravenscar-thread layer.
1423
1424 2017-11-21  Joel Brobecker  <brobecker@adacore.com>
1425
1426         * ada-lang.h (ada_get_task_info_from_ptid): Add declaration.
1427         * ada-tasks.c (ada_get_task_info_from_ptid): New function.
1428         * ravenscar-thread.c: Add into comment.
1429         (base_magic_null_ptid): Delete.
1430         (base_ptid): Change documentation.
1431         (ravenscar_active_task): Renames ravenscar_running_thread.
1432         All callers updated throughout.
1433         (is_ravenscar_task, ravenscar_get_thread_base_cpu): New function.
1434         (ravenscar_task_is_currently_active): Likewise.
1435         (get_base_thread_from_ravenscar_task): Ditto.
1436         (ravenscar_update_inferior_ptid): Adjust to handle multiple CPUs.
1437         (ravenscar_runtime_initialized): Likewise.
1438         (get_running_thread_id): Add new parameter "cpu".  Adjust
1439         implementation to handle this new parameter.
1440         (ravenscar_fetch_registers): Small adjustment to use
1441         is_ravenscar_task and ravenscar_task_is_currently_active in
1442         order to decide whether to use the target beneath or this
1443         module's arch_ops.
1444         (ravenscar_store_registers, ravenscar_prepare_to_store): Likewise.
1445         (ravenscar_stopped_by_sw_breakpoint): Use
1446         get_base_thread_from_ravenscar_task to get the underlying
1447         thread, rather than using base_ptid.
1448         (ravenscar_stopped_by_hw_breakpoint, ravenscar_stopped_by_watchpoint)
1449         (ravenscar_stopped_data_address, ravenscar_core_of_thread):
1450         Likewise.
1451         (ravenscar_inferior_created): Do not set base_magic_null_ptid.
1452
1453 2017-11-21  Joel Brobecker  <brobecker@adacore.com>
1454
1455         * ada-lang.h (struct ada_task_info) <base_cpu>: New field.
1456         * ada-lang.c (struct atcb_fieldno) <base_cpu>: New field.
1457         (get_tcb_types_info): Set fieldnos.base_cpu.
1458         (read_atcb): Set task_info->base_cpu.
1459         (info_task): Print "Base CPU" info if set by runtime.
1460
1461 2017-11-21  Joel Brobecker  <brobecker@adacore.com>
1462
1463         * ravenscar-thread.c (ravenscar_stopped_by_sw_breakpoint)
1464         (ravenscar_stopped_by_hw_breakpoint, ravenscar_stopped_by_watchpoint)
1465         (ravenscar_stopped_data_address, ravenscar_core_of_thread):
1466         New functions.
1467         (init_ravenscar_thread_ops): Set the to_stopped_by_sw_breakpoint,
1468         to_stopped_by_hw_breakpoint, to_stopped_by_watchpoint,
1469         to_stopped_data_address and to_core_of_thread fields of
1470         ravenscar_ops.
1471
1472 2017-11-21  Ulrich Weigand  <uweigand@de.ibm.com>
1473
1474         * ppc-tdep.h (enum powerpc_long_double_abi): New data type.
1475         (struct gdbarch_tdep): New member long_double_abi.
1476         * rs6000-tdep.c (rs6000_gdbarch_init): Initialize long_double_abi
1477         member of tdep struct based on Tag_GNU_Power_ABI_FP attribute.
1478         * ppc-linux-tdep.c (ppc_linux_init_abi): Install long double data
1479         format depending on long_double_abi tdep member.
1480         (ppc_floatformat_for_type): Handle __ibm128 type.
1481
1482 2017-11-20  Simon Marchi  <simon.marchi@polymtl.ca>
1483
1484         * darwin-nat.c (set_enable_mach_exceptions): Constify parameter.
1485
1486 2017-11-21  Pedro Alves  <palves@redhat.com>
1487
1488         * dwarf2read.c (mapped_index::find_name_components_bounds)
1489         <completion mode, upper bound>: Use std::lower_bound instead of
1490         std::upper_bound.
1491         (test_mapped_index_find_name_component_bounds): Remove incorrect
1492         "t1_fund" from expected symbols.
1493
1494 2017-11-21  Pedro Alves  <palves@redhat.com>
1495
1496         * dwarf2read.c (mapped_index::name_components_casing): New field.
1497         (mapped_index) <build_name_components,
1498         find_name_components_bounds): Declare new methods.
1499         (mapped_index::find_name_components_bounds)
1500         (mapped_index::build_name_components): New methods, factored out
1501         from dw2_expand_symtabs_matching_symbol.
1502         (check_find_bounds_finds)
1503         (test_mapped_index_find_name_component_bounds): New.
1504         (run_test): Rename to ...
1505         (test_dw2_expand_symtabs_matching_symbol): ... this.
1506         (run_test): Reimplement.
1507
1508 2017-11-21  Pedro Alves  <palves@redhat.com>
1509
1510         * cp-name-parser.y (cp_ident_is_alpha, cp_ident_is_alnum): New.
1511         (symbol_end): Use cp_ident_is_alnum.
1512         (yylex): Use cp_ident_is_alpha and cp_ident_is_alnum.
1513         * dwarf2read.c (make_sort_after_prefix_name): New function.
1514         (dw2_expand_symtabs_matching_symbol): Use it.
1515         (test_symbols): Add more symbols.
1516         (run_test): Add tests.
1517
1518 2017-11-17  Tom Tromey  <tom@tromey.com>
1519
1520         * symtab.h (enum symbol_subclass_kind): New.
1521         (struct symbol) <is_cplus_template_function, is_rust_vtable>:
1522         Remove.
1523         <subclass>: New member.
1524         (SYMBOL_IS_CPLUS_TEMPLATE_FUNCTION): Update.
1525         * rust-lang.c (rust_get_trait_object_pointer): Update.
1526         * dwarf2read.c (read_func_scope): Update.
1527         (read_variable): Update.
1528
1529 2017-11-17  Tom Tromey  <tom@tromey.com>
1530
1531         * dwarf2read.c (read_func_scope): Update.
1532         * symtab.h (struct template_symbol): Derive from symbol.
1533         <base>: Remove.
1534
1535 2017-11-17  Tom Tromey  <tom@tromey.com>
1536
1537         * symtab.h (struct symbol) <is_rust_vtable>: New member.
1538         (struct rust_vtable_symbol): New.
1539         (find_symbol_at_address): Declare.
1540         * symtab.c (find_symbol_at_address): New function.
1541         * symfile.h (struct quick_symbol_functions)
1542         <find_compunit_symtab_by_address>: New member.
1543         * symfile-debug.c (debug_qf_find_compunit_symtab_by_address): New
1544         function.
1545         (debug_sym_quick_functions): Link to
1546         debug_qf_find_compunit_symtab_by_address.
1547         * rust-lang.c (rust_get_trait_object_pointer): New function.
1548         (rust_evaluate_subexp) <case UNOP_IND>: New case.  Call
1549         rust_get_trait_object_pointer.
1550         * psymtab.c (psym_relocate): Clear psymbol_map.
1551         (psym_fill_psymbol_map, psym_find_compunit_symtab_by_address): New
1552         functions.
1553         (psym_functions): Link to psym_find_compunit_symtab_by_address.
1554         * objfiles.h (struct objfile) <psymbol_map>: New member.
1555         * dwarf2read.c (dwarf2_gdb_index_functions): Update.
1556         (process_die) <DW_TAG_variable>: New case.  Call read_variable.
1557         (rust_containing_type, read_variable): New functions.
1558
1559 2017-11-17  Simon Marchi  <simon.marchi@polymtl.ca>
1560
1561         * common/gdb_vecs.h (DEF_VEC_I (int)): Remove.
1562
1563 2017-11-17  Simon Marchi  <simon.marchi@polymtl.ca>
1564
1565         * common/filestuff.c: Include <algorithm>.
1566         (open_fds): Change type to std::vector<int>.
1567         (do_mark_open_fd): Adjust.
1568         (unmark_fd_no_cloexec): Adjust.
1569         (do_close): Adjust.
1570
1571 2017-11-17  Simon Marchi  <simon.marchi@polymtl.ca>
1572
1573         * breakpoint.c (output_thread_groups): Take an std::vector.
1574         (print_one_breakpoint_location): Adjust.
1575
1576 2017-11-17  Joel Brobecker  <brobecker@adacore.com>
1577
1578         * ada-lang.c (resolve_subexp): Add handling of OP_VAR_MSYM_VALUE.
1579         (ada_evaluate_subexp_for_cast): New function.
1580         (ada_evaluate_subexp) <UNOP_CAST>: Replace code by call to
1581         ada_evaluate_subexp_for_cast.
1582         (ada_evaluate_subexp) <nosideret>: Replace code by call to
1583         eval_skip_value.
1584         * eval.c (evaluate_var_value): Make non-static.
1585         (evaluate_var_msym_value, eval_skip_value): Likewise.
1586         * value.h (evaluate_var_value, evaluate_var_msym_value)
1587         (eval_skip_value): Declare.
1588
1589 2017-11-16  Joel Brobecker  <brobecker@adacore.com>
1590
1591         * ada-lang.c (ada_value_cast): Remove parameter "noside".
1592         Update all callers.
1593
1594 2017-11-16  Pedro Alves  <palves@redhat.com>
1595
1596         * python/py-unwind.c (pyuw_sniffer): Translate
1597         PyExc_KeyboardInterrupt to a GDB Quit exception.
1598
1599 2017-11-16  Pedro Alves  <palves@redhat.com>
1600
1601         * infrun.c (resume_cleanups): Delete.
1602         (resume): No longer install a resume_cleanups cleanup nor call
1603         QUIT.
1604         (proceed): Pass the terminal to the inferior.
1605         (keep_going_pass_signal): No longer install a resume_cleanups
1606         cleanup.
1607
1608 2017-11-16  Pedro Alves  <palves@redhat.com>
1609
1610         * inf-loop.c (inferior_event_handler): Don't swallow the exception
1611         if the prompt is blocked.
1612
1613 2017-11-16  Pedro Alves  <palves@redhat.com>
1614
1615         * breakpoint.c (insert_bp_location): Replace bp_err and
1616         bp_err_message locals by a gdb_exception local.
1617
1618 2017-11-16  Pedro Alves  <palves@redhat.com>
1619
1620         * inflow.c (scoped_ignore_sigttou): New class.
1621         (child_terminal_ours_1, new_tty): Use it.
1622
1623 2017-11-16  Ulrich Weigand  <uweigand@de.ibm.com>
1624
1625         * target-float.c (decimal_from_number): Add byte_order argument and
1626         call match_endianness.  Error if unknown floating-point type.
1627         (decimal_to_number): Add byte_order argument and call match_endianness.
1628         (decimal_from_longest): Update call.  Do not call match_endianness.
1629         (decimal_from_ulongest): Likewise.
1630         (decimal_binop): Likewise.
1631         (decimal_is_zero): Likewise.
1632         (decimal_compare): Likewise.
1633         (decimal_convert): Likewise.
1634
1635 2017-11-16  Phil Muldoon  <pmuldoon@redhat.com>
1636
1637         * python/python.c (gdbpy_rbreak): New function.
1638         * NEWS: Document Python rbreak feature.
1639
1640 2017-11-16  Yao Qi  <yao.qi@linaro.org>
1641
1642         * features/tic6x-c62x.xml: Remove.
1643         * features/tic6x-c64x.xml: Remove.
1644         * features/tic6x-c64xp.xml: Remove.
1645
1646 2017-11-15  John Baldwin  <jhb@FreeBSD.org>
1647
1648         * symtab.h: Include <array>.
1649
1650 2017-11-15  John Baldwin  <jhb@FreeBSD.org>
1651
1652         * bsd-kvm.c (bsd_kvm_cmd): Constify 'arg'.
1653         (bsd_kvm_proc_cmd): Likewise.
1654
1655 2017-11-15  Simon Marchi  <simon.marchi@ericsson.com>
1656
1657         * tui/tui-win.c (window_name_completer): Replace VEC with
1658         std::vector.
1659
1660 2017-11-15  Andrew Cagney  <cagney@gnu.org>
1661
1662         * MAINTAINERS: Remove no-longer applicable entries.
1663
1664 2017-11-15  Andrew Cagney  <cagney@gnu.org>
1665
1666         * MAINTAINERS: Move self to Past Maintainers.
1667
1668 2017-11-15  Yao Qi  <yao.qi@linaro.org>
1669
1670         * features/Makefile (XMLTOC): Remove nios2-linux.xml.
1671         * features/nios2-linux.c: Remove.
1672         * nios2-linux-tdep.c (_initialize_nios2_linux_tdep): Don't call
1673         initialize_tdesc_nios2_linux.
1674
1675 2017-11-15  Yao Qi  <yao.qi@linaro.org>
1676
1677         * m68hc11-tdep.c (M68HC11_NUM_REGS): Change it to
1678         M68HC11_LAST_HARD_REG + 1.
1679
1680 2017-11-14  Paul Carroll  <pcarroll@codesourcery.com>
1681
1682         PR gdb/22388
1683         * remote.c (remote_write_bytes_aux, remote_read_bytes_1,
1684         remote_read_bytes, remote_write_qxfer, remote_xfer_partial):
1685         Return TARGET_XFER_EOF if size of returned data is 0.
1686
1687 2017-11-14  Simon Marchi  <simon.marchi@ericsson.com>
1688
1689         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
1690         memory-map-selftests.c.
1691         (SUBDIR_UNITTESTS_OBS): Add memory-map-selftests.o.
1692         * memory-map.c (memory_map_start_memory): Fix computation of hi
1693         address.
1694         * unittests/memory-map-selftests.c: New file.
1695
1696 2017-11-09  Joel Brobecker  <brobecker@adacore.com>
1697
1698         * ada-lang.c: Fix some typos in the general command documenting
1699         how Ada expressions are being evaluated and how their result
1700         is printed.
1701
1702 2017-11-09  Tom Tromey  <tom@tromey.com>
1703
1704         * psymtab.c (psymbol_hash): Do not hash string contents.
1705         (psymbol_compare): Add comment.
1706
1707 2017-11-09  Tom Tromey  <tom@tromey.com>
1708
1709         * dictionary.c (dict_hash): Move "TKB" check into the "switch".
1710
1711 2017-11-08  Joel Brobecker  <brobecker@adacore.com>
1712
1713         * ada-exp.y (write_var_from_sym): Remove parameter
1714         "orig_left_context".  Update all callers.
1715
1716 2017-11-08  Simon Marchi  <simon.marchi@ericsson.com>
1717
1718         * tracepoint.h (class collection_list) <stringify>: Return
1719         std::vector<std::string>.
1720         (encode_actions_rsp): Change parameters to
1721         std::vector<std::string> *.
1722         * tracepoint.c (collection_list::stringify): Return
1723         std::vector<std::string> and adjust accordingly.
1724         (encode_actions_rsp): Changee parameters to
1725         std::vector<std::string> and adjust accordingly.
1726         * remote.c (free_actions_list),
1727         free_actions_list_cleanup_wrapper): Remove.
1728         (remote_download_tracepoint): Adjust to std::vector.
1729
1730 2017-11-08  Tom Tromey  <tom@tromey.com>
1731
1732         * dwarf2read.c (symbolp): Remove typedef.
1733         (read_func_scope): Use std::vector.
1734         (process_structure_scope): Use std::vector.
1735
1736 2017-11-08  Pedro Alves  <palves@redhat.com>
1737
1738         * ada-lang.c (ada_make_symbol_completion_list): Use
1739         completion_skip_symbol.
1740         * symtab.c (symbol_is_function_or_method(minimal_symbol*)): New.
1741         (symbol_is_function_or_method(symbol*)): New.
1742         (add_symtab_completions): Add complete_symbol_mode parameter.  Use
1743         completion_skip_symbol.
1744         (default_collect_symbol_completion_matches_break_on): Use
1745         completion_skip_symbol.  Pass down mode.
1746         (collect_file_symbol_completion_matches): Pass down mode.
1747         * symtab.h (symbol_is_function_or_method): New declarations.
1748         (completion_skip_symbol): New template function.
1749
1750 2017-11-08  Pedro Alves  <palves@redhat.com>
1751
1752         * linespec.c (iterate_over_all_matching_symtabs): Add
1753         search_domain parameter.  Pass it down to expand_symtabs_matching.
1754         (decode_objc): Request FUNCTIONS_DOMAIN symbols only.
1755         (lookup_prefix_sym): Adjust by passing ALL_DOMAIN as
1756         search_domain.
1757         (add_all_symbol_names_from_pspace): Add search_domain parameter.
1758         Pass it down.
1759         (find_method, find_function_symbols): Request FUNCTIONS_DOMAIN
1760         symbols.
1761         (add_matching_symbols_to_info): Add search_domain parameter.  Pass
1762         it down.
1763
1764 2017-11-08  Pedro Alves  <palves@redhat.com>
1765
1766         * ada-lang.c (ada_make_symbol_completion_list): Remove text and
1767         text_len locals and don't pass them down.
1768         * symtab.c (completion_list_add_name): Remove
1769         sym_text/sym_text_len parameters and adjust.
1770         (completion_list_add_symbol, completion_list_add_msymbol)
1771         (completion_list_objc_symbol, completion_list_add_fields)
1772         (add_symtab_completions): Likewise.
1773         (default_collect_symbol_completion_matches_break_on)
1774         (collect_file_symbol_completion_matches): Remove sym_text_len
1775         local and don't pass it down.
1776         * symtab.h (completion_list_add_name): Remove
1777         sym_text/sym_text_len parameters.
1778
1779 2017-11-08  Pedro Alves  <palves@redhat.com>
1780
1781         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
1782         unittests/lookup_name_info-selftests.c.
1783         (SUBDIR_UNITTESTS_OBS): Add lookup_name_info-selftests.o.
1784         * cp-support.c: Include "selftest.h".
1785         (cp_remove_params_1): Rename from cp_remove_params.  Add
1786         'require_param' parameter, and handle it.
1787         (cp_remove_params): Reimplement.
1788         (cp_remove_params_if_any): New.
1789         (selftests::quote): New.
1790         (selftests::check_remove_params): New.
1791         (selftests::test_cp_remove_params): New.
1792         (_initialize_cp_support): Install
1793         selftests::test_cp_remove_params.
1794         * cp-support.h (cp_remove_params_if_any): Declare.
1795         * dwarf2read.c :Include "selftest.h".
1796         (dw2_expand_symtabs_matching_symbol): Use
1797         lookup_name_info::make_ignore_params.
1798         (selftests::dw2_expand_symtabs_matching::mock_mapped_index)
1799         (selftests::dw2_expand_symtabs_matching::string_or_null)
1800         (selftests::dw2_expand_symtabs_matching::check_match)
1801         (selftests::dw2_expand_symtabs_matching::test_symbols)
1802         (selftests::dw2_expand_symtabs_matching::run_test): New.
1803         (_initialize_dwarf2_read): Register
1804         selftests::dw2_expand_symtabs_matching::run_test.
1805         * psymtab.c (psym_expand_symtabs_matching): Use
1806         lookup_name_info::make_ignore_params.
1807         * symtab.c (demangle_for_lookup_info::demangle_for_lookup_info):
1808         If the lookup name wants to ignore parameters, strip them.
1809         (compare_symbol_name): Remove sym_text/sym_text_len parameters and
1810         code handling '('.
1811         (completion_list_add_name): Don't pass down sym_text/sym_text_len.
1812         (default_collect_symbol_completion_matches_break_on): Don't try to
1813         strip parameters.
1814         * symtab.h (lookup_name_info::lookup_name_info): Add
1815         'ignore_parameters' parameter.
1816         (lookup_name_info::ignore_parameters)
1817         (lookup_name_info::make_ignore_params): New methods.
1818         (lookup_name_info::m_ignore_parameters): New field.
1819         * unittests/lookup_name_info-selftests.c: New file.
1820
1821 2017-11-08  Pedro Alves  <palves@redhat.com>
1822
1823         * dwarf2read.c (dw2_expand_marked_cus)
1824         (dw2_expand_symtabs_matching_symbol): Remove forward declarations.
1825         (dw2_expand_symtabs_matching): Move further below.
1826         (dw2_expand_marked_cus): Reindent.
1827
1828 2017-11-08  Pedro Alves  <palves@redhat.com>
1829
1830         * dwarf2read.c (byte_swap, MAYBE_SWAP): Move higher up in file.
1831         (struct name_component): New.
1832         (mapped_index::name_components): New field.
1833         (mapped_index::symbol_name_at): New method.
1834         (dwarf2_read_index): Call mapped_index ctor.
1835         (dw2_map_matching_symbols): Add comment about name_components
1836         table.
1837         (dw2_expand_symtabs_matching): Factor part to...
1838         (dw2_expand_symtabs_matching_symbol): ... this new function.
1839         Build name components table, and lookup symbols in it before
1840         calling the name matcher.
1841         (dw2_expand_marked_cus): New, factored out from
1842         dw2_expand_symtabs_matching.
1843         (dwarf2_per_objfile_free): Call the mapped_index's dtor.
1844
1845 2017-11-08   Pedro Alves  <palves@redhat.com>
1846
1847         * ada-lang.c (ada_encode): Rename to ..
1848         (ada_encode_1): ... this.  Add throw_errors parameter and handle
1849         it.
1850         (ada_encode): Reimplement.
1851         (match_name): Delete, folded into full_name.
1852         (resolve_subexp): No longer pass the encoded name to
1853         ada_lookup_symbol_list.
1854         (should_use_wild_match): Delete.
1855         (name_match_type_from_name): New.
1856         (ada_lookup_simple_minsym): Use lookup_name_info and the
1857         language's symbol_name_matcher_ftype.
1858         (add_symbols_from_enclosing_procs, ada_add_local_symbols)
1859         (ada_add_block_renamings): Adjust to use lookup_name_info.
1860         (ada_lookup_name): New.
1861         (add_nonlocal_symbols, ada_add_all_symbols)
1862         (ada_lookup_symbol_list_worker, ada_lookup_symbol_list)
1863         (ada_iterate_over_symbols): Adjust to use lookup_name_info.
1864         (ada_name_for_lookup): Delete.
1865         (ada_lookup_encoded_symbol): Construct a verbatim name.
1866         (wild_match): Reverse sense of return type.  Use bool.
1867         (full_match): Reverse sense of return type.  Inline bits of old
1868         match_name here.
1869         (ada_add_block_symbols): Adjust to use lookup_name_info.
1870         (symbol_completion_match): Delete, folded into...
1871         (ada_lookup_name_info::matches): ... .this new method.
1872         (symbol_completion_add): Delete.
1873         (ada_collect_symbol_completion_matches): Add name_match_type
1874         parameter.  Adjust to use lookup_name_info and
1875         completion_list_add_name.
1876         (get_var_value, ada_add_global_exceptions): Adjust to use
1877         lookup_name_info.
1878         (ada_get_symbol_name_cmp): Delete.
1879         (do_wild_match, do_full_match): New functions.
1880         (ada_lookup_name_info::ada_lookup_name_info): New method.
1881         (ada_symbol_name_matches, ada_get_symbol_name_matcher): New
1882         functions.
1883         (ada_language_defn): Install ada_get_symbol_name_matcher.
1884         * ada-lex.l (processId): If name starts with '<', copy it
1885         verbatim.
1886         * block.c (block_iter_match_step, block_iter_match_first)
1887         (block_iter_match_next, block_lookup_symbol)
1888         (block_lookup_symbol_primary, block_find_symbol): Adjust to use
1889         lookup_name_info.
1890         * block.h (block_iter_match_first, block_iter_match_next)
1891         (ALL_BLOCK_SYMBOLS_WITH_NAME): Adjust to use lookup_name_info.
1892         * c-lang.c (c_language_defn, cplus_language_defn)
1893         (asm_language_defn, minimal_language_defn): Adjust comments to
1894         refer to la_get_symbol_name_matcher.
1895         * completer.c (complete_files_symbols)
1896         (collect_explicit_location_matches, symbol_completer): Pass a
1897         symbol_name_match_type down.
1898         * completer.h (class completion_match, completion_match_result):
1899         New classes.
1900         (completion_tracker::reset_completion_match_result): New method.
1901         (completion_tracker::m_completion_match_result): New field.
1902         * cp-support.c (make_symbol_overload_list_block): Adjust to use
1903         lookup_name_info.
1904         (cp_fq_symbol_name_matches, cp_get_symbol_name_matcher): New
1905         functions.
1906         * cp-support.h (cp_get_symbol_name_matcher): New declaration.
1907         * d-lang.c: Adjust comments to refer to
1908         la_get_symbol_name_matcher.
1909         * dictionary.c (dict_vector) <iter_match_first, iter_match_next>:
1910         Adjust to use lookup_name_info.
1911         (dict_iter_match_first, dict_iter_match_next)
1912         (iter_match_first_hashed, iter_match_next_hashed)
1913         (iter_match_first_linear, iter_match_next_linear): Adjust to work
1914         with a lookup_name_info.
1915         * dictionary.h (dict_iter_match_first, dict_iter_match_next):
1916         Likewise.
1917         * dwarf2read.c (dw2_lookup_symbol): Adjust to use lookup_name_info.
1918         (dw2_map_matching_symbols): Adjust to use symbol_name_match_type.
1919         (gdb_index_symbol_name_matcher): New class.
1920         (dw2_expand_symtabs_matching) Adjust to use lookup_name_info and
1921         gdb_index_symbol_name_matcher.  Accept a NULL symbol_matcher.
1922         * f-lang.c (f_collect_symbol_completion_matches): Adjust to work
1923         with a symbol_name_match_type.
1924         (f_language_defn): Adjust comments to refer to
1925         la_get_symbol_name_matcher.
1926         * go-lang.c (go_language_defn): Adjust comments to refer to
1927         la_get_symbol_name_matcher.
1928         * language.c (default_symbol_name_matcher)
1929         (language_get_symbol_name_matcher): New functions.
1930         (unknown_language_defn, auto_language_defn): Adjust comments to
1931         refer to la_get_symbol_name_matcher.
1932         * language.h (symbol_name_cmp_ftype): Delete.
1933         (language_defn) <la_collect_symbol_completion_matches>: Add match
1934         type parameter.
1935         <la_get_symbol_name_cmp>: Delete field.
1936         <la_get_symbol_name_matcher>: New field.
1937         <la_iterate_over_symbols>: Adjust to use lookup_name_info.
1938         (default_symbol_name_matcher, language_get_symbol_name_matcher):
1939         Declare.
1940         * linespec.c (iterate_over_all_matching_symtabs)
1941         (iterate_over_file_blocks): Adjust to use lookup_name_info.
1942         (find_methods): Add language parameter, and use lookup_name_info
1943         and the language's symbol_name_matcher_ftype.
1944         (linespec_complete_function): Adjust.
1945         (lookup_prefix_sym): Use lookup_name_info.
1946         (add_all_symbol_names_from_pspace): Adjust.
1947         (find_superclass_methods): Add language parameter and pass it
1948         down.
1949         (find_method): Pass symbol language down.
1950         (find_linespec_symbols): Don't demangle or Ada encode here.
1951         (search_minsyms_for_name): Add lookup_name_info parameter.
1952         (add_matching_symbols_to_info): Add name_match_type parameter.
1953         Use lookup_name_info.
1954         * m2-lang.c (m2_language_defn): Adjust comments to refer to
1955         la_get_symbol_name_matcher.
1956         * minsyms.c: Include <algorithm>.
1957         (add_minsym_to_demangled_hash_table): Remove table parameter and
1958         add objfile parameter.  Use search_name_hash, and add language to
1959         demangled languages vector.
1960         (struct found_minimal_symbols): New struct.
1961         (lookup_minimal_symbol_mangled, lookup_minimal_symbol_demangled):
1962         New functions.
1963         (lookup_minimal_symbol): Adjust to use them.  Don't canonicalize
1964         input names here.  Use lookup_name_info instead.  Lookup up
1965         demangled names once for each language in the demangled names
1966         vector.
1967         (iterate_over_minimal_symbols): Use lookup_name_info.  Lookup up
1968         demangled names once for each language in the demangled names
1969         vector.
1970         (build_minimal_symbol_hash_tables): Adjust.
1971         * minsyms.h (iterate_over_minimal_symbols): Adjust to pass down a
1972         lookup_name_info.
1973         * objc-lang.c (objc_language_defn): Adjust comment to refer to
1974         la_get_symbol_name_matcher.
1975         * objfiles.h: Include <vector>.
1976         (objfile_per_bfd_storage) <demangled_hash_languages>: New field.
1977         * opencl-lang.c (opencl_language_defn): Adjust comment to refer to
1978         la_get_symbol_name_matcher.
1979         * p-lang.c (pascal_language_defn): Adjust comment to refer to
1980         la_get_symbol_name_matcher.
1981         * psymtab.c (psym_lookup_symbol): Use lookup_name_info.
1982         (match_partial_symbol): Use symbol_name_match_type,
1983         lookup_name_info and psymbol_name_matches.
1984         (lookup_partial_symbol): Use lookup_name_info.
1985         (map_block): Use symbol_name_match_type and lookup_name_info.
1986         (psym_map_matching_symbols): Use symbol_name_match_type.
1987         (psymbol_name_matches): New.
1988         (recursively_search_psymtabs): Use lookup_name_info and
1989         psymbol_name_matches.  Rename 'kind' parameter to 'domain'.
1990         (psym_expand_symtabs_matching): Use lookup_name_info.  Rename
1991         'kind' parameter to 'domain'.
1992         * rust-lang.c (rust_language_defn): Adjust comment to refer to
1993         la_get_symbol_name_matcher.
1994         * symfile-debug.c (debug_qf_map_matching_symbols)
1995         (debug_qf_map_matching_symbols): Use symbol_name_match_type.
1996         (debug_qf_expand_symtabs_matching): Use lookup_name_info.
1997         * symfile.c (expand_symtabs_matching): Use lookup_name_info.
1998         * symfile.h (quick_symbol_functions) <map_matching_symbols>:
1999         Adjust to use symbol_name_match_type.
2000         <expand_symtabs_matching>: Adjust to use lookup_name_info.
2001         (expand_symtabs_matching): Adjust to use lookup_name_info.
2002         * symmisc.c (maintenance_expand_symtabs): Use
2003         lookup_name_info::match_any ().
2004         * symtab.c (symbol_matches_search_name): New.
2005         (eq_symbol_entry): Adjust to use lookup_name_info and the
2006         language's matcher.
2007         (demangle_for_lookup_info::demangle_for_lookup_info): New.
2008         (lookup_name_info::match_any): New.
2009         (iterate_over_symbols, search_symbols): Use lookup_name_info.
2010         (compare_symbol_name): Add language, lookup_name_info and
2011         completion_match_result parameters, and use them.
2012         (completion_list_add_name): Make extern.  Add language and
2013         lookup_name_info parameters.  Use them.
2014         (completion_list_add_symbol, completion_list_add_msymbol)
2015         (completion_list_objc_symbol): Add lookup_name_info parameters and
2016         adjust.  Pass down language.
2017         (completion_list_add_fields): Add lookup_name_info parameters and
2018         adjust.  Pass down language.
2019         (add_symtab_completions): Add lookup_name_info parameters and
2020         adjust.
2021         (default_collect_symbol_completion_matches_break_on): Add
2022         name_match_type parameter, and use it.  Use lookup_name_info.
2023         (default_collect_symbol_completion_matches)
2024         (collect_symbol_completion_matches): Add name_match_type
2025         parameter, and pass it down.
2026         (collect_symbol_completion_matches_type): Adjust.
2027         (collect_file_symbol_completion_matches): Add name_match_type
2028         parameter, and use lookup_name_info.
2029         * symtab.h: Include <string> and "common/gdb_optional.h".
2030         (enum class symbol_name_match_type): New.
2031         (class ada_lookup_name_info): New.
2032         (struct demangle_for_lookup_info): New.
2033         (class lookup_name_info): New.
2034         (symbol_name_matcher_ftype): New.
2035         (SYMBOL_MATCHES_SEARCH_NAME): Use symbol_matches_search_name.
2036         (symbol_matches_search_name): Declare.
2037         (MSYMBOL_MATCHES_SEARCH_NAME): Delete.
2038         (default_collect_symbol_completion_matches)
2039         (collect_symbol_completion_matches)
2040         (collect_file_symbol_completion_matches): Add name_match_type
2041         parameter.
2042         (iterate_over_symbols): Use lookup_name_info.
2043         (completion_list_add_name): Declare.
2044         * utils.c (enum class strncmp_iw_mode): Moved to utils.h.
2045         (strncmp_iw_with_mode): Now extern.
2046         * utils.h (enum class strncmp_iw_mode): Moved from utils.c.
2047         (strncmp_iw_with_mode): Declare.
2048
2049 2017-11-08  Keith Seitz  <keiths@redhat.com>
2050             Pedro Alves  <palves@redhat.com>
2051
2052         * ada-lang.c (ada_language_defn): Install
2053         default_search_name_hash.
2054         * buildsym.c (struct buildsym_compunit): <language>: New field.
2055         (finish_block_internal): Pass language when creating dictionaries.
2056         (start_buildsym_compunit, start_symtab): New language parameters.
2057         Use them.
2058         (restart_symtab): Pass down compilation unit's language.
2059         * buildsym.h (enum language): Forward declare.
2060         (start_symtab): New 'language' parameter.
2061         * c-lang.c (c_language_defn, cplus_language_defn)
2062         (asm_language_defn, minimal_language_defn): Install
2063         default_search_name_hash.
2064         * coffread.c (coff_start_symtab): Adjust.
2065         * d-lang.c (d_language_defn): Install default_search_name_hash.
2066         * dbxread.c (struct symloc): Add 'pst_language' field.
2067         (PST_LANGUAGE): Define.
2068         (start_psymtab, read_ofile_symtab): Use it.
2069         (process_one_symbol): New 'language' parameter.  Pass it down.
2070         * dictionary.c (struct dictionary) <language>: New field.
2071         (DICT_LANGUAGE): Define.
2072         (dict_create_hashed, dict_create_hashed_expandable)
2073         (dict_create_linear, dict_create_linear_expandable): New parameter
2074         'language'.  Set the dictionary's language.
2075         (iter_match_first_hashed): Adjust to rename.
2076         (insert_symbol_hashed): Assert we don't see mismatching
2077         languages.  Adjust to rename.
2078         (dict_hash): Rename to ...
2079         (default_search_name_hash): ... this and make extern.
2080         * dictionary.h (struct language_defn): Forward declare.
2081         (dict_create_hashed): New parameter 'language'.
2082         * dwarf2read.c (dwarf2_start_symtab): Pass down language.
2083         * f-lang.c (f_language_defn): Install default_search_name_hash.
2084         * go-lang.c (go_language_defn): Install default_search_name_hash.
2085         * jit.c (finalize_symtab): Pass compunit's language to dictionary
2086         creation.
2087         * language.c (unknown_language_defn, auto_language_defn):
2088         * language.h (language_defn::la_search_name_hash): New field.
2089         (default_search_name_hash): Declare.
2090         * m2-lang.c (m2_language_defn): Install default_search_name_hash.
2091         * mdebugread.c (new_block): New parameter 'language'.
2092         * mdebugread.c (parse_symbol): Pass symbol language to block
2093         allocation.
2094         (psymtab_to_symtab_1): Pass down language.
2095         (new_symtab): Pass compunit's language to block allocation.
2096         * objc-lang.c (objc_language_defn): Install
2097         default_search_name_hash.
2098         * opencl-lang.c (opencl_language_defn):
2099         * p-lang.c (pascal_language_defn): Install
2100         default_search_name_hash.
2101         * rust-lang.c (rust_language_defn): Install
2102         default_search_name_hash.
2103         * stabsread.h (enum language): Forward declare.
2104         (process_one_symbol): Add 'language' parameter.
2105         * symtab.c (search_name_hash): New function.
2106         * symtab.h (search_name_hash): Declare.
2107         * xcoffread.c (read_xcoff_symtab): Pass language to start_symtab.
2108
2109 2017-11-08  Pedro Alves  <palves@redhat.com>
2110
2111         * cp-name-parser.y (main): Don't initialize extra_chars.
2112
2113 2017-11-07  Tom Tromey  <tom@tromey.com>
2114
2115         * event-top.h (command_handler): Constify.
2116         * record-full.c (cmd_record_full_start): Update.
2117         * thread.c (thread_apply_all_command): Update.
2118         * printcmd.c (eval_command): Update.
2119         * mi/mi-main.c (mi_execute_cli_command): Update.
2120         (mi_execute_async_cli_command): Update.
2121         * tui/tui-stack.c (tui_update_command): Update.
2122         * cli/cli-interp.c (safe_execute_command): Constify.
2123         * record.c (record_start): Update.
2124         (record_start, record_stop, cmd_record_start): Update.
2125         * record-btrace.c (cmd_record_btrace_bts_start): Update.
2126         (cmd_record_btrace_pt_start): Update.
2127         (cmd_record_btrace_start): Update.
2128         (cmd_record_btrace_start): Update.
2129         * reverse.c (exec_reverse_once): Update.
2130         * python/python.c (execute_gdb_command): Don't copy the command.
2131         * event-top.c (command_line_handler): Update.
2132         (command_handler): Constify.
2133         * defs.h (deprecated_call_command_hook): Constify.
2134         * cli/cli-script.h (execute_user_command): Constify.
2135         * cli/cli-script.c (execute_user_command): Constify.
2136         (execute_cmd_pre_hook, execute_cmd_post_hook): Constify.
2137         (enum command_control_type): Update.
2138         * main.c (catch_command_errors): Remove non-const overload.
2139         (catch_command_errors_ftype): Remove.
2140         * python/py-cmd.c (cmdpy_function): Constify.
2141         * guile/scm-cmd.c (cmdscm_function): Constify.
2142         * cli/cli-dump.c (call_dump_func): Constify.
2143         * cli/cli-decode.c (do_const_cfunc): Constify.
2144         (do_sfunc): Constify.
2145         (cmd_func): Constify.
2146         * gdbcmd.h (execute_command, execute_command_to_string): Constify.
2147         * top.h (execute_command): Constify.
2148         * top.c (execute_command): Constify.
2149         (execute_command_to_string): Constify.
2150         (deprecated_call_command_hook): Constify.
2151         * command.h (cmd_func): Constify.
2152         * cli/cli-decode.h (struct cmd_list_element) <func>: Constify.
2153
2154 2017-11-07  Tom Tromey  <tom@tromey.com>
2155
2156         * ada-lang.c (catch_ada_exception_command): Constify.
2157         (catch_assert_command): Constify.
2158         * break-catch-throw.c (catch_catch_command, catch_throw_command)
2159         (catch_rethrow_command): Constify.
2160         (catch_exception_command_1): Constify.
2161         * breakpoint.h (add_catch_command): Constify.
2162         * break-catch-syscall.c (catch_syscall_command_1): Constify.
2163         (catch_syscall_split_args): Constify.
2164         * break-catch-sig.c (catch_signal_command): Constify.
2165         (catch_signal_split_args): Constify.
2166         * cli/cli-decode.h (struct cmd_list_element) <function>: Use
2167         cmd_const_sfunc_ftype.
2168         * cli/cli-decode.c (add_setshow_cmd_full): Constify.
2169         (add_setshow_enum_cmd, add_setshow_auto_boolean_cmd)
2170         (add_setshow_boolean_cmd, add_setshow_filename_cmd)
2171         (add_setshow_string_cmd, struct cmd_list_element)
2172         (add_setshow_optional_filename_cmd, add_setshow_integer_cmd)
2173         (add_setshow_uinteger_cmd, add_setshow_zinteger_cmd)
2174         (add_setshow_zuinteger_unlimited_cmd, add_setshow_zuinteger_cmd):
2175         Constify.
2176         (set_cmd_sfunc): Constify.
2177         (empty_sfunc): Constify.
2178         * command.h (add_setshow_enum_cmd, add_setshow_auto_boolean_cmd)
2179         (add_setshow_boolean_cmd, add_setshow_filename_cmd)
2180         (add_setshow_string_cmd, add_setshow_string_noescape_cmd)
2181         (add_setshow_optional_filename_cmd, add_setshow_integer_cmd)
2182         (add_setshow_uinteger_cmd, add_setshow_zinteger_cmd)
2183         (add_setshow_zuinteger_cmd, add_setshow_zuinteger_unlimited_cmd):
2184         Constify.
2185         (set_cmd_sfunc): Constify.
2186         (cmd_sfunc_ftype): Remove.
2187         * compile/compile.c (set_compile_args): Constify.
2188         * infrun.c (set_disable_randomization): Constify.
2189         * infcmd.c (set_args_command, set_cwd_command): Constify.
2190         * breakpoint.c (set_condition_evaluation_mode): Constify.
2191         (add_catch_command): Constify.
2192         (catch_fork_command_1, catch_exec_command_1)
2193         (catch_load_command_1, catch_unload_command_1): Constify.
2194         (catch_load_or_unload): Constify.
2195         * guile/scm-param.c (pascm_set_func): Constify.
2196         (add_setshow_generic): Constify.
2197         * python/py-param.c (get_set_value): Constify.
2198         * top.h (set_verbose): Constify.
2199         * tui/tui-win.c (tui_set_var_cmd): Constify.
2200         * mi/mi-main.c (set_mi_async_command): Constify.
2201         * cli/cli-logging.c (set_logging_overwrite)
2202         (set_logging_redirect): Constify.
2203         * value.c (set_max_value_size): Constify.
2204         * valprint.c (set_input_radix, set_output_radix): Constify.
2205         * utils.c (set_width_command, set_height_command): Constify.
2206         * typeprint.c (set_print_type_methods, set_print_type_typedefs): Constify.
2207         * tracepoint.c (set_disconnected_tracing)
2208         (set_circular_trace_buffer, set_trace_buffer_size)
2209         (set_trace_user, set_trace_notes, set_trace_stop_notes): Constify.
2210         * top.c (set_history_size_command, set_verbose, set_editing)
2211         (set_gdb_datadir, set_history_filename): Constify.
2212         * target.c (set_targetdebug, maint_set_target_async_command)
2213         (maint_set_target_non_stop_command, set_target_permissions)
2214         (set_write_memory_permission): Constify.
2215         (open_target): Constify.
2216         * target-descriptions.c (set_tdesc_filename_cmd): Constify.
2217         * target-dcache.c (set_stack_cache, set_code_cache): Constify.
2218         * symtab.c (set_symbol_cache_size_handler): Constify.
2219         * symfile.c (set_ext_lang_command): Constify.
2220         * symfile-debug.c (set_debug_symfile): Constify.
2221         * source.c (set_directories_command): Constify.
2222         * solib.c (reload_shared_libraries, gdb_sysroot_changed): Constify.
2223         * serial.c (set_parity): Constify.
2224         * rs6000-tdep.c (powerpc_set_soft_float, powerpc_set_vector_abi): Constify.
2225         * remote.c (set_remote_exec_file, set_remotebreak)
2226         (set_remote_protocol_Z_packet_cmd, set_range_stepping): Constify.
2227         * record.c (set_record_insn_history_size)
2228         (set_record_call_history_size): Constify.
2229         * record-full.c (set_record_full_insn_max_num): Constify.
2230         * proc-api.c (set_procfs_trace_cmd, set_procfs_file_cmd): Constify.
2231         * osabi.c (set_osabi): Constify.
2232         * mips-tdep.c (set_mips64_transfers_32bit_regs)
2233         (reinit_frame_cache_sfunc, mips_abi_update): Constify.
2234         * maint.c (maintenance_set_profile_cmd): Constify.
2235         * linux-thread-db.c (set_libthread_db_search_path): Constify.
2236         * language.c (set_language_command, set_range_command)
2237         (set_case_command): Constify.
2238         * infrun.c (set_non_stop, set_observer_mode)
2239         (set_stop_on_solib_events, set_schedlock_func)
2240         (set_exec_direction_func): Constify.
2241         * infcmd.c (set_inferior_tty_command): Constify.
2242         * disasm.c (set_disassembler_options_sfunc): Constify.
2243         * demangle.c (set_demangling_command): Constify.
2244         * dcache.c (set_dcache_size, set_dcache_line_size): Constify.
2245         * cris-tdep.c (set_cris_version, set_cris_mode)
2246         (set_cris_dwarf2_cfi): Constify.
2247         * corefile.c (set_gnutarget_command): Constify.
2248         * charset.c (set_host_charset_sfunc, set_target_charset_sfunc)
2249         (set_target_wide_charset_sfunc): Constify.
2250         * breakpoint.c (update_dprintf_commands): Constify.
2251         * auto-load.c (set_auto_load_dir, set_auto_load_safe_path): Constify.
2252         * arm-tdep.c (set_fp_model_sfunc, arm_set_abi)
2253         (set_disassembly_style_sfunc): Constify.
2254         * arch-utils.c (set_endian, set_architecture): Constify.
2255         * alpha-tdep.c (reinit_frame_cache_sfunc): Constify.
2256         * agent.c (set_can_use_agent): Constify.
2257
2258 2017-11-07  Tom Tromey  <tom@tromey.com>
2259
2260         * go32-nat.c (go32_sysinfo, go32_sldt, go32_sgdt, go32_sidt)
2261         (go32_pde, go32_pte, go32_pte_for_address): Constify.
2262         * gnu-nat.c (_parse_bool_arg, show_thread_default_pause_cmd)
2263         (set_thread_default_pause_cmd, set_thread_default_run_cmd)
2264         (show_thread_default_run_cmd, set_thread_default_detach_sc_cmd)
2265         (parse_int_arg, show_thread_default_detach_sc_cmd)
2266         (set_signals_cmd, show_signals_cmd, set_sig_thread_cmd)
2267         (show_sig_thread_cmd, set_stopped_cmd, show_stopped_cmd)
2268         (set_exceptions_cmd, show_exceptions_cmd, set_task_pause_cmd)
2269         (show_task_pause_cmd, set_task_detach_sc_cmd)
2270         (show_task_detach_sc_cmd, set_task_exc_port_cmd)
2271         (set_noninvasive_cmd, set_thread_pause_cmd)
2272         (show_thread_pause_cmd, set_thread_run_cmd, show_thread_run_cmd)
2273         (set_thread_detach_sc_cmd, show_thread_detach_sc_cmd)
2274         (set_thread_exc_port_cmd, thread_takeover_sc_cmd): Constify.
2275         * windows-nat.c (display_selectors): Constify.
2276         * cli/cli-decode.h (struct cmd_list_element) <function>: Remove
2277         non-const "cfunc".
2278         * cli/cli-decode.c (set_cmd_cfunc): Remove non-const overload.
2279         (cmd_cfunc_eq): Likewise.
2280         (struct cmd_list_element): Likewise.
2281         (do_cfunc): Remove.
2282         (cli_user_command_p): Update.
2283         * command.h (add_cmd): Remove non-const overload.
2284         (cmd_cfunc_ftype): Remove typedef.
2285         (cmd_cfunc_eq): Remove non-const overload.
2286         * value.c (show_values): Constify.
2287         * thread.c (thread_apply_all_command): Constify.
2288         * symfile.c (load_command): Constify.
2289         * source.c (directory_command): Constify.
2290         * maint.c (maintenance_internal_error)
2291         (maintenance_demangler_warning, maintenance_space_display)
2292         (maintenance_print_architecture, maintenance_translate_address)
2293         (maintenance_info_selftests, maintenance_internal_warning):
2294         Constify.
2295         * breakpoint.c (disable_trace_command, enable_trace_command):
2296         Constify.
2297         * auto-load.c (info_auto_load_local_gdbinit, add_auto_load_dir):
2298         Constify.
2299         (add_auto_load_safe_path): Constify.
2300         * guile/scm-auto-load.c (info_auto_load_guile_scripts): Constify.
2301         * top.h (show_commands): Constify.
2302         * linux-thread-db.c (info_auto_load_libthread_db): Constify.
2303         * sparc64-tdep.c (adi_examine_command): Constify.
2304         (adi_assign_command): Constify.
2305
2306 2017-11-07  Tom Tromey  <tom@tromey.com>
2307
2308         * frame.h (info_locals_command, info_args_command): Constify.
2309         * auto-load.h (auto_load_info_scripts): Constify.
2310         * inferior.h (registers_info): Constify.
2311         * copying.c: Rebuild.
2312         * copying.awk: Constify generated commands.
2313         * auto-load.c (auto_load_info_scripts)
2314         (info_auto_load_gdb_scripts): Constify.
2315         * cli/cli-decode.c (struct cmd_list_element): Take a
2316         cmd_const_cfunc_ftype.
2317         * command.h (add_info): Take a cmd_const_cfunc_ftype.
2318         * tui/tui-win.c (tui_all_windows_info): Constify.
2319         * python/py-auto-load.c (info_auto_load_python_scripts):
2320         Constify.
2321         * cli/cli-cmds.c (show_command): Remove non-const overload.
2322         * tracepoint.c (info_tvariables_command, info_scope_command):
2323         Constify.
2324         (info_static_tracepoint_markers_command): Constify.
2325         * thread.c (info_threads_command): Constify.
2326         (print_thread_info_1): Constify.
2327         * target.c (info_target_command): Constify.
2328         * symtab.c (info_sources_command, info_functions_command)
2329         (info_types_command): Constify.
2330         (info_variables_command): Remove non-const overload.
2331         * symfile.c (info_ext_lang_command): Constify.
2332         * stack.c (info_frame_command, info_locals_command)
2333         (info_args_command): Constify.
2334         (backtrace_command): Remove non-const overload.
2335         * source.c (info_source_command, info_line_command): Constify.
2336         * solib.c (info_sharedlibrary_command): Constify.
2337         * skip.c (info_skip_command): Constify.
2338         * ser-go32.c (info_serial_command): Constify.
2339         * reverse.c (info_bookmarks_command): Constify.
2340         * printcmd.c (info_symbol_command, info_address_command)
2341         (info_display_command): Constify.
2342         * osdata.c (info_osdata_command): Constify.
2343         * objc-lang.c (info_selectors_command, info_classes_command):
2344         Constify.
2345         * nto-procfs.c (procfs_pidlist, procfs_meminfo): Constify.
2346         * memattr.c (info_mem_command): Constify.
2347         * macrocmd.c (info_macro_command, info_macros_command): Constify.
2348         * linux-fork.c (info_checkpoints_command): Constify.
2349         * infrun.c (info_signals_command): Constify.
2350         * inflow.c (info_terminal_command): Constify.
2351         * inferior.c (info_inferiors_command): Constify.
2352         (print_inferior): Constify.
2353         * infcmd.c (info_program_command, info_all_registers_command)
2354         (info_registers_command, info_vector_command)
2355         (info_float_command): Constify.
2356         (registers_info): Constify.
2357         * gnu-nat.c (info_send_rights_cmd, info_recv_rights_cmd)
2358         (info_port_sets_cmd, info_dead_names_cmd, info_port_rights_cmd):
2359         Constify.
2360         * f-valprint.c (info_common_command): Constify.
2361         * dcache.c (info_dcache_command): Constify.
2362         (dcache_info_1): Constify.
2363         * darwin-nat-info.c (info_mach_tasks_command)
2364         (info_mach_task_command, info_mach_ports_command)
2365         (info_mach_port_command, info_mach_threads_command)
2366         (info_mach_thread_command, info_mach_regions_command)
2367         (info_mach_regions_recurse_command, info_mach_region_command)
2368         (info_mach_exceptions_command): Constify.
2369         (get_task_from_args): Constify.
2370         * cp-support.c (info_vtbl_command): Constify.
2371         * breakpoint.c (info_watchpoints_command)
2372         (info_tracepoints_command): Constify.
2373         (info_breakpoints_command): Remove non-const overload.
2374         * avr-tdep.c (avr_io_reg_read_command): Constify.
2375         * auxv.c (info_auxv_command): Constify.
2376         * ada-tasks.c (info_tasks_command): Constify.
2377         (info_task): Constify.
2378         * ada-lang.c (info_exceptions_command): Constify.
2379
2380 2017-11-07  Tom Tromey  <tom@tromey.com>
2381
2382         * solib.h (no_shared_libraries): Constify.
2383         * frame.h (return_command): Constify.
2384         * cli/cli-cmds.h (quit_command): Constify.
2385         * top.h (quit_command, execute_command): Constify.
2386         * target.h (flash_erase_command): Constify.
2387         * inferior.h (set_inferior_args, attach_command): Constify.
2388         * tracepoint.h (start_tracing, stop_tracing): Constify.
2389         * breakpoint.h (break_command, tbreak_command)
2390         (hbreak_command_wrapper, thbreak_command_wrapper)
2391         (rbreak_command_wrapper, watch_command_wrapper)
2392         (awatch_command_wrapper, rwatch_command_wrapper)
2393         (get_tracepoint_by_number): Constify.
2394         * symtab.c (info_variables_command, rbreak_command)
2395         (symtab_symbol_info): Constify.
2396         (info_variables_command): Add non-const overload.
2397         * top.c (dont_repeat_command): Constify.
2398         * breakpoint.c (ignore_command, commands_command)
2399         (condition_command, tbreak_command, hbreak_command)
2400         (thbreak_command, clear_command, break_command)
2401         (info_breakpoints_command, watch_command, rwatch_command)
2402         (awatch_command, trace_command, ftrace_command, strace_command)
2403         (trace_pass_command, break_range_command, dprintf_command)
2404         (agent_printf_command, get_tracepoint_by_number)
2405         (watch_maybe_just_location, trace_pass_command): Constify.
2406         (info_breakpoints_command): Add non-const overload.
2407         * tracefile.c (tsave_command): Constify.
2408         * infcmd.c (attach_command, disconnect_command, signal_command)
2409         (queue_signal_command, stepi_command, nexti_command)
2410         (finish_command, next_command, step_command, until_command)
2411         (advance_command, jump_command, continue_command, run_command)
2412         (start_command, starti_command, interrupt_command)
2413         (run_command_1, set_inferior_args, step_1): Constify.
2414         * inferior.c (add_inferior_command, remove_inferior_command)
2415         (clone_inferior_command): Constify.
2416         * linux-fork.c (checkpoint_command, restart_command): Constify.
2417         * windows-nat.c (signal_event_command): Constify.
2418         * guile/guile.c (guile_repl_command, guile_command): Constify.
2419         * printcmd.c (x_command, display_command, printf_command)
2420         (output_command, set_command, call_command, print_command)
2421         (eval_command): Constify.
2422         (non_const_set_command): Remove.
2423         (_initialize_printcmd): Update.
2424         * source.c (forward_search_command, reverse_search_command):
2425         Constify.
2426         * jit.c (jit_reader_load_command, jit_reader_unload_command):
2427         Constify.
2428         * infrun.c (handle_command): Constify.
2429         * memattr.c (mem_command): Constify.
2430         * stack.c (return_command, up_command, up_silently_command)
2431         (down_command, down_silently_command, frame_command)
2432         (backtrace_command, func_command, backtrace_command_1): Constify.
2433         (backtrace_command): Add non-const overload.
2434         * remote-sim.c (simulator_command): Constify.
2435         * exec.c (set_section_command): Constify.
2436         * tracepoint.c (tdump_command, trace_variable_command)
2437         (tstatus_command, tstop_command, tstart_command)
2438         (end_actions_pseudocommand, while_stepping_pseudocommand)
2439         (collect_pseudocommand, teval_pseudocommand, actions_command)
2440         (start_tracing, stop_tracing): Constify.
2441         * value.c (init_if_undefined_command): Constify.
2442         * tui/tui-stack.c (tui_update_command): Constify.
2443         * tui/tui-win.c (tui_refresh_all_command)
2444         (tui_set_tab_width_command, tui_set_win_height_command)
2445         (tui_set_focus_command, tui_scroll_forward_command)
2446         (tui_scroll_backward_command, tui_scroll_left_command)
2447         (tui_scroll_right_command, parse_scrolling_args, tui_set_focus)
2448         (tui_set_win_height): Constify.
2449         * tui/tui-layout.c (tui_layout_command): Constify.
2450         * procfs.c (proc_trace_syscalls, proc_trace_sysentry_cmd)
2451         (proc_trace_sysexit_cmd, proc_untrace_sysentry_cmd)
2452         (proc_untrace_sysexit_cmd): Constify.
2453         * remote.c (threadlist_test_cmd, threadinfo_test_cmd)
2454         (threadset_test_cmd, threadlist_update_test_cmd)
2455         (threadalive_test): Constify.
2456         * objc-lang.c (print_object_command): Constify.
2457         * command.h (add_com): Constify.
2458         * cli/cli-dump.c (restore_command): Constify.
2459         * cli/cli-cmds.c (pwd_command, echo_command, quit_command)
2460         (help_command, complete_command, shell_command, edit_command)
2461         (list_command, disassemble_command, make_command)
2462         (apropos_command, alias_command): Constify.
2463         * cli/cli-script.c (document_command, define_command)
2464         (while_command, if_command, validate_comname): Constify.
2465         * cli/cli-decode.c (struct cmd_list_element): Change type of
2466         "fun".
2467         * target.c (do_monitor_command, flash_erase_command): Constify.
2468         * regcache.c (reg_flush_command): Constify.
2469         * reverse.c (reverse_step, reverse_next, reverse_stepi)
2470         (reverse_nexti, reverse_continue, reverse_finish)
2471         (save_bookmark_command, goto_bookmark_command)
2472         (exec_reverse_once): Constify.
2473         * python/python.c (python_interactive_command, python_command):
2474         Constify.
2475         * typeprint.c (ptype_command, whatis_command, whatis_exp):
2476         Constify.
2477         * solib.c (sharedlibrary_command, no_shared_libraries): Constify.
2478         * gcore.c (gcore_command): Constify.
2479
2480 2017-11-07  Tom Tromey  <tom@tromey.com>
2481
2482         * printcmd.c (x_command): Call set_repeat_arguments.
2483         * cli/cli-cmds.c (list_command): Call set_repeat_arguments.
2484         * top.c (repeat_arguments): New global.
2485         (set_repeat_arguments): New function.
2486         (execute_command): Handle repeat_arguments.
2487         (show_commands): Calls set_repeat_arguments.
2488         * command.h (set_repeat_arguments): Declare.
2489
2490 2017-11-07  Tom Tromey  <tom@tromey.com>
2491
2492         * stack.c (backtrace_command): Use std::string.
2493         (backtrace_command_1): Make "count_exp" const.
2494
2495 2017-11-07  Tom Tromey  <tom@tromey.com>
2496
2497         * source.c (directory_switch, mod_path, add_path): Constify.
2498         * defs.h (add_path, mod_path, directory_switch): Constify.
2499         * mi/mi-cmd-env.c (env_mod_path): Constify.
2500
2501 2017-11-07  Tom Tromey  <tom@tromey.com>
2502
2503         * infcmd.c (strip_bg_char): Return gdb::unique_xmalloc_ptr.
2504         (run_command_1, continue_command, step_1, jump_command)
2505         (signal_command, until_command, advance_command, finish_command)
2506         (attach_command): Update.
2507
2508 2017-11-07  Tom Tromey  <tom@tromey.com>
2509
2510         * command.h (set_cmd_cfunc): Don't declare.
2511         * cli/cli-decode.c (set_cmd_cfunc): Now static.
2512
2513 2017-11-07  Tom Tromey  <tom@tromey.com>
2514
2515         * stack.c (select_frame_command): Constify.
2516         * cli/cli-decode.c (add_com_suppress_notification): Constify.
2517         * command.h (add_com_suppress_notification): Constify.
2518
2519 2017-11-07  Tom Tromey  <tom@tromey.com>
2520
2521         * breakpoint.c (stop_command): Constify.
2522         * cli/cli-decode.c (struct cmd_list_element): Constify.
2523         * command.h (add_abbrev_prefix_cmd): Constify.
2524
2525 2017-11-07  Pedro Alves  <palves@redhat.com>
2526
2527         * breakpoint.c (extract_bp_kind): New enum.
2528         (extract_bp_num, extract_bp_or_bp_range): New functions, partially
2529         factored out from ...
2530         (extract_bp_number_and_location): ... here.
2531         * cli/cli-utils.c (get_number_trailer): Handle '-$variable'.
2532
2533 2017-11-07  Pedro Alves  <palves@redhat.com>
2534
2535         * breakpoint.c (extract_bp_number_and_location): Change return
2536         type to void.  Throw error instead of warning.
2537         (enable_disable_command): Adjust.
2538
2539 2017-11-07  Xavier Roirand  <roirand@adacore.com>
2540             Pedro Alves  <palves@redhat.com>
2541
2542         * breakpoint.c (map_breakpoint_number_range): New, factored out
2543         from ...
2544         (map_breakpoint_numbers): ... here.
2545         (find_location_by_number): Change parameters from string to
2546         breakpoint number and location.
2547         (extract_bp_number_and_location): New function.
2548         (enable_disable_bp_num_loc)
2549         (enable_disable_breakpoint_location_range)
2550         (enable_disable_command): New functions, factored out ...
2551         (enable_command, disable_command): ... these functions, and
2552         adjusted to support ranges.
2553         * NEWS: Document enable/disable breakpoint location range feature.
2554
2555 2017-11-06  Luis Machado  <luis.machado@linaro.org>
2556
2557         * MAINTAINERS (Write After Approval): Update my e-mail address.
2558
2559 2017-11-06  Pedro Alves  <palves@redhat.com>
2560
2561         * gnu-nat.c (gnu_terminal_init): Delete.
2562         (gnu_target): Don't install gnu_terminal_init.
2563         * inflow.c (child_terminal_init_with_pgrp): Delete, merged with ...
2564         (child_terminal_init): ... this function.
2565
2566 2017-11-06  Pedro Alves  <palves@redhat.com>
2567
2568         * common/common.m4 (GDB_AC_COMMON): No longer check termio.h nor
2569         sgtty.h.
2570         * config.in, configure: Regenerate.
2571
2572 2017-11-06  Pedro Alves  <palves@redhat.com>
2573
2574         * event-top.c: Check SIGTSTP instead of STOP_SIGNAL thoughout.
2575         (async_init_signals): Adjust.
2576         (handle_stop_sig): Rename to ...
2577         (handle_sigtstp): ... this.
2578         (async_stop_sig): Rename to ...
2579         (async_sigtstp_handler): ... this, and delete STOP_SIGNAL !=
2580         SIGTSTP path.
2581         * event-top.h: Move signal.h include to the top.  Check SIGTSTP
2582         instead of STOP_SIGNAL thoughout.
2583         (handle_stop_sig): Rename to ...
2584         (handle_sigtstp): ... this.
2585         * top.c (command_line_input): Replace STOP_SIGNAL -> SIGTSTP.
2586
2587 2017-11-06  Pedro Alves  <palves@redhat.com>
2588
2589         * inflow.c (child_terminal_inferior, child_terminal_ours_1): No
2590         longer set flags twice in row.
2591
2592 2017-11-06  Pedro Alves  <palves@redhat.com>
2593
2594         * Makefile.in (SER_HARDWIRE): Update comment.
2595         (HFILES_NO_SRCDIR): Remove gdb_termios.h.
2596         * common/gdb_termios.h: Delete file.
2597         * common/job-control.c: Include termios.h and unistd.h instead of
2598         gdb_termios.h.
2599         (gdb_setpgid): Remove HAVE_TERMIOS || TIOCGPGRP preprocessor
2600         check.
2601         (have_job_control): Check HAVE_TERMIOS_H instead of HAVE_TERMIOS.
2602         Remove sgtty code.
2603         * configure.ac: No longer check for termio.h and sgtty.h.
2604         * configure: Regenerate.
2605         * inflow.c: Include termios.h instead of gdb_termios.h.  Replace
2606         PROCESS_GROUP_TYPE checks with HAVE_TERMIOS_H checks throughout.
2607         Replace PROCESS_GROUP_TYPE references with pid_t references
2608         throughout.
2609         (gdb_getpgrp): Delete.
2610         (set_initial_gdb_ttystate): Use tcgetpgrp instead of gdb_getpgrp.
2611         (child_terminal_inferior): Remove comment.  Remove sgtty code.
2612         (child_terminal_ours_1): Use tcgetpgrp directly instead of
2613         gdb_getpgrp.  Use serial_set_tty_state instead aof
2614         serial_noflush_set_tty_state.  Remove sgtty code.
2615         * inflow.h: Include unistd.h instead of gdb_termios.h.  Replace
2616         PROCESS_GROUP_TYPE check with HAVE_TERMIOS_H check.
2617         (inferior_process_group): Now returns pid_t.
2618         * ser-base.c (ser_base_noflush_set_tty_state): Delete.
2619         * ser-base.h (ser_base_noflush_set_tty_state): Delete.
2620         * ser-event.c (serial_event_ops): Update.
2621         * ser-go32.c (dos_noflush_set_tty_state): Delete.
2622         (dos_ops): Update.
2623         * ser-mingw.c (hardwire_ops, tty_ops, pipe_ops, tcp_ops): Update.
2624         * ser-pipe.c (pipe_ops): Update.
2625         * ser-tcp.c (tcp_ops): Update.
2626         * ser-unix.c: Include termios.h instead of gdb_termios.h.  Remove
2627         HAVE_TERMIOS checks.
2628         [HAVE_TERMIO] (struct hardwire_ttystate): Delete.
2629         [HAVE_SGTTY] (struct hardwire_ttystate): Delete.
2630         (get_tty_state, set_tty_state): Drop termio and sgtty code, and
2631         assume termios.
2632         (hardwire_noflush_set_tty_state): Delete.
2633         (hardwire_print_tty_state, hardwire_drain_output)
2634         (hardwire_flush_output, hardwire_flush_input)
2635         (hardwire_send_break, hardwire_raw, hardwire_setbaudrate)
2636         (hardwire_setstopbits, hardwire_setparity): Drop termio and sgtty
2637         code, and assume termios.
2638         (hardwire_ops): Update.
2639         (_initialize_ser_hardwire): Remove HAVE_TERMIOS check.
2640         * serial.c (serial_noflush_set_tty_state): Delete.
2641         * serial.h (serial_noflush_set_tty_state): Delete.
2642         (serial_ops::noflush_set_tty_state): Delete.
2643
2644 2017-11-06  Ulrich Weigand  <uweigand@de.ibm.com>
2645
2646         * Makefile.in (SFILES): Remove doublest.c and dfp.c.
2647         (HFILES_NO_SRCDIR): Remove doublest.h and dfp.h.
2648         (COMMON_OBS): Remove doublest.o and dfp.o.
2649         Do not build target-float.c (instead of doublest.c)
2650         with -Wformat-nonliteral.
2651
2652         * doublest.c: Remove file.
2653         * doublest.h: Remove file.
2654         * dfp.c: Remove file.
2655         * dfp.h: Remove file.
2656
2657         * target-float.c: Do not include "doublest.h" and "dfp.h".
2658         (DOUBLEST): Move here from doublest.h.
2659         (enum float_kind): Likewise.
2660         (FLOATFORMAT_CHAR_BIT): Likewise.
2661         (FLOATFORMAT_LARGEST_BYTES): Likewise.
2662         (floatformat_totalsize_bytes): Move here from doublest.c.  Make static.
2663         (floatformat_precision): Likewise.
2664         (floatformat_normalize_byteorder, get_field, put_field): Likewise.
2665         (floatformat_is_negative, floatformat_classify, floatformat_mantissa):
2666         Likewise.
2667         (host_float_format, host_double_format, host_long_double_format):
2668         Likewise.
2669         (floatformat_to_string, floatformat_from_string): Likewise.
2670         (floatformat_to_doublest): Likewise.  Also, inline the original
2671         convert_floatformat_to_doublest.
2672         (floatformat_from_doublest): Likewise.  Also, inline the original
2673         convert_floatformat_from_doublest.
2674
2675         Include "dpd/decimal128.h", "dpd/decimal64.h", and "dpd/decimal32.h".
2676         (MAX_DECIMAL_STRING): Move here from dfp.c.
2677         (match_endianness): Likewise.
2678         (set_decnumber_context, decimal_check_errors): Likewise.
2679         (decimal_from_number, decimal_to_number): Likewise.
2680         (decimal_to_string, decimal_from_string): Likewise.  Make static.
2681         (decimal_from_longest, decimal_from_ulongest): Likewise.
2682         (decimal_to_longest): Likewise.
2683         (decimal_binop, decimal_is_zero, decimal_compare): Likewise.
2684         (decimal_convert): Likewise.
2685
2686 2017-11-06  Ulrich Weigand  <uweigand@de.ibm.com>
2687
2688         * doublest.c: Do not include "gdbtypes.h".
2689         (extract_typed_floating): Remove.
2690         (store_typed_floating): Remove.
2691         (convert_typed_floating): Remove.
2692         * doublest.h (struct type): Remove.
2693         (DOUBLEST_PRINT_FORMAT): Remove.
2694         (DOUBLEST_SCAN_FORMAT): Remove.
2695         (extract_typed_floating): Remove.
2696         (store_typed_floating): Remove.
2697         (convert_typed_floating): Remove.
2698
2699         * dfp.c (decimal_from_doublest): Remove.
2700         (decimal_to_doublest): Remove.
2701         * dfp.h: Do not include "doublest.h".
2702         (decimal_from_doublest): Remove.
2703         (decimal_to_doublest): Remove.
2704
2705         * value.c: Do not include "doublest.h" and "dfp.h".
2706         (value_as_double): Remove.
2707         (unpack_double): Remove.
2708         (value_from_double): Remove.
2709         (value_from_decfloat): Remove.
2710         * value.h: Do not include "doublest.h".
2711         (value_as_double): Remove.
2712         (unpack_double): Remove.
2713         (value_from_double): Remove.
2714         (value_from_decfloat): Remove.
2715
2716 2017-11-06  Ulrich Weigand  <uweigand@de.ibm.com>
2717
2718         * i386-tdep.c: Include "target-float.h".  Do not include "doublest.h".
2719         (i386_extract_return_value): Use target_float_convert.
2720         (i386_store_return_value): Likewise.
2721         * i387-tdep.c (i387_register_to_value): Use target_float_convert.
2722         (i387_value_to_register): Likewise.
2723         * ia64-tdep.c: Include "target-float.h".  Do not include "doublest.h".
2724         (ia64_register_to_value): Use target_float_convert.
2725         (ia64_value_to_register): Likewise.
2726         (ia64_extract_return_value): Likewise.
2727         (ia64_store_return_value): Likewise.
2728         (ia64_push_dummy_call): Likewise.
2729         * m68k-tdep.c: Include "target-float.h".
2730         (m68k_register_to_value): Use target_float_convert.
2731         (m68k_value_to_register): Likewise.
2732         (m68k_svr4_extract_return_value): Likewise.
2733         (m68k_svr4_store_return_value): Likewise.
2734         * ppc-sysv-tdep.c: Include "target-float.h".
2735         (ppc_sysv_abi_push_dummy_call): Use target_float_convert.
2736         (do_ppc_sysv_return_value): Likewise.
2737         (ppc64_sysv_abi_push_freg): Likewise.
2738         (ppc64_sysv_abi_return_value_base): Likewise.
2739         * rs6000-aix-tdep.c: Include "target-float.h".
2740         (rs6000_push_dummy_call): Use target_float_convert.
2741         (rs6000_return_value): Likewise.
2742         * rs6000-lynx178-tdep.c: Include "target-float.h".
2743         (rs6000_lynx178_push_dummy_call): Use target_float_convert.
2744         (rs6000_lynx178_return_value): Likewise.
2745         * rs6000-tdep.c: Include "target-float.h".  Do not include "doublest.h".
2746         (rs6000_register_to_value): Use target_float_convert.
2747         (rs6000_value_to_register): Likewise.
2748         * arm-tdep.c: Include "target-float.h".  Do not include "doublest.h".
2749         (arm_extract_return_value): Use target_float_convert.
2750         (arm_store_return_value): Likewise.
2751         * sh-tdep.c: Include "target-float.h".  Do not include "doublest.h".
2752         (sh_register_convert_to_virtual): Use target_float_convert.
2753         (sh_register_convert_to_raw): Likewise.
2754         * sh64-tdep.c: Include "target-float.h".
2755         (sh64_extract_return_value): Use target_float_convert.
2756         (sh64_register_convert_to_virtual): Likewise.
2757         (sh64_register_convert_to_raw): Likewise.  Fix argument types.
2758
2759 2017-11-06  Ulrich Weigand  <uweigand@de.ibm.com>
2760
2761         * target-float.c (floatformat_to_host_double): New function.
2762         (floatformat_from_host_double): Likewise.
2763         (target_float_to_host_double): Likewise.
2764         (target_float_from_host_double): Likewise.
2765         * target-float.h (target_float_to_host_double): Add prototype.
2766         (target_float_from_host_double): Likewise.
2767
2768         * guile/scm-value.c: Include "target-float.h".
2769         (gdbscm_value_to_real): Use target_float_to_host_double.
2770         Handle integer source values via value_as_long.
2771         * guile/scm-math.c: Include "target-float.h".  Do not include
2772         "doublest.h", "dfp.h", and "expression.h".
2773         (vlscm_convert_typed_number): Use target_float_from_host_double.
2774         (vlscm_convert_number): Likewise.
2775
2776         * python/py-value.c (valpy_float): Use target_float_to_host_double.
2777         (convert_value_from_python): Use target_float_from_host_double.
2778
2779 2017-11-06  Ulrich Weigand  <uweigand@de.ibm.com>
2780
2781         * ada-lang.c (cast_to_fixed): Reimplement in target arithmetic.
2782         (cast_from_fixed): Likewise.
2783         (ada_scaling_type): New function.
2784         (ada_delta): Return value instead of DOUBLEST.  Perform target
2785         arithmetic instead of host arithmetic.
2786         (scaling_factor): Rename to ...
2787         (ada_scaling_factor) ... this.  Make non-static.  Return value instead
2788         of DOUBLEST.  Perform target arithmetic instead of host arithmetic.
2789         (ada_fixed_to_float): Remove.
2790         (ada_float_to_fixed): Remove.
2791         * ada-lang.h (ada_fixed_to_float): Remove.
2792         (ada_float_to_fixed): Remove.
2793         (ada_delta): Return value instead of DOUBLEST.
2794         (ada_scaling_factor): Add prototype.
2795
2796         * ada-typeprint.c: Include "target-float.h".
2797         (print_fixed_point_type): Perform target arithmetic instead of
2798         host arithmetic.
2799         * ada-valprint.c: Include "target-float.h".
2800         (ada_val_print_num): Perform target arithmetic instead of
2801         host arithmetic for fixed-point types.
2802
2803 2017-11-06  Ulrich Weigand  <uweigand@de.ibm.com>
2804
2805         * target-float.c: Include <math.h>.
2806         (floatformat_binop): New function.
2807         (floatformat_compare): Likewise.
2808         (target_float_binop): Likewise.
2809         (target_float_compare): Likewise.
2810         * target-float.h: Include "expression.h".
2811         (target_float_binop): Add prototype.
2812         (target_float_compare): Likewise.
2813
2814         * valarith.c: Do not include "doublest.h" and "dfp.h".
2815         Include "common/byte-vector.h".
2816         (value_args_as_decimal): Remove, replace by ...
2817         (value_args_as_target_float): ... this function.  Handle both
2818         binary and decimal target floating-point formats.
2819         (scalar_binop): Handle both binary and decimal FP using
2820         value_args_as_target_float and target_float_binop.
2821         (value_equal): Handle both binary and decimal FP using
2822         value_args_as_target_float and target_float_compare.
2823         (value_less): Likewise.
2824         (value_pos): Handle all scalar types as simple copy.
2825         (value_neg): Handle all scalar types via BINOP_SUB from 0.
2826         * dfp.c (decimal_binop): Throw error instead of internal_error
2827         when called with an unsupported operation code.
2828
2829 2017-11-06  Ulrich Weigand  <uweigand@de.ibm.com>
2830
2831         * target-float.c (target_float_to_string): New function.
2832         (target_float_from_string): New function.
2833         * target-float.h (target_float_to_string): Add prototype.
2834         (target_float_from_string): Add prototype.
2835
2836         * valprint.c: Include "target-float.h".  Do not include
2837         "doublest.h" and "dfp.h".
2838         (print_floating): Use target_float_to_string.
2839         * printcmd.c: Include "target-float.h".  Do not include "dfp.h".
2840         (printf_floating): Use target_float_to_string.
2841         * i387-tdep.c: Include "target-float.h".  Do not include "doublest.h".
2842         (print_i387_value): Use target_float_to_string.
2843         * mips-tdep.c: Include "target-float.h".
2844         (mips_print_fp_register): Use target_float_to_string.
2845         * sh64-tdep.c: Include "target-float.h".
2846         (sh64_do_fp_register): Use target_float_to_string.
2847
2848         * parse.c: Include "target-float.h".  Do not include
2849         "doublest.h" and "dfp.h".
2850         (parse_float): Use target_float_from_string.
2851         * stabsread.c: Include "target-float.h".  Do not include "doublest.h".
2852         (define_symbol): Use target_float_from_string.
2853         * gdbarch-selftests.c: Include "target-float.h".
2854         (register_to_value_test): Use target_float_from_string.
2855
2856 2017-11-06  Ulrich Weigand  <uweigand@de.ibm.com>
2857
2858         * Makefile.c (SFILES): Add target-float.c.
2859         (HFILES_NO_SRCDIR): Add target-float.h.
2860         (COMMON_OBS): Add target-float.o.
2861         * target-float.h: New file.
2862         * target-float.c: New file.
2863
2864         * doublest.c (floatformat_classify): Fix detection of float_zero.
2865
2866         * gdbtypes.c (is_floating_type): New function.
2867         * gdbtypes.h (is_floating_type): Add prototype.
2868
2869         * value.c: Do not include "floatformat.h".
2870         (unpack_double): Use target_float_is_valid.
2871         (is_floating_value): New function.
2872         * value.h (is_floating_value): Add prototype-
2873
2874         * valarith.c: Include "target-float.h".
2875         (value_logical_not): Use target_float_is_zero.
2876
2877         * python/py-value.c: Include "target-float.h".
2878         (valpy_nonzero): Use target_float_is_zero.
2879
2880 2017-11-04  Tom Tromey  <tom@tromey.com>
2881
2882         * h8300-tdep.c (h8300_push_dummy_call): Use std::vector.
2883
2884 2017-11-04  Tom Tromey  <tom@tromey.com>
2885
2886         * breakpoint.c (set_momentary_breakpoint): Return
2887         breakpoint_up.
2888         (until_break_command): Update.
2889         (new_until_break_fsm): Change argument types to
2890         breakpoint_up.
2891         (set_momentary_breakpoint_at_pc): Return breakpoint_up.
2892         (do_delete_breakpoint_cleanup, make_cleanup_delete_breakpoint):
2893         Remove.
2894         * infcmd.c (finish_forward): Update.
2895         * breakpoint.h (set_momentary_breakpoint)
2896         (set_momentary_breakpoint_at_pc): Return breakpoint_up.
2897         (make_cleanup_delete_breakpoint): Remove.
2898         (struct breakpoint_deleter): New.
2899         (breakpoint_up): New typedef.
2900         * infrun.c (insert_step_resume_breakpoint_at_sal_1): Update.
2901         (insert_exception_resume_breakpoint): Update.
2902         (insert_exception_resume_from_probe): Update.
2903         (insert_longjmp_resume_breakpoint): Update.
2904         * arm-linux-tdep.c (arm_linux_copy_svc): Update.
2905         * elfread.c (elf_gnu_ifunc_resolver_stop): Update.
2906         * infcall.c (call_function_by_hand_dummy): Update
2907
2908 2017-11-04  Tom Tromey  <tom@tromey.com>
2909
2910         * c-typeprint.c (c_type_print_base): Use gdb::unique_xmalloc_ptr.
2911
2912 2017-11-04  Tom Tromey  <tom@tromey.com>
2913
2914         * linux-tdep.c (linux_core_info_proc_mappings): Use
2915         gdb::def_vector.
2916         (linux_get_siginfo_data): Return gdb::byte_vector.  Remove
2917         "size" argument.
2918         (linux_corefile_thread): Update.
2919         (linux_make_corefile_notes): Remove unused variable.
2920
2921 2017-11-04  Tom Tromey  <tom@tromey.com>
2922
2923         * ppc-linux-tdep.c (ppc_linux_get_syscall_number): Use
2924         gdb::byte_vector.
2925
2926 2017-11-04  Tom Tromey  <tom@tromey.com>
2927
2928         * objfiles.c (do_free_objfile_cleanup): Remove.
2929         * compile/compile-object-load.c (compile_object_load): Update.
2930         * objfiles.h (make_cleanup_free_objfile): Remove.
2931
2932 2017-11-04  Tom Tromey  <tom@tromey.com>
2933
2934         * sparc64-tdep.c (do_examine): Use gdb::def_vector.
2935         (adi_read_versions): Change "tags" to "gdb_byte *".
2936         (adi_print_versions): Likewise.
2937
2938 2017-11-04  Tom Tromey  <tom@tromey.com>
2939
2940         * breakpoint.c
2941         (scoped_rbreak_breakpoints::scoped_rbreak_breakpoints): Rename
2942         from start_rbreak_breakpoints.
2943         (scoped_rbreak_breakpoints): Rename from end_rbreak_breakpoints.
2944         * breakpoint.h (class scoped_rbreak_breakpoints): New.
2945         (start_rbreak_breakpoints, end_rbreak_breakpoints): Remove.
2946         * symtab.c (do_end_rbreak_breakpoints): Remove.
2947         (rbreak_command): Use scoped_rbreak_breakpoints, std::string.
2948
2949 2017-11-04  Tom Tromey  <tom@tromey.com>
2950
2951         * cp-namespace.c (reset_directive_searched): Remove.
2952         (cp_lookup_symbol_via_imports): Use scoped_restore.
2953         * cp-support.c (reset_directive_searched): Remove.
2954         (make_symbol_overload_list_using): Use scoped_restore.
2955         * d-namespace.c (d_lookup_symbol_imports): Use scoped_restore.
2956         (reset_directive_searched): Remove.
2957
2958 2017-11-04  Tom Tromey  <tom@tromey.com>
2959
2960         * symfile.c (find_separate_debug_file_by_debuglink): Use
2961         unique_xmalloc_ptr.
2962
2963 2017-11-04  Tom Tromey  <tom@tromey.com>
2964
2965         * compile/compile-loc2c.c (compute_stack_depth_worker): Change
2966         type of "info".
2967         (compute_stack_depth): Likewise.
2968         (do_compile_dwarf_expr_to_c): Use std::vector.
2969
2970 2017-11-04  Tom Tromey  <tom@tromey.com>
2971
2972         * compile/compile-object-load.c (link_callbacks_einfo): Use
2973         std::string.
2974
2975 2017-11-04  Tom Tromey  <tom@tromey.com>
2976
2977         * dwarf2read.c (process_full_comp_unit, process_full_type_unit):
2978         Use scoped_free_pendings.
2979         * dbxread.c (dbx_symfile_read, dbx_psymtab_to_symtab_1): Use
2980         scoped_free_pendings.
2981         * xcoffread.c (xcoff_psymtab_to_symtab_1): Use scoped_free_pendings.
2982         (xcoff_initial_scan): Likewise.
2983         * buildsym.c (reset_symtab_globals): Update comment.
2984         (scoped_free_pendings): Rename from really_free_pendings.
2985         (prepare_for_building): Update comment.
2986         (buildsym_init): Likewise.
2987         * buildsym.h (class scoped_free_pendings): New class.
2988         (really_free_pendings): Don't declare.
2989
2990 2017-11-03  Ulrich Weigand  <uweigand@de.ibm.com>
2991
2992         * doublest.c (convert_doublest_to_floatformat): Fix uninitialized
2993         output when converting a zero value to a special byteorder format.
2994
2995 2017-11-02  Yao Qi  <yao.qi@linaro.org>
2996
2997         * frame.c (do_frame_register_read): Remove aspace.
2998         * jit.c (jit_frame_sniffer): Likwise.
2999         * ppc-linux-tdep.c (ppu2spu_sniffer): Likewise.
3000         * regcache.c (regcache::regcache): Pass nullptr.
3001         (regcache_print): Caller updated.
3002         * regcache.h (regcache::regcache): Remove one constructor
3003         parameter aspace.
3004
3005 2017-11-02  Yao Qi  <yao.qi@linaro.org>
3006
3007         * regcache.h (regcache) <m_readonly_p>: Change it to const bool.
3008
3009 2017-11-02  Yao Qi  <yao.qi@linaro.org>
3010
3011         * breakpoint.c (insert_single_step_breakpoints): Update.
3012         * frame.c (struct frame_info) <aspace>: Add const.
3013         (frame_save_as_regcache): Add const.
3014         (get_frame_address_space): Return const address_space *.
3015         * frame.h (get_frame_address_space): Update declaration.
3016         * infrun.c (struct step_over_info) <aspace>: Add const.
3017         (set_step_over_info): Make aspace const.
3018         (displaced_step_prepare_throw): Change variable const.
3019         (resume): Likewise.
3020         (proceed): Likewise.
3021         (adjust_pc_after_break): Likewise.
3022         (save_waitstatus): Likewise.
3023         (handle_signal_stop): Likewise.
3024         (keep_going_pass_signal): Likewise.
3025         * jit.c (jit_frame_sniffer): Add const.
3026         * mips-tdep.c (mips_single_step_through_delay): Likewise.
3027         * ppc-linux-tdep.c (ppu2spu_sniffer): Likewise.
3028         * record-full.c (record_full_wait_1): Likewise.
3029         * regcache.c (regcache::regcache): Change parameter to const.
3030         * regcache.h (regcache::regcache): Likewise.
3031         (regcache::aspace): Return const address_space *.
3032         (regcache) <m_aspace>: Add const.
3033
3034 2017-11-02  Yao Qi  <yao.qi@linaro.org>
3035
3036         * darwin-nat.c (cancel_breakpoint): Use regcache->aspace ().
3037         * frame.c (create_sentinel_frame): Likewise.
3038         * infrun.c (displaced_step_prepare_throw): Likewise.
3039         (resume): Likewise.
3040         (thread_still_needs_step_over_bp): Likewise.
3041         (proceed): Likewise.
3042         (do_target_wait): Likewise.
3043         (adjust_pc_after_break): Likewise.
3044         (handle_syscall_event): Likewise.
3045         (save_waitstatus): Likewise.
3046         (handle_inferior_event_1): Likewise.
3047         (handle_signal_stop): Likewise.
3048         (keep_going_pass_signal): Likewise.
3049         * linux-nat.c (status_callback): Likewise.
3050         (save_stop_reason): Likewise.
3051         (resume_stopped_resumed_lwps): Likewise.
3052         * record-full.c (record_full_exec_insn): Likewise.
3053         (record_full_wait_1): Likewise.
3054         * regcache.c (get_regcache_aspace): Remove.
3055         * regcache.h (get_regcache_aspace): Remove.
3056
3057 2017-11-02  Yao Qi  <yao.qi@linaro.org>
3058
3059         * regcache.c (struct regcache_descr) <nr_raw_registers>: Remove.
3060         (init_regcache_descr): Use gdbarch_num_regs.
3061         (regcache::regcache): Likewise.
3062         (regcache::get_register_status): Likewise.
3063         (regcache::assert_raw_regnum): Likewise.
3064         (regcache::cooked_read): Likewise.
3065         (regcache::cooked_read_value): Likewise.
3066         (regcache::cooked_write): Likewise.
3067         (regcache::dump): Likewise.
3068         (regcache::num_raw_registers): New method.
3069         * regcache.h (class regcache) <num_raw_registers>: New.
3070
3071 2017-11-02  Yao Qi  <yao.qi@linaro.org>
3072
3073         * regcache.c (regcache::assert_regnum): New method.
3074         (regcache::invalidate): Call assert_regnum.
3075         (regcache::raw_update): Likewise.
3076         (regcache::raw_write): Likewise.
3077         (regcache::raw_read_part): Likewise.
3078         (regcache::raw_write_part): Likewise.
3079         (regcache::raw_supply): Likewise.
3080         (regcache::raw_supply_integer): Likewise.
3081         (regcache::raw_supply_zeroed): Likewise.
3082         (regcache::raw_collect): Likewise.
3083         (regcache::raw_collect_integer): Likewise.
3084         * regcache.h (regcache::assert_regnum): Declare.
3085
3086 2017-11-02  Yao Qi  <yao.qi@linaro.org>
3087
3088         * regcache.c (regcache::dump): Remove code.
3089
3090 2017-11-02  Yao Qi  <yao.qi@linaro.org>
3091
3092         * regcache.c (struct regcache_descr) <sizeof_raw_register_status>:
3093         Remove.
3094         <sizeof_cooked_register_status>: Remove.
3095         (init_regcache_descr): Update.
3096         (regcache::regcache): Use nr_cooked_registers and nr_raw_registers.
3097         (regcache::save): Likewise.
3098         (regcache::dump): Likewise.
3099
3100 2017-11-01  James Bowman  <james.bowman@ftdichip.com>
3101
3102         * ft32-tdep.c (ft32_fetch_instruction): New function.
3103         (ft32_analyze_prologue): Use ft32_fetch_instruction().
3104
3105 2017-10-31  Simon Marchi  <simon.marchi@polymtl.ca>
3106
3107         * cli/cli-script.c (execute_control_command): Rename to ...
3108         (execute_control_command_1): ... this.
3109         (execute_control_command): New function.
3110
3111 2017-10-31  Simon Marchi  <simon.marchi@ericsson.com>
3112
3113         * tracepoint.c (tfind_command): Remove const_cast.
3114
3115 2017-10-30  Mike Gulick  <mgulick@mathworks.com>
3116
3117         * Makefile.in (HFILES_NO_SRCDIR): Remove reference to gdb.h.
3118
3119 2017-10-30  Simon Marchi  <simon.marchi@ericsson.com>
3120
3121         * common/common-utils.h (in_inclusive_range): New function.
3122         * arm-tdep.c (arm_record_extension_space): Use
3123         in_inclusive_range.
3124         (thumb_record_ld_st_reg_offset): Use in_inclusive_range.
3125         * cris-tdep.c (cris_spec_reg_applicable): Use
3126         in_inclusive_range.
3127
3128 2017-10-30  Pedro Alves  <palves@redhat.com>
3129             Simon Marchi <simon.marchi@ericsson.com>
3130
3131         * remote.c (remote_set_syscall_catchpoint): Build a std::string
3132         instead of a gdb::unique_xmalloc_ptr, using string_appendf.
3133
3134 2017-10-30  Pedro Alves  <palves@redhat.com>
3135
3136         * common/common-utils.c (string_appendf, string_vappendf): New
3137         functions.
3138         * common/common-utils.h (string_appendf, string_vappendf): New
3139         declarations.
3140         * unittests/common-utils-selftests.c (string_appendf_func)
3141         (test_appendf_func, string_vappendf_wrapper, string_appendf_tests)
3142         (string_vappendf_tests): New functions.
3143         (_initialize_common_utils_selftests): Register "string_appendf" and
3144         "string_vappendf tests".
3145
3146 2017-10-30  Pedro Alves  <palves@redhat.com>
3147
3148         * unittests/common-utils-selftests.c (format_func): New typedef.
3149         (string_printf_tests, string_vprintf_tests): Tests factored out
3150         and merged to ...
3151         (test_format_func): ... this new function.
3152         (string_printf_tests, string_vprintf_tests): Reimplement on top of
3153         test_format_func.
3154
3155 2017-10-29  Simon Marchi  <simon.marchi@ericsson.com>
3156
3157         * darwin-nat.c: Remove include of gdb.h.
3158
3159 2017-10-29  Simon Marchi  <simon.marchi@ericsson.com>
3160
3161         * xtensa-xtregs.c: Fix formatting issues.
3162
3163 2017-10-29  Simon Marchi  <simon.marchi@ericsson.com>
3164
3165         * xtensa-xtregs.c (xtensa_regtable_t) <name>: Constify.
3166
3167 2017-10-28  Maksim Dzabraev  <dzabraew@gmail.com>
3168
3169         PR python/21213
3170         * python/py-infthread.c (thpy_get_inferior): Increment reference
3171         of inferior before returning it.
3172
3173 2017-10-27  Simon Marchi  <simon.marchi@ericsson.com>
3174
3175         * unittests/common-utils-selftests.c (format): Add
3176         ATTRIBUTE_PRINTF.
3177
3178 2017-10-27  Simon Marchi  <simon.marchi@polymtl.ca>
3179
3180         * xml-syscall.c (struct syscall_desc): Add constructor.
3181         <name>: Change type to std::string.
3182         (syscall_desc_up): New typedef.
3183         (syscall_desc_p): Remove typeder.
3184         (DEF_VEC_P(syscall_desc_p)): Remove.
3185         (struct syscall_group_desc): Add constructor.
3186         <name>: Change type to std::string.
3187         <syscalls>: Change type to std::vector.
3188         (syscall_group_desc_up): New typedef.
3189         (syscall_group_desc_p): Remove typedef.
3190         (DEF_VEC_P(syscall_group_desc_p)): Remove.
3191         (struct syscalls_info) <syscalls>: Change type to std::vector of
3192         unique_ptr.
3193         <groups>: Likewise.
3194         <my_gdb_datadir>: Change type to std::string.
3195         (syscalls_info_up): New typedef.
3196         (allocate_syscalls_info): Remove.
3197         (syscalls_info_free_syscalls_desc): Remove.
3198         (syscalls_info_free_syscall_group_desc): Remove.
3199         (free_syscalls_info): Remove.
3200         (make_cleanup_free_syscalls_info): Remove.
3201         (syscall_group_create_syscall_group_desc): Adjust.
3202         (syscall_group_add_syscall): Adjust.
3203         (syscall_create_syscall_desc): Adjust.
3204         (syscall_parse_xml): Adjust, use unique_ptr instead of cleanup.
3205         (init_syscalls_info): Adjust.
3206         (syscall_group_get_group_by_name): Adjust.
3207         (xml_get_syscall_number): Adjust.
3208         (xml_get_syscall_name): Adjust.
3209         (xml_list_of_syscalls): Adjust.
3210         (xml_list_syscalls_by_group): Adjust.
3211         (xml_list_of_groups): Adjust.
3212
3213 2017-10-27  Simon Marchi  <simon.marchi@ericsson.com>
3214
3215         * probe.h: Don't include gdb_vecs.h.
3216         (DEF_VEC_P (probe_p)): Remove.
3217         (find_probes_in_objfile): Return an std::vector.
3218         * probe.c (find_probes_in_objfile): Likewise.
3219         * breakpoint.c (breakpoint_objfile_data)
3220         <longjmp_probes>: Change type to std::vector.
3221         <exception_probes>: Likewise.
3222         (free_breakpoint_probes): Don't manually free vectors.
3223         (create_longjmp_master_breakpoint): Adjust.
3224         (create_exception_master_breakpoint): Adjust.
3225         * solib-svr4.c (svr4_create_probe_breakpoints): Change
3226         parameter type, adjust.
3227         (svr4_create_solib_event_breakpoints): Adjust.
3228
3229 2017-10-27  Simon Marchi  <simon.marchi@ericsson.com>
3230
3231         * breakpoint.c (breakpoint_objfile_data): Initialize fields.
3232         (get_breakpoint_objfile_data): Allocate breakpoint_objfile_data
3233         with new.
3234         (free_breakpoint_probes): Rename to ...
3235         (free_breakpoint_objfile_data): ... this, and call delete on
3236         bp_objfile_data..
3237
3238 2017-10-27  Simon Marchi  <simon.marchi@polymtl.ca>
3239
3240         * auto-load.c: Don't include gdb_vecs.h, include algorithm.
3241         (loaded_script_ptr): Remove typedef.
3242         (DEF_VEC_P (loaded_script_ptr)): Remove.
3243         (struct collect_matching_scripts_data): Add constructor.
3244         <scripts_p>: Change type to (pointer to) std::vector.
3245         (collect_matching_scripts_data): Adjust.
3246         (sort_scripts_by_name): Make suitable for std::sort.
3247         (print_scripts): Don't sort vector, adjust to std::vector.
3248         (auto_load_info_scripts): Sort vectors, adjust to std::vector.
3249
3250 2017-10-27  Simon Marchi  <simon.marchi@ericsson.com>
3251
3252         * symfile.c (filename_language): Make struct, not typedef.  Add
3253         constructor.
3254         <ext>: Change type to std::string.
3255         (DEF_VEC_O (filename_language)): Remove.
3256         (filename_language_table): Change type to std::vector.
3257         (add_filename_language): Adjust.
3258         (set_ext_lang_command): Adjust.
3259         (info_ext_lang_command): Adjust.
3260         (deduce_language_from_filename): Adjust.
3261         (class scoped_restore_filename_language_table): Remove.
3262         (test_filename_language): Use scoped_restore.
3263         (test_set_ext_lang_command): Use scoped_restore, adjust to
3264         std::vector change.
3265
3266 2017-10-27  Simon Marchi  <simon.marchi@ericsson.com>
3267
3268         * symfile.c: Include selftest.h.
3269         (class scoped_restore_filename_language_table): New.
3270         (test_filename_language): New test.
3271         (test_set_ext_lang_command): New test.
3272         (_initialize_symfile): Register tests.
3273
3274 2017-10-27  Keith Seitz  <keiths@redhat.com>
3275
3276         * breakpoint.c (print_breakpoint_location): Use the symbol saved
3277         in the bp_location, falling back to find_pc_sect_function when
3278         needed.
3279         (add_location_to_breakpoint): Save sal->symbol.
3280         * breakpoint.h (struct bp_location) <symbol>: New field.
3281         * symtab.c (find_function_start_sal): Save the symbol into the SaL.
3282         * symtab.h (struct symtab_and_line) <symbol>: New field.
3283
3284 2017-10-26  Patrick Frants  <osscontribute@gmail.com>
3285
3286         PR gdb/13669
3287         * cp-valprint.c (cp_print_value_fields): Use obstack_blank_fast
3288         to rewind obstack.
3289
3290 2017-10-26  Pedro Alves  <palves@redhat.com>
3291
3292         * remote.c (remote_async_terminal_ours_p): Delete.
3293         (remote_open_1, remote_terminal_inferior, remote_terminal_ours):
3294         Remove references to 'remote_async_terminal_ours_p'.
3295
3296 2017-10-26  Yao Qi  <yao.qi@linaro.org>
3297
3298         * breakpoint.h (regular_breakpoint_inserted_here_p): Remove.
3299
3300 2017-10-26  Yao Qi  <yao.qi@linaro.org>
3301
3302         * break-catch-sig.c (signal_catchpoint_breakpoint_hit): Make
3303         aspace const.
3304         * break-catch-syscall.c (breakpoint_hit_catch_syscall):
3305         Likewise.
3306         * breakpoint.c (bpstat_check_location): Remove cast.
3307         (breakpoint_hit_catch_fork): Make aspce const.
3308         (breakpoint_hit_catch_solib): Likewise.
3309         (breakpoint_hit_catch_exec): Likewise.
3310         (breakpoint_hit_ranged_breakpoint): Likewise.
3311         (breakpoint_hit_watchpoint): Likewise.
3312         (base_breakpoint_breakpoint_hit): Likewise.
3313         (bkpt_breakpoint_hit): Likewise.
3314         (dprintf_breakpoint_hit): Likewise.
3315         (tracepoint_breakpoint_hit): Likewise.
3316         * breakpoint.h (breakpoint_ops) <breakpoint_hit>: Likewise.
3317
3318 2017-10-26  Yao Qi  <yao.qi@linaro.org>
3319
3320         * breakpoint.c (breakpoint_location_address_match): Change
3321         "struct address_space *" to "const address_space".
3322         (breakpoint_location_address_range_overlap): Likewise.
3323         (breakpoint_here_p): Likewise.
3324         (breakpoint_in_range_p): Likewise.
3325         (moribund_breakpoint_here_p): Likewise.
3326         (bp_location_inserted_here_p): Likewise.
3327         (software_breakpoint_inserted_here_p): Likewise.
3328         (hardware_breakpoint_inserted_here_p): Likewise.
3329         (hardware_watchpoint_inserted_in_range): Likewise.
3330         (bpstat_check_location): Likewise.
3331         (bpstat_stop_status): Likewise.
3332         (breakpoint_address_match): Likewise.
3333         (breakpoint_address_match_range): Likewise.
3334         (breakpoint_location_address_match): Likewise.
3335         (breakpoint_location_address_range_overlap): Likewise.
3336         (insert_single_step_breakpoint): Likewise.
3337         (breakpoint_has_location_inserted_here): Likewise.
3338         (single_step_breakpoint_inserted_here_p): Likewise.
3339         (pc_at_non_inline_function): Likewise.
3340         * breakpoint.h (bpstat_stop_status): Update declaration.
3341         (breakpoint_here_p): Likewise.
3342         (breakpoint_in_range_p): Likewise.
3343         (moribund_breakpoint_here_p): Likewise.
3344         (breakpoint_inserted_here_p): Likewise.
3345         (software_breakpoint_inserted_here_p): Likewise.
3346         (hardware_breakpoint_inserted_here_p): Likewise.
3347         (breakpoint_has_location_inserted_here): Likewise.
3348         (single_step_breakpoint_inserted_here_p): Likewise.
3349         (hardware_watchpoint_inserted_in_range): Likewise.
3350         (breakpoint_address_match): Likewise.
3351         (insert_single_step_breakpoint): Likewise.
3352         (pc_at_non_inline_function): Likewise.
3353         * gdbthread.h (thread_has_single_step_breakpoint_here): Likewise.
3354         * record.c (record_check_stopped_by_breakpoint): Likewise.
3355         * record.h (record_check_stopped_by_breakpoint): Likewise.
3356         * thread.c (thread_has_single_step_breakpoint_here): Likewise.
3357
3358 2017-10-25  Yao Qi  <yao.qi@linaro.org>
3359
3360         * aarch32-linux-nat.c (aarch32_gp_regcache_supply): Use
3361         regcache->arch () instead get_regcache_arch.
3362         * aarch64-fbsd-nat.c (aarch64_fbsd_fetch_inferior_registers):
3363         Likewise.
3364         (aarch64_fbsd_store_inferior_registers): Likewise.
3365         * aarch64-linux-nat.c (fetch_gregs_from_thread): Likewise.
3366         (store_gregs_to_thread): Likewise.
3367         (fetch_fpregs_from_thread): Likewise.
3368         (store_fpregs_to_thread): Likewise.
3369         * aarch64-tdep.c (aarch64_extract_return_value): Likewise.
3370         (aarch64_store_return_value): Likewise.
3371         (aarch64_software_single_step): Likewise.
3372         * aix-thread.c (aix_thread_wait): Likewise.
3373         (supply_reg32): Likewise.
3374         (supply_sprs64): Likewise.
3375         (supply_sprs32): Likewise.
3376         (fill_gprs64): Likewise.
3377         (fill_gprs32): Likewise.
3378         (fill_sprs64): Likewise.
3379         (fill_sprs32): Likewise.
3380         (store_regs_user_thread): Likewise.
3381         (store_regs_kernel_thread): Likewise.
3382         * alpha-bsd-nat.c (alphabsd_fetch_inferior_registers): Likewise.
3383         (alphabsd_store_inferior_registers): Likewise.
3384         * alpha-tdep.c (alpha_extract_return_value): Likewise.
3385         (alpha_store_return_value): Likewise.
3386         (alpha_deal_with_atomic_sequence): Likewise.
3387         (alpha_next_pc): Likewise.
3388         (alpha_software_single_step): Likewise.
3389         * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers): Likewise.
3390         (amd64bsd_store_inferior_registers): Likewise.
3391         * amd64-linux-nat.c (amd64_linux_fetch_inferior_registers):
3392         Likewise.
3393         (amd64_linux_store_inferior_registers): Likewise.
3394         * amd64-nat.c (amd64_supply_native_gregset): Likewise.
3395         (amd64_collect_native_gregset): Likewise.
3396         * amd64-obsd-tdep.c (amd64obsd_supply_uthread): Likewise.
3397         (amd64obsd_collect_uthread): Likewise.
3398         * amd64-tdep.c (amd64_supply_fpregset): Likewise.
3399         (amd64_collect_fpregset): Likewise.
3400         (amd64_supply_fxsave): Likewise.
3401         (amd64_supply_xsave): Likewise.
3402         (amd64_collect_fxsave): Likewise.
3403         (amd64_collect_xsave): Likewise.
3404         * arc-tdep.c (arc_write_pc): Likewise.
3405         * arch-utils.c (default_skip_permanent_breakpoint): Likewise.
3406         * arm-fbsd-nat.c (arm_fbsd_fetch_inferior_registers): Likewise.
3407         (arm_fbsd_store_inferior_registers): Likewise.
3408         * arm-linux-nat.c (fetch_vfp_regs): Likewise.
3409         (store_vfp_regs): Likewise.
3410         (arm_linux_fetch_inferior_registers): Likewise.
3411         (arm_linux_store_inferior_registers): Likewise.
3412         * arm-linux-tdep.c (arm_linux_supply_gregset): Likewise.
3413         (arm_linux_sigreturn_next_pc): Likewise.
3414         (arm_linux_get_next_pcs_syscall_next_pc): Likewise.
3415         * arm-nbsd-nat.c (arm_supply_gregset): Likewise.
3416         (fetch_register): Likewise.
3417         (store_register): Likewise.
3418         * arm-tdep.c (arm_is_thumb): Likewise.
3419         (displaced_in_arm_mode): Likewise.
3420         (bx_write_pc): Likewise.
3421         (arm_get_next_pcs_addr_bits_remove): Likewise.
3422         (arm_software_single_step): Likewise.
3423         (arm_extract_return_value): Likewise.
3424         (arm_store_return_value): Likewise.
3425         (arm_write_pc): Likewise.
3426         * bfin-tdep.c (bfin_extract_return_value): Likewise.
3427         * bsd-uthread.c (bsd_uthread_fetch_registers): Likewise.
3428         (bsd_uthread_store_registers): Likewise.
3429         * core-regset.c (fetch_core_registers): Likewise.
3430         * corelow.c (get_core_registers): Likewise.
3431         * cris-tdep.c (cris_store_return_value): Likewise.
3432         (cris_extract_return_value): Likewise.
3433         (find_step_target): Likewise.
3434         (find_step_target): Likewise.
3435         (cris_software_single_step): Likewise.
3436         * ctf.c (ctf_fetch_registers): Likewise.
3437         * darwin-nat.c (cancel_breakpoint): Likewise.
3438         * fbsd-tdep.c (fbsd_collect_thread_registers): Likewise.
3439         * frv-tdep.c (frv_extract_return_value): Likewise.
3440         * ft32-tdep.c (ft32_store_return_value): Likewise.
3441         (ft32_extract_return_value): Likewise.
3442         * go32-nat.c (fetch_register): Likewise.
3443         (go32_fetch_registers): Likewise.
3444         (go32_store_registers): Likewise.
3445         (store_register): Likewise.
3446         * h8300-tdep.c (h8300_extract_return_value): Likewise.
3447         (h8300_store_return_value): Likewise.
3448         * hppa-linux-nat.c (fetch_register): Likewise.
3449         (store_register): Likewise.
3450         (hppa_linux_fetch_inferior_registers): Likewise.
3451         (hppa_linux_store_inferior_registers): Likewise.
3452         * i386-darwin-nat.c (i386_darwin_fetch_inferior_registers): Likewise.
3453         (i386_darwin_store_inferior_registers): Likewise.
3454         * i386-gnu-nat.c (gnu_fetch_registers): Likewise.
3455         (gnu_store_registers): Likewise.
3456         * i386-linux-nat.c (fetch_register): Likewise.
3457         (store_register): Likewise.
3458         (supply_gregset): Likewise.
3459         (fill_gregset): Likewise.
3460         (i386_linux_fetch_inferior_registers): Likewise.
3461         (i386_linux_store_inferior_registers): Likewise.
3462         (i386_linux_resume): Likewise.
3463         * i386-linux-tdep.c (i386_linux_get_syscall_number_from_regcache):
3464         Likewise.
3465         * i386-nto-tdep.c (i386nto_supply_gregset): Likewise.
3466         * i386-obsd-nat.c (i386obsd_supply_pcb): Likewise.
3467         * i386-obsd-tdep.c (i386obsd_supply_uthread): Likewise.
3468         (i386obsd_collect_uthread): Likewise.
3469         * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
3470         (i386_supply_gregset): Likewise.
3471         (i386_collect_gregset): Likewise.
3472         (i386_supply_fpregset): Likewise.
3473         (i386_collect_fpregset): Likewise.
3474         (i386_mpx_bd_base): Likewise.
3475         * i386-v4-nat.c (supply_fpregset): Likewise.
3476         (fill_fpregset): Likewise.
3477         * i387-tdep.c (i387_supply_fsave): Likewise.
3478         (i387_collect_fsave): Likewise.
3479         (i387_supply_fxsave): Likewise.
3480         (i387_collect_fxsave): Likewise.
3481         (i387_supply_xsave): Likewise.
3482         (i387_collect_xsave): Likewise.
3483         * ia64-linux-nat.c (ia64_linux_fetch_registers): Likewise.
3484         (ia64_linux_store_registers): Likewise.
3485         * ia64-tdep.c (ia64_access_rse_reg): Likewise.
3486         (ia64_extract_return_value): Likewise.
3487         (ia64_store_return_value): Likewise.
3488         (find_func_descr): Likewise.
3489         * inf-child.c (inf_child_fetch_inferior_registers): Likewise.
3490         * inf-ptrace.c (inf_ptrace_fetch_registers): Likewise.
3491         (inf_ptrace_store_registers): Likewise.
3492         * infrun.c (use_displaced_stepping): Likewise.
3493         (displaced_step_prepare_throw): Likewise.
3494         (resume): Likewise.
3495         (proceed): Likewise.
3496         (do_target_wait): Likewise.
3497         (adjust_pc_after_break): Likewise.
3498         (handle_inferior_event_1): Likewise.
3499         (handle_signal_stop): Likewise.
3500         (save_infcall_suspend_state): Likewise.
3501         (restore_infcall_suspend_state): Likewise.
3502         * iq2000-tdep.c (iq2000_extract_return_value): Likewise.
3503         * jit.c (jit_frame_prev_register): Likewise.
3504         * linux-nat.c (save_stop_reason): Likewise.
3505         (linux_nat_wait_1): Likewise.
3506         (resume_stopped_resumed_lwps): Likewise.
3507         * linux-record.c (record_linux_sockaddr): Likewise.
3508         (record_linux_msghdr): Likewise.
3509         (record_linux_system_call): Likewise.
3510         * linux-tdep.c (linux_collect_thread_registers): Likewise.
3511         * lm32-tdep.c (lm32_extract_return_value): Likewise.
3512         (lm32_store_return_value): Likewise.
3513         * m32c-tdep.c (m32c_read_flg): Likewise.
3514         (m32c_pseudo_register_read): Likewise.
3515         (m32c_pseudo_register_write): Likewise.
3516         * m32r-linux-tdep.c (m32r_linux_supply_gregset): Likewise.
3517         (m32r_linux_collect_gregset): Likewise.
3518         * m32r-tdep.c (m32r_store_return_value): Likewise.
3519         (m32r_extract_return_value): Likewise.
3520         * m68k-bsd-nat.c (m68kbsd_supply_fpregset): Likewise.
3521         (m68kbsd_collect_fpregset): Likewise.
3522         * m68k-bsd-tdep.c (m68kbsd_supply_fpregset): Likewise.
3523         * m68k-linux-nat.c (fetch_register): Likewise.
3524         (old_fetch_inferior_registers): Likewise.
3525         (old_store_inferior_registers): Likewise.
3526         (store_regs): Likewise.
3527         * m68k-tdep.c (m68k_svr4_extract_return_value): Likewise.
3528         (m68k_svr4_store_return_value): Likewise.
3529         * m88k-tdep.c (m88k_store_arguments): Likewise.
3530         * mi/mi-main.c (mi_cmd_data_list_changed_registers): Likewise.
3531         (mi_cmd_data_write_register_values): Likewise.
3532         * mips-fbsd-nat.c (mips_fbsd_fetch_inferior_registers): Likewise.
3533         (mips_fbsd_store_inferior_registers): Likewise.
3534         * mips-fbsd-tdep.c (mips_fbsd_supply_fpregs): Likewise.
3535         (mips_fbsd_supply_gregs): Likewise.
3536         (mips_fbsd_collect_fpregs): Likewise.
3537         (mips_fbsd_collect_gregs): Likewise.
3538         (mips_fbsd_supply_fpregset): Likewise.
3539         (mips_fbsd_collect_fpregset): Likewise.
3540         (mips_fbsd_supply_gregset): Likewise.
3541         (mips_fbsd_collect_gregset): Likewise.
3542         * mips-linux-nat.c (supply_gregset): Likewise.
3543         (fill_gregset): Likewise.
3544         (supply_fpregset): Likewise.
3545         (fill_fpregset): Likewise.
3546         * mips-linux-tdep.c (mips_supply_gregset): Likewise.
3547         (mips_fill_gregset): Likewise.
3548         (mips_supply_fpregset): Likewise.
3549         (mips_fill_fpregset): Likewise.
3550         (mips64_supply_gregset): Likewise.
3551         (micromips_linux_sigframe_validate): Likewise.
3552         * mips-nbsd-nat.c (mipsnbsd_fetch_inferior_registers): Likewise.
3553         (mipsnbsd_fetch_inferior_registers): Likewise.
3554         (mipsnbsd_store_inferior_registers): Likewise.
3555         * mips-nbsd-tdep.c (mipsnbsd_supply_fpregset): Likewise.
3556         (mipsnbsd_supply_gregset): Likewise.
3557         (mipsnbsd_iterate_over_regset_sections): Likewise.
3558         (mipsnbsd_supply_reg): Likewise.
3559         (mipsnbsd_supply_fpreg): Likewise.
3560         * mips-tdep.c (mips_in_frame_stub): Likewise.
3561         (mips_dummy_id): Likewise.
3562         (is_octeon_bbit_op): Likewise.
3563         (micromips_bc1_pc): Likewise.
3564         (extended_mips16_next_pc): Likewise.
3565         (mips16_next_pc): Likewise.
3566         (deal_with_atomic_sequence): Likewise.
3567         * moxie-tdep.c (moxie_process_readu): Likewise.
3568         * nios2-tdep.c (nios2_get_next_pc): Likewise.
3569         * nto-procfs.c (procfs_store_registers): Likewise.
3570         * ppc-fbsd-nat.c (ppcfbsd_fetch_inferior_registers): Likewise.
3571         (ppcfbsd_store_inferior_registers): Likewise.
3572         * ppc-linux-nat.c (fetch_vsx_register): Likewise.
3573         (fetch_altivec_register): Likewise.
3574         (get_spe_registers): Likewise.
3575         (fetch_spe_register): Likewise.
3576         (fetch_altivec_registers): Likewise.
3577         (fetch_all_gp_regs): Likewise.
3578         (fetch_all_fp_regs): Likewise.
3579         (store_vsx_register): Likewise.
3580         (store_altivec_register): Likewise.
3581         (set_spe_registers): Likewise.
3582         (store_spe_register): Likewise.
3583         (store_altivec_registers): Likewise.
3584         (store_all_gp_regs): Likewise.
3585         (store_all_fp_regs): Likewise.
3586         * ppc-linux-tdep.c (ppc_linux_supply_gregset): Likewise.
3587         (ppc_linux_collect_gregset): Likewise.
3588         (ppc_canonicalize_syscall): Likewise.
3589         (ppc_linux_record_signal): Likewise.
3590         (ppu2spu_prev_register): Likewise.
3591         * ppc-nbsd-nat.c (ppcnbsd_supply_pcb): Likewise.
3592         * ppc-obsd-nat.c (ppcobsd_fetch_registers): Likewise.
3593         (ppcobsd_store_registers): Likewise.
3594         * ppc-ravenscar-thread.c (ppc_ravenscar_generic_fetch_registers):
3595         Likewise.
3596         (ppc_ravenscar_generic_store_registers): Likewise.
3597         * procfs.c (procfs_fetch_registers): Likewise.
3598         (procfs_store_registers): Likewise.
3599         * ravenscar-thread.c (ravenscar_fetch_registers): Likewise.
3600         (ravenscar_store_registers): Likewise.
3601         (ravenscar_prepare_to_store): Likewise.
3602         * record-btrace.c (record_btrace_fetch_registers): Likewise.
3603         * record-full.c (record_full_wait_1): Likewise.
3604         (record_full_registers_change): Likewise.
3605         (record_full_store_registers): Likewise.
3606         (record_full_core_fetch_registers): Likewise.
3607         (record_full_save): Likewise.
3608         (record_full_goto_insn): Likewise.
3609         * regcache.c (regcache_register_size): Likewise.
3610         (get_regcache_arch): Remove.
3611         (regcache_read_pc): Likewise.
3612         * regcache.h (get_regcache_arch): Remove.
3613         * remote-sim.c (gdbsim_fetch_register): Likewise.
3614         (gdbsim_store_register): Likewise.
3615         * remote.c (fetch_register_using_p): Likewise.
3616         (send_g_packet): Likewise.
3617         (remote_prepare_to_store): Likewise.
3618         (store_registers_using_G): Likewise.
3619         * reverse.c (save_bookmark_command): Likewise.
3620         (goto_bookmark_command): Likewise.
3621         * rs6000-aix-tdep.c (branch_dest): Likewise.
3622         * rs6000-nat.c (rs6000_ptrace64): Likewise.
3623         (fetch_register): Likewise.
3624         * rs6000-tdep.c (ppc_supply_reg): Likewise.
3625         (ppc_collect_reg): Likewise.
3626         (ppc_collect_gregset): Likewise.
3627         (ppc_collect_fpregset): Likewise.
3628         (ppc_collect_vsxregset): Likewise.
3629         (ppc_collect_vrregset): Likewise.
3630         (ppc_displaced_step_hw_singlestep): Likewise.
3631         (rs6000_pseudo_register_read): Likewise.
3632         (rs6000_pseudo_register_write): Likewise.
3633         * s390-linux-nat.c (supply_gregset): Likewise.
3634         (fill_gregset): Likewise.
3635         (s390_linux_fetch_inferior_registers): Likewise.
3636         * s390-linux-tdep.c (s390_write_pc): Likewise.
3637         (s390_software_single_step): Likewise.
3638         (s390_all_but_pc_registers_record): Likewise.
3639         (s390_linux_syscall_record): Likewise.
3640         * sentinel-frame.c (sentinel_frame_prev_arch): Likewise.
3641         * sh-nbsd-nat.c (shnbsd_fetch_inferior_registers): Likewise.
3642         (shnbsd_store_inferior_registers): Likewise.
3643         * sh-tdep.c (sh_extract_return_value_nofpu): Likewise.
3644         (sh_extract_return_value_fpu): Likewise.
3645         (sh_store_return_value_nofpu): Likewise.
3646         (sh_corefile_supply_regset): Likewise.
3647         (sh_corefile_collect_regset): Likewise.
3648         * sh64-tdep.c (sh64_extract_return_value): Likewise.
3649         (sh64_store_return_value): Likewise.
3650         * sparc-linux-tdep.c (sparc32_linux_collect_core_fpregset): Likewise.
3651         * sparc-nat.c (sparc_fetch_inferior_registers): Likewise.
3652         (sparc_store_inferior_registers): Likewise.
3653         * sparc-ravenscar-thread.c (register_in_thread_descriptor_p): Likewise.
3654         (sparc_ravenscar_prepare_to_store): Likewise.
3655         * sparc-tdep.c (sparc32_store_arguments): Likewise.
3656         (sparc_analyze_control_transfer): Likewise.
3657         (sparc_step_trap): Likewise.
3658         (sparc_software_single_step): Likewise.
3659         (sparc32_gdbarch_init): Likewise.
3660         (sparc_supply_rwindow): Likewise.
3661         (sparc_collect_rwindow): Likewise.
3662         * sparc64-linux-tdep.c (sparc64_linux_collect_core_fpregset): Likewise.
3663         * sparc64-nbsd-nat.c (sparc64nbsd_supply_gregset): Likewise.
3664         (sparc64nbsd_collect_gregset): Likewise.
3665         (sparc64nbsd_supply_fpregset): Likewise.
3666         (sparc64nbsd_collect_fpregset): Likewise.
3667         * sparc64-tdep.c (sparc64_store_arguments): Likewise.
3668         (sparc64_supply_gregset): Likewise.
3669         (sparc64_collect_gregset): Likewise.
3670         (sparc64_supply_fpregset): Likewise.
3671         (sparc64_collect_fpregset): Likewise.
3672         * spu-linux-nat.c (spu_fetch_inferior_registers): Likewise.
3673         * spu-tdep.c (spu_unwind_sp): Likewise.
3674         (spu2ppu_prev_register): Likewise.
3675         (spu_memory_remove_breakpoint): Likewise.
3676         * stack.c (return_command): Likewise.
3677         * tic6x-tdep.c (tic6x_extract_signed_field): Likewise.
3678         * tracefile-tfile.c (tfile_fetch_registers): Likewise.
3679         * tracefile.c (trace_save_ctf): Likewise.
3680         * windows-nat.c (do_windows_fetch_inferior_registers): Likewise.
3681         (do_windows_store_inferior_registers): Likewise.
3682         (windows_resume): Likewise.
3683         * xtensa-linux-nat.c (fill_gregset): Likewise.
3684         (supply_gregset_reg): Likewise.
3685         * xtensa-tdep.c (xtensa_register_write_masked): Likewise.
3686         (xtensa_register_read_masked): Likewise.
3687         (xtensa_supply_gregset): Likewise.
3688         (xtensa_extract_return_value): Likewise.
3689         (xtensa_store_return_value): Likewise.
3690
3691 2017-10-25  Ulrich Weigand  <uweigand@de.ibm.com>
3692
3693         * doublest.c (floatformat_from_string): New function.
3694         * doublest.h (floatformat_from_string): Add prototype.
3695
3696         * std-operator.def (OP_DOUBLE, OP_DECFLOAT): Remove, replace by ...
3697         (OP_FLOAT): ... this.
3698         * expression.h: Do not include "doublest.h".
3699         (union exp_element): Replace doubleconst and decfloatconst by
3700         new element floatconst.
3701         * ada-lang.c (resolve_subexp): Handle OP_FLOAT instead of OP_DOUBLE.
3702         (ada_evaluate_subexp): Likewise.
3703         * eval.c (evaluate_subexp_standard): Handle OP_FLOAT instead of
3704         OP_DOUBLE and OP_DECFLOAT.
3705         * expprint.c (print_subexp_standard): Likewise.
3706         (dump_subexp_body_standard): Likewise.
3707         * breakpoint.c (watchpoint_exp_is_const): Likewise.
3708
3709         * parse.c: Include "dfp.h".
3710         (write_exp_elt_dblcst, write_exp_elt_decfloatcst): Remove.
3711         (write_exp_elt_floatcst): New function.
3712         (operator_length_standard): Handle OP_FLOAT instead of OP_DOUBLE
3713         and OP_DECFLOAT.
3714         (operator_check_standard): Likewise.
3715         (parse_float): Do not accept suffix.  Take type as input.  Return bool.
3716         Return target format buffer instead of host DOUBLEST.
3717         Use floatformat_from_string and decimal_from_string to parse
3718         either binary or decimal floating-point types.
3719         (parse_c_float): Remove.
3720         * parser-defs.h: Do not include "doublest.h".
3721         (write_exp_elt_dblcst, write_exp_elt_decfloatcst): Remove.
3722         (write_exp_elt_floatcst): Add prototype.
3723         (parse_float): Update prototype.
3724         (parse_c_float): Remove.
3725
3726         * c-exp.y: Do not include "dfp.h".
3727         (typed_val_float): Use byte buffer instead of DOUBLEST.
3728         (typed_val_decfloat): Remove.
3729         (DECFLOAT): Remove.
3730         (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
3731         (parse_number): Update to new parse_float interface.
3732         Parse suffixes and determine type before calling parse_float.
3733         Handle decimal and binary FP types the same way.
3734
3735         * d-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
3736         (FLOAT_LITERAL): Use OP_FLOAT and write_exp_elt_floatcst.
3737         (parse_number): Update to new parse_float interface.
3738         Parse suffixes and determine type before calling parse_float.
3739
3740         * f-exp.y: Replace dval by typed_val_float.
3741         (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
3742         (parse_number): Use parse_float instead of atof.
3743
3744         * go-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
3745         (parse_go_float): Remove.
3746         (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
3747         (parse_number): Call parse_float instead of parse_go_float.
3748         Parse suffixes and determine type before calling parse_float.
3749
3750         * p-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
3751         (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
3752         (parse_number): Update to new parse_float interface.
3753         Parse suffixes and determine type before calling parse_float.
3754
3755         * m2-exp.y: Replace dval by byte buffer val.
3756         (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
3757         (parse_number): Call parse_float instead of atof.
3758
3759         * rust-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
3760         (lex_number): Call parse_float instead of strtod.
3761         (ast_dliteral): Use OP_FLOAT instead of OP_DOUBLE.
3762         (convert_ast_to_expression): Handle OP_FLOAT instead of OP_DOUBLE.
3763         Use write_exp_elt_floatcst.
3764         (unit_testing): Remove static variable.
3765         (rust_type): Do not check unit_testing.
3766         (rust_lex_tests): Do not set uint_testing.  Set up dummy rust_parser.
3767
3768         * ada-exp.y (type_float, type_double): Remove.
3769         (typed_val_float): Use byte buffer instead of DOUBLEST.
3770         (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
3771         * ada-lex.l (processReal): Use parse_float instead of sscanf.
3772
3773 2017-10-25  Alan Hayward  <alan.hayward@arm.com>
3774
3775         * aarch64-tdep.h (enum aarch64_regnum): Remove.
3776         * arch/aarch64.h: New file.
3777
3778 2017-10-24  Ulrich Weigand  <uweigand@de.ibm.com>
3779
3780         * dfp.h (decimal_from_string): Use const reference for argument.
3781         * dfp.c (decimal_from_string): Likewise.
3782
3783 2017-10-24  Ulrich Weigand  <uweigand@de.ibm.com>
3784
3785         * i387-tdep.c (print_i387_value): Use floatformat_to_string.
3786         * sh64-tdep.c (sh64_do_fp_register): Likewise.
3787         * mips-tdep.c (mips_print_fp_register): Likewise.
3788
3789 2017-10-24  Ulrich Weigand  <uweigand@de.ibm.com>
3790
3791         * common/format.h (enum argclass): Replace decfloat_arg by
3792         dec32float_arg, dec64float_arg, and dec128float_arg.
3793         * common/format.c (parse_format_string): Update to return
3794         new decimal float argument classes.
3795
3796         * printcmd.c (printf_decfloat): Rename to ...
3797         (printf_floating): ... this.  Add argclass argument, and use it
3798         instead of parsing the format string again.  Add support for
3799         binary floating-point values, using floatformat_to_string.
3800         Convert value to the target format if it doesn't already match.
3801         (ui_printf): Call printf_floating instead of printf_decfloat,
3802         also for double_arg / long_double_arg.  Pass argclass.
3803
3804         * dfp.c (decimal_to_string): Add format string argument.
3805         * dfp.h (decimal_to_string): Likewise.
3806
3807         * doublest.c (floatformat_to_string): Add format string argument.
3808         * doublest.h (floatformat_to_string): Likewise.
3809
3810 2017-10-24  Ulrich Weigand  <uweigand@de.ibm.com>
3811
3812         * doublest.c (floatformat_precision): New routine.
3813         (floatformat_to_string): Likewise.
3814         * doublest.c (floatformat_to_string): Add prototype.
3815
3816         * printcmd.c (print_scalar_formatted): Only call print_floating
3817         on floating-point types.
3818         * valprint.c: Do not include "floatformat.h".
3819         (generic_val_print_decfloat): Remove.
3820         (generic_val_print): Call generic_val_print_float for both
3821         TYPE_CODE_FLT and TYPE_CODE_DECFLOAT.
3822         (print_floating): Use floatformat_to_string.  Handle decimal float.
3823         (print_decimal_floating): Remove, merge into floatformat_to_string.
3824         * value.h (print_decimal_floating): Remove.
3825
3826         * Makefile.in: Do not build doublest.c with -Wformat-nonliteral.
3827
3828 2017-10-24  Ulrich Weigand  <uweigand@de.ibm.com>
3829
3830         * buildsym.c (end_symtab_get_static_block): Use std::stable_sort.
3831
3832 2017-10-21  Simon Marchi  <simon.marchi@ericsson.com>
3833
3834         * memattr.h: Don't include vec.h.
3835         (struct mem_attrib): Initialize fields.
3836         <unknown>: New static method.
3837         (struct mem_region): Add constructors, operator<, initialize
3838         fields.
3839         * memattr.c: Include algorithm.
3840         (default_mem_attrib, unknown_mem_attrib): Remove.
3841         (user_mem_region_list): New global.
3842         (target_mem_region_list, mem_region_list): Change type to
3843         std::vector<mem_region>.
3844         (mem_use_target): Now a function.
3845         (target_mem_regions_valid): Change type to bool.
3846         (mem_region_lessthan, mem_region_cmp, mem_region_init): Remove.
3847         (require_user_regions): Adjust.
3848         (require_target_regions): Adjust.
3849         (create_mem_region): Adjust.
3850         (lookup_mem_region): Adjust.
3851         (invalidate_target_mem_regions): Adjust.
3852         (mem_clear): Rename to...
3853         (user_mem_clear): ... this, and adjust.
3854         (mem_command): Adjust.
3855         (info_mem_command): Adjust.
3856         (mem_enable, enable_mem_command, mem_disable,
3857         disable_mem_command): Adjust.
3858         (mem_delete): Adjust.
3859         (delete_mem_command): Adjust.
3860         * memory-map.h (parse_memory_map): Return an std::vector.
3861         * memory-map.c (parse_memory_map): Likewise.
3862         (struct memory_map_parsing_data): Add constructor.
3863         <memory_map>: Point to std::vector.
3864         (memory_map_start_memory): Adjust.
3865         (memory_map_end_memory): Adjust.
3866         (memory_map_end_property): Adjust.
3867         (clear_result): Remove.
3868         * remote.c (remote_memory_map): Return an std::vector.
3869         * target-debug.h (target_debug_print_VEC_mem_region_s__p):
3870         Remove.
3871         (target_debug_print_mem_region_vector): New.
3872         * target-delegates.c: Regenerate.
3873         * target.h (mem_region_vector): New typedef.
3874         (to_memory_map): Return mem_region_vector.
3875         (target_memory_map): Return an std::vector.
3876         * target.c (target_memory_map): Return an std::vector.
3877         (flash_erase_command): Adjust.
3878
3879 2017-10-21  Simon Marchi  <simon.marchi@ericsson.com>
3880
3881         * memory-map.c (struct memory_map_parsing_data) <property_name>:
3882         Change type to std::string.
3883         (memory_map_start_property): Adjust.
3884         (memory_map_end_property): Adjust.
3885
3886 2017-10-21  Simon Marchi  <simon.marchi@polymtl.ca>
3887
3888         * infrun.h: Include common/byte-vector.h.
3889         (struct displaced_step_closure): New struct.
3890         (struct buf_displaced_step_closure): New struct.
3891         * infrun.c (displaced_step_closure::~displaced_step_closure):
3892         Provide default implementation.
3893         (displaced_step_clear): Deallocate step closure with delete.
3894         * aarch64-tdep.c (displaced_step_closure): Rename to ...
3895         (aarch64_displaced_step_closure): ... this, extend
3896         displaced_step_closure.
3897         (aarch64_displaced_step_data) <dsc>: Change type to
3898         aarch64_displaced_step_closure.
3899         (aarch64_displaced_step_copy_insn): Adjust to type change, use
3900         unique_ptr.
3901         (aarch64_displaced_step_fixup): Add cast for displaced step
3902         closure.
3903         * amd64-tdep.c (displaced_step_closure): Rename to ...
3904         (amd64_displaced_step_closure): ... this, extend
3905         displaced_step_closure.
3906         <insn_buf>: Change type to std::vector<gdb_byte>.
3907         <max_len>: Remove.
3908         (fixup_riprel): Change type of DSC parameter, adjust to type
3909         change of insn_buf.
3910         (fixup_displaced_copy): Change type of DSC parameter.
3911         (amd64_displaced_step_copy_insn): Instantiate
3912         amd64_displaced_step_closure.
3913         (amd64_displaced_step_fixup): Add cast for closure type, adjust
3914         to type change of insn_buf.
3915         * arm-linux-tdep.c (arm_linux_cleanup_svc): Change type of
3916         parameter DSC.
3917         (arm_linux_copy_svc): Likewise.
3918         (cleanup_kernel_helper_return): Likewise.
3919         (arm_catch_kernel_helper_return): Likewise.
3920         (arm_linux_displaced_step_copy_insn): Instantiate
3921         arm_displaced_step_closure.
3922         * arm-tdep.c (arm_pc_is_thumb): Add cast for closure.
3923         (displaced_read_reg): Change type of parameter DSC.
3924         (branch_write_pc): Likewise.
3925         (load_write_pc): Likewise.
3926         (alu_write_pc): Likewise.
3927         (displaced_write_reg): Likewise.
3928         (arm_copy_unmodified): Likewise.
3929         (thumb_copy_unmodified_32bit): Likewise.
3930         (thumb_copy_unmodified_16bit): Likewise.
3931         (cleanup_preload): Likewise.
3932         (install_preload): Likewise.
3933         (arm_copy_preload): Likewise.
3934         (thumb2_copy_preload): Likewise.
3935         (install_preload_reg): Likewise.
3936         (arm_copy_preload_reg): Likewise.
3937         (cleanup_copro_load_store): Likewise.
3938         (install_copro_load_store): Likewise.
3939         (arm_copy_copro_load_store) Likewise.
3940         (thumb2_copy_copro_load_store): Likewise.
3941         (cleanup_branch): Likewise.
3942         (install_b_bl_blx): Likewise.
3943         (arm_copy_b_bl_blx): Likewise.
3944         (thumb2_copy_b_bl_blx): Likewise.
3945         (thumb_copy_b): Likewise.
3946         (install_bx_blx_reg): Likewise.
3947         (arm_copy_bx_blx_reg): Likewise.
3948         (thumb_copy_bx_blx_reg): Likewise.
3949         (cleanup_alu_imm): Likewise.
3950         (arm_copy_alu_imm): Likewise.
3951         (thumb2_copy_alu_imm): Likewise.
3952         (cleanup_alu_reg): Likewise.
3953         (install_alu_reg): Likewise.
3954         (arm_copy_alu_reg): Likewise.
3955         (thumb_copy_alu_reg): Likewise.
3956         (cleanup_alu_shifted_reg): Likewise.
3957         (install_alu_shifted_reg): Likewise.
3958         (arm_copy_alu_shifted_reg): Likewise.
3959         (cleanup_load): Likewise.
3960         (cleanup_store): Likewise.
3961         (arm_copy_extra_ld_st): Likewise.
3962         (install_load_store): Likewise.
3963         (thumb2_copy_load_literal): Likewise.
3964         (thumb2_copy_load_reg_imm): Likewise.
3965         (arm_copy_ldr_str_ldrb_strb): Likewise.
3966         (cleanup_block_load_all): Likewise.
3967         (cleanup_block_store_pc): Likewise.
3968         (cleanup_block_load_pc): Likewise.
3969         (arm_copy_block_xfer): Likewise.
3970         (thumb2_copy_block_xfer): Likewise.
3971         (cleanup_svc): Likewise.
3972         (install_svc): Likewise.
3973         (arm_copy_svc): Likewise.
3974         (thumb_copy_svc): Likewise.
3975         (arm_copy_undef): Likewise.
3976         (thumb_32bit_copy_undef): Likewise.
3977         (arm_copy_unpred): Likewise.
3978         (arm_decode_misc_memhint_neon): Likewise.
3979         (arm_decode_unconditional): Likewise.
3980         (arm_decode_miscellaneous): Likewise.
3981         (arm_decode_dp_misc): Likewise.
3982         (arm_decode_ld_st_word_ubyte): Likewise.
3983         (arm_decode_media): Likewise.
3984         (arm_decode_b_bl_ldmstm): Likewise.
3985         (arm_decode_ext_reg_ld_st): Likewise.
3986         (thumb2_decode_dp_shift_reg): Likewise.
3987         (thumb2_decode_ext_reg_ld_st): Likewise.
3988         (arm_decode_svc_copro): Likewise.
3989         (thumb2_decode_svc_copro): Likewise.
3990         (install_pc_relative): Likewise.
3991         (thumb_copy_pc_relative_16bit): Likewise.
3992         (thumb_decode_pc_relative_16bit): Likewise.
3993         (thumb_copy_pc_relative_32bit): Likewise.
3994         (thumb_copy_16bit_ldr_literal): Likewise.
3995         (thumb_copy_cbnz_cbz): Likewise.
3996         (thumb2_copy_table_branch): Likewise.
3997         (cleanup_pop_pc_16bit_all): Likewise.
3998         (thumb_copy_pop_pc_16bit): Likewise.
3999         (thumb_process_displaced_16bit_insn): Likewise.
4000         (decode_thumb_32bit_ld_mem_hints): Likewise.
4001         (thumb_process_displaced_32bit_insn): Likewise.
4002         (thumb_process_displaced_insn): Likewise.
4003         (arm_process_displaced_insn): Likewise.
4004         (arm_displaced_init_closure): Likewise.
4005         (arm_displaced_step_fixup): Add cast for closure.
4006         * arm-tdep.h: Include infrun.h.
4007         (displaced_step_closure): Rename to ...
4008         (arm_displaced_step_closure): ... this, extend
4009         displaced_step_closure.
4010         <u::svc::copy_svc_os>: Change type of parameter DSC.
4011         <cleanup>: Likewise.
4012         (arm_process_displaced_insn): Likewise.
4013         (arm_displaced_init_closure): Likewise.
4014         (displaced_read_reg): Likewise.
4015         (displaced_write_reg): Likewise.
4016         * i386-linux-tdep.c (i386_linux_displaced_step_copy_insn):
4017         Adjust.
4018         * i386-tdep.h: Include infrun.h.
4019         (i386_displaced_step_closure): New typedef.
4020         * i386-tdep.c (i386_displaced_step_copy_insn): Use
4021         i386_displaced_step_closure.
4022         (i386_displaced_step_fixup): Adjust.
4023         * rs6000-tdep.c (ppc_displaced_step_closure): New typedef.
4024         (ppc_displaced_step_copy_insn): Use ppc_displaced_step_closure
4025         and unique_ptr.
4026         (ppc_displaced_step_fixup): Adjust.
4027         * s390-linux-tdep.c (s390_displaced_step_closure): New typedef.
4028         (s390_displaced_step_copy_insn): Use s390_displaced_step_closure
4029         and unique_ptr.
4030         (s390_displaced_step_fixup): Adjust.
4031
4032 2017-10-21  Simon Marchi  <simon.marchi@polymtl.ca>
4033
4034         * interps.h (interp_resume, interp_suspend, interp_set_temp):
4035         Remove declarations.
4036
4037 2017-10-20  Tom Tromey  <tom@tromey.com>
4038
4039         * gdb_bfd.c (struct gdb_bfd_data) <included_bfds>: Now a
4040         std::vector.
4041         (gdb_bfd_record_inclusion): Update.
4042         (bfdp): Remove typedef.
4043
4044 2017-10-20  Tom Tromey  <tom@tromey.com>
4045
4046         * gdb_bfd.c (gdb_bfd_ref): Use new.
4047         (struct gdb_bfd_data): Add constructor, destructor, and member
4048         initializers.
4049         (gdb_bfd_unref): Use delete.
4050
4051 2017-10-20  Tom Tromey  <tom@tromey.com>
4052
4053         * exec.c (exec_file_attach): Use new_bfd_ref.
4054         * symfile-mem.c (symbol_file_add_from_memory): Use new_bfd_ref.
4055         * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
4056         (gdb_bfd_openw, gdb_bfd_openr_iovec, gdb_bfd_fdopenr): Use
4057         new_bfd_ref.
4058         * gdb_bfd.h (new_bfd_ref): New function.
4059
4060 2017-10-20  Pedro Alves  <palves@redhat.com>
4061
4062         * main.c (captured_command_loop): Add attribute noinline.
4063
4064 2017-10-19  Simon Marchi  <simon.marchi@ericsson.com>
4065
4066         * interps.c (struct interp_factory): Add constructor.
4067         (interp_factory_p): Remove typedef.
4068         (DEF_VEC_P(interp_factory_p)): Remove.
4069         (interpreter_factories): Change type to std::vector.
4070         (interp_factory_register): Adjust.
4071         (interp_lookup): Adjust.
4072         (interpreter_completer): Adjust.
4073
4074 2017-10-19  Tom Tromey  <tom@tromey.com>
4075
4076         * break-catch-syscall.c (catch_syscall_completer): Use
4077         std::string, gdb::unique_xmalloc_ptr.
4078
4079 2017-10-19  Tom Tromey  <tom@tromey.com>
4080
4081         * infcall.c (call_function_by_hand_dummy): Use std::string.
4082
4083 2017-10-19  Tom Tromey  <tom@tromey.com>
4084
4085         * mi/mi-main.c (mi_cmd_execute): Update.
4086         * top.h (prepare_execute_command): Return scoped_value_mark.
4087         * value.h (class scoped_value_mark): Use DISABLE_COPY_AND_ASSIGN.
4088         Add move constructor.
4089         * top.c (prepare_execute_command): Return scoped_value_mark.
4090         (execute_command): Update.
4091
4092 2017-10-19  Pedro Alves  <palves@redhat.com>
4093
4094         * xml-support.c (xml_fetch_content_from_file): Check fread's
4095         return.
4096
4097 2017-10-19  Pedro Alves  <palves@redhat.com>
4098
4099         * ser-base.c (ser_base_read_error_fd): Delete the file handler if
4100         async.
4101         (handle_error_fd): New function.
4102         (ser_base_async): Add/delete an event loop file handler for
4103         error_fd.
4104
4105 2017-10-19  Pedro Alves  <palves@redhat.com>
4106
4107         * xml-support.c (xml_fetch_content_from_file): Don't read in
4108         chunks.  Instead use fseek to determine the file's size, and read
4109         it in one go.
4110
4111 2017-11-18  Keith Seitz  <keiths@redhat.com>
4112
4113         * c-exp.y (oper): Canonicalize conversion operators of user-defined
4114         types.
4115         Add whitespace to front of type name.
4116
4117 2017-10-18  Keith Seitz  <keiths@redhat.com>
4118
4119         * dwarf2read.c (dwarf2_add_typedef): Issue a complaint on unhandled
4120         DW_AT_accessibility.
4121
4122 2017-10-18  Yao Qi  <yao.qi@linaro.org>
4123
4124         * features/tic6x-c62x-linux.c: Remove.
4125
4126 2017-10-17  Tom Tromey  <tom@tromey.com>
4127
4128         * disasm.c (do_mixed_source_and_assembly_deprecated): Use
4129         gdb::optional, ui_out_emit_list, ui_out_emit_tuple.
4130         (do_mixed_source_and_assembly): Likewise.
4131
4132 2017-10-17  Tom Tromey  <tom@tromey.com>
4133
4134         * regcache.c (regcache::xfer_part): Remove assertion.
4135
4136 2017-10-17  Pedro Alves  <palves@redhat.com>
4137
4138         * xml-support.c (xml_fetch_content_from_file): Call
4139         unique_ptr::release() instead unique_ptr::get() when passing
4140         through xrealloc.
4141
4142 2017-10-17  Yao Qi  <yao.qi@linaro.org>
4143
4144         * regcache.c (regcache::xfer_part): Remove parameters read and
4145         write, add parameter is_raw.  All callers are updated.
4146
4147 2017-10-16  Keith Seitz  <keiths@redhat.com>
4148
4149         * c-typeprint.c (enum access_specifier): Moved here from
4150         c_type_print_base.
4151         (output_access_specifier): New function.
4152         (c_type_print_base): Consider typedefs when assessing
4153         whether access labels are needed.
4154         Use output_access_specifier as needed.
4155         Output access specifier for typedefs, if needed.
4156         * dwarf2read.c (dwarf2_add_typedef): Record DW_AT_accessibility.
4157         * gdbtypes.h (struct typedef_field) <is_protected, is_private>: New
4158         fields.
4159         (TYPE_TYPEDEF_FIELD_PROTECTED, TYPE_TYPEDEF_FIELD_PRIVATE): New
4160         accessor macros.
4161
4162 2017-10-16  Tom Tromey  <tom@tromey.com>
4163
4164         * linux-tdep.c (linux_info_proc, linux_find_memory_regions_full)
4165         (linux_fill_prpsinfo, linux_vsyscall_range_raw): Update.
4166         * target.c (target_fileio_read_stralloc): Update.
4167         * sparc64-tdep.c (adi_is_addr_mapped): Update.
4168         * target.h (target_fileio_read_stralloc): Return
4169         unique_xmalloc_ptr.
4170
4171 2017-10-16  Tom Tromey  <tom@tromey.com>
4172
4173         * xml-syscall.c (xml_init_syscalls_info): Update.
4174         * xml-support.c (xinclude_start_include): Update.
4175         (xml_fetch_content_from_file): Return unique_xmalloc_ptr.
4176         * xml-support.h (xml_fetch_another): Return unique_xmalloc_ptr.
4177         (xml_fetch_content_from_file): Likewise.
4178         * osdata.c (get_osdata): Update.
4179         * target.h (target_read_stralloc, target_get_osdata): Return
4180         unique_xmalloc_ptr.
4181         * solib-aix.c (solib_aix_get_library_list): Update.
4182         * solib-target.c (solib_target_current_sos): Update.
4183         * solib-svr4.c (svr4_current_sos_via_xfer_libraries): Update.
4184         * xml-tdesc.c (fetch_available_features_from_target): Update.
4185         (target_fetch_description_xml): Update.
4186         (file_read_description_xml): Update.
4187         * remote.c (remote_get_threads_with_qxfer, remote_memory_map)
4188         (remote_traceframe_info, btrace_read_config, remote_read_btrace)
4189         (remote_pid_to_exec_file): Update.
4190         * target.c (target_read_stralloc): Return unique_xmalloc_ptr.
4191         (target_get_osdata): Likewise.
4192
4193 2017-10-16  Tom Tromey  <tom@tromey.com>
4194
4195         * remote.c (remote_register_number_and_offset): Use std::vector.
4196         (remote_set_syscall_catchpoint): Use gdb::unique_xmalloc_ptr.
4197         (putpkt_binary): Use gdb::def_vector.
4198         (compare_sections_command): Use gdb::byte_vector.
4199
4200 2017-10-16  Tom Tromey  <tom@tromey.com>
4201
4202         * ppc-linux-nat.c (hwdebug_insert_point): Use
4203         gdb::unique_xmalloc_ptr, XDUP.
4204
4205 2017-10-16  Tom Tromey  <tom@tromey.com>
4206
4207         * probe.c (parse_probes): Use std::string.
4208         (info_probes_for_ops, enable_probes_command)
4209         (disable_probes_command): Remove cleanups.
4210
4211 2017-10-16  Tom Tromey  <tom@tromey.com>
4212
4213         * buildsym.c (block_compar): Remove.
4214         (end_symtab_get_static_block): Use std::vector.
4215
4216 2017-10-16  Simon Marchi  <simon.marchi@ericsson.com>
4217
4218         * memrange.h (struct mem_range): Define operator< and operator==.
4219         (mem_range_s): Remove.
4220         (DEF_VEC_O (mem_range_s)): Remove.
4221         (normalize_mem_ranges): Change parameter type to std::vector.
4222         * memrange.c (compare_mem_ranges): Remove.
4223         (normalize_mem_ranges): Change parameter type to std::vector,
4224         adjust to vector change.
4225         * exec.c (section_table_available_memory): Return vector, remove
4226         parameter.
4227         (section_table_read_available_memory): Adjust to std::vector
4228         change.
4229         * remote.c (remote_read_bytes): Adjust to std::vector
4230         change.
4231         * tracepoint.h (traceframe_available_memory): Change parameter
4232         type to std::vector.
4233         * tracepoint.c (traceframe_available_memory): Change parameter
4234         type to std::vector, adjust.
4235         * gdb/mi/mi-main.c (mi_cmd_trace_frame_collected): Adjust to
4236         std::vector change.
4237         * gdb/Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
4238         unittests/memrange-selftests.c.
4239         (SUBDIR_UNITTESTS_OBS): Add memrange-selftests.o.
4240         * gdb/unittests/memrange-selftests.c: New file.
4241
4242 2017-10-16  Pedro Alves  <palves@redhat.com>
4243
4244         * elfread.c (probe_key_free): Rename range-for variable.
4245         * probe.c (parse_probes_in_pspace, find_probes_in_objfile)
4246         (find_probe_by_pc, collect_probes): Rename range-for variable.
4247
4248 2017-10-16  Yao Qi  <yao.qi@linaro.org>
4249
4250         * features/Makefile (XMLTOC): Remove tic6x-*.xml.
4251         * features/tic6x-c62x.c: Remove.
4252         * features/tic6x-c64x-linux.c: Remove.
4253         * features/tic6x-c64x.c: Remove.
4254         * features/tic6x-c64xp-linux.c: Remove.
4255         * features/tic6x-c64xp.c: Remove.
4256         * tic6x-linux-tdep.c (_initialize_tic6x_linux_tdep): Don't call
4257         initialize_tdesc_tic6x_*_linux functions.
4258         * tic6x-tdep.c (_initialize_tic6x_tdep): Don't call
4259         initialize_tdesc_tic6x_* functions.
4260
4261 2017-10-16  Yao Qi  <yao.qi@linaro.org>
4262
4263         * features/Makefile (WHICH): Remove tic6x-c64xp, tic6x-c64x
4264         tic6x-c62x.
4265         * regformats/tic6x-c62x.dat: Remove.
4266         * regformats/tic6x-c64x.dat: Remove.
4267         * regformats/tic6x-c64xp.dat: Remove.
4268
4269 2017-10-15  Simon Marchi  <simon.marchi@ericsson.com>
4270
4271         * tracepoint.c (parse_traceframe_info): Return a unique_ptr
4272         (the !HAVE_LIBEXPAT version).
4273
4274 2017-10-14  Simon Marchi  <simon.marchi@ericsson.com>
4275
4276         * nat/linux-osdata.c (struct pid_pgid_entry) <operator<>: Make
4277         const.
4278
4279 2017-10-14  Simon Marchi  <simon.marchi@polymtl.ca>
4280
4281         * target.h: Include tracepoint.h.
4282         (enum trace_find_type): Move to tracepoint.h.
4283         (struct target_ops) <to_traceframe_info>: Return a unique ptr.
4284         * tracepoint.h: Don't include target.h
4285         (enum trace_find_type): Move from target.h.
4286         (parse_traceframe_info): Return a unique ptr.
4287         * tracepoint.c (current_traceframe_info): Change type to unique
4288         ptr.
4289         (free_traceframe_info): Remove.
4290         (clear_traceframe_info): Don't manually free
4291         current_traceframe_info.
4292         (free_result): Remove.
4293         (parse_traceframe_info): Return a unique ptr.
4294         (get_traceframe_info): Adjust to unique ptr.
4295         * ctf.c (ctf_traceframe_info): Return a unique ptr.
4296         * remote.c (remote_traceframe_info): Return a unique ptr.
4297         * tracefile-tfile.c (tfile_traceframe_info): Return a unique
4298         ptr.
4299         * target-debug.h (target_debug_print_traceframe_info_up): New
4300         macro.
4301         * target-delegates.c: Regenerate.
4302
4303 2017-10-14  Simon Marchi  <simon.marchi@polymtl.ca>
4304
4305         * memrange.h (struct mem_range): Add constructors.
4306         * tracepoint.h (struct traceframe_info) <memory>: Change type to
4307         std::vector<mem_range>.
4308         * tracepoint.c (free_traceframe_info): Don't manually free
4309         vector.
4310         (traceframe_info_start_memory): Adjust to vector change.
4311         (traceframe_available_memory): Likewise.
4312         * tracefile-tfile.c (build_traceframe_info): Likewise.
4313         * ctf.c (ctf_traceframe_info): Likewise.
4314
4315 2017-10-14  Simon Marchi  <simon.marchi@polymtl.ca>
4316
4317         * tracepoint.h (struct traceframe_info) <tvars>: Change type to
4318         std::vector<int>.
4319         * tracepoint.c (free_traceframe_info): Deallocate with delete.
4320         (traceframe_info_start_tvar): Adjust to vector change.
4321         (parse_traceframe_info): Allocate with new.
4322         * ctf.c (ctf_traceframe_info): Allocate with new, adjust to
4323         vector change.
4324         * tracefile-tfile.c (build_traceframe_info): Adjust to vector
4325         change.
4326         tfile_traceframe_info): Allocate with new.
4327         * mi/mi-main.c (mi_cmd_trace_frame_collected): Adjust to vector
4328         change.
4329
4330 2017-10-14  Simon Marchi  <simon.marchi@polymtl.ca>
4331
4332         * tracepoint.c (traceframe_info): Rename to...
4333         (current_traceframe_info): ...this.
4334         (clear_traceframe_info): Adjust.
4335         (get_traceframe_info): Adjust.
4336
4337 2017-10-14  Simon Marchi  <simon.marchi@ericsson.com>
4338
4339         * nat/linux-osdata.c: Include algorithm.
4340         (compare_processes): Remove.
4341         (struct pid_pgid_entry): New struct.
4342         (linux_xfer_osdata_processgroups): Use std::vector instead of
4343         XNEWVEC.
4344
4345 2017-10-14  Simon Marchi  <simon.marchi@ericsson.com>
4346
4347         * objfiles.h: Don't include symfile.h.
4348         (struct partial_symbol): Remove forward-declaration.
4349         (struct objfile) <global_psymbols, static_psymbols>: Change type
4350         to std::vector<partial_symbol *>.
4351         * objfiles.c (objfile::objfile): Don't memset those fields.
4352         (objfile::~objfile): Don't free those fields.
4353         * psympriv.h (struct psymbol_allocation_list): Remove
4354         forward-declaration.
4355         (add_psymbol_to_list): Change psymbol_allocation_list parameter
4356         to std::vector.
4357         (start_psymtab_common): Change parameters to std::vector.
4358         * psymtab.c: Include algorithm.
4359         (require_partial_symbols): Call shrink_to_fit.
4360         (find_pc_sect_psymbol): Adjust to vector change.
4361         (match_partial_symbol): Likewise.
4362         (lookup_partial_symbol): Likewise.
4363         (psym_relocate): Likewise.
4364         (dump_psymtab): Likewise.
4365         (recursively_search_psymtabs): Likewise.
4366         (compare_psymbols): Remove.
4367         (sort_pst_symbols): Adjust to vector change.
4368         (start_psymtab_common): Likewise.
4369         (end_psymtab_common): Likewise.
4370         (psymbol_bcache_full): De-constify return value.
4371         (add_psymbol_to_bcache): Likewise.
4372         (extend_psymbol_list): Remove.
4373         (append_psymbol_to_list): Adjust to vector change.
4374         (add_psymbol_to_list): Likewise.
4375         (init_psymbol_list): Likewise.
4376         (maintenance_info_psymtabs): Likewise.
4377         (maintenance_check_psymtabs): Likewise.
4378         * symfile.h (struct psymbol_allocation_list): Remove.
4379         * symfile.c (reread_symbols): Adjust to vector change.
4380         * dbxread.c (start_psymtab): Change type of parameters.
4381         (dbx_symfile_read): Adjust to vector change.
4382         (read_dbx_symtab): Likewise.
4383         (start_psymtab): Change type of parameters.
4384         * dwarf2read.c (dwarf2_build_psymtabs): Adjust to vector change.
4385         (create_partial_symtab): Likewise.
4386         (add_partial_symbol): Likewise.
4387         (write_one_signatured_type): Likewise.
4388         (recursively_write_psymbols): Likewise.
4389         * mdebugread.c (parse_partial_symbols): Likewise.
4390         * xcoffread.c (xcoff_start_psymtab): Change type of parameters.
4391         (scan_xcoff_symtab): Adjust to vector change.
4392         (xcoff_initial_scan): Likewise.
4393
4394 2017-10-13  Simon Marchi  <simon.marchi@ericsson.com>
4395
4396         * ada-typeprint.c (print_dynamic_range_bound): Use std::string.
4397
4398 2017-10-13  Yao Qi  <yao.qi@linaro.org>
4399
4400         * features/Makefile: Remove tic6x-*-expedite, add tic6x-expedite.
4401         Remove s390x-*-expedite, add s390x-expedite.
4402
4403 2017-10-13  Yao Qi  <yao.qi@linaro.org>
4404
4405         * features/s390-gs-linux64.c: Regenerated.
4406         * features/s390x-gs-linux64.c: Regenerated.
4407
4408 2017-10-13  Tom Tromey  <tom@tromey.com>
4409
4410         * compile/compile-object-run.c (do_module_cleanup): Use delete.
4411         * solib.c (update_solib_list, reload_shared_libraries_1): Use
4412         delete.
4413         * symfile.c (symbol_file_add_with_addrs): Use new.
4414         (symbol_file_add_separate): Update comment.
4415         (syms_from_objfile_1, remove_symbol_file_command): Use delete.
4416         * jit.c (jit_object_close_impl): Use new.
4417         (jit_unregister_code): Use delete.
4418         * objfiles.c (objfile::objfile): Rename from allocate_objfile.
4419         (~objfile): Rename from free_objfile.
4420         (free_objfile_separate_debug, do_free_objfile_cleanup)
4421         (free_all_objfiles, objfile_purge_solibs): Use delete.
4422         * objfiles.h (struct objfile): Add constructor and destructor.
4423         Use DISABLE_COPY_AND_ASSIGN.  Add initializers to data members.
4424         (allocate_objfile, free_objfile): Don't declare.
4425         (struct objstats): Add initializers.
4426
4427 2017-10-12  Simon Marchi  <simon.marchi@ericsson.com>
4428
4429         * arch-utils.h (simple_displaced_step_copy_insn): Remove.
4430         * arch-utils.c (simple_displaced_step_copy_insn): Remove.
4431         * gdbarch.sh (displaced_step_copy_insn): Adjust comment.
4432         * gdbarch.h: Regenerate.
4433         * i386-linux-tdep.c (i386_linux_displaced_step_copy_insn):
4434         Adjust comment.
4435         * i386-tdep.c (i386_displaced_step_copy_insn): Adjust comment.
4436         (i386_displaced_step_fixup): Adjust comment.
4437         * rs6000-tdep.c (ppc_displaced_step_copy_insn): Adjust comment.
4438
4439 2017-10-12  Tom Tromey  <tom@tromey.com>
4440
4441         * prologue-value.h (pv_area::store_would_trash): Return bool.
4442         (pv_area::find_reg): Likewise.
4443         * prologue-value.c (pv_area::store_would_trash): Return bool.
4444         (pv_area::find_reg): Likewise.
4445
4446 2017-10-12  Tom Tromey  <tom@tromey.com>
4447
4448         * s390-linux-tdep.c (s390_store, s390_load)
4449         (s390_check_for_saved, s390_analyze_prologue): Update.
4450         * rx-tdep.c (check_for_saved, rx_analyze_prologue): Update.
4451         * rl78-tdep.c (rl78_analyze_prologue, check_for_saved): Update.
4452         * prologue-value.h (class pv_area): Move from prologue-value.c.
4453         Change names of members.  Add constructor, destructor, member
4454         functions.
4455         (make_pv_area, free_pv_area, make_cleanup_free_pv_area)
4456         (pv_area_store, pv_area_fetch, pv_area_store_would_trash)
4457         (pv_area_fetch, pv_area_scan): Don't declare.
4458         * prologue-value.c (struct pv_area::area_entry): Now member of
4459         pv_area.
4460         (struct pv_area): Move to prologue-value.h.
4461         (pv_area::pv_area): Rename from make_pv_area.
4462         (pv_area::~pv_area): Rename from free_pv_area.
4463         (do_free_pv_area_cleanup, make_cleanup_free_pv_area): Remove.
4464         (clear_entries, find_entry, overlaps, store_would_trash, store)
4465         (fetch, find_reg, scan): Now member of pv_area.
4466         Remove "area" argument.  Update.
4467         * msp430-tdep.c (check_for_saved, msp430_analyze_prologue):
4468         Update.
4469         * mn10300-tdep.c (push_reg, check_for_saved)
4470         (mn10300_analyze_prologue): Update.
4471         * mep-tdep.c (is_arg_spill, check_for_saved)
4472         (mep_analyze_prologue): Update.
4473         * m32c-tdep.c (m32c_pv_push, m32c_srcdest_fetch)
4474         (m32c_srcdest_store, m32c_pv_enter, m32c_is_arg_spill)
4475         (m32c_is_struct_return, m32c_analyze_prologue): Update.
4476         * arm-tdep.c (thumb_analyze_prologue, arm_analyze_prologue):
4477         Update.
4478         * arc-tdep.c (arc_is_in_prologue, arc_analyze_prologue): Update.
4479         * aarch64-tdep.c (aarch64_analyze_prologue): Update.
4480
4481 2017-10-12  Simon Marchi  <simon.marchi@ericsson.com>
4482
4483         * linux-nat.h (linux_nat_set_delete_thread): New declaration.
4484         * linux-nat.c (linux_nat_delete_thread): New variable.
4485         (lwp_free): Invoke linux_nat_delete_thread if set.
4486         (linux_nat_set_delete_thread): New function.
4487         * aarch64-linux-nat.c (_initialize_aarch64_linux_nat): Assign
4488         thread delete callback.
4489         * arm-linux-nat.c (arm_linux_delete_thread): New function.
4490         (_initialize_arm_linux_nat): Assign thread delete callback.
4491         * s390-linux-nat.c (s390_delete_thread): New function.
4492         (_initialize_s390_nat): Assign thread delete callback.
4493         * x86-linux-nat.c (x86_linux_add_target): Likewise.
4494         * nat/aarch64-linux.c (aarch64_linux_delete_thread): New
4495         function.
4496         * nat/aarch64-linux.h (aarch64_linux_delete_thread): New
4497         declaration.
4498         * nat/x86-linux.c (x86_linux_delete_thread): New function.
4499         * nat/x86-linux.h (x86_linux_delete_thread): New declaration.
4500
4501 2017-10-09  Tom Tromey  <tom@tromey.com>
4502
4503         * tui/tui-win.c (tui_set_win_height, parse_scrolling_args): Use
4504         std::string.
4505         * tui/tui-layout.c (enum tui_status): Use std::string.
4506
4507 2017-10-11  Tom Tromey  <tom@tromey.com>
4508
4509         * gdbthread.h (thread_command): Constify.
4510         * inferior.h (detach_command): Constify.
4511         * top.h (set_history, show_history): Constify.
4512         * arm-tdep.c (set_arm_command, show_arm_command): Constify.
4513         * serial.c (serial_set_cmd, serial_show_cmd): Constify.
4514         * bsd-kvm.c (bsd_kvm_cmd): Constify.
4515         * printcmd.c (set_command): Constify.
4516         (non_const_set_command): New function.
4517         * dcache.c (set_dcache_command, show_dcache_command): Constify.
4518         * breakpoint.c (enable_command, disable_command, delete_command)
4519         (catch_command, tcatch_command, set_breakpoint_cmd)
4520         (show_breakpoint_cmd): Constify.
4521         * macrocmd.c (macro_command): Constify.
4522         * infcmd.c (unset_command, kill_command, detach_command)
4523         (info_proc_cmd): Constify.
4524         * i386-tdep.c (set_mpx_cmd, show_mpx_cmd): Constify.
4525         * auto-load.c (show_auto_load_cmd, set_auto_load_cmd)
4526         (info_auto_load_cmd): Constify.
4527         * target-descriptions.c (set_tdesc_cmd, show_tdesc_cmd)
4528         (unset_tdesc_cmd): Constify.
4529         * ada-lang.c (set_ada_command, show_ada_command)
4530         (maint_set_ada_cmd, maint_show_ada_cmd): Constify.
4531         * guile/guile.c (set_guile_command, show_guile_command)
4532         (info_guile_command): Constify.
4533         * tui/tui-win.c (tui_command, set_tui_cmd, show_tui_cmd):
4534         Constify.
4535         * skip.c (skip_command): Constify.
4536         * compile/compile.c (_initialize_compile): Constify.
4537         * dwarf2read.c (set_dwarf_cmd, show_dwarf_cmd): Constify.
4538         * btrace.c (maint_btrace_cmd, maint_btrace_set_cmd)
4539         (maint_btrace_show_cmd, maint_btrace_pt_set_cmd)
4540         (maint_btrace_pt_show_cmd): Constify.
4541         * remote.c (set_remote_cmd, show_remote_cmd, remote_command):
4542         Constify.
4543         * python/python.c (user_show_python, user_set_python): Constify.
4544         * mips-tdep.c (set_mips_command, show_mips_command)
4545         (set_mipsfpu_command): Constify.
4546         * record-btrace.c (cmd_record_btrace_start)
4547         (cmd_set_record_btrace, cmd_show_record_btrace)
4548         (cmd_set_record_btrace_bts, cmd_show_record_btrace_bts)
4549         (cmd_set_record_btrace_pt, cmd_show_record_btrace_pt): Constify.
4550         * rs6000-tdep.c (set_powerpc_command, show_powerpc_command):
4551         Constify.
4552         * symfile.c (overlay_command): Constify.
4553         * spu-tdep.c (set_spu_command, show_spu_command): Constify.
4554         * cli/cli-logging.c (set_logging_command, show_logging_command):
4555         Constify.
4556         * cli/cli-dump.c (dump_command, append_command)
4557         (srec_dump_command, ihex_dump_command, verilog_dump_command)
4558         (tekhex_dump_command, binary_dump_command)
4559         (binary_append_command): Constify.
4560         * cli/cli-decode.c (struct cmd_list_element): Change type of
4561         "fun".
4562         * cli/cli-cmds.c (info_command, show_command, set_debug)
4563         (show_debug): Constify.
4564         (show_command): Add non-const overload.
4565         * top.c (set_history, show_history): Constify.
4566         * sh-tdep.c (set_sh_command, show_sh_command): Constify.
4567         * command.h (add_prefix_cmd): Accept a cmd_const_cfunc_ftype.
4568         * target.c (target_command): Constify.
4569         * sparc64-tdep.c (info_adi_command): Constify.
4570         * record-full.c (cmd_record_full_start): Constify.
4571         (set_record_full_command): Constify.  Fix typo.
4572         (show_record_full_command): Constify.
4573         * thread.c (thread_command, thread_apply_command): Constify.
4574         * memattr.c (dummy_cmd): Constify.
4575         * value.c (function_command): Constify.
4576         * frame.c (set_backtrace_cmd, show_backtrace_cmd): Constify.
4577         * probe.c (info_probes_command): Constify.
4578         * ser-tcp.c (set_tcp_cmd, show_tcp_cmd): Constify.
4579         * gnu-nat.c (set_task_cmd, show_task_cmd, set_thread_cmd)
4580         (show_thread_cmd, set_thread_default_cmd)
4581         (show_thread_default_cmd): Constify.
4582         (check_empty): Constify.
4583         * tracepoint.c (tfind_command): Constify.
4584         * cp-support.c (maint_cplus_command): Constify.
4585         * windows-tdep.c (info_w32_command): Constify.
4586         * record.c (cmd_record_start, set_record_command)
4587         (show_record_command, info_record_command, cmd_record_goto):
4588         Constify.
4589         * ravenscar-thread.c (set_ravenscar_command)
4590         (show_ravenscar_command): Constify.
4591         * utils.c (set_internal_problem_cmd, show_internal_problem_cmd):
4592         Constify.
4593         (add_internal_problem_command): Remove casts.
4594         * arc-tdep.c (maintenance_print_arc_command): Constify.
4595         * valprint.c (set_print, show_print, set_print_raw)
4596         (show_print_raw): Constify.
4597         * maint.c (maintenance_command, maintenance_info_command)
4598         (maintenance_print_command, maintenance_set_cmd)
4599         (maintenance_show_cmd, set_per_command_cmd)
4600         (show_per_command_cmd, maintenance_check_command): Constify.
4601         * language.c (set_check, show_check): Constify.
4602         * typeprint.c (show_print_type, set_print_type): Constify.
4603         * go32-nat.c (go32_info_dos_command): Constify.
4604
4605 2017-10-11  Tom Tromey  <tom@tromey.com>
4606
4607         * breakpoint.c (prepare_re_set_context): Remove.
4608         (breakpoint_re_set_one): Update.  Don't use cleanups.
4609         (breakpoint_re_set): Use scoped_restore, std::string, and
4610         scoped_restore_current_language.
4611
4612 2017-10-11  Tom Tromey  <tom@tromey.com>
4613
4614         * breakpoint.c (commands_command_1): Use std::string.
4615         (cleanup_executing_breakpoints): Remove.
4616         (bpstat_do_actions_1): Use scoped_restore.
4617         (bpstat_check_watchpoint): Use std::string.
4618         (decode_static_tracepoint_spec): Likewise.
4619         (break_range_command): Likewise.
4620         (watch_command_1): Likewise.
4621         (compare_breakpoints): Change argument types.
4622         (clear_command): Use std::vector.
4623         (cleanup_executing_breakpoints): Remove.
4624         (update_global_location_list): Use unique_xmalloc_ptr.
4625         (strace_command): Remove unused declaration.
4626
4627 2017-10-11  John Baldwin  <jhb@FreeBSD.org>
4628
4629         * Makefile.in (ALLDEPFILES): Add arm-fbsd-nat.c.
4630         * NEWS: Mention new FreeBSD/arm native configuration.
4631         * configure.host: Add arm*-*-freebsd*.
4632         * configure.nat: Likewise.
4633         * arm-fbsd-nat.c: New file.
4634
4635 2017-10-11  John Baldwin  <jhb@FreeBSD.org>
4636
4637         * Makefile.in (ALL_TARGET_OBS): Add arm-fbsd-tdep.o.
4638         (ALLDEPFILES): Add arm-fbsd-tdep.c.
4639         * NEWS: Mention new FreeBSD/arm target.
4640         * configure.tgt: Add arm*-*-freebsd*.
4641         * arm-fbsd-tdep.c: New file.
4642         * arm-fbsd-tdep.h: New file.
4643
4644 2017-10-11  Maciej W. Rozycki  <macro@imgtec.com>
4645
4646         * linux-tdep.c (linux_make_corefile_notes): Remove call to
4647         `gdbarch_elfcore_write_linux_prpsinfo'.
4648         * gdbarch.sh (elfcore_write_linux_prpsinfo): Remove architecture
4649         method.
4650         (elf_internal_linux_prpsinfo): Remove declaration.
4651         * gdbarch.h: Regenerate.
4652         * gdbarch.c: Regenerate.
4653
4654 2017-10-11  Maciej W. Rozycki  <macro@imgtec.com>
4655
4656         * ppc-linux-tdep.c (ppc_linux_init_abi): Remove call to
4657         `set_gdbarch_elfcore_write_linux_prpsinfo'.
4658
4659 2017-10-11  Pedro Alves  <palves@redhat.com>
4660
4661         * breakpoint.c (reattach_breakpoints): Delete.
4662         * breakpoint.h (reattach_breakpoints): Delete.
4663
4664 2017-10-11  Simon Marchi  <simon.marchi@ericsson.com>
4665
4666         * symfile.c (registered_sym_fns): Make struct, not typedef.
4667         (DEF_VEC_O (registered_sym_fns)): Remove.
4668         (symtab_fns): Change type to std::vector.
4669         (add_symtab_fns): Adjust.
4670         (find_sym_fns): Adjust.
4671
4672 2017-10-11  Anton Kolesov  <Anton.Kolesov@synopsys.com>
4673
4674         * arc-tdep.c (arc_gdbarch_init): Pass proper cpu value to disassembler.
4675         * arc-tdep.h (arc_arch_is_em): New function.
4676         (arc_arch_is_hs): Likewise.
4677
4678 2017-10-11  Egeyar Bagcioglu  <egeyar.bagcioglu@oracle.com>
4679
4680         * macrotab.h (macro_lookup_inclusion): Remove unnecessary
4681         parentheses in the declaration.
4682         (macro_lookup_inclusion): Likewise.
4683         (macro_lookup_definition): Likewise.
4684         * p-lang.h (pascal_builtin_types): Likewise.
4685         * tui/tui-data.c (tui_win_list): Likewise.
4686         * tui/tui-data.h (tui_win_list): Likewise.
4687         * utils.h (make_cleanup_free_section_addr_info): Likewise.
4688
4689 2017-10-11  Mark Rages  <markrages@gmail.com>
4690
4691         * target-memory.c (block_boundaries): Fix for block address not
4692         aligned on block size.
4693
4694 2017-10-10  Pedro Alves <palves@redhat.com>
4695             Tom Tromey  <tom@tromey.com>
4696
4697         * breakpoint.c (struct captured_breakpoint_query_args)
4698         (do_captured_breakpoint_query, gdb_breakpoint_query): Delete.
4699         (print_breakpoint): New.
4700         * breakpoint.h (print_breakpoint): Declare.
4701         * common/common-exceptions.h (enum return_reason): Remove
4702         references to catch_exceptions.
4703         * exceptions.c (catch_exceptions, catch_exceptions_with_msg):
4704         Delete.
4705         * exceptions.h (catch_exceptions_ftype, catch_exceptions)
4706         (catch_exception_ftype, catch_exceptions_with_msg): Delete.
4707         * gdb.h: Delete.
4708         * gdbthread.h (thread_select): Declare.
4709         * mi/mi-cmd-break.c: Don't include gdb.h.
4710         (breakpoint_notify): Use print_breakpoint.
4711         * mi/mi-cmd-catch.c: Don't include gdb.h.
4712         * mi/mi-interp.c: Don't include gdb.h.
4713         (mi_print_breakpoint_for_event): New.
4714         (mi_breakpoint_created, mi_breakpoint_modified): Use
4715         mi_print_breakpoint_for_event.
4716         * mi/mi-main.c: Don't include gdb.h.
4717         (mi_cmd_thread_select): Parse the global thread ID here.  Use
4718         thread_select instead of gdb_thread_select.
4719         (mi_cmd_thread_list_ids): Output "thread-ids" tuple here instead
4720         of using gdb_list_thread_ids.
4721         * remote-fileio.c (do_remote_fileio_request): Change type.  Reply
4722         FILEIO_ENOSYS here.
4723         (remote_fileio_request): Use TRY/CATCH instead of
4724         catch_exceptions.
4725         * symfile-mem.c (struct symbol_file_add_from_memory_args)
4726         (symbol_file_add_from_memory_wrapper): Delete.
4727         (add_vsyscall_page): Use TRY/CATCH instead of catch_exceptions.
4728         * thread.c: Don't include gdb.h.
4729         (do_captured_list_thread_ids, gdb_list_thread_ids): Delete.
4730         (thread_alive): Use thread_select.
4731         (do_captured_thread_select): Delete, parts salvaged as ...
4732         (thread_select): ... this new function.
4733         (gdb_thread_select): Delete.
4734
4735 2017-10-10  Pedro Alves  <palves@redhat.com>
4736             Tom Tromey  <tom@tromey.com>
4737
4738         * breakpoint.c (breakpoint_cond_eval): Change return type to bool
4739         and reverse logic.
4740         (WP_DELETED, WP_VALUE_CHANGED, WP_VALUE_NOT_CHANGED, WP_IGNORE):
4741         No longer macros.  Instead ...
4742         (enum wp_check_result): They're now values of this new
4743         enumeration.
4744         (watchpoint_check): Change return type to wp_check_result and
4745         parameter type to bpstat.
4746         (bpstat_check_watchpoint): Use TRY/CATCH instead of catch_errors.
4747         (bpstat_check_breakpoint_conditions): Use TRY/CATCH instead of
4748         catch_errors.  Reverse logic of watchpoint_check call.
4749         (breakpoint_re_set_one): Now returns void and takes a breakpoint
4750         pointer as parameter.
4751         (breakpoint_re_set): Use TRY/CATCH instead of catch_errors.
4752         * common/common-exceptions.c (throw_exception_sjlj): Update
4753         comments to avoid mentioning catch_errors.
4754         * exceptions.c (catch_errors): Delete.
4755         * exceptions.h: Update comments to avoid mentioning catch_errors.
4756         (catch_errors_ftype, catch_errors): Delete.
4757         * infrun.c (normal_stop): Use TRY/CATCH instead of catch_errors.
4758         (hook_stop_stub): Delete.
4759         (restore_selected_frame): Change return type to void, and
4760         parameter type to const frame_id &.
4761         (restore_infcall_control_state): Use TRY/CATCH instead of
4762         catch_errors.
4763         * main.c (captured_command_loop): Return void and remove
4764         parameter.  Remove references to catch_errors.
4765         (captured_main): Use TRY/CATCH instead of catch_errors.
4766         * objc-lang.c (objc_submethod_helper_data)
4767         (find_objc_msgcall_submethod_helper): Delete.
4768         (find_objc_msgcall_submethod): Use TRY/CATCH instead of
4769         catch_errors.
4770         * record-full.c (record_full_message): Return void.
4771         (record_full_message_args, record_full_message_wrapper): Delete.
4772         (record_full_message_wrapper_safe): Return bool and use TRY/CATCH
4773         instead of catch_errors.
4774         * solib-aix.c (solib_aix_open_symbol_file_object): Change
4775         parameter type to int.
4776         * solib-darwin.c (open_symbol_file_object): Ditto.
4777         * solib-dsbt.c (open_symbol_file_object): Ditto.
4778         * solib-frv.c (open_symbol_file_object): Ditto.
4779         * solib-svr4.c (open_symbol_file_object): Ditto.
4780         * solib-target.c (solib_target_open_symbol_file_object): Ditto.
4781         * solib.c (update_solib_list): Use TRY/CATCH instead of
4782         catch_errors.
4783         * solist.h (struct target_so_ops) <open_symbol_file_object>:
4784         Change type.
4785         * symmisc.c (struct print_symbol_args): Remove.
4786         (dump_symtab_1): Use TRY/CATCH instead of catch_errors.
4787         (print_symbol): Change type.
4788         * windows-nat.c (handle_load_dll, handle_unload_dll): Return void
4789         and remove parameters.
4790         (catch_errors): New.
4791         (get_windows_debug_event): Adjust.
4792
4793 2017-10-09  Tom Tromey  <tom@tromey.com>
4794
4795         * mi/mi-main.c (free_splay_tree): Remove.
4796         (list_available_thread_groups): Use splay_tree_up.
4797         * common/gdb_splay_tree.h: New file.
4798
4799 2017-10-09  Tom Tromey  <tom@tromey.com>
4800
4801         * mi/mi-main.c (do_nothing): Remove.
4802         (list_available_thread_groups): Update.
4803
4804 2017-10-09  Pedro Alves  <palves@redhat.com>
4805
4806         * infrun.c (handle_inferior_event_1) <TARGET_WAITKIND_EXECD>: Skip
4807         reading registers when switching context.
4808
4809 2017-10-09  John Baldwin  <jhb@FreeBSD.org>
4810
4811         * fbsd-nat.c (fbsd_siginfo_size): Use gdbarch_long_bit.
4812         (fbsd_convert_siginfo): Likewise.
4813         * fbsd-tdep.c (fbsd_core_xfer_siginfo): Likewise.
4814
4815 2017-10-09  Simon Marchi  <simon.marchi@polymtl.ca>
4816
4817         * configure.ac (try_guile_versions): Remove guile-2.2.
4818         * configure: Regenerate.
4819
4820 2017-10-09  Tom Tromey  <tom@tromey.com>
4821
4822         * Makefile.in (COMPILE.post, POSTCOMPILE): Restore $(basename).
4823         (COMPILE.pre): Use $(CXX).
4824
4825 2017-10-09  Pedro Alves  <palves@redhat.com>
4826
4827         * cp-support.c (cp_remove_params): Return a gdb::unique_xmalloc_ptr.
4828         Use bool.
4829         (overload_list_add_symbol): Adjust to use gdb::unique_xmalloc_ptr.
4830         * cp-support.h (cp_remove_params): Now returns a
4831         gdb::unique_xmalloc_ptr.
4832         * dwarf2read.c (find_slot_in_mapped_hash): Now returns bool.
4833         Adjust to cp_remove_params returning a gdb::unique_xmalloc_ptr.
4834         * psymtab.c (psymtab_search_name): Adjust to cp_remove_params
4835         returning a gdb::unique_xmalloc_ptr.
4836         (lookup_partial_symbol): Adjust to use gdb::unique_xmalloc_ptr.
4837         * stack.c (find_frame_funname): Adjust to cp_remove_params
4838         returning a gdb::unique_xmalloc_ptr.
4839
4840 2017-10-08  Tom Tromey  <tom@tromey.com>
4841
4842         * dwarf2read.c (dwarf2_get_dwz_file): Use
4843         gdb::unique_xmalloc_ptr.
4844         (find_slot_in_mapped_hash): Likewise.
4845         (dwarf2_physname): Likewise.
4846         (create_dwo_unit_in_dwp_v1): Use std::string.
4847         (create_dwo_unit_in_dwp_v2): Likewise.
4848         (lookup_dwo_cutu): Likewise.
4849         (inherit_abstract_dies): Use std::vector.
4850         (read_array_type): Likewise.
4851         (dwarf_decode_macros): Remove unused declaration.
4852         (unsigned_int_compar): Remove.
4853         (dwarf2_build_psymtabs_hard): Use scoped_restore.
4854         (psymtabs_addrmap_cleanup): Remove.
4855
4856 2017-10-08  Tom Tromey  <tom@tromey.com>
4857
4858         * frame-unwind.c (frame_unwind_try_unwinder): Update.
4859         * frame.h (frame_cleanup_after_sniffer): Declare.
4860         (frame_prepare_for_sniffer): Return void.
4861         * frame.c (frame_cleanup_after_sniffer): No longer static.  Change
4862         type of argument.
4863         (frame_prepare_for_sniffer): Return void.
4864
4865 2017-10-08  Tom Tromey  <tom@tromey.com>
4866
4867         * utils.h (make_cleanup_value_free): Remove.
4868         * utils.c (do_value_free, struct cleanup): Remove.
4869         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full) <DWARF_VALUE_STACK>:
4870         Use gdb_value_up.
4871         * value.h (struct value_deleter): New.
4872         (gdb_value_up): New typedef.
4873
4874 2017-10-08  Tom Tromey  <tom@tromey.com>
4875
4876         * symtab.c (free_search_symbols, do_free_search_symbols_cleanup)
4877         (make_cleanup_free_search_symbols): Remove.
4878         (search_symbols): Return std::vector.
4879         (symbol_search::compare_search_syms): Now member of
4880         symbol_search.  Change arguments.
4881         (sort_search_symbols_remove_dups): Change arguments.  Rewrite.
4882         (symtab_symbol_info, rbreak_command): Update.
4883         * symtab.h (struct symbol_search) <next>: Remove.
4884         Add constructors.
4885         (symbol_search::operator<): New function.
4886         (symbol_search::operator==): New function.
4887         (search_symbols): Remove std::vector.
4888         (free_search_symbols, make_cleanup_free_search_symbols): Remove.
4889         (symbol_search::compare_search_syms): Declare.
4890
4891 2017-10-06  Yao Qi  <yao.qi@linaro.org>
4892
4893         * Makefile.in (ALL_64_TARGET_OBS): Replace aarch64-insn.o with
4894         arch/aarch64-insn.o.
4895         Remove one rule.
4896         * configure.tgt: Replace aarch64-insn.o with arch/aarch64-insn.o.
4897
4898 2017-10-06  Yao Qi  <yao.qi@linaro.org>
4899
4900         * Makefile.in (ALL_TARGET_OBS): Replace arm.o, arm-get-next-pcs.o,
4901         and arm-linux.o with arch/arm.o, arch/arm-get-next-pcs.o and
4902         arch/arm-linux.o respectively.
4903         * configure.tgt: Likewise.
4904
4905 2017-10-06  Yao Qi  <yao.qi@linaro.org>
4906
4907         * Makefile.in (ALL_TARGET_OBS): Rename i386.o to arch/i386.o.
4908         * configure.tgt (i386_tobjs): Replace i386.o with arch/i386.o.
4909
4910 2017-10-06  Pedro Alves  <palves@redhat.com>
4911
4912         * windows-nat.c: Include <algorithm>.
4913
4914 2017-10-06  Yao Qi  <yao.qi@linaro.org>
4915
4916         * configure.tgt (i386_tobjs): New variable.
4917         (amd64_tobjs): New variable.
4918         Set $cpu_obs and $os_obs.
4919
4920 2017-10-06  Yao Qi  <yao.qi@linaro.org>
4921
4922         * Makefile.in (CONFIG_SRC_SUBDIR): New.
4923         (ALL_64_TARGET_OBS): Replace amd64.o with arch/amd64.o.
4924         (clean): Remove object files and dependency files.
4925         (distclean): Remove the directory.
4926         * configure.ac: Invoke AC_CONFIG_COMMANDS.
4927         * configure: Re-generated.
4928         * configure.tgt: Replace amd64.o with arch/amd64.o.
4929
4930 2017-10-05  Jose E. Marchesi  <jose.marchesi@oracle.com>
4931
4932         PR build/22188
4933         * arm-tdep.c (arm_decode_misc_memhint_neon): Fix decoding of CPS
4934         and SETEND.
4935
4936 2017-10-05  Pedro Alves  <palves@redhat.com>
4937
4938         * linux-nat.c (linux_child_follow_fork): When following the parent
4939         and detaching the child, consult the parent thread's architecture
4940         instead of the child's.
4941
4942 2017-10-05  Ulrich Weigand  <uweigand@de.ibm.com>
4943
4944         * ax.h: Do not include "doublest.h".
4945         (union agent_val): Remove.
4946
4947 2017-10-05  Ulrich Weigand  <uweigand@de.ibm.com>
4948
4949         * dfp.h (MAX_DECIMAL_STRING): Move to dfp.c.
4950         (decimal_to_string): Return std::string object.
4951         (decimal_from_string): Accept std::string object.  Return bool.
4952         (decimal_from_integral, decimal_from_doublest): Remove.
4953         (decimal_from_longest): Add prototype.
4954         (decimal_from_ulongest): Likewise.
4955         (decimal_to_longest): Likewise.
4956         (decimal_from_doublest): Likewise.
4957         * dfp.c: Do not include "gdbtypes.h" or "value.h".
4958         (MAX_DECIMAL_STRING): Move here.
4959         (decimal_to_string): Return std::string object.
4960         (decimal_from_string): Accept std::string object.  Return bool.
4961         (decimal_from_integral): Remove, replace by ...
4962         (decimal_from_longest, decimal_from_ulongest): ... these new functions.
4963         (decimal_to_longest): New function.
4964         (decimal_from_floating): Remove, replace by ...
4965         (decimal_from_doublest): ... this new function.
4966         (decimal_to_doublest): Update to new decimal_to_string interface.
4967
4968         * value.c (unpack_long): Use decimal_to_longest.
4969         * valops.c (value_cast): Use decimal_from_doublest instead of
4970         decimal_from_floating.  Use decimal_from_[u]longest isntead of
4971         decimal_from_integral.
4972         * valarith.c (value_args_as_decimal): Likewise.
4973         * valprint.c (print_decimal_floating): Update to new
4974         decimal_to_string interface.
4975         * printcmd.c (printf_decfloat): Likewise.
4976         * c-exp.y (parse_number): Update to new decimal_from_string interface.
4977
4978 2017-10-05  Ulrich Weigand  <uweigand@de.ibm.com>
4979
4980         * doublest.h: Do not include "floatformat.h".  Remove stale comments.
4981         * gdbtypes.c: Include "floatformat.h".
4982         * value.c: Likewise.
4983         * m68k-tdep.c: Likewise.
4984
4985         * findvar.c: Do not include "floatformat.h".
4986         * amd64-darwin-tdep.c: Likewise.
4987         * arm-linux-tdep.c: Likewise.
4988         * i386-darwin-tdep.c: Likewise.
4989         * i387-tdep.c: Likewise.
4990         * m68k-linux-tdep.c: Likewise.
4991         * mep-tdep.c: Likewise.
4992         * mips-tdep.c: Likewise.
4993         * nios2-tdep.c: Likewise.
4994         * s390-linux-tdep.c: Likewise.
4995         * sparc-obsd-tdep.c: Likewise.
4996         * sparc-tdep.c: Likewise.
4997         * sparc64-tdep.c: Likewise.
4998         * spu-tdep.c: Likewise.
4999         * tic6x-tdep.c: Likewise.
5000         * tilegx-tdep.c: Likewise.
5001         * vax-tdep.c: Likewise.
5002         * xstormy16-tdep.c: Likewise.
5003         * xtensa-tdep.c: Likewise.
5004
5005         * top.c: Do not include "doublest.h".
5006         * aarch64-tdep.c: Likewise.
5007         * alpha-tdep.c: Likewise.
5008         * arm-linux-tdep.c: Likewise.
5009         * m68k-linux-tdep.c: Likewise.
5010         * tilegx-tdep.c: Likewise.
5011         * xstormy16-tdep.c: Likewise.
5012
5013 2017-10-05  John Baldwin  <jhb@FreeBSD.org>
5014
5015         * mips-fbsd-tdep.c (MIPS_INST_ADDIU_A0_SP_N32): Define.
5016         (mipsn32_fbsd_sigframe): Define.
5017         (mips_fbsd_init_abi): Install mipsn32_fbsd_sigframe unwinder
5018         for FreeBSD/mipsn32.
5019
5020 2017-10-05  John Baldwin  <jhb@FreeBSD.org>
5021
5022         * fbsd-tdep.c (fbsd_print_auxv_entry): Handle AT_EHDRFLAGS and
5023         AT_HWCAP.
5024
5025 2017-10-05  Tristan Gingold  <tgingold@free.fr>
5026
5027         * MAINTAINERS (Misc): Update my email address.
5028
5029 2017-10-04  Pedro Alves  <palves@redhat.com>
5030
5031         * remote.c (get_remote_arch_state): New 'gdbarch' parameter.  Use
5032         it instead of target_gdbarch.
5033         (get_remote_state, get_remote_packet_size): Adjust
5034         get_remote_arch_state calls, passing down target_gdbarch
5035         explicitly.
5036         (packet_reg_from_regnum, packet_reg_from_pnum): New parameter
5037         'gdbarch' and use it instead of target_gdbarch.
5038         (get_memory_packet_size): Adjust get_remote_arch_state calls,
5039         passing down target_gdbarch explicitly.
5040         (struct stop_reply) <arch>: New field.
5041         (remote_parse_stop_reply): Use the stopped thread's architecture,
5042         not the current inferior's.  Save the architecture in the
5043         stop_reply.
5044         (process_stop_reply): Use the stop reply's architecture.
5045         (process_g_packet, remote_fetch_registers)
5046         (remote_prepare_to_store, store_registers_using_G)
5047         (remote_store_registers): Adjust get_remote_arch_state calls,
5048         using the regcache's architecture.
5049         (remote_get_trace_status): Adjust get_remote_arch_state calls,
5050         passing down target_gdbarch explicitly.
5051         * spu-multiarch.c (spu_thread_architecture): Defer to the target
5052         beneath instead of calling target_gdbarch.
5053         * target.c (default_thread_architecture): Use the specified
5054         inferior's architecture, instead of the current inferior's
5055         architecture (via target_gdbarch).
5056
5057 2017-10-04  Pedro Alves  <palves@redhat.com>
5058
5059         * regcache.c (get_thread_arch_regcache): Remove null_ptid special
5060         case.
5061         (regcache_print): Handle !target_has_registers here instead.
5062
5063 2017-10-04  Pedro Alves  <palves@redhat.com>
5064
5065         * frame.c (create_test_frame): Delete.
5066         * frame.h (create_test_frame): Delete.
5067         * gdbarch-selftests.c: Include gdbthread.h and target.h.
5068         (class regcache_test): Delete.
5069         (test_target_has_registers, test_target_has_stack)
5070         (test_target_has_memory, test_target_prepare_to_store)
5071         (test_target_store_registers): New functions.
5072         (test_target_ops): New class.
5073         (register_to_value_test): Error out if there's already a
5074         process_stratum (or higher) target pushed.  Create a fuller mock
5075         environment, with mock target_ops, inferior, address space, thread
5076         and inferior_ptid.
5077         * progspace.c (struct address_space): Move to ...
5078         * progspace.h (struct address_space): ... here.
5079         * regcache.h (regcache::~regcache, regcache::raw_write)
5080         [GDB_SELF_TEST]: No longer virtual.
5081
5082 2017-10-04  Simon Marchi  <simon.marchi@ericsson.com>
5083
5084         * mi/mi-main.c (list_available_thread_groups): Reverse filter logic.
5085
5086 2017-10-04  Pedro Alves  <palves@redhat.com>
5087
5088         * guile/scm-breakpoint.c (gdbscm_breakpoint_commands): Move code
5089         out of 'between TRY and CATCH'.
5090
5091 2017-10-04  Pedro Alves  <palves@redhat.com>
5092
5093         * cli/cli-cmds.c (complete_command): Add missing END_CATCH.
5094         * common/common-exceptions.h (TRY): Open an outermost scope.
5095         Expand intro comment.
5096         (CATCH): Reindent.
5097         (END_CATCH): Close the outermost scope.
5098         * completer.c (complete_line_internal): Add missing END_CATCH.
5099
5100 2017-10-04  Sergio Durigan Junior  <sergiodj@redhat.com>
5101
5102         * NEWS (Changes since GDB 8.0): Add entry about new
5103         'set-cwd-on-gdbserver' feature.
5104         (New remote packets): Add entry for QSetWorkingDir.
5105         * common/common-inferior.h (set_inferior_cwd): New prototype.
5106         * infcmd.c (set_inferior_cwd): Remove "static".
5107         (show_cwd_command): Expand text to include remote debugging.
5108         * remote.c: Add PACKET_QSetWorkingDir.
5109         (remote_protocol_features) <QSetWorkingDir>: New entry for
5110         PACKET_QSetWorkingDir.
5111         (extended_remote_set_inferior_cwd): New function.
5112         (extended_remote_create_inferior): Call
5113         "extended_remote_set_inferior_cwd".
5114         (_initialize_remote): Call "add_packet_config_cmd" for
5115         QSetWorkingDir.
5116
5117 2017-10-04  Sergio Durigan Junior  <sergiodj@redhat.com>
5118
5119         * NEWS (New commands): Mention "set/show cwd".
5120         * cli/cli-cmds.c (_initialize_cli_cmds): Mention "set cwd" on
5121         "cd" command's help text.
5122         * common/common-inferior.h (get_inferior_cwd): New prototype.
5123         * infcmd.c (inferior_cwd_scratch): New global variable.
5124         (set_inferior_cwd): New function.
5125         (get_inferior_cwd): Likewise.
5126         (set_cwd_command): Likewise.
5127         (show_cwd_command): Likewise.
5128         (_initialize_infcmd): Add "set/show cwd" commands.
5129         * inferior.h (class inferior) <cwd>: New field.
5130         * nat/fork-inferior.c: Include "gdb_tilde_expand.h".
5131         (fork_inferior): Change inferior's cwd before its execution.
5132         * windows-nat.c (windows_create_inferior): Pass inferior's cwd
5133         to CreateProcess.
5134
5135 2017-10-04  Sergio Durigan Junior  <sergiodj@redhat.com>
5136
5137         * Makefile.in (SFILES): Add gdb_tilde_expand.c.
5138         (HFILES_NO_SRCDIR): Add gdb_tilde_expand.h.
5139         (COMMON_OBS): Add gdb_tilde_expand.o.
5140         * common/gdb_tilde_expand.c: New file.
5141         * common/gdb_tilde_expand.h: Likewise.
5142
5143 2017-10-03  Maciej W. Rozycki  <macro@imgtec.com>
5144
5145         * gdbarch.sh (objfile): Remove duplicate declaration.
5146         * gdbarch.h: Regenerate.
5147
5148 2017-10-03  Tom Tromey  <tom@tromey.com>
5149
5150         * utils.c (internal_vproblem): Use string_vprintf.
5151
5152 2017-10-03  Tom Tromey  <tom@tromey.com>
5153
5154         * printcmd.c (info_symbol_command): Use std::string.
5155
5156 2017-10-03  Tom Tromey  <tom@tromey.com>
5157
5158         * top.c (gdb_safe_append_history): Use std::string.
5159
5160 2017-10-03  Tom Tromey  <tom@tromey.com>
5161
5162         * event-top.c (stdin_event_handler): Update.
5163         * main.c (captured_main_1): Update.
5164         * top.h (make_delete_ui_cleanup): Remove.
5165         (struct ui): Add constructor and destructor.
5166         (new_ui, delete_ui): Remove.
5167         * top.c (make_delete_ui_cleanup): Remove.
5168         (new_ui_command): Use std::unique_ptr.
5169         (delete_ui_cleanup): Remove.
5170         (ui::ui): Rename from new_ui.  Update.
5171         (free_ui): Remove.
5172         (ui::~ui): Rename from delete_ui.  Update.
5173
5174 2017-10-03  Tom Tromey  <tom@tromey.com>
5175
5176         * symfile.c (load_progress): Use gdb::byte_vector.
5177
5178 2017-10-03  Tom Tromey  <tom@tromey.com>
5179
5180         * mi/mi-main.c (mi_cmd_trace_frame_collected): Remove unused
5181         declaration.
5182         * printcmd.c (x_command): Remove unused declaration.
5183         * symfile.c (symbol_file_command): Remove unused declaration.
5184
5185 2017-10-03  Tom Tromey  <tom@tromey.com>
5186
5187         * utils.c (internal_vproblem): Use std::string.
5188         (defaulted_query): Likewise.
5189
5190 2017-10-03  Tom Tromey  <tom@tromey.com>
5191
5192         * guile/scm-ports.c (ioscm_with_output_to_port_worker): Update.
5193         * top.c (execute_command_to_string): Update.
5194         * utils.c (make_cleanup_restore_page_info): Remove.
5195         (do_restore_page_info_cleanup): Remove.
5196         (set_batch_flag_and_restore_page_info):
5197         New.
5198         (make_cleanup_restore_page_info): Remove.
5199         (set_batch_flag_and_make_cleanup_restore_page_info): Remove.
5200         (~set_batch_flag_and_restore_page_info): New
5201         (make_cleanup_restore_uinteger): Remove.
5202         (make_cleanup_restore_integer): Remove.
5203         (struct restore_integer_closure): Remove.
5204         (restore_integer): Remove.
5205         * utils.h (struct set_batch_flag_and_restore_page_info): New
5206         class.
5207         (set_batch_flag_and_make_cleanup_restore_page_info): Remove.
5208         (make_cleanup_restore_page_info): Remove.
5209         (make_cleanup_restore_uinteger) Remove.
5210         (make_cleanup_restore_integer) Remove.
5211
5212 2017-10-03  Tom Tromey  <tom@tromey.com>
5213
5214         * record-full.h (record_full_gdb_operation_disable_set): Return
5215         scoped_restore_tmpl<int>.
5216         * infrun.c (adjust_pc_after_break): Update.
5217         (handle_signal_stop): Update.
5218         * record-full.c (record_full_gdb_operation_disable_set): Return
5219         scoped_restore_tmpl<int>.
5220         (record_full_wait_1, record_full_insert_breakpoint)
5221         (record_full_remove_breakpoint, record_full_save)
5222         (record_full_goto_insn): Update.
5223
5224 2017-10-02  Tom Tromey  <tom@tromey.com>
5225
5226         PR rust/22236:
5227         * rust-lang.c (rust_val_print_str): New function.
5228         (val_print_struct): Call it.
5229         (rust_subscript): Preserve name of slice type.
5230
5231 2017-10-02  Tom Tromey  <tom@tromey.com>
5232
5233         * rust-lang.c (rust_subscript): Handle slices in
5234         EVAL_AVOID_SIDE_EFFECTS case.
5235
5236 2017-10-02  Tom Tromey  <tom@tromey.com>
5237
5238         * rust-lang.c (rust_slice_type_p): Recognize &str as a slice type.
5239
5240 2017-10-02  Tom Tromey  <tom@tromey.com>
5241
5242         * rust-lang.h (rust_slice_type): Add "extern".
5243
5244 2017-10-02  Tom Tromey  <tom@tromey.com>
5245             Pedro Alves  <palves@redhat.com>
5246
5247         * ada-lang.h (ada_exc_info::operator<): Make const.
5248         (ada_exc_info::operator==): Make const.
5249         * ada-lang.c (ada_exc_info::operator<, ada_exc_info::operator==):
5250         Make const.
5251
5252 2017-09-29  Tom Tromey  <tom@tromey.com>
5253
5254         * target.c (read_whatever_is_readable): Change type of "result".
5255         Update.
5256         (free_memory_read_result_vector): Remove.
5257         (read_memory_robust): Change return type.  Update.
5258         * mi/mi-main.c (mi_cmd_data_read_memory_bytes): Update.  Use
5259         bin2hex, std::string.
5260         * target.h (memory_read_result_s): Remove typedef.
5261         (free_memory_read_result_vector): Remove.
5262         (read_memory_robust): Return std::vector.
5263
5264 2017-09-29  Tom Tromey  <tom@tromey.com>
5265
5266         * mi/mi-main.c (captured_mi_execute_command): Use scope_restore.
5267
5268 2017-09-29  Tom Tromey  <tom@tromey.com>
5269
5270         * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions): Update.
5271         * ada-lang.h (struct ada_exc_info): Remove typedef.  Declare
5272         operator< and operator==.
5273         (ada_exceptions_list): Return a std::vector.
5274         * ada-lang.c (ada_exc_info::operator<): Rename from
5275         compare_ada_exception_info.
5276         (ada_exc_info::operator==): New.
5277         (sort_remove_dups_ada_exceptions_list): Change type of
5278         "exceptions".
5279         (ada_add_standard_exceptions, ada_add_exceptions_from_frame)
5280         (ada_add_global_exceptions): Likewise.
5281         (ada_exceptions_list_1): Return a std::vector.
5282         (ada_exceptions_list): Likewise.
5283
5284 2017-09-29  Tom Tromey  <tom@tromey.com>
5285
5286         * mi/mi-main.c (struct print_one_inferior_data) <inferiors>: Now a
5287         'std::set *'.
5288         (print_one_inferior): Update.
5289         (free_vector_of_ints): Remove.
5290         (list_available_thread_groups): Change "ids" to std::set.
5291         (mi_cmd_list_thread_groups): Update.
5292         (struct collect_cores_data) <core>: Now a std::set.
5293         (collect_cores): Update.
5294         (unique): Remove.
5295         (print_one_inferior): Update.
5296
5297 2017-09-29  Tom Tromey  <tom@tromey.com>
5298
5299         * mi/mi-main.c (mi_execute_cli_command): Use std::string.
5300         (mi_execute_async_cli_command): Likewise.
5301         (mi_cmd_trace_frame_collected): Use field_fmt.
5302
5303 2017-09-29  Tom Tromey  <tom@tromey.com>
5304
5305         * mi/mi-main.c (mi_cmd_data_write_memory_bytes): Use
5306         gdb::byte_vector.
5307
5308 2017-09-29  Tom Tromey  <tom@tromey.com>
5309
5310         * mi/mi-parse.c (mi_parse): Remove unused declaration.
5311
5312 2017-09-29  Tom Tromey  <tom@tromey.com>
5313
5314         * mi/mi-cmd-disas.c (mi_cmd_disassemble): Don't copy "oarg".
5315
5316 2017-09-29  Tom Tromey  <tom@tromey.com>
5317
5318         * varobj.h (varobj_gen_name): Return std::string.
5319         * varobj.c (varobj_gen_name): Return std::string.
5320         * mi/mi-cmd-var.c (mi_cmd_var_create): Use std::string.
5321         (mi_cmd_var_delete): Don't copy "name".
5322
5323 2017-09-29  Tom Tromey  <tom@tromey.com>
5324
5325         * mi/mi-cmd-break.c (mi_argv_to_format): Return std::string.
5326         (mi_cmd_break_insert_1): Update.
5327
5328 2017-09-29  Tom Tromey  <tom@tromey.com>
5329
5330         * target.h (make_scoped_defer_target_commit_resume): Update.
5331         * target.c (make_scoped_defer_target_commit_resume): Rename from
5332         make_cleanup_defer_target_commit_resume.  Return a
5333         scoped_restore.
5334         * infrun.c (proceed): Use make_scoped_defer_target_commit_resume.
5335
5336 2017-09-29  Tom Tromey  <tom@tromey.com>
5337
5338         * main.c (captured_main_1): Remove unused declaration.
5339         * spu-multiarch.c (parse_spufs_run): Remove unused declaration.
5340
5341 2017-09-29  Tom Tromey  <tom@tromey.com>
5342
5343         * symtab.c (search_symbols): Remove unused outer cleanup.
5344         (make_source_files_completion_list): Remove unused declaration.
5345
5346 2017-09-29  Tom Tromey  <tom@tromey.com>
5347
5348         * mt-tdep.c (mt_push_dummy_call): Use gdb::byte_vector.
5349
5350 2017-09-29  Tom Tromey  <tom@tromey.com>
5351
5352         * xstormy16-tdep.c (xstormy16_push_dummy_call): Use
5353         gdb::byte_vector.
5354
5355 2017-09-29  Tom Tromey  <tom@tromey.com>
5356
5357         * complaints.c (vcomplaint): Use std::string.
5358
5359 2017-09-29  Tom Tromey  <tom@tromey.com>
5360
5361         * tracepoint.c (trace_variable_command): Use std::string.
5362         (encode_actions_1): Remove unused declarations.
5363         (create_tsv_from_upload): Use std::string.
5364
5365 2017-09-29  Tom Tromey  <tom@tromey.com>
5366
5367         * cp-support.c (gdb_demangle): Use std::string.
5368
5369 2017-09-29  Tom Tromey  <tom@tromey.com>
5370
5371         * stack.c (parse_frame_specification): Use std::string
5372         (info_frame_command): Use gdb::unique_xmalloc_ptr.
5373
5374 2017-09-29  Tom Tromey  <tom@tromey.com>
5375
5376         * tilegx-tdep.c (tilegx_push_dummy_call): Use gdb::byte_vector.
5377
5378 2017-09-29  Tom Tromey  <tom@tromey.com>
5379
5380         * utils.c (vfprintf_maybe_filtered): Use std::string.
5381         (vfprintf_unfiltered): Likewise.
5382
5383 2017-09-29  Tom Tromey  <tom@tromey.com>
5384
5385         * event-top.c (top_level_prompt): Return std::string.
5386         (display_gdb_prompt): Update.
5387
5388 2017-09-29  Tom Tromey  <tom@tromey.com>
5389
5390         * unittests/common-utils-selftests.c (format): New function.
5391         (string_vprintf_tests): New function.
5392         (_initialize_common_utils_selftests): Register new tests.
5393         * common/common-utils.c (string_vprintf): New function.
5394         * common/common-utils.h (string_vprintf): Declare.
5395
5396 2017-09-29  Pedro Alves  <palves@redhat.com>
5397
5398         * common/rsp-low.c (unpack_varlen_hex): Constify.
5399         * common/rsp-low.h (unpack_varlen_hex): Constify.
5400         * linux-nat.c (linux_child_static_tracepoint_markers_by_strid):
5401         Constify.
5402         * remote.c (remote_set_permissions, read_ptid)
5403         (remote_current_thread, remote_get_threads_with_qthreadinfo)
5404         (remote_static_tracepoint_marker_at)
5405         (remote_static_tracepoint_markers_by_strid)
5406         (stop_reply_extract_thread, remote_parse_stop_reply): Constify.
5407         * tracepoint.c (parse_trace_status, parse_tracepoint_status)
5408         (parse_tracepoint_definition, parse_tsv_definition)
5409         (parse_static_tracepoint_marker_definition): Constify.
5410         * tracepoint.h (parse_static_tracepoint_marker_definition)
5411         (parse_trace_status, parse_tracepoint_status)
5412         (parse_tracepoint_definition, parse_tsv_definition): Constify.
5413
5414 2017-09-29  Pedro Alves  <palves@redhat.com>
5415
5416         * remote.c (target_buf, target_buf_size): Delete.
5417         (remote_get_noisy_reply): Remove buf_p and sizeof_buf parameters.
5418         Use the connection's packet buffer instead.
5419         All callers adjusted.
5420         (_initialize_remote): Remove references to target_buf and
5421         target_buf_size.
5422
5423 2017-09-28  Pedro Alves  <palves@redhat.com>
5424
5425         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
5426         unittests/common-utils-selftests.c.
5427         (SUBDIR_UNITTESTS_OBS): Add common-utils-selftests.o.
5428         (COMMON_OBS): Remove utils-selftests.o.
5429         * utils-selftests.c: Move to ...
5430         * unittests/common-utils-selftests.c: ... here and rename self
5431         test to "string_printf".
5432
5433 2017-09-28  Alexander Shaposhnikov <alexander.v.shaposhnikov@gmail.com> (tiny patch)
5434
5435         * dwarf2read.c (open_and_init_dwp_file): Protect against dwp_file
5436         having NULL cus or tus.
5437
5438 2017-09-27  Ulrich Weigand  <uweigand@de.ibm.com>
5439
5440         * arm-tdep.c: (convert_from_extended): Remove.
5441         (convert_to_extended): Likewise.
5442         (arm_extract_return_value): Use convert_typed_floating.
5443         (arm_store_return_value): Likewise.
5444
5445         * sh-tdep.h (struct gdbarch_tdep): Add sh_littlebyte_bigword_type.
5446         * sh-tdep.c: Do not include "floatformat.h".
5447         (sh_littlebyte_bigword_type): New function.
5448         (sh_register_convert_to_virtual): Use convert_typed_floating.
5449         (sh_register_convert_to_raw): Likewise.
5450         * sh64-tdep.c: (struct gdbarch_tdep): Add sh_littlebyte_bigword_type.
5451         (sh64_littlebyte_bigword_type): New function.
5452         (sh64_extract_return_value): Use convert_typed_floating.
5453         (sh64_register_convert_to_virtual): Likewise.
5454         (sh64_register_convert_to_raw): Likewise.
5455
5456 2017-09-27  Ulrich Weigand  <uweigand@de.ibm.com>
5457
5458         * doublest.h (floatformat_from_type): Move to gdbtypes.h.
5459         * doublest.c (floatformat_from_type): Move to gdbtypes.c.
5460
5461         * gdbtypes.h (union type_specific): Make field floatformat hold
5462         just a single struct floatformat, not an array.
5463         (floatformat_from_type): Move here.
5464         * gdbtypes.c (floatformat_from_type): Move here.  Update to
5465         changed TYPE_FLOATFORMAT definition.
5466         (verify_floatformat): Update to changed TYPE_FLOATFORMAT.
5467         (recursive_dump_type): Likewise.
5468         (init_float_type): Install correct floatformat for byte order.
5469         (arch_float_type): Likewise.
5470
5471 2017-09-27  Ulrich Weigand  <uweigand@de.ibm.com>
5472
5473         * gdbtypes.c (init_type): Change incoming argument from
5474         length-in-bytes to length-in-bits.  Assert length is a
5475         multiple of TARGET_CHAR_BITS.
5476         (arch_type, arch_flags_type): Likewise.
5477         (init_integer_type): Update call to init_type.
5478         (init_character_type): Likewise.
5479         (init_boolean_type): Likewise.
5480         (init_float_type): Likewise.
5481         (init_decfloat_type): Likewise.
5482         (init_complex_type): Likewise.
5483         (init_pointer_type): Likewise.
5484         (objfile_type): Likewise.
5485         (arch_integer_type): Update call to arch_type.
5486         (arch_character_type): Likewise.
5487         (arch_boolean_type): Likewise.
5488         (arch_float_type): Likewise.
5489         (arch_decfloat_type): Likewise.
5490         (arch_complex_type): Likewise.
5491         (arch_pointer_type): Likewise.
5492         (gdbtypes_post_init): Likewise.
5493
5494         * dwarf2read.c (dwarf2_init_float_type): Update call to init_type.
5495         (read_base_type): Likewise.
5496         * mdebugread.c (basic_type): Likewise.
5497         * stabsread.c (dbx_init_float_type): Likewise.
5498         (rs6000_builtin_type): Likewise.
5499         (read_range_type): Likewise.  Also, fix call to init_integer_type
5500         with erroneous length argument.
5501
5502         * ada-lang.c (ada_language_arch_info): Update call to arch_type.
5503         * d-lang.c (build_d_types): Likewise.
5504         * f-lang.c (build_fortran_types): Likewise.
5505         * go-lang.c (build_go_types): Likewise.
5506         * opencl-lang.c (build_opencl_types): Likewise.
5507         * jit.c (finalize_symtab): Likewise.
5508         * gnu-v3-abi.c (build_gdb_vtable_type): Likewise.
5509         (build_std_type_info_type): Likewise.
5510         * target-descriptions.c (tdesc_gdb_type): Likewise.  Also,
5511         update call to arch_flags_type.
5512
5513         * linux-tdep.c (linux_get_siginfo_type_with_fields): Update call to
5514         arch_type.
5515         * fbsd-tdep.c (fbsd_get_siginfo_type): Likewise.
5516         * windows-tdep.c (windows_get_tlb_type): Likewise.
5517
5518         * avr-tdep.c (avr_gdbarch_init): Update call to arch_type.
5519         * ft32-tdep.c (ft32_gdbarch_init): Likewise.
5520         * m32c-tdep.c (make_types): Likewise.
5521         * rl78-tdep.c (rl78_gdbarch_init): Likewise.
5522         (rl78_psw_type): Update call to arch_flags_type.
5523         * m68k-tdep.c (m68k_ps_type): Update call to arch_flags_type.
5524         * rx-tdep.c (rx_psw_type): Likewise.
5525         (rx_fpsw_type): Likewise.
5526         * sparc-tdep.c (sparc_psr_type): Likewise.
5527         (sparc_fsr_type): Likewise.
5528         * sparc64-tdep.c (sparc64_pstate_type): Likewise.
5529         (sparc64_ccr_type): Likewise.
5530         (sparc64_fsr_type): Likewise.
5531         (sparc64_fprs_type): Likewise.
5532
5533 2017-09-27  Tom Tromey  <tom@tromey.com>
5534
5535         * findcmd.c (find_command): Constify.
5536
5537 2017-09-27  Tom Tromey  <tom@tromey.com>
5538
5539         * ada-tasks.c (task_command_1, task_command): Constify.
5540
5541 2017-09-27  Tom Tromey  <tom@tromey.com>
5542
5543         * symtab.c (maintenance_print_symbol_cache)
5544         (maintenance_flush_symbol_cache)
5545         (maintenance_print_symbol_cache_statistics): Constify.
5546
5547 2017-09-27  Tom Tromey  <tom@tromey.com>
5548
5549         * inferior.c (detach_inferior_command, kill_inferior_command)
5550         (inferior_command): Constify.
5551
5552 2017-09-27  Tom Tromey  <tom@tromey.com>
5553
5554         * regcache.c (regcache_print, maintenance_print_registers)
5555         (maintenance_print_raw_registers)
5556         (maintenance_print_cooked_registers)
5557         (maintenance_print_register_groups)
5558         (maintenance_print_remote_registers): Constify.
5559
5560 2017-09-27  Tom Tromey  <tom@tromey.com>
5561
5562         * printcmd.c (map_display_numbers, undisplay_command)
5563         (enable_disable_display_command, enable_display_command)
5564         (disable_display_command): Constify.
5565
5566 2017-09-27  Tom Tromey  <tom@tromey.com>
5567
5568         * breakpoint.h (delete_command): Don't declare.
5569         * breakpoint.c (delete_command, enable_once_command)
5570         (enable_count_command, enable_delete_command, breakpoint_1)
5571         (maintenance_info_breakpoints, stopin_command, stopat_command)
5572         (delete_command, delete_trace_command, save_breakpoints)
5573         (save_breakpoints_command, save_tracepoints_command): Constify.
5574
5575 2017-09-27  Tom Tromey  <tom@tromey.com>
5576
5577         * macrocmd.c (macro_expand_command, macro_expand_once_command)
5578         (skip_ws, extract_identifier, macro_define_command)
5579         (macro_undef_command, macro_list_command): Constify.
5580
5581 2017-09-27  Tom Tromey  <tom@tromey.com>
5582
5583         * infcmd.c (environment_info, set_environment_command)
5584         (unset_environment_command, path_info, info_proc_cmd_1)
5585         (info_proc_cmd_mappings, info_proc_cmd_stat)
5586         (info_proc_cmd_status, info_proc_cmd_cwd, info_proc_cmd_cmdline)
5587         (info_proc_cmd_exe, info_proc_cmd_all): Constify.
5588
5589 2017-09-27  Tom Tromey  <tom@tromey.com>
5590
5591         * i386-tdep.c (i386_mpx_info_bounds, i386_mpx_set_bounds):
5592         Constify.
5593
5594 2017-09-27  Tom Tromey  <tom@tromey.com>
5595
5596         * symfile-mem.c (add_symbol_file_from_memory_command): Constify.
5597
5598 2017-09-27  Tom Tromey  <tom@tromey.com>
5599
5600         * demangle.c (demangle_command): Constify.
5601
5602 2017-09-27  Tom Tromey  <tom@tromey.com>
5603
5604         * progspace.c (maintenance_info_program_spaces_command):
5605         Constify.
5606
5607 2017-09-27  Tom Tromey  <tom@tromey.com>
5608
5609         * compile/compile.c (check_raw_argument, compile_file_command)
5610         (compile_code_command, compile_print_command): Constify.
5611
5612 2017-09-27  Tom Tromey  <tom@tromey.com>
5613
5614         * reggroups.c (maintenance_print_reggroups): Constify.
5615
5616 2017-09-27  Tom Tromey  <tom@tromey.com>
5617
5618         * dwarf2read.c (save_gdb_index_command): Constify.
5619
5620 2017-09-27  Tom Tromey  <tom@tromey.com>
5621
5622         * stap-probe.c (info_probes_stap_command): Constify.
5623
5624 2017-09-27  Tom Tromey  <tom@tromey.com>
5625
5626         * fork-child.c (unset_exec_wrapper_command): Constify.
5627
5628 2017-09-27  Tom Tromey  <tom@tromey.com>
5629
5630         * btrace.c (get_uint, get_context_size, no_chunk)
5631         (maint_btrace_packet_history_cmd)
5632         (maint_btrace_clear_packet_history_cmd, maint_btrace_clear_cmd)
5633         (maint_info_btrace_cmd): Constify.
5634
5635 2017-09-27  Tom Tromey  <tom@tromey.com>
5636
5637         * reverse.c (delete_bookmark_command): Constify.
5638
5639 2017-09-27  Tom Tromey  <tom@tromey.com>
5640
5641         * remote.c (set_memory_packet_size)
5642         (set_memory_write_packet_size, show_memory_write_packet_size)
5643         (set_memory_read_packet_size, show_memory_read_packet_size)
5644         (compare_sections_command, packet_command, remote_put_command)
5645         (remote_get_command, remote_delete_command): Constify.
5646
5647 2017-09-27  Tom Tromey  <tom@tromey.com>
5648
5649         * mips-tdep.c (show_mipsfpu_command, set_mipsfpu_single_command)
5650         (set_mipsfpu_double_command, set_mipsfpu_none_command)
5651         (set_mipsfpu_auto_command): Constify.
5652
5653 2017-09-27  Tom Tromey  <tom@tromey.com>
5654
5655         * cli/cli-cmds.h (cd_command): Constify.
5656         * cli/cli-cmds.c (cd_command): Constify.
5657
5658 2017-09-27  Tom Tromey  <tom@tromey.com>
5659
5660         * thread.c (thread_name_command, thread_find_command): Constify.
5661
5662 2017-09-27  Tom Tromey  <tom@tromey.com>
5663
5664         * probe.c (enable_probes_command, disable_probes_command):
5665         Constify.
5666
5667 2017-09-27  Tom Tromey  <tom@tromey.com>
5668
5669         * symfile.c (symbol_file_command): Constify.
5670         * gdbcore.h (deprecated_file_changed_hook): Constify.
5671         * exec.c (deprecated_file_changed_hook, exec_file_command)
5672         (file_command): Constify.
5673         * defs.h (symbol_file_command): Constify.
5674
5675 2017-09-27  Tom Tromey  <tom@tromey.com>
5676
5677         * remote-fileio.c (set_system_call_allowed)
5678         (show_system_call_allowed): Constify.
5679
5680 2017-09-27  Tom Tromey  <tom@tromey.com>
5681
5682         * tracepoint.c (delete_trace_variable_command)
5683         (tfind_end_command, tfind_start_command, tfind_pc_command)
5684         (tfind_tracepoint_command, tfind_line_command)
5685         (tfind_range_command, tfind_outside_command): Constify.
5686
5687 2017-09-27  Tom Tromey  <tom@tromey.com>
5688
5689         * ax-gdb.c (maint_agent_printf_command, agent_command)
5690         (agent_eval_command): Constify.
5691
5692 2017-09-27  Tom Tromey  <tom@tromey.com>
5693
5694         * tracepoint.c (info_scope_command): Constify.
5695         * python/python.c (gdbpy_decode_line): Constify.
5696         * python/py-breakpoint.c (bppy_init): Constify.
5697         * mi/mi-cmd-break.c (mi_cmd_break_insert_1): Constify.
5698         * location.h: (new_linespec_location)
5699         (string_to_event_location_basic, string_to_event_location):
5700         Constify.
5701         * location.c (new_linespec_location)
5702         (string_to_event_location_basic, string_to_event_location):
5703         Constify.
5704         * linespec.h (decode_line_with_current_source)
5705         (decode_line_with_last_displayed, linespec_lex_to_end): Constify.
5706         * linespec.c (linespec_lex_to_end)
5707         (decode_line_with_current_source)
5708         (decode_line_with_last_displayed): Constify.
5709         * guile/scm-breakpoint.c (gdbscm_register_breakpoint_x):
5710         Constify.
5711         * cli/cli-cmds.c (edit_command, list_command): Constify.
5712         * breakpoint.h (until_break_command, watch_command_wrapper)
5713         (awatch_command_wrapper, rwatch_command_wrapper)
5714         (init_ada_exception_breakpoint): Constify.
5715         * breakpoint.c (break_command_1, dprintf_command)
5716         (break_range_command, watch_command_wrapper)
5717         (rwatch_command_wrapper, awatch_command_wrapper)
5718         (until_break_command, init_ada_exception_breakpoint)
5719         (strace_marker_create_sals_from_location, trace_command)
5720         (ftrace_command, strace_command, struct tracepoint): Constify.
5721         * ax-gdb.c (agent_command_1): Constify.
5722         * ada-lang.c (ada_exception_sal): Constify.
5723
5724 2017-09-27  Tom Tromey  <tom@tromey.com>
5725
5726         * record.c (cmd_record_delete, cmd_record_stop, cmd_record_save)
5727         (cmd_record_goto_begin, cmd_record_goto_end, get_insn_number)
5728         (get_context_size, no_chunk, get_insn_history_modifiers)
5729         (cmd_record_insn_history, get_call_history_modifiers)
5730         (cmd_record_call_history): Constify.
5731
5732 2017-09-27  Tom Tromey  <tom@tromey.com>
5733
5734         * source.c (show_substitute_path_command)
5735         (unset_substitute_path_command, set_substitute_path_command):
5736         Constify.
5737
5738 2017-09-27  Tom Tromey  <tom@tromey.com>
5739
5740         * typeprint.c (maintenance_print_type): Constify.
5741         * maint.c (maintenance_dump_me, maintenance_demangle)
5742         (maintenance_time_display, maintenance_info_sections)
5743         (maintenance_print_statistics, maintenance_deprecate)
5744         (maintenance_undeprecate): Constify.
5745         (maintenance_do_deprecate): Constify.  Use std::string.
5746         (maintenance_selftest): Constify.
5747         * gdbtypes.h (maintenance_print_type): Constify.
5748
5749 2017-09-27  Tom Tromey  <tom@tromey.com>
5750
5751         * hppa-tdep.c (unwind_command): Constify.
5752
5753 2017-09-27  Tom Tromey  <tom@tromey.com>
5754
5755         * target-descriptions.c (unset_tdesc_filename_cmd)
5756         (maint_print_c_tdesc_cmd, maintenance_check_xml_descriptions):
5757         Constify.
5758
5759 2017-09-27  Tom Tromey  <tom@tromey.com>
5760
5761         * dummy-frame.c (maintenance_print_dummy_frames): Constify.
5762
5763 2017-09-27  Tom Tromey  <tom@tromey.com>
5764
5765         * tui/tui.c (tui_enable_command, tui_disable_command): Constify.
5766
5767 2017-09-27  Tom Tromey  <tom@tromey.com>
5768
5769         * tui/tui-regs.c (tui_reg_command): Constify.
5770
5771 2017-09-27  Tom Tromey  <tom@tromey.com>
5772
5773         * skip.c (skip_file_command, skip_function_command)
5774         (skip_enable_command, skip_disable_command, skip_delete_command):
5775         Constify.
5776
5777 2017-09-27  Tom Tromey  <tom@tromey.com>
5778
5779         * record-btrace.c (cmd_record_btrace_bts_start)
5780         (cmd_record_btrace_pt_start): Constify.
5781
5782 2017-09-27  Tom Tromey  <tom@tromey.com>
5783
5784         * symmisc.c (maintenance_print_symbols)
5785         (maintenance_print_msymbols, maintenance_print_objfiles)
5786         (maintenance_info_symtabs, maintenance_check_symtabs)
5787         (maintenance_expand_symtabs, maintenance_info_line_tables):
5788         Constify.
5789
5790 2017-09-27  Tom Tromey  <tom@tromey.com>
5791
5792         * top.c (new_ui_command): Constify.
5793
5794 2017-09-27  Tom Tromey  <tom@tromey.com>
5795
5796         * symfile.c (add_symbol_file_command)
5797         (remove_symbol_file_command, list_overlays_command)
5798         (map_overlay_command, unmap_overlay_command)
5799         (overlay_auto_command, overlay_manual_command)
5800         (overlay_off_command, overlay_load_command): Constify.
5801
5802 2017-09-27  Tom Tromey  <tom@tromey.com>
5803
5804         * spu-tdep.c (info_spu_event_command, info_spu_signal_command)
5805         (info_spu_mailbox_command, info_spu_dma_command)
5806         (info_spu_proxydma_command): Constify.
5807
5808 2017-09-27  Tom Tromey  <tom@tromey.com>
5809
5810         * cli/cli-logging.c (set_logging_on, set_logging_off): Constify.
5811
5812 2017-09-27  Tom Tromey  <tom@tromey.com>
5813
5814         * cli/cli-script.c (user_defined_command): Constify.
5815
5816 2017-09-27  Tom Tromey  <tom@tromey.com>
5817
5818         * cli/cli-dump.c (dump_memory_command, dump_value_command)
5819         (dump_srec_memory, dump_srec_value, dump_ihex_memory)
5820         (dump_ihex_value, dump_verilog_memory, dump_verilog_value)
5821         (dump_tekhex_memory, dump_tekhex_value, dump_binary_memory)
5822         (dump_binary_value, append_binary_memory, append_binary_value):
5823         Constify.
5824         (struct dump_context) <func>: Constify.
5825         (add_dump_command): Update.
5826
5827 2017-09-27  Tom Tromey  <tom@tromey.com>
5828
5829         * cli/cli-cmds.c (show_version, show_configuration)
5830         (source_command, show_user): Constify.
5831
5832 2017-09-27  Tom Tromey  <tom@tromey.com>
5833
5834         * target.c (maintenance_print_target_stack): Constify.
5835
5836 2017-09-27  Tom Tromey  <tom@tromey.com>
5837
5838         * interps.c (interpreter_exec_cmd): Constify.
5839
5840 2017-09-27  Tom Tromey  <tom@tromey.com>
5841
5842         * record-full.c (cmd_record_full_restore): Constify.
5843
5844 2017-09-27  Tom Tromey  <tom@tromey.com>
5845
5846         * memattr.c (enable_mem_command, disable_mem_command)
5847         (delete_mem_command): Constify.
5848
5849 2017-09-27  Tom Tromey  <tom@tromey.com>
5850
5851         * value.c (show_convenience): Constify.
5852
5853 2017-09-27  Tom Tromey  <tom@tromey.com>
5854
5855         * gdbcore.h (core_file_command): Update.
5856         * corefile.c (core_file_command): Constify.
5857
5858 2017-09-27  Tom Tromey  <tom@tromey.com>
5859
5860         * user-regs.c (maintenance_print_user_registers): Constify.
5861
5862 2017-09-27  Tom Tromey  <tom@tromey.com>
5863
5864         * cp-namespace.c (maintenance_cplus_namespace): Constify.
5865
5866 2017-09-27  Tom Tromey  <tom@tromey.com>
5867
5868         * cp-support.c (first_component_command): Constify.
5869
5870 2017-09-27  Tom Tromey  <tom@tromey.com>
5871
5872         * psymtab.c (maintenance_print_psymbols)
5873         (maintenance_info_psymtabs, maintenance_check_psymtabs):
5874         Constify.
5875
5876 2017-09-27  Tom Tromey  <tom@tromey.com>
5877
5878         * windows-tdep.c (display_tib): Constify.
5879
5880 2017-09-27  Tom Tromey  <tom@tromey.com>
5881
5882         * linux-fork.c (delete_checkpoint_command)
5883         (detach_checkpoint_command): Constify.
5884
5885 2017-09-27  Tom Tromey  <tom@tromey.com>
5886
5887         * cp-abi.c (set_cp_abi_cmd, show_cp_abi_cmd): Constify.
5888
5889 2017-09-27  Tom Tromey  <tom@tromey.com>
5890
5891         * arc-tdep.c (dump_arc_instruction_command): Constify.
5892
5893 2017-09-27  Tom Tromey  <tom@tromey.com>
5894
5895         * valprint.c (set_radix, show_radix): Constify.
5896
5897 2017-09-27  Tom Tromey  <tom@tromey.com>
5898
5899         * dtrace-probe.c (info_probes_dtrace_command): Constify.
5900
5901 2017-09-27  Tom Tromey  <tom@tromey.com>
5902
5903         * command.h (not_just_help_class_command): Update.
5904         * cli/cli-decode.h (not_just_help_class_command): Update.
5905         * cli/cli-decode.c (not_just_help_class_command): Constify.
5906
5907 2017-09-27  Tom Tromey  <tom@tromey.com>
5908
5909         * gdb_bfd.c (maintenance_info_bfds): Constify.
5910
5911 2017-09-27  Tom Tromey  <tom@tromey.com>
5912
5913         * cli/cli-decode.c (add_cmd, set_cmd_cfunc): New function
5914         overloads.
5915         (do_add_cmd): Rename from add_cmd.  Don't call set_cmd_cfunc.
5916         (do_const_cfunc): New function.
5917         (cmd_cfunc_eq): New overload.
5918         (cli_user_command_p): Check do_const_cfunc.
5919         * cli/cli-decode.h (struct cmd_list_element) <function>: New field
5920         const_cfunc.
5921         * command.h (add_cmd): Add const overload and no-function
5922         overload.
5923         (set_cmd_cfunc): Add const overload.
5924         (cmd_const_cfunc_ftype): Declare.
5925         (cmd_cfunc_eq): Add const overload.
5926         * breakpoint.c, cli-cmds.c, cli-dump.c, guile/scm-cmd.c,
5927         python/py-cmd.c, target.c, tracepoint.c: Use no-function add_cmd
5928         overload.
5929
5930 2017-09-27  Tom Tromey  <tom@tromey.com>
5931
5932         * macroexp.c (get_next_token_for_substitution): New function.
5933         (substitute_args): Call it.  Check for __VA_OPT__.
5934
5935 2017-09-26  Walfred Tedeschi  <walfred.tedeschi@intel.com>
5936             Pedro Alves <palves@redhat.com>
5937
5938         * dwarf2read.c (dwarf2_cu): Remove field producer_is_icc and add
5939         producer_is_icc_lt_14.
5940         (producer_is_icc_lt_14): New function.
5941         (check_producer): Add code for checking version of ICC.
5942         (producer_is_icc): Move to producer.c.
5943         (read_structure_type): Restrict ICC workaround to ICC<14.
5944         * producer.c: Include selftest.h.
5945         (producer_is_icc, producer_parsing_tests, _initialize_producer):
5946         New functions.
5947         * producer.h (producer_is_icc): New declaration.
5948
5949 2017-09-26  Walfred Tedeschi  <walfred.tedeschi@intel.com>
5950
5951         * Makefile.in (SFILES): Add producer.c.
5952         (COMMON_OBS): Add producer.o
5953         * amd64-tdep.c (producer.h): Add new include.
5954         * dwarf2read.c (producer.h): Add new include.
5955         * producer.c: New file.
5956         * producer.h: New file.
5957         * utils.c (producer_is_gcc, producer_is_gcc_ge_4): Move to
5958         producer.c.
5959         * utils.h (producer_is_gcc, producer_is_gcc_ge_4): Move to
5960         producer.h.
5961
5962 2017-09-26  Matthias Klose  <doko@ubuntu.com>
5963
5964         * configure.ac: Search ncursesw before ncurses.
5965         Check ncursesw/ncurses.h before ncurses/ncurses.h.
5966         * gdb_curses.h: Include <ncursesw/ncurses.h>
5967         * config.in, configure: Regenerate.
5968
5969 2017-09-26  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
5970
5971         PR gdb/22185
5972         * configure.host <*-*-solaris2.[01], *-*-solaris2.[2-9]*>: Mark as
5973         obsolete.
5974         Use gdb_host sol2 for i[34567]86-*-solaris2*, x86_64-*-solaris2*.
5975         Remove i386sol2 support.
5976         * configure.nat <i386sol2>: Remove.
5977         <sol2-64>: Fold into ...
5978         <sol2>: ... this.
5979         Move common settings to default section.
5980         Add sol-thread.o.
5981         * configure.tgt <i[34567]86-*-solaris2.1[0-9]*,
5982         x86_64-*-solaris2.1[0-9]*>: Rename to ...
5983         <i[34567]86-*-solaris2*, x86_64-*-solaris2*>: ... this.
5984         <i[34567]86-*-solaris*>: Remove.
5985         <sparc-*-solaris2.[0-6], sparc-*-solaris2.[0-6].*>: Remove.
5986
5987         * configure.ac: Remove wctype in libw check.
5988         (_MSE_INT_H): Don't define on Solaris 7-9.
5989         <solaris*>: Remove libthread_db.so.1 check.
5990         * configure: Regenerate.
5991         * config.in: Regenerate.
5992
5993         * proc-service.c: Remove PROC_SERVICE_IS_OLD handling.
5994         (gdb_ps_prochandle_t, gdb_ps_read_buf_t, gdb_ps_write_buf_t)
5995         (gdb_ps_size_t): Remove.
5996         Use base types in users.
5997         * sol-thread.c: Likewise, also for gdb_ps_addr_t.
5998
5999         * NEWS (Changes since GDB 8.0): Document Solaris 2.0-9 removal.
6000
6001 2017-09-26  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
6002
6003         PR build/22206
6004         * sparc64-tdep.c (adi_tag_fd): Print pid as long.
6005         (adi_is_addr_mapped): Likewise.
6006         (PSR_ICC): Don't redefine.
6007         (PSR_IMPL): Likewise.
6008
6009 2017-09-25  Tom Tromey  <tom@tromey.com>
6010
6011         * regcache.c (regcache::dump): Use string_printf.
6012
6013 2017-09-25  Tom Tromey  <tom@tromey.com>
6014
6015         * regcache.c (class regcache_invalidator): New.
6016         (struct register_to_invalidate): Remove.
6017         (make_cleanup_regcache_invalidate): Remove.
6018         (regcache::raw_write): Use regcache_invalidator.
6019
6020 2017-09-25  Tom Tromey  <tom@tromey.com>
6021
6022         * spu-tdep.c (spu2ppu_sniffer): Update.
6023         * regcache.h (make_cleanup_regcache_xfree): Don't declare.
6024         * regcache.c (do_regcache_xfree, make_cleanup_regcache_xfree):
6025         Remove.
6026         * ppc-linux-tdep.c (ppu2spu_sniffer): Update.
6027         * mi/mi-main.c (mi_cmd_data_list_changed_registers): Update.
6028         * frame.h (frame_save_as_regcache): Return std::unique_ptr.
6029         * frame.c (frame_save_as_regcache): Return std::unique_ptr.
6030         (frame_pop): Update.
6031
6032 2017-09-25  Tom Tromey  <tom@tromey.com>
6033
6034         * spu-tdep.c (spu2ppu_dealloc_cache): Use delete.
6035         * regcache.h (regcache_xfree): Don't declare.
6036         * regcache.c (regcache_xfree): Remove.
6037         (do_regcache_xfree): Use delete.
6038         * ppc-linux-tdep.c (ppu2spu_dealloc_cache): Use delete.
6039         * linux-fork.c (free_fork): Use delete.
6040         (fork_save_infrun_state): Likewise.
6041         * jit.c (jit_dealloc_cache): Use delete.
6042         * infrun.c (discard_infcall_suspend_state): Use delete.
6043
6044 2017-09-25  Tom Tromey  <tom@tromey.com>
6045
6046         * regcache.h (regcache_xmalloc): Don't declare.
6047         (regcache_raw_set_cached_value): Update comment.
6048         * regcache.c (regcache_xmalloc): Remove.
6049         * ppc-linux-tdep.c (ppu2spu_sniffer): Use new.
6050         * jit.c (jit_frame_sniffer): Use new.
6051         * frame.c (frame_save_as_regcache): Use new.
6052
6053 2017-09-25  Andreas Arnez  <arnez@linux.vnet.ibm.com>
6054
6055         * NEWS: Advertise support for guarded-storage registers on IBM z.
6056
6057 2017-09-25  Andreas Arnez  <arnez@linux.vnet.ibm.com>
6058
6059         * s390-linux-nat.c (have_regset_gs): New static variable.
6060         (s390_linux_fetch_inferior_registers): Handle guarded-storage
6061         control block and guarded-storage broadcast control regsets.
6062         (s390_read_description): Detect whether the target has
6063         guarded-storage support, return appropriate tdesc.
6064         * s390-linux-tdep.c (features/s390-gs-linux64.c): New include.
6065         (features/s390x-gs-linux64.c): Likewise.
6066         (struct gdbarch_tdep) <have_gs>: New field.
6067         (s390_regmap_gs, s390_regmap_gsbc, s390_gs_regset)
6068         (s390_gsbc_regset): New variables.
6069         (s390_iterate_over_regset_sections): Iterate over s390_gs_regset
6070         and s390_gsbc_regset, if applicable.
6071         (s390_core_read_description): Check whether core file was from a
6072         target with guarded-storage support; include appropriate regsets.
6073         (s390_gdbarch_init): Add registers for guarded-storage support.
6074         (_initialize_s390_tdep): Initialize new target descriptions that
6075         include registers for guarded-storage support.
6076         * s390-linux-tdep.h (HWCAP_S390_GS, S390_GSD_REGNUM)
6077         (S390_GSSM_REGNUM, S390_GSEPLA_REGNUM)
6078         (S390_BC_GSD_REGNUM, S390_BC_GSSM_REGNUM): New defines.
6079         (S390_NUM_REGS): Adjust macro definition.
6080         (s390_gs_regset, s390_gsbc_regset, tdesc_s390_gs_linux64)
6081         (tdesc_s390x_gs_linux64): New declarations.
6082
6083 2017-09-25  Andreas Arnez  <arnez@linux.vnet.ibm.com>
6084
6085         * features/s390-gs-linux64.xml: New file.
6086         * features/s390-gs.xml: New file.
6087         * features/s390-gsbc.xml: New file.
6088         * features/s390x-gs-linux64.xml: New file.
6089         * features/Makefile (WHICH): Add s390-gs-linux64 and
6090         s390x-gs-linux64.
6091         (s390-gs-linux64-expedite, s390x-gs-linux64-expedite): New macros.
6092         (XMLTOC): Add s390-gs-linux64.xml and s390x-linux64.xml.
6093         * features/s390-gs-linux64.c: New generated file.
6094         * features/s390x-gs-linux64.c: New file.
6095         * regformats/s390-gs-linux64.dat: New file.
6096         * regformats/s390x-gs-linux64.dat: New file.
6097
6098 2017-09-23  Tom Tromey  <tom@tromey.com>
6099
6100         * defs.h (make_cleanup_override_quit_handler): Don't declare.
6101
6102 2017-09-22  Tom Tromey  <tom@tromey.com>
6103
6104         * utils.c (class scoped_input_handler) <m_quit_handler>: Change
6105         type to scoped_restore_tmpl.
6106         <scoped_input_handler>: Initialize m_quit_handler directly.
6107
6108 2017-09-22  Sergio Durigan Junior  <sergiodj@redhat.com>
6109
6110         * cli/cli-cmds.c (pwd_command): Use "getcwd (NULL, 0)".
6111         (cd_command): Likewise.  Free "current_directory" before
6112         assigning to it.
6113         * main.c (captured_main_1): Use "getcwd (NULL, 0)".
6114         * mi/mi-cmd-env.c (mi_cmd_env_pwd): Likewise.
6115         * top.c (gdb_dirbuf): Remove global declaration.
6116         * top.h (gdb_dirbuf): Likewise.
6117
6118 2017-09-22  Sergio Durigan Junior  <sergiodj@redhat.com>
6119
6120         * gnulib/aclocal.m4: Regenerate.
6121         * gnulib/config.in: Regenerate.
6122         * gnulib/configure: Regenerate.
6123         * gnulib/import/Makefile.am: Regenerate.
6124         * gnulib/import/Makefile.in: Regenerate.
6125         * gnulib/import/assure.h: New file.
6126         * gnulib/import/at-func.c: Likewise
6127         * gnulib/import/chdir-long.c: New file.
6128         * gnulib/import/chdir-long.h: New file.
6129         * gnulib/import/cloexec.c: New file.
6130         * gnulib/import/cloexec.h: New file.
6131         * gnulib/import/close.c: New file.
6132         * gnulib/import/closedir.c: New file.
6133         * gnulib/import/dirent-private.h: New file.
6134         * gnulib/import/dup-safer.c: New file.
6135         * gnulib/import/dup.c: New file.
6136         * gnulib/import/dup2.c: New file.
6137         * gnulib/import/error.c: New file.
6138         * gnulib/import/error.h: New file.
6139         * gnulib/import/exitfail.c: New file.
6140         * gnulib/import/exitfail.h: New file.
6141         * gnulib/import/fchdir.c: New file.
6142         * gnulib/import/fcntl.c: New file.
6143         * gnulib/import/fcntl.in.h: New file.
6144         * gnulib/import/fd-hook.c: New file.
6145         * gnulib/import/fd-hook.h: New file.
6146         * gnulib/import/fd-safer.c: New file.
6147         * gnulib/import/fdopendir.c: New file.
6148         * gnulib/import/filename.h: New file.
6149         * gnulib/import/filenamecat-lgpl.c: New file.
6150         * gnulib/import/filenamecat.h: New file.
6151         * gnulib/import/fstat.c: New file.
6152         * gnulib/import/fstatat.c: New file.
6153         * gnulib/import/getcwd-lgpl.c: New file.
6154         * gnulib/import/getcwd.c: New file.
6155         * gnulib/import/getdtablesize.c: New file.
6156         * gnulib/import/getlogin_r.c: New file.
6157         * gnulib/import/getprogname.c: New file.
6158         * gnulib/import/getprogname.h: New file.
6159         * gnulib/import/gettext.h: New file.
6160         * gnulib/import/glob-libc.h: New file.
6161         * gnulib/import/glob.c: New file.
6162         * gnulib/import/glob.in.h: New file.
6163         * gnulib/import/intprops.h: New file.
6164         * gnulib/import/m4/chdir-long.m4: New file.
6165         * gnulib/import/m4/close.m4: New file.
6166         * gnulib/import/m4/closedir.m4: New file.
6167         * gnulib/import/m4/d-ino.m4: New file.
6168         * gnulib/import/m4/d-type.m4: New file.
6169         * gnulib/import/m4/dup.m4: New file.
6170         * gnulib/import/m4/dup2.m4: New file.
6171         * gnulib/import/m4/error.m4: New file.
6172         * gnulib/import/m4/fchdir.m4: New file.
6173         * gnulib/import/m4/fcntl.m4: New file.
6174         * gnulib/import/m4/fcntl_h.m4: New file.
6175         * gnulib/import/m4/fdopendir.m4: New file.
6176         * gnulib/import/m4/filenamecat.m4: New file.
6177         * gnulib/import/m4/fstat.m4: New file.
6178         * gnulib/import/m4/fstatat.m4: New file.
6179         * gnulib/import/m4/getcwd-abort-bug.m4: New file.
6180         * gnulib/import/m4/getcwd-path-max.m4: New file.
6181         * gnulib/import/m4/getcwd.m4: New file.
6182         * gnulib/import/m4/getdtablesize.m4: New file.
6183         * gnulib/import/m4/getlogin_r.m4: New file.
6184         * gnulib/import/m4/getprogname.m4: New file.
6185         * gnulib/import/m4/glob.m4: New file.
6186         * gnulib/import/m4/gnulib-cache.m4: Regenerate.
6187         * gnulib/import/m4/gnulib-comp.m4: Regenerate.
6188         * gnulib/import/m4/mempcpy.m4: New file.
6189         * gnulib/import/m4/memrchr.m4: New file.
6190         * gnulib/import/m4/mode_t.m4: New file.
6191         * gnulib/import/m4/msvc-inval.m4: New file.
6192         * gnulib/import/m4/msvc-nothrow.m4: New file.
6193         * gnulib/import/m4/open.m4: New file.
6194         * gnulib/import/m4/openat.m4: New file.
6195         * gnulib/import/m4/opendir.m4: New file.
6196         * gnulib/import/m4/readdir.m4: New file.
6197         * gnulib/import/m4/realloc.m4: New file.
6198         * gnulib/import/m4/rewinddir.m4: New file.
6199         * gnulib/import/m4/save-cwd.m4: New file.
6200         * gnulib/import/m4/strdup.m4: New file.
6201         * gnulib/import/m4/strerror.m4: New file.
6202         * gnulib/import/m4/unistd-safer.m4: New file.
6203         * gnulib/import/mempcpy.c: New file.
6204         * gnulib/import/memrchr.c: New file.
6205         * gnulib/import/msvc-inval.c: New file.
6206         * gnulib/import/msvc-inval.h: New file.
6207         * gnulib/import/msvc-nothrow.c: New file.
6208         * gnulib/import/msvc-nothrow.h: New file.
6209         * gnulib/import/open.c: New file.
6210         * gnulib/import/openat-die.c: New file.
6211         * gnulib/import/openat-priv.h: New file.
6212         * gnulib/import/openat-proc.c: New file.
6213         * gnulib/import/openat.c: New file.
6214         * gnulib/import/openat.h: New file.
6215         * gnulib/import/opendir.c: New file.
6216         * gnulib/import/pipe-safer.c: New file.
6217         * gnulib/import/readdir.c: New file.
6218         * gnulib/import/realloc.c: New file.
6219         * gnulib/import/rewinddir.c: New file.
6220         * gnulib/import/save-cwd.c: New file.
6221         * gnulib/import/save-cwd.h: New file.
6222         * gnulib/import/strdup.c: New file.
6223         * gnulib/import/strerror-override.c: New file.
6224         * gnulib/import/strerror-override.h: New file.
6225         * gnulib/import/strerror.c: New file.
6226         * gnulib/import/unistd--.h: New file.
6227         * gnulib/import/unistd-safer.h: New file.
6228         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add
6229         "getcwd" and "glob".
6230         * ser-tcp.c: Undefine "close" before redefining it.
6231
6232 2017-09-21  Simon Marchi  <simon.marchi@ericsson.com>
6233
6234         * guile/scm-value.c (gdbscm_value_address): Initialize address,
6235         get rid of res_val.
6236
6237 2017-09-22  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
6238
6239         * configure.nat <i386sol2,i386>: Add fork-inferior.o to NATDEPFILES.
6240         <sol2,sparc>: Likewise.
6241         <sol2-64,i386>: Likewise.
6242
6243         * warning.m4 (AM_GDB_WARNINGS): Disable -Wunknown-pragmas,
6244         -Wdeprecated-declarations on *-*-solaris*.
6245         * configure: Regenerate.
6246
6247         * procfs.c: Include "nat/inferior.h".
6248         (procfs_info_proc): Fix typo.
6249
6250 2017-09-21  Kevin Buettner  <kevinb@redhat.com>
6251
6252         * remote.c (vector): Include.
6253         (struct private_thread_info): Add field, thread_handle.
6254         (free_private_thread_info): Deallocate storage associated with
6255         thread handle.
6256         (get_private_info_thread): Initialize `thread_handle' field.
6257         (struct thread_item): Add field, thread_handle.
6258         (clear_threads_listing_context): Deallocate storage associated
6259         with thread handle.
6260         (start_thread): Add support for "handle" attribute.
6261         (thread_attributes): Add "handle".
6262         (remote_get_threads_with_qthreadinfo): Initialize thread_handle
6263         field.
6264         (remote_update_thread_list): Update thread_handle.
6265         (remote_thread_handle_to_thread_info): New function.
6266         (init_remote_ops): Initialize to_thread_handle_to_thread_info.
6267
6268 2017-09-21  Kevin Buettner  <kevinb@redhat.com>
6269
6270         * python/py-inferior.c (gdbpy_thread_from_thread_handle): New
6271         function.
6272         (inferior_object_methods): Add gdbpy_thread_from_thread_handle.
6273         * python/python-internal.h (thread_object_type): Declare.
6274
6275 2017-09-21  Kevin Buettner  <kevinb@redhat.com>
6276
6277         * target.h (struct target_ops): Add to_thread_handle_to_thread_info.
6278         (target_thread_handle_to_thread_info): Declare.
6279         * target.c (target_thread_handle_to_thread_info): New function.
6280         * target-delegates.c: Regenerate.
6281         * gdbthread.h (find_thread_by_handle): Declare.
6282         * thread.c (find_thread_by_handle): New function.
6283         * linux-thread-db.c (thread_db_thread_handle_to_thread_info): New
6284         function.
6285         (init_thread_db_ops): Register thread_db_thread_handle_to_thread_info.
6286
6287 2017-09-21  Simon Marchi  <simon.marchi@ericsson.com>
6288
6289         * nat/linux-waitpid.c (linux_debug): Add ATTRIBUTE_PRINTF.
6290
6291 2017-09-21  Simon Marchi  <simon.marchi@ericsson.com>
6292
6293         * microblaze-tdep.c (microblaze_debug): Add ATTRIBUTE_PRINTF.
6294
6295 2017-09-21  Yao Qi  <yao.qi@linaro.org>
6296
6297         * configure.tgt (aarch64*-*-freebsd*): Add fbsd-tdep.o solib-svr4.o
6298         to gdb_target_obs.
6299
6300 2017-09-20  Tom Tromey  <tom@tromey.com>
6301
6302         * breakpoint.c (struct counted_command_line): Remove.
6303         (breakpoint_commands): Update.
6304         (alloc_counted_command_line, incref_counted_command_line)
6305         (decref_counted_command_line, do_cleanup_counted_command_line)
6306         (make_cleanup_decref_counted_command_line): Remove.
6307         (breakpoint_set_commands, commands_command_1, ~bpstats, bpstats)
6308         (bpstat_clear_actions, bpstat_do_actions_1, watchpoint_check)
6309         (bpstat_stop_status, print_one_breakpoint_location, ~breakpoint)
6310         (save_breakpoints): Update.
6311         * breakpoint.h (counted_command_line): Now a typedef to
6312         shared_ptr.
6313         (struct breakpoint) <commands>: Now a counted_command_line.
6314         (struct bpstats) <command>: Likewise.
6315
6316 2017-09-20  Tom Tromey  <tom@tromey.com>
6317
6318         * breakpoint.c (struct commands_info, do_map_commands_command):
6319         Remove.
6320         (commands_command_1): Update.
6321         (iterate_over_related_breakpoints): Take a function_view.
6322         (do_delete_breakpoint, do_map_delete_breakpoint): Remove.
6323         (delete_command): Update.
6324         (map_breakpoint_numbers): Take a function_view.
6325         (do_disable_breakpoint, do_map_delete_breakpoint): Remove.
6326         (disable_command): Update.
6327         (do_enable_breakpoint, do_map_enable_breakpoint): Remove.
6328         (enable_command): Update.
6329         (struct disp_data, do_enable_breakpoint_disp)
6330         (do_map_enable_once_breakpoint, do_map_enable_count_breakpoint)
6331         (do_map_enable_delete_breakpoint): Remove.
6332         (enable_once_command, enable_count_command, enable_delete_command)
6333         (delete_trace_variable_command): Update.
6334
6335 2017-09-20  Tom Tromey  <tom@tromey.com>
6336
6337         * breakpoint.c (~bpstats): Rename from bpstat_free.  Update.
6338         (bpstat_clear): Use delete.
6339         (bpstats): New constructors.
6340         (bpstat_copy, bpstat_stop_status): Use new.
6341         (dprintf_after_condition_true): Update.
6342         * breakpoint.h (bpstats::bpstats): Add constructors.
6343         (bpstats::~bpstats): Add destructor.
6344
6345 2017-09-20  Pedro Alves  <palves@redhat.com>
6346
6347         * eval.c (make_params): Delete, refactored as ...
6348         (class fake_method): ... this new type's ctor.
6349         (fake_method::~fake_method): New.
6350         (evaluate_subexp_standard): Use 'fake_method'.
6351
6352 2017-09-20  Tom Tromey  <tom@tromey.com>
6353
6354         * windows-nat.c (get_windows_debug_event, windows_wait)
6355         (do_initial_windows_stuff, windows_attach): Update.
6356         * utils.c (vwarning, internal_vproblem): Update.
6357         (ui_unregister_input_event_handler_cleanup)
6358         (prepare_to_handle_input): Remove.
6359         (class scoped_input_handler): New.
6360         (defaulted_query, prompt_for_continue): Update.
6361         * tui/tui-hooks.c (tui_refresh_frame_and_register_information):
6362         Update.
6363         * top.c (undo_terminal_modifications_before_exit): Update.
6364         * target/target.h (target_terminal_init, target_terminal_inferior)
6365         (target_terminal_ours): Don't declare.
6366         (class target_terminal): New.
6367         * target.h (target_terminal_is_inferior, target_terminal_is_ours)
6368         (target_terminal_ours_for_output)
6369         (make_cleanup_restore_target_terminal): Don't declare.
6370         (target_terminal_info): Remove.
6371         * target.c (enum terminal_state, terminal_state): Remove.
6372         (target_terminal::terminal_state): Define.
6373         (target_terminal::init): Rename from target_terminal_init.
6374         (target_terminal::inferior): Rename from
6375         target_terminal_inferior.
6376         (target_terminal::ours): Rename from target_terminal_ours.
6377         (target_terminal::ours_for_output): Rename from
6378         target_terminal_ours_for_output.
6379         (target_terminal::info): New method.
6380         (cleanup_restore_target_terminal)
6381         (make_cleanup_restore_target_terminal): Remove.
6382         * solib.c (handle_solib_event): Update.
6383         * remote.c (remote_serial_quit_handler): Update.
6384         (remote_terminal_inferior, remote_wait_as): Update.
6385         * record-full.c (record_full_wait_1): Update.
6386         * nto-procfs.c (procfs_create_inferior): Update.
6387         * nat/fork-inferior.c (startup_inferior): Update.
6388         * mi/mi-interp.c (mi_new_thread, mi_thread_exit)
6389         (mi_record_changed, mi_inferior_added, mi_inferior_appeared)
6390         (mi_inferior_exit, mi_inferior_removed, mi_traceframe_changed)
6391         (mi_tsv_created, mi_tsv_deleted, mi_tsv_modified)
6392         (mi_breakpoint_created, mi_breakpoint_deleted)
6393         (mi_breakpoint_modified, mi_on_resume, mi_solib_loaded)
6394         (mi_solib_unloaded, mi_command_param_changed, mi_memory_changed)
6395         (mi_user_selected_context_changed, report_initial_inferior):
6396         Update.
6397         * linux-nat.c (linux_nat_attach, linux_nat_terminal_ours)
6398         (linux_nat_terminal_inferior): Update.
6399         * infrun.c (follow_fork_inferior)
6400         (handle_vfork_child_exec_or_exit, do_target_resume)
6401         (check_curr_ui_sync_execution_done, handle_inferior_event_1)
6402         (handle_signal_stop, maybe_remove_breakpoints, normal_stop):
6403         Update.
6404         * inflow.c (child_terminal_init, info_terminal_command): Update.
6405         * infcmd.c (post_create_inferior, continue_1, prepare_one_step)
6406         (attach_command): Update.
6407         * infcall.c (call_thread_fsm_should_stop): Update.
6408         * gnu-nat.c (gnu_attach): Update.
6409         * extension.c (struct active_ext_lang_state)
6410         (restore_active_ext_lang): Update.
6411         * exceptions.c (print_flush): Update.
6412         * event-top.c (async_enable_stdin, default_quit_handler): Update.
6413         (struct quit_handler_cleanup_data, restore_quit_handler)
6414         (restore_quit_handler_dtor, make_cleanup_override_quit_handler):
6415         Remove.
6416         * cp-support.c (gdb_demangle): Update.
6417         * breakpoint.c (update_inserted_breakpoint_locations)
6418         (insert_breakpoint_locations, handle_jit_event)
6419         (disable_breakpoints_in_unloaded_shlib): Update.
6420         * annotate.c (annotate_breakpoints_invalid)
6421         (annotate_frames_invalid): Update.
6422
6423 2017-09-20  Tom Tromey  <tom@tromey.com>
6424
6425         * main.c (catch_command_errors): Rename from
6426         catch_command_errors_const.
6427         (captured_main_1): Update.
6428
6429 2017-09-20  Pedro Alves  <palves@redhat.com>
6430
6431         * cli/cli-cmds.c (list_command): Use print_sal_location.
6432         (print_sal_location): New function.
6433         (ambiguous_line_spec): Use print_sal_location.
6434         * linespec.c (symbol_to_sal): Record the symbol in the sal.
6435         * symtab.c (find_function_start_sal): Likewise.
6436         * symtab.h (symtab_and_line::symbol): New field.
6437
6438 2017-09-20  Pedro Alves  <palves@redhat.com>
6439
6440         * linespec.c (minsym_found): Handle non-text minsyms.
6441         (symbol_to_sal): Record a sal.pc for non-block, non-label symbols.
6442
6443 2017-09-20  Walfred Tedeschi  <walfred.tedeschi@intel.com>
6444
6445         * features/Makefile (i386-avx-mpx-avx512-pku.dat): Add missing
6446         backslash.
6447
6448 2017-09-20  Walfred Tedeschi  <walfred.tedeschi@intel.com>
6449
6450         * gdb.arch/i386-avx512.c (move_zmm_data_to_reg): Use
6451         vmovups instead vmovaps.
6452         (move_zmm_data_to_memory): Use vmovups instead vmovaps.
6453
6454 2017-09-19  John Baldwin  <jhb@FreeBSD.org>
6455
6456         * NEWS (Changes since GDB 8.0): Add starti.
6457         * infcmd.c (enum run_break): New.
6458         (run_command_1): Queue pending event for RUN_STOP_AT_FIRST_INSN
6459         case.
6460         (run_command): Use enum run_how.
6461         (start_command): Likewise.
6462         (starti_command): New function.
6463         (RUN_ARGS_HELP): New macro.
6464         (_initialize_infcmd): Use RUN_ARGS_HELP for run and start
6465         commands.  Add starti command.
6466
6467 2017-09-19  Yao Qi  <yao.qi@linaro.org>
6468
6469         * Makefile.in (monitor.o): Remove the rule.
6470
6471 2017-09-19  Yao Qi  <yao.qi@linaro.org>
6472
6473         * annotate.h (struct annotate_arg_emitter): Use
6474         DISABLE_COPY_AND_ASSIGN.
6475         * common/refcounted-object.h (refcounted_object): Likewise.
6476         * completer.h (struct completion_result): Likewise.
6477         * dwarf2read.c (struct dwarf2_per_objfile): Likewise.
6478         * filename-seen-cache.h (filename_seen_cache): Likewise.
6479         * gdbcore.h (thread_section_name): Likewise.
6480         * gdb_regex.h (compiled_regex): Likewise.
6481         * gdbthread.h (scoped_restore_current_thread): Likewise.
6482         * inferior.h (scoped_restore_current_inferior): Likewise.
6483         * jit.c (jit_reader): Likewise.
6484         * linespec.h (struct linespec_result): Likewise.
6485         * mi/mi-parse.h (struct mi_parse): Likewise.
6486         * nat/fork-inferior.c (execv_argv): Likewise.
6487         * progspace.h (scoped_restore_current_program_space): Likewise.
6488         * python/python-internal.h (class gdbpy_enter): Likewise.
6489         * regcache.h (regcache): Likewise.
6490         * target-descriptions.c (struct tdesc_reg): Likewise.
6491         (struct tdesc_type): Likewise.
6492         (struct tdesc_feature): Likewise.
6493         * ui-out.h (ui_out_emit_type): Likewise.
6494
6495 2017-09-18  Simon Marchi  <simon.marchi@ericsson.com>
6496
6497         * dwarf2expr.c (dwarf_expr_context::execute_stack_op): Remove
6498         label abort_expression.
6499
6500 2017-09-16  Simon Marchi  <simon.marchi@ericsson.com>
6501
6502         * common/buffer.c (buffer_xml_printf): Adjust.
6503         * common/xml-utils.c (xml_escape_text): Change return type to
6504         std::string, update code accordingly.
6505         * common/xml-utils.h (xml_escape_text): Change return type to
6506         std::string.
6507         * rs6000-aix-tdep.c (rs6000_aix_shared_library_to_xml): Adjust.
6508         * windows-tdep.c (windows_xfer_shared_library): Adjust.
6509         * unittests/xml-utils-selftests.c (test_xml_escape_text):
6510         Adjust.
6511
6512 2017-09-16  Simon Marchi  <simon.marchi@ericsson.com>
6513
6514         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add new source file.
6515         (SUBDIR_UNITTESTS_OBS): Add new object file.
6516         * unittests/xml-utils-selftests.c: New file.
6517
6518 2017-09-16  Simon Marchi  <simon.marchi@ericsson.com>
6519
6520         * common/selftest.h (selftest): New struct/interface.
6521         (register_test): Add name parameter, add new overload.
6522         (run_tests): Add filter parameter.
6523         (for_each_selftest_ftype): New typedef.
6524         (for_each_selftest): New declaration.
6525         * common/selftest.c (tests): Change type to
6526         map<string, unique_ptr<selftest>>.
6527         (simple_selftest): New struct.
6528         (register_test): New function.
6529         (register_test): Add name parameter and use it.
6530         (run_tests): Add filter parameter and use it.  Add prints.
6531         Adjust to vector -> map change.
6532         * aarch64-tdep.c (_initialize_aarch64_tdep): Add names when
6533         registering selftests.
6534         * arm-tdep.c (_initialize_arm_tdep): Likewise.
6535         * disasm-selftests.c (_initialize_disasm_selftests): Likewise.
6536         * dwarf2-frame.c (_initialize_dwarf2_frame): Likewise.
6537         * dwarf2loc.c (_initialize_dwarf2loc): Likewise.
6538         * findvar.c (_initialize_findvar): Likewise.
6539         * gdbarch-selftests.c (_initialize_gdbarch_selftests): Likewise.
6540         * maint.c (maintenance_selftest): Update call to run_tests.
6541         (maintenance_info_selftests): New function.
6542         (_initialize_maint_cmds): Register "maintenance info selftests"
6543         command.  Update "maintenance selftest" doc.
6544         * regcache.c (_initialize_regcache): Add names when registering
6545         selftests.
6546         * rust-exp.y (_initialize_rust_exp): Likewise.
6547         * selftest-arch.c (gdbarch_selftest): New struct.
6548         (gdbarch_tests): Remove.
6549         (register_test_foreach_arch): Add name parameter.  Call
6550         register_test.
6551         (tests_with_arch): Remove, move most content to
6552         gdbarch_selftest::operator().
6553         (_initialize_selftests_foreach_arch): Remove.
6554         * selftest-arch.h (register_test_foreach_arch): Add name
6555         parameter.
6556         (run_tests_with_arch): New declaration.
6557         * utils-selftests.c (_initialize_utils_selftests): Add names
6558         when registering selftests.
6559         * utils.c (_initialize_utils): Likewise.
6560         * unittests/array-view-selftests.c
6561         (_initialize_array_view_selftests): Likewise.
6562         * unittests/environ-selftests.c (_initialize_environ_selftests):
6563         Likewise.
6564         * unittests/function-view-selftests.c
6565         (_initialize_function_view_selftests): Likewise.
6566         * unittests/offset-type-selftests.c
6567         (_initialize_offset_type_selftests): Likewise.
6568         * unittests/optional-selftests.c
6569         (_initialize_optional_selftests): Likewise.
6570         * unittests/scoped_restore-selftests.c
6571         (_initialize_scoped_restore_selftests): Likewise.
6572         * NEWS: Document "maintenance selftest" and "maint info
6573         selftests".
6574
6575 2017-09-16  Simon Marchi  <simon.marchi@ericsson.com>
6576
6577         * mi/mi-main.c (mi_load_progress): Restore current_uiout using a
6578         scoped_restore.
6579
6580 2017-09-16  Simon Marchi  <simon.marchi@ericsson.com>
6581
6582         * mi/mi-main.c (mi_load_progress): Make uiout variable
6583         a unique_ptr.
6584
6585 2017-09-15  Pedro Alves  <palves@redhat.com>
6586
6587         * compile/compile-c-types.c (convert_enum, convert_int)
6588         (convert_float): Adjust to refer to int_type_v0 and float_type_v0.
6589
6590 2017-09-15  Simon Marchi  <simon.marchi@ericsson.com>
6591
6592         * dwarf2read.c (copy_string): Remove.
6593         (parse_macro_definition): Replace copy_string with savestring.
6594
6595 2017-09-15  Yao Qi  <yao.qi@linaro.org>
6596
6597         * configure.tgt (i[34567]86-*-darwin*): Append amd64.o to
6598         gdb_target_obs.
6599         (i[34567]86-*-solaris2.1[0-9]* | x86_64-*-solaris2.1[0-9]*):
6600         Likewise.
6601         (i[34567]86-*-linux*): Likewise.
6602
6603 2017-09-14  Simon Marchi  <simon.marchi@ericsson.com>
6604
6605         * dwarf2expr.h (dwarf_stack_value): Add constructor.
6606         (dwarf_expr_context) <~dwarf_expr_context>: Define as default.
6607         <stack>: Change type to std::vector.
6608         <stack_len, stack_allocated>: Remove.
6609         <grow_stack>: Remove.
6610         * dwarf2expr.c (dwarf_expr_context::dwarf_expr_context): Adjust.
6611         (dwarf_expr_context::~dwarf_expr_context): Remove.
6612         (dwarf_expr_context::grow_stack): Remove.
6613         (dwarf_expr_context::push): Adjust.
6614         (dwarf_expr_context::pop): Adjust.
6615         (dwarf_expr_context::fetch): Adjust.
6616         (dwarf_expr_context::fetch_in_stack_memory): Adjust.
6617         (dwarf_expr_context::stack_empty_p): Adjust.
6618         (dwarf_expr_context::execute_stack_op): Adjust.
6619
6620 2017-09-14  Simon Marchi  <simon.marchi@ericsson.com>
6621
6622         * dwarf2expr.h (dwarf_expr_context) <stack_empty_p>: Change
6623         return type to bool.
6624         * dwarf2expr.c (dwarf_expr_context::stack_empty_p): Likewise.
6625
6626 2017-09-14  Simon Marchi  <simon.marchi@ericsson.com>
6627
6628         * dwarf2expr.h (dwarf_expr_piece) <v.mem.in_stack_memory>:
6629         Change type to bool.
6630         (dwarf_stack_value) <in_stack_memory>: Likewise.
6631         (dwarf_expr_context) <push_address>: Change parameter type to
6632         bool.
6633         <fetch_in_stack_memory>: Change return type to bool.
6634         <push>: Change parameter type to bool.
6635         * dwarf2expr.c (dwarf_expr_context::push): Change parameter type
6636         to bool.
6637         (dwarf_expr_context::push_address): Likewise.
6638         (dwarf_expr_context::fetch_in_stack_memory): Change return type
6639         to bool.
6640         (dwarf_expr_context::execute_stack_op): Adjust.
6641         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Adjust.
6642
6643 2017-09-14  Simon Marchi  <simon.marchi@ericsson.com>
6644
6645         * dwarf2expr.h (struct dwarf_expr_piece): Move up.
6646         (struct dwarf_expr_context) <n_pieces>: Remove.
6647         <pieces>: Change type to std::vector.
6648         * dwarf2expr.c (dwarf_expr_context::dwarf_expr_context): Adjust.
6649         (dwarf_expr_context::~dwarf_expr_context): Don't manually free
6650         pieces.
6651         (dwarf_expr_context::add_piece): Adjust.
6652         * dwarf2loc.c (struct piece_closure): Initialize fields.
6653         <n_pieces>: Remove.
6654         <pieces>: Change type to std::vector.
6655         (allocate_piece_closure): Adjust, change parameter to
6656         std::vector rvalue and std::move it to piece_closure.
6657         (rw_pieced_value): Adjust.
6658         (check_pieced_synthetic_pointer): Adjust.
6659         (indirect_synthetic_pointer): Adjust.
6660         (coerce_pieced_ref): Adjust.
6661         (free_pieced_value_closure):  Adjust.  Use delete to free
6662         piece_closure.
6663         (dwarf2_evaluate_loc_desc_full): Adjust.  std::move ctx.pieces
6664         to allocate_piece_closure.
6665         (dwarf2_loc_desc_get_symbol_read_needs): Adjust.
6666
6667 2017-09-12  Simon Marchi  <simon.marchi@ericsson.com>
6668
6669         * probe.h (probe_ops_cp): Remove typedef.
6670         (DEF_VEC_P (probe_ops_cp)): Remove.
6671         (all_probe_ops): Change type to std::vector.
6672         * probe.c (info_probes_for_ops): Adjust to vector change.
6673         (probe_linespec_to_ops): Likewise.
6674         (all_probe_ops): Change type to std::vector.
6675         (_initialize_probe): Adjust to vector change.
6676         * dtrace-probe.c (_initialize_dtrace_probe): Likewise.
6677         * elfread.c (elf_get_probes): Likewise.
6678         * stap-probe.c (_initialize_stap_probe): Likewise.
6679
6680 2017-09-12  Simon Marchi  <simon.marchi@ericsson.com>
6681
6682         * probe.h (struct bound_probe): Define constructors.
6683         * probe.c (bound_probe_s): Remove typedef.
6684         (DEF_VEC_O (bound_probe_s)): Remove VEC.
6685         (collect_probes): Change return type to std::vector, remove
6686         cleanup.
6687         (compare_probes): Return bool, change parameter type.  Change
6688         semantic to "less than".
6689         (gen_ui_out_table_header_info): Change parameter to std::vector
6690         and update.
6691         (exists_probe_with_pops): Likewise.
6692         (info_probes_for_ops): Update to std::vector change.
6693         (enable_probes_command): Likewise.
6694         (disable_probes_command): Likewise.
6695
6696 2017-09-12  Simon Marchi  <simon.marchi@ericsson.com>
6697
6698         * probe.h (struct probe_ops) <get_probes>: Change parameter from
6699         vec to std::vector.
6700         * probe.c (parse_probes_in_pspace): Update.
6701         (find_probes_in_objfile): Update.
6702         (find_probe_by_pc): Update.
6703         (collect_probes): Update.
6704         (probe_any_get_probes): Update.
6705         * symfile.h (struct sym_probe_fns) <sym_get_probes> Change
6706         return type to reference to std::vector.
6707         * dtrace-probe.c (dtrace_process_dof_probe): Change parameter to
6708         std::vector and update.
6709         (dtrace_process_dof): Likewise.
6710         (dtrace_get_probes): Likewise.
6711         * elfread.c (elf_get_probes): Change return type to std::vector,
6712         store an std::vector in bfd_data.
6713         (probe_key_free): Update to std::vector.
6714         * stap-probe.c (handle_stap_probe): Change parameter to
6715         std::vector and update.
6716         (stap_get_probes): Likewise.
6717         * symfile-debug.c (debug_sym_get_probes): Change return type to
6718         std::vector and update.
6719
6720 2017-09-11  Tom Tromey  <tom@tromey.com>
6721
6722         * breakpoint.c (program_breakpoint_here_p): Update.
6723         * target.c (make_scoped_restore_show_memory_breakpoints): Rename
6724         from make_show_memory_breakpoints_cleanup.  Return a
6725         scoped_restore_tmpl<int>.
6726         (restore_show_memory_breakpoints): Remove.
6727         * ppc-linux-tdep.c (ppc_linux_memory_remove_breakpoint): Update.
6728         * mem-break.c (memory_validate_breakpoint): Update.
6729         * ia64-tdep.c (ia64_memory_insert_breakpoint): Update.
6730         (ia64_memory_remove_breakpoint): Update.
6731         (ia64_breakpoint_from_pc): Update.
6732         * target.h (make_scoped_restore_show_memory_breakpoints): Rename
6733         from make_show_memory_breakpoints_cleanup.
6734
6735 2017-09-11  Tom Tromey  <tom@tromey.com>
6736
6737         * d-namespace.c (d_lookup_symbol): Use std::string.
6738         (find_symbol_in_baseclass): Likewise.
6739
6740 2017-09-11  Tom Tromey  <tom@tromey.com>
6741
6742         * ctf.c (ctf_start): Use std::string.
6743
6744 2017-09-11  Tom Tromey  <tom@tromey.com>
6745
6746         * ada-lang.c (is_known_support_routine): Update.
6747         (ada_unhandled_exception_name_addr_from_raise): Update.
6748         * guile/scm-frame.c (gdbscm_frame_name): Update.
6749         * python/py-frame.c (frapy_name): Update.
6750         (frapy_function): Update.
6751         * stack.h (find_frame_funname): Update.
6752         * stack.c (find_frame_funname): Return unique_xmalloc_ptr.
6753         (print_frame): Update.
6754
6755 2017-09-11  Tom Tromey  <tom@tromey.com>
6756
6757         * findcmd.c (put_bits): Take a gdb::byte_vector.
6758         (parse_find_args): Return gdb::byte_vector.  "args" now const.
6759         Remove "pattern_bufp" and "pattern_lenp" parameters.  Remove
6760         cleanups.
6761         (find_command): Update.
6762
6763 2017-09-11  Tom Tromey  <tom@tromey.com>
6764
6765         * cli/cli-script.c (class scoped_restore_hook_in): New.
6766         (clear_hook_in_cleanup): Remove.
6767         (execute_cmd_pre_hook, execute_cmd_post_hook): Use
6768         scoped_restore_hook_in.
6769
6770 2017-09-11  Tom Tromey  <tom@tromey.com>
6771
6772         * cli/cli-script.c (restore_interp): Remove.
6773         (read_command_lines): Use scoped_restore_interp.
6774         * interps.c (scoped_restore_interp::set_temp): Rename from
6775         interp_set_temp.
6776         * interps.h (class scoped_restore_interp): New.
6777         (interp_set_temp): Remove.
6778
6779 2017-09-11  Tom Tromey  <tom@tromey.com>
6780
6781         * mi/mi-cmd-catch.c (mi_cmd_catch_assert)
6782         (mi_cmd_catch_exception, mi_catch_load_unload): Update.
6783         * mi/mi-cmd-break.c (setup_breakpoint_reporting): Return a
6784         scoped_restore.
6785         (mi_cmd_break_insert_1): Update.
6786         * mi/mi-cmd-break.h (setup_breakpoint_reporting): Return a
6787         scoped_restore.
6788
6789 2017-09-11  Tom Tromey  <tom@tromey.com>
6790
6791         * demangle.c (demangle_command): Update.
6792         * breakpoint.c (disable_command): Update.
6793         (enable_command): Update.
6794         (find_location_by_number): Make "number" const.  Use
6795         get_number_trailer.
6796         * cli/cli-utils.c (extract_arg): Return std::string.
6797         * probe.c (parse_probe_linespec): Update.  Change types.
6798         (collect_probes): Take string arguments.
6799         (parse_probe_linespec): Likewise.
6800         (info_probes_for_ops): Update.
6801         (enable_probes_command): Update.
6802         (disable_probes_command): Update.
6803         * break-catch-sig.c (catch_signal_split_args): Update.
6804         * mi/mi-parse.c (mi_parse): Update.
6805
6806 2017-09-11  Tom Tromey  <tom@tromey.com>
6807
6808         * language.h (language_enum): Make argument const.
6809         * language.c (language_enum): Make argument const.
6810
6811 2017-09-11  Tom Tromey  <tom@tromey.com>
6812
6813         * common/common-utils.h (skip_to_space): Remove macro, redeclare
6814         as function.
6815         (skip_to_space): Rename from skip_to_space_const.
6816         * common/common-utils.c (skip_to_space): New function.
6817         (skip_to_space): Rename from skip_to_space_const.
6818         * cli/cli-utils.h (get_number): Rename from get_number_const.
6819         (extract_arg): Rename from extract_arg_const.
6820         * cli/cli-utils.c (get_number): Rename from get_number_const.
6821         (extract_arg): Rename from extract_arg_const.
6822         (number_or_range_parser::get_number): Use ::get_number.
6823         * aarch64-linux-tdep.c, ada-lang.c, arm-linux-tdep.c, ax-gdb.c,
6824         break-catch-throw.c, breakpoint.c, cli/cli-cmds.c, cli/cli-dump.c,
6825         cli/cli-script.c, cli/cli-setshow.c, compile/compile.c,
6826         completer.c, demangle.c, disasm.c, findcmd.c, linespec.c,
6827         linux-tdep.c, linux-thread-db.c, location.c, mi/mi-parse.c,
6828         minsyms.c, nat/linux-procfs.c, printcmd.c, probe.c,
6829         python/py-breakpoint.c, record.c, rust-exp.y, serial.c, stack.c,
6830         stap-probe.c, tid-parse.c, tracepoint.c: Update all callers.
6831
6832 2017-09-11  Tom Tromey  <tom@tromey.com>
6833
6834         * python/python.c (do_start_initialization): Use
6835         py-event-types.def to initialize types.
6836         Define all object type structures.
6837         * python/python-internal.h: Don't declare event initialization
6838         functions.
6839         * python/py-threadevent.c (thread_event_object_type): Don't
6840         define.
6841         * python/py-stopevent.c (stop_event_object_type): Don't define.
6842         * python/py-signalevent.c (signal_event_object_type): Don't
6843         declare or define.
6844         * python/py-newobjfileevent.c (new_objfile_event_object_type)
6845         (clear_objfiles_event_object_type): Don't declare or define.
6846         * python/py-infevents.c (inferior_call_pre_event_object_type)
6847         (inferior_call_post_event_object_type)
6848         (register_changed_event_object_type)
6849         (memory_changed_event_object_type): Don't declare or define.
6850         * python/py-inferior.c (new_thread_event_object_type)
6851         (new_inferior_event_object_type)
6852         (inferior_deleted_event_object_type): Don't declare or define.
6853         * python/py-exitedevent.c (exited_event_object_type): Don't
6854         declare or define.
6855         * python/py-evts.c (gdbpy_initialize_py_events): Use
6856         py-all-events.def.
6857         * python/py-events.h (thread_event_object_type): Don't declare.
6858         (events_object): Use py-all-events.def.
6859         * python/py-event.h (GDBPY_NEW_EVENT_TYPE): Remove.  Use
6860         py-event-types.def.
6861         * python/py-event-types.def: New file.
6862         * python/py-continueevent.c (create_continue_event_object): Don't
6863         declare or define.
6864         * python/py-bpevent.c (breakpoint_event_object_type): Don't
6865         declare or define.
6866         * python/py-all-events.def: New file.
6867
6868 2017-09-11  Tom Tromey  <tom@tromey.com>
6869
6870         * python/py-threadevent.c (create_thread_event_object): Return
6871         gdbpy_ref.
6872         * python/py-stopevent.h (create_stop_event_object)
6873         (create_breakpoint_event_object, create_signal_event_object):
6874         Update.
6875         * python/py-stopevent.c (create_stop_event_object): Return
6876         gdbpy_ref.
6877         (emit_stop_event): Update.
6878         * python/py-signalevent.c (create_signal_event_object): Return
6879         gdbpy_ref.
6880         * python/py-infevents.c (create_inferior_call_event_object):
6881         Update.
6882         * python/py-event.h (create_event_object)
6883         (create_thread_event_object): Update.
6884         * python/py-event.c (create_event_object): Return gdbpy_ref.
6885         * python/py-continueevent.c: Return gdbpy_ref.
6886         * python/py-bpevent.c (create_breakpoint_event_object): Return
6887         gdbpy_ref.
6888
6889 2017-09-11  Tom Tromey  <tom@tromey.com>
6890
6891         PR python/15622:
6892         * NEWS: Add entry.
6893         * python/python.c (do_start_initialization): Initialize new event
6894         types.
6895         * python/python-internal.h (gdbpy_initialize_new_inferior_event)
6896         (gdbpy_initialize_inferior_deleted_event)
6897         (gdbpy_initialize_new_thread_event): Declare.
6898         * python/py-threadevent.c (create_thread_event_object): Add option
6899         "thread" parameter.
6900         * python/py-inferior.c (new_thread_event_object_type)
6901         (new_inferior_event_object_type)
6902         (inferior_deleted_event_object_type): Declare.
6903         (python_new_inferior, python_inferior_deleted): New functions.
6904         (add_thread_object): Emit new_thread event.
6905         (gdbpy_initialize_inferior): Attach new functions to corresponding
6906         observers.
6907         (new_thread, new_inferior, inferior_deleted): Define new event
6908         types.
6909         * python/py-evts.c (gdbpy_initialize_py_events): Add new
6910         registries.
6911         * python/py-events.h (events_object) <new_inferior,
6912         inferior_deleted, new_thread>: New fields.
6913         * python/py-event.h (create_thread_event_breakpoint): Add optional
6914         "thread" parameter.
6915
6916 2017-09-10  Andrew Burgess  <andrew.burgess@embecosm.com>
6917
6918         * utils.c (abort_with_message): Don't compare gdb_stderr to NULL,
6919         check current_ui instead.
6920         (internal_vproblem): Likewise.
6921
6922 2017-09-09  Simon Marchi  <simon.marchi@ericsson.com>
6923
6924         * thread.c (print_thread_info_1): Remove unnecessary calls to
6925         uiout->is_mi_like_p.
6926
6927 2017-09-09  Tom Tromey  <tom@tromey.com>
6928
6929         * namespace.h (add_using_directive): Update.
6930         * namespace.c (add_using_directive): Change type of excludes to
6931         std::vector.
6932         * dwarf2read.c (read_import_statement): Use std::vector.
6933         (read_namespace): Update.
6934         * cp-namespace.c (cp_scan_for_anonymous_namespaces): Update.
6935
6936 2017-09-09  Tom Tromey  <tom@tromey.com>
6937
6938         * linespec.c (create_sals_line_offset): Use gdb::def_vector.
6939
6940 2017-09-09  Tom Tromey  <tom@tromey.com>
6941
6942         * p-valprint.c (pascal_object_print_value): Use gdb::byte_vector.
6943
6944 2017-09-09  Tom Tromey  <tom@tromey.com>
6945
6946         * stack.c (func_command): Use gdb::def_vector.
6947
6948 2017-09-09  Tom Tromey  <tom@tromey.com>
6949
6950         * mi/mi-cmd-var.c (mi_cmd_var_list_children): Use gdb::optional,
6951         ui_out_emit_list, ui_out_emit_tuple.
6952         (mi_cmd_var_update): Likewise.
6953
6954 2017-09-09  Tom Tromey  <tom@tromey.com>
6955
6956         * mi/mi-interp.c (mi_user_selected_context_changed): Use
6957         ui_out_redirect_pop.
6958         * guile/scm-ports.c (ioscm_with_output_to_port_worker): Use
6959         ui_out_redirect_pop.
6960         * utils.c (do_ui_out_redirect_pop)
6961         (make_cleanup_ui_out_redirect_pop): Remove.
6962         * top.c (execute_command_to_string): Use ui_out_redirect_pop.
6963         * utils.h (make_cleanup_ui_out_redirect_pop): Remove.
6964         * ui-out.h (ui_out_redirect_pop): New class.
6965
6966 2017-09-09  Tom Tromey  <tom@tromey.com>
6967
6968         * mi/mi-main.c (output_cores): Use ui_out_emit_list.
6969         (list_available_thread_groups, mi_cmd_list_thread_groups)
6970         (mi_cmd_data_list_changed_registers, mi_cmd_data_read_memory)
6971         (mi_cmd_data_read_memory_bytes, mi_cmd_trace_frame_collected):
6972         Likewise.
6973
6974 2017-09-09  Tom Tromey  <tom@tromey.com>
6975
6976         * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn): Use
6977         ui_out_emit_tuple.
6978
6979 2017-09-09  Tom Tromey  <tom@tromey.com>
6980
6981         * target.c (flash_erase_command): Use ui_out_emit_tuple.
6982         * stack.c (print_frame): Use ui_out_emit_tuple.
6983         * spu-tdep.c (info_spu_event_command): Use ui_out_emit_tuple.
6984         (info_spu_mailbox_command, info_spu_dma_command)
6985         (info_spu_proxydma_command): Likewise.
6986         * mi/mi-main.c (mi_cmd_trace_frame_collected): Use
6987         ui_out_emit_tuple, gdb::byte_vector, bin2hex.
6988         * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries): Use
6989         ui_out_emit_tuple.
6990         * breakpoint.c (print_it_watchpoint): Use ui_out_emit_tuple.
6991
6992 2017-09-09  Tom Tromey  <tom@tromey.com>
6993
6994         * ui-out.h (make_cleanup_ui_out_table_begin_end): Remove.
6995         (class ui_out_emit_table): Update comment.
6996         * ui-out.c (do_cleanup_table_end)
6997         (make_cleanup_ui_out_table_begin_end): Remove.
6998         * spu-tdep.c (info_spu_mailbox_list): Use ui_out_emit_table.
6999         (info_spu_dma_cmdlist): Likewise.
7000         * probe.c (info_probes_for_ops): Use ui_out_emit_table.
7001         * darwin-nat-info.c (darwin_debug_regions_recurse): Use
7002         ui_out_emit_table.
7003
7004 2017-09-09  Tom Tromey  <tom@tromey.com>
7005
7006         * thread.c (print_thread_info_1): Use ui_out_emit_table,
7007         ui_out_emit_list, gdb::optional.
7008
7009 2017-09-09  John Baldwin  <jhb@FreeBSD.org>
7010
7011         * aarch64-linux-nat.c: Remove _initialize_aarch64_linux_nat
7012         prototype.
7013         * aarch64-linux-tdep.c: Remove _initialize_aarch64_linux_tdep
7014         prototype.
7015         * aarch64-newlib-tdep.c: Remove _initialize_aarch64_newlib_tdep
7016         prototype.
7017         * aarch64-tdep.c: Remove _initialize_aarch64_tdep prototype.
7018         * ada-exp.y: Remove _initialize_ada_exp prototype.
7019         * ada-lang.c: Remove _initialize_ada_language prototype.
7020         * ada-tasks.c: Remove _initialize_tasks prototype.
7021         * addrmap.c: Remove _initialize_addrmap prototype.
7022         * agent.c: Remove _initialize_agent prototype.
7023         * aix-thread.c: Remove _initialize_aix_thread prototype.
7024         * alpha-bsd-nat.c: Remove _initialize_alphabsd_nat prototype.
7025         * alpha-linux-nat.c: Remove _initialize_alpha_linux_nat prototype.
7026         * alpha-linux-tdep.c: Remove _initialize_alpha_linux_tdep
7027         prototype.
7028         * alpha-nbsd-tdep.c: Remove _initialize_alphanbsd_tdep prototype.
7029         * alpha-obsd-tdep.c: Remove _initialize_alphaobsd_tdep prototype.
7030         * alpha-tdep.c: Remove _initialize_alpha_tdep prototype.
7031         * amd64-darwin-tdep.c: Remove _initialize_amd64_darwin_tdep
7032         prototype.
7033         * amd64-dicos-tdep.c: Remove _initialize_amd64_dicos_tdep
7034         prototype.
7035         * amd64-fbsd-nat.c: Remove _initialize_amd64fbsd_nat prototype.
7036         * amd64-fbsd-tdep.c: Remove _initialize_amd64fbsd_tdep prototype.
7037         * amd64-linux-nat.c: Remove _initialize_amd64_linux_nat prototype.
7038         * amd64-linux-tdep.c: Remove _initialize_amd64_linux_tdep
7039         prototype.
7040         * amd64-nbsd-nat.c: Remove _initialize_amd64nbsd_nat prototype.
7041         * amd64-nbsd-tdep.c: Remove _initialize_amd64nbsd_tdep prototype.
7042         * amd64-obsd-nat.c: Remove _initialize_amd64obsd_nat prototype.
7043         * amd64-obsd-tdep.c: Remove _initialize_amd64obsd_tdep prototype.
7044         * amd64-sol2-tdep.c: Remove _initialize_amd64_sol2_tdep prototype.
7045         * amd64-tdep.c: Remove _initialize_amd64_tdep prototype.
7046         * amd64-windows-nat.c: Remove _initialize_amd64_windows_nat
7047         prototype.
7048         * amd64-windows-tdep.c: Remove _initialize_amd64_windows_tdep
7049         prototype.
7050         * annotate.c: Remove _initialize_annotate prototype.
7051         * arc-newlib-tdep.c: Remove _initialize_arc_newlib_tdep prototype.
7052         * arc-tdep.c: Remove _initialize_arc_tdep prototype.
7053         * arch-utils.c: Remove _initialize_gdbarch_utils prototype.
7054         * arm-linux-nat.c: Remove _initialize_arm_linux_nat prototype.
7055         * arm-linux-tdep.c: Remove _initialize_arm_linux_tdep prototype.
7056         * arm-nbsd-tdep.c: Remove _initialize_arm_netbsd_tdep prototype.
7057         * arm-obsd-tdep.c: Remove _initialize_armobsd_tdep prototype.
7058         * arm-symbian-tdep.c: Remove _initialize_arm_symbian_tdep
7059         prototype.
7060         * arm-tdep.c: Remove _initialize_arm_tdep prototype.
7061         * arm-wince-tdep.c: Remove _initialize_arm_wince_tdep prototype.
7062         * auto-load.c: Remove _initialize_auto_load prototype.
7063         * auxv.c: Remove _initialize_auxv prototype.
7064         * avr-tdep.c: Remove _initialize_avr_tdep prototype.
7065         * ax-gdb.c: Remove _initialize_ax_gdb prototype.
7066         * bfin-linux-tdep.c: Remove _initialize_bfin_linux_tdep prototype.
7067         * bfin-tdep.c: Remove _initialize_bfin_tdep prototype.
7068         * break-catch-sig.c: Remove _initialize_break_catch_sig prototype.
7069         * break-catch-syscall.c: Remove _initialize_break_catch_syscall
7070         prototype.
7071         * break-catch-throw.c: Remove _initialize_break_catch_throw
7072         prototype.
7073         * breakpoint.c: Remove _initialize_breakpoint prototype.
7074         * bsd-uthread.c: Remove _initialize_bsd_uthread prototype.
7075         * btrace.c: Remove _initialize_btrace prototype.
7076         * charset.c: Remove _initialize_charset prototype.
7077         * cli/cli-cmds.c: Remove _initialize_cli_cmds prototype.
7078         * cli/cli-dump.c: Remove _initialize_cli_dump prototype.
7079         * cli/cli-interp.c: Remove _initialize_cli_interp prototype.
7080         * cli/cli-logging.c: Remove _initialize_cli_logging prototype.
7081         * cli/cli-script.c: Remove _initialize_cli_script prototype.
7082         * coff-pe-read.c: Remove _initialize_coff_pe_read prototype.
7083         * coffread.c: Remove _initialize_coffread prototype.
7084         * compile/compile.c: Remove _initialize_compile prototype.
7085         * complaints.c: Remove _initialize_complaints prototype.
7086         * completer.c: Remove _initialize_completer prototype.
7087         * copying.awk: Remove _initialize_copying prototype.
7088         * copying.c: Regenerate.
7089         * core-regset.c: Remove _initialize_core_regset prototype.
7090         * corefile.c: Remove _initialize_core prototype.
7091         * corelow.c: Remove _initialize_corelow prototype.
7092         * cp-abi.c: Remove _initialize_cp_abi prototype.
7093         * cp-namespace.c: Remove _initialize_cp_namespace prototype.
7094         * cp-support.c: Remove _initialize_cp_support prototype.
7095         * cp-valprint.c: Remove _initialize_cp_valprint prototype.
7096         * cris-linux-tdep.c: Remove _initialize_cris_linux_tdep prototype.
7097         * cris-tdep.c: Remove _initialize_cris_tdep prototype.
7098         * ctf.c: Remove _initialize_ctf prototype.
7099         * d-lang.c: Remove _initialize_d_language prototype.
7100         * darwin-nat-info.c: Remove _initialize_darwin_info_commands
7101         prototype.
7102         * darwin-nat.c: Remove _initialize_darwin_inferior prototype.
7103         * dbxread.c: Remove _initialize_dbxread prototype.
7104         * dcache.c: Remove _initialize_dcache prototype.
7105         * demangle.c: Remove _initialize_demangler prototype.
7106         * disasm-selftests.c: Remove _initialize_disasm_selftests
7107         prototype.
7108         * disasm.c: Remove _initialize_disasm prototype.
7109         * dtrace-probe.c: Remove _initialize_dtrace_probe prototype.
7110         * dummy-frame.c: Remove _initialize_dummy_frame prototype.
7111         * dwarf2-frame-tailcall.c: Remove _initialize_tailcall_frame
7112         prototype.
7113         * dwarf2-frame.c: Remove _initialize_dwarf2_frame prototype.
7114         * dwarf2expr.c: Remove _initialize_dwarf2expr prototype.
7115         * dwarf2loc.c: Remove _initialize_dwarf2loc prototype.
7116         * dwarf2read.c: Remove _initialize_dwarf2_read prototype.
7117         * elfread.c: Remove _initialize_elfread prototype.
7118         * exec.c: Remove _initialize_exec prototype.
7119         * extension.c: Remove _initialize_extension prototype.
7120         * f-lang.c: Remove _initialize_f_language prototype.
7121         * f-valprint.c: Remove _initialize_f_valprint prototype.
7122         * fbsd-nat.c: Remove _initialize_fbsd_nat prototype.
7123         * fbsd-tdep.c: Remove _initialize_fbsd_tdep prototype.
7124         * filesystem.c: Remove _initialize_filesystem prototype.
7125         * findcmd.c: Remove _initialize_mem_search prototype.
7126         * fork-child.c: Remove _initialize_fork_child prototype.
7127         * frame-base.c: Remove _initialize_frame_base prototype.
7128         * frame-unwind.c: Remove _initialize_frame_unwind prototype.
7129         * frame.c: Remove _initialize_frame prototype.
7130         * frv-linux-tdep.c: Remove _initialize_frv_linux_tdep prototype.
7131         * frv-tdep.c: Remove _initialize_frv_tdep prototype.
7132         * ft32-tdep.c: Remove _initialize_ft32_tdep prototype.
7133         * gcore.c: Remove _initialize_gcore prototype.
7134         * gdb_bfd.c: Remove _initialize_gdb_bfd prototype.
7135         * gdbarch.c: Regenerate.
7136         * gdbarch.sh: Remove _initialize_gdbarch prototype.
7137         * gdbtypes.c: Remove _initialize_gdbtypes prototype.
7138         * gnu-nat.c: Remove _initialize_gnu_nat prototype.
7139         * gnu-v2-abi.c: Remove _initialize_gnu_v2_abi prototype.
7140         * gnu-v3-abi.c: Remove _initialize_gnu_v3_abi prototype.
7141         * go-lang.c: Remove _initialize_go_language prototype.
7142         * go32-nat.c: Remove _initialize_go32_nat prototype.
7143         * guile/guile.c: Remove _initialize_guile prototype.
7144         * h8300-tdep.c: Remove _initialize_h8300_tdep prototype.
7145         * hppa-linux-nat.c: Remove _initialize_hppa_linux_nat prototype.
7146         * hppa-linux-tdep.c: Remove _initialize_hppa_linux_tdep prototype.
7147         * hppa-nbsd-nat.c: Remove _initialize_hppanbsd_nat prototype.
7148         * hppa-nbsd-tdep.c: Remove _initialize_hppanbsd_tdep prototype.
7149         * hppa-obsd-nat.c: Remove _initialize_hppaobsd_nat prototype.
7150         * hppa-obsd-tdep.c: Remove _initialize_hppaobsd_tdep prototype.
7151         * hppa-tdep.c: Remove _initialize_hppa_tdep prototype.
7152         * i386-bsd-nat.c: Remove _initialize_i386bsd_nat prototype.
7153         * i386-cygwin-tdep.c: Remove _initialize_i386_cygwin_tdep
7154         prototype.
7155         * i386-darwin-tdep.c: Remove _initialize_i386_darwin_tdep
7156         prototype.
7157         * i386-dicos-tdep.c: Remove _initialize_i386_dicos_tdep prototype.
7158         * i386-fbsd-nat.c: Remove _initialize_i386fbsd_nat prototype.
7159         * i386-fbsd-tdep.c: Remove _initialize_i386fbsd_tdep prototype.
7160         * i386-gnu-nat.c: Remove _initialize_i386gnu_nat prototype.
7161         * i386-gnu-tdep.c: Remove _initialize_i386gnu_tdep prototype.
7162         * i386-linux-nat.c: Remove _initialize_i386_linux_nat prototype.
7163         * i386-linux-tdep.c: Remove _initialize_i386_linux_tdep prototype.
7164         * i386-nbsd-nat.c: Remove _initialize_i386nbsd_nat prototype.
7165         * i386-nbsd-tdep.c: Remove _initialize_i386nbsd_tdep prototype.
7166         * i386-nto-tdep.c: Remove _initialize_i386nto_tdep prototype.
7167         * i386-obsd-nat.c: Remove _initialize_i386obsd_nat prototype.
7168         * i386-obsd-tdep.c: Remove _initialize_i386obsd_tdep prototype.
7169         * i386-sol2-nat.c: Remove _initialize_amd64_sol2_nat prototype.
7170         * i386-sol2-tdep.c: Remove _initialize_amd64_sol2_tdep prototype.
7171         * i386-tdep.c: Remove _initialize_i386_tdep prototype.
7172         * i386-windows-nat.c: Remove _initialize_i386_windows_nat
7173         prototype.
7174         * ia64-libunwind-tdep.c: Remove _initialize_libunwind_frame
7175         prototype.
7176         * ia64-linux-nat.c: Remove _initialize_ia64_linux_nat prototype.
7177         * ia64-linux-tdep.c: Remove _initialize_ia64_linux_tdep prototype.
7178         * ia64-tdep.c: Remove _initialize_ia64_tdep prototype.
7179         * ia64-vms-tdep.c: Remove _initialize_ia64_vms_tdep prototype.
7180         * infcall.c: Remove _initialize_infcall prototype.
7181         * infcmd.c: Remove _initialize_infcmd prototype.
7182         * inferior.c: Remove _initialize_inferiors prototype.
7183         * inflow.c: Remove _initialize_inflow prototype.
7184         * infrun.c: Remove _initialize_infrun prototype.
7185         * interps.c: Remove _initialize_interpreter prototype.
7186         * iq2000-tdep.c: Remove _initialize_iq2000_tdep prototype.
7187         * jit.c: Remove _initialize_jit prototype.
7188         * language.c: Remove _initialize_language prototype.
7189         * linux-fork.c: Remove _initialize_linux_fork prototype.
7190         * linux-nat.c: Remove _initialize_linux_nat prototype.
7191         * linux-tdep.c: Remove _initialize_linux_tdep prototype.
7192         * linux-thread-db.c: Remove _initialize_thread_db prototype.
7193         * lm32-tdep.c: Remove _initialize_lm32_tdep prototype.
7194         * m2-lang.c: Remove _initialize_m2_language prototype.
7195         * m32c-tdep.c: Remove _initialize_m32c_tdep prototype.
7196         * m32r-linux-nat.c: Remove _initialize_m32r_linux_nat prototype.
7197         * m32r-linux-tdep.c: Remove _initialize_m32r_linux_tdep prototype.
7198         * m32r-tdep.c: Remove _initialize_m32r_tdep prototype.
7199         * m68hc11-tdep.c: Remove _initialize_m68hc11_tdep prototype.
7200         * m68k-bsd-nat.c: Remove _initialize_m68kbsd_nat prototype.
7201         * m68k-bsd-tdep.c: Remove _initialize_m68kbsd_tdep prototype.
7202         * m68k-linux-nat.c: Remove _initialize_m68k_linux_tdep prototype.
7203         * m68k-linux-tdep.c: Remove _initialize_m68k_linux_tdep prototype.
7204         * m68k-tdep.c: Remove _initialize_m68k_tdep prototype.
7205         * m88k-bsd-nat.c: Remove _initialize_m68kbsd_nat prototype.
7206         * m88k-tdep.c: Remove _initialize_m68kbsd_tdep prototype.
7207         * machoread.c: Remove _initialize_machoread prototype.
7208         * macrocmd.c: Remove _initialize_macrocmd prototype.
7209         * macroscope.c: Remove _initialize_macroscope prototype.
7210         * maint.c: Remove _initialize_maint_cmds prototype.
7211         * mdebugread.c: Remove _initialize_mdebugread prototype.
7212         * memattr.c: Remove _initialize_mem prototype.
7213         * mep-tdep.c: Remove _initialize_mep_tdep prototype.
7214         * mi/mi-cmd-env.c: Remove _initialize_mi_cmd_env prototype.
7215         * mi/mi-cmds.c: Remove _initialize_mi_cmds prototype.
7216         * mi/mi-interp.c: Remove _initialize_mi_interp prototype.
7217         * mi/mi-main.c: Remove _initialize_mi_main prototype.
7218         * microblaze-linux-tdep.c: Remove
7219         _initialize_microblaze_linux_tdep prototype.
7220         * microblaze-tdep.c: Remove _initialize_microblaze_tdep prototype.
7221         * mips-fbsd-nat.c: Remove _initialize_mips_fbsd_nat prototype.
7222         * mips-fbsd-tdep.c: Remove _initialize_mips_fbsd_tdep prototype.
7223         * mips-linux-nat.c: Remove _initialize_mips_linux_nat prototype.
7224         * mips-linux-tdep.c: Remove _initialize_mips_linux_tdep prototype.
7225         * mips-nbsd-nat.c: Remove _initialize_mipsnbsd_nat prototype.
7226         * mips-nbsd-tdep.c: Remove _initialize_mipsnbsd_tdep prototype.
7227         * mips-sde-tdep.c: Remove _initialize_mips_sde_tdep prototype.
7228         * mips-tdep.c: Remove _initialize_mips_tdep prototype.
7229         * mips64-obsd-nat.c: Remove _initialize_mips64obsd_nat prototype.
7230         * mips64-obsd-tdep.c: Remove _initialize_mips64obsd_tdep
7231         prototype.
7232         * mipsread.c: Remove _initialize_mipsread prototype.
7233         * mn10300-linux-tdep.c: Remove _initialize_mn10300_linux_tdep
7234         prototype.
7235         * mn10300-tdep.c: Remove _initialize_mn10300_tdep prototype.
7236         * moxie-tdep.c: Remove _initialize_moxie_tdep prototype.
7237         * msp430-tdep.c: Remove _initialize_msp430_tdep prototype.
7238         * mt-tdep.c: Remove _initialize_mt_tdep prototype.
7239         * nds32-tdep.c: Remove _initialize_nds32_tdep prototype.
7240         * nios2-linux-tdep.c: Remove _initialize_nios2_linux_tdep
7241         prototype.
7242         * nios2-tdep.c: Remove _initialize_nios2_tdep prototype.
7243         * nto-procfs.c: Remove _initialize_procfs prototype.
7244         * nto-tdep.c: Remove _initialize_nto_tdep prototype.
7245         * objc-lang.c: Remove _initialize_objc_language prototype.
7246         * objfiles.c: Remove _initialize_objfiles prototype.
7247         * observer.c: Remove observer_test_first_notification_function,
7248         observer_test_second_notification_function,
7249         observer_test_third_notification_function, and
7250         _initialize_observer prototypes.
7251         * opencl-lang.c: Remove _initialize_opencl_language prototypes.
7252         * osabi.c: Remove _initialize_gdb_osabi prototype.
7253         * osdata.c: Remove _initialize_osdata prototype.
7254         * p-valprint.c: Remove _initialize_pascal_valprint prototype.
7255         * parse.c: Remove _initialize_parse prototype.
7256         * ppc-fbsd-nat.c: Remove _initialize_ppcfbsd_nat prototype.
7257         * ppc-fbsd-tdep.c: Remove _initialize_ppcfbsd_tdep prototype.
7258         * ppc-linux-nat.c: Remove _initialize_ppc_linux_nat prototype.
7259         * ppc-linux-tdep.c: Remove _initialize_ppc_linux_tdep prototype.
7260         * ppc-nbsd-nat.c: Remove _initialize_ppcnbsd_nat prototype.
7261         * ppc-nbsd-tdep.c: Remove _initialize_ppcnbsd_tdep prototype.
7262         * ppc-obsd-nat.c: Remove _initialize_ppcobsd_nat prototype.
7263         * ppc-obsd-tdep.c: Remove _initialize_ppcobsd_tdep prototype.
7264         * printcmd.c: Remove _initialize_printcmd prototype.
7265         * probe.c: Remove _initialize_probe prototype.
7266         * proc-api.c: Remove _initialize_proc_api prototype.
7267         * proc-events.c: Remove _initialize_proc_events prototype.
7268         * proc-service.c: Remove _initialize_proc_service prototype.
7269         * procfs.c: Remove _initialize_procfs prototype.
7270         * psymtab.c: Remove _initialize_psymtab prototype.
7271         * python/python.c: Remove _initialize_python prototype.
7272         * ravenscar-thread.c: Remove _initialize_ravenscar prototype.
7273         * record-btrace.c: Remove _initialize_record_btrace prototype.
7274         * record-full.c: Remove _initialize_record_full prototype.
7275         * record.c: Remove _initialize_record prototype.
7276         * regcache.c: Remove _initialize_regcache prototype.
7277         * reggroups.c: Remove _initialize_reggroup prototype.
7278         * remote-notif.c: Remove _initialize_notif prototype.
7279         * remote-sim.c: Remove _initialize_remote_sim prototype.
7280         * remote.c: Remove _initialize_remote prototype.
7281         * reverse.c: Remove _initialize_reverse prototype.
7282         * rl78-tdep.c: Remove _initialize_rl78_tdep prototype.
7283         * rs6000-aix-tdep.c: Remove _initialize_rs6000_aix_tdep prototype.
7284         * rs6000-lynx178-tdep.c: Remove _initialize_rs6000_lynx178_tdep
7285         prototype.
7286         * rs6000-nat.c: Remove _initialize_rs6000_nat prototype.
7287         * rs6000-tdep.c: Remove _initialize_rs6000_tdep prototype.
7288         * rust-exp.y: Remove _initialize_rust_exp prototype.
7289         * rx-tdep.c: Remove _initialize_rx_tdep prototype.
7290         * s390-linux-nat.c: Remove _initialize_s390_nat prototype.
7291         * s390-linux-tdep.c: Remove _initialize_s390_tdep prototype.
7292         * score-tdep.c: Remove _initialize_score_tdep prototype.
7293         * selftest-arch.c: Remove _initialize_selftests_foreach_arch
7294         prototype.
7295         * ser-go32.c: Remove _initialize_ser_dos prototype.
7296         * ser-mingw.c: Remove _initialize_ser_windows prototype.
7297         * ser-pipe.c: Remove _initialize_ser_pipe prototype.
7298         * ser-tcp.c: Remove _initialize_ser_tcp prototype.
7299         * ser-unix.c: Remove _initialize_ser_hardwire prototype.
7300         * serial.c: Remove _initialize_serial prototype.
7301         * sh-linux-tdep.c: Remove _initialize_sh_linux_tdep prototype.
7302         * sh-nbsd-nat.c: Remove _initialize_shnbsd_nat prototype.
7303         * sh-nbsd-tdep.c: Remove _initialize_shnbsd_tdep prototype.
7304         * sh-tdep.c: Remove _initialize_sh_tdep prototype.
7305         * skip.c: Remove _initialize_step_skip prototype.
7306         * sol-thread.c: Remove _initialize_sol_thread prototype.
7307         * solib-aix.c: Remove _initialize_solib_aix prototype.
7308         * solib-darwin.c: Remove _initialize_darwin_solib prototype.
7309         * solib-dsbt.c: Remove _initialize_dsbt_solib prototype.
7310         * solib-frv.c: Remove _initialize_frv_solib prototype.
7311         * solib-spu.c: Remove _initialize_spu_solib prototype.
7312         * solib-svr4.c: Remove _initialize_svr4_solib prototype.
7313         * solib-target.c: Remove _initialize_solib_target prototype.
7314         * solib.c: Remove _initialize_solib prototype.
7315         * source.c: Remove _initialize_source prototype.
7316         * sparc-linux-nat.c: Remove _initialize_sparc_linux_nat prototype.
7317         * sparc-linux-tdep.c: Remove _initialize_sparc_linux_tdep
7318         prototype.
7319         * sparc-nat.c: Remove _initialize_sparc_nat prototype.
7320         * sparc-nbsd-nat.c: Remove _initialize_sparcnbsd_nat prototype.
7321         * sparc-nbsd-tdep.c: Remove _initialize_sparcnbsd_tdep prototype.
7322         * sparc-obsd-tdep.c: Remove _initialize_sparc32obsd_tdep
7323         prototype.
7324         * sparc-sol2-nat.c: Remove _initialize_sparc_sol2_nat prototype.
7325         * sparc-sol2-tdep.c: Remove _initialize_sparc_sol2_tdep prototype.
7326         * sparc-tdep.c: Remove _initialize_sparc_tdep prototype.
7327         * sparc64-fbsd-nat.c: Remove _initialize_sparc64fbsd_nat
7328         prototype.
7329         * sparc64-fbsd-tdep.c: Remove _initialize_sparc64fbsd_tdep
7330         prototype.
7331         * sparc64-linux-nat.c: Remove _initialize_sparc64_linux_nat
7332         prototype.
7333         * sparc64-linux-tdep.c: Remove _initialize_sparc64_linux_tdep
7334         prototype.
7335         * sparc64-nat.c: Remove _initialize_sparc64_nat prototype.
7336         * sparc64-nbsd-nat.c: Remove _initialize_sparc64nbsd_nat
7337         prototype.
7338         * sparc64-nbsd-tdep.c: Remove _initialize_sparc64nbsd_tdep
7339         prototype.
7340         * sparc64-obsd-nat.c: Remove _initialize_sparc64obsd_nat
7341         prototype.
7342         * sparc64-obsd-tdep.c: Remove _initialize_sparc64obsd_tdep
7343         prototype.
7344         * sparc64-sol2-tdep.c: Remove _initialize_sparc64_sol2_tdep
7345         prototype.
7346         * spu-linux-nat.c: Remove _initialize_spu_nat prototype.
7347         * spu-multiarch.c: Remove _initialize_spu_multiarch prototype.
7348         * spu-tdep.c: Remove _initialize_spu_tdep prototype.
7349         * stabsread.c: Remove _initialize_stabsread prototype.
7350         * stack.c: Remove _initialize_stack prototype.
7351         * stap-probe.c: Remove _initialize_stap_probe prototype.
7352         * std-regs.c: Remove _initialize_frame_reg prototype.
7353         * symfile-debug.c: Remove _initialize_symfile_debug prototype.
7354         * symfile-mem.c: Remove _initialize_symfile_mem prototype.
7355         * symfile.c: Remove _initialize_symfile prototype.
7356         * symmisc.c: Remove _initialize_symmisc prototype.
7357         * symtab.c: Remove _initialize_symtab prototype.
7358         * target-dcache.c: Remove _initialize_target_dcache prototype.
7359         * target-descriptions.c: Remove _initialize_target_descriptions
7360         prototype.
7361         * thread.c: Remove _initialize_thread prototype.
7362         * tic6x-linux-tdep.c: Remove _initialize_tic6x_linux_tdep
7363         prototype.
7364         * tic6x-tdep.c: Remove _initialize_tic6x_tdep prototype.
7365         * tilegx-linux-nat.c: Remove _initialize_tile_linux_nat prototype.
7366         * tilegx-linux-tdep.c: Remove _initialize_tilegx_linux_tdep
7367         prototype.
7368         * tilegx-tdep.c: Remove _initialize_tilegx_tdep prototype.
7369         * tracefile-tfile.c: Remove _initialize_tracefile_tfile prototype.
7370         * tracefile.c: Remove _initialize_tracefile prototype.
7371         * tracepoint.c: Remove _initialize_tracepoint prototype.
7372         * tui/tui-hooks.c: Remove _initialize_tui_hooks prototype.
7373         * tui/tui-interp.c: Remove _initialize_tui_interp prototype.
7374         * tui/tui-layout.c: Remove _initialize_tui_layout prototype.
7375         * tui/tui-regs.c: Remove _initialize_tui_regs prototype.
7376         * tui/tui-stack.c: Remove _initialize_tui_stack prototype.
7377         * tui/tui-win.c: Remove _initialize_tui_win prototype.
7378         * tui/tui.c: Remove _initialize_tui prototype.
7379         * typeprint.c: Remove _initialize_typeprint prototype.
7380         * user-regs.c: Remove _initialize_user_regs prototype.
7381         * utils.c: Remove _initialize_utils prototype.
7382         * v850-tdep.c: Remove _initialize_v850_tdep prototype.
7383         * valarith.c: Remove _initialize_valarith prototype.
7384         * valops.c: Remove _initialize_valops prototype.
7385         * valprint.c: Remove _initialize_valprint prototype.
7386         * value.c: Remove _initialize_values prototype.
7387         * varobj.c: Remove _initialize_varobj prototype.
7388         * vax-bsd-nat.c: Remove _initialize_vaxbsd_nat prototype.
7389         * vax-nbsd-tdep.c: Remove _initialize_vaxnbsd_tdep prototype.
7390         * vax-tdep.c: Remove _initialize_vax_tdep prototype.
7391         * windows-nat.c: Remove _initialize_windows_nat,
7392         _initialize_check_for_gdb_ini, and _initialize_loadable
7393         prototypes.
7394         * windows-tdep.c: Remove _initialize_windows_tdep prototype.
7395         * xcoffread.c: Remove _initialize_xcoffread prototype.
7396         * xml-support.c: Remove _initialize_xml_support prototype.
7397         * xstormy16-tdep.c: Remove _initialize_xstormy16_tdep prototype.
7398         * xtensa-linux-nat.c: Remove _initialize_xtensa_linux_nat
7399         prototype.
7400         * xtensa-linux-tdep.c: Remove _initialize_xtensa_linux_tdep
7401         prototype.
7402         * xtensa-tdep.c: Remove _initialize_xtensa_tdep prototype.
7403
7404 2017-09-08  Keith Seitz  <keiths@redhat.com>
7405
7406         * dwarf2read.c (struct field_info) <fnfields>: Remove unused
7407         field.
7408
7409 2017-09-08  Christoph Weinmann  <christoph.t.weinmann@intel.com>
7410
7411         * f-valprint.c (f_val_print): Remove check for one byte
7412         sized integers. Remove printing of character type.
7413
7414 2017-09-08  Frank Penczek  <frank.penczek@intel.com>
7415             Christoph Weinmann  <christoph.t.weinmann@intel.com>
7416             Bernhard Heckel  <bernhard.heckel@intel.com>
7417
7418         * f-typeprint.c (f_type_print_base): Use fprintfi_filtered
7419         to maintain proper indentation when printing pointers/refs.
7420
7421 2017-09-07  Joel Brobecker  <brobecker@adacore.com>
7422
7423         GDB 8.0.1 released.
7424
7425 2017-09-07  Joel Brobecker  <brobecker@adacore.com>
7426
7427         * NEWS (Changes in GDB 7.11): Remove entry for QStartupWithShell.
7428
7429 2017-09-05  Tom Tromey  <tom@tromey.com>
7430
7431         * parse.c (funcall_chain): Now a std::vector.
7432         (start_arglist, end_arglist): Simplify.
7433         (free_funcalls): Remove.
7434         (parse_exp_in_context_1): Remove cleanup.
7435
7436 2017-09-05  Tom Tromey  <tom@tromey.com>
7437
7438         * go-exp.y (go_parse): Don't create a cleanup.
7439
7440 2017-09-05  Tom Tromey  <tom@tromey.com>
7441
7442         * d-exp.y (PrimaryExpression): Use std::string.
7443         (d_parse): Don't create a cleanup.
7444
7445 2017-09-05  Tom Tromey  <tom@tromey.com>
7446
7447         * utils.c (do_clear_parser_state): Remove.
7448         (make_cleanup_clear_parser_state): Remove.
7449         * p-exp.y (pascal_parse): Use scoped_restore.
7450         * m2-exp.y (m2_parse): Use scoped_restore.
7451         * f-exp.y (f_parse): Use scoped_restore.
7452         * d-exp.y (d_parse): Use scoped_restore.
7453         * c-exp.y (c_parse): Use scoped_restore.
7454         * ada-exp.y (ada_parse): Use scoped_restore.
7455         * utils.h (make_cleanup_clear_parser_state): Remove.
7456
7457 2017-09-06  Keith Seitz  <keiths@redhat.com>
7458
7459         * dwarf2read.c (dw2_linkage_name_attr): New function.
7460         (dw2_linkage_name): New function.
7461         (dwarf2_compute_name, dwarf2_physname, read_call_site_scope)
7462         (guess_full_die_structure_name, dwarf2_name): Use dw2_linkage_name.
7463         (anonymous_struct_prefix, dwarf2_name): Use dw2_linkage_name_attr.
7464
7465 2017-09-06  Kamil Rytarowski  <n54@gmx.com>
7466
7467         * config/djgpp/djconfig.sh: Correct shell portability issue.
7468
7469 2017-09-06  Kamil Rytarowski  <n54@gmx.com>
7470
7471         * configure.nat: Define HAVE_NATIVE_GCORE_HOST on NetBSD.
7472
7473 2017-09-06  John Baldwin  <jhb@FreeBSD.org>
7474
7475         * Makefile.in (ALLDEPFILES): Add mips-fbsd-nat.c.
7476         * NEWS: Mention new FreeBSD/mips native configuration.
7477         * configure.host: Add aarch64*-*-freebsd*.
7478         * configure.nat: Likewise.
7479         * aarch64-fbsd-nat.c: New file.
7480
7481 2017-09-06  John Baldwin  <jhb@FreeBSD.org>
7482
7483         * Makefile.in (ALL_64_TARGET_OBS): Add aarch64-fbsd-tdep.o.
7484         (ALLDEPFILES): Add aarch64-fbsd-tdep.c.
7485         * NEWS: Mention new FreeBSD/aarch64 target.
7486         * configure.tgt: Add aarch64*-*-freebsd*.
7487         * aarch64-fbsd-tdep.c: New file.
7488         * aarch64-fbsd-tdep.h: New file.
7489
7490 2017-09-06  Kamil Rytarowski  <n54@gmx.com>
7491
7492         * MAINTAINERS (Write After Approval): Add Kamil Rytarowski.
7493
7494 2017-09-06  Jan Kratochvil  <jan.kratochvil@redhat.com>
7495
7496         * parse.c (find_minsym_type_and_address): Don't relocate addresses
7497         of TLS symbols.
7498
7499 2017-09-05  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
7500
7501         * objfiles.c (get_objfile_bfd_data): Remove useless obstack_init
7502         call.
7503
7504 2017-09-05  Simon Marchi  <simon.marchi@ericsson.com>
7505
7506         * infrun.c (follow_exec): Call add_thread after
7507         target_find_description.
7508
7509 2017-09-05  Simon Marchi  <simon.marchi@ericsson.com>
7510
7511         * infrun.c (handle_inferior_event_1): When exec'ing, read
7512         stop_pc after follow_exec.
7513
7514 2017-09-05  Simon Marchi  <simon.marchi@ericsson.com>
7515
7516         * remote.c (process_g_packet): Update error message.
7517
7518 2017-09-05  Yao Qi  <yao.qi@linaro.org>
7519
7520         * configure.tgt (gdb_target_obs): Add i386.o for x86_64-*
7521         targets.
7522
7523 2017-09-05  Pedro Alves  <palves@redhat.com>
7524
7525         * eval.c (eval_call, evaluate_funcall): New functions, factored
7526         out from ...
7527         (evaluate_subexp_standard): ... this.
7528
7529 2017-09-05  Yao Qi  <yao.qi@linaro.org>
7530
7531         * amd64-tdep.c (amd64_target_description): Create target
7532         descriptions.
7533         (_initialize_amd64_tdep): Don't call functions
7534         initialize_tdesc_amd64_*.  Add self tests.
7535         * arch/amd64.c (amd64_create_target_description): Add parameter
7536         is_linux.  Call set_tdesc_osabi if is_linux is true.
7537         * arch/amd64.h (amd64_create_target_description): Update the
7538         declaration.
7539         * arch/i386.c (i386_create_target_description): Add parameter
7540         is_linux.  Call set_tdesc_osabi if is_linux is true.
7541         * arch/i386.h (i386_create_target_description): Update
7542         declaration.
7543         * configure.tgt: Add i386.o to gdb_target_obs.
7544         * features/Makefile (XMLTOC): Remove i386/*.xml.
7545         * features/i386/amd64-avx-avx512.c: Remove.
7546         * features/i386/amd64-avx-mpx-avx512-pku.c: Remove.
7547         * features/i386/amd64-avx-mpx.c: Remove.
7548         * features/i386/amd64-avx.c: Remove.
7549         * features/i386/amd64-mpx.c: Remove.
7550         * features/i386/amd64.c: Remove.
7551         * features/i386/i386-avx-avx512.c: Remove.
7552         * features/i386/i386-avx-mpx-avx512-pku.c: Remove.
7553         * features/i386/i386-avx-mpx.c: Remove.
7554         * features/i386/i386-avx.c: Remove.
7555         * features/i386/i386-mmx.c: Remove.
7556         * features/i386/i386-mpx.c: Remove.
7557         * features/i386/i386.c: Remove.
7558         * i386-tdep.c: Don't include features/i386/i386*.c., include
7559         target-descriptions.h and arch/i386.h.
7560         (i386_target_description): Create target descriptions.
7561         (i386_gdbarch_init): Don't call initialize_tdesc_i386_*
7562         functions.  Do self tests.
7563
7564 2017-09-05  Yao Qi  <yao.qi@linaro.org>
7565
7566         * features/Makefile (XMLTOC): Remove i386/amd64XXX-linux.xml.
7567         * features/i386/amd64-avx-avx512-linux.c: Removed.
7568         * features/i386/amd64-avx-linux.c: Removed.
7569         * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Removed.
7570         * features/i386/amd64-avx-mpx-linux.c: Removed.
7571         * features/i386/amd64-linux.c: Removed.
7572         * features/i386/amd64-mpx-linux.c: Removed.
7573         * features/i386/x32-avx-avx512-linux.c: Removed.
7574         * features/i386/x32-avx-linux.c: Removed.
7575         * features/i386/x32-linux.c: Removed.
7576
7577 2017-09-05  Yao Qi  <yao.qi@linaro.org>
7578
7579         * amd64-linux-tdep.c: Include arch/amd64.h.  Don't include
7580         features/i386/*.c.
7581         (amd64_linux_read_description): Call
7582         amd64_create_target_description.
7583         * arch/amd64.c: New file.
7584         * arch/amd64.h: New file.
7585         * configure.tgt (x86_64-*-linux*): Append amd64.o.
7586         * Makefile.in (ALL_64_TARGET_OBS): Append amd64.o.
7587
7588 2017-09-05  Yao Qi  <yao.qi@linaro.org>
7589
7590         * amd64-linux-tdep.c: Don't include amd64-XXX-linux and
7591         x32-XXX-linux.c.  Include 64bit-XX.c and x32-XX.c.
7592         (amd64_linux_read_description): Create target descriptions.
7593         (_initialize_amd64_linux_tdep): Don't call initialize_tdesc_XXX
7594         functions.  Add unit tests.
7595         * features/Makefile (FEATURE_XMLFILES): Append 64bit-XXX.xml and
7596         x32-core.xml.
7597         * features/i386/64bit-avx.c: Generated.
7598         * features/i386/64bit-avx512.c: Generated.
7599         * features/i386/64bit-core.c: Generated.
7600         * features/i386/64bit-linux.c: Generated.
7601         * features/i386/64bit-mpx.c: Generated.
7602         * features/i386/64bit-pkeys.c: Generated.
7603         * features/i386/64bit-segments.c: Generated.
7604         * features/i386/64bit-sse.c: Generated.
7605         * features/i386/x32-core.c: Generated.
7606         * target-descriptions.c (maint_print_c_tdesc_cmd): Print feature
7607         c files for amd64-linux and x32-linux.
7608
7609 2017-09-05  Yao Qi  <yao.qi@linaro.org>
7610
7611         * amd64-linux-tdep.c (amd64_linux_read_description): New
7612         function.
7613         (amd64_linux_core_read_description): Call
7614         amd64_linux_read_description.
7615         (amd64_linux_init_abi): Likewise.
7616         (amd64_x32_linux_init_abi): Likewise.
7617         * amd64-linux-tdep.h (amd64_linux_read_description): Declare.
7618         * x86-linux-nat.c (x86_linux_read_description): Call
7619         amd64_linux_read_description.
7620
7621 2017-09-05  Yao Qi  <yao.qi@linaro.org>
7622
7623         * amd64-linux-tdep.c (amd64_linux_core_read_description): Update
7624         comments.
7625
7626 2017-09-05  Yao Qi  <yao.qi@linaro.org>
7627
7628         * features/Makefile (XMLTOC): Remove i386/i386-XX-linux.xml.
7629         * features/i386/i386-avx-avx512-linux.c: Remove.
7630         * features/i386/i386-avx-linux.c: Remove.
7631         * features/i386/i386-avx-mpx-avx512-pku-linux.c: Remove.
7632         * features/i386/i386-avx-mpx-linux.c: Remove.
7633         * features/i386/i386-linux.c: Remove.
7634         * features/i386/i386-mmx-linux.c: Remove.
7635         * features/i386/i386-mpx-linux.c: Remove.
7636
7637 2017-09-05  Yao Qi  <yao.qi@linaro.org>
7638
7639         * Makefile.in (ALL_TARGET_OBS): Add i386.o.
7640         (SFILES): Add arch/i386.c.
7641         (HFILES_NO_SRCDIR): Add arch/i386.h.
7642         * arch/i386.c: New file.
7643         * arch/i386.h: New file.
7644         * arch/tdesc.h (allocate_target_description): Declare.
7645         (set_tdesc_architecture): Declare.
7646         (set_tdesc_osabi): Declare.
7647         * configure.tgt (i[34567]86-*-linux*): Add i386.o.
7648         * i386-linux-tdep.c: Don't include ../features/i386/32bit-XXX.c.
7649         include arch/i386.h.
7650         (i386_linux_read_description): Remove code and call
7651         i386_create_target_description.
7652         (set_tdesc_architecture): New function.
7653         (set_tdesc_osabi): New function.
7654         * target-descriptions.h (allocate_target_description): Remove.
7655
7656 2017-09-05  Yao Qi  <yao.qi@linaro.org>
7657
7658         * arch/tdesc.h (tdesc_create_feature): Add an argument xml.
7659         * target-descriptions.c (tdesc_create_feature): Likewise, and
7660         adjust code.
7661         * features/i386/32bit-avx.c: Re-generated.
7662         * features/i386/32bit-avx512.c: Re-generated.
7663         * features/i386/32bit-core.c: Re-generated.
7664         * features/i386/32bit-linux.c: Re-generated.
7665         * features/i386/32bit-mpx.c: Re-generated.
7666         * features/i386/32bit-pkeys.c: Re-generated.
7667         * features/i386/32bit-sse.c: Re-generated.
7668
7669 2017-09-05  Yao Qi  <yao.qi@linaro.org>
7670
7671         * regformats/regdef.h (struct reg): Override operator == and !=.
7672
7673 2017-09-05  Yao Qi  <yao.qi@linaro.org>
7674
7675         * arch/tdesc.h: New file.
7676         * regformats/regdat.sh: Generate code using tdesc_create_reg.
7677         * target-descriptions.c: Update comments.
7678         * target-descriptions.h: Include "arch/tdesc.h".  Remove the
7679         declarations.
7680         * features/i386/32bit-avx.c: Re-generated.
7681         * features/i386/32bit-avx512.c: Re-generated.
7682         * features/i386/32bit-core.c: Re-generated.
7683         * features/i386/32bit-linux.c: Re-generated.
7684         * features/i386/32bit-mpx.c: Re-generated.
7685         * features/i386/32bit-pkeys.c: Re-generated.
7686         * features/i386/32bit-sse.c: Re-generated.
7687
7688 2017-09-05  Yao Qi  <yao.qi@linaro.org>
7689
7690         * regformats/regdat.sh: Update generated code.
7691
7692 2017-09-05  Yao Qi  <yao.qi@linaro.org>
7693
7694         * regformats/regdat.sh: Adjust code order.
7695
7696 2017-09-05  Simon Marchi  <simon.marchi@ericsson.com>
7697
7698         * expprint.c (dump_subexp_body_standard): Use constant format
7699         string in fprintf_filtered call.
7700
7701 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
7702
7703         * configure.nat: Add "x86-nat.o x86-dregs.o" for NetBSD/amd64 and
7704         NetBSD/i386.
7705         * x86-bsd-nat.c [!DBREG_DRX && __NetBSD__]: Define DBREG_DRX.
7706
7707 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
7708
7709         * bsd-kvm.o: Make <sys/user.h> conditional on HAVE_SYS_USER_H.
7710
7711 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
7712
7713         * bsd-kvm.o: Define _KMEMUSER.
7714         * configure.ac: Define _KMEMUSER when checking for "struct lwp".
7715         * configure: Regenerate.
7716
7717 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
7718
7719         * amd64-fbsd-nat.c: Add include of "x86-xstate.h".
7720         * i386-fbsd-nat.c: Likewise.
7721
7722 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
7723
7724         * unittests/array-view-selftests.c: Add include of <array>.
7725
7726 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
7727
7728         * spu-tdep.c (flush_ea_cache): Add missing argument to
7729         call_function_by_hand.
7730
7731 2017-09-04  Pedro Alves  <palves@redhat.com>
7732
7733         * NEWS (Safer support for debugging with no debug info): New.
7734
7735 2017-09-04  Pedro Alves  <palves@redhat.com>
7736
7737         * c-exp.y (function_method, function_method_void): Add current
7738         instance flags to TYPE_INSTANCE.
7739         * dwarf2read.c (check_modifier): New.
7740         (compute_delayed_physnames): Assert that only C++ adds delayed
7741         physnames.  Mark fn_fields as const/volatile depending on
7742         physname.
7743         * eval.c (make_params): New type_instance_flags parameter.  Use
7744         it as the new type's instance flags.
7745         (evaluate_subexp_standard) <TYPE_INSTANCE>: Extract the instance
7746         flags element and pass it to make_params.
7747         * expprint.c (print_subexp_standard) <TYPE_INSTANCE>: Handle
7748         instance flags element.
7749         (dump_subexp_body_standard) <TYPE_INSTANCE>: Likewise.
7750         * gdbtypes.h: Include "enum-flags.h".
7751         (type_instance_flags): New enum-flags type.
7752         (TYPE_CONST, TYPE_VOLATILE, TYPE_RESTRICT, TYPE_ATOMIC)
7753         (TYPE_CODE_SPACE, TYPE_DATA_SPACE): Return boolean.
7754         * parse.c (operator_length_standard) <TYPE_INSTANCE>: Adjust.
7755         (follow_type_instance_flags): New function.
7756         (operator_check_standard) <TYPE_INSTANCE>: Adjust.
7757         * parser-defs.h (follow_type_instance_flags): Declare.
7758         * valops.c (value_struct_elt_for_reference): const/volatile must
7759         match too.
7760
7761 2017-09-04  Pedro Alves  <palves@redhat.com>
7762
7763         * cp-namespace.c (cp_search_static_and_baseclasses): Handle
7764         function/method scopes; lookup the nested name as a function local
7765         static variable.
7766
7767 2017-09-04  Pedro Alves  <palves@redhat.com>
7768
7769         (%type <voidval>): Add function_method.
7770         * c-exp.y (exp): New production for calls with no arguments.
7771         (function_method, function_method_void_or_typelist): New
7772         productions.
7773         (exp): New production for "method()::static_var".
7774         * eval.c (evaluate_subexp_standard): Handle OP_FUNC_STATIC_VAR.
7775         * expprint.c (print_subexp_standard, dump_subexp_body_standard):
7776         Handle OP_FUNC_STATIC_VAR.
7777         * parse.c (operator_length_standard):
7778         Handle OP_FUNC_STATIC_VAR.
7779
7780 2017-09-04  Pedro Alves  <palves@redhat.com>
7781
7782         * eval.c (evaluate_subexp_standard): Remove UNOP_MEMVAL_TLS
7783         handling.
7784         * expprint.c (print_subexp_standard, dump_subexp_body_standard):
7785         Ditto.
7786         * parse.c (operator_length_standard, operator_check_standard):
7787         Ditto.
7788         * std-operator.def (UNOP_MEMVAL_TLS): Delete.
7789
7790 2017-09-04  Pedro Alves  <palves@redhat.com>
7791
7792         * ax-gdb.c: Include "typeprint.h".
7793         (gen_expr_for_cast): New function.
7794         (gen_expr) <OP_CAST, OP_CAST_TYPE>: Use it.
7795         <OP_VAR_VALUE, OP_MSYM_VAR_VALUE>: Error out if the variable's
7796         type is unknown.
7797         * dwarf2read.c (new_symbol_full): Fallback to int instead of
7798         nodebug_data_symbol.
7799         * eval.c: Include "typeprint.h".
7800         (evaluate_subexp_standard) <OP_VAR_VALUE, OP_VAR_MSYM_VALUE>:
7801         Error out if symbol has unknown type.
7802         <UNOP_CAST, UNOP_CAST_TYPE>: Common bits factored out to
7803         evaluate_subexp_for_cast.
7804         (evaluate_subexp_for_address, evaluate_subexp_for_sizeof): Handle
7805         OP_VAR_MSYM_VALUE.
7806         (evaluate_subexp_for_cast): New function.
7807         * gdbtypes.c (init_nodebug_var_type): New function.
7808         (objfile_type): Use it to initialize types of variables with no
7809         debug info.
7810         * typeprint.c (error_unknown_type): New.
7811         * typeprint.h (error_unknown_type): New declaration.
7812         * compile/compile-c-types.c (convert_type_basic): Handle
7813         TYPE_CODE_ERROR; warn and fallback to int for variables with
7814         unknown type.
7815
7816 2017-09-04  Pedro Alves  <palves@redhat.com>
7817
7818         * eval.c (evaluate_var_value): New function, factored out from ...
7819         (evaluate_subexp_standard): ... here.
7820
7821 2017-09-04  Pedro Alves  <palves@redhat.com>
7822
7823         * eval.c (evaluate_subexp_standard) <UNOP_COMPLEMENT, UNOP_ADDR>:
7824         Remove useless assignments to 'op'.
7825
7826 2017-09-04  Pedro Alves  <palves@redhat.com>
7827
7828         * eval.c (eval_skip_value): New function.
7829         (evaluate_subexp_standard): Use it.
7830
7831 2017-09-04  Pedro Alves  <palves@redhat.com>
7832
7833         * eval.c (evaluate_subexp_standard): <OP_FUNCALL>: Extract
7834         function name from symbol/minsym and pass it to
7835         error_call_unknown_return_type.
7836
7837 2017-09-04  Pedro Alves  <palves@redhat.com>
7838
7839         * ada-lang.c (resolve_subexp): Handle OP_VAR_MSYM_VALUE.
7840         * ax-gdb.c (gen_msym_var_ref): New function.
7841         (gen_expr): Handle OP_VAR_MSYM_VALUE.
7842         * eval.c (evaluate_var_msym_value): New function.
7843         * eval.c (evaluate_subexp_standard): Handle OP_VAR_MSYM_VALUE.
7844         <OP_FUNCALL>: Extract function name from symbol/minsym and pass it
7845         to call_function_by_hand.
7846         * expprint.c (print_subexp_standard, dump_subexp_body_standard):
7847         Handle OP_VAR_MSYM_VALUE.
7848         (union exp_element) <msymbol>: New field.
7849         * minsyms.h (struct type): Forward declare.
7850         (find_minsym_type_and_address): Declare.
7851         * parse.c (write_exp_elt_msym): New function.
7852         (write_exp_msymbol): Delete, refactored as ...
7853         (find_minsym_type_and_address): ... this new function.
7854         (write_exp_msymbol): Reimplement using OP_VAR_MSYM_VALUE.
7855         (operator_length_standard, operator_check_standard): Handle
7856         OP_VAR_MSYM_VALUE.
7857         * std-operator.def (OP_VAR_MSYM_VALUE): New.
7858
7859 2017-09-04  Pedro Alves  <palves@redhat.com>
7860
7861         * ada-lang.c (ada_evaluate_subexp) <TYPE_CODE_FUNC>: Don't handle
7862         TYPE_GNU_IFUNC specially here.  Throw error if return type is
7863         unknown.
7864         * ada-typeprint.c (print_func_type): Handle functions with unknown
7865         return type.
7866         * c-typeprint.c (c_type_print_base): Handle functions and methods
7867         with unknown return type.
7868         * compile/compile-c-symbols.c (convert_symbol_bmsym)
7869         <mst_text_gnu_ifunc>: Use nodebug_text_gnu_ifunc_symbol.
7870         * compile/compile-c-types.c: Include "objfiles.h".
7871         (convert_func): For functions with unknown return type, warn and
7872         default to int.
7873         * compile/compile-object-run.c (compile_object_run): Adjust call
7874         to call_function_by_hand_dummy.
7875         * elfread.c (elf_gnu_ifunc_resolve_addr): Adjust call to
7876         call_function_by_hand.
7877         * eval.c (evaluate_subexp_standard): Adjust calls to
7878         call_function_by_hand.  Handle functions and methods with unknown
7879         return type.  Pass expect_type to call_function_by_hand.
7880         * f-typeprint.c (f_type_print_base): Handle functions with unknown
7881         return type.
7882         * gcore.c (call_target_sbrk): Adjust call to
7883         call_function_by_hand.
7884         * gdbtypes.c (objfile_type): Leave nodebug text symbol with NULL
7885         return type instead of int.  Make nodebug_text_gnu_ifunc_symbol be
7886         an integer address type instead of nodebug.
7887         * guile/scm-value.c (gdbscm_value_call): Adjust call to
7888         call_function_by_hand.
7889         * infcall.c (error_call_unknown_return_type): New function.
7890         (call_function_by_hand): New "default_return_type" parameter.
7891         Pass it down.
7892         (call_function_by_hand_dummy): New "default_return_type"
7893         parameter.  Use it instead of defaulting to int.  If there's no
7894         default and the return type is unknown, throw an error.  If
7895         there's a default return type, and the called function has no
7896         debug info, then assume the function is prototyped.
7897         * infcall.h (call_function_by_hand, call_function_by_hand_dummy):
7898         New "default_return_type" parameter.
7899         (error_call_unknown_return_type): New declaration.
7900         * linux-fork.c (call_lseek): Cast return type of lseek.
7901         (inferior_call_waitpid, checkpoint_command): Adjust calls to
7902         call_function_by_hand.
7903         * linux-tdep.c (linux_infcall_mmap, linux_infcall_munmap): Adjust
7904         calls to call_function_by_hand.
7905         * m2-typeprint.c (m2_procedure): Handle functions with unknown
7906         return type.
7907         * objc-lang.c (lookup_objc_class, lookup_child_selector)
7908         (value_nsstring, print_object_command): Adjust calls to
7909         call_function_by_hand.
7910         * p-typeprint.c (pascal_type_print_varspec_prefix): Handle
7911         functions with unknown return type.
7912         (pascal_type_print_func_varspec_suffix): New function.
7913         (pascal_type_print_varspec_suffix) <TYPE_CODE_FUNC,
7914         TYPE_CODE_METHOD>: Use it.
7915         * python/py-value.c (valpy_call): Adjust call to
7916         call_function_by_hand.
7917         * rust-lang.c (rust_evaluate_funcall): Adjust call to
7918         call_function_by_hand.
7919         * valarith.c (value_x_binop, value_x_unop): Adjust calls to
7920         call_function_by_hand.
7921         * valops.c (value_allocate_space_in_inferior): Adjust call to
7922         call_function_by_hand.
7923         * typeprint.c (type_print_unknown_return_type): New function.
7924         * typeprint.h (type_print_unknown_return_type): New declaration.
7925
7926 2017-09-04  Pedro Alves  <palves@redhat.com>
7927
7928         * gdbtypes.c (lookup_function_type_with_arguments): Mark function
7929         types with more than one parameter as prototyped.
7930
7931 2017-09-04  Pedro Alves  <palves@redhat.com>
7932
7933         * cli/cli-cmds.c (print_disassembly, disassemble_current_function)
7934         (disassemble_command): Use gdb_disassembly_flags instead of bare
7935         int.
7936         * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn)
7937         (dump_insns, do_mixed_source_and_assembly_deprecated)
7938         (do_mixed_source_and_assembly, do_assembly_only, gdb_disassembly):
7939         Use gdb_disassembly_flags instead of bare int.
7940         * disasm.h (DISASSEMBLY_SOURCE_DEPRECATED, DISASSEMBLY_RAW_INSN)
7941         (DISASSEMBLY_OMIT_FNAME, DISASSEMBLY_FILENAME)
7942         (DISASSEMBLY_OMIT_PC, DISASSEMBLY_SOURCE)
7943         (DISASSEMBLY_SPECULATIVE): No longer macros.  Instead they're...
7944         (enum gdb_disassembly_flag): ... values of this new enumeration.
7945         (gdb_disassembly_flags): Define.
7946         (gdb_disassembly)
7947         (gdb_pretty_print_disassembler::pretty_print_insn): Use it.
7948         * mi/mi-cmd-disas.c (mi_cmd_disassemble): Use
7949         gdb_disassembly_flags instead of bare int.
7950         * record-btrace.c (btrace_insn_history)
7951         (record_btrace_insn_history, record_btrace_insn_history_range)
7952         (record_btrace_insn_history_from): Use gdb_disassembly_flags
7953         instead of bare int.
7954         * record.c (get_insn_history_modifiers, cmd_record_insn_history):
7955         Use gdb_disassembly_flags instead of bare int.
7956         * target-debug.h (target_debug_print_gdb_disassembly_flags):
7957         Define.
7958         * target-delegates.c: Regenerate.
7959         * target.c (target_insn_history, target_insn_history_from)
7960         (target_insn_history_range): Use gdb_disassembly_flags instead of
7961         bare int.
7962         * target.h: Include "disasm.h".
7963         (struct target_ops) <to_insn_history, to_insn_history_from,
7964         to_insn_history_range>: Use gdb_disassembly_flags instead of bare
7965         int.
7966         (target_insn_history, target_insn_history_from)
7967         (target_insn_history_range): Use gdb_disassembly_flags instead of
7968         bare int.
7969
7970 2017-09-04  Simon Marchi  <simon.marchi@ericsson.com>
7971
7972         * cli/cli-script.c (build_command_line): For if/while commands,
7973         check whether args is empty.
7974
7975 2017-09-04  Simon Marchi  <simon.marchi@ericsson.com>
7976
7977         * cli/cli-script.h (enum misc_command_type): Move from defs.h.
7978         (enum command_control_type): Likewise.
7979         (struct command_line): Likewise.
7980         (free_command_lines): Likewise.
7981         (struct command_lines_deleter): Likewise.
7982         (command_line_up): Likewise.
7983         (read_command_lines): Likewise.
7984         (read_command_lines_1): Likewise.
7985         * defs.h (enum misc_command_type): Move to cli/cli-script.h.
7986         (enum command_control_type): Likewise.
7987         (struct command_line): Likewise.
7988         (free_command_lines): Likewise.
7989         (struct command_lines_deleter): Likewise.
7990         (command_line_up): Likewise.
7991         (read_command_lines): Likewise.
7992         (read_command_lines_1): Likewise.
7993         * breakpoint.h: Include cli/cli-script.h.
7994         * extension-priv.h: Likewise.
7995         * gdbcmd.h: Likewise.
7996
7997 2017-09-04  Pedro Alves  <palves@redhat.com>
7998
7999         * ada-lang.c (is_known_support_routine): Move sal declaration to
8000         where it is initialized.
8001         * breakpoint.c (create_internal_breakpoint, init_catchpoint)
8002         (parse_breakpoint_sals, decode_static_tracepoint_spec)
8003         (clear_command, update_static_tracepoint): Remove init_sal
8004         references.  Move declarations closer to initializations.
8005         * cli/cli-cmds.c (list_command): Move sal declarations closer to
8006         initializations.
8007         * elfread.c (elf_gnu_ifunc_resolver_stop): Remove init_sal
8008         references.  Move sal declarations closer to initializations.
8009         * frame.c (find_frame_sal): Return a symtab_and_line via function
8010         return instead of output parameter.  Remove init_sal references.
8011         * frame.h (find_frame_sal): Return a symtab_and_line via function
8012         return instead of output parameter.
8013         * guile/scm-frame.c (gdbscm_frame_sal): Adjust.
8014         * guile/scm-symtab.c (stscm_make_sal_smob): Use in-place new
8015         instead of memset.
8016         (gdbscm_find_pc_line): Remove init_sal reference.
8017         * infcall.c (call_function_by_hand_dummy): Remove init_sal
8018         references.  Move declarations closer to initializations.
8019         * infcmd.c (set_step_frame): Update.  Move declarations closer to
8020         initializations.
8021         (finish_backward): Remove init_sal references.  Move declarations
8022         closer to initializations.
8023         * infrun.c (process_event_stop_test, handle_step_into_function)
8024         (insert_hp_step_resume_breakpoint_at_frame)
8025         (insert_step_resume_breakpoint_at_caller): Likewise.
8026         * linespec.c (create_sals_line_offset, decode_digits_ordinary)
8027         (symbol_to_sal): Likewise.
8028         * probe.c (parse_probes_in_pspace): Remove init_sal reference.
8029         * python/py-frame.c (frapy_find_sal): Move sal declaration closer
8030         to its initialization.
8031         * reverse.c (save_bookmark_command): Use new/delete.  Remove
8032         init_sal references.  Move declarations closer to initializations.
8033         * source.c (get_current_source_symtab_and_line): Remove brace
8034         initialization.
8035         (set_current_source_symtab_and_line): Now takes the sal by const
8036         reference.  Remove brace initialization.
8037         (line_info): Remove init_sal reference.
8038         * source.h (set_current_source_symtab_and_line): Now takes a
8039         symtab_and_line via const reference.
8040         * stack.c (set_current_sal_from_frame): Adjust.
8041         (print_frame_info): Adjust.
8042         (get_last_displayed_sal): Return the sal via function return
8043         instead of via output parameter.  Simplify.
8044         (frame_info): Adjust.
8045         * stack.h (get_last_displayed_sal): Return the sal via function
8046         return instead of via output parameter.
8047         * symtab.c (init_sal): Delete.
8048         (find_pc_sect_line): Remove init_sal references.  Move
8049         declarations closer to initializations.
8050         (find_function_start_sal): Remove init_sal references.  Move
8051         declarations closer to initializations.
8052         * symtab.h (struct symtab_and_line): In-class initialize all
8053         fields.
8054         * tracepoint.c (set_traceframe_context)
8055         (print_one_static_tracepoint_marker): Remove init_sal references.
8056         Move declarations closer to initializations.
8057         * tui/tui-disasm.c (tui_show_disassem_and_update_source): Adjust.
8058         * tui/tui-stack.c (tui_show_frame_info): Adjust.  Move
8059         declarations closer to initializations.
8060         * tui/tui-winsource.c (tui_update_source_window_as_is): Remove
8061         init_sal references.  Adjust.
8062
8063 2017-09-04  Pedro Alves  <palves@redhat.com>
8064
8065         * ax-gdb.c (agent_command_1): Use range-for.
8066         * break-catch-throw.c (re_set_exception_catchpoint): Update.
8067         * breakpoint.c: Include "common/array-view.h".
8068         (init_breakpoint_sal, create_breakpoint_sal): Change sals
8069         parameter from struct symtabs_and_lines to
8070         array_view<symtab_and_line>.  Adjust.  Use range-for.  Update.
8071         (breakpoint_sals_to_pc): Change sals parameter from struct
8072         symtabs_and_lines to std::vector reference.
8073         (check_fast_tracepoint_sals): Change sals parameter from struct
8074         symtabs_and_lines to std::array_view.  Use range-for.
8075         (decode_static_tracepoint_spec): Return a std::vector instead of
8076         symtabs_and_lines.  Update.
8077         (create_breakpoint): Update.
8078         (break_range_command, until_break_command, clear_command): Update.
8079         (base_breakpoint_decode_location, bkpt_decode_location)
8080         (bkpt_probe_create_sals_from_location)
8081         (bkpt_probe_decode_location, tracepoint_decode_location)
8082         (tracepoint_probe_decode_location)
8083         (strace_marker_create_sals_from_location): Return a std::vector
8084         instead of symtabs_and_lines.
8085         (strace_marker_create_breakpoints_sal): Update.
8086         (strace_marker_decode_location): Return a std::vector instead of
8087         symtabs_and_lines.  Update.
8088         (update_breakpoint_locations): Change struct symtabs_and_lines
8089         parameters to gdb::array_view.  Adjust.
8090         (location_to_sals): Return a std::vector instead of
8091         symtabs_and_lines.  Update.
8092         (breakpoint_re_set_default): Use std::vector instead of struct
8093         symtabs_and_lines.
8094         (decode_location_default): Return a std::vector instead of
8095         symtabs_and_lines.  Update.
8096         * breakpoint.h: Include "common/array-view.h".
8097         (struct breakpoint_ops) <decode_location>: Now returns a
8098         std::vector instead of returning a symtabs_and_lines via output
8099         parameter.
8100         (update_breakpoint_locations): Change sals parameters to use
8101         gdb::array_view.
8102         * cli/cli-cmds.c (edit_command, list_command): Update to use
8103         std::vector and gdb::array_view.
8104         (ambiguous_line_spec): Adjust to use gdb::array_view and
8105         range-for.
8106         (compare_symtabs): Rename to ...
8107         (cmp_symtabs): ... this.  Change parameters to symtab_and_line
8108         const reference and adjust.
8109         (filter_sals): Rewrite using std::vector and standard algorithms.
8110         * elfread.c (elf_gnu_ifunc_resolver_return_stop): Simplify.
8111         (jump_command): Update to use std::vector.
8112         * linespec.c (struct linespec_state) <canonical_names>: Update
8113         comment.
8114         (add_sal_to_sals_basic): Delete.
8115         (add_sal_to_sals, filter_results, convert_results_to_lsals)
8116         (decode_line_2, create_sals_line_offset)
8117         (convert_address_location_to_sals, convert_linespec_to_sals)
8118         (convert_explicit_location_to_sals, parse_linespec)
8119         (event_location_to_sals, decode_line_full, decode_line_1)
8120         (decode_line_with_current_source)
8121         (decode_line_with_last_displayed, decode_objc)
8122         (decode_digits_list_mode, decode_digits_ordinary, minsym_found)
8123         (linespec_result::~linespec_result): Adjust to use std::vector
8124         instead of symtabs_and_lines.
8125         * linespec.h (linespec_sals::sals): Now a std::vector.
8126         (struct linespec_result): Use std::vector, bool, and in-class
8127         initialization.
8128         (decode_line_1, decode_line_with_current_source)
8129         (decode_line_with_last_displayed): Return std::vector.
8130         * macrocmd.c (info_macros_command): Use std::vector.
8131         * mi/mi-main.c (mi_cmd_trace_find): Use std::vector.
8132         * probe.c (parse_probes_in_pspace, parse_probes): Adjust to use
8133         std::vector.
8134         * probe.h (parse_probes): Return a std::vector.
8135         * python/python.c (gdbpy_decode_line): Use std::vector and
8136         gdb::array_view.
8137         * source.c (select_source_symtab, line_info): Use std::vector.
8138         * stack.c (func_command): Use std::vector.
8139         * symtab.h (struct symtabs_and_lines): Delete.
8140         * tracepoint.c (tfind_line_command, scope_info): Use std::vector.
8141
8142 2017-09-04  Pedro Alves  <palves@redhat.com>
8143
8144         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
8145         unittests/array-view-selftests.c.
8146         (SUBDIR_UNITTESTS_OBS): Add array-view-selftests.o.
8147         * common/array-view.h: New file.
8148         * unittests/array-view-selftests.c: New file.
8149
8150 2017-09-04  Pedro Alves  <palves@redhat.com>
8151
8152         * cli/cli-cmds.c (edit_command): Pass message to
8153         ambiguous_line_spec.
8154         (list_command): Pass message to ambiguous_line_spec.  Say
8155         "first"/"last" instead of "start" and "end" to be consistent with
8156         the manual.
8157         (ambiguous_line_spec): Add 'format' and vararg parameters.  Use
8158         them to print formatted message.
8159
8160 2017-09-04  Pedro Alves  <palves@redhat.com>
8161
8162         * btrace.c (ftrace_add_pt): Pass btrace_insn to
8163         ftrace_update_insns by reference instead of pointer.
8164
8165 2017-09-04  Yao Qi  <yao.qi@linaro.org>
8166
8167         * i386-go32-tdep.c: Include x86-xstate.h.
8168         (i386_go32_init_abi): Call i386_target_description.
8169         * i386-tdep.c (i386_target_description): Return tdesc_i386_mmx
8170         if xcr0 is X86_XSTATE_X87_MASK.
8171         * i386-tdep.h (tdesc_i386): Remove the declaration.
8172         (tdesc_i386_mmx): Likewise.
8173
8174 2017-09-04  Yao Qi  <yao.qi@linaro.org>
8175
8176         * i386-fbsd-tdep.c (i386fbsd_core_read_xcr0): Return
8177         X86_XSTATE_SSE_MASK instead of 0.
8178
8179 2017-09-04  Yao Qi  <yao.qi@linaro.org>
8180
8181         * amd64-fbsd-nat.c (amd64fbsd_read_description): Call
8182         i386_target_description.
8183         * i386-fbsd-nat.c (i386fbsd_read_description): Call
8184         i386_target_description.
8185         * i386-tdep.c (i386_gdbarch_init): Likewise.
8186
8187 2017-09-04  Yao Qi  <yao.qi@linaro.org>
8188
8189         * amd64-darwin-tdep.c: Include "x86-xstate.h".
8190         (x86_darwin_init_abi_64): Call amd64_target_description.
8191         * amd64-dicos-tdep.c: Likewise.
8192         * amd64-fbsd-nat.c: Likewise.
8193         * amd64-fbsd-tdep.c: Likewise.
8194         * amd64-nbsd-tdep.c: Likewise.
8195         * amd64-obsd-tdep.c: Likewise.
8196         * amd64-sol2-tdep.c: Likewise.
8197         * amd64-windows-tdep.c: Likewise.
8198         * amd64-tdep.h (tdesc_amd64): Remove the declaration.
8199
8200 2017-09-04  Simon Marchi  <simon.marchi@ericsson.com>
8201
8202         * btrace.h (btrace_insn_s, DEF_VEC_O (btrace_insn_s)): Remove.
8203         (btrace_function) <insn>: Change type to use std::vector.
8204         * btrace.c (ftrace_debug, ftrace_call_num_insn,
8205         ftrace_find_call, ftrace_new_gap, ftrace_update_function,
8206         ftrace_update_insns, ftrace_compute_global_level_offset,
8207         btrace_stitch_bts, btrace_clear, btrace_insn_get,
8208         btrace_insn_end, btrace_insn_next, btrace_insn_prev): Adjust to
8209         change to std::vector.
8210         (ftrace_update_insns): Adjust to change to std::vector, change
8211         type of INSN parameter.
8212         (btrace_compute_ftrace_bts): Adjust call to ftrace_update_insns.
8213         * record-btrace.c (btrace_call_history_insn_range,
8214         btrace_compute_src_line_range,
8215         record_btrace_frame_prev_register): Adjust to change to
8216         std::vector.
8217         * python/py-record-btrace.c (recpy_bt_func_instructions): Adjust
8218         to change to std::vector.
8219
8220 2017-09-03  Tom Tromey  <tom@tromey.com>
8221
8222         * corefile.c (reopen_exec_file): Use std::string.
8223
8224 2017-09-03  Tom Tromey  <tom@tromey.com>
8225
8226         * compile/compile.c (compile_register_name_mangled): Return
8227         std::string.
8228         * compile/compile-loc2c.c (pushf_register_address): Update.
8229         (pushf_register): Update.
8230         * compile/compile-c-types.c (convert_array): Update.
8231         * compile/compile-c-symbols.c (generate_vla_size): Update.
8232         (error_symbol_once): Use a gdb::unique_xmalloc_ptr.
8233         (symbol_substitution_name): Return a gdb::unique_xmalloc_ptr.
8234         (convert_one_symbol): Update.
8235         (generate_c_for_for_one_variable): Update.
8236         * compile/compile-c-support.c (c_get_range_decl_name): Return a
8237         std::string.
8238         (generate_register_struct): Update.
8239         * compile/compile-internal.h (c_get_range_decl_name): Return a
8240         std::string.
8241         (compile_register_name_mangled): Return std::string.
8242
8243 2017-09-03  Tom Tromey  <tom@tromey.com>
8244
8245         * utils.c (perror_string): Return a std::string.
8246         (throw_perror_with_name, perror_warning_with_name): Update.
8247
8248 2017-09-03  Tom Tromey  <tom@tromey.com>
8249
8250         * demangle.c (demangle_command): Use std::string,
8251         unique_xmalloc_ptr.
8252
8253 2017-09-03  Tom Tromey  <tom@tromey.com>
8254
8255         * cli/cli-setshow.c (do_set_command): Use std::string.
8256
8257 2017-09-03  Tom Tromey  <tom@tromey.com>
8258
8259         * cli/cli-cmds.c (cd_command): Use gdb::unique_xmalloc_ptr.
8260
8261 2017-09-03  Tom Tromey  <tom@tromey.com>
8262
8263         * mi/mi-interp.c (mi_cmd_interpreter_exec): Use std::string.
8264
8265 2017-09-03  Tom Tromey  <tom@tromey.com>
8266
8267         * mi/mi-cmd-env.c (env_execute_cli_command): Use
8268         gdb::unique_xmalloc_ptr.
8269
8270 2017-09-03  Tom Tromey  <tom@tromey.com>
8271
8272         * thread.c (print_thread_info_1): Use string_printf.
8273         (thread_apply_command, thread_apply_all_command): Use
8274         std::string.
8275
8276 2017-09-03  Tom Tromey  <tom@tromey.com>
8277
8278         * valprint.c (val_print_string): Update.
8279         * gdbcore.h (memory_error_message): Return std::string.
8280         * corefile.c (memory_error_message): Return std::string.
8281         (memory_error): Update.
8282         * breakpoint.c (insert_bp_location): Update.
8283
8284 2017-09-03  Simon Marchi  <simon.marchi@ericsson.com>
8285
8286         * target/waitstatus.h (target_waitstatus_to_string): Change
8287         return type to std::string.
8288         * target/waitstatus.c (target_waitstatus_to_string): Return
8289         std::string.
8290         * target.h (target_waitstatus_to_string): Remove declaration.
8291         * infrun.c (resume, clear_proceed_status_thread,
8292         print_target_wait_results, do_target_wait, save_waitstatus,
8293         stop_all_threads): Adjust.
8294         * record-btrace.c (record_btrace_wait): Adjust.
8295         * target-debug.h
8296         (target_debug_print_struct_target_waitstatus_p): Adjust.
8297
8298 2017-09-01  Jan Kratochvil  <jan.kratochvil@redhat.com>
8299
8300         PR gdb/22046
8301         * nat/linux-procfs.c (parse_proc_status_state): Fix PROC_STATE_STOPPED
8302         detection.
8303
8304 2017-08-31  Sergio Durigan Junior  <sergiodj@redhat.com>
8305
8306         * NEWS (Changes since GDB 8.0): Add entry mentioning new support
8307         for setting/unsetting environment variables on the remote target.
8308         (New remote packets): Add entries for QEnvironmentHexEncoded,
8309         QEnvironmentUnset and QEnvironmentReset.
8310         * common/environ.c (gdb_environ::operator=): Extend method to
8311         handle m_user_set_env_list and m_user_unset_env_list.
8312         (gdb_environ::clear): Likewise.
8313         (match_var_in_string): Change type of first parameter from 'char
8314         *' to 'const char *'.
8315         (gdb_environ::set): Extend method to handle
8316         m_user_set_env_list and m_user_unset_env_list.
8317         (gdb_environ::unset): Likewise.
8318         (gdb_environ::clear_user_set_env): New method.
8319         (gdb_environ::user_set_envp): Likewise.
8320         (gdb_environ::user_unset_envp): Likewise.
8321         * common/environ.h (gdb_environ): Handle m_user_set_env_list and
8322         m_user_unset_env_list on move constructor/assignment.
8323         (unset): Add new default parameter 'update_unset_list = true'.
8324         (clear_user_set_env): New method.
8325         (user_set_envp): Likewise.
8326         (user_unset_envp): Likewise.
8327         (m_user_set_env_list): New std::set.
8328         (m_user_unset_env_list): Likewise.
8329         * common/rsp-low.c (hex2str): New function.
8330         (bin2hex): New overload for bin2hex function.
8331         * common/rsp-low.c (hex2str): New prototype.
8332         (str2hex): New overload prototype.
8333         * remote.c: Include "environ.h". Add QEnvironmentHexEncoded,
8334         QEnvironmentUnset and QEnvironmentReset.
8335         (remote_protocol_features): Add QEnvironmentHexEncoded,
8336         QEnvironmentUnset and QEnvironmentReset packets.
8337         (send_environment_packet): New function.
8338         (extended_remote_environment_support): Likewise.
8339         (extended_remote_create_inferior): Call
8340         extended_remote_environment_support.
8341         (_initialize_remote): Add QEnvironmentHexEncoded,
8342         QEnvironmentUnset and QEnvironmentReset packet configs.
8343         * unittests/environ-selftests.c (gdb_selftest_env_var):
8344         New variable.
8345         (test_vector_initialization): New function.
8346         (test_init_from_host_environ): Likewise.
8347         (test_reinit_from_host_environ): Likewise.
8348         (test_set_A_unset_B_unset_A_cannot_find_A_can_find_B):
8349         Likewise.
8350         (test_unset_set_empty_vector): Likewise.
8351         (test_vector_clear): Likewise.
8352         (test_std_move): Likewise.
8353         (test_move_constructor):
8354         (test_self_move): Likewise.
8355         (test_set_unset_reset): Likewise.
8356         (run_tests): Rewrite in terms of the functions above.
8357
8358 2017-08-31  Weimin Pan  <weimin.pan@oracle.com>
8359
8360         * sparc64-tdep.c (adi_stat_t): Fix comment formatting.
8361         (adi_available): Use a temp variable of type CORE_ADDR as argument
8362         3 when calling target_auxv_search.
8363         (adi_normalize_address): Use masks and xor operators to calculate
8364         normalized address.
8365         (adi_read_versions, adi_write_versions, adi_print_versions)
8366         (do_examine, do_assign): Use paddress.
8367
8368 2017-08-29  John Baldwin  <jhb@FreeBSD.org>
8369
8370         * mips-fbsd-nat.c (getfpregs_supplies): Return true for FIR.
8371         * mips-fbsd-tdep.c (mips_fbsd_supply_fpregs): Split supply of FSR
8372         out of loop and add supply of FIR.
8373         (mips_fbsd_collect_fpregs): Split collect of FSR out of loop and
8374         add collect of FIR.
8375
8376 2017-08-28  Simon Marchi  <simon.marchi@ericsson.com>
8377
8378         PR gdb/21827
8379         * cli/cli-script.c (define_command): Don't convert command name
8380         to lower case.
8381
8382 2017-08-25  Joel Brobecker  <brobecker@adacore.com>
8383
8384         * ada-lang.c (ada_lookup_struct_elt_type): Remove parameter "dispp".
8385         Update all callers accordingly. Remove all code blocks handling
8386         the case where DISPP is not NULL.
8387
8388 2017-08-24  Jan Kratochvil  <jan.kratochvil@redhat.com>
8389
8390         PR symtab/22003
8391         * dwarf2read.c (dwarf2_const_value_attr, dump_die_shallow)
8392         (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
8393         (skip_form_bytes, attr_form_is_constant): Handle DW_FORM_implicit_const.
8394
8395 2017-08-24  Jan Kratochvil  <jan.kratochvil@redhat.com>
8396
8397         * dwarf2read.c (build_type_psymtabs_reader): New prototype.
8398         (process_psymtab_comp_unit): Accept IS_DEBUG_TYPES.
8399         (read_comp_units_from_section): New parameter abbrev_section, use
8400         read_and_check_comp_unit_head, allocate signatured_type if needed.
8401         (create_all_comp_units): Update read_comp_units_from_section caller.
8402
8403 2017-08-23  Pedro Alves  <palves@redhat.com>
8404
8405         PR remote/21852
8406         * remote.c (add_current_inferior_and_thread): Set inferior_ptid
8407         to null_ptid and switch to thread without reading the registers
8408         after adding the inferior.
8409
8410 2017-08-23  Jan Kratochvil  <jan.kratochvil@redhat.com>
8411
8412         * NEWS (Changes since GDB 8.0): Add set compile-gcc and show
8413         compile-gcc.
8414         * compile/compile.c (compile_gcc, show_compile_gcc): New.
8415         (compile_to_object): Implement compile_gcc.
8416         (_initialize_compile): Install "set compile-gcc".  Initialize
8417         compile_gcc.
8418
8419 2017-08-23  Jan Kratochvil  <jan.kratochvil@redhat.com>
8420
8421         * compile/compile.c (compile_to_object): Conditionally call
8422         set_verbose.  Conditionally call compile or compile_v0.
8423
8424 2017-08-07  Weimin Pan  <weimin.pan@oracle.com>
8425
8426         * sparc64-tdep.h: (adi_normalize_address): New export.
8427         * sparc-nat.h: (open_adi_tag_fd): New export.
8428         * sparc64-linux-nat.c: (open_adi_tag_fd): New function.
8429         * sparc64-linux-tdep.c:
8430         (SEGV_ACCADI, SEGV_ADIDERR, SEGV_ADIPERR) New defines.
8431         (sparc64_linux_handle_segmentation_fault): New function.
8432         (sparc64_linux_init_abi): Register
8433         sparc64_linux_handle_segmentation_fault
8434         * sparc64-tdep.c: Include cli-utils.h,gdbcmd.h,auxv.h.
8435         (sparc64_addr_bits_remove): New function.
8436         (sparc64_init_abi): Register sparc64_addr_bits_remove.
8437         (MAX_PROC_NAME_SIZE): New macro.
8438         (AT_ADI_BLKSZ, AT_ADI_NBITS, AT_ADI_UEONADI) New defines.
8439         (sparc64adilist): New variable.
8440         (adi_proc_list): New variable.
8441         (find_adi_info): New function.
8442         (add_adi_info): New function.
8443         (get_adi_info_proc): New function.
8444         (get_adi_info): New function.
8445         (info_adi_command): New function.
8446         (read_maps_entry): New function.
8447         (adi_available): New function.
8448         (adi_normalize_address): New function.
8449         (adi_align_address): New function.
8450         (adi_convert_byte_count): New function.
8451         (adi_tag_fd): New function.
8452         (adi_is_addr_mapped): New function.
8453         (adi_read_versions): New function.
8454         (adi_write_versions): New function.
8455         (adi_print_versions): New function.
8456         (do_examine): New function.
8457         (do_assign): New function.
8458         (adi_examine_command): New function.
8459         (adi_assign_command): New function.
8460         (_initialize_sparc64_adi_tdep): New function.
8461
8462 2017-08-22  Simon Marchi  <simon.marchi@ericsson.com>
8463
8464         * breakpoint.c (breakpoints_info): Rename to ...
8465         (info_breakpoints_command): ... this.
8466         (watchpoints_info): Rename to ...
8467         (info_watchpoints_command): ... this.
8468         (tracepoints_info): Rename to ...
8469         (info_tracepoints_command): ... this.
8470         (_initialize_breakpoint): Adjust.
8471         * dcache.c (dcache_info): Rename to ...
8472         (info_display_command): ... this.
8473         (_initialize_dcache): Adjust.
8474         * frame.h (args_info): Rename to ...
8475         (info_args_command): ... this.
8476         (locals_info): Rename to ...
8477         (info_locals_command): ... this.
8478         * infcmd.c (nofp_registers_info): Rename to ...
8479         (info_registers_command): ... this.
8480         (float_info): Rename to ...
8481         (info_float_command): ... this.
8482         (program_info): Rename to ...
8483         (info_program_command): ... this.
8484         (all_registers_info): Rename to ...
8485         (info_all_registers_command): ... this.
8486         (vector_info): Rename to ...
8487         (info_vector_command): ... this.
8488         (float_info): Rename to ...
8489         (info_float_command): ... this.
8490         (_initialize_infcmd): Adjust.
8491         * inferior.h (term_info): Rename to ...
8492         (info_terminal_command): ... this.
8493         * inflow.c (term_info): Rename to ...
8494         (info_terminal_command): ... this.
8495         (_initialize_inflow): Adjust.
8496         * infrun.c (signals_info): Rename to ...
8497         (info_signals_command): ... this.
8498         (_initialize_infrun): Adjust.
8499         * objc-lang.c (classes_info): Rename to ...
8500         (info_classes_command): ... this.
8501         (selectors_info): Rename to ...
8502         (info_selectors_command): ... this.
8503         (_initialize_objc_language): Adjust.
8504         * printcmd.c (sym_info): Rename to ...
8505         (info_symbol_command): ... this.
8506         (address_info): Rename to ...
8507         (info_address_command): ... this.
8508         (display_info): Rename to ...
8509         (info_display_command): ... this.
8510         (_initialize_printcmd): Adjust.
8511         * reverse.c (bookmarks_info): Rename to ...
8512         (info_breakpoints_command): ... this.
8513         (_initialize_reverse): Adjust.
8514         * ser-go32.c (dos_info): Rename to ...
8515         (info_serial_command): ... this.
8516         (_initialize_ser_dos): Adjust.
8517         * skip.c (skip_info): Rename to ...
8518         (info_skip_command): ... this.
8519         (_initialize_step_skip): Adjust.
8520         * source.c (line_info): Rename to ...
8521         (info_line_command): ... this.
8522         (source_info): Rename to ...
8523         (info_source_command)
8524         * stack.c (frame_info): Rename to ...
8525         (info_frame_command): ... this.
8526         (locals_info): Rename to ...
8527         (info_locals_command): ... this.
8528         (args_info): Rename to ...
8529         (info_args_command): ... this.
8530         (_initialize_stack): Adjust.
8531         * symtab.c (sources_info): Rename to ...
8532         (info_sources_command): ... this.
8533         (variables_info): Rename to ...
8534         (info_variables_command): ... this.
8535         (functions_info): Rename to ...
8536         (info_functions_command): ... this.
8537         (types_info): Rename to ...
8538         (info_types_command): ... this.
8539         (_initialize_symtab): Adjust.
8540         * target.c (target_info): Rename to ...
8541         (info_target_command): ... this.
8542         (initialize_targets): Adjust.
8543         * tracepoint.c (tvariables_info): Rename to ...
8544         (info_tvariables_command): ... this.
8545         (scope_info): Rename to ...
8546         (info_scope_command): ... this.
8547         (trace_dump_actions): Adjust.
8548         (_initialize_tracepoint): Adjust.
8549
8550 2017-08-22  Tom Tromey  <tom@tromey.com>
8551
8552         * breakpoint.h (install_breakpoint): Update.
8553         * breakpoint.c (add_solib_catchpoint): Update.
8554         (install_breakpoint): Change argument to a std::unique_ptr.
8555         (create_fork_vfork_event_catchpoint): Use std::unique_ptr.
8556         (create_breakpoint_sal, create_breakpoint): Update.
8557         (watch_command_1, catch_exec_command_1)
8558         (strace_marker_create_breakpoints_sal): Use std::unique_ptr.
8559         (add_to_breakpoint_chain): Change argument to a std::unique_ptr.
8560         Return the breakpoint.
8561         (set_raw_breakpoint_without_location, set_raw_breakpoint)
8562         (new_single_step_breakpoint): Update.
8563         * break-catch-throw.c (handle_gnu_v3_exceptions): Use
8564         std::unique_ptr.
8565         * break-catch-syscall.c (create_syscall_event_catchpoint): Use
8566         std::unique_ptr.
8567         * break-catch-sig.c (create_signal_catchpoint): Use
8568         std::unique_ptr.
8569         * ada-lang.c (create_ada_exception_catchpoint): Use
8570         std::unique_ptr.
8571
8572 2017-08-22  Tom Tromey  <tom@tromey.com>
8573
8574         * breakpoint.c (add_solib_catchpoint): Use std::unique_ptr.
8575
8576 2017-08-22  Tom Tromey  <tom@tromey.com>
8577
8578         * psymtab.c (psymtab_search_name): Return a unique_xmalloc_ptr.
8579         (lookup_partial_symbol): Update.
8580
8581 2017-08-22  Tom Tromey  <tom@tromey.com>
8582
8583         * source.h (rewrite_source_path): Return a unique_xmalloc_ptr.
8584         * source.c (rewrite_source_path): Return a unique_xmalloc_ptr.
8585         (find_and_open_source, symtab_to_fullname): Update.
8586         * psymtab.c (psymtab_to_fullname): Update.
8587
8588 2017-08-22  Tom Tromey  <tom@tromey.com>
8589
8590         * exec.c (exec_file_attach): Update.
8591         * linux-thread-db.c (try_thread_db_load): Update.
8592         * guile/scm-safe-call.c (gdbscm_safe_source_script): Update.
8593         * utils.c (gdb_realpath): Change return type.
8594         (gdb_realpath_keepfile): Update.
8595         (gdb_realpath_check_trailer, gdb_realpath_tests): New functions.
8596         (_initialize_utils): Register the new self test.
8597         * source.c (openp): Update.
8598         (find_and_open_source): Update.
8599         * nto-tdep.c (nto_find_and_open_solib): Update.
8600         * main.c (set_gdb_data_directory): Update.
8601         (captured_main_1): Update.
8602         * dwarf2read.c (dwarf2_get_dwz_file): Update
8603         (dw2_map_symbol_filenames): Update.
8604         * auto-load.c (auto_load_safe_path_vec_update): Update.
8605         (filename_is_in_auto_load_safe_path_vec): Change type of
8606         "filename_realp".
8607         (auto_load_objfile_script): Update.
8608         (file_is_auto_load_safe): Update.  Use std::string.
8609         * utils.h (gdb_realpath): Return a gdb::unique_xmalloc_ptr.
8610
8611 2017-08-22  Tom Tromey  <tom@tromey.com>
8612
8613         * utils.c (gdb_realpath_keepfile): Return a
8614         gdb::unique_xmalloc_ptr.
8615         * exec.c (exec_file_attach): Update.
8616         * utils.h (gdb_realpath_keepfile): Return a
8617         gdb::unique_xmalloc_ptr.
8618
8619 2017-08-22  Tom Tromey  <tom@tromey.com>
8620
8621         * compile/compile.c (compile_file_command): Use
8622         gdb::unique_xmalloc_ptr, std::string.
8623         * utils.c (gdb_abspath): Change return type.
8624         * source.c (openp): Update.
8625         * objfiles.c (allocate_objfile): Update.
8626         * main.c (set_gdb_data_directory): Update.
8627         * utils.h (gdb_abspath): Return a gdb::unique_xmalloc_ptr.
8628
8629 2017-08-22  Zhouyi Zhou  <zhouzhouyi@gmail.com>
8630
8631         * cli-cmds.c (list_commands): List actual code around more than
8632         one location.
8633
8634 2017-08-21  John Baldwin  <jhb@FreeBSD.org>
8635
8636         * fbsd-nat.c (fbsd_add_threads): Use array type for `lwps'.
8637
8638 2017-08-21  Pedro Alves  <palves@redhat.com>
8639
8640         PR gdb/19487
8641         * c-exp.y (variable production): Handle function aliases.
8642         * minsyms.c (msymbol_is_text): New function.
8643         * minsyms.h (msymbol_is_text): Declare.
8644         * symtab.c (find_function_alias_target): New function.
8645         * symtab.h (find_function_alias_target): Declare.
8646
8647 2017-08-21  Pedro Alves  <palves@redhat.com>
8648
8649         * eval.c (evaluate_subexp_standard) <OP_TYPE>: Don't dig past
8650         typedefs.
8651         * typeprint.c (whatis_exp): If handling "whatis", and expression
8652         is OP_TYPE, strip one typedef level.  Otherwise don't strip
8653         typedefs here.
8654         * valops.c (value_cast): Save "to" type before resolving
8655         stubs/typedefs.  Use that type as resulting value's type.
8656
8657 2017-08-18  Tom Tromey  <tom@tromey.com>
8658             Pedro Alves  <palves@redhat.com>
8659
8660         * spu-multiarch.c (parse_spufs_run): Use scoped_restore.
8661         * sol-thread.c (sol_thread_resume, sol_thread_wait)
8662         (sol_thread_xfer_partial, rw_common): Use scoped_restore.
8663         * procfs.c (procfs_do_thread_registers): Use scoped_restore.
8664         * proc-service.c (ps_xfer_memory): Use scoped_restore.
8665         * linux-tdep.c (linux_corefile_thread): Remove a cleanup.
8666         (linux_get_siginfo_data): Add "thread" argument.  Use
8667         scoped_restore.
8668         * linux-nat.c (linux_child_follow_fork)
8669         (check_stopped_by_watchpoint): Use scoped_restore.
8670         * infrun.c (displaced_step_prepare_throw, write_memory_ptid)
8671         (THREAD_STOPPED_BY, handle_signal_stop): Use scoped_restore.
8672         (restore_inferior_ptid, save_inferior_ptid): Remove.
8673         * btrace.c (btrace_fetch): Use scoped_restore.
8674         * bsd-uthread.c (bsd_uthread_fetch_registers)
8675         (bsd_uthread_store_registers): Use scoped_restore.
8676         * breakpoint.c (reattach_breakpoints, detach_breakpoints): Use
8677         scoped_restore.
8678         * aix-thread.c (aix_thread_resume, aix_thread_wait)
8679         (aix_thread_xfer_partial): Use scoped_restore.
8680         * inferior.h (save_inferior_ptid): Remove.
8681
8682 2017-08-18  Yao Qi  <yao.qi@linaro.org>
8683
8684         PR tdep/21818
8685         * arm-tdep.c (gdb_print_insn_arm): Mark
8686         USER_SPECIFIED_MACHINE_TYPE if exec_bfd isn't NULL.
8687
8688 2017-08-18  Yao Qi  <yao.qi@linaro.org>
8689
8690         * NEWS: Mention GDBserver's new option "--selftest".
8691         * Makefile.in (SFILES): Remove selftest.c, add common/selftest.c.
8692         * selftest.c: Move it to common/selftest.c.
8693         * selftest.h: Move it to common/selftest.h.
8694         * selftest-arch.c (reset): New function.
8695         (tests_with_arch): Call reset.
8696
8697 2017-08-18  Yao Qi  <yao.qi@linaro.org>
8698
8699         * selftest.c (run_tests): Don't call QUIT.  Call debug_printf
8700         instead of exception_fprintf and printf_filtered.
8701
8702 2017-08-18  Yao Qi  <yao.qi@linaro.org>
8703
8704         * selftest.c (register_self_test): Rename it to
8705         selftests::register_test.
8706         (run_self_tests): selftest::run_tests.
8707         * selftest.h: Update declarations.
8708         * selftest-arch.c (register_self_test_foreach_arch): Rename it to
8709         selftests::register_test_foreach_arch.
8710         * selftest-arch.h: Update declaration.
8711         * aarch64-tdep.c: Update.
8712         * arm-tdep.c: Likewise.
8713         * disasm-selftests.c: Likewise.
8714         * dwarf2loc.c: Likewise.
8715         * dwarf2-frame.c: Likewise.
8716         * findvar.c: Likewise.
8717         * gdbarch-selftests.c: Likewise.
8718         * maint.c (maintenance_selftest): Likewise.
8719         * regcache.c: Likewise.
8720         * rust-exp.y: Likewise.
8721         * selftest-arch.c: Likewise.
8722         * unittests/environ-selftests.c: Likewise.
8723         * unittests/function-view-selftests.c: Likewise.
8724         * unittests/offset-type-selftests.c: Likewise.
8725         * unittests/optional-selftests.c: Likewise.
8726         * unittests/scoped_restore-selftests.c: Likewise.
8727         * utils-selftests.c: Likewise.
8728
8729 2017-08-17  Pedro Alves  <palves@redhat.com>
8730
8731         * cli/cli-cmds.c (source_command): Delete 'old_source_verbose'
8732         local.
8733
8734 2017-08-17  Pedro Alves  <palves@redhat.com>
8735
8736         * dwarf2read.c (struct dwarf2_cu) <line_header_die_owner>: New
8737         field.
8738         (reset_die_in_process): Delete, replaced by ...
8739         (process_die_scope): ... this new class.  Make it responsible for
8740         freeing cu->line_header too.
8741         (process_die): Use process_die_scope.
8742         (handle_DW_AT_stmt_list): Record the line header's owner CU/DIE in
8743         cu->line_header_die_owner.  Don't release the line header if it's
8744         owned by the CU.
8745         (setup_type_unit_groups): Make the CU/DIE own the line header.
8746         Don't release the line header here.
8747
8748 2017-08-17  Alex Lindsay  <alexlindsay239@gmail.com>  (tiny change)
8749
8750         * elfread.c (elf_read_minimal_symbols): xfree synthsyms.
8751
8752 2017-08-17  Ruslan Kabatsayev  <b7.10110111@gmail.com>
8753
8754         * NEWS: Mention new shortcuts for nexti and stepi in TUI
8755         Single-Key mode
8756
8757 2017-08-16  Ruslan Kabatsayev  <b7.10110111@gmail.com>
8758
8759         * tui/tui.c (tui_commands): Add "nexti" and "stepi" to the Single-Key
8760         mode command list.
8761
8762 2017-08-15  Stafford Horne  <shorne@gmail.com>
8763
8764         * MAINTAINERS (Write After Approval): Add Stafford Horne.
8765
8766 2017-08-15  Stafford Horne  <shorne@gmail.com>
8767
8768         * xtensa-tdep.c (xtensa_init_reggroups): Use xstrdup for cpname.
8769
8770 2017-08-15  Sergio Durigan Junior  <sergiodj@redhat.com>
8771
8772         PR gdb/21954
8773         * infcmd.c (unset_environment_command): Use the 'clear' method on
8774         the environment instead of resetting it.
8775
8776 2017-08-15  John Baldwin  <jhb@FreeBSD.org>
8777
8778         * fbsd-nat.c (fbsd_convert_siginfo): Fix compile on big-endian
8779         platforms.
8780
8781 2017-08-14  Tom Tromey  <tom@tromey.com>
8782
8783         * valprint.c (print_octal_chars): Use HOST_CHAR_BIT.
8784         (print_binary_chars): Likewise.
8785         (BITS_IN_BYTES): Remove.
8786
8787 2017-08-14  Tom Tromey  <tom@tromey.com>
8788
8789         PR gdb/21675
8790         * valprint.c (LOW_ZERO): Change value to 034.
8791         (print_octal_chars): Add static_asserts for octal constants.
8792         * printcmd.c (print_scalar_formatted): Add 'd' case.
8793
8794 2017-08-11  Tom Tromey  <tom@tromey.com>
8795
8796         * symfile.c (add_symbol_file_command): Use std::vector.
8797
8798 2017-08-14  Tom Tromey  <tom@tromey.com>
8799
8800         * break-catch-throw.c (handle_gnu_v3_exceptions): Use std::move.
8801         * break-catch-syscall.c (create_syscall_event_catchpoint): Use
8802         std::move.
8803         * break-catch-sig.c (create_signal_catchpoint): Use std::move.
8804
8805 2017-08-11  Pedro Alves  <palves@redhat.com>
8806
8807         * infrun.c (process_event_stop_test): Adjust
8808         function_name_is_marked_for_skip call.
8809         * skip.c: Include <list>.
8810         (skiplist_entry): Make it a class with private fields, and
8811         getters/setters.
8812         (skiplist_entry_chain): Delete.
8813         (skiplist_entries): New.
8814         (skiplist_entry_count): Delete.
8815         (highest_skiplist_entry_num): New.
8816         (ALL_SKIPLIST_ENTRIES, ALL_SKIPLIST_ENTRIES_SAFE): Delete.
8817         (add_skiplist_entry): Delete.
8818         (skiplist_entry::skiplist_entry): New.
8819         (skiplist_entry::add_entry): New.
8820         (skip_file_command, skip_function): Adjust.
8821         (compile_skip_regexp): Delete.
8822         (skip_command): Don't compile regexp here.  Adjust to use
8823         skiplist_entry::add_entry.
8824         (skip_info): Adjust to use range-for and getters.
8825         (skip_enable_command, skip_disable_command): Adjust to use
8826         range-for and setters.
8827         (skip_delete_command): Adjust to use std::list.
8828         (add_skiplist_entry): Delete.
8829         (skip_file_p): Delete, refactored as ...
8830         (skiplist_entry::do_skip_file_p): ... this new method.
8831         (skip_gfile_p): Delete, refactored as ...
8832         (skiplist_entry::do_gskip_file_p): ... this new method.
8833         (skip_function_p, skip_rfunction_p): Delete, refactored as ...
8834         (skiplist_entry::skip_function_p): ... this new method.
8835         (function_name_is_marked_for_skip): Now returns bool, and takes
8836         the function sal by const reference.  Adjust to use range-for and
8837         skiplist_entry methods.
8838         (_initialize_step_skip): Remove references to
8839         skiplist_entry_chain, skiplist_entry_count.
8840         * skip.h (function_name_is_marked_for_skip): Now returns bool, and
8841         takes the function sal by const reference.
8842
8843 2017-08-11  Yao Qi  <yao.qi@linaro.org>
8844
8845         * dwarf2-frame.c (clear_pointer_cleanup): Remove.
8846         (dwarf2_frame_cache): Remove reset_cache_cleanup.
8847         (dwarf2_frame_cache):
8848         * frame-unwind.c (frame_unwind_try_unwinder): Catch
8849         RETURN_MASK_ALL and set *this_case to NULL.
8850         * frame-unwind.h: Update comments.
8851
8852 2017-08-11  Yao Qi  <yao.qi@linaro.org>
8853
8854         * dwarf2-frame.c (dwarf2_frame_state_alloc_regs): Remove.
8855         (dwarf2_frame_state_copy_regs): Remove.
8856         (dwarf2_frame_state_free_regs): Remove.
8857         (dwarf2_frame_state::~dwarf2_frame_state): Remove.
8858         (dwarf2_restore_rule): Call method .alloc_regs instead of
8859         dwarf2_frame_state_alloc_regs.
8860         (execute_cfa_program): Likewise.  Call dwarf2_frame_state_reg_info
8861         constructor.  Call std::move.
8862         (dwarf2_fetch_cfa_info): Don't call dwarf2_frame_state_copy_regs.
8863         (dwarf2_frame_cache): Likewise.
8864
8865         [GDB_SELF_TEST]: Include selftest.h and
8866         selftest-arch.h.
8867         [GDB_SELF_TEST] (execute_cfa_program_test): New function.
8868         (_initialize_dwarf2_frame) [GDB_SELF_TEST]: Register
8869         execute_cfa_program_test.
8870
8871         * dwarf2-frame.h (dwarf2_frame_state_reg_info): Add ctor, dtor,
8872         copy ctor, assignment operator, move assignment.
8873         <alloc_regs>: New method.
8874         <swap>: New method.
8875         (struct dwarf2_frame_state): Delete dtor.
8876         (dwarf2_frame_state_alloc_regs): Remove declaration.
8877         * sparc-tdep.c (sparc_execute_dwarf_cfa_vendor_op): Don't call
8878         dwarf2_frame_state_alloc_regs, use .alloc_regs instead.
8879
8880 2017-08-11  Yao Qi  <yao.qi@linaro.org>
8881
8882         * dwarf2-frame.c (dwarf2_frame_state_free): Remove.
8883         (dwarf2_frame_state::dwarf2_frame_state): New.
8884         (dwarf2_frame_state::~dwarf2_frame_state): New.
8885         (dwarf2_fetch_cfa_info): Update.
8886         (dwarf2_frame_cache): Remove old_chain.  Change 'fs' to an object
8887         rather than a pointer.  Update code.
8888         * dwarf2-frame.h (struct dwarf2_frame_state): Declare ctor and
8889         dtor.
8890         <data_align, code_align, retaddr_column>: Change them to const.
8891         <armcc_cfa_offsets_sf, armcc_cfa_offsets_reversed>: Change them
8892         to bool.
8893
8894 2017-08-11  Yao Qi  <yao.qi@linaro.org>
8895
8896         * dwarf2-frame.h (struct dwarf2_frame_state_reg) <exp_len>: Remove.
8897         <loc.exp>: New field.
8898         * dwarf2-frame.c (execute_cfa_program): Update.
8899         (dwarf2_frame_prev_register): Update.
8900
8901 2017-08-10  Pedro Alves  <palves@redhat.com>
8902
8903         * common/gdb_unique_ptr.h (xfree_deleter<T[]>): Define.
8904
8905 2017-08-09  John Baldwin  <jhb@FreeBSD.org>
8906
8907         * fbsd-nat.c (struct fbsd_fork_info): Remove.
8908         (fbsd_pending_children): Use std::list.
8909         (fbsd_remember_child): Likewise.
8910         (fbsd_is_child_pending): Likewise.
8911         (fbsd_pending_vfork_done): Use std::forward_list.
8912         (fbsd_add_vfork_done): Likewise.
8913         (fbsd_is_vfork_done_pending): Likewise.
8914         (fbsd_next_vfork_done): Likewise.
8915
8916 2017-08-09  John Baldwin  <jhb@FreeBSD.org>
8917
8918         * fbsd-nat.c [HAVE_KINFO_GETVMMAP] (struct free_deleter): New.
8919         (fbsd_find_memory_regions): Use free_deleter with std::unique_ptr.
8920         [!HAVE_KINFO_GETVMMAP] (fbsd_find_memory_regions): Use std::string
8921         for `mapfilename'.
8922         (fbsd_xfer_partial): Use gdb::byte_vector.
8923         (fbsd_add_threads): Use gdb::unique_xmalloc_ptr.
8924
8925 2017-08-09  John Baldwin  <jhb@FreeBSD.org>
8926
8927         * fbsd-nat.c: [!HAVE_KINFO_GETVMMAP]: Include <sys/user.h> and
8928         "filestuff.h".
8929         (fbsd_find_memory_regions): Fix `mapfile' initialization.
8930
8931 2017-08-09  Tom Tromey  <tom@tromey.com>
8932
8933         * skip.c (skiplist_entry): New constructor.
8934         (skiplist_entry::enabled, skiplist_entry::function_is_regexp)
8935         (skiplist_entry::file_is_glob): Now bool.
8936         (skiplist_entry::file, skiplist_entry::function): Now
8937         std::string.
8938         (make_skip_entry): Return a unique_ptr.  Use new.
8939         (free_skiplist_entry, free_skiplist_entry_cleanup)
8940         (make_free_skiplist_entry_cleanup): Remove.
8941         (skip_command, skip_disable_command, add_skiplist_entry)
8942         (skip_form_bytes, compile_skip_regexp, skip_command, skip_info)
8943         (skip_file_p, skip_gfile_p, skip_function_p, skip_rfunction_p)
8944         (function_name_is_marked_for_skip): Update.
8945         (skip_delete_command): Update.  Use delete.
8946
8947 2017-08-09  Jiong Wang  <jiong.wang@arm.com>
8948
8949         * aarch64-linux-tdep.c: Include "auxv.h" and "elf/common.h".
8950         (aarch64_linux_core_read_description): New function.
8951         (aarch64_linux_init_abi): Register gdbarch_core_read_description.
8952
8953 2017-08-09  Pedro Alves  <palves@redhat.com>
8954
8955         * cp-name-parser.y (cp_comp_to_string): Return a
8956         gdb::unique_xmalloc_ptr<char>.
8957         * cp-support.c (replace_typedefs_qualified_name)
8958         (replace_typedefs): Adjust to use gdb::unique_xmalloc_ptr<char>.
8959         (cp_canonicalize_string_full): Use op= instead of explicit
8960         convertion.
8961         (cp_class_name_from_physname, method_name_from_physname)
8962         (cp_func_name, cp_remove_params): Adjust to use
8963         gdb::unique_xmalloc_ptr<char>.
8964         * cp-support.h (cp_comp_to_string): Return a
8965         gdb::unique_xmalloc_ptr<char>.
8966         * python/py-type.c (typy_lookup_type): Adjust to use
8967         gdb::unique_xmalloc_ptr<char>.
8968
8969 2017-08-09  H.J. Lu  <hongjiu.lu@intel.com>
8970
8971         * dwarf2read.c (dwarf2_string_attr): Fix a typo.
8972
8973 2017-08-09  Alex Lindsay  <alexlindsay239@gmail.com>
8974             Yao Qi  <yao.qi@linaro.org>
8975
8976         * cp-support.c (cp_canonicalize_string_full): Use
8977         gdb::unique_xmalloc_ptr<char>.
8978         (cp_canonicalize_string): Likewise.
8979
8980 2017-08-09  Yao Qi  <yao.qi@linaro.org>
8981
8982         * features/Makefile (WHICH): Remove i386/ non-linux stuff.
8983         * regformats/i386/amd64-avx-avx512.dat: Remove.
8984         * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Remove.
8985         * regformats/i386/amd64-avx-mpx.dat:Remove.
8986         * regformats/i386/amd64-avx.dat: Remove.
8987         * regformats/i386/amd64-mpx.dat: Remove.
8988         * regformats/i386/i386-avx-avx512.dat: Remove.
8989         * regformats/i386/i386-avx-mpx-avx512-pku.dat: Remove.
8990         * regformats/i386/i386-avx-mpx.dat: Remove.
8991         * regformats/i386/i386-mmx.dat: Remove.
8992         * regformats/i386/i386-mpx.dat: Remove.
8993
8994 2017-08-09  Yao Qi  <yao.qi@linaro.org>
8995
8996         * amd64-tdep.h (tdesc_x32): Remove the declaration.
8997         * amd64-tdep.c: Don't include features/i386/x32*.c.
8998         (_initialize_amd64_tdep): Don't call initialize_tdesc_x32*
8999         functions.
9000         * features/Makefile (WHICH): Remove i386/x32, i386/x32-avx,
9001         and i386/x32-avx-avx512.
9002         (XMLTOC): Remove i386/x32-avx.xml, i386/x32-avx-avx512.xml,
9003         and i386/x32.xml.
9004         * features/i386/x32-avx-avx512.c: Removed.
9005         * features/i386/x32-avx-avx512.xml: Removed.
9006         * features/i386/x32-avx.c: Removed.
9007         * features/i386/x32-avx.xml: Removed.
9008         * features/i386/x32.c: Removed.
9009         * features/i386/x32.xml: Removed.
9010         * regformats/i386/x32-avx-avx512.dat: Removed.
9011         * regformats/i386/x32-avx.dat: Removed.
9012         * regformats/i386/x32.dat: Removed.
9013
9014 2017-08-07  Maciej W. Rozycki  <macro@imgtec.com>
9015
9016         PR breakpoints/21886
9017         * mem-break.c (default_memory_insert_breakpoint): Use
9018         `->placed_address' rather than `->reqstd_address' for the
9019         breakpoint location.
9020
9021 2017-08-07  Maciej W. Rozycki  <macro@imgtec.com>
9022
9023         * arch-utils.c (default_print_insn): Remove arch/mach/endian
9024         assertions.
9025
9026 2017-08-07  Maciej W. Rozycki  <macro@imgtec.com>
9027
9028         * gdbarch.sh (gdbarch_info): Replace the `tdep_info' member with
9029         a union of `tdep_info', `tdesc_data' and `id'.
9030         * aarch64-tdep.c (aarch64_gdbarch_init): Use `info.tdesc_data'
9031         rather than `info.tdep_info'.
9032         * amd64-linux-tdep.c (amd64_linux_init_abi): Likewise.
9033         * i386-linux-tdep.c (i386_linux_init_abi): Likewise.
9034         * i386-tdep.c (i386_gdbarch_init): Likewise.
9035         * mips-linux-tdep.c (mips_linux_init_abi): Likewise.
9036         * mips-tdep.c (mips_gdbarch_init): Likewise.
9037         * nds32-tdep.c (nds32_gdbarch_init): Likewise.
9038         * rs6000-tdep.c (rs6000_gdbarch_init): Likewise.
9039         * ppc-linux-tdep.c (ppu2spu_sniffer): Use `info.id' rather than
9040         `info.tdep_info'.
9041         (ppc_linux_init_abi): Use `info.tdesc_data' rather than
9042         `info.tdep_info'.
9043         * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
9044         * spu-multiarch.c (spu_gdbarch): Use `info.id' rather than
9045         `info.tdep_info'.
9046         * spu-tdep.c (spu_gdbarch_init): Likewise.
9047         * gdbarch.h: Regenerate.
9048
9049 2017-08-07  Leszek Swirski  <leszeks@google.com>
9050
9051         PR symtab/20899
9052         * dwarf2read.c (dwarf2_string_attr): Allow DW_FORM_GNU_strp_alt.
9053
9054 2017-08-07  Simon Marchi  <simon.marchi@ericsson.com>
9055
9056         * remote-sim.c (gdbsim_load): Remove char **argv local variable.
9057         (gdbsim_open): Rename gdb_argv args object to argv.
9058
9059 2017-08-05  Tom Tromey  <tom@tromey.com>
9060
9061         * compile/compile-object-load.c (compile_object_load): Use
9062         gdb::unique_xmalloc_ptr.
9063         * cli/cli-dump.c (scan_filename): Rename from
9064         scan_filename_with_cleanup.  Change return type.
9065         (scan_expression): Rename from scan_expression_with_cleanup.
9066         Change return type.
9067         (dump_memory_to_file, dump_value_to_file, restore_command):
9068         Use gdb::unique_xmalloc_ptr.  Update.
9069         * cli/cli-cmds.c (find_and_open_script): Use
9070         gdb::unique_xmalloc_ptr.
9071         * tracefile-tfile.c (tfile_open): Use gdb::unique_xmalloc_ptr.
9072         * symmisc.c (maintenance_print_symbols)
9073         (maintenance_print_msymbols): Use gdb::unique_xmalloc_ptr.
9074         * symfile.c (symfile_bfd_open, generic_load)
9075         (add_symbol_file_command, remove_symbol_file_command): Use
9076         gdb::unique_xmalloc_ptr.
9077         * source.c (openp): Use gdb::unique_xmalloc_ptr.
9078         * psymtab.c (maintenance_print_psymbols): Use
9079         gdb::unique_xmalloc_ptr.
9080         * corelow.c (core_open): Use gdb::unique_xmalloc_ptr.
9081         * breakpoint.c (save_breakpoints): Use gdb::unique_xmalloc_ptr.
9082         * solib.c (solib_map_sections): Use gdb::unique_xmalloc_ptr.
9083         (reload_shared_libraries_1): Likewise.
9084
9085 2017-08-05  Tom Tromey  <tom@tromey.com>
9086
9087         * rust-exp.y (rust_op_ptr, set_field): Remove typedefs.
9088         (rust_op_vector, rust_set_vector): New typedefs.
9089         (current_parser): New global.
9090         (work_obstack): Change to pointer type.  Update all users.
9091         (rust_ast, pstate): Remove globals.
9092         (struct rust_parser): New.
9093         (%union) <params, field_inits>: Change type.
9094         (start, tuple_expr, unit_expr, struct_expr_list, literal)
9095         (field_expr, expr_list, maybe_expr_list, type_list): Update.
9096         (ast_call_ish, ast_path, ast_function_type, ast_tuple_type)
9097         (convert_params_to_types, convert_params_to_expression): Change
9098         type of "params".
9099         (ast_string): Change type of "fields".
9100         (rust_parse): Make a rust_parser.  Remove cleanups.
9101         (rust_lex_tests): Make and install an auto_obstack.
9102
9103 2017-08-04  Yao Qi  <yao.qi@linaro.org>
9104
9105         * configure.srv (ipa_x32_linux_regobj): New.
9106         * linux-amd64-ipa.c (get_ipa_tdesc): Use X86_TDESC_AVX_AVX512
9107         instead of X86_TDESC_AVX512.
9108         (initialize_low_tracepoint): Call
9109         init_registers_x32_avx_avx512_linux.
9110
9111 2017-08-04  Yao Qi  <yao.qi@linaro.org>
9112
9113         * utils.h (gdb_argv): Add namespace std for nullptr_t.
9114
9115 2017-08-03  Ruslan Kabatsayev  <b7.10110111@gmail.com>
9116
9117         * MAINTAINERS (Write After Approval): Add Ruslan Kabatsayev.
9118
9119 2017-08-03  Tom Tromey  <tom@tromey.com>
9120
9121         * utils.c (make_cleanup_freeargv, do_freeargv, gdb_buildargv):
9122         Remove.
9123         * utils.h (make_cleanup_freeargv, gdb_buildargv): Remove.
9124
9125 2017-08-03  Tom Tromey  <tom@tromey.com>
9126
9127         * python/py-param.c (compute_enum_values): Use gdb_argv.
9128
9129 2017-08-03  Tom Tromey  <tom@tromey.com>
9130
9131         * utils.h (struct gdb_argv_deleter): New.
9132         (gdb_argv): New class.
9133         * utils.c (gdb_argv::reset): New method.
9134         * tracepoint.c (delete_trace_variable_command): Use gdb_argv.
9135         * tracefile.c (tsave_command): Use gdb_argv.
9136         * top.c (new_ui_command): Use gdb_argv.
9137         * symmisc.c (maintenance_print_symbols)
9138         (maintenance_print_msymbols, maintenance_expand_symtabs): Use gdb_argv.
9139         * symfile.c (symbol_file_command, generic_load)
9140         (remove_symbol_file_command): Use gdb_argv.
9141         * stack.c (backtrace_command): Use gdb_argv.
9142         * source.c (add_path, show_substitute_path_command)
9143         (unset_substitute_path_command, set_substitute_path_command):
9144         Use gdb_argv.
9145         * skip.c (skip_command): Use gdb_argv.  Use gdb_buildargv.
9146         * ser-mingw.c (pipe_windows_open): Use gdb_argv.
9147         * remote.c (extended_remote_run, remote_put_command)
9148         (remote_get_command, remote_delete_command): Use gdb_argv.
9149         * remote-sim.c (gdbsim_load, gdbsim_create_inferior)
9150         (gdbsim_open): Use gdb_argv.
9151         * python/py-cmd.c (gdbpy_string_to_argv): Use gdb_argv.
9152         * psymtab.c (maintenance_print_psymbols): Use gdb_argv.
9153         * procfs.c (procfs_info_proc): Use gdb_argv.
9154         * interps.c (interpreter_exec_cmd): Use gdb_argv.
9155         * infrun.c (handle_command): Use gdb_argv.
9156         * inferior.c (add_inferior_command, clone_inferior_command):
9157         Use gdb_argv.
9158         * guile/scm-string.c (gdbscm_string_to_argv): Use gdb_argv.
9159         * exec.c (exec_file_command): Use gdb_argv.
9160         * cli/cli-cmds.c (alias_command): Use gdb_argv.
9161         * compile/compile.c (build_argc_argv): Use gdb_argv.
9162
9163 2017-08-03  Tom Tromey  <tom@tromey.com>
9164
9165         * python/python.c (gdbpy_decode_line): Use unique_xmalloc_ptr.
9166
9167 2017-08-03  Tom Tromey  <tom@tromey.com>
9168
9169         * python/python.c (compute_python_string): Return std::string.
9170         (gdbpy_eval_from_control_command): Update.
9171         (do_start_initialization): Use std::string.
9172         * python/py-varobj.c (py_varobj_iter_next): Use string_printf, not
9173         xstrprintf.
9174         * python/py-breakpoint.c (local_setattro): Use string_printf, not
9175         xstrprintf.
9176
9177 2017-08-03  Tom Tromey  <tom@tromey.com>
9178
9179         * top.h (do_restore_instream_cleanup): Remove.
9180         * top.c (do_restore_instream_cleanup): Remove.
9181         (read_command_file): Use scoped_restore.
9182         * cli/cli-script.c (execute_user_command): Use scoped_restore.
9183
9184 2017-08-03  Tom Tromey  <tom@tromey.com>
9185
9186         * cli/cli-script.c (execute_user_command)
9187         (execute_control_command): Use scoped_restore.
9188
9189 2017-08-03  Tom Tromey  <tom@tromey.com>
9190
9191         * cli/cli-script.c (do_restore_user_call_depth): Remove.
9192         (execute_user_command): Remove user_call_depth; use
9193         user_args_stack's size instead.
9194
9195 2017-08-03  Tom Tromey  <tom@tromey.com>
9196
9197         * top.h (in_user_command): Remove.
9198         * top.c (in_user_command): Remove.
9199         * cli/cli-script.c (do_restore_user_call_depth)
9200         (execute_user_command): Update.
9201
9202 2017-08-03  Tom Tromey  <tom@tromey.com>
9203
9204         * valops.c (search_struct_method): Use gdb::byte_vector.
9205         * valarith.c (value_concat): Use std::vector.
9206         * target.c (memory_xfer_partial): Use gdb::byte_vector.
9207         (simple_search_memory): Likewise.
9208         * printcmd.c (find_string_backward): Use gdb::byte_vector.
9209         * mi/mi-main.c (mi_cmd_data_write_memory): Use gdb::byte_vector.
9210         * gcore.c (gcore_copy_callback): Use gdb::byte_vector.
9211         * elfread.c (elf_rel_plt_read): Use std::string.
9212         * cp-valprint.c (cp_print_value): Use gdb::byte_vector.
9213         * cli/cli-dump.c (restore_section_callback): Use
9214         gdb::byte_vector.
9215
9216 2017-08-03  Tom Tromey  <tom@tromey.com>
9217
9218         * jit.c (jit_reader_load_command): Use unique_xmalloc_ptr.
9219
9220 2017-08-03  Tom Tromey  <tom@tromey.com>
9221
9222         * tui/tui-regs.c (tui_restore_gdbout): Remove.
9223         (tui_register_format): Use scoped_restore.
9224
9225 2017-08-03  Tom Tromey  <tom@tromey.com>
9226
9227         * reverse.c (exec_direction_default): Remove.
9228         (exec_reverse_once): Use scoped_restore.
9229         * remote.c (restore_remote_timeout): Remove.
9230         (remote_flash_erase, remote_flash_write, remote_flash_done)
9231         (readchar, remote_serial_write): Use scoped_restore.
9232         * cli/cli-script.c (struct source_cleanup_lines_args)
9233         (source_cleanup_lines): Remove.
9234         (script_from_file): Use scoped_restore.
9235         * cli/cli-cmds.c (source_verbose_cleanup): Remove.
9236         (source_command): Use scoped_restore.
9237
9238 2017-08-03  Tom Tromey  <tom@tromey.com>
9239
9240         * utils.h (make_cleanup_free_so): Remove.
9241         * utils.c (do_free_so, make_cleanup_free_so): Remove.
9242         * solist.h (struct so_deleter): New.
9243         (so_list_up): New typedef.
9244         * solib-svr4.c (svr4_read_so_list): Use so_list_up.
9245
9246 2017-08-03  Tom Tromey  <tom@tromey.com>
9247
9248         * utils.h (make_cleanup_restore_current_language): Remove.
9249         * utils.c (do_restore_current_language)
9250         (make_cleanup_restore_current_language): Remove.
9251         * parse.c (parse_exp_in_context_1)
9252         (parse_expression_with_language): Use
9253         scoped_restore_current_language.
9254         * mi/mi-main.c (mi_cmd_execute): Use
9255         scoped_restore_current_language.
9256         * language.h (scoped_restore_current_language): New class.
9257
9258 2017-08-03  Tom Tromey  <tom@tromey.com>
9259
9260         * compile/compile.c (cleanup_unlink_file): Remove.
9261         (compile_to_object): Use gdb::unlinker.
9262         (eval_compile_command): Likewise.
9263
9264 2017-08-03  Tom Tromey  <tom@tromey.com>
9265
9266         * utils.h (make_cleanup_fclose): Remove.
9267         * utils.c (do_fclose_cleanup, make_cleanup_fclose): Remove.
9268
9269 2017-08-03  Tom Tromey  <tom@tromey.com>
9270
9271         * top.c (open_terminal_stream): Return gdb_file_up.
9272         (new_ui_command): Update.
9273
9274 2017-08-03  Tom Tromey  <tom@tromey.com>
9275
9276         * source.c (print_source_lines_base, forward_search_command)
9277         (reverse_search_command): Use gdb_file_up.
9278
9279 2017-08-03  Tom Tromey  <tom@tromey.com>
9280
9281         * fbsd-nat.c (fbsd_find_memory_regions): Update.
9282
9283 2017-08-03  Tom Tromey  <tom@tromey.com>
9284
9285         * cli/cli-cmds.c (find_and_open_script): Change return type.
9286         Remove "streamp" and "full_path" parameters.
9287         (source_script_with_search): Update.
9288         * auto-load.c (source_script_file): Update.
9289         * cli/cli-cmds.h (find_and_open_script): Change type.
9290         (open_script): New struct.
9291
9292 2017-08-03  Tom Tromey  <tom@tromey.com>
9293
9294         * xml-support.c (xml_fetch_content_from_file): Update.
9295         * ui-file.c (stdio_file::open): Update.
9296         * tracefile-tfile.c (tfile_start): Update.
9297         * remote.c (remote_file_put, remote_file_get): Update.
9298         * nat/linux-procfs.c (linux_proc_get_int)
9299         (linux_proc_pid_get_state, linux_proc_tid_get_name): Update.
9300         * nat/linux-osdata.c (linux_common_core_of_thread): Update.
9301         (command_from_pid, commandline_from_pid, linux_xfer_osdata_cpus)
9302         (print_sockets, linux_xfer_osdata_shm, linux_xfer_osdata_sem)
9303         (linux_xfer_osdata_msg, linux_xfer_osdata_modules): Update.
9304         * nat/linux-btrace.c (linux_determine_kernel_start): Update.
9305         * linux-nat.c (linux_proc_pending_signals): Update.
9306         * dwarf2read.c (write_psymtabs_to_index): Use gdb_file_up.
9307         (file_closer): Remove.
9308         * compile/compile.c (compile_to_object): Update.
9309         * common/filestuff.h (struct gdb_file_deleter): New.
9310         (gdb_file_up): New typedef.
9311         (gdb_fopen_cloexec): Change return type.
9312         * common/filestuff.c (gdb_fopen_cloexec): Return gdb_file_up.
9313         * cli/cli-dump.c (fopen_with_cleanup): Remove.
9314         (dump_binary_file, restore_binary_file): Update.
9315         * auto-load.c (auto_load_objfile_script_1): Update.
9316
9317 2017-08-03  Tom Tromey  <tom@tromey.com>
9318
9319         * tracepoint.c (tvariables_info_1): Use ui_out_emit_table.
9320         (info_static_tracepoint_markers_command): Likewise.
9321         * solib.c (info_sharedlibrary_command): Use ui_out_emit_table.
9322         * skip.c (skip_info): Use ui_out_emit_table.
9323         * progspace.c (print_program_space): Use ui_out_emit_table.
9324         * osdata.c (info_osdata): Use ui_out_emit_table.
9325         * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions): Use
9326         ui_out_emit_table.
9327         * linux-thread-db.c (info_auto_load_libthread_db): Use
9328         ui_out_emit_table.
9329         * inferior.c (print_inferior): Use ui_out_emit_table.
9330         * gdb_bfd.c (maintenance_info_bfds): Use ui_out_emit_table.
9331         * breakpoint.c (breakpoint_1): Use ui_out_emit_table.
9332         * auto-load.c (auto_load_info_scripts): Use ui_out_emit_table.
9333         * ada-tasks.c (print_ada_task_info): Use ui_out_emit_table.
9334         * ui-out.h (class ui_out_emit_table): New.
9335
9336 2017-08-02  Maciej W. Rozycki  <macro@imgtec.com>
9337
9338         * mips-tdep.c (mips_fpu_type_str): New function.
9339         (mips_dump_tdep): Call it.
9340
9341 2017-08-01  Maciej W. Rozycki  <macro@imgtec.com>
9342
9343         * mips-tdep.c (mips_gdbarch_init): Use MIPS_FPU_TYPE to access
9344         `->mips_fpu_type'.
9345
9346 2017-07-31  Xavier Roirand  <roirand@adacore.com>
9347
9348         * solib-darwin.c (DYLD_VERSION_MAX): Increase value.
9349
9350 2017-07-27  Xavier Roirand  <roirand@adacore.com>
9351
9352         * MAINTAINERS (Write After Approval): Add Xavier Roirand.
9353
9354 2017-07-26  Yao Qi  <yao.qi@linaro.org>
9355
9356         * cli/cli-cmds.c (maintenancechecklist): New variable.
9357         * gdbcmd.h (maintenancechecklist): Declare it.
9358         * i386-linux-tdep.c (_initialize_i386_linux_tdep) [GDB_SELF_TEST]:
9359         Call i386_linux_read_description with different masks.
9360         * maint.c (maintenance_check_command): New function.
9361         (_initialize_maint_cmds): Call add_prefix_cmd.
9362         * target-descriptions.c (tdesc_reg): override operator != and ==.
9363         (tdesc_type): Likewise.
9364         (tdesc_feature): Likewise.
9365         (target_desc): Likewise.
9366         [GDB_SELF_TEST] (selftests::record_xml_tdesc): New function.
9367         (maintenance_check_xml_descriptions): New function.
9368         (_initialize_target_descriptions) Add command "xml-descriptions".
9369         * target-descriptions.h (selftests::record_xml_tdesc): Declare.
9370
9371 2017-07-26  Yao Qi  <yao.qi@linaro.org>
9372
9373         * i386-linux-tdep.c: Don't include features/i386/i386-*linux.c.
9374         Include features/i386/32bit-*.c.
9375         (i386_linux_read_description): Generate target description if it
9376         doesn't exist.
9377         (_initialize_i386_linux_tdep): Don't call _initialize_tdesc_i386
9378         functions.
9379         * features/i386/32bit-linux.c: Re-generated.
9380         * features/i386/32bit-sse.c: Likewise.
9381         * target-descriptions.c (print_c_feature::visit): Print code to
9382         set register number if needed.
9383         (print_c_feature) <m_next_regnum>: New field.
9384
9385 2017-07-26  Yao Qi  <yao.qi@linaro.org>
9386
9387         * features/Makefile (CFILES): Rename with TDESC_CFILES.
9388         (FEATURE_XMLFILES): New.
9389         (FEATURE_CFILES): New.
9390         New rules.
9391         (clean-cfiles): Remove generated c files.
9392         * features/i386/32bit-avx.c: Generated.
9393         * features/i386/32bit-avx512.c: Generated.
9394         * features/i386/32bit-core.c: Generated.
9395         * features/i386/32bit-linux.c: Generated.
9396         * features/i386/32bit-mpx.c: Generated.
9397         * features/i386/32bit-pkeys.c: Generated.
9398         * features/i386/32bit-sse.c: Generated.
9399         * target-descriptions.c: Include algorithm.
9400         (tdesc_element_visitor): Add method visit_end.
9401         (print_c_tdesc): Implement visit_end.
9402         (print_c_tdesc:: m_filename_after_features): Move it to
9403         protected.
9404         (print_c_feature): New class.
9405         (maint_print_c_tdesc_cmd): Use print_c_feature if XML file
9406         name starts with "i386/32bit-".
9407
9408 2017-07-26  Yao Qi  <yao.qi@linaro.org>
9409
9410         * target-descriptions.c (tdesc_element_visitor): New class.
9411         (tdesc_element): New class.
9412         (tdesc_reg): Inherit from tdesc_element.
9413         (tdesc_reg::accept): New function.
9414         (tdesc_type): Inherit from tdesc_element.
9415         (tdesc_type::accept): New function.
9416         (tdesc_feature): Inherit from tdesc_element.
9417         (tdesc_feature::accept): New function.
9418         (target_desc): Inherit from tdesc_element.
9419         (target_desc::target_desc): New.
9420         (target_desc::~target_desc): New.
9421         (target_desc::accept): New.
9422         (allocate_target_description): Use new.
9423         (free_target_description): Use delete.
9424         (print_c_tdesc): New class.
9425         (maint_print_c_tdesc_cmd): Adjust.
9426
9427         * features/aarch64.c: Re-generated.
9428         * features/arc-arcompact.c: Re-generated.
9429         * features/arc-v2.c: Re-generated.
9430         * features/arm/arm-with-iwmmxt.c: Re-generated.
9431         * features/arm/arm-with-m.c: Re-generated.
9432         * features/arm/arm-with-m-fpa-layout.c: Re-generated.
9433         * features/arm/arm-with-m-vfp-d16.c: Re-generated.
9434         * features/arm/arm-with-neon.c: Re-generated.
9435         * features/arm/arm-with-vfpv2.c: Re-generated.
9436         * features/arm/arm-with-vfpv3.c: Re-generated.
9437         * features/i386/amd64-avx-avx512.c: Re-generated.
9438         * features/i386/amd64-avx-avx512-linux.c: Re-generated.
9439         * features/i386/amd64-avx.c: Re-generated.
9440         * features/i386/amd64-avx-linux.c: Re-generated.
9441         * features/i386/amd64-avx-mpx-avx512-pku.c: Re-generated.
9442         * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Re-generated.
9443         * features/i386/amd64-avx-mpx.c: Re-generated.
9444         * features/i386/amd64-avx-mpx-linux.c: Re-generated.
9445         * features/i386/amd64.c: Re-generated.
9446         * features/i386/amd64-linux.c: Re-generated.
9447         * features/i386/amd64-mpx.c: Re-generated.
9448         * features/i386/amd64-mpx-linux.c: Re-generated.
9449         * features/i386/i386-avx-avx512.c: Re-generated.
9450         * features/i386/i386-avx-avx512-linux.c: Re-generated.
9451         * features/i386/i386-avx.c: Re-generated.
9452         * features/i386/i386-avx-linux.c: Re-generated.
9453         * features/i386/i386-avx-mpx-avx512-pku.c: Re-generated.
9454         * features/i386/i386-avx-mpx-avx512-pku-linux.c: Re-generated.
9455         * features/i386/i386-avx-mpx.c: Re-generated.
9456         * features/i386/i386-avx-mpx-linux.c: Re-generated.
9457         * features/i386/i386.c: Re-generated.
9458         * features/i386/i386-linux.c: Re-generated.
9459         * features/i386/i386-mmx.c: Re-generated.
9460         * features/i386/i386-mmx-linux.c: Re-generated.
9461         * features/i386/i386-mpx.c: Re-generated.
9462         * features/i386/i386-mpx-linux.c: Re-generated.
9463         * features/i386/x32-avx-avx512.c: Re-generated.
9464         * features/i386/x32-avx-avx512-linux.c: Re-generated.
9465         * features/i386/x32-avx.c: Re-generated.
9466         * features/i386/x32-avx-linux.c: Re-generated.
9467         * features/i386/x32.c: Re-generated.
9468         * features/i386/x32-linux.c: Re-generated.
9469         * features/microblaze.c: Re-generated.
9470         * features/microblaze-with-stack-protect.c: Re-generated.
9471         * features/mips64-dsp-linux.c: Re-generated.
9472         * features/mips64-linux.c: Re-generated.
9473         * features/mips-dsp-linux.c: Re-generated.
9474         * features/mips-linux.c: Re-generated.
9475         * features/nds32.c: Re-generated.
9476         * features/nios2.c: Re-generated.
9477         * features/nios2-linux.c: Re-generated.
9478         * features/rs6000/powerpc-32.c: Re-generated.
9479         * features/rs6000/powerpc-32l.c: Re-generated.
9480         * features/rs6000/powerpc-403.c: Re-generated.
9481         * features/rs6000/powerpc-403gc.c : Re-generated.
9482         * features/rs6000/powerpc-405.c: Re-generated.
9483         * features/rs6000/powerpc-505.c: Re-generated.
9484         * features/rs6000/powerpc-601.c: Re-generated.
9485         * features/rs6000/powerpc-602.c: Re-generated.
9486         * features/rs6000/powerpc-603.c: Re-generated.
9487         * features/rs6000/powerpc-604.c: Re-generated.
9488         * features/rs6000/powerpc-64.c: Re-generated.
9489         * features/rs6000/powerpc-64l.c: Re-generated.
9490         * features/rs6000/powerpc-7400.c: Re-generated.
9491         * features/rs6000/powerpc-750.c: Re-generated.
9492         * features/rs6000/powerpc-860.c: Re-generated.
9493         * features/rs6000/powerpc-altivec32.c: Re-generated.
9494         * features/rs6000/powerpc-altivec32l.c: Re-generated.
9495         * features/rs6000/powerpc-altivec64.c: Re-generated.
9496         * features/rs6000/powerpc-altivec64l.c: Re-generated.
9497         * features/rs6000/powerpc-cell32l.c: Re-generated.
9498         * features/rs6000/powerpc-cell64l.c: Re-generated.
9499         * features/rs6000/powerpc-e500.c: Re-generated.
9500         * features/rs6000/powerpc-e500l.c: Re-generated.
9501         * features/rs6000/powerpc-isa205-32l.c: Re-generated.
9502         * features/rs6000/powerpc-isa205-64l.c: Re-generated.
9503         * features/rs6000/powerpc-isa205-altivec32l.c: Re-generated.
9504         * features/rs6000/powerpc-isa205-altivec64l.c: Re-generated.
9505         * features/rs6000/powerpc-isa205-vsx32l.c: Re-generated.
9506         * features/rs6000/powerpc-isa205-vsx64l.c: Re-generated.
9507         * features/rs6000/powerpc-vsx32.c: Re-generated.
9508         * features/rs6000/powerpc-vsx32l.c: Re-generated.
9509         * features/rs6000/powerpc-vsx64.c: Re-generated.
9510         * features/rs6000/powerpc-vsx64l.c: Re-generated.
9511         * features/rs6000/rs6000.c: Re-generated.
9512         * features/s390-linux32.c: Re-generated.
9513         * features/s390-linux32v1.c: Re-generated.
9514         * features/s390-linux32v2.c: Re-generated.
9515         * features/s390-linux64.c: Re-generated.
9516         * features/s390-linux64v1.c: Re-generated.
9517         * features/s390-linux64v2.c: Re-generated.
9518         * features/s390-te-linux64.c: Re-generated.
9519         * features/s390-tevx-linux64.c: Re-generated.
9520         * features/s390-vx-linux64.c: Re-generated.
9521         * features/s390x-linux64.c: Re-generated.
9522         * features/s390x-linux64v1.c: Re-generated.
9523         * features/s390x-linux64v2.c: Re-generated.
9524         * features/s390x-te-linux64.c: Re-generated.
9525         * features/s390x-tevx-linux64.c: Re-generated.
9526         * features/s390x-vx-linux64.c: Re-generated.
9527         * features/sparc/sparc32-solaris.c: Re-generated.
9528         * features/sparc/sparc64-solaris.c: Re-generated.
9529         * features/tic6x-c62x.c: Re-generated.
9530         * features/tic6x-c62x-linux.c: Re-generated.
9531         * features/tic6x-c64x.c: Re-generated.
9532         * features/tic6x-c64x-linux.c: Re-generated.
9533         * features/tic6x-c64xp.c: Re-generated.
9534         * features/tic6x-c64xp-linux.c: Re-generated.
9535
9536 2017-07-26  Yao Qi  <yao.qi@linaro.org>
9537
9538         * i386-linux-tdep.c (i386_linux_read_description): New function.
9539         (i386_linux_core_read_description): Call
9540         i386_linux_read_description.
9541         * i386-linux-tdep.h (i386_linux_read_description): Declare.
9542         (tdesc_i386_linux, tdesc_i386_mmx_linux): Remove declarations.
9543         (tdesc_i386_avx_linux, tdesc_i386_mpx_linux): Likewise
9544         (tdesc_i386_avx_mpx_linux, tdesc_i386_avx_avx512_linux): Likewise.
9545         (tdesc_i386_avx_mpx_avx512_pku_linux): Likewise.
9546         * x86-linux-nat.c (x86_linux_read_description): Call
9547         i386_linux_read_description.
9548
9549 2017-07-26  Yao Qi  <yao.qi@linaro.org>
9550
9551         * NEWS: Mention it.
9552         * features/Makefile (%.c: %.xml): Pass the xml file name to
9553         command "maint print c-tdesc".
9554         * target-descriptions.c (maint_print_c_tdesc_cmd): Get file
9555         name from 'arg'.
9556
9557 2017-07-26  Yao Qi  <yao.qi@linaro.org>
9558
9559         * target-descriptions.c (target_desc): Add ctor and dtor.  Do
9560         in-class initialization.
9561         (tdesc_create_feature): Call new instead of XCNEW.
9562         (free_target_description): Ue delete.
9563
9564 2017-07-25  John Baldwin  <jhb@FreeBSD.org>
9565
9566         * configure.nat: Add "-lkvm" for NetBSD/sparc64 and fix typo.
9567
9568 2017-07-25  Yao Qi  <yao.qi@linaro.org>
9569
9570         * amd64-tdep.c (amd64_init_abi): Make argument default_tdesc
9571         constant.
9572         (amd64_x32_init_abi): Likewise.
9573         * amd64-tdep.h (amd64_init_abi): Update declaration.
9574         (amd64_x32_init_abi): Likewise.
9575
9576 2017-07-25  Yao Qi  <yao.qi@linaro.org>
9577
9578         PR tdep/21717
9579         * arm-linux-nat.c (arm_linux_fetch_inferior_registers): Update
9580         condition for FPSCR.
9581         (arm_linux_store_inferior_registers): Likewise.
9582
9583 2017-07-22  Tom Tromey  <tom@tromey.com>
9584
9585         * break-catch-syscall.c (struct catch_syscall_inferior_data)
9586         <syscalls_counts>: Now a std::vector.
9587         (get_catch_syscall_inferior_data): Use "new".
9588         (catch_syscall_inferior_data_cleanup): Use "delete".
9589         (insert_catch_syscall, remove_catch_syscall)
9590         (clear_syscall_counts): Update.
9591
9592 2017-07-22  Tom Tromey  <tom@tromey.com>
9593
9594         * break-catch-syscall.c (syscall_catchpoint)
9595         <syscalls_to_be_caught>: Now a std::vector<int>
9596         (~syscall_catchpoint): Remove.
9597         (insert_catch_syscall, remove_catch_syscall)
9598         (breakpoint_hit_catch_syscall, print_one_catch_syscall)
9599         (print_mention_catch_syscall, print_recreate_catch_syscall):
9600         Update.
9601         (create_syscall_event_catchpoint): Change type of "filter"
9602         parameter.
9603         (catch_syscall_split_args): Return a std::vector.
9604         (catch_syscall_command_1, catching_syscall_number_1): Update.
9605
9606 2017-07-22  Tom Tromey  <tom@tromey.com>
9607
9608         * break-catch-throw.c (struct exception_catchpoint)
9609         <exception_rx>: Now a std::string.
9610         (~exception_catchpoint): Remove.
9611         (print_one_detail_exception_catchpoint): Update.
9612         (handle_gnu_v3_exceptions): Change type of except_rx.
9613         (extract_exception_regexp): Return a std::string.
9614         (catch_exception_command_1): Update.
9615
9616 2017-07-22  Tom Tromey  <tom@tromey.com>
9617
9618         * break-catch-sig.c (gdb_signal_type): Remove typedef.
9619         (struct signal_catchpoint) <signals_to_be_caught>: Now a
9620         std::vector.
9621         <catch_all>: Now a bool.
9622         (~signal_catchpoint): Remove.
9623         (signal_catchpoint_insert_location)
9624         (signal_catchpoint_remove_location)
9625         (signal_catchpoint_breakpoint_hit, signal_catchpoint_print_one)
9626         (signal_catchpoint_print_mention)
9627         (signal_catchpoint_print_recreate)
9628         (signal_catchpoint_explains_signal): Update.
9629         (create_signal_catchpoint): Change type of "filter" and
9630         "catch_all".
9631         (catch_signal_split_args): Return a std::vector.  Change type of
9632         "catch_all".
9633         (catch_signal_command): Update.
9634
9635 2017-07-20  Pedro Alves  <palves@redhat.com>
9636
9637         * ada-lang.c (ada_language_defn): Make extern.
9638         (_initialize_ada_language): Remove add_language call.
9639         * c-lang.c (c_language_defn, cplus_language_defn)
9640         (asm_language_defn, minimal_language_defn): Make extern.
9641         (_initialize_c_language): Delete.
9642         * completer.c (compare_cstrings): Delete, moved to utils.h.
9643         * d-lang.c (d_language_defn): Make extern.
9644         (_initialize_d_language): Remove add_language calls.
9645         * defs.h (enum language): Add comment.
9646         * f-lang.c (f_language_defn): Make extern.
9647         (_initialize_f_language): Remove add_language call.
9648         * go-lang.c (go_language_defn): Make extern.
9649         (_initialize_go_language): Remove add_language call.
9650         * language.c: Include <algorithm>.
9651         (languages): Redefine as const array.
9652         (languages_size, languages_allocsize, DEFAULT_ALLOCSIZE): Delete.
9653         (set_language_command): Handle "local".  Use for-range loop.
9654         (set_language): Remove loop.
9655         (language_enum): Rewrite.
9656         (language_def, language_str): Remove loops.
9657         (add_language): Delete.
9658         (add_set_language_command): New, based on add_languages.
9659         (skip_language_trampoline): Adjust.
9660         (local_language_defn): Delete.
9661         (language_gdbarch_post_init): Adjust.
9662         (_initialize_language): Remove add_language calls.  Call
9663         add_set_language_command.
9664         * language.h (add_language): Delete.
9665         (auto_language_defn)
9666         (unknown_language_defn, minimal_language_defn, ada_language_defn)
9667         (asm_language_defn, c_language_defn, cplus_language_defn)
9668         (d_language_defn, f_language_defn, go_language_defn)
9669         (m2_language_defn, objc_language_defn, opencl_language_defn)
9670         (pascal_language_defn, rust_language_defn): Declare.
9671         * m2-lang.c (m2_language_defn): Make extern.
9672         (_initialize_m2_language): Remove add_language call.
9673         * objc-lang.c (objc_language_defn): Make extern.
9674         (_initialize_objc_language): Remove add_language call.
9675         * opencl-lang.c (opencl_language_defn): Make extern.
9676         (_initialize_opencl_language): Remove add_language call.
9677         * p-lang.c (pascal_language_defn): Make extern.
9678         (_initialize_pascal_language): Delete.
9679         * rust-lang.c (rust_language_defn): Make extern.
9680         (_initialize_rust_language): Delete.
9681         * utils.h (compare_cstrings): New static inline function.
9682
9683 2017-07-20  Pedro Alves  <palves@redhat.com>
9684
9685         * ada-lang.c (ada_to_fixed_type_1): Adjust.
9686         (get_var_value): Constify parameters.
9687         (get_int_var_value): Change prototype.
9688         (to_fixed_range_type): Adjust.
9689         * ada-lang.h (get_int_var_value): Change prototype.
9690
9691 2017-07-20  Pedro Alves  <palves@redhat.com>
9692
9693         * dwarf2read.c (dw2_lookup_symbol): Use
9694         SYMBOL_MATCHES_SEARCH_NAME.
9695         * psymtab.c (psym_lookup_symbol): Use SYMBOL_MATCHES_SEARCH_NAME.
9696
9697 2017-07-20  Pedro Alves  <palves@redhat.com>
9698
9699         * block.c (block_iter_name_step, block_iter_name_first)
9700         (block_iter_name_next): Delete.
9701         (block_lookup_symbol_primary): Adjust to use
9702         dict_iter_match_first/dict_iter_match_next.
9703         * block.h (block_iter_name_first, block_iter_name_next): Delete
9704         declarations.
9705         (ALL_BLOCK_SYMBOLS_WITH_NAME): Adjust to use
9706         dict_iter_match_first/dict_iter_match_next.
9707
9708 2017-07-20  Pedro Alves  <palves@redhat.com>
9709
9710         * cp-support.c (cp_find_first_component_aux): Add missing case for
9711         end of string.
9712
9713 2017-07-18  David Blaikie  <dblaikie@gmail.com>
9714
9715         * dwarf2read.c (create_cus_hash_table): Re-add lost initialization
9716         of dwo_cu's dwo_file.
9717
9718 2017-07-18  Yao Qi  <yao.qi@linaro.org>
9719
9720         * remote.c (store_registers_using_G): Remove one line comment.
9721
9722 2017-07-18  Yao Qi  <yao.qi@linaro.org>
9723
9724         * regcache.c (regcache_cpy): Simplify it.
9725         (regcache::cpy_no_passthrough): Remove it.
9726         * regcache.h (cpy_no_passthrough): Remove it.
9727         (regcache_dup, regcache_cpy): Update comments.
9728
9729 2017-07-18  Pedro Alves  <palves@redhat.com>
9730
9731         * remote-sim.c (sim_command_completer): Adjust to work with a
9732         completion_tracker instead of a VEC.
9733
9734 2017-07-17  Pedro Alves  <palves@redhat.com>
9735
9736         * completer.c (complete_source_filenames): New function.
9737         (complete_address_and_linespec_locations): New function.
9738         (location_completer): Use complete_address_and_linespec_locations.
9739         (completion_tracker::build_completion_result): Honor the tracker's
9740         request to suppress append.
9741         * completer.h (completion_tracker::suppress_append_ws)
9742         (completion_tracker::set_suppress_append_ws): New methods.
9743         (completion_tracker::m_suppress_append_ws): New field.
9744         (complete_source_filenames): New declaration.
9745         * linespec.c (linespec_complete_what): New.
9746         (struct ls_parser) <complete_what, completion_word,
9747         completion_quote_char, completion_quote_end, completion_tracker>:
9748         New fields.
9749         (string_find_incomplete_keyword_at_end): New.
9750         (linespec_lexer_lex_string): Record quote char.  If in completion
9751         mode, don't throw.
9752         (linespec_lexer_consume_token): Advance the completion word point.
9753         (linespec_lexer_peek_token): Save/restore completion info.
9754         (save_stream_and_consume_token): New.
9755         (set_completion_after_number): New.
9756         (linespec_parse_basic): Set what to complete next depending on
9757         token.  Handle function and label completions specially.
9758         (parse_linespec): Disable objc shortcut in completion mode.  Set
9759         what to complete next depending on token type.  Skip keyword if in
9760         completion mode.
9761         (complete_linespec_component, linespec_complete): New.
9762         * linespec.h (linespec_complete): Declare.
9763
9764 2017-07-17  Pedro Alves  <palves@redhat.com>
9765
9766         * linespec.c (linespec_lexer_lex_string, find_toplevel_char):
9767         Handle 'operator<' / 'operator<<'.
9768
9769 2017-07-17  Pedro Alves  <palves@redhat.com>
9770
9771         * completer.c (collect_explicit_location_matches): Handle
9772         MATCH_LABEL.
9773         (convert_explicit_location_to_linespec): New, factored out from
9774         ...
9775         (convert_explicit_location_to_sals): ... this.
9776         (complete_label): New.
9777         (linespec_complete_label, find_label_symbols_in_block): New.
9778         (find_label_symbols): Add completion_mode parameter and adjust to
9779         call find_label_symbols_in_block.
9780         * linespec.h (linespec_complete_label): Declare.
9781
9782 2017-07-17  Pedro Alves  <palves@redhat.com>
9783
9784         * ada-lang.c (ada_collect_symbol_completion_matches): Add
9785         complete_symbol_mode parameter.
9786         * cli/cli-cmds.c (complete_command): Get the completion result out
9787         of the handle_brkchars tracker if used a custom word point.
9788         * completer.c: Include "linespec.h".
9789         (enum explicit_location_match_type) <MATCH_LINE>: New enumerator.
9790         (advance_to_expression_complete_word_point): New.
9791         (completion_tracker::completes_to_completion_word): New.
9792         (complete_files_symbols): Pass down
9793         complete_symbol_mode::EXPRESSION.
9794         (explicit_options, probe_options): New.
9795         (collect_explicit_location_matches): Complete on the
9796         explictit_loc->foo instead of word.  Use
9797         linespec_complete_function.  Handle MATCH_LINE.  Handle offering
9798         keyword and options completions.
9799         (backup_text_ptr): Delete.
9800         (skip_keyword): New.
9801         (complete_explicit_location): Remove 'word' parameter.  Add
9802         language, quoted_arg_start and quoted_arg_end parameters.
9803         Rewrite, parsing left to right.
9804         (location_completer): Rewrite.
9805         (location_completer_handle_brkchars): New function.
9806         (symbol_completer): Pass down complete_symbol_mode::EXPRESSION.
9807         (enum complete_line_internal_reason): Adjust comments.
9808         (completion_tracker::discard_completions): New.
9809         (completer_handle_brkchars_func_for_completer): Handle
9810         location_completer.
9811         (gdb_custom_word_point_brkchars)
9812         (gdb_org_rl_basic_quote_characters): New.
9813         (gdb_completion_word_break_characters_throw)
9814         (completion_find_completion_word): Handle trackers that use a
9815         custom word point.
9816         (completion_tracker::advance_custom_word_point_by): New.
9817         (completion_tracker::build_completion_result): Don't rely on
9818         readline appending the quote char.
9819         (gdb_rl_attempted_completion_function_throw): Handle trackers that
9820         use a custom word point.
9821         (gdb_rl_attempted_completion_function): Restore
9822         rl_basic_quote_characters.
9823         * completer.h (class completion_tracker): Extend intro comment.
9824         (completion_tracker::set_quote_char)
9825         (completion_tracker::quote_char)
9826         (completion_tracker::set_use_custom_word_point)
9827         (completion_tracker::use_custom_word_point)
9828         (completion_tracker::custom_word_point)
9829         (completion_tracker::set_custom_word_point)
9830         (completion_tracker::advance_custom_word_point_by)
9831         (completion_tracker::completes_to_completion_word)
9832         (completion_tracker::discard_completions): New methods.
9833         (completion_tracker::m_quote_char)
9834         (completion_tracker::m_use_custom_word_point)
9835         (completion_tracker::m_custom_word_point): New fields.
9836         (advance_to_expression_complete_word_point): Declare.
9837         * f-lang.c (f_collect_symbol_completion_matches): Add
9838         complete_symbol_mode parameter.
9839         * language.h (struct language_defn)
9840         <la_collect_symbol_completion_matches>: Add complete_symbol_mode
9841         parameter.
9842         * linespec.c (linespec_keywords): Add NULL terminator.  Make extern.
9843         (linespec_complete_function): New function.
9844         (linespec_lexer_lex_keyword): Adjust.
9845         * linespec.h (linespec_keywords, linespec_complete_function): New
9846         declarations.
9847         * location.c (find_end_quote): New function.
9848         (explicit_location_lex_one): Add explicit_completion_info
9849         parameter.  Save quoting info.  Don't throw if being called for
9850         completion.  Don't handle Ada operators here.
9851         (is_cp_operator, skip_op_false_positives, first_of)
9852         (explicit_location_lex_one_function): New function.
9853         (string_to_explicit_location): Replace 'dont_throw' parameter with
9854         an explicit_completion_info pointer parameter.  Handle it.  Don't
9855         use explicit_location_lex_one to lex function names.  Use
9856         explicit_location_lex_one_function instead.
9857         * location.h (struct explicit_completion_info): New.
9858         (string_to_explicit_location): Replace 'dont_throw' parameter with
9859         an explicit_completion_info pointer parameter.
9860         * symtab.c (default_collect_symbol_completion_matches_break_on):
9861         Add complete_symbol_mode parameter.  Handle LINESPEC mode.
9862         (default_collect_symbol_completion_matches)
9863         (collect_symbol_completion_matches): Add complete_symbol_mode
9864         parameter.
9865         (collect_symbol_completion_matches_type): Pass down
9866         complete_symbol_mode::EXPRESSION.
9867         (collect_file_symbol_completion_matches): Add complete_symbol_mode
9868         parameter.  Handle LINESPEC mode.
9869         * symtab.h (complete_symbol_mode): New.
9870         (default_collect_symbol_completion_matches_break_on)
9871         (default_collect_symbol_completion_matches)
9872         (collect_symbol_completion_matches)
9873         (collect_file_symbol_completion_matches): Add complete_symbol_mode
9874         parameter.
9875
9876 2017-07-17  Pedro Alves  <palves@redhat.com>
9877
9878         * utils.c (enum class strncmp_iw_mode): New.
9879         (strcmp_iw): Rename to ...
9880         (strncmp_iw_with_mode): ... this.  Add string2_len and mode
9881         parameters.  Handle them.
9882         (strncmp_iw): New.
9883         (strcmp_iw): Reimplement as wrapper around strncmp_iw_with_mode.
9884         * utils.h (strncmp_iw): Declare.
9885         (strcmp_iw): Move describing comments here.
9886
9887 2017-07-17  Pedro Alves  <palves@redhat.com>
9888
9889         * c-exp.y (operator_stoken): Use CP_OPERATOR_LEN and
9890         CP_OPERATOR_STR.
9891         * c-typeprint.c (is_type_conversion_operator): Use
9892         CP_OPERATOR_STR.
9893         * cp-support.c (LENGTH_OF_OPERATOR): Delete.
9894         (cp_find_first_component_aux): Use CP_OPERATOR_STR and
9895         CP_OPERATOR_LEN.
9896         * cp-support.h (CP_OPERATOR_STR, CP_OPERATOR_LEN): New.
9897         * gnu-v2-abi.c (gnuv2_is_operator_name): Use CP_OPERATOR_STR.
9898         * gnu-v3-abi.c (gnuv3_is_operator_name): Use CP_OPERATOR_STR.
9899         * linespec.c (linespec_lexer_lex_string): Use CP_OPERATOR_LEN and
9900         CP_OPERATOR_STR.
9901         * location.c: Include "cp-support.h".
9902         (explicit_location_lex_one): Use CP_OPERATOR_LEN and
9903         CP_OPERATOR_STR.
9904         * symtab.c (operator_chars): Use CP_OPERATOR_STR and
9905         CP_OPERATOR_LEN.
9906
9907 2017-07-17  Pedro Alves  <palves@redhat.com>
9908
9909         * cli/cli-cmds.c (complete_command): Use a completion tracker
9910         along with completion_find_completion_word for handle_brkchars
9911         phase.
9912         * completer.c (RL_QF_SINGLE_QUOTE, RL_QF_DOUBLE_QUOTE)
9913         (RL_QF_BACKSLASH, RL_QF_OTHER_QUOTE): New.
9914         (struct gdb_rl_completion_word_info): New.
9915         (gdb_rl_find_completion_word): New.
9916         (completion_find_completion_word): New.
9917         * completer.h (completion_find_completion_word): Declare.
9918
9919 2017-07-17  Pedro Alves  <palves@redhat.com>
9920
9921         * ada-lang.c (symbol_completion_match): Adjust comments.
9922         (symbol_completion_add): Replace vector parameter with
9923         completion_tracker parameter.  Use it.
9924         (ada_make_symbol_completion_list): Rename to...
9925         (ada_collect_symbol_completion_matches): ... this.  Add
9926         completion_tracker parameter and use it.
9927         (ada_language_defn): Adjust.
9928         * break-catch-syscall.c (catch_syscall_completer): Adjust
9929         prototype and work with completion_tracker instead of VEC.
9930         * breakpoint.c (condition_completer): Adjust prototype and work
9931         with completion_tracker instead of VEC.
9932         * c-lang.c (c_language_defn, cplus_language_defn)
9933         (asm_language_defn, minimal_language_defn): Adjust to renames.
9934         * cli/cli-cmds.c (complete_command): Rework using
9935         completion_tracker.  Catch exceptions when completing.
9936         * cli/cli-decode.c (integer_unlimited_completer)
9937         (complete_on_cmdlist, complete_on_enum): Adjust prototype and work
9938         with completion_tracker instead of VEC.
9939         * command.h (struct completion_tracker): Forward declare.
9940         (completer_ftype, completer_handle_brkchars_ftype): Change
9941         types.
9942         (complete_on_cmdlist, complete_on_enum): Adjust.
9943         * completer.c: Include <algorithm>.
9944         (struct gdb_completer_state): New.
9945         (current_completion): New global.
9946         (readline_line_completion_function): Delete.
9947         (noop_completer, filename_completer)
9948         (filename_completer_handle_brkchars, complete_files_symbols)
9949         (linespec_location_completer): Adjust to work with a
9950         completion_tracker instead of a VEC.
9951         (string_or_empty): New.
9952         (collect_explicit_location_matches): Adjust to work with a
9953         completion_tracker instead of a VEC.
9954         (explicit_location_completer): Rename to ...
9955         (complete_explicit_location): ... this and adjust to work with a
9956         completion_tracker instead of a VEC.
9957         (location_completer): Adjust to work with a completion_tracker
9958         instead of a VEC.
9959         (add_struct_fields): Adjust to work with a completion_list instead
9960         of VEC.
9961         (expression_completer): Rename to ...
9962         (complete_expression): ... this and adjust to work with a
9963         completion_tracker instead of a VEC.  Use complete_files_symbols.
9964         (expression_completer): Reimplement on top of complete_expression.
9965         (symbol_completer): Adjust to work with a completion_tracker
9966         instead of a VEC.
9967         (enum complete_line_internal_reason): Add describing comments.
9968         (complete_line_internal_normal_command): Adjust to work with a
9969         completion_tracker instead of a VEC.
9970         (complete_line_internal): Rename to ...
9971         (complete_line_internal_1): ... this and adjust to work with a
9972         completion_tracker instead of a VEC.  Assert TEXT is NULL in the
9973         handle_brkchars phase.
9974         (new_completion_tracker): Delete.
9975         (complete_line_internal): Reimplement as TRY/CATCH wrapper around
9976         complete_line_internal_1.
9977         (free_completion_tracker): Delete.
9978         (INITIAL_COMPLETION_HTAB_SIZE): New.
9979         (completion_tracker::completion_tracker)
9980         (completion_tracker::~completion_tracker): New.
9981         (maybe_add_completion): Delete.
9982         (completion_tracker::maybe_add_completion)
9983         (completion_tracker::add_completion)
9984         (completion_tracker::add_completions): New.
9985         (throw_max_completions_reached_error): Delete.
9986         (complete_line): Adjust to work with a completion_tracker instead
9987         of a VEC.  Don't create a completion_tracker_t or check for max
9988         completions here.
9989         (command_completer, command_completer_handle_brkchars)
9990         (signal_completer, reg_or_group_completer_1)
9991         (reg_or_group_completer, default_completer_handle_brkchars):
9992         Adjust to work with a completion_tracker.
9993         (gdb_completion_word_break_characters_throw): New.
9994         (gdb_completion_word_break_characters): Reimplement.
9995         (line_completion_function): Delete.
9996         (completion_tracker::recompute_lowest_common_denominator)
9997         (expand_preserving_ws)
9998         (completion_tracker::build_completion_result)
9999         (completion_result::completion_result)
10000         (completion_result::completion_result)
10001         (completion_result::~completion_result)
10002         (completion_result::completion_result)
10003         (completion_result::release_match_list, compare_cstrings)
10004         (completion_result::sort_match_list)
10005         (completion_result::reset_match_list)
10006         (gdb_rl_attempted_completion_function_throw)
10007         (gdb_rl_attempted_completion_function): New.
10008         * completer.h (completion_list, struct completion_result)
10009         (class completion_tracker): New.
10010         (complete_line): Add completion_tracker parameter.
10011         (readline_line_completion_function): Delete.
10012         (gdb_rl_attempted_completion_function): New.
10013         (noop_completer, filename_completer, expression_completer)
10014         (location_completer, symbol_completer, command_completer)
10015         (signal_completer, reg_or_group_completer): Update prototypes.
10016         (completion_tracker_t, new_completion_tracker)
10017         (make_cleanup_free_completion_tracker): Delete.
10018         (enum maybe_add_completion_enum): Delete.
10019         (maybe_add_completion): Delete.
10020         (throw_max_completions_reached_error): Delete.
10021         * corefile.c (complete_set_gnutarget): Adjust to work with a
10022         completion_tracker instead of a VEC.
10023         * cp-abi.c (cp_abi_completer): Adjust to work with a
10024         completion_tracker instead of a VEC.
10025         * d-lang.c (d_language_defn): Adjust.
10026         * disasm.c (disassembler_options_completer): Adjust to work with a
10027         completion_tracker instead of a VEC.
10028         * f-lang.c (f_make_symbol_completion_list): Rename to ...
10029         (f_collect_symbol_completion_matches): ... this.  Adjust to work
10030         with a completion_tracker instead of a VEC.
10031         (f_language_defn): Adjust.
10032         * go-lang.c (go_language_defn): Adjust.
10033         * guile/scm-cmd.c (cmdscm_add_completion, cmdscm_completer):
10034         Adjust to work with a completion_tracker instead of a VEC.
10035         * infrun.c (handle_completer): Likewise.
10036         * interps.c (interpreter_completer): Likewise.
10037         * interps.h (interpreter_completer): Likewise.
10038         * language.c (unknown_language_defn, auto_language_defn)
10039         (local_language_defn): Adjust.
10040         * language.h (language_defn::la_make_symbol_completion_list):
10041         Rename to ...
10042         (language_defn::la_collect_symbol_completion_matches): ... this
10043         and adjust to work with a completion_tracker instead of a VEC.
10044         * m2-lang.c (m2_language_defn): Adjust.
10045         * objc-lang.c (objc_language_defn): Adjust.
10046         * opencl-lang.c (opencl_language_defn): Adjust.
10047         * p-lang.c (pascal_language_defn): Adjust.
10048         * python/py-cmd.c (cmdpy_completer_helper): Handle NULL word.
10049         (cmdpy_completer_handle_brkchars, cmdpy_completer): Adjust to work
10050         with a completion_tracker.
10051         * rust-lang.c (rust_language_defn): Adjust.
10052         * symtab.c (free_completion_list, do_free_completion_list)
10053         (return_val, completion_tracker): Delete.
10054         (completion_list_add_name, completion_list_add_symbol)
10055         (completion_list_add_msymbol, completion_list_objc_symbol)
10056         (completion_list_add_fields, add_symtab_completions): Add
10057         completion_tracker parameter and use it.
10058         (default_make_symbol_completion_list_break_on_1): Rename to...
10059         (default_collect_symbol_completion_matches_break_on): ... this.
10060         Add completion_tracker parameter and use it instead of allocating
10061         a completion tracker here.
10062         (default_make_symbol_completion_list_break_on): Delete old
10063         implementation.
10064         (default_make_symbol_completion_list): Delete.
10065         (default_collect_symbol_completion_matches): New.
10066         (make_symbol_completion_list): Delete.
10067         (collect_symbol_completion_matches): New.
10068         (make_symbol_completion_type): Rename to ...
10069         (collect_symbol_completion_matches_type): ... this.  Add
10070         completion_tracker parameter and use it instead of VEC.
10071         (make_file_symbol_completion_list_1): Rename to...
10072         (collect_file_symbol_completion_matches): ... this.  Add
10073         completion_tracker parameter and use it instead of VEC.
10074         (make_file_symbol_completion_list): Delete.
10075         (add_filename_to_list): Use completion_list instead of a VEC.
10076         (add_partial_filename_data::list): Now a completion_list.
10077         (make_source_files_completion_list): Work with a completion_list
10078         instead of a VEC.
10079         * symtab.h: Include "completer.h".
10080         (default_make_symbol_completion_list_break_on)
10081         (default_make_symbol_completion_list, make_symbol_completion_list)
10082         (make_symbol_completion_type, make_file_symbol_completion_list)
10083         (make_source_files_completion_list): Delete.
10084         (default_collect_symbol_completion_matches_break_on)
10085         (default_collect_symbol_completion_matches)
10086         (collect_symbol_completion_matches)
10087         (collect_symbol_completion_matches_type)
10088         (collect_file_symbol_completion_matches)
10089         (make_source_files_completion_list): New.
10090         * top.c (init_main): Don't install a rl_completion_entry_function
10091         hook.  Install a rl_attempted_completion_function hook instead.
10092         * tui/tui-layout.c (layout_completer): Adjust to work with a
10093         completion_tracker.
10094         * tui/tui-regs.c (tui_reggroup_completer):
10095         * tui/tui-win.c (window_name_completer, focus_completer)
10096         (winheight_completer): Adjust to work with a completion_tracker.
10097         * value.c: Include "completer.h".
10098         (complete_internalvar): Adjust to work with a completion_tracker.
10099         * value.h (complete_internalvar): Likewise.
10100
10101 2017-07-17  Pedro Alves  <palves@redhat.com>
10102
10103         * cli/cli-decode.c (set_cmd_completer_handle_brkchars): Adjust to
10104         renames.
10105         * cli/cli-decode.h (struct cmd_list_element) <completer>: Move
10106         comments to completer_ftype's declaration.
10107         <completer_handle_brkchars>: Change type to
10108         completer_handle_brkchars_ftype.
10109         * command.h (completer_ftype): Add describing comment and give
10110         names to parameters.
10111         (completer_ftype_void): Rename to ...
10112         (completer_handle_brkchars_ftype) ... this.  Add describing comment.
10113         (set_cmd_completer_handle_brkchars): Adjust.
10114         * completer.c (filename_completer_handle_brkchars): New function.
10115         (complete_line_internal_normal_command): New function, factored
10116         out from ...
10117         (complete_line_internal): ... here.
10118         (command_completer_handle_brkchars)
10119         (default_completer_handle_brkchars)
10120         (completer_handle_brkchars_func_for_completer): New functions.
10121         * completer.h (set_gdb_completion_word_break_characters): Delete
10122         declaration.
10123         (completer_handle_brkchars_func_for_completer): New declaration.
10124         * python/py-cmd.c (cmdpy_completer_handle_brkchars): Adjust to use
10125         completer_handle_brkchars_func_for_completer.
10126
10127 2017-07-17  Pedro Alves  <palves@redhat.com>
10128
10129         * completer.c (symbol_completer): New function, based on
10130         make_symbol_completion_list_fn.
10131         * completer.h (symbol_completer): New declaration.
10132         * guile/scm-cmd.c (cmdscm_completers): Adjust.
10133         * python/py-cmd.c (completers): Adjust.
10134         * symtab.c (make_symbol_completion_list_fn): Delete.
10135         * symtab.h (make_symbol_completion_list_fn): Delete.
10136         * cli/cli-decode.c (add_cmd): Adjust.
10137
10138 2017-07-17  Pedro Alves  <palves@redhat.com>
10139
10140         * Makefile.in (COMMON_OBS): Add filename-seen-cache.o.
10141         * dwarf2read.c: Include "filename-seen-cache.h".
10142         * dwarf2read.c (dwarf2_per_objfile) <filenames_cache>: New field.
10143         (dw2_map_symbol_filenames): Build and use a filenames_seen_cache.
10144         * filename-seen-cache.c: New file.
10145         * filename-seen-cache.h: New file.
10146         * symtab.c: Include "filename-seen-cache.h".
10147         (struct filename_seen_cache, INITIAL_FILENAME_SEEN_CACHE_SIZE)
10148         (create_filename_seen_cache, clear_filename_seen_cache)
10149         (delete_filename_seen_cache, filename_seen): Delete, parts moved
10150         to filename-seen-cache.h/filename-seen-cache.c.
10151         (output_source_filename, sources_info)
10152         (maybe_add_partial_symtab_filename)
10153         (make_source_files_completion_list): Adjust to use
10154         filename_seen_cache.
10155
10156 2017-07-17  Pedro Alves  <palves@redhat.com>
10157
10158         * dwarf2read.c (dwarf2_per_objfile): In-class initialize all
10159         fields.
10160         (dwarf2_per_objfile::dwarf2_per_objfile(objfile*, const
10161         dwarf2_debug_sections*)): New.
10162         (dwarf2_per_objfile::dwarf2_per_objfile(const
10163         dwarf2_per_objfile&)): Declare as deleted.
10164         (dwarf2_per_objfile::operator=): Declare as deleted.
10165         (dwarf2_per_objfile::dwarf2_per_objfile)
10166         (dwarf2_per_objfile::~dwarf2_per_objfile)
10167         (dwarf2_per_objfile::free_cached_comp_units): New.
10168         (dwarf2_has_info): dwarf2_per_objfile initialization code moved to
10169         ctor.  Call dwarf2_per_objfile's ctor manually.
10170         (dwarf2_locate_sections): Deleted/refactored as ...
10171         (dwarf2_per_objfile::locate_sections): ... this new method.
10172         (free_cached_comp_units): Defer to
10173         dwarf2_per_objfile::free_cached_comp_units.
10174         (dwarf2_free_objfile): Call dwarf2_per_objfile's dtor manually.
10175
10176 2017-07-14  Tom Tromey  <tom@tromey.com>
10177
10178         PR rust/21764:
10179         * rust-exp.y (convert_ast_to_expression): Add "want_type"
10180         parameter.
10181         <UNOP_SIZEOF>: Split into separate case.
10182         <UNOP_VAR_VALUE>: Handle want_type.  Add error case.
10183
10184 2017-07-14  Tom Tromey  <tom@tromey.com>
10185
10186         PR rust/21763:
10187         * symtab.c (symbol_matches_domain): Add language_rust to special
10188         case.
10189         * rust-exp.y (convert_ast_to_expression) <OP_VAR_VALUE>: Don't
10190         treat LOC_TYPEDEF symbols as variables.
10191
10192 2017-07-14  Pedro Alves  <palves@redhat.com>
10193
10194         * symtab.c (make_file_symbol_completion_list_1): Iterate over
10195         symtabs matching all symtabs with SRCFILE as file name instead of
10196         only considering the first hit, with lookup_symtab.
10197
10198 2017-07-14  Simon Marchi  <simon.marchi@ericsson.com>
10199
10200         * ax-gdb.c (gen_aggregate_elt_ref): Remove operand_name and
10201         operator_name parameters.
10202         (gen_expr): Update function call.
10203
10204 2017-07-14  Simon Marchi  <simon.marchi@ericsson.com>
10205
10206         * dwarf2loc.h (dwarf2_compile_expr_to_ax): Remove gdbarch
10207         parameter.
10208         * symtab.h (struct symbol_computed_ops::tracepoint_var_ref):
10209         Likewise.
10210         * dwarf2loc.c (dwarf2_compile_expr_to_ax): Remove gdbarch
10211         parameter, use agent_expr::gdbarch instead, update function
10212         calls.
10213         (locexpr_tracepoint_var_ref): Likewise.
10214         (loclist_tracepoint_var_ref): Likewise.
10215         * ax-gdb.c (gen_trace_static_fields): Likewise.
10216         (gen_traced_pop): Likewise.
10217         (gen_frame_args_address): Likewise.
10218         (gen_frame_locals_address): Likewise.
10219         (gen_var_ref): Likewise.
10220         (gen_struct_ref_recursive): Likewise.
10221         (gen_static_field): Likewise.
10222         (gen_maybe_namespace_elt): Likewise.
10223         (gen_expr): Likewise.
10224         (gen_trace_for_var): Likewise.
10225         (gen_trace_for_expr): Likewise.
10226         (gen_trace_for_return_address): Likewise.
10227
10228 2017-07-14  Simon Marchi  <simon.marchi@ericsson.com>
10229
10230         * ax-gdb.c (gen_deref, gen_address_of): Remove unused ax
10231         parameter.
10232         (gen_struct_ref, gen_expr, gen_expr_binop_rest): Update call.
10233
10234 2017-07-14  Simon Marchi  <simon.marchi@ericsson.com>
10235
10236         * ax-gdb.c (gen_usual_unary): Remove exp parameter, get gdbarch
10237         from ax, update calls.
10238         (gen_usual_arithmetic): Likewise.
10239         (gen_integral_promotions): Likewise.
10240         (gen_bitfield_ref): Likewise.
10241         (gen_primitive_field): Likewise.
10242         (gen_struct_ref_recursive): Likewise.
10243         (gen_struct_ref): Likewise.
10244         (gen_maybe_namespace_elt): Likewise.
10245         (gen_struct_elt_for_reference): Likewise.
10246         (gen_namespace_elt): Likewise.
10247         (gen_aggregate_elt_ref): Likewise.
10248         (gen_expr): Get gdbarch from ax, update calls.
10249         (gen_expr_binop_rest): Likewise.
10250
10251 2017-07-13  Pedro Alves  <palves@redhat.com>
10252
10253         * amd64-darwin-tdep.c (x86_darwin_init_abi_64): Pass tdesc_amd64
10254         as default tdesc.
10255         * amd64-dicos-tdep.c (amd64_dicos_init_abi):
10256         * amd64-fbsd-tdep.c (amd64fbsd_init_abi):
10257         * amd64-linux-tdep.c (amd64_linux_init_abi): Pass
10258         tdesc_amd64_linux as default tdesc.  Get final tdesc from the
10259         tdep.
10260         (amd64_x32_linux_init_abi): Pass tdesc_x32_linux as default tdesc.
10261         Get final tdesc from the tdep.
10262         * amd64-nbsd-tdep.c (amd64nbsd_init_abi): Pass tdesc_amd64 as
10263         default tdesc.
10264         * amd64-obsd-tdep.c (amd64obsd_init_abi): Likewise.
10265         * amd64-sol2-tdep.c (amd64_sol2_init_abi): Likewise.
10266         * amd64-tdep.c (amd64_init_abi): Add 'default_tdesc' parameter.
10267         Use it as default tdesc.
10268         (amd64_x32_init_abi): Add 'default_tdesc' parameter, and pass it
10269         down to amd_init_abi.  No longer handle fallback tdesc here.
10270         * amd64-tdep.h (tdesc_x32): Declare.
10271         (amd64_init_abi, amd64_x32_init_abi): Add 'default_tdesc'
10272         parameter.
10273         * amd64-windows-tdep.c (amd64_windows_init_abi): Pass tdesc_amd64
10274         as default tdesc.
10275
10276 2017-07-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
10277
10278         * s390-linux-tdep.c (s390_process_record): Add support for
10279         instructions new in arch12.
10280
10281 2017-07-11  John Baldwin  <jhb@FreeBSD.org>
10282
10283         * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers): Use
10284         PT_GETFSBASE and PT_GETGSBASE.
10285         (amd64bsd_store_inferior_registers): Use PT_SETFSBASE and
10286         PT_SETGSBASE.
10287
10288 2017-07-11  John Baldwin  <jhb@FreeBSD.org>
10289
10290         * features/Makefile (amd64.dat, amd64-avx.dat, amd64-mpx.dat)
10291         (amd64-avx-mpx.dat, amd64-avx-avx512.dat)
10292         (amd64-avx-mpx-avx512-pku.dat): Add i386/64bit-segments.xml in
10293         those rules.
10294         * features/i386/amd64-avx-avx512.xml: Add 64bit-segments.xml.
10295         * features/i386/amd64-avx-mpx-avx512-pku.xml: Add 64bit-segments.xml.
10296         * features/i386/amd64-avx-mpx.xml: Add 64bit-segments.xml.
10297         * features/i386/amd64-avx.xml: Add 64bit-segments.xml.
10298         * features/i386/amd64-mpx.xml: Add 64bit-segments.xml.
10299         * features/i386/amd64.xml: Add 64bit-segments.xml.
10300         * features/i386/amd64-avx-avx512.c: Regenerated.
10301         * features/i386/amd64-avx-mpx-avx512-pku.c: Regenerated.
10302         * features/i386/amd64-avx-mpx.c: Regenerated.
10303         * features/i386/amd64-avx.c: Regenerated.
10304         * features/i386/amd64-mpx.c: Regenerated.
10305         * features/i386/amd64.c: Regenerated.
10306         * regformats/i386/amd64-avx-avx512.dat: Regenerated.
10307         * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Regenerated.
10308         * regformats/i386/amd64-avx-mpx.dat: Regenerated.
10309         * regformats/i386/amd64-avx.dat: Regenerated.
10310         * regformats/i386/amd64-mpx.dat: Regenerated.
10311         * regformats/i386/amd64.dat: Regenerated.
10312
10313 2017-07-10  Yao Qi  <yao.qi@linaro.org>
10314
10315         * features/i386/amd64-avx-avx512-linux.c: Re-generated.
10316         * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Re-generated.
10317
10318 2017-07-10  Anton Kolesov  <Anton.Kolesov@synopsys.com>
10319
10320         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add setenv and
10321         unsetenv.
10322         * gnulib/aclocal.m4: Regenerate.
10323         * gnulib/config.in: Regenerate.
10324         * gnulib/configure: Regenerate.
10325         * gnulib/import/Makefile.am: Regenerate.
10326         * gnulib/import/Makefile.in: Regenerate.
10327         * gnulib/import/m4/gnulib-cache.m4: Regenerate.
10328         * gnulib/import/m4/gnulib-comp.m4: Regenerate.
10329         * gnulib/import/m4/environ.m4: New file.
10330         * gnulib/import/m4/setenv.m4: New file.
10331         * gnulib/import/setenv.c: New file.
10332         * gnulib/import/unsetenv.c: New file.
10333
10334 2017-07-09  Simon Marchi  <simon.marchi@ericsson.com>
10335
10336         * compile/compile-loc2c.c (do_compile_dwarf_expr_to_c): Read
10337         address when op is DW_OP_addr.
10338
10339 2017-07-09  Tom Tromey  <tom@tromey.com>
10340
10341         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Reverse size
10342         check and apply to outer type.
10343
10344 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
10345
10346         * fbsd-tdep.c (LWPINFO_OFFSET, LWPINFO_PL_FLAGS)
10347         (LWPINFO64_PL_SIGINFO, LWPINFO32_PL_SIGINFO, PL_FLAG_SI)
10348         (SIZE64_SIGINFO_T, SIZE32_SIGINFO_T, fbsd_core_xfer_siginfo): New.
10349         (fbsd_init_abi): Install gdbarch "core_xfer_siginfo" method.
10350
10351 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
10352
10353         * fbsd-tdep.c (fbsd_core_thread_name): Use thread_section_name.
10354
10355 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
10356
10357         * corelow.c (get_core_siginfo): Remove.
10358         (core_xfer_partial): Use the gdbarch "core_xfer_siginfo" method
10359         instead of get_core_siginfo.
10360         * gdbarch.sh (core_xfer_siginfo): New gdbarch callback.
10361         * gdbarch.h: Re-generate.
10362         * gdbarch.c: Re-generate.
10363         * linux-tdep.c (linux_core_xfer_siginfo): New.
10364         (linux_init_abi): Install gdbarch "core_xfer_siginfo" method.
10365
10366 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
10367
10368         * corelow.c (thread_section_name): Move to ...
10369         * gdbcore.h (thread_section_name): ... here.
10370
10371 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
10372
10373         * fbsd-nat.c [PT_LWPINFO && __LP64__] (union sigval32)
10374         (struct siginfo32): New.
10375         [PT_LWPINFO] (fbsd_siginfo_size, fbsd_convert_siginfo): New.
10376         (fbsd_xfer_partial) [PT_LWPINFO]: Handle TARGET_OBJECT_SIGNAL_INFO
10377         via ptrace(PT_LWPINFO).
10378
10379 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
10380
10381         * fbsd-tdep.c (fbsd_gdbarch_data_handle, struct fbsd_gdbarch_data)
10382         (init_fbsd_gdbarch_data, get_fbsd_gdbarch_data)
10383         (fbsd_get_siginfo_type): New.
10384         (fbsd_init_abi): Install gdbarch "get_siginfo_type" method.
10385         (_initialize_fbsd_tdep): New.
10386
10387 2017-07-06  David Blaikie  <dblaikie@gmail.com>
10388
10389         * dwarf2read.c (struct dwo_file): Use a htab of dwo_unit* (rather than
10390         a singular dwo_unit*) to support multiple CUs in the same way that
10391         multiple TUs are supported.
10392         (create_cus_hash_table): Replace create_dwo_cu with a function for
10393         parsing multiple CUs from a DWO file.
10394         (open_and_init_dwo_file): Use create_cus_hash_table rather than
10395         create_dwo_cu.
10396         (lookup_dwo_cutu): Lookup CU in the hash table in the dwo_file with
10397         htab_find, rather than comparing the signature to a singleton CU in
10398         the dwo_file.
10399
10400 2017-07-06  Pedro Alves  <palves@redhat.com>
10401
10402         * python/py-unwind.c (pyuw_dealloc_cache): Fix for loop condition.
10403
10404 2017-07-04  Pedro Alves  <palves@redhat.com>
10405
10406         * gdbtypes.c (recursive_dump_type): Don't reference TYPE_STATIC.
10407         * gdbtypes.h (TYPE_STATIC): Delete.
10408         (struct fn_field) <is_public, is_abstract, is_static, is_final,
10409         is_synchronized, is_native>: Delete.
10410         <dummy>: Bump.
10411         (TYPE_FN_FIELD_PUBLIC, TYPE_FN_FIELD_STATIC, TYPE_FN_FIELD_FINAL)
10412         (TYPE_FN_FIELD_SYNCHRONIZED, TYPE_FN_FIELD_NATIVE)
10413         (TYPE_FN_FIELD_ABSTRACT): Delete.
10414
10415 2017-07-03  Simon Marchi  <simon.marchi@ericsson.com>
10416
10417         * buffer.h (buffer_finish): Fix spelling mistakes.
10418
10419 2017-07-01  Eli Zaretskii  <eliz@gnu.org>
10420
10421         * .dir-locals.el: Automatically switch to C-style comments in
10422         versions of Emacs that support the feature.
10423
10424 2017-06-30  Sergio Durigan Junior  <sergiodj@redhat.com>
10425             Pedro Alves  <palves@redhat.com>
10426
10427         PR cli/21688
10428         * cli/cli-script.c (command_name_equals_not_inline): Remove function.
10429         (process_next_line): New variable 'inline_cmd'.
10430         Adjust 'if' clauses for "python", "compile" and "guile" to use
10431         'command_name_equals' and check for '!inline_cmd'.
10432
10433 2017-06-30  Sergio Durigan Junior  <sergiodj@redhat.com>
10434
10435         PR cli/21688
10436         * cli/cli-script.c (command_name_equals_not_inline): New function.
10437         (process_next_line): Adjust 'if' clauses for "python", "compile"
10438         and "guile" to use command_name_equals_not_inline.
10439
10440 2017-06-29  Pedro Alves  <palves@redhat.com>
10441
10442         * completer.c (expression_completer): Call
10443         linespec_location_completer instead of location_completer.
10444
10445 2017-06-29  Pedro Alves  <palves@redhat.com>
10446
10447         * completer.c (expression_completer): Remove code that recomputes
10448         'text' from 'word'.
10449
10450 2017-06-29  Yao Qi  <yao.qi@linaro.org>
10451
10452         * regformats/regdat.sh: Generate code with
10453         "ifndef IN_PROCESS_AGENT".
10454
10455 2017-06-28  Pedro Alves  <palves@redhat.com>
10456
10457         * command.h: Include "common/scoped_restore.h".
10458
10459 2017-06-28  Yao Qi  <yao.qi@linaro.org>
10460
10461         * mi/mi-cmd-break.c (mi_argv_to_format): Use obstack_grow_str
10462         instead of obstack_grow.
10463
10464 2017-06-28  Doug Gilmore  <Doug.Gilmore@imgtec.com>
10465
10466         PR gdb/21337
10467         * symfile.c (reread_symbols): Call objfiles_changed just before
10468         read_symbols.
10469
10470 2017-06-27  Pedro Alves  <palves@redhat.com>
10471
10472         * symtab.c (COMPLETION_LIST_ADD_SYMBOL)
10473         (MCOMPLETION_LIST_ADD_SYMBOL): Delete macros, replace with ...
10474         (completion_list_add_symbol, completion_list_add_msymbol):
10475         ... these new functions.
10476         (add_symtab_completions)
10477         (default_make_symbol_completion_list_break_on_1): Adjust.
10478
10479 2017-06-27  Pedro Alves  <palves@redhat.com>
10480
10481         * objfiles.c (get_objfile_bfd_data): Call bfd_alloc instead of
10482         bfd_zalloc.  Call objfile_per_bfd_storage's ctor.
10483         (free_objfile_per_bfd_storage): Call objfile_per_bfd_storage's
10484         dtor.
10485         * objfiles.h (objfile_per_bfd_storage): Add ctor.  Make
10486         'storage_obstack' field an auto_obstack.  In-class initialize all
10487         non-bitfield fields.  Make minsyms_read bool.
10488         * symfile.c (read_symbols): Adjust.
10489
10490 2017-06-27  Alan Hayward  <alan.hayward@arm.com>
10491
10492         * remote-sim.c (gdbsim_fetch_register): Use byte_vector.
10493         (gdbsim_store_register): Likewise.
10494
10495 2017-06-27  Pedro Alves  <palves@redhat.com>
10496
10497         * c-exp.y (name_obstack): Now an auto_obstack.
10498         (yylex): Use auto_obstack::clear.
10499         (c_parse): Use auto_obstack::clear instead of reinitializing and
10500         freeing the obstack.
10501         * c-lang.c (evaluate_subexp_c): Use auto_obstack.
10502         * d-exp.y (name_obstack): Now an auto_obstack.
10503         (yylex): Use auto_obstack::clear.
10504         (d_parse): Use auto_obstack::clear instead of reinitializing and
10505         freeing the obstack.
10506         * dwarf2loc.c (fetch_const_value_from_synthetic_pointer): Use
10507         auto_obstack.
10508         * dwarf2read.c (create_addrmap_from_index)
10509         (dwarf2_build_psymtabs_hard)
10510         (update_enumeration_type_from_children): Likewise.
10511         * gdb_obstack.h (auto_obstack): New type.
10512         * go-exp.y (name_obstack): Now an auto_obstack.
10513         (build_packaged_name): Use auto_obstack::clear.
10514         (go_parse): Use auto_obstack::clear instead of reinitializing and
10515         freeing the obstack.
10516         * linux-tdep.c (linux_make_mappings_corefile_notes): Use
10517         auto_obstack.
10518         * printcmd.c (printf_wide_c_string, ui_printf): Use auto_obstack.
10519         * rust-exp.y (work_obstack): Now an auto_obstack.
10520         (rust_parse, rust_lex_tests): Use auto_obstack::clear instead of
10521         reinitializing and freeing the obstack.
10522         * utils.c (do_obstack_free, make_cleanup_obstack_free): Delete.
10523         (host_char_to_target): Use auto_obstack.
10524         * utils.h (make_cleanup_obstack_free): Delete declaration.
10525         * valprint.c (generic_emit_char, generic_printstr): Use
10526         auto_obstack.
10527
10528 2017-06-27  Simon Marchi  <simon.marchi@ericsson.com>
10529
10530         * darwin-nat.c (darwin_check_new_threads): Don't handle dummy
10531         thread.
10532         (darwin_init_thread_list): Don't update dummy thread.
10533         (darwin_create_inferior, darwin_attach): Don't add a dummy thread.
10534
10535 2017-06-26  Simon Marchi  <simon.marchi@ericsson.com>
10536
10537         * record-full.c (netorder16): Remove.
10538
10539 2017-06-26  Simon Marchi  <simon.marchi@ericsson.com>
10540
10541         * common/diagnostics.h: Define macros for GCC.
10542         (DIAGNOSTIC_IGNORE_UNUSED_FUNCTION): New macro.
10543         * common/vec.h: Include diagnostics.h.
10544         (DIAGNOSTIC_IGNORE_UNUSED_VEC_FUNCTION): New macro.
10545         (DEF_VEC_I, DEF_VEC_P, DEF_VEC_O): Ignore -Wunused-function
10546         warning.
10547
10548 2017-06-26  Simon Marchi  <simon.marchi@ericsson.com>
10549
10550         * common/diagnostics.h (DIAGNOSTIC_IGNORE_DEPRECATED_REGISTER):
10551         New macro.
10552         * ada-lex.l: Ignore deprecated register warnings.
10553
10554 2017-06-25  Simon Marchi  <simon.marchi@ericsson.com>
10555
10556         * main.c (get_init_files): Replace "SYSTEM_GDBINIT +
10557         datadir_len" with "&SYSTEM_GDBINIT[datadir_len]".
10558
10559 2017-06-25  Simon Marchi  <simon.marchi@ericsson.com>
10560
10561         * dtrace-probe.c (dtrace_process_dof_probe): Put semi-colon on
10562         its own line.
10563
10564 2017-06-25  Simon Marchi  <simon.marchi@ericsson.com>
10565
10566         * nat/x86-dregs.c (x86_show_dr): Print registers one per line.
10567
10568 2017-06-23  Alan Hayward  <alan.hayward@arm.com>
10569
10570         * xtensa-tdep.c (XTENSA_MAX_REGISTER_SIZE): Add.
10571         (xtensa_register_write_masked): Use XTENSA_MAX_REGISTER_SIZE.
10572         (xtensa_register_read_masked): Likewise.
10573
10574 2017-06-22  Sergio Durigan Junior  <sergiodj@redhat.com>
10575
10576         * common/environ.c (gdb_environ::unset): Update comment.
10577
10578 2017-06-22  Alan Hayward  <alan.hayward@arm.com>
10579
10580         * python/py-unwind.c (pyuw_sniffer): Allocate space for
10581         registers.
10582
10583 2017-06-22  Alan Hayward  <alan.hayward@arm.com>
10584
10585         * record-full.c (record_full_exec_insn): Use byte_vector.
10586
10587 2017-06-22  Yao Qi  <yao.qi@linaro.org>
10588
10589         * regformats/i386/amd64-avx-mpx-avx512-pku-linux.dat: Regenerated.
10590         * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Regenerated.
10591
10592 2017-06-22  Alan Hayward  <alan.hayward@arm.com>
10593
10594         * remote.c (cached_reg): Move from here...
10595         * regcache.h (cached_reg): ...to here.
10596         * python/py-unwind.c (struct reg_info): Remove.
10597         (cached_frame_info): Use cached_reg_t.
10598         (pyuw_prev_register): Likewise.
10599         (pyuw_sniffer): Use cached_reg_t and allocate registers.
10600         (pyuw_dealloc_cache): Free all registers.
10601
10602 2017-06-22  Pedro Alves  <palves@redhat.com>
10603             Simon Marchi  <simon.marchi@ericsson.com>
10604
10605         * unittests/environ-selftests.c (run_tests): Ignore -Wself-move
10606         warning.
10607         * common/diagnostics.h: New file.
10608
10609 2017-06-22  Pedro Alves  <palves@redhat.com>
10610
10611         * common/agent.h: Add include guards.
10612
10613 2017-06-21  Simon Marchi  <simon.marchi@ericsson.com>
10614
10615         * target.h (struct target_ops) <to_xfer_partial>: Update doc to
10616         talk about addressable units instead of bytes.
10617
10618 2017-06-20  Sergio Durigan Junior  <sergiodj@redhat.com>
10619
10620         * common/environ.c (gdb_environ::unset): Use '::iterator' instead
10621         of '::const_iterator'.
10622
10623 2017-06-20  Sergio Durigan Junior  <sergiodj@redhat.com>
10624
10625         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
10626         'unittests/environ-selftests.c'.
10627         (SUBDIR_UNITTESTS_OBS): Add 'environ-selftests.o'.
10628         * charset.c (find_charset_names): Declare object 'iconv_env'.
10629         Update code to use 'iconv_env' object.  Remove call to
10630         'free_environ'.
10631         * common/environ.c: Include <utility>.
10632         (make_environ): Delete function.
10633         (free_environ): Delete function.
10634         (gdb_environ::clear): New function.
10635         (gdb_environ::operator=): New function.
10636         (gdb_environ::get): Likewise.
10637         (environ_vector): Delete function.
10638         (set_in_environ): Delete function.
10639         (gdb_environ::set): New function.
10640         (unset_in_environ): Delete function.
10641         (gdb_environ::unset): New function.
10642         (gdb_environ::envp): Likewise.
10643         * common/environ.h: Include <vector>.
10644         (struct gdb_environ): Delete; transform into...
10645         (class gdb_environ): ... this class.
10646         (free_environ): Delete prototype.
10647         (init_environ, get_in_environ, set_in_environ, unset_in_environ,
10648         environ_vector): Likewise.
10649         * infcmd.c (run_command_1): Update code to call
10650         'envp' from 'gdb_environ' class.
10651         (environment_info): Update code to call methods from 'gdb_environ'
10652         class.
10653         (unset_environment_command): Likewise.
10654         (path_info): Likewise.
10655         (path_command): Likewise.
10656         * inferior.c (inferior::~inferior): Delete call to 'free_environ'.
10657         (inferior::inferior): Initialize 'environment' using the host's
10658         information.
10659         * inferior.h: Remove forward declaration of 'struct gdb_environ'.
10660         Include "environ.h".
10661         (class inferior) <environment>: Change type from 'struct
10662         gdb_environ' to 'gdb_environ'.
10663         * mi/mi-cmd-env.c (mi_cmd_env_path): Update code to call
10664         methods from 'gdb_environ' class.
10665         * solib.c (solib_find_1): Likewise
10666         * unittests/environ-selftests.c: New file.
10667
10668 2017-06-20  Yao Qi  <yao.qi@linaro.org>
10669
10670         * features/i386/i386-linux.xml: Exchange the order of including
10671         32bit-linux.xml and 32bit-sse.xml.
10672         * features/i386/i386-linux.c: Regenerated.
10673
10674 2017-06-20  Yao Qi  <yao.qi@linaro.org>
10675
10676         * target-descriptions.c (tdesc_reg): Add ctor, dtor.
10677         Delete copy ctor and assignment operator.
10678         (tdesc_type): Likewise.
10679         (tdesc_feature): Likewise.
10680         (tdesc_free_reg): Remove.
10681         (tdesc_create_reg): Use new.
10682         (tdesc_free_type): Remove.
10683         (tdesc_create_vector): Use new.
10684         (tdesc_create_union): Likewise.
10685         (tdesc_create_flags): Likewise.
10686         (tdesc_create_enum): Likewise.
10687         (tdesc_free_feature): Delete.
10688         (free_target_description): Use delete.
10689
10690 2017-06-19  John Baldwin  <jhb@FreeBSD.org>
10691
10692         * mips-tdep.c (print_gp_register_row): Don't error for unavailable
10693         registers.
10694
10695 2017-06-19  Pedro Alves  <palves@redhat.com>
10696
10697         * dwarf2read.c (write_psymtabs_to_index): Construct file_closer
10698         after gdb::unlinker.
10699
10700 2017-06-19  Sergio Durigan Junior  <sergiodj@redhat.com>
10701
10702         * mi/mi-cm-env.c (_initialize_mi_cmd_env): Use getenv instead of
10703         gdb_environ to access an environment variable.
10704
10705 2017-06-18  Thomas Petazzoni  <thomas.petazzoni@free-electrons.com>
10706
10707         * nat/linux-ptrace.c (linux_fork_to_function): Add cast to
10708         gdb_byte*.
10709
10710 2017-06-17  Simon Marchi  <simon.marchi@ericsson.com>
10711
10712         * nat/fork-inferior.h (trace_start_error): Add ATTRIBUTE_PRINTF.
10713
10714 2017-06-17  Simon Marchi  <simon.marchi@ericsson.com>
10715
10716         * configure: Re-generate.
10717         * warning.m4 (build_warnings): Add -Wno-mismatched-tags.
10718
10719 2017-06-17  Simon Marchi  <simon.marchi@ericsson.com>
10720
10721         * configure: Re-generate.
10722         * warning.m4: Pass -Werror to compiler when checking for
10723         supported warning flags.
10724
10725 2017-06-17  Simon Marchi  <simon.marchi@ericsson.com>
10726
10727         * Makefile.in (COMPILE.pre): Add "-x c++".
10728
10729 2017-06-16  Alan Hayward  <alan.hayward@arm.com>
10730             Pedro Alves  <palves@redhat.com>
10731             Yao Qi  <yao.qi@linaro.org>
10732
10733         * defs.h (RequireLongest): New.
10734         (extract_integer): Declare function template.
10735         (extract_signed_integer): Remove the declaration, but define it
10736         static inline.
10737         (extract_unsigned_integer): Likewise.
10738         (store_integer): Declare function template.
10739         (store_signed_integer): Remove the declaration, but define it
10740         static inline.
10741         (store_unsigned_integer): Likewise.
10742         * findvar.c (extract_integer): New function template.
10743         (extract_signed_integer): Remove.
10744         (extract_unsigned_integer): Remove.
10745         (extract_integer<LONGEST>, extract_integer<ULONGEST>): Explicit
10746         instantiations.
10747         (store_integer): New function template.
10748         (store_signed_integer): Remove.
10749         (store_unsigned_integer): Remove.
10750         (store_integer): Explicit instantiations.
10751         * regcache.c (regcache_raw_read_signed): Update.
10752         (regcache::raw_read): New function.
10753         (regcache::raw_read_signed): Remove.
10754         (regcache::raw_read_unsigned): Remove.
10755         (regcache_raw_read_unsigned): Update.
10756         (regcache_raw_write_unsigned): Update.
10757         (regcache::raw_write_signed): Remove.
10758         (regcache::raw_write): New function.
10759         (regcache_cooked_read_signed): Update.
10760         (regcache::raw_write_unsigned): Remove.
10761         (regcache::cooked_read_signed): Remove.
10762         (regcache_cooked_read_unsigned): Update.
10763         (regcache::cooked_read_unsigned): Remove.
10764         (regcache_cooked_write_signed): Update.
10765         (regcache_cooked_write_unsigned): Update.
10766         * regcache.h (regcache) <raw_read_signed>: Remove.
10767         <raw_write_signed, raw_read_unsigned, raw_write_unsigned>: Remove.
10768         <raw_read, raw_write>: New.
10769         <cooked_read_signed, cooked_write_signed>: Remove.
10770         <cooked_write_unsigned, cooked_read_unsigned>: Remove.
10771         <cooked_read, cooked_write>: New.
10772         * sh64-tdep.c (sh64_pseudo_register_read): Update.
10773         (sh64_pseudo_register_write): Update.
10774
10775 2017-06-16  Anton Kolesov  <anton.kolesov@synopsys.com>
10776
10777         * arc-tdep.c (arc_disassembler_options): New variable.
10778         (arc_gdbarch_init): Set and use it. Use arc_delayed_print_insn instead
10779         of default_print_insn.
10780         (arc_delayed_print_insn): Set info->section when needed,
10781         use default_print_insn to retrieve a disassembler.
10782
10783 2017-06-14  Sergio Durigan Junior  <sergiodj@redhat.com>
10784
10785         PR gdb/21574
10786         * infcmd.c (_initialize_infcmd): Expand "help run" documentation
10787         to mention $SHELL and startup-with-shell.
10788
10789 2017-06-14  Max Filippov  <jcmvbkbc@gmail.com>
10790
10791         * MAINTAINERS: Move Maxim Grigoriev to the Past Maintainers.
10792
10793 2017-06-14  Yao Qi  <yao.qi@linaro.org>
10794
10795         * aarch64-tdep.c (aarch64_gdb_print_insn): Call
10796         default_print_insn instead of print_insn_aarch64.
10797         * arm-tdep.c (gdb_print_insn_arm): Call
10798         default_print_insn instead of print_insn_big_arm
10799         and print_insn_little_arm.
10800         * i386-tdep.c (i386_print_insn): Call default_print_insn
10801         instead of print_insn_i386.
10802         * ia64-tdep.c (ia64_print_insn): Call
10803         default_print_insn instead of print_insn_ia64.
10804         * mips-tdep.c (gdb_print_insn_mips): Call
10805         default_print_insn instead of print_insn_big_mips
10806         and print_insn_little_mips.
10807         * spu-tdep.c (gdb_print_insn_spu): Call default_print_insn
10808         instead of print_insn_spu.
10809
10810 2017-06-14  Pedro Alves  <palves@redhat.com>
10811
10812         * ada-lang.c: Include "common/byte-vector.h".
10813         (ada_value_primitive_packed_val): Use gdb::byte_vector.
10814         * charset.c (wchar_iterator::iterate): Resize the vector instead
10815         of reserving it.
10816         * common/byte-vector.h: Include "common/def-vector.h".
10817         (wchar_iterator::m_out): Now a gdb::def_vector<gdb_wchar_t>.
10818         * cli/cli-dump.c: Include "common/byte-vector.h".
10819         (dump_memory_to_file, restore_binary_file): Use gdb::byte_vector.
10820         * common/byte-vector.h: New file.
10821         * common/def-vector.h: New file.
10822         * common/default-init-alloc.h: New file.
10823         * dwarf2loc.c: Include "common/byte-vector.h".
10824         (rw_pieced_value): Use gdb::byte_vector, and resize the vector
10825         instead of reserving it.
10826         * dwarf2read.c: Include "common/byte-vector.h".
10827         (data_buf::m_vec): Now a gdb::byte_vector.
10828         * gdb_regex.c: Include "common/def-vector.h".
10829         (compiled_regex::compiled_regex): Use gdb::def_vector<char>.
10830         * mi/mi-main.c: Include "common/byte-vector.h".
10831         (mi_cmd_data_read_memory): Use gdb::byte_vector.
10832         * printcmd.c: Include "common/byte-vector.h".
10833         (print_scalar_formatted): Use gdb::byte_vector.
10834         * valprint.c: Include "common/byte-vector.h".
10835         (maybe_negate_by_bytes, print_decimal_chars): Use
10836         gdb::byte_vector.
10837
10838 2017-06-13  Simon Marchi  <simon.marchi@ericsson.com>
10839
10840         * darwin-nat.c: Include "nat/fork-inferior.h".
10841
10842 2017-06-13  Simon Marchi  <simon.marchi@ericsson.com>
10843
10844         * configure.nat: Factor out Darwin bits that are not
10845         architecture-specific.  Add fork-inferior.o.
10846
10847 2017-06-13  Simon Marchi  <simon.marchi@ericsson.com>
10848
10849         * configure.nat: Factor out AIX bits that are not
10850         architecture-specific.  Add fork-inferior.o.
10851
10852 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
10853
10854         * dwarf2loc.c (rw_pieced_value): New.  Merge logic from...
10855         (read_pieced_value, write_pieced_value): ...here.  Reduce to
10856         wrappers that just call rw_pieced_value.
10857
10858 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
10859
10860         * dwarf2loc.c (write_pieced_value): When writing the data for a
10861         memory piece, use write_memory_with_notification instead of
10862         write_memory.
10863
10864 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
10865
10866         * valops.c (read_value_memory): Change embedded_offset to
10867         represent a bit offset instead of a byte offset.
10868         * value.h (read_value_memory): Adjust comment.
10869
10870 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
10871
10872         * dwarf2loc.c (read_pieced_value): Remove unnecessary variables
10873         dest_offset_bits and source_offset_bits.
10874         (write_pieced_value): Likewise.
10875
10876 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
10877
10878         * dwarf2loc.c (read_pieced_value): Respect the piece offset, as
10879         given by DW_OP_bit_piece.
10880         (write_pieced_value): Likewise.
10881
10882 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
10883
10884         * dwarf2loc.c (read_pieced_value): Move the buffer allocation and
10885         some other preparations to the places where sufficient information
10886         is available.
10887         (write_pieced_value): Likewise.
10888
10889 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
10890
10891         * dwarf2loc.c (bits_to_bytes): New function.
10892         (read_pieced_value): Fix offset calculations for register pieces
10893         on big-endian targets.
10894         (write_pieced_value): Likewise.
10895
10896 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
10897
10898         * dwarf2loc.c (read_pieced_value): Remove buffer_size variable.
10899         (write_pieced_value): Likewise.
10900
10901 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
10902
10903         * dwarf2loc.c (write_pieced_value): When writing to a bit-field,
10904         transfer the source value's least significant bits, instead of its
10905         lowest-addressed ones.  Rename type_len to max_offset.
10906         (read_pieced_value): Mirror above changes to write_pieced_value as
10907         applicable.
10908
10909 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
10910
10911         * dwarf2loc.c (write_pieced_value): In DWARF_VALUE_MEMORY,
10912         truncate full bytes from dest_offset_bits before using it as an
10913         offset into the buffer.
10914
10915 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
10916
10917         * dwarf2loc.c (write_pieced_value): Include transfer size in
10918         byte-wise check.
10919
10920 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
10921
10922         * dwarf2loc.c (write_pieced_value): Fix copy/paste error in the
10923         calculation of this_size.
10924
10925 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
10926
10927         * dwarf2loc.c (read_pieced_value): Respect parent value's offset
10928         when targeting a bit-field.
10929         (write_pieced_value): Likewise.
10930
10931 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
10932
10933         * dwarf2loc.c (struct piece_closure) <addr_size>: Remove field.
10934         (allocate_piece_closure): Drop addr_size parameter.
10935         (dwarf2_evaluate_loc_desc_full): Adjust call to
10936         allocate_piece_closure.
10937
10938 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
10939
10940         PR gdb/21226
10941         * dwarf2loc.c (read_pieced_value): Anchor stack value pieces at
10942         the LSB end, independent of endianness.
10943
10944 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
10945
10946         * dwarf2loc.c (write_pieced_value): Fix order of calculations for
10947         size capping.
10948
10949 2017-06-13  Yao Qi  <yao.qi@linaro.org>
10950
10951         * mips-linux-nat.c: Move include features/mips*-linux.c to
10952         mips-linux-tdep.c.
10953         (_initialize_mips_linux_nat): Move initialize_tdesc_mips* calls
10954         to mips-linux-tdep.c.
10955         * mips-linux-tdep.c: Include features/mips*-linux.c
10956         (_initialize_mips_linux_tdep): Call initialize_tdesc_mips*
10957         functions.
10958         * mips-linux-tdep.h (tdesc_mips_linux): Declare.
10959         (tdesc_mips_dsp_linux, tdesc_mips64_linux): Declare.
10960         (tdesc_mips64_dsp_linux): Declare.
10961
10962 2017-06-12  Tom Tromey  <tom@tromey.com>
10963
10964         * valprint.h (val_print_type_code_int): Remove.
10965         * valprint.c (generic_val_print_int): Always call
10966         val_print_scalar_formatted.
10967         (val_print_type_code_int): Remove.
10968         * printcmd.c (print_scalar_formatted): Handle options->format==0.
10969         * f-valprint.c (f_val_print): Use val_print_scalar_formatted.
10970         * c-valprint.c (c_val_print_int): Use val_print_scalar_formatted.
10971         * ada-valprint.c (ada_val_print_num): Use
10972         val_print_scalar_formatted.
10973
10974 2017-06-12  Tom Tromey  <tom@tromey.com>
10975
10976         * printcmd.c (print_scalar_formatted): Unify the two switches.
10977         Don't convert scalars to LONGEST.
10978
10979 2017-06-12  Tom Tromey  <tom@tromey.com>
10980
10981         PR exp/16225:
10982         * valprint.h (print_decimal_chars): Update.
10983         * valprint.c (maybe_negate_by_bytes): New function.
10984         (print_decimal_chars): Add "is_signed" argument.
10985         * printcmd.c (print_scalar_formatted): Update.
10986
10987 2017-06-12  Tom Tromey  <tom@tromey.com>
10988
10989         PR exp/16225:
10990         * valprint.h (print_binary_chars, print_hex_chars): Update.
10991         * valprint.c (val_print_type_code_int): Update.
10992         (print_binary_chars): Add "zero_pad" argument.
10993         (emit_octal_digit): New function.
10994         (print_octal_chars): Don't zero-pad.
10995         (print_decimal_chars): Likewise.
10996         (print_hex_chars): Add "zero_pad" argument.
10997         * sh64-tdep.c (sh64_do_fp_register): Update.
10998         * regcache.c (regcache::dump): Update.
10999         * printcmd.c (print_scalar_formatted): Update.
11000         * infcmd.c (default_print_one_register_info): Update.
11001
11002 2017-06-12  Pedro Alves  <palves@redhat.com>
11003             Alan Hayward  <alan.hayward@arm.com>
11004
11005         * mips-tdep.c (MAX_MIPS_ABI_REGSIZE): New.
11006         (mips_eabi_push_dummy_call): Rename local 'regsize' to
11007         'abi_regsize'.  Rename local array 'valbuf' to 'ref_valbuf', and
11008         use MAX_MIPS_ABI_REGSIZE instead of MAX_REGISTER_SIZE to size it.
11009         Assert that abi_regsize bytes fit in 'ref_valbuf'.
11010
11011 2017-06-12  Pedro Alves  <palves@redhat.com>
11012
11013         * dwarf2read.c (mapped_symtab::data): Now a vector of
11014         symtab_index_entry instead of vector of
11015         std::unique_ptr<symtab_index_entry>.  All users adjusted to check
11016         whether an element's name is NULL instead of checking whether the
11017         element itself is NULL.
11018         (find_slot): Change return type.  Adjust.
11019         (hash_expand, , add_index_entry, uniquify_cu_indices)
11020         (write_hash_table): Adjust.
11021
11022 2017-06-12  Pedro Alves  <palves@redhat.com>
11023
11024         * dwarf2read.c (recursively_count_psymbols): New function.
11025         (write_psymtabs_to_index): Call it to compute number of psyms and
11026         pass estimate size of psyms_seen to unordered_set's ctor.
11027
11028 2017-06-12  Pedro Alves  <palves@redhat.com>
11029
11030         * dwarf2read.c (write_hash_table): Check if key already exists
11031         before emplacing.
11032
11033 2017-06-12  Pedro Alves  <palves@redhat.com>
11034
11035         * dwarf2read.c (data_buf::append_space): Rename to...
11036         (data_buf::grow): ... this, and make private.  Adjust all callers.
11037         (data_buf::append_uint): New method.
11038         (add_address_entry, write_one_signatured_type)
11039         (write_psymtabs_to_index): Use it.
11040
11041 2017-06-12  Pedro Alves  <palves@redhat.com>
11042
11043         * dwarf2read.c (file_write(FILE *, const void *, size_t)): Delete.
11044         (file_write (FILE *, const std::vector<Elem>&)): Delete.
11045         (data_buf::file_write): Call ::fwrite directly.
11046
11047 2017-06-12  Pedro Alves  <palves@redhat.com>
11048
11049         * dwarf2read.c (uniquify_cu_indices): Use std::unique and
11050         std::vector::erase.
11051
11052 2017-06-12  Jan Kratochvil  <jan.kratochvil@redhat.com>
11053
11054         Code cleanup: C++ify .gdb_index producer.
11055         * dwarf2read.c: Include <unordered_set> and <unordered_map>.
11056         (MAYBE_SWAP) [WORDS_BIGENDIAN]: Cast to offset_type.
11057         (struct strtab_entry, hash_strtab_entry, eq_strtab_entry)
11058         (create_strtab, add_string): Remove.
11059         (file_write, data_buf): New.
11060         (struct symtab_index_entry): Use std::vector for cu_indices.
11061         (struct mapped_symtab): Use std::vector for data.
11062         (hash_symtab_entry, eq_symtab_entry, delete_symtab_entry)
11063         (create_symbol_hash_table, create_mapped_symtab, cleanup_mapped_symtab):
11064         Remove.
11065         (find_slot): Change return type.  Update it to the new data structures.
11066         (hash_expand, add_index_entry): Update it to the new data structures.
11067         (offset_type_compare): Remove.
11068         (uniquify_cu_indices): Update it to the new data structures.
11069         (c_str_view, c_str_view_hasher, vector_hasher): New.
11070         (add_indices_to_cpool): Remove.
11071         (write_hash_table): Update it to the new data structures.
11072         (struct psymtab_cu_index_map, hash_psymtab_cu_index)
11073         (eq_psymtab_cu_index): Remove.
11074         (psym_index_map): New typedef.
11075         (struct addrmap_index_data): Change addr_obstack pointer to data_buf
11076         reference and std::unordered_map for cu_index_htab.
11077         (add_address_entry, add_address_entry_worker, write_address_map)
11078         (write_psymbols): Update it to the new data structures.
11079         (write_obstack): Remove.
11080         (struct signatured_type_index_data): Change types_list to a data_buf
11081         reference and psyms_seen to a std::unordered_set reference.
11082         (write_one_signatured_type, recursively_write_psymbols)
11083         (write_psymtabs_to_index): Update it to the new data structures.
11084
11085 2017-06-11  Simon Marchi  <simon.marchi@ericsson.com>
11086
11087         * NEWS (Changes since GDB 8.0): Announce {set,show} debug
11088         separate-debug-file commands.
11089         * symfile.h (separate_debug_file_debug): New global.
11090         * symfile.c (separate_debug_file_debug): New global.
11091         (separate_debug_file_exists, find_separate_debug_file): Add
11092         debug output.
11093         (_initialize_symfile): Add "set debug separate-debug-file"
11094         command.
11095         * build-id.c (build_id_to_debug_bfd,
11096         find_separate_debug_file_by_buildid): Add debug output.
11097
11098 2017-06-10  Simon Marchi  <simon.marchi@polymtl.ca>
11099
11100         * gdbarch.sh (displaced_step_free_closure): Remove.
11101         * gdbarch.h, gdbarch.c: Re-generate.
11102         * aarch64-linux-tdep.c (aarch64_linux_init_abi): Don't set
11103         displaced_step_free_closure.
11104         * amd64-linux-tdep.c (amd64_linux_init_abi_common): Likewise.
11105         * arm-linux-tdep.c (arm_linux_init_abi): Likewise.
11106         * i386-linux-tdep.c (i386_linux_init_abi): Likewise.
11107         * rs6000-aix-tdep.c (rs6000_aix_init_osabi): Likewise.
11108         * rs6000-tdep.c (rs6000_gdbarch_init): Likewise.
11109         * s390-linux-tdep.c (s390_gdbarch_init): Likewise.
11110         * arch-utils.h (simple_displaced_step_free_closure): Remove.
11111         * arch-utils.c (simple_displaced_step_free_closure): Remove.
11112         * infrun.c (displaced_step_clear): Call xfree instead of
11113         gdbarch_displaced_step_free_closure.
11114
11115 2017-06-08  Sergio Durigan Junior  <sergiodj@redhat.com>
11116
11117         * common/common-utils.c (stringify_argv): Check for "arg[0] !=
11118         NULL".
11119
11120 2017-06-08 Alan Hayward  <alan.hayward@arm.com>
11121
11122         * mn10300-tdep.c (MN10300_MAX_REGISTER_SIZE): Add.
11123         (mn10300_extract_return_value): Use MN10300_MAX_REGISTER_SIZE.
11124         (mn10300_push_dummy_call): Likewise.
11125
11126 2017-06-08  Alan Hayward  <alan.hayward@arm.com>
11127
11128         * mi/mi-main.c (register_changed_p): Use value_contents_eq.
11129
11130 2017-06-08  Alan Hayward  <alan.hayward@arm.com>
11131
11132         * mi/mi-main.c (register_changed_p): Use cooked_read_value.
11133
11134 2017-06-07  Sergio Durigan Junior  <sergiodj@redhat.com>
11135
11136         * NEWS (Changes since GDB 8.0): Announce that GDBserver is now
11137         able to start inferiors using a shell.
11138         (New remote packets): Announce new packet "QStartupWithShell".
11139         * remote.c: Add PACKET_QStartupWithShell.
11140         (extended_remote_create_inferior): Handle new
11141         PACKET_QStartupWithShell.
11142         (remote_protocol_features) <QStartupWithShell>: New entry for
11143         PACKET_QStartupWithShell.
11144         (_initialize_remote): Call "add_packet_config_cmd" for
11145         QStartupShell.
11146
11147 2017-06-07  Sergio Durigan Junior  <sergiodj@redhat.com>
11148             Pedro Alves  <palves@redhat.com>
11149
11150         * Makefile.in (HFILES_NO_SRCDIR): Add "common/common-inferior.h"
11151         and "nat/fork-inferior.h".
11152         * common/common-inferior.h: New file, with contents from
11153         "gdb/inferior.h".
11154         * commom/common-utils.c: Include "common-utils.h".
11155         (stringify_argv): New function.
11156         * common/common-utils.h (stringify_argv): New prototype.
11157         * configure.nat: Add "fork-inferior.o" as a dependency for
11158         "*linux*", "fbsd*" and "nbsd*" hosts.
11159         * corefile.c (get_exec_file): Update comment.
11160         * darwin-nat.c (darwin_ptrace_him): Call "gdb_startup_inferior"
11161         instead of "startup_inferior".
11162         (darwin_create_inferior): Call "add_thread_silent" after
11163         "fork_inferior".
11164         * fork-child.c: Cleanup unnecessary includes.
11165         (SHELL_FILE): Move to "common/common-fork-child.c".
11166         (environ): Likewise.
11167         (exec_wrapper): Initialize.
11168         (get_exec_wrapper): New function.
11169         (breakup_args): Move to "common/common-fork-child.c"; rename to
11170         "breakup_args_for_exec".
11171         (escape_bang_in_quoted_argument): Move to
11172         "common/common-fork-child.c".
11173         (saved_ui): New variable.
11174         (prefork_hook): New function.
11175         (postfork_hook): Likewise.
11176         (postfork_child_hook): Likewise.
11177         (gdb_startup_inferior): Likewise.
11178         (fork_inferior): Move to "common/common-fork-child.c".  Update
11179         function to support gdbserver.
11180         (startup_inferior): Likewise.
11181         * gdbcore.h (get_exec_file): Remove declaration.
11182         * gnu-nat.c (gnu_create_inferior): Call "gdb_startup_inferior"
11183         instead of "startup_inferior".  Call "add_thread_silent" after
11184         "fork_inferior".
11185         * inf-ptrace.c: Include "nat/fork-inferior.h" and "utils.h".
11186         (inf_ptrace_create_inferior): Call "gdb_startup_inferior"
11187         instead of "startup_inferior".  Call "add_thread_silent" after
11188         "fork_inferior".
11189         * inferior.h: Include "common-inferior.h".
11190         (trace_start_error): Move to "common/common-utils.h".
11191         (trace_start_error_with_name): Likewise.
11192         (fork_inferior): Move prototype to "nat/fork-inferior.h".
11193         (startup_inferior): Likewise.
11194         (gdb_startup_inferior): New prototype.
11195         * nat/fork-inferior.c: New file, with contents from "fork-child.c".
11196         * nat/fork-inferior.h: New file.
11197         * procfs.c (procfs_init_inferior): Call "gdb_startup_inferior"
11198         instead of "startup_inferior".  Call "add_thread_silent" after
11199         "fork_inferior".
11200         * target.h (target_terminal_init): Move prototype to
11201         "target/target.h".
11202         (target_terminal_inferior): Likewise.
11203         (target_terminal_ours): Likewise.
11204         * target/target.h (target_terminal_init): New prototype, moved
11205         from "target.h".
11206         (target_terminal_inferior): Likewise.
11207         (target_terminal_ours): Likewise.
11208         * utils.c (gdb_flush_out_err): New function.
11209
11210 2017-06-07  Sergio Durigan Junior  <sergiodj@redhat.com>
11211
11212         * Makefile.in (HFILES_NO_SRCDIR): Add "common/common-gdbthread.h".
11213         * common/common-gdbthread.h: New file, with parts from
11214         "gdb/gdbthread.h".
11215         * gdbthread.h: Include "common-gdbthread.h".
11216         (switch_to_thread): Moved to "common/common-gdbthread.h".
11217
11218 2017-06-07  Sergio Durigan Junior  <sergiodj@redhat.com>
11219
11220         * Makefile.in (SFILES): Add "common/job-control.c".
11221         (HFILES_NO_SRCDIR): Add "common/job-control.h".
11222         (COMMON_OBS): Add "job-control.o".
11223         * common/job-control.c: New file, with contents from
11224         "gdb/inflow.c".
11225         * common/job-control.h: New file, with contents from "terminal.h".
11226         * fork-child.c: Include "job-control.h".
11227         * inflow.c: Include "job-control.h".
11228         (gdb_setpgid): Move to "common/common-inflow.c".
11229         (_initialize_inflow): Move setting of "job_control" to
11230         "handle_job_control".
11231         * terminal.h (job_control): Moved to "common/common-terminal.h".
11232         (gdb_setpgid): Likewise.
11233         * top.c: Include "job_control.h".
11234         * utils.c: Likewise.
11235         (job_control): Moved to "job-control.c".
11236
11237 2017-06-07  Pedro Alves  <palves@redhat.com>
11238
11239         * Makefile.in (SFILES): Add gdb_regex.c.
11240         (COMMON_OBS): Add gdb_regex.o.
11241         * ada-lang.c (ada_add_standard_exceptions)
11242         (ada_add_exceptions_from_frame, name_matches_regex)
11243         (ada_add_global_exceptions, ada_exceptions_list_1): Change regex
11244         parameter type to compiled_regex.  Adjust.
11245         (ada_exceptions_list): Use compiled_regex.
11246         * break-catch-throw.c (exception_catchpoint::pattern): Now a
11247         std::unique_ptr<compiled_regex>.
11248         (exception_catchpoint::~exception_catchpoint): Remove regfree
11249         call.
11250         (check_status_exception_catchpoint): Adjust to use compiled_regex.
11251         (handle_gnu_v3_exceptions): Adjust to use compiled_regex.
11252         * breakpoint.c (solib_catchpoint::compiled): Now a
11253         std::unique_ptr<compiled_regex>.
11254         (solib_catchpoint::~solib_catchpoint): Remove regfree call.
11255         (check_status_catch_solib): Adjust to use compiled_regex.
11256         (add_solib_catchpoint): Adjust to use compiled_regex.
11257         * cli/cli-cmds.c (apropos_command): Use compiled_regex.
11258         * cli/cli-decode.c (apropos_cmd): Change regex parameter to
11259         compiled_regex reference.  Adjust to use it.
11260         * cli/cli-decode.h: Remove struct re_pattern_buffer forward
11261         declaration.  Include "gdb_regex.h".
11262         (apropos_cmd): Change regex parameter to compiled_regex reference.
11263         * gdb_regex.c: New file.
11264         * gdb_regex.h (make_regfree_cleanup, get_regcomp_error): Delete
11265         declarations.
11266         (class compiled_regex): New.
11267         * linux-tdep.c: Include "common/gdb_optional.h".
11268         (struct mapping_regexes): New, factored out from
11269         mapping_is_anonymous_p, and adjusted to use compiled_regex.
11270         (mapping_is_anonymous_p): Use mapping_regexes wrapped in a
11271         gdb::optional and remove cleanups.  Adjust to compiled_regex.
11272         * probe.c: Include "common/gdb_optional.h".
11273         (collect_probes): Use compiled_regex and gdb::optional and remove
11274         cleanups.
11275         * skip.c: Include "common/gdb_optional.h".
11276         (skiplist_entry::compiled_function_regexp): Now a
11277         gdb::optional<compiled_regex>.
11278         (skiplist_entry::compiled_function_regexp_is_valid): Delete field.
11279         (free_skiplist_entry): Remove regfree call.
11280         (compile_skip_regexp, skip_rfunction_p): Adjust to use
11281         compiled_regex and gdb::optional.
11282         * symtab.c: Include "common/gdb_optional.h".
11283         (search_symbols): Use compiled_regex and gdb::optional.
11284         * utils.c (do_regfree_cleanup, make_regfree_cleanup)
11285         (get_regcomp_error, compile_rx_or_error): Delete.  Some bits moved
11286         to gdb_regex.c.
11287
11288 2017-06-07  Alan Hayward  <alan.hayward@arm.com>
11289
11290         * regcache.c (regcache::save): Avoid buffer use.
11291         (regcache::dump): Likewise.
11292
11293 2017-06-07  Alan Hayward  <alan.hayward@arm.com>
11294
11295         * sh-tdep.c (sh_pseudo_register_read): Remove
11296         MAX_REGISTER_SIZE.
11297         (sh_pseudo_register_write): Likewise.
11298         * sh64-tdep.c (sh64_pseudo_register_read): Likewise.
11299         (sh64_pseudo_register_write): Likewise
11300
11301 2017-06-07  Alan Hayward  <alan.hayward@arm.com>
11302
11303         * aarch64-tdep.c (aarch64_store_return_value): Use
11304         V_REGISTER_SIZE.
11305         (aarch64_pseudo_read_value): Likewise.
11306         (aarch64_pseudo_write): Likewise.
11307
11308 2017-06-06  Yao Qi  <yao.qi@linaro.org>
11309
11310         * regformats/regdef.h (set_register_cache): Remove the
11311         declaration.
11312
11313 2017-06-06 Alan Hayward  <alan.hayward@arm.com>
11314
11315         * frame.c (frame_unwind_register_signed): Use
11316         frame_unwind_register_value.
11317
11318 2017-06-06  Pedro Alves  <palves@redhat.com>
11319
11320         PR breakpoints/21553
11321         * breakpoint.c (create_breakpoints_sal_default)
11322         (init_breakpoint_sal, create_breakpoint_sal): Use
11323         gdb::unique_xmalloc_ptr for string parameters.
11324         (create_breakpoint): Constify 'extra_string' and 'cond_string'
11325         parameters.  Replace cleanups with gdb::unique_xmalloc_ptr.
11326         (base_breakpoint_create_breakpoints_sal)
11327         (bkpt_create_breakpoints_sal, tracepoint_create_breakpoints_sal)
11328         (strace_marker_create_breakpoints_sal)
11329         (create_breakpoints_sal_default): Use gdb::unique_xmalloc_ptr for
11330         string parameters.
11331         * breakpoint.h (breakpoint_ops::create_breakpoints_sal): Use
11332         gdb::unique_xmalloc_ptr for string parameters.
11333         (create_breakpoint): Constify 'extra_string' and 'cond_string'
11334         parameters.
11335
11336 2017-06-06  Alan Hayward  <alan.hayward@arm.com>
11337
11338         * alpha-tdep.c (alpha_register_to_value): Use
11339         get_frame_register_value.
11340         (alpha_value_to_register): Use ALPHA_REGISTER_SIZE.
11341
11342 2017-06-06  Alan Hayward  <alan.hayward@arm.com>
11343
11344         * ia64-tdep.c (IA64_MAX_FP_REGISTER_SIZE) Add.
11345         (ia64_register_to_value): Use IA64_MAX_FP_REGISTER_SIZE.
11346         (ia64_value_to_register): Likewise.
11347         (ia64_extract_return_value): Likewise.
11348         (ia64_store_return_value): Likewise.
11349         (ia64_push_dummy_call): Likewise.
11350
11351 2017-06-04  Joel Brobecker  <brobecker@adacore.com>
11352
11353         GDB 8.0 released.
11354
11355 2017-06-03  Simon Marchi  <simon.marchi@ericsson.com>
11356
11357         * x86-linux-nat.c (struct arch_lwp_info): Remove.
11358
11359 2017-06-03  Simon Marchi  <simon.marchi@polymtl.ca>
11360
11361         * linux-nat.c (linux_nat_post_attach_wait): Remove FIRST
11362         parameter.
11363         (linux_nat_attach): Adjust call to linux_nat_post_attach_wait.
11364
11365 2017-06-02  Simon Marchi  <simon.marchi@ericsson.com>
11366
11367         * event-loop.c (poll_timers): Unallocate timer using delete
11368         instead of xfree.
11369
11370 2017-06-02  Simon Marchi  <simon.marchi@polymtl.ca>
11371
11372         * breakpoint.h (struct breakpoint_ops) <dtor>: Remove.
11373         (struct breakpoint) <~breakpoint>: New.
11374         (struct watchpoint): Inherit from breakpoint.
11375         <~watchpoint>: New.
11376         <base>: Remove.
11377         (struct tracepoint): Inherit from breakpoint.
11378         <base>: Remove.
11379         * breakpoint.c (longjmp_breakpoint_ops): Remove.
11380         (struct longjmp_breakpoint): Inherit from breakpoint.
11381         <~longjmp_breakpoint>: New.
11382         <base>: Remove.
11383         (new_breakpoint_from_type): Remove casts.
11384         (watchpoint_in_thread_scope): Remove reference to base field.
11385         (watchpoint_del_at_next_stop): Likewise.
11386         (update_watchpoint): Likewise.
11387         (watchpoint_check): Likewise.
11388         (bpstat_check_watchpoint): Likewise.
11389         (set_longjmp_breakpoint): Likewise.
11390         (struct fork_catchpoint): Inherit from breakpoint.
11391         <base>: Remove.
11392         (struct solib_catchpoint): Inherit from breakpoint.
11393         <~solib_catchpoint>: New.
11394         <base>: Remove.
11395         (dtor_catch_solib): Change to ...
11396         (solib_catchpoint::~solib_catchpoint): ... this.
11397         (breakpoint_hit_catch_solib): Remove reference to base field.
11398         (add_solib_catchpoint): Likewise.
11399         (create_fork_vfork_event_catchpoint): Likewise.
11400         (struct exec_catchpoint): Inherit from breakpoint.
11401         <~exec_catchpoint>: New.
11402         <base>: Remove.
11403         (dtor_catch_exec): Change to ...
11404         (exec_catchpoint::~exec_catchpoint): ... this.
11405         (dtor_watchpoint): Change to ...
11406         (watchpoint::~watchpoint): ... this.
11407         (watch_command_1): Remove reference to base field.
11408         (catch_exec_command_1): Likewise.
11409         (base_breakpoint_dtor): Change to ...
11410         (breakpoint::~breakpoint): ... this.
11411         (base_breakpoint_ops): Remove dtor field value.
11412         (longjmp_bkpt_dtor): Change to ...
11413         (longjmp_breakpoint::~longjmp_breakpoint): ... this.
11414         (strace_marker_create_breakpoints_sal): Remove reference to base
11415         field.
11416         (delete_breakpoint): Don't manually call breakpoint destructor.
11417         (create_tracepoint_from_upload): Remove reference to base field.
11418         (trace_pass_set_count): Likewise.
11419         (initialize_breakpoint_ops): Don't initialize
11420         momentary_breakpoint_ops, don't set dtors.
11421         * ada-lang.c (struct ada_catchpoint): Inherit from breakpoint.
11422         <~ada_catchpoint>: New.
11423         <base>: Remove.
11424         (create_excep_cond_exprs): Remove reference to base field.
11425         (dtor_exception): Change to ...
11426         (ada_catchpoint::~ada_catchpoint): ... this.
11427         (dtor_catch_exception): Remove.
11428         (dtor_catch_exception_unhandled): Remove.
11429         (dtor_catch_assert): Remove.
11430         (create_ada_exception_catchpoint): Remove reference to base
11431         field.
11432         (initialize_ada_catchpoint_ops): Don't set dtors.
11433         * break-catch-sig.c (struct signal_catchpoint): Inherit from
11434         breakpoint.
11435         <~signal_catchpoint>: New.
11436         <base>: Remove.
11437         (signal_catchpoint_dtor): Change to ...
11438         (signal_catchpoint::~signal_catchpoint): ... this.
11439         (create_signal_catchpoint): Remove reference to base field.
11440         (initialize_signal_catchpoint_ops): Don't set dtor.
11441         * break-catch-syscall.c (struct syscall_catchpoint): Inherit
11442         from breakpoint.
11443         <~syscall_catchpoint>: New.
11444         <base>: Remove.
11445         (dtor_catch_syscall): Change to ...
11446         (syscall_catchpoint::~syscall_catchpoint): ... this.
11447         (create_syscall_event_catchpoint): Remove reference to base
11448         field.
11449         (initialize_syscall_catchpoint_ops): Don't set dtor.
11450         * break-catch-throw.c (struct exception_catchpoint): Inherit
11451         from breakpoint.
11452         <~exception_catchpoint>: New.
11453         <base>: Remove.
11454         (dtor_exception_catchpoint): Change to ...
11455         (exception_catchpoint::~exception_catchpoint): ... this.
11456         (handle_gnu_v3_exceptions): Remove reference to base field.
11457         (initialize_throw_catchpoint_ops): Don't set dtor.
11458         * ctf.c (ctf_get_traceframe_address): Remove reference to base
11459         field.
11460         * remote.c (remote_get_tracepoint_status): Likewise.
11461         * tracefile-tfile.c (tfile_get_traceframe_address): Likewise.
11462         * tracefile.c (tracefile_fetch_registers): Likewise.
11463         * tracepoint.c (actions_command): Likewise.
11464         (validate_actionline): Likewise.
11465         (tfind_1): Likewise.
11466         (get_traceframe_location): Likewise.
11467         (find_matching_tracepoint_location): Likewise.
11468         (parse_tracepoint_status): Likewise.
11469         * mi/mi-cmd-break.c (mi_cmd_break_passcount): Likewise.
11470
11471 2017-06-02  Simon Marchi  <simon.marchi@polymtl.ca>
11472
11473         * breakpoint.c (struct longjmp_breakpoint): New struct.
11474         (is_tracepoint_type): Change return type to bool.
11475         (is_longjmp_type): New function.
11476         (new_breakpoint_from_type): Handle longjmp kinds of breakpoints.
11477         (set_raw_breakpoint_without_location): Use
11478         new_breakpoint_from_type.
11479         (set_raw_breakpoint): Likewise.
11480
11481 2017-06-02  Simon Marchi  <simon.marchi@polymtl.ca>
11482
11483         * breakpoint.c (new_breakpoint_from_type): New function.
11484         (create_breakpoint_sal): Use new_breakpoint_from_type and
11485         unique_ptr.
11486         (create_breakpoint): Likewise.
11487
11488 2017-05-31  Simon Marchi  <simon.marchi@ericsson.com>
11489
11490         * memattr.c (mem_info_command): Rename to ...
11491         (info_mem_command): ... this.
11492         (mem_enable_command): Rename to ...
11493         (enable_mem_command): ... this.
11494         (mem_disable_command): Rename to ...
11495         (disable_mem_command): ... this.
11496         (mem_delete_command): Rename to ...
11497         (delete_mem_command): ... this.
11498         (_initialize_mem): Adjust function names.
11499
11500 2017-05-31  Markus Metzger  <markus.t.metzger@intel.com>
11501
11502         * btrace.c (handle_pt_insn_events): New.
11503         (ftrace_add_pt): Call handle_pt_insn_events.  Rename ERRCODE into
11504         STATUS.  Split into this and ...
11505         (handle_pt_insn_event_flags): ... this.
11506
11507 2017-05-31  Markus Metzger  <markus.t.metzger@intel.com>
11508
11509         * configure.ac: Check for pt_insn_event, struct pt_insn.enabled,
11510         and struct pt_insn.resynced.
11511         * configure: Regenerated.
11512         * config.in: Regenerated.
11513
11514 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
11515
11516         * btrace.c (ftrace_find_call_by_number): New function.
11517         (ftrace_new_function): Store objects, not pointers.
11518         (ftrace_find_call_by_number, ftrace_new_return, ftrace_new_switch,
11519         ftrace_new_gap, ftrace_update_function,
11520         ftrace_compute_global_level_offset, btrace_stich_bts, btrace_clear,
11521         btrace_insn_get, btrace_insn_get_error, btrace_insn_end,
11522         btrace_insn_next, btrace_insn_prev, ptrace_find_insn_by_number,
11523         btrace_ends_with_single_insn, btrace_call_get): Account for
11524         btrace_thread_info::functions now storing objects.
11525         * btrace.h (struct btrace_thread_info): Add constructor.
11526         (struct btrace_thread_info) <functions>: Make std::vector.
11527         (struct btrace_thread_info) <prev, next, up, insn, errcode, flags):
11528         Initialize with default values.
11529         * record-btrace.c (record_btrace_frame_sniffer): Account for
11530         btrace_thread_info::functions now storing objects.
11531
11532 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
11533
11534         * btrace.c: Remove typedef bfun_s.
11535         (ftrace_new_gap): Directly add gaps to the list of gaps.
11536         (btrace_bridge_gaps, btrace_compute_ftrace_bts, pt_btrace_insn_flags,
11537         ftrace_add_pt, btrace_compute_ftrace_pt, btrace_compute_ftrace_1,
11538         btrace_finalize_ftrace, btrace_compute_ftrace): Use std::vector
11539         instead of gdb VEC.
11540
11541 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
11542
11543         * btrace.c (ftrace_fixup_caller, ftrace_new_return, ftrace_connect_bfun,
11544         ftrace_bridge_gap): Replace references to btrace_thread_info::segment
11545         with btrace_thread_info::next_segment and
11546         btrace_thread_info::prev_segment.
11547         * btrace.h: Remove struct btrace_func_link.
11548         (struct btrace_function): Replace pair of function segment pointers
11549         with pair of indices.
11550         * python/py-record-btrace.c (btpy_call_prev_sibling,
11551         btpy_call_next_sibling): Replace references to
11552         btrace_thread_info::segment with btrace_thread_info::next_segment and
11553         btrace_thread_info::prev_segment.
11554         * record-btrace.c (record_btrace_frame_this_id): Use
11555         btrace_find_call_by_number.
11556
11557 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
11558
11559         * btrace.c (ftrace_new_function, ftrace_fixup_level,
11560         ftrace_connect_bfun, ftrace_bridge_gap, btrace_bridge_gaps,
11561         btrace_insn_next, btrace_insn_prev): Remove references to
11562         btrace_thread_info::flow.
11563         * btrace.h (struct btrace_function): Remove FLOW.
11564
11565 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
11566
11567         * btrace.c (ftrace_find_call_by_number): New function.
11568         (ftrace_update_caller, ftrace_new_call, ftrace_new_tailcall,
11569         ftrace_get_caller, ftrace_find_call, ftrace_new_return,
11570         ftrace_match_backtrace, ftrace_connect_bfun, ftrace_connect_backtrace,
11571         ftrace_bridge_gap, btrace_bridge_gaps): Use btrace_function::up as an
11572         index.
11573         * btrace.h (struct btrace_function): Turn UP into an index.
11574         * python/py-record-btrace.c (btpy_call_up): Use btrace_function::up
11575         as an index.
11576         * record-btrace.c (record_btrace_frame_unwind_stop_reason,
11577         record_btrace_frame_prev_register, record_btrace_frame_sniffer,
11578         record_btrace_tailcall_frame_sniffe): Use btrace_find_call_by_number.
11579
11580 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
11581
11582         * btrace.c (ftrace_new_function, ftrace_new_call, ftrace_new_tailcall,
11583         ftrace_new_return, ftrace_new_switch, ftrace_new_gap,
11584         ftrace_update_function, ftrace_compute_global_level_offset,
11585         btrace_compute_ftrace_bts, ftrace_add_pt, btrace_compute_ftrace_pt,
11586         btrace_stitch_bts, btrace_fetch, btrace_clear, btrace_insn_number,
11587         btrace_insn_end, btrace_is_empty): Remove references to
11588         btrace_thread_info::begin and btrace_thread_info::end.
11589         * btrace.h (struct btrace_thread_info): Remove BEGIN and END.
11590         (struct btrace_thread_info) <functions>: Adjust comment.
11591         * record-btrace.c (record_btrace_start_replaying): Remove reference to
11592         btrace_thread_info::begin.
11593
11594 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
11595
11596         * btrace.c (ftrace_new_function, ftrace_new_call, ftrace_new_tailcall,
11597         ftrace_new_return, ftrace_new_switch, ftrace_new_gap,
11598         ftrace_update_function): Remove arguments that implicitly were always
11599         BTINFO->END.
11600         (btrace_compute_ftrace_bts, ftrace_add_pt, btrace_compute_ftrace_pt):
11601         Don't pass BTINFO->END.
11602
11603 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
11604
11605         * btrace.c: (btrace_insn_get, btrace_insn_get_error, btrace_insn_number,
11606         btrace_insn_begin, btrace_insn_end, btrace_insn_next, btrace_insn_prev,
11607         btrace_find_insn_by_number): Replace function segment pointer with
11608         index.
11609         (btrace_insn_cmp): Simplify.
11610         * btrace.h: (struct btrace_insn_iterator) Rename index to
11611         insn_index.  Replace function segment pointer with index into function
11612         segment vector.
11613         * record-btrace.c (record_btrace_call_history): Replace function
11614         segment pointer use with index.
11615         (record_btrace_frame_sniffer): Retrieve function call segment through
11616         vector.
11617         (record_btrace_set_replay): Remove defunc't safety check.
11618
11619 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
11620
11621         * btrace.c (btrace_ends_with_single_insn): New function.
11622         (btrace_call_get, btrace_call_number, btrace_call_begin,
11623         btrace_call_end, btrace_call_next, btrace_call_prev,
11624         btrace_find_call_by_number): Use index into call segment vector
11625         instead of pointer.
11626         (btrace_call_cmp): Simplify.
11627         * btrace.h (struct btrace_call_iterator): Replace function call segment
11628         pointer with index into vector.
11629         * record-btrace.c (record_btrace_call_history): Use index instead of
11630         pointer.
11631
11632 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
11633
11634         * btrace.c (btrace_insn_begin, btrace_insn_end,
11635         btrace_find_insn_by_number): Add btinfo to iterator.
11636         * btrace.h (struct btrace_insn_iterator): Add btinfo.
11637
11638 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
11639
11640         * btrace.c (ftrace_new_function): Add btrace_thread_info to arguments
11641         and save pointers directly.
11642         (ftrace_new_call, ftrace_new_tailcall, ftrace_new_return,
11643         ftrace_new_switch, ftrace_new_gap, ftrace_update_function,
11644         ftrace_add_pt): Add btrace_thread_info to arguments.  Adjust for
11645         changed signature of functions.
11646         (btrace_compute_ftrace_pt): Adjust for changed signature of functions.
11647         (btrace_fetch): Remove code that adds btrace_function pointers to
11648         vector of btrace_functions.
11649         (btrace_clear): Simplify freeing vector of btrace_functions.
11650
11651 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
11652
11653         * btrace.c (btrace_fetch, btrace_clear, btrace_find_insn_by_number):
11654         Replace VEC_* with std::vector functions.
11655         * btrace.h: Add include: vector. Remove typedef for DEF_VEC_P.
11656         (struct btrace_thread_info)<functions>: Change type to std::vector.
11657
11658 2017-05-30  Simon Marchi  <simon.marchi@ericsson.com>
11659
11660         * NEWS (Changes in GDB 8.0): Remove extra empty line.  Move
11661         "Removed targets and native configurations" up.  Merge duplicate
11662         "New commands" sub-sections.  Add "New options" sub-sections.
11663
11664 2017-05-26  Alan Hayward  <alan.hayward@arm.com>
11665
11666         * defs.h (copy_integer_to_size): New declaration.
11667         * findvar.c (copy_integer_to_size): New function.
11668         (do_cint_test): New selftest function.
11669         (copy_integer_to_size_test): Likewise.
11670         (_initialize_findvar): Likewise.
11671         * mips-fbsd-tdep.c (mips_fbsd_supply_reg): Use raw_supply_integer.
11672         (mips_fbsd_collect_reg): Use raw_collect_integer.
11673         * mips-linux-tdep.c (supply_32bit_reg): Use raw_supply_integer.
11674         (mips64_fill_gregset): Use raw_collect_integer
11675         (mips64_fill_fpregset): Use raw_supply_integer.
11676         * regcache.c (regcache::raw_supply_integer): New function.
11677         (regcache::raw_collect_integer): Likewise.
11678         * regcache.h: (regcache::raw_supply_integer): New declaration.
11679         (regcache::raw_collect_integer): Likewise.
11680
11681 2017-05-24  Yao Qi  <yao.qi@linaro.org>
11682
11683         * Makefile.in (SFILES): Add gdbarch-selftests.c.
11684         (COMMON_OBS): Add gdbarch-selftests.o.
11685         * frame.c [GDB_SELF_TESTS] (create_new_frame): New function.
11686         * frame.h [GDB_SELF_TESTS] (create_new_frame): Declare.
11687         * gdbarch-selftests.c: New file.
11688         * regcache.h (regcache) <~regcache>: Mark it virtual if
11689         GDB_SELF_TEST.
11690         <raw_write>: Likewise.
11691
11692 2017-05-24  Yao Qi  <yao.qi@linaro.org>
11693
11694         * regcache.c (current_regcache): Change it to
11695         regcache::current_regcache.
11696         (regcache_observer_target_changed): Update.
11697         (regcache_thread_ptid_changed): Make it a regcache static
11698         method.
11699         (regcache_thread_ptid_changed): Update.
11700         (class regcache_access): New.
11701         (current_regcache_test): Update.
11702         (_initialize_regcache): Update.
11703         * regcache.h: Include forward_list.
11704         (regcache): Declare regcache_thread_ptid_changed and declare
11705         registers_changed_ptid as friend.
11706
11707 2017-05-24  Yao Qi  <yao.qi@linaro.org>
11708
11709         * i387-tdep.c (i387_register_to_value): Use register_size
11710         instead of TYPE_LENGTH.
11711         * m68k-tdep.c (m68k_register_to_value): Likewise.
11712
11713 2017-05-24  Yao Qi  <yao.qi@linaro.org>
11714
11715         * i387-tdep.c (i387_convert_register_p): Return false if type
11716         code isn't TYPE_CODE_FLT.
11717
11718 2017-05-24  Yao Qi  <yao.qi@linaro.org>
11719
11720         * alpha-tdep.c (alpha_convert_register_p): Return true if type
11721         length is 4.
11722         (alpha_register_to_value): Remove type length check.
11723         (alpha_value_to_register): Likewise.
11724
11725 2017-05-24  Yao Qi  <yao.qi@linaro.org>
11726
11727         * ia64-tdep.c (ia64_convert_register_p): Check type's code is
11728         TYPE_CODE_FLT.
11729
11730 2017-05-24  Yao Qi  <yao.qi@linaro.org>
11731
11732         * m68k-tdep.c (m68k_convert_register_p): Check type's code is
11733         TYPE_CODE_FLT or not.
11734
11735 2017-05-24  Yao Qi  <yao.qi@linaro.org>
11736
11737         * alpha-tdep.c (alpha_gdbarch_init): Use XCNEW instead of XNEW.
11738         * avr-tdep.c (avr_gdbarch_init): Likewise.
11739         * bfin-tdep.c (bfin_gdbarch_init): Likewise.
11740         * cris-tdep.c (cris_gdbarch_init): Likewise.
11741         * ft32-tdep.c (ft32_gdbarch_init): Likewise.
11742         * lm32-tdep.c (lm32_gdbarch_init): Likewise.
11743         * m32r-tdep.c (m32r_gdbarch_init): Likewise.
11744         * m68hc11-tdep.c (m68hc11_gdbarch_init): Likewise.
11745         * mep-tdep.c (mep_gdbarch_init): Likewise.
11746         * microblaze-tdep.c (microblaze_gdbarch_init): Likewise.
11747         * mips-tdep.c (mips_gdbarch_init): Likewise.
11748         * mn10300-tdep.c (mn10300_gdbarch_init): Likewise.
11749         * moxie-tdep.c (moxie_gdbarch_init): Likewise.
11750         * msp430-tdep.c (msp430_gdbarch_init): Likewise.
11751         * sh64-tdep.c (sh64_gdbarch_init): Likewise.
11752         * v850-tdep.c (v850_gdbarch_init): Likewise.
11753
11754 2017-05-24  Yao Qi  <yao.qi@linaro.org>
11755
11756         * selftest-arch.c (tests_with_arch): Call registers_changed
11757         and reinit_frame_cache.
11758         * selftest.c (run_self_tests): Likewise.
11759
11760 2017-05-24  Yao Qi  <yao.qi@linaro.org>
11761
11762         * rs6000-tdep.c (gdb_print_insn_powerpc): Remove.
11763         (rs6000_gdbarch_init): Don't call set_gdbarch_print_insn.
11764
11765 2017-05-24  Yao Qi  <yao.qi@linaro.org>
11766
11767         * rl78-tdep.c (rl78_gdbarch_init): Don't call
11768         set_gdbarch_print_insn.
11769
11770 2017-05-24  Yao Qi  <yao.qi@linaro.org>
11771
11772         * h8300-tdep.c (h8300_gdbarch_init): Don't call
11773         set_gdbarch_print_insn.
11774
11775 2017-05-24  Yao Qi  <yao.qi@linaro.org>
11776
11777         * alpha-tdep.c (alpha_gdbarch_init): Don't call
11778         set_gdbarch_print_insn.
11779         * arc-tdep.c (arc_gdbarch_init): Likewise.
11780         * arch-utils.c: include dis-asm.h.
11781         (default_print_insn): New function.
11782         * arch-utils.h (default_print_insn): Declare.
11783         * avr-tdep.c (avr_gdbarch_init): Don't call set_gdbarch_print_insn.
11784         * bfin-tdep.c (bfin_gdbarch_init): Likewise.
11785         * cris-tdep.c (cris_delayed_get_disassembler): Remove.
11786         (cris_gdbarch_init): Don't call set_gdbarch_print_insn.
11787         * frv-tdep.c (frv_gdbarch_init): Likewise.
11788         * ft32-tdep.c (ft32_gdbarch_init): Likewise.
11789         * gdbarch.sh (print_insn): Use default_print_insn.
11790         * gdbarch.c: Regenerated.
11791         * hppa-tdep.c (hppa_gdbarch_init): Likewise.
11792         * iq2000-tdep.c (iq2000_gdbarch_init): Likewise.
11793         * lm32-tdep.c (lm32_gdbarch_init): Likewise.
11794         * m32c-tdep.c (m32c_gdbarch_init): Likewise.
11795         * m32r-tdep.c (m32r_gdbarch_init): Likewise.
11796         * m68hc11-tdep.c (gdb_print_insn_m68hc11): Remove.
11797         (m68hc11_gdbarch_init): Don't call set_gdbarch_print_insn.
11798         * m68k-tdep.c (m68k_gdbarch_init): Likewise.
11799         * m88k-tdep.c (m88k_gdbarch_init): Likewise.
11800         * microblaze-tdep.c (microblaze_gdbarch_init): Likewise.
11801         * mn10300-tdep.c (mn10300_gdbarch_init): Likewise.
11802         * moxie-tdep.c (moxie_gdbarch_init): Likewise.
11803         * msp430-tdep.c (msp430_gdbarch_init): Likewise.
11804         * mt-tdep.c (mt_gdbarch_init): Likewise.
11805         * nds32-tdep.c (nds32_gdbarch_init): Likewise.
11806         * nios2-tdep.c (nios2_print_insn): Remove.
11807         (nios2_gdbarch_init): Don't call set_gdbarch_print_insn.
11808         * rx-tdep.c (rx_gdbarch_init): Likewise.
11809         * s390-linux-tdep.c (s390_gdbarch_init): Likewise.
11810         * score-tdep.c (score_print_insn): Remove.
11811         (score_gdbarch_init): Don't call set_gdbarch_print_insn.
11812         * sh-tdep.c (sh_gdbarch_init): Likewise.
11813         * sh64-tdep.c (sh64_gdbarch_init): Likewise.
11814         * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
11815         * tic6x-tdep.c (tic6x_print_insn): Remove.
11816         (tic6x_gdbarch_init): Don't call set_gdbarch_print_insn.
11817         * tilegx-tdep.c (tilegx_gdbarch_init): Likewise.
11818         * v850-tdep.c (v850_gdbarch_init): Likewise.
11819         * vax-tdep.c (vax_gdbarch_init): Likewise.
11820         * xstormy16-tdep.c (xstormy16_gdbarch_init): Likewise.
11821         * xtensa-tdep.c (xtensa_gdbarch_init): Likewise.
11822
11823 2017-05-23  John Baldwin  <jhb@FreeBSD.org>
11824
11825         * mips-fbsd-tdep.c (MIPS_PC_REGNUM): Remove.
11826         (MIPS_FP0_REGNUM): Remove.
11827         (MIPS_FSR_REGNUM): Remove.
11828         (mips_fbsd_supply_fpregs): Use mips_regnum.
11829         (mips_fbsd_supply_gregs): Likewise.
11830         (mips_fbsd_collect_fpregs): Likewise.
11831         (mips_fbsd_collect_gregs): Likewise.
11832
11833 2017-05-23  John Baldwin  <jhb@FreeBSD.org>
11834
11835         * mips-fbsd-nat.c (getregs_supplies): Fix upper bound comparison.
11836         (getpfpregs_supplies): New function.
11837         (mips_fbsd_fetch_inferior_registers): Remove early exit and use
11838         getfpregs_supplies.
11839         (mips_fbsd_store_inferior_registers): Likewise.
11840
11841 2017-05-22  Pedro Alves <palves@redhat.com>
11842
11843         * MAINTAINERS (Host/Native): Add John Baldwin as FreeBSD
11844         maintainer.
11845
11846 2017-05-22  Alan Hayward  <alan.hayward@arm.com>
11847
11848         * ppc-linux-nat.c (fetch_register): Use PPC_MAX_REGISTER_SIZE.
11849         (store_register): Likewise.
11850         * ppc-sysv-tdep.c (ppc_sysv_abi_push_dummy_call): Likewise.
11851         (get_decimal_float_return_value): Likewise.
11852         (do_ppc_sysv_return_value): Likewise.
11853         (ppc64_sysv_abi_push_integer): Likewise.
11854         (ppc64_sysv_abi_push_freg): Likewise.
11855         (ppc64_sysv_abi_return_value_base): Likewise.
11856         (ppc64_sysv_abi_return_value): Likewise.
11857         * rs6000-aix-tdep.c (rs6000_push_dummy_call): Likewise.
11858         * rs6000-lynx178-tdep.c (rs6000_lynx178_push_dummy_call): Likewise.
11859         * rs6000-nat.c: Likewise.
11860         * rs6000-tdep.c (rs6000_register_to_value): Likewise.
11861         (rs6000_value_to_register): Likewise.
11862         * ppc-tdep.h (PPC_MAX_REGISTER_SIZE): Add.
11863
11864 2017-05-21  Tom Tromey  <tom@tromey.com>
11865
11866         PR rust/21466:
11867         * rust-lang.c (rust_print_type) <TYPE_CODE_ARRAY>: Print unsized
11868         arrays as "[T]", not "[T; ]".
11869
11870 2017-05-19  Tom Tromey  <tom@tromey.com>
11871
11872         PR rust/21484:
11873         * rust-lang.c (exp_descriptor_rust): New function.
11874         (rust_language_defn): Use it.
11875         * p-lang.c (pascal_language_defn): Update.
11876         * opencl-lang.c (opencl_language_defn): Update.
11877         * objc-lang.c (objc_language_defn): Update.
11878         * m2-lang.c (m2_language_defn): Update.
11879         * language.h (struct language_defn)
11880         <la_watch_location_expression>: New member.
11881         * language.c (unknown_language_defn, auto_language_defn)
11882         (local_language_defn): Update.
11883         * go-lang.c (go_language_defn): Update.
11884         * f-lang.c (f_language_defn): Update.
11885         * d-lang.c (d_language_defn): Update.
11886         * c-lang.h (c_watch_location_expression): Declare.
11887         * c-lang.c (c_watch_location_expression): New function.
11888         (c_language_defn, cplus_language_defn, asm_language_defn)
11889         (minimal_language_defn): Use it.
11890         * breakpoint.c (watch_command_1): Call
11891         la_watch_location_expression.
11892         * ada-lang.c (ada_language_defn): Update.
11893
11894 2017-05-19  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
11895
11896         PR tui/21482
11897         * gdb_curses.h (NOMACROS): Define.
11898         (NCURSES_NOMACROS): Define.
11899
11900 2017-05-19  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
11901
11902         PR tui/21482
11903         * tui/tui-windata.c (tui_erase_data_content): Cast last mvwaddstr
11904         arg to char *.
11905         * tui/tui-wingeneral.c (box_win): Likewise.
11906         * tui/tui-winsource.c (tui_erase_source_content): Likewise.
11907         (tui_show_source_line): Likewise.
11908         (tui_show_exec_info_content): Likewise.
11909
11910 2017-05-19  Vladimir Mezentsev  <vladimir.mezentsev@oracle.com>
11911
11912         * sparc-tdep.c (sparc_structure_return_p)
11913         (sparc_arg_on_registers_p): New functions.
11914         (sparc32_store_arguments): Use them.
11915         * sparc64-tdep.c (sparc64_16_byte_align_p)
11916         (sparc64_store_floating_fields, sparc64_extract_floating_fields):
11917         Handle TYPE_CODE_ARRAY.
11918
11919 2017-05-17  Yao Qi  <yao.qi@linaro.org>
11920
11921         * cli/cli-decode.c (add_alias_cmd): New function.
11922         * command.h (add_alias_cmd): Declare.
11923         * infcmd.c (_initialize_infcmd): Don't call add_com_alias,
11924         instead call add_alias_cmd.
11925
11926 2017-05-17  Pedro Alves  <palves@redhat.com>
11927
11928         * Makefile.in (nat_extra_makefile_frag): Rename to ...
11929         (nat_makefile_frag): ... this.  All references updated.
11930         * configure.ac: Likewise.
11931         * configure.nat: Likewise.  Enhance comments.
11932         * configure: Regenerate.
11933
11934 2017-05-15  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
11935
11936         * procfs.c (procfs_create_inferior): Change prototype to match
11937         definition.
11938
11939 2017-05-13  Eli Zaretskii  <eliz@gnu.org>
11940
11941         * tui/tui.c (tui_enable): Cast "unknown" to 'char *' to avoid a
11942         C++ compiler warning.
11943
11944 2017-05-12  Tom Tromey  <tom@tromey.com>
11945
11946         PR rust/21483:
11947         * rust-lang.c (rust_evaluate_subexp) <STRUCTOP_STRUCT>: Don't
11948         recurse, just call value_struct_elt directly.
11949
11950 2017-05-12  Tom Tromey  <tom@tromey.com>
11951
11952         * rust-lang.c (rust_dump_subexp_body) <STRUCTOP_ANONYMOUS,
11953         OP_RUST_ARRAY>: Fix.
11954
11955 2017-05-12  Tom Tromey  <tom@tromey.com>
11956
11957         * rust-lang.c (rust_print_subexp): Replace "return" with "break".
11958
11959 2017-05-09  Yao Qi  <yao.qi@linaro.org>
11960
11961         * regcache.c: Include <forward_list>.
11962         (struct regcache_list): Remove.
11963         (current_regcache): Update.
11964         (get_thread_arch_aspace_regcache): Update for std::forward_list.
11965         (regcache_thread_ptid_changed): Likewise.
11966         (registers_changed_ptid): Likewise.
11967         (current_regcache_size): Likewise.
11968
11969 2017-05-09  Yao Qi  <yao.qi@linaro.org>
11970
11971         * regcache.c [GDB_SELF_TEST]: Include selftest.h.
11972         (current_regcache_size): New function.
11973         (current_regcache_test): New function.
11974         (_initialize_regcache) [GDB_SELF_TEST]: Register the unit test.
11975
11976 2017-05-08  Alan Hayward  <alan.hayward@arm.com>
11977
11978         * mips-tdep.c (mips_o32_return_value): Remove unused buffer.
11979         (print_gp_register_row): Use get_frame_register_value.
11980
11981 2017-05-08  Alan Hayward  <alan.hayward@arm.com>
11982
11983         * mips-linux-tdep.c (mips_supply_gregset): Use raw_supply_zeroed.
11984         (mips_supply_fpregset): Likewise.
11985         (mips64_supply_gregset): Likewise.
11986
11987 2017-05-08  Alan Hayward  <alan.hayward@arm.com>
11988
11989         * mn10300-linux-tdep.c (am33_supply_gregset_method): Use 
11990         regcache->raw_supply_zeroed.
11991
11992 2017-05-06  Sergio Durigan Junior  <sergiodj@redhat.com>
11993
11994         * configure.nat: Rearrange 'case' statements to match
11995         host before cpu.
11996
11997 2017-05-06  Sergio Durigan Junior  <sergiodj@redhat.com>
11998
11999         * Makefile.in: Remove "@host_makefile_frag@".  Add variables
12000         NAT_FILE, NATDEPFILES, NAT_CDEPS, LOADLIBES, MH_CFLAGS, XM_CLIBS,
12001         NAT_GENERATED_FILES, HAVE_NATIVE_GCORE_HOST.  Add
12002         "@nat_extra_makefile_frag@".
12003         (Makefile): Remove dependency on "@frags@".
12004         ($(GNULIB_BUILDDIR)/Makefile): Likewise.
12005         (data-directory/Makefile): Likewise.
12006         * config/aarch64/linux.mh: Deleted; moved contents to
12007         "gdb/configure.nat".
12008         * config/alpha/alpha-linux.mh: Likewise.
12009         * config/alpha/nbsd.mh: Likewise.
12010         * config/arm/linux.mh: Likewise.
12011         * config/arm/nbsdelf.mh: Likewise.
12012         * config/i386/cygwin.mh: Likewise.
12013         * config/i386/cygwin64.mh: Likewise.
12014         * config/i386/darwin.mh: Likewise.
12015         * config/i386/fbsd.mh: Likewise.
12016         * config/i386/fbsd64.mh: Likewise.
12017         * config/i386/go32.mh: Likewise.
12018         * config/i386/i386gnu.mh: Likewise.
12019         * config/i386/i386sol2.mh: Likewise.
12020         * config/i386/linux.mh: Likewise.
12021         * config/i386/linux64.mh: Likewise.
12022         * config/i386/mingw.mh: Likewise.
12023         * config/i386/mingw64.mh: Likewise.
12024         * config/i386/nbsd64.mh: Likewise.
12025         * config/i386/nbsdelf.mh: Likewise.
12026         * config/i386/nto.mh: Likewise.
12027         * config/i386/obsd.mh: Likewise.
12028         * config/i386/obsd64.mh: Likewise.
12029         * config/i386/sol2-64.mh: Likewise.
12030         * config/ia64/linux.mh: Likewise.
12031         * config/m32r/linux.mh: Likewise.
12032         * config/m68k/linux.mh: Likewise.
12033         * config/m68k/nbsdelf.mh: Likewise.
12034         * config/m68k/obsd.mh: Likewise.
12035         * config/m88k/obsd.mh: Likewise.
12036         * config/mips/fbsd.mh: Likewise.
12037         * config/mips/linux.mh: Likewise.
12038         * config/mips/nbsd.mh: Likewise.
12039         * config/mips/obsd64.mh: Likewise.
12040         * config/pa/linux.mh: Likewise.
12041         * config/pa/nbsd.mh: Likewise.
12042         * config/pa/obsd.mh: Likewise.
12043         * config/powerpc/aix.mh: Likewise.
12044         * config/powerpc/fbsd.mh: Likewise.
12045         * config/powerpc/linux.mh: Likewise.
12046         * config/powerpc/nbsd.mh: Likewise.
12047         * config/powerpc/obsd.mh: Likewise.
12048         * config/powerpc/ppc64-linux.mh: Likewise.
12049         * config/powerpc/spu-linux.mh: Likewise.
12050         * config/s390/linux.mh: Likewise.
12051         * config/sh/nbsd.mh: Likewise.
12052         * config/sparc/fbsd.mh: Likewise.
12053         * config/sparc/linux.mh: Likewise.
12054         * config/sparc/linux64.mh: Likewise.
12055         * config/sparc/nbsd64.mh: Likewise.
12056         * config/sparc/nbsdelf.mh: Likewise.
12057         * config/sparc/obsd64.mh: Likewise.
12058         * config/sparc/sol2.mh: Likewise.
12059         * config/tilegx/linux.mh: Likewise.
12060         * config/vax/nbsdelf.mh: Likewise.
12061         * config/vax/obsd.mh: Likewise.
12062         * config/xtensa/linux.mh: Likewise.
12063         * config/i386/i386gnu.mn: New file, with excerpts from
12064         "config/i386/i386gnu.mh".
12065         * configure: Regenerate.
12066         * configure.ac: Rewrite code to use "gdb/configure.nat" instead of
12067         *.mh files under "gdb/config".
12068         * configure.nat: New file, with contents from the
12069         "gdb/config/*/*.mh" files.
12070
12071 2017-05-05  Tim Wiederhake  <tim.wiederhake@intel.com>
12072
12073         * btrace.c (btrace_clear): Free insn vector.
12074
12075 2017-05-05  Pedro Alves  <palves@redhat.com>
12076
12077         * warning.m4 (build_warnings): Add -Wno-error=maybe-uninitialized.
12078         * configure: Regenerate.
12079
12080 2017-05-04  Pedro Alves  <palves@redhat.com>
12081
12082         * Makefile.in (SFILES): Add progspace-and-thread.c.
12083         (HFILES_NO_SRCDIR): Add progspace-and-thread.h.
12084         (COMMON_OBS): Add progspace-and-thread.o.
12085         * breakpoint.c: Include "progspace-and-thread.h".
12086         (update_inserted_breakpoint_locations)
12087         (insert_breakpoint_locations, create_longjmp_master_breakpoint):
12088         Use scoped_restore_current_pspace_and_thread.
12089         (create_std_terminate_master_breakpoint): Use
12090         scoped_restore_current_program_space.
12091         (remove_breakpoint): Use scoped_restore_current_pspace_and_thread.
12092         (print_breakpoint_location): Use
12093         scoped_restore_current_program_space.
12094         (bp_loc_is_permanent): Use
12095         scoped_restore_current_pspace_and_thread.
12096         (resolve_sal_pc): Use scoped_restore_current_pspace_and_thread.
12097         (download_tracepoint_locations): Use
12098         scoped_restore_current_pspace_and_thread.
12099         (breakpoint_re_set): Use scoped_restore_current_pspace_and_thread.
12100         * exec.c (exec_close_1): Use scoped_restore_current_program_space.
12101         (enum step_over_calls_kind): Moved from inferior.h.
12102         (class scoped_restore_current_thread): New class.
12103         * gdbthread.h (make_cleanup_restore_current_thread): Delete
12104         declaration.
12105         (scoped_restore_current_thread): New class.
12106         * infcmd.c: Include "common/gdb_optional.h".
12107         (continue_1, proceed_after_attach): Use
12108         scoped_restore_current_thread.
12109         (notice_new_inferior): Use scoped_restore_current_thread.
12110         * inferior.c: Include "progspace-and-thread.h".
12111         (restore_inferior, save_current_inferior): Delete.
12112         (add_inferior_command, clone_inferior_command): Use
12113         scoped_restore_current_pspace_and_thread.
12114         * inferior.h (scoped_restore_current_inferior): New class.
12115         * infrun.c: Include "progspace-and-thread.h" and
12116         "common/gdb_optional.h".
12117         (follow_fork_inferior): Use
12118         scoped_restore_current_pspace_and_thread.
12119         (scoped_restore_exited_inferior): New class.
12120         (handle_vfork_child_exec_or_exit): Use
12121         scoped_restore_exited_inferior,
12122         scoped_restore_current_pspace_and_thread,
12123         scoped_restore_current_thread and scoped_restore.
12124         (fetch_inferior_event): Use scoped_restore_current_thread.
12125         * linespec.c (decode_line_full, decode_line_1): Use
12126         scoped_restore_current_program_space.
12127         * mi/mi-main.c: Include "progspace-and-thread.h".
12128         (exec_continue): Use scoped_restore_current_thread.
12129         (mi_cmd_exec_run): Use scoped_restore_current_pspace_and_thread.
12130         (mi_cmd_trace_frame_collected): Use scoped_restore_current_thread.
12131         * proc-service.c (ps_pglobal_lookup): Use
12132         scoped_restore_current_program_space.
12133         * progspace-and-thread.c: New file.
12134         * progspace-and-thread.h: New file.
12135         * progspace.c (release_program_space, clone_program_space): Use
12136         scoped_restore_current_program_space.
12137         (restore_program_space, save_current_program_space)
12138         (save_current_space_and_thread): Delete.
12139         (switch_to_program_space_and_thread): Moved to
12140         progspace-and-thread.c.
12141         * progspace.h (save_current_program_space)
12142         (save_current_space_and_thread): Delete declarations.
12143         (scoped_restore_current_program_space): New class.
12144         * remote.c (remote_btrace_maybe_reopen): Use
12145         scoped_restore_current_thread.
12146         * symtab.c: Include "progspace-and-thread.h".
12147         (skip_prologue_sal): Use scoped_restore_current_pspace_and_thread.
12148         * thread.c (print_thread_info_1): Use
12149         scoped_restore_current_thread.
12150         (struct current_thread_cleanup): Delete.
12151         (do_restore_current_thread_cleanup)
12152         (restore_current_thread_cleanup_dtor): Rename/convert both to ...
12153         (scoped_restore_current_thread::~scoped_restore_current_thread):
12154         ... this new dtor.
12155         (make_cleanup_restore_current_thread): Rename/convert to ...
12156         (scoped_restore_current_thread::scoped_restore_current_thread):
12157         ... this new ctor.
12158         (thread_apply_all_command): Use scoped_restore_current_thread.
12159         (thread_apply_command): Use scoped_restore_current_thread.
12160         * tracepoint.c (tdump_command): Use scoped_restore_current_thread.
12161         * varobj.c (value_of_root_1): Use scoped_restore_current_thread.
12162
12163 2017-05-04  Pedro Alves  <palves@redhat.com>
12164
12165         * thread.c (make_cleanup_restore_current_thread): Move
12166         find_thread_ptid call before the is_stopped call.  Assert that the
12167         thread is found.  Replace is_stopped call by checking the thread's
12168         state directly.  Remove unnecessary NULL-thread check.
12169
12170 2017-05-04  Pedro Alves  <palves@redhat.com>
12171
12172         * corelow.c (thread_section_name): New class.
12173         (get_core_register_section, get_core_siginfo): Use it.
12174
12175 2017-05-04  Andreas Arnez  <arnez@linux.vnet.ibm.com>
12176
12177         * corelow.c (sniff_core_bfd): Remove extra semicolon.
12178         (get_core_register_section): Remove xfree of NULL pointer.
12179
12180 2017-05-03  Alan Hayward  <alan.hayward@arm.com>
12181
12182         * frv-linux-tdep.c (frv_linux_supply_gregset): Use raw_supply_zeroed.
12183         * regcache.c (regcache::raw_supply_zeroed): New function.
12184         * regcache.h (regcache::raw_supply_zeroed): New declaration.
12185
12186 2017-05-03  Simon Marchi  <simon.marchi@ericsson.com>
12187
12188         * gdbarch.sh: Remove commented out definition of
12189         TARGET_CHAR_BIT.
12190         * gdbarch.h: Re-generate.
12191
12192 2017-05-03  Sergio Durigan Junior  <sergiodj@redhat.com>
12193
12194         * configure: Regenerate.
12195
12196 2017-05-02  Simon Marchi  <simon.marchi@ericsson.com>
12197
12198         * solib-target.c (solib_target_relocate_section_addresses):
12199         Remove num_section_bases, num_bases, segment_bases variables.
12200
12201 2017-05-02  Simon Marchi  <simon.marchi@polymtl.ca>
12202
12203         * common/gdb_vecs.h (DEF_VEC_I (CORE_ADDR)): Remove.
12204
12205 2017-05-02  Simon Marchi  <simon.marchi@polymtl.ca>
12206
12207         * solib-target.c: Include <vector>
12208         (struct lm_info_target) <~lm_info_target>: Remove.
12209         <segment_bases, section_bases>: Change type to
12210         std::vector<CORE_ADDR>.
12211         (library_list_start_segment, library_list_start_section,
12212         library_list_end_library,
12213         solib_target_relocate_section_addresses): Adjust.
12214
12215 2017-05-02  Simon Marchi  <simon.marchi@polymtl.ca>
12216
12217         * gdbarch.sh (software_single_step): Change return type to
12218         std::vector<CORE_ADDR>.
12219         * gdbarch.c, gdbarch.h: Re-generate.
12220         * arch/arm-get-next-pcs.c (thumb_deal_with_atomic_sequence_raw):
12221         Adjust.
12222         (arm_deal_with_atomic_sequence_raw): Adjust.
12223         (thumb_get_next_pcs_raw): Adjust.
12224         (arm_get_next_pcs_raw): Adjust.
12225         (arm_get_next_pcs): Adjust.
12226         * arch/arm-get-next-pcs.h (arm_get_next_pcs): Adjust.
12227         * aarch64-tdep.c (aarch64_software_single_step): Adjust.
12228         * alpha-tdep.c (alpha_deal_with_atomic_sequence): Adjust.
12229         (alpha_software_single_step): Adjust.
12230         * alpha-tdep.h (alpha_software_single_step): Adjust.
12231         * arm-linux-tdep.c (arm_linux_software_single_step): Adjust.
12232         * arm-tdep.c (arm_software_single_step): Adjust.
12233         (arm_breakpoint_kind_from_current_state): Adjust.
12234         * arm-tdep.h (arm_software_single_step): Adjust.
12235         * breakpoint.c (insert_single_step_breakpoint): Adjust.
12236         * cris-tdep.c (cris_software_single_step): Adjust.
12237         * mips-tdep.c (mips_deal_with_atomic_sequence): Adjust.
12238         (micromips_deal_with_atomic_sequence): Adjust.
12239         (deal_with_atomic_sequence): Adjust.
12240         (mips_software_single_step): Adjust.
12241         * mips-tdep.h (mips_software_single_step): Adjust.
12242         * moxie-tdep.c (moxie_software_single_step): Adjust.
12243         * nios2-tdep.c (nios2_software_single_step): Adjust.
12244         * ppc-tdep.h (ppc_deal_with_atomic_sequence): Adjust.
12245         * rs6000-aix-tdep.c (rs6000_software_single_step): Adjust.
12246         * rs6000-tdep.c (ppc_deal_with_atomic_sequence): Adjust.
12247         * s390-linux-tdep.c (s390_software_single_step): Adjust.
12248         * sparc-tdep.c (sparc_software_single_step): Adjust.
12249         * spu-tdep.c (spu_software_single_step): Adjust.
12250         * tic6x-tdep.c (tic6x_software_single_step): Adjust.
12251
12252 2017-05-02  Simon Marchi  <simon.marchi@polymtl.ca>
12253
12254         * gdbarch.sh: Use semi-colon as field separator instead of colon.
12255         * gdbarch.h: Re-generate.
12256
12257 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
12258
12259         * Makefile.in (SUBDIR_PYTHON_OBS): Add py-instruction.o.
12260         (SUBDIR_PYTHON_SRCS): Add py-instruction.c.
12261         * python/py-instruction.c, python/py-instruction.h: New file.
12262         * python/py-record.c: Add py-instruction.h include.
12263         (gdbpy_initialize_record): Make gdb.Instruction a super class of
12264         gdb.RecordInstruction.
12265         * python/python-internal.h: Add gdbpy_initialize_instruction
12266         declaration.
12267         * python/python.c (do_start_initialization): Add
12268         gdbpy_initialize_instruction.
12269
12270 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
12271
12272         * python/py-record-btrace.c (BTPY_REQUIRE_VALID_CALL, btpy_call_type):
12273         Remove.
12274         (btrace_func_from_recpy_func): New function.
12275         (btpy_call_new, btpy_number, btpy_hash, btpy_richcompare): Remove.
12276         (btpy_call_level, btpy_call_symbol, btpy_call_instructions,
12277         btpy_call_up, btpy_call_prev_sibling, btpy_call_next_sibling): Rename to ...
12278         (recpy_bt_func_level, recpy_bt_func_symbol, recpy_bt_func_instructions,
12279         recpy_bt_func_up, recpy_bt_func_prev, recpy_bt_func_next): This.
12280         Also, use new helper functions.
12281         (btpy_list_item): Use new helper functions.
12282         (recpy_bt_function_call_history): Use new type name.
12283         (btpy_call_getset): Remove.
12284         (gdbpy_initialize_btrace): Remove code to initialize
12285         gdb.BtraceFunctionCall.
12286         * python/py-record-btrace.h (recpy_bt_func_number, recpy_btb_func_level,
12287         recpy_btb_func_symbol, recpy_bt_func_instructions, recpy_bt_func_up,
12288         recpy_bt_func_prev, recpy_bt_func_next): New export.
12289         * python/py-record.c (recpy_func_type): New static object.
12290         (recpy_func_new, recpy_func_level, recpy_func_symbol,
12291         recpy_func_instructions, recpy_func_up, recpy_func_prev,
12292         recpy_func_next): New function.
12293         (recpy_element_hash, recpy_element_richcompare): Updated comment.
12294         (recpy_func_getset): New static object.
12295         (gdbpy_initialize_record): Add code to initialize gdb.RecordInstruction.
12296         * python/py-record.h (recpy_func_type, recpy_func_new): New export.
12297
12298 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
12299
12300         * python/py-record-btrace.c (BTPY_REQUIRE_VALID_INSN): Remove.
12301         (btpy_object, btpy_insn_type, btpy_new): Remove.
12302         (btpy_list_object): Use gdb.RecordInstruction type instead of
12303         gdb.BtraceInstruction type.
12304         (btrace_insn_from_recpy_insn): New function.
12305         (btpy_insn_or_gap_new): Adjust comment. Use recpy_insn_new instead of
12306         btpy_new.
12307         (btpy_call_new, btpy_list_item): Do not use btpy_new anymore.
12308         (btpy_number, btpy_hash, btpy_call_level, btpy_call_symbol,
12309         btpy_call_instructions, btpy_call_up, btpy_call_prev_sibling,
12310         btpy_call_next_sibling, btpy_richcompare): Use recpy_element_object
12311         instead of btpy_object.
12312         (btpy_insn_sal, btpy_insn_pc, btpy_insn_size, btpy_insn_is_speculative,
12313         btpy_insn_data, btpy_insn_decode): Rename to ...
12314         (recpy_bt_insn_sal, recpy_bt_insn_pc, recpy_bt_insn_size,
12315         recpy_bt_insn_is_speculative, recpy_bt_insn_data,
12316         recpy_bt_insn_decode): This.  Also, use new helper functions.
12317         (btpy_list_position, recpy_bt_goto): Use recpy_element_object and
12318         recpy_insn_type.
12319         (btpy_insn_getset): Remove.
12320         (gdbpy_initialize_btrace): Remove code to initialize
12321         gdb.BtraceInstruction.  Use recpy_element_object.
12322         * python/py-record-btrace.h (recpy_bt_insn_number, recpy_bt_insn_sal,
12323         recpy_bt_insn_pc, recpy_bt_insn_data, recpy_bt_insn_decoded,
12324         recpy_bt_insn_size, recpy_bt_insn_is_speculative): New export.
12325         * python/py-record.c (recpy_insn_type): New static object.
12326         (recpy_insn_new, recpy_insn_sal, recpy_insn_pc, recpy_insn_data,
12327         recpy_insn_decoded, recpy_insn_size, recpy_insn_is_speculative,
12328         recpy_element_number, recpy_element_hash, recpy_element_richcompare):
12329         New function.
12330         (recpy_insn_getset): New static object.
12331         (gdbpy_initialize_record): Initialize gdb.RecordInstruction.
12332         * python/py-record.h (recpy_element_object): New typedef.
12333         (recpy_insn_type, recpy_insn_new): New export.
12334
12335 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
12336
12337         * py-record-btrace.c (btpy_insn_new): Removed.
12338         (btpy_insn_or_gap_new): New function.
12339         (btpy_insn_error): Removed.
12340         (btpy_insn_sal, btpy_insn_pc, btpy_insn_size, btpy_insn_is_speculative,
12341         btpy_insn_data, btpy_insn_decode): Remove code path for gaps.
12342         (recpy_bt_replay_position, recpy_bt_begin, recpy_bt_end): Call
12343         btpy_insn_or_gap_new instead of btpy_insn_new.
12344         (btpy_insn_getset): Remove btpy_insn_error.
12345         * py-record.c (recpy_gap_type): New static object.
12346         (recpy_gap_object): New typedef.
12347         (recpy_gap_new, recpy_gap_number, recpy_gap_reason_code,
12348         recpy_gap_reason_string): New function.
12349         (recpy_gap_getset): New static object.
12350         (gdbpy_initialize_record): Initialize gdb.RecordGap type.
12351         * py-record.h (recpy_gap_new): New export.
12352
12353 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
12354
12355         * python/py-record.c (recpy_ptid): Remove.
12356         (recpy_record_getset): Remove recpy_ptid.
12357
12358 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
12359
12360         * btrace.c (btrace_fetch): Set inferior_ptid.
12361         * python/py-record-btrace.c: Add "py-record.h" include.
12362         (recpy_bt_format, recpy_bt_replay_position, recpy_bt_begin,
12363         recpy_bt_end, recpy_bt_instruction_history,
12364         recpy_bt_function_call_history, recpy_bt_goto): Use ptid stored
12365         in gdb.Record object instead of current ptid.
12366         * python/py-record.c: Include new "py-record.h" file.
12367         (recpy_record_object): Moved to py-record.h.
12368         * python/py-record.h: New file.
12369
12370 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
12371
12372         * python/py-record-btrace.c (BTPY_REQUIRE_VALID_INSN,
12373         BTPY_REQUIRE_VALID_CALL, recpy_bt_function_call_history): Fix
12374         indentation.
12375
12376 2017-05-01  Joel Brobecker  <brobecker@adacore.com>
12377
12378         * MAINTAINERS: Move Daniel Jacobowitz and Mark Kettenis to
12379         the past maintainers section.
12380
12381 2017-04-28  Yao Qi  <yao.qi@linaro.org>
12382
12383         * infcmd.c (get_return_value): Use regcache ctor, and remove
12384         cleanup.
12385
12386 2017-04-28  Yao Qi  <yao.qi@linaro.org>
12387             Pedro Alves  <palves@redhat.com>
12388
12389         * regcache.c (regcache::regcache): New tag dispatch ctor.
12390         (do_cooked_read): Moved above.
12391         (regcache_dup): Use the tag dispatch ctor..
12392         * regcache.h (regcache): Declare ctor, delete copy ctor and
12393         assignment operator, remove friend regcache_dup.
12394
12395 2017-04-28  Yao Qi  <yao.qi@linaro.org>
12396
12397         * regcache.c (regcache_dup): Assert !src->m_readonly_p and
12398         call method save instead of regcache_cpy.
12399         * regcache.h (struct regcache): Make regcache_dup a friend.
12400
12401 2017-04-28  Yao Qi  <yao.qi@linaro.org>
12402
12403         * regcache.c (struct regcache): Move to regcache.h
12404         (regcache::arch): New method.
12405         (regcache_get_ptid): Update.
12406         (get_regcache_arch): Call arch method.
12407         (get_regcache_aspace): Call method aspace.
12408         (register_buffer): Change it to method.
12409         (regcache_save): Change it to regcache::save.
12410         (regcache_restore): Likewise.
12411         (regcache_cpy_no_passthrough): Remove the declaration.
12412         (regcache_cpy): Call methods restore and cpy_no_passthrough.
12413         (regcache_cpy_no_passthrough): Change it to method
12414         cpy_no_passthrough.
12415         (regcache_register_status): Change it to method
12416         get_register_status.
12417         (regcache_invalidate): Change it to method invalidate.
12418         (regcache_thread_ptid_changed): Use methods ptid and set_ptid.
12419         (regcache_raw_update): Change it to method raw_update.
12420         (regcache_raw_read): Likewise.
12421         (regcache_raw_read_signed): Likewise.
12422         (regcache_raw_read_unsigned): Likewise.
12423         (regcache_raw_write_signed): Likewise.
12424         (regcache_raw_write_unsigned): Likewise.
12425         (regcache_cooked_read): Likewise.
12426         (regcache_cooked_read_value): Likewise.
12427         (regcache_cooked_read_signed): Likewise.
12428         (regcache_cooked_read_unsigned): Likewise.
12429         (regcache_cooked_write_signed): Likewise.
12430         (regcache_cooked_write_unsigned): Likewise.
12431         (regcache_raw_set_cached_value): Likewise.
12432         (regcache_raw_write): Likewise.
12433         (regcache_cooked_write): Likewise.
12434         (regcache_xfer_part): Likewise.
12435         (regcache_raw_read_part): Likewise.
12436         (regcache_raw_write_part): Likewise.
12437         (regcache_cooked_read_part): Likewise.
12438         (regcache_cooked_write_part): Likewise.
12439         (regcache_raw_supply): Likewise.
12440         (regcache_raw_collect): Likewise.
12441         (regcache_transfer_regset): Likewise.
12442         (regcache_supply_regset): Likewise.
12443         (regcache_collect_regset): Likewise.
12444         (regcache_debug_print_register): Likewise.
12445         (enum regcache_dump_what): Move it to regcache.h.
12446         (regcache_dump): Change it to method dump.
12447         * regcache.h (enum regcache_dump_what): New.
12448         (class regcache): New.
12449         * target.c (target_fetch_registers): Call method
12450         debug_print_register.
12451         (target_store_registers): Likewise.
12452
12453 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
12454
12455         * windows-nat.c (struct lm_info_windows): Initialize field.
12456         (windows_make_so): Allocate lm_info_windows with new.
12457         (windows_free_so): Free lm_info_windows with delete.
12458
12459 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
12460
12461         * solib-darwin.c (struct lm_info_darwin): Initialize field.
12462         (darwin_current_sos): Allocate lm_info_darwin with new, remove
12463         cleanup.
12464         (darwin_free_so): Free lm_info_darwin with delete.
12465
12466 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
12467
12468         * solib-svr4.h (struct lm_info_svr4): Initialize fields.
12469         <l_addr_p>: Change type to bool.
12470         * solib-svr4.c (lm_info_read): Allocate lm_info_svr4 with new.
12471         (svr4_free_so): Free lm_info_svr4 with delete.
12472         (svr4_copy_library_list): Replace memcpy with call to copy
12473         constructor.
12474         (library_list_start_library, svr4_default_sos): Allocate
12475         lm_info_svr4 with new.
12476
12477 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
12478
12479         * solib-target.c (struct lm_info_target): Add destructor,
12480         initialize fields.
12481         <name>: Change type to std::string.
12482         (library_list_start_library): Allocate lm_info_target with new.
12483         (solib_target_free_library_list): Free lm_info_target with
12484         delete.
12485         (solib_target_current_sos): Adapt to std::string.
12486         (solib_target_free_so): Free lm_info_target with delete.
12487
12488 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
12489
12490         * solib-frv.c (struct lm_info_frv): Add destructor, initialize
12491         fields.
12492         (frv_current_sos): Allocate lm_info_frv with new.
12493         (frv_relocate_main_executable): Free lm_info_frv with delete,
12494         allocate with new.
12495         (frv_clear_solib, frv_free_so): Free lm_info_frv with delete.
12496
12497 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
12498
12499         * solib-frv.c (struct lm_info_frv): Fix indentation.
12500
12501 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
12502
12503         * solib-dsbt.c (struct lm_info_dsbt): Add destructor, initialize
12504         map field.
12505         (dsbt_current_sos): Allocate lm_info_dsbt with new.
12506         (dsbt_relocate_main_executable): Free lm_info_dsbt with delete
12507         and allocate with new.
12508         (dsbt_clear_solib, dsbt_free_so): Free lm_info_dsbt with delete.
12509
12510 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
12511
12512         * solib-aix.c (struct lm_info_aix): Initialize fields in-class.
12513         <filename, member_name>: Change type to std::string.
12514         (solib_aix_new_lm_info, solib_aix_xfree_lm_info): Remove.
12515         (library_list_start_library): Allocate lm_info_aix with new.
12516         (solib_aix_free_library_list, solib_aix_free_so): Free with delete.
12517         (solib_aix_current_sos): Adapt to std::string, copy lm_info_aix
12518         with copy constructor.
12519
12520 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
12521
12522         * solist.h (struct lm_info): Remove.
12523         (struct lm_info_base): New class.
12524         (struct so_list) <lm_info>: Change type to lm_info_base *.
12525         * nto-tdep.c (struct lm_info): Remove.
12526         (lm_addr): Adjust.
12527         * solib-aix.c (struct lm_info): Rename to ...
12528         (struct lm_info_aix): ... this.  Extend lm_info_base.
12529         (lm_info_p): Rename to ...
12530         (lm_info_aix_p): ... this, and adjust.
12531         (solib_aix_new_lm_info, solib_aix_xfree_lm_info,
12532         solib_aix_parse_libraries, library_list_start_library,
12533         solib_aix_free_library_list, solib_aix_parse_libraries,
12534         solib_aix_get_library_list,
12535         solib_aix_relocate_section_addresses, solib_aix_free_so,
12536         solib_aix_get_section_offsets,
12537         solib_aix_solib_create_inferior_hook, solib_aix_current_sos):
12538         Adjust.
12539         (struct solib_aix_inferior_data) <library_list>: Adjust.
12540         * solib-darwin.c (struct lm_info): Rename to ...
12541         (struct lm_info_darwin): ... this.  Extend lm_info_base.
12542         (darwin_current_sos, darwin_relocate_section_addresses): Adjust.
12543         * solib-dsbt.c (struct lm_info): Rename to ...
12544         (struct lm_info_dsbt): ... this.  Extend lm_info_base.
12545         (struct dsbt_info) <main_executable_lm_info): Adjust.
12546         (dsbt_current_sos, dsbt_relocate_main_executable, dsbt_free_so,
12547         dsbt_relocate_section_addresses): Adjust.
12548         * solib-frv.c (struct lm_info): Rename to ...
12549         (struct lm_info_frv): ... this.  Extend lm_info_base.
12550         (main_executable_lm_info): Adjust.
12551         (frv_current_sos, frv_relocate_main_executable, frv_free_so,
12552         frv_relocate_section_addresses, frv_fdpic_find_global_pointer,
12553         find_canonical_descriptor_in_load_object,
12554         frv_fdpic_find_canonical_descriptor): Adjust.
12555         * solib-svr4.c (struct lm_info): Move to solib-svr4.h, renamed
12556         to lm_info_svr4.
12557         (lm_info_read, lm_addr_check, svr4_keep_data_in_core,
12558         svr4_clear_so, svr4_copy_library_list,
12559         library_list_start_library, svr4_default_sos, svr4_read_so_list,
12560         svr4_current_sos, svr4_fetch_objfile_link_map,
12561         solist_update_incremental): Adjust.
12562         * solib-svr4.h (struct lm_info_svr4): Move here from
12563         solib-svr4.c.
12564         * solib-target.c (struct lm_info): Rename to ...
12565         (struct lm_info_target): ... this.  Extend lm_info_base.
12566         (lm_info_p): Rename to ...
12567         (lm_info_target_p): ... this.
12568         (solib_target_parse_libraries, library_list_start_segment,
12569         library_list_start_section, library_list_start_library,
12570         library_list_end_library, solib_target_free_library_list,
12571         solib_target_current_sos, solib_target_free_so,
12572         solib_target_relocate_section_addresses): Adjust.
12573         * windows-nat.c (struct lm_info): Rename to ...
12574         (struct lm_info_windows): ... this.  Extend lm_info_base.
12575         (windows_make_so, handle_load_dll, handle_unload_dll,
12576         windows_xfer_shared_libraries): Adjust.
12577
12578 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
12579
12580         * solib-darwin.c (struct darwin_so_list): Remove.
12581         (darwin_current_sos): Allocate an so_list object instead of a
12582         darwin_so_list, separately allocate an lm_info object.
12583         (darwin_free_so): Free lm_info.
12584
12585 2017-04-28  John Baldwin  <jhb@FreeBSD.org>
12586
12587         * mips-tdep.c (print_gp_register_row): Replace printf_filtered
12588         with fprintf_filtered.
12589
12590 2017-04-28  Yao Qi  <yao.qi@linaro.org>
12591
12592         * regcache.c (regcache::regcache): New function.
12593         (regcache::~regcache): New function.
12594         (regcache_xmalloc_1): Remove.
12595         (regcache_xmalloc): Call new regcache.
12596         (regcache_xfree): Call delete regcache.
12597         (get_thread_arch_aspace_regcache): Call new regcache.
12598
12599 2017-04-28  Yao Qi  <yao.qi@linaro.org>
12600
12601         * mips-linux-nat.c (mips_linux_new_thread): Use ptid method
12602         lwp instead of ptid_get_lwp.
12603
12604 2017-04-28  Yao Qi  <yao.qi@linaro.org>
12605
12606         * mips-linux-nat.c (mips_linux_new_thread): Get lwpid from
12607         lwp_info instead of getting from inferior_ptid.
12608
12609 2017-04-27  Keith Seitz  <keiths@redhat.com>
12610
12611         * gdbtypes.c (LVALUE_REFERENCE_TO_RVALUE_BINDING_BADNESS)
12612         DIFFERENT_REFERENCE_TYPE_BADNESS): Remove.
12613         (CV_CONVERSION_BADNESS): Define.
12614         (rank_one_type): Remove overly restrictive rvalue reference
12615         rank checks.
12616         Add cv-qualifier checks and subranks for type equality.
12617         * gdbtypes.h (REFERENCE_CONVERSION_RVALUE,
12618         REFERENCE_CONVERSION_CONST_LVALUE, CV_CONVERSION_BADNESS,
12619         CV_CONVERSION_CONST, CV_CONVERSION_VOLATILE): Declare.
12620
12621 2017-04-27  Simon Marchi  <simon.marchi@ericsson.com>
12622
12623         * python/py-inferior.c (inferior_to_inferior_object): Increment reference
12624         count when creating the object.
12625
12626 2017-04-27  Sangamesh Mallayya  <sangamesh.swamy@in.ibm.com>
12627             Ulrich Weigand  <uweigand@de.ibm.com>
12628
12629         * xcoffread.c (read_xcoff_symtab): Read correct function auxiliary
12630         entry if xlc -qfuncsect or gcc -ffunction-sections compiler option
12631         is used in AIX.
12632         (read_xcoff_symtab): Handle C_WEAKEXT storage class.
12633         (process_xcoff_symbol): Likewise.
12634         (scan_xcoff_symtab): Likewise.
12635
12636 2017-04-26  Alan Hayward  <alan.hayward@arm.com>
12637
12638         * ia64-tdep.c (examine_prologue): Use get_frame_register_unsigned.
12639         (ia64_sigtramp_frame_prev_register): Use read_memory_unsigned_integer.
12640         (ia64_access_reg): Use get_frame_register_unsigned.
12641         (ia64_access_rse_reg): Likewise.
12642         (ia64_libunwind_frame_prev_register): Likewise.
12643
12644 2017-04-26  Jiong Wang  <jiong.wang@arm.com>
12645
12646         * gdbarch.sh: New gdbarch method execute_dwarf_cfa_vendor_op.
12647         * gdbarch.c: Regenerated.
12648         * gdbarch.h: Regenerated.
12649         * dwarf2-frame.c (dwarf2_frame_state_alloc_regs): Made the
12650         visibility external.
12651         (execute_cfa_program): Call execute_dwarf_cfa_vendor_op for CFI
12652         between DW_CFA_lo_user and DW_CFA_high_user inclusive.
12653         (enum cfa_how_kind): Move to ...
12654         (struct dwarf2_frame_state_reg_info): Likewise.
12655         (struct dwarf2_frame_state): Likewise.
12656         * dwarf2-frame.h: ... here.
12657         (dwarf2_frame_state_alloc_regs): New declaration.
12658         * sparc-tdep.c (sparc_execute_dwarf_cfa_vendor_op): New function.
12659         (sparc32_gdbarch_init): Register execute_dwarf_cfa_vendor_op hook.
12660
12661 2017-04-26  Alan Hayward  <alan.hayward@arm.com>
12662
12663         * xtensa-tdep.c (xtensa_pseudo_register_read): Use
12664         regcache_raw_read_unsigned.
12665         (xtensa_pseudo_register_write): Likewise.
12666
12667 2017-04-26  Alan Hayward  <alan.hayward@arm.com>
12668
12669         * nds32-tdep.c (nds32_pseudo_register_read): Abort on errors.
12670         (nds32_pseudo_register_write): Likewise.
12671
12672 2017-04-25  Yao Qi  <yao.qi@linaro.org>
12673
12674         * regcache.c (struct regcache) <readonly_p>: Change its type
12675         to bool.
12676         (regcache_xmalloc_1): Update parameter type and callers update.
12677
12678 2017-04-25  Yao Qi  <yao.qi@linaro.org>
12679
12680         * aarch64-tdep.c (aarch64_gdbarch_init): Don't call
12681         set_gdbarch_wchar_bit.
12682         * arm-tdep.c (arm_gdbarch_init): Likewise.
12683
12684 2017-04-25  Pedro Alves  <palves@redhat.com>
12685
12686         * common/poison.h [!HAVE_IS_TRIVIALLY_COPYABLE] (IsRelocatable)
12687         (BothAreRelocatable, memcopy, memmove): Don't define.
12688         * common/traits.h (__has_feature, HAVE_IS_TRIVIALLY_COPYABLE): New
12689         macros.
12690
12691 2017-04-25  Pedro Alves  <palves@redhat.com>
12692
12693         * common/common-defs.h: Include "common/poison.h".
12694         * common/function-view.h: (Not, Or, Requires): Move to traits.h
12695         and adjust.
12696         * common/poison.h: New file.
12697         * common/traits.h: Include <type_traits>.
12698         (Not, Or, Requires): New, moved from common/function-view.h.
12699
12700 2017-04-25  Pedro Alves  <palves@redhat.com>
12701
12702         * breakpoint.h (struct breakpoint): In-class initialize all
12703         fields.  Make boolean fields "bool".
12704         * breakpoint.c (init_raw_breakpoint_without_location): Remove
12705         memset call and initializations no longer necessary.
12706
12707 2017-04-25  Pedro Alves  <palves@redhat.com>
12708
12709         * btrace.c (pt_btrace_insn_flags): Change parameter type to
12710         reference.
12711         (pt_btrace_insn): New function.
12712         (ftrace_add_pt): Remove memset call and use pt_btrace_insn.
12713
12714 2017-04-25  Pedro Alves  <palves@redhat.com>
12715
12716         * ada-lang.c (ada_catchpoint_location): Now a "class".  Remove
12717         "base" field and inherit from "bp_location" instead.  Add
12718         non-default ctor.
12719         (allocate_location_exception): Use new non-default ctor.
12720         * breakpoint.c (get_first_locp_gte_addr): Remove memset call.
12721         (init_bp_location): Convert to ...
12722         (bp_location::bp_location): ... this new ctor, and remove memset
12723         call.
12724         (base_breakpoint_allocate_location): Use the new non-default ctor.
12725         * breakpoint.h (bp_location): Now a class.  Declare default and
12726         non-default ctors.  In-class initialize all members.
12727         (init_bp_location): Remove declaration.
12728
12729 2017-04-25  Pedro Alves  <palves@redhat.com>
12730
12731         * common/enum-flags.h (enum_flags): Don't implement copy ctor and
12732         assignment operator.
12733
12734 2017-04-24  Yao Qi  <yao.qi@linaro.org>
12735
12736         * doublest.c (convert_doublest_to_floatformat): Call
12737         floatformat_totalsize_bytes.
12738
12739 2017-04-22  Tom Tromey  <tom@tromey.com>
12740
12741         * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries): Use
12742         ui_out_emit_list.
12743         * stack.c (print_frame): Use ui_out_emit_list.
12744         * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Use
12745         ui_out_emit_list.
12746         * mi/mi-main.c (print_one_inferior)
12747         (mi_cmd_data_list_register_names)
12748         (mi_cmd_data_list_register_values, mi_cmd_list_features)
12749         (mi_cmd_list_target_features, mi_cmd_trace_frame_collected): Use
12750         ui_out_emit_list.
12751         * mi/mi-interp.c (mi_on_normal_stop_1): Use ui_out_emit_list.
12752         (mi_output_solib_attribs): Use ui_out_emit_list,
12753         ui_out_emit_tuple.
12754         * mi/mi-cmd-var.c (varobj_update_one): Use ui_out_emit_list.
12755         * mi/mi-cmd-stack.c (mi_cmd_stack_list_frames)
12756         (mi_cmd_stack_list_args, list_args_or_locals): Use
12757         ui_out_emit_list.
12758         * disasm.c (do_assembly_only): Use ui_out_emit_list.
12759         * breakpoint.c (print_solib_event, output_thread_groups): Use
12760         ui_out_emit_list.
12761
12762 2017-04-22  Tom Tromey  <tom@tromey.com>
12763
12764         * mi/mi-main.c (print_variable_or_computed): Use ui_out_emit_tuple.
12765         * mi/mi-cmd-var.c (varobj_update_one): Use ui_out_emit_tuple.
12766         * mi/mi-cmd-stack.c (list_arg_or_local): Use ui_out_emit_tuple.
12767
12768 2017-04-22  Tom Tromey  <tom@tromey.com>
12769
12770         * tracepoint.c (tvariables_info_1)
12771         (print_one_static_tracepoint_marker): Use ui_out_emit_tuple.
12772
12773 2017-04-22  Tom Tromey  <tom@tromey.com>
12774
12775         * stack.c (print_frame_arg): Use ui_out_emit_tuple,
12776         annotate_arg_emitter.
12777         * breakpoint.c (print_mention_watchpoint)
12778         (print_mention_masked_watchpoint): Use ui_out_emit_tuple.
12779         * annotate.h (struct annotate_arg_emitter): New.
12780
12781 2017-04-22  Tom Tromey  <tom@tromey.com>
12782
12783         * record-btrace.c (record_btrace_insn_history)
12784         (record_btrace_insn_history_range, record_btrace_call_history)
12785         (record_btrace_call_history_range): Use ui_out_emit_tuple.
12786         * thread.c (do_captured_list_thread_ids, print_thread_info_1): Use
12787         ui_out_emit_tuple.
12788         * stack.c (print_frame_info): Use ui_out_emit_tuple.
12789         * solib.c (info_sharedlibrary_command): Use ui_out_emit_tuple.
12790         * skip.c (skip_info): Use ui_out_emit_tuple.
12791         * remote.c (show_remote_cmd): Use ui_out_emit_tuple.
12792         * progspace.c (print_program_space): Use ui_out_emit_tuple.
12793         * probe.c (info_probes_for_ops): Use ui_out_emit_tuple.
12794         * osdata.c (info_osdata): Use ui_out_emit_tuple.
12795         * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Use
12796         ui_out_emit_tuple.
12797         * mi/mi-main.c (print_one_inferior, list_available_thread_groups)
12798         (output_register, mi_cmd_data_read_memory)
12799         (mi_cmd_data_read_memory_bytes, mi_load_progress)
12800         (mi_cmd_trace_frame_collected): Use ui_out_emit_tuple.
12801         * mi/mi-cmd-var.c (mi_cmd_var_list_children, varobj_update_one):
12802         Use ui_out_emit_tuple.
12803         * mi/mi-cmd-stack.c (mi_cmd_stack_list_args): Use
12804         ui_out_emit_tuple.
12805         * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions)
12806         (mi_cmd_info_gdb_mi_command): Use ui_out_emit_tuple.
12807         * linux-thread-db.c (info_auto_load_libthread_db): Use
12808         ui_out_emit_tuple.
12809         * inferior.c (print_inferior): Use ui_out_emit_tuple.
12810         * gdb_bfd.c (print_one_bfd): Use ui_out_emit_tuple.
12811         * disasm.c (do_mixed_source_and_assembly_deprecated)
12812         (do_mixed_source_and_assembly): Use ui_out_emit_tuple.
12813         * cp-abi.c (list_cp_abis): Use ui_out_emit_tuple.
12814         * cli/cli-setshow.c (cmd_show_list): Use ui_out_emit_tuple.
12815         * breakpoint.c (print_one_breakpoint_location)
12816         (print_one_breakpoint): Use ui_out_emit_tuple.
12817         * auto-load.c (print_script, info_auto_load_cmd): Use
12818         ui_out_emit_tuple.
12819         * ada-tasks.c (print_ada_task_info): Use ui_out_emit_tuple.
12820
12821 2017-04-21  Simon Marchi  <simon.marchi@ericsson.com>
12822
12823         * thread.c (print_thread_info_1): Remove dead code.
12824
12825 2017-04-21  Jan Kratochvil  <jan.kratochvil@redhat.com>
12826
12827         * aarch64-tdep.c (selftests::aarch64_process_record_test): Make it #if
12828         GDB_SELF_TEST.
12829         * arm-tdep.c (selftests::arm_record_test): Likewise.
12830
12831 2017-04-21  Yao Qi  <yao.qi@linaro.org>
12832
12833         * regcache.c (regcache_restore): Remove argument 2.  Replace
12834         argument 3 with regcache.  Get register status from
12835         src->register_status and get register contents from
12836         register_buffer (src, regnum).
12837         (regcache_cpy): Update.
12838
12839 2017-04-19  Pedro Alves  <palves@redhat.com>
12840
12841         * gdbthread.h (thread): Add missing closing parenthesis in
12842         comment.
12843
12844 2017-04-19  Pedro Alves  <palves@redhat.com>
12845
12846         * common/refcounted-object.h: New file.
12847         * gdbthread.h: Include "common/refcounted-object.h".
12848         (thread_info): Inherit from refcounted_object and add comments.
12849         (thread_info::incref, thread_info::decref)
12850         (thread_info::m_refcount): Delete.
12851         (thread_info::deletable): Use the refcounted_object::refcount()
12852         method.
12853         * inferior.c (current_inferior_): Add comment.
12854         (set_current_inferior): Increment/decrement refcounts.
12855         (prune_inferiors, remove_inferior_command): Skip inferiors marked
12856         not-deletable instead of comparing with the current inferior.
12857         (initialize_inferiors): Increment the initial inferior's refcount.
12858         * inferior.h (struct inferior): Forward declare.
12859         Include "common/refcounted-object.h".
12860         (current_inferior, set_current_inferior): Move declaration to
12861         before struct inferior's definition, and fix comment.
12862         (inferior): Inherit from refcounted_object.  Add comments.
12863         * thread.c (switch_to_thread_no_regs): Reference the thread's
12864         inferior pointer directly instead of doing a ptid lookup.
12865         (switch_to_no_thread): New function.
12866         (switch_to_thread(thread_info *)): New function, factored out
12867         from ...
12868         (switch_to_thread(ptid_t)): ... this.
12869         (restore_current_thread): Delete.
12870         (current_thread_cleanup): Remove 'inf_id' and 'was_removable'
12871         fields, and add 'inf' field.
12872         (do_restore_current_thread_cleanup): Check whether old->inf is
12873         alive instead of looking up an inferior by ptid.  Use
12874         switch_to_thread and switch_to_no_thread.
12875         (restore_current_thread_cleanup_dtor): Use old->inf directly
12876         instead of lookup up an inferior by id.  Decref the inferior.
12877         Don't restore 'removable'.
12878         (make_cleanup_restore_current_thread): Same the inferior pointer
12879         in old, instead of the inferior number.  Incref the inferior.
12880         Don't save/clear 'removable'.
12881
12882 2017-04-19  Pedro Alves  <palves@redhat.com>
12883
12884         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
12885         unittests/scoped_restore-selftests.c.
12886         (SUBDIR_UNITTESTS_OBS): Add scoped_restore-selftests.o.
12887         * common/scoped_restore.h (scoped_restore_base): Make "class".
12888         (scoped_restore_base::release): New public method.
12889         (scoped_restore_base::scoped_restore_base): New protected ctor.
12890         (scoped_restore_base::m_saved_var): New protected field.
12891         (scoped_restore_tmpl::scoped_restore_tmpl(T*)): Initialize the
12892         scoped_restore_base base class instead of m_saved_var directly.
12893         (scoped_restore_tmpl::scoped_restore_tmpl(T*, T2)): Likewise.
12894         (scoped_restore_tmpl::scoped_restore_tmpl(const
12895         scoped_restore_tmpl<T>&)): Likewise.
12896         (scoped_restore_tmpl::~scoped_restore_tmpl): Use the saved_var
12897         method.
12898         (scoped_restore_tmpl::saved_var): New method.
12899         (scoped_restore_tmpl::m_saved_var): Delete.
12900         * inferior.h (inferior::detaching): Now a bool.
12901         * infrun.c (prepare_for_detach): Use a scoped_restore instead of a
12902         cleanup.
12903         * unittests/scoped_restore-selftests.c: New file.
12904
12905 2017-04-19  Pedro Alves  <palves@redhat.com>
12906
12907         * Makefile.in (SUBDIR_UNITTESTS_SRCS, SUBDIR_UNITTESTS_OBS):
12908         Re-sort in alphabetic order.
12909
12910 2017-04-18  Pedro Alves  <palves@redhat.com>
12911
12912         * xml-support.c (obstack_xml_printf): Delete.
12913         * xml-support.h (obstack_xml_printf): Delete.
12914
12915 2017-04-18  Pedro Alves  <palves@redhat.com>
12916
12917         * xml-support.c (gdb_xml_parser) <use_dtd, dtd_name, parse,
12918         vdebug, verror, body_text, start_element, end_element, name,
12919         user_data, set_is_xinclude, set_error, expat_parser>: New methods.
12920         <name, user_data, expat_parser, scopes, error, last_line, dtd_name,
12921         is_xinclude>: Make private and add m_ prefix.
12922         (gdb_xml_parser::body_text): New method, based on ...
12923         (gdb_xml_body_text): ... this.  Adjust.
12924         (gdb_xml_parser::vdebug): New method, based on ...
12925         (gdb_xml_debug): ... this.  Adjust.
12926         (gdb_xml_parser::verror): New method, based on ...
12927         (gdb_xml_error): ... this.  Adjust.
12928         (gdb_xml_parser::start_element): New method, based on ...
12929         (gdb_xml_start_element): ... this.  Adjust.
12930         (gdb_xml_start_element_wrapper): Defer to
12931         gdb_xml_parser::start_element and gdb_xml_parser::set_error.
12932         (gdb_xml_parser::end_element): New method, based on ...
12933         (gdb_xml_end_element_wrapper): ... this.  Adjust.
12934         (gdb_xml_parser::~gdb_xml_parser): Adjust.
12935         (gdb_xml_parser::gdb_xml_parser): Adjust to field renames.
12936         (gdb_xml_parser::use_dtd): New method, based on ...
12937         (gdb_xml_use_dtd): ... this.  Adjust.
12938         (gdb_xml_parser::parse): New method, based on ...
12939         (gdb_xml_parse): ... this.  Adjust.
12940         (gdb_xml_parse_quick): Adjust to call the parser's parse method.
12941         (xinclude_start_include): Adjust to call the parser's name method.
12942         (xml_xinclude_default, xml_xinclude_start_doctype)
12943         (xml_xinclude_end_doctype): Adjust to call the parser's user_data
12944         method.
12945         (xml_process_xincludes): Adjust to call parser methods.
12946         * xml-support.h (gdb_xml_use_dtd, gdb_xml_parse): Delete
12947         declarations.
12948
12949 2017-04-18  Pedro Alves  <palves@redhat.com>
12950
12951         * tracefile-tfile.c (tfile_write_tdesc): Adjust to use
12952         gdb::optional<std::string>.
12953         * xml-support.c: Include <string>.
12954         (scope_level::scope_level(scope_level &&))
12955         (scope_level::~scope_level): Delete.
12956         (scope_level::body): Now a std::string.
12957         (gdb_xml_body_text, gdb_xml_end_element): Adjust.
12958         (xinclude_parsing_data::xinclude_parsing_data): Add 'output'
12959         parameter.
12960         (xinclude_parsing_data::~xinclude_parsing_data): Delete.
12961         (xinclude_parsing_data::output): Now a std::string reference.
12962         (xinclude_start_include): Adjust.
12963         (xml_xinclude_default): Adjust.
12964         (xml_process_xincludes): Add 'output' parameter, and return bool.
12965         * xml-support.h (xml_process_xincludes): Add 'output' parameter,
12966         and return bool.
12967         * xml-tdesc.c: Include <unordered_map> and <string>.
12968         (tdesc_xml_cache): Delete.
12969         (tdesc_xml_cache_s): Delete.
12970         (xml_cache): Now an std::unordered_map.
12971         (tdesc_parse_xml): Adjust to use std::string and unordered_map.
12972         (target_fetch_description_xml): Change return type to
12973         gdb::optional<std::string>, and adjust.
12974         * xml-tdesc.h: Include "common/gdb_optional.h" and <string>.
12975         (target_fetch_description_xml): Change return type to
12976         gdb::optional<std::string>.
12977
12978 2017-04-18  Pedro Alves  <palves@redhat.com>
12979
12980         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
12981         unittests/optional-selftests.c.
12982         (SUBDIR_UNITTESTS_OBS): Add optional-selftests.o.
12983         * unittests/optional-selftests.c: New file.
12984         * unittests/optional/assignment/1.cc: New file.
12985         * unittests/optional/assignment/2.cc: New file.
12986         * unittests/optional/assignment/3.cc: New file.
12987         * unittests/optional/assignment/4.cc: New file.
12988         * unittests/optional/assignment/5.cc: New file.
12989         * unittests/optional/assignment/6.cc: New file.
12990         * unittests/optional/assignment/7.cc: New file.
12991         * unittests/optional/cons/copy.cc: New file.
12992         * unittests/optional/cons/default.cc: New file.
12993         * unittests/optional/cons/move.cc: New file.
12994         * unittests/optional/cons/value.cc: New file.
12995         * unittests/optional/in_place.cc: New file.
12996         * unittests/optional/observers/1.cc: New file.
12997         * unittests/optional/observers/2.cc: New file.
12998
12999 2017-04-18  Pedro Alves  <palves@redhat.com>
13000
13001         * common/gdb_optional.h: Include common/traits.h.
13002         (in_place_t): New type.
13003         (in_place): New constexpr variable.
13004         (optional::optional): Remove member initialization of
13005         m_instantiated.
13006         (optional::optional(in_place_t...)): New constructor.
13007         (optional::~optional): Use reset.
13008         (optional::optional(const optional&)): New.
13009         (optional::optional(const optional&&)): New.
13010         (optional::optional(T &)): New.
13011         (optional::optional(T &&)): New.
13012         (operator::operator=(const optional &)): New.
13013         (operator::operator=(optional &&)): New.
13014         (operator::operator= (const T &))
13015         (operator::operator= (T &&))
13016         (operator::emplace (Args &&... args)): Return a T&.  Use reset.
13017         (operator::reset): New.
13018         (operator::m_instantiated):: Add in-class initializer.
13019         * common/traits.h: Include <type_traits>.
13020         (struct And): New types.
13021
13022 2017-04-18  Pedro Alves  <palves@redhat.com>
13023
13024         * xml-support.c: Include <vector>.
13025         (scope_level::scope_level(const gdb_xml_element *))
13026         (scope_level::scope_level(scope_level&&)): New.
13027         (scope_level::~scope_level): New.
13028         (scope_level_s): Delete.
13029         (gdb_xml_parser::scopes): Now a std::vector.
13030         (gdb_xml_body_text, gdb_xml_start_element, gdb_xml_end_element):
13031         Use std::vector.
13032         (gdb_xml_parser::~gdb_xml_parser): Remove now unnecessary
13033         scope cleanup code.
13034         (gdb_xml_parser::gdb_xml_parser): Remove explicit initialization
13035         of the scopes member.  Use std::vector::emplace_back.
13036
13037 2017-04-18  Pedro Alves  <palves@redhat.com>
13038
13039         * xml-support.c (gdb_xml_parser): Add ctor/dtor.  Make is_xinclude
13040         a bool.
13041         (gdb_xml_end_element): Change type of first parameter.
13042         (gdb_xml_cleanup): Rename to ...
13043         (gdb_xml_parser::~gdb_xml_parser): ... this.
13044         (gdb_xml_create_parser_and_cleanup): Delete with ...
13045         (gdb_xml_parser::gdb_xml_parser): ... creation parts factored out
13046         to this new ctor.
13047         (gdb_xml_parse_quick): Create a local gdb_xml_parser instead of
13048         using gdb_xml_create_parser_and_cleanup.
13049         (xinclude_parsing_data): Add ctor/dtor.
13050         (xml_xinclude_cleanup): Delete.
13051         (xml_process_xincludes): Create a local xinclude_parsing_data
13052         instead of heap-allocating one.  Create a local gdb_xml_parser
13053         instead of heap-allocating one with
13054         gdb_xml_create_parser_and_cleanup.
13055
13056 2017-04-18  John Baldwin  <jhb@FreeBSD.org>
13057
13058         PR threads/20743
13059         * fbsd-nat.c (resume_one_thread_cb): Remove.
13060         (resume_all_threads_cb): Remove.
13061         (fbsd_resume): Use ALL_NON_EXITED_THREADS instead of
13062         iterate_over_threads.
13063
13064 2017-04-17  Joel Brobecker  <brobecker@adacore.com>
13065
13066         * NEWS: Create a new section for the next release branch.
13067         Rename the section of the current branch, now that it has
13068         been cut.
13069
13070 2017-04-17  Joel Brobecker  <brobecker@adacore.com>
13071
13072         GDB 8.0 branch created (725bf5cf125783c2a7ca4ab63d3768e220bab2db):
13073         * version.in: Bump version to 8.0.50.DATE-git.
13074
13075 2017-04-13  Sergio Durigan Junior  <sergiodj@redhat.com>
13076
13077         PR gdb/21385
13078         * windows-nat.c (windows_create_inferior): Declare 'allargs'
13079         independently of the host, and fix build breakage on Cygwin.
13080
13081 2017-04-13  Pedro Alves  <palves@redhat.com>
13082
13083         * inferior.c (free_inferior): Convert to ...
13084         (inferior::~inferior): ... this dtor.
13085         (inferior::inferior): New ctor, factored out from ...
13086         (add_inferior_silent): ... here.  Allocate the inferior with a new
13087         expression.
13088         (delete_inferior): Call delete instead of free_inferior.
13089         * inferior.h (gdb_environ, continuation): Forward declare.
13090         (inferior): Now a class.  Add in-class initialization to all
13091         members.  Make boolean fields bool, except 'detaching'.
13092         (inferior::inferior): New explicit ctor.
13093         (inferior::~inferior): New.
13094
13095 2017-04-13  Pedro Alves  <palves@redhat.com>
13096
13097         * inferior.c (init_inferior_list): Delete.
13098         * inferior.h (init_inferior_list): Delete.
13099
13100 2017-04-13  Pedro Alves  <palves@redhat.com>
13101
13102         PR threads/13217
13103         * gdb.threads/threadapply.exp (thr_apply_detach): New procedure.
13104         (top level): Call it twice, with different thread sets.
13105
13106 2017-04-13  Pedro Alves  <palves@redhat.com>
13107
13108         * thread.c: Include <algorithm>.
13109         (thread_array_cleanup): Delete.
13110         (scoped_inc_dec_ref): New class.
13111         (live_threads_count): New function.
13112         (set_thread_refcount): Delete.
13113         (tp_array_compar_ascending): Now a bool.
13114         (tp_array_compar): Convert to a std::sort comparison function.
13115         (thread_apply_all_command): Use std::vector and scoped_inc_dec_ref
13116         and live_threads_count.
13117
13118 2017-04-13  Pedro Alves  <palves@redhat.com>
13119
13120         * infrun.c (follow_fork_inferior): Also switch the current
13121         inferior.
13122
13123 2017-04-13  Pedro Alves  <palves@redhat.com>
13124
13125         * breakpoint.c (watch_command_1): Save watchpoint-frame info
13126         before calling create_internal_breakpoint.
13127
13128 2017-04-13  Pedro Alves  <palves@redhat.com>
13129
13130         * fork-child.c (execv_argv): New class.
13131         (breakup_args): Refactored as ...
13132         (execv_argv::init_for_no_shell): .. this method of execv_argv.
13133         Copy arguments to storage and replace separators with NULL
13134         terminators in place.
13135         (escape_bang_in_quoted_argument): Adjust to return bool.
13136         (execv_argv::execv_argv): New ctor.
13137         (execv_argv::init_for_shell): New method, factored out from
13138         fork_inferior.  Don't strdup strings into the vector.
13139         (fork_inferior): Eliminate "shell" local and use execv_argv.  Use
13140         Remove free_vector_argv call.
13141
13142 2017-04-13  Yao Qi  <yao.qi@linaro.org>
13143
13144         * rx-tdep.c (rx_fpsw_type): Check tdep->rx_fpsw_type instead of
13145         tdep->rx_psw_type.
13146
13147 2017-04-13  Yao Qi  <yao.qi@linaro.org>
13148
13149         * rl78-tdep.c (rl78_gdbarch_init): Use XCNEW instead of XNEW.
13150         * rx-tdep.c (rx_gdbarch_init): Likewise.
13151
13152 2017-04-13  Pedro Alves  <palves@redhat.com>
13153
13154         * breakpoint.h (struct breakpoint): Reindent.
13155
13156 2017-04-13  Pedro Alves  <palves@redhat.com>
13157
13158         * breakpoint.c (bp_location): Rename to ...
13159         (bp_locations): ... this.  All references updated.
13160         (bp_location_count): Rename to ...
13161         (bp_locations_count): ... this.  All references updated.
13162         (bp_location_placed_address_before_address_max): Rename to ...
13163         (bp_locations_placed_address_before_address_max): ... this.  All
13164         references updated.
13165         (bp_location_shadow_len_after_address_max): Rename to ...
13166         (bp_locations_shadow_len_after_address_max): ... this.  All
13167         references updated.
13168         (bp_location_compare_addrs): Rename to ...
13169         (bp_locations_compare_addrs): ... this.  All references updated.
13170         (bp_location_compare):Rename to ...
13171         (bp_locations_compare): ... this.  All references updated.
13172         (bp_location_target_extensions_update): Rename to ...
13173         (bp_locations_target_extensions_update): ... this.  All references
13174         updated.
13175
13176 2017-04-12  Sergio Durigan Junior  <sergiodj@redhat.com>
13177
13178         * Makefile.in (HFILES_NO_SRCDIR): Add "common/gdb_termios.h".
13179         * common/common.m4: Check headers 'termios.h', 'termio.h' and
13180         'sgtty.h'.
13181         * common/gdb_termios.h: New file, with parts of "terminal.h".
13182         * inflow.c: Include "gdb_termios.h".
13183         * ser-unix.c: Include "gdb_termios.h".
13184         * terminal.h: Move terminal-related defines to
13185         "common/gdb_termios.h".
13186
13187 2017-04-12  Tom Tromey  <tom@tromey.com>
13188
13189         * probe.c (parse_probes): Update.
13190         * location.h (delete_event_location): Don't declare.
13191         (event_location_deleter::operator()): Update.
13192         * location.c (event_location_deleter::operator()): Rename from
13193         delete_event_location.
13194         * linespec.h (linespec_result) <location>: Change type to
13195         event_location_up.
13196         * linespec.c (canonicalize_linespec, event_location_to_sals)
13197         (decode_objc): Update.
13198         (linespec_result): Don't call delete_event_location.
13199         * breakpoint.c (create_breakpoints_sal)
13200         (bkpt_probe_create_sals_from_location)
13201         (strace_marker_create_sals_from_location): Update.
13202
13203 2017-04-12  Tom Tromey  <tom@tromey.com>
13204
13205         * linespec.h (struct linespec_result): Add constructor and
13206         destructor.
13207         (init_linespec_result, destroy_linespec_result)
13208         (make_cleanup_destroy_linespec_result): Don't declare.
13209         * linespec.c (init_linespec_result): Remove.
13210         (linespec_result::~linespec_result): Rename from
13211         destroy_linespec_result.  Update.
13212         (cleanup_linespec_result, make_cleanup_destroy_linespec_result):
13213         Remove.
13214         * breakpoint.c (create_breakpoint, break_range_command)
13215         (decode_location_default): Update.
13216         * ax-gdb.c (agent_command_1): Update.
13217
13218 2017-04-12  Tom Tromey  <tom@tromey.com>
13219
13220         * remote.c (remote_download_tracepoint): Update.
13221         * python/py-breakpoint.c (bppy_get_location): Update.
13222         * guile/scm-breakpoint.c (bpscm_print_breakpoint_smob)
13223         (gdbscm_breakpoint_location): Update.
13224         * elfread.c (elf_gnu_ifunc_resolver_return_stop): Update.
13225         * breakpoint.h (struct breakpoint) <location, location_range_end>:
13226         Change type to event_location_up.
13227         * breakpoint.c (create_overlay_event_breakpoint)
13228         (create_longjmp_master_breakpoint)
13229         (create_std_terminate_master_breakpoint)
13230         (create_exception_master_breakpoint)
13231         (breakpoint_event_location_empty_p, print_breakpoint_location)
13232         (print_one_breakpoint_location, create_thread_event_breakpoint)
13233         (init_breakpoint_sal, create_breakpoint)
13234         (print_recreate_ranged_breakpoint, break_range_command)
13235         (init_ada_exception_breakpoint, say_where): Update.
13236         (base_breakpoint_dtor): Don't call delete_event_location.
13237         (bkpt_print_recreate, tracepoint_print_recreate)
13238         (dprintf_print_recreate, update_static_tracepoint)
13239         (breakpoint_re_set_default): Update.
13240
13241 2017-04-12  Tom Tromey  <tom@tromey.com>
13242
13243         * compile/compile-loc2c.c (compute_stack_depth_worker): Change
13244         type of "to_do".  Update.
13245         (compute_stack_depth): Use std::vector.
13246
13247 2017-04-12  Tom Tromey  <tom@tromey.com>
13248
13249         * printcmd.c (find_instruction_backward): Use std::vector.
13250
13251 2017-04-12  Tom Tromey  <tom@tromey.com>
13252
13253         * symfile.c (objfilep): Remove typedef.
13254         (reread_symbols): Use a std::vector.
13255
13256 2017-04-12  Tom Tromey  <tom@tromey.com>
13257
13258         * mi/mi-main.c (exec_direction_forward): Remove.
13259         (exec_reverse_continue, mi_execute_command): Use scoped_restore.
13260         * guile/scm-ports.c (ioscm_with_output_to_port_worker): Use
13261         scoped_restore.
13262         * guile/guile.c (guile_repl_command, guile_command)
13263         (gdbscm_execute_gdb_command): Use scoped_restore.
13264         * go-exp.y (go_parse): Use scoped_restore.
13265         * d-exp.y (d_parse): Use scoped_restore.
13266         * cli/cli-decode.c (cmd_func): Use scoped_restore.
13267         * c-exp.y (c_parse): Use scoped_restore.
13268
13269 2017-04-12  Tom Tromey  <tom@tromey.com>
13270
13271         * mi/mi-parse.h (struct mi_parse): Add constructor, destructor.
13272         (mi_parse): Update return type.
13273         (mi_parse_free): Remove.
13274         * mi/mi-parse.c (mi_parse::mi_parse): New constructor.
13275         (mi_parse::~mi_parse): Rename from mi_parse_free.
13276         (mi_parse_cleanup): Remove.
13277         (mi_parse): Return a unique_ptr.  Use new.
13278         * mi/mi-main.c (mi_execute_command): Update.
13279
13280 2017-04-12  Tom Tromey  <tom@tromey.com>
13281
13282         * location.c (explicit_location_lex_one): Return a
13283         unique_xmalloc_ptr.
13284         (string_to_explicit_location): Update.  Remove cleanups.
13285
13286 2017-04-12  Tom Tromey  <tom@tromey.com>
13287
13288         * gnu-v3-abi.c (value_and_voffset_p): Remove typedef.
13289         (compare_value_and_voffset): Change type.  Update.
13290         (compute_vtable_size): Change type of "offset_vec".
13291         (gnuv3_print_vtable): Use std::vector.  Remove cleanups.
13292         (gnuv3_get_typeid): Remove extraneous declaration.
13293
13294 2017-04-12  Tom Tromey  <tom@tromey.com>
13295
13296         * charset.h (wchar_iterator): Fix comment.
13297
13298 2017-04-12  Tom Tromey  <tom@tromey.com>
13299
13300         * charset.c (iconv_wrapper): New class.
13301         (cleanup_iconv): Remove.
13302         (convert_between_encodings): Use it.
13303
13304 2017-04-12  Tom Tromey  <tom@tromey.com>
13305
13306         * symfile.h (increment_reading_symtab): Update type.
13307         * symfile.c (decrement_reading_symtab): Remove.
13308         (increment_reading_symtab): Return a scoped_restore_tmpl<int>.
13309         * psymtab.c (psymtab_to_symtab): Update.
13310         * dwarf2read.c (dw2_instantiate_symtab): Update.
13311
13312 2017-04-12  Tom Tromey  <tom@tromey.com>
13313
13314         * jit.c (struct jit_reader): Declare separately.  Add constructor
13315         and destructor.  Change type of "handle".
13316         (loaded_jit_reader): Define separately.
13317         (jit_reader_load): Update.  New "new".
13318         (jit_reader_unload_command): Use "delete".
13319         * gdb-dlfcn.h (struct dlclose_deleter): New.
13320         (gdb_dlhandle_up): New typedef.
13321         (gdb_dlopen, gdb_dlsym): Update types.
13322         (gdb_dlclose): Remove.
13323         * gdb-dlfcn.c (gdb_dlopen): Return a gdb_dlhandle_up.
13324         (gdb_dlsym): Change type of "handle".
13325         (make_cleanup_dlclose): Remove.
13326         (dlclose_deleter::operator()): Rename from gdb_dlclose.
13327         * compile/compile-c-support.c (load_libcc): Update.
13328
13329 2017-04-12  Tom Tromey  <tom@tromey.com>
13330
13331         * symtab.h (find_pcs_for_symtab_line): Change return type.
13332         * symtab.c (find_pcs_for_symtab_line): Change return type.
13333         * python/py-linetable.c (build_line_table_tuple_from_pcs): Change
13334         type of "vec".  Update.
13335         (ltpy_get_pcs_for_line): Update.
13336         * linespec.c (decode_digits_ordinary): Update.
13337
13338 2017-04-12  Tom Tromey  <tom@tromey.com>
13339
13340         * tracepoint.c (actions_command): Update.
13341         * python/python.c (python_command, python_interactive_command):
13342         Update.
13343         * mi/mi-cmd-break.c (mi_cmd_break_commands): Update.
13344         * guile/guile.c (guile_command): Update.
13345         * defs.h (read_command_lines, read_command_lines_1): Return
13346         command_line_up.
13347         (command_lines_deleter): New struct.
13348         (command_line_up): New typedef.
13349         * compile/compile.c (compile_code_command)
13350         (compile_print_command): Update.
13351         * cli/cli-script.h (get_command_line, copy_command_lines): Return
13352         command_line_up.
13353         (make_cleanup_free_command_lines): Remove.
13354         * cli/cli-script.c (get_command_line, read_command_lines_1)
13355         (copy_command_lines): Return command_line_up.
13356         (while_command, if_command, read_command_lines, define_command)
13357         (document_command): Update.
13358         (do_free_command_lines_cleanup, make_cleanup_free_command_lines):
13359         Remove.
13360         * breakpoint.h (breakpoint_set_commands): Change type of
13361         "commands".
13362         * breakpoint.c (breakpoint_set_commands): Change type of
13363         "commands".  Update.
13364         (do_map_commands_command, update_dprintf_command_list)
13365         (create_tracepoint_from_upload): Update.
13366
13367 2017-04-12  Tom Tromey  <tom@tromey.com>
13368
13369         * tracepoint.c (scope_info): Update.
13370         * spu-tdep.c (spu_catch_start): Update.
13371         * python/python.c (gdbpy_decode_line): Update.
13372         * python/py-finishbreakpoint.c (bpfinishpy_init): Update.
13373         * python/py-breakpoint.c (bppy_init): Update.
13374         * probe.c (parse_probes): Update.
13375         * mi/mi-cmd-break.c (mi_cmd_break_insert_1): Update.
13376         * location.h (event_location_deleter): New struct.
13377         (event_location_up): New typedef.
13378         (new_linespec_location, new_address_location, new_probe_location)
13379         (new_explicit_location, copy_event_location)
13380         (string_to_event_location, string_to_event_location_basic)
13381         (string_to_explicit_location): Update return type.
13382         (make_cleanup_delete_event_location): Remove.
13383         * location.c (new_linespec_location, new_address_location)
13384         (new_probe_location, new_explicit_location, copy_event_location):
13385         Return event_location_up.
13386         (delete_event_location_cleanup)
13387         (make_cleanup_delete_event_location): Remove.
13388         (string_to_explicit_location, string_to_event_location_basic)
13389         (string_to_event_location): Return event_location_up.
13390         * linespec.c (canonicalize_linespec, event_location_to_sals)
13391         (decode_line_with_current_source)
13392         (decode_line_with_last_displayed, decode_objc): Update.
13393         * guile/scm-breakpoint.c (gdbscm_register_breakpoint_x): Update.
13394         * completer.c (location_completer): Update.
13395         * cli/cli-cmds.c (edit_command, list_command): Update.
13396         * breakpoint.c (create_overlay_event_breakpoint)
13397         (create_longjmp_master_breakpoint)
13398         (create_std_terminate_master_breakpoint)
13399         (create_exception_master_breakpoint)
13400         (create_thread_event_breakpoint): Update.
13401         (init_breakpoint_sal): Update.  Remove some dead code.
13402         (create_breakpoint_sal): Change type of "location".  Update.
13403         (create_breakpoints_sal, create_breakpoint, break_command_1)
13404         (dprintf_command, break_range_command, until_break_command)
13405         (init_ada_exception_breakpoint)
13406         (strace_marker_create_sals_from_location)
13407         (update_static_tracepoint, trace_command, ftrace_command)
13408         (strace_command, create_tracepoint_from_upload): Update.
13409         * break-catch-throw.c (re_set_exception_catchpoint): Update.
13410         * ax-gdb.c (agent_command_1): Update.
13411
13412 2017-04-12  Pedro Alves  <palves@redhat.com>
13413
13414         * Makefile.in (ALL_TARGET_OBS): Add i386-go32-tdep.o.
13415         * configure.tgt: Handle i[34567]86-*-go32* and
13416         i[34567]86-*-msdosdjgpp*.
13417         * i386-tdep.c (i386_svr4_reg_to_regnum):
13418         Make extern.
13419         (i386_go32_init_abi, i386_coff_osabi_sniffer): Moved to
13420         i386-go32-tdep.c.
13421         (_initialize_i386_tdep): DJGPP bits moved to i386-go32-tdep.c.
13422         * i386-go32-tdep.c: New file.
13423         * i386-tdep.h (tdesc_i386_mmx, i386_svr4_reg_to_regnum): New
13424         declarations.
13425
13426 2017-04-12  Simon Marchi  <simon.marchi@ericsson.com>
13427
13428         * aix-thread.c (pd_status2str): Change return type to const char *.
13429
13430 2017-04-12  Pedro Alves  <palves@redhat.com>
13431
13432         * i386-tdep.c (i386_elf_init_abi, i386_go32_init_abi): Remove
13433         calls to set_gdbarch_gnu_triplet_regexp.
13434
13435 2017-04-12  Pedro Alves  <palves@redhat.com>
13436
13437         PR gdb/21323
13438         * c-lang.c (cplus_primitive_types) <cplus_primitive_type_wchar_t>:
13439         New enum value.
13440         (cplus_language_arch_info): Register cplus_primitive_type_wchar_t.
13441         * gdbtypes.h (struct builtin_type) <builtin_wchar>: New field.
13442         * gdbtypes.c (gdbtypes_post_init): Create the "wchar_t" type.
13443         * gdbarch.sh (wchar_bit, wchar_signed): New per-arch values.
13444         * gdbarch.h, gdbarch.c: Regenerate.
13445         * aarch64-tdep.c (aarch64_gdbarch_init): Override
13446         gdbarch_wchar_bit and gdbarch_wchar_signed.
13447         * alpha-tdep.c (alpha_gdbarch_init): Likewise.
13448         * arm-tdep.c (arm_gdbarch_init): Likewise.
13449         * avr-tdep.c (avr_gdbarch_init): Likewise.
13450         * h8300-tdep.c (h8300_gdbarch_init): Likewise.
13451         * i386-nto-tdep.c (i386nto_init_abi): Likewise.
13452         * i386-tdep.c (i386_go32_init_abi): Likewise.
13453         * m32r-tdep.c (m32r_gdbarch_init): Likewise.
13454         * moxie-tdep.c (moxie_gdbarch_init): Likewise.
13455         * nds32-tdep.c (nds32_gdbarch_init): Likewise.
13456         * rs6000-aix-tdep.c (rs6000_aix_init_osabi): Likewise.
13457         * sh-tdep.c (sh_gdbarch_init): Likewise.
13458         * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
13459         * sparc64-tdep.c (sparc64_init_abi): Likewise.
13460         * windows-tdep.c (windows_init_abi): Likewise.
13461         * xstormy16-tdep.c (xstormy16_gdbarch_init): Likewise.
13462
13463 2017-04-12  Pedro Alves  <palves@redhat.com>
13464
13465         PR c++/21323
13466         * c-lang.c (cplus_primitive_types) <cplus_primitive_type_char16_t,
13467         cplus_primitive_type_char32_t>: New enum values.
13468         (cplus_language_arch_info): Register cplus_primitive_type_char16_t
13469         and cplus_primitive_type_char32_t.
13470         * dwarf2read.c (read_base_type) <DW_ATE_UTF>: If bit size is 16 or
13471         32, use the archtecture's built-in type for char16_t and char32_t,
13472         respectively.  Otherwise, fallback to init_integer_type as before,
13473         but make the type unsigned, and issue a complaint.
13474         * gdbtypes.c (gdbtypes_post_init): Make char16_t and char32_t unsigned.
13475
13476 2017-04-12  Alan Hayward  <alan.hayward@arm.com>
13477
13478         * m32r-tdep.c (M32R_ARG_REGISTER_SIZE): Added.
13479         (m32r_push_dummy_call): Use M32R_ARG_REGISTER_SIZE.
13480
13481 2017-04-12  Sergio Durigan Junior  <sergiodj@redhat.com>
13482
13483         * windows-nat.c (windows_create_inferior): Declare 'toexec' as
13484         'const char *'.
13485
13486 2017-04-12  Sergio Durigan Junior  <sergiodj@redhat.com>
13487
13488         * common/common-utils.c (free_vector_argv): New function.
13489         * common/common-utils.h: Include <vector>.
13490         (free_vector_argv): New prototype.
13491         * darwin-nat.c (darwin_create_inferior): Rewrite function
13492         prototype in order to constify "exec_file" and accept a
13493         "std::string" for "allargs".
13494         * fork-child.c: Include <vector>.
13495         (breakup_args): Rewrite function, using C++.
13496         (fork_inferior): Rewrite function header, constify "exec_file_arg"
13497         and accept "std::string" for "allargs".  Update the code to
13498         calculate "argv" based on "allargs".  Update calls to "exec_fun"
13499         and "execvp".
13500         * gnu-nat.c (gnu_create_inferior): Rewrite function prototype in
13501         order to constify "exec_file" and accept a "std::string" for
13502         "allargs".
13503         * go32-nat.c (go32_create_inferior): Likewise.
13504         * inf-ptrace.c (inf_ptrace_create_inferior): Likewise.
13505         * infcmd.c (run_command_1): Constify "exec_file".  Use
13506         "std::string" for inferior arguments.
13507         * inferior.h (fork_inferior): Update prototype.
13508         * linux-nat.c (linux_nat_create_inferior): Rewrite function
13509         prototype in order to constify "exec_file" and accept a
13510         "std::string" for "allargs".
13511         * nto-procfs.c (procfs_create_inferior): Likewise.
13512         * procfs.c (procfs_create_inferior): Likewise.
13513         * remote-sim.c (gdbsim_create_inferior): Likewise.
13514         * remote.c (extended_remote_run): Update code to accept
13515         "std::string" as argument.
13516         (extended_remote_create_inferior): Rewrite function prototype in
13517         order to constify "exec_file" and accept a "std::string" for
13518         "allargs".
13519         * rs6000-nat.c (super_create_inferior): Likewise.
13520         (rs6000_create_inferior): Likewise.
13521         * target.h (struct target_ops) <to_create_inferior>: Likewise.
13522         * windows-nat.c (windows_create_inferior): Likewise.
13523
13524 2017-04-11  Pedro Alves  <palves@redhat.com>
13525
13526         * thread.c: Fix whitespace throughout.
13527
13528 2017-04-11  Philipp Rudo  <prudo@linux.vnet.ibm.com>
13529
13530         * linux-nat.c (linux_nat_detach): Remove delete_lwp call.
13531
13532 2017-04-11  Alan Hayward  <alan.hayward@arm.com>
13533
13534         * arm-tdep.c (arm_store_return_value): Use FP_REGISTER_SIZE
13535
13536 2017-04-10  Sergio Durigan Junior  <sergiodj@redhat.com>
13537
13538         PR gdb/21364
13539         * osdata.c (info_osdata): Check if 'type' is an empty string
13540         instead of NULL.
13541
13542 2017-04-10  Pedro Alves  <palves@redhat.com>
13543
13544         * thread.c (add_thread_silent, delete_thread_1, find_thread_ptid)
13545         (ptid_to_global_thread_id, in_thread_list)
13546         (do_captured_list_thread_ids, set_resumed, set_running)
13547         (set_executing, set_stop_requested, finish_thread_state)
13548         (validate_registers_access, can_access_registers_ptid)
13549         (print_thread_info_1, switch_to_thread)
13550         (do_restore_current_thread_cleanup)
13551         (make_cleanup_restore_current_thread, thread_command)
13552         (thread_name_command): Use operator== instead of ptid_equal.
13553
13554 2017-04-10  Pedro Alves  <palves@redhat.com>
13555
13556         * thread.c (struct current_thread_cleanup) <next>: Delete field.
13557         (current_thread_cleanup_chain): Delete.
13558         (restore_current_thread_cleanup_dtor)
13559         (make_cleanup_restore_current_thread): Remove references to
13560         current_thread_cleanup_chain.
13561
13562 2017-04-10  Alan Hayward  <alan.hayward@arm.com>
13563
13564         * msp430-tdep.c (msp430_pseudo_register_read): Never return
13565         REG_UNKNOWN.
13566
13567 2017-04-10  Yao Qi  <yao.qi@linaro.org>
13568
13569         PR gdb/19942
13570         * gdbthread.h (thread_info::deletable): New method.
13571         (thread_info::incref): New method.
13572         (thread_info::decref): New method.
13573         (thread_info::refcount): Move it to private.
13574         * infrun.c (save_stop_context): Call inc_refcount.
13575         (release_stop_context_cleanup): Likewise.
13576         * thread.c (set_thread_exited): New function.
13577         (init_thread_list): Delete "tp" only it is deletable, otherwise
13578         call set_thread_exited.
13579         (delete_thread_1): Call set_thread_exited.
13580         (current_thread_cleanup) <inferior_pid>: Remove.
13581         <thread>: New field.
13582         (restore_current_thread_ptid_changed): Removed.
13583         (do_restore_current_thread_cleanup): Adjust.
13584         (restore_current_thread_cleanup_dtor): Don't call
13585         find_thread_ptid.
13586         (set_thread_refcount): Use dec_refcount.
13587         (make_cleanup_restore_current_thread): Adjust.
13588         (thread_apply_all_command): Call inc_refcount.
13589         (_initialize_thread): Don't call
13590         observer_attach_thread_ptid_changed.
13591
13592 2017-04-10  Yao Qi  <yao.qi@linaro.org>
13593
13594         * thread.c (delete_thread_1): Hoist code on marking thread as
13595         exited.
13596
13597 2017-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
13598
13599         * windows-nat.c (windows_detach): Initialize ptid with
13600         minus_one_ptid.
13601
13602 2017-04-07  Simon Marchi  <simon.marchi@ericsson.com>
13603
13604         * unittests/ptid-selftests.c: Fix erroneous assert messages.
13605
13606 2017-04-07  Alan Hayward  <alan.hayward@arm.com>
13607
13608         * bfin-tdep.c (BFIN_MAX_REGISTER_SIZE): Add.
13609         (bfin_pseudo_register_read): Use BFIN_MAX_REGISTER_SIZE.
13610         (bfin_pseudo_register_write): Likewise
13611
13612 2017-04-06  Simon Marchi  <simon.marchi@ericsson.com>
13613
13614         * common/ptid.h (struct ptid): Change to...
13615         (class ptid_t): ... this.
13616         <ptid_t>: New constructors.
13617         <pid, lwp_p, lwp, tid_p, tid, is_pid, operator==, operator!=,
13618         matches>: New methods.
13619         <make_null, make_minus_one>: New static methods.
13620         <pid>: Rename to...
13621         <m_pid>: ...this.
13622         <lwp>: Rename to...
13623         <m_lwp>: ...this.
13624         <tid>: Rename to...
13625         <m_tid>: ...this.
13626         (ptid_build, ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal,
13627         ptid_is_pid, ptid_lwp_p, ptid_tid_p, ptid_match): Take ptid arguments
13628         as references, move comment to class ptid_t.
13629         * common/ptid.c (null_ptid, minus_one_ptid): Initialize with
13630         ptid_t static methods.
13631         (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_tid,
13632         ptid_equal, ptid_is_pid, ptid_lwp_p, ptid_tid_p, ptid_match):
13633         Take ptid arguments as references, implement using ptid_t methods.
13634         * unittests/ptid-selftests.c: New file.
13635         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
13636         unittests/ptid-selftests.c.
13637         (SUBDIR_UNITTESTS_OBS): Add unittests/ptid-selftests.o.
13638
13639 2017-04-06  Thomas Preud'homme  <thomas.preudhomme@arm.com>
13640
13641         * python/python.c (python_run_simple_file): Cast mode literal to
13642         non-const char pointer as expected by PyFile_FromString.
13643
13644 2017-04-05  Simon Marchi  <simon.marchi@ericsson.com>
13645
13646         * common/ptid.c (ptid_lwp_p, ptid_tid_p): Remove comparison with
13647         minus_one_ptid and null_ptid.
13648
13649 2017-04-05  Pedro Alves  <palves@redhat.com>
13650
13651         * warning.m4 (build_warnings): Remove -Wno-write-strings.
13652         * configure: Regenerate.
13653
13654 2017-04-05  Pedro Alves  <palves@redhat.com>
13655
13656         * ada-exp.y (yyerror): Constify.
13657         * ada-lang.c (bound_name, get_selections)
13658         (ada_variant_discrim_type)
13659         (ada_variant_discrim_name, ada_value_struct_elt)
13660         (ada_lookup_struct_elt_type, is_unchecked_variant)
13661         (ada_which_variant_applies, standard_exc, ada_get_next_arg)
13662         (catch_ada_exception_command_split)
13663         (catch_ada_assert_command_split, catch_assert_command)
13664         (ada_op_name): Constify.
13665         * ada-lang.h (ada_yyerror, get_selections)
13666         (ada_variant_discrim_name, ada_value_struct_elt): Constify.
13667         * arc-tdep.c (arc_print_frame_cache): Constify.
13668         * arm-tdep.c (arm_skip_stub): Constify.
13669         * ax-gdb.c (gen_binop, gen_struct_ref_recursive, gen_struct_ref)
13670         (gen_aggregate_elt_ref): Constify.
13671         * bcache.c (print_bcache_statistics): Constify.
13672         * bcache.h (print_bcache_statistics): Constify.
13673         * break-catch-throw.c (catch_exception_command_1):
13674         * breakpoint.c (struct ep_type_description::description):
13675         Constify.
13676         (add_solib_catchpoint): Constify.
13677         (catch_fork_command_1): Add cast.
13678         (add_catch_command): Constify.
13679         * breakpoint.h (add_catch_command, add_solib_catchpoint):
13680         Constify.
13681         * bsd-uthread.c (bsd_uthread_state): Constify.
13682         * buildsym.c (patch_subfile_names): Constify.
13683         * buildsym.h (next_symbol_text_func, patch_subfile_names):
13684         Constify.
13685         * c-exp.y (yyerror): Constify.
13686         (token::oper): Constify.
13687         * c-lang.h (c_yyerror, cp_print_class_member): Constify.
13688         * c-varobj.c (cplus_describe_child): Constify.
13689         * charset.c (find_charset_names): Add cast.
13690         (find_charset_names): Constify array and add const_cast.
13691         * cli/cli-cmds.c (complete_command, cd_command): Constify.
13692         (edit_command): Constify.
13693         * cli/cli-decode.c (lookup_cmd): Constify.
13694         * cli/cli-dump.c (dump_memory_command, dump_value_command):
13695         Constify.
13696         (struct dump_context): Constify.
13697         (add_dump_command, restore_command): Constify.
13698         * cli/cli-script.c (get_command_line): Constify.
13699         * cli/cli-script.h (get_command_line): Constify.
13700         * cli/cli-utils.c (check_for_argument): Constify.
13701         * cli/cli-utils.h (check_for_argument): Constify.
13702         * coff-pe-read.c (struct read_pe_section_data): Constify.
13703         * command.h (lookup_cmd): Constify.
13704         * common/print-utils.c (decimal2str): Constify.
13705         * completer.c (gdb_print_filename): Constify.
13706         * corefile.c (set_gnutarget): Constify.
13707         * cp-name-parser.y (yyerror): Constify.
13708         * cp-valprint.c (cp_print_class_member): Constify.
13709         * cris-tdep.c (cris_register_name, crisv32_register_name):
13710         Constify.
13711         * d-exp.y (yyerror): Constify.
13712         (struct token::oper): Constify.
13713         * d-lang.h (d_yyerror): Constify.
13714         * dbxread.c (struct header_file_location::name): Constify.
13715         (add_old_header_file, add_new_header_file, last_function_name)
13716         (dbx_next_symbol_text, add_bincl_to_list)
13717         (find_corresponding_bincl_psymtab, set_namestring)
13718         (find_stab_function_addr, read_dbx_symtab, start_psymtab)
13719         (dbx_end_psymtab, read_ofile_symtab, process_one_symbol):
13720         * defs.h (command_line_input, print_address_symbolic)
13721         (deprecated_readline_begin_hook): Constify.
13722         * dwarf2read.c (anonymous_struct_prefix, dwarf_bool_name):
13723         Constify.
13724         * event-top.c (handle_line_of_input): Constify and add cast.
13725         * exceptions.c (catch_errors): Constify.
13726         * exceptions.h (catch_errors): Constify.
13727         * expprint.c (print_subexp_standard, op_string, op_name)
13728         (op_name_standard, dump_raw_expression, dump_raw_expression):
13729         * expression.h (op_name, op_string, dump_raw_expression):
13730         Constify.
13731         * f-exp.y (yyerror): Constify.
13732         (struct token::oper): Constify.
13733         (struct f77_boolean_val::name): Constify.
13734         * f-lang.c (f_word_break_characters): Constify.
13735         * f-lang.h (f_yyerror): Constify.
13736         * fork-child.c (fork_inferior): Add cast.
13737         * frv-tdep.c (struct gdbarch_tdep::register_names): Constify.
13738         (new_variant): Constify.
13739         * gdbarch.sh (pstring_ptr, pstring_list): Constify.
13740         * gdbarch.c: Regenerate.
13741         * gdbcore.h (set_gnutarget): Constify.
13742         * go-exp.y (yyerror): Constify.
13743         (token::oper): Constify.
13744         * go-lang.h (go_yyerror): Constify.
13745         * go32-nat.c (go32_sysinfo): Constify.
13746         * guile/scm-breakpoint.c (gdbscm_breakpoint_expression): Constify.
13747         * guile/scm-cmd.c (cmdscm_function): Constify.
13748         * guile/scm-param.c (pascm_param_value): Constify.
13749         * h8300-tdep.c (h8300_register_name, h8300s_register_name)
13750         (h8300sx_register_name): Constify.
13751         * hppa-tdep.c (hppa32_register_name, hppa64_register_name):
13752         Constify.
13753         * ia64-tdep.c (ia64_register_names): Constify.
13754         * infcmd.c (construct_inferior_arguments): Constify.
13755         (path_command, attach_post_wait): Constify.
13756         * language.c (show_range_command, show_case_command)
13757         (unk_lang_error): Constify.
13758         * language.h (language_defn::la_error)
13759         (language_defn::la_name_of_this): Constify.
13760         * linespec.c (decode_line_2): Constify.
13761         * linux-thread-db.c (thread_db_err_str): Constify.
13762         * lm32-tdep.c (lm32_register_name): Constify.
13763         * m2-exp.y (yyerror): Constify.
13764         * m2-lang.h (m2_yyerror): Constify.
13765         * m32r-tdep.c (m32r_register_names): Constify and make static.
13766         * m68hc11-tdep.c (m68hc11_register_names): Constify.
13767         * m88k-tdep.c (m88k_register_name): Constify.
13768         * macroexp.c (appendmem): Constify.
13769         * mdebugread.c (fdr_name, add_data_symbol, parse_type)
13770         (upgrade_type, parse_external, parse_partial_symbols)
13771         (mdebug_next_symbol_text, cross_ref, mylookup_symbol, new_psymtab)
13772         (new_symbol): Constify.
13773         * memattr.c (mem_info_command): Constify.
13774         * mep-tdep.c (register_name_from_keyword): Constify.
13775         * mi/mi-cmd-env.c (mi_cmd_env_path, _initialize_mi_cmd_env):
13776         Constify.
13777         * mi/mi-cmd-stack.c (list_args_or_locals): Constify.
13778         * mi/mi-cmd-var.c (mi_cmd_var_show_attributes): Constify.
13779         * mi/mi-main.c (captured_mi_execute_command): Constify and add
13780         cast.
13781         (mi_execute_async_cli_command): Constify.
13782         * mips-tdep.c (mips_register_name): Constify.
13783         * mn10300-tdep.c (register_name, mn10300_generic_register_name)
13784         (am33_register_name, am33_2_register_name)
13785         * moxie-tdep.c (moxie_register_names): Constify.
13786         * nat/linux-osdata.c (osdata_type): Constify fields.
13787         * nto-tdep.c (nto_parse_redirection): Constify.
13788         * objc-lang.c (lookup_struct_typedef, lookup_objc_class)
13789         (lookup_child_selector): Constify.
13790         (objc_methcall::name): Constify.
13791         * objc-lang.h (lookup_objc_class, lookup_child_selector)
13792         (lookup_struct_typedef): Constify.
13793         * objfiles.c (pc_in_section): Constify.
13794         * objfiles.h (pc_in_section): Constify.
13795         * p-exp.y (struct token::oper): Constify.
13796         (yyerror): Constify.
13797         * p-lang.h (pascal_yyerror): Constify.
13798         * parser-defs.h (op_name_standard): Constify.
13799         (op_print::string): Constify.
13800         (exp_descriptor::op_name): Constify.
13801         * printcmd.c (print_address_symbolic): Constify.
13802         * psymtab.c (print_partial_symbols): Constify.
13803         * python/py-breakpoint.c (stop_func): Constify.
13804         (bppy_get_expression): Constify.
13805         * python/py-cmd.c (cmdpy_completer::name): Constify.
13806         (cmdpy_function): Constify.
13807         * python/py-event.c (evpy_add_attribute)
13808         (gdbpy_initialize_event_generic): Constify.
13809         * python/py-event.h (evpy_add_attribute)
13810         (gdbpy_initialize_event_generic): Constify.
13811         * python/py-evts.c (add_new_registry): Constify.
13812         * python/py-finishbreakpoint.c (outofscope_func): Constify.
13813         * python/py-framefilter.c (get_py_iter_from_func): Constify.
13814         * python/py-inferior.c (get_buffer): Add cast.
13815         * python/py-param.c (parm_constant::name): Constify.
13816         * python/py-unwind.c (fprint_frame_id): Constify.
13817         * python/python.c (gdbpy_parameter_value): Constify.
13818         * remote-fileio.c (remote_fio_func_map): Make 'name' const.
13819         * remote.c (memory_packet_config::name): Constify.
13820         (show_packet_config_cmd, remote_write_bytes)
13821         (remote_buffer_add_string):
13822         * reverse.c (exec_reverse_once): Constify.
13823         * rs6000-tdep.c (variant::name, variant::description): Constify.
13824         * rust-exp.y (rustyyerror): Constify.
13825         * rust-lang.c (rust_op_name): Constify.
13826         * rust-lang.h (rustyyerror): Constify.
13827         * serial.h (serial_ops::name): Constify.
13828         * sh-tdep.c (sh_sh_register_name, sh_sh3_register_name)
13829         (sh_sh3e_register_name, sh_sh2e_register_name)
13830         (sh_sh2a_register_name, sh_sh2a_nofpu_register_name)
13831         (sh_sh_dsp_register_name, sh_sh3_dsp_register_name)
13832         (sh_sh4_register_name, sh_sh4_nofpu_register_name)
13833         (sh_sh4al_dsp_register_name): Constify.
13834         * sh64-tdep.c (sh64_register_name): Constify.
13835         * solib-darwin.c (lookup_symbol_from_bfd): Constify.
13836         * spu-tdep.c (spu_register_name, info_spu_dma_cmdlist): Constify.
13837         * stabsread.c (patch_block_stabs, read_type_number)
13838         (ref_map::stabs, ref_add, process_reference)
13839         (symbol_reference_defined, define_symbol, define_symbol)
13840         (error_type, read_type, read_member_functions, read_cpp_abbrev)
13841         (read_one_struct_field, read_struct_fields, read_baseclasses)
13842         (read_tilde_fields, read_struct_type, read_array_type)
13843         (read_enum_type, read_sun_builtin_type, read_sun_floating_type)
13844         (read_huge_number, read_range_type, read_args, common_block_start)
13845         (find_name_end): Constify.
13846         * stabsread.h (common_block_start, define_symbol)
13847         (process_one_symbol, symbol_reference_defined, ref_add):
13848         * symfile.c (get_section_index, add_symbol_file_command):
13849         * symfile.h (get_section_index): Constify.
13850         * target-descriptions.c (tdesc_type::name): Constify.
13851         (tdesc_free_type): Add cast.
13852         * target.c (find_default_run_target):
13853         (add_deprecated_target_alias, find_default_run_target)
13854         (target_announce_detach): Constify.
13855         (do_option): Constify.
13856         * target.h (add_deprecated_target_alias): Constify.
13857         * thread.c (print_thread_info_1): Constify.
13858         * top.c (deprecated_readline_begin_hook, command_line_input):
13859         Constify.
13860         (init_main): Add casts.
13861         * top.h (handle_line_of_input): Constify.
13862         * tracefile-tfile.c (tfile_write_uploaded_tsv): Constify.
13863         * tracepoint.c (tvariables_info_1, trace_status_mi): Constify.
13864         (tfind_command): Rename to ...
13865         (tfind_command_1): ... this and constify.
13866         (tfind_command): New function.
13867         (tfind_end_command, tfind_start_command): Adjust.
13868         (encode_source_string): Constify.
13869         * tracepoint.h (encode_source_string): Constify.
13870         * tui/tui-data.c (tui_partial_win_by_name): Constify.
13871         * tui/tui-data.h (tui_partial_win_by_name): Constify.
13872         * tui/tui-source.c (tui_set_source_content_nil): Constify.
13873         * tui/tui-source.h (tui_set_source_content_nil): Constify.
13874         * tui/tui-win.c (parse_scrolling_args): Constify.
13875         * tui/tui-windata.c (tui_erase_data_content): Constify.
13876         * tui/tui-windata.h (tui_erase_data_content): Constify.
13877         * tui/tui-winsource.c (tui_erase_source_content): Constify.
13878         * tui/tui.c (tui_enable): Add cast.
13879         * utils.c (defaulted_query): Constify.
13880         (init_page_info): Add cast.
13881         (puts_debug, subset_compare): Constify.
13882         * utils.h (subset_compare): Constify.
13883         * varobj.c (varobj_format_string): Constify.
13884         * varobj.h (varobj_format_string): Constify.
13885         * vax-tdep.c (vax_register_name): Constify.
13886         * windows-nat.c (windows_detach): Constify.
13887         * xcoffread.c (process_linenos, xcoff_next_symbol_text): Constify.
13888         * xml-support.c (gdb_xml_end_element): Constify.
13889         * xml-tdesc.c (tdesc_start_reg): Constify.
13890         * xstormy16-tdep.c (xstormy16_register_name): Constify.
13891         * xtensa-tdep.c (xtensa_find_register_by_name): Constify.
13892         * xtensa-tdep.h (xtensa_register_t::name): Constify.
13893
13894 2017-04-05  Pedro Alves  <palves@redhat.com>
13895
13896         * proc-api.c (struct trans): Constify.
13897         (procfs_note): Constify.
13898         * proc-events.c (struct trans, syscall_table):
13899         * proc-flags.c (struct trans): Constify.
13900         * proc-utils.h (procfs_note): Constify.
13901         * proc-why.c (struct trans): Constify.
13902         * procfs.c (dead_procinfo, find_syscall, proc_warn, proc_error)
13903         (procfs_detach): Constify.
13904         * sol-thread.c (struct string_map): Constify.
13905         (td_err_string, td_state_string): Constify.
13906
13907 2017-04-05  Pedro Alves  <palves@redhat.com>
13908
13909         * proc-api.c (procfs_filename): Don't initialize
13910         procfs_filename.
13911         (prepare_to_trace): Assume procfs_filename is non-NULL.
13912         (_initialize_proc_api): Give procfs_filename a default value here.
13913
13914 2017-04-05  Pedro Alves  <palves@redhat.com>
13915
13916         * break-catch-throw.c (handle_gnu_v3_exceptions): Constify
13917         'cond_string' parameter.
13918         (extract_exception_regexp): Constify 'string' parameter.
13919         (catch_exception_command_1): Constify.
13920         * breakpoint.c (init_catchpoint)
13921         (create_fork_vfork_event_catchpoint): Constify 'cond_string'
13922         parameter.
13923         (ep_parse_optional_if_clause, catch_fork_command_1)
13924         (catch_exec_command_1): Constify.
13925         * breakpoint.h (init_catchpoint): Constify 'cond_string'
13926         parameter.
13927         (ep_parse_optional_if_clause): Constify.
13928         * cli/cli-utils.c (remove_trailing_whitespace)
13929         (check_for_argument): Constify.
13930         * cli/cli-utils.h (remove_trailing_whitespace): Constify and add
13931         non-const overload.
13932         (check_for_argument): Likewise.
13933
13934 2017-04-05  Pedro Alves  <palves@redhat.com>
13935
13936         * event-top.c (command_line_handler): Add cast to execute_command
13937         call.
13938         * record-btrace.c (cmd_record_btrace_bts_start)
13939         (cmd_record_btrace_pt_start, cmd_record_btrace_start)
13940         (cmd_record_btrace_start): Add cast to execute_command call.
13941         * record-full.c (record_full_goto_insn):
13942         * record.c (record_start, record_stop): Add cast to
13943         execute_command_to_string calls.
13944         (cmd_record_start): Add cast to execute_command calls.
13945
13946 2017-04-05  Pedro Alves  <palves@redhat.com>
13947
13948         * python/python-internal.h (gdb_PyArg_ParseTupleAndKeywords): New
13949         static inline function.
13950         * python/py-arch.c (archpy_disassemble): Constify 'keywords'
13951         array and use gdb_PyArg_ParseTupleAndKeywords.
13952         * python/py-cmd.c (cmdpy_init): Likewise.
13953         * python/py-finishbreakpoint.c (bpfinishpy_init): Likewise.
13954         * python/py-inferior.c (infpy_read_memory, infpy_write_memory)
13955         (infpy_search_memory): Likewise.
13956         * python/py-objfile.c (objfpy_add_separate_debug_file)
13957         (gdbpy_lookup_objfile): Likewise.
13958         * python/py-symbol.c (gdbpy_lookup_symbol)
13959         (gdbpy_lookup_global_symbol): Likewise.
13960         * python/py-type.c (gdbpy_lookup_type): Likewise.
13961         * python/py-value.c (valpy_lazy_string, valpy_string): Likewise.
13962         * python/python.c (execute_gdb_command, gdbpy_write, gdbpy_flush):
13963         Likewise.
13964
13965 2017-04-05  Pedro Alves  <palves@redhat.com>
13966
13967         * python/python-internal.h (gdb_PyGetSetDef): New type.
13968         * python/py-block.c (block_object_getset)
13969         (breakpoint_object_getset): Now a gdb_PyGetSetDef array.
13970         * python/py-event.c (event_object_getset)
13971         (finish_breakpoint_object_getset): Likewise.
13972         * python/py-inferior.c (inferior_object_getset): Likewise.
13973         * python/py-infthread.c (thread_object_getset): Likewise.
13974         * python/py-lazy-string.c (lazy_string_object_getset): Likewise.
13975         * python/py-linetable.c (linetable_entry_object_getset): Likewise.
13976         * python/py-objfile.c (objfile_getset): Likewise.
13977         * python/py-progspace.c (pspace_getset): Likewise.
13978         * python/py-record-btrace.c (btpy_insn_getset, btpy_call_getset):
13979         Likewise.
13980         * python/py-record.c (recpy_record_getset): Likewise.
13981         * python/py-symbol.c (symbol_object_getset): Likewise.
13982         * python/py-symtab.c (symtab_object_getset, sal_object_getset):
13983         Likewise.
13984         * python/py-type.c (type_object_getset, field_object_getset):
13985         Likewise.
13986         * python/py-value.c (value_object_getset): Likewise.
13987
13988 2017-04-05  Pedro Alves  <palves@redhat.com>
13989
13990         * python/python-internal.h (gdb_PyObject_CallMethod)
13991         (gdb_PyErr_NewException, gdb_PySys_GetObject, gdb_PySys_SetPath):
13992         New functions.
13993         (GDB_PYSYS_SETPATH_CHAR, PyObject_CallMethod, PyErr_NewException)
13994         (PySys_GetObject, PySys_SetPath): New macros.
13995
13996 2017-04-05  Pedro Alves  <palves@redhat.com>
13997
13998         * mi/mi-cmd-info.c (mi_cmd_info_os): Call info_osdata instead of
13999         info_osdata_command.
14000         * osdata.c (info_osdata_command): Rename to ...
14001         (info_osdata): ... this.  Constify 'type' parameter, and remove
14002         the 'from_tty' parameter.  Accept NULL TYPE.
14003         (info_osdata_command): New function.
14004         * osdata.h (info_osdata_command): Remove declaration.
14005         (info_osdata): New declaration.
14006
14007 2017-04-05  Pedro Alves  <palves@redhat.com>
14008
14009         * mi/mi-cmd-break.c (mi_cmd_break_insert_1, mi_cmd_break_insert)
14010         (mi_cmd_dprintf_insert, mi_cmd_break_passcount)
14011         (mi_cmd_break_watch, mi_cmd_break_commands): Constify 'command'
14012         parameter.
14013         * mi/mi-cmd-catch.c (mi_cmd_catch_assert, mi_cmd_catch_exception)
14014         (mi_cmd_catch_load, mi_cmd_catch_unload): Constify cmd' parameter.
14015         * mi/mi-cmd-disas.c (mi_cmd_disassemble): Constify 'command'
14016         parameter.
14017         * mi/mi-cmd-env.c (mi_cmd_env_pwd, mi_cmd_env_cd, mi_cmd_env_path)
14018         (mi_cmd_env_dir, mi_cmd_inferior_tty_set, _cmd_inferior_tty_show)
14019         * mi/mi-cmd-file.c (mi_cmd_file_list_exec_source_file)
14020         (mi_cmd_file_list_exec_source_files)
14021         (mi_cmd_file_list_shared_libraries): Constify 'command' parameter.
14022         * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions)
14023         (mi_cmd_info_gdb_mi_command, mi_cmd_info_os): Constify 'command'
14024         parameter.
14025         * mi/mi-cmd-stack.c (mi_cmd_enable_frame_filters)
14026         (mi_cmd_stack_list_frames, mi_cmd_stack_info_depth)
14027         (mi_cmd_stack_list_locals, mi_cmd_stack_list_args)
14028         (mi_cmd_stack_list_variables, mi_cmd_stack_select_frame)
14029         (mi_cmd_stack_info_frame): Constify 'command' parameter.
14030         * mi/mi-cmd-target.c (mi_cmd_target_file_get)
14031         (mi_cmd_target_file_put, mi_cmd_target_file_delete): Constify
14032         'command' parameter.
14033         * mi/mi-cmd-var.c (mi_cmd_var_create, mi_cmd_var_delete)
14034         (mi_cmd_var_set_format, mi_cmd_var_set_visualizer)
14035         (mi_cmd_var_set_frozen, mi_cmd_var_show_format)
14036         (mi_cmd_var_info_num_children, mi_cmd_var_list_children)
14037         (mi_cmd_var_info_type, mi_cmd_var_info_path_expression)
14038         (mi_cmd_var_info_expression, mi_cmd_var_show_attributes)
14039         (mi_cmd_var_evaluate_expression, mi_cmd_var_assign)
14040         (mi_cmd_var_update, mi_cmd_enable_pretty_printing)
14041         (mi_cmd_var_set_update_range): Constify 'command' parameter.
14042         * mi/mi-cmds.h (mi_cmd_argv_ftype): Constify 'command' parameter.
14043         * mi/mi-interp.c (mi_cmd_interpreter_exec): Constify 'command'
14044         parameter.
14045         * mi/mi-main.c (mi_cmd_gdb_exit, mi_cmd_exec_next)
14046         (mi_cmd_exec_next_instruction, mi_cmd_exec_step)
14047         (mi_cmd_exec_step_instruction, mi_cmd_exec_finish)
14048         (mi_cmd_exec_return ,mi_cmd_exec_jump, mi_cmd_exec_continue)
14049         (mi_cmd_exec_interrupt, mi_cmd_exec_run, mi_cmd_target_detach)
14050         (mi_cmd_target_flash_erase, mi_cmd_thread_select)
14051         (mi_cmd_thread_list_ids, mi_cmd_thread_info)
14052         (mi_cmd_list_thread_groups, mi_cmd_data_list_register_names)
14053         (mi_cmd_data_list_changed_registers)
14054         (mi_cmd_data_write_register_values)
14055         (mi_cmd_data_evaluate_expression, mi_cmd_data_read_memory)
14056         (mi_cmd_data_read_memory_bytes, mi_cmd_data_write_memory)
14057         (mi_cmd_data_write_memory_bytes, mi_cmd_enable_timings)
14058         (mi_cmd_list_features, mi_cmd_list_target_features)
14059         (mi_cmd_add_inferior, mi_cmd_remove_inferior)
14060         (mi_cmd_trace_define_variable, mi_cmd_trace_list_variables)
14061         (mi_cmd_trace_find, mi_cmd_trace_save, mi_cmd_trace_start)
14062         (mi_cmd_trace_status, mi_cmd_trace_stop, mi_cmd_ada_task_info)
14063         (mi_cmd_trace_frame_collected): Constify 'command'
14064         parameter.
14065         * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Constify
14066         'command' parameter.
14067
14068 2017-04-05  Pedro Alves  <palves@redhat.com>
14069
14070         * ada-lang.c (ada_completer_word_break_characters): Now a const
14071         array.
14072         (ada_get_gdb_completer_word_break_characters): Constify.
14073         * completer.c (gdb_completer_command_word_break_characters)
14074         (gdb_completer_file_name_break_characters)
14075         (gdb_completer_quote_characters): Now const arrays.
14076         (get_gdb_completer_quote_characters): Constify.
14077         (set_rl_completer_word_break_characters): New function.
14078         (set_gdb_completion_word_break_characters)
14079         (complete_line_internal): Use it.
14080         * completer.h (get_gdb_completer_quote_characters): Constify.
14081         (set_rl_completer_word_break_characters): Declare.
14082         * f-lang.c (f_word_break_characters): Constify.
14083         * language.c (default_word_break_characters): Constify.
14084         * language.h (language_defn::la_word_break_characters): Constify.
14085         (default_word_break_characters): Constify.
14086         * top.c (init_main): Use set_rl_completer_word_break_characters.
14087
14088 2017-04-05  Pedro Alves  <palves@redhat.com>
14089
14090         * aix-thread.c (aix_thread_pid_to_str)
14091         (aix_thread_extra_thread_info): Constify.
14092         * bsd-kvm.c (bsd_kvm_pid_to_str): Constify.
14093         * bsd-uthread.c (bsd_uthread_extra_thread_info)
14094         (bsd_uthread_pid_to_str): Constify.
14095         * corelow.c (core_pid_to_str): Constify.
14096         * darwin-nat.c (darwin_pid_to_str): Constify.
14097         * fbsd-nat.c (fbsd_pid_to_str): Constify.
14098         * fbsd-tdep.c (fbsd_core_pid_to_str, gdbarch_core_pid_to_str):
14099         Constify.
14100         * gnu-nat.c (gnu_pid_to_str): Constify.
14101         * go32-nat.c (go32_pid_to_str): Constify.
14102         * i386-cygwin-tdep.c (i386_windows_core_pid_to_str): Constify.
14103         * inf-ptrace.c (inf_ptrace_pid_to_str): Constify.
14104         * inferior.c (inferior_pid_to_str): Constify.
14105         * linux-nat.c (linux_nat_pid_to_str): Constify.
14106         * linux-tdep.c (linux_core_pid_to_str): Constify.
14107         * linux-thread-db.c (thread_db_pid_to_str)
14108         (thread_db_extra_thread_info): Constify.
14109         * nto-tdep.c (nto_extra_thread_info): Constify.
14110         * nto-tdep.h (nto_extra_thread_info): Constify.
14111         * obsd-nat.c (obsd_pid_to_str): Constify.
14112         * procfs.c (procfs_pid_to_str): Constify.
14113         * ravenscar-thread.c (ravenscar_extra_thread_info)
14114         (ravenscar_pid_to_str): Constify.
14115         * remote-sim.c (gdbsim_pid_to_str): Constify.
14116         * remote.c (remote_threads_extra_info, remote_pid_to_str):
14117         Constify.
14118         * sol-thread.c (solaris_pid_to_str): Constify.
14119         * sol2-tdep.c (sol2_core_pid_to_str): Constify.
14120         * sol2-tdep.h (sol2_core_pid_to_str): Constify.
14121         * target.c (default_pid_to_str, target_pid_to_str)
14122         (normal_pid_to_str, default_pid_to_str): Constify.
14123         * target.h (target_ops::to_pid_to_str)
14124         (target_ops::to_extra_thread_info): Constify.
14125         (target_pid_to_str, normal_pid_to_str): Constify.
14126         * windows-nat.c (windows_pid_to_str): Constify.
14127         * gdbarch.sh (core_pid_to_str): Constify.
14128         * target-delegates.c: Regenerate.
14129         * gdbarch.h, gdbarch.c: Regenerate.
14130
14131 2017-04-05  Pedro Alves  <palves@redhat.com>
14132
14133         * main.c (captured_main_1): Use gdb::unique_xmalloc_ptr to manage
14134         the memory of the temporary warning_pre_print override.
14135         * utils.c (warning_pre_print): Constify.
14136         * utils.h (warning_pre_print): Constify.
14137
14138 2017-04-05  Pedro Alves  <palves@redhat.com>
14139
14140         * cli/cli-cmds.c (shell_escape): Constify 'arg' parameter.
14141         (shell_command): New function.
14142         (make_command): Use std::string.
14143         (init_cli_cmds): Register shell_command instead of shell_escape.
14144
14145 2017-04-05  Pedro Alves  <palves@redhat.com>
14146
14147         * breakpoint.c (dprintf_function, dprintf_channel): Don't initialize.
14148         * tracepoint.c (default_collect): Don't initialize.
14149
14150 2017-04-05  Pedro Alves  <palves@redhat.com>
14151
14152         * macroexp.c (macro_buffer::shared): Now a bool.
14153         (init_buffer): Update.
14154         (init_shared_buffer): Constify 'addr' parameter.
14155         (substitute_args, expand, macro_expand, macro_expand_next): Remove
14156         casts.
14157
14158 2017-04-05  Pedro Alves  <palves@redhat.com>
14159
14160         * arm-tdep.c (show_disassembly_style_sfunc): Constify local.
14161         * disasm.c (set_disassembler_options): Constify local.
14162         * i386-tdep.c (i386_print_insn): Remove cast and FIXME comment.
14163
14164 2017-04-05  Sergio Durigan Junior  <sergiodj@redhat.com>
14165
14166         PR gdb/21352
14167         * tracefile.c (tsave_command): Fix argument parsing for '-r'
14168         option.
14169
14170 2017-04-05  Yao Qi  <yao.qi@linaro.org>
14171
14172         * frame.c (frame_unwind_register_unsigned): Call
14173         frame_unwind_register_value.
14174
14175 2017-04-05  Yao Qi  <yao.qi@linaro.org>
14176
14177         * gdb.threads/thread-specific-bp.exp (check_thread_specific_breakpoint):
14178         Use gdb_test_multiple, and don't match anchor.
14179
14180 2017-04-05  Pedro Alves  <palves@redhat.com>
14181
14182         * MAINTAINERS (Global Maintainers): Add Simon Marchi.
14183         (Write After Approval): Remove Simon Marchi.
14184
14185 2017-04-05  Pedro Alves  <palves@redhat.com>
14186
14187         * common/gdb_optional.h (optional::optional): Make constexpr and
14188         initialize m_dummy.
14189
14190 2017-04-04  John Baldwin  <jhb@FreeBSD.org>
14191
14192         * amd64-fbsd-tdep.c: Remove "bsd-uthread.h" include.
14193         (amd64fbsd_jmp_buf_reg_offset): Remove.
14194         (amd64fbsd_supply_uthread): Remove function.
14195         (amd64fbsd_collect_uthread): Remove function.
14196         (amd64fbsd_init_abi): Don't set bsd-uthread callbacks.
14197         * configure.tgt (i[34567]86-*-freebsd*): Remove bsd-uthread.o.
14198         (x86_64-*-freebsd*): Remove bsd-uthread.o.
14199         (fbsd-nat.c): Update comment.
14200         * i386-fbsd-tdep.c: Remove "bsd-uthread.h" include.
14201         (i386fbsd_jmp_buf_reg_offset): Remove.
14202         (i386fbsd_supply_uthread): Remove function.
14203         (i386fbsd_collect_uthread): Remove function.
14204         (i386fbsd_init_abi): Don't set bsd-uthread callbacks.
14205
14206 2017-04-04  John Baldwin  <jhb@FreeBSD.org>
14207
14208         * Makefile.in (ALL_64_TARGET_OBS): Remove alpha-fbsd-tdep.o.
14209         (ALLDEPFILES): Remove alpha-fbsd-tdep.c
14210         * NEWS: Mention that support for FreeBSD/alpha was removed.
14211         * alpha-fbsd-tdep.c: Delete file.
14212         * config/alpha/fbsd.mh: Delete file.
14213         * configure.host: Delete alpha*-*-freebsd* and
14214         alpha*-*-kfreebsd*-gnu.
14215         * configure.tgt: Delete alpha*-*-freebsd* and
14216         alpha*-*-kfreebsd*-gnu.
14217
14218 2017-04-04  John Baldwin  <jhb@FreeBSD.org>
14219
14220         * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers,
14221         amd64bsd_store_inferior_registers): Use ptid from regcache.
14222
14223 2017-04-04  Pedro Alves  <palves@redhat.com>
14224
14225         * dwarf2read.c (lnp_state_machine): Now a class.  Initialize all
14226         data fields, make them private and add "m_" prefixes.
14227         (lnp_state_machine::lnp_state_machine): New ctor.
14228         (record_line, check_line_address, handle_set_discriminator)
14229         (handle_set_address, handle_advance_pc, handle_special_opcode)
14230         (handle_advance_line, handle_set_file, handle_negate_stmt)
14231         (handle_const_add_pc, handle_fixed_advance_pc, handle_copy)
14232         (end_sequence, advance_line): New methods.
14233         (m_gdbarch, m_record_lines_p): New fields.
14234         (lnp_reader_state): Delete.
14235         (dwarf_record_line): Rename to ...
14236         (lnp_state_machine::record_line): ... adjust.
14237         (init_lnp_state_machine): Delete.
14238         (lnp_state_machine::lnp_state_machine): New.
14239         (check_line_address): Rename to ...
14240         (lnp_state_machine::check_line_address): This.
14241         (dwarf_decode_lines_1): Remove reference to "reader_state".
14242         Adjust lnp_state_machine having a non-default ctor.  Use bool.
14243         State machine internal state manipulation moved to
14244         lnp_state_machine methods.
14245
14246 2017-04-04  Pedro Alves  <palves@redhat.com>
14247
14248         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
14249         unittests/offset-type-selftests.c.
14250         (SUBDIR_UNITTESTS_OBS): Add offset-type-selftests.o.
14251         * common/offset-type.h: New file.
14252         * common/preprocessor.h: New file.
14253         * common/traits.h: New file.
14254         * common/valid-expr.h: New file.
14255         * dwarf2expr.c: Include "common/underlying.h".  Adjust to use
14256         sect_offset and cu_offset strong typedefs throughout.
14257         * dwarf2expr.h: Adjust to use sect_offset and cu_offset strong
14258         typedefs throughout.
14259         * dwarf2loc.c: Include "common/underlying.h".  Adjust to use
14260         sect_offset and cu_offset strong typedefs throughout.
14261         * dwarf2read.c: Adjust to use sect_offset and cu_offset strong
14262         typedefs throughout.
14263         * gdbtypes.h: Include "common/offset-type.h".
14264         (cu_offset): Now an offset type (strong typedef) instead of a
14265         struct.
14266         (sect_offset): Likewise.
14267         (union call_site_parameter_u): Rename "param_offset" field to
14268         "param_cu_off".
14269         * unittests/offset-type-selftests.c: New file.
14270
14271 2017-04-04  Pedro Alves  <palves@redhat.com>
14272
14273         * common/underlying.h: New file.
14274         * dwarf2read.c: Include "common/gdb_optional.h" and
14275         "common/underlying.h".
14276         (dir_index, file_name_index): New types.
14277         (file_entry): Use them.
14278         (file_entry::include): Use to_underlying.
14279         (line_header::add_file_name): Use dir_index.
14280         (read_formatted_entries): Use gdb::optional.  Read form before
14281         writting to file_entry.
14282         (dwarf_decode_line_header): Use dir_index.
14283         (lnp_state_machine::current_file): Use to_underlying.
14284         (lnp_state_machine::file): Change type to file_name_index.
14285         (dwarf_record_line): Use to_underlying.
14286         (init_lnp_state_machine): Use file_name_index.
14287         (dwarf_decode_lines_1): Use dir_index and file_name_index.
14288
14289 2017-04-04  Pedro Alves  <palves@redhat.com>
14290
14291         * common/gdb_optional.h (gdb::optiona): Add operator->, operator*,
14292         operator bool, has_value and get methods.
14293
14294 2017-04-04  Pedro Alves  <palves@redhat.com>
14295
14296         * dwarf2read.c (struct file_entry): Add ctors, and initialize all
14297         fields.
14298         (line_header): Initialize all data fields.  Change type of
14299         standard_opcode_lengths to std::unique_ptr<unsigned char[]>.
14300         Change type of include_dirs to std::vector<const char *>.  Remove
14301         num_include_dirs, include_dirs_size.  Change type of file_names to
14302         std::vector<file_entry>.  Remove num_file_names, file_names_size.
14303         (line_header::line_header): New.
14304         (line_header::add_include_dir, line_header::add_file_name): New
14305         methods.
14306         (line_header::include_dir_at): Remove NULL check.
14307         (line_header::file_name_at): Add const overload.
14308         (line_header_up): New unique_ptr typedef.
14309         (dw2_get_file_names_reader): Use line_header_up.  Adjust to use
14310         std::vector.  Remove free_line_header call.
14311         (dwarf2_build_include_psymtabs): Use line_header_up.  Remove
14312         free_line_header call.
14313         (free_cu_line_header): Delete.
14314         (handle_DW_AT_stmt_list, handle_DW_AT_stmt_list)
14315         (setup_type_unit_groups): Use line_header_up instead of cleanups.
14316         Adjust to use std::vector.
14317         (free_line_header): Delete.
14318         (free_line_header_voidp): Use delete.
14319         (add_include_dir): Replace with ...
14320         (line_header::add_include_dir): ... this method.  Use std::vector.
14321         (add_file_name): Replace with ...
14322         (line_header::add_file_name): ... this method.  Use std::vector.
14323         (add_include_dir_stub): Delete.
14324         (read_formatted_entries): Remove memset.
14325         (dwarf_decode_line_header): Return a line_header_up instead of a
14326         raw pointer.  Remove cleanup handling.  Pass lambdas to
14327         read_formatted_entries.  Adjust to use line_header methods.
14328         (dwarf_decode_lines_1): Adjust to use line_header methods.
14329         (dwarf_decode_lines, file_file_name, file_full_name): Adjust to
14330         use std::vector.
14331
14332 2017-04-04  Simon Marchi  <simon.marchi@polymtl.ca>
14333
14334         * remote.c (set_general_thread, set_continue_thread): Use ptid_t
14335         instead of struct ptid.
14336
14337 2017-05-04  Alan Hayward  <alan.hayward@arm.com>
14338
14339         * frame.c (get_frame_register_bytes): Unwind using value.
14340         (put_frame_register_bytes): Likewise.
14341
14342 2017-03-30  Iain Buclaw  <ibuclaw@gdcproject.org>
14343
14344         * d-exp.y (type_aggregate_p): Treat TYPE_CODE_MODULE as being
14345         aggregate-like.
14346
14347 2017-03-29  Jan Kratochvil  <jan.kratochvil@redhat.com>
14348
14349         * auto-load.c (auto_load_section_scripts): Check SEC_HAS_CONTENTS.
14350
14351 2017-03-29  Yao Qi  <yao.qi@linaro.org>
14352
14353         * gdbthread.h (struct thread_info): Declare constructor and
14354         destructor.  Add some in-class member initializers.
14355         * thread.c (free_thread): Remove.
14356         (init_thread_list): Call delete instead of free_thread.
14357         (new_thread): Call thread_info constructor.
14358         (thread_info::thread_info): New function.
14359         (thread_info::~thread_info): New function.
14360         (delete_thread_1): Call delete instead of free_thread.
14361         (make_cleanup_restore_current_thread): Move tp and frame to
14362         inner block.
14363
14364 2017-03-28  Anton Kolesov  <anton.kolesov@synopsys.com>
14365
14366         * arc-tdep.c (arc_frame_cache): Add support for prologue analysis.
14367         (arc_skip_prologue): Likewise.
14368         (arc_make_frame_cache): Likewise.
14369         (arc_pv_get_operand): New function.
14370         (arc_is_in_prologue): Likewise.
14371         (arc_analyze_prologue): Likewise.
14372         (arc_print_frame_cache): Likewise.
14373         (MAX_PROLOGUE_LENGTH): New constant.
14374
14375 2017-03-28  Anton Kolesov  <anton.kolesov@synopsys.com>
14376
14377         * configure.tgt: Add arc-insn.o.
14378         * arc-tdep.c (arc_delayed_print_insn): Make non-static.
14379         (dump_arc_instruction_command): New function.
14380         (arc_fprintf_disasm): Likewise.
14381         (arc_disassemble_info): Likewise.
14382         (arc_insn_get_operand_value): Likewise.
14383         (arc_insn_get_operand_value_signed): Likewise.
14384         (arc_insn_get_memory_base_reg): Likewise.
14385         (arc_insn_get_memory_offset): Likewise.
14386         (arc_insn_get_branch_target): Likewise.
14387         (arc_insn_dump): Likewise.
14388         (arc_insn_get_linear_next_pc): Likewise.
14389         * arc-tdep.h (arc_delayed_print_insn): Add function declaration.
14390         (arc_disassemble_info): Likewise.
14391         (arc_insn_get_branch_target): Likewise.
14392         (arc_insn_get_linear_next_pc): Likewise.
14393         * NEWS: Mention new "maint print arc arc-instruction".
14394
14395 2017-03-28  Anton Kolesov  <anton.kolesov@synopsys.com>
14396
14397         * arc-tdep (maintenance_print_arc_list): New variable.
14398         (maintenance_print_arc_command): New function.
14399
14400 2017-03-28  Anton Kolesov  <anton.kolesov@synopsys.com>
14401
14402         * arc-tdep.c (core_v2_register_names, core_arcompact_register_names)
14403         Add "limm" and "reserved".
14404         (arc_cannot_fetch_register, arc_cannot_store_register): Add
14405         ARC_RESERVED_REGNUM and ARC_LIMM_REGNUM.
14406         * arc-tdep.h (arc_regnum): Likewise.
14407
14408 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
14409
14410         * xtensa-linux-nat.c (fill_gregset): Call regcache_raw_collect
14411         for THREADPTR register.
14412         (supply_gregset_reg): Call regcache_raw_supply for THREADPTR
14413         register.
14414         * xtensa-tdep.c (XTENSA_DBREGN_UREG): New definition.
14415         (xtensa_derive_tdep): Initialize tdep->threadptr_regnum.
14416         * xtensa-tdep.h (gdbarch_tdep::threadptr_regnum): New field.
14417
14418 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
14419
14420         * xtensa-tdep.c (xtensa_pseudo_register_read): Treat all
14421         registers above gdbarch_num_regs (gdbarch) as privileged in
14422         call0 ABI.
14423
14424 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
14425
14426         * xtensa-linux-nat.c (fill_gregset): Call regcache_raw_collect
14427         for a single specified register or for all registers in
14428         a0_base..a0_base + C0_NREGS range.
14429         (supply_gregset_reg): Call regcache_raw_supply for a single
14430         specified register or for all registers in a0_base..a0_base +
14431         C0_NREGS range.
14432
14433 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
14434
14435         * arch/xtensa.h (C0_NREGS): Add definition.
14436         * xtensa-tdep.c (C0_NREGS): Remove definition.
14437
14438 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
14439
14440         * xtensa-tdep.c (xtensa_scan_prologue, call0_analyze_prologue):
14441         Drop xtensa_default_isa initialization.
14442         (xtensa_gdbarch_init): Initialize xtensa_default_isa.
14443
14444 2017-03-27  Pedro Alves  <palves@redhat.com>
14445
14446         * dwarf2read.c (file_entry) <dir_index>: Add comment.
14447         (file_entry::include_dir): New method.
14448         (line_header::include_dir_at, line_header::file_name_at): New
14449         methods.
14450         (setup_type_unit_groups, setup_type_unit_groups)
14451         (psymtab_include_file_name): Simplify using the new methods.
14452         (lnp_state_machine) <the_line_header>: New field.
14453         <file>: Add comment.
14454         (lnp_state_machine::current_file): New method.
14455         (dwarf_record_line): Simplify using the new methods.
14456         (init_lnp_state_machine): Initialize the "the_line_header" field.
14457         (dwarf_decode_lines_1, dwarf_decode_lines, file_file_name):
14458         Simplify using the new methods.
14459
14460 2017-03-27  Pedro Alves  <palves@redhat.com>
14461
14462         * cp-name-parser.y (make_empty): Delete.
14463         (demangler_special, nested_name, ptr_operator, array_indicator)
14464         (direct_declarator, declarator_1): Use fill_comp instead of
14465         make_empty.
14466
14467 2017-03-27  Pedro Alves  <palves@redhat.com>
14468
14469         * xml-support.h (gdb_xml_debug): Pass a "first-to-check" argument
14470         to ATTRIBUTE_PRINTF.
14471         * solib-target.c (library_list_start_list): Print "string" not
14472         "version".
14473         * xml-tdesc.c (tdesc_start_field): Pass "field_name" to
14474         gdb_xml_error call.
14475
14476 2017-03-27  Pedro Alves  <palves@redhat.com>
14477
14478         * dwarf2read.c (struct file_and_directory): New.
14479         (dwarf2_get_dwz_file): Adjust to use std::string.
14480         (dw2_get_file_names_reader): Adjust to use file_and_directory.
14481         (find_file_and_directory): Adjust to return a file_and_directory
14482         object.
14483         (read_file_scope): Adjust to use file_and_directory.  Remove
14484         make_cleanup/do_cleanups calls.
14485         (open_and_init_dwp_file): Adjust to use std::string.  Remove
14486         make_cleanup/do_cleanups calls.
14487         * python/python.c (do_start_initialization): Adjust to ldirname
14488         returning a std::string.
14489         * utils.c (ldirname): Now returns a std::string.
14490         * utils.h (ldirname): Change return type to std::string.
14491         * xml-syscall.c (xml_init_syscalls_info): Adjust to ldirname
14492         returning a std::string.
14493         * xml-tdesc.c (file_read_description_xml): Likewise.
14494
14495 2017-03-24  Alan Hayward  <alan.hayward@arm.com>
14496
14497         * regcache.c (regcache_debug_print_register): New function.
14498         * regcache.h (regcache_debug_print_register): New declaration.
14499         * target.c (debug_print_register): Remove.
14500         (target_fetch_registers): Call regcache_debug_print_register.
14501         (target_store_registers): Likewise.
14502
14503 2017-03-24  Pádraig Brady  <pbrady@fb.com>
14504
14505         * dwarf2read.c (setup_type_unit_groups): Ensure dir_index doesn't
14506         reference beyond the 'lh->include_dirs' array before accessing to
14507         it.
14508         (psymtab_include_file_name): Likewise.
14509         (dwarf_decode_lines_1): Likewise.
14510         (dwarf_decode_lines): Likewise.
14511         (file_file_name): Likewise.
14512
14513 2017-03-23  Simon Marchi  <simon.marchi@ericsson.com>
14514
14515         * fbsd-tdep.c (fbsd_corefile_thread): Don't set/restore
14516         inferior_ptid.
14517         * proc-service.c (ps_lgetregs, ps_lsetregs, ps_lgetfpregs,
14518         ps_lsetfpregs): Likewise.
14519         * regcache.c (regcache_raw_update, regcache_raw_write): Likewise.
14520         * sol-thread.c (ps_lgetregs, ps_lsetregs, ps_lgetfpregs,
14521         ps_lsetfpregs): Likewise.
14522         * target.c (target_fetch_registers, target_store_registers):
14523         Remove asserts.
14524
14525 2017-03-23  Alan Hayward  <alan.hayward@arm.com>
14526
14527         * sol-thread.c (sol_thread_store_registers): Remove regcache calls.
14528
14529 2017-03-23  Yao Qi  <yao.qi@linaro.org>
14530
14531         * aarch64-tdep.c (aarch64_process_record_test): Declare.
14532         (_initialize_aarch64_tdep): Register it.
14533         (aarch64_record_load_store): Handle PRFM instruction.
14534         (aarch64_process_record_test): New function.
14535
14536 2017-03-23  Yao Qi  <yao.qi@linaro.org>
14537
14538         * aarch64-tdep.c (aarch64_record_load_store): Fix code
14539         indentation.
14540
14541 2017-03-23  Yao Qi  <yao.qi@linaro.org>
14542
14543         * aarch64-tdep.c: Remove AARCH64_RECORD_FAILURE.
14544
14545 2017-03-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
14546
14547         python/python.c (do_start_initialization): Fix memory leak.
14548
14549 2017-03-22  Simon Marchi  <simon.marchi@polymtl.ca>
14550
14551         * inf-ptrace.c (inf_ptrace_xfer_partial): Get pid from ptid
14552         using get_ptrace_pid.
14553         * linux-nat.c (linux_nat_xfer_partial): Don't set/restore
14554         inferior_ptid.
14555         (linux_proc_xfer_partial, linux_proc_xfer_spu): Use lwp of
14556         inferior_ptid instead of pid.
14557
14558 2017-03-22  Yao Qi  <yao.qi@linaro.org>
14559
14560         * aarch64-tdep.c: Wrap locally used classes in anonymous
14561         namespace.
14562         * arm-tdep.c: Likewise.
14563         * linespec.c: Likewise.
14564         * ui-out.c: Likewise.
14565
14566 2017-03-22  Jonah Graham  <jonah@kichwacoders.com>
14567
14568         PR gdb/19637
14569         * python/lib/gdb/printer/bound_registers.py: Import sys.
14570
14571 2017-03-21  Simon Marchi  <simon.marchi@ericsson.com>
14572
14573         * windows-nat.c (do_windows_fetch_inferior_registers): Add
14574         windows_thread_info parameter and use it instead of
14575         current_thread.
14576         (windows_fetch_inferior_registers): Don't set current_thread,
14577         pass the thread to do_windows_fetch_inferior_registers.  Use
14578         ptid from regcache instead of inferior_ptid.
14579         (do_windows_store_inferior_registers): Add windows_thread_info
14580         parameter and use it instead of current_thread.
14581         (windows_store_inferior_registers): Don't set current_thread,
14582         pass the thread to do_windows_store_inferior_registers.  Use
14583         ptid from regcache instead of inferior_ptid.
14584
14585 2017-03-21  Simon Marchi  <simon.marchi@ericsson.com>
14586
14587         * ser-mingw.c (ser_windows_raw): Remove reference to
14588         struct serial::current_timeout.
14589
14590 2017-03-21  Ivo Raisr  <ivo.raisr@oracle.com>
14591
14592         PR tdep/20928
14593         * gdb/sparc-tdep.h (gdbarch_tdep) <sparc64_ccr_type>: New field.
14594         * gdb/sparc64-tdep.c (sparc64_ccr_type): New function.
14595         (sparc64_fsr_type): Fix %fsr decoding.
14596
14597 2017-03-21  Tim Wiederhake  <tim.wiederhake@intel.com>
14598
14599         * python/py-record-btrace.c (btpy_insn_data): Change return type
14600         for Python 2.
14601
14602 2017-03-20  Simon Marchi  <simon.marchi@polymtl.ca>
14603
14604         * spu-linux-nat.c (spu_fetch_inferior_registers,
14605         spu_store_inferior_registers): Use ptid from regcache, set and
14606         restore inferior_ptid.
14607         * spu-multiarch.c (spu_fetch_registers, spu_store_registers):
14608         Likewise.
14609
14610 2017-03-20  Simon Marchi  <simon.marchi@polymtl.ca>
14611
14612         * i386-linux-nat.c (fetch_register, store_register,
14613         i386_linux_fetch_inferior_registers,
14614         i386_linux_store_inferior_registers): Use ptid from regcache.
14615         * ia64-linux-nat.c (ia64_linux_fetch_register,
14616         ia64_linux_store_register): Likewise.
14617         * inf-ptrace.c (inf_ptrace_fetch_register,
14618         inf_ptrace_store_register): Likewise.
14619         * m32r-linux-nat.c (m32r_linux_fetch_inferior_registers,
14620         m32r_linux_store_inferior_registers): Likewise.
14621         * m68k-bsd-nat.c (m68kbsd_fetch_inferior_registers,
14622         m68kbsd_store_inferior_registers): Likewise.
14623         * m68k-linux-nat.c (fetch_register, store_register,
14624         m68k_linux_fetch_inferior_registers,
14625         m68k_linux_store_inferior_registers): Likewise.
14626         * m88k-bsd-nat.c (m88kbsd_fetch_inferior_registers,
14627         m88kbsd_store_inferior_registers): Likewise.
14628         * mips-fbsd-nat.c (mips_fbsd_fetch_inferior_registers,
14629         mips_fbsd_store_inferior_registers): Likewise.
14630         * mips-linux-nat.c (mips64_linux_regsets_fetch_registers,
14631         mips64_linux_regsets_store_registers): Likewise.
14632         * mips-nbsd-nat.c (mipsnbsd_fetch_inferior_registers,
14633         mipsnbsd_store_inferior_registers): Likewise.
14634         * mips-obsd-nat.c (mips64obsd_fetch_inferior_registers,
14635         mips64obsd_store_inferior_registers): Likewise.
14636         * nto-procfs.c (procfs_fetch_registers, procfs_store_registers):
14637         Likewise.
14638         * ppc-fbsd-nat.c (ppcfbsd_fetch_inferior_registers,
14639         ppcfbsd_store_inferior_registers): Likewise.
14640         * ppc-linux-nat.c (ppc_linux_fetch_inferior_registers,
14641         ppc_linux_store_inferior_registers): Likewise.
14642         * ppc-nbsd-nat.c (ppcnbsd_fetch_inferior_registers,
14643         ppcnbsd_store_inferior_registers): Likewise.
14644         * ppc-obsd-nat.c (ppcobsd_fetch_registers,
14645         ppcobsd_store_registers): Likewise.
14646         * procfs.c (procfs_fetch_registers, procfs_store_registers):
14647         Likewise.
14648         * ravenscar-thread.c (ravenscar_fetch_registers,
14649         ravenscar_store_registers, ravenscar_prepare_to_store):
14650         Likewise.
14651         * record-btrace.c (record_btrace_fetch_registers,
14652         record_btrace_store_registers, record_btrace_prepare_to_store):
14653         Likewise.
14654         * remote-sim.c (gdbsim_fetch_register, gdbsim_store_register):
14655         Lookup inferior using ptid from regcache, instead of
14656         current_inferior.
14657         * remote.c (remote_fetch_registers, remote_store_registers): Use
14658         ptid from regcache.
14659         * rs6000-nat.c (fetch_register, store_register): Likewise.
14660         * s390-linux-nat.c (s390_linux_fetch_inferior_registers,
14661         s390_linux_store_inferior_registers): Likewise.
14662         * sh-nbsd-nat.c (shnbsd_fetch_inferior_registers,
14663         shnbsd_store_inferior_registers): Likewise.
14664         * sol-thread.c (sol_thread_fetch_registers,
14665         sol_thread_store_registers): Likewise.
14666         * sparc-nat.c (sparc_fetch_inferior_registers,
14667         sparc_store_inferior_registers): Likewise.
14668         * tilegx-linux-nat.c (fetch_inferior_registers,
14669         store_inferior_registers): Likewise.
14670         * vax-bsd-nat.c (vaxbsd_fetch_inferior_registers,
14671         vaxbsd_store_inferior_registers): Likewise.
14672         * xtensa-linux-nat.c (fetch_gregs, store_gregs, fetch_xtregs,
14673         store_xtregs): Likewise.
14674
14675 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
14676
14677         PR gdb/14441
14678         * NEWS: Mention support for rvalue references in GDB and python.
14679         * doc/gdb.texinfo (C Plus Plus Expressions): Mention that GDB
14680         supports both lvalue and rvalue references.
14681
14682 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
14683
14684         PR gdb/14441
14685         * gdbtypes.c (rank_one_type): Implement overloading
14686         resolution rules regarding rvalue references.
14687
14688 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
14689
14690         PR gdb/14441
14691         * aarch64-tdep.c (aarch64_type_align)
14692         (aarch64_extract_return_value, aarch64_store_return_value): Change
14693         lvalue reference type checks to general reference type checks.
14694         * amd64-tdep.c (amd64_classify): Likewise.
14695         * amd64-windows-tdep.c (amd64_windows_passed_by_integer_register):
14696         Likewise.
14697         * arm-tdep.c (arm_type_align, arm_extract_return_value)
14698         (arm_store_return_value): Likewise.
14699         * ax-gdb.c (gen_fetch, gen_cast): Likewise.
14700         * c-typeprint.c (c_print_type): Likewise.
14701         * c-varobj.c (adjust_value_for_child_access, c_value_of_variable)
14702         (cplus_number_of_children, cplus_describe_child): Likewise.
14703         * compile/compile-c-symbols.c (generate_vla_size): Likewise.
14704         * completer.c (expression_completer): Likewise.
14705         * cp-support.c (make_symbol_overload_list_adl_namespace):
14706         Likewise.
14707         * darwin-nat-info.c (info_mach_region_command): Likewise.
14708         * dwarf2loc.c (entry_data_value_coerce_ref)
14709         (value_of_dwarf_reg_entry): Likewise.
14710         * eval.c (ptrmath_type_p, evaluate_subexp_standard)
14711         (evaluate_subexp_for_address, evaluate_subexp_for_sizeof):
14712         Likewise.
14713         * findvar.c (extract_typed_address, store_typed_address):
14714         Likewise.
14715         * gdbtypes.c (rank_one_type): Likewise.
14716         * hppa-tdep.c (hppa64_integral_or_pointer_p): Likewise.
14717         * infcall.c (value_arg_coerce): Likewise.
14718         * language.c (pointer_type): Likewise.
14719         * m32c-tdep.c (m32c_reg_arg_type, m32c_m16c_address_to_pointer):
14720         Likewise.
14721         * m88k-tdep.c (m88k_integral_or_pointer_p): Likewise.
14722         * mn10300-tdep.c (mn10300_type_align): Likewise.
14723         * msp430-tdep.c (msp430_push_dummy_call): Likewise.
14724         * ppc-sysv-tdep.c (do_ppc_sysv_return_value)
14725         (ppc64_sysv_abi_push_param, ppc64_sysv_abi_return_value):
14726         Likewise.
14727         * printcmd.c (print_formatted, x_command): Likewise.
14728         * python/py-type.c (typy_get_composite, typy_template_argument):
14729         Likewise.
14730         * python/py-value.c (valpy_referenced_value)
14731         (valpy_get_dynamic_type, value_has_field): Likewise.
14732         * s390-linux-tdep.c (s390_function_arg_integer): Likewise.
14733         * sparc-tdep.c (sparc_integral_or_pointer_p): Likewise.
14734         * sparc64-tdep.c (sparc64_integral_or_pointer_p): Likewise.
14735         * spu-tdep.c (spu_scalar_value_p): Likewise.
14736         * symtab.c (lookup_symbol_aux): Likewise.
14737         * typeprint.c (whatis_exp, print_type_scalar): Likewise.
14738         * valarith.c (binop_types_user_defined_p, unop_user_defined_p):
14739         Likewise.
14740         * valops.c (value_cast_pointers, value_cast)
14741         (value_reinterpret_cast, value_dynamic_cast, value_addr, typecmp)
14742         (value_struct_elt, value_struct_elt_bitpos)
14743         (value_find_oload_method_list, find_overload_match)
14744         (value_rtti_indirect_type): Likewise.
14745         * valprint.c (val_print_scalar_type_p, generic_val_print):
14746         Likewise.
14747         * value.c (value_actual_type, value_as_address, unpack_long)
14748         (pack_long, pack_unsigned_long, coerce_ref_if_computed)
14749         (coerce_ref): Likewise.
14750         * varobj.c (varobj_get_value_type): Likewise.
14751
14752 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
14753
14754         PR gdb/14441
14755         * doc/python.texi (Types in Python): Add TYPE_CODE_RVALUE_REF to
14756         table of constants.
14757         * python/lib/gdb/command/explore.py: Support exploring values
14758         of rvalue reference types.
14759         * python/lib/gdb/types.py: Implement get_basic_type() for
14760         rvalue reference types.
14761         * python/py-type.c (pyty_codes) <TYPE_CODE_RVALUE_REF>: New
14762         constant.
14763         * python/py-value.c (valpy_getitem): Add an rvalue reference
14764         check.
14765         (valpy_reference_value): Add new parameter "refcode".
14766         (valpy_lvalue_reference_value, valpy_rvalue_reference_value):
14767         New wrappers for valpy_reference_value().
14768         * python/py-xmethods.c (gdbpy_get_xmethod_result_type)
14769         (gdbpy_invoke_xmethod): Likewise.
14770
14771 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
14772
14773         PR gdb/14441
14774         * dwarf2read.c (process_die, read_type_die_1): Handle the
14775         DW_TAG_rvalue_reference_type DIE.
14776         (read_tag_reference_type): Add new parameter "refcode".
14777
14778 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
14779
14780         PR gdb/14441
14781         * c-typeprint.c (c_print_type, c_type_print_varspec_prefix)
14782         (c_type_print_modifier, c_type_print_varspec_suffix)
14783         (c_type_print_base): Support printing rvalue reference types.
14784         * c-valprint.c (c_val_print, c_value_print): Support printing
14785         rvalue reference values.
14786
14787 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
14788
14789         PR gdb/14441
14790         * cp-name-parser.y (ptr_operator): Handle the '&&' token in
14791         typename.
14792         * cp-support.c (replace_typedefs): Handle
14793         DEMANGLE_COMPONENT_RVALUE_REFERENCE.
14794         * python/py-type.c (typy_lookup_type): Likewise.
14795
14796 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
14797
14798         PR gdb/14441
14799         * c-exp.y (ptr_operator): Handle the '&&' token in the typename.
14800         * parse.c (insert_type): Change assert statement.
14801         (follow_types): Handle rvalue reference types.
14802         * parser-defs.h (enum type_pieces) <tp_rvalue_reference>: New
14803         constant.
14804
14805 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
14806
14807         PR gdb/14441
14808         * ada-lang.c (ada_evaluate_subexp): Adhere to the new
14809         value_ref() interface.
14810         * c-valprint.c (c_value_print): Likewise.
14811         * infcall.c (value_arg_coerce): Likewise.
14812         * python/py-value.c (valpy_reference_value): Likewise.
14813         * valops.c (value_cast, value_reinterpret_cast)
14814         (value_dynamic_cast, typecmp): Likewise.
14815         (value_ref): Parameterize by kind of return value reference type.
14816         * value.h (value_ref): Add new parameter "refcode".
14817
14818 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
14819
14820         PR gdb/14441
14821         * dwarf2read.c (read_tag_reference_type): Use
14822         lookup_lvalue_reference_type() instead of lookup_reference_type().
14823         * eval.c (evaluate_subexp_standard): Likewise.
14824         * f-exp.y: Likewise.
14825         * gdbtypes.c (make_reference_type, lookup_reference_type):
14826         Generalize with rvalue reference types.
14827         (lookup_lvalue_reference_type, lookup_rvalue_reference_type): New
14828         convenience wrappers for lookup_reference_type().
14829         * gdbtypes.h (make_reference_type, lookup_reference_type): Add a
14830         reference kind parameter.
14831         (lookup_lvalue_reference_type, lookup_rvalue_reference_type): Add
14832         wrappers for lookup_reference_type().
14833         * guile/scm-type.c (gdbscm_type_reference): Use
14834         lookup_lvalue_reference_type() instead of lookup_reference_type().
14835         * guile/scm-value.c (gdbscm_value_dynamic_type): Likewise.
14836         * parse.c (follow_types): Likewise.
14837         * python/py-type.c (typy_reference, typy_lookup_type): Likewise.
14838         * python/py-value.c (valpy_get_dynamic_type, valpy_getitem):
14839         Likewise.
14840         * python/py-xmethods.c (gdbpy_get_xmethod_result_type)
14841         (gdbpy_invoke_xmethod): Likewise.
14842         * stabsread.c: Provide extra argument to make_reference_type()
14843         call.
14844         * valops.c (value_ref, value_rtti_indirect_type): Use
14845         lookup_lvalue_reference_type() instead of lookup_reference_type().
14846
14847 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
14848
14849         PR gdb/14441
14850         * gdbtypes.h (enum type_code) <TYPE_CODE_RVALUE_REF>: New constant.
14851         (TYPE_IS_REFERENCE): New macro.
14852         (struct type): Add rvalue_reference_type field.
14853         (TYPE_RVALUE_REFERENCE_TYPE): New macro.
14854
14855 2017-03-20  Marc-Andre Laperle  <marc-andre.laperle@ericsson.com>
14856
14857         * NEWS: Add an entry about new '-file-list-shared-libraries' command.
14858         * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries):
14859         New function definition.
14860         * mi/mi-cmds.c (mi_cmds): Add -file-list-shared-libraries command.
14861         * mi/mi-cmds.h (mi_cmd_file_list_shared_libraries):
14862         New function declaration.
14863         * mi/mi-interp.c (mi_output_solib_attribs): New Function.
14864         * mi/mi-interp.h: New file.
14865         * solib.c (info_sharedlibrary_command): Replace for loop with
14866         ALL_SO_LIBS macro
14867         * solib.h (update_solib_list): New function declaration.
14868         (so_list_head): Move macro.
14869         * solist.h (ALL_SO_LIBS): New macro.
14870
14871 2017-03-20  Marc-Andre Laperle  <marc-andre.laperle@ericsson.com>
14872
14873         * infcmd.c (post_create_inferior): Remove unused argument in
14874         call to solib_add.
14875         * remote.c (remote_start_remote): Likewise.
14876         * solib-frv.c (frv_fetch_objfile_link_map): Likewise.
14877         * solib-svr4.c: (svr4_fetch_objfile_link_map): Likewise.
14878         (enable_break): Likewise.
14879         * solib.c (update_solib_list): Remove unused target argument
14880         and its documentation.
14881         (solib_add): Remove unused target argument.  Remove unused
14882         argument in call to update_solib_list.
14883         (info_sharedlibrary_command): Remove unused argument in call
14884         to update_solib_list.
14885         (sharedlibrary_command): Remove unused argument in call to
14886         solib_add.
14887         (handle_solib_event): Likewise.
14888         (reload_shared_libraries): Likewise.
14889         * solib.h (solib_add): Remove unused target argument.
14890
14891 2017-03-20  Andreas Arnez  <arnez@linux.vnet.ibm.com>
14892
14893         * s390-linux-tdep.c (is_rsi, is_rie): Remove functions.
14894         (s390_displaced_step_fixup): Cover relative branches with the
14895         default fixup handling.  This fixes lack of support for some
14896         relative branch instructions.
14897
14898 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
14899
14900         * i386-gnu-nat.c (gnu_fetch_registers, gnu_store_registers): Use
14901         ptid from regcache.
14902
14903 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
14904
14905         * i386-darwin-nat.c (i386_darwin_fetch_inferior_registers,
14906         i386_darwin_store_inferior_registers): Use ptid from regcache.
14907
14908 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
14909
14910         * i386-bsd-nat.c (i386bsd_fetch_inferior_registers,
14911         i386bsd_store_inferior_registers): Use ptid from regcache.
14912
14913 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
14914
14915         * hppa-obsd-nat.c (hppaobsd_fetch_registers,
14916         hppaobsd_store_registers): Use ptid from regcache.
14917
14918 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
14919
14920         * hppa-nbsd-nat.c (hppanbsd_fetch_registers,
14921         hppanbsd_store_registers): Use ptid from regcache.
14922
14923 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
14924
14925         * hppa-linux-nat.c (fetch_register, store_register): Use ptid
14926         from regcache.  Use get_ptrace_pid.
14927
14928 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
14929
14930         * corelow.c (get_core_register_section): Use ptid from regcache,
14931         update doc.
14932
14933 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
14934
14935         * bsd-uthread.c (bsd_uthread_fetch_registers,
14936         bsd_uthread_store_registers): Use ptid from regcache, set and
14937         restore inferior_ptid.
14938
14939 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
14940
14941         * arm-nbsd-nat.c (fetch_register, fetch_regs, fetch_fp_register,
14942         fetch_fp_regs, store_register, store_regs, store_fp_register,
14943         store_fp_regs): Use ptid from regcache.
14944
14945 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
14946
14947         * arm-linux-nat.c (fetch_fpregs, store_fpregs, fetch_regs,
14948         store_regs, fetch_wmmx_regs, store_wmmx_regs, fetch_vfp_regs,
14949         store_vfp_regs): Use ptid from regcache.
14950
14951 2017-03-17  Pedro Alves  <palves@redhat.com>
14952
14953         PR remote/21188
14954         * ser-base.c (ser_base_wait_for): Add comment.
14955         (do_ser_base_readchar): Improve comment based on the ser-unix.c's
14956         version.
14957         * ser-unix.c (hardwire_raw): Remove reference to
14958         scb->current_timeout.
14959         (wait_for, do_hardwire_readchar, hardwire_readchar): Delete.
14960         (hardwire_ops): Install ser_base_readchar instead of
14961         hardwire_readchar.
14962         * serial.h (struct serial) <current_timeout, timeout_remaining>:
14963         Remove fields.
14964
14965 2017-03-17  Jonah Graham  <jonah@kichwacoders.com>
14966
14967         PR gdb/19637
14968         * python/lib/gdb/printer/bound_registers.py: Add support for
14969         Python 3.
14970
14971 2017-03-16  Andreas Arnez  <arnez@linux.vnet.ibm.com>
14972
14973         * dwarf2loc.c (indirect_synthetic_pointer): Get data type of
14974         pointed-to DIE and pass it to dwarf2_evaluate_loc_desc_full.
14975         (dwarf2_evaluate_loc_desc_full): New parameter subobj_type; rename
14976         byte_offset to subobj_byte_offset.  Fix the handling of
14977         DWARF_VALUE_STACK on big-endian targets when coming via an
14978         implicit pointer.
14979         (dwarf2_evaluate_loc_desc): Adjust call to
14980         dwarf2_evaluate_loc_desc_full.
14981         * dwarf2loc.h (dwarf2_fetch_die_type_sect_off): New declaration.
14982         * dwarf2read.c (dwarf2_fetch_die_type_sect_off): New function.
14983
14984 2017-03-16  Yao Qi  <yao.qi@linaro.org>
14985
14986         * arm-tdep.c (thumb_record_misc): Decode CBNZ, CBZ, REV16,
14987         and REVSH instructions.
14988
14989 2017-03-16  Yao Qi  <yao.qi@linaro.org>
14990
14991         * arm-tdep.c [GDB_SELF_TEST]: include "selftests.h".
14992         (arm_record_test): Declare.
14993         (_initialize_arm_tdep) [GDB_SELF_TEST]: call register_self_test.
14994         (thumb_record_ld_st_reg_offset): Rewrite the opcode matching to
14995         align with the manual.
14996         (thumb_record_misc): Adjust the code order to align with the
14997         manual.
14998         (thumb2_record_decode_insn_handler): Fix instruction matching.
14999         (instruction_reader_thumb): New class.
15000         (arm_record_test): New function.
15001
15002 2017-03-16  Yao Qi  <yao.qi@linaro.org>
15003
15004         * arm-tdep.c (abstract_memory_reader): New class.
15005         (instruction_reader): New class.
15006         (extract_arm_insn): Add argument 'reader'.  Callers updated.
15007         (decode_insn): Likewise.
15008
15009 2017-03-16  Doug Evans  <dje@google.com>
15010
15011         * guile/scm-lazy-string.c (lazy_string_smob): Clarify use of LENGTH
15012         member.  Change type of TYPE member to SCM.  All uses updated.
15013         (lsscm_make_lazy_string_smob): Add assert.
15014         (lsscm_make_lazy_string): Flag bad length values.
15015         (lsscm_elt_type): New function.
15016         (gdbscm_lazy_string_to_value): Rewrite to use
15017         lsscm_safe_lazy_string_to_value.
15018         (lsscm_safe_lazy_string_to_value): Fix handling of TYPE_CODE_PTR.
15019         * guile/scm-value.c (gdbscm_value_to_lazy_string): Flag bad length
15020         values.  Fix TYPE_CODE_PTR.  Handle TYPE_CODE_ARRAY.  Handle typedefs
15021         in incoming type.
15022         * guile/guile-internal.h (tyscm_scm_to_type): Declare.
15023         * guile/scm-type.c (tyscm_scm_to_type): New function.
15024
15025 2017-03-15  Doug Evans  <dje@google.com>
15026
15027         PR python/17728, python/18439, python/18779
15028         * python/py-lazy-string.c (lazy_string_object): Clarify use of LENGTH
15029         member.  Change type of TYPE member to PyObject *.  All uses updated.
15030         (stpy_convert_to_value): Fix handling of TYPE_CODE_PTR.
15031         (gdbpy_create_lazy_string_object): Flag bad length values.
15032         Handle TYPE_CODE_ARRAY with possibly different user-provided length.
15033         Handle typedefs in incoming type.
15034         (stpy_lazy_string_elt_type): New function.
15035         (gdbpy_extract_lazy_string): Call it.
15036         * python/py-value.c (valpy_lazy_string): Flag bad length values.
15037         Fix handling of TYPE_CODE_PTR.  Handle TYPE_CODE_ARRAY.  Handle
15038         typedefs in incoming type.
15039
15040 2017-03-16  Doug Evans  <dje@google.com>
15041
15042         * guile/guile-internal.h (tyscm_scm_to_type): Declare.
15043         * guile/scm-type.c (tyscm_scm_to_type): New function.
15044
15045 2017-03-16  Jiong Wang  <jiong.wang@arm.com>
15046
15047         * inf-ptrace.c (inf_ptrace_peek_poke): Change the type to
15048         "ULONGEST" for "skip".
15049
15050 2017-03-14  Andreas Arnez  <arnez@linux.vnet.ibm.com>
15051
15052         PR gdb/21220
15053         * inf-ptrace.c (inf_ptrace_xfer_partial): In "case
15054         TARGET_OBJECT_MEMORY", extract the logic for ptrace peek/poke...
15055         (inf_ptrace_peek_poke): ...here.  New function.  Now also loop
15056         over ptrace peek/poke until end of buffer or error.
15057
15058 2017-03-14  Simon Marchi  <simon.marchi@ericsson.com>
15059
15060         * parse.c (length_of_subexp): Make static.
15061         * parser-defs.h (length_of_subexp): Remove.
15062
15063 2017-03-14  Andreas Arnez  <arnez@linux.vnet.ibm.com>
15064
15065         * linux-nat.c (linux_proc_xfer_partial): Handle write operations
15066         as well.
15067
15068 2017-03-14  Pedro Alves  <palves@redhat.com>
15069
15070         * cp-name-parser.y (cp_demangled_name_to_comp): Update comment.
15071         (main): Use std::unique_ptr.  Remove calls to
15072         cp_demangled_name_parse_free.
15073
15074 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
15075
15076         * alpha-bsd-nat.c (alphabsd_fetch_inferior_registers,
15077         alphabsd_store_inferior_registers): Use regcache->ptid instead
15078         of inferior_ptid.
15079
15080 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
15081
15082         * aix-thread.c (aix_thread_fetch_registers,
15083         aix_thread_store_registers): Use regcache->ptid instead of
15084         inferior_ptid.
15085
15086 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
15087
15088         * aarch64-linux-nat.c (fetch_gregs_from_thread,
15089         store_gregs_to_thread, fetch_fpregs_from_thread,
15090         store_fpregs_to_thread): Use regcache->ptid instead of
15091         inferior_ptid.
15092
15093 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
15094
15095         * amd64-linux-nat.c (amd64_linux_fetch_inferior_registers,
15096         amd64_linux_fetch_inferior_registers): Use regcache->ptid
15097         instead of inferior_ptid.
15098
15099 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
15100
15101         * target.c (target_fetch_registers, target_store_registers): Add
15102         assert.
15103
15104 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
15105
15106         * regcache.h (regcache_get_ptid): New function.
15107         * regcache.c (regcache_get_ptid): New function.
15108
15109 2017-03-13  Mark Wielaard  <mark@klomp.org>
15110
15111         * cp-name-parser.y (make_empty): Initialize d_printing to zero.
15112
15113 2017-03-10  Keith Seitz  <keiths@redhat.com>
15114
15115         PR c++/8218
15116         * c-typeprint.c (cp_type_print_method_args): Skip artificial arguments.
15117
15118 2017-03-08  Pedro Alves  <palves@redhat.com>
15119
15120         PR gdb/18360
15121         * infrun.c (start_step_over, do_target_resume, resume)
15122         (restart_threads): Assert we're not resuming a thread that is
15123         meant to be stopped.
15124         (infrun_thread_stop_requested_callback): Delete.
15125         (infrun_thread_stop_requested): If the thread is internally
15126         stopped, queue a pending stop event and clear the thread's
15127         inline-frame state.
15128         (handle_stop_requested): New function.
15129         (handle_syscall_event, handle_inferior_event_1): Use
15130         handle_stop_requested.
15131         (handle_stop_requested): New function.
15132         (handle_signal_stop): Set the thread's stop_signal here instead of
15133         at caller.
15134         (finish_step_over): Clear step over info unconditionally.
15135         (handle_signal_stop): If the user had interrupted the event
15136         thread, consider the stop a random signal.
15137         (handle_signal_stop) <signal arrived while stepping over
15138         breakpoint>: Don't restart threads here.
15139         (stop_waiting): Don't clear step-over info here.
15140
15141 2017-03-08  Pedro Alves  <palves@redhat.com>
15142
15143         PR 21206
15144         * common/gdb_unlinker.h (unlinker::unlinker): Attribute nonnull
15145         goes to argument 2, not 1.
15146
15147 2017-03-08  Pedro Alves  <palves@redhat.com>
15148
15149         PR cli/21218
15150         * top.c (gdb_readline_wrapper): Avoid passing NULL to
15151         display_gdb_prompt.
15152         (command_line_input): Add comment.
15153
15154 2017-03-08  Pedro Alves  <palves@redhat.com>
15155
15156         PR tui/21216
15157         * tui/tui-file.c (tui_file::write): New.
15158         * tui/tui-file.h (tui_file): Override "write".
15159         * tui/tui-io.c (do_tui_putc, update_start_line): New functions,
15160         factored out from ...
15161         (tui_puts): ... here.
15162         (tui_putc): Use them.
15163         (tui_write): New function.
15164         * tui/tui-io.h (tui_write): Declare.
15165
15166 2017-03-07  Sergio Durigan Junior  <sergiodj@redhat.com>
15167
15168         * Makefile.in (SFILES): Replace "environ.c" with
15169         "common/environ.c".
15170         (HFILES_NO_SRCDIR): Likewise, for "environ.h".
15171         * environ.c: Include "common-defs.h" instead of "defs.h.  Moved
15172         to...
15173         * common/environ.c: ... here.
15174         * environ.h: Moved to...
15175         * common/environ.h: ... here.
15176
15177 2017-03-07  Peter Bergner  <bergner@vnet.ibm.com>
15178
15179         * gdbarch.sh (pstring_ptr): New static function.
15180         (gdbarch_disassembler_options): Use it.
15181         (gdbarch_verify_disassembler_options): Print valid_disassembler_options,
15182         not valid_disassembler_option->name.
15183         * gdbarch.c: Regenerate.
15184
15185 2017-03-07  Peter Bergner  <bergner@vnet.ibm.com>
15186
15187         * config/powerpc/ppc64-linux.mh (MH_CFLAGS): Delete.
15188
15189 2017-03-07  Pedro Alves  <palves@redhat.com>
15190
15191         * tui/tui-regs.c (tui_restore_gdbout): Don't delete gdb_stdout.
15192
15193 2017-03-07  Walfred Tedeschi  <walfred.tedeschi@intel.com>
15194
15195         * i387-tdep.h (i387_reset_bnd_regs): Add function definition.
15196         * i387-tdep.c (i387_reset_bnd_regs): Add function implementation.
15197         * i386-tdep.c (i386_push_dummy_call): Call i387_reset_bnd_regs.
15198         * amd64-tdep.c (amd64_push_dummy_call): Call i387_reset_bnd_regs.
15199
15200 2017-03-06  Simon Marchi  <simon.marchi@ericsson.com>
15201
15202         * xtensa-linux-nat.c (fetch_gregs): Remove const.
15203
15204 2017-03-03  Simon Marchi  <simon.marchi@ericsson.com>
15205
15206         * remote.c (remote_add_target_side_commands): Use range-based
15207         for loop.
15208
15209 2017-03-03  Yao Qi  <yao.qi@linaro.org>
15210
15211         PR gdb/21165
15212         * ada-valprint.c (ada_val_print_ref): Call value_fetch_lazy if
15213         value is lazy.
15214         * valprint.c (common_val_print): Likewise.
15215
15216 2017-02-28  Peter Bergner  <bergner@vnet.ibm.com>
15217
15218         * NEWS: Mention new set/show disassembler-options commands.
15219         * doc/gdb.texinfo: Document new set/show disassembler-options commands.
15220         * disasm.c: Include "arch-utils.h", "gdbcmd.h" and "safe-ctype.h".
15221         (prospective_options): New static variable.
15222         (gdb_disassembler::gdb_disassembler): Initialize
15223         m_di.disassembler_options.
15224         (gdb_buffered_insn_length_init_dis): Initilize di->disassembler_options.
15225         (get_disassembler_options): New function.
15226         (set_disassembler_options): Likewise.
15227         (set_disassembler_options_sfunc): Likewise.
15228         (show_disassembler_options_sfunc): Likewise.
15229         (disassembler_options_completer): Likewise.
15230         (_initialize_disasm): Likewise.
15231         * disasm.h (get_disassembler_options): New prototype.
15232         (set_disassembler_options): Likewise.
15233         * gdbarch.sh (gdbarch_disassembler_options): New variable.
15234         (gdbarch_verify_disassembler_options): Likewise.
15235         * gdbarch.c: Regenerate.
15236         * gdbarch.h: Likewise.
15237         * arm-tdep.c (num_disassembly_options): Delete.
15238         (set_disassembly_style): Likewise.
15239         (arm_disassembler_options): New static variable.
15240         (set_disassembly_style_sfunc): Convert short style name into long
15241         option name.  Call set_disassembler_options.
15242         (show_disassembly_style_sfunc): New function.
15243         (arm_gdbarch_init): Call set_gdbarch_disassembler_options and
15244         set_gdbarch_verify_disassembler_options.
15245         (_initialize_arm_tdep): Delete regnames variable and update callers.
15246         (arm_disassembler_options): Initialize.
15247         (disasm_options): New variable.
15248         (num_disassembly_options): Rename from this...
15249         (num_disassembly_styles): ...to this.  Compute by scanning through
15250         disasm_options.
15251         (valid_disassembly_styles): Initialize using disasm_options.
15252         Remove calls to parse_arm_disassembler_option, get_arm_regnames and
15253         set_arm_regname_option.
15254         Pass show_disassembly_style_sfunc to the "disassembler" setshow command.
15255         * rs6000-tdep.c (powerpc_disassembler_options): New static variable.
15256         (rs6000_gdbarch_init): Call set_gdbarch_disassembler_options and
15257         set_gdbarch_verify_disassembler_options.
15258         * s390-tdep.c (s390_disassembler_options): New static variable.
15259         (s390_gdbarch_init):all set_gdbarch_disassembler_options and
15260         set_gdbarch_verify_disassembler_options.
15261
15262 2017-02-27  Simon Marchi  <simon.marchi@ericsson.com>
15263
15264         * remote.c (remote_add_target_side_condition): Remove "struct"
15265         keyword from range-based for loop.
15266
15267 2017-02-27  Simon Marchi  <simon.marchi@ericsson.com>
15268
15269         * remote.c (remote_add_target_side_condition): Use range-based
15270         for loop.  Update comment.
15271
15272 2017-02-27  Yao Qi  <yao.qi@linaro.org>
15273
15274         * f-typeprint.c (f_print_type): Check "varstring" is empty first.
15275
15276 2017-02-26  Alan Hayward  <alan.hayward@arm.com>
15277
15278         * regcache.c (regcache_raw_update): New function.
15279         (regcache_raw_read): Move code to regcache_raw_update.
15280         * regcache.h (regcache_raw_update): New declaration.
15281         * remote.c (remote_prepare_to_store): Call regcache_raw_update.
15282
15283 2017-02-26  Jan Kratochvil  <jan.kratochvil@redhat.com>
15284
15285         * dwarf2read.c (create_debug_type_hash_table): Initialize
15286         header.signature and header.type_offset_in_tu.
15287
15288 2017-02-24  Pedro Alves  <palves@redhat.com>
15289
15290         * symtab.c (make_file_symbol_completion_list_1): Use
15291         add_symtab_completions.
15292
15293 2017-02-24  Alan Hayward  <alan.hayward@arm.com>
15294
15295         * stack.c (frame_info): Use frame_unwind_register_value to avoid buf.
15296
15297 2017-02-24  Alan Hayward  <alan.hayward@arm.com>
15298
15299         * i386-tdep.c (i386_pseudo_register_read_into_value): Use
15300         I386_MAX_REGISTER_SIZE.
15301         (i386_pseudo_register_write): Likewise.
15302         (i386_process_record): Likewise.
15303         * i387-tdep.c (i387_supply_xsave): Likewise.
15304         * m68k-linux-nat.c (fetch_register): Use M68K_MAX_REGISTER_SIZE.
15305         (store_register): Likewise.
15306
15307 2017-02-23  Pedro Alves  <palves@redhat.com>
15308
15309         * ada-lang.c: Include "common/function-view.h".
15310         (ada_iterate_over_symbols): Adjust to use function_view as
15311         callback type.
15312         (struct add_partial_datum, ada_complete_symbol_matcher): Delete.
15313         (ada_make_symbol_completion_list): Use a lambda.
15314         (ada_exc_search_name_matches): Delete.
15315         (name_matches_regex): New.
15316         (ada_add_global_exceptions): Use a lambda and name_matches_regex.
15317         * compile/compile-c-support.c: Include "common/function-view.h".
15318         (print_one_macro): Change prototype to accept a ui_file pointer.
15319         (write_macro_definitions): Use a lambda.
15320         * dwarf2read.c: Include "common/function-view.h".
15321         (dw2_map_expand_apply, dw2_map_symtabs_matching_filename)
15322         (dw2_expand_symtabs_matching): Adjust to use function_view as
15323         callback type.
15324         * language.h: Include "common/function-view.h".
15325         (struct language_defn) <la_iterate_over_symbols>: Adjust to use
15326         function_view as callback type.
15327         (LA_ITERATE_OVER_SYMBOLS): Remove DATA parameter.
15328         * linespec.c: Include "common/function-view.h".
15329         (collect_info::add_symbol): New method.
15330         (struct symbol_and_data_callback, iterate_inline_only, struct
15331         symbol_matcher_data, iterate_name_matcher): Delete.
15332         (iterate_over_all_matching_symtabs): Adjust to use function_view
15333         as callback type and lambdas.
15334         (iterate_over_file_blocks): Adjust to use function_view as
15335         callback type.
15336         (decode_compound_collector): Now a class with private fields.
15337         (decode_compound_collector::release_symbols): New method.
15338         (collect_one_symbol): Rename to...
15339         (decode_compound_collector::operator()): ... this and adjust.
15340         (lookup_prefix_sym): decode_compound_collector construction bits
15341         move to decode_compound_collector ctor.  Pass the
15342         decode_compound_collector object directly as callback.  Remove
15343         cleanups and use decode_compound_collector::release_symbols
15344         instead.
15345         (symtab_collector): Now a class with private fields.
15346         (symtab_collector::release_symtabs): New method.
15347         (add_symtabs_to_list): Rename to...
15348         (symtab_collector::operator()): ... this and adjust.
15349         (collect_symtabs_from_filename): symtab_collector construction
15350         bits move to symtab_collector ctor.  Pass the symtab_collector
15351         object directly as callback.  Remove cleanups and use
15352         symtab_collector::release_symtabs instead.
15353         (collect_symbols): Delete.
15354         (add_matching_symbols_to_info): Use lambdas.
15355         * macrocmd.c (print_macro_callback): Delete.
15356         (info_macro_command): Use a lambda.
15357         (info_macros_command): Pass print_macro_definition as callable
15358         directly.
15359         (print_one_macro): Remove 'ignore' parameter.
15360         (macro_list_command): Adjust.
15361         * macrotab.c (macro_for_each_data::fn): Now a function_view.
15362         (macro_for_each_data::user_data): Delete field.
15363         (foreach_macro): Adjust to call the function_view.
15364         (macro_for_each): Adjust to use function_view as callback type.
15365         (foreach_macro_in_scope): Adjust to call the function_view.
15366         (macro_for_each_in_scope): Adjust to use function_view as callback
15367         type.
15368         * macrotab.h: Include "common/function-view.h".
15369         (macro_callback_fn): Declare a prototype instead of a pointer.
15370         Remove "user_data" parameter.
15371         (macro_for_each, macro_for_each_in_scope): Adjust to use
15372         function_view as callback type.
15373         * psymtab.c (partial_map_expand_apply)
15374         (psym_map_symtabs_matching_filename, recursively_search_psymtabs):
15375         Adjust to use function_view as callback type and to return bool.
15376         (psym_expand_symtabs_matching): Adjust to use function_view as
15377         callback types.
15378         * symfile-debug.c (debug_qf_map_symtabs_matching_filename): Adjust
15379         to use function_view as callback type and to return bool.
15380         (debug_qf_expand_symtabs_matching): Adjust to use function_view as
15381         callback types.
15382         * symfile.c (expand_symtabs_matching): Adjust to use function_view
15383         as callback types.
15384         * symfile.h: Include "common/function-view.h".
15385         (expand_symtabs_file_matcher_ftype)
15386         (expand_symtabs_symbol_matcher_ftype)
15387         (expand_symtabs_exp_notify_ftype): Remove "data" parameter and
15388         return bool.
15389         (quick_symbol_functions::map_symtabs_matching_filename)
15390         (quick_symbol_functions::expand_symtabs_matching): Adjust to use
15391         function_view as callback type and return bool.
15392         (expand_symtabs_matching): Adjust to use function_view as callback
15393         type.
15394         (maintenance_expand_name_matcher)
15395         (maintenance_expand_file_matcher): Delete.
15396         (maintenance_expand_symtabs): Use lambdas.
15397         * symtab.c (iterate_over_some_symtabs): Adjust to use
15398         function_view as callback types and return bool.
15399         (iterate_over_symtabs): Likewise.  Use unique_xmalloc_ptr instead
15400         of a cleanup.
15401         (lookup_symtab_callback): Delete.
15402         (lookup_symtab): Use a lambda.
15403         (iterate_over_symbols): Adjust to use function_view as callback
15404         type.
15405         (struct search_symbols_data, search_symbols_file_matches)
15406         (search_symbols_name_matches): Delete.
15407         (search_symbols): Use a pair of lambdas.
15408         (struct add_name_data, add_macro_name, symbol_completion_matcher)
15409         (symtab_expansion_callback): Delete.
15410         (default_make_symbol_completion_list_break_on_1): Use lambdas.
15411         * symtab.h: Include "common/function-view.h".
15412         (iterate_over_some_symtabs): Adjust to use function_view as
15413         callback type and return bool.
15414         (iterate_over_symtabs): Adjust to use function_view as callback
15415         type.
15416         (symbol_found_callback_ftype): Remove 'data' parameter and return
15417         bool.
15418         (iterate_over_symbols): Adjust to use function_view as callback
15419         type.
15420
15421 2017-02-23  Pedro Alves  <palves@redhat.com>
15422
15423         * Makefile.in (SUBDIR_UNITTESTS_SRCS, SUBDIR_UNITTESTS_OBS): New.
15424         (%.o) <unittests/%.c>: New pattern.
15425         * configure.ac ($development): Add $(SUBDIR_UNITTESTS_OBS) to
15426         CONFIG_OBS, and $(SUBDIR_UNITTESTS_SRCS) to CONFIG_SRCS.
15427         * common/function-view.h: New file.
15428         * unittests/function-view-selftests.c: New file.
15429         * configure: Regenerate.
15430
15431 2017-02-23  Simon Marchi  <simon.marchi@ericsson.com>
15432
15433         * bsd-uthread.c (bsd_uthread_thread_alive): Use ptid instead of
15434         inferior_ptid.
15435         * go32-nat.c (go32_thread_alive): Likewise.
15436
15437 2017-02-23  Yao Qi  <yao.qi@linaro.org>
15438
15439         * varobj-iter.h (varobj_iter_delete): Call xfree instead of
15440         delete.
15441
15442 2017-02-23  Yao Qi  <yao.qi@linaro.org>
15443
15444         * varobj.c (varobj_clear_saved_item): Use delete instead of
15445         xfree.
15446         (update_dynamic_varobj_children): Likewise.
15447
15448 2017-02-21  Jan Kratochvil  <jan.kratochvil@redhat.com>
15449
15450         * dwarf2read.c (dwarf2_record_block_ranges): Add forgotten BASEADDR.
15451
15452 2017-02-21  Simon Marchi  <simon.marchi@ericsson.com>
15453
15454         * common/enum-flags.h (enum_flags::enum_flags): Initialize
15455         m_enum_value to 0 in default constructor.
15456
15457 2017-02-21  Edjunior Barbosa Machado  <emachado@linux.vnet.ibm.com>
15458
15459         * rs6000-tdep.c (LOAD_AND_RESERVE_MASK): Rename from LWARX_MASK.
15460         (STORE_CONDITIONAL_MASK): Rename from STWCX_MASK.
15461         (LBARX_INSTRUCTION, LHARX_INSTRUCTION, LQARX_INSTRUCTION,
15462         STBCX_INSTRUCTION, STHCX_INSTRUCTION, STQCX_INSTRUCTION): New defines.
15463         (IS_LOAD_AND_RESERVE_INSN, IS_STORE_CONDITIONAL_INSN): New macros.
15464         (ppc_displaced_step_copy_insn): Use IS_LOAD_AND_RESERVE_INSN.
15465         (ppc_deal_with_atomic_sequence): Use IS_LOAD_AND_RESERVE_INSN and
15466         IS_STORE_CONDITIONAL_INSN.
15467
15468 2017-02-21  Jan Kratochvil  <jan.kratochvil@redhat.com>
15469
15470         * dwarf2_rnglists_process: Initialize range_beginning and range_end.
15471
15472 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
15473
15474         * NEWS (Changes since GDB 7.12): Add DWARF-5.
15475
15476 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
15477
15478         * dwarf2read.c (skip_one_die, read_attribute_value)
15479         (dwarf2_const_value_attr, dump_die_shallow)
15480         (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
15481         (skip_form_bytes, attr_form_is_constant): Handle DW_FORM_data16.
15482
15483 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
15484
15485         * dwarf2read.c (read_file_scope): Rename DW_MACRO_GNU_*.
15486         (dwarf_parse_macro_header): Accept DWARF version 5.
15487         (dwarf_decode_macro_bytes, dwarf_decode_macros): Rename DW_MACRO_GNU_*.
15488
15489 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
15490
15491         * block.c (call_site_for_pc): Rename DW_OP_GNU_*, DW_TAG_GNU_* and
15492         DW_AT_GNU_*.
15493         * common/common-exceptions.h (enum errors): Likewise.
15494         * dwarf2-frame.c (class dwarf_expr_executor): Likewise.
15495         * dwarf2expr.c (dwarf_block_to_dwarf_reg)
15496         (dwarf_expr_context::execute_stack_op): Likewise.
15497         * dwarf2expr.h (struct dwarf_expr_context, struct dwarf_expr_piece):
15498         Likewise.
15499         * dwarf2loc.c (dwarf_evaluate_loc_desc::get_base_type)
15500         (dwarf_evaluate_loc_desc::push_dwarf_reg_entry_value)
15501         (show_entry_values_debug, call_site_to_target_addr)
15502         (func_addr_to_tail_call_list, func_verify_no_selftailcall)
15503         (dwarf_expr_reg_to_entry_parameter, dwarf_entry_parameter_to_value)
15504         (entry_data_value_free_closure, value_of_dwarf_reg_entry)
15505         (value_of_dwarf_block_entry, indirect_pieced_value)
15506         (symbol_needs_eval_context::push_dwarf_reg_entry_value):
15507         (disassemble_dwarf_expression): Likewise.
15508         * dwarf2read.c (process_die, inherit_abstract_dies)
15509         (read_call_site_scope): Likewise.
15510         * gdbtypes.h (struct func_type, struct call_site_parameter)
15511         (struct call_site): Likewise.
15512         * stack.c (read_frame_arg): Likewise.
15513         * std-operator.def (OP_VAR_ENTRY_VALUE): Likewise.
15514
15515 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
15516
15517         * defs.h (read_unsigned_leb128): New declaration.
15518         * dwarf2loc.c (decode_debug_loclists_addresses): New function.
15519         (decode_debug_loc_dwo_addresses): Update DEBUG_LOC_* to DW_LLE_*.
15520         (dwarf2_find_location_expression): Call also
15521         decode_debug_loclists_addresses.  Handle DWARF-5 ULEB128 length.
15522         * dwarf2loc.h (dwarf2_version): New declaration.
15523         * dwarf2read.c (struct dwarf2_per_objfile): Add loclists, line_str,
15524         rnglists.
15525         (dwarf2_elf_names): Add .debug_loclists, .debug_line_str,
15526         .debug_rnglists.
15527         (struct dwop_section_names): Add loclists_dwo.
15528         (dwop_section_names): Add .debug_loclists.dwo.
15529         (struct comp_unit_head): Add unit_type, signature, type_offset_in_tu.
15530         (struct dwarf2_per_cu_data): Add dwarf_version.
15531         (struct dwo_sections): Add loclists.
15532         (struct attr_abbrev): Add implicit_const.
15533         (read_indirect_line_string): New declaration.
15534         (read_unsigned_leb128): Delete declaration.
15535         (rcuh_kind): New definition.
15536         (read_and_check_comp_unit_head): Change parameter
15537         is_debug_types_section to section_kind.
15538         (dwarf2_locate_sections): Handle loclists, line_str and rnglists.
15539         (read_comp_unit_head): Change parameter abfd to section, add parameter
15540         section_kind.  Handle DWARF-5.
15541         (error_check_comp_unit_head): Accept also DWARF version 5.
15542         (read_and_check_comp_unit_head): Change parameter
15543         is_debug_types_section to section_kind.
15544         (read_and_check_type_unit_head): Delete function.
15545         (read_abbrev_offset): Handle DWARF-5.
15546         (create_debug_type_hash_table): Add parameter section_kind.  Process
15547         only DW_UT_type.  Use signature and type_offset_in_tu from struct
15548         comp_unit_head.
15549         (create_debug_types_hash_table): Update create_debug_type_hash_table
15550         caller.
15551         (create_all_type_units): Call create_debug_type_hash_table.
15552         (read_cutu_die_from_dwo, init_cutu_and_read_dies): Change
15553         read_and_check_type_unit_head caller to read_and_check_comp_unit_head
15554         caller.
15555         (skip_one_die): Handle DW_FORM_implicit_const.
15556         (dwarf2_rnglists_process): New function.
15557         (dwarf2_ranges_process): Call dwarf2_rnglists_process for DWARF-5.
15558         (abbrev_table_read_table): Handle DW_FORM_implicit_const.
15559         (read_attribute_value): Handle DW_FORM_implicit_const,
15560         DW_FORM_line_strp.
15561         (read_attribute): Handle DW_FORM_implicit_const.
15562         (read_indirect_string_at_offset_from): New function from
15563         read_indirect_string_at_offset.
15564         (read_indirect_string_at_offset): Call
15565         read_indirect_string_at_offset_from.
15566         (read_indirect_line_string_at_offset): New function.
15567         (read_indirect_string): New function comment.
15568         (read_indirect_line_string): New function.
15569         (read_unsigned_leb128): Make it global.
15570         (dwarf2_string_attr): Handle DWARF-5.
15571         (add_include_dir_stub, read_formatted_entries): New functions.
15572         (dwarf_decode_line_header, dump_die_shallow, cu_debug_loc_section):
15573         Handle DWARF-5.
15574         (per_cu_header_read_in): Update read_comp_unit_head caller.
15575         (dwarf2_version): New function.
15576         * symfile.h (struct dwarf2_debug_sections): Add loclists, line_str and
15577         rnglists.
15578         * xcoffread.c (dwarf2_xcoff_names): Update struct dwarf2_debug_sections
15579         fields.
15580
15581 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
15582
15583         * dwarf2read.c (abbrev_table_read_table): Read the data only once.
15584
15585 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
15586
15587         * dwarf2read.c (dwarf2_ranges_process): New function from
15588         dwarf2_ranges_read.
15589         (dwarf2_ranges_read, dwarf2_record_block_ranges): Use
15590         dwarf2_ranges_process.
15591
15592 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
15593
15594         * dwarf2read.c (create_debug_type_hash_table): New function from
15595         create_debug_types_hash_table.
15596         (create_debug_types_hash_table): Call create_debug_type_hash_table.
15597         (create_all_type_units, open_and_init_dwo_file): Update
15598         create_debug_types_hash_table callers.
15599
15600 2017-02-20  Sergio Durigan Junior  <sergiodj@redhat.com>
15601
15602         PR gdb/16188
15603         * fork-child.c (trace_start_error): Fix thinko.  va_end should
15604         refer to 'ap', not 'args'.
15605
15606 2017-02-20  Sergio Durigan Junior  <sergiodj@redhat.com>
15607             Pedro Alves  <palves@redhat.com>
15608
15609         PR gdb/16188
15610         * darwin-nat.c (darwin_ptrace_me): Check if calls to system
15611         calls succeeded.
15612         * fork-child.c (trace_start_error): New function.
15613         (trace_start_error_with_name): Likewise.
15614         * gnu-nat.c (gnu_ptrace_me): Check if call to PTRACE succeeded.
15615         * inf-ptrace.c (inf_ptrace_me): Likewise.
15616         * inferior.h (trace_start_error): New prototype.
15617         (trace_start_error_with_name): Likewise.
15618
15619 2017-02-15  Sergio Durigan Junior  <sergiodj@redhat.com>
15620
15621         PR gdb/21164
15622         * psymtab.c (maintenance_print_psymbols): Verify if 'argv' is not
15623         NULL before using it.
15624         * symmisc.c (maintenance_print_symbols): Likewise.
15625         (maintenance_print_msymbols): Likewise.
15626
15627 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
15628
15629         * NEWS: Add record Python bindings entry.
15630
15631 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
15632
15633         * Makefile.in (SUBDIR_PYTHON_OBS): Add py-record-btrace.o,
15634         py-record-full.o.
15635         (SUBDIR_PYTHON_SRCS): Add py-record-btrace.c, py-record-full.c.
15636         * python/py-record-btrace.c, python/py-record-btrace.h,
15637         python/py-record-full.c, python/py-record-full.h: New file.
15638         * python/py-record.c: Add include for py-record-btrace.h and
15639         py-record-full.h.
15640         (recpy_method, recpy_format, recpy_goto, recpy_replay_position,
15641         recpy_instruction_history, recpy_function_call_history, recpy_begin,
15642         recpy_end): Use functions from py-record-btrace.c and py-record-full.c.
15643         * python/python-internal.h (PyInt_FromSsize_t, PyInt_AsSsize_t):
15644         New definition.
15645         (gdbpy_initialize_btrace): New export.
15646         * python/python.c (_initialize_python): Add gdbpy_initialize_btrace.
15647
15648 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
15649
15650         * Makefile.in (SUBDIR_PYTHON_OBS): Add python/py-record.o.
15651         (SUBDIR_PYTHON_SRCS): Add python/py-record.c.
15652         * python/py-record.c: New file.
15653         * python/python-internal.h (gdbpy_start_recording,
15654         gdbpy_current_recording, gdpy_stop_recording,
15655         gdbpy_initialize_record): New export.
15656         * python/python.c (_initialize_python): Add gdbpy_initialize_record.
15657         (python_GdbMethods): Add gdbpy_start_recording,
15658         gdbpy_current_recording and gdbpy_stop_recording.
15659
15660 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
15661
15662         * record-btrace.c (record_btrace_record_method): New function.
15663         (init_record_btrace_ops): Initialize to_record_method.
15664         * record-full.c (record_full_record_method): New function.
15665         (init_record_full_ops, init_record_full_core_ops): Add
15666         record_full_record_method.
15667         * record.h (enum record_method): New enum.
15668         * target-debug.h (target_debug_print_enum_record_method: New define.
15669         * target-delegates.c: Regenerate.
15670         * target.c (target_record_method): New function.
15671         * target.h: Include record.h.
15672         (struct target_ops) <to_record_method>: New field.
15673         (target_record_method): New export.
15674
15675 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
15676
15677         * record.h (record_start, record_stop): New export.
15678         * record.c (record_start, record_stop): New function.
15679
15680 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
15681
15682         * btrace.c (btrace_fetch): Copy function call segments pointer
15683         into a vector.
15684         (btrace_clear): Clear the vector.
15685         (btrace_find_insn_by_number): Use binary search to find the correct
15686         function call segment.
15687         * btrace.h (brace_fun_p): New typedef.
15688         (struct btrace_thread_info) <functions>: New field.
15689
15690 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
15691
15692         * record-btrace.c (btrace_ui_out_decode_error): Move most of it ...
15693         * btrace.c (btrace_decode_error): ... here.  New function.
15694         * btrace.h (btrace_decode_error): New export.
15695
15696 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
15697
15698         * btrace.c (ftrace_call_num_insn, btrace_insn_get_error): New function.
15699         (ftrace_new_function, btrace_insn_number, btrace_insn_cmp,
15700         btrace_find_insn_by_number): Remove special case for gaps.
15701         * btrace.h (btrace_insn_get_error): New export.
15702         (btrace_insn_number, btrace_find_insn_by_number): Adjust comment.
15703         * record-btrace.c (btrace_insn_history): Print number for gaps.
15704         (record_btrace_info, record_btrace_goto): Handle gaps.
15705
15706 2017-02-14  Tom Tromey  <tom@tromey.com>
15707
15708         PR python/13598:
15709         * python/python.c (gdbpy_before_prompt_hook): Emit before_prompt
15710         event.
15711         * python/py-evts.c (gdbpy_initialize_py_events): Add
15712         before_prompt registry.
15713         * python/py-events.h (events_object) <before_prompt>: New field.
15714
15715 2017-02-14  Markus Metzger  <markus.t.metzger@intel.com>
15716
15717         * btrace.c (ftrace_new_switch): Preserve up link and flags.
15718
15719 2017-02-13  Luis Machado  <lgustavo@codesourcery.com>
15720
15721         * symfile (_initialize_symfile): Add usage text to the load command's
15722         help text.
15723
15724 2017-02-10  Simon Marchi  <simon.marchi@ericsson.com>
15725
15726         * utils.c (defaulted_query): Don't query on secondary UIs.
15727
15728 2017-02-10  Tom Tromey  <tom@tromey.com>
15729
15730         * rust-lang.c (rust_get_disr_info): Remove unused variable.
15731
15732 2017-02-10  Tom Tromey  <tom@tromey.com>
15733
15734         * python/py-value.c (valpy_richcompare_throw): Remove unnecessary
15735         "cleanup" local.
15736         * python/py-type.c (typy_legacy_template_argument): Remove
15737         unnecessary "cleanup" local.
15738
15739 2017-02-10  Tom Tromey  <tom@tromey.com>
15740
15741         * python/python.c (do_start_initialization): New function, from
15742         _initialize_python.
15743         (_initialize_python): Call do_start_initialization.
15744         * python/py-linetable.c (ltpy_iternext): Use explicit returns, not
15745         goto.
15746
15747 2017-02-10  Tom Tromey  <tom@tromey.com>
15748
15749         * python/py-prettyprint.c (pretty_print_one_value): Use
15750         gdbpy_ref.
15751
15752 2017-02-10  Tom Tromey  <tom@tromey.com>
15753
15754         * python/py-cmd.c (cmdpy_destroyer): Use gdbpy_ref.
15755         * python/py-breakpoint.c (gdbpy_breakpoint_deleted): Use
15756         gdbpy_ref.
15757         * python/py-type.c (field_new): Use gdbpy_ref.
15758         * python/py-symtab.c (symtab_and_line_to_sal_object): Use
15759         gdbpy_ref.
15760         * python/py-progspace.c (pspy_new): Use gdbpy_ref.
15761         (py_free_pspace): Likewise.
15762         (pspace_to_pspace_object): Likewise.
15763         * python/py-objfile.c (objfpy_new): Use gdbpy_ref.
15764         (py_free_objfile): Likewise.
15765         (objfile_to_objfile_object): Likewise.
15766         * python/py-inferior.c (delete_thread_object): Use
15767         gdbpy_ref.
15768         (infpy_read_memory): Likewise.
15769         (py_free_inferior): Likewise.
15770         * python/py-evtregistry.c (create_eventregistry_object): Use
15771         gdbpy_ref.
15772         * python/py-event.c (create_event_object): Use gdbpy_ref.
15773
15774 2017-02-10  Tom Tromey  <tom@tromey.com>
15775
15776         * python/py-ref.h (gdbpy_ref_policy): Now a template.
15777         (gdbpy_ref): Now a template; allow subclasses of PyObject to be
15778         used.
15779         * python/py-arch.c, python/py-bpevent.c, python/py-breakpoint.c,
15780         python/py-cmd.c, python/py-continueevent.c, python/py-event.c,
15781         python/py-exitedevent.c, python/py-finishbreakpoint.c,
15782         python/py-framefilter.c, python/py-function.c,
15783         python/py-inferior.c, python/py-infevents.c,
15784         python/py-linetable.c, python/py-newobjfileevent.c,
15785         python/py-param.c, python/py-prettyprint.c, python/py-ref.h,
15786         python/py-signalevent.c, python/py-stopevent.c,
15787         python/py-symbol.c, python/py-threadevent.c, python/py-type.c,
15788         python/py-unwind.c, python/py-utils.c, python/py-value.c,
15789         python/py-varobj.c, python/py-xmethods.c, python/python.c,
15790         varobj.c: Change gdbpy_ref to gdbpy_ref<>.
15791
15792 2017-02-10  Tom Tromey  <tom@tromey.com>
15793
15794         * ui-out.h (ui_out_emit_type): New class.
15795         (ui_out_emit_tuple, ui_out_emit_list): New typedefs.
15796         * python/py-framefilter.c (py_print_single_arg): Use gdb::optional
15797         and ui_out_emit_tuple.
15798         (enumerate_locals): Likewise.
15799         (py_mi_print_variables, py_print_locals, py_print_args): Use
15800         ui_out_emit_list.
15801         (py_print_frame): Use gdb::optional, ui_out_emit_tuple,
15802         ui_out_emit_list.
15803         * common/gdb_optional.h: New file.
15804
15805 2017-02-10  Martin Galvan  <martingalvan@sourceware.org>
15806
15807         * MAINTAINERS (Write After Approval): Update my e-mail address.
15808
15809 2017-02-10  Martin Galvan  <martingalvan@sourceware.org>
15810
15811         PR gdb/21122
15812         * breakpoint.c (_initialize_breakpoint): Update the help description
15813         of the 'commands' command to indicate that it takes a list argument.
15814
15815 2017-02-09  Simon Marchi  <simon.marchi@ericsson.com>
15816
15817         * interps.c (current_interp_set_logging): Remove "return".
15818
15819 2017-02-09  Gary Benson  <gbenson@redhat.com>
15820
15821         * symtab.c (add_symtab_completions): Prevent NULL pointer
15822         dereference.
15823
15824 2017-02-08  Pedro Alves  <palves@redhat.com>
15825
15826         * interps.c (interp::interp): Remove reference to quiet_p.
15827         (interp_set): Make static.  Remove dead "Switching to" output
15828         code.
15829         (interp_quiet_p, interp_set_quiet): Delete.
15830         (interpreter_exec_cmd): Don't set the interpreter quiet.
15831         * interps.h (interp_quiet_p): Make static.
15832         (class interp) <quiet_p>: Remove field
15833
15834 2017-02-08  Jerome Guitton  <guitton@adacore.com>
15835
15836         * cli/cli-decode.c (find_command_name_length): Make it extern.
15837         * cli/cli-decode.h (find_command_name_length): Declare.
15838         * cli/cli-script.c (command_name_equals, line_first_arg):
15839         New functions.
15840         (process_next_line): Use cli-decode to parse command names.
15841         (build_command_line): Make args a constant pointer.
15842
15843 2017-02-08  Jerome Guitton  <guitton@adacore.com>
15844
15845         * cli-decode.c (lookup_cmd_1, lookup_cmd_composition):
15846         Remove case-insensitive search.
15847
15848 2017-02-07  Jose E. Marchesi  <jose.marchesi@oracle.com>
15849
15850         * sparc-tdep.c (sparc32_gdbarch_init): Do not place a + operator
15851         at the end of the line.  Avoids an ARI warning.
15852
15853 2017-02-06  Luis Machado  <lgustavo@codesourcery.com>
15854
15855         * NEWS: Mention support for record/replay of Intel 64 rdrand and
15856         rdseed instructions.
15857         i386-tdep.c (i386_process_record): Handle Intel 64 rdrand and rseed.
15858
15859 2017-02-06  Ivo Raisr  <ivo.raisr@oracle.com>
15860
15861         PR tdep/20936
15862         Provide and use sparc32 and sparc64 target description XML files.
15863         * features/sparc/sparc32-cp0.xml, features/sparc/sparc32-cpu.xml,
15864         features/sparc/sparc32-fpu.xml: New files for sparc 32-bit.
15865         * features/sparc/sparc64-cp0.xml, features/sparc/sparc64-cpu.xml,
15866         features/sparc/sparc64-fpu.xml: New files for sparc 64-bit.
15867         * features/sparc/sparc32-solaris.xml: New file.
15868         * features/sparc/sparc64-solaris.xml: New file.
15869         * features/sparc/sparc32-solaris.c: Generated.
15870         * features/sparc/sparc64-solaris.c: Generated.
15871         * sparc-tdep.h: Account for differences in target descriptions.
15872         * sparc-tdep.c (sparc32_register_name): Use target provided registers.
15873         (sparc32_register_type): Use target provided registers.
15874         (validate_tdesc_registers): New function.
15875         (sparc32_gdbarch_init): Use tdesc_has_registers.
15876         Set pseudoregister functions.
15877         * sparc64-tdep.c (sparc64_register_name): Use target provided registers.
15878         (sparc64_register_type): Use target provided registers.
15879         (sparc64_init_abi): Set pseudoregister functions.
15880
15881 2017-02-03  Tom Tromey  <tom@tromey.com>
15882
15883         PR rust/21097:
15884         * rust-lang.c (rust_print_type) <TYPE_CODE_UNION>: Handle enums
15885         with a single member.
15886
15887 2017-02-03  Pedro Alves  <palves@redhat.com>
15888
15889         * cli/cli-interp.c (cli_interp_base::cli_interp_base)
15890         (cli_interp_base::~cli_interp_base): New.
15891         (cli_interp): New struct.
15892         (as_cli_interp): Cast the interp itself to cli_interp.
15893         (cli_interpreter_pre_command_loop): Rename to ...
15894         (cli_interp_base::pre_command_loop): ... this.  Remove 'self'
15895         parameter.
15896         (cli_interpreter_init): Rename to ...
15897         (cli_interp::init): ... this.  Remove 'self' parameter.  Use
15898         boolean.  Make extern.
15899         (cli_interpreter_resume): Rename to ...
15900         (cli_interp::resume): ... this.  Remove 'data' parameter.  Make
15901         extern.
15902         (cli_interpreter_suspend): Rename to ...
15903         (cli_interp::suspend): ... this.  Remove 'data' parameter.  Make
15904         extern.
15905         (cli_interpreter_exec): Rename to ...
15906         (cli_interp::exec): ... this.  Remove 'data' parameter.  Make
15907         extern.
15908         (cli_interpreter_supports_command_editing): Rename to ...
15909         (cli_interp_base::supports_command_editing): ... this.  Remove
15910         'interp' parameter.  Make extern.
15911         (cli_ui_out): Rename to ...
15912         (cli_interp::interp_ui_out): ... this.  Remove 'interp' parameter.
15913         Make extern.
15914         (cli_set_logging): Rename to ...
15915         (cli_interp_base::set_logging): ... this.  Remove 'interp'
15916         parameter.  Make extern.
15917         (cli_interp_procs): Delete.
15918         (cli_interp_factory): Adjust to use "new".
15919         * cli/cli-interp.h: Include "interps.h".
15920         (struct cli_interp_base): New struct.
15921         * interps.c (struct interp): Delete.  Fields moved to interps.h.
15922         (interp_new): Delete.
15923         (interp::interp, interp::~interp): New.
15924         (interp_set): Use bool, and return void.  Assume the interpreter
15925         has suspend, init and resume methods, and that the all return
15926         void.
15927         (set_top_level_interpreter): interp_set returns void.
15928         (interp_ui_out): Adapt.
15929         (current_interp_set_logging): Adapt.
15930         (interp_data): Delete.
15931         (interp_pre_command_loop, interp_supports_command_editing): Adapt.
15932         (interp_exec): Adapt.
15933         (top_level_interpreter_data): Delete.
15934         * interps.h (interp_init_ftype, interp_resume_ftype)
15935         (interp_suspend_ftype, interp_exec_ftype)
15936         (interp_pre_command_loop_ftype, interp_ui_out_ftype): Delete.
15937         (class interp): New.
15938         (interp_new): Delete.
15939         (interp_set): Now returns void.  Use bool.
15940         (interp_data, top_level_interpreter_data): Delete.
15941         * mi/mi-common.h: Include interps.h.
15942         (class mi_interp): Inherit from interp.  Define a ctor.  Declare
15943         init, resume, suspect, exec, interp_ui_out, set_logging and
15944         pre_command_loop methods.
15945         * mi/mi-interp.c (as_mi_interp): Cast the interp itself.
15946         (mi_interpreter_init): Rename to ...
15947         (mi_interp::init): ... this.  Remove the 'interp' parameter, use
15948         bool, return void and make extern.  Adjust.
15949         (mi_interpreter_resume): ... Rename to ...
15950         (mi_interp::resume): ... this.  Remove the 'data' parameter,
15951         return void and make extern.  Adjust.
15952         (mi_interpreter_suspend): ... Rename to ...
15953         (mi_interp::suspend): ... this.  Remove the 'data' parameter,
15954         return void and make extern.  Adjust.
15955         (mi_interpreter_exec): ... Rename to ...
15956         (mi_interp::exec): ... this.  Remove the 'data' parameter and make
15957         extern.  Adjust.
15958         (mi_interpreter_pre_command_loop): ... Rename to ...
15959         (mi_interp::pre_command_loop): ... this.  Remove the 'self'
15960         parameter and make extern.
15961         (mi_on_normal_stop_1): Adjust.
15962         (mi_ui_out): Rename to ...
15963         (mi_interp::interp_ui_out): ... this.  Remove the 'interp'
15964         parameter and make extern.  Adjust.
15965         (mi_set_logging): Rename to ...
15966         (mi_interp::set_logging): ... this.  Remove the 'interp'
15967         parameter and make extern.  Adjust.
15968         (mi_interp_procs): Delete.
15969         (mi_interp_factory): Adjust to use 'new'.
15970         * mi/mi-main.c (mi_cmd_gdb_exit, captured_mi_execute_command)
15971         (mi_print_exception, mi_execute_command, mi_load_progress):
15972         Adjust.
15973         * tui/tui-interp.c (tui_interp): New class.
15974         (as_tui_interp): Return a tui_interp pointer.
15975         (tui_on_normal_stop, tui_on_signal_received)
15976         (tui_on_end_stepping_range, tui_on_signal_exited, tui_on_exited)
15977         (tui_on_no_history, tui_on_user_selected_context_changed): Adjust
15978         to use interp::interp_ui_out.
15979         (tui_init): Rename to ...
15980         (tui_interp::init): ... this.  Remove the 'self' parameter, use
15981         bool, return void and make extern.  Adjust.
15982         (tui_resume): Rename to ...
15983         (tui_interp::resume): ... this.  Remove the 'data' parameter,
15984         return void and make extern.  Adjust.
15985         (tui_suspend): Rename to ...
15986         (tui_interp::suspend): ... this.  Remove the 'data' parameter,
15987         return void and make extern.  Adjust.
15988         (tui_ui_out): Rename to ...
15989         (tui_interp::interp_ui_out): ... this.  Remove the 'self'
15990         parameter, and make extern.  Adjust.
15991         (tui_exec): Rename to ...
15992         (tui_interp::exec): ... this.  Remove the 'data' parameter and
15993         make extern.
15994         (tui_interp_procs): Delete.
15995         (tui_interp_factory): Use "new".
15996
15997 2017-02-02  Tom Tromey  <tom@tromey.com>
15998
15999         * rust-exp.y (ends_raw_string, space_then_number)
16000         (rust_identifier_start_p): Return bool.
16001         * rust-lang.c (rust_tuple_type_p, rust_underscore_fields)
16002         (rust_tuple_struct_type_p, rust_tuple_variant_type_p)
16003         (rust_slice_type_p, rust_range_type_p, rust_u8_type_p)
16004         (rust_chartype_p): Return bool.
16005         (val_print_struct, rust_print_struct_def, rust_print_type):
16006         Update.
16007         * rust-lang.h (rust_tuple_type_p, rust_tuple_struct_type_p):
16008         Return bool.
16009
16010 2017-02-02  Tom Tromey  <tom@tromey.com>
16011
16012         * rust-lang.c: Reindent.
16013
16014 2017-02-02  Tom Tromey  <tom@tromey.com>
16015
16016         * rust-lang.h (rust_crate_for_block): Update.
16017         * rust-lang.c (rust_crate_for_block): Return std::string.
16018         (rust_get_disr_info): Use std:;string, not
16019         gdb::unique_xmalloc_ptr.
16020         * rust-exp.y (crate_name): Update.
16021
16022 2017-02-02  Pedro Alves  <palves@redhat.com>
16023
16024         * disasm-selftests.c (print_one_insn_test): Move the "verbose"
16025         field out of gdb_disassembler_test and make it static.
16026
16027 2017-02-02  Pedro Alves  <palves@redhat.com>
16028
16029         * mi/mi-common.h (struct mi_interp): Delete the mi2_interp,
16030         mi1_interp and mi_interp fields.
16031
16032 2017-02-02  Pedro Alves  <palves@redhat.com>
16033
16034         * cli/cli-interp.c (struct saved_output_files, saved_output):
16035         Moved from cli/cli-logging.c.
16036         (cli_set_logging): New function.
16037         (cli_interp_procs): Install cli_set_logging.
16038         * cli/cli-interp.h (make_logging_output, cli_set_logging):
16039         Declare.
16040         * cli/cli-logging.c (struct saved_output_files, saved_output):
16041         Moved to cli/cli-interp.c.
16042         (pop_output_files): Don't save outputs here.
16043         (make_logging_output): New function.
16044         (handle_redirections): Don't build tee nor save previous outputs
16045         here.
16046         * interps.c (current_interp_set_logging): Change prototype.
16047         Assume there's always a set_logging_proc method installed.
16048         * interps.h (interp_set_logging_ftype): Change prototype.
16049         (current_interp_set_logging): Change prototype and adjust comment.
16050         * mi/mi-interp.c (mi_set_logging): Change protototype.  Adjust to
16051         use make_logging_output.
16052         * tui/tui-interp.c (tui_interp_procs): Install cli_set_logging.
16053 2017-02-02  Pedro Alves  <palves@redhat.com>
16054
16055         * cli/cli-logging.c (maybe_warn_already_logging): New factored out
16056         from ...
16057         (set_logging_overwrite): ... here.
16058         (logging_no_redirect_file): Delete.
16059         (set_logging_redirect): Don't handle redirection on the fly.
16060         Instead warn that "logging off" / "logging on" is necessary.
16061         (pop_output_files): Delete references to logging_no_redirect_file.
16062         (show_logging_command): Always speak in terms of what will happen
16063         once logging is reenabled.
16064
16065 2017-02-02  Pedro Alves  <palves@redhat.com>
16066
16067         * disasm.h (gdb_pretty_print_disassembler): Tweak intro comment.
16068
16069 2017-02-02  Pedro Alves  <palves@redhat.com>
16070
16071         * disasm.c (gdb_pretty_print_insn): Rename to ...
16072         (gdb_pretty_print_disassembler::pretty_print_insn): ... this.
16073         Remove gdbarch parameter.  Adapt to clear the object's buffers
16074         instead of allocating new buffers, and to print using the object's
16075         gdb_disassembler instead of calling gdb_print_insn.
16076         (dump_insns): Use gdb_pretty_print_disassembler.
16077         * disasm.h (gdb_pretty_print_insn): Delete declaration.
16078         (gdb_pretty_print_disassembler): New class.
16079         * record-btrace.c (btrace_insn_history): Use
16080         gdb_pretty_print_disassembler.
16081
16082 2017-02-02  Pedro Alves  <palves@redhat.com>
16083
16084         * ada-lang.c (type_as_string): Use string_file.
16085         * ada-valprint.c (ada_print_floating): Use string_file.
16086         * ada-varobj.c (ada_varobj_scalar_image)
16087         (ada_varobj_get_value_image): Use string_file.
16088         * aix-thread.c (aix_thread_extra_thread_info): Use string_file.
16089         * arm-tdep.c (_initialize_arm_tdep): Use string_printf.
16090         * breakpoint.c (update_inserted_breakpoint_locations)
16091         (insert_breakpoint_locations, reattach_breakpoints)
16092         (print_breakpoint_location, print_one_detail_ranged_breakpoint)
16093         (print_it_watchpoint): Use string_file.
16094         (save_breakpoints): Use stdio_file.
16095         * c-exp.y (oper): Use string_file.
16096         * cli/cli-logging.c (set_logging_redirect): Use ui_file_up and
16097         tee_file.
16098         (pop_output_files): Use delete.
16099         (handle_redirections): Use stdio_file and tee_file.
16100         * cli/cli-setshow.c (do_show_command): Use string_file.
16101         * compile/compile-c-support.c (c_compute_program): Use
16102         string_file.
16103         * compile/compile-c-symbols.c (generate_vla_size): Take a
16104         'string_file &' instead of a 'ui_file *'.
16105         (generate_c_for_for_one_variable): Take a 'string_file &' instead
16106         of a 'ui_file *'.  Use string_file.
16107         (generate_c_for_variable_locations): Take a 'string_file &'
16108         instead of a 'ui_file *'.
16109         * compile/compile-internal.h (generate_c_for_for_one_variable):
16110         Take a 'string_file &' instead of a 'ui_file *'.
16111         * compile/compile-loc2c.c (push, pushf, unary, binary)
16112         (print_label, pushf_register_address, pushf_register)
16113         (do_compile_dwarf_expr_to_c): Take a 'string_file &' instead of a
16114         'ui_file *'.  Adjust.
16115         * compile/compile.c (compile_to_object): Use string_file.
16116         * compile/compile.h (compile_dwarf_expr_to_c)
16117         (compile_dwarf_bounds_to_c): Take a 'string_file &' instead of a
16118         'ui_file *'.
16119         * cp-support.c (inspect_type): Use string_file and obstack_copy0.
16120         (replace_typedefs_qualified_name): Use string_file and
16121         obstack_copy0.
16122         * disasm.c (gdb_pretty_print_insn): Use string_file.
16123         (gdb_disassembly): Adjust reference the null_stream global.
16124         (do_ui_file_delete): Delete.
16125         (gdb_insn_length): Use null_stream.
16126         * dummy-frame.c (maintenance_print_dummy_frames): Use stdio_file.
16127         * dwarf2loc.c (dwarf2_compile_property_to_c)
16128         (locexpr_generate_c_location, loclist_generate_c_location): Take a
16129         'string_file &' instead of a 'ui_file *'.
16130         * dwarf2loc.h (dwarf2_compile_property_to_c): Likewise.
16131         * dwarf2read.c (do_ui_file_peek_last): Delete.
16132         (dwarf2_compute_name): Use string_file.
16133         * event-top.c (gdb_setup_readline): Use stdio_file.
16134         * gdbarch.sh (verify_gdbarch): Use string_file.
16135         * gdbtypes.c (safe_parse_type): Use null_stream.
16136         * guile/scm-breakpoint.c (gdbscm_breakpoint_commands): Use
16137         string_file.
16138         * guile/scm-disasm.c (gdbscm_print_insn_from_port): Take a
16139         'string_file *' instead of a 'ui_file *'.
16140         (gdbscm_arch_disassemble): Use string_file.
16141         * guile/scm-frame.c (frscm_print_frame_smob): Use string_file.
16142         * guile/scm-ports.c (class ioscm_file_port): Now a class that
16143         inherits from ui_file.
16144         (ioscm_file_port_delete, ioscm_file_port_rewind)
16145         (ioscm_file_port_put): Delete.
16146         (ioscm_file_port_write): Rename to ...
16147         (ioscm_file_port::write): ... this.  Remove file_port_magic
16148         checks.
16149         (ioscm_file_port_new): Delete.
16150         (ioscm_with_output_to_port_worker): Use ioscm_file_port and
16151         ui_file_up.
16152         * guile/scm-type.c (tyscm_type_name): Use string_file.
16153         * guile/scm-value.c (vlscm_print_value_smob, gdbscm_value_print):
16154         Use string_file.
16155         * infcmd.c (print_return_value_1): Use string_file.
16156         * infrun.c (print_target_wait_results): Use string_file.
16157         * language.c (add_language): Use string_file.
16158         * location.c (explicit_to_string_internal): Use string_file.
16159         * main.c (captured_main_1): Use null_file.
16160         * maint.c (maintenance_print_architecture): Use stdio_file.
16161         * mi/mi-cmd-stack.c (list_arg_or_local): Use string_file.
16162         * mi/mi-common.h (struct mi_interp) <out, err, log, targ,
16163         event_channel>: Change type to mi_console_file pointer.
16164         * mi/mi-console.c (mi_console_file_fputs, mi_console_file_flush)
16165         (mi_console_file_delete): Delete.
16166         (struct mi_console_file): Delete.
16167         (mi_console_file_magic): Delete.
16168         (mi_console_file_new): Delete.
16169         (mi_console_file::mi_console_file): New.
16170         (mi_console_file_delete): Delete.
16171         (mi_console_file_fputs): Delete.
16172         (mi_console_file::write): New.
16173         (mi_console_raw_packet): Delete.
16174         (mi_console_file::flush): New.
16175         (mi_console_file_flush): Delete.
16176         (mi_console_set_raw): Rename to ...
16177         (mi_console_file::set_raw): ... this.
16178         * mi/mi-console.h (class mi_console_file): New class.
16179         (mi_console_file_new, mi_console_set_raw): Delete.
16180         * mi/mi-interp.c (mi_interpreter_init): Use mi_console_file.
16181         (mi_set_logging): Use delete and tee_file.  Adjust.
16182         * mi/mi-main.c (output_register): Use string_file.
16183         (mi_cmd_data_evaluate_expression): Use string_file.
16184         (mi_cmd_data_read_memory): Use string_file.
16185         (mi_cmd_execute, print_variable_or_computed): Use string_file.
16186         * mi/mi-out.c (mi_ui_out::main_stream): New.
16187         (mi_ui_out::rewind): Use main_stream and
16188         string_file.
16189         (mi_ui_out::put): Use main_stream and string_file.
16190         (mi_ui_out::mi_ui_out): Remove 'stream' parameter.
16191         Allocate a 'string_file' instead.
16192         (mi_out_new): Don't allocate a mem_fileopen stream here.
16193         * mi/mi-out.h (mi_ui_out::mi_ui_out): Remove 'stream' parameter.
16194         (mi_ui_out::main_stream): Declare method.
16195         * printcmd.c (eval_command): Use string_file.
16196         * psymtab.c (maintenance_print_psymbols): Use stdio_file.
16197         * python/py-arch.c (archpy_disassemble): Use string_file.
16198         * python/py-breakpoint.c (bppy_get_commands): Use string_file.
16199         * python/py-frame.c (frapy_str): Use string_file.
16200         * python/py-framefilter.c (py_print_type, py_print_single_arg):
16201         Use string_file.
16202         * python/py-type.c (typy_str): Use string_file.
16203         * python/py-unwind.c (unwind_infopy_str): Use string_file.
16204         * python/py-value.c (valpy_str): Use string_file.
16205         * record-btrace.c (btrace_insn_history): Use string_file.
16206         * regcache.c (regcache_print): Use stdio_file.
16207         * reggroups.c (maintenance_print_reggroups): Use stdio_file.
16208         * remote.c (escape_buffer): Use string_file.
16209         * rust-lang.c (rust_get_disr_info): Use string_file.
16210         * serial.c (serial_open_ops_1): Use stdio_file.
16211         (do_serial_close): Use delete.
16212         * stack.c (print_frame_arg): Use string_file.
16213         (print_frame_args): Remove local mem_fileopen stream, not used.
16214         (print_frame): Use string_file.
16215         * symmisc.c (maintenance_print_symbols): Use stdio_file.
16216         * symtab.h (struct symbol_computed_ops) <generate_c_location>:
16217         Take a 'string_file *' instead of a 'ui_file *'.
16218         * top.c (new_ui): Use stdio_file and stderr_file.
16219         (free_ui): Use delete.
16220         (execute_command_to_string): Use string_file.
16221         (quit_confirm): Use string_file.
16222         * tracepoint.c (collection_list::append_exp): Use string_file.
16223         * tui/tui-disasm.c (tui_disassemble): Use string_file.
16224         * tui/tui-file.c: Don't include "ui-file.h".
16225         (enum streamtype, struct tui_stream): Delete.
16226         (tui_file_new, tui_file_delete, tui_fileopen, tui_sfileopen)
16227         (tui_file_isatty, tui_file_rewind, tui_file_put): Delete.
16228         (tui_file::tui_file): New method.
16229         (tui_file_fputs): Delete.
16230         (tui_file_get_strbuf): Delete.
16231         (tui_file::puts): New method.
16232         (tui_file_adjust_strbuf): Delete.
16233         (tui_file_flush): Delete.
16234         (tui_file::flush): New method.
16235         * tui/tui-file.h: Tweak intro comment.
16236         Include ui-file.h.
16237         (tui_fileopen, tui_sfileopen, tui_file_get_strbuf)
16238         (tui_file_adjust_strbuf): Delete declarations.
16239         (class tui_file): New class.
16240         * tui/tui-io.c (tui_initialize_io): Use tui_file.
16241         * tui/tui-regs.c (tui_restore_gdbout): Use delete.
16242         (tui_register_format): Use string_stream.
16243         * tui/tui-stack.c (tui_make_status_line): Use string_file.
16244         (tui_get_function_from_frame): Use string_file.
16245         * typeprint.c (type_to_string): Use string_file.
16246         * ui-file.c (struct ui_file, ui_file_magic, ui_file_new): Delete.
16247         (null_stream): New global.
16248         (ui_file_delete): Delete.
16249         (ui_file::ui_file): New.
16250         (null_file_isatty): Delete.
16251         (ui_file::~ui_file): New.
16252         (null_file_rewind): Delete.
16253         (ui_file::printf): New.
16254         (null_file_put): Delete.
16255         (null_file_flush): Delete.
16256         (ui_file::putstr): New.
16257         (null_file_write): Delete.
16258         (ui_file::putstrn): New.
16259         (null_file_read): Delete.
16260         (ui_file::putc): New.
16261         (null_file_fputs): Delete.
16262         (null_file_write_async_safe): Delete.
16263         (ui_file::vprintf): New.
16264         (null_file_delete): Delete.
16265         (null_file::write): New.
16266         (null_file_fseek): Delete.
16267         (null_file::puts): New.
16268         (ui_file_data): Delete.
16269         (null_file::write_async_safe): New.
16270         (gdb_flush, ui_file_isatty): Adjust.
16271         (ui_file_put, ui_file_rewind): Delete.
16272         (ui_file_write): Adjust.
16273         (ui_file_write_for_put): Delete.
16274         (ui_file_write_async_safe, ui_file_read): Adjust.
16275         (ui_file_fseek): Delete.
16276         (fputs_unfiltered): Adjust.
16277         (set_ui_file_flush, set_ui_file_isatty, set_ui_file_rewind)
16278         (set_ui_file_put, set_ui_file_write, set_ui_file_write_async_safe)
16279         (set_ui_file_read, set_ui_file_fputs, set_ui_file_fseek)
16280         (set_ui_file_data): Delete.
16281         (string_file::~string_file, string_file::write)
16282         (struct accumulated_ui_file, do_ui_file_xstrdup, ui_file_xstrdup)
16283         (do_ui_file_as_string, ui_file_as_string): Delete.
16284         (do_ui_file_obsavestring, ui_file_obsavestring): Delete.
16285         (struct mem_file): Delete.
16286         (mem_file_new): Delete.
16287         (stdio_file::stdio_file): New.
16288         (mem_file_delete): Delete.
16289         (stdio_file::stdio_file): New.
16290         (mem_fileopen): Delete.
16291         (stdio_file::~stdio_file): New.
16292         (mem_file_rewind): Delete.
16293         (stdio_file::set_stream): New.
16294         (mem_file_put): Delete.
16295         (stdio_file::open): New.
16296         (mem_file_write): Delete.
16297         (stdio_file_magic, struct stdio_file): Delete.
16298         (stdio_file_new, stdio_file_delete, stdio_file_flush): Delete.
16299         (stdio_file::flush): New.
16300         (stdio_file_read): Rename to ...
16301         (stdio_file::read): ... this.  Adjust.
16302         (stdio_file_write): Rename to ...
16303         (stdio_file::write): ... this.  Adjust.
16304         (stdio_file_write_async_safe): Rename to ...
16305         (stdio_file::write_async_safe) ... this.  Adjust.
16306         (stdio_file_fputs): Rename to ...
16307         (stdio_file::puts) ... this.  Adjust.
16308         (stdio_file_isatty): Delete.
16309         (stdio_file_fseek): Delete.
16310         (stdio_file::isatty): New.
16311         (stderr_file_write): Rename to ...
16312         (stderr_file::write) ... this.  Adjust.
16313         (stderr_file_fputs): Rename to ...
16314         (stderr_file::puts) ... this.  Adjust.
16315         (stderr_fileopen, stdio_fileopen, gdb_fopen): Delete.
16316         (stderr_file::stderr_file): New.
16317         (tee_file_magic): Delete.
16318         (struct tee_file): Delete.
16319         (tee_file::tee_file): New.
16320         (tee_file_new): Delete.
16321         (tee_file::~tee_file): New.
16322         (tee_file_delete): Delete.
16323         (tee_file_flush): Rename to ...
16324         (tee_file::flush): ... this.  Adjust.
16325         (tee_file_write): Rename to ...
16326         (tee_file::write): ... this.  Adjust.
16327         (tee_file::write_async_safe): New.
16328         (tee_file_fputs): Rename to ...
16329         (tee_file::puts): ... this.  Adjust.
16330         (tee_file_isatty): Rename to ...
16331         (tee_file::isatty): ... this.  Adjust.
16332         * ui-file.h (struct obstack, struct ui_file): Don't
16333         forward-declare.
16334         (ui_file_new, ui_file_flush_ftype, set_ui_file_flush)
16335         (ui_file_write_ftype)
16336         (set_ui_file_write, ui_file_fputs_ftype, set_ui_file_fputs)
16337         (ui_file_write_async_safe_ftype, set_ui_file_write_async_safe)
16338         (ui_file_read_ftype, set_ui_file_read, ui_file_isatty_ftype)
16339         (set_ui_file_isatty, ui_file_rewind_ftype, set_ui_file_rewind)
16340         (ui_file_put_method_ftype, ui_file_put_ftype, set_ui_file_put)
16341         (ui_file_delete_ftype, set_ui_file_data, ui_file_fseek_ftype)
16342         (set_ui_file_fseek): Delete.
16343         (ui_file_data, ui_file_delete, ui_file_rewind)
16344         (struct ui_file): New.
16345         (ui_file_up): New.
16346         (class null_file): New.
16347         (null_stream): Declare.
16348         (ui_file_write_for_put, ui_file_put): Delete.
16349         (ui_file_xstrdup, ui_file_as_string, ui_file_obsavestring):
16350         Delete.
16351         (ui_file_fseek, mem_fileopen, stdio_fileopen, stderr_fileopen)
16352         (gdb_fopen, tee_file_new): Delete.
16353         (struct string_file): New.
16354         (struct stdio_file): New.
16355         (stdio_file_up): New.
16356         (struct stderr_file): New.
16357         (class tee_file): New.
16358         * ui-out.c (ui_out::field_stream): Take a 'string_file &' instead
16359         of a 'ui_file *'.  Adjust.
16360         * ui-out.h (class ui_out) <field_stream>: Likewise.
16361         * utils.c (do_ui_file_delete, make_cleanup_ui_file_delete)
16362         (null_stream): Delete.
16363         (error_stream): Take a 'string_file &' instead of a 'ui_file *'.
16364         Adjust.
16365         * utils.h (struct ui_file): Delete forward declaration..
16366         (make_cleanup_ui_file_delete, null_stream): Delete declarations.
16367         (error_stream): Take a 'string_file &' instead of a
16368         'ui_file *'.
16369         * varobj.c (varobj_value_get_print_value): Use string_file.
16370         * xtensa-tdep.c (xtensa_verify_config): Use string_file.
16371         * gdbarch.c: Regenerate.
16372
16373 2017-02-02  Pedro Alves  <palves@redhat.com>
16374
16375         * disasm.c (gdb_disassembler::pretty_print_insn): Rename to...
16376         (gdb_pretty_print_insn): ... this.  Now a free function.  Add back
16377         a 'gdbarch' parameter.  Allocate a mem_fileopen stream here.
16378         Adjust to call gdb_print_insn instead of
16379         gdb_disassembler::print_insn.
16380         (dump_insns, do_mixed_source_and_assembly_deprecated)
16381         (do_mixed_source_and_assembly, do_assembly_only): Add back a
16382         'gdbarch' parameter.  Remove gdb_disassembler parameter.
16383         (gdb_disassembly): Don't allocate a gdb_disassembler here.
16384         * disasm.h (gdb_disassembler::pretty_print_insn): Delete
16385         declaration.
16386         (gdb_pretty_print_insn): Re-add declaration.
16387         * record-btrace.c (btrace_insn_history): Don't allocate a
16388         gdb_disassembler here.  Adjust to call gdb_pretty_print_insn.
16389
16390 2017-02-01  Simon Marchi  <simon.marchi@polymtl.ca>
16391
16392         * disasm.h (gdb_disassembly): Remove file_string parameter.
16393         * disasm.c (gdb_disassembly): Likewise.
16394         * cli/cli-cmds.c (print_disassembly): Adapt.
16395         * mi/mi-cmd-disas.c (mi_cmd_disassemble): Likewise.
16396         * stack.c (do_gdb_disassembly): Likewise.
16397
16398 2017-02-01  Andreas Arnez  <arnez@linux.vnet.ibm.com>
16399
16400         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): For
16401         DWARF_VALUE_LITERAL, no longer ignore the offset on big-endian
16402         targets.  And if the implicit value is longer than needed, extract
16403         the first bytes instead of the "least significant" ones.
16404
16405 2017-02-01  Markus Metzger  <markus.t.metzger@intel.com>
16406
16407         * btrace.c (btrace_enable): Do not call btrace_add_pc for
16408         BTRACE_FORMAT_PT or if can_access_registers_ptid returns false.
16409         (btrace_fetch): Assert can_access_registers_ptid.
16410         * record-btrace.c (require_btrace_thread, record_btrace_info): Call
16411         validate_registers_access.
16412
16413 2017-02-01  Markus Metzger  <markus.t.metzger@intel.com>
16414
16415         * gdbthread.h (can_access_registers_ptid): New.
16416         * thread.c (can_access_registers_ptid): New.
16417
16418 2017-02-01  Pedro Alves  <palves@redhat.com>
16419
16420         * i386-tdep.c (i386_fast_tracepoint_valid_at): Use gdb_insn_length.
16421
16422 2017-01-31  Pedro Alves  <palves@redhat.com>
16423
16424         * mi/mi-interp.c (mi_breakpoint_created, mi_breakpoint_modified):
16425         Fix typos.
16426
16427 2017-01-31  Pedro Alves  <palves@redhat.com>
16428
16429         * stack.c (print_frame_args): Remove local mem_fileopen stream,
16430         not used.
16431
16432 2017-01-31  Pedro Alves  <palves@redhat.com>
16433
16434         * varobj.c (varobj_value_get_print_value): Remove xstrdup call.
16435
16436 2017-01-31  Pedro Alves  <palves@redhat.com>
16437
16438         * common/scoped_restore.h
16439         (scoped_restore_tmpl::scoped_restore_tmpl): Template on T2, and
16440         change the value's parameter type to T2.
16441         (make_scoped_restore): Likewise.
16442
16443 2017-01-27  Walfred Tedeschi  <walfred.tedeschi@intel.com>
16444             Richard Henderson  <rth@redhat.com>
16445
16446         * amd64-linux-nat.c (PTRACE_ARCH_PRCTL): New define.
16447         (amd64_linux_fetch_inferior_registers): Add case to fetch FS_BASE
16448         GS_BASE for older kernels.
16449         (amd64_linux_store_inferior_registers): Add case to store FS_BASE
16450         GS_BASE for older kernels.
16451         * amd64-linux-tdep.c (amd64_linux_gregset_reg_offset): Add FS_BASE
16452         and GS_BASE to the offset table.
16453         (amd64_linux_register_reggroup_p): Add FS_BASE and GS_BASE to the
16454         system register group.
16455         * amd64-nat.c (amd64_native_gregset_reg_offset): Implements case
16456         for older kernels.
16457         * amd64-tdep.c (amd64_init_abi): Add segment registers for the
16458         amd64 ABI.
16459         * amd64-tdep.h (amd64_regnum): Add AMD64_FSBASE_REGNUM and
16460         AMD64_GSBASE_REGNUM.
16461         (AMD64_NUM_REGS): Set to AMD64_GSBASE_REGNUM + 1.
16462         * features/Makefile (amd64-linux.dat, amd64-avx-linux.dat)
16463         (amd64-mpx-linux.dat, amd64-avx512-linux.dat, x32-linux.dat)
16464         (x32-avx-linux.dat, x32-avx512-linux.dat): Add
16465         i386/64bit-segments.xml in those rules.
16466         * features/i386/64bit-segments.xml: New file.
16467         * features/i386/amd64-avx-mpx-linux.xml: Add 64bit-segments.xml.
16468         * features/i386/amd64-avx-linux.xml: Add 64bit-segments.xml.
16469         * features/i386/amd64-avx512-linux.xml: Add 64bit-segments.xml.
16470         * features/i386/amd64-mpx-linux.xml: Add 64bit-segments.xml.
16471         * features/i386/x32-avx512-linux.xml: Add 64bit-segments.xml.
16472         * features/i386/x32-avx-linux.xml: Add 64bit-segments.xml.
16473         * features/i386/amd64-linux.xml: Add 64bit-segments.xml.
16474         * features/i386/amd64-avx-linux.c: Regenerated.
16475         * features/i386/amd64-avx-mpx-linux.c: Regenerated.
16476         * features/i386/amd64-avx-mpx.c: Regenerated.
16477         * features/i386/amd64-avx512-linux.c: Regenerated.
16478         * features/i386/amd64-linux.c: Regenerated.
16479         * features/i386/amd64-mpx-linux.c: Regenerated.
16480         * features/i386/i386-avx-mpx-linux.c: Regenerated.
16481         * features/i386/i386-avx-mpx.c: Regenerated.
16482         * features/i386/x32-avx-linux.c: Regenerated.
16483         * features/i386/x32-avx512-linux.c: Regenerated.
16484         * regformats/i386/amd64-avx-linux.dat: Regenerated.
16485         * regformats/i386/amd64-avx-mpx-linux.dat: Regenerated.
16486         * regformats/i386/amd64-avx512-linux.dat: Regenerated.
16487         * regformats/i386/amd64-linux.dat: Regenerated.
16488         * regformats/i386/amd64-mpx-linux.dat: Regenerated.
16489         * regformats/i386/x32-avx-linux.dat: Regenerated.
16490         * regformats/i386/x32-avx512-linux.dat: Regenerated.
16491         * regformats/i386/x32-linux.dat: Regenerated.
16492
16493 2017-01-27  Walfred Tedeschi  <walfred.tedeschi@intel.com>
16494
16495         * amd64-linux-tdep.h (AMD64_LINUX_ORIG_RAX_REGNUM):
16496         Set to AMD64_NUM_REGS.
16497
16498 2017-01-27  Walfred Tedeschi  <walfred.tedeschi@intel.com>
16499
16500         * amd64-nat.c (amd64_native_gregset_reg_offset): Simplify logic
16501         that checks validity of a register number.
16502
16503 2017-01-27  Kees Cook  <keescook@google.com>
16504
16505         * gdb/arm-linux-nat.c (arm_linux_fetch_inferior_registers): Call
16506         fetch_fpregs if target has fpa registers.
16507         (arm_linux_store_inferior_registers): Call store_fpregs if target
16508         has fpa registers.
16509
16510 2017-01-26  Andreas Arnez  <arnez@linux.vnet.ibm.com>
16511
16512         * cris-tdep.c (cris_gdbarch_init): Remove check for
16513         info.byte_order and force it to BFD_ENDIAN_LITTLE.
16514
16515 2017-01-26  Antoine Tremblay  <antoine.tremblay@ericsson.com>
16516
16517         * corelow.c (get_core_register_section): Check for regset
16518         existence before checking for REGSET_VARIABLE_SIZE.
16519
16520 2017-01-26  Yao Qi  <yao.qi@linaro.org>
16521             Pedro Alves  <palves@redhat.com>
16522
16523         PR gdb/20939
16524         * disasm.c (gdb_disassembler::dis_asm_memory_error): Don't
16525         call memory_error, save memaddr instead.
16526         (gdb_disassembler::print_insn): If gdbarch_print_insn returns
16527         negative, cal memory_error.
16528         * disasm.h (gdb_disassembler) <m_err_memaddr>: New field.
16529
16530 2017-01-26  Yao Qi  <yao.qi@linaro.org>
16531
16532         * disasm-selftests.c (memory_error_test): New function.
16533         (_initialize_disasm_selftests): Register memory_error_test.
16534
16535 2017-01-26  Yao Qi  <yao.qi@linaro.org>
16536
16537         * Makefile.in (SFILES): Add disasm-selftests.c and
16538         selftest-arch.c.
16539         (COMMON_OBS): Add disasm-selftests.o and selftest-arch.o.
16540         * disasm-selftests.c: New file.
16541         * selftest-arch.c: New file.
16542         * selftest-arch.h: New file.
16543
16544 2017-01-26  Yao Qi  <yao.qi@linaro.org>
16545
16546         * mep-tdep.c (mep_gdb_print_insn): Set info->arch
16547         to bfd_arch_mep.  Don't return 0 if section is not
16548         found.  Call print_insn_mep.
16549
16550 2017-01-26  Pedro Alves  <palves@redhat.com>
16551             Yao Qi  <yao.qi@linaro.org>
16552
16553         * arm-tdep.c: Include "disasm.h".
16554         (gdb_print_insn_arm): Update code to get gdbarch.
16555         * disasm.c (dis_asm_read_memory): Change it to
16556         gdb_disassembler::dis_asm_read_memory.
16557         (dis_asm_memory_error): Likewise.
16558         (dis_asm_print_address): Likewise.
16559         (gdb_pretty_print_insn): Change it to
16560         gdb_disassembler::pretty_print_insn.
16561         (dump_insns): Add one argument gdb_disassemlber.  All
16562         callers updated.
16563         (do_mixed_source_and_assembly_deprecated): Likewise.
16564         (do_mixed_source_and_assembly): Likewise.
16565         (do_assembly_only): Likewise.
16566         (gdb_disassembler::gdb_disassembler): New.
16567         (gdb_disassembler::print_insn): New.
16568         * disasm.h (class gdb_disassembler): New.
16569         (gdb_pretty_print_insn): Remove declaration.
16570         (gdb_disassemble_info): Likewise.
16571         * guile/scm-disasm.c (class gdbscm_disassembler): New.
16572         (gdbscm_disasm_read_memory_worker): Update.
16573         (gdbscm_disasm_read_memory): Update.
16574         (gdbscm_disasm_memory_error): Remove.
16575         (gdbscm_disasm_print_address): Remove.
16576         (gdbscm_disassembler::gdbscm_disassembler): New.
16577         (gdbscm_print_insn_from_port): Update.
16578         * mips-tdep.c: Include disasm.h.
16579         (gdb_print_insn_mips): Update code to get gdbarch.
16580         * record-btrace.c (btrace_insn_history): Update.
16581         * spu-tdep.c: Include disasm.h.
16582         (struct spu_dis_asm_data): Remove.
16583         (struct spu_dis_asm_info): New.
16584         (spu_dis_asm_print_address): Use spu_dis_asm_info to get
16585         SPU id.
16586         (gdb_print_insn_spu): Cast disassemble_info to
16587         spu_dis_asm_info.
16588
16589 2017-01-26  Yao Qi  <yao.qi@linaro.org>
16590
16591         * disasm.c (do_ui_file_delete): Delete.
16592         (gdb_insn_length): Move code creating stream to ...
16593         * utils.c (null_stream): ... here.  New function.
16594         * utils.h (null_stream): Declare.
16595
16596 2017-01-23  Simon Marchi  <simon.marchi@polymtl.ca>
16597
16598         * python/py-inferior.c (find_thread_object): Return directly
16599         from the loop.  Remove "found" variable.
16600
16601 2017-01-21  Joel Brobecker  <brobecker@adacore.com>
16602
16603         GDB 7.12.1 released.
16604
16605 2017-01-20  Simon Marchi  <simon.marchi@ericsson.com>
16606
16607         * python/py-function.c (fnpy_call): Reorder declarations to have
16608         the gdbpy_enter object declared first.
16609         * python/py-xmethods.c (gdbpy_get_xmethod_arg_types): Likewise.
16610
16611 2017-01-20  Simon Marchi  <simon.marchi@ericsson.com>
16612
16613         PR python/21068
16614         * python/python-internal.h (PyMem_RawMalloc): Define for
16615         Python < 3.4.
16616         * python/py-gdb-readline.c (gdbpy_readline_wrapper): Use
16617         PyMem_RawMalloc instead of PyMem_Malloc.
16618
16619 2017-01-20  Mike Wrighton  <mike_wrighton@codesourcery.com>
16620             Luis Machado  <lgustavo@codesourcery.com>
16621
16622         * NEWS (New commands): Mention flash-erase.
16623         (New MI commands): Mention target-flash-erase.
16624         * mi/mi-cmds.c (mi_cmd_target_flash_erase): Add target-flash-erase MI
16625         command.
16626         * mi/mi-cmds.h (mi_cmd_target_flash_erase): New declaration.
16627         * mi/mi-main.c (mi_cmd_target_flash_erase): New function.
16628         * target.c (flash_erase_command): New function.
16629         (initialize_targets): Add new flash-erase command.
16630         * target.h (flash_erase_command): New declaration.
16631
16632 2017-01-20  Joel Brobecker  <brobecker@adacore.com>
16633
16634         * nat/linux-ptrace.c: Only include <sys/procfs.h> if
16635         HAVE_SYS_PROCFS_H is defined.
16636
16637 2017-01-18  Alan Hayward  <alan.hayward@arm.com>
16638
16639         * remote.c (struct cached_reg): Change data into a pointer.
16640         * (stop_reply_dtr): Free data pointers before deleting vector.
16641         (process_stop_reply): Likewise.
16642         (remote_parse_stop_reply): Allocate space for data
16643
16644 2017-01-18  Alan Hayward  <alan.hayward@arm.com>
16645
16646         * amd64-tdep.c (amd64_pseudo_register_read_value): remove
16647         MAX_REGISTER_SIZE.
16648         (amd64_pseudo_register_read_value): Likewise.
16649         * remote.c (fetch_register_using_p): Remove MAX_REGISTER_SIZE.
16650         (store_register_using_P): Likewise.
16651         * regcache.c (regcache_xfer_part): Likewise.
16652
16653 2017-01-16  Ivo Raisr  <ivo.raisr@oracle.com>
16654
16655         Split real and pseudo registers.
16656         * sparc-tdep.h (SPARC_CORE_REGISTERS): New macro.
16657         (sparc32_pseudo_regnum): New enum.
16658         * sparc64-tdep.h (sparc64_pseudo_regnum): New enum.
16659         * sparc-tdep.c (SPARC32_FPU_REGISTERS): New macro.
16660         (SPARC32_CP0_REGISTERS): New macro.
16661         (sparc32_pseudo_register_name): New function.
16662         (sparc32_register_name): Use sparc32_pseudo_register_name.
16663         (sparc32_pseudo_register_type): New function.
16664         (sparc32_register_type): Use sparc32_pseudo_register_type.
16665         (sparc32_pseudo_register_read, sparc32_pseudo_register_write): Handle
16666         pseudo register numbers.
16667         * sparc64-tdep.c SPARC64_FPU_REGISTERS): New macro.
16668         (SPARC64_CP0_REGISTERS): New macro.
16669         (sparc64_pseudo_register_name): New function.
16670         (sparc64_register_name): Use sparc64_pseudo_register_name.
16671         (sparc64_pseudo_register_type): New function.
16672         (sparc64_register_type): Use sparc64_pseudo_register_type.
16673         (sparc64_pseudo_register_read, sparc64_pseudo_register_write): Handle
16674         pseudo register numbers.
16675         (sparc64_store_floating_fields, sparc64_extract_floating_fields,
16676         sparc64_store_arguments): Handle pseudo register numbers.
16677
16678 2017-01-13  Yao Qi  <yao.qi@linaro.org>
16679
16680         * remote.c (REMOTE_DEBUG_MAX_CHAR): New macro.
16681         (putpkt_binary): Print only REMOTE_DEBUG_MAX_CHAR chars in debug
16682         output.
16683         (getpkt_or_notif_sane_1): Likewise.
16684
16685 2017-01-13  Yao Qi  <yao.qi@linaro.org>
16686
16687         * Makefile.in (checker-headers): Use CXX and CXX_DIALET instead
16688         of CC.  Pass "-x c++-header" instead of "-x c".
16689
16690 2017-01-12  Simon Marchi  <simon.marchi@ericsson.com>
16691
16692         * remote.c (remote_can_async_p): Update comment.
16693
16694 2017-01-12  Simon Marchi  <simon.marchi@ericsson.com>
16695
16696         * linux-nat.c (linux_nat_can_async_p): Update comment.
16697
16698 2017-01-12  Simon Marchi  <simon.marchi@ericsson.com>
16699
16700         * serial.c (serial_open): Forget about "pc" and "lpt" serial interface.
16701
16702 2017-01-11  Simon Marchi  <simon.marchi@ericsson.com>
16703
16704         * cli/cli-decode.c (lookup_cmd_1): Fix typo in comment.
16705
16706 2017-01-10  Tom Tromey  <tom@tromey.com>
16707
16708         * python/py-type.c (typy_legacy_template_argument): Update.
16709         * cp-support.h (struct demangle_parse_info) (demangle_parse_info,
16710         ~demangle_parse_info): Declare new members.
16711         (cp_demangled_name_to_comp): Return unique_ptr.
16712         (cp_demangled_name_parse_free)
16713         (make_cleanup_cp_demangled_name_parse_free)
16714         (cp_new_demangle_parse_info): Remove.
16715         * cp-support.c (do_demangled_name_parse_free_cleanup)
16716         (make_cleanup_cp_demangled_name_parse_free): Remove.
16717         (inspect_type, cp_canonicalize_string_full)
16718         (cp_canonicalize_string): Update.
16719         (mangled_name_to_comp): Change return type.
16720         (cp_class_name_from_physname, method_name_from_physname)
16721         (cp_func_name, cp_remove_params): Update.
16722         * cp-name-parser.y (demangle_parse_info): New constructor, from
16723         cp_new_demangle_parse_info.
16724         (~demangle_parse_info): New destructor, from
16725         cp_demangled_name_parse_free.
16726         (cp_merge_demangle_parse_infos): Update.
16727         (cp_demangled_name_to_comp): Change return type.
16728
16729 2017-01-10  Tom Tromey  <tom@tromey.com>
16730
16731         * top.c (prevent_dont_repeat): Change return type.
16732         * python/python.c (execute_gdb_command): Use std::string.
16733         Update.
16734         * guile/guile.c (gdbscm_execute_gdb_command): Update.
16735         * command.h (prevent_dont_repeat): Change return type.
16736         * breakpoint.c (bpstat_do_actions_1): Update.
16737
16738 2017-01-10  Tom Tromey  <tom@tromey.com>
16739
16740         * value.h (scoped_value_mark::~scoped_value_mark): Call
16741         free_to_mark.
16742         (scoped_value_mark::free_to_mark): New method.
16743         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Use
16744         scoped_value_mark.
16745
16746 2017-01-10  Tom Tromey  <tom@tromey.com>
16747
16748         * python/py-value.c (valpy_dereference, valpy_referenced_value)
16749         (valpy_reference_value, valpy_const_value, valpy_get_address)
16750         (valpy_get_dynamic_type, valpy_lazy_string, valpy_do_cast)
16751         (valpy_getitem, valpy_call, valpy_binop_throw, valpy_negative)
16752         (valpy_absolute, valpy_richcompare_throw): Use scoped_value_mark.
16753         * dwarf2loc.c (dwarf2_loc_desc_get_symbol_read_needs): Use
16754         scoped_value_mark.
16755         * dwarf2-frame.c (execute_stack_op): Use scoped_value_mark.
16756         * value.h (scoped_value_mark): New class.
16757
16758 2017-01-10  Tom Tromey  <tom@tromey.com>
16759
16760         * dwarf2read.c (dwarf2_build_psymtabs): Use psymtab_discarder.
16761         * psympriv.h (make_cleanup_discard_psymtabs): Don't declare.
16762         * psymtab.c (discard_psymtabs_upto): Remove.
16763         (make_cleanup_discard_psymtabs): Remove.
16764         (struct psymtab_state): Remove.
16765
16766 2017-01-10  Tom Tromey  <tom@tromey.com>
16767
16768         * record-full.c (record_full_save_cleanups): Remove.
16769         (record_full_save): Use gdb::unlinker.
16770         * gcore.c (do_bfd_delete_cleanup): Remove.
16771         (gcore_command): Use gdb::unlinker, unique_xmalloc_ptr.  Remove
16772         cleanups.
16773         * dwarf2read.c (unlink_if_set): Remove.
16774         (write_psymtabs_to_index): Use gdb::unlinker.
16775         * common/gdb_unlinker.h: New file.
16776
16777 2017-01-10  Tom Tromey  <tom@tromey.com>
16778
16779         * windows-tdep.c (windows_xfer_shared_library): Update.
16780         * windows-nat.c (windows_make_so): Update.
16781         * utils.h (make_cleanup_bfd_unref): Remove.
16782         * utils.c (do_bfd_close_cleanup, make_cleanup_bfd_unref): Remove.
16783         * symfile.h (symfile_bfd_open)
16784         (find_separate_debug_file_in_section): Return gdb_bfd_ref_ptr.
16785         * symfile.c (read_symbols, symbol_file_add)
16786         (separate_debug_file_exists): Update.
16787         (symfile_bfd_open): Return gdb_bfd_ref_ptr.
16788         (generic_load, reread_symbols): Update.
16789         * symfile-mem.c (symbol_file_add_from_memory): Update.
16790         * spu-linux-nat.c (spu_bfd_open): Return gdb_bfd_ref_ptr.
16791         (spu_symbol_file_add_from_memory): Update.
16792         * solist.h (struct target_so_ops) <bfd_open>: Return
16793         gdb_bfd_ref_ptr.
16794         (solib_bfd_fopen, solib_bfd_open): Return gdb_bfd_ref_ptr.
16795         * solib.c (solib_bfd_fopen, solib_bfd_open): Return
16796         gdb_bfd_ref_ptr.
16797         (solib_map_sections, reload_shared_libraries_1): Update.
16798         * solib-svr4.c (enable_break): Update.
16799         * solib-spu.c (spu_bfd_fopen): Return gdb_bfd_ref_ptr.
16800         * solib-frv.c (enable_break2): Update.
16801         * solib-dsbt.c (enable_break): Update.
16802         * solib-darwin.c (gdb_bfd_mach_o_fat_extract): Return
16803         gdb_bfd_ref_ptr.
16804         (darwin_solib_get_all_image_info_addr_at_init): Update.
16805         (darwin_bfd_open): Return gdb_bfd_ref_ptr.
16806         * solib-aix.c (solib_aix_bfd_open): Return gdb_bfd_ref_ptr.
16807         * record-full.c (record_full_save): Update.
16808         * python/py-objfile.c (objfpy_add_separate_debug_file): Update.
16809         * procfs.c (insert_dbx_link_bpt_in_file): Update.
16810         * minidebug.c (find_separate_debug_file_in_section): Return
16811         gdb_bfd_ref_ptr.
16812         * machoread.c (macho_add_oso_symfile): Change abfd to
16813         gdb_bfd_ref_ptr.
16814         (macho_symfile_read_all_oso): Update.
16815         (macho_check_dsym): Return gdb_bfd_ref_ptr.
16816         (macho_symfile_read): Update.
16817         * jit.c (bfd_open_from_target_memory): Return gdb_bfd_ref_ptr.
16818         (jit_bfd_try_read_symtab): Update.
16819         * gdb_bfd.h (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
16820         (gdb_bfd_openw, gdb_bfd_openr_iovec)
16821         (gdb_bfd_openr_next_archived_file, gdb_bfd_fdopenr): Return
16822         gdb_bfd_ref_ptr.
16823         (gdb_bfd_ref_policy): New struct.
16824         (gdb_bfd_ref_ptr): New typedef.
16825         * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
16826         (gdb_bfd_openw, gdb_bfd_openr_iovec)
16827         (gdb_bfd_openr_next_archived_file, gdb_bfd_fdopenr): Return
16828         gdb_bfd_ref_ptr.
16829         * gcore.h (create_gcore_bfd): Return gdb_bfd_ref_ptr.
16830         * gcore.c (create_gcore_bfd): Return gdb_bfd_ref_ptr.
16831         (gcore_command): Update.
16832         * exec.c (exec_file_attach): Update.
16833         * elfread.c (elf_symfile_read): Update.
16834         * dwarf2read.c (dwarf2_get_dwz_file): Update.
16835         (try_open_dwop_file, open_dwo_file): Return gdb_bfd_ref_ptr.
16836         (open_and_init_dwo_file): Update.
16837         (open_dwp_file): Return gdb_bfd_ref_ptr.
16838         (open_and_init_dwp_file): Update.
16839         * corelow.c (core_open): Update.
16840         * compile/compile-object-load.c (compile_object_load): Update.
16841         * common/gdb_ref_ptr.h (ref_ptr::operator->): New operator.
16842         * coffread.c (coff_symfile_read): Update.
16843         * cli/cli-dump.c (bfd_openr_or_error, bfd_openw_or_error): Return
16844         gdb_bfd_ref_ptr.  Rename.
16845         (dump_bfd_file, restore_command): Update.
16846         * build-id.h (build_id_to_debug_bfd): Return gdb_bfd_ref_ptr.
16847         * build-id.c (build_id_to_debug_bfd): Return gdb_bfd_ref_ptr.
16848         (find_separate_debug_file_by_buildid): Update.
16849
16850 2017-01-10  Tom Tromey  <tom@tromey.com>
16851
16852         * common/gdb_ref_ptr.h: New file.
16853         * python/py-ref.h (struct gdbpy_ref_policy): New.
16854         (gdbpy_ref): Now a typedef.
16855
16856 2017-01-10  Tom Tromey  <tom@tromey.com>
16857
16858         * utils.h (make_cleanup_htab_delete): Don't declare.
16859         * utils.c (do_htab_delete_cleanup, make_cleanup_htab_delete):
16860         Remove.
16861         * linespec.c (decode_compound_collector): Add constructor,
16862         destructor.
16863         (lookup_prefix_sym): Remove cleanup.
16864         (symtab_collector): Add constructor, destructor.
16865         (collect_symtabs_from_filename): Remove cleanup.
16866         * disasm.c (do_mixed_source_and_assembly): Use htab_up.
16867         * compile/compile-c-symbols.c (generate_c_for_variable_locations):
16868         Use htab_up.
16869         * gnu-v3-abi.c (gnuv3_print_vtable): Use htab_up.
16870         * dwarf2read.c (dw2_expand_symtabs_matching)
16871         (dw2_map_symbol_filenames, dwarf_decode_macros)
16872         (write_psymtabs_to_index): Use htab_up.
16873         * dwarf2loc.c (func_verify_no_selftailcall)
16874         (call_site_find_chain_1, func_verify_no_selftailcall)
16875         (chain_candidate, call_site_find_chain_1): Use std::unordered_set,
16876         std::vector, gdb::unique_xmalloc_ptr.
16877         (call_sitep): Remove typedef.
16878         (dwarf2_locexpr_baton_eval): Remove unused variable.
16879
16880 2017-01-10  Tom Tromey  <tom@tromey.com>
16881
16882         * python/python-internal.h (make_cleanup_py_decref)
16883         (make_cleanup_py_xdecref): Don't declare.
16884         * python/py-utils.c (py_decref, make_cleanup_py_decref)
16885         (py_xdecref, make_cleanup_py_xdecref): Remove.
16886
16887 2017-01-10  Tom Tromey  <tom@tromey.com>
16888
16889         * python/py-framefilter.c (py_mi_print_variables): Use gdbpy_ref.
16890         (py_print_locals, enumerate_locals, py_print_args): Use gdbpy_ref.
16891
16892 2017-01-10  Tom Tromey  <tom@tromey.com>
16893
16894         * python/py-framefilter.c (enumerate_args): Use gdbpy_ref.
16895
16896 2017-01-10  Tom Tromey  <tom@tromey.com>
16897
16898         * python/py-utils.c (unicode_to_encoded_string)
16899         (python_string_to_target_string)
16900         (python_string_to_target_python_string)
16901         (python_string_to_host_string, gdbpy_obj_to_string)
16902         (get_addr_from_python): Use gdbpy_ref.
16903
16904 2017-01-10  Tom Tromey  <tom@tromey.com>
16905
16906         * python/py-unwind.c (pyuw_object_attribute_to_pointer): Use
16907         gdbpy_ref.
16908
16909 2017-01-10  Tom Tromey  <tom@tromey.com>
16910
16911         * python/python.c (eval_python_command, gdbpy_decode_line)
16912         (gdbpy_run_events, gdbpy_start_type_printers)
16913         (gdbpy_apply_type_printers): Use gdbpy_ref.
16914
16915 2017-01-10  Tom Tromey  <tom@tromey.com>
16916
16917         * python/py-param.c (get_doc_string, compute_enum_values): Use
16918         gdbpy_ref.
16919
16920 2017-01-10  Tom Tromey  <tom@tromey.com>
16921
16922         * python/py-inferior.c (find_thread_object, build_inferior_list):
16923         Use gdbpy_ref.
16924
16925 2017-01-10  Tom Tromey  <tom@tromey.com>
16926
16927         * python/py-framefilter.c (py_print_frame): Use gdbpy_ref.
16928
16929 2017-01-10  Tom Tromey  <tom@tromey.com>
16930
16931         * python/py-finishbreakpoint.c (bpfinishpy_out_of_scope): Use
16932         gdbpy_ref.
16933
16934 2017-01-10  Tom Tromey  <tom@tromey.com>
16935
16936         * python/py-cmd.c (cmdpy_completer_helper): Use gdbpy_ref.  Remove
16937         extra incref.
16938         (cmdpy_completer_handle_brkchars, cmdpy_completer, cmdpy_init):
16939         Use gdbpy_ref.
16940
16941 2017-01-10  Tom Tromey  <tom@tromey.com>
16942
16943         * python/py-breakpoint.c (gdbpy_breakpoint_cond_says_stop): Use
16944         gdbpy_ref.
16945
16946 2017-01-10  Tom Tromey  <tom@tromey.com>
16947
16948         * python/py-arch.c (archpy_disassemble): Use gdbpy_ref.  Don't
16949         decref results of PyArg_ParseTupleAndKeywords.
16950
16951 2017-01-10  Tom Tromey  <tom@tromey.com>
16952
16953         * python/python.c (python_run_simple_file): Use
16954         unique_xmalloc_ptr, gdbpy_ref.
16955
16956 2017-01-10  Tom Tromey  <tom@tromey.com>
16957
16958         * python/py-prettyprint.c (print_stack_unless_memory_error)
16959         (print_string_repr, print_children): Use gdbpy_ref.
16960         (dummy_python_frame): New class.
16961         (dummy_python_frame::dummy_python_frame): Rename from
16962         push_dummy_python_frame.
16963         (py_restore_tstate): Remove.
16964
16965 2017-01-10  Tom Tromey  <tom@tromey.com>
16966
16967         * python/py-framefilter.c (py_print_frame): Use gdbpy_ref.
16968
16969 2017-01-10  Tom Tromey  <tom@tromey.com>
16970
16971         * python/python.c (ensure_python_env, restore_python_env):
16972         Remove.
16973         * python/python-internal.h (ensure_python_env): Don't declare.
16974         * varobj.h (varobj_ensure_python_env): Don't declare.
16975         * varobj.c (varobj_ensure_python_env): Remove.
16976
16977 2017-01-10  Tom Tromey  <tom@tromey.com>
16978
16979         * varobj.c (varobj_value_get_print_value): Use
16980         gdbpy_enter_varobj.
16981
16982 2017-01-10  Tom Tromey  <tom@tromey.com>
16983
16984         * python/py-prettyprint.c (print_string_repr, print_children):
16985         Update.
16986         * python/py-lazy-string.c (gdbpy_extract_lazy_string): Change type
16987         of "encoding".
16988         * varobj.c (varobj_value_get_print_value): Update.
16989         * python/python-internal.h (gdbpy_extract_lazy_string): Update.
16990
16991 2017-01-10  Tom Tromey  <tom@tromey.com>
16992
16993         * varobj.c (varobj_get_display_hint)
16994         (dynamic_varobj_has_child_method, install_new_value_visualizer)
16995         (varobj_set_visualizer, free_variable): Use
16996         gdbpy_enter_varobj.
16997
16998 2017-01-10  Tom Tromey  <tom@tromey.com>
16999
17000         * python/python.c (python_command): Use gdbpy_enter, gdbpy_ref.
17001         (do_finish_initialization): New function.  Use gdbpy_ref.
17002         (gdbpy_finish_initialization): Use gdbpy_enter.  Call
17003         do_finish_initialization.
17004
17005 2017-01-10  Tom Tromey  <tom@tromey.com>
17006
17007         * python/py-param.c (get_set_value, get_show_value): Use
17008         gdbpy_enter, gdbpy_ref.
17009
17010 2017-01-10  Tom Tromey  <tom@tromey.com>
17011
17012         * python/py-function.c (fnpy_call): Use gdbpy_enter, gdbpy_ref.
17013
17014 2017-01-10  Tom Tromey  <tom@tromey.com>
17015
17016         * python/py-cmd.c (cmdpy_function): Use gdbpy_enter, gdbpy_ref.
17017
17018 2017-01-10  Tom Tromey  <tom@tromey.com>
17019
17020         * python/py-varobj.c (py_varobj_iter_dtor, py_varobj_iter_next):
17021         Use gdbpy_enter_varobj.
17022
17023 2017-01-10  Tom Tromey  <tom@tromey.com>
17024
17025         * varobj.c (gdbpy_enter_varobj): New constructor.
17026         * python/python-internal.h (gdbpy_enter_varobj): New class.
17027         * python/py-varobj.c (py_varobj_get_iterator): Use
17028         gdbpy_enter_varobj.
17029
17030 2017-01-10  Tom Tromey  <tom@tromey.com>
17031
17032         * python/py-xmethods.c (gdbpy_get_xmethod_result_type): Use
17033         gdbpy_enter, gdbpy_ref, unique_xmalloc_ptr.
17034         (gdbpy_invoke_xmethod): Use gdbpy_ref, gdbpy_enter.
17035         (gdbpy_get_xmethod_arg_types): Use gdbpy_ref,
17036         unique_xmalloc_ptr.
17037         (gdbpy_get_xmethod_arg_types): Use gdbpy_ref, gdbpy_enter.
17038
17039 2017-01-10  Tom Tromey  <tom@tromey.com>
17040
17041         * python/py-xmethods.c (invoke_match_method): Use
17042         gdbpy_ref.
17043
17044 2017-01-10  Tom Tromey  <tom@tromey.com>
17045
17046         * python/py-xmethods.c (gdbpy_get_matching_xmethod_workers): use
17047         gdbpy_enter, gdbpy_ref.
17048
17049 2017-01-10  Tom Tromey  <tom@tromey.com>
17050
17051         * python/python.c (python_interactive_command): Use gdbpy_enter.
17052
17053 2017-01-10  Tom Tromey  <tom@tromey.com>
17054
17055         * python/python.c (gdbpy_before_prompt_hook): Use gdbpy_enter,
17056         gdbpy_ref.
17057
17058 2017-01-10  Tom Tromey  <tom@tromey.com>
17059
17060         * python/py-prettyprint.c (gdbpy_apply_val_pretty_printer): Use
17061         gdbpy_enter, gdbpy_ref, unique_xmalloc_ptr.
17062
17063 2017-01-10  Tom Tromey  <tom@tromey.com>
17064
17065         * utils.h (htab_deleter): New struct.
17066         (htab_up): New typedef.
17067         * python/py-framefilter.c (gdbpy_apply_frame_filter): Use
17068         gdbpy_enter, gdbpy_ref, htab_up.
17069
17070 2017-01-10  Tom Tromey  <tom@tromey.com>
17071
17072         * python/py-unwind.c (pending_frame_invalidate): Remove.
17073         (pyuw_sniffer): Use gdbpy_enter and gdbpy_ref.
17074
17075 2017-01-10  Tom Tromey  <tom@tromey.com>
17076
17077         * python/py-xmethods.c (gdbpy_free_xmethod_worker_data)
17078         (gdbpy_clone_xmethod_worker_data): Use gdbpy_enter.
17079
17080 2017-01-10  Tom Tromey  <tom@tromey.com>
17081
17082         * python/py-type.c (save_objfile_types): Use gdbpy_enter.
17083
17084 2017-01-10  Tom Tromey  <tom@tromey.com>
17085
17086         * python/python.c (gdbpy_eval_from_control_command)
17087         (gdbpy_source_script, gdbpy_run_events)
17088         (gdbpy_source_objfile_script, gdbpy_execute_objfile_script)
17089         (gdbpy_free_type_printers, gdbpy_finish_initialization): Use
17090         gdbpy_enter.
17091
17092 2017-01-10  Tom Tromey  <tom@tromey.com>
17093
17094         * python/py-progspace.c (py_free_pspace): Use gdbpy_enter.
17095
17096 2017-01-10  Tom Tromey  <tom@tromey.com>
17097
17098         * python/py-objfile.c (py_free_objfile): Use gdbpy_enter.
17099
17100 2017-01-10  Tom Tromey  <tom@tromey.com>
17101
17102         * python/py-inferior.c (python_on_normal_stop, python_on_resume)
17103         (python_on_inferior_call_pre, python_on_inferior_call_post)
17104         (python_on_memory_change, python_on_register_change)
17105         (python_inferior_exit, python_new_objfile, add_thread_object)
17106         (delete_thread_object, py_free_inferior): Use gdbpy_enter.
17107
17108 2017-01-10  Tom Tromey  <tom@tromey.com>
17109
17110         * python/py-finishbreakpoint.c (bpfinishpy_handle_stop)
17111         (bpfinishpy_handle_exit): Use gdbpy_enter.
17112
17113 2017-01-10  Tom Tromey  <tom@tromey.com>
17114
17115         * python/py-cmd.c (cmdpy_destroyer)
17116         (cmdpy_completer_handle_brkchars, cmdpy_completer): Use
17117         gdbpy_enter.
17118
17119 2017-01-10  Tom Tromey  <tom@tromey.com>
17120
17121         * python/py-breakpoint.c (gdbpy_breakpoint_cond_says_stop): Use
17122         gdbpy_enter.
17123         (gdbpy_breakpoint_has_cond): Likewise.
17124
17125 2017-01-10  Tom Tromey  <tom@tromey.com>
17126
17127         * python/python.c (gdbpy_enter): New constructor.
17128         (~gdbpy_enter): New destructor.
17129         (restore_python_env, ensure_python_env): Rewrite.
17130         * python/python-internal.h (gdbpy_enter): New class.
17131
17132 2017-01-10  Tom Tromey  <tom@tromey.com>
17133
17134         * python/py-symbol.c (gdbpy_lookup_symbol): Use gdbpy_ref.
17135
17136 2017-01-10  Tom Tromey  <tom@tromey.com>
17137
17138         * python/py-value.c (value_has_field, get_field_flag)
17139         (get_field_type, valpy_getitem, convert_value_from_python): Use
17140         gdbpy_ref.
17141
17142 2017-01-10  Tom Tromey  <tom@tromey.com>
17143
17144         * python/python.c (gdbpy_progspaces, gdbpy_objfiles): Use
17145         gdbpy_ref.
17146
17147 2017-01-10  Tom Tromey  <tom@tromey.com>
17148
17149         * python/py-prettyprint.c (search_pp_list)
17150         (find_pretty_printer_from_objfiles)
17151         (find_pretty_printer_from_progspace)
17152         (find_pretty_printer_from_gdb, find_pretty_printer)
17153         (gdbpy_get_display_hint, gdbpy_get_varobj_pretty_printer): Use
17154         gdbpy_ref.
17155
17156 2017-01-10  Tom Tromey  <tom@tromey.com>
17157
17158         * python/py-param.c (call_doc_function): Use gdbpy_ref.
17159
17160 2017-01-10  Tom Tromey  <tom@tromey.com>
17161
17162         * python/py-linetable.c (build_line_table_tuple_from_pcs)
17163         (ltpy_get_all_source_lines): Use gdbpy_ref.
17164
17165 2017-01-10  Tom Tromey  <tom@tromey.com>
17166
17167         * python/py-framefilter.c (extract_sym, extract_value)
17168         (get_py_iter_from_func, bootstrap_python_frame_filters): Use
17169         gdbpy_ref.
17170
17171 2017-01-10  Tom Tromey  <tom@tromey.com>
17172
17173         * python/py-breakpoint.c (gdbpy_breakpoints): Use gdbpy_ref.
17174
17175 2017-01-10  Tom Tromey  <tom@tromey.com>
17176
17177         * python/py-inferior.c (gdbpy_inferiors): Use gdbpy_ref.
17178
17179 2017-01-10  Tom Tromey  <tom@tromey.com>
17180
17181         * python/py-function.c (convert_values_to_python, fnpy_init): Use
17182         gdbpy_ref.
17183
17184 2017-01-10  Tom Tromey  <tom@tromey.com>
17185
17186         * python/py-cmd.c (gdbpy_string_to_argv): Use gdbpy_ref.
17187
17188 2017-01-10  Tom Tromey  <tom@tromey.com>
17189
17190         * python/py-type.c (convert_field, make_fielditem, typy_fields)
17191         (typy_range): Use gdbpy_ref.
17192
17193 2017-01-10  Tom Tromey  <tom@tromey.com>
17194
17195         * python/py-threadevent.c (create_thread_event_object): Use
17196         gdbpy_ref.
17197         * python/py-stopevent.c (create_stop_event_object): Simplify.
17198         (emit_stop_event): Use gdbpy_ref.
17199         * python/py-signalevent.c (create_signal_event_object): Use
17200         gdbpy_ref.
17201         * python/py-newobjfileevent.c (create_new_objfile_event_object)
17202         (emit_new_objfile_event, create_clear_objfiles_event_object)
17203         (emit_clear_objfiles_event): Use gdbpy_ref.
17204         * python/py-infevents.c (create_inferior_call_event_object)
17205         (create_register_changed_event_object)
17206         (create_memory_changed_event_object, emit_inferior_call_event)
17207         (emit_memory_changed_event, emit_register_changed_event): Use
17208         gdbpy_ref.
17209         * python/py-exitedevent.c (create_exited_event_object)
17210         (emit_exited_event): Use gdbpy_ref.
17211         * python/py-event.h (evpy_emit_event): Remove
17212         CPYCHECKER_STEALS_REFERENCE_TO_ARG annotation.
17213         * python/py-event.c (evpy_emit_event): Use gdbpy_ref.
17214         * python/py-continueevent.c (emit_continue_event): Use
17215         gdbpy_ref.
17216         * python/py-breakpoint.c (gdbpy_breakpoint_created)
17217         (gdbpy_breakpoint_deleted, gdbpy_breakpoint_modified): Use
17218         gdbpy_ref.
17219         * python/py-bpevent.c (create_breakpoint_event_object): Use
17220         gdbpy_ref.
17221
17222 2017-01-10  Tom Tromey  <tom@tromey.com>
17223
17224         * python/py-ref.h: New file.
17225
17226 2017-01-10  Simon Marchi  <simon.marchi@ericsson.com>
17227
17228         * cli-out.c (cli_ui_out::do_redirect): Change return type to
17229         void.
17230         * cli-out.h (cli_ui_out::do_redirect): Likewise.
17231         * mi/mi-out.c (mi_ui_out::do_redirect): Likewise.
17232         * mi/mi-out.h (mi_ui_out::do_redirect): Likewise.
17233         * ui-out.c (ui_out::redirect): Likewise.
17234         * ui-out.h (ui_out::redirect, ui_out::do_redirect): Likewise.
17235         * cli/cli-logging.c (set_logging_redirect): Update call site of
17236         ui_out::redirect.
17237         (handle_redirections): Likewise.
17238         * scm-ports.c (ioscm_with_output_to_port_worker): Likewise.
17239         * top.c (execute_command_to_string): Likewise.
17240         * utils.c (do_ui_out_redirect_pop): Likewise.
17241
17242 2017-01-10  Simon Marchi  <simon.marchi@ericsson.com>
17243
17244         * stack.c (_initialize_stack): Update "frame" command help message.
17245
17246 2017-01-08  Iain Buclaw  <ibuclaw@gdcproject.org>
17247
17248         * d-exp.y (CastExpression): Emit UNOP_CAST_TYPE.
17249
17250 2017-01-06  Yao Qi  <yao.qi@linaro.org>
17251
17252         * x86-linux-nat.h: Include gdb_proc_service.h.
17253
17254 2017-01-06  Yao Qi  <yao.qi@linaro.org>
17255
17256         * ser-base.h: Include serial.h.
17257
17258 2017-01-06  Yao Qi  <yao.qi@linaro.org>
17259
17260         * ppc-linux-tdep.h: Include ppc-tdep.h.
17261
17262 2017-01-06  Yao Qi  <yao.qi@linaro.org>
17263
17264         * nat/amd64-linux-siginfo.h: Include signal.h.
17265
17266 2017-01-06  Yao Qi  <yao.qi@linaro.org>
17267
17268         * nat/aarch64-linux-hw-point.h: Include break-common.h.
17269
17270 2017-01-06  Yao Qi  <yao.qi@linaro.org>
17271
17272         * mi/mi-parse.h: Include mi-cmds.h.
17273
17274 2017-01-06  Yao Qi  <yao.qi@linaro.org>
17275
17276         * inf-loop.c: Don't include "target.h".
17277         * inf-loop.h: Include it here.
17278
17279 2017-01-06  Yao Qi  <yao.qi@linaro.org>
17280
17281         * dfp.h: Include "dboulest.h" and "expression.h".
17282
17283 2017-01-06  Yao Qi  <yao.qi@linaro.org>
17284
17285         * ax-gdb.h: Include "ax.h".
17286
17287 2017-01-06  Yao Qi  <yao.qi@linaro.org>
17288
17289         * Makefile.in (HFILES_NO_SRCDIR): Replace gdb_ptrace.h
17290         with nat/gdb_ptrace.h.
17291
17292 2017-01-05  Yao Qi  <yao.qi@linaro.org>
17293
17294         * mips-fbsd-tdep.c (mips_fbsd_sigframe_init): Move && to
17295         new line.
17296         (mips64_fbsd_sigframe_init): Likewise.
17297
17298 2017-01-04  John Baldwin  <jhb@FreeBSD.org>
17299
17300         * mips-fbsd-tdep.c (_initialize_mips_fbsd_tdep): Use
17301         GDB_OSABI_FREEBSD instead of GDB_OSABI_FREEBSD_ELF.
17302
17303 2017-01-04  John Baldwin  <jhb@FreeBSD.org>
17304
17305         * Makefile.in (ALLDEPFILES): Add mips-fbsd-nat.c.
17306         * NEWS: Mention new FreeBSD/mips native configuration.
17307         * config/mips/fbsd.mh: New file.
17308         * configure.host: Add mips*-*-freebsd*.
17309         * mips-fbsd-nat.c: New file.
17310
17311 2017-01-04  John Baldwin  <jhb@FreeBSD.org>
17312
17313         * Makefile.in (ALL_TARGET_OBS): Add mips-fbsd-tdep.o.
17314         (ALLDEPFILES): Add mips-fbsd-tdep.c.
17315         * NEWS: Mention new FreeBSD/mips target.
17316         * configure.tgt: Add mips*-*-freebsd*.
17317         * mips-fbsd-tdep.c: New file.
17318         * mips-fbsd-tdep.h: New file.
17319
17320 2017-01-04  Yao Qi  <yao.qi@linaro.org>
17321
17322         * dwarf2loc.c (write_pieced_value): Don't use VALUE_FRAME_ID (to),
17323         use c->frame_id when the piece location is DWARF_VALUE_REGISTER.
17324
17325 2017-01-01  Joel Brobecker  <brobecker@adacore.com>
17326
17327         Update copyright year range in all GDB files.
17328
17329 2017-01-01  Joel Brobecker  <brobecker@adacore.com>
17330
17331         * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2016.
17332
17333 For older changes see ChangeLog-2016.
17334 \f
17335 Local Variables:
17336 mode: change-log
17337 left-margin: 8
17338 fill-column: 74
17339 version-control: never
17340 coding: utf-8
17341 End: