Update GDB's list of maintainers to reflect today's reality
[external/binutils.git] / gdb / ChangeLog
1 2017-12-01  Joel Brobecker  <brobecker@adacore.com>
2
3         * MAINTAINERS: Update list of maintainers, moving those who
4         stepped down or became inactive to the "Past Maintainers"
5         section.
6
7 2017-11-30  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
8
9         * configure.ac Don't check for sys/fault.h, sys/syscall.h,
10         sys/proc.h.
11         (NEW_PROC_API): Remove.
12         (prsysent_t, pr_sigset_t, pr_sigaction64_t, pr_siginfo64_t):
13         Likewise.
14         * common/common.m4 (GDB_AC_COMMON): Don't check for sys/syscall.h.
15         * configure: Regenerate.
16         * config.in: Regenerate.
17         * gdbserver/configure: Regenerate.
18         * gdbserver/config.in: Regenerate.
19
20         * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Remove
21         NEW_PROC_API test.
22         * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Likewise.
23
24         * linux-btrace.c: Remove HAVE_SYS_SYSCALL_H test.
25
26         * proc-api.c: Remove !NEW_PROC_API support.
27         Remove HAVE_SYS_PROC_H and HAVE_SYS_USER_H tests.
28         Remove tests for macros always defined on Solaris.
29         * proc-events.c: Remove !NEW_PROC_API support.
30         Remove Remove HAVE_SYS_SYSCALL_H, HAVE_SYS_PROC_H and
31         HAVE_SYS_USER_H tests.
32         (init_syscall_table): Remove non-Solaris syscalls.
33         Remove tests for syscalls present on all Solaris versions.
34         Add missing Solaris 10+ syscalls.
35         (signal_table): Remove non-Solaris signals.
36         Remove tests for signals present on all Solaris versions.
37         (fault_table): Remove non-Solaris faults.
38         Remove tests for faults present on all Solaris versions.
39         * proc-flags.c: Remove !NEW_PROC_API support.
40         (pr_flag_table): Remove non-Solaris and pre-Solaris 7 comments.
41         Remove non-Solaris flags.
42         * proc-why.c: Remove !NEW_PROC_API support.
43         (pr_why_table): Remove meaningless comments.
44         Remove tests for reasons present on all Solaris versions.
45         Remove OSF/1 cases.
46         (proc_prettyfprint_why): Likewise.
47
48         * procfs.c: Remove !NEW_PROC_API and DYNAMIC_SYSCALLS support.
49         Remove HAVE_SYS_FAULT_H and HAVE_SYS_SYSCALL_H tests.
50         Remove WA_READ test, IRIX watchpoint support.
51         (gdb_sigset_t, gdb_sigaction_t, gdb_siginfo_t): Replace by base
52         types.  Change users.
53         (gdb_praddset, gdb_prdelset, gdb_premptysysset, gdb_praddsysset)
54         (gdb_prdelset, gdb_pr_issyssetmember): Replace by base macros.
55         Change callers.
56         Remove CTL_PROC_NAME_FMT tests.
57         (gdb_prstatus_t, gdb_lwpstatus_t): Replace by base types.  Change
58         users.
59         (sysset_t_size): Remove.  Use sizeof (sysset_t) in callers.
60         Remove PROCFS_DONT_PIOCSSIG_CURSIG support.
61         (proc_modify_flag): Replace GDBRESET by PCUNSET.
62         Remove PR_ASYNC, PR_KLC tests.
63         (proc_unset_inherit_on_fork): Remove PR_ASYNC test.
64         (proc_parent_pid): Remove PCWATCH etc. tests.
65         (proc_set_watchpoint): Remove !PCWATCH && !PIOCSWATCH support.
66         Remove PCAGENT test.
67         (proc_get_nthreads) [PIOCNTHR && PIOCTLIST]: Remove.
68         Remove SYS_lwpcreate || SYS_lwp_create test.
69         (proc_get_current_thread): Likewise.
70         [PIOCNTHR && PIOCTLIST]: Remove.
71         [PIOCLSTATUS]: Remove.
72         (procfs_debug_inferior): Remove non-Solaris cases, conditionals.
73         [PRFS_STOPEXEC]: Remove.
74         (syscall_is_lwp_exit): Remove non-Solaris cases, conditionals.
75         (syscall_is_exit): Likewise.
76         (syscall_is_exec): Likewise.
77         (syscall_is_lwp_create): Likewise.
78         Remove SYS_syssgi support.
79         (procfs_wait): Remove PR_ASYNC, !PIOCSSPCACT tests.
80         [SYS_syssgi]: Remove.
81         Remove non-Solaris cases, conditionals.
82         (unconditionally_kill_inferior) [PROCFS_NEED_PIOCSSIG_FOR_KILL]:
83         Remove.
84         (procfs_init_inferior) [SYS_syssgi]: Remove.
85         (procfs_set_exec_trap) [PRFS_STOPEXEC]: Remove.
86         (procfs_inferior_created) [SYS_syssgi]: Remove.
87         (procfs_set_watchpoint): Remove !AIX5 test.
88         (procfs_stopped_by_watchpoint): Remove FLTWATCH test, FLTKWATCH
89         case.
90         (mappingflags) [MA_PHYS]: Remove.
91         (info_mappings_callback): Remove PCAGENT test.
92         Remove PIOCOPENLWP || PCAGENT test.
93
94 2017-11-30  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
95
96         * sol-thread.c (info_solthreads): Constify args.
97         Cast args to void *.
98
99 2017-11-29  John Baldwin  <jhb@FreeBSD.org>
100
101         * target-float.c [HAVE_LIBMPFR]: Define MPFR_USE_INTMAX_T.
102
103 2017-11-29  Joel Brobecker  <brobecker@adacore.com>
104
105         * ada-lang.c (to_fixed_range_type): Make sure that the size
106         of the range type being returned is the same as the size
107         of the range type being fixed.
108
109 2017-11-29  Pedro Alves  <palves@redhat.com>
110
111         PR c++/19436
112         * NEWS: Mention setting breakpoints on functions with C++ ABI
113         tags.
114         * completer.h (completion_match_for_lcd) <match,
115         mark_ignored_range>: New methods.
116         <finish>: Consider ignored ranges.
117         <clear>: Clear ignored ranges.
118         <m_ignored_ranges, m_finished_storage>: New fields.
119         * cp-support.c (cp_search_name_hash): Ignore ABI tags.
120         (cp_symbol_name_matches_1, cp_fq_symbol_name_matches): Pass the
121         completion_match_for_lcd pointer to strncmp_iw_with_mode.
122         (test_cp_symbol_name_cmp): Add [abi:...] tags unit tests.
123         * language.c (default_symbol_name_matcher): Pass the
124         completion_match_for_lcd pointer to strncmp_iw_with_mode.
125         * linespec.c (linespec_lexer_lex_string): Don't tokenize ABI tags.
126         * utils.c (skip_abi_tag): New function.
127         (strncmp_iw_with_mode): Add completion_match_for_lcd parameter.
128         Handle ABI tags.
129         * utils.h (strncmp_iw_with_mode): Add completion_match_for_lcd
130         parameter.
131
132 2017-11-29  Pedro Alves  <palves@redhat.com>
133
134         PR c++/19436
135         * NEWS: Mention setting breakpoints on functions with C++ ABI
136         tags.
137         * completer.h (completion_match_for_lcd) <match,
138         mark_ignored_range>: New methods.
139         <finish>: Consider ignored ranges.
140         <clear>: Clear ignored ranges.
141         <m_ignored_ranges, m_finished_storage>: New fields.
142         * cp-support.c (cp_search_name_hash): Ignore ABI tags.
143         (cp_symbol_name_matches_1, cp_fq_symbol_name_matches): Pass the
144         completion_match_for_lcd pointer to strncmp_iw_with_mode.
145         (test_cp_symbol_name_cmp): Add [abi:...] tags unit tests.
146         * language.c (default_symbol_name_matcher): Pass the
147         completion_match_for_lcd pointer to strncmp_iw_with_mode.
148         * linespec.c (linespec_lexer_lex_string): Don't tokenize ABI tags.
149         * utils.c (skip_abi_tag): New function.
150         (strncmp_iw_with_mode): Add completion_match_for_lcd parameter.
151         Handle ABI tags.
152         * utils.h (strncmp_iw_with_mode): Add completion_match_for_lcd
153         parameter.
154
155 2017-11-29  Pedro Alves  <palves@redhat.com>
156
157         * NEWS: Mention that breakpoints on C++ functions are now set on
158         on all namespaces/classes by default, and mention "break
159         -qualified".
160         * ax-gdb.c (agent_command_1): Adjust to pass a
161         symbol_name_match_type to new_linespec_location.
162         * breakpoint.c (parse_breakpoint_sals): Adjust to
163         get_linespec_location's return type change.
164         (strace_marker_create_sals_from_location): Adjust to pass a
165         symbol_name_match_type to new_linespec_location.
166         (strace_marker_decode_location): Adjust to get_linespec_location's
167         return type change.
168         (strace_command): Adjust to pass a symbol_name_match_type to
169         new_linespec_location.
170         (LOCATION_HELP_STRING): Add paragraph about wildmatching, and
171         mention "-qualified".
172         * c-lang.c (cplus_language_defn): Install cp_search_name_hash.
173         * completer.c (explicit_location_match_type::MATCH_QUALIFIED): New
174         enumerator.
175         (complete_address_and_linespec_locations): New parameter
176         'match_type'.  Pass it down.
177         (explicit_options): Add "-qualified".
178         (collect_explicit_location_matches): Pass the requested match type
179         to the linespec completers.  Handle MATCH_QUALIFIED.
180         (location_completer): Handle "-qualified" combined with linespecs.
181         * cp-support.c (cp_search_name_hash): New.
182         (cp_symbol_name_matches_1): Implement wild matching for C++.
183         (cp_fq_symbol_name_matches): Reimplement.
184         (cp_get_symbol_name_matcher): Return different matchers depending
185         on the lookup name's match type.
186         (selftests::test_cp_symbol_name_matches): Add wild matching tests.
187         * cp-support.h (cp_search_name_hash): New declaration.
188         * dwarf2read.c
189         (selftests::dw2_expand_symtabs_matching::test_symbols): Add
190         symbols.
191         (test_dw2_expand_symtabs_matching_symbol): Add wild matching
192         tests.
193         * guile/scm-breakpoint.c (gdbscm_register_breakpoint_x): Adjust to
194         pass a symbol_name_match_type to new_linespec_location.
195         * linespec.c (linespec_parse_basic): Lookup function symbols using
196         the parser's symbol name match type.
197         (convert_explicit_location_to_linespec): New
198         symbol_name_match_type parameter.  Pass it down to
199         find_linespec_symbols.
200         (convert_explicit_location_to_sals): Pass the location's name
201         match type to convert_explicit_location_to_linespec.
202         (parse_linespec): New match_type parameter.  Save it in the
203         parser.
204         (linespec_parser_new): Default to symbol_name_match_type::WILD.
205         (linespec_complete_function): New symbol_name_match_type
206         parameter.  Use it.
207         (complete_linespec_component): Pass down the parser's recorded
208         name match type.
209         (linespec_complete_label): New symbol_name_match_type parameter.
210         Use it.
211         (linespec_complete): New symbol_name_match_type parameter.  Save
212         it in the parser and pass it down.  Adjust to
213         get_linespec_location's prototype change.
214         (find_function_symbols, find_linespec_symbols): New
215         symbol_name_match_type parameter.  Pass it down instead of
216         assuming symbol_name_match_type::WILD.
217         * linespec.h (linespec_complete, linespec_complete_function)
218         (linespec_complete_label): New symbol_name_match_type parameter.
219         * location.c (event_location::linespec_location): Now a struct
220         linespec_location.
221         (EL_LINESPEC): Adjust.
222         (initialize_explicit_location): Default to
223         symbol_name_match_type::WILD.
224         (new_linespec_location): New symbol_name_match_type parameter.
225         Record it in the location.
226         (get_linespec_location): Now returns a struct linespec_location.
227         (new_explicit_location): Also copy func_name_match_type.
228         (explicit_to_string_internal)
229         (string_to_explicit_location): Handle "-qualified".
230         (copy_event_location): Adjust to LINESPEC_LOCATION type change.
231         Copy symbol_name_match_type fields.
232         (event_location_deleter::operator()): Adjust to LINESPEC_LOCATION
233         type change.
234         (event_location_to_string): Adjust to LINESPEC_LOCATION type
235         change.  Handle "-qualfied".
236         (string_to_explicit_location): Handle "-qualified".
237         (string_to_event_location_basic): New symbol_name_match_type
238         parameter.  Pass it down.
239         (string_to_event_location): Handle "-qualified".
240         * location.h (struct linespec_location): New.
241         (explicit_location::func_name_match_type): New field.
242         (new_linespec_location): Now returns a const linespec_location *.
243         (string_to_event_location_basic): New symbol_name_match_type
244         parameter.
245         (explicit_completion_info::saw_explicit_location_option): New
246         field.
247         * mi/mi-cmd-break.c (mi_cmd_break_insert_1): Adjust to pass a
248         symbol_name_match_type to new_linespec_location.
249         * python/py-breakpoint.c (bppy_init): Likewise.
250         * python/python.c (gdbpy_decode_line): Likewise.
251
252 2017-11-29  Pedro Alves  <palves@redhat.com>
253
254         * ada-lang.c (ada_lookup_name_info::matches): Change type of
255         parameter from completion_match to completion_match_result.
256         Adjust.
257         (do_wild_match, do_full_match, ada_symbol_name_matches): Likewise.
258         * completer.c (completion_tracker::maybe_add_completion): Add
259         match_for_lcd parameter and use it.
260         (completion_tracker::add_completion): Likewise.
261         * completer.h (class completion_match_for_lcd): New class.
262         (completion_match_result::match_for_lcd): New field.
263         (completion_match_result::set_match): New method.
264         (completion_tracker): Add comments.
265         (completion_tracker::add_completion): Add match_for_lcd parameter.
266         (completion_tracker::reset_completion_match_result): Reset
267         match_for_lcd too.
268         (completion_tracker::maybe_add_completion): Add match_for_lcd
269         parameter.
270         (completion_tracker::m_lowest_common_denominator_unique): Extend
271         comments.
272         * cp-support.c (cp_symbol_name_matches_1)
273         (cp_fq_symbol_name_matches): Change type of parameter from
274         completion_match to completion_match_result.  Adjust.
275         * language.c (default_symbol_name_matcher): Change type of
276         parameter from completion_match to completion_match_result.
277         Adjust.
278         * language.h (completion_match_for_lcd): Forward declare.
279         (default_symbol_name_matcher): Change type of parameter from
280         completion_match to completion_match_result.
281         * symtab.c (compare_symbol_name): Adjust.
282         (completion_list_add_name): Pass the match_for_lcd to the tracker.
283         * symtab.h (ada_lookup_name_info::matches): Change type of
284         parameter from completion_match to completion_match_result.
285         (symbol_name_matcher_ftype): Likewise, and update comments.
286
287 2017-11-29  Pedro Alves  <palves@redhat.com>
288
289         * linespec.c (minsym_found, add_minsym): Use msymbol_is_function.
290         * minsyms.c (msymbol_is_text): Delete.
291         (msymbol_is_function): New function.
292         * minsyms.h (msymbol_is_text): Delete.
293         (msymbol_is_function): New declaration.
294         * symtab.c (find_function_alias_target): Use msymbol_is_function.
295
296 2017-11-29  Tom Tromey  <tom@tromey.com>
297
298         * Makefile.in (distclean): Handle the case where rmdir fails.
299
300 2017-11-29  Tom Tromey  <tom@tromey.com>
301
302         * symfile.c (_initialize_symfile): Update usage text for
303         add-symbol-file, symbol-file, load.
304
305 2017-11-29  Tom Tromey  <tom@tromey.com>
306
307         * symfile.c (add_symbol_file_command): Error if some arguments to
308         -s are missing.  Change unrecognized-argument error message.
309         (_initialize_symfile): Fix usage text for add-symbol-file.
310
311 2017-11-27  Tom Tromey  <tom@tromey.com>
312
313         * Makefile.in (REMOTE_OBS): Remove.
314         (SFILES): Remove remote sources.
315         (COMMON_SFILES): Add remote sources.
316         (ALLDEPFILES): Remove dcache.c.
317
318 2017-11-27  Tom Tromey  <tom@tromey.com>
319
320         * Makefile.in (SUBDIR_TARGET_SRCS, SUBDIR_TARGET_OBS): New
321         variables.
322         (SFILES): Use SUBDIR_TARGET_SRCS.
323         (COMMON_OBS): Use SUBDIR_TARGET_OBS.  Remove waitstatus.o.
324         (CONFIG_SRC_SUBDIR): Add target.
325         (%.o): Remove target rule.
326
327 2017-11-27  Tom Tromey  <tom@tromey.com>
328
329         * Makefile.in (COMMON_OBS): Remove filename-seen-cache.o,
330         registry.o, thread-fsm.o, debug.o.
331         (COMMON_SFILES): Add filename-seen-cache.c, registry.c,
332         thread-fsm.c, debug.c.
333
334 2017-11-27  Tom Tromey  <tom@tromey.com>
335
336         * Makefile.in (COMMON_SFILES): New.
337         (SFILES): Move some entries to COMMON_SFILES.
338         (COMMON_OBS): Use COMMON_SFILES.
339
340 2017-11-27  Tom Tromey  <tom@tromey.com>
341
342         * Makefile.in (YYFILES): Update comment.
343         (YYOBJ): Redefine.
344
345 2017-11-27  Tom Tromey  <tom@tromey.com>
346
347         * Makefile.in (SUBDIR_PYTHON_OBS): Redefine.
348         (CONFIG_SRC_SUBDIR): Add python.
349         (%.o): Remove python rule.
350         (python/%.o): New rule.
351         * configure: Rebuild.
352         * configure.ac (CONFIG_OBS): Refer to python/python.o
353
354 2017-11-27  Tom Tromey  <tom@tromey.com>
355
356         * configure: Rebuild.
357         * configure.ac (CONFIG_OBS): Refer to guile/guile.o.
358         * Makefile.in (SUBDIR_GUILE_OBS): Redefine.
359         (CONFIG_SRC_SUBDIR): Add guile.
360         (%.o): Remove guile rule.
361
362 2017-11-27  Tom Tromey  <tom@tromey.com>
363
364         * Makefile.in (SUBDIR_UNITTESTS_OBS): Redefine.
365         (%.o): Remove unittests rule.
366         (CONFIG_SRC_SUBDIR): Add unittests.
367
368 2017-11-27  Tom Tromey  <tom@tromey.com>
369
370         * Makefile.in (SUBDIR_TUI_OBS): Redefine.
371         (CONFIG_SRC_SUBDIR): Add tui.
372         (%.o): Remove tui rule.
373
374 2017-11-27  Tom Tromey  <tom@tromey.com>
375
376         * Makefile.in (SUBDIR_GCC_COMPILE_OBS): Redefine.
377         (%.o): Remove compile rule.
378         (CONFIG_SRC_SUBDIR): Add compile.
379
380 2017-11-27  Tom Tromey  <tom@tromey.com>
381
382         * Makefile.in (SUBDIR_MI_OBS): Redefine.
383         (%.o): Remove mi rule.
384         (CONFIG_SRC_SUBDIR): Add mi.
385         (COMMON_OBS): Use mi/mi-common.o
386
387 2017-11-27  Tom Tromey  <tom@tromey.com>
388
389         * Makefile.in (SUBDIR_CLI_OBS): Redefine.
390         (%.o): Remove cli rule.
391         (CONFIG_SRC_SUBDIR): Add cli.
392
393 2017-11-27  Tom Tromey  <tom@tromey.com>
394
395         * configure.ac (CONFIG_SRC_SUBDIR): Don't subst.
396         * configure: Rebuild.
397         * Makefile.in (CONFIG_SRC_SUBDIR): Redefine.
398         (CONFIG_DEP_SUBDIR): New variable.
399         (%.o): Add order-only dependency.
400         ($(CONFIG_DEP_SUBDIR)): New target.
401
402 2017-11-26  Dominik Czarnota  <dominik.b.czarnota@gmail.com>
403
404         PR gdb/21945
405         * findcmd.c (_initialize_mem_search): Update find command help
406         text.
407
408 2017-11-26  Simon Marchi  <simon.marchi@polymtl.ca>
409
410         * python/python.c (do_start_initialization): Change progname
411         type to gdb::unique_xmalloc_ptr.  Release the pointer when using
412         Python 2.
413
414 2017-11-26  Tom Tromey  <tom@tromey.com>
415
416         * common/format.h: Add include guards.
417
418 2017-11-26  Tom Tromey  <tom@tromey.com>
419
420         * nat/linux-personality.h (class
421         maybe_disable_address_space_randomization): New class.
422         (maybe_disable_address_space_randomization): Don't declare
423         function.
424         * nat/linux-personality.c (restore_personality)
425         (make_disable_asr_cleanup): Remove.
426         (maybe_disable_address_space_randomization): Now a constructor.
427         (~maybe_disable_address_space_randomization): New destructor.
428         * linux-nat.c (linux_nat_create_inferior): Update.
429
430 2017-11-26  Tom Tromey  <tom@tromey.com>
431
432         * gcore.c (write_gcore_file_1): Use gdb::unique_xmalloc_ptr.
433
434 2017-11-26  Ulrich Weigand  <uweigand@de.ibm.com>
435
436         * spu-tdep.c (spu_software_single_step): Access SPU_LSLR_REGNUM as
437         "cooked" register.  Access only first four bytes of branch target
438         registers.
439
440 2017-11-25  Sergio Durigan Junior  <sergiodj@redhat.com>
441
442         PR gdb/22491
443         * stap-probe.c (relocate_address): New function.
444         (stap_probe::get_relocated_address): Use 'relocate_address'.
445         (stap_probe::set_semaphore): Use 'relocate_address' and pass
446         'm_sem_addr'.
447         (stap_probe::clear_semaphore): Likewise.
448
449 2017-11-25  Pedro Alves  <palves@redhat.com>
450
451         * dictionary.c: Include "safe-ctype.h".
452         * minsyms.c: Include "safe-ctype.h".
453         * minsyms.c (SYMBOL_HASH_NEXT): Use TOLOWER instead of tolower.
454
455 2017-11-25   Pedro Alves  <palves@redhat.com>
456
457         * completer.c (complete_line_internal_1): Skip spaces until the
458         start of the command.
459
460 2017-11-24  Pedro Alves  <palves@redhat.com>
461
462         * cp-support.c (cp_symbol_name_matches_1): New, factored out from
463         cp_fq_symbol_name_matches.  Pass language_cplus to
464         strncmp_with_mode.
465         (cp_fq_symbol_name_matches): Call cp_symbol_name_matches_1.
466         (selftests::test_cp_symbol_name_cmp): New.
467         (_initialize_cp_support): Register "cp_symbol_name_matches"
468         selftests.
469         * language.c (default_symbol_name_matcher): Pass language_minimal
470         to strncmp_iw_with_mode.
471         * utils.c: Include "cp-support.h" and <algorithm>.
472         (valid_identifier_name_char, cp_skip_operator_token, skip_ws)
473         (cp_is_operator): New functions.
474         (strncmp_iw_with_mode): Use them.  Add language parameter.  Don't
475         skip whitespace in the symbol name when the lookup name doesn't
476         have spaces, and vice versa.
477         (strncmp_iw, strcmp_iw): Pass language to strncmp_iw_with_mode.
478         * utils.h (strncmp_iw_with_mode): Add language parameter.
479
480 2017-11-24  Joel Brobecker  <brobecker@adacore.com>
481
482         * ada-lang.c (ada_exception_message_1, ada_exception_message):
483         New functions.
484         (print_it_exception): If available, display the exception
485         message as well.
486         * NEWS: Document new feature.
487
488 2017-11-24  Ulrich Weigand  <uweigand@de.ibm.com>
489
490         * configure.nat <spu-linux>: Add fork-inferior.o to NATDEPFILES.
491
492 2017-11-24  Philipp Rudo  <prudo@linux.vnet.ibm.com>
493
494         * dtrace-probe.c (dtrace_probe::build_arg_exprs)
495         (dtrace_probe::is_enabled, dtrace_probe::enable)
496         (dtrace_probe::disable): Remove keyword 'struct' at for-range
497         variable
498         * probe.c (gen_ui_out_table_header_info)
499         (print_ui_out_not_applicables):  Remove keyword 'struct' at
500         for-range variable
501
502 2017-11-24  Alan Hayward  <alan.hayward@arm.com>
503
504         * configure.tgt: Add arch/aarch64.o
505
506 2017-11-24  Simon Marchi  <simon.marchi@polymtl.ca>
507
508         * common/common-utils.h: Include poison.h.
509         (xfree): Remove declaration, add definition with static_assert.
510         * common/common-utils.c (xfree): Remove.
511         * common/poison.h (IsMallocatable): Define.
512         (IsFreeable): Define.
513         (free): Delete for non-freeable types.
514         (xnew): New.
515         (XNEW): Undef and redefine.
516         (xcnew): New.
517         (XCNEW): Undef and redefine.
518         (xdelete): New.
519         (XDELETE): Undef and redefine.
520         (xnewvec): New.
521         (XNEWVEC): Undef and redefine.
522         (xcnewvec): New.
523         (XCNEWVEC): Undef and redefine.
524         (xresizevec): New.
525         (XRESIZEVEC): Undef and redefine.
526         (xdeletevec): New.
527         (XDELETEVEC): Undef and redefine.
528         (xnewvar): New.
529         (XNEWVAR): Undef and redefine.
530         (xcnewvar): New.
531         (XCNEWVAR): Undef and redefine.
532         (xresizevar): New.
533         (XRESIZEVAR): Undef and redefine.
534
535 2017-11-24  Simon Marchi  <simon.marchi@polymtl.ca>
536
537         * gdbthread.h (private_thread_info): Define structure type, add
538         virtual pure destructor.
539         (thread_info) <priv>: Change type to unique_ptr.
540         <private_dtor>: Remove.
541         * thread.c (add_thread_with_info): Adjust to use of unique_ptr.
542         (private_thread_info::~private_thread_info): Provide default
543         implementation.
544         (thread_info::~thread_info): Don't call private_dtor nor
545         manually free priv.
546         * aix-thread.c (private_thread_info): Rename to ...
547         (aix_thread_info): ... this.
548         (get_aix_thread_info): New.
549         (sync_threadlists): Adjust.
550         (iter_tid): Adjust.
551         (aix_thread_resume): Adjust.
552         (aix_thread_fetch_registers): Adjust.
553         (aix_thread_store_registers): Adjust.
554         (aix_thread_extra_thread_info): Adjust.
555         * darwin-nat.h (private_thread_info): Rename to ...
556         (darwin_thread_info): ... this.
557         (get_darwin_thread_info): New.
558         * darwin-nat.c (darwin_init_thread_list): Adjust.
559         (darwin_check_new_threads): Adjust.
560         (thread_info_from_private_thread_info): Adjust.
561         * linux-thread-db.c (private_thread_info): Rename to ...
562         (thread_db_thread_info): ... this, initialize fields.
563         (get_thread_db_thread_info): New.
564         <dying>: Change type to bool.
565         (update_thread_state): Adjust to type rename.
566         (record_thread): Adjust to type rename an use of unique_ptr.
567         (thread_db_pid_to_str): Likewise.
568         (thread_db_extra_thread_info): Likewise.
569         (thread_db_thread_handle_to_thread_info): Likewise.
570         (thread_db_get_thread_local_address): Likewise.
571         * nto-tdep.h (private_thread_info): Rename to ...
572         (nto_thread_info): ... this, initialize fields.
573         (get_nto_thread_info): New.
574         <name>: Change type to std::string.
575         * nto-tdep.c (nto_extra_thread_info): Adjust to type rename and
576         use of unique_ptr.
577         * nto-procfs.c (update_thread_private_data_name): Adjust to
578         std::string change, allocate nto_private_thread_info with new.
579         (update_thread_private_data): Adjust to unique_ptr.
580         * remote.c (private_thread_info): Rename to ...
581         (remote_thread_info): ... this, initialize data members with
582         default values.
583         <extra, name>: Change type to std::string.
584         <thread_handle>: Change type to non-pointer.
585         (free_private_thread_info): Remove.
586         (get_private_info_thread): Rename to...
587         (get_remote_thread_info): ... this, change return type, adjust to
588         use of unique_ptr, use remote_thread_info constructor.
589         (remote_add_thread): Adjust.
590         (get_private_info_ptid): Rename to...
591         (get_remote_thread_info): ...this, change return type.
592         (remote_thread_name): Use get_remote_thread_info, adjust to
593         change to std::string.
594         (struct thread_item) <~thread_item>: Remove.
595         <thread_handle>: Make non pointer.
596         (start_thread): Adjust to thread_item::thread_handle type
597         change.
598         (remote_update_thread_list): Adjust to type name change, move
599         strings from temporary to long-lived object instead of
600         duplicating.
601         (remote_threads_extra_info): Use get_remote_thread_info.
602         (process_initial_stop_replies): Likewise.
603         (resume_clear_thread_private_info): Likewise.
604         (remote_resume): Adjust to type name change.
605         (remote_commit_resume): Use get_remote_thread_info.
606         (process_stop_reply): Adjust to type name change.
607         (remote_stopped_by_sw_breakpoint): Use get_remote_thread_info.
608         (remote_stopped_by_hw_breakpoint): Likewise.
609         (remote_stopped_by_watchpoint): Likewise.
610         (remote_stopped_data_address): Likewise.
611         (remote_core_of_thread): Likewise.
612         (remote_thread_handle_to_thread_info): Use
613         get_private_info_thread, adjust to thread_handle field type
614         change.
615
616 2017-11-24  Simon Marchi  <simon.marchi@polymtl.ca>
617
618         * remote.c (struct thread_item): Add constructor, disable copy
619         construction and copy assignment, define default move
620         construction and move assignment.
621         <extra, name>: Change type to std::string.
622         <core>: Initialize.
623         <thread_handle>: Make non-pointer.
624         (thread_item_t): Remove typedef.
625         (DEF_VEC_O(thread_item_t)): Remove.
626         (threads_listing_context) <contains_thread>: New method.
627         <remove_thread>: New method.
628         <items>: Change type to std::vector.
629         (clear_threads_listing_context): Remove.
630         (threads_listing_context_remove): Remove.
631         (remote_newthread_step): Use thread_item constructor, adjust to
632         change to std::vector.
633         (start_thread): Use thread_item constructor, adjust to change to
634         std::vector.
635         (end_thread): Adjust to change to std::vector and std::string.
636         (remote_get_threads_with_qthreadinfo): Use thread_item
637         constructor, adjust to std::vector.
638         (remote_update_thread_list): Adjust to change to std::vector and
639         std::string, use threads_listing_context methods.
640         (remove_child_of_pending_fork): Adjust.
641         (remove_new_fork_children): Adjust.
642         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add rsp-low-selftests.c.
643         (SUBDIR_UNITTESTS_OBS): Add rsp-low-selftests.o.
644         * unittests/rsp-low-selftests.c: New file.
645         * common/rsp-low.h: Include common/byte-vector.h.
646         (hex2bin): New overload.
647         * common/rsp-low.c (hex2bin): New overload.
648
649 2017-11-24  Simon Marchi  <simon.marchi@ericsson.com>
650
651         * inferior.h (private_inferior): Define structure type, add
652         virtual pure destructor.
653         (inferior) <priv>: Change type to unique_ptr.
654         * inferior.c (private_inferior::~private_inferior): Provide
655         default implementation.
656         (inferior::~inferior): Don't free priv field.
657         (exit_inferior_1): Likewise.
658         * darwin-nat.h (struct darwin_exception_info): Initialize fields.
659         (darwin_exception_info): Remove typedef.
660         (DEF_VEC_O (darwin_thread_t)); Remove.
661         (private_inferior): Rename to ...
662         (darwin_private_inferior): ... this, extend private_inferior.
663         (get_darwin_inferior): New.
664         <threads>: Change type to std::vector of darwin_thread_t pointers.
665         * darwin-nat.c (darwin_check_new_threads): Adjust.
666         (find_inferior_task_it): Adjust.
667         (darwin_find_thread); Adjust.
668         (darwin_suspend_inferior): Adjust.
669         (darwin_resume_inferior): Adjust.
670         (darwin_find_new_inferior): Adjust.
671         (darwin_decode_notify_message): Adjust.
672         (darwin_send_reply): Adjust.
673         (darwin_resume_inferior_threads): Adjust.
674         (darwin_suspend_inferior_threads): Adjust.
675         (darwin_decode_message): Adjust.
676         (darwin_wait): Adjust.
677         (darwin_interrupt): Adjust.
678         (darwin_deallocate_threads): Adjust.
679         (darwin_mourn_inferior): Adjust, don't free private data.
680         (darwin_reply_to_all_pending_messages): Adjust.
681         (darwin_stop_inferior): Adjust.
682         (darwin_setup_exceptions): Adjust.
683         (darwin_kill_inferior): Adjust.
684         (darwin_setup_request_notification): Adjust.
685         (darwin_attach_pid): Adjust.
686         (darwin_init_thread_list): Adjust.
687         (darwin_setup_fake_stop_event): Adjust.
688         (darwin_attach): Adjust.
689         (darwin_detach): Adjust.
690         (darwin_xfer_partial): Adjust.
691         (set_enable_mach_exceptions): Adjust.
692         (darwin_pid_to_exec_file): Adjust.
693         (darwin_get_ada_task_ptid): Adjust.
694         * darwin-nat-info.c (get_task_from_args): Adjust.
695         (info_mach_ports_command): Adjust.
696         (info_mach_region_command): Adjust.
697         (info_mach_exceptions_command): Adjust.
698         * remote.c (private_inferior): Rename to ...
699         (remote_private_inferior): ... this, initialize fields.
700         (get_remote_inferior); New.
701         (remote_commit_resume): Use get_remote_inferior.
702         (check_pending_event_prevents_wildcard_vcont_callback): Likewise.
703
704 2017-11-24  Pedro Alves  <palves@redhat.com>
705
706         * NEWS: Mention linespecs and explicit locations, and completion
707         improvements.
708
709 2017-11-24  Yao Qi  <yao.qi@linaro.org>
710
711         * regcache.c (regcache::dump): Remove footnote_register_size.
712
713 2017-11-24  Yao Qi  <yao.qi@linaro.org>
714
715         * regcache.c (cooked_read_test): Add more test for readonly
716         regcache.
717
718 2017-11-24  Yao Qi  <yao.qi@linaro.org>
719
720         * gdbarch-selftests.c (test_target_has_registers): Move it to
721         target.c.
722         (test_target_has_stack): Likewise.
723         (test_target_has_memory): Likewise.
724         (test_target_prepare_to_store): Likewise.
725         (test_target_store_registers): Likewise.
726         (test_target_ops): Likewise.
727         * regcache.c: Include selftest-arch.h and gdbthread.h.
728         (target_ops_no_register): New class.
729         (test_target_fetch_registers): New.
730         (test_target_store_registers): New.
731         (test_target_xfer_partial): New.
732         (readwrite_regcache): New.
733         (cooked_read_test): New.
734         (_initialize_regcache): Register the test.
735         * target.c: (test_target_has_registers): Moved from
736         gdbarch-selftests.c.
737         (test_target_has_stack): Likewise.
738         (test_target_has_memory): Likewise.
739         (test_target_prepare_to_store): Likewise.
740         (test_target_store_registers): Likewise.
741         * target.h (test_target_ops): New class.
742
743 2017-11-24  Alan Hayward  <alan.hayward@arm.com>
744
745         * aarch64-tdep.c (_initialize_aarch64_tdep): Add target desc
746         selftest.
747
748 2017-11-24  Alan Hayward  <alan.hayward@arm.com>
749
750         * aarch64-tdep.c (_initialize_aarch64_tdep): Remove init.
751         * arch/aarch64.c (aarch64_create_target_description): Create
752         new target description.
753         * features/Makefile: Add new files.
754         * features/aarch64.c: Remove file.
755         * features/aarch64-core.c: New autogenerated file.
756         * features/aarch64-fpu.c: New autogenerated file.
757         * target-descriptions.c (maint_print_c_tdesc_cmd): Check for aarch64.
758
759 2017-11-24  Alan Hayward  <alan.hayward@arm.com>
760
761         * Makefile.in: Add new files.
762         * aarch64-linux-nat.c (aarch64_linux_read_description): Call
763         aarch64_read_description.
764         * aarch64-linux-tdep.c (aarch64_linux_core_read_description):
765         Call aarch64_read_description.
766         * aarch64-tdep.c (aarch64_read_description): New function.
767         (aarch64_gdbarch_init): Call aarch64_read_description.
768         * aarch64-tdep.h (aarch64_read_description): New function.
769         * arch/aarch64.c: New file.
770         * configure.tgt: Add new files.
771
772 2017-11-24  Yao Qi  <yao.qi@linaro.org>
773
774         * mi/mi-main.c (register_changed_p): Update.
775         * value.c (value_contents_bits_eq): Change return type.
776         (value_contents_eq): Likewise.
777         * value.h: Update comments.
778
779 2017-11-24  Yao Qi  <yao.qi@linaro.org>
780
781         * mi/mi-main.c (mi_cmd_data_list_changed_registers): Remove
782         local 'changed'.  Remove error.
783         (register_changed_p): Change return type to bool.
784
785 2017-11-24  Yao Qi  <yao.qi@linaro.org>
786
787         * arch/tic6x.c: New file.
788         * arch/tic6x.h: New file.
789         * features/Makefile (FEATURE_XMLFILES): Add tic6x-c6xp.xml,
790         tic6x-core.xml and tic6x-gp.xml.
791         * features/tic6x-c6xp.c: Generated.
792         * features/tic6x-core.c: Generated.
793         * features/tic6x-gp.c: Generated.
794         * target-descriptions.c (maint_print_c_tdesc_cmd): Match
795         "tic6x-".
796
797 2017-11-23  Simon Marchi  <simon.marchi@ericsson.com>
798
799         * mi/mi-main.c (list_available_thread_groups): Change map value
800         type to std::vector.
801
802 2017-11-23  Simon Marchi  <simon.marchi@ericsson.com>
803
804         * osdata.c (osdata_end_column, get_osdata): Remove std::move.
805
806 2017-11-23  Simon Marchi  <simon.marchi@ericsson.com>
807
808         * varobj.c (struct varobj_dynamic) <children_requested_>: Rename
809         back to...
810         <children_requested>: ... this.
811         (varobj_get_num_children, varobj_update): Adjust.
812
813 2017-11-23  Simon Marchi  <simon.marchi@ericsson.com>
814
815         * ada-varobj.c (ada_value_is_changeable_p): Change int to bool where applicable.
816         (ada_value_has_mutated): Likewise.
817         * c-varobj.c (varobj_is_anonymous_child): Likewise.
818         (c_is_path_expr_parent): Likewise.
819         * mi/mi-cmd-var.c (varobj_update_one): Likewise.
820         (mi_cmd_var_set_frozen): Likewise.
821         (mi_cmd_var_update_iter): Likewise.
822         (mi_cmd_var_update): Likewise.
823         * varobj.c (pretty_printing): Likewise.
824         (varobj_enable_pretty_printing): Likewise.
825         (struct varobj_root) <floating, is_valid>: Likewise.
826         (struct varobj_dynamic) <children_requested>: Likewise.
827         (delete_variable): Likewise.
828         (delete_variable_1): Likewise.
829         (install_variable): Likewise.
830         (update_type_if_necessary): Likewise.
831         (install_new_value): Likewise.
832         (value_of_root): Likewise.
833         (is_root_p): Likewise.
834         (varobj_create): Likewise.
835         (varobj_delete): Likewise.
836         (varobj_has_more): Likewise.
837         (varobj_set_frozen): Likewise.
838         (varobj_get_frozen): Likewise.
839         (install_dynamic_child): Likewise.
840         (dynamic_varobj_has_child_method): Likewise.
841         (update_dynamic_varobj_children): Likewise.
842         (varobj_get_num_children): Likewise.
843         (varobj_list_children): Likewise.
844         (is_path_expr_parent): Likewise.
845         (varobj_default_is_path_expr_parent): Likewise.
846         (varobj_is_dynamic_p): Likewise.
847         (varobj_set_value): Likewise.
848         (varobj_value_has_mutated): Likewise.
849         (varobj_update): Likewise.
850         (check_scope): Likewise.
851         (value_of_root_1): Likewise.
852         (varobj_value_get_print_value): Likewise.
853         (varobj_editable_p): Likewise.
854         (varobj_value_is_changeable_p): Likewise.
855         (varobj_floating_p): Likewise.
856         (varobj_default_value_is_changeable_p): Likewise.
857         (varobj_invalidate_iter): Likewise.
858         * varobj.h (struct varobj_update_result) <type_changed,
859         children_changed, changed, value_installed>: Likewise.
860         (struct varobj) <updated, frozen, not_fetched>: Likewise.
861         (struct lang_varobj_ops) <value_is_changeable_p,
862         value_has_mutated, is_path_expr_parent>: Likewise.
863         (varobj_delete): Likewise.
864         (varobj_set_frozen): Likewise.
865         (varobj_get_frozen): Likewise.
866         (varobj_set_value): Likewise.
867         (varobj_update): Likewise.
868         (varobj_editable_p): Likewise.
869         (varobj_floating_p): Likewise.
870         (varobj_has_more): Likewise.
871         (varobj_is_dynamic_p): Likewise.
872         (varobj_default_value_is_changeable_p): Likewise.
873         (varobj_value_is_changeable_p): Likewise.
874         (varobj_is_anonymous_child): Likewise.
875         (varobj_default_is_path_expr_parent): Likewise.
876
877 2017-11-22  Sergio Durigan Junior  <sergiodj@redhat.com>
878
879         * dtrace-probe.c (struct probe_ops dtrace_probe_ops): Delete.
880         (struct dtrace_probe_arg) <dtrace_probe_arg>: New constructor.
881         <type_str>: Convert to 'std::string'.
882         <expr>: Convert to 'expression_up'.
883         (dtrace_probe_arg_s): Delete type and VEC.
884         (dtrace_probe_enabler_s): Likewise.
885         (struct dtrace_probe): Replace by...
886         (class dtrace_static_probe_ops): ...this and...
887         (class dtrace_probe): ...this.
888         (dtrace_probe_is_linespec): Rename to...
889         (dtrace_static_probe_ops::is_linespec): ...this.  Adjust code
890         to reflect change.
891         (dtrace_process_dof_probe): Use 'std::vector' instead of VEC.
892         Adjust code.  Create new instance of 'dtrace_probe'.
893         (dtrace_build_arg_exprs): Rename to...
894         (dtrace_probe::build_arg_exprs): ...this.  Adjust code to
895         reflect change.
896         (dtrace_get_probes): Rename to...
897         (dtrace_static_probe_ops::get_probes): ...this.  Adjust code
898         to reflect change.
899         (dtrace_get_arg): Rename to...
900         (dtrace_probe::get_arg_by_number): ...this.  Adjust code to
901         reflect change.
902         (dtrace_probe_is_enabled): Rename to...
903         (dtrace_probe::is_enabled): ...this.  Adjust code to reflect
904         change.
905         (dtrace_get_probe_address): Rename to...
906         (dtrace_probe::get_relocated_address): ...this.  Adjust code
907         to reflect change.
908         (dtrace_get_probe_argument_count): Rename to...
909         (dtrace_probe::get_argument_count): ...this.  Adjust code to
910         reflect change.
911         (dtrace_can_evaluate_probe_arguments): Rename to...
912         (dtrace_probe::can_evaluate_arguments): ...this.  Adjust code
913         to reflect change.
914         (dtrace_evaluate_probe_argument): Rename to...
915         (dtrace_probe::evaluate_argument): ...this.  Adjust code to
916         reflect change.
917         (dtrace_compile_to_ax): Rename to...
918         (dtrace_probe::compile_to_ax): ...this.  Adjust code to
919         reflect change.
920         (dtrace_probe_destroy): Delete.
921         (dtrace_type_name): Rename to...
922         (dtrace_static_probe_ops::type_name): ...this.  Adjust code to
923         reflect change.
924         (dtrace_probe::get_static_ops): New method.
925         (dtrace_gen_info_probes_table_header): Rename to...
926         (dtrace_static_probe_ops::gen_info_probes_table_header):
927         ...this.  Adjust code to reflect change.
928         (dtrace_gen_info_probes_table_values): Rename to...
929         (dtrace_probe::gen_info_probes_table_values): ...this.  Adjust
930         code to reflect change.
931         (dtrace_enable_probe): Rename to...
932         (dtrace_probe::enable_probe): ...this.  Adjust code to reflect
933         change.
934         (dtrace_disable_probe): Rename to...
935         (dtrace_probe::disable_probe): ...this.  Adjust code to reflect
936         change.
937         (struct probe_ops dtrace_probe_ops): Delete.
938         (info_probes_dtrace_command): Call 'info_probes_for_spops'
939         instead of 'info_probes_for_ops'.
940         (_initialize_dtrace_probe): Use 'all_static_probe_ops' instead
941         of 'all_probe_ops'.
942
943 2017-11-22  Sergio Durigan Junior  <sergiodj@redhat.com>
944             Simon Marchi  <simark@simark.ca>
945
946         * stap-probe.c (struct probe_ops stap_probe_ops): Delete
947         variable.
948         (struct stap_probe_arg) <stap_probe_arg>: New constructor.
949         <aexpr>: Change type to 'expression_up'.
950         (stap_probe_arg_s): Delete type and VEC.
951         (struct stap_probe): Delete.  Replace by...
952         (class stap_static_probe_ops): ...this and...
953         (class stap_probe): ...this.  Rename variables to add 'm_'
954         prefix.  Do not use 'union' for arguments anymore.
955         (stap_get_expected_argument_type): Receive probe name instead
956         of 'struct stap_probe'.  Adjust code.
957         (stap_parse_probe_arguments): Rename to...
958         (stap_probe::parse_arguments): ...this.  Adjust code to
959         reflect change.
960         (stap_get_probe_address): Rename to...
961         (stap_probe::get_relocated_address): ...this.  Adjust code
962         to reflect change.
963         (stap_get_probe_argument_count): Rename to...
964         (stap_probe::get_argument_count): ...this.  Adjust code
965         to reflect change.
966         (stap_get_arg): Rename to...
967         (stap_probe::get_arg_by_number'): ...this. Adjust code to
968         reflect change.
969         (can_evaluate_probe_arguments): Rename to...
970         (stap_probe::can_evaluate_arguments): ...this.  Adjust code
971         to reflect change.
972         (stap_evaluate_probe_argument): Rename to...
973         (stap_probe::evaluate_argument): ...this.  Adjust code
974         to reflect change.
975         (stap_compile_to_ax): Rename to...
976         (stap_probe::compile_to_ax): ...this.  Adjust code to
977         reflect change.
978         (stap_probe_destroy): Delete.
979         (stap_modify_semaphore): Adjust comment.
980         (stap_set_semaphore): Rename to...
981         (stap_probe::set_semaphore): ...this.  Adjust code to reflect
982         change.
983         (stap_clear_semaphore): Rename to...
984         (stap_probe::clear_semaphore): ...this.  Adjust code to
985         reflect change.
986         (stap_probe::get_static_ops): New method.
987         (handle_stap_probe): Adjust code to create instance of
988         'stap_probe'.
989         (stap_get_probes): Rename to...
990         (stap_static_probe_ops::get_probes): ...this.  Adjust code to
991         reflect change.
992         (stap_probe_is_linespec): Rename to...
993         (stap_static_probe_ops::is_linespec): ...this.  Adjust code to
994         reflect change.
995         (stap_type_name): Rename to...
996         (stap_static_probe_ops::type_name): ...this.  Adjust code to
997         reflect change.
998         (stap_gen_info_probes_table_header): Rename to...
999         (stap_static_probe_ops::gen_info_probes_table_header):
1000         ...this.  Adjust code to reflect change.
1001         (stap_gen_info_probes_table_values): Rename to...
1002         (stap_probe::gen_info_probes_table_values): ...this.  Adjust
1003         code to reflect change.
1004         (struct probe_ops stap_probe_ops): Delete.
1005         (info_probes_stap_command): Use 'info_probes_for_spops'
1006         instead of 'info_probes_for_ops'.
1007         (_initialize_stap_probe): Use 'all_static_probe_ops' instead
1008         of 'all_probe_ops'.
1009
1010 2017-11-22  Sergio Durigan Junior  <sergiodj@redhat.com>
1011
1012         * break-catch-throw.c (fetch_probe_arguments): Use
1013         'probe.prob' instead of 'probe.probe'.
1014         * breakpoint.c (create_longjmp_master_breakpoint): Call
1015         'can_evaluate_arguments' and 'get_relocated_address' methods
1016         from probe.
1017         (create_exception_master_breakpoint): Likewise.
1018         (add_location_to_breakpoint): Use 'sal->prob' instead of
1019         'sal->probe'.
1020         (bkpt_probe_insert_location): Call 'set_semaphore' method from
1021         probe.
1022         (bkpt_probe_remove_location): Likewise, for 'clear_semaphore'.
1023         * elfread.c (elf_get_probes): Use 'static_probe_ops' instead
1024         of 'probe_ops'.
1025         (probe_key_free): Call 'delete' on probe.
1026         (check_exception_resume): Use 'probe.prob' instead of
1027         'probe.probe'.
1028         * location.c (string_to_event_location_basic): Call
1029         'probe_linespec_to_static_ops'.
1030         * probe.c (class any_static_probe_ops): New class.
1031         (any_static_probe_ops any_static_probe_ops): New variable.
1032         (parse_probes_in_pspace): Receive 'static_probe_ops' as
1033         argument.  Adjust code to reflect change.
1034         (parse_probes): Use 'static_probe_ops' instead of
1035         'probe_ops'.  Adjust code to reflect change.
1036         (find_probes_in_objfile): Call methods to get name and
1037         provider from probe.
1038         (find_probe_by_pc): Use 'result.prob' instead of
1039         'result.probe'.  Call 'get_relocated_address' method from
1040         probe.
1041         (collect_probes): Adjust comment and argument list to receive
1042         'static_probe_ops' instead of 'probe_ops'.  Adjust code to
1043         reflect change.  Call necessary methods from probe.
1044         (compare_probes): Call methods to get name and provider from
1045         probes.
1046         (gen_ui_out_table_header_info): Receive 'static_probe_ops'
1047         instead of 'probe_ops'.  Use 'std::vector' instead of VEC,
1048         adjust code accordingly.
1049         (print_ui_out_not_applicables): Likewise.
1050         (info_probes_for_ops): Rename to...
1051         (info_probes_for_spops): ...this.  Receive 'static_probe_ops'
1052         as argument instead of 'probe_ops'.  Adjust code.  Call
1053         necessary methods from probe.
1054         (info_probes_command): Use 'info_probes_for_spops'.
1055         (enable_probes_command): Pass correct argument to
1056         'collect_probes'.  Call methods from probe.
1057         (disable_probes_command): Likewise.
1058         (get_probe_address): Move to 'any_static_probe_ops::get_address'.
1059         (get_probe_argument_count): Move to
1060         'any_static_probe_ops::get_argument_count'.
1061         (can_evaluate_probe_arguments): Move to
1062         'any_static_probe_ops::can_evaluate_arguments'.
1063         (evaluate_probe_argument): Move to
1064         'any_static_probe_ops::evaluate_argument'.
1065         (probe_safe_evaluate_at_pc): Use 'probe.prob' instead of
1066         'probe.probe'.
1067         (probe_linespec_to_ops): Rename to...
1068         (probe_linespec_to_static_ops): ...this.  Adjust code.
1069         (probe_any_is_linespec): Rename to...
1070         (any_static_probe_ops::is_linespec): ...this.
1071         (probe_any_get_probes): Rename to...
1072         (any_static_probe_ops::get_probes): ...this.
1073         (any_static_probe_ops::type_name): New method.
1074         (any_static_probe_ops::gen_info_probes_table_header): New
1075         method.
1076         (compute_probe_arg): Use 'pc_probe.prob' instead of
1077         'pc_probe.probe'.  Call methods from probe.
1078         (compile_probe_arg): Likewise.
1079         (std::vector<const probe_ops *> all_probe_ops): Delete.
1080         (std::vector<const static_probe_ops *> all_static_probe_ops):
1081         New variable.
1082         (_initialize_probe): Use 'all_static_probe_ops' instead of
1083         'all_probe_ops'.
1084         * probe.h (struct info_probe_column) <field_name>: Delete
1085         extraneous newline
1086         (info_probe_column_s): Delete type and VEC.
1087         (struct probe_ops): Delete.  Replace with...
1088         (class static_probe_ops): ...this and...
1089         (clas probe): ...this.
1090         (struct bound_probe) <bound_probe>: Delete extraneous
1091         newline.  Adjust constructor to receive 'probe' instead of
1092         'struct probe'.
1093         <probe>: Rename to...
1094         <prob>: ...this.  Delete extraneous newline.
1095         <objfile>: Delete extraneous newline.
1096         (register_probe_ops): Delete unused prototype.
1097         (info_probes_for_ops): Rename to...
1098         (info_probes_for_spops): ...this.  Adjust comment.
1099         (get_probe_address): Move to 'probe::get_address'.
1100         (get_probe_argument_count): Move to
1101         'probe::get_argument_count'.
1102         (can_evaluate_probe_arguments): Move to
1103         'probe::can_evaluate_arguments'.
1104         (evaluate_probe_argument): Move to 'probe::evaluate_argument'.
1105         * solib-svr4.c (struct svr4_info): Adjust comment.
1106         (struct probe_and_action) <probe>: Rename to...
1107         <prob>: ...this.
1108         (register_solib_event_probe): Receive 'probe' instead of
1109         'struct probe' as argument.  Use 'prob' instead of 'probe'
1110         when applicable.
1111         (solib_event_probe_action): Call 'get_argument_count' method
1112         from probe.  Adjust comment.
1113         (svr4_handle_solib_event): Adjust comment.  Call
1114         'evaluate_argument' method from probe.
1115         (svr4_create_probe_breakpoints): Call 'get_relocated_address'
1116         from probe.
1117         (svr4_create_solib_event_breakpoints): Use 'probe' instead of
1118         'struct probe'.  Call 'can_evaluate_arguments' from probe.
1119         * symfile.h: Forward declare 'class probe' instead of 'struct
1120         probe'.
1121         * symtab.h: Likewise.
1122         (struct symtab_and_line) <probe>: Rename to...
1123         <prob>: ...this.
1124         * tracepoint.c (start_tracing): Use 'prob' when applicable.
1125         Call probe methods.
1126         (stop_tracing): Likewise.
1127
1128 2017-11-22  Joel Brobecker  <brobecker@adacore.com>
1129
1130         * ravenscar-thread.c (ravenscar_inferior_created): Remove
1131         trailing newline at end of string in call to warning.
1132
1133 2017-11-22  Simon Marchi  <simon.marchi@polymtl.ca>
1134
1135         * osdata.h: Include vector isntead of vec.h.
1136         (osdata_column_s): Remove typedef.
1137         (struct osdata_column): Add constructor.
1138         <name, value>: Change type to std::string.
1139         (DEF_VEC_O (osdata_column_s)): Remove.
1140         (osdata_item_s): Remove typedef.
1141         (struct osdata_item) <columns>: Change type to std::vector.
1142         (DEF_VEC_O (osdata_item_s)): Remove.
1143         (struct osdata): Add constructor.
1144         <type>: Change type to std::string.
1145         <items>: Change type to std::vector.
1146         (osdata_p): Remove typedef.
1147         (DEF_VEC_P (osdata_p)): Remove.
1148         (osdata_parse): Return a unique_ptr.
1149         (osdata_free): Remove.
1150         (make_cleanup_osdata_free): Remove.
1151         (get_osdata): Return a unique_ptr.
1152         (get_osdata_column): Return pointer to std::string, take a
1153         reference to osdata_item as parameter.
1154         * osdata.c (struct osdata_parsing_data) <osdata>: Change type to
1155         unique_ptr.
1156         <property_name>: Change type to std::string.
1157         (osdata_start_osdata): Allocate osdata with new and adjust.
1158         (osdata_start_item): Adjust.
1159         (osdata_start_column): Adjust.
1160         (osdata_end_column): Adjust.
1161         (clear_parsing_data): Remove.
1162         (osdata_parse): Return a unique_ptr and adjust, remove cleanup.
1163         (osdata_item_clear): Remove.
1164         (get_osdata): return a unique_ptr and adjust.
1165         (get_osdata_column): Return a pointer to std::string and adjust.
1166         (info_osdata): Adjust.
1167         * mi/mi-main.c: Include <map>.
1168         (free_vector_of_osdata_items): Remove.
1169         (list_available_thread_groups): Adjust, use std::map instead of
1170         splay tree.
1171
1172 2017-11-22  Simon Marchi  <simon.marchi@ericsson.com>
1173
1174         * stack.c (iterate_over_block_locals): Add LOC_OPTIMIZED_OUT
1175         case in switch.
1176
1177 2017-11-22  Simon Marchi  <simon.marchi@polymtl.ca>
1178
1179         * varobj.h (DEF_VEC_P (varobj_p)): Remove.
1180
1181 2017-11-22  Simon Marchi  <simon.marchi@polymtl.ca>
1182
1183         * varobj.h (struct varobj_update_result): Add constructor, add
1184         move constructor, disable copy and assign, initialize fields.
1185         <newobj>: Change type to std::vector.
1186         (varobj_update): Return std::vector.
1187         * varobj.c (install_dynamic_child): Change VEC parameters to
1188         std::vector and adjust.
1189         (update_dynamic_varobj_children): Likewise.
1190         (varobj_update): Return std::vector and adjust.
1191         * mi/mi-cmd-var.c (varobj_update_one): Adjust to vector changes.
1192
1193 2017-11-22  Simon Marchi  <simon.marchi@polymtl.ca>
1194
1195         * varobj.h (struct varobj) <parent>: Remove const.
1196         <children>: Change type to std::vector.
1197         (varobj_list_children): Return std::vector const reference.
1198         (varobj_restrict_range): Change parameter type to std::vector
1199         const reference.
1200         * varobj.c (varobj_has_more): Adjust.
1201         (varobj_restrict_range): Change parameter type to std::vector
1202         const reference and adjust.
1203         (install_dynamic_child): Adjust.
1204         (update_dynamic_varobj_children): Adjust.
1205         (varobj_list_children): Return std::vector const reference and
1206         adjust.
1207         (varobj_add_child): Adjust.
1208         (update_type_if_necessary): Adjust.
1209         (varobj_update): Adjust.
1210         (delete_variable_1): Adjust.
1211         * ada-varobj.c (ada_value_has_mutated): Adjust.
1212         * mi/mi-cmd-var.c (mi_cmd_var_list_children): Adjust.
1213
1214 2017-11-22  Simon Marchi  <simon.marchi@polymtl.ca>
1215
1216         * varobj.h (struct varobj): Add constructor and destructor,
1217         initialize fields.
1218         * varobj.c (struct varobj_root): Initialize fields.
1219         (struct varobj_dynamic): Initialize fields.
1220         (varobj_create): Use unique_ptr instead of cleanup.  Create
1221         varobj with new instead of new_root_variable.
1222         (delete_variable_1): Free variable with delete instead of
1223         free_variable.
1224         (create_child_with_value): Create variable with new instead of
1225         new_variable.
1226         (varobj::varobj): New.
1227         (varobj::~varobj): New (body mostly coming from free_variable).
1228         (new_variable): Remove.
1229         (free_variable): Remove.
1230         (do_free_variable_cleanup): Remove.
1231         (make_cleanup_free_variable): Remove.
1232
1233 2017-11-22  Ulrich Weigand  <uweigand@de.ibm.com>
1234
1235         * core-regset.c: Remove file.
1236         * Makefile.in (ALLDEPFILES): Remove core-regset.c.
1237
1238 2017-11-22  Ulrich Weigand  <uweigand@de.ibm.com>
1239
1240         * NEWS: Document use of GNU MPFR.
1241         * README: Likewise.
1242
1243         * Makefile.in (LIBMPFR): Add define.
1244         (CLIBS): Add $(LIBMPFR).
1245         * configure.ac: Add --with-mpfr configure option.
1246         * configure: Regenerate.
1247         * config.in: Regenerate.
1248
1249         * target-float.c [HAVE_LIBMPFR]: Include <mpfr.h>.
1250         (class mpfr_float_ops): New type.
1251         (mpfr_float_ops::from_target): Two new overloaded functions.
1252         (mpfr_float_ops::to_target): Likewise.
1253         (mpfr_float_ops::to_string): New function.
1254         (mpfr_float_ops::from_string): Likewise.
1255         (mpfr_float_ops::to_longest): Likewise.
1256         (mpfr_float_ops::from_longest): Likewise.
1257         (mpfr_float_ops::from_ulongest): Likewise.
1258         (mpfr_float_ops::to_host_double): Likewise.
1259         (mpfr_float_ops::from_host_double): Likewise.
1260         (mpfr_float_ops::convert): Likewise.
1261         (mpfr_float_ops::binop): Likewise.
1262         (mpfr_float_ops::compare): Likewise.
1263         (get_target_float_ops): Use mpfr_float_ops if available.
1264
1265 2017-11-22  Ulrich Weigand  <uweigand@de.ibm.com>
1266
1267         * target-float.c: Do not include <math.h>.
1268         Include <cmath> and <limits>.
1269         (DOUBLEST): Do not define.
1270         (class target_float_ops): New type.
1271         (class host_float_ops): New templated type.
1272         (class decimal_float_ops): New type.
1273
1274         (floatformat_to_doublest): Rename to ...
1275         (host_float_ops<T>::from_target): ... this.  Use template type T
1276         instead of DOUBLEST.  Use C++ math routines.  Update recursive calls.
1277         (host_float_ops<T>::from_target): New overload using a type argument.
1278         (floatformat_from_doublest): Rename to ...
1279         (host_float_ops<T>::to_target): ... this.  Use template type T
1280         instead of DOUBLEST.  Use C++ math routines.  Update recursive calls.
1281         (host_float_ops<T>::to_target): New overload using a type argument.
1282         (floatformat_printf_format): New function.
1283         (struct printf_length_modifier): New templated type.
1284         (floatformat_to_string): Rename to ...
1285         (host_float_ops<T>::to_string): ... this.  Use type instead of
1286         floatformat argument.  Use floatformat_printf_format and
1287         printf_length_modifier.  Remove special handling of invalid numbers,
1288         infinities and NaN (moved to target_float_to_string).
1289         (struct scanf_length_modifier): New templated type.
1290         (floatformat_from_string): Rename to ...
1291         (host_float_ops<T>::from_string): ... this.  Use type instead of
1292         floatformat argument.  Use scanf_length_modifier.
1293         (floatformat_to_longest): Rename to ...
1294         (host_float_ops<T>::to_longest): ... this.  Use type instead of
1295         floatformat argument.  Handle out-of-range values deterministically.
1296         (floatformat_from_longest): Rename to ...
1297         (host_float_ops<T>::from_longest): ... this.  Use type instead of
1298         floatformat argument.
1299         (floatformat_from_ulongest): Rename to ...
1300         (host_float_ops<T>::from_ulongest): ... this.  Use type instead of
1301         floatformat argument.
1302         (floatformat_to_host_double): Rename to ...
1303         (host_float_ops<T>::to_host_double): ... this.  Use type instead of
1304         floatformat argument.
1305         (floatformat_from_host_double): Rename to ...
1306         (host_float_ops<T>::from_host_double): ... this.  Use type instead of
1307         floatformat argument.
1308         (floatformat_convert): Rename to ...
1309         (host_float_ops<T>::convert): ... this.  Use type instead of
1310         floatformat arguments.  Remove handling of no-op conversions.
1311         (floatformat_binop): Rename to ...
1312         (host_float_ops<T>::binop): ... this.  Use type instead of
1313         floatformat arguments.
1314         (floatformat_compare): Rename to ...
1315         (host_float_ops<T>::compare): ... this.  Use type instead of
1316         floatformat arguments.
1317
1318         (match_endianness): Use type instead of length/byte_order arguments.
1319         (set_decnumber_context): Likewise.
1320         (decimal_from_number): Likewise.  Update calls.
1321         (decimal_to_number): Likewise.
1322         (decimal_is_zero): Likewise.  Update calls.  Move to earlier in file.
1323         (decimal_float_ops::to_host_double): New dummy function.
1324         (decimal_float_ops::from_host_double): Likewise.
1325         (decimal_to_string): Rename to ...
1326         (decimal_float_ops::to_string): ... this.  Use type instead of
1327         length/byte_order arguments.  Update calls.
1328         (decimal_from_string): Rename to ...
1329         (decimal_float_ops::from_string): ... this.  Use type instead of
1330         length/byte_order arguments.  Update calls.
1331         (decimal_from_longest): Rename to ...
1332         (decimal_float_ops::from_longest): ... this.  Use type instead of
1333         length/byte_order arguments.  Update calls.
1334         (decimal_from_ulongest): Rename to ...
1335         (decimal_float_ops::from_ulongest): ... this.  Use type instead of
1336         length/byte_order arguments.  Update calls.
1337         (decimal_to_longest): Rename to ...
1338         (decimal_float_ops::to_longest): ... this.  Use type instead of
1339         length/byte_order arguments.  Update calls.
1340         (decimal_binop): Rename to ...
1341         (decimal_float_ops::binop): ... this.  Use type instead of
1342         length/byte_order arguments.  Update calls.
1343         (decimal_compare): Rename to ...
1344         (decimal_float_ops::compare): ... this.  Use type instead of
1345         length/byte_order arguments.  Update calls.
1346         (decimal_convert): Rename to ...
1347         (decimal_float_ops::convert): ... this.  Use type instead of
1348         length/byte_order arguments.  Update calls.
1349
1350         (target_float_same_category_p): New function.
1351         (target_float_same_format_p): Likewise.
1352         (target_float_format_length): Likewise.
1353         (enum target_float_ops_kind): New type.
1354         (get_target_float_ops_kind): New function.
1355         (get_target_float_ops): Three new overloaded functions.
1356
1357         (target_float_is_zero): Update call.
1358         (target_float_to_string): Add special handling of invalid numbers,
1359         infinities and NaN (moved from floatformat_to_string).  Use
1360         target_float_ops callback.
1361         (target_float_from_string): Use target_float_ops callback.
1362         (target_float_to_longest): Likewise.
1363         (target_float_from_longest): Likewise.
1364         (target_float_from_ulongest): Likewise.
1365         (target_float_to_host_double): Likewise.
1366         (target_float_from_host_double): Likewise.
1367         (target_float_convert): Add special case for no-op conversions.
1368         Use target_float_ops callback.
1369         (target_float_binop): Use target_float_ops callback.
1370         (target_float_compare): Likewise.
1371
1372 2017-11-22  Yao Qi  <yao.qi@linaro.org>
1373
1374         * python/py-gdb-readline.c (gdbpy_readline_wrapper): Use strcpy.
1375
1376 2017-11-22  Yao Qi  <yao.qi@linaro.org>
1377
1378         * cli/cli-decode.c (help_list): Use memcpy instead of strncpy.
1379         * cp-namespace.c (cp_lookup_transparent_type_loop): Likewise.
1380
1381 2017-11-21  Jerome Guitton  <guitton@adacore.com>
1382
1383         * ravenscar-thread.c (ravenscar_wait): Update inferior ptid
1384         with event ptid from the lower layer before doing the
1385         ravenscar-specific update.
1386
1387 2017-11-21  Joel Brobecker  <brobecker@adacore.com>
1388
1389         * ravenscar-thread.c (is_ravenscar_task): Also verify that
1390         the ptid's TID is nonzero.
1391
1392 2017-11-21  Joel Brobecker  <brobecker@adacore.com>
1393
1394         * ada-lang.h (ada_get_tcb_types_info): Add declaration.
1395         * ada-tasks.c (ada_get_tcb_types_info): Renames get_tcb_types_info.
1396         Make non-static.  Change return type to char *.  Adjust code
1397         accordingly.  Rewrite the function's documentation.
1398         (read_atcb): Adjust call to get_tcb_types_info accordingly.
1399         * ravenscar-thread.c (ravenscar_inferior_created): Check that
1400         we have enough debugging information in the runtime to support
1401         Ada task debugging before we enable the ravenscar-thread layer.
1402
1403 2017-11-21  Joel Brobecker  <brobecker@adacore.com>
1404
1405         * ada-lang.h (ada_get_task_info_from_ptid): Add declaration.
1406         * ada-tasks.c (ada_get_task_info_from_ptid): New function.
1407         * ravenscar-thread.c: Add into comment.
1408         (base_magic_null_ptid): Delete.
1409         (base_ptid): Change documentation.
1410         (ravenscar_active_task): Renames ravenscar_running_thread.
1411         All callers updated throughout.
1412         (is_ravenscar_task, ravenscar_get_thread_base_cpu): New function.
1413         (ravenscar_task_is_currently_active): Likewise.
1414         (get_base_thread_from_ravenscar_task): Ditto.
1415         (ravenscar_update_inferior_ptid): Adjust to handle multiple CPUs.
1416         (ravenscar_runtime_initialized): Likewise.
1417         (get_running_thread_id): Add new parameter "cpu".  Adjust
1418         implementation to handle this new parameter.
1419         (ravenscar_fetch_registers): Small adjustment to use
1420         is_ravenscar_task and ravenscar_task_is_currently_active in
1421         order to decide whether to use the target beneath or this
1422         module's arch_ops.
1423         (ravenscar_store_registers, ravenscar_prepare_to_store): Likewise.
1424         (ravenscar_stopped_by_sw_breakpoint): Use
1425         get_base_thread_from_ravenscar_task to get the underlying
1426         thread, rather than using base_ptid.
1427         (ravenscar_stopped_by_hw_breakpoint, ravenscar_stopped_by_watchpoint)
1428         (ravenscar_stopped_data_address, ravenscar_core_of_thread):
1429         Likewise.
1430         (ravenscar_inferior_created): Do not set base_magic_null_ptid.
1431
1432 2017-11-21  Joel Brobecker  <brobecker@adacore.com>
1433
1434         * ada-lang.h (struct ada_task_info) <base_cpu>: New field.
1435         * ada-lang.c (struct atcb_fieldno) <base_cpu>: New field.
1436         (get_tcb_types_info): Set fieldnos.base_cpu.
1437         (read_atcb): Set task_info->base_cpu.
1438         (info_task): Print "Base CPU" info if set by runtime.
1439
1440 2017-11-21  Joel Brobecker  <brobecker@adacore.com>
1441
1442         * ravenscar-thread.c (ravenscar_stopped_by_sw_breakpoint)
1443         (ravenscar_stopped_by_hw_breakpoint, ravenscar_stopped_by_watchpoint)
1444         (ravenscar_stopped_data_address, ravenscar_core_of_thread):
1445         New functions.
1446         (init_ravenscar_thread_ops): Set the to_stopped_by_sw_breakpoint,
1447         to_stopped_by_hw_breakpoint, to_stopped_by_watchpoint,
1448         to_stopped_data_address and to_core_of_thread fields of
1449         ravenscar_ops.
1450
1451 2017-11-21  Ulrich Weigand  <uweigand@de.ibm.com>
1452
1453         * ppc-tdep.h (enum powerpc_long_double_abi): New data type.
1454         (struct gdbarch_tdep): New member long_double_abi.
1455         * rs6000-tdep.c (rs6000_gdbarch_init): Initialize long_double_abi
1456         member of tdep struct based on Tag_GNU_Power_ABI_FP attribute.
1457         * ppc-linux-tdep.c (ppc_linux_init_abi): Install long double data
1458         format depending on long_double_abi tdep member.
1459         (ppc_floatformat_for_type): Handle __ibm128 type.
1460
1461 2017-11-20  Simon Marchi  <simon.marchi@polymtl.ca>
1462
1463         * darwin-nat.c (set_enable_mach_exceptions): Constify parameter.
1464
1465 2017-11-21  Pedro Alves  <palves@redhat.com>
1466
1467         * dwarf2read.c (mapped_index::find_name_components_bounds)
1468         <completion mode, upper bound>: Use std::lower_bound instead of
1469         std::upper_bound.
1470         (test_mapped_index_find_name_component_bounds): Remove incorrect
1471         "t1_fund" from expected symbols.
1472
1473 2017-11-21  Pedro Alves  <palves@redhat.com>
1474
1475         * dwarf2read.c (mapped_index::name_components_casing): New field.
1476         (mapped_index) <build_name_components,
1477         find_name_components_bounds): Declare new methods.
1478         (mapped_index::find_name_components_bounds)
1479         (mapped_index::build_name_components): New methods, factored out
1480         from dw2_expand_symtabs_matching_symbol.
1481         (check_find_bounds_finds)
1482         (test_mapped_index_find_name_component_bounds): New.
1483         (run_test): Rename to ...
1484         (test_dw2_expand_symtabs_matching_symbol): ... this.
1485         (run_test): Reimplement.
1486
1487 2017-11-21  Pedro Alves  <palves@redhat.com>
1488
1489         * cp-name-parser.y (cp_ident_is_alpha, cp_ident_is_alnum): New.
1490         (symbol_end): Use cp_ident_is_alnum.
1491         (yylex): Use cp_ident_is_alpha and cp_ident_is_alnum.
1492         * dwarf2read.c (make_sort_after_prefix_name): New function.
1493         (dw2_expand_symtabs_matching_symbol): Use it.
1494         (test_symbols): Add more symbols.
1495         (run_test): Add tests.
1496
1497 2017-11-17  Tom Tromey  <tom@tromey.com>
1498
1499         * symtab.h (enum symbol_subclass_kind): New.
1500         (struct symbol) <is_cplus_template_function, is_rust_vtable>:
1501         Remove.
1502         <subclass>: New member.
1503         (SYMBOL_IS_CPLUS_TEMPLATE_FUNCTION): Update.
1504         * rust-lang.c (rust_get_trait_object_pointer): Update.
1505         * dwarf2read.c (read_func_scope): Update.
1506         (read_variable): Update.
1507
1508 2017-11-17  Tom Tromey  <tom@tromey.com>
1509
1510         * dwarf2read.c (read_func_scope): Update.
1511         * symtab.h (struct template_symbol): Derive from symbol.
1512         <base>: Remove.
1513
1514 2017-11-17  Tom Tromey  <tom@tromey.com>
1515
1516         * symtab.h (struct symbol) <is_rust_vtable>: New member.
1517         (struct rust_vtable_symbol): New.
1518         (find_symbol_at_address): Declare.
1519         * symtab.c (find_symbol_at_address): New function.
1520         * symfile.h (struct quick_symbol_functions)
1521         <find_compunit_symtab_by_address>: New member.
1522         * symfile-debug.c (debug_qf_find_compunit_symtab_by_address): New
1523         function.
1524         (debug_sym_quick_functions): Link to
1525         debug_qf_find_compunit_symtab_by_address.
1526         * rust-lang.c (rust_get_trait_object_pointer): New function.
1527         (rust_evaluate_subexp) <case UNOP_IND>: New case.  Call
1528         rust_get_trait_object_pointer.
1529         * psymtab.c (psym_relocate): Clear psymbol_map.
1530         (psym_fill_psymbol_map, psym_find_compunit_symtab_by_address): New
1531         functions.
1532         (psym_functions): Link to psym_find_compunit_symtab_by_address.
1533         * objfiles.h (struct objfile) <psymbol_map>: New member.
1534         * dwarf2read.c (dwarf2_gdb_index_functions): Update.
1535         (process_die) <DW_TAG_variable>: New case.  Call read_variable.
1536         (rust_containing_type, read_variable): New functions.
1537
1538 2017-11-17  Simon Marchi  <simon.marchi@polymtl.ca>
1539
1540         * common/gdb_vecs.h (DEF_VEC_I (int)): Remove.
1541
1542 2017-11-17  Simon Marchi  <simon.marchi@polymtl.ca>
1543
1544         * common/filestuff.c: Include <algorithm>.
1545         (open_fds): Change type to std::vector<int>.
1546         (do_mark_open_fd): Adjust.
1547         (unmark_fd_no_cloexec): Adjust.
1548         (do_close): Adjust.
1549
1550 2017-11-17  Simon Marchi  <simon.marchi@polymtl.ca>
1551
1552         * breakpoint.c (output_thread_groups): Take an std::vector.
1553         (print_one_breakpoint_location): Adjust.
1554
1555 2017-11-17  Joel Brobecker  <brobecker@adacore.com>
1556
1557         * ada-lang.c (resolve_subexp): Add handling of OP_VAR_MSYM_VALUE.
1558         (ada_evaluate_subexp_for_cast): New function.
1559         (ada_evaluate_subexp) <UNOP_CAST>: Replace code by call to
1560         ada_evaluate_subexp_for_cast.
1561         (ada_evaluate_subexp) <nosideret>: Replace code by call to
1562         eval_skip_value.
1563         * eval.c (evaluate_var_value): Make non-static.
1564         (evaluate_var_msym_value, eval_skip_value): Likewise.
1565         * value.h (evaluate_var_value, evaluate_var_msym_value)
1566         (eval_skip_value): Declare.
1567
1568 2017-11-16  Joel Brobecker  <brobecker@adacore.com>
1569
1570         * ada-lang.c (ada_value_cast): Remove parameter "noside".
1571         Update all callers.
1572
1573 2017-11-16  Pedro Alves  <palves@redhat.com>
1574
1575         * python/py-unwind.c (pyuw_sniffer): Translate
1576         PyExc_KeyboardInterrupt to a GDB Quit exception.
1577
1578 2017-11-16  Pedro Alves  <palves@redhat.com>
1579
1580         * infrun.c (resume_cleanups): Delete.
1581         (resume): No longer install a resume_cleanups cleanup nor call
1582         QUIT.
1583         (proceed): Pass the terminal to the inferior.
1584         (keep_going_pass_signal): No longer install a resume_cleanups
1585         cleanup.
1586
1587 2017-11-16  Pedro Alves  <palves@redhat.com>
1588
1589         * inf-loop.c (inferior_event_handler): Don't swallow the exception
1590         if the prompt is blocked.
1591
1592 2017-11-16  Pedro Alves  <palves@redhat.com>
1593
1594         * breakpoint.c (insert_bp_location): Replace bp_err and
1595         bp_err_message locals by a gdb_exception local.
1596
1597 2017-11-16  Pedro Alves  <palves@redhat.com>
1598
1599         * inflow.c (scoped_ignore_sigttou): New class.
1600         (child_terminal_ours_1, new_tty): Use it.
1601
1602 2017-11-16  Ulrich Weigand  <uweigand@de.ibm.com>
1603
1604         * target-float.c (decimal_from_number): Add byte_order argument and
1605         call match_endianness.  Error if unknown floating-point type.
1606         (decimal_to_number): Add byte_order argument and call match_endianness.
1607         (decimal_from_longest): Update call.  Do not call match_endianness.
1608         (decimal_from_ulongest): Likewise.
1609         (decimal_binop): Likewise.
1610         (decimal_is_zero): Likewise.
1611         (decimal_compare): Likewise.
1612         (decimal_convert): Likewise.
1613
1614 2017-11-16  Phil Muldoon  <pmuldoon@redhat.com>
1615
1616         * python/python.c (gdbpy_rbreak): New function.
1617         * NEWS: Document Python rbreak feature.
1618
1619 2017-11-16  Yao Qi  <yao.qi@linaro.org>
1620
1621         * features/tic6x-c62x.xml: Remove.
1622         * features/tic6x-c64x.xml: Remove.
1623         * features/tic6x-c64xp.xml: Remove.
1624
1625 2017-11-15  John Baldwin  <jhb@FreeBSD.org>
1626
1627         * symtab.h: Include <array>.
1628
1629 2017-11-15  John Baldwin  <jhb@FreeBSD.org>
1630
1631         * bsd-kvm.c (bsd_kvm_cmd): Constify 'arg'.
1632         (bsd_kvm_proc_cmd): Likewise.
1633
1634 2017-11-15  Simon Marchi  <simon.marchi@ericsson.com>
1635
1636         * tui/tui-win.c (window_name_completer): Replace VEC with
1637         std::vector.
1638
1639 2017-11-15  Andrew Cagney  <cagney@gnu.org>
1640
1641         * MAINTAINERS: Remove no-longer applicable entries.
1642
1643 2017-11-15  Andrew Cagney  <cagney@gnu.org>
1644
1645         * MAINTAINERS: Move self to Past Maintainers.
1646
1647 2017-11-15  Yao Qi  <yao.qi@linaro.org>
1648
1649         * features/Makefile (XMLTOC): Remove nios2-linux.xml.
1650         * features/nios2-linux.c: Remove.
1651         * nios2-linux-tdep.c (_initialize_nios2_linux_tdep): Don't call
1652         initialize_tdesc_nios2_linux.
1653
1654 2017-11-15  Yao Qi  <yao.qi@linaro.org>
1655
1656         * m68hc11-tdep.c (M68HC11_NUM_REGS): Change it to
1657         M68HC11_LAST_HARD_REG + 1.
1658
1659 2017-11-14  Paul Carroll  <pcarroll@codesourcery.com>
1660
1661         PR gdb/22388
1662         * remote.c (remote_write_bytes_aux, remote_read_bytes_1,
1663         remote_read_bytes, remote_write_qxfer, remote_xfer_partial):
1664         Return TARGET_XFER_EOF if size of returned data is 0.
1665
1666 2017-11-14  Simon Marchi  <simon.marchi@ericsson.com>
1667
1668         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
1669         memory-map-selftests.c.
1670         (SUBDIR_UNITTESTS_OBS): Add memory-map-selftests.o.
1671         * memory-map.c (memory_map_start_memory): Fix computation of hi
1672         address.
1673         * unittests/memory-map-selftests.c: New file.
1674
1675 2017-11-09  Joel Brobecker  <brobecker@adacore.com>
1676
1677         * ada-lang.c: Fix some typos in the general command documenting
1678         how Ada expressions are being evaluated and how their result
1679         is printed.
1680
1681 2017-11-09  Tom Tromey  <tom@tromey.com>
1682
1683         * psymtab.c (psymbol_hash): Do not hash string contents.
1684         (psymbol_compare): Add comment.
1685
1686 2017-11-09  Tom Tromey  <tom@tromey.com>
1687
1688         * dictionary.c (dict_hash): Move "TKB" check into the "switch".
1689
1690 2017-11-08  Joel Brobecker  <brobecker@adacore.com>
1691
1692         * ada-exp.y (write_var_from_sym): Remove parameter
1693         "orig_left_context".  Update all callers.
1694
1695 2017-11-08  Simon Marchi  <simon.marchi@ericsson.com>
1696
1697         * tracepoint.h (class collection_list) <stringify>: Return
1698         std::vector<std::string>.
1699         (encode_actions_rsp): Change parameters to
1700         std::vector<std::string> *.
1701         * tracepoint.c (collection_list::stringify): Return
1702         std::vector<std::string> and adjust accordingly.
1703         (encode_actions_rsp): Changee parameters to
1704         std::vector<std::string> and adjust accordingly.
1705         * remote.c (free_actions_list),
1706         free_actions_list_cleanup_wrapper): Remove.
1707         (remote_download_tracepoint): Adjust to std::vector.
1708
1709 2017-11-08  Tom Tromey  <tom@tromey.com>
1710
1711         * dwarf2read.c (symbolp): Remove typedef.
1712         (read_func_scope): Use std::vector.
1713         (process_structure_scope): Use std::vector.
1714
1715 2017-11-08  Pedro Alves  <palves@redhat.com>
1716
1717         * ada-lang.c (ada_make_symbol_completion_list): Use
1718         completion_skip_symbol.
1719         * symtab.c (symbol_is_function_or_method(minimal_symbol*)): New.
1720         (symbol_is_function_or_method(symbol*)): New.
1721         (add_symtab_completions): Add complete_symbol_mode parameter.  Use
1722         completion_skip_symbol.
1723         (default_collect_symbol_completion_matches_break_on): Use
1724         completion_skip_symbol.  Pass down mode.
1725         (collect_file_symbol_completion_matches): Pass down mode.
1726         * symtab.h (symbol_is_function_or_method): New declarations.
1727         (completion_skip_symbol): New template function.
1728
1729 2017-11-08  Pedro Alves  <palves@redhat.com>
1730
1731         * linespec.c (iterate_over_all_matching_symtabs): Add
1732         search_domain parameter.  Pass it down to expand_symtabs_matching.
1733         (decode_objc): Request FUNCTIONS_DOMAIN symbols only.
1734         (lookup_prefix_sym): Adjust by passing ALL_DOMAIN as
1735         search_domain.
1736         (add_all_symbol_names_from_pspace): Add search_domain parameter.
1737         Pass it down.
1738         (find_method, find_function_symbols): Request FUNCTIONS_DOMAIN
1739         symbols.
1740         (add_matching_symbols_to_info): Add search_domain parameter.  Pass
1741         it down.
1742
1743 2017-11-08  Pedro Alves  <palves@redhat.com>
1744
1745         * ada-lang.c (ada_make_symbol_completion_list): Remove text and
1746         text_len locals and don't pass them down.
1747         * symtab.c (completion_list_add_name): Remove
1748         sym_text/sym_text_len parameters and adjust.
1749         (completion_list_add_symbol, completion_list_add_msymbol)
1750         (completion_list_objc_symbol, completion_list_add_fields)
1751         (add_symtab_completions): Likewise.
1752         (default_collect_symbol_completion_matches_break_on)
1753         (collect_file_symbol_completion_matches): Remove sym_text_len
1754         local and don't pass it down.
1755         * symtab.h (completion_list_add_name): Remove
1756         sym_text/sym_text_len parameters.
1757
1758 2017-11-08  Pedro Alves  <palves@redhat.com>
1759
1760         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
1761         unittests/lookup_name_info-selftests.c.
1762         (SUBDIR_UNITTESTS_OBS): Add lookup_name_info-selftests.o.
1763         * cp-support.c: Include "selftest.h".
1764         (cp_remove_params_1): Rename from cp_remove_params.  Add
1765         'require_param' parameter, and handle it.
1766         (cp_remove_params): Reimplement.
1767         (cp_remove_params_if_any): New.
1768         (selftests::quote): New.
1769         (selftests::check_remove_params): New.
1770         (selftests::test_cp_remove_params): New.
1771         (_initialize_cp_support): Install
1772         selftests::test_cp_remove_params.
1773         * cp-support.h (cp_remove_params_if_any): Declare.
1774         * dwarf2read.c :Include "selftest.h".
1775         (dw2_expand_symtabs_matching_symbol): Use
1776         lookup_name_info::make_ignore_params.
1777         (selftests::dw2_expand_symtabs_matching::mock_mapped_index)
1778         (selftests::dw2_expand_symtabs_matching::string_or_null)
1779         (selftests::dw2_expand_symtabs_matching::check_match)
1780         (selftests::dw2_expand_symtabs_matching::test_symbols)
1781         (selftests::dw2_expand_symtabs_matching::run_test): New.
1782         (_initialize_dwarf2_read): Register
1783         selftests::dw2_expand_symtabs_matching::run_test.
1784         * psymtab.c (psym_expand_symtabs_matching): Use
1785         lookup_name_info::make_ignore_params.
1786         * symtab.c (demangle_for_lookup_info::demangle_for_lookup_info):
1787         If the lookup name wants to ignore parameters, strip them.
1788         (compare_symbol_name): Remove sym_text/sym_text_len parameters and
1789         code handling '('.
1790         (completion_list_add_name): Don't pass down sym_text/sym_text_len.
1791         (default_collect_symbol_completion_matches_break_on): Don't try to
1792         strip parameters.
1793         * symtab.h (lookup_name_info::lookup_name_info): Add
1794         'ignore_parameters' parameter.
1795         (lookup_name_info::ignore_parameters)
1796         (lookup_name_info::make_ignore_params): New methods.
1797         (lookup_name_info::m_ignore_parameters): New field.
1798         * unittests/lookup_name_info-selftests.c: New file.
1799
1800 2017-11-08  Pedro Alves  <palves@redhat.com>
1801
1802         * dwarf2read.c (dw2_expand_marked_cus)
1803         (dw2_expand_symtabs_matching_symbol): Remove forward declarations.
1804         (dw2_expand_symtabs_matching): Move further below.
1805         (dw2_expand_marked_cus): Reindent.
1806
1807 2017-11-08  Pedro Alves  <palves@redhat.com>
1808
1809         * dwarf2read.c (byte_swap, MAYBE_SWAP): Move higher up in file.
1810         (struct name_component): New.
1811         (mapped_index::name_components): New field.
1812         (mapped_index::symbol_name_at): New method.
1813         (dwarf2_read_index): Call mapped_index ctor.
1814         (dw2_map_matching_symbols): Add comment about name_components
1815         table.
1816         (dw2_expand_symtabs_matching): Factor part to...
1817         (dw2_expand_symtabs_matching_symbol): ... this new function.
1818         Build name components table, and lookup symbols in it before
1819         calling the name matcher.
1820         (dw2_expand_marked_cus): New, factored out from
1821         dw2_expand_symtabs_matching.
1822         (dwarf2_per_objfile_free): Call the mapped_index's dtor.
1823
1824 2017-11-08   Pedro Alves  <palves@redhat.com>
1825
1826         * ada-lang.c (ada_encode): Rename to ..
1827         (ada_encode_1): ... this.  Add throw_errors parameter and handle
1828         it.
1829         (ada_encode): Reimplement.
1830         (match_name): Delete, folded into full_name.
1831         (resolve_subexp): No longer pass the encoded name to
1832         ada_lookup_symbol_list.
1833         (should_use_wild_match): Delete.
1834         (name_match_type_from_name): New.
1835         (ada_lookup_simple_minsym): Use lookup_name_info and the
1836         language's symbol_name_matcher_ftype.
1837         (add_symbols_from_enclosing_procs, ada_add_local_symbols)
1838         (ada_add_block_renamings): Adjust to use lookup_name_info.
1839         (ada_lookup_name): New.
1840         (add_nonlocal_symbols, ada_add_all_symbols)
1841         (ada_lookup_symbol_list_worker, ada_lookup_symbol_list)
1842         (ada_iterate_over_symbols): Adjust to use lookup_name_info.
1843         (ada_name_for_lookup): Delete.
1844         (ada_lookup_encoded_symbol): Construct a verbatim name.
1845         (wild_match): Reverse sense of return type.  Use bool.
1846         (full_match): Reverse sense of return type.  Inline bits of old
1847         match_name here.
1848         (ada_add_block_symbols): Adjust to use lookup_name_info.
1849         (symbol_completion_match): Delete, folded into...
1850         (ada_lookup_name_info::matches): ... .this new method.
1851         (symbol_completion_add): Delete.
1852         (ada_collect_symbol_completion_matches): Add name_match_type
1853         parameter.  Adjust to use lookup_name_info and
1854         completion_list_add_name.
1855         (get_var_value, ada_add_global_exceptions): Adjust to use
1856         lookup_name_info.
1857         (ada_get_symbol_name_cmp): Delete.
1858         (do_wild_match, do_full_match): New functions.
1859         (ada_lookup_name_info::ada_lookup_name_info): New method.
1860         (ada_symbol_name_matches, ada_get_symbol_name_matcher): New
1861         functions.
1862         (ada_language_defn): Install ada_get_symbol_name_matcher.
1863         * ada-lex.l (processId): If name starts with '<', copy it
1864         verbatim.
1865         * block.c (block_iter_match_step, block_iter_match_first)
1866         (block_iter_match_next, block_lookup_symbol)
1867         (block_lookup_symbol_primary, block_find_symbol): Adjust to use
1868         lookup_name_info.
1869         * block.h (block_iter_match_first, block_iter_match_next)
1870         (ALL_BLOCK_SYMBOLS_WITH_NAME): Adjust to use lookup_name_info.
1871         * c-lang.c (c_language_defn, cplus_language_defn)
1872         (asm_language_defn, minimal_language_defn): Adjust comments to
1873         refer to la_get_symbol_name_matcher.
1874         * completer.c (complete_files_symbols)
1875         (collect_explicit_location_matches, symbol_completer): Pass a
1876         symbol_name_match_type down.
1877         * completer.h (class completion_match, completion_match_result):
1878         New classes.
1879         (completion_tracker::reset_completion_match_result): New method.
1880         (completion_tracker::m_completion_match_result): New field.
1881         * cp-support.c (make_symbol_overload_list_block): Adjust to use
1882         lookup_name_info.
1883         (cp_fq_symbol_name_matches, cp_get_symbol_name_matcher): New
1884         functions.
1885         * cp-support.h (cp_get_symbol_name_matcher): New declaration.
1886         * d-lang.c: Adjust comments to refer to
1887         la_get_symbol_name_matcher.
1888         * dictionary.c (dict_vector) <iter_match_first, iter_match_next>:
1889         Adjust to use lookup_name_info.
1890         (dict_iter_match_first, dict_iter_match_next)
1891         (iter_match_first_hashed, iter_match_next_hashed)
1892         (iter_match_first_linear, iter_match_next_linear): Adjust to work
1893         with a lookup_name_info.
1894         * dictionary.h (dict_iter_match_first, dict_iter_match_next):
1895         Likewise.
1896         * dwarf2read.c (dw2_lookup_symbol): Adjust to use lookup_name_info.
1897         (dw2_map_matching_symbols): Adjust to use symbol_name_match_type.
1898         (gdb_index_symbol_name_matcher): New class.
1899         (dw2_expand_symtabs_matching) Adjust to use lookup_name_info and
1900         gdb_index_symbol_name_matcher.  Accept a NULL symbol_matcher.
1901         * f-lang.c (f_collect_symbol_completion_matches): Adjust to work
1902         with a symbol_name_match_type.
1903         (f_language_defn): Adjust comments to refer to
1904         la_get_symbol_name_matcher.
1905         * go-lang.c (go_language_defn): Adjust comments to refer to
1906         la_get_symbol_name_matcher.
1907         * language.c (default_symbol_name_matcher)
1908         (language_get_symbol_name_matcher): New functions.
1909         (unknown_language_defn, auto_language_defn): Adjust comments to
1910         refer to la_get_symbol_name_matcher.
1911         * language.h (symbol_name_cmp_ftype): Delete.
1912         (language_defn) <la_collect_symbol_completion_matches>: Add match
1913         type parameter.
1914         <la_get_symbol_name_cmp>: Delete field.
1915         <la_get_symbol_name_matcher>: New field.
1916         <la_iterate_over_symbols>: Adjust to use lookup_name_info.
1917         (default_symbol_name_matcher, language_get_symbol_name_matcher):
1918         Declare.
1919         * linespec.c (iterate_over_all_matching_symtabs)
1920         (iterate_over_file_blocks): Adjust to use lookup_name_info.
1921         (find_methods): Add language parameter, and use lookup_name_info
1922         and the language's symbol_name_matcher_ftype.
1923         (linespec_complete_function): Adjust.
1924         (lookup_prefix_sym): Use lookup_name_info.
1925         (add_all_symbol_names_from_pspace): Adjust.
1926         (find_superclass_methods): Add language parameter and pass it
1927         down.
1928         (find_method): Pass symbol language down.
1929         (find_linespec_symbols): Don't demangle or Ada encode here.
1930         (search_minsyms_for_name): Add lookup_name_info parameter.
1931         (add_matching_symbols_to_info): Add name_match_type parameter.
1932         Use lookup_name_info.
1933         * m2-lang.c (m2_language_defn): Adjust comments to refer to
1934         la_get_symbol_name_matcher.
1935         * minsyms.c: Include <algorithm>.
1936         (add_minsym_to_demangled_hash_table): Remove table parameter and
1937         add objfile parameter.  Use search_name_hash, and add language to
1938         demangled languages vector.
1939         (struct found_minimal_symbols): New struct.
1940         (lookup_minimal_symbol_mangled, lookup_minimal_symbol_demangled):
1941         New functions.
1942         (lookup_minimal_symbol): Adjust to use them.  Don't canonicalize
1943         input names here.  Use lookup_name_info instead.  Lookup up
1944         demangled names once for each language in the demangled names
1945         vector.
1946         (iterate_over_minimal_symbols): Use lookup_name_info.  Lookup up
1947         demangled names once for each language in the demangled names
1948         vector.
1949         (build_minimal_symbol_hash_tables): Adjust.
1950         * minsyms.h (iterate_over_minimal_symbols): Adjust to pass down a
1951         lookup_name_info.
1952         * objc-lang.c (objc_language_defn): Adjust comment to refer to
1953         la_get_symbol_name_matcher.
1954         * objfiles.h: Include <vector>.
1955         (objfile_per_bfd_storage) <demangled_hash_languages>: New field.
1956         * opencl-lang.c (opencl_language_defn): Adjust comment to refer to
1957         la_get_symbol_name_matcher.
1958         * p-lang.c (pascal_language_defn): Adjust comment to refer to
1959         la_get_symbol_name_matcher.
1960         * psymtab.c (psym_lookup_symbol): Use lookup_name_info.
1961         (match_partial_symbol): Use symbol_name_match_type,
1962         lookup_name_info and psymbol_name_matches.
1963         (lookup_partial_symbol): Use lookup_name_info.
1964         (map_block): Use symbol_name_match_type and lookup_name_info.
1965         (psym_map_matching_symbols): Use symbol_name_match_type.
1966         (psymbol_name_matches): New.
1967         (recursively_search_psymtabs): Use lookup_name_info and
1968         psymbol_name_matches.  Rename 'kind' parameter to 'domain'.
1969         (psym_expand_symtabs_matching): Use lookup_name_info.  Rename
1970         'kind' parameter to 'domain'.
1971         * rust-lang.c (rust_language_defn): Adjust comment to refer to
1972         la_get_symbol_name_matcher.
1973         * symfile-debug.c (debug_qf_map_matching_symbols)
1974         (debug_qf_map_matching_symbols): Use symbol_name_match_type.
1975         (debug_qf_expand_symtabs_matching): Use lookup_name_info.
1976         * symfile.c (expand_symtabs_matching): Use lookup_name_info.
1977         * symfile.h (quick_symbol_functions) <map_matching_symbols>:
1978         Adjust to use symbol_name_match_type.
1979         <expand_symtabs_matching>: Adjust to use lookup_name_info.
1980         (expand_symtabs_matching): Adjust to use lookup_name_info.
1981         * symmisc.c (maintenance_expand_symtabs): Use
1982         lookup_name_info::match_any ().
1983         * symtab.c (symbol_matches_search_name): New.
1984         (eq_symbol_entry): Adjust to use lookup_name_info and the
1985         language's matcher.
1986         (demangle_for_lookup_info::demangle_for_lookup_info): New.
1987         (lookup_name_info::match_any): New.
1988         (iterate_over_symbols, search_symbols): Use lookup_name_info.
1989         (compare_symbol_name): Add language, lookup_name_info and
1990         completion_match_result parameters, and use them.
1991         (completion_list_add_name): Make extern.  Add language and
1992         lookup_name_info parameters.  Use them.
1993         (completion_list_add_symbol, completion_list_add_msymbol)
1994         (completion_list_objc_symbol): Add lookup_name_info parameters and
1995         adjust.  Pass down language.
1996         (completion_list_add_fields): Add lookup_name_info parameters and
1997         adjust.  Pass down language.
1998         (add_symtab_completions): Add lookup_name_info parameters and
1999         adjust.
2000         (default_collect_symbol_completion_matches_break_on): Add
2001         name_match_type parameter, and use it.  Use lookup_name_info.
2002         (default_collect_symbol_completion_matches)
2003         (collect_symbol_completion_matches): Add name_match_type
2004         parameter, and pass it down.
2005         (collect_symbol_completion_matches_type): Adjust.
2006         (collect_file_symbol_completion_matches): Add name_match_type
2007         parameter, and use lookup_name_info.
2008         * symtab.h: Include <string> and "common/gdb_optional.h".
2009         (enum class symbol_name_match_type): New.
2010         (class ada_lookup_name_info): New.
2011         (struct demangle_for_lookup_info): New.
2012         (class lookup_name_info): New.
2013         (symbol_name_matcher_ftype): New.
2014         (SYMBOL_MATCHES_SEARCH_NAME): Use symbol_matches_search_name.
2015         (symbol_matches_search_name): Declare.
2016         (MSYMBOL_MATCHES_SEARCH_NAME): Delete.
2017         (default_collect_symbol_completion_matches)
2018         (collect_symbol_completion_matches)
2019         (collect_file_symbol_completion_matches): Add name_match_type
2020         parameter.
2021         (iterate_over_symbols): Use lookup_name_info.
2022         (completion_list_add_name): Declare.
2023         * utils.c (enum class strncmp_iw_mode): Moved to utils.h.
2024         (strncmp_iw_with_mode): Now extern.
2025         * utils.h (enum class strncmp_iw_mode): Moved from utils.c.
2026         (strncmp_iw_with_mode): Declare.
2027
2028 2017-11-08  Keith Seitz  <keiths@redhat.com>
2029             Pedro Alves  <palves@redhat.com>
2030
2031         * ada-lang.c (ada_language_defn): Install
2032         default_search_name_hash.
2033         * buildsym.c (struct buildsym_compunit): <language>: New field.
2034         (finish_block_internal): Pass language when creating dictionaries.
2035         (start_buildsym_compunit, start_symtab): New language parameters.
2036         Use them.
2037         (restart_symtab): Pass down compilation unit's language.
2038         * buildsym.h (enum language): Forward declare.
2039         (start_symtab): New 'language' parameter.
2040         * c-lang.c (c_language_defn, cplus_language_defn)
2041         (asm_language_defn, minimal_language_defn): Install
2042         default_search_name_hash.
2043         * coffread.c (coff_start_symtab): Adjust.
2044         * d-lang.c (d_language_defn): Install default_search_name_hash.
2045         * dbxread.c (struct symloc): Add 'pst_language' field.
2046         (PST_LANGUAGE): Define.
2047         (start_psymtab, read_ofile_symtab): Use it.
2048         (process_one_symbol): New 'language' parameter.  Pass it down.
2049         * dictionary.c (struct dictionary) <language>: New field.
2050         (DICT_LANGUAGE): Define.
2051         (dict_create_hashed, dict_create_hashed_expandable)
2052         (dict_create_linear, dict_create_linear_expandable): New parameter
2053         'language'.  Set the dictionary's language.
2054         (iter_match_first_hashed): Adjust to rename.
2055         (insert_symbol_hashed): Assert we don't see mismatching
2056         languages.  Adjust to rename.
2057         (dict_hash): Rename to ...
2058         (default_search_name_hash): ... this and make extern.
2059         * dictionary.h (struct language_defn): Forward declare.
2060         (dict_create_hashed): New parameter 'language'.
2061         * dwarf2read.c (dwarf2_start_symtab): Pass down language.
2062         * f-lang.c (f_language_defn): Install default_search_name_hash.
2063         * go-lang.c (go_language_defn): Install default_search_name_hash.
2064         * jit.c (finalize_symtab): Pass compunit's language to dictionary
2065         creation.
2066         * language.c (unknown_language_defn, auto_language_defn):
2067         * language.h (language_defn::la_search_name_hash): New field.
2068         (default_search_name_hash): Declare.
2069         * m2-lang.c (m2_language_defn): Install default_search_name_hash.
2070         * mdebugread.c (new_block): New parameter 'language'.
2071         * mdebugread.c (parse_symbol): Pass symbol language to block
2072         allocation.
2073         (psymtab_to_symtab_1): Pass down language.
2074         (new_symtab): Pass compunit's language to block allocation.
2075         * objc-lang.c (objc_language_defn): Install
2076         default_search_name_hash.
2077         * opencl-lang.c (opencl_language_defn):
2078         * p-lang.c (pascal_language_defn): Install
2079         default_search_name_hash.
2080         * rust-lang.c (rust_language_defn): Install
2081         default_search_name_hash.
2082         * stabsread.h (enum language): Forward declare.
2083         (process_one_symbol): Add 'language' parameter.
2084         * symtab.c (search_name_hash): New function.
2085         * symtab.h (search_name_hash): Declare.
2086         * xcoffread.c (read_xcoff_symtab): Pass language to start_symtab.
2087
2088 2017-11-08  Pedro Alves  <palves@redhat.com>
2089
2090         * cp-name-parser.y (main): Don't initialize extra_chars.
2091
2092 2017-11-07  Tom Tromey  <tom@tromey.com>
2093
2094         * event-top.h (command_handler): Constify.
2095         * record-full.c (cmd_record_full_start): Update.
2096         * thread.c (thread_apply_all_command): Update.
2097         * printcmd.c (eval_command): Update.
2098         * mi/mi-main.c (mi_execute_cli_command): Update.
2099         (mi_execute_async_cli_command): Update.
2100         * tui/tui-stack.c (tui_update_command): Update.
2101         * cli/cli-interp.c (safe_execute_command): Constify.
2102         * record.c (record_start): Update.
2103         (record_start, record_stop, cmd_record_start): Update.
2104         * record-btrace.c (cmd_record_btrace_bts_start): Update.
2105         (cmd_record_btrace_pt_start): Update.
2106         (cmd_record_btrace_start): Update.
2107         (cmd_record_btrace_start): Update.
2108         * reverse.c (exec_reverse_once): Update.
2109         * python/python.c (execute_gdb_command): Don't copy the command.
2110         * event-top.c (command_line_handler): Update.
2111         (command_handler): Constify.
2112         * defs.h (deprecated_call_command_hook): Constify.
2113         * cli/cli-script.h (execute_user_command): Constify.
2114         * cli/cli-script.c (execute_user_command): Constify.
2115         (execute_cmd_pre_hook, execute_cmd_post_hook): Constify.
2116         (enum command_control_type): Update.
2117         * main.c (catch_command_errors): Remove non-const overload.
2118         (catch_command_errors_ftype): Remove.
2119         * python/py-cmd.c (cmdpy_function): Constify.
2120         * guile/scm-cmd.c (cmdscm_function): Constify.
2121         * cli/cli-dump.c (call_dump_func): Constify.
2122         * cli/cli-decode.c (do_const_cfunc): Constify.
2123         (do_sfunc): Constify.
2124         (cmd_func): Constify.
2125         * gdbcmd.h (execute_command, execute_command_to_string): Constify.
2126         * top.h (execute_command): Constify.
2127         * top.c (execute_command): Constify.
2128         (execute_command_to_string): Constify.
2129         (deprecated_call_command_hook): Constify.
2130         * command.h (cmd_func): Constify.
2131         * cli/cli-decode.h (struct cmd_list_element) <func>: Constify.
2132
2133 2017-11-07  Tom Tromey  <tom@tromey.com>
2134
2135         * ada-lang.c (catch_ada_exception_command): Constify.
2136         (catch_assert_command): Constify.
2137         * break-catch-throw.c (catch_catch_command, catch_throw_command)
2138         (catch_rethrow_command): Constify.
2139         (catch_exception_command_1): Constify.
2140         * breakpoint.h (add_catch_command): Constify.
2141         * break-catch-syscall.c (catch_syscall_command_1): Constify.
2142         (catch_syscall_split_args): Constify.
2143         * break-catch-sig.c (catch_signal_command): Constify.
2144         (catch_signal_split_args): Constify.
2145         * cli/cli-decode.h (struct cmd_list_element) <function>: Use
2146         cmd_const_sfunc_ftype.
2147         * cli/cli-decode.c (add_setshow_cmd_full): Constify.
2148         (add_setshow_enum_cmd, add_setshow_auto_boolean_cmd)
2149         (add_setshow_boolean_cmd, add_setshow_filename_cmd)
2150         (add_setshow_string_cmd, struct cmd_list_element)
2151         (add_setshow_optional_filename_cmd, add_setshow_integer_cmd)
2152         (add_setshow_uinteger_cmd, add_setshow_zinteger_cmd)
2153         (add_setshow_zuinteger_unlimited_cmd, add_setshow_zuinteger_cmd):
2154         Constify.
2155         (set_cmd_sfunc): Constify.
2156         (empty_sfunc): Constify.
2157         * command.h (add_setshow_enum_cmd, add_setshow_auto_boolean_cmd)
2158         (add_setshow_boolean_cmd, add_setshow_filename_cmd)
2159         (add_setshow_string_cmd, add_setshow_string_noescape_cmd)
2160         (add_setshow_optional_filename_cmd, add_setshow_integer_cmd)
2161         (add_setshow_uinteger_cmd, add_setshow_zinteger_cmd)
2162         (add_setshow_zuinteger_cmd, add_setshow_zuinteger_unlimited_cmd):
2163         Constify.
2164         (set_cmd_sfunc): Constify.
2165         (cmd_sfunc_ftype): Remove.
2166         * compile/compile.c (set_compile_args): Constify.
2167         * infrun.c (set_disable_randomization): Constify.
2168         * infcmd.c (set_args_command, set_cwd_command): Constify.
2169         * breakpoint.c (set_condition_evaluation_mode): Constify.
2170         (add_catch_command): Constify.
2171         (catch_fork_command_1, catch_exec_command_1)
2172         (catch_load_command_1, catch_unload_command_1): Constify.
2173         (catch_load_or_unload): Constify.
2174         * guile/scm-param.c (pascm_set_func): Constify.
2175         (add_setshow_generic): Constify.
2176         * python/py-param.c (get_set_value): Constify.
2177         * top.h (set_verbose): Constify.
2178         * tui/tui-win.c (tui_set_var_cmd): Constify.
2179         * mi/mi-main.c (set_mi_async_command): Constify.
2180         * cli/cli-logging.c (set_logging_overwrite)
2181         (set_logging_redirect): Constify.
2182         * value.c (set_max_value_size): Constify.
2183         * valprint.c (set_input_radix, set_output_radix): Constify.
2184         * utils.c (set_width_command, set_height_command): Constify.
2185         * typeprint.c (set_print_type_methods, set_print_type_typedefs): Constify.
2186         * tracepoint.c (set_disconnected_tracing)
2187         (set_circular_trace_buffer, set_trace_buffer_size)
2188         (set_trace_user, set_trace_notes, set_trace_stop_notes): Constify.
2189         * top.c (set_history_size_command, set_verbose, set_editing)
2190         (set_gdb_datadir, set_history_filename): Constify.
2191         * target.c (set_targetdebug, maint_set_target_async_command)
2192         (maint_set_target_non_stop_command, set_target_permissions)
2193         (set_write_memory_permission): Constify.
2194         (open_target): Constify.
2195         * target-descriptions.c (set_tdesc_filename_cmd): Constify.
2196         * target-dcache.c (set_stack_cache, set_code_cache): Constify.
2197         * symtab.c (set_symbol_cache_size_handler): Constify.
2198         * symfile.c (set_ext_lang_command): Constify.
2199         * symfile-debug.c (set_debug_symfile): Constify.
2200         * source.c (set_directories_command): Constify.
2201         * solib.c (reload_shared_libraries, gdb_sysroot_changed): Constify.
2202         * serial.c (set_parity): Constify.
2203         * rs6000-tdep.c (powerpc_set_soft_float, powerpc_set_vector_abi): Constify.
2204         * remote.c (set_remote_exec_file, set_remotebreak)
2205         (set_remote_protocol_Z_packet_cmd, set_range_stepping): Constify.
2206         * record.c (set_record_insn_history_size)
2207         (set_record_call_history_size): Constify.
2208         * record-full.c (set_record_full_insn_max_num): Constify.
2209         * proc-api.c (set_procfs_trace_cmd, set_procfs_file_cmd): Constify.
2210         * osabi.c (set_osabi): Constify.
2211         * mips-tdep.c (set_mips64_transfers_32bit_regs)
2212         (reinit_frame_cache_sfunc, mips_abi_update): Constify.
2213         * maint.c (maintenance_set_profile_cmd): Constify.
2214         * linux-thread-db.c (set_libthread_db_search_path): Constify.
2215         * language.c (set_language_command, set_range_command)
2216         (set_case_command): Constify.
2217         * infrun.c (set_non_stop, set_observer_mode)
2218         (set_stop_on_solib_events, set_schedlock_func)
2219         (set_exec_direction_func): Constify.
2220         * infcmd.c (set_inferior_tty_command): Constify.
2221         * disasm.c (set_disassembler_options_sfunc): Constify.
2222         * demangle.c (set_demangling_command): Constify.
2223         * dcache.c (set_dcache_size, set_dcache_line_size): Constify.
2224         * cris-tdep.c (set_cris_version, set_cris_mode)
2225         (set_cris_dwarf2_cfi): Constify.
2226         * corefile.c (set_gnutarget_command): Constify.
2227         * charset.c (set_host_charset_sfunc, set_target_charset_sfunc)
2228         (set_target_wide_charset_sfunc): Constify.
2229         * breakpoint.c (update_dprintf_commands): Constify.
2230         * auto-load.c (set_auto_load_dir, set_auto_load_safe_path): Constify.
2231         * arm-tdep.c (set_fp_model_sfunc, arm_set_abi)
2232         (set_disassembly_style_sfunc): Constify.
2233         * arch-utils.c (set_endian, set_architecture): Constify.
2234         * alpha-tdep.c (reinit_frame_cache_sfunc): Constify.
2235         * agent.c (set_can_use_agent): Constify.
2236
2237 2017-11-07  Tom Tromey  <tom@tromey.com>
2238
2239         * go32-nat.c (go32_sysinfo, go32_sldt, go32_sgdt, go32_sidt)
2240         (go32_pde, go32_pte, go32_pte_for_address): Constify.
2241         * gnu-nat.c (_parse_bool_arg, show_thread_default_pause_cmd)
2242         (set_thread_default_pause_cmd, set_thread_default_run_cmd)
2243         (show_thread_default_run_cmd, set_thread_default_detach_sc_cmd)
2244         (parse_int_arg, show_thread_default_detach_sc_cmd)
2245         (set_signals_cmd, show_signals_cmd, set_sig_thread_cmd)
2246         (show_sig_thread_cmd, set_stopped_cmd, show_stopped_cmd)
2247         (set_exceptions_cmd, show_exceptions_cmd, set_task_pause_cmd)
2248         (show_task_pause_cmd, set_task_detach_sc_cmd)
2249         (show_task_detach_sc_cmd, set_task_exc_port_cmd)
2250         (set_noninvasive_cmd, set_thread_pause_cmd)
2251         (show_thread_pause_cmd, set_thread_run_cmd, show_thread_run_cmd)
2252         (set_thread_detach_sc_cmd, show_thread_detach_sc_cmd)
2253         (set_thread_exc_port_cmd, thread_takeover_sc_cmd): Constify.
2254         * windows-nat.c (display_selectors): Constify.
2255         * cli/cli-decode.h (struct cmd_list_element) <function>: Remove
2256         non-const "cfunc".
2257         * cli/cli-decode.c (set_cmd_cfunc): Remove non-const overload.
2258         (cmd_cfunc_eq): Likewise.
2259         (struct cmd_list_element): Likewise.
2260         (do_cfunc): Remove.
2261         (cli_user_command_p): Update.
2262         * command.h (add_cmd): Remove non-const overload.
2263         (cmd_cfunc_ftype): Remove typedef.
2264         (cmd_cfunc_eq): Remove non-const overload.
2265         * value.c (show_values): Constify.
2266         * thread.c (thread_apply_all_command): Constify.
2267         * symfile.c (load_command): Constify.
2268         * source.c (directory_command): Constify.
2269         * maint.c (maintenance_internal_error)
2270         (maintenance_demangler_warning, maintenance_space_display)
2271         (maintenance_print_architecture, maintenance_translate_address)
2272         (maintenance_info_selftests, maintenance_internal_warning):
2273         Constify.
2274         * breakpoint.c (disable_trace_command, enable_trace_command):
2275         Constify.
2276         * auto-load.c (info_auto_load_local_gdbinit, add_auto_load_dir):
2277         Constify.
2278         (add_auto_load_safe_path): Constify.
2279         * guile/scm-auto-load.c (info_auto_load_guile_scripts): Constify.
2280         * top.h (show_commands): Constify.
2281         * linux-thread-db.c (info_auto_load_libthread_db): Constify.
2282         * sparc64-tdep.c (adi_examine_command): Constify.
2283         (adi_assign_command): Constify.
2284
2285 2017-11-07  Tom Tromey  <tom@tromey.com>
2286
2287         * frame.h (info_locals_command, info_args_command): Constify.
2288         * auto-load.h (auto_load_info_scripts): Constify.
2289         * inferior.h (registers_info): Constify.
2290         * copying.c: Rebuild.
2291         * copying.awk: Constify generated commands.
2292         * auto-load.c (auto_load_info_scripts)
2293         (info_auto_load_gdb_scripts): Constify.
2294         * cli/cli-decode.c (struct cmd_list_element): Take a
2295         cmd_const_cfunc_ftype.
2296         * command.h (add_info): Take a cmd_const_cfunc_ftype.
2297         * tui/tui-win.c (tui_all_windows_info): Constify.
2298         * python/py-auto-load.c (info_auto_load_python_scripts):
2299         Constify.
2300         * cli/cli-cmds.c (show_command): Remove non-const overload.
2301         * tracepoint.c (info_tvariables_command, info_scope_command):
2302         Constify.
2303         (info_static_tracepoint_markers_command): Constify.
2304         * thread.c (info_threads_command): Constify.
2305         (print_thread_info_1): Constify.
2306         * target.c (info_target_command): Constify.
2307         * symtab.c (info_sources_command, info_functions_command)
2308         (info_types_command): Constify.
2309         (info_variables_command): Remove non-const overload.
2310         * symfile.c (info_ext_lang_command): Constify.
2311         * stack.c (info_frame_command, info_locals_command)
2312         (info_args_command): Constify.
2313         (backtrace_command): Remove non-const overload.
2314         * source.c (info_source_command, info_line_command): Constify.
2315         * solib.c (info_sharedlibrary_command): Constify.
2316         * skip.c (info_skip_command): Constify.
2317         * ser-go32.c (info_serial_command): Constify.
2318         * reverse.c (info_bookmarks_command): Constify.
2319         * printcmd.c (info_symbol_command, info_address_command)
2320         (info_display_command): Constify.
2321         * osdata.c (info_osdata_command): Constify.
2322         * objc-lang.c (info_selectors_command, info_classes_command):
2323         Constify.
2324         * nto-procfs.c (procfs_pidlist, procfs_meminfo): Constify.
2325         * memattr.c (info_mem_command): Constify.
2326         * macrocmd.c (info_macro_command, info_macros_command): Constify.
2327         * linux-fork.c (info_checkpoints_command): Constify.
2328         * infrun.c (info_signals_command): Constify.
2329         * inflow.c (info_terminal_command): Constify.
2330         * inferior.c (info_inferiors_command): Constify.
2331         (print_inferior): Constify.
2332         * infcmd.c (info_program_command, info_all_registers_command)
2333         (info_registers_command, info_vector_command)
2334         (info_float_command): Constify.
2335         (registers_info): Constify.
2336         * gnu-nat.c (info_send_rights_cmd, info_recv_rights_cmd)
2337         (info_port_sets_cmd, info_dead_names_cmd, info_port_rights_cmd):
2338         Constify.
2339         * f-valprint.c (info_common_command): Constify.
2340         * dcache.c (info_dcache_command): Constify.
2341         (dcache_info_1): Constify.
2342         * darwin-nat-info.c (info_mach_tasks_command)
2343         (info_mach_task_command, info_mach_ports_command)
2344         (info_mach_port_command, info_mach_threads_command)
2345         (info_mach_thread_command, info_mach_regions_command)
2346         (info_mach_regions_recurse_command, info_mach_region_command)
2347         (info_mach_exceptions_command): Constify.
2348         (get_task_from_args): Constify.
2349         * cp-support.c (info_vtbl_command): Constify.
2350         * breakpoint.c (info_watchpoints_command)
2351         (info_tracepoints_command): Constify.
2352         (info_breakpoints_command): Remove non-const overload.
2353         * avr-tdep.c (avr_io_reg_read_command): Constify.
2354         * auxv.c (info_auxv_command): Constify.
2355         * ada-tasks.c (info_tasks_command): Constify.
2356         (info_task): Constify.
2357         * ada-lang.c (info_exceptions_command): Constify.
2358
2359 2017-11-07  Tom Tromey  <tom@tromey.com>
2360
2361         * solib.h (no_shared_libraries): Constify.
2362         * frame.h (return_command): Constify.
2363         * cli/cli-cmds.h (quit_command): Constify.
2364         * top.h (quit_command, execute_command): Constify.
2365         * target.h (flash_erase_command): Constify.
2366         * inferior.h (set_inferior_args, attach_command): Constify.
2367         * tracepoint.h (start_tracing, stop_tracing): Constify.
2368         * breakpoint.h (break_command, tbreak_command)
2369         (hbreak_command_wrapper, thbreak_command_wrapper)
2370         (rbreak_command_wrapper, watch_command_wrapper)
2371         (awatch_command_wrapper, rwatch_command_wrapper)
2372         (get_tracepoint_by_number): Constify.
2373         * symtab.c (info_variables_command, rbreak_command)
2374         (symtab_symbol_info): Constify.
2375         (info_variables_command): Add non-const overload.
2376         * top.c (dont_repeat_command): Constify.
2377         * breakpoint.c (ignore_command, commands_command)
2378         (condition_command, tbreak_command, hbreak_command)
2379         (thbreak_command, clear_command, break_command)
2380         (info_breakpoints_command, watch_command, rwatch_command)
2381         (awatch_command, trace_command, ftrace_command, strace_command)
2382         (trace_pass_command, break_range_command, dprintf_command)
2383         (agent_printf_command, get_tracepoint_by_number)
2384         (watch_maybe_just_location, trace_pass_command): Constify.
2385         (info_breakpoints_command): Add non-const overload.
2386         * tracefile.c (tsave_command): Constify.
2387         * infcmd.c (attach_command, disconnect_command, signal_command)
2388         (queue_signal_command, stepi_command, nexti_command)
2389         (finish_command, next_command, step_command, until_command)
2390         (advance_command, jump_command, continue_command, run_command)
2391         (start_command, starti_command, interrupt_command)
2392         (run_command_1, set_inferior_args, step_1): Constify.
2393         * inferior.c (add_inferior_command, remove_inferior_command)
2394         (clone_inferior_command): Constify.
2395         * linux-fork.c (checkpoint_command, restart_command): Constify.
2396         * windows-nat.c (signal_event_command): Constify.
2397         * guile/guile.c (guile_repl_command, guile_command): Constify.
2398         * printcmd.c (x_command, display_command, printf_command)
2399         (output_command, set_command, call_command, print_command)
2400         (eval_command): Constify.
2401         (non_const_set_command): Remove.
2402         (_initialize_printcmd): Update.
2403         * source.c (forward_search_command, reverse_search_command):
2404         Constify.
2405         * jit.c (jit_reader_load_command, jit_reader_unload_command):
2406         Constify.
2407         * infrun.c (handle_command): Constify.
2408         * memattr.c (mem_command): Constify.
2409         * stack.c (return_command, up_command, up_silently_command)
2410         (down_command, down_silently_command, frame_command)
2411         (backtrace_command, func_command, backtrace_command_1): Constify.
2412         (backtrace_command): Add non-const overload.
2413         * remote-sim.c (simulator_command): Constify.
2414         * exec.c (set_section_command): Constify.
2415         * tracepoint.c (tdump_command, trace_variable_command)
2416         (tstatus_command, tstop_command, tstart_command)
2417         (end_actions_pseudocommand, while_stepping_pseudocommand)
2418         (collect_pseudocommand, teval_pseudocommand, actions_command)
2419         (start_tracing, stop_tracing): Constify.
2420         * value.c (init_if_undefined_command): Constify.
2421         * tui/tui-stack.c (tui_update_command): Constify.
2422         * tui/tui-win.c (tui_refresh_all_command)
2423         (tui_set_tab_width_command, tui_set_win_height_command)
2424         (tui_set_focus_command, tui_scroll_forward_command)
2425         (tui_scroll_backward_command, tui_scroll_left_command)
2426         (tui_scroll_right_command, parse_scrolling_args, tui_set_focus)
2427         (tui_set_win_height): Constify.
2428         * tui/tui-layout.c (tui_layout_command): Constify.
2429         * procfs.c (proc_trace_syscalls, proc_trace_sysentry_cmd)
2430         (proc_trace_sysexit_cmd, proc_untrace_sysentry_cmd)
2431         (proc_untrace_sysexit_cmd): Constify.
2432         * remote.c (threadlist_test_cmd, threadinfo_test_cmd)
2433         (threadset_test_cmd, threadlist_update_test_cmd)
2434         (threadalive_test): Constify.
2435         * objc-lang.c (print_object_command): Constify.
2436         * command.h (add_com): Constify.
2437         * cli/cli-dump.c (restore_command): Constify.
2438         * cli/cli-cmds.c (pwd_command, echo_command, quit_command)
2439         (help_command, complete_command, shell_command, edit_command)
2440         (list_command, disassemble_command, make_command)
2441         (apropos_command, alias_command): Constify.
2442         * cli/cli-script.c (document_command, define_command)
2443         (while_command, if_command, validate_comname): Constify.
2444         * cli/cli-decode.c (struct cmd_list_element): Change type of
2445         "fun".
2446         * target.c (do_monitor_command, flash_erase_command): Constify.
2447         * regcache.c (reg_flush_command): Constify.
2448         * reverse.c (reverse_step, reverse_next, reverse_stepi)
2449         (reverse_nexti, reverse_continue, reverse_finish)
2450         (save_bookmark_command, goto_bookmark_command)
2451         (exec_reverse_once): Constify.
2452         * python/python.c (python_interactive_command, python_command):
2453         Constify.
2454         * typeprint.c (ptype_command, whatis_command, whatis_exp):
2455         Constify.
2456         * solib.c (sharedlibrary_command, no_shared_libraries): Constify.
2457         * gcore.c (gcore_command): Constify.
2458
2459 2017-11-07  Tom Tromey  <tom@tromey.com>
2460
2461         * printcmd.c (x_command): Call set_repeat_arguments.
2462         * cli/cli-cmds.c (list_command): Call set_repeat_arguments.
2463         * top.c (repeat_arguments): New global.
2464         (set_repeat_arguments): New function.
2465         (execute_command): Handle repeat_arguments.
2466         (show_commands): Calls set_repeat_arguments.
2467         * command.h (set_repeat_arguments): Declare.
2468
2469 2017-11-07  Tom Tromey  <tom@tromey.com>
2470
2471         * stack.c (backtrace_command): Use std::string.
2472         (backtrace_command_1): Make "count_exp" const.
2473
2474 2017-11-07  Tom Tromey  <tom@tromey.com>
2475
2476         * source.c (directory_switch, mod_path, add_path): Constify.
2477         * defs.h (add_path, mod_path, directory_switch): Constify.
2478         * mi/mi-cmd-env.c (env_mod_path): Constify.
2479
2480 2017-11-07  Tom Tromey  <tom@tromey.com>
2481
2482         * infcmd.c (strip_bg_char): Return gdb::unique_xmalloc_ptr.
2483         (run_command_1, continue_command, step_1, jump_command)
2484         (signal_command, until_command, advance_command, finish_command)
2485         (attach_command): Update.
2486
2487 2017-11-07  Tom Tromey  <tom@tromey.com>
2488
2489         * command.h (set_cmd_cfunc): Don't declare.
2490         * cli/cli-decode.c (set_cmd_cfunc): Now static.
2491
2492 2017-11-07  Tom Tromey  <tom@tromey.com>
2493
2494         * stack.c (select_frame_command): Constify.
2495         * cli/cli-decode.c (add_com_suppress_notification): Constify.
2496         * command.h (add_com_suppress_notification): Constify.
2497
2498 2017-11-07  Tom Tromey  <tom@tromey.com>
2499
2500         * breakpoint.c (stop_command): Constify.
2501         * cli/cli-decode.c (struct cmd_list_element): Constify.
2502         * command.h (add_abbrev_prefix_cmd): Constify.
2503
2504 2017-11-07  Pedro Alves  <palves@redhat.com>
2505
2506         * breakpoint.c (extract_bp_kind): New enum.
2507         (extract_bp_num, extract_bp_or_bp_range): New functions, partially
2508         factored out from ...
2509         (extract_bp_number_and_location): ... here.
2510         * cli/cli-utils.c (get_number_trailer): Handle '-$variable'.
2511
2512 2017-11-07  Pedro Alves  <palves@redhat.com>
2513
2514         * breakpoint.c (extract_bp_number_and_location): Change return
2515         type to void.  Throw error instead of warning.
2516         (enable_disable_command): Adjust.
2517
2518 2017-11-07  Xavier Roirand  <roirand@adacore.com>
2519             Pedro Alves  <palves@redhat.com>
2520
2521         * breakpoint.c (map_breakpoint_number_range): New, factored out
2522         from ...
2523         (map_breakpoint_numbers): ... here.
2524         (find_location_by_number): Change parameters from string to
2525         breakpoint number and location.
2526         (extract_bp_number_and_location): New function.
2527         (enable_disable_bp_num_loc)
2528         (enable_disable_breakpoint_location_range)
2529         (enable_disable_command): New functions, factored out ...
2530         (enable_command, disable_command): ... these functions, and
2531         adjusted to support ranges.
2532         * NEWS: Document enable/disable breakpoint location range feature.
2533
2534 2017-11-06  Luis Machado  <luis.machado@linaro.org>
2535
2536         * MAINTAINERS (Write After Approval): Update my e-mail address.
2537
2538 2017-11-06  Pedro Alves  <palves@redhat.com>
2539
2540         * gnu-nat.c (gnu_terminal_init): Delete.
2541         (gnu_target): Don't install gnu_terminal_init.
2542         * inflow.c (child_terminal_init_with_pgrp): Delete, merged with ...
2543         (child_terminal_init): ... this function.
2544
2545 2017-11-06  Pedro Alves  <palves@redhat.com>
2546
2547         * common/common.m4 (GDB_AC_COMMON): No longer check termio.h nor
2548         sgtty.h.
2549         * config.in, configure: Regenerate.
2550
2551 2017-11-06  Pedro Alves  <palves@redhat.com>
2552
2553         * event-top.c: Check SIGTSTP instead of STOP_SIGNAL thoughout.
2554         (async_init_signals): Adjust.
2555         (handle_stop_sig): Rename to ...
2556         (handle_sigtstp): ... this.
2557         (async_stop_sig): Rename to ...
2558         (async_sigtstp_handler): ... this, and delete STOP_SIGNAL !=
2559         SIGTSTP path.
2560         * event-top.h: Move signal.h include to the top.  Check SIGTSTP
2561         instead of STOP_SIGNAL thoughout.
2562         (handle_stop_sig): Rename to ...
2563         (handle_sigtstp): ... this.
2564         * top.c (command_line_input): Replace STOP_SIGNAL -> SIGTSTP.
2565
2566 2017-11-06  Pedro Alves  <palves@redhat.com>
2567
2568         * inflow.c (child_terminal_inferior, child_terminal_ours_1): No
2569         longer set flags twice in row.
2570
2571 2017-11-06  Pedro Alves  <palves@redhat.com>
2572
2573         * Makefile.in (SER_HARDWIRE): Update comment.
2574         (HFILES_NO_SRCDIR): Remove gdb_termios.h.
2575         * common/gdb_termios.h: Delete file.
2576         * common/job-control.c: Include termios.h and unistd.h instead of
2577         gdb_termios.h.
2578         (gdb_setpgid): Remove HAVE_TERMIOS || TIOCGPGRP preprocessor
2579         check.
2580         (have_job_control): Check HAVE_TERMIOS_H instead of HAVE_TERMIOS.
2581         Remove sgtty code.
2582         * configure.ac: No longer check for termio.h and sgtty.h.
2583         * configure: Regenerate.
2584         * inflow.c: Include termios.h instead of gdb_termios.h.  Replace
2585         PROCESS_GROUP_TYPE checks with HAVE_TERMIOS_H checks throughout.
2586         Replace PROCESS_GROUP_TYPE references with pid_t references
2587         throughout.
2588         (gdb_getpgrp): Delete.
2589         (set_initial_gdb_ttystate): Use tcgetpgrp instead of gdb_getpgrp.
2590         (child_terminal_inferior): Remove comment.  Remove sgtty code.
2591         (child_terminal_ours_1): Use tcgetpgrp directly instead of
2592         gdb_getpgrp.  Use serial_set_tty_state instead aof
2593         serial_noflush_set_tty_state.  Remove sgtty code.
2594         * inflow.h: Include unistd.h instead of gdb_termios.h.  Replace
2595         PROCESS_GROUP_TYPE check with HAVE_TERMIOS_H check.
2596         (inferior_process_group): Now returns pid_t.
2597         * ser-base.c (ser_base_noflush_set_tty_state): Delete.
2598         * ser-base.h (ser_base_noflush_set_tty_state): Delete.
2599         * ser-event.c (serial_event_ops): Update.
2600         * ser-go32.c (dos_noflush_set_tty_state): Delete.
2601         (dos_ops): Update.
2602         * ser-mingw.c (hardwire_ops, tty_ops, pipe_ops, tcp_ops): Update.
2603         * ser-pipe.c (pipe_ops): Update.
2604         * ser-tcp.c (tcp_ops): Update.
2605         * ser-unix.c: Include termios.h instead of gdb_termios.h.  Remove
2606         HAVE_TERMIOS checks.
2607         [HAVE_TERMIO] (struct hardwire_ttystate): Delete.
2608         [HAVE_SGTTY] (struct hardwire_ttystate): Delete.
2609         (get_tty_state, set_tty_state): Drop termio and sgtty code, and
2610         assume termios.
2611         (hardwire_noflush_set_tty_state): Delete.
2612         (hardwire_print_tty_state, hardwire_drain_output)
2613         (hardwire_flush_output, hardwire_flush_input)
2614         (hardwire_send_break, hardwire_raw, hardwire_setbaudrate)
2615         (hardwire_setstopbits, hardwire_setparity): Drop termio and sgtty
2616         code, and assume termios.
2617         (hardwire_ops): Update.
2618         (_initialize_ser_hardwire): Remove HAVE_TERMIOS check.
2619         * serial.c (serial_noflush_set_tty_state): Delete.
2620         * serial.h (serial_noflush_set_tty_state): Delete.
2621         (serial_ops::noflush_set_tty_state): Delete.
2622
2623 2017-11-06  Ulrich Weigand  <uweigand@de.ibm.com>
2624
2625         * Makefile.in (SFILES): Remove doublest.c and dfp.c.
2626         (HFILES_NO_SRCDIR): Remove doublest.h and dfp.h.
2627         (COMMON_OBS): Remove doublest.o and dfp.o.
2628         Do not build target-float.c (instead of doublest.c)
2629         with -Wformat-nonliteral.
2630
2631         * doublest.c: Remove file.
2632         * doublest.h: Remove file.
2633         * dfp.c: Remove file.
2634         * dfp.h: Remove file.
2635
2636         * target-float.c: Do not include "doublest.h" and "dfp.h".
2637         (DOUBLEST): Move here from doublest.h.
2638         (enum float_kind): Likewise.
2639         (FLOATFORMAT_CHAR_BIT): Likewise.
2640         (FLOATFORMAT_LARGEST_BYTES): Likewise.
2641         (floatformat_totalsize_bytes): Move here from doublest.c.  Make static.
2642         (floatformat_precision): Likewise.
2643         (floatformat_normalize_byteorder, get_field, put_field): Likewise.
2644         (floatformat_is_negative, floatformat_classify, floatformat_mantissa):
2645         Likewise.
2646         (host_float_format, host_double_format, host_long_double_format):
2647         Likewise.
2648         (floatformat_to_string, floatformat_from_string): Likewise.
2649         (floatformat_to_doublest): Likewise.  Also, inline the original
2650         convert_floatformat_to_doublest.
2651         (floatformat_from_doublest): Likewise.  Also, inline the original
2652         convert_floatformat_from_doublest.
2653
2654         Include "dpd/decimal128.h", "dpd/decimal64.h", and "dpd/decimal32.h".
2655         (MAX_DECIMAL_STRING): Move here from dfp.c.
2656         (match_endianness): Likewise.
2657         (set_decnumber_context, decimal_check_errors): Likewise.
2658         (decimal_from_number, decimal_to_number): Likewise.
2659         (decimal_to_string, decimal_from_string): Likewise.  Make static.
2660         (decimal_from_longest, decimal_from_ulongest): Likewise.
2661         (decimal_to_longest): Likewise.
2662         (decimal_binop, decimal_is_zero, decimal_compare): Likewise.
2663         (decimal_convert): Likewise.
2664
2665 2017-11-06  Ulrich Weigand  <uweigand@de.ibm.com>
2666
2667         * doublest.c: Do not include "gdbtypes.h".
2668         (extract_typed_floating): Remove.
2669         (store_typed_floating): Remove.
2670         (convert_typed_floating): Remove.
2671         * doublest.h (struct type): Remove.
2672         (DOUBLEST_PRINT_FORMAT): Remove.
2673         (DOUBLEST_SCAN_FORMAT): Remove.
2674         (extract_typed_floating): Remove.
2675         (store_typed_floating): Remove.
2676         (convert_typed_floating): Remove.
2677
2678         * dfp.c (decimal_from_doublest): Remove.
2679         (decimal_to_doublest): Remove.
2680         * dfp.h: Do not include "doublest.h".
2681         (decimal_from_doublest): Remove.
2682         (decimal_to_doublest): Remove.
2683
2684         * value.c: Do not include "doublest.h" and "dfp.h".
2685         (value_as_double): Remove.
2686         (unpack_double): Remove.
2687         (value_from_double): Remove.
2688         (value_from_decfloat): Remove.
2689         * value.h: Do not include "doublest.h".
2690         (value_as_double): Remove.
2691         (unpack_double): Remove.
2692         (value_from_double): Remove.
2693         (value_from_decfloat): Remove.
2694
2695 2017-11-06  Ulrich Weigand  <uweigand@de.ibm.com>
2696
2697         * i386-tdep.c: Include "target-float.h".  Do not include "doublest.h".
2698         (i386_extract_return_value): Use target_float_convert.
2699         (i386_store_return_value): Likewise.
2700         * i387-tdep.c (i387_register_to_value): Use target_float_convert.
2701         (i387_value_to_register): Likewise.
2702         * ia64-tdep.c: Include "target-float.h".  Do not include "doublest.h".
2703         (ia64_register_to_value): Use target_float_convert.
2704         (ia64_value_to_register): Likewise.
2705         (ia64_extract_return_value): Likewise.
2706         (ia64_store_return_value): Likewise.
2707         (ia64_push_dummy_call): Likewise.
2708         * m68k-tdep.c: Include "target-float.h".
2709         (m68k_register_to_value): Use target_float_convert.
2710         (m68k_value_to_register): Likewise.
2711         (m68k_svr4_extract_return_value): Likewise.
2712         (m68k_svr4_store_return_value): Likewise.
2713         * ppc-sysv-tdep.c: Include "target-float.h".
2714         (ppc_sysv_abi_push_dummy_call): Use target_float_convert.
2715         (do_ppc_sysv_return_value): Likewise.
2716         (ppc64_sysv_abi_push_freg): Likewise.
2717         (ppc64_sysv_abi_return_value_base): Likewise.
2718         * rs6000-aix-tdep.c: Include "target-float.h".
2719         (rs6000_push_dummy_call): Use target_float_convert.
2720         (rs6000_return_value): Likewise.
2721         * rs6000-lynx178-tdep.c: Include "target-float.h".
2722         (rs6000_lynx178_push_dummy_call): Use target_float_convert.
2723         (rs6000_lynx178_return_value): Likewise.
2724         * rs6000-tdep.c: Include "target-float.h".  Do not include "doublest.h".
2725         (rs6000_register_to_value): Use target_float_convert.
2726         (rs6000_value_to_register): Likewise.
2727         * arm-tdep.c: Include "target-float.h".  Do not include "doublest.h".
2728         (arm_extract_return_value): Use target_float_convert.
2729         (arm_store_return_value): Likewise.
2730         * sh-tdep.c: Include "target-float.h".  Do not include "doublest.h".
2731         (sh_register_convert_to_virtual): Use target_float_convert.
2732         (sh_register_convert_to_raw): Likewise.
2733         * sh64-tdep.c: Include "target-float.h".
2734         (sh64_extract_return_value): Use target_float_convert.
2735         (sh64_register_convert_to_virtual): Likewise.
2736         (sh64_register_convert_to_raw): Likewise.  Fix argument types.
2737
2738 2017-11-06  Ulrich Weigand  <uweigand@de.ibm.com>
2739
2740         * target-float.c (floatformat_to_host_double): New function.
2741         (floatformat_from_host_double): Likewise.
2742         (target_float_to_host_double): Likewise.
2743         (target_float_from_host_double): Likewise.
2744         * target-float.h (target_float_to_host_double): Add prototype.
2745         (target_float_from_host_double): Likewise.
2746
2747         * guile/scm-value.c: Include "target-float.h".
2748         (gdbscm_value_to_real): Use target_float_to_host_double.
2749         Handle integer source values via value_as_long.
2750         * guile/scm-math.c: Include "target-float.h".  Do not include
2751         "doublest.h", "dfp.h", and "expression.h".
2752         (vlscm_convert_typed_number): Use target_float_from_host_double.
2753         (vlscm_convert_number): Likewise.
2754
2755         * python/py-value.c (valpy_float): Use target_float_to_host_double.
2756         (convert_value_from_python): Use target_float_from_host_double.
2757
2758 2017-11-06  Ulrich Weigand  <uweigand@de.ibm.com>
2759
2760         * ada-lang.c (cast_to_fixed): Reimplement in target arithmetic.
2761         (cast_from_fixed): Likewise.
2762         (ada_scaling_type): New function.
2763         (ada_delta): Return value instead of DOUBLEST.  Perform target
2764         arithmetic instead of host arithmetic.
2765         (scaling_factor): Rename to ...
2766         (ada_scaling_factor) ... this.  Make non-static.  Return value instead
2767         of DOUBLEST.  Perform target arithmetic instead of host arithmetic.
2768         (ada_fixed_to_float): Remove.
2769         (ada_float_to_fixed): Remove.
2770         * ada-lang.h (ada_fixed_to_float): Remove.
2771         (ada_float_to_fixed): Remove.
2772         (ada_delta): Return value instead of DOUBLEST.
2773         (ada_scaling_factor): Add prototype.
2774
2775         * ada-typeprint.c: Include "target-float.h".
2776         (print_fixed_point_type): Perform target arithmetic instead of
2777         host arithmetic.
2778         * ada-valprint.c: Include "target-float.h".
2779         (ada_val_print_num): Perform target arithmetic instead of
2780         host arithmetic for fixed-point types.
2781
2782 2017-11-06  Ulrich Weigand  <uweigand@de.ibm.com>
2783
2784         * target-float.c: Include <math.h>.
2785         (floatformat_binop): New function.
2786         (floatformat_compare): Likewise.
2787         (target_float_binop): Likewise.
2788         (target_float_compare): Likewise.
2789         * target-float.h: Include "expression.h".
2790         (target_float_binop): Add prototype.
2791         (target_float_compare): Likewise.
2792
2793         * valarith.c: Do not include "doublest.h" and "dfp.h".
2794         Include "common/byte-vector.h".
2795         (value_args_as_decimal): Remove, replace by ...
2796         (value_args_as_target_float): ... this function.  Handle both
2797         binary and decimal target floating-point formats.
2798         (scalar_binop): Handle both binary and decimal FP using
2799         value_args_as_target_float and target_float_binop.
2800         (value_equal): Handle both binary and decimal FP using
2801         value_args_as_target_float and target_float_compare.
2802         (value_less): Likewise.
2803         (value_pos): Handle all scalar types as simple copy.
2804         (value_neg): Handle all scalar types via BINOP_SUB from 0.
2805         * dfp.c (decimal_binop): Throw error instead of internal_error
2806         when called with an unsupported operation code.
2807
2808 2017-11-06  Ulrich Weigand  <uweigand@de.ibm.com>
2809
2810         * target-float.c (target_float_to_string): New function.
2811         (target_float_from_string): New function.
2812         * target-float.h (target_float_to_string): Add prototype.
2813         (target_float_from_string): Add prototype.
2814
2815         * valprint.c: Include "target-float.h".  Do not include
2816         "doublest.h" and "dfp.h".
2817         (print_floating): Use target_float_to_string.
2818         * printcmd.c: Include "target-float.h".  Do not include "dfp.h".
2819         (printf_floating): Use target_float_to_string.
2820         * i387-tdep.c: Include "target-float.h".  Do not include "doublest.h".
2821         (print_i387_value): Use target_float_to_string.
2822         * mips-tdep.c: Include "target-float.h".
2823         (mips_print_fp_register): Use target_float_to_string.
2824         * sh64-tdep.c: Include "target-float.h".
2825         (sh64_do_fp_register): Use target_float_to_string.
2826
2827         * parse.c: Include "target-float.h".  Do not include
2828         "doublest.h" and "dfp.h".
2829         (parse_float): Use target_float_from_string.
2830         * stabsread.c: Include "target-float.h".  Do not include "doublest.h".
2831         (define_symbol): Use target_float_from_string.
2832         * gdbarch-selftests.c: Include "target-float.h".
2833         (register_to_value_test): Use target_float_from_string.
2834
2835 2017-11-06  Ulrich Weigand  <uweigand@de.ibm.com>
2836
2837         * Makefile.c (SFILES): Add target-float.c.
2838         (HFILES_NO_SRCDIR): Add target-float.h.
2839         (COMMON_OBS): Add target-float.o.
2840         * target-float.h: New file.
2841         * target-float.c: New file.
2842
2843         * doublest.c (floatformat_classify): Fix detection of float_zero.
2844
2845         * gdbtypes.c (is_floating_type): New function.
2846         * gdbtypes.h (is_floating_type): Add prototype.
2847
2848         * value.c: Do not include "floatformat.h".
2849         (unpack_double): Use target_float_is_valid.
2850         (is_floating_value): New function.
2851         * value.h (is_floating_value): Add prototype-
2852
2853         * valarith.c: Include "target-float.h".
2854         (value_logical_not): Use target_float_is_zero.
2855
2856         * python/py-value.c: Include "target-float.h".
2857         (valpy_nonzero): Use target_float_is_zero.
2858
2859 2017-11-04  Tom Tromey  <tom@tromey.com>
2860
2861         * h8300-tdep.c (h8300_push_dummy_call): Use std::vector.
2862
2863 2017-11-04  Tom Tromey  <tom@tromey.com>
2864
2865         * breakpoint.c (set_momentary_breakpoint): Return
2866         breakpoint_up.
2867         (until_break_command): Update.
2868         (new_until_break_fsm): Change argument types to
2869         breakpoint_up.
2870         (set_momentary_breakpoint_at_pc): Return breakpoint_up.
2871         (do_delete_breakpoint_cleanup, make_cleanup_delete_breakpoint):
2872         Remove.
2873         * infcmd.c (finish_forward): Update.
2874         * breakpoint.h (set_momentary_breakpoint)
2875         (set_momentary_breakpoint_at_pc): Return breakpoint_up.
2876         (make_cleanup_delete_breakpoint): Remove.
2877         (struct breakpoint_deleter): New.
2878         (breakpoint_up): New typedef.
2879         * infrun.c (insert_step_resume_breakpoint_at_sal_1): Update.
2880         (insert_exception_resume_breakpoint): Update.
2881         (insert_exception_resume_from_probe): Update.
2882         (insert_longjmp_resume_breakpoint): Update.
2883         * arm-linux-tdep.c (arm_linux_copy_svc): Update.
2884         * elfread.c (elf_gnu_ifunc_resolver_stop): Update.
2885         * infcall.c (call_function_by_hand_dummy): Update
2886
2887 2017-11-04  Tom Tromey  <tom@tromey.com>
2888
2889         * c-typeprint.c (c_type_print_base): Use gdb::unique_xmalloc_ptr.
2890
2891 2017-11-04  Tom Tromey  <tom@tromey.com>
2892
2893         * linux-tdep.c (linux_core_info_proc_mappings): Use
2894         gdb::def_vector.
2895         (linux_get_siginfo_data): Return gdb::byte_vector.  Remove
2896         "size" argument.
2897         (linux_corefile_thread): Update.
2898         (linux_make_corefile_notes): Remove unused variable.
2899
2900 2017-11-04  Tom Tromey  <tom@tromey.com>
2901
2902         * ppc-linux-tdep.c (ppc_linux_get_syscall_number): Use
2903         gdb::byte_vector.
2904
2905 2017-11-04  Tom Tromey  <tom@tromey.com>
2906
2907         * objfiles.c (do_free_objfile_cleanup): Remove.
2908         * compile/compile-object-load.c (compile_object_load): Update.
2909         * objfiles.h (make_cleanup_free_objfile): Remove.
2910
2911 2017-11-04  Tom Tromey  <tom@tromey.com>
2912
2913         * sparc64-tdep.c (do_examine): Use gdb::def_vector.
2914         (adi_read_versions): Change "tags" to "gdb_byte *".
2915         (adi_print_versions): Likewise.
2916
2917 2017-11-04  Tom Tromey  <tom@tromey.com>
2918
2919         * breakpoint.c
2920         (scoped_rbreak_breakpoints::scoped_rbreak_breakpoints): Rename
2921         from start_rbreak_breakpoints.
2922         (scoped_rbreak_breakpoints): Rename from end_rbreak_breakpoints.
2923         * breakpoint.h (class scoped_rbreak_breakpoints): New.
2924         (start_rbreak_breakpoints, end_rbreak_breakpoints): Remove.
2925         * symtab.c (do_end_rbreak_breakpoints): Remove.
2926         (rbreak_command): Use scoped_rbreak_breakpoints, std::string.
2927
2928 2017-11-04  Tom Tromey  <tom@tromey.com>
2929
2930         * cp-namespace.c (reset_directive_searched): Remove.
2931         (cp_lookup_symbol_via_imports): Use scoped_restore.
2932         * cp-support.c (reset_directive_searched): Remove.
2933         (make_symbol_overload_list_using): Use scoped_restore.
2934         * d-namespace.c (d_lookup_symbol_imports): Use scoped_restore.
2935         (reset_directive_searched): Remove.
2936
2937 2017-11-04  Tom Tromey  <tom@tromey.com>
2938
2939         * symfile.c (find_separate_debug_file_by_debuglink): Use
2940         unique_xmalloc_ptr.
2941
2942 2017-11-04  Tom Tromey  <tom@tromey.com>
2943
2944         * compile/compile-loc2c.c (compute_stack_depth_worker): Change
2945         type of "info".
2946         (compute_stack_depth): Likewise.
2947         (do_compile_dwarf_expr_to_c): Use std::vector.
2948
2949 2017-11-04  Tom Tromey  <tom@tromey.com>
2950
2951         * compile/compile-object-load.c (link_callbacks_einfo): Use
2952         std::string.
2953
2954 2017-11-04  Tom Tromey  <tom@tromey.com>
2955
2956         * dwarf2read.c (process_full_comp_unit, process_full_type_unit):
2957         Use scoped_free_pendings.
2958         * dbxread.c (dbx_symfile_read, dbx_psymtab_to_symtab_1): Use
2959         scoped_free_pendings.
2960         * xcoffread.c (xcoff_psymtab_to_symtab_1): Use scoped_free_pendings.
2961         (xcoff_initial_scan): Likewise.
2962         * buildsym.c (reset_symtab_globals): Update comment.
2963         (scoped_free_pendings): Rename from really_free_pendings.
2964         (prepare_for_building): Update comment.
2965         (buildsym_init): Likewise.
2966         * buildsym.h (class scoped_free_pendings): New class.
2967         (really_free_pendings): Don't declare.
2968
2969 2017-11-03  Ulrich Weigand  <uweigand@de.ibm.com>
2970
2971         * doublest.c (convert_doublest_to_floatformat): Fix uninitialized
2972         output when converting a zero value to a special byteorder format.
2973
2974 2017-11-02  Yao Qi  <yao.qi@linaro.org>
2975
2976         * frame.c (do_frame_register_read): Remove aspace.
2977         * jit.c (jit_frame_sniffer): Likwise.
2978         * ppc-linux-tdep.c (ppu2spu_sniffer): Likewise.
2979         * regcache.c (regcache::regcache): Pass nullptr.
2980         (regcache_print): Caller updated.
2981         * regcache.h (regcache::regcache): Remove one constructor
2982         parameter aspace.
2983
2984 2017-11-02  Yao Qi  <yao.qi@linaro.org>
2985
2986         * regcache.h (regcache) <m_readonly_p>: Change it to const bool.
2987
2988 2017-11-02  Yao Qi  <yao.qi@linaro.org>
2989
2990         * breakpoint.c (insert_single_step_breakpoints): Update.
2991         * frame.c (struct frame_info) <aspace>: Add const.
2992         (frame_save_as_regcache): Add const.
2993         (get_frame_address_space): Return const address_space *.
2994         * frame.h (get_frame_address_space): Update declaration.
2995         * infrun.c (struct step_over_info) <aspace>: Add const.
2996         (set_step_over_info): Make aspace const.
2997         (displaced_step_prepare_throw): Change variable const.
2998         (resume): Likewise.
2999         (proceed): Likewise.
3000         (adjust_pc_after_break): Likewise.
3001         (save_waitstatus): Likewise.
3002         (handle_signal_stop): Likewise.
3003         (keep_going_pass_signal): Likewise.
3004         * jit.c (jit_frame_sniffer): Add const.
3005         * mips-tdep.c (mips_single_step_through_delay): Likewise.
3006         * ppc-linux-tdep.c (ppu2spu_sniffer): Likewise.
3007         * record-full.c (record_full_wait_1): Likewise.
3008         * regcache.c (regcache::regcache): Change parameter to const.
3009         * regcache.h (regcache::regcache): Likewise.
3010         (regcache::aspace): Return const address_space *.
3011         (regcache) <m_aspace>: Add const.
3012
3013 2017-11-02  Yao Qi  <yao.qi@linaro.org>
3014
3015         * darwin-nat.c (cancel_breakpoint): Use regcache->aspace ().
3016         * frame.c (create_sentinel_frame): Likewise.
3017         * infrun.c (displaced_step_prepare_throw): Likewise.
3018         (resume): Likewise.
3019         (thread_still_needs_step_over_bp): Likewise.
3020         (proceed): Likewise.
3021         (do_target_wait): Likewise.
3022         (adjust_pc_after_break): Likewise.
3023         (handle_syscall_event): Likewise.
3024         (save_waitstatus): Likewise.
3025         (handle_inferior_event_1): Likewise.
3026         (handle_signal_stop): Likewise.
3027         (keep_going_pass_signal): Likewise.
3028         * linux-nat.c (status_callback): Likewise.
3029         (save_stop_reason): Likewise.
3030         (resume_stopped_resumed_lwps): Likewise.
3031         * record-full.c (record_full_exec_insn): Likewise.
3032         (record_full_wait_1): Likewise.
3033         * regcache.c (get_regcache_aspace): Remove.
3034         * regcache.h (get_regcache_aspace): Remove.
3035
3036 2017-11-02  Yao Qi  <yao.qi@linaro.org>
3037
3038         * regcache.c (struct regcache_descr) <nr_raw_registers>: Remove.
3039         (init_regcache_descr): Use gdbarch_num_regs.
3040         (regcache::regcache): Likewise.
3041         (regcache::get_register_status): Likewise.
3042         (regcache::assert_raw_regnum): Likewise.
3043         (regcache::cooked_read): Likewise.
3044         (regcache::cooked_read_value): Likewise.
3045         (regcache::cooked_write): Likewise.
3046         (regcache::dump): Likewise.
3047         (regcache::num_raw_registers): New method.
3048         * regcache.h (class regcache) <num_raw_registers>: New.
3049
3050 2017-11-02  Yao Qi  <yao.qi@linaro.org>
3051
3052         * regcache.c (regcache::assert_regnum): New method.
3053         (regcache::invalidate): Call assert_regnum.
3054         (regcache::raw_update): Likewise.
3055         (regcache::raw_write): Likewise.
3056         (regcache::raw_read_part): Likewise.
3057         (regcache::raw_write_part): Likewise.
3058         (regcache::raw_supply): Likewise.
3059         (regcache::raw_supply_integer): Likewise.
3060         (regcache::raw_supply_zeroed): Likewise.
3061         (regcache::raw_collect): Likewise.
3062         (regcache::raw_collect_integer): Likewise.
3063         * regcache.h (regcache::assert_regnum): Declare.
3064
3065 2017-11-02  Yao Qi  <yao.qi@linaro.org>
3066
3067         * regcache.c (regcache::dump): Remove code.
3068
3069 2017-11-02  Yao Qi  <yao.qi@linaro.org>
3070
3071         * regcache.c (struct regcache_descr) <sizeof_raw_register_status>:
3072         Remove.
3073         <sizeof_cooked_register_status>: Remove.
3074         (init_regcache_descr): Update.
3075         (regcache::regcache): Use nr_cooked_registers and nr_raw_registers.
3076         (regcache::save): Likewise.
3077         (regcache::dump): Likewise.
3078
3079 2017-11-01  James Bowman  <james.bowman@ftdichip.com>
3080
3081         * ft32-tdep.c (ft32_fetch_instruction): New function.
3082         (ft32_analyze_prologue): Use ft32_fetch_instruction().
3083
3084 2017-10-31  Simon Marchi  <simon.marchi@polymtl.ca>
3085
3086         * cli/cli-script.c (execute_control_command): Rename to ...
3087         (execute_control_command_1): ... this.
3088         (execute_control_command): New function.
3089
3090 2017-10-31  Simon Marchi  <simon.marchi@ericsson.com>
3091
3092         * tracepoint.c (tfind_command): Remove const_cast.
3093
3094 2017-10-30  Mike Gulick  <mgulick@mathworks.com>
3095
3096         * Makefile.in (HFILES_NO_SRCDIR): Remove reference to gdb.h.
3097
3098 2017-10-30  Simon Marchi  <simon.marchi@ericsson.com>
3099
3100         * common/common-utils.h (in_inclusive_range): New function.
3101         * arm-tdep.c (arm_record_extension_space): Use
3102         in_inclusive_range.
3103         (thumb_record_ld_st_reg_offset): Use in_inclusive_range.
3104         * cris-tdep.c (cris_spec_reg_applicable): Use
3105         in_inclusive_range.
3106
3107 2017-10-30  Pedro Alves  <palves@redhat.com>
3108             Simon Marchi <simon.marchi@ericsson.com>
3109
3110         * remote.c (remote_set_syscall_catchpoint): Build a std::string
3111         instead of a gdb::unique_xmalloc_ptr, using string_appendf.
3112
3113 2017-10-30  Pedro Alves  <palves@redhat.com>
3114
3115         * common/common-utils.c (string_appendf, string_vappendf): New
3116         functions.
3117         * common/common-utils.h (string_appendf, string_vappendf): New
3118         declarations.
3119         * unittests/common-utils-selftests.c (string_appendf_func)
3120         (test_appendf_func, string_vappendf_wrapper, string_appendf_tests)
3121         (string_vappendf_tests): New functions.
3122         (_initialize_common_utils_selftests): Register "string_appendf" and
3123         "string_vappendf tests".
3124
3125 2017-10-30  Pedro Alves  <palves@redhat.com>
3126
3127         * unittests/common-utils-selftests.c (format_func): New typedef.
3128         (string_printf_tests, string_vprintf_tests): Tests factored out
3129         and merged to ...
3130         (test_format_func): ... this new function.
3131         (string_printf_tests, string_vprintf_tests): Reimplement on top of
3132         test_format_func.
3133
3134 2017-10-29  Simon Marchi  <simon.marchi@ericsson.com>
3135
3136         * darwin-nat.c: Remove include of gdb.h.
3137
3138 2017-10-29  Simon Marchi  <simon.marchi@ericsson.com>
3139
3140         * xtensa-xtregs.c: Fix formatting issues.
3141
3142 2017-10-29  Simon Marchi  <simon.marchi@ericsson.com>
3143
3144         * xtensa-xtregs.c (xtensa_regtable_t) <name>: Constify.
3145
3146 2017-10-28  Maksim Dzabraev  <dzabraew@gmail.com>
3147
3148         PR python/21213
3149         * python/py-infthread.c (thpy_get_inferior): Increment reference
3150         of inferior before returning it.
3151
3152 2017-10-27  Simon Marchi  <simon.marchi@ericsson.com>
3153
3154         * unittests/common-utils-selftests.c (format): Add
3155         ATTRIBUTE_PRINTF.
3156
3157 2017-10-27  Simon Marchi  <simon.marchi@polymtl.ca>
3158
3159         * xml-syscall.c (struct syscall_desc): Add constructor.
3160         <name>: Change type to std::string.
3161         (syscall_desc_up): New typedef.
3162         (syscall_desc_p): Remove typeder.
3163         (DEF_VEC_P(syscall_desc_p)): Remove.
3164         (struct syscall_group_desc): Add constructor.
3165         <name>: Change type to std::string.
3166         <syscalls>: Change type to std::vector.
3167         (syscall_group_desc_up): New typedef.
3168         (syscall_group_desc_p): Remove typedef.
3169         (DEF_VEC_P(syscall_group_desc_p)): Remove.
3170         (struct syscalls_info) <syscalls>: Change type to std::vector of
3171         unique_ptr.
3172         <groups>: Likewise.
3173         <my_gdb_datadir>: Change type to std::string.
3174         (syscalls_info_up): New typedef.
3175         (allocate_syscalls_info): Remove.
3176         (syscalls_info_free_syscalls_desc): Remove.
3177         (syscalls_info_free_syscall_group_desc): Remove.
3178         (free_syscalls_info): Remove.
3179         (make_cleanup_free_syscalls_info): Remove.
3180         (syscall_group_create_syscall_group_desc): Adjust.
3181         (syscall_group_add_syscall): Adjust.
3182         (syscall_create_syscall_desc): Adjust.
3183         (syscall_parse_xml): Adjust, use unique_ptr instead of cleanup.
3184         (init_syscalls_info): Adjust.
3185         (syscall_group_get_group_by_name): Adjust.
3186         (xml_get_syscall_number): Adjust.
3187         (xml_get_syscall_name): Adjust.
3188         (xml_list_of_syscalls): Adjust.
3189         (xml_list_syscalls_by_group): Adjust.
3190         (xml_list_of_groups): Adjust.
3191
3192 2017-10-27  Simon Marchi  <simon.marchi@ericsson.com>
3193
3194         * probe.h: Don't include gdb_vecs.h.
3195         (DEF_VEC_P (probe_p)): Remove.
3196         (find_probes_in_objfile): Return an std::vector.
3197         * probe.c (find_probes_in_objfile): Likewise.
3198         * breakpoint.c (breakpoint_objfile_data)
3199         <longjmp_probes>: Change type to std::vector.
3200         <exception_probes>: Likewise.
3201         (free_breakpoint_probes): Don't manually free vectors.
3202         (create_longjmp_master_breakpoint): Adjust.
3203         (create_exception_master_breakpoint): Adjust.
3204         * solib-svr4.c (svr4_create_probe_breakpoints): Change
3205         parameter type, adjust.
3206         (svr4_create_solib_event_breakpoints): Adjust.
3207
3208 2017-10-27  Simon Marchi  <simon.marchi@ericsson.com>
3209
3210         * breakpoint.c (breakpoint_objfile_data): Initialize fields.
3211         (get_breakpoint_objfile_data): Allocate breakpoint_objfile_data
3212         with new.
3213         (free_breakpoint_probes): Rename to ...
3214         (free_breakpoint_objfile_data): ... this, and call delete on
3215         bp_objfile_data..
3216
3217 2017-10-27  Simon Marchi  <simon.marchi@polymtl.ca>
3218
3219         * auto-load.c: Don't include gdb_vecs.h, include algorithm.
3220         (loaded_script_ptr): Remove typedef.
3221         (DEF_VEC_P (loaded_script_ptr)): Remove.
3222         (struct collect_matching_scripts_data): Add constructor.
3223         <scripts_p>: Change type to (pointer to) std::vector.
3224         (collect_matching_scripts_data): Adjust.
3225         (sort_scripts_by_name): Make suitable for std::sort.
3226         (print_scripts): Don't sort vector, adjust to std::vector.
3227         (auto_load_info_scripts): Sort vectors, adjust to std::vector.
3228
3229 2017-10-27  Simon Marchi  <simon.marchi@ericsson.com>
3230
3231         * symfile.c (filename_language): Make struct, not typedef.  Add
3232         constructor.
3233         <ext>: Change type to std::string.
3234         (DEF_VEC_O (filename_language)): Remove.
3235         (filename_language_table): Change type to std::vector.
3236         (add_filename_language): Adjust.
3237         (set_ext_lang_command): Adjust.
3238         (info_ext_lang_command): Adjust.
3239         (deduce_language_from_filename): Adjust.
3240         (class scoped_restore_filename_language_table): Remove.
3241         (test_filename_language): Use scoped_restore.
3242         (test_set_ext_lang_command): Use scoped_restore, adjust to
3243         std::vector change.
3244
3245 2017-10-27  Simon Marchi  <simon.marchi@ericsson.com>
3246
3247         * symfile.c: Include selftest.h.
3248         (class scoped_restore_filename_language_table): New.
3249         (test_filename_language): New test.
3250         (test_set_ext_lang_command): New test.
3251         (_initialize_symfile): Register tests.
3252
3253 2017-10-27  Keith Seitz  <keiths@redhat.com>
3254
3255         * breakpoint.c (print_breakpoint_location): Use the symbol saved
3256         in the bp_location, falling back to find_pc_sect_function when
3257         needed.
3258         (add_location_to_breakpoint): Save sal->symbol.
3259         * breakpoint.h (struct bp_location) <symbol>: New field.
3260         * symtab.c (find_function_start_sal): Save the symbol into the SaL.
3261         * symtab.h (struct symtab_and_line) <symbol>: New field.
3262
3263 2017-10-26  Patrick Frants  <osscontribute@gmail.com>
3264
3265         PR gdb/13669
3266         * cp-valprint.c (cp_print_value_fields): Use obstack_blank_fast
3267         to rewind obstack.
3268
3269 2017-10-26  Pedro Alves  <palves@redhat.com>
3270
3271         * remote.c (remote_async_terminal_ours_p): Delete.
3272         (remote_open_1, remote_terminal_inferior, remote_terminal_ours):
3273         Remove references to 'remote_async_terminal_ours_p'.
3274
3275 2017-10-26  Yao Qi  <yao.qi@linaro.org>
3276
3277         * breakpoint.h (regular_breakpoint_inserted_here_p): Remove.
3278
3279 2017-10-26  Yao Qi  <yao.qi@linaro.org>
3280
3281         * break-catch-sig.c (signal_catchpoint_breakpoint_hit): Make
3282         aspace const.
3283         * break-catch-syscall.c (breakpoint_hit_catch_syscall):
3284         Likewise.
3285         * breakpoint.c (bpstat_check_location): Remove cast.
3286         (breakpoint_hit_catch_fork): Make aspce const.
3287         (breakpoint_hit_catch_solib): Likewise.
3288         (breakpoint_hit_catch_exec): Likewise.
3289         (breakpoint_hit_ranged_breakpoint): Likewise.
3290         (breakpoint_hit_watchpoint): Likewise.
3291         (base_breakpoint_breakpoint_hit): Likewise.
3292         (bkpt_breakpoint_hit): Likewise.
3293         (dprintf_breakpoint_hit): Likewise.
3294         (tracepoint_breakpoint_hit): Likewise.
3295         * breakpoint.h (breakpoint_ops) <breakpoint_hit>: Likewise.
3296
3297 2017-10-26  Yao Qi  <yao.qi@linaro.org>
3298
3299         * breakpoint.c (breakpoint_location_address_match): Change
3300         "struct address_space *" to "const address_space".
3301         (breakpoint_location_address_range_overlap): Likewise.
3302         (breakpoint_here_p): Likewise.
3303         (breakpoint_in_range_p): Likewise.
3304         (moribund_breakpoint_here_p): Likewise.
3305         (bp_location_inserted_here_p): Likewise.
3306         (software_breakpoint_inserted_here_p): Likewise.
3307         (hardware_breakpoint_inserted_here_p): Likewise.
3308         (hardware_watchpoint_inserted_in_range): Likewise.
3309         (bpstat_check_location): Likewise.
3310         (bpstat_stop_status): Likewise.
3311         (breakpoint_address_match): Likewise.
3312         (breakpoint_address_match_range): Likewise.
3313         (breakpoint_location_address_match): Likewise.
3314         (breakpoint_location_address_range_overlap): Likewise.
3315         (insert_single_step_breakpoint): Likewise.
3316         (breakpoint_has_location_inserted_here): Likewise.
3317         (single_step_breakpoint_inserted_here_p): Likewise.
3318         (pc_at_non_inline_function): Likewise.
3319         * breakpoint.h (bpstat_stop_status): Update declaration.
3320         (breakpoint_here_p): Likewise.
3321         (breakpoint_in_range_p): Likewise.
3322         (moribund_breakpoint_here_p): Likewise.
3323         (breakpoint_inserted_here_p): Likewise.
3324         (software_breakpoint_inserted_here_p): Likewise.
3325         (hardware_breakpoint_inserted_here_p): Likewise.
3326         (breakpoint_has_location_inserted_here): Likewise.
3327         (single_step_breakpoint_inserted_here_p): Likewise.
3328         (hardware_watchpoint_inserted_in_range): Likewise.
3329         (breakpoint_address_match): Likewise.
3330         (insert_single_step_breakpoint): Likewise.
3331         (pc_at_non_inline_function): Likewise.
3332         * gdbthread.h (thread_has_single_step_breakpoint_here): Likewise.
3333         * record.c (record_check_stopped_by_breakpoint): Likewise.
3334         * record.h (record_check_stopped_by_breakpoint): Likewise.
3335         * thread.c (thread_has_single_step_breakpoint_here): Likewise.
3336
3337 2017-10-25  Yao Qi  <yao.qi@linaro.org>
3338
3339         * aarch32-linux-nat.c (aarch32_gp_regcache_supply): Use
3340         regcache->arch () instead get_regcache_arch.
3341         * aarch64-fbsd-nat.c (aarch64_fbsd_fetch_inferior_registers):
3342         Likewise.
3343         (aarch64_fbsd_store_inferior_registers): Likewise.
3344         * aarch64-linux-nat.c (fetch_gregs_from_thread): Likewise.
3345         (store_gregs_to_thread): Likewise.
3346         (fetch_fpregs_from_thread): Likewise.
3347         (store_fpregs_to_thread): Likewise.
3348         * aarch64-tdep.c (aarch64_extract_return_value): Likewise.
3349         (aarch64_store_return_value): Likewise.
3350         (aarch64_software_single_step): Likewise.
3351         * aix-thread.c (aix_thread_wait): Likewise.
3352         (supply_reg32): Likewise.
3353         (supply_sprs64): Likewise.
3354         (supply_sprs32): Likewise.
3355         (fill_gprs64): Likewise.
3356         (fill_gprs32): Likewise.
3357         (fill_sprs64): Likewise.
3358         (fill_sprs32): Likewise.
3359         (store_regs_user_thread): Likewise.
3360         (store_regs_kernel_thread): Likewise.
3361         * alpha-bsd-nat.c (alphabsd_fetch_inferior_registers): Likewise.
3362         (alphabsd_store_inferior_registers): Likewise.
3363         * alpha-tdep.c (alpha_extract_return_value): Likewise.
3364         (alpha_store_return_value): Likewise.
3365         (alpha_deal_with_atomic_sequence): Likewise.
3366         (alpha_next_pc): Likewise.
3367         (alpha_software_single_step): Likewise.
3368         * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers): Likewise.
3369         (amd64bsd_store_inferior_registers): Likewise.
3370         * amd64-linux-nat.c (amd64_linux_fetch_inferior_registers):
3371         Likewise.
3372         (amd64_linux_store_inferior_registers): Likewise.
3373         * amd64-nat.c (amd64_supply_native_gregset): Likewise.
3374         (amd64_collect_native_gregset): Likewise.
3375         * amd64-obsd-tdep.c (amd64obsd_supply_uthread): Likewise.
3376         (amd64obsd_collect_uthread): Likewise.
3377         * amd64-tdep.c (amd64_supply_fpregset): Likewise.
3378         (amd64_collect_fpregset): Likewise.
3379         (amd64_supply_fxsave): Likewise.
3380         (amd64_supply_xsave): Likewise.
3381         (amd64_collect_fxsave): Likewise.
3382         (amd64_collect_xsave): Likewise.
3383         * arc-tdep.c (arc_write_pc): Likewise.
3384         * arch-utils.c (default_skip_permanent_breakpoint): Likewise.
3385         * arm-fbsd-nat.c (arm_fbsd_fetch_inferior_registers): Likewise.
3386         (arm_fbsd_store_inferior_registers): Likewise.
3387         * arm-linux-nat.c (fetch_vfp_regs): Likewise.
3388         (store_vfp_regs): Likewise.
3389         (arm_linux_fetch_inferior_registers): Likewise.
3390         (arm_linux_store_inferior_registers): Likewise.
3391         * arm-linux-tdep.c (arm_linux_supply_gregset): Likewise.
3392         (arm_linux_sigreturn_next_pc): Likewise.
3393         (arm_linux_get_next_pcs_syscall_next_pc): Likewise.
3394         * arm-nbsd-nat.c (arm_supply_gregset): Likewise.
3395         (fetch_register): Likewise.
3396         (store_register): Likewise.
3397         * arm-tdep.c (arm_is_thumb): Likewise.
3398         (displaced_in_arm_mode): Likewise.
3399         (bx_write_pc): Likewise.
3400         (arm_get_next_pcs_addr_bits_remove): Likewise.
3401         (arm_software_single_step): Likewise.
3402         (arm_extract_return_value): Likewise.
3403         (arm_store_return_value): Likewise.
3404         (arm_write_pc): Likewise.
3405         * bfin-tdep.c (bfin_extract_return_value): Likewise.
3406         * bsd-uthread.c (bsd_uthread_fetch_registers): Likewise.
3407         (bsd_uthread_store_registers): Likewise.
3408         * core-regset.c (fetch_core_registers): Likewise.
3409         * corelow.c (get_core_registers): Likewise.
3410         * cris-tdep.c (cris_store_return_value): Likewise.
3411         (cris_extract_return_value): Likewise.
3412         (find_step_target): Likewise.
3413         (find_step_target): Likewise.
3414         (cris_software_single_step): Likewise.
3415         * ctf.c (ctf_fetch_registers): Likewise.
3416         * darwin-nat.c (cancel_breakpoint): Likewise.
3417         * fbsd-tdep.c (fbsd_collect_thread_registers): Likewise.
3418         * frv-tdep.c (frv_extract_return_value): Likewise.
3419         * ft32-tdep.c (ft32_store_return_value): Likewise.
3420         (ft32_extract_return_value): Likewise.
3421         * go32-nat.c (fetch_register): Likewise.
3422         (go32_fetch_registers): Likewise.
3423         (go32_store_registers): Likewise.
3424         (store_register): Likewise.
3425         * h8300-tdep.c (h8300_extract_return_value): Likewise.
3426         (h8300_store_return_value): Likewise.
3427         * hppa-linux-nat.c (fetch_register): Likewise.
3428         (store_register): Likewise.
3429         (hppa_linux_fetch_inferior_registers): Likewise.
3430         (hppa_linux_store_inferior_registers): Likewise.
3431         * i386-darwin-nat.c (i386_darwin_fetch_inferior_registers): Likewise.
3432         (i386_darwin_store_inferior_registers): Likewise.
3433         * i386-gnu-nat.c (gnu_fetch_registers): Likewise.
3434         (gnu_store_registers): Likewise.
3435         * i386-linux-nat.c (fetch_register): Likewise.
3436         (store_register): Likewise.
3437         (supply_gregset): Likewise.
3438         (fill_gregset): Likewise.
3439         (i386_linux_fetch_inferior_registers): Likewise.
3440         (i386_linux_store_inferior_registers): Likewise.
3441         (i386_linux_resume): Likewise.
3442         * i386-linux-tdep.c (i386_linux_get_syscall_number_from_regcache):
3443         Likewise.
3444         * i386-nto-tdep.c (i386nto_supply_gregset): Likewise.
3445         * i386-obsd-nat.c (i386obsd_supply_pcb): Likewise.
3446         * i386-obsd-tdep.c (i386obsd_supply_uthread): Likewise.
3447         (i386obsd_collect_uthread): Likewise.
3448         * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
3449         (i386_supply_gregset): Likewise.
3450         (i386_collect_gregset): Likewise.
3451         (i386_supply_fpregset): Likewise.
3452         (i386_collect_fpregset): Likewise.
3453         (i386_mpx_bd_base): Likewise.
3454         * i386-v4-nat.c (supply_fpregset): Likewise.
3455         (fill_fpregset): Likewise.
3456         * i387-tdep.c (i387_supply_fsave): Likewise.
3457         (i387_collect_fsave): Likewise.
3458         (i387_supply_fxsave): Likewise.
3459         (i387_collect_fxsave): Likewise.
3460         (i387_supply_xsave): Likewise.
3461         (i387_collect_xsave): Likewise.
3462         * ia64-linux-nat.c (ia64_linux_fetch_registers): Likewise.
3463         (ia64_linux_store_registers): Likewise.
3464         * ia64-tdep.c (ia64_access_rse_reg): Likewise.
3465         (ia64_extract_return_value): Likewise.
3466         (ia64_store_return_value): Likewise.
3467         (find_func_descr): Likewise.
3468         * inf-child.c (inf_child_fetch_inferior_registers): Likewise.
3469         * inf-ptrace.c (inf_ptrace_fetch_registers): Likewise.
3470         (inf_ptrace_store_registers): Likewise.
3471         * infrun.c (use_displaced_stepping): Likewise.
3472         (displaced_step_prepare_throw): Likewise.
3473         (resume): Likewise.
3474         (proceed): Likewise.
3475         (do_target_wait): Likewise.
3476         (adjust_pc_after_break): Likewise.
3477         (handle_inferior_event_1): Likewise.
3478         (handle_signal_stop): Likewise.
3479         (save_infcall_suspend_state): Likewise.
3480         (restore_infcall_suspend_state): Likewise.
3481         * iq2000-tdep.c (iq2000_extract_return_value): Likewise.
3482         * jit.c (jit_frame_prev_register): Likewise.
3483         * linux-nat.c (save_stop_reason): Likewise.
3484         (linux_nat_wait_1): Likewise.
3485         (resume_stopped_resumed_lwps): Likewise.
3486         * linux-record.c (record_linux_sockaddr): Likewise.
3487         (record_linux_msghdr): Likewise.
3488         (record_linux_system_call): Likewise.
3489         * linux-tdep.c (linux_collect_thread_registers): Likewise.
3490         * lm32-tdep.c (lm32_extract_return_value): Likewise.
3491         (lm32_store_return_value): Likewise.
3492         * m32c-tdep.c (m32c_read_flg): Likewise.
3493         (m32c_pseudo_register_read): Likewise.
3494         (m32c_pseudo_register_write): Likewise.
3495         * m32r-linux-tdep.c (m32r_linux_supply_gregset): Likewise.
3496         (m32r_linux_collect_gregset): Likewise.
3497         * m32r-tdep.c (m32r_store_return_value): Likewise.
3498         (m32r_extract_return_value): Likewise.
3499         * m68k-bsd-nat.c (m68kbsd_supply_fpregset): Likewise.
3500         (m68kbsd_collect_fpregset): Likewise.
3501         * m68k-bsd-tdep.c (m68kbsd_supply_fpregset): Likewise.
3502         * m68k-linux-nat.c (fetch_register): Likewise.
3503         (old_fetch_inferior_registers): Likewise.
3504         (old_store_inferior_registers): Likewise.
3505         (store_regs): Likewise.
3506         * m68k-tdep.c (m68k_svr4_extract_return_value): Likewise.
3507         (m68k_svr4_store_return_value): Likewise.
3508         * m88k-tdep.c (m88k_store_arguments): Likewise.
3509         * mi/mi-main.c (mi_cmd_data_list_changed_registers): Likewise.
3510         (mi_cmd_data_write_register_values): Likewise.
3511         * mips-fbsd-nat.c (mips_fbsd_fetch_inferior_registers): Likewise.
3512         (mips_fbsd_store_inferior_registers): Likewise.
3513         * mips-fbsd-tdep.c (mips_fbsd_supply_fpregs): Likewise.
3514         (mips_fbsd_supply_gregs): Likewise.
3515         (mips_fbsd_collect_fpregs): Likewise.
3516         (mips_fbsd_collect_gregs): Likewise.
3517         (mips_fbsd_supply_fpregset): Likewise.
3518         (mips_fbsd_collect_fpregset): Likewise.
3519         (mips_fbsd_supply_gregset): Likewise.
3520         (mips_fbsd_collect_gregset): Likewise.
3521         * mips-linux-nat.c (supply_gregset): Likewise.
3522         (fill_gregset): Likewise.
3523         (supply_fpregset): Likewise.
3524         (fill_fpregset): Likewise.
3525         * mips-linux-tdep.c (mips_supply_gregset): Likewise.
3526         (mips_fill_gregset): Likewise.
3527         (mips_supply_fpregset): Likewise.
3528         (mips_fill_fpregset): Likewise.
3529         (mips64_supply_gregset): Likewise.
3530         (micromips_linux_sigframe_validate): Likewise.
3531         * mips-nbsd-nat.c (mipsnbsd_fetch_inferior_registers): Likewise.
3532         (mipsnbsd_fetch_inferior_registers): Likewise.
3533         (mipsnbsd_store_inferior_registers): Likewise.
3534         * mips-nbsd-tdep.c (mipsnbsd_supply_fpregset): Likewise.
3535         (mipsnbsd_supply_gregset): Likewise.
3536         (mipsnbsd_iterate_over_regset_sections): Likewise.
3537         (mipsnbsd_supply_reg): Likewise.
3538         (mipsnbsd_supply_fpreg): Likewise.
3539         * mips-tdep.c (mips_in_frame_stub): Likewise.
3540         (mips_dummy_id): Likewise.
3541         (is_octeon_bbit_op): Likewise.
3542         (micromips_bc1_pc): Likewise.
3543         (extended_mips16_next_pc): Likewise.
3544         (mips16_next_pc): Likewise.
3545         (deal_with_atomic_sequence): Likewise.
3546         * moxie-tdep.c (moxie_process_readu): Likewise.
3547         * nios2-tdep.c (nios2_get_next_pc): Likewise.
3548         * nto-procfs.c (procfs_store_registers): Likewise.
3549         * ppc-fbsd-nat.c (ppcfbsd_fetch_inferior_registers): Likewise.
3550         (ppcfbsd_store_inferior_registers): Likewise.
3551         * ppc-linux-nat.c (fetch_vsx_register): Likewise.
3552         (fetch_altivec_register): Likewise.
3553         (get_spe_registers): Likewise.
3554         (fetch_spe_register): Likewise.
3555         (fetch_altivec_registers): Likewise.
3556         (fetch_all_gp_regs): Likewise.
3557         (fetch_all_fp_regs): Likewise.
3558         (store_vsx_register): Likewise.
3559         (store_altivec_register): Likewise.
3560         (set_spe_registers): Likewise.
3561         (store_spe_register): Likewise.
3562         (store_altivec_registers): Likewise.
3563         (store_all_gp_regs): Likewise.
3564         (store_all_fp_regs): Likewise.
3565         * ppc-linux-tdep.c (ppc_linux_supply_gregset): Likewise.
3566         (ppc_linux_collect_gregset): Likewise.
3567         (ppc_canonicalize_syscall): Likewise.
3568         (ppc_linux_record_signal): Likewise.
3569         (ppu2spu_prev_register): Likewise.
3570         * ppc-nbsd-nat.c (ppcnbsd_supply_pcb): Likewise.
3571         * ppc-obsd-nat.c (ppcobsd_fetch_registers): Likewise.
3572         (ppcobsd_store_registers): Likewise.
3573         * ppc-ravenscar-thread.c (ppc_ravenscar_generic_fetch_registers):
3574         Likewise.
3575         (ppc_ravenscar_generic_store_registers): Likewise.
3576         * procfs.c (procfs_fetch_registers): Likewise.
3577         (procfs_store_registers): Likewise.
3578         * ravenscar-thread.c (ravenscar_fetch_registers): Likewise.
3579         (ravenscar_store_registers): Likewise.
3580         (ravenscar_prepare_to_store): Likewise.
3581         * record-btrace.c (record_btrace_fetch_registers): Likewise.
3582         * record-full.c (record_full_wait_1): Likewise.
3583         (record_full_registers_change): Likewise.
3584         (record_full_store_registers): Likewise.
3585         (record_full_core_fetch_registers): Likewise.
3586         (record_full_save): Likewise.
3587         (record_full_goto_insn): Likewise.
3588         * regcache.c (regcache_register_size): Likewise.
3589         (get_regcache_arch): Remove.
3590         (regcache_read_pc): Likewise.
3591         * regcache.h (get_regcache_arch): Remove.
3592         * remote-sim.c (gdbsim_fetch_register): Likewise.
3593         (gdbsim_store_register): Likewise.
3594         * remote.c (fetch_register_using_p): Likewise.
3595         (send_g_packet): Likewise.
3596         (remote_prepare_to_store): Likewise.
3597         (store_registers_using_G): Likewise.
3598         * reverse.c (save_bookmark_command): Likewise.
3599         (goto_bookmark_command): Likewise.
3600         * rs6000-aix-tdep.c (branch_dest): Likewise.
3601         * rs6000-nat.c (rs6000_ptrace64): Likewise.
3602         (fetch_register): Likewise.
3603         * rs6000-tdep.c (ppc_supply_reg): Likewise.
3604         (ppc_collect_reg): Likewise.
3605         (ppc_collect_gregset): Likewise.
3606         (ppc_collect_fpregset): Likewise.
3607         (ppc_collect_vsxregset): Likewise.
3608         (ppc_collect_vrregset): Likewise.
3609         (ppc_displaced_step_hw_singlestep): Likewise.
3610         (rs6000_pseudo_register_read): Likewise.
3611         (rs6000_pseudo_register_write): Likewise.
3612         * s390-linux-nat.c (supply_gregset): Likewise.
3613         (fill_gregset): Likewise.
3614         (s390_linux_fetch_inferior_registers): Likewise.
3615         * s390-linux-tdep.c (s390_write_pc): Likewise.
3616         (s390_software_single_step): Likewise.
3617         (s390_all_but_pc_registers_record): Likewise.
3618         (s390_linux_syscall_record): Likewise.
3619         * sentinel-frame.c (sentinel_frame_prev_arch): Likewise.
3620         * sh-nbsd-nat.c (shnbsd_fetch_inferior_registers): Likewise.
3621         (shnbsd_store_inferior_registers): Likewise.
3622         * sh-tdep.c (sh_extract_return_value_nofpu): Likewise.
3623         (sh_extract_return_value_fpu): Likewise.
3624         (sh_store_return_value_nofpu): Likewise.
3625         (sh_corefile_supply_regset): Likewise.
3626         (sh_corefile_collect_regset): Likewise.
3627         * sh64-tdep.c (sh64_extract_return_value): Likewise.
3628         (sh64_store_return_value): Likewise.
3629         * sparc-linux-tdep.c (sparc32_linux_collect_core_fpregset): Likewise.
3630         * sparc-nat.c (sparc_fetch_inferior_registers): Likewise.
3631         (sparc_store_inferior_registers): Likewise.
3632         * sparc-ravenscar-thread.c (register_in_thread_descriptor_p): Likewise.
3633         (sparc_ravenscar_prepare_to_store): Likewise.
3634         * sparc-tdep.c (sparc32_store_arguments): Likewise.
3635         (sparc_analyze_control_transfer): Likewise.
3636         (sparc_step_trap): Likewise.
3637         (sparc_software_single_step): Likewise.
3638         (sparc32_gdbarch_init): Likewise.
3639         (sparc_supply_rwindow): Likewise.
3640         (sparc_collect_rwindow): Likewise.
3641         * sparc64-linux-tdep.c (sparc64_linux_collect_core_fpregset): Likewise.
3642         * sparc64-nbsd-nat.c (sparc64nbsd_supply_gregset): Likewise.
3643         (sparc64nbsd_collect_gregset): Likewise.
3644         (sparc64nbsd_supply_fpregset): Likewise.
3645         (sparc64nbsd_collect_fpregset): Likewise.
3646         * sparc64-tdep.c (sparc64_store_arguments): Likewise.
3647         (sparc64_supply_gregset): Likewise.
3648         (sparc64_collect_gregset): Likewise.
3649         (sparc64_supply_fpregset): Likewise.
3650         (sparc64_collect_fpregset): Likewise.
3651         * spu-linux-nat.c (spu_fetch_inferior_registers): Likewise.
3652         * spu-tdep.c (spu_unwind_sp): Likewise.
3653         (spu2ppu_prev_register): Likewise.
3654         (spu_memory_remove_breakpoint): Likewise.
3655         * stack.c (return_command): Likewise.
3656         * tic6x-tdep.c (tic6x_extract_signed_field): Likewise.
3657         * tracefile-tfile.c (tfile_fetch_registers): Likewise.
3658         * tracefile.c (trace_save_ctf): Likewise.
3659         * windows-nat.c (do_windows_fetch_inferior_registers): Likewise.
3660         (do_windows_store_inferior_registers): Likewise.
3661         (windows_resume): Likewise.
3662         * xtensa-linux-nat.c (fill_gregset): Likewise.
3663         (supply_gregset_reg): Likewise.
3664         * xtensa-tdep.c (xtensa_register_write_masked): Likewise.
3665         (xtensa_register_read_masked): Likewise.
3666         (xtensa_supply_gregset): Likewise.
3667         (xtensa_extract_return_value): Likewise.
3668         (xtensa_store_return_value): Likewise.
3669
3670 2017-10-25  Ulrich Weigand  <uweigand@de.ibm.com>
3671
3672         * doublest.c (floatformat_from_string): New function.
3673         * doublest.h (floatformat_from_string): Add prototype.
3674
3675         * std-operator.def (OP_DOUBLE, OP_DECFLOAT): Remove, replace by ...
3676         (OP_FLOAT): ... this.
3677         * expression.h: Do not include "doublest.h".
3678         (union exp_element): Replace doubleconst and decfloatconst by
3679         new element floatconst.
3680         * ada-lang.c (resolve_subexp): Handle OP_FLOAT instead of OP_DOUBLE.
3681         (ada_evaluate_subexp): Likewise.
3682         * eval.c (evaluate_subexp_standard): Handle OP_FLOAT instead of
3683         OP_DOUBLE and OP_DECFLOAT.
3684         * expprint.c (print_subexp_standard): Likewise.
3685         (dump_subexp_body_standard): Likewise.
3686         * breakpoint.c (watchpoint_exp_is_const): Likewise.
3687
3688         * parse.c: Include "dfp.h".
3689         (write_exp_elt_dblcst, write_exp_elt_decfloatcst): Remove.
3690         (write_exp_elt_floatcst): New function.
3691         (operator_length_standard): Handle OP_FLOAT instead of OP_DOUBLE
3692         and OP_DECFLOAT.
3693         (operator_check_standard): Likewise.
3694         (parse_float): Do not accept suffix.  Take type as input.  Return bool.
3695         Return target format buffer instead of host DOUBLEST.
3696         Use floatformat_from_string and decimal_from_string to parse
3697         either binary or decimal floating-point types.
3698         (parse_c_float): Remove.
3699         * parser-defs.h: Do not include "doublest.h".
3700         (write_exp_elt_dblcst, write_exp_elt_decfloatcst): Remove.
3701         (write_exp_elt_floatcst): Add prototype.
3702         (parse_float): Update prototype.
3703         (parse_c_float): Remove.
3704
3705         * c-exp.y: Do not include "dfp.h".
3706         (typed_val_float): Use byte buffer instead of DOUBLEST.
3707         (typed_val_decfloat): Remove.
3708         (DECFLOAT): Remove.
3709         (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
3710         (parse_number): Update to new parse_float interface.
3711         Parse suffixes and determine type before calling parse_float.
3712         Handle decimal and binary FP types the same way.
3713
3714         * d-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
3715         (FLOAT_LITERAL): Use OP_FLOAT and write_exp_elt_floatcst.
3716         (parse_number): Update to new parse_float interface.
3717         Parse suffixes and determine type before calling parse_float.
3718
3719         * f-exp.y: Replace dval by typed_val_float.
3720         (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
3721         (parse_number): Use parse_float instead of atof.
3722
3723         * go-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
3724         (parse_go_float): Remove.
3725         (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
3726         (parse_number): Call parse_float instead of parse_go_float.
3727         Parse suffixes and determine type before calling parse_float.
3728
3729         * p-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
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
3734         * m2-exp.y: Replace dval by byte buffer val.
3735         (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
3736         (parse_number): Call parse_float instead of atof.
3737
3738         * rust-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
3739         (lex_number): Call parse_float instead of strtod.
3740         (ast_dliteral): Use OP_FLOAT instead of OP_DOUBLE.
3741         (convert_ast_to_expression): Handle OP_FLOAT instead of OP_DOUBLE.
3742         Use write_exp_elt_floatcst.
3743         (unit_testing): Remove static variable.
3744         (rust_type): Do not check unit_testing.
3745         (rust_lex_tests): Do not set uint_testing.  Set up dummy rust_parser.
3746
3747         * ada-exp.y (type_float, type_double): Remove.
3748         (typed_val_float): Use byte buffer instead of DOUBLEST.
3749         (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
3750         * ada-lex.l (processReal): Use parse_float instead of sscanf.
3751
3752 2017-10-25  Alan Hayward  <alan.hayward@arm.com>
3753
3754         * aarch64-tdep.h (enum aarch64_regnum): Remove.
3755         * arch/aarch64.h: New file.
3756
3757 2017-10-24  Ulrich Weigand  <uweigand@de.ibm.com>
3758
3759         * dfp.h (decimal_from_string): Use const reference for argument.
3760         * dfp.c (decimal_from_string): Likewise.
3761
3762 2017-10-24  Ulrich Weigand  <uweigand@de.ibm.com>
3763
3764         * i387-tdep.c (print_i387_value): Use floatformat_to_string.
3765         * sh64-tdep.c (sh64_do_fp_register): Likewise.
3766         * mips-tdep.c (mips_print_fp_register): Likewise.
3767
3768 2017-10-24  Ulrich Weigand  <uweigand@de.ibm.com>
3769
3770         * common/format.h (enum argclass): Replace decfloat_arg by
3771         dec32float_arg, dec64float_arg, and dec128float_arg.
3772         * common/format.c (parse_format_string): Update to return
3773         new decimal float argument classes.
3774
3775         * printcmd.c (printf_decfloat): Rename to ...
3776         (printf_floating): ... this.  Add argclass argument, and use it
3777         instead of parsing the format string again.  Add support for
3778         binary floating-point values, using floatformat_to_string.
3779         Convert value to the target format if it doesn't already match.
3780         (ui_printf): Call printf_floating instead of printf_decfloat,
3781         also for double_arg / long_double_arg.  Pass argclass.
3782
3783         * dfp.c (decimal_to_string): Add format string argument.
3784         * dfp.h (decimal_to_string): Likewise.
3785
3786         * doublest.c (floatformat_to_string): Add format string argument.
3787         * doublest.h (floatformat_to_string): Likewise.
3788
3789 2017-10-24  Ulrich Weigand  <uweigand@de.ibm.com>
3790
3791         * doublest.c (floatformat_precision): New routine.
3792         (floatformat_to_string): Likewise.
3793         * doublest.c (floatformat_to_string): Add prototype.
3794
3795         * printcmd.c (print_scalar_formatted): Only call print_floating
3796         on floating-point types.
3797         * valprint.c: Do not include "floatformat.h".
3798         (generic_val_print_decfloat): Remove.
3799         (generic_val_print): Call generic_val_print_float for both
3800         TYPE_CODE_FLT and TYPE_CODE_DECFLOAT.
3801         (print_floating): Use floatformat_to_string.  Handle decimal float.
3802         (print_decimal_floating): Remove, merge into floatformat_to_string.
3803         * value.h (print_decimal_floating): Remove.
3804
3805         * Makefile.in: Do not build doublest.c with -Wformat-nonliteral.
3806
3807 2017-10-24  Ulrich Weigand  <uweigand@de.ibm.com>
3808
3809         * buildsym.c (end_symtab_get_static_block): Use std::stable_sort.
3810
3811 2017-10-21  Simon Marchi  <simon.marchi@ericsson.com>
3812
3813         * memattr.h: Don't include vec.h.
3814         (struct mem_attrib): Initialize fields.
3815         <unknown>: New static method.
3816         (struct mem_region): Add constructors, operator<, initialize
3817         fields.
3818         * memattr.c: Include algorithm.
3819         (default_mem_attrib, unknown_mem_attrib): Remove.
3820         (user_mem_region_list): New global.
3821         (target_mem_region_list, mem_region_list): Change type to
3822         std::vector<mem_region>.
3823         (mem_use_target): Now a function.
3824         (target_mem_regions_valid): Change type to bool.
3825         (mem_region_lessthan, mem_region_cmp, mem_region_init): Remove.
3826         (require_user_regions): Adjust.
3827         (require_target_regions): Adjust.
3828         (create_mem_region): Adjust.
3829         (lookup_mem_region): Adjust.
3830         (invalidate_target_mem_regions): Adjust.
3831         (mem_clear): Rename to...
3832         (user_mem_clear): ... this, and adjust.
3833         (mem_command): Adjust.
3834         (info_mem_command): Adjust.
3835         (mem_enable, enable_mem_command, mem_disable,
3836         disable_mem_command): Adjust.
3837         (mem_delete): Adjust.
3838         (delete_mem_command): Adjust.
3839         * memory-map.h (parse_memory_map): Return an std::vector.
3840         * memory-map.c (parse_memory_map): Likewise.
3841         (struct memory_map_parsing_data): Add constructor.
3842         <memory_map>: Point to std::vector.
3843         (memory_map_start_memory): Adjust.
3844         (memory_map_end_memory): Adjust.
3845         (memory_map_end_property): Adjust.
3846         (clear_result): Remove.
3847         * remote.c (remote_memory_map): Return an std::vector.
3848         * target-debug.h (target_debug_print_VEC_mem_region_s__p):
3849         Remove.
3850         (target_debug_print_mem_region_vector): New.
3851         * target-delegates.c: Regenerate.
3852         * target.h (mem_region_vector): New typedef.
3853         (to_memory_map): Return mem_region_vector.
3854         (target_memory_map): Return an std::vector.
3855         * target.c (target_memory_map): Return an std::vector.
3856         (flash_erase_command): Adjust.
3857
3858 2017-10-21  Simon Marchi  <simon.marchi@ericsson.com>
3859
3860         * memory-map.c (struct memory_map_parsing_data) <property_name>:
3861         Change type to std::string.
3862         (memory_map_start_property): Adjust.
3863         (memory_map_end_property): Adjust.
3864
3865 2017-10-21  Simon Marchi  <simon.marchi@polymtl.ca>
3866
3867         * infrun.h: Include common/byte-vector.h.
3868         (struct displaced_step_closure): New struct.
3869         (struct buf_displaced_step_closure): New struct.
3870         * infrun.c (displaced_step_closure::~displaced_step_closure):
3871         Provide default implementation.
3872         (displaced_step_clear): Deallocate step closure with delete.
3873         * aarch64-tdep.c (displaced_step_closure): Rename to ...
3874         (aarch64_displaced_step_closure): ... this, extend
3875         displaced_step_closure.
3876         (aarch64_displaced_step_data) <dsc>: Change type to
3877         aarch64_displaced_step_closure.
3878         (aarch64_displaced_step_copy_insn): Adjust to type change, use
3879         unique_ptr.
3880         (aarch64_displaced_step_fixup): Add cast for displaced step
3881         closure.
3882         * amd64-tdep.c (displaced_step_closure): Rename to ...
3883         (amd64_displaced_step_closure): ... this, extend
3884         displaced_step_closure.
3885         <insn_buf>: Change type to std::vector<gdb_byte>.
3886         <max_len>: Remove.
3887         (fixup_riprel): Change type of DSC parameter, adjust to type
3888         change of insn_buf.
3889         (fixup_displaced_copy): Change type of DSC parameter.
3890         (amd64_displaced_step_copy_insn): Instantiate
3891         amd64_displaced_step_closure.
3892         (amd64_displaced_step_fixup): Add cast for closure type, adjust
3893         to type change of insn_buf.
3894         * arm-linux-tdep.c (arm_linux_cleanup_svc): Change type of
3895         parameter DSC.
3896         (arm_linux_copy_svc): Likewise.
3897         (cleanup_kernel_helper_return): Likewise.
3898         (arm_catch_kernel_helper_return): Likewise.
3899         (arm_linux_displaced_step_copy_insn): Instantiate
3900         arm_displaced_step_closure.
3901         * arm-tdep.c (arm_pc_is_thumb): Add cast for closure.
3902         (displaced_read_reg): Change type of parameter DSC.
3903         (branch_write_pc): Likewise.
3904         (load_write_pc): Likewise.
3905         (alu_write_pc): Likewise.
3906         (displaced_write_reg): Likewise.
3907         (arm_copy_unmodified): Likewise.
3908         (thumb_copy_unmodified_32bit): Likewise.
3909         (thumb_copy_unmodified_16bit): Likewise.
3910         (cleanup_preload): Likewise.
3911         (install_preload): Likewise.
3912         (arm_copy_preload): Likewise.
3913         (thumb2_copy_preload): Likewise.
3914         (install_preload_reg): Likewise.
3915         (arm_copy_preload_reg): Likewise.
3916         (cleanup_copro_load_store): Likewise.
3917         (install_copro_load_store): Likewise.
3918         (arm_copy_copro_load_store) Likewise.
3919         (thumb2_copy_copro_load_store): Likewise.
3920         (cleanup_branch): Likewise.
3921         (install_b_bl_blx): Likewise.
3922         (arm_copy_b_bl_blx): Likewise.
3923         (thumb2_copy_b_bl_blx): Likewise.
3924         (thumb_copy_b): Likewise.
3925         (install_bx_blx_reg): Likewise.
3926         (arm_copy_bx_blx_reg): Likewise.
3927         (thumb_copy_bx_blx_reg): Likewise.
3928         (cleanup_alu_imm): Likewise.
3929         (arm_copy_alu_imm): Likewise.
3930         (thumb2_copy_alu_imm): Likewise.
3931         (cleanup_alu_reg): Likewise.
3932         (install_alu_reg): Likewise.
3933         (arm_copy_alu_reg): Likewise.
3934         (thumb_copy_alu_reg): Likewise.
3935         (cleanup_alu_shifted_reg): Likewise.
3936         (install_alu_shifted_reg): Likewise.
3937         (arm_copy_alu_shifted_reg): Likewise.
3938         (cleanup_load): Likewise.
3939         (cleanup_store): Likewise.
3940         (arm_copy_extra_ld_st): Likewise.
3941         (install_load_store): Likewise.
3942         (thumb2_copy_load_literal): Likewise.
3943         (thumb2_copy_load_reg_imm): Likewise.
3944         (arm_copy_ldr_str_ldrb_strb): Likewise.
3945         (cleanup_block_load_all): Likewise.
3946         (cleanup_block_store_pc): Likewise.
3947         (cleanup_block_load_pc): Likewise.
3948         (arm_copy_block_xfer): Likewise.
3949         (thumb2_copy_block_xfer): Likewise.
3950         (cleanup_svc): Likewise.
3951         (install_svc): Likewise.
3952         (arm_copy_svc): Likewise.
3953         (thumb_copy_svc): Likewise.
3954         (arm_copy_undef): Likewise.
3955         (thumb_32bit_copy_undef): Likewise.
3956         (arm_copy_unpred): Likewise.
3957         (arm_decode_misc_memhint_neon): Likewise.
3958         (arm_decode_unconditional): Likewise.
3959         (arm_decode_miscellaneous): Likewise.
3960         (arm_decode_dp_misc): Likewise.
3961         (arm_decode_ld_st_word_ubyte): Likewise.
3962         (arm_decode_media): Likewise.
3963         (arm_decode_b_bl_ldmstm): Likewise.
3964         (arm_decode_ext_reg_ld_st): Likewise.
3965         (thumb2_decode_dp_shift_reg): Likewise.
3966         (thumb2_decode_ext_reg_ld_st): Likewise.
3967         (arm_decode_svc_copro): Likewise.
3968         (thumb2_decode_svc_copro): Likewise.
3969         (install_pc_relative): Likewise.
3970         (thumb_copy_pc_relative_16bit): Likewise.
3971         (thumb_decode_pc_relative_16bit): Likewise.
3972         (thumb_copy_pc_relative_32bit): Likewise.
3973         (thumb_copy_16bit_ldr_literal): Likewise.
3974         (thumb_copy_cbnz_cbz): Likewise.
3975         (thumb2_copy_table_branch): Likewise.
3976         (cleanup_pop_pc_16bit_all): Likewise.
3977         (thumb_copy_pop_pc_16bit): Likewise.
3978         (thumb_process_displaced_16bit_insn): Likewise.
3979         (decode_thumb_32bit_ld_mem_hints): Likewise.
3980         (thumb_process_displaced_32bit_insn): Likewise.
3981         (thumb_process_displaced_insn): Likewise.
3982         (arm_process_displaced_insn): Likewise.
3983         (arm_displaced_init_closure): Likewise.
3984         (arm_displaced_step_fixup): Add cast for closure.
3985         * arm-tdep.h: Include infrun.h.
3986         (displaced_step_closure): Rename to ...
3987         (arm_displaced_step_closure): ... this, extend
3988         displaced_step_closure.
3989         <u::svc::copy_svc_os>: Change type of parameter DSC.
3990         <cleanup>: Likewise.
3991         (arm_process_displaced_insn): Likewise.
3992         (arm_displaced_init_closure): Likewise.
3993         (displaced_read_reg): Likewise.
3994         (displaced_write_reg): Likewise.
3995         * i386-linux-tdep.c (i386_linux_displaced_step_copy_insn):
3996         Adjust.
3997         * i386-tdep.h: Include infrun.h.
3998         (i386_displaced_step_closure): New typedef.
3999         * i386-tdep.c (i386_displaced_step_copy_insn): Use
4000         i386_displaced_step_closure.
4001         (i386_displaced_step_fixup): Adjust.
4002         * rs6000-tdep.c (ppc_displaced_step_closure): New typedef.
4003         (ppc_displaced_step_copy_insn): Use ppc_displaced_step_closure
4004         and unique_ptr.
4005         (ppc_displaced_step_fixup): Adjust.
4006         * s390-linux-tdep.c (s390_displaced_step_closure): New typedef.
4007         (s390_displaced_step_copy_insn): Use s390_displaced_step_closure
4008         and unique_ptr.
4009         (s390_displaced_step_fixup): Adjust.
4010
4011 2017-10-21  Simon Marchi  <simon.marchi@polymtl.ca>
4012
4013         * interps.h (interp_resume, interp_suspend, interp_set_temp):
4014         Remove declarations.
4015
4016 2017-10-20  Tom Tromey  <tom@tromey.com>
4017
4018         * gdb_bfd.c (struct gdb_bfd_data) <included_bfds>: Now a
4019         std::vector.
4020         (gdb_bfd_record_inclusion): Update.
4021         (bfdp): Remove typedef.
4022
4023 2017-10-20  Tom Tromey  <tom@tromey.com>
4024
4025         * gdb_bfd.c (gdb_bfd_ref): Use new.
4026         (struct gdb_bfd_data): Add constructor, destructor, and member
4027         initializers.
4028         (gdb_bfd_unref): Use delete.
4029
4030 2017-10-20  Tom Tromey  <tom@tromey.com>
4031
4032         * exec.c (exec_file_attach): Use new_bfd_ref.
4033         * symfile-mem.c (symbol_file_add_from_memory): Use new_bfd_ref.
4034         * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
4035         (gdb_bfd_openw, gdb_bfd_openr_iovec, gdb_bfd_fdopenr): Use
4036         new_bfd_ref.
4037         * gdb_bfd.h (new_bfd_ref): New function.
4038
4039 2017-10-20  Pedro Alves  <palves@redhat.com>
4040
4041         * main.c (captured_command_loop): Add attribute noinline.
4042
4043 2017-10-19  Simon Marchi  <simon.marchi@ericsson.com>
4044
4045         * interps.c (struct interp_factory): Add constructor.
4046         (interp_factory_p): Remove typedef.
4047         (DEF_VEC_P(interp_factory_p)): Remove.
4048         (interpreter_factories): Change type to std::vector.
4049         (interp_factory_register): Adjust.
4050         (interp_lookup): Adjust.
4051         (interpreter_completer): Adjust.
4052
4053 2017-10-19  Tom Tromey  <tom@tromey.com>
4054
4055         * break-catch-syscall.c (catch_syscall_completer): Use
4056         std::string, gdb::unique_xmalloc_ptr.
4057
4058 2017-10-19  Tom Tromey  <tom@tromey.com>
4059
4060         * infcall.c (call_function_by_hand_dummy): Use std::string.
4061
4062 2017-10-19  Tom Tromey  <tom@tromey.com>
4063
4064         * mi/mi-main.c (mi_cmd_execute): Update.
4065         * top.h (prepare_execute_command): Return scoped_value_mark.
4066         * value.h (class scoped_value_mark): Use DISABLE_COPY_AND_ASSIGN.
4067         Add move constructor.
4068         * top.c (prepare_execute_command): Return scoped_value_mark.
4069         (execute_command): Update.
4070
4071 2017-10-19  Pedro Alves  <palves@redhat.com>
4072
4073         * xml-support.c (xml_fetch_content_from_file): Check fread's
4074         return.
4075
4076 2017-10-19  Pedro Alves  <palves@redhat.com>
4077
4078         * ser-base.c (ser_base_read_error_fd): Delete the file handler if
4079         async.
4080         (handle_error_fd): New function.
4081         (ser_base_async): Add/delete an event loop file handler for
4082         error_fd.
4083
4084 2017-10-19  Pedro Alves  <palves@redhat.com>
4085
4086         * xml-support.c (xml_fetch_content_from_file): Don't read in
4087         chunks.  Instead use fseek to determine the file's size, and read
4088         it in one go.
4089
4090 2017-11-18  Keith Seitz  <keiths@redhat.com>
4091
4092         * c-exp.y (oper): Canonicalize conversion operators of user-defined
4093         types.
4094         Add whitespace to front of type name.
4095
4096 2017-10-18  Keith Seitz  <keiths@redhat.com>
4097
4098         * dwarf2read.c (dwarf2_add_typedef): Issue a complaint on unhandled
4099         DW_AT_accessibility.
4100
4101 2017-10-18  Yao Qi  <yao.qi@linaro.org>
4102
4103         * features/tic6x-c62x-linux.c: Remove.
4104
4105 2017-10-17  Tom Tromey  <tom@tromey.com>
4106
4107         * disasm.c (do_mixed_source_and_assembly_deprecated): Use
4108         gdb::optional, ui_out_emit_list, ui_out_emit_tuple.
4109         (do_mixed_source_and_assembly): Likewise.
4110
4111 2017-10-17  Tom Tromey  <tom@tromey.com>
4112
4113         * regcache.c (regcache::xfer_part): Remove assertion.
4114
4115 2017-10-17  Pedro Alves  <palves@redhat.com>
4116
4117         * xml-support.c (xml_fetch_content_from_file): Call
4118         unique_ptr::release() instead unique_ptr::get() when passing
4119         through xrealloc.
4120
4121 2017-10-17  Yao Qi  <yao.qi@linaro.org>
4122
4123         * regcache.c (regcache::xfer_part): Remove parameters read and
4124         write, add parameter is_raw.  All callers are updated.
4125
4126 2017-10-16  Keith Seitz  <keiths@redhat.com>
4127
4128         * c-typeprint.c (enum access_specifier): Moved here from
4129         c_type_print_base.
4130         (output_access_specifier): New function.
4131         (c_type_print_base): Consider typedefs when assessing
4132         whether access labels are needed.
4133         Use output_access_specifier as needed.
4134         Output access specifier for typedefs, if needed.
4135         * dwarf2read.c (dwarf2_add_typedef): Record DW_AT_accessibility.
4136         * gdbtypes.h (struct typedef_field) <is_protected, is_private>: New
4137         fields.
4138         (TYPE_TYPEDEF_FIELD_PROTECTED, TYPE_TYPEDEF_FIELD_PRIVATE): New
4139         accessor macros.
4140
4141 2017-10-16  Tom Tromey  <tom@tromey.com>
4142
4143         * linux-tdep.c (linux_info_proc, linux_find_memory_regions_full)
4144         (linux_fill_prpsinfo, linux_vsyscall_range_raw): Update.
4145         * target.c (target_fileio_read_stralloc): Update.
4146         * sparc64-tdep.c (adi_is_addr_mapped): Update.
4147         * target.h (target_fileio_read_stralloc): Return
4148         unique_xmalloc_ptr.
4149
4150 2017-10-16  Tom Tromey  <tom@tromey.com>
4151
4152         * xml-syscall.c (xml_init_syscalls_info): Update.
4153         * xml-support.c (xinclude_start_include): Update.
4154         (xml_fetch_content_from_file): Return unique_xmalloc_ptr.
4155         * xml-support.h (xml_fetch_another): Return unique_xmalloc_ptr.
4156         (xml_fetch_content_from_file): Likewise.
4157         * osdata.c (get_osdata): Update.
4158         * target.h (target_read_stralloc, target_get_osdata): Return
4159         unique_xmalloc_ptr.
4160         * solib-aix.c (solib_aix_get_library_list): Update.
4161         * solib-target.c (solib_target_current_sos): Update.
4162         * solib-svr4.c (svr4_current_sos_via_xfer_libraries): Update.
4163         * xml-tdesc.c (fetch_available_features_from_target): Update.
4164         (target_fetch_description_xml): Update.
4165         (file_read_description_xml): Update.
4166         * remote.c (remote_get_threads_with_qxfer, remote_memory_map)
4167         (remote_traceframe_info, btrace_read_config, remote_read_btrace)
4168         (remote_pid_to_exec_file): Update.
4169         * target.c (target_read_stralloc): Return unique_xmalloc_ptr.
4170         (target_get_osdata): Likewise.
4171
4172 2017-10-16  Tom Tromey  <tom@tromey.com>
4173
4174         * remote.c (remote_register_number_and_offset): Use std::vector.
4175         (remote_set_syscall_catchpoint): Use gdb::unique_xmalloc_ptr.
4176         (putpkt_binary): Use gdb::def_vector.
4177         (compare_sections_command): Use gdb::byte_vector.
4178
4179 2017-10-16  Tom Tromey  <tom@tromey.com>
4180
4181         * ppc-linux-nat.c (hwdebug_insert_point): Use
4182         gdb::unique_xmalloc_ptr, XDUP.
4183
4184 2017-10-16  Tom Tromey  <tom@tromey.com>
4185
4186         * probe.c (parse_probes): Use std::string.
4187         (info_probes_for_ops, enable_probes_command)
4188         (disable_probes_command): Remove cleanups.
4189
4190 2017-10-16  Tom Tromey  <tom@tromey.com>
4191
4192         * buildsym.c (block_compar): Remove.
4193         (end_symtab_get_static_block): Use std::vector.
4194
4195 2017-10-16  Simon Marchi  <simon.marchi@ericsson.com>
4196
4197         * memrange.h (struct mem_range): Define operator< and operator==.
4198         (mem_range_s): Remove.
4199         (DEF_VEC_O (mem_range_s)): Remove.
4200         (normalize_mem_ranges): Change parameter type to std::vector.
4201         * memrange.c (compare_mem_ranges): Remove.
4202         (normalize_mem_ranges): Change parameter type to std::vector,
4203         adjust to vector change.
4204         * exec.c (section_table_available_memory): Return vector, remove
4205         parameter.
4206         (section_table_read_available_memory): Adjust to std::vector
4207         change.
4208         * remote.c (remote_read_bytes): Adjust to std::vector
4209         change.
4210         * tracepoint.h (traceframe_available_memory): Change parameter
4211         type to std::vector.
4212         * tracepoint.c (traceframe_available_memory): Change parameter
4213         type to std::vector, adjust.
4214         * gdb/mi/mi-main.c (mi_cmd_trace_frame_collected): Adjust to
4215         std::vector change.
4216         * gdb/Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
4217         unittests/memrange-selftests.c.
4218         (SUBDIR_UNITTESTS_OBS): Add memrange-selftests.o.
4219         * gdb/unittests/memrange-selftests.c: New file.
4220
4221 2017-10-16  Pedro Alves  <palves@redhat.com>
4222
4223         * elfread.c (probe_key_free): Rename range-for variable.
4224         * probe.c (parse_probes_in_pspace, find_probes_in_objfile)
4225         (find_probe_by_pc, collect_probes): Rename range-for variable.
4226
4227 2017-10-16  Yao Qi  <yao.qi@linaro.org>
4228
4229         * features/Makefile (XMLTOC): Remove tic6x-*.xml.
4230         * features/tic6x-c62x.c: Remove.
4231         * features/tic6x-c64x-linux.c: Remove.
4232         * features/tic6x-c64x.c: Remove.
4233         * features/tic6x-c64xp-linux.c: Remove.
4234         * features/tic6x-c64xp.c: Remove.
4235         * tic6x-linux-tdep.c (_initialize_tic6x_linux_tdep): Don't call
4236         initialize_tdesc_tic6x_*_linux functions.
4237         * tic6x-tdep.c (_initialize_tic6x_tdep): Don't call
4238         initialize_tdesc_tic6x_* functions.
4239
4240 2017-10-16  Yao Qi  <yao.qi@linaro.org>
4241
4242         * features/Makefile (WHICH): Remove tic6x-c64xp, tic6x-c64x
4243         tic6x-c62x.
4244         * regformats/tic6x-c62x.dat: Remove.
4245         * regformats/tic6x-c64x.dat: Remove.
4246         * regformats/tic6x-c64xp.dat: Remove.
4247
4248 2017-10-15  Simon Marchi  <simon.marchi@ericsson.com>
4249
4250         * tracepoint.c (parse_traceframe_info): Return a unique_ptr
4251         (the !HAVE_LIBEXPAT version).
4252
4253 2017-10-14  Simon Marchi  <simon.marchi@ericsson.com>
4254
4255         * nat/linux-osdata.c (struct pid_pgid_entry) <operator<>: Make
4256         const.
4257
4258 2017-10-14  Simon Marchi  <simon.marchi@polymtl.ca>
4259
4260         * target.h: Include tracepoint.h.
4261         (enum trace_find_type): Move to tracepoint.h.
4262         (struct target_ops) <to_traceframe_info>: Return a unique ptr.
4263         * tracepoint.h: Don't include target.h
4264         (enum trace_find_type): Move from target.h.
4265         (parse_traceframe_info): Return a unique ptr.
4266         * tracepoint.c (current_traceframe_info): Change type to unique
4267         ptr.
4268         (free_traceframe_info): Remove.
4269         (clear_traceframe_info): Don't manually free
4270         current_traceframe_info.
4271         (free_result): Remove.
4272         (parse_traceframe_info): Return a unique ptr.
4273         (get_traceframe_info): Adjust to unique ptr.
4274         * ctf.c (ctf_traceframe_info): Return a unique ptr.
4275         * remote.c (remote_traceframe_info): Return a unique ptr.
4276         * tracefile-tfile.c (tfile_traceframe_info): Return a unique
4277         ptr.
4278         * target-debug.h (target_debug_print_traceframe_info_up): New
4279         macro.
4280         * target-delegates.c: Regenerate.
4281
4282 2017-10-14  Simon Marchi  <simon.marchi@polymtl.ca>
4283
4284         * memrange.h (struct mem_range): Add constructors.
4285         * tracepoint.h (struct traceframe_info) <memory>: Change type to
4286         std::vector<mem_range>.
4287         * tracepoint.c (free_traceframe_info): Don't manually free
4288         vector.
4289         (traceframe_info_start_memory): Adjust to vector change.
4290         (traceframe_available_memory): Likewise.
4291         * tracefile-tfile.c (build_traceframe_info): Likewise.
4292         * ctf.c (ctf_traceframe_info): Likewise.
4293
4294 2017-10-14  Simon Marchi  <simon.marchi@polymtl.ca>
4295
4296         * tracepoint.h (struct traceframe_info) <tvars>: Change type to
4297         std::vector<int>.
4298         * tracepoint.c (free_traceframe_info): Deallocate with delete.
4299         (traceframe_info_start_tvar): Adjust to vector change.
4300         (parse_traceframe_info): Allocate with new.
4301         * ctf.c (ctf_traceframe_info): Allocate with new, adjust to
4302         vector change.
4303         * tracefile-tfile.c (build_traceframe_info): Adjust to vector
4304         change.
4305         tfile_traceframe_info): Allocate with new.
4306         * mi/mi-main.c (mi_cmd_trace_frame_collected): Adjust to vector
4307         change.
4308
4309 2017-10-14  Simon Marchi  <simon.marchi@polymtl.ca>
4310
4311         * tracepoint.c (traceframe_info): Rename to...
4312         (current_traceframe_info): ...this.
4313         (clear_traceframe_info): Adjust.
4314         (get_traceframe_info): Adjust.
4315
4316 2017-10-14  Simon Marchi  <simon.marchi@ericsson.com>
4317
4318         * nat/linux-osdata.c: Include algorithm.
4319         (compare_processes): Remove.
4320         (struct pid_pgid_entry): New struct.
4321         (linux_xfer_osdata_processgroups): Use std::vector instead of
4322         XNEWVEC.
4323
4324 2017-10-14  Simon Marchi  <simon.marchi@ericsson.com>
4325
4326         * objfiles.h: Don't include symfile.h.
4327         (struct partial_symbol): Remove forward-declaration.
4328         (struct objfile) <global_psymbols, static_psymbols>: Change type
4329         to std::vector<partial_symbol *>.
4330         * objfiles.c (objfile::objfile): Don't memset those fields.
4331         (objfile::~objfile): Don't free those fields.
4332         * psympriv.h (struct psymbol_allocation_list): Remove
4333         forward-declaration.
4334         (add_psymbol_to_list): Change psymbol_allocation_list parameter
4335         to std::vector.
4336         (start_psymtab_common): Change parameters to std::vector.
4337         * psymtab.c: Include algorithm.
4338         (require_partial_symbols): Call shrink_to_fit.
4339         (find_pc_sect_psymbol): Adjust to vector change.
4340         (match_partial_symbol): Likewise.
4341         (lookup_partial_symbol): Likewise.
4342         (psym_relocate): Likewise.
4343         (dump_psymtab): Likewise.
4344         (recursively_search_psymtabs): Likewise.
4345         (compare_psymbols): Remove.
4346         (sort_pst_symbols): Adjust to vector change.
4347         (start_psymtab_common): Likewise.
4348         (end_psymtab_common): Likewise.
4349         (psymbol_bcache_full): De-constify return value.
4350         (add_psymbol_to_bcache): Likewise.
4351         (extend_psymbol_list): Remove.
4352         (append_psymbol_to_list): Adjust to vector change.
4353         (add_psymbol_to_list): Likewise.
4354         (init_psymbol_list): Likewise.
4355         (maintenance_info_psymtabs): Likewise.
4356         (maintenance_check_psymtabs): Likewise.
4357         * symfile.h (struct psymbol_allocation_list): Remove.
4358         * symfile.c (reread_symbols): Adjust to vector change.
4359         * dbxread.c (start_psymtab): Change type of parameters.
4360         (dbx_symfile_read): Adjust to vector change.
4361         (read_dbx_symtab): Likewise.
4362         (start_psymtab): Change type of parameters.
4363         * dwarf2read.c (dwarf2_build_psymtabs): Adjust to vector change.
4364         (create_partial_symtab): Likewise.
4365         (add_partial_symbol): Likewise.
4366         (write_one_signatured_type): Likewise.
4367         (recursively_write_psymbols): Likewise.
4368         * mdebugread.c (parse_partial_symbols): Likewise.
4369         * xcoffread.c (xcoff_start_psymtab): Change type of parameters.
4370         (scan_xcoff_symtab): Adjust to vector change.
4371         (xcoff_initial_scan): Likewise.
4372
4373 2017-10-13  Simon Marchi  <simon.marchi@ericsson.com>
4374
4375         * ada-typeprint.c (print_dynamic_range_bound): Use std::string.
4376
4377 2017-10-13  Yao Qi  <yao.qi@linaro.org>
4378
4379         * features/Makefile: Remove tic6x-*-expedite, add tic6x-expedite.
4380         Remove s390x-*-expedite, add s390x-expedite.
4381
4382 2017-10-13  Yao Qi  <yao.qi@linaro.org>
4383
4384         * features/s390-gs-linux64.c: Regenerated.
4385         * features/s390x-gs-linux64.c: Regenerated.
4386
4387 2017-10-13  Tom Tromey  <tom@tromey.com>
4388
4389         * compile/compile-object-run.c (do_module_cleanup): Use delete.
4390         * solib.c (update_solib_list, reload_shared_libraries_1): Use
4391         delete.
4392         * symfile.c (symbol_file_add_with_addrs): Use new.
4393         (symbol_file_add_separate): Update comment.
4394         (syms_from_objfile_1, remove_symbol_file_command): Use delete.
4395         * jit.c (jit_object_close_impl): Use new.
4396         (jit_unregister_code): Use delete.
4397         * objfiles.c (objfile::objfile): Rename from allocate_objfile.
4398         (~objfile): Rename from free_objfile.
4399         (free_objfile_separate_debug, do_free_objfile_cleanup)
4400         (free_all_objfiles, objfile_purge_solibs): Use delete.
4401         * objfiles.h (struct objfile): Add constructor and destructor.
4402         Use DISABLE_COPY_AND_ASSIGN.  Add initializers to data members.
4403         (allocate_objfile, free_objfile): Don't declare.
4404         (struct objstats): Add initializers.
4405
4406 2017-10-12  Simon Marchi  <simon.marchi@ericsson.com>
4407
4408         * arch-utils.h (simple_displaced_step_copy_insn): Remove.
4409         * arch-utils.c (simple_displaced_step_copy_insn): Remove.
4410         * gdbarch.sh (displaced_step_copy_insn): Adjust comment.
4411         * gdbarch.h: Regenerate.
4412         * i386-linux-tdep.c (i386_linux_displaced_step_copy_insn):
4413         Adjust comment.
4414         * i386-tdep.c (i386_displaced_step_copy_insn): Adjust comment.
4415         (i386_displaced_step_fixup): Adjust comment.
4416         * rs6000-tdep.c (ppc_displaced_step_copy_insn): Adjust comment.
4417
4418 2017-10-12  Tom Tromey  <tom@tromey.com>
4419
4420         * prologue-value.h (pv_area::store_would_trash): Return bool.
4421         (pv_area::find_reg): Likewise.
4422         * prologue-value.c (pv_area::store_would_trash): Return bool.
4423         (pv_area::find_reg): Likewise.
4424
4425 2017-10-12  Tom Tromey  <tom@tromey.com>
4426
4427         * s390-linux-tdep.c (s390_store, s390_load)
4428         (s390_check_for_saved, s390_analyze_prologue): Update.
4429         * rx-tdep.c (check_for_saved, rx_analyze_prologue): Update.
4430         * rl78-tdep.c (rl78_analyze_prologue, check_for_saved): Update.
4431         * prologue-value.h (class pv_area): Move from prologue-value.c.
4432         Change names of members.  Add constructor, destructor, member
4433         functions.
4434         (make_pv_area, free_pv_area, make_cleanup_free_pv_area)
4435         (pv_area_store, pv_area_fetch, pv_area_store_would_trash)
4436         (pv_area_fetch, pv_area_scan): Don't declare.
4437         * prologue-value.c (struct pv_area::area_entry): Now member of
4438         pv_area.
4439         (struct pv_area): Move to prologue-value.h.
4440         (pv_area::pv_area): Rename from make_pv_area.
4441         (pv_area::~pv_area): Rename from free_pv_area.
4442         (do_free_pv_area_cleanup, make_cleanup_free_pv_area): Remove.
4443         (clear_entries, find_entry, overlaps, store_would_trash, store)
4444         (fetch, find_reg, scan): Now member of pv_area.
4445         Remove "area" argument.  Update.
4446         * msp430-tdep.c (check_for_saved, msp430_analyze_prologue):
4447         Update.
4448         * mn10300-tdep.c (push_reg, check_for_saved)
4449         (mn10300_analyze_prologue): Update.
4450         * mep-tdep.c (is_arg_spill, check_for_saved)
4451         (mep_analyze_prologue): Update.
4452         * m32c-tdep.c (m32c_pv_push, m32c_srcdest_fetch)
4453         (m32c_srcdest_store, m32c_pv_enter, m32c_is_arg_spill)
4454         (m32c_is_struct_return, m32c_analyze_prologue): Update.
4455         * arm-tdep.c (thumb_analyze_prologue, arm_analyze_prologue):
4456         Update.
4457         * arc-tdep.c (arc_is_in_prologue, arc_analyze_prologue): Update.
4458         * aarch64-tdep.c (aarch64_analyze_prologue): Update.
4459
4460 2017-10-12  Simon Marchi  <simon.marchi@ericsson.com>
4461
4462         * linux-nat.h (linux_nat_set_delete_thread): New declaration.
4463         * linux-nat.c (linux_nat_delete_thread): New variable.
4464         (lwp_free): Invoke linux_nat_delete_thread if set.
4465         (linux_nat_set_delete_thread): New function.
4466         * aarch64-linux-nat.c (_initialize_aarch64_linux_nat): Assign
4467         thread delete callback.
4468         * arm-linux-nat.c (arm_linux_delete_thread): New function.
4469         (_initialize_arm_linux_nat): Assign thread delete callback.
4470         * s390-linux-nat.c (s390_delete_thread): New function.
4471         (_initialize_s390_nat): Assign thread delete callback.
4472         * x86-linux-nat.c (x86_linux_add_target): Likewise.
4473         * nat/aarch64-linux.c (aarch64_linux_delete_thread): New
4474         function.
4475         * nat/aarch64-linux.h (aarch64_linux_delete_thread): New
4476         declaration.
4477         * nat/x86-linux.c (x86_linux_delete_thread): New function.
4478         * nat/x86-linux.h (x86_linux_delete_thread): New declaration.
4479
4480 2017-10-09  Tom Tromey  <tom@tromey.com>
4481
4482         * tui/tui-win.c (tui_set_win_height, parse_scrolling_args): Use
4483         std::string.
4484         * tui/tui-layout.c (enum tui_status): Use std::string.
4485
4486 2017-10-11  Tom Tromey  <tom@tromey.com>
4487
4488         * gdbthread.h (thread_command): Constify.
4489         * inferior.h (detach_command): Constify.
4490         * top.h (set_history, show_history): Constify.
4491         * arm-tdep.c (set_arm_command, show_arm_command): Constify.
4492         * serial.c (serial_set_cmd, serial_show_cmd): Constify.
4493         * bsd-kvm.c (bsd_kvm_cmd): Constify.
4494         * printcmd.c (set_command): Constify.
4495         (non_const_set_command): New function.
4496         * dcache.c (set_dcache_command, show_dcache_command): Constify.
4497         * breakpoint.c (enable_command, disable_command, delete_command)
4498         (catch_command, tcatch_command, set_breakpoint_cmd)
4499         (show_breakpoint_cmd): Constify.
4500         * macrocmd.c (macro_command): Constify.
4501         * infcmd.c (unset_command, kill_command, detach_command)
4502         (info_proc_cmd): Constify.
4503         * i386-tdep.c (set_mpx_cmd, show_mpx_cmd): Constify.
4504         * auto-load.c (show_auto_load_cmd, set_auto_load_cmd)
4505         (info_auto_load_cmd): Constify.
4506         * target-descriptions.c (set_tdesc_cmd, show_tdesc_cmd)
4507         (unset_tdesc_cmd): Constify.
4508         * ada-lang.c (set_ada_command, show_ada_command)
4509         (maint_set_ada_cmd, maint_show_ada_cmd): Constify.
4510         * guile/guile.c (set_guile_command, show_guile_command)
4511         (info_guile_command): Constify.
4512         * tui/tui-win.c (tui_command, set_tui_cmd, show_tui_cmd):
4513         Constify.
4514         * skip.c (skip_command): Constify.
4515         * compile/compile.c (_initialize_compile): Constify.
4516         * dwarf2read.c (set_dwarf_cmd, show_dwarf_cmd): Constify.
4517         * btrace.c (maint_btrace_cmd, maint_btrace_set_cmd)
4518         (maint_btrace_show_cmd, maint_btrace_pt_set_cmd)
4519         (maint_btrace_pt_show_cmd): Constify.
4520         * remote.c (set_remote_cmd, show_remote_cmd, remote_command):
4521         Constify.
4522         * python/python.c (user_show_python, user_set_python): Constify.
4523         * mips-tdep.c (set_mips_command, show_mips_command)
4524         (set_mipsfpu_command): Constify.
4525         * record-btrace.c (cmd_record_btrace_start)
4526         (cmd_set_record_btrace, cmd_show_record_btrace)
4527         (cmd_set_record_btrace_bts, cmd_show_record_btrace_bts)
4528         (cmd_set_record_btrace_pt, cmd_show_record_btrace_pt): Constify.
4529         * rs6000-tdep.c (set_powerpc_command, show_powerpc_command):
4530         Constify.
4531         * symfile.c (overlay_command): Constify.
4532         * spu-tdep.c (set_spu_command, show_spu_command): Constify.
4533         * cli/cli-logging.c (set_logging_command, show_logging_command):
4534         Constify.
4535         * cli/cli-dump.c (dump_command, append_command)
4536         (srec_dump_command, ihex_dump_command, verilog_dump_command)
4537         (tekhex_dump_command, binary_dump_command)
4538         (binary_append_command): Constify.
4539         * cli/cli-decode.c (struct cmd_list_element): Change type of
4540         "fun".
4541         * cli/cli-cmds.c (info_command, show_command, set_debug)
4542         (show_debug): Constify.
4543         (show_command): Add non-const overload.
4544         * top.c (set_history, show_history): Constify.
4545         * sh-tdep.c (set_sh_command, show_sh_command): Constify.
4546         * command.h (add_prefix_cmd): Accept a cmd_const_cfunc_ftype.
4547         * target.c (target_command): Constify.
4548         * sparc64-tdep.c (info_adi_command): Constify.
4549         * record-full.c (cmd_record_full_start): Constify.
4550         (set_record_full_command): Constify.  Fix typo.
4551         (show_record_full_command): Constify.
4552         * thread.c (thread_command, thread_apply_command): Constify.
4553         * memattr.c (dummy_cmd): Constify.
4554         * value.c (function_command): Constify.
4555         * frame.c (set_backtrace_cmd, show_backtrace_cmd): Constify.
4556         * probe.c (info_probes_command): Constify.
4557         * ser-tcp.c (set_tcp_cmd, show_tcp_cmd): Constify.
4558         * gnu-nat.c (set_task_cmd, show_task_cmd, set_thread_cmd)
4559         (show_thread_cmd, set_thread_default_cmd)
4560         (show_thread_default_cmd): Constify.
4561         (check_empty): Constify.
4562         * tracepoint.c (tfind_command): Constify.
4563         * cp-support.c (maint_cplus_command): Constify.
4564         * windows-tdep.c (info_w32_command): Constify.
4565         * record.c (cmd_record_start, set_record_command)
4566         (show_record_command, info_record_command, cmd_record_goto):
4567         Constify.
4568         * ravenscar-thread.c (set_ravenscar_command)
4569         (show_ravenscar_command): Constify.
4570         * utils.c (set_internal_problem_cmd, show_internal_problem_cmd):
4571         Constify.
4572         (add_internal_problem_command): Remove casts.
4573         * arc-tdep.c (maintenance_print_arc_command): Constify.
4574         * valprint.c (set_print, show_print, set_print_raw)
4575         (show_print_raw): Constify.
4576         * maint.c (maintenance_command, maintenance_info_command)
4577         (maintenance_print_command, maintenance_set_cmd)
4578         (maintenance_show_cmd, set_per_command_cmd)
4579         (show_per_command_cmd, maintenance_check_command): Constify.
4580         * language.c (set_check, show_check): Constify.
4581         * typeprint.c (show_print_type, set_print_type): Constify.
4582         * go32-nat.c (go32_info_dos_command): Constify.
4583
4584 2017-10-11  Tom Tromey  <tom@tromey.com>
4585
4586         * breakpoint.c (prepare_re_set_context): Remove.
4587         (breakpoint_re_set_one): Update.  Don't use cleanups.
4588         (breakpoint_re_set): Use scoped_restore, std::string, and
4589         scoped_restore_current_language.
4590
4591 2017-10-11  Tom Tromey  <tom@tromey.com>
4592
4593         * breakpoint.c (commands_command_1): Use std::string.
4594         (cleanup_executing_breakpoints): Remove.
4595         (bpstat_do_actions_1): Use scoped_restore.
4596         (bpstat_check_watchpoint): Use std::string.
4597         (decode_static_tracepoint_spec): Likewise.
4598         (break_range_command): Likewise.
4599         (watch_command_1): Likewise.
4600         (compare_breakpoints): Change argument types.
4601         (clear_command): Use std::vector.
4602         (cleanup_executing_breakpoints): Remove.
4603         (update_global_location_list): Use unique_xmalloc_ptr.
4604         (strace_command): Remove unused declaration.
4605
4606 2017-10-11  John Baldwin  <jhb@FreeBSD.org>
4607
4608         * Makefile.in (ALLDEPFILES): Add arm-fbsd-nat.c.
4609         * NEWS: Mention new FreeBSD/arm native configuration.
4610         * configure.host: Add arm*-*-freebsd*.
4611         * configure.nat: Likewise.
4612         * arm-fbsd-nat.c: New file.
4613
4614 2017-10-11  John Baldwin  <jhb@FreeBSD.org>
4615
4616         * Makefile.in (ALL_TARGET_OBS): Add arm-fbsd-tdep.o.
4617         (ALLDEPFILES): Add arm-fbsd-tdep.c.
4618         * NEWS: Mention new FreeBSD/arm target.
4619         * configure.tgt: Add arm*-*-freebsd*.
4620         * arm-fbsd-tdep.c: New file.
4621         * arm-fbsd-tdep.h: New file.
4622
4623 2017-10-11  Maciej W. Rozycki  <macro@imgtec.com>
4624
4625         * linux-tdep.c (linux_make_corefile_notes): Remove call to
4626         `gdbarch_elfcore_write_linux_prpsinfo'.
4627         * gdbarch.sh (elfcore_write_linux_prpsinfo): Remove architecture
4628         method.
4629         (elf_internal_linux_prpsinfo): Remove declaration.
4630         * gdbarch.h: Regenerate.
4631         * gdbarch.c: Regenerate.
4632
4633 2017-10-11  Maciej W. Rozycki  <macro@imgtec.com>
4634
4635         * ppc-linux-tdep.c (ppc_linux_init_abi): Remove call to
4636         `set_gdbarch_elfcore_write_linux_prpsinfo'.
4637
4638 2017-10-11  Pedro Alves  <palves@redhat.com>
4639
4640         * breakpoint.c (reattach_breakpoints): Delete.
4641         * breakpoint.h (reattach_breakpoints): Delete.
4642
4643 2017-10-11  Simon Marchi  <simon.marchi@ericsson.com>
4644
4645         * symfile.c (registered_sym_fns): Make struct, not typedef.
4646         (DEF_VEC_O (registered_sym_fns)): Remove.
4647         (symtab_fns): Change type to std::vector.
4648         (add_symtab_fns): Adjust.
4649         (find_sym_fns): Adjust.
4650
4651 2017-10-11  Anton Kolesov  <Anton.Kolesov@synopsys.com>
4652
4653         * arc-tdep.c (arc_gdbarch_init): Pass proper cpu value to disassembler.
4654         * arc-tdep.h (arc_arch_is_em): New function.
4655         (arc_arch_is_hs): Likewise.
4656
4657 2017-10-11  Egeyar Bagcioglu  <egeyar.bagcioglu@oracle.com>
4658
4659         * macrotab.h (macro_lookup_inclusion): Remove unnecessary
4660         parentheses in the declaration.
4661         (macro_lookup_inclusion): Likewise.
4662         (macro_lookup_definition): Likewise.
4663         * p-lang.h (pascal_builtin_types): Likewise.
4664         * tui/tui-data.c (tui_win_list): Likewise.
4665         * tui/tui-data.h (tui_win_list): Likewise.
4666         * utils.h (make_cleanup_free_section_addr_info): Likewise.
4667
4668 2017-10-11  Mark Rages  <markrages@gmail.com>
4669
4670         * target-memory.c (block_boundaries): Fix for block address not
4671         aligned on block size.
4672
4673 2017-10-10  Pedro Alves <palves@redhat.com>
4674             Tom Tromey  <tom@tromey.com>
4675
4676         * breakpoint.c (struct captured_breakpoint_query_args)
4677         (do_captured_breakpoint_query, gdb_breakpoint_query): Delete.
4678         (print_breakpoint): New.
4679         * breakpoint.h (print_breakpoint): Declare.
4680         * common/common-exceptions.h (enum return_reason): Remove
4681         references to catch_exceptions.
4682         * exceptions.c (catch_exceptions, catch_exceptions_with_msg):
4683         Delete.
4684         * exceptions.h (catch_exceptions_ftype, catch_exceptions)
4685         (catch_exception_ftype, catch_exceptions_with_msg): Delete.
4686         * gdb.h: Delete.
4687         * gdbthread.h (thread_select): Declare.
4688         * mi/mi-cmd-break.c: Don't include gdb.h.
4689         (breakpoint_notify): Use print_breakpoint.
4690         * mi/mi-cmd-catch.c: Don't include gdb.h.
4691         * mi/mi-interp.c: Don't include gdb.h.
4692         (mi_print_breakpoint_for_event): New.
4693         (mi_breakpoint_created, mi_breakpoint_modified): Use
4694         mi_print_breakpoint_for_event.
4695         * mi/mi-main.c: Don't include gdb.h.
4696         (mi_cmd_thread_select): Parse the global thread ID here.  Use
4697         thread_select instead of gdb_thread_select.
4698         (mi_cmd_thread_list_ids): Output "thread-ids" tuple here instead
4699         of using gdb_list_thread_ids.
4700         * remote-fileio.c (do_remote_fileio_request): Change type.  Reply
4701         FILEIO_ENOSYS here.
4702         (remote_fileio_request): Use TRY/CATCH instead of
4703         catch_exceptions.
4704         * symfile-mem.c (struct symbol_file_add_from_memory_args)
4705         (symbol_file_add_from_memory_wrapper): Delete.
4706         (add_vsyscall_page): Use TRY/CATCH instead of catch_exceptions.
4707         * thread.c: Don't include gdb.h.
4708         (do_captured_list_thread_ids, gdb_list_thread_ids): Delete.
4709         (thread_alive): Use thread_select.
4710         (do_captured_thread_select): Delete, parts salvaged as ...
4711         (thread_select): ... this new function.
4712         (gdb_thread_select): Delete.
4713
4714 2017-10-10  Pedro Alves  <palves@redhat.com>
4715             Tom Tromey  <tom@tromey.com>
4716
4717         * breakpoint.c (breakpoint_cond_eval): Change return type to bool
4718         and reverse logic.
4719         (WP_DELETED, WP_VALUE_CHANGED, WP_VALUE_NOT_CHANGED, WP_IGNORE):
4720         No longer macros.  Instead ...
4721         (enum wp_check_result): They're now values of this new
4722         enumeration.
4723         (watchpoint_check): Change return type to wp_check_result and
4724         parameter type to bpstat.
4725         (bpstat_check_watchpoint): Use TRY/CATCH instead of catch_errors.
4726         (bpstat_check_breakpoint_conditions): Use TRY/CATCH instead of
4727         catch_errors.  Reverse logic of watchpoint_check call.
4728         (breakpoint_re_set_one): Now returns void and takes a breakpoint
4729         pointer as parameter.
4730         (breakpoint_re_set): Use TRY/CATCH instead of catch_errors.
4731         * common/common-exceptions.c (throw_exception_sjlj): Update
4732         comments to avoid mentioning catch_errors.
4733         * exceptions.c (catch_errors): Delete.
4734         * exceptions.h: Update comments to avoid mentioning catch_errors.
4735         (catch_errors_ftype, catch_errors): Delete.
4736         * infrun.c (normal_stop): Use TRY/CATCH instead of catch_errors.
4737         (hook_stop_stub): Delete.
4738         (restore_selected_frame): Change return type to void, and
4739         parameter type to const frame_id &.
4740         (restore_infcall_control_state): Use TRY/CATCH instead of
4741         catch_errors.
4742         * main.c (captured_command_loop): Return void and remove
4743         parameter.  Remove references to catch_errors.
4744         (captured_main): Use TRY/CATCH instead of catch_errors.
4745         * objc-lang.c (objc_submethod_helper_data)
4746         (find_objc_msgcall_submethod_helper): Delete.
4747         (find_objc_msgcall_submethod): Use TRY/CATCH instead of
4748         catch_errors.
4749         * record-full.c (record_full_message): Return void.
4750         (record_full_message_args, record_full_message_wrapper): Delete.
4751         (record_full_message_wrapper_safe): Return bool and use TRY/CATCH
4752         instead of catch_errors.
4753         * solib-aix.c (solib_aix_open_symbol_file_object): Change
4754         parameter type to int.
4755         * solib-darwin.c (open_symbol_file_object): Ditto.
4756         * solib-dsbt.c (open_symbol_file_object): Ditto.
4757         * solib-frv.c (open_symbol_file_object): Ditto.
4758         * solib-svr4.c (open_symbol_file_object): Ditto.
4759         * solib-target.c (solib_target_open_symbol_file_object): Ditto.
4760         * solib.c (update_solib_list): Use TRY/CATCH instead of
4761         catch_errors.
4762         * solist.h (struct target_so_ops) <open_symbol_file_object>:
4763         Change type.
4764         * symmisc.c (struct print_symbol_args): Remove.
4765         (dump_symtab_1): Use TRY/CATCH instead of catch_errors.
4766         (print_symbol): Change type.
4767         * windows-nat.c (handle_load_dll, handle_unload_dll): Return void
4768         and remove parameters.
4769         (catch_errors): New.
4770         (get_windows_debug_event): Adjust.
4771
4772 2017-10-09  Tom Tromey  <tom@tromey.com>
4773
4774         * mi/mi-main.c (free_splay_tree): Remove.
4775         (list_available_thread_groups): Use splay_tree_up.
4776         * common/gdb_splay_tree.h: New file.
4777
4778 2017-10-09  Tom Tromey  <tom@tromey.com>
4779
4780         * mi/mi-main.c (do_nothing): Remove.
4781         (list_available_thread_groups): Update.
4782
4783 2017-10-09  Pedro Alves  <palves@redhat.com>
4784
4785         * infrun.c (handle_inferior_event_1) <TARGET_WAITKIND_EXECD>: Skip
4786         reading registers when switching context.
4787
4788 2017-10-09  John Baldwin  <jhb@FreeBSD.org>
4789
4790         * fbsd-nat.c (fbsd_siginfo_size): Use gdbarch_long_bit.
4791         (fbsd_convert_siginfo): Likewise.
4792         * fbsd-tdep.c (fbsd_core_xfer_siginfo): Likewise.
4793
4794 2017-10-09  Simon Marchi  <simon.marchi@polymtl.ca>
4795
4796         * configure.ac (try_guile_versions): Remove guile-2.2.
4797         * configure: Regenerate.
4798
4799 2017-10-09  Tom Tromey  <tom@tromey.com>
4800
4801         * Makefile.in (COMPILE.post, POSTCOMPILE): Restore $(basename).
4802         (COMPILE.pre): Use $(CXX).
4803
4804 2017-10-09  Pedro Alves  <palves@redhat.com>
4805
4806         * cp-support.c (cp_remove_params): Return a gdb::unique_xmalloc_ptr.
4807         Use bool.
4808         (overload_list_add_symbol): Adjust to use gdb::unique_xmalloc_ptr.
4809         * cp-support.h (cp_remove_params): Now returns a
4810         gdb::unique_xmalloc_ptr.
4811         * dwarf2read.c (find_slot_in_mapped_hash): Now returns bool.
4812         Adjust to cp_remove_params returning a gdb::unique_xmalloc_ptr.
4813         * psymtab.c (psymtab_search_name): Adjust to cp_remove_params
4814         returning a gdb::unique_xmalloc_ptr.
4815         (lookup_partial_symbol): Adjust to use gdb::unique_xmalloc_ptr.
4816         * stack.c (find_frame_funname): Adjust to cp_remove_params
4817         returning a gdb::unique_xmalloc_ptr.
4818
4819 2017-10-08  Tom Tromey  <tom@tromey.com>
4820
4821         * dwarf2read.c (dwarf2_get_dwz_file): Use
4822         gdb::unique_xmalloc_ptr.
4823         (find_slot_in_mapped_hash): Likewise.
4824         (dwarf2_physname): Likewise.
4825         (create_dwo_unit_in_dwp_v1): Use std::string.
4826         (create_dwo_unit_in_dwp_v2): Likewise.
4827         (lookup_dwo_cutu): Likewise.
4828         (inherit_abstract_dies): Use std::vector.
4829         (read_array_type): Likewise.
4830         (dwarf_decode_macros): Remove unused declaration.
4831         (unsigned_int_compar): Remove.
4832         (dwarf2_build_psymtabs_hard): Use scoped_restore.
4833         (psymtabs_addrmap_cleanup): Remove.
4834
4835 2017-10-08  Tom Tromey  <tom@tromey.com>
4836
4837         * frame-unwind.c (frame_unwind_try_unwinder): Update.
4838         * frame.h (frame_cleanup_after_sniffer): Declare.
4839         (frame_prepare_for_sniffer): Return void.
4840         * frame.c (frame_cleanup_after_sniffer): No longer static.  Change
4841         type of argument.
4842         (frame_prepare_for_sniffer): Return void.
4843
4844 2017-10-08  Tom Tromey  <tom@tromey.com>
4845
4846         * utils.h (make_cleanup_value_free): Remove.
4847         * utils.c (do_value_free, struct cleanup): Remove.
4848         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full) <DWARF_VALUE_STACK>:
4849         Use gdb_value_up.
4850         * value.h (struct value_deleter): New.
4851         (gdb_value_up): New typedef.
4852
4853 2017-10-08  Tom Tromey  <tom@tromey.com>
4854
4855         * symtab.c (free_search_symbols, do_free_search_symbols_cleanup)
4856         (make_cleanup_free_search_symbols): Remove.
4857         (search_symbols): Return std::vector.
4858         (symbol_search::compare_search_syms): Now member of
4859         symbol_search.  Change arguments.
4860         (sort_search_symbols_remove_dups): Change arguments.  Rewrite.
4861         (symtab_symbol_info, rbreak_command): Update.
4862         * symtab.h (struct symbol_search) <next>: Remove.
4863         Add constructors.
4864         (symbol_search::operator<): New function.
4865         (symbol_search::operator==): New function.
4866         (search_symbols): Remove std::vector.
4867         (free_search_symbols, make_cleanup_free_search_symbols): Remove.
4868         (symbol_search::compare_search_syms): Declare.
4869
4870 2017-10-06  Yao Qi  <yao.qi@linaro.org>
4871
4872         * Makefile.in (ALL_64_TARGET_OBS): Replace aarch64-insn.o with
4873         arch/aarch64-insn.o.
4874         Remove one rule.
4875         * configure.tgt: Replace aarch64-insn.o with arch/aarch64-insn.o.
4876
4877 2017-10-06  Yao Qi  <yao.qi@linaro.org>
4878
4879         * Makefile.in (ALL_TARGET_OBS): Replace arm.o, arm-get-next-pcs.o,
4880         and arm-linux.o with arch/arm.o, arch/arm-get-next-pcs.o and
4881         arch/arm-linux.o respectively.
4882         * configure.tgt: Likewise.
4883
4884 2017-10-06  Yao Qi  <yao.qi@linaro.org>
4885
4886         * Makefile.in (ALL_TARGET_OBS): Rename i386.o to arch/i386.o.
4887         * configure.tgt (i386_tobjs): Replace i386.o with arch/i386.o.
4888
4889 2017-10-06  Pedro Alves  <palves@redhat.com>
4890
4891         * windows-nat.c: Include <algorithm>.
4892
4893 2017-10-06  Yao Qi  <yao.qi@linaro.org>
4894
4895         * configure.tgt (i386_tobjs): New variable.
4896         (amd64_tobjs): New variable.
4897         Set $cpu_obs and $os_obs.
4898
4899 2017-10-06  Yao Qi  <yao.qi@linaro.org>
4900
4901         * Makefile.in (CONFIG_SRC_SUBDIR): New.
4902         (ALL_64_TARGET_OBS): Replace amd64.o with arch/amd64.o.
4903         (clean): Remove object files and dependency files.
4904         (distclean): Remove the directory.
4905         * configure.ac: Invoke AC_CONFIG_COMMANDS.
4906         * configure: Re-generated.
4907         * configure.tgt: Replace amd64.o with arch/amd64.o.
4908
4909 2017-10-05  Jose E. Marchesi  <jose.marchesi@oracle.com>
4910
4911         PR build/22188
4912         * arm-tdep.c (arm_decode_misc_memhint_neon): Fix decoding of CPS
4913         and SETEND.
4914
4915 2017-10-05  Pedro Alves  <palves@redhat.com>
4916
4917         * linux-nat.c (linux_child_follow_fork): When following the parent
4918         and detaching the child, consult the parent thread's architecture
4919         instead of the child's.
4920
4921 2017-10-05  Ulrich Weigand  <uweigand@de.ibm.com>
4922
4923         * ax.h: Do not include "doublest.h".
4924         (union agent_val): Remove.
4925
4926 2017-10-05  Ulrich Weigand  <uweigand@de.ibm.com>
4927
4928         * dfp.h (MAX_DECIMAL_STRING): Move to dfp.c.
4929         (decimal_to_string): Return std::string object.
4930         (decimal_from_string): Accept std::string object.  Return bool.
4931         (decimal_from_integral, decimal_from_doublest): Remove.
4932         (decimal_from_longest): Add prototype.
4933         (decimal_from_ulongest): Likewise.
4934         (decimal_to_longest): Likewise.
4935         (decimal_from_doublest): Likewise.
4936         * dfp.c: Do not include "gdbtypes.h" or "value.h".
4937         (MAX_DECIMAL_STRING): Move here.
4938         (decimal_to_string): Return std::string object.
4939         (decimal_from_string): Accept std::string object.  Return bool.
4940         (decimal_from_integral): Remove, replace by ...
4941         (decimal_from_longest, decimal_from_ulongest): ... these new functions.
4942         (decimal_to_longest): New function.
4943         (decimal_from_floating): Remove, replace by ...
4944         (decimal_from_doublest): ... this new function.
4945         (decimal_to_doublest): Update to new decimal_to_string interface.
4946
4947         * value.c (unpack_long): Use decimal_to_longest.
4948         * valops.c (value_cast): Use decimal_from_doublest instead of
4949         decimal_from_floating.  Use decimal_from_[u]longest isntead of
4950         decimal_from_integral.
4951         * valarith.c (value_args_as_decimal): Likewise.
4952         * valprint.c (print_decimal_floating): Update to new
4953         decimal_to_string interface.
4954         * printcmd.c (printf_decfloat): Likewise.
4955         * c-exp.y (parse_number): Update to new decimal_from_string interface.
4956
4957 2017-10-05  Ulrich Weigand  <uweigand@de.ibm.com>
4958
4959         * doublest.h: Do not include "floatformat.h".  Remove stale comments.
4960         * gdbtypes.c: Include "floatformat.h".
4961         * value.c: Likewise.
4962         * m68k-tdep.c: Likewise.
4963
4964         * findvar.c: Do not include "floatformat.h".
4965         * amd64-darwin-tdep.c: Likewise.
4966         * arm-linux-tdep.c: Likewise.
4967         * i386-darwin-tdep.c: Likewise.
4968         * i387-tdep.c: Likewise.
4969         * m68k-linux-tdep.c: Likewise.
4970         * mep-tdep.c: Likewise.
4971         * mips-tdep.c: Likewise.
4972         * nios2-tdep.c: Likewise.
4973         * s390-linux-tdep.c: Likewise.
4974         * sparc-obsd-tdep.c: Likewise.
4975         * sparc-tdep.c: Likewise.
4976         * sparc64-tdep.c: Likewise.
4977         * spu-tdep.c: Likewise.
4978         * tic6x-tdep.c: Likewise.
4979         * tilegx-tdep.c: Likewise.
4980         * vax-tdep.c: Likewise.
4981         * xstormy16-tdep.c: Likewise.
4982         * xtensa-tdep.c: Likewise.
4983
4984         * top.c: Do not include "doublest.h".
4985         * aarch64-tdep.c: Likewise.
4986         * alpha-tdep.c: Likewise.
4987         * arm-linux-tdep.c: Likewise.
4988         * m68k-linux-tdep.c: Likewise.
4989         * tilegx-tdep.c: Likewise.
4990         * xstormy16-tdep.c: Likewise.
4991
4992 2017-10-05  John Baldwin  <jhb@FreeBSD.org>
4993
4994         * mips-fbsd-tdep.c (MIPS_INST_ADDIU_A0_SP_N32): Define.
4995         (mipsn32_fbsd_sigframe): Define.
4996         (mips_fbsd_init_abi): Install mipsn32_fbsd_sigframe unwinder
4997         for FreeBSD/mipsn32.
4998
4999 2017-10-05  John Baldwin  <jhb@FreeBSD.org>
5000
5001         * fbsd-tdep.c (fbsd_print_auxv_entry): Handle AT_EHDRFLAGS and
5002         AT_HWCAP.
5003
5004 2017-10-05  Tristan Gingold  <tgingold@free.fr>
5005
5006         * MAINTAINERS (Misc): Update my email address.
5007
5008 2017-10-04  Pedro Alves  <palves@redhat.com>
5009
5010         * remote.c (get_remote_arch_state): New 'gdbarch' parameter.  Use
5011         it instead of target_gdbarch.
5012         (get_remote_state, get_remote_packet_size): Adjust
5013         get_remote_arch_state calls, passing down target_gdbarch
5014         explicitly.
5015         (packet_reg_from_regnum, packet_reg_from_pnum): New parameter
5016         'gdbarch' and use it instead of target_gdbarch.
5017         (get_memory_packet_size): Adjust get_remote_arch_state calls,
5018         passing down target_gdbarch explicitly.
5019         (struct stop_reply) <arch>: New field.
5020         (remote_parse_stop_reply): Use the stopped thread's architecture,
5021         not the current inferior's.  Save the architecture in the
5022         stop_reply.
5023         (process_stop_reply): Use the stop reply's architecture.
5024         (process_g_packet, remote_fetch_registers)
5025         (remote_prepare_to_store, store_registers_using_G)
5026         (remote_store_registers): Adjust get_remote_arch_state calls,
5027         using the regcache's architecture.
5028         (remote_get_trace_status): Adjust get_remote_arch_state calls,
5029         passing down target_gdbarch explicitly.
5030         * spu-multiarch.c (spu_thread_architecture): Defer to the target
5031         beneath instead of calling target_gdbarch.
5032         * target.c (default_thread_architecture): Use the specified
5033         inferior's architecture, instead of the current inferior's
5034         architecture (via target_gdbarch).
5035
5036 2017-10-04  Pedro Alves  <palves@redhat.com>
5037
5038         * regcache.c (get_thread_arch_regcache): Remove null_ptid special
5039         case.
5040         (regcache_print): Handle !target_has_registers here instead.
5041
5042 2017-10-04  Pedro Alves  <palves@redhat.com>
5043
5044         * frame.c (create_test_frame): Delete.
5045         * frame.h (create_test_frame): Delete.
5046         * gdbarch-selftests.c: Include gdbthread.h and target.h.
5047         (class regcache_test): Delete.
5048         (test_target_has_registers, test_target_has_stack)
5049         (test_target_has_memory, test_target_prepare_to_store)
5050         (test_target_store_registers): New functions.
5051         (test_target_ops): New class.
5052         (register_to_value_test): Error out if there's already a
5053         process_stratum (or higher) target pushed.  Create a fuller mock
5054         environment, with mock target_ops, inferior, address space, thread
5055         and inferior_ptid.
5056         * progspace.c (struct address_space): Move to ...
5057         * progspace.h (struct address_space): ... here.
5058         * regcache.h (regcache::~regcache, regcache::raw_write)
5059         [GDB_SELF_TEST]: No longer virtual.
5060
5061 2017-10-04  Simon Marchi  <simon.marchi@ericsson.com>
5062
5063         * mi/mi-main.c (list_available_thread_groups): Reverse filter logic.
5064
5065 2017-10-04  Pedro Alves  <palves@redhat.com>
5066
5067         * guile/scm-breakpoint.c (gdbscm_breakpoint_commands): Move code
5068         out of 'between TRY and CATCH'.
5069
5070 2017-10-04  Pedro Alves  <palves@redhat.com>
5071
5072         * cli/cli-cmds.c (complete_command): Add missing END_CATCH.
5073         * common/common-exceptions.h (TRY): Open an outermost scope.
5074         Expand intro comment.
5075         (CATCH): Reindent.
5076         (END_CATCH): Close the outermost scope.
5077         * completer.c (complete_line_internal): Add missing END_CATCH.
5078
5079 2017-10-04  Sergio Durigan Junior  <sergiodj@redhat.com>
5080
5081         * NEWS (Changes since GDB 8.0): Add entry about new
5082         'set-cwd-on-gdbserver' feature.
5083         (New remote packets): Add entry for QSetWorkingDir.
5084         * common/common-inferior.h (set_inferior_cwd): New prototype.
5085         * infcmd.c (set_inferior_cwd): Remove "static".
5086         (show_cwd_command): Expand text to include remote debugging.
5087         * remote.c: Add PACKET_QSetWorkingDir.
5088         (remote_protocol_features) <QSetWorkingDir>: New entry for
5089         PACKET_QSetWorkingDir.
5090         (extended_remote_set_inferior_cwd): New function.
5091         (extended_remote_create_inferior): Call
5092         "extended_remote_set_inferior_cwd".
5093         (_initialize_remote): Call "add_packet_config_cmd" for
5094         QSetWorkingDir.
5095
5096 2017-10-04  Sergio Durigan Junior  <sergiodj@redhat.com>
5097
5098         * NEWS (New commands): Mention "set/show cwd".
5099         * cli/cli-cmds.c (_initialize_cli_cmds): Mention "set cwd" on
5100         "cd" command's help text.
5101         * common/common-inferior.h (get_inferior_cwd): New prototype.
5102         * infcmd.c (inferior_cwd_scratch): New global variable.
5103         (set_inferior_cwd): New function.
5104         (get_inferior_cwd): Likewise.
5105         (set_cwd_command): Likewise.
5106         (show_cwd_command): Likewise.
5107         (_initialize_infcmd): Add "set/show cwd" commands.
5108         * inferior.h (class inferior) <cwd>: New field.
5109         * nat/fork-inferior.c: Include "gdb_tilde_expand.h".
5110         (fork_inferior): Change inferior's cwd before its execution.
5111         * windows-nat.c (windows_create_inferior): Pass inferior's cwd
5112         to CreateProcess.
5113
5114 2017-10-04  Sergio Durigan Junior  <sergiodj@redhat.com>
5115
5116         * Makefile.in (SFILES): Add gdb_tilde_expand.c.
5117         (HFILES_NO_SRCDIR): Add gdb_tilde_expand.h.
5118         (COMMON_OBS): Add gdb_tilde_expand.o.
5119         * common/gdb_tilde_expand.c: New file.
5120         * common/gdb_tilde_expand.h: Likewise.
5121
5122 2017-10-03  Maciej W. Rozycki  <macro@imgtec.com>
5123
5124         * gdbarch.sh (objfile): Remove duplicate declaration.
5125         * gdbarch.h: Regenerate.
5126
5127 2017-10-03  Tom Tromey  <tom@tromey.com>
5128
5129         * utils.c (internal_vproblem): Use string_vprintf.
5130
5131 2017-10-03  Tom Tromey  <tom@tromey.com>
5132
5133         * printcmd.c (info_symbol_command): Use std::string.
5134
5135 2017-10-03  Tom Tromey  <tom@tromey.com>
5136
5137         * top.c (gdb_safe_append_history): Use std::string.
5138
5139 2017-10-03  Tom Tromey  <tom@tromey.com>
5140
5141         * event-top.c (stdin_event_handler): Update.
5142         * main.c (captured_main_1): Update.
5143         * top.h (make_delete_ui_cleanup): Remove.
5144         (struct ui): Add constructor and destructor.
5145         (new_ui, delete_ui): Remove.
5146         * top.c (make_delete_ui_cleanup): Remove.
5147         (new_ui_command): Use std::unique_ptr.
5148         (delete_ui_cleanup): Remove.
5149         (ui::ui): Rename from new_ui.  Update.
5150         (free_ui): Remove.
5151         (ui::~ui): Rename from delete_ui.  Update.
5152
5153 2017-10-03  Tom Tromey  <tom@tromey.com>
5154
5155         * symfile.c (load_progress): Use gdb::byte_vector.
5156
5157 2017-10-03  Tom Tromey  <tom@tromey.com>
5158
5159         * mi/mi-main.c (mi_cmd_trace_frame_collected): Remove unused
5160         declaration.
5161         * printcmd.c (x_command): Remove unused declaration.
5162         * symfile.c (symbol_file_command): Remove unused declaration.
5163
5164 2017-10-03  Tom Tromey  <tom@tromey.com>
5165
5166         * utils.c (internal_vproblem): Use std::string.
5167         (defaulted_query): Likewise.
5168
5169 2017-10-03  Tom Tromey  <tom@tromey.com>
5170
5171         * guile/scm-ports.c (ioscm_with_output_to_port_worker): Update.
5172         * top.c (execute_command_to_string): Update.
5173         * utils.c (make_cleanup_restore_page_info): Remove.
5174         (do_restore_page_info_cleanup): Remove.
5175         (set_batch_flag_and_restore_page_info):
5176         New.
5177         (make_cleanup_restore_page_info): Remove.
5178         (set_batch_flag_and_make_cleanup_restore_page_info): Remove.
5179         (~set_batch_flag_and_restore_page_info): New
5180         (make_cleanup_restore_uinteger): Remove.
5181         (make_cleanup_restore_integer): Remove.
5182         (struct restore_integer_closure): Remove.
5183         (restore_integer): Remove.
5184         * utils.h (struct set_batch_flag_and_restore_page_info): New
5185         class.
5186         (set_batch_flag_and_make_cleanup_restore_page_info): Remove.
5187         (make_cleanup_restore_page_info): Remove.
5188         (make_cleanup_restore_uinteger) Remove.
5189         (make_cleanup_restore_integer) Remove.
5190
5191 2017-10-03  Tom Tromey  <tom@tromey.com>
5192
5193         * record-full.h (record_full_gdb_operation_disable_set): Return
5194         scoped_restore_tmpl<int>.
5195         * infrun.c (adjust_pc_after_break): Update.
5196         (handle_signal_stop): Update.
5197         * record-full.c (record_full_gdb_operation_disable_set): Return
5198         scoped_restore_tmpl<int>.
5199         (record_full_wait_1, record_full_insert_breakpoint)
5200         (record_full_remove_breakpoint, record_full_save)
5201         (record_full_goto_insn): Update.
5202
5203 2017-10-02  Tom Tromey  <tom@tromey.com>
5204
5205         PR rust/22236:
5206         * rust-lang.c (rust_val_print_str): New function.
5207         (val_print_struct): Call it.
5208         (rust_subscript): Preserve name of slice type.
5209
5210 2017-10-02  Tom Tromey  <tom@tromey.com>
5211
5212         * rust-lang.c (rust_subscript): Handle slices in
5213         EVAL_AVOID_SIDE_EFFECTS case.
5214
5215 2017-10-02  Tom Tromey  <tom@tromey.com>
5216
5217         * rust-lang.c (rust_slice_type_p): Recognize &str as a slice type.
5218
5219 2017-10-02  Tom Tromey  <tom@tromey.com>
5220
5221         * rust-lang.h (rust_slice_type): Add "extern".
5222
5223 2017-10-02  Tom Tromey  <tom@tromey.com>
5224             Pedro Alves  <palves@redhat.com>
5225
5226         * ada-lang.h (ada_exc_info::operator<): Make const.
5227         (ada_exc_info::operator==): Make const.
5228         * ada-lang.c (ada_exc_info::operator<, ada_exc_info::operator==):
5229         Make const.
5230
5231 2017-09-29  Tom Tromey  <tom@tromey.com>
5232
5233         * target.c (read_whatever_is_readable): Change type of "result".
5234         Update.
5235         (free_memory_read_result_vector): Remove.
5236         (read_memory_robust): Change return type.  Update.
5237         * mi/mi-main.c (mi_cmd_data_read_memory_bytes): Update.  Use
5238         bin2hex, std::string.
5239         * target.h (memory_read_result_s): Remove typedef.
5240         (free_memory_read_result_vector): Remove.
5241         (read_memory_robust): Return std::vector.
5242
5243 2017-09-29  Tom Tromey  <tom@tromey.com>
5244
5245         * mi/mi-main.c (captured_mi_execute_command): Use scope_restore.
5246
5247 2017-09-29  Tom Tromey  <tom@tromey.com>
5248
5249         * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions): Update.
5250         * ada-lang.h (struct ada_exc_info): Remove typedef.  Declare
5251         operator< and operator==.
5252         (ada_exceptions_list): Return a std::vector.
5253         * ada-lang.c (ada_exc_info::operator<): Rename from
5254         compare_ada_exception_info.
5255         (ada_exc_info::operator==): New.
5256         (sort_remove_dups_ada_exceptions_list): Change type of
5257         "exceptions".
5258         (ada_add_standard_exceptions, ada_add_exceptions_from_frame)
5259         (ada_add_global_exceptions): Likewise.
5260         (ada_exceptions_list_1): Return a std::vector.
5261         (ada_exceptions_list): Likewise.
5262
5263 2017-09-29  Tom Tromey  <tom@tromey.com>
5264
5265         * mi/mi-main.c (struct print_one_inferior_data) <inferiors>: Now a
5266         'std::set *'.
5267         (print_one_inferior): Update.
5268         (free_vector_of_ints): Remove.
5269         (list_available_thread_groups): Change "ids" to std::set.
5270         (mi_cmd_list_thread_groups): Update.
5271         (struct collect_cores_data) <core>: Now a std::set.
5272         (collect_cores): Update.
5273         (unique): Remove.
5274         (print_one_inferior): Update.
5275
5276 2017-09-29  Tom Tromey  <tom@tromey.com>
5277
5278         * mi/mi-main.c (mi_execute_cli_command): Use std::string.
5279         (mi_execute_async_cli_command): Likewise.
5280         (mi_cmd_trace_frame_collected): Use field_fmt.
5281
5282 2017-09-29  Tom Tromey  <tom@tromey.com>
5283
5284         * mi/mi-main.c (mi_cmd_data_write_memory_bytes): Use
5285         gdb::byte_vector.
5286
5287 2017-09-29  Tom Tromey  <tom@tromey.com>
5288
5289         * mi/mi-parse.c (mi_parse): Remove unused declaration.
5290
5291 2017-09-29  Tom Tromey  <tom@tromey.com>
5292
5293         * mi/mi-cmd-disas.c (mi_cmd_disassemble): Don't copy "oarg".
5294
5295 2017-09-29  Tom Tromey  <tom@tromey.com>
5296
5297         * varobj.h (varobj_gen_name): Return std::string.
5298         * varobj.c (varobj_gen_name): Return std::string.
5299         * mi/mi-cmd-var.c (mi_cmd_var_create): Use std::string.
5300         (mi_cmd_var_delete): Don't copy "name".
5301
5302 2017-09-29  Tom Tromey  <tom@tromey.com>
5303
5304         * mi/mi-cmd-break.c (mi_argv_to_format): Return std::string.
5305         (mi_cmd_break_insert_1): Update.
5306
5307 2017-09-29  Tom Tromey  <tom@tromey.com>
5308
5309         * target.h (make_scoped_defer_target_commit_resume): Update.
5310         * target.c (make_scoped_defer_target_commit_resume): Rename from
5311         make_cleanup_defer_target_commit_resume.  Return a
5312         scoped_restore.
5313         * infrun.c (proceed): Use make_scoped_defer_target_commit_resume.
5314
5315 2017-09-29  Tom Tromey  <tom@tromey.com>
5316
5317         * main.c (captured_main_1): Remove unused declaration.
5318         * spu-multiarch.c (parse_spufs_run): Remove unused declaration.
5319
5320 2017-09-29  Tom Tromey  <tom@tromey.com>
5321
5322         * symtab.c (search_symbols): Remove unused outer cleanup.
5323         (make_source_files_completion_list): Remove unused declaration.
5324
5325 2017-09-29  Tom Tromey  <tom@tromey.com>
5326
5327         * mt-tdep.c (mt_push_dummy_call): Use gdb::byte_vector.
5328
5329 2017-09-29  Tom Tromey  <tom@tromey.com>
5330
5331         * xstormy16-tdep.c (xstormy16_push_dummy_call): Use
5332         gdb::byte_vector.
5333
5334 2017-09-29  Tom Tromey  <tom@tromey.com>
5335
5336         * complaints.c (vcomplaint): Use std::string.
5337
5338 2017-09-29  Tom Tromey  <tom@tromey.com>
5339
5340         * tracepoint.c (trace_variable_command): Use std::string.
5341         (encode_actions_1): Remove unused declarations.
5342         (create_tsv_from_upload): Use std::string.
5343
5344 2017-09-29  Tom Tromey  <tom@tromey.com>
5345
5346         * cp-support.c (gdb_demangle): Use std::string.
5347
5348 2017-09-29  Tom Tromey  <tom@tromey.com>
5349
5350         * stack.c (parse_frame_specification): Use std::string
5351         (info_frame_command): Use gdb::unique_xmalloc_ptr.
5352
5353 2017-09-29  Tom Tromey  <tom@tromey.com>
5354
5355         * tilegx-tdep.c (tilegx_push_dummy_call): Use gdb::byte_vector.
5356
5357 2017-09-29  Tom Tromey  <tom@tromey.com>
5358
5359         * utils.c (vfprintf_maybe_filtered): Use std::string.
5360         (vfprintf_unfiltered): Likewise.
5361
5362 2017-09-29  Tom Tromey  <tom@tromey.com>
5363
5364         * event-top.c (top_level_prompt): Return std::string.
5365         (display_gdb_prompt): Update.
5366
5367 2017-09-29  Tom Tromey  <tom@tromey.com>
5368
5369         * unittests/common-utils-selftests.c (format): New function.
5370         (string_vprintf_tests): New function.
5371         (_initialize_common_utils_selftests): Register new tests.
5372         * common/common-utils.c (string_vprintf): New function.
5373         * common/common-utils.h (string_vprintf): Declare.
5374
5375 2017-09-29  Pedro Alves  <palves@redhat.com>
5376
5377         * common/rsp-low.c (unpack_varlen_hex): Constify.
5378         * common/rsp-low.h (unpack_varlen_hex): Constify.
5379         * linux-nat.c (linux_child_static_tracepoint_markers_by_strid):
5380         Constify.
5381         * remote.c (remote_set_permissions, read_ptid)
5382         (remote_current_thread, remote_get_threads_with_qthreadinfo)
5383         (remote_static_tracepoint_marker_at)
5384         (remote_static_tracepoint_markers_by_strid)
5385         (stop_reply_extract_thread, remote_parse_stop_reply): Constify.
5386         * tracepoint.c (parse_trace_status, parse_tracepoint_status)
5387         (parse_tracepoint_definition, parse_tsv_definition)
5388         (parse_static_tracepoint_marker_definition): Constify.
5389         * tracepoint.h (parse_static_tracepoint_marker_definition)
5390         (parse_trace_status, parse_tracepoint_status)
5391         (parse_tracepoint_definition, parse_tsv_definition): Constify.
5392
5393 2017-09-29  Pedro Alves  <palves@redhat.com>
5394
5395         * remote.c (target_buf, target_buf_size): Delete.
5396         (remote_get_noisy_reply): Remove buf_p and sizeof_buf parameters.
5397         Use the connection's packet buffer instead.
5398         All callers adjusted.
5399         (_initialize_remote): Remove references to target_buf and
5400         target_buf_size.
5401
5402 2017-09-28  Pedro Alves  <palves@redhat.com>
5403
5404         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
5405         unittests/common-utils-selftests.c.
5406         (SUBDIR_UNITTESTS_OBS): Add common-utils-selftests.o.
5407         (COMMON_OBS): Remove utils-selftests.o.
5408         * utils-selftests.c: Move to ...
5409         * unittests/common-utils-selftests.c: ... here and rename self
5410         test to "string_printf".
5411
5412 2017-09-28  Alexander Shaposhnikov <alexander.v.shaposhnikov@gmail.com> (tiny patch)
5413
5414         * dwarf2read.c (open_and_init_dwp_file): Protect against dwp_file
5415         having NULL cus or tus.
5416
5417 2017-09-27  Ulrich Weigand  <uweigand@de.ibm.com>
5418
5419         * arm-tdep.c: (convert_from_extended): Remove.
5420         (convert_to_extended): Likewise.
5421         (arm_extract_return_value): Use convert_typed_floating.
5422         (arm_store_return_value): Likewise.
5423
5424         * sh-tdep.h (struct gdbarch_tdep): Add sh_littlebyte_bigword_type.
5425         * sh-tdep.c: Do not include "floatformat.h".
5426         (sh_littlebyte_bigword_type): New function.
5427         (sh_register_convert_to_virtual): Use convert_typed_floating.
5428         (sh_register_convert_to_raw): Likewise.
5429         * sh64-tdep.c: (struct gdbarch_tdep): Add sh_littlebyte_bigword_type.
5430         (sh64_littlebyte_bigword_type): New function.
5431         (sh64_extract_return_value): Use convert_typed_floating.
5432         (sh64_register_convert_to_virtual): Likewise.
5433         (sh64_register_convert_to_raw): Likewise.
5434
5435 2017-09-27  Ulrich Weigand  <uweigand@de.ibm.com>
5436
5437         * doublest.h (floatformat_from_type): Move to gdbtypes.h.
5438         * doublest.c (floatformat_from_type): Move to gdbtypes.c.
5439
5440         * gdbtypes.h (union type_specific): Make field floatformat hold
5441         just a single struct floatformat, not an array.
5442         (floatformat_from_type): Move here.
5443         * gdbtypes.c (floatformat_from_type): Move here.  Update to
5444         changed TYPE_FLOATFORMAT definition.
5445         (verify_floatformat): Update to changed TYPE_FLOATFORMAT.
5446         (recursive_dump_type): Likewise.
5447         (init_float_type): Install correct floatformat for byte order.
5448         (arch_float_type): Likewise.
5449
5450 2017-09-27  Ulrich Weigand  <uweigand@de.ibm.com>
5451
5452         * gdbtypes.c (init_type): Change incoming argument from
5453         length-in-bytes to length-in-bits.  Assert length is a
5454         multiple of TARGET_CHAR_BITS.
5455         (arch_type, arch_flags_type): Likewise.
5456         (init_integer_type): Update call to init_type.
5457         (init_character_type): Likewise.
5458         (init_boolean_type): Likewise.
5459         (init_float_type): Likewise.
5460         (init_decfloat_type): Likewise.
5461         (init_complex_type): Likewise.
5462         (init_pointer_type): Likewise.
5463         (objfile_type): Likewise.
5464         (arch_integer_type): Update call to arch_type.
5465         (arch_character_type): Likewise.
5466         (arch_boolean_type): Likewise.
5467         (arch_float_type): Likewise.
5468         (arch_decfloat_type): Likewise.
5469         (arch_complex_type): Likewise.
5470         (arch_pointer_type): Likewise.
5471         (gdbtypes_post_init): Likewise.
5472
5473         * dwarf2read.c (dwarf2_init_float_type): Update call to init_type.
5474         (read_base_type): Likewise.
5475         * mdebugread.c (basic_type): Likewise.
5476         * stabsread.c (dbx_init_float_type): Likewise.
5477         (rs6000_builtin_type): Likewise.
5478         (read_range_type): Likewise.  Also, fix call to init_integer_type
5479         with erroneous length argument.
5480
5481         * ada-lang.c (ada_language_arch_info): Update call to arch_type.
5482         * d-lang.c (build_d_types): Likewise.
5483         * f-lang.c (build_fortran_types): Likewise.
5484         * go-lang.c (build_go_types): Likewise.
5485         * opencl-lang.c (build_opencl_types): Likewise.
5486         * jit.c (finalize_symtab): Likewise.
5487         * gnu-v3-abi.c (build_gdb_vtable_type): Likewise.
5488         (build_std_type_info_type): Likewise.
5489         * target-descriptions.c (tdesc_gdb_type): Likewise.  Also,
5490         update call to arch_flags_type.
5491
5492         * linux-tdep.c (linux_get_siginfo_type_with_fields): Update call to
5493         arch_type.
5494         * fbsd-tdep.c (fbsd_get_siginfo_type): Likewise.
5495         * windows-tdep.c (windows_get_tlb_type): Likewise.
5496
5497         * avr-tdep.c (avr_gdbarch_init): Update call to arch_type.
5498         * ft32-tdep.c (ft32_gdbarch_init): Likewise.
5499         * m32c-tdep.c (make_types): Likewise.
5500         * rl78-tdep.c (rl78_gdbarch_init): Likewise.
5501         (rl78_psw_type): Update call to arch_flags_type.
5502         * m68k-tdep.c (m68k_ps_type): Update call to arch_flags_type.
5503         * rx-tdep.c (rx_psw_type): Likewise.
5504         (rx_fpsw_type): Likewise.
5505         * sparc-tdep.c (sparc_psr_type): Likewise.
5506         (sparc_fsr_type): Likewise.
5507         * sparc64-tdep.c (sparc64_pstate_type): Likewise.
5508         (sparc64_ccr_type): Likewise.
5509         (sparc64_fsr_type): Likewise.
5510         (sparc64_fprs_type): Likewise.
5511
5512 2017-09-27  Tom Tromey  <tom@tromey.com>
5513
5514         * findcmd.c (find_command): Constify.
5515
5516 2017-09-27  Tom Tromey  <tom@tromey.com>
5517
5518         * ada-tasks.c (task_command_1, task_command): Constify.
5519
5520 2017-09-27  Tom Tromey  <tom@tromey.com>
5521
5522         * symtab.c (maintenance_print_symbol_cache)
5523         (maintenance_flush_symbol_cache)
5524         (maintenance_print_symbol_cache_statistics): Constify.
5525
5526 2017-09-27  Tom Tromey  <tom@tromey.com>
5527
5528         * inferior.c (detach_inferior_command, kill_inferior_command)
5529         (inferior_command): Constify.
5530
5531 2017-09-27  Tom Tromey  <tom@tromey.com>
5532
5533         * regcache.c (regcache_print, maintenance_print_registers)
5534         (maintenance_print_raw_registers)
5535         (maintenance_print_cooked_registers)
5536         (maintenance_print_register_groups)
5537         (maintenance_print_remote_registers): Constify.
5538
5539 2017-09-27  Tom Tromey  <tom@tromey.com>
5540
5541         * printcmd.c (map_display_numbers, undisplay_command)
5542         (enable_disable_display_command, enable_display_command)
5543         (disable_display_command): Constify.
5544
5545 2017-09-27  Tom Tromey  <tom@tromey.com>
5546
5547         * breakpoint.h (delete_command): Don't declare.
5548         * breakpoint.c (delete_command, enable_once_command)
5549         (enable_count_command, enable_delete_command, breakpoint_1)
5550         (maintenance_info_breakpoints, stopin_command, stopat_command)
5551         (delete_command, delete_trace_command, save_breakpoints)
5552         (save_breakpoints_command, save_tracepoints_command): Constify.
5553
5554 2017-09-27  Tom Tromey  <tom@tromey.com>
5555
5556         * macrocmd.c (macro_expand_command, macro_expand_once_command)
5557         (skip_ws, extract_identifier, macro_define_command)
5558         (macro_undef_command, macro_list_command): Constify.
5559
5560 2017-09-27  Tom Tromey  <tom@tromey.com>
5561
5562         * infcmd.c (environment_info, set_environment_command)
5563         (unset_environment_command, path_info, info_proc_cmd_1)
5564         (info_proc_cmd_mappings, info_proc_cmd_stat)
5565         (info_proc_cmd_status, info_proc_cmd_cwd, info_proc_cmd_cmdline)
5566         (info_proc_cmd_exe, info_proc_cmd_all): Constify.
5567
5568 2017-09-27  Tom Tromey  <tom@tromey.com>
5569
5570         * i386-tdep.c (i386_mpx_info_bounds, i386_mpx_set_bounds):
5571         Constify.
5572
5573 2017-09-27  Tom Tromey  <tom@tromey.com>
5574
5575         * symfile-mem.c (add_symbol_file_from_memory_command): Constify.
5576
5577 2017-09-27  Tom Tromey  <tom@tromey.com>
5578
5579         * demangle.c (demangle_command): Constify.
5580
5581 2017-09-27  Tom Tromey  <tom@tromey.com>
5582
5583         * progspace.c (maintenance_info_program_spaces_command):
5584         Constify.
5585
5586 2017-09-27  Tom Tromey  <tom@tromey.com>
5587
5588         * compile/compile.c (check_raw_argument, compile_file_command)
5589         (compile_code_command, compile_print_command): Constify.
5590
5591 2017-09-27  Tom Tromey  <tom@tromey.com>
5592
5593         * reggroups.c (maintenance_print_reggroups): Constify.
5594
5595 2017-09-27  Tom Tromey  <tom@tromey.com>
5596
5597         * dwarf2read.c (save_gdb_index_command): Constify.
5598
5599 2017-09-27  Tom Tromey  <tom@tromey.com>
5600
5601         * stap-probe.c (info_probes_stap_command): Constify.
5602
5603 2017-09-27  Tom Tromey  <tom@tromey.com>
5604
5605         * fork-child.c (unset_exec_wrapper_command): Constify.
5606
5607 2017-09-27  Tom Tromey  <tom@tromey.com>
5608
5609         * btrace.c (get_uint, get_context_size, no_chunk)
5610         (maint_btrace_packet_history_cmd)
5611         (maint_btrace_clear_packet_history_cmd, maint_btrace_clear_cmd)
5612         (maint_info_btrace_cmd): Constify.
5613
5614 2017-09-27  Tom Tromey  <tom@tromey.com>
5615
5616         * reverse.c (delete_bookmark_command): Constify.
5617
5618 2017-09-27  Tom Tromey  <tom@tromey.com>
5619
5620         * remote.c (set_memory_packet_size)
5621         (set_memory_write_packet_size, show_memory_write_packet_size)
5622         (set_memory_read_packet_size, show_memory_read_packet_size)
5623         (compare_sections_command, packet_command, remote_put_command)
5624         (remote_get_command, remote_delete_command): Constify.
5625
5626 2017-09-27  Tom Tromey  <tom@tromey.com>
5627
5628         * mips-tdep.c (show_mipsfpu_command, set_mipsfpu_single_command)
5629         (set_mipsfpu_double_command, set_mipsfpu_none_command)
5630         (set_mipsfpu_auto_command): Constify.
5631
5632 2017-09-27  Tom Tromey  <tom@tromey.com>
5633
5634         * cli/cli-cmds.h (cd_command): Constify.
5635         * cli/cli-cmds.c (cd_command): Constify.
5636
5637 2017-09-27  Tom Tromey  <tom@tromey.com>
5638
5639         * thread.c (thread_name_command, thread_find_command): Constify.
5640
5641 2017-09-27  Tom Tromey  <tom@tromey.com>
5642
5643         * probe.c (enable_probes_command, disable_probes_command):
5644         Constify.
5645
5646 2017-09-27  Tom Tromey  <tom@tromey.com>
5647
5648         * symfile.c (symbol_file_command): Constify.
5649         * gdbcore.h (deprecated_file_changed_hook): Constify.
5650         * exec.c (deprecated_file_changed_hook, exec_file_command)
5651         (file_command): Constify.
5652         * defs.h (symbol_file_command): Constify.
5653
5654 2017-09-27  Tom Tromey  <tom@tromey.com>
5655
5656         * remote-fileio.c (set_system_call_allowed)
5657         (show_system_call_allowed): Constify.
5658
5659 2017-09-27  Tom Tromey  <tom@tromey.com>
5660
5661         * tracepoint.c (delete_trace_variable_command)
5662         (tfind_end_command, tfind_start_command, tfind_pc_command)
5663         (tfind_tracepoint_command, tfind_line_command)
5664         (tfind_range_command, tfind_outside_command): Constify.
5665
5666 2017-09-27  Tom Tromey  <tom@tromey.com>
5667
5668         * ax-gdb.c (maint_agent_printf_command, agent_command)
5669         (agent_eval_command): Constify.
5670
5671 2017-09-27  Tom Tromey  <tom@tromey.com>
5672
5673         * tracepoint.c (info_scope_command): Constify.
5674         * python/python.c (gdbpy_decode_line): Constify.
5675         * python/py-breakpoint.c (bppy_init): Constify.
5676         * mi/mi-cmd-break.c (mi_cmd_break_insert_1): Constify.
5677         * location.h: (new_linespec_location)
5678         (string_to_event_location_basic, string_to_event_location):
5679         Constify.
5680         * location.c (new_linespec_location)
5681         (string_to_event_location_basic, string_to_event_location):
5682         Constify.
5683         * linespec.h (decode_line_with_current_source)
5684         (decode_line_with_last_displayed, linespec_lex_to_end): Constify.
5685         * linespec.c (linespec_lex_to_end)
5686         (decode_line_with_current_source)
5687         (decode_line_with_last_displayed): Constify.
5688         * guile/scm-breakpoint.c (gdbscm_register_breakpoint_x):
5689         Constify.
5690         * cli/cli-cmds.c (edit_command, list_command): Constify.
5691         * breakpoint.h (until_break_command, watch_command_wrapper)
5692         (awatch_command_wrapper, rwatch_command_wrapper)
5693         (init_ada_exception_breakpoint): Constify.
5694         * breakpoint.c (break_command_1, dprintf_command)
5695         (break_range_command, watch_command_wrapper)
5696         (rwatch_command_wrapper, awatch_command_wrapper)
5697         (until_break_command, init_ada_exception_breakpoint)
5698         (strace_marker_create_sals_from_location, trace_command)
5699         (ftrace_command, strace_command, struct tracepoint): Constify.
5700         * ax-gdb.c (agent_command_1): Constify.
5701         * ada-lang.c (ada_exception_sal): Constify.
5702
5703 2017-09-27  Tom Tromey  <tom@tromey.com>
5704
5705         * record.c (cmd_record_delete, cmd_record_stop, cmd_record_save)
5706         (cmd_record_goto_begin, cmd_record_goto_end, get_insn_number)
5707         (get_context_size, no_chunk, get_insn_history_modifiers)
5708         (cmd_record_insn_history, get_call_history_modifiers)
5709         (cmd_record_call_history): Constify.
5710
5711 2017-09-27  Tom Tromey  <tom@tromey.com>
5712
5713         * source.c (show_substitute_path_command)
5714         (unset_substitute_path_command, set_substitute_path_command):
5715         Constify.
5716
5717 2017-09-27  Tom Tromey  <tom@tromey.com>
5718
5719         * typeprint.c (maintenance_print_type): Constify.
5720         * maint.c (maintenance_dump_me, maintenance_demangle)
5721         (maintenance_time_display, maintenance_info_sections)
5722         (maintenance_print_statistics, maintenance_deprecate)
5723         (maintenance_undeprecate): Constify.
5724         (maintenance_do_deprecate): Constify.  Use std::string.
5725         (maintenance_selftest): Constify.
5726         * gdbtypes.h (maintenance_print_type): Constify.
5727
5728 2017-09-27  Tom Tromey  <tom@tromey.com>
5729
5730         * hppa-tdep.c (unwind_command): Constify.
5731
5732 2017-09-27  Tom Tromey  <tom@tromey.com>
5733
5734         * target-descriptions.c (unset_tdesc_filename_cmd)
5735         (maint_print_c_tdesc_cmd, maintenance_check_xml_descriptions):
5736         Constify.
5737
5738 2017-09-27  Tom Tromey  <tom@tromey.com>
5739
5740         * dummy-frame.c (maintenance_print_dummy_frames): Constify.
5741
5742 2017-09-27  Tom Tromey  <tom@tromey.com>
5743
5744         * tui/tui.c (tui_enable_command, tui_disable_command): Constify.
5745
5746 2017-09-27  Tom Tromey  <tom@tromey.com>
5747
5748         * tui/tui-regs.c (tui_reg_command): Constify.
5749
5750 2017-09-27  Tom Tromey  <tom@tromey.com>
5751
5752         * skip.c (skip_file_command, skip_function_command)
5753         (skip_enable_command, skip_disable_command, skip_delete_command):
5754         Constify.
5755
5756 2017-09-27  Tom Tromey  <tom@tromey.com>
5757
5758         * record-btrace.c (cmd_record_btrace_bts_start)
5759         (cmd_record_btrace_pt_start): Constify.
5760
5761 2017-09-27  Tom Tromey  <tom@tromey.com>
5762
5763         * symmisc.c (maintenance_print_symbols)
5764         (maintenance_print_msymbols, maintenance_print_objfiles)
5765         (maintenance_info_symtabs, maintenance_check_symtabs)
5766         (maintenance_expand_symtabs, maintenance_info_line_tables):
5767         Constify.
5768
5769 2017-09-27  Tom Tromey  <tom@tromey.com>
5770
5771         * top.c (new_ui_command): Constify.
5772
5773 2017-09-27  Tom Tromey  <tom@tromey.com>
5774
5775         * symfile.c (add_symbol_file_command)
5776         (remove_symbol_file_command, list_overlays_command)
5777         (map_overlay_command, unmap_overlay_command)
5778         (overlay_auto_command, overlay_manual_command)
5779         (overlay_off_command, overlay_load_command): Constify.
5780
5781 2017-09-27  Tom Tromey  <tom@tromey.com>
5782
5783         * spu-tdep.c (info_spu_event_command, info_spu_signal_command)
5784         (info_spu_mailbox_command, info_spu_dma_command)
5785         (info_spu_proxydma_command): Constify.
5786
5787 2017-09-27  Tom Tromey  <tom@tromey.com>
5788
5789         * cli/cli-logging.c (set_logging_on, set_logging_off): Constify.
5790
5791 2017-09-27  Tom Tromey  <tom@tromey.com>
5792
5793         * cli/cli-script.c (user_defined_command): Constify.
5794
5795 2017-09-27  Tom Tromey  <tom@tromey.com>
5796
5797         * cli/cli-dump.c (dump_memory_command, dump_value_command)
5798         (dump_srec_memory, dump_srec_value, dump_ihex_memory)
5799         (dump_ihex_value, dump_verilog_memory, dump_verilog_value)
5800         (dump_tekhex_memory, dump_tekhex_value, dump_binary_memory)
5801         (dump_binary_value, append_binary_memory, append_binary_value):
5802         Constify.
5803         (struct dump_context) <func>: Constify.
5804         (add_dump_command): Update.
5805
5806 2017-09-27  Tom Tromey  <tom@tromey.com>
5807
5808         * cli/cli-cmds.c (show_version, show_configuration)
5809         (source_command, show_user): Constify.
5810
5811 2017-09-27  Tom Tromey  <tom@tromey.com>
5812
5813         * target.c (maintenance_print_target_stack): Constify.
5814
5815 2017-09-27  Tom Tromey  <tom@tromey.com>
5816
5817         * interps.c (interpreter_exec_cmd): Constify.
5818
5819 2017-09-27  Tom Tromey  <tom@tromey.com>
5820
5821         * record-full.c (cmd_record_full_restore): Constify.
5822
5823 2017-09-27  Tom Tromey  <tom@tromey.com>
5824
5825         * memattr.c (enable_mem_command, disable_mem_command)
5826         (delete_mem_command): Constify.
5827
5828 2017-09-27  Tom Tromey  <tom@tromey.com>
5829
5830         * value.c (show_convenience): Constify.
5831
5832 2017-09-27  Tom Tromey  <tom@tromey.com>
5833
5834         * gdbcore.h (core_file_command): Update.
5835         * corefile.c (core_file_command): Constify.
5836
5837 2017-09-27  Tom Tromey  <tom@tromey.com>
5838
5839         * user-regs.c (maintenance_print_user_registers): Constify.
5840
5841 2017-09-27  Tom Tromey  <tom@tromey.com>
5842
5843         * cp-namespace.c (maintenance_cplus_namespace): Constify.
5844
5845 2017-09-27  Tom Tromey  <tom@tromey.com>
5846
5847         * cp-support.c (first_component_command): Constify.
5848
5849 2017-09-27  Tom Tromey  <tom@tromey.com>
5850
5851         * psymtab.c (maintenance_print_psymbols)
5852         (maintenance_info_psymtabs, maintenance_check_psymtabs):
5853         Constify.
5854
5855 2017-09-27  Tom Tromey  <tom@tromey.com>
5856
5857         * windows-tdep.c (display_tib): Constify.
5858
5859 2017-09-27  Tom Tromey  <tom@tromey.com>
5860
5861         * linux-fork.c (delete_checkpoint_command)
5862         (detach_checkpoint_command): Constify.
5863
5864 2017-09-27  Tom Tromey  <tom@tromey.com>
5865
5866         * cp-abi.c (set_cp_abi_cmd, show_cp_abi_cmd): Constify.
5867
5868 2017-09-27  Tom Tromey  <tom@tromey.com>
5869
5870         * arc-tdep.c (dump_arc_instruction_command): Constify.
5871
5872 2017-09-27  Tom Tromey  <tom@tromey.com>
5873
5874         * valprint.c (set_radix, show_radix): Constify.
5875
5876 2017-09-27  Tom Tromey  <tom@tromey.com>
5877
5878         * dtrace-probe.c (info_probes_dtrace_command): Constify.
5879
5880 2017-09-27  Tom Tromey  <tom@tromey.com>
5881
5882         * command.h (not_just_help_class_command): Update.
5883         * cli/cli-decode.h (not_just_help_class_command): Update.
5884         * cli/cli-decode.c (not_just_help_class_command): Constify.
5885
5886 2017-09-27  Tom Tromey  <tom@tromey.com>
5887
5888         * gdb_bfd.c (maintenance_info_bfds): Constify.
5889
5890 2017-09-27  Tom Tromey  <tom@tromey.com>
5891
5892         * cli/cli-decode.c (add_cmd, set_cmd_cfunc): New function
5893         overloads.
5894         (do_add_cmd): Rename from add_cmd.  Don't call set_cmd_cfunc.
5895         (do_const_cfunc): New function.
5896         (cmd_cfunc_eq): New overload.
5897         (cli_user_command_p): Check do_const_cfunc.
5898         * cli/cli-decode.h (struct cmd_list_element) <function>: New field
5899         const_cfunc.
5900         * command.h (add_cmd): Add const overload and no-function
5901         overload.
5902         (set_cmd_cfunc): Add const overload.
5903         (cmd_const_cfunc_ftype): Declare.
5904         (cmd_cfunc_eq): Add const overload.
5905         * breakpoint.c, cli-cmds.c, cli-dump.c, guile/scm-cmd.c,
5906         python/py-cmd.c, target.c, tracepoint.c: Use no-function add_cmd
5907         overload.
5908
5909 2017-09-27  Tom Tromey  <tom@tromey.com>
5910
5911         * macroexp.c (get_next_token_for_substitution): New function.
5912         (substitute_args): Call it.  Check for __VA_OPT__.
5913
5914 2017-09-26  Walfred Tedeschi  <walfred.tedeschi@intel.com>
5915             Pedro Alves <palves@redhat.com>
5916
5917         * dwarf2read.c (dwarf2_cu): Remove field producer_is_icc and add
5918         producer_is_icc_lt_14.
5919         (producer_is_icc_lt_14): New function.
5920         (check_producer): Add code for checking version of ICC.
5921         (producer_is_icc): Move to producer.c.
5922         (read_structure_type): Restrict ICC workaround to ICC<14.
5923         * producer.c: Include selftest.h.
5924         (producer_is_icc, producer_parsing_tests, _initialize_producer):
5925         New functions.
5926         * producer.h (producer_is_icc): New declaration.
5927
5928 2017-09-26  Walfred Tedeschi  <walfred.tedeschi@intel.com>
5929
5930         * Makefile.in (SFILES): Add producer.c.
5931         (COMMON_OBS): Add producer.o
5932         * amd64-tdep.c (producer.h): Add new include.
5933         * dwarf2read.c (producer.h): Add new include.
5934         * producer.c: New file.
5935         * producer.h: New file.
5936         * utils.c (producer_is_gcc, producer_is_gcc_ge_4): Move to
5937         producer.c.
5938         * utils.h (producer_is_gcc, producer_is_gcc_ge_4): Move to
5939         producer.h.
5940
5941 2017-09-26  Matthias Klose  <doko@ubuntu.com>
5942
5943         * configure.ac: Search ncursesw before ncurses.
5944         Check ncursesw/ncurses.h before ncurses/ncurses.h.
5945         * gdb_curses.h: Include <ncursesw/ncurses.h>
5946         * config.in, configure: Regenerate.
5947
5948 2017-09-26  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
5949
5950         PR gdb/22185
5951         * configure.host <*-*-solaris2.[01], *-*-solaris2.[2-9]*>: Mark as
5952         obsolete.
5953         Use gdb_host sol2 for i[34567]86-*-solaris2*, x86_64-*-solaris2*.
5954         Remove i386sol2 support.
5955         * configure.nat <i386sol2>: Remove.
5956         <sol2-64>: Fold into ...
5957         <sol2>: ... this.
5958         Move common settings to default section.
5959         Add sol-thread.o.
5960         * configure.tgt <i[34567]86-*-solaris2.1[0-9]*,
5961         x86_64-*-solaris2.1[0-9]*>: Rename to ...
5962         <i[34567]86-*-solaris2*, x86_64-*-solaris2*>: ... this.
5963         <i[34567]86-*-solaris*>: Remove.
5964         <sparc-*-solaris2.[0-6], sparc-*-solaris2.[0-6].*>: Remove.
5965
5966         * configure.ac: Remove wctype in libw check.
5967         (_MSE_INT_H): Don't define on Solaris 7-9.
5968         <solaris*>: Remove libthread_db.so.1 check.
5969         * configure: Regenerate.
5970         * config.in: Regenerate.
5971
5972         * proc-service.c: Remove PROC_SERVICE_IS_OLD handling.
5973         (gdb_ps_prochandle_t, gdb_ps_read_buf_t, gdb_ps_write_buf_t)
5974         (gdb_ps_size_t): Remove.
5975         Use base types in users.
5976         * sol-thread.c: Likewise, also for gdb_ps_addr_t.
5977
5978         * NEWS (Changes since GDB 8.0): Document Solaris 2.0-9 removal.
5979
5980 2017-09-26  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
5981
5982         PR build/22206
5983         * sparc64-tdep.c (adi_tag_fd): Print pid as long.
5984         (adi_is_addr_mapped): Likewise.
5985         (PSR_ICC): Don't redefine.
5986         (PSR_IMPL): Likewise.
5987
5988 2017-09-25  Tom Tromey  <tom@tromey.com>
5989
5990         * regcache.c (regcache::dump): Use string_printf.
5991
5992 2017-09-25  Tom Tromey  <tom@tromey.com>
5993
5994         * regcache.c (class regcache_invalidator): New.
5995         (struct register_to_invalidate): Remove.
5996         (make_cleanup_regcache_invalidate): Remove.
5997         (regcache::raw_write): Use regcache_invalidator.
5998
5999 2017-09-25  Tom Tromey  <tom@tromey.com>
6000
6001         * spu-tdep.c (spu2ppu_sniffer): Update.
6002         * regcache.h (make_cleanup_regcache_xfree): Don't declare.
6003         * regcache.c (do_regcache_xfree, make_cleanup_regcache_xfree):
6004         Remove.
6005         * ppc-linux-tdep.c (ppu2spu_sniffer): Update.
6006         * mi/mi-main.c (mi_cmd_data_list_changed_registers): Update.
6007         * frame.h (frame_save_as_regcache): Return std::unique_ptr.
6008         * frame.c (frame_save_as_regcache): Return std::unique_ptr.
6009         (frame_pop): Update.
6010
6011 2017-09-25  Tom Tromey  <tom@tromey.com>
6012
6013         * spu-tdep.c (spu2ppu_dealloc_cache): Use delete.
6014         * regcache.h (regcache_xfree): Don't declare.
6015         * regcache.c (regcache_xfree): Remove.
6016         (do_regcache_xfree): Use delete.
6017         * ppc-linux-tdep.c (ppu2spu_dealloc_cache): Use delete.
6018         * linux-fork.c (free_fork): Use delete.
6019         (fork_save_infrun_state): Likewise.
6020         * jit.c (jit_dealloc_cache): Use delete.
6021         * infrun.c (discard_infcall_suspend_state): Use delete.
6022
6023 2017-09-25  Tom Tromey  <tom@tromey.com>
6024
6025         * regcache.h (regcache_xmalloc): Don't declare.
6026         (regcache_raw_set_cached_value): Update comment.
6027         * regcache.c (regcache_xmalloc): Remove.
6028         * ppc-linux-tdep.c (ppu2spu_sniffer): Use new.
6029         * jit.c (jit_frame_sniffer): Use new.
6030         * frame.c (frame_save_as_regcache): Use new.
6031
6032 2017-09-25  Andreas Arnez  <arnez@linux.vnet.ibm.com>
6033
6034         * NEWS: Advertise support for guarded-storage registers on IBM z.
6035
6036 2017-09-25  Andreas Arnez  <arnez@linux.vnet.ibm.com>
6037
6038         * s390-linux-nat.c (have_regset_gs): New static variable.
6039         (s390_linux_fetch_inferior_registers): Handle guarded-storage
6040         control block and guarded-storage broadcast control regsets.
6041         (s390_read_description): Detect whether the target has
6042         guarded-storage support, return appropriate tdesc.
6043         * s390-linux-tdep.c (features/s390-gs-linux64.c): New include.
6044         (features/s390x-gs-linux64.c): Likewise.
6045         (struct gdbarch_tdep) <have_gs>: New field.
6046         (s390_regmap_gs, s390_regmap_gsbc, s390_gs_regset)
6047         (s390_gsbc_regset): New variables.
6048         (s390_iterate_over_regset_sections): Iterate over s390_gs_regset
6049         and s390_gsbc_regset, if applicable.
6050         (s390_core_read_description): Check whether core file was from a
6051         target with guarded-storage support; include appropriate regsets.
6052         (s390_gdbarch_init): Add registers for guarded-storage support.
6053         (_initialize_s390_tdep): Initialize new target descriptions that
6054         include registers for guarded-storage support.
6055         * s390-linux-tdep.h (HWCAP_S390_GS, S390_GSD_REGNUM)
6056         (S390_GSSM_REGNUM, S390_GSEPLA_REGNUM)
6057         (S390_BC_GSD_REGNUM, S390_BC_GSSM_REGNUM): New defines.
6058         (S390_NUM_REGS): Adjust macro definition.
6059         (s390_gs_regset, s390_gsbc_regset, tdesc_s390_gs_linux64)
6060         (tdesc_s390x_gs_linux64): New declarations.
6061
6062 2017-09-25  Andreas Arnez  <arnez@linux.vnet.ibm.com>
6063
6064         * features/s390-gs-linux64.xml: New file.
6065         * features/s390-gs.xml: New file.
6066         * features/s390-gsbc.xml: New file.
6067         * features/s390x-gs-linux64.xml: New file.
6068         * features/Makefile (WHICH): Add s390-gs-linux64 and
6069         s390x-gs-linux64.
6070         (s390-gs-linux64-expedite, s390x-gs-linux64-expedite): New macros.
6071         (XMLTOC): Add s390-gs-linux64.xml and s390x-linux64.xml.
6072         * features/s390-gs-linux64.c: New generated file.
6073         * features/s390x-gs-linux64.c: New file.
6074         * regformats/s390-gs-linux64.dat: New file.
6075         * regformats/s390x-gs-linux64.dat: New file.
6076
6077 2017-09-23  Tom Tromey  <tom@tromey.com>
6078
6079         * defs.h (make_cleanup_override_quit_handler): Don't declare.
6080
6081 2017-09-22  Tom Tromey  <tom@tromey.com>
6082
6083         * utils.c (class scoped_input_handler) <m_quit_handler>: Change
6084         type to scoped_restore_tmpl.
6085         <scoped_input_handler>: Initialize m_quit_handler directly.
6086
6087 2017-09-22  Sergio Durigan Junior  <sergiodj@redhat.com>
6088
6089         * cli/cli-cmds.c (pwd_command): Use "getcwd (NULL, 0)".
6090         (cd_command): Likewise.  Free "current_directory" before
6091         assigning to it.
6092         * main.c (captured_main_1): Use "getcwd (NULL, 0)".
6093         * mi/mi-cmd-env.c (mi_cmd_env_pwd): Likewise.
6094         * top.c (gdb_dirbuf): Remove global declaration.
6095         * top.h (gdb_dirbuf): Likewise.
6096
6097 2017-09-22  Sergio Durigan Junior  <sergiodj@redhat.com>
6098
6099         * gnulib/aclocal.m4: Regenerate.
6100         * gnulib/config.in: Regenerate.
6101         * gnulib/configure: Regenerate.
6102         * gnulib/import/Makefile.am: Regenerate.
6103         * gnulib/import/Makefile.in: Regenerate.
6104         * gnulib/import/assure.h: New file.
6105         * gnulib/import/at-func.c: Likewise
6106         * gnulib/import/chdir-long.c: New file.
6107         * gnulib/import/chdir-long.h: New file.
6108         * gnulib/import/cloexec.c: New file.
6109         * gnulib/import/cloexec.h: New file.
6110         * gnulib/import/close.c: New file.
6111         * gnulib/import/closedir.c: New file.
6112         * gnulib/import/dirent-private.h: New file.
6113         * gnulib/import/dup-safer.c: New file.
6114         * gnulib/import/dup.c: New file.
6115         * gnulib/import/dup2.c: New file.
6116         * gnulib/import/error.c: New file.
6117         * gnulib/import/error.h: New file.
6118         * gnulib/import/exitfail.c: New file.
6119         * gnulib/import/exitfail.h: New file.
6120         * gnulib/import/fchdir.c: New file.
6121         * gnulib/import/fcntl.c: New file.
6122         * gnulib/import/fcntl.in.h: New file.
6123         * gnulib/import/fd-hook.c: New file.
6124         * gnulib/import/fd-hook.h: New file.
6125         * gnulib/import/fd-safer.c: New file.
6126         * gnulib/import/fdopendir.c: New file.
6127         * gnulib/import/filename.h: New file.
6128         * gnulib/import/filenamecat-lgpl.c: New file.
6129         * gnulib/import/filenamecat.h: New file.
6130         * gnulib/import/fstat.c: New file.
6131         * gnulib/import/fstatat.c: New file.
6132         * gnulib/import/getcwd-lgpl.c: New file.
6133         * gnulib/import/getcwd.c: New file.
6134         * gnulib/import/getdtablesize.c: New file.
6135         * gnulib/import/getlogin_r.c: New file.
6136         * gnulib/import/getprogname.c: New file.
6137         * gnulib/import/getprogname.h: New file.
6138         * gnulib/import/gettext.h: New file.
6139         * gnulib/import/glob-libc.h: New file.
6140         * gnulib/import/glob.c: New file.
6141         * gnulib/import/glob.in.h: New file.
6142         * gnulib/import/intprops.h: New file.
6143         * gnulib/import/m4/chdir-long.m4: New file.
6144         * gnulib/import/m4/close.m4: New file.
6145         * gnulib/import/m4/closedir.m4: New file.
6146         * gnulib/import/m4/d-ino.m4: New file.
6147         * gnulib/import/m4/d-type.m4: New file.
6148         * gnulib/import/m4/dup.m4: New file.
6149         * gnulib/import/m4/dup2.m4: New file.
6150         * gnulib/import/m4/error.m4: New file.
6151         * gnulib/import/m4/fchdir.m4: New file.
6152         * gnulib/import/m4/fcntl.m4: New file.
6153         * gnulib/import/m4/fcntl_h.m4: New file.
6154         * gnulib/import/m4/fdopendir.m4: New file.
6155         * gnulib/import/m4/filenamecat.m4: New file.
6156         * gnulib/import/m4/fstat.m4: New file.
6157         * gnulib/import/m4/fstatat.m4: New file.
6158         * gnulib/import/m4/getcwd-abort-bug.m4: New file.
6159         * gnulib/import/m4/getcwd-path-max.m4: New file.
6160         * gnulib/import/m4/getcwd.m4: New file.
6161         * gnulib/import/m4/getdtablesize.m4: New file.
6162         * gnulib/import/m4/getlogin_r.m4: New file.
6163         * gnulib/import/m4/getprogname.m4: New file.
6164         * gnulib/import/m4/glob.m4: New file.
6165         * gnulib/import/m4/gnulib-cache.m4: Regenerate.
6166         * gnulib/import/m4/gnulib-comp.m4: Regenerate.
6167         * gnulib/import/m4/mempcpy.m4: New file.
6168         * gnulib/import/m4/memrchr.m4: New file.
6169         * gnulib/import/m4/mode_t.m4: New file.
6170         * gnulib/import/m4/msvc-inval.m4: New file.
6171         * gnulib/import/m4/msvc-nothrow.m4: New file.
6172         * gnulib/import/m4/open.m4: New file.
6173         * gnulib/import/m4/openat.m4: New file.
6174         * gnulib/import/m4/opendir.m4: New file.
6175         * gnulib/import/m4/readdir.m4: New file.
6176         * gnulib/import/m4/realloc.m4: New file.
6177         * gnulib/import/m4/rewinddir.m4: New file.
6178         * gnulib/import/m4/save-cwd.m4: New file.
6179         * gnulib/import/m4/strdup.m4: New file.
6180         * gnulib/import/m4/strerror.m4: New file.
6181         * gnulib/import/m4/unistd-safer.m4: New file.
6182         * gnulib/import/mempcpy.c: New file.
6183         * gnulib/import/memrchr.c: New file.
6184         * gnulib/import/msvc-inval.c: New file.
6185         * gnulib/import/msvc-inval.h: New file.
6186         * gnulib/import/msvc-nothrow.c: New file.
6187         * gnulib/import/msvc-nothrow.h: New file.
6188         * gnulib/import/open.c: New file.
6189         * gnulib/import/openat-die.c: New file.
6190         * gnulib/import/openat-priv.h: New file.
6191         * gnulib/import/openat-proc.c: New file.
6192         * gnulib/import/openat.c: New file.
6193         * gnulib/import/openat.h: New file.
6194         * gnulib/import/opendir.c: New file.
6195         * gnulib/import/pipe-safer.c: New file.
6196         * gnulib/import/readdir.c: New file.
6197         * gnulib/import/realloc.c: New file.
6198         * gnulib/import/rewinddir.c: New file.
6199         * gnulib/import/save-cwd.c: New file.
6200         * gnulib/import/save-cwd.h: New file.
6201         * gnulib/import/strdup.c: New file.
6202         * gnulib/import/strerror-override.c: New file.
6203         * gnulib/import/strerror-override.h: New file.
6204         * gnulib/import/strerror.c: New file.
6205         * gnulib/import/unistd--.h: New file.
6206         * gnulib/import/unistd-safer.h: New file.
6207         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add
6208         "getcwd" and "glob".
6209         * ser-tcp.c: Undefine "close" before redefining it.
6210
6211 2017-09-21  Simon Marchi  <simon.marchi@ericsson.com>
6212
6213         * guile/scm-value.c (gdbscm_value_address): Initialize address,
6214         get rid of res_val.
6215
6216 2017-09-22  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
6217
6218         * configure.nat <i386sol2,i386>: Add fork-inferior.o to NATDEPFILES.
6219         <sol2,sparc>: Likewise.
6220         <sol2-64,i386>: Likewise.
6221
6222         * warning.m4 (AM_GDB_WARNINGS): Disable -Wunknown-pragmas,
6223         -Wdeprecated-declarations on *-*-solaris*.
6224         * configure: Regenerate.
6225
6226         * procfs.c: Include "nat/inferior.h".
6227         (procfs_info_proc): Fix typo.
6228
6229 2017-09-21  Kevin Buettner  <kevinb@redhat.com>
6230
6231         * remote.c (vector): Include.
6232         (struct private_thread_info): Add field, thread_handle.
6233         (free_private_thread_info): Deallocate storage associated with
6234         thread handle.
6235         (get_private_info_thread): Initialize `thread_handle' field.
6236         (struct thread_item): Add field, thread_handle.
6237         (clear_threads_listing_context): Deallocate storage associated
6238         with thread handle.
6239         (start_thread): Add support for "handle" attribute.
6240         (thread_attributes): Add "handle".
6241         (remote_get_threads_with_qthreadinfo): Initialize thread_handle
6242         field.
6243         (remote_update_thread_list): Update thread_handle.
6244         (remote_thread_handle_to_thread_info): New function.
6245         (init_remote_ops): Initialize to_thread_handle_to_thread_info.
6246
6247 2017-09-21  Kevin Buettner  <kevinb@redhat.com>
6248
6249         * python/py-inferior.c (gdbpy_thread_from_thread_handle): New
6250         function.
6251         (inferior_object_methods): Add gdbpy_thread_from_thread_handle.
6252         * python/python-internal.h (thread_object_type): Declare.
6253
6254 2017-09-21  Kevin Buettner  <kevinb@redhat.com>
6255
6256         * target.h (struct target_ops): Add to_thread_handle_to_thread_info.
6257         (target_thread_handle_to_thread_info): Declare.
6258         * target.c (target_thread_handle_to_thread_info): New function.
6259         * target-delegates.c: Regenerate.
6260         * gdbthread.h (find_thread_by_handle): Declare.
6261         * thread.c (find_thread_by_handle): New function.
6262         * linux-thread-db.c (thread_db_thread_handle_to_thread_info): New
6263         function.
6264         (init_thread_db_ops): Register thread_db_thread_handle_to_thread_info.
6265
6266 2017-09-21  Simon Marchi  <simon.marchi@ericsson.com>
6267
6268         * nat/linux-waitpid.c (linux_debug): Add ATTRIBUTE_PRINTF.
6269
6270 2017-09-21  Simon Marchi  <simon.marchi@ericsson.com>
6271
6272         * microblaze-tdep.c (microblaze_debug): Add ATTRIBUTE_PRINTF.
6273
6274 2017-09-21  Yao Qi  <yao.qi@linaro.org>
6275
6276         * configure.tgt (aarch64*-*-freebsd*): Add fbsd-tdep.o solib-svr4.o
6277         to gdb_target_obs.
6278
6279 2017-09-20  Tom Tromey  <tom@tromey.com>
6280
6281         * breakpoint.c (struct counted_command_line): Remove.
6282         (breakpoint_commands): Update.
6283         (alloc_counted_command_line, incref_counted_command_line)
6284         (decref_counted_command_line, do_cleanup_counted_command_line)
6285         (make_cleanup_decref_counted_command_line): Remove.
6286         (breakpoint_set_commands, commands_command_1, ~bpstats, bpstats)
6287         (bpstat_clear_actions, bpstat_do_actions_1, watchpoint_check)
6288         (bpstat_stop_status, print_one_breakpoint_location, ~breakpoint)
6289         (save_breakpoints): Update.
6290         * breakpoint.h (counted_command_line): Now a typedef to
6291         shared_ptr.
6292         (struct breakpoint) <commands>: Now a counted_command_line.
6293         (struct bpstats) <command>: Likewise.
6294
6295 2017-09-20  Tom Tromey  <tom@tromey.com>
6296
6297         * breakpoint.c (struct commands_info, do_map_commands_command):
6298         Remove.
6299         (commands_command_1): Update.
6300         (iterate_over_related_breakpoints): Take a function_view.
6301         (do_delete_breakpoint, do_map_delete_breakpoint): Remove.
6302         (delete_command): Update.
6303         (map_breakpoint_numbers): Take a function_view.
6304         (do_disable_breakpoint, do_map_delete_breakpoint): Remove.
6305         (disable_command): Update.
6306         (do_enable_breakpoint, do_map_enable_breakpoint): Remove.
6307         (enable_command): Update.
6308         (struct disp_data, do_enable_breakpoint_disp)
6309         (do_map_enable_once_breakpoint, do_map_enable_count_breakpoint)
6310         (do_map_enable_delete_breakpoint): Remove.
6311         (enable_once_command, enable_count_command, enable_delete_command)
6312         (delete_trace_variable_command): Update.
6313
6314 2017-09-20  Tom Tromey  <tom@tromey.com>
6315
6316         * breakpoint.c (~bpstats): Rename from bpstat_free.  Update.
6317         (bpstat_clear): Use delete.
6318         (bpstats): New constructors.
6319         (bpstat_copy, bpstat_stop_status): Use new.
6320         (dprintf_after_condition_true): Update.
6321         * breakpoint.h (bpstats::bpstats): Add constructors.
6322         (bpstats::~bpstats): Add destructor.
6323
6324 2017-09-20  Pedro Alves  <palves@redhat.com>
6325
6326         * eval.c (make_params): Delete, refactored as ...
6327         (class fake_method): ... this new type's ctor.
6328         (fake_method::~fake_method): New.
6329         (evaluate_subexp_standard): Use 'fake_method'.
6330
6331 2017-09-20  Tom Tromey  <tom@tromey.com>
6332
6333         * windows-nat.c (get_windows_debug_event, windows_wait)
6334         (do_initial_windows_stuff, windows_attach): Update.
6335         * utils.c (vwarning, internal_vproblem): Update.
6336         (ui_unregister_input_event_handler_cleanup)
6337         (prepare_to_handle_input): Remove.
6338         (class scoped_input_handler): New.
6339         (defaulted_query, prompt_for_continue): Update.
6340         * tui/tui-hooks.c (tui_refresh_frame_and_register_information):
6341         Update.
6342         * top.c (undo_terminal_modifications_before_exit): Update.
6343         * target/target.h (target_terminal_init, target_terminal_inferior)
6344         (target_terminal_ours): Don't declare.
6345         (class target_terminal): New.
6346         * target.h (target_terminal_is_inferior, target_terminal_is_ours)
6347         (target_terminal_ours_for_output)
6348         (make_cleanup_restore_target_terminal): Don't declare.
6349         (target_terminal_info): Remove.
6350         * target.c (enum terminal_state, terminal_state): Remove.
6351         (target_terminal::terminal_state): Define.
6352         (target_terminal::init): Rename from target_terminal_init.
6353         (target_terminal::inferior): Rename from
6354         target_terminal_inferior.
6355         (target_terminal::ours): Rename from target_terminal_ours.
6356         (target_terminal::ours_for_output): Rename from
6357         target_terminal_ours_for_output.
6358         (target_terminal::info): New method.
6359         (cleanup_restore_target_terminal)
6360         (make_cleanup_restore_target_terminal): Remove.
6361         * solib.c (handle_solib_event): Update.
6362         * remote.c (remote_serial_quit_handler): Update.
6363         (remote_terminal_inferior, remote_wait_as): Update.
6364         * record-full.c (record_full_wait_1): Update.
6365         * nto-procfs.c (procfs_create_inferior): Update.
6366         * nat/fork-inferior.c (startup_inferior): Update.
6367         * mi/mi-interp.c (mi_new_thread, mi_thread_exit)
6368         (mi_record_changed, mi_inferior_added, mi_inferior_appeared)
6369         (mi_inferior_exit, mi_inferior_removed, mi_traceframe_changed)
6370         (mi_tsv_created, mi_tsv_deleted, mi_tsv_modified)
6371         (mi_breakpoint_created, mi_breakpoint_deleted)
6372         (mi_breakpoint_modified, mi_on_resume, mi_solib_loaded)
6373         (mi_solib_unloaded, mi_command_param_changed, mi_memory_changed)
6374         (mi_user_selected_context_changed, report_initial_inferior):
6375         Update.
6376         * linux-nat.c (linux_nat_attach, linux_nat_terminal_ours)
6377         (linux_nat_terminal_inferior): Update.
6378         * infrun.c (follow_fork_inferior)
6379         (handle_vfork_child_exec_or_exit, do_target_resume)
6380         (check_curr_ui_sync_execution_done, handle_inferior_event_1)
6381         (handle_signal_stop, maybe_remove_breakpoints, normal_stop):
6382         Update.
6383         * inflow.c (child_terminal_init, info_terminal_command): Update.
6384         * infcmd.c (post_create_inferior, continue_1, prepare_one_step)
6385         (attach_command): Update.
6386         * infcall.c (call_thread_fsm_should_stop): Update.
6387         * gnu-nat.c (gnu_attach): Update.
6388         * extension.c (struct active_ext_lang_state)
6389         (restore_active_ext_lang): Update.
6390         * exceptions.c (print_flush): Update.
6391         * event-top.c (async_enable_stdin, default_quit_handler): Update.
6392         (struct quit_handler_cleanup_data, restore_quit_handler)
6393         (restore_quit_handler_dtor, make_cleanup_override_quit_handler):
6394         Remove.
6395         * cp-support.c (gdb_demangle): Update.
6396         * breakpoint.c (update_inserted_breakpoint_locations)
6397         (insert_breakpoint_locations, handle_jit_event)
6398         (disable_breakpoints_in_unloaded_shlib): Update.
6399         * annotate.c (annotate_breakpoints_invalid)
6400         (annotate_frames_invalid): Update.
6401
6402 2017-09-20  Tom Tromey  <tom@tromey.com>
6403
6404         * main.c (catch_command_errors): Rename from
6405         catch_command_errors_const.
6406         (captured_main_1): Update.
6407
6408 2017-09-20  Pedro Alves  <palves@redhat.com>
6409
6410         * cli/cli-cmds.c (list_command): Use print_sal_location.
6411         (print_sal_location): New function.
6412         (ambiguous_line_spec): Use print_sal_location.
6413         * linespec.c (symbol_to_sal): Record the symbol in the sal.
6414         * symtab.c (find_function_start_sal): Likewise.
6415         * symtab.h (symtab_and_line::symbol): New field.
6416
6417 2017-09-20  Pedro Alves  <palves@redhat.com>
6418
6419         * linespec.c (minsym_found): Handle non-text minsyms.
6420         (symbol_to_sal): Record a sal.pc for non-block, non-label symbols.
6421
6422 2017-09-20  Walfred Tedeschi  <walfred.tedeschi@intel.com>
6423
6424         * features/Makefile (i386-avx-mpx-avx512-pku.dat): Add missing
6425         backslash.
6426
6427 2017-09-20  Walfred Tedeschi  <walfred.tedeschi@intel.com>
6428
6429         * gdb.arch/i386-avx512.c (move_zmm_data_to_reg): Use
6430         vmovups instead vmovaps.
6431         (move_zmm_data_to_memory): Use vmovups instead vmovaps.
6432
6433 2017-09-19  John Baldwin  <jhb@FreeBSD.org>
6434
6435         * NEWS (Changes since GDB 8.0): Add starti.
6436         * infcmd.c (enum run_break): New.
6437         (run_command_1): Queue pending event for RUN_STOP_AT_FIRST_INSN
6438         case.
6439         (run_command): Use enum run_how.
6440         (start_command): Likewise.
6441         (starti_command): New function.
6442         (RUN_ARGS_HELP): New macro.
6443         (_initialize_infcmd): Use RUN_ARGS_HELP for run and start
6444         commands.  Add starti command.
6445
6446 2017-09-19  Yao Qi  <yao.qi@linaro.org>
6447
6448         * Makefile.in (monitor.o): Remove the rule.
6449
6450 2017-09-19  Yao Qi  <yao.qi@linaro.org>
6451
6452         * annotate.h (struct annotate_arg_emitter): Use
6453         DISABLE_COPY_AND_ASSIGN.
6454         * common/refcounted-object.h (refcounted_object): Likewise.
6455         * completer.h (struct completion_result): Likewise.
6456         * dwarf2read.c (struct dwarf2_per_objfile): Likewise.
6457         * filename-seen-cache.h (filename_seen_cache): Likewise.
6458         * gdbcore.h (thread_section_name): Likewise.
6459         * gdb_regex.h (compiled_regex): Likewise.
6460         * gdbthread.h (scoped_restore_current_thread): Likewise.
6461         * inferior.h (scoped_restore_current_inferior): Likewise.
6462         * jit.c (jit_reader): Likewise.
6463         * linespec.h (struct linespec_result): Likewise.
6464         * mi/mi-parse.h (struct mi_parse): Likewise.
6465         * nat/fork-inferior.c (execv_argv): Likewise.
6466         * progspace.h (scoped_restore_current_program_space): Likewise.
6467         * python/python-internal.h (class gdbpy_enter): Likewise.
6468         * regcache.h (regcache): Likewise.
6469         * target-descriptions.c (struct tdesc_reg): Likewise.
6470         (struct tdesc_type): Likewise.
6471         (struct tdesc_feature): Likewise.
6472         * ui-out.h (ui_out_emit_type): Likewise.
6473
6474 2017-09-18  Simon Marchi  <simon.marchi@ericsson.com>
6475
6476         * dwarf2expr.c (dwarf_expr_context::execute_stack_op): Remove
6477         label abort_expression.
6478
6479 2017-09-16  Simon Marchi  <simon.marchi@ericsson.com>
6480
6481         * common/buffer.c (buffer_xml_printf): Adjust.
6482         * common/xml-utils.c (xml_escape_text): Change return type to
6483         std::string, update code accordingly.
6484         * common/xml-utils.h (xml_escape_text): Change return type to
6485         std::string.
6486         * rs6000-aix-tdep.c (rs6000_aix_shared_library_to_xml): Adjust.
6487         * windows-tdep.c (windows_xfer_shared_library): Adjust.
6488         * unittests/xml-utils-selftests.c (test_xml_escape_text):
6489         Adjust.
6490
6491 2017-09-16  Simon Marchi  <simon.marchi@ericsson.com>
6492
6493         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add new source file.
6494         (SUBDIR_UNITTESTS_OBS): Add new object file.
6495         * unittests/xml-utils-selftests.c: New file.
6496
6497 2017-09-16  Simon Marchi  <simon.marchi@ericsson.com>
6498
6499         * common/selftest.h (selftest): New struct/interface.
6500         (register_test): Add name parameter, add new overload.
6501         (run_tests): Add filter parameter.
6502         (for_each_selftest_ftype): New typedef.
6503         (for_each_selftest): New declaration.
6504         * common/selftest.c (tests): Change type to
6505         map<string, unique_ptr<selftest>>.
6506         (simple_selftest): New struct.
6507         (register_test): New function.
6508         (register_test): Add name parameter and use it.
6509         (run_tests): Add filter parameter and use it.  Add prints.
6510         Adjust to vector -> map change.
6511         * aarch64-tdep.c (_initialize_aarch64_tdep): Add names when
6512         registering selftests.
6513         * arm-tdep.c (_initialize_arm_tdep): Likewise.
6514         * disasm-selftests.c (_initialize_disasm_selftests): Likewise.
6515         * dwarf2-frame.c (_initialize_dwarf2_frame): Likewise.
6516         * dwarf2loc.c (_initialize_dwarf2loc): Likewise.
6517         * findvar.c (_initialize_findvar): Likewise.
6518         * gdbarch-selftests.c (_initialize_gdbarch_selftests): Likewise.
6519         * maint.c (maintenance_selftest): Update call to run_tests.
6520         (maintenance_info_selftests): New function.
6521         (_initialize_maint_cmds): Register "maintenance info selftests"
6522         command.  Update "maintenance selftest" doc.
6523         * regcache.c (_initialize_regcache): Add names when registering
6524         selftests.
6525         * rust-exp.y (_initialize_rust_exp): Likewise.
6526         * selftest-arch.c (gdbarch_selftest): New struct.
6527         (gdbarch_tests): Remove.
6528         (register_test_foreach_arch): Add name parameter.  Call
6529         register_test.
6530         (tests_with_arch): Remove, move most content to
6531         gdbarch_selftest::operator().
6532         (_initialize_selftests_foreach_arch): Remove.
6533         * selftest-arch.h (register_test_foreach_arch): Add name
6534         parameter.
6535         (run_tests_with_arch): New declaration.
6536         * utils-selftests.c (_initialize_utils_selftests): Add names
6537         when registering selftests.
6538         * utils.c (_initialize_utils): Likewise.
6539         * unittests/array-view-selftests.c
6540         (_initialize_array_view_selftests): Likewise.
6541         * unittests/environ-selftests.c (_initialize_environ_selftests):
6542         Likewise.
6543         * unittests/function-view-selftests.c
6544         (_initialize_function_view_selftests): Likewise.
6545         * unittests/offset-type-selftests.c
6546         (_initialize_offset_type_selftests): Likewise.
6547         * unittests/optional-selftests.c
6548         (_initialize_optional_selftests): Likewise.
6549         * unittests/scoped_restore-selftests.c
6550         (_initialize_scoped_restore_selftests): Likewise.
6551         * NEWS: Document "maintenance selftest" and "maint info
6552         selftests".
6553
6554 2017-09-16  Simon Marchi  <simon.marchi@ericsson.com>
6555
6556         * mi/mi-main.c (mi_load_progress): Restore current_uiout using a
6557         scoped_restore.
6558
6559 2017-09-16  Simon Marchi  <simon.marchi@ericsson.com>
6560
6561         * mi/mi-main.c (mi_load_progress): Make uiout variable
6562         a unique_ptr.
6563
6564 2017-09-15  Pedro Alves  <palves@redhat.com>
6565
6566         * compile/compile-c-types.c (convert_enum, convert_int)
6567         (convert_float): Adjust to refer to int_type_v0 and float_type_v0.
6568
6569 2017-09-15  Simon Marchi  <simon.marchi@ericsson.com>
6570
6571         * dwarf2read.c (copy_string): Remove.
6572         (parse_macro_definition): Replace copy_string with savestring.
6573
6574 2017-09-15  Yao Qi  <yao.qi@linaro.org>
6575
6576         * configure.tgt (i[34567]86-*-darwin*): Append amd64.o to
6577         gdb_target_obs.
6578         (i[34567]86-*-solaris2.1[0-9]* | x86_64-*-solaris2.1[0-9]*):
6579         Likewise.
6580         (i[34567]86-*-linux*): Likewise.
6581
6582 2017-09-14  Simon Marchi  <simon.marchi@ericsson.com>
6583
6584         * dwarf2expr.h (dwarf_stack_value): Add constructor.
6585         (dwarf_expr_context) <~dwarf_expr_context>: Define as default.
6586         <stack>: Change type to std::vector.
6587         <stack_len, stack_allocated>: Remove.
6588         <grow_stack>: Remove.
6589         * dwarf2expr.c (dwarf_expr_context::dwarf_expr_context): Adjust.
6590         (dwarf_expr_context::~dwarf_expr_context): Remove.
6591         (dwarf_expr_context::grow_stack): Remove.
6592         (dwarf_expr_context::push): Adjust.
6593         (dwarf_expr_context::pop): Adjust.
6594         (dwarf_expr_context::fetch): Adjust.
6595         (dwarf_expr_context::fetch_in_stack_memory): Adjust.
6596         (dwarf_expr_context::stack_empty_p): Adjust.
6597         (dwarf_expr_context::execute_stack_op): Adjust.
6598
6599 2017-09-14  Simon Marchi  <simon.marchi@ericsson.com>
6600
6601         * dwarf2expr.h (dwarf_expr_context) <stack_empty_p>: Change
6602         return type to bool.
6603         * dwarf2expr.c (dwarf_expr_context::stack_empty_p): Likewise.
6604
6605 2017-09-14  Simon Marchi  <simon.marchi@ericsson.com>
6606
6607         * dwarf2expr.h (dwarf_expr_piece) <v.mem.in_stack_memory>:
6608         Change type to bool.
6609         (dwarf_stack_value) <in_stack_memory>: Likewise.
6610         (dwarf_expr_context) <push_address>: Change parameter type to
6611         bool.
6612         <fetch_in_stack_memory>: Change return type to bool.
6613         <push>: Change parameter type to bool.
6614         * dwarf2expr.c (dwarf_expr_context::push): Change parameter type
6615         to bool.
6616         (dwarf_expr_context::push_address): Likewise.
6617         (dwarf_expr_context::fetch_in_stack_memory): Change return type
6618         to bool.
6619         (dwarf_expr_context::execute_stack_op): Adjust.
6620         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Adjust.
6621
6622 2017-09-14  Simon Marchi  <simon.marchi@ericsson.com>
6623
6624         * dwarf2expr.h (struct dwarf_expr_piece): Move up.
6625         (struct dwarf_expr_context) <n_pieces>: Remove.
6626         <pieces>: Change type to std::vector.
6627         * dwarf2expr.c (dwarf_expr_context::dwarf_expr_context): Adjust.
6628         (dwarf_expr_context::~dwarf_expr_context): Don't manually free
6629         pieces.
6630         (dwarf_expr_context::add_piece): Adjust.
6631         * dwarf2loc.c (struct piece_closure): Initialize fields.
6632         <n_pieces>: Remove.
6633         <pieces>: Change type to std::vector.
6634         (allocate_piece_closure): Adjust, change parameter to
6635         std::vector rvalue and std::move it to piece_closure.
6636         (rw_pieced_value): Adjust.
6637         (check_pieced_synthetic_pointer): Adjust.
6638         (indirect_synthetic_pointer): Adjust.
6639         (coerce_pieced_ref): Adjust.
6640         (free_pieced_value_closure):  Adjust.  Use delete to free
6641         piece_closure.
6642         (dwarf2_evaluate_loc_desc_full): Adjust.  std::move ctx.pieces
6643         to allocate_piece_closure.
6644         (dwarf2_loc_desc_get_symbol_read_needs): Adjust.
6645
6646 2017-09-12  Simon Marchi  <simon.marchi@ericsson.com>
6647
6648         * probe.h (probe_ops_cp): Remove typedef.
6649         (DEF_VEC_P (probe_ops_cp)): Remove.
6650         (all_probe_ops): Change type to std::vector.
6651         * probe.c (info_probes_for_ops): Adjust to vector change.
6652         (probe_linespec_to_ops): Likewise.
6653         (all_probe_ops): Change type to std::vector.
6654         (_initialize_probe): Adjust to vector change.
6655         * dtrace-probe.c (_initialize_dtrace_probe): Likewise.
6656         * elfread.c (elf_get_probes): Likewise.
6657         * stap-probe.c (_initialize_stap_probe): Likewise.
6658
6659 2017-09-12  Simon Marchi  <simon.marchi@ericsson.com>
6660
6661         * probe.h (struct bound_probe): Define constructors.
6662         * probe.c (bound_probe_s): Remove typedef.
6663         (DEF_VEC_O (bound_probe_s)): Remove VEC.
6664         (collect_probes): Change return type to std::vector, remove
6665         cleanup.
6666         (compare_probes): Return bool, change parameter type.  Change
6667         semantic to "less than".
6668         (gen_ui_out_table_header_info): Change parameter to std::vector
6669         and update.
6670         (exists_probe_with_pops): Likewise.
6671         (info_probes_for_ops): Update to std::vector change.
6672         (enable_probes_command): Likewise.
6673         (disable_probes_command): Likewise.
6674
6675 2017-09-12  Simon Marchi  <simon.marchi@ericsson.com>
6676
6677         * probe.h (struct probe_ops) <get_probes>: Change parameter from
6678         vec to std::vector.
6679         * probe.c (parse_probes_in_pspace): Update.
6680         (find_probes_in_objfile): Update.
6681         (find_probe_by_pc): Update.
6682         (collect_probes): Update.
6683         (probe_any_get_probes): Update.
6684         * symfile.h (struct sym_probe_fns) <sym_get_probes> Change
6685         return type to reference to std::vector.
6686         * dtrace-probe.c (dtrace_process_dof_probe): Change parameter to
6687         std::vector and update.
6688         (dtrace_process_dof): Likewise.
6689         (dtrace_get_probes): Likewise.
6690         * elfread.c (elf_get_probes): Change return type to std::vector,
6691         store an std::vector in bfd_data.
6692         (probe_key_free): Update to std::vector.
6693         * stap-probe.c (handle_stap_probe): Change parameter to
6694         std::vector and update.
6695         (stap_get_probes): Likewise.
6696         * symfile-debug.c (debug_sym_get_probes): Change return type to
6697         std::vector and update.
6698
6699 2017-09-11  Tom Tromey  <tom@tromey.com>
6700
6701         * breakpoint.c (program_breakpoint_here_p): Update.
6702         * target.c (make_scoped_restore_show_memory_breakpoints): Rename
6703         from make_show_memory_breakpoints_cleanup.  Return a
6704         scoped_restore_tmpl<int>.
6705         (restore_show_memory_breakpoints): Remove.
6706         * ppc-linux-tdep.c (ppc_linux_memory_remove_breakpoint): Update.
6707         * mem-break.c (memory_validate_breakpoint): Update.
6708         * ia64-tdep.c (ia64_memory_insert_breakpoint): Update.
6709         (ia64_memory_remove_breakpoint): Update.
6710         (ia64_breakpoint_from_pc): Update.
6711         * target.h (make_scoped_restore_show_memory_breakpoints): Rename
6712         from make_show_memory_breakpoints_cleanup.
6713
6714 2017-09-11  Tom Tromey  <tom@tromey.com>
6715
6716         * d-namespace.c (d_lookup_symbol): Use std::string.
6717         (find_symbol_in_baseclass): Likewise.
6718
6719 2017-09-11  Tom Tromey  <tom@tromey.com>
6720
6721         * ctf.c (ctf_start): Use std::string.
6722
6723 2017-09-11  Tom Tromey  <tom@tromey.com>
6724
6725         * ada-lang.c (is_known_support_routine): Update.
6726         (ada_unhandled_exception_name_addr_from_raise): Update.
6727         * guile/scm-frame.c (gdbscm_frame_name): Update.
6728         * python/py-frame.c (frapy_name): Update.
6729         (frapy_function): Update.
6730         * stack.h (find_frame_funname): Update.
6731         * stack.c (find_frame_funname): Return unique_xmalloc_ptr.
6732         (print_frame): Update.
6733
6734 2017-09-11  Tom Tromey  <tom@tromey.com>
6735
6736         * findcmd.c (put_bits): Take a gdb::byte_vector.
6737         (parse_find_args): Return gdb::byte_vector.  "args" now const.
6738         Remove "pattern_bufp" and "pattern_lenp" parameters.  Remove
6739         cleanups.
6740         (find_command): Update.
6741
6742 2017-09-11  Tom Tromey  <tom@tromey.com>
6743
6744         * cli/cli-script.c (class scoped_restore_hook_in): New.
6745         (clear_hook_in_cleanup): Remove.
6746         (execute_cmd_pre_hook, execute_cmd_post_hook): Use
6747         scoped_restore_hook_in.
6748
6749 2017-09-11  Tom Tromey  <tom@tromey.com>
6750
6751         * cli/cli-script.c (restore_interp): Remove.
6752         (read_command_lines): Use scoped_restore_interp.
6753         * interps.c (scoped_restore_interp::set_temp): Rename from
6754         interp_set_temp.
6755         * interps.h (class scoped_restore_interp): New.
6756         (interp_set_temp): Remove.
6757
6758 2017-09-11  Tom Tromey  <tom@tromey.com>
6759
6760         * mi/mi-cmd-catch.c (mi_cmd_catch_assert)
6761         (mi_cmd_catch_exception, mi_catch_load_unload): Update.
6762         * mi/mi-cmd-break.c (setup_breakpoint_reporting): Return a
6763         scoped_restore.
6764         (mi_cmd_break_insert_1): Update.
6765         * mi/mi-cmd-break.h (setup_breakpoint_reporting): Return a
6766         scoped_restore.
6767
6768 2017-09-11  Tom Tromey  <tom@tromey.com>
6769
6770         * demangle.c (demangle_command): Update.
6771         * breakpoint.c (disable_command): Update.
6772         (enable_command): Update.
6773         (find_location_by_number): Make "number" const.  Use
6774         get_number_trailer.
6775         * cli/cli-utils.c (extract_arg): Return std::string.
6776         * probe.c (parse_probe_linespec): Update.  Change types.
6777         (collect_probes): Take string arguments.
6778         (parse_probe_linespec): Likewise.
6779         (info_probes_for_ops): Update.
6780         (enable_probes_command): Update.
6781         (disable_probes_command): Update.
6782         * break-catch-sig.c (catch_signal_split_args): Update.
6783         * mi/mi-parse.c (mi_parse): Update.
6784
6785 2017-09-11  Tom Tromey  <tom@tromey.com>
6786
6787         * language.h (language_enum): Make argument const.
6788         * language.c (language_enum): Make argument const.
6789
6790 2017-09-11  Tom Tromey  <tom@tromey.com>
6791
6792         * common/common-utils.h (skip_to_space): Remove macro, redeclare
6793         as function.
6794         (skip_to_space): Rename from skip_to_space_const.
6795         * common/common-utils.c (skip_to_space): New function.
6796         (skip_to_space): Rename from skip_to_space_const.
6797         * cli/cli-utils.h (get_number): Rename from get_number_const.
6798         (extract_arg): Rename from extract_arg_const.
6799         * cli/cli-utils.c (get_number): Rename from get_number_const.
6800         (extract_arg): Rename from extract_arg_const.
6801         (number_or_range_parser::get_number): Use ::get_number.
6802         * aarch64-linux-tdep.c, ada-lang.c, arm-linux-tdep.c, ax-gdb.c,
6803         break-catch-throw.c, breakpoint.c, cli/cli-cmds.c, cli/cli-dump.c,
6804         cli/cli-script.c, cli/cli-setshow.c, compile/compile.c,
6805         completer.c, demangle.c, disasm.c, findcmd.c, linespec.c,
6806         linux-tdep.c, linux-thread-db.c, location.c, mi/mi-parse.c,
6807         minsyms.c, nat/linux-procfs.c, printcmd.c, probe.c,
6808         python/py-breakpoint.c, record.c, rust-exp.y, serial.c, stack.c,
6809         stap-probe.c, tid-parse.c, tracepoint.c: Update all callers.
6810
6811 2017-09-11  Tom Tromey  <tom@tromey.com>
6812
6813         * python/python.c (do_start_initialization): Use
6814         py-event-types.def to initialize types.
6815         Define all object type structures.
6816         * python/python-internal.h: Don't declare event initialization
6817         functions.
6818         * python/py-threadevent.c (thread_event_object_type): Don't
6819         define.
6820         * python/py-stopevent.c (stop_event_object_type): Don't define.
6821         * python/py-signalevent.c (signal_event_object_type): Don't
6822         declare or define.
6823         * python/py-newobjfileevent.c (new_objfile_event_object_type)
6824         (clear_objfiles_event_object_type): Don't declare or define.
6825         * python/py-infevents.c (inferior_call_pre_event_object_type)
6826         (inferior_call_post_event_object_type)
6827         (register_changed_event_object_type)
6828         (memory_changed_event_object_type): Don't declare or define.
6829         * python/py-inferior.c (new_thread_event_object_type)
6830         (new_inferior_event_object_type)
6831         (inferior_deleted_event_object_type): Don't declare or define.
6832         * python/py-exitedevent.c (exited_event_object_type): Don't
6833         declare or define.
6834         * python/py-evts.c (gdbpy_initialize_py_events): Use
6835         py-all-events.def.
6836         * python/py-events.h (thread_event_object_type): Don't declare.
6837         (events_object): Use py-all-events.def.
6838         * python/py-event.h (GDBPY_NEW_EVENT_TYPE): Remove.  Use
6839         py-event-types.def.
6840         * python/py-event-types.def: New file.
6841         * python/py-continueevent.c (create_continue_event_object): Don't
6842         declare or define.
6843         * python/py-bpevent.c (breakpoint_event_object_type): Don't
6844         declare or define.
6845         * python/py-all-events.def: New file.
6846
6847 2017-09-11  Tom Tromey  <tom@tromey.com>
6848
6849         * python/py-threadevent.c (create_thread_event_object): Return
6850         gdbpy_ref.
6851         * python/py-stopevent.h (create_stop_event_object)
6852         (create_breakpoint_event_object, create_signal_event_object):
6853         Update.
6854         * python/py-stopevent.c (create_stop_event_object): Return
6855         gdbpy_ref.
6856         (emit_stop_event): Update.
6857         * python/py-signalevent.c (create_signal_event_object): Return
6858         gdbpy_ref.
6859         * python/py-infevents.c (create_inferior_call_event_object):
6860         Update.
6861         * python/py-event.h (create_event_object)
6862         (create_thread_event_object): Update.
6863         * python/py-event.c (create_event_object): Return gdbpy_ref.
6864         * python/py-continueevent.c: Return gdbpy_ref.
6865         * python/py-bpevent.c (create_breakpoint_event_object): Return
6866         gdbpy_ref.
6867
6868 2017-09-11  Tom Tromey  <tom@tromey.com>
6869
6870         PR python/15622:
6871         * NEWS: Add entry.
6872         * python/python.c (do_start_initialization): Initialize new event
6873         types.
6874         * python/python-internal.h (gdbpy_initialize_new_inferior_event)
6875         (gdbpy_initialize_inferior_deleted_event)
6876         (gdbpy_initialize_new_thread_event): Declare.
6877         * python/py-threadevent.c (create_thread_event_object): Add option
6878         "thread" parameter.
6879         * python/py-inferior.c (new_thread_event_object_type)
6880         (new_inferior_event_object_type)
6881         (inferior_deleted_event_object_type): Declare.
6882         (python_new_inferior, python_inferior_deleted): New functions.
6883         (add_thread_object): Emit new_thread event.
6884         (gdbpy_initialize_inferior): Attach new functions to corresponding
6885         observers.
6886         (new_thread, new_inferior, inferior_deleted): Define new event
6887         types.
6888         * python/py-evts.c (gdbpy_initialize_py_events): Add new
6889         registries.
6890         * python/py-events.h (events_object) <new_inferior,
6891         inferior_deleted, new_thread>: New fields.
6892         * python/py-event.h (create_thread_event_breakpoint): Add optional
6893         "thread" parameter.
6894
6895 2017-09-10  Andrew Burgess  <andrew.burgess@embecosm.com>
6896
6897         * utils.c (abort_with_message): Don't compare gdb_stderr to NULL,
6898         check current_ui instead.
6899         (internal_vproblem): Likewise.
6900
6901 2017-09-09  Simon Marchi  <simon.marchi@ericsson.com>
6902
6903         * thread.c (print_thread_info_1): Remove unnecessary calls to
6904         uiout->is_mi_like_p.
6905
6906 2017-09-09  Tom Tromey  <tom@tromey.com>
6907
6908         * namespace.h (add_using_directive): Update.
6909         * namespace.c (add_using_directive): Change type of excludes to
6910         std::vector.
6911         * dwarf2read.c (read_import_statement): Use std::vector.
6912         (read_namespace): Update.
6913         * cp-namespace.c (cp_scan_for_anonymous_namespaces): Update.
6914
6915 2017-09-09  Tom Tromey  <tom@tromey.com>
6916
6917         * linespec.c (create_sals_line_offset): Use gdb::def_vector.
6918
6919 2017-09-09  Tom Tromey  <tom@tromey.com>
6920
6921         * p-valprint.c (pascal_object_print_value): Use gdb::byte_vector.
6922
6923 2017-09-09  Tom Tromey  <tom@tromey.com>
6924
6925         * stack.c (func_command): Use gdb::def_vector.
6926
6927 2017-09-09  Tom Tromey  <tom@tromey.com>
6928
6929         * mi/mi-cmd-var.c (mi_cmd_var_list_children): Use gdb::optional,
6930         ui_out_emit_list, ui_out_emit_tuple.
6931         (mi_cmd_var_update): Likewise.
6932
6933 2017-09-09  Tom Tromey  <tom@tromey.com>
6934
6935         * mi/mi-interp.c (mi_user_selected_context_changed): Use
6936         ui_out_redirect_pop.
6937         * guile/scm-ports.c (ioscm_with_output_to_port_worker): Use
6938         ui_out_redirect_pop.
6939         * utils.c (do_ui_out_redirect_pop)
6940         (make_cleanup_ui_out_redirect_pop): Remove.
6941         * top.c (execute_command_to_string): Use ui_out_redirect_pop.
6942         * utils.h (make_cleanup_ui_out_redirect_pop): Remove.
6943         * ui-out.h (ui_out_redirect_pop): New class.
6944
6945 2017-09-09  Tom Tromey  <tom@tromey.com>
6946
6947         * mi/mi-main.c (output_cores): Use ui_out_emit_list.
6948         (list_available_thread_groups, mi_cmd_list_thread_groups)
6949         (mi_cmd_data_list_changed_registers, mi_cmd_data_read_memory)
6950         (mi_cmd_data_read_memory_bytes, mi_cmd_trace_frame_collected):
6951         Likewise.
6952
6953 2017-09-09  Tom Tromey  <tom@tromey.com>
6954
6955         * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn): Use
6956         ui_out_emit_tuple.
6957
6958 2017-09-09  Tom Tromey  <tom@tromey.com>
6959
6960         * target.c (flash_erase_command): Use ui_out_emit_tuple.
6961         * stack.c (print_frame): Use ui_out_emit_tuple.
6962         * spu-tdep.c (info_spu_event_command): Use ui_out_emit_tuple.
6963         (info_spu_mailbox_command, info_spu_dma_command)
6964         (info_spu_proxydma_command): Likewise.
6965         * mi/mi-main.c (mi_cmd_trace_frame_collected): Use
6966         ui_out_emit_tuple, gdb::byte_vector, bin2hex.
6967         * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries): Use
6968         ui_out_emit_tuple.
6969         * breakpoint.c (print_it_watchpoint): Use ui_out_emit_tuple.
6970
6971 2017-09-09  Tom Tromey  <tom@tromey.com>
6972
6973         * ui-out.h (make_cleanup_ui_out_table_begin_end): Remove.
6974         (class ui_out_emit_table): Update comment.
6975         * ui-out.c (do_cleanup_table_end)
6976         (make_cleanup_ui_out_table_begin_end): Remove.
6977         * spu-tdep.c (info_spu_mailbox_list): Use ui_out_emit_table.
6978         (info_spu_dma_cmdlist): Likewise.
6979         * probe.c (info_probes_for_ops): Use ui_out_emit_table.
6980         * darwin-nat-info.c (darwin_debug_regions_recurse): Use
6981         ui_out_emit_table.
6982
6983 2017-09-09  Tom Tromey  <tom@tromey.com>
6984
6985         * thread.c (print_thread_info_1): Use ui_out_emit_table,
6986         ui_out_emit_list, gdb::optional.
6987
6988 2017-09-09  John Baldwin  <jhb@FreeBSD.org>
6989
6990         * aarch64-linux-nat.c: Remove _initialize_aarch64_linux_nat
6991         prototype.
6992         * aarch64-linux-tdep.c: Remove _initialize_aarch64_linux_tdep
6993         prototype.
6994         * aarch64-newlib-tdep.c: Remove _initialize_aarch64_newlib_tdep
6995         prototype.
6996         * aarch64-tdep.c: Remove _initialize_aarch64_tdep prototype.
6997         * ada-exp.y: Remove _initialize_ada_exp prototype.
6998         * ada-lang.c: Remove _initialize_ada_language prototype.
6999         * ada-tasks.c: Remove _initialize_tasks prototype.
7000         * addrmap.c: Remove _initialize_addrmap prototype.
7001         * agent.c: Remove _initialize_agent prototype.
7002         * aix-thread.c: Remove _initialize_aix_thread prototype.
7003         * alpha-bsd-nat.c: Remove _initialize_alphabsd_nat prototype.
7004         * alpha-linux-nat.c: Remove _initialize_alpha_linux_nat prototype.
7005         * alpha-linux-tdep.c: Remove _initialize_alpha_linux_tdep
7006         prototype.
7007         * alpha-nbsd-tdep.c: Remove _initialize_alphanbsd_tdep prototype.
7008         * alpha-obsd-tdep.c: Remove _initialize_alphaobsd_tdep prototype.
7009         * alpha-tdep.c: Remove _initialize_alpha_tdep prototype.
7010         * amd64-darwin-tdep.c: Remove _initialize_amd64_darwin_tdep
7011         prototype.
7012         * amd64-dicos-tdep.c: Remove _initialize_amd64_dicos_tdep
7013         prototype.
7014         * amd64-fbsd-nat.c: Remove _initialize_amd64fbsd_nat prototype.
7015         * amd64-fbsd-tdep.c: Remove _initialize_amd64fbsd_tdep prototype.
7016         * amd64-linux-nat.c: Remove _initialize_amd64_linux_nat prototype.
7017         * amd64-linux-tdep.c: Remove _initialize_amd64_linux_tdep
7018         prototype.
7019         * amd64-nbsd-nat.c: Remove _initialize_amd64nbsd_nat prototype.
7020         * amd64-nbsd-tdep.c: Remove _initialize_amd64nbsd_tdep prototype.
7021         * amd64-obsd-nat.c: Remove _initialize_amd64obsd_nat prototype.
7022         * amd64-obsd-tdep.c: Remove _initialize_amd64obsd_tdep prototype.
7023         * amd64-sol2-tdep.c: Remove _initialize_amd64_sol2_tdep prototype.
7024         * amd64-tdep.c: Remove _initialize_amd64_tdep prototype.
7025         * amd64-windows-nat.c: Remove _initialize_amd64_windows_nat
7026         prototype.
7027         * amd64-windows-tdep.c: Remove _initialize_amd64_windows_tdep
7028         prototype.
7029         * annotate.c: Remove _initialize_annotate prototype.
7030         * arc-newlib-tdep.c: Remove _initialize_arc_newlib_tdep prototype.
7031         * arc-tdep.c: Remove _initialize_arc_tdep prototype.
7032         * arch-utils.c: Remove _initialize_gdbarch_utils prototype.
7033         * arm-linux-nat.c: Remove _initialize_arm_linux_nat prototype.
7034         * arm-linux-tdep.c: Remove _initialize_arm_linux_tdep prototype.
7035         * arm-nbsd-tdep.c: Remove _initialize_arm_netbsd_tdep prototype.
7036         * arm-obsd-tdep.c: Remove _initialize_armobsd_tdep prototype.
7037         * arm-symbian-tdep.c: Remove _initialize_arm_symbian_tdep
7038         prototype.
7039         * arm-tdep.c: Remove _initialize_arm_tdep prototype.
7040         * arm-wince-tdep.c: Remove _initialize_arm_wince_tdep prototype.
7041         * auto-load.c: Remove _initialize_auto_load prototype.
7042         * auxv.c: Remove _initialize_auxv prototype.
7043         * avr-tdep.c: Remove _initialize_avr_tdep prototype.
7044         * ax-gdb.c: Remove _initialize_ax_gdb prototype.
7045         * bfin-linux-tdep.c: Remove _initialize_bfin_linux_tdep prototype.
7046         * bfin-tdep.c: Remove _initialize_bfin_tdep prototype.
7047         * break-catch-sig.c: Remove _initialize_break_catch_sig prototype.
7048         * break-catch-syscall.c: Remove _initialize_break_catch_syscall
7049         prototype.
7050         * break-catch-throw.c: Remove _initialize_break_catch_throw
7051         prototype.
7052         * breakpoint.c: Remove _initialize_breakpoint prototype.
7053         * bsd-uthread.c: Remove _initialize_bsd_uthread prototype.
7054         * btrace.c: Remove _initialize_btrace prototype.
7055         * charset.c: Remove _initialize_charset prototype.
7056         * cli/cli-cmds.c: Remove _initialize_cli_cmds prototype.
7057         * cli/cli-dump.c: Remove _initialize_cli_dump prototype.
7058         * cli/cli-interp.c: Remove _initialize_cli_interp prototype.
7059         * cli/cli-logging.c: Remove _initialize_cli_logging prototype.
7060         * cli/cli-script.c: Remove _initialize_cli_script prototype.
7061         * coff-pe-read.c: Remove _initialize_coff_pe_read prototype.
7062         * coffread.c: Remove _initialize_coffread prototype.
7063         * compile/compile.c: Remove _initialize_compile prototype.
7064         * complaints.c: Remove _initialize_complaints prototype.
7065         * completer.c: Remove _initialize_completer prototype.
7066         * copying.awk: Remove _initialize_copying prototype.
7067         * copying.c: Regenerate.
7068         * core-regset.c: Remove _initialize_core_regset prototype.
7069         * corefile.c: Remove _initialize_core prototype.
7070         * corelow.c: Remove _initialize_corelow prototype.
7071         * cp-abi.c: Remove _initialize_cp_abi prototype.
7072         * cp-namespace.c: Remove _initialize_cp_namespace prototype.
7073         * cp-support.c: Remove _initialize_cp_support prototype.
7074         * cp-valprint.c: Remove _initialize_cp_valprint prototype.
7075         * cris-linux-tdep.c: Remove _initialize_cris_linux_tdep prototype.
7076         * cris-tdep.c: Remove _initialize_cris_tdep prototype.
7077         * ctf.c: Remove _initialize_ctf prototype.
7078         * d-lang.c: Remove _initialize_d_language prototype.
7079         * darwin-nat-info.c: Remove _initialize_darwin_info_commands
7080         prototype.
7081         * darwin-nat.c: Remove _initialize_darwin_inferior prototype.
7082         * dbxread.c: Remove _initialize_dbxread prototype.
7083         * dcache.c: Remove _initialize_dcache prototype.
7084         * demangle.c: Remove _initialize_demangler prototype.
7085         * disasm-selftests.c: Remove _initialize_disasm_selftests
7086         prototype.
7087         * disasm.c: Remove _initialize_disasm prototype.
7088         * dtrace-probe.c: Remove _initialize_dtrace_probe prototype.
7089         * dummy-frame.c: Remove _initialize_dummy_frame prototype.
7090         * dwarf2-frame-tailcall.c: Remove _initialize_tailcall_frame
7091         prototype.
7092         * dwarf2-frame.c: Remove _initialize_dwarf2_frame prototype.
7093         * dwarf2expr.c: Remove _initialize_dwarf2expr prototype.
7094         * dwarf2loc.c: Remove _initialize_dwarf2loc prototype.
7095         * dwarf2read.c: Remove _initialize_dwarf2_read prototype.
7096         * elfread.c: Remove _initialize_elfread prototype.
7097         * exec.c: Remove _initialize_exec prototype.
7098         * extension.c: Remove _initialize_extension prototype.
7099         * f-lang.c: Remove _initialize_f_language prototype.
7100         * f-valprint.c: Remove _initialize_f_valprint prototype.
7101         * fbsd-nat.c: Remove _initialize_fbsd_nat prototype.
7102         * fbsd-tdep.c: Remove _initialize_fbsd_tdep prototype.
7103         * filesystem.c: Remove _initialize_filesystem prototype.
7104         * findcmd.c: Remove _initialize_mem_search prototype.
7105         * fork-child.c: Remove _initialize_fork_child prototype.
7106         * frame-base.c: Remove _initialize_frame_base prototype.
7107         * frame-unwind.c: Remove _initialize_frame_unwind prototype.
7108         * frame.c: Remove _initialize_frame prototype.
7109         * frv-linux-tdep.c: Remove _initialize_frv_linux_tdep prototype.
7110         * frv-tdep.c: Remove _initialize_frv_tdep prototype.
7111         * ft32-tdep.c: Remove _initialize_ft32_tdep prototype.
7112         * gcore.c: Remove _initialize_gcore prototype.
7113         * gdb_bfd.c: Remove _initialize_gdb_bfd prototype.
7114         * gdbarch.c: Regenerate.
7115         * gdbarch.sh: Remove _initialize_gdbarch prototype.
7116         * gdbtypes.c: Remove _initialize_gdbtypes prototype.
7117         * gnu-nat.c: Remove _initialize_gnu_nat prototype.
7118         * gnu-v2-abi.c: Remove _initialize_gnu_v2_abi prototype.
7119         * gnu-v3-abi.c: Remove _initialize_gnu_v3_abi prototype.
7120         * go-lang.c: Remove _initialize_go_language prototype.
7121         * go32-nat.c: Remove _initialize_go32_nat prototype.
7122         * guile/guile.c: Remove _initialize_guile prototype.
7123         * h8300-tdep.c: Remove _initialize_h8300_tdep prototype.
7124         * hppa-linux-nat.c: Remove _initialize_hppa_linux_nat prototype.
7125         * hppa-linux-tdep.c: Remove _initialize_hppa_linux_tdep prototype.
7126         * hppa-nbsd-nat.c: Remove _initialize_hppanbsd_nat prototype.
7127         * hppa-nbsd-tdep.c: Remove _initialize_hppanbsd_tdep prototype.
7128         * hppa-obsd-nat.c: Remove _initialize_hppaobsd_nat prototype.
7129         * hppa-obsd-tdep.c: Remove _initialize_hppaobsd_tdep prototype.
7130         * hppa-tdep.c: Remove _initialize_hppa_tdep prototype.
7131         * i386-bsd-nat.c: Remove _initialize_i386bsd_nat prototype.
7132         * i386-cygwin-tdep.c: Remove _initialize_i386_cygwin_tdep
7133         prototype.
7134         * i386-darwin-tdep.c: Remove _initialize_i386_darwin_tdep
7135         prototype.
7136         * i386-dicos-tdep.c: Remove _initialize_i386_dicos_tdep prototype.
7137         * i386-fbsd-nat.c: Remove _initialize_i386fbsd_nat prototype.
7138         * i386-fbsd-tdep.c: Remove _initialize_i386fbsd_tdep prototype.
7139         * i386-gnu-nat.c: Remove _initialize_i386gnu_nat prototype.
7140         * i386-gnu-tdep.c: Remove _initialize_i386gnu_tdep prototype.
7141         * i386-linux-nat.c: Remove _initialize_i386_linux_nat prototype.
7142         * i386-linux-tdep.c: Remove _initialize_i386_linux_tdep prototype.
7143         * i386-nbsd-nat.c: Remove _initialize_i386nbsd_nat prototype.
7144         * i386-nbsd-tdep.c: Remove _initialize_i386nbsd_tdep prototype.
7145         * i386-nto-tdep.c: Remove _initialize_i386nto_tdep prototype.
7146         * i386-obsd-nat.c: Remove _initialize_i386obsd_nat prototype.
7147         * i386-obsd-tdep.c: Remove _initialize_i386obsd_tdep prototype.
7148         * i386-sol2-nat.c: Remove _initialize_amd64_sol2_nat prototype.
7149         * i386-sol2-tdep.c: Remove _initialize_amd64_sol2_tdep prototype.
7150         * i386-tdep.c: Remove _initialize_i386_tdep prototype.
7151         * i386-windows-nat.c: Remove _initialize_i386_windows_nat
7152         prototype.
7153         * ia64-libunwind-tdep.c: Remove _initialize_libunwind_frame
7154         prototype.
7155         * ia64-linux-nat.c: Remove _initialize_ia64_linux_nat prototype.
7156         * ia64-linux-tdep.c: Remove _initialize_ia64_linux_tdep prototype.
7157         * ia64-tdep.c: Remove _initialize_ia64_tdep prototype.
7158         * ia64-vms-tdep.c: Remove _initialize_ia64_vms_tdep prototype.
7159         * infcall.c: Remove _initialize_infcall prototype.
7160         * infcmd.c: Remove _initialize_infcmd prototype.
7161         * inferior.c: Remove _initialize_inferiors prototype.
7162         * inflow.c: Remove _initialize_inflow prototype.
7163         * infrun.c: Remove _initialize_infrun prototype.
7164         * interps.c: Remove _initialize_interpreter prototype.
7165         * iq2000-tdep.c: Remove _initialize_iq2000_tdep prototype.
7166         * jit.c: Remove _initialize_jit prototype.
7167         * language.c: Remove _initialize_language prototype.
7168         * linux-fork.c: Remove _initialize_linux_fork prototype.
7169         * linux-nat.c: Remove _initialize_linux_nat prototype.
7170         * linux-tdep.c: Remove _initialize_linux_tdep prototype.
7171         * linux-thread-db.c: Remove _initialize_thread_db prototype.
7172         * lm32-tdep.c: Remove _initialize_lm32_tdep prototype.
7173         * m2-lang.c: Remove _initialize_m2_language prototype.
7174         * m32c-tdep.c: Remove _initialize_m32c_tdep prototype.
7175         * m32r-linux-nat.c: Remove _initialize_m32r_linux_nat prototype.
7176         * m32r-linux-tdep.c: Remove _initialize_m32r_linux_tdep prototype.
7177         * m32r-tdep.c: Remove _initialize_m32r_tdep prototype.
7178         * m68hc11-tdep.c: Remove _initialize_m68hc11_tdep prototype.
7179         * m68k-bsd-nat.c: Remove _initialize_m68kbsd_nat prototype.
7180         * m68k-bsd-tdep.c: Remove _initialize_m68kbsd_tdep prototype.
7181         * m68k-linux-nat.c: Remove _initialize_m68k_linux_tdep prototype.
7182         * m68k-linux-tdep.c: Remove _initialize_m68k_linux_tdep prototype.
7183         * m68k-tdep.c: Remove _initialize_m68k_tdep prototype.
7184         * m88k-bsd-nat.c: Remove _initialize_m68kbsd_nat prototype.
7185         * m88k-tdep.c: Remove _initialize_m68kbsd_tdep prototype.
7186         * machoread.c: Remove _initialize_machoread prototype.
7187         * macrocmd.c: Remove _initialize_macrocmd prototype.
7188         * macroscope.c: Remove _initialize_macroscope prototype.
7189         * maint.c: Remove _initialize_maint_cmds prototype.
7190         * mdebugread.c: Remove _initialize_mdebugread prototype.
7191         * memattr.c: Remove _initialize_mem prototype.
7192         * mep-tdep.c: Remove _initialize_mep_tdep prototype.
7193         * mi/mi-cmd-env.c: Remove _initialize_mi_cmd_env prototype.
7194         * mi/mi-cmds.c: Remove _initialize_mi_cmds prototype.
7195         * mi/mi-interp.c: Remove _initialize_mi_interp prototype.
7196         * mi/mi-main.c: Remove _initialize_mi_main prototype.
7197         * microblaze-linux-tdep.c: Remove
7198         _initialize_microblaze_linux_tdep prototype.
7199         * microblaze-tdep.c: Remove _initialize_microblaze_tdep prototype.
7200         * mips-fbsd-nat.c: Remove _initialize_mips_fbsd_nat prototype.
7201         * mips-fbsd-tdep.c: Remove _initialize_mips_fbsd_tdep prototype.
7202         * mips-linux-nat.c: Remove _initialize_mips_linux_nat prototype.
7203         * mips-linux-tdep.c: Remove _initialize_mips_linux_tdep prototype.
7204         * mips-nbsd-nat.c: Remove _initialize_mipsnbsd_nat prototype.
7205         * mips-nbsd-tdep.c: Remove _initialize_mipsnbsd_tdep prototype.
7206         * mips-sde-tdep.c: Remove _initialize_mips_sde_tdep prototype.
7207         * mips-tdep.c: Remove _initialize_mips_tdep prototype.
7208         * mips64-obsd-nat.c: Remove _initialize_mips64obsd_nat prototype.
7209         * mips64-obsd-tdep.c: Remove _initialize_mips64obsd_tdep
7210         prototype.
7211         * mipsread.c: Remove _initialize_mipsread prototype.
7212         * mn10300-linux-tdep.c: Remove _initialize_mn10300_linux_tdep
7213         prototype.
7214         * mn10300-tdep.c: Remove _initialize_mn10300_tdep prototype.
7215         * moxie-tdep.c: Remove _initialize_moxie_tdep prototype.
7216         * msp430-tdep.c: Remove _initialize_msp430_tdep prototype.
7217         * mt-tdep.c: Remove _initialize_mt_tdep prototype.
7218         * nds32-tdep.c: Remove _initialize_nds32_tdep prototype.
7219         * nios2-linux-tdep.c: Remove _initialize_nios2_linux_tdep
7220         prototype.
7221         * nios2-tdep.c: Remove _initialize_nios2_tdep prototype.
7222         * nto-procfs.c: Remove _initialize_procfs prototype.
7223         * nto-tdep.c: Remove _initialize_nto_tdep prototype.
7224         * objc-lang.c: Remove _initialize_objc_language prototype.
7225         * objfiles.c: Remove _initialize_objfiles prototype.
7226         * observer.c: Remove observer_test_first_notification_function,
7227         observer_test_second_notification_function,
7228         observer_test_third_notification_function, and
7229         _initialize_observer prototypes.
7230         * opencl-lang.c: Remove _initialize_opencl_language prototypes.
7231         * osabi.c: Remove _initialize_gdb_osabi prototype.
7232         * osdata.c: Remove _initialize_osdata prototype.
7233         * p-valprint.c: Remove _initialize_pascal_valprint prototype.
7234         * parse.c: Remove _initialize_parse prototype.
7235         * ppc-fbsd-nat.c: Remove _initialize_ppcfbsd_nat prototype.
7236         * ppc-fbsd-tdep.c: Remove _initialize_ppcfbsd_tdep prototype.
7237         * ppc-linux-nat.c: Remove _initialize_ppc_linux_nat prototype.
7238         * ppc-linux-tdep.c: Remove _initialize_ppc_linux_tdep prototype.
7239         * ppc-nbsd-nat.c: Remove _initialize_ppcnbsd_nat prototype.
7240         * ppc-nbsd-tdep.c: Remove _initialize_ppcnbsd_tdep prototype.
7241         * ppc-obsd-nat.c: Remove _initialize_ppcobsd_nat prototype.
7242         * ppc-obsd-tdep.c: Remove _initialize_ppcobsd_tdep prototype.
7243         * printcmd.c: Remove _initialize_printcmd prototype.
7244         * probe.c: Remove _initialize_probe prototype.
7245         * proc-api.c: Remove _initialize_proc_api prototype.
7246         * proc-events.c: Remove _initialize_proc_events prototype.
7247         * proc-service.c: Remove _initialize_proc_service prototype.
7248         * procfs.c: Remove _initialize_procfs prototype.
7249         * psymtab.c: Remove _initialize_psymtab prototype.
7250         * python/python.c: Remove _initialize_python prototype.
7251         * ravenscar-thread.c: Remove _initialize_ravenscar prototype.
7252         * record-btrace.c: Remove _initialize_record_btrace prototype.
7253         * record-full.c: Remove _initialize_record_full prototype.
7254         * record.c: Remove _initialize_record prototype.
7255         * regcache.c: Remove _initialize_regcache prototype.
7256         * reggroups.c: Remove _initialize_reggroup prototype.
7257         * remote-notif.c: Remove _initialize_notif prototype.
7258         * remote-sim.c: Remove _initialize_remote_sim prototype.
7259         * remote.c: Remove _initialize_remote prototype.
7260         * reverse.c: Remove _initialize_reverse prototype.
7261         * rl78-tdep.c: Remove _initialize_rl78_tdep prototype.
7262         * rs6000-aix-tdep.c: Remove _initialize_rs6000_aix_tdep prototype.
7263         * rs6000-lynx178-tdep.c: Remove _initialize_rs6000_lynx178_tdep
7264         prototype.
7265         * rs6000-nat.c: Remove _initialize_rs6000_nat prototype.
7266         * rs6000-tdep.c: Remove _initialize_rs6000_tdep prototype.
7267         * rust-exp.y: Remove _initialize_rust_exp prototype.
7268         * rx-tdep.c: Remove _initialize_rx_tdep prototype.
7269         * s390-linux-nat.c: Remove _initialize_s390_nat prototype.
7270         * s390-linux-tdep.c: Remove _initialize_s390_tdep prototype.
7271         * score-tdep.c: Remove _initialize_score_tdep prototype.
7272         * selftest-arch.c: Remove _initialize_selftests_foreach_arch
7273         prototype.
7274         * ser-go32.c: Remove _initialize_ser_dos prototype.
7275         * ser-mingw.c: Remove _initialize_ser_windows prototype.
7276         * ser-pipe.c: Remove _initialize_ser_pipe prototype.
7277         * ser-tcp.c: Remove _initialize_ser_tcp prototype.
7278         * ser-unix.c: Remove _initialize_ser_hardwire prototype.
7279         * serial.c: Remove _initialize_serial prototype.
7280         * sh-linux-tdep.c: Remove _initialize_sh_linux_tdep prototype.
7281         * sh-nbsd-nat.c: Remove _initialize_shnbsd_nat prototype.
7282         * sh-nbsd-tdep.c: Remove _initialize_shnbsd_tdep prototype.
7283         * sh-tdep.c: Remove _initialize_sh_tdep prototype.
7284         * skip.c: Remove _initialize_step_skip prototype.
7285         * sol-thread.c: Remove _initialize_sol_thread prototype.
7286         * solib-aix.c: Remove _initialize_solib_aix prototype.
7287         * solib-darwin.c: Remove _initialize_darwin_solib prototype.
7288         * solib-dsbt.c: Remove _initialize_dsbt_solib prototype.
7289         * solib-frv.c: Remove _initialize_frv_solib prototype.
7290         * solib-spu.c: Remove _initialize_spu_solib prototype.
7291         * solib-svr4.c: Remove _initialize_svr4_solib prototype.
7292         * solib-target.c: Remove _initialize_solib_target prototype.
7293         * solib.c: Remove _initialize_solib prototype.
7294         * source.c: Remove _initialize_source prototype.
7295         * sparc-linux-nat.c: Remove _initialize_sparc_linux_nat prototype.
7296         * sparc-linux-tdep.c: Remove _initialize_sparc_linux_tdep
7297         prototype.
7298         * sparc-nat.c: Remove _initialize_sparc_nat prototype.
7299         * sparc-nbsd-nat.c: Remove _initialize_sparcnbsd_nat prototype.
7300         * sparc-nbsd-tdep.c: Remove _initialize_sparcnbsd_tdep prototype.
7301         * sparc-obsd-tdep.c: Remove _initialize_sparc32obsd_tdep
7302         prototype.
7303         * sparc-sol2-nat.c: Remove _initialize_sparc_sol2_nat prototype.
7304         * sparc-sol2-tdep.c: Remove _initialize_sparc_sol2_tdep prototype.
7305         * sparc-tdep.c: Remove _initialize_sparc_tdep prototype.
7306         * sparc64-fbsd-nat.c: Remove _initialize_sparc64fbsd_nat
7307         prototype.
7308         * sparc64-fbsd-tdep.c: Remove _initialize_sparc64fbsd_tdep
7309         prototype.
7310         * sparc64-linux-nat.c: Remove _initialize_sparc64_linux_nat
7311         prototype.
7312         * sparc64-linux-tdep.c: Remove _initialize_sparc64_linux_tdep
7313         prototype.
7314         * sparc64-nat.c: Remove _initialize_sparc64_nat prototype.
7315         * sparc64-nbsd-nat.c: Remove _initialize_sparc64nbsd_nat
7316         prototype.
7317         * sparc64-nbsd-tdep.c: Remove _initialize_sparc64nbsd_tdep
7318         prototype.
7319         * sparc64-obsd-nat.c: Remove _initialize_sparc64obsd_nat
7320         prototype.
7321         * sparc64-obsd-tdep.c: Remove _initialize_sparc64obsd_tdep
7322         prototype.
7323         * sparc64-sol2-tdep.c: Remove _initialize_sparc64_sol2_tdep
7324         prototype.
7325         * spu-linux-nat.c: Remove _initialize_spu_nat prototype.
7326         * spu-multiarch.c: Remove _initialize_spu_multiarch prototype.
7327         * spu-tdep.c: Remove _initialize_spu_tdep prototype.
7328         * stabsread.c: Remove _initialize_stabsread prototype.
7329         * stack.c: Remove _initialize_stack prototype.
7330         * stap-probe.c: Remove _initialize_stap_probe prototype.
7331         * std-regs.c: Remove _initialize_frame_reg prototype.
7332         * symfile-debug.c: Remove _initialize_symfile_debug prototype.
7333         * symfile-mem.c: Remove _initialize_symfile_mem prototype.
7334         * symfile.c: Remove _initialize_symfile prototype.
7335         * symmisc.c: Remove _initialize_symmisc prototype.
7336         * symtab.c: Remove _initialize_symtab prototype.
7337         * target-dcache.c: Remove _initialize_target_dcache prototype.
7338         * target-descriptions.c: Remove _initialize_target_descriptions
7339         prototype.
7340         * thread.c: Remove _initialize_thread prototype.
7341         * tic6x-linux-tdep.c: Remove _initialize_tic6x_linux_tdep
7342         prototype.
7343         * tic6x-tdep.c: Remove _initialize_tic6x_tdep prototype.
7344         * tilegx-linux-nat.c: Remove _initialize_tile_linux_nat prototype.
7345         * tilegx-linux-tdep.c: Remove _initialize_tilegx_linux_tdep
7346         prototype.
7347         * tilegx-tdep.c: Remove _initialize_tilegx_tdep prototype.
7348         * tracefile-tfile.c: Remove _initialize_tracefile_tfile prototype.
7349         * tracefile.c: Remove _initialize_tracefile prototype.
7350         * tracepoint.c: Remove _initialize_tracepoint prototype.
7351         * tui/tui-hooks.c: Remove _initialize_tui_hooks prototype.
7352         * tui/tui-interp.c: Remove _initialize_tui_interp prototype.
7353         * tui/tui-layout.c: Remove _initialize_tui_layout prototype.
7354         * tui/tui-regs.c: Remove _initialize_tui_regs prototype.
7355         * tui/tui-stack.c: Remove _initialize_tui_stack prototype.
7356         * tui/tui-win.c: Remove _initialize_tui_win prototype.
7357         * tui/tui.c: Remove _initialize_tui prototype.
7358         * typeprint.c: Remove _initialize_typeprint prototype.
7359         * user-regs.c: Remove _initialize_user_regs prototype.
7360         * utils.c: Remove _initialize_utils prototype.
7361         * v850-tdep.c: Remove _initialize_v850_tdep prototype.
7362         * valarith.c: Remove _initialize_valarith prototype.
7363         * valops.c: Remove _initialize_valops prototype.
7364         * valprint.c: Remove _initialize_valprint prototype.
7365         * value.c: Remove _initialize_values prototype.
7366         * varobj.c: Remove _initialize_varobj prototype.
7367         * vax-bsd-nat.c: Remove _initialize_vaxbsd_nat prototype.
7368         * vax-nbsd-tdep.c: Remove _initialize_vaxnbsd_tdep prototype.
7369         * vax-tdep.c: Remove _initialize_vax_tdep prototype.
7370         * windows-nat.c: Remove _initialize_windows_nat,
7371         _initialize_check_for_gdb_ini, and _initialize_loadable
7372         prototypes.
7373         * windows-tdep.c: Remove _initialize_windows_tdep prototype.
7374         * xcoffread.c: Remove _initialize_xcoffread prototype.
7375         * xml-support.c: Remove _initialize_xml_support prototype.
7376         * xstormy16-tdep.c: Remove _initialize_xstormy16_tdep prototype.
7377         * xtensa-linux-nat.c: Remove _initialize_xtensa_linux_nat
7378         prototype.
7379         * xtensa-linux-tdep.c: Remove _initialize_xtensa_linux_tdep
7380         prototype.
7381         * xtensa-tdep.c: Remove _initialize_xtensa_tdep prototype.
7382
7383 2017-09-08  Keith Seitz  <keiths@redhat.com>
7384
7385         * dwarf2read.c (struct field_info) <fnfields>: Remove unused
7386         field.
7387
7388 2017-09-08  Christoph Weinmann  <christoph.t.weinmann@intel.com>
7389
7390         * f-valprint.c (f_val_print): Remove check for one byte
7391         sized integers. Remove printing of character type.
7392
7393 2017-09-08  Frank Penczek  <frank.penczek@intel.com>
7394             Christoph Weinmann  <christoph.t.weinmann@intel.com>
7395             Bernhard Heckel  <bernhard.heckel@intel.com>
7396
7397         * f-typeprint.c (f_type_print_base): Use fprintfi_filtered
7398         to maintain proper indentation when printing pointers/refs.
7399
7400 2017-09-07  Joel Brobecker  <brobecker@adacore.com>
7401
7402         GDB 8.0.1 released.
7403
7404 2017-09-07  Joel Brobecker  <brobecker@adacore.com>
7405
7406         * NEWS (Changes in GDB 7.11): Remove entry for QStartupWithShell.
7407
7408 2017-09-05  Tom Tromey  <tom@tromey.com>
7409
7410         * parse.c (funcall_chain): Now a std::vector.
7411         (start_arglist, end_arglist): Simplify.
7412         (free_funcalls): Remove.
7413         (parse_exp_in_context_1): Remove cleanup.
7414
7415 2017-09-05  Tom Tromey  <tom@tromey.com>
7416
7417         * go-exp.y (go_parse): Don't create a cleanup.
7418
7419 2017-09-05  Tom Tromey  <tom@tromey.com>
7420
7421         * d-exp.y (PrimaryExpression): Use std::string.
7422         (d_parse): Don't create a cleanup.
7423
7424 2017-09-05  Tom Tromey  <tom@tromey.com>
7425
7426         * utils.c (do_clear_parser_state): Remove.
7427         (make_cleanup_clear_parser_state): Remove.
7428         * p-exp.y (pascal_parse): Use scoped_restore.
7429         * m2-exp.y (m2_parse): Use scoped_restore.
7430         * f-exp.y (f_parse): Use scoped_restore.
7431         * d-exp.y (d_parse): Use scoped_restore.
7432         * c-exp.y (c_parse): Use scoped_restore.
7433         * ada-exp.y (ada_parse): Use scoped_restore.
7434         * utils.h (make_cleanup_clear_parser_state): Remove.
7435
7436 2017-09-06  Keith Seitz  <keiths@redhat.com>
7437
7438         * dwarf2read.c (dw2_linkage_name_attr): New function.
7439         (dw2_linkage_name): New function.
7440         (dwarf2_compute_name, dwarf2_physname, read_call_site_scope)
7441         (guess_full_die_structure_name, dwarf2_name): Use dw2_linkage_name.
7442         (anonymous_struct_prefix, dwarf2_name): Use dw2_linkage_name_attr.
7443
7444 2017-09-06  Kamil Rytarowski  <n54@gmx.com>
7445
7446         * config/djgpp/djconfig.sh: Correct shell portability issue.
7447
7448 2017-09-06  Kamil Rytarowski  <n54@gmx.com>
7449
7450         * configure.nat: Define HAVE_NATIVE_GCORE_HOST on NetBSD.
7451
7452 2017-09-06  John Baldwin  <jhb@FreeBSD.org>
7453
7454         * Makefile.in (ALLDEPFILES): Add mips-fbsd-nat.c.
7455         * NEWS: Mention new FreeBSD/mips native configuration.
7456         * configure.host: Add aarch64*-*-freebsd*.
7457         * configure.nat: Likewise.
7458         * aarch64-fbsd-nat.c: New file.
7459
7460 2017-09-06  John Baldwin  <jhb@FreeBSD.org>
7461
7462         * Makefile.in (ALL_64_TARGET_OBS): Add aarch64-fbsd-tdep.o.
7463         (ALLDEPFILES): Add aarch64-fbsd-tdep.c.
7464         * NEWS: Mention new FreeBSD/aarch64 target.
7465         * configure.tgt: Add aarch64*-*-freebsd*.
7466         * aarch64-fbsd-tdep.c: New file.
7467         * aarch64-fbsd-tdep.h: New file.
7468
7469 2017-09-06  Kamil Rytarowski  <n54@gmx.com>
7470
7471         * MAINTAINERS (Write After Approval): Add Kamil Rytarowski.
7472
7473 2017-09-06  Jan Kratochvil  <jan.kratochvil@redhat.com>
7474
7475         * parse.c (find_minsym_type_and_address): Don't relocate addresses
7476         of TLS symbols.
7477
7478 2017-09-05  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
7479
7480         * objfiles.c (get_objfile_bfd_data): Remove useless obstack_init
7481         call.
7482
7483 2017-09-05  Simon Marchi  <simon.marchi@ericsson.com>
7484
7485         * infrun.c (follow_exec): Call add_thread after
7486         target_find_description.
7487
7488 2017-09-05  Simon Marchi  <simon.marchi@ericsson.com>
7489
7490         * infrun.c (handle_inferior_event_1): When exec'ing, read
7491         stop_pc after follow_exec.
7492
7493 2017-09-05  Simon Marchi  <simon.marchi@ericsson.com>
7494
7495         * remote.c (process_g_packet): Update error message.
7496
7497 2017-09-05  Yao Qi  <yao.qi@linaro.org>
7498
7499         * configure.tgt (gdb_target_obs): Add i386.o for x86_64-*
7500         targets.
7501
7502 2017-09-05  Pedro Alves  <palves@redhat.com>
7503
7504         * eval.c (eval_call, evaluate_funcall): New functions, factored
7505         out from ...
7506         (evaluate_subexp_standard): ... this.
7507
7508 2017-09-05  Yao Qi  <yao.qi@linaro.org>
7509
7510         * amd64-tdep.c (amd64_target_description): Create target
7511         descriptions.
7512         (_initialize_amd64_tdep): Don't call functions
7513         initialize_tdesc_amd64_*.  Add self tests.
7514         * arch/amd64.c (amd64_create_target_description): Add parameter
7515         is_linux.  Call set_tdesc_osabi if is_linux is true.
7516         * arch/amd64.h (amd64_create_target_description): Update the
7517         declaration.
7518         * arch/i386.c (i386_create_target_description): Add parameter
7519         is_linux.  Call set_tdesc_osabi if is_linux is true.
7520         * arch/i386.h (i386_create_target_description): Update
7521         declaration.
7522         * configure.tgt: Add i386.o to gdb_target_obs.
7523         * features/Makefile (XMLTOC): Remove i386/*.xml.
7524         * features/i386/amd64-avx-avx512.c: Remove.
7525         * features/i386/amd64-avx-mpx-avx512-pku.c: Remove.
7526         * features/i386/amd64-avx-mpx.c: Remove.
7527         * features/i386/amd64-avx.c: Remove.
7528         * features/i386/amd64-mpx.c: Remove.
7529         * features/i386/amd64.c: Remove.
7530         * features/i386/i386-avx-avx512.c: Remove.
7531         * features/i386/i386-avx-mpx-avx512-pku.c: Remove.
7532         * features/i386/i386-avx-mpx.c: Remove.
7533         * features/i386/i386-avx.c: Remove.
7534         * features/i386/i386-mmx.c: Remove.
7535         * features/i386/i386-mpx.c: Remove.
7536         * features/i386/i386.c: Remove.
7537         * i386-tdep.c: Don't include features/i386/i386*.c., include
7538         target-descriptions.h and arch/i386.h.
7539         (i386_target_description): Create target descriptions.
7540         (i386_gdbarch_init): Don't call initialize_tdesc_i386_*
7541         functions.  Do self tests.
7542
7543 2017-09-05  Yao Qi  <yao.qi@linaro.org>
7544
7545         * features/Makefile (XMLTOC): Remove i386/amd64XXX-linux.xml.
7546         * features/i386/amd64-avx-avx512-linux.c: Removed.
7547         * features/i386/amd64-avx-linux.c: Removed.
7548         * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Removed.
7549         * features/i386/amd64-avx-mpx-linux.c: Removed.
7550         * features/i386/amd64-linux.c: Removed.
7551         * features/i386/amd64-mpx-linux.c: Removed.
7552         * features/i386/x32-avx-avx512-linux.c: Removed.
7553         * features/i386/x32-avx-linux.c: Removed.
7554         * features/i386/x32-linux.c: Removed.
7555
7556 2017-09-05  Yao Qi  <yao.qi@linaro.org>
7557
7558         * amd64-linux-tdep.c: Include arch/amd64.h.  Don't include
7559         features/i386/*.c.
7560         (amd64_linux_read_description): Call
7561         amd64_create_target_description.
7562         * arch/amd64.c: New file.
7563         * arch/amd64.h: New file.
7564         * configure.tgt (x86_64-*-linux*): Append amd64.o.
7565         * Makefile.in (ALL_64_TARGET_OBS): Append amd64.o.
7566
7567 2017-09-05  Yao Qi  <yao.qi@linaro.org>
7568
7569         * amd64-linux-tdep.c: Don't include amd64-XXX-linux and
7570         x32-XXX-linux.c.  Include 64bit-XX.c and x32-XX.c.
7571         (amd64_linux_read_description): Create target descriptions.
7572         (_initialize_amd64_linux_tdep): Don't call initialize_tdesc_XXX
7573         functions.  Add unit tests.
7574         * features/Makefile (FEATURE_XMLFILES): Append 64bit-XXX.xml and
7575         x32-core.xml.
7576         * features/i386/64bit-avx.c: Generated.
7577         * features/i386/64bit-avx512.c: Generated.
7578         * features/i386/64bit-core.c: Generated.
7579         * features/i386/64bit-linux.c: Generated.
7580         * features/i386/64bit-mpx.c: Generated.
7581         * features/i386/64bit-pkeys.c: Generated.
7582         * features/i386/64bit-segments.c: Generated.
7583         * features/i386/64bit-sse.c: Generated.
7584         * features/i386/x32-core.c: Generated.
7585         * target-descriptions.c (maint_print_c_tdesc_cmd): Print feature
7586         c files for amd64-linux and x32-linux.
7587
7588 2017-09-05  Yao Qi  <yao.qi@linaro.org>
7589
7590         * amd64-linux-tdep.c (amd64_linux_read_description): New
7591         function.
7592         (amd64_linux_core_read_description): Call
7593         amd64_linux_read_description.
7594         (amd64_linux_init_abi): Likewise.
7595         (amd64_x32_linux_init_abi): Likewise.
7596         * amd64-linux-tdep.h (amd64_linux_read_description): Declare.
7597         * x86-linux-nat.c (x86_linux_read_description): Call
7598         amd64_linux_read_description.
7599
7600 2017-09-05  Yao Qi  <yao.qi@linaro.org>
7601
7602         * amd64-linux-tdep.c (amd64_linux_core_read_description): Update
7603         comments.
7604
7605 2017-09-05  Yao Qi  <yao.qi@linaro.org>
7606
7607         * features/Makefile (XMLTOC): Remove i386/i386-XX-linux.xml.
7608         * features/i386/i386-avx-avx512-linux.c: Remove.
7609         * features/i386/i386-avx-linux.c: Remove.
7610         * features/i386/i386-avx-mpx-avx512-pku-linux.c: Remove.
7611         * features/i386/i386-avx-mpx-linux.c: Remove.
7612         * features/i386/i386-linux.c: Remove.
7613         * features/i386/i386-mmx-linux.c: Remove.
7614         * features/i386/i386-mpx-linux.c: Remove.
7615
7616 2017-09-05  Yao Qi  <yao.qi@linaro.org>
7617
7618         * Makefile.in (ALL_TARGET_OBS): Add i386.o.
7619         (SFILES): Add arch/i386.c.
7620         (HFILES_NO_SRCDIR): Add arch/i386.h.
7621         * arch/i386.c: New file.
7622         * arch/i386.h: New file.
7623         * arch/tdesc.h (allocate_target_description): Declare.
7624         (set_tdesc_architecture): Declare.
7625         (set_tdesc_osabi): Declare.
7626         * configure.tgt (i[34567]86-*-linux*): Add i386.o.
7627         * i386-linux-tdep.c: Don't include ../features/i386/32bit-XXX.c.
7628         include arch/i386.h.
7629         (i386_linux_read_description): Remove code and call
7630         i386_create_target_description.
7631         (set_tdesc_architecture): New function.
7632         (set_tdesc_osabi): New function.
7633         * target-descriptions.h (allocate_target_description): Remove.
7634
7635 2017-09-05  Yao Qi  <yao.qi@linaro.org>
7636
7637         * arch/tdesc.h (tdesc_create_feature): Add an argument xml.
7638         * target-descriptions.c (tdesc_create_feature): Likewise, and
7639         adjust code.
7640         * features/i386/32bit-avx.c: Re-generated.
7641         * features/i386/32bit-avx512.c: Re-generated.
7642         * features/i386/32bit-core.c: Re-generated.
7643         * features/i386/32bit-linux.c: Re-generated.
7644         * features/i386/32bit-mpx.c: Re-generated.
7645         * features/i386/32bit-pkeys.c: Re-generated.
7646         * features/i386/32bit-sse.c: Re-generated.
7647
7648 2017-09-05  Yao Qi  <yao.qi@linaro.org>
7649
7650         * regformats/regdef.h (struct reg): Override operator == and !=.
7651
7652 2017-09-05  Yao Qi  <yao.qi@linaro.org>
7653
7654         * arch/tdesc.h: New file.
7655         * regformats/regdat.sh: Generate code using tdesc_create_reg.
7656         * target-descriptions.c: Update comments.
7657         * target-descriptions.h: Include "arch/tdesc.h".  Remove the
7658         declarations.
7659         * features/i386/32bit-avx.c: Re-generated.
7660         * features/i386/32bit-avx512.c: Re-generated.
7661         * features/i386/32bit-core.c: Re-generated.
7662         * features/i386/32bit-linux.c: Re-generated.
7663         * features/i386/32bit-mpx.c: Re-generated.
7664         * features/i386/32bit-pkeys.c: Re-generated.
7665         * features/i386/32bit-sse.c: Re-generated.
7666
7667 2017-09-05  Yao Qi  <yao.qi@linaro.org>
7668
7669         * regformats/regdat.sh: Update generated code.
7670
7671 2017-09-05  Yao Qi  <yao.qi@linaro.org>
7672
7673         * regformats/regdat.sh: Adjust code order.
7674
7675 2017-09-05  Simon Marchi  <simon.marchi@ericsson.com>
7676
7677         * expprint.c (dump_subexp_body_standard): Use constant format
7678         string in fprintf_filtered call.
7679
7680 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
7681
7682         * configure.nat: Add "x86-nat.o x86-dregs.o" for NetBSD/amd64 and
7683         NetBSD/i386.
7684         * x86-bsd-nat.c [!DBREG_DRX && __NetBSD__]: Define DBREG_DRX.
7685
7686 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
7687
7688         * bsd-kvm.o: Make <sys/user.h> conditional on HAVE_SYS_USER_H.
7689
7690 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
7691
7692         * bsd-kvm.o: Define _KMEMUSER.
7693         * configure.ac: Define _KMEMUSER when checking for "struct lwp".
7694         * configure: Regenerate.
7695
7696 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
7697
7698         * amd64-fbsd-nat.c: Add include of "x86-xstate.h".
7699         * i386-fbsd-nat.c: Likewise.
7700
7701 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
7702
7703         * unittests/array-view-selftests.c: Add include of <array>.
7704
7705 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
7706
7707         * spu-tdep.c (flush_ea_cache): Add missing argument to
7708         call_function_by_hand.
7709
7710 2017-09-04  Pedro Alves  <palves@redhat.com>
7711
7712         * NEWS (Safer support for debugging with no debug info): New.
7713
7714 2017-09-04  Pedro Alves  <palves@redhat.com>
7715
7716         * c-exp.y (function_method, function_method_void): Add current
7717         instance flags to TYPE_INSTANCE.
7718         * dwarf2read.c (check_modifier): New.
7719         (compute_delayed_physnames): Assert that only C++ adds delayed
7720         physnames.  Mark fn_fields as const/volatile depending on
7721         physname.
7722         * eval.c (make_params): New type_instance_flags parameter.  Use
7723         it as the new type's instance flags.
7724         (evaluate_subexp_standard) <TYPE_INSTANCE>: Extract the instance
7725         flags element and pass it to make_params.
7726         * expprint.c (print_subexp_standard) <TYPE_INSTANCE>: Handle
7727         instance flags element.
7728         (dump_subexp_body_standard) <TYPE_INSTANCE>: Likewise.
7729         * gdbtypes.h: Include "enum-flags.h".
7730         (type_instance_flags): New enum-flags type.
7731         (TYPE_CONST, TYPE_VOLATILE, TYPE_RESTRICT, TYPE_ATOMIC)
7732         (TYPE_CODE_SPACE, TYPE_DATA_SPACE): Return boolean.
7733         * parse.c (operator_length_standard) <TYPE_INSTANCE>: Adjust.
7734         (follow_type_instance_flags): New function.
7735         (operator_check_standard) <TYPE_INSTANCE>: Adjust.
7736         * parser-defs.h (follow_type_instance_flags): Declare.
7737         * valops.c (value_struct_elt_for_reference): const/volatile must
7738         match too.
7739
7740 2017-09-04  Pedro Alves  <palves@redhat.com>
7741
7742         * cp-namespace.c (cp_search_static_and_baseclasses): Handle
7743         function/method scopes; lookup the nested name as a function local
7744         static variable.
7745
7746 2017-09-04  Pedro Alves  <palves@redhat.com>
7747
7748         (%type <voidval>): Add function_method.
7749         * c-exp.y (exp): New production for calls with no arguments.
7750         (function_method, function_method_void_or_typelist): New
7751         productions.
7752         (exp): New production for "method()::static_var".
7753         * eval.c (evaluate_subexp_standard): Handle OP_FUNC_STATIC_VAR.
7754         * expprint.c (print_subexp_standard, dump_subexp_body_standard):
7755         Handle OP_FUNC_STATIC_VAR.
7756         * parse.c (operator_length_standard):
7757         Handle OP_FUNC_STATIC_VAR.
7758
7759 2017-09-04  Pedro Alves  <palves@redhat.com>
7760
7761         * eval.c (evaluate_subexp_standard): Remove UNOP_MEMVAL_TLS
7762         handling.
7763         * expprint.c (print_subexp_standard, dump_subexp_body_standard):
7764         Ditto.
7765         * parse.c (operator_length_standard, operator_check_standard):
7766         Ditto.
7767         * std-operator.def (UNOP_MEMVAL_TLS): Delete.
7768
7769 2017-09-04  Pedro Alves  <palves@redhat.com>
7770
7771         * ax-gdb.c: Include "typeprint.h".
7772         (gen_expr_for_cast): New function.
7773         (gen_expr) <OP_CAST, OP_CAST_TYPE>: Use it.
7774         <OP_VAR_VALUE, OP_MSYM_VAR_VALUE>: Error out if the variable's
7775         type is unknown.
7776         * dwarf2read.c (new_symbol_full): Fallback to int instead of
7777         nodebug_data_symbol.
7778         * eval.c: Include "typeprint.h".
7779         (evaluate_subexp_standard) <OP_VAR_VALUE, OP_VAR_MSYM_VALUE>:
7780         Error out if symbol has unknown type.
7781         <UNOP_CAST, UNOP_CAST_TYPE>: Common bits factored out to
7782         evaluate_subexp_for_cast.
7783         (evaluate_subexp_for_address, evaluate_subexp_for_sizeof): Handle
7784         OP_VAR_MSYM_VALUE.
7785         (evaluate_subexp_for_cast): New function.
7786         * gdbtypes.c (init_nodebug_var_type): New function.
7787         (objfile_type): Use it to initialize types of variables with no
7788         debug info.
7789         * typeprint.c (error_unknown_type): New.
7790         * typeprint.h (error_unknown_type): New declaration.
7791         * compile/compile-c-types.c (convert_type_basic): Handle
7792         TYPE_CODE_ERROR; warn and fallback to int for variables with
7793         unknown type.
7794
7795 2017-09-04  Pedro Alves  <palves@redhat.com>
7796
7797         * eval.c (evaluate_var_value): New function, factored out from ...
7798         (evaluate_subexp_standard): ... here.
7799
7800 2017-09-04  Pedro Alves  <palves@redhat.com>
7801
7802         * eval.c (evaluate_subexp_standard) <UNOP_COMPLEMENT, UNOP_ADDR>:
7803         Remove useless assignments to 'op'.
7804
7805 2017-09-04  Pedro Alves  <palves@redhat.com>
7806
7807         * eval.c (eval_skip_value): New function.
7808         (evaluate_subexp_standard): Use it.
7809
7810 2017-09-04  Pedro Alves  <palves@redhat.com>
7811
7812         * eval.c (evaluate_subexp_standard): <OP_FUNCALL>: Extract
7813         function name from symbol/minsym and pass it to
7814         error_call_unknown_return_type.
7815
7816 2017-09-04  Pedro Alves  <palves@redhat.com>
7817
7818         * ada-lang.c (resolve_subexp): Handle OP_VAR_MSYM_VALUE.
7819         * ax-gdb.c (gen_msym_var_ref): New function.
7820         (gen_expr): Handle OP_VAR_MSYM_VALUE.
7821         * eval.c (evaluate_var_msym_value): New function.
7822         * eval.c (evaluate_subexp_standard): Handle OP_VAR_MSYM_VALUE.
7823         <OP_FUNCALL>: Extract function name from symbol/minsym and pass it
7824         to call_function_by_hand.
7825         * expprint.c (print_subexp_standard, dump_subexp_body_standard):
7826         Handle OP_VAR_MSYM_VALUE.
7827         (union exp_element) <msymbol>: New field.
7828         * minsyms.h (struct type): Forward declare.
7829         (find_minsym_type_and_address): Declare.
7830         * parse.c (write_exp_elt_msym): New function.
7831         (write_exp_msymbol): Delete, refactored as ...
7832         (find_minsym_type_and_address): ... this new function.
7833         (write_exp_msymbol): Reimplement using OP_VAR_MSYM_VALUE.
7834         (operator_length_standard, operator_check_standard): Handle
7835         OP_VAR_MSYM_VALUE.
7836         * std-operator.def (OP_VAR_MSYM_VALUE): New.
7837
7838 2017-09-04  Pedro Alves  <palves@redhat.com>
7839
7840         * ada-lang.c (ada_evaluate_subexp) <TYPE_CODE_FUNC>: Don't handle
7841         TYPE_GNU_IFUNC specially here.  Throw error if return type is
7842         unknown.
7843         * ada-typeprint.c (print_func_type): Handle functions with unknown
7844         return type.
7845         * c-typeprint.c (c_type_print_base): Handle functions and methods
7846         with unknown return type.
7847         * compile/compile-c-symbols.c (convert_symbol_bmsym)
7848         <mst_text_gnu_ifunc>: Use nodebug_text_gnu_ifunc_symbol.
7849         * compile/compile-c-types.c: Include "objfiles.h".
7850         (convert_func): For functions with unknown return type, warn and
7851         default to int.
7852         * compile/compile-object-run.c (compile_object_run): Adjust call
7853         to call_function_by_hand_dummy.
7854         * elfread.c (elf_gnu_ifunc_resolve_addr): Adjust call to
7855         call_function_by_hand.
7856         * eval.c (evaluate_subexp_standard): Adjust calls to
7857         call_function_by_hand.  Handle functions and methods with unknown
7858         return type.  Pass expect_type to call_function_by_hand.
7859         * f-typeprint.c (f_type_print_base): Handle functions with unknown
7860         return type.
7861         * gcore.c (call_target_sbrk): Adjust call to
7862         call_function_by_hand.
7863         * gdbtypes.c (objfile_type): Leave nodebug text symbol with NULL
7864         return type instead of int.  Make nodebug_text_gnu_ifunc_symbol be
7865         an integer address type instead of nodebug.
7866         * guile/scm-value.c (gdbscm_value_call): Adjust call to
7867         call_function_by_hand.
7868         * infcall.c (error_call_unknown_return_type): New function.
7869         (call_function_by_hand): New "default_return_type" parameter.
7870         Pass it down.
7871         (call_function_by_hand_dummy): New "default_return_type"
7872         parameter.  Use it instead of defaulting to int.  If there's no
7873         default and the return type is unknown, throw an error.  If
7874         there's a default return type, and the called function has no
7875         debug info, then assume the function is prototyped.
7876         * infcall.h (call_function_by_hand, call_function_by_hand_dummy):
7877         New "default_return_type" parameter.
7878         (error_call_unknown_return_type): New declaration.
7879         * linux-fork.c (call_lseek): Cast return type of lseek.
7880         (inferior_call_waitpid, checkpoint_command): Adjust calls to
7881         call_function_by_hand.
7882         * linux-tdep.c (linux_infcall_mmap, linux_infcall_munmap): Adjust
7883         calls to call_function_by_hand.
7884         * m2-typeprint.c (m2_procedure): Handle functions with unknown
7885         return type.
7886         * objc-lang.c (lookup_objc_class, lookup_child_selector)
7887         (value_nsstring, print_object_command): Adjust calls to
7888         call_function_by_hand.
7889         * p-typeprint.c (pascal_type_print_varspec_prefix): Handle
7890         functions with unknown return type.
7891         (pascal_type_print_func_varspec_suffix): New function.
7892         (pascal_type_print_varspec_suffix) <TYPE_CODE_FUNC,
7893         TYPE_CODE_METHOD>: Use it.
7894         * python/py-value.c (valpy_call): Adjust call to
7895         call_function_by_hand.
7896         * rust-lang.c (rust_evaluate_funcall): Adjust call to
7897         call_function_by_hand.
7898         * valarith.c (value_x_binop, value_x_unop): Adjust calls to
7899         call_function_by_hand.
7900         * valops.c (value_allocate_space_in_inferior): Adjust call to
7901         call_function_by_hand.
7902         * typeprint.c (type_print_unknown_return_type): New function.
7903         * typeprint.h (type_print_unknown_return_type): New declaration.
7904
7905 2017-09-04  Pedro Alves  <palves@redhat.com>
7906
7907         * gdbtypes.c (lookup_function_type_with_arguments): Mark function
7908         types with more than one parameter as prototyped.
7909
7910 2017-09-04  Pedro Alves  <palves@redhat.com>
7911
7912         * cli/cli-cmds.c (print_disassembly, disassemble_current_function)
7913         (disassemble_command): Use gdb_disassembly_flags instead of bare
7914         int.
7915         * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn)
7916         (dump_insns, do_mixed_source_and_assembly_deprecated)
7917         (do_mixed_source_and_assembly, do_assembly_only, gdb_disassembly):
7918         Use gdb_disassembly_flags instead of bare int.
7919         * disasm.h (DISASSEMBLY_SOURCE_DEPRECATED, DISASSEMBLY_RAW_INSN)
7920         (DISASSEMBLY_OMIT_FNAME, DISASSEMBLY_FILENAME)
7921         (DISASSEMBLY_OMIT_PC, DISASSEMBLY_SOURCE)
7922         (DISASSEMBLY_SPECULATIVE): No longer macros.  Instead they're...
7923         (enum gdb_disassembly_flag): ... values of this new enumeration.
7924         (gdb_disassembly_flags): Define.
7925         (gdb_disassembly)
7926         (gdb_pretty_print_disassembler::pretty_print_insn): Use it.
7927         * mi/mi-cmd-disas.c (mi_cmd_disassemble): Use
7928         gdb_disassembly_flags instead of bare int.
7929         * record-btrace.c (btrace_insn_history)
7930         (record_btrace_insn_history, record_btrace_insn_history_range)
7931         (record_btrace_insn_history_from): Use gdb_disassembly_flags
7932         instead of bare int.
7933         * record.c (get_insn_history_modifiers, cmd_record_insn_history):
7934         Use gdb_disassembly_flags instead of bare int.
7935         * target-debug.h (target_debug_print_gdb_disassembly_flags):
7936         Define.
7937         * target-delegates.c: Regenerate.
7938         * target.c (target_insn_history, target_insn_history_from)
7939         (target_insn_history_range): Use gdb_disassembly_flags instead of
7940         bare int.
7941         * target.h: Include "disasm.h".
7942         (struct target_ops) <to_insn_history, to_insn_history_from,
7943         to_insn_history_range>: Use gdb_disassembly_flags instead of bare
7944         int.
7945         (target_insn_history, target_insn_history_from)
7946         (target_insn_history_range): Use gdb_disassembly_flags instead of
7947         bare int.
7948
7949 2017-09-04  Simon Marchi  <simon.marchi@ericsson.com>
7950
7951         * cli/cli-script.c (build_command_line): For if/while commands,
7952         check whether args is empty.
7953
7954 2017-09-04  Simon Marchi  <simon.marchi@ericsson.com>
7955
7956         * cli/cli-script.h (enum misc_command_type): Move from defs.h.
7957         (enum command_control_type): Likewise.
7958         (struct command_line): Likewise.
7959         (free_command_lines): Likewise.
7960         (struct command_lines_deleter): Likewise.
7961         (command_line_up): Likewise.
7962         (read_command_lines): Likewise.
7963         (read_command_lines_1): Likewise.
7964         * defs.h (enum misc_command_type): Move to cli/cli-script.h.
7965         (enum command_control_type): Likewise.
7966         (struct command_line): Likewise.
7967         (free_command_lines): Likewise.
7968         (struct command_lines_deleter): Likewise.
7969         (command_line_up): Likewise.
7970         (read_command_lines): Likewise.
7971         (read_command_lines_1): Likewise.
7972         * breakpoint.h: Include cli/cli-script.h.
7973         * extension-priv.h: Likewise.
7974         * gdbcmd.h: Likewise.
7975
7976 2017-09-04  Pedro Alves  <palves@redhat.com>
7977
7978         * ada-lang.c (is_known_support_routine): Move sal declaration to
7979         where it is initialized.
7980         * breakpoint.c (create_internal_breakpoint, init_catchpoint)
7981         (parse_breakpoint_sals, decode_static_tracepoint_spec)
7982         (clear_command, update_static_tracepoint): Remove init_sal
7983         references.  Move declarations closer to initializations.
7984         * cli/cli-cmds.c (list_command): Move sal declarations closer to
7985         initializations.
7986         * elfread.c (elf_gnu_ifunc_resolver_stop): Remove init_sal
7987         references.  Move sal declarations closer to initializations.
7988         * frame.c (find_frame_sal): Return a symtab_and_line via function
7989         return instead of output parameter.  Remove init_sal references.
7990         * frame.h (find_frame_sal): Return a symtab_and_line via function
7991         return instead of output parameter.
7992         * guile/scm-frame.c (gdbscm_frame_sal): Adjust.
7993         * guile/scm-symtab.c (stscm_make_sal_smob): Use in-place new
7994         instead of memset.
7995         (gdbscm_find_pc_line): Remove init_sal reference.
7996         * infcall.c (call_function_by_hand_dummy): Remove init_sal
7997         references.  Move declarations closer to initializations.
7998         * infcmd.c (set_step_frame): Update.  Move declarations closer to
7999         initializations.
8000         (finish_backward): Remove init_sal references.  Move declarations
8001         closer to initializations.
8002         * infrun.c (process_event_stop_test, handle_step_into_function)
8003         (insert_hp_step_resume_breakpoint_at_frame)
8004         (insert_step_resume_breakpoint_at_caller): Likewise.
8005         * linespec.c (create_sals_line_offset, decode_digits_ordinary)
8006         (symbol_to_sal): Likewise.
8007         * probe.c (parse_probes_in_pspace): Remove init_sal reference.
8008         * python/py-frame.c (frapy_find_sal): Move sal declaration closer
8009         to its initialization.
8010         * reverse.c (save_bookmark_command): Use new/delete.  Remove
8011         init_sal references.  Move declarations closer to initializations.
8012         * source.c (get_current_source_symtab_and_line): Remove brace
8013         initialization.
8014         (set_current_source_symtab_and_line): Now takes the sal by const
8015         reference.  Remove brace initialization.
8016         (line_info): Remove init_sal reference.
8017         * source.h (set_current_source_symtab_and_line): Now takes a
8018         symtab_and_line via const reference.
8019         * stack.c (set_current_sal_from_frame): Adjust.
8020         (print_frame_info): Adjust.
8021         (get_last_displayed_sal): Return the sal via function return
8022         instead of via output parameter.  Simplify.
8023         (frame_info): Adjust.
8024         * stack.h (get_last_displayed_sal): Return the sal via function
8025         return instead of via output parameter.
8026         * symtab.c (init_sal): Delete.
8027         (find_pc_sect_line): Remove init_sal references.  Move
8028         declarations closer to initializations.
8029         (find_function_start_sal): Remove init_sal references.  Move
8030         declarations closer to initializations.
8031         * symtab.h (struct symtab_and_line): In-class initialize all
8032         fields.
8033         * tracepoint.c (set_traceframe_context)
8034         (print_one_static_tracepoint_marker): Remove init_sal references.
8035         Move declarations closer to initializations.
8036         * tui/tui-disasm.c (tui_show_disassem_and_update_source): Adjust.
8037         * tui/tui-stack.c (tui_show_frame_info): Adjust.  Move
8038         declarations closer to initializations.
8039         * tui/tui-winsource.c (tui_update_source_window_as_is): Remove
8040         init_sal references.  Adjust.
8041
8042 2017-09-04  Pedro Alves  <palves@redhat.com>
8043
8044         * ax-gdb.c (agent_command_1): Use range-for.
8045         * break-catch-throw.c (re_set_exception_catchpoint): Update.
8046         * breakpoint.c: Include "common/array-view.h".
8047         (init_breakpoint_sal, create_breakpoint_sal): Change sals
8048         parameter from struct symtabs_and_lines to
8049         array_view<symtab_and_line>.  Adjust.  Use range-for.  Update.
8050         (breakpoint_sals_to_pc): Change sals parameter from struct
8051         symtabs_and_lines to std::vector reference.
8052         (check_fast_tracepoint_sals): Change sals parameter from struct
8053         symtabs_and_lines to std::array_view.  Use range-for.
8054         (decode_static_tracepoint_spec): Return a std::vector instead of
8055         symtabs_and_lines.  Update.
8056         (create_breakpoint): Update.
8057         (break_range_command, until_break_command, clear_command): Update.
8058         (base_breakpoint_decode_location, bkpt_decode_location)
8059         (bkpt_probe_create_sals_from_location)
8060         (bkpt_probe_decode_location, tracepoint_decode_location)
8061         (tracepoint_probe_decode_location)
8062         (strace_marker_create_sals_from_location): Return a std::vector
8063         instead of symtabs_and_lines.
8064         (strace_marker_create_breakpoints_sal): Update.
8065         (strace_marker_decode_location): Return a std::vector instead of
8066         symtabs_and_lines.  Update.
8067         (update_breakpoint_locations): Change struct symtabs_and_lines
8068         parameters to gdb::array_view.  Adjust.
8069         (location_to_sals): Return a std::vector instead of
8070         symtabs_and_lines.  Update.
8071         (breakpoint_re_set_default): Use std::vector instead of struct
8072         symtabs_and_lines.
8073         (decode_location_default): Return a std::vector instead of
8074         symtabs_and_lines.  Update.
8075         * breakpoint.h: Include "common/array-view.h".
8076         (struct breakpoint_ops) <decode_location>: Now returns a
8077         std::vector instead of returning a symtabs_and_lines via output
8078         parameter.
8079         (update_breakpoint_locations): Change sals parameters to use
8080         gdb::array_view.
8081         * cli/cli-cmds.c (edit_command, list_command): Update to use
8082         std::vector and gdb::array_view.
8083         (ambiguous_line_spec): Adjust to use gdb::array_view and
8084         range-for.
8085         (compare_symtabs): Rename to ...
8086         (cmp_symtabs): ... this.  Change parameters to symtab_and_line
8087         const reference and adjust.
8088         (filter_sals): Rewrite using std::vector and standard algorithms.
8089         * elfread.c (elf_gnu_ifunc_resolver_return_stop): Simplify.
8090         (jump_command): Update to use std::vector.
8091         * linespec.c (struct linespec_state) <canonical_names>: Update
8092         comment.
8093         (add_sal_to_sals_basic): Delete.
8094         (add_sal_to_sals, filter_results, convert_results_to_lsals)
8095         (decode_line_2, create_sals_line_offset)
8096         (convert_address_location_to_sals, convert_linespec_to_sals)
8097         (convert_explicit_location_to_sals, parse_linespec)
8098         (event_location_to_sals, decode_line_full, decode_line_1)
8099         (decode_line_with_current_source)
8100         (decode_line_with_last_displayed, decode_objc)
8101         (decode_digits_list_mode, decode_digits_ordinary, minsym_found)
8102         (linespec_result::~linespec_result): Adjust to use std::vector
8103         instead of symtabs_and_lines.
8104         * linespec.h (linespec_sals::sals): Now a std::vector.
8105         (struct linespec_result): Use std::vector, bool, and in-class
8106         initialization.
8107         (decode_line_1, decode_line_with_current_source)
8108         (decode_line_with_last_displayed): Return std::vector.
8109         * macrocmd.c (info_macros_command): Use std::vector.
8110         * mi/mi-main.c (mi_cmd_trace_find): Use std::vector.
8111         * probe.c (parse_probes_in_pspace, parse_probes): Adjust to use
8112         std::vector.
8113         * probe.h (parse_probes): Return a std::vector.
8114         * python/python.c (gdbpy_decode_line): Use std::vector and
8115         gdb::array_view.
8116         * source.c (select_source_symtab, line_info): Use std::vector.
8117         * stack.c (func_command): Use std::vector.
8118         * symtab.h (struct symtabs_and_lines): Delete.
8119         * tracepoint.c (tfind_line_command, scope_info): Use std::vector.
8120
8121 2017-09-04  Pedro Alves  <palves@redhat.com>
8122
8123         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
8124         unittests/array-view-selftests.c.
8125         (SUBDIR_UNITTESTS_OBS): Add array-view-selftests.o.
8126         * common/array-view.h: New file.
8127         * unittests/array-view-selftests.c: New file.
8128
8129 2017-09-04  Pedro Alves  <palves@redhat.com>
8130
8131         * cli/cli-cmds.c (edit_command): Pass message to
8132         ambiguous_line_spec.
8133         (list_command): Pass message to ambiguous_line_spec.  Say
8134         "first"/"last" instead of "start" and "end" to be consistent with
8135         the manual.
8136         (ambiguous_line_spec): Add 'format' and vararg parameters.  Use
8137         them to print formatted message.
8138
8139 2017-09-04  Pedro Alves  <palves@redhat.com>
8140
8141         * btrace.c (ftrace_add_pt): Pass btrace_insn to
8142         ftrace_update_insns by reference instead of pointer.
8143
8144 2017-09-04  Yao Qi  <yao.qi@linaro.org>
8145
8146         * i386-go32-tdep.c: Include x86-xstate.h.
8147         (i386_go32_init_abi): Call i386_target_description.
8148         * i386-tdep.c (i386_target_description): Return tdesc_i386_mmx
8149         if xcr0 is X86_XSTATE_X87_MASK.
8150         * i386-tdep.h (tdesc_i386): Remove the declaration.
8151         (tdesc_i386_mmx): Likewise.
8152
8153 2017-09-04  Yao Qi  <yao.qi@linaro.org>
8154
8155         * i386-fbsd-tdep.c (i386fbsd_core_read_xcr0): Return
8156         X86_XSTATE_SSE_MASK instead of 0.
8157
8158 2017-09-04  Yao Qi  <yao.qi@linaro.org>
8159
8160         * amd64-fbsd-nat.c (amd64fbsd_read_description): Call
8161         i386_target_description.
8162         * i386-fbsd-nat.c (i386fbsd_read_description): Call
8163         i386_target_description.
8164         * i386-tdep.c (i386_gdbarch_init): Likewise.
8165
8166 2017-09-04  Yao Qi  <yao.qi@linaro.org>
8167
8168         * amd64-darwin-tdep.c: Include "x86-xstate.h".
8169         (x86_darwin_init_abi_64): Call amd64_target_description.
8170         * amd64-dicos-tdep.c: Likewise.
8171         * amd64-fbsd-nat.c: Likewise.
8172         * amd64-fbsd-tdep.c: Likewise.
8173         * amd64-nbsd-tdep.c: Likewise.
8174         * amd64-obsd-tdep.c: Likewise.
8175         * amd64-sol2-tdep.c: Likewise.
8176         * amd64-windows-tdep.c: Likewise.
8177         * amd64-tdep.h (tdesc_amd64): Remove the declaration.
8178
8179 2017-09-04  Simon Marchi  <simon.marchi@ericsson.com>
8180
8181         * btrace.h (btrace_insn_s, DEF_VEC_O (btrace_insn_s)): Remove.
8182         (btrace_function) <insn>: Change type to use std::vector.
8183         * btrace.c (ftrace_debug, ftrace_call_num_insn,
8184         ftrace_find_call, ftrace_new_gap, ftrace_update_function,
8185         ftrace_update_insns, ftrace_compute_global_level_offset,
8186         btrace_stitch_bts, btrace_clear, btrace_insn_get,
8187         btrace_insn_end, btrace_insn_next, btrace_insn_prev): Adjust to
8188         change to std::vector.
8189         (ftrace_update_insns): Adjust to change to std::vector, change
8190         type of INSN parameter.
8191         (btrace_compute_ftrace_bts): Adjust call to ftrace_update_insns.
8192         * record-btrace.c (btrace_call_history_insn_range,
8193         btrace_compute_src_line_range,
8194         record_btrace_frame_prev_register): Adjust to change to
8195         std::vector.
8196         * python/py-record-btrace.c (recpy_bt_func_instructions): Adjust
8197         to change to std::vector.
8198
8199 2017-09-03  Tom Tromey  <tom@tromey.com>
8200
8201         * corefile.c (reopen_exec_file): Use std::string.
8202
8203 2017-09-03  Tom Tromey  <tom@tromey.com>
8204
8205         * compile/compile.c (compile_register_name_mangled): Return
8206         std::string.
8207         * compile/compile-loc2c.c (pushf_register_address): Update.
8208         (pushf_register): Update.
8209         * compile/compile-c-types.c (convert_array): Update.
8210         * compile/compile-c-symbols.c (generate_vla_size): Update.
8211         (error_symbol_once): Use a gdb::unique_xmalloc_ptr.
8212         (symbol_substitution_name): Return a gdb::unique_xmalloc_ptr.
8213         (convert_one_symbol): Update.
8214         (generate_c_for_for_one_variable): Update.
8215         * compile/compile-c-support.c (c_get_range_decl_name): Return a
8216         std::string.
8217         (generate_register_struct): Update.
8218         * compile/compile-internal.h (c_get_range_decl_name): Return a
8219         std::string.
8220         (compile_register_name_mangled): Return std::string.
8221
8222 2017-09-03  Tom Tromey  <tom@tromey.com>
8223
8224         * utils.c (perror_string): Return a std::string.
8225         (throw_perror_with_name, perror_warning_with_name): Update.
8226
8227 2017-09-03  Tom Tromey  <tom@tromey.com>
8228
8229         * demangle.c (demangle_command): Use std::string,
8230         unique_xmalloc_ptr.
8231
8232 2017-09-03  Tom Tromey  <tom@tromey.com>
8233
8234         * cli/cli-setshow.c (do_set_command): Use std::string.
8235
8236 2017-09-03  Tom Tromey  <tom@tromey.com>
8237
8238         * cli/cli-cmds.c (cd_command): Use gdb::unique_xmalloc_ptr.
8239
8240 2017-09-03  Tom Tromey  <tom@tromey.com>
8241
8242         * mi/mi-interp.c (mi_cmd_interpreter_exec): Use std::string.
8243
8244 2017-09-03  Tom Tromey  <tom@tromey.com>
8245
8246         * mi/mi-cmd-env.c (env_execute_cli_command): Use
8247         gdb::unique_xmalloc_ptr.
8248
8249 2017-09-03  Tom Tromey  <tom@tromey.com>
8250
8251         * thread.c (print_thread_info_1): Use string_printf.
8252         (thread_apply_command, thread_apply_all_command): Use
8253         std::string.
8254
8255 2017-09-03  Tom Tromey  <tom@tromey.com>
8256
8257         * valprint.c (val_print_string): Update.
8258         * gdbcore.h (memory_error_message): Return std::string.
8259         * corefile.c (memory_error_message): Return std::string.
8260         (memory_error): Update.
8261         * breakpoint.c (insert_bp_location): Update.
8262
8263 2017-09-03  Simon Marchi  <simon.marchi@ericsson.com>
8264
8265         * target/waitstatus.h (target_waitstatus_to_string): Change
8266         return type to std::string.
8267         * target/waitstatus.c (target_waitstatus_to_string): Return
8268         std::string.
8269         * target.h (target_waitstatus_to_string): Remove declaration.
8270         * infrun.c (resume, clear_proceed_status_thread,
8271         print_target_wait_results, do_target_wait, save_waitstatus,
8272         stop_all_threads): Adjust.
8273         * record-btrace.c (record_btrace_wait): Adjust.
8274         * target-debug.h
8275         (target_debug_print_struct_target_waitstatus_p): Adjust.
8276
8277 2017-09-01  Jan Kratochvil  <jan.kratochvil@redhat.com>
8278
8279         PR gdb/22046
8280         * nat/linux-procfs.c (parse_proc_status_state): Fix PROC_STATE_STOPPED
8281         detection.
8282
8283 2017-08-31  Sergio Durigan Junior  <sergiodj@redhat.com>
8284
8285         * NEWS (Changes since GDB 8.0): Add entry mentioning new support
8286         for setting/unsetting environment variables on the remote target.
8287         (New remote packets): Add entries for QEnvironmentHexEncoded,
8288         QEnvironmentUnset and QEnvironmentReset.
8289         * common/environ.c (gdb_environ::operator=): Extend method to
8290         handle m_user_set_env_list and m_user_unset_env_list.
8291         (gdb_environ::clear): Likewise.
8292         (match_var_in_string): Change type of first parameter from 'char
8293         *' to 'const char *'.
8294         (gdb_environ::set): Extend method to handle
8295         m_user_set_env_list and m_user_unset_env_list.
8296         (gdb_environ::unset): Likewise.
8297         (gdb_environ::clear_user_set_env): New method.
8298         (gdb_environ::user_set_envp): Likewise.
8299         (gdb_environ::user_unset_envp): Likewise.
8300         * common/environ.h (gdb_environ): Handle m_user_set_env_list and
8301         m_user_unset_env_list on move constructor/assignment.
8302         (unset): Add new default parameter 'update_unset_list = true'.
8303         (clear_user_set_env): New method.
8304         (user_set_envp): Likewise.
8305         (user_unset_envp): Likewise.
8306         (m_user_set_env_list): New std::set.
8307         (m_user_unset_env_list): Likewise.
8308         * common/rsp-low.c (hex2str): New function.
8309         (bin2hex): New overload for bin2hex function.
8310         * common/rsp-low.c (hex2str): New prototype.
8311         (str2hex): New overload prototype.
8312         * remote.c: Include "environ.h". Add QEnvironmentHexEncoded,
8313         QEnvironmentUnset and QEnvironmentReset.
8314         (remote_protocol_features): Add QEnvironmentHexEncoded,
8315         QEnvironmentUnset and QEnvironmentReset packets.
8316         (send_environment_packet): New function.
8317         (extended_remote_environment_support): Likewise.
8318         (extended_remote_create_inferior): Call
8319         extended_remote_environment_support.
8320         (_initialize_remote): Add QEnvironmentHexEncoded,
8321         QEnvironmentUnset and QEnvironmentReset packet configs.
8322         * unittests/environ-selftests.c (gdb_selftest_env_var):
8323         New variable.
8324         (test_vector_initialization): New function.
8325         (test_init_from_host_environ): Likewise.
8326         (test_reinit_from_host_environ): Likewise.
8327         (test_set_A_unset_B_unset_A_cannot_find_A_can_find_B):
8328         Likewise.
8329         (test_unset_set_empty_vector): Likewise.
8330         (test_vector_clear): Likewise.
8331         (test_std_move): Likewise.
8332         (test_move_constructor):
8333         (test_self_move): Likewise.
8334         (test_set_unset_reset): Likewise.
8335         (run_tests): Rewrite in terms of the functions above.
8336
8337 2017-08-31  Weimin Pan  <weimin.pan@oracle.com>
8338
8339         * sparc64-tdep.c (adi_stat_t): Fix comment formatting.
8340         (adi_available): Use a temp variable of type CORE_ADDR as argument
8341         3 when calling target_auxv_search.
8342         (adi_normalize_address): Use masks and xor operators to calculate
8343         normalized address.
8344         (adi_read_versions, adi_write_versions, adi_print_versions)
8345         (do_examine, do_assign): Use paddress.
8346
8347 2017-08-29  John Baldwin  <jhb@FreeBSD.org>
8348
8349         * mips-fbsd-nat.c (getfpregs_supplies): Return true for FIR.
8350         * mips-fbsd-tdep.c (mips_fbsd_supply_fpregs): Split supply of FSR
8351         out of loop and add supply of FIR.
8352         (mips_fbsd_collect_fpregs): Split collect of FSR out of loop and
8353         add collect of FIR.
8354
8355 2017-08-28  Simon Marchi  <simon.marchi@ericsson.com>
8356
8357         PR gdb/21827
8358         * cli/cli-script.c (define_command): Don't convert command name
8359         to lower case.
8360
8361 2017-08-25  Joel Brobecker  <brobecker@adacore.com>
8362
8363         * ada-lang.c (ada_lookup_struct_elt_type): Remove parameter "dispp".
8364         Update all callers accordingly. Remove all code blocks handling
8365         the case where DISPP is not NULL.
8366
8367 2017-08-24  Jan Kratochvil  <jan.kratochvil@redhat.com>
8368
8369         PR symtab/22003
8370         * dwarf2read.c (dwarf2_const_value_attr, dump_die_shallow)
8371         (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
8372         (skip_form_bytes, attr_form_is_constant): Handle DW_FORM_implicit_const.
8373
8374 2017-08-24  Jan Kratochvil  <jan.kratochvil@redhat.com>
8375
8376         * dwarf2read.c (build_type_psymtabs_reader): New prototype.
8377         (process_psymtab_comp_unit): Accept IS_DEBUG_TYPES.
8378         (read_comp_units_from_section): New parameter abbrev_section, use
8379         read_and_check_comp_unit_head, allocate signatured_type if needed.
8380         (create_all_comp_units): Update read_comp_units_from_section caller.
8381
8382 2017-08-23  Pedro Alves  <palves@redhat.com>
8383
8384         PR remote/21852
8385         * remote.c (add_current_inferior_and_thread): Set inferior_ptid
8386         to null_ptid and switch to thread without reading the registers
8387         after adding the inferior.
8388
8389 2017-08-23  Jan Kratochvil  <jan.kratochvil@redhat.com>
8390
8391         * NEWS (Changes since GDB 8.0): Add set compile-gcc and show
8392         compile-gcc.
8393         * compile/compile.c (compile_gcc, show_compile_gcc): New.
8394         (compile_to_object): Implement compile_gcc.
8395         (_initialize_compile): Install "set compile-gcc".  Initialize
8396         compile_gcc.
8397
8398 2017-08-23  Jan Kratochvil  <jan.kratochvil@redhat.com>
8399
8400         * compile/compile.c (compile_to_object): Conditionally call
8401         set_verbose.  Conditionally call compile or compile_v0.
8402
8403 2017-08-07  Weimin Pan  <weimin.pan@oracle.com>
8404
8405         * sparc64-tdep.h: (adi_normalize_address): New export.
8406         * sparc-nat.h: (open_adi_tag_fd): New export.
8407         * sparc64-linux-nat.c: (open_adi_tag_fd): New function.
8408         * sparc64-linux-tdep.c:
8409         (SEGV_ACCADI, SEGV_ADIDERR, SEGV_ADIPERR) New defines.
8410         (sparc64_linux_handle_segmentation_fault): New function.
8411         (sparc64_linux_init_abi): Register
8412         sparc64_linux_handle_segmentation_fault
8413         * sparc64-tdep.c: Include cli-utils.h,gdbcmd.h,auxv.h.
8414         (sparc64_addr_bits_remove): New function.
8415         (sparc64_init_abi): Register sparc64_addr_bits_remove.
8416         (MAX_PROC_NAME_SIZE): New macro.
8417         (AT_ADI_BLKSZ, AT_ADI_NBITS, AT_ADI_UEONADI) New defines.
8418         (sparc64adilist): New variable.
8419         (adi_proc_list): New variable.
8420         (find_adi_info): New function.
8421         (add_adi_info): New function.
8422         (get_adi_info_proc): New function.
8423         (get_adi_info): New function.
8424         (info_adi_command): New function.
8425         (read_maps_entry): New function.
8426         (adi_available): New function.
8427         (adi_normalize_address): New function.
8428         (adi_align_address): New function.
8429         (adi_convert_byte_count): New function.
8430         (adi_tag_fd): New function.
8431         (adi_is_addr_mapped): New function.
8432         (adi_read_versions): New function.
8433         (adi_write_versions): New function.
8434         (adi_print_versions): New function.
8435         (do_examine): New function.
8436         (do_assign): New function.
8437         (adi_examine_command): New function.
8438         (adi_assign_command): New function.
8439         (_initialize_sparc64_adi_tdep): New function.
8440
8441 2017-08-22  Simon Marchi  <simon.marchi@ericsson.com>
8442
8443         * breakpoint.c (breakpoints_info): Rename to ...
8444         (info_breakpoints_command): ... this.
8445         (watchpoints_info): Rename to ...
8446         (info_watchpoints_command): ... this.
8447         (tracepoints_info): Rename to ...
8448         (info_tracepoints_command): ... this.
8449         (_initialize_breakpoint): Adjust.
8450         * dcache.c (dcache_info): Rename to ...
8451         (info_display_command): ... this.
8452         (_initialize_dcache): Adjust.
8453         * frame.h (args_info): Rename to ...
8454         (info_args_command): ... this.
8455         (locals_info): Rename to ...
8456         (info_locals_command): ... this.
8457         * infcmd.c (nofp_registers_info): Rename to ...
8458         (info_registers_command): ... this.
8459         (float_info): Rename to ...
8460         (info_float_command): ... this.
8461         (program_info): Rename to ...
8462         (info_program_command): ... this.
8463         (all_registers_info): Rename to ...
8464         (info_all_registers_command): ... this.
8465         (vector_info): Rename to ...
8466         (info_vector_command): ... this.
8467         (float_info): Rename to ...
8468         (info_float_command): ... this.
8469         (_initialize_infcmd): Adjust.
8470         * inferior.h (term_info): Rename to ...
8471         (info_terminal_command): ... this.
8472         * inflow.c (term_info): Rename to ...
8473         (info_terminal_command): ... this.
8474         (_initialize_inflow): Adjust.
8475         * infrun.c (signals_info): Rename to ...
8476         (info_signals_command): ... this.
8477         (_initialize_infrun): Adjust.
8478         * objc-lang.c (classes_info): Rename to ...
8479         (info_classes_command): ... this.
8480         (selectors_info): Rename to ...
8481         (info_selectors_command): ... this.
8482         (_initialize_objc_language): Adjust.
8483         * printcmd.c (sym_info): Rename to ...
8484         (info_symbol_command): ... this.
8485         (address_info): Rename to ...
8486         (info_address_command): ... this.
8487         (display_info): Rename to ...
8488         (info_display_command): ... this.
8489         (_initialize_printcmd): Adjust.
8490         * reverse.c (bookmarks_info): Rename to ...
8491         (info_breakpoints_command): ... this.
8492         (_initialize_reverse): Adjust.
8493         * ser-go32.c (dos_info): Rename to ...
8494         (info_serial_command): ... this.
8495         (_initialize_ser_dos): Adjust.
8496         * skip.c (skip_info): Rename to ...
8497         (info_skip_command): ... this.
8498         (_initialize_step_skip): Adjust.
8499         * source.c (line_info): Rename to ...
8500         (info_line_command): ... this.
8501         (source_info): Rename to ...
8502         (info_source_command)
8503         * stack.c (frame_info): Rename to ...
8504         (info_frame_command): ... this.
8505         (locals_info): Rename to ...
8506         (info_locals_command): ... this.
8507         (args_info): Rename to ...
8508         (info_args_command): ... this.
8509         (_initialize_stack): Adjust.
8510         * symtab.c (sources_info): Rename to ...
8511         (info_sources_command): ... this.
8512         (variables_info): Rename to ...
8513         (info_variables_command): ... this.
8514         (functions_info): Rename to ...
8515         (info_functions_command): ... this.
8516         (types_info): Rename to ...
8517         (info_types_command): ... this.
8518         (_initialize_symtab): Adjust.
8519         * target.c (target_info): Rename to ...
8520         (info_target_command): ... this.
8521         (initialize_targets): Adjust.
8522         * tracepoint.c (tvariables_info): Rename to ...
8523         (info_tvariables_command): ... this.
8524         (scope_info): Rename to ...
8525         (info_scope_command): ... this.
8526         (trace_dump_actions): Adjust.
8527         (_initialize_tracepoint): Adjust.
8528
8529 2017-08-22  Tom Tromey  <tom@tromey.com>
8530
8531         * breakpoint.h (install_breakpoint): Update.
8532         * breakpoint.c (add_solib_catchpoint): Update.
8533         (install_breakpoint): Change argument to a std::unique_ptr.
8534         (create_fork_vfork_event_catchpoint): Use std::unique_ptr.
8535         (create_breakpoint_sal, create_breakpoint): Update.
8536         (watch_command_1, catch_exec_command_1)
8537         (strace_marker_create_breakpoints_sal): Use std::unique_ptr.
8538         (add_to_breakpoint_chain): Change argument to a std::unique_ptr.
8539         Return the breakpoint.
8540         (set_raw_breakpoint_without_location, set_raw_breakpoint)
8541         (new_single_step_breakpoint): Update.
8542         * break-catch-throw.c (handle_gnu_v3_exceptions): Use
8543         std::unique_ptr.
8544         * break-catch-syscall.c (create_syscall_event_catchpoint): Use
8545         std::unique_ptr.
8546         * break-catch-sig.c (create_signal_catchpoint): Use
8547         std::unique_ptr.
8548         * ada-lang.c (create_ada_exception_catchpoint): Use
8549         std::unique_ptr.
8550
8551 2017-08-22  Tom Tromey  <tom@tromey.com>
8552
8553         * breakpoint.c (add_solib_catchpoint): Use std::unique_ptr.
8554
8555 2017-08-22  Tom Tromey  <tom@tromey.com>
8556
8557         * psymtab.c (psymtab_search_name): Return a unique_xmalloc_ptr.
8558         (lookup_partial_symbol): Update.
8559
8560 2017-08-22  Tom Tromey  <tom@tromey.com>
8561
8562         * source.h (rewrite_source_path): Return a unique_xmalloc_ptr.
8563         * source.c (rewrite_source_path): Return a unique_xmalloc_ptr.
8564         (find_and_open_source, symtab_to_fullname): Update.
8565         * psymtab.c (psymtab_to_fullname): Update.
8566
8567 2017-08-22  Tom Tromey  <tom@tromey.com>
8568
8569         * exec.c (exec_file_attach): Update.
8570         * linux-thread-db.c (try_thread_db_load): Update.
8571         * guile/scm-safe-call.c (gdbscm_safe_source_script): Update.
8572         * utils.c (gdb_realpath): Change return type.
8573         (gdb_realpath_keepfile): Update.
8574         (gdb_realpath_check_trailer, gdb_realpath_tests): New functions.
8575         (_initialize_utils): Register the new self test.
8576         * source.c (openp): Update.
8577         (find_and_open_source): Update.
8578         * nto-tdep.c (nto_find_and_open_solib): Update.
8579         * main.c (set_gdb_data_directory): Update.
8580         (captured_main_1): Update.
8581         * dwarf2read.c (dwarf2_get_dwz_file): Update
8582         (dw2_map_symbol_filenames): Update.
8583         * auto-load.c (auto_load_safe_path_vec_update): Update.
8584         (filename_is_in_auto_load_safe_path_vec): Change type of
8585         "filename_realp".
8586         (auto_load_objfile_script): Update.
8587         (file_is_auto_load_safe): Update.  Use std::string.
8588         * utils.h (gdb_realpath): Return a gdb::unique_xmalloc_ptr.
8589
8590 2017-08-22  Tom Tromey  <tom@tromey.com>
8591
8592         * utils.c (gdb_realpath_keepfile): Return a
8593         gdb::unique_xmalloc_ptr.
8594         * exec.c (exec_file_attach): Update.
8595         * utils.h (gdb_realpath_keepfile): Return a
8596         gdb::unique_xmalloc_ptr.
8597
8598 2017-08-22  Tom Tromey  <tom@tromey.com>
8599
8600         * compile/compile.c (compile_file_command): Use
8601         gdb::unique_xmalloc_ptr, std::string.
8602         * utils.c (gdb_abspath): Change return type.
8603         * source.c (openp): Update.
8604         * objfiles.c (allocate_objfile): Update.
8605         * main.c (set_gdb_data_directory): Update.
8606         * utils.h (gdb_abspath): Return a gdb::unique_xmalloc_ptr.
8607
8608 2017-08-22  Zhouyi Zhou  <zhouzhouyi@gmail.com>
8609
8610         * cli-cmds.c (list_commands): List actual code around more than
8611         one location.
8612
8613 2017-08-21  John Baldwin  <jhb@FreeBSD.org>
8614
8615         * fbsd-nat.c (fbsd_add_threads): Use array type for `lwps'.
8616
8617 2017-08-21  Pedro Alves  <palves@redhat.com>
8618
8619         PR gdb/19487
8620         * c-exp.y (variable production): Handle function aliases.
8621         * minsyms.c (msymbol_is_text): New function.
8622         * minsyms.h (msymbol_is_text): Declare.
8623         * symtab.c (find_function_alias_target): New function.
8624         * symtab.h (find_function_alias_target): Declare.
8625
8626 2017-08-21  Pedro Alves  <palves@redhat.com>
8627
8628         * eval.c (evaluate_subexp_standard) <OP_TYPE>: Don't dig past
8629         typedefs.
8630         * typeprint.c (whatis_exp): If handling "whatis", and expression
8631         is OP_TYPE, strip one typedef level.  Otherwise don't strip
8632         typedefs here.
8633         * valops.c (value_cast): Save "to" type before resolving
8634         stubs/typedefs.  Use that type as resulting value's type.
8635
8636 2017-08-18  Tom Tromey  <tom@tromey.com>
8637             Pedro Alves  <palves@redhat.com>
8638
8639         * spu-multiarch.c (parse_spufs_run): Use scoped_restore.
8640         * sol-thread.c (sol_thread_resume, sol_thread_wait)
8641         (sol_thread_xfer_partial, rw_common): Use scoped_restore.
8642         * procfs.c (procfs_do_thread_registers): Use scoped_restore.
8643         * proc-service.c (ps_xfer_memory): Use scoped_restore.
8644         * linux-tdep.c (linux_corefile_thread): Remove a cleanup.
8645         (linux_get_siginfo_data): Add "thread" argument.  Use
8646         scoped_restore.
8647         * linux-nat.c (linux_child_follow_fork)
8648         (check_stopped_by_watchpoint): Use scoped_restore.
8649         * infrun.c (displaced_step_prepare_throw, write_memory_ptid)
8650         (THREAD_STOPPED_BY, handle_signal_stop): Use scoped_restore.
8651         (restore_inferior_ptid, save_inferior_ptid): Remove.
8652         * btrace.c (btrace_fetch): Use scoped_restore.
8653         * bsd-uthread.c (bsd_uthread_fetch_registers)
8654         (bsd_uthread_store_registers): Use scoped_restore.
8655         * breakpoint.c (reattach_breakpoints, detach_breakpoints): Use
8656         scoped_restore.
8657         * aix-thread.c (aix_thread_resume, aix_thread_wait)
8658         (aix_thread_xfer_partial): Use scoped_restore.
8659         * inferior.h (save_inferior_ptid): Remove.
8660
8661 2017-08-18  Yao Qi  <yao.qi@linaro.org>
8662
8663         PR tdep/21818
8664         * arm-tdep.c (gdb_print_insn_arm): Mark
8665         USER_SPECIFIED_MACHINE_TYPE if exec_bfd isn't NULL.
8666
8667 2017-08-18  Yao Qi  <yao.qi@linaro.org>
8668
8669         * NEWS: Mention GDBserver's new option "--selftest".
8670         * Makefile.in (SFILES): Remove selftest.c, add common/selftest.c.
8671         * selftest.c: Move it to common/selftest.c.
8672         * selftest.h: Move it to common/selftest.h.
8673         * selftest-arch.c (reset): New function.
8674         (tests_with_arch): Call reset.
8675
8676 2017-08-18  Yao Qi  <yao.qi@linaro.org>
8677
8678         * selftest.c (run_tests): Don't call QUIT.  Call debug_printf
8679         instead of exception_fprintf and printf_filtered.
8680
8681 2017-08-18  Yao Qi  <yao.qi@linaro.org>
8682
8683         * selftest.c (register_self_test): Rename it to
8684         selftests::register_test.
8685         (run_self_tests): selftest::run_tests.
8686         * selftest.h: Update declarations.
8687         * selftest-arch.c (register_self_test_foreach_arch): Rename it to
8688         selftests::register_test_foreach_arch.
8689         * selftest-arch.h: Update declaration.
8690         * aarch64-tdep.c: Update.
8691         * arm-tdep.c: Likewise.
8692         * disasm-selftests.c: Likewise.
8693         * dwarf2loc.c: Likewise.
8694         * dwarf2-frame.c: Likewise.
8695         * findvar.c: Likewise.
8696         * gdbarch-selftests.c: Likewise.
8697         * maint.c (maintenance_selftest): Likewise.
8698         * regcache.c: Likewise.
8699         * rust-exp.y: Likewise.
8700         * selftest-arch.c: Likewise.
8701         * unittests/environ-selftests.c: Likewise.
8702         * unittests/function-view-selftests.c: Likewise.
8703         * unittests/offset-type-selftests.c: Likewise.
8704         * unittests/optional-selftests.c: Likewise.
8705         * unittests/scoped_restore-selftests.c: Likewise.
8706         * utils-selftests.c: Likewise.
8707
8708 2017-08-17  Pedro Alves  <palves@redhat.com>
8709
8710         * cli/cli-cmds.c (source_command): Delete 'old_source_verbose'
8711         local.
8712
8713 2017-08-17  Pedro Alves  <palves@redhat.com>
8714
8715         * dwarf2read.c (struct dwarf2_cu) <line_header_die_owner>: New
8716         field.
8717         (reset_die_in_process): Delete, replaced by ...
8718         (process_die_scope): ... this new class.  Make it responsible for
8719         freeing cu->line_header too.
8720         (process_die): Use process_die_scope.
8721         (handle_DW_AT_stmt_list): Record the line header's owner CU/DIE in
8722         cu->line_header_die_owner.  Don't release the line header if it's
8723         owned by the CU.
8724         (setup_type_unit_groups): Make the CU/DIE own the line header.
8725         Don't release the line header here.
8726
8727 2017-08-17  Alex Lindsay  <alexlindsay239@gmail.com>  (tiny change)
8728
8729         * elfread.c (elf_read_minimal_symbols): xfree synthsyms.
8730
8731 2017-08-17  Ruslan Kabatsayev  <b7.10110111@gmail.com>
8732
8733         * NEWS: Mention new shortcuts for nexti and stepi in TUI
8734         Single-Key mode
8735
8736 2017-08-16  Ruslan Kabatsayev  <b7.10110111@gmail.com>
8737
8738         * tui/tui.c (tui_commands): Add "nexti" and "stepi" to the Single-Key
8739         mode command list.
8740
8741 2017-08-15  Stafford Horne  <shorne@gmail.com>
8742
8743         * MAINTAINERS (Write After Approval): Add Stafford Horne.
8744
8745 2017-08-15  Stafford Horne  <shorne@gmail.com>
8746
8747         * xtensa-tdep.c (xtensa_init_reggroups): Use xstrdup for cpname.
8748
8749 2017-08-15  Sergio Durigan Junior  <sergiodj@redhat.com>
8750
8751         PR gdb/21954
8752         * infcmd.c (unset_environment_command): Use the 'clear' method on
8753         the environment instead of resetting it.
8754
8755 2017-08-15  John Baldwin  <jhb@FreeBSD.org>
8756
8757         * fbsd-nat.c (fbsd_convert_siginfo): Fix compile on big-endian
8758         platforms.
8759
8760 2017-08-14  Tom Tromey  <tom@tromey.com>
8761
8762         * valprint.c (print_octal_chars): Use HOST_CHAR_BIT.
8763         (print_binary_chars): Likewise.
8764         (BITS_IN_BYTES): Remove.
8765
8766 2017-08-14  Tom Tromey  <tom@tromey.com>
8767
8768         PR gdb/21675
8769         * valprint.c (LOW_ZERO): Change value to 034.
8770         (print_octal_chars): Add static_asserts for octal constants.
8771         * printcmd.c (print_scalar_formatted): Add 'd' case.
8772
8773 2017-08-11  Tom Tromey  <tom@tromey.com>
8774
8775         * symfile.c (add_symbol_file_command): Use std::vector.
8776
8777 2017-08-14  Tom Tromey  <tom@tromey.com>
8778
8779         * break-catch-throw.c (handle_gnu_v3_exceptions): Use std::move.
8780         * break-catch-syscall.c (create_syscall_event_catchpoint): Use
8781         std::move.
8782         * break-catch-sig.c (create_signal_catchpoint): Use std::move.
8783
8784 2017-08-11  Pedro Alves  <palves@redhat.com>
8785
8786         * infrun.c (process_event_stop_test): Adjust
8787         function_name_is_marked_for_skip call.
8788         * skip.c: Include <list>.
8789         (skiplist_entry): Make it a class with private fields, and
8790         getters/setters.
8791         (skiplist_entry_chain): Delete.
8792         (skiplist_entries): New.
8793         (skiplist_entry_count): Delete.
8794         (highest_skiplist_entry_num): New.
8795         (ALL_SKIPLIST_ENTRIES, ALL_SKIPLIST_ENTRIES_SAFE): Delete.
8796         (add_skiplist_entry): Delete.
8797         (skiplist_entry::skiplist_entry): New.
8798         (skiplist_entry::add_entry): New.
8799         (skip_file_command, skip_function): Adjust.
8800         (compile_skip_regexp): Delete.
8801         (skip_command): Don't compile regexp here.  Adjust to use
8802         skiplist_entry::add_entry.
8803         (skip_info): Adjust to use range-for and getters.
8804         (skip_enable_command, skip_disable_command): Adjust to use
8805         range-for and setters.
8806         (skip_delete_command): Adjust to use std::list.
8807         (add_skiplist_entry): Delete.
8808         (skip_file_p): Delete, refactored as ...
8809         (skiplist_entry::do_skip_file_p): ... this new method.
8810         (skip_gfile_p): Delete, refactored as ...
8811         (skiplist_entry::do_gskip_file_p): ... this new method.
8812         (skip_function_p, skip_rfunction_p): Delete, refactored as ...
8813         (skiplist_entry::skip_function_p): ... this new method.
8814         (function_name_is_marked_for_skip): Now returns bool, and takes
8815         the function sal by const reference.  Adjust to use range-for and
8816         skiplist_entry methods.
8817         (_initialize_step_skip): Remove references to
8818         skiplist_entry_chain, skiplist_entry_count.
8819         * skip.h (function_name_is_marked_for_skip): Now returns bool, and
8820         takes the function sal by const reference.
8821
8822 2017-08-11  Yao Qi  <yao.qi@linaro.org>
8823
8824         * dwarf2-frame.c (clear_pointer_cleanup): Remove.
8825         (dwarf2_frame_cache): Remove reset_cache_cleanup.
8826         (dwarf2_frame_cache):
8827         * frame-unwind.c (frame_unwind_try_unwinder): Catch
8828         RETURN_MASK_ALL and set *this_case to NULL.
8829         * frame-unwind.h: Update comments.
8830
8831 2017-08-11  Yao Qi  <yao.qi@linaro.org>
8832
8833         * dwarf2-frame.c (dwarf2_frame_state_alloc_regs): Remove.
8834         (dwarf2_frame_state_copy_regs): Remove.
8835         (dwarf2_frame_state_free_regs): Remove.
8836         (dwarf2_frame_state::~dwarf2_frame_state): Remove.
8837         (dwarf2_restore_rule): Call method .alloc_regs instead of
8838         dwarf2_frame_state_alloc_regs.
8839         (execute_cfa_program): Likewise.  Call dwarf2_frame_state_reg_info
8840         constructor.  Call std::move.
8841         (dwarf2_fetch_cfa_info): Don't call dwarf2_frame_state_copy_regs.
8842         (dwarf2_frame_cache): Likewise.
8843
8844         [GDB_SELF_TEST]: Include selftest.h and
8845         selftest-arch.h.
8846         [GDB_SELF_TEST] (execute_cfa_program_test): New function.
8847         (_initialize_dwarf2_frame) [GDB_SELF_TEST]: Register
8848         execute_cfa_program_test.
8849
8850         * dwarf2-frame.h (dwarf2_frame_state_reg_info): Add ctor, dtor,
8851         copy ctor, assignment operator, move assignment.
8852         <alloc_regs>: New method.
8853         <swap>: New method.
8854         (struct dwarf2_frame_state): Delete dtor.
8855         (dwarf2_frame_state_alloc_regs): Remove declaration.
8856         * sparc-tdep.c (sparc_execute_dwarf_cfa_vendor_op): Don't call
8857         dwarf2_frame_state_alloc_regs, use .alloc_regs instead.
8858
8859 2017-08-11  Yao Qi  <yao.qi@linaro.org>
8860
8861         * dwarf2-frame.c (dwarf2_frame_state_free): Remove.
8862         (dwarf2_frame_state::dwarf2_frame_state): New.
8863         (dwarf2_frame_state::~dwarf2_frame_state): New.
8864         (dwarf2_fetch_cfa_info): Update.
8865         (dwarf2_frame_cache): Remove old_chain.  Change 'fs' to an object
8866         rather than a pointer.  Update code.
8867         * dwarf2-frame.h (struct dwarf2_frame_state): Declare ctor and
8868         dtor.
8869         <data_align, code_align, retaddr_column>: Change them to const.
8870         <armcc_cfa_offsets_sf, armcc_cfa_offsets_reversed>: Change them
8871         to bool.
8872
8873 2017-08-11  Yao Qi  <yao.qi@linaro.org>
8874
8875         * dwarf2-frame.h (struct dwarf2_frame_state_reg) <exp_len>: Remove.
8876         <loc.exp>: New field.
8877         * dwarf2-frame.c (execute_cfa_program): Update.
8878         (dwarf2_frame_prev_register): Update.
8879
8880 2017-08-10  Pedro Alves  <palves@redhat.com>
8881
8882         * common/gdb_unique_ptr.h (xfree_deleter<T[]>): Define.
8883
8884 2017-08-09  John Baldwin  <jhb@FreeBSD.org>
8885
8886         * fbsd-nat.c (struct fbsd_fork_info): Remove.
8887         (fbsd_pending_children): Use std::list.
8888         (fbsd_remember_child): Likewise.
8889         (fbsd_is_child_pending): Likewise.
8890         (fbsd_pending_vfork_done): Use std::forward_list.
8891         (fbsd_add_vfork_done): Likewise.
8892         (fbsd_is_vfork_done_pending): Likewise.
8893         (fbsd_next_vfork_done): Likewise.
8894
8895 2017-08-09  John Baldwin  <jhb@FreeBSD.org>
8896
8897         * fbsd-nat.c [HAVE_KINFO_GETVMMAP] (struct free_deleter): New.
8898         (fbsd_find_memory_regions): Use free_deleter with std::unique_ptr.
8899         [!HAVE_KINFO_GETVMMAP] (fbsd_find_memory_regions): Use std::string
8900         for `mapfilename'.
8901         (fbsd_xfer_partial): Use gdb::byte_vector.
8902         (fbsd_add_threads): Use gdb::unique_xmalloc_ptr.
8903
8904 2017-08-09  John Baldwin  <jhb@FreeBSD.org>
8905
8906         * fbsd-nat.c: [!HAVE_KINFO_GETVMMAP]: Include <sys/user.h> and
8907         "filestuff.h".
8908         (fbsd_find_memory_regions): Fix `mapfile' initialization.
8909
8910 2017-08-09  Tom Tromey  <tom@tromey.com>
8911
8912         * skip.c (skiplist_entry): New constructor.
8913         (skiplist_entry::enabled, skiplist_entry::function_is_regexp)
8914         (skiplist_entry::file_is_glob): Now bool.
8915         (skiplist_entry::file, skiplist_entry::function): Now
8916         std::string.
8917         (make_skip_entry): Return a unique_ptr.  Use new.
8918         (free_skiplist_entry, free_skiplist_entry_cleanup)
8919         (make_free_skiplist_entry_cleanup): Remove.
8920         (skip_command, skip_disable_command, add_skiplist_entry)
8921         (skip_form_bytes, compile_skip_regexp, skip_command, skip_info)
8922         (skip_file_p, skip_gfile_p, skip_function_p, skip_rfunction_p)
8923         (function_name_is_marked_for_skip): Update.
8924         (skip_delete_command): Update.  Use delete.
8925
8926 2017-08-09  Jiong Wang  <jiong.wang@arm.com>
8927
8928         * aarch64-linux-tdep.c: Include "auxv.h" and "elf/common.h".
8929         (aarch64_linux_core_read_description): New function.
8930         (aarch64_linux_init_abi): Register gdbarch_core_read_description.
8931
8932 2017-08-09  Pedro Alves  <palves@redhat.com>
8933
8934         * cp-name-parser.y (cp_comp_to_string): Return a
8935         gdb::unique_xmalloc_ptr<char>.
8936         * cp-support.c (replace_typedefs_qualified_name)
8937         (replace_typedefs): Adjust to use gdb::unique_xmalloc_ptr<char>.
8938         (cp_canonicalize_string_full): Use op= instead of explicit
8939         convertion.
8940         (cp_class_name_from_physname, method_name_from_physname)
8941         (cp_func_name, cp_remove_params): Adjust to use
8942         gdb::unique_xmalloc_ptr<char>.
8943         * cp-support.h (cp_comp_to_string): Return a
8944         gdb::unique_xmalloc_ptr<char>.
8945         * python/py-type.c (typy_lookup_type): Adjust to use
8946         gdb::unique_xmalloc_ptr<char>.
8947
8948 2017-08-09  H.J. Lu  <hongjiu.lu@intel.com>
8949
8950         * dwarf2read.c (dwarf2_string_attr): Fix a typo.
8951
8952 2017-08-09  Alex Lindsay  <alexlindsay239@gmail.com>
8953             Yao Qi  <yao.qi@linaro.org>
8954
8955         * cp-support.c (cp_canonicalize_string_full): Use
8956         gdb::unique_xmalloc_ptr<char>.
8957         (cp_canonicalize_string): Likewise.
8958
8959 2017-08-09  Yao Qi  <yao.qi@linaro.org>
8960
8961         * features/Makefile (WHICH): Remove i386/ non-linux stuff.
8962         * regformats/i386/amd64-avx-avx512.dat: Remove.
8963         * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Remove.
8964         * regformats/i386/amd64-avx-mpx.dat:Remove.
8965         * regformats/i386/amd64-avx.dat: Remove.
8966         * regformats/i386/amd64-mpx.dat: Remove.
8967         * regformats/i386/i386-avx-avx512.dat: Remove.
8968         * regformats/i386/i386-avx-mpx-avx512-pku.dat: Remove.
8969         * regformats/i386/i386-avx-mpx.dat: Remove.
8970         * regformats/i386/i386-mmx.dat: Remove.
8971         * regformats/i386/i386-mpx.dat: Remove.
8972
8973 2017-08-09  Yao Qi  <yao.qi@linaro.org>
8974
8975         * amd64-tdep.h (tdesc_x32): Remove the declaration.
8976         * amd64-tdep.c: Don't include features/i386/x32*.c.
8977         (_initialize_amd64_tdep): Don't call initialize_tdesc_x32*
8978         functions.
8979         * features/Makefile (WHICH): Remove i386/x32, i386/x32-avx,
8980         and i386/x32-avx-avx512.
8981         (XMLTOC): Remove i386/x32-avx.xml, i386/x32-avx-avx512.xml,
8982         and i386/x32.xml.
8983         * features/i386/x32-avx-avx512.c: Removed.
8984         * features/i386/x32-avx-avx512.xml: Removed.
8985         * features/i386/x32-avx.c: Removed.
8986         * features/i386/x32-avx.xml: Removed.
8987         * features/i386/x32.c: Removed.
8988         * features/i386/x32.xml: Removed.
8989         * regformats/i386/x32-avx-avx512.dat: Removed.
8990         * regformats/i386/x32-avx.dat: Removed.
8991         * regformats/i386/x32.dat: Removed.
8992
8993 2017-08-07  Maciej W. Rozycki  <macro@imgtec.com>
8994
8995         PR breakpoints/21886
8996         * mem-break.c (default_memory_insert_breakpoint): Use
8997         `->placed_address' rather than `->reqstd_address' for the
8998         breakpoint location.
8999
9000 2017-08-07  Maciej W. Rozycki  <macro@imgtec.com>
9001
9002         * arch-utils.c (default_print_insn): Remove arch/mach/endian
9003         assertions.
9004
9005 2017-08-07  Maciej W. Rozycki  <macro@imgtec.com>
9006
9007         * gdbarch.sh (gdbarch_info): Replace the `tdep_info' member with
9008         a union of `tdep_info', `tdesc_data' and `id'.
9009         * aarch64-tdep.c (aarch64_gdbarch_init): Use `info.tdesc_data'
9010         rather than `info.tdep_info'.
9011         * amd64-linux-tdep.c (amd64_linux_init_abi): Likewise.
9012         * i386-linux-tdep.c (i386_linux_init_abi): Likewise.
9013         * i386-tdep.c (i386_gdbarch_init): Likewise.
9014         * mips-linux-tdep.c (mips_linux_init_abi): Likewise.
9015         * mips-tdep.c (mips_gdbarch_init): Likewise.
9016         * nds32-tdep.c (nds32_gdbarch_init): Likewise.
9017         * rs6000-tdep.c (rs6000_gdbarch_init): Likewise.
9018         * ppc-linux-tdep.c (ppu2spu_sniffer): Use `info.id' rather than
9019         `info.tdep_info'.
9020         (ppc_linux_init_abi): Use `info.tdesc_data' rather than
9021         `info.tdep_info'.
9022         * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
9023         * spu-multiarch.c (spu_gdbarch): Use `info.id' rather than
9024         `info.tdep_info'.
9025         * spu-tdep.c (spu_gdbarch_init): Likewise.
9026         * gdbarch.h: Regenerate.
9027
9028 2017-08-07  Leszek Swirski  <leszeks@google.com>
9029
9030         PR symtab/20899
9031         * dwarf2read.c (dwarf2_string_attr): Allow DW_FORM_GNU_strp_alt.
9032
9033 2017-08-07  Simon Marchi  <simon.marchi@ericsson.com>
9034
9035         * remote-sim.c (gdbsim_load): Remove char **argv local variable.
9036         (gdbsim_open): Rename gdb_argv args object to argv.
9037
9038 2017-08-05  Tom Tromey  <tom@tromey.com>
9039
9040         * compile/compile-object-load.c (compile_object_load): Use
9041         gdb::unique_xmalloc_ptr.
9042         * cli/cli-dump.c (scan_filename): Rename from
9043         scan_filename_with_cleanup.  Change return type.
9044         (scan_expression): Rename from scan_expression_with_cleanup.
9045         Change return type.
9046         (dump_memory_to_file, dump_value_to_file, restore_command):
9047         Use gdb::unique_xmalloc_ptr.  Update.
9048         * cli/cli-cmds.c (find_and_open_script): Use
9049         gdb::unique_xmalloc_ptr.
9050         * tracefile-tfile.c (tfile_open): Use gdb::unique_xmalloc_ptr.
9051         * symmisc.c (maintenance_print_symbols)
9052         (maintenance_print_msymbols): Use gdb::unique_xmalloc_ptr.
9053         * symfile.c (symfile_bfd_open, generic_load)
9054         (add_symbol_file_command, remove_symbol_file_command): Use
9055         gdb::unique_xmalloc_ptr.
9056         * source.c (openp): Use gdb::unique_xmalloc_ptr.
9057         * psymtab.c (maintenance_print_psymbols): Use
9058         gdb::unique_xmalloc_ptr.
9059         * corelow.c (core_open): Use gdb::unique_xmalloc_ptr.
9060         * breakpoint.c (save_breakpoints): Use gdb::unique_xmalloc_ptr.
9061         * solib.c (solib_map_sections): Use gdb::unique_xmalloc_ptr.
9062         (reload_shared_libraries_1): Likewise.
9063
9064 2017-08-05  Tom Tromey  <tom@tromey.com>
9065
9066         * rust-exp.y (rust_op_ptr, set_field): Remove typedefs.
9067         (rust_op_vector, rust_set_vector): New typedefs.
9068         (current_parser): New global.
9069         (work_obstack): Change to pointer type.  Update all users.
9070         (rust_ast, pstate): Remove globals.
9071         (struct rust_parser): New.
9072         (%union) <params, field_inits>: Change type.
9073         (start, tuple_expr, unit_expr, struct_expr_list, literal)
9074         (field_expr, expr_list, maybe_expr_list, type_list): Update.
9075         (ast_call_ish, ast_path, ast_function_type, ast_tuple_type)
9076         (convert_params_to_types, convert_params_to_expression): Change
9077         type of "params".
9078         (ast_string): Change type of "fields".
9079         (rust_parse): Make a rust_parser.  Remove cleanups.
9080         (rust_lex_tests): Make and install an auto_obstack.
9081
9082 2017-08-04  Yao Qi  <yao.qi@linaro.org>
9083
9084         * configure.srv (ipa_x32_linux_regobj): New.
9085         * linux-amd64-ipa.c (get_ipa_tdesc): Use X86_TDESC_AVX_AVX512
9086         instead of X86_TDESC_AVX512.
9087         (initialize_low_tracepoint): Call
9088         init_registers_x32_avx_avx512_linux.
9089
9090 2017-08-04  Yao Qi  <yao.qi@linaro.org>
9091
9092         * utils.h (gdb_argv): Add namespace std for nullptr_t.
9093
9094 2017-08-03  Ruslan Kabatsayev  <b7.10110111@gmail.com>
9095
9096         * MAINTAINERS (Write After Approval): Add Ruslan Kabatsayev.
9097
9098 2017-08-03  Tom Tromey  <tom@tromey.com>
9099
9100         * utils.c (make_cleanup_freeargv, do_freeargv, gdb_buildargv):
9101         Remove.
9102         * utils.h (make_cleanup_freeargv, gdb_buildargv): Remove.
9103
9104 2017-08-03  Tom Tromey  <tom@tromey.com>
9105
9106         * python/py-param.c (compute_enum_values): Use gdb_argv.
9107
9108 2017-08-03  Tom Tromey  <tom@tromey.com>
9109
9110         * utils.h (struct gdb_argv_deleter): New.
9111         (gdb_argv): New class.
9112         * utils.c (gdb_argv::reset): New method.
9113         * tracepoint.c (delete_trace_variable_command): Use gdb_argv.
9114         * tracefile.c (tsave_command): Use gdb_argv.
9115         * top.c (new_ui_command): Use gdb_argv.
9116         * symmisc.c (maintenance_print_symbols)
9117         (maintenance_print_msymbols, maintenance_expand_symtabs): Use gdb_argv.
9118         * symfile.c (symbol_file_command, generic_load)
9119         (remove_symbol_file_command): Use gdb_argv.
9120         * stack.c (backtrace_command): Use gdb_argv.
9121         * source.c (add_path, show_substitute_path_command)
9122         (unset_substitute_path_command, set_substitute_path_command):
9123         Use gdb_argv.
9124         * skip.c (skip_command): Use gdb_argv.  Use gdb_buildargv.
9125         * ser-mingw.c (pipe_windows_open): Use gdb_argv.
9126         * remote.c (extended_remote_run, remote_put_command)
9127         (remote_get_command, remote_delete_command): Use gdb_argv.
9128         * remote-sim.c (gdbsim_load, gdbsim_create_inferior)
9129         (gdbsim_open): Use gdb_argv.
9130         * python/py-cmd.c (gdbpy_string_to_argv): Use gdb_argv.
9131         * psymtab.c (maintenance_print_psymbols): Use gdb_argv.
9132         * procfs.c (procfs_info_proc): Use gdb_argv.
9133         * interps.c (interpreter_exec_cmd): Use gdb_argv.
9134         * infrun.c (handle_command): Use gdb_argv.
9135         * inferior.c (add_inferior_command, clone_inferior_command):
9136         Use gdb_argv.
9137         * guile/scm-string.c (gdbscm_string_to_argv): Use gdb_argv.
9138         * exec.c (exec_file_command): Use gdb_argv.
9139         * cli/cli-cmds.c (alias_command): Use gdb_argv.
9140         * compile/compile.c (build_argc_argv): Use gdb_argv.
9141
9142 2017-08-03  Tom Tromey  <tom@tromey.com>
9143
9144         * python/python.c (gdbpy_decode_line): Use unique_xmalloc_ptr.
9145
9146 2017-08-03  Tom Tromey  <tom@tromey.com>
9147
9148         * python/python.c (compute_python_string): Return std::string.
9149         (gdbpy_eval_from_control_command): Update.
9150         (do_start_initialization): Use std::string.
9151         * python/py-varobj.c (py_varobj_iter_next): Use string_printf, not
9152         xstrprintf.
9153         * python/py-breakpoint.c (local_setattro): Use string_printf, not
9154         xstrprintf.
9155
9156 2017-08-03  Tom Tromey  <tom@tromey.com>
9157
9158         * top.h (do_restore_instream_cleanup): Remove.
9159         * top.c (do_restore_instream_cleanup): Remove.
9160         (read_command_file): Use scoped_restore.
9161         * cli/cli-script.c (execute_user_command): Use scoped_restore.
9162
9163 2017-08-03  Tom Tromey  <tom@tromey.com>
9164
9165         * cli/cli-script.c (execute_user_command)
9166         (execute_control_command): Use scoped_restore.
9167
9168 2017-08-03  Tom Tromey  <tom@tromey.com>
9169
9170         * cli/cli-script.c (do_restore_user_call_depth): Remove.
9171         (execute_user_command): Remove user_call_depth; use
9172         user_args_stack's size instead.
9173
9174 2017-08-03  Tom Tromey  <tom@tromey.com>
9175
9176         * top.h (in_user_command): Remove.
9177         * top.c (in_user_command): Remove.
9178         * cli/cli-script.c (do_restore_user_call_depth)
9179         (execute_user_command): Update.
9180
9181 2017-08-03  Tom Tromey  <tom@tromey.com>
9182
9183         * valops.c (search_struct_method): Use gdb::byte_vector.
9184         * valarith.c (value_concat): Use std::vector.
9185         * target.c (memory_xfer_partial): Use gdb::byte_vector.
9186         (simple_search_memory): Likewise.
9187         * printcmd.c (find_string_backward): Use gdb::byte_vector.
9188         * mi/mi-main.c (mi_cmd_data_write_memory): Use gdb::byte_vector.
9189         * gcore.c (gcore_copy_callback): Use gdb::byte_vector.
9190         * elfread.c (elf_rel_plt_read): Use std::string.
9191         * cp-valprint.c (cp_print_value): Use gdb::byte_vector.
9192         * cli/cli-dump.c (restore_section_callback): Use
9193         gdb::byte_vector.
9194
9195 2017-08-03  Tom Tromey  <tom@tromey.com>
9196
9197         * jit.c (jit_reader_load_command): Use unique_xmalloc_ptr.
9198
9199 2017-08-03  Tom Tromey  <tom@tromey.com>
9200
9201         * tui/tui-regs.c (tui_restore_gdbout): Remove.
9202         (tui_register_format): Use scoped_restore.
9203
9204 2017-08-03  Tom Tromey  <tom@tromey.com>
9205
9206         * reverse.c (exec_direction_default): Remove.
9207         (exec_reverse_once): Use scoped_restore.
9208         * remote.c (restore_remote_timeout): Remove.
9209         (remote_flash_erase, remote_flash_write, remote_flash_done)
9210         (readchar, remote_serial_write): Use scoped_restore.
9211         * cli/cli-script.c (struct source_cleanup_lines_args)
9212         (source_cleanup_lines): Remove.
9213         (script_from_file): Use scoped_restore.
9214         * cli/cli-cmds.c (source_verbose_cleanup): Remove.
9215         (source_command): Use scoped_restore.
9216
9217 2017-08-03  Tom Tromey  <tom@tromey.com>
9218
9219         * utils.h (make_cleanup_free_so): Remove.
9220         * utils.c (do_free_so, make_cleanup_free_so): Remove.
9221         * solist.h (struct so_deleter): New.
9222         (so_list_up): New typedef.
9223         * solib-svr4.c (svr4_read_so_list): Use so_list_up.
9224
9225 2017-08-03  Tom Tromey  <tom@tromey.com>
9226
9227         * utils.h (make_cleanup_restore_current_language): Remove.
9228         * utils.c (do_restore_current_language)
9229         (make_cleanup_restore_current_language): Remove.
9230         * parse.c (parse_exp_in_context_1)
9231         (parse_expression_with_language): Use
9232         scoped_restore_current_language.
9233         * mi/mi-main.c (mi_cmd_execute): Use
9234         scoped_restore_current_language.
9235         * language.h (scoped_restore_current_language): New class.
9236
9237 2017-08-03  Tom Tromey  <tom@tromey.com>
9238
9239         * compile/compile.c (cleanup_unlink_file): Remove.
9240         (compile_to_object): Use gdb::unlinker.
9241         (eval_compile_command): Likewise.
9242
9243 2017-08-03  Tom Tromey  <tom@tromey.com>
9244
9245         * utils.h (make_cleanup_fclose): Remove.
9246         * utils.c (do_fclose_cleanup, make_cleanup_fclose): Remove.
9247
9248 2017-08-03  Tom Tromey  <tom@tromey.com>
9249
9250         * top.c (open_terminal_stream): Return gdb_file_up.
9251         (new_ui_command): Update.
9252
9253 2017-08-03  Tom Tromey  <tom@tromey.com>
9254
9255         * source.c (print_source_lines_base, forward_search_command)
9256         (reverse_search_command): Use gdb_file_up.
9257
9258 2017-08-03  Tom Tromey  <tom@tromey.com>
9259
9260         * fbsd-nat.c (fbsd_find_memory_regions): Update.
9261
9262 2017-08-03  Tom Tromey  <tom@tromey.com>
9263
9264         * cli/cli-cmds.c (find_and_open_script): Change return type.
9265         Remove "streamp" and "full_path" parameters.
9266         (source_script_with_search): Update.
9267         * auto-load.c (source_script_file): Update.
9268         * cli/cli-cmds.h (find_and_open_script): Change type.
9269         (open_script): New struct.
9270
9271 2017-08-03  Tom Tromey  <tom@tromey.com>
9272
9273         * xml-support.c (xml_fetch_content_from_file): Update.
9274         * ui-file.c (stdio_file::open): Update.
9275         * tracefile-tfile.c (tfile_start): Update.
9276         * remote.c (remote_file_put, remote_file_get): Update.
9277         * nat/linux-procfs.c (linux_proc_get_int)
9278         (linux_proc_pid_get_state, linux_proc_tid_get_name): Update.
9279         * nat/linux-osdata.c (linux_common_core_of_thread): Update.
9280         (command_from_pid, commandline_from_pid, linux_xfer_osdata_cpus)
9281         (print_sockets, linux_xfer_osdata_shm, linux_xfer_osdata_sem)
9282         (linux_xfer_osdata_msg, linux_xfer_osdata_modules): Update.
9283         * nat/linux-btrace.c (linux_determine_kernel_start): Update.
9284         * linux-nat.c (linux_proc_pending_signals): Update.
9285         * dwarf2read.c (write_psymtabs_to_index): Use gdb_file_up.
9286         (file_closer): Remove.
9287         * compile/compile.c (compile_to_object): Update.
9288         * common/filestuff.h (struct gdb_file_deleter): New.
9289         (gdb_file_up): New typedef.
9290         (gdb_fopen_cloexec): Change return type.
9291         * common/filestuff.c (gdb_fopen_cloexec): Return gdb_file_up.
9292         * cli/cli-dump.c (fopen_with_cleanup): Remove.
9293         (dump_binary_file, restore_binary_file): Update.
9294         * auto-load.c (auto_load_objfile_script_1): Update.
9295
9296 2017-08-03  Tom Tromey  <tom@tromey.com>
9297
9298         * tracepoint.c (tvariables_info_1): Use ui_out_emit_table.
9299         (info_static_tracepoint_markers_command): Likewise.
9300         * solib.c (info_sharedlibrary_command): Use ui_out_emit_table.
9301         * skip.c (skip_info): Use ui_out_emit_table.
9302         * progspace.c (print_program_space): Use ui_out_emit_table.
9303         * osdata.c (info_osdata): Use ui_out_emit_table.
9304         * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions): Use
9305         ui_out_emit_table.
9306         * linux-thread-db.c (info_auto_load_libthread_db): Use
9307         ui_out_emit_table.
9308         * inferior.c (print_inferior): Use ui_out_emit_table.
9309         * gdb_bfd.c (maintenance_info_bfds): Use ui_out_emit_table.
9310         * breakpoint.c (breakpoint_1): Use ui_out_emit_table.
9311         * auto-load.c (auto_load_info_scripts): Use ui_out_emit_table.
9312         * ada-tasks.c (print_ada_task_info): Use ui_out_emit_table.
9313         * ui-out.h (class ui_out_emit_table): New.
9314
9315 2017-08-02  Maciej W. Rozycki  <macro@imgtec.com>
9316
9317         * mips-tdep.c (mips_fpu_type_str): New function.
9318         (mips_dump_tdep): Call it.
9319
9320 2017-08-01  Maciej W. Rozycki  <macro@imgtec.com>
9321
9322         * mips-tdep.c (mips_gdbarch_init): Use MIPS_FPU_TYPE to access
9323         `->mips_fpu_type'.
9324
9325 2017-07-31  Xavier Roirand  <roirand@adacore.com>
9326
9327         * solib-darwin.c (DYLD_VERSION_MAX): Increase value.
9328
9329 2017-07-27  Xavier Roirand  <roirand@adacore.com>
9330
9331         * MAINTAINERS (Write After Approval): Add Xavier Roirand.
9332
9333 2017-07-26  Yao Qi  <yao.qi@linaro.org>
9334
9335         * cli/cli-cmds.c (maintenancechecklist): New variable.
9336         * gdbcmd.h (maintenancechecklist): Declare it.
9337         * i386-linux-tdep.c (_initialize_i386_linux_tdep) [GDB_SELF_TEST]:
9338         Call i386_linux_read_description with different masks.
9339         * maint.c (maintenance_check_command): New function.
9340         (_initialize_maint_cmds): Call add_prefix_cmd.
9341         * target-descriptions.c (tdesc_reg): override operator != and ==.
9342         (tdesc_type): Likewise.
9343         (tdesc_feature): Likewise.
9344         (target_desc): Likewise.
9345         [GDB_SELF_TEST] (selftests::record_xml_tdesc): New function.
9346         (maintenance_check_xml_descriptions): New function.
9347         (_initialize_target_descriptions) Add command "xml-descriptions".
9348         * target-descriptions.h (selftests::record_xml_tdesc): Declare.
9349
9350 2017-07-26  Yao Qi  <yao.qi@linaro.org>
9351
9352         * i386-linux-tdep.c: Don't include features/i386/i386-*linux.c.
9353         Include features/i386/32bit-*.c.
9354         (i386_linux_read_description): Generate target description if it
9355         doesn't exist.
9356         (_initialize_i386_linux_tdep): Don't call _initialize_tdesc_i386
9357         functions.
9358         * features/i386/32bit-linux.c: Re-generated.
9359         * features/i386/32bit-sse.c: Likewise.
9360         * target-descriptions.c (print_c_feature::visit): Print code to
9361         set register number if needed.
9362         (print_c_feature) <m_next_regnum>: New field.
9363
9364 2017-07-26  Yao Qi  <yao.qi@linaro.org>
9365
9366         * features/Makefile (CFILES): Rename with TDESC_CFILES.
9367         (FEATURE_XMLFILES): New.
9368         (FEATURE_CFILES): New.
9369         New rules.
9370         (clean-cfiles): Remove generated c files.
9371         * features/i386/32bit-avx.c: Generated.
9372         * features/i386/32bit-avx512.c: Generated.
9373         * features/i386/32bit-core.c: Generated.
9374         * features/i386/32bit-linux.c: Generated.
9375         * features/i386/32bit-mpx.c: Generated.
9376         * features/i386/32bit-pkeys.c: Generated.
9377         * features/i386/32bit-sse.c: Generated.
9378         * target-descriptions.c: Include algorithm.
9379         (tdesc_element_visitor): Add method visit_end.
9380         (print_c_tdesc): Implement visit_end.
9381         (print_c_tdesc:: m_filename_after_features): Move it to
9382         protected.
9383         (print_c_feature): New class.
9384         (maint_print_c_tdesc_cmd): Use print_c_feature if XML file
9385         name starts with "i386/32bit-".
9386
9387 2017-07-26  Yao Qi  <yao.qi@linaro.org>
9388
9389         * target-descriptions.c (tdesc_element_visitor): New class.
9390         (tdesc_element): New class.
9391         (tdesc_reg): Inherit from tdesc_element.
9392         (tdesc_reg::accept): New function.
9393         (tdesc_type): Inherit from tdesc_element.
9394         (tdesc_type::accept): New function.
9395         (tdesc_feature): Inherit from tdesc_element.
9396         (tdesc_feature::accept): New function.
9397         (target_desc): Inherit from tdesc_element.
9398         (target_desc::target_desc): New.
9399         (target_desc::~target_desc): New.
9400         (target_desc::accept): New.
9401         (allocate_target_description): Use new.
9402         (free_target_description): Use delete.
9403         (print_c_tdesc): New class.
9404         (maint_print_c_tdesc_cmd): Adjust.
9405
9406         * features/aarch64.c: Re-generated.
9407         * features/arc-arcompact.c: Re-generated.
9408         * features/arc-v2.c: Re-generated.
9409         * features/arm/arm-with-iwmmxt.c: Re-generated.
9410         * features/arm/arm-with-m.c: Re-generated.
9411         * features/arm/arm-with-m-fpa-layout.c: Re-generated.
9412         * features/arm/arm-with-m-vfp-d16.c: Re-generated.
9413         * features/arm/arm-with-neon.c: Re-generated.
9414         * features/arm/arm-with-vfpv2.c: Re-generated.
9415         * features/arm/arm-with-vfpv3.c: Re-generated.
9416         * features/i386/amd64-avx-avx512.c: Re-generated.
9417         * features/i386/amd64-avx-avx512-linux.c: Re-generated.
9418         * features/i386/amd64-avx.c: Re-generated.
9419         * features/i386/amd64-avx-linux.c: Re-generated.
9420         * features/i386/amd64-avx-mpx-avx512-pku.c: Re-generated.
9421         * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Re-generated.
9422         * features/i386/amd64-avx-mpx.c: Re-generated.
9423         * features/i386/amd64-avx-mpx-linux.c: Re-generated.
9424         * features/i386/amd64.c: Re-generated.
9425         * features/i386/amd64-linux.c: Re-generated.
9426         * features/i386/amd64-mpx.c: Re-generated.
9427         * features/i386/amd64-mpx-linux.c: Re-generated.
9428         * features/i386/i386-avx-avx512.c: Re-generated.
9429         * features/i386/i386-avx-avx512-linux.c: Re-generated.
9430         * features/i386/i386-avx.c: Re-generated.
9431         * features/i386/i386-avx-linux.c: Re-generated.
9432         * features/i386/i386-avx-mpx-avx512-pku.c: Re-generated.
9433         * features/i386/i386-avx-mpx-avx512-pku-linux.c: Re-generated.
9434         * features/i386/i386-avx-mpx.c: Re-generated.
9435         * features/i386/i386-avx-mpx-linux.c: Re-generated.
9436         * features/i386/i386.c: Re-generated.
9437         * features/i386/i386-linux.c: Re-generated.
9438         * features/i386/i386-mmx.c: Re-generated.
9439         * features/i386/i386-mmx-linux.c: Re-generated.
9440         * features/i386/i386-mpx.c: Re-generated.
9441         * features/i386/i386-mpx-linux.c: Re-generated.
9442         * features/i386/x32-avx-avx512.c: Re-generated.
9443         * features/i386/x32-avx-avx512-linux.c: Re-generated.
9444         * features/i386/x32-avx.c: Re-generated.
9445         * features/i386/x32-avx-linux.c: Re-generated.
9446         * features/i386/x32.c: Re-generated.
9447         * features/i386/x32-linux.c: Re-generated.
9448         * features/microblaze.c: Re-generated.
9449         * features/microblaze-with-stack-protect.c: Re-generated.
9450         * features/mips64-dsp-linux.c: Re-generated.
9451         * features/mips64-linux.c: Re-generated.
9452         * features/mips-dsp-linux.c: Re-generated.
9453         * features/mips-linux.c: Re-generated.
9454         * features/nds32.c: Re-generated.
9455         * features/nios2.c: Re-generated.
9456         * features/nios2-linux.c: Re-generated.
9457         * features/rs6000/powerpc-32.c: Re-generated.
9458         * features/rs6000/powerpc-32l.c: Re-generated.
9459         * features/rs6000/powerpc-403.c: Re-generated.
9460         * features/rs6000/powerpc-403gc.c : Re-generated.
9461         * features/rs6000/powerpc-405.c: Re-generated.
9462         * features/rs6000/powerpc-505.c: Re-generated.
9463         * features/rs6000/powerpc-601.c: Re-generated.
9464         * features/rs6000/powerpc-602.c: Re-generated.
9465         * features/rs6000/powerpc-603.c: Re-generated.
9466         * features/rs6000/powerpc-604.c: Re-generated.
9467         * features/rs6000/powerpc-64.c: Re-generated.
9468         * features/rs6000/powerpc-64l.c: Re-generated.
9469         * features/rs6000/powerpc-7400.c: Re-generated.
9470         * features/rs6000/powerpc-750.c: Re-generated.
9471         * features/rs6000/powerpc-860.c: Re-generated.
9472         * features/rs6000/powerpc-altivec32.c: Re-generated.
9473         * features/rs6000/powerpc-altivec32l.c: Re-generated.
9474         * features/rs6000/powerpc-altivec64.c: Re-generated.
9475         * features/rs6000/powerpc-altivec64l.c: Re-generated.
9476         * features/rs6000/powerpc-cell32l.c: Re-generated.
9477         * features/rs6000/powerpc-cell64l.c: Re-generated.
9478         * features/rs6000/powerpc-e500.c: Re-generated.
9479         * features/rs6000/powerpc-e500l.c: Re-generated.
9480         * features/rs6000/powerpc-isa205-32l.c: Re-generated.
9481         * features/rs6000/powerpc-isa205-64l.c: Re-generated.
9482         * features/rs6000/powerpc-isa205-altivec32l.c: Re-generated.
9483         * features/rs6000/powerpc-isa205-altivec64l.c: Re-generated.
9484         * features/rs6000/powerpc-isa205-vsx32l.c: Re-generated.
9485         * features/rs6000/powerpc-isa205-vsx64l.c: Re-generated.
9486         * features/rs6000/powerpc-vsx32.c: Re-generated.
9487         * features/rs6000/powerpc-vsx32l.c: Re-generated.
9488         * features/rs6000/powerpc-vsx64.c: Re-generated.
9489         * features/rs6000/powerpc-vsx64l.c: Re-generated.
9490         * features/rs6000/rs6000.c: Re-generated.
9491         * features/s390-linux32.c: Re-generated.
9492         * features/s390-linux32v1.c: Re-generated.
9493         * features/s390-linux32v2.c: Re-generated.
9494         * features/s390-linux64.c: Re-generated.
9495         * features/s390-linux64v1.c: Re-generated.
9496         * features/s390-linux64v2.c: Re-generated.
9497         * features/s390-te-linux64.c: Re-generated.
9498         * features/s390-tevx-linux64.c: Re-generated.
9499         * features/s390-vx-linux64.c: Re-generated.
9500         * features/s390x-linux64.c: Re-generated.
9501         * features/s390x-linux64v1.c: Re-generated.
9502         * features/s390x-linux64v2.c: Re-generated.
9503         * features/s390x-te-linux64.c: Re-generated.
9504         * features/s390x-tevx-linux64.c: Re-generated.
9505         * features/s390x-vx-linux64.c: Re-generated.
9506         * features/sparc/sparc32-solaris.c: Re-generated.
9507         * features/sparc/sparc64-solaris.c: Re-generated.
9508         * features/tic6x-c62x.c: Re-generated.
9509         * features/tic6x-c62x-linux.c: Re-generated.
9510         * features/tic6x-c64x.c: Re-generated.
9511         * features/tic6x-c64x-linux.c: Re-generated.
9512         * features/tic6x-c64xp.c: Re-generated.
9513         * features/tic6x-c64xp-linux.c: Re-generated.
9514
9515 2017-07-26  Yao Qi  <yao.qi@linaro.org>
9516
9517         * i386-linux-tdep.c (i386_linux_read_description): New function.
9518         (i386_linux_core_read_description): Call
9519         i386_linux_read_description.
9520         * i386-linux-tdep.h (i386_linux_read_description): Declare.
9521         (tdesc_i386_linux, tdesc_i386_mmx_linux): Remove declarations.
9522         (tdesc_i386_avx_linux, tdesc_i386_mpx_linux): Likewise
9523         (tdesc_i386_avx_mpx_linux, tdesc_i386_avx_avx512_linux): Likewise.
9524         (tdesc_i386_avx_mpx_avx512_pku_linux): Likewise.
9525         * x86-linux-nat.c (x86_linux_read_description): Call
9526         i386_linux_read_description.
9527
9528 2017-07-26  Yao Qi  <yao.qi@linaro.org>
9529
9530         * NEWS: Mention it.
9531         * features/Makefile (%.c: %.xml): Pass the xml file name to
9532         command "maint print c-tdesc".
9533         * target-descriptions.c (maint_print_c_tdesc_cmd): Get file
9534         name from 'arg'.
9535
9536 2017-07-26  Yao Qi  <yao.qi@linaro.org>
9537
9538         * target-descriptions.c (target_desc): Add ctor and dtor.  Do
9539         in-class initialization.
9540         (tdesc_create_feature): Call new instead of XCNEW.
9541         (free_target_description): Ue delete.
9542
9543 2017-07-25  John Baldwin  <jhb@FreeBSD.org>
9544
9545         * configure.nat: Add "-lkvm" for NetBSD/sparc64 and fix typo.
9546
9547 2017-07-25  Yao Qi  <yao.qi@linaro.org>
9548
9549         * amd64-tdep.c (amd64_init_abi): Make argument default_tdesc
9550         constant.
9551         (amd64_x32_init_abi): Likewise.
9552         * amd64-tdep.h (amd64_init_abi): Update declaration.
9553         (amd64_x32_init_abi): Likewise.
9554
9555 2017-07-25  Yao Qi  <yao.qi@linaro.org>
9556
9557         PR tdep/21717
9558         * arm-linux-nat.c (arm_linux_fetch_inferior_registers): Update
9559         condition for FPSCR.
9560         (arm_linux_store_inferior_registers): Likewise.
9561
9562 2017-07-22  Tom Tromey  <tom@tromey.com>
9563
9564         * break-catch-syscall.c (struct catch_syscall_inferior_data)
9565         <syscalls_counts>: Now a std::vector.
9566         (get_catch_syscall_inferior_data): Use "new".
9567         (catch_syscall_inferior_data_cleanup): Use "delete".
9568         (insert_catch_syscall, remove_catch_syscall)
9569         (clear_syscall_counts): Update.
9570
9571 2017-07-22  Tom Tromey  <tom@tromey.com>
9572
9573         * break-catch-syscall.c (syscall_catchpoint)
9574         <syscalls_to_be_caught>: Now a std::vector<int>
9575         (~syscall_catchpoint): Remove.
9576         (insert_catch_syscall, remove_catch_syscall)
9577         (breakpoint_hit_catch_syscall, print_one_catch_syscall)
9578         (print_mention_catch_syscall, print_recreate_catch_syscall):
9579         Update.
9580         (create_syscall_event_catchpoint): Change type of "filter"
9581         parameter.
9582         (catch_syscall_split_args): Return a std::vector.
9583         (catch_syscall_command_1, catching_syscall_number_1): Update.
9584
9585 2017-07-22  Tom Tromey  <tom@tromey.com>
9586
9587         * break-catch-throw.c (struct exception_catchpoint)
9588         <exception_rx>: Now a std::string.
9589         (~exception_catchpoint): Remove.
9590         (print_one_detail_exception_catchpoint): Update.
9591         (handle_gnu_v3_exceptions): Change type of except_rx.
9592         (extract_exception_regexp): Return a std::string.
9593         (catch_exception_command_1): Update.
9594
9595 2017-07-22  Tom Tromey  <tom@tromey.com>
9596
9597         * break-catch-sig.c (gdb_signal_type): Remove typedef.
9598         (struct signal_catchpoint) <signals_to_be_caught>: Now a
9599         std::vector.
9600         <catch_all>: Now a bool.
9601         (~signal_catchpoint): Remove.
9602         (signal_catchpoint_insert_location)
9603         (signal_catchpoint_remove_location)
9604         (signal_catchpoint_breakpoint_hit, signal_catchpoint_print_one)
9605         (signal_catchpoint_print_mention)
9606         (signal_catchpoint_print_recreate)
9607         (signal_catchpoint_explains_signal): Update.
9608         (create_signal_catchpoint): Change type of "filter" and
9609         "catch_all".
9610         (catch_signal_split_args): Return a std::vector.  Change type of
9611         "catch_all".
9612         (catch_signal_command): Update.
9613
9614 2017-07-20  Pedro Alves  <palves@redhat.com>
9615
9616         * ada-lang.c (ada_language_defn): Make extern.
9617         (_initialize_ada_language): Remove add_language call.
9618         * c-lang.c (c_language_defn, cplus_language_defn)
9619         (asm_language_defn, minimal_language_defn): Make extern.
9620         (_initialize_c_language): Delete.
9621         * completer.c (compare_cstrings): Delete, moved to utils.h.
9622         * d-lang.c (d_language_defn): Make extern.
9623         (_initialize_d_language): Remove add_language calls.
9624         * defs.h (enum language): Add comment.
9625         * f-lang.c (f_language_defn): Make extern.
9626         (_initialize_f_language): Remove add_language call.
9627         * go-lang.c (go_language_defn): Make extern.
9628         (_initialize_go_language): Remove add_language call.
9629         * language.c: Include <algorithm>.
9630         (languages): Redefine as const array.
9631         (languages_size, languages_allocsize, DEFAULT_ALLOCSIZE): Delete.
9632         (set_language_command): Handle "local".  Use for-range loop.
9633         (set_language): Remove loop.
9634         (language_enum): Rewrite.
9635         (language_def, language_str): Remove loops.
9636         (add_language): Delete.
9637         (add_set_language_command): New, based on add_languages.
9638         (skip_language_trampoline): Adjust.
9639         (local_language_defn): Delete.
9640         (language_gdbarch_post_init): Adjust.
9641         (_initialize_language): Remove add_language calls.  Call
9642         add_set_language_command.
9643         * language.h (add_language): Delete.
9644         (auto_language_defn)
9645         (unknown_language_defn, minimal_language_defn, ada_language_defn)
9646         (asm_language_defn, c_language_defn, cplus_language_defn)
9647         (d_language_defn, f_language_defn, go_language_defn)
9648         (m2_language_defn, objc_language_defn, opencl_language_defn)
9649         (pascal_language_defn, rust_language_defn): Declare.
9650         * m2-lang.c (m2_language_defn): Make extern.
9651         (_initialize_m2_language): Remove add_language call.
9652         * objc-lang.c (objc_language_defn): Make extern.
9653         (_initialize_objc_language): Remove add_language call.
9654         * opencl-lang.c (opencl_language_defn): Make extern.
9655         (_initialize_opencl_language): Remove add_language call.
9656         * p-lang.c (pascal_language_defn): Make extern.
9657         (_initialize_pascal_language): Delete.
9658         * rust-lang.c (rust_language_defn): Make extern.
9659         (_initialize_rust_language): Delete.
9660         * utils.h (compare_cstrings): New static inline function.
9661
9662 2017-07-20  Pedro Alves  <palves@redhat.com>
9663
9664         * ada-lang.c (ada_to_fixed_type_1): Adjust.
9665         (get_var_value): Constify parameters.
9666         (get_int_var_value): Change prototype.
9667         (to_fixed_range_type): Adjust.
9668         * ada-lang.h (get_int_var_value): Change prototype.
9669
9670 2017-07-20  Pedro Alves  <palves@redhat.com>
9671
9672         * dwarf2read.c (dw2_lookup_symbol): Use
9673         SYMBOL_MATCHES_SEARCH_NAME.
9674         * psymtab.c (psym_lookup_symbol): Use SYMBOL_MATCHES_SEARCH_NAME.
9675
9676 2017-07-20  Pedro Alves  <palves@redhat.com>
9677
9678         * block.c (block_iter_name_step, block_iter_name_first)
9679         (block_iter_name_next): Delete.
9680         (block_lookup_symbol_primary): Adjust to use
9681         dict_iter_match_first/dict_iter_match_next.
9682         * block.h (block_iter_name_first, block_iter_name_next): Delete
9683         declarations.
9684         (ALL_BLOCK_SYMBOLS_WITH_NAME): Adjust to use
9685         dict_iter_match_first/dict_iter_match_next.
9686
9687 2017-07-20  Pedro Alves  <palves@redhat.com>
9688
9689         * cp-support.c (cp_find_first_component_aux): Add missing case for
9690         end of string.
9691
9692 2017-07-18  David Blaikie  <dblaikie@gmail.com>
9693
9694         * dwarf2read.c (create_cus_hash_table): Re-add lost initialization
9695         of dwo_cu's dwo_file.
9696
9697 2017-07-18  Yao Qi  <yao.qi@linaro.org>
9698
9699         * remote.c (store_registers_using_G): Remove one line comment.
9700
9701 2017-07-18  Yao Qi  <yao.qi@linaro.org>
9702
9703         * regcache.c (regcache_cpy): Simplify it.
9704         (regcache::cpy_no_passthrough): Remove it.
9705         * regcache.h (cpy_no_passthrough): Remove it.
9706         (regcache_dup, regcache_cpy): Update comments.
9707
9708 2017-07-18  Pedro Alves  <palves@redhat.com>
9709
9710         * remote-sim.c (sim_command_completer): Adjust to work with a
9711         completion_tracker instead of a VEC.
9712
9713 2017-07-17  Pedro Alves  <palves@redhat.com>
9714
9715         * completer.c (complete_source_filenames): New function.
9716         (complete_address_and_linespec_locations): New function.
9717         (location_completer): Use complete_address_and_linespec_locations.
9718         (completion_tracker::build_completion_result): Honor the tracker's
9719         request to suppress append.
9720         * completer.h (completion_tracker::suppress_append_ws)
9721         (completion_tracker::set_suppress_append_ws): New methods.
9722         (completion_tracker::m_suppress_append_ws): New field.
9723         (complete_source_filenames): New declaration.
9724         * linespec.c (linespec_complete_what): New.
9725         (struct ls_parser) <complete_what, completion_word,
9726         completion_quote_char, completion_quote_end, completion_tracker>:
9727         New fields.
9728         (string_find_incomplete_keyword_at_end): New.
9729         (linespec_lexer_lex_string): Record quote char.  If in completion
9730         mode, don't throw.
9731         (linespec_lexer_consume_token): Advance the completion word point.
9732         (linespec_lexer_peek_token): Save/restore completion info.
9733         (save_stream_and_consume_token): New.
9734         (set_completion_after_number): New.
9735         (linespec_parse_basic): Set what to complete next depending on
9736         token.  Handle function and label completions specially.
9737         (parse_linespec): Disable objc shortcut in completion mode.  Set
9738         what to complete next depending on token type.  Skip keyword if in
9739         completion mode.
9740         (complete_linespec_component, linespec_complete): New.
9741         * linespec.h (linespec_complete): Declare.
9742
9743 2017-07-17  Pedro Alves  <palves@redhat.com>
9744
9745         * linespec.c (linespec_lexer_lex_string, find_toplevel_char):
9746         Handle 'operator<' / 'operator<<'.
9747
9748 2017-07-17  Pedro Alves  <palves@redhat.com>
9749
9750         * completer.c (collect_explicit_location_matches): Handle
9751         MATCH_LABEL.
9752         (convert_explicit_location_to_linespec): New, factored out from
9753         ...
9754         (convert_explicit_location_to_sals): ... this.
9755         (complete_label): New.
9756         (linespec_complete_label, find_label_symbols_in_block): New.
9757         (find_label_symbols): Add completion_mode parameter and adjust to
9758         call find_label_symbols_in_block.
9759         * linespec.h (linespec_complete_label): Declare.
9760
9761 2017-07-17  Pedro Alves  <palves@redhat.com>
9762
9763         * ada-lang.c (ada_collect_symbol_completion_matches): Add
9764         complete_symbol_mode parameter.
9765         * cli/cli-cmds.c (complete_command): Get the completion result out
9766         of the handle_brkchars tracker if used a custom word point.
9767         * completer.c: Include "linespec.h".
9768         (enum explicit_location_match_type) <MATCH_LINE>: New enumerator.
9769         (advance_to_expression_complete_word_point): New.
9770         (completion_tracker::completes_to_completion_word): New.
9771         (complete_files_symbols): Pass down
9772         complete_symbol_mode::EXPRESSION.
9773         (explicit_options, probe_options): New.
9774         (collect_explicit_location_matches): Complete on the
9775         explictit_loc->foo instead of word.  Use
9776         linespec_complete_function.  Handle MATCH_LINE.  Handle offering
9777         keyword and options completions.
9778         (backup_text_ptr): Delete.
9779         (skip_keyword): New.
9780         (complete_explicit_location): Remove 'word' parameter.  Add
9781         language, quoted_arg_start and quoted_arg_end parameters.
9782         Rewrite, parsing left to right.
9783         (location_completer): Rewrite.
9784         (location_completer_handle_brkchars): New function.
9785         (symbol_completer): Pass down complete_symbol_mode::EXPRESSION.
9786         (enum complete_line_internal_reason): Adjust comments.
9787         (completion_tracker::discard_completions): New.
9788         (completer_handle_brkchars_func_for_completer): Handle
9789         location_completer.
9790         (gdb_custom_word_point_brkchars)
9791         (gdb_org_rl_basic_quote_characters): New.
9792         (gdb_completion_word_break_characters_throw)
9793         (completion_find_completion_word): Handle trackers that use a
9794         custom word point.
9795         (completion_tracker::advance_custom_word_point_by): New.
9796         (completion_tracker::build_completion_result): Don't rely on
9797         readline appending the quote char.
9798         (gdb_rl_attempted_completion_function_throw): Handle trackers that
9799         use a custom word point.
9800         (gdb_rl_attempted_completion_function): Restore
9801         rl_basic_quote_characters.
9802         * completer.h (class completion_tracker): Extend intro comment.
9803         (completion_tracker::set_quote_char)
9804         (completion_tracker::quote_char)
9805         (completion_tracker::set_use_custom_word_point)
9806         (completion_tracker::use_custom_word_point)
9807         (completion_tracker::custom_word_point)
9808         (completion_tracker::set_custom_word_point)
9809         (completion_tracker::advance_custom_word_point_by)
9810         (completion_tracker::completes_to_completion_word)
9811         (completion_tracker::discard_completions): New methods.
9812         (completion_tracker::m_quote_char)
9813         (completion_tracker::m_use_custom_word_point)
9814         (completion_tracker::m_custom_word_point): New fields.
9815         (advance_to_expression_complete_word_point): Declare.
9816         * f-lang.c (f_collect_symbol_completion_matches): Add
9817         complete_symbol_mode parameter.
9818         * language.h (struct language_defn)
9819         <la_collect_symbol_completion_matches>: Add complete_symbol_mode
9820         parameter.
9821         * linespec.c (linespec_keywords): Add NULL terminator.  Make extern.
9822         (linespec_complete_function): New function.
9823         (linespec_lexer_lex_keyword): Adjust.
9824         * linespec.h (linespec_keywords, linespec_complete_function): New
9825         declarations.
9826         * location.c (find_end_quote): New function.
9827         (explicit_location_lex_one): Add explicit_completion_info
9828         parameter.  Save quoting info.  Don't throw if being called for
9829         completion.  Don't handle Ada operators here.
9830         (is_cp_operator, skip_op_false_positives, first_of)
9831         (explicit_location_lex_one_function): New function.
9832         (string_to_explicit_location): Replace 'dont_throw' parameter with
9833         an explicit_completion_info pointer parameter.  Handle it.  Don't
9834         use explicit_location_lex_one to lex function names.  Use
9835         explicit_location_lex_one_function instead.
9836         * location.h (struct explicit_completion_info): New.
9837         (string_to_explicit_location): Replace 'dont_throw' parameter with
9838         an explicit_completion_info pointer parameter.
9839         * symtab.c (default_collect_symbol_completion_matches_break_on):
9840         Add complete_symbol_mode parameter.  Handle LINESPEC mode.
9841         (default_collect_symbol_completion_matches)
9842         (collect_symbol_completion_matches): Add complete_symbol_mode
9843         parameter.
9844         (collect_symbol_completion_matches_type): Pass down
9845         complete_symbol_mode::EXPRESSION.
9846         (collect_file_symbol_completion_matches): Add complete_symbol_mode
9847         parameter.  Handle LINESPEC mode.
9848         * symtab.h (complete_symbol_mode): New.
9849         (default_collect_symbol_completion_matches_break_on)
9850         (default_collect_symbol_completion_matches)
9851         (collect_symbol_completion_matches)
9852         (collect_file_symbol_completion_matches): Add complete_symbol_mode
9853         parameter.
9854
9855 2017-07-17  Pedro Alves  <palves@redhat.com>
9856
9857         * utils.c (enum class strncmp_iw_mode): New.
9858         (strcmp_iw): Rename to ...
9859         (strncmp_iw_with_mode): ... this.  Add string2_len and mode
9860         parameters.  Handle them.
9861         (strncmp_iw): New.
9862         (strcmp_iw): Reimplement as wrapper around strncmp_iw_with_mode.
9863         * utils.h (strncmp_iw): Declare.
9864         (strcmp_iw): Move describing comments here.
9865
9866 2017-07-17  Pedro Alves  <palves@redhat.com>
9867
9868         * c-exp.y (operator_stoken): Use CP_OPERATOR_LEN and
9869         CP_OPERATOR_STR.
9870         * c-typeprint.c (is_type_conversion_operator): Use
9871         CP_OPERATOR_STR.
9872         * cp-support.c (LENGTH_OF_OPERATOR): Delete.
9873         (cp_find_first_component_aux): Use CP_OPERATOR_STR and
9874         CP_OPERATOR_LEN.
9875         * cp-support.h (CP_OPERATOR_STR, CP_OPERATOR_LEN): New.
9876         * gnu-v2-abi.c (gnuv2_is_operator_name): Use CP_OPERATOR_STR.
9877         * gnu-v3-abi.c (gnuv3_is_operator_name): Use CP_OPERATOR_STR.
9878         * linespec.c (linespec_lexer_lex_string): Use CP_OPERATOR_LEN and
9879         CP_OPERATOR_STR.
9880         * location.c: Include "cp-support.h".
9881         (explicit_location_lex_one): Use CP_OPERATOR_LEN and
9882         CP_OPERATOR_STR.
9883         * symtab.c (operator_chars): Use CP_OPERATOR_STR and
9884         CP_OPERATOR_LEN.
9885
9886 2017-07-17  Pedro Alves  <palves@redhat.com>
9887
9888         * cli/cli-cmds.c (complete_command): Use a completion tracker
9889         along with completion_find_completion_word for handle_brkchars
9890         phase.
9891         * completer.c (RL_QF_SINGLE_QUOTE, RL_QF_DOUBLE_QUOTE)
9892         (RL_QF_BACKSLASH, RL_QF_OTHER_QUOTE): New.
9893         (struct gdb_rl_completion_word_info): New.
9894         (gdb_rl_find_completion_word): New.
9895         (completion_find_completion_word): New.
9896         * completer.h (completion_find_completion_word): Declare.
9897
9898 2017-07-17  Pedro Alves  <palves@redhat.com>
9899
9900         * ada-lang.c (symbol_completion_match): Adjust comments.
9901         (symbol_completion_add): Replace vector parameter with
9902         completion_tracker parameter.  Use it.
9903         (ada_make_symbol_completion_list): Rename to...
9904         (ada_collect_symbol_completion_matches): ... this.  Add
9905         completion_tracker parameter and use it.
9906         (ada_language_defn): Adjust.
9907         * break-catch-syscall.c (catch_syscall_completer): Adjust
9908         prototype and work with completion_tracker instead of VEC.
9909         * breakpoint.c (condition_completer): Adjust prototype and work
9910         with completion_tracker instead of VEC.
9911         * c-lang.c (c_language_defn, cplus_language_defn)
9912         (asm_language_defn, minimal_language_defn): Adjust to renames.
9913         * cli/cli-cmds.c (complete_command): Rework using
9914         completion_tracker.  Catch exceptions when completing.
9915         * cli/cli-decode.c (integer_unlimited_completer)
9916         (complete_on_cmdlist, complete_on_enum): Adjust prototype and work
9917         with completion_tracker instead of VEC.
9918         * command.h (struct completion_tracker): Forward declare.
9919         (completer_ftype, completer_handle_brkchars_ftype): Change
9920         types.
9921         (complete_on_cmdlist, complete_on_enum): Adjust.
9922         * completer.c: Include <algorithm>.
9923         (struct gdb_completer_state): New.
9924         (current_completion): New global.
9925         (readline_line_completion_function): Delete.
9926         (noop_completer, filename_completer)
9927         (filename_completer_handle_brkchars, complete_files_symbols)
9928         (linespec_location_completer): Adjust to work with a
9929         completion_tracker instead of a VEC.
9930         (string_or_empty): New.
9931         (collect_explicit_location_matches): Adjust to work with a
9932         completion_tracker instead of a VEC.
9933         (explicit_location_completer): Rename to ...
9934         (complete_explicit_location): ... this and adjust to work with a
9935         completion_tracker instead of a VEC.
9936         (location_completer): Adjust to work with a completion_tracker
9937         instead of a VEC.
9938         (add_struct_fields): Adjust to work with a completion_list instead
9939         of VEC.
9940         (expression_completer): Rename to ...
9941         (complete_expression): ... this and adjust to work with a
9942         completion_tracker instead of a VEC.  Use complete_files_symbols.
9943         (expression_completer): Reimplement on top of complete_expression.
9944         (symbol_completer): Adjust to work with a completion_tracker
9945         instead of a VEC.
9946         (enum complete_line_internal_reason): Add describing comments.
9947         (complete_line_internal_normal_command): Adjust to work with a
9948         completion_tracker instead of a VEC.
9949         (complete_line_internal): Rename to ...
9950         (complete_line_internal_1): ... this and adjust to work with a
9951         completion_tracker instead of a VEC.  Assert TEXT is NULL in the
9952         handle_brkchars phase.
9953         (new_completion_tracker): Delete.
9954         (complete_line_internal): Reimplement as TRY/CATCH wrapper around
9955         complete_line_internal_1.
9956         (free_completion_tracker): Delete.
9957         (INITIAL_COMPLETION_HTAB_SIZE): New.
9958         (completion_tracker::completion_tracker)
9959         (completion_tracker::~completion_tracker): New.
9960         (maybe_add_completion): Delete.
9961         (completion_tracker::maybe_add_completion)
9962         (completion_tracker::add_completion)
9963         (completion_tracker::add_completions): New.
9964         (throw_max_completions_reached_error): Delete.
9965         (complete_line): Adjust to work with a completion_tracker instead
9966         of a VEC.  Don't create a completion_tracker_t or check for max
9967         completions here.
9968         (command_completer, command_completer_handle_brkchars)
9969         (signal_completer, reg_or_group_completer_1)
9970         (reg_or_group_completer, default_completer_handle_brkchars):
9971         Adjust to work with a completion_tracker.
9972         (gdb_completion_word_break_characters_throw): New.
9973         (gdb_completion_word_break_characters): Reimplement.
9974         (line_completion_function): Delete.
9975         (completion_tracker::recompute_lowest_common_denominator)
9976         (expand_preserving_ws)
9977         (completion_tracker::build_completion_result)
9978         (completion_result::completion_result)
9979         (completion_result::completion_result)
9980         (completion_result::~completion_result)
9981         (completion_result::completion_result)
9982         (completion_result::release_match_list, compare_cstrings)
9983         (completion_result::sort_match_list)
9984         (completion_result::reset_match_list)
9985         (gdb_rl_attempted_completion_function_throw)
9986         (gdb_rl_attempted_completion_function): New.
9987         * completer.h (completion_list, struct completion_result)
9988         (class completion_tracker): New.
9989         (complete_line): Add completion_tracker parameter.
9990         (readline_line_completion_function): Delete.
9991         (gdb_rl_attempted_completion_function): New.
9992         (noop_completer, filename_completer, expression_completer)
9993         (location_completer, symbol_completer, command_completer)
9994         (signal_completer, reg_or_group_completer): Update prototypes.
9995         (completion_tracker_t, new_completion_tracker)
9996         (make_cleanup_free_completion_tracker): Delete.
9997         (enum maybe_add_completion_enum): Delete.
9998         (maybe_add_completion): Delete.
9999         (throw_max_completions_reached_error): Delete.
10000         * corefile.c (complete_set_gnutarget): Adjust to work with a
10001         completion_tracker instead of a VEC.
10002         * cp-abi.c (cp_abi_completer): Adjust to work with a
10003         completion_tracker instead of a VEC.
10004         * d-lang.c (d_language_defn): Adjust.
10005         * disasm.c (disassembler_options_completer): Adjust to work with a
10006         completion_tracker instead of a VEC.
10007         * f-lang.c (f_make_symbol_completion_list): Rename to ...
10008         (f_collect_symbol_completion_matches): ... this.  Adjust to work
10009         with a completion_tracker instead of a VEC.
10010         (f_language_defn): Adjust.
10011         * go-lang.c (go_language_defn): Adjust.
10012         * guile/scm-cmd.c (cmdscm_add_completion, cmdscm_completer):
10013         Adjust to work with a completion_tracker instead of a VEC.
10014         * infrun.c (handle_completer): Likewise.
10015         * interps.c (interpreter_completer): Likewise.
10016         * interps.h (interpreter_completer): Likewise.
10017         * language.c (unknown_language_defn, auto_language_defn)
10018         (local_language_defn): Adjust.
10019         * language.h (language_defn::la_make_symbol_completion_list):
10020         Rename to ...
10021         (language_defn::la_collect_symbol_completion_matches): ... this
10022         and adjust to work with a completion_tracker instead of a VEC.
10023         * m2-lang.c (m2_language_defn): Adjust.
10024         * objc-lang.c (objc_language_defn): Adjust.
10025         * opencl-lang.c (opencl_language_defn): Adjust.
10026         * p-lang.c (pascal_language_defn): Adjust.
10027         * python/py-cmd.c (cmdpy_completer_helper): Handle NULL word.
10028         (cmdpy_completer_handle_brkchars, cmdpy_completer): Adjust to work
10029         with a completion_tracker.
10030         * rust-lang.c (rust_language_defn): Adjust.
10031         * symtab.c (free_completion_list, do_free_completion_list)
10032         (return_val, completion_tracker): Delete.
10033         (completion_list_add_name, completion_list_add_symbol)
10034         (completion_list_add_msymbol, completion_list_objc_symbol)
10035         (completion_list_add_fields, add_symtab_completions): Add
10036         completion_tracker parameter and use it.
10037         (default_make_symbol_completion_list_break_on_1): Rename to...
10038         (default_collect_symbol_completion_matches_break_on): ... this.
10039         Add completion_tracker parameter and use it instead of allocating
10040         a completion tracker here.
10041         (default_make_symbol_completion_list_break_on): Delete old
10042         implementation.
10043         (default_make_symbol_completion_list): Delete.
10044         (default_collect_symbol_completion_matches): New.
10045         (make_symbol_completion_list): Delete.
10046         (collect_symbol_completion_matches): New.
10047         (make_symbol_completion_type): Rename to ...
10048         (collect_symbol_completion_matches_type): ... this.  Add
10049         completion_tracker parameter and use it instead of VEC.
10050         (make_file_symbol_completion_list_1): Rename to...
10051         (collect_file_symbol_completion_matches): ... this.  Add
10052         completion_tracker parameter and use it instead of VEC.
10053         (make_file_symbol_completion_list): Delete.
10054         (add_filename_to_list): Use completion_list instead of a VEC.
10055         (add_partial_filename_data::list): Now a completion_list.
10056         (make_source_files_completion_list): Work with a completion_list
10057         instead of a VEC.
10058         * symtab.h: Include "completer.h".
10059         (default_make_symbol_completion_list_break_on)
10060         (default_make_symbol_completion_list, make_symbol_completion_list)
10061         (make_symbol_completion_type, make_file_symbol_completion_list)
10062         (make_source_files_completion_list): Delete.
10063         (default_collect_symbol_completion_matches_break_on)
10064         (default_collect_symbol_completion_matches)
10065         (collect_symbol_completion_matches)
10066         (collect_symbol_completion_matches_type)
10067         (collect_file_symbol_completion_matches)
10068         (make_source_files_completion_list): New.
10069         * top.c (init_main): Don't install a rl_completion_entry_function
10070         hook.  Install a rl_attempted_completion_function hook instead.
10071         * tui/tui-layout.c (layout_completer): Adjust to work with a
10072         completion_tracker.
10073         * tui/tui-regs.c (tui_reggroup_completer):
10074         * tui/tui-win.c (window_name_completer, focus_completer)
10075         (winheight_completer): Adjust to work with a completion_tracker.
10076         * value.c: Include "completer.h".
10077         (complete_internalvar): Adjust to work with a completion_tracker.
10078         * value.h (complete_internalvar): Likewise.
10079
10080 2017-07-17  Pedro Alves  <palves@redhat.com>
10081
10082         * cli/cli-decode.c (set_cmd_completer_handle_brkchars): Adjust to
10083         renames.
10084         * cli/cli-decode.h (struct cmd_list_element) <completer>: Move
10085         comments to completer_ftype's declaration.
10086         <completer_handle_brkchars>: Change type to
10087         completer_handle_brkchars_ftype.
10088         * command.h (completer_ftype): Add describing comment and give
10089         names to parameters.
10090         (completer_ftype_void): Rename to ...
10091         (completer_handle_brkchars_ftype) ... this.  Add describing comment.
10092         (set_cmd_completer_handle_brkchars): Adjust.
10093         * completer.c (filename_completer_handle_brkchars): New function.
10094         (complete_line_internal_normal_command): New function, factored
10095         out from ...
10096         (complete_line_internal): ... here.
10097         (command_completer_handle_brkchars)
10098         (default_completer_handle_brkchars)
10099         (completer_handle_brkchars_func_for_completer): New functions.
10100         * completer.h (set_gdb_completion_word_break_characters): Delete
10101         declaration.
10102         (completer_handle_brkchars_func_for_completer): New declaration.
10103         * python/py-cmd.c (cmdpy_completer_handle_brkchars): Adjust to use
10104         completer_handle_brkchars_func_for_completer.
10105
10106 2017-07-17  Pedro Alves  <palves@redhat.com>
10107
10108         * completer.c (symbol_completer): New function, based on
10109         make_symbol_completion_list_fn.
10110         * completer.h (symbol_completer): New declaration.
10111         * guile/scm-cmd.c (cmdscm_completers): Adjust.
10112         * python/py-cmd.c (completers): Adjust.
10113         * symtab.c (make_symbol_completion_list_fn): Delete.
10114         * symtab.h (make_symbol_completion_list_fn): Delete.
10115         * cli/cli-decode.c (add_cmd): Adjust.
10116
10117 2017-07-17  Pedro Alves  <palves@redhat.com>
10118
10119         * Makefile.in (COMMON_OBS): Add filename-seen-cache.o.
10120         * dwarf2read.c: Include "filename-seen-cache.h".
10121         * dwarf2read.c (dwarf2_per_objfile) <filenames_cache>: New field.
10122         (dw2_map_symbol_filenames): Build and use a filenames_seen_cache.
10123         * filename-seen-cache.c: New file.
10124         * filename-seen-cache.h: New file.
10125         * symtab.c: Include "filename-seen-cache.h".
10126         (struct filename_seen_cache, INITIAL_FILENAME_SEEN_CACHE_SIZE)
10127         (create_filename_seen_cache, clear_filename_seen_cache)
10128         (delete_filename_seen_cache, filename_seen): Delete, parts moved
10129         to filename-seen-cache.h/filename-seen-cache.c.
10130         (output_source_filename, sources_info)
10131         (maybe_add_partial_symtab_filename)
10132         (make_source_files_completion_list): Adjust to use
10133         filename_seen_cache.
10134
10135 2017-07-17  Pedro Alves  <palves@redhat.com>
10136
10137         * dwarf2read.c (dwarf2_per_objfile): In-class initialize all
10138         fields.
10139         (dwarf2_per_objfile::dwarf2_per_objfile(objfile*, const
10140         dwarf2_debug_sections*)): New.
10141         (dwarf2_per_objfile::dwarf2_per_objfile(const
10142         dwarf2_per_objfile&)): Declare as deleted.
10143         (dwarf2_per_objfile::operator=): Declare as deleted.
10144         (dwarf2_per_objfile::dwarf2_per_objfile)
10145         (dwarf2_per_objfile::~dwarf2_per_objfile)
10146         (dwarf2_per_objfile::free_cached_comp_units): New.
10147         (dwarf2_has_info): dwarf2_per_objfile initialization code moved to
10148         ctor.  Call dwarf2_per_objfile's ctor manually.
10149         (dwarf2_locate_sections): Deleted/refactored as ...
10150         (dwarf2_per_objfile::locate_sections): ... this new method.
10151         (free_cached_comp_units): Defer to
10152         dwarf2_per_objfile::free_cached_comp_units.
10153         (dwarf2_free_objfile): Call dwarf2_per_objfile's dtor manually.
10154
10155 2017-07-14  Tom Tromey  <tom@tromey.com>
10156
10157         PR rust/21764:
10158         * rust-exp.y (convert_ast_to_expression): Add "want_type"
10159         parameter.
10160         <UNOP_SIZEOF>: Split into separate case.
10161         <UNOP_VAR_VALUE>: Handle want_type.  Add error case.
10162
10163 2017-07-14  Tom Tromey  <tom@tromey.com>
10164
10165         PR rust/21763:
10166         * symtab.c (symbol_matches_domain): Add language_rust to special
10167         case.
10168         * rust-exp.y (convert_ast_to_expression) <OP_VAR_VALUE>: Don't
10169         treat LOC_TYPEDEF symbols as variables.
10170
10171 2017-07-14  Pedro Alves  <palves@redhat.com>
10172
10173         * symtab.c (make_file_symbol_completion_list_1): Iterate over
10174         symtabs matching all symtabs with SRCFILE as file name instead of
10175         only considering the first hit, with lookup_symtab.
10176
10177 2017-07-14  Simon Marchi  <simon.marchi@ericsson.com>
10178
10179         * ax-gdb.c (gen_aggregate_elt_ref): Remove operand_name and
10180         operator_name parameters.
10181         (gen_expr): Update function call.
10182
10183 2017-07-14  Simon Marchi  <simon.marchi@ericsson.com>
10184
10185         * dwarf2loc.h (dwarf2_compile_expr_to_ax): Remove gdbarch
10186         parameter.
10187         * symtab.h (struct symbol_computed_ops::tracepoint_var_ref):
10188         Likewise.
10189         * dwarf2loc.c (dwarf2_compile_expr_to_ax): Remove gdbarch
10190         parameter, use agent_expr::gdbarch instead, update function
10191         calls.
10192         (locexpr_tracepoint_var_ref): Likewise.
10193         (loclist_tracepoint_var_ref): Likewise.
10194         * ax-gdb.c (gen_trace_static_fields): Likewise.
10195         (gen_traced_pop): Likewise.
10196         (gen_frame_args_address): Likewise.
10197         (gen_frame_locals_address): Likewise.
10198         (gen_var_ref): Likewise.
10199         (gen_struct_ref_recursive): Likewise.
10200         (gen_static_field): Likewise.
10201         (gen_maybe_namespace_elt): Likewise.
10202         (gen_expr): Likewise.
10203         (gen_trace_for_var): Likewise.
10204         (gen_trace_for_expr): Likewise.
10205         (gen_trace_for_return_address): Likewise.
10206
10207 2017-07-14  Simon Marchi  <simon.marchi@ericsson.com>
10208
10209         * ax-gdb.c (gen_deref, gen_address_of): Remove unused ax
10210         parameter.
10211         (gen_struct_ref, gen_expr, gen_expr_binop_rest): Update call.
10212
10213 2017-07-14  Simon Marchi  <simon.marchi@ericsson.com>
10214
10215         * ax-gdb.c (gen_usual_unary): Remove exp parameter, get gdbarch
10216         from ax, update calls.
10217         (gen_usual_arithmetic): Likewise.
10218         (gen_integral_promotions): Likewise.
10219         (gen_bitfield_ref): Likewise.
10220         (gen_primitive_field): Likewise.
10221         (gen_struct_ref_recursive): Likewise.
10222         (gen_struct_ref): Likewise.
10223         (gen_maybe_namespace_elt): Likewise.
10224         (gen_struct_elt_for_reference): Likewise.
10225         (gen_namespace_elt): Likewise.
10226         (gen_aggregate_elt_ref): Likewise.
10227         (gen_expr): Get gdbarch from ax, update calls.
10228         (gen_expr_binop_rest): Likewise.
10229
10230 2017-07-13  Pedro Alves  <palves@redhat.com>
10231
10232         * amd64-darwin-tdep.c (x86_darwin_init_abi_64): Pass tdesc_amd64
10233         as default tdesc.
10234         * amd64-dicos-tdep.c (amd64_dicos_init_abi):
10235         * amd64-fbsd-tdep.c (amd64fbsd_init_abi):
10236         * amd64-linux-tdep.c (amd64_linux_init_abi): Pass
10237         tdesc_amd64_linux as default tdesc.  Get final tdesc from the
10238         tdep.
10239         (amd64_x32_linux_init_abi): Pass tdesc_x32_linux as default tdesc.
10240         Get final tdesc from the tdep.
10241         * amd64-nbsd-tdep.c (amd64nbsd_init_abi): Pass tdesc_amd64 as
10242         default tdesc.
10243         * amd64-obsd-tdep.c (amd64obsd_init_abi): Likewise.
10244         * amd64-sol2-tdep.c (amd64_sol2_init_abi): Likewise.
10245         * amd64-tdep.c (amd64_init_abi): Add 'default_tdesc' parameter.
10246         Use it as default tdesc.
10247         (amd64_x32_init_abi): Add 'default_tdesc' parameter, and pass it
10248         down to amd_init_abi.  No longer handle fallback tdesc here.
10249         * amd64-tdep.h (tdesc_x32): Declare.
10250         (amd64_init_abi, amd64_x32_init_abi): Add 'default_tdesc'
10251         parameter.
10252         * amd64-windows-tdep.c (amd64_windows_init_abi): Pass tdesc_amd64
10253         as default tdesc.
10254
10255 2017-07-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
10256
10257         * s390-linux-tdep.c (s390_process_record): Add support for
10258         instructions new in arch12.
10259
10260 2017-07-11  John Baldwin  <jhb@FreeBSD.org>
10261
10262         * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers): Use
10263         PT_GETFSBASE and PT_GETGSBASE.
10264         (amd64bsd_store_inferior_registers): Use PT_SETFSBASE and
10265         PT_SETGSBASE.
10266
10267 2017-07-11  John Baldwin  <jhb@FreeBSD.org>
10268
10269         * features/Makefile (amd64.dat, amd64-avx.dat, amd64-mpx.dat)
10270         (amd64-avx-mpx.dat, amd64-avx-avx512.dat)
10271         (amd64-avx-mpx-avx512-pku.dat): Add i386/64bit-segments.xml in
10272         those rules.
10273         * features/i386/amd64-avx-avx512.xml: Add 64bit-segments.xml.
10274         * features/i386/amd64-avx-mpx-avx512-pku.xml: Add 64bit-segments.xml.
10275         * features/i386/amd64-avx-mpx.xml: Add 64bit-segments.xml.
10276         * features/i386/amd64-avx.xml: Add 64bit-segments.xml.
10277         * features/i386/amd64-mpx.xml: Add 64bit-segments.xml.
10278         * features/i386/amd64.xml: Add 64bit-segments.xml.
10279         * features/i386/amd64-avx-avx512.c: Regenerated.
10280         * features/i386/amd64-avx-mpx-avx512-pku.c: Regenerated.
10281         * features/i386/amd64-avx-mpx.c: Regenerated.
10282         * features/i386/amd64-avx.c: Regenerated.
10283         * features/i386/amd64-mpx.c: Regenerated.
10284         * features/i386/amd64.c: Regenerated.
10285         * regformats/i386/amd64-avx-avx512.dat: Regenerated.
10286         * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Regenerated.
10287         * regformats/i386/amd64-avx-mpx.dat: Regenerated.
10288         * regformats/i386/amd64-avx.dat: Regenerated.
10289         * regformats/i386/amd64-mpx.dat: Regenerated.
10290         * regformats/i386/amd64.dat: Regenerated.
10291
10292 2017-07-10  Yao Qi  <yao.qi@linaro.org>
10293
10294         * features/i386/amd64-avx-avx512-linux.c: Re-generated.
10295         * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Re-generated.
10296
10297 2017-07-10  Anton Kolesov  <Anton.Kolesov@synopsys.com>
10298
10299         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add setenv and
10300         unsetenv.
10301         * gnulib/aclocal.m4: Regenerate.
10302         * gnulib/config.in: Regenerate.
10303         * gnulib/configure: Regenerate.
10304         * gnulib/import/Makefile.am: Regenerate.
10305         * gnulib/import/Makefile.in: Regenerate.
10306         * gnulib/import/m4/gnulib-cache.m4: Regenerate.
10307         * gnulib/import/m4/gnulib-comp.m4: Regenerate.
10308         * gnulib/import/m4/environ.m4: New file.
10309         * gnulib/import/m4/setenv.m4: New file.
10310         * gnulib/import/setenv.c: New file.
10311         * gnulib/import/unsetenv.c: New file.
10312
10313 2017-07-09  Simon Marchi  <simon.marchi@ericsson.com>
10314
10315         * compile/compile-loc2c.c (do_compile_dwarf_expr_to_c): Read
10316         address when op is DW_OP_addr.
10317
10318 2017-07-09  Tom Tromey  <tom@tromey.com>
10319
10320         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Reverse size
10321         check and apply to outer type.
10322
10323 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
10324
10325         * fbsd-tdep.c (LWPINFO_OFFSET, LWPINFO_PL_FLAGS)
10326         (LWPINFO64_PL_SIGINFO, LWPINFO32_PL_SIGINFO, PL_FLAG_SI)
10327         (SIZE64_SIGINFO_T, SIZE32_SIGINFO_T, fbsd_core_xfer_siginfo): New.
10328         (fbsd_init_abi): Install gdbarch "core_xfer_siginfo" method.
10329
10330 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
10331
10332         * fbsd-tdep.c (fbsd_core_thread_name): Use thread_section_name.
10333
10334 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
10335
10336         * corelow.c (get_core_siginfo): Remove.
10337         (core_xfer_partial): Use the gdbarch "core_xfer_siginfo" method
10338         instead of get_core_siginfo.
10339         * gdbarch.sh (core_xfer_siginfo): New gdbarch callback.
10340         * gdbarch.h: Re-generate.
10341         * gdbarch.c: Re-generate.
10342         * linux-tdep.c (linux_core_xfer_siginfo): New.
10343         (linux_init_abi): Install gdbarch "core_xfer_siginfo" method.
10344
10345 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
10346
10347         * corelow.c (thread_section_name): Move to ...
10348         * gdbcore.h (thread_section_name): ... here.
10349
10350 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
10351
10352         * fbsd-nat.c [PT_LWPINFO && __LP64__] (union sigval32)
10353         (struct siginfo32): New.
10354         [PT_LWPINFO] (fbsd_siginfo_size, fbsd_convert_siginfo): New.
10355         (fbsd_xfer_partial) [PT_LWPINFO]: Handle TARGET_OBJECT_SIGNAL_INFO
10356         via ptrace(PT_LWPINFO).
10357
10358 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
10359
10360         * fbsd-tdep.c (fbsd_gdbarch_data_handle, struct fbsd_gdbarch_data)
10361         (init_fbsd_gdbarch_data, get_fbsd_gdbarch_data)
10362         (fbsd_get_siginfo_type): New.
10363         (fbsd_init_abi): Install gdbarch "get_siginfo_type" method.
10364         (_initialize_fbsd_tdep): New.
10365
10366 2017-07-06  David Blaikie  <dblaikie@gmail.com>
10367
10368         * dwarf2read.c (struct dwo_file): Use a htab of dwo_unit* (rather than
10369         a singular dwo_unit*) to support multiple CUs in the same way that
10370         multiple TUs are supported.
10371         (create_cus_hash_table): Replace create_dwo_cu with a function for
10372         parsing multiple CUs from a DWO file.
10373         (open_and_init_dwo_file): Use create_cus_hash_table rather than
10374         create_dwo_cu.
10375         (lookup_dwo_cutu): Lookup CU in the hash table in the dwo_file with
10376         htab_find, rather than comparing the signature to a singleton CU in
10377         the dwo_file.
10378
10379 2017-07-06  Pedro Alves  <palves@redhat.com>
10380
10381         * python/py-unwind.c (pyuw_dealloc_cache): Fix for loop condition.
10382
10383 2017-07-04  Pedro Alves  <palves@redhat.com>
10384
10385         * gdbtypes.c (recursive_dump_type): Don't reference TYPE_STATIC.
10386         * gdbtypes.h (TYPE_STATIC): Delete.
10387         (struct fn_field) <is_public, is_abstract, is_static, is_final,
10388         is_synchronized, is_native>: Delete.
10389         <dummy>: Bump.
10390         (TYPE_FN_FIELD_PUBLIC, TYPE_FN_FIELD_STATIC, TYPE_FN_FIELD_FINAL)
10391         (TYPE_FN_FIELD_SYNCHRONIZED, TYPE_FN_FIELD_NATIVE)
10392         (TYPE_FN_FIELD_ABSTRACT): Delete.
10393
10394 2017-07-03  Simon Marchi  <simon.marchi@ericsson.com>
10395
10396         * buffer.h (buffer_finish): Fix spelling mistakes.
10397
10398 2017-07-01  Eli Zaretskii  <eliz@gnu.org>
10399
10400         * .dir-locals.el: Automatically switch to C-style comments in
10401         versions of Emacs that support the feature.
10402
10403 2017-06-30  Sergio Durigan Junior  <sergiodj@redhat.com>
10404             Pedro Alves  <palves@redhat.com>
10405
10406         PR cli/21688
10407         * cli/cli-script.c (command_name_equals_not_inline): Remove function.
10408         (process_next_line): New variable 'inline_cmd'.
10409         Adjust 'if' clauses for "python", "compile" and "guile" to use
10410         'command_name_equals' and check for '!inline_cmd'.
10411
10412 2017-06-30  Sergio Durigan Junior  <sergiodj@redhat.com>
10413
10414         PR cli/21688
10415         * cli/cli-script.c (command_name_equals_not_inline): New function.
10416         (process_next_line): Adjust 'if' clauses for "python", "compile"
10417         and "guile" to use command_name_equals_not_inline.
10418
10419 2017-06-29  Pedro Alves  <palves@redhat.com>
10420
10421         * completer.c (expression_completer): Call
10422         linespec_location_completer instead of location_completer.
10423
10424 2017-06-29  Pedro Alves  <palves@redhat.com>
10425
10426         * completer.c (expression_completer): Remove code that recomputes
10427         'text' from 'word'.
10428
10429 2017-06-29  Yao Qi  <yao.qi@linaro.org>
10430
10431         * regformats/regdat.sh: Generate code with
10432         "ifndef IN_PROCESS_AGENT".
10433
10434 2017-06-28  Pedro Alves  <palves@redhat.com>
10435
10436         * command.h: Include "common/scoped_restore.h".
10437
10438 2017-06-28  Yao Qi  <yao.qi@linaro.org>
10439
10440         * mi/mi-cmd-break.c (mi_argv_to_format): Use obstack_grow_str
10441         instead of obstack_grow.
10442
10443 2017-06-28  Doug Gilmore  <Doug.Gilmore@imgtec.com>
10444
10445         PR gdb/21337
10446         * symfile.c (reread_symbols): Call objfiles_changed just before
10447         read_symbols.
10448
10449 2017-06-27  Pedro Alves  <palves@redhat.com>
10450
10451         * symtab.c (COMPLETION_LIST_ADD_SYMBOL)
10452         (MCOMPLETION_LIST_ADD_SYMBOL): Delete macros, replace with ...
10453         (completion_list_add_symbol, completion_list_add_msymbol):
10454         ... these new functions.
10455         (add_symtab_completions)
10456         (default_make_symbol_completion_list_break_on_1): Adjust.
10457
10458 2017-06-27  Pedro Alves  <palves@redhat.com>
10459
10460         * objfiles.c (get_objfile_bfd_data): Call bfd_alloc instead of
10461         bfd_zalloc.  Call objfile_per_bfd_storage's ctor.
10462         (free_objfile_per_bfd_storage): Call objfile_per_bfd_storage's
10463         dtor.
10464         * objfiles.h (objfile_per_bfd_storage): Add ctor.  Make
10465         'storage_obstack' field an auto_obstack.  In-class initialize all
10466         non-bitfield fields.  Make minsyms_read bool.
10467         * symfile.c (read_symbols): Adjust.
10468
10469 2017-06-27  Alan Hayward  <alan.hayward@arm.com>
10470
10471         * remote-sim.c (gdbsim_fetch_register): Use byte_vector.
10472         (gdbsim_store_register): Likewise.
10473
10474 2017-06-27  Pedro Alves  <palves@redhat.com>
10475
10476         * c-exp.y (name_obstack): Now an auto_obstack.
10477         (yylex): Use auto_obstack::clear.
10478         (c_parse): Use auto_obstack::clear instead of reinitializing and
10479         freeing the obstack.
10480         * c-lang.c (evaluate_subexp_c): Use auto_obstack.
10481         * d-exp.y (name_obstack): Now an auto_obstack.
10482         (yylex): Use auto_obstack::clear.
10483         (d_parse): Use auto_obstack::clear instead of reinitializing and
10484         freeing the obstack.
10485         * dwarf2loc.c (fetch_const_value_from_synthetic_pointer): Use
10486         auto_obstack.
10487         * dwarf2read.c (create_addrmap_from_index)
10488         (dwarf2_build_psymtabs_hard)
10489         (update_enumeration_type_from_children): Likewise.
10490         * gdb_obstack.h (auto_obstack): New type.
10491         * go-exp.y (name_obstack): Now an auto_obstack.
10492         (build_packaged_name): Use auto_obstack::clear.
10493         (go_parse): Use auto_obstack::clear instead of reinitializing and
10494         freeing the obstack.
10495         * linux-tdep.c (linux_make_mappings_corefile_notes): Use
10496         auto_obstack.
10497         * printcmd.c (printf_wide_c_string, ui_printf): Use auto_obstack.
10498         * rust-exp.y (work_obstack): Now an auto_obstack.
10499         (rust_parse, rust_lex_tests): Use auto_obstack::clear instead of
10500         reinitializing and freeing the obstack.
10501         * utils.c (do_obstack_free, make_cleanup_obstack_free): Delete.
10502         (host_char_to_target): Use auto_obstack.
10503         * utils.h (make_cleanup_obstack_free): Delete declaration.
10504         * valprint.c (generic_emit_char, generic_printstr): Use
10505         auto_obstack.
10506
10507 2017-06-27  Simon Marchi  <simon.marchi@ericsson.com>
10508
10509         * darwin-nat.c (darwin_check_new_threads): Don't handle dummy
10510         thread.
10511         (darwin_init_thread_list): Don't update dummy thread.
10512         (darwin_create_inferior, darwin_attach): Don't add a dummy thread.
10513
10514 2017-06-26  Simon Marchi  <simon.marchi@ericsson.com>
10515
10516         * record-full.c (netorder16): Remove.
10517
10518 2017-06-26  Simon Marchi  <simon.marchi@ericsson.com>
10519
10520         * common/diagnostics.h: Define macros for GCC.
10521         (DIAGNOSTIC_IGNORE_UNUSED_FUNCTION): New macro.
10522         * common/vec.h: Include diagnostics.h.
10523         (DIAGNOSTIC_IGNORE_UNUSED_VEC_FUNCTION): New macro.
10524         (DEF_VEC_I, DEF_VEC_P, DEF_VEC_O): Ignore -Wunused-function
10525         warning.
10526
10527 2017-06-26  Simon Marchi  <simon.marchi@ericsson.com>
10528
10529         * common/diagnostics.h (DIAGNOSTIC_IGNORE_DEPRECATED_REGISTER):
10530         New macro.
10531         * ada-lex.l: Ignore deprecated register warnings.
10532
10533 2017-06-25  Simon Marchi  <simon.marchi@ericsson.com>
10534
10535         * main.c (get_init_files): Replace "SYSTEM_GDBINIT +
10536         datadir_len" with "&SYSTEM_GDBINIT[datadir_len]".
10537
10538 2017-06-25  Simon Marchi  <simon.marchi@ericsson.com>
10539
10540         * dtrace-probe.c (dtrace_process_dof_probe): Put semi-colon on
10541         its own line.
10542
10543 2017-06-25  Simon Marchi  <simon.marchi@ericsson.com>
10544
10545         * nat/x86-dregs.c (x86_show_dr): Print registers one per line.
10546
10547 2017-06-23  Alan Hayward  <alan.hayward@arm.com>
10548
10549         * xtensa-tdep.c (XTENSA_MAX_REGISTER_SIZE): Add.
10550         (xtensa_register_write_masked): Use XTENSA_MAX_REGISTER_SIZE.
10551         (xtensa_register_read_masked): Likewise.
10552
10553 2017-06-22  Sergio Durigan Junior  <sergiodj@redhat.com>
10554
10555         * common/environ.c (gdb_environ::unset): Update comment.
10556
10557 2017-06-22  Alan Hayward  <alan.hayward@arm.com>
10558
10559         * python/py-unwind.c (pyuw_sniffer): Allocate space for
10560         registers.
10561
10562 2017-06-22  Alan Hayward  <alan.hayward@arm.com>
10563
10564         * record-full.c (record_full_exec_insn): Use byte_vector.
10565
10566 2017-06-22  Yao Qi  <yao.qi@linaro.org>
10567
10568         * regformats/i386/amd64-avx-mpx-avx512-pku-linux.dat: Regenerated.
10569         * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Regenerated.
10570
10571 2017-06-22  Alan Hayward  <alan.hayward@arm.com>
10572
10573         * remote.c (cached_reg): Move from here...
10574         * regcache.h (cached_reg): ...to here.
10575         * python/py-unwind.c (struct reg_info): Remove.
10576         (cached_frame_info): Use cached_reg_t.
10577         (pyuw_prev_register): Likewise.
10578         (pyuw_sniffer): Use cached_reg_t and allocate registers.
10579         (pyuw_dealloc_cache): Free all registers.
10580
10581 2017-06-22  Pedro Alves  <palves@redhat.com>
10582             Simon Marchi  <simon.marchi@ericsson.com>
10583
10584         * unittests/environ-selftests.c (run_tests): Ignore -Wself-move
10585         warning.
10586         * common/diagnostics.h: New file.
10587
10588 2017-06-22  Pedro Alves  <palves@redhat.com>
10589
10590         * common/agent.h: Add include guards.
10591
10592 2017-06-21  Simon Marchi  <simon.marchi@ericsson.com>
10593
10594         * target.h (struct target_ops) <to_xfer_partial>: Update doc to
10595         talk about addressable units instead of bytes.
10596
10597 2017-06-20  Sergio Durigan Junior  <sergiodj@redhat.com>
10598
10599         * common/environ.c (gdb_environ::unset): Use '::iterator' instead
10600         of '::const_iterator'.
10601
10602 2017-06-20  Sergio Durigan Junior  <sergiodj@redhat.com>
10603
10604         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
10605         'unittests/environ-selftests.c'.
10606         (SUBDIR_UNITTESTS_OBS): Add 'environ-selftests.o'.
10607         * charset.c (find_charset_names): Declare object 'iconv_env'.
10608         Update code to use 'iconv_env' object.  Remove call to
10609         'free_environ'.
10610         * common/environ.c: Include <utility>.
10611         (make_environ): Delete function.
10612         (free_environ): Delete function.
10613         (gdb_environ::clear): New function.
10614         (gdb_environ::operator=): New function.
10615         (gdb_environ::get): Likewise.
10616         (environ_vector): Delete function.
10617         (set_in_environ): Delete function.
10618         (gdb_environ::set): New function.
10619         (unset_in_environ): Delete function.
10620         (gdb_environ::unset): New function.
10621         (gdb_environ::envp): Likewise.
10622         * common/environ.h: Include <vector>.
10623         (struct gdb_environ): Delete; transform into...
10624         (class gdb_environ): ... this class.
10625         (free_environ): Delete prototype.
10626         (init_environ, get_in_environ, set_in_environ, unset_in_environ,
10627         environ_vector): Likewise.
10628         * infcmd.c (run_command_1): Update code to call
10629         'envp' from 'gdb_environ' class.
10630         (environment_info): Update code to call methods from 'gdb_environ'
10631         class.
10632         (unset_environment_command): Likewise.
10633         (path_info): Likewise.
10634         (path_command): Likewise.
10635         * inferior.c (inferior::~inferior): Delete call to 'free_environ'.
10636         (inferior::inferior): Initialize 'environment' using the host's
10637         information.
10638         * inferior.h: Remove forward declaration of 'struct gdb_environ'.
10639         Include "environ.h".
10640         (class inferior) <environment>: Change type from 'struct
10641         gdb_environ' to 'gdb_environ'.
10642         * mi/mi-cmd-env.c (mi_cmd_env_path): Update code to call
10643         methods from 'gdb_environ' class.
10644         * solib.c (solib_find_1): Likewise
10645         * unittests/environ-selftests.c: New file.
10646
10647 2017-06-20  Yao Qi  <yao.qi@linaro.org>
10648
10649         * features/i386/i386-linux.xml: Exchange the order of including
10650         32bit-linux.xml and 32bit-sse.xml.
10651         * features/i386/i386-linux.c: Regenerated.
10652
10653 2017-06-20  Yao Qi  <yao.qi@linaro.org>
10654
10655         * target-descriptions.c (tdesc_reg): Add ctor, dtor.
10656         Delete copy ctor and assignment operator.
10657         (tdesc_type): Likewise.
10658         (tdesc_feature): Likewise.
10659         (tdesc_free_reg): Remove.
10660         (tdesc_create_reg): Use new.
10661         (tdesc_free_type): Remove.
10662         (tdesc_create_vector): Use new.
10663         (tdesc_create_union): Likewise.
10664         (tdesc_create_flags): Likewise.
10665         (tdesc_create_enum): Likewise.
10666         (tdesc_free_feature): Delete.
10667         (free_target_description): Use delete.
10668
10669 2017-06-19  John Baldwin  <jhb@FreeBSD.org>
10670
10671         * mips-tdep.c (print_gp_register_row): Don't error for unavailable
10672         registers.
10673
10674 2017-06-19  Pedro Alves  <palves@redhat.com>
10675
10676         * dwarf2read.c (write_psymtabs_to_index): Construct file_closer
10677         after gdb::unlinker.
10678
10679 2017-06-19  Sergio Durigan Junior  <sergiodj@redhat.com>
10680
10681         * mi/mi-cm-env.c (_initialize_mi_cmd_env): Use getenv instead of
10682         gdb_environ to access an environment variable.
10683
10684 2017-06-18  Thomas Petazzoni  <thomas.petazzoni@free-electrons.com>
10685
10686         * nat/linux-ptrace.c (linux_fork_to_function): Add cast to
10687         gdb_byte*.
10688
10689 2017-06-17  Simon Marchi  <simon.marchi@ericsson.com>
10690
10691         * nat/fork-inferior.h (trace_start_error): Add ATTRIBUTE_PRINTF.
10692
10693 2017-06-17  Simon Marchi  <simon.marchi@ericsson.com>
10694
10695         * configure: Re-generate.
10696         * warning.m4 (build_warnings): Add -Wno-mismatched-tags.
10697
10698 2017-06-17  Simon Marchi  <simon.marchi@ericsson.com>
10699
10700         * configure: Re-generate.
10701         * warning.m4: Pass -Werror to compiler when checking for
10702         supported warning flags.
10703
10704 2017-06-17  Simon Marchi  <simon.marchi@ericsson.com>
10705
10706         * Makefile.in (COMPILE.pre): Add "-x c++".
10707
10708 2017-06-16  Alan Hayward  <alan.hayward@arm.com>
10709             Pedro Alves  <palves@redhat.com>
10710             Yao Qi  <yao.qi@linaro.org>
10711
10712         * defs.h (RequireLongest): New.
10713         (extract_integer): Declare function template.
10714         (extract_signed_integer): Remove the declaration, but define it
10715         static inline.
10716         (extract_unsigned_integer): Likewise.
10717         (store_integer): Declare function template.
10718         (store_signed_integer): Remove the declaration, but define it
10719         static inline.
10720         (store_unsigned_integer): Likewise.
10721         * findvar.c (extract_integer): New function template.
10722         (extract_signed_integer): Remove.
10723         (extract_unsigned_integer): Remove.
10724         (extract_integer<LONGEST>, extract_integer<ULONGEST>): Explicit
10725         instantiations.
10726         (store_integer): New function template.
10727         (store_signed_integer): Remove.
10728         (store_unsigned_integer): Remove.
10729         (store_integer): Explicit instantiations.
10730         * regcache.c (regcache_raw_read_signed): Update.
10731         (regcache::raw_read): New function.
10732         (regcache::raw_read_signed): Remove.
10733         (regcache::raw_read_unsigned): Remove.
10734         (regcache_raw_read_unsigned): Update.
10735         (regcache_raw_write_unsigned): Update.
10736         (regcache::raw_write_signed): Remove.
10737         (regcache::raw_write): New function.
10738         (regcache_cooked_read_signed): Update.
10739         (regcache::raw_write_unsigned): Remove.
10740         (regcache::cooked_read_signed): Remove.
10741         (regcache_cooked_read_unsigned): Update.
10742         (regcache::cooked_read_unsigned): Remove.
10743         (regcache_cooked_write_signed): Update.
10744         (regcache_cooked_write_unsigned): Update.
10745         * regcache.h (regcache) <raw_read_signed>: Remove.
10746         <raw_write_signed, raw_read_unsigned, raw_write_unsigned>: Remove.
10747         <raw_read, raw_write>: New.
10748         <cooked_read_signed, cooked_write_signed>: Remove.
10749         <cooked_write_unsigned, cooked_read_unsigned>: Remove.
10750         <cooked_read, cooked_write>: New.
10751         * sh64-tdep.c (sh64_pseudo_register_read): Update.
10752         (sh64_pseudo_register_write): Update.
10753
10754 2017-06-16  Anton Kolesov  <anton.kolesov@synopsys.com>
10755
10756         * arc-tdep.c (arc_disassembler_options): New variable.
10757         (arc_gdbarch_init): Set and use it. Use arc_delayed_print_insn instead
10758         of default_print_insn.
10759         (arc_delayed_print_insn): Set info->section when needed,
10760         use default_print_insn to retrieve a disassembler.
10761
10762 2017-06-14  Sergio Durigan Junior  <sergiodj@redhat.com>
10763
10764         PR gdb/21574
10765         * infcmd.c (_initialize_infcmd): Expand "help run" documentation
10766         to mention $SHELL and startup-with-shell.
10767
10768 2017-06-14  Max Filippov  <jcmvbkbc@gmail.com>
10769
10770         * MAINTAINERS: Move Maxim Grigoriev to the Past Maintainers.
10771
10772 2017-06-14  Yao Qi  <yao.qi@linaro.org>
10773
10774         * aarch64-tdep.c (aarch64_gdb_print_insn): Call
10775         default_print_insn instead of print_insn_aarch64.
10776         * arm-tdep.c (gdb_print_insn_arm): Call
10777         default_print_insn instead of print_insn_big_arm
10778         and print_insn_little_arm.
10779         * i386-tdep.c (i386_print_insn): Call default_print_insn
10780         instead of print_insn_i386.
10781         * ia64-tdep.c (ia64_print_insn): Call
10782         default_print_insn instead of print_insn_ia64.
10783         * mips-tdep.c (gdb_print_insn_mips): Call
10784         default_print_insn instead of print_insn_big_mips
10785         and print_insn_little_mips.
10786         * spu-tdep.c (gdb_print_insn_spu): Call default_print_insn
10787         instead of print_insn_spu.
10788
10789 2017-06-14  Pedro Alves  <palves@redhat.com>
10790
10791         * ada-lang.c: Include "common/byte-vector.h".
10792         (ada_value_primitive_packed_val): Use gdb::byte_vector.
10793         * charset.c (wchar_iterator::iterate): Resize the vector instead
10794         of reserving it.
10795         * common/byte-vector.h: Include "common/def-vector.h".
10796         (wchar_iterator::m_out): Now a gdb::def_vector<gdb_wchar_t>.
10797         * cli/cli-dump.c: Include "common/byte-vector.h".
10798         (dump_memory_to_file, restore_binary_file): Use gdb::byte_vector.
10799         * common/byte-vector.h: New file.
10800         * common/def-vector.h: New file.
10801         * common/default-init-alloc.h: New file.
10802         * dwarf2loc.c: Include "common/byte-vector.h".
10803         (rw_pieced_value): Use gdb::byte_vector, and resize the vector
10804         instead of reserving it.
10805         * dwarf2read.c: Include "common/byte-vector.h".
10806         (data_buf::m_vec): Now a gdb::byte_vector.
10807         * gdb_regex.c: Include "common/def-vector.h".
10808         (compiled_regex::compiled_regex): Use gdb::def_vector<char>.
10809         * mi/mi-main.c: Include "common/byte-vector.h".
10810         (mi_cmd_data_read_memory): Use gdb::byte_vector.
10811         * printcmd.c: Include "common/byte-vector.h".
10812         (print_scalar_formatted): Use gdb::byte_vector.
10813         * valprint.c: Include "common/byte-vector.h".
10814         (maybe_negate_by_bytes, print_decimal_chars): Use
10815         gdb::byte_vector.
10816
10817 2017-06-13  Simon Marchi  <simon.marchi@ericsson.com>
10818
10819         * darwin-nat.c: Include "nat/fork-inferior.h".
10820
10821 2017-06-13  Simon Marchi  <simon.marchi@ericsson.com>
10822
10823         * configure.nat: Factor out Darwin bits that are not
10824         architecture-specific.  Add fork-inferior.o.
10825
10826 2017-06-13  Simon Marchi  <simon.marchi@ericsson.com>
10827
10828         * configure.nat: Factor out AIX bits that are not
10829         architecture-specific.  Add fork-inferior.o.
10830
10831 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
10832
10833         * dwarf2loc.c (rw_pieced_value): New.  Merge logic from...
10834         (read_pieced_value, write_pieced_value): ...here.  Reduce to
10835         wrappers that just call rw_pieced_value.
10836
10837 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
10838
10839         * dwarf2loc.c (write_pieced_value): When writing the data for a
10840         memory piece, use write_memory_with_notification instead of
10841         write_memory.
10842
10843 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
10844
10845         * valops.c (read_value_memory): Change embedded_offset to
10846         represent a bit offset instead of a byte offset.
10847         * value.h (read_value_memory): Adjust comment.
10848
10849 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
10850
10851         * dwarf2loc.c (read_pieced_value): Remove unnecessary variables
10852         dest_offset_bits and source_offset_bits.
10853         (write_pieced_value): Likewise.
10854
10855 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
10856
10857         * dwarf2loc.c (read_pieced_value): Respect the piece offset, as
10858         given by DW_OP_bit_piece.
10859         (write_pieced_value): Likewise.
10860
10861 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
10862
10863         * dwarf2loc.c (read_pieced_value): Move the buffer allocation and
10864         some other preparations to the places where sufficient information
10865         is available.
10866         (write_pieced_value): Likewise.
10867
10868 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
10869
10870         * dwarf2loc.c (bits_to_bytes): New function.
10871         (read_pieced_value): Fix offset calculations for register pieces
10872         on big-endian targets.
10873         (write_pieced_value): Likewise.
10874
10875 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
10876
10877         * dwarf2loc.c (read_pieced_value): Remove buffer_size variable.
10878         (write_pieced_value): Likewise.
10879
10880 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
10881
10882         * dwarf2loc.c (write_pieced_value): When writing to a bit-field,
10883         transfer the source value's least significant bits, instead of its
10884         lowest-addressed ones.  Rename type_len to max_offset.
10885         (read_pieced_value): Mirror above changes to write_pieced_value as
10886         applicable.
10887
10888 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
10889
10890         * dwarf2loc.c (write_pieced_value): In DWARF_VALUE_MEMORY,
10891         truncate full bytes from dest_offset_bits before using it as an
10892         offset into the buffer.
10893
10894 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
10895
10896         * dwarf2loc.c (write_pieced_value): Include transfer size in
10897         byte-wise check.
10898
10899 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
10900
10901         * dwarf2loc.c (write_pieced_value): Fix copy/paste error in the
10902         calculation of this_size.
10903
10904 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
10905
10906         * dwarf2loc.c (read_pieced_value): Respect parent value's offset
10907         when targeting a bit-field.
10908         (write_pieced_value): Likewise.
10909
10910 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
10911
10912         * dwarf2loc.c (struct piece_closure) <addr_size>: Remove field.
10913         (allocate_piece_closure): Drop addr_size parameter.
10914         (dwarf2_evaluate_loc_desc_full): Adjust call to
10915         allocate_piece_closure.
10916
10917 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
10918
10919         PR gdb/21226
10920         * dwarf2loc.c (read_pieced_value): Anchor stack value pieces at
10921         the LSB end, independent of endianness.
10922
10923 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
10924
10925         * dwarf2loc.c (write_pieced_value): Fix order of calculations for
10926         size capping.
10927
10928 2017-06-13  Yao Qi  <yao.qi@linaro.org>
10929
10930         * mips-linux-nat.c: Move include features/mips*-linux.c to
10931         mips-linux-tdep.c.
10932         (_initialize_mips_linux_nat): Move initialize_tdesc_mips* calls
10933         to mips-linux-tdep.c.
10934         * mips-linux-tdep.c: Include features/mips*-linux.c
10935         (_initialize_mips_linux_tdep): Call initialize_tdesc_mips*
10936         functions.
10937         * mips-linux-tdep.h (tdesc_mips_linux): Declare.
10938         (tdesc_mips_dsp_linux, tdesc_mips64_linux): Declare.
10939         (tdesc_mips64_dsp_linux): Declare.
10940
10941 2017-06-12  Tom Tromey  <tom@tromey.com>
10942
10943         * valprint.h (val_print_type_code_int): Remove.
10944         * valprint.c (generic_val_print_int): Always call
10945         val_print_scalar_formatted.
10946         (val_print_type_code_int): Remove.
10947         * printcmd.c (print_scalar_formatted): Handle options->format==0.
10948         * f-valprint.c (f_val_print): Use val_print_scalar_formatted.
10949         * c-valprint.c (c_val_print_int): Use val_print_scalar_formatted.
10950         * ada-valprint.c (ada_val_print_num): Use
10951         val_print_scalar_formatted.
10952
10953 2017-06-12  Tom Tromey  <tom@tromey.com>
10954
10955         * printcmd.c (print_scalar_formatted): Unify the two switches.
10956         Don't convert scalars to LONGEST.
10957
10958 2017-06-12  Tom Tromey  <tom@tromey.com>
10959
10960         PR exp/16225:
10961         * valprint.h (print_decimal_chars): Update.
10962         * valprint.c (maybe_negate_by_bytes): New function.
10963         (print_decimal_chars): Add "is_signed" argument.
10964         * printcmd.c (print_scalar_formatted): Update.
10965
10966 2017-06-12  Tom Tromey  <tom@tromey.com>
10967
10968         PR exp/16225:
10969         * valprint.h (print_binary_chars, print_hex_chars): Update.
10970         * valprint.c (val_print_type_code_int): Update.
10971         (print_binary_chars): Add "zero_pad" argument.
10972         (emit_octal_digit): New function.
10973         (print_octal_chars): Don't zero-pad.
10974         (print_decimal_chars): Likewise.
10975         (print_hex_chars): Add "zero_pad" argument.
10976         * sh64-tdep.c (sh64_do_fp_register): Update.
10977         * regcache.c (regcache::dump): Update.
10978         * printcmd.c (print_scalar_formatted): Update.
10979         * infcmd.c (default_print_one_register_info): Update.
10980
10981 2017-06-12  Pedro Alves  <palves@redhat.com>
10982             Alan Hayward  <alan.hayward@arm.com>
10983
10984         * mips-tdep.c (MAX_MIPS_ABI_REGSIZE): New.
10985         (mips_eabi_push_dummy_call): Rename local 'regsize' to
10986         'abi_regsize'.  Rename local array 'valbuf' to 'ref_valbuf', and
10987         use MAX_MIPS_ABI_REGSIZE instead of MAX_REGISTER_SIZE to size it.
10988         Assert that abi_regsize bytes fit in 'ref_valbuf'.
10989
10990 2017-06-12  Pedro Alves  <palves@redhat.com>
10991
10992         * dwarf2read.c (mapped_symtab::data): Now a vector of
10993         symtab_index_entry instead of vector of
10994         std::unique_ptr<symtab_index_entry>.  All users adjusted to check
10995         whether an element's name is NULL instead of checking whether the
10996         element itself is NULL.
10997         (find_slot): Change return type.  Adjust.
10998         (hash_expand, , add_index_entry, uniquify_cu_indices)
10999         (write_hash_table): Adjust.
11000
11001 2017-06-12  Pedro Alves  <palves@redhat.com>
11002
11003         * dwarf2read.c (recursively_count_psymbols): New function.
11004         (write_psymtabs_to_index): Call it to compute number of psyms and
11005         pass estimate size of psyms_seen to unordered_set's ctor.
11006
11007 2017-06-12  Pedro Alves  <palves@redhat.com>
11008
11009         * dwarf2read.c (write_hash_table): Check if key already exists
11010         before emplacing.
11011
11012 2017-06-12  Pedro Alves  <palves@redhat.com>
11013
11014         * dwarf2read.c (data_buf::append_space): Rename to...
11015         (data_buf::grow): ... this, and make private.  Adjust all callers.
11016         (data_buf::append_uint): New method.
11017         (add_address_entry, write_one_signatured_type)
11018         (write_psymtabs_to_index): Use it.
11019
11020 2017-06-12  Pedro Alves  <palves@redhat.com>
11021
11022         * dwarf2read.c (file_write(FILE *, const void *, size_t)): Delete.
11023         (file_write (FILE *, const std::vector<Elem>&)): Delete.
11024         (data_buf::file_write): Call ::fwrite directly.
11025
11026 2017-06-12  Pedro Alves  <palves@redhat.com>
11027
11028         * dwarf2read.c (uniquify_cu_indices): Use std::unique and
11029         std::vector::erase.
11030
11031 2017-06-12  Jan Kratochvil  <jan.kratochvil@redhat.com>
11032
11033         Code cleanup: C++ify .gdb_index producer.
11034         * dwarf2read.c: Include <unordered_set> and <unordered_map>.
11035         (MAYBE_SWAP) [WORDS_BIGENDIAN]: Cast to offset_type.
11036         (struct strtab_entry, hash_strtab_entry, eq_strtab_entry)
11037         (create_strtab, add_string): Remove.
11038         (file_write, data_buf): New.
11039         (struct symtab_index_entry): Use std::vector for cu_indices.
11040         (struct mapped_symtab): Use std::vector for data.
11041         (hash_symtab_entry, eq_symtab_entry, delete_symtab_entry)
11042         (create_symbol_hash_table, create_mapped_symtab, cleanup_mapped_symtab):
11043         Remove.
11044         (find_slot): Change return type.  Update it to the new data structures.
11045         (hash_expand, add_index_entry): Update it to the new data structures.
11046         (offset_type_compare): Remove.
11047         (uniquify_cu_indices): Update it to the new data structures.
11048         (c_str_view, c_str_view_hasher, vector_hasher): New.
11049         (add_indices_to_cpool): Remove.
11050         (write_hash_table): Update it to the new data structures.
11051         (struct psymtab_cu_index_map, hash_psymtab_cu_index)
11052         (eq_psymtab_cu_index): Remove.
11053         (psym_index_map): New typedef.
11054         (struct addrmap_index_data): Change addr_obstack pointer to data_buf
11055         reference and std::unordered_map for cu_index_htab.
11056         (add_address_entry, add_address_entry_worker, write_address_map)
11057         (write_psymbols): Update it to the new data structures.
11058         (write_obstack): Remove.
11059         (struct signatured_type_index_data): Change types_list to a data_buf
11060         reference and psyms_seen to a std::unordered_set reference.
11061         (write_one_signatured_type, recursively_write_psymbols)
11062         (write_psymtabs_to_index): Update it to the new data structures.
11063
11064 2017-06-11  Simon Marchi  <simon.marchi@ericsson.com>
11065
11066         * NEWS (Changes since GDB 8.0): Announce {set,show} debug
11067         separate-debug-file commands.
11068         * symfile.h (separate_debug_file_debug): New global.
11069         * symfile.c (separate_debug_file_debug): New global.
11070         (separate_debug_file_exists, find_separate_debug_file): Add
11071         debug output.
11072         (_initialize_symfile): Add "set debug separate-debug-file"
11073         command.
11074         * build-id.c (build_id_to_debug_bfd,
11075         find_separate_debug_file_by_buildid): Add debug output.
11076
11077 2017-06-10  Simon Marchi  <simon.marchi@polymtl.ca>
11078
11079         * gdbarch.sh (displaced_step_free_closure): Remove.
11080         * gdbarch.h, gdbarch.c: Re-generate.
11081         * aarch64-linux-tdep.c (aarch64_linux_init_abi): Don't set
11082         displaced_step_free_closure.
11083         * amd64-linux-tdep.c (amd64_linux_init_abi_common): Likewise.
11084         * arm-linux-tdep.c (arm_linux_init_abi): Likewise.
11085         * i386-linux-tdep.c (i386_linux_init_abi): Likewise.
11086         * rs6000-aix-tdep.c (rs6000_aix_init_osabi): Likewise.
11087         * rs6000-tdep.c (rs6000_gdbarch_init): Likewise.
11088         * s390-linux-tdep.c (s390_gdbarch_init): Likewise.
11089         * arch-utils.h (simple_displaced_step_free_closure): Remove.
11090         * arch-utils.c (simple_displaced_step_free_closure): Remove.
11091         * infrun.c (displaced_step_clear): Call xfree instead of
11092         gdbarch_displaced_step_free_closure.
11093
11094 2017-06-08  Sergio Durigan Junior  <sergiodj@redhat.com>
11095
11096         * common/common-utils.c (stringify_argv): Check for "arg[0] !=
11097         NULL".
11098
11099 2017-06-08 Alan Hayward  <alan.hayward@arm.com>
11100
11101         * mn10300-tdep.c (MN10300_MAX_REGISTER_SIZE): Add.
11102         (mn10300_extract_return_value): Use MN10300_MAX_REGISTER_SIZE.
11103         (mn10300_push_dummy_call): Likewise.
11104
11105 2017-06-08  Alan Hayward  <alan.hayward@arm.com>
11106
11107         * mi/mi-main.c (register_changed_p): Use value_contents_eq.
11108
11109 2017-06-08  Alan Hayward  <alan.hayward@arm.com>
11110
11111         * mi/mi-main.c (register_changed_p): Use cooked_read_value.
11112
11113 2017-06-07  Sergio Durigan Junior  <sergiodj@redhat.com>
11114
11115         * NEWS (Changes since GDB 8.0): Announce that GDBserver is now
11116         able to start inferiors using a shell.
11117         (New remote packets): Announce new packet "QStartupWithShell".
11118         * remote.c: Add PACKET_QStartupWithShell.
11119         (extended_remote_create_inferior): Handle new
11120         PACKET_QStartupWithShell.
11121         (remote_protocol_features) <QStartupWithShell>: New entry for
11122         PACKET_QStartupWithShell.
11123         (_initialize_remote): Call "add_packet_config_cmd" for
11124         QStartupShell.
11125
11126 2017-06-07  Sergio Durigan Junior  <sergiodj@redhat.com>
11127             Pedro Alves  <palves@redhat.com>
11128
11129         * Makefile.in (HFILES_NO_SRCDIR): Add "common/common-inferior.h"
11130         and "nat/fork-inferior.h".
11131         * common/common-inferior.h: New file, with contents from
11132         "gdb/inferior.h".
11133         * commom/common-utils.c: Include "common-utils.h".
11134         (stringify_argv): New function.
11135         * common/common-utils.h (stringify_argv): New prototype.
11136         * configure.nat: Add "fork-inferior.o" as a dependency for
11137         "*linux*", "fbsd*" and "nbsd*" hosts.
11138         * corefile.c (get_exec_file): Update comment.
11139         * darwin-nat.c (darwin_ptrace_him): Call "gdb_startup_inferior"
11140         instead of "startup_inferior".
11141         (darwin_create_inferior): Call "add_thread_silent" after
11142         "fork_inferior".
11143         * fork-child.c: Cleanup unnecessary includes.
11144         (SHELL_FILE): Move to "common/common-fork-child.c".
11145         (environ): Likewise.
11146         (exec_wrapper): Initialize.
11147         (get_exec_wrapper): New function.
11148         (breakup_args): Move to "common/common-fork-child.c"; rename to
11149         "breakup_args_for_exec".
11150         (escape_bang_in_quoted_argument): Move to
11151         "common/common-fork-child.c".
11152         (saved_ui): New variable.
11153         (prefork_hook): New function.
11154         (postfork_hook): Likewise.
11155         (postfork_child_hook): Likewise.
11156         (gdb_startup_inferior): Likewise.
11157         (fork_inferior): Move to "common/common-fork-child.c".  Update
11158         function to support gdbserver.
11159         (startup_inferior): Likewise.
11160         * gdbcore.h (get_exec_file): Remove declaration.
11161         * gnu-nat.c (gnu_create_inferior): Call "gdb_startup_inferior"
11162         instead of "startup_inferior".  Call "add_thread_silent" after
11163         "fork_inferior".
11164         * inf-ptrace.c: Include "nat/fork-inferior.h" and "utils.h".
11165         (inf_ptrace_create_inferior): Call "gdb_startup_inferior"
11166         instead of "startup_inferior".  Call "add_thread_silent" after
11167         "fork_inferior".
11168         * inferior.h: Include "common-inferior.h".
11169         (trace_start_error): Move to "common/common-utils.h".
11170         (trace_start_error_with_name): Likewise.
11171         (fork_inferior): Move prototype to "nat/fork-inferior.h".
11172         (startup_inferior): Likewise.
11173         (gdb_startup_inferior): New prototype.
11174         * nat/fork-inferior.c: New file, with contents from "fork-child.c".
11175         * nat/fork-inferior.h: New file.
11176         * procfs.c (procfs_init_inferior): Call "gdb_startup_inferior"
11177         instead of "startup_inferior".  Call "add_thread_silent" after
11178         "fork_inferior".
11179         * target.h (target_terminal_init): Move prototype to
11180         "target/target.h".
11181         (target_terminal_inferior): Likewise.
11182         (target_terminal_ours): Likewise.
11183         * target/target.h (target_terminal_init): New prototype, moved
11184         from "target.h".
11185         (target_terminal_inferior): Likewise.
11186         (target_terminal_ours): Likewise.
11187         * utils.c (gdb_flush_out_err): New function.
11188
11189 2017-06-07  Sergio Durigan Junior  <sergiodj@redhat.com>
11190
11191         * Makefile.in (HFILES_NO_SRCDIR): Add "common/common-gdbthread.h".
11192         * common/common-gdbthread.h: New file, with parts from
11193         "gdb/gdbthread.h".
11194         * gdbthread.h: Include "common-gdbthread.h".
11195         (switch_to_thread): Moved to "common/common-gdbthread.h".
11196
11197 2017-06-07  Sergio Durigan Junior  <sergiodj@redhat.com>
11198
11199         * Makefile.in (SFILES): Add "common/job-control.c".
11200         (HFILES_NO_SRCDIR): Add "common/job-control.h".
11201         (COMMON_OBS): Add "job-control.o".
11202         * common/job-control.c: New file, with contents from
11203         "gdb/inflow.c".
11204         * common/job-control.h: New file, with contents from "terminal.h".
11205         * fork-child.c: Include "job-control.h".
11206         * inflow.c: Include "job-control.h".
11207         (gdb_setpgid): Move to "common/common-inflow.c".
11208         (_initialize_inflow): Move setting of "job_control" to
11209         "handle_job_control".
11210         * terminal.h (job_control): Moved to "common/common-terminal.h".
11211         (gdb_setpgid): Likewise.
11212         * top.c: Include "job_control.h".
11213         * utils.c: Likewise.
11214         (job_control): Moved to "job-control.c".
11215
11216 2017-06-07  Pedro Alves  <palves@redhat.com>
11217
11218         * Makefile.in (SFILES): Add gdb_regex.c.
11219         (COMMON_OBS): Add gdb_regex.o.
11220         * ada-lang.c (ada_add_standard_exceptions)
11221         (ada_add_exceptions_from_frame, name_matches_regex)
11222         (ada_add_global_exceptions, ada_exceptions_list_1): Change regex
11223         parameter type to compiled_regex.  Adjust.
11224         (ada_exceptions_list): Use compiled_regex.
11225         * break-catch-throw.c (exception_catchpoint::pattern): Now a
11226         std::unique_ptr<compiled_regex>.
11227         (exception_catchpoint::~exception_catchpoint): Remove regfree
11228         call.
11229         (check_status_exception_catchpoint): Adjust to use compiled_regex.
11230         (handle_gnu_v3_exceptions): Adjust to use compiled_regex.
11231         * breakpoint.c (solib_catchpoint::compiled): Now a
11232         std::unique_ptr<compiled_regex>.
11233         (solib_catchpoint::~solib_catchpoint): Remove regfree call.
11234         (check_status_catch_solib): Adjust to use compiled_regex.
11235         (add_solib_catchpoint): Adjust to use compiled_regex.
11236         * cli/cli-cmds.c (apropos_command): Use compiled_regex.
11237         * cli/cli-decode.c (apropos_cmd): Change regex parameter to
11238         compiled_regex reference.  Adjust to use it.
11239         * cli/cli-decode.h: Remove struct re_pattern_buffer forward
11240         declaration.  Include "gdb_regex.h".
11241         (apropos_cmd): Change regex parameter to compiled_regex reference.
11242         * gdb_regex.c: New file.
11243         * gdb_regex.h (make_regfree_cleanup, get_regcomp_error): Delete
11244         declarations.
11245         (class compiled_regex): New.
11246         * linux-tdep.c: Include "common/gdb_optional.h".
11247         (struct mapping_regexes): New, factored out from
11248         mapping_is_anonymous_p, and adjusted to use compiled_regex.
11249         (mapping_is_anonymous_p): Use mapping_regexes wrapped in a
11250         gdb::optional and remove cleanups.  Adjust to compiled_regex.
11251         * probe.c: Include "common/gdb_optional.h".
11252         (collect_probes): Use compiled_regex and gdb::optional and remove
11253         cleanups.
11254         * skip.c: Include "common/gdb_optional.h".
11255         (skiplist_entry::compiled_function_regexp): Now a
11256         gdb::optional<compiled_regex>.
11257         (skiplist_entry::compiled_function_regexp_is_valid): Delete field.
11258         (free_skiplist_entry): Remove regfree call.
11259         (compile_skip_regexp, skip_rfunction_p): Adjust to use
11260         compiled_regex and gdb::optional.
11261         * symtab.c: Include "common/gdb_optional.h".
11262         (search_symbols): Use compiled_regex and gdb::optional.
11263         * utils.c (do_regfree_cleanup, make_regfree_cleanup)
11264         (get_regcomp_error, compile_rx_or_error): Delete.  Some bits moved
11265         to gdb_regex.c.
11266
11267 2017-06-07  Alan Hayward  <alan.hayward@arm.com>
11268
11269         * regcache.c (regcache::save): Avoid buffer use.
11270         (regcache::dump): Likewise.
11271
11272 2017-06-07  Alan Hayward  <alan.hayward@arm.com>
11273
11274         * sh-tdep.c (sh_pseudo_register_read): Remove
11275         MAX_REGISTER_SIZE.
11276         (sh_pseudo_register_write): Likewise.
11277         * sh64-tdep.c (sh64_pseudo_register_read): Likewise.
11278         (sh64_pseudo_register_write): Likewise
11279
11280 2017-06-07  Alan Hayward  <alan.hayward@arm.com>
11281
11282         * aarch64-tdep.c (aarch64_store_return_value): Use
11283         V_REGISTER_SIZE.
11284         (aarch64_pseudo_read_value): Likewise.
11285         (aarch64_pseudo_write): Likewise.
11286
11287 2017-06-06  Yao Qi  <yao.qi@linaro.org>
11288
11289         * regformats/regdef.h (set_register_cache): Remove the
11290         declaration.
11291
11292 2017-06-06 Alan Hayward  <alan.hayward@arm.com>
11293
11294         * frame.c (frame_unwind_register_signed): Use
11295         frame_unwind_register_value.
11296
11297 2017-06-06  Pedro Alves  <palves@redhat.com>
11298
11299         PR breakpoints/21553
11300         * breakpoint.c (create_breakpoints_sal_default)
11301         (init_breakpoint_sal, create_breakpoint_sal): Use
11302         gdb::unique_xmalloc_ptr for string parameters.
11303         (create_breakpoint): Constify 'extra_string' and 'cond_string'
11304         parameters.  Replace cleanups with gdb::unique_xmalloc_ptr.
11305         (base_breakpoint_create_breakpoints_sal)
11306         (bkpt_create_breakpoints_sal, tracepoint_create_breakpoints_sal)
11307         (strace_marker_create_breakpoints_sal)
11308         (create_breakpoints_sal_default): Use gdb::unique_xmalloc_ptr for
11309         string parameters.
11310         * breakpoint.h (breakpoint_ops::create_breakpoints_sal): Use
11311         gdb::unique_xmalloc_ptr for string parameters.
11312         (create_breakpoint): Constify 'extra_string' and 'cond_string'
11313         parameters.
11314
11315 2017-06-06  Alan Hayward  <alan.hayward@arm.com>
11316
11317         * alpha-tdep.c (alpha_register_to_value): Use
11318         get_frame_register_value.
11319         (alpha_value_to_register): Use ALPHA_REGISTER_SIZE.
11320
11321 2017-06-06  Alan Hayward  <alan.hayward@arm.com>
11322
11323         * ia64-tdep.c (IA64_MAX_FP_REGISTER_SIZE) Add.
11324         (ia64_register_to_value): Use IA64_MAX_FP_REGISTER_SIZE.
11325         (ia64_value_to_register): Likewise.
11326         (ia64_extract_return_value): Likewise.
11327         (ia64_store_return_value): Likewise.
11328         (ia64_push_dummy_call): Likewise.
11329
11330 2017-06-04  Joel Brobecker  <brobecker@adacore.com>
11331
11332         GDB 8.0 released.
11333
11334 2017-06-03  Simon Marchi  <simon.marchi@ericsson.com>
11335
11336         * x86-linux-nat.c (struct arch_lwp_info): Remove.
11337
11338 2017-06-03  Simon Marchi  <simon.marchi@polymtl.ca>
11339
11340         * linux-nat.c (linux_nat_post_attach_wait): Remove FIRST
11341         parameter.
11342         (linux_nat_attach): Adjust call to linux_nat_post_attach_wait.
11343
11344 2017-06-02  Simon Marchi  <simon.marchi@ericsson.com>
11345
11346         * event-loop.c (poll_timers): Unallocate timer using delete
11347         instead of xfree.
11348
11349 2017-06-02  Simon Marchi  <simon.marchi@polymtl.ca>
11350
11351         * breakpoint.h (struct breakpoint_ops) <dtor>: Remove.
11352         (struct breakpoint) <~breakpoint>: New.
11353         (struct watchpoint): Inherit from breakpoint.
11354         <~watchpoint>: New.
11355         <base>: Remove.
11356         (struct tracepoint): Inherit from breakpoint.
11357         <base>: Remove.
11358         * breakpoint.c (longjmp_breakpoint_ops): Remove.
11359         (struct longjmp_breakpoint): Inherit from breakpoint.
11360         <~longjmp_breakpoint>: New.
11361         <base>: Remove.
11362         (new_breakpoint_from_type): Remove casts.
11363         (watchpoint_in_thread_scope): Remove reference to base field.
11364         (watchpoint_del_at_next_stop): Likewise.
11365         (update_watchpoint): Likewise.
11366         (watchpoint_check): Likewise.
11367         (bpstat_check_watchpoint): Likewise.
11368         (set_longjmp_breakpoint): Likewise.
11369         (struct fork_catchpoint): Inherit from breakpoint.
11370         <base>: Remove.
11371         (struct solib_catchpoint): Inherit from breakpoint.
11372         <~solib_catchpoint>: New.
11373         <base>: Remove.
11374         (dtor_catch_solib): Change to ...
11375         (solib_catchpoint::~solib_catchpoint): ... this.
11376         (breakpoint_hit_catch_solib): Remove reference to base field.
11377         (add_solib_catchpoint): Likewise.
11378         (create_fork_vfork_event_catchpoint): Likewise.
11379         (struct exec_catchpoint): Inherit from breakpoint.
11380         <~exec_catchpoint>: New.
11381         <base>: Remove.
11382         (dtor_catch_exec): Change to ...
11383         (exec_catchpoint::~exec_catchpoint): ... this.
11384         (dtor_watchpoint): Change to ...
11385         (watchpoint::~watchpoint): ... this.
11386         (watch_command_1): Remove reference to base field.
11387         (catch_exec_command_1): Likewise.
11388         (base_breakpoint_dtor): Change to ...
11389         (breakpoint::~breakpoint): ... this.
11390         (base_breakpoint_ops): Remove dtor field value.
11391         (longjmp_bkpt_dtor): Change to ...
11392         (longjmp_breakpoint::~longjmp_breakpoint): ... this.
11393         (strace_marker_create_breakpoints_sal): Remove reference to base
11394         field.
11395         (delete_breakpoint): Don't manually call breakpoint destructor.
11396         (create_tracepoint_from_upload): Remove reference to base field.
11397         (trace_pass_set_count): Likewise.
11398         (initialize_breakpoint_ops): Don't initialize
11399         momentary_breakpoint_ops, don't set dtors.
11400         * ada-lang.c (struct ada_catchpoint): Inherit from breakpoint.
11401         <~ada_catchpoint>: New.
11402         <base>: Remove.
11403         (create_excep_cond_exprs): Remove reference to base field.
11404         (dtor_exception): Change to ...
11405         (ada_catchpoint::~ada_catchpoint): ... this.
11406         (dtor_catch_exception): Remove.
11407         (dtor_catch_exception_unhandled): Remove.
11408         (dtor_catch_assert): Remove.
11409         (create_ada_exception_catchpoint): Remove reference to base
11410         field.
11411         (initialize_ada_catchpoint_ops): Don't set dtors.
11412         * break-catch-sig.c (struct signal_catchpoint): Inherit from
11413         breakpoint.
11414         <~signal_catchpoint>: New.
11415         <base>: Remove.
11416         (signal_catchpoint_dtor): Change to ...
11417         (signal_catchpoint::~signal_catchpoint): ... this.
11418         (create_signal_catchpoint): Remove reference to base field.
11419         (initialize_signal_catchpoint_ops): Don't set dtor.
11420         * break-catch-syscall.c (struct syscall_catchpoint): Inherit
11421         from breakpoint.
11422         <~syscall_catchpoint>: New.
11423         <base>: Remove.
11424         (dtor_catch_syscall): Change to ...
11425         (syscall_catchpoint::~syscall_catchpoint): ... this.
11426         (create_syscall_event_catchpoint): Remove reference to base
11427         field.
11428         (initialize_syscall_catchpoint_ops): Don't set dtor.
11429         * break-catch-throw.c (struct exception_catchpoint): Inherit
11430         from breakpoint.
11431         <~exception_catchpoint>: New.
11432         <base>: Remove.
11433         (dtor_exception_catchpoint): Change to ...
11434         (exception_catchpoint::~exception_catchpoint): ... this.
11435         (handle_gnu_v3_exceptions): Remove reference to base field.
11436         (initialize_throw_catchpoint_ops): Don't set dtor.
11437         * ctf.c (ctf_get_traceframe_address): Remove reference to base
11438         field.
11439         * remote.c (remote_get_tracepoint_status): Likewise.
11440         * tracefile-tfile.c (tfile_get_traceframe_address): Likewise.
11441         * tracefile.c (tracefile_fetch_registers): Likewise.
11442         * tracepoint.c (actions_command): Likewise.
11443         (validate_actionline): Likewise.
11444         (tfind_1): Likewise.
11445         (get_traceframe_location): Likewise.
11446         (find_matching_tracepoint_location): Likewise.
11447         (parse_tracepoint_status): Likewise.
11448         * mi/mi-cmd-break.c (mi_cmd_break_passcount): Likewise.
11449
11450 2017-06-02  Simon Marchi  <simon.marchi@polymtl.ca>
11451
11452         * breakpoint.c (struct longjmp_breakpoint): New struct.
11453         (is_tracepoint_type): Change return type to bool.
11454         (is_longjmp_type): New function.
11455         (new_breakpoint_from_type): Handle longjmp kinds of breakpoints.
11456         (set_raw_breakpoint_without_location): Use
11457         new_breakpoint_from_type.
11458         (set_raw_breakpoint): Likewise.
11459
11460 2017-06-02  Simon Marchi  <simon.marchi@polymtl.ca>
11461
11462         * breakpoint.c (new_breakpoint_from_type): New function.
11463         (create_breakpoint_sal): Use new_breakpoint_from_type and
11464         unique_ptr.
11465         (create_breakpoint): Likewise.
11466
11467 2017-05-31  Simon Marchi  <simon.marchi@ericsson.com>
11468
11469         * memattr.c (mem_info_command): Rename to ...
11470         (info_mem_command): ... this.
11471         (mem_enable_command): Rename to ...
11472         (enable_mem_command): ... this.
11473         (mem_disable_command): Rename to ...
11474         (disable_mem_command): ... this.
11475         (mem_delete_command): Rename to ...
11476         (delete_mem_command): ... this.
11477         (_initialize_mem): Adjust function names.
11478
11479 2017-05-31  Markus Metzger  <markus.t.metzger@intel.com>
11480
11481         * btrace.c (handle_pt_insn_events): New.
11482         (ftrace_add_pt): Call handle_pt_insn_events.  Rename ERRCODE into
11483         STATUS.  Split into this and ...
11484         (handle_pt_insn_event_flags): ... this.
11485
11486 2017-05-31  Markus Metzger  <markus.t.metzger@intel.com>
11487
11488         * configure.ac: Check for pt_insn_event, struct pt_insn.enabled,
11489         and struct pt_insn.resynced.
11490         * configure: Regenerated.
11491         * config.in: Regenerated.
11492
11493 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
11494
11495         * btrace.c (ftrace_find_call_by_number): New function.
11496         (ftrace_new_function): Store objects, not pointers.
11497         (ftrace_find_call_by_number, ftrace_new_return, ftrace_new_switch,
11498         ftrace_new_gap, ftrace_update_function,
11499         ftrace_compute_global_level_offset, btrace_stich_bts, btrace_clear,
11500         btrace_insn_get, btrace_insn_get_error, btrace_insn_end,
11501         btrace_insn_next, btrace_insn_prev, ptrace_find_insn_by_number,
11502         btrace_ends_with_single_insn, btrace_call_get): Account for
11503         btrace_thread_info::functions now storing objects.
11504         * btrace.h (struct btrace_thread_info): Add constructor.
11505         (struct btrace_thread_info) <functions>: Make std::vector.
11506         (struct btrace_thread_info) <prev, next, up, insn, errcode, flags):
11507         Initialize with default values.
11508         * record-btrace.c (record_btrace_frame_sniffer): Account for
11509         btrace_thread_info::functions now storing objects.
11510
11511 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
11512
11513         * btrace.c: Remove typedef bfun_s.
11514         (ftrace_new_gap): Directly add gaps to the list of gaps.
11515         (btrace_bridge_gaps, btrace_compute_ftrace_bts, pt_btrace_insn_flags,
11516         ftrace_add_pt, btrace_compute_ftrace_pt, btrace_compute_ftrace_1,
11517         btrace_finalize_ftrace, btrace_compute_ftrace): Use std::vector
11518         instead of gdb VEC.
11519
11520 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
11521
11522         * btrace.c (ftrace_fixup_caller, ftrace_new_return, ftrace_connect_bfun,
11523         ftrace_bridge_gap): Replace references to btrace_thread_info::segment
11524         with btrace_thread_info::next_segment and
11525         btrace_thread_info::prev_segment.
11526         * btrace.h: Remove struct btrace_func_link.
11527         (struct btrace_function): Replace pair of function segment pointers
11528         with pair of indices.
11529         * python/py-record-btrace.c (btpy_call_prev_sibling,
11530         btpy_call_next_sibling): Replace references to
11531         btrace_thread_info::segment with btrace_thread_info::next_segment and
11532         btrace_thread_info::prev_segment.
11533         * record-btrace.c (record_btrace_frame_this_id): Use
11534         btrace_find_call_by_number.
11535
11536 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
11537
11538         * btrace.c (ftrace_new_function, ftrace_fixup_level,
11539         ftrace_connect_bfun, ftrace_bridge_gap, btrace_bridge_gaps,
11540         btrace_insn_next, btrace_insn_prev): Remove references to
11541         btrace_thread_info::flow.
11542         * btrace.h (struct btrace_function): Remove FLOW.
11543
11544 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
11545
11546         * btrace.c (ftrace_find_call_by_number): New function.
11547         (ftrace_update_caller, ftrace_new_call, ftrace_new_tailcall,
11548         ftrace_get_caller, ftrace_find_call, ftrace_new_return,
11549         ftrace_match_backtrace, ftrace_connect_bfun, ftrace_connect_backtrace,
11550         ftrace_bridge_gap, btrace_bridge_gaps): Use btrace_function::up as an
11551         index.
11552         * btrace.h (struct btrace_function): Turn UP into an index.
11553         * python/py-record-btrace.c (btpy_call_up): Use btrace_function::up
11554         as an index.
11555         * record-btrace.c (record_btrace_frame_unwind_stop_reason,
11556         record_btrace_frame_prev_register, record_btrace_frame_sniffer,
11557         record_btrace_tailcall_frame_sniffe): Use btrace_find_call_by_number.
11558
11559 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
11560
11561         * btrace.c (ftrace_new_function, ftrace_new_call, ftrace_new_tailcall,
11562         ftrace_new_return, ftrace_new_switch, ftrace_new_gap,
11563         ftrace_update_function, ftrace_compute_global_level_offset,
11564         btrace_compute_ftrace_bts, ftrace_add_pt, btrace_compute_ftrace_pt,
11565         btrace_stitch_bts, btrace_fetch, btrace_clear, btrace_insn_number,
11566         btrace_insn_end, btrace_is_empty): Remove references to
11567         btrace_thread_info::begin and btrace_thread_info::end.
11568         * btrace.h (struct btrace_thread_info): Remove BEGIN and END.
11569         (struct btrace_thread_info) <functions>: Adjust comment.
11570         * record-btrace.c (record_btrace_start_replaying): Remove reference to
11571         btrace_thread_info::begin.
11572
11573 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
11574
11575         * btrace.c (ftrace_new_function, ftrace_new_call, ftrace_new_tailcall,
11576         ftrace_new_return, ftrace_new_switch, ftrace_new_gap,
11577         ftrace_update_function): Remove arguments that implicitly were always
11578         BTINFO->END.
11579         (btrace_compute_ftrace_bts, ftrace_add_pt, btrace_compute_ftrace_pt):
11580         Don't pass BTINFO->END.
11581
11582 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
11583
11584         * btrace.c: (btrace_insn_get, btrace_insn_get_error, btrace_insn_number,
11585         btrace_insn_begin, btrace_insn_end, btrace_insn_next, btrace_insn_prev,
11586         btrace_find_insn_by_number): Replace function segment pointer with
11587         index.
11588         (btrace_insn_cmp): Simplify.
11589         * btrace.h: (struct btrace_insn_iterator) Rename index to
11590         insn_index.  Replace function segment pointer with index into function
11591         segment vector.
11592         * record-btrace.c (record_btrace_call_history): Replace function
11593         segment pointer use with index.
11594         (record_btrace_frame_sniffer): Retrieve function call segment through
11595         vector.
11596         (record_btrace_set_replay): Remove defunc't safety check.
11597
11598 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
11599
11600         * btrace.c (btrace_ends_with_single_insn): New function.
11601         (btrace_call_get, btrace_call_number, btrace_call_begin,
11602         btrace_call_end, btrace_call_next, btrace_call_prev,
11603         btrace_find_call_by_number): Use index into call segment vector
11604         instead of pointer.
11605         (btrace_call_cmp): Simplify.
11606         * btrace.h (struct btrace_call_iterator): Replace function call segment
11607         pointer with index into vector.
11608         * record-btrace.c (record_btrace_call_history): Use index instead of
11609         pointer.
11610
11611 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
11612
11613         * btrace.c (btrace_insn_begin, btrace_insn_end,
11614         btrace_find_insn_by_number): Add btinfo to iterator.
11615         * btrace.h (struct btrace_insn_iterator): Add btinfo.
11616
11617 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
11618
11619         * btrace.c (ftrace_new_function): Add btrace_thread_info to arguments
11620         and save pointers directly.
11621         (ftrace_new_call, ftrace_new_tailcall, ftrace_new_return,
11622         ftrace_new_switch, ftrace_new_gap, ftrace_update_function,
11623         ftrace_add_pt): Add btrace_thread_info to arguments.  Adjust for
11624         changed signature of functions.
11625         (btrace_compute_ftrace_pt): Adjust for changed signature of functions.
11626         (btrace_fetch): Remove code that adds btrace_function pointers to
11627         vector of btrace_functions.
11628         (btrace_clear): Simplify freeing vector of btrace_functions.
11629
11630 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
11631
11632         * btrace.c (btrace_fetch, btrace_clear, btrace_find_insn_by_number):
11633         Replace VEC_* with std::vector functions.
11634         * btrace.h: Add include: vector. Remove typedef for DEF_VEC_P.
11635         (struct btrace_thread_info)<functions>: Change type to std::vector.
11636
11637 2017-05-30  Simon Marchi  <simon.marchi@ericsson.com>
11638
11639         * NEWS (Changes in GDB 8.0): Remove extra empty line.  Move
11640         "Removed targets and native configurations" up.  Merge duplicate
11641         "New commands" sub-sections.  Add "New options" sub-sections.
11642
11643 2017-05-26  Alan Hayward  <alan.hayward@arm.com>
11644
11645         * defs.h (copy_integer_to_size): New declaration.
11646         * findvar.c (copy_integer_to_size): New function.
11647         (do_cint_test): New selftest function.
11648         (copy_integer_to_size_test): Likewise.
11649         (_initialize_findvar): Likewise.
11650         * mips-fbsd-tdep.c (mips_fbsd_supply_reg): Use raw_supply_integer.
11651         (mips_fbsd_collect_reg): Use raw_collect_integer.
11652         * mips-linux-tdep.c (supply_32bit_reg): Use raw_supply_integer.
11653         (mips64_fill_gregset): Use raw_collect_integer
11654         (mips64_fill_fpregset): Use raw_supply_integer.
11655         * regcache.c (regcache::raw_supply_integer): New function.
11656         (regcache::raw_collect_integer): Likewise.
11657         * regcache.h: (regcache::raw_supply_integer): New declaration.
11658         (regcache::raw_collect_integer): Likewise.
11659
11660 2017-05-24  Yao Qi  <yao.qi@linaro.org>
11661
11662         * Makefile.in (SFILES): Add gdbarch-selftests.c.
11663         (COMMON_OBS): Add gdbarch-selftests.o.
11664         * frame.c [GDB_SELF_TESTS] (create_new_frame): New function.
11665         * frame.h [GDB_SELF_TESTS] (create_new_frame): Declare.
11666         * gdbarch-selftests.c: New file.
11667         * regcache.h (regcache) <~regcache>: Mark it virtual if
11668         GDB_SELF_TEST.
11669         <raw_write>: Likewise.
11670
11671 2017-05-24  Yao Qi  <yao.qi@linaro.org>
11672
11673         * regcache.c (current_regcache): Change it to
11674         regcache::current_regcache.
11675         (regcache_observer_target_changed): Update.
11676         (regcache_thread_ptid_changed): Make it a regcache static
11677         method.
11678         (regcache_thread_ptid_changed): Update.
11679         (class regcache_access): New.
11680         (current_regcache_test): Update.
11681         (_initialize_regcache): Update.
11682         * regcache.h: Include forward_list.
11683         (regcache): Declare regcache_thread_ptid_changed and declare
11684         registers_changed_ptid as friend.
11685
11686 2017-05-24  Yao Qi  <yao.qi@linaro.org>
11687
11688         * i387-tdep.c (i387_register_to_value): Use register_size
11689         instead of TYPE_LENGTH.
11690         * m68k-tdep.c (m68k_register_to_value): Likewise.
11691
11692 2017-05-24  Yao Qi  <yao.qi@linaro.org>
11693
11694         * i387-tdep.c (i387_convert_register_p): Return false if type
11695         code isn't TYPE_CODE_FLT.
11696
11697 2017-05-24  Yao Qi  <yao.qi@linaro.org>
11698
11699         * alpha-tdep.c (alpha_convert_register_p): Return true if type
11700         length is 4.
11701         (alpha_register_to_value): Remove type length check.
11702         (alpha_value_to_register): Likewise.
11703
11704 2017-05-24  Yao Qi  <yao.qi@linaro.org>
11705
11706         * ia64-tdep.c (ia64_convert_register_p): Check type's code is
11707         TYPE_CODE_FLT.
11708
11709 2017-05-24  Yao Qi  <yao.qi@linaro.org>
11710
11711         * m68k-tdep.c (m68k_convert_register_p): Check type's code is
11712         TYPE_CODE_FLT or not.
11713
11714 2017-05-24  Yao Qi  <yao.qi@linaro.org>
11715
11716         * alpha-tdep.c (alpha_gdbarch_init): Use XCNEW instead of XNEW.
11717         * avr-tdep.c (avr_gdbarch_init): Likewise.
11718         * bfin-tdep.c (bfin_gdbarch_init): Likewise.
11719         * cris-tdep.c (cris_gdbarch_init): Likewise.
11720         * ft32-tdep.c (ft32_gdbarch_init): Likewise.
11721         * lm32-tdep.c (lm32_gdbarch_init): Likewise.
11722         * m32r-tdep.c (m32r_gdbarch_init): Likewise.
11723         * m68hc11-tdep.c (m68hc11_gdbarch_init): Likewise.
11724         * mep-tdep.c (mep_gdbarch_init): Likewise.
11725         * microblaze-tdep.c (microblaze_gdbarch_init): Likewise.
11726         * mips-tdep.c (mips_gdbarch_init): Likewise.
11727         * mn10300-tdep.c (mn10300_gdbarch_init): Likewise.
11728         * moxie-tdep.c (moxie_gdbarch_init): Likewise.
11729         * msp430-tdep.c (msp430_gdbarch_init): Likewise.
11730         * sh64-tdep.c (sh64_gdbarch_init): Likewise.
11731         * v850-tdep.c (v850_gdbarch_init): Likewise.
11732
11733 2017-05-24  Yao Qi  <yao.qi@linaro.org>
11734
11735         * selftest-arch.c (tests_with_arch): Call registers_changed
11736         and reinit_frame_cache.
11737         * selftest.c (run_self_tests): Likewise.
11738
11739 2017-05-24  Yao Qi  <yao.qi@linaro.org>
11740
11741         * rs6000-tdep.c (gdb_print_insn_powerpc): Remove.
11742         (rs6000_gdbarch_init): Don't call set_gdbarch_print_insn.
11743
11744 2017-05-24  Yao Qi  <yao.qi@linaro.org>
11745
11746         * rl78-tdep.c (rl78_gdbarch_init): Don't call
11747         set_gdbarch_print_insn.
11748
11749 2017-05-24  Yao Qi  <yao.qi@linaro.org>
11750
11751         * h8300-tdep.c (h8300_gdbarch_init): Don't call
11752         set_gdbarch_print_insn.
11753
11754 2017-05-24  Yao Qi  <yao.qi@linaro.org>
11755
11756         * alpha-tdep.c (alpha_gdbarch_init): Don't call
11757         set_gdbarch_print_insn.
11758         * arc-tdep.c (arc_gdbarch_init): Likewise.
11759         * arch-utils.c: include dis-asm.h.
11760         (default_print_insn): New function.
11761         * arch-utils.h (default_print_insn): Declare.
11762         * avr-tdep.c (avr_gdbarch_init): Don't call set_gdbarch_print_insn.
11763         * bfin-tdep.c (bfin_gdbarch_init): Likewise.
11764         * cris-tdep.c (cris_delayed_get_disassembler): Remove.
11765         (cris_gdbarch_init): Don't call set_gdbarch_print_insn.
11766         * frv-tdep.c (frv_gdbarch_init): Likewise.
11767         * ft32-tdep.c (ft32_gdbarch_init): Likewise.
11768         * gdbarch.sh (print_insn): Use default_print_insn.
11769         * gdbarch.c: Regenerated.
11770         * hppa-tdep.c (hppa_gdbarch_init): Likewise.
11771         * iq2000-tdep.c (iq2000_gdbarch_init): Likewise.
11772         * lm32-tdep.c (lm32_gdbarch_init): Likewise.
11773         * m32c-tdep.c (m32c_gdbarch_init): Likewise.
11774         * m32r-tdep.c (m32r_gdbarch_init): Likewise.
11775         * m68hc11-tdep.c (gdb_print_insn_m68hc11): Remove.
11776         (m68hc11_gdbarch_init): Don't call set_gdbarch_print_insn.
11777         * m68k-tdep.c (m68k_gdbarch_init): Likewise.
11778         * m88k-tdep.c (m88k_gdbarch_init): Likewise.
11779         * microblaze-tdep.c (microblaze_gdbarch_init): Likewise.
11780         * mn10300-tdep.c (mn10300_gdbarch_init): Likewise.
11781         * moxie-tdep.c (moxie_gdbarch_init): Likewise.
11782         * msp430-tdep.c (msp430_gdbarch_init): Likewise.
11783         * mt-tdep.c (mt_gdbarch_init): Likewise.
11784         * nds32-tdep.c (nds32_gdbarch_init): Likewise.
11785         * nios2-tdep.c (nios2_print_insn): Remove.
11786         (nios2_gdbarch_init): Don't call set_gdbarch_print_insn.
11787         * rx-tdep.c (rx_gdbarch_init): Likewise.
11788         * s390-linux-tdep.c (s390_gdbarch_init): Likewise.
11789         * score-tdep.c (score_print_insn): Remove.
11790         (score_gdbarch_init): Don't call set_gdbarch_print_insn.
11791         * sh-tdep.c (sh_gdbarch_init): Likewise.
11792         * sh64-tdep.c (sh64_gdbarch_init): Likewise.
11793         * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
11794         * tic6x-tdep.c (tic6x_print_insn): Remove.
11795         (tic6x_gdbarch_init): Don't call set_gdbarch_print_insn.
11796         * tilegx-tdep.c (tilegx_gdbarch_init): Likewise.
11797         * v850-tdep.c (v850_gdbarch_init): Likewise.
11798         * vax-tdep.c (vax_gdbarch_init): Likewise.
11799         * xstormy16-tdep.c (xstormy16_gdbarch_init): Likewise.
11800         * xtensa-tdep.c (xtensa_gdbarch_init): Likewise.
11801
11802 2017-05-23  John Baldwin  <jhb@FreeBSD.org>
11803
11804         * mips-fbsd-tdep.c (MIPS_PC_REGNUM): Remove.
11805         (MIPS_FP0_REGNUM): Remove.
11806         (MIPS_FSR_REGNUM): Remove.
11807         (mips_fbsd_supply_fpregs): Use mips_regnum.
11808         (mips_fbsd_supply_gregs): Likewise.
11809         (mips_fbsd_collect_fpregs): Likewise.
11810         (mips_fbsd_collect_gregs): Likewise.
11811
11812 2017-05-23  John Baldwin  <jhb@FreeBSD.org>
11813
11814         * mips-fbsd-nat.c (getregs_supplies): Fix upper bound comparison.
11815         (getpfpregs_supplies): New function.
11816         (mips_fbsd_fetch_inferior_registers): Remove early exit and use
11817         getfpregs_supplies.
11818         (mips_fbsd_store_inferior_registers): Likewise.
11819
11820 2017-05-22  Pedro Alves <palves@redhat.com>
11821
11822         * MAINTAINERS (Host/Native): Add John Baldwin as FreeBSD
11823         maintainer.
11824
11825 2017-05-22  Alan Hayward  <alan.hayward@arm.com>
11826
11827         * ppc-linux-nat.c (fetch_register): Use PPC_MAX_REGISTER_SIZE.
11828         (store_register): Likewise.
11829         * ppc-sysv-tdep.c (ppc_sysv_abi_push_dummy_call): Likewise.
11830         (get_decimal_float_return_value): Likewise.
11831         (do_ppc_sysv_return_value): Likewise.
11832         (ppc64_sysv_abi_push_integer): Likewise.
11833         (ppc64_sysv_abi_push_freg): Likewise.
11834         (ppc64_sysv_abi_return_value_base): Likewise.
11835         (ppc64_sysv_abi_return_value): Likewise.
11836         * rs6000-aix-tdep.c (rs6000_push_dummy_call): Likewise.
11837         * rs6000-lynx178-tdep.c (rs6000_lynx178_push_dummy_call): Likewise.
11838         * rs6000-nat.c: Likewise.
11839         * rs6000-tdep.c (rs6000_register_to_value): Likewise.
11840         (rs6000_value_to_register): Likewise.
11841         * ppc-tdep.h (PPC_MAX_REGISTER_SIZE): Add.
11842
11843 2017-05-21  Tom Tromey  <tom@tromey.com>
11844
11845         PR rust/21466:
11846         * rust-lang.c (rust_print_type) <TYPE_CODE_ARRAY>: Print unsized
11847         arrays as "[T]", not "[T; ]".
11848
11849 2017-05-19  Tom Tromey  <tom@tromey.com>
11850
11851         PR rust/21484:
11852         * rust-lang.c (exp_descriptor_rust): New function.
11853         (rust_language_defn): Use it.
11854         * p-lang.c (pascal_language_defn): Update.
11855         * opencl-lang.c (opencl_language_defn): Update.
11856         * objc-lang.c (objc_language_defn): Update.
11857         * m2-lang.c (m2_language_defn): Update.
11858         * language.h (struct language_defn)
11859         <la_watch_location_expression>: New member.
11860         * language.c (unknown_language_defn, auto_language_defn)
11861         (local_language_defn): Update.
11862         * go-lang.c (go_language_defn): Update.
11863         * f-lang.c (f_language_defn): Update.
11864         * d-lang.c (d_language_defn): Update.
11865         * c-lang.h (c_watch_location_expression): Declare.
11866         * c-lang.c (c_watch_location_expression): New function.
11867         (c_language_defn, cplus_language_defn, asm_language_defn)
11868         (minimal_language_defn): Use it.
11869         * breakpoint.c (watch_command_1): Call
11870         la_watch_location_expression.
11871         * ada-lang.c (ada_language_defn): Update.
11872
11873 2017-05-19  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
11874
11875         PR tui/21482
11876         * gdb_curses.h (NOMACROS): Define.
11877         (NCURSES_NOMACROS): Define.
11878
11879 2017-05-19  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
11880
11881         PR tui/21482
11882         * tui/tui-windata.c (tui_erase_data_content): Cast last mvwaddstr
11883         arg to char *.
11884         * tui/tui-wingeneral.c (box_win): Likewise.
11885         * tui/tui-winsource.c (tui_erase_source_content): Likewise.
11886         (tui_show_source_line): Likewise.
11887         (tui_show_exec_info_content): Likewise.
11888
11889 2017-05-19  Vladimir Mezentsev  <vladimir.mezentsev@oracle.com>
11890
11891         * sparc-tdep.c (sparc_structure_return_p)
11892         (sparc_arg_on_registers_p): New functions.
11893         (sparc32_store_arguments): Use them.
11894         * sparc64-tdep.c (sparc64_16_byte_align_p)
11895         (sparc64_store_floating_fields, sparc64_extract_floating_fields):
11896         Handle TYPE_CODE_ARRAY.
11897
11898 2017-05-17  Yao Qi  <yao.qi@linaro.org>
11899
11900         * cli/cli-decode.c (add_alias_cmd): New function.
11901         * command.h (add_alias_cmd): Declare.
11902         * infcmd.c (_initialize_infcmd): Don't call add_com_alias,
11903         instead call add_alias_cmd.
11904
11905 2017-05-17  Pedro Alves  <palves@redhat.com>
11906
11907         * Makefile.in (nat_extra_makefile_frag): Rename to ...
11908         (nat_makefile_frag): ... this.  All references updated.
11909         * configure.ac: Likewise.
11910         * configure.nat: Likewise.  Enhance comments.
11911         * configure: Regenerate.
11912
11913 2017-05-15  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
11914
11915         * procfs.c (procfs_create_inferior): Change prototype to match
11916         definition.
11917
11918 2017-05-13  Eli Zaretskii  <eliz@gnu.org>
11919
11920         * tui/tui.c (tui_enable): Cast "unknown" to 'char *' to avoid a
11921         C++ compiler warning.
11922
11923 2017-05-12  Tom Tromey  <tom@tromey.com>
11924
11925         PR rust/21483:
11926         * rust-lang.c (rust_evaluate_subexp) <STRUCTOP_STRUCT>: Don't
11927         recurse, just call value_struct_elt directly.
11928
11929 2017-05-12  Tom Tromey  <tom@tromey.com>
11930
11931         * rust-lang.c (rust_dump_subexp_body) <STRUCTOP_ANONYMOUS,
11932         OP_RUST_ARRAY>: Fix.
11933
11934 2017-05-12  Tom Tromey  <tom@tromey.com>
11935
11936         * rust-lang.c (rust_print_subexp): Replace "return" with "break".
11937
11938 2017-05-09  Yao Qi  <yao.qi@linaro.org>
11939
11940         * regcache.c: Include <forward_list>.
11941         (struct regcache_list): Remove.
11942         (current_regcache): Update.
11943         (get_thread_arch_aspace_regcache): Update for std::forward_list.
11944         (regcache_thread_ptid_changed): Likewise.
11945         (registers_changed_ptid): Likewise.
11946         (current_regcache_size): Likewise.
11947
11948 2017-05-09  Yao Qi  <yao.qi@linaro.org>
11949
11950         * regcache.c [GDB_SELF_TEST]: Include selftest.h.
11951         (current_regcache_size): New function.
11952         (current_regcache_test): New function.
11953         (_initialize_regcache) [GDB_SELF_TEST]: Register the unit test.
11954
11955 2017-05-08  Alan Hayward  <alan.hayward@arm.com>
11956
11957         * mips-tdep.c (mips_o32_return_value): Remove unused buffer.
11958         (print_gp_register_row): Use get_frame_register_value.
11959
11960 2017-05-08  Alan Hayward  <alan.hayward@arm.com>
11961
11962         * mips-linux-tdep.c (mips_supply_gregset): Use raw_supply_zeroed.
11963         (mips_supply_fpregset): Likewise.
11964         (mips64_supply_gregset): Likewise.
11965
11966 2017-05-08  Alan Hayward  <alan.hayward@arm.com>
11967
11968         * mn10300-linux-tdep.c (am33_supply_gregset_method): Use 
11969         regcache->raw_supply_zeroed.
11970
11971 2017-05-06  Sergio Durigan Junior  <sergiodj@redhat.com>
11972
11973         * configure.nat: Rearrange 'case' statements to match
11974         host before cpu.
11975
11976 2017-05-06  Sergio Durigan Junior  <sergiodj@redhat.com>
11977
11978         * Makefile.in: Remove "@host_makefile_frag@".  Add variables
11979         NAT_FILE, NATDEPFILES, NAT_CDEPS, LOADLIBES, MH_CFLAGS, XM_CLIBS,
11980         NAT_GENERATED_FILES, HAVE_NATIVE_GCORE_HOST.  Add
11981         "@nat_extra_makefile_frag@".
11982         (Makefile): Remove dependency on "@frags@".
11983         ($(GNULIB_BUILDDIR)/Makefile): Likewise.
11984         (data-directory/Makefile): Likewise.
11985         * config/aarch64/linux.mh: Deleted; moved contents to
11986         "gdb/configure.nat".
11987         * config/alpha/alpha-linux.mh: Likewise.
11988         * config/alpha/nbsd.mh: Likewise.
11989         * config/arm/linux.mh: Likewise.
11990         * config/arm/nbsdelf.mh: Likewise.
11991         * config/i386/cygwin.mh: Likewise.
11992         * config/i386/cygwin64.mh: Likewise.
11993         * config/i386/darwin.mh: Likewise.
11994         * config/i386/fbsd.mh: Likewise.
11995         * config/i386/fbsd64.mh: Likewise.
11996         * config/i386/go32.mh: Likewise.
11997         * config/i386/i386gnu.mh: Likewise.
11998         * config/i386/i386sol2.mh: Likewise.
11999         * config/i386/linux.mh: Likewise.
12000         * config/i386/linux64.mh: Likewise.
12001         * config/i386/mingw.mh: Likewise.
12002         * config/i386/mingw64.mh: Likewise.
12003         * config/i386/nbsd64.mh: Likewise.
12004         * config/i386/nbsdelf.mh: Likewise.
12005         * config/i386/nto.mh: Likewise.
12006         * config/i386/obsd.mh: Likewise.
12007         * config/i386/obsd64.mh: Likewise.
12008         * config/i386/sol2-64.mh: Likewise.
12009         * config/ia64/linux.mh: Likewise.
12010         * config/m32r/linux.mh: Likewise.
12011         * config/m68k/linux.mh: Likewise.
12012         * config/m68k/nbsdelf.mh: Likewise.
12013         * config/m68k/obsd.mh: Likewise.
12014         * config/m88k/obsd.mh: Likewise.
12015         * config/mips/fbsd.mh: Likewise.
12016         * config/mips/linux.mh: Likewise.
12017         * config/mips/nbsd.mh: Likewise.
12018         * config/mips/obsd64.mh: Likewise.
12019         * config/pa/linux.mh: Likewise.
12020         * config/pa/nbsd.mh: Likewise.
12021         * config/pa/obsd.mh: Likewise.
12022         * config/powerpc/aix.mh: Likewise.
12023         * config/powerpc/fbsd.mh: Likewise.
12024         * config/powerpc/linux.mh: Likewise.
12025         * config/powerpc/nbsd.mh: Likewise.
12026         * config/powerpc/obsd.mh: Likewise.
12027         * config/powerpc/ppc64-linux.mh: Likewise.
12028         * config/powerpc/spu-linux.mh: Likewise.
12029         * config/s390/linux.mh: Likewise.
12030         * config/sh/nbsd.mh: Likewise.
12031         * config/sparc/fbsd.mh: Likewise.
12032         * config/sparc/linux.mh: Likewise.
12033         * config/sparc/linux64.mh: Likewise.
12034         * config/sparc/nbsd64.mh: Likewise.
12035         * config/sparc/nbsdelf.mh: Likewise.
12036         * config/sparc/obsd64.mh: Likewise.
12037         * config/sparc/sol2.mh: Likewise.
12038         * config/tilegx/linux.mh: Likewise.
12039         * config/vax/nbsdelf.mh: Likewise.
12040         * config/vax/obsd.mh: Likewise.
12041         * config/xtensa/linux.mh: Likewise.
12042         * config/i386/i386gnu.mn: New file, with excerpts from
12043         "config/i386/i386gnu.mh".
12044         * configure: Regenerate.
12045         * configure.ac: Rewrite code to use "gdb/configure.nat" instead of
12046         *.mh files under "gdb/config".
12047         * configure.nat: New file, with contents from the
12048         "gdb/config/*/*.mh" files.
12049
12050 2017-05-05  Tim Wiederhake  <tim.wiederhake@intel.com>
12051
12052         * btrace.c (btrace_clear): Free insn vector.
12053
12054 2017-05-05  Pedro Alves  <palves@redhat.com>
12055
12056         * warning.m4 (build_warnings): Add -Wno-error=maybe-uninitialized.
12057         * configure: Regenerate.
12058
12059 2017-05-04  Pedro Alves  <palves@redhat.com>
12060
12061         * Makefile.in (SFILES): Add progspace-and-thread.c.
12062         (HFILES_NO_SRCDIR): Add progspace-and-thread.h.
12063         (COMMON_OBS): Add progspace-and-thread.o.
12064         * breakpoint.c: Include "progspace-and-thread.h".
12065         (update_inserted_breakpoint_locations)
12066         (insert_breakpoint_locations, create_longjmp_master_breakpoint):
12067         Use scoped_restore_current_pspace_and_thread.
12068         (create_std_terminate_master_breakpoint): Use
12069         scoped_restore_current_program_space.
12070         (remove_breakpoint): Use scoped_restore_current_pspace_and_thread.
12071         (print_breakpoint_location): Use
12072         scoped_restore_current_program_space.
12073         (bp_loc_is_permanent): Use
12074         scoped_restore_current_pspace_and_thread.
12075         (resolve_sal_pc): Use scoped_restore_current_pspace_and_thread.
12076         (download_tracepoint_locations): Use
12077         scoped_restore_current_pspace_and_thread.
12078         (breakpoint_re_set): Use scoped_restore_current_pspace_and_thread.
12079         * exec.c (exec_close_1): Use scoped_restore_current_program_space.
12080         (enum step_over_calls_kind): Moved from inferior.h.
12081         (class scoped_restore_current_thread): New class.
12082         * gdbthread.h (make_cleanup_restore_current_thread): Delete
12083         declaration.
12084         (scoped_restore_current_thread): New class.
12085         * infcmd.c: Include "common/gdb_optional.h".
12086         (continue_1, proceed_after_attach): Use
12087         scoped_restore_current_thread.
12088         (notice_new_inferior): Use scoped_restore_current_thread.
12089         * inferior.c: Include "progspace-and-thread.h".
12090         (restore_inferior, save_current_inferior): Delete.
12091         (add_inferior_command, clone_inferior_command): Use
12092         scoped_restore_current_pspace_and_thread.
12093         * inferior.h (scoped_restore_current_inferior): New class.
12094         * infrun.c: Include "progspace-and-thread.h" and
12095         "common/gdb_optional.h".
12096         (follow_fork_inferior): Use
12097         scoped_restore_current_pspace_and_thread.
12098         (scoped_restore_exited_inferior): New class.
12099         (handle_vfork_child_exec_or_exit): Use
12100         scoped_restore_exited_inferior,
12101         scoped_restore_current_pspace_and_thread,
12102         scoped_restore_current_thread and scoped_restore.
12103         (fetch_inferior_event): Use scoped_restore_current_thread.
12104         * linespec.c (decode_line_full, decode_line_1): Use
12105         scoped_restore_current_program_space.
12106         * mi/mi-main.c: Include "progspace-and-thread.h".
12107         (exec_continue): Use scoped_restore_current_thread.
12108         (mi_cmd_exec_run): Use scoped_restore_current_pspace_and_thread.
12109         (mi_cmd_trace_frame_collected): Use scoped_restore_current_thread.
12110         * proc-service.c (ps_pglobal_lookup): Use
12111         scoped_restore_current_program_space.
12112         * progspace-and-thread.c: New file.
12113         * progspace-and-thread.h: New file.
12114         * progspace.c (release_program_space, clone_program_space): Use
12115         scoped_restore_current_program_space.
12116         (restore_program_space, save_current_program_space)
12117         (save_current_space_and_thread): Delete.
12118         (switch_to_program_space_and_thread): Moved to
12119         progspace-and-thread.c.
12120         * progspace.h (save_current_program_space)
12121         (save_current_space_and_thread): Delete declarations.
12122         (scoped_restore_current_program_space): New class.
12123         * remote.c (remote_btrace_maybe_reopen): Use
12124         scoped_restore_current_thread.
12125         * symtab.c: Include "progspace-and-thread.h".
12126         (skip_prologue_sal): Use scoped_restore_current_pspace_and_thread.
12127         * thread.c (print_thread_info_1): Use
12128         scoped_restore_current_thread.
12129         (struct current_thread_cleanup): Delete.
12130         (do_restore_current_thread_cleanup)
12131         (restore_current_thread_cleanup_dtor): Rename/convert both to ...
12132         (scoped_restore_current_thread::~scoped_restore_current_thread):
12133         ... this new dtor.
12134         (make_cleanup_restore_current_thread): Rename/convert to ...
12135         (scoped_restore_current_thread::scoped_restore_current_thread):
12136         ... this new ctor.
12137         (thread_apply_all_command): Use scoped_restore_current_thread.
12138         (thread_apply_command): Use scoped_restore_current_thread.
12139         * tracepoint.c (tdump_command): Use scoped_restore_current_thread.
12140         * varobj.c (value_of_root_1): Use scoped_restore_current_thread.
12141
12142 2017-05-04  Pedro Alves  <palves@redhat.com>
12143
12144         * thread.c (make_cleanup_restore_current_thread): Move
12145         find_thread_ptid call before the is_stopped call.  Assert that the
12146         thread is found.  Replace is_stopped call by checking the thread's
12147         state directly.  Remove unnecessary NULL-thread check.
12148
12149 2017-05-04  Pedro Alves  <palves@redhat.com>
12150
12151         * corelow.c (thread_section_name): New class.
12152         (get_core_register_section, get_core_siginfo): Use it.
12153
12154 2017-05-04  Andreas Arnez  <arnez@linux.vnet.ibm.com>
12155
12156         * corelow.c (sniff_core_bfd): Remove extra semicolon.
12157         (get_core_register_section): Remove xfree of NULL pointer.
12158
12159 2017-05-03  Alan Hayward  <alan.hayward@arm.com>
12160
12161         * frv-linux-tdep.c (frv_linux_supply_gregset): Use raw_supply_zeroed.
12162         * regcache.c (regcache::raw_supply_zeroed): New function.
12163         * regcache.h (regcache::raw_supply_zeroed): New declaration.
12164
12165 2017-05-03  Simon Marchi  <simon.marchi@ericsson.com>
12166
12167         * gdbarch.sh: Remove commented out definition of
12168         TARGET_CHAR_BIT.
12169         * gdbarch.h: Re-generate.
12170
12171 2017-05-03  Sergio Durigan Junior  <sergiodj@redhat.com>
12172
12173         * configure: Regenerate.
12174
12175 2017-05-02  Simon Marchi  <simon.marchi@ericsson.com>
12176
12177         * solib-target.c (solib_target_relocate_section_addresses):
12178         Remove num_section_bases, num_bases, segment_bases variables.
12179
12180 2017-05-02  Simon Marchi  <simon.marchi@polymtl.ca>
12181
12182         * common/gdb_vecs.h (DEF_VEC_I (CORE_ADDR)): Remove.
12183
12184 2017-05-02  Simon Marchi  <simon.marchi@polymtl.ca>
12185
12186         * solib-target.c: Include <vector>
12187         (struct lm_info_target) <~lm_info_target>: Remove.
12188         <segment_bases, section_bases>: Change type to
12189         std::vector<CORE_ADDR>.
12190         (library_list_start_segment, library_list_start_section,
12191         library_list_end_library,
12192         solib_target_relocate_section_addresses): Adjust.
12193
12194 2017-05-02  Simon Marchi  <simon.marchi@polymtl.ca>
12195
12196         * gdbarch.sh (software_single_step): Change return type to
12197         std::vector<CORE_ADDR>.
12198         * gdbarch.c, gdbarch.h: Re-generate.
12199         * arch/arm-get-next-pcs.c (thumb_deal_with_atomic_sequence_raw):
12200         Adjust.
12201         (arm_deal_with_atomic_sequence_raw): Adjust.
12202         (thumb_get_next_pcs_raw): Adjust.
12203         (arm_get_next_pcs_raw): Adjust.
12204         (arm_get_next_pcs): Adjust.
12205         * arch/arm-get-next-pcs.h (arm_get_next_pcs): Adjust.
12206         * aarch64-tdep.c (aarch64_software_single_step): Adjust.
12207         * alpha-tdep.c (alpha_deal_with_atomic_sequence): Adjust.
12208         (alpha_software_single_step): Adjust.
12209         * alpha-tdep.h (alpha_software_single_step): Adjust.
12210         * arm-linux-tdep.c (arm_linux_software_single_step): Adjust.
12211         * arm-tdep.c (arm_software_single_step): Adjust.
12212         (arm_breakpoint_kind_from_current_state): Adjust.
12213         * arm-tdep.h (arm_software_single_step): Adjust.
12214         * breakpoint.c (insert_single_step_breakpoint): Adjust.
12215         * cris-tdep.c (cris_software_single_step): Adjust.
12216         * mips-tdep.c (mips_deal_with_atomic_sequence): Adjust.
12217         (micromips_deal_with_atomic_sequence): Adjust.
12218         (deal_with_atomic_sequence): Adjust.
12219         (mips_software_single_step): Adjust.
12220         * mips-tdep.h (mips_software_single_step): Adjust.
12221         * moxie-tdep.c (moxie_software_single_step): Adjust.
12222         * nios2-tdep.c (nios2_software_single_step): Adjust.
12223         * ppc-tdep.h (ppc_deal_with_atomic_sequence): Adjust.
12224         * rs6000-aix-tdep.c (rs6000_software_single_step): Adjust.
12225         * rs6000-tdep.c (ppc_deal_with_atomic_sequence): Adjust.
12226         * s390-linux-tdep.c (s390_software_single_step): Adjust.
12227         * sparc-tdep.c (sparc_software_single_step): Adjust.
12228         * spu-tdep.c (spu_software_single_step): Adjust.
12229         * tic6x-tdep.c (tic6x_software_single_step): Adjust.
12230
12231 2017-05-02  Simon Marchi  <simon.marchi@polymtl.ca>
12232
12233         * gdbarch.sh: Use semi-colon as field separator instead of colon.
12234         * gdbarch.h: Re-generate.
12235
12236 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
12237
12238         * Makefile.in (SUBDIR_PYTHON_OBS): Add py-instruction.o.
12239         (SUBDIR_PYTHON_SRCS): Add py-instruction.c.
12240         * python/py-instruction.c, python/py-instruction.h: New file.
12241         * python/py-record.c: Add py-instruction.h include.
12242         (gdbpy_initialize_record): Make gdb.Instruction a super class of
12243         gdb.RecordInstruction.
12244         * python/python-internal.h: Add gdbpy_initialize_instruction
12245         declaration.
12246         * python/python.c (do_start_initialization): Add
12247         gdbpy_initialize_instruction.
12248
12249 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
12250
12251         * python/py-record-btrace.c (BTPY_REQUIRE_VALID_CALL, btpy_call_type):
12252         Remove.
12253         (btrace_func_from_recpy_func): New function.
12254         (btpy_call_new, btpy_number, btpy_hash, btpy_richcompare): Remove.
12255         (btpy_call_level, btpy_call_symbol, btpy_call_instructions,
12256         btpy_call_up, btpy_call_prev_sibling, btpy_call_next_sibling): Rename to ...
12257         (recpy_bt_func_level, recpy_bt_func_symbol, recpy_bt_func_instructions,
12258         recpy_bt_func_up, recpy_bt_func_prev, recpy_bt_func_next): This.
12259         Also, use new helper functions.
12260         (btpy_list_item): Use new helper functions.
12261         (recpy_bt_function_call_history): Use new type name.
12262         (btpy_call_getset): Remove.
12263         (gdbpy_initialize_btrace): Remove code to initialize
12264         gdb.BtraceFunctionCall.
12265         * python/py-record-btrace.h (recpy_bt_func_number, recpy_btb_func_level,
12266         recpy_btb_func_symbol, recpy_bt_func_instructions, recpy_bt_func_up,
12267         recpy_bt_func_prev, recpy_bt_func_next): New export.
12268         * python/py-record.c (recpy_func_type): New static object.
12269         (recpy_func_new, recpy_func_level, recpy_func_symbol,
12270         recpy_func_instructions, recpy_func_up, recpy_func_prev,
12271         recpy_func_next): New function.
12272         (recpy_element_hash, recpy_element_richcompare): Updated comment.
12273         (recpy_func_getset): New static object.
12274         (gdbpy_initialize_record): Add code to initialize gdb.RecordInstruction.
12275         * python/py-record.h (recpy_func_type, recpy_func_new): New export.
12276
12277 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
12278
12279         * python/py-record-btrace.c (BTPY_REQUIRE_VALID_INSN): Remove.
12280         (btpy_object, btpy_insn_type, btpy_new): Remove.
12281         (btpy_list_object): Use gdb.RecordInstruction type instead of
12282         gdb.BtraceInstruction type.
12283         (btrace_insn_from_recpy_insn): New function.
12284         (btpy_insn_or_gap_new): Adjust comment. Use recpy_insn_new instead of
12285         btpy_new.
12286         (btpy_call_new, btpy_list_item): Do not use btpy_new anymore.
12287         (btpy_number, btpy_hash, btpy_call_level, btpy_call_symbol,
12288         btpy_call_instructions, btpy_call_up, btpy_call_prev_sibling,
12289         btpy_call_next_sibling, btpy_richcompare): Use recpy_element_object
12290         instead of btpy_object.
12291         (btpy_insn_sal, btpy_insn_pc, btpy_insn_size, btpy_insn_is_speculative,
12292         btpy_insn_data, btpy_insn_decode): Rename to ...
12293         (recpy_bt_insn_sal, recpy_bt_insn_pc, recpy_bt_insn_size,
12294         recpy_bt_insn_is_speculative, recpy_bt_insn_data,
12295         recpy_bt_insn_decode): This.  Also, use new helper functions.
12296         (btpy_list_position, recpy_bt_goto): Use recpy_element_object and
12297         recpy_insn_type.
12298         (btpy_insn_getset): Remove.
12299         (gdbpy_initialize_btrace): Remove code to initialize
12300         gdb.BtraceInstruction.  Use recpy_element_object.
12301         * python/py-record-btrace.h (recpy_bt_insn_number, recpy_bt_insn_sal,
12302         recpy_bt_insn_pc, recpy_bt_insn_data, recpy_bt_insn_decoded,
12303         recpy_bt_insn_size, recpy_bt_insn_is_speculative): New export.
12304         * python/py-record.c (recpy_insn_type): New static object.
12305         (recpy_insn_new, recpy_insn_sal, recpy_insn_pc, recpy_insn_data,
12306         recpy_insn_decoded, recpy_insn_size, recpy_insn_is_speculative,
12307         recpy_element_number, recpy_element_hash, recpy_element_richcompare):
12308         New function.
12309         (recpy_insn_getset): New static object.
12310         (gdbpy_initialize_record): Initialize gdb.RecordInstruction.
12311         * python/py-record.h (recpy_element_object): New typedef.
12312         (recpy_insn_type, recpy_insn_new): New export.
12313
12314 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
12315
12316         * py-record-btrace.c (btpy_insn_new): Removed.
12317         (btpy_insn_or_gap_new): New function.
12318         (btpy_insn_error): Removed.
12319         (btpy_insn_sal, btpy_insn_pc, btpy_insn_size, btpy_insn_is_speculative,
12320         btpy_insn_data, btpy_insn_decode): Remove code path for gaps.
12321         (recpy_bt_replay_position, recpy_bt_begin, recpy_bt_end): Call
12322         btpy_insn_or_gap_new instead of btpy_insn_new.
12323         (btpy_insn_getset): Remove btpy_insn_error.
12324         * py-record.c (recpy_gap_type): New static object.
12325         (recpy_gap_object): New typedef.
12326         (recpy_gap_new, recpy_gap_number, recpy_gap_reason_code,
12327         recpy_gap_reason_string): New function.
12328         (recpy_gap_getset): New static object.
12329         (gdbpy_initialize_record): Initialize gdb.RecordGap type.
12330         * py-record.h (recpy_gap_new): New export.
12331
12332 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
12333
12334         * python/py-record.c (recpy_ptid): Remove.
12335         (recpy_record_getset): Remove recpy_ptid.
12336
12337 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
12338
12339         * btrace.c (btrace_fetch): Set inferior_ptid.
12340         * python/py-record-btrace.c: Add "py-record.h" include.
12341         (recpy_bt_format, recpy_bt_replay_position, recpy_bt_begin,
12342         recpy_bt_end, recpy_bt_instruction_history,
12343         recpy_bt_function_call_history, recpy_bt_goto): Use ptid stored
12344         in gdb.Record object instead of current ptid.
12345         * python/py-record.c: Include new "py-record.h" file.
12346         (recpy_record_object): Moved to py-record.h.
12347         * python/py-record.h: New file.
12348
12349 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
12350
12351         * python/py-record-btrace.c (BTPY_REQUIRE_VALID_INSN,
12352         BTPY_REQUIRE_VALID_CALL, recpy_bt_function_call_history): Fix
12353         indentation.
12354
12355 2017-05-01  Joel Brobecker  <brobecker@adacore.com>
12356
12357         * MAINTAINERS: Move Daniel Jacobowitz and Mark Kettenis to
12358         the past maintainers section.
12359
12360 2017-04-28  Yao Qi  <yao.qi@linaro.org>
12361
12362         * infcmd.c (get_return_value): Use regcache ctor, and remove
12363         cleanup.
12364
12365 2017-04-28  Yao Qi  <yao.qi@linaro.org>
12366             Pedro Alves  <palves@redhat.com>
12367
12368         * regcache.c (regcache::regcache): New tag dispatch ctor.
12369         (do_cooked_read): Moved above.
12370         (regcache_dup): Use the tag dispatch ctor..
12371         * regcache.h (regcache): Declare ctor, delete copy ctor and
12372         assignment operator, remove friend regcache_dup.
12373
12374 2017-04-28  Yao Qi  <yao.qi@linaro.org>
12375
12376         * regcache.c (regcache_dup): Assert !src->m_readonly_p and
12377         call method save instead of regcache_cpy.
12378         * regcache.h (struct regcache): Make regcache_dup a friend.
12379
12380 2017-04-28  Yao Qi  <yao.qi@linaro.org>
12381
12382         * regcache.c (struct regcache): Move to regcache.h
12383         (regcache::arch): New method.
12384         (regcache_get_ptid): Update.
12385         (get_regcache_arch): Call arch method.
12386         (get_regcache_aspace): Call method aspace.
12387         (register_buffer): Change it to method.
12388         (regcache_save): Change it to regcache::save.
12389         (regcache_restore): Likewise.
12390         (regcache_cpy_no_passthrough): Remove the declaration.
12391         (regcache_cpy): Call methods restore and cpy_no_passthrough.
12392         (regcache_cpy_no_passthrough): Change it to method
12393         cpy_no_passthrough.
12394         (regcache_register_status): Change it to method
12395         get_register_status.
12396         (regcache_invalidate): Change it to method invalidate.
12397         (regcache_thread_ptid_changed): Use methods ptid and set_ptid.
12398         (regcache_raw_update): Change it to method raw_update.
12399         (regcache_raw_read): Likewise.
12400         (regcache_raw_read_signed): Likewise.
12401         (regcache_raw_read_unsigned): Likewise.
12402         (regcache_raw_write_signed): Likewise.
12403         (regcache_raw_write_unsigned): Likewise.
12404         (regcache_cooked_read): Likewise.
12405         (regcache_cooked_read_value): Likewise.
12406         (regcache_cooked_read_signed): Likewise.
12407         (regcache_cooked_read_unsigned): Likewise.
12408         (regcache_cooked_write_signed): Likewise.
12409         (regcache_cooked_write_unsigned): Likewise.
12410         (regcache_raw_set_cached_value): Likewise.
12411         (regcache_raw_write): Likewise.
12412         (regcache_cooked_write): Likewise.
12413         (regcache_xfer_part): Likewise.
12414         (regcache_raw_read_part): Likewise.
12415         (regcache_raw_write_part): Likewise.
12416         (regcache_cooked_read_part): Likewise.
12417         (regcache_cooked_write_part): Likewise.
12418         (regcache_raw_supply): Likewise.
12419         (regcache_raw_collect): Likewise.
12420         (regcache_transfer_regset): Likewise.
12421         (regcache_supply_regset): Likewise.
12422         (regcache_collect_regset): Likewise.
12423         (regcache_debug_print_register): Likewise.
12424         (enum regcache_dump_what): Move it to regcache.h.
12425         (regcache_dump): Change it to method dump.
12426         * regcache.h (enum regcache_dump_what): New.
12427         (class regcache): New.
12428         * target.c (target_fetch_registers): Call method
12429         debug_print_register.
12430         (target_store_registers): Likewise.
12431
12432 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
12433
12434         * windows-nat.c (struct lm_info_windows): Initialize field.
12435         (windows_make_so): Allocate lm_info_windows with new.
12436         (windows_free_so): Free lm_info_windows with delete.
12437
12438 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
12439
12440         * solib-darwin.c (struct lm_info_darwin): Initialize field.
12441         (darwin_current_sos): Allocate lm_info_darwin with new, remove
12442         cleanup.
12443         (darwin_free_so): Free lm_info_darwin with delete.
12444
12445 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
12446
12447         * solib-svr4.h (struct lm_info_svr4): Initialize fields.
12448         <l_addr_p>: Change type to bool.
12449         * solib-svr4.c (lm_info_read): Allocate lm_info_svr4 with new.
12450         (svr4_free_so): Free lm_info_svr4 with delete.
12451         (svr4_copy_library_list): Replace memcpy with call to copy
12452         constructor.
12453         (library_list_start_library, svr4_default_sos): Allocate
12454         lm_info_svr4 with new.
12455
12456 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
12457
12458         * solib-target.c (struct lm_info_target): Add destructor,
12459         initialize fields.
12460         <name>: Change type to std::string.
12461         (library_list_start_library): Allocate lm_info_target with new.
12462         (solib_target_free_library_list): Free lm_info_target with
12463         delete.
12464         (solib_target_current_sos): Adapt to std::string.
12465         (solib_target_free_so): Free lm_info_target with delete.
12466
12467 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
12468
12469         * solib-frv.c (struct lm_info_frv): Add destructor, initialize
12470         fields.
12471         (frv_current_sos): Allocate lm_info_frv with new.
12472         (frv_relocate_main_executable): Free lm_info_frv with delete,
12473         allocate with new.
12474         (frv_clear_solib, frv_free_so): Free lm_info_frv with delete.
12475
12476 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
12477
12478         * solib-frv.c (struct lm_info_frv): Fix indentation.
12479
12480 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
12481
12482         * solib-dsbt.c (struct lm_info_dsbt): Add destructor, initialize
12483         map field.
12484         (dsbt_current_sos): Allocate lm_info_dsbt with new.
12485         (dsbt_relocate_main_executable): Free lm_info_dsbt with delete
12486         and allocate with new.
12487         (dsbt_clear_solib, dsbt_free_so): Free lm_info_dsbt with delete.
12488
12489 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
12490
12491         * solib-aix.c (struct lm_info_aix): Initialize fields in-class.
12492         <filename, member_name>: Change type to std::string.
12493         (solib_aix_new_lm_info, solib_aix_xfree_lm_info): Remove.
12494         (library_list_start_library): Allocate lm_info_aix with new.
12495         (solib_aix_free_library_list, solib_aix_free_so): Free with delete.
12496         (solib_aix_current_sos): Adapt to std::string, copy lm_info_aix
12497         with copy constructor.
12498
12499 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
12500
12501         * solist.h (struct lm_info): Remove.
12502         (struct lm_info_base): New class.
12503         (struct so_list) <lm_info>: Change type to lm_info_base *.
12504         * nto-tdep.c (struct lm_info): Remove.
12505         (lm_addr): Adjust.
12506         * solib-aix.c (struct lm_info): Rename to ...
12507         (struct lm_info_aix): ... this.  Extend lm_info_base.
12508         (lm_info_p): Rename to ...
12509         (lm_info_aix_p): ... this, and adjust.
12510         (solib_aix_new_lm_info, solib_aix_xfree_lm_info,
12511         solib_aix_parse_libraries, library_list_start_library,
12512         solib_aix_free_library_list, solib_aix_parse_libraries,
12513         solib_aix_get_library_list,
12514         solib_aix_relocate_section_addresses, solib_aix_free_so,
12515         solib_aix_get_section_offsets,
12516         solib_aix_solib_create_inferior_hook, solib_aix_current_sos):
12517         Adjust.
12518         (struct solib_aix_inferior_data) <library_list>: Adjust.
12519         * solib-darwin.c (struct lm_info): Rename to ...
12520         (struct lm_info_darwin): ... this.  Extend lm_info_base.
12521         (darwin_current_sos, darwin_relocate_section_addresses): Adjust.
12522         * solib-dsbt.c (struct lm_info): Rename to ...
12523         (struct lm_info_dsbt): ... this.  Extend lm_info_base.
12524         (struct dsbt_info) <main_executable_lm_info): Adjust.
12525         (dsbt_current_sos, dsbt_relocate_main_executable, dsbt_free_so,
12526         dsbt_relocate_section_addresses): Adjust.
12527         * solib-frv.c (struct lm_info): Rename to ...
12528         (struct lm_info_frv): ... this.  Extend lm_info_base.
12529         (main_executable_lm_info): Adjust.
12530         (frv_current_sos, frv_relocate_main_executable, frv_free_so,
12531         frv_relocate_section_addresses, frv_fdpic_find_global_pointer,
12532         find_canonical_descriptor_in_load_object,
12533         frv_fdpic_find_canonical_descriptor): Adjust.
12534         * solib-svr4.c (struct lm_info): Move to solib-svr4.h, renamed
12535         to lm_info_svr4.
12536         (lm_info_read, lm_addr_check, svr4_keep_data_in_core,
12537         svr4_clear_so, svr4_copy_library_list,
12538         library_list_start_library, svr4_default_sos, svr4_read_so_list,
12539         svr4_current_sos, svr4_fetch_objfile_link_map,
12540         solist_update_incremental): Adjust.
12541         * solib-svr4.h (struct lm_info_svr4): Move here from
12542         solib-svr4.c.
12543         * solib-target.c (struct lm_info): Rename to ...
12544         (struct lm_info_target): ... this.  Extend lm_info_base.
12545         (lm_info_p): Rename to ...
12546         (lm_info_target_p): ... this.
12547         (solib_target_parse_libraries, library_list_start_segment,
12548         library_list_start_section, library_list_start_library,
12549         library_list_end_library, solib_target_free_library_list,
12550         solib_target_current_sos, solib_target_free_so,
12551         solib_target_relocate_section_addresses): Adjust.
12552         * windows-nat.c (struct lm_info): Rename to ...
12553         (struct lm_info_windows): ... this.  Extend lm_info_base.
12554         (windows_make_so, handle_load_dll, handle_unload_dll,
12555         windows_xfer_shared_libraries): Adjust.
12556
12557 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
12558
12559         * solib-darwin.c (struct darwin_so_list): Remove.
12560         (darwin_current_sos): Allocate an so_list object instead of a
12561         darwin_so_list, separately allocate an lm_info object.
12562         (darwin_free_so): Free lm_info.
12563
12564 2017-04-28  John Baldwin  <jhb@FreeBSD.org>
12565
12566         * mips-tdep.c (print_gp_register_row): Replace printf_filtered
12567         with fprintf_filtered.
12568
12569 2017-04-28  Yao Qi  <yao.qi@linaro.org>
12570
12571         * regcache.c (regcache::regcache): New function.
12572         (regcache::~regcache): New function.
12573         (regcache_xmalloc_1): Remove.
12574         (regcache_xmalloc): Call new regcache.
12575         (regcache_xfree): Call delete regcache.
12576         (get_thread_arch_aspace_regcache): Call new regcache.
12577
12578 2017-04-28  Yao Qi  <yao.qi@linaro.org>
12579
12580         * mips-linux-nat.c (mips_linux_new_thread): Use ptid method
12581         lwp instead of ptid_get_lwp.
12582
12583 2017-04-28  Yao Qi  <yao.qi@linaro.org>
12584
12585         * mips-linux-nat.c (mips_linux_new_thread): Get lwpid from
12586         lwp_info instead of getting from inferior_ptid.
12587
12588 2017-04-27  Keith Seitz  <keiths@redhat.com>
12589
12590         * gdbtypes.c (LVALUE_REFERENCE_TO_RVALUE_BINDING_BADNESS)
12591         DIFFERENT_REFERENCE_TYPE_BADNESS): Remove.
12592         (CV_CONVERSION_BADNESS): Define.
12593         (rank_one_type): Remove overly restrictive rvalue reference
12594         rank checks.
12595         Add cv-qualifier checks and subranks for type equality.
12596         * gdbtypes.h (REFERENCE_CONVERSION_RVALUE,
12597         REFERENCE_CONVERSION_CONST_LVALUE, CV_CONVERSION_BADNESS,
12598         CV_CONVERSION_CONST, CV_CONVERSION_VOLATILE): Declare.
12599
12600 2017-04-27  Simon Marchi  <simon.marchi@ericsson.com>
12601
12602         * python/py-inferior.c (inferior_to_inferior_object): Increment reference
12603         count when creating the object.
12604
12605 2017-04-27  Sangamesh Mallayya  <sangamesh.swamy@in.ibm.com>
12606             Ulrich Weigand  <uweigand@de.ibm.com>
12607
12608         * xcoffread.c (read_xcoff_symtab): Read correct function auxiliary
12609         entry if xlc -qfuncsect or gcc -ffunction-sections compiler option
12610         is used in AIX.
12611         (read_xcoff_symtab): Handle C_WEAKEXT storage class.
12612         (process_xcoff_symbol): Likewise.
12613         (scan_xcoff_symtab): Likewise.
12614
12615 2017-04-26  Alan Hayward  <alan.hayward@arm.com>
12616
12617         * ia64-tdep.c (examine_prologue): Use get_frame_register_unsigned.
12618         (ia64_sigtramp_frame_prev_register): Use read_memory_unsigned_integer.
12619         (ia64_access_reg): Use get_frame_register_unsigned.
12620         (ia64_access_rse_reg): Likewise.
12621         (ia64_libunwind_frame_prev_register): Likewise.
12622
12623 2017-04-26  Jiong Wang  <jiong.wang@arm.com>
12624
12625         * gdbarch.sh: New gdbarch method execute_dwarf_cfa_vendor_op.
12626         * gdbarch.c: Regenerated.
12627         * gdbarch.h: Regenerated.
12628         * dwarf2-frame.c (dwarf2_frame_state_alloc_regs): Made the
12629         visibility external.
12630         (execute_cfa_program): Call execute_dwarf_cfa_vendor_op for CFI
12631         between DW_CFA_lo_user and DW_CFA_high_user inclusive.
12632         (enum cfa_how_kind): Move to ...
12633         (struct dwarf2_frame_state_reg_info): Likewise.
12634         (struct dwarf2_frame_state): Likewise.
12635         * dwarf2-frame.h: ... here.
12636         (dwarf2_frame_state_alloc_regs): New declaration.
12637         * sparc-tdep.c (sparc_execute_dwarf_cfa_vendor_op): New function.
12638         (sparc32_gdbarch_init): Register execute_dwarf_cfa_vendor_op hook.
12639
12640 2017-04-26  Alan Hayward  <alan.hayward@arm.com>
12641
12642         * xtensa-tdep.c (xtensa_pseudo_register_read): Use
12643         regcache_raw_read_unsigned.
12644         (xtensa_pseudo_register_write): Likewise.
12645
12646 2017-04-26  Alan Hayward  <alan.hayward@arm.com>
12647
12648         * nds32-tdep.c (nds32_pseudo_register_read): Abort on errors.
12649         (nds32_pseudo_register_write): Likewise.
12650
12651 2017-04-25  Yao Qi  <yao.qi@linaro.org>
12652
12653         * regcache.c (struct regcache) <readonly_p>: Change its type
12654         to bool.
12655         (regcache_xmalloc_1): Update parameter type and callers update.
12656
12657 2017-04-25  Yao Qi  <yao.qi@linaro.org>
12658
12659         * aarch64-tdep.c (aarch64_gdbarch_init): Don't call
12660         set_gdbarch_wchar_bit.
12661         * arm-tdep.c (arm_gdbarch_init): Likewise.
12662
12663 2017-04-25  Pedro Alves  <palves@redhat.com>
12664
12665         * common/poison.h [!HAVE_IS_TRIVIALLY_COPYABLE] (IsRelocatable)
12666         (BothAreRelocatable, memcopy, memmove): Don't define.
12667         * common/traits.h (__has_feature, HAVE_IS_TRIVIALLY_COPYABLE): New
12668         macros.
12669
12670 2017-04-25  Pedro Alves  <palves@redhat.com>
12671
12672         * common/common-defs.h: Include "common/poison.h".
12673         * common/function-view.h: (Not, Or, Requires): Move to traits.h
12674         and adjust.
12675         * common/poison.h: New file.
12676         * common/traits.h: Include <type_traits>.
12677         (Not, Or, Requires): New, moved from common/function-view.h.
12678
12679 2017-04-25  Pedro Alves  <palves@redhat.com>
12680
12681         * breakpoint.h (struct breakpoint): In-class initialize all
12682         fields.  Make boolean fields "bool".
12683         * breakpoint.c (init_raw_breakpoint_without_location): Remove
12684         memset call and initializations no longer necessary.
12685
12686 2017-04-25  Pedro Alves  <palves@redhat.com>
12687
12688         * btrace.c (pt_btrace_insn_flags): Change parameter type to
12689         reference.
12690         (pt_btrace_insn): New function.
12691         (ftrace_add_pt): Remove memset call and use pt_btrace_insn.
12692
12693 2017-04-25  Pedro Alves  <palves@redhat.com>
12694
12695         * ada-lang.c (ada_catchpoint_location): Now a "class".  Remove
12696         "base" field and inherit from "bp_location" instead.  Add
12697         non-default ctor.
12698         (allocate_location_exception): Use new non-default ctor.
12699         * breakpoint.c (get_first_locp_gte_addr): Remove memset call.
12700         (init_bp_location): Convert to ...
12701         (bp_location::bp_location): ... this new ctor, and remove memset
12702         call.
12703         (base_breakpoint_allocate_location): Use the new non-default ctor.
12704         * breakpoint.h (bp_location): Now a class.  Declare default and
12705         non-default ctors.  In-class initialize all members.
12706         (init_bp_location): Remove declaration.
12707
12708 2017-04-25  Pedro Alves  <palves@redhat.com>
12709
12710         * common/enum-flags.h (enum_flags): Don't implement copy ctor and
12711         assignment operator.
12712
12713 2017-04-24  Yao Qi  <yao.qi@linaro.org>
12714
12715         * doublest.c (convert_doublest_to_floatformat): Call
12716         floatformat_totalsize_bytes.
12717
12718 2017-04-22  Tom Tromey  <tom@tromey.com>
12719
12720         * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries): Use
12721         ui_out_emit_list.
12722         * stack.c (print_frame): Use ui_out_emit_list.
12723         * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Use
12724         ui_out_emit_list.
12725         * mi/mi-main.c (print_one_inferior)
12726         (mi_cmd_data_list_register_names)
12727         (mi_cmd_data_list_register_values, mi_cmd_list_features)
12728         (mi_cmd_list_target_features, mi_cmd_trace_frame_collected): Use
12729         ui_out_emit_list.
12730         * mi/mi-interp.c (mi_on_normal_stop_1): Use ui_out_emit_list.
12731         (mi_output_solib_attribs): Use ui_out_emit_list,
12732         ui_out_emit_tuple.
12733         * mi/mi-cmd-var.c (varobj_update_one): Use ui_out_emit_list.
12734         * mi/mi-cmd-stack.c (mi_cmd_stack_list_frames)
12735         (mi_cmd_stack_list_args, list_args_or_locals): Use
12736         ui_out_emit_list.
12737         * disasm.c (do_assembly_only): Use ui_out_emit_list.
12738         * breakpoint.c (print_solib_event, output_thread_groups): Use
12739         ui_out_emit_list.
12740
12741 2017-04-22  Tom Tromey  <tom@tromey.com>
12742
12743         * mi/mi-main.c (print_variable_or_computed): Use ui_out_emit_tuple.
12744         * mi/mi-cmd-var.c (varobj_update_one): Use ui_out_emit_tuple.
12745         * mi/mi-cmd-stack.c (list_arg_or_local): Use ui_out_emit_tuple.
12746
12747 2017-04-22  Tom Tromey  <tom@tromey.com>
12748
12749         * tracepoint.c (tvariables_info_1)
12750         (print_one_static_tracepoint_marker): Use ui_out_emit_tuple.
12751
12752 2017-04-22  Tom Tromey  <tom@tromey.com>
12753
12754         * stack.c (print_frame_arg): Use ui_out_emit_tuple,
12755         annotate_arg_emitter.
12756         * breakpoint.c (print_mention_watchpoint)
12757         (print_mention_masked_watchpoint): Use ui_out_emit_tuple.
12758         * annotate.h (struct annotate_arg_emitter): New.
12759
12760 2017-04-22  Tom Tromey  <tom@tromey.com>
12761
12762         * record-btrace.c (record_btrace_insn_history)
12763         (record_btrace_insn_history_range, record_btrace_call_history)
12764         (record_btrace_call_history_range): Use ui_out_emit_tuple.
12765         * thread.c (do_captured_list_thread_ids, print_thread_info_1): Use
12766         ui_out_emit_tuple.
12767         * stack.c (print_frame_info): Use ui_out_emit_tuple.
12768         * solib.c (info_sharedlibrary_command): Use ui_out_emit_tuple.
12769         * skip.c (skip_info): Use ui_out_emit_tuple.
12770         * remote.c (show_remote_cmd): Use ui_out_emit_tuple.
12771         * progspace.c (print_program_space): Use ui_out_emit_tuple.
12772         * probe.c (info_probes_for_ops): Use ui_out_emit_tuple.
12773         * osdata.c (info_osdata): Use ui_out_emit_tuple.
12774         * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Use
12775         ui_out_emit_tuple.
12776         * mi/mi-main.c (print_one_inferior, list_available_thread_groups)
12777         (output_register, mi_cmd_data_read_memory)
12778         (mi_cmd_data_read_memory_bytes, mi_load_progress)
12779         (mi_cmd_trace_frame_collected): Use ui_out_emit_tuple.
12780         * mi/mi-cmd-var.c (mi_cmd_var_list_children, varobj_update_one):
12781         Use ui_out_emit_tuple.
12782         * mi/mi-cmd-stack.c (mi_cmd_stack_list_args): Use
12783         ui_out_emit_tuple.
12784         * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions)
12785         (mi_cmd_info_gdb_mi_command): Use ui_out_emit_tuple.
12786         * linux-thread-db.c (info_auto_load_libthread_db): Use
12787         ui_out_emit_tuple.
12788         * inferior.c (print_inferior): Use ui_out_emit_tuple.
12789         * gdb_bfd.c (print_one_bfd): Use ui_out_emit_tuple.
12790         * disasm.c (do_mixed_source_and_assembly_deprecated)
12791         (do_mixed_source_and_assembly): Use ui_out_emit_tuple.
12792         * cp-abi.c (list_cp_abis): Use ui_out_emit_tuple.
12793         * cli/cli-setshow.c (cmd_show_list): Use ui_out_emit_tuple.
12794         * breakpoint.c (print_one_breakpoint_location)
12795         (print_one_breakpoint): Use ui_out_emit_tuple.
12796         * auto-load.c (print_script, info_auto_load_cmd): Use
12797         ui_out_emit_tuple.
12798         * ada-tasks.c (print_ada_task_info): Use ui_out_emit_tuple.
12799
12800 2017-04-21  Simon Marchi  <simon.marchi@ericsson.com>
12801
12802         * thread.c (print_thread_info_1): Remove dead code.
12803
12804 2017-04-21  Jan Kratochvil  <jan.kratochvil@redhat.com>
12805
12806         * aarch64-tdep.c (selftests::aarch64_process_record_test): Make it #if
12807         GDB_SELF_TEST.
12808         * arm-tdep.c (selftests::arm_record_test): Likewise.
12809
12810 2017-04-21  Yao Qi  <yao.qi@linaro.org>
12811
12812         * regcache.c (regcache_restore): Remove argument 2.  Replace
12813         argument 3 with regcache.  Get register status from
12814         src->register_status and get register contents from
12815         register_buffer (src, regnum).
12816         (regcache_cpy): Update.
12817
12818 2017-04-19  Pedro Alves  <palves@redhat.com>
12819
12820         * gdbthread.h (thread): Add missing closing parenthesis in
12821         comment.
12822
12823 2017-04-19  Pedro Alves  <palves@redhat.com>
12824
12825         * common/refcounted-object.h: New file.
12826         * gdbthread.h: Include "common/refcounted-object.h".
12827         (thread_info): Inherit from refcounted_object and add comments.
12828         (thread_info::incref, thread_info::decref)
12829         (thread_info::m_refcount): Delete.
12830         (thread_info::deletable): Use the refcounted_object::refcount()
12831         method.
12832         * inferior.c (current_inferior_): Add comment.
12833         (set_current_inferior): Increment/decrement refcounts.
12834         (prune_inferiors, remove_inferior_command): Skip inferiors marked
12835         not-deletable instead of comparing with the current inferior.
12836         (initialize_inferiors): Increment the initial inferior's refcount.
12837         * inferior.h (struct inferior): Forward declare.
12838         Include "common/refcounted-object.h".
12839         (current_inferior, set_current_inferior): Move declaration to
12840         before struct inferior's definition, and fix comment.
12841         (inferior): Inherit from refcounted_object.  Add comments.
12842         * thread.c (switch_to_thread_no_regs): Reference the thread's
12843         inferior pointer directly instead of doing a ptid lookup.
12844         (switch_to_no_thread): New function.
12845         (switch_to_thread(thread_info *)): New function, factored out
12846         from ...
12847         (switch_to_thread(ptid_t)): ... this.
12848         (restore_current_thread): Delete.
12849         (current_thread_cleanup): Remove 'inf_id' and 'was_removable'
12850         fields, and add 'inf' field.
12851         (do_restore_current_thread_cleanup): Check whether old->inf is
12852         alive instead of looking up an inferior by ptid.  Use
12853         switch_to_thread and switch_to_no_thread.
12854         (restore_current_thread_cleanup_dtor): Use old->inf directly
12855         instead of lookup up an inferior by id.  Decref the inferior.
12856         Don't restore 'removable'.
12857         (make_cleanup_restore_current_thread): Same the inferior pointer
12858         in old, instead of the inferior number.  Incref the inferior.
12859         Don't save/clear 'removable'.
12860
12861 2017-04-19  Pedro Alves  <palves@redhat.com>
12862
12863         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
12864         unittests/scoped_restore-selftests.c.
12865         (SUBDIR_UNITTESTS_OBS): Add scoped_restore-selftests.o.
12866         * common/scoped_restore.h (scoped_restore_base): Make "class".
12867         (scoped_restore_base::release): New public method.
12868         (scoped_restore_base::scoped_restore_base): New protected ctor.
12869         (scoped_restore_base::m_saved_var): New protected field.
12870         (scoped_restore_tmpl::scoped_restore_tmpl(T*)): Initialize the
12871         scoped_restore_base base class instead of m_saved_var directly.
12872         (scoped_restore_tmpl::scoped_restore_tmpl(T*, T2)): Likewise.
12873         (scoped_restore_tmpl::scoped_restore_tmpl(const
12874         scoped_restore_tmpl<T>&)): Likewise.
12875         (scoped_restore_tmpl::~scoped_restore_tmpl): Use the saved_var
12876         method.
12877         (scoped_restore_tmpl::saved_var): New method.
12878         (scoped_restore_tmpl::m_saved_var): Delete.
12879         * inferior.h (inferior::detaching): Now a bool.
12880         * infrun.c (prepare_for_detach): Use a scoped_restore instead of a
12881         cleanup.
12882         * unittests/scoped_restore-selftests.c: New file.
12883
12884 2017-04-19  Pedro Alves  <palves@redhat.com>
12885
12886         * Makefile.in (SUBDIR_UNITTESTS_SRCS, SUBDIR_UNITTESTS_OBS):
12887         Re-sort in alphabetic order.
12888
12889 2017-04-18  Pedro Alves  <palves@redhat.com>
12890
12891         * xml-support.c (obstack_xml_printf): Delete.
12892         * xml-support.h (obstack_xml_printf): Delete.
12893
12894 2017-04-18  Pedro Alves  <palves@redhat.com>
12895
12896         * xml-support.c (gdb_xml_parser) <use_dtd, dtd_name, parse,
12897         vdebug, verror, body_text, start_element, end_element, name,
12898         user_data, set_is_xinclude, set_error, expat_parser>: New methods.
12899         <name, user_data, expat_parser, scopes, error, last_line, dtd_name,
12900         is_xinclude>: Make private and add m_ prefix.
12901         (gdb_xml_parser::body_text): New method, based on ...
12902         (gdb_xml_body_text): ... this.  Adjust.
12903         (gdb_xml_parser::vdebug): New method, based on ...
12904         (gdb_xml_debug): ... this.  Adjust.
12905         (gdb_xml_parser::verror): New method, based on ...
12906         (gdb_xml_error): ... this.  Adjust.
12907         (gdb_xml_parser::start_element): New method, based on ...
12908         (gdb_xml_start_element): ... this.  Adjust.
12909         (gdb_xml_start_element_wrapper): Defer to
12910         gdb_xml_parser::start_element and gdb_xml_parser::set_error.
12911         (gdb_xml_parser::end_element): New method, based on ...
12912         (gdb_xml_end_element_wrapper): ... this.  Adjust.
12913         (gdb_xml_parser::~gdb_xml_parser): Adjust.
12914         (gdb_xml_parser::gdb_xml_parser): Adjust to field renames.
12915         (gdb_xml_parser::use_dtd): New method, based on ...
12916         (gdb_xml_use_dtd): ... this.  Adjust.
12917         (gdb_xml_parser::parse): New method, based on ...
12918         (gdb_xml_parse): ... this.  Adjust.
12919         (gdb_xml_parse_quick): Adjust to call the parser's parse method.
12920         (xinclude_start_include): Adjust to call the parser's name method.
12921         (xml_xinclude_default, xml_xinclude_start_doctype)
12922         (xml_xinclude_end_doctype): Adjust to call the parser's user_data
12923         method.
12924         (xml_process_xincludes): Adjust to call parser methods.
12925         * xml-support.h (gdb_xml_use_dtd, gdb_xml_parse): Delete
12926         declarations.
12927
12928 2017-04-18  Pedro Alves  <palves@redhat.com>
12929
12930         * tracefile-tfile.c (tfile_write_tdesc): Adjust to use
12931         gdb::optional<std::string>.
12932         * xml-support.c: Include <string>.
12933         (scope_level::scope_level(scope_level &&))
12934         (scope_level::~scope_level): Delete.
12935         (scope_level::body): Now a std::string.
12936         (gdb_xml_body_text, gdb_xml_end_element): Adjust.
12937         (xinclude_parsing_data::xinclude_parsing_data): Add 'output'
12938         parameter.
12939         (xinclude_parsing_data::~xinclude_parsing_data): Delete.
12940         (xinclude_parsing_data::output): Now a std::string reference.
12941         (xinclude_start_include): Adjust.
12942         (xml_xinclude_default): Adjust.
12943         (xml_process_xincludes): Add 'output' parameter, and return bool.
12944         * xml-support.h (xml_process_xincludes): Add 'output' parameter,
12945         and return bool.
12946         * xml-tdesc.c: Include <unordered_map> and <string>.
12947         (tdesc_xml_cache): Delete.
12948         (tdesc_xml_cache_s): Delete.
12949         (xml_cache): Now an std::unordered_map.
12950         (tdesc_parse_xml): Adjust to use std::string and unordered_map.
12951         (target_fetch_description_xml): Change return type to
12952         gdb::optional<std::string>, and adjust.
12953         * xml-tdesc.h: Include "common/gdb_optional.h" and <string>.
12954         (target_fetch_description_xml): Change return type to
12955         gdb::optional<std::string>.
12956
12957 2017-04-18  Pedro Alves  <palves@redhat.com>
12958
12959         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
12960         unittests/optional-selftests.c.
12961         (SUBDIR_UNITTESTS_OBS): Add optional-selftests.o.
12962         * unittests/optional-selftests.c: New file.
12963         * unittests/optional/assignment/1.cc: New file.
12964         * unittests/optional/assignment/2.cc: New file.
12965         * unittests/optional/assignment/3.cc: New file.
12966         * unittests/optional/assignment/4.cc: New file.
12967         * unittests/optional/assignment/5.cc: New file.
12968         * unittests/optional/assignment/6.cc: New file.
12969         * unittests/optional/assignment/7.cc: New file.
12970         * unittests/optional/cons/copy.cc: New file.
12971         * unittests/optional/cons/default.cc: New file.
12972         * unittests/optional/cons/move.cc: New file.
12973         * unittests/optional/cons/value.cc: New file.
12974         * unittests/optional/in_place.cc: New file.
12975         * unittests/optional/observers/1.cc: New file.
12976         * unittests/optional/observers/2.cc: New file.
12977
12978 2017-04-18  Pedro Alves  <palves@redhat.com>
12979
12980         * common/gdb_optional.h: Include common/traits.h.
12981         (in_place_t): New type.
12982         (in_place): New constexpr variable.
12983         (optional::optional): Remove member initialization of
12984         m_instantiated.
12985         (optional::optional(in_place_t...)): New constructor.
12986         (optional::~optional): Use reset.
12987         (optional::optional(const optional&)): New.
12988         (optional::optional(const optional&&)): New.
12989         (optional::optional(T &)): New.
12990         (optional::optional(T &&)): New.
12991         (operator::operator=(const optional &)): New.
12992         (operator::operator=(optional &&)): New.
12993         (operator::operator= (const T &))
12994         (operator::operator= (T &&))
12995         (operator::emplace (Args &&... args)): Return a T&.  Use reset.
12996         (operator::reset): New.
12997         (operator::m_instantiated):: Add in-class initializer.
12998         * common/traits.h: Include <type_traits>.
12999         (struct And): New types.
13000
13001 2017-04-18  Pedro Alves  <palves@redhat.com>
13002
13003         * xml-support.c: Include <vector>.
13004         (scope_level::scope_level(const gdb_xml_element *))
13005         (scope_level::scope_level(scope_level&&)): New.
13006         (scope_level::~scope_level): New.
13007         (scope_level_s): Delete.
13008         (gdb_xml_parser::scopes): Now a std::vector.
13009         (gdb_xml_body_text, gdb_xml_start_element, gdb_xml_end_element):
13010         Use std::vector.
13011         (gdb_xml_parser::~gdb_xml_parser): Remove now unnecessary
13012         scope cleanup code.
13013         (gdb_xml_parser::gdb_xml_parser): Remove explicit initialization
13014         of the scopes member.  Use std::vector::emplace_back.
13015
13016 2017-04-18  Pedro Alves  <palves@redhat.com>
13017
13018         * xml-support.c (gdb_xml_parser): Add ctor/dtor.  Make is_xinclude
13019         a bool.
13020         (gdb_xml_end_element): Change type of first parameter.
13021         (gdb_xml_cleanup): Rename to ...
13022         (gdb_xml_parser::~gdb_xml_parser): ... this.
13023         (gdb_xml_create_parser_and_cleanup): Delete with ...
13024         (gdb_xml_parser::gdb_xml_parser): ... creation parts factored out
13025         to this new ctor.
13026         (gdb_xml_parse_quick): Create a local gdb_xml_parser instead of
13027         using gdb_xml_create_parser_and_cleanup.
13028         (xinclude_parsing_data): Add ctor/dtor.
13029         (xml_xinclude_cleanup): Delete.
13030         (xml_process_xincludes): Create a local xinclude_parsing_data
13031         instead of heap-allocating one.  Create a local gdb_xml_parser
13032         instead of heap-allocating one with
13033         gdb_xml_create_parser_and_cleanup.
13034
13035 2017-04-18  John Baldwin  <jhb@FreeBSD.org>
13036
13037         PR threads/20743
13038         * fbsd-nat.c (resume_one_thread_cb): Remove.
13039         (resume_all_threads_cb): Remove.
13040         (fbsd_resume): Use ALL_NON_EXITED_THREADS instead of
13041         iterate_over_threads.
13042
13043 2017-04-17  Joel Brobecker  <brobecker@adacore.com>
13044
13045         * NEWS: Create a new section for the next release branch.
13046         Rename the section of the current branch, now that it has
13047         been cut.
13048
13049 2017-04-17  Joel Brobecker  <brobecker@adacore.com>
13050
13051         GDB 8.0 branch created (725bf5cf125783c2a7ca4ab63d3768e220bab2db):
13052         * version.in: Bump version to 8.0.50.DATE-git.
13053
13054 2017-04-13  Sergio Durigan Junior  <sergiodj@redhat.com>
13055
13056         PR gdb/21385
13057         * windows-nat.c (windows_create_inferior): Declare 'allargs'
13058         independently of the host, and fix build breakage on Cygwin.
13059
13060 2017-04-13  Pedro Alves  <palves@redhat.com>
13061
13062         * inferior.c (free_inferior): Convert to ...
13063         (inferior::~inferior): ... this dtor.
13064         (inferior::inferior): New ctor, factored out from ...
13065         (add_inferior_silent): ... here.  Allocate the inferior with a new
13066         expression.
13067         (delete_inferior): Call delete instead of free_inferior.
13068         * inferior.h (gdb_environ, continuation): Forward declare.
13069         (inferior): Now a class.  Add in-class initialization to all
13070         members.  Make boolean fields bool, except 'detaching'.
13071         (inferior::inferior): New explicit ctor.
13072         (inferior::~inferior): New.
13073
13074 2017-04-13  Pedro Alves  <palves@redhat.com>
13075
13076         * inferior.c (init_inferior_list): Delete.
13077         * inferior.h (init_inferior_list): Delete.
13078
13079 2017-04-13  Pedro Alves  <palves@redhat.com>
13080
13081         PR threads/13217
13082         * gdb.threads/threadapply.exp (thr_apply_detach): New procedure.
13083         (top level): Call it twice, with different thread sets.
13084
13085 2017-04-13  Pedro Alves  <palves@redhat.com>
13086
13087         * thread.c: Include <algorithm>.
13088         (thread_array_cleanup): Delete.
13089         (scoped_inc_dec_ref): New class.
13090         (live_threads_count): New function.
13091         (set_thread_refcount): Delete.
13092         (tp_array_compar_ascending): Now a bool.
13093         (tp_array_compar): Convert to a std::sort comparison function.
13094         (thread_apply_all_command): Use std::vector and scoped_inc_dec_ref
13095         and live_threads_count.
13096
13097 2017-04-13  Pedro Alves  <palves@redhat.com>
13098
13099         * infrun.c (follow_fork_inferior): Also switch the current
13100         inferior.
13101
13102 2017-04-13  Pedro Alves  <palves@redhat.com>
13103
13104         * breakpoint.c (watch_command_1): Save watchpoint-frame info
13105         before calling create_internal_breakpoint.
13106
13107 2017-04-13  Pedro Alves  <palves@redhat.com>
13108
13109         * fork-child.c (execv_argv): New class.
13110         (breakup_args): Refactored as ...
13111         (execv_argv::init_for_no_shell): .. this method of execv_argv.
13112         Copy arguments to storage and replace separators with NULL
13113         terminators in place.
13114         (escape_bang_in_quoted_argument): Adjust to return bool.
13115         (execv_argv::execv_argv): New ctor.
13116         (execv_argv::init_for_shell): New method, factored out from
13117         fork_inferior.  Don't strdup strings into the vector.
13118         (fork_inferior): Eliminate "shell" local and use execv_argv.  Use
13119         Remove free_vector_argv call.
13120
13121 2017-04-13  Yao Qi  <yao.qi@linaro.org>
13122
13123         * rx-tdep.c (rx_fpsw_type): Check tdep->rx_fpsw_type instead of
13124         tdep->rx_psw_type.
13125
13126 2017-04-13  Yao Qi  <yao.qi@linaro.org>
13127
13128         * rl78-tdep.c (rl78_gdbarch_init): Use XCNEW instead of XNEW.
13129         * rx-tdep.c (rx_gdbarch_init): Likewise.
13130
13131 2017-04-13  Pedro Alves  <palves@redhat.com>
13132
13133         * breakpoint.h (struct breakpoint): Reindent.
13134
13135 2017-04-13  Pedro Alves  <palves@redhat.com>
13136
13137         * breakpoint.c (bp_location): Rename to ...
13138         (bp_locations): ... this.  All references updated.
13139         (bp_location_count): Rename to ...
13140         (bp_locations_count): ... this.  All references updated.
13141         (bp_location_placed_address_before_address_max): Rename to ...
13142         (bp_locations_placed_address_before_address_max): ... this.  All
13143         references updated.
13144         (bp_location_shadow_len_after_address_max): Rename to ...
13145         (bp_locations_shadow_len_after_address_max): ... this.  All
13146         references updated.
13147         (bp_location_compare_addrs): Rename to ...
13148         (bp_locations_compare_addrs): ... this.  All references updated.
13149         (bp_location_compare):Rename to ...
13150         (bp_locations_compare): ... this.  All references updated.
13151         (bp_location_target_extensions_update): Rename to ...
13152         (bp_locations_target_extensions_update): ... this.  All references
13153         updated.
13154
13155 2017-04-12  Sergio Durigan Junior  <sergiodj@redhat.com>
13156
13157         * Makefile.in (HFILES_NO_SRCDIR): Add "common/gdb_termios.h".
13158         * common/common.m4: Check headers 'termios.h', 'termio.h' and
13159         'sgtty.h'.
13160         * common/gdb_termios.h: New file, with parts of "terminal.h".
13161         * inflow.c: Include "gdb_termios.h".
13162         * ser-unix.c: Include "gdb_termios.h".
13163         * terminal.h: Move terminal-related defines to
13164         "common/gdb_termios.h".
13165
13166 2017-04-12  Tom Tromey  <tom@tromey.com>
13167
13168         * probe.c (parse_probes): Update.
13169         * location.h (delete_event_location): Don't declare.
13170         (event_location_deleter::operator()): Update.
13171         * location.c (event_location_deleter::operator()): Rename from
13172         delete_event_location.
13173         * linespec.h (linespec_result) <location>: Change type to
13174         event_location_up.
13175         * linespec.c (canonicalize_linespec, event_location_to_sals)
13176         (decode_objc): Update.
13177         (linespec_result): Don't call delete_event_location.
13178         * breakpoint.c (create_breakpoints_sal)
13179         (bkpt_probe_create_sals_from_location)
13180         (strace_marker_create_sals_from_location): Update.
13181
13182 2017-04-12  Tom Tromey  <tom@tromey.com>
13183
13184         * linespec.h (struct linespec_result): Add constructor and
13185         destructor.
13186         (init_linespec_result, destroy_linespec_result)
13187         (make_cleanup_destroy_linespec_result): Don't declare.
13188         * linespec.c (init_linespec_result): Remove.
13189         (linespec_result::~linespec_result): Rename from
13190         destroy_linespec_result.  Update.
13191         (cleanup_linespec_result, make_cleanup_destroy_linespec_result):
13192         Remove.
13193         * breakpoint.c (create_breakpoint, break_range_command)
13194         (decode_location_default): Update.
13195         * ax-gdb.c (agent_command_1): Update.
13196
13197 2017-04-12  Tom Tromey  <tom@tromey.com>
13198
13199         * remote.c (remote_download_tracepoint): Update.
13200         * python/py-breakpoint.c (bppy_get_location): Update.
13201         * guile/scm-breakpoint.c (bpscm_print_breakpoint_smob)
13202         (gdbscm_breakpoint_location): Update.
13203         * elfread.c (elf_gnu_ifunc_resolver_return_stop): Update.
13204         * breakpoint.h (struct breakpoint) <location, location_range_end>:
13205         Change type to event_location_up.
13206         * breakpoint.c (create_overlay_event_breakpoint)
13207         (create_longjmp_master_breakpoint)
13208         (create_std_terminate_master_breakpoint)
13209         (create_exception_master_breakpoint)
13210         (breakpoint_event_location_empty_p, print_breakpoint_location)
13211         (print_one_breakpoint_location, create_thread_event_breakpoint)
13212         (init_breakpoint_sal, create_breakpoint)
13213         (print_recreate_ranged_breakpoint, break_range_command)
13214         (init_ada_exception_breakpoint, say_where): Update.
13215         (base_breakpoint_dtor): Don't call delete_event_location.
13216         (bkpt_print_recreate, tracepoint_print_recreate)
13217         (dprintf_print_recreate, update_static_tracepoint)
13218         (breakpoint_re_set_default): Update.
13219
13220 2017-04-12  Tom Tromey  <tom@tromey.com>
13221
13222         * compile/compile-loc2c.c (compute_stack_depth_worker): Change
13223         type of "to_do".  Update.
13224         (compute_stack_depth): Use std::vector.
13225
13226 2017-04-12  Tom Tromey  <tom@tromey.com>
13227
13228         * printcmd.c (find_instruction_backward): Use std::vector.
13229
13230 2017-04-12  Tom Tromey  <tom@tromey.com>
13231
13232         * symfile.c (objfilep): Remove typedef.
13233         (reread_symbols): Use a std::vector.
13234
13235 2017-04-12  Tom Tromey  <tom@tromey.com>
13236
13237         * mi/mi-main.c (exec_direction_forward): Remove.
13238         (exec_reverse_continue, mi_execute_command): Use scoped_restore.
13239         * guile/scm-ports.c (ioscm_with_output_to_port_worker): Use
13240         scoped_restore.
13241         * guile/guile.c (guile_repl_command, guile_command)
13242         (gdbscm_execute_gdb_command): Use scoped_restore.
13243         * go-exp.y (go_parse): Use scoped_restore.
13244         * d-exp.y (d_parse): Use scoped_restore.
13245         * cli/cli-decode.c (cmd_func): Use scoped_restore.
13246         * c-exp.y (c_parse): Use scoped_restore.
13247
13248 2017-04-12  Tom Tromey  <tom@tromey.com>
13249
13250         * mi/mi-parse.h (struct mi_parse): Add constructor, destructor.
13251         (mi_parse): Update return type.
13252         (mi_parse_free): Remove.
13253         * mi/mi-parse.c (mi_parse::mi_parse): New constructor.
13254         (mi_parse::~mi_parse): Rename from mi_parse_free.
13255         (mi_parse_cleanup): Remove.
13256         (mi_parse): Return a unique_ptr.  Use new.
13257         * mi/mi-main.c (mi_execute_command): Update.
13258
13259 2017-04-12  Tom Tromey  <tom@tromey.com>
13260
13261         * location.c (explicit_location_lex_one): Return a
13262         unique_xmalloc_ptr.
13263         (string_to_explicit_location): Update.  Remove cleanups.
13264
13265 2017-04-12  Tom Tromey  <tom@tromey.com>
13266
13267         * gnu-v3-abi.c (value_and_voffset_p): Remove typedef.
13268         (compare_value_and_voffset): Change type.  Update.
13269         (compute_vtable_size): Change type of "offset_vec".
13270         (gnuv3_print_vtable): Use std::vector.  Remove cleanups.
13271         (gnuv3_get_typeid): Remove extraneous declaration.
13272
13273 2017-04-12  Tom Tromey  <tom@tromey.com>
13274
13275         * charset.h (wchar_iterator): Fix comment.
13276
13277 2017-04-12  Tom Tromey  <tom@tromey.com>
13278
13279         * charset.c (iconv_wrapper): New class.
13280         (cleanup_iconv): Remove.
13281         (convert_between_encodings): Use it.
13282
13283 2017-04-12  Tom Tromey  <tom@tromey.com>
13284
13285         * symfile.h (increment_reading_symtab): Update type.
13286         * symfile.c (decrement_reading_symtab): Remove.
13287         (increment_reading_symtab): Return a scoped_restore_tmpl<int>.
13288         * psymtab.c (psymtab_to_symtab): Update.
13289         * dwarf2read.c (dw2_instantiate_symtab): Update.
13290
13291 2017-04-12  Tom Tromey  <tom@tromey.com>
13292
13293         * jit.c (struct jit_reader): Declare separately.  Add constructor
13294         and destructor.  Change type of "handle".
13295         (loaded_jit_reader): Define separately.
13296         (jit_reader_load): Update.  New "new".
13297         (jit_reader_unload_command): Use "delete".
13298         * gdb-dlfcn.h (struct dlclose_deleter): New.
13299         (gdb_dlhandle_up): New typedef.
13300         (gdb_dlopen, gdb_dlsym): Update types.
13301         (gdb_dlclose): Remove.
13302         * gdb-dlfcn.c (gdb_dlopen): Return a gdb_dlhandle_up.
13303         (gdb_dlsym): Change type of "handle".
13304         (make_cleanup_dlclose): Remove.
13305         (dlclose_deleter::operator()): Rename from gdb_dlclose.
13306         * compile/compile-c-support.c (load_libcc): Update.
13307
13308 2017-04-12  Tom Tromey  <tom@tromey.com>
13309
13310         * symtab.h (find_pcs_for_symtab_line): Change return type.
13311         * symtab.c (find_pcs_for_symtab_line): Change return type.
13312         * python/py-linetable.c (build_line_table_tuple_from_pcs): Change
13313         type of "vec".  Update.
13314         (ltpy_get_pcs_for_line): Update.
13315         * linespec.c (decode_digits_ordinary): Update.
13316
13317 2017-04-12  Tom Tromey  <tom@tromey.com>
13318
13319         * tracepoint.c (actions_command): Update.
13320         * python/python.c (python_command, python_interactive_command):
13321         Update.
13322         * mi/mi-cmd-break.c (mi_cmd_break_commands): Update.
13323         * guile/guile.c (guile_command): Update.
13324         * defs.h (read_command_lines, read_command_lines_1): Return
13325         command_line_up.
13326         (command_lines_deleter): New struct.
13327         (command_line_up): New typedef.
13328         * compile/compile.c (compile_code_command)
13329         (compile_print_command): Update.
13330         * cli/cli-script.h (get_command_line, copy_command_lines): Return
13331         command_line_up.
13332         (make_cleanup_free_command_lines): Remove.
13333         * cli/cli-script.c (get_command_line, read_command_lines_1)
13334         (copy_command_lines): Return command_line_up.
13335         (while_command, if_command, read_command_lines, define_command)
13336         (document_command): Update.
13337         (do_free_command_lines_cleanup, make_cleanup_free_command_lines):
13338         Remove.
13339         * breakpoint.h (breakpoint_set_commands): Change type of
13340         "commands".
13341         * breakpoint.c (breakpoint_set_commands): Change type of
13342         "commands".  Update.
13343         (do_map_commands_command, update_dprintf_command_list)
13344         (create_tracepoint_from_upload): Update.
13345
13346 2017-04-12  Tom Tromey  <tom@tromey.com>
13347
13348         * tracepoint.c (scope_info): Update.
13349         * spu-tdep.c (spu_catch_start): Update.
13350         * python/python.c (gdbpy_decode_line): Update.
13351         * python/py-finishbreakpoint.c (bpfinishpy_init): Update.
13352         * python/py-breakpoint.c (bppy_init): Update.
13353         * probe.c (parse_probes): Update.
13354         * mi/mi-cmd-break.c (mi_cmd_break_insert_1): Update.
13355         * location.h (event_location_deleter): New struct.
13356         (event_location_up): New typedef.
13357         (new_linespec_location, new_address_location, new_probe_location)
13358         (new_explicit_location, copy_event_location)
13359         (string_to_event_location, string_to_event_location_basic)
13360         (string_to_explicit_location): Update return type.
13361         (make_cleanup_delete_event_location): Remove.
13362         * location.c (new_linespec_location, new_address_location)
13363         (new_probe_location, new_explicit_location, copy_event_location):
13364         Return event_location_up.
13365         (delete_event_location_cleanup)
13366         (make_cleanup_delete_event_location): Remove.
13367         (string_to_explicit_location, string_to_event_location_basic)
13368         (string_to_event_location): Return event_location_up.
13369         * linespec.c (canonicalize_linespec, event_location_to_sals)
13370         (decode_line_with_current_source)
13371         (decode_line_with_last_displayed, decode_objc): Update.
13372         * guile/scm-breakpoint.c (gdbscm_register_breakpoint_x): Update.
13373         * completer.c (location_completer): Update.
13374         * cli/cli-cmds.c (edit_command, list_command): Update.
13375         * breakpoint.c (create_overlay_event_breakpoint)
13376         (create_longjmp_master_breakpoint)
13377         (create_std_terminate_master_breakpoint)
13378         (create_exception_master_breakpoint)
13379         (create_thread_event_breakpoint): Update.
13380         (init_breakpoint_sal): Update.  Remove some dead code.
13381         (create_breakpoint_sal): Change type of "location".  Update.
13382         (create_breakpoints_sal, create_breakpoint, break_command_1)
13383         (dprintf_command, break_range_command, until_break_command)
13384         (init_ada_exception_breakpoint)
13385         (strace_marker_create_sals_from_location)
13386         (update_static_tracepoint, trace_command, ftrace_command)
13387         (strace_command, create_tracepoint_from_upload): Update.
13388         * break-catch-throw.c (re_set_exception_catchpoint): Update.
13389         * ax-gdb.c (agent_command_1): Update.
13390
13391 2017-04-12  Pedro Alves  <palves@redhat.com>
13392
13393         * Makefile.in (ALL_TARGET_OBS): Add i386-go32-tdep.o.
13394         * configure.tgt: Handle i[34567]86-*-go32* and
13395         i[34567]86-*-msdosdjgpp*.
13396         * i386-tdep.c (i386_svr4_reg_to_regnum):
13397         Make extern.
13398         (i386_go32_init_abi, i386_coff_osabi_sniffer): Moved to
13399         i386-go32-tdep.c.
13400         (_initialize_i386_tdep): DJGPP bits moved to i386-go32-tdep.c.
13401         * i386-go32-tdep.c: New file.
13402         * i386-tdep.h (tdesc_i386_mmx, i386_svr4_reg_to_regnum): New
13403         declarations.
13404
13405 2017-04-12  Simon Marchi  <simon.marchi@ericsson.com>
13406
13407         * aix-thread.c (pd_status2str): Change return type to const char *.
13408
13409 2017-04-12  Pedro Alves  <palves@redhat.com>
13410
13411         * i386-tdep.c (i386_elf_init_abi, i386_go32_init_abi): Remove
13412         calls to set_gdbarch_gnu_triplet_regexp.
13413
13414 2017-04-12  Pedro Alves  <palves@redhat.com>
13415
13416         PR gdb/21323
13417         * c-lang.c (cplus_primitive_types) <cplus_primitive_type_wchar_t>:
13418         New enum value.
13419         (cplus_language_arch_info): Register cplus_primitive_type_wchar_t.
13420         * gdbtypes.h (struct builtin_type) <builtin_wchar>: New field.
13421         * gdbtypes.c (gdbtypes_post_init): Create the "wchar_t" type.
13422         * gdbarch.sh (wchar_bit, wchar_signed): New per-arch values.
13423         * gdbarch.h, gdbarch.c: Regenerate.
13424         * aarch64-tdep.c (aarch64_gdbarch_init): Override
13425         gdbarch_wchar_bit and gdbarch_wchar_signed.
13426         * alpha-tdep.c (alpha_gdbarch_init): Likewise.
13427         * arm-tdep.c (arm_gdbarch_init): Likewise.
13428         * avr-tdep.c (avr_gdbarch_init): Likewise.
13429         * h8300-tdep.c (h8300_gdbarch_init): Likewise.
13430         * i386-nto-tdep.c (i386nto_init_abi): Likewise.
13431         * i386-tdep.c (i386_go32_init_abi): Likewise.
13432         * m32r-tdep.c (m32r_gdbarch_init): Likewise.
13433         * moxie-tdep.c (moxie_gdbarch_init): Likewise.
13434         * nds32-tdep.c (nds32_gdbarch_init): Likewise.
13435         * rs6000-aix-tdep.c (rs6000_aix_init_osabi): Likewise.
13436         * sh-tdep.c (sh_gdbarch_init): Likewise.
13437         * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
13438         * sparc64-tdep.c (sparc64_init_abi): Likewise.
13439         * windows-tdep.c (windows_init_abi): Likewise.
13440         * xstormy16-tdep.c (xstormy16_gdbarch_init): Likewise.
13441
13442 2017-04-12  Pedro Alves  <palves@redhat.com>
13443
13444         PR c++/21323
13445         * c-lang.c (cplus_primitive_types) <cplus_primitive_type_char16_t,
13446         cplus_primitive_type_char32_t>: New enum values.
13447         (cplus_language_arch_info): Register cplus_primitive_type_char16_t
13448         and cplus_primitive_type_char32_t.
13449         * dwarf2read.c (read_base_type) <DW_ATE_UTF>: If bit size is 16 or
13450         32, use the archtecture's built-in type for char16_t and char32_t,
13451         respectively.  Otherwise, fallback to init_integer_type as before,
13452         but make the type unsigned, and issue a complaint.
13453         * gdbtypes.c (gdbtypes_post_init): Make char16_t and char32_t unsigned.
13454
13455 2017-04-12  Alan Hayward  <alan.hayward@arm.com>
13456
13457         * m32r-tdep.c (M32R_ARG_REGISTER_SIZE): Added.
13458         (m32r_push_dummy_call): Use M32R_ARG_REGISTER_SIZE.
13459
13460 2017-04-12  Sergio Durigan Junior  <sergiodj@redhat.com>
13461
13462         * windows-nat.c (windows_create_inferior): Declare 'toexec' as
13463         'const char *'.
13464
13465 2017-04-12  Sergio Durigan Junior  <sergiodj@redhat.com>
13466
13467         * common/common-utils.c (free_vector_argv): New function.
13468         * common/common-utils.h: Include <vector>.
13469         (free_vector_argv): New prototype.
13470         * darwin-nat.c (darwin_create_inferior): Rewrite function
13471         prototype in order to constify "exec_file" and accept a
13472         "std::string" for "allargs".
13473         * fork-child.c: Include <vector>.
13474         (breakup_args): Rewrite function, using C++.
13475         (fork_inferior): Rewrite function header, constify "exec_file_arg"
13476         and accept "std::string" for "allargs".  Update the code to
13477         calculate "argv" based on "allargs".  Update calls to "exec_fun"
13478         and "execvp".
13479         * gnu-nat.c (gnu_create_inferior): Rewrite function prototype in
13480         order to constify "exec_file" and accept a "std::string" for
13481         "allargs".
13482         * go32-nat.c (go32_create_inferior): Likewise.
13483         * inf-ptrace.c (inf_ptrace_create_inferior): Likewise.
13484         * infcmd.c (run_command_1): Constify "exec_file".  Use
13485         "std::string" for inferior arguments.
13486         * inferior.h (fork_inferior): Update prototype.
13487         * linux-nat.c (linux_nat_create_inferior): Rewrite function
13488         prototype in order to constify "exec_file" and accept a
13489         "std::string" for "allargs".
13490         * nto-procfs.c (procfs_create_inferior): Likewise.
13491         * procfs.c (procfs_create_inferior): Likewise.
13492         * remote-sim.c (gdbsim_create_inferior): Likewise.
13493         * remote.c (extended_remote_run): Update code to accept
13494         "std::string" as argument.
13495         (extended_remote_create_inferior): Rewrite function prototype in
13496         order to constify "exec_file" and accept a "std::string" for
13497         "allargs".
13498         * rs6000-nat.c (super_create_inferior): Likewise.
13499         (rs6000_create_inferior): Likewise.
13500         * target.h (struct target_ops) <to_create_inferior>: Likewise.
13501         * windows-nat.c (windows_create_inferior): Likewise.
13502
13503 2017-04-11  Pedro Alves  <palves@redhat.com>
13504
13505         * thread.c: Fix whitespace throughout.
13506
13507 2017-04-11  Philipp Rudo  <prudo@linux.vnet.ibm.com>
13508
13509         * linux-nat.c (linux_nat_detach): Remove delete_lwp call.
13510
13511 2017-04-11  Alan Hayward  <alan.hayward@arm.com>
13512
13513         * arm-tdep.c (arm_store_return_value): Use FP_REGISTER_SIZE
13514
13515 2017-04-10  Sergio Durigan Junior  <sergiodj@redhat.com>
13516
13517         PR gdb/21364
13518         * osdata.c (info_osdata): Check if 'type' is an empty string
13519         instead of NULL.
13520
13521 2017-04-10  Pedro Alves  <palves@redhat.com>
13522
13523         * thread.c (add_thread_silent, delete_thread_1, find_thread_ptid)
13524         (ptid_to_global_thread_id, in_thread_list)
13525         (do_captured_list_thread_ids, set_resumed, set_running)
13526         (set_executing, set_stop_requested, finish_thread_state)
13527         (validate_registers_access, can_access_registers_ptid)
13528         (print_thread_info_1, switch_to_thread)
13529         (do_restore_current_thread_cleanup)
13530         (make_cleanup_restore_current_thread, thread_command)
13531         (thread_name_command): Use operator== instead of ptid_equal.
13532
13533 2017-04-10  Pedro Alves  <palves@redhat.com>
13534
13535         * thread.c (struct current_thread_cleanup) <next>: Delete field.
13536         (current_thread_cleanup_chain): Delete.
13537         (restore_current_thread_cleanup_dtor)
13538         (make_cleanup_restore_current_thread): Remove references to
13539         current_thread_cleanup_chain.
13540
13541 2017-04-10  Alan Hayward  <alan.hayward@arm.com>
13542
13543         * msp430-tdep.c (msp430_pseudo_register_read): Never return
13544         REG_UNKNOWN.
13545
13546 2017-04-10  Yao Qi  <yao.qi@linaro.org>
13547
13548         PR gdb/19942
13549         * gdbthread.h (thread_info::deletable): New method.
13550         (thread_info::incref): New method.
13551         (thread_info::decref): New method.
13552         (thread_info::refcount): Move it to private.
13553         * infrun.c (save_stop_context): Call inc_refcount.
13554         (release_stop_context_cleanup): Likewise.
13555         * thread.c (set_thread_exited): New function.
13556         (init_thread_list): Delete "tp" only it is deletable, otherwise
13557         call set_thread_exited.
13558         (delete_thread_1): Call set_thread_exited.
13559         (current_thread_cleanup) <inferior_pid>: Remove.
13560         <thread>: New field.
13561         (restore_current_thread_ptid_changed): Removed.
13562         (do_restore_current_thread_cleanup): Adjust.
13563         (restore_current_thread_cleanup_dtor): Don't call
13564         find_thread_ptid.
13565         (set_thread_refcount): Use dec_refcount.
13566         (make_cleanup_restore_current_thread): Adjust.
13567         (thread_apply_all_command): Call inc_refcount.
13568         (_initialize_thread): Don't call
13569         observer_attach_thread_ptid_changed.
13570
13571 2017-04-10  Yao Qi  <yao.qi@linaro.org>
13572
13573         * thread.c (delete_thread_1): Hoist code on marking thread as
13574         exited.
13575
13576 2017-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
13577
13578         * windows-nat.c (windows_detach): Initialize ptid with
13579         minus_one_ptid.
13580
13581 2017-04-07  Simon Marchi  <simon.marchi@ericsson.com>
13582
13583         * unittests/ptid-selftests.c: Fix erroneous assert messages.
13584
13585 2017-04-07  Alan Hayward  <alan.hayward@arm.com>
13586
13587         * bfin-tdep.c (BFIN_MAX_REGISTER_SIZE): Add.
13588         (bfin_pseudo_register_read): Use BFIN_MAX_REGISTER_SIZE.
13589         (bfin_pseudo_register_write): Likewise
13590
13591 2017-04-06  Simon Marchi  <simon.marchi@ericsson.com>
13592
13593         * common/ptid.h (struct ptid): Change to...
13594         (class ptid_t): ... this.
13595         <ptid_t>: New constructors.
13596         <pid, lwp_p, lwp, tid_p, tid, is_pid, operator==, operator!=,
13597         matches>: New methods.
13598         <make_null, make_minus_one>: New static methods.
13599         <pid>: Rename to...
13600         <m_pid>: ...this.
13601         <lwp>: Rename to...
13602         <m_lwp>: ...this.
13603         <tid>: Rename to...
13604         <m_tid>: ...this.
13605         (ptid_build, ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal,
13606         ptid_is_pid, ptid_lwp_p, ptid_tid_p, ptid_match): Take ptid arguments
13607         as references, move comment to class ptid_t.
13608         * common/ptid.c (null_ptid, minus_one_ptid): Initialize with
13609         ptid_t static methods.
13610         (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_tid,
13611         ptid_equal, ptid_is_pid, ptid_lwp_p, ptid_tid_p, ptid_match):
13612         Take ptid arguments as references, implement using ptid_t methods.
13613         * unittests/ptid-selftests.c: New file.
13614         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
13615         unittests/ptid-selftests.c.
13616         (SUBDIR_UNITTESTS_OBS): Add unittests/ptid-selftests.o.
13617
13618 2017-04-06  Thomas Preud'homme  <thomas.preudhomme@arm.com>
13619
13620         * python/python.c (python_run_simple_file): Cast mode literal to
13621         non-const char pointer as expected by PyFile_FromString.
13622
13623 2017-04-05  Simon Marchi  <simon.marchi@ericsson.com>
13624
13625         * common/ptid.c (ptid_lwp_p, ptid_tid_p): Remove comparison with
13626         minus_one_ptid and null_ptid.
13627
13628 2017-04-05  Pedro Alves  <palves@redhat.com>
13629
13630         * warning.m4 (build_warnings): Remove -Wno-write-strings.
13631         * configure: Regenerate.
13632
13633 2017-04-05  Pedro Alves  <palves@redhat.com>
13634
13635         * ada-exp.y (yyerror): Constify.
13636         * ada-lang.c (bound_name, get_selections)
13637         (ada_variant_discrim_type)
13638         (ada_variant_discrim_name, ada_value_struct_elt)
13639         (ada_lookup_struct_elt_type, is_unchecked_variant)
13640         (ada_which_variant_applies, standard_exc, ada_get_next_arg)
13641         (catch_ada_exception_command_split)
13642         (catch_ada_assert_command_split, catch_assert_command)
13643         (ada_op_name): Constify.
13644         * ada-lang.h (ada_yyerror, get_selections)
13645         (ada_variant_discrim_name, ada_value_struct_elt): Constify.
13646         * arc-tdep.c (arc_print_frame_cache): Constify.
13647         * arm-tdep.c (arm_skip_stub): Constify.
13648         * ax-gdb.c (gen_binop, gen_struct_ref_recursive, gen_struct_ref)
13649         (gen_aggregate_elt_ref): Constify.
13650         * bcache.c (print_bcache_statistics): Constify.
13651         * bcache.h (print_bcache_statistics): Constify.
13652         * break-catch-throw.c (catch_exception_command_1):
13653         * breakpoint.c (struct ep_type_description::description):
13654         Constify.
13655         (add_solib_catchpoint): Constify.
13656         (catch_fork_command_1): Add cast.
13657         (add_catch_command): Constify.
13658         * breakpoint.h (add_catch_command, add_solib_catchpoint):
13659         Constify.
13660         * bsd-uthread.c (bsd_uthread_state): Constify.
13661         * buildsym.c (patch_subfile_names): Constify.
13662         * buildsym.h (next_symbol_text_func, patch_subfile_names):
13663         Constify.
13664         * c-exp.y (yyerror): Constify.
13665         (token::oper): Constify.
13666         * c-lang.h (c_yyerror, cp_print_class_member): Constify.
13667         * c-varobj.c (cplus_describe_child): Constify.
13668         * charset.c (find_charset_names): Add cast.
13669         (find_charset_names): Constify array and add const_cast.
13670         * cli/cli-cmds.c (complete_command, cd_command): Constify.
13671         (edit_command): Constify.
13672         * cli/cli-decode.c (lookup_cmd): Constify.
13673         * cli/cli-dump.c (dump_memory_command, dump_value_command):
13674         Constify.
13675         (struct dump_context): Constify.
13676         (add_dump_command, restore_command): Constify.
13677         * cli/cli-script.c (get_command_line): Constify.
13678         * cli/cli-script.h (get_command_line): Constify.
13679         * cli/cli-utils.c (check_for_argument): Constify.
13680         * cli/cli-utils.h (check_for_argument): Constify.
13681         * coff-pe-read.c (struct read_pe_section_data): Constify.
13682         * command.h (lookup_cmd): Constify.
13683         * common/print-utils.c (decimal2str): Constify.
13684         * completer.c (gdb_print_filename): Constify.
13685         * corefile.c (set_gnutarget): Constify.
13686         * cp-name-parser.y (yyerror): Constify.
13687         * cp-valprint.c (cp_print_class_member): Constify.
13688         * cris-tdep.c (cris_register_name, crisv32_register_name):
13689         Constify.
13690         * d-exp.y (yyerror): Constify.
13691         (struct token::oper): Constify.
13692         * d-lang.h (d_yyerror): Constify.
13693         * dbxread.c (struct header_file_location::name): Constify.
13694         (add_old_header_file, add_new_header_file, last_function_name)
13695         (dbx_next_symbol_text, add_bincl_to_list)
13696         (find_corresponding_bincl_psymtab, set_namestring)
13697         (find_stab_function_addr, read_dbx_symtab, start_psymtab)
13698         (dbx_end_psymtab, read_ofile_symtab, process_one_symbol):
13699         * defs.h (command_line_input, print_address_symbolic)
13700         (deprecated_readline_begin_hook): Constify.
13701         * dwarf2read.c (anonymous_struct_prefix, dwarf_bool_name):
13702         Constify.
13703         * event-top.c (handle_line_of_input): Constify and add cast.
13704         * exceptions.c (catch_errors): Constify.
13705         * exceptions.h (catch_errors): Constify.
13706         * expprint.c (print_subexp_standard, op_string, op_name)
13707         (op_name_standard, dump_raw_expression, dump_raw_expression):
13708         * expression.h (op_name, op_string, dump_raw_expression):
13709         Constify.
13710         * f-exp.y (yyerror): Constify.
13711         (struct token::oper): Constify.
13712         (struct f77_boolean_val::name): Constify.
13713         * f-lang.c (f_word_break_characters): Constify.
13714         * f-lang.h (f_yyerror): Constify.
13715         * fork-child.c (fork_inferior): Add cast.
13716         * frv-tdep.c (struct gdbarch_tdep::register_names): Constify.
13717         (new_variant): Constify.
13718         * gdbarch.sh (pstring_ptr, pstring_list): Constify.
13719         * gdbarch.c: Regenerate.
13720         * gdbcore.h (set_gnutarget): Constify.
13721         * go-exp.y (yyerror): Constify.
13722         (token::oper): Constify.
13723         * go-lang.h (go_yyerror): Constify.
13724         * go32-nat.c (go32_sysinfo): Constify.
13725         * guile/scm-breakpoint.c (gdbscm_breakpoint_expression): Constify.
13726         * guile/scm-cmd.c (cmdscm_function): Constify.
13727         * guile/scm-param.c (pascm_param_value): Constify.
13728         * h8300-tdep.c (h8300_register_name, h8300s_register_name)
13729         (h8300sx_register_name): Constify.
13730         * hppa-tdep.c (hppa32_register_name, hppa64_register_name):
13731         Constify.
13732         * ia64-tdep.c (ia64_register_names): Constify.
13733         * infcmd.c (construct_inferior_arguments): Constify.
13734         (path_command, attach_post_wait): Constify.
13735         * language.c (show_range_command, show_case_command)
13736         (unk_lang_error): Constify.
13737         * language.h (language_defn::la_error)
13738         (language_defn::la_name_of_this): Constify.
13739         * linespec.c (decode_line_2): Constify.
13740         * linux-thread-db.c (thread_db_err_str): Constify.
13741         * lm32-tdep.c (lm32_register_name): Constify.
13742         * m2-exp.y (yyerror): Constify.
13743         * m2-lang.h (m2_yyerror): Constify.
13744         * m32r-tdep.c (m32r_register_names): Constify and make static.
13745         * m68hc11-tdep.c (m68hc11_register_names): Constify.
13746         * m88k-tdep.c (m88k_register_name): Constify.
13747         * macroexp.c (appendmem): Constify.
13748         * mdebugread.c (fdr_name, add_data_symbol, parse_type)
13749         (upgrade_type, parse_external, parse_partial_symbols)
13750         (mdebug_next_symbol_text, cross_ref, mylookup_symbol, new_psymtab)
13751         (new_symbol): Constify.
13752         * memattr.c (mem_info_command): Constify.
13753         * mep-tdep.c (register_name_from_keyword): Constify.
13754         * mi/mi-cmd-env.c (mi_cmd_env_path, _initialize_mi_cmd_env):
13755         Constify.
13756         * mi/mi-cmd-stack.c (list_args_or_locals): Constify.
13757         * mi/mi-cmd-var.c (mi_cmd_var_show_attributes): Constify.
13758         * mi/mi-main.c (captured_mi_execute_command): Constify and add
13759         cast.
13760         (mi_execute_async_cli_command): Constify.
13761         * mips-tdep.c (mips_register_name): Constify.
13762         * mn10300-tdep.c (register_name, mn10300_generic_register_name)
13763         (am33_register_name, am33_2_register_name)
13764         * moxie-tdep.c (moxie_register_names): Constify.
13765         * nat/linux-osdata.c (osdata_type): Constify fields.
13766         * nto-tdep.c (nto_parse_redirection): Constify.
13767         * objc-lang.c (lookup_struct_typedef, lookup_objc_class)
13768         (lookup_child_selector): Constify.
13769         (objc_methcall::name): Constify.
13770         * objc-lang.h (lookup_objc_class, lookup_child_selector)
13771         (lookup_struct_typedef): Constify.
13772         * objfiles.c (pc_in_section): Constify.
13773         * objfiles.h (pc_in_section): Constify.
13774         * p-exp.y (struct token::oper): Constify.
13775         (yyerror): Constify.
13776         * p-lang.h (pascal_yyerror): Constify.
13777         * parser-defs.h (op_name_standard): Constify.
13778         (op_print::string): Constify.
13779         (exp_descriptor::op_name): Constify.
13780         * printcmd.c (print_address_symbolic): Constify.
13781         * psymtab.c (print_partial_symbols): Constify.
13782         * python/py-breakpoint.c (stop_func): Constify.
13783         (bppy_get_expression): Constify.
13784         * python/py-cmd.c (cmdpy_completer::name): Constify.
13785         (cmdpy_function): Constify.
13786         * python/py-event.c (evpy_add_attribute)
13787         (gdbpy_initialize_event_generic): Constify.
13788         * python/py-event.h (evpy_add_attribute)
13789         (gdbpy_initialize_event_generic): Constify.
13790         * python/py-evts.c (add_new_registry): Constify.
13791         * python/py-finishbreakpoint.c (outofscope_func): Constify.
13792         * python/py-framefilter.c (get_py_iter_from_func): Constify.
13793         * python/py-inferior.c (get_buffer): Add cast.
13794         * python/py-param.c (parm_constant::name): Constify.
13795         * python/py-unwind.c (fprint_frame_id): Constify.
13796         * python/python.c (gdbpy_parameter_value): Constify.
13797         * remote-fileio.c (remote_fio_func_map): Make 'name' const.
13798         * remote.c (memory_packet_config::name): Constify.
13799         (show_packet_config_cmd, remote_write_bytes)
13800         (remote_buffer_add_string):
13801         * reverse.c (exec_reverse_once): Constify.
13802         * rs6000-tdep.c (variant::name, variant::description): Constify.
13803         * rust-exp.y (rustyyerror): Constify.
13804         * rust-lang.c (rust_op_name): Constify.
13805         * rust-lang.h (rustyyerror): Constify.
13806         * serial.h (serial_ops::name): Constify.
13807         * sh-tdep.c (sh_sh_register_name, sh_sh3_register_name)
13808         (sh_sh3e_register_name, sh_sh2e_register_name)
13809         (sh_sh2a_register_name, sh_sh2a_nofpu_register_name)
13810         (sh_sh_dsp_register_name, sh_sh3_dsp_register_name)
13811         (sh_sh4_register_name, sh_sh4_nofpu_register_name)
13812         (sh_sh4al_dsp_register_name): Constify.
13813         * sh64-tdep.c (sh64_register_name): Constify.
13814         * solib-darwin.c (lookup_symbol_from_bfd): Constify.
13815         * spu-tdep.c (spu_register_name, info_spu_dma_cmdlist): Constify.
13816         * stabsread.c (patch_block_stabs, read_type_number)
13817         (ref_map::stabs, ref_add, process_reference)
13818         (symbol_reference_defined, define_symbol, define_symbol)
13819         (error_type, read_type, read_member_functions, read_cpp_abbrev)
13820         (read_one_struct_field, read_struct_fields, read_baseclasses)
13821         (read_tilde_fields, read_struct_type, read_array_type)
13822         (read_enum_type, read_sun_builtin_type, read_sun_floating_type)
13823         (read_huge_number, read_range_type, read_args, common_block_start)
13824         (find_name_end): Constify.
13825         * stabsread.h (common_block_start, define_symbol)
13826         (process_one_symbol, symbol_reference_defined, ref_add):
13827         * symfile.c (get_section_index, add_symbol_file_command):
13828         * symfile.h (get_section_index): Constify.
13829         * target-descriptions.c (tdesc_type::name): Constify.
13830         (tdesc_free_type): Add cast.
13831         * target.c (find_default_run_target):
13832         (add_deprecated_target_alias, find_default_run_target)
13833         (target_announce_detach): Constify.
13834         (do_option): Constify.
13835         * target.h (add_deprecated_target_alias): Constify.
13836         * thread.c (print_thread_info_1): Constify.
13837         * top.c (deprecated_readline_begin_hook, command_line_input):
13838         Constify.
13839         (init_main): Add casts.
13840         * top.h (handle_line_of_input): Constify.
13841         * tracefile-tfile.c (tfile_write_uploaded_tsv): Constify.
13842         * tracepoint.c (tvariables_info_1, trace_status_mi): Constify.
13843         (tfind_command): Rename to ...
13844         (tfind_command_1): ... this and constify.
13845         (tfind_command): New function.
13846         (tfind_end_command, tfind_start_command): Adjust.
13847         (encode_source_string): Constify.
13848         * tracepoint.h (encode_source_string): Constify.
13849         * tui/tui-data.c (tui_partial_win_by_name): Constify.
13850         * tui/tui-data.h (tui_partial_win_by_name): Constify.
13851         * tui/tui-source.c (tui_set_source_content_nil): Constify.
13852         * tui/tui-source.h (tui_set_source_content_nil): Constify.
13853         * tui/tui-win.c (parse_scrolling_args): Constify.
13854         * tui/tui-windata.c (tui_erase_data_content): Constify.
13855         * tui/tui-windata.h (tui_erase_data_content): Constify.
13856         * tui/tui-winsource.c (tui_erase_source_content): Constify.
13857         * tui/tui.c (tui_enable): Add cast.
13858         * utils.c (defaulted_query): Constify.
13859         (init_page_info): Add cast.
13860         (puts_debug, subset_compare): Constify.
13861         * utils.h (subset_compare): Constify.
13862         * varobj.c (varobj_format_string): Constify.
13863         * varobj.h (varobj_format_string): Constify.
13864         * vax-tdep.c (vax_register_name): Constify.
13865         * windows-nat.c (windows_detach): Constify.
13866         * xcoffread.c (process_linenos, xcoff_next_symbol_text): Constify.
13867         * xml-support.c (gdb_xml_end_element): Constify.
13868         * xml-tdesc.c (tdesc_start_reg): Constify.
13869         * xstormy16-tdep.c (xstormy16_register_name): Constify.
13870         * xtensa-tdep.c (xtensa_find_register_by_name): Constify.
13871         * xtensa-tdep.h (xtensa_register_t::name): Constify.
13872
13873 2017-04-05  Pedro Alves  <palves@redhat.com>
13874
13875         * proc-api.c (struct trans): Constify.
13876         (procfs_note): Constify.
13877         * proc-events.c (struct trans, syscall_table):
13878         * proc-flags.c (struct trans): Constify.
13879         * proc-utils.h (procfs_note): Constify.
13880         * proc-why.c (struct trans): Constify.
13881         * procfs.c (dead_procinfo, find_syscall, proc_warn, proc_error)
13882         (procfs_detach): Constify.
13883         * sol-thread.c (struct string_map): Constify.
13884         (td_err_string, td_state_string): Constify.
13885
13886 2017-04-05  Pedro Alves  <palves@redhat.com>
13887
13888         * proc-api.c (procfs_filename): Don't initialize
13889         procfs_filename.
13890         (prepare_to_trace): Assume procfs_filename is non-NULL.
13891         (_initialize_proc_api): Give procfs_filename a default value here.
13892
13893 2017-04-05  Pedro Alves  <palves@redhat.com>
13894
13895         * break-catch-throw.c (handle_gnu_v3_exceptions): Constify
13896         'cond_string' parameter.
13897         (extract_exception_regexp): Constify 'string' parameter.
13898         (catch_exception_command_1): Constify.
13899         * breakpoint.c (init_catchpoint)
13900         (create_fork_vfork_event_catchpoint): Constify 'cond_string'
13901         parameter.
13902         (ep_parse_optional_if_clause, catch_fork_command_1)
13903         (catch_exec_command_1): Constify.
13904         * breakpoint.h (init_catchpoint): Constify 'cond_string'
13905         parameter.
13906         (ep_parse_optional_if_clause): Constify.
13907         * cli/cli-utils.c (remove_trailing_whitespace)
13908         (check_for_argument): Constify.
13909         * cli/cli-utils.h (remove_trailing_whitespace): Constify and add
13910         non-const overload.
13911         (check_for_argument): Likewise.
13912
13913 2017-04-05  Pedro Alves  <palves@redhat.com>
13914
13915         * event-top.c (command_line_handler): Add cast to execute_command
13916         call.
13917         * record-btrace.c (cmd_record_btrace_bts_start)
13918         (cmd_record_btrace_pt_start, cmd_record_btrace_start)
13919         (cmd_record_btrace_start): Add cast to execute_command call.
13920         * record-full.c (record_full_goto_insn):
13921         * record.c (record_start, record_stop): Add cast to
13922         execute_command_to_string calls.
13923         (cmd_record_start): Add cast to execute_command calls.
13924
13925 2017-04-05  Pedro Alves  <palves@redhat.com>
13926
13927         * python/python-internal.h (gdb_PyArg_ParseTupleAndKeywords): New
13928         static inline function.
13929         * python/py-arch.c (archpy_disassemble): Constify 'keywords'
13930         array and use gdb_PyArg_ParseTupleAndKeywords.
13931         * python/py-cmd.c (cmdpy_init): Likewise.
13932         * python/py-finishbreakpoint.c (bpfinishpy_init): Likewise.
13933         * python/py-inferior.c (infpy_read_memory, infpy_write_memory)
13934         (infpy_search_memory): Likewise.
13935         * python/py-objfile.c (objfpy_add_separate_debug_file)
13936         (gdbpy_lookup_objfile): Likewise.
13937         * python/py-symbol.c (gdbpy_lookup_symbol)
13938         (gdbpy_lookup_global_symbol): Likewise.
13939         * python/py-type.c (gdbpy_lookup_type): Likewise.
13940         * python/py-value.c (valpy_lazy_string, valpy_string): Likewise.
13941         * python/python.c (execute_gdb_command, gdbpy_write, gdbpy_flush):
13942         Likewise.
13943
13944 2017-04-05  Pedro Alves  <palves@redhat.com>
13945
13946         * python/python-internal.h (gdb_PyGetSetDef): New type.
13947         * python/py-block.c (block_object_getset)
13948         (breakpoint_object_getset): Now a gdb_PyGetSetDef array.
13949         * python/py-event.c (event_object_getset)
13950         (finish_breakpoint_object_getset): Likewise.
13951         * python/py-inferior.c (inferior_object_getset): Likewise.
13952         * python/py-infthread.c (thread_object_getset): Likewise.
13953         * python/py-lazy-string.c (lazy_string_object_getset): Likewise.
13954         * python/py-linetable.c (linetable_entry_object_getset): Likewise.
13955         * python/py-objfile.c (objfile_getset): Likewise.
13956         * python/py-progspace.c (pspace_getset): Likewise.
13957         * python/py-record-btrace.c (btpy_insn_getset, btpy_call_getset):
13958         Likewise.
13959         * python/py-record.c (recpy_record_getset): Likewise.
13960         * python/py-symbol.c (symbol_object_getset): Likewise.
13961         * python/py-symtab.c (symtab_object_getset, sal_object_getset):
13962         Likewise.
13963         * python/py-type.c (type_object_getset, field_object_getset):
13964         Likewise.
13965         * python/py-value.c (value_object_getset): Likewise.
13966
13967 2017-04-05  Pedro Alves  <palves@redhat.com>
13968
13969         * python/python-internal.h (gdb_PyObject_CallMethod)
13970         (gdb_PyErr_NewException, gdb_PySys_GetObject, gdb_PySys_SetPath):
13971         New functions.
13972         (GDB_PYSYS_SETPATH_CHAR, PyObject_CallMethod, PyErr_NewException)
13973         (PySys_GetObject, PySys_SetPath): New macros.
13974
13975 2017-04-05  Pedro Alves  <palves@redhat.com>
13976
13977         * mi/mi-cmd-info.c (mi_cmd_info_os): Call info_osdata instead of
13978         info_osdata_command.
13979         * osdata.c (info_osdata_command): Rename to ...
13980         (info_osdata): ... this.  Constify 'type' parameter, and remove
13981         the 'from_tty' parameter.  Accept NULL TYPE.
13982         (info_osdata_command): New function.
13983         * osdata.h (info_osdata_command): Remove declaration.
13984         (info_osdata): New declaration.
13985
13986 2017-04-05  Pedro Alves  <palves@redhat.com>
13987
13988         * mi/mi-cmd-break.c (mi_cmd_break_insert_1, mi_cmd_break_insert)
13989         (mi_cmd_dprintf_insert, mi_cmd_break_passcount)
13990         (mi_cmd_break_watch, mi_cmd_break_commands): Constify 'command'
13991         parameter.
13992         * mi/mi-cmd-catch.c (mi_cmd_catch_assert, mi_cmd_catch_exception)
13993         (mi_cmd_catch_load, mi_cmd_catch_unload): Constify cmd' parameter.
13994         * mi/mi-cmd-disas.c (mi_cmd_disassemble): Constify 'command'
13995         parameter.
13996         * mi/mi-cmd-env.c (mi_cmd_env_pwd, mi_cmd_env_cd, mi_cmd_env_path)
13997         (mi_cmd_env_dir, mi_cmd_inferior_tty_set, _cmd_inferior_tty_show)
13998         * mi/mi-cmd-file.c (mi_cmd_file_list_exec_source_file)
13999         (mi_cmd_file_list_exec_source_files)
14000         (mi_cmd_file_list_shared_libraries): Constify 'command' parameter.
14001         * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions)
14002         (mi_cmd_info_gdb_mi_command, mi_cmd_info_os): Constify 'command'
14003         parameter.
14004         * mi/mi-cmd-stack.c (mi_cmd_enable_frame_filters)
14005         (mi_cmd_stack_list_frames, mi_cmd_stack_info_depth)
14006         (mi_cmd_stack_list_locals, mi_cmd_stack_list_args)
14007         (mi_cmd_stack_list_variables, mi_cmd_stack_select_frame)
14008         (mi_cmd_stack_info_frame): Constify 'command' parameter.
14009         * mi/mi-cmd-target.c (mi_cmd_target_file_get)
14010         (mi_cmd_target_file_put, mi_cmd_target_file_delete): Constify
14011         'command' parameter.
14012         * mi/mi-cmd-var.c (mi_cmd_var_create, mi_cmd_var_delete)
14013         (mi_cmd_var_set_format, mi_cmd_var_set_visualizer)
14014         (mi_cmd_var_set_frozen, mi_cmd_var_show_format)
14015         (mi_cmd_var_info_num_children, mi_cmd_var_list_children)
14016         (mi_cmd_var_info_type, mi_cmd_var_info_path_expression)
14017         (mi_cmd_var_info_expression, mi_cmd_var_show_attributes)
14018         (mi_cmd_var_evaluate_expression, mi_cmd_var_assign)
14019         (mi_cmd_var_update, mi_cmd_enable_pretty_printing)
14020         (mi_cmd_var_set_update_range): Constify 'command' parameter.
14021         * mi/mi-cmds.h (mi_cmd_argv_ftype): Constify 'command' parameter.
14022         * mi/mi-interp.c (mi_cmd_interpreter_exec): Constify 'command'
14023         parameter.
14024         * mi/mi-main.c (mi_cmd_gdb_exit, mi_cmd_exec_next)
14025         (mi_cmd_exec_next_instruction, mi_cmd_exec_step)
14026         (mi_cmd_exec_step_instruction, mi_cmd_exec_finish)
14027         (mi_cmd_exec_return ,mi_cmd_exec_jump, mi_cmd_exec_continue)
14028         (mi_cmd_exec_interrupt, mi_cmd_exec_run, mi_cmd_target_detach)
14029         (mi_cmd_target_flash_erase, mi_cmd_thread_select)
14030         (mi_cmd_thread_list_ids, mi_cmd_thread_info)
14031         (mi_cmd_list_thread_groups, mi_cmd_data_list_register_names)
14032         (mi_cmd_data_list_changed_registers)
14033         (mi_cmd_data_write_register_values)
14034         (mi_cmd_data_evaluate_expression, mi_cmd_data_read_memory)
14035         (mi_cmd_data_read_memory_bytes, mi_cmd_data_write_memory)
14036         (mi_cmd_data_write_memory_bytes, mi_cmd_enable_timings)
14037         (mi_cmd_list_features, mi_cmd_list_target_features)
14038         (mi_cmd_add_inferior, mi_cmd_remove_inferior)
14039         (mi_cmd_trace_define_variable, mi_cmd_trace_list_variables)
14040         (mi_cmd_trace_find, mi_cmd_trace_save, mi_cmd_trace_start)
14041         (mi_cmd_trace_status, mi_cmd_trace_stop, mi_cmd_ada_task_info)
14042         (mi_cmd_trace_frame_collected): Constify 'command'
14043         parameter.
14044         * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Constify
14045         'command' parameter.
14046
14047 2017-04-05  Pedro Alves  <palves@redhat.com>
14048
14049         * ada-lang.c (ada_completer_word_break_characters): Now a const
14050         array.
14051         (ada_get_gdb_completer_word_break_characters): Constify.
14052         * completer.c (gdb_completer_command_word_break_characters)
14053         (gdb_completer_file_name_break_characters)
14054         (gdb_completer_quote_characters): Now const arrays.
14055         (get_gdb_completer_quote_characters): Constify.
14056         (set_rl_completer_word_break_characters): New function.
14057         (set_gdb_completion_word_break_characters)
14058         (complete_line_internal): Use it.
14059         * completer.h (get_gdb_completer_quote_characters): Constify.
14060         (set_rl_completer_word_break_characters): Declare.
14061         * f-lang.c (f_word_break_characters): Constify.
14062         * language.c (default_word_break_characters): Constify.
14063         * language.h (language_defn::la_word_break_characters): Constify.
14064         (default_word_break_characters): Constify.
14065         * top.c (init_main): Use set_rl_completer_word_break_characters.
14066
14067 2017-04-05  Pedro Alves  <palves@redhat.com>
14068
14069         * aix-thread.c (aix_thread_pid_to_str)
14070         (aix_thread_extra_thread_info): Constify.
14071         * bsd-kvm.c (bsd_kvm_pid_to_str): Constify.
14072         * bsd-uthread.c (bsd_uthread_extra_thread_info)
14073         (bsd_uthread_pid_to_str): Constify.
14074         * corelow.c (core_pid_to_str): Constify.
14075         * darwin-nat.c (darwin_pid_to_str): Constify.
14076         * fbsd-nat.c (fbsd_pid_to_str): Constify.
14077         * fbsd-tdep.c (fbsd_core_pid_to_str, gdbarch_core_pid_to_str):
14078         Constify.
14079         * gnu-nat.c (gnu_pid_to_str): Constify.
14080         * go32-nat.c (go32_pid_to_str): Constify.
14081         * i386-cygwin-tdep.c (i386_windows_core_pid_to_str): Constify.
14082         * inf-ptrace.c (inf_ptrace_pid_to_str): Constify.
14083         * inferior.c (inferior_pid_to_str): Constify.
14084         * linux-nat.c (linux_nat_pid_to_str): Constify.
14085         * linux-tdep.c (linux_core_pid_to_str): Constify.
14086         * linux-thread-db.c (thread_db_pid_to_str)
14087         (thread_db_extra_thread_info): Constify.
14088         * nto-tdep.c (nto_extra_thread_info): Constify.
14089         * nto-tdep.h (nto_extra_thread_info): Constify.
14090         * obsd-nat.c (obsd_pid_to_str): Constify.
14091         * procfs.c (procfs_pid_to_str): Constify.
14092         * ravenscar-thread.c (ravenscar_extra_thread_info)
14093         (ravenscar_pid_to_str): Constify.
14094         * remote-sim.c (gdbsim_pid_to_str): Constify.
14095         * remote.c (remote_threads_extra_info, remote_pid_to_str):
14096         Constify.
14097         * sol-thread.c (solaris_pid_to_str): Constify.
14098         * sol2-tdep.c (sol2_core_pid_to_str): Constify.
14099         * sol2-tdep.h (sol2_core_pid_to_str): Constify.
14100         * target.c (default_pid_to_str, target_pid_to_str)
14101         (normal_pid_to_str, default_pid_to_str): Constify.
14102         * target.h (target_ops::to_pid_to_str)
14103         (target_ops::to_extra_thread_info): Constify.
14104         (target_pid_to_str, normal_pid_to_str): Constify.
14105         * windows-nat.c (windows_pid_to_str): Constify.
14106         * gdbarch.sh (core_pid_to_str): Constify.
14107         * target-delegates.c: Regenerate.
14108         * gdbarch.h, gdbarch.c: Regenerate.
14109
14110 2017-04-05  Pedro Alves  <palves@redhat.com>
14111
14112         * main.c (captured_main_1): Use gdb::unique_xmalloc_ptr to manage
14113         the memory of the temporary warning_pre_print override.
14114         * utils.c (warning_pre_print): Constify.
14115         * utils.h (warning_pre_print): Constify.
14116
14117 2017-04-05  Pedro Alves  <palves@redhat.com>
14118
14119         * cli/cli-cmds.c (shell_escape): Constify 'arg' parameter.
14120         (shell_command): New function.
14121         (make_command): Use std::string.
14122         (init_cli_cmds): Register shell_command instead of shell_escape.
14123
14124 2017-04-05  Pedro Alves  <palves@redhat.com>
14125
14126         * breakpoint.c (dprintf_function, dprintf_channel): Don't initialize.
14127         * tracepoint.c (default_collect): Don't initialize.
14128
14129 2017-04-05  Pedro Alves  <palves@redhat.com>
14130
14131         * macroexp.c (macro_buffer::shared): Now a bool.
14132         (init_buffer): Update.
14133         (init_shared_buffer): Constify 'addr' parameter.
14134         (substitute_args, expand, macro_expand, macro_expand_next): Remove
14135         casts.
14136
14137 2017-04-05  Pedro Alves  <palves@redhat.com>
14138
14139         * arm-tdep.c (show_disassembly_style_sfunc): Constify local.
14140         * disasm.c (set_disassembler_options): Constify local.
14141         * i386-tdep.c (i386_print_insn): Remove cast and FIXME comment.
14142
14143 2017-04-05  Sergio Durigan Junior  <sergiodj@redhat.com>
14144
14145         PR gdb/21352
14146         * tracefile.c (tsave_command): Fix argument parsing for '-r'
14147         option.
14148
14149 2017-04-05  Yao Qi  <yao.qi@linaro.org>
14150
14151         * frame.c (frame_unwind_register_unsigned): Call
14152         frame_unwind_register_value.
14153
14154 2017-04-05  Yao Qi  <yao.qi@linaro.org>
14155
14156         * gdb.threads/thread-specific-bp.exp (check_thread_specific_breakpoint):
14157         Use gdb_test_multiple, and don't match anchor.
14158
14159 2017-04-05  Pedro Alves  <palves@redhat.com>
14160
14161         * MAINTAINERS (Global Maintainers): Add Simon Marchi.
14162         (Write After Approval): Remove Simon Marchi.
14163
14164 2017-04-05  Pedro Alves  <palves@redhat.com>
14165
14166         * common/gdb_optional.h (optional::optional): Make constexpr and
14167         initialize m_dummy.
14168
14169 2017-04-04  John Baldwin  <jhb@FreeBSD.org>
14170
14171         * amd64-fbsd-tdep.c: Remove "bsd-uthread.h" include.
14172         (amd64fbsd_jmp_buf_reg_offset): Remove.
14173         (amd64fbsd_supply_uthread): Remove function.
14174         (amd64fbsd_collect_uthread): Remove function.
14175         (amd64fbsd_init_abi): Don't set bsd-uthread callbacks.
14176         * configure.tgt (i[34567]86-*-freebsd*): Remove bsd-uthread.o.
14177         (x86_64-*-freebsd*): Remove bsd-uthread.o.
14178         (fbsd-nat.c): Update comment.
14179         * i386-fbsd-tdep.c: Remove "bsd-uthread.h" include.
14180         (i386fbsd_jmp_buf_reg_offset): Remove.
14181         (i386fbsd_supply_uthread): Remove function.
14182         (i386fbsd_collect_uthread): Remove function.
14183         (i386fbsd_init_abi): Don't set bsd-uthread callbacks.
14184
14185 2017-04-04  John Baldwin  <jhb@FreeBSD.org>
14186
14187         * Makefile.in (ALL_64_TARGET_OBS): Remove alpha-fbsd-tdep.o.
14188         (ALLDEPFILES): Remove alpha-fbsd-tdep.c
14189         * NEWS: Mention that support for FreeBSD/alpha was removed.
14190         * alpha-fbsd-tdep.c: Delete file.
14191         * config/alpha/fbsd.mh: Delete file.
14192         * configure.host: Delete alpha*-*-freebsd* and
14193         alpha*-*-kfreebsd*-gnu.
14194         * configure.tgt: Delete alpha*-*-freebsd* and
14195         alpha*-*-kfreebsd*-gnu.
14196
14197 2017-04-04  John Baldwin  <jhb@FreeBSD.org>
14198
14199         * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers,
14200         amd64bsd_store_inferior_registers): Use ptid from regcache.
14201
14202 2017-04-04  Pedro Alves  <palves@redhat.com>
14203
14204         * dwarf2read.c (lnp_state_machine): Now a class.  Initialize all
14205         data fields, make them private and add "m_" prefixes.
14206         (lnp_state_machine::lnp_state_machine): New ctor.
14207         (record_line, check_line_address, handle_set_discriminator)
14208         (handle_set_address, handle_advance_pc, handle_special_opcode)
14209         (handle_advance_line, handle_set_file, handle_negate_stmt)
14210         (handle_const_add_pc, handle_fixed_advance_pc, handle_copy)
14211         (end_sequence, advance_line): New methods.
14212         (m_gdbarch, m_record_lines_p): New fields.
14213         (lnp_reader_state): Delete.
14214         (dwarf_record_line): Rename to ...
14215         (lnp_state_machine::record_line): ... adjust.
14216         (init_lnp_state_machine): Delete.
14217         (lnp_state_machine::lnp_state_machine): New.
14218         (check_line_address): Rename to ...
14219         (lnp_state_machine::check_line_address): This.
14220         (dwarf_decode_lines_1): Remove reference to "reader_state".
14221         Adjust lnp_state_machine having a non-default ctor.  Use bool.
14222         State machine internal state manipulation moved to
14223         lnp_state_machine methods.
14224
14225 2017-04-04  Pedro Alves  <palves@redhat.com>
14226
14227         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
14228         unittests/offset-type-selftests.c.
14229         (SUBDIR_UNITTESTS_OBS): Add offset-type-selftests.o.
14230         * common/offset-type.h: New file.
14231         * common/preprocessor.h: New file.
14232         * common/traits.h: New file.
14233         * common/valid-expr.h: New file.
14234         * dwarf2expr.c: Include "common/underlying.h".  Adjust to use
14235         sect_offset and cu_offset strong typedefs throughout.
14236         * dwarf2expr.h: Adjust to use sect_offset and cu_offset strong
14237         typedefs throughout.
14238         * dwarf2loc.c: Include "common/underlying.h".  Adjust to use
14239         sect_offset and cu_offset strong typedefs throughout.
14240         * dwarf2read.c: Adjust to use sect_offset and cu_offset strong
14241         typedefs throughout.
14242         * gdbtypes.h: Include "common/offset-type.h".
14243         (cu_offset): Now an offset type (strong typedef) instead of a
14244         struct.
14245         (sect_offset): Likewise.
14246         (union call_site_parameter_u): Rename "param_offset" field to
14247         "param_cu_off".
14248         * unittests/offset-type-selftests.c: New file.
14249
14250 2017-04-04  Pedro Alves  <palves@redhat.com>
14251
14252         * common/underlying.h: New file.
14253         * dwarf2read.c: Include "common/gdb_optional.h" and
14254         "common/underlying.h".
14255         (dir_index, file_name_index): New types.
14256         (file_entry): Use them.
14257         (file_entry::include): Use to_underlying.
14258         (line_header::add_file_name): Use dir_index.
14259         (read_formatted_entries): Use gdb::optional.  Read form before
14260         writting to file_entry.
14261         (dwarf_decode_line_header): Use dir_index.
14262         (lnp_state_machine::current_file): Use to_underlying.
14263         (lnp_state_machine::file): Change type to file_name_index.
14264         (dwarf_record_line): Use to_underlying.
14265         (init_lnp_state_machine): Use file_name_index.
14266         (dwarf_decode_lines_1): Use dir_index and file_name_index.
14267
14268 2017-04-04  Pedro Alves  <palves@redhat.com>
14269
14270         * common/gdb_optional.h (gdb::optiona): Add operator->, operator*,
14271         operator bool, has_value and get methods.
14272
14273 2017-04-04  Pedro Alves  <palves@redhat.com>
14274
14275         * dwarf2read.c (struct file_entry): Add ctors, and initialize all
14276         fields.
14277         (line_header): Initialize all data fields.  Change type of
14278         standard_opcode_lengths to std::unique_ptr<unsigned char[]>.
14279         Change type of include_dirs to std::vector<const char *>.  Remove
14280         num_include_dirs, include_dirs_size.  Change type of file_names to
14281         std::vector<file_entry>.  Remove num_file_names, file_names_size.
14282         (line_header::line_header): New.
14283         (line_header::add_include_dir, line_header::add_file_name): New
14284         methods.
14285         (line_header::include_dir_at): Remove NULL check.
14286         (line_header::file_name_at): Add const overload.
14287         (line_header_up): New unique_ptr typedef.
14288         (dw2_get_file_names_reader): Use line_header_up.  Adjust to use
14289         std::vector.  Remove free_line_header call.
14290         (dwarf2_build_include_psymtabs): Use line_header_up.  Remove
14291         free_line_header call.
14292         (free_cu_line_header): Delete.
14293         (handle_DW_AT_stmt_list, handle_DW_AT_stmt_list)
14294         (setup_type_unit_groups): Use line_header_up instead of cleanups.
14295         Adjust to use std::vector.
14296         (free_line_header): Delete.
14297         (free_line_header_voidp): Use delete.
14298         (add_include_dir): Replace with ...
14299         (line_header::add_include_dir): ... this method.  Use std::vector.
14300         (add_file_name): Replace with ...
14301         (line_header::add_file_name): ... this method.  Use std::vector.
14302         (add_include_dir_stub): Delete.
14303         (read_formatted_entries): Remove memset.
14304         (dwarf_decode_line_header): Return a line_header_up instead of a
14305         raw pointer.  Remove cleanup handling.  Pass lambdas to
14306         read_formatted_entries.  Adjust to use line_header methods.
14307         (dwarf_decode_lines_1): Adjust to use line_header methods.
14308         (dwarf_decode_lines, file_file_name, file_full_name): Adjust to
14309         use std::vector.
14310
14311 2017-04-04  Simon Marchi  <simon.marchi@polymtl.ca>
14312
14313         * remote.c (set_general_thread, set_continue_thread): Use ptid_t
14314         instead of struct ptid.
14315
14316 2017-05-04  Alan Hayward  <alan.hayward@arm.com>
14317
14318         * frame.c (get_frame_register_bytes): Unwind using value.
14319         (put_frame_register_bytes): Likewise.
14320
14321 2017-03-30  Iain Buclaw  <ibuclaw@gdcproject.org>
14322
14323         * d-exp.y (type_aggregate_p): Treat TYPE_CODE_MODULE as being
14324         aggregate-like.
14325
14326 2017-03-29  Jan Kratochvil  <jan.kratochvil@redhat.com>
14327
14328         * auto-load.c (auto_load_section_scripts): Check SEC_HAS_CONTENTS.
14329
14330 2017-03-29  Yao Qi  <yao.qi@linaro.org>
14331
14332         * gdbthread.h (struct thread_info): Declare constructor and
14333         destructor.  Add some in-class member initializers.
14334         * thread.c (free_thread): Remove.
14335         (init_thread_list): Call delete instead of free_thread.
14336         (new_thread): Call thread_info constructor.
14337         (thread_info::thread_info): New function.
14338         (thread_info::~thread_info): New function.
14339         (delete_thread_1): Call delete instead of free_thread.
14340         (make_cleanup_restore_current_thread): Move tp and frame to
14341         inner block.
14342
14343 2017-03-28  Anton Kolesov  <anton.kolesov@synopsys.com>
14344
14345         * arc-tdep.c (arc_frame_cache): Add support for prologue analysis.
14346         (arc_skip_prologue): Likewise.
14347         (arc_make_frame_cache): Likewise.
14348         (arc_pv_get_operand): New function.
14349         (arc_is_in_prologue): Likewise.
14350         (arc_analyze_prologue): Likewise.
14351         (arc_print_frame_cache): Likewise.
14352         (MAX_PROLOGUE_LENGTH): New constant.
14353
14354 2017-03-28  Anton Kolesov  <anton.kolesov@synopsys.com>
14355
14356         * configure.tgt: Add arc-insn.o.
14357         * arc-tdep.c (arc_delayed_print_insn): Make non-static.
14358         (dump_arc_instruction_command): New function.
14359         (arc_fprintf_disasm): Likewise.
14360         (arc_disassemble_info): Likewise.
14361         (arc_insn_get_operand_value): Likewise.
14362         (arc_insn_get_operand_value_signed): Likewise.
14363         (arc_insn_get_memory_base_reg): Likewise.
14364         (arc_insn_get_memory_offset): Likewise.
14365         (arc_insn_get_branch_target): Likewise.
14366         (arc_insn_dump): Likewise.
14367         (arc_insn_get_linear_next_pc): Likewise.
14368         * arc-tdep.h (arc_delayed_print_insn): Add function declaration.
14369         (arc_disassemble_info): Likewise.
14370         (arc_insn_get_branch_target): Likewise.
14371         (arc_insn_get_linear_next_pc): Likewise.
14372         * NEWS: Mention new "maint print arc arc-instruction".
14373
14374 2017-03-28  Anton Kolesov  <anton.kolesov@synopsys.com>
14375
14376         * arc-tdep (maintenance_print_arc_list): New variable.
14377         (maintenance_print_arc_command): New function.
14378
14379 2017-03-28  Anton Kolesov  <anton.kolesov@synopsys.com>
14380
14381         * arc-tdep.c (core_v2_register_names, core_arcompact_register_names)
14382         Add "limm" and "reserved".
14383         (arc_cannot_fetch_register, arc_cannot_store_register): Add
14384         ARC_RESERVED_REGNUM and ARC_LIMM_REGNUM.
14385         * arc-tdep.h (arc_regnum): Likewise.
14386
14387 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
14388
14389         * xtensa-linux-nat.c (fill_gregset): Call regcache_raw_collect
14390         for THREADPTR register.
14391         (supply_gregset_reg): Call regcache_raw_supply for THREADPTR
14392         register.
14393         * xtensa-tdep.c (XTENSA_DBREGN_UREG): New definition.
14394         (xtensa_derive_tdep): Initialize tdep->threadptr_regnum.
14395         * xtensa-tdep.h (gdbarch_tdep::threadptr_regnum): New field.
14396
14397 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
14398
14399         * xtensa-tdep.c (xtensa_pseudo_register_read): Treat all
14400         registers above gdbarch_num_regs (gdbarch) as privileged in
14401         call0 ABI.
14402
14403 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
14404
14405         * xtensa-linux-nat.c (fill_gregset): Call regcache_raw_collect
14406         for a single specified register or for all registers in
14407         a0_base..a0_base + C0_NREGS range.
14408         (supply_gregset_reg): Call regcache_raw_supply for a single
14409         specified register or for all registers in a0_base..a0_base +
14410         C0_NREGS range.
14411
14412 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
14413
14414         * arch/xtensa.h (C0_NREGS): Add definition.
14415         * xtensa-tdep.c (C0_NREGS): Remove definition.
14416
14417 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
14418
14419         * xtensa-tdep.c (xtensa_scan_prologue, call0_analyze_prologue):
14420         Drop xtensa_default_isa initialization.
14421         (xtensa_gdbarch_init): Initialize xtensa_default_isa.
14422
14423 2017-03-27  Pedro Alves  <palves@redhat.com>
14424
14425         * dwarf2read.c (file_entry) <dir_index>: Add comment.
14426         (file_entry::include_dir): New method.
14427         (line_header::include_dir_at, line_header::file_name_at): New
14428         methods.
14429         (setup_type_unit_groups, setup_type_unit_groups)
14430         (psymtab_include_file_name): Simplify using the new methods.
14431         (lnp_state_machine) <the_line_header>: New field.
14432         <file>: Add comment.
14433         (lnp_state_machine::current_file): New method.
14434         (dwarf_record_line): Simplify using the new methods.
14435         (init_lnp_state_machine): Initialize the "the_line_header" field.
14436         (dwarf_decode_lines_1, dwarf_decode_lines, file_file_name):
14437         Simplify using the new methods.
14438
14439 2017-03-27  Pedro Alves  <palves@redhat.com>
14440
14441         * cp-name-parser.y (make_empty): Delete.
14442         (demangler_special, nested_name, ptr_operator, array_indicator)
14443         (direct_declarator, declarator_1): Use fill_comp instead of
14444         make_empty.
14445
14446 2017-03-27  Pedro Alves  <palves@redhat.com>
14447
14448         * xml-support.h (gdb_xml_debug): Pass a "first-to-check" argument
14449         to ATTRIBUTE_PRINTF.
14450         * solib-target.c (library_list_start_list): Print "string" not
14451         "version".
14452         * xml-tdesc.c (tdesc_start_field): Pass "field_name" to
14453         gdb_xml_error call.
14454
14455 2017-03-27  Pedro Alves  <palves@redhat.com>
14456
14457         * dwarf2read.c (struct file_and_directory): New.
14458         (dwarf2_get_dwz_file): Adjust to use std::string.
14459         (dw2_get_file_names_reader): Adjust to use file_and_directory.
14460         (find_file_and_directory): Adjust to return a file_and_directory
14461         object.
14462         (read_file_scope): Adjust to use file_and_directory.  Remove
14463         make_cleanup/do_cleanups calls.
14464         (open_and_init_dwp_file): Adjust to use std::string.  Remove
14465         make_cleanup/do_cleanups calls.
14466         * python/python.c (do_start_initialization): Adjust to ldirname
14467         returning a std::string.
14468         * utils.c (ldirname): Now returns a std::string.
14469         * utils.h (ldirname): Change return type to std::string.
14470         * xml-syscall.c (xml_init_syscalls_info): Adjust to ldirname
14471         returning a std::string.
14472         * xml-tdesc.c (file_read_description_xml): Likewise.
14473
14474 2017-03-24  Alan Hayward  <alan.hayward@arm.com>
14475
14476         * regcache.c (regcache_debug_print_register): New function.
14477         * regcache.h (regcache_debug_print_register): New declaration.
14478         * target.c (debug_print_register): Remove.
14479         (target_fetch_registers): Call regcache_debug_print_register.
14480         (target_store_registers): Likewise.
14481
14482 2017-03-24  Pádraig Brady  <pbrady@fb.com>
14483
14484         * dwarf2read.c (setup_type_unit_groups): Ensure dir_index doesn't
14485         reference beyond the 'lh->include_dirs' array before accessing to
14486         it.
14487         (psymtab_include_file_name): Likewise.
14488         (dwarf_decode_lines_1): Likewise.
14489         (dwarf_decode_lines): Likewise.
14490         (file_file_name): Likewise.
14491
14492 2017-03-23  Simon Marchi  <simon.marchi@ericsson.com>
14493
14494         * fbsd-tdep.c (fbsd_corefile_thread): Don't set/restore
14495         inferior_ptid.
14496         * proc-service.c (ps_lgetregs, ps_lsetregs, ps_lgetfpregs,
14497         ps_lsetfpregs): Likewise.
14498         * regcache.c (regcache_raw_update, regcache_raw_write): Likewise.
14499         * sol-thread.c (ps_lgetregs, ps_lsetregs, ps_lgetfpregs,
14500         ps_lsetfpregs): Likewise.
14501         * target.c (target_fetch_registers, target_store_registers):
14502         Remove asserts.
14503
14504 2017-03-23  Alan Hayward  <alan.hayward@arm.com>
14505
14506         * sol-thread.c (sol_thread_store_registers): Remove regcache calls.
14507
14508 2017-03-23  Yao Qi  <yao.qi@linaro.org>
14509
14510         * aarch64-tdep.c (aarch64_process_record_test): Declare.
14511         (_initialize_aarch64_tdep): Register it.
14512         (aarch64_record_load_store): Handle PRFM instruction.
14513         (aarch64_process_record_test): New function.
14514
14515 2017-03-23  Yao Qi  <yao.qi@linaro.org>
14516
14517         * aarch64-tdep.c (aarch64_record_load_store): Fix code
14518         indentation.
14519
14520 2017-03-23  Yao Qi  <yao.qi@linaro.org>
14521
14522         * aarch64-tdep.c: Remove AARCH64_RECORD_FAILURE.
14523
14524 2017-03-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
14525
14526         python/python.c (do_start_initialization): Fix memory leak.
14527
14528 2017-03-22  Simon Marchi  <simon.marchi@polymtl.ca>
14529
14530         * inf-ptrace.c (inf_ptrace_xfer_partial): Get pid from ptid
14531         using get_ptrace_pid.
14532         * linux-nat.c (linux_nat_xfer_partial): Don't set/restore
14533         inferior_ptid.
14534         (linux_proc_xfer_partial, linux_proc_xfer_spu): Use lwp of
14535         inferior_ptid instead of pid.
14536
14537 2017-03-22  Yao Qi  <yao.qi@linaro.org>
14538
14539         * aarch64-tdep.c: Wrap locally used classes in anonymous
14540         namespace.
14541         * arm-tdep.c: Likewise.
14542         * linespec.c: Likewise.
14543         * ui-out.c: Likewise.
14544
14545 2017-03-22  Jonah Graham  <jonah@kichwacoders.com>
14546
14547         PR gdb/19637
14548         * python/lib/gdb/printer/bound_registers.py: Import sys.
14549
14550 2017-03-21  Simon Marchi  <simon.marchi@ericsson.com>
14551
14552         * windows-nat.c (do_windows_fetch_inferior_registers): Add
14553         windows_thread_info parameter and use it instead of
14554         current_thread.
14555         (windows_fetch_inferior_registers): Don't set current_thread,
14556         pass the thread to do_windows_fetch_inferior_registers.  Use
14557         ptid from regcache instead of inferior_ptid.
14558         (do_windows_store_inferior_registers): Add windows_thread_info
14559         parameter and use it instead of current_thread.
14560         (windows_store_inferior_registers): Don't set current_thread,
14561         pass the thread to do_windows_store_inferior_registers.  Use
14562         ptid from regcache instead of inferior_ptid.
14563
14564 2017-03-21  Simon Marchi  <simon.marchi@ericsson.com>
14565
14566         * ser-mingw.c (ser_windows_raw): Remove reference to
14567         struct serial::current_timeout.
14568
14569 2017-03-21  Ivo Raisr  <ivo.raisr@oracle.com>
14570
14571         PR tdep/20928
14572         * gdb/sparc-tdep.h (gdbarch_tdep) <sparc64_ccr_type>: New field.
14573         * gdb/sparc64-tdep.c (sparc64_ccr_type): New function.
14574         (sparc64_fsr_type): Fix %fsr decoding.
14575
14576 2017-03-21  Tim Wiederhake  <tim.wiederhake@intel.com>
14577
14578         * python/py-record-btrace.c (btpy_insn_data): Change return type
14579         for Python 2.
14580
14581 2017-03-20  Simon Marchi  <simon.marchi@polymtl.ca>
14582
14583         * spu-linux-nat.c (spu_fetch_inferior_registers,
14584         spu_store_inferior_registers): Use ptid from regcache, set and
14585         restore inferior_ptid.
14586         * spu-multiarch.c (spu_fetch_registers, spu_store_registers):
14587         Likewise.
14588
14589 2017-03-20  Simon Marchi  <simon.marchi@polymtl.ca>
14590
14591         * i386-linux-nat.c (fetch_register, store_register,
14592         i386_linux_fetch_inferior_registers,
14593         i386_linux_store_inferior_registers): Use ptid from regcache.
14594         * ia64-linux-nat.c (ia64_linux_fetch_register,
14595         ia64_linux_store_register): Likewise.
14596         * inf-ptrace.c (inf_ptrace_fetch_register,
14597         inf_ptrace_store_register): Likewise.
14598         * m32r-linux-nat.c (m32r_linux_fetch_inferior_registers,
14599         m32r_linux_store_inferior_registers): Likewise.
14600         * m68k-bsd-nat.c (m68kbsd_fetch_inferior_registers,
14601         m68kbsd_store_inferior_registers): Likewise.
14602         * m68k-linux-nat.c (fetch_register, store_register,
14603         m68k_linux_fetch_inferior_registers,
14604         m68k_linux_store_inferior_registers): Likewise.
14605         * m88k-bsd-nat.c (m88kbsd_fetch_inferior_registers,
14606         m88kbsd_store_inferior_registers): Likewise.
14607         * mips-fbsd-nat.c (mips_fbsd_fetch_inferior_registers,
14608         mips_fbsd_store_inferior_registers): Likewise.
14609         * mips-linux-nat.c (mips64_linux_regsets_fetch_registers,
14610         mips64_linux_regsets_store_registers): Likewise.
14611         * mips-nbsd-nat.c (mipsnbsd_fetch_inferior_registers,
14612         mipsnbsd_store_inferior_registers): Likewise.
14613         * mips-obsd-nat.c (mips64obsd_fetch_inferior_registers,
14614         mips64obsd_store_inferior_registers): Likewise.
14615         * nto-procfs.c (procfs_fetch_registers, procfs_store_registers):
14616         Likewise.
14617         * ppc-fbsd-nat.c (ppcfbsd_fetch_inferior_registers,
14618         ppcfbsd_store_inferior_registers): Likewise.
14619         * ppc-linux-nat.c (ppc_linux_fetch_inferior_registers,
14620         ppc_linux_store_inferior_registers): Likewise.
14621         * ppc-nbsd-nat.c (ppcnbsd_fetch_inferior_registers,
14622         ppcnbsd_store_inferior_registers): Likewise.
14623         * ppc-obsd-nat.c (ppcobsd_fetch_registers,
14624         ppcobsd_store_registers): Likewise.
14625         * procfs.c (procfs_fetch_registers, procfs_store_registers):
14626         Likewise.
14627         * ravenscar-thread.c (ravenscar_fetch_registers,
14628         ravenscar_store_registers, ravenscar_prepare_to_store):
14629         Likewise.
14630         * record-btrace.c (record_btrace_fetch_registers,
14631         record_btrace_store_registers, record_btrace_prepare_to_store):
14632         Likewise.
14633         * remote-sim.c (gdbsim_fetch_register, gdbsim_store_register):
14634         Lookup inferior using ptid from regcache, instead of
14635         current_inferior.
14636         * remote.c (remote_fetch_registers, remote_store_registers): Use
14637         ptid from regcache.
14638         * rs6000-nat.c (fetch_register, store_register): Likewise.
14639         * s390-linux-nat.c (s390_linux_fetch_inferior_registers,
14640         s390_linux_store_inferior_registers): Likewise.
14641         * sh-nbsd-nat.c (shnbsd_fetch_inferior_registers,
14642         shnbsd_store_inferior_registers): Likewise.
14643         * sol-thread.c (sol_thread_fetch_registers,
14644         sol_thread_store_registers): Likewise.
14645         * sparc-nat.c (sparc_fetch_inferior_registers,
14646         sparc_store_inferior_registers): Likewise.
14647         * tilegx-linux-nat.c (fetch_inferior_registers,
14648         store_inferior_registers): Likewise.
14649         * vax-bsd-nat.c (vaxbsd_fetch_inferior_registers,
14650         vaxbsd_store_inferior_registers): Likewise.
14651         * xtensa-linux-nat.c (fetch_gregs, store_gregs, fetch_xtregs,
14652         store_xtregs): Likewise.
14653
14654 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
14655
14656         PR gdb/14441
14657         * NEWS: Mention support for rvalue references in GDB and python.
14658         * doc/gdb.texinfo (C Plus Plus Expressions): Mention that GDB
14659         supports both lvalue and rvalue references.
14660
14661 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
14662
14663         PR gdb/14441
14664         * gdbtypes.c (rank_one_type): Implement overloading
14665         resolution rules regarding rvalue references.
14666
14667 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
14668
14669         PR gdb/14441
14670         * aarch64-tdep.c (aarch64_type_align)
14671         (aarch64_extract_return_value, aarch64_store_return_value): Change
14672         lvalue reference type checks to general reference type checks.
14673         * amd64-tdep.c (amd64_classify): Likewise.
14674         * amd64-windows-tdep.c (amd64_windows_passed_by_integer_register):
14675         Likewise.
14676         * arm-tdep.c (arm_type_align, arm_extract_return_value)
14677         (arm_store_return_value): Likewise.
14678         * ax-gdb.c (gen_fetch, gen_cast): Likewise.
14679         * c-typeprint.c (c_print_type): Likewise.
14680         * c-varobj.c (adjust_value_for_child_access, c_value_of_variable)
14681         (cplus_number_of_children, cplus_describe_child): Likewise.
14682         * compile/compile-c-symbols.c (generate_vla_size): Likewise.
14683         * completer.c (expression_completer): Likewise.
14684         * cp-support.c (make_symbol_overload_list_adl_namespace):
14685         Likewise.
14686         * darwin-nat-info.c (info_mach_region_command): Likewise.
14687         * dwarf2loc.c (entry_data_value_coerce_ref)
14688         (value_of_dwarf_reg_entry): Likewise.
14689         * eval.c (ptrmath_type_p, evaluate_subexp_standard)
14690         (evaluate_subexp_for_address, evaluate_subexp_for_sizeof):
14691         Likewise.
14692         * findvar.c (extract_typed_address, store_typed_address):
14693         Likewise.
14694         * gdbtypes.c (rank_one_type): Likewise.
14695         * hppa-tdep.c (hppa64_integral_or_pointer_p): Likewise.
14696         * infcall.c (value_arg_coerce): Likewise.
14697         * language.c (pointer_type): Likewise.
14698         * m32c-tdep.c (m32c_reg_arg_type, m32c_m16c_address_to_pointer):
14699         Likewise.
14700         * m88k-tdep.c (m88k_integral_or_pointer_p): Likewise.
14701         * mn10300-tdep.c (mn10300_type_align): Likewise.
14702         * msp430-tdep.c (msp430_push_dummy_call): Likewise.
14703         * ppc-sysv-tdep.c (do_ppc_sysv_return_value)
14704         (ppc64_sysv_abi_push_param, ppc64_sysv_abi_return_value):
14705         Likewise.
14706         * printcmd.c (print_formatted, x_command): Likewise.
14707         * python/py-type.c (typy_get_composite, typy_template_argument):
14708         Likewise.
14709         * python/py-value.c (valpy_referenced_value)
14710         (valpy_get_dynamic_type, value_has_field): Likewise.
14711         * s390-linux-tdep.c (s390_function_arg_integer): Likewise.
14712         * sparc-tdep.c (sparc_integral_or_pointer_p): Likewise.
14713         * sparc64-tdep.c (sparc64_integral_or_pointer_p): Likewise.
14714         * spu-tdep.c (spu_scalar_value_p): Likewise.
14715         * symtab.c (lookup_symbol_aux): Likewise.
14716         * typeprint.c (whatis_exp, print_type_scalar): Likewise.
14717         * valarith.c (binop_types_user_defined_p, unop_user_defined_p):
14718         Likewise.
14719         * valops.c (value_cast_pointers, value_cast)
14720         (value_reinterpret_cast, value_dynamic_cast, value_addr, typecmp)
14721         (value_struct_elt, value_struct_elt_bitpos)
14722         (value_find_oload_method_list, find_overload_match)
14723         (value_rtti_indirect_type): Likewise.
14724         * valprint.c (val_print_scalar_type_p, generic_val_print):
14725         Likewise.
14726         * value.c (value_actual_type, value_as_address, unpack_long)
14727         (pack_long, pack_unsigned_long, coerce_ref_if_computed)
14728         (coerce_ref): Likewise.
14729         * varobj.c (varobj_get_value_type): Likewise.
14730
14731 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
14732
14733         PR gdb/14441
14734         * doc/python.texi (Types in Python): Add TYPE_CODE_RVALUE_REF to
14735         table of constants.
14736         * python/lib/gdb/command/explore.py: Support exploring values
14737         of rvalue reference types.
14738         * python/lib/gdb/types.py: Implement get_basic_type() for
14739         rvalue reference types.
14740         * python/py-type.c (pyty_codes) <TYPE_CODE_RVALUE_REF>: New
14741         constant.
14742         * python/py-value.c (valpy_getitem): Add an rvalue reference
14743         check.
14744         (valpy_reference_value): Add new parameter "refcode".
14745         (valpy_lvalue_reference_value, valpy_rvalue_reference_value):
14746         New wrappers for valpy_reference_value().
14747         * python/py-xmethods.c (gdbpy_get_xmethod_result_type)
14748         (gdbpy_invoke_xmethod): Likewise.
14749
14750 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
14751
14752         PR gdb/14441
14753         * dwarf2read.c (process_die, read_type_die_1): Handle the
14754         DW_TAG_rvalue_reference_type DIE.
14755         (read_tag_reference_type): Add new parameter "refcode".
14756
14757 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
14758
14759         PR gdb/14441
14760         * c-typeprint.c (c_print_type, c_type_print_varspec_prefix)
14761         (c_type_print_modifier, c_type_print_varspec_suffix)
14762         (c_type_print_base): Support printing rvalue reference types.
14763         * c-valprint.c (c_val_print, c_value_print): Support printing
14764         rvalue reference values.
14765
14766 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
14767
14768         PR gdb/14441
14769         * cp-name-parser.y (ptr_operator): Handle the '&&' token in
14770         typename.
14771         * cp-support.c (replace_typedefs): Handle
14772         DEMANGLE_COMPONENT_RVALUE_REFERENCE.
14773         * python/py-type.c (typy_lookup_type): Likewise.
14774
14775 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
14776
14777         PR gdb/14441
14778         * c-exp.y (ptr_operator): Handle the '&&' token in the typename.
14779         * parse.c (insert_type): Change assert statement.
14780         (follow_types): Handle rvalue reference types.
14781         * parser-defs.h (enum type_pieces) <tp_rvalue_reference>: New
14782         constant.
14783
14784 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
14785
14786         PR gdb/14441
14787         * ada-lang.c (ada_evaluate_subexp): Adhere to the new
14788         value_ref() interface.
14789         * c-valprint.c (c_value_print): Likewise.
14790         * infcall.c (value_arg_coerce): Likewise.
14791         * python/py-value.c (valpy_reference_value): Likewise.
14792         * valops.c (value_cast, value_reinterpret_cast)
14793         (value_dynamic_cast, typecmp): Likewise.
14794         (value_ref): Parameterize by kind of return value reference type.
14795         * value.h (value_ref): Add new parameter "refcode".
14796
14797 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
14798
14799         PR gdb/14441
14800         * dwarf2read.c (read_tag_reference_type): Use
14801         lookup_lvalue_reference_type() instead of lookup_reference_type().
14802         * eval.c (evaluate_subexp_standard): Likewise.
14803         * f-exp.y: Likewise.
14804         * gdbtypes.c (make_reference_type, lookup_reference_type):
14805         Generalize with rvalue reference types.
14806         (lookup_lvalue_reference_type, lookup_rvalue_reference_type): New
14807         convenience wrappers for lookup_reference_type().
14808         * gdbtypes.h (make_reference_type, lookup_reference_type): Add a
14809         reference kind parameter.
14810         (lookup_lvalue_reference_type, lookup_rvalue_reference_type): Add
14811         wrappers for lookup_reference_type().
14812         * guile/scm-type.c (gdbscm_type_reference): Use
14813         lookup_lvalue_reference_type() instead of lookup_reference_type().
14814         * guile/scm-value.c (gdbscm_value_dynamic_type): Likewise.
14815         * parse.c (follow_types): Likewise.
14816         * python/py-type.c (typy_reference, typy_lookup_type): Likewise.
14817         * python/py-value.c (valpy_get_dynamic_type, valpy_getitem):
14818         Likewise.
14819         * python/py-xmethods.c (gdbpy_get_xmethod_result_type)
14820         (gdbpy_invoke_xmethod): Likewise.
14821         * stabsread.c: Provide extra argument to make_reference_type()
14822         call.
14823         * valops.c (value_ref, value_rtti_indirect_type): Use
14824         lookup_lvalue_reference_type() instead of lookup_reference_type().
14825
14826 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
14827
14828         PR gdb/14441
14829         * gdbtypes.h (enum type_code) <TYPE_CODE_RVALUE_REF>: New constant.
14830         (TYPE_IS_REFERENCE): New macro.
14831         (struct type): Add rvalue_reference_type field.
14832         (TYPE_RVALUE_REFERENCE_TYPE): New macro.
14833
14834 2017-03-20  Marc-Andre Laperle  <marc-andre.laperle@ericsson.com>
14835
14836         * NEWS: Add an entry about new '-file-list-shared-libraries' command.
14837         * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries):
14838         New function definition.
14839         * mi/mi-cmds.c (mi_cmds): Add -file-list-shared-libraries command.
14840         * mi/mi-cmds.h (mi_cmd_file_list_shared_libraries):
14841         New function declaration.
14842         * mi/mi-interp.c (mi_output_solib_attribs): New Function.
14843         * mi/mi-interp.h: New file.
14844         * solib.c (info_sharedlibrary_command): Replace for loop with
14845         ALL_SO_LIBS macro
14846         * solib.h (update_solib_list): New function declaration.
14847         (so_list_head): Move macro.
14848         * solist.h (ALL_SO_LIBS): New macro.
14849
14850 2017-03-20  Marc-Andre Laperle  <marc-andre.laperle@ericsson.com>
14851
14852         * infcmd.c (post_create_inferior): Remove unused argument in
14853         call to solib_add.
14854         * remote.c (remote_start_remote): Likewise.
14855         * solib-frv.c (frv_fetch_objfile_link_map): Likewise.
14856         * solib-svr4.c: (svr4_fetch_objfile_link_map): Likewise.
14857         (enable_break): Likewise.
14858         * solib.c (update_solib_list): Remove unused target argument
14859         and its documentation.
14860         (solib_add): Remove unused target argument.  Remove unused
14861         argument in call to update_solib_list.
14862         (info_sharedlibrary_command): Remove unused argument in call
14863         to update_solib_list.
14864         (sharedlibrary_command): Remove unused argument in call to
14865         solib_add.
14866         (handle_solib_event): Likewise.
14867         (reload_shared_libraries): Likewise.
14868         * solib.h (solib_add): Remove unused target argument.
14869
14870 2017-03-20  Andreas Arnez  <arnez@linux.vnet.ibm.com>
14871
14872         * s390-linux-tdep.c (is_rsi, is_rie): Remove functions.
14873         (s390_displaced_step_fixup): Cover relative branches with the
14874         default fixup handling.  This fixes lack of support for some
14875         relative branch instructions.
14876
14877 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
14878
14879         * i386-gnu-nat.c (gnu_fetch_registers, gnu_store_registers): Use
14880         ptid from regcache.
14881
14882 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
14883
14884         * i386-darwin-nat.c (i386_darwin_fetch_inferior_registers,
14885         i386_darwin_store_inferior_registers): Use ptid from regcache.
14886
14887 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
14888
14889         * i386-bsd-nat.c (i386bsd_fetch_inferior_registers,
14890         i386bsd_store_inferior_registers): Use ptid from regcache.
14891
14892 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
14893
14894         * hppa-obsd-nat.c (hppaobsd_fetch_registers,
14895         hppaobsd_store_registers): Use ptid from regcache.
14896
14897 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
14898
14899         * hppa-nbsd-nat.c (hppanbsd_fetch_registers,
14900         hppanbsd_store_registers): Use ptid from regcache.
14901
14902 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
14903
14904         * hppa-linux-nat.c (fetch_register, store_register): Use ptid
14905         from regcache.  Use get_ptrace_pid.
14906
14907 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
14908
14909         * corelow.c (get_core_register_section): Use ptid from regcache,
14910         update doc.
14911
14912 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
14913
14914         * bsd-uthread.c (bsd_uthread_fetch_registers,
14915         bsd_uthread_store_registers): Use ptid from regcache, set and
14916         restore inferior_ptid.
14917
14918 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
14919
14920         * arm-nbsd-nat.c (fetch_register, fetch_regs, fetch_fp_register,
14921         fetch_fp_regs, store_register, store_regs, store_fp_register,
14922         store_fp_regs): Use ptid from regcache.
14923
14924 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
14925
14926         * arm-linux-nat.c (fetch_fpregs, store_fpregs, fetch_regs,
14927         store_regs, fetch_wmmx_regs, store_wmmx_regs, fetch_vfp_regs,
14928         store_vfp_regs): Use ptid from regcache.
14929
14930 2017-03-17  Pedro Alves  <palves@redhat.com>
14931
14932         PR remote/21188
14933         * ser-base.c (ser_base_wait_for): Add comment.
14934         (do_ser_base_readchar): Improve comment based on the ser-unix.c's
14935         version.
14936         * ser-unix.c (hardwire_raw): Remove reference to
14937         scb->current_timeout.
14938         (wait_for, do_hardwire_readchar, hardwire_readchar): Delete.
14939         (hardwire_ops): Install ser_base_readchar instead of
14940         hardwire_readchar.
14941         * serial.h (struct serial) <current_timeout, timeout_remaining>:
14942         Remove fields.
14943
14944 2017-03-17  Jonah Graham  <jonah@kichwacoders.com>
14945
14946         PR gdb/19637
14947         * python/lib/gdb/printer/bound_registers.py: Add support for
14948         Python 3.
14949
14950 2017-03-16  Andreas Arnez  <arnez@linux.vnet.ibm.com>
14951
14952         * dwarf2loc.c (indirect_synthetic_pointer): Get data type of
14953         pointed-to DIE and pass it to dwarf2_evaluate_loc_desc_full.
14954         (dwarf2_evaluate_loc_desc_full): New parameter subobj_type; rename
14955         byte_offset to subobj_byte_offset.  Fix the handling of
14956         DWARF_VALUE_STACK on big-endian targets when coming via an
14957         implicit pointer.
14958         (dwarf2_evaluate_loc_desc): Adjust call to
14959         dwarf2_evaluate_loc_desc_full.
14960         * dwarf2loc.h (dwarf2_fetch_die_type_sect_off): New declaration.
14961         * dwarf2read.c (dwarf2_fetch_die_type_sect_off): New function.
14962
14963 2017-03-16  Yao Qi  <yao.qi@linaro.org>
14964
14965         * arm-tdep.c (thumb_record_misc): Decode CBNZ, CBZ, REV16,
14966         and REVSH instructions.
14967
14968 2017-03-16  Yao Qi  <yao.qi@linaro.org>
14969
14970         * arm-tdep.c [GDB_SELF_TEST]: include "selftests.h".
14971         (arm_record_test): Declare.
14972         (_initialize_arm_tdep) [GDB_SELF_TEST]: call register_self_test.
14973         (thumb_record_ld_st_reg_offset): Rewrite the opcode matching to
14974         align with the manual.
14975         (thumb_record_misc): Adjust the code order to align with the
14976         manual.
14977         (thumb2_record_decode_insn_handler): Fix instruction matching.
14978         (instruction_reader_thumb): New class.
14979         (arm_record_test): New function.
14980
14981 2017-03-16  Yao Qi  <yao.qi@linaro.org>
14982
14983         * arm-tdep.c (abstract_memory_reader): New class.
14984         (instruction_reader): New class.
14985         (extract_arm_insn): Add argument 'reader'.  Callers updated.
14986         (decode_insn): Likewise.
14987
14988 2017-03-16  Doug Evans  <dje@google.com>
14989
14990         * guile/scm-lazy-string.c (lazy_string_smob): Clarify use of LENGTH
14991         member.  Change type of TYPE member to SCM.  All uses updated.
14992         (lsscm_make_lazy_string_smob): Add assert.
14993         (lsscm_make_lazy_string): Flag bad length values.
14994         (lsscm_elt_type): New function.
14995         (gdbscm_lazy_string_to_value): Rewrite to use
14996         lsscm_safe_lazy_string_to_value.
14997         (lsscm_safe_lazy_string_to_value): Fix handling of TYPE_CODE_PTR.
14998         * guile/scm-value.c (gdbscm_value_to_lazy_string): Flag bad length
14999         values.  Fix TYPE_CODE_PTR.  Handle TYPE_CODE_ARRAY.  Handle typedefs
15000         in incoming type.
15001         * guile/guile-internal.h (tyscm_scm_to_type): Declare.
15002         * guile/scm-type.c (tyscm_scm_to_type): New function.
15003
15004 2017-03-15  Doug Evans  <dje@google.com>
15005
15006         PR python/17728, python/18439, python/18779
15007         * python/py-lazy-string.c (lazy_string_object): Clarify use of LENGTH
15008         member.  Change type of TYPE member to PyObject *.  All uses updated.
15009         (stpy_convert_to_value): Fix handling of TYPE_CODE_PTR.
15010         (gdbpy_create_lazy_string_object): Flag bad length values.
15011         Handle TYPE_CODE_ARRAY with possibly different user-provided length.
15012         Handle typedefs in incoming type.
15013         (stpy_lazy_string_elt_type): New function.
15014         (gdbpy_extract_lazy_string): Call it.
15015         * python/py-value.c (valpy_lazy_string): Flag bad length values.
15016         Fix handling of TYPE_CODE_PTR.  Handle TYPE_CODE_ARRAY.  Handle
15017         typedefs in incoming type.
15018
15019 2017-03-16  Doug Evans  <dje@google.com>
15020
15021         * guile/guile-internal.h (tyscm_scm_to_type): Declare.
15022         * guile/scm-type.c (tyscm_scm_to_type): New function.
15023
15024 2017-03-16  Jiong Wang  <jiong.wang@arm.com>
15025
15026         * inf-ptrace.c (inf_ptrace_peek_poke): Change the type to
15027         "ULONGEST" for "skip".
15028
15029 2017-03-14  Andreas Arnez  <arnez@linux.vnet.ibm.com>
15030
15031         PR gdb/21220
15032         * inf-ptrace.c (inf_ptrace_xfer_partial): In "case
15033         TARGET_OBJECT_MEMORY", extract the logic for ptrace peek/poke...
15034         (inf_ptrace_peek_poke): ...here.  New function.  Now also loop
15035         over ptrace peek/poke until end of buffer or error.
15036
15037 2017-03-14  Simon Marchi  <simon.marchi@ericsson.com>
15038
15039         * parse.c (length_of_subexp): Make static.
15040         * parser-defs.h (length_of_subexp): Remove.
15041
15042 2017-03-14  Andreas Arnez  <arnez@linux.vnet.ibm.com>
15043
15044         * linux-nat.c (linux_proc_xfer_partial): Handle write operations
15045         as well.
15046
15047 2017-03-14  Pedro Alves  <palves@redhat.com>
15048
15049         * cp-name-parser.y (cp_demangled_name_to_comp): Update comment.
15050         (main): Use std::unique_ptr.  Remove calls to
15051         cp_demangled_name_parse_free.
15052
15053 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
15054
15055         * alpha-bsd-nat.c (alphabsd_fetch_inferior_registers,
15056         alphabsd_store_inferior_registers): Use regcache->ptid instead
15057         of inferior_ptid.
15058
15059 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
15060
15061         * aix-thread.c (aix_thread_fetch_registers,
15062         aix_thread_store_registers): Use regcache->ptid instead of
15063         inferior_ptid.
15064
15065 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
15066
15067         * aarch64-linux-nat.c (fetch_gregs_from_thread,
15068         store_gregs_to_thread, fetch_fpregs_from_thread,
15069         store_fpregs_to_thread): Use regcache->ptid instead of
15070         inferior_ptid.
15071
15072 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
15073
15074         * amd64-linux-nat.c (amd64_linux_fetch_inferior_registers,
15075         amd64_linux_fetch_inferior_registers): Use regcache->ptid
15076         instead of inferior_ptid.
15077
15078 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
15079
15080         * target.c (target_fetch_registers, target_store_registers): Add
15081         assert.
15082
15083 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
15084
15085         * regcache.h (regcache_get_ptid): New function.
15086         * regcache.c (regcache_get_ptid): New function.
15087
15088 2017-03-13  Mark Wielaard  <mark@klomp.org>
15089
15090         * cp-name-parser.y (make_empty): Initialize d_printing to zero.
15091
15092 2017-03-10  Keith Seitz  <keiths@redhat.com>
15093
15094         PR c++/8218
15095         * c-typeprint.c (cp_type_print_method_args): Skip artificial arguments.
15096
15097 2017-03-08  Pedro Alves  <palves@redhat.com>
15098
15099         PR gdb/18360
15100         * infrun.c (start_step_over, do_target_resume, resume)
15101         (restart_threads): Assert we're not resuming a thread that is
15102         meant to be stopped.
15103         (infrun_thread_stop_requested_callback): Delete.
15104         (infrun_thread_stop_requested): If the thread is internally
15105         stopped, queue a pending stop event and clear the thread's
15106         inline-frame state.
15107         (handle_stop_requested): New function.
15108         (handle_syscall_event, handle_inferior_event_1): Use
15109         handle_stop_requested.
15110         (handle_stop_requested): New function.
15111         (handle_signal_stop): Set the thread's stop_signal here instead of
15112         at caller.
15113         (finish_step_over): Clear step over info unconditionally.
15114         (handle_signal_stop): If the user had interrupted the event
15115         thread, consider the stop a random signal.
15116         (handle_signal_stop) <signal arrived while stepping over
15117         breakpoint>: Don't restart threads here.
15118         (stop_waiting): Don't clear step-over info here.
15119
15120 2017-03-08  Pedro Alves  <palves@redhat.com>
15121
15122         PR 21206
15123         * common/gdb_unlinker.h (unlinker::unlinker): Attribute nonnull
15124         goes to argument 2, not 1.
15125
15126 2017-03-08  Pedro Alves  <palves@redhat.com>
15127
15128         PR cli/21218
15129         * top.c (gdb_readline_wrapper): Avoid passing NULL to
15130         display_gdb_prompt.
15131         (command_line_input): Add comment.
15132
15133 2017-03-08  Pedro Alves  <palves@redhat.com>
15134
15135         PR tui/21216
15136         * tui/tui-file.c (tui_file::write): New.
15137         * tui/tui-file.h (tui_file): Override "write".
15138         * tui/tui-io.c (do_tui_putc, update_start_line): New functions,
15139         factored out from ...
15140         (tui_puts): ... here.
15141         (tui_putc): Use them.
15142         (tui_write): New function.
15143         * tui/tui-io.h (tui_write): Declare.
15144
15145 2017-03-07  Sergio Durigan Junior  <sergiodj@redhat.com>
15146
15147         * Makefile.in (SFILES): Replace "environ.c" with
15148         "common/environ.c".
15149         (HFILES_NO_SRCDIR): Likewise, for "environ.h".
15150         * environ.c: Include "common-defs.h" instead of "defs.h.  Moved
15151         to...
15152         * common/environ.c: ... here.
15153         * environ.h: Moved to...
15154         * common/environ.h: ... here.
15155
15156 2017-03-07  Peter Bergner  <bergner@vnet.ibm.com>
15157
15158         * gdbarch.sh (pstring_ptr): New static function.
15159         (gdbarch_disassembler_options): Use it.
15160         (gdbarch_verify_disassembler_options): Print valid_disassembler_options,
15161         not valid_disassembler_option->name.
15162         * gdbarch.c: Regenerate.
15163
15164 2017-03-07  Peter Bergner  <bergner@vnet.ibm.com>
15165
15166         * config/powerpc/ppc64-linux.mh (MH_CFLAGS): Delete.
15167
15168 2017-03-07  Pedro Alves  <palves@redhat.com>
15169
15170         * tui/tui-regs.c (tui_restore_gdbout): Don't delete gdb_stdout.
15171
15172 2017-03-07  Walfred Tedeschi  <walfred.tedeschi@intel.com>
15173
15174         * i387-tdep.h (i387_reset_bnd_regs): Add function definition.
15175         * i387-tdep.c (i387_reset_bnd_regs): Add function implementation.
15176         * i386-tdep.c (i386_push_dummy_call): Call i387_reset_bnd_regs.
15177         * amd64-tdep.c (amd64_push_dummy_call): Call i387_reset_bnd_regs.
15178
15179 2017-03-06  Simon Marchi  <simon.marchi@ericsson.com>
15180
15181         * xtensa-linux-nat.c (fetch_gregs): Remove const.
15182
15183 2017-03-03  Simon Marchi  <simon.marchi@ericsson.com>
15184
15185         * remote.c (remote_add_target_side_commands): Use range-based
15186         for loop.
15187
15188 2017-03-03  Yao Qi  <yao.qi@linaro.org>
15189
15190         PR gdb/21165
15191         * ada-valprint.c (ada_val_print_ref): Call value_fetch_lazy if
15192         value is lazy.
15193         * valprint.c (common_val_print): Likewise.
15194
15195 2017-02-28  Peter Bergner  <bergner@vnet.ibm.com>
15196
15197         * NEWS: Mention new set/show disassembler-options commands.
15198         * doc/gdb.texinfo: Document new set/show disassembler-options commands.
15199         * disasm.c: Include "arch-utils.h", "gdbcmd.h" and "safe-ctype.h".
15200         (prospective_options): New static variable.
15201         (gdb_disassembler::gdb_disassembler): Initialize
15202         m_di.disassembler_options.
15203         (gdb_buffered_insn_length_init_dis): Initilize di->disassembler_options.
15204         (get_disassembler_options): New function.
15205         (set_disassembler_options): Likewise.
15206         (set_disassembler_options_sfunc): Likewise.
15207         (show_disassembler_options_sfunc): Likewise.
15208         (disassembler_options_completer): Likewise.
15209         (_initialize_disasm): Likewise.
15210         * disasm.h (get_disassembler_options): New prototype.
15211         (set_disassembler_options): Likewise.
15212         * gdbarch.sh (gdbarch_disassembler_options): New variable.
15213         (gdbarch_verify_disassembler_options): Likewise.
15214         * gdbarch.c: Regenerate.
15215         * gdbarch.h: Likewise.
15216         * arm-tdep.c (num_disassembly_options): Delete.
15217         (set_disassembly_style): Likewise.
15218         (arm_disassembler_options): New static variable.
15219         (set_disassembly_style_sfunc): Convert short style name into long
15220         option name.  Call set_disassembler_options.
15221         (show_disassembly_style_sfunc): New function.
15222         (arm_gdbarch_init): Call set_gdbarch_disassembler_options and
15223         set_gdbarch_verify_disassembler_options.
15224         (_initialize_arm_tdep): Delete regnames variable and update callers.
15225         (arm_disassembler_options): Initialize.
15226         (disasm_options): New variable.
15227         (num_disassembly_options): Rename from this...
15228         (num_disassembly_styles): ...to this.  Compute by scanning through
15229         disasm_options.
15230         (valid_disassembly_styles): Initialize using disasm_options.
15231         Remove calls to parse_arm_disassembler_option, get_arm_regnames and
15232         set_arm_regname_option.
15233         Pass show_disassembly_style_sfunc to the "disassembler" setshow command.
15234         * rs6000-tdep.c (powerpc_disassembler_options): New static variable.
15235         (rs6000_gdbarch_init): Call set_gdbarch_disassembler_options and
15236         set_gdbarch_verify_disassembler_options.
15237         * s390-tdep.c (s390_disassembler_options): New static variable.
15238         (s390_gdbarch_init):all set_gdbarch_disassembler_options and
15239         set_gdbarch_verify_disassembler_options.
15240
15241 2017-02-27  Simon Marchi  <simon.marchi@ericsson.com>
15242
15243         * remote.c (remote_add_target_side_condition): Remove "struct"
15244         keyword from range-based for loop.
15245
15246 2017-02-27  Simon Marchi  <simon.marchi@ericsson.com>
15247
15248         * remote.c (remote_add_target_side_condition): Use range-based
15249         for loop.  Update comment.
15250
15251 2017-02-27  Yao Qi  <yao.qi@linaro.org>
15252
15253         * f-typeprint.c (f_print_type): Check "varstring" is empty first.
15254
15255 2017-02-26  Alan Hayward  <alan.hayward@arm.com>
15256
15257         * regcache.c (regcache_raw_update): New function.
15258         (regcache_raw_read): Move code to regcache_raw_update.
15259         * regcache.h (regcache_raw_update): New declaration.
15260         * remote.c (remote_prepare_to_store): Call regcache_raw_update.
15261
15262 2017-02-26  Jan Kratochvil  <jan.kratochvil@redhat.com>
15263
15264         * dwarf2read.c (create_debug_type_hash_table): Initialize
15265         header.signature and header.type_offset_in_tu.
15266
15267 2017-02-24  Pedro Alves  <palves@redhat.com>
15268
15269         * symtab.c (make_file_symbol_completion_list_1): Use
15270         add_symtab_completions.
15271
15272 2017-02-24  Alan Hayward  <alan.hayward@arm.com>
15273
15274         * stack.c (frame_info): Use frame_unwind_register_value to avoid buf.
15275
15276 2017-02-24  Alan Hayward  <alan.hayward@arm.com>
15277
15278         * i386-tdep.c (i386_pseudo_register_read_into_value): Use
15279         I386_MAX_REGISTER_SIZE.
15280         (i386_pseudo_register_write): Likewise.
15281         (i386_process_record): Likewise.
15282         * i387-tdep.c (i387_supply_xsave): Likewise.
15283         * m68k-linux-nat.c (fetch_register): Use M68K_MAX_REGISTER_SIZE.
15284         (store_register): Likewise.
15285
15286 2017-02-23  Pedro Alves  <palves@redhat.com>
15287
15288         * ada-lang.c: Include "common/function-view.h".
15289         (ada_iterate_over_symbols): Adjust to use function_view as
15290         callback type.
15291         (struct add_partial_datum, ada_complete_symbol_matcher): Delete.
15292         (ada_make_symbol_completion_list): Use a lambda.
15293         (ada_exc_search_name_matches): Delete.
15294         (name_matches_regex): New.
15295         (ada_add_global_exceptions): Use a lambda and name_matches_regex.
15296         * compile/compile-c-support.c: Include "common/function-view.h".
15297         (print_one_macro): Change prototype to accept a ui_file pointer.
15298         (write_macro_definitions): Use a lambda.
15299         * dwarf2read.c: Include "common/function-view.h".
15300         (dw2_map_expand_apply, dw2_map_symtabs_matching_filename)
15301         (dw2_expand_symtabs_matching): Adjust to use function_view as
15302         callback type.
15303         * language.h: Include "common/function-view.h".
15304         (struct language_defn) <la_iterate_over_symbols>: Adjust to use
15305         function_view as callback type.
15306         (LA_ITERATE_OVER_SYMBOLS): Remove DATA parameter.
15307         * linespec.c: Include "common/function-view.h".
15308         (collect_info::add_symbol): New method.
15309         (struct symbol_and_data_callback, iterate_inline_only, struct
15310         symbol_matcher_data, iterate_name_matcher): Delete.
15311         (iterate_over_all_matching_symtabs): Adjust to use function_view
15312         as callback type and lambdas.
15313         (iterate_over_file_blocks): Adjust to use function_view as
15314         callback type.
15315         (decode_compound_collector): Now a class with private fields.
15316         (decode_compound_collector::release_symbols): New method.
15317         (collect_one_symbol): Rename to...
15318         (decode_compound_collector::operator()): ... this and adjust.
15319         (lookup_prefix_sym): decode_compound_collector construction bits
15320         move to decode_compound_collector ctor.  Pass the
15321         decode_compound_collector object directly as callback.  Remove
15322         cleanups and use decode_compound_collector::release_symbols
15323         instead.
15324         (symtab_collector): Now a class with private fields.
15325         (symtab_collector::release_symtabs): New method.
15326         (add_symtabs_to_list): Rename to...
15327         (symtab_collector::operator()): ... this and adjust.
15328         (collect_symtabs_from_filename): symtab_collector construction
15329         bits move to symtab_collector ctor.  Pass the symtab_collector
15330         object directly as callback.  Remove cleanups and use
15331         symtab_collector::release_symtabs instead.
15332         (collect_symbols): Delete.
15333         (add_matching_symbols_to_info): Use lambdas.
15334         * macrocmd.c (print_macro_callback): Delete.
15335         (info_macro_command): Use a lambda.
15336         (info_macros_command): Pass print_macro_definition as callable
15337         directly.
15338         (print_one_macro): Remove 'ignore' parameter.
15339         (macro_list_command): Adjust.
15340         * macrotab.c (macro_for_each_data::fn): Now a function_view.
15341         (macro_for_each_data::user_data): Delete field.
15342         (foreach_macro): Adjust to call the function_view.
15343         (macro_for_each): Adjust to use function_view as callback type.
15344         (foreach_macro_in_scope): Adjust to call the function_view.
15345         (macro_for_each_in_scope): Adjust to use function_view as callback
15346         type.
15347         * macrotab.h: Include "common/function-view.h".
15348         (macro_callback_fn): Declare a prototype instead of a pointer.
15349         Remove "user_data" parameter.
15350         (macro_for_each, macro_for_each_in_scope): Adjust to use
15351         function_view as callback type.
15352         * psymtab.c (partial_map_expand_apply)
15353         (psym_map_symtabs_matching_filename, recursively_search_psymtabs):
15354         Adjust to use function_view as callback type and to return bool.
15355         (psym_expand_symtabs_matching): Adjust to use function_view as
15356         callback types.
15357         * symfile-debug.c (debug_qf_map_symtabs_matching_filename): Adjust
15358         to use function_view as callback type and to return bool.
15359         (debug_qf_expand_symtabs_matching): Adjust to use function_view as
15360         callback types.
15361         * symfile.c (expand_symtabs_matching): Adjust to use function_view
15362         as callback types.
15363         * symfile.h: Include "common/function-view.h".
15364         (expand_symtabs_file_matcher_ftype)
15365         (expand_symtabs_symbol_matcher_ftype)
15366         (expand_symtabs_exp_notify_ftype): Remove "data" parameter and
15367         return bool.
15368         (quick_symbol_functions::map_symtabs_matching_filename)
15369         (quick_symbol_functions::expand_symtabs_matching): Adjust to use
15370         function_view as callback type and return bool.
15371         (expand_symtabs_matching): Adjust to use function_view as callback
15372         type.
15373         (maintenance_expand_name_matcher)
15374         (maintenance_expand_file_matcher): Delete.
15375         (maintenance_expand_symtabs): Use lambdas.
15376         * symtab.c (iterate_over_some_symtabs): Adjust to use
15377         function_view as callback types and return bool.
15378         (iterate_over_symtabs): Likewise.  Use unique_xmalloc_ptr instead
15379         of a cleanup.
15380         (lookup_symtab_callback): Delete.
15381         (lookup_symtab): Use a lambda.
15382         (iterate_over_symbols): Adjust to use function_view as callback
15383         type.
15384         (struct search_symbols_data, search_symbols_file_matches)
15385         (search_symbols_name_matches): Delete.
15386         (search_symbols): Use a pair of lambdas.
15387         (struct add_name_data, add_macro_name, symbol_completion_matcher)
15388         (symtab_expansion_callback): Delete.
15389         (default_make_symbol_completion_list_break_on_1): Use lambdas.
15390         * symtab.h: Include "common/function-view.h".
15391         (iterate_over_some_symtabs): Adjust to use function_view as
15392         callback type and return bool.
15393         (iterate_over_symtabs): Adjust to use function_view as callback
15394         type.
15395         (symbol_found_callback_ftype): Remove 'data' parameter and return
15396         bool.
15397         (iterate_over_symbols): Adjust to use function_view as callback
15398         type.
15399
15400 2017-02-23  Pedro Alves  <palves@redhat.com>
15401
15402         * Makefile.in (SUBDIR_UNITTESTS_SRCS, SUBDIR_UNITTESTS_OBS): New.
15403         (%.o) <unittests/%.c>: New pattern.
15404         * configure.ac ($development): Add $(SUBDIR_UNITTESTS_OBS) to
15405         CONFIG_OBS, and $(SUBDIR_UNITTESTS_SRCS) to CONFIG_SRCS.
15406         * common/function-view.h: New file.
15407         * unittests/function-view-selftests.c: New file.
15408         * configure: Regenerate.
15409
15410 2017-02-23  Simon Marchi  <simon.marchi@ericsson.com>
15411
15412         * bsd-uthread.c (bsd_uthread_thread_alive): Use ptid instead of
15413         inferior_ptid.
15414         * go32-nat.c (go32_thread_alive): Likewise.
15415
15416 2017-02-23  Yao Qi  <yao.qi@linaro.org>
15417
15418         * varobj-iter.h (varobj_iter_delete): Call xfree instead of
15419         delete.
15420
15421 2017-02-23  Yao Qi  <yao.qi@linaro.org>
15422
15423         * varobj.c (varobj_clear_saved_item): Use delete instead of
15424         xfree.
15425         (update_dynamic_varobj_children): Likewise.
15426
15427 2017-02-21  Jan Kratochvil  <jan.kratochvil@redhat.com>
15428
15429         * dwarf2read.c (dwarf2_record_block_ranges): Add forgotten BASEADDR.
15430
15431 2017-02-21  Simon Marchi  <simon.marchi@ericsson.com>
15432
15433         * common/enum-flags.h (enum_flags::enum_flags): Initialize
15434         m_enum_value to 0 in default constructor.
15435
15436 2017-02-21  Edjunior Barbosa Machado  <emachado@linux.vnet.ibm.com>
15437
15438         * rs6000-tdep.c (LOAD_AND_RESERVE_MASK): Rename from LWARX_MASK.
15439         (STORE_CONDITIONAL_MASK): Rename from STWCX_MASK.
15440         (LBARX_INSTRUCTION, LHARX_INSTRUCTION, LQARX_INSTRUCTION,
15441         STBCX_INSTRUCTION, STHCX_INSTRUCTION, STQCX_INSTRUCTION): New defines.
15442         (IS_LOAD_AND_RESERVE_INSN, IS_STORE_CONDITIONAL_INSN): New macros.
15443         (ppc_displaced_step_copy_insn): Use IS_LOAD_AND_RESERVE_INSN.
15444         (ppc_deal_with_atomic_sequence): Use IS_LOAD_AND_RESERVE_INSN and
15445         IS_STORE_CONDITIONAL_INSN.
15446
15447 2017-02-21  Jan Kratochvil  <jan.kratochvil@redhat.com>
15448
15449         * dwarf2_rnglists_process: Initialize range_beginning and range_end.
15450
15451 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
15452
15453         * NEWS (Changes since GDB 7.12): Add DWARF-5.
15454
15455 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
15456
15457         * dwarf2read.c (skip_one_die, read_attribute_value)
15458         (dwarf2_const_value_attr, dump_die_shallow)
15459         (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
15460         (skip_form_bytes, attr_form_is_constant): Handle DW_FORM_data16.
15461
15462 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
15463
15464         * dwarf2read.c (read_file_scope): Rename DW_MACRO_GNU_*.
15465         (dwarf_parse_macro_header): Accept DWARF version 5.
15466         (dwarf_decode_macro_bytes, dwarf_decode_macros): Rename DW_MACRO_GNU_*.
15467
15468 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
15469
15470         * block.c (call_site_for_pc): Rename DW_OP_GNU_*, DW_TAG_GNU_* and
15471         DW_AT_GNU_*.
15472         * common/common-exceptions.h (enum errors): Likewise.
15473         * dwarf2-frame.c (class dwarf_expr_executor): Likewise.
15474         * dwarf2expr.c (dwarf_block_to_dwarf_reg)
15475         (dwarf_expr_context::execute_stack_op): Likewise.
15476         * dwarf2expr.h (struct dwarf_expr_context, struct dwarf_expr_piece):
15477         Likewise.
15478         * dwarf2loc.c (dwarf_evaluate_loc_desc::get_base_type)
15479         (dwarf_evaluate_loc_desc::push_dwarf_reg_entry_value)
15480         (show_entry_values_debug, call_site_to_target_addr)
15481         (func_addr_to_tail_call_list, func_verify_no_selftailcall)
15482         (dwarf_expr_reg_to_entry_parameter, dwarf_entry_parameter_to_value)
15483         (entry_data_value_free_closure, value_of_dwarf_reg_entry)
15484         (value_of_dwarf_block_entry, indirect_pieced_value)
15485         (symbol_needs_eval_context::push_dwarf_reg_entry_value):
15486         (disassemble_dwarf_expression): Likewise.
15487         * dwarf2read.c (process_die, inherit_abstract_dies)
15488         (read_call_site_scope): Likewise.
15489         * gdbtypes.h (struct func_type, struct call_site_parameter)
15490         (struct call_site): Likewise.
15491         * stack.c (read_frame_arg): Likewise.
15492         * std-operator.def (OP_VAR_ENTRY_VALUE): Likewise.
15493
15494 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
15495
15496         * defs.h (read_unsigned_leb128): New declaration.
15497         * dwarf2loc.c (decode_debug_loclists_addresses): New function.
15498         (decode_debug_loc_dwo_addresses): Update DEBUG_LOC_* to DW_LLE_*.
15499         (dwarf2_find_location_expression): Call also
15500         decode_debug_loclists_addresses.  Handle DWARF-5 ULEB128 length.
15501         * dwarf2loc.h (dwarf2_version): New declaration.
15502         * dwarf2read.c (struct dwarf2_per_objfile): Add loclists, line_str,
15503         rnglists.
15504         (dwarf2_elf_names): Add .debug_loclists, .debug_line_str,
15505         .debug_rnglists.
15506         (struct dwop_section_names): Add loclists_dwo.
15507         (dwop_section_names): Add .debug_loclists.dwo.
15508         (struct comp_unit_head): Add unit_type, signature, type_offset_in_tu.
15509         (struct dwarf2_per_cu_data): Add dwarf_version.
15510         (struct dwo_sections): Add loclists.
15511         (struct attr_abbrev): Add implicit_const.
15512         (read_indirect_line_string): New declaration.
15513         (read_unsigned_leb128): Delete declaration.
15514         (rcuh_kind): New definition.
15515         (read_and_check_comp_unit_head): Change parameter
15516         is_debug_types_section to section_kind.
15517         (dwarf2_locate_sections): Handle loclists, line_str and rnglists.
15518         (read_comp_unit_head): Change parameter abfd to section, add parameter
15519         section_kind.  Handle DWARF-5.
15520         (error_check_comp_unit_head): Accept also DWARF version 5.
15521         (read_and_check_comp_unit_head): Change parameter
15522         is_debug_types_section to section_kind.
15523         (read_and_check_type_unit_head): Delete function.
15524         (read_abbrev_offset): Handle DWARF-5.
15525         (create_debug_type_hash_table): Add parameter section_kind.  Process
15526         only DW_UT_type.  Use signature and type_offset_in_tu from struct
15527         comp_unit_head.
15528         (create_debug_types_hash_table): Update create_debug_type_hash_table
15529         caller.
15530         (create_all_type_units): Call create_debug_type_hash_table.
15531         (read_cutu_die_from_dwo, init_cutu_and_read_dies): Change
15532         read_and_check_type_unit_head caller to read_and_check_comp_unit_head
15533         caller.
15534         (skip_one_die): Handle DW_FORM_implicit_const.
15535         (dwarf2_rnglists_process): New function.
15536         (dwarf2_ranges_process): Call dwarf2_rnglists_process for DWARF-5.
15537         (abbrev_table_read_table): Handle DW_FORM_implicit_const.
15538         (read_attribute_value): Handle DW_FORM_implicit_const,
15539         DW_FORM_line_strp.
15540         (read_attribute): Handle DW_FORM_implicit_const.
15541         (read_indirect_string_at_offset_from): New function from
15542         read_indirect_string_at_offset.
15543         (read_indirect_string_at_offset): Call
15544         read_indirect_string_at_offset_from.
15545         (read_indirect_line_string_at_offset): New function.
15546         (read_indirect_string): New function comment.
15547         (read_indirect_line_string): New function.
15548         (read_unsigned_leb128): Make it global.
15549         (dwarf2_string_attr): Handle DWARF-5.
15550         (add_include_dir_stub, read_formatted_entries): New functions.
15551         (dwarf_decode_line_header, dump_die_shallow, cu_debug_loc_section):
15552         Handle DWARF-5.
15553         (per_cu_header_read_in): Update read_comp_unit_head caller.
15554         (dwarf2_version): New function.
15555         * symfile.h (struct dwarf2_debug_sections): Add loclists, line_str and
15556         rnglists.
15557         * xcoffread.c (dwarf2_xcoff_names): Update struct dwarf2_debug_sections
15558         fields.
15559
15560 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
15561
15562         * dwarf2read.c (abbrev_table_read_table): Read the data only once.
15563
15564 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
15565
15566         * dwarf2read.c (dwarf2_ranges_process): New function from
15567         dwarf2_ranges_read.
15568         (dwarf2_ranges_read, dwarf2_record_block_ranges): Use
15569         dwarf2_ranges_process.
15570
15571 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
15572
15573         * dwarf2read.c (create_debug_type_hash_table): New function from
15574         create_debug_types_hash_table.
15575         (create_debug_types_hash_table): Call create_debug_type_hash_table.
15576         (create_all_type_units, open_and_init_dwo_file): Update
15577         create_debug_types_hash_table callers.
15578
15579 2017-02-20  Sergio Durigan Junior  <sergiodj@redhat.com>
15580
15581         PR gdb/16188
15582         * fork-child.c (trace_start_error): Fix thinko.  va_end should
15583         refer to 'ap', not 'args'.
15584
15585 2017-02-20  Sergio Durigan Junior  <sergiodj@redhat.com>
15586             Pedro Alves  <palves@redhat.com>
15587
15588         PR gdb/16188
15589         * darwin-nat.c (darwin_ptrace_me): Check if calls to system
15590         calls succeeded.
15591         * fork-child.c (trace_start_error): New function.
15592         (trace_start_error_with_name): Likewise.
15593         * gnu-nat.c (gnu_ptrace_me): Check if call to PTRACE succeeded.
15594         * inf-ptrace.c (inf_ptrace_me): Likewise.
15595         * inferior.h (trace_start_error): New prototype.
15596         (trace_start_error_with_name): Likewise.
15597
15598 2017-02-15  Sergio Durigan Junior  <sergiodj@redhat.com>
15599
15600         PR gdb/21164
15601         * psymtab.c (maintenance_print_psymbols): Verify if 'argv' is not
15602         NULL before using it.
15603         * symmisc.c (maintenance_print_symbols): Likewise.
15604         (maintenance_print_msymbols): Likewise.
15605
15606 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
15607
15608         * NEWS: Add record Python bindings entry.
15609
15610 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
15611
15612         * Makefile.in (SUBDIR_PYTHON_OBS): Add py-record-btrace.o,
15613         py-record-full.o.
15614         (SUBDIR_PYTHON_SRCS): Add py-record-btrace.c, py-record-full.c.
15615         * python/py-record-btrace.c, python/py-record-btrace.h,
15616         python/py-record-full.c, python/py-record-full.h: New file.
15617         * python/py-record.c: Add include for py-record-btrace.h and
15618         py-record-full.h.
15619         (recpy_method, recpy_format, recpy_goto, recpy_replay_position,
15620         recpy_instruction_history, recpy_function_call_history, recpy_begin,
15621         recpy_end): Use functions from py-record-btrace.c and py-record-full.c.
15622         * python/python-internal.h (PyInt_FromSsize_t, PyInt_AsSsize_t):
15623         New definition.
15624         (gdbpy_initialize_btrace): New export.
15625         * python/python.c (_initialize_python): Add gdbpy_initialize_btrace.
15626
15627 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
15628
15629         * Makefile.in (SUBDIR_PYTHON_OBS): Add python/py-record.o.
15630         (SUBDIR_PYTHON_SRCS): Add python/py-record.c.
15631         * python/py-record.c: New file.
15632         * python/python-internal.h (gdbpy_start_recording,
15633         gdbpy_current_recording, gdpy_stop_recording,
15634         gdbpy_initialize_record): New export.
15635         * python/python.c (_initialize_python): Add gdbpy_initialize_record.
15636         (python_GdbMethods): Add gdbpy_start_recording,
15637         gdbpy_current_recording and gdbpy_stop_recording.
15638
15639 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
15640
15641         * record-btrace.c (record_btrace_record_method): New function.
15642         (init_record_btrace_ops): Initialize to_record_method.
15643         * record-full.c (record_full_record_method): New function.
15644         (init_record_full_ops, init_record_full_core_ops): Add
15645         record_full_record_method.
15646         * record.h (enum record_method): New enum.
15647         * target-debug.h (target_debug_print_enum_record_method: New define.
15648         * target-delegates.c: Regenerate.
15649         * target.c (target_record_method): New function.
15650         * target.h: Include record.h.
15651         (struct target_ops) <to_record_method>: New field.
15652         (target_record_method): New export.
15653
15654 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
15655
15656         * record.h (record_start, record_stop): New export.
15657         * record.c (record_start, record_stop): New function.
15658
15659 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
15660
15661         * btrace.c (btrace_fetch): Copy function call segments pointer
15662         into a vector.
15663         (btrace_clear): Clear the vector.
15664         (btrace_find_insn_by_number): Use binary search to find the correct
15665         function call segment.
15666         * btrace.h (brace_fun_p): New typedef.
15667         (struct btrace_thread_info) <functions>: New field.
15668
15669 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
15670
15671         * record-btrace.c (btrace_ui_out_decode_error): Move most of it ...
15672         * btrace.c (btrace_decode_error): ... here.  New function.
15673         * btrace.h (btrace_decode_error): New export.
15674
15675 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
15676
15677         * btrace.c (ftrace_call_num_insn, btrace_insn_get_error): New function.
15678         (ftrace_new_function, btrace_insn_number, btrace_insn_cmp,
15679         btrace_find_insn_by_number): Remove special case for gaps.
15680         * btrace.h (btrace_insn_get_error): New export.
15681         (btrace_insn_number, btrace_find_insn_by_number): Adjust comment.
15682         * record-btrace.c (btrace_insn_history): Print number for gaps.
15683         (record_btrace_info, record_btrace_goto): Handle gaps.
15684
15685 2017-02-14  Tom Tromey  <tom@tromey.com>
15686
15687         PR python/13598:
15688         * python/python.c (gdbpy_before_prompt_hook): Emit before_prompt
15689         event.
15690         * python/py-evts.c (gdbpy_initialize_py_events): Add
15691         before_prompt registry.
15692         * python/py-events.h (events_object) <before_prompt>: New field.
15693
15694 2017-02-14  Markus Metzger  <markus.t.metzger@intel.com>
15695
15696         * btrace.c (ftrace_new_switch): Preserve up link and flags.
15697
15698 2017-02-13  Luis Machado  <lgustavo@codesourcery.com>
15699
15700         * symfile (_initialize_symfile): Add usage text to the load command's
15701         help text.
15702
15703 2017-02-10  Simon Marchi  <simon.marchi@ericsson.com>
15704
15705         * utils.c (defaulted_query): Don't query on secondary UIs.
15706
15707 2017-02-10  Tom Tromey  <tom@tromey.com>
15708
15709         * rust-lang.c (rust_get_disr_info): Remove unused variable.
15710
15711 2017-02-10  Tom Tromey  <tom@tromey.com>
15712
15713         * python/py-value.c (valpy_richcompare_throw): Remove unnecessary
15714         "cleanup" local.
15715         * python/py-type.c (typy_legacy_template_argument): Remove
15716         unnecessary "cleanup" local.
15717
15718 2017-02-10  Tom Tromey  <tom@tromey.com>
15719
15720         * python/python.c (do_start_initialization): New function, from
15721         _initialize_python.
15722         (_initialize_python): Call do_start_initialization.
15723         * python/py-linetable.c (ltpy_iternext): Use explicit returns, not
15724         goto.
15725
15726 2017-02-10  Tom Tromey  <tom@tromey.com>
15727
15728         * python/py-prettyprint.c (pretty_print_one_value): Use
15729         gdbpy_ref.
15730
15731 2017-02-10  Tom Tromey  <tom@tromey.com>
15732
15733         * python/py-cmd.c (cmdpy_destroyer): Use gdbpy_ref.
15734         * python/py-breakpoint.c (gdbpy_breakpoint_deleted): Use
15735         gdbpy_ref.
15736         * python/py-type.c (field_new): Use gdbpy_ref.
15737         * python/py-symtab.c (symtab_and_line_to_sal_object): Use
15738         gdbpy_ref.
15739         * python/py-progspace.c (pspy_new): Use gdbpy_ref.
15740         (py_free_pspace): Likewise.
15741         (pspace_to_pspace_object): Likewise.
15742         * python/py-objfile.c (objfpy_new): Use gdbpy_ref.
15743         (py_free_objfile): Likewise.
15744         (objfile_to_objfile_object): Likewise.
15745         * python/py-inferior.c (delete_thread_object): Use
15746         gdbpy_ref.
15747         (infpy_read_memory): Likewise.
15748         (py_free_inferior): Likewise.
15749         * python/py-evtregistry.c (create_eventregistry_object): Use
15750         gdbpy_ref.
15751         * python/py-event.c (create_event_object): Use gdbpy_ref.
15752
15753 2017-02-10  Tom Tromey  <tom@tromey.com>
15754
15755         * python/py-ref.h (gdbpy_ref_policy): Now a template.
15756         (gdbpy_ref): Now a template; allow subclasses of PyObject to be
15757         used.
15758         * python/py-arch.c, python/py-bpevent.c, python/py-breakpoint.c,
15759         python/py-cmd.c, python/py-continueevent.c, python/py-event.c,
15760         python/py-exitedevent.c, python/py-finishbreakpoint.c,
15761         python/py-framefilter.c, python/py-function.c,
15762         python/py-inferior.c, python/py-infevents.c,
15763         python/py-linetable.c, python/py-newobjfileevent.c,
15764         python/py-param.c, python/py-prettyprint.c, python/py-ref.h,
15765         python/py-signalevent.c, python/py-stopevent.c,
15766         python/py-symbol.c, python/py-threadevent.c, python/py-type.c,
15767         python/py-unwind.c, python/py-utils.c, python/py-value.c,
15768         python/py-varobj.c, python/py-xmethods.c, python/python.c,
15769         varobj.c: Change gdbpy_ref to gdbpy_ref<>.
15770
15771 2017-02-10  Tom Tromey  <tom@tromey.com>
15772
15773         * ui-out.h (ui_out_emit_type): New class.
15774         (ui_out_emit_tuple, ui_out_emit_list): New typedefs.
15775         * python/py-framefilter.c (py_print_single_arg): Use gdb::optional
15776         and ui_out_emit_tuple.
15777         (enumerate_locals): Likewise.
15778         (py_mi_print_variables, py_print_locals, py_print_args): Use
15779         ui_out_emit_list.
15780         (py_print_frame): Use gdb::optional, ui_out_emit_tuple,
15781         ui_out_emit_list.
15782         * common/gdb_optional.h: New file.
15783
15784 2017-02-10  Martin Galvan  <martingalvan@sourceware.org>
15785
15786         * MAINTAINERS (Write After Approval): Update my e-mail address.
15787
15788 2017-02-10  Martin Galvan  <martingalvan@sourceware.org>
15789
15790         PR gdb/21122
15791         * breakpoint.c (_initialize_breakpoint): Update the help description
15792         of the 'commands' command to indicate that it takes a list argument.
15793
15794 2017-02-09  Simon Marchi  <simon.marchi@ericsson.com>
15795
15796         * interps.c (current_interp_set_logging): Remove "return".
15797
15798 2017-02-09  Gary Benson  <gbenson@redhat.com>
15799
15800         * symtab.c (add_symtab_completions): Prevent NULL pointer
15801         dereference.
15802
15803 2017-02-08  Pedro Alves  <palves@redhat.com>
15804
15805         * interps.c (interp::interp): Remove reference to quiet_p.
15806         (interp_set): Make static.  Remove dead "Switching to" output
15807         code.
15808         (interp_quiet_p, interp_set_quiet): Delete.
15809         (interpreter_exec_cmd): Don't set the interpreter quiet.
15810         * interps.h (interp_quiet_p): Make static.
15811         (class interp) <quiet_p>: Remove field
15812
15813 2017-02-08  Jerome Guitton  <guitton@adacore.com>
15814
15815         * cli/cli-decode.c (find_command_name_length): Make it extern.
15816         * cli/cli-decode.h (find_command_name_length): Declare.
15817         * cli/cli-script.c (command_name_equals, line_first_arg):
15818         New functions.
15819         (process_next_line): Use cli-decode to parse command names.
15820         (build_command_line): Make args a constant pointer.
15821
15822 2017-02-08  Jerome Guitton  <guitton@adacore.com>
15823
15824         * cli-decode.c (lookup_cmd_1, lookup_cmd_composition):
15825         Remove case-insensitive search.
15826
15827 2017-02-07  Jose E. Marchesi  <jose.marchesi@oracle.com>
15828
15829         * sparc-tdep.c (sparc32_gdbarch_init): Do not place a + operator
15830         at the end of the line.  Avoids an ARI warning.
15831
15832 2017-02-06  Luis Machado  <lgustavo@codesourcery.com>
15833
15834         * NEWS: Mention support for record/replay of Intel 64 rdrand and
15835         rdseed instructions.
15836         i386-tdep.c (i386_process_record): Handle Intel 64 rdrand and rseed.
15837
15838 2017-02-06  Ivo Raisr  <ivo.raisr@oracle.com>
15839
15840         PR tdep/20936
15841         Provide and use sparc32 and sparc64 target description XML files.
15842         * features/sparc/sparc32-cp0.xml, features/sparc/sparc32-cpu.xml,
15843         features/sparc/sparc32-fpu.xml: New files for sparc 32-bit.
15844         * features/sparc/sparc64-cp0.xml, features/sparc/sparc64-cpu.xml,
15845         features/sparc/sparc64-fpu.xml: New files for sparc 64-bit.
15846         * features/sparc/sparc32-solaris.xml: New file.
15847         * features/sparc/sparc64-solaris.xml: New file.
15848         * features/sparc/sparc32-solaris.c: Generated.
15849         * features/sparc/sparc64-solaris.c: Generated.
15850         * sparc-tdep.h: Account for differences in target descriptions.
15851         * sparc-tdep.c (sparc32_register_name): Use target provided registers.
15852         (sparc32_register_type): Use target provided registers.
15853         (validate_tdesc_registers): New function.
15854         (sparc32_gdbarch_init): Use tdesc_has_registers.
15855         Set pseudoregister functions.
15856         * sparc64-tdep.c (sparc64_register_name): Use target provided registers.
15857         (sparc64_register_type): Use target provided registers.
15858         (sparc64_init_abi): Set pseudoregister functions.
15859
15860 2017-02-03  Tom Tromey  <tom@tromey.com>
15861
15862         PR rust/21097:
15863         * rust-lang.c (rust_print_type) <TYPE_CODE_UNION>: Handle enums
15864         with a single member.
15865
15866 2017-02-03  Pedro Alves  <palves@redhat.com>
15867
15868         * cli/cli-interp.c (cli_interp_base::cli_interp_base)
15869         (cli_interp_base::~cli_interp_base): New.
15870         (cli_interp): New struct.
15871         (as_cli_interp): Cast the interp itself to cli_interp.
15872         (cli_interpreter_pre_command_loop): Rename to ...
15873         (cli_interp_base::pre_command_loop): ... this.  Remove 'self'
15874         parameter.
15875         (cli_interpreter_init): Rename to ...
15876         (cli_interp::init): ... this.  Remove 'self' parameter.  Use
15877         boolean.  Make extern.
15878         (cli_interpreter_resume): Rename to ...
15879         (cli_interp::resume): ... this.  Remove 'data' parameter.  Make
15880         extern.
15881         (cli_interpreter_suspend): Rename to ...
15882         (cli_interp::suspend): ... this.  Remove 'data' parameter.  Make
15883         extern.
15884         (cli_interpreter_exec): Rename to ...
15885         (cli_interp::exec): ... this.  Remove 'data' parameter.  Make
15886         extern.
15887         (cli_interpreter_supports_command_editing): Rename to ...
15888         (cli_interp_base::supports_command_editing): ... this.  Remove
15889         'interp' parameter.  Make extern.
15890         (cli_ui_out): Rename to ...
15891         (cli_interp::interp_ui_out): ... this.  Remove 'interp' parameter.
15892         Make extern.
15893         (cli_set_logging): Rename to ...
15894         (cli_interp_base::set_logging): ... this.  Remove 'interp'
15895         parameter.  Make extern.
15896         (cli_interp_procs): Delete.
15897         (cli_interp_factory): Adjust to use "new".
15898         * cli/cli-interp.h: Include "interps.h".
15899         (struct cli_interp_base): New struct.
15900         * interps.c (struct interp): Delete.  Fields moved to interps.h.
15901         (interp_new): Delete.
15902         (interp::interp, interp::~interp): New.
15903         (interp_set): Use bool, and return void.  Assume the interpreter
15904         has suspend, init and resume methods, and that the all return
15905         void.
15906         (set_top_level_interpreter): interp_set returns void.
15907         (interp_ui_out): Adapt.
15908         (current_interp_set_logging): Adapt.
15909         (interp_data): Delete.
15910         (interp_pre_command_loop, interp_supports_command_editing): Adapt.
15911         (interp_exec): Adapt.
15912         (top_level_interpreter_data): Delete.
15913         * interps.h (interp_init_ftype, interp_resume_ftype)
15914         (interp_suspend_ftype, interp_exec_ftype)
15915         (interp_pre_command_loop_ftype, interp_ui_out_ftype): Delete.
15916         (class interp): New.
15917         (interp_new): Delete.
15918         (interp_set): Now returns void.  Use bool.
15919         (interp_data, top_level_interpreter_data): Delete.
15920         * mi/mi-common.h: Include interps.h.
15921         (class mi_interp): Inherit from interp.  Define a ctor.  Declare
15922         init, resume, suspect, exec, interp_ui_out, set_logging and
15923         pre_command_loop methods.
15924         * mi/mi-interp.c (as_mi_interp): Cast the interp itself.
15925         (mi_interpreter_init): Rename to ...
15926         (mi_interp::init): ... this.  Remove the 'interp' parameter, use
15927         bool, return void and make extern.  Adjust.
15928         (mi_interpreter_resume): ... Rename to ...
15929         (mi_interp::resume): ... this.  Remove the 'data' parameter,
15930         return void and make extern.  Adjust.
15931         (mi_interpreter_suspend): ... Rename to ...
15932         (mi_interp::suspend): ... this.  Remove the 'data' parameter,
15933         return void and make extern.  Adjust.
15934         (mi_interpreter_exec): ... Rename to ...
15935         (mi_interp::exec): ... this.  Remove the 'data' parameter and make
15936         extern.  Adjust.
15937         (mi_interpreter_pre_command_loop): ... Rename to ...
15938         (mi_interp::pre_command_loop): ... this.  Remove the 'self'
15939         parameter and make extern.
15940         (mi_on_normal_stop_1): Adjust.
15941         (mi_ui_out): Rename to ...
15942         (mi_interp::interp_ui_out): ... this.  Remove the 'interp'
15943         parameter and make extern.  Adjust.
15944         (mi_set_logging): Rename to ...
15945         (mi_interp::set_logging): ... this.  Remove the 'interp'
15946         parameter and make extern.  Adjust.
15947         (mi_interp_procs): Delete.
15948         (mi_interp_factory): Adjust to use 'new'.
15949         * mi/mi-main.c (mi_cmd_gdb_exit, captured_mi_execute_command)
15950         (mi_print_exception, mi_execute_command, mi_load_progress):
15951         Adjust.
15952         * tui/tui-interp.c (tui_interp): New class.
15953         (as_tui_interp): Return a tui_interp pointer.
15954         (tui_on_normal_stop, tui_on_signal_received)
15955         (tui_on_end_stepping_range, tui_on_signal_exited, tui_on_exited)
15956         (tui_on_no_history, tui_on_user_selected_context_changed): Adjust
15957         to use interp::interp_ui_out.
15958         (tui_init): Rename to ...
15959         (tui_interp::init): ... this.  Remove the 'self' parameter, use
15960         bool, return void and make extern.  Adjust.
15961         (tui_resume): Rename to ...
15962         (tui_interp::resume): ... this.  Remove the 'data' parameter,
15963         return void and make extern.  Adjust.
15964         (tui_suspend): Rename to ...
15965         (tui_interp::suspend): ... this.  Remove the 'data' parameter,
15966         return void and make extern.  Adjust.
15967         (tui_ui_out): Rename to ...
15968         (tui_interp::interp_ui_out): ... this.  Remove the 'self'
15969         parameter, and make extern.  Adjust.
15970         (tui_exec): Rename to ...
15971         (tui_interp::exec): ... this.  Remove the 'data' parameter and
15972         make extern.
15973         (tui_interp_procs): Delete.
15974         (tui_interp_factory): Use "new".
15975
15976 2017-02-02  Tom Tromey  <tom@tromey.com>
15977
15978         * rust-exp.y (ends_raw_string, space_then_number)
15979         (rust_identifier_start_p): Return bool.
15980         * rust-lang.c (rust_tuple_type_p, rust_underscore_fields)
15981         (rust_tuple_struct_type_p, rust_tuple_variant_type_p)
15982         (rust_slice_type_p, rust_range_type_p, rust_u8_type_p)
15983         (rust_chartype_p): Return bool.
15984         (val_print_struct, rust_print_struct_def, rust_print_type):
15985         Update.
15986         * rust-lang.h (rust_tuple_type_p, rust_tuple_struct_type_p):
15987         Return bool.
15988
15989 2017-02-02  Tom Tromey  <tom@tromey.com>
15990
15991         * rust-lang.c: Reindent.
15992
15993 2017-02-02  Tom Tromey  <tom@tromey.com>
15994
15995         * rust-lang.h (rust_crate_for_block): Update.
15996         * rust-lang.c (rust_crate_for_block): Return std::string.
15997         (rust_get_disr_info): Use std:;string, not
15998         gdb::unique_xmalloc_ptr.
15999         * rust-exp.y (crate_name): Update.
16000
16001 2017-02-02  Pedro Alves  <palves@redhat.com>
16002
16003         * disasm-selftests.c (print_one_insn_test): Move the "verbose"
16004         field out of gdb_disassembler_test and make it static.
16005
16006 2017-02-02  Pedro Alves  <palves@redhat.com>
16007
16008         * mi/mi-common.h (struct mi_interp): Delete the mi2_interp,
16009         mi1_interp and mi_interp fields.
16010
16011 2017-02-02  Pedro Alves  <palves@redhat.com>
16012
16013         * cli/cli-interp.c (struct saved_output_files, saved_output):
16014         Moved from cli/cli-logging.c.
16015         (cli_set_logging): New function.
16016         (cli_interp_procs): Install cli_set_logging.
16017         * cli/cli-interp.h (make_logging_output, cli_set_logging):
16018         Declare.
16019         * cli/cli-logging.c (struct saved_output_files, saved_output):
16020         Moved to cli/cli-interp.c.
16021         (pop_output_files): Don't save outputs here.
16022         (make_logging_output): New function.
16023         (handle_redirections): Don't build tee nor save previous outputs
16024         here.
16025         * interps.c (current_interp_set_logging): Change prototype.
16026         Assume there's always a set_logging_proc method installed.
16027         * interps.h (interp_set_logging_ftype): Change prototype.
16028         (current_interp_set_logging): Change prototype and adjust comment.
16029         * mi/mi-interp.c (mi_set_logging): Change protototype.  Adjust to
16030         use make_logging_output.
16031         * tui/tui-interp.c (tui_interp_procs): Install cli_set_logging.
16032 2017-02-02  Pedro Alves  <palves@redhat.com>
16033
16034         * cli/cli-logging.c (maybe_warn_already_logging): New factored out
16035         from ...
16036         (set_logging_overwrite): ... here.
16037         (logging_no_redirect_file): Delete.
16038         (set_logging_redirect): Don't handle redirection on the fly.
16039         Instead warn that "logging off" / "logging on" is necessary.
16040         (pop_output_files): Delete references to logging_no_redirect_file.
16041         (show_logging_command): Always speak in terms of what will happen
16042         once logging is reenabled.
16043
16044 2017-02-02  Pedro Alves  <palves@redhat.com>
16045
16046         * disasm.h (gdb_pretty_print_disassembler): Tweak intro comment.
16047
16048 2017-02-02  Pedro Alves  <palves@redhat.com>
16049
16050         * disasm.c (gdb_pretty_print_insn): Rename to ...
16051         (gdb_pretty_print_disassembler::pretty_print_insn): ... this.
16052         Remove gdbarch parameter.  Adapt to clear the object's buffers
16053         instead of allocating new buffers, and to print using the object's
16054         gdb_disassembler instead of calling gdb_print_insn.
16055         (dump_insns): Use gdb_pretty_print_disassembler.
16056         * disasm.h (gdb_pretty_print_insn): Delete declaration.
16057         (gdb_pretty_print_disassembler): New class.
16058         * record-btrace.c (btrace_insn_history): Use
16059         gdb_pretty_print_disassembler.
16060
16061 2017-02-02  Pedro Alves  <palves@redhat.com>
16062
16063         * ada-lang.c (type_as_string): Use string_file.
16064         * ada-valprint.c (ada_print_floating): Use string_file.
16065         * ada-varobj.c (ada_varobj_scalar_image)
16066         (ada_varobj_get_value_image): Use string_file.
16067         * aix-thread.c (aix_thread_extra_thread_info): Use string_file.
16068         * arm-tdep.c (_initialize_arm_tdep): Use string_printf.
16069         * breakpoint.c (update_inserted_breakpoint_locations)
16070         (insert_breakpoint_locations, reattach_breakpoints)
16071         (print_breakpoint_location, print_one_detail_ranged_breakpoint)
16072         (print_it_watchpoint): Use string_file.
16073         (save_breakpoints): Use stdio_file.
16074         * c-exp.y (oper): Use string_file.
16075         * cli/cli-logging.c (set_logging_redirect): Use ui_file_up and
16076         tee_file.
16077         (pop_output_files): Use delete.
16078         (handle_redirections): Use stdio_file and tee_file.
16079         * cli/cli-setshow.c (do_show_command): Use string_file.
16080         * compile/compile-c-support.c (c_compute_program): Use
16081         string_file.
16082         * compile/compile-c-symbols.c (generate_vla_size): Take a
16083         'string_file &' instead of a 'ui_file *'.
16084         (generate_c_for_for_one_variable): Take a 'string_file &' instead
16085         of a 'ui_file *'.  Use string_file.
16086         (generate_c_for_variable_locations): Take a 'string_file &'
16087         instead of a 'ui_file *'.
16088         * compile/compile-internal.h (generate_c_for_for_one_variable):
16089         Take a 'string_file &' instead of a 'ui_file *'.
16090         * compile/compile-loc2c.c (push, pushf, unary, binary)
16091         (print_label, pushf_register_address, pushf_register)
16092         (do_compile_dwarf_expr_to_c): Take a 'string_file &' instead of a
16093         'ui_file *'.  Adjust.
16094         * compile/compile.c (compile_to_object): Use string_file.
16095         * compile/compile.h (compile_dwarf_expr_to_c)
16096         (compile_dwarf_bounds_to_c): Take a 'string_file &' instead of a
16097         'ui_file *'.
16098         * cp-support.c (inspect_type): Use string_file and obstack_copy0.
16099         (replace_typedefs_qualified_name): Use string_file and
16100         obstack_copy0.
16101         * disasm.c (gdb_pretty_print_insn): Use string_file.
16102         (gdb_disassembly): Adjust reference the null_stream global.
16103         (do_ui_file_delete): Delete.
16104         (gdb_insn_length): Use null_stream.
16105         * dummy-frame.c (maintenance_print_dummy_frames): Use stdio_file.
16106         * dwarf2loc.c (dwarf2_compile_property_to_c)
16107         (locexpr_generate_c_location, loclist_generate_c_location): Take a
16108         'string_file &' instead of a 'ui_file *'.
16109         * dwarf2loc.h (dwarf2_compile_property_to_c): Likewise.
16110         * dwarf2read.c (do_ui_file_peek_last): Delete.
16111         (dwarf2_compute_name): Use string_file.
16112         * event-top.c (gdb_setup_readline): Use stdio_file.
16113         * gdbarch.sh (verify_gdbarch): Use string_file.
16114         * gdbtypes.c (safe_parse_type): Use null_stream.
16115         * guile/scm-breakpoint.c (gdbscm_breakpoint_commands): Use
16116         string_file.
16117         * guile/scm-disasm.c (gdbscm_print_insn_from_port): Take a
16118         'string_file *' instead of a 'ui_file *'.
16119         (gdbscm_arch_disassemble): Use string_file.
16120         * guile/scm-frame.c (frscm_print_frame_smob): Use string_file.
16121         * guile/scm-ports.c (class ioscm_file_port): Now a class that
16122         inherits from ui_file.
16123         (ioscm_file_port_delete, ioscm_file_port_rewind)
16124         (ioscm_file_port_put): Delete.
16125         (ioscm_file_port_write): Rename to ...
16126         (ioscm_file_port::write): ... this.  Remove file_port_magic
16127         checks.
16128         (ioscm_file_port_new): Delete.
16129         (ioscm_with_output_to_port_worker): Use ioscm_file_port and
16130         ui_file_up.
16131         * guile/scm-type.c (tyscm_type_name): Use string_file.
16132         * guile/scm-value.c (vlscm_print_value_smob, gdbscm_value_print):
16133         Use string_file.
16134         * infcmd.c (print_return_value_1): Use string_file.
16135         * infrun.c (print_target_wait_results): Use string_file.
16136         * language.c (add_language): Use string_file.
16137         * location.c (explicit_to_string_internal): Use string_file.
16138         * main.c (captured_main_1): Use null_file.
16139         * maint.c (maintenance_print_architecture): Use stdio_file.
16140         * mi/mi-cmd-stack.c (list_arg_or_local): Use string_file.
16141         * mi/mi-common.h (struct mi_interp) <out, err, log, targ,
16142         event_channel>: Change type to mi_console_file pointer.
16143         * mi/mi-console.c (mi_console_file_fputs, mi_console_file_flush)
16144         (mi_console_file_delete): Delete.
16145         (struct mi_console_file): Delete.
16146         (mi_console_file_magic): Delete.
16147         (mi_console_file_new): Delete.
16148         (mi_console_file::mi_console_file): New.
16149         (mi_console_file_delete): Delete.
16150         (mi_console_file_fputs): Delete.
16151         (mi_console_file::write): New.
16152         (mi_console_raw_packet): Delete.
16153         (mi_console_file::flush): New.
16154         (mi_console_file_flush): Delete.
16155         (mi_console_set_raw): Rename to ...
16156         (mi_console_file::set_raw): ... this.
16157         * mi/mi-console.h (class mi_console_file): New class.
16158         (mi_console_file_new, mi_console_set_raw): Delete.
16159         * mi/mi-interp.c (mi_interpreter_init): Use mi_console_file.
16160         (mi_set_logging): Use delete and tee_file.  Adjust.
16161         * mi/mi-main.c (output_register): Use string_file.
16162         (mi_cmd_data_evaluate_expression): Use string_file.
16163         (mi_cmd_data_read_memory): Use string_file.
16164         (mi_cmd_execute, print_variable_or_computed): Use string_file.
16165         * mi/mi-out.c (mi_ui_out::main_stream): New.
16166         (mi_ui_out::rewind): Use main_stream and
16167         string_file.
16168         (mi_ui_out::put): Use main_stream and string_file.
16169         (mi_ui_out::mi_ui_out): Remove 'stream' parameter.
16170         Allocate a 'string_file' instead.
16171         (mi_out_new): Don't allocate a mem_fileopen stream here.
16172         * mi/mi-out.h (mi_ui_out::mi_ui_out): Remove 'stream' parameter.
16173         (mi_ui_out::main_stream): Declare method.
16174         * printcmd.c (eval_command): Use string_file.
16175         * psymtab.c (maintenance_print_psymbols): Use stdio_file.
16176         * python/py-arch.c (archpy_disassemble): Use string_file.
16177         * python/py-breakpoint.c (bppy_get_commands): Use string_file.
16178         * python/py-frame.c (frapy_str): Use string_file.
16179         * python/py-framefilter.c (py_print_type, py_print_single_arg):
16180         Use string_file.
16181         * python/py-type.c (typy_str): Use string_file.
16182         * python/py-unwind.c (unwind_infopy_str): Use string_file.
16183         * python/py-value.c (valpy_str): Use string_file.
16184         * record-btrace.c (btrace_insn_history): Use string_file.
16185         * regcache.c (regcache_print): Use stdio_file.
16186         * reggroups.c (maintenance_print_reggroups): Use stdio_file.
16187         * remote.c (escape_buffer): Use string_file.
16188         * rust-lang.c (rust_get_disr_info): Use string_file.
16189         * serial.c (serial_open_ops_1): Use stdio_file.
16190         (do_serial_close): Use delete.
16191         * stack.c (print_frame_arg): Use string_file.
16192         (print_frame_args): Remove local mem_fileopen stream, not used.
16193         (print_frame): Use string_file.
16194         * symmisc.c (maintenance_print_symbols): Use stdio_file.
16195         * symtab.h (struct symbol_computed_ops) <generate_c_location>:
16196         Take a 'string_file *' instead of a 'ui_file *'.
16197         * top.c (new_ui): Use stdio_file and stderr_file.
16198         (free_ui): Use delete.
16199         (execute_command_to_string): Use string_file.
16200         (quit_confirm): Use string_file.
16201         * tracepoint.c (collection_list::append_exp): Use string_file.
16202         * tui/tui-disasm.c (tui_disassemble): Use string_file.
16203         * tui/tui-file.c: Don't include "ui-file.h".
16204         (enum streamtype, struct tui_stream): Delete.
16205         (tui_file_new, tui_file_delete, tui_fileopen, tui_sfileopen)
16206         (tui_file_isatty, tui_file_rewind, tui_file_put): Delete.
16207         (tui_file::tui_file): New method.
16208         (tui_file_fputs): Delete.
16209         (tui_file_get_strbuf): Delete.
16210         (tui_file::puts): New method.
16211         (tui_file_adjust_strbuf): Delete.
16212         (tui_file_flush): Delete.
16213         (tui_file::flush): New method.
16214         * tui/tui-file.h: Tweak intro comment.
16215         Include ui-file.h.
16216         (tui_fileopen, tui_sfileopen, tui_file_get_strbuf)
16217         (tui_file_adjust_strbuf): Delete declarations.
16218         (class tui_file): New class.
16219         * tui/tui-io.c (tui_initialize_io): Use tui_file.
16220         * tui/tui-regs.c (tui_restore_gdbout): Use delete.
16221         (tui_register_format): Use string_stream.
16222         * tui/tui-stack.c (tui_make_status_line): Use string_file.
16223         (tui_get_function_from_frame): Use string_file.
16224         * typeprint.c (type_to_string): Use string_file.
16225         * ui-file.c (struct ui_file, ui_file_magic, ui_file_new): Delete.
16226         (null_stream): New global.
16227         (ui_file_delete): Delete.
16228         (ui_file::ui_file): New.
16229         (null_file_isatty): Delete.
16230         (ui_file::~ui_file): New.
16231         (null_file_rewind): Delete.
16232         (ui_file::printf): New.
16233         (null_file_put): Delete.
16234         (null_file_flush): Delete.
16235         (ui_file::putstr): New.
16236         (null_file_write): Delete.
16237         (ui_file::putstrn): New.
16238         (null_file_read): Delete.
16239         (ui_file::putc): New.
16240         (null_file_fputs): Delete.
16241         (null_file_write_async_safe): Delete.
16242         (ui_file::vprintf): New.
16243         (null_file_delete): Delete.
16244         (null_file::write): New.
16245         (null_file_fseek): Delete.
16246         (null_file::puts): New.
16247         (ui_file_data): Delete.
16248         (null_file::write_async_safe): New.
16249         (gdb_flush, ui_file_isatty): Adjust.
16250         (ui_file_put, ui_file_rewind): Delete.
16251         (ui_file_write): Adjust.
16252         (ui_file_write_for_put): Delete.
16253         (ui_file_write_async_safe, ui_file_read): Adjust.
16254         (ui_file_fseek): Delete.
16255         (fputs_unfiltered): Adjust.
16256         (set_ui_file_flush, set_ui_file_isatty, set_ui_file_rewind)
16257         (set_ui_file_put, set_ui_file_write, set_ui_file_write_async_safe)
16258         (set_ui_file_read, set_ui_file_fputs, set_ui_file_fseek)
16259         (set_ui_file_data): Delete.
16260         (string_file::~string_file, string_file::write)
16261         (struct accumulated_ui_file, do_ui_file_xstrdup, ui_file_xstrdup)
16262         (do_ui_file_as_string, ui_file_as_string): Delete.
16263         (do_ui_file_obsavestring, ui_file_obsavestring): Delete.
16264         (struct mem_file): Delete.
16265         (mem_file_new): Delete.
16266         (stdio_file::stdio_file): New.
16267         (mem_file_delete): Delete.
16268         (stdio_file::stdio_file): New.
16269         (mem_fileopen): Delete.
16270         (stdio_file::~stdio_file): New.
16271         (mem_file_rewind): Delete.
16272         (stdio_file::set_stream): New.
16273         (mem_file_put): Delete.
16274         (stdio_file::open): New.
16275         (mem_file_write): Delete.
16276         (stdio_file_magic, struct stdio_file): Delete.
16277         (stdio_file_new, stdio_file_delete, stdio_file_flush): Delete.
16278         (stdio_file::flush): New.
16279         (stdio_file_read): Rename to ...
16280         (stdio_file::read): ... this.  Adjust.
16281         (stdio_file_write): Rename to ...
16282         (stdio_file::write): ... this.  Adjust.
16283         (stdio_file_write_async_safe): Rename to ...
16284         (stdio_file::write_async_safe) ... this.  Adjust.
16285         (stdio_file_fputs): Rename to ...
16286         (stdio_file::puts) ... this.  Adjust.
16287         (stdio_file_isatty): Delete.
16288         (stdio_file_fseek): Delete.
16289         (stdio_file::isatty): New.
16290         (stderr_file_write): Rename to ...
16291         (stderr_file::write) ... this.  Adjust.
16292         (stderr_file_fputs): Rename to ...
16293         (stderr_file::puts) ... this.  Adjust.
16294         (stderr_fileopen, stdio_fileopen, gdb_fopen): Delete.
16295         (stderr_file::stderr_file): New.
16296         (tee_file_magic): Delete.
16297         (struct tee_file): Delete.
16298         (tee_file::tee_file): New.
16299         (tee_file_new): Delete.
16300         (tee_file::~tee_file): New.
16301         (tee_file_delete): Delete.
16302         (tee_file_flush): Rename to ...
16303         (tee_file::flush): ... this.  Adjust.
16304         (tee_file_write): Rename to ...
16305         (tee_file::write): ... this.  Adjust.
16306         (tee_file::write_async_safe): New.
16307         (tee_file_fputs): Rename to ...
16308         (tee_file::puts): ... this.  Adjust.
16309         (tee_file_isatty): Rename to ...
16310         (tee_file::isatty): ... this.  Adjust.
16311         * ui-file.h (struct obstack, struct ui_file): Don't
16312         forward-declare.
16313         (ui_file_new, ui_file_flush_ftype, set_ui_file_flush)
16314         (ui_file_write_ftype)
16315         (set_ui_file_write, ui_file_fputs_ftype, set_ui_file_fputs)
16316         (ui_file_write_async_safe_ftype, set_ui_file_write_async_safe)
16317         (ui_file_read_ftype, set_ui_file_read, ui_file_isatty_ftype)
16318         (set_ui_file_isatty, ui_file_rewind_ftype, set_ui_file_rewind)
16319         (ui_file_put_method_ftype, ui_file_put_ftype, set_ui_file_put)
16320         (ui_file_delete_ftype, set_ui_file_data, ui_file_fseek_ftype)
16321         (set_ui_file_fseek): Delete.
16322         (ui_file_data, ui_file_delete, ui_file_rewind)
16323         (struct ui_file): New.
16324         (ui_file_up): New.
16325         (class null_file): New.
16326         (null_stream): Declare.
16327         (ui_file_write_for_put, ui_file_put): Delete.
16328         (ui_file_xstrdup, ui_file_as_string, ui_file_obsavestring):
16329         Delete.
16330         (ui_file_fseek, mem_fileopen, stdio_fileopen, stderr_fileopen)
16331         (gdb_fopen, tee_file_new): Delete.
16332         (struct string_file): New.
16333         (struct stdio_file): New.
16334         (stdio_file_up): New.
16335         (struct stderr_file): New.
16336         (class tee_file): New.
16337         * ui-out.c (ui_out::field_stream): Take a 'string_file &' instead
16338         of a 'ui_file *'.  Adjust.
16339         * ui-out.h (class ui_out) <field_stream>: Likewise.
16340         * utils.c (do_ui_file_delete, make_cleanup_ui_file_delete)
16341         (null_stream): Delete.
16342         (error_stream): Take a 'string_file &' instead of a 'ui_file *'.
16343         Adjust.
16344         * utils.h (struct ui_file): Delete forward declaration..
16345         (make_cleanup_ui_file_delete, null_stream): Delete declarations.
16346         (error_stream): Take a 'string_file &' instead of a
16347         'ui_file *'.
16348         * varobj.c (varobj_value_get_print_value): Use string_file.
16349         * xtensa-tdep.c (xtensa_verify_config): Use string_file.
16350         * gdbarch.c: Regenerate.
16351
16352 2017-02-02  Pedro Alves  <palves@redhat.com>
16353
16354         * disasm.c (gdb_disassembler::pretty_print_insn): Rename to...
16355         (gdb_pretty_print_insn): ... this.  Now a free function.  Add back
16356         a 'gdbarch' parameter.  Allocate a mem_fileopen stream here.
16357         Adjust to call gdb_print_insn instead of
16358         gdb_disassembler::print_insn.
16359         (dump_insns, do_mixed_source_and_assembly_deprecated)
16360         (do_mixed_source_and_assembly, do_assembly_only): Add back a
16361         'gdbarch' parameter.  Remove gdb_disassembler parameter.
16362         (gdb_disassembly): Don't allocate a gdb_disassembler here.
16363         * disasm.h (gdb_disassembler::pretty_print_insn): Delete
16364         declaration.
16365         (gdb_pretty_print_insn): Re-add declaration.
16366         * record-btrace.c (btrace_insn_history): Don't allocate a
16367         gdb_disassembler here.  Adjust to call gdb_pretty_print_insn.
16368
16369 2017-02-01  Simon Marchi  <simon.marchi@polymtl.ca>
16370
16371         * disasm.h (gdb_disassembly): Remove file_string parameter.
16372         * disasm.c (gdb_disassembly): Likewise.
16373         * cli/cli-cmds.c (print_disassembly): Adapt.
16374         * mi/mi-cmd-disas.c (mi_cmd_disassemble): Likewise.
16375         * stack.c (do_gdb_disassembly): Likewise.
16376
16377 2017-02-01  Andreas Arnez  <arnez@linux.vnet.ibm.com>
16378
16379         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): For
16380         DWARF_VALUE_LITERAL, no longer ignore the offset on big-endian
16381         targets.  And if the implicit value is longer than needed, extract
16382         the first bytes instead of the "least significant" ones.
16383
16384 2017-02-01  Markus Metzger  <markus.t.metzger@intel.com>
16385
16386         * btrace.c (btrace_enable): Do not call btrace_add_pc for
16387         BTRACE_FORMAT_PT or if can_access_registers_ptid returns false.
16388         (btrace_fetch): Assert can_access_registers_ptid.
16389         * record-btrace.c (require_btrace_thread, record_btrace_info): Call
16390         validate_registers_access.
16391
16392 2017-02-01  Markus Metzger  <markus.t.metzger@intel.com>
16393
16394         * gdbthread.h (can_access_registers_ptid): New.
16395         * thread.c (can_access_registers_ptid): New.
16396
16397 2017-02-01  Pedro Alves  <palves@redhat.com>
16398
16399         * i386-tdep.c (i386_fast_tracepoint_valid_at): Use gdb_insn_length.
16400
16401 2017-01-31  Pedro Alves  <palves@redhat.com>
16402
16403         * mi/mi-interp.c (mi_breakpoint_created, mi_breakpoint_modified):
16404         Fix typos.
16405
16406 2017-01-31  Pedro Alves  <palves@redhat.com>
16407
16408         * stack.c (print_frame_args): Remove local mem_fileopen stream,
16409         not used.
16410
16411 2017-01-31  Pedro Alves  <palves@redhat.com>
16412
16413         * varobj.c (varobj_value_get_print_value): Remove xstrdup call.
16414
16415 2017-01-31  Pedro Alves  <palves@redhat.com>
16416
16417         * common/scoped_restore.h
16418         (scoped_restore_tmpl::scoped_restore_tmpl): Template on T2, and
16419         change the value's parameter type to T2.
16420         (make_scoped_restore): Likewise.
16421
16422 2017-01-27  Walfred Tedeschi  <walfred.tedeschi@intel.com>
16423             Richard Henderson  <rth@redhat.com>
16424
16425         * amd64-linux-nat.c (PTRACE_ARCH_PRCTL): New define.
16426         (amd64_linux_fetch_inferior_registers): Add case to fetch FS_BASE
16427         GS_BASE for older kernels.
16428         (amd64_linux_store_inferior_registers): Add case to store FS_BASE
16429         GS_BASE for older kernels.
16430         * amd64-linux-tdep.c (amd64_linux_gregset_reg_offset): Add FS_BASE
16431         and GS_BASE to the offset table.
16432         (amd64_linux_register_reggroup_p): Add FS_BASE and GS_BASE to the
16433         system register group.
16434         * amd64-nat.c (amd64_native_gregset_reg_offset): Implements case
16435         for older kernels.
16436         * amd64-tdep.c (amd64_init_abi): Add segment registers for the
16437         amd64 ABI.
16438         * amd64-tdep.h (amd64_regnum): Add AMD64_FSBASE_REGNUM and
16439         AMD64_GSBASE_REGNUM.
16440         (AMD64_NUM_REGS): Set to AMD64_GSBASE_REGNUM + 1.
16441         * features/Makefile (amd64-linux.dat, amd64-avx-linux.dat)
16442         (amd64-mpx-linux.dat, amd64-avx512-linux.dat, x32-linux.dat)
16443         (x32-avx-linux.dat, x32-avx512-linux.dat): Add
16444         i386/64bit-segments.xml in those rules.
16445         * features/i386/64bit-segments.xml: New file.
16446         * features/i386/amd64-avx-mpx-linux.xml: Add 64bit-segments.xml.
16447         * features/i386/amd64-avx-linux.xml: Add 64bit-segments.xml.
16448         * features/i386/amd64-avx512-linux.xml: Add 64bit-segments.xml.
16449         * features/i386/amd64-mpx-linux.xml: Add 64bit-segments.xml.
16450         * features/i386/x32-avx512-linux.xml: Add 64bit-segments.xml.
16451         * features/i386/x32-avx-linux.xml: Add 64bit-segments.xml.
16452         * features/i386/amd64-linux.xml: Add 64bit-segments.xml.
16453         * features/i386/amd64-avx-linux.c: Regenerated.
16454         * features/i386/amd64-avx-mpx-linux.c: Regenerated.
16455         * features/i386/amd64-avx-mpx.c: Regenerated.
16456         * features/i386/amd64-avx512-linux.c: Regenerated.
16457         * features/i386/amd64-linux.c: Regenerated.
16458         * features/i386/amd64-mpx-linux.c: Regenerated.
16459         * features/i386/i386-avx-mpx-linux.c: Regenerated.
16460         * features/i386/i386-avx-mpx.c: Regenerated.
16461         * features/i386/x32-avx-linux.c: Regenerated.
16462         * features/i386/x32-avx512-linux.c: Regenerated.
16463         * regformats/i386/amd64-avx-linux.dat: Regenerated.
16464         * regformats/i386/amd64-avx-mpx-linux.dat: Regenerated.
16465         * regformats/i386/amd64-avx512-linux.dat: Regenerated.
16466         * regformats/i386/amd64-linux.dat: Regenerated.
16467         * regformats/i386/amd64-mpx-linux.dat: Regenerated.
16468         * regformats/i386/x32-avx-linux.dat: Regenerated.
16469         * regformats/i386/x32-avx512-linux.dat: Regenerated.
16470         * regformats/i386/x32-linux.dat: Regenerated.
16471
16472 2017-01-27  Walfred Tedeschi  <walfred.tedeschi@intel.com>
16473
16474         * amd64-linux-tdep.h (AMD64_LINUX_ORIG_RAX_REGNUM):
16475         Set to AMD64_NUM_REGS.
16476
16477 2017-01-27  Walfred Tedeschi  <walfred.tedeschi@intel.com>
16478
16479         * amd64-nat.c (amd64_native_gregset_reg_offset): Simplify logic
16480         that checks validity of a register number.
16481
16482 2017-01-27  Kees Cook  <keescook@google.com>
16483
16484         * gdb/arm-linux-nat.c (arm_linux_fetch_inferior_registers): Call
16485         fetch_fpregs if target has fpa registers.
16486         (arm_linux_store_inferior_registers): Call store_fpregs if target
16487         has fpa registers.
16488
16489 2017-01-26  Andreas Arnez  <arnez@linux.vnet.ibm.com>
16490
16491         * cris-tdep.c (cris_gdbarch_init): Remove check for
16492         info.byte_order and force it to BFD_ENDIAN_LITTLE.
16493
16494 2017-01-26  Antoine Tremblay  <antoine.tremblay@ericsson.com>
16495
16496         * corelow.c (get_core_register_section): Check for regset
16497         existence before checking for REGSET_VARIABLE_SIZE.
16498
16499 2017-01-26  Yao Qi  <yao.qi@linaro.org>
16500             Pedro Alves  <palves@redhat.com>
16501
16502         PR gdb/20939
16503         * disasm.c (gdb_disassembler::dis_asm_memory_error): Don't
16504         call memory_error, save memaddr instead.
16505         (gdb_disassembler::print_insn): If gdbarch_print_insn returns
16506         negative, cal memory_error.
16507         * disasm.h (gdb_disassembler) <m_err_memaddr>: New field.
16508
16509 2017-01-26  Yao Qi  <yao.qi@linaro.org>
16510
16511         * disasm-selftests.c (memory_error_test): New function.
16512         (_initialize_disasm_selftests): Register memory_error_test.
16513
16514 2017-01-26  Yao Qi  <yao.qi@linaro.org>
16515
16516         * Makefile.in (SFILES): Add disasm-selftests.c and
16517         selftest-arch.c.
16518         (COMMON_OBS): Add disasm-selftests.o and selftest-arch.o.
16519         * disasm-selftests.c: New file.
16520         * selftest-arch.c: New file.
16521         * selftest-arch.h: New file.
16522
16523 2017-01-26  Yao Qi  <yao.qi@linaro.org>
16524
16525         * mep-tdep.c (mep_gdb_print_insn): Set info->arch
16526         to bfd_arch_mep.  Don't return 0 if section is not
16527         found.  Call print_insn_mep.
16528
16529 2017-01-26  Pedro Alves  <palves@redhat.com>
16530             Yao Qi  <yao.qi@linaro.org>
16531
16532         * arm-tdep.c: Include "disasm.h".
16533         (gdb_print_insn_arm): Update code to get gdbarch.
16534         * disasm.c (dis_asm_read_memory): Change it to
16535         gdb_disassembler::dis_asm_read_memory.
16536         (dis_asm_memory_error): Likewise.
16537         (dis_asm_print_address): Likewise.
16538         (gdb_pretty_print_insn): Change it to
16539         gdb_disassembler::pretty_print_insn.
16540         (dump_insns): Add one argument gdb_disassemlber.  All
16541         callers updated.
16542         (do_mixed_source_and_assembly_deprecated): Likewise.
16543         (do_mixed_source_and_assembly): Likewise.
16544         (do_assembly_only): Likewise.
16545         (gdb_disassembler::gdb_disassembler): New.
16546         (gdb_disassembler::print_insn): New.
16547         * disasm.h (class gdb_disassembler): New.
16548         (gdb_pretty_print_insn): Remove declaration.
16549         (gdb_disassemble_info): Likewise.
16550         * guile/scm-disasm.c (class gdbscm_disassembler): New.
16551         (gdbscm_disasm_read_memory_worker): Update.
16552         (gdbscm_disasm_read_memory): Update.
16553         (gdbscm_disasm_memory_error): Remove.
16554         (gdbscm_disasm_print_address): Remove.
16555         (gdbscm_disassembler::gdbscm_disassembler): New.
16556         (gdbscm_print_insn_from_port): Update.
16557         * mips-tdep.c: Include disasm.h.
16558         (gdb_print_insn_mips): Update code to get gdbarch.
16559         * record-btrace.c (btrace_insn_history): Update.
16560         * spu-tdep.c: Include disasm.h.
16561         (struct spu_dis_asm_data): Remove.
16562         (struct spu_dis_asm_info): New.
16563         (spu_dis_asm_print_address): Use spu_dis_asm_info to get
16564         SPU id.
16565         (gdb_print_insn_spu): Cast disassemble_info to
16566         spu_dis_asm_info.
16567
16568 2017-01-26  Yao Qi  <yao.qi@linaro.org>
16569
16570         * disasm.c (do_ui_file_delete): Delete.
16571         (gdb_insn_length): Move code creating stream to ...
16572         * utils.c (null_stream): ... here.  New function.
16573         * utils.h (null_stream): Declare.
16574
16575 2017-01-23  Simon Marchi  <simon.marchi@polymtl.ca>
16576
16577         * python/py-inferior.c (find_thread_object): Return directly
16578         from the loop.  Remove "found" variable.
16579
16580 2017-01-21  Joel Brobecker  <brobecker@adacore.com>
16581
16582         GDB 7.12.1 released.
16583
16584 2017-01-20  Simon Marchi  <simon.marchi@ericsson.com>
16585
16586         * python/py-function.c (fnpy_call): Reorder declarations to have
16587         the gdbpy_enter object declared first.
16588         * python/py-xmethods.c (gdbpy_get_xmethod_arg_types): Likewise.
16589
16590 2017-01-20  Simon Marchi  <simon.marchi@ericsson.com>
16591
16592         PR python/21068
16593         * python/python-internal.h (PyMem_RawMalloc): Define for
16594         Python < 3.4.
16595         * python/py-gdb-readline.c (gdbpy_readline_wrapper): Use
16596         PyMem_RawMalloc instead of PyMem_Malloc.
16597
16598 2017-01-20  Mike Wrighton  <mike_wrighton@codesourcery.com>
16599             Luis Machado  <lgustavo@codesourcery.com>
16600
16601         * NEWS (New commands): Mention flash-erase.
16602         (New MI commands): Mention target-flash-erase.
16603         * mi/mi-cmds.c (mi_cmd_target_flash_erase): Add target-flash-erase MI
16604         command.
16605         * mi/mi-cmds.h (mi_cmd_target_flash_erase): New declaration.
16606         * mi/mi-main.c (mi_cmd_target_flash_erase): New function.
16607         * target.c (flash_erase_command): New function.
16608         (initialize_targets): Add new flash-erase command.
16609         * target.h (flash_erase_command): New declaration.
16610
16611 2017-01-20  Joel Brobecker  <brobecker@adacore.com>
16612
16613         * nat/linux-ptrace.c: Only include <sys/procfs.h> if
16614         HAVE_SYS_PROCFS_H is defined.
16615
16616 2017-01-18  Alan Hayward  <alan.hayward@arm.com>
16617
16618         * remote.c (struct cached_reg): Change data into a pointer.
16619         * (stop_reply_dtr): Free data pointers before deleting vector.
16620         (process_stop_reply): Likewise.
16621         (remote_parse_stop_reply): Allocate space for data
16622
16623 2017-01-18  Alan Hayward  <alan.hayward@arm.com>
16624
16625         * amd64-tdep.c (amd64_pseudo_register_read_value): remove
16626         MAX_REGISTER_SIZE.
16627         (amd64_pseudo_register_read_value): Likewise.
16628         * remote.c (fetch_register_using_p): Remove MAX_REGISTER_SIZE.
16629         (store_register_using_P): Likewise.
16630         * regcache.c (regcache_xfer_part): Likewise.
16631
16632 2017-01-16  Ivo Raisr  <ivo.raisr@oracle.com>
16633
16634         Split real and pseudo registers.
16635         * sparc-tdep.h (SPARC_CORE_REGISTERS): New macro.
16636         (sparc32_pseudo_regnum): New enum.
16637         * sparc64-tdep.h (sparc64_pseudo_regnum): New enum.
16638         * sparc-tdep.c (SPARC32_FPU_REGISTERS): New macro.
16639         (SPARC32_CP0_REGISTERS): New macro.
16640         (sparc32_pseudo_register_name): New function.
16641         (sparc32_register_name): Use sparc32_pseudo_register_name.
16642         (sparc32_pseudo_register_type): New function.
16643         (sparc32_register_type): Use sparc32_pseudo_register_type.
16644         (sparc32_pseudo_register_read, sparc32_pseudo_register_write): Handle
16645         pseudo register numbers.
16646         * sparc64-tdep.c SPARC64_FPU_REGISTERS): New macro.
16647         (SPARC64_CP0_REGISTERS): New macro.
16648         (sparc64_pseudo_register_name): New function.
16649         (sparc64_register_name): Use sparc64_pseudo_register_name.
16650         (sparc64_pseudo_register_type): New function.
16651         (sparc64_register_type): Use sparc64_pseudo_register_type.
16652         (sparc64_pseudo_register_read, sparc64_pseudo_register_write): Handle
16653         pseudo register numbers.
16654         (sparc64_store_floating_fields, sparc64_extract_floating_fields,
16655         sparc64_store_arguments): Handle pseudo register numbers.
16656
16657 2017-01-13  Yao Qi  <yao.qi@linaro.org>
16658
16659         * remote.c (REMOTE_DEBUG_MAX_CHAR): New macro.
16660         (putpkt_binary): Print only REMOTE_DEBUG_MAX_CHAR chars in debug
16661         output.
16662         (getpkt_or_notif_sane_1): Likewise.
16663
16664 2017-01-13  Yao Qi  <yao.qi@linaro.org>
16665
16666         * Makefile.in (checker-headers): Use CXX and CXX_DIALET instead
16667         of CC.  Pass "-x c++-header" instead of "-x c".
16668
16669 2017-01-12  Simon Marchi  <simon.marchi@ericsson.com>
16670
16671         * remote.c (remote_can_async_p): Update comment.
16672
16673 2017-01-12  Simon Marchi  <simon.marchi@ericsson.com>
16674
16675         * linux-nat.c (linux_nat_can_async_p): Update comment.
16676
16677 2017-01-12  Simon Marchi  <simon.marchi@ericsson.com>
16678
16679         * serial.c (serial_open): Forget about "pc" and "lpt" serial interface.
16680
16681 2017-01-11  Simon Marchi  <simon.marchi@ericsson.com>
16682
16683         * cli/cli-decode.c (lookup_cmd_1): Fix typo in comment.
16684
16685 2017-01-10  Tom Tromey  <tom@tromey.com>
16686
16687         * python/py-type.c (typy_legacy_template_argument): Update.
16688         * cp-support.h (struct demangle_parse_info) (demangle_parse_info,
16689         ~demangle_parse_info): Declare new members.
16690         (cp_demangled_name_to_comp): Return unique_ptr.
16691         (cp_demangled_name_parse_free)
16692         (make_cleanup_cp_demangled_name_parse_free)
16693         (cp_new_demangle_parse_info): Remove.
16694         * cp-support.c (do_demangled_name_parse_free_cleanup)
16695         (make_cleanup_cp_demangled_name_parse_free): Remove.
16696         (inspect_type, cp_canonicalize_string_full)
16697         (cp_canonicalize_string): Update.
16698         (mangled_name_to_comp): Change return type.
16699         (cp_class_name_from_physname, method_name_from_physname)
16700         (cp_func_name, cp_remove_params): Update.
16701         * cp-name-parser.y (demangle_parse_info): New constructor, from
16702         cp_new_demangle_parse_info.
16703         (~demangle_parse_info): New destructor, from
16704         cp_demangled_name_parse_free.
16705         (cp_merge_demangle_parse_infos): Update.
16706         (cp_demangled_name_to_comp): Change return type.
16707
16708 2017-01-10  Tom Tromey  <tom@tromey.com>
16709
16710         * top.c (prevent_dont_repeat): Change return type.
16711         * python/python.c (execute_gdb_command): Use std::string.
16712         Update.
16713         * guile/guile.c (gdbscm_execute_gdb_command): Update.
16714         * command.h (prevent_dont_repeat): Change return type.
16715         * breakpoint.c (bpstat_do_actions_1): Update.
16716
16717 2017-01-10  Tom Tromey  <tom@tromey.com>
16718
16719         * value.h (scoped_value_mark::~scoped_value_mark): Call
16720         free_to_mark.
16721         (scoped_value_mark::free_to_mark): New method.
16722         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Use
16723         scoped_value_mark.
16724
16725 2017-01-10  Tom Tromey  <tom@tromey.com>
16726
16727         * python/py-value.c (valpy_dereference, valpy_referenced_value)
16728         (valpy_reference_value, valpy_const_value, valpy_get_address)
16729         (valpy_get_dynamic_type, valpy_lazy_string, valpy_do_cast)
16730         (valpy_getitem, valpy_call, valpy_binop_throw, valpy_negative)
16731         (valpy_absolute, valpy_richcompare_throw): Use scoped_value_mark.
16732         * dwarf2loc.c (dwarf2_loc_desc_get_symbol_read_needs): Use
16733         scoped_value_mark.
16734         * dwarf2-frame.c (execute_stack_op): Use scoped_value_mark.
16735         * value.h (scoped_value_mark): New class.
16736
16737 2017-01-10  Tom Tromey  <tom@tromey.com>
16738
16739         * dwarf2read.c (dwarf2_build_psymtabs): Use psymtab_discarder.
16740         * psympriv.h (make_cleanup_discard_psymtabs): Don't declare.
16741         * psymtab.c (discard_psymtabs_upto): Remove.
16742         (make_cleanup_discard_psymtabs): Remove.
16743         (struct psymtab_state): Remove.
16744
16745 2017-01-10  Tom Tromey  <tom@tromey.com>
16746
16747         * record-full.c (record_full_save_cleanups): Remove.
16748         (record_full_save): Use gdb::unlinker.
16749         * gcore.c (do_bfd_delete_cleanup): Remove.
16750         (gcore_command): Use gdb::unlinker, unique_xmalloc_ptr.  Remove
16751         cleanups.
16752         * dwarf2read.c (unlink_if_set): Remove.
16753         (write_psymtabs_to_index): Use gdb::unlinker.
16754         * common/gdb_unlinker.h: New file.
16755
16756 2017-01-10  Tom Tromey  <tom@tromey.com>
16757
16758         * windows-tdep.c (windows_xfer_shared_library): Update.
16759         * windows-nat.c (windows_make_so): Update.
16760         * utils.h (make_cleanup_bfd_unref): Remove.
16761         * utils.c (do_bfd_close_cleanup, make_cleanup_bfd_unref): Remove.
16762         * symfile.h (symfile_bfd_open)
16763         (find_separate_debug_file_in_section): Return gdb_bfd_ref_ptr.
16764         * symfile.c (read_symbols, symbol_file_add)
16765         (separate_debug_file_exists): Update.
16766         (symfile_bfd_open): Return gdb_bfd_ref_ptr.
16767         (generic_load, reread_symbols): Update.
16768         * symfile-mem.c (symbol_file_add_from_memory): Update.
16769         * spu-linux-nat.c (spu_bfd_open): Return gdb_bfd_ref_ptr.
16770         (spu_symbol_file_add_from_memory): Update.
16771         * solist.h (struct target_so_ops) <bfd_open>: Return
16772         gdb_bfd_ref_ptr.
16773         (solib_bfd_fopen, solib_bfd_open): Return gdb_bfd_ref_ptr.
16774         * solib.c (solib_bfd_fopen, solib_bfd_open): Return
16775         gdb_bfd_ref_ptr.
16776         (solib_map_sections, reload_shared_libraries_1): Update.
16777         * solib-svr4.c (enable_break): Update.
16778         * solib-spu.c (spu_bfd_fopen): Return gdb_bfd_ref_ptr.
16779         * solib-frv.c (enable_break2): Update.
16780         * solib-dsbt.c (enable_break): Update.
16781         * solib-darwin.c (gdb_bfd_mach_o_fat_extract): Return
16782         gdb_bfd_ref_ptr.
16783         (darwin_solib_get_all_image_info_addr_at_init): Update.
16784         (darwin_bfd_open): Return gdb_bfd_ref_ptr.
16785         * solib-aix.c (solib_aix_bfd_open): Return gdb_bfd_ref_ptr.
16786         * record-full.c (record_full_save): Update.
16787         * python/py-objfile.c (objfpy_add_separate_debug_file): Update.
16788         * procfs.c (insert_dbx_link_bpt_in_file): Update.
16789         * minidebug.c (find_separate_debug_file_in_section): Return
16790         gdb_bfd_ref_ptr.
16791         * machoread.c (macho_add_oso_symfile): Change abfd to
16792         gdb_bfd_ref_ptr.
16793         (macho_symfile_read_all_oso): Update.
16794         (macho_check_dsym): Return gdb_bfd_ref_ptr.
16795         (macho_symfile_read): Update.
16796         * jit.c (bfd_open_from_target_memory): Return gdb_bfd_ref_ptr.
16797         (jit_bfd_try_read_symtab): Update.
16798         * gdb_bfd.h (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
16799         (gdb_bfd_openw, gdb_bfd_openr_iovec)
16800         (gdb_bfd_openr_next_archived_file, gdb_bfd_fdopenr): Return
16801         gdb_bfd_ref_ptr.
16802         (gdb_bfd_ref_policy): New struct.
16803         (gdb_bfd_ref_ptr): New typedef.
16804         * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
16805         (gdb_bfd_openw, gdb_bfd_openr_iovec)
16806         (gdb_bfd_openr_next_archived_file, gdb_bfd_fdopenr): Return
16807         gdb_bfd_ref_ptr.
16808         * gcore.h (create_gcore_bfd): Return gdb_bfd_ref_ptr.
16809         * gcore.c (create_gcore_bfd): Return gdb_bfd_ref_ptr.
16810         (gcore_command): Update.
16811         * exec.c (exec_file_attach): Update.
16812         * elfread.c (elf_symfile_read): Update.
16813         * dwarf2read.c (dwarf2_get_dwz_file): Update.
16814         (try_open_dwop_file, open_dwo_file): Return gdb_bfd_ref_ptr.
16815         (open_and_init_dwo_file): Update.
16816         (open_dwp_file): Return gdb_bfd_ref_ptr.
16817         (open_and_init_dwp_file): Update.
16818         * corelow.c (core_open): Update.
16819         * compile/compile-object-load.c (compile_object_load): Update.
16820         * common/gdb_ref_ptr.h (ref_ptr::operator->): New operator.
16821         * coffread.c (coff_symfile_read): Update.
16822         * cli/cli-dump.c (bfd_openr_or_error, bfd_openw_or_error): Return
16823         gdb_bfd_ref_ptr.  Rename.
16824         (dump_bfd_file, restore_command): Update.
16825         * build-id.h (build_id_to_debug_bfd): Return gdb_bfd_ref_ptr.
16826         * build-id.c (build_id_to_debug_bfd): Return gdb_bfd_ref_ptr.
16827         (find_separate_debug_file_by_buildid): Update.
16828
16829 2017-01-10  Tom Tromey  <tom@tromey.com>
16830
16831         * common/gdb_ref_ptr.h: New file.
16832         * python/py-ref.h (struct gdbpy_ref_policy): New.
16833         (gdbpy_ref): Now a typedef.
16834
16835 2017-01-10  Tom Tromey  <tom@tromey.com>
16836
16837         * utils.h (make_cleanup_htab_delete): Don't declare.
16838         * utils.c (do_htab_delete_cleanup, make_cleanup_htab_delete):
16839         Remove.
16840         * linespec.c (decode_compound_collector): Add constructor,
16841         destructor.
16842         (lookup_prefix_sym): Remove cleanup.
16843         (symtab_collector): Add constructor, destructor.
16844         (collect_symtabs_from_filename): Remove cleanup.
16845         * disasm.c (do_mixed_source_and_assembly): Use htab_up.
16846         * compile/compile-c-symbols.c (generate_c_for_variable_locations):
16847         Use htab_up.
16848         * gnu-v3-abi.c (gnuv3_print_vtable): Use htab_up.
16849         * dwarf2read.c (dw2_expand_symtabs_matching)
16850         (dw2_map_symbol_filenames, dwarf_decode_macros)
16851         (write_psymtabs_to_index): Use htab_up.
16852         * dwarf2loc.c (func_verify_no_selftailcall)
16853         (call_site_find_chain_1, func_verify_no_selftailcall)
16854         (chain_candidate, call_site_find_chain_1): Use std::unordered_set,
16855         std::vector, gdb::unique_xmalloc_ptr.
16856         (call_sitep): Remove typedef.
16857         (dwarf2_locexpr_baton_eval): Remove unused variable.
16858
16859 2017-01-10  Tom Tromey  <tom@tromey.com>
16860
16861         * python/python-internal.h (make_cleanup_py_decref)
16862         (make_cleanup_py_xdecref): Don't declare.
16863         * python/py-utils.c (py_decref, make_cleanup_py_decref)
16864         (py_xdecref, make_cleanup_py_xdecref): Remove.
16865
16866 2017-01-10  Tom Tromey  <tom@tromey.com>
16867
16868         * python/py-framefilter.c (py_mi_print_variables): Use gdbpy_ref.
16869         (py_print_locals, enumerate_locals, py_print_args): Use gdbpy_ref.
16870
16871 2017-01-10  Tom Tromey  <tom@tromey.com>
16872
16873         * python/py-framefilter.c (enumerate_args): Use gdbpy_ref.
16874
16875 2017-01-10  Tom Tromey  <tom@tromey.com>
16876
16877         * python/py-utils.c (unicode_to_encoded_string)
16878         (python_string_to_target_string)
16879         (python_string_to_target_python_string)
16880         (python_string_to_host_string, gdbpy_obj_to_string)
16881         (get_addr_from_python): Use gdbpy_ref.
16882
16883 2017-01-10  Tom Tromey  <tom@tromey.com>
16884
16885         * python/py-unwind.c (pyuw_object_attribute_to_pointer): Use
16886         gdbpy_ref.
16887
16888 2017-01-10  Tom Tromey  <tom@tromey.com>
16889
16890         * python/python.c (eval_python_command, gdbpy_decode_line)
16891         (gdbpy_run_events, gdbpy_start_type_printers)
16892         (gdbpy_apply_type_printers): Use gdbpy_ref.
16893
16894 2017-01-10  Tom Tromey  <tom@tromey.com>
16895
16896         * python/py-param.c (get_doc_string, compute_enum_values): Use
16897         gdbpy_ref.
16898
16899 2017-01-10  Tom Tromey  <tom@tromey.com>
16900
16901         * python/py-inferior.c (find_thread_object, build_inferior_list):
16902         Use gdbpy_ref.
16903
16904 2017-01-10  Tom Tromey  <tom@tromey.com>
16905
16906         * python/py-framefilter.c (py_print_frame): Use gdbpy_ref.
16907
16908 2017-01-10  Tom Tromey  <tom@tromey.com>
16909
16910         * python/py-finishbreakpoint.c (bpfinishpy_out_of_scope): Use
16911         gdbpy_ref.
16912
16913 2017-01-10  Tom Tromey  <tom@tromey.com>
16914
16915         * python/py-cmd.c (cmdpy_completer_helper): Use gdbpy_ref.  Remove
16916         extra incref.
16917         (cmdpy_completer_handle_brkchars, cmdpy_completer, cmdpy_init):
16918         Use gdbpy_ref.
16919
16920 2017-01-10  Tom Tromey  <tom@tromey.com>
16921
16922         * python/py-breakpoint.c (gdbpy_breakpoint_cond_says_stop): Use
16923         gdbpy_ref.
16924
16925 2017-01-10  Tom Tromey  <tom@tromey.com>
16926
16927         * python/py-arch.c (archpy_disassemble): Use gdbpy_ref.  Don't
16928         decref results of PyArg_ParseTupleAndKeywords.
16929
16930 2017-01-10  Tom Tromey  <tom@tromey.com>
16931
16932         * python/python.c (python_run_simple_file): Use
16933         unique_xmalloc_ptr, gdbpy_ref.
16934
16935 2017-01-10  Tom Tromey  <tom@tromey.com>
16936
16937         * python/py-prettyprint.c (print_stack_unless_memory_error)
16938         (print_string_repr, print_children): Use gdbpy_ref.
16939         (dummy_python_frame): New class.
16940         (dummy_python_frame::dummy_python_frame): Rename from
16941         push_dummy_python_frame.
16942         (py_restore_tstate): Remove.
16943
16944 2017-01-10  Tom Tromey  <tom@tromey.com>
16945
16946         * python/py-framefilter.c (py_print_frame): Use gdbpy_ref.
16947
16948 2017-01-10  Tom Tromey  <tom@tromey.com>
16949
16950         * python/python.c (ensure_python_env, restore_python_env):
16951         Remove.
16952         * python/python-internal.h (ensure_python_env): Don't declare.
16953         * varobj.h (varobj_ensure_python_env): Don't declare.
16954         * varobj.c (varobj_ensure_python_env): Remove.
16955
16956 2017-01-10  Tom Tromey  <tom@tromey.com>
16957
16958         * varobj.c (varobj_value_get_print_value): Use
16959         gdbpy_enter_varobj.
16960
16961 2017-01-10  Tom Tromey  <tom@tromey.com>
16962
16963         * python/py-prettyprint.c (print_string_repr, print_children):
16964         Update.
16965         * python/py-lazy-string.c (gdbpy_extract_lazy_string): Change type
16966         of "encoding".
16967         * varobj.c (varobj_value_get_print_value): Update.
16968         * python/python-internal.h (gdbpy_extract_lazy_string): Update.
16969
16970 2017-01-10  Tom Tromey  <tom@tromey.com>
16971
16972         * varobj.c (varobj_get_display_hint)
16973         (dynamic_varobj_has_child_method, install_new_value_visualizer)
16974         (varobj_set_visualizer, free_variable): Use
16975         gdbpy_enter_varobj.
16976
16977 2017-01-10  Tom Tromey  <tom@tromey.com>
16978
16979         * python/python.c (python_command): Use gdbpy_enter, gdbpy_ref.
16980         (do_finish_initialization): New function.  Use gdbpy_ref.
16981         (gdbpy_finish_initialization): Use gdbpy_enter.  Call
16982         do_finish_initialization.
16983
16984 2017-01-10  Tom Tromey  <tom@tromey.com>
16985
16986         * python/py-param.c (get_set_value, get_show_value): Use
16987         gdbpy_enter, gdbpy_ref.
16988
16989 2017-01-10  Tom Tromey  <tom@tromey.com>
16990
16991         * python/py-function.c (fnpy_call): Use gdbpy_enter, gdbpy_ref.
16992
16993 2017-01-10  Tom Tromey  <tom@tromey.com>
16994
16995         * python/py-cmd.c (cmdpy_function): Use gdbpy_enter, gdbpy_ref.
16996
16997 2017-01-10  Tom Tromey  <tom@tromey.com>
16998
16999         * python/py-varobj.c (py_varobj_iter_dtor, py_varobj_iter_next):
17000         Use gdbpy_enter_varobj.
17001
17002 2017-01-10  Tom Tromey  <tom@tromey.com>
17003
17004         * varobj.c (gdbpy_enter_varobj): New constructor.
17005         * python/python-internal.h (gdbpy_enter_varobj): New class.
17006         * python/py-varobj.c (py_varobj_get_iterator): Use
17007         gdbpy_enter_varobj.
17008
17009 2017-01-10  Tom Tromey  <tom@tromey.com>
17010
17011         * python/py-xmethods.c (gdbpy_get_xmethod_result_type): Use
17012         gdbpy_enter, gdbpy_ref, unique_xmalloc_ptr.
17013         (gdbpy_invoke_xmethod): Use gdbpy_ref, gdbpy_enter.
17014         (gdbpy_get_xmethod_arg_types): Use gdbpy_ref,
17015         unique_xmalloc_ptr.
17016         (gdbpy_get_xmethod_arg_types): Use gdbpy_ref, gdbpy_enter.
17017
17018 2017-01-10  Tom Tromey  <tom@tromey.com>
17019
17020         * python/py-xmethods.c (invoke_match_method): Use
17021         gdbpy_ref.
17022
17023 2017-01-10  Tom Tromey  <tom@tromey.com>
17024
17025         * python/py-xmethods.c (gdbpy_get_matching_xmethod_workers): use
17026         gdbpy_enter, gdbpy_ref.
17027
17028 2017-01-10  Tom Tromey  <tom@tromey.com>
17029
17030         * python/python.c (python_interactive_command): Use gdbpy_enter.
17031
17032 2017-01-10  Tom Tromey  <tom@tromey.com>
17033
17034         * python/python.c (gdbpy_before_prompt_hook): Use gdbpy_enter,
17035         gdbpy_ref.
17036
17037 2017-01-10  Tom Tromey  <tom@tromey.com>
17038
17039         * python/py-prettyprint.c (gdbpy_apply_val_pretty_printer): Use
17040         gdbpy_enter, gdbpy_ref, unique_xmalloc_ptr.
17041
17042 2017-01-10  Tom Tromey  <tom@tromey.com>
17043
17044         * utils.h (htab_deleter): New struct.
17045         (htab_up): New typedef.
17046         * python/py-framefilter.c (gdbpy_apply_frame_filter): Use
17047         gdbpy_enter, gdbpy_ref, htab_up.
17048
17049 2017-01-10  Tom Tromey  <tom@tromey.com>
17050
17051         * python/py-unwind.c (pending_frame_invalidate): Remove.
17052         (pyuw_sniffer): Use gdbpy_enter and gdbpy_ref.
17053
17054 2017-01-10  Tom Tromey  <tom@tromey.com>
17055
17056         * python/py-xmethods.c (gdbpy_free_xmethod_worker_data)
17057         (gdbpy_clone_xmethod_worker_data): Use gdbpy_enter.
17058
17059 2017-01-10  Tom Tromey  <tom@tromey.com>
17060
17061         * python/py-type.c (save_objfile_types): Use gdbpy_enter.
17062
17063 2017-01-10  Tom Tromey  <tom@tromey.com>
17064
17065         * python/python.c (gdbpy_eval_from_control_command)
17066         (gdbpy_source_script, gdbpy_run_events)
17067         (gdbpy_source_objfile_script, gdbpy_execute_objfile_script)
17068         (gdbpy_free_type_printers, gdbpy_finish_initialization): Use
17069         gdbpy_enter.
17070
17071 2017-01-10  Tom Tromey  <tom@tromey.com>
17072
17073         * python/py-progspace.c (py_free_pspace): Use gdbpy_enter.
17074
17075 2017-01-10  Tom Tromey  <tom@tromey.com>
17076
17077         * python/py-objfile.c (py_free_objfile): Use gdbpy_enter.
17078
17079 2017-01-10  Tom Tromey  <tom@tromey.com>
17080
17081         * python/py-inferior.c (python_on_normal_stop, python_on_resume)
17082         (python_on_inferior_call_pre, python_on_inferior_call_post)
17083         (python_on_memory_change, python_on_register_change)
17084         (python_inferior_exit, python_new_objfile, add_thread_object)
17085         (delete_thread_object, py_free_inferior): Use gdbpy_enter.
17086
17087 2017-01-10  Tom Tromey  <tom@tromey.com>
17088
17089         * python/py-finishbreakpoint.c (bpfinishpy_handle_stop)
17090         (bpfinishpy_handle_exit): Use gdbpy_enter.
17091
17092 2017-01-10  Tom Tromey  <tom@tromey.com>
17093
17094         * python/py-cmd.c (cmdpy_destroyer)
17095         (cmdpy_completer_handle_brkchars, cmdpy_completer): Use
17096         gdbpy_enter.
17097
17098 2017-01-10  Tom Tromey  <tom@tromey.com>
17099
17100         * python/py-breakpoint.c (gdbpy_breakpoint_cond_says_stop): Use
17101         gdbpy_enter.
17102         (gdbpy_breakpoint_has_cond): Likewise.
17103
17104 2017-01-10  Tom Tromey  <tom@tromey.com>
17105
17106         * python/python.c (gdbpy_enter): New constructor.
17107         (~gdbpy_enter): New destructor.
17108         (restore_python_env, ensure_python_env): Rewrite.
17109         * python/python-internal.h (gdbpy_enter): New class.
17110
17111 2017-01-10  Tom Tromey  <tom@tromey.com>
17112
17113         * python/py-symbol.c (gdbpy_lookup_symbol): Use gdbpy_ref.
17114
17115 2017-01-10  Tom Tromey  <tom@tromey.com>
17116
17117         * python/py-value.c (value_has_field, get_field_flag)
17118         (get_field_type, valpy_getitem, convert_value_from_python): Use
17119         gdbpy_ref.
17120
17121 2017-01-10  Tom Tromey  <tom@tromey.com>
17122
17123         * python/python.c (gdbpy_progspaces, gdbpy_objfiles): Use
17124         gdbpy_ref.
17125
17126 2017-01-10  Tom Tromey  <tom@tromey.com>
17127
17128         * python/py-prettyprint.c (search_pp_list)
17129         (find_pretty_printer_from_objfiles)
17130         (find_pretty_printer_from_progspace)
17131         (find_pretty_printer_from_gdb, find_pretty_printer)
17132         (gdbpy_get_display_hint, gdbpy_get_varobj_pretty_printer): Use
17133         gdbpy_ref.
17134
17135 2017-01-10  Tom Tromey  <tom@tromey.com>
17136
17137         * python/py-param.c (call_doc_function): Use gdbpy_ref.
17138
17139 2017-01-10  Tom Tromey  <tom@tromey.com>
17140
17141         * python/py-linetable.c (build_line_table_tuple_from_pcs)
17142         (ltpy_get_all_source_lines): Use gdbpy_ref.
17143
17144 2017-01-10  Tom Tromey  <tom@tromey.com>
17145
17146         * python/py-framefilter.c (extract_sym, extract_value)
17147         (get_py_iter_from_func, bootstrap_python_frame_filters): Use
17148         gdbpy_ref.
17149
17150 2017-01-10  Tom Tromey  <tom@tromey.com>
17151
17152         * python/py-breakpoint.c (gdbpy_breakpoints): Use gdbpy_ref.
17153
17154 2017-01-10  Tom Tromey  <tom@tromey.com>
17155
17156         * python/py-inferior.c (gdbpy_inferiors): Use gdbpy_ref.
17157
17158 2017-01-10  Tom Tromey  <tom@tromey.com>
17159
17160         * python/py-function.c (convert_values_to_python, fnpy_init): Use
17161         gdbpy_ref.
17162
17163 2017-01-10  Tom Tromey  <tom@tromey.com>
17164
17165         * python/py-cmd.c (gdbpy_string_to_argv): Use gdbpy_ref.
17166
17167 2017-01-10  Tom Tromey  <tom@tromey.com>
17168
17169         * python/py-type.c (convert_field, make_fielditem, typy_fields)
17170         (typy_range): Use gdbpy_ref.
17171
17172 2017-01-10  Tom Tromey  <tom@tromey.com>
17173
17174         * python/py-threadevent.c (create_thread_event_object): Use
17175         gdbpy_ref.
17176         * python/py-stopevent.c (create_stop_event_object): Simplify.
17177         (emit_stop_event): Use gdbpy_ref.
17178         * python/py-signalevent.c (create_signal_event_object): Use
17179         gdbpy_ref.
17180         * python/py-newobjfileevent.c (create_new_objfile_event_object)
17181         (emit_new_objfile_event, create_clear_objfiles_event_object)
17182         (emit_clear_objfiles_event): Use gdbpy_ref.
17183         * python/py-infevents.c (create_inferior_call_event_object)
17184         (create_register_changed_event_object)
17185         (create_memory_changed_event_object, emit_inferior_call_event)
17186         (emit_memory_changed_event, emit_register_changed_event): Use
17187         gdbpy_ref.
17188         * python/py-exitedevent.c (create_exited_event_object)
17189         (emit_exited_event): Use gdbpy_ref.
17190         * python/py-event.h (evpy_emit_event): Remove
17191         CPYCHECKER_STEALS_REFERENCE_TO_ARG annotation.
17192         * python/py-event.c (evpy_emit_event): Use gdbpy_ref.
17193         * python/py-continueevent.c (emit_continue_event): Use
17194         gdbpy_ref.
17195         * python/py-breakpoint.c (gdbpy_breakpoint_created)
17196         (gdbpy_breakpoint_deleted, gdbpy_breakpoint_modified): Use
17197         gdbpy_ref.
17198         * python/py-bpevent.c (create_breakpoint_event_object): Use
17199         gdbpy_ref.
17200
17201 2017-01-10  Tom Tromey  <tom@tromey.com>
17202
17203         * python/py-ref.h: New file.
17204
17205 2017-01-10  Simon Marchi  <simon.marchi@ericsson.com>
17206
17207         * cli-out.c (cli_ui_out::do_redirect): Change return type to
17208         void.
17209         * cli-out.h (cli_ui_out::do_redirect): Likewise.
17210         * mi/mi-out.c (mi_ui_out::do_redirect): Likewise.
17211         * mi/mi-out.h (mi_ui_out::do_redirect): Likewise.
17212         * ui-out.c (ui_out::redirect): Likewise.
17213         * ui-out.h (ui_out::redirect, ui_out::do_redirect): Likewise.
17214         * cli/cli-logging.c (set_logging_redirect): Update call site of
17215         ui_out::redirect.
17216         (handle_redirections): Likewise.
17217         * scm-ports.c (ioscm_with_output_to_port_worker): Likewise.
17218         * top.c (execute_command_to_string): Likewise.
17219         * utils.c (do_ui_out_redirect_pop): Likewise.
17220
17221 2017-01-10  Simon Marchi  <simon.marchi@ericsson.com>
17222
17223         * stack.c (_initialize_stack): Update "frame" command help message.
17224
17225 2017-01-08  Iain Buclaw  <ibuclaw@gdcproject.org>
17226
17227         * d-exp.y (CastExpression): Emit UNOP_CAST_TYPE.
17228
17229 2017-01-06  Yao Qi  <yao.qi@linaro.org>
17230
17231         * x86-linux-nat.h: Include gdb_proc_service.h.
17232
17233 2017-01-06  Yao Qi  <yao.qi@linaro.org>
17234
17235         * ser-base.h: Include serial.h.
17236
17237 2017-01-06  Yao Qi  <yao.qi@linaro.org>
17238
17239         * ppc-linux-tdep.h: Include ppc-tdep.h.
17240
17241 2017-01-06  Yao Qi  <yao.qi@linaro.org>
17242
17243         * nat/amd64-linux-siginfo.h: Include signal.h.
17244
17245 2017-01-06  Yao Qi  <yao.qi@linaro.org>
17246
17247         * nat/aarch64-linux-hw-point.h: Include break-common.h.
17248
17249 2017-01-06  Yao Qi  <yao.qi@linaro.org>
17250
17251         * mi/mi-parse.h: Include mi-cmds.h.
17252
17253 2017-01-06  Yao Qi  <yao.qi@linaro.org>
17254
17255         * inf-loop.c: Don't include "target.h".
17256         * inf-loop.h: Include it here.
17257
17258 2017-01-06  Yao Qi  <yao.qi@linaro.org>
17259
17260         * dfp.h: Include "dboulest.h" and "expression.h".
17261
17262 2017-01-06  Yao Qi  <yao.qi@linaro.org>
17263
17264         * ax-gdb.h: Include "ax.h".
17265
17266 2017-01-06  Yao Qi  <yao.qi@linaro.org>
17267
17268         * Makefile.in (HFILES_NO_SRCDIR): Replace gdb_ptrace.h
17269         with nat/gdb_ptrace.h.
17270
17271 2017-01-05  Yao Qi  <yao.qi@linaro.org>
17272
17273         * mips-fbsd-tdep.c (mips_fbsd_sigframe_init): Move && to
17274         new line.
17275         (mips64_fbsd_sigframe_init): Likewise.
17276
17277 2017-01-04  John Baldwin  <jhb@FreeBSD.org>
17278
17279         * mips-fbsd-tdep.c (_initialize_mips_fbsd_tdep): Use
17280         GDB_OSABI_FREEBSD instead of GDB_OSABI_FREEBSD_ELF.
17281
17282 2017-01-04  John Baldwin  <jhb@FreeBSD.org>
17283
17284         * Makefile.in (ALLDEPFILES): Add mips-fbsd-nat.c.
17285         * NEWS: Mention new FreeBSD/mips native configuration.
17286         * config/mips/fbsd.mh: New file.
17287         * configure.host: Add mips*-*-freebsd*.
17288         * mips-fbsd-nat.c: New file.
17289
17290 2017-01-04  John Baldwin  <jhb@FreeBSD.org>
17291
17292         * Makefile.in (ALL_TARGET_OBS): Add mips-fbsd-tdep.o.
17293         (ALLDEPFILES): Add mips-fbsd-tdep.c.
17294         * NEWS: Mention new FreeBSD/mips target.
17295         * configure.tgt: Add mips*-*-freebsd*.
17296         * mips-fbsd-tdep.c: New file.
17297         * mips-fbsd-tdep.h: New file.
17298
17299 2017-01-04  Yao Qi  <yao.qi@linaro.org>
17300
17301         * dwarf2loc.c (write_pieced_value): Don't use VALUE_FRAME_ID (to),
17302         use c->frame_id when the piece location is DWARF_VALUE_REGISTER.
17303
17304 2017-01-01  Joel Brobecker  <brobecker@adacore.com>
17305
17306         Update copyright year range in all GDB files.
17307
17308 2017-01-01  Joel Brobecker  <brobecker@adacore.com>
17309
17310         * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2016.
17311
17312 For older changes see ChangeLog-2016.
17313 \f
17314 Local Variables:
17315 mode: change-log
17316 left-margin: 8
17317 fill-column: 74
17318 version-control: never
17319 coding: utf-8
17320 End: