5aa760971ae32d9531f52e1758e7896c71c208f5
[external/binutils.git] / gdb / ChangeLog
1 2017-07-25  Yao Qi  <yao.qi@linaro.org>
2
3         * amd64-tdep.c (amd64_init_abi): Make argument default_tdesc
4         constant.
5         (amd64_x32_init_abi): Likewise.
6         * amd64-tdep.h (amd64_init_abi): Update declaration.
7         (amd64_x32_init_abi): Likewise.
8
9 2017-07-25  Yao Qi  <yao.qi@linaro.org>
10
11         PR tdep/21717
12         * arm-linux-nat.c (arm_linux_fetch_inferior_registers): Update
13         condition for FPSCR.
14         (arm_linux_store_inferior_registers): Likewise.
15
16 2017-07-22  Tom Tromey  <tom@tromey.com>
17
18         * break-catch-syscall.c (struct catch_syscall_inferior_data)
19         <syscalls_counts>: Now a std::vector.
20         (get_catch_syscall_inferior_data): Use "new".
21         (catch_syscall_inferior_data_cleanup): Use "delete".
22         (insert_catch_syscall, remove_catch_syscall)
23         (clear_syscall_counts): Update.
24
25 2017-07-22  Tom Tromey  <tom@tromey.com>
26
27         * break-catch-syscall.c (syscall_catchpoint)
28         <syscalls_to_be_caught>: Now a std::vector<int>
29         (~syscall_catchpoint): Remove.
30         (insert_catch_syscall, remove_catch_syscall)
31         (breakpoint_hit_catch_syscall, print_one_catch_syscall)
32         (print_mention_catch_syscall, print_recreate_catch_syscall):
33         Update.
34         (create_syscall_event_catchpoint): Change type of "filter"
35         parameter.
36         (catch_syscall_split_args): Return a std::vector.
37         (catch_syscall_command_1, catching_syscall_number_1): Update.
38
39 2017-07-22  Tom Tromey  <tom@tromey.com>
40
41         * break-catch-throw.c (struct exception_catchpoint)
42         <exception_rx>: Now a std::string.
43         (~exception_catchpoint): Remove.
44         (print_one_detail_exception_catchpoint): Update.
45         (handle_gnu_v3_exceptions): Change type of except_rx.
46         (extract_exception_regexp): Return a std::string.
47         (catch_exception_command_1): Update.
48
49 2017-07-22  Tom Tromey  <tom@tromey.com>
50
51         * break-catch-sig.c (gdb_signal_type): Remove typedef.
52         (struct signal_catchpoint) <signals_to_be_caught>: Now a
53         std::vector.
54         <catch_all>: Now a bool.
55         (~signal_catchpoint): Remove.
56         (signal_catchpoint_insert_location)
57         (signal_catchpoint_remove_location)
58         (signal_catchpoint_breakpoint_hit, signal_catchpoint_print_one)
59         (signal_catchpoint_print_mention)
60         (signal_catchpoint_print_recreate)
61         (signal_catchpoint_explains_signal): Update.
62         (create_signal_catchpoint): Change type of "filter" and
63         "catch_all".
64         (catch_signal_split_args): Return a std::vector.  Change type of
65         "catch_all".
66         (catch_signal_command): Update.
67
68 2017-07-20  Pedro Alves  <palves@redhat.com>
69
70         * ada-lang.c (ada_language_defn): Make extern.
71         (_initialize_ada_language): Remove add_language call.
72         * c-lang.c (c_language_defn, cplus_language_defn)
73         (asm_language_defn, minimal_language_defn): Make extern.
74         (_initialize_c_language): Delete.
75         * completer.c (compare_cstrings): Delete, moved to utils.h.
76         * d-lang.c (d_language_defn): Make extern.
77         (_initialize_d_language): Remove add_language calls.
78         * defs.h (enum language): Add comment.
79         * f-lang.c (f_language_defn): Make extern.
80         (_initialize_f_language): Remove add_language call.
81         * go-lang.c (go_language_defn): Make extern.
82         (_initialize_go_language): Remove add_language call.
83         * language.c: Include <algorithm>.
84         (languages): Redefine as const array.
85         (languages_size, languages_allocsize, DEFAULT_ALLOCSIZE): Delete.
86         (set_language_command): Handle "local".  Use for-range loop.
87         (set_language): Remove loop.
88         (language_enum): Rewrite.
89         (language_def, language_str): Remove loops.
90         (add_language): Delete.
91         (add_set_language_command): New, based on add_languages.
92         (skip_language_trampoline): Adjust.
93         (local_language_defn): Delete.
94         (language_gdbarch_post_init): Adjust.
95         (_initialize_language): Remove add_language calls.  Call
96         add_set_language_command.
97         * language.h (add_language): Delete.
98         (auto_language_defn)
99         (unknown_language_defn, minimal_language_defn, ada_language_defn)
100         (asm_language_defn, c_language_defn, cplus_language_defn)
101         (d_language_defn, f_language_defn, go_language_defn)
102         (m2_language_defn, objc_language_defn, opencl_language_defn)
103         (pascal_language_defn, rust_language_defn): Declare.
104         * m2-lang.c (m2_language_defn): Make extern.
105         (_initialize_m2_language): Remove add_language call.
106         * objc-lang.c (objc_language_defn): Make extern.
107         (_initialize_objc_language): Remove add_language call.
108         * opencl-lang.c (opencl_language_defn): Make extern.
109         (_initialize_opencl_language): Remove add_language call.
110         * p-lang.c (pascal_language_defn): Make extern.
111         (_initialize_pascal_language): Delete.
112         * rust-lang.c (rust_language_defn): Make extern.
113         (_initialize_rust_language): Delete.
114         * utils.h (compare_cstrings): New static inline function.
115
116 2017-07-20  Pedro Alves  <palves@redhat.com>
117
118         * ada-lang.c (ada_to_fixed_type_1): Adjust.
119         (get_var_value): Constify parameters.
120         (get_int_var_value): Change prototype.
121         (to_fixed_range_type): Adjust.
122         * ada-lang.h (get_int_var_value): Change prototype.
123
124 2017-07-20  Pedro Alves  <palves@redhat.com>
125
126         * dwarf2read.c (dw2_lookup_symbol): Use
127         SYMBOL_MATCHES_SEARCH_NAME.
128         * psymtab.c (psym_lookup_symbol): Use SYMBOL_MATCHES_SEARCH_NAME.
129
130 2017-07-20  Pedro Alves  <palves@redhat.com>
131
132         * block.c (block_iter_name_step, block_iter_name_first)
133         (block_iter_name_next): Delete.
134         (block_lookup_symbol_primary): Adjust to use
135         dict_iter_match_first/dict_iter_match_next.
136         * block.h (block_iter_name_first, block_iter_name_next): Delete
137         declarations.
138         (ALL_BLOCK_SYMBOLS_WITH_NAME): Adjust to use
139         dict_iter_match_first/dict_iter_match_next.
140
141 2017-07-20  Pedro Alves  <palves@redhat.com>
142
143         * cp-support.c (cp_find_first_component_aux): Add missing case for
144         end of string.
145
146 2017-07-18  David Blaikie  <dblaikie@gmail.com>
147
148         * dwarf2read.c (create_cus_hash_table): Re-add lost initialization
149         of dwo_cu's dwo_file.
150
151 2017-07-18  Yao Qi  <yao.qi@linaro.org>
152
153         * remote.c (store_registers_using_G): Remove one line comment.
154
155 2017-07-18  Yao Qi  <yao.qi@linaro.org>
156
157         * regcache.c (regcache_cpy): Simplify it.
158         (regcache::cpy_no_passthrough): Remove it.
159         * regcache.h (cpy_no_passthrough): Remove it.
160         (regcache_dup, regcache_cpy): Update comments.
161
162 2017-07-18  Pedro Alves  <palves@redhat.com>
163
164         * remote-sim.c (sim_command_completer): Adjust to work with a
165         completion_tracker instead of a VEC.
166
167 2017-07-17  Pedro Alves  <palves@redhat.com>
168
169         * completer.c (complete_source_filenames): New function.
170         (complete_address_and_linespec_locations): New function.
171         (location_completer): Use complete_address_and_linespec_locations.
172         (completion_tracker::build_completion_result): Honor the tracker's
173         request to suppress append.
174         * completer.h (completion_tracker::suppress_append_ws)
175         (completion_tracker::set_suppress_append_ws): New methods.
176         (completion_tracker::m_suppress_append_ws): New field.
177         (complete_source_filenames): New declaration.
178         * linespec.c (linespec_complete_what): New.
179         (struct ls_parser) <complete_what, completion_word,
180         completion_quote_char, completion_quote_end, completion_tracker>:
181         New fields.
182         (string_find_incomplete_keyword_at_end): New.
183         (linespec_lexer_lex_string): Record quote char.  If in completion
184         mode, don't throw.
185         (linespec_lexer_consume_token): Advance the completion word point.
186         (linespec_lexer_peek_token): Save/restore completion info.
187         (save_stream_and_consume_token): New.
188         (set_completion_after_number): New.
189         (linespec_parse_basic): Set what to complete next depending on
190         token.  Handle function and label completions specially.
191         (parse_linespec): Disable objc shortcut in completion mode.  Set
192         what to complete next depending on token type.  Skip keyword if in
193         completion mode.
194         (complete_linespec_component, linespec_complete): New.
195         * linespec.h (linespec_complete): Declare.
196
197 2017-07-17  Pedro Alves  <palves@redhat.com>
198
199         * linespec.c (linespec_lexer_lex_string, find_toplevel_char):
200         Handle 'operator<' / 'operator<<'.
201
202 2017-07-17  Pedro Alves  <palves@redhat.com>
203
204         * completer.c (collect_explicit_location_matches): Handle
205         MATCH_LABEL.
206         (convert_explicit_location_to_linespec): New, factored out from
207         ...
208         (convert_explicit_location_to_sals): ... this.
209         (complete_label): New.
210         (linespec_complete_label, find_label_symbols_in_block): New.
211         (find_label_symbols): Add completion_mode parameter and adjust to
212         call find_label_symbols_in_block.
213         * linespec.h (linespec_complete_label): Declare.
214
215 2017-07-17  Pedro Alves  <palves@redhat.com>
216
217         * ada-lang.c (ada_collect_symbol_completion_matches): Add
218         complete_symbol_mode parameter.
219         * cli/cli-cmds.c (complete_command): Get the completion result out
220         of the handle_brkchars tracker if used a custom word point.
221         * completer.c: Include "linespec.h".
222         (enum explicit_location_match_type) <MATCH_LINE>: New enumerator.
223         (advance_to_expression_complete_word_point): New.
224         (completion_tracker::completes_to_completion_word): New.
225         (complete_files_symbols): Pass down
226         complete_symbol_mode::EXPRESSION.
227         (explicit_options, probe_options): New.
228         (collect_explicit_location_matches): Complete on the
229         explictit_loc->foo instead of word.  Use
230         linespec_complete_function.  Handle MATCH_LINE.  Handle offering
231         keyword and options completions.
232         (backup_text_ptr): Delete.
233         (skip_keyword): New.
234         (complete_explicit_location): Remove 'word' parameter.  Add
235         language, quoted_arg_start and quoted_arg_end parameters.
236         Rewrite, parsing left to right.
237         (location_completer): Rewrite.
238         (location_completer_handle_brkchars): New function.
239         (symbol_completer): Pass down complete_symbol_mode::EXPRESSION.
240         (enum complete_line_internal_reason): Adjust comments.
241         (completion_tracker::discard_completions): New.
242         (completer_handle_brkchars_func_for_completer): Handle
243         location_completer.
244         (gdb_custom_word_point_brkchars)
245         (gdb_org_rl_basic_quote_characters): New.
246         (gdb_completion_word_break_characters_throw)
247         (completion_find_completion_word): Handle trackers that use a
248         custom word point.
249         (completion_tracker::advance_custom_word_point_by): New.
250         (completion_tracker::build_completion_result): Don't rely on
251         readline appending the quote char.
252         (gdb_rl_attempted_completion_function_throw): Handle trackers that
253         use a custom word point.
254         (gdb_rl_attempted_completion_function): Restore
255         rl_basic_quote_characters.
256         * completer.h (class completion_tracker): Extend intro comment.
257         (completion_tracker::set_quote_char)
258         (completion_tracker::quote_char)
259         (completion_tracker::set_use_custom_word_point)
260         (completion_tracker::use_custom_word_point)
261         (completion_tracker::custom_word_point)
262         (completion_tracker::set_custom_word_point)
263         (completion_tracker::advance_custom_word_point_by)
264         (completion_tracker::completes_to_completion_word)
265         (completion_tracker::discard_completions): New methods.
266         (completion_tracker::m_quote_char)
267         (completion_tracker::m_use_custom_word_point)
268         (completion_tracker::m_custom_word_point): New fields.
269         (advance_to_expression_complete_word_point): Declare.
270         * f-lang.c (f_collect_symbol_completion_matches): Add
271         complete_symbol_mode parameter.
272         * language.h (struct language_defn)
273         <la_collect_symbol_completion_matches>: Add complete_symbol_mode
274         parameter.
275         * linespec.c (linespec_keywords): Add NULL terminator.  Make extern.
276         (linespec_complete_function): New function.
277         (linespec_lexer_lex_keyword): Adjust.
278         * linespec.h (linespec_keywords, linespec_complete_function): New
279         declarations.
280         * location.c (find_end_quote): New function.
281         (explicit_location_lex_one): Add explicit_completion_info
282         parameter.  Save quoting info.  Don't throw if being called for
283         completion.  Don't handle Ada operators here.
284         (is_cp_operator, skip_op_false_positives, first_of)
285         (explicit_location_lex_one_function): New function.
286         (string_to_explicit_location): Replace 'dont_throw' parameter with
287         an explicit_completion_info pointer parameter.  Handle it.  Don't
288         use explicit_location_lex_one to lex function names.  Use
289         explicit_location_lex_one_function instead.
290         * location.h (struct explicit_completion_info): New.
291         (string_to_explicit_location): Replace 'dont_throw' parameter with
292         an explicit_completion_info pointer parameter.
293         * symtab.c (default_collect_symbol_completion_matches_break_on):
294         Add complete_symbol_mode parameter.  Handle LINESPEC mode.
295         (default_collect_symbol_completion_matches)
296         (collect_symbol_completion_matches): Add complete_symbol_mode
297         parameter.
298         (collect_symbol_completion_matches_type): Pass down
299         complete_symbol_mode::EXPRESSION.
300         (collect_file_symbol_completion_matches): Add complete_symbol_mode
301         parameter.  Handle LINESPEC mode.
302         * symtab.h (complete_symbol_mode): New.
303         (default_collect_symbol_completion_matches_break_on)
304         (default_collect_symbol_completion_matches)
305         (collect_symbol_completion_matches)
306         (collect_file_symbol_completion_matches): Add complete_symbol_mode
307         parameter.
308
309 2017-07-17  Pedro Alves  <palves@redhat.com>
310
311         * utils.c (enum class strncmp_iw_mode): New.
312         (strcmp_iw): Rename to ...
313         (strncmp_iw_with_mode): ... this.  Add string2_len and mode
314         parameters.  Handle them.
315         (strncmp_iw): New.
316         (strcmp_iw): Reimplement as wrapper around strncmp_iw_with_mode.
317         * utils.h (strncmp_iw): Declare.
318         (strcmp_iw): Move describing comments here.
319
320 2017-07-17  Pedro Alves  <palves@redhat.com>
321
322         * c-exp.y (operator_stoken): Use CP_OPERATOR_LEN and
323         CP_OPERATOR_STR.
324         * c-typeprint.c (is_type_conversion_operator): Use
325         CP_OPERATOR_STR.
326         * cp-support.c (LENGTH_OF_OPERATOR): Delete.
327         (cp_find_first_component_aux): Use CP_OPERATOR_STR and
328         CP_OPERATOR_LEN.
329         * cp-support.h (CP_OPERATOR_STR, CP_OPERATOR_LEN): New.
330         * gnu-v2-abi.c (gnuv2_is_operator_name): Use CP_OPERATOR_STR.
331         * gnu-v3-abi.c (gnuv3_is_operator_name): Use CP_OPERATOR_STR.
332         * linespec.c (linespec_lexer_lex_string): Use CP_OPERATOR_LEN and
333         CP_OPERATOR_STR.
334         * location.c: Include "cp-support.h".
335         (explicit_location_lex_one): Use CP_OPERATOR_LEN and
336         CP_OPERATOR_STR.
337         * symtab.c (operator_chars): Use CP_OPERATOR_STR and
338         CP_OPERATOR_LEN.
339
340 2017-07-17  Pedro Alves  <palves@redhat.com>
341
342         * cli/cli-cmds.c (complete_command): Use a completion tracker
343         along with completion_find_completion_word for handle_brkchars
344         phase.
345         * completer.c (RL_QF_SINGLE_QUOTE, RL_QF_DOUBLE_QUOTE)
346         (RL_QF_BACKSLASH, RL_QF_OTHER_QUOTE): New.
347         (struct gdb_rl_completion_word_info): New.
348         (gdb_rl_find_completion_word): New.
349         (completion_find_completion_word): New.
350         * completer.h (completion_find_completion_word): Declare.
351
352 2017-07-17  Pedro Alves  <palves@redhat.com>
353
354         * ada-lang.c (symbol_completion_match): Adjust comments.
355         (symbol_completion_add): Replace vector parameter with
356         completion_tracker parameter.  Use it.
357         (ada_make_symbol_completion_list): Rename to...
358         (ada_collect_symbol_completion_matches): ... this.  Add
359         completion_tracker parameter and use it.
360         (ada_language_defn): Adjust.
361         * break-catch-syscall.c (catch_syscall_completer): Adjust
362         prototype and work with completion_tracker instead of VEC.
363         * breakpoint.c (condition_completer): Adjust prototype and work
364         with completion_tracker instead of VEC.
365         * c-lang.c (c_language_defn, cplus_language_defn)
366         (asm_language_defn, minimal_language_defn): Adjust to renames.
367         * cli/cli-cmds.c (complete_command): Rework using
368         completion_tracker.  Catch exceptions when completing.
369         * cli/cli-decode.c (integer_unlimited_completer)
370         (complete_on_cmdlist, complete_on_enum): Adjust prototype and work
371         with completion_tracker instead of VEC.
372         * command.h (struct completion_tracker): Forward declare.
373         (completer_ftype, completer_handle_brkchars_ftype): Change
374         types.
375         (complete_on_cmdlist, complete_on_enum): Adjust.
376         * completer.c: Include <algorithm>.
377         (struct gdb_completer_state): New.
378         (current_completion): New global.
379         (readline_line_completion_function): Delete.
380         (noop_completer, filename_completer)
381         (filename_completer_handle_brkchars, complete_files_symbols)
382         (linespec_location_completer): Adjust to work with a
383         completion_tracker instead of a VEC.
384         (string_or_empty): New.
385         (collect_explicit_location_matches): Adjust to work with a
386         completion_tracker instead of a VEC.
387         (explicit_location_completer): Rename to ...
388         (complete_explicit_location): ... this and adjust to work with a
389         completion_tracker instead of a VEC.
390         (location_completer): Adjust to work with a completion_tracker
391         instead of a VEC.
392         (add_struct_fields): Adjust to work with a completion_list instead
393         of VEC.
394         (expression_completer): Rename to ...
395         (complete_expression): ... this and adjust to work with a
396         completion_tracker instead of a VEC.  Use complete_files_symbols.
397         (expression_completer): Reimplement on top of complete_expression.
398         (symbol_completer): Adjust to work with a completion_tracker
399         instead of a VEC.
400         (enum complete_line_internal_reason): Add describing comments.
401         (complete_line_internal_normal_command): Adjust to work with a
402         completion_tracker instead of a VEC.
403         (complete_line_internal): Rename to ...
404         (complete_line_internal_1): ... this and adjust to work with a
405         completion_tracker instead of a VEC.  Assert TEXT is NULL in the
406         handle_brkchars phase.
407         (new_completion_tracker): Delete.
408         (complete_line_internal): Reimplement as TRY/CATCH wrapper around
409         complete_line_internal_1.
410         (free_completion_tracker): Delete.
411         (INITIAL_COMPLETION_HTAB_SIZE): New.
412         (completion_tracker::completion_tracker)
413         (completion_tracker::~completion_tracker): New.
414         (maybe_add_completion): Delete.
415         (completion_tracker::maybe_add_completion)
416         (completion_tracker::add_completion)
417         (completion_tracker::add_completions): New.
418         (throw_max_completions_reached_error): Delete.
419         (complete_line): Adjust to work with a completion_tracker instead
420         of a VEC.  Don't create a completion_tracker_t or check for max
421         completions here.
422         (command_completer, command_completer_handle_brkchars)
423         (signal_completer, reg_or_group_completer_1)
424         (reg_or_group_completer, default_completer_handle_brkchars):
425         Adjust to work with a completion_tracker.
426         (gdb_completion_word_break_characters_throw): New.
427         (gdb_completion_word_break_characters): Reimplement.
428         (line_completion_function): Delete.
429         (completion_tracker::recompute_lowest_common_denominator)
430         (expand_preserving_ws)
431         (completion_tracker::build_completion_result)
432         (completion_result::completion_result)
433         (completion_result::completion_result)
434         (completion_result::~completion_result)
435         (completion_result::completion_result)
436         (completion_result::release_match_list, compare_cstrings)
437         (completion_result::sort_match_list)
438         (completion_result::reset_match_list)
439         (gdb_rl_attempted_completion_function_throw)
440         (gdb_rl_attempted_completion_function): New.
441         * completer.h (completion_list, struct completion_result)
442         (class completion_tracker): New.
443         (complete_line): Add completion_tracker parameter.
444         (readline_line_completion_function): Delete.
445         (gdb_rl_attempted_completion_function): New.
446         (noop_completer, filename_completer, expression_completer)
447         (location_completer, symbol_completer, command_completer)
448         (signal_completer, reg_or_group_completer): Update prototypes.
449         (completion_tracker_t, new_completion_tracker)
450         (make_cleanup_free_completion_tracker): Delete.
451         (enum maybe_add_completion_enum): Delete.
452         (maybe_add_completion): Delete.
453         (throw_max_completions_reached_error): Delete.
454         * corefile.c (complete_set_gnutarget): Adjust to work with a
455         completion_tracker instead of a VEC.
456         * cp-abi.c (cp_abi_completer): Adjust to work with a
457         completion_tracker instead of a VEC.
458         * d-lang.c (d_language_defn): Adjust.
459         * disasm.c (disassembler_options_completer): Adjust to work with a
460         completion_tracker instead of a VEC.
461         * f-lang.c (f_make_symbol_completion_list): Rename to ...
462         (f_collect_symbol_completion_matches): ... this.  Adjust to work
463         with a completion_tracker instead of a VEC.
464         (f_language_defn): Adjust.
465         * go-lang.c (go_language_defn): Adjust.
466         * guile/scm-cmd.c (cmdscm_add_completion, cmdscm_completer):
467         Adjust to work with a completion_tracker instead of a VEC.
468         * infrun.c (handle_completer): Likewise.
469         * interps.c (interpreter_completer): Likewise.
470         * interps.h (interpreter_completer): Likewise.
471         * language.c (unknown_language_defn, auto_language_defn)
472         (local_language_defn): Adjust.
473         * language.h (language_defn::la_make_symbol_completion_list):
474         Rename to ...
475         (language_defn::la_collect_symbol_completion_matches): ... this
476         and adjust to work with a completion_tracker instead of a VEC.
477         * m2-lang.c (m2_language_defn): Adjust.
478         * objc-lang.c (objc_language_defn): Adjust.
479         * opencl-lang.c (opencl_language_defn): Adjust.
480         * p-lang.c (pascal_language_defn): Adjust.
481         * python/py-cmd.c (cmdpy_completer_helper): Handle NULL word.
482         (cmdpy_completer_handle_brkchars, cmdpy_completer): Adjust to work
483         with a completion_tracker.
484         * rust-lang.c (rust_language_defn): Adjust.
485         * symtab.c (free_completion_list, do_free_completion_list)
486         (return_val, completion_tracker): Delete.
487         (completion_list_add_name, completion_list_add_symbol)
488         (completion_list_add_msymbol, completion_list_objc_symbol)
489         (completion_list_add_fields, add_symtab_completions): Add
490         completion_tracker parameter and use it.
491         (default_make_symbol_completion_list_break_on_1): Rename to...
492         (default_collect_symbol_completion_matches_break_on): ... this.
493         Add completion_tracker parameter and use it instead of allocating
494         a completion tracker here.
495         (default_make_symbol_completion_list_break_on): Delete old
496         implementation.
497         (default_make_symbol_completion_list): Delete.
498         (default_collect_symbol_completion_matches): New.
499         (make_symbol_completion_list): Delete.
500         (collect_symbol_completion_matches): New.
501         (make_symbol_completion_type): Rename to ...
502         (collect_symbol_completion_matches_type): ... this.  Add
503         completion_tracker parameter and use it instead of VEC.
504         (make_file_symbol_completion_list_1): Rename to...
505         (collect_file_symbol_completion_matches): ... this.  Add
506         completion_tracker parameter and use it instead of VEC.
507         (make_file_symbol_completion_list): Delete.
508         (add_filename_to_list): Use completion_list instead of a VEC.
509         (add_partial_filename_data::list): Now a completion_list.
510         (make_source_files_completion_list): Work with a completion_list
511         instead of a VEC.
512         * symtab.h: Include "completer.h".
513         (default_make_symbol_completion_list_break_on)
514         (default_make_symbol_completion_list, make_symbol_completion_list)
515         (make_symbol_completion_type, make_file_symbol_completion_list)
516         (make_source_files_completion_list): Delete.
517         (default_collect_symbol_completion_matches_break_on)
518         (default_collect_symbol_completion_matches)
519         (collect_symbol_completion_matches)
520         (collect_symbol_completion_matches_type)
521         (collect_file_symbol_completion_matches)
522         (make_source_files_completion_list): New.
523         * top.c (init_main): Don't install a rl_completion_entry_function
524         hook.  Install a rl_attempted_completion_function hook instead.
525         * tui/tui-layout.c (layout_completer): Adjust to work with a
526         completion_tracker.
527         * tui/tui-regs.c (tui_reggroup_completer):
528         * tui/tui-win.c (window_name_completer, focus_completer)
529         (winheight_completer): Adjust to work with a completion_tracker.
530         * value.c: Include "completer.h".
531         (complete_internalvar): Adjust to work with a completion_tracker.
532         * value.h (complete_internalvar): Likewise.
533
534 2017-07-17  Pedro Alves  <palves@redhat.com>
535
536         * cli/cli-decode.c (set_cmd_completer_handle_brkchars): Adjust to
537         renames.
538         * cli/cli-decode.h (struct cmd_list_element) <completer>: Move
539         comments to completer_ftype's declaration.
540         <completer_handle_brkchars>: Change type to
541         completer_handle_brkchars_ftype.
542         * command.h (completer_ftype): Add describing comment and give
543         names to parameters.
544         (completer_ftype_void): Rename to ...
545         (completer_handle_brkchars_ftype) ... this.  Add describing comment.
546         (set_cmd_completer_handle_brkchars): Adjust.
547         * completer.c (filename_completer_handle_brkchars): New function.
548         (complete_line_internal_normal_command): New function, factored
549         out from ...
550         (complete_line_internal): ... here.
551         (command_completer_handle_brkchars)
552         (default_completer_handle_brkchars)
553         (completer_handle_brkchars_func_for_completer): New functions.
554         * completer.h (set_gdb_completion_word_break_characters): Delete
555         declaration.
556         (completer_handle_brkchars_func_for_completer): New declaration.
557         * python/py-cmd.c (cmdpy_completer_handle_brkchars): Adjust to use
558         completer_handle_brkchars_func_for_completer.
559
560 2017-07-17  Pedro Alves  <palves@redhat.com>
561
562         * completer.c (symbol_completer): New function, based on
563         make_symbol_completion_list_fn.
564         * completer.h (symbol_completer): New declaration.
565         * guile/scm-cmd.c (cmdscm_completers): Adjust.
566         * python/py-cmd.c (completers): Adjust.
567         * symtab.c (make_symbol_completion_list_fn): Delete.
568         * symtab.h (make_symbol_completion_list_fn): Delete.
569         * cli/cli-decode.c (add_cmd): Adjust.
570
571 2017-07-17  Pedro Alves  <palves@redhat.com>
572
573         * Makefile.in (COMMON_OBS): Add filename-seen-cache.o.
574         * dwarf2read.c: Include "filename-seen-cache.h".
575         * dwarf2read.c (dwarf2_per_objfile) <filenames_cache>: New field.
576         (dw2_map_symbol_filenames): Build and use a filenames_seen_cache.
577         * filename-seen-cache.c: New file.
578         * filename-seen-cache.h: New file.
579         * symtab.c: Include "filename-seen-cache.h".
580         (struct filename_seen_cache, INITIAL_FILENAME_SEEN_CACHE_SIZE)
581         (create_filename_seen_cache, clear_filename_seen_cache)
582         (delete_filename_seen_cache, filename_seen): Delete, parts moved
583         to filename-seen-cache.h/filename-seen-cache.c.
584         (output_source_filename, sources_info)
585         (maybe_add_partial_symtab_filename)
586         (make_source_files_completion_list): Adjust to use
587         filename_seen_cache.
588
589 2017-07-17  Pedro Alves  <palves@redhat.com>
590
591         * dwarf2read.c (dwarf2_per_objfile): In-class initialize all
592         fields.
593         (dwarf2_per_objfile::dwarf2_per_objfile(objfile*, const
594         dwarf2_debug_sections*)): New.
595         (dwarf2_per_objfile::dwarf2_per_objfile(const
596         dwarf2_per_objfile&)): Declare as deleted.
597         (dwarf2_per_objfile::operator=): Declare as deleted.
598         (dwarf2_per_objfile::dwarf2_per_objfile)
599         (dwarf2_per_objfile::~dwarf2_per_objfile)
600         (dwarf2_per_objfile::free_cached_comp_units): New.
601         (dwarf2_has_info): dwarf2_per_objfile initialization code moved to
602         ctor.  Call dwarf2_per_objfile's ctor manually.
603         (dwarf2_locate_sections): Deleted/refactored as ...
604         (dwarf2_per_objfile::locate_sections): ... this new method.
605         (free_cached_comp_units): Defer to
606         dwarf2_per_objfile::free_cached_comp_units.
607         (dwarf2_free_objfile): Call dwarf2_per_objfile's dtor manually.
608
609 2017-07-14  Tom Tromey  <tom@tromey.com>
610
611         PR rust/21764:
612         * rust-exp.y (convert_ast_to_expression): Add "want_type"
613         parameter.
614         <UNOP_SIZEOF>: Split into separate case.
615         <UNOP_VAR_VALUE>: Handle want_type.  Add error case.
616
617 2017-07-14  Tom Tromey  <tom@tromey.com>
618
619         PR rust/21763:
620         * symtab.c (symbol_matches_domain): Add language_rust to special
621         case.
622         * rust-exp.y (convert_ast_to_expression) <OP_VAR_VALUE>: Don't
623         treat LOC_TYPEDEF symbols as variables.
624
625 2017-07-14  Pedro Alves  <palves@redhat.com>
626
627         * symtab.c (make_file_symbol_completion_list_1): Iterate over
628         symtabs matching all symtabs with SRCFILE as file name instead of
629         only considering the first hit, with lookup_symtab.
630
631 2017-07-14  Simon Marchi  <simon.marchi@ericsson.com>
632
633         * ax-gdb.c (gen_aggregate_elt_ref): Remove operand_name and
634         operator_name parameters.
635         (gen_expr): Update function call.
636
637 2017-07-14  Simon Marchi  <simon.marchi@ericsson.com>
638
639         * dwarf2loc.h (dwarf2_compile_expr_to_ax): Remove gdbarch
640         parameter.
641         * symtab.h (struct symbol_computed_ops::tracepoint_var_ref):
642         Likewise.
643         * dwarf2loc.c (dwarf2_compile_expr_to_ax): Remove gdbarch
644         parameter, use agent_expr::gdbarch instead, update function
645         calls.
646         (locexpr_tracepoint_var_ref): Likewise.
647         (loclist_tracepoint_var_ref): Likewise.
648         * ax-gdb.c (gen_trace_static_fields): Likewise.
649         (gen_traced_pop): Likewise.
650         (gen_frame_args_address): Likewise.
651         (gen_frame_locals_address): Likewise.
652         (gen_var_ref): Likewise.
653         (gen_struct_ref_recursive): Likewise.
654         (gen_static_field): Likewise.
655         (gen_maybe_namespace_elt): Likewise.
656         (gen_expr): Likewise.
657         (gen_trace_for_var): Likewise.
658         (gen_trace_for_expr): Likewise.
659         (gen_trace_for_return_address): Likewise.
660
661 2017-07-14  Simon Marchi  <simon.marchi@ericsson.com>
662
663         * ax-gdb.c (gen_deref, gen_address_of): Remove unused ax
664         parameter.
665         (gen_struct_ref, gen_expr, gen_expr_binop_rest): Update call.
666
667 2017-07-14  Simon Marchi  <simon.marchi@ericsson.com>
668
669         * ax-gdb.c (gen_usual_unary): Remove exp parameter, get gdbarch
670         from ax, update calls.
671         (gen_usual_arithmetic): Likewise.
672         (gen_integral_promotions): Likewise.
673         (gen_bitfield_ref): Likewise.
674         (gen_primitive_field): Likewise.
675         (gen_struct_ref_recursive): Likewise.
676         (gen_struct_ref): Likewise.
677         (gen_maybe_namespace_elt): Likewise.
678         (gen_struct_elt_for_reference): Likewise.
679         (gen_namespace_elt): Likewise.
680         (gen_aggregate_elt_ref): Likewise.
681         (gen_expr): Get gdbarch from ax, update calls.
682         (gen_expr_binop_rest): Likewise.
683
684 2017-07-13  Pedro Alves  <palves@redhat.com>
685
686         * amd64-darwin-tdep.c (x86_darwin_init_abi_64): Pass tdesc_amd64
687         as default tdesc.
688         * amd64-dicos-tdep.c (amd64_dicos_init_abi):
689         * amd64-fbsd-tdep.c (amd64fbsd_init_abi):
690         * amd64-linux-tdep.c (amd64_linux_init_abi): Pass
691         tdesc_amd64_linux as default tdesc.  Get final tdesc from the
692         tdep.
693         (amd64_x32_linux_init_abi): Pass tdesc_x32_linux as default tdesc.
694         Get final tdesc from the tdep.
695         * amd64-nbsd-tdep.c (amd64nbsd_init_abi): Pass tdesc_amd64 as
696         default tdesc.
697         * amd64-obsd-tdep.c (amd64obsd_init_abi): Likewise.
698         * amd64-sol2-tdep.c (amd64_sol2_init_abi): Likewise.
699         * amd64-tdep.c (amd64_init_abi): Add 'default_tdesc' parameter.
700         Use it as default tdesc.
701         (amd64_x32_init_abi): Add 'default_tdesc' parameter, and pass it
702         down to amd_init_abi.  No longer handle fallback tdesc here.
703         * amd64-tdep.h (tdesc_x32): Declare.
704         (amd64_init_abi, amd64_x32_init_abi): Add 'default_tdesc'
705         parameter.
706         * amd64-windows-tdep.c (amd64_windows_init_abi): Pass tdesc_amd64
707         as default tdesc.
708
709 2017-07-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
710
711         * s390-linux-tdep.c (s390_process_record): Add support for
712         instructions new in arch12.
713
714 2017-07-11  John Baldwin  <jhb@FreeBSD.org>
715
716         * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers): Use
717         PT_GETFSBASE and PT_GETGSBASE.
718         (amd64bsd_store_inferior_registers): Use PT_SETFSBASE and
719         PT_SETGSBASE.
720
721 2017-07-11  John Baldwin  <jhb@FreeBSD.org>
722
723         * features/Makefile (amd64.dat, amd64-avx.dat, amd64-mpx.dat)
724         (amd64-avx-mpx.dat, amd64-avx-avx512.dat)
725         (amd64-avx-mpx-avx512-pku.dat): Add i386/64bit-segments.xml in
726         those rules.
727         * features/i386/amd64-avx-avx512.xml: Add 64bit-segments.xml.
728         * features/i386/amd64-avx-mpx-avx512-pku.xml: Add 64bit-segments.xml.
729         * features/i386/amd64-avx-mpx.xml: Add 64bit-segments.xml.
730         * features/i386/amd64-avx.xml: Add 64bit-segments.xml.
731         * features/i386/amd64-mpx.xml: Add 64bit-segments.xml.
732         * features/i386/amd64.xml: Add 64bit-segments.xml.
733         * features/i386/amd64-avx-avx512.c: Regenerated.
734         * features/i386/amd64-avx-mpx-avx512-pku.c: Regenerated.
735         * features/i386/amd64-avx-mpx.c: Regenerated.
736         * features/i386/amd64-avx.c: Regenerated.
737         * features/i386/amd64-mpx.c: Regenerated.
738         * features/i386/amd64.c: Regenerated.
739         * regformats/i386/amd64-avx-avx512.dat: Regenerated.
740         * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Regenerated.
741         * regformats/i386/amd64-avx-mpx.dat: Regenerated.
742         * regformats/i386/amd64-avx.dat: Regenerated.
743         * regformats/i386/amd64-mpx.dat: Regenerated.
744         * regformats/i386/amd64.dat: Regenerated.
745
746 2017-07-10  Yao Qi  <yao.qi@linaro.org>
747
748         * features/i386/amd64-avx-avx512-linux.c: Re-generated.
749         * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Re-generated.
750
751 2017-07-10  Anton Kolesov  <Anton.Kolesov@synopsys.com>
752
753         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add setenv and
754         unsetenv.
755         * gnulib/aclocal.m4: Regenerate.
756         * gnulib/config.in: Regenerate.
757         * gnulib/configure: Regenerate.
758         * gnulib/import/Makefile.am: Regenerate.
759         * gnulib/import/Makefile.in: Regenerate.
760         * gnulib/import/m4/gnulib-cache.m4: Regenerate.
761         * gnulib/import/m4/gnulib-comp.m4: Regenerate.
762         * gnulib/import/m4/environ.m4: New file.
763         * gnulib/import/m4/setenv.m4: New file.
764         * gnulib/import/setenv.c: New file.
765         * gnulib/import/unsetenv.c: New file.
766
767 2017-07-09  Simon Marchi  <simon.marchi@ericsson.com>
768
769         * compile/compile-loc2c.c (do_compile_dwarf_expr_to_c): Read
770         address when op is DW_OP_addr.
771
772 2017-07-09  Tom Tromey  <tom@tromey.com>
773
774         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Reverse size
775         check and apply to outer type.
776
777 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
778
779         * fbsd-tdep.c (LWPINFO_OFFSET, LWPINFO_PL_FLAGS)
780         (LWPINFO64_PL_SIGINFO, LWPINFO32_PL_SIGINFO, PL_FLAG_SI)
781         (SIZE64_SIGINFO_T, SIZE32_SIGINFO_T, fbsd_core_xfer_siginfo): New.
782         (fbsd_init_abi): Install gdbarch "core_xfer_siginfo" method.
783
784 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
785
786         * fbsd-tdep.c (fbsd_core_thread_name): Use thread_section_name.
787
788 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
789
790         * corelow.c (get_core_siginfo): Remove.
791         (core_xfer_partial): Use the gdbarch "core_xfer_siginfo" method
792         instead of get_core_siginfo.
793         * gdbarch.sh (core_xfer_siginfo): New gdbarch callback.
794         * gdbarch.h: Re-generate.
795         * gdbarch.c: Re-generate.
796         * linux-tdep.c (linux_core_xfer_siginfo): New.
797         (linux_init_abi): Install gdbarch "core_xfer_siginfo" method.
798
799 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
800
801         * corelow.c (thread_section_name): Move to ...
802         * gdbcore.h (thread_section_name): ... here.
803
804 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
805
806         * fbsd-nat.c [PT_LWPINFO && __LP64__] (union sigval32)
807         (struct siginfo32): New.
808         [PT_LWPINFO] (fbsd_siginfo_size, fbsd_convert_siginfo): New.
809         (fbsd_xfer_partial) [PT_LWPINFO]: Handle TARGET_OBJECT_SIGNAL_INFO
810         via ptrace(PT_LWPINFO).
811
812 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
813
814         * fbsd-tdep.c (fbsd_gdbarch_data_handle, struct fbsd_gdbarch_data)
815         (init_fbsd_gdbarch_data, get_fbsd_gdbarch_data)
816         (fbsd_get_siginfo_type): New.
817         (fbsd_init_abi): Install gdbarch "get_siginfo_type" method.
818         (_initialize_fbsd_tdep): New.
819
820 2017-07-06  David Blaikie  <dblaikie@gmail.com>
821
822         * dwarf2read.c (struct dwo_file): Use a htab of dwo_unit* (rather than
823         a singular dwo_unit*) to support multiple CUs in the same way that
824         multiple TUs are supported.
825         (create_cus_hash_table): Replace create_dwo_cu with a function for
826         parsing multiple CUs from a DWO file.
827         (open_and_init_dwo_file): Use create_cus_hash_table rather than
828         create_dwo_cu.
829         (lookup_dwo_cutu): Lookup CU in the hash table in the dwo_file with
830         htab_find, rather than comparing the signature to a singleton CU in
831         the dwo_file.
832
833 2017-07-06  Pedro Alves  <palves@redhat.com>
834
835         * python/py-unwind.c (pyuw_dealloc_cache): Fix for loop condition.
836
837 2017-07-04  Pedro Alves  <palves@redhat.com>
838
839         * gdbtypes.c (recursive_dump_type): Don't reference TYPE_STATIC.
840         * gdbtypes.h (TYPE_STATIC): Delete.
841         (struct fn_field) <is_public, is_abstract, is_static, is_final,
842         is_synchronized, is_native>: Delete.
843         <dummy>: Bump.
844         (TYPE_FN_FIELD_PUBLIC, TYPE_FN_FIELD_STATIC, TYPE_FN_FIELD_FINAL)
845         (TYPE_FN_FIELD_SYNCHRONIZED, TYPE_FN_FIELD_NATIVE)
846         (TYPE_FN_FIELD_ABSTRACT): Delete.
847
848 2017-07-03  Simon Marchi  <simon.marchi@ericsson.com>
849
850         * buffer.h (buffer_finish): Fix spelling mistakes.
851
852 2017-07-01  Eli Zaretskii  <eliz@gnu.org>
853
854         * .dir-locals.el: Automatically switch to C-style comments in
855         versions of Emacs that support the feature.
856
857 2017-06-30  Sergio Durigan Junior  <sergiodj@redhat.com>
858             Pedro Alves  <palves@redhat.com>
859
860         PR cli/21688
861         * cli/cli-script.c (command_name_equals_not_inline): Remove function.
862         (process_next_line): New variable 'inline_cmd'.
863         Adjust 'if' clauses for "python", "compile" and "guile" to use
864         'command_name_equals' and check for '!inline_cmd'.
865
866 2017-06-30  Sergio Durigan Junior  <sergiodj@redhat.com>
867
868         PR cli/21688
869         * cli/cli-script.c (command_name_equals_not_inline): New function.
870         (process_next_line): Adjust 'if' clauses for "python", "compile"
871         and "guile" to use command_name_equals_not_inline.
872
873 2017-06-29  Pedro Alves  <palves@redhat.com>
874
875         * completer.c (expression_completer): Call
876         linespec_location_completer instead of location_completer.
877
878 2017-06-29  Pedro Alves  <palves@redhat.com>
879
880         * completer.c (expression_completer): Remove code that recomputes
881         'text' from 'word'.
882
883 2017-06-29  Yao Qi  <yao.qi@linaro.org>
884
885         * regformats/regdat.sh: Generate code with
886         "ifndef IN_PROCESS_AGENT".
887
888 2017-06-28  Pedro Alves  <palves@redhat.com>
889
890         * command.h: Include "common/scoped_restore.h".
891
892 2017-06-28  Yao Qi  <yao.qi@linaro.org>
893
894         * mi/mi-cmd-break.c (mi_argv_to_format): Use obstack_grow_str
895         instead of obstack_grow.
896
897 2017-06-28  Doug Gilmore  <Doug.Gilmore@imgtec.com>
898
899         PR gdb/21337
900         * symfile.c (reread_symbols): Call objfiles_changed just before
901         read_symbols.
902
903 2017-06-27  Pedro Alves  <palves@redhat.com>
904
905         * symtab.c (COMPLETION_LIST_ADD_SYMBOL)
906         (MCOMPLETION_LIST_ADD_SYMBOL): Delete macros, replace with ...
907         (completion_list_add_symbol, completion_list_add_msymbol):
908         ... these new functions.
909         (add_symtab_completions)
910         (default_make_symbol_completion_list_break_on_1): Adjust.
911
912 2017-06-27  Pedro Alves  <palves@redhat.com>
913
914         * objfiles.c (get_objfile_bfd_data): Call bfd_alloc instead of
915         bfd_zalloc.  Call objfile_per_bfd_storage's ctor.
916         (free_objfile_per_bfd_storage): Call objfile_per_bfd_storage's
917         dtor.
918         * objfiles.h (objfile_per_bfd_storage): Add ctor.  Make
919         'storage_obstack' field an auto_obstack.  In-class initialize all
920         non-bitfield fields.  Make minsyms_read bool.
921         * symfile.c (read_symbols): Adjust.
922
923 2017-06-27  Alan Hayward  <alan.hayward@arm.com>
924
925         * remote-sim.c (gdbsim_fetch_register): Use byte_vector.
926         (gdbsim_store_register): Likewise.
927
928 2017-06-27  Pedro Alves  <palves@redhat.com>
929
930         * c-exp.y (name_obstack): Now an auto_obstack.
931         (yylex): Use auto_obstack::clear.
932         (c_parse): Use auto_obstack::clear instead of reinitializing and
933         freeing the obstack.
934         * c-lang.c (evaluate_subexp_c): Use auto_obstack.
935         * d-exp.y (name_obstack): Now an auto_obstack.
936         (yylex): Use auto_obstack::clear.
937         (d_parse): Use auto_obstack::clear instead of reinitializing and
938         freeing the obstack.
939         * dwarf2loc.c (fetch_const_value_from_synthetic_pointer): Use
940         auto_obstack.
941         * dwarf2read.c (create_addrmap_from_index)
942         (dwarf2_build_psymtabs_hard)
943         (update_enumeration_type_from_children): Likewise.
944         * gdb_obstack.h (auto_obstack): New type.
945         * go-exp.y (name_obstack): Now an auto_obstack.
946         (build_packaged_name): Use auto_obstack::clear.
947         (go_parse): Use auto_obstack::clear instead of reinitializing and
948         freeing the obstack.
949         * linux-tdep.c (linux_make_mappings_corefile_notes): Use
950         auto_obstack.
951         * printcmd.c (printf_wide_c_string, ui_printf): Use auto_obstack.
952         * rust-exp.y (work_obstack): Now an auto_obstack.
953         (rust_parse, rust_lex_tests): Use auto_obstack::clear instead of
954         reinitializing and freeing the obstack.
955         * utils.c (do_obstack_free, make_cleanup_obstack_free): Delete.
956         (host_char_to_target): Use auto_obstack.
957         * utils.h (make_cleanup_obstack_free): Delete declaration.
958         * valprint.c (generic_emit_char, generic_printstr): Use
959         auto_obstack.
960
961 2017-06-27  Simon Marchi  <simon.marchi@ericsson.com>
962
963         * darwin-nat.c (darwin_check_new_threads): Don't handle dummy
964         thread.
965         (darwin_init_thread_list): Don't update dummy thread.
966         (darwin_create_inferior, darwin_attach): Don't add a dummy thread.
967
968 2017-06-26  Simon Marchi  <simon.marchi@ericsson.com>
969
970         * record-full.c (netorder16): Remove.
971
972 2017-06-26  Simon Marchi  <simon.marchi@ericsson.com>
973
974         * common/diagnostics.h: Define macros for GCC.
975         (DIAGNOSTIC_IGNORE_UNUSED_FUNCTION): New macro.
976         * common/vec.h: Include diagnostics.h.
977         (DIAGNOSTIC_IGNORE_UNUSED_VEC_FUNCTION): New macro.
978         (DEF_VEC_I, DEF_VEC_P, DEF_VEC_O): Ignore -Wunused-function
979         warning.
980
981 2017-06-26  Simon Marchi  <simon.marchi@ericsson.com>
982
983         * common/diagnostics.h (DIAGNOSTIC_IGNORE_DEPRECATED_REGISTER):
984         New macro.
985         * ada-lex.l: Ignore deprecated register warnings.
986
987 2017-06-25  Simon Marchi  <simon.marchi@ericsson.com>
988
989         * main.c (get_init_files): Replace "SYSTEM_GDBINIT +
990         datadir_len" with "&SYSTEM_GDBINIT[datadir_len]".
991
992 2017-06-25  Simon Marchi  <simon.marchi@ericsson.com>
993
994         * dtrace-probe.c (dtrace_process_dof_probe): Put semi-colon on
995         its own line.
996
997 2017-06-25  Simon Marchi  <simon.marchi@ericsson.com>
998
999         * nat/x86-dregs.c (x86_show_dr): Print registers one per line.
1000
1001 2017-06-23  Alan Hayward  <alan.hayward@arm.com>
1002
1003         * xtensa-tdep.c (XTENSA_MAX_REGISTER_SIZE): Add.
1004         (xtensa_register_write_masked): Use XTENSA_MAX_REGISTER_SIZE.
1005         (xtensa_register_read_masked): Likewise.
1006
1007 2017-06-22  Sergio Durigan Junior  <sergiodj@redhat.com>
1008
1009         * common/environ.c (gdb_environ::unset): Update comment.
1010
1011 2017-06-22  Alan Hayward  <alan.hayward@arm.com>
1012
1013         * python/py-unwind.c (pyuw_sniffer): Allocate space for
1014         registers.
1015
1016 2017-06-22  Alan Hayward  <alan.hayward@arm.com>
1017
1018         * record-full.c (record_full_exec_insn): Use byte_vector.
1019
1020 2017-06-22  Yao Qi  <yao.qi@linaro.org>
1021
1022         * regformats/i386/amd64-avx-mpx-avx512-pku-linux.dat: Regenerated.
1023         * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Regenerated.
1024
1025 2017-06-22  Alan Hayward  <alan.hayward@arm.com>
1026
1027         * remote.c (cached_reg): Move from here...
1028         * regcache.h (cached_reg): ...to here.
1029         * python/py-unwind.c (struct reg_info): Remove.
1030         (cached_frame_info): Use cached_reg_t.
1031         (pyuw_prev_register): Likewise.
1032         (pyuw_sniffer): Use cached_reg_t and allocate registers.
1033         (pyuw_dealloc_cache): Free all registers.
1034
1035 2017-06-22  Pedro Alves  <palves@redhat.com>
1036             Simon Marchi  <simon.marchi@ericsson.com>
1037
1038         * unittests/environ-selftests.c (run_tests): Ignore -Wself-move
1039         warning.
1040         * common/diagnostics.h: New file.
1041
1042 2017-06-22  Pedro Alves  <palves@redhat.com>
1043
1044         * common/agent.h: Add include guards.
1045
1046 2017-06-21  Simon Marchi  <simon.marchi@ericsson.com>
1047
1048         * target.h (struct target_ops) <to_xfer_partial>: Update doc to
1049         talk about addressable units instead of bytes.
1050
1051 2017-06-20  Sergio Durigan Junior  <sergiodj@redhat.com>
1052
1053         * common/environ.c (gdb_environ::unset): Use '::iterator' instead
1054         of '::const_iterator'.
1055
1056 2017-06-20  Sergio Durigan Junior  <sergiodj@redhat.com>
1057
1058         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
1059         'unittests/environ-selftests.c'.
1060         (SUBDIR_UNITTESTS_OBS): Add 'environ-selftests.o'.
1061         * charset.c (find_charset_names): Declare object 'iconv_env'.
1062         Update code to use 'iconv_env' object.  Remove call to
1063         'free_environ'.
1064         * common/environ.c: Include <utility>.
1065         (make_environ): Delete function.
1066         (free_environ): Delete function.
1067         (gdb_environ::clear): New function.
1068         (gdb_environ::operator=): New function.
1069         (gdb_environ::get): Likewise.
1070         (environ_vector): Delete function.
1071         (set_in_environ): Delete function.
1072         (gdb_environ::set): New function.
1073         (unset_in_environ): Delete function.
1074         (gdb_environ::unset): New function.
1075         (gdb_environ::envp): Likewise.
1076         * common/environ.h: Include <vector>.
1077         (struct gdb_environ): Delete; transform into...
1078         (class gdb_environ): ... this class.
1079         (free_environ): Delete prototype.
1080         (init_environ, get_in_environ, set_in_environ, unset_in_environ,
1081         environ_vector): Likewise.
1082         * infcmd.c (run_command_1): Update code to call
1083         'envp' from 'gdb_environ' class.
1084         (environment_info): Update code to call methods from 'gdb_environ'
1085         class.
1086         (unset_environment_command): Likewise.
1087         (path_info): Likewise.
1088         (path_command): Likewise.
1089         * inferior.c (inferior::~inferior): Delete call to 'free_environ'.
1090         (inferior::inferior): Initialize 'environment' using the host's
1091         information.
1092         * inferior.h: Remove forward declaration of 'struct gdb_environ'.
1093         Include "environ.h".
1094         (class inferior) <environment>: Change type from 'struct
1095         gdb_environ' to 'gdb_environ'.
1096         * mi/mi-cmd-env.c (mi_cmd_env_path): Update code to call
1097         methods from 'gdb_environ' class.
1098         * solib.c (solib_find_1): Likewise
1099         * unittests/environ-selftests.c: New file.
1100
1101 2017-06-20  Yao Qi  <yao.qi@linaro.org>
1102
1103         * features/i386/i386-linux.xml: Exchange the order of including
1104         32bit-linux.xml and 32bit-sse.xml.
1105         * features/i386/i386-linux.c: Regenerated.
1106
1107 2017-06-20  Yao Qi  <yao.qi@linaro.org>
1108
1109         * target-descriptions.c (tdesc_reg): Add ctor, dtor.
1110         Delete copy ctor and assignment operator.
1111         (tdesc_type): Likewise.
1112         (tdesc_feature): Likewise.
1113         (tdesc_free_reg): Remove.
1114         (tdesc_create_reg): Use new.
1115         (tdesc_free_type): Remove.
1116         (tdesc_create_vector): Use new.
1117         (tdesc_create_union): Likewise.
1118         (tdesc_create_flags): Likewise.
1119         (tdesc_create_enum): Likewise.
1120         (tdesc_free_feature): Delete.
1121         (free_target_description): Use delete.
1122
1123 2017-06-19  John Baldwin  <jhb@FreeBSD.org>
1124
1125         * mips-tdep.c (print_gp_register_row): Don't error for unavailable
1126         registers.
1127
1128 2017-06-19  Pedro Alves  <palves@redhat.com>
1129
1130         * dwarf2read.c (write_psymtabs_to_index): Construct file_closer
1131         after gdb::unlinker.
1132
1133 2017-06-19  Sergio Durigan Junior  <sergiodj@redhat.com>
1134
1135         * mi/mi-cm-env.c (_initialize_mi_cmd_env): Use getenv instead of
1136         gdb_environ to access an environment variable.
1137
1138 2017-06-18  Thomas Petazzoni  <thomas.petazzoni@free-electrons.com>
1139
1140         * nat/linux-ptrace.c (linux_fork_to_function): Add cast to
1141         gdb_byte*.
1142
1143 2017-06-17  Simon Marchi  <simon.marchi@ericsson.com>
1144
1145         * nat/fork-inferior.h (trace_start_error): Add ATTRIBUTE_PRINTF.
1146
1147 2017-06-17  Simon Marchi  <simon.marchi@ericsson.com>
1148
1149         * configure: Re-generate.
1150         * warning.m4 (build_warnings): Add -Wno-mismatched-tags.
1151
1152 2017-06-17  Simon Marchi  <simon.marchi@ericsson.com>
1153
1154         * configure: Re-generate.
1155         * warning.m4: Pass -Werror to compiler when checking for
1156         supported warning flags.
1157
1158 2017-06-17  Simon Marchi  <simon.marchi@ericsson.com>
1159
1160         * Makefile.in (COMPILE.pre): Add "-x c++".
1161
1162 2017-06-16  Alan Hayward  <alan.hayward@arm.com>
1163             Pedro Alves  <palves@redhat.com>
1164             Yao Qi  <yao.qi@linaro.org>
1165
1166         * defs.h (RequireLongest): New.
1167         (extract_integer): Declare function template.
1168         (extract_signed_integer): Remove the declaration, but define it
1169         static inline.
1170         (extract_unsigned_integer): Likewise.
1171         (store_integer): Declare function template.
1172         (store_signed_integer): Remove the declaration, but define it
1173         static inline.
1174         (store_unsigned_integer): Likewise.
1175         * findvar.c (extract_integer): New function template.
1176         (extract_signed_integer): Remove.
1177         (extract_unsigned_integer): Remove.
1178         (extract_integer<LONGEST>, extract_integer<ULONGEST>): Explicit
1179         instantiations.
1180         (store_integer): New function template.
1181         (store_signed_integer): Remove.
1182         (store_unsigned_integer): Remove.
1183         (store_integer): Explicit instantiations.
1184         * regcache.c (regcache_raw_read_signed): Update.
1185         (regcache::raw_read): New function.
1186         (regcache::raw_read_signed): Remove.
1187         (regcache::raw_read_unsigned): Remove.
1188         (regcache_raw_read_unsigned): Update.
1189         (regcache_raw_write_unsigned): Update.
1190         (regcache::raw_write_signed): Remove.
1191         (regcache::raw_write): New function.
1192         (regcache_cooked_read_signed): Update.
1193         (regcache::raw_write_unsigned): Remove.
1194         (regcache::cooked_read_signed): Remove.
1195         (regcache_cooked_read_unsigned): Update.
1196         (regcache::cooked_read_unsigned): Remove.
1197         (regcache_cooked_write_signed): Update.
1198         (regcache_cooked_write_unsigned): Update.
1199         * regcache.h (regcache) <raw_read_signed>: Remove.
1200         <raw_write_signed, raw_read_unsigned, raw_write_unsigned>: Remove.
1201         <raw_read, raw_write>: New.
1202         <cooked_read_signed, cooked_write_signed>: Remove.
1203         <cooked_write_unsigned, cooked_read_unsigned>: Remove.
1204         <cooked_read, cooked_write>: New.
1205         * sh64-tdep.c (sh64_pseudo_register_read): Update.
1206         (sh64_pseudo_register_write): Update.
1207
1208 2017-06-16  Anton Kolesov  <anton.kolesov@synopsys.com>
1209
1210         * arc-tdep.c (arc_disassembler_options): New variable.
1211         (arc_gdbarch_init): Set and use it. Use arc_delayed_print_insn instead
1212         of default_print_insn.
1213         (arc_delayed_print_insn): Set info->section when needed,
1214         use default_print_insn to retrieve a disassembler.
1215
1216 2017-06-14  Sergio Durigan Junior  <sergiodj@redhat.com>
1217
1218         PR gdb/21574
1219         * infcmd.c (_initialize_infcmd): Expand "help run" documentation
1220         to mention $SHELL and startup-with-shell.
1221
1222 2017-06-14  Max Filippov  <jcmvbkbc@gmail.com>
1223
1224         * MAINTAINERS: Move Maxim Grigoriev to the Past Maintainers.
1225
1226 2017-06-14  Yao Qi  <yao.qi@linaro.org>
1227
1228         * aarch64-tdep.c (aarch64_gdb_print_insn): Call
1229         default_print_insn instead of print_insn_aarch64.
1230         * arm-tdep.c (gdb_print_insn_arm): Call
1231         default_print_insn instead of print_insn_big_arm
1232         and print_insn_little_arm.
1233         * i386-tdep.c (i386_print_insn): Call default_print_insn
1234         instead of print_insn_i386.
1235         * ia64-tdep.c (ia64_print_insn): Call
1236         default_print_insn instead of print_insn_ia64.
1237         * mips-tdep.c (gdb_print_insn_mips): Call
1238         default_print_insn instead of print_insn_big_mips
1239         and print_insn_little_mips.
1240         * spu-tdep.c (gdb_print_insn_spu): Call default_print_insn
1241         instead of print_insn_spu.
1242
1243 2017-06-14  Pedro Alves  <palves@redhat.com>
1244
1245         * ada-lang.c: Include "common/byte-vector.h".
1246         (ada_value_primitive_packed_val): Use gdb::byte_vector.
1247         * charset.c (wchar_iterator::iterate): Resize the vector instead
1248         of reserving it.
1249         * common/byte-vector.h: Include "common/def-vector.h".
1250         (wchar_iterator::m_out): Now a gdb::def_vector<gdb_wchar_t>.
1251         * cli/cli-dump.c: Include "common/byte-vector.h".
1252         (dump_memory_to_file, restore_binary_file): Use gdb::byte_vector.
1253         * common/byte-vector.h: New file.
1254         * common/def-vector.h: New file.
1255         * common/default-init-alloc.h: New file.
1256         * dwarf2loc.c: Include "common/byte-vector.h".
1257         (rw_pieced_value): Use gdb::byte_vector, and resize the vector
1258         instead of reserving it.
1259         * dwarf2read.c: Include "common/byte-vector.h".
1260         (data_buf::m_vec): Now a gdb::byte_vector.
1261         * gdb_regex.c: Include "common/def-vector.h".
1262         (compiled_regex::compiled_regex): Use gdb::def_vector<char>.
1263         * mi/mi-main.c: Include "common/byte-vector.h".
1264         (mi_cmd_data_read_memory): Use gdb::byte_vector.
1265         * printcmd.c: Include "common/byte-vector.h".
1266         (print_scalar_formatted): Use gdb::byte_vector.
1267         * valprint.c: Include "common/byte-vector.h".
1268         (maybe_negate_by_bytes, print_decimal_chars): Use
1269         gdb::byte_vector.
1270
1271 2017-06-13  Simon Marchi  <simon.marchi@ericsson.com>
1272
1273         * darwin-nat.c: Include "nat/fork-inferior.h".
1274
1275 2017-06-13  Simon Marchi  <simon.marchi@ericsson.com>
1276
1277         * configure.nat: Factor out Darwin bits that are not
1278         architecture-specific.  Add fork-inferior.o.
1279
1280 2017-06-13  Simon Marchi  <simon.marchi@ericsson.com>
1281
1282         * configure.nat: Factor out AIX bits that are not
1283         architecture-specific.  Add fork-inferior.o.
1284
1285 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
1286
1287         * dwarf2loc.c (rw_pieced_value): New.  Merge logic from...
1288         (read_pieced_value, write_pieced_value): ...here.  Reduce to
1289         wrappers that just call rw_pieced_value.
1290
1291 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
1292
1293         * dwarf2loc.c (write_pieced_value): When writing the data for a
1294         memory piece, use write_memory_with_notification instead of
1295         write_memory.
1296
1297 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
1298
1299         * valops.c (read_value_memory): Change embedded_offset to
1300         represent a bit offset instead of a byte offset.
1301         * value.h (read_value_memory): Adjust comment.
1302
1303 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
1304
1305         * dwarf2loc.c (read_pieced_value): Remove unnecessary variables
1306         dest_offset_bits and source_offset_bits.
1307         (write_pieced_value): Likewise.
1308
1309 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
1310
1311         * dwarf2loc.c (read_pieced_value): Respect the piece offset, as
1312         given by DW_OP_bit_piece.
1313         (write_pieced_value): Likewise.
1314
1315 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
1316
1317         * dwarf2loc.c (read_pieced_value): Move the buffer allocation and
1318         some other preparations to the places where sufficient information
1319         is available.
1320         (write_pieced_value): Likewise.
1321
1322 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
1323
1324         * dwarf2loc.c (bits_to_bytes): New function.
1325         (read_pieced_value): Fix offset calculations for register pieces
1326         on big-endian targets.
1327         (write_pieced_value): Likewise.
1328
1329 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
1330
1331         * dwarf2loc.c (read_pieced_value): Remove buffer_size variable.
1332         (write_pieced_value): Likewise.
1333
1334 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
1335
1336         * dwarf2loc.c (write_pieced_value): When writing to a bit-field,
1337         transfer the source value's least significant bits, instead of its
1338         lowest-addressed ones.  Rename type_len to max_offset.
1339         (read_pieced_value): Mirror above changes to write_pieced_value as
1340         applicable.
1341
1342 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
1343
1344         * dwarf2loc.c (write_pieced_value): In DWARF_VALUE_MEMORY,
1345         truncate full bytes from dest_offset_bits before using it as an
1346         offset into the buffer.
1347
1348 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
1349
1350         * dwarf2loc.c (write_pieced_value): Include transfer size in
1351         byte-wise check.
1352
1353 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
1354
1355         * dwarf2loc.c (write_pieced_value): Fix copy/paste error in the
1356         calculation of this_size.
1357
1358 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
1359
1360         * dwarf2loc.c (read_pieced_value): Respect parent value's offset
1361         when targeting a bit-field.
1362         (write_pieced_value): Likewise.
1363
1364 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
1365
1366         * dwarf2loc.c (struct piece_closure) <addr_size>: Remove field.
1367         (allocate_piece_closure): Drop addr_size parameter.
1368         (dwarf2_evaluate_loc_desc_full): Adjust call to
1369         allocate_piece_closure.
1370
1371 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
1372
1373         PR gdb/21226
1374         * dwarf2loc.c (read_pieced_value): Anchor stack value pieces at
1375         the LSB end, independent of endianness.
1376
1377 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
1378
1379         * dwarf2loc.c (write_pieced_value): Fix order of calculations for
1380         size capping.
1381
1382 2017-06-13  Yao Qi  <yao.qi@linaro.org>
1383
1384         * mips-linux-nat.c: Move include features/mips*-linux.c to
1385         mips-linux-tdep.c.
1386         (_initialize_mips_linux_nat): Move initialize_tdesc_mips* calls
1387         to mips-linux-tdep.c.
1388         * mips-linux-tdep.c: Include features/mips*-linux.c
1389         (_initialize_mips_linux_tdep): Call initialize_tdesc_mips*
1390         functions.
1391         * mips-linux-tdep.h (tdesc_mips_linux): Declare.
1392         (tdesc_mips_dsp_linux, tdesc_mips64_linux): Declare.
1393         (tdesc_mips64_dsp_linux): Declare.
1394
1395 2017-06-12  Tom Tromey  <tom@tromey.com>
1396
1397         * valprint.h (val_print_type_code_int): Remove.
1398         * valprint.c (generic_val_print_int): Always call
1399         val_print_scalar_formatted.
1400         (val_print_type_code_int): Remove.
1401         * printcmd.c (print_scalar_formatted): Handle options->format==0.
1402         * f-valprint.c (f_val_print): Use val_print_scalar_formatted.
1403         * c-valprint.c (c_val_print_int): Use val_print_scalar_formatted.
1404         * ada-valprint.c (ada_val_print_num): Use
1405         val_print_scalar_formatted.
1406
1407 2017-06-12  Tom Tromey  <tom@tromey.com>
1408
1409         * printcmd.c (print_scalar_formatted): Unify the two switches.
1410         Don't convert scalars to LONGEST.
1411
1412 2017-06-12  Tom Tromey  <tom@tromey.com>
1413
1414         PR exp/16225:
1415         * valprint.h (print_decimal_chars): Update.
1416         * valprint.c (maybe_negate_by_bytes): New function.
1417         (print_decimal_chars): Add "is_signed" argument.
1418         * printcmd.c (print_scalar_formatted): Update.
1419
1420 2017-06-12  Tom Tromey  <tom@tromey.com>
1421
1422         PR exp/16225:
1423         * valprint.h (print_binary_chars, print_hex_chars): Update.
1424         * valprint.c (val_print_type_code_int): Update.
1425         (print_binary_chars): Add "zero_pad" argument.
1426         (emit_octal_digit): New function.
1427         (print_octal_chars): Don't zero-pad.
1428         (print_decimal_chars): Likewise.
1429         (print_hex_chars): Add "zero_pad" argument.
1430         * sh64-tdep.c (sh64_do_fp_register): Update.
1431         * regcache.c (regcache::dump): Update.
1432         * printcmd.c (print_scalar_formatted): Update.
1433         * infcmd.c (default_print_one_register_info): Update.
1434
1435 2017-06-12  Pedro Alves  <palves@redhat.com>
1436             Alan Hayward  <alan.hayward@arm.com>
1437
1438         * mips-tdep.c (MAX_MIPS_ABI_REGSIZE): New.
1439         (mips_eabi_push_dummy_call): Rename local 'regsize' to
1440         'abi_regsize'.  Rename local array 'valbuf' to 'ref_valbuf', and
1441         use MAX_MIPS_ABI_REGSIZE instead of MAX_REGISTER_SIZE to size it.
1442         Assert that abi_regsize bytes fit in 'ref_valbuf'.
1443
1444 2017-06-12  Pedro Alves  <palves@redhat.com>
1445
1446         * dwarf2read.c (mapped_symtab::data): Now a vector of
1447         symtab_index_entry instead of vector of
1448         std::unique_ptr<symtab_index_entry>.  All users adjusted to check
1449         whether an element's name is NULL instead of checking whether the
1450         element itself is NULL.
1451         (find_slot): Change return type.  Adjust.
1452         (hash_expand, , add_index_entry, uniquify_cu_indices)
1453         (write_hash_table): Adjust.
1454
1455 2017-06-12  Pedro Alves  <palves@redhat.com>
1456
1457         * dwarf2read.c (recursively_count_psymbols): New function.
1458         (write_psymtabs_to_index): Call it to compute number of psyms and
1459         pass estimate size of psyms_seen to unordered_set's ctor.
1460
1461 2017-06-12  Pedro Alves  <palves@redhat.com>
1462
1463         * dwarf2read.c (write_hash_table): Check if key already exists
1464         before emplacing.
1465
1466 2017-06-12  Pedro Alves  <palves@redhat.com>
1467
1468         * dwarf2read.c (data_buf::append_space): Rename to...
1469         (data_buf::grow): ... this, and make private.  Adjust all callers.
1470         (data_buf::append_uint): New method.
1471         (add_address_entry, write_one_signatured_type)
1472         (write_psymtabs_to_index): Use it.
1473
1474 2017-06-12  Pedro Alves  <palves@redhat.com>
1475
1476         * dwarf2read.c (file_write(FILE *, const void *, size_t)): Delete.
1477         (file_write (FILE *, const std::vector<Elem>&)): Delete.
1478         (data_buf::file_write): Call ::fwrite directly.
1479
1480 2017-06-12  Pedro Alves  <palves@redhat.com>
1481
1482         * dwarf2read.c (uniquify_cu_indices): Use std::unique and
1483         std::vector::erase.
1484
1485 2017-06-12  Jan Kratochvil  <jan.kratochvil@redhat.com>
1486
1487         Code cleanup: C++ify .gdb_index producer.
1488         * dwarf2read.c: Include <unordered_set> and <unordered_map>.
1489         (MAYBE_SWAP) [WORDS_BIGENDIAN]: Cast to offset_type.
1490         (struct strtab_entry, hash_strtab_entry, eq_strtab_entry)
1491         (create_strtab, add_string): Remove.
1492         (file_write, data_buf): New.
1493         (struct symtab_index_entry): Use std::vector for cu_indices.
1494         (struct mapped_symtab): Use std::vector for data.
1495         (hash_symtab_entry, eq_symtab_entry, delete_symtab_entry)
1496         (create_symbol_hash_table, create_mapped_symtab, cleanup_mapped_symtab):
1497         Remove.
1498         (find_slot): Change return type.  Update it to the new data structures.
1499         (hash_expand, add_index_entry): Update it to the new data structures.
1500         (offset_type_compare): Remove.
1501         (uniquify_cu_indices): Update it to the new data structures.
1502         (c_str_view, c_str_view_hasher, vector_hasher): New.
1503         (add_indices_to_cpool): Remove.
1504         (write_hash_table): Update it to the new data structures.
1505         (struct psymtab_cu_index_map, hash_psymtab_cu_index)
1506         (eq_psymtab_cu_index): Remove.
1507         (psym_index_map): New typedef.
1508         (struct addrmap_index_data): Change addr_obstack pointer to data_buf
1509         reference and std::unordered_map for cu_index_htab.
1510         (add_address_entry, add_address_entry_worker, write_address_map)
1511         (write_psymbols): Update it to the new data structures.
1512         (write_obstack): Remove.
1513         (struct signatured_type_index_data): Change types_list to a data_buf
1514         reference and psyms_seen to a std::unordered_set reference.
1515         (write_one_signatured_type, recursively_write_psymbols)
1516         (write_psymtabs_to_index): Update it to the new data structures.
1517
1518 2017-06-11  Simon Marchi  <simon.marchi@ericsson.com>
1519
1520         * NEWS (Changes since GDB 8.0): Announce {set,show} debug
1521         separate-debug-file commands.
1522         * symfile.h (separate_debug_file_debug): New global.
1523         * symfile.c (separate_debug_file_debug): New global.
1524         (separate_debug_file_exists, find_separate_debug_file): Add
1525         debug output.
1526         (_initialize_symfile): Add "set debug separate-debug-file"
1527         command.
1528         * build-id.c (build_id_to_debug_bfd,
1529         find_separate_debug_file_by_buildid): Add debug output.
1530
1531 2017-06-10  Simon Marchi  <simon.marchi@polymtl.ca>
1532
1533         * gdbarch.sh (displaced_step_free_closure): Remove.
1534         * gdbarch.h, gdbarch.c: Re-generate.
1535         * aarch64-linux-tdep.c (aarch64_linux_init_abi): Don't set
1536         displaced_step_free_closure.
1537         * amd64-linux-tdep.c (amd64_linux_init_abi_common): Likewise.
1538         * arm-linux-tdep.c (arm_linux_init_abi): Likewise.
1539         * i386-linux-tdep.c (i386_linux_init_abi): Likewise.
1540         * rs6000-aix-tdep.c (rs6000_aix_init_osabi): Likewise.
1541         * rs6000-tdep.c (rs6000_gdbarch_init): Likewise.
1542         * s390-linux-tdep.c (s390_gdbarch_init): Likewise.
1543         * arch-utils.h (simple_displaced_step_free_closure): Remove.
1544         * arch-utils.c (simple_displaced_step_free_closure): Remove.
1545         * infrun.c (displaced_step_clear): Call xfree instead of
1546         gdbarch_displaced_step_free_closure.
1547
1548 2017-06-08  Sergio Durigan Junior  <sergiodj@redhat.com>
1549
1550         * common/common-utils.c (stringify_argv): Check for "arg[0] !=
1551         NULL".
1552
1553 2017-06-08 Alan Hayward  <alan.hayward@arm.com>
1554
1555         * mn10300-tdep.c (MN10300_MAX_REGISTER_SIZE): Add.
1556         (mn10300_extract_return_value): Use MN10300_MAX_REGISTER_SIZE.
1557         (mn10300_push_dummy_call): Likewise.
1558
1559 2017-06-08  Alan Hayward  <alan.hayward@arm.com>
1560
1561         * mi/mi-main.c (register_changed_p): Use value_contents_eq.
1562
1563 2017-06-08  Alan Hayward  <alan.hayward@arm.com>
1564
1565         * mi/mi-main.c (register_changed_p): Use cooked_read_value.
1566
1567 2017-06-07  Sergio Durigan Junior  <sergiodj@redhat.com>
1568
1569         * NEWS (Changes since GDB 8.0): Announce that GDBserver is now
1570         able to start inferiors using a shell.
1571         (New remote packets): Announce new packet "QStartupWithShell".
1572         * remote.c: Add PACKET_QStartupWithShell.
1573         (extended_remote_create_inferior): Handle new
1574         PACKET_QStartupWithShell.
1575         (remote_protocol_features) <QStartupWithShell>: New entry for
1576         PACKET_QStartupWithShell.
1577         (_initialize_remote): Call "add_packet_config_cmd" for
1578         QStartupShell.
1579
1580 2017-06-07  Sergio Durigan Junior  <sergiodj@redhat.com>
1581             Pedro Alves  <palves@redhat.com>
1582
1583         * Makefile.in (HFILES_NO_SRCDIR): Add "common/common-inferior.h"
1584         and "nat/fork-inferior.h".
1585         * common/common-inferior.h: New file, with contents from
1586         "gdb/inferior.h".
1587         * commom/common-utils.c: Include "common-utils.h".
1588         (stringify_argv): New function.
1589         * common/common-utils.h (stringify_argv): New prototype.
1590         * configure.nat: Add "fork-inferior.o" as a dependency for
1591         "*linux*", "fbsd*" and "nbsd*" hosts.
1592         * corefile.c (get_exec_file): Update comment.
1593         * darwin-nat.c (darwin_ptrace_him): Call "gdb_startup_inferior"
1594         instead of "startup_inferior".
1595         (darwin_create_inferior): Call "add_thread_silent" after
1596         "fork_inferior".
1597         * fork-child.c: Cleanup unnecessary includes.
1598         (SHELL_FILE): Move to "common/common-fork-child.c".
1599         (environ): Likewise.
1600         (exec_wrapper): Initialize.
1601         (get_exec_wrapper): New function.
1602         (breakup_args): Move to "common/common-fork-child.c"; rename to
1603         "breakup_args_for_exec".
1604         (escape_bang_in_quoted_argument): Move to
1605         "common/common-fork-child.c".
1606         (saved_ui): New variable.
1607         (prefork_hook): New function.
1608         (postfork_hook): Likewise.
1609         (postfork_child_hook): Likewise.
1610         (gdb_startup_inferior): Likewise.
1611         (fork_inferior): Move to "common/common-fork-child.c".  Update
1612         function to support gdbserver.
1613         (startup_inferior): Likewise.
1614         * gdbcore.h (get_exec_file): Remove declaration.
1615         * gnu-nat.c (gnu_create_inferior): Call "gdb_startup_inferior"
1616         instead of "startup_inferior".  Call "add_thread_silent" after
1617         "fork_inferior".
1618         * inf-ptrace.c: Include "nat/fork-inferior.h" and "utils.h".
1619         (inf_ptrace_create_inferior): Call "gdb_startup_inferior"
1620         instead of "startup_inferior".  Call "add_thread_silent" after
1621         "fork_inferior".
1622         * inferior.h: Include "common-inferior.h".
1623         (trace_start_error): Move to "common/common-utils.h".
1624         (trace_start_error_with_name): Likewise.
1625         (fork_inferior): Move prototype to "nat/fork-inferior.h".
1626         (startup_inferior): Likewise.
1627         (gdb_startup_inferior): New prototype.
1628         * nat/fork-inferior.c: New file, with contents from "fork-child.c".
1629         * nat/fork-inferior.h: New file.
1630         * procfs.c (procfs_init_inferior): Call "gdb_startup_inferior"
1631         instead of "startup_inferior".  Call "add_thread_silent" after
1632         "fork_inferior".
1633         * target.h (target_terminal_init): Move prototype to
1634         "target/target.h".
1635         (target_terminal_inferior): Likewise.
1636         (target_terminal_ours): Likewise.
1637         * target/target.h (target_terminal_init): New prototype, moved
1638         from "target.h".
1639         (target_terminal_inferior): Likewise.
1640         (target_terminal_ours): Likewise.
1641         * utils.c (gdb_flush_out_err): New function.
1642
1643 2017-06-07  Sergio Durigan Junior  <sergiodj@redhat.com>
1644
1645         * Makefile.in (HFILES_NO_SRCDIR): Add "common/common-gdbthread.h".
1646         * common/common-gdbthread.h: New file, with parts from
1647         "gdb/gdbthread.h".
1648         * gdbthread.h: Include "common-gdbthread.h".
1649         (switch_to_thread): Moved to "common/common-gdbthread.h".
1650
1651 2017-06-07  Sergio Durigan Junior  <sergiodj@redhat.com>
1652
1653         * Makefile.in (SFILES): Add "common/job-control.c".
1654         (HFILES_NO_SRCDIR): Add "common/job-control.h".
1655         (COMMON_OBS): Add "job-control.o".
1656         * common/job-control.c: New file, with contents from
1657         "gdb/inflow.c".
1658         * common/job-control.h: New file, with contents from "terminal.h".
1659         * fork-child.c: Include "job-control.h".
1660         * inflow.c: Include "job-control.h".
1661         (gdb_setpgid): Move to "common/common-inflow.c".
1662         (_initialize_inflow): Move setting of "job_control" to
1663         "handle_job_control".
1664         * terminal.h (job_control): Moved to "common/common-terminal.h".
1665         (gdb_setpgid): Likewise.
1666         * top.c: Include "job_control.h".
1667         * utils.c: Likewise.
1668         (job_control): Moved to "job-control.c".
1669
1670 2017-06-07  Pedro Alves  <palves@redhat.com>
1671
1672         * Makefile.in (SFILES): Add gdb_regex.c.
1673         (COMMON_OBS): Add gdb_regex.o.
1674         * ada-lang.c (ada_add_standard_exceptions)
1675         (ada_add_exceptions_from_frame, name_matches_regex)
1676         (ada_add_global_exceptions, ada_exceptions_list_1): Change regex
1677         parameter type to compiled_regex.  Adjust.
1678         (ada_exceptions_list): Use compiled_regex.
1679         * break-catch-throw.c (exception_catchpoint::pattern): Now a
1680         std::unique_ptr<compiled_regex>.
1681         (exception_catchpoint::~exception_catchpoint): Remove regfree
1682         call.
1683         (check_status_exception_catchpoint): Adjust to use compiled_regex.
1684         (handle_gnu_v3_exceptions): Adjust to use compiled_regex.
1685         * breakpoint.c (solib_catchpoint::compiled): Now a
1686         std::unique_ptr<compiled_regex>.
1687         (solib_catchpoint::~solib_catchpoint): Remove regfree call.
1688         (check_status_catch_solib): Adjust to use compiled_regex.
1689         (add_solib_catchpoint): Adjust to use compiled_regex.
1690         * cli/cli-cmds.c (apropos_command): Use compiled_regex.
1691         * cli/cli-decode.c (apropos_cmd): Change regex parameter to
1692         compiled_regex reference.  Adjust to use it.
1693         * cli/cli-decode.h: Remove struct re_pattern_buffer forward
1694         declaration.  Include "gdb_regex.h".
1695         (apropos_cmd): Change regex parameter to compiled_regex reference.
1696         * gdb_regex.c: New file.
1697         * gdb_regex.h (make_regfree_cleanup, get_regcomp_error): Delete
1698         declarations.
1699         (class compiled_regex): New.
1700         * linux-tdep.c: Include "common/gdb_optional.h".
1701         (struct mapping_regexes): New, factored out from
1702         mapping_is_anonymous_p, and adjusted to use compiled_regex.
1703         (mapping_is_anonymous_p): Use mapping_regexes wrapped in a
1704         gdb::optional and remove cleanups.  Adjust to compiled_regex.
1705         * probe.c: Include "common/gdb_optional.h".
1706         (collect_probes): Use compiled_regex and gdb::optional and remove
1707         cleanups.
1708         * skip.c: Include "common/gdb_optional.h".
1709         (skiplist_entry::compiled_function_regexp): Now a
1710         gdb::optional<compiled_regex>.
1711         (skiplist_entry::compiled_function_regexp_is_valid): Delete field.
1712         (free_skiplist_entry): Remove regfree call.
1713         (compile_skip_regexp, skip_rfunction_p): Adjust to use
1714         compiled_regex and gdb::optional.
1715         * symtab.c: Include "common/gdb_optional.h".
1716         (search_symbols): Use compiled_regex and gdb::optional.
1717         * utils.c (do_regfree_cleanup, make_regfree_cleanup)
1718         (get_regcomp_error, compile_rx_or_error): Delete.  Some bits moved
1719         to gdb_regex.c.
1720
1721 2017-06-07  Alan Hayward  <alan.hayward@arm.com>
1722
1723         * regcache.c (regcache::save): Avoid buffer use.
1724         (regcache::dump): Likewise.
1725
1726 2017-06-07  Alan Hayward  <alan.hayward@arm.com>
1727
1728         * sh-tdep.c (sh_pseudo_register_read): Remove
1729         MAX_REGISTER_SIZE.
1730         (sh_pseudo_register_write): Likewise.
1731         * sh64-tdep.c (sh64_pseudo_register_read): Likewise.
1732         (sh64_pseudo_register_write): Likewise
1733
1734 2017-06-07  Alan Hayward  <alan.hayward@arm.com>
1735
1736         * aarch64-tdep.c (aarch64_store_return_value): Use
1737         V_REGISTER_SIZE.
1738         (aarch64_pseudo_read_value): Likewise.
1739         (aarch64_pseudo_write): Likewise.
1740
1741 2017-06-06  Yao Qi  <yao.qi@linaro.org>
1742
1743         * regformats/regdef.h (set_register_cache): Remove the
1744         declaration.
1745
1746 2017-06-06 Alan Hayward  <alan.hayward@arm.com>
1747
1748         * frame.c (frame_unwind_register_signed): Use
1749         frame_unwind_register_value.
1750
1751 2017-06-06  Pedro Alves  <palves@redhat.com>
1752
1753         PR breakpoints/21553
1754         * breakpoint.c (create_breakpoints_sal_default)
1755         (init_breakpoint_sal, create_breakpoint_sal): Use
1756         gdb::unique_xmalloc_ptr for string parameters.
1757         (create_breakpoint): Constify 'extra_string' and 'cond_string'
1758         parameters.  Replace cleanups with gdb::unique_xmalloc_ptr.
1759         (base_breakpoint_create_breakpoints_sal)
1760         (bkpt_create_breakpoints_sal, tracepoint_create_breakpoints_sal)
1761         (strace_marker_create_breakpoints_sal)
1762         (create_breakpoints_sal_default): Use gdb::unique_xmalloc_ptr for
1763         string parameters.
1764         * breakpoint.h (breakpoint_ops::create_breakpoints_sal): Use
1765         gdb::unique_xmalloc_ptr for string parameters.
1766         (create_breakpoint): Constify 'extra_string' and 'cond_string'
1767         parameters.
1768
1769 2017-06-06  Alan Hayward  <alan.hayward@arm.com>
1770
1771         * alpha-tdep.c (alpha_register_to_value): Use
1772         get_frame_register_value.
1773         (alpha_value_to_register): Use ALPHA_REGISTER_SIZE.
1774
1775 2017-06-06  Alan Hayward  <alan.hayward@arm.com>
1776
1777         * ia64-tdep.c (IA64_MAX_FP_REGISTER_SIZE) Add.
1778         (ia64_register_to_value): Use IA64_MAX_FP_REGISTER_SIZE.
1779         (ia64_value_to_register): Likewise.
1780         (ia64_extract_return_value): Likewise.
1781         (ia64_store_return_value): Likewise.
1782         (ia64_push_dummy_call): Likewise.
1783
1784 2017-06-04  Joel Brobecker  <brobecker@adacore.com>
1785
1786         GDB 8.0 released.
1787
1788 2017-06-03  Simon Marchi  <simon.marchi@ericsson.com>
1789
1790         * x86-linux-nat.c (struct arch_lwp_info): Remove.
1791
1792 2017-06-03  Simon Marchi  <simon.marchi@polymtl.ca>
1793
1794         * linux-nat.c (linux_nat_post_attach_wait): Remove FIRST
1795         parameter.
1796         (linux_nat_attach): Adjust call to linux_nat_post_attach_wait.
1797
1798 2017-06-02  Simon Marchi  <simon.marchi@ericsson.com>
1799
1800         * event-loop.c (poll_timers): Unallocate timer using delete
1801         instead of xfree.
1802
1803 2017-06-02  Simon Marchi  <simon.marchi@polymtl.ca>
1804
1805         * breakpoint.h (struct breakpoint_ops) <dtor>: Remove.
1806         (struct breakpoint) <~breakpoint>: New.
1807         (struct watchpoint): Inherit from breakpoint.
1808         <~watchpoint>: New.
1809         <base>: Remove.
1810         (struct tracepoint): Inherit from breakpoint.
1811         <base>: Remove.
1812         * breakpoint.c (longjmp_breakpoint_ops): Remove.
1813         (struct longjmp_breakpoint): Inherit from breakpoint.
1814         <~longjmp_breakpoint>: New.
1815         <base>: Remove.
1816         (new_breakpoint_from_type): Remove casts.
1817         (watchpoint_in_thread_scope): Remove reference to base field.
1818         (watchpoint_del_at_next_stop): Likewise.
1819         (update_watchpoint): Likewise.
1820         (watchpoint_check): Likewise.
1821         (bpstat_check_watchpoint): Likewise.
1822         (set_longjmp_breakpoint): Likewise.
1823         (struct fork_catchpoint): Inherit from breakpoint.
1824         <base>: Remove.
1825         (struct solib_catchpoint): Inherit from breakpoint.
1826         <~solib_catchpoint>: New.
1827         <base>: Remove.
1828         (dtor_catch_solib): Change to ...
1829         (solib_catchpoint::~solib_catchpoint): ... this.
1830         (breakpoint_hit_catch_solib): Remove reference to base field.
1831         (add_solib_catchpoint): Likewise.
1832         (create_fork_vfork_event_catchpoint): Likewise.
1833         (struct exec_catchpoint): Inherit from breakpoint.
1834         <~exec_catchpoint>: New.
1835         <base>: Remove.
1836         (dtor_catch_exec): Change to ...
1837         (exec_catchpoint::~exec_catchpoint): ... this.
1838         (dtor_watchpoint): Change to ...
1839         (watchpoint::~watchpoint): ... this.
1840         (watch_command_1): Remove reference to base field.
1841         (catch_exec_command_1): Likewise.
1842         (base_breakpoint_dtor): Change to ...
1843         (breakpoint::~breakpoint): ... this.
1844         (base_breakpoint_ops): Remove dtor field value.
1845         (longjmp_bkpt_dtor): Change to ...
1846         (longjmp_breakpoint::~longjmp_breakpoint): ... this.
1847         (strace_marker_create_breakpoints_sal): Remove reference to base
1848         field.
1849         (delete_breakpoint): Don't manually call breakpoint destructor.
1850         (create_tracepoint_from_upload): Remove reference to base field.
1851         (trace_pass_set_count): Likewise.
1852         (initialize_breakpoint_ops): Don't initialize
1853         momentary_breakpoint_ops, don't set dtors.
1854         * ada-lang.c (struct ada_catchpoint): Inherit from breakpoint.
1855         <~ada_catchpoint>: New.
1856         <base>: Remove.
1857         (create_excep_cond_exprs): Remove reference to base field.
1858         (dtor_exception): Change to ...
1859         (ada_catchpoint::~ada_catchpoint): ... this.
1860         (dtor_catch_exception): Remove.
1861         (dtor_catch_exception_unhandled): Remove.
1862         (dtor_catch_assert): Remove.
1863         (create_ada_exception_catchpoint): Remove reference to base
1864         field.
1865         (initialize_ada_catchpoint_ops): Don't set dtors.
1866         * break-catch-sig.c (struct signal_catchpoint): Inherit from
1867         breakpoint.
1868         <~signal_catchpoint>: New.
1869         <base>: Remove.
1870         (signal_catchpoint_dtor): Change to ...
1871         (signal_catchpoint::~signal_catchpoint): ... this.
1872         (create_signal_catchpoint): Remove reference to base field.
1873         (initialize_signal_catchpoint_ops): Don't set dtor.
1874         * break-catch-syscall.c (struct syscall_catchpoint): Inherit
1875         from breakpoint.
1876         <~syscall_catchpoint>: New.
1877         <base>: Remove.
1878         (dtor_catch_syscall): Change to ...
1879         (syscall_catchpoint::~syscall_catchpoint): ... this.
1880         (create_syscall_event_catchpoint): Remove reference to base
1881         field.
1882         (initialize_syscall_catchpoint_ops): Don't set dtor.
1883         * break-catch-throw.c (struct exception_catchpoint): Inherit
1884         from breakpoint.
1885         <~exception_catchpoint>: New.
1886         <base>: Remove.
1887         (dtor_exception_catchpoint): Change to ...
1888         (exception_catchpoint::~exception_catchpoint): ... this.
1889         (handle_gnu_v3_exceptions): Remove reference to base field.
1890         (initialize_throw_catchpoint_ops): Don't set dtor.
1891         * ctf.c (ctf_get_traceframe_address): Remove reference to base
1892         field.
1893         * remote.c (remote_get_tracepoint_status): Likewise.
1894         * tracefile-tfile.c (tfile_get_traceframe_address): Likewise.
1895         * tracefile.c (tracefile_fetch_registers): Likewise.
1896         * tracepoint.c (actions_command): Likewise.
1897         (validate_actionline): Likewise.
1898         (tfind_1): Likewise.
1899         (get_traceframe_location): Likewise.
1900         (find_matching_tracepoint_location): Likewise.
1901         (parse_tracepoint_status): Likewise.
1902         * mi/mi-cmd-break.c (mi_cmd_break_passcount): Likewise.
1903
1904 2017-06-02  Simon Marchi  <simon.marchi@polymtl.ca>
1905
1906         * breakpoint.c (struct longjmp_breakpoint): New struct.
1907         (is_tracepoint_type): Change return type to bool.
1908         (is_longjmp_type): New function.
1909         (new_breakpoint_from_type): Handle longjmp kinds of breakpoints.
1910         (set_raw_breakpoint_without_location): Use
1911         new_breakpoint_from_type.
1912         (set_raw_breakpoint): Likewise.
1913
1914 2017-06-02  Simon Marchi  <simon.marchi@polymtl.ca>
1915
1916         * breakpoint.c (new_breakpoint_from_type): New function.
1917         (create_breakpoint_sal): Use new_breakpoint_from_type and
1918         unique_ptr.
1919         (create_breakpoint): Likewise.
1920
1921 2017-05-31  Simon Marchi  <simon.marchi@ericsson.com>
1922
1923         * memattr.c (mem_info_command): Rename to ...
1924         (info_mem_command): ... this.
1925         (mem_enable_command): Rename to ...
1926         (enable_mem_command): ... this.
1927         (mem_disable_command): Rename to ...
1928         (disable_mem_command): ... this.
1929         (mem_delete_command): Rename to ...
1930         (delete_mem_command): ... this.
1931         (_initialize_mem): Adjust function names.
1932
1933 2017-05-31  Markus Metzger  <markus.t.metzger@intel.com>
1934
1935         * btrace.c (handle_pt_insn_events): New.
1936         (ftrace_add_pt): Call handle_pt_insn_events.  Rename ERRCODE into
1937         STATUS.  Split into this and ...
1938         (handle_pt_insn_event_flags): ... this.
1939
1940 2017-05-31  Markus Metzger  <markus.t.metzger@intel.com>
1941
1942         * configure.ac: Check for pt_insn_event, struct pt_insn.enabled,
1943         and struct pt_insn.resynced.
1944         * configure: Regenerated.
1945         * config.in: Regenerated.
1946
1947 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
1948
1949         * btrace.c (ftrace_find_call_by_number): New function.
1950         (ftrace_new_function): Store objects, not pointers.
1951         (ftrace_find_call_by_number, ftrace_new_return, ftrace_new_switch,
1952         ftrace_new_gap, ftrace_update_function,
1953         ftrace_compute_global_level_offset, btrace_stich_bts, btrace_clear,
1954         btrace_insn_get, btrace_insn_get_error, btrace_insn_end,
1955         btrace_insn_next, btrace_insn_prev, ptrace_find_insn_by_number,
1956         btrace_ends_with_single_insn, btrace_call_get): Account for
1957         btrace_thread_info::functions now storing objects.
1958         * btrace.h (struct btrace_thread_info): Add constructor.
1959         (struct btrace_thread_info) <functions>: Make std::vector.
1960         (struct btrace_thread_info) <prev, next, up, insn, errcode, flags):
1961         Initialize with default values.
1962         * record-btrace.c (record_btrace_frame_sniffer): Account for
1963         btrace_thread_info::functions now storing objects.
1964
1965 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
1966
1967         * btrace.c: Remove typedef bfun_s.
1968         (ftrace_new_gap): Directly add gaps to the list of gaps.
1969         (btrace_bridge_gaps, btrace_compute_ftrace_bts, pt_btrace_insn_flags,
1970         ftrace_add_pt, btrace_compute_ftrace_pt, btrace_compute_ftrace_1,
1971         btrace_finalize_ftrace, btrace_compute_ftrace): Use std::vector
1972         instead of gdb VEC.
1973
1974 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
1975
1976         * btrace.c (ftrace_fixup_caller, ftrace_new_return, ftrace_connect_bfun,
1977         ftrace_bridge_gap): Replace references to btrace_thread_info::segment
1978         with btrace_thread_info::next_segment and
1979         btrace_thread_info::prev_segment.
1980         * btrace.h: Remove struct btrace_func_link.
1981         (struct btrace_function): Replace pair of function segment pointers
1982         with pair of indices.
1983         * python/py-record-btrace.c (btpy_call_prev_sibling,
1984         btpy_call_next_sibling): Replace references to
1985         btrace_thread_info::segment with btrace_thread_info::next_segment and
1986         btrace_thread_info::prev_segment.
1987         * record-btrace.c (record_btrace_frame_this_id): Use
1988         btrace_find_call_by_number.
1989
1990 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
1991
1992         * btrace.c (ftrace_new_function, ftrace_fixup_level,
1993         ftrace_connect_bfun, ftrace_bridge_gap, btrace_bridge_gaps,
1994         btrace_insn_next, btrace_insn_prev): Remove references to
1995         btrace_thread_info::flow.
1996         * btrace.h (struct btrace_function): Remove FLOW.
1997
1998 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
1999
2000         * btrace.c (ftrace_find_call_by_number): New function.
2001         (ftrace_update_caller, ftrace_new_call, ftrace_new_tailcall,
2002         ftrace_get_caller, ftrace_find_call, ftrace_new_return,
2003         ftrace_match_backtrace, ftrace_connect_bfun, ftrace_connect_backtrace,
2004         ftrace_bridge_gap, btrace_bridge_gaps): Use btrace_function::up as an
2005         index.
2006         * btrace.h (struct btrace_function): Turn UP into an index.
2007         * python/py-record-btrace.c (btpy_call_up): Use btrace_function::up
2008         as an index.
2009         * record-btrace.c (record_btrace_frame_unwind_stop_reason,
2010         record_btrace_frame_prev_register, record_btrace_frame_sniffer,
2011         record_btrace_tailcall_frame_sniffe): Use btrace_find_call_by_number.
2012
2013 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
2014
2015         * btrace.c (ftrace_new_function, ftrace_new_call, ftrace_new_tailcall,
2016         ftrace_new_return, ftrace_new_switch, ftrace_new_gap,
2017         ftrace_update_function, ftrace_compute_global_level_offset,
2018         btrace_compute_ftrace_bts, ftrace_add_pt, btrace_compute_ftrace_pt,
2019         btrace_stitch_bts, btrace_fetch, btrace_clear, btrace_insn_number,
2020         btrace_insn_end, btrace_is_empty): Remove references to
2021         btrace_thread_info::begin and btrace_thread_info::end.
2022         * btrace.h (struct btrace_thread_info): Remove BEGIN and END.
2023         (struct btrace_thread_info) <functions>: Adjust comment.
2024         * record-btrace.c (record_btrace_start_replaying): Remove reference to
2025         btrace_thread_info::begin.
2026
2027 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
2028
2029         * btrace.c (ftrace_new_function, ftrace_new_call, ftrace_new_tailcall,
2030         ftrace_new_return, ftrace_new_switch, ftrace_new_gap,
2031         ftrace_update_function): Remove arguments that implicitly were always
2032         BTINFO->END.
2033         (btrace_compute_ftrace_bts, ftrace_add_pt, btrace_compute_ftrace_pt):
2034         Don't pass BTINFO->END.
2035
2036 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
2037
2038         * btrace.c: (btrace_insn_get, btrace_insn_get_error, btrace_insn_number,
2039         btrace_insn_begin, btrace_insn_end, btrace_insn_next, btrace_insn_prev,
2040         btrace_find_insn_by_number): Replace function segment pointer with
2041         index.
2042         (btrace_insn_cmp): Simplify.
2043         * btrace.h: (struct btrace_insn_iterator) Rename index to
2044         insn_index.  Replace function segment pointer with index into function
2045         segment vector.
2046         * record-btrace.c (record_btrace_call_history): Replace function
2047         segment pointer use with index.
2048         (record_btrace_frame_sniffer): Retrieve function call segment through
2049         vector.
2050         (record_btrace_set_replay): Remove defunc't safety check.
2051
2052 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
2053
2054         * btrace.c (btrace_ends_with_single_insn): New function.
2055         (btrace_call_get, btrace_call_number, btrace_call_begin,
2056         btrace_call_end, btrace_call_next, btrace_call_prev,
2057         btrace_find_call_by_number): Use index into call segment vector
2058         instead of pointer.
2059         (btrace_call_cmp): Simplify.
2060         * btrace.h (struct btrace_call_iterator): Replace function call segment
2061         pointer with index into vector.
2062         * record-btrace.c (record_btrace_call_history): Use index instead of
2063         pointer.
2064
2065 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
2066
2067         * btrace.c (btrace_insn_begin, btrace_insn_end,
2068         btrace_find_insn_by_number): Add btinfo to iterator.
2069         * btrace.h (struct btrace_insn_iterator): Add btinfo.
2070
2071 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
2072
2073         * btrace.c (ftrace_new_function): Add btrace_thread_info to arguments
2074         and save pointers directly.
2075         (ftrace_new_call, ftrace_new_tailcall, ftrace_new_return,
2076         ftrace_new_switch, ftrace_new_gap, ftrace_update_function,
2077         ftrace_add_pt): Add btrace_thread_info to arguments.  Adjust for
2078         changed signature of functions.
2079         (btrace_compute_ftrace_pt): Adjust for changed signature of functions.
2080         (btrace_fetch): Remove code that adds btrace_function pointers to
2081         vector of btrace_functions.
2082         (btrace_clear): Simplify freeing vector of btrace_functions.
2083
2084 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
2085
2086         * btrace.c (btrace_fetch, btrace_clear, btrace_find_insn_by_number):
2087         Replace VEC_* with std::vector functions.
2088         * btrace.h: Add include: vector. Remove typedef for DEF_VEC_P.
2089         (struct btrace_thread_info)<functions>: Change type to std::vector.
2090
2091 2017-05-30  Simon Marchi  <simon.marchi@ericsson.com>
2092
2093         * NEWS (Changes in GDB 8.0): Remove extra empty line.  Move
2094         "Removed targets and native configurations" up.  Merge duplicate
2095         "New commands" sub-sections.  Add "New options" sub-sections.
2096
2097 2017-05-26  Alan Hayward  <alan.hayward@arm.com>
2098
2099         * defs.h (copy_integer_to_size): New declaration.
2100         * findvar.c (copy_integer_to_size): New function.
2101         (do_cint_test): New selftest function.
2102         (copy_integer_to_size_test): Likewise.
2103         (_initialize_findvar): Likewise.
2104         * mips-fbsd-tdep.c (mips_fbsd_supply_reg): Use raw_supply_integer.
2105         (mips_fbsd_collect_reg): Use raw_collect_integer.
2106         * mips-linux-tdep.c (supply_32bit_reg): Use raw_supply_integer.
2107         (mips64_fill_gregset): Use raw_collect_integer
2108         (mips64_fill_fpregset): Use raw_supply_integer.
2109         * regcache.c (regcache::raw_supply_integer): New function.
2110         (regcache::raw_collect_integer): Likewise.
2111         * regcache.h: (regcache::raw_supply_integer): New declaration.
2112         (regcache::raw_collect_integer): Likewise.
2113
2114 2017-05-24  Yao Qi  <yao.qi@linaro.org>
2115
2116         * Makefile.in (SFILES): Add gdbarch-selftests.c.
2117         (COMMON_OBS): Add gdbarch-selftests.o.
2118         * frame.c [GDB_SELF_TESTS] (create_new_frame): New function.
2119         * frame.h [GDB_SELF_TESTS] (create_new_frame): Declare.
2120         * gdbarch-selftests.c: New file.
2121         * regcache.h (regcache) <~regcache>: Mark it virtual if
2122         GDB_SELF_TEST.
2123         <raw_write>: Likewise.
2124
2125 2017-05-24  Yao Qi  <yao.qi@linaro.org>
2126
2127         * regcache.c (current_regcache): Change it to
2128         regcache::current_regcache.
2129         (regcache_observer_target_changed): Update.
2130         (regcache_thread_ptid_changed): Make it a regcache static
2131         method.
2132         (regcache_thread_ptid_changed): Update.
2133         (class regcache_access): New.
2134         (current_regcache_test): Update.
2135         (_initialize_regcache): Update.
2136         * regcache.h: Include forward_list.
2137         (regcache): Declare regcache_thread_ptid_changed and declare
2138         registers_changed_ptid as friend.
2139
2140 2017-05-24  Yao Qi  <yao.qi@linaro.org>
2141
2142         * i387-tdep.c (i387_register_to_value): Use register_size
2143         instead of TYPE_LENGTH.
2144         * m68k-tdep.c (m68k_register_to_value): Likewise.
2145
2146 2017-05-24  Yao Qi  <yao.qi@linaro.org>
2147
2148         * i387-tdep.c (i387_convert_register_p): Return false if type
2149         code isn't TYPE_CODE_FLT.
2150
2151 2017-05-24  Yao Qi  <yao.qi@linaro.org>
2152
2153         * alpha-tdep.c (alpha_convert_register_p): Return true if type
2154         length is 4.
2155         (alpha_register_to_value): Remove type length check.
2156         (alpha_value_to_register): Likewise.
2157
2158 2017-05-24  Yao Qi  <yao.qi@linaro.org>
2159
2160         * ia64-tdep.c (ia64_convert_register_p): Check type's code is
2161         TYPE_CODE_FLT.
2162
2163 2017-05-24  Yao Qi  <yao.qi@linaro.org>
2164
2165         * m68k-tdep.c (m68k_convert_register_p): Check type's code is
2166         TYPE_CODE_FLT or not.
2167
2168 2017-05-24  Yao Qi  <yao.qi@linaro.org>
2169
2170         * alpha-tdep.c (alpha_gdbarch_init): Use XCNEW instead of XNEW.
2171         * avr-tdep.c (avr_gdbarch_init): Likewise.
2172         * bfin-tdep.c (bfin_gdbarch_init): Likewise.
2173         * cris-tdep.c (cris_gdbarch_init): Likewise.
2174         * ft32-tdep.c (ft32_gdbarch_init): Likewise.
2175         * lm32-tdep.c (lm32_gdbarch_init): Likewise.
2176         * m32r-tdep.c (m32r_gdbarch_init): Likewise.
2177         * m68hc11-tdep.c (m68hc11_gdbarch_init): Likewise.
2178         * mep-tdep.c (mep_gdbarch_init): Likewise.
2179         * microblaze-tdep.c (microblaze_gdbarch_init): Likewise.
2180         * mips-tdep.c (mips_gdbarch_init): Likewise.
2181         * mn10300-tdep.c (mn10300_gdbarch_init): Likewise.
2182         * moxie-tdep.c (moxie_gdbarch_init): Likewise.
2183         * msp430-tdep.c (msp430_gdbarch_init): Likewise.
2184         * sh64-tdep.c (sh64_gdbarch_init): Likewise.
2185         * v850-tdep.c (v850_gdbarch_init): Likewise.
2186
2187 2017-05-24  Yao Qi  <yao.qi@linaro.org>
2188
2189         * selftest-arch.c (tests_with_arch): Call registers_changed
2190         and reinit_frame_cache.
2191         * selftest.c (run_self_tests): Likewise.
2192
2193 2017-05-24  Yao Qi  <yao.qi@linaro.org>
2194
2195         * rs6000-tdep.c (gdb_print_insn_powerpc): Remove.
2196         (rs6000_gdbarch_init): Don't call set_gdbarch_print_insn.
2197
2198 2017-05-24  Yao Qi  <yao.qi@linaro.org>
2199
2200         * rl78-tdep.c (rl78_gdbarch_init): Don't call
2201         set_gdbarch_print_insn.
2202
2203 2017-05-24  Yao Qi  <yao.qi@linaro.org>
2204
2205         * h8300-tdep.c (h8300_gdbarch_init): Don't call
2206         set_gdbarch_print_insn.
2207
2208 2017-05-24  Yao Qi  <yao.qi@linaro.org>
2209
2210         * alpha-tdep.c (alpha_gdbarch_init): Don't call
2211         set_gdbarch_print_insn.
2212         * arc-tdep.c (arc_gdbarch_init): Likewise.
2213         * arch-utils.c: include dis-asm.h.
2214         (default_print_insn): New function.
2215         * arch-utils.h (default_print_insn): Declare.
2216         * avr-tdep.c (avr_gdbarch_init): Don't call set_gdbarch_print_insn.
2217         * bfin-tdep.c (bfin_gdbarch_init): Likewise.
2218         * cris-tdep.c (cris_delayed_get_disassembler): Remove.
2219         (cris_gdbarch_init): Don't call set_gdbarch_print_insn.
2220         * frv-tdep.c (frv_gdbarch_init): Likewise.
2221         * ft32-tdep.c (ft32_gdbarch_init): Likewise.
2222         * gdbarch.sh (print_insn): Use default_print_insn.
2223         * gdbarch.c: Regenerated.
2224         * hppa-tdep.c (hppa_gdbarch_init): Likewise.
2225         * iq2000-tdep.c (iq2000_gdbarch_init): Likewise.
2226         * lm32-tdep.c (lm32_gdbarch_init): Likewise.
2227         * m32c-tdep.c (m32c_gdbarch_init): Likewise.
2228         * m32r-tdep.c (m32r_gdbarch_init): Likewise.
2229         * m68hc11-tdep.c (gdb_print_insn_m68hc11): Remove.
2230         (m68hc11_gdbarch_init): Don't call set_gdbarch_print_insn.
2231         * m68k-tdep.c (m68k_gdbarch_init): Likewise.
2232         * m88k-tdep.c (m88k_gdbarch_init): Likewise.
2233         * microblaze-tdep.c (microblaze_gdbarch_init): Likewise.
2234         * mn10300-tdep.c (mn10300_gdbarch_init): Likewise.
2235         * moxie-tdep.c (moxie_gdbarch_init): Likewise.
2236         * msp430-tdep.c (msp430_gdbarch_init): Likewise.
2237         * mt-tdep.c (mt_gdbarch_init): Likewise.
2238         * nds32-tdep.c (nds32_gdbarch_init): Likewise.
2239         * nios2-tdep.c (nios2_print_insn): Remove.
2240         (nios2_gdbarch_init): Don't call set_gdbarch_print_insn.
2241         * rx-tdep.c (rx_gdbarch_init): Likewise.
2242         * s390-linux-tdep.c (s390_gdbarch_init): Likewise.
2243         * score-tdep.c (score_print_insn): Remove.
2244         (score_gdbarch_init): Don't call set_gdbarch_print_insn.
2245         * sh-tdep.c (sh_gdbarch_init): Likewise.
2246         * sh64-tdep.c (sh64_gdbarch_init): Likewise.
2247         * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
2248         * tic6x-tdep.c (tic6x_print_insn): Remove.
2249         (tic6x_gdbarch_init): Don't call set_gdbarch_print_insn.
2250         * tilegx-tdep.c (tilegx_gdbarch_init): Likewise.
2251         * v850-tdep.c (v850_gdbarch_init): Likewise.
2252         * vax-tdep.c (vax_gdbarch_init): Likewise.
2253         * xstormy16-tdep.c (xstormy16_gdbarch_init): Likewise.
2254         * xtensa-tdep.c (xtensa_gdbarch_init): Likewise.
2255
2256 2017-05-23  John Baldwin  <jhb@FreeBSD.org>
2257
2258         * mips-fbsd-tdep.c (MIPS_PC_REGNUM): Remove.
2259         (MIPS_FP0_REGNUM): Remove.
2260         (MIPS_FSR_REGNUM): Remove.
2261         (mips_fbsd_supply_fpregs): Use mips_regnum.
2262         (mips_fbsd_supply_gregs): Likewise.
2263         (mips_fbsd_collect_fpregs): Likewise.
2264         (mips_fbsd_collect_gregs): Likewise.
2265
2266 2017-05-23  John Baldwin  <jhb@FreeBSD.org>
2267
2268         * mips-fbsd-nat.c (getregs_supplies): Fix upper bound comparison.
2269         (getpfpregs_supplies): New function.
2270         (mips_fbsd_fetch_inferior_registers): Remove early exit and use
2271         getfpregs_supplies.
2272         (mips_fbsd_store_inferior_registers): Likewise.
2273
2274 2017-05-22  Pedro Alves <palves@redhat.com>
2275
2276         * MAINTAINERS (Host/Native): Add John Baldwin as FreeBSD
2277         maintainer.
2278
2279 2017-05-22  Alan Hayward  <alan.hayward@arm.com>
2280
2281         * ppc-linux-nat.c (fetch_register): Use PPC_MAX_REGISTER_SIZE.
2282         (store_register): Likewise.
2283         * ppc-sysv-tdep.c (ppc_sysv_abi_push_dummy_call): Likewise.
2284         (get_decimal_float_return_value): Likewise.
2285         (do_ppc_sysv_return_value): Likewise.
2286         (ppc64_sysv_abi_push_integer): Likewise.
2287         (ppc64_sysv_abi_push_freg): Likewise.
2288         (ppc64_sysv_abi_return_value_base): Likewise.
2289         (ppc64_sysv_abi_return_value): Likewise.
2290         * rs6000-aix-tdep.c (rs6000_push_dummy_call): Likewise.
2291         * rs6000-lynx178-tdep.c (rs6000_lynx178_push_dummy_call): Likewise.
2292         * rs6000-nat.c: Likewise.
2293         * rs6000-tdep.c (rs6000_register_to_value): Likewise.
2294         (rs6000_value_to_register): Likewise.
2295         * ppc-tdep.h (PPC_MAX_REGISTER_SIZE): Add.
2296
2297 2017-05-21  Tom Tromey  <tom@tromey.com>
2298
2299         PR rust/21466:
2300         * rust-lang.c (rust_print_type) <TYPE_CODE_ARRAY>: Print unsized
2301         arrays as "[T]", not "[T; ]".
2302
2303 2017-05-19  Tom Tromey  <tom@tromey.com>
2304
2305         PR rust/21484:
2306         * rust-lang.c (exp_descriptor_rust): New function.
2307         (rust_language_defn): Use it.
2308         * p-lang.c (pascal_language_defn): Update.
2309         * opencl-lang.c (opencl_language_defn): Update.
2310         * objc-lang.c (objc_language_defn): Update.
2311         * m2-lang.c (m2_language_defn): Update.
2312         * language.h (struct language_defn)
2313         <la_watch_location_expression>: New member.
2314         * language.c (unknown_language_defn, auto_language_defn)
2315         (local_language_defn): Update.
2316         * go-lang.c (go_language_defn): Update.
2317         * f-lang.c (f_language_defn): Update.
2318         * d-lang.c (d_language_defn): Update.
2319         * c-lang.h (c_watch_location_expression): Declare.
2320         * c-lang.c (c_watch_location_expression): New function.
2321         (c_language_defn, cplus_language_defn, asm_language_defn)
2322         (minimal_language_defn): Use it.
2323         * breakpoint.c (watch_command_1): Call
2324         la_watch_location_expression.
2325         * ada-lang.c (ada_language_defn): Update.
2326
2327 2017-05-19  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
2328
2329         PR tui/21482
2330         * gdb_curses.h (NOMACROS): Define.
2331         (NCURSES_NOMACROS): Define.
2332
2333 2017-05-19  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
2334
2335         PR tui/21482
2336         * tui/tui-windata.c (tui_erase_data_content): Cast last mvwaddstr
2337         arg to char *.
2338         * tui/tui-wingeneral.c (box_win): Likewise.
2339         * tui/tui-winsource.c (tui_erase_source_content): Likewise.
2340         (tui_show_source_line): Likewise.
2341         (tui_show_exec_info_content): Likewise.
2342
2343 2017-05-19  Vladimir Mezentsev  <vladimir.mezentsev@oracle.com>
2344
2345         * sparc-tdep.c (sparc_structure_return_p)
2346         (sparc_arg_on_registers_p): New functions.
2347         (sparc32_store_arguments): Use them.
2348         * sparc64-tdep.c (sparc64_16_byte_align_p)
2349         (sparc64_store_floating_fields, sparc64_extract_floating_fields):
2350         Handle TYPE_CODE_ARRAY.
2351
2352 2017-05-17  Yao Qi  <yao.qi@linaro.org>
2353
2354         * cli/cli-decode.c (add_alias_cmd): New function.
2355         * command.h (add_alias_cmd): Declare.
2356         * infcmd.c (_initialize_infcmd): Don't call add_com_alias,
2357         instead call add_alias_cmd.
2358
2359 2017-05-17  Pedro Alves  <palves@redhat.com>
2360
2361         * Makefile.in (nat_extra_makefile_frag): Rename to ...
2362         (nat_makefile_frag): ... this.  All references updated.
2363         * configure.ac: Likewise.
2364         * configure.nat: Likewise.  Enhance comments.
2365         * configure: Regenerate.
2366
2367 2017-05-15  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
2368
2369         * procfs.c (procfs_create_inferior): Change prototype to match
2370         definition.
2371
2372 2017-05-13  Eli Zaretskii  <eliz@gnu.org>
2373
2374         * tui/tui.c (tui_enable): Cast "unknown" to 'char *' to avoid a
2375         C++ compiler warning.
2376
2377 2017-05-12  Tom Tromey  <tom@tromey.com>
2378
2379         PR rust/21483:
2380         * rust-lang.c (rust_evaluate_subexp) <STRUCTOP_STRUCT>: Don't
2381         recurse, just call value_struct_elt directly.
2382
2383 2017-05-12  Tom Tromey  <tom@tromey.com>
2384
2385         * rust-lang.c (rust_dump_subexp_body) <STRUCTOP_ANONYMOUS,
2386         OP_RUST_ARRAY>: Fix.
2387
2388 2017-05-12  Tom Tromey  <tom@tromey.com>
2389
2390         * rust-lang.c (rust_print_subexp): Replace "return" with "break".
2391
2392 2017-05-09  Yao Qi  <yao.qi@linaro.org>
2393
2394         * regcache.c: Include <forward_list>.
2395         (struct regcache_list): Remove.
2396         (current_regcache): Update.
2397         (get_thread_arch_aspace_regcache): Update for std::forward_list.
2398         (regcache_thread_ptid_changed): Likewise.
2399         (registers_changed_ptid): Likewise.
2400         (current_regcache_size): Likewise.
2401
2402 2017-05-09  Yao Qi  <yao.qi@linaro.org>
2403
2404         * regcache.c [GDB_SELF_TEST]: Include selftest.h.
2405         (current_regcache_size): New function.
2406         (current_regcache_test): New function.
2407         (_initialize_regcache) [GDB_SELF_TEST]: Register the unit test.
2408
2409 2017-05-08  Alan Hayward  <alan.hayward@arm.com>
2410
2411         * mips-tdep.c (mips_o32_return_value): Remove unused buffer.
2412         (print_gp_register_row): Use get_frame_register_value.
2413
2414 2017-05-08  Alan Hayward  <alan.hayward@arm.com>
2415
2416         * mips-linux-tdep.c (mips_supply_gregset): Use raw_supply_zeroed.
2417         (mips_supply_fpregset): Likewise.
2418         (mips64_supply_gregset): Likewise.
2419
2420 2017-05-08  Alan Hayward  <alan.hayward@arm.com>
2421
2422         * mn10300-linux-tdep.c (am33_supply_gregset_method): Use 
2423         regcache->raw_supply_zeroed.
2424
2425 2017-05-06  Sergio Durigan Junior  <sergiodj@redhat.com>
2426
2427         * configure.nat: Rearrange 'case' statements to match
2428         host before cpu.
2429
2430 2017-05-06  Sergio Durigan Junior  <sergiodj@redhat.com>
2431
2432         * Makefile.in: Remove "@host_makefile_frag@".  Add variables
2433         NAT_FILE, NATDEPFILES, NAT_CDEPS, LOADLIBES, MH_CFLAGS, XM_CLIBS,
2434         NAT_GENERATED_FILES, HAVE_NATIVE_GCORE_HOST.  Add
2435         "@nat_extra_makefile_frag@".
2436         (Makefile): Remove dependency on "@frags@".
2437         ($(GNULIB_BUILDDIR)/Makefile): Likewise.
2438         (data-directory/Makefile): Likewise.
2439         * config/aarch64/linux.mh: Deleted; moved contents to
2440         "gdb/configure.nat".
2441         * config/alpha/alpha-linux.mh: Likewise.
2442         * config/alpha/nbsd.mh: Likewise.
2443         * config/arm/linux.mh: Likewise.
2444         * config/arm/nbsdelf.mh: Likewise.
2445         * config/i386/cygwin.mh: Likewise.
2446         * config/i386/cygwin64.mh: Likewise.
2447         * config/i386/darwin.mh: Likewise.
2448         * config/i386/fbsd.mh: Likewise.
2449         * config/i386/fbsd64.mh: Likewise.
2450         * config/i386/go32.mh: Likewise.
2451         * config/i386/i386gnu.mh: Likewise.
2452         * config/i386/i386sol2.mh: Likewise.
2453         * config/i386/linux.mh: Likewise.
2454         * config/i386/linux64.mh: Likewise.
2455         * config/i386/mingw.mh: Likewise.
2456         * config/i386/mingw64.mh: Likewise.
2457         * config/i386/nbsd64.mh: Likewise.
2458         * config/i386/nbsdelf.mh: Likewise.
2459         * config/i386/nto.mh: Likewise.
2460         * config/i386/obsd.mh: Likewise.
2461         * config/i386/obsd64.mh: Likewise.
2462         * config/i386/sol2-64.mh: Likewise.
2463         * config/ia64/linux.mh: Likewise.
2464         * config/m32r/linux.mh: Likewise.
2465         * config/m68k/linux.mh: Likewise.
2466         * config/m68k/nbsdelf.mh: Likewise.
2467         * config/m68k/obsd.mh: Likewise.
2468         * config/m88k/obsd.mh: Likewise.
2469         * config/mips/fbsd.mh: Likewise.
2470         * config/mips/linux.mh: Likewise.
2471         * config/mips/nbsd.mh: Likewise.
2472         * config/mips/obsd64.mh: Likewise.
2473         * config/pa/linux.mh: Likewise.
2474         * config/pa/nbsd.mh: Likewise.
2475         * config/pa/obsd.mh: Likewise.
2476         * config/powerpc/aix.mh: Likewise.
2477         * config/powerpc/fbsd.mh: Likewise.
2478         * config/powerpc/linux.mh: Likewise.
2479         * config/powerpc/nbsd.mh: Likewise.
2480         * config/powerpc/obsd.mh: Likewise.
2481         * config/powerpc/ppc64-linux.mh: Likewise.
2482         * config/powerpc/spu-linux.mh: Likewise.
2483         * config/s390/linux.mh: Likewise.
2484         * config/sh/nbsd.mh: Likewise.
2485         * config/sparc/fbsd.mh: Likewise.
2486         * config/sparc/linux.mh: Likewise.
2487         * config/sparc/linux64.mh: Likewise.
2488         * config/sparc/nbsd64.mh: Likewise.
2489         * config/sparc/nbsdelf.mh: Likewise.
2490         * config/sparc/obsd64.mh: Likewise.
2491         * config/sparc/sol2.mh: Likewise.
2492         * config/tilegx/linux.mh: Likewise.
2493         * config/vax/nbsdelf.mh: Likewise.
2494         * config/vax/obsd.mh: Likewise.
2495         * config/xtensa/linux.mh: Likewise.
2496         * config/i386/i386gnu.mn: New file, with excerpts from
2497         "config/i386/i386gnu.mh".
2498         * configure: Regenerate.
2499         * configure.ac: Rewrite code to use "gdb/configure.nat" instead of
2500         *.mh files under "gdb/config".
2501         * configure.nat: New file, with contents from the
2502         "gdb/config/*/*.mh" files.
2503
2504 2017-05-05  Tim Wiederhake  <tim.wiederhake@intel.com>
2505
2506         * btrace.c (btrace_clear): Free insn vector.
2507
2508 2017-05-05  Pedro Alves  <palves@redhat.com>
2509
2510         * warning.m4 (build_warnings): Add -Wno-error=maybe-uninitialized.
2511         * configure: Regenerate.
2512
2513 2017-05-04  Pedro Alves  <palves@redhat.com>
2514
2515         * Makefile.in (SFILES): Add progspace-and-thread.c.
2516         (HFILES_NO_SRCDIR): Add progspace-and-thread.h.
2517         (COMMON_OBS): Add progspace-and-thread.o.
2518         * breakpoint.c: Include "progspace-and-thread.h".
2519         (update_inserted_breakpoint_locations)
2520         (insert_breakpoint_locations, create_longjmp_master_breakpoint):
2521         Use scoped_restore_current_pspace_and_thread.
2522         (create_std_terminate_master_breakpoint): Use
2523         scoped_restore_current_program_space.
2524         (remove_breakpoint): Use scoped_restore_current_pspace_and_thread.
2525         (print_breakpoint_location): Use
2526         scoped_restore_current_program_space.
2527         (bp_loc_is_permanent): Use
2528         scoped_restore_current_pspace_and_thread.
2529         (resolve_sal_pc): Use scoped_restore_current_pspace_and_thread.
2530         (download_tracepoint_locations): Use
2531         scoped_restore_current_pspace_and_thread.
2532         (breakpoint_re_set): Use scoped_restore_current_pspace_and_thread.
2533         * exec.c (exec_close_1): Use scoped_restore_current_program_space.
2534         (enum step_over_calls_kind): Moved from inferior.h.
2535         (class scoped_restore_current_thread): New class.
2536         * gdbthread.h (make_cleanup_restore_current_thread): Delete
2537         declaration.
2538         (scoped_restore_current_thread): New class.
2539         * infcmd.c: Include "common/gdb_optional.h".
2540         (continue_1, proceed_after_attach): Use
2541         scoped_restore_current_thread.
2542         (notice_new_inferior): Use scoped_restore_current_thread.
2543         * inferior.c: Include "progspace-and-thread.h".
2544         (restore_inferior, save_current_inferior): Delete.
2545         (add_inferior_command, clone_inferior_command): Use
2546         scoped_restore_current_pspace_and_thread.
2547         * inferior.h (scoped_restore_current_inferior): New class.
2548         * infrun.c: Include "progspace-and-thread.h" and
2549         "common/gdb_optional.h".
2550         (follow_fork_inferior): Use
2551         scoped_restore_current_pspace_and_thread.
2552         (scoped_restore_exited_inferior): New class.
2553         (handle_vfork_child_exec_or_exit): Use
2554         scoped_restore_exited_inferior,
2555         scoped_restore_current_pspace_and_thread,
2556         scoped_restore_current_thread and scoped_restore.
2557         (fetch_inferior_event): Use scoped_restore_current_thread.
2558         * linespec.c (decode_line_full, decode_line_1): Use
2559         scoped_restore_current_program_space.
2560         * mi/mi-main.c: Include "progspace-and-thread.h".
2561         (exec_continue): Use scoped_restore_current_thread.
2562         (mi_cmd_exec_run): Use scoped_restore_current_pspace_and_thread.
2563         (mi_cmd_trace_frame_collected): Use scoped_restore_current_thread.
2564         * proc-service.c (ps_pglobal_lookup): Use
2565         scoped_restore_current_program_space.
2566         * progspace-and-thread.c: New file.
2567         * progspace-and-thread.h: New file.
2568         * progspace.c (release_program_space, clone_program_space): Use
2569         scoped_restore_current_program_space.
2570         (restore_program_space, save_current_program_space)
2571         (save_current_space_and_thread): Delete.
2572         (switch_to_program_space_and_thread): Moved to
2573         progspace-and-thread.c.
2574         * progspace.h (save_current_program_space)
2575         (save_current_space_and_thread): Delete declarations.
2576         (scoped_restore_current_program_space): New class.
2577         * remote.c (remote_btrace_maybe_reopen): Use
2578         scoped_restore_current_thread.
2579         * symtab.c: Include "progspace-and-thread.h".
2580         (skip_prologue_sal): Use scoped_restore_current_pspace_and_thread.
2581         * thread.c (print_thread_info_1): Use
2582         scoped_restore_current_thread.
2583         (struct current_thread_cleanup): Delete.
2584         (do_restore_current_thread_cleanup)
2585         (restore_current_thread_cleanup_dtor): Rename/convert both to ...
2586         (scoped_restore_current_thread::~scoped_restore_current_thread):
2587         ... this new dtor.
2588         (make_cleanup_restore_current_thread): Rename/convert to ...
2589         (scoped_restore_current_thread::scoped_restore_current_thread):
2590         ... this new ctor.
2591         (thread_apply_all_command): Use scoped_restore_current_thread.
2592         (thread_apply_command): Use scoped_restore_current_thread.
2593         * tracepoint.c (tdump_command): Use scoped_restore_current_thread.
2594         * varobj.c (value_of_root_1): Use scoped_restore_current_thread.
2595
2596 2017-05-04  Pedro Alves  <palves@redhat.com>
2597
2598         * thread.c (make_cleanup_restore_current_thread): Move
2599         find_thread_ptid call before the is_stopped call.  Assert that the
2600         thread is found.  Replace is_stopped call by checking the thread's
2601         state directly.  Remove unnecessary NULL-thread check.
2602
2603 2017-05-04  Pedro Alves  <palves@redhat.com>
2604
2605         * corelow.c (thread_section_name): New class.
2606         (get_core_register_section, get_core_siginfo): Use it.
2607
2608 2017-05-04  Andreas Arnez  <arnez@linux.vnet.ibm.com>
2609
2610         * corelow.c (sniff_core_bfd): Remove extra semicolon.
2611         (get_core_register_section): Remove xfree of NULL pointer.
2612
2613 2017-05-03  Alan Hayward  <alan.hayward@arm.com>
2614
2615         * frv-linux-tdep.c (frv_linux_supply_gregset): Use raw_supply_zeroed.
2616         * regcache.c (regcache::raw_supply_zeroed): New function.
2617         * regcache.h (regcache::raw_supply_zeroed): New declaration.
2618
2619 2017-05-03  Simon Marchi  <simon.marchi@ericsson.com>
2620
2621         * gdbarch.sh: Remove commented out definition of
2622         TARGET_CHAR_BIT.
2623         * gdbarch.h: Re-generate.
2624
2625 2017-05-03  Sergio Durigan Junior  <sergiodj@redhat.com>
2626
2627         * configure: Regenerate.
2628
2629 2017-05-02  Simon Marchi  <simon.marchi@ericsson.com>
2630
2631         * solib-target.c (solib_target_relocate_section_addresses):
2632         Remove num_section_bases, num_bases, segment_bases variables.
2633
2634 2017-05-02  Simon Marchi  <simon.marchi@polymtl.ca>
2635
2636         * common/gdb_vecs.h (DEF_VEC_I (CORE_ADDR)): Remove.
2637
2638 2017-05-02  Simon Marchi  <simon.marchi@polymtl.ca>
2639
2640         * solib-target.c: Include <vector>
2641         (struct lm_info_target) <~lm_info_target>: Remove.
2642         <segment_bases, section_bases>: Change type to
2643         std::vector<CORE_ADDR>.
2644         (library_list_start_segment, library_list_start_section,
2645         library_list_end_library,
2646         solib_target_relocate_section_addresses): Adjust.
2647
2648 2017-05-02  Simon Marchi  <simon.marchi@polymtl.ca>
2649
2650         * gdbarch.sh (software_single_step): Change return type to
2651         std::vector<CORE_ADDR>.
2652         * gdbarch.c, gdbarch.h: Re-generate.
2653         * arch/arm-get-next-pcs.c (thumb_deal_with_atomic_sequence_raw):
2654         Adjust.
2655         (arm_deal_with_atomic_sequence_raw): Adjust.
2656         (thumb_get_next_pcs_raw): Adjust.
2657         (arm_get_next_pcs_raw): Adjust.
2658         (arm_get_next_pcs): Adjust.
2659         * arch/arm-get-next-pcs.h (arm_get_next_pcs): Adjust.
2660         * aarch64-tdep.c (aarch64_software_single_step): Adjust.
2661         * alpha-tdep.c (alpha_deal_with_atomic_sequence): Adjust.
2662         (alpha_software_single_step): Adjust.
2663         * alpha-tdep.h (alpha_software_single_step): Adjust.
2664         * arm-linux-tdep.c (arm_linux_software_single_step): Adjust.
2665         * arm-tdep.c (arm_software_single_step): Adjust.
2666         (arm_breakpoint_kind_from_current_state): Adjust.
2667         * arm-tdep.h (arm_software_single_step): Adjust.
2668         * breakpoint.c (insert_single_step_breakpoint): Adjust.
2669         * cris-tdep.c (cris_software_single_step): Adjust.
2670         * mips-tdep.c (mips_deal_with_atomic_sequence): Adjust.
2671         (micromips_deal_with_atomic_sequence): Adjust.
2672         (deal_with_atomic_sequence): Adjust.
2673         (mips_software_single_step): Adjust.
2674         * mips-tdep.h (mips_software_single_step): Adjust.
2675         * moxie-tdep.c (moxie_software_single_step): Adjust.
2676         * nios2-tdep.c (nios2_software_single_step): Adjust.
2677         * ppc-tdep.h (ppc_deal_with_atomic_sequence): Adjust.
2678         * rs6000-aix-tdep.c (rs6000_software_single_step): Adjust.
2679         * rs6000-tdep.c (ppc_deal_with_atomic_sequence): Adjust.
2680         * s390-linux-tdep.c (s390_software_single_step): Adjust.
2681         * sparc-tdep.c (sparc_software_single_step): Adjust.
2682         * spu-tdep.c (spu_software_single_step): Adjust.
2683         * tic6x-tdep.c (tic6x_software_single_step): Adjust.
2684
2685 2017-05-02  Simon Marchi  <simon.marchi@polymtl.ca>
2686
2687         * gdbarch.sh: Use semi-colon as field separator instead of colon.
2688         * gdbarch.h: Re-generate.
2689
2690 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
2691
2692         * Makefile.in (SUBDIR_PYTHON_OBS): Add py-instruction.o.
2693         (SUBDIR_PYTHON_SRCS): Add py-instruction.c.
2694         * python/py-instruction.c, python/py-instruction.h: New file.
2695         * python/py-record.c: Add py-instruction.h include.
2696         (gdbpy_initialize_record): Make gdb.Instruction a super class of
2697         gdb.RecordInstruction.
2698         * python/python-internal.h: Add gdbpy_initialize_instruction
2699         declaration.
2700         * python/python.c (do_start_initialization): Add
2701         gdbpy_initialize_instruction.
2702
2703 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
2704
2705         * python/py-record-btrace.c (BTPY_REQUIRE_VALID_CALL, btpy_call_type):
2706         Remove.
2707         (btrace_func_from_recpy_func): New function.
2708         (btpy_call_new, btpy_number, btpy_hash, btpy_richcompare): Remove.
2709         (btpy_call_level, btpy_call_symbol, btpy_call_instructions,
2710         btpy_call_up, btpy_call_prev_sibling, btpy_call_next_sibling): Rename to ...
2711         (recpy_bt_func_level, recpy_bt_func_symbol, recpy_bt_func_instructions,
2712         recpy_bt_func_up, recpy_bt_func_prev, recpy_bt_func_next): This.
2713         Also, use new helper functions.
2714         (btpy_list_item): Use new helper functions.
2715         (recpy_bt_function_call_history): Use new type name.
2716         (btpy_call_getset): Remove.
2717         (gdbpy_initialize_btrace): Remove code to initialize
2718         gdb.BtraceFunctionCall.
2719         * python/py-record-btrace.h (recpy_bt_func_number, recpy_btb_func_level,
2720         recpy_btb_func_symbol, recpy_bt_func_instructions, recpy_bt_func_up,
2721         recpy_bt_func_prev, recpy_bt_func_next): New export.
2722         * python/py-record.c (recpy_func_type): New static object.
2723         (recpy_func_new, recpy_func_level, recpy_func_symbol,
2724         recpy_func_instructions, recpy_func_up, recpy_func_prev,
2725         recpy_func_next): New function.
2726         (recpy_element_hash, recpy_element_richcompare): Updated comment.
2727         (recpy_func_getset): New static object.
2728         (gdbpy_initialize_record): Add code to initialize gdb.RecordInstruction.
2729         * python/py-record.h (recpy_func_type, recpy_func_new): New export.
2730
2731 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
2732
2733         * python/py-record-btrace.c (BTPY_REQUIRE_VALID_INSN): Remove.
2734         (btpy_object, btpy_insn_type, btpy_new): Remove.
2735         (btpy_list_object): Use gdb.RecordInstruction type instead of
2736         gdb.BtraceInstruction type.
2737         (btrace_insn_from_recpy_insn): New function.
2738         (btpy_insn_or_gap_new): Adjust comment. Use recpy_insn_new instead of
2739         btpy_new.
2740         (btpy_call_new, btpy_list_item): Do not use btpy_new anymore.
2741         (btpy_number, btpy_hash, btpy_call_level, btpy_call_symbol,
2742         btpy_call_instructions, btpy_call_up, btpy_call_prev_sibling,
2743         btpy_call_next_sibling, btpy_richcompare): Use recpy_element_object
2744         instead of btpy_object.
2745         (btpy_insn_sal, btpy_insn_pc, btpy_insn_size, btpy_insn_is_speculative,
2746         btpy_insn_data, btpy_insn_decode): Rename to ...
2747         (recpy_bt_insn_sal, recpy_bt_insn_pc, recpy_bt_insn_size,
2748         recpy_bt_insn_is_speculative, recpy_bt_insn_data,
2749         recpy_bt_insn_decode): This.  Also, use new helper functions.
2750         (btpy_list_position, recpy_bt_goto): Use recpy_element_object and
2751         recpy_insn_type.
2752         (btpy_insn_getset): Remove.
2753         (gdbpy_initialize_btrace): Remove code to initialize
2754         gdb.BtraceInstruction.  Use recpy_element_object.
2755         * python/py-record-btrace.h (recpy_bt_insn_number, recpy_bt_insn_sal,
2756         recpy_bt_insn_pc, recpy_bt_insn_data, recpy_bt_insn_decoded,
2757         recpy_bt_insn_size, recpy_bt_insn_is_speculative): New export.
2758         * python/py-record.c (recpy_insn_type): New static object.
2759         (recpy_insn_new, recpy_insn_sal, recpy_insn_pc, recpy_insn_data,
2760         recpy_insn_decoded, recpy_insn_size, recpy_insn_is_speculative,
2761         recpy_element_number, recpy_element_hash, recpy_element_richcompare):
2762         New function.
2763         (recpy_insn_getset): New static object.
2764         (gdbpy_initialize_record): Initialize gdb.RecordInstruction.
2765         * python/py-record.h (recpy_element_object): New typedef.
2766         (recpy_insn_type, recpy_insn_new): New export.
2767
2768 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
2769
2770         * py-record-btrace.c (btpy_insn_new): Removed.
2771         (btpy_insn_or_gap_new): New function.
2772         (btpy_insn_error): Removed.
2773         (btpy_insn_sal, btpy_insn_pc, btpy_insn_size, btpy_insn_is_speculative,
2774         btpy_insn_data, btpy_insn_decode): Remove code path for gaps.
2775         (recpy_bt_replay_position, recpy_bt_begin, recpy_bt_end): Call
2776         btpy_insn_or_gap_new instead of btpy_insn_new.
2777         (btpy_insn_getset): Remove btpy_insn_error.
2778         * py-record.c (recpy_gap_type): New static object.
2779         (recpy_gap_object): New typedef.
2780         (recpy_gap_new, recpy_gap_number, recpy_gap_reason_code,
2781         recpy_gap_reason_string): New function.
2782         (recpy_gap_getset): New static object.
2783         (gdbpy_initialize_record): Initialize gdb.RecordGap type.
2784         * py-record.h (recpy_gap_new): New export.
2785
2786 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
2787
2788         * python/py-record.c (recpy_ptid): Remove.
2789         (recpy_record_getset): Remove recpy_ptid.
2790
2791 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
2792
2793         * btrace.c (btrace_fetch): Set inferior_ptid.
2794         * python/py-record-btrace.c: Add "py-record.h" include.
2795         (recpy_bt_format, recpy_bt_replay_position, recpy_bt_begin,
2796         recpy_bt_end, recpy_bt_instruction_history,
2797         recpy_bt_function_call_history, recpy_bt_goto): Use ptid stored
2798         in gdb.Record object instead of current ptid.
2799         * python/py-record.c: Include new "py-record.h" file.
2800         (recpy_record_object): Moved to py-record.h.
2801         * python/py-record.h: New file.
2802
2803 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
2804
2805         * python/py-record-btrace.c (BTPY_REQUIRE_VALID_INSN,
2806         BTPY_REQUIRE_VALID_CALL, recpy_bt_function_call_history): Fix
2807         indentation.
2808
2809 2017-05-01  Joel Brobecker  <brobecker@adacore.com>
2810
2811         * MAINTAINERS: Move Daniel Jacobowitz and Mark Kettenis to
2812         the past maintainers section.
2813
2814 2017-04-28  Yao Qi  <yao.qi@linaro.org>
2815
2816         * infcmd.c (get_return_value): Use regcache ctor, and remove
2817         cleanup.
2818
2819 2017-04-28  Yao Qi  <yao.qi@linaro.org>
2820             Pedro Alves  <palves@redhat.com>
2821
2822         * regcache.c (regcache::regcache): New tag dispatch ctor.
2823         (do_cooked_read): Moved above.
2824         (regcache_dup): Use the tag dispatch ctor..
2825         * regcache.h (regcache): Declare ctor, delete copy ctor and
2826         assignment operator, remove friend regcache_dup.
2827
2828 2017-04-28  Yao Qi  <yao.qi@linaro.org>
2829
2830         * regcache.c (regcache_dup): Assert !src->m_readonly_p and
2831         call method save instead of regcache_cpy.
2832         * regcache.h (struct regcache): Make regcache_dup a friend.
2833
2834 2017-04-28  Yao Qi  <yao.qi@linaro.org>
2835
2836         * regcache.c (struct regcache): Move to regcache.h
2837         (regcache::arch): New method.
2838         (regcache_get_ptid): Update.
2839         (get_regcache_arch): Call arch method.
2840         (get_regcache_aspace): Call method aspace.
2841         (register_buffer): Change it to method.
2842         (regcache_save): Change it to regcache::save.
2843         (regcache_restore): Likewise.
2844         (regcache_cpy_no_passthrough): Remove the declaration.
2845         (regcache_cpy): Call methods restore and cpy_no_passthrough.
2846         (regcache_cpy_no_passthrough): Change it to method
2847         cpy_no_passthrough.
2848         (regcache_register_status): Change it to method
2849         get_register_status.
2850         (regcache_invalidate): Change it to method invalidate.
2851         (regcache_thread_ptid_changed): Use methods ptid and set_ptid.
2852         (regcache_raw_update): Change it to method raw_update.
2853         (regcache_raw_read): Likewise.
2854         (regcache_raw_read_signed): Likewise.
2855         (regcache_raw_read_unsigned): Likewise.
2856         (regcache_raw_write_signed): Likewise.
2857         (regcache_raw_write_unsigned): Likewise.
2858         (regcache_cooked_read): Likewise.
2859         (regcache_cooked_read_value): Likewise.
2860         (regcache_cooked_read_signed): Likewise.
2861         (regcache_cooked_read_unsigned): Likewise.
2862         (regcache_cooked_write_signed): Likewise.
2863         (regcache_cooked_write_unsigned): Likewise.
2864         (regcache_raw_set_cached_value): Likewise.
2865         (regcache_raw_write): Likewise.
2866         (regcache_cooked_write): Likewise.
2867         (regcache_xfer_part): Likewise.
2868         (regcache_raw_read_part): Likewise.
2869         (regcache_raw_write_part): Likewise.
2870         (regcache_cooked_read_part): Likewise.
2871         (regcache_cooked_write_part): Likewise.
2872         (regcache_raw_supply): Likewise.
2873         (regcache_raw_collect): Likewise.
2874         (regcache_transfer_regset): Likewise.
2875         (regcache_supply_regset): Likewise.
2876         (regcache_collect_regset): Likewise.
2877         (regcache_debug_print_register): Likewise.
2878         (enum regcache_dump_what): Move it to regcache.h.
2879         (regcache_dump): Change it to method dump.
2880         * regcache.h (enum regcache_dump_what): New.
2881         (class regcache): New.
2882         * target.c (target_fetch_registers): Call method
2883         debug_print_register.
2884         (target_store_registers): Likewise.
2885
2886 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
2887
2888         * windows-nat.c (struct lm_info_windows): Initialize field.
2889         (windows_make_so): Allocate lm_info_windows with new.
2890         (windows_free_so): Free lm_info_windows with delete.
2891
2892 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
2893
2894         * solib-darwin.c (struct lm_info_darwin): Initialize field.
2895         (darwin_current_sos): Allocate lm_info_darwin with new, remove
2896         cleanup.
2897         (darwin_free_so): Free lm_info_darwin with delete.
2898
2899 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
2900
2901         * solib-svr4.h (struct lm_info_svr4): Initialize fields.
2902         <l_addr_p>: Change type to bool.
2903         * solib-svr4.c (lm_info_read): Allocate lm_info_svr4 with new.
2904         (svr4_free_so): Free lm_info_svr4 with delete.
2905         (svr4_copy_library_list): Replace memcpy with call to copy
2906         constructor.
2907         (library_list_start_library, svr4_default_sos): Allocate
2908         lm_info_svr4 with new.
2909
2910 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
2911
2912         * solib-target.c (struct lm_info_target): Add destructor,
2913         initialize fields.
2914         <name>: Change type to std::string.
2915         (library_list_start_library): Allocate lm_info_target with new.
2916         (solib_target_free_library_list): Free lm_info_target with
2917         delete.
2918         (solib_target_current_sos): Adapt to std::string.
2919         (solib_target_free_so): Free lm_info_target with delete.
2920
2921 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
2922
2923         * solib-frv.c (struct lm_info_frv): Add destructor, initialize
2924         fields.
2925         (frv_current_sos): Allocate lm_info_frv with new.
2926         (frv_relocate_main_executable): Free lm_info_frv with delete,
2927         allocate with new.
2928         (frv_clear_solib, frv_free_so): Free lm_info_frv with delete.
2929
2930 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
2931
2932         * solib-frv.c (struct lm_info_frv): Fix indentation.
2933
2934 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
2935
2936         * solib-dsbt.c (struct lm_info_dsbt): Add destructor, initialize
2937         map field.
2938         (dsbt_current_sos): Allocate lm_info_dsbt with new.
2939         (dsbt_relocate_main_executable): Free lm_info_dsbt with delete
2940         and allocate with new.
2941         (dsbt_clear_solib, dsbt_free_so): Free lm_info_dsbt with delete.
2942
2943 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
2944
2945         * solib-aix.c (struct lm_info_aix): Initialize fields in-class.
2946         <filename, member_name>: Change type to std::string.
2947         (solib_aix_new_lm_info, solib_aix_xfree_lm_info): Remove.
2948         (library_list_start_library): Allocate lm_info_aix with new.
2949         (solib_aix_free_library_list, solib_aix_free_so): Free with delete.
2950         (solib_aix_current_sos): Adapt to std::string, copy lm_info_aix
2951         with copy constructor.
2952
2953 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
2954
2955         * solist.h (struct lm_info): Remove.
2956         (struct lm_info_base): New class.
2957         (struct so_list) <lm_info>: Change type to lm_info_base *.
2958         * nto-tdep.c (struct lm_info): Remove.
2959         (lm_addr): Adjust.
2960         * solib-aix.c (struct lm_info): Rename to ...
2961         (struct lm_info_aix): ... this.  Extend lm_info_base.
2962         (lm_info_p): Rename to ...
2963         (lm_info_aix_p): ... this, and adjust.
2964         (solib_aix_new_lm_info, solib_aix_xfree_lm_info,
2965         solib_aix_parse_libraries, library_list_start_library,
2966         solib_aix_free_library_list, solib_aix_parse_libraries,
2967         solib_aix_get_library_list,
2968         solib_aix_relocate_section_addresses, solib_aix_free_so,
2969         solib_aix_get_section_offsets,
2970         solib_aix_solib_create_inferior_hook, solib_aix_current_sos):
2971         Adjust.
2972         (struct solib_aix_inferior_data) <library_list>: Adjust.
2973         * solib-darwin.c (struct lm_info): Rename to ...
2974         (struct lm_info_darwin): ... this.  Extend lm_info_base.
2975         (darwin_current_sos, darwin_relocate_section_addresses): Adjust.
2976         * solib-dsbt.c (struct lm_info): Rename to ...
2977         (struct lm_info_dsbt): ... this.  Extend lm_info_base.
2978         (struct dsbt_info) <main_executable_lm_info): Adjust.
2979         (dsbt_current_sos, dsbt_relocate_main_executable, dsbt_free_so,
2980         dsbt_relocate_section_addresses): Adjust.
2981         * solib-frv.c (struct lm_info): Rename to ...
2982         (struct lm_info_frv): ... this.  Extend lm_info_base.
2983         (main_executable_lm_info): Adjust.
2984         (frv_current_sos, frv_relocate_main_executable, frv_free_so,
2985         frv_relocate_section_addresses, frv_fdpic_find_global_pointer,
2986         find_canonical_descriptor_in_load_object,
2987         frv_fdpic_find_canonical_descriptor): Adjust.
2988         * solib-svr4.c (struct lm_info): Move to solib-svr4.h, renamed
2989         to lm_info_svr4.
2990         (lm_info_read, lm_addr_check, svr4_keep_data_in_core,
2991         svr4_clear_so, svr4_copy_library_list,
2992         library_list_start_library, svr4_default_sos, svr4_read_so_list,
2993         svr4_current_sos, svr4_fetch_objfile_link_map,
2994         solist_update_incremental): Adjust.
2995         * solib-svr4.h (struct lm_info_svr4): Move here from
2996         solib-svr4.c.
2997         * solib-target.c (struct lm_info): Rename to ...
2998         (struct lm_info_target): ... this.  Extend lm_info_base.
2999         (lm_info_p): Rename to ...
3000         (lm_info_target_p): ... this.
3001         (solib_target_parse_libraries, library_list_start_segment,
3002         library_list_start_section, library_list_start_library,
3003         library_list_end_library, solib_target_free_library_list,
3004         solib_target_current_sos, solib_target_free_so,
3005         solib_target_relocate_section_addresses): Adjust.
3006         * windows-nat.c (struct lm_info): Rename to ...
3007         (struct lm_info_windows): ... this.  Extend lm_info_base.
3008         (windows_make_so, handle_load_dll, handle_unload_dll,
3009         windows_xfer_shared_libraries): Adjust.
3010
3011 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
3012
3013         * solib-darwin.c (struct darwin_so_list): Remove.
3014         (darwin_current_sos): Allocate an so_list object instead of a
3015         darwin_so_list, separately allocate an lm_info object.
3016         (darwin_free_so): Free lm_info.
3017
3018 2017-04-28  John Baldwin  <jhb@FreeBSD.org>
3019
3020         * mips-tdep.c (print_gp_register_row): Replace printf_filtered
3021         with fprintf_filtered.
3022
3023 2017-04-28  Yao Qi  <yao.qi@linaro.org>
3024
3025         * regcache.c (regcache::regcache): New function.
3026         (regcache::~regcache): New function.
3027         (regcache_xmalloc_1): Remove.
3028         (regcache_xmalloc): Call new regcache.
3029         (regcache_xfree): Call delete regcache.
3030         (get_thread_arch_aspace_regcache): Call new regcache.
3031
3032 2017-04-28  Yao Qi  <yao.qi@linaro.org>
3033
3034         * mips-linux-nat.c (mips_linux_new_thread): Use ptid method
3035         lwp instead of ptid_get_lwp.
3036
3037 2017-04-28  Yao Qi  <yao.qi@linaro.org>
3038
3039         * mips-linux-nat.c (mips_linux_new_thread): Get lwpid from
3040         lwp_info instead of getting from inferior_ptid.
3041
3042 2017-04-27  Keith Seitz  <keiths@redhat.com>
3043
3044         * gdbtypes.c (LVALUE_REFERENCE_TO_RVALUE_BINDING_BADNESS)
3045         DIFFERENT_REFERENCE_TYPE_BADNESS): Remove.
3046         (CV_CONVERSION_BADNESS): Define.
3047         (rank_one_type): Remove overly restrictive rvalue reference
3048         rank checks.
3049         Add cv-qualifier checks and subranks for type equality.
3050         * gdbtypes.h (REFERENCE_CONVERSION_RVALUE,
3051         REFERENCE_CONVERSION_CONST_LVALUE, CV_CONVERSION_BADNESS,
3052         CV_CONVERSION_CONST, CV_CONVERSION_VOLATILE): Declare.
3053
3054 2017-04-27  Simon Marchi  <simon.marchi@ericsson.com>
3055
3056         * python/py-inferior.c (inferior_to_inferior_object): Increment reference
3057         count when creating the object.
3058
3059 2017-04-27  Sangamesh Mallayya  <sangamesh.swamy@in.ibm.com>
3060             Ulrich Weigand  <uweigand@de.ibm.com>
3061
3062         * xcoffread.c (read_xcoff_symtab): Read correct function auxiliary
3063         entry if xlc -qfuncsect or gcc -ffunction-sections compiler option
3064         is used in AIX.
3065         (read_xcoff_symtab): Handle C_WEAKEXT storage class.
3066         (process_xcoff_symbol): Likewise.
3067         (scan_xcoff_symtab): Likewise.
3068
3069 2017-04-26  Alan Hayward  <alan.hayward@arm.com>
3070
3071         * ia64-tdep.c (examine_prologue): Use get_frame_register_unsigned.
3072         (ia64_sigtramp_frame_prev_register): Use read_memory_unsigned_integer.
3073         (ia64_access_reg): Use get_frame_register_unsigned.
3074         (ia64_access_rse_reg): Likewise.
3075         (ia64_libunwind_frame_prev_register): Likewise.
3076
3077 2017-04-26  Jiong Wang  <jiong.wang@arm.com>
3078
3079         * gdbarch.sh: New gdbarch method execute_dwarf_cfa_vendor_op.
3080         * gdbarch.c: Regenerated.
3081         * gdbarch.h: Regenerated.
3082         * dwarf2-frame.c (dwarf2_frame_state_alloc_regs): Made the
3083         visibility external.
3084         (execute_cfa_program): Call execute_dwarf_cfa_vendor_op for CFI
3085         between DW_CFA_lo_user and DW_CFA_high_user inclusive.
3086         (enum cfa_how_kind): Move to ...
3087         (struct dwarf2_frame_state_reg_info): Likewise.
3088         (struct dwarf2_frame_state): Likewise.
3089         * dwarf2-frame.h: ... here.
3090         (dwarf2_frame_state_alloc_regs): New declaration.
3091         * sparc-tdep.c (sparc_execute_dwarf_cfa_vendor_op): New function.
3092         (sparc32_gdbarch_init): Register execute_dwarf_cfa_vendor_op hook.
3093
3094 2017-04-26  Alan Hayward  <alan.hayward@arm.com>
3095
3096         * xtensa-tdep.c (xtensa_pseudo_register_read): Use
3097         regcache_raw_read_unsigned.
3098         (xtensa_pseudo_register_write): Likewise.
3099
3100 2017-04-26  Alan Hayward  <alan.hayward@arm.com>
3101
3102         * nds32-tdep.c (nds32_pseudo_register_read): Abort on errors.
3103         (nds32_pseudo_register_write): Likewise.
3104
3105 2017-04-25  Yao Qi  <yao.qi@linaro.org>
3106
3107         * regcache.c (struct regcache) <readonly_p>: Change its type
3108         to bool.
3109         (regcache_xmalloc_1): Update parameter type and callers update.
3110
3111 2017-04-25  Yao Qi  <yao.qi@linaro.org>
3112
3113         * aarch64-tdep.c (aarch64_gdbarch_init): Don't call
3114         set_gdbarch_wchar_bit.
3115         * arm-tdep.c (arm_gdbarch_init): Likewise.
3116
3117 2017-04-25  Pedro Alves  <palves@redhat.com>
3118
3119         * common/poison.h [!HAVE_IS_TRIVIALLY_COPYABLE] (IsRelocatable)
3120         (BothAreRelocatable, memcopy, memmove): Don't define.
3121         * common/traits.h (__has_feature, HAVE_IS_TRIVIALLY_COPYABLE): New
3122         macros.
3123
3124 2017-04-25  Pedro Alves  <palves@redhat.com>
3125
3126         * common/common-defs.h: Include "common/poison.h".
3127         * common/function-view.h: (Not, Or, Requires): Move to traits.h
3128         and adjust.
3129         * common/poison.h: New file.
3130         * common/traits.h: Include <type_traits>.
3131         (Not, Or, Requires): New, moved from common/function-view.h.
3132
3133 2017-04-25  Pedro Alves  <palves@redhat.com>
3134
3135         * breakpoint.h (struct breakpoint): In-class initialize all
3136         fields.  Make boolean fields "bool".
3137         * breakpoint.c (init_raw_breakpoint_without_location): Remove
3138         memset call and initializations no longer necessary.
3139
3140 2017-04-25  Pedro Alves  <palves@redhat.com>
3141
3142         * btrace.c (pt_btrace_insn_flags): Change parameter type to
3143         reference.
3144         (pt_btrace_insn): New function.
3145         (ftrace_add_pt): Remove memset call and use pt_btrace_insn.
3146
3147 2017-04-25  Pedro Alves  <palves@redhat.com>
3148
3149         * ada-lang.c (ada_catchpoint_location): Now a "class".  Remove
3150         "base" field and inherit from "bp_location" instead.  Add
3151         non-default ctor.
3152         (allocate_location_exception): Use new non-default ctor.
3153         * breakpoint.c (get_first_locp_gte_addr): Remove memset call.
3154         (init_bp_location): Convert to ...
3155         (bp_location::bp_location): ... this new ctor, and remove memset
3156         call.
3157         (base_breakpoint_allocate_location): Use the new non-default ctor.
3158         * breakpoint.h (bp_location): Now a class.  Declare default and
3159         non-default ctors.  In-class initialize all members.
3160         (init_bp_location): Remove declaration.
3161
3162 2017-04-25  Pedro Alves  <palves@redhat.com>
3163
3164         * common/enum-flags.h (enum_flags): Don't implement copy ctor and
3165         assignment operator.
3166
3167 2017-04-24  Yao Qi  <yao.qi@linaro.org>
3168
3169         * doublest.c (convert_doublest_to_floatformat): Call
3170         floatformat_totalsize_bytes.
3171
3172 2017-04-22  Tom Tromey  <tom@tromey.com>
3173
3174         * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries): Use
3175         ui_out_emit_list.
3176         * stack.c (print_frame): Use ui_out_emit_list.
3177         * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Use
3178         ui_out_emit_list.
3179         * mi/mi-main.c (print_one_inferior)
3180         (mi_cmd_data_list_register_names)
3181         (mi_cmd_data_list_register_values, mi_cmd_list_features)
3182         (mi_cmd_list_target_features, mi_cmd_trace_frame_collected): Use
3183         ui_out_emit_list.
3184         * mi/mi-interp.c (mi_on_normal_stop_1): Use ui_out_emit_list.
3185         (mi_output_solib_attribs): Use ui_out_emit_list,
3186         ui_out_emit_tuple.
3187         * mi/mi-cmd-var.c (varobj_update_one): Use ui_out_emit_list.
3188         * mi/mi-cmd-stack.c (mi_cmd_stack_list_frames)
3189         (mi_cmd_stack_list_args, list_args_or_locals): Use
3190         ui_out_emit_list.
3191         * disasm.c (do_assembly_only): Use ui_out_emit_list.
3192         * breakpoint.c (print_solib_event, output_thread_groups): Use
3193         ui_out_emit_list.
3194
3195 2017-04-22  Tom Tromey  <tom@tromey.com>
3196
3197         * mi/mi-main.c (print_variable_or_computed): Use ui_out_emit_tuple.
3198         * mi/mi-cmd-var.c (varobj_update_one): Use ui_out_emit_tuple.
3199         * mi/mi-cmd-stack.c (list_arg_or_local): Use ui_out_emit_tuple.
3200
3201 2017-04-22  Tom Tromey  <tom@tromey.com>
3202
3203         * tracepoint.c (tvariables_info_1)
3204         (print_one_static_tracepoint_marker): Use ui_out_emit_tuple.
3205
3206 2017-04-22  Tom Tromey  <tom@tromey.com>
3207
3208         * stack.c (print_frame_arg): Use ui_out_emit_tuple,
3209         annotate_arg_emitter.
3210         * breakpoint.c (print_mention_watchpoint)
3211         (print_mention_masked_watchpoint): Use ui_out_emit_tuple.
3212         * annotate.h (struct annotate_arg_emitter): New.
3213
3214 2017-04-22  Tom Tromey  <tom@tromey.com>
3215
3216         * record-btrace.c (record_btrace_insn_history)
3217         (record_btrace_insn_history_range, record_btrace_call_history)
3218         (record_btrace_call_history_range): Use ui_out_emit_tuple.
3219         * thread.c (do_captured_list_thread_ids, print_thread_info_1): Use
3220         ui_out_emit_tuple.
3221         * stack.c (print_frame_info): Use ui_out_emit_tuple.
3222         * solib.c (info_sharedlibrary_command): Use ui_out_emit_tuple.
3223         * skip.c (skip_info): Use ui_out_emit_tuple.
3224         * remote.c (show_remote_cmd): Use ui_out_emit_tuple.
3225         * progspace.c (print_program_space): Use ui_out_emit_tuple.
3226         * probe.c (info_probes_for_ops): Use ui_out_emit_tuple.
3227         * osdata.c (info_osdata): Use ui_out_emit_tuple.
3228         * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Use
3229         ui_out_emit_tuple.
3230         * mi/mi-main.c (print_one_inferior, list_available_thread_groups)
3231         (output_register, mi_cmd_data_read_memory)
3232         (mi_cmd_data_read_memory_bytes, mi_load_progress)
3233         (mi_cmd_trace_frame_collected): Use ui_out_emit_tuple.
3234         * mi/mi-cmd-var.c (mi_cmd_var_list_children, varobj_update_one):
3235         Use ui_out_emit_tuple.
3236         * mi/mi-cmd-stack.c (mi_cmd_stack_list_args): Use
3237         ui_out_emit_tuple.
3238         * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions)
3239         (mi_cmd_info_gdb_mi_command): Use ui_out_emit_tuple.
3240         * linux-thread-db.c (info_auto_load_libthread_db): Use
3241         ui_out_emit_tuple.
3242         * inferior.c (print_inferior): Use ui_out_emit_tuple.
3243         * gdb_bfd.c (print_one_bfd): Use ui_out_emit_tuple.
3244         * disasm.c (do_mixed_source_and_assembly_deprecated)
3245         (do_mixed_source_and_assembly): Use ui_out_emit_tuple.
3246         * cp-abi.c (list_cp_abis): Use ui_out_emit_tuple.
3247         * cli/cli-setshow.c (cmd_show_list): Use ui_out_emit_tuple.
3248         * breakpoint.c (print_one_breakpoint_location)
3249         (print_one_breakpoint): Use ui_out_emit_tuple.
3250         * auto-load.c (print_script, info_auto_load_cmd): Use
3251         ui_out_emit_tuple.
3252         * ada-tasks.c (print_ada_task_info): Use ui_out_emit_tuple.
3253
3254 2017-04-21  Simon Marchi  <simon.marchi@ericsson.com>
3255
3256         * thread.c (print_thread_info_1): Remove dead code.
3257
3258 2017-04-21  Jan Kratochvil  <jan.kratochvil@redhat.com>
3259
3260         * aarch64-tdep.c (selftests::aarch64_process_record_test): Make it #if
3261         GDB_SELF_TEST.
3262         * arm-tdep.c (selftests::arm_record_test): Likewise.
3263
3264 2017-04-21  Yao Qi  <yao.qi@linaro.org>
3265
3266         * regcache.c (regcache_restore): Remove argument 2.  Replace
3267         argument 3 with regcache.  Get register status from
3268         src->register_status and get register contents from
3269         register_buffer (src, regnum).
3270         (regcache_cpy): Update.
3271
3272 2017-04-19  Pedro Alves  <palves@redhat.com>
3273
3274         * gdbthread.h (thread): Add missing closing parenthesis in
3275         comment.
3276
3277 2017-04-19  Pedro Alves  <palves@redhat.com>
3278
3279         * common/refcounted-object.h: New file.
3280         * gdbthread.h: Include "common/refcounted-object.h".
3281         (thread_info): Inherit from refcounted_object and add comments.
3282         (thread_info::incref, thread_info::decref)
3283         (thread_info::m_refcount): Delete.
3284         (thread_info::deletable): Use the refcounted_object::refcount()
3285         method.
3286         * inferior.c (current_inferior_): Add comment.
3287         (set_current_inferior): Increment/decrement refcounts.
3288         (prune_inferiors, remove_inferior_command): Skip inferiors marked
3289         not-deletable instead of comparing with the current inferior.
3290         (initialize_inferiors): Increment the initial inferior's refcount.
3291         * inferior.h (struct inferior): Forward declare.
3292         Include "common/refcounted-object.h".
3293         (current_inferior, set_current_inferior): Move declaration to
3294         before struct inferior's definition, and fix comment.
3295         (inferior): Inherit from refcounted_object.  Add comments.
3296         * thread.c (switch_to_thread_no_regs): Reference the thread's
3297         inferior pointer directly instead of doing a ptid lookup.
3298         (switch_to_no_thread): New function.
3299         (switch_to_thread(thread_info *)): New function, factored out
3300         from ...
3301         (switch_to_thread(ptid_t)): ... this.
3302         (restore_current_thread): Delete.
3303         (current_thread_cleanup): Remove 'inf_id' and 'was_removable'
3304         fields, and add 'inf' field.
3305         (do_restore_current_thread_cleanup): Check whether old->inf is
3306         alive instead of looking up an inferior by ptid.  Use
3307         switch_to_thread and switch_to_no_thread.
3308         (restore_current_thread_cleanup_dtor): Use old->inf directly
3309         instead of lookup up an inferior by id.  Decref the inferior.
3310         Don't restore 'removable'.
3311         (make_cleanup_restore_current_thread): Same the inferior pointer
3312         in old, instead of the inferior number.  Incref the inferior.
3313         Don't save/clear 'removable'.
3314
3315 2017-04-19  Pedro Alves  <palves@redhat.com>
3316
3317         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
3318         unittests/scoped_restore-selftests.c.
3319         (SUBDIR_UNITTESTS_OBS): Add scoped_restore-selftests.o.
3320         * common/scoped_restore.h (scoped_restore_base): Make "class".
3321         (scoped_restore_base::release): New public method.
3322         (scoped_restore_base::scoped_restore_base): New protected ctor.
3323         (scoped_restore_base::m_saved_var): New protected field.
3324         (scoped_restore_tmpl::scoped_restore_tmpl(T*)): Initialize the
3325         scoped_restore_base base class instead of m_saved_var directly.
3326         (scoped_restore_tmpl::scoped_restore_tmpl(T*, T2)): Likewise.
3327         (scoped_restore_tmpl::scoped_restore_tmpl(const
3328         scoped_restore_tmpl<T>&)): Likewise.
3329         (scoped_restore_tmpl::~scoped_restore_tmpl): Use the saved_var
3330         method.
3331         (scoped_restore_tmpl::saved_var): New method.
3332         (scoped_restore_tmpl::m_saved_var): Delete.
3333         * inferior.h (inferior::detaching): Now a bool.
3334         * infrun.c (prepare_for_detach): Use a scoped_restore instead of a
3335         cleanup.
3336         * unittests/scoped_restore-selftests.c: New file.
3337
3338 2017-04-19  Pedro Alves  <palves@redhat.com>
3339
3340         * Makefile.in (SUBDIR_UNITTESTS_SRCS, SUBDIR_UNITTESTS_OBS):
3341         Re-sort in alphabetic order.
3342
3343 2017-04-18  Pedro Alves  <palves@redhat.com>
3344
3345         * xml-support.c (obstack_xml_printf): Delete.
3346         * xml-support.h (obstack_xml_printf): Delete.
3347
3348 2017-04-18  Pedro Alves  <palves@redhat.com>
3349
3350         * xml-support.c (gdb_xml_parser) <use_dtd, dtd_name, parse,
3351         vdebug, verror, body_text, start_element, end_element, name,
3352         user_data, set_is_xinclude, set_error, expat_parser>: New methods.
3353         <name, user_data, expat_parser, scopes, error, last_line, dtd_name,
3354         is_xinclude>: Make private and add m_ prefix.
3355         (gdb_xml_parser::body_text): New method, based on ...
3356         (gdb_xml_body_text): ... this.  Adjust.
3357         (gdb_xml_parser::vdebug): New method, based on ...
3358         (gdb_xml_debug): ... this.  Adjust.
3359         (gdb_xml_parser::verror): New method, based on ...
3360         (gdb_xml_error): ... this.  Adjust.
3361         (gdb_xml_parser::start_element): New method, based on ...
3362         (gdb_xml_start_element): ... this.  Adjust.
3363         (gdb_xml_start_element_wrapper): Defer to
3364         gdb_xml_parser::start_element and gdb_xml_parser::set_error.
3365         (gdb_xml_parser::end_element): New method, based on ...
3366         (gdb_xml_end_element_wrapper): ... this.  Adjust.
3367         (gdb_xml_parser::~gdb_xml_parser): Adjust.
3368         (gdb_xml_parser::gdb_xml_parser): Adjust to field renames.
3369         (gdb_xml_parser::use_dtd): New method, based on ...
3370         (gdb_xml_use_dtd): ... this.  Adjust.
3371         (gdb_xml_parser::parse): New method, based on ...
3372         (gdb_xml_parse): ... this.  Adjust.
3373         (gdb_xml_parse_quick): Adjust to call the parser's parse method.
3374         (xinclude_start_include): Adjust to call the parser's name method.
3375         (xml_xinclude_default, xml_xinclude_start_doctype)
3376         (xml_xinclude_end_doctype): Adjust to call the parser's user_data
3377         method.
3378         (xml_process_xincludes): Adjust to call parser methods.
3379         * xml-support.h (gdb_xml_use_dtd, gdb_xml_parse): Delete
3380         declarations.
3381
3382 2017-04-18  Pedro Alves  <palves@redhat.com>
3383
3384         * tracefile-tfile.c (tfile_write_tdesc): Adjust to use
3385         gdb::optional<std::string>.
3386         * xml-support.c: Include <string>.
3387         (scope_level::scope_level(scope_level &&))
3388         (scope_level::~scope_level): Delete.
3389         (scope_level::body): Now a std::string.
3390         (gdb_xml_body_text, gdb_xml_end_element): Adjust.
3391         (xinclude_parsing_data::xinclude_parsing_data): Add 'output'
3392         parameter.
3393         (xinclude_parsing_data::~xinclude_parsing_data): Delete.
3394         (xinclude_parsing_data::output): Now a std::string reference.
3395         (xinclude_start_include): Adjust.
3396         (xml_xinclude_default): Adjust.
3397         (xml_process_xincludes): Add 'output' parameter, and return bool.
3398         * xml-support.h (xml_process_xincludes): Add 'output' parameter,
3399         and return bool.
3400         * xml-tdesc.c: Include <unordered_map> and <string>.
3401         (tdesc_xml_cache): Delete.
3402         (tdesc_xml_cache_s): Delete.
3403         (xml_cache): Now an std::unordered_map.
3404         (tdesc_parse_xml): Adjust to use std::string and unordered_map.
3405         (target_fetch_description_xml): Change return type to
3406         gdb::optional<std::string>, and adjust.
3407         * xml-tdesc.h: Include "common/gdb_optional.h" and <string>.
3408         (target_fetch_description_xml): Change return type to
3409         gdb::optional<std::string>.
3410
3411 2017-04-18  Pedro Alves  <palves@redhat.com>
3412
3413         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
3414         unittests/optional-selftests.c.
3415         (SUBDIR_UNITTESTS_OBS): Add optional-selftests.o.
3416         * unittests/optional-selftests.c: New file.
3417         * unittests/optional/assignment/1.cc: New file.
3418         * unittests/optional/assignment/2.cc: New file.
3419         * unittests/optional/assignment/3.cc: New file.
3420         * unittests/optional/assignment/4.cc: New file.
3421         * unittests/optional/assignment/5.cc: New file.
3422         * unittests/optional/assignment/6.cc: New file.
3423         * unittests/optional/assignment/7.cc: New file.
3424         * unittests/optional/cons/copy.cc: New file.
3425         * unittests/optional/cons/default.cc: New file.
3426         * unittests/optional/cons/move.cc: New file.
3427         * unittests/optional/cons/value.cc: New file.
3428         * unittests/optional/in_place.cc: New file.
3429         * unittests/optional/observers/1.cc: New file.
3430         * unittests/optional/observers/2.cc: New file.
3431
3432 2017-04-18  Pedro Alves  <palves@redhat.com>
3433
3434         * common/gdb_optional.h: Include common/traits.h.
3435         (in_place_t): New type.
3436         (in_place): New constexpr variable.
3437         (optional::optional): Remove member initialization of
3438         m_instantiated.
3439         (optional::optional(in_place_t...)): New constructor.
3440         (optional::~optional): Use reset.
3441         (optional::optional(const optional&)): New.
3442         (optional::optional(const optional&&)): New.
3443         (optional::optional(T &)): New.
3444         (optional::optional(T &&)): New.
3445         (operator::operator=(const optional &)): New.
3446         (operator::operator=(optional &&)): New.
3447         (operator::operator= (const T &))
3448         (operator::operator= (T &&))
3449         (operator::emplace (Args &&... args)): Return a T&.  Use reset.
3450         (operator::reset): New.
3451         (operator::m_instantiated):: Add in-class initializer.
3452         * common/traits.h: Include <type_traits>.
3453         (struct And): New types.
3454
3455 2017-04-18  Pedro Alves  <palves@redhat.com>
3456
3457         * xml-support.c: Include <vector>.
3458         (scope_level::scope_level(const gdb_xml_element *))
3459         (scope_level::scope_level(scope_level&&)): New.
3460         (scope_level::~scope_level): New.
3461         (scope_level_s): Delete.
3462         (gdb_xml_parser::scopes): Now a std::vector.
3463         (gdb_xml_body_text, gdb_xml_start_element, gdb_xml_end_element):
3464         Use std::vector.
3465         (gdb_xml_parser::~gdb_xml_parser): Remove now unnecessary
3466         scope cleanup code.
3467         (gdb_xml_parser::gdb_xml_parser): Remove explicit initialization
3468         of the scopes member.  Use std::vector::emplace_back.
3469
3470 2017-04-18  Pedro Alves  <palves@redhat.com>
3471
3472         * xml-support.c (gdb_xml_parser): Add ctor/dtor.  Make is_xinclude
3473         a bool.
3474         (gdb_xml_end_element): Change type of first parameter.
3475         (gdb_xml_cleanup): Rename to ...
3476         (gdb_xml_parser::~gdb_xml_parser): ... this.
3477         (gdb_xml_create_parser_and_cleanup): Delete with ...
3478         (gdb_xml_parser::gdb_xml_parser): ... creation parts factored out
3479         to this new ctor.
3480         (gdb_xml_parse_quick): Create a local gdb_xml_parser instead of
3481         using gdb_xml_create_parser_and_cleanup.
3482         (xinclude_parsing_data): Add ctor/dtor.
3483         (xml_xinclude_cleanup): Delete.
3484         (xml_process_xincludes): Create a local xinclude_parsing_data
3485         instead of heap-allocating one.  Create a local gdb_xml_parser
3486         instead of heap-allocating one with
3487         gdb_xml_create_parser_and_cleanup.
3488
3489 2017-04-18  John Baldwin  <jhb@FreeBSD.org>
3490
3491         PR threads/20743
3492         * fbsd-nat.c (resume_one_thread_cb): Remove.
3493         (resume_all_threads_cb): Remove.
3494         (fbsd_resume): Use ALL_NON_EXITED_THREADS instead of
3495         iterate_over_threads.
3496
3497 2017-04-17  Joel Brobecker  <brobecker@adacore.com>
3498
3499         * NEWS: Create a new section for the next release branch.
3500         Rename the section of the current branch, now that it has
3501         been cut.
3502
3503 2017-04-17  Joel Brobecker  <brobecker@adacore.com>
3504
3505         GDB 8.0 branch created (725bf5cf125783c2a7ca4ab63d3768e220bab2db):
3506         * version.in: Bump version to 8.0.50.DATE-git.
3507
3508 2017-04-13  Sergio Durigan Junior  <sergiodj@redhat.com>
3509
3510         PR gdb/21385
3511         * windows-nat.c (windows_create_inferior): Declare 'allargs'
3512         independently of the host, and fix build breakage on Cygwin.
3513
3514 2017-04-13  Pedro Alves  <palves@redhat.com>
3515
3516         * inferior.c (free_inferior): Convert to ...
3517         (inferior::~inferior): ... this dtor.
3518         (inferior::inferior): New ctor, factored out from ...
3519         (add_inferior_silent): ... here.  Allocate the inferior with a new
3520         expression.
3521         (delete_inferior): Call delete instead of free_inferior.
3522         * inferior.h (gdb_environ, continuation): Forward declare.
3523         (inferior): Now a class.  Add in-class initialization to all
3524         members.  Make boolean fields bool, except 'detaching'.
3525         (inferior::inferior): New explicit ctor.
3526         (inferior::~inferior): New.
3527
3528 2017-04-13  Pedro Alves  <palves@redhat.com>
3529
3530         * inferior.c (init_inferior_list): Delete.
3531         * inferior.h (init_inferior_list): Delete.
3532
3533 2017-04-13  Pedro Alves  <palves@redhat.com>
3534
3535         PR threads/13217
3536         * gdb.threads/threadapply.exp (thr_apply_detach): New procedure.
3537         (top level): Call it twice, with different thread sets.
3538
3539 2017-04-13  Pedro Alves  <palves@redhat.com>
3540
3541         * thread.c: Include <algorithm>.
3542         (thread_array_cleanup): Delete.
3543         (scoped_inc_dec_ref): New class.
3544         (live_threads_count): New function.
3545         (set_thread_refcount): Delete.
3546         (tp_array_compar_ascending): Now a bool.
3547         (tp_array_compar): Convert to a std::sort comparison function.
3548         (thread_apply_all_command): Use std::vector and scoped_inc_dec_ref
3549         and live_threads_count.
3550
3551 2017-04-13  Pedro Alves  <palves@redhat.com>
3552
3553         * infrun.c (follow_fork_inferior): Also switch the current
3554         inferior.
3555
3556 2017-04-13  Pedro Alves  <palves@redhat.com>
3557
3558         * breakpoint.c (watch_command_1): Save watchpoint-frame info
3559         before calling create_internal_breakpoint.
3560
3561 2017-04-13  Pedro Alves  <palves@redhat.com>
3562
3563         * fork-child.c (execv_argv): New class.
3564         (breakup_args): Refactored as ...
3565         (execv_argv::init_for_no_shell): .. this method of execv_argv.
3566         Copy arguments to storage and replace separators with NULL
3567         terminators in place.
3568         (escape_bang_in_quoted_argument): Adjust to return bool.
3569         (execv_argv::execv_argv): New ctor.
3570         (execv_argv::init_for_shell): New method, factored out from
3571         fork_inferior.  Don't strdup strings into the vector.
3572         (fork_inferior): Eliminate "shell" local and use execv_argv.  Use
3573         Remove free_vector_argv call.
3574
3575 2017-04-13  Yao Qi  <yao.qi@linaro.org>
3576
3577         * rx-tdep.c (rx_fpsw_type): Check tdep->rx_fpsw_type instead of
3578         tdep->rx_psw_type.
3579
3580 2017-04-13  Yao Qi  <yao.qi@linaro.org>
3581
3582         * rl78-tdep.c (rl78_gdbarch_init): Use XCNEW instead of XNEW.
3583         * rx-tdep.c (rx_gdbarch_init): Likewise.
3584
3585 2017-04-13  Pedro Alves  <palves@redhat.com>
3586
3587         * breakpoint.h (struct breakpoint): Reindent.
3588
3589 2017-04-13  Pedro Alves  <palves@redhat.com>
3590
3591         * breakpoint.c (bp_location): Rename to ...
3592         (bp_locations): ... this.  All references updated.
3593         (bp_location_count): Rename to ...
3594         (bp_locations_count): ... this.  All references updated.
3595         (bp_location_placed_address_before_address_max): Rename to ...
3596         (bp_locations_placed_address_before_address_max): ... this.  All
3597         references updated.
3598         (bp_location_shadow_len_after_address_max): Rename to ...
3599         (bp_locations_shadow_len_after_address_max): ... this.  All
3600         references updated.
3601         (bp_location_compare_addrs): Rename to ...
3602         (bp_locations_compare_addrs): ... this.  All references updated.
3603         (bp_location_compare):Rename to ...
3604         (bp_locations_compare): ... this.  All references updated.
3605         (bp_location_target_extensions_update): Rename to ...
3606         (bp_locations_target_extensions_update): ... this.  All references
3607         updated.
3608
3609 2017-04-12  Sergio Durigan Junior  <sergiodj@redhat.com>
3610
3611         * Makefile.in (HFILES_NO_SRCDIR): Add "common/gdb_termios.h".
3612         * common/common.m4: Check headers 'termios.h', 'termio.h' and
3613         'sgtty.h'.
3614         * common/gdb_termios.h: New file, with parts of "terminal.h".
3615         * inflow.c: Include "gdb_termios.h".
3616         * ser-unix.c: Include "gdb_termios.h".
3617         * terminal.h: Move terminal-related defines to
3618         "common/gdb_termios.h".
3619
3620 2017-04-12  Tom Tromey  <tom@tromey.com>
3621
3622         * probe.c (parse_probes): Update.
3623         * location.h (delete_event_location): Don't declare.
3624         (event_location_deleter::operator()): Update.
3625         * location.c (event_location_deleter::operator()): Rename from
3626         delete_event_location.
3627         * linespec.h (linespec_result) <location>: Change type to
3628         event_location_up.
3629         * linespec.c (canonicalize_linespec, event_location_to_sals)
3630         (decode_objc): Update.
3631         (linespec_result): Don't call delete_event_location.
3632         * breakpoint.c (create_breakpoints_sal)
3633         (bkpt_probe_create_sals_from_location)
3634         (strace_marker_create_sals_from_location): Update.
3635
3636 2017-04-12  Tom Tromey  <tom@tromey.com>
3637
3638         * linespec.h (struct linespec_result): Add constructor and
3639         destructor.
3640         (init_linespec_result, destroy_linespec_result)
3641         (make_cleanup_destroy_linespec_result): Don't declare.
3642         * linespec.c (init_linespec_result): Remove.
3643         (linespec_result::~linespec_result): Rename from
3644         destroy_linespec_result.  Update.
3645         (cleanup_linespec_result, make_cleanup_destroy_linespec_result):
3646         Remove.
3647         * breakpoint.c (create_breakpoint, break_range_command)
3648         (decode_location_default): Update.
3649         * ax-gdb.c (agent_command_1): Update.
3650
3651 2017-04-12  Tom Tromey  <tom@tromey.com>
3652
3653         * remote.c (remote_download_tracepoint): Update.
3654         * python/py-breakpoint.c (bppy_get_location): Update.
3655         * guile/scm-breakpoint.c (bpscm_print_breakpoint_smob)
3656         (gdbscm_breakpoint_location): Update.
3657         * elfread.c (elf_gnu_ifunc_resolver_return_stop): Update.
3658         * breakpoint.h (struct breakpoint) <location, location_range_end>:
3659         Change type to event_location_up.
3660         * breakpoint.c (create_overlay_event_breakpoint)
3661         (create_longjmp_master_breakpoint)
3662         (create_std_terminate_master_breakpoint)
3663         (create_exception_master_breakpoint)
3664         (breakpoint_event_location_empty_p, print_breakpoint_location)
3665         (print_one_breakpoint_location, create_thread_event_breakpoint)
3666         (init_breakpoint_sal, create_breakpoint)
3667         (print_recreate_ranged_breakpoint, break_range_command)
3668         (init_ada_exception_breakpoint, say_where): Update.
3669         (base_breakpoint_dtor): Don't call delete_event_location.
3670         (bkpt_print_recreate, tracepoint_print_recreate)
3671         (dprintf_print_recreate, update_static_tracepoint)
3672         (breakpoint_re_set_default): Update.
3673
3674 2017-04-12  Tom Tromey  <tom@tromey.com>
3675
3676         * compile/compile-loc2c.c (compute_stack_depth_worker): Change
3677         type of "to_do".  Update.
3678         (compute_stack_depth): Use std::vector.
3679
3680 2017-04-12  Tom Tromey  <tom@tromey.com>
3681
3682         * printcmd.c (find_instruction_backward): Use std::vector.
3683
3684 2017-04-12  Tom Tromey  <tom@tromey.com>
3685
3686         * symfile.c (objfilep): Remove typedef.
3687         (reread_symbols): Use a std::vector.
3688
3689 2017-04-12  Tom Tromey  <tom@tromey.com>
3690
3691         * mi/mi-main.c (exec_direction_forward): Remove.
3692         (exec_reverse_continue, mi_execute_command): Use scoped_restore.
3693         * guile/scm-ports.c (ioscm_with_output_to_port_worker): Use
3694         scoped_restore.
3695         * guile/guile.c (guile_repl_command, guile_command)
3696         (gdbscm_execute_gdb_command): Use scoped_restore.
3697         * go-exp.y (go_parse): Use scoped_restore.
3698         * d-exp.y (d_parse): Use scoped_restore.
3699         * cli/cli-decode.c (cmd_func): Use scoped_restore.
3700         * c-exp.y (c_parse): Use scoped_restore.
3701
3702 2017-04-12  Tom Tromey  <tom@tromey.com>
3703
3704         * mi/mi-parse.h (struct mi_parse): Add constructor, destructor.
3705         (mi_parse): Update return type.
3706         (mi_parse_free): Remove.
3707         * mi/mi-parse.c (mi_parse::mi_parse): New constructor.
3708         (mi_parse::~mi_parse): Rename from mi_parse_free.
3709         (mi_parse_cleanup): Remove.
3710         (mi_parse): Return a unique_ptr.  Use new.
3711         * mi/mi-main.c (mi_execute_command): Update.
3712
3713 2017-04-12  Tom Tromey  <tom@tromey.com>
3714
3715         * location.c (explicit_location_lex_one): Return a
3716         unique_xmalloc_ptr.
3717         (string_to_explicit_location): Update.  Remove cleanups.
3718
3719 2017-04-12  Tom Tromey  <tom@tromey.com>
3720
3721         * gnu-v3-abi.c (value_and_voffset_p): Remove typedef.
3722         (compare_value_and_voffset): Change type.  Update.
3723         (compute_vtable_size): Change type of "offset_vec".
3724         (gnuv3_print_vtable): Use std::vector.  Remove cleanups.
3725         (gnuv3_get_typeid): Remove extraneous declaration.
3726
3727 2017-04-12  Tom Tromey  <tom@tromey.com>
3728
3729         * charset.h (wchar_iterator): Fix comment.
3730
3731 2017-04-12  Tom Tromey  <tom@tromey.com>
3732
3733         * charset.c (iconv_wrapper): New class.
3734         (cleanup_iconv): Remove.
3735         (convert_between_encodings): Use it.
3736
3737 2017-04-12  Tom Tromey  <tom@tromey.com>
3738
3739         * symfile.h (increment_reading_symtab): Update type.
3740         * symfile.c (decrement_reading_symtab): Remove.
3741         (increment_reading_symtab): Return a scoped_restore_tmpl<int>.
3742         * psymtab.c (psymtab_to_symtab): Update.
3743         * dwarf2read.c (dw2_instantiate_symtab): Update.
3744
3745 2017-04-12  Tom Tromey  <tom@tromey.com>
3746
3747         * jit.c (struct jit_reader): Declare separately.  Add constructor
3748         and destructor.  Change type of "handle".
3749         (loaded_jit_reader): Define separately.
3750         (jit_reader_load): Update.  New "new".
3751         (jit_reader_unload_command): Use "delete".
3752         * gdb-dlfcn.h (struct dlclose_deleter): New.
3753         (gdb_dlhandle_up): New typedef.
3754         (gdb_dlopen, gdb_dlsym): Update types.
3755         (gdb_dlclose): Remove.
3756         * gdb-dlfcn.c (gdb_dlopen): Return a gdb_dlhandle_up.
3757         (gdb_dlsym): Change type of "handle".
3758         (make_cleanup_dlclose): Remove.
3759         (dlclose_deleter::operator()): Rename from gdb_dlclose.
3760         * compile/compile-c-support.c (load_libcc): Update.
3761
3762 2017-04-12  Tom Tromey  <tom@tromey.com>
3763
3764         * symtab.h (find_pcs_for_symtab_line): Change return type.
3765         * symtab.c (find_pcs_for_symtab_line): Change return type.
3766         * python/py-linetable.c (build_line_table_tuple_from_pcs): Change
3767         type of "vec".  Update.
3768         (ltpy_get_pcs_for_line): Update.
3769         * linespec.c (decode_digits_ordinary): Update.
3770
3771 2017-04-12  Tom Tromey  <tom@tromey.com>
3772
3773         * tracepoint.c (actions_command): Update.
3774         * python/python.c (python_command, python_interactive_command):
3775         Update.
3776         * mi/mi-cmd-break.c (mi_cmd_break_commands): Update.
3777         * guile/guile.c (guile_command): Update.
3778         * defs.h (read_command_lines, read_command_lines_1): Return
3779         command_line_up.
3780         (command_lines_deleter): New struct.
3781         (command_line_up): New typedef.
3782         * compile/compile.c (compile_code_command)
3783         (compile_print_command): Update.
3784         * cli/cli-script.h (get_command_line, copy_command_lines): Return
3785         command_line_up.
3786         (make_cleanup_free_command_lines): Remove.
3787         * cli/cli-script.c (get_command_line, read_command_lines_1)
3788         (copy_command_lines): Return command_line_up.
3789         (while_command, if_command, read_command_lines, define_command)
3790         (document_command): Update.
3791         (do_free_command_lines_cleanup, make_cleanup_free_command_lines):
3792         Remove.
3793         * breakpoint.h (breakpoint_set_commands): Change type of
3794         "commands".
3795         * breakpoint.c (breakpoint_set_commands): Change type of
3796         "commands".  Update.
3797         (do_map_commands_command, update_dprintf_command_list)
3798         (create_tracepoint_from_upload): Update.
3799
3800 2017-04-12  Tom Tromey  <tom@tromey.com>
3801
3802         * tracepoint.c (scope_info): Update.
3803         * spu-tdep.c (spu_catch_start): Update.
3804         * python/python.c (gdbpy_decode_line): Update.
3805         * python/py-finishbreakpoint.c (bpfinishpy_init): Update.
3806         * python/py-breakpoint.c (bppy_init): Update.
3807         * probe.c (parse_probes): Update.
3808         * mi/mi-cmd-break.c (mi_cmd_break_insert_1): Update.
3809         * location.h (event_location_deleter): New struct.
3810         (event_location_up): New typedef.
3811         (new_linespec_location, new_address_location, new_probe_location)
3812         (new_explicit_location, copy_event_location)
3813         (string_to_event_location, string_to_event_location_basic)
3814         (string_to_explicit_location): Update return type.
3815         (make_cleanup_delete_event_location): Remove.
3816         * location.c (new_linespec_location, new_address_location)
3817         (new_probe_location, new_explicit_location, copy_event_location):
3818         Return event_location_up.
3819         (delete_event_location_cleanup)
3820         (make_cleanup_delete_event_location): Remove.
3821         (string_to_explicit_location, string_to_event_location_basic)
3822         (string_to_event_location): Return event_location_up.
3823         * linespec.c (canonicalize_linespec, event_location_to_sals)
3824         (decode_line_with_current_source)
3825         (decode_line_with_last_displayed, decode_objc): Update.
3826         * guile/scm-breakpoint.c (gdbscm_register_breakpoint_x): Update.
3827         * completer.c (location_completer): Update.
3828         * cli/cli-cmds.c (edit_command, list_command): Update.
3829         * breakpoint.c (create_overlay_event_breakpoint)
3830         (create_longjmp_master_breakpoint)
3831         (create_std_terminate_master_breakpoint)
3832         (create_exception_master_breakpoint)
3833         (create_thread_event_breakpoint): Update.
3834         (init_breakpoint_sal): Update.  Remove some dead code.
3835         (create_breakpoint_sal): Change type of "location".  Update.
3836         (create_breakpoints_sal, create_breakpoint, break_command_1)
3837         (dprintf_command, break_range_command, until_break_command)
3838         (init_ada_exception_breakpoint)
3839         (strace_marker_create_sals_from_location)
3840         (update_static_tracepoint, trace_command, ftrace_command)
3841         (strace_command, create_tracepoint_from_upload): Update.
3842         * break-catch-throw.c (re_set_exception_catchpoint): Update.
3843         * ax-gdb.c (agent_command_1): Update.
3844
3845 2017-04-12  Pedro Alves  <palves@redhat.com>
3846
3847         * Makefile.in (ALL_TARGET_OBS): Add i386-go32-tdep.o.
3848         * configure.tgt: Handle i[34567]86-*-go32* and
3849         i[34567]86-*-msdosdjgpp*.
3850         * i386-tdep.c (i386_svr4_reg_to_regnum):
3851         Make extern.
3852         (i386_go32_init_abi, i386_coff_osabi_sniffer): Moved to
3853         i386-go32-tdep.c.
3854         (_initialize_i386_tdep): DJGPP bits moved to i386-go32-tdep.c.
3855         * i386-go32-tdep.c: New file.
3856         * i386-tdep.h (tdesc_i386_mmx, i386_svr4_reg_to_regnum): New
3857         declarations.
3858
3859 2017-04-12  Simon Marchi  <simon.marchi@ericsson.com>
3860
3861         * aix-thread.c (pd_status2str): Change return type to const char *.
3862
3863 2017-04-12  Pedro Alves  <palves@redhat.com>
3864
3865         * i386-tdep.c (i386_elf_init_abi, i386_go32_init_abi): Remove
3866         calls to set_gdbarch_gnu_triplet_regexp.
3867
3868 2017-04-12  Pedro Alves  <palves@redhat.com>
3869
3870         PR gdb/21323
3871         * c-lang.c (cplus_primitive_types) <cplus_primitive_type_wchar_t>:
3872         New enum value.
3873         (cplus_language_arch_info): Register cplus_primitive_type_wchar_t.
3874         * gdbtypes.h (struct builtin_type) <builtin_wchar>: New field.
3875         * gdbtypes.c (gdbtypes_post_init): Create the "wchar_t" type.
3876         * gdbarch.sh (wchar_bit, wchar_signed): New per-arch values.
3877         * gdbarch.h, gdbarch.c: Regenerate.
3878         * aarch64-tdep.c (aarch64_gdbarch_init): Override
3879         gdbarch_wchar_bit and gdbarch_wchar_signed.
3880         * alpha-tdep.c (alpha_gdbarch_init): Likewise.
3881         * arm-tdep.c (arm_gdbarch_init): Likewise.
3882         * avr-tdep.c (avr_gdbarch_init): Likewise.
3883         * h8300-tdep.c (h8300_gdbarch_init): Likewise.
3884         * i386-nto-tdep.c (i386nto_init_abi): Likewise.
3885         * i386-tdep.c (i386_go32_init_abi): Likewise.
3886         * m32r-tdep.c (m32r_gdbarch_init): Likewise.
3887         * moxie-tdep.c (moxie_gdbarch_init): Likewise.
3888         * nds32-tdep.c (nds32_gdbarch_init): Likewise.
3889         * rs6000-aix-tdep.c (rs6000_aix_init_osabi): Likewise.
3890         * sh-tdep.c (sh_gdbarch_init): Likewise.
3891         * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
3892         * sparc64-tdep.c (sparc64_init_abi): Likewise.
3893         * windows-tdep.c (windows_init_abi): Likewise.
3894         * xstormy16-tdep.c (xstormy16_gdbarch_init): Likewise.
3895
3896 2017-04-12  Pedro Alves  <palves@redhat.com>
3897
3898         PR c++/21323
3899         * c-lang.c (cplus_primitive_types) <cplus_primitive_type_char16_t,
3900         cplus_primitive_type_char32_t>: New enum values.
3901         (cplus_language_arch_info): Register cplus_primitive_type_char16_t
3902         and cplus_primitive_type_char32_t.
3903         * dwarf2read.c (read_base_type) <DW_ATE_UTF>: If bit size is 16 or
3904         32, use the archtecture's built-in type for char16_t and char32_t,
3905         respectively.  Otherwise, fallback to init_integer_type as before,
3906         but make the type unsigned, and issue a complaint.
3907         * gdbtypes.c (gdbtypes_post_init): Make char16_t and char32_t unsigned.
3908
3909 2017-04-12  Alan Hayward  <alan.hayward@arm.com>
3910
3911         * m32r-tdep.c (M32R_ARG_REGISTER_SIZE): Added.
3912         (m32r_push_dummy_call): Use M32R_ARG_REGISTER_SIZE.
3913
3914 2017-04-12  Sergio Durigan Junior  <sergiodj@redhat.com>
3915
3916         * windows-nat.c (windows_create_inferior): Declare 'toexec' as
3917         'const char *'.
3918
3919 2017-04-12  Sergio Durigan Junior  <sergiodj@redhat.com>
3920
3921         * common/common-utils.c (free_vector_argv): New function.
3922         * common/common-utils.h: Include <vector>.
3923         (free_vector_argv): New prototype.
3924         * darwin-nat.c (darwin_create_inferior): Rewrite function
3925         prototype in order to constify "exec_file" and accept a
3926         "std::string" for "allargs".
3927         * fork-child.c: Include <vector>.
3928         (breakup_args): Rewrite function, using C++.
3929         (fork_inferior): Rewrite function header, constify "exec_file_arg"
3930         and accept "std::string" for "allargs".  Update the code to
3931         calculate "argv" based on "allargs".  Update calls to "exec_fun"
3932         and "execvp".
3933         * gnu-nat.c (gnu_create_inferior): Rewrite function prototype in
3934         order to constify "exec_file" and accept a "std::string" for
3935         "allargs".
3936         * go32-nat.c (go32_create_inferior): Likewise.
3937         * inf-ptrace.c (inf_ptrace_create_inferior): Likewise.
3938         * infcmd.c (run_command_1): Constify "exec_file".  Use
3939         "std::string" for inferior arguments.
3940         * inferior.h (fork_inferior): Update prototype.
3941         * linux-nat.c (linux_nat_create_inferior): Rewrite function
3942         prototype in order to constify "exec_file" and accept a
3943         "std::string" for "allargs".
3944         * nto-procfs.c (procfs_create_inferior): Likewise.
3945         * procfs.c (procfs_create_inferior): Likewise.
3946         * remote-sim.c (gdbsim_create_inferior): Likewise.
3947         * remote.c (extended_remote_run): Update code to accept
3948         "std::string" as argument.
3949         (extended_remote_create_inferior): Rewrite function prototype in
3950         order to constify "exec_file" and accept a "std::string" for
3951         "allargs".
3952         * rs6000-nat.c (super_create_inferior): Likewise.
3953         (rs6000_create_inferior): Likewise.
3954         * target.h (struct target_ops) <to_create_inferior>: Likewise.
3955         * windows-nat.c (windows_create_inferior): Likewise.
3956
3957 2017-04-11  Pedro Alves  <palves@redhat.com>
3958
3959         * thread.c: Fix whitespace throughout.
3960
3961 2017-04-11  Philipp Rudo  <prudo@linux.vnet.ibm.com>
3962
3963         * linux-nat.c (linux_nat_detach): Remove delete_lwp call.
3964
3965 2017-04-11  Alan Hayward  <alan.hayward@arm.com>
3966
3967         * arm-tdep.c (arm_store_return_value): Use FP_REGISTER_SIZE
3968
3969 2017-04-10  Sergio Durigan Junior  <sergiodj@redhat.com>
3970
3971         PR gdb/21364
3972         * osdata.c (info_osdata): Check if 'type' is an empty string
3973         instead of NULL.
3974
3975 2017-04-10  Pedro Alves  <palves@redhat.com>
3976
3977         * thread.c (add_thread_silent, delete_thread_1, find_thread_ptid)
3978         (ptid_to_global_thread_id, in_thread_list)
3979         (do_captured_list_thread_ids, set_resumed, set_running)
3980         (set_executing, set_stop_requested, finish_thread_state)
3981         (validate_registers_access, can_access_registers_ptid)
3982         (print_thread_info_1, switch_to_thread)
3983         (do_restore_current_thread_cleanup)
3984         (make_cleanup_restore_current_thread, thread_command)
3985         (thread_name_command): Use operator== instead of ptid_equal.
3986
3987 2017-04-10  Pedro Alves  <palves@redhat.com>
3988
3989         * thread.c (struct current_thread_cleanup) <next>: Delete field.
3990         (current_thread_cleanup_chain): Delete.
3991         (restore_current_thread_cleanup_dtor)
3992         (make_cleanup_restore_current_thread): Remove references to
3993         current_thread_cleanup_chain.
3994
3995 2017-04-10  Alan Hayward  <alan.hayward@arm.com>
3996
3997         * msp430-tdep.c (msp430_pseudo_register_read): Never return
3998         REG_UNKNOWN.
3999
4000 2017-04-10  Yao Qi  <yao.qi@linaro.org>
4001
4002         PR gdb/19942
4003         * gdbthread.h (thread_info::deletable): New method.
4004         (thread_info::incref): New method.
4005         (thread_info::decref): New method.
4006         (thread_info::refcount): Move it to private.
4007         * infrun.c (save_stop_context): Call inc_refcount.
4008         (release_stop_context_cleanup): Likewise.
4009         * thread.c (set_thread_exited): New function.
4010         (init_thread_list): Delete "tp" only it is deletable, otherwise
4011         call set_thread_exited.
4012         (delete_thread_1): Call set_thread_exited.
4013         (current_thread_cleanup) <inferior_pid>: Remove.
4014         <thread>: New field.
4015         (restore_current_thread_ptid_changed): Removed.
4016         (do_restore_current_thread_cleanup): Adjust.
4017         (restore_current_thread_cleanup_dtor): Don't call
4018         find_thread_ptid.
4019         (set_thread_refcount): Use dec_refcount.
4020         (make_cleanup_restore_current_thread): Adjust.
4021         (thread_apply_all_command): Call inc_refcount.
4022         (_initialize_thread): Don't call
4023         observer_attach_thread_ptid_changed.
4024
4025 2017-04-10  Yao Qi  <yao.qi@linaro.org>
4026
4027         * thread.c (delete_thread_1): Hoist code on marking thread as
4028         exited.
4029
4030 2017-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
4031
4032         * windows-nat.c (windows_detach): Initialize ptid with
4033         minus_one_ptid.
4034
4035 2017-04-07  Simon Marchi  <simon.marchi@ericsson.com>
4036
4037         * unittests/ptid-selftests.c: Fix erroneous assert messages.
4038
4039 2017-04-07  Alan Hayward  <alan.hayward@arm.com>
4040
4041         * bfin-tdep.c (BFIN_MAX_REGISTER_SIZE): Add.
4042         (bfin_pseudo_register_read): Use BFIN_MAX_REGISTER_SIZE.
4043         (bfin_pseudo_register_write): Likewise
4044
4045 2017-04-06  Simon Marchi  <simon.marchi@ericsson.com>
4046
4047         * common/ptid.h (struct ptid): Change to...
4048         (class ptid_t): ... this.
4049         <ptid_t>: New constructors.
4050         <pid, lwp_p, lwp, tid_p, tid, is_pid, operator==, operator!=,
4051         matches>: New methods.
4052         <make_null, make_minus_one>: New static methods.
4053         <pid>: Rename to...
4054         <m_pid>: ...this.
4055         <lwp>: Rename to...
4056         <m_lwp>: ...this.
4057         <tid>: Rename to...
4058         <m_tid>: ...this.
4059         (ptid_build, ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal,
4060         ptid_is_pid, ptid_lwp_p, ptid_tid_p, ptid_match): Take ptid arguments
4061         as references, move comment to class ptid_t.
4062         * common/ptid.c (null_ptid, minus_one_ptid): Initialize with
4063         ptid_t static methods.
4064         (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_tid,
4065         ptid_equal, ptid_is_pid, ptid_lwp_p, ptid_tid_p, ptid_match):
4066         Take ptid arguments as references, implement using ptid_t methods.
4067         * unittests/ptid-selftests.c: New file.
4068         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
4069         unittests/ptid-selftests.c.
4070         (SUBDIR_UNITTESTS_OBS): Add unittests/ptid-selftests.o.
4071
4072 2017-04-06  Thomas Preud'homme  <thomas.preudhomme@arm.com>
4073
4074         * python/python.c (python_run_simple_file): Cast mode literal to
4075         non-const char pointer as expected by PyFile_FromString.
4076
4077 2017-04-05  Simon Marchi  <simon.marchi@ericsson.com>
4078
4079         * common/ptid.c (ptid_lwp_p, ptid_tid_p): Remove comparison with
4080         minus_one_ptid and null_ptid.
4081
4082 2017-04-05  Pedro Alves  <palves@redhat.com>
4083
4084         * warning.m4 (build_warnings): Remove -Wno-write-strings.
4085         * configure: Regenerate.
4086
4087 2017-04-05  Pedro Alves  <palves@redhat.com>
4088
4089         * ada-exp.y (yyerror): Constify.
4090         * ada-lang.c (bound_name, get_selections)
4091         (ada_variant_discrim_type)
4092         (ada_variant_discrim_name, ada_value_struct_elt)
4093         (ada_lookup_struct_elt_type, is_unchecked_variant)
4094         (ada_which_variant_applies, standard_exc, ada_get_next_arg)
4095         (catch_ada_exception_command_split)
4096         (catch_ada_assert_command_split, catch_assert_command)
4097         (ada_op_name): Constify.
4098         * ada-lang.h (ada_yyerror, get_selections)
4099         (ada_variant_discrim_name, ada_value_struct_elt): Constify.
4100         * arc-tdep.c (arc_print_frame_cache): Constify.
4101         * arm-tdep.c (arm_skip_stub): Constify.
4102         * ax-gdb.c (gen_binop, gen_struct_ref_recursive, gen_struct_ref)
4103         (gen_aggregate_elt_ref): Constify.
4104         * bcache.c (print_bcache_statistics): Constify.
4105         * bcache.h (print_bcache_statistics): Constify.
4106         * break-catch-throw.c (catch_exception_command_1):
4107         * breakpoint.c (struct ep_type_description::description):
4108         Constify.
4109         (add_solib_catchpoint): Constify.
4110         (catch_fork_command_1): Add cast.
4111         (add_catch_command): Constify.
4112         * breakpoint.h (add_catch_command, add_solib_catchpoint):
4113         Constify.
4114         * bsd-uthread.c (bsd_uthread_state): Constify.
4115         * buildsym.c (patch_subfile_names): Constify.
4116         * buildsym.h (next_symbol_text_func, patch_subfile_names):
4117         Constify.
4118         * c-exp.y (yyerror): Constify.
4119         (token::oper): Constify.
4120         * c-lang.h (c_yyerror, cp_print_class_member): Constify.
4121         * c-varobj.c (cplus_describe_child): Constify.
4122         * charset.c (find_charset_names): Add cast.
4123         (find_charset_names): Constify array and add const_cast.
4124         * cli/cli-cmds.c (complete_command, cd_command): Constify.
4125         (edit_command): Constify.
4126         * cli/cli-decode.c (lookup_cmd): Constify.
4127         * cli/cli-dump.c (dump_memory_command, dump_value_command):
4128         Constify.
4129         (struct dump_context): Constify.
4130         (add_dump_command, restore_command): Constify.
4131         * cli/cli-script.c (get_command_line): Constify.
4132         * cli/cli-script.h (get_command_line): Constify.
4133         * cli/cli-utils.c (check_for_argument): Constify.
4134         * cli/cli-utils.h (check_for_argument): Constify.
4135         * coff-pe-read.c (struct read_pe_section_data): Constify.
4136         * command.h (lookup_cmd): Constify.
4137         * common/print-utils.c (decimal2str): Constify.
4138         * completer.c (gdb_print_filename): Constify.
4139         * corefile.c (set_gnutarget): Constify.
4140         * cp-name-parser.y (yyerror): Constify.
4141         * cp-valprint.c (cp_print_class_member): Constify.
4142         * cris-tdep.c (cris_register_name, crisv32_register_name):
4143         Constify.
4144         * d-exp.y (yyerror): Constify.
4145         (struct token::oper): Constify.
4146         * d-lang.h (d_yyerror): Constify.
4147         * dbxread.c (struct header_file_location::name): Constify.
4148         (add_old_header_file, add_new_header_file, last_function_name)
4149         (dbx_next_symbol_text, add_bincl_to_list)
4150         (find_corresponding_bincl_psymtab, set_namestring)
4151         (find_stab_function_addr, read_dbx_symtab, start_psymtab)
4152         (dbx_end_psymtab, read_ofile_symtab, process_one_symbol):
4153         * defs.h (command_line_input, print_address_symbolic)
4154         (deprecated_readline_begin_hook): Constify.
4155         * dwarf2read.c (anonymous_struct_prefix, dwarf_bool_name):
4156         Constify.
4157         * event-top.c (handle_line_of_input): Constify and add cast.
4158         * exceptions.c (catch_errors): Constify.
4159         * exceptions.h (catch_errors): Constify.
4160         * expprint.c (print_subexp_standard, op_string, op_name)
4161         (op_name_standard, dump_raw_expression, dump_raw_expression):
4162         * expression.h (op_name, op_string, dump_raw_expression):
4163         Constify.
4164         * f-exp.y (yyerror): Constify.
4165         (struct token::oper): Constify.
4166         (struct f77_boolean_val::name): Constify.
4167         * f-lang.c (f_word_break_characters): Constify.
4168         * f-lang.h (f_yyerror): Constify.
4169         * fork-child.c (fork_inferior): Add cast.
4170         * frv-tdep.c (struct gdbarch_tdep::register_names): Constify.
4171         (new_variant): Constify.
4172         * gdbarch.sh (pstring_ptr, pstring_list): Constify.
4173         * gdbarch.c: Regenerate.
4174         * gdbcore.h (set_gnutarget): Constify.
4175         * go-exp.y (yyerror): Constify.
4176         (token::oper): Constify.
4177         * go-lang.h (go_yyerror): Constify.
4178         * go32-nat.c (go32_sysinfo): Constify.
4179         * guile/scm-breakpoint.c (gdbscm_breakpoint_expression): Constify.
4180         * guile/scm-cmd.c (cmdscm_function): Constify.
4181         * guile/scm-param.c (pascm_param_value): Constify.
4182         * h8300-tdep.c (h8300_register_name, h8300s_register_name)
4183         (h8300sx_register_name): Constify.
4184         * hppa-tdep.c (hppa32_register_name, hppa64_register_name):
4185         Constify.
4186         * ia64-tdep.c (ia64_register_names): Constify.
4187         * infcmd.c (construct_inferior_arguments): Constify.
4188         (path_command, attach_post_wait): Constify.
4189         * language.c (show_range_command, show_case_command)
4190         (unk_lang_error): Constify.
4191         * language.h (language_defn::la_error)
4192         (language_defn::la_name_of_this): Constify.
4193         * linespec.c (decode_line_2): Constify.
4194         * linux-thread-db.c (thread_db_err_str): Constify.
4195         * lm32-tdep.c (lm32_register_name): Constify.
4196         * m2-exp.y (yyerror): Constify.
4197         * m2-lang.h (m2_yyerror): Constify.
4198         * m32r-tdep.c (m32r_register_names): Constify and make static.
4199         * m68hc11-tdep.c (m68hc11_register_names): Constify.
4200         * m88k-tdep.c (m88k_register_name): Constify.
4201         * macroexp.c (appendmem): Constify.
4202         * mdebugread.c (fdr_name, add_data_symbol, parse_type)
4203         (upgrade_type, parse_external, parse_partial_symbols)
4204         (mdebug_next_symbol_text, cross_ref, mylookup_symbol, new_psymtab)
4205         (new_symbol): Constify.
4206         * memattr.c (mem_info_command): Constify.
4207         * mep-tdep.c (register_name_from_keyword): Constify.
4208         * mi/mi-cmd-env.c (mi_cmd_env_path, _initialize_mi_cmd_env):
4209         Constify.
4210         * mi/mi-cmd-stack.c (list_args_or_locals): Constify.
4211         * mi/mi-cmd-var.c (mi_cmd_var_show_attributes): Constify.
4212         * mi/mi-main.c (captured_mi_execute_command): Constify and add
4213         cast.
4214         (mi_execute_async_cli_command): Constify.
4215         * mips-tdep.c (mips_register_name): Constify.
4216         * mn10300-tdep.c (register_name, mn10300_generic_register_name)
4217         (am33_register_name, am33_2_register_name)
4218         * moxie-tdep.c (moxie_register_names): Constify.
4219         * nat/linux-osdata.c (osdata_type): Constify fields.
4220         * nto-tdep.c (nto_parse_redirection): Constify.
4221         * objc-lang.c (lookup_struct_typedef, lookup_objc_class)
4222         (lookup_child_selector): Constify.
4223         (objc_methcall::name): Constify.
4224         * objc-lang.h (lookup_objc_class, lookup_child_selector)
4225         (lookup_struct_typedef): Constify.
4226         * objfiles.c (pc_in_section): Constify.
4227         * objfiles.h (pc_in_section): Constify.
4228         * p-exp.y (struct token::oper): Constify.
4229         (yyerror): Constify.
4230         * p-lang.h (pascal_yyerror): Constify.
4231         * parser-defs.h (op_name_standard): Constify.
4232         (op_print::string): Constify.
4233         (exp_descriptor::op_name): Constify.
4234         * printcmd.c (print_address_symbolic): Constify.
4235         * psymtab.c (print_partial_symbols): Constify.
4236         * python/py-breakpoint.c (stop_func): Constify.
4237         (bppy_get_expression): Constify.
4238         * python/py-cmd.c (cmdpy_completer::name): Constify.
4239         (cmdpy_function): Constify.
4240         * python/py-event.c (evpy_add_attribute)
4241         (gdbpy_initialize_event_generic): Constify.
4242         * python/py-event.h (evpy_add_attribute)
4243         (gdbpy_initialize_event_generic): Constify.
4244         * python/py-evts.c (add_new_registry): Constify.
4245         * python/py-finishbreakpoint.c (outofscope_func): Constify.
4246         * python/py-framefilter.c (get_py_iter_from_func): Constify.
4247         * python/py-inferior.c (get_buffer): Add cast.
4248         * python/py-param.c (parm_constant::name): Constify.
4249         * python/py-unwind.c (fprint_frame_id): Constify.
4250         * python/python.c (gdbpy_parameter_value): Constify.
4251         * remote-fileio.c (remote_fio_func_map): Make 'name' const.
4252         * remote.c (memory_packet_config::name): Constify.
4253         (show_packet_config_cmd, remote_write_bytes)
4254         (remote_buffer_add_string):
4255         * reverse.c (exec_reverse_once): Constify.
4256         * rs6000-tdep.c (variant::name, variant::description): Constify.
4257         * rust-exp.y (rustyyerror): Constify.
4258         * rust-lang.c (rust_op_name): Constify.
4259         * rust-lang.h (rustyyerror): Constify.
4260         * serial.h (serial_ops::name): Constify.
4261         * sh-tdep.c (sh_sh_register_name, sh_sh3_register_name)
4262         (sh_sh3e_register_name, sh_sh2e_register_name)
4263         (sh_sh2a_register_name, sh_sh2a_nofpu_register_name)
4264         (sh_sh_dsp_register_name, sh_sh3_dsp_register_name)
4265         (sh_sh4_register_name, sh_sh4_nofpu_register_name)
4266         (sh_sh4al_dsp_register_name): Constify.
4267         * sh64-tdep.c (sh64_register_name): Constify.
4268         * solib-darwin.c (lookup_symbol_from_bfd): Constify.
4269         * spu-tdep.c (spu_register_name, info_spu_dma_cmdlist): Constify.
4270         * stabsread.c (patch_block_stabs, read_type_number)
4271         (ref_map::stabs, ref_add, process_reference)
4272         (symbol_reference_defined, define_symbol, define_symbol)
4273         (error_type, read_type, read_member_functions, read_cpp_abbrev)
4274         (read_one_struct_field, read_struct_fields, read_baseclasses)
4275         (read_tilde_fields, read_struct_type, read_array_type)
4276         (read_enum_type, read_sun_builtin_type, read_sun_floating_type)
4277         (read_huge_number, read_range_type, read_args, common_block_start)
4278         (find_name_end): Constify.
4279         * stabsread.h (common_block_start, define_symbol)
4280         (process_one_symbol, symbol_reference_defined, ref_add):
4281         * symfile.c (get_section_index, add_symbol_file_command):
4282         * symfile.h (get_section_index): Constify.
4283         * target-descriptions.c (tdesc_type::name): Constify.
4284         (tdesc_free_type): Add cast.
4285         * target.c (find_default_run_target):
4286         (add_deprecated_target_alias, find_default_run_target)
4287         (target_announce_detach): Constify.
4288         (do_option): Constify.
4289         * target.h (add_deprecated_target_alias): Constify.
4290         * thread.c (print_thread_info_1): Constify.
4291         * top.c (deprecated_readline_begin_hook, command_line_input):
4292         Constify.
4293         (init_main): Add casts.
4294         * top.h (handle_line_of_input): Constify.
4295         * tracefile-tfile.c (tfile_write_uploaded_tsv): Constify.
4296         * tracepoint.c (tvariables_info_1, trace_status_mi): Constify.
4297         (tfind_command): Rename to ...
4298         (tfind_command_1): ... this and constify.
4299         (tfind_command): New function.
4300         (tfind_end_command, tfind_start_command): Adjust.
4301         (encode_source_string): Constify.
4302         * tracepoint.h (encode_source_string): Constify.
4303         * tui/tui-data.c (tui_partial_win_by_name): Constify.
4304         * tui/tui-data.h (tui_partial_win_by_name): Constify.
4305         * tui/tui-source.c (tui_set_source_content_nil): Constify.
4306         * tui/tui-source.h (tui_set_source_content_nil): Constify.
4307         * tui/tui-win.c (parse_scrolling_args): Constify.
4308         * tui/tui-windata.c (tui_erase_data_content): Constify.
4309         * tui/tui-windata.h (tui_erase_data_content): Constify.
4310         * tui/tui-winsource.c (tui_erase_source_content): Constify.
4311         * tui/tui.c (tui_enable): Add cast.
4312         * utils.c (defaulted_query): Constify.
4313         (init_page_info): Add cast.
4314         (puts_debug, subset_compare): Constify.
4315         * utils.h (subset_compare): Constify.
4316         * varobj.c (varobj_format_string): Constify.
4317         * varobj.h (varobj_format_string): Constify.
4318         * vax-tdep.c (vax_register_name): Constify.
4319         * windows-nat.c (windows_detach): Constify.
4320         * xcoffread.c (process_linenos, xcoff_next_symbol_text): Constify.
4321         * xml-support.c (gdb_xml_end_element): Constify.
4322         * xml-tdesc.c (tdesc_start_reg): Constify.
4323         * xstormy16-tdep.c (xstormy16_register_name): Constify.
4324         * xtensa-tdep.c (xtensa_find_register_by_name): Constify.
4325         * xtensa-tdep.h (xtensa_register_t::name): Constify.
4326
4327 2017-04-05  Pedro Alves  <palves@redhat.com>
4328
4329         * proc-api.c (struct trans): Constify.
4330         (procfs_note): Constify.
4331         * proc-events.c (struct trans, syscall_table):
4332         * proc-flags.c (struct trans): Constify.
4333         * proc-utils.h (procfs_note): Constify.
4334         * proc-why.c (struct trans): Constify.
4335         * procfs.c (dead_procinfo, find_syscall, proc_warn, proc_error)
4336         (procfs_detach): Constify.
4337         * sol-thread.c (struct string_map): Constify.
4338         (td_err_string, td_state_string): Constify.
4339
4340 2017-04-05  Pedro Alves  <palves@redhat.com>
4341
4342         * proc-api.c (procfs_filename): Don't initialize
4343         procfs_filename.
4344         (prepare_to_trace): Assume procfs_filename is non-NULL.
4345         (_initialize_proc_api): Give procfs_filename a default value here.
4346
4347 2017-04-05  Pedro Alves  <palves@redhat.com>
4348
4349         * break-catch-throw.c (handle_gnu_v3_exceptions): Constify
4350         'cond_string' parameter.
4351         (extract_exception_regexp): Constify 'string' parameter.
4352         (catch_exception_command_1): Constify.
4353         * breakpoint.c (init_catchpoint)
4354         (create_fork_vfork_event_catchpoint): Constify 'cond_string'
4355         parameter.
4356         (ep_parse_optional_if_clause, catch_fork_command_1)
4357         (catch_exec_command_1): Constify.
4358         * breakpoint.h (init_catchpoint): Constify 'cond_string'
4359         parameter.
4360         (ep_parse_optional_if_clause): Constify.
4361         * cli/cli-utils.c (remove_trailing_whitespace)
4362         (check_for_argument): Constify.
4363         * cli/cli-utils.h (remove_trailing_whitespace): Constify and add
4364         non-const overload.
4365         (check_for_argument): Likewise.
4366
4367 2017-04-05  Pedro Alves  <palves@redhat.com>
4368
4369         * event-top.c (command_line_handler): Add cast to execute_command
4370         call.
4371         * record-btrace.c (cmd_record_btrace_bts_start)
4372         (cmd_record_btrace_pt_start, cmd_record_btrace_start)
4373         (cmd_record_btrace_start): Add cast to execute_command call.
4374         * record-full.c (record_full_goto_insn):
4375         * record.c (record_start, record_stop): Add cast to
4376         execute_command_to_string calls.
4377         (cmd_record_start): Add cast to execute_command calls.
4378
4379 2017-04-05  Pedro Alves  <palves@redhat.com>
4380
4381         * python/python-internal.h (gdb_PyArg_ParseTupleAndKeywords): New
4382         static inline function.
4383         * python/py-arch.c (archpy_disassemble): Constify 'keywords'
4384         array and use gdb_PyArg_ParseTupleAndKeywords.
4385         * python/py-cmd.c (cmdpy_init): Likewise.
4386         * python/py-finishbreakpoint.c (bpfinishpy_init): Likewise.
4387         * python/py-inferior.c (infpy_read_memory, infpy_write_memory)
4388         (infpy_search_memory): Likewise.
4389         * python/py-objfile.c (objfpy_add_separate_debug_file)
4390         (gdbpy_lookup_objfile): Likewise.
4391         * python/py-symbol.c (gdbpy_lookup_symbol)
4392         (gdbpy_lookup_global_symbol): Likewise.
4393         * python/py-type.c (gdbpy_lookup_type): Likewise.
4394         * python/py-value.c (valpy_lazy_string, valpy_string): Likewise.
4395         * python/python.c (execute_gdb_command, gdbpy_write, gdbpy_flush):
4396         Likewise.
4397
4398 2017-04-05  Pedro Alves  <palves@redhat.com>
4399
4400         * python/python-internal.h (gdb_PyGetSetDef): New type.
4401         * python/py-block.c (block_object_getset)
4402         (breakpoint_object_getset): Now a gdb_PyGetSetDef array.
4403         * python/py-event.c (event_object_getset)
4404         (finish_breakpoint_object_getset): Likewise.
4405         * python/py-inferior.c (inferior_object_getset): Likewise.
4406         * python/py-infthread.c (thread_object_getset): Likewise.
4407         * python/py-lazy-string.c (lazy_string_object_getset): Likewise.
4408         * python/py-linetable.c (linetable_entry_object_getset): Likewise.
4409         * python/py-objfile.c (objfile_getset): Likewise.
4410         * python/py-progspace.c (pspace_getset): Likewise.
4411         * python/py-record-btrace.c (btpy_insn_getset, btpy_call_getset):
4412         Likewise.
4413         * python/py-record.c (recpy_record_getset): Likewise.
4414         * python/py-symbol.c (symbol_object_getset): Likewise.
4415         * python/py-symtab.c (symtab_object_getset, sal_object_getset):
4416         Likewise.
4417         * python/py-type.c (type_object_getset, field_object_getset):
4418         Likewise.
4419         * python/py-value.c (value_object_getset): Likewise.
4420
4421 2017-04-05  Pedro Alves  <palves@redhat.com>
4422
4423         * python/python-internal.h (gdb_PyObject_CallMethod)
4424         (gdb_PyErr_NewException, gdb_PySys_GetObject, gdb_PySys_SetPath):
4425         New functions.
4426         (GDB_PYSYS_SETPATH_CHAR, PyObject_CallMethod, PyErr_NewException)
4427         (PySys_GetObject, PySys_SetPath): New macros.
4428
4429 2017-04-05  Pedro Alves  <palves@redhat.com>
4430
4431         * mi/mi-cmd-info.c (mi_cmd_info_os): Call info_osdata instead of
4432         info_osdata_command.
4433         * osdata.c (info_osdata_command): Rename to ...
4434         (info_osdata): ... this.  Constify 'type' parameter, and remove
4435         the 'from_tty' parameter.  Accept NULL TYPE.
4436         (info_osdata_command): New function.
4437         * osdata.h (info_osdata_command): Remove declaration.
4438         (info_osdata): New declaration.
4439
4440 2017-04-05  Pedro Alves  <palves@redhat.com>
4441
4442         * mi/mi-cmd-break.c (mi_cmd_break_insert_1, mi_cmd_break_insert)
4443         (mi_cmd_dprintf_insert, mi_cmd_break_passcount)
4444         (mi_cmd_break_watch, mi_cmd_break_commands): Constify 'command'
4445         parameter.
4446         * mi/mi-cmd-catch.c (mi_cmd_catch_assert, mi_cmd_catch_exception)
4447         (mi_cmd_catch_load, mi_cmd_catch_unload): Constify cmd' parameter.
4448         * mi/mi-cmd-disas.c (mi_cmd_disassemble): Constify 'command'
4449         parameter.
4450         * mi/mi-cmd-env.c (mi_cmd_env_pwd, mi_cmd_env_cd, mi_cmd_env_path)
4451         (mi_cmd_env_dir, mi_cmd_inferior_tty_set, _cmd_inferior_tty_show)
4452         * mi/mi-cmd-file.c (mi_cmd_file_list_exec_source_file)
4453         (mi_cmd_file_list_exec_source_files)
4454         (mi_cmd_file_list_shared_libraries): Constify 'command' parameter.
4455         * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions)
4456         (mi_cmd_info_gdb_mi_command, mi_cmd_info_os): Constify 'command'
4457         parameter.
4458         * mi/mi-cmd-stack.c (mi_cmd_enable_frame_filters)
4459         (mi_cmd_stack_list_frames, mi_cmd_stack_info_depth)
4460         (mi_cmd_stack_list_locals, mi_cmd_stack_list_args)
4461         (mi_cmd_stack_list_variables, mi_cmd_stack_select_frame)
4462         (mi_cmd_stack_info_frame): Constify 'command' parameter.
4463         * mi/mi-cmd-target.c (mi_cmd_target_file_get)
4464         (mi_cmd_target_file_put, mi_cmd_target_file_delete): Constify
4465         'command' parameter.
4466         * mi/mi-cmd-var.c (mi_cmd_var_create, mi_cmd_var_delete)
4467         (mi_cmd_var_set_format, mi_cmd_var_set_visualizer)
4468         (mi_cmd_var_set_frozen, mi_cmd_var_show_format)
4469         (mi_cmd_var_info_num_children, mi_cmd_var_list_children)
4470         (mi_cmd_var_info_type, mi_cmd_var_info_path_expression)
4471         (mi_cmd_var_info_expression, mi_cmd_var_show_attributes)
4472         (mi_cmd_var_evaluate_expression, mi_cmd_var_assign)
4473         (mi_cmd_var_update, mi_cmd_enable_pretty_printing)
4474         (mi_cmd_var_set_update_range): Constify 'command' parameter.
4475         * mi/mi-cmds.h (mi_cmd_argv_ftype): Constify 'command' parameter.
4476         * mi/mi-interp.c (mi_cmd_interpreter_exec): Constify 'command'
4477         parameter.
4478         * mi/mi-main.c (mi_cmd_gdb_exit, mi_cmd_exec_next)
4479         (mi_cmd_exec_next_instruction, mi_cmd_exec_step)
4480         (mi_cmd_exec_step_instruction, mi_cmd_exec_finish)
4481         (mi_cmd_exec_return ,mi_cmd_exec_jump, mi_cmd_exec_continue)
4482         (mi_cmd_exec_interrupt, mi_cmd_exec_run, mi_cmd_target_detach)
4483         (mi_cmd_target_flash_erase, mi_cmd_thread_select)
4484         (mi_cmd_thread_list_ids, mi_cmd_thread_info)
4485         (mi_cmd_list_thread_groups, mi_cmd_data_list_register_names)
4486         (mi_cmd_data_list_changed_registers)
4487         (mi_cmd_data_write_register_values)
4488         (mi_cmd_data_evaluate_expression, mi_cmd_data_read_memory)
4489         (mi_cmd_data_read_memory_bytes, mi_cmd_data_write_memory)
4490         (mi_cmd_data_write_memory_bytes, mi_cmd_enable_timings)
4491         (mi_cmd_list_features, mi_cmd_list_target_features)
4492         (mi_cmd_add_inferior, mi_cmd_remove_inferior)
4493         (mi_cmd_trace_define_variable, mi_cmd_trace_list_variables)
4494         (mi_cmd_trace_find, mi_cmd_trace_save, mi_cmd_trace_start)
4495         (mi_cmd_trace_status, mi_cmd_trace_stop, mi_cmd_ada_task_info)
4496         (mi_cmd_trace_frame_collected): Constify 'command'
4497         parameter.
4498         * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Constify
4499         'command' parameter.
4500
4501 2017-04-05  Pedro Alves  <palves@redhat.com>
4502
4503         * ada-lang.c (ada_completer_word_break_characters): Now a const
4504         array.
4505         (ada_get_gdb_completer_word_break_characters): Constify.
4506         * completer.c (gdb_completer_command_word_break_characters)
4507         (gdb_completer_file_name_break_characters)
4508         (gdb_completer_quote_characters): Now const arrays.
4509         (get_gdb_completer_quote_characters): Constify.
4510         (set_rl_completer_word_break_characters): New function.
4511         (set_gdb_completion_word_break_characters)
4512         (complete_line_internal): Use it.
4513         * completer.h (get_gdb_completer_quote_characters): Constify.
4514         (set_rl_completer_word_break_characters): Declare.
4515         * f-lang.c (f_word_break_characters): Constify.
4516         * language.c (default_word_break_characters): Constify.
4517         * language.h (language_defn::la_word_break_characters): Constify.
4518         (default_word_break_characters): Constify.
4519         * top.c (init_main): Use set_rl_completer_word_break_characters.
4520
4521 2017-04-05  Pedro Alves  <palves@redhat.com>
4522
4523         * aix-thread.c (aix_thread_pid_to_str)
4524         (aix_thread_extra_thread_info): Constify.
4525         * bsd-kvm.c (bsd_kvm_pid_to_str): Constify.
4526         * bsd-uthread.c (bsd_uthread_extra_thread_info)
4527         (bsd_uthread_pid_to_str): Constify.
4528         * corelow.c (core_pid_to_str): Constify.
4529         * darwin-nat.c (darwin_pid_to_str): Constify.
4530         * fbsd-nat.c (fbsd_pid_to_str): Constify.
4531         * fbsd-tdep.c (fbsd_core_pid_to_str, gdbarch_core_pid_to_str):
4532         Constify.
4533         * gnu-nat.c (gnu_pid_to_str): Constify.
4534         * go32-nat.c (go32_pid_to_str): Constify.
4535         * i386-cygwin-tdep.c (i386_windows_core_pid_to_str): Constify.
4536         * inf-ptrace.c (inf_ptrace_pid_to_str): Constify.
4537         * inferior.c (inferior_pid_to_str): Constify.
4538         * linux-nat.c (linux_nat_pid_to_str): Constify.
4539         * linux-tdep.c (linux_core_pid_to_str): Constify.
4540         * linux-thread-db.c (thread_db_pid_to_str)
4541         (thread_db_extra_thread_info): Constify.
4542         * nto-tdep.c (nto_extra_thread_info): Constify.
4543         * nto-tdep.h (nto_extra_thread_info): Constify.
4544         * obsd-nat.c (obsd_pid_to_str): Constify.
4545         * procfs.c (procfs_pid_to_str): Constify.
4546         * ravenscar-thread.c (ravenscar_extra_thread_info)
4547         (ravenscar_pid_to_str): Constify.
4548         * remote-sim.c (gdbsim_pid_to_str): Constify.
4549         * remote.c (remote_threads_extra_info, remote_pid_to_str):
4550         Constify.
4551         * sol-thread.c (solaris_pid_to_str): Constify.
4552         * sol2-tdep.c (sol2_core_pid_to_str): Constify.
4553         * sol2-tdep.h (sol2_core_pid_to_str): Constify.
4554         * target.c (default_pid_to_str, target_pid_to_str)
4555         (normal_pid_to_str, default_pid_to_str): Constify.
4556         * target.h (target_ops::to_pid_to_str)
4557         (target_ops::to_extra_thread_info): Constify.
4558         (target_pid_to_str, normal_pid_to_str): Constify.
4559         * windows-nat.c (windows_pid_to_str): Constify.
4560         * gdbarch.sh (core_pid_to_str): Constify.
4561         * target-delegates.c: Regenerate.
4562         * gdbarch.h, gdbarch.c: Regenerate.
4563
4564 2017-04-05  Pedro Alves  <palves@redhat.com>
4565
4566         * main.c (captured_main_1): Use gdb::unique_xmalloc_ptr to manage
4567         the memory of the temporary warning_pre_print override.
4568         * utils.c (warning_pre_print): Constify.
4569         * utils.h (warning_pre_print): Constify.
4570
4571 2017-04-05  Pedro Alves  <palves@redhat.com>
4572
4573         * cli/cli-cmds.c (shell_escape): Constify 'arg' parameter.
4574         (shell_command): New function.
4575         (make_command): Use std::string.
4576         (init_cli_cmds): Register shell_command instead of shell_escape.
4577
4578 2017-04-05  Pedro Alves  <palves@redhat.com>
4579
4580         * breakpoint.c (dprintf_function, dprintf_channel): Don't initialize.
4581         * tracepoint.c (default_collect): Don't initialize.
4582
4583 2017-04-05  Pedro Alves  <palves@redhat.com>
4584
4585         * macroexp.c (macro_buffer::shared): Now a bool.
4586         (init_buffer): Update.
4587         (init_shared_buffer): Constify 'addr' parameter.
4588         (substitute_args, expand, macro_expand, macro_expand_next): Remove
4589         casts.
4590
4591 2017-04-05  Pedro Alves  <palves@redhat.com>
4592
4593         * arm-tdep.c (show_disassembly_style_sfunc): Constify local.
4594         * disasm.c (set_disassembler_options): Constify local.
4595         * i386-tdep.c (i386_print_insn): Remove cast and FIXME comment.
4596
4597 2017-04-05  Sergio Durigan Junior  <sergiodj@redhat.com>
4598
4599         PR gdb/21352
4600         * tracefile.c (tsave_command): Fix argument parsing for '-r'
4601         option.
4602
4603 2017-04-05  Yao Qi  <yao.qi@linaro.org>
4604
4605         * frame.c (frame_unwind_register_unsigned): Call
4606         frame_unwind_register_value.
4607
4608 2017-04-05  Yao Qi  <yao.qi@linaro.org>
4609
4610         * gdb.threads/thread-specific-bp.exp (check_thread_specific_breakpoint):
4611         Use gdb_test_multiple, and don't match anchor.
4612
4613 2017-04-05  Pedro Alves  <palves@redhat.com>
4614
4615         * MAINTAINERS (Global Maintainers): Add Simon Marchi.
4616         (Write After Approval): Remove Simon Marchi.
4617
4618 2017-04-05  Pedro Alves  <palves@redhat.com>
4619
4620         * common/gdb_optional.h (optional::optional): Make constexpr and
4621         initialize m_dummy.
4622
4623 2017-04-04  John Baldwin  <jhb@FreeBSD.org>
4624
4625         * amd64-fbsd-tdep.c: Remove "bsd-uthread.h" include.
4626         (amd64fbsd_jmp_buf_reg_offset): Remove.
4627         (amd64fbsd_supply_uthread): Remove function.
4628         (amd64fbsd_collect_uthread): Remove function.
4629         (amd64fbsd_init_abi): Don't set bsd-uthread callbacks.
4630         * configure.tgt (i[34567]86-*-freebsd*): Remove bsd-uthread.o.
4631         (x86_64-*-freebsd*): Remove bsd-uthread.o.
4632         (fbsd-nat.c): Update comment.
4633         * i386-fbsd-tdep.c: Remove "bsd-uthread.h" include.
4634         (i386fbsd_jmp_buf_reg_offset): Remove.
4635         (i386fbsd_supply_uthread): Remove function.
4636         (i386fbsd_collect_uthread): Remove function.
4637         (i386fbsd_init_abi): Don't set bsd-uthread callbacks.
4638
4639 2017-04-04  John Baldwin  <jhb@FreeBSD.org>
4640
4641         * Makefile.in (ALL_64_TARGET_OBS): Remove alpha-fbsd-tdep.o.
4642         (ALLDEPFILES): Remove alpha-fbsd-tdep.c
4643         * NEWS: Mention that support for FreeBSD/alpha was removed.
4644         * alpha-fbsd-tdep.c: Delete file.
4645         * config/alpha/fbsd.mh: Delete file.
4646         * configure.host: Delete alpha*-*-freebsd* and
4647         alpha*-*-kfreebsd*-gnu.
4648         * configure.tgt: Delete alpha*-*-freebsd* and
4649         alpha*-*-kfreebsd*-gnu.
4650
4651 2017-04-04  John Baldwin  <jhb@FreeBSD.org>
4652
4653         * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers,
4654         amd64bsd_store_inferior_registers): Use ptid from regcache.
4655
4656 2017-04-04  Pedro Alves  <palves@redhat.com>
4657
4658         * dwarf2read.c (lnp_state_machine): Now a class.  Initialize all
4659         data fields, make them private and add "m_" prefixes.
4660         (lnp_state_machine::lnp_state_machine): New ctor.
4661         (record_line, check_line_address, handle_set_discriminator)
4662         (handle_set_address, handle_advance_pc, handle_special_opcode)
4663         (handle_advance_line, handle_set_file, handle_negate_stmt)
4664         (handle_const_add_pc, handle_fixed_advance_pc, handle_copy)
4665         (end_sequence, advance_line): New methods.
4666         (m_gdbarch, m_record_lines_p): New fields.
4667         (lnp_reader_state): Delete.
4668         (dwarf_record_line): Rename to ...
4669         (lnp_state_machine::record_line): ... adjust.
4670         (init_lnp_state_machine): Delete.
4671         (lnp_state_machine::lnp_state_machine): New.
4672         (check_line_address): Rename to ...
4673         (lnp_state_machine::check_line_address): This.
4674         (dwarf_decode_lines_1): Remove reference to "reader_state".
4675         Adjust lnp_state_machine having a non-default ctor.  Use bool.
4676         State machine internal state manipulation moved to
4677         lnp_state_machine methods.
4678
4679 2017-04-04  Pedro Alves  <palves@redhat.com>
4680
4681         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
4682         unittests/offset-type-selftests.c.
4683         (SUBDIR_UNITTESTS_OBS): Add offset-type-selftests.o.
4684         * common/offset-type.h: New file.
4685         * common/preprocessor.h: New file.
4686         * common/traits.h: New file.
4687         * common/valid-expr.h: New file.
4688         * dwarf2expr.c: Include "common/underlying.h".  Adjust to use
4689         sect_offset and cu_offset strong typedefs throughout.
4690         * dwarf2expr.h: Adjust to use sect_offset and cu_offset strong
4691         typedefs throughout.
4692         * dwarf2loc.c: Include "common/underlying.h".  Adjust to use
4693         sect_offset and cu_offset strong typedefs throughout.
4694         * dwarf2read.c: Adjust to use sect_offset and cu_offset strong
4695         typedefs throughout.
4696         * gdbtypes.h: Include "common/offset-type.h".
4697         (cu_offset): Now an offset type (strong typedef) instead of a
4698         struct.
4699         (sect_offset): Likewise.
4700         (union call_site_parameter_u): Rename "param_offset" field to
4701         "param_cu_off".
4702         * unittests/offset-type-selftests.c: New file.
4703
4704 2017-04-04  Pedro Alves  <palves@redhat.com>
4705
4706         * common/underlying.h: New file.
4707         * dwarf2read.c: Include "common/gdb_optional.h" and
4708         "common/underlying.h".
4709         (dir_index, file_name_index): New types.
4710         (file_entry): Use them.
4711         (file_entry::include): Use to_underlying.
4712         (line_header::add_file_name): Use dir_index.
4713         (read_formatted_entries): Use gdb::optional.  Read form before
4714         writting to file_entry.
4715         (dwarf_decode_line_header): Use dir_index.
4716         (lnp_state_machine::current_file): Use to_underlying.
4717         (lnp_state_machine::file): Change type to file_name_index.
4718         (dwarf_record_line): Use to_underlying.
4719         (init_lnp_state_machine): Use file_name_index.
4720         (dwarf_decode_lines_1): Use dir_index and file_name_index.
4721
4722 2017-04-04  Pedro Alves  <palves@redhat.com>
4723
4724         * common/gdb_optional.h (gdb::optiona): Add operator->, operator*,
4725         operator bool, has_value and get methods.
4726
4727 2017-04-04  Pedro Alves  <palves@redhat.com>
4728
4729         * dwarf2read.c (struct file_entry): Add ctors, and initialize all
4730         fields.
4731         (line_header): Initialize all data fields.  Change type of
4732         standard_opcode_lengths to std::unique_ptr<unsigned char[]>.
4733         Change type of include_dirs to std::vector<const char *>.  Remove
4734         num_include_dirs, include_dirs_size.  Change type of file_names to
4735         std::vector<file_entry>.  Remove num_file_names, file_names_size.
4736         (line_header::line_header): New.
4737         (line_header::add_include_dir, line_header::add_file_name): New
4738         methods.
4739         (line_header::include_dir_at): Remove NULL check.
4740         (line_header::file_name_at): Add const overload.
4741         (line_header_up): New unique_ptr typedef.
4742         (dw2_get_file_names_reader): Use line_header_up.  Adjust to use
4743         std::vector.  Remove free_line_header call.
4744         (dwarf2_build_include_psymtabs): Use line_header_up.  Remove
4745         free_line_header call.
4746         (free_cu_line_header): Delete.
4747         (handle_DW_AT_stmt_list, handle_DW_AT_stmt_list)
4748         (setup_type_unit_groups): Use line_header_up instead of cleanups.
4749         Adjust to use std::vector.
4750         (free_line_header): Delete.
4751         (free_line_header_voidp): Use delete.
4752         (add_include_dir): Replace with ...
4753         (line_header::add_include_dir): ... this method.  Use std::vector.
4754         (add_file_name): Replace with ...
4755         (line_header::add_file_name): ... this method.  Use std::vector.
4756         (add_include_dir_stub): Delete.
4757         (read_formatted_entries): Remove memset.
4758         (dwarf_decode_line_header): Return a line_header_up instead of a
4759         raw pointer.  Remove cleanup handling.  Pass lambdas to
4760         read_formatted_entries.  Adjust to use line_header methods.
4761         (dwarf_decode_lines_1): Adjust to use line_header methods.
4762         (dwarf_decode_lines, file_file_name, file_full_name): Adjust to
4763         use std::vector.
4764
4765 2017-04-04  Simon Marchi  <simon.marchi@polymtl.ca>
4766
4767         * remote.c (set_general_thread, set_continue_thread): Use ptid_t
4768         instead of struct ptid.
4769
4770 2017-05-04  Alan Hayward  <alan.hayward@arm.com>
4771
4772         * frame.c (get_frame_register_bytes): Unwind using value.
4773         (put_frame_register_bytes): Likewise.
4774
4775 2017-03-30  Iain Buclaw  <ibuclaw@gdcproject.org>
4776
4777         * d-exp.y (type_aggregate_p): Treat TYPE_CODE_MODULE as being
4778         aggregate-like.
4779
4780 2017-03-29  Jan Kratochvil  <jan.kratochvil@redhat.com>
4781
4782         * auto-load.c (auto_load_section_scripts): Check SEC_HAS_CONTENTS.
4783
4784 2017-03-29  Yao Qi  <yao.qi@linaro.org>
4785
4786         * gdbthread.h (struct thread_info): Declare constructor and
4787         destructor.  Add some in-class member initializers.
4788         * thread.c (free_thread): Remove.
4789         (init_thread_list): Call delete instead of free_thread.
4790         (new_thread): Call thread_info constructor.
4791         (thread_info::thread_info): New function.
4792         (thread_info::~thread_info): New function.
4793         (delete_thread_1): Call delete instead of free_thread.
4794         (make_cleanup_restore_current_thread): Move tp and frame to
4795         inner block.
4796
4797 2017-03-28  Anton Kolesov  <anton.kolesov@synopsys.com>
4798
4799         * arc-tdep.c (arc_frame_cache): Add support for prologue analysis.
4800         (arc_skip_prologue): Likewise.
4801         (arc_make_frame_cache): Likewise.
4802         (arc_pv_get_operand): New function.
4803         (arc_is_in_prologue): Likewise.
4804         (arc_analyze_prologue): Likewise.
4805         (arc_print_frame_cache): Likewise.
4806         (MAX_PROLOGUE_LENGTH): New constant.
4807
4808 2017-03-28  Anton Kolesov  <anton.kolesov@synopsys.com>
4809
4810         * configure.tgt: Add arc-insn.o.
4811         * arc-tdep.c (arc_delayed_print_insn): Make non-static.
4812         (dump_arc_instruction_command): New function.
4813         (arc_fprintf_disasm): Likewise.
4814         (arc_disassemble_info): Likewise.
4815         (arc_insn_get_operand_value): Likewise.
4816         (arc_insn_get_operand_value_signed): Likewise.
4817         (arc_insn_get_memory_base_reg): Likewise.
4818         (arc_insn_get_memory_offset): Likewise.
4819         (arc_insn_get_branch_target): Likewise.
4820         (arc_insn_dump): Likewise.
4821         (arc_insn_get_linear_next_pc): Likewise.
4822         * arc-tdep.h (arc_delayed_print_insn): Add function declaration.
4823         (arc_disassemble_info): Likewise.
4824         (arc_insn_get_branch_target): Likewise.
4825         (arc_insn_get_linear_next_pc): Likewise.
4826         * NEWS: Mention new "maint print arc arc-instruction".
4827
4828 2017-03-28  Anton Kolesov  <anton.kolesov@synopsys.com>
4829
4830         * arc-tdep (maintenance_print_arc_list): New variable.
4831         (maintenance_print_arc_command): New function.
4832
4833 2017-03-28  Anton Kolesov  <anton.kolesov@synopsys.com>
4834
4835         * arc-tdep.c (core_v2_register_names, core_arcompact_register_names)
4836         Add "limm" and "reserved".
4837         (arc_cannot_fetch_register, arc_cannot_store_register): Add
4838         ARC_RESERVED_REGNUM and ARC_LIMM_REGNUM.
4839         * arc-tdep.h (arc_regnum): Likewise.
4840
4841 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
4842
4843         * xtensa-linux-nat.c (fill_gregset): Call regcache_raw_collect
4844         for THREADPTR register.
4845         (supply_gregset_reg): Call regcache_raw_supply for THREADPTR
4846         register.
4847         * xtensa-tdep.c (XTENSA_DBREGN_UREG): New definition.
4848         (xtensa_derive_tdep): Initialize tdep->threadptr_regnum.
4849         * xtensa-tdep.h (gdbarch_tdep::threadptr_regnum): New field.
4850
4851 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
4852
4853         * xtensa-tdep.c (xtensa_pseudo_register_read): Treat all
4854         registers above gdbarch_num_regs (gdbarch) as privileged in
4855         call0 ABI.
4856
4857 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
4858
4859         * xtensa-linux-nat.c (fill_gregset): Call regcache_raw_collect
4860         for a single specified register or for all registers in
4861         a0_base..a0_base + C0_NREGS range.
4862         (supply_gregset_reg): Call regcache_raw_supply for a single
4863         specified register or for all registers in a0_base..a0_base +
4864         C0_NREGS range.
4865
4866 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
4867
4868         * arch/xtensa.h (C0_NREGS): Add definition.
4869         * xtensa-tdep.c (C0_NREGS): Remove definition.
4870
4871 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
4872
4873         * xtensa-tdep.c (xtensa_scan_prologue, call0_analyze_prologue):
4874         Drop xtensa_default_isa initialization.
4875         (xtensa_gdbarch_init): Initialize xtensa_default_isa.
4876
4877 2017-03-27  Pedro Alves  <palves@redhat.com>
4878
4879         * dwarf2read.c (file_entry) <dir_index>: Add comment.
4880         (file_entry::include_dir): New method.
4881         (line_header::include_dir_at, line_header::file_name_at): New
4882         methods.
4883         (setup_type_unit_groups, setup_type_unit_groups)
4884         (psymtab_include_file_name): Simplify using the new methods.
4885         (lnp_state_machine) <the_line_header>: New field.
4886         <file>: Add comment.
4887         (lnp_state_machine::current_file): New method.
4888         (dwarf_record_line): Simplify using the new methods.
4889         (init_lnp_state_machine): Initialize the "the_line_header" field.
4890         (dwarf_decode_lines_1, dwarf_decode_lines, file_file_name):
4891         Simplify using the new methods.
4892
4893 2017-03-27  Pedro Alves  <palves@redhat.com>
4894
4895         * cp-name-parser.y (make_empty): Delete.
4896         (demangler_special, nested_name, ptr_operator, array_indicator)
4897         (direct_declarator, declarator_1): Use fill_comp instead of
4898         make_empty.
4899
4900 2017-03-27  Pedro Alves  <palves@redhat.com>
4901
4902         * xml-support.h (gdb_xml_debug): Pass a "first-to-check" argument
4903         to ATTRIBUTE_PRINTF.
4904         * solib-target.c (library_list_start_list): Print "string" not
4905         "version".
4906         * xml-tdesc.c (tdesc_start_field): Pass "field_name" to
4907         gdb_xml_error call.
4908
4909 2017-03-27  Pedro Alves  <palves@redhat.com>
4910
4911         * dwarf2read.c (struct file_and_directory): New.
4912         (dwarf2_get_dwz_file): Adjust to use std::string.
4913         (dw2_get_file_names_reader): Adjust to use file_and_directory.
4914         (find_file_and_directory): Adjust to return a file_and_directory
4915         object.
4916         (read_file_scope): Adjust to use file_and_directory.  Remove
4917         make_cleanup/do_cleanups calls.
4918         (open_and_init_dwp_file): Adjust to use std::string.  Remove
4919         make_cleanup/do_cleanups calls.
4920         * python/python.c (do_start_initialization): Adjust to ldirname
4921         returning a std::string.
4922         * utils.c (ldirname): Now returns a std::string.
4923         * utils.h (ldirname): Change return type to std::string.
4924         * xml-syscall.c (xml_init_syscalls_info): Adjust to ldirname
4925         returning a std::string.
4926         * xml-tdesc.c (file_read_description_xml): Likewise.
4927
4928 2017-03-24  Alan Hayward  <alan.hayward@arm.com>
4929
4930         * regcache.c (regcache_debug_print_register): New function.
4931         * regcache.h (regcache_debug_print_register): New declaration.
4932         * target.c (debug_print_register): Remove.
4933         (target_fetch_registers): Call regcache_debug_print_register.
4934         (target_store_registers): Likewise.
4935
4936 2017-03-24  Pádraig Brady  <pbrady@fb.com>
4937
4938         * dwarf2read.c (setup_type_unit_groups): Ensure dir_index doesn't
4939         reference beyond the 'lh->include_dirs' array before accessing to
4940         it.
4941         (psymtab_include_file_name): Likewise.
4942         (dwarf_decode_lines_1): Likewise.
4943         (dwarf_decode_lines): Likewise.
4944         (file_file_name): Likewise.
4945
4946 2017-03-23  Simon Marchi  <simon.marchi@ericsson.com>
4947
4948         * fbsd-tdep.c (fbsd_corefile_thread): Don't set/restore
4949         inferior_ptid.
4950         * proc-service.c (ps_lgetregs, ps_lsetregs, ps_lgetfpregs,
4951         ps_lsetfpregs): Likewise.
4952         * regcache.c (regcache_raw_update, regcache_raw_write): Likewise.
4953         * sol-thread.c (ps_lgetregs, ps_lsetregs, ps_lgetfpregs,
4954         ps_lsetfpregs): Likewise.
4955         * target.c (target_fetch_registers, target_store_registers):
4956         Remove asserts.
4957
4958 2017-03-23  Alan Hayward  <alan.hayward@arm.com>
4959
4960         * sol-thread.c (sol_thread_store_registers): Remove regcache calls.
4961
4962 2017-03-23  Yao Qi  <yao.qi@linaro.org>
4963
4964         * aarch64-tdep.c (aarch64_process_record_test): Declare.
4965         (_initialize_aarch64_tdep): Register it.
4966         (aarch64_record_load_store): Handle PRFM instruction.
4967         (aarch64_process_record_test): New function.
4968
4969 2017-03-23  Yao Qi  <yao.qi@linaro.org>
4970
4971         * aarch64-tdep.c (aarch64_record_load_store): Fix code
4972         indentation.
4973
4974 2017-03-23  Yao Qi  <yao.qi@linaro.org>
4975
4976         * aarch64-tdep.c: Remove AARCH64_RECORD_FAILURE.
4977
4978 2017-03-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
4979
4980         python/python.c (do_start_initialization): Fix memory leak.
4981
4982 2017-03-22  Simon Marchi  <simon.marchi@polymtl.ca>
4983
4984         * inf-ptrace.c (inf_ptrace_xfer_partial): Get pid from ptid
4985         using get_ptrace_pid.
4986         * linux-nat.c (linux_nat_xfer_partial): Don't set/restore
4987         inferior_ptid.
4988         (linux_proc_xfer_partial, linux_proc_xfer_spu): Use lwp of
4989         inferior_ptid instead of pid.
4990
4991 2017-03-22  Yao Qi  <yao.qi@linaro.org>
4992
4993         * aarch64-tdep.c: Wrap locally used classes in anonymous
4994         namespace.
4995         * arm-tdep.c: Likewise.
4996         * linespec.c: Likewise.
4997         * ui-out.c: Likewise.
4998
4999 2017-03-22  Jonah Graham  <jonah@kichwacoders.com>
5000
5001         PR gdb/19637
5002         * python/lib/gdb/printer/bound_registers.py: Import sys.
5003
5004 2017-03-21  Simon Marchi  <simon.marchi@ericsson.com>
5005
5006         * windows-nat.c (do_windows_fetch_inferior_registers): Add
5007         windows_thread_info parameter and use it instead of
5008         current_thread.
5009         (windows_fetch_inferior_registers): Don't set current_thread,
5010         pass the thread to do_windows_fetch_inferior_registers.  Use
5011         ptid from regcache instead of inferior_ptid.
5012         (do_windows_store_inferior_registers): Add windows_thread_info
5013         parameter and use it instead of current_thread.
5014         (windows_store_inferior_registers): Don't set current_thread,
5015         pass the thread to do_windows_store_inferior_registers.  Use
5016         ptid from regcache instead of inferior_ptid.
5017
5018 2017-03-21  Simon Marchi  <simon.marchi@ericsson.com>
5019
5020         * ser-mingw.c (ser_windows_raw): Remove reference to
5021         struct serial::current_timeout.
5022
5023 2017-03-21  Ivo Raisr  <ivo.raisr@oracle.com>
5024
5025         PR tdep/20928
5026         * gdb/sparc-tdep.h (gdbarch_tdep) <sparc64_ccr_type>: New field.
5027         * gdb/sparc64-tdep.c (sparc64_ccr_type): New function.
5028         (sparc64_fsr_type): Fix %fsr decoding.
5029
5030 2017-03-21  Tim Wiederhake  <tim.wiederhake@intel.com>
5031
5032         * python/py-record-btrace.c (btpy_insn_data): Change return type
5033         for Python 2.
5034
5035 2017-03-20  Simon Marchi  <simon.marchi@polymtl.ca>
5036
5037         * spu-linux-nat.c (spu_fetch_inferior_registers,
5038         spu_store_inferior_registers): Use ptid from regcache, set and
5039         restore inferior_ptid.
5040         * spu-multiarch.c (spu_fetch_registers, spu_store_registers):
5041         Likewise.
5042
5043 2017-03-20  Simon Marchi  <simon.marchi@polymtl.ca>
5044
5045         * i386-linux-nat.c (fetch_register, store_register,
5046         i386_linux_fetch_inferior_registers,
5047         i386_linux_store_inferior_registers): Use ptid from regcache.
5048         * ia64-linux-nat.c (ia64_linux_fetch_register,
5049         ia64_linux_store_register): Likewise.
5050         * inf-ptrace.c (inf_ptrace_fetch_register,
5051         inf_ptrace_store_register): Likewise.
5052         * m32r-linux-nat.c (m32r_linux_fetch_inferior_registers,
5053         m32r_linux_store_inferior_registers): Likewise.
5054         * m68k-bsd-nat.c (m68kbsd_fetch_inferior_registers,
5055         m68kbsd_store_inferior_registers): Likewise.
5056         * m68k-linux-nat.c (fetch_register, store_register,
5057         m68k_linux_fetch_inferior_registers,
5058         m68k_linux_store_inferior_registers): Likewise.
5059         * m88k-bsd-nat.c (m88kbsd_fetch_inferior_registers,
5060         m88kbsd_store_inferior_registers): Likewise.
5061         * mips-fbsd-nat.c (mips_fbsd_fetch_inferior_registers,
5062         mips_fbsd_store_inferior_registers): Likewise.
5063         * mips-linux-nat.c (mips64_linux_regsets_fetch_registers,
5064         mips64_linux_regsets_store_registers): Likewise.
5065         * mips-nbsd-nat.c (mipsnbsd_fetch_inferior_registers,
5066         mipsnbsd_store_inferior_registers): Likewise.
5067         * mips-obsd-nat.c (mips64obsd_fetch_inferior_registers,
5068         mips64obsd_store_inferior_registers): Likewise.
5069         * nto-procfs.c (procfs_fetch_registers, procfs_store_registers):
5070         Likewise.
5071         * ppc-fbsd-nat.c (ppcfbsd_fetch_inferior_registers,
5072         ppcfbsd_store_inferior_registers): Likewise.
5073         * ppc-linux-nat.c (ppc_linux_fetch_inferior_registers,
5074         ppc_linux_store_inferior_registers): Likewise.
5075         * ppc-nbsd-nat.c (ppcnbsd_fetch_inferior_registers,
5076         ppcnbsd_store_inferior_registers): Likewise.
5077         * ppc-obsd-nat.c (ppcobsd_fetch_registers,
5078         ppcobsd_store_registers): Likewise.
5079         * procfs.c (procfs_fetch_registers, procfs_store_registers):
5080         Likewise.
5081         * ravenscar-thread.c (ravenscar_fetch_registers,
5082         ravenscar_store_registers, ravenscar_prepare_to_store):
5083         Likewise.
5084         * record-btrace.c (record_btrace_fetch_registers,
5085         record_btrace_store_registers, record_btrace_prepare_to_store):
5086         Likewise.
5087         * remote-sim.c (gdbsim_fetch_register, gdbsim_store_register):
5088         Lookup inferior using ptid from regcache, instead of
5089         current_inferior.
5090         * remote.c (remote_fetch_registers, remote_store_registers): Use
5091         ptid from regcache.
5092         * rs6000-nat.c (fetch_register, store_register): Likewise.
5093         * s390-linux-nat.c (s390_linux_fetch_inferior_registers,
5094         s390_linux_store_inferior_registers): Likewise.
5095         * sh-nbsd-nat.c (shnbsd_fetch_inferior_registers,
5096         shnbsd_store_inferior_registers): Likewise.
5097         * sol-thread.c (sol_thread_fetch_registers,
5098         sol_thread_store_registers): Likewise.
5099         * sparc-nat.c (sparc_fetch_inferior_registers,
5100         sparc_store_inferior_registers): Likewise.
5101         * tilegx-linux-nat.c (fetch_inferior_registers,
5102         store_inferior_registers): Likewise.
5103         * vax-bsd-nat.c (vaxbsd_fetch_inferior_registers,
5104         vaxbsd_store_inferior_registers): Likewise.
5105         * xtensa-linux-nat.c (fetch_gregs, store_gregs, fetch_xtregs,
5106         store_xtregs): Likewise.
5107
5108 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
5109
5110         PR gdb/14441
5111         * NEWS: Mention support for rvalue references in GDB and python.
5112         * doc/gdb.texinfo (C Plus Plus Expressions): Mention that GDB
5113         supports both lvalue and rvalue references.
5114
5115 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
5116
5117         PR gdb/14441
5118         * gdbtypes.c (rank_one_type): Implement overloading
5119         resolution rules regarding rvalue references.
5120
5121 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
5122
5123         PR gdb/14441
5124         * aarch64-tdep.c (aarch64_type_align)
5125         (aarch64_extract_return_value, aarch64_store_return_value): Change
5126         lvalue reference type checks to general reference type checks.
5127         * amd64-tdep.c (amd64_classify): Likewise.
5128         * amd64-windows-tdep.c (amd64_windows_passed_by_integer_register):
5129         Likewise.
5130         * arm-tdep.c (arm_type_align, arm_extract_return_value)
5131         (arm_store_return_value): Likewise.
5132         * ax-gdb.c (gen_fetch, gen_cast): Likewise.
5133         * c-typeprint.c (c_print_type): Likewise.
5134         * c-varobj.c (adjust_value_for_child_access, c_value_of_variable)
5135         (cplus_number_of_children, cplus_describe_child): Likewise.
5136         * compile/compile-c-symbols.c (generate_vla_size): Likewise.
5137         * completer.c (expression_completer): Likewise.
5138         * cp-support.c (make_symbol_overload_list_adl_namespace):
5139         Likewise.
5140         * darwin-nat-info.c (info_mach_region_command): Likewise.
5141         * dwarf2loc.c (entry_data_value_coerce_ref)
5142         (value_of_dwarf_reg_entry): Likewise.
5143         * eval.c (ptrmath_type_p, evaluate_subexp_standard)
5144         (evaluate_subexp_for_address, evaluate_subexp_for_sizeof):
5145         Likewise.
5146         * findvar.c (extract_typed_address, store_typed_address):
5147         Likewise.
5148         * gdbtypes.c (rank_one_type): Likewise.
5149         * hppa-tdep.c (hppa64_integral_or_pointer_p): Likewise.
5150         * infcall.c (value_arg_coerce): Likewise.
5151         * language.c (pointer_type): Likewise.
5152         * m32c-tdep.c (m32c_reg_arg_type, m32c_m16c_address_to_pointer):
5153         Likewise.
5154         * m88k-tdep.c (m88k_integral_or_pointer_p): Likewise.
5155         * mn10300-tdep.c (mn10300_type_align): Likewise.
5156         * msp430-tdep.c (msp430_push_dummy_call): Likewise.
5157         * ppc-sysv-tdep.c (do_ppc_sysv_return_value)
5158         (ppc64_sysv_abi_push_param, ppc64_sysv_abi_return_value):
5159         Likewise.
5160         * printcmd.c (print_formatted, x_command): Likewise.
5161         * python/py-type.c (typy_get_composite, typy_template_argument):
5162         Likewise.
5163         * python/py-value.c (valpy_referenced_value)
5164         (valpy_get_dynamic_type, value_has_field): Likewise.
5165         * s390-linux-tdep.c (s390_function_arg_integer): Likewise.
5166         * sparc-tdep.c (sparc_integral_or_pointer_p): Likewise.
5167         * sparc64-tdep.c (sparc64_integral_or_pointer_p): Likewise.
5168         * spu-tdep.c (spu_scalar_value_p): Likewise.
5169         * symtab.c (lookup_symbol_aux): Likewise.
5170         * typeprint.c (whatis_exp, print_type_scalar): Likewise.
5171         * valarith.c (binop_types_user_defined_p, unop_user_defined_p):
5172         Likewise.
5173         * valops.c (value_cast_pointers, value_cast)
5174         (value_reinterpret_cast, value_dynamic_cast, value_addr, typecmp)
5175         (value_struct_elt, value_struct_elt_bitpos)
5176         (value_find_oload_method_list, find_overload_match)
5177         (value_rtti_indirect_type): Likewise.
5178         * valprint.c (val_print_scalar_type_p, generic_val_print):
5179         Likewise.
5180         * value.c (value_actual_type, value_as_address, unpack_long)
5181         (pack_long, pack_unsigned_long, coerce_ref_if_computed)
5182         (coerce_ref): Likewise.
5183         * varobj.c (varobj_get_value_type): Likewise.
5184
5185 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
5186
5187         PR gdb/14441
5188         * doc/python.texi (Types in Python): Add TYPE_CODE_RVALUE_REF to
5189         table of constants.
5190         * python/lib/gdb/command/explore.py: Support exploring values
5191         of rvalue reference types.
5192         * python/lib/gdb/types.py: Implement get_basic_type() for
5193         rvalue reference types.
5194         * python/py-type.c (pyty_codes) <TYPE_CODE_RVALUE_REF>: New
5195         constant.
5196         * python/py-value.c (valpy_getitem): Add an rvalue reference
5197         check.
5198         (valpy_reference_value): Add new parameter "refcode".
5199         (valpy_lvalue_reference_value, valpy_rvalue_reference_value):
5200         New wrappers for valpy_reference_value().
5201         * python/py-xmethods.c (gdbpy_get_xmethod_result_type)
5202         (gdbpy_invoke_xmethod): Likewise.
5203
5204 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
5205
5206         PR gdb/14441
5207         * dwarf2read.c (process_die, read_type_die_1): Handle the
5208         DW_TAG_rvalue_reference_type DIE.
5209         (read_tag_reference_type): Add new parameter "refcode".
5210
5211 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
5212
5213         PR gdb/14441
5214         * c-typeprint.c (c_print_type, c_type_print_varspec_prefix)
5215         (c_type_print_modifier, c_type_print_varspec_suffix)
5216         (c_type_print_base): Support printing rvalue reference types.
5217         * c-valprint.c (c_val_print, c_value_print): Support printing
5218         rvalue reference values.
5219
5220 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
5221
5222         PR gdb/14441
5223         * cp-name-parser.y (ptr_operator): Handle the '&&' token in
5224         typename.
5225         * cp-support.c (replace_typedefs): Handle
5226         DEMANGLE_COMPONENT_RVALUE_REFERENCE.
5227         * python/py-type.c (typy_lookup_type): Likewise.
5228
5229 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
5230
5231         PR gdb/14441
5232         * c-exp.y (ptr_operator): Handle the '&&' token in the typename.
5233         * parse.c (insert_type): Change assert statement.
5234         (follow_types): Handle rvalue reference types.
5235         * parser-defs.h (enum type_pieces) <tp_rvalue_reference>: New
5236         constant.
5237
5238 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
5239
5240         PR gdb/14441
5241         * ada-lang.c (ada_evaluate_subexp): Adhere to the new
5242         value_ref() interface.
5243         * c-valprint.c (c_value_print): Likewise.
5244         * infcall.c (value_arg_coerce): Likewise.
5245         * python/py-value.c (valpy_reference_value): Likewise.
5246         * valops.c (value_cast, value_reinterpret_cast)
5247         (value_dynamic_cast, typecmp): Likewise.
5248         (value_ref): Parameterize by kind of return value reference type.
5249         * value.h (value_ref): Add new parameter "refcode".
5250
5251 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
5252
5253         PR gdb/14441
5254         * dwarf2read.c (read_tag_reference_type): Use
5255         lookup_lvalue_reference_type() instead of lookup_reference_type().
5256         * eval.c (evaluate_subexp_standard): Likewise.
5257         * f-exp.y: Likewise.
5258         * gdbtypes.c (make_reference_type, lookup_reference_type):
5259         Generalize with rvalue reference types.
5260         (lookup_lvalue_reference_type, lookup_rvalue_reference_type): New
5261         convenience wrappers for lookup_reference_type().
5262         * gdbtypes.h (make_reference_type, lookup_reference_type): Add a
5263         reference kind parameter.
5264         (lookup_lvalue_reference_type, lookup_rvalue_reference_type): Add
5265         wrappers for lookup_reference_type().
5266         * guile/scm-type.c (gdbscm_type_reference): Use
5267         lookup_lvalue_reference_type() instead of lookup_reference_type().
5268         * guile/scm-value.c (gdbscm_value_dynamic_type): Likewise.
5269         * parse.c (follow_types): Likewise.
5270         * python/py-type.c (typy_reference, typy_lookup_type): Likewise.
5271         * python/py-value.c (valpy_get_dynamic_type, valpy_getitem):
5272         Likewise.
5273         * python/py-xmethods.c (gdbpy_get_xmethod_result_type)
5274         (gdbpy_invoke_xmethod): Likewise.
5275         * stabsread.c: Provide extra argument to make_reference_type()
5276         call.
5277         * valops.c (value_ref, value_rtti_indirect_type): Use
5278         lookup_lvalue_reference_type() instead of lookup_reference_type().
5279
5280 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
5281
5282         PR gdb/14441
5283         * gdbtypes.h (enum type_code) <TYPE_CODE_RVALUE_REF>: New constant.
5284         (TYPE_IS_REFERENCE): New macro.
5285         (struct type): Add rvalue_reference_type field.
5286         (TYPE_RVALUE_REFERENCE_TYPE): New macro.
5287
5288 2017-03-20  Marc-Andre Laperle  <marc-andre.laperle@ericsson.com>
5289
5290         * NEWS: Add an entry about new '-file-list-shared-libraries' command.
5291         * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries):
5292         New function definition.
5293         * mi/mi-cmds.c (mi_cmds): Add -file-list-shared-libraries command.
5294         * mi/mi-cmds.h (mi_cmd_file_list_shared_libraries):
5295         New function declaration.
5296         * mi/mi-interp.c (mi_output_solib_attribs): New Function.
5297         * mi/mi-interp.h: New file.
5298         * solib.c (info_sharedlibrary_command): Replace for loop with
5299         ALL_SO_LIBS macro
5300         * solib.h (update_solib_list): New function declaration.
5301         (so_list_head): Move macro.
5302         * solist.h (ALL_SO_LIBS): New macro.
5303
5304 2017-03-20  Marc-Andre Laperle  <marc-andre.laperle@ericsson.com>
5305
5306         * infcmd.c (post_create_inferior): Remove unused argument in
5307         call to solib_add.
5308         * remote.c (remote_start_remote): Likewise.
5309         * solib-frv.c (frv_fetch_objfile_link_map): Likewise.
5310         * solib-svr4.c: (svr4_fetch_objfile_link_map): Likewise.
5311         (enable_break): Likewise.
5312         * solib.c (update_solib_list): Remove unused target argument
5313         and its documentation.
5314         (solib_add): Remove unused target argument.  Remove unused
5315         argument in call to update_solib_list.
5316         (info_sharedlibrary_command): Remove unused argument in call
5317         to update_solib_list.
5318         (sharedlibrary_command): Remove unused argument in call to
5319         solib_add.
5320         (handle_solib_event): Likewise.
5321         (reload_shared_libraries): Likewise.
5322         * solib.h (solib_add): Remove unused target argument.
5323
5324 2017-03-20  Andreas Arnez  <arnez@linux.vnet.ibm.com>
5325
5326         * s390-linux-tdep.c (is_rsi, is_rie): Remove functions.
5327         (s390_displaced_step_fixup): Cover relative branches with the
5328         default fixup handling.  This fixes lack of support for some
5329         relative branch instructions.
5330
5331 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
5332
5333         * i386-gnu-nat.c (gnu_fetch_registers, gnu_store_registers): Use
5334         ptid from regcache.
5335
5336 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
5337
5338         * i386-darwin-nat.c (i386_darwin_fetch_inferior_registers,
5339         i386_darwin_store_inferior_registers): Use ptid from regcache.
5340
5341 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
5342
5343         * i386-bsd-nat.c (i386bsd_fetch_inferior_registers,
5344         i386bsd_store_inferior_registers): Use ptid from regcache.
5345
5346 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
5347
5348         * hppa-obsd-nat.c (hppaobsd_fetch_registers,
5349         hppaobsd_store_registers): Use ptid from regcache.
5350
5351 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
5352
5353         * hppa-nbsd-nat.c (hppanbsd_fetch_registers,
5354         hppanbsd_store_registers): Use ptid from regcache.
5355
5356 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
5357
5358         * hppa-linux-nat.c (fetch_register, store_register): Use ptid
5359         from regcache.  Use get_ptrace_pid.
5360
5361 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
5362
5363         * corelow.c (get_core_register_section): Use ptid from regcache,
5364         update doc.
5365
5366 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
5367
5368         * bsd-uthread.c (bsd_uthread_fetch_registers,
5369         bsd_uthread_store_registers): Use ptid from regcache, set and
5370         restore inferior_ptid.
5371
5372 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
5373
5374         * arm-nbsd-nat.c (fetch_register, fetch_regs, fetch_fp_register,
5375         fetch_fp_regs, store_register, store_regs, store_fp_register,
5376         store_fp_regs): Use ptid from regcache.
5377
5378 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
5379
5380         * arm-linux-nat.c (fetch_fpregs, store_fpregs, fetch_regs,
5381         store_regs, fetch_wmmx_regs, store_wmmx_regs, fetch_vfp_regs,
5382         store_vfp_regs): Use ptid from regcache.
5383
5384 2017-03-17  Pedro Alves  <palves@redhat.com>
5385
5386         PR remote/21188
5387         * ser-base.c (ser_base_wait_for): Add comment.
5388         (do_ser_base_readchar): Improve comment based on the ser-unix.c's
5389         version.
5390         * ser-unix.c (hardwire_raw): Remove reference to
5391         scb->current_timeout.
5392         (wait_for, do_hardwire_readchar, hardwire_readchar): Delete.
5393         (hardwire_ops): Install ser_base_readchar instead of
5394         hardwire_readchar.
5395         * serial.h (struct serial) <current_timeout, timeout_remaining>:
5396         Remove fields.
5397
5398 2017-03-17  Jonah Graham  <jonah@kichwacoders.com>
5399
5400         PR gdb/19637
5401         * python/lib/gdb/printer/bound_registers.py: Add support for
5402         Python 3.
5403
5404 2017-03-16  Andreas Arnez  <arnez@linux.vnet.ibm.com>
5405
5406         * dwarf2loc.c (indirect_synthetic_pointer): Get data type of
5407         pointed-to DIE and pass it to dwarf2_evaluate_loc_desc_full.
5408         (dwarf2_evaluate_loc_desc_full): New parameter subobj_type; rename
5409         byte_offset to subobj_byte_offset.  Fix the handling of
5410         DWARF_VALUE_STACK on big-endian targets when coming via an
5411         implicit pointer.
5412         (dwarf2_evaluate_loc_desc): Adjust call to
5413         dwarf2_evaluate_loc_desc_full.
5414         * dwarf2loc.h (dwarf2_fetch_die_type_sect_off): New declaration.
5415         * dwarf2read.c (dwarf2_fetch_die_type_sect_off): New function.
5416
5417 2017-03-16  Yao Qi  <yao.qi@linaro.org>
5418
5419         * arm-tdep.c (thumb_record_misc): Decode CBNZ, CBZ, REV16,
5420         and REVSH instructions.
5421
5422 2017-03-16  Yao Qi  <yao.qi@linaro.org>
5423
5424         * arm-tdep.c [GDB_SELF_TEST]: include "selftests.h".
5425         (arm_record_test): Declare.
5426         (_initialize_arm_tdep) [GDB_SELF_TEST]: call register_self_test.
5427         (thumb_record_ld_st_reg_offset): Rewrite the opcode matching to
5428         align with the manual.
5429         (thumb_record_misc): Adjust the code order to align with the
5430         manual.
5431         (thumb2_record_decode_insn_handler): Fix instruction matching.
5432         (instruction_reader_thumb): New class.
5433         (arm_record_test): New function.
5434
5435 2017-03-16  Yao Qi  <yao.qi@linaro.org>
5436
5437         * arm-tdep.c (abstract_memory_reader): New class.
5438         (instruction_reader): New class.
5439         (extract_arm_insn): Add argument 'reader'.  Callers updated.
5440         (decode_insn): Likewise.
5441
5442 2017-03-16  Doug Evans  <dje@google.com>
5443
5444         * guile/scm-lazy-string.c (lazy_string_smob): Clarify use of LENGTH
5445         member.  Change type of TYPE member to SCM.  All uses updated.
5446         (lsscm_make_lazy_string_smob): Add assert.
5447         (lsscm_make_lazy_string): Flag bad length values.
5448         (lsscm_elt_type): New function.
5449         (gdbscm_lazy_string_to_value): Rewrite to use
5450         lsscm_safe_lazy_string_to_value.
5451         (lsscm_safe_lazy_string_to_value): Fix handling of TYPE_CODE_PTR.
5452         * guile/scm-value.c (gdbscm_value_to_lazy_string): Flag bad length
5453         values.  Fix TYPE_CODE_PTR.  Handle TYPE_CODE_ARRAY.  Handle typedefs
5454         in incoming type.
5455         * guile/guile-internal.h (tyscm_scm_to_type): Declare.
5456         * guile/scm-type.c (tyscm_scm_to_type): New function.
5457
5458 2017-03-15  Doug Evans  <dje@google.com>
5459
5460         PR python/17728, python/18439, python/18779
5461         * python/py-lazy-string.c (lazy_string_object): Clarify use of LENGTH
5462         member.  Change type of TYPE member to PyObject *.  All uses updated.
5463         (stpy_convert_to_value): Fix handling of TYPE_CODE_PTR.
5464         (gdbpy_create_lazy_string_object): Flag bad length values.
5465         Handle TYPE_CODE_ARRAY with possibly different user-provided length.
5466         Handle typedefs in incoming type.
5467         (stpy_lazy_string_elt_type): New function.
5468         (gdbpy_extract_lazy_string): Call it.
5469         * python/py-value.c (valpy_lazy_string): Flag bad length values.
5470         Fix handling of TYPE_CODE_PTR.  Handle TYPE_CODE_ARRAY.  Handle
5471         typedefs in incoming type.
5472
5473 2017-03-16  Doug Evans  <dje@google.com>
5474
5475         * guile/guile-internal.h (tyscm_scm_to_type): Declare.
5476         * guile/scm-type.c (tyscm_scm_to_type): New function.
5477
5478 2017-03-16  Jiong Wang  <jiong.wang@arm.com>
5479
5480         * inf-ptrace.c (inf_ptrace_peek_poke): Change the type to
5481         "ULONGEST" for "skip".
5482
5483 2017-03-14  Andreas Arnez  <arnez@linux.vnet.ibm.com>
5484
5485         PR gdb/21220
5486         * inf-ptrace.c (inf_ptrace_xfer_partial): In "case
5487         TARGET_OBJECT_MEMORY", extract the logic for ptrace peek/poke...
5488         (inf_ptrace_peek_poke): ...here.  New function.  Now also loop
5489         over ptrace peek/poke until end of buffer or error.
5490
5491 2017-03-14  Simon Marchi  <simon.marchi@ericsson.com>
5492
5493         * parse.c (length_of_subexp): Make static.
5494         * parser-defs.h (length_of_subexp): Remove.
5495
5496 2017-03-14  Andreas Arnez  <arnez@linux.vnet.ibm.com>
5497
5498         * linux-nat.c (linux_proc_xfer_partial): Handle write operations
5499         as well.
5500
5501 2017-03-14  Pedro Alves  <palves@redhat.com>
5502
5503         * cp-name-parser.y (cp_demangled_name_to_comp): Update comment.
5504         (main): Use std::unique_ptr.  Remove calls to
5505         cp_demangled_name_parse_free.
5506
5507 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
5508
5509         * alpha-bsd-nat.c (alphabsd_fetch_inferior_registers,
5510         alphabsd_store_inferior_registers): Use regcache->ptid instead
5511         of inferior_ptid.
5512
5513 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
5514
5515         * aix-thread.c (aix_thread_fetch_registers,
5516         aix_thread_store_registers): Use regcache->ptid instead of
5517         inferior_ptid.
5518
5519 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
5520
5521         * aarch64-linux-nat.c (fetch_gregs_from_thread,
5522         store_gregs_to_thread, fetch_fpregs_from_thread,
5523         store_fpregs_to_thread): Use regcache->ptid instead of
5524         inferior_ptid.
5525
5526 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
5527
5528         * amd64-linux-nat.c (amd64_linux_fetch_inferior_registers,
5529         amd64_linux_fetch_inferior_registers): Use regcache->ptid
5530         instead of inferior_ptid.
5531
5532 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
5533
5534         * target.c (target_fetch_registers, target_store_registers): Add
5535         assert.
5536
5537 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
5538
5539         * regcache.h (regcache_get_ptid): New function.
5540         * regcache.c (regcache_get_ptid): New function.
5541
5542 2017-03-13  Mark Wielaard  <mark@klomp.org>
5543
5544         * cp-name-parser.y (make_empty): Initialize d_printing to zero.
5545
5546 2017-03-10  Keith Seitz  <keiths@redhat.com>
5547
5548         PR c++/8218
5549         * c-typeprint.c (cp_type_print_method_args): Skip artificial arguments.
5550
5551 2017-03-08  Pedro Alves  <palves@redhat.com>
5552
5553         PR gdb/18360
5554         * infrun.c (start_step_over, do_target_resume, resume)
5555         (restart_threads): Assert we're not resuming a thread that is
5556         meant to be stopped.
5557         (infrun_thread_stop_requested_callback): Delete.
5558         (infrun_thread_stop_requested): If the thread is internally
5559         stopped, queue a pending stop event and clear the thread's
5560         inline-frame state.
5561         (handle_stop_requested): New function.
5562         (handle_syscall_event, handle_inferior_event_1): Use
5563         handle_stop_requested.
5564         (handle_stop_requested): New function.
5565         (handle_signal_stop): Set the thread's stop_signal here instead of
5566         at caller.
5567         (finish_step_over): Clear step over info unconditionally.
5568         (handle_signal_stop): If the user had interrupted the event
5569         thread, consider the stop a random signal.
5570         (handle_signal_stop) <signal arrived while stepping over
5571         breakpoint>: Don't restart threads here.
5572         (stop_waiting): Don't clear step-over info here.
5573
5574 2017-03-08  Pedro Alves  <palves@redhat.com>
5575
5576         PR 21206
5577         * common/gdb_unlinker.h (unlinker::unlinker): Attribute nonnull
5578         goes to argument 2, not 1.
5579
5580 2017-03-08  Pedro Alves  <palves@redhat.com>
5581
5582         PR cli/21218
5583         * top.c (gdb_readline_wrapper): Avoid passing NULL to
5584         display_gdb_prompt.
5585         (command_line_input): Add comment.
5586
5587 2017-03-08  Pedro Alves  <palves@redhat.com>
5588
5589         PR tui/21216
5590         * tui/tui-file.c (tui_file::write): New.
5591         * tui/tui-file.h (tui_file): Override "write".
5592         * tui/tui-io.c (do_tui_putc, update_start_line): New functions,
5593         factored out from ...
5594         (tui_puts): ... here.
5595         (tui_putc): Use them.
5596         (tui_write): New function.
5597         * tui/tui-io.h (tui_write): Declare.
5598
5599 2017-03-07  Sergio Durigan Junior  <sergiodj@redhat.com>
5600
5601         * Makefile.in (SFILES): Replace "environ.c" with
5602         "common/environ.c".
5603         (HFILES_NO_SRCDIR): Likewise, for "environ.h".
5604         * environ.c: Include "common-defs.h" instead of "defs.h.  Moved
5605         to...
5606         * common/environ.c: ... here.
5607         * environ.h: Moved to...
5608         * common/environ.h: ... here.
5609
5610 2017-03-07  Peter Bergner  <bergner@vnet.ibm.com>
5611
5612         * gdbarch.sh (pstring_ptr): New static function.
5613         (gdbarch_disassembler_options): Use it.
5614         (gdbarch_verify_disassembler_options): Print valid_disassembler_options,
5615         not valid_disassembler_option->name.
5616         * gdbarch.c: Regenerate.
5617
5618 2017-03-07  Peter Bergner  <bergner@vnet.ibm.com>
5619
5620         * config/powerpc/ppc64-linux.mh (MH_CFLAGS): Delete.
5621
5622 2017-03-07  Pedro Alves  <palves@redhat.com>
5623
5624         * tui/tui-regs.c (tui_restore_gdbout): Don't delete gdb_stdout.
5625
5626 2017-03-07  Walfred Tedeschi  <walfred.tedeschi@intel.com>
5627
5628         * i387-tdep.h (i387_reset_bnd_regs): Add function definition.
5629         * i387-tdep.c (i387_reset_bnd_regs): Add function implementation.
5630         * i386-tdep.c (i386_push_dummy_call): Call i387_reset_bnd_regs.
5631         * amd64-tdep.c (amd64_push_dummy_call): Call i387_reset_bnd_regs.
5632
5633 2017-03-06  Simon Marchi  <simon.marchi@ericsson.com>
5634
5635         * xtensa-linux-nat.c (fetch_gregs): Remove const.
5636
5637 2017-03-03  Simon Marchi  <simon.marchi@ericsson.com>
5638
5639         * remote.c (remote_add_target_side_commands): Use range-based
5640         for loop.
5641
5642 2017-03-03  Yao Qi  <yao.qi@linaro.org>
5643
5644         PR gdb/21165
5645         * ada-valprint.c (ada_val_print_ref): Call value_fetch_lazy if
5646         value is lazy.
5647         * valprint.c (common_val_print): Likewise.
5648
5649 2017-02-28  Peter Bergner  <bergner@vnet.ibm.com>
5650
5651         * NEWS: Mention new set/show disassembler-options commands.
5652         * doc/gdb.texinfo: Document new set/show disassembler-options commands.
5653         * disasm.c: Include "arch-utils.h", "gdbcmd.h" and "safe-ctype.h".
5654         (prospective_options): New static variable.
5655         (gdb_disassembler::gdb_disassembler): Initialize
5656         m_di.disassembler_options.
5657         (gdb_buffered_insn_length_init_dis): Initilize di->disassembler_options.
5658         (get_disassembler_options): New function.
5659         (set_disassembler_options): Likewise.
5660         (set_disassembler_options_sfunc): Likewise.
5661         (show_disassembler_options_sfunc): Likewise.
5662         (disassembler_options_completer): Likewise.
5663         (_initialize_disasm): Likewise.
5664         * disasm.h (get_disassembler_options): New prototype.
5665         (set_disassembler_options): Likewise.
5666         * gdbarch.sh (gdbarch_disassembler_options): New variable.
5667         (gdbarch_verify_disassembler_options): Likewise.
5668         * gdbarch.c: Regenerate.
5669         * gdbarch.h: Likewise.
5670         * arm-tdep.c (num_disassembly_options): Delete.
5671         (set_disassembly_style): Likewise.
5672         (arm_disassembler_options): New static variable.
5673         (set_disassembly_style_sfunc): Convert short style name into long
5674         option name.  Call set_disassembler_options.
5675         (show_disassembly_style_sfunc): New function.
5676         (arm_gdbarch_init): Call set_gdbarch_disassembler_options and
5677         set_gdbarch_verify_disassembler_options.
5678         (_initialize_arm_tdep): Delete regnames variable and update callers.
5679         (arm_disassembler_options): Initialize.
5680         (disasm_options): New variable.
5681         (num_disassembly_options): Rename from this...
5682         (num_disassembly_styles): ...to this.  Compute by scanning through
5683         disasm_options.
5684         (valid_disassembly_styles): Initialize using disasm_options.
5685         Remove calls to parse_arm_disassembler_option, get_arm_regnames and
5686         set_arm_regname_option.
5687         Pass show_disassembly_style_sfunc to the "disassembler" setshow command.
5688         * rs6000-tdep.c (powerpc_disassembler_options): New static variable.
5689         (rs6000_gdbarch_init): Call set_gdbarch_disassembler_options and
5690         set_gdbarch_verify_disassembler_options.
5691         * s390-tdep.c (s390_disassembler_options): New static variable.
5692         (s390_gdbarch_init):all set_gdbarch_disassembler_options and
5693         set_gdbarch_verify_disassembler_options.
5694
5695 2017-02-27  Simon Marchi  <simon.marchi@ericsson.com>
5696
5697         * remote.c (remote_add_target_side_condition): Remove "struct"
5698         keyword from range-based for loop.
5699
5700 2017-02-27  Simon Marchi  <simon.marchi@ericsson.com>
5701
5702         * remote.c (remote_add_target_side_condition): Use range-based
5703         for loop.  Update comment.
5704
5705 2017-02-27  Yao Qi  <yao.qi@linaro.org>
5706
5707         * f-typeprint.c (f_print_type): Check "varstring" is empty first.
5708
5709 2017-02-26  Alan Hayward  <alan.hayward@arm.com>
5710
5711         * regcache.c (regcache_raw_update): New function.
5712         (regcache_raw_read): Move code to regcache_raw_update.
5713         * regcache.h (regcache_raw_update): New declaration.
5714         * remote.c (remote_prepare_to_store): Call regcache_raw_update.
5715
5716 2017-02-26  Jan Kratochvil  <jan.kratochvil@redhat.com>
5717
5718         * dwarf2read.c (create_debug_type_hash_table): Initialize
5719         header.signature and header.type_offset_in_tu.
5720
5721 2017-02-24  Pedro Alves  <palves@redhat.com>
5722
5723         * symtab.c (make_file_symbol_completion_list_1): Use
5724         add_symtab_completions.
5725
5726 2017-02-24  Alan Hayward  <alan.hayward@arm.com>
5727
5728         * stack.c (frame_info): Use frame_unwind_register_value to avoid buf.
5729
5730 2017-02-24  Alan Hayward  <alan.hayward@arm.com>
5731
5732         * i386-tdep.c (i386_pseudo_register_read_into_value): Use
5733         I386_MAX_REGISTER_SIZE.
5734         (i386_pseudo_register_write): Likewise.
5735         (i386_process_record): Likewise.
5736         * i387-tdep.c (i387_supply_xsave): Likewise.
5737         * m68k-linux-nat.c (fetch_register): Use M68K_MAX_REGISTER_SIZE.
5738         (store_register): Likewise.
5739
5740 2017-02-23  Pedro Alves  <palves@redhat.com>
5741
5742         * ada-lang.c: Include "common/function-view.h".
5743         (ada_iterate_over_symbols): Adjust to use function_view as
5744         callback type.
5745         (struct add_partial_datum, ada_complete_symbol_matcher): Delete.
5746         (ada_make_symbol_completion_list): Use a lambda.
5747         (ada_exc_search_name_matches): Delete.
5748         (name_matches_regex): New.
5749         (ada_add_global_exceptions): Use a lambda and name_matches_regex.
5750         * compile/compile-c-support.c: Include "common/function-view.h".
5751         (print_one_macro): Change prototype to accept a ui_file pointer.
5752         (write_macro_definitions): Use a lambda.
5753         * dwarf2read.c: Include "common/function-view.h".
5754         (dw2_map_expand_apply, dw2_map_symtabs_matching_filename)
5755         (dw2_expand_symtabs_matching): Adjust to use function_view as
5756         callback type.
5757         * language.h: Include "common/function-view.h".
5758         (struct language_defn) <la_iterate_over_symbols>: Adjust to use
5759         function_view as callback type.
5760         (LA_ITERATE_OVER_SYMBOLS): Remove DATA parameter.
5761         * linespec.c: Include "common/function-view.h".
5762         (collect_info::add_symbol): New method.
5763         (struct symbol_and_data_callback, iterate_inline_only, struct
5764         symbol_matcher_data, iterate_name_matcher): Delete.
5765         (iterate_over_all_matching_symtabs): Adjust to use function_view
5766         as callback type and lambdas.
5767         (iterate_over_file_blocks): Adjust to use function_view as
5768         callback type.
5769         (decode_compound_collector): Now a class with private fields.
5770         (decode_compound_collector::release_symbols): New method.
5771         (collect_one_symbol): Rename to...
5772         (decode_compound_collector::operator()): ... this and adjust.
5773         (lookup_prefix_sym): decode_compound_collector construction bits
5774         move to decode_compound_collector ctor.  Pass the
5775         decode_compound_collector object directly as callback.  Remove
5776         cleanups and use decode_compound_collector::release_symbols
5777         instead.
5778         (symtab_collector): Now a class with private fields.
5779         (symtab_collector::release_symtabs): New method.
5780         (add_symtabs_to_list): Rename to...
5781         (symtab_collector::operator()): ... this and adjust.
5782         (collect_symtabs_from_filename): symtab_collector construction
5783         bits move to symtab_collector ctor.  Pass the symtab_collector
5784         object directly as callback.  Remove cleanups and use
5785         symtab_collector::release_symtabs instead.
5786         (collect_symbols): Delete.
5787         (add_matching_symbols_to_info): Use lambdas.
5788         * macrocmd.c (print_macro_callback): Delete.
5789         (info_macro_command): Use a lambda.
5790         (info_macros_command): Pass print_macro_definition as callable
5791         directly.
5792         (print_one_macro): Remove 'ignore' parameter.
5793         (macro_list_command): Adjust.
5794         * macrotab.c (macro_for_each_data::fn): Now a function_view.
5795         (macro_for_each_data::user_data): Delete field.
5796         (foreach_macro): Adjust to call the function_view.
5797         (macro_for_each): Adjust to use function_view as callback type.
5798         (foreach_macro_in_scope): Adjust to call the function_view.
5799         (macro_for_each_in_scope): Adjust to use function_view as callback
5800         type.
5801         * macrotab.h: Include "common/function-view.h".
5802         (macro_callback_fn): Declare a prototype instead of a pointer.
5803         Remove "user_data" parameter.
5804         (macro_for_each, macro_for_each_in_scope): Adjust to use
5805         function_view as callback type.
5806         * psymtab.c (partial_map_expand_apply)
5807         (psym_map_symtabs_matching_filename, recursively_search_psymtabs):
5808         Adjust to use function_view as callback type and to return bool.
5809         (psym_expand_symtabs_matching): Adjust to use function_view as
5810         callback types.
5811         * symfile-debug.c (debug_qf_map_symtabs_matching_filename): Adjust
5812         to use function_view as callback type and to return bool.
5813         (debug_qf_expand_symtabs_matching): Adjust to use function_view as
5814         callback types.
5815         * symfile.c (expand_symtabs_matching): Adjust to use function_view
5816         as callback types.
5817         * symfile.h: Include "common/function-view.h".
5818         (expand_symtabs_file_matcher_ftype)
5819         (expand_symtabs_symbol_matcher_ftype)
5820         (expand_symtabs_exp_notify_ftype): Remove "data" parameter and
5821         return bool.
5822         (quick_symbol_functions::map_symtabs_matching_filename)
5823         (quick_symbol_functions::expand_symtabs_matching): Adjust to use
5824         function_view as callback type and return bool.
5825         (expand_symtabs_matching): Adjust to use function_view as callback
5826         type.
5827         (maintenance_expand_name_matcher)
5828         (maintenance_expand_file_matcher): Delete.
5829         (maintenance_expand_symtabs): Use lambdas.
5830         * symtab.c (iterate_over_some_symtabs): Adjust to use
5831         function_view as callback types and return bool.
5832         (iterate_over_symtabs): Likewise.  Use unique_xmalloc_ptr instead
5833         of a cleanup.
5834         (lookup_symtab_callback): Delete.
5835         (lookup_symtab): Use a lambda.
5836         (iterate_over_symbols): Adjust to use function_view as callback
5837         type.
5838         (struct search_symbols_data, search_symbols_file_matches)
5839         (search_symbols_name_matches): Delete.
5840         (search_symbols): Use a pair of lambdas.
5841         (struct add_name_data, add_macro_name, symbol_completion_matcher)
5842         (symtab_expansion_callback): Delete.
5843         (default_make_symbol_completion_list_break_on_1): Use lambdas.
5844         * symtab.h: Include "common/function-view.h".
5845         (iterate_over_some_symtabs): Adjust to use function_view as
5846         callback type and return bool.
5847         (iterate_over_symtabs): Adjust to use function_view as callback
5848         type.
5849         (symbol_found_callback_ftype): Remove 'data' parameter and return
5850         bool.
5851         (iterate_over_symbols): Adjust to use function_view as callback
5852         type.
5853
5854 2017-02-23  Pedro Alves  <palves@redhat.com>
5855
5856         * Makefile.in (SUBDIR_UNITTESTS_SRCS, SUBDIR_UNITTESTS_OBS): New.
5857         (%.o) <unittests/%.c>: New pattern.
5858         * configure.ac ($development): Add $(SUBDIR_UNITTESTS_OBS) to
5859         CONFIG_OBS, and $(SUBDIR_UNITTESTS_SRCS) to CONFIG_SRCS.
5860         * common/function-view.h: New file.
5861         * unittests/function-view-selftests.c: New file.
5862         * configure: Regenerate.
5863
5864 2017-02-23  Simon Marchi  <simon.marchi@ericsson.com>
5865
5866         * bsd-uthread.c (bsd_uthread_thread_alive): Use ptid instead of
5867         inferior_ptid.
5868         * go32-nat.c (go32_thread_alive): Likewise.
5869
5870 2017-02-23  Yao Qi  <yao.qi@linaro.org>
5871
5872         * varobj-iter.h (varobj_iter_delete): Call xfree instead of
5873         delete.
5874
5875 2017-02-23  Yao Qi  <yao.qi@linaro.org>
5876
5877         * varobj.c (varobj_clear_saved_item): Use delete instead of
5878         xfree.
5879         (update_dynamic_varobj_children): Likewise.
5880
5881 2017-02-21  Jan Kratochvil  <jan.kratochvil@redhat.com>
5882
5883         * dwarf2read.c (dwarf2_record_block_ranges): Add forgotten BASEADDR.
5884
5885 2017-02-21  Simon Marchi  <simon.marchi@ericsson.com>
5886
5887         * common/enum-flags.h (enum_flags::enum_flags): Initialize
5888         m_enum_value to 0 in default constructor.
5889
5890 2017-02-21  Edjunior Barbosa Machado  <emachado@linux.vnet.ibm.com>
5891
5892         * rs6000-tdep.c (LOAD_AND_RESERVE_MASK): Rename from LWARX_MASK.
5893         (STORE_CONDITIONAL_MASK): Rename from STWCX_MASK.
5894         (LBARX_INSTRUCTION, LHARX_INSTRUCTION, LQARX_INSTRUCTION,
5895         STBCX_INSTRUCTION, STHCX_INSTRUCTION, STQCX_INSTRUCTION): New defines.
5896         (IS_LOAD_AND_RESERVE_INSN, IS_STORE_CONDITIONAL_INSN): New macros.
5897         (ppc_displaced_step_copy_insn): Use IS_LOAD_AND_RESERVE_INSN.
5898         (ppc_deal_with_atomic_sequence): Use IS_LOAD_AND_RESERVE_INSN and
5899         IS_STORE_CONDITIONAL_INSN.
5900
5901 2017-02-21  Jan Kratochvil  <jan.kratochvil@redhat.com>
5902
5903         * dwarf2_rnglists_process: Initialize range_beginning and range_end.
5904
5905 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
5906
5907         * NEWS (Changes since GDB 7.12): Add DWARF-5.
5908
5909 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
5910
5911         * dwarf2read.c (skip_one_die, read_attribute_value)
5912         (dwarf2_const_value_attr, dump_die_shallow)
5913         (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
5914         (skip_form_bytes, attr_form_is_constant): Handle DW_FORM_data16.
5915
5916 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
5917
5918         * dwarf2read.c (read_file_scope): Rename DW_MACRO_GNU_*.
5919         (dwarf_parse_macro_header): Accept DWARF version 5.
5920         (dwarf_decode_macro_bytes, dwarf_decode_macros): Rename DW_MACRO_GNU_*.
5921
5922 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
5923
5924         * block.c (call_site_for_pc): Rename DW_OP_GNU_*, DW_TAG_GNU_* and
5925         DW_AT_GNU_*.
5926         * common/common-exceptions.h (enum errors): Likewise.
5927         * dwarf2-frame.c (class dwarf_expr_executor): Likewise.
5928         * dwarf2expr.c (dwarf_block_to_dwarf_reg)
5929         (dwarf_expr_context::execute_stack_op): Likewise.
5930         * dwarf2expr.h (struct dwarf_expr_context, struct dwarf_expr_piece):
5931         Likewise.
5932         * dwarf2loc.c (dwarf_evaluate_loc_desc::get_base_type)
5933         (dwarf_evaluate_loc_desc::push_dwarf_reg_entry_value)
5934         (show_entry_values_debug, call_site_to_target_addr)
5935         (func_addr_to_tail_call_list, func_verify_no_selftailcall)
5936         (dwarf_expr_reg_to_entry_parameter, dwarf_entry_parameter_to_value)
5937         (entry_data_value_free_closure, value_of_dwarf_reg_entry)
5938         (value_of_dwarf_block_entry, indirect_pieced_value)
5939         (symbol_needs_eval_context::push_dwarf_reg_entry_value):
5940         (disassemble_dwarf_expression): Likewise.
5941         * dwarf2read.c (process_die, inherit_abstract_dies)
5942         (read_call_site_scope): Likewise.
5943         * gdbtypes.h (struct func_type, struct call_site_parameter)
5944         (struct call_site): Likewise.
5945         * stack.c (read_frame_arg): Likewise.
5946         * std-operator.def (OP_VAR_ENTRY_VALUE): Likewise.
5947
5948 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
5949
5950         * defs.h (read_unsigned_leb128): New declaration.
5951         * dwarf2loc.c (decode_debug_loclists_addresses): New function.
5952         (decode_debug_loc_dwo_addresses): Update DEBUG_LOC_* to DW_LLE_*.
5953         (dwarf2_find_location_expression): Call also
5954         decode_debug_loclists_addresses.  Handle DWARF-5 ULEB128 length.
5955         * dwarf2loc.h (dwarf2_version): New declaration.
5956         * dwarf2read.c (struct dwarf2_per_objfile): Add loclists, line_str,
5957         rnglists.
5958         (dwarf2_elf_names): Add .debug_loclists, .debug_line_str,
5959         .debug_rnglists.
5960         (struct dwop_section_names): Add loclists_dwo.
5961         (dwop_section_names): Add .debug_loclists.dwo.
5962         (struct comp_unit_head): Add unit_type, signature, type_offset_in_tu.
5963         (struct dwarf2_per_cu_data): Add dwarf_version.
5964         (struct dwo_sections): Add loclists.
5965         (struct attr_abbrev): Add implicit_const.
5966         (read_indirect_line_string): New declaration.
5967         (read_unsigned_leb128): Delete declaration.
5968         (rcuh_kind): New definition.
5969         (read_and_check_comp_unit_head): Change parameter
5970         is_debug_types_section to section_kind.
5971         (dwarf2_locate_sections): Handle loclists, line_str and rnglists.
5972         (read_comp_unit_head): Change parameter abfd to section, add parameter
5973         section_kind.  Handle DWARF-5.
5974         (error_check_comp_unit_head): Accept also DWARF version 5.
5975         (read_and_check_comp_unit_head): Change parameter
5976         is_debug_types_section to section_kind.
5977         (read_and_check_type_unit_head): Delete function.
5978         (read_abbrev_offset): Handle DWARF-5.
5979         (create_debug_type_hash_table): Add parameter section_kind.  Process
5980         only DW_UT_type.  Use signature and type_offset_in_tu from struct
5981         comp_unit_head.
5982         (create_debug_types_hash_table): Update create_debug_type_hash_table
5983         caller.
5984         (create_all_type_units): Call create_debug_type_hash_table.
5985         (read_cutu_die_from_dwo, init_cutu_and_read_dies): Change
5986         read_and_check_type_unit_head caller to read_and_check_comp_unit_head
5987         caller.
5988         (skip_one_die): Handle DW_FORM_implicit_const.
5989         (dwarf2_rnglists_process): New function.
5990         (dwarf2_ranges_process): Call dwarf2_rnglists_process for DWARF-5.
5991         (abbrev_table_read_table): Handle DW_FORM_implicit_const.
5992         (read_attribute_value): Handle DW_FORM_implicit_const,
5993         DW_FORM_line_strp.
5994         (read_attribute): Handle DW_FORM_implicit_const.
5995         (read_indirect_string_at_offset_from): New function from
5996         read_indirect_string_at_offset.
5997         (read_indirect_string_at_offset): Call
5998         read_indirect_string_at_offset_from.
5999         (read_indirect_line_string_at_offset): New function.
6000         (read_indirect_string): New function comment.
6001         (read_indirect_line_string): New function.
6002         (read_unsigned_leb128): Make it global.
6003         (dwarf2_string_attr): Handle DWARF-5.
6004         (add_include_dir_stub, read_formatted_entries): New functions.
6005         (dwarf_decode_line_header, dump_die_shallow, cu_debug_loc_section):
6006         Handle DWARF-5.
6007         (per_cu_header_read_in): Update read_comp_unit_head caller.
6008         (dwarf2_version): New function.
6009         * symfile.h (struct dwarf2_debug_sections): Add loclists, line_str and
6010         rnglists.
6011         * xcoffread.c (dwarf2_xcoff_names): Update struct dwarf2_debug_sections
6012         fields.
6013
6014 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
6015
6016         * dwarf2read.c (abbrev_table_read_table): Read the data only once.
6017
6018 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
6019
6020         * dwarf2read.c (dwarf2_ranges_process): New function from
6021         dwarf2_ranges_read.
6022         (dwarf2_ranges_read, dwarf2_record_block_ranges): Use
6023         dwarf2_ranges_process.
6024
6025 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
6026
6027         * dwarf2read.c (create_debug_type_hash_table): New function from
6028         create_debug_types_hash_table.
6029         (create_debug_types_hash_table): Call create_debug_type_hash_table.
6030         (create_all_type_units, open_and_init_dwo_file): Update
6031         create_debug_types_hash_table callers.
6032
6033 2017-02-20  Sergio Durigan Junior  <sergiodj@redhat.com>
6034
6035         PR gdb/16188
6036         * fork-child.c (trace_start_error): Fix thinko.  va_end should
6037         refer to 'ap', not 'args'.
6038
6039 2017-02-20  Sergio Durigan Junior  <sergiodj@redhat.com>
6040             Pedro Alves  <palves@redhat.com>
6041
6042         PR gdb/16188
6043         * darwin-nat.c (darwin_ptrace_me): Check if calls to system
6044         calls succeeded.
6045         * fork-child.c (trace_start_error): New function.
6046         (trace_start_error_with_name): Likewise.
6047         * gnu-nat.c (gnu_ptrace_me): Check if call to PTRACE succeeded.
6048         * inf-ptrace.c (inf_ptrace_me): Likewise.
6049         * inferior.h (trace_start_error): New prototype.
6050         (trace_start_error_with_name): Likewise.
6051
6052 2017-02-15  Sergio Durigan Junior  <sergiodj@redhat.com>
6053
6054         PR gdb/21164
6055         * psymtab.c (maintenance_print_psymbols): Verify if 'argv' is not
6056         NULL before using it.
6057         * symmisc.c (maintenance_print_symbols): Likewise.
6058         (maintenance_print_msymbols): Likewise.
6059
6060 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
6061
6062         * NEWS: Add record Python bindings entry.
6063
6064 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
6065
6066         * Makefile.in (SUBDIR_PYTHON_OBS): Add py-record-btrace.o,
6067         py-record-full.o.
6068         (SUBDIR_PYTHON_SRCS): Add py-record-btrace.c, py-record-full.c.
6069         * python/py-record-btrace.c, python/py-record-btrace.h,
6070         python/py-record-full.c, python/py-record-full.h: New file.
6071         * python/py-record.c: Add include for py-record-btrace.h and
6072         py-record-full.h.
6073         (recpy_method, recpy_format, recpy_goto, recpy_replay_position,
6074         recpy_instruction_history, recpy_function_call_history, recpy_begin,
6075         recpy_end): Use functions from py-record-btrace.c and py-record-full.c.
6076         * python/python-internal.h (PyInt_FromSsize_t, PyInt_AsSsize_t):
6077         New definition.
6078         (gdbpy_initialize_btrace): New export.
6079         * python/python.c (_initialize_python): Add gdbpy_initialize_btrace.
6080
6081 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
6082
6083         * Makefile.in (SUBDIR_PYTHON_OBS): Add python/py-record.o.
6084         (SUBDIR_PYTHON_SRCS): Add python/py-record.c.
6085         * python/py-record.c: New file.
6086         * python/python-internal.h (gdbpy_start_recording,
6087         gdbpy_current_recording, gdpy_stop_recording,
6088         gdbpy_initialize_record): New export.
6089         * python/python.c (_initialize_python): Add gdbpy_initialize_record.
6090         (python_GdbMethods): Add gdbpy_start_recording,
6091         gdbpy_current_recording and gdbpy_stop_recording.
6092
6093 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
6094
6095         * record-btrace.c (record_btrace_record_method): New function.
6096         (init_record_btrace_ops): Initialize to_record_method.
6097         * record-full.c (record_full_record_method): New function.
6098         (init_record_full_ops, init_record_full_core_ops): Add
6099         record_full_record_method.
6100         * record.h (enum record_method): New enum.
6101         * target-debug.h (target_debug_print_enum_record_method: New define.
6102         * target-delegates.c: Regenerate.
6103         * target.c (target_record_method): New function.
6104         * target.h: Include record.h.
6105         (struct target_ops) <to_record_method>: New field.
6106         (target_record_method): New export.
6107
6108 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
6109
6110         * record.h (record_start, record_stop): New export.
6111         * record.c (record_start, record_stop): New function.
6112
6113 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
6114
6115         * btrace.c (btrace_fetch): Copy function call segments pointer
6116         into a vector.
6117         (btrace_clear): Clear the vector.
6118         (btrace_find_insn_by_number): Use binary search to find the correct
6119         function call segment.
6120         * btrace.h (brace_fun_p): New typedef.
6121         (struct btrace_thread_info) <functions>: New field.
6122
6123 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
6124
6125         * record-btrace.c (btrace_ui_out_decode_error): Move most of it ...
6126         * btrace.c (btrace_decode_error): ... here.  New function.
6127         * btrace.h (btrace_decode_error): New export.
6128
6129 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
6130
6131         * btrace.c (ftrace_call_num_insn, btrace_insn_get_error): New function.
6132         (ftrace_new_function, btrace_insn_number, btrace_insn_cmp,
6133         btrace_find_insn_by_number): Remove special case for gaps.
6134         * btrace.h (btrace_insn_get_error): New export.
6135         (btrace_insn_number, btrace_find_insn_by_number): Adjust comment.
6136         * record-btrace.c (btrace_insn_history): Print number for gaps.
6137         (record_btrace_info, record_btrace_goto): Handle gaps.
6138
6139 2017-02-14  Tom Tromey  <tom@tromey.com>
6140
6141         PR python/13598:
6142         * python/python.c (gdbpy_before_prompt_hook): Emit before_prompt
6143         event.
6144         * python/py-evts.c (gdbpy_initialize_py_events): Add
6145         before_prompt registry.
6146         * python/py-events.h (events_object) <before_prompt>: New field.
6147
6148 2017-02-14  Markus Metzger  <markus.t.metzger@intel.com>
6149
6150         * btrace.c (ftrace_new_switch): Preserve up link and flags.
6151
6152 2017-02-13  Luis Machado  <lgustavo@codesourcery.com>
6153
6154         * symfile (_initialize_symfile): Add usage text to the load command's
6155         help text.
6156
6157 2017-02-10  Simon Marchi  <simon.marchi@ericsson.com>
6158
6159         * utils.c (defaulted_query): Don't query on secondary UIs.
6160
6161 2017-02-10  Tom Tromey  <tom@tromey.com>
6162
6163         * rust-lang.c (rust_get_disr_info): Remove unused variable.
6164
6165 2017-02-10  Tom Tromey  <tom@tromey.com>
6166
6167         * python/py-value.c (valpy_richcompare_throw): Remove unnecessary
6168         "cleanup" local.
6169         * python/py-type.c (typy_legacy_template_argument): Remove
6170         unnecessary "cleanup" local.
6171
6172 2017-02-10  Tom Tromey  <tom@tromey.com>
6173
6174         * python/python.c (do_start_initialization): New function, from
6175         _initialize_python.
6176         (_initialize_python): Call do_start_initialization.
6177         * python/py-linetable.c (ltpy_iternext): Use explicit returns, not
6178         goto.
6179
6180 2017-02-10  Tom Tromey  <tom@tromey.com>
6181
6182         * python/py-prettyprint.c (pretty_print_one_value): Use
6183         gdbpy_ref.
6184
6185 2017-02-10  Tom Tromey  <tom@tromey.com>
6186
6187         * python/py-cmd.c (cmdpy_destroyer): Use gdbpy_ref.
6188         * python/py-breakpoint.c (gdbpy_breakpoint_deleted): Use
6189         gdbpy_ref.
6190         * python/py-type.c (field_new): Use gdbpy_ref.
6191         * python/py-symtab.c (symtab_and_line_to_sal_object): Use
6192         gdbpy_ref.
6193         * python/py-progspace.c (pspy_new): Use gdbpy_ref.
6194         (py_free_pspace): Likewise.
6195         (pspace_to_pspace_object): Likewise.
6196         * python/py-objfile.c (objfpy_new): Use gdbpy_ref.
6197         (py_free_objfile): Likewise.
6198         (objfile_to_objfile_object): Likewise.
6199         * python/py-inferior.c (delete_thread_object): Use
6200         gdbpy_ref.
6201         (infpy_read_memory): Likewise.
6202         (py_free_inferior): Likewise.
6203         * python/py-evtregistry.c (create_eventregistry_object): Use
6204         gdbpy_ref.
6205         * python/py-event.c (create_event_object): Use gdbpy_ref.
6206
6207 2017-02-10  Tom Tromey  <tom@tromey.com>
6208
6209         * python/py-ref.h (gdbpy_ref_policy): Now a template.
6210         (gdbpy_ref): Now a template; allow subclasses of PyObject to be
6211         used.
6212         * python/py-arch.c, python/py-bpevent.c, python/py-breakpoint.c,
6213         python/py-cmd.c, python/py-continueevent.c, python/py-event.c,
6214         python/py-exitedevent.c, python/py-finishbreakpoint.c,
6215         python/py-framefilter.c, python/py-function.c,
6216         python/py-inferior.c, python/py-infevents.c,
6217         python/py-linetable.c, python/py-newobjfileevent.c,
6218         python/py-param.c, python/py-prettyprint.c, python/py-ref.h,
6219         python/py-signalevent.c, python/py-stopevent.c,
6220         python/py-symbol.c, python/py-threadevent.c, python/py-type.c,
6221         python/py-unwind.c, python/py-utils.c, python/py-value.c,
6222         python/py-varobj.c, python/py-xmethods.c, python/python.c,
6223         varobj.c: Change gdbpy_ref to gdbpy_ref<>.
6224
6225 2017-02-10  Tom Tromey  <tom@tromey.com>
6226
6227         * ui-out.h (ui_out_emit_type): New class.
6228         (ui_out_emit_tuple, ui_out_emit_list): New typedefs.
6229         * python/py-framefilter.c (py_print_single_arg): Use gdb::optional
6230         and ui_out_emit_tuple.
6231         (enumerate_locals): Likewise.
6232         (py_mi_print_variables, py_print_locals, py_print_args): Use
6233         ui_out_emit_list.
6234         (py_print_frame): Use gdb::optional, ui_out_emit_tuple,
6235         ui_out_emit_list.
6236         * common/gdb_optional.h: New file.
6237
6238 2017-02-10  Martin Galvan  <martingalvan@sourceware.org>
6239
6240         * MAINTAINERS (Write After Approval): Update my e-mail address.
6241
6242 2017-02-10  Martin Galvan  <martingalvan@sourceware.org>
6243
6244         PR gdb/21122
6245         * breakpoint.c (_initialize_breakpoint): Update the help description
6246         of the 'commands' command to indicate that it takes a list argument.
6247
6248 2017-02-09  Simon Marchi  <simon.marchi@ericsson.com>
6249
6250         * interps.c (current_interp_set_logging): Remove "return".
6251
6252 2017-02-09  Gary Benson  <gbenson@redhat.com>
6253
6254         * symtab.c (add_symtab_completions): Prevent NULL pointer
6255         dereference.
6256
6257 2017-02-08  Pedro Alves  <palves@redhat.com>
6258
6259         * interps.c (interp::interp): Remove reference to quiet_p.
6260         (interp_set): Make static.  Remove dead "Switching to" output
6261         code.
6262         (interp_quiet_p, interp_set_quiet): Delete.
6263         (interpreter_exec_cmd): Don't set the interpreter quiet.
6264         * interps.h (interp_quiet_p): Make static.
6265         (class interp) <quiet_p>: Remove field
6266
6267 2017-02-08  Jerome Guitton  <guitton@adacore.com>
6268
6269         * cli/cli-decode.c (find_command_name_length): Make it extern.
6270         * cli/cli-decode.h (find_command_name_length): Declare.
6271         * cli/cli-script.c (command_name_equals, line_first_arg):
6272         New functions.
6273         (process_next_line): Use cli-decode to parse command names.
6274         (build_command_line): Make args a constant pointer.
6275
6276 2017-02-08  Jerome Guitton  <guitton@adacore.com>
6277
6278         * cli-decode.c (lookup_cmd_1, lookup_cmd_composition):
6279         Remove case-insensitive search.
6280
6281 2017-02-07  Jose E. Marchesi  <jose.marchesi@oracle.com>
6282
6283         * sparc-tdep.c (sparc32_gdbarch_init): Do not place a + operator
6284         at the end of the line.  Avoids an ARI warning.
6285
6286 2017-02-06  Luis Machado  <lgustavo@codesourcery.com>
6287
6288         * NEWS: Mention support for record/replay of Intel 64 rdrand and
6289         rdseed instructions.
6290         i386-tdep.c (i386_process_record): Handle Intel 64 rdrand and rseed.
6291
6292 2017-02-06  Ivo Raisr  <ivo.raisr@oracle.com>
6293
6294         PR tdep/20936
6295         Provide and use sparc32 and sparc64 target description XML files.
6296         * features/sparc/sparc32-cp0.xml, features/sparc/sparc32-cpu.xml,
6297         features/sparc/sparc32-fpu.xml: New files for sparc 32-bit.
6298         * features/sparc/sparc64-cp0.xml, features/sparc/sparc64-cpu.xml,
6299         features/sparc/sparc64-fpu.xml: New files for sparc 64-bit.
6300         * features/sparc/sparc32-solaris.xml: New file.
6301         * features/sparc/sparc64-solaris.xml: New file.
6302         * features/sparc/sparc32-solaris.c: Generated.
6303         * features/sparc/sparc64-solaris.c: Generated.
6304         * sparc-tdep.h: Account for differences in target descriptions.
6305         * sparc-tdep.c (sparc32_register_name): Use target provided registers.
6306         (sparc32_register_type): Use target provided registers.
6307         (validate_tdesc_registers): New function.
6308         (sparc32_gdbarch_init): Use tdesc_has_registers.
6309         Set pseudoregister functions.
6310         * sparc64-tdep.c (sparc64_register_name): Use target provided registers.
6311         (sparc64_register_type): Use target provided registers.
6312         (sparc64_init_abi): Set pseudoregister functions.
6313
6314 2017-02-03  Tom Tromey  <tom@tromey.com>
6315
6316         PR rust/21097:
6317         * rust-lang.c (rust_print_type) <TYPE_CODE_UNION>: Handle enums
6318         with a single member.
6319
6320 2017-02-03  Pedro Alves  <palves@redhat.com>
6321
6322         * cli/cli-interp.c (cli_interp_base::cli_interp_base)
6323         (cli_interp_base::~cli_interp_base): New.
6324         (cli_interp): New struct.
6325         (as_cli_interp): Cast the interp itself to cli_interp.
6326         (cli_interpreter_pre_command_loop): Rename to ...
6327         (cli_interp_base::pre_command_loop): ... this.  Remove 'self'
6328         parameter.
6329         (cli_interpreter_init): Rename to ...
6330         (cli_interp::init): ... this.  Remove 'self' parameter.  Use
6331         boolean.  Make extern.
6332         (cli_interpreter_resume): Rename to ...
6333         (cli_interp::resume): ... this.  Remove 'data' parameter.  Make
6334         extern.
6335         (cli_interpreter_suspend): Rename to ...
6336         (cli_interp::suspend): ... this.  Remove 'data' parameter.  Make
6337         extern.
6338         (cli_interpreter_exec): Rename to ...
6339         (cli_interp::exec): ... this.  Remove 'data' parameter.  Make
6340         extern.
6341         (cli_interpreter_supports_command_editing): Rename to ...
6342         (cli_interp_base::supports_command_editing): ... this.  Remove
6343         'interp' parameter.  Make extern.
6344         (cli_ui_out): Rename to ...
6345         (cli_interp::interp_ui_out): ... this.  Remove 'interp' parameter.
6346         Make extern.
6347         (cli_set_logging): Rename to ...
6348         (cli_interp_base::set_logging): ... this.  Remove 'interp'
6349         parameter.  Make extern.
6350         (cli_interp_procs): Delete.
6351         (cli_interp_factory): Adjust to use "new".
6352         * cli/cli-interp.h: Include "interps.h".
6353         (struct cli_interp_base): New struct.
6354         * interps.c (struct interp): Delete.  Fields moved to interps.h.
6355         (interp_new): Delete.
6356         (interp::interp, interp::~interp): New.
6357         (interp_set): Use bool, and return void.  Assume the interpreter
6358         has suspend, init and resume methods, and that the all return
6359         void.
6360         (set_top_level_interpreter): interp_set returns void.
6361         (interp_ui_out): Adapt.
6362         (current_interp_set_logging): Adapt.
6363         (interp_data): Delete.
6364         (interp_pre_command_loop, interp_supports_command_editing): Adapt.
6365         (interp_exec): Adapt.
6366         (top_level_interpreter_data): Delete.
6367         * interps.h (interp_init_ftype, interp_resume_ftype)
6368         (interp_suspend_ftype, interp_exec_ftype)
6369         (interp_pre_command_loop_ftype, interp_ui_out_ftype): Delete.
6370         (class interp): New.
6371         (interp_new): Delete.
6372         (interp_set): Now returns void.  Use bool.
6373         (interp_data, top_level_interpreter_data): Delete.
6374         * mi/mi-common.h: Include interps.h.
6375         (class mi_interp): Inherit from interp.  Define a ctor.  Declare
6376         init, resume, suspect, exec, interp_ui_out, set_logging and
6377         pre_command_loop methods.
6378         * mi/mi-interp.c (as_mi_interp): Cast the interp itself.
6379         (mi_interpreter_init): Rename to ...
6380         (mi_interp::init): ... this.  Remove the 'interp' parameter, use
6381         bool, return void and make extern.  Adjust.
6382         (mi_interpreter_resume): ... Rename to ...
6383         (mi_interp::resume): ... this.  Remove the 'data' parameter,
6384         return void and make extern.  Adjust.
6385         (mi_interpreter_suspend): ... Rename to ...
6386         (mi_interp::suspend): ... this.  Remove the 'data' parameter,
6387         return void and make extern.  Adjust.
6388         (mi_interpreter_exec): ... Rename to ...
6389         (mi_interp::exec): ... this.  Remove the 'data' parameter and make
6390         extern.  Adjust.
6391         (mi_interpreter_pre_command_loop): ... Rename to ...
6392         (mi_interp::pre_command_loop): ... this.  Remove the 'self'
6393         parameter and make extern.
6394         (mi_on_normal_stop_1): Adjust.
6395         (mi_ui_out): Rename to ...
6396         (mi_interp::interp_ui_out): ... this.  Remove the 'interp'
6397         parameter and make extern.  Adjust.
6398         (mi_set_logging): Rename to ...
6399         (mi_interp::set_logging): ... this.  Remove the 'interp'
6400         parameter and make extern.  Adjust.
6401         (mi_interp_procs): Delete.
6402         (mi_interp_factory): Adjust to use 'new'.
6403         * mi/mi-main.c (mi_cmd_gdb_exit, captured_mi_execute_command)
6404         (mi_print_exception, mi_execute_command, mi_load_progress):
6405         Adjust.
6406         * tui/tui-interp.c (tui_interp): New class.
6407         (as_tui_interp): Return a tui_interp pointer.
6408         (tui_on_normal_stop, tui_on_signal_received)
6409         (tui_on_end_stepping_range, tui_on_signal_exited, tui_on_exited)
6410         (tui_on_no_history, tui_on_user_selected_context_changed): Adjust
6411         to use interp::interp_ui_out.
6412         (tui_init): Rename to ...
6413         (tui_interp::init): ... this.  Remove the 'self' parameter, use
6414         bool, return void and make extern.  Adjust.
6415         (tui_resume): Rename to ...
6416         (tui_interp::resume): ... this.  Remove the 'data' parameter,
6417         return void and make extern.  Adjust.
6418         (tui_suspend): Rename to ...
6419         (tui_interp::suspend): ... this.  Remove the 'data' parameter,
6420         return void and make extern.  Adjust.
6421         (tui_ui_out): Rename to ...
6422         (tui_interp::interp_ui_out): ... this.  Remove the 'self'
6423         parameter, and make extern.  Adjust.
6424         (tui_exec): Rename to ...
6425         (tui_interp::exec): ... this.  Remove the 'data' parameter and
6426         make extern.
6427         (tui_interp_procs): Delete.
6428         (tui_interp_factory): Use "new".
6429
6430 2017-02-02  Tom Tromey  <tom@tromey.com>
6431
6432         * rust-exp.y (ends_raw_string, space_then_number)
6433         (rust_identifier_start_p): Return bool.
6434         * rust-lang.c (rust_tuple_type_p, rust_underscore_fields)
6435         (rust_tuple_struct_type_p, rust_tuple_variant_type_p)
6436         (rust_slice_type_p, rust_range_type_p, rust_u8_type_p)
6437         (rust_chartype_p): Return bool.
6438         (val_print_struct, rust_print_struct_def, rust_print_type):
6439         Update.
6440         * rust-lang.h (rust_tuple_type_p, rust_tuple_struct_type_p):
6441         Return bool.
6442
6443 2017-02-02  Tom Tromey  <tom@tromey.com>
6444
6445         * rust-lang.c: Reindent.
6446
6447 2017-02-02  Tom Tromey  <tom@tromey.com>
6448
6449         * rust-lang.h (rust_crate_for_block): Update.
6450         * rust-lang.c (rust_crate_for_block): Return std::string.
6451         (rust_get_disr_info): Use std:;string, not
6452         gdb::unique_xmalloc_ptr.
6453         * rust-exp.y (crate_name): Update.
6454
6455 2017-02-02  Pedro Alves  <palves@redhat.com>
6456
6457         * disasm-selftests.c (print_one_insn_test): Move the "verbose"
6458         field out of gdb_disassembler_test and make it static.
6459
6460 2017-02-02  Pedro Alves  <palves@redhat.com>
6461
6462         * mi/mi-common.h (struct mi_interp): Delete the mi2_interp,
6463         mi1_interp and mi_interp fields.
6464
6465 2017-02-02  Pedro Alves  <palves@redhat.com>
6466
6467         * cli/cli-interp.c (struct saved_output_files, saved_output):
6468         Moved from cli/cli-logging.c.
6469         (cli_set_logging): New function.
6470         (cli_interp_procs): Install cli_set_logging.
6471         * cli/cli-interp.h (make_logging_output, cli_set_logging):
6472         Declare.
6473         * cli/cli-logging.c (struct saved_output_files, saved_output):
6474         Moved to cli/cli-interp.c.
6475         (pop_output_files): Don't save outputs here.
6476         (make_logging_output): New function.
6477         (handle_redirections): Don't build tee nor save previous outputs
6478         here.
6479         * interps.c (current_interp_set_logging): Change prototype.
6480         Assume there's always a set_logging_proc method installed.
6481         * interps.h (interp_set_logging_ftype): Change prototype.
6482         (current_interp_set_logging): Change prototype and adjust comment.
6483         * mi/mi-interp.c (mi_set_logging): Change protototype.  Adjust to
6484         use make_logging_output.
6485         * tui/tui-interp.c (tui_interp_procs): Install cli_set_logging.
6486 2017-02-02  Pedro Alves  <palves@redhat.com>
6487
6488         * cli/cli-logging.c (maybe_warn_already_logging): New factored out
6489         from ...
6490         (set_logging_overwrite): ... here.
6491         (logging_no_redirect_file): Delete.
6492         (set_logging_redirect): Don't handle redirection on the fly.
6493         Instead warn that "logging off" / "logging on" is necessary.
6494         (pop_output_files): Delete references to logging_no_redirect_file.
6495         (show_logging_command): Always speak in terms of what will happen
6496         once logging is reenabled.
6497
6498 2017-02-02  Pedro Alves  <palves@redhat.com>
6499
6500         * disasm.h (gdb_pretty_print_disassembler): Tweak intro comment.
6501
6502 2017-02-02  Pedro Alves  <palves@redhat.com>
6503
6504         * disasm.c (gdb_pretty_print_insn): Rename to ...
6505         (gdb_pretty_print_disassembler::pretty_print_insn): ... this.
6506         Remove gdbarch parameter.  Adapt to clear the object's buffers
6507         instead of allocating new buffers, and to print using the object's
6508         gdb_disassembler instead of calling gdb_print_insn.
6509         (dump_insns): Use gdb_pretty_print_disassembler.
6510         * disasm.h (gdb_pretty_print_insn): Delete declaration.
6511         (gdb_pretty_print_disassembler): New class.
6512         * record-btrace.c (btrace_insn_history): Use
6513         gdb_pretty_print_disassembler.
6514
6515 2017-02-02  Pedro Alves  <palves@redhat.com>
6516
6517         * ada-lang.c (type_as_string): Use string_file.
6518         * ada-valprint.c (ada_print_floating): Use string_file.
6519         * ada-varobj.c (ada_varobj_scalar_image)
6520         (ada_varobj_get_value_image): Use string_file.
6521         * aix-thread.c (aix_thread_extra_thread_info): Use string_file.
6522         * arm-tdep.c (_initialize_arm_tdep): Use string_printf.
6523         * breakpoint.c (update_inserted_breakpoint_locations)
6524         (insert_breakpoint_locations, reattach_breakpoints)
6525         (print_breakpoint_location, print_one_detail_ranged_breakpoint)
6526         (print_it_watchpoint): Use string_file.
6527         (save_breakpoints): Use stdio_file.
6528         * c-exp.y (oper): Use string_file.
6529         * cli/cli-logging.c (set_logging_redirect): Use ui_file_up and
6530         tee_file.
6531         (pop_output_files): Use delete.
6532         (handle_redirections): Use stdio_file and tee_file.
6533         * cli/cli-setshow.c (do_show_command): Use string_file.
6534         * compile/compile-c-support.c (c_compute_program): Use
6535         string_file.
6536         * compile/compile-c-symbols.c (generate_vla_size): Take a
6537         'string_file &' instead of a 'ui_file *'.
6538         (generate_c_for_for_one_variable): Take a 'string_file &' instead
6539         of a 'ui_file *'.  Use string_file.
6540         (generate_c_for_variable_locations): Take a 'string_file &'
6541         instead of a 'ui_file *'.
6542         * compile/compile-internal.h (generate_c_for_for_one_variable):
6543         Take a 'string_file &' instead of a 'ui_file *'.
6544         * compile/compile-loc2c.c (push, pushf, unary, binary)
6545         (print_label, pushf_register_address, pushf_register)
6546         (do_compile_dwarf_expr_to_c): Take a 'string_file &' instead of a
6547         'ui_file *'.  Adjust.
6548         * compile/compile.c (compile_to_object): Use string_file.
6549         * compile/compile.h (compile_dwarf_expr_to_c)
6550         (compile_dwarf_bounds_to_c): Take a 'string_file &' instead of a
6551         'ui_file *'.
6552         * cp-support.c (inspect_type): Use string_file and obstack_copy0.
6553         (replace_typedefs_qualified_name): Use string_file and
6554         obstack_copy0.
6555         * disasm.c (gdb_pretty_print_insn): Use string_file.
6556         (gdb_disassembly): Adjust reference the null_stream global.
6557         (do_ui_file_delete): Delete.
6558         (gdb_insn_length): Use null_stream.
6559         * dummy-frame.c (maintenance_print_dummy_frames): Use stdio_file.
6560         * dwarf2loc.c (dwarf2_compile_property_to_c)
6561         (locexpr_generate_c_location, loclist_generate_c_location): Take a
6562         'string_file &' instead of a 'ui_file *'.
6563         * dwarf2loc.h (dwarf2_compile_property_to_c): Likewise.
6564         * dwarf2read.c (do_ui_file_peek_last): Delete.
6565         (dwarf2_compute_name): Use string_file.
6566         * event-top.c (gdb_setup_readline): Use stdio_file.
6567         * gdbarch.sh (verify_gdbarch): Use string_file.
6568         * gdbtypes.c (safe_parse_type): Use null_stream.
6569         * guile/scm-breakpoint.c (gdbscm_breakpoint_commands): Use
6570         string_file.
6571         * guile/scm-disasm.c (gdbscm_print_insn_from_port): Take a
6572         'string_file *' instead of a 'ui_file *'.
6573         (gdbscm_arch_disassemble): Use string_file.
6574         * guile/scm-frame.c (frscm_print_frame_smob): Use string_file.
6575         * guile/scm-ports.c (class ioscm_file_port): Now a class that
6576         inherits from ui_file.
6577         (ioscm_file_port_delete, ioscm_file_port_rewind)
6578         (ioscm_file_port_put): Delete.
6579         (ioscm_file_port_write): Rename to ...
6580         (ioscm_file_port::write): ... this.  Remove file_port_magic
6581         checks.
6582         (ioscm_file_port_new): Delete.
6583         (ioscm_with_output_to_port_worker): Use ioscm_file_port and
6584         ui_file_up.
6585         * guile/scm-type.c (tyscm_type_name): Use string_file.
6586         * guile/scm-value.c (vlscm_print_value_smob, gdbscm_value_print):
6587         Use string_file.
6588         * infcmd.c (print_return_value_1): Use string_file.
6589         * infrun.c (print_target_wait_results): Use string_file.
6590         * language.c (add_language): Use string_file.
6591         * location.c (explicit_to_string_internal): Use string_file.
6592         * main.c (captured_main_1): Use null_file.
6593         * maint.c (maintenance_print_architecture): Use stdio_file.
6594         * mi/mi-cmd-stack.c (list_arg_or_local): Use string_file.
6595         * mi/mi-common.h (struct mi_interp) <out, err, log, targ,
6596         event_channel>: Change type to mi_console_file pointer.
6597         * mi/mi-console.c (mi_console_file_fputs, mi_console_file_flush)
6598         (mi_console_file_delete): Delete.
6599         (struct mi_console_file): Delete.
6600         (mi_console_file_magic): Delete.
6601         (mi_console_file_new): Delete.
6602         (mi_console_file::mi_console_file): New.
6603         (mi_console_file_delete): Delete.
6604         (mi_console_file_fputs): Delete.
6605         (mi_console_file::write): New.
6606         (mi_console_raw_packet): Delete.
6607         (mi_console_file::flush): New.
6608         (mi_console_file_flush): Delete.
6609         (mi_console_set_raw): Rename to ...
6610         (mi_console_file::set_raw): ... this.
6611         * mi/mi-console.h (class mi_console_file): New class.
6612         (mi_console_file_new, mi_console_set_raw): Delete.
6613         * mi/mi-interp.c (mi_interpreter_init): Use mi_console_file.
6614         (mi_set_logging): Use delete and tee_file.  Adjust.
6615         * mi/mi-main.c (output_register): Use string_file.
6616         (mi_cmd_data_evaluate_expression): Use string_file.
6617         (mi_cmd_data_read_memory): Use string_file.
6618         (mi_cmd_execute, print_variable_or_computed): Use string_file.
6619         * mi/mi-out.c (mi_ui_out::main_stream): New.
6620         (mi_ui_out::rewind): Use main_stream and
6621         string_file.
6622         (mi_ui_out::put): Use main_stream and string_file.
6623         (mi_ui_out::mi_ui_out): Remove 'stream' parameter.
6624         Allocate a 'string_file' instead.
6625         (mi_out_new): Don't allocate a mem_fileopen stream here.
6626         * mi/mi-out.h (mi_ui_out::mi_ui_out): Remove 'stream' parameter.
6627         (mi_ui_out::main_stream): Declare method.
6628         * printcmd.c (eval_command): Use string_file.
6629         * psymtab.c (maintenance_print_psymbols): Use stdio_file.
6630         * python/py-arch.c (archpy_disassemble): Use string_file.
6631         * python/py-breakpoint.c (bppy_get_commands): Use string_file.
6632         * python/py-frame.c (frapy_str): Use string_file.
6633         * python/py-framefilter.c (py_print_type, py_print_single_arg):
6634         Use string_file.
6635         * python/py-type.c (typy_str): Use string_file.
6636         * python/py-unwind.c (unwind_infopy_str): Use string_file.
6637         * python/py-value.c (valpy_str): Use string_file.
6638         * record-btrace.c (btrace_insn_history): Use string_file.
6639         * regcache.c (regcache_print): Use stdio_file.
6640         * reggroups.c (maintenance_print_reggroups): Use stdio_file.
6641         * remote.c (escape_buffer): Use string_file.
6642         * rust-lang.c (rust_get_disr_info): Use string_file.
6643         * serial.c (serial_open_ops_1): Use stdio_file.
6644         (do_serial_close): Use delete.
6645         * stack.c (print_frame_arg): Use string_file.
6646         (print_frame_args): Remove local mem_fileopen stream, not used.
6647         (print_frame): Use string_file.
6648         * symmisc.c (maintenance_print_symbols): Use stdio_file.
6649         * symtab.h (struct symbol_computed_ops) <generate_c_location>:
6650         Take a 'string_file *' instead of a 'ui_file *'.
6651         * top.c (new_ui): Use stdio_file and stderr_file.
6652         (free_ui): Use delete.
6653         (execute_command_to_string): Use string_file.
6654         (quit_confirm): Use string_file.
6655         * tracepoint.c (collection_list::append_exp): Use string_file.
6656         * tui/tui-disasm.c (tui_disassemble): Use string_file.
6657         * tui/tui-file.c: Don't include "ui-file.h".
6658         (enum streamtype, struct tui_stream): Delete.
6659         (tui_file_new, tui_file_delete, tui_fileopen, tui_sfileopen)
6660         (tui_file_isatty, tui_file_rewind, tui_file_put): Delete.
6661         (tui_file::tui_file): New method.
6662         (tui_file_fputs): Delete.
6663         (tui_file_get_strbuf): Delete.
6664         (tui_file::puts): New method.
6665         (tui_file_adjust_strbuf): Delete.
6666         (tui_file_flush): Delete.
6667         (tui_file::flush): New method.
6668         * tui/tui-file.h: Tweak intro comment.
6669         Include ui-file.h.
6670         (tui_fileopen, tui_sfileopen, tui_file_get_strbuf)
6671         (tui_file_adjust_strbuf): Delete declarations.
6672         (class tui_file): New class.
6673         * tui/tui-io.c (tui_initialize_io): Use tui_file.
6674         * tui/tui-regs.c (tui_restore_gdbout): Use delete.
6675         (tui_register_format): Use string_stream.
6676         * tui/tui-stack.c (tui_make_status_line): Use string_file.
6677         (tui_get_function_from_frame): Use string_file.
6678         * typeprint.c (type_to_string): Use string_file.
6679         * ui-file.c (struct ui_file, ui_file_magic, ui_file_new): Delete.
6680         (null_stream): New global.
6681         (ui_file_delete): Delete.
6682         (ui_file::ui_file): New.
6683         (null_file_isatty): Delete.
6684         (ui_file::~ui_file): New.
6685         (null_file_rewind): Delete.
6686         (ui_file::printf): New.
6687         (null_file_put): Delete.
6688         (null_file_flush): Delete.
6689         (ui_file::putstr): New.
6690         (null_file_write): Delete.
6691         (ui_file::putstrn): New.
6692         (null_file_read): Delete.
6693         (ui_file::putc): New.
6694         (null_file_fputs): Delete.
6695         (null_file_write_async_safe): Delete.
6696         (ui_file::vprintf): New.
6697         (null_file_delete): Delete.
6698         (null_file::write): New.
6699         (null_file_fseek): Delete.
6700         (null_file::puts): New.
6701         (ui_file_data): Delete.
6702         (null_file::write_async_safe): New.
6703         (gdb_flush, ui_file_isatty): Adjust.
6704         (ui_file_put, ui_file_rewind): Delete.
6705         (ui_file_write): Adjust.
6706         (ui_file_write_for_put): Delete.
6707         (ui_file_write_async_safe, ui_file_read): Adjust.
6708         (ui_file_fseek): Delete.
6709         (fputs_unfiltered): Adjust.
6710         (set_ui_file_flush, set_ui_file_isatty, set_ui_file_rewind)
6711         (set_ui_file_put, set_ui_file_write, set_ui_file_write_async_safe)
6712         (set_ui_file_read, set_ui_file_fputs, set_ui_file_fseek)
6713         (set_ui_file_data): Delete.
6714         (string_file::~string_file, string_file::write)
6715         (struct accumulated_ui_file, do_ui_file_xstrdup, ui_file_xstrdup)
6716         (do_ui_file_as_string, ui_file_as_string): Delete.
6717         (do_ui_file_obsavestring, ui_file_obsavestring): Delete.
6718         (struct mem_file): Delete.
6719         (mem_file_new): Delete.
6720         (stdio_file::stdio_file): New.
6721         (mem_file_delete): Delete.
6722         (stdio_file::stdio_file): New.
6723         (mem_fileopen): Delete.
6724         (stdio_file::~stdio_file): New.
6725         (mem_file_rewind): Delete.
6726         (stdio_file::set_stream): New.
6727         (mem_file_put): Delete.
6728         (stdio_file::open): New.
6729         (mem_file_write): Delete.
6730         (stdio_file_magic, struct stdio_file): Delete.
6731         (stdio_file_new, stdio_file_delete, stdio_file_flush): Delete.
6732         (stdio_file::flush): New.
6733         (stdio_file_read): Rename to ...
6734         (stdio_file::read): ... this.  Adjust.
6735         (stdio_file_write): Rename to ...
6736         (stdio_file::write): ... this.  Adjust.
6737         (stdio_file_write_async_safe): Rename to ...
6738         (stdio_file::write_async_safe) ... this.  Adjust.
6739         (stdio_file_fputs): Rename to ...
6740         (stdio_file::puts) ... this.  Adjust.
6741         (stdio_file_isatty): Delete.
6742         (stdio_file_fseek): Delete.
6743         (stdio_file::isatty): New.
6744         (stderr_file_write): Rename to ...
6745         (stderr_file::write) ... this.  Adjust.
6746         (stderr_file_fputs): Rename to ...
6747         (stderr_file::puts) ... this.  Adjust.
6748         (stderr_fileopen, stdio_fileopen, gdb_fopen): Delete.
6749         (stderr_file::stderr_file): New.
6750         (tee_file_magic): Delete.
6751         (struct tee_file): Delete.
6752         (tee_file::tee_file): New.
6753         (tee_file_new): Delete.
6754         (tee_file::~tee_file): New.
6755         (tee_file_delete): Delete.
6756         (tee_file_flush): Rename to ...
6757         (tee_file::flush): ... this.  Adjust.
6758         (tee_file_write): Rename to ...
6759         (tee_file::write): ... this.  Adjust.
6760         (tee_file::write_async_safe): New.
6761         (tee_file_fputs): Rename to ...
6762         (tee_file::puts): ... this.  Adjust.
6763         (tee_file_isatty): Rename to ...
6764         (tee_file::isatty): ... this.  Adjust.
6765         * ui-file.h (struct obstack, struct ui_file): Don't
6766         forward-declare.
6767         (ui_file_new, ui_file_flush_ftype, set_ui_file_flush)
6768         (ui_file_write_ftype)
6769         (set_ui_file_write, ui_file_fputs_ftype, set_ui_file_fputs)
6770         (ui_file_write_async_safe_ftype, set_ui_file_write_async_safe)
6771         (ui_file_read_ftype, set_ui_file_read, ui_file_isatty_ftype)
6772         (set_ui_file_isatty, ui_file_rewind_ftype, set_ui_file_rewind)
6773         (ui_file_put_method_ftype, ui_file_put_ftype, set_ui_file_put)
6774         (ui_file_delete_ftype, set_ui_file_data, ui_file_fseek_ftype)
6775         (set_ui_file_fseek): Delete.
6776         (ui_file_data, ui_file_delete, ui_file_rewind)
6777         (struct ui_file): New.
6778         (ui_file_up): New.
6779         (class null_file): New.
6780         (null_stream): Declare.
6781         (ui_file_write_for_put, ui_file_put): Delete.
6782         (ui_file_xstrdup, ui_file_as_string, ui_file_obsavestring):
6783         Delete.
6784         (ui_file_fseek, mem_fileopen, stdio_fileopen, stderr_fileopen)
6785         (gdb_fopen, tee_file_new): Delete.
6786         (struct string_file): New.
6787         (struct stdio_file): New.
6788         (stdio_file_up): New.
6789         (struct stderr_file): New.
6790         (class tee_file): New.
6791         * ui-out.c (ui_out::field_stream): Take a 'string_file &' instead
6792         of a 'ui_file *'.  Adjust.
6793         * ui-out.h (class ui_out) <field_stream>: Likewise.
6794         * utils.c (do_ui_file_delete, make_cleanup_ui_file_delete)
6795         (null_stream): Delete.
6796         (error_stream): Take a 'string_file &' instead of a 'ui_file *'.
6797         Adjust.
6798         * utils.h (struct ui_file): Delete forward declaration..
6799         (make_cleanup_ui_file_delete, null_stream): Delete declarations.
6800         (error_stream): Take a 'string_file &' instead of a
6801         'ui_file *'.
6802         * varobj.c (varobj_value_get_print_value): Use string_file.
6803         * xtensa-tdep.c (xtensa_verify_config): Use string_file.
6804         * gdbarch.c: Regenerate.
6805
6806 2017-02-02  Pedro Alves  <palves@redhat.com>
6807
6808         * disasm.c (gdb_disassembler::pretty_print_insn): Rename to...
6809         (gdb_pretty_print_insn): ... this.  Now a free function.  Add back
6810         a 'gdbarch' parameter.  Allocate a mem_fileopen stream here.
6811         Adjust to call gdb_print_insn instead of
6812         gdb_disassembler::print_insn.
6813         (dump_insns, do_mixed_source_and_assembly_deprecated)
6814         (do_mixed_source_and_assembly, do_assembly_only): Add back a
6815         'gdbarch' parameter.  Remove gdb_disassembler parameter.
6816         (gdb_disassembly): Don't allocate a gdb_disassembler here.
6817         * disasm.h (gdb_disassembler::pretty_print_insn): Delete
6818         declaration.
6819         (gdb_pretty_print_insn): Re-add declaration.
6820         * record-btrace.c (btrace_insn_history): Don't allocate a
6821         gdb_disassembler here.  Adjust to call gdb_pretty_print_insn.
6822
6823 2017-02-01  Simon Marchi  <simon.marchi@polymtl.ca>
6824
6825         * disasm.h (gdb_disassembly): Remove file_string parameter.
6826         * disasm.c (gdb_disassembly): Likewise.
6827         * cli/cli-cmds.c (print_disassembly): Adapt.
6828         * mi/mi-cmd-disas.c (mi_cmd_disassemble): Likewise.
6829         * stack.c (do_gdb_disassembly): Likewise.
6830
6831 2017-02-01  Andreas Arnez  <arnez@linux.vnet.ibm.com>
6832
6833         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): For
6834         DWARF_VALUE_LITERAL, no longer ignore the offset on big-endian
6835         targets.  And if the implicit value is longer than needed, extract
6836         the first bytes instead of the "least significant" ones.
6837
6838 2017-02-01  Markus Metzger  <markus.t.metzger@intel.com>
6839
6840         * btrace.c (btrace_enable): Do not call btrace_add_pc for
6841         BTRACE_FORMAT_PT or if can_access_registers_ptid returns false.
6842         (btrace_fetch): Assert can_access_registers_ptid.
6843         * record-btrace.c (require_btrace_thread, record_btrace_info): Call
6844         validate_registers_access.
6845
6846 2017-02-01  Markus Metzger  <markus.t.metzger@intel.com>
6847
6848         * gdbthread.h (can_access_registers_ptid): New.
6849         * thread.c (can_access_registers_ptid): New.
6850
6851 2017-02-01  Pedro Alves  <palves@redhat.com>
6852
6853         * i386-tdep.c (i386_fast_tracepoint_valid_at): Use gdb_insn_length.
6854
6855 2017-01-31  Pedro Alves  <palves@redhat.com>
6856
6857         * mi/mi-interp.c (mi_breakpoint_created, mi_breakpoint_modified):
6858         Fix typos.
6859
6860 2017-01-31  Pedro Alves  <palves@redhat.com>
6861
6862         * stack.c (print_frame_args): Remove local mem_fileopen stream,
6863         not used.
6864
6865 2017-01-31  Pedro Alves  <palves@redhat.com>
6866
6867         * varobj.c (varobj_value_get_print_value): Remove xstrdup call.
6868
6869 2017-01-31  Pedro Alves  <palves@redhat.com>
6870
6871         * common/scoped_restore.h
6872         (scoped_restore_tmpl::scoped_restore_tmpl): Template on T2, and
6873         change the value's parameter type to T2.
6874         (make_scoped_restore): Likewise.
6875
6876 2017-01-27  Walfred Tedeschi  <walfred.tedeschi@intel.com>
6877             Richard Henderson  <rth@redhat.com>
6878
6879         * amd64-linux-nat.c (PTRACE_ARCH_PRCTL): New define.
6880         (amd64_linux_fetch_inferior_registers): Add case to fetch FS_BASE
6881         GS_BASE for older kernels.
6882         (amd64_linux_store_inferior_registers): Add case to store FS_BASE
6883         GS_BASE for older kernels.
6884         * amd64-linux-tdep.c (amd64_linux_gregset_reg_offset): Add FS_BASE
6885         and GS_BASE to the offset table.
6886         (amd64_linux_register_reggroup_p): Add FS_BASE and GS_BASE to the
6887         system register group.
6888         * amd64-nat.c (amd64_native_gregset_reg_offset): Implements case
6889         for older kernels.
6890         * amd64-tdep.c (amd64_init_abi): Add segment registers for the
6891         amd64 ABI.
6892         * amd64-tdep.h (amd64_regnum): Add AMD64_FSBASE_REGNUM and
6893         AMD64_GSBASE_REGNUM.
6894         (AMD64_NUM_REGS): Set to AMD64_GSBASE_REGNUM + 1.
6895         * features/Makefile (amd64-linux.dat, amd64-avx-linux.dat)
6896         (amd64-mpx-linux.dat, amd64-avx512-linux.dat, x32-linux.dat)
6897         (x32-avx-linux.dat, x32-avx512-linux.dat): Add
6898         i386/64bit-segments.xml in those rules.
6899         * features/i386/64bit-segments.xml: New file.
6900         * features/i386/amd64-avx-mpx-linux.xml: Add 64bit-segments.xml.
6901         * features/i386/amd64-avx-linux.xml: Add 64bit-segments.xml.
6902         * features/i386/amd64-avx512-linux.xml: Add 64bit-segments.xml.
6903         * features/i386/amd64-mpx-linux.xml: Add 64bit-segments.xml.
6904         * features/i386/x32-avx512-linux.xml: Add 64bit-segments.xml.
6905         * features/i386/x32-avx-linux.xml: Add 64bit-segments.xml.
6906         * features/i386/amd64-linux.xml: Add 64bit-segments.xml.
6907         * features/i386/amd64-avx-linux.c: Regenerated.
6908         * features/i386/amd64-avx-mpx-linux.c: Regenerated.
6909         * features/i386/amd64-avx-mpx.c: Regenerated.
6910         * features/i386/amd64-avx512-linux.c: Regenerated.
6911         * features/i386/amd64-linux.c: Regenerated.
6912         * features/i386/amd64-mpx-linux.c: Regenerated.
6913         * features/i386/i386-avx-mpx-linux.c: Regenerated.
6914         * features/i386/i386-avx-mpx.c: Regenerated.
6915         * features/i386/x32-avx-linux.c: Regenerated.
6916         * features/i386/x32-avx512-linux.c: Regenerated.
6917         * regformats/i386/amd64-avx-linux.dat: Regenerated.
6918         * regformats/i386/amd64-avx-mpx-linux.dat: Regenerated.
6919         * regformats/i386/amd64-avx512-linux.dat: Regenerated.
6920         * regformats/i386/amd64-linux.dat: Regenerated.
6921         * regformats/i386/amd64-mpx-linux.dat: Regenerated.
6922         * regformats/i386/x32-avx-linux.dat: Regenerated.
6923         * regformats/i386/x32-avx512-linux.dat: Regenerated.
6924         * regformats/i386/x32-linux.dat: Regenerated.
6925
6926 2017-01-27  Walfred Tedeschi  <walfred.tedeschi@intel.com>
6927
6928         * amd64-linux-tdep.h (AMD64_LINUX_ORIG_RAX_REGNUM):
6929         Set to AMD64_NUM_REGS.
6930
6931 2017-01-27  Walfred Tedeschi  <walfred.tedeschi@intel.com>
6932
6933         * amd64-nat.c (amd64_native_gregset_reg_offset): Simplify logic
6934         that checks validity of a register number.
6935
6936 2017-01-27  Kees Cook  <keescook@google.com>
6937
6938         * gdb/arm-linux-nat.c (arm_linux_fetch_inferior_registers): Call
6939         fetch_fpregs if target has fpa registers.
6940         (arm_linux_store_inferior_registers): Call store_fpregs if target
6941         has fpa registers.
6942
6943 2017-01-26  Andreas Arnez  <arnez@linux.vnet.ibm.com>
6944
6945         * cris-tdep.c (cris_gdbarch_init): Remove check for
6946         info.byte_order and force it to BFD_ENDIAN_LITTLE.
6947
6948 2017-01-26  Antoine Tremblay  <antoine.tremblay@ericsson.com>
6949
6950         * corelow.c (get_core_register_section): Check for regset
6951         existence before checking for REGSET_VARIABLE_SIZE.
6952
6953 2017-01-26  Yao Qi  <yao.qi@linaro.org>
6954             Pedro Alves  <palves@redhat.com>
6955
6956         PR gdb/20939
6957         * disasm.c (gdb_disassembler::dis_asm_memory_error): Don't
6958         call memory_error, save memaddr instead.
6959         (gdb_disassembler::print_insn): If gdbarch_print_insn returns
6960         negative, cal memory_error.
6961         * disasm.h (gdb_disassembler) <m_err_memaddr>: New field.
6962
6963 2017-01-26  Yao Qi  <yao.qi@linaro.org>
6964
6965         * disasm-selftests.c (memory_error_test): New function.
6966         (_initialize_disasm_selftests): Register memory_error_test.
6967
6968 2017-01-26  Yao Qi  <yao.qi@linaro.org>
6969
6970         * Makefile.in (SFILES): Add disasm-selftests.c and
6971         selftest-arch.c.
6972         (COMMON_OBS): Add disasm-selftests.o and selftest-arch.o.
6973         * disasm-selftests.c: New file.
6974         * selftest-arch.c: New file.
6975         * selftest-arch.h: New file.
6976
6977 2017-01-26  Yao Qi  <yao.qi@linaro.org>
6978
6979         * mep-tdep.c (mep_gdb_print_insn): Set info->arch
6980         to bfd_arch_mep.  Don't return 0 if section is not
6981         found.  Call print_insn_mep.
6982
6983 2017-01-26  Pedro Alves  <palves@redhat.com>
6984             Yao Qi  <yao.qi@linaro.org>
6985
6986         * arm-tdep.c: Include "disasm.h".
6987         (gdb_print_insn_arm): Update code to get gdbarch.
6988         * disasm.c (dis_asm_read_memory): Change it to
6989         gdb_disassembler::dis_asm_read_memory.
6990         (dis_asm_memory_error): Likewise.
6991         (dis_asm_print_address): Likewise.
6992         (gdb_pretty_print_insn): Change it to
6993         gdb_disassembler::pretty_print_insn.
6994         (dump_insns): Add one argument gdb_disassemlber.  All
6995         callers updated.
6996         (do_mixed_source_and_assembly_deprecated): Likewise.
6997         (do_mixed_source_and_assembly): Likewise.
6998         (do_assembly_only): Likewise.
6999         (gdb_disassembler::gdb_disassembler): New.
7000         (gdb_disassembler::print_insn): New.
7001         * disasm.h (class gdb_disassembler): New.
7002         (gdb_pretty_print_insn): Remove declaration.
7003         (gdb_disassemble_info): Likewise.
7004         * guile/scm-disasm.c (class gdbscm_disassembler): New.
7005         (gdbscm_disasm_read_memory_worker): Update.
7006         (gdbscm_disasm_read_memory): Update.
7007         (gdbscm_disasm_memory_error): Remove.
7008         (gdbscm_disasm_print_address): Remove.
7009         (gdbscm_disassembler::gdbscm_disassembler): New.
7010         (gdbscm_print_insn_from_port): Update.
7011         * mips-tdep.c: Include disasm.h.
7012         (gdb_print_insn_mips): Update code to get gdbarch.
7013         * record-btrace.c (btrace_insn_history): Update.
7014         * spu-tdep.c: Include disasm.h.
7015         (struct spu_dis_asm_data): Remove.
7016         (struct spu_dis_asm_info): New.
7017         (spu_dis_asm_print_address): Use spu_dis_asm_info to get
7018         SPU id.
7019         (gdb_print_insn_spu): Cast disassemble_info to
7020         spu_dis_asm_info.
7021
7022 2017-01-26  Yao Qi  <yao.qi@linaro.org>
7023
7024         * disasm.c (do_ui_file_delete): Delete.
7025         (gdb_insn_length): Move code creating stream to ...
7026         * utils.c (null_stream): ... here.  New function.
7027         * utils.h (null_stream): Declare.
7028
7029 2017-01-23  Simon Marchi  <simon.marchi@polymtl.ca>
7030
7031         * python/py-inferior.c (find_thread_object): Return directly
7032         from the loop.  Remove "found" variable.
7033
7034 2017-01-21  Joel Brobecker  <brobecker@adacore.com>
7035
7036         GDB 7.12.1 released.
7037
7038 2017-01-20  Simon Marchi  <simon.marchi@ericsson.com>
7039
7040         * python/py-function.c (fnpy_call): Reorder declarations to have
7041         the gdbpy_enter object declared first.
7042         * python/py-xmethods.c (gdbpy_get_xmethod_arg_types): Likewise.
7043
7044 2017-01-20  Simon Marchi  <simon.marchi@ericsson.com>
7045
7046         PR python/21068
7047         * python/python-internal.h (PyMem_RawMalloc): Define for
7048         Python < 3.4.
7049         * python/py-gdb-readline.c (gdbpy_readline_wrapper): Use
7050         PyMem_RawMalloc instead of PyMem_Malloc.
7051
7052 2017-01-20  Mike Wrighton  <mike_wrighton@codesourcery.com>
7053             Luis Machado  <lgustavo@codesourcery.com>
7054
7055         * NEWS (New commands): Mention flash-erase.
7056         (New MI commands): Mention target-flash-erase.
7057         * mi/mi-cmds.c (mi_cmd_target_flash_erase): Add target-flash-erase MI
7058         command.
7059         * mi/mi-cmds.h (mi_cmd_target_flash_erase): New declaration.
7060         * mi/mi-main.c (mi_cmd_target_flash_erase): New function.
7061         * target.c (flash_erase_command): New function.
7062         (initialize_targets): Add new flash-erase command.
7063         * target.h (flash_erase_command): New declaration.
7064
7065 2017-01-20  Joel Brobecker  <brobecker@adacore.com>
7066
7067         * nat/linux-ptrace.c: Only include <sys/procfs.h> if
7068         HAVE_SYS_PROCFS_H is defined.
7069
7070 2017-01-18  Alan Hayward  <alan.hayward@arm.com>
7071
7072         * remote.c (struct cached_reg): Change data into a pointer.
7073         * (stop_reply_dtr): Free data pointers before deleting vector.
7074         (process_stop_reply): Likewise.
7075         (remote_parse_stop_reply): Allocate space for data
7076
7077 2017-01-18  Alan Hayward  <alan.hayward@arm.com>
7078
7079         * amd64-tdep.c (amd64_pseudo_register_read_value): remove
7080         MAX_REGISTER_SIZE.
7081         (amd64_pseudo_register_read_value): Likewise.
7082         * remote.c (fetch_register_using_p): Remove MAX_REGISTER_SIZE.
7083         (store_register_using_P): Likewise.
7084         * regcache.c (regcache_xfer_part): Likewise.
7085
7086 2017-01-16  Ivo Raisr  <ivo.raisr@oracle.com>
7087
7088         Split real and pseudo registers.
7089         * sparc-tdep.h (SPARC_CORE_REGISTERS): New macro.
7090         (sparc32_pseudo_regnum): New enum.
7091         * sparc64-tdep.h (sparc64_pseudo_regnum): New enum.
7092         * sparc-tdep.c (SPARC32_FPU_REGISTERS): New macro.
7093         (SPARC32_CP0_REGISTERS): New macro.
7094         (sparc32_pseudo_register_name): New function.
7095         (sparc32_register_name): Use sparc32_pseudo_register_name.
7096         (sparc32_pseudo_register_type): New function.
7097         (sparc32_register_type): Use sparc32_pseudo_register_type.
7098         (sparc32_pseudo_register_read, sparc32_pseudo_register_write): Handle
7099         pseudo register numbers.
7100         * sparc64-tdep.c SPARC64_FPU_REGISTERS): New macro.
7101         (SPARC64_CP0_REGISTERS): New macro.
7102         (sparc64_pseudo_register_name): New function.
7103         (sparc64_register_name): Use sparc64_pseudo_register_name.
7104         (sparc64_pseudo_register_type): New function.
7105         (sparc64_register_type): Use sparc64_pseudo_register_type.
7106         (sparc64_pseudo_register_read, sparc64_pseudo_register_write): Handle
7107         pseudo register numbers.
7108         (sparc64_store_floating_fields, sparc64_extract_floating_fields,
7109         sparc64_store_arguments): Handle pseudo register numbers.
7110
7111 2017-01-13  Yao Qi  <yao.qi@linaro.org>
7112
7113         * remote.c (REMOTE_DEBUG_MAX_CHAR): New macro.
7114         (putpkt_binary): Print only REMOTE_DEBUG_MAX_CHAR chars in debug
7115         output.
7116         (getpkt_or_notif_sane_1): Likewise.
7117
7118 2017-01-13  Yao Qi  <yao.qi@linaro.org>
7119
7120         * Makefile.in (checker-headers): Use CXX and CXX_DIALET instead
7121         of CC.  Pass "-x c++-header" instead of "-x c".
7122
7123 2017-01-12  Simon Marchi  <simon.marchi@ericsson.com>
7124
7125         * remote.c (remote_can_async_p): Update comment.
7126
7127 2017-01-12  Simon Marchi  <simon.marchi@ericsson.com>
7128
7129         * linux-nat.c (linux_nat_can_async_p): Update comment.
7130
7131 2017-01-12  Simon Marchi  <simon.marchi@ericsson.com>
7132
7133         * serial.c (serial_open): Forget about "pc" and "lpt" serial interface.
7134
7135 2017-01-11  Simon Marchi  <simon.marchi@ericsson.com>
7136
7137         * cli/cli-decode.c (lookup_cmd_1): Fix typo in comment.
7138
7139 2017-01-10  Tom Tromey  <tom@tromey.com>
7140
7141         * python/py-type.c (typy_legacy_template_argument): Update.
7142         * cp-support.h (struct demangle_parse_info) (demangle_parse_info,
7143         ~demangle_parse_info): Declare new members.
7144         (cp_demangled_name_to_comp): Return unique_ptr.
7145         (cp_demangled_name_parse_free)
7146         (make_cleanup_cp_demangled_name_parse_free)
7147         (cp_new_demangle_parse_info): Remove.
7148         * cp-support.c (do_demangled_name_parse_free_cleanup)
7149         (make_cleanup_cp_demangled_name_parse_free): Remove.
7150         (inspect_type, cp_canonicalize_string_full)
7151         (cp_canonicalize_string): Update.
7152         (mangled_name_to_comp): Change return type.
7153         (cp_class_name_from_physname, method_name_from_physname)
7154         (cp_func_name, cp_remove_params): Update.
7155         * cp-name-parser.y (demangle_parse_info): New constructor, from
7156         cp_new_demangle_parse_info.
7157         (~demangle_parse_info): New destructor, from
7158         cp_demangled_name_parse_free.
7159         (cp_merge_demangle_parse_infos): Update.
7160         (cp_demangled_name_to_comp): Change return type.
7161
7162 2017-01-10  Tom Tromey  <tom@tromey.com>
7163
7164         * top.c (prevent_dont_repeat): Change return type.
7165         * python/python.c (execute_gdb_command): Use std::string.
7166         Update.
7167         * guile/guile.c (gdbscm_execute_gdb_command): Update.
7168         * command.h (prevent_dont_repeat): Change return type.
7169         * breakpoint.c (bpstat_do_actions_1): Update.
7170
7171 2017-01-10  Tom Tromey  <tom@tromey.com>
7172
7173         * value.h (scoped_value_mark::~scoped_value_mark): Call
7174         free_to_mark.
7175         (scoped_value_mark::free_to_mark): New method.
7176         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Use
7177         scoped_value_mark.
7178
7179 2017-01-10  Tom Tromey  <tom@tromey.com>
7180
7181         * python/py-value.c (valpy_dereference, valpy_referenced_value)
7182         (valpy_reference_value, valpy_const_value, valpy_get_address)
7183         (valpy_get_dynamic_type, valpy_lazy_string, valpy_do_cast)
7184         (valpy_getitem, valpy_call, valpy_binop_throw, valpy_negative)
7185         (valpy_absolute, valpy_richcompare_throw): Use scoped_value_mark.
7186         * dwarf2loc.c (dwarf2_loc_desc_get_symbol_read_needs): Use
7187         scoped_value_mark.
7188         * dwarf2-frame.c (execute_stack_op): Use scoped_value_mark.
7189         * value.h (scoped_value_mark): New class.
7190
7191 2017-01-10  Tom Tromey  <tom@tromey.com>
7192
7193         * dwarf2read.c (dwarf2_build_psymtabs): Use psymtab_discarder.
7194         * psympriv.h (make_cleanup_discard_psymtabs): Don't declare.
7195         * psymtab.c (discard_psymtabs_upto): Remove.
7196         (make_cleanup_discard_psymtabs): Remove.
7197         (struct psymtab_state): Remove.
7198
7199 2017-01-10  Tom Tromey  <tom@tromey.com>
7200
7201         * record-full.c (record_full_save_cleanups): Remove.
7202         (record_full_save): Use gdb::unlinker.
7203         * gcore.c (do_bfd_delete_cleanup): Remove.
7204         (gcore_command): Use gdb::unlinker, unique_xmalloc_ptr.  Remove
7205         cleanups.
7206         * dwarf2read.c (unlink_if_set): Remove.
7207         (write_psymtabs_to_index): Use gdb::unlinker.
7208         * common/gdb_unlinker.h: New file.
7209
7210 2017-01-10  Tom Tromey  <tom@tromey.com>
7211
7212         * windows-tdep.c (windows_xfer_shared_library): Update.
7213         * windows-nat.c (windows_make_so): Update.
7214         * utils.h (make_cleanup_bfd_unref): Remove.
7215         * utils.c (do_bfd_close_cleanup, make_cleanup_bfd_unref): Remove.
7216         * symfile.h (symfile_bfd_open)
7217         (find_separate_debug_file_in_section): Return gdb_bfd_ref_ptr.
7218         * symfile.c (read_symbols, symbol_file_add)
7219         (separate_debug_file_exists): Update.
7220         (symfile_bfd_open): Return gdb_bfd_ref_ptr.
7221         (generic_load, reread_symbols): Update.
7222         * symfile-mem.c (symbol_file_add_from_memory): Update.
7223         * spu-linux-nat.c (spu_bfd_open): Return gdb_bfd_ref_ptr.
7224         (spu_symbol_file_add_from_memory): Update.
7225         * solist.h (struct target_so_ops) <bfd_open>: Return
7226         gdb_bfd_ref_ptr.
7227         (solib_bfd_fopen, solib_bfd_open): Return gdb_bfd_ref_ptr.
7228         * solib.c (solib_bfd_fopen, solib_bfd_open): Return
7229         gdb_bfd_ref_ptr.
7230         (solib_map_sections, reload_shared_libraries_1): Update.
7231         * solib-svr4.c (enable_break): Update.
7232         * solib-spu.c (spu_bfd_fopen): Return gdb_bfd_ref_ptr.
7233         * solib-frv.c (enable_break2): Update.
7234         * solib-dsbt.c (enable_break): Update.
7235         * solib-darwin.c (gdb_bfd_mach_o_fat_extract): Return
7236         gdb_bfd_ref_ptr.
7237         (darwin_solib_get_all_image_info_addr_at_init): Update.
7238         (darwin_bfd_open): Return gdb_bfd_ref_ptr.
7239         * solib-aix.c (solib_aix_bfd_open): Return gdb_bfd_ref_ptr.
7240         * record-full.c (record_full_save): Update.
7241         * python/py-objfile.c (objfpy_add_separate_debug_file): Update.
7242         * procfs.c (insert_dbx_link_bpt_in_file): Update.
7243         * minidebug.c (find_separate_debug_file_in_section): Return
7244         gdb_bfd_ref_ptr.
7245         * machoread.c (macho_add_oso_symfile): Change abfd to
7246         gdb_bfd_ref_ptr.
7247         (macho_symfile_read_all_oso): Update.
7248         (macho_check_dsym): Return gdb_bfd_ref_ptr.
7249         (macho_symfile_read): Update.
7250         * jit.c (bfd_open_from_target_memory): Return gdb_bfd_ref_ptr.
7251         (jit_bfd_try_read_symtab): Update.
7252         * gdb_bfd.h (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
7253         (gdb_bfd_openw, gdb_bfd_openr_iovec)
7254         (gdb_bfd_openr_next_archived_file, gdb_bfd_fdopenr): Return
7255         gdb_bfd_ref_ptr.
7256         (gdb_bfd_ref_policy): New struct.
7257         (gdb_bfd_ref_ptr): New typedef.
7258         * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
7259         (gdb_bfd_openw, gdb_bfd_openr_iovec)
7260         (gdb_bfd_openr_next_archived_file, gdb_bfd_fdopenr): Return
7261         gdb_bfd_ref_ptr.
7262         * gcore.h (create_gcore_bfd): Return gdb_bfd_ref_ptr.
7263         * gcore.c (create_gcore_bfd): Return gdb_bfd_ref_ptr.
7264         (gcore_command): Update.
7265         * exec.c (exec_file_attach): Update.
7266         * elfread.c (elf_symfile_read): Update.
7267         * dwarf2read.c (dwarf2_get_dwz_file): Update.
7268         (try_open_dwop_file, open_dwo_file): Return gdb_bfd_ref_ptr.
7269         (open_and_init_dwo_file): Update.
7270         (open_dwp_file): Return gdb_bfd_ref_ptr.
7271         (open_and_init_dwp_file): Update.
7272         * corelow.c (core_open): Update.
7273         * compile/compile-object-load.c (compile_object_load): Update.
7274         * common/gdb_ref_ptr.h (ref_ptr::operator->): New operator.
7275         * coffread.c (coff_symfile_read): Update.
7276         * cli/cli-dump.c (bfd_openr_or_error, bfd_openw_or_error): Return
7277         gdb_bfd_ref_ptr.  Rename.
7278         (dump_bfd_file, restore_command): Update.
7279         * build-id.h (build_id_to_debug_bfd): Return gdb_bfd_ref_ptr.
7280         * build-id.c (build_id_to_debug_bfd): Return gdb_bfd_ref_ptr.
7281         (find_separate_debug_file_by_buildid): Update.
7282
7283 2017-01-10  Tom Tromey  <tom@tromey.com>
7284
7285         * common/gdb_ref_ptr.h: New file.
7286         * python/py-ref.h (struct gdbpy_ref_policy): New.
7287         (gdbpy_ref): Now a typedef.
7288
7289 2017-01-10  Tom Tromey  <tom@tromey.com>
7290
7291         * utils.h (make_cleanup_htab_delete): Don't declare.
7292         * utils.c (do_htab_delete_cleanup, make_cleanup_htab_delete):
7293         Remove.
7294         * linespec.c (decode_compound_collector): Add constructor,
7295         destructor.
7296         (lookup_prefix_sym): Remove cleanup.
7297         (symtab_collector): Add constructor, destructor.
7298         (collect_symtabs_from_filename): Remove cleanup.
7299         * disasm.c (do_mixed_source_and_assembly): Use htab_up.
7300         * compile/compile-c-symbols.c (generate_c_for_variable_locations):
7301         Use htab_up.
7302         * gnu-v3-abi.c (gnuv3_print_vtable): Use htab_up.
7303         * dwarf2read.c (dw2_expand_symtabs_matching)
7304         (dw2_map_symbol_filenames, dwarf_decode_macros)
7305         (write_psymtabs_to_index): Use htab_up.
7306         * dwarf2loc.c (func_verify_no_selftailcall)
7307         (call_site_find_chain_1, func_verify_no_selftailcall)
7308         (chain_candidate, call_site_find_chain_1): Use std::unordered_set,
7309         std::vector, gdb::unique_xmalloc_ptr.
7310         (call_sitep): Remove typedef.
7311         (dwarf2_locexpr_baton_eval): Remove unused variable.
7312
7313 2017-01-10  Tom Tromey  <tom@tromey.com>
7314
7315         * python/python-internal.h (make_cleanup_py_decref)
7316         (make_cleanup_py_xdecref): Don't declare.
7317         * python/py-utils.c (py_decref, make_cleanup_py_decref)
7318         (py_xdecref, make_cleanup_py_xdecref): Remove.
7319
7320 2017-01-10  Tom Tromey  <tom@tromey.com>
7321
7322         * python/py-framefilter.c (py_mi_print_variables): Use gdbpy_ref.
7323         (py_print_locals, enumerate_locals, py_print_args): Use gdbpy_ref.
7324
7325 2017-01-10  Tom Tromey  <tom@tromey.com>
7326
7327         * python/py-framefilter.c (enumerate_args): Use gdbpy_ref.
7328
7329 2017-01-10  Tom Tromey  <tom@tromey.com>
7330
7331         * python/py-utils.c (unicode_to_encoded_string)
7332         (python_string_to_target_string)
7333         (python_string_to_target_python_string)
7334         (python_string_to_host_string, gdbpy_obj_to_string)
7335         (get_addr_from_python): Use gdbpy_ref.
7336
7337 2017-01-10  Tom Tromey  <tom@tromey.com>
7338
7339         * python/py-unwind.c (pyuw_object_attribute_to_pointer): Use
7340         gdbpy_ref.
7341
7342 2017-01-10  Tom Tromey  <tom@tromey.com>
7343
7344         * python/python.c (eval_python_command, gdbpy_decode_line)
7345         (gdbpy_run_events, gdbpy_start_type_printers)
7346         (gdbpy_apply_type_printers): Use gdbpy_ref.
7347
7348 2017-01-10  Tom Tromey  <tom@tromey.com>
7349
7350         * python/py-param.c (get_doc_string, compute_enum_values): Use
7351         gdbpy_ref.
7352
7353 2017-01-10  Tom Tromey  <tom@tromey.com>
7354
7355         * python/py-inferior.c (find_thread_object, build_inferior_list):
7356         Use gdbpy_ref.
7357
7358 2017-01-10  Tom Tromey  <tom@tromey.com>
7359
7360         * python/py-framefilter.c (py_print_frame): Use gdbpy_ref.
7361
7362 2017-01-10  Tom Tromey  <tom@tromey.com>
7363
7364         * python/py-finishbreakpoint.c (bpfinishpy_out_of_scope): Use
7365         gdbpy_ref.
7366
7367 2017-01-10  Tom Tromey  <tom@tromey.com>
7368
7369         * python/py-cmd.c (cmdpy_completer_helper): Use gdbpy_ref.  Remove
7370         extra incref.
7371         (cmdpy_completer_handle_brkchars, cmdpy_completer, cmdpy_init):
7372         Use gdbpy_ref.
7373
7374 2017-01-10  Tom Tromey  <tom@tromey.com>
7375
7376         * python/py-breakpoint.c (gdbpy_breakpoint_cond_says_stop): Use
7377         gdbpy_ref.
7378
7379 2017-01-10  Tom Tromey  <tom@tromey.com>
7380
7381         * python/py-arch.c (archpy_disassemble): Use gdbpy_ref.  Don't
7382         decref results of PyArg_ParseTupleAndKeywords.
7383
7384 2017-01-10  Tom Tromey  <tom@tromey.com>
7385
7386         * python/python.c (python_run_simple_file): Use
7387         unique_xmalloc_ptr, gdbpy_ref.
7388
7389 2017-01-10  Tom Tromey  <tom@tromey.com>
7390
7391         * python/py-prettyprint.c (print_stack_unless_memory_error)
7392         (print_string_repr, print_children): Use gdbpy_ref.
7393         (dummy_python_frame): New class.
7394         (dummy_python_frame::dummy_python_frame): Rename from
7395         push_dummy_python_frame.
7396         (py_restore_tstate): Remove.
7397
7398 2017-01-10  Tom Tromey  <tom@tromey.com>
7399
7400         * python/py-framefilter.c (py_print_frame): Use gdbpy_ref.
7401
7402 2017-01-10  Tom Tromey  <tom@tromey.com>
7403
7404         * python/python.c (ensure_python_env, restore_python_env):
7405         Remove.
7406         * python/python-internal.h (ensure_python_env): Don't declare.
7407         * varobj.h (varobj_ensure_python_env): Don't declare.
7408         * varobj.c (varobj_ensure_python_env): Remove.
7409
7410 2017-01-10  Tom Tromey  <tom@tromey.com>
7411
7412         * varobj.c (varobj_value_get_print_value): Use
7413         gdbpy_enter_varobj.
7414
7415 2017-01-10  Tom Tromey  <tom@tromey.com>
7416
7417         * python/py-prettyprint.c (print_string_repr, print_children):
7418         Update.
7419         * python/py-lazy-string.c (gdbpy_extract_lazy_string): Change type
7420         of "encoding".
7421         * varobj.c (varobj_value_get_print_value): Update.
7422         * python/python-internal.h (gdbpy_extract_lazy_string): Update.
7423
7424 2017-01-10  Tom Tromey  <tom@tromey.com>
7425
7426         * varobj.c (varobj_get_display_hint)
7427         (dynamic_varobj_has_child_method, install_new_value_visualizer)
7428         (varobj_set_visualizer, free_variable): Use
7429         gdbpy_enter_varobj.
7430
7431 2017-01-10  Tom Tromey  <tom@tromey.com>
7432
7433         * python/python.c (python_command): Use gdbpy_enter, gdbpy_ref.
7434         (do_finish_initialization): New function.  Use gdbpy_ref.
7435         (gdbpy_finish_initialization): Use gdbpy_enter.  Call
7436         do_finish_initialization.
7437
7438 2017-01-10  Tom Tromey  <tom@tromey.com>
7439
7440         * python/py-param.c (get_set_value, get_show_value): Use
7441         gdbpy_enter, gdbpy_ref.
7442
7443 2017-01-10  Tom Tromey  <tom@tromey.com>
7444
7445         * python/py-function.c (fnpy_call): Use gdbpy_enter, gdbpy_ref.
7446
7447 2017-01-10  Tom Tromey  <tom@tromey.com>
7448
7449         * python/py-cmd.c (cmdpy_function): Use gdbpy_enter, gdbpy_ref.
7450
7451 2017-01-10  Tom Tromey  <tom@tromey.com>
7452
7453         * python/py-varobj.c (py_varobj_iter_dtor, py_varobj_iter_next):
7454         Use gdbpy_enter_varobj.
7455
7456 2017-01-10  Tom Tromey  <tom@tromey.com>
7457
7458         * varobj.c (gdbpy_enter_varobj): New constructor.
7459         * python/python-internal.h (gdbpy_enter_varobj): New class.
7460         * python/py-varobj.c (py_varobj_get_iterator): Use
7461         gdbpy_enter_varobj.
7462
7463 2017-01-10  Tom Tromey  <tom@tromey.com>
7464
7465         * python/py-xmethods.c (gdbpy_get_xmethod_result_type): Use
7466         gdbpy_enter, gdbpy_ref, unique_xmalloc_ptr.
7467         (gdbpy_invoke_xmethod): Use gdbpy_ref, gdbpy_enter.
7468         (gdbpy_get_xmethod_arg_types): Use gdbpy_ref,
7469         unique_xmalloc_ptr.
7470         (gdbpy_get_xmethod_arg_types): Use gdbpy_ref, gdbpy_enter.
7471
7472 2017-01-10  Tom Tromey  <tom@tromey.com>
7473
7474         * python/py-xmethods.c (invoke_match_method): Use
7475         gdbpy_ref.
7476
7477 2017-01-10  Tom Tromey  <tom@tromey.com>
7478
7479         * python/py-xmethods.c (gdbpy_get_matching_xmethod_workers): use
7480         gdbpy_enter, gdbpy_ref.
7481
7482 2017-01-10  Tom Tromey  <tom@tromey.com>
7483
7484         * python/python.c (python_interactive_command): Use gdbpy_enter.
7485
7486 2017-01-10  Tom Tromey  <tom@tromey.com>
7487
7488         * python/python.c (gdbpy_before_prompt_hook): Use gdbpy_enter,
7489         gdbpy_ref.
7490
7491 2017-01-10  Tom Tromey  <tom@tromey.com>
7492
7493         * python/py-prettyprint.c (gdbpy_apply_val_pretty_printer): Use
7494         gdbpy_enter, gdbpy_ref, unique_xmalloc_ptr.
7495
7496 2017-01-10  Tom Tromey  <tom@tromey.com>
7497
7498         * utils.h (htab_deleter): New struct.
7499         (htab_up): New typedef.
7500         * python/py-framefilter.c (gdbpy_apply_frame_filter): Use
7501         gdbpy_enter, gdbpy_ref, htab_up.
7502
7503 2017-01-10  Tom Tromey  <tom@tromey.com>
7504
7505         * python/py-unwind.c (pending_frame_invalidate): Remove.
7506         (pyuw_sniffer): Use gdbpy_enter and gdbpy_ref.
7507
7508 2017-01-10  Tom Tromey  <tom@tromey.com>
7509
7510         * python/py-xmethods.c (gdbpy_free_xmethod_worker_data)
7511         (gdbpy_clone_xmethod_worker_data): Use gdbpy_enter.
7512
7513 2017-01-10  Tom Tromey  <tom@tromey.com>
7514
7515         * python/py-type.c (save_objfile_types): Use gdbpy_enter.
7516
7517 2017-01-10  Tom Tromey  <tom@tromey.com>
7518
7519         * python/python.c (gdbpy_eval_from_control_command)
7520         (gdbpy_source_script, gdbpy_run_events)
7521         (gdbpy_source_objfile_script, gdbpy_execute_objfile_script)
7522         (gdbpy_free_type_printers, gdbpy_finish_initialization): Use
7523         gdbpy_enter.
7524
7525 2017-01-10  Tom Tromey  <tom@tromey.com>
7526
7527         * python/py-progspace.c (py_free_pspace): Use gdbpy_enter.
7528
7529 2017-01-10  Tom Tromey  <tom@tromey.com>
7530
7531         * python/py-objfile.c (py_free_objfile): Use gdbpy_enter.
7532
7533 2017-01-10  Tom Tromey  <tom@tromey.com>
7534
7535         * python/py-inferior.c (python_on_normal_stop, python_on_resume)
7536         (python_on_inferior_call_pre, python_on_inferior_call_post)
7537         (python_on_memory_change, python_on_register_change)
7538         (python_inferior_exit, python_new_objfile, add_thread_object)
7539         (delete_thread_object, py_free_inferior): Use gdbpy_enter.
7540
7541 2017-01-10  Tom Tromey  <tom@tromey.com>
7542
7543         * python/py-finishbreakpoint.c (bpfinishpy_handle_stop)
7544         (bpfinishpy_handle_exit): Use gdbpy_enter.
7545
7546 2017-01-10  Tom Tromey  <tom@tromey.com>
7547
7548         * python/py-cmd.c (cmdpy_destroyer)
7549         (cmdpy_completer_handle_brkchars, cmdpy_completer): Use
7550         gdbpy_enter.
7551
7552 2017-01-10  Tom Tromey  <tom@tromey.com>
7553
7554         * python/py-breakpoint.c (gdbpy_breakpoint_cond_says_stop): Use
7555         gdbpy_enter.
7556         (gdbpy_breakpoint_has_cond): Likewise.
7557
7558 2017-01-10  Tom Tromey  <tom@tromey.com>
7559
7560         * python/python.c (gdbpy_enter): New constructor.
7561         (~gdbpy_enter): New destructor.
7562         (restore_python_env, ensure_python_env): Rewrite.
7563         * python/python-internal.h (gdbpy_enter): New class.
7564
7565 2017-01-10  Tom Tromey  <tom@tromey.com>
7566
7567         * python/py-symbol.c (gdbpy_lookup_symbol): Use gdbpy_ref.
7568
7569 2017-01-10  Tom Tromey  <tom@tromey.com>
7570
7571         * python/py-value.c (value_has_field, get_field_flag)
7572         (get_field_type, valpy_getitem, convert_value_from_python): Use
7573         gdbpy_ref.
7574
7575 2017-01-10  Tom Tromey  <tom@tromey.com>
7576
7577         * python/python.c (gdbpy_progspaces, gdbpy_objfiles): Use
7578         gdbpy_ref.
7579
7580 2017-01-10  Tom Tromey  <tom@tromey.com>
7581
7582         * python/py-prettyprint.c (search_pp_list)
7583         (find_pretty_printer_from_objfiles)
7584         (find_pretty_printer_from_progspace)
7585         (find_pretty_printer_from_gdb, find_pretty_printer)
7586         (gdbpy_get_display_hint, gdbpy_get_varobj_pretty_printer): Use
7587         gdbpy_ref.
7588
7589 2017-01-10  Tom Tromey  <tom@tromey.com>
7590
7591         * python/py-param.c (call_doc_function): Use gdbpy_ref.
7592
7593 2017-01-10  Tom Tromey  <tom@tromey.com>
7594
7595         * python/py-linetable.c (build_line_table_tuple_from_pcs)
7596         (ltpy_get_all_source_lines): Use gdbpy_ref.
7597
7598 2017-01-10  Tom Tromey  <tom@tromey.com>
7599
7600         * python/py-framefilter.c (extract_sym, extract_value)
7601         (get_py_iter_from_func, bootstrap_python_frame_filters): Use
7602         gdbpy_ref.
7603
7604 2017-01-10  Tom Tromey  <tom@tromey.com>
7605
7606         * python/py-breakpoint.c (gdbpy_breakpoints): Use gdbpy_ref.
7607
7608 2017-01-10  Tom Tromey  <tom@tromey.com>
7609
7610         * python/py-inferior.c (gdbpy_inferiors): Use gdbpy_ref.
7611
7612 2017-01-10  Tom Tromey  <tom@tromey.com>
7613
7614         * python/py-function.c (convert_values_to_python, fnpy_init): Use
7615         gdbpy_ref.
7616
7617 2017-01-10  Tom Tromey  <tom@tromey.com>
7618
7619         * python/py-cmd.c (gdbpy_string_to_argv): Use gdbpy_ref.
7620
7621 2017-01-10  Tom Tromey  <tom@tromey.com>
7622
7623         * python/py-type.c (convert_field, make_fielditem, typy_fields)
7624         (typy_range): Use gdbpy_ref.
7625
7626 2017-01-10  Tom Tromey  <tom@tromey.com>
7627
7628         * python/py-threadevent.c (create_thread_event_object): Use
7629         gdbpy_ref.
7630         * python/py-stopevent.c (create_stop_event_object): Simplify.
7631         (emit_stop_event): Use gdbpy_ref.
7632         * python/py-signalevent.c (create_signal_event_object): Use
7633         gdbpy_ref.
7634         * python/py-newobjfileevent.c (create_new_objfile_event_object)
7635         (emit_new_objfile_event, create_clear_objfiles_event_object)
7636         (emit_clear_objfiles_event): Use gdbpy_ref.
7637         * python/py-infevents.c (create_inferior_call_event_object)
7638         (create_register_changed_event_object)
7639         (create_memory_changed_event_object, emit_inferior_call_event)
7640         (emit_memory_changed_event, emit_register_changed_event): Use
7641         gdbpy_ref.
7642         * python/py-exitedevent.c (create_exited_event_object)
7643         (emit_exited_event): Use gdbpy_ref.
7644         * python/py-event.h (evpy_emit_event): Remove
7645         CPYCHECKER_STEALS_REFERENCE_TO_ARG annotation.
7646         * python/py-event.c (evpy_emit_event): Use gdbpy_ref.
7647         * python/py-continueevent.c (emit_continue_event): Use
7648         gdbpy_ref.
7649         * python/py-breakpoint.c (gdbpy_breakpoint_created)
7650         (gdbpy_breakpoint_deleted, gdbpy_breakpoint_modified): Use
7651         gdbpy_ref.
7652         * python/py-bpevent.c (create_breakpoint_event_object): Use
7653         gdbpy_ref.
7654
7655 2017-01-10  Tom Tromey  <tom@tromey.com>
7656
7657         * python/py-ref.h: New file.
7658
7659 2017-01-10  Simon Marchi  <simon.marchi@ericsson.com>
7660
7661         * cli-out.c (cli_ui_out::do_redirect): Change return type to
7662         void.
7663         * cli-out.h (cli_ui_out::do_redirect): Likewise.
7664         * mi/mi-out.c (mi_ui_out::do_redirect): Likewise.
7665         * mi/mi-out.h (mi_ui_out::do_redirect): Likewise.
7666         * ui-out.c (ui_out::redirect): Likewise.
7667         * ui-out.h (ui_out::redirect, ui_out::do_redirect): Likewise.
7668         * cli/cli-logging.c (set_logging_redirect): Update call site of
7669         ui_out::redirect.
7670         (handle_redirections): Likewise.
7671         * scm-ports.c (ioscm_with_output_to_port_worker): Likewise.
7672         * top.c (execute_command_to_string): Likewise.
7673         * utils.c (do_ui_out_redirect_pop): Likewise.
7674
7675 2017-01-10  Simon Marchi  <simon.marchi@ericsson.com>
7676
7677         * stack.c (_initialize_stack): Update "frame" command help message.
7678
7679 2017-01-08  Iain Buclaw  <ibuclaw@gdcproject.org>
7680
7681         * d-exp.y (CastExpression): Emit UNOP_CAST_TYPE.
7682
7683 2017-01-06  Yao Qi  <yao.qi@linaro.org>
7684
7685         * x86-linux-nat.h: Include gdb_proc_service.h.
7686
7687 2017-01-06  Yao Qi  <yao.qi@linaro.org>
7688
7689         * ser-base.h: Include serial.h.
7690
7691 2017-01-06  Yao Qi  <yao.qi@linaro.org>
7692
7693         * ppc-linux-tdep.h: Include ppc-tdep.h.
7694
7695 2017-01-06  Yao Qi  <yao.qi@linaro.org>
7696
7697         * nat/amd64-linux-siginfo.h: Include signal.h.
7698
7699 2017-01-06  Yao Qi  <yao.qi@linaro.org>
7700
7701         * nat/aarch64-linux-hw-point.h: Include break-common.h.
7702
7703 2017-01-06  Yao Qi  <yao.qi@linaro.org>
7704
7705         * mi/mi-parse.h: Include mi-cmds.h.
7706
7707 2017-01-06  Yao Qi  <yao.qi@linaro.org>
7708
7709         * inf-loop.c: Don't include "target.h".
7710         * inf-loop.h: Include it here.
7711
7712 2017-01-06  Yao Qi  <yao.qi@linaro.org>
7713
7714         * dfp.h: Include "dboulest.h" and "expression.h".
7715
7716 2017-01-06  Yao Qi  <yao.qi@linaro.org>
7717
7718         * ax-gdb.h: Include "ax.h".
7719
7720 2017-01-06  Yao Qi  <yao.qi@linaro.org>
7721
7722         * Makefile.in (HFILES_NO_SRCDIR): Replace gdb_ptrace.h
7723         with nat/gdb_ptrace.h.
7724
7725 2017-01-05  Yao Qi  <yao.qi@linaro.org>
7726
7727         * mips-fbsd-tdep.c (mips_fbsd_sigframe_init): Move && to
7728         new line.
7729         (mips64_fbsd_sigframe_init): Likewise.
7730
7731 2017-01-04  John Baldwin  <jhb@FreeBSD.org>
7732
7733         * mips-fbsd-tdep.c (_initialize_mips_fbsd_tdep): Use
7734         GDB_OSABI_FREEBSD instead of GDB_OSABI_FREEBSD_ELF.
7735
7736 2017-01-04  John Baldwin  <jhb@FreeBSD.org>
7737
7738         * Makefile.in (ALLDEPFILES): Add mips-fbsd-nat.c.
7739         * NEWS: Mention new FreeBSD/mips native configuration.
7740         * config/mips/fbsd.mh: New file.
7741         * configure.host: Add mips*-*-freebsd*.
7742         * mips-fbsd-nat.c: New file.
7743
7744 2017-01-04  John Baldwin  <jhb@FreeBSD.org>
7745
7746         * Makefile.in (ALL_TARGET_OBS): Add mips-fbsd-tdep.o.
7747         (ALLDEPFILES): Add mips-fbsd-tdep.c.
7748         * NEWS: Mention new FreeBSD/mips target.
7749         * configure.tgt: Add mips*-*-freebsd*.
7750         * mips-fbsd-tdep.c: New file.
7751         * mips-fbsd-tdep.h: New file.
7752
7753 2017-01-04  Yao Qi  <yao.qi@linaro.org>
7754
7755         * dwarf2loc.c (write_pieced_value): Don't use VALUE_FRAME_ID (to),
7756         use c->frame_id when the piece location is DWARF_VALUE_REGISTER.
7757
7758 2017-01-01  Joel Brobecker  <brobecker@adacore.com>
7759
7760         Update copyright year range in all GDB files.
7761
7762 2017-01-01  Joel Brobecker  <brobecker@adacore.com>
7763
7764         * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2016.
7765
7766 For older changes see ChangeLog-2016.
7767 \f
7768 Local Variables:
7769 mode: change-log
7770 left-margin: 8
7771 fill-column: 74
7772 version-control: never
7773 coding: utf-8
7774 End: