]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blob - gdb/ChangeLog
Fix 'xfered>0' assertion in target.c for remote connection
[thirdparty/binutils-gdb.git] / gdb / ChangeLog
1 2017-11-14 Paul Carroll <pcarroll@codesourcery.com>
2
3 PR gdb/22388
4 * remote.c (remote_write_bytes_aux, remote_read_bytes_1,
5 remote_read_bytes, remote_write_qxfer, remote_xfer_partial):
6 Return TARGET_XFER_EOF if size of returned data is 0.
7
8 2017-11-14 Simon Marchi <simon.marchi@ericsson.com>
9
10 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
11 memory-map-selftests.c.
12 (SUBDIR_UNITTESTS_OBS): Add memory-map-selftests.o.
13 * memory-map.c (memory_map_start_memory): Fix computation of hi
14 address.
15 * unittests/memory-map-selftests.c: New file.
16
17 2017-11-09 Joel Brobecker <brobecker@adacore.com>
18
19 * ada-lang.c: Fix some typos in the general command documenting
20 how Ada expressions are being evaluated and how their result
21 is printed.
22
23 2017-11-09 Tom Tromey <tom@tromey.com>
24
25 * psymtab.c (psymbol_hash): Do not hash string contents.
26 (psymbol_compare): Add comment.
27
28 2017-11-09 Tom Tromey <tom@tromey.com>
29
30 * dictionary.c (dict_hash): Move "TKB" check into the "switch".
31
32 2017-11-08 Joel Brobecker <brobecker@adacore.com>
33
34 * ada-exp.y (write_var_from_sym): Remove parameter
35 "orig_left_context". Update all callers.
36
37 2017-11-08 Simon Marchi <simon.marchi@ericsson.com>
38
39 * tracepoint.h (class collection_list) <stringify>: Return
40 std::vector<std::string>.
41 (encode_actions_rsp): Change parameters to
42 std::vector<std::string> *.
43 * tracepoint.c (collection_list::stringify): Return
44 std::vector<std::string> and adjust accordingly.
45 (encode_actions_rsp): Changee parameters to
46 std::vector<std::string> and adjust accordingly.
47 * remote.c (free_actions_list),
48 free_actions_list_cleanup_wrapper): Remove.
49 (remote_download_tracepoint): Adjust to std::vector.
50
51 2017-11-08 Tom Tromey <tom@tromey.com>
52
53 * dwarf2read.c (symbolp): Remove typedef.
54 (read_func_scope): Use std::vector.
55 (process_structure_scope): Use std::vector.
56
57 2017-11-08 Pedro Alves <palves@redhat.com>
58
59 * ada-lang.c (ada_make_symbol_completion_list): Use
60 completion_skip_symbol.
61 * symtab.c (symbol_is_function_or_method(minimal_symbol*)): New.
62 (symbol_is_function_or_method(symbol*)): New.
63 (add_symtab_completions): Add complete_symbol_mode parameter. Use
64 completion_skip_symbol.
65 (default_collect_symbol_completion_matches_break_on): Use
66 completion_skip_symbol. Pass down mode.
67 (collect_file_symbol_completion_matches): Pass down mode.
68 * symtab.h (symbol_is_function_or_method): New declarations.
69 (completion_skip_symbol): New template function.
70
71 2017-11-08 Pedro Alves <palves@redhat.com>
72
73 * linespec.c (iterate_over_all_matching_symtabs): Add
74 search_domain parameter. Pass it down to expand_symtabs_matching.
75 (decode_objc): Request FUNCTIONS_DOMAIN symbols only.
76 (lookup_prefix_sym): Adjust by passing ALL_DOMAIN as
77 search_domain.
78 (add_all_symbol_names_from_pspace): Add search_domain parameter.
79 Pass it down.
80 (find_method, find_function_symbols): Request FUNCTIONS_DOMAIN
81 symbols.
82 (add_matching_symbols_to_info): Add search_domain parameter. Pass
83 it down.
84
85 2017-11-08 Pedro Alves <palves@redhat.com>
86
87 * ada-lang.c (ada_make_symbol_completion_list): Remove text and
88 text_len locals and don't pass them down.
89 * symtab.c (completion_list_add_name): Remove
90 sym_text/sym_text_len parameters and adjust.
91 (completion_list_add_symbol, completion_list_add_msymbol)
92 (completion_list_objc_symbol, completion_list_add_fields)
93 (add_symtab_completions): Likewise.
94 (default_collect_symbol_completion_matches_break_on)
95 (collect_file_symbol_completion_matches): Remove sym_text_len
96 local and don't pass it down.
97 * symtab.h (completion_list_add_name): Remove
98 sym_text/sym_text_len parameters.
99
100 2017-11-08 Pedro Alves <palves@redhat.com>
101
102 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
103 unittests/lookup_name_info-selftests.c.
104 (SUBDIR_UNITTESTS_OBS): Add lookup_name_info-selftests.o.
105 * cp-support.c: Include "selftest.h".
106 (cp_remove_params_1): Rename from cp_remove_params. Add
107 'require_param' parameter, and handle it.
108 (cp_remove_params): Reimplement.
109 (cp_remove_params_if_any): New.
110 (selftests::quote): New.
111 (selftests::check_remove_params): New.
112 (selftests::test_cp_remove_params): New.
113 (_initialize_cp_support): Install
114 selftests::test_cp_remove_params.
115 * cp-support.h (cp_remove_params_if_any): Declare.
116 * dwarf2read.c :Include "selftest.h".
117 (dw2_expand_symtabs_matching_symbol): Use
118 lookup_name_info::make_ignore_params.
119 (selftests::dw2_expand_symtabs_matching::mock_mapped_index)
120 (selftests::dw2_expand_symtabs_matching::string_or_null)
121 (selftests::dw2_expand_symtabs_matching::check_match)
122 (selftests::dw2_expand_symtabs_matching::test_symbols)
123 (selftests::dw2_expand_symtabs_matching::run_test): New.
124 (_initialize_dwarf2_read): Register
125 selftests::dw2_expand_symtabs_matching::run_test.
126 * psymtab.c (psym_expand_symtabs_matching): Use
127 lookup_name_info::make_ignore_params.
128 * symtab.c (demangle_for_lookup_info::demangle_for_lookup_info):
129 If the lookup name wants to ignore parameters, strip them.
130 (compare_symbol_name): Remove sym_text/sym_text_len parameters and
131 code handling '('.
132 (completion_list_add_name): Don't pass down sym_text/sym_text_len.
133 (default_collect_symbol_completion_matches_break_on): Don't try to
134 strip parameters.
135 * symtab.h (lookup_name_info::lookup_name_info): Add
136 'ignore_parameters' parameter.
137 (lookup_name_info::ignore_parameters)
138 (lookup_name_info::make_ignore_params): New methods.
139 (lookup_name_info::m_ignore_parameters): New field.
140 * unittests/lookup_name_info-selftests.c: New file.
141
142 2017-11-08 Pedro Alves <palves@redhat.com>
143
144 * dwarf2read.c (dw2_expand_marked_cus)
145 (dw2_expand_symtabs_matching_symbol): Remove forward declarations.
146 (dw2_expand_symtabs_matching): Move further below.
147 (dw2_expand_marked_cus): Reindent.
148
149 2017-11-08 Pedro Alves <palves@redhat.com>
150
151 * dwarf2read.c (byte_swap, MAYBE_SWAP): Move higher up in file.
152 (struct name_component): New.
153 (mapped_index::name_components): New field.
154 (mapped_index::symbol_name_at): New method.
155 (dwarf2_read_index): Call mapped_index ctor.
156 (dw2_map_matching_symbols): Add comment about name_components
157 table.
158 (dw2_expand_symtabs_matching): Factor part to...
159 (dw2_expand_symtabs_matching_symbol): ... this new function.
160 Build name components table, and lookup symbols in it before
161 calling the name matcher.
162 (dw2_expand_marked_cus): New, factored out from
163 dw2_expand_symtabs_matching.
164 (dwarf2_per_objfile_free): Call the mapped_index's dtor.
165
166 2017-11-08 Pedro Alves <palves@redhat.com>
167
168 * ada-lang.c (ada_encode): Rename to ..
169 (ada_encode_1): ... this. Add throw_errors parameter and handle
170 it.
171 (ada_encode): Reimplement.
172 (match_name): Delete, folded into full_name.
173 (resolve_subexp): No longer pass the encoded name to
174 ada_lookup_symbol_list.
175 (should_use_wild_match): Delete.
176 (name_match_type_from_name): New.
177 (ada_lookup_simple_minsym): Use lookup_name_info and the
178 language's symbol_name_matcher_ftype.
179 (add_symbols_from_enclosing_procs, ada_add_local_symbols)
180 (ada_add_block_renamings): Adjust to use lookup_name_info.
181 (ada_lookup_name): New.
182 (add_nonlocal_symbols, ada_add_all_symbols)
183 (ada_lookup_symbol_list_worker, ada_lookup_symbol_list)
184 (ada_iterate_over_symbols): Adjust to use lookup_name_info.
185 (ada_name_for_lookup): Delete.
186 (ada_lookup_encoded_symbol): Construct a verbatim name.
187 (wild_match): Reverse sense of return type. Use bool.
188 (full_match): Reverse sense of return type. Inline bits of old
189 match_name here.
190 (ada_add_block_symbols): Adjust to use lookup_name_info.
191 (symbol_completion_match): Delete, folded into...
192 (ada_lookup_name_info::matches): ... .this new method.
193 (symbol_completion_add): Delete.
194 (ada_collect_symbol_completion_matches): Add name_match_type
195 parameter. Adjust to use lookup_name_info and
196 completion_list_add_name.
197 (get_var_value, ada_add_global_exceptions): Adjust to use
198 lookup_name_info.
199 (ada_get_symbol_name_cmp): Delete.
200 (do_wild_match, do_full_match): New functions.
201 (ada_lookup_name_info::ada_lookup_name_info): New method.
202 (ada_symbol_name_matches, ada_get_symbol_name_matcher): New
203 functions.
204 (ada_language_defn): Install ada_get_symbol_name_matcher.
205 * ada-lex.l (processId): If name starts with '<', copy it
206 verbatim.
207 * block.c (block_iter_match_step, block_iter_match_first)
208 (block_iter_match_next, block_lookup_symbol)
209 (block_lookup_symbol_primary, block_find_symbol): Adjust to use
210 lookup_name_info.
211 * block.h (block_iter_match_first, block_iter_match_next)
212 (ALL_BLOCK_SYMBOLS_WITH_NAME): Adjust to use lookup_name_info.
213 * c-lang.c (c_language_defn, cplus_language_defn)
214 (asm_language_defn, minimal_language_defn): Adjust comments to
215 refer to la_get_symbol_name_matcher.
216 * completer.c (complete_files_symbols)
217 (collect_explicit_location_matches, symbol_completer): Pass a
218 symbol_name_match_type down.
219 * completer.h (class completion_match, completion_match_result):
220 New classes.
221 (completion_tracker::reset_completion_match_result): New method.
222 (completion_tracker::m_completion_match_result): New field.
223 * cp-support.c (make_symbol_overload_list_block): Adjust to use
224 lookup_name_info.
225 (cp_fq_symbol_name_matches, cp_get_symbol_name_matcher): New
226 functions.
227 * cp-support.h (cp_get_symbol_name_matcher): New declaration.
228 * d-lang.c: Adjust comments to refer to
229 la_get_symbol_name_matcher.
230 * dictionary.c (dict_vector) <iter_match_first, iter_match_next>:
231 Adjust to use lookup_name_info.
232 (dict_iter_match_first, dict_iter_match_next)
233 (iter_match_first_hashed, iter_match_next_hashed)
234 (iter_match_first_linear, iter_match_next_linear): Adjust to work
235 with a lookup_name_info.
236 * dictionary.h (dict_iter_match_first, dict_iter_match_next):
237 Likewise.
238 * dwarf2read.c (dw2_lookup_symbol): Adjust to use lookup_name_info.
239 (dw2_map_matching_symbols): Adjust to use symbol_name_match_type.
240 (gdb_index_symbol_name_matcher): New class.
241 (dw2_expand_symtabs_matching) Adjust to use lookup_name_info and
242 gdb_index_symbol_name_matcher. Accept a NULL symbol_matcher.
243 * f-lang.c (f_collect_symbol_completion_matches): Adjust to work
244 with a symbol_name_match_type.
245 (f_language_defn): Adjust comments to refer to
246 la_get_symbol_name_matcher.
247 * go-lang.c (go_language_defn): Adjust comments to refer to
248 la_get_symbol_name_matcher.
249 * language.c (default_symbol_name_matcher)
250 (language_get_symbol_name_matcher): New functions.
251 (unknown_language_defn, auto_language_defn): Adjust comments to
252 refer to la_get_symbol_name_matcher.
253 * language.h (symbol_name_cmp_ftype): Delete.
254 (language_defn) <la_collect_symbol_completion_matches>: Add match
255 type parameter.
256 <la_get_symbol_name_cmp>: Delete field.
257 <la_get_symbol_name_matcher>: New field.
258 <la_iterate_over_symbols>: Adjust to use lookup_name_info.
259 (default_symbol_name_matcher, language_get_symbol_name_matcher):
260 Declare.
261 * linespec.c (iterate_over_all_matching_symtabs)
262 (iterate_over_file_blocks): Adjust to use lookup_name_info.
263 (find_methods): Add language parameter, and use lookup_name_info
264 and the language's symbol_name_matcher_ftype.
265 (linespec_complete_function): Adjust.
266 (lookup_prefix_sym): Use lookup_name_info.
267 (add_all_symbol_names_from_pspace): Adjust.
268 (find_superclass_methods): Add language parameter and pass it
269 down.
270 (find_method): Pass symbol language down.
271 (find_linespec_symbols): Don't demangle or Ada encode here.
272 (search_minsyms_for_name): Add lookup_name_info parameter.
273 (add_matching_symbols_to_info): Add name_match_type parameter.
274 Use lookup_name_info.
275 * m2-lang.c (m2_language_defn): Adjust comments to refer to
276 la_get_symbol_name_matcher.
277 * minsyms.c: Include <algorithm>.
278 (add_minsym_to_demangled_hash_table): Remove table parameter and
279 add objfile parameter. Use search_name_hash, and add language to
280 demangled languages vector.
281 (struct found_minimal_symbols): New struct.
282 (lookup_minimal_symbol_mangled, lookup_minimal_symbol_demangled):
283 New functions.
284 (lookup_minimal_symbol): Adjust to use them. Don't canonicalize
285 input names here. Use lookup_name_info instead. Lookup up
286 demangled names once for each language in the demangled names
287 vector.
288 (iterate_over_minimal_symbols): Use lookup_name_info. Lookup up
289 demangled names once for each language in the demangled names
290 vector.
291 (build_minimal_symbol_hash_tables): Adjust.
292 * minsyms.h (iterate_over_minimal_symbols): Adjust to pass down a
293 lookup_name_info.
294 * objc-lang.c (objc_language_defn): Adjust comment to refer to
295 la_get_symbol_name_matcher.
296 * objfiles.h: Include <vector>.
297 (objfile_per_bfd_storage) <demangled_hash_languages>: New field.
298 * opencl-lang.c (opencl_language_defn): Adjust comment to refer to
299 la_get_symbol_name_matcher.
300 * p-lang.c (pascal_language_defn): Adjust comment to refer to
301 la_get_symbol_name_matcher.
302 * psymtab.c (psym_lookup_symbol): Use lookup_name_info.
303 (match_partial_symbol): Use symbol_name_match_type,
304 lookup_name_info and psymbol_name_matches.
305 (lookup_partial_symbol): Use lookup_name_info.
306 (map_block): Use symbol_name_match_type and lookup_name_info.
307 (psym_map_matching_symbols): Use symbol_name_match_type.
308 (psymbol_name_matches): New.
309 (recursively_search_psymtabs): Use lookup_name_info and
310 psymbol_name_matches. Rename 'kind' parameter to 'domain'.
311 (psym_expand_symtabs_matching): Use lookup_name_info. Rename
312 'kind' parameter to 'domain'.
313 * rust-lang.c (rust_language_defn): Adjust comment to refer to
314 la_get_symbol_name_matcher.
315 * symfile-debug.c (debug_qf_map_matching_symbols)
316 (debug_qf_map_matching_symbols): Use symbol_name_match_type.
317 (debug_qf_expand_symtabs_matching): Use lookup_name_info.
318 * symfile.c (expand_symtabs_matching): Use lookup_name_info.
319 * symfile.h (quick_symbol_functions) <map_matching_symbols>:
320 Adjust to use symbol_name_match_type.
321 <expand_symtabs_matching>: Adjust to use lookup_name_info.
322 (expand_symtabs_matching): Adjust to use lookup_name_info.
323 * symmisc.c (maintenance_expand_symtabs): Use
324 lookup_name_info::match_any ().
325 * symtab.c (symbol_matches_search_name): New.
326 (eq_symbol_entry): Adjust to use lookup_name_info and the
327 language's matcher.
328 (demangle_for_lookup_info::demangle_for_lookup_info): New.
329 (lookup_name_info::match_any): New.
330 (iterate_over_symbols, search_symbols): Use lookup_name_info.
331 (compare_symbol_name): Add language, lookup_name_info and
332 completion_match_result parameters, and use them.
333 (completion_list_add_name): Make extern. Add language and
334 lookup_name_info parameters. Use them.
335 (completion_list_add_symbol, completion_list_add_msymbol)
336 (completion_list_objc_symbol): Add lookup_name_info parameters and
337 adjust. Pass down language.
338 (completion_list_add_fields): Add lookup_name_info parameters and
339 adjust. Pass down language.
340 (add_symtab_completions): Add lookup_name_info parameters and
341 adjust.
342 (default_collect_symbol_completion_matches_break_on): Add
343 name_match_type parameter, and use it. Use lookup_name_info.
344 (default_collect_symbol_completion_matches)
345 (collect_symbol_completion_matches): Add name_match_type
346 parameter, and pass it down.
347 (collect_symbol_completion_matches_type): Adjust.
348 (collect_file_symbol_completion_matches): Add name_match_type
349 parameter, and use lookup_name_info.
350 * symtab.h: Include <string> and "common/gdb_optional.h".
351 (enum class symbol_name_match_type): New.
352 (class ada_lookup_name_info): New.
353 (struct demangle_for_lookup_info): New.
354 (class lookup_name_info): New.
355 (symbol_name_matcher_ftype): New.
356 (SYMBOL_MATCHES_SEARCH_NAME): Use symbol_matches_search_name.
357 (symbol_matches_search_name): Declare.
358 (MSYMBOL_MATCHES_SEARCH_NAME): Delete.
359 (default_collect_symbol_completion_matches)
360 (collect_symbol_completion_matches)
361 (collect_file_symbol_completion_matches): Add name_match_type
362 parameter.
363 (iterate_over_symbols): Use lookup_name_info.
364 (completion_list_add_name): Declare.
365 * utils.c (enum class strncmp_iw_mode): Moved to utils.h.
366 (strncmp_iw_with_mode): Now extern.
367 * utils.h (enum class strncmp_iw_mode): Moved from utils.c.
368 (strncmp_iw_with_mode): Declare.
369
370 2017-11-08 Keith Seitz <keiths@redhat.com>
371 Pedro Alves <palves@redhat.com>
372
373 * ada-lang.c (ada_language_defn): Install
374 default_search_name_hash.
375 * buildsym.c (struct buildsym_compunit): <language>: New field.
376 (finish_block_internal): Pass language when creating dictionaries.
377 (start_buildsym_compunit, start_symtab): New language parameters.
378 Use them.
379 (restart_symtab): Pass down compilation unit's language.
380 * buildsym.h (enum language): Forward declare.
381 (start_symtab): New 'language' parameter.
382 * c-lang.c (c_language_defn, cplus_language_defn)
383 (asm_language_defn, minimal_language_defn): Install
384 default_search_name_hash.
385 * coffread.c (coff_start_symtab): Adjust.
386 * d-lang.c (d_language_defn): Install default_search_name_hash.
387 * dbxread.c (struct symloc): Add 'pst_language' field.
388 (PST_LANGUAGE): Define.
389 (start_psymtab, read_ofile_symtab): Use it.
390 (process_one_symbol): New 'language' parameter. Pass it down.
391 * dictionary.c (struct dictionary) <language>: New field.
392 (DICT_LANGUAGE): Define.
393 (dict_create_hashed, dict_create_hashed_expandable)
394 (dict_create_linear, dict_create_linear_expandable): New parameter
395 'language'. Set the dictionary's language.
396 (iter_match_first_hashed): Adjust to rename.
397 (insert_symbol_hashed): Assert we don't see mismatching
398 languages. Adjust to rename.
399 (dict_hash): Rename to ...
400 (default_search_name_hash): ... this and make extern.
401 * dictionary.h (struct language_defn): Forward declare.
402 (dict_create_hashed): New parameter 'language'.
403 * dwarf2read.c (dwarf2_start_symtab): Pass down language.
404 * f-lang.c (f_language_defn): Install default_search_name_hash.
405 * go-lang.c (go_language_defn): Install default_search_name_hash.
406 * jit.c (finalize_symtab): Pass compunit's language to dictionary
407 creation.
408 * language.c (unknown_language_defn, auto_language_defn):
409 * language.h (language_defn::la_search_name_hash): New field.
410 (default_search_name_hash): Declare.
411 * m2-lang.c (m2_language_defn): Install default_search_name_hash.
412 * mdebugread.c (new_block): New parameter 'language'.
413 * mdebugread.c (parse_symbol): Pass symbol language to block
414 allocation.
415 (psymtab_to_symtab_1): Pass down language.
416 (new_symtab): Pass compunit's language to block allocation.
417 * objc-lang.c (objc_language_defn): Install
418 default_search_name_hash.
419 * opencl-lang.c (opencl_language_defn):
420 * p-lang.c (pascal_language_defn): Install
421 default_search_name_hash.
422 * rust-lang.c (rust_language_defn): Install
423 default_search_name_hash.
424 * stabsread.h (enum language): Forward declare.
425 (process_one_symbol): Add 'language' parameter.
426 * symtab.c (search_name_hash): New function.
427 * symtab.h (search_name_hash): Declare.
428 * xcoffread.c (read_xcoff_symtab): Pass language to start_symtab.
429
430 2017-11-08 Pedro Alves <palves@redhat.com>
431
432 * cp-name-parser.y (main): Don't initialize extra_chars.
433
434 2017-11-07 Tom Tromey <tom@tromey.com>
435
436 * event-top.h (command_handler): Constify.
437 * record-full.c (cmd_record_full_start): Update.
438 * thread.c (thread_apply_all_command): Update.
439 * printcmd.c (eval_command): Update.
440 * mi/mi-main.c (mi_execute_cli_command): Update.
441 (mi_execute_async_cli_command): Update.
442 * tui/tui-stack.c (tui_update_command): Update.
443 * cli/cli-interp.c (safe_execute_command): Constify.
444 * record.c (record_start): Update.
445 (record_start, record_stop, cmd_record_start): Update.
446 * record-btrace.c (cmd_record_btrace_bts_start): Update.
447 (cmd_record_btrace_pt_start): Update.
448 (cmd_record_btrace_start): Update.
449 (cmd_record_btrace_start): Update.
450 * reverse.c (exec_reverse_once): Update.
451 * python/python.c (execute_gdb_command): Don't copy the command.
452 * event-top.c (command_line_handler): Update.
453 (command_handler): Constify.
454 * defs.h (deprecated_call_command_hook): Constify.
455 * cli/cli-script.h (execute_user_command): Constify.
456 * cli/cli-script.c (execute_user_command): Constify.
457 (execute_cmd_pre_hook, execute_cmd_post_hook): Constify.
458 (enum command_control_type): Update.
459 * main.c (catch_command_errors): Remove non-const overload.
460 (catch_command_errors_ftype): Remove.
461 * python/py-cmd.c (cmdpy_function): Constify.
462 * guile/scm-cmd.c (cmdscm_function): Constify.
463 * cli/cli-dump.c (call_dump_func): Constify.
464 * cli/cli-decode.c (do_const_cfunc): Constify.
465 (do_sfunc): Constify.
466 (cmd_func): Constify.
467 * gdbcmd.h (execute_command, execute_command_to_string): Constify.
468 * top.h (execute_command): Constify.
469 * top.c (execute_command): Constify.
470 (execute_command_to_string): Constify.
471 (deprecated_call_command_hook): Constify.
472 * command.h (cmd_func): Constify.
473 * cli/cli-decode.h (struct cmd_list_element) <func>: Constify.
474
475 2017-11-07 Tom Tromey <tom@tromey.com>
476
477 * ada-lang.c (catch_ada_exception_command): Constify.
478 (catch_assert_command): Constify.
479 * break-catch-throw.c (catch_catch_command, catch_throw_command)
480 (catch_rethrow_command): Constify.
481 (catch_exception_command_1): Constify.
482 * breakpoint.h (add_catch_command): Constify.
483 * break-catch-syscall.c (catch_syscall_command_1): Constify.
484 (catch_syscall_split_args): Constify.
485 * break-catch-sig.c (catch_signal_command): Constify.
486 (catch_signal_split_args): Constify.
487 * cli/cli-decode.h (struct cmd_list_element) <function>: Use
488 cmd_const_sfunc_ftype.
489 * cli/cli-decode.c (add_setshow_cmd_full): Constify.
490 (add_setshow_enum_cmd, add_setshow_auto_boolean_cmd)
491 (add_setshow_boolean_cmd, add_setshow_filename_cmd)
492 (add_setshow_string_cmd, struct cmd_list_element)
493 (add_setshow_optional_filename_cmd, add_setshow_integer_cmd)
494 (add_setshow_uinteger_cmd, add_setshow_zinteger_cmd)
495 (add_setshow_zuinteger_unlimited_cmd, add_setshow_zuinteger_cmd):
496 Constify.
497 (set_cmd_sfunc): Constify.
498 (empty_sfunc): Constify.
499 * command.h (add_setshow_enum_cmd, add_setshow_auto_boolean_cmd)
500 (add_setshow_boolean_cmd, add_setshow_filename_cmd)
501 (add_setshow_string_cmd, add_setshow_string_noescape_cmd)
502 (add_setshow_optional_filename_cmd, add_setshow_integer_cmd)
503 (add_setshow_uinteger_cmd, add_setshow_zinteger_cmd)
504 (add_setshow_zuinteger_cmd, add_setshow_zuinteger_unlimited_cmd):
505 Constify.
506 (set_cmd_sfunc): Constify.
507 (cmd_sfunc_ftype): Remove.
508 * compile/compile.c (set_compile_args): Constify.
509 * infrun.c (set_disable_randomization): Constify.
510 * infcmd.c (set_args_command, set_cwd_command): Constify.
511 * breakpoint.c (set_condition_evaluation_mode): Constify.
512 (add_catch_command): Constify.
513 (catch_fork_command_1, catch_exec_command_1)
514 (catch_load_command_1, catch_unload_command_1): Constify.
515 (catch_load_or_unload): Constify.
516 * guile/scm-param.c (pascm_set_func): Constify.
517 (add_setshow_generic): Constify.
518 * python/py-param.c (get_set_value): Constify.
519 * top.h (set_verbose): Constify.
520 * tui/tui-win.c (tui_set_var_cmd): Constify.
521 * mi/mi-main.c (set_mi_async_command): Constify.
522 * cli/cli-logging.c (set_logging_overwrite)
523 (set_logging_redirect): Constify.
524 * value.c (set_max_value_size): Constify.
525 * valprint.c (set_input_radix, set_output_radix): Constify.
526 * utils.c (set_width_command, set_height_command): Constify.
527 * typeprint.c (set_print_type_methods, set_print_type_typedefs): Constify.
528 * tracepoint.c (set_disconnected_tracing)
529 (set_circular_trace_buffer, set_trace_buffer_size)
530 (set_trace_user, set_trace_notes, set_trace_stop_notes): Constify.
531 * top.c (set_history_size_command, set_verbose, set_editing)
532 (set_gdb_datadir, set_history_filename): Constify.
533 * target.c (set_targetdebug, maint_set_target_async_command)
534 (maint_set_target_non_stop_command, set_target_permissions)
535 (set_write_memory_permission): Constify.
536 (open_target): Constify.
537 * target-descriptions.c (set_tdesc_filename_cmd): Constify.
538 * target-dcache.c (set_stack_cache, set_code_cache): Constify.
539 * symtab.c (set_symbol_cache_size_handler): Constify.
540 * symfile.c (set_ext_lang_command): Constify.
541 * symfile-debug.c (set_debug_symfile): Constify.
542 * source.c (set_directories_command): Constify.
543 * solib.c (reload_shared_libraries, gdb_sysroot_changed): Constify.
544 * serial.c (set_parity): Constify.
545 * rs6000-tdep.c (powerpc_set_soft_float, powerpc_set_vector_abi): Constify.
546 * remote.c (set_remote_exec_file, set_remotebreak)
547 (set_remote_protocol_Z_packet_cmd, set_range_stepping): Constify.
548 * record.c (set_record_insn_history_size)
549 (set_record_call_history_size): Constify.
550 * record-full.c (set_record_full_insn_max_num): Constify.
551 * proc-api.c (set_procfs_trace_cmd, set_procfs_file_cmd): Constify.
552 * osabi.c (set_osabi): Constify.
553 * mips-tdep.c (set_mips64_transfers_32bit_regs)
554 (reinit_frame_cache_sfunc, mips_abi_update): Constify.
555 * maint.c (maintenance_set_profile_cmd): Constify.
556 * linux-thread-db.c (set_libthread_db_search_path): Constify.
557 * language.c (set_language_command, set_range_command)
558 (set_case_command): Constify.
559 * infrun.c (set_non_stop, set_observer_mode)
560 (set_stop_on_solib_events, set_schedlock_func)
561 (set_exec_direction_func): Constify.
562 * infcmd.c (set_inferior_tty_command): Constify.
563 * disasm.c (set_disassembler_options_sfunc): Constify.
564 * demangle.c (set_demangling_command): Constify.
565 * dcache.c (set_dcache_size, set_dcache_line_size): Constify.
566 * cris-tdep.c (set_cris_version, set_cris_mode)
567 (set_cris_dwarf2_cfi): Constify.
568 * corefile.c (set_gnutarget_command): Constify.
569 * charset.c (set_host_charset_sfunc, set_target_charset_sfunc)
570 (set_target_wide_charset_sfunc): Constify.
571 * breakpoint.c (update_dprintf_commands): Constify.
572 * auto-load.c (set_auto_load_dir, set_auto_load_safe_path): Constify.
573 * arm-tdep.c (set_fp_model_sfunc, arm_set_abi)
574 (set_disassembly_style_sfunc): Constify.
575 * arch-utils.c (set_endian, set_architecture): Constify.
576 * alpha-tdep.c (reinit_frame_cache_sfunc): Constify.
577 * agent.c (set_can_use_agent): Constify.
578
579 2017-11-07 Tom Tromey <tom@tromey.com>
580
581 * go32-nat.c (go32_sysinfo, go32_sldt, go32_sgdt, go32_sidt)
582 (go32_pde, go32_pte, go32_pte_for_address): Constify.
583 * gnu-nat.c (_parse_bool_arg, show_thread_default_pause_cmd)
584 (set_thread_default_pause_cmd, set_thread_default_run_cmd)
585 (show_thread_default_run_cmd, set_thread_default_detach_sc_cmd)
586 (parse_int_arg, show_thread_default_detach_sc_cmd)
587 (set_signals_cmd, show_signals_cmd, set_sig_thread_cmd)
588 (show_sig_thread_cmd, set_stopped_cmd, show_stopped_cmd)
589 (set_exceptions_cmd, show_exceptions_cmd, set_task_pause_cmd)
590 (show_task_pause_cmd, set_task_detach_sc_cmd)
591 (show_task_detach_sc_cmd, set_task_exc_port_cmd)
592 (set_noninvasive_cmd, set_thread_pause_cmd)
593 (show_thread_pause_cmd, set_thread_run_cmd, show_thread_run_cmd)
594 (set_thread_detach_sc_cmd, show_thread_detach_sc_cmd)
595 (set_thread_exc_port_cmd, thread_takeover_sc_cmd): Constify.
596 * windows-nat.c (display_selectors): Constify.
597 * cli/cli-decode.h (struct cmd_list_element) <function>: Remove
598 non-const "cfunc".
599 * cli/cli-decode.c (set_cmd_cfunc): Remove non-const overload.
600 (cmd_cfunc_eq): Likewise.
601 (struct cmd_list_element): Likewise.
602 (do_cfunc): Remove.
603 (cli_user_command_p): Update.
604 * command.h (add_cmd): Remove non-const overload.
605 (cmd_cfunc_ftype): Remove typedef.
606 (cmd_cfunc_eq): Remove non-const overload.
607 * value.c (show_values): Constify.
608 * thread.c (thread_apply_all_command): Constify.
609 * symfile.c (load_command): Constify.
610 * source.c (directory_command): Constify.
611 * maint.c (maintenance_internal_error)
612 (maintenance_demangler_warning, maintenance_space_display)
613 (maintenance_print_architecture, maintenance_translate_address)
614 (maintenance_info_selftests, maintenance_internal_warning):
615 Constify.
616 * breakpoint.c (disable_trace_command, enable_trace_command):
617 Constify.
618 * auto-load.c (info_auto_load_local_gdbinit, add_auto_load_dir):
619 Constify.
620 (add_auto_load_safe_path): Constify.
621 * guile/scm-auto-load.c (info_auto_load_guile_scripts): Constify.
622 * top.h (show_commands): Constify.
623 * linux-thread-db.c (info_auto_load_libthread_db): Constify.
624 * sparc64-tdep.c (adi_examine_command): Constify.
625 (adi_assign_command): Constify.
626
627 2017-11-07 Tom Tromey <tom@tromey.com>
628
629 * frame.h (info_locals_command, info_args_command): Constify.
630 * auto-load.h (auto_load_info_scripts): Constify.
631 * inferior.h (registers_info): Constify.
632 * copying.c: Rebuild.
633 * copying.awk: Constify generated commands.
634 * auto-load.c (auto_load_info_scripts)
635 (info_auto_load_gdb_scripts): Constify.
636 * cli/cli-decode.c (struct cmd_list_element): Take a
637 cmd_const_cfunc_ftype.
638 * command.h (add_info): Take a cmd_const_cfunc_ftype.
639 * tui/tui-win.c (tui_all_windows_info): Constify.
640 * python/py-auto-load.c (info_auto_load_python_scripts):
641 Constify.
642 * cli/cli-cmds.c (show_command): Remove non-const overload.
643 * tracepoint.c (info_tvariables_command, info_scope_command):
644 Constify.
645 (info_static_tracepoint_markers_command): Constify.
646 * thread.c (info_threads_command): Constify.
647 (print_thread_info_1): Constify.
648 * target.c (info_target_command): Constify.
649 * symtab.c (info_sources_command, info_functions_command)
650 (info_types_command): Constify.
651 (info_variables_command): Remove non-const overload.
652 * symfile.c (info_ext_lang_command): Constify.
653 * stack.c (info_frame_command, info_locals_command)
654 (info_args_command): Constify.
655 (backtrace_command): Remove non-const overload.
656 * source.c (info_source_command, info_line_command): Constify.
657 * solib.c (info_sharedlibrary_command): Constify.
658 * skip.c (info_skip_command): Constify.
659 * ser-go32.c (info_serial_command): Constify.
660 * reverse.c (info_bookmarks_command): Constify.
661 * printcmd.c (info_symbol_command, info_address_command)
662 (info_display_command): Constify.
663 * osdata.c (info_osdata_command): Constify.
664 * objc-lang.c (info_selectors_command, info_classes_command):
665 Constify.
666 * nto-procfs.c (procfs_pidlist, procfs_meminfo): Constify.
667 * memattr.c (info_mem_command): Constify.
668 * macrocmd.c (info_macro_command, info_macros_command): Constify.
669 * linux-fork.c (info_checkpoints_command): Constify.
670 * infrun.c (info_signals_command): Constify.
671 * inflow.c (info_terminal_command): Constify.
672 * inferior.c (info_inferiors_command): Constify.
673 (print_inferior): Constify.
674 * infcmd.c (info_program_command, info_all_registers_command)
675 (info_registers_command, info_vector_command)
676 (info_float_command): Constify.
677 (registers_info): Constify.
678 * gnu-nat.c (info_send_rights_cmd, info_recv_rights_cmd)
679 (info_port_sets_cmd, info_dead_names_cmd, info_port_rights_cmd):
680 Constify.
681 * f-valprint.c (info_common_command): Constify.
682 * dcache.c (info_dcache_command): Constify.
683 (dcache_info_1): Constify.
684 * darwin-nat-info.c (info_mach_tasks_command)
685 (info_mach_task_command, info_mach_ports_command)
686 (info_mach_port_command, info_mach_threads_command)
687 (info_mach_thread_command, info_mach_regions_command)
688 (info_mach_regions_recurse_command, info_mach_region_command)
689 (info_mach_exceptions_command): Constify.
690 (get_task_from_args): Constify.
691 * cp-support.c (info_vtbl_command): Constify.
692 * breakpoint.c (info_watchpoints_command)
693 (info_tracepoints_command): Constify.
694 (info_breakpoints_command): Remove non-const overload.
695 * avr-tdep.c (avr_io_reg_read_command): Constify.
696 * auxv.c (info_auxv_command): Constify.
697 * ada-tasks.c (info_tasks_command): Constify.
698 (info_task): Constify.
699 * ada-lang.c (info_exceptions_command): Constify.
700
701 2017-11-07 Tom Tromey <tom@tromey.com>
702
703 * solib.h (no_shared_libraries): Constify.
704 * frame.h (return_command): Constify.
705 * cli/cli-cmds.h (quit_command): Constify.
706 * top.h (quit_command, execute_command): Constify.
707 * target.h (flash_erase_command): Constify.
708 * inferior.h (set_inferior_args, attach_command): Constify.
709 * tracepoint.h (start_tracing, stop_tracing): Constify.
710 * breakpoint.h (break_command, tbreak_command)
711 (hbreak_command_wrapper, thbreak_command_wrapper)
712 (rbreak_command_wrapper, watch_command_wrapper)
713 (awatch_command_wrapper, rwatch_command_wrapper)
714 (get_tracepoint_by_number): Constify.
715 * symtab.c (info_variables_command, rbreak_command)
716 (symtab_symbol_info): Constify.
717 (info_variables_command): Add non-const overload.
718 * top.c (dont_repeat_command): Constify.
719 * breakpoint.c (ignore_command, commands_command)
720 (condition_command, tbreak_command, hbreak_command)
721 (thbreak_command, clear_command, break_command)
722 (info_breakpoints_command, watch_command, rwatch_command)
723 (awatch_command, trace_command, ftrace_command, strace_command)
724 (trace_pass_command, break_range_command, dprintf_command)
725 (agent_printf_command, get_tracepoint_by_number)
726 (watch_maybe_just_location, trace_pass_command): Constify.
727 (info_breakpoints_command): Add non-const overload.
728 * tracefile.c (tsave_command): Constify.
729 * infcmd.c (attach_command, disconnect_command, signal_command)
730 (queue_signal_command, stepi_command, nexti_command)
731 (finish_command, next_command, step_command, until_command)
732 (advance_command, jump_command, continue_command, run_command)
733 (start_command, starti_command, interrupt_command)
734 (run_command_1, set_inferior_args, step_1): Constify.
735 * inferior.c (add_inferior_command, remove_inferior_command)
736 (clone_inferior_command): Constify.
737 * linux-fork.c (checkpoint_command, restart_command): Constify.
738 * windows-nat.c (signal_event_command): Constify.
739 * guile/guile.c (guile_repl_command, guile_command): Constify.
740 * printcmd.c (x_command, display_command, printf_command)
741 (output_command, set_command, call_command, print_command)
742 (eval_command): Constify.
743 (non_const_set_command): Remove.
744 (_initialize_printcmd): Update.
745 * source.c (forward_search_command, reverse_search_command):
746 Constify.
747 * jit.c (jit_reader_load_command, jit_reader_unload_command):
748 Constify.
749 * infrun.c (handle_command): Constify.
750 * memattr.c (mem_command): Constify.
751 * stack.c (return_command, up_command, up_silently_command)
752 (down_command, down_silently_command, frame_command)
753 (backtrace_command, func_command, backtrace_command_1): Constify.
754 (backtrace_command): Add non-const overload.
755 * remote-sim.c (simulator_command): Constify.
756 * exec.c (set_section_command): Constify.
757 * tracepoint.c (tdump_command, trace_variable_command)
758 (tstatus_command, tstop_command, tstart_command)
759 (end_actions_pseudocommand, while_stepping_pseudocommand)
760 (collect_pseudocommand, teval_pseudocommand, actions_command)
761 (start_tracing, stop_tracing): Constify.
762 * value.c (init_if_undefined_command): Constify.
763 * tui/tui-stack.c (tui_update_command): Constify.
764 * tui/tui-win.c (tui_refresh_all_command)
765 (tui_set_tab_width_command, tui_set_win_height_command)
766 (tui_set_focus_command, tui_scroll_forward_command)
767 (tui_scroll_backward_command, tui_scroll_left_command)
768 (tui_scroll_right_command, parse_scrolling_args, tui_set_focus)
769 (tui_set_win_height): Constify.
770 * tui/tui-layout.c (tui_layout_command): Constify.
771 * procfs.c (proc_trace_syscalls, proc_trace_sysentry_cmd)
772 (proc_trace_sysexit_cmd, proc_untrace_sysentry_cmd)
773 (proc_untrace_sysexit_cmd): Constify.
774 * remote.c (threadlist_test_cmd, threadinfo_test_cmd)
775 (threadset_test_cmd, threadlist_update_test_cmd)
776 (threadalive_test): Constify.
777 * objc-lang.c (print_object_command): Constify.
778 * command.h (add_com): Constify.
779 * cli/cli-dump.c (restore_command): Constify.
780 * cli/cli-cmds.c (pwd_command, echo_command, quit_command)
781 (help_command, complete_command, shell_command, edit_command)
782 (list_command, disassemble_command, make_command)
783 (apropos_command, alias_command): Constify.
784 * cli/cli-script.c (document_command, define_command)
785 (while_command, if_command, validate_comname): Constify.
786 * cli/cli-decode.c (struct cmd_list_element): Change type of
787 "fun".
788 * target.c (do_monitor_command, flash_erase_command): Constify.
789 * regcache.c (reg_flush_command): Constify.
790 * reverse.c (reverse_step, reverse_next, reverse_stepi)
791 (reverse_nexti, reverse_continue, reverse_finish)
792 (save_bookmark_command, goto_bookmark_command)
793 (exec_reverse_once): Constify.
794 * python/python.c (python_interactive_command, python_command):
795 Constify.
796 * typeprint.c (ptype_command, whatis_command, whatis_exp):
797 Constify.
798 * solib.c (sharedlibrary_command, no_shared_libraries): Constify.
799 * gcore.c (gcore_command): Constify.
800
801 2017-11-07 Tom Tromey <tom@tromey.com>
802
803 * printcmd.c (x_command): Call set_repeat_arguments.
804 * cli/cli-cmds.c (list_command): Call set_repeat_arguments.
805 * top.c (repeat_arguments): New global.
806 (set_repeat_arguments): New function.
807 (execute_command): Handle repeat_arguments.
808 (show_commands): Calls set_repeat_arguments.
809 * command.h (set_repeat_arguments): Declare.
810
811 2017-11-07 Tom Tromey <tom@tromey.com>
812
813 * stack.c (backtrace_command): Use std::string.
814 (backtrace_command_1): Make "count_exp" const.
815
816 2017-11-07 Tom Tromey <tom@tromey.com>
817
818 * source.c (directory_switch, mod_path, add_path): Constify.
819 * defs.h (add_path, mod_path, directory_switch): Constify.
820 * mi/mi-cmd-env.c (env_mod_path): Constify.
821
822 2017-11-07 Tom Tromey <tom@tromey.com>
823
824 * infcmd.c (strip_bg_char): Return gdb::unique_xmalloc_ptr.
825 (run_command_1, continue_command, step_1, jump_command)
826 (signal_command, until_command, advance_command, finish_command)
827 (attach_command): Update.
828
829 2017-11-07 Tom Tromey <tom@tromey.com>
830
831 * command.h (set_cmd_cfunc): Don't declare.
832 * cli/cli-decode.c (set_cmd_cfunc): Now static.
833
834 2017-11-07 Tom Tromey <tom@tromey.com>
835
836 * stack.c (select_frame_command): Constify.
837 * cli/cli-decode.c (add_com_suppress_notification): Constify.
838 * command.h (add_com_suppress_notification): Constify.
839
840 2017-11-07 Tom Tromey <tom@tromey.com>
841
842 * breakpoint.c (stop_command): Constify.
843 * cli/cli-decode.c (struct cmd_list_element): Constify.
844 * command.h (add_abbrev_prefix_cmd): Constify.
845
846 2017-11-07 Pedro Alves <palves@redhat.com>
847
848 * breakpoint.c (extract_bp_kind): New enum.
849 (extract_bp_num, extract_bp_or_bp_range): New functions, partially
850 factored out from ...
851 (extract_bp_number_and_location): ... here.
852 * cli/cli-utils.c (get_number_trailer): Handle '-$variable'.
853
854 2017-11-07 Pedro Alves <palves@redhat.com>
855
856 * breakpoint.c (extract_bp_number_and_location): Change return
857 type to void. Throw error instead of warning.
858 (enable_disable_command): Adjust.
859
860 2017-11-07 Xavier Roirand <roirand@adacore.com>
861 Pedro Alves <palves@redhat.com>
862
863 * breakpoint.c (map_breakpoint_number_range): New, factored out
864 from ...
865 (map_breakpoint_numbers): ... here.
866 (find_location_by_number): Change parameters from string to
867 breakpoint number and location.
868 (extract_bp_number_and_location): New function.
869 (enable_disable_bp_num_loc)
870 (enable_disable_breakpoint_location_range)
871 (enable_disable_command): New functions, factored out ...
872 (enable_command, disable_command): ... these functions, and
873 adjusted to support ranges.
874 * NEWS: Document enable/disable breakpoint location range feature.
875
876 2017-11-06 Luis Machado <luis.machado@linaro.org>
877
878 * MAINTAINERS (Write After Approval): Update my e-mail address.
879
880 2017-11-06 Pedro Alves <palves@redhat.com>
881
882 * gnu-nat.c (gnu_terminal_init): Delete.
883 (gnu_target): Don't install gnu_terminal_init.
884 * inflow.c (child_terminal_init_with_pgrp): Delete, merged with ...
885 (child_terminal_init): ... this function.
886
887 2017-11-06 Pedro Alves <palves@redhat.com>
888
889 * common/common.m4 (GDB_AC_COMMON): No longer check termio.h nor
890 sgtty.h.
891 * config.in, configure: Regenerate.
892
893 2017-11-06 Pedro Alves <palves@redhat.com>
894
895 * event-top.c: Check SIGTSTP instead of STOP_SIGNAL thoughout.
896 (async_init_signals): Adjust.
897 (handle_stop_sig): Rename to ...
898 (handle_sigtstp): ... this.
899 (async_stop_sig): Rename to ...
900 (async_sigtstp_handler): ... this, and delete STOP_SIGNAL !=
901 SIGTSTP path.
902 * event-top.h: Move signal.h include to the top. Check SIGTSTP
903 instead of STOP_SIGNAL thoughout.
904 (handle_stop_sig): Rename to ...
905 (handle_sigtstp): ... this.
906 * top.c (command_line_input): Replace STOP_SIGNAL -> SIGTSTP.
907
908 2017-11-06 Pedro Alves <palves@redhat.com>
909
910 * inflow.c (child_terminal_inferior, child_terminal_ours_1): No
911 longer set flags twice in row.
912
913 2017-11-06 Pedro Alves <palves@redhat.com>
914
915 * Makefile.in (SER_HARDWIRE): Update comment.
916 (HFILES_NO_SRCDIR): Remove gdb_termios.h.
917 * common/gdb_termios.h: Delete file.
918 * common/job-control.c: Include termios.h and unistd.h instead of
919 gdb_termios.h.
920 (gdb_setpgid): Remove HAVE_TERMIOS || TIOCGPGRP preprocessor
921 check.
922 (have_job_control): Check HAVE_TERMIOS_H instead of HAVE_TERMIOS.
923 Remove sgtty code.
924 * configure.ac: No longer check for termio.h and sgtty.h.
925 * configure: Regenerate.
926 * inflow.c: Include termios.h instead of gdb_termios.h. Replace
927 PROCESS_GROUP_TYPE checks with HAVE_TERMIOS_H checks throughout.
928 Replace PROCESS_GROUP_TYPE references with pid_t references
929 throughout.
930 (gdb_getpgrp): Delete.
931 (set_initial_gdb_ttystate): Use tcgetpgrp instead of gdb_getpgrp.
932 (child_terminal_inferior): Remove comment. Remove sgtty code.
933 (child_terminal_ours_1): Use tcgetpgrp directly instead of
934 gdb_getpgrp. Use serial_set_tty_state instead aof
935 serial_noflush_set_tty_state. Remove sgtty code.
936 * inflow.h: Include unistd.h instead of gdb_termios.h. Replace
937 PROCESS_GROUP_TYPE check with HAVE_TERMIOS_H check.
938 (inferior_process_group): Now returns pid_t.
939 * ser-base.c (ser_base_noflush_set_tty_state): Delete.
940 * ser-base.h (ser_base_noflush_set_tty_state): Delete.
941 * ser-event.c (serial_event_ops): Update.
942 * ser-go32.c (dos_noflush_set_tty_state): Delete.
943 (dos_ops): Update.
944 * ser-mingw.c (hardwire_ops, tty_ops, pipe_ops, tcp_ops): Update.
945 * ser-pipe.c (pipe_ops): Update.
946 * ser-tcp.c (tcp_ops): Update.
947 * ser-unix.c: Include termios.h instead of gdb_termios.h. Remove
948 HAVE_TERMIOS checks.
949 [HAVE_TERMIO] (struct hardwire_ttystate): Delete.
950 [HAVE_SGTTY] (struct hardwire_ttystate): Delete.
951 (get_tty_state, set_tty_state): Drop termio and sgtty code, and
952 assume termios.
953 (hardwire_noflush_set_tty_state): Delete.
954 (hardwire_print_tty_state, hardwire_drain_output)
955 (hardwire_flush_output, hardwire_flush_input)
956 (hardwire_send_break, hardwire_raw, hardwire_setbaudrate)
957 (hardwire_setstopbits, hardwire_setparity): Drop termio and sgtty
958 code, and assume termios.
959 (hardwire_ops): Update.
960 (_initialize_ser_hardwire): Remove HAVE_TERMIOS check.
961 * serial.c (serial_noflush_set_tty_state): Delete.
962 * serial.h (serial_noflush_set_tty_state): Delete.
963 (serial_ops::noflush_set_tty_state): Delete.
964
965 2017-11-06 Ulrich Weigand <uweigand@de.ibm.com>
966
967 * Makefile.in (SFILES): Remove doublest.c and dfp.c.
968 (HFILES_NO_SRCDIR): Remove doublest.h and dfp.h.
969 (COMMON_OBS): Remove doublest.o and dfp.o.
970 Do not build target-float.c (instead of doublest.c)
971 with -Wformat-nonliteral.
972
973 * doublest.c: Remove file.
974 * doublest.h: Remove file.
975 * dfp.c: Remove file.
976 * dfp.h: Remove file.
977
978 * target-float.c: Do not include "doublest.h" and "dfp.h".
979 (DOUBLEST): Move here from doublest.h.
980 (enum float_kind): Likewise.
981 (FLOATFORMAT_CHAR_BIT): Likewise.
982 (FLOATFORMAT_LARGEST_BYTES): Likewise.
983 (floatformat_totalsize_bytes): Move here from doublest.c. Make static.
984 (floatformat_precision): Likewise.
985 (floatformat_normalize_byteorder, get_field, put_field): Likewise.
986 (floatformat_is_negative, floatformat_classify, floatformat_mantissa):
987 Likewise.
988 (host_float_format, host_double_format, host_long_double_format):
989 Likewise.
990 (floatformat_to_string, floatformat_from_string): Likewise.
991 (floatformat_to_doublest): Likewise. Also, inline the original
992 convert_floatformat_to_doublest.
993 (floatformat_from_doublest): Likewise. Also, inline the original
994 convert_floatformat_from_doublest.
995
996 Include "dpd/decimal128.h", "dpd/decimal64.h", and "dpd/decimal32.h".
997 (MAX_DECIMAL_STRING): Move here from dfp.c.
998 (match_endianness): Likewise.
999 (set_decnumber_context, decimal_check_errors): Likewise.
1000 (decimal_from_number, decimal_to_number): Likewise.
1001 (decimal_to_string, decimal_from_string): Likewise. Make static.
1002 (decimal_from_longest, decimal_from_ulongest): Likewise.
1003 (decimal_to_longest): Likewise.
1004 (decimal_binop, decimal_is_zero, decimal_compare): Likewise.
1005 (decimal_convert): Likewise.
1006
1007 2017-11-06 Ulrich Weigand <uweigand@de.ibm.com>
1008
1009 * doublest.c: Do not include "gdbtypes.h".
1010 (extract_typed_floating): Remove.
1011 (store_typed_floating): Remove.
1012 (convert_typed_floating): Remove.
1013 * doublest.h (struct type): Remove.
1014 (DOUBLEST_PRINT_FORMAT): Remove.
1015 (DOUBLEST_SCAN_FORMAT): Remove.
1016 (extract_typed_floating): Remove.
1017 (store_typed_floating): Remove.
1018 (convert_typed_floating): Remove.
1019
1020 * dfp.c (decimal_from_doublest): Remove.
1021 (decimal_to_doublest): Remove.
1022 * dfp.h: Do not include "doublest.h".
1023 (decimal_from_doublest): Remove.
1024 (decimal_to_doublest): Remove.
1025
1026 * value.c: Do not include "doublest.h" and "dfp.h".
1027 (value_as_double): Remove.
1028 (unpack_double): Remove.
1029 (value_from_double): Remove.
1030 (value_from_decfloat): Remove.
1031 * value.h: Do not include "doublest.h".
1032 (value_as_double): Remove.
1033 (unpack_double): Remove.
1034 (value_from_double): Remove.
1035 (value_from_decfloat): Remove.
1036
1037 2017-11-06 Ulrich Weigand <uweigand@de.ibm.com>
1038
1039 * i386-tdep.c: Include "target-float.h". Do not include "doublest.h".
1040 (i386_extract_return_value): Use target_float_convert.
1041 (i386_store_return_value): Likewise.
1042 * i387-tdep.c (i387_register_to_value): Use target_float_convert.
1043 (i387_value_to_register): Likewise.
1044 * ia64-tdep.c: Include "target-float.h". Do not include "doublest.h".
1045 (ia64_register_to_value): Use target_float_convert.
1046 (ia64_value_to_register): Likewise.
1047 (ia64_extract_return_value): Likewise.
1048 (ia64_store_return_value): Likewise.
1049 (ia64_push_dummy_call): Likewise.
1050 * m68k-tdep.c: Include "target-float.h".
1051 (m68k_register_to_value): Use target_float_convert.
1052 (m68k_value_to_register): Likewise.
1053 (m68k_svr4_extract_return_value): Likewise.
1054 (m68k_svr4_store_return_value): Likewise.
1055 * ppc-sysv-tdep.c: Include "target-float.h".
1056 (ppc_sysv_abi_push_dummy_call): Use target_float_convert.
1057 (do_ppc_sysv_return_value): Likewise.
1058 (ppc64_sysv_abi_push_freg): Likewise.
1059 (ppc64_sysv_abi_return_value_base): Likewise.
1060 * rs6000-aix-tdep.c: Include "target-float.h".
1061 (rs6000_push_dummy_call): Use target_float_convert.
1062 (rs6000_return_value): Likewise.
1063 * rs6000-lynx178-tdep.c: Include "target-float.h".
1064 (rs6000_lynx178_push_dummy_call): Use target_float_convert.
1065 (rs6000_lynx178_return_value): Likewise.
1066 * rs6000-tdep.c: Include "target-float.h". Do not include "doublest.h".
1067 (rs6000_register_to_value): Use target_float_convert.
1068 (rs6000_value_to_register): Likewise.
1069 * arm-tdep.c: Include "target-float.h". Do not include "doublest.h".
1070 (arm_extract_return_value): Use target_float_convert.
1071 (arm_store_return_value): Likewise.
1072 * sh-tdep.c: Include "target-float.h". Do not include "doublest.h".
1073 (sh_register_convert_to_virtual): Use target_float_convert.
1074 (sh_register_convert_to_raw): Likewise.
1075 * sh64-tdep.c: Include "target-float.h".
1076 (sh64_extract_return_value): Use target_float_convert.
1077 (sh64_register_convert_to_virtual): Likewise.
1078 (sh64_register_convert_to_raw): Likewise. Fix argument types.
1079
1080 2017-11-06 Ulrich Weigand <uweigand@de.ibm.com>
1081
1082 * target-float.c (floatformat_to_host_double): New function.
1083 (floatformat_from_host_double): Likewise.
1084 (target_float_to_host_double): Likewise.
1085 (target_float_from_host_double): Likewise.
1086 * target-float.h (target_float_to_host_double): Add prototype.
1087 (target_float_from_host_double): Likewise.
1088
1089 * guile/scm-value.c: Include "target-float.h".
1090 (gdbscm_value_to_real): Use target_float_to_host_double.
1091 Handle integer source values via value_as_long.
1092 * guile/scm-math.c: Include "target-float.h". Do not include
1093 "doublest.h", "dfp.h", and "expression.h".
1094 (vlscm_convert_typed_number): Use target_float_from_host_double.
1095 (vlscm_convert_number): Likewise.
1096
1097 * python/py-value.c (valpy_float): Use target_float_to_host_double.
1098 (convert_value_from_python): Use target_float_from_host_double.
1099
1100 2017-11-06 Ulrich Weigand <uweigand@de.ibm.com>
1101
1102 * ada-lang.c (cast_to_fixed): Reimplement in target arithmetic.
1103 (cast_from_fixed): Likewise.
1104 (ada_scaling_type): New function.
1105 (ada_delta): Return value instead of DOUBLEST. Perform target
1106 arithmetic instead of host arithmetic.
1107 (scaling_factor): Rename to ...
1108 (ada_scaling_factor) ... this. Make non-static. Return value instead
1109 of DOUBLEST. Perform target arithmetic instead of host arithmetic.
1110 (ada_fixed_to_float): Remove.
1111 (ada_float_to_fixed): Remove.
1112 * ada-lang.h (ada_fixed_to_float): Remove.
1113 (ada_float_to_fixed): Remove.
1114 (ada_delta): Return value instead of DOUBLEST.
1115 (ada_scaling_factor): Add prototype.
1116
1117 * ada-typeprint.c: Include "target-float.h".
1118 (print_fixed_point_type): Perform target arithmetic instead of
1119 host arithmetic.
1120 * ada-valprint.c: Include "target-float.h".
1121 (ada_val_print_num): Perform target arithmetic instead of
1122 host arithmetic for fixed-point types.
1123
1124 2017-11-06 Ulrich Weigand <uweigand@de.ibm.com>
1125
1126 * target-float.c: Include <math.h>.
1127 (floatformat_binop): New function.
1128 (floatformat_compare): Likewise.
1129 (target_float_binop): Likewise.
1130 (target_float_compare): Likewise.
1131 * target-float.h: Include "expression.h".
1132 (target_float_binop): Add prototype.
1133 (target_float_compare): Likewise.
1134
1135 * valarith.c: Do not include "doublest.h" and "dfp.h".
1136 Include "common/byte-vector.h".
1137 (value_args_as_decimal): Remove, replace by ...
1138 (value_args_as_target_float): ... this function. Handle both
1139 binary and decimal target floating-point formats.
1140 (scalar_binop): Handle both binary and decimal FP using
1141 value_args_as_target_float and target_float_binop.
1142 (value_equal): Handle both binary and decimal FP using
1143 value_args_as_target_float and target_float_compare.
1144 (value_less): Likewise.
1145 (value_pos): Handle all scalar types as simple copy.
1146 (value_neg): Handle all scalar types via BINOP_SUB from 0.
1147 * dfp.c (decimal_binop): Throw error instead of internal_error
1148 when called with an unsupported operation code.
1149
1150 2017-11-06 Ulrich Weigand <uweigand@de.ibm.com>
1151
1152 * target-float.c (target_float_to_string): New function.
1153 (target_float_from_string): New function.
1154 * target-float.h (target_float_to_string): Add prototype.
1155 (target_float_from_string): Add prototype.
1156
1157 * valprint.c: Include "target-float.h". Do not include
1158 "doublest.h" and "dfp.h".
1159 (print_floating): Use target_float_to_string.
1160 * printcmd.c: Include "target-float.h". Do not include "dfp.h".
1161 (printf_floating): Use target_float_to_string.
1162 * i387-tdep.c: Include "target-float.h". Do not include "doublest.h".
1163 (print_i387_value): Use target_float_to_string.
1164 * mips-tdep.c: Include "target-float.h".
1165 (mips_print_fp_register): Use target_float_to_string.
1166 * sh64-tdep.c: Include "target-float.h".
1167 (sh64_do_fp_register): Use target_float_to_string.
1168
1169 * parse.c: Include "target-float.h". Do not include
1170 "doublest.h" and "dfp.h".
1171 (parse_float): Use target_float_from_string.
1172 * stabsread.c: Include "target-float.h". Do not include "doublest.h".
1173 (define_symbol): Use target_float_from_string.
1174 * gdbarch-selftests.c: Include "target-float.h".
1175 (register_to_value_test): Use target_float_from_string.
1176
1177 2017-11-06 Ulrich Weigand <uweigand@de.ibm.com>
1178
1179 * Makefile.c (SFILES): Add target-float.c.
1180 (HFILES_NO_SRCDIR): Add target-float.h.
1181 (COMMON_OBS): Add target-float.o.
1182 * target-float.h: New file.
1183 * target-float.c: New file.
1184
1185 * doublest.c (floatformat_classify): Fix detection of float_zero.
1186
1187 * gdbtypes.c (is_floating_type): New function.
1188 * gdbtypes.h (is_floating_type): Add prototype.
1189
1190 * value.c: Do not include "floatformat.h".
1191 (unpack_double): Use target_float_is_valid.
1192 (is_floating_value): New function.
1193 * value.h (is_floating_value): Add prototype-
1194
1195 * valarith.c: Include "target-float.h".
1196 (value_logical_not): Use target_float_is_zero.
1197
1198 * python/py-value.c: Include "target-float.h".
1199 (valpy_nonzero): Use target_float_is_zero.
1200
1201 2017-11-04 Tom Tromey <tom@tromey.com>
1202
1203 * h8300-tdep.c (h8300_push_dummy_call): Use std::vector.
1204
1205 2017-11-04 Tom Tromey <tom@tromey.com>
1206
1207 * breakpoint.c (set_momentary_breakpoint): Return
1208 breakpoint_up.
1209 (until_break_command): Update.
1210 (new_until_break_fsm): Change argument types to
1211 breakpoint_up.
1212 (set_momentary_breakpoint_at_pc): Return breakpoint_up.
1213 (do_delete_breakpoint_cleanup, make_cleanup_delete_breakpoint):
1214 Remove.
1215 * infcmd.c (finish_forward): Update.
1216 * breakpoint.h (set_momentary_breakpoint)
1217 (set_momentary_breakpoint_at_pc): Return breakpoint_up.
1218 (make_cleanup_delete_breakpoint): Remove.
1219 (struct breakpoint_deleter): New.
1220 (breakpoint_up): New typedef.
1221 * infrun.c (insert_step_resume_breakpoint_at_sal_1): Update.
1222 (insert_exception_resume_breakpoint): Update.
1223 (insert_exception_resume_from_probe): Update.
1224 (insert_longjmp_resume_breakpoint): Update.
1225 * arm-linux-tdep.c (arm_linux_copy_svc): Update.
1226 * elfread.c (elf_gnu_ifunc_resolver_stop): Update.
1227 * infcall.c (call_function_by_hand_dummy): Update
1228
1229 2017-11-04 Tom Tromey <tom@tromey.com>
1230
1231 * c-typeprint.c (c_type_print_base): Use gdb::unique_xmalloc_ptr.
1232
1233 2017-11-04 Tom Tromey <tom@tromey.com>
1234
1235 * linux-tdep.c (linux_core_info_proc_mappings): Use
1236 gdb::def_vector.
1237 (linux_get_siginfo_data): Return gdb::byte_vector. Remove
1238 "size" argument.
1239 (linux_corefile_thread): Update.
1240 (linux_make_corefile_notes): Remove unused variable.
1241
1242 2017-11-04 Tom Tromey <tom@tromey.com>
1243
1244 * ppc-linux-tdep.c (ppc_linux_get_syscall_number): Use
1245 gdb::byte_vector.
1246
1247 2017-11-04 Tom Tromey <tom@tromey.com>
1248
1249 * objfiles.c (do_free_objfile_cleanup): Remove.
1250 * compile/compile-object-load.c (compile_object_load): Update.
1251 * objfiles.h (make_cleanup_free_objfile): Remove.
1252
1253 2017-11-04 Tom Tromey <tom@tromey.com>
1254
1255 * sparc64-tdep.c (do_examine): Use gdb::def_vector.
1256 (adi_read_versions): Change "tags" to "gdb_byte *".
1257 (adi_print_versions): Likewise.
1258
1259 2017-11-04 Tom Tromey <tom@tromey.com>
1260
1261 * breakpoint.c
1262 (scoped_rbreak_breakpoints::scoped_rbreak_breakpoints): Rename
1263 from start_rbreak_breakpoints.
1264 (scoped_rbreak_breakpoints): Rename from end_rbreak_breakpoints.
1265 * breakpoint.h (class scoped_rbreak_breakpoints): New.
1266 (start_rbreak_breakpoints, end_rbreak_breakpoints): Remove.
1267 * symtab.c (do_end_rbreak_breakpoints): Remove.
1268 (rbreak_command): Use scoped_rbreak_breakpoints, std::string.
1269
1270 2017-11-04 Tom Tromey <tom@tromey.com>
1271
1272 * cp-namespace.c (reset_directive_searched): Remove.
1273 (cp_lookup_symbol_via_imports): Use scoped_restore.
1274 * cp-support.c (reset_directive_searched): Remove.
1275 (make_symbol_overload_list_using): Use scoped_restore.
1276 * d-namespace.c (d_lookup_symbol_imports): Use scoped_restore.
1277 (reset_directive_searched): Remove.
1278
1279 2017-11-04 Tom Tromey <tom@tromey.com>
1280
1281 * symfile.c (find_separate_debug_file_by_debuglink): Use
1282 unique_xmalloc_ptr.
1283
1284 2017-11-04 Tom Tromey <tom@tromey.com>
1285
1286 * compile/compile-loc2c.c (compute_stack_depth_worker): Change
1287 type of "info".
1288 (compute_stack_depth): Likewise.
1289 (do_compile_dwarf_expr_to_c): Use std::vector.
1290
1291 2017-11-04 Tom Tromey <tom@tromey.com>
1292
1293 * compile/compile-object-load.c (link_callbacks_einfo): Use
1294 std::string.
1295
1296 2017-11-04 Tom Tromey <tom@tromey.com>
1297
1298 * dwarf2read.c (process_full_comp_unit, process_full_type_unit):
1299 Use scoped_free_pendings.
1300 * dbxread.c (dbx_symfile_read, dbx_psymtab_to_symtab_1): Use
1301 scoped_free_pendings.
1302 * xcoffread.c (xcoff_psymtab_to_symtab_1): Use scoped_free_pendings.
1303 (xcoff_initial_scan): Likewise.
1304 * buildsym.c (reset_symtab_globals): Update comment.
1305 (scoped_free_pendings): Rename from really_free_pendings.
1306 (prepare_for_building): Update comment.
1307 (buildsym_init): Likewise.
1308 * buildsym.h (class scoped_free_pendings): New class.
1309 (really_free_pendings): Don't declare.
1310
1311 2017-11-03 Ulrich Weigand <uweigand@de.ibm.com>
1312
1313 * doublest.c (convert_doublest_to_floatformat): Fix uninitialized
1314 output when converting a zero value to a special byteorder format.
1315
1316 2017-11-02 Yao Qi <yao.qi@linaro.org>
1317
1318 * frame.c (do_frame_register_read): Remove aspace.
1319 * jit.c (jit_frame_sniffer): Likwise.
1320 * ppc-linux-tdep.c (ppu2spu_sniffer): Likewise.
1321 * regcache.c (regcache::regcache): Pass nullptr.
1322 (regcache_print): Caller updated.
1323 * regcache.h (regcache::regcache): Remove one constructor
1324 parameter aspace.
1325
1326 2017-11-02 Yao Qi <yao.qi@linaro.org>
1327
1328 * regcache.h (regcache) <m_readonly_p>: Change it to const bool.
1329
1330 2017-11-02 Yao Qi <yao.qi@linaro.org>
1331
1332 * breakpoint.c (insert_single_step_breakpoints): Update.
1333 * frame.c (struct frame_info) <aspace>: Add const.
1334 (frame_save_as_regcache): Add const.
1335 (get_frame_address_space): Return const address_space *.
1336 * frame.h (get_frame_address_space): Update declaration.
1337 * infrun.c (struct step_over_info) <aspace>: Add const.
1338 (set_step_over_info): Make aspace const.
1339 (displaced_step_prepare_throw): Change variable const.
1340 (resume): Likewise.
1341 (proceed): Likewise.
1342 (adjust_pc_after_break): Likewise.
1343 (save_waitstatus): Likewise.
1344 (handle_signal_stop): Likewise.
1345 (keep_going_pass_signal): Likewise.
1346 * jit.c (jit_frame_sniffer): Add const.
1347 * mips-tdep.c (mips_single_step_through_delay): Likewise.
1348 * ppc-linux-tdep.c (ppu2spu_sniffer): Likewise.
1349 * record-full.c (record_full_wait_1): Likewise.
1350 * regcache.c (regcache::regcache): Change parameter to const.
1351 * regcache.h (regcache::regcache): Likewise.
1352 (regcache::aspace): Return const address_space *.
1353 (regcache) <m_aspace>: Add const.
1354
1355 2017-11-02 Yao Qi <yao.qi@linaro.org>
1356
1357 * darwin-nat.c (cancel_breakpoint): Use regcache->aspace ().
1358 * frame.c (create_sentinel_frame): Likewise.
1359 * infrun.c (displaced_step_prepare_throw): Likewise.
1360 (resume): Likewise.
1361 (thread_still_needs_step_over_bp): Likewise.
1362 (proceed): Likewise.
1363 (do_target_wait): Likewise.
1364 (adjust_pc_after_break): Likewise.
1365 (handle_syscall_event): Likewise.
1366 (save_waitstatus): Likewise.
1367 (handle_inferior_event_1): Likewise.
1368 (handle_signal_stop): Likewise.
1369 (keep_going_pass_signal): Likewise.
1370 * linux-nat.c (status_callback): Likewise.
1371 (save_stop_reason): Likewise.
1372 (resume_stopped_resumed_lwps): Likewise.
1373 * record-full.c (record_full_exec_insn): Likewise.
1374 (record_full_wait_1): Likewise.
1375 * regcache.c (get_regcache_aspace): Remove.
1376 * regcache.h (get_regcache_aspace): Remove.
1377
1378 2017-11-02 Yao Qi <yao.qi@linaro.org>
1379
1380 * regcache.c (struct regcache_descr) <nr_raw_registers>: Remove.
1381 (init_regcache_descr): Use gdbarch_num_regs.
1382 (regcache::regcache): Likewise.
1383 (regcache::get_register_status): Likewise.
1384 (regcache::assert_raw_regnum): Likewise.
1385 (regcache::cooked_read): Likewise.
1386 (regcache::cooked_read_value): Likewise.
1387 (regcache::cooked_write): Likewise.
1388 (regcache::dump): Likewise.
1389 (regcache::num_raw_registers): New method.
1390 * regcache.h (class regcache) <num_raw_registers>: New.
1391
1392 2017-11-02 Yao Qi <yao.qi@linaro.org>
1393
1394 * regcache.c (regcache::assert_regnum): New method.
1395 (regcache::invalidate): Call assert_regnum.
1396 (regcache::raw_update): Likewise.
1397 (regcache::raw_write): Likewise.
1398 (regcache::raw_read_part): Likewise.
1399 (regcache::raw_write_part): Likewise.
1400 (regcache::raw_supply): Likewise.
1401 (regcache::raw_supply_integer): Likewise.
1402 (regcache::raw_supply_zeroed): Likewise.
1403 (regcache::raw_collect): Likewise.
1404 (regcache::raw_collect_integer): Likewise.
1405 * regcache.h (regcache::assert_regnum): Declare.
1406
1407 2017-11-02 Yao Qi <yao.qi@linaro.org>
1408
1409 * regcache.c (regcache::dump): Remove code.
1410
1411 2017-11-02 Yao Qi <yao.qi@linaro.org>
1412
1413 * regcache.c (struct regcache_descr) <sizeof_raw_register_status>:
1414 Remove.
1415 <sizeof_cooked_register_status>: Remove.
1416 (init_regcache_descr): Update.
1417 (regcache::regcache): Use nr_cooked_registers and nr_raw_registers.
1418 (regcache::save): Likewise.
1419 (regcache::dump): Likewise.
1420
1421 2017-11-01 James Bowman <james.bowman@ftdichip.com>
1422
1423 * ft32-tdep.c (ft32_fetch_instruction): New function.
1424 (ft32_analyze_prologue): Use ft32_fetch_instruction().
1425
1426 2017-10-31 Simon Marchi <simon.marchi@polymtl.ca>
1427
1428 * cli/cli-script.c (execute_control_command): Rename to ...
1429 (execute_control_command_1): ... this.
1430 (execute_control_command): New function.
1431
1432 2017-10-31 Simon Marchi <simon.marchi@ericsson.com>
1433
1434 * tracepoint.c (tfind_command): Remove const_cast.
1435
1436 2017-10-30 Mike Gulick <mgulick@mathworks.com>
1437
1438 * Makefile.in (HFILES_NO_SRCDIR): Remove reference to gdb.h.
1439
1440 2017-10-30 Simon Marchi <simon.marchi@ericsson.com>
1441
1442 * common/common-utils.h (in_inclusive_range): New function.
1443 * arm-tdep.c (arm_record_extension_space): Use
1444 in_inclusive_range.
1445 (thumb_record_ld_st_reg_offset): Use in_inclusive_range.
1446 * cris-tdep.c (cris_spec_reg_applicable): Use
1447 in_inclusive_range.
1448
1449 2017-10-30 Pedro Alves <palves@redhat.com>
1450 Simon Marchi <simon.marchi@ericsson.com>
1451
1452 * remote.c (remote_set_syscall_catchpoint): Build a std::string
1453 instead of a gdb::unique_xmalloc_ptr, using string_appendf.
1454
1455 2017-10-30 Pedro Alves <palves@redhat.com>
1456
1457 * common/common-utils.c (string_appendf, string_vappendf): New
1458 functions.
1459 * common/common-utils.h (string_appendf, string_vappendf): New
1460 declarations.
1461 * unittests/common-utils-selftests.c (string_appendf_func)
1462 (test_appendf_func, string_vappendf_wrapper, string_appendf_tests)
1463 (string_vappendf_tests): New functions.
1464 (_initialize_common_utils_selftests): Register "string_appendf" and
1465 "string_vappendf tests".
1466
1467 2017-10-30 Pedro Alves <palves@redhat.com>
1468
1469 * unittests/common-utils-selftests.c (format_func): New typedef.
1470 (string_printf_tests, string_vprintf_tests): Tests factored out
1471 and merged to ...
1472 (test_format_func): ... this new function.
1473 (string_printf_tests, string_vprintf_tests): Reimplement on top of
1474 test_format_func.
1475
1476 2017-10-29 Simon Marchi <simon.marchi@ericsson.com>
1477
1478 * darwin-nat.c: Remove include of gdb.h.
1479
1480 2017-10-29 Simon Marchi <simon.marchi@ericsson.com>
1481
1482 * xtensa-xtregs.c: Fix formatting issues.
1483
1484 2017-10-29 Simon Marchi <simon.marchi@ericsson.com>
1485
1486 * xtensa-xtregs.c (xtensa_regtable_t) <name>: Constify.
1487
1488 2017-10-28 Maksim Dzabraev <dzabraew@gmail.com>
1489
1490 PR python/21213
1491 * python/py-infthread.c (thpy_get_inferior): Increment reference
1492 of inferior before returning it.
1493
1494 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
1495
1496 * unittests/common-utils-selftests.c (format): Add
1497 ATTRIBUTE_PRINTF.
1498
1499 2017-10-27 Simon Marchi <simon.marchi@polymtl.ca>
1500
1501 * xml-syscall.c (struct syscall_desc): Add constructor.
1502 <name>: Change type to std::string.
1503 (syscall_desc_up): New typedef.
1504 (syscall_desc_p): Remove typeder.
1505 (DEF_VEC_P(syscall_desc_p)): Remove.
1506 (struct syscall_group_desc): Add constructor.
1507 <name>: Change type to std::string.
1508 <syscalls>: Change type to std::vector.
1509 (syscall_group_desc_up): New typedef.
1510 (syscall_group_desc_p): Remove typedef.
1511 (DEF_VEC_P(syscall_group_desc_p)): Remove.
1512 (struct syscalls_info) <syscalls>: Change type to std::vector of
1513 unique_ptr.
1514 <groups>: Likewise.
1515 <my_gdb_datadir>: Change type to std::string.
1516 (syscalls_info_up): New typedef.
1517 (allocate_syscalls_info): Remove.
1518 (syscalls_info_free_syscalls_desc): Remove.
1519 (syscalls_info_free_syscall_group_desc): Remove.
1520 (free_syscalls_info): Remove.
1521 (make_cleanup_free_syscalls_info): Remove.
1522 (syscall_group_create_syscall_group_desc): Adjust.
1523 (syscall_group_add_syscall): Adjust.
1524 (syscall_create_syscall_desc): Adjust.
1525 (syscall_parse_xml): Adjust, use unique_ptr instead of cleanup.
1526 (init_syscalls_info): Adjust.
1527 (syscall_group_get_group_by_name): Adjust.
1528 (xml_get_syscall_number): Adjust.
1529 (xml_get_syscall_name): Adjust.
1530 (xml_list_of_syscalls): Adjust.
1531 (xml_list_syscalls_by_group): Adjust.
1532 (xml_list_of_groups): Adjust.
1533
1534 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
1535
1536 * probe.h: Don't include gdb_vecs.h.
1537 (DEF_VEC_P (probe_p)): Remove.
1538 (find_probes_in_objfile): Return an std::vector.
1539 * probe.c (find_probes_in_objfile): Likewise.
1540 * breakpoint.c (breakpoint_objfile_data)
1541 <longjmp_probes>: Change type to std::vector.
1542 <exception_probes>: Likewise.
1543 (free_breakpoint_probes): Don't manually free vectors.
1544 (create_longjmp_master_breakpoint): Adjust.
1545 (create_exception_master_breakpoint): Adjust.
1546 * solib-svr4.c (svr4_create_probe_breakpoints): Change
1547 parameter type, adjust.
1548 (svr4_create_solib_event_breakpoints): Adjust.
1549
1550 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
1551
1552 * breakpoint.c (breakpoint_objfile_data): Initialize fields.
1553 (get_breakpoint_objfile_data): Allocate breakpoint_objfile_data
1554 with new.
1555 (free_breakpoint_probes): Rename to ...
1556 (free_breakpoint_objfile_data): ... this, and call delete on
1557 bp_objfile_data..
1558
1559 2017-10-27 Simon Marchi <simon.marchi@polymtl.ca>
1560
1561 * auto-load.c: Don't include gdb_vecs.h, include algorithm.
1562 (loaded_script_ptr): Remove typedef.
1563 (DEF_VEC_P (loaded_script_ptr)): Remove.
1564 (struct collect_matching_scripts_data): Add constructor.
1565 <scripts_p>: Change type to (pointer to) std::vector.
1566 (collect_matching_scripts_data): Adjust.
1567 (sort_scripts_by_name): Make suitable for std::sort.
1568 (print_scripts): Don't sort vector, adjust to std::vector.
1569 (auto_load_info_scripts): Sort vectors, adjust to std::vector.
1570
1571 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
1572
1573 * symfile.c (filename_language): Make struct, not typedef. Add
1574 constructor.
1575 <ext>: Change type to std::string.
1576 (DEF_VEC_O (filename_language)): Remove.
1577 (filename_language_table): Change type to std::vector.
1578 (add_filename_language): Adjust.
1579 (set_ext_lang_command): Adjust.
1580 (info_ext_lang_command): Adjust.
1581 (deduce_language_from_filename): Adjust.
1582 (class scoped_restore_filename_language_table): Remove.
1583 (test_filename_language): Use scoped_restore.
1584 (test_set_ext_lang_command): Use scoped_restore, adjust to
1585 std::vector change.
1586
1587 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
1588
1589 * symfile.c: Include selftest.h.
1590 (class scoped_restore_filename_language_table): New.
1591 (test_filename_language): New test.
1592 (test_set_ext_lang_command): New test.
1593 (_initialize_symfile): Register tests.
1594
1595 2017-10-27 Keith Seitz <keiths@redhat.com>
1596
1597 * breakpoint.c (print_breakpoint_location): Use the symbol saved
1598 in the bp_location, falling back to find_pc_sect_function when
1599 needed.
1600 (add_location_to_breakpoint): Save sal->symbol.
1601 * breakpoint.h (struct bp_location) <symbol>: New field.
1602 * symtab.c (find_function_start_sal): Save the symbol into the SaL.
1603 * symtab.h (struct symtab_and_line) <symbol>: New field.
1604
1605 2017-10-26 Patrick Frants <osscontribute@gmail.com>
1606
1607 PR gdb/13669
1608 * cp-valprint.c (cp_print_value_fields): Use obstack_blank_fast
1609 to rewind obstack.
1610
1611 2017-10-26 Pedro Alves <palves@redhat.com>
1612
1613 * remote.c (remote_async_terminal_ours_p): Delete.
1614 (remote_open_1, remote_terminal_inferior, remote_terminal_ours):
1615 Remove references to 'remote_async_terminal_ours_p'.
1616
1617 2017-10-26 Yao Qi <yao.qi@linaro.org>
1618
1619 * breakpoint.h (regular_breakpoint_inserted_here_p): Remove.
1620
1621 2017-10-26 Yao Qi <yao.qi@linaro.org>
1622
1623 * break-catch-sig.c (signal_catchpoint_breakpoint_hit): Make
1624 aspace const.
1625 * break-catch-syscall.c (breakpoint_hit_catch_syscall):
1626 Likewise.
1627 * breakpoint.c (bpstat_check_location): Remove cast.
1628 (breakpoint_hit_catch_fork): Make aspce const.
1629 (breakpoint_hit_catch_solib): Likewise.
1630 (breakpoint_hit_catch_exec): Likewise.
1631 (breakpoint_hit_ranged_breakpoint): Likewise.
1632 (breakpoint_hit_watchpoint): Likewise.
1633 (base_breakpoint_breakpoint_hit): Likewise.
1634 (bkpt_breakpoint_hit): Likewise.
1635 (dprintf_breakpoint_hit): Likewise.
1636 (tracepoint_breakpoint_hit): Likewise.
1637 * breakpoint.h (breakpoint_ops) <breakpoint_hit>: Likewise.
1638
1639 2017-10-26 Yao Qi <yao.qi@linaro.org>
1640
1641 * breakpoint.c (breakpoint_location_address_match): Change
1642 "struct address_space *" to "const address_space".
1643 (breakpoint_location_address_range_overlap): Likewise.
1644 (breakpoint_here_p): Likewise.
1645 (breakpoint_in_range_p): Likewise.
1646 (moribund_breakpoint_here_p): Likewise.
1647 (bp_location_inserted_here_p): Likewise.
1648 (software_breakpoint_inserted_here_p): Likewise.
1649 (hardware_breakpoint_inserted_here_p): Likewise.
1650 (hardware_watchpoint_inserted_in_range): Likewise.
1651 (bpstat_check_location): Likewise.
1652 (bpstat_stop_status): Likewise.
1653 (breakpoint_address_match): Likewise.
1654 (breakpoint_address_match_range): Likewise.
1655 (breakpoint_location_address_match): Likewise.
1656 (breakpoint_location_address_range_overlap): Likewise.
1657 (insert_single_step_breakpoint): Likewise.
1658 (breakpoint_has_location_inserted_here): Likewise.
1659 (single_step_breakpoint_inserted_here_p): Likewise.
1660 (pc_at_non_inline_function): Likewise.
1661 * breakpoint.h (bpstat_stop_status): Update declaration.
1662 (breakpoint_here_p): Likewise.
1663 (breakpoint_in_range_p): Likewise.
1664 (moribund_breakpoint_here_p): Likewise.
1665 (breakpoint_inserted_here_p): Likewise.
1666 (software_breakpoint_inserted_here_p): Likewise.
1667 (hardware_breakpoint_inserted_here_p): Likewise.
1668 (breakpoint_has_location_inserted_here): Likewise.
1669 (single_step_breakpoint_inserted_here_p): Likewise.
1670 (hardware_watchpoint_inserted_in_range): Likewise.
1671 (breakpoint_address_match): Likewise.
1672 (insert_single_step_breakpoint): Likewise.
1673 (pc_at_non_inline_function): Likewise.
1674 * gdbthread.h (thread_has_single_step_breakpoint_here): Likewise.
1675 * record.c (record_check_stopped_by_breakpoint): Likewise.
1676 * record.h (record_check_stopped_by_breakpoint): Likewise.
1677 * thread.c (thread_has_single_step_breakpoint_here): Likewise.
1678
1679 2017-10-25 Yao Qi <yao.qi@linaro.org>
1680
1681 * aarch32-linux-nat.c (aarch32_gp_regcache_supply): Use
1682 regcache->arch () instead get_regcache_arch.
1683 * aarch64-fbsd-nat.c (aarch64_fbsd_fetch_inferior_registers):
1684 Likewise.
1685 (aarch64_fbsd_store_inferior_registers): Likewise.
1686 * aarch64-linux-nat.c (fetch_gregs_from_thread): Likewise.
1687 (store_gregs_to_thread): Likewise.
1688 (fetch_fpregs_from_thread): Likewise.
1689 (store_fpregs_to_thread): Likewise.
1690 * aarch64-tdep.c (aarch64_extract_return_value): Likewise.
1691 (aarch64_store_return_value): Likewise.
1692 (aarch64_software_single_step): Likewise.
1693 * aix-thread.c (aix_thread_wait): Likewise.
1694 (supply_reg32): Likewise.
1695 (supply_sprs64): Likewise.
1696 (supply_sprs32): Likewise.
1697 (fill_gprs64): Likewise.
1698 (fill_gprs32): Likewise.
1699 (fill_sprs64): Likewise.
1700 (fill_sprs32): Likewise.
1701 (store_regs_user_thread): Likewise.
1702 (store_regs_kernel_thread): Likewise.
1703 * alpha-bsd-nat.c (alphabsd_fetch_inferior_registers): Likewise.
1704 (alphabsd_store_inferior_registers): Likewise.
1705 * alpha-tdep.c (alpha_extract_return_value): Likewise.
1706 (alpha_store_return_value): Likewise.
1707 (alpha_deal_with_atomic_sequence): Likewise.
1708 (alpha_next_pc): Likewise.
1709 (alpha_software_single_step): Likewise.
1710 * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers): Likewise.
1711 (amd64bsd_store_inferior_registers): Likewise.
1712 * amd64-linux-nat.c (amd64_linux_fetch_inferior_registers):
1713 Likewise.
1714 (amd64_linux_store_inferior_registers): Likewise.
1715 * amd64-nat.c (amd64_supply_native_gregset): Likewise.
1716 (amd64_collect_native_gregset): Likewise.
1717 * amd64-obsd-tdep.c (amd64obsd_supply_uthread): Likewise.
1718 (amd64obsd_collect_uthread): Likewise.
1719 * amd64-tdep.c (amd64_supply_fpregset): Likewise.
1720 (amd64_collect_fpregset): Likewise.
1721 (amd64_supply_fxsave): Likewise.
1722 (amd64_supply_xsave): Likewise.
1723 (amd64_collect_fxsave): Likewise.
1724 (amd64_collect_xsave): Likewise.
1725 * arc-tdep.c (arc_write_pc): Likewise.
1726 * arch-utils.c (default_skip_permanent_breakpoint): Likewise.
1727 * arm-fbsd-nat.c (arm_fbsd_fetch_inferior_registers): Likewise.
1728 (arm_fbsd_store_inferior_registers): Likewise.
1729 * arm-linux-nat.c (fetch_vfp_regs): Likewise.
1730 (store_vfp_regs): Likewise.
1731 (arm_linux_fetch_inferior_registers): Likewise.
1732 (arm_linux_store_inferior_registers): Likewise.
1733 * arm-linux-tdep.c (arm_linux_supply_gregset): Likewise.
1734 (arm_linux_sigreturn_next_pc): Likewise.
1735 (arm_linux_get_next_pcs_syscall_next_pc): Likewise.
1736 * arm-nbsd-nat.c (arm_supply_gregset): Likewise.
1737 (fetch_register): Likewise.
1738 (store_register): Likewise.
1739 * arm-tdep.c (arm_is_thumb): Likewise.
1740 (displaced_in_arm_mode): Likewise.
1741 (bx_write_pc): Likewise.
1742 (arm_get_next_pcs_addr_bits_remove): Likewise.
1743 (arm_software_single_step): Likewise.
1744 (arm_extract_return_value): Likewise.
1745 (arm_store_return_value): Likewise.
1746 (arm_write_pc): Likewise.
1747 * bfin-tdep.c (bfin_extract_return_value): Likewise.
1748 * bsd-uthread.c (bsd_uthread_fetch_registers): Likewise.
1749 (bsd_uthread_store_registers): Likewise.
1750 * core-regset.c (fetch_core_registers): Likewise.
1751 * corelow.c (get_core_registers): Likewise.
1752 * cris-tdep.c (cris_store_return_value): Likewise.
1753 (cris_extract_return_value): Likewise.
1754 (find_step_target): Likewise.
1755 (find_step_target): Likewise.
1756 (cris_software_single_step): Likewise.
1757 * ctf.c (ctf_fetch_registers): Likewise.
1758 * darwin-nat.c (cancel_breakpoint): Likewise.
1759 * fbsd-tdep.c (fbsd_collect_thread_registers): Likewise.
1760 * frv-tdep.c (frv_extract_return_value): Likewise.
1761 * ft32-tdep.c (ft32_store_return_value): Likewise.
1762 (ft32_extract_return_value): Likewise.
1763 * go32-nat.c (fetch_register): Likewise.
1764 (go32_fetch_registers): Likewise.
1765 (go32_store_registers): Likewise.
1766 (store_register): Likewise.
1767 * h8300-tdep.c (h8300_extract_return_value): Likewise.
1768 (h8300_store_return_value): Likewise.
1769 * hppa-linux-nat.c (fetch_register): Likewise.
1770 (store_register): Likewise.
1771 (hppa_linux_fetch_inferior_registers): Likewise.
1772 (hppa_linux_store_inferior_registers): Likewise.
1773 * i386-darwin-nat.c (i386_darwin_fetch_inferior_registers): Likewise.
1774 (i386_darwin_store_inferior_registers): Likewise.
1775 * i386-gnu-nat.c (gnu_fetch_registers): Likewise.
1776 (gnu_store_registers): Likewise.
1777 * i386-linux-nat.c (fetch_register): Likewise.
1778 (store_register): Likewise.
1779 (supply_gregset): Likewise.
1780 (fill_gregset): Likewise.
1781 (i386_linux_fetch_inferior_registers): Likewise.
1782 (i386_linux_store_inferior_registers): Likewise.
1783 (i386_linux_resume): Likewise.
1784 * i386-linux-tdep.c (i386_linux_get_syscall_number_from_regcache):
1785 Likewise.
1786 * i386-nto-tdep.c (i386nto_supply_gregset): Likewise.
1787 * i386-obsd-nat.c (i386obsd_supply_pcb): Likewise.
1788 * i386-obsd-tdep.c (i386obsd_supply_uthread): Likewise.
1789 (i386obsd_collect_uthread): Likewise.
1790 * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
1791 (i386_supply_gregset): Likewise.
1792 (i386_collect_gregset): Likewise.
1793 (i386_supply_fpregset): Likewise.
1794 (i386_collect_fpregset): Likewise.
1795 (i386_mpx_bd_base): Likewise.
1796 * i386-v4-nat.c (supply_fpregset): Likewise.
1797 (fill_fpregset): Likewise.
1798 * i387-tdep.c (i387_supply_fsave): Likewise.
1799 (i387_collect_fsave): Likewise.
1800 (i387_supply_fxsave): Likewise.
1801 (i387_collect_fxsave): Likewise.
1802 (i387_supply_xsave): Likewise.
1803 (i387_collect_xsave): Likewise.
1804 * ia64-linux-nat.c (ia64_linux_fetch_registers): Likewise.
1805 (ia64_linux_store_registers): Likewise.
1806 * ia64-tdep.c (ia64_access_rse_reg): Likewise.
1807 (ia64_extract_return_value): Likewise.
1808 (ia64_store_return_value): Likewise.
1809 (find_func_descr): Likewise.
1810 * inf-child.c (inf_child_fetch_inferior_registers): Likewise.
1811 * inf-ptrace.c (inf_ptrace_fetch_registers): Likewise.
1812 (inf_ptrace_store_registers): Likewise.
1813 * infrun.c (use_displaced_stepping): Likewise.
1814 (displaced_step_prepare_throw): Likewise.
1815 (resume): Likewise.
1816 (proceed): Likewise.
1817 (do_target_wait): Likewise.
1818 (adjust_pc_after_break): Likewise.
1819 (handle_inferior_event_1): Likewise.
1820 (handle_signal_stop): Likewise.
1821 (save_infcall_suspend_state): Likewise.
1822 (restore_infcall_suspend_state): Likewise.
1823 * iq2000-tdep.c (iq2000_extract_return_value): Likewise.
1824 * jit.c (jit_frame_prev_register): Likewise.
1825 * linux-nat.c (save_stop_reason): Likewise.
1826 (linux_nat_wait_1): Likewise.
1827 (resume_stopped_resumed_lwps): Likewise.
1828 * linux-record.c (record_linux_sockaddr): Likewise.
1829 (record_linux_msghdr): Likewise.
1830 (record_linux_system_call): Likewise.
1831 * linux-tdep.c (linux_collect_thread_registers): Likewise.
1832 * lm32-tdep.c (lm32_extract_return_value): Likewise.
1833 (lm32_store_return_value): Likewise.
1834 * m32c-tdep.c (m32c_read_flg): Likewise.
1835 (m32c_pseudo_register_read): Likewise.
1836 (m32c_pseudo_register_write): Likewise.
1837 * m32r-linux-tdep.c (m32r_linux_supply_gregset): Likewise.
1838 (m32r_linux_collect_gregset): Likewise.
1839 * m32r-tdep.c (m32r_store_return_value): Likewise.
1840 (m32r_extract_return_value): Likewise.
1841 * m68k-bsd-nat.c (m68kbsd_supply_fpregset): Likewise.
1842 (m68kbsd_collect_fpregset): Likewise.
1843 * m68k-bsd-tdep.c (m68kbsd_supply_fpregset): Likewise.
1844 * m68k-linux-nat.c (fetch_register): Likewise.
1845 (old_fetch_inferior_registers): Likewise.
1846 (old_store_inferior_registers): Likewise.
1847 (store_regs): Likewise.
1848 * m68k-tdep.c (m68k_svr4_extract_return_value): Likewise.
1849 (m68k_svr4_store_return_value): Likewise.
1850 * m88k-tdep.c (m88k_store_arguments): Likewise.
1851 * mi/mi-main.c (mi_cmd_data_list_changed_registers): Likewise.
1852 (mi_cmd_data_write_register_values): Likewise.
1853 * mips-fbsd-nat.c (mips_fbsd_fetch_inferior_registers): Likewise.
1854 (mips_fbsd_store_inferior_registers): Likewise.
1855 * mips-fbsd-tdep.c (mips_fbsd_supply_fpregs): Likewise.
1856 (mips_fbsd_supply_gregs): Likewise.
1857 (mips_fbsd_collect_fpregs): Likewise.
1858 (mips_fbsd_collect_gregs): Likewise.
1859 (mips_fbsd_supply_fpregset): Likewise.
1860 (mips_fbsd_collect_fpregset): Likewise.
1861 (mips_fbsd_supply_gregset): Likewise.
1862 (mips_fbsd_collect_gregset): Likewise.
1863 * mips-linux-nat.c (supply_gregset): Likewise.
1864 (fill_gregset): Likewise.
1865 (supply_fpregset): Likewise.
1866 (fill_fpregset): Likewise.
1867 * mips-linux-tdep.c (mips_supply_gregset): Likewise.
1868 (mips_fill_gregset): Likewise.
1869 (mips_supply_fpregset): Likewise.
1870 (mips_fill_fpregset): Likewise.
1871 (mips64_supply_gregset): Likewise.
1872 (micromips_linux_sigframe_validate): Likewise.
1873 * mips-nbsd-nat.c (mipsnbsd_fetch_inferior_registers): Likewise.
1874 (mipsnbsd_fetch_inferior_registers): Likewise.
1875 (mipsnbsd_store_inferior_registers): Likewise.
1876 * mips-nbsd-tdep.c (mipsnbsd_supply_fpregset): Likewise.
1877 (mipsnbsd_supply_gregset): Likewise.
1878 (mipsnbsd_iterate_over_regset_sections): Likewise.
1879 (mipsnbsd_supply_reg): Likewise.
1880 (mipsnbsd_supply_fpreg): Likewise.
1881 * mips-tdep.c (mips_in_frame_stub): Likewise.
1882 (mips_dummy_id): Likewise.
1883 (is_octeon_bbit_op): Likewise.
1884 (micromips_bc1_pc): Likewise.
1885 (extended_mips16_next_pc): Likewise.
1886 (mips16_next_pc): Likewise.
1887 (deal_with_atomic_sequence): Likewise.
1888 * moxie-tdep.c (moxie_process_readu): Likewise.
1889 * nios2-tdep.c (nios2_get_next_pc): Likewise.
1890 * nto-procfs.c (procfs_store_registers): Likewise.
1891 * ppc-fbsd-nat.c (ppcfbsd_fetch_inferior_registers): Likewise.
1892 (ppcfbsd_store_inferior_registers): Likewise.
1893 * ppc-linux-nat.c (fetch_vsx_register): Likewise.
1894 (fetch_altivec_register): Likewise.
1895 (get_spe_registers): Likewise.
1896 (fetch_spe_register): Likewise.
1897 (fetch_altivec_registers): Likewise.
1898 (fetch_all_gp_regs): Likewise.
1899 (fetch_all_fp_regs): Likewise.
1900 (store_vsx_register): Likewise.
1901 (store_altivec_register): Likewise.
1902 (set_spe_registers): Likewise.
1903 (store_spe_register): Likewise.
1904 (store_altivec_registers): Likewise.
1905 (store_all_gp_regs): Likewise.
1906 (store_all_fp_regs): Likewise.
1907 * ppc-linux-tdep.c (ppc_linux_supply_gregset): Likewise.
1908 (ppc_linux_collect_gregset): Likewise.
1909 (ppc_canonicalize_syscall): Likewise.
1910 (ppc_linux_record_signal): Likewise.
1911 (ppu2spu_prev_register): Likewise.
1912 * ppc-nbsd-nat.c (ppcnbsd_supply_pcb): Likewise.
1913 * ppc-obsd-nat.c (ppcobsd_fetch_registers): Likewise.
1914 (ppcobsd_store_registers): Likewise.
1915 * ppc-ravenscar-thread.c (ppc_ravenscar_generic_fetch_registers):
1916 Likewise.
1917 (ppc_ravenscar_generic_store_registers): Likewise.
1918 * procfs.c (procfs_fetch_registers): Likewise.
1919 (procfs_store_registers): Likewise.
1920 * ravenscar-thread.c (ravenscar_fetch_registers): Likewise.
1921 (ravenscar_store_registers): Likewise.
1922 (ravenscar_prepare_to_store): Likewise.
1923 * record-btrace.c (record_btrace_fetch_registers): Likewise.
1924 * record-full.c (record_full_wait_1): Likewise.
1925 (record_full_registers_change): Likewise.
1926 (record_full_store_registers): Likewise.
1927 (record_full_core_fetch_registers): Likewise.
1928 (record_full_save): Likewise.
1929 (record_full_goto_insn): Likewise.
1930 * regcache.c (regcache_register_size): Likewise.
1931 (get_regcache_arch): Remove.
1932 (regcache_read_pc): Likewise.
1933 * regcache.h (get_regcache_arch): Remove.
1934 * remote-sim.c (gdbsim_fetch_register): Likewise.
1935 (gdbsim_store_register): Likewise.
1936 * remote.c (fetch_register_using_p): Likewise.
1937 (send_g_packet): Likewise.
1938 (remote_prepare_to_store): Likewise.
1939 (store_registers_using_G): Likewise.
1940 * reverse.c (save_bookmark_command): Likewise.
1941 (goto_bookmark_command): Likewise.
1942 * rs6000-aix-tdep.c (branch_dest): Likewise.
1943 * rs6000-nat.c (rs6000_ptrace64): Likewise.
1944 (fetch_register): Likewise.
1945 * rs6000-tdep.c (ppc_supply_reg): Likewise.
1946 (ppc_collect_reg): Likewise.
1947 (ppc_collect_gregset): Likewise.
1948 (ppc_collect_fpregset): Likewise.
1949 (ppc_collect_vsxregset): Likewise.
1950 (ppc_collect_vrregset): Likewise.
1951 (ppc_displaced_step_hw_singlestep): Likewise.
1952 (rs6000_pseudo_register_read): Likewise.
1953 (rs6000_pseudo_register_write): Likewise.
1954 * s390-linux-nat.c (supply_gregset): Likewise.
1955 (fill_gregset): Likewise.
1956 (s390_linux_fetch_inferior_registers): Likewise.
1957 * s390-linux-tdep.c (s390_write_pc): Likewise.
1958 (s390_software_single_step): Likewise.
1959 (s390_all_but_pc_registers_record): Likewise.
1960 (s390_linux_syscall_record): Likewise.
1961 * sentinel-frame.c (sentinel_frame_prev_arch): Likewise.
1962 * sh-nbsd-nat.c (shnbsd_fetch_inferior_registers): Likewise.
1963 (shnbsd_store_inferior_registers): Likewise.
1964 * sh-tdep.c (sh_extract_return_value_nofpu): Likewise.
1965 (sh_extract_return_value_fpu): Likewise.
1966 (sh_store_return_value_nofpu): Likewise.
1967 (sh_corefile_supply_regset): Likewise.
1968 (sh_corefile_collect_regset): Likewise.
1969 * sh64-tdep.c (sh64_extract_return_value): Likewise.
1970 (sh64_store_return_value): Likewise.
1971 * sparc-linux-tdep.c (sparc32_linux_collect_core_fpregset): Likewise.
1972 * sparc-nat.c (sparc_fetch_inferior_registers): Likewise.
1973 (sparc_store_inferior_registers): Likewise.
1974 * sparc-ravenscar-thread.c (register_in_thread_descriptor_p): Likewise.
1975 (sparc_ravenscar_prepare_to_store): Likewise.
1976 * sparc-tdep.c (sparc32_store_arguments): Likewise.
1977 (sparc_analyze_control_transfer): Likewise.
1978 (sparc_step_trap): Likewise.
1979 (sparc_software_single_step): Likewise.
1980 (sparc32_gdbarch_init): Likewise.
1981 (sparc_supply_rwindow): Likewise.
1982 (sparc_collect_rwindow): Likewise.
1983 * sparc64-linux-tdep.c (sparc64_linux_collect_core_fpregset): Likewise.
1984 * sparc64-nbsd-nat.c (sparc64nbsd_supply_gregset): Likewise.
1985 (sparc64nbsd_collect_gregset): Likewise.
1986 (sparc64nbsd_supply_fpregset): Likewise.
1987 (sparc64nbsd_collect_fpregset): Likewise.
1988 * sparc64-tdep.c (sparc64_store_arguments): Likewise.
1989 (sparc64_supply_gregset): Likewise.
1990 (sparc64_collect_gregset): Likewise.
1991 (sparc64_supply_fpregset): Likewise.
1992 (sparc64_collect_fpregset): Likewise.
1993 * spu-linux-nat.c (spu_fetch_inferior_registers): Likewise.
1994 * spu-tdep.c (spu_unwind_sp): Likewise.
1995 (spu2ppu_prev_register): Likewise.
1996 (spu_memory_remove_breakpoint): Likewise.
1997 * stack.c (return_command): Likewise.
1998 * tic6x-tdep.c (tic6x_extract_signed_field): Likewise.
1999 * tracefile-tfile.c (tfile_fetch_registers): Likewise.
2000 * tracefile.c (trace_save_ctf): Likewise.
2001 * windows-nat.c (do_windows_fetch_inferior_registers): Likewise.
2002 (do_windows_store_inferior_registers): Likewise.
2003 (windows_resume): Likewise.
2004 * xtensa-linux-nat.c (fill_gregset): Likewise.
2005 (supply_gregset_reg): Likewise.
2006 * xtensa-tdep.c (xtensa_register_write_masked): Likewise.
2007 (xtensa_register_read_masked): Likewise.
2008 (xtensa_supply_gregset): Likewise.
2009 (xtensa_extract_return_value): Likewise.
2010 (xtensa_store_return_value): Likewise.
2011
2012 2017-10-25 Ulrich Weigand <uweigand@de.ibm.com>
2013
2014 * doublest.c (floatformat_from_string): New function.
2015 * doublest.h (floatformat_from_string): Add prototype.
2016
2017 * std-operator.def (OP_DOUBLE, OP_DECFLOAT): Remove, replace by ...
2018 (OP_FLOAT): ... this.
2019 * expression.h: Do not include "doublest.h".
2020 (union exp_element): Replace doubleconst and decfloatconst by
2021 new element floatconst.
2022 * ada-lang.c (resolve_subexp): Handle OP_FLOAT instead of OP_DOUBLE.
2023 (ada_evaluate_subexp): Likewise.
2024 * eval.c (evaluate_subexp_standard): Handle OP_FLOAT instead of
2025 OP_DOUBLE and OP_DECFLOAT.
2026 * expprint.c (print_subexp_standard): Likewise.
2027 (dump_subexp_body_standard): Likewise.
2028 * breakpoint.c (watchpoint_exp_is_const): Likewise.
2029
2030 * parse.c: Include "dfp.h".
2031 (write_exp_elt_dblcst, write_exp_elt_decfloatcst): Remove.
2032 (write_exp_elt_floatcst): New function.
2033 (operator_length_standard): Handle OP_FLOAT instead of OP_DOUBLE
2034 and OP_DECFLOAT.
2035 (operator_check_standard): Likewise.
2036 (parse_float): Do not accept suffix. Take type as input. Return bool.
2037 Return target format buffer instead of host DOUBLEST.
2038 Use floatformat_from_string and decimal_from_string to parse
2039 either binary or decimal floating-point types.
2040 (parse_c_float): Remove.
2041 * parser-defs.h: Do not include "doublest.h".
2042 (write_exp_elt_dblcst, write_exp_elt_decfloatcst): Remove.
2043 (write_exp_elt_floatcst): Add prototype.
2044 (parse_float): Update prototype.
2045 (parse_c_float): Remove.
2046
2047 * c-exp.y: Do not include "dfp.h".
2048 (typed_val_float): Use byte buffer instead of DOUBLEST.
2049 (typed_val_decfloat): Remove.
2050 (DECFLOAT): Remove.
2051 (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
2052 (parse_number): Update to new parse_float interface.
2053 Parse suffixes and determine type before calling parse_float.
2054 Handle decimal and binary FP types the same way.
2055
2056 * d-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
2057 (FLOAT_LITERAL): Use OP_FLOAT and write_exp_elt_floatcst.
2058 (parse_number): Update to new parse_float interface.
2059 Parse suffixes and determine type before calling parse_float.
2060
2061 * f-exp.y: Replace dval by typed_val_float.
2062 (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
2063 (parse_number): Use parse_float instead of atof.
2064
2065 * go-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
2066 (parse_go_float): Remove.
2067 (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
2068 (parse_number): Call parse_float instead of parse_go_float.
2069 Parse suffixes and determine type before calling parse_float.
2070
2071 * p-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
2072 (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
2073 (parse_number): Update to new parse_float interface.
2074 Parse suffixes and determine type before calling parse_float.
2075
2076 * m2-exp.y: Replace dval by byte buffer val.
2077 (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
2078 (parse_number): Call parse_float instead of atof.
2079
2080 * rust-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
2081 (lex_number): Call parse_float instead of strtod.
2082 (ast_dliteral): Use OP_FLOAT instead of OP_DOUBLE.
2083 (convert_ast_to_expression): Handle OP_FLOAT instead of OP_DOUBLE.
2084 Use write_exp_elt_floatcst.
2085 (unit_testing): Remove static variable.
2086 (rust_type): Do not check unit_testing.
2087 (rust_lex_tests): Do not set uint_testing. Set up dummy rust_parser.
2088
2089 * ada-exp.y (type_float, type_double): Remove.
2090 (typed_val_float): Use byte buffer instead of DOUBLEST.
2091 (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
2092 * ada-lex.l (processReal): Use parse_float instead of sscanf.
2093
2094 2017-10-25 Alan Hayward <alan.hayward@arm.com>
2095
2096 * aarch64-tdep.h (enum aarch64_regnum): Remove.
2097 * arch/aarch64.h: New file.
2098
2099 2017-10-24 Ulrich Weigand <uweigand@de.ibm.com>
2100
2101 * dfp.h (decimal_from_string): Use const reference for argument.
2102 * dfp.c (decimal_from_string): Likewise.
2103
2104 2017-10-24 Ulrich Weigand <uweigand@de.ibm.com>
2105
2106 * i387-tdep.c (print_i387_value): Use floatformat_to_string.
2107 * sh64-tdep.c (sh64_do_fp_register): Likewise.
2108 * mips-tdep.c (mips_print_fp_register): Likewise.
2109
2110 2017-10-24 Ulrich Weigand <uweigand@de.ibm.com>
2111
2112 * common/format.h (enum argclass): Replace decfloat_arg by
2113 dec32float_arg, dec64float_arg, and dec128float_arg.
2114 * common/format.c (parse_format_string): Update to return
2115 new decimal float argument classes.
2116
2117 * printcmd.c (printf_decfloat): Rename to ...
2118 (printf_floating): ... this. Add argclass argument, and use it
2119 instead of parsing the format string again. Add support for
2120 binary floating-point values, using floatformat_to_string.
2121 Convert value to the target format if it doesn't already match.
2122 (ui_printf): Call printf_floating instead of printf_decfloat,
2123 also for double_arg / long_double_arg. Pass argclass.
2124
2125 * dfp.c (decimal_to_string): Add format string argument.
2126 * dfp.h (decimal_to_string): Likewise.
2127
2128 * doublest.c (floatformat_to_string): Add format string argument.
2129 * doublest.h (floatformat_to_string): Likewise.
2130
2131 2017-10-24 Ulrich Weigand <uweigand@de.ibm.com>
2132
2133 * doublest.c (floatformat_precision): New routine.
2134 (floatformat_to_string): Likewise.
2135 * doublest.c (floatformat_to_string): Add prototype.
2136
2137 * printcmd.c (print_scalar_formatted): Only call print_floating
2138 on floating-point types.
2139 * valprint.c: Do not include "floatformat.h".
2140 (generic_val_print_decfloat): Remove.
2141 (generic_val_print): Call generic_val_print_float for both
2142 TYPE_CODE_FLT and TYPE_CODE_DECFLOAT.
2143 (print_floating): Use floatformat_to_string. Handle decimal float.
2144 (print_decimal_floating): Remove, merge into floatformat_to_string.
2145 * value.h (print_decimal_floating): Remove.
2146
2147 * Makefile.in: Do not build doublest.c with -Wformat-nonliteral.
2148
2149 2017-10-24 Ulrich Weigand <uweigand@de.ibm.com>
2150
2151 * buildsym.c (end_symtab_get_static_block): Use std::stable_sort.
2152
2153 2017-10-21 Simon Marchi <simon.marchi@ericsson.com>
2154
2155 * memattr.h: Don't include vec.h.
2156 (struct mem_attrib): Initialize fields.
2157 <unknown>: New static method.
2158 (struct mem_region): Add constructors, operator<, initialize
2159 fields.
2160 * memattr.c: Include algorithm.
2161 (default_mem_attrib, unknown_mem_attrib): Remove.
2162 (user_mem_region_list): New global.
2163 (target_mem_region_list, mem_region_list): Change type to
2164 std::vector<mem_region>.
2165 (mem_use_target): Now a function.
2166 (target_mem_regions_valid): Change type to bool.
2167 (mem_region_lessthan, mem_region_cmp, mem_region_init): Remove.
2168 (require_user_regions): Adjust.
2169 (require_target_regions): Adjust.
2170 (create_mem_region): Adjust.
2171 (lookup_mem_region): Adjust.
2172 (invalidate_target_mem_regions): Adjust.
2173 (mem_clear): Rename to...
2174 (user_mem_clear): ... this, and adjust.
2175 (mem_command): Adjust.
2176 (info_mem_command): Adjust.
2177 (mem_enable, enable_mem_command, mem_disable,
2178 disable_mem_command): Adjust.
2179 (mem_delete): Adjust.
2180 (delete_mem_command): Adjust.
2181 * memory-map.h (parse_memory_map): Return an std::vector.
2182 * memory-map.c (parse_memory_map): Likewise.
2183 (struct memory_map_parsing_data): Add constructor.
2184 <memory_map>: Point to std::vector.
2185 (memory_map_start_memory): Adjust.
2186 (memory_map_end_memory): Adjust.
2187 (memory_map_end_property): Adjust.
2188 (clear_result): Remove.
2189 * remote.c (remote_memory_map): Return an std::vector.
2190 * target-debug.h (target_debug_print_VEC_mem_region_s__p):
2191 Remove.
2192 (target_debug_print_mem_region_vector): New.
2193 * target-delegates.c: Regenerate.
2194 * target.h (mem_region_vector): New typedef.
2195 (to_memory_map): Return mem_region_vector.
2196 (target_memory_map): Return an std::vector.
2197 * target.c (target_memory_map): Return an std::vector.
2198 (flash_erase_command): Adjust.
2199
2200 2017-10-21 Simon Marchi <simon.marchi@ericsson.com>
2201
2202 * memory-map.c (struct memory_map_parsing_data) <property_name>:
2203 Change type to std::string.
2204 (memory_map_start_property): Adjust.
2205 (memory_map_end_property): Adjust.
2206
2207 2017-10-21 Simon Marchi <simon.marchi@polymtl.ca>
2208
2209 * infrun.h: Include common/byte-vector.h.
2210 (struct displaced_step_closure): New struct.
2211 (struct buf_displaced_step_closure): New struct.
2212 * infrun.c (displaced_step_closure::~displaced_step_closure):
2213 Provide default implementation.
2214 (displaced_step_clear): Deallocate step closure with delete.
2215 * aarch64-tdep.c (displaced_step_closure): Rename to ...
2216 (aarch64_displaced_step_closure): ... this, extend
2217 displaced_step_closure.
2218 (aarch64_displaced_step_data) <dsc>: Change type to
2219 aarch64_displaced_step_closure.
2220 (aarch64_displaced_step_copy_insn): Adjust to type change, use
2221 unique_ptr.
2222 (aarch64_displaced_step_fixup): Add cast for displaced step
2223 closure.
2224 * amd64-tdep.c (displaced_step_closure): Rename to ...
2225 (amd64_displaced_step_closure): ... this, extend
2226 displaced_step_closure.
2227 <insn_buf>: Change type to std::vector<gdb_byte>.
2228 <max_len>: Remove.
2229 (fixup_riprel): Change type of DSC parameter, adjust to type
2230 change of insn_buf.
2231 (fixup_displaced_copy): Change type of DSC parameter.
2232 (amd64_displaced_step_copy_insn): Instantiate
2233 amd64_displaced_step_closure.
2234 (amd64_displaced_step_fixup): Add cast for closure type, adjust
2235 to type change of insn_buf.
2236 * arm-linux-tdep.c (arm_linux_cleanup_svc): Change type of
2237 parameter DSC.
2238 (arm_linux_copy_svc): Likewise.
2239 (cleanup_kernel_helper_return): Likewise.
2240 (arm_catch_kernel_helper_return): Likewise.
2241 (arm_linux_displaced_step_copy_insn): Instantiate
2242 arm_displaced_step_closure.
2243 * arm-tdep.c (arm_pc_is_thumb): Add cast for closure.
2244 (displaced_read_reg): Change type of parameter DSC.
2245 (branch_write_pc): Likewise.
2246 (load_write_pc): Likewise.
2247 (alu_write_pc): Likewise.
2248 (displaced_write_reg): Likewise.
2249 (arm_copy_unmodified): Likewise.
2250 (thumb_copy_unmodified_32bit): Likewise.
2251 (thumb_copy_unmodified_16bit): Likewise.
2252 (cleanup_preload): Likewise.
2253 (install_preload): Likewise.
2254 (arm_copy_preload): Likewise.
2255 (thumb2_copy_preload): Likewise.
2256 (install_preload_reg): Likewise.
2257 (arm_copy_preload_reg): Likewise.
2258 (cleanup_copro_load_store): Likewise.
2259 (install_copro_load_store): Likewise.
2260 (arm_copy_copro_load_store) Likewise.
2261 (thumb2_copy_copro_load_store): Likewise.
2262 (cleanup_branch): Likewise.
2263 (install_b_bl_blx): Likewise.
2264 (arm_copy_b_bl_blx): Likewise.
2265 (thumb2_copy_b_bl_blx): Likewise.
2266 (thumb_copy_b): Likewise.
2267 (install_bx_blx_reg): Likewise.
2268 (arm_copy_bx_blx_reg): Likewise.
2269 (thumb_copy_bx_blx_reg): Likewise.
2270 (cleanup_alu_imm): Likewise.
2271 (arm_copy_alu_imm): Likewise.
2272 (thumb2_copy_alu_imm): Likewise.
2273 (cleanup_alu_reg): Likewise.
2274 (install_alu_reg): Likewise.
2275 (arm_copy_alu_reg): Likewise.
2276 (thumb_copy_alu_reg): Likewise.
2277 (cleanup_alu_shifted_reg): Likewise.
2278 (install_alu_shifted_reg): Likewise.
2279 (arm_copy_alu_shifted_reg): Likewise.
2280 (cleanup_load): Likewise.
2281 (cleanup_store): Likewise.
2282 (arm_copy_extra_ld_st): Likewise.
2283 (install_load_store): Likewise.
2284 (thumb2_copy_load_literal): Likewise.
2285 (thumb2_copy_load_reg_imm): Likewise.
2286 (arm_copy_ldr_str_ldrb_strb): Likewise.
2287 (cleanup_block_load_all): Likewise.
2288 (cleanup_block_store_pc): Likewise.
2289 (cleanup_block_load_pc): Likewise.
2290 (arm_copy_block_xfer): Likewise.
2291 (thumb2_copy_block_xfer): Likewise.
2292 (cleanup_svc): Likewise.
2293 (install_svc): Likewise.
2294 (arm_copy_svc): Likewise.
2295 (thumb_copy_svc): Likewise.
2296 (arm_copy_undef): Likewise.
2297 (thumb_32bit_copy_undef): Likewise.
2298 (arm_copy_unpred): Likewise.
2299 (arm_decode_misc_memhint_neon): Likewise.
2300 (arm_decode_unconditional): Likewise.
2301 (arm_decode_miscellaneous): Likewise.
2302 (arm_decode_dp_misc): Likewise.
2303 (arm_decode_ld_st_word_ubyte): Likewise.
2304 (arm_decode_media): Likewise.
2305 (arm_decode_b_bl_ldmstm): Likewise.
2306 (arm_decode_ext_reg_ld_st): Likewise.
2307 (thumb2_decode_dp_shift_reg): Likewise.
2308 (thumb2_decode_ext_reg_ld_st): Likewise.
2309 (arm_decode_svc_copro): Likewise.
2310 (thumb2_decode_svc_copro): Likewise.
2311 (install_pc_relative): Likewise.
2312 (thumb_copy_pc_relative_16bit): Likewise.
2313 (thumb_decode_pc_relative_16bit): Likewise.
2314 (thumb_copy_pc_relative_32bit): Likewise.
2315 (thumb_copy_16bit_ldr_literal): Likewise.
2316 (thumb_copy_cbnz_cbz): Likewise.
2317 (thumb2_copy_table_branch): Likewise.
2318 (cleanup_pop_pc_16bit_all): Likewise.
2319 (thumb_copy_pop_pc_16bit): Likewise.
2320 (thumb_process_displaced_16bit_insn): Likewise.
2321 (decode_thumb_32bit_ld_mem_hints): Likewise.
2322 (thumb_process_displaced_32bit_insn): Likewise.
2323 (thumb_process_displaced_insn): Likewise.
2324 (arm_process_displaced_insn): Likewise.
2325 (arm_displaced_init_closure): Likewise.
2326 (arm_displaced_step_fixup): Add cast for closure.
2327 * arm-tdep.h: Include infrun.h.
2328 (displaced_step_closure): Rename to ...
2329 (arm_displaced_step_closure): ... this, extend
2330 displaced_step_closure.
2331 <u::svc::copy_svc_os>: Change type of parameter DSC.
2332 <cleanup>: Likewise.
2333 (arm_process_displaced_insn): Likewise.
2334 (arm_displaced_init_closure): Likewise.
2335 (displaced_read_reg): Likewise.
2336 (displaced_write_reg): Likewise.
2337 * i386-linux-tdep.c (i386_linux_displaced_step_copy_insn):
2338 Adjust.
2339 * i386-tdep.h: Include infrun.h.
2340 (i386_displaced_step_closure): New typedef.
2341 * i386-tdep.c (i386_displaced_step_copy_insn): Use
2342 i386_displaced_step_closure.
2343 (i386_displaced_step_fixup): Adjust.
2344 * rs6000-tdep.c (ppc_displaced_step_closure): New typedef.
2345 (ppc_displaced_step_copy_insn): Use ppc_displaced_step_closure
2346 and unique_ptr.
2347 (ppc_displaced_step_fixup): Adjust.
2348 * s390-linux-tdep.c (s390_displaced_step_closure): New typedef.
2349 (s390_displaced_step_copy_insn): Use s390_displaced_step_closure
2350 and unique_ptr.
2351 (s390_displaced_step_fixup): Adjust.
2352
2353 2017-10-21 Simon Marchi <simon.marchi@polymtl.ca>
2354
2355 * interps.h (interp_resume, interp_suspend, interp_set_temp):
2356 Remove declarations.
2357
2358 2017-10-20 Tom Tromey <tom@tromey.com>
2359
2360 * gdb_bfd.c (struct gdb_bfd_data) <included_bfds>: Now a
2361 std::vector.
2362 (gdb_bfd_record_inclusion): Update.
2363 (bfdp): Remove typedef.
2364
2365 2017-10-20 Tom Tromey <tom@tromey.com>
2366
2367 * gdb_bfd.c (gdb_bfd_ref): Use new.
2368 (struct gdb_bfd_data): Add constructor, destructor, and member
2369 initializers.
2370 (gdb_bfd_unref): Use delete.
2371
2372 2017-10-20 Tom Tromey <tom@tromey.com>
2373
2374 * exec.c (exec_file_attach): Use new_bfd_ref.
2375 * symfile-mem.c (symbol_file_add_from_memory): Use new_bfd_ref.
2376 * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
2377 (gdb_bfd_openw, gdb_bfd_openr_iovec, gdb_bfd_fdopenr): Use
2378 new_bfd_ref.
2379 * gdb_bfd.h (new_bfd_ref): New function.
2380
2381 2017-10-20 Pedro Alves <palves@redhat.com>
2382
2383 * main.c (captured_command_loop): Add attribute noinline.
2384
2385 2017-10-19 Simon Marchi <simon.marchi@ericsson.com>
2386
2387 * interps.c (struct interp_factory): Add constructor.
2388 (interp_factory_p): Remove typedef.
2389 (DEF_VEC_P(interp_factory_p)): Remove.
2390 (interpreter_factories): Change type to std::vector.
2391 (interp_factory_register): Adjust.
2392 (interp_lookup): Adjust.
2393 (interpreter_completer): Adjust.
2394
2395 2017-10-19 Tom Tromey <tom@tromey.com>
2396
2397 * break-catch-syscall.c (catch_syscall_completer): Use
2398 std::string, gdb::unique_xmalloc_ptr.
2399
2400 2017-10-19 Tom Tromey <tom@tromey.com>
2401
2402 * infcall.c (call_function_by_hand_dummy): Use std::string.
2403
2404 2017-10-19 Tom Tromey <tom@tromey.com>
2405
2406 * mi/mi-main.c (mi_cmd_execute): Update.
2407 * top.h (prepare_execute_command): Return scoped_value_mark.
2408 * value.h (class scoped_value_mark): Use DISABLE_COPY_AND_ASSIGN.
2409 Add move constructor.
2410 * top.c (prepare_execute_command): Return scoped_value_mark.
2411 (execute_command): Update.
2412
2413 2017-10-19 Pedro Alves <palves@redhat.com>
2414
2415 * xml-support.c (xml_fetch_content_from_file): Check fread's
2416 return.
2417
2418 2017-10-19 Pedro Alves <palves@redhat.com>
2419
2420 * ser-base.c (ser_base_read_error_fd): Delete the file handler if
2421 async.
2422 (handle_error_fd): New function.
2423 (ser_base_async): Add/delete an event loop file handler for
2424 error_fd.
2425
2426 2017-10-19 Pedro Alves <palves@redhat.com>
2427
2428 * xml-support.c (xml_fetch_content_from_file): Don't read in
2429 chunks. Instead use fseek to determine the file's size, and read
2430 it in one go.
2431
2432 2017-11-18 Keith Seitz <keiths@redhat.com>
2433
2434 * c-exp.y (oper): Canonicalize conversion operators of user-defined
2435 types.
2436 Add whitespace to front of type name.
2437
2438 2017-10-18 Keith Seitz <keiths@redhat.com>
2439
2440 * dwarf2read.c (dwarf2_add_typedef): Issue a complaint on unhandled
2441 DW_AT_accessibility.
2442
2443 2017-10-18 Yao Qi <yao.qi@linaro.org>
2444
2445 * features/tic6x-c62x-linux.c: Remove.
2446
2447 2017-10-17 Tom Tromey <tom@tromey.com>
2448
2449 * disasm.c (do_mixed_source_and_assembly_deprecated): Use
2450 gdb::optional, ui_out_emit_list, ui_out_emit_tuple.
2451 (do_mixed_source_and_assembly): Likewise.
2452
2453 2017-10-17 Tom Tromey <tom@tromey.com>
2454
2455 * regcache.c (regcache::xfer_part): Remove assertion.
2456
2457 2017-10-17 Pedro Alves <palves@redhat.com>
2458
2459 * xml-support.c (xml_fetch_content_from_file): Call
2460 unique_ptr::release() instead unique_ptr::get() when passing
2461 through xrealloc.
2462
2463 2017-10-17 Yao Qi <yao.qi@linaro.org>
2464
2465 * regcache.c (regcache::xfer_part): Remove parameters read and
2466 write, add parameter is_raw. All callers are updated.
2467
2468 2017-10-16 Keith Seitz <keiths@redhat.com>
2469
2470 * c-typeprint.c (enum access_specifier): Moved here from
2471 c_type_print_base.
2472 (output_access_specifier): New function.
2473 (c_type_print_base): Consider typedefs when assessing
2474 whether access labels are needed.
2475 Use output_access_specifier as needed.
2476 Output access specifier for typedefs, if needed.
2477 * dwarf2read.c (dwarf2_add_typedef): Record DW_AT_accessibility.
2478 * gdbtypes.h (struct typedef_field) <is_protected, is_private>: New
2479 fields.
2480 (TYPE_TYPEDEF_FIELD_PROTECTED, TYPE_TYPEDEF_FIELD_PRIVATE): New
2481 accessor macros.
2482
2483 2017-10-16 Tom Tromey <tom@tromey.com>
2484
2485 * linux-tdep.c (linux_info_proc, linux_find_memory_regions_full)
2486 (linux_fill_prpsinfo, linux_vsyscall_range_raw): Update.
2487 * target.c (target_fileio_read_stralloc): Update.
2488 * sparc64-tdep.c (adi_is_addr_mapped): Update.
2489 * target.h (target_fileio_read_stralloc): Return
2490 unique_xmalloc_ptr.
2491
2492 2017-10-16 Tom Tromey <tom@tromey.com>
2493
2494 * xml-syscall.c (xml_init_syscalls_info): Update.
2495 * xml-support.c (xinclude_start_include): Update.
2496 (xml_fetch_content_from_file): Return unique_xmalloc_ptr.
2497 * xml-support.h (xml_fetch_another): Return unique_xmalloc_ptr.
2498 (xml_fetch_content_from_file): Likewise.
2499 * osdata.c (get_osdata): Update.
2500 * target.h (target_read_stralloc, target_get_osdata): Return
2501 unique_xmalloc_ptr.
2502 * solib-aix.c (solib_aix_get_library_list): Update.
2503 * solib-target.c (solib_target_current_sos): Update.
2504 * solib-svr4.c (svr4_current_sos_via_xfer_libraries): Update.
2505 * xml-tdesc.c (fetch_available_features_from_target): Update.
2506 (target_fetch_description_xml): Update.
2507 (file_read_description_xml): Update.
2508 * remote.c (remote_get_threads_with_qxfer, remote_memory_map)
2509 (remote_traceframe_info, btrace_read_config, remote_read_btrace)
2510 (remote_pid_to_exec_file): Update.
2511 * target.c (target_read_stralloc): Return unique_xmalloc_ptr.
2512 (target_get_osdata): Likewise.
2513
2514 2017-10-16 Tom Tromey <tom@tromey.com>
2515
2516 * remote.c (remote_register_number_and_offset): Use std::vector.
2517 (remote_set_syscall_catchpoint): Use gdb::unique_xmalloc_ptr.
2518 (putpkt_binary): Use gdb::def_vector.
2519 (compare_sections_command): Use gdb::byte_vector.
2520
2521 2017-10-16 Tom Tromey <tom@tromey.com>
2522
2523 * ppc-linux-nat.c (hwdebug_insert_point): Use
2524 gdb::unique_xmalloc_ptr, XDUP.
2525
2526 2017-10-16 Tom Tromey <tom@tromey.com>
2527
2528 * probe.c (parse_probes): Use std::string.
2529 (info_probes_for_ops, enable_probes_command)
2530 (disable_probes_command): Remove cleanups.
2531
2532 2017-10-16 Tom Tromey <tom@tromey.com>
2533
2534 * buildsym.c (block_compar): Remove.
2535 (end_symtab_get_static_block): Use std::vector.
2536
2537 2017-10-16 Simon Marchi <simon.marchi@ericsson.com>
2538
2539 * memrange.h (struct mem_range): Define operator< and operator==.
2540 (mem_range_s): Remove.
2541 (DEF_VEC_O (mem_range_s)): Remove.
2542 (normalize_mem_ranges): Change parameter type to std::vector.
2543 * memrange.c (compare_mem_ranges): Remove.
2544 (normalize_mem_ranges): Change parameter type to std::vector,
2545 adjust to vector change.
2546 * exec.c (section_table_available_memory): Return vector, remove
2547 parameter.
2548 (section_table_read_available_memory): Adjust to std::vector
2549 change.
2550 * remote.c (remote_read_bytes): Adjust to std::vector
2551 change.
2552 * tracepoint.h (traceframe_available_memory): Change parameter
2553 type to std::vector.
2554 * tracepoint.c (traceframe_available_memory): Change parameter
2555 type to std::vector, adjust.
2556 * gdb/mi/mi-main.c (mi_cmd_trace_frame_collected): Adjust to
2557 std::vector change.
2558 * gdb/Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
2559 unittests/memrange-selftests.c.
2560 (SUBDIR_UNITTESTS_OBS): Add memrange-selftests.o.
2561 * gdb/unittests/memrange-selftests.c: New file.
2562
2563 2017-10-16 Pedro Alves <palves@redhat.com>
2564
2565 * elfread.c (probe_key_free): Rename range-for variable.
2566 * probe.c (parse_probes_in_pspace, find_probes_in_objfile)
2567 (find_probe_by_pc, collect_probes): Rename range-for variable.
2568
2569 2017-10-16 Yao Qi <yao.qi@linaro.org>
2570
2571 * features/Makefile (XMLTOC): Remove tic6x-*.xml.
2572 * features/tic6x-c62x.c: Remove.
2573 * features/tic6x-c64x-linux.c: Remove.
2574 * features/tic6x-c64x.c: Remove.
2575 * features/tic6x-c64xp-linux.c: Remove.
2576 * features/tic6x-c64xp.c: Remove.
2577 * tic6x-linux-tdep.c (_initialize_tic6x_linux_tdep): Don't call
2578 initialize_tdesc_tic6x_*_linux functions.
2579 * tic6x-tdep.c (_initialize_tic6x_tdep): Don't call
2580 initialize_tdesc_tic6x_* functions.
2581
2582 2017-10-16 Yao Qi <yao.qi@linaro.org>
2583
2584 * features/Makefile (WHICH): Remove tic6x-c64xp, tic6x-c64x
2585 tic6x-c62x.
2586 * regformats/tic6x-c62x.dat: Remove.
2587 * regformats/tic6x-c64x.dat: Remove.
2588 * regformats/tic6x-c64xp.dat: Remove.
2589
2590 2017-10-15 Simon Marchi <simon.marchi@ericsson.com>
2591
2592 * tracepoint.c (parse_traceframe_info): Return a unique_ptr
2593 (the !HAVE_LIBEXPAT version).
2594
2595 2017-10-14 Simon Marchi <simon.marchi@ericsson.com>
2596
2597 * nat/linux-osdata.c (struct pid_pgid_entry) <operator<>: Make
2598 const.
2599
2600 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
2601
2602 * target.h: Include tracepoint.h.
2603 (enum trace_find_type): Move to tracepoint.h.
2604 (struct target_ops) <to_traceframe_info>: Return a unique ptr.
2605 * tracepoint.h: Don't include target.h
2606 (enum trace_find_type): Move from target.h.
2607 (parse_traceframe_info): Return a unique ptr.
2608 * tracepoint.c (current_traceframe_info): Change type to unique
2609 ptr.
2610 (free_traceframe_info): Remove.
2611 (clear_traceframe_info): Don't manually free
2612 current_traceframe_info.
2613 (free_result): Remove.
2614 (parse_traceframe_info): Return a unique ptr.
2615 (get_traceframe_info): Adjust to unique ptr.
2616 * ctf.c (ctf_traceframe_info): Return a unique ptr.
2617 * remote.c (remote_traceframe_info): Return a unique ptr.
2618 * tracefile-tfile.c (tfile_traceframe_info): Return a unique
2619 ptr.
2620 * target-debug.h (target_debug_print_traceframe_info_up): New
2621 macro.
2622 * target-delegates.c: Regenerate.
2623
2624 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
2625
2626 * memrange.h (struct mem_range): Add constructors.
2627 * tracepoint.h (struct traceframe_info) <memory>: Change type to
2628 std::vector<mem_range>.
2629 * tracepoint.c (free_traceframe_info): Don't manually free
2630 vector.
2631 (traceframe_info_start_memory): Adjust to vector change.
2632 (traceframe_available_memory): Likewise.
2633 * tracefile-tfile.c (build_traceframe_info): Likewise.
2634 * ctf.c (ctf_traceframe_info): Likewise.
2635
2636 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
2637
2638 * tracepoint.h (struct traceframe_info) <tvars>: Change type to
2639 std::vector<int>.
2640 * tracepoint.c (free_traceframe_info): Deallocate with delete.
2641 (traceframe_info_start_tvar): Adjust to vector change.
2642 (parse_traceframe_info): Allocate with new.
2643 * ctf.c (ctf_traceframe_info): Allocate with new, adjust to
2644 vector change.
2645 * tracefile-tfile.c (build_traceframe_info): Adjust to vector
2646 change.
2647 tfile_traceframe_info): Allocate with new.
2648 * mi/mi-main.c (mi_cmd_trace_frame_collected): Adjust to vector
2649 change.
2650
2651 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
2652
2653 * tracepoint.c (traceframe_info): Rename to...
2654 (current_traceframe_info): ...this.
2655 (clear_traceframe_info): Adjust.
2656 (get_traceframe_info): Adjust.
2657
2658 2017-10-14 Simon Marchi <simon.marchi@ericsson.com>
2659
2660 * nat/linux-osdata.c: Include algorithm.
2661 (compare_processes): Remove.
2662 (struct pid_pgid_entry): New struct.
2663 (linux_xfer_osdata_processgroups): Use std::vector instead of
2664 XNEWVEC.
2665
2666 2017-10-14 Simon Marchi <simon.marchi@ericsson.com>
2667
2668 * objfiles.h: Don't include symfile.h.
2669 (struct partial_symbol): Remove forward-declaration.
2670 (struct objfile) <global_psymbols, static_psymbols>: Change type
2671 to std::vector<partial_symbol *>.
2672 * objfiles.c (objfile::objfile): Don't memset those fields.
2673 (objfile::~objfile): Don't free those fields.
2674 * psympriv.h (struct psymbol_allocation_list): Remove
2675 forward-declaration.
2676 (add_psymbol_to_list): Change psymbol_allocation_list parameter
2677 to std::vector.
2678 (start_psymtab_common): Change parameters to std::vector.
2679 * psymtab.c: Include algorithm.
2680 (require_partial_symbols): Call shrink_to_fit.
2681 (find_pc_sect_psymbol): Adjust to vector change.
2682 (match_partial_symbol): Likewise.
2683 (lookup_partial_symbol): Likewise.
2684 (psym_relocate): Likewise.
2685 (dump_psymtab): Likewise.
2686 (recursively_search_psymtabs): Likewise.
2687 (compare_psymbols): Remove.
2688 (sort_pst_symbols): Adjust to vector change.
2689 (start_psymtab_common): Likewise.
2690 (end_psymtab_common): Likewise.
2691 (psymbol_bcache_full): De-constify return value.
2692 (add_psymbol_to_bcache): Likewise.
2693 (extend_psymbol_list): Remove.
2694 (append_psymbol_to_list): Adjust to vector change.
2695 (add_psymbol_to_list): Likewise.
2696 (init_psymbol_list): Likewise.
2697 (maintenance_info_psymtabs): Likewise.
2698 (maintenance_check_psymtabs): Likewise.
2699 * symfile.h (struct psymbol_allocation_list): Remove.
2700 * symfile.c (reread_symbols): Adjust to vector change.
2701 * dbxread.c (start_psymtab): Change type of parameters.
2702 (dbx_symfile_read): Adjust to vector change.
2703 (read_dbx_symtab): Likewise.
2704 (start_psymtab): Change type of parameters.
2705 * dwarf2read.c (dwarf2_build_psymtabs): Adjust to vector change.
2706 (create_partial_symtab): Likewise.
2707 (add_partial_symbol): Likewise.
2708 (write_one_signatured_type): Likewise.
2709 (recursively_write_psymbols): Likewise.
2710 * mdebugread.c (parse_partial_symbols): Likewise.
2711 * xcoffread.c (xcoff_start_psymtab): Change type of parameters.
2712 (scan_xcoff_symtab): Adjust to vector change.
2713 (xcoff_initial_scan): Likewise.
2714
2715 2017-10-13 Simon Marchi <simon.marchi@ericsson.com>
2716
2717 * ada-typeprint.c (print_dynamic_range_bound): Use std::string.
2718
2719 2017-10-13 Yao Qi <yao.qi@linaro.org>
2720
2721 * features/Makefile: Remove tic6x-*-expedite, add tic6x-expedite.
2722 Remove s390x-*-expedite, add s390x-expedite.
2723
2724 2017-10-13 Yao Qi <yao.qi@linaro.org>
2725
2726 * features/s390-gs-linux64.c: Regenerated.
2727 * features/s390x-gs-linux64.c: Regenerated.
2728
2729 2017-10-13 Tom Tromey <tom@tromey.com>
2730
2731 * compile/compile-object-run.c (do_module_cleanup): Use delete.
2732 * solib.c (update_solib_list, reload_shared_libraries_1): Use
2733 delete.
2734 * symfile.c (symbol_file_add_with_addrs): Use new.
2735 (symbol_file_add_separate): Update comment.
2736 (syms_from_objfile_1, remove_symbol_file_command): Use delete.
2737 * jit.c (jit_object_close_impl): Use new.
2738 (jit_unregister_code): Use delete.
2739 * objfiles.c (objfile::objfile): Rename from allocate_objfile.
2740 (~objfile): Rename from free_objfile.
2741 (free_objfile_separate_debug, do_free_objfile_cleanup)
2742 (free_all_objfiles, objfile_purge_solibs): Use delete.
2743 * objfiles.h (struct objfile): Add constructor and destructor.
2744 Use DISABLE_COPY_AND_ASSIGN. Add initializers to data members.
2745 (allocate_objfile, free_objfile): Don't declare.
2746 (struct objstats): Add initializers.
2747
2748 2017-10-12 Simon Marchi <simon.marchi@ericsson.com>
2749
2750 * arch-utils.h (simple_displaced_step_copy_insn): Remove.
2751 * arch-utils.c (simple_displaced_step_copy_insn): Remove.
2752 * gdbarch.sh (displaced_step_copy_insn): Adjust comment.
2753 * gdbarch.h: Regenerate.
2754 * i386-linux-tdep.c (i386_linux_displaced_step_copy_insn):
2755 Adjust comment.
2756 * i386-tdep.c (i386_displaced_step_copy_insn): Adjust comment.
2757 (i386_displaced_step_fixup): Adjust comment.
2758 * rs6000-tdep.c (ppc_displaced_step_copy_insn): Adjust comment.
2759
2760 2017-10-12 Tom Tromey <tom@tromey.com>
2761
2762 * prologue-value.h (pv_area::store_would_trash): Return bool.
2763 (pv_area::find_reg): Likewise.
2764 * prologue-value.c (pv_area::store_would_trash): Return bool.
2765 (pv_area::find_reg): Likewise.
2766
2767 2017-10-12 Tom Tromey <tom@tromey.com>
2768
2769 * s390-linux-tdep.c (s390_store, s390_load)
2770 (s390_check_for_saved, s390_analyze_prologue): Update.
2771 * rx-tdep.c (check_for_saved, rx_analyze_prologue): Update.
2772 * rl78-tdep.c (rl78_analyze_prologue, check_for_saved): Update.
2773 * prologue-value.h (class pv_area): Move from prologue-value.c.
2774 Change names of members. Add constructor, destructor, member
2775 functions.
2776 (make_pv_area, free_pv_area, make_cleanup_free_pv_area)
2777 (pv_area_store, pv_area_fetch, pv_area_store_would_trash)
2778 (pv_area_fetch, pv_area_scan): Don't declare.
2779 * prologue-value.c (struct pv_area::area_entry): Now member of
2780 pv_area.
2781 (struct pv_area): Move to prologue-value.h.
2782 (pv_area::pv_area): Rename from make_pv_area.
2783 (pv_area::~pv_area): Rename from free_pv_area.
2784 (do_free_pv_area_cleanup, make_cleanup_free_pv_area): Remove.
2785 (clear_entries, find_entry, overlaps, store_would_trash, store)
2786 (fetch, find_reg, scan): Now member of pv_area.
2787 Remove "area" argument. Update.
2788 * msp430-tdep.c (check_for_saved, msp430_analyze_prologue):
2789 Update.
2790 * mn10300-tdep.c (push_reg, check_for_saved)
2791 (mn10300_analyze_prologue): Update.
2792 * mep-tdep.c (is_arg_spill, check_for_saved)
2793 (mep_analyze_prologue): Update.
2794 * m32c-tdep.c (m32c_pv_push, m32c_srcdest_fetch)
2795 (m32c_srcdest_store, m32c_pv_enter, m32c_is_arg_spill)
2796 (m32c_is_struct_return, m32c_analyze_prologue): Update.
2797 * arm-tdep.c (thumb_analyze_prologue, arm_analyze_prologue):
2798 Update.
2799 * arc-tdep.c (arc_is_in_prologue, arc_analyze_prologue): Update.
2800 * aarch64-tdep.c (aarch64_analyze_prologue): Update.
2801
2802 2017-10-12 Simon Marchi <simon.marchi@ericsson.com>
2803
2804 * linux-nat.h (linux_nat_set_delete_thread): New declaration.
2805 * linux-nat.c (linux_nat_delete_thread): New variable.
2806 (lwp_free): Invoke linux_nat_delete_thread if set.
2807 (linux_nat_set_delete_thread): New function.
2808 * aarch64-linux-nat.c (_initialize_aarch64_linux_nat): Assign
2809 thread delete callback.
2810 * arm-linux-nat.c (arm_linux_delete_thread): New function.
2811 (_initialize_arm_linux_nat): Assign thread delete callback.
2812 * s390-linux-nat.c (s390_delete_thread): New function.
2813 (_initialize_s390_nat): Assign thread delete callback.
2814 * x86-linux-nat.c (x86_linux_add_target): Likewise.
2815 * nat/aarch64-linux.c (aarch64_linux_delete_thread): New
2816 function.
2817 * nat/aarch64-linux.h (aarch64_linux_delete_thread): New
2818 declaration.
2819 * nat/x86-linux.c (x86_linux_delete_thread): New function.
2820 * nat/x86-linux.h (x86_linux_delete_thread): New declaration.
2821
2822 2017-10-09 Tom Tromey <tom@tromey.com>
2823
2824 * tui/tui-win.c (tui_set_win_height, parse_scrolling_args): Use
2825 std::string.
2826 * tui/tui-layout.c (enum tui_status): Use std::string.
2827
2828 2017-10-11 Tom Tromey <tom@tromey.com>
2829
2830 * gdbthread.h (thread_command): Constify.
2831 * inferior.h (detach_command): Constify.
2832 * top.h (set_history, show_history): Constify.
2833 * arm-tdep.c (set_arm_command, show_arm_command): Constify.
2834 * serial.c (serial_set_cmd, serial_show_cmd): Constify.
2835 * bsd-kvm.c (bsd_kvm_cmd): Constify.
2836 * printcmd.c (set_command): Constify.
2837 (non_const_set_command): New function.
2838 * dcache.c (set_dcache_command, show_dcache_command): Constify.
2839 * breakpoint.c (enable_command, disable_command, delete_command)
2840 (catch_command, tcatch_command, set_breakpoint_cmd)
2841 (show_breakpoint_cmd): Constify.
2842 * macrocmd.c (macro_command): Constify.
2843 * infcmd.c (unset_command, kill_command, detach_command)
2844 (info_proc_cmd): Constify.
2845 * i386-tdep.c (set_mpx_cmd, show_mpx_cmd): Constify.
2846 * auto-load.c (show_auto_load_cmd, set_auto_load_cmd)
2847 (info_auto_load_cmd): Constify.
2848 * target-descriptions.c (set_tdesc_cmd, show_tdesc_cmd)
2849 (unset_tdesc_cmd): Constify.
2850 * ada-lang.c (set_ada_command, show_ada_command)
2851 (maint_set_ada_cmd, maint_show_ada_cmd): Constify.
2852 * guile/guile.c (set_guile_command, show_guile_command)
2853 (info_guile_command): Constify.
2854 * tui/tui-win.c (tui_command, set_tui_cmd, show_tui_cmd):
2855 Constify.
2856 * skip.c (skip_command): Constify.
2857 * compile/compile.c (_initialize_compile): Constify.
2858 * dwarf2read.c (set_dwarf_cmd, show_dwarf_cmd): Constify.
2859 * btrace.c (maint_btrace_cmd, maint_btrace_set_cmd)
2860 (maint_btrace_show_cmd, maint_btrace_pt_set_cmd)
2861 (maint_btrace_pt_show_cmd): Constify.
2862 * remote.c (set_remote_cmd, show_remote_cmd, remote_command):
2863 Constify.
2864 * python/python.c (user_show_python, user_set_python): Constify.
2865 * mips-tdep.c (set_mips_command, show_mips_command)
2866 (set_mipsfpu_command): Constify.
2867 * record-btrace.c (cmd_record_btrace_start)
2868 (cmd_set_record_btrace, cmd_show_record_btrace)
2869 (cmd_set_record_btrace_bts, cmd_show_record_btrace_bts)
2870 (cmd_set_record_btrace_pt, cmd_show_record_btrace_pt): Constify.
2871 * rs6000-tdep.c (set_powerpc_command, show_powerpc_command):
2872 Constify.
2873 * symfile.c (overlay_command): Constify.
2874 * spu-tdep.c (set_spu_command, show_spu_command): Constify.
2875 * cli/cli-logging.c (set_logging_command, show_logging_command):
2876 Constify.
2877 * cli/cli-dump.c (dump_command, append_command)
2878 (srec_dump_command, ihex_dump_command, verilog_dump_command)
2879 (tekhex_dump_command, binary_dump_command)
2880 (binary_append_command): Constify.
2881 * cli/cli-decode.c (struct cmd_list_element): Change type of
2882 "fun".
2883 * cli/cli-cmds.c (info_command, show_command, set_debug)
2884 (show_debug): Constify.
2885 (show_command): Add non-const overload.
2886 * top.c (set_history, show_history): Constify.
2887 * sh-tdep.c (set_sh_command, show_sh_command): Constify.
2888 * command.h (add_prefix_cmd): Accept a cmd_const_cfunc_ftype.
2889 * target.c (target_command): Constify.
2890 * sparc64-tdep.c (info_adi_command): Constify.
2891 * record-full.c (cmd_record_full_start): Constify.
2892 (set_record_full_command): Constify. Fix typo.
2893 (show_record_full_command): Constify.
2894 * thread.c (thread_command, thread_apply_command): Constify.
2895 * memattr.c (dummy_cmd): Constify.
2896 * value.c (function_command): Constify.
2897 * frame.c (set_backtrace_cmd, show_backtrace_cmd): Constify.
2898 * probe.c (info_probes_command): Constify.
2899 * ser-tcp.c (set_tcp_cmd, show_tcp_cmd): Constify.
2900 * gnu-nat.c (set_task_cmd, show_task_cmd, set_thread_cmd)
2901 (show_thread_cmd, set_thread_default_cmd)
2902 (show_thread_default_cmd): Constify.
2903 (check_empty): Constify.
2904 * tracepoint.c (tfind_command): Constify.
2905 * cp-support.c (maint_cplus_command): Constify.
2906 * windows-tdep.c (info_w32_command): Constify.
2907 * record.c (cmd_record_start, set_record_command)
2908 (show_record_command, info_record_command, cmd_record_goto):
2909 Constify.
2910 * ravenscar-thread.c (set_ravenscar_command)
2911 (show_ravenscar_command): Constify.
2912 * utils.c (set_internal_problem_cmd, show_internal_problem_cmd):
2913 Constify.
2914 (add_internal_problem_command): Remove casts.
2915 * arc-tdep.c (maintenance_print_arc_command): Constify.
2916 * valprint.c (set_print, show_print, set_print_raw)
2917 (show_print_raw): Constify.
2918 * maint.c (maintenance_command, maintenance_info_command)
2919 (maintenance_print_command, maintenance_set_cmd)
2920 (maintenance_show_cmd, set_per_command_cmd)
2921 (show_per_command_cmd, maintenance_check_command): Constify.
2922 * language.c (set_check, show_check): Constify.
2923 * typeprint.c (show_print_type, set_print_type): Constify.
2924 * go32-nat.c (go32_info_dos_command): Constify.
2925
2926 2017-10-11 Tom Tromey <tom@tromey.com>
2927
2928 * breakpoint.c (prepare_re_set_context): Remove.
2929 (breakpoint_re_set_one): Update. Don't use cleanups.
2930 (breakpoint_re_set): Use scoped_restore, std::string, and
2931 scoped_restore_current_language.
2932
2933 2017-10-11 Tom Tromey <tom@tromey.com>
2934
2935 * breakpoint.c (commands_command_1): Use std::string.
2936 (cleanup_executing_breakpoints): Remove.
2937 (bpstat_do_actions_1): Use scoped_restore.
2938 (bpstat_check_watchpoint): Use std::string.
2939 (decode_static_tracepoint_spec): Likewise.
2940 (break_range_command): Likewise.
2941 (watch_command_1): Likewise.
2942 (compare_breakpoints): Change argument types.
2943 (clear_command): Use std::vector.
2944 (cleanup_executing_breakpoints): Remove.
2945 (update_global_location_list): Use unique_xmalloc_ptr.
2946 (strace_command): Remove unused declaration.
2947
2948 2017-10-11 John Baldwin <jhb@FreeBSD.org>
2949
2950 * Makefile.in (ALLDEPFILES): Add arm-fbsd-nat.c.
2951 * NEWS: Mention new FreeBSD/arm native configuration.
2952 * configure.host: Add arm*-*-freebsd*.
2953 * configure.nat: Likewise.
2954 * arm-fbsd-nat.c: New file.
2955
2956 2017-10-11 John Baldwin <jhb@FreeBSD.org>
2957
2958 * Makefile.in (ALL_TARGET_OBS): Add arm-fbsd-tdep.o.
2959 (ALLDEPFILES): Add arm-fbsd-tdep.c.
2960 * NEWS: Mention new FreeBSD/arm target.
2961 * configure.tgt: Add arm*-*-freebsd*.
2962 * arm-fbsd-tdep.c: New file.
2963 * arm-fbsd-tdep.h: New file.
2964
2965 2017-10-11 Maciej W. Rozycki <macro@imgtec.com>
2966
2967 * linux-tdep.c (linux_make_corefile_notes): Remove call to
2968 `gdbarch_elfcore_write_linux_prpsinfo'.
2969 * gdbarch.sh (elfcore_write_linux_prpsinfo): Remove architecture
2970 method.
2971 (elf_internal_linux_prpsinfo): Remove declaration.
2972 * gdbarch.h: Regenerate.
2973 * gdbarch.c: Regenerate.
2974
2975 2017-10-11 Maciej W. Rozycki <macro@imgtec.com>
2976
2977 * ppc-linux-tdep.c (ppc_linux_init_abi): Remove call to
2978 `set_gdbarch_elfcore_write_linux_prpsinfo'.
2979
2980 2017-10-11 Pedro Alves <palves@redhat.com>
2981
2982 * breakpoint.c (reattach_breakpoints): Delete.
2983 * breakpoint.h (reattach_breakpoints): Delete.
2984
2985 2017-10-11 Simon Marchi <simon.marchi@ericsson.com>
2986
2987 * symfile.c (registered_sym_fns): Make struct, not typedef.
2988 (DEF_VEC_O (registered_sym_fns)): Remove.
2989 (symtab_fns): Change type to std::vector.
2990 (add_symtab_fns): Adjust.
2991 (find_sym_fns): Adjust.
2992
2993 2017-10-11 Anton Kolesov <Anton.Kolesov@synopsys.com>
2994
2995 * arc-tdep.c (arc_gdbarch_init): Pass proper cpu value to disassembler.
2996 * arc-tdep.h (arc_arch_is_em): New function.
2997 (arc_arch_is_hs): Likewise.
2998
2999 2017-10-11 Egeyar Bagcioglu <egeyar.bagcioglu@oracle.com>
3000
3001 * macrotab.h (macro_lookup_inclusion): Remove unnecessary
3002 parentheses in the declaration.
3003 (macro_lookup_inclusion): Likewise.
3004 (macro_lookup_definition): Likewise.
3005 * p-lang.h (pascal_builtin_types): Likewise.
3006 * tui/tui-data.c (tui_win_list): Likewise.
3007 * tui/tui-data.h (tui_win_list): Likewise.
3008 * utils.h (make_cleanup_free_section_addr_info): Likewise.
3009
3010 2017-10-11 Mark Rages <markrages@gmail.com>
3011
3012 * target-memory.c (block_boundaries): Fix for block address not
3013 aligned on block size.
3014
3015 2017-10-10 Pedro Alves <palves@redhat.com>
3016 Tom Tromey <tom@tromey.com>
3017
3018 * breakpoint.c (struct captured_breakpoint_query_args)
3019 (do_captured_breakpoint_query, gdb_breakpoint_query): Delete.
3020 (print_breakpoint): New.
3021 * breakpoint.h (print_breakpoint): Declare.
3022 * common/common-exceptions.h (enum return_reason): Remove
3023 references to catch_exceptions.
3024 * exceptions.c (catch_exceptions, catch_exceptions_with_msg):
3025 Delete.
3026 * exceptions.h (catch_exceptions_ftype, catch_exceptions)
3027 (catch_exception_ftype, catch_exceptions_with_msg): Delete.
3028 * gdb.h: Delete.
3029 * gdbthread.h (thread_select): Declare.
3030 * mi/mi-cmd-break.c: Don't include gdb.h.
3031 (breakpoint_notify): Use print_breakpoint.
3032 * mi/mi-cmd-catch.c: Don't include gdb.h.
3033 * mi/mi-interp.c: Don't include gdb.h.
3034 (mi_print_breakpoint_for_event): New.
3035 (mi_breakpoint_created, mi_breakpoint_modified): Use
3036 mi_print_breakpoint_for_event.
3037 * mi/mi-main.c: Don't include gdb.h.
3038 (mi_cmd_thread_select): Parse the global thread ID here. Use
3039 thread_select instead of gdb_thread_select.
3040 (mi_cmd_thread_list_ids): Output "thread-ids" tuple here instead
3041 of using gdb_list_thread_ids.
3042 * remote-fileio.c (do_remote_fileio_request): Change type. Reply
3043 FILEIO_ENOSYS here.
3044 (remote_fileio_request): Use TRY/CATCH instead of
3045 catch_exceptions.
3046 * symfile-mem.c (struct symbol_file_add_from_memory_args)
3047 (symbol_file_add_from_memory_wrapper): Delete.
3048 (add_vsyscall_page): Use TRY/CATCH instead of catch_exceptions.
3049 * thread.c: Don't include gdb.h.
3050 (do_captured_list_thread_ids, gdb_list_thread_ids): Delete.
3051 (thread_alive): Use thread_select.
3052 (do_captured_thread_select): Delete, parts salvaged as ...
3053 (thread_select): ... this new function.
3054 (gdb_thread_select): Delete.
3055
3056 2017-10-10 Pedro Alves <palves@redhat.com>
3057 Tom Tromey <tom@tromey.com>
3058
3059 * breakpoint.c (breakpoint_cond_eval): Change return type to bool
3060 and reverse logic.
3061 (WP_DELETED, WP_VALUE_CHANGED, WP_VALUE_NOT_CHANGED, WP_IGNORE):
3062 No longer macros. Instead ...
3063 (enum wp_check_result): They're now values of this new
3064 enumeration.
3065 (watchpoint_check): Change return type to wp_check_result and
3066 parameter type to bpstat.
3067 (bpstat_check_watchpoint): Use TRY/CATCH instead of catch_errors.
3068 (bpstat_check_breakpoint_conditions): Use TRY/CATCH instead of
3069 catch_errors. Reverse logic of watchpoint_check call.
3070 (breakpoint_re_set_one): Now returns void and takes a breakpoint
3071 pointer as parameter.
3072 (breakpoint_re_set): Use TRY/CATCH instead of catch_errors.
3073 * common/common-exceptions.c (throw_exception_sjlj): Update
3074 comments to avoid mentioning catch_errors.
3075 * exceptions.c (catch_errors): Delete.
3076 * exceptions.h: Update comments to avoid mentioning catch_errors.
3077 (catch_errors_ftype, catch_errors): Delete.
3078 * infrun.c (normal_stop): Use TRY/CATCH instead of catch_errors.
3079 (hook_stop_stub): Delete.
3080 (restore_selected_frame): Change return type to void, and
3081 parameter type to const frame_id &.
3082 (restore_infcall_control_state): Use TRY/CATCH instead of
3083 catch_errors.
3084 * main.c (captured_command_loop): Return void and remove
3085 parameter. Remove references to catch_errors.
3086 (captured_main): Use TRY/CATCH instead of catch_errors.
3087 * objc-lang.c (objc_submethod_helper_data)
3088 (find_objc_msgcall_submethod_helper): Delete.
3089 (find_objc_msgcall_submethod): Use TRY/CATCH instead of
3090 catch_errors.
3091 * record-full.c (record_full_message): Return void.
3092 (record_full_message_args, record_full_message_wrapper): Delete.
3093 (record_full_message_wrapper_safe): Return bool and use TRY/CATCH
3094 instead of catch_errors.
3095 * solib-aix.c (solib_aix_open_symbol_file_object): Change
3096 parameter type to int.
3097 * solib-darwin.c (open_symbol_file_object): Ditto.
3098 * solib-dsbt.c (open_symbol_file_object): Ditto.
3099 * solib-frv.c (open_symbol_file_object): Ditto.
3100 * solib-svr4.c (open_symbol_file_object): Ditto.
3101 * solib-target.c (solib_target_open_symbol_file_object): Ditto.
3102 * solib.c (update_solib_list): Use TRY/CATCH instead of
3103 catch_errors.
3104 * solist.h (struct target_so_ops) <open_symbol_file_object>:
3105 Change type.
3106 * symmisc.c (struct print_symbol_args): Remove.
3107 (dump_symtab_1): Use TRY/CATCH instead of catch_errors.
3108 (print_symbol): Change type.
3109 * windows-nat.c (handle_load_dll, handle_unload_dll): Return void
3110 and remove parameters.
3111 (catch_errors): New.
3112 (get_windows_debug_event): Adjust.
3113
3114 2017-10-09 Tom Tromey <tom@tromey.com>
3115
3116 * mi/mi-main.c (free_splay_tree): Remove.
3117 (list_available_thread_groups): Use splay_tree_up.
3118 * common/gdb_splay_tree.h: New file.
3119
3120 2017-10-09 Tom Tromey <tom@tromey.com>
3121
3122 * mi/mi-main.c (do_nothing): Remove.
3123 (list_available_thread_groups): Update.
3124
3125 2017-10-09 Pedro Alves <palves@redhat.com>
3126
3127 * infrun.c (handle_inferior_event_1) <TARGET_WAITKIND_EXECD>: Skip
3128 reading registers when switching context.
3129
3130 2017-10-09 John Baldwin <jhb@FreeBSD.org>
3131
3132 * fbsd-nat.c (fbsd_siginfo_size): Use gdbarch_long_bit.
3133 (fbsd_convert_siginfo): Likewise.
3134 * fbsd-tdep.c (fbsd_core_xfer_siginfo): Likewise.
3135
3136 2017-10-09 Simon Marchi <simon.marchi@polymtl.ca>
3137
3138 * configure.ac (try_guile_versions): Remove guile-2.2.
3139 * configure: Regenerate.
3140
3141 2017-10-09 Tom Tromey <tom@tromey.com>
3142
3143 * Makefile.in (COMPILE.post, POSTCOMPILE): Restore $(basename).
3144 (COMPILE.pre): Use $(CXX).
3145
3146 2017-10-09 Pedro Alves <palves@redhat.com>
3147
3148 * cp-support.c (cp_remove_params): Return a gdb::unique_xmalloc_ptr.
3149 Use bool.
3150 (overload_list_add_symbol): Adjust to use gdb::unique_xmalloc_ptr.
3151 * cp-support.h (cp_remove_params): Now returns a
3152 gdb::unique_xmalloc_ptr.
3153 * dwarf2read.c (find_slot_in_mapped_hash): Now returns bool.
3154 Adjust to cp_remove_params returning a gdb::unique_xmalloc_ptr.
3155 * psymtab.c (psymtab_search_name): Adjust to cp_remove_params
3156 returning a gdb::unique_xmalloc_ptr.
3157 (lookup_partial_symbol): Adjust to use gdb::unique_xmalloc_ptr.
3158 * stack.c (find_frame_funname): Adjust to cp_remove_params
3159 returning a gdb::unique_xmalloc_ptr.
3160
3161 2017-10-08 Tom Tromey <tom@tromey.com>
3162
3163 * dwarf2read.c (dwarf2_get_dwz_file): Use
3164 gdb::unique_xmalloc_ptr.
3165 (find_slot_in_mapped_hash): Likewise.
3166 (dwarf2_physname): Likewise.
3167 (create_dwo_unit_in_dwp_v1): Use std::string.
3168 (create_dwo_unit_in_dwp_v2): Likewise.
3169 (lookup_dwo_cutu): Likewise.
3170 (inherit_abstract_dies): Use std::vector.
3171 (read_array_type): Likewise.
3172 (dwarf_decode_macros): Remove unused declaration.
3173 (unsigned_int_compar): Remove.
3174 (dwarf2_build_psymtabs_hard): Use scoped_restore.
3175 (psymtabs_addrmap_cleanup): Remove.
3176
3177 2017-10-08 Tom Tromey <tom@tromey.com>
3178
3179 * frame-unwind.c (frame_unwind_try_unwinder): Update.
3180 * frame.h (frame_cleanup_after_sniffer): Declare.
3181 (frame_prepare_for_sniffer): Return void.
3182 * frame.c (frame_cleanup_after_sniffer): No longer static. Change
3183 type of argument.
3184 (frame_prepare_for_sniffer): Return void.
3185
3186 2017-10-08 Tom Tromey <tom@tromey.com>
3187
3188 * utils.h (make_cleanup_value_free): Remove.
3189 * utils.c (do_value_free, struct cleanup): Remove.
3190 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full) <DWARF_VALUE_STACK>:
3191 Use gdb_value_up.
3192 * value.h (struct value_deleter): New.
3193 (gdb_value_up): New typedef.
3194
3195 2017-10-08 Tom Tromey <tom@tromey.com>
3196
3197 * symtab.c (free_search_symbols, do_free_search_symbols_cleanup)
3198 (make_cleanup_free_search_symbols): Remove.
3199 (search_symbols): Return std::vector.
3200 (symbol_search::compare_search_syms): Now member of
3201 symbol_search. Change arguments.
3202 (sort_search_symbols_remove_dups): Change arguments. Rewrite.
3203 (symtab_symbol_info, rbreak_command): Update.
3204 * symtab.h (struct symbol_search) <next>: Remove.
3205 Add constructors.
3206 (symbol_search::operator<): New function.
3207 (symbol_search::operator==): New function.
3208 (search_symbols): Remove std::vector.
3209 (free_search_symbols, make_cleanup_free_search_symbols): Remove.
3210 (symbol_search::compare_search_syms): Declare.
3211
3212 2017-10-06 Yao Qi <yao.qi@linaro.org>
3213
3214 * Makefile.in (ALL_64_TARGET_OBS): Replace aarch64-insn.o with
3215 arch/aarch64-insn.o.
3216 Remove one rule.
3217 * configure.tgt: Replace aarch64-insn.o with arch/aarch64-insn.o.
3218
3219 2017-10-06 Yao Qi <yao.qi@linaro.org>
3220
3221 * Makefile.in (ALL_TARGET_OBS): Replace arm.o, arm-get-next-pcs.o,
3222 and arm-linux.o with arch/arm.o, arch/arm-get-next-pcs.o and
3223 arch/arm-linux.o respectively.
3224 * configure.tgt: Likewise.
3225
3226 2017-10-06 Yao Qi <yao.qi@linaro.org>
3227
3228 * Makefile.in (ALL_TARGET_OBS): Rename i386.o to arch/i386.o.
3229 * configure.tgt (i386_tobjs): Replace i386.o with arch/i386.o.
3230
3231 2017-10-06 Pedro Alves <palves@redhat.com>
3232
3233 * windows-nat.c: Include <algorithm>.
3234
3235 2017-10-06 Yao Qi <yao.qi@linaro.org>
3236
3237 * configure.tgt (i386_tobjs): New variable.
3238 (amd64_tobjs): New variable.
3239 Set $cpu_obs and $os_obs.
3240
3241 2017-10-06 Yao Qi <yao.qi@linaro.org>
3242
3243 * Makefile.in (CONFIG_SRC_SUBDIR): New.
3244 (ALL_64_TARGET_OBS): Replace amd64.o with arch/amd64.o.
3245 (clean): Remove object files and dependency files.
3246 (distclean): Remove the directory.
3247 * configure.ac: Invoke AC_CONFIG_COMMANDS.
3248 * configure: Re-generated.
3249 * configure.tgt: Replace amd64.o with arch/amd64.o.
3250
3251 2017-10-05 Jose E. Marchesi <jose.marchesi@oracle.com>
3252
3253 PR build/22188
3254 * arm-tdep.c (arm_decode_misc_memhint_neon): Fix decoding of CPS
3255 and SETEND.
3256
3257 2017-10-05 Pedro Alves <palves@redhat.com>
3258
3259 * linux-nat.c (linux_child_follow_fork): When following the parent
3260 and detaching the child, consult the parent thread's architecture
3261 instead of the child's.
3262
3263 2017-10-05 Ulrich Weigand <uweigand@de.ibm.com>
3264
3265 * ax.h: Do not include "doublest.h".
3266 (union agent_val): Remove.
3267
3268 2017-10-05 Ulrich Weigand <uweigand@de.ibm.com>
3269
3270 * dfp.h (MAX_DECIMAL_STRING): Move to dfp.c.
3271 (decimal_to_string): Return std::string object.
3272 (decimal_from_string): Accept std::string object. Return bool.
3273 (decimal_from_integral, decimal_from_doublest): Remove.
3274 (decimal_from_longest): Add prototype.
3275 (decimal_from_ulongest): Likewise.
3276 (decimal_to_longest): Likewise.
3277 (decimal_from_doublest): Likewise.
3278 * dfp.c: Do not include "gdbtypes.h" or "value.h".
3279 (MAX_DECIMAL_STRING): Move here.
3280 (decimal_to_string): Return std::string object.
3281 (decimal_from_string): Accept std::string object. Return bool.
3282 (decimal_from_integral): Remove, replace by ...
3283 (decimal_from_longest, decimal_from_ulongest): ... these new functions.
3284 (decimal_to_longest): New function.
3285 (decimal_from_floating): Remove, replace by ...
3286 (decimal_from_doublest): ... this new function.
3287 (decimal_to_doublest): Update to new decimal_to_string interface.
3288
3289 * value.c (unpack_long): Use decimal_to_longest.
3290 * valops.c (value_cast): Use decimal_from_doublest instead of
3291 decimal_from_floating. Use decimal_from_[u]longest isntead of
3292 decimal_from_integral.
3293 * valarith.c (value_args_as_decimal): Likewise.
3294 * valprint.c (print_decimal_floating): Update to new
3295 decimal_to_string interface.
3296 * printcmd.c (printf_decfloat): Likewise.
3297 * c-exp.y (parse_number): Update to new decimal_from_string interface.
3298
3299 2017-10-05 Ulrich Weigand <uweigand@de.ibm.com>
3300
3301 * doublest.h: Do not include "floatformat.h". Remove stale comments.
3302 * gdbtypes.c: Include "floatformat.h".
3303 * value.c: Likewise.
3304 * m68k-tdep.c: Likewise.
3305
3306 * findvar.c: Do not include "floatformat.h".
3307 * amd64-darwin-tdep.c: Likewise.
3308 * arm-linux-tdep.c: Likewise.
3309 * i386-darwin-tdep.c: Likewise.
3310 * i387-tdep.c: Likewise.
3311 * m68k-linux-tdep.c: Likewise.
3312 * mep-tdep.c: Likewise.
3313 * mips-tdep.c: Likewise.
3314 * nios2-tdep.c: Likewise.
3315 * s390-linux-tdep.c: Likewise.
3316 * sparc-obsd-tdep.c: Likewise.
3317 * sparc-tdep.c: Likewise.
3318 * sparc64-tdep.c: Likewise.
3319 * spu-tdep.c: Likewise.
3320 * tic6x-tdep.c: Likewise.
3321 * tilegx-tdep.c: Likewise.
3322 * vax-tdep.c: Likewise.
3323 * xstormy16-tdep.c: Likewise.
3324 * xtensa-tdep.c: Likewise.
3325
3326 * top.c: Do not include "doublest.h".
3327 * aarch64-tdep.c: Likewise.
3328 * alpha-tdep.c: Likewise.
3329 * arm-linux-tdep.c: Likewise.
3330 * m68k-linux-tdep.c: Likewise.
3331 * tilegx-tdep.c: Likewise.
3332 * xstormy16-tdep.c: Likewise.
3333
3334 2017-10-05 John Baldwin <jhb@FreeBSD.org>
3335
3336 * mips-fbsd-tdep.c (MIPS_INST_ADDIU_A0_SP_N32): Define.
3337 (mipsn32_fbsd_sigframe): Define.
3338 (mips_fbsd_init_abi): Install mipsn32_fbsd_sigframe unwinder
3339 for FreeBSD/mipsn32.
3340
3341 2017-10-05 John Baldwin <jhb@FreeBSD.org>
3342
3343 * fbsd-tdep.c (fbsd_print_auxv_entry): Handle AT_EHDRFLAGS and
3344 AT_HWCAP.
3345
3346 2017-10-05 Tristan Gingold <tgingold@free.fr>
3347
3348 * MAINTAINERS (Misc): Update my email address.
3349
3350 2017-10-04 Pedro Alves <palves@redhat.com>
3351
3352 * remote.c (get_remote_arch_state): New 'gdbarch' parameter. Use
3353 it instead of target_gdbarch.
3354 (get_remote_state, get_remote_packet_size): Adjust
3355 get_remote_arch_state calls, passing down target_gdbarch
3356 explicitly.
3357 (packet_reg_from_regnum, packet_reg_from_pnum): New parameter
3358 'gdbarch' and use it instead of target_gdbarch.
3359 (get_memory_packet_size): Adjust get_remote_arch_state calls,
3360 passing down target_gdbarch explicitly.
3361 (struct stop_reply) <arch>: New field.
3362 (remote_parse_stop_reply): Use the stopped thread's architecture,
3363 not the current inferior's. Save the architecture in the
3364 stop_reply.
3365 (process_stop_reply): Use the stop reply's architecture.
3366 (process_g_packet, remote_fetch_registers)
3367 (remote_prepare_to_store, store_registers_using_G)
3368 (remote_store_registers): Adjust get_remote_arch_state calls,
3369 using the regcache's architecture.
3370 (remote_get_trace_status): Adjust get_remote_arch_state calls,
3371 passing down target_gdbarch explicitly.
3372 * spu-multiarch.c (spu_thread_architecture): Defer to the target
3373 beneath instead of calling target_gdbarch.
3374 * target.c (default_thread_architecture): Use the specified
3375 inferior's architecture, instead of the current inferior's
3376 architecture (via target_gdbarch).
3377
3378 2017-10-04 Pedro Alves <palves@redhat.com>
3379
3380 * regcache.c (get_thread_arch_regcache): Remove null_ptid special
3381 case.
3382 (regcache_print): Handle !target_has_registers here instead.
3383
3384 2017-10-04 Pedro Alves <palves@redhat.com>
3385
3386 * frame.c (create_test_frame): Delete.
3387 * frame.h (create_test_frame): Delete.
3388 * gdbarch-selftests.c: Include gdbthread.h and target.h.
3389 (class regcache_test): Delete.
3390 (test_target_has_registers, test_target_has_stack)
3391 (test_target_has_memory, test_target_prepare_to_store)
3392 (test_target_store_registers): New functions.
3393 (test_target_ops): New class.
3394 (register_to_value_test): Error out if there's already a
3395 process_stratum (or higher) target pushed. Create a fuller mock
3396 environment, with mock target_ops, inferior, address space, thread
3397 and inferior_ptid.
3398 * progspace.c (struct address_space): Move to ...
3399 * progspace.h (struct address_space): ... here.
3400 * regcache.h (regcache::~regcache, regcache::raw_write)
3401 [GDB_SELF_TEST]: No longer virtual.
3402
3403 2017-10-04 Simon Marchi <simon.marchi@ericsson.com>
3404
3405 * mi/mi-main.c (list_available_thread_groups): Reverse filter logic.
3406
3407 2017-10-04 Pedro Alves <palves@redhat.com>
3408
3409 * guile/scm-breakpoint.c (gdbscm_breakpoint_commands): Move code
3410 out of 'between TRY and CATCH'.
3411
3412 2017-10-04 Pedro Alves <palves@redhat.com>
3413
3414 * cli/cli-cmds.c (complete_command): Add missing END_CATCH.
3415 * common/common-exceptions.h (TRY): Open an outermost scope.
3416 Expand intro comment.
3417 (CATCH): Reindent.
3418 (END_CATCH): Close the outermost scope.
3419 * completer.c (complete_line_internal): Add missing END_CATCH.
3420
3421 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
3422
3423 * NEWS (Changes since GDB 8.0): Add entry about new
3424 'set-cwd-on-gdbserver' feature.
3425 (New remote packets): Add entry for QSetWorkingDir.
3426 * common/common-inferior.h (set_inferior_cwd): New prototype.
3427 * infcmd.c (set_inferior_cwd): Remove "static".
3428 (show_cwd_command): Expand text to include remote debugging.
3429 * remote.c: Add PACKET_QSetWorkingDir.
3430 (remote_protocol_features) <QSetWorkingDir>: New entry for
3431 PACKET_QSetWorkingDir.
3432 (extended_remote_set_inferior_cwd): New function.
3433 (extended_remote_create_inferior): Call
3434 "extended_remote_set_inferior_cwd".
3435 (_initialize_remote): Call "add_packet_config_cmd" for
3436 QSetWorkingDir.
3437
3438 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
3439
3440 * NEWS (New commands): Mention "set/show cwd".
3441 * cli/cli-cmds.c (_initialize_cli_cmds): Mention "set cwd" on
3442 "cd" command's help text.
3443 * common/common-inferior.h (get_inferior_cwd): New prototype.
3444 * infcmd.c (inferior_cwd_scratch): New global variable.
3445 (set_inferior_cwd): New function.
3446 (get_inferior_cwd): Likewise.
3447 (set_cwd_command): Likewise.
3448 (show_cwd_command): Likewise.
3449 (_initialize_infcmd): Add "set/show cwd" commands.
3450 * inferior.h (class inferior) <cwd>: New field.
3451 * nat/fork-inferior.c: Include "gdb_tilde_expand.h".
3452 (fork_inferior): Change inferior's cwd before its execution.
3453 * windows-nat.c (windows_create_inferior): Pass inferior's cwd
3454 to CreateProcess.
3455
3456 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
3457
3458 * Makefile.in (SFILES): Add gdb_tilde_expand.c.
3459 (HFILES_NO_SRCDIR): Add gdb_tilde_expand.h.
3460 (COMMON_OBS): Add gdb_tilde_expand.o.
3461 * common/gdb_tilde_expand.c: New file.
3462 * common/gdb_tilde_expand.h: Likewise.
3463
3464 2017-10-03 Maciej W. Rozycki <macro@imgtec.com>
3465
3466 * gdbarch.sh (objfile): Remove duplicate declaration.
3467 * gdbarch.h: Regenerate.
3468
3469 2017-10-03 Tom Tromey <tom@tromey.com>
3470
3471 * utils.c (internal_vproblem): Use string_vprintf.
3472
3473 2017-10-03 Tom Tromey <tom@tromey.com>
3474
3475 * printcmd.c (info_symbol_command): Use std::string.
3476
3477 2017-10-03 Tom Tromey <tom@tromey.com>
3478
3479 * top.c (gdb_safe_append_history): Use std::string.
3480
3481 2017-10-03 Tom Tromey <tom@tromey.com>
3482
3483 * event-top.c (stdin_event_handler): Update.
3484 * main.c (captured_main_1): Update.
3485 * top.h (make_delete_ui_cleanup): Remove.
3486 (struct ui): Add constructor and destructor.
3487 (new_ui, delete_ui): Remove.
3488 * top.c (make_delete_ui_cleanup): Remove.
3489 (new_ui_command): Use std::unique_ptr.
3490 (delete_ui_cleanup): Remove.
3491 (ui::ui): Rename from new_ui. Update.
3492 (free_ui): Remove.
3493 (ui::~ui): Rename from delete_ui. Update.
3494
3495 2017-10-03 Tom Tromey <tom@tromey.com>
3496
3497 * symfile.c (load_progress): Use gdb::byte_vector.
3498
3499 2017-10-03 Tom Tromey <tom@tromey.com>
3500
3501 * mi/mi-main.c (mi_cmd_trace_frame_collected): Remove unused
3502 declaration.
3503 * printcmd.c (x_command): Remove unused declaration.
3504 * symfile.c (symbol_file_command): Remove unused declaration.
3505
3506 2017-10-03 Tom Tromey <tom@tromey.com>
3507
3508 * utils.c (internal_vproblem): Use std::string.
3509 (defaulted_query): Likewise.
3510
3511 2017-10-03 Tom Tromey <tom@tromey.com>
3512
3513 * guile/scm-ports.c (ioscm_with_output_to_port_worker): Update.
3514 * top.c (execute_command_to_string): Update.
3515 * utils.c (make_cleanup_restore_page_info): Remove.
3516 (do_restore_page_info_cleanup): Remove.
3517 (set_batch_flag_and_restore_page_info):
3518 New.
3519 (make_cleanup_restore_page_info): Remove.
3520 (set_batch_flag_and_make_cleanup_restore_page_info): Remove.
3521 (~set_batch_flag_and_restore_page_info): New
3522 (make_cleanup_restore_uinteger): Remove.
3523 (make_cleanup_restore_integer): Remove.
3524 (struct restore_integer_closure): Remove.
3525 (restore_integer): Remove.
3526 * utils.h (struct set_batch_flag_and_restore_page_info): New
3527 class.
3528 (set_batch_flag_and_make_cleanup_restore_page_info): Remove.
3529 (make_cleanup_restore_page_info): Remove.
3530 (make_cleanup_restore_uinteger) Remove.
3531 (make_cleanup_restore_integer) Remove.
3532
3533 2017-10-03 Tom Tromey <tom@tromey.com>
3534
3535 * record-full.h (record_full_gdb_operation_disable_set): Return
3536 scoped_restore_tmpl<int>.
3537 * infrun.c (adjust_pc_after_break): Update.
3538 (handle_signal_stop): Update.
3539 * record-full.c (record_full_gdb_operation_disable_set): Return
3540 scoped_restore_tmpl<int>.
3541 (record_full_wait_1, record_full_insert_breakpoint)
3542 (record_full_remove_breakpoint, record_full_save)
3543 (record_full_goto_insn): Update.
3544
3545 2017-10-02 Tom Tromey <tom@tromey.com>
3546
3547 PR rust/22236:
3548 * rust-lang.c (rust_val_print_str): New function.
3549 (val_print_struct): Call it.
3550 (rust_subscript): Preserve name of slice type.
3551
3552 2017-10-02 Tom Tromey <tom@tromey.com>
3553
3554 * rust-lang.c (rust_subscript): Handle slices in
3555 EVAL_AVOID_SIDE_EFFECTS case.
3556
3557 2017-10-02 Tom Tromey <tom@tromey.com>
3558
3559 * rust-lang.c (rust_slice_type_p): Recognize &str as a slice type.
3560
3561 2017-10-02 Tom Tromey <tom@tromey.com>
3562
3563 * rust-lang.h (rust_slice_type): Add "extern".
3564
3565 2017-10-02 Tom Tromey <tom@tromey.com>
3566 Pedro Alves <palves@redhat.com>
3567
3568 * ada-lang.h (ada_exc_info::operator<): Make const.
3569 (ada_exc_info::operator==): Make const.
3570 * ada-lang.c (ada_exc_info::operator<, ada_exc_info::operator==):
3571 Make const.
3572
3573 2017-09-29 Tom Tromey <tom@tromey.com>
3574
3575 * target.c (read_whatever_is_readable): Change type of "result".
3576 Update.
3577 (free_memory_read_result_vector): Remove.
3578 (read_memory_robust): Change return type. Update.
3579 * mi/mi-main.c (mi_cmd_data_read_memory_bytes): Update. Use
3580 bin2hex, std::string.
3581 * target.h (memory_read_result_s): Remove typedef.
3582 (free_memory_read_result_vector): Remove.
3583 (read_memory_robust): Return std::vector.
3584
3585 2017-09-29 Tom Tromey <tom@tromey.com>
3586
3587 * mi/mi-main.c (captured_mi_execute_command): Use scope_restore.
3588
3589 2017-09-29 Tom Tromey <tom@tromey.com>
3590
3591 * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions): Update.
3592 * ada-lang.h (struct ada_exc_info): Remove typedef. Declare
3593 operator< and operator==.
3594 (ada_exceptions_list): Return a std::vector.
3595 * ada-lang.c (ada_exc_info::operator<): Rename from
3596 compare_ada_exception_info.
3597 (ada_exc_info::operator==): New.
3598 (sort_remove_dups_ada_exceptions_list): Change type of
3599 "exceptions".
3600 (ada_add_standard_exceptions, ada_add_exceptions_from_frame)
3601 (ada_add_global_exceptions): Likewise.
3602 (ada_exceptions_list_1): Return a std::vector.
3603 (ada_exceptions_list): Likewise.
3604
3605 2017-09-29 Tom Tromey <tom@tromey.com>
3606
3607 * mi/mi-main.c (struct print_one_inferior_data) <inferiors>: Now a
3608 'std::set *'.
3609 (print_one_inferior): Update.
3610 (free_vector_of_ints): Remove.
3611 (list_available_thread_groups): Change "ids" to std::set.
3612 (mi_cmd_list_thread_groups): Update.
3613 (struct collect_cores_data) <core>: Now a std::set.
3614 (collect_cores): Update.
3615 (unique): Remove.
3616 (print_one_inferior): Update.
3617
3618 2017-09-29 Tom Tromey <tom@tromey.com>
3619
3620 * mi/mi-main.c (mi_execute_cli_command): Use std::string.
3621 (mi_execute_async_cli_command): Likewise.
3622 (mi_cmd_trace_frame_collected): Use field_fmt.
3623
3624 2017-09-29 Tom Tromey <tom@tromey.com>
3625
3626 * mi/mi-main.c (mi_cmd_data_write_memory_bytes): Use
3627 gdb::byte_vector.
3628
3629 2017-09-29 Tom Tromey <tom@tromey.com>
3630
3631 * mi/mi-parse.c (mi_parse): Remove unused declaration.
3632
3633 2017-09-29 Tom Tromey <tom@tromey.com>
3634
3635 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Don't copy "oarg".
3636
3637 2017-09-29 Tom Tromey <tom@tromey.com>
3638
3639 * varobj.h (varobj_gen_name): Return std::string.
3640 * varobj.c (varobj_gen_name): Return std::string.
3641 * mi/mi-cmd-var.c (mi_cmd_var_create): Use std::string.
3642 (mi_cmd_var_delete): Don't copy "name".
3643
3644 2017-09-29 Tom Tromey <tom@tromey.com>
3645
3646 * mi/mi-cmd-break.c (mi_argv_to_format): Return std::string.
3647 (mi_cmd_break_insert_1): Update.
3648
3649 2017-09-29 Tom Tromey <tom@tromey.com>
3650
3651 * target.h (make_scoped_defer_target_commit_resume): Update.
3652 * target.c (make_scoped_defer_target_commit_resume): Rename from
3653 make_cleanup_defer_target_commit_resume. Return a
3654 scoped_restore.
3655 * infrun.c (proceed): Use make_scoped_defer_target_commit_resume.
3656
3657 2017-09-29 Tom Tromey <tom@tromey.com>
3658
3659 * main.c (captured_main_1): Remove unused declaration.
3660 * spu-multiarch.c (parse_spufs_run): Remove unused declaration.
3661
3662 2017-09-29 Tom Tromey <tom@tromey.com>
3663
3664 * symtab.c (search_symbols): Remove unused outer cleanup.
3665 (make_source_files_completion_list): Remove unused declaration.
3666
3667 2017-09-29 Tom Tromey <tom@tromey.com>
3668
3669 * mt-tdep.c (mt_push_dummy_call): Use gdb::byte_vector.
3670
3671 2017-09-29 Tom Tromey <tom@tromey.com>
3672
3673 * xstormy16-tdep.c (xstormy16_push_dummy_call): Use
3674 gdb::byte_vector.
3675
3676 2017-09-29 Tom Tromey <tom@tromey.com>
3677
3678 * complaints.c (vcomplaint): Use std::string.
3679
3680 2017-09-29 Tom Tromey <tom@tromey.com>
3681
3682 * tracepoint.c (trace_variable_command): Use std::string.
3683 (encode_actions_1): Remove unused declarations.
3684 (create_tsv_from_upload): Use std::string.
3685
3686 2017-09-29 Tom Tromey <tom@tromey.com>
3687
3688 * cp-support.c (gdb_demangle): Use std::string.
3689
3690 2017-09-29 Tom Tromey <tom@tromey.com>
3691
3692 * stack.c (parse_frame_specification): Use std::string
3693 (info_frame_command): Use gdb::unique_xmalloc_ptr.
3694
3695 2017-09-29 Tom Tromey <tom@tromey.com>
3696
3697 * tilegx-tdep.c (tilegx_push_dummy_call): Use gdb::byte_vector.
3698
3699 2017-09-29 Tom Tromey <tom@tromey.com>
3700
3701 * utils.c (vfprintf_maybe_filtered): Use std::string.
3702 (vfprintf_unfiltered): Likewise.
3703
3704 2017-09-29 Tom Tromey <tom@tromey.com>
3705
3706 * event-top.c (top_level_prompt): Return std::string.
3707 (display_gdb_prompt): Update.
3708
3709 2017-09-29 Tom Tromey <tom@tromey.com>
3710
3711 * unittests/common-utils-selftests.c (format): New function.
3712 (string_vprintf_tests): New function.
3713 (_initialize_common_utils_selftests): Register new tests.
3714 * common/common-utils.c (string_vprintf): New function.
3715 * common/common-utils.h (string_vprintf): Declare.
3716
3717 2017-09-29 Pedro Alves <palves@redhat.com>
3718
3719 * common/rsp-low.c (unpack_varlen_hex): Constify.
3720 * common/rsp-low.h (unpack_varlen_hex): Constify.
3721 * linux-nat.c (linux_child_static_tracepoint_markers_by_strid):
3722 Constify.
3723 * remote.c (remote_set_permissions, read_ptid)
3724 (remote_current_thread, remote_get_threads_with_qthreadinfo)
3725 (remote_static_tracepoint_marker_at)
3726 (remote_static_tracepoint_markers_by_strid)
3727 (stop_reply_extract_thread, remote_parse_stop_reply): Constify.
3728 * tracepoint.c (parse_trace_status, parse_tracepoint_status)
3729 (parse_tracepoint_definition, parse_tsv_definition)
3730 (parse_static_tracepoint_marker_definition): Constify.
3731 * tracepoint.h (parse_static_tracepoint_marker_definition)
3732 (parse_trace_status, parse_tracepoint_status)
3733 (parse_tracepoint_definition, parse_tsv_definition): Constify.
3734
3735 2017-09-29 Pedro Alves <palves@redhat.com>
3736
3737 * remote.c (target_buf, target_buf_size): Delete.
3738 (remote_get_noisy_reply): Remove buf_p and sizeof_buf parameters.
3739 Use the connection's packet buffer instead.
3740 All callers adjusted.
3741 (_initialize_remote): Remove references to target_buf and
3742 target_buf_size.
3743
3744 2017-09-28 Pedro Alves <palves@redhat.com>
3745
3746 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
3747 unittests/common-utils-selftests.c.
3748 (SUBDIR_UNITTESTS_OBS): Add common-utils-selftests.o.
3749 (COMMON_OBS): Remove utils-selftests.o.
3750 * utils-selftests.c: Move to ...
3751 * unittests/common-utils-selftests.c: ... here and rename self
3752 test to "string_printf".
3753
3754 2017-09-28 Alexander Shaposhnikov <alexander.v.shaposhnikov@gmail.com> (tiny patch)
3755
3756 * dwarf2read.c (open_and_init_dwp_file): Protect against dwp_file
3757 having NULL cus or tus.
3758
3759 2017-09-27 Ulrich Weigand <uweigand@de.ibm.com>
3760
3761 * arm-tdep.c: (convert_from_extended): Remove.
3762 (convert_to_extended): Likewise.
3763 (arm_extract_return_value): Use convert_typed_floating.
3764 (arm_store_return_value): Likewise.
3765
3766 * sh-tdep.h (struct gdbarch_tdep): Add sh_littlebyte_bigword_type.
3767 * sh-tdep.c: Do not include "floatformat.h".
3768 (sh_littlebyte_bigword_type): New function.
3769 (sh_register_convert_to_virtual): Use convert_typed_floating.
3770 (sh_register_convert_to_raw): Likewise.
3771 * sh64-tdep.c: (struct gdbarch_tdep): Add sh_littlebyte_bigword_type.
3772 (sh64_littlebyte_bigword_type): New function.
3773 (sh64_extract_return_value): Use convert_typed_floating.
3774 (sh64_register_convert_to_virtual): Likewise.
3775 (sh64_register_convert_to_raw): Likewise.
3776
3777 2017-09-27 Ulrich Weigand <uweigand@de.ibm.com>
3778
3779 * doublest.h (floatformat_from_type): Move to gdbtypes.h.
3780 * doublest.c (floatformat_from_type): Move to gdbtypes.c.
3781
3782 * gdbtypes.h (union type_specific): Make field floatformat hold
3783 just a single struct floatformat, not an array.
3784 (floatformat_from_type): Move here.
3785 * gdbtypes.c (floatformat_from_type): Move here. Update to
3786 changed TYPE_FLOATFORMAT definition.
3787 (verify_floatformat): Update to changed TYPE_FLOATFORMAT.
3788 (recursive_dump_type): Likewise.
3789 (init_float_type): Install correct floatformat for byte order.
3790 (arch_float_type): Likewise.
3791
3792 2017-09-27 Ulrich Weigand <uweigand@de.ibm.com>
3793
3794 * gdbtypes.c (init_type): Change incoming argument from
3795 length-in-bytes to length-in-bits. Assert length is a
3796 multiple of TARGET_CHAR_BITS.
3797 (arch_type, arch_flags_type): Likewise.
3798 (init_integer_type): Update call to init_type.
3799 (init_character_type): Likewise.
3800 (init_boolean_type): Likewise.
3801 (init_float_type): Likewise.
3802 (init_decfloat_type): Likewise.
3803 (init_complex_type): Likewise.
3804 (init_pointer_type): Likewise.
3805 (objfile_type): Likewise.
3806 (arch_integer_type): Update call to arch_type.
3807 (arch_character_type): Likewise.
3808 (arch_boolean_type): Likewise.
3809 (arch_float_type): Likewise.
3810 (arch_decfloat_type): Likewise.
3811 (arch_complex_type): Likewise.
3812 (arch_pointer_type): Likewise.
3813 (gdbtypes_post_init): Likewise.
3814
3815 * dwarf2read.c (dwarf2_init_float_type): Update call to init_type.
3816 (read_base_type): Likewise.
3817 * mdebugread.c (basic_type): Likewise.
3818 * stabsread.c (dbx_init_float_type): Likewise.
3819 (rs6000_builtin_type): Likewise.
3820 (read_range_type): Likewise. Also, fix call to init_integer_type
3821 with erroneous length argument.
3822
3823 * ada-lang.c (ada_language_arch_info): Update call to arch_type.
3824 * d-lang.c (build_d_types): Likewise.
3825 * f-lang.c (build_fortran_types): Likewise.
3826 * go-lang.c (build_go_types): Likewise.
3827 * opencl-lang.c (build_opencl_types): Likewise.
3828 * jit.c (finalize_symtab): Likewise.
3829 * gnu-v3-abi.c (build_gdb_vtable_type): Likewise.
3830 (build_std_type_info_type): Likewise.
3831 * target-descriptions.c (tdesc_gdb_type): Likewise. Also,
3832 update call to arch_flags_type.
3833
3834 * linux-tdep.c (linux_get_siginfo_type_with_fields): Update call to
3835 arch_type.
3836 * fbsd-tdep.c (fbsd_get_siginfo_type): Likewise.
3837 * windows-tdep.c (windows_get_tlb_type): Likewise.
3838
3839 * avr-tdep.c (avr_gdbarch_init): Update call to arch_type.
3840 * ft32-tdep.c (ft32_gdbarch_init): Likewise.
3841 * m32c-tdep.c (make_types): Likewise.
3842 * rl78-tdep.c (rl78_gdbarch_init): Likewise.
3843 (rl78_psw_type): Update call to arch_flags_type.
3844 * m68k-tdep.c (m68k_ps_type): Update call to arch_flags_type.
3845 * rx-tdep.c (rx_psw_type): Likewise.
3846 (rx_fpsw_type): Likewise.
3847 * sparc-tdep.c (sparc_psr_type): Likewise.
3848 (sparc_fsr_type): Likewise.
3849 * sparc64-tdep.c (sparc64_pstate_type): Likewise.
3850 (sparc64_ccr_type): Likewise.
3851 (sparc64_fsr_type): Likewise.
3852 (sparc64_fprs_type): Likewise.
3853
3854 2017-09-27 Tom Tromey <tom@tromey.com>
3855
3856 * findcmd.c (find_command): Constify.
3857
3858 2017-09-27 Tom Tromey <tom@tromey.com>
3859
3860 * ada-tasks.c (task_command_1, task_command): Constify.
3861
3862 2017-09-27 Tom Tromey <tom@tromey.com>
3863
3864 * symtab.c (maintenance_print_symbol_cache)
3865 (maintenance_flush_symbol_cache)
3866 (maintenance_print_symbol_cache_statistics): Constify.
3867
3868 2017-09-27 Tom Tromey <tom@tromey.com>
3869
3870 * inferior.c (detach_inferior_command, kill_inferior_command)
3871 (inferior_command): Constify.
3872
3873 2017-09-27 Tom Tromey <tom@tromey.com>
3874
3875 * regcache.c (regcache_print, maintenance_print_registers)
3876 (maintenance_print_raw_registers)
3877 (maintenance_print_cooked_registers)
3878 (maintenance_print_register_groups)
3879 (maintenance_print_remote_registers): Constify.
3880
3881 2017-09-27 Tom Tromey <tom@tromey.com>
3882
3883 * printcmd.c (map_display_numbers, undisplay_command)
3884 (enable_disable_display_command, enable_display_command)
3885 (disable_display_command): Constify.
3886
3887 2017-09-27 Tom Tromey <tom@tromey.com>
3888
3889 * breakpoint.h (delete_command): Don't declare.
3890 * breakpoint.c (delete_command, enable_once_command)
3891 (enable_count_command, enable_delete_command, breakpoint_1)
3892 (maintenance_info_breakpoints, stopin_command, stopat_command)
3893 (delete_command, delete_trace_command, save_breakpoints)
3894 (save_breakpoints_command, save_tracepoints_command): Constify.
3895
3896 2017-09-27 Tom Tromey <tom@tromey.com>
3897
3898 * macrocmd.c (macro_expand_command, macro_expand_once_command)
3899 (skip_ws, extract_identifier, macro_define_command)
3900 (macro_undef_command, macro_list_command): Constify.
3901
3902 2017-09-27 Tom Tromey <tom@tromey.com>
3903
3904 * infcmd.c (environment_info, set_environment_command)
3905 (unset_environment_command, path_info, info_proc_cmd_1)
3906 (info_proc_cmd_mappings, info_proc_cmd_stat)
3907 (info_proc_cmd_status, info_proc_cmd_cwd, info_proc_cmd_cmdline)
3908 (info_proc_cmd_exe, info_proc_cmd_all): Constify.
3909
3910 2017-09-27 Tom Tromey <tom@tromey.com>
3911
3912 * i386-tdep.c (i386_mpx_info_bounds, i386_mpx_set_bounds):
3913 Constify.
3914
3915 2017-09-27 Tom Tromey <tom@tromey.com>
3916
3917 * symfile-mem.c (add_symbol_file_from_memory_command): Constify.
3918
3919 2017-09-27 Tom Tromey <tom@tromey.com>
3920
3921 * demangle.c (demangle_command): Constify.
3922
3923 2017-09-27 Tom Tromey <tom@tromey.com>
3924
3925 * progspace.c (maintenance_info_program_spaces_command):
3926 Constify.
3927
3928 2017-09-27 Tom Tromey <tom@tromey.com>
3929
3930 * compile/compile.c (check_raw_argument, compile_file_command)
3931 (compile_code_command, compile_print_command): Constify.
3932
3933 2017-09-27 Tom Tromey <tom@tromey.com>
3934
3935 * reggroups.c (maintenance_print_reggroups): Constify.
3936
3937 2017-09-27 Tom Tromey <tom@tromey.com>
3938
3939 * dwarf2read.c (save_gdb_index_command): Constify.
3940
3941 2017-09-27 Tom Tromey <tom@tromey.com>
3942
3943 * stap-probe.c (info_probes_stap_command): Constify.
3944
3945 2017-09-27 Tom Tromey <tom@tromey.com>
3946
3947 * fork-child.c (unset_exec_wrapper_command): Constify.
3948
3949 2017-09-27 Tom Tromey <tom@tromey.com>
3950
3951 * btrace.c (get_uint, get_context_size, no_chunk)
3952 (maint_btrace_packet_history_cmd)
3953 (maint_btrace_clear_packet_history_cmd, maint_btrace_clear_cmd)
3954 (maint_info_btrace_cmd): Constify.
3955
3956 2017-09-27 Tom Tromey <tom@tromey.com>
3957
3958 * reverse.c (delete_bookmark_command): Constify.
3959
3960 2017-09-27 Tom Tromey <tom@tromey.com>
3961
3962 * remote.c (set_memory_packet_size)
3963 (set_memory_write_packet_size, show_memory_write_packet_size)
3964 (set_memory_read_packet_size, show_memory_read_packet_size)
3965 (compare_sections_command, packet_command, remote_put_command)
3966 (remote_get_command, remote_delete_command): Constify.
3967
3968 2017-09-27 Tom Tromey <tom@tromey.com>
3969
3970 * mips-tdep.c (show_mipsfpu_command, set_mipsfpu_single_command)
3971 (set_mipsfpu_double_command, set_mipsfpu_none_command)
3972 (set_mipsfpu_auto_command): Constify.
3973
3974 2017-09-27 Tom Tromey <tom@tromey.com>
3975
3976 * cli/cli-cmds.h (cd_command): Constify.
3977 * cli/cli-cmds.c (cd_command): Constify.
3978
3979 2017-09-27 Tom Tromey <tom@tromey.com>
3980
3981 * thread.c (thread_name_command, thread_find_command): Constify.
3982
3983 2017-09-27 Tom Tromey <tom@tromey.com>
3984
3985 * probe.c (enable_probes_command, disable_probes_command):
3986 Constify.
3987
3988 2017-09-27 Tom Tromey <tom@tromey.com>
3989
3990 * symfile.c (symbol_file_command): Constify.
3991 * gdbcore.h (deprecated_file_changed_hook): Constify.
3992 * exec.c (deprecated_file_changed_hook, exec_file_command)
3993 (file_command): Constify.
3994 * defs.h (symbol_file_command): Constify.
3995
3996 2017-09-27 Tom Tromey <tom@tromey.com>
3997
3998 * remote-fileio.c (set_system_call_allowed)
3999 (show_system_call_allowed): Constify.
4000
4001 2017-09-27 Tom Tromey <tom@tromey.com>
4002
4003 * tracepoint.c (delete_trace_variable_command)
4004 (tfind_end_command, tfind_start_command, tfind_pc_command)
4005 (tfind_tracepoint_command, tfind_line_command)
4006 (tfind_range_command, tfind_outside_command): Constify.
4007
4008 2017-09-27 Tom Tromey <tom@tromey.com>
4009
4010 * ax-gdb.c (maint_agent_printf_command, agent_command)
4011 (agent_eval_command): Constify.
4012
4013 2017-09-27 Tom Tromey <tom@tromey.com>
4014
4015 * tracepoint.c (info_scope_command): Constify.
4016 * python/python.c (gdbpy_decode_line): Constify.
4017 * python/py-breakpoint.c (bppy_init): Constify.
4018 * mi/mi-cmd-break.c (mi_cmd_break_insert_1): Constify.
4019 * location.h: (new_linespec_location)
4020 (string_to_event_location_basic, string_to_event_location):
4021 Constify.
4022 * location.c (new_linespec_location)
4023 (string_to_event_location_basic, string_to_event_location):
4024 Constify.
4025 * linespec.h (decode_line_with_current_source)
4026 (decode_line_with_last_displayed, linespec_lex_to_end): Constify.
4027 * linespec.c (linespec_lex_to_end)
4028 (decode_line_with_current_source)
4029 (decode_line_with_last_displayed): Constify.
4030 * guile/scm-breakpoint.c (gdbscm_register_breakpoint_x):
4031 Constify.
4032 * cli/cli-cmds.c (edit_command, list_command): Constify.
4033 * breakpoint.h (until_break_command, watch_command_wrapper)
4034 (awatch_command_wrapper, rwatch_command_wrapper)
4035 (init_ada_exception_breakpoint): Constify.
4036 * breakpoint.c (break_command_1, dprintf_command)
4037 (break_range_command, watch_command_wrapper)
4038 (rwatch_command_wrapper, awatch_command_wrapper)
4039 (until_break_command, init_ada_exception_breakpoint)
4040 (strace_marker_create_sals_from_location, trace_command)
4041 (ftrace_command, strace_command, struct tracepoint): Constify.
4042 * ax-gdb.c (agent_command_1): Constify.
4043 * ada-lang.c (ada_exception_sal): Constify.
4044
4045 2017-09-27 Tom Tromey <tom@tromey.com>
4046
4047 * record.c (cmd_record_delete, cmd_record_stop, cmd_record_save)
4048 (cmd_record_goto_begin, cmd_record_goto_end, get_insn_number)
4049 (get_context_size, no_chunk, get_insn_history_modifiers)
4050 (cmd_record_insn_history, get_call_history_modifiers)
4051 (cmd_record_call_history): Constify.
4052
4053 2017-09-27 Tom Tromey <tom@tromey.com>
4054
4055 * source.c (show_substitute_path_command)
4056 (unset_substitute_path_command, set_substitute_path_command):
4057 Constify.
4058
4059 2017-09-27 Tom Tromey <tom@tromey.com>
4060
4061 * typeprint.c (maintenance_print_type): Constify.
4062 * maint.c (maintenance_dump_me, maintenance_demangle)
4063 (maintenance_time_display, maintenance_info_sections)
4064 (maintenance_print_statistics, maintenance_deprecate)
4065 (maintenance_undeprecate): Constify.
4066 (maintenance_do_deprecate): Constify. Use std::string.
4067 (maintenance_selftest): Constify.
4068 * gdbtypes.h (maintenance_print_type): Constify.
4069
4070 2017-09-27 Tom Tromey <tom@tromey.com>
4071
4072 * hppa-tdep.c (unwind_command): Constify.
4073
4074 2017-09-27 Tom Tromey <tom@tromey.com>
4075
4076 * target-descriptions.c (unset_tdesc_filename_cmd)
4077 (maint_print_c_tdesc_cmd, maintenance_check_xml_descriptions):
4078 Constify.
4079
4080 2017-09-27 Tom Tromey <tom@tromey.com>
4081
4082 * dummy-frame.c (maintenance_print_dummy_frames): Constify.
4083
4084 2017-09-27 Tom Tromey <tom@tromey.com>
4085
4086 * tui/tui.c (tui_enable_command, tui_disable_command): Constify.
4087
4088 2017-09-27 Tom Tromey <tom@tromey.com>
4089
4090 * tui/tui-regs.c (tui_reg_command): Constify.
4091
4092 2017-09-27 Tom Tromey <tom@tromey.com>
4093
4094 * skip.c (skip_file_command, skip_function_command)
4095 (skip_enable_command, skip_disable_command, skip_delete_command):
4096 Constify.
4097
4098 2017-09-27 Tom Tromey <tom@tromey.com>
4099
4100 * record-btrace.c (cmd_record_btrace_bts_start)
4101 (cmd_record_btrace_pt_start): Constify.
4102
4103 2017-09-27 Tom Tromey <tom@tromey.com>
4104
4105 * symmisc.c (maintenance_print_symbols)
4106 (maintenance_print_msymbols, maintenance_print_objfiles)
4107 (maintenance_info_symtabs, maintenance_check_symtabs)
4108 (maintenance_expand_symtabs, maintenance_info_line_tables):
4109 Constify.
4110
4111 2017-09-27 Tom Tromey <tom@tromey.com>
4112
4113 * top.c (new_ui_command): Constify.
4114
4115 2017-09-27 Tom Tromey <tom@tromey.com>
4116
4117 * symfile.c (add_symbol_file_command)
4118 (remove_symbol_file_command, list_overlays_command)
4119 (map_overlay_command, unmap_overlay_command)
4120 (overlay_auto_command, overlay_manual_command)
4121 (overlay_off_command, overlay_load_command): Constify.
4122
4123 2017-09-27 Tom Tromey <tom@tromey.com>
4124
4125 * spu-tdep.c (info_spu_event_command, info_spu_signal_command)
4126 (info_spu_mailbox_command, info_spu_dma_command)
4127 (info_spu_proxydma_command): Constify.
4128
4129 2017-09-27 Tom Tromey <tom@tromey.com>
4130
4131 * cli/cli-logging.c (set_logging_on, set_logging_off): Constify.
4132
4133 2017-09-27 Tom Tromey <tom@tromey.com>
4134
4135 * cli/cli-script.c (user_defined_command): Constify.
4136
4137 2017-09-27 Tom Tromey <tom@tromey.com>
4138
4139 * cli/cli-dump.c (dump_memory_command, dump_value_command)
4140 (dump_srec_memory, dump_srec_value, dump_ihex_memory)
4141 (dump_ihex_value, dump_verilog_memory, dump_verilog_value)
4142 (dump_tekhex_memory, dump_tekhex_value, dump_binary_memory)
4143 (dump_binary_value, append_binary_memory, append_binary_value):
4144 Constify.
4145 (struct dump_context) <func>: Constify.
4146 (add_dump_command): Update.
4147
4148 2017-09-27 Tom Tromey <tom@tromey.com>
4149
4150 * cli/cli-cmds.c (show_version, show_configuration)
4151 (source_command, show_user): Constify.
4152
4153 2017-09-27 Tom Tromey <tom@tromey.com>
4154
4155 * target.c (maintenance_print_target_stack): Constify.
4156
4157 2017-09-27 Tom Tromey <tom@tromey.com>
4158
4159 * interps.c (interpreter_exec_cmd): Constify.
4160
4161 2017-09-27 Tom Tromey <tom@tromey.com>
4162
4163 * record-full.c (cmd_record_full_restore): Constify.
4164
4165 2017-09-27 Tom Tromey <tom@tromey.com>
4166
4167 * memattr.c (enable_mem_command, disable_mem_command)
4168 (delete_mem_command): Constify.
4169
4170 2017-09-27 Tom Tromey <tom@tromey.com>
4171
4172 * value.c (show_convenience): Constify.
4173
4174 2017-09-27 Tom Tromey <tom@tromey.com>
4175
4176 * gdbcore.h (core_file_command): Update.
4177 * corefile.c (core_file_command): Constify.
4178
4179 2017-09-27 Tom Tromey <tom@tromey.com>
4180
4181 * user-regs.c (maintenance_print_user_registers): Constify.
4182
4183 2017-09-27 Tom Tromey <tom@tromey.com>
4184
4185 * cp-namespace.c (maintenance_cplus_namespace): Constify.
4186
4187 2017-09-27 Tom Tromey <tom@tromey.com>
4188
4189 * cp-support.c (first_component_command): Constify.
4190
4191 2017-09-27 Tom Tromey <tom@tromey.com>
4192
4193 * psymtab.c (maintenance_print_psymbols)
4194 (maintenance_info_psymtabs, maintenance_check_psymtabs):
4195 Constify.
4196
4197 2017-09-27 Tom Tromey <tom@tromey.com>
4198
4199 * windows-tdep.c (display_tib): Constify.
4200
4201 2017-09-27 Tom Tromey <tom@tromey.com>
4202
4203 * linux-fork.c (delete_checkpoint_command)
4204 (detach_checkpoint_command): Constify.
4205
4206 2017-09-27 Tom Tromey <tom@tromey.com>
4207
4208 * cp-abi.c (set_cp_abi_cmd, show_cp_abi_cmd): Constify.
4209
4210 2017-09-27 Tom Tromey <tom@tromey.com>
4211
4212 * arc-tdep.c (dump_arc_instruction_command): Constify.
4213
4214 2017-09-27 Tom Tromey <tom@tromey.com>
4215
4216 * valprint.c (set_radix, show_radix): Constify.
4217
4218 2017-09-27 Tom Tromey <tom@tromey.com>
4219
4220 * dtrace-probe.c (info_probes_dtrace_command): Constify.
4221
4222 2017-09-27 Tom Tromey <tom@tromey.com>
4223
4224 * command.h (not_just_help_class_command): Update.
4225 * cli/cli-decode.h (not_just_help_class_command): Update.
4226 * cli/cli-decode.c (not_just_help_class_command): Constify.
4227
4228 2017-09-27 Tom Tromey <tom@tromey.com>
4229
4230 * gdb_bfd.c (maintenance_info_bfds): Constify.
4231
4232 2017-09-27 Tom Tromey <tom@tromey.com>
4233
4234 * cli/cli-decode.c (add_cmd, set_cmd_cfunc): New function
4235 overloads.
4236 (do_add_cmd): Rename from add_cmd. Don't call set_cmd_cfunc.
4237 (do_const_cfunc): New function.
4238 (cmd_cfunc_eq): New overload.
4239 (cli_user_command_p): Check do_const_cfunc.
4240 * cli/cli-decode.h (struct cmd_list_element) <function>: New field
4241 const_cfunc.
4242 * command.h (add_cmd): Add const overload and no-function
4243 overload.
4244 (set_cmd_cfunc): Add const overload.
4245 (cmd_const_cfunc_ftype): Declare.
4246 (cmd_cfunc_eq): Add const overload.
4247 * breakpoint.c, cli-cmds.c, cli-dump.c, guile/scm-cmd.c,
4248 python/py-cmd.c, target.c, tracepoint.c: Use no-function add_cmd
4249 overload.
4250
4251 2017-09-27 Tom Tromey <tom@tromey.com>
4252
4253 * macroexp.c (get_next_token_for_substitution): New function.
4254 (substitute_args): Call it. Check for __VA_OPT__.
4255
4256 2017-09-26 Walfred Tedeschi <walfred.tedeschi@intel.com>
4257 Pedro Alves <palves@redhat.com>
4258
4259 * dwarf2read.c (dwarf2_cu): Remove field producer_is_icc and add
4260 producer_is_icc_lt_14.
4261 (producer_is_icc_lt_14): New function.
4262 (check_producer): Add code for checking version of ICC.
4263 (producer_is_icc): Move to producer.c.
4264 (read_structure_type): Restrict ICC workaround to ICC<14.
4265 * producer.c: Include selftest.h.
4266 (producer_is_icc, producer_parsing_tests, _initialize_producer):
4267 New functions.
4268 * producer.h (producer_is_icc): New declaration.
4269
4270 2017-09-26 Walfred Tedeschi <walfred.tedeschi@intel.com>
4271
4272 * Makefile.in (SFILES): Add producer.c.
4273 (COMMON_OBS): Add producer.o
4274 * amd64-tdep.c (producer.h): Add new include.
4275 * dwarf2read.c (producer.h): Add new include.
4276 * producer.c: New file.
4277 * producer.h: New file.
4278 * utils.c (producer_is_gcc, producer_is_gcc_ge_4): Move to
4279 producer.c.
4280 * utils.h (producer_is_gcc, producer_is_gcc_ge_4): Move to
4281 producer.h.
4282
4283 2017-09-26 Matthias Klose <doko@ubuntu.com>
4284
4285 * configure.ac: Search ncursesw before ncurses.
4286 Check ncursesw/ncurses.h before ncurses/ncurses.h.
4287 * gdb_curses.h: Include <ncursesw/ncurses.h>
4288 * config.in, configure: Regenerate.
4289
4290 2017-09-26 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
4291
4292 PR gdb/22185
4293 * configure.host <*-*-solaris2.[01], *-*-solaris2.[2-9]*>: Mark as
4294 obsolete.
4295 Use gdb_host sol2 for i[34567]86-*-solaris2*, x86_64-*-solaris2*.
4296 Remove i386sol2 support.
4297 * configure.nat <i386sol2>: Remove.
4298 <sol2-64>: Fold into ...
4299 <sol2>: ... this.
4300 Move common settings to default section.
4301 Add sol-thread.o.
4302 * configure.tgt <i[34567]86-*-solaris2.1[0-9]*,
4303 x86_64-*-solaris2.1[0-9]*>: Rename to ...
4304 <i[34567]86-*-solaris2*, x86_64-*-solaris2*>: ... this.
4305 <i[34567]86-*-solaris*>: Remove.
4306 <sparc-*-solaris2.[0-6], sparc-*-solaris2.[0-6].*>: Remove.
4307
4308 * configure.ac: Remove wctype in libw check.
4309 (_MSE_INT_H): Don't define on Solaris 7-9.
4310 <solaris*>: Remove libthread_db.so.1 check.
4311 * configure: Regenerate.
4312 * config.in: Regenerate.
4313
4314 * proc-service.c: Remove PROC_SERVICE_IS_OLD handling.
4315 (gdb_ps_prochandle_t, gdb_ps_read_buf_t, gdb_ps_write_buf_t)
4316 (gdb_ps_size_t): Remove.
4317 Use base types in users.
4318 * sol-thread.c: Likewise, also for gdb_ps_addr_t.
4319
4320 * NEWS (Changes since GDB 8.0): Document Solaris 2.0-9 removal.
4321
4322 2017-09-26 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
4323
4324 PR build/22206
4325 * sparc64-tdep.c (adi_tag_fd): Print pid as long.
4326 (adi_is_addr_mapped): Likewise.
4327 (PSR_ICC): Don't redefine.
4328 (PSR_IMPL): Likewise.
4329
4330 2017-09-25 Tom Tromey <tom@tromey.com>
4331
4332 * regcache.c (regcache::dump): Use string_printf.
4333
4334 2017-09-25 Tom Tromey <tom@tromey.com>
4335
4336 * regcache.c (class regcache_invalidator): New.
4337 (struct register_to_invalidate): Remove.
4338 (make_cleanup_regcache_invalidate): Remove.
4339 (regcache::raw_write): Use regcache_invalidator.
4340
4341 2017-09-25 Tom Tromey <tom@tromey.com>
4342
4343 * spu-tdep.c (spu2ppu_sniffer): Update.
4344 * regcache.h (make_cleanup_regcache_xfree): Don't declare.
4345 * regcache.c (do_regcache_xfree, make_cleanup_regcache_xfree):
4346 Remove.
4347 * ppc-linux-tdep.c (ppu2spu_sniffer): Update.
4348 * mi/mi-main.c (mi_cmd_data_list_changed_registers): Update.
4349 * frame.h (frame_save_as_regcache): Return std::unique_ptr.
4350 * frame.c (frame_save_as_regcache): Return std::unique_ptr.
4351 (frame_pop): Update.
4352
4353 2017-09-25 Tom Tromey <tom@tromey.com>
4354
4355 * spu-tdep.c (spu2ppu_dealloc_cache): Use delete.
4356 * regcache.h (regcache_xfree): Don't declare.
4357 * regcache.c (regcache_xfree): Remove.
4358 (do_regcache_xfree): Use delete.
4359 * ppc-linux-tdep.c (ppu2spu_dealloc_cache): Use delete.
4360 * linux-fork.c (free_fork): Use delete.
4361 (fork_save_infrun_state): Likewise.
4362 * jit.c (jit_dealloc_cache): Use delete.
4363 * infrun.c (discard_infcall_suspend_state): Use delete.
4364
4365 2017-09-25 Tom Tromey <tom@tromey.com>
4366
4367 * regcache.h (regcache_xmalloc): Don't declare.
4368 (regcache_raw_set_cached_value): Update comment.
4369 * regcache.c (regcache_xmalloc): Remove.
4370 * ppc-linux-tdep.c (ppu2spu_sniffer): Use new.
4371 * jit.c (jit_frame_sniffer): Use new.
4372 * frame.c (frame_save_as_regcache): Use new.
4373
4374 2017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
4375
4376 * NEWS: Advertise support for guarded-storage registers on IBM z.
4377
4378 2017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
4379
4380 * s390-linux-nat.c (have_regset_gs): New static variable.
4381 (s390_linux_fetch_inferior_registers): Handle guarded-storage
4382 control block and guarded-storage broadcast control regsets.
4383 (s390_read_description): Detect whether the target has
4384 guarded-storage support, return appropriate tdesc.
4385 * s390-linux-tdep.c (features/s390-gs-linux64.c): New include.
4386 (features/s390x-gs-linux64.c): Likewise.
4387 (struct gdbarch_tdep) <have_gs>: New field.
4388 (s390_regmap_gs, s390_regmap_gsbc, s390_gs_regset)
4389 (s390_gsbc_regset): New variables.
4390 (s390_iterate_over_regset_sections): Iterate over s390_gs_regset
4391 and s390_gsbc_regset, if applicable.
4392 (s390_core_read_description): Check whether core file was from a
4393 target with guarded-storage support; include appropriate regsets.
4394 (s390_gdbarch_init): Add registers for guarded-storage support.
4395 (_initialize_s390_tdep): Initialize new target descriptions that
4396 include registers for guarded-storage support.
4397 * s390-linux-tdep.h (HWCAP_S390_GS, S390_GSD_REGNUM)
4398 (S390_GSSM_REGNUM, S390_GSEPLA_REGNUM)
4399 (S390_BC_GSD_REGNUM, S390_BC_GSSM_REGNUM): New defines.
4400 (S390_NUM_REGS): Adjust macro definition.
4401 (s390_gs_regset, s390_gsbc_regset, tdesc_s390_gs_linux64)
4402 (tdesc_s390x_gs_linux64): New declarations.
4403
4404 2017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
4405
4406 * features/s390-gs-linux64.xml: New file.
4407 * features/s390-gs.xml: New file.
4408 * features/s390-gsbc.xml: New file.
4409 * features/s390x-gs-linux64.xml: New file.
4410 * features/Makefile (WHICH): Add s390-gs-linux64 and
4411 s390x-gs-linux64.
4412 (s390-gs-linux64-expedite, s390x-gs-linux64-expedite): New macros.
4413 (XMLTOC): Add s390-gs-linux64.xml and s390x-linux64.xml.
4414 * features/s390-gs-linux64.c: New generated file.
4415 * features/s390x-gs-linux64.c: New file.
4416 * regformats/s390-gs-linux64.dat: New file.
4417 * regformats/s390x-gs-linux64.dat: New file.
4418
4419 2017-09-23 Tom Tromey <tom@tromey.com>
4420
4421 * defs.h (make_cleanup_override_quit_handler): Don't declare.
4422
4423 2017-09-22 Tom Tromey <tom@tromey.com>
4424
4425 * utils.c (class scoped_input_handler) <m_quit_handler>: Change
4426 type to scoped_restore_tmpl.
4427 <scoped_input_handler>: Initialize m_quit_handler directly.
4428
4429 2017-09-22 Sergio Durigan Junior <sergiodj@redhat.com>
4430
4431 * cli/cli-cmds.c (pwd_command): Use "getcwd (NULL, 0)".
4432 (cd_command): Likewise. Free "current_directory" before
4433 assigning to it.
4434 * main.c (captured_main_1): Use "getcwd (NULL, 0)".
4435 * mi/mi-cmd-env.c (mi_cmd_env_pwd): Likewise.
4436 * top.c (gdb_dirbuf): Remove global declaration.
4437 * top.h (gdb_dirbuf): Likewise.
4438
4439 2017-09-22 Sergio Durigan Junior <sergiodj@redhat.com>
4440
4441 * gnulib/aclocal.m4: Regenerate.
4442 * gnulib/config.in: Regenerate.
4443 * gnulib/configure: Regenerate.
4444 * gnulib/import/Makefile.am: Regenerate.
4445 * gnulib/import/Makefile.in: Regenerate.
4446 * gnulib/import/assure.h: New file.
4447 * gnulib/import/at-func.c: Likewise
4448 * gnulib/import/chdir-long.c: New file.
4449 * gnulib/import/chdir-long.h: New file.
4450 * gnulib/import/cloexec.c: New file.
4451 * gnulib/import/cloexec.h: New file.
4452 * gnulib/import/close.c: New file.
4453 * gnulib/import/closedir.c: New file.
4454 * gnulib/import/dirent-private.h: New file.
4455 * gnulib/import/dup-safer.c: New file.
4456 * gnulib/import/dup.c: New file.
4457 * gnulib/import/dup2.c: New file.
4458 * gnulib/import/error.c: New file.
4459 * gnulib/import/error.h: New file.
4460 * gnulib/import/exitfail.c: New file.
4461 * gnulib/import/exitfail.h: New file.
4462 * gnulib/import/fchdir.c: New file.
4463 * gnulib/import/fcntl.c: New file.
4464 * gnulib/import/fcntl.in.h: New file.
4465 * gnulib/import/fd-hook.c: New file.
4466 * gnulib/import/fd-hook.h: New file.
4467 * gnulib/import/fd-safer.c: New file.
4468 * gnulib/import/fdopendir.c: New file.
4469 * gnulib/import/filename.h: New file.
4470 * gnulib/import/filenamecat-lgpl.c: New file.
4471 * gnulib/import/filenamecat.h: New file.
4472 * gnulib/import/fstat.c: New file.
4473 * gnulib/import/fstatat.c: New file.
4474 * gnulib/import/getcwd-lgpl.c: New file.
4475 * gnulib/import/getcwd.c: New file.
4476 * gnulib/import/getdtablesize.c: New file.
4477 * gnulib/import/getlogin_r.c: New file.
4478 * gnulib/import/getprogname.c: New file.
4479 * gnulib/import/getprogname.h: New file.
4480 * gnulib/import/gettext.h: New file.
4481 * gnulib/import/glob-libc.h: New file.
4482 * gnulib/import/glob.c: New file.
4483 * gnulib/import/glob.in.h: New file.
4484 * gnulib/import/intprops.h: New file.
4485 * gnulib/import/m4/chdir-long.m4: New file.
4486 * gnulib/import/m4/close.m4: New file.
4487 * gnulib/import/m4/closedir.m4: New file.
4488 * gnulib/import/m4/d-ino.m4: New file.
4489 * gnulib/import/m4/d-type.m4: New file.
4490 * gnulib/import/m4/dup.m4: New file.
4491 * gnulib/import/m4/dup2.m4: New file.
4492 * gnulib/import/m4/error.m4: New file.
4493 * gnulib/import/m4/fchdir.m4: New file.
4494 * gnulib/import/m4/fcntl.m4: New file.
4495 * gnulib/import/m4/fcntl_h.m4: New file.
4496 * gnulib/import/m4/fdopendir.m4: New file.
4497 * gnulib/import/m4/filenamecat.m4: New file.
4498 * gnulib/import/m4/fstat.m4: New file.
4499 * gnulib/import/m4/fstatat.m4: New file.
4500 * gnulib/import/m4/getcwd-abort-bug.m4: New file.
4501 * gnulib/import/m4/getcwd-path-max.m4: New file.
4502 * gnulib/import/m4/getcwd.m4: New file.
4503 * gnulib/import/m4/getdtablesize.m4: New file.
4504 * gnulib/import/m4/getlogin_r.m4: New file.
4505 * gnulib/import/m4/getprogname.m4: New file.
4506 * gnulib/import/m4/glob.m4: New file.
4507 * gnulib/import/m4/gnulib-cache.m4: Regenerate.
4508 * gnulib/import/m4/gnulib-comp.m4: Regenerate.
4509 * gnulib/import/m4/mempcpy.m4: New file.
4510 * gnulib/import/m4/memrchr.m4: New file.
4511 * gnulib/import/m4/mode_t.m4: New file.
4512 * gnulib/import/m4/msvc-inval.m4: New file.
4513 * gnulib/import/m4/msvc-nothrow.m4: New file.
4514 * gnulib/import/m4/open.m4: New file.
4515 * gnulib/import/m4/openat.m4: New file.
4516 * gnulib/import/m4/opendir.m4: New file.
4517 * gnulib/import/m4/readdir.m4: New file.
4518 * gnulib/import/m4/realloc.m4: New file.
4519 * gnulib/import/m4/rewinddir.m4: New file.
4520 * gnulib/import/m4/save-cwd.m4: New file.
4521 * gnulib/import/m4/strdup.m4: New file.
4522 * gnulib/import/m4/strerror.m4: New file.
4523 * gnulib/import/m4/unistd-safer.m4: New file.
4524 * gnulib/import/mempcpy.c: New file.
4525 * gnulib/import/memrchr.c: New file.
4526 * gnulib/import/msvc-inval.c: New file.
4527 * gnulib/import/msvc-inval.h: New file.
4528 * gnulib/import/msvc-nothrow.c: New file.
4529 * gnulib/import/msvc-nothrow.h: New file.
4530 * gnulib/import/open.c: New file.
4531 * gnulib/import/openat-die.c: New file.
4532 * gnulib/import/openat-priv.h: New file.
4533 * gnulib/import/openat-proc.c: New file.
4534 * gnulib/import/openat.c: New file.
4535 * gnulib/import/openat.h: New file.
4536 * gnulib/import/opendir.c: New file.
4537 * gnulib/import/pipe-safer.c: New file.
4538 * gnulib/import/readdir.c: New file.
4539 * gnulib/import/realloc.c: New file.
4540 * gnulib/import/rewinddir.c: New file.
4541 * gnulib/import/save-cwd.c: New file.
4542 * gnulib/import/save-cwd.h: New file.
4543 * gnulib/import/strdup.c: New file.
4544 * gnulib/import/strerror-override.c: New file.
4545 * gnulib/import/strerror-override.h: New file.
4546 * gnulib/import/strerror.c: New file.
4547 * gnulib/import/unistd--.h: New file.
4548 * gnulib/import/unistd-safer.h: New file.
4549 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add
4550 "getcwd" and "glob".
4551 * ser-tcp.c: Undefine "close" before redefining it.
4552
4553 2017-09-21 Simon Marchi <simon.marchi@ericsson.com>
4554
4555 * guile/scm-value.c (gdbscm_value_address): Initialize address,
4556 get rid of res_val.
4557
4558 2017-09-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
4559
4560 * configure.nat <i386sol2,i386>: Add fork-inferior.o to NATDEPFILES.
4561 <sol2,sparc>: Likewise.
4562 <sol2-64,i386>: Likewise.
4563
4564 * warning.m4 (AM_GDB_WARNINGS): Disable -Wunknown-pragmas,
4565 -Wdeprecated-declarations on *-*-solaris*.
4566 * configure: Regenerate.
4567
4568 * procfs.c: Include "nat/inferior.h".
4569 (procfs_info_proc): Fix typo.
4570
4571 2017-09-21 Kevin Buettner <kevinb@redhat.com>
4572
4573 * remote.c (vector): Include.
4574 (struct private_thread_info): Add field, thread_handle.
4575 (free_private_thread_info): Deallocate storage associated with
4576 thread handle.
4577 (get_private_info_thread): Initialize `thread_handle' field.
4578 (struct thread_item): Add field, thread_handle.
4579 (clear_threads_listing_context): Deallocate storage associated
4580 with thread handle.
4581 (start_thread): Add support for "handle" attribute.
4582 (thread_attributes): Add "handle".
4583 (remote_get_threads_with_qthreadinfo): Initialize thread_handle
4584 field.
4585 (remote_update_thread_list): Update thread_handle.
4586 (remote_thread_handle_to_thread_info): New function.
4587 (init_remote_ops): Initialize to_thread_handle_to_thread_info.
4588
4589 2017-09-21 Kevin Buettner <kevinb@redhat.com>
4590
4591 * python/py-inferior.c (gdbpy_thread_from_thread_handle): New
4592 function.
4593 (inferior_object_methods): Add gdbpy_thread_from_thread_handle.
4594 * python/python-internal.h (thread_object_type): Declare.
4595
4596 2017-09-21 Kevin Buettner <kevinb@redhat.com>
4597
4598 * target.h (struct target_ops): Add to_thread_handle_to_thread_info.
4599 (target_thread_handle_to_thread_info): Declare.
4600 * target.c (target_thread_handle_to_thread_info): New function.
4601 * target-delegates.c: Regenerate.
4602 * gdbthread.h (find_thread_by_handle): Declare.
4603 * thread.c (find_thread_by_handle): New function.
4604 * linux-thread-db.c (thread_db_thread_handle_to_thread_info): New
4605 function.
4606 (init_thread_db_ops): Register thread_db_thread_handle_to_thread_info.
4607
4608 2017-09-21 Simon Marchi <simon.marchi@ericsson.com>
4609
4610 * nat/linux-waitpid.c (linux_debug): Add ATTRIBUTE_PRINTF.
4611
4612 2017-09-21 Simon Marchi <simon.marchi@ericsson.com>
4613
4614 * microblaze-tdep.c (microblaze_debug): Add ATTRIBUTE_PRINTF.
4615
4616 2017-09-21 Yao Qi <yao.qi@linaro.org>
4617
4618 * configure.tgt (aarch64*-*-freebsd*): Add fbsd-tdep.o solib-svr4.o
4619 to gdb_target_obs.
4620
4621 2017-09-20 Tom Tromey <tom@tromey.com>
4622
4623 * breakpoint.c (struct counted_command_line): Remove.
4624 (breakpoint_commands): Update.
4625 (alloc_counted_command_line, incref_counted_command_line)
4626 (decref_counted_command_line, do_cleanup_counted_command_line)
4627 (make_cleanup_decref_counted_command_line): Remove.
4628 (breakpoint_set_commands, commands_command_1, ~bpstats, bpstats)
4629 (bpstat_clear_actions, bpstat_do_actions_1, watchpoint_check)
4630 (bpstat_stop_status, print_one_breakpoint_location, ~breakpoint)
4631 (save_breakpoints): Update.
4632 * breakpoint.h (counted_command_line): Now a typedef to
4633 shared_ptr.
4634 (struct breakpoint) <commands>: Now a counted_command_line.
4635 (struct bpstats) <command>: Likewise.
4636
4637 2017-09-20 Tom Tromey <tom@tromey.com>
4638
4639 * breakpoint.c (struct commands_info, do_map_commands_command):
4640 Remove.
4641 (commands_command_1): Update.
4642 (iterate_over_related_breakpoints): Take a function_view.
4643 (do_delete_breakpoint, do_map_delete_breakpoint): Remove.
4644 (delete_command): Update.
4645 (map_breakpoint_numbers): Take a function_view.
4646 (do_disable_breakpoint, do_map_delete_breakpoint): Remove.
4647 (disable_command): Update.
4648 (do_enable_breakpoint, do_map_enable_breakpoint): Remove.
4649 (enable_command): Update.
4650 (struct disp_data, do_enable_breakpoint_disp)
4651 (do_map_enable_once_breakpoint, do_map_enable_count_breakpoint)
4652 (do_map_enable_delete_breakpoint): Remove.
4653 (enable_once_command, enable_count_command, enable_delete_command)
4654 (delete_trace_variable_command): Update.
4655
4656 2017-09-20 Tom Tromey <tom@tromey.com>
4657
4658 * breakpoint.c (~bpstats): Rename from bpstat_free. Update.
4659 (bpstat_clear): Use delete.
4660 (bpstats): New constructors.
4661 (bpstat_copy, bpstat_stop_status): Use new.
4662 (dprintf_after_condition_true): Update.
4663 * breakpoint.h (bpstats::bpstats): Add constructors.
4664 (bpstats::~bpstats): Add destructor.
4665
4666 2017-09-20 Pedro Alves <palves@redhat.com>
4667
4668 * eval.c (make_params): Delete, refactored as ...
4669 (class fake_method): ... this new type's ctor.
4670 (fake_method::~fake_method): New.
4671 (evaluate_subexp_standard): Use 'fake_method'.
4672
4673 2017-09-20 Tom Tromey <tom@tromey.com>
4674
4675 * windows-nat.c (get_windows_debug_event, windows_wait)
4676 (do_initial_windows_stuff, windows_attach): Update.
4677 * utils.c (vwarning, internal_vproblem): Update.
4678 (ui_unregister_input_event_handler_cleanup)
4679 (prepare_to_handle_input): Remove.
4680 (class scoped_input_handler): New.
4681 (defaulted_query, prompt_for_continue): Update.
4682 * tui/tui-hooks.c (tui_refresh_frame_and_register_information):
4683 Update.
4684 * top.c (undo_terminal_modifications_before_exit): Update.
4685 * target/target.h (target_terminal_init, target_terminal_inferior)
4686 (target_terminal_ours): Don't declare.
4687 (class target_terminal): New.
4688 * target.h (target_terminal_is_inferior, target_terminal_is_ours)
4689 (target_terminal_ours_for_output)
4690 (make_cleanup_restore_target_terminal): Don't declare.
4691 (target_terminal_info): Remove.
4692 * target.c (enum terminal_state, terminal_state): Remove.
4693 (target_terminal::terminal_state): Define.
4694 (target_terminal::init): Rename from target_terminal_init.
4695 (target_terminal::inferior): Rename from
4696 target_terminal_inferior.
4697 (target_terminal::ours): Rename from target_terminal_ours.
4698 (target_terminal::ours_for_output): Rename from
4699 target_terminal_ours_for_output.
4700 (target_terminal::info): New method.
4701 (cleanup_restore_target_terminal)
4702 (make_cleanup_restore_target_terminal): Remove.
4703 * solib.c (handle_solib_event): Update.
4704 * remote.c (remote_serial_quit_handler): Update.
4705 (remote_terminal_inferior, remote_wait_as): Update.
4706 * record-full.c (record_full_wait_1): Update.
4707 * nto-procfs.c (procfs_create_inferior): Update.
4708 * nat/fork-inferior.c (startup_inferior): Update.
4709 * mi/mi-interp.c (mi_new_thread, mi_thread_exit)
4710 (mi_record_changed, mi_inferior_added, mi_inferior_appeared)
4711 (mi_inferior_exit, mi_inferior_removed, mi_traceframe_changed)
4712 (mi_tsv_created, mi_tsv_deleted, mi_tsv_modified)
4713 (mi_breakpoint_created, mi_breakpoint_deleted)
4714 (mi_breakpoint_modified, mi_on_resume, mi_solib_loaded)
4715 (mi_solib_unloaded, mi_command_param_changed, mi_memory_changed)
4716 (mi_user_selected_context_changed, report_initial_inferior):
4717 Update.
4718 * linux-nat.c (linux_nat_attach, linux_nat_terminal_ours)
4719 (linux_nat_terminal_inferior): Update.
4720 * infrun.c (follow_fork_inferior)
4721 (handle_vfork_child_exec_or_exit, do_target_resume)
4722 (check_curr_ui_sync_execution_done, handle_inferior_event_1)
4723 (handle_signal_stop, maybe_remove_breakpoints, normal_stop):
4724 Update.
4725 * inflow.c (child_terminal_init, info_terminal_command): Update.
4726 * infcmd.c (post_create_inferior, continue_1, prepare_one_step)
4727 (attach_command): Update.
4728 * infcall.c (call_thread_fsm_should_stop): Update.
4729 * gnu-nat.c (gnu_attach): Update.
4730 * extension.c (struct active_ext_lang_state)
4731 (restore_active_ext_lang): Update.
4732 * exceptions.c (print_flush): Update.
4733 * event-top.c (async_enable_stdin, default_quit_handler): Update.
4734 (struct quit_handler_cleanup_data, restore_quit_handler)
4735 (restore_quit_handler_dtor, make_cleanup_override_quit_handler):
4736 Remove.
4737 * cp-support.c (gdb_demangle): Update.
4738 * breakpoint.c (update_inserted_breakpoint_locations)
4739 (insert_breakpoint_locations, handle_jit_event)
4740 (disable_breakpoints_in_unloaded_shlib): Update.
4741 * annotate.c (annotate_breakpoints_invalid)
4742 (annotate_frames_invalid): Update.
4743
4744 2017-09-20 Tom Tromey <tom@tromey.com>
4745
4746 * main.c (catch_command_errors): Rename from
4747 catch_command_errors_const.
4748 (captured_main_1): Update.
4749
4750 2017-09-20 Pedro Alves <palves@redhat.com>
4751
4752 * cli/cli-cmds.c (list_command): Use print_sal_location.
4753 (print_sal_location): New function.
4754 (ambiguous_line_spec): Use print_sal_location.
4755 * linespec.c (symbol_to_sal): Record the symbol in the sal.
4756 * symtab.c (find_function_start_sal): Likewise.
4757 * symtab.h (symtab_and_line::symbol): New field.
4758
4759 2017-09-20 Pedro Alves <palves@redhat.com>
4760
4761 * linespec.c (minsym_found): Handle non-text minsyms.
4762 (symbol_to_sal): Record a sal.pc for non-block, non-label symbols.
4763
4764 2017-09-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
4765
4766 * features/Makefile (i386-avx-mpx-avx512-pku.dat): Add missing
4767 backslash.
4768
4769 2017-09-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
4770
4771 * gdb.arch/i386-avx512.c (move_zmm_data_to_reg): Use
4772 vmovups instead vmovaps.
4773 (move_zmm_data_to_memory): Use vmovups instead vmovaps.
4774
4775 2017-09-19 John Baldwin <jhb@FreeBSD.org>
4776
4777 * NEWS (Changes since GDB 8.0): Add starti.
4778 * infcmd.c (enum run_break): New.
4779 (run_command_1): Queue pending event for RUN_STOP_AT_FIRST_INSN
4780 case.
4781 (run_command): Use enum run_how.
4782 (start_command): Likewise.
4783 (starti_command): New function.
4784 (RUN_ARGS_HELP): New macro.
4785 (_initialize_infcmd): Use RUN_ARGS_HELP for run and start
4786 commands. Add starti command.
4787
4788 2017-09-19 Yao Qi <yao.qi@linaro.org>
4789
4790 * Makefile.in (monitor.o): Remove the rule.
4791
4792 2017-09-19 Yao Qi <yao.qi@linaro.org>
4793
4794 * annotate.h (struct annotate_arg_emitter): Use
4795 DISABLE_COPY_AND_ASSIGN.
4796 * common/refcounted-object.h (refcounted_object): Likewise.
4797 * completer.h (struct completion_result): Likewise.
4798 * dwarf2read.c (struct dwarf2_per_objfile): Likewise.
4799 * filename-seen-cache.h (filename_seen_cache): Likewise.
4800 * gdbcore.h (thread_section_name): Likewise.
4801 * gdb_regex.h (compiled_regex): Likewise.
4802 * gdbthread.h (scoped_restore_current_thread): Likewise.
4803 * inferior.h (scoped_restore_current_inferior): Likewise.
4804 * jit.c (jit_reader): Likewise.
4805 * linespec.h (struct linespec_result): Likewise.
4806 * mi/mi-parse.h (struct mi_parse): Likewise.
4807 * nat/fork-inferior.c (execv_argv): Likewise.
4808 * progspace.h (scoped_restore_current_program_space): Likewise.
4809 * python/python-internal.h (class gdbpy_enter): Likewise.
4810 * regcache.h (regcache): Likewise.
4811 * target-descriptions.c (struct tdesc_reg): Likewise.
4812 (struct tdesc_type): Likewise.
4813 (struct tdesc_feature): Likewise.
4814 * ui-out.h (ui_out_emit_type): Likewise.
4815
4816 2017-09-18 Simon Marchi <simon.marchi@ericsson.com>
4817
4818 * dwarf2expr.c (dwarf_expr_context::execute_stack_op): Remove
4819 label abort_expression.
4820
4821 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
4822
4823 * common/buffer.c (buffer_xml_printf): Adjust.
4824 * common/xml-utils.c (xml_escape_text): Change return type to
4825 std::string, update code accordingly.
4826 * common/xml-utils.h (xml_escape_text): Change return type to
4827 std::string.
4828 * rs6000-aix-tdep.c (rs6000_aix_shared_library_to_xml): Adjust.
4829 * windows-tdep.c (windows_xfer_shared_library): Adjust.
4830 * unittests/xml-utils-selftests.c (test_xml_escape_text):
4831 Adjust.
4832
4833 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
4834
4835 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add new source file.
4836 (SUBDIR_UNITTESTS_OBS): Add new object file.
4837 * unittests/xml-utils-selftests.c: New file.
4838
4839 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
4840
4841 * common/selftest.h (selftest): New struct/interface.
4842 (register_test): Add name parameter, add new overload.
4843 (run_tests): Add filter parameter.
4844 (for_each_selftest_ftype): New typedef.
4845 (for_each_selftest): New declaration.
4846 * common/selftest.c (tests): Change type to
4847 map<string, unique_ptr<selftest>>.
4848 (simple_selftest): New struct.
4849 (register_test): New function.
4850 (register_test): Add name parameter and use it.
4851 (run_tests): Add filter parameter and use it. Add prints.
4852 Adjust to vector -> map change.
4853 * aarch64-tdep.c (_initialize_aarch64_tdep): Add names when
4854 registering selftests.
4855 * arm-tdep.c (_initialize_arm_tdep): Likewise.
4856 * disasm-selftests.c (_initialize_disasm_selftests): Likewise.
4857 * dwarf2-frame.c (_initialize_dwarf2_frame): Likewise.
4858 * dwarf2loc.c (_initialize_dwarf2loc): Likewise.
4859 * findvar.c (_initialize_findvar): Likewise.
4860 * gdbarch-selftests.c (_initialize_gdbarch_selftests): Likewise.
4861 * maint.c (maintenance_selftest): Update call to run_tests.
4862 (maintenance_info_selftests): New function.
4863 (_initialize_maint_cmds): Register "maintenance info selftests"
4864 command. Update "maintenance selftest" doc.
4865 * regcache.c (_initialize_regcache): Add names when registering
4866 selftests.
4867 * rust-exp.y (_initialize_rust_exp): Likewise.
4868 * selftest-arch.c (gdbarch_selftest): New struct.
4869 (gdbarch_tests): Remove.
4870 (register_test_foreach_arch): Add name parameter. Call
4871 register_test.
4872 (tests_with_arch): Remove, move most content to
4873 gdbarch_selftest::operator().
4874 (_initialize_selftests_foreach_arch): Remove.
4875 * selftest-arch.h (register_test_foreach_arch): Add name
4876 parameter.
4877 (run_tests_with_arch): New declaration.
4878 * utils-selftests.c (_initialize_utils_selftests): Add names
4879 when registering selftests.
4880 * utils.c (_initialize_utils): Likewise.
4881 * unittests/array-view-selftests.c
4882 (_initialize_array_view_selftests): Likewise.
4883 * unittests/environ-selftests.c (_initialize_environ_selftests):
4884 Likewise.
4885 * unittests/function-view-selftests.c
4886 (_initialize_function_view_selftests): Likewise.
4887 * unittests/offset-type-selftests.c
4888 (_initialize_offset_type_selftests): Likewise.
4889 * unittests/optional-selftests.c
4890 (_initialize_optional_selftests): Likewise.
4891 * unittests/scoped_restore-selftests.c
4892 (_initialize_scoped_restore_selftests): Likewise.
4893 * NEWS: Document "maintenance selftest" and "maint info
4894 selftests".
4895
4896 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
4897
4898 * mi/mi-main.c (mi_load_progress): Restore current_uiout using a
4899 scoped_restore.
4900
4901 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
4902
4903 * mi/mi-main.c (mi_load_progress): Make uiout variable
4904 a unique_ptr.
4905
4906 2017-09-15 Pedro Alves <palves@redhat.com>
4907
4908 * compile/compile-c-types.c (convert_enum, convert_int)
4909 (convert_float): Adjust to refer to int_type_v0 and float_type_v0.
4910
4911 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
4912
4913 * dwarf2read.c (copy_string): Remove.
4914 (parse_macro_definition): Replace copy_string with savestring.
4915
4916 2017-09-15 Yao Qi <yao.qi@linaro.org>
4917
4918 * configure.tgt (i[34567]86-*-darwin*): Append amd64.o to
4919 gdb_target_obs.
4920 (i[34567]86-*-solaris2.1[0-9]* | x86_64-*-solaris2.1[0-9]*):
4921 Likewise.
4922 (i[34567]86-*-linux*): Likewise.
4923
4924 2017-09-14 Simon Marchi <simon.marchi@ericsson.com>
4925
4926 * dwarf2expr.h (dwarf_stack_value): Add constructor.
4927 (dwarf_expr_context) <~dwarf_expr_context>: Define as default.
4928 <stack>: Change type to std::vector.
4929 <stack_len, stack_allocated>: Remove.
4930 <grow_stack>: Remove.
4931 * dwarf2expr.c (dwarf_expr_context::dwarf_expr_context): Adjust.
4932 (dwarf_expr_context::~dwarf_expr_context): Remove.
4933 (dwarf_expr_context::grow_stack): Remove.
4934 (dwarf_expr_context::push): Adjust.
4935 (dwarf_expr_context::pop): Adjust.
4936 (dwarf_expr_context::fetch): Adjust.
4937 (dwarf_expr_context::fetch_in_stack_memory): Adjust.
4938 (dwarf_expr_context::stack_empty_p): Adjust.
4939 (dwarf_expr_context::execute_stack_op): Adjust.
4940
4941 2017-09-14 Simon Marchi <simon.marchi@ericsson.com>
4942
4943 * dwarf2expr.h (dwarf_expr_context) <stack_empty_p>: Change
4944 return type to bool.
4945 * dwarf2expr.c (dwarf_expr_context::stack_empty_p): Likewise.
4946
4947 2017-09-14 Simon Marchi <simon.marchi@ericsson.com>
4948
4949 * dwarf2expr.h (dwarf_expr_piece) <v.mem.in_stack_memory>:
4950 Change type to bool.
4951 (dwarf_stack_value) <in_stack_memory>: Likewise.
4952 (dwarf_expr_context) <push_address>: Change parameter type to
4953 bool.
4954 <fetch_in_stack_memory>: Change return type to bool.
4955 <push>: Change parameter type to bool.
4956 * dwarf2expr.c (dwarf_expr_context::push): Change parameter type
4957 to bool.
4958 (dwarf_expr_context::push_address): Likewise.
4959 (dwarf_expr_context::fetch_in_stack_memory): Change return type
4960 to bool.
4961 (dwarf_expr_context::execute_stack_op): Adjust.
4962 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Adjust.
4963
4964 2017-09-14 Simon Marchi <simon.marchi@ericsson.com>
4965
4966 * dwarf2expr.h (struct dwarf_expr_piece): Move up.
4967 (struct dwarf_expr_context) <n_pieces>: Remove.
4968 <pieces>: Change type to std::vector.
4969 * dwarf2expr.c (dwarf_expr_context::dwarf_expr_context): Adjust.
4970 (dwarf_expr_context::~dwarf_expr_context): Don't manually free
4971 pieces.
4972 (dwarf_expr_context::add_piece): Adjust.
4973 * dwarf2loc.c (struct piece_closure): Initialize fields.
4974 <n_pieces>: Remove.
4975 <pieces>: Change type to std::vector.
4976 (allocate_piece_closure): Adjust, change parameter to
4977 std::vector rvalue and std::move it to piece_closure.
4978 (rw_pieced_value): Adjust.
4979 (check_pieced_synthetic_pointer): Adjust.
4980 (indirect_synthetic_pointer): Adjust.
4981 (coerce_pieced_ref): Adjust.
4982 (free_pieced_value_closure): Adjust. Use delete to free
4983 piece_closure.
4984 (dwarf2_evaluate_loc_desc_full): Adjust. std::move ctx.pieces
4985 to allocate_piece_closure.
4986 (dwarf2_loc_desc_get_symbol_read_needs): Adjust.
4987
4988 2017-09-12 Simon Marchi <simon.marchi@ericsson.com>
4989
4990 * probe.h (probe_ops_cp): Remove typedef.
4991 (DEF_VEC_P (probe_ops_cp)): Remove.
4992 (all_probe_ops): Change type to std::vector.
4993 * probe.c (info_probes_for_ops): Adjust to vector change.
4994 (probe_linespec_to_ops): Likewise.
4995 (all_probe_ops): Change type to std::vector.
4996 (_initialize_probe): Adjust to vector change.
4997 * dtrace-probe.c (_initialize_dtrace_probe): Likewise.
4998 * elfread.c (elf_get_probes): Likewise.
4999 * stap-probe.c (_initialize_stap_probe): Likewise.
5000
5001 2017-09-12 Simon Marchi <simon.marchi@ericsson.com>
5002
5003 * probe.h (struct bound_probe): Define constructors.
5004 * probe.c (bound_probe_s): Remove typedef.
5005 (DEF_VEC_O (bound_probe_s)): Remove VEC.
5006 (collect_probes): Change return type to std::vector, remove
5007 cleanup.
5008 (compare_probes): Return bool, change parameter type. Change
5009 semantic to "less than".
5010 (gen_ui_out_table_header_info): Change parameter to std::vector
5011 and update.
5012 (exists_probe_with_pops): Likewise.
5013 (info_probes_for_ops): Update to std::vector change.
5014 (enable_probes_command): Likewise.
5015 (disable_probes_command): Likewise.
5016
5017 2017-09-12 Simon Marchi <simon.marchi@ericsson.com>
5018
5019 * probe.h (struct probe_ops) <get_probes>: Change parameter from
5020 vec to std::vector.
5021 * probe.c (parse_probes_in_pspace): Update.
5022 (find_probes_in_objfile): Update.
5023 (find_probe_by_pc): Update.
5024 (collect_probes): Update.
5025 (probe_any_get_probes): Update.
5026 * symfile.h (struct sym_probe_fns) <sym_get_probes> Change
5027 return type to reference to std::vector.
5028 * dtrace-probe.c (dtrace_process_dof_probe): Change parameter to
5029 std::vector and update.
5030 (dtrace_process_dof): Likewise.
5031 (dtrace_get_probes): Likewise.
5032 * elfread.c (elf_get_probes): Change return type to std::vector,
5033 store an std::vector in bfd_data.
5034 (probe_key_free): Update to std::vector.
5035 * stap-probe.c (handle_stap_probe): Change parameter to
5036 std::vector and update.
5037 (stap_get_probes): Likewise.
5038 * symfile-debug.c (debug_sym_get_probes): Change return type to
5039 std::vector and update.
5040
5041 2017-09-11 Tom Tromey <tom@tromey.com>
5042
5043 * breakpoint.c (program_breakpoint_here_p): Update.
5044 * target.c (make_scoped_restore_show_memory_breakpoints): Rename
5045 from make_show_memory_breakpoints_cleanup. Return a
5046 scoped_restore_tmpl<int>.
5047 (restore_show_memory_breakpoints): Remove.
5048 * ppc-linux-tdep.c (ppc_linux_memory_remove_breakpoint): Update.
5049 * mem-break.c (memory_validate_breakpoint): Update.
5050 * ia64-tdep.c (ia64_memory_insert_breakpoint): Update.
5051 (ia64_memory_remove_breakpoint): Update.
5052 (ia64_breakpoint_from_pc): Update.
5053 * target.h (make_scoped_restore_show_memory_breakpoints): Rename
5054 from make_show_memory_breakpoints_cleanup.
5055
5056 2017-09-11 Tom Tromey <tom@tromey.com>
5057
5058 * d-namespace.c (d_lookup_symbol): Use std::string.
5059 (find_symbol_in_baseclass): Likewise.
5060
5061 2017-09-11 Tom Tromey <tom@tromey.com>
5062
5063 * ctf.c (ctf_start): Use std::string.
5064
5065 2017-09-11 Tom Tromey <tom@tromey.com>
5066
5067 * ada-lang.c (is_known_support_routine): Update.
5068 (ada_unhandled_exception_name_addr_from_raise): Update.
5069 * guile/scm-frame.c (gdbscm_frame_name): Update.
5070 * python/py-frame.c (frapy_name): Update.
5071 (frapy_function): Update.
5072 * stack.h (find_frame_funname): Update.
5073 * stack.c (find_frame_funname): Return unique_xmalloc_ptr.
5074 (print_frame): Update.
5075
5076 2017-09-11 Tom Tromey <tom@tromey.com>
5077
5078 * findcmd.c (put_bits): Take a gdb::byte_vector.
5079 (parse_find_args): Return gdb::byte_vector. "args" now const.
5080 Remove "pattern_bufp" and "pattern_lenp" parameters. Remove
5081 cleanups.
5082 (find_command): Update.
5083
5084 2017-09-11 Tom Tromey <tom@tromey.com>
5085
5086 * cli/cli-script.c (class scoped_restore_hook_in): New.
5087 (clear_hook_in_cleanup): Remove.
5088 (execute_cmd_pre_hook, execute_cmd_post_hook): Use
5089 scoped_restore_hook_in.
5090
5091 2017-09-11 Tom Tromey <tom@tromey.com>
5092
5093 * cli/cli-script.c (restore_interp): Remove.
5094 (read_command_lines): Use scoped_restore_interp.
5095 * interps.c (scoped_restore_interp::set_temp): Rename from
5096 interp_set_temp.
5097 * interps.h (class scoped_restore_interp): New.
5098 (interp_set_temp): Remove.
5099
5100 2017-09-11 Tom Tromey <tom@tromey.com>
5101
5102 * mi/mi-cmd-catch.c (mi_cmd_catch_assert)
5103 (mi_cmd_catch_exception, mi_catch_load_unload): Update.
5104 * mi/mi-cmd-break.c (setup_breakpoint_reporting): Return a
5105 scoped_restore.
5106 (mi_cmd_break_insert_1): Update.
5107 * mi/mi-cmd-break.h (setup_breakpoint_reporting): Return a
5108 scoped_restore.
5109
5110 2017-09-11 Tom Tromey <tom@tromey.com>
5111
5112 * demangle.c (demangle_command): Update.
5113 * breakpoint.c (disable_command): Update.
5114 (enable_command): Update.
5115 (find_location_by_number): Make "number" const. Use
5116 get_number_trailer.
5117 * cli/cli-utils.c (extract_arg): Return std::string.
5118 * probe.c (parse_probe_linespec): Update. Change types.
5119 (collect_probes): Take string arguments.
5120 (parse_probe_linespec): Likewise.
5121 (info_probes_for_ops): Update.
5122 (enable_probes_command): Update.
5123 (disable_probes_command): Update.
5124 * break-catch-sig.c (catch_signal_split_args): Update.
5125 * mi/mi-parse.c (mi_parse): Update.
5126
5127 2017-09-11 Tom Tromey <tom@tromey.com>
5128
5129 * language.h (language_enum): Make argument const.
5130 * language.c (language_enum): Make argument const.
5131
5132 2017-09-11 Tom Tromey <tom@tromey.com>
5133
5134 * common/common-utils.h (skip_to_space): Remove macro, redeclare
5135 as function.
5136 (skip_to_space): Rename from skip_to_space_const.
5137 * common/common-utils.c (skip_to_space): New function.
5138 (skip_to_space): Rename from skip_to_space_const.
5139 * cli/cli-utils.h (get_number): Rename from get_number_const.
5140 (extract_arg): Rename from extract_arg_const.
5141 * cli/cli-utils.c (get_number): Rename from get_number_const.
5142 (extract_arg): Rename from extract_arg_const.
5143 (number_or_range_parser::get_number): Use ::get_number.
5144 * aarch64-linux-tdep.c, ada-lang.c, arm-linux-tdep.c, ax-gdb.c,
5145 break-catch-throw.c, breakpoint.c, cli/cli-cmds.c, cli/cli-dump.c,
5146 cli/cli-script.c, cli/cli-setshow.c, compile/compile.c,
5147 completer.c, demangle.c, disasm.c, findcmd.c, linespec.c,
5148 linux-tdep.c, linux-thread-db.c, location.c, mi/mi-parse.c,
5149 minsyms.c, nat/linux-procfs.c, printcmd.c, probe.c,
5150 python/py-breakpoint.c, record.c, rust-exp.y, serial.c, stack.c,
5151 stap-probe.c, tid-parse.c, tracepoint.c: Update all callers.
5152
5153 2017-09-11 Tom Tromey <tom@tromey.com>
5154
5155 * python/python.c (do_start_initialization): Use
5156 py-event-types.def to initialize types.
5157 Define all object type structures.
5158 * python/python-internal.h: Don't declare event initialization
5159 functions.
5160 * python/py-threadevent.c (thread_event_object_type): Don't
5161 define.
5162 * python/py-stopevent.c (stop_event_object_type): Don't define.
5163 * python/py-signalevent.c (signal_event_object_type): Don't
5164 declare or define.
5165 * python/py-newobjfileevent.c (new_objfile_event_object_type)
5166 (clear_objfiles_event_object_type): Don't declare or define.
5167 * python/py-infevents.c (inferior_call_pre_event_object_type)
5168 (inferior_call_post_event_object_type)
5169 (register_changed_event_object_type)
5170 (memory_changed_event_object_type): Don't declare or define.
5171 * python/py-inferior.c (new_thread_event_object_type)
5172 (new_inferior_event_object_type)
5173 (inferior_deleted_event_object_type): Don't declare or define.
5174 * python/py-exitedevent.c (exited_event_object_type): Don't
5175 declare or define.
5176 * python/py-evts.c (gdbpy_initialize_py_events): Use
5177 py-all-events.def.
5178 * python/py-events.h (thread_event_object_type): Don't declare.
5179 (events_object): Use py-all-events.def.
5180 * python/py-event.h (GDBPY_NEW_EVENT_TYPE): Remove. Use
5181 py-event-types.def.
5182 * python/py-event-types.def: New file.
5183 * python/py-continueevent.c (create_continue_event_object): Don't
5184 declare or define.
5185 * python/py-bpevent.c (breakpoint_event_object_type): Don't
5186 declare or define.
5187 * python/py-all-events.def: New file.
5188
5189 2017-09-11 Tom Tromey <tom@tromey.com>
5190
5191 * python/py-threadevent.c (create_thread_event_object): Return
5192 gdbpy_ref.
5193 * python/py-stopevent.h (create_stop_event_object)
5194 (create_breakpoint_event_object, create_signal_event_object):
5195 Update.
5196 * python/py-stopevent.c (create_stop_event_object): Return
5197 gdbpy_ref.
5198 (emit_stop_event): Update.
5199 * python/py-signalevent.c (create_signal_event_object): Return
5200 gdbpy_ref.
5201 * python/py-infevents.c (create_inferior_call_event_object):
5202 Update.
5203 * python/py-event.h (create_event_object)
5204 (create_thread_event_object): Update.
5205 * python/py-event.c (create_event_object): Return gdbpy_ref.
5206 * python/py-continueevent.c: Return gdbpy_ref.
5207 * python/py-bpevent.c (create_breakpoint_event_object): Return
5208 gdbpy_ref.
5209
5210 2017-09-11 Tom Tromey <tom@tromey.com>
5211
5212 PR python/15622:
5213 * NEWS: Add entry.
5214 * python/python.c (do_start_initialization): Initialize new event
5215 types.
5216 * python/python-internal.h (gdbpy_initialize_new_inferior_event)
5217 (gdbpy_initialize_inferior_deleted_event)
5218 (gdbpy_initialize_new_thread_event): Declare.
5219 * python/py-threadevent.c (create_thread_event_object): Add option
5220 "thread" parameter.
5221 * python/py-inferior.c (new_thread_event_object_type)
5222 (new_inferior_event_object_type)
5223 (inferior_deleted_event_object_type): Declare.
5224 (python_new_inferior, python_inferior_deleted): New functions.
5225 (add_thread_object): Emit new_thread event.
5226 (gdbpy_initialize_inferior): Attach new functions to corresponding
5227 observers.
5228 (new_thread, new_inferior, inferior_deleted): Define new event
5229 types.
5230 * python/py-evts.c (gdbpy_initialize_py_events): Add new
5231 registries.
5232 * python/py-events.h (events_object) <new_inferior,
5233 inferior_deleted, new_thread>: New fields.
5234 * python/py-event.h (create_thread_event_breakpoint): Add optional
5235 "thread" parameter.
5236
5237 2017-09-10 Andrew Burgess <andrew.burgess@embecosm.com>
5238
5239 * utils.c (abort_with_message): Don't compare gdb_stderr to NULL,
5240 check current_ui instead.
5241 (internal_vproblem): Likewise.
5242
5243 2017-09-09 Simon Marchi <simon.marchi@ericsson.com>
5244
5245 * thread.c (print_thread_info_1): Remove unnecessary calls to
5246 uiout->is_mi_like_p.
5247
5248 2017-09-09 Tom Tromey <tom@tromey.com>
5249
5250 * namespace.h (add_using_directive): Update.
5251 * namespace.c (add_using_directive): Change type of excludes to
5252 std::vector.
5253 * dwarf2read.c (read_import_statement): Use std::vector.
5254 (read_namespace): Update.
5255 * cp-namespace.c (cp_scan_for_anonymous_namespaces): Update.
5256
5257 2017-09-09 Tom Tromey <tom@tromey.com>
5258
5259 * linespec.c (create_sals_line_offset): Use gdb::def_vector.
5260
5261 2017-09-09 Tom Tromey <tom@tromey.com>
5262
5263 * p-valprint.c (pascal_object_print_value): Use gdb::byte_vector.
5264
5265 2017-09-09 Tom Tromey <tom@tromey.com>
5266
5267 * stack.c (func_command): Use gdb::def_vector.
5268
5269 2017-09-09 Tom Tromey <tom@tromey.com>
5270
5271 * mi/mi-cmd-var.c (mi_cmd_var_list_children): Use gdb::optional,
5272 ui_out_emit_list, ui_out_emit_tuple.
5273 (mi_cmd_var_update): Likewise.
5274
5275 2017-09-09 Tom Tromey <tom@tromey.com>
5276
5277 * mi/mi-interp.c (mi_user_selected_context_changed): Use
5278 ui_out_redirect_pop.
5279 * guile/scm-ports.c (ioscm_with_output_to_port_worker): Use
5280 ui_out_redirect_pop.
5281 * utils.c (do_ui_out_redirect_pop)
5282 (make_cleanup_ui_out_redirect_pop): Remove.
5283 * top.c (execute_command_to_string): Use ui_out_redirect_pop.
5284 * utils.h (make_cleanup_ui_out_redirect_pop): Remove.
5285 * ui-out.h (ui_out_redirect_pop): New class.
5286
5287 2017-09-09 Tom Tromey <tom@tromey.com>
5288
5289 * mi/mi-main.c (output_cores): Use ui_out_emit_list.
5290 (list_available_thread_groups, mi_cmd_list_thread_groups)
5291 (mi_cmd_data_list_changed_registers, mi_cmd_data_read_memory)
5292 (mi_cmd_data_read_memory_bytes, mi_cmd_trace_frame_collected):
5293 Likewise.
5294
5295 2017-09-09 Tom Tromey <tom@tromey.com>
5296
5297 * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn): Use
5298 ui_out_emit_tuple.
5299
5300 2017-09-09 Tom Tromey <tom@tromey.com>
5301
5302 * target.c (flash_erase_command): Use ui_out_emit_tuple.
5303 * stack.c (print_frame): Use ui_out_emit_tuple.
5304 * spu-tdep.c (info_spu_event_command): Use ui_out_emit_tuple.
5305 (info_spu_mailbox_command, info_spu_dma_command)
5306 (info_spu_proxydma_command): Likewise.
5307 * mi/mi-main.c (mi_cmd_trace_frame_collected): Use
5308 ui_out_emit_tuple, gdb::byte_vector, bin2hex.
5309 * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries): Use
5310 ui_out_emit_tuple.
5311 * breakpoint.c (print_it_watchpoint): Use ui_out_emit_tuple.
5312
5313 2017-09-09 Tom Tromey <tom@tromey.com>
5314
5315 * ui-out.h (make_cleanup_ui_out_table_begin_end): Remove.
5316 (class ui_out_emit_table): Update comment.
5317 * ui-out.c (do_cleanup_table_end)
5318 (make_cleanup_ui_out_table_begin_end): Remove.
5319 * spu-tdep.c (info_spu_mailbox_list): Use ui_out_emit_table.
5320 (info_spu_dma_cmdlist): Likewise.
5321 * probe.c (info_probes_for_ops): Use ui_out_emit_table.
5322 * darwin-nat-info.c (darwin_debug_regions_recurse): Use
5323 ui_out_emit_table.
5324
5325 2017-09-09 Tom Tromey <tom@tromey.com>
5326
5327 * thread.c (print_thread_info_1): Use ui_out_emit_table,
5328 ui_out_emit_list, gdb::optional.
5329
5330 2017-09-09 John Baldwin <jhb@FreeBSD.org>
5331
5332 * aarch64-linux-nat.c: Remove _initialize_aarch64_linux_nat
5333 prototype.
5334 * aarch64-linux-tdep.c: Remove _initialize_aarch64_linux_tdep
5335 prototype.
5336 * aarch64-newlib-tdep.c: Remove _initialize_aarch64_newlib_tdep
5337 prototype.
5338 * aarch64-tdep.c: Remove _initialize_aarch64_tdep prototype.
5339 * ada-exp.y: Remove _initialize_ada_exp prototype.
5340 * ada-lang.c: Remove _initialize_ada_language prototype.
5341 * ada-tasks.c: Remove _initialize_tasks prototype.
5342 * addrmap.c: Remove _initialize_addrmap prototype.
5343 * agent.c: Remove _initialize_agent prototype.
5344 * aix-thread.c: Remove _initialize_aix_thread prototype.
5345 * alpha-bsd-nat.c: Remove _initialize_alphabsd_nat prototype.
5346 * alpha-linux-nat.c: Remove _initialize_alpha_linux_nat prototype.
5347 * alpha-linux-tdep.c: Remove _initialize_alpha_linux_tdep
5348 prototype.
5349 * alpha-nbsd-tdep.c: Remove _initialize_alphanbsd_tdep prototype.
5350 * alpha-obsd-tdep.c: Remove _initialize_alphaobsd_tdep prototype.
5351 * alpha-tdep.c: Remove _initialize_alpha_tdep prototype.
5352 * amd64-darwin-tdep.c: Remove _initialize_amd64_darwin_tdep
5353 prototype.
5354 * amd64-dicos-tdep.c: Remove _initialize_amd64_dicos_tdep
5355 prototype.
5356 * amd64-fbsd-nat.c: Remove _initialize_amd64fbsd_nat prototype.
5357 * amd64-fbsd-tdep.c: Remove _initialize_amd64fbsd_tdep prototype.
5358 * amd64-linux-nat.c: Remove _initialize_amd64_linux_nat prototype.
5359 * amd64-linux-tdep.c: Remove _initialize_amd64_linux_tdep
5360 prototype.
5361 * amd64-nbsd-nat.c: Remove _initialize_amd64nbsd_nat prototype.
5362 * amd64-nbsd-tdep.c: Remove _initialize_amd64nbsd_tdep prototype.
5363 * amd64-obsd-nat.c: Remove _initialize_amd64obsd_nat prototype.
5364 * amd64-obsd-tdep.c: Remove _initialize_amd64obsd_tdep prototype.
5365 * amd64-sol2-tdep.c: Remove _initialize_amd64_sol2_tdep prototype.
5366 * amd64-tdep.c: Remove _initialize_amd64_tdep prototype.
5367 * amd64-windows-nat.c: Remove _initialize_amd64_windows_nat
5368 prototype.
5369 * amd64-windows-tdep.c: Remove _initialize_amd64_windows_tdep
5370 prototype.
5371 * annotate.c: Remove _initialize_annotate prototype.
5372 * arc-newlib-tdep.c: Remove _initialize_arc_newlib_tdep prototype.
5373 * arc-tdep.c: Remove _initialize_arc_tdep prototype.
5374 * arch-utils.c: Remove _initialize_gdbarch_utils prototype.
5375 * arm-linux-nat.c: Remove _initialize_arm_linux_nat prototype.
5376 * arm-linux-tdep.c: Remove _initialize_arm_linux_tdep prototype.
5377 * arm-nbsd-tdep.c: Remove _initialize_arm_netbsd_tdep prototype.
5378 * arm-obsd-tdep.c: Remove _initialize_armobsd_tdep prototype.
5379 * arm-symbian-tdep.c: Remove _initialize_arm_symbian_tdep
5380 prototype.
5381 * arm-tdep.c: Remove _initialize_arm_tdep prototype.
5382 * arm-wince-tdep.c: Remove _initialize_arm_wince_tdep prototype.
5383 * auto-load.c: Remove _initialize_auto_load prototype.
5384 * auxv.c: Remove _initialize_auxv prototype.
5385 * avr-tdep.c: Remove _initialize_avr_tdep prototype.
5386 * ax-gdb.c: Remove _initialize_ax_gdb prototype.
5387 * bfin-linux-tdep.c: Remove _initialize_bfin_linux_tdep prototype.
5388 * bfin-tdep.c: Remove _initialize_bfin_tdep prototype.
5389 * break-catch-sig.c: Remove _initialize_break_catch_sig prototype.
5390 * break-catch-syscall.c: Remove _initialize_break_catch_syscall
5391 prototype.
5392 * break-catch-throw.c: Remove _initialize_break_catch_throw
5393 prototype.
5394 * breakpoint.c: Remove _initialize_breakpoint prototype.
5395 * bsd-uthread.c: Remove _initialize_bsd_uthread prototype.
5396 * btrace.c: Remove _initialize_btrace prototype.
5397 * charset.c: Remove _initialize_charset prototype.
5398 * cli/cli-cmds.c: Remove _initialize_cli_cmds prototype.
5399 * cli/cli-dump.c: Remove _initialize_cli_dump prototype.
5400 * cli/cli-interp.c: Remove _initialize_cli_interp prototype.
5401 * cli/cli-logging.c: Remove _initialize_cli_logging prototype.
5402 * cli/cli-script.c: Remove _initialize_cli_script prototype.
5403 * coff-pe-read.c: Remove _initialize_coff_pe_read prototype.
5404 * coffread.c: Remove _initialize_coffread prototype.
5405 * compile/compile.c: Remove _initialize_compile prototype.
5406 * complaints.c: Remove _initialize_complaints prototype.
5407 * completer.c: Remove _initialize_completer prototype.
5408 * copying.awk: Remove _initialize_copying prototype.
5409 * copying.c: Regenerate.
5410 * core-regset.c: Remove _initialize_core_regset prototype.
5411 * corefile.c: Remove _initialize_core prototype.
5412 * corelow.c: Remove _initialize_corelow prototype.
5413 * cp-abi.c: Remove _initialize_cp_abi prototype.
5414 * cp-namespace.c: Remove _initialize_cp_namespace prototype.
5415 * cp-support.c: Remove _initialize_cp_support prototype.
5416 * cp-valprint.c: Remove _initialize_cp_valprint prototype.
5417 * cris-linux-tdep.c: Remove _initialize_cris_linux_tdep prototype.
5418 * cris-tdep.c: Remove _initialize_cris_tdep prototype.
5419 * ctf.c: Remove _initialize_ctf prototype.
5420 * d-lang.c: Remove _initialize_d_language prototype.
5421 * darwin-nat-info.c: Remove _initialize_darwin_info_commands
5422 prototype.
5423 * darwin-nat.c: Remove _initialize_darwin_inferior prototype.
5424 * dbxread.c: Remove _initialize_dbxread prototype.
5425 * dcache.c: Remove _initialize_dcache prototype.
5426 * demangle.c: Remove _initialize_demangler prototype.
5427 * disasm-selftests.c: Remove _initialize_disasm_selftests
5428 prototype.
5429 * disasm.c: Remove _initialize_disasm prototype.
5430 * dtrace-probe.c: Remove _initialize_dtrace_probe prototype.
5431 * dummy-frame.c: Remove _initialize_dummy_frame prototype.
5432 * dwarf2-frame-tailcall.c: Remove _initialize_tailcall_frame
5433 prototype.
5434 * dwarf2-frame.c: Remove _initialize_dwarf2_frame prototype.
5435 * dwarf2expr.c: Remove _initialize_dwarf2expr prototype.
5436 * dwarf2loc.c: Remove _initialize_dwarf2loc prototype.
5437 * dwarf2read.c: Remove _initialize_dwarf2_read prototype.
5438 * elfread.c: Remove _initialize_elfread prototype.
5439 * exec.c: Remove _initialize_exec prototype.
5440 * extension.c: Remove _initialize_extension prototype.
5441 * f-lang.c: Remove _initialize_f_language prototype.
5442 * f-valprint.c: Remove _initialize_f_valprint prototype.
5443 * fbsd-nat.c: Remove _initialize_fbsd_nat prototype.
5444 * fbsd-tdep.c: Remove _initialize_fbsd_tdep prototype.
5445 * filesystem.c: Remove _initialize_filesystem prototype.
5446 * findcmd.c: Remove _initialize_mem_search prototype.
5447 * fork-child.c: Remove _initialize_fork_child prototype.
5448 * frame-base.c: Remove _initialize_frame_base prototype.
5449 * frame-unwind.c: Remove _initialize_frame_unwind prototype.
5450 * frame.c: Remove _initialize_frame prototype.
5451 * frv-linux-tdep.c: Remove _initialize_frv_linux_tdep prototype.
5452 * frv-tdep.c: Remove _initialize_frv_tdep prototype.
5453 * ft32-tdep.c: Remove _initialize_ft32_tdep prototype.
5454 * gcore.c: Remove _initialize_gcore prototype.
5455 * gdb_bfd.c: Remove _initialize_gdb_bfd prototype.
5456 * gdbarch.c: Regenerate.
5457 * gdbarch.sh: Remove _initialize_gdbarch prototype.
5458 * gdbtypes.c: Remove _initialize_gdbtypes prototype.
5459 * gnu-nat.c: Remove _initialize_gnu_nat prototype.
5460 * gnu-v2-abi.c: Remove _initialize_gnu_v2_abi prototype.
5461 * gnu-v3-abi.c: Remove _initialize_gnu_v3_abi prototype.
5462 * go-lang.c: Remove _initialize_go_language prototype.
5463 * go32-nat.c: Remove _initialize_go32_nat prototype.
5464 * guile/guile.c: Remove _initialize_guile prototype.
5465 * h8300-tdep.c: Remove _initialize_h8300_tdep prototype.
5466 * hppa-linux-nat.c: Remove _initialize_hppa_linux_nat prototype.
5467 * hppa-linux-tdep.c: Remove _initialize_hppa_linux_tdep prototype.
5468 * hppa-nbsd-nat.c: Remove _initialize_hppanbsd_nat prototype.
5469 * hppa-nbsd-tdep.c: Remove _initialize_hppanbsd_tdep prototype.
5470 * hppa-obsd-nat.c: Remove _initialize_hppaobsd_nat prototype.
5471 * hppa-obsd-tdep.c: Remove _initialize_hppaobsd_tdep prototype.
5472 * hppa-tdep.c: Remove _initialize_hppa_tdep prototype.
5473 * i386-bsd-nat.c: Remove _initialize_i386bsd_nat prototype.
5474 * i386-cygwin-tdep.c: Remove _initialize_i386_cygwin_tdep
5475 prototype.
5476 * i386-darwin-tdep.c: Remove _initialize_i386_darwin_tdep
5477 prototype.
5478 * i386-dicos-tdep.c: Remove _initialize_i386_dicos_tdep prototype.
5479 * i386-fbsd-nat.c: Remove _initialize_i386fbsd_nat prototype.
5480 * i386-fbsd-tdep.c: Remove _initialize_i386fbsd_tdep prototype.
5481 * i386-gnu-nat.c: Remove _initialize_i386gnu_nat prototype.
5482 * i386-gnu-tdep.c: Remove _initialize_i386gnu_tdep prototype.
5483 * i386-linux-nat.c: Remove _initialize_i386_linux_nat prototype.
5484 * i386-linux-tdep.c: Remove _initialize_i386_linux_tdep prototype.
5485 * i386-nbsd-nat.c: Remove _initialize_i386nbsd_nat prototype.
5486 * i386-nbsd-tdep.c: Remove _initialize_i386nbsd_tdep prototype.
5487 * i386-nto-tdep.c: Remove _initialize_i386nto_tdep prototype.
5488 * i386-obsd-nat.c: Remove _initialize_i386obsd_nat prototype.
5489 * i386-obsd-tdep.c: Remove _initialize_i386obsd_tdep prototype.
5490 * i386-sol2-nat.c: Remove _initialize_amd64_sol2_nat prototype.
5491 * i386-sol2-tdep.c: Remove _initialize_amd64_sol2_tdep prototype.
5492 * i386-tdep.c: Remove _initialize_i386_tdep prototype.
5493 * i386-windows-nat.c: Remove _initialize_i386_windows_nat
5494 prototype.
5495 * ia64-libunwind-tdep.c: Remove _initialize_libunwind_frame
5496 prototype.
5497 * ia64-linux-nat.c: Remove _initialize_ia64_linux_nat prototype.
5498 * ia64-linux-tdep.c: Remove _initialize_ia64_linux_tdep prototype.
5499 * ia64-tdep.c: Remove _initialize_ia64_tdep prototype.
5500 * ia64-vms-tdep.c: Remove _initialize_ia64_vms_tdep prototype.
5501 * infcall.c: Remove _initialize_infcall prototype.
5502 * infcmd.c: Remove _initialize_infcmd prototype.
5503 * inferior.c: Remove _initialize_inferiors prototype.
5504 * inflow.c: Remove _initialize_inflow prototype.
5505 * infrun.c: Remove _initialize_infrun prototype.
5506 * interps.c: Remove _initialize_interpreter prototype.
5507 * iq2000-tdep.c: Remove _initialize_iq2000_tdep prototype.
5508 * jit.c: Remove _initialize_jit prototype.
5509 * language.c: Remove _initialize_language prototype.
5510 * linux-fork.c: Remove _initialize_linux_fork prototype.
5511 * linux-nat.c: Remove _initialize_linux_nat prototype.
5512 * linux-tdep.c: Remove _initialize_linux_tdep prototype.
5513 * linux-thread-db.c: Remove _initialize_thread_db prototype.
5514 * lm32-tdep.c: Remove _initialize_lm32_tdep prototype.
5515 * m2-lang.c: Remove _initialize_m2_language prototype.
5516 * m32c-tdep.c: Remove _initialize_m32c_tdep prototype.
5517 * m32r-linux-nat.c: Remove _initialize_m32r_linux_nat prototype.
5518 * m32r-linux-tdep.c: Remove _initialize_m32r_linux_tdep prototype.
5519 * m32r-tdep.c: Remove _initialize_m32r_tdep prototype.
5520 * m68hc11-tdep.c: Remove _initialize_m68hc11_tdep prototype.
5521 * m68k-bsd-nat.c: Remove _initialize_m68kbsd_nat prototype.
5522 * m68k-bsd-tdep.c: Remove _initialize_m68kbsd_tdep prototype.
5523 * m68k-linux-nat.c: Remove _initialize_m68k_linux_tdep prototype.
5524 * m68k-linux-tdep.c: Remove _initialize_m68k_linux_tdep prototype.
5525 * m68k-tdep.c: Remove _initialize_m68k_tdep prototype.
5526 * m88k-bsd-nat.c: Remove _initialize_m68kbsd_nat prototype.
5527 * m88k-tdep.c: Remove _initialize_m68kbsd_tdep prototype.
5528 * machoread.c: Remove _initialize_machoread prototype.
5529 * macrocmd.c: Remove _initialize_macrocmd prototype.
5530 * macroscope.c: Remove _initialize_macroscope prototype.
5531 * maint.c: Remove _initialize_maint_cmds prototype.
5532 * mdebugread.c: Remove _initialize_mdebugread prototype.
5533 * memattr.c: Remove _initialize_mem prototype.
5534 * mep-tdep.c: Remove _initialize_mep_tdep prototype.
5535 * mi/mi-cmd-env.c: Remove _initialize_mi_cmd_env prototype.
5536 * mi/mi-cmds.c: Remove _initialize_mi_cmds prototype.
5537 * mi/mi-interp.c: Remove _initialize_mi_interp prototype.
5538 * mi/mi-main.c: Remove _initialize_mi_main prototype.
5539 * microblaze-linux-tdep.c: Remove
5540 _initialize_microblaze_linux_tdep prototype.
5541 * microblaze-tdep.c: Remove _initialize_microblaze_tdep prototype.
5542 * mips-fbsd-nat.c: Remove _initialize_mips_fbsd_nat prototype.
5543 * mips-fbsd-tdep.c: Remove _initialize_mips_fbsd_tdep prototype.
5544 * mips-linux-nat.c: Remove _initialize_mips_linux_nat prototype.
5545 * mips-linux-tdep.c: Remove _initialize_mips_linux_tdep prototype.
5546 * mips-nbsd-nat.c: Remove _initialize_mipsnbsd_nat prototype.
5547 * mips-nbsd-tdep.c: Remove _initialize_mipsnbsd_tdep prototype.
5548 * mips-sde-tdep.c: Remove _initialize_mips_sde_tdep prototype.
5549 * mips-tdep.c: Remove _initialize_mips_tdep prototype.
5550 * mips64-obsd-nat.c: Remove _initialize_mips64obsd_nat prototype.
5551 * mips64-obsd-tdep.c: Remove _initialize_mips64obsd_tdep
5552 prototype.
5553 * mipsread.c: Remove _initialize_mipsread prototype.
5554 * mn10300-linux-tdep.c: Remove _initialize_mn10300_linux_tdep
5555 prototype.
5556 * mn10300-tdep.c: Remove _initialize_mn10300_tdep prototype.
5557 * moxie-tdep.c: Remove _initialize_moxie_tdep prototype.
5558 * msp430-tdep.c: Remove _initialize_msp430_tdep prototype.
5559 * mt-tdep.c: Remove _initialize_mt_tdep prototype.
5560 * nds32-tdep.c: Remove _initialize_nds32_tdep prototype.
5561 * nios2-linux-tdep.c: Remove _initialize_nios2_linux_tdep
5562 prototype.
5563 * nios2-tdep.c: Remove _initialize_nios2_tdep prototype.
5564 * nto-procfs.c: Remove _initialize_procfs prototype.
5565 * nto-tdep.c: Remove _initialize_nto_tdep prototype.
5566 * objc-lang.c: Remove _initialize_objc_language prototype.
5567 * objfiles.c: Remove _initialize_objfiles prototype.
5568 * observer.c: Remove observer_test_first_notification_function,
5569 observer_test_second_notification_function,
5570 observer_test_third_notification_function, and
5571 _initialize_observer prototypes.
5572 * opencl-lang.c: Remove _initialize_opencl_language prototypes.
5573 * osabi.c: Remove _initialize_gdb_osabi prototype.
5574 * osdata.c: Remove _initialize_osdata prototype.
5575 * p-valprint.c: Remove _initialize_pascal_valprint prototype.
5576 * parse.c: Remove _initialize_parse prototype.
5577 * ppc-fbsd-nat.c: Remove _initialize_ppcfbsd_nat prototype.
5578 * ppc-fbsd-tdep.c: Remove _initialize_ppcfbsd_tdep prototype.
5579 * ppc-linux-nat.c: Remove _initialize_ppc_linux_nat prototype.
5580 * ppc-linux-tdep.c: Remove _initialize_ppc_linux_tdep prototype.
5581 * ppc-nbsd-nat.c: Remove _initialize_ppcnbsd_nat prototype.
5582 * ppc-nbsd-tdep.c: Remove _initialize_ppcnbsd_tdep prototype.
5583 * ppc-obsd-nat.c: Remove _initialize_ppcobsd_nat prototype.
5584 * ppc-obsd-tdep.c: Remove _initialize_ppcobsd_tdep prototype.
5585 * printcmd.c: Remove _initialize_printcmd prototype.
5586 * probe.c: Remove _initialize_probe prototype.
5587 * proc-api.c: Remove _initialize_proc_api prototype.
5588 * proc-events.c: Remove _initialize_proc_events prototype.
5589 * proc-service.c: Remove _initialize_proc_service prototype.
5590 * procfs.c: Remove _initialize_procfs prototype.
5591 * psymtab.c: Remove _initialize_psymtab prototype.
5592 * python/python.c: Remove _initialize_python prototype.
5593 * ravenscar-thread.c: Remove _initialize_ravenscar prototype.
5594 * record-btrace.c: Remove _initialize_record_btrace prototype.
5595 * record-full.c: Remove _initialize_record_full prototype.
5596 * record.c: Remove _initialize_record prototype.
5597 * regcache.c: Remove _initialize_regcache prototype.
5598 * reggroups.c: Remove _initialize_reggroup prototype.
5599 * remote-notif.c: Remove _initialize_notif prototype.
5600 * remote-sim.c: Remove _initialize_remote_sim prototype.
5601 * remote.c: Remove _initialize_remote prototype.
5602 * reverse.c: Remove _initialize_reverse prototype.
5603 * rl78-tdep.c: Remove _initialize_rl78_tdep prototype.
5604 * rs6000-aix-tdep.c: Remove _initialize_rs6000_aix_tdep prototype.
5605 * rs6000-lynx178-tdep.c: Remove _initialize_rs6000_lynx178_tdep
5606 prototype.
5607 * rs6000-nat.c: Remove _initialize_rs6000_nat prototype.
5608 * rs6000-tdep.c: Remove _initialize_rs6000_tdep prototype.
5609 * rust-exp.y: Remove _initialize_rust_exp prototype.
5610 * rx-tdep.c: Remove _initialize_rx_tdep prototype.
5611 * s390-linux-nat.c: Remove _initialize_s390_nat prototype.
5612 * s390-linux-tdep.c: Remove _initialize_s390_tdep prototype.
5613 * score-tdep.c: Remove _initialize_score_tdep prototype.
5614 * selftest-arch.c: Remove _initialize_selftests_foreach_arch
5615 prototype.
5616 * ser-go32.c: Remove _initialize_ser_dos prototype.
5617 * ser-mingw.c: Remove _initialize_ser_windows prototype.
5618 * ser-pipe.c: Remove _initialize_ser_pipe prototype.
5619 * ser-tcp.c: Remove _initialize_ser_tcp prototype.
5620 * ser-unix.c: Remove _initialize_ser_hardwire prototype.
5621 * serial.c: Remove _initialize_serial prototype.
5622 * sh-linux-tdep.c: Remove _initialize_sh_linux_tdep prototype.
5623 * sh-nbsd-nat.c: Remove _initialize_shnbsd_nat prototype.
5624 * sh-nbsd-tdep.c: Remove _initialize_shnbsd_tdep prototype.
5625 * sh-tdep.c: Remove _initialize_sh_tdep prototype.
5626 * skip.c: Remove _initialize_step_skip prototype.
5627 * sol-thread.c: Remove _initialize_sol_thread prototype.
5628 * solib-aix.c: Remove _initialize_solib_aix prototype.
5629 * solib-darwin.c: Remove _initialize_darwin_solib prototype.
5630 * solib-dsbt.c: Remove _initialize_dsbt_solib prototype.
5631 * solib-frv.c: Remove _initialize_frv_solib prototype.
5632 * solib-spu.c: Remove _initialize_spu_solib prototype.
5633 * solib-svr4.c: Remove _initialize_svr4_solib prototype.
5634 * solib-target.c: Remove _initialize_solib_target prototype.
5635 * solib.c: Remove _initialize_solib prototype.
5636 * source.c: Remove _initialize_source prototype.
5637 * sparc-linux-nat.c: Remove _initialize_sparc_linux_nat prototype.
5638 * sparc-linux-tdep.c: Remove _initialize_sparc_linux_tdep
5639 prototype.
5640 * sparc-nat.c: Remove _initialize_sparc_nat prototype.
5641 * sparc-nbsd-nat.c: Remove _initialize_sparcnbsd_nat prototype.
5642 * sparc-nbsd-tdep.c: Remove _initialize_sparcnbsd_tdep prototype.
5643 * sparc-obsd-tdep.c: Remove _initialize_sparc32obsd_tdep
5644 prototype.
5645 * sparc-sol2-nat.c: Remove _initialize_sparc_sol2_nat prototype.
5646 * sparc-sol2-tdep.c: Remove _initialize_sparc_sol2_tdep prototype.
5647 * sparc-tdep.c: Remove _initialize_sparc_tdep prototype.
5648 * sparc64-fbsd-nat.c: Remove _initialize_sparc64fbsd_nat
5649 prototype.
5650 * sparc64-fbsd-tdep.c: Remove _initialize_sparc64fbsd_tdep
5651 prototype.
5652 * sparc64-linux-nat.c: Remove _initialize_sparc64_linux_nat
5653 prototype.
5654 * sparc64-linux-tdep.c: Remove _initialize_sparc64_linux_tdep
5655 prototype.
5656 * sparc64-nat.c: Remove _initialize_sparc64_nat prototype.
5657 * sparc64-nbsd-nat.c: Remove _initialize_sparc64nbsd_nat
5658 prototype.
5659 * sparc64-nbsd-tdep.c: Remove _initialize_sparc64nbsd_tdep
5660 prototype.
5661 * sparc64-obsd-nat.c: Remove _initialize_sparc64obsd_nat
5662 prototype.
5663 * sparc64-obsd-tdep.c: Remove _initialize_sparc64obsd_tdep
5664 prototype.
5665 * sparc64-sol2-tdep.c: Remove _initialize_sparc64_sol2_tdep
5666 prototype.
5667 * spu-linux-nat.c: Remove _initialize_spu_nat prototype.
5668 * spu-multiarch.c: Remove _initialize_spu_multiarch prototype.
5669 * spu-tdep.c: Remove _initialize_spu_tdep prototype.
5670 * stabsread.c: Remove _initialize_stabsread prototype.
5671 * stack.c: Remove _initialize_stack prototype.
5672 * stap-probe.c: Remove _initialize_stap_probe prototype.
5673 * std-regs.c: Remove _initialize_frame_reg prototype.
5674 * symfile-debug.c: Remove _initialize_symfile_debug prototype.
5675 * symfile-mem.c: Remove _initialize_symfile_mem prototype.
5676 * symfile.c: Remove _initialize_symfile prototype.
5677 * symmisc.c: Remove _initialize_symmisc prototype.
5678 * symtab.c: Remove _initialize_symtab prototype.
5679 * target-dcache.c: Remove _initialize_target_dcache prototype.
5680 * target-descriptions.c: Remove _initialize_target_descriptions
5681 prototype.
5682 * thread.c: Remove _initialize_thread prototype.
5683 * tic6x-linux-tdep.c: Remove _initialize_tic6x_linux_tdep
5684 prototype.
5685 * tic6x-tdep.c: Remove _initialize_tic6x_tdep prototype.
5686 * tilegx-linux-nat.c: Remove _initialize_tile_linux_nat prototype.
5687 * tilegx-linux-tdep.c: Remove _initialize_tilegx_linux_tdep
5688 prototype.
5689 * tilegx-tdep.c: Remove _initialize_tilegx_tdep prototype.
5690 * tracefile-tfile.c: Remove _initialize_tracefile_tfile prototype.
5691 * tracefile.c: Remove _initialize_tracefile prototype.
5692 * tracepoint.c: Remove _initialize_tracepoint prototype.
5693 * tui/tui-hooks.c: Remove _initialize_tui_hooks prototype.
5694 * tui/tui-interp.c: Remove _initialize_tui_interp prototype.
5695 * tui/tui-layout.c: Remove _initialize_tui_layout prototype.
5696 * tui/tui-regs.c: Remove _initialize_tui_regs prototype.
5697 * tui/tui-stack.c: Remove _initialize_tui_stack prototype.
5698 * tui/tui-win.c: Remove _initialize_tui_win prototype.
5699 * tui/tui.c: Remove _initialize_tui prototype.
5700 * typeprint.c: Remove _initialize_typeprint prototype.
5701 * user-regs.c: Remove _initialize_user_regs prototype.
5702 * utils.c: Remove _initialize_utils prototype.
5703 * v850-tdep.c: Remove _initialize_v850_tdep prototype.
5704 * valarith.c: Remove _initialize_valarith prototype.
5705 * valops.c: Remove _initialize_valops prototype.
5706 * valprint.c: Remove _initialize_valprint prototype.
5707 * value.c: Remove _initialize_values prototype.
5708 * varobj.c: Remove _initialize_varobj prototype.
5709 * vax-bsd-nat.c: Remove _initialize_vaxbsd_nat prototype.
5710 * vax-nbsd-tdep.c: Remove _initialize_vaxnbsd_tdep prototype.
5711 * vax-tdep.c: Remove _initialize_vax_tdep prototype.
5712 * windows-nat.c: Remove _initialize_windows_nat,
5713 _initialize_check_for_gdb_ini, and _initialize_loadable
5714 prototypes.
5715 * windows-tdep.c: Remove _initialize_windows_tdep prototype.
5716 * xcoffread.c: Remove _initialize_xcoffread prototype.
5717 * xml-support.c: Remove _initialize_xml_support prototype.
5718 * xstormy16-tdep.c: Remove _initialize_xstormy16_tdep prototype.
5719 * xtensa-linux-nat.c: Remove _initialize_xtensa_linux_nat
5720 prototype.
5721 * xtensa-linux-tdep.c: Remove _initialize_xtensa_linux_tdep
5722 prototype.
5723 * xtensa-tdep.c: Remove _initialize_xtensa_tdep prototype.
5724
5725 2017-09-08 Keith Seitz <keiths@redhat.com>
5726
5727 * dwarf2read.c (struct field_info) <fnfields>: Remove unused
5728 field.
5729
5730 2017-09-08 Christoph Weinmann <christoph.t.weinmann@intel.com>
5731
5732 * f-valprint.c (f_val_print): Remove check for one byte
5733 sized integers. Remove printing of character type.
5734
5735 2017-09-08 Frank Penczek <frank.penczek@intel.com>
5736 Christoph Weinmann <christoph.t.weinmann@intel.com>
5737 Bernhard Heckel <bernhard.heckel@intel.com>
5738
5739 * f-typeprint.c (f_type_print_base): Use fprintfi_filtered
5740 to maintain proper indentation when printing pointers/refs.
5741
5742 2017-09-07 Joel Brobecker <brobecker@adacore.com>
5743
5744 GDB 8.0.1 released.
5745
5746 2017-09-07 Joel Brobecker <brobecker@adacore.com>
5747
5748 * NEWS (Changes in GDB 7.11): Remove entry for QStartupWithShell.
5749
5750 2017-09-05 Tom Tromey <tom@tromey.com>
5751
5752 * parse.c (funcall_chain): Now a std::vector.
5753 (start_arglist, end_arglist): Simplify.
5754 (free_funcalls): Remove.
5755 (parse_exp_in_context_1): Remove cleanup.
5756
5757 2017-09-05 Tom Tromey <tom@tromey.com>
5758
5759 * go-exp.y (go_parse): Don't create a cleanup.
5760
5761 2017-09-05 Tom Tromey <tom@tromey.com>
5762
5763 * d-exp.y (PrimaryExpression): Use std::string.
5764 (d_parse): Don't create a cleanup.
5765
5766 2017-09-05 Tom Tromey <tom@tromey.com>
5767
5768 * utils.c (do_clear_parser_state): Remove.
5769 (make_cleanup_clear_parser_state): Remove.
5770 * p-exp.y (pascal_parse): Use scoped_restore.
5771 * m2-exp.y (m2_parse): Use scoped_restore.
5772 * f-exp.y (f_parse): Use scoped_restore.
5773 * d-exp.y (d_parse): Use scoped_restore.
5774 * c-exp.y (c_parse): Use scoped_restore.
5775 * ada-exp.y (ada_parse): Use scoped_restore.
5776 * utils.h (make_cleanup_clear_parser_state): Remove.
5777
5778 2017-09-06 Keith Seitz <keiths@redhat.com>
5779
5780 * dwarf2read.c (dw2_linkage_name_attr): New function.
5781 (dw2_linkage_name): New function.
5782 (dwarf2_compute_name, dwarf2_physname, read_call_site_scope)
5783 (guess_full_die_structure_name, dwarf2_name): Use dw2_linkage_name.
5784 (anonymous_struct_prefix, dwarf2_name): Use dw2_linkage_name_attr.
5785
5786 2017-09-06 Kamil Rytarowski <n54@gmx.com>
5787
5788 * config/djgpp/djconfig.sh: Correct shell portability issue.
5789
5790 2017-09-06 Kamil Rytarowski <n54@gmx.com>
5791
5792 * configure.nat: Define HAVE_NATIVE_GCORE_HOST on NetBSD.
5793
5794 2017-09-06 John Baldwin <jhb@FreeBSD.org>
5795
5796 * Makefile.in (ALLDEPFILES): Add mips-fbsd-nat.c.
5797 * NEWS: Mention new FreeBSD/mips native configuration.
5798 * configure.host: Add aarch64*-*-freebsd*.
5799 * configure.nat: Likewise.
5800 * aarch64-fbsd-nat.c: New file.
5801
5802 2017-09-06 John Baldwin <jhb@FreeBSD.org>
5803
5804 * Makefile.in (ALL_64_TARGET_OBS): Add aarch64-fbsd-tdep.o.
5805 (ALLDEPFILES): Add aarch64-fbsd-tdep.c.
5806 * NEWS: Mention new FreeBSD/aarch64 target.
5807 * configure.tgt: Add aarch64*-*-freebsd*.
5808 * aarch64-fbsd-tdep.c: New file.
5809 * aarch64-fbsd-tdep.h: New file.
5810
5811 2017-09-06 Kamil Rytarowski <n54@gmx.com>
5812
5813 * MAINTAINERS (Write After Approval): Add Kamil Rytarowski.
5814
5815 2017-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
5816
5817 * parse.c (find_minsym_type_and_address): Don't relocate addresses
5818 of TLS symbols.
5819
5820 2017-09-05 Philippe Waroquiers <philippe.waroquiers@skynet.be>
5821
5822 * objfiles.c (get_objfile_bfd_data): Remove useless obstack_init
5823 call.
5824
5825 2017-09-05 Simon Marchi <simon.marchi@ericsson.com>
5826
5827 * infrun.c (follow_exec): Call add_thread after
5828 target_find_description.
5829
5830 2017-09-05 Simon Marchi <simon.marchi@ericsson.com>
5831
5832 * infrun.c (handle_inferior_event_1): When exec'ing, read
5833 stop_pc after follow_exec.
5834
5835 2017-09-05 Simon Marchi <simon.marchi@ericsson.com>
5836
5837 * remote.c (process_g_packet): Update error message.
5838
5839 2017-09-05 Yao Qi <yao.qi@linaro.org>
5840
5841 * configure.tgt (gdb_target_obs): Add i386.o for x86_64-*
5842 targets.
5843
5844 2017-09-05 Pedro Alves <palves@redhat.com>
5845
5846 * eval.c (eval_call, evaluate_funcall): New functions, factored
5847 out from ...
5848 (evaluate_subexp_standard): ... this.
5849
5850 2017-09-05 Yao Qi <yao.qi@linaro.org>
5851
5852 * amd64-tdep.c (amd64_target_description): Create target
5853 descriptions.
5854 (_initialize_amd64_tdep): Don't call functions
5855 initialize_tdesc_amd64_*. Add self tests.
5856 * arch/amd64.c (amd64_create_target_description): Add parameter
5857 is_linux. Call set_tdesc_osabi if is_linux is true.
5858 * arch/amd64.h (amd64_create_target_description): Update the
5859 declaration.
5860 * arch/i386.c (i386_create_target_description): Add parameter
5861 is_linux. Call set_tdesc_osabi if is_linux is true.
5862 * arch/i386.h (i386_create_target_description): Update
5863 declaration.
5864 * configure.tgt: Add i386.o to gdb_target_obs.
5865 * features/Makefile (XMLTOC): Remove i386/*.xml.
5866 * features/i386/amd64-avx-avx512.c: Remove.
5867 * features/i386/amd64-avx-mpx-avx512-pku.c: Remove.
5868 * features/i386/amd64-avx-mpx.c: Remove.
5869 * features/i386/amd64-avx.c: Remove.
5870 * features/i386/amd64-mpx.c: Remove.
5871 * features/i386/amd64.c: Remove.
5872 * features/i386/i386-avx-avx512.c: Remove.
5873 * features/i386/i386-avx-mpx-avx512-pku.c: Remove.
5874 * features/i386/i386-avx-mpx.c: Remove.
5875 * features/i386/i386-avx.c: Remove.
5876 * features/i386/i386-mmx.c: Remove.
5877 * features/i386/i386-mpx.c: Remove.
5878 * features/i386/i386.c: Remove.
5879 * i386-tdep.c: Don't include features/i386/i386*.c., include
5880 target-descriptions.h and arch/i386.h.
5881 (i386_target_description): Create target descriptions.
5882 (i386_gdbarch_init): Don't call initialize_tdesc_i386_*
5883 functions. Do self tests.
5884
5885 2017-09-05 Yao Qi <yao.qi@linaro.org>
5886
5887 * features/Makefile (XMLTOC): Remove i386/amd64XXX-linux.xml.
5888 * features/i386/amd64-avx-avx512-linux.c: Removed.
5889 * features/i386/amd64-avx-linux.c: Removed.
5890 * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Removed.
5891 * features/i386/amd64-avx-mpx-linux.c: Removed.
5892 * features/i386/amd64-linux.c: Removed.
5893 * features/i386/amd64-mpx-linux.c: Removed.
5894 * features/i386/x32-avx-avx512-linux.c: Removed.
5895 * features/i386/x32-avx-linux.c: Removed.
5896 * features/i386/x32-linux.c: Removed.
5897
5898 2017-09-05 Yao Qi <yao.qi@linaro.org>
5899
5900 * amd64-linux-tdep.c: Include arch/amd64.h. Don't include
5901 features/i386/*.c.
5902 (amd64_linux_read_description): Call
5903 amd64_create_target_description.
5904 * arch/amd64.c: New file.
5905 * arch/amd64.h: New file.
5906 * configure.tgt (x86_64-*-linux*): Append amd64.o.
5907 * Makefile.in (ALL_64_TARGET_OBS): Append amd64.o.
5908
5909 2017-09-05 Yao Qi <yao.qi@linaro.org>
5910
5911 * amd64-linux-tdep.c: Don't include amd64-XXX-linux and
5912 x32-XXX-linux.c. Include 64bit-XX.c and x32-XX.c.
5913 (amd64_linux_read_description): Create target descriptions.
5914 (_initialize_amd64_linux_tdep): Don't call initialize_tdesc_XXX
5915 functions. Add unit tests.
5916 * features/Makefile (FEATURE_XMLFILES): Append 64bit-XXX.xml and
5917 x32-core.xml.
5918 * features/i386/64bit-avx.c: Generated.
5919 * features/i386/64bit-avx512.c: Generated.
5920 * features/i386/64bit-core.c: Generated.
5921 * features/i386/64bit-linux.c: Generated.
5922 * features/i386/64bit-mpx.c: Generated.
5923 * features/i386/64bit-pkeys.c: Generated.
5924 * features/i386/64bit-segments.c: Generated.
5925 * features/i386/64bit-sse.c: Generated.
5926 * features/i386/x32-core.c: Generated.
5927 * target-descriptions.c (maint_print_c_tdesc_cmd): Print feature
5928 c files for amd64-linux and x32-linux.
5929
5930 2017-09-05 Yao Qi <yao.qi@linaro.org>
5931
5932 * amd64-linux-tdep.c (amd64_linux_read_description): New
5933 function.
5934 (amd64_linux_core_read_description): Call
5935 amd64_linux_read_description.
5936 (amd64_linux_init_abi): Likewise.
5937 (amd64_x32_linux_init_abi): Likewise.
5938 * amd64-linux-tdep.h (amd64_linux_read_description): Declare.
5939 * x86-linux-nat.c (x86_linux_read_description): Call
5940 amd64_linux_read_description.
5941
5942 2017-09-05 Yao Qi <yao.qi@linaro.org>
5943
5944 * amd64-linux-tdep.c (amd64_linux_core_read_description): Update
5945 comments.
5946
5947 2017-09-05 Yao Qi <yao.qi@linaro.org>
5948
5949 * features/Makefile (XMLTOC): Remove i386/i386-XX-linux.xml.
5950 * features/i386/i386-avx-avx512-linux.c: Remove.
5951 * features/i386/i386-avx-linux.c: Remove.
5952 * features/i386/i386-avx-mpx-avx512-pku-linux.c: Remove.
5953 * features/i386/i386-avx-mpx-linux.c: Remove.
5954 * features/i386/i386-linux.c: Remove.
5955 * features/i386/i386-mmx-linux.c: Remove.
5956 * features/i386/i386-mpx-linux.c: Remove.
5957
5958 2017-09-05 Yao Qi <yao.qi@linaro.org>
5959
5960 * Makefile.in (ALL_TARGET_OBS): Add i386.o.
5961 (SFILES): Add arch/i386.c.
5962 (HFILES_NO_SRCDIR): Add arch/i386.h.
5963 * arch/i386.c: New file.
5964 * arch/i386.h: New file.
5965 * arch/tdesc.h (allocate_target_description): Declare.
5966 (set_tdesc_architecture): Declare.
5967 (set_tdesc_osabi): Declare.
5968 * configure.tgt (i[34567]86-*-linux*): Add i386.o.
5969 * i386-linux-tdep.c: Don't include ../features/i386/32bit-XXX.c.
5970 include arch/i386.h.
5971 (i386_linux_read_description): Remove code and call
5972 i386_create_target_description.
5973 (set_tdesc_architecture): New function.
5974 (set_tdesc_osabi): New function.
5975 * target-descriptions.h (allocate_target_description): Remove.
5976
5977 2017-09-05 Yao Qi <yao.qi@linaro.org>
5978
5979 * arch/tdesc.h (tdesc_create_feature): Add an argument xml.
5980 * target-descriptions.c (tdesc_create_feature): Likewise, and
5981 adjust code.
5982 * features/i386/32bit-avx.c: Re-generated.
5983 * features/i386/32bit-avx512.c: Re-generated.
5984 * features/i386/32bit-core.c: Re-generated.
5985 * features/i386/32bit-linux.c: Re-generated.
5986 * features/i386/32bit-mpx.c: Re-generated.
5987 * features/i386/32bit-pkeys.c: Re-generated.
5988 * features/i386/32bit-sse.c: Re-generated.
5989
5990 2017-09-05 Yao Qi <yao.qi@linaro.org>
5991
5992 * regformats/regdef.h (struct reg): Override operator == and !=.
5993
5994 2017-09-05 Yao Qi <yao.qi@linaro.org>
5995
5996 * arch/tdesc.h: New file.
5997 * regformats/regdat.sh: Generate code using tdesc_create_reg.
5998 * target-descriptions.c: Update comments.
5999 * target-descriptions.h: Include "arch/tdesc.h". Remove the
6000 declarations.
6001 * features/i386/32bit-avx.c: Re-generated.
6002 * features/i386/32bit-avx512.c: Re-generated.
6003 * features/i386/32bit-core.c: Re-generated.
6004 * features/i386/32bit-linux.c: Re-generated.
6005 * features/i386/32bit-mpx.c: Re-generated.
6006 * features/i386/32bit-pkeys.c: Re-generated.
6007 * features/i386/32bit-sse.c: Re-generated.
6008
6009 2017-09-05 Yao Qi <yao.qi@linaro.org>
6010
6011 * regformats/regdat.sh: Update generated code.
6012
6013 2017-09-05 Yao Qi <yao.qi@linaro.org>
6014
6015 * regformats/regdat.sh: Adjust code order.
6016
6017 2017-09-05 Simon Marchi <simon.marchi@ericsson.com>
6018
6019 * expprint.c (dump_subexp_body_standard): Use constant format
6020 string in fprintf_filtered call.
6021
6022 2017-09-04 John Baldwin <jhb@FreeBSD.org>
6023
6024 * configure.nat: Add "x86-nat.o x86-dregs.o" for NetBSD/amd64 and
6025 NetBSD/i386.
6026 * x86-bsd-nat.c [!DBREG_DRX && __NetBSD__]: Define DBREG_DRX.
6027
6028 2017-09-04 John Baldwin <jhb@FreeBSD.org>
6029
6030 * bsd-kvm.o: Make <sys/user.h> conditional on HAVE_SYS_USER_H.
6031
6032 2017-09-04 John Baldwin <jhb@FreeBSD.org>
6033
6034 * bsd-kvm.o: Define _KMEMUSER.
6035 * configure.ac: Define _KMEMUSER when checking for "struct lwp".
6036 * configure: Regenerate.
6037
6038 2017-09-04 John Baldwin <jhb@FreeBSD.org>
6039
6040 * amd64-fbsd-nat.c: Add include of "x86-xstate.h".
6041 * i386-fbsd-nat.c: Likewise.
6042
6043 2017-09-04 John Baldwin <jhb@FreeBSD.org>
6044
6045 * unittests/array-view-selftests.c: Add include of <array>.
6046
6047 2017-09-04 John Baldwin <jhb@FreeBSD.org>
6048
6049 * spu-tdep.c (flush_ea_cache): Add missing argument to
6050 call_function_by_hand.
6051
6052 2017-09-04 Pedro Alves <palves@redhat.com>
6053
6054 * NEWS (Safer support for debugging with no debug info): New.
6055
6056 2017-09-04 Pedro Alves <palves@redhat.com>
6057
6058 * c-exp.y (function_method, function_method_void): Add current
6059 instance flags to TYPE_INSTANCE.
6060 * dwarf2read.c (check_modifier): New.
6061 (compute_delayed_physnames): Assert that only C++ adds delayed
6062 physnames. Mark fn_fields as const/volatile depending on
6063 physname.
6064 * eval.c (make_params): New type_instance_flags parameter. Use
6065 it as the new type's instance flags.
6066 (evaluate_subexp_standard) <TYPE_INSTANCE>: Extract the instance
6067 flags element and pass it to make_params.
6068 * expprint.c (print_subexp_standard) <TYPE_INSTANCE>: Handle
6069 instance flags element.
6070 (dump_subexp_body_standard) <TYPE_INSTANCE>: Likewise.
6071 * gdbtypes.h: Include "enum-flags.h".
6072 (type_instance_flags): New enum-flags type.
6073 (TYPE_CONST, TYPE_VOLATILE, TYPE_RESTRICT, TYPE_ATOMIC)
6074 (TYPE_CODE_SPACE, TYPE_DATA_SPACE): Return boolean.
6075 * parse.c (operator_length_standard) <TYPE_INSTANCE>: Adjust.
6076 (follow_type_instance_flags): New function.
6077 (operator_check_standard) <TYPE_INSTANCE>: Adjust.
6078 * parser-defs.h (follow_type_instance_flags): Declare.
6079 * valops.c (value_struct_elt_for_reference): const/volatile must
6080 match too.
6081
6082 2017-09-04 Pedro Alves <palves@redhat.com>
6083
6084 * cp-namespace.c (cp_search_static_and_baseclasses): Handle
6085 function/method scopes; lookup the nested name as a function local
6086 static variable.
6087
6088 2017-09-04 Pedro Alves <palves@redhat.com>
6089
6090 (%type <voidval>): Add function_method.
6091 * c-exp.y (exp): New production for calls with no arguments.
6092 (function_method, function_method_void_or_typelist): New
6093 productions.
6094 (exp): New production for "method()::static_var".
6095 * eval.c (evaluate_subexp_standard): Handle OP_FUNC_STATIC_VAR.
6096 * expprint.c (print_subexp_standard, dump_subexp_body_standard):
6097 Handle OP_FUNC_STATIC_VAR.
6098 * parse.c (operator_length_standard):
6099 Handle OP_FUNC_STATIC_VAR.
6100
6101 2017-09-04 Pedro Alves <palves@redhat.com>
6102
6103 * eval.c (evaluate_subexp_standard): Remove UNOP_MEMVAL_TLS
6104 handling.
6105 * expprint.c (print_subexp_standard, dump_subexp_body_standard):
6106 Ditto.
6107 * parse.c (operator_length_standard, operator_check_standard):
6108 Ditto.
6109 * std-operator.def (UNOP_MEMVAL_TLS): Delete.
6110
6111 2017-09-04 Pedro Alves <palves@redhat.com>
6112
6113 * ax-gdb.c: Include "typeprint.h".
6114 (gen_expr_for_cast): New function.
6115 (gen_expr) <OP_CAST, OP_CAST_TYPE>: Use it.
6116 <OP_VAR_VALUE, OP_MSYM_VAR_VALUE>: Error out if the variable's
6117 type is unknown.
6118 * dwarf2read.c (new_symbol_full): Fallback to int instead of
6119 nodebug_data_symbol.
6120 * eval.c: Include "typeprint.h".
6121 (evaluate_subexp_standard) <OP_VAR_VALUE, OP_VAR_MSYM_VALUE>:
6122 Error out if symbol has unknown type.
6123 <UNOP_CAST, UNOP_CAST_TYPE>: Common bits factored out to
6124 evaluate_subexp_for_cast.
6125 (evaluate_subexp_for_address, evaluate_subexp_for_sizeof): Handle
6126 OP_VAR_MSYM_VALUE.
6127 (evaluate_subexp_for_cast): New function.
6128 * gdbtypes.c (init_nodebug_var_type): New function.
6129 (objfile_type): Use it to initialize types of variables with no
6130 debug info.
6131 * typeprint.c (error_unknown_type): New.
6132 * typeprint.h (error_unknown_type): New declaration.
6133 * compile/compile-c-types.c (convert_type_basic): Handle
6134 TYPE_CODE_ERROR; warn and fallback to int for variables with
6135 unknown type.
6136
6137 2017-09-04 Pedro Alves <palves@redhat.com>
6138
6139 * eval.c (evaluate_var_value): New function, factored out from ...
6140 (evaluate_subexp_standard): ... here.
6141
6142 2017-09-04 Pedro Alves <palves@redhat.com>
6143
6144 * eval.c (evaluate_subexp_standard) <UNOP_COMPLEMENT, UNOP_ADDR>:
6145 Remove useless assignments to 'op'.
6146
6147 2017-09-04 Pedro Alves <palves@redhat.com>
6148
6149 * eval.c (eval_skip_value): New function.
6150 (evaluate_subexp_standard): Use it.
6151
6152 2017-09-04 Pedro Alves <palves@redhat.com>
6153
6154 * eval.c (evaluate_subexp_standard): <OP_FUNCALL>: Extract
6155 function name from symbol/minsym and pass it to
6156 error_call_unknown_return_type.
6157
6158 2017-09-04 Pedro Alves <palves@redhat.com>
6159
6160 * ada-lang.c (resolve_subexp): Handle OP_VAR_MSYM_VALUE.
6161 * ax-gdb.c (gen_msym_var_ref): New function.
6162 (gen_expr): Handle OP_VAR_MSYM_VALUE.
6163 * eval.c (evaluate_var_msym_value): New function.
6164 * eval.c (evaluate_subexp_standard): Handle OP_VAR_MSYM_VALUE.
6165 <OP_FUNCALL>: Extract function name from symbol/minsym and pass it
6166 to call_function_by_hand.
6167 * expprint.c (print_subexp_standard, dump_subexp_body_standard):
6168 Handle OP_VAR_MSYM_VALUE.
6169 (union exp_element) <msymbol>: New field.
6170 * minsyms.h (struct type): Forward declare.
6171 (find_minsym_type_and_address): Declare.
6172 * parse.c (write_exp_elt_msym): New function.
6173 (write_exp_msymbol): Delete, refactored as ...
6174 (find_minsym_type_and_address): ... this new function.
6175 (write_exp_msymbol): Reimplement using OP_VAR_MSYM_VALUE.
6176 (operator_length_standard, operator_check_standard): Handle
6177 OP_VAR_MSYM_VALUE.
6178 * std-operator.def (OP_VAR_MSYM_VALUE): New.
6179
6180 2017-09-04 Pedro Alves <palves@redhat.com>
6181
6182 * ada-lang.c (ada_evaluate_subexp) <TYPE_CODE_FUNC>: Don't handle
6183 TYPE_GNU_IFUNC specially here. Throw error if return type is
6184 unknown.
6185 * ada-typeprint.c (print_func_type): Handle functions with unknown
6186 return type.
6187 * c-typeprint.c (c_type_print_base): Handle functions and methods
6188 with unknown return type.
6189 * compile/compile-c-symbols.c (convert_symbol_bmsym)
6190 <mst_text_gnu_ifunc>: Use nodebug_text_gnu_ifunc_symbol.
6191 * compile/compile-c-types.c: Include "objfiles.h".
6192 (convert_func): For functions with unknown return type, warn and
6193 default to int.
6194 * compile/compile-object-run.c (compile_object_run): Adjust call
6195 to call_function_by_hand_dummy.
6196 * elfread.c (elf_gnu_ifunc_resolve_addr): Adjust call to
6197 call_function_by_hand.
6198 * eval.c (evaluate_subexp_standard): Adjust calls to
6199 call_function_by_hand. Handle functions and methods with unknown
6200 return type. Pass expect_type to call_function_by_hand.
6201 * f-typeprint.c (f_type_print_base): Handle functions with unknown
6202 return type.
6203 * gcore.c (call_target_sbrk): Adjust call to
6204 call_function_by_hand.
6205 * gdbtypes.c (objfile_type): Leave nodebug text symbol with NULL
6206 return type instead of int. Make nodebug_text_gnu_ifunc_symbol be
6207 an integer address type instead of nodebug.
6208 * guile/scm-value.c (gdbscm_value_call): Adjust call to
6209 call_function_by_hand.
6210 * infcall.c (error_call_unknown_return_type): New function.
6211 (call_function_by_hand): New "default_return_type" parameter.
6212 Pass it down.
6213 (call_function_by_hand_dummy): New "default_return_type"
6214 parameter. Use it instead of defaulting to int. If there's no
6215 default and the return type is unknown, throw an error. If
6216 there's a default return type, and the called function has no
6217 debug info, then assume the function is prototyped.
6218 * infcall.h (call_function_by_hand, call_function_by_hand_dummy):
6219 New "default_return_type" parameter.
6220 (error_call_unknown_return_type): New declaration.
6221 * linux-fork.c (call_lseek): Cast return type of lseek.
6222 (inferior_call_waitpid, checkpoint_command): Adjust calls to
6223 call_function_by_hand.
6224 * linux-tdep.c (linux_infcall_mmap, linux_infcall_munmap): Adjust
6225 calls to call_function_by_hand.
6226 * m2-typeprint.c (m2_procedure): Handle functions with unknown
6227 return type.
6228 * objc-lang.c (lookup_objc_class, lookup_child_selector)
6229 (value_nsstring, print_object_command): Adjust calls to
6230 call_function_by_hand.
6231 * p-typeprint.c (pascal_type_print_varspec_prefix): Handle
6232 functions with unknown return type.
6233 (pascal_type_print_func_varspec_suffix): New function.
6234 (pascal_type_print_varspec_suffix) <TYPE_CODE_FUNC,
6235 TYPE_CODE_METHOD>: Use it.
6236 * python/py-value.c (valpy_call): Adjust call to
6237 call_function_by_hand.
6238 * rust-lang.c (rust_evaluate_funcall): Adjust call to
6239 call_function_by_hand.
6240 * valarith.c (value_x_binop, value_x_unop): Adjust calls to
6241 call_function_by_hand.
6242 * valops.c (value_allocate_space_in_inferior): Adjust call to
6243 call_function_by_hand.
6244 * typeprint.c (type_print_unknown_return_type): New function.
6245 * typeprint.h (type_print_unknown_return_type): New declaration.
6246
6247 2017-09-04 Pedro Alves <palves@redhat.com>
6248
6249 * gdbtypes.c (lookup_function_type_with_arguments): Mark function
6250 types with more than one parameter as prototyped.
6251
6252 2017-09-04 Pedro Alves <palves@redhat.com>
6253
6254 * cli/cli-cmds.c (print_disassembly, disassemble_current_function)
6255 (disassemble_command): Use gdb_disassembly_flags instead of bare
6256 int.
6257 * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn)
6258 (dump_insns, do_mixed_source_and_assembly_deprecated)
6259 (do_mixed_source_and_assembly, do_assembly_only, gdb_disassembly):
6260 Use gdb_disassembly_flags instead of bare int.
6261 * disasm.h (DISASSEMBLY_SOURCE_DEPRECATED, DISASSEMBLY_RAW_INSN)
6262 (DISASSEMBLY_OMIT_FNAME, DISASSEMBLY_FILENAME)
6263 (DISASSEMBLY_OMIT_PC, DISASSEMBLY_SOURCE)
6264 (DISASSEMBLY_SPECULATIVE): No longer macros. Instead they're...
6265 (enum gdb_disassembly_flag): ... values of this new enumeration.
6266 (gdb_disassembly_flags): Define.
6267 (gdb_disassembly)
6268 (gdb_pretty_print_disassembler::pretty_print_insn): Use it.
6269 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Use
6270 gdb_disassembly_flags instead of bare int.
6271 * record-btrace.c (btrace_insn_history)
6272 (record_btrace_insn_history, record_btrace_insn_history_range)
6273 (record_btrace_insn_history_from): Use gdb_disassembly_flags
6274 instead of bare int.
6275 * record.c (get_insn_history_modifiers, cmd_record_insn_history):
6276 Use gdb_disassembly_flags instead of bare int.
6277 * target-debug.h (target_debug_print_gdb_disassembly_flags):
6278 Define.
6279 * target-delegates.c: Regenerate.
6280 * target.c (target_insn_history, target_insn_history_from)
6281 (target_insn_history_range): Use gdb_disassembly_flags instead of
6282 bare int.
6283 * target.h: Include "disasm.h".
6284 (struct target_ops) <to_insn_history, to_insn_history_from,
6285 to_insn_history_range>: Use gdb_disassembly_flags instead of bare
6286 int.
6287 (target_insn_history, target_insn_history_from)
6288 (target_insn_history_range): Use gdb_disassembly_flags instead of
6289 bare int.
6290
6291 2017-09-04 Simon Marchi <simon.marchi@ericsson.com>
6292
6293 * cli/cli-script.c (build_command_line): For if/while commands,
6294 check whether args is empty.
6295
6296 2017-09-04 Simon Marchi <simon.marchi@ericsson.com>
6297
6298 * cli/cli-script.h (enum misc_command_type): Move from defs.h.
6299 (enum command_control_type): Likewise.
6300 (struct command_line): Likewise.
6301 (free_command_lines): Likewise.
6302 (struct command_lines_deleter): Likewise.
6303 (command_line_up): Likewise.
6304 (read_command_lines): Likewise.
6305 (read_command_lines_1): Likewise.
6306 * defs.h (enum misc_command_type): Move to cli/cli-script.h.
6307 (enum command_control_type): Likewise.
6308 (struct command_line): Likewise.
6309 (free_command_lines): Likewise.
6310 (struct command_lines_deleter): Likewise.
6311 (command_line_up): Likewise.
6312 (read_command_lines): Likewise.
6313 (read_command_lines_1): Likewise.
6314 * breakpoint.h: Include cli/cli-script.h.
6315 * extension-priv.h: Likewise.
6316 * gdbcmd.h: Likewise.
6317
6318 2017-09-04 Pedro Alves <palves@redhat.com>
6319
6320 * ada-lang.c (is_known_support_routine): Move sal declaration to
6321 where it is initialized.
6322 * breakpoint.c (create_internal_breakpoint, init_catchpoint)
6323 (parse_breakpoint_sals, decode_static_tracepoint_spec)
6324 (clear_command, update_static_tracepoint): Remove init_sal
6325 references. Move declarations closer to initializations.
6326 * cli/cli-cmds.c (list_command): Move sal declarations closer to
6327 initializations.
6328 * elfread.c (elf_gnu_ifunc_resolver_stop): Remove init_sal
6329 references. Move sal declarations closer to initializations.
6330 * frame.c (find_frame_sal): Return a symtab_and_line via function
6331 return instead of output parameter. Remove init_sal references.
6332 * frame.h (find_frame_sal): Return a symtab_and_line via function
6333 return instead of output parameter.
6334 * guile/scm-frame.c (gdbscm_frame_sal): Adjust.
6335 * guile/scm-symtab.c (stscm_make_sal_smob): Use in-place new
6336 instead of memset.
6337 (gdbscm_find_pc_line): Remove init_sal reference.
6338 * infcall.c (call_function_by_hand_dummy): Remove init_sal
6339 references. Move declarations closer to initializations.
6340 * infcmd.c (set_step_frame): Update. Move declarations closer to
6341 initializations.
6342 (finish_backward): Remove init_sal references. Move declarations
6343 closer to initializations.
6344 * infrun.c (process_event_stop_test, handle_step_into_function)
6345 (insert_hp_step_resume_breakpoint_at_frame)
6346 (insert_step_resume_breakpoint_at_caller): Likewise.
6347 * linespec.c (create_sals_line_offset, decode_digits_ordinary)
6348 (symbol_to_sal): Likewise.
6349 * probe.c (parse_probes_in_pspace): Remove init_sal reference.
6350 * python/py-frame.c (frapy_find_sal): Move sal declaration closer
6351 to its initialization.
6352 * reverse.c (save_bookmark_command): Use new/delete. Remove
6353 init_sal references. Move declarations closer to initializations.
6354 * source.c (get_current_source_symtab_and_line): Remove brace
6355 initialization.
6356 (set_current_source_symtab_and_line): Now takes the sal by const
6357 reference. Remove brace initialization.
6358 (line_info): Remove init_sal reference.
6359 * source.h (set_current_source_symtab_and_line): Now takes a
6360 symtab_and_line via const reference.
6361 * stack.c (set_current_sal_from_frame): Adjust.
6362 (print_frame_info): Adjust.
6363 (get_last_displayed_sal): Return the sal via function return
6364 instead of via output parameter. Simplify.
6365 (frame_info): Adjust.
6366 * stack.h (get_last_displayed_sal): Return the sal via function
6367 return instead of via output parameter.
6368 * symtab.c (init_sal): Delete.
6369 (find_pc_sect_line): Remove init_sal references. Move
6370 declarations closer to initializations.
6371 (find_function_start_sal): Remove init_sal references. Move
6372 declarations closer to initializations.
6373 * symtab.h (struct symtab_and_line): In-class initialize all
6374 fields.
6375 * tracepoint.c (set_traceframe_context)
6376 (print_one_static_tracepoint_marker): Remove init_sal references.
6377 Move declarations closer to initializations.
6378 * tui/tui-disasm.c (tui_show_disassem_and_update_source): Adjust.
6379 * tui/tui-stack.c (tui_show_frame_info): Adjust. Move
6380 declarations closer to initializations.
6381 * tui/tui-winsource.c (tui_update_source_window_as_is): Remove
6382 init_sal references. Adjust.
6383
6384 2017-09-04 Pedro Alves <palves@redhat.com>
6385
6386 * ax-gdb.c (agent_command_1): Use range-for.
6387 * break-catch-throw.c (re_set_exception_catchpoint): Update.
6388 * breakpoint.c: Include "common/array-view.h".
6389 (init_breakpoint_sal, create_breakpoint_sal): Change sals
6390 parameter from struct symtabs_and_lines to
6391 array_view<symtab_and_line>. Adjust. Use range-for. Update.
6392 (breakpoint_sals_to_pc): Change sals parameter from struct
6393 symtabs_and_lines to std::vector reference.
6394 (check_fast_tracepoint_sals): Change sals parameter from struct
6395 symtabs_and_lines to std::array_view. Use range-for.
6396 (decode_static_tracepoint_spec): Return a std::vector instead of
6397 symtabs_and_lines. Update.
6398 (create_breakpoint): Update.
6399 (break_range_command, until_break_command, clear_command): Update.
6400 (base_breakpoint_decode_location, bkpt_decode_location)
6401 (bkpt_probe_create_sals_from_location)
6402 (bkpt_probe_decode_location, tracepoint_decode_location)
6403 (tracepoint_probe_decode_location)
6404 (strace_marker_create_sals_from_location): Return a std::vector
6405 instead of symtabs_and_lines.
6406 (strace_marker_create_breakpoints_sal): Update.
6407 (strace_marker_decode_location): Return a std::vector instead of
6408 symtabs_and_lines. Update.
6409 (update_breakpoint_locations): Change struct symtabs_and_lines
6410 parameters to gdb::array_view. Adjust.
6411 (location_to_sals): Return a std::vector instead of
6412 symtabs_and_lines. Update.
6413 (breakpoint_re_set_default): Use std::vector instead of struct
6414 symtabs_and_lines.
6415 (decode_location_default): Return a std::vector instead of
6416 symtabs_and_lines. Update.
6417 * breakpoint.h: Include "common/array-view.h".
6418 (struct breakpoint_ops) <decode_location>: Now returns a
6419 std::vector instead of returning a symtabs_and_lines via output
6420 parameter.
6421 (update_breakpoint_locations): Change sals parameters to use
6422 gdb::array_view.
6423 * cli/cli-cmds.c (edit_command, list_command): Update to use
6424 std::vector and gdb::array_view.
6425 (ambiguous_line_spec): Adjust to use gdb::array_view and
6426 range-for.
6427 (compare_symtabs): Rename to ...
6428 (cmp_symtabs): ... this. Change parameters to symtab_and_line
6429 const reference and adjust.
6430 (filter_sals): Rewrite using std::vector and standard algorithms.
6431 * elfread.c (elf_gnu_ifunc_resolver_return_stop): Simplify.
6432 (jump_command): Update to use std::vector.
6433 * linespec.c (struct linespec_state) <canonical_names>: Update
6434 comment.
6435 (add_sal_to_sals_basic): Delete.
6436 (add_sal_to_sals, filter_results, convert_results_to_lsals)
6437 (decode_line_2, create_sals_line_offset)
6438 (convert_address_location_to_sals, convert_linespec_to_sals)
6439 (convert_explicit_location_to_sals, parse_linespec)
6440 (event_location_to_sals, decode_line_full, decode_line_1)
6441 (decode_line_with_current_source)
6442 (decode_line_with_last_displayed, decode_objc)
6443 (decode_digits_list_mode, decode_digits_ordinary, minsym_found)
6444 (linespec_result::~linespec_result): Adjust to use std::vector
6445 instead of symtabs_and_lines.
6446 * linespec.h (linespec_sals::sals): Now a std::vector.
6447 (struct linespec_result): Use std::vector, bool, and in-class
6448 initialization.
6449 (decode_line_1, decode_line_with_current_source)
6450 (decode_line_with_last_displayed): Return std::vector.
6451 * macrocmd.c (info_macros_command): Use std::vector.
6452 * mi/mi-main.c (mi_cmd_trace_find): Use std::vector.
6453 * probe.c (parse_probes_in_pspace, parse_probes): Adjust to use
6454 std::vector.
6455 * probe.h (parse_probes): Return a std::vector.
6456 * python/python.c (gdbpy_decode_line): Use std::vector and
6457 gdb::array_view.
6458 * source.c (select_source_symtab, line_info): Use std::vector.
6459 * stack.c (func_command): Use std::vector.
6460 * symtab.h (struct symtabs_and_lines): Delete.
6461 * tracepoint.c (tfind_line_command, scope_info): Use std::vector.
6462
6463 2017-09-04 Pedro Alves <palves@redhat.com>
6464
6465 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
6466 unittests/array-view-selftests.c.
6467 (SUBDIR_UNITTESTS_OBS): Add array-view-selftests.o.
6468 * common/array-view.h: New file.
6469 * unittests/array-view-selftests.c: New file.
6470
6471 2017-09-04 Pedro Alves <palves@redhat.com>
6472
6473 * cli/cli-cmds.c (edit_command): Pass message to
6474 ambiguous_line_spec.
6475 (list_command): Pass message to ambiguous_line_spec. Say
6476 "first"/"last" instead of "start" and "end" to be consistent with
6477 the manual.
6478 (ambiguous_line_spec): Add 'format' and vararg parameters. Use
6479 them to print formatted message.
6480
6481 2017-09-04 Pedro Alves <palves@redhat.com>
6482
6483 * btrace.c (ftrace_add_pt): Pass btrace_insn to
6484 ftrace_update_insns by reference instead of pointer.
6485
6486 2017-09-04 Yao Qi <yao.qi@linaro.org>
6487
6488 * i386-go32-tdep.c: Include x86-xstate.h.
6489 (i386_go32_init_abi): Call i386_target_description.
6490 * i386-tdep.c (i386_target_description): Return tdesc_i386_mmx
6491 if xcr0 is X86_XSTATE_X87_MASK.
6492 * i386-tdep.h (tdesc_i386): Remove the declaration.
6493 (tdesc_i386_mmx): Likewise.
6494
6495 2017-09-04 Yao Qi <yao.qi@linaro.org>
6496
6497 * i386-fbsd-tdep.c (i386fbsd_core_read_xcr0): Return
6498 X86_XSTATE_SSE_MASK instead of 0.
6499
6500 2017-09-04 Yao Qi <yao.qi@linaro.org>
6501
6502 * amd64-fbsd-nat.c (amd64fbsd_read_description): Call
6503 i386_target_description.
6504 * i386-fbsd-nat.c (i386fbsd_read_description): Call
6505 i386_target_description.
6506 * i386-tdep.c (i386_gdbarch_init): Likewise.
6507
6508 2017-09-04 Yao Qi <yao.qi@linaro.org>
6509
6510 * amd64-darwin-tdep.c: Include "x86-xstate.h".
6511 (x86_darwin_init_abi_64): Call amd64_target_description.
6512 * amd64-dicos-tdep.c: Likewise.
6513 * amd64-fbsd-nat.c: Likewise.
6514 * amd64-fbsd-tdep.c: Likewise.
6515 * amd64-nbsd-tdep.c: Likewise.
6516 * amd64-obsd-tdep.c: Likewise.
6517 * amd64-sol2-tdep.c: Likewise.
6518 * amd64-windows-tdep.c: Likewise.
6519 * amd64-tdep.h (tdesc_amd64): Remove the declaration.
6520
6521 2017-09-04 Simon Marchi <simon.marchi@ericsson.com>
6522
6523 * btrace.h (btrace_insn_s, DEF_VEC_O (btrace_insn_s)): Remove.
6524 (btrace_function) <insn>: Change type to use std::vector.
6525 * btrace.c (ftrace_debug, ftrace_call_num_insn,
6526 ftrace_find_call, ftrace_new_gap, ftrace_update_function,
6527 ftrace_update_insns, ftrace_compute_global_level_offset,
6528 btrace_stitch_bts, btrace_clear, btrace_insn_get,
6529 btrace_insn_end, btrace_insn_next, btrace_insn_prev): Adjust to
6530 change to std::vector.
6531 (ftrace_update_insns): Adjust to change to std::vector, change
6532 type of INSN parameter.
6533 (btrace_compute_ftrace_bts): Adjust call to ftrace_update_insns.
6534 * record-btrace.c (btrace_call_history_insn_range,
6535 btrace_compute_src_line_range,
6536 record_btrace_frame_prev_register): Adjust to change to
6537 std::vector.
6538 * python/py-record-btrace.c (recpy_bt_func_instructions): Adjust
6539 to change to std::vector.
6540
6541 2017-09-03 Tom Tromey <tom@tromey.com>
6542
6543 * corefile.c (reopen_exec_file): Use std::string.
6544
6545 2017-09-03 Tom Tromey <tom@tromey.com>
6546
6547 * compile/compile.c (compile_register_name_mangled): Return
6548 std::string.
6549 * compile/compile-loc2c.c (pushf_register_address): Update.
6550 (pushf_register): Update.
6551 * compile/compile-c-types.c (convert_array): Update.
6552 * compile/compile-c-symbols.c (generate_vla_size): Update.
6553 (error_symbol_once): Use a gdb::unique_xmalloc_ptr.
6554 (symbol_substitution_name): Return a gdb::unique_xmalloc_ptr.
6555 (convert_one_symbol): Update.
6556 (generate_c_for_for_one_variable): Update.
6557 * compile/compile-c-support.c (c_get_range_decl_name): Return a
6558 std::string.
6559 (generate_register_struct): Update.
6560 * compile/compile-internal.h (c_get_range_decl_name): Return a
6561 std::string.
6562 (compile_register_name_mangled): Return std::string.
6563
6564 2017-09-03 Tom Tromey <tom@tromey.com>
6565
6566 * utils.c (perror_string): Return a std::string.
6567 (throw_perror_with_name, perror_warning_with_name): Update.
6568
6569 2017-09-03 Tom Tromey <tom@tromey.com>
6570
6571 * demangle.c (demangle_command): Use std::string,
6572 unique_xmalloc_ptr.
6573
6574 2017-09-03 Tom Tromey <tom@tromey.com>
6575
6576 * cli/cli-setshow.c (do_set_command): Use std::string.
6577
6578 2017-09-03 Tom Tromey <tom@tromey.com>
6579
6580 * cli/cli-cmds.c (cd_command): Use gdb::unique_xmalloc_ptr.
6581
6582 2017-09-03 Tom Tromey <tom@tromey.com>
6583
6584 * mi/mi-interp.c (mi_cmd_interpreter_exec): Use std::string.
6585
6586 2017-09-03 Tom Tromey <tom@tromey.com>
6587
6588 * mi/mi-cmd-env.c (env_execute_cli_command): Use
6589 gdb::unique_xmalloc_ptr.
6590
6591 2017-09-03 Tom Tromey <tom@tromey.com>
6592
6593 * thread.c (print_thread_info_1): Use string_printf.
6594 (thread_apply_command, thread_apply_all_command): Use
6595 std::string.
6596
6597 2017-09-03 Tom Tromey <tom@tromey.com>
6598
6599 * valprint.c (val_print_string): Update.
6600 * gdbcore.h (memory_error_message): Return std::string.
6601 * corefile.c (memory_error_message): Return std::string.
6602 (memory_error): Update.
6603 * breakpoint.c (insert_bp_location): Update.
6604
6605 2017-09-03 Simon Marchi <simon.marchi@ericsson.com>
6606
6607 * target/waitstatus.h (target_waitstatus_to_string): Change
6608 return type to std::string.
6609 * target/waitstatus.c (target_waitstatus_to_string): Return
6610 std::string.
6611 * target.h (target_waitstatus_to_string): Remove declaration.
6612 * infrun.c (resume, clear_proceed_status_thread,
6613 print_target_wait_results, do_target_wait, save_waitstatus,
6614 stop_all_threads): Adjust.
6615 * record-btrace.c (record_btrace_wait): Adjust.
6616 * target-debug.h
6617 (target_debug_print_struct_target_waitstatus_p): Adjust.
6618
6619 2017-09-01 Jan Kratochvil <jan.kratochvil@redhat.com>
6620
6621 PR gdb/22046
6622 * nat/linux-procfs.c (parse_proc_status_state): Fix PROC_STATE_STOPPED
6623 detection.
6624
6625 2017-08-31 Sergio Durigan Junior <sergiodj@redhat.com>
6626
6627 * NEWS (Changes since GDB 8.0): Add entry mentioning new support
6628 for setting/unsetting environment variables on the remote target.
6629 (New remote packets): Add entries for QEnvironmentHexEncoded,
6630 QEnvironmentUnset and QEnvironmentReset.
6631 * common/environ.c (gdb_environ::operator=): Extend method to
6632 handle m_user_set_env_list and m_user_unset_env_list.
6633 (gdb_environ::clear): Likewise.
6634 (match_var_in_string): Change type of first parameter from 'char
6635 *' to 'const char *'.
6636 (gdb_environ::set): Extend method to handle
6637 m_user_set_env_list and m_user_unset_env_list.
6638 (gdb_environ::unset): Likewise.
6639 (gdb_environ::clear_user_set_env): New method.
6640 (gdb_environ::user_set_envp): Likewise.
6641 (gdb_environ::user_unset_envp): Likewise.
6642 * common/environ.h (gdb_environ): Handle m_user_set_env_list and
6643 m_user_unset_env_list on move constructor/assignment.
6644 (unset): Add new default parameter 'update_unset_list = true'.
6645 (clear_user_set_env): New method.
6646 (user_set_envp): Likewise.
6647 (user_unset_envp): Likewise.
6648 (m_user_set_env_list): New std::set.
6649 (m_user_unset_env_list): Likewise.
6650 * common/rsp-low.c (hex2str): New function.
6651 (bin2hex): New overload for bin2hex function.
6652 * common/rsp-low.c (hex2str): New prototype.
6653 (str2hex): New overload prototype.
6654 * remote.c: Include "environ.h". Add QEnvironmentHexEncoded,
6655 QEnvironmentUnset and QEnvironmentReset.
6656 (remote_protocol_features): Add QEnvironmentHexEncoded,
6657 QEnvironmentUnset and QEnvironmentReset packets.
6658 (send_environment_packet): New function.
6659 (extended_remote_environment_support): Likewise.
6660 (extended_remote_create_inferior): Call
6661 extended_remote_environment_support.
6662 (_initialize_remote): Add QEnvironmentHexEncoded,
6663 QEnvironmentUnset and QEnvironmentReset packet configs.
6664 * unittests/environ-selftests.c (gdb_selftest_env_var):
6665 New variable.
6666 (test_vector_initialization): New function.
6667 (test_init_from_host_environ): Likewise.
6668 (test_reinit_from_host_environ): Likewise.
6669 (test_set_A_unset_B_unset_A_cannot_find_A_can_find_B):
6670 Likewise.
6671 (test_unset_set_empty_vector): Likewise.
6672 (test_vector_clear): Likewise.
6673 (test_std_move): Likewise.
6674 (test_move_constructor):
6675 (test_self_move): Likewise.
6676 (test_set_unset_reset): Likewise.
6677 (run_tests): Rewrite in terms of the functions above.
6678
6679 2017-08-31 Weimin Pan <weimin.pan@oracle.com>
6680
6681 * sparc64-tdep.c (adi_stat_t): Fix comment formatting.
6682 (adi_available): Use a temp variable of type CORE_ADDR as argument
6683 3 when calling target_auxv_search.
6684 (adi_normalize_address): Use masks and xor operators to calculate
6685 normalized address.
6686 (adi_read_versions, adi_write_versions, adi_print_versions)
6687 (do_examine, do_assign): Use paddress.
6688
6689 2017-08-29 John Baldwin <jhb@FreeBSD.org>
6690
6691 * mips-fbsd-nat.c (getfpregs_supplies): Return true for FIR.
6692 * mips-fbsd-tdep.c (mips_fbsd_supply_fpregs): Split supply of FSR
6693 out of loop and add supply of FIR.
6694 (mips_fbsd_collect_fpregs): Split collect of FSR out of loop and
6695 add collect of FIR.
6696
6697 2017-08-28 Simon Marchi <simon.marchi@ericsson.com>
6698
6699 PR gdb/21827
6700 * cli/cli-script.c (define_command): Don't convert command name
6701 to lower case.
6702
6703 2017-08-25 Joel Brobecker <brobecker@adacore.com>
6704
6705 * ada-lang.c (ada_lookup_struct_elt_type): Remove parameter "dispp".
6706 Update all callers accordingly. Remove all code blocks handling
6707 the case where DISPP is not NULL.
6708
6709 2017-08-24 Jan Kratochvil <jan.kratochvil@redhat.com>
6710
6711 PR symtab/22003
6712 * dwarf2read.c (dwarf2_const_value_attr, dump_die_shallow)
6713 (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
6714 (skip_form_bytes, attr_form_is_constant): Handle DW_FORM_implicit_const.
6715
6716 2017-08-24 Jan Kratochvil <jan.kratochvil@redhat.com>
6717
6718 * dwarf2read.c (build_type_psymtabs_reader): New prototype.
6719 (process_psymtab_comp_unit): Accept IS_DEBUG_TYPES.
6720 (read_comp_units_from_section): New parameter abbrev_section, use
6721 read_and_check_comp_unit_head, allocate signatured_type if needed.
6722 (create_all_comp_units): Update read_comp_units_from_section caller.
6723
6724 2017-08-23 Pedro Alves <palves@redhat.com>
6725
6726 PR remote/21852
6727 * remote.c (add_current_inferior_and_thread): Set inferior_ptid
6728 to null_ptid and switch to thread without reading the registers
6729 after adding the inferior.
6730
6731 2017-08-23 Jan Kratochvil <jan.kratochvil@redhat.com>
6732
6733 * NEWS (Changes since GDB 8.0): Add set compile-gcc and show
6734 compile-gcc.
6735 * compile/compile.c (compile_gcc, show_compile_gcc): New.
6736 (compile_to_object): Implement compile_gcc.
6737 (_initialize_compile): Install "set compile-gcc". Initialize
6738 compile_gcc.
6739
6740 2017-08-23 Jan Kratochvil <jan.kratochvil@redhat.com>
6741
6742 * compile/compile.c (compile_to_object): Conditionally call
6743 set_verbose. Conditionally call compile or compile_v0.
6744
6745 2017-08-07 Weimin Pan <weimin.pan@oracle.com>
6746
6747 * sparc64-tdep.h: (adi_normalize_address): New export.
6748 * sparc-nat.h: (open_adi_tag_fd): New export.
6749 * sparc64-linux-nat.c: (open_adi_tag_fd): New function.
6750 * sparc64-linux-tdep.c:
6751 (SEGV_ACCADI, SEGV_ADIDERR, SEGV_ADIPERR) New defines.
6752 (sparc64_linux_handle_segmentation_fault): New function.
6753 (sparc64_linux_init_abi): Register
6754 sparc64_linux_handle_segmentation_fault
6755 * sparc64-tdep.c: Include cli-utils.h,gdbcmd.h,auxv.h.
6756 (sparc64_addr_bits_remove): New function.
6757 (sparc64_init_abi): Register sparc64_addr_bits_remove.
6758 (MAX_PROC_NAME_SIZE): New macro.
6759 (AT_ADI_BLKSZ, AT_ADI_NBITS, AT_ADI_UEONADI) New defines.
6760 (sparc64adilist): New variable.
6761 (adi_proc_list): New variable.
6762 (find_adi_info): New function.
6763 (add_adi_info): New function.
6764 (get_adi_info_proc): New function.
6765 (get_adi_info): New function.
6766 (info_adi_command): New function.
6767 (read_maps_entry): New function.
6768 (adi_available): New function.
6769 (adi_normalize_address): New function.
6770 (adi_align_address): New function.
6771 (adi_convert_byte_count): New function.
6772 (adi_tag_fd): New function.
6773 (adi_is_addr_mapped): New function.
6774 (adi_read_versions): New function.
6775 (adi_write_versions): New function.
6776 (adi_print_versions): New function.
6777 (do_examine): New function.
6778 (do_assign): New function.
6779 (adi_examine_command): New function.
6780 (adi_assign_command): New function.
6781 (_initialize_sparc64_adi_tdep): New function.
6782
6783 2017-08-22 Simon Marchi <simon.marchi@ericsson.com>
6784
6785 * breakpoint.c (breakpoints_info): Rename to ...
6786 (info_breakpoints_command): ... this.
6787 (watchpoints_info): Rename to ...
6788 (info_watchpoints_command): ... this.
6789 (tracepoints_info): Rename to ...
6790 (info_tracepoints_command): ... this.
6791 (_initialize_breakpoint): Adjust.
6792 * dcache.c (dcache_info): Rename to ...
6793 (info_display_command): ... this.
6794 (_initialize_dcache): Adjust.
6795 * frame.h (args_info): Rename to ...
6796 (info_args_command): ... this.
6797 (locals_info): Rename to ...
6798 (info_locals_command): ... this.
6799 * infcmd.c (nofp_registers_info): Rename to ...
6800 (info_registers_command): ... this.
6801 (float_info): Rename to ...
6802 (info_float_command): ... this.
6803 (program_info): Rename to ...
6804 (info_program_command): ... this.
6805 (all_registers_info): Rename to ...
6806 (info_all_registers_command): ... this.
6807 (vector_info): Rename to ...
6808 (info_vector_command): ... this.
6809 (float_info): Rename to ...
6810 (info_float_command): ... this.
6811 (_initialize_infcmd): Adjust.
6812 * inferior.h (term_info): Rename to ...
6813 (info_terminal_command): ... this.
6814 * inflow.c (term_info): Rename to ...
6815 (info_terminal_command): ... this.
6816 (_initialize_inflow): Adjust.
6817 * infrun.c (signals_info): Rename to ...
6818 (info_signals_command): ... this.
6819 (_initialize_infrun): Adjust.
6820 * objc-lang.c (classes_info): Rename to ...
6821 (info_classes_command): ... this.
6822 (selectors_info): Rename to ...
6823 (info_selectors_command): ... this.
6824 (_initialize_objc_language): Adjust.
6825 * printcmd.c (sym_info): Rename to ...
6826 (info_symbol_command): ... this.
6827 (address_info): Rename to ...
6828 (info_address_command): ... this.
6829 (display_info): Rename to ...
6830 (info_display_command): ... this.
6831 (_initialize_printcmd): Adjust.
6832 * reverse.c (bookmarks_info): Rename to ...
6833 (info_breakpoints_command): ... this.
6834 (_initialize_reverse): Adjust.
6835 * ser-go32.c (dos_info): Rename to ...
6836 (info_serial_command): ... this.
6837 (_initialize_ser_dos): Adjust.
6838 * skip.c (skip_info): Rename to ...
6839 (info_skip_command): ... this.
6840 (_initialize_step_skip): Adjust.
6841 * source.c (line_info): Rename to ...
6842 (info_line_command): ... this.
6843 (source_info): Rename to ...
6844 (info_source_command)
6845 * stack.c (frame_info): Rename to ...
6846 (info_frame_command): ... this.
6847 (locals_info): Rename to ...
6848 (info_locals_command): ... this.
6849 (args_info): Rename to ...
6850 (info_args_command): ... this.
6851 (_initialize_stack): Adjust.
6852 * symtab.c (sources_info): Rename to ...
6853 (info_sources_command): ... this.
6854 (variables_info): Rename to ...
6855 (info_variables_command): ... this.
6856 (functions_info): Rename to ...
6857 (info_functions_command): ... this.
6858 (types_info): Rename to ...
6859 (info_types_command): ... this.
6860 (_initialize_symtab): Adjust.
6861 * target.c (target_info): Rename to ...
6862 (info_target_command): ... this.
6863 (initialize_targets): Adjust.
6864 * tracepoint.c (tvariables_info): Rename to ...
6865 (info_tvariables_command): ... this.
6866 (scope_info): Rename to ...
6867 (info_scope_command): ... this.
6868 (trace_dump_actions): Adjust.
6869 (_initialize_tracepoint): Adjust.
6870
6871 2017-08-22 Tom Tromey <tom@tromey.com>
6872
6873 * breakpoint.h (install_breakpoint): Update.
6874 * breakpoint.c (add_solib_catchpoint): Update.
6875 (install_breakpoint): Change argument to a std::unique_ptr.
6876 (create_fork_vfork_event_catchpoint): Use std::unique_ptr.
6877 (create_breakpoint_sal, create_breakpoint): Update.
6878 (watch_command_1, catch_exec_command_1)
6879 (strace_marker_create_breakpoints_sal): Use std::unique_ptr.
6880 (add_to_breakpoint_chain): Change argument to a std::unique_ptr.
6881 Return the breakpoint.
6882 (set_raw_breakpoint_without_location, set_raw_breakpoint)
6883 (new_single_step_breakpoint): Update.
6884 * break-catch-throw.c (handle_gnu_v3_exceptions): Use
6885 std::unique_ptr.
6886 * break-catch-syscall.c (create_syscall_event_catchpoint): Use
6887 std::unique_ptr.
6888 * break-catch-sig.c (create_signal_catchpoint): Use
6889 std::unique_ptr.
6890 * ada-lang.c (create_ada_exception_catchpoint): Use
6891 std::unique_ptr.
6892
6893 2017-08-22 Tom Tromey <tom@tromey.com>
6894
6895 * breakpoint.c (add_solib_catchpoint): Use std::unique_ptr.
6896
6897 2017-08-22 Tom Tromey <tom@tromey.com>
6898
6899 * psymtab.c (psymtab_search_name): Return a unique_xmalloc_ptr.
6900 (lookup_partial_symbol): Update.
6901
6902 2017-08-22 Tom Tromey <tom@tromey.com>
6903
6904 * source.h (rewrite_source_path): Return a unique_xmalloc_ptr.
6905 * source.c (rewrite_source_path): Return a unique_xmalloc_ptr.
6906 (find_and_open_source, symtab_to_fullname): Update.
6907 * psymtab.c (psymtab_to_fullname): Update.
6908
6909 2017-08-22 Tom Tromey <tom@tromey.com>
6910
6911 * exec.c (exec_file_attach): Update.
6912 * linux-thread-db.c (try_thread_db_load): Update.
6913 * guile/scm-safe-call.c (gdbscm_safe_source_script): Update.
6914 * utils.c (gdb_realpath): Change return type.
6915 (gdb_realpath_keepfile): Update.
6916 (gdb_realpath_check_trailer, gdb_realpath_tests): New functions.
6917 (_initialize_utils): Register the new self test.
6918 * source.c (openp): Update.
6919 (find_and_open_source): Update.
6920 * nto-tdep.c (nto_find_and_open_solib): Update.
6921 * main.c (set_gdb_data_directory): Update.
6922 (captured_main_1): Update.
6923 * dwarf2read.c (dwarf2_get_dwz_file): Update
6924 (dw2_map_symbol_filenames): Update.
6925 * auto-load.c (auto_load_safe_path_vec_update): Update.
6926 (filename_is_in_auto_load_safe_path_vec): Change type of
6927 "filename_realp".
6928 (auto_load_objfile_script): Update.
6929 (file_is_auto_load_safe): Update. Use std::string.
6930 * utils.h (gdb_realpath): Return a gdb::unique_xmalloc_ptr.
6931
6932 2017-08-22 Tom Tromey <tom@tromey.com>
6933
6934 * utils.c (gdb_realpath_keepfile): Return a
6935 gdb::unique_xmalloc_ptr.
6936 * exec.c (exec_file_attach): Update.
6937 * utils.h (gdb_realpath_keepfile): Return a
6938 gdb::unique_xmalloc_ptr.
6939
6940 2017-08-22 Tom Tromey <tom@tromey.com>
6941
6942 * compile/compile.c (compile_file_command): Use
6943 gdb::unique_xmalloc_ptr, std::string.
6944 * utils.c (gdb_abspath): Change return type.
6945 * source.c (openp): Update.
6946 * objfiles.c (allocate_objfile): Update.
6947 * main.c (set_gdb_data_directory): Update.
6948 * utils.h (gdb_abspath): Return a gdb::unique_xmalloc_ptr.
6949
6950 2017-08-22 Zhouyi Zhou <zhouzhouyi@gmail.com>
6951
6952 * cli-cmds.c (list_commands): List actual code around more than
6953 one location.
6954
6955 2017-08-21 John Baldwin <jhb@FreeBSD.org>
6956
6957 * fbsd-nat.c (fbsd_add_threads): Use array type for `lwps'.
6958
6959 2017-08-21 Pedro Alves <palves@redhat.com>
6960
6961 PR gdb/19487
6962 * c-exp.y (variable production): Handle function aliases.
6963 * minsyms.c (msymbol_is_text): New function.
6964 * minsyms.h (msymbol_is_text): Declare.
6965 * symtab.c (find_function_alias_target): New function.
6966 * symtab.h (find_function_alias_target): Declare.
6967
6968 2017-08-21 Pedro Alves <palves@redhat.com>
6969
6970 * eval.c (evaluate_subexp_standard) <OP_TYPE>: Don't dig past
6971 typedefs.
6972 * typeprint.c (whatis_exp): If handling "whatis", and expression
6973 is OP_TYPE, strip one typedef level. Otherwise don't strip
6974 typedefs here.
6975 * valops.c (value_cast): Save "to" type before resolving
6976 stubs/typedefs. Use that type as resulting value's type.
6977
6978 2017-08-18 Tom Tromey <tom@tromey.com>
6979 Pedro Alves <palves@redhat.com>
6980
6981 * spu-multiarch.c (parse_spufs_run): Use scoped_restore.
6982 * sol-thread.c (sol_thread_resume, sol_thread_wait)
6983 (sol_thread_xfer_partial, rw_common): Use scoped_restore.
6984 * procfs.c (procfs_do_thread_registers): Use scoped_restore.
6985 * proc-service.c (ps_xfer_memory): Use scoped_restore.
6986 * linux-tdep.c (linux_corefile_thread): Remove a cleanup.
6987 (linux_get_siginfo_data): Add "thread" argument. Use
6988 scoped_restore.
6989 * linux-nat.c (linux_child_follow_fork)
6990 (check_stopped_by_watchpoint): Use scoped_restore.
6991 * infrun.c (displaced_step_prepare_throw, write_memory_ptid)
6992 (THREAD_STOPPED_BY, handle_signal_stop): Use scoped_restore.
6993 (restore_inferior_ptid, save_inferior_ptid): Remove.
6994 * btrace.c (btrace_fetch): Use scoped_restore.
6995 * bsd-uthread.c (bsd_uthread_fetch_registers)
6996 (bsd_uthread_store_registers): Use scoped_restore.
6997 * breakpoint.c (reattach_breakpoints, detach_breakpoints): Use
6998 scoped_restore.
6999 * aix-thread.c (aix_thread_resume, aix_thread_wait)
7000 (aix_thread_xfer_partial): Use scoped_restore.
7001 * inferior.h (save_inferior_ptid): Remove.
7002
7003 2017-08-18 Yao Qi <yao.qi@linaro.org>
7004
7005 PR tdep/21818
7006 * arm-tdep.c (gdb_print_insn_arm): Mark
7007 USER_SPECIFIED_MACHINE_TYPE if exec_bfd isn't NULL.
7008
7009 2017-08-18 Yao Qi <yao.qi@linaro.org>
7010
7011 * NEWS: Mention GDBserver's new option "--selftest".
7012 * Makefile.in (SFILES): Remove selftest.c, add common/selftest.c.
7013 * selftest.c: Move it to common/selftest.c.
7014 * selftest.h: Move it to common/selftest.h.
7015 * selftest-arch.c (reset): New function.
7016 (tests_with_arch): Call reset.
7017
7018 2017-08-18 Yao Qi <yao.qi@linaro.org>
7019
7020 * selftest.c (run_tests): Don't call QUIT. Call debug_printf
7021 instead of exception_fprintf and printf_filtered.
7022
7023 2017-08-18 Yao Qi <yao.qi@linaro.org>
7024
7025 * selftest.c (register_self_test): Rename it to
7026 selftests::register_test.
7027 (run_self_tests): selftest::run_tests.
7028 * selftest.h: Update declarations.
7029 * selftest-arch.c (register_self_test_foreach_arch): Rename it to
7030 selftests::register_test_foreach_arch.
7031 * selftest-arch.h: Update declaration.
7032 * aarch64-tdep.c: Update.
7033 * arm-tdep.c: Likewise.
7034 * disasm-selftests.c: Likewise.
7035 * dwarf2loc.c: Likewise.
7036 * dwarf2-frame.c: Likewise.
7037 * findvar.c: Likewise.
7038 * gdbarch-selftests.c: Likewise.
7039 * maint.c (maintenance_selftest): Likewise.
7040 * regcache.c: Likewise.
7041 * rust-exp.y: Likewise.
7042 * selftest-arch.c: Likewise.
7043 * unittests/environ-selftests.c: Likewise.
7044 * unittests/function-view-selftests.c: Likewise.
7045 * unittests/offset-type-selftests.c: Likewise.
7046 * unittests/optional-selftests.c: Likewise.
7047 * unittests/scoped_restore-selftests.c: Likewise.
7048 * utils-selftests.c: Likewise.
7049
7050 2017-08-17 Pedro Alves <palves@redhat.com>
7051
7052 * cli/cli-cmds.c (source_command): Delete 'old_source_verbose'
7053 local.
7054
7055 2017-08-17 Pedro Alves <palves@redhat.com>
7056
7057 * dwarf2read.c (struct dwarf2_cu) <line_header_die_owner>: New
7058 field.
7059 (reset_die_in_process): Delete, replaced by ...
7060 (process_die_scope): ... this new class. Make it responsible for
7061 freeing cu->line_header too.
7062 (process_die): Use process_die_scope.
7063 (handle_DW_AT_stmt_list): Record the line header's owner CU/DIE in
7064 cu->line_header_die_owner. Don't release the line header if it's
7065 owned by the CU.
7066 (setup_type_unit_groups): Make the CU/DIE own the line header.
7067 Don't release the line header here.
7068
7069 2017-08-17 Alex Lindsay <alexlindsay239@gmail.com> (tiny change)
7070
7071 * elfread.c (elf_read_minimal_symbols): xfree synthsyms.
7072
7073 2017-08-17 Ruslan Kabatsayev <b7.10110111@gmail.com>
7074
7075 * NEWS: Mention new shortcuts for nexti and stepi in TUI
7076 Single-Key mode
7077
7078 2017-08-16 Ruslan Kabatsayev <b7.10110111@gmail.com>
7079
7080 * tui/tui.c (tui_commands): Add "nexti" and "stepi" to the Single-Key
7081 mode command list.
7082
7083 2017-08-15 Stafford Horne <shorne@gmail.com>
7084
7085 * MAINTAINERS (Write After Approval): Add Stafford Horne.
7086
7087 2017-08-15 Stafford Horne <shorne@gmail.com>
7088
7089 * xtensa-tdep.c (xtensa_init_reggroups): Use xstrdup for cpname.
7090
7091 2017-08-15 Sergio Durigan Junior <sergiodj@redhat.com>
7092
7093 PR gdb/21954
7094 * infcmd.c (unset_environment_command): Use the 'clear' method on
7095 the environment instead of resetting it.
7096
7097 2017-08-15 John Baldwin <jhb@FreeBSD.org>
7098
7099 * fbsd-nat.c (fbsd_convert_siginfo): Fix compile on big-endian
7100 platforms.
7101
7102 2017-08-14 Tom Tromey <tom@tromey.com>
7103
7104 * valprint.c (print_octal_chars): Use HOST_CHAR_BIT.
7105 (print_binary_chars): Likewise.
7106 (BITS_IN_BYTES): Remove.
7107
7108 2017-08-14 Tom Tromey <tom@tromey.com>
7109
7110 PR gdb/21675
7111 * valprint.c (LOW_ZERO): Change value to 034.
7112 (print_octal_chars): Add static_asserts for octal constants.
7113 * printcmd.c (print_scalar_formatted): Add 'd' case.
7114
7115 2017-08-11 Tom Tromey <tom@tromey.com>
7116
7117 * symfile.c (add_symbol_file_command): Use std::vector.
7118
7119 2017-08-14 Tom Tromey <tom@tromey.com>
7120
7121 * break-catch-throw.c (handle_gnu_v3_exceptions): Use std::move.
7122 * break-catch-syscall.c (create_syscall_event_catchpoint): Use
7123 std::move.
7124 * break-catch-sig.c (create_signal_catchpoint): Use std::move.
7125
7126 2017-08-11 Pedro Alves <palves@redhat.com>
7127
7128 * infrun.c (process_event_stop_test): Adjust
7129 function_name_is_marked_for_skip call.
7130 * skip.c: Include <list>.
7131 (skiplist_entry): Make it a class with private fields, and
7132 getters/setters.
7133 (skiplist_entry_chain): Delete.
7134 (skiplist_entries): New.
7135 (skiplist_entry_count): Delete.
7136 (highest_skiplist_entry_num): New.
7137 (ALL_SKIPLIST_ENTRIES, ALL_SKIPLIST_ENTRIES_SAFE): Delete.
7138 (add_skiplist_entry): Delete.
7139 (skiplist_entry::skiplist_entry): New.
7140 (skiplist_entry::add_entry): New.
7141 (skip_file_command, skip_function): Adjust.
7142 (compile_skip_regexp): Delete.
7143 (skip_command): Don't compile regexp here. Adjust to use
7144 skiplist_entry::add_entry.
7145 (skip_info): Adjust to use range-for and getters.
7146 (skip_enable_command, skip_disable_command): Adjust to use
7147 range-for and setters.
7148 (skip_delete_command): Adjust to use std::list.
7149 (add_skiplist_entry): Delete.
7150 (skip_file_p): Delete, refactored as ...
7151 (skiplist_entry::do_skip_file_p): ... this new method.
7152 (skip_gfile_p): Delete, refactored as ...
7153 (skiplist_entry::do_gskip_file_p): ... this new method.
7154 (skip_function_p, skip_rfunction_p): Delete, refactored as ...
7155 (skiplist_entry::skip_function_p): ... this new method.
7156 (function_name_is_marked_for_skip): Now returns bool, and takes
7157 the function sal by const reference. Adjust to use range-for and
7158 skiplist_entry methods.
7159 (_initialize_step_skip): Remove references to
7160 skiplist_entry_chain, skiplist_entry_count.
7161 * skip.h (function_name_is_marked_for_skip): Now returns bool, and
7162 takes the function sal by const reference.
7163
7164 2017-08-11 Yao Qi <yao.qi@linaro.org>
7165
7166 * dwarf2-frame.c (clear_pointer_cleanup): Remove.
7167 (dwarf2_frame_cache): Remove reset_cache_cleanup.
7168 (dwarf2_frame_cache):
7169 * frame-unwind.c (frame_unwind_try_unwinder): Catch
7170 RETURN_MASK_ALL and set *this_case to NULL.
7171 * frame-unwind.h: Update comments.
7172
7173 2017-08-11 Yao Qi <yao.qi@linaro.org>
7174
7175 * dwarf2-frame.c (dwarf2_frame_state_alloc_regs): Remove.
7176 (dwarf2_frame_state_copy_regs): Remove.
7177 (dwarf2_frame_state_free_regs): Remove.
7178 (dwarf2_frame_state::~dwarf2_frame_state): Remove.
7179 (dwarf2_restore_rule): Call method .alloc_regs instead of
7180 dwarf2_frame_state_alloc_regs.
7181 (execute_cfa_program): Likewise. Call dwarf2_frame_state_reg_info
7182 constructor. Call std::move.
7183 (dwarf2_fetch_cfa_info): Don't call dwarf2_frame_state_copy_regs.
7184 (dwarf2_frame_cache): Likewise.
7185
7186 [GDB_SELF_TEST]: Include selftest.h and
7187 selftest-arch.h.
7188 [GDB_SELF_TEST] (execute_cfa_program_test): New function.
7189 (_initialize_dwarf2_frame) [GDB_SELF_TEST]: Register
7190 execute_cfa_program_test.
7191
7192 * dwarf2-frame.h (dwarf2_frame_state_reg_info): Add ctor, dtor,
7193 copy ctor, assignment operator, move assignment.
7194 <alloc_regs>: New method.
7195 <swap>: New method.
7196 (struct dwarf2_frame_state): Delete dtor.
7197 (dwarf2_frame_state_alloc_regs): Remove declaration.
7198 * sparc-tdep.c (sparc_execute_dwarf_cfa_vendor_op): Don't call
7199 dwarf2_frame_state_alloc_regs, use .alloc_regs instead.
7200
7201 2017-08-11 Yao Qi <yao.qi@linaro.org>
7202
7203 * dwarf2-frame.c (dwarf2_frame_state_free): Remove.
7204 (dwarf2_frame_state::dwarf2_frame_state): New.
7205 (dwarf2_frame_state::~dwarf2_frame_state): New.
7206 (dwarf2_fetch_cfa_info): Update.
7207 (dwarf2_frame_cache): Remove old_chain. Change 'fs' to an object
7208 rather than a pointer. Update code.
7209 * dwarf2-frame.h (struct dwarf2_frame_state): Declare ctor and
7210 dtor.
7211 <data_align, code_align, retaddr_column>: Change them to const.
7212 <armcc_cfa_offsets_sf, armcc_cfa_offsets_reversed>: Change them
7213 to bool.
7214
7215 2017-08-11 Yao Qi <yao.qi@linaro.org>
7216
7217 * dwarf2-frame.h (struct dwarf2_frame_state_reg) <exp_len>: Remove.
7218 <loc.exp>: New field.
7219 * dwarf2-frame.c (execute_cfa_program): Update.
7220 (dwarf2_frame_prev_register): Update.
7221
7222 2017-08-10 Pedro Alves <palves@redhat.com>
7223
7224 * common/gdb_unique_ptr.h (xfree_deleter<T[]>): Define.
7225
7226 2017-08-09 John Baldwin <jhb@FreeBSD.org>
7227
7228 * fbsd-nat.c (struct fbsd_fork_info): Remove.
7229 (fbsd_pending_children): Use std::list.
7230 (fbsd_remember_child): Likewise.
7231 (fbsd_is_child_pending): Likewise.
7232 (fbsd_pending_vfork_done): Use std::forward_list.
7233 (fbsd_add_vfork_done): Likewise.
7234 (fbsd_is_vfork_done_pending): Likewise.
7235 (fbsd_next_vfork_done): Likewise.
7236
7237 2017-08-09 John Baldwin <jhb@FreeBSD.org>
7238
7239 * fbsd-nat.c [HAVE_KINFO_GETVMMAP] (struct free_deleter): New.
7240 (fbsd_find_memory_regions): Use free_deleter with std::unique_ptr.
7241 [!HAVE_KINFO_GETVMMAP] (fbsd_find_memory_regions): Use std::string
7242 for `mapfilename'.
7243 (fbsd_xfer_partial): Use gdb::byte_vector.
7244 (fbsd_add_threads): Use gdb::unique_xmalloc_ptr.
7245
7246 2017-08-09 John Baldwin <jhb@FreeBSD.org>
7247
7248 * fbsd-nat.c: [!HAVE_KINFO_GETVMMAP]: Include <sys/user.h> and
7249 "filestuff.h".
7250 (fbsd_find_memory_regions): Fix `mapfile' initialization.
7251
7252 2017-08-09 Tom Tromey <tom@tromey.com>
7253
7254 * skip.c (skiplist_entry): New constructor.
7255 (skiplist_entry::enabled, skiplist_entry::function_is_regexp)
7256 (skiplist_entry::file_is_glob): Now bool.
7257 (skiplist_entry::file, skiplist_entry::function): Now
7258 std::string.
7259 (make_skip_entry): Return a unique_ptr. Use new.
7260 (free_skiplist_entry, free_skiplist_entry_cleanup)
7261 (make_free_skiplist_entry_cleanup): Remove.
7262 (skip_command, skip_disable_command, add_skiplist_entry)
7263 (skip_form_bytes, compile_skip_regexp, skip_command, skip_info)
7264 (skip_file_p, skip_gfile_p, skip_function_p, skip_rfunction_p)
7265 (function_name_is_marked_for_skip): Update.
7266 (skip_delete_command): Update. Use delete.
7267
7268 2017-08-09 Jiong Wang <jiong.wang@arm.com>
7269
7270 * aarch64-linux-tdep.c: Include "auxv.h" and "elf/common.h".
7271 (aarch64_linux_core_read_description): New function.
7272 (aarch64_linux_init_abi): Register gdbarch_core_read_description.
7273
7274 2017-08-09 Pedro Alves <palves@redhat.com>
7275
7276 * cp-name-parser.y (cp_comp_to_string): Return a
7277 gdb::unique_xmalloc_ptr<char>.
7278 * cp-support.c (replace_typedefs_qualified_name)
7279 (replace_typedefs): Adjust to use gdb::unique_xmalloc_ptr<char>.
7280 (cp_canonicalize_string_full): Use op= instead of explicit
7281 convertion.
7282 (cp_class_name_from_physname, method_name_from_physname)
7283 (cp_func_name, cp_remove_params): Adjust to use
7284 gdb::unique_xmalloc_ptr<char>.
7285 * cp-support.h (cp_comp_to_string): Return a
7286 gdb::unique_xmalloc_ptr<char>.
7287 * python/py-type.c (typy_lookup_type): Adjust to use
7288 gdb::unique_xmalloc_ptr<char>.
7289
7290 2017-08-09 H.J. Lu <hongjiu.lu@intel.com>
7291
7292 * dwarf2read.c (dwarf2_string_attr): Fix a typo.
7293
7294 2017-08-09 Alex Lindsay <alexlindsay239@gmail.com>
7295 Yao Qi <yao.qi@linaro.org>
7296
7297 * cp-support.c (cp_canonicalize_string_full): Use
7298 gdb::unique_xmalloc_ptr<char>.
7299 (cp_canonicalize_string): Likewise.
7300
7301 2017-08-09 Yao Qi <yao.qi@linaro.org>
7302
7303 * features/Makefile (WHICH): Remove i386/ non-linux stuff.
7304 * regformats/i386/amd64-avx-avx512.dat: Remove.
7305 * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Remove.
7306 * regformats/i386/amd64-avx-mpx.dat:Remove.
7307 * regformats/i386/amd64-avx.dat: Remove.
7308 * regformats/i386/amd64-mpx.dat: Remove.
7309 * regformats/i386/i386-avx-avx512.dat: Remove.
7310 * regformats/i386/i386-avx-mpx-avx512-pku.dat: Remove.
7311 * regformats/i386/i386-avx-mpx.dat: Remove.
7312 * regformats/i386/i386-mmx.dat: Remove.
7313 * regformats/i386/i386-mpx.dat: Remove.
7314
7315 2017-08-09 Yao Qi <yao.qi@linaro.org>
7316
7317 * amd64-tdep.h (tdesc_x32): Remove the declaration.
7318 * amd64-tdep.c: Don't include features/i386/x32*.c.
7319 (_initialize_amd64_tdep): Don't call initialize_tdesc_x32*
7320 functions.
7321 * features/Makefile (WHICH): Remove i386/x32, i386/x32-avx,
7322 and i386/x32-avx-avx512.
7323 (XMLTOC): Remove i386/x32-avx.xml, i386/x32-avx-avx512.xml,
7324 and i386/x32.xml.
7325 * features/i386/x32-avx-avx512.c: Removed.
7326 * features/i386/x32-avx-avx512.xml: Removed.
7327 * features/i386/x32-avx.c: Removed.
7328 * features/i386/x32-avx.xml: Removed.
7329 * features/i386/x32.c: Removed.
7330 * features/i386/x32.xml: Removed.
7331 * regformats/i386/x32-avx-avx512.dat: Removed.
7332 * regformats/i386/x32-avx.dat: Removed.
7333 * regformats/i386/x32.dat: Removed.
7334
7335 2017-08-07 Maciej W. Rozycki <macro@imgtec.com>
7336
7337 PR breakpoints/21886
7338 * mem-break.c (default_memory_insert_breakpoint): Use
7339 `->placed_address' rather than `->reqstd_address' for the
7340 breakpoint location.
7341
7342 2017-08-07 Maciej W. Rozycki <macro@imgtec.com>
7343
7344 * arch-utils.c (default_print_insn): Remove arch/mach/endian
7345 assertions.
7346
7347 2017-08-07 Maciej W. Rozycki <macro@imgtec.com>
7348
7349 * gdbarch.sh (gdbarch_info): Replace the `tdep_info' member with
7350 a union of `tdep_info', `tdesc_data' and `id'.
7351 * aarch64-tdep.c (aarch64_gdbarch_init): Use `info.tdesc_data'
7352 rather than `info.tdep_info'.
7353 * amd64-linux-tdep.c (amd64_linux_init_abi): Likewise.
7354 * i386-linux-tdep.c (i386_linux_init_abi): Likewise.
7355 * i386-tdep.c (i386_gdbarch_init): Likewise.
7356 * mips-linux-tdep.c (mips_linux_init_abi): Likewise.
7357 * mips-tdep.c (mips_gdbarch_init): Likewise.
7358 * nds32-tdep.c (nds32_gdbarch_init): Likewise.
7359 * rs6000-tdep.c (rs6000_gdbarch_init): Likewise.
7360 * ppc-linux-tdep.c (ppu2spu_sniffer): Use `info.id' rather than
7361 `info.tdep_info'.
7362 (ppc_linux_init_abi): Use `info.tdesc_data' rather than
7363 `info.tdep_info'.
7364 * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
7365 * spu-multiarch.c (spu_gdbarch): Use `info.id' rather than
7366 `info.tdep_info'.
7367 * spu-tdep.c (spu_gdbarch_init): Likewise.
7368 * gdbarch.h: Regenerate.
7369
7370 2017-08-07 Leszek Swirski <leszeks@google.com>
7371
7372 PR symtab/20899
7373 * dwarf2read.c (dwarf2_string_attr): Allow DW_FORM_GNU_strp_alt.
7374
7375 2017-08-07 Simon Marchi <simon.marchi@ericsson.com>
7376
7377 * remote-sim.c (gdbsim_load): Remove char **argv local variable.
7378 (gdbsim_open): Rename gdb_argv args object to argv.
7379
7380 2017-08-05 Tom Tromey <tom@tromey.com>
7381
7382 * compile/compile-object-load.c (compile_object_load): Use
7383 gdb::unique_xmalloc_ptr.
7384 * cli/cli-dump.c (scan_filename): Rename from
7385 scan_filename_with_cleanup. Change return type.
7386 (scan_expression): Rename from scan_expression_with_cleanup.
7387 Change return type.
7388 (dump_memory_to_file, dump_value_to_file, restore_command):
7389 Use gdb::unique_xmalloc_ptr. Update.
7390 * cli/cli-cmds.c (find_and_open_script): Use
7391 gdb::unique_xmalloc_ptr.
7392 * tracefile-tfile.c (tfile_open): Use gdb::unique_xmalloc_ptr.
7393 * symmisc.c (maintenance_print_symbols)
7394 (maintenance_print_msymbols): Use gdb::unique_xmalloc_ptr.
7395 * symfile.c (symfile_bfd_open, generic_load)
7396 (add_symbol_file_command, remove_symbol_file_command): Use
7397 gdb::unique_xmalloc_ptr.
7398 * source.c (openp): Use gdb::unique_xmalloc_ptr.
7399 * psymtab.c (maintenance_print_psymbols): Use
7400 gdb::unique_xmalloc_ptr.
7401 * corelow.c (core_open): Use gdb::unique_xmalloc_ptr.
7402 * breakpoint.c (save_breakpoints): Use gdb::unique_xmalloc_ptr.
7403 * solib.c (solib_map_sections): Use gdb::unique_xmalloc_ptr.
7404 (reload_shared_libraries_1): Likewise.
7405
7406 2017-08-05 Tom Tromey <tom@tromey.com>
7407
7408 * rust-exp.y (rust_op_ptr, set_field): Remove typedefs.
7409 (rust_op_vector, rust_set_vector): New typedefs.
7410 (current_parser): New global.
7411 (work_obstack): Change to pointer type. Update all users.
7412 (rust_ast, pstate): Remove globals.
7413 (struct rust_parser): New.
7414 (%union) <params, field_inits>: Change type.
7415 (start, tuple_expr, unit_expr, struct_expr_list, literal)
7416 (field_expr, expr_list, maybe_expr_list, type_list): Update.
7417 (ast_call_ish, ast_path, ast_function_type, ast_tuple_type)
7418 (convert_params_to_types, convert_params_to_expression): Change
7419 type of "params".
7420 (ast_string): Change type of "fields".
7421 (rust_parse): Make a rust_parser. Remove cleanups.
7422 (rust_lex_tests): Make and install an auto_obstack.
7423
7424 2017-08-04 Yao Qi <yao.qi@linaro.org>
7425
7426 * configure.srv (ipa_x32_linux_regobj): New.
7427 * linux-amd64-ipa.c (get_ipa_tdesc): Use X86_TDESC_AVX_AVX512
7428 instead of X86_TDESC_AVX512.
7429 (initialize_low_tracepoint): Call
7430 init_registers_x32_avx_avx512_linux.
7431
7432 2017-08-04 Yao Qi <yao.qi@linaro.org>
7433
7434 * utils.h (gdb_argv): Add namespace std for nullptr_t.
7435
7436 2017-08-03 Ruslan Kabatsayev <b7.10110111@gmail.com>
7437
7438 * MAINTAINERS (Write After Approval): Add Ruslan Kabatsayev.
7439
7440 2017-08-03 Tom Tromey <tom@tromey.com>
7441
7442 * utils.c (make_cleanup_freeargv, do_freeargv, gdb_buildargv):
7443 Remove.
7444 * utils.h (make_cleanup_freeargv, gdb_buildargv): Remove.
7445
7446 2017-08-03 Tom Tromey <tom@tromey.com>
7447
7448 * python/py-param.c (compute_enum_values): Use gdb_argv.
7449
7450 2017-08-03 Tom Tromey <tom@tromey.com>
7451
7452 * utils.h (struct gdb_argv_deleter): New.
7453 (gdb_argv): New class.
7454 * utils.c (gdb_argv::reset): New method.
7455 * tracepoint.c (delete_trace_variable_command): Use gdb_argv.
7456 * tracefile.c (tsave_command): Use gdb_argv.
7457 * top.c (new_ui_command): Use gdb_argv.
7458 * symmisc.c (maintenance_print_symbols)
7459 (maintenance_print_msymbols, maintenance_expand_symtabs): Use gdb_argv.
7460 * symfile.c (symbol_file_command, generic_load)
7461 (remove_symbol_file_command): Use gdb_argv.
7462 * stack.c (backtrace_command): Use gdb_argv.
7463 * source.c (add_path, show_substitute_path_command)
7464 (unset_substitute_path_command, set_substitute_path_command):
7465 Use gdb_argv.
7466 * skip.c (skip_command): Use gdb_argv. Use gdb_buildargv.
7467 * ser-mingw.c (pipe_windows_open): Use gdb_argv.
7468 * remote.c (extended_remote_run, remote_put_command)
7469 (remote_get_command, remote_delete_command): Use gdb_argv.
7470 * remote-sim.c (gdbsim_load, gdbsim_create_inferior)
7471 (gdbsim_open): Use gdb_argv.
7472 * python/py-cmd.c (gdbpy_string_to_argv): Use gdb_argv.
7473 * psymtab.c (maintenance_print_psymbols): Use gdb_argv.
7474 * procfs.c (procfs_info_proc): Use gdb_argv.
7475 * interps.c (interpreter_exec_cmd): Use gdb_argv.
7476 * infrun.c (handle_command): Use gdb_argv.
7477 * inferior.c (add_inferior_command, clone_inferior_command):
7478 Use gdb_argv.
7479 * guile/scm-string.c (gdbscm_string_to_argv): Use gdb_argv.
7480 * exec.c (exec_file_command): Use gdb_argv.
7481 * cli/cli-cmds.c (alias_command): Use gdb_argv.
7482 * compile/compile.c (build_argc_argv): Use gdb_argv.
7483
7484 2017-08-03 Tom Tromey <tom@tromey.com>
7485
7486 * python/python.c (gdbpy_decode_line): Use unique_xmalloc_ptr.
7487
7488 2017-08-03 Tom Tromey <tom@tromey.com>
7489
7490 * python/python.c (compute_python_string): Return std::string.
7491 (gdbpy_eval_from_control_command): Update.
7492 (do_start_initialization): Use std::string.
7493 * python/py-varobj.c (py_varobj_iter_next): Use string_printf, not
7494 xstrprintf.
7495 * python/py-breakpoint.c (local_setattro): Use string_printf, not
7496 xstrprintf.
7497
7498 2017-08-03 Tom Tromey <tom@tromey.com>
7499
7500 * top.h (do_restore_instream_cleanup): Remove.
7501 * top.c (do_restore_instream_cleanup): Remove.
7502 (read_command_file): Use scoped_restore.
7503 * cli/cli-script.c (execute_user_command): Use scoped_restore.
7504
7505 2017-08-03 Tom Tromey <tom@tromey.com>
7506
7507 * cli/cli-script.c (execute_user_command)
7508 (execute_control_command): Use scoped_restore.
7509
7510 2017-08-03 Tom Tromey <tom@tromey.com>
7511
7512 * cli/cli-script.c (do_restore_user_call_depth): Remove.
7513 (execute_user_command): Remove user_call_depth; use
7514 user_args_stack's size instead.
7515
7516 2017-08-03 Tom Tromey <tom@tromey.com>
7517
7518 * top.h (in_user_command): Remove.
7519 * top.c (in_user_command): Remove.
7520 * cli/cli-script.c (do_restore_user_call_depth)
7521 (execute_user_command): Update.
7522
7523 2017-08-03 Tom Tromey <tom@tromey.com>
7524
7525 * valops.c (search_struct_method): Use gdb::byte_vector.
7526 * valarith.c (value_concat): Use std::vector.
7527 * target.c (memory_xfer_partial): Use gdb::byte_vector.
7528 (simple_search_memory): Likewise.
7529 * printcmd.c (find_string_backward): Use gdb::byte_vector.
7530 * mi/mi-main.c (mi_cmd_data_write_memory): Use gdb::byte_vector.
7531 * gcore.c (gcore_copy_callback): Use gdb::byte_vector.
7532 * elfread.c (elf_rel_plt_read): Use std::string.
7533 * cp-valprint.c (cp_print_value): Use gdb::byte_vector.
7534 * cli/cli-dump.c (restore_section_callback): Use
7535 gdb::byte_vector.
7536
7537 2017-08-03 Tom Tromey <tom@tromey.com>
7538
7539 * jit.c (jit_reader_load_command): Use unique_xmalloc_ptr.
7540
7541 2017-08-03 Tom Tromey <tom@tromey.com>
7542
7543 * tui/tui-regs.c (tui_restore_gdbout): Remove.
7544 (tui_register_format): Use scoped_restore.
7545
7546 2017-08-03 Tom Tromey <tom@tromey.com>
7547
7548 * reverse.c (exec_direction_default): Remove.
7549 (exec_reverse_once): Use scoped_restore.
7550 * remote.c (restore_remote_timeout): Remove.
7551 (remote_flash_erase, remote_flash_write, remote_flash_done)
7552 (readchar, remote_serial_write): Use scoped_restore.
7553 * cli/cli-script.c (struct source_cleanup_lines_args)
7554 (source_cleanup_lines): Remove.
7555 (script_from_file): Use scoped_restore.
7556 * cli/cli-cmds.c (source_verbose_cleanup): Remove.
7557 (source_command): Use scoped_restore.
7558
7559 2017-08-03 Tom Tromey <tom@tromey.com>
7560
7561 * utils.h (make_cleanup_free_so): Remove.
7562 * utils.c (do_free_so, make_cleanup_free_so): Remove.
7563 * solist.h (struct so_deleter): New.
7564 (so_list_up): New typedef.
7565 * solib-svr4.c (svr4_read_so_list): Use so_list_up.
7566
7567 2017-08-03 Tom Tromey <tom@tromey.com>
7568
7569 * utils.h (make_cleanup_restore_current_language): Remove.
7570 * utils.c (do_restore_current_language)
7571 (make_cleanup_restore_current_language): Remove.
7572 * parse.c (parse_exp_in_context_1)
7573 (parse_expression_with_language): Use
7574 scoped_restore_current_language.
7575 * mi/mi-main.c (mi_cmd_execute): Use
7576 scoped_restore_current_language.
7577 * language.h (scoped_restore_current_language): New class.
7578
7579 2017-08-03 Tom Tromey <tom@tromey.com>
7580
7581 * compile/compile.c (cleanup_unlink_file): Remove.
7582 (compile_to_object): Use gdb::unlinker.
7583 (eval_compile_command): Likewise.
7584
7585 2017-08-03 Tom Tromey <tom@tromey.com>
7586
7587 * utils.h (make_cleanup_fclose): Remove.
7588 * utils.c (do_fclose_cleanup, make_cleanup_fclose): Remove.
7589
7590 2017-08-03 Tom Tromey <tom@tromey.com>
7591
7592 * top.c (open_terminal_stream): Return gdb_file_up.
7593 (new_ui_command): Update.
7594
7595 2017-08-03 Tom Tromey <tom@tromey.com>
7596
7597 * source.c (print_source_lines_base, forward_search_command)
7598 (reverse_search_command): Use gdb_file_up.
7599
7600 2017-08-03 Tom Tromey <tom@tromey.com>
7601
7602 * fbsd-nat.c (fbsd_find_memory_regions): Update.
7603
7604 2017-08-03 Tom Tromey <tom@tromey.com>
7605
7606 * cli/cli-cmds.c (find_and_open_script): Change return type.
7607 Remove "streamp" and "full_path" parameters.
7608 (source_script_with_search): Update.
7609 * auto-load.c (source_script_file): Update.
7610 * cli/cli-cmds.h (find_and_open_script): Change type.
7611 (open_script): New struct.
7612
7613 2017-08-03 Tom Tromey <tom@tromey.com>
7614
7615 * xml-support.c (xml_fetch_content_from_file): Update.
7616 * ui-file.c (stdio_file::open): Update.
7617 * tracefile-tfile.c (tfile_start): Update.
7618 * remote.c (remote_file_put, remote_file_get): Update.
7619 * nat/linux-procfs.c (linux_proc_get_int)
7620 (linux_proc_pid_get_state, linux_proc_tid_get_name): Update.
7621 * nat/linux-osdata.c (linux_common_core_of_thread): Update.
7622 (command_from_pid, commandline_from_pid, linux_xfer_osdata_cpus)
7623 (print_sockets, linux_xfer_osdata_shm, linux_xfer_osdata_sem)
7624 (linux_xfer_osdata_msg, linux_xfer_osdata_modules): Update.
7625 * nat/linux-btrace.c (linux_determine_kernel_start): Update.
7626 * linux-nat.c (linux_proc_pending_signals): Update.
7627 * dwarf2read.c (write_psymtabs_to_index): Use gdb_file_up.
7628 (file_closer): Remove.
7629 * compile/compile.c (compile_to_object): Update.
7630 * common/filestuff.h (struct gdb_file_deleter): New.
7631 (gdb_file_up): New typedef.
7632 (gdb_fopen_cloexec): Change return type.
7633 * common/filestuff.c (gdb_fopen_cloexec): Return gdb_file_up.
7634 * cli/cli-dump.c (fopen_with_cleanup): Remove.
7635 (dump_binary_file, restore_binary_file): Update.
7636 * auto-load.c (auto_load_objfile_script_1): Update.
7637
7638 2017-08-03 Tom Tromey <tom@tromey.com>
7639
7640 * tracepoint.c (tvariables_info_1): Use ui_out_emit_table.
7641 (info_static_tracepoint_markers_command): Likewise.
7642 * solib.c (info_sharedlibrary_command): Use ui_out_emit_table.
7643 * skip.c (skip_info): Use ui_out_emit_table.
7644 * progspace.c (print_program_space): Use ui_out_emit_table.
7645 * osdata.c (info_osdata): Use ui_out_emit_table.
7646 * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions): Use
7647 ui_out_emit_table.
7648 * linux-thread-db.c (info_auto_load_libthread_db): Use
7649 ui_out_emit_table.
7650 * inferior.c (print_inferior): Use ui_out_emit_table.
7651 * gdb_bfd.c (maintenance_info_bfds): Use ui_out_emit_table.
7652 * breakpoint.c (breakpoint_1): Use ui_out_emit_table.
7653 * auto-load.c (auto_load_info_scripts): Use ui_out_emit_table.
7654 * ada-tasks.c (print_ada_task_info): Use ui_out_emit_table.
7655 * ui-out.h (class ui_out_emit_table): New.
7656
7657 2017-08-02 Maciej W. Rozycki <macro@imgtec.com>
7658
7659 * mips-tdep.c (mips_fpu_type_str): New function.
7660 (mips_dump_tdep): Call it.
7661
7662 2017-08-01 Maciej W. Rozycki <macro@imgtec.com>
7663
7664 * mips-tdep.c (mips_gdbarch_init): Use MIPS_FPU_TYPE to access
7665 `->mips_fpu_type'.
7666
7667 2017-07-31 Xavier Roirand <roirand@adacore.com>
7668
7669 * solib-darwin.c (DYLD_VERSION_MAX): Increase value.
7670
7671 2017-07-27 Xavier Roirand <roirand@adacore.com>
7672
7673 * MAINTAINERS (Write After Approval): Add Xavier Roirand.
7674
7675 2017-07-26 Yao Qi <yao.qi@linaro.org>
7676
7677 * cli/cli-cmds.c (maintenancechecklist): New variable.
7678 * gdbcmd.h (maintenancechecklist): Declare it.
7679 * i386-linux-tdep.c (_initialize_i386_linux_tdep) [GDB_SELF_TEST]:
7680 Call i386_linux_read_description with different masks.
7681 * maint.c (maintenance_check_command): New function.
7682 (_initialize_maint_cmds): Call add_prefix_cmd.
7683 * target-descriptions.c (tdesc_reg): override operator != and ==.
7684 (tdesc_type): Likewise.
7685 (tdesc_feature): Likewise.
7686 (target_desc): Likewise.
7687 [GDB_SELF_TEST] (selftests::record_xml_tdesc): New function.
7688 (maintenance_check_xml_descriptions): New function.
7689 (_initialize_target_descriptions) Add command "xml-descriptions".
7690 * target-descriptions.h (selftests::record_xml_tdesc): Declare.
7691
7692 2017-07-26 Yao Qi <yao.qi@linaro.org>
7693
7694 * i386-linux-tdep.c: Don't include features/i386/i386-*linux.c.
7695 Include features/i386/32bit-*.c.
7696 (i386_linux_read_description): Generate target description if it
7697 doesn't exist.
7698 (_initialize_i386_linux_tdep): Don't call _initialize_tdesc_i386
7699 functions.
7700 * features/i386/32bit-linux.c: Re-generated.
7701 * features/i386/32bit-sse.c: Likewise.
7702 * target-descriptions.c (print_c_feature::visit): Print code to
7703 set register number if needed.
7704 (print_c_feature) <m_next_regnum>: New field.
7705
7706 2017-07-26 Yao Qi <yao.qi@linaro.org>
7707
7708 * features/Makefile (CFILES): Rename with TDESC_CFILES.
7709 (FEATURE_XMLFILES): New.
7710 (FEATURE_CFILES): New.
7711 New rules.
7712 (clean-cfiles): Remove generated c files.
7713 * features/i386/32bit-avx.c: Generated.
7714 * features/i386/32bit-avx512.c: Generated.
7715 * features/i386/32bit-core.c: Generated.
7716 * features/i386/32bit-linux.c: Generated.
7717 * features/i386/32bit-mpx.c: Generated.
7718 * features/i386/32bit-pkeys.c: Generated.
7719 * features/i386/32bit-sse.c: Generated.
7720 * target-descriptions.c: Include algorithm.
7721 (tdesc_element_visitor): Add method visit_end.
7722 (print_c_tdesc): Implement visit_end.
7723 (print_c_tdesc:: m_filename_after_features): Move it to
7724 protected.
7725 (print_c_feature): New class.
7726 (maint_print_c_tdesc_cmd): Use print_c_feature if XML file
7727 name starts with "i386/32bit-".
7728
7729 2017-07-26 Yao Qi <yao.qi@linaro.org>
7730
7731 * target-descriptions.c (tdesc_element_visitor): New class.
7732 (tdesc_element): New class.
7733 (tdesc_reg): Inherit from tdesc_element.
7734 (tdesc_reg::accept): New function.
7735 (tdesc_type): Inherit from tdesc_element.
7736 (tdesc_type::accept): New function.
7737 (tdesc_feature): Inherit from tdesc_element.
7738 (tdesc_feature::accept): New function.
7739 (target_desc): Inherit from tdesc_element.
7740 (target_desc::target_desc): New.
7741 (target_desc::~target_desc): New.
7742 (target_desc::accept): New.
7743 (allocate_target_description): Use new.
7744 (free_target_description): Use delete.
7745 (print_c_tdesc): New class.
7746 (maint_print_c_tdesc_cmd): Adjust.
7747
7748 * features/aarch64.c: Re-generated.
7749 * features/arc-arcompact.c: Re-generated.
7750 * features/arc-v2.c: Re-generated.
7751 * features/arm/arm-with-iwmmxt.c: Re-generated.
7752 * features/arm/arm-with-m.c: Re-generated.
7753 * features/arm/arm-with-m-fpa-layout.c: Re-generated.
7754 * features/arm/arm-with-m-vfp-d16.c: Re-generated.
7755 * features/arm/arm-with-neon.c: Re-generated.
7756 * features/arm/arm-with-vfpv2.c: Re-generated.
7757 * features/arm/arm-with-vfpv3.c: Re-generated.
7758 * features/i386/amd64-avx-avx512.c: Re-generated.
7759 * features/i386/amd64-avx-avx512-linux.c: Re-generated.
7760 * features/i386/amd64-avx.c: Re-generated.
7761 * features/i386/amd64-avx-linux.c: Re-generated.
7762 * features/i386/amd64-avx-mpx-avx512-pku.c: Re-generated.
7763 * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Re-generated.
7764 * features/i386/amd64-avx-mpx.c: Re-generated.
7765 * features/i386/amd64-avx-mpx-linux.c: Re-generated.
7766 * features/i386/amd64.c: Re-generated.
7767 * features/i386/amd64-linux.c: Re-generated.
7768 * features/i386/amd64-mpx.c: Re-generated.
7769 * features/i386/amd64-mpx-linux.c: Re-generated.
7770 * features/i386/i386-avx-avx512.c: Re-generated.
7771 * features/i386/i386-avx-avx512-linux.c: Re-generated.
7772 * features/i386/i386-avx.c: Re-generated.
7773 * features/i386/i386-avx-linux.c: Re-generated.
7774 * features/i386/i386-avx-mpx-avx512-pku.c: Re-generated.
7775 * features/i386/i386-avx-mpx-avx512-pku-linux.c: Re-generated.
7776 * features/i386/i386-avx-mpx.c: Re-generated.
7777 * features/i386/i386-avx-mpx-linux.c: Re-generated.
7778 * features/i386/i386.c: Re-generated.
7779 * features/i386/i386-linux.c: Re-generated.
7780 * features/i386/i386-mmx.c: Re-generated.
7781 * features/i386/i386-mmx-linux.c: Re-generated.
7782 * features/i386/i386-mpx.c: Re-generated.
7783 * features/i386/i386-mpx-linux.c: Re-generated.
7784 * features/i386/x32-avx-avx512.c: Re-generated.
7785 * features/i386/x32-avx-avx512-linux.c: Re-generated.
7786 * features/i386/x32-avx.c: Re-generated.
7787 * features/i386/x32-avx-linux.c: Re-generated.
7788 * features/i386/x32.c: Re-generated.
7789 * features/i386/x32-linux.c: Re-generated.
7790 * features/microblaze.c: Re-generated.
7791 * features/microblaze-with-stack-protect.c: Re-generated.
7792 * features/mips64-dsp-linux.c: Re-generated.
7793 * features/mips64-linux.c: Re-generated.
7794 * features/mips-dsp-linux.c: Re-generated.
7795 * features/mips-linux.c: Re-generated.
7796 * features/nds32.c: Re-generated.
7797 * features/nios2.c: Re-generated.
7798 * features/nios2-linux.c: Re-generated.
7799 * features/rs6000/powerpc-32.c: Re-generated.
7800 * features/rs6000/powerpc-32l.c: Re-generated.
7801 * features/rs6000/powerpc-403.c: Re-generated.
7802 * features/rs6000/powerpc-403gc.c : Re-generated.
7803 * features/rs6000/powerpc-405.c: Re-generated.
7804 * features/rs6000/powerpc-505.c: Re-generated.
7805 * features/rs6000/powerpc-601.c: Re-generated.
7806 * features/rs6000/powerpc-602.c: Re-generated.
7807 * features/rs6000/powerpc-603.c: Re-generated.
7808 * features/rs6000/powerpc-604.c: Re-generated.
7809 * features/rs6000/powerpc-64.c: Re-generated.
7810 * features/rs6000/powerpc-64l.c: Re-generated.
7811 * features/rs6000/powerpc-7400.c: Re-generated.
7812 * features/rs6000/powerpc-750.c: Re-generated.
7813 * features/rs6000/powerpc-860.c: Re-generated.
7814 * features/rs6000/powerpc-altivec32.c: Re-generated.
7815 * features/rs6000/powerpc-altivec32l.c: Re-generated.
7816 * features/rs6000/powerpc-altivec64.c: Re-generated.
7817 * features/rs6000/powerpc-altivec64l.c: Re-generated.
7818 * features/rs6000/powerpc-cell32l.c: Re-generated.
7819 * features/rs6000/powerpc-cell64l.c: Re-generated.
7820 * features/rs6000/powerpc-e500.c: Re-generated.
7821 * features/rs6000/powerpc-e500l.c: Re-generated.
7822 * features/rs6000/powerpc-isa205-32l.c: Re-generated.
7823 * features/rs6000/powerpc-isa205-64l.c: Re-generated.
7824 * features/rs6000/powerpc-isa205-altivec32l.c: Re-generated.
7825 * features/rs6000/powerpc-isa205-altivec64l.c: Re-generated.
7826 * features/rs6000/powerpc-isa205-vsx32l.c: Re-generated.
7827 * features/rs6000/powerpc-isa205-vsx64l.c: Re-generated.
7828 * features/rs6000/powerpc-vsx32.c: Re-generated.
7829 * features/rs6000/powerpc-vsx32l.c: Re-generated.
7830 * features/rs6000/powerpc-vsx64.c: Re-generated.
7831 * features/rs6000/powerpc-vsx64l.c: Re-generated.
7832 * features/rs6000/rs6000.c: Re-generated.
7833 * features/s390-linux32.c: Re-generated.
7834 * features/s390-linux32v1.c: Re-generated.
7835 * features/s390-linux32v2.c: Re-generated.
7836 * features/s390-linux64.c: Re-generated.
7837 * features/s390-linux64v1.c: Re-generated.
7838 * features/s390-linux64v2.c: Re-generated.
7839 * features/s390-te-linux64.c: Re-generated.
7840 * features/s390-tevx-linux64.c: Re-generated.
7841 * features/s390-vx-linux64.c: Re-generated.
7842 * features/s390x-linux64.c: Re-generated.
7843 * features/s390x-linux64v1.c: Re-generated.
7844 * features/s390x-linux64v2.c: Re-generated.
7845 * features/s390x-te-linux64.c: Re-generated.
7846 * features/s390x-tevx-linux64.c: Re-generated.
7847 * features/s390x-vx-linux64.c: Re-generated.
7848 * features/sparc/sparc32-solaris.c: Re-generated.
7849 * features/sparc/sparc64-solaris.c: Re-generated.
7850 * features/tic6x-c62x.c: Re-generated.
7851 * features/tic6x-c62x-linux.c: Re-generated.
7852 * features/tic6x-c64x.c: Re-generated.
7853 * features/tic6x-c64x-linux.c: Re-generated.
7854 * features/tic6x-c64xp.c: Re-generated.
7855 * features/tic6x-c64xp-linux.c: Re-generated.
7856
7857 2017-07-26 Yao Qi <yao.qi@linaro.org>
7858
7859 * i386-linux-tdep.c (i386_linux_read_description): New function.
7860 (i386_linux_core_read_description): Call
7861 i386_linux_read_description.
7862 * i386-linux-tdep.h (i386_linux_read_description): Declare.
7863 (tdesc_i386_linux, tdesc_i386_mmx_linux): Remove declarations.
7864 (tdesc_i386_avx_linux, tdesc_i386_mpx_linux): Likewise
7865 (tdesc_i386_avx_mpx_linux, tdesc_i386_avx_avx512_linux): Likewise.
7866 (tdesc_i386_avx_mpx_avx512_pku_linux): Likewise.
7867 * x86-linux-nat.c (x86_linux_read_description): Call
7868 i386_linux_read_description.
7869
7870 2017-07-26 Yao Qi <yao.qi@linaro.org>
7871
7872 * NEWS: Mention it.
7873 * features/Makefile (%.c: %.xml): Pass the xml file name to
7874 command "maint print c-tdesc".
7875 * target-descriptions.c (maint_print_c_tdesc_cmd): Get file
7876 name from 'arg'.
7877
7878 2017-07-26 Yao Qi <yao.qi@linaro.org>
7879
7880 * target-descriptions.c (target_desc): Add ctor and dtor. Do
7881 in-class initialization.
7882 (tdesc_create_feature): Call new instead of XCNEW.
7883 (free_target_description): Ue delete.
7884
7885 2017-07-25 John Baldwin <jhb@FreeBSD.org>
7886
7887 * configure.nat: Add "-lkvm" for NetBSD/sparc64 and fix typo.
7888
7889 2017-07-25 Yao Qi <yao.qi@linaro.org>
7890
7891 * amd64-tdep.c (amd64_init_abi): Make argument default_tdesc
7892 constant.
7893 (amd64_x32_init_abi): Likewise.
7894 * amd64-tdep.h (amd64_init_abi): Update declaration.
7895 (amd64_x32_init_abi): Likewise.
7896
7897 2017-07-25 Yao Qi <yao.qi@linaro.org>
7898
7899 PR tdep/21717
7900 * arm-linux-nat.c (arm_linux_fetch_inferior_registers): Update
7901 condition for FPSCR.
7902 (arm_linux_store_inferior_registers): Likewise.
7903
7904 2017-07-22 Tom Tromey <tom@tromey.com>
7905
7906 * break-catch-syscall.c (struct catch_syscall_inferior_data)
7907 <syscalls_counts>: Now a std::vector.
7908 (get_catch_syscall_inferior_data): Use "new".
7909 (catch_syscall_inferior_data_cleanup): Use "delete".
7910 (insert_catch_syscall, remove_catch_syscall)
7911 (clear_syscall_counts): Update.
7912
7913 2017-07-22 Tom Tromey <tom@tromey.com>
7914
7915 * break-catch-syscall.c (syscall_catchpoint)
7916 <syscalls_to_be_caught>: Now a std::vector<int>
7917 (~syscall_catchpoint): Remove.
7918 (insert_catch_syscall, remove_catch_syscall)
7919 (breakpoint_hit_catch_syscall, print_one_catch_syscall)
7920 (print_mention_catch_syscall, print_recreate_catch_syscall):
7921 Update.
7922 (create_syscall_event_catchpoint): Change type of "filter"
7923 parameter.
7924 (catch_syscall_split_args): Return a std::vector.
7925 (catch_syscall_command_1, catching_syscall_number_1): Update.
7926
7927 2017-07-22 Tom Tromey <tom@tromey.com>
7928
7929 * break-catch-throw.c (struct exception_catchpoint)
7930 <exception_rx>: Now a std::string.
7931 (~exception_catchpoint): Remove.
7932 (print_one_detail_exception_catchpoint): Update.
7933 (handle_gnu_v3_exceptions): Change type of except_rx.
7934 (extract_exception_regexp): Return a std::string.
7935 (catch_exception_command_1): Update.
7936
7937 2017-07-22 Tom Tromey <tom@tromey.com>
7938
7939 * break-catch-sig.c (gdb_signal_type): Remove typedef.
7940 (struct signal_catchpoint) <signals_to_be_caught>: Now a
7941 std::vector.
7942 <catch_all>: Now a bool.
7943 (~signal_catchpoint): Remove.
7944 (signal_catchpoint_insert_location)
7945 (signal_catchpoint_remove_location)
7946 (signal_catchpoint_breakpoint_hit, signal_catchpoint_print_one)
7947 (signal_catchpoint_print_mention)
7948 (signal_catchpoint_print_recreate)
7949 (signal_catchpoint_explains_signal): Update.
7950 (create_signal_catchpoint): Change type of "filter" and
7951 "catch_all".
7952 (catch_signal_split_args): Return a std::vector. Change type of
7953 "catch_all".
7954 (catch_signal_command): Update.
7955
7956 2017-07-20 Pedro Alves <palves@redhat.com>
7957
7958 * ada-lang.c (ada_language_defn): Make extern.
7959 (_initialize_ada_language): Remove add_language call.
7960 * c-lang.c (c_language_defn, cplus_language_defn)
7961 (asm_language_defn, minimal_language_defn): Make extern.
7962 (_initialize_c_language): Delete.
7963 * completer.c (compare_cstrings): Delete, moved to utils.h.
7964 * d-lang.c (d_language_defn): Make extern.
7965 (_initialize_d_language): Remove add_language calls.
7966 * defs.h (enum language): Add comment.
7967 * f-lang.c (f_language_defn): Make extern.
7968 (_initialize_f_language): Remove add_language call.
7969 * go-lang.c (go_language_defn): Make extern.
7970 (_initialize_go_language): Remove add_language call.
7971 * language.c: Include <algorithm>.
7972 (languages): Redefine as const array.
7973 (languages_size, languages_allocsize, DEFAULT_ALLOCSIZE): Delete.
7974 (set_language_command): Handle "local". Use for-range loop.
7975 (set_language): Remove loop.
7976 (language_enum): Rewrite.
7977 (language_def, language_str): Remove loops.
7978 (add_language): Delete.
7979 (add_set_language_command): New, based on add_languages.
7980 (skip_language_trampoline): Adjust.
7981 (local_language_defn): Delete.
7982 (language_gdbarch_post_init): Adjust.
7983 (_initialize_language): Remove add_language calls. Call
7984 add_set_language_command.
7985 * language.h (add_language): Delete.
7986 (auto_language_defn)
7987 (unknown_language_defn, minimal_language_defn, ada_language_defn)
7988 (asm_language_defn, c_language_defn, cplus_language_defn)
7989 (d_language_defn, f_language_defn, go_language_defn)
7990 (m2_language_defn, objc_language_defn, opencl_language_defn)
7991 (pascal_language_defn, rust_language_defn): Declare.
7992 * m2-lang.c (m2_language_defn): Make extern.
7993 (_initialize_m2_language): Remove add_language call.
7994 * objc-lang.c (objc_language_defn): Make extern.
7995 (_initialize_objc_language): Remove add_language call.
7996 * opencl-lang.c (opencl_language_defn): Make extern.
7997 (_initialize_opencl_language): Remove add_language call.
7998 * p-lang.c (pascal_language_defn): Make extern.
7999 (_initialize_pascal_language): Delete.
8000 * rust-lang.c (rust_language_defn): Make extern.
8001 (_initialize_rust_language): Delete.
8002 * utils.h (compare_cstrings): New static inline function.
8003
8004 2017-07-20 Pedro Alves <palves@redhat.com>
8005
8006 * ada-lang.c (ada_to_fixed_type_1): Adjust.
8007 (get_var_value): Constify parameters.
8008 (get_int_var_value): Change prototype.
8009 (to_fixed_range_type): Adjust.
8010 * ada-lang.h (get_int_var_value): Change prototype.
8011
8012 2017-07-20 Pedro Alves <palves@redhat.com>
8013
8014 * dwarf2read.c (dw2_lookup_symbol): Use
8015 SYMBOL_MATCHES_SEARCH_NAME.
8016 * psymtab.c (psym_lookup_symbol): Use SYMBOL_MATCHES_SEARCH_NAME.
8017
8018 2017-07-20 Pedro Alves <palves@redhat.com>
8019
8020 * block.c (block_iter_name_step, block_iter_name_first)
8021 (block_iter_name_next): Delete.
8022 (block_lookup_symbol_primary): Adjust to use
8023 dict_iter_match_first/dict_iter_match_next.
8024 * block.h (block_iter_name_first, block_iter_name_next): Delete
8025 declarations.
8026 (ALL_BLOCK_SYMBOLS_WITH_NAME): Adjust to use
8027 dict_iter_match_first/dict_iter_match_next.
8028
8029 2017-07-20 Pedro Alves <palves@redhat.com>
8030
8031 * cp-support.c (cp_find_first_component_aux): Add missing case for
8032 end of string.
8033
8034 2017-07-18 David Blaikie <dblaikie@gmail.com>
8035
8036 * dwarf2read.c (create_cus_hash_table): Re-add lost initialization
8037 of dwo_cu's dwo_file.
8038
8039 2017-07-18 Yao Qi <yao.qi@linaro.org>
8040
8041 * remote.c (store_registers_using_G): Remove one line comment.
8042
8043 2017-07-18 Yao Qi <yao.qi@linaro.org>
8044
8045 * regcache.c (regcache_cpy): Simplify it.
8046 (regcache::cpy_no_passthrough): Remove it.
8047 * regcache.h (cpy_no_passthrough): Remove it.
8048 (regcache_dup, regcache_cpy): Update comments.
8049
8050 2017-07-18 Pedro Alves <palves@redhat.com>
8051
8052 * remote-sim.c (sim_command_completer): Adjust to work with a
8053 completion_tracker instead of a VEC.
8054
8055 2017-07-17 Pedro Alves <palves@redhat.com>
8056
8057 * completer.c (complete_source_filenames): New function.
8058 (complete_address_and_linespec_locations): New function.
8059 (location_completer): Use complete_address_and_linespec_locations.
8060 (completion_tracker::build_completion_result): Honor the tracker's
8061 request to suppress append.
8062 * completer.h (completion_tracker::suppress_append_ws)
8063 (completion_tracker::set_suppress_append_ws): New methods.
8064 (completion_tracker::m_suppress_append_ws): New field.
8065 (complete_source_filenames): New declaration.
8066 * linespec.c (linespec_complete_what): New.
8067 (struct ls_parser) <complete_what, completion_word,
8068 completion_quote_char, completion_quote_end, completion_tracker>:
8069 New fields.
8070 (string_find_incomplete_keyword_at_end): New.
8071 (linespec_lexer_lex_string): Record quote char. If in completion
8072 mode, don't throw.
8073 (linespec_lexer_consume_token): Advance the completion word point.
8074 (linespec_lexer_peek_token): Save/restore completion info.
8075 (save_stream_and_consume_token): New.
8076 (set_completion_after_number): New.
8077 (linespec_parse_basic): Set what to complete next depending on
8078 token. Handle function and label completions specially.
8079 (parse_linespec): Disable objc shortcut in completion mode. Set
8080 what to complete next depending on token type. Skip keyword if in
8081 completion mode.
8082 (complete_linespec_component, linespec_complete): New.
8083 * linespec.h (linespec_complete): Declare.
8084
8085 2017-07-17 Pedro Alves <palves@redhat.com>
8086
8087 * linespec.c (linespec_lexer_lex_string, find_toplevel_char):
8088 Handle 'operator<' / 'operator<<'.
8089
8090 2017-07-17 Pedro Alves <palves@redhat.com>
8091
8092 * completer.c (collect_explicit_location_matches): Handle
8093 MATCH_LABEL.
8094 (convert_explicit_location_to_linespec): New, factored out from
8095 ...
8096 (convert_explicit_location_to_sals): ... this.
8097 (complete_label): New.
8098 (linespec_complete_label, find_label_symbols_in_block): New.
8099 (find_label_symbols): Add completion_mode parameter and adjust to
8100 call find_label_symbols_in_block.
8101 * linespec.h (linespec_complete_label): Declare.
8102
8103 2017-07-17 Pedro Alves <palves@redhat.com>
8104
8105 * ada-lang.c (ada_collect_symbol_completion_matches): Add
8106 complete_symbol_mode parameter.
8107 * cli/cli-cmds.c (complete_command): Get the completion result out
8108 of the handle_brkchars tracker if used a custom word point.
8109 * completer.c: Include "linespec.h".
8110 (enum explicit_location_match_type) <MATCH_LINE>: New enumerator.
8111 (advance_to_expression_complete_word_point): New.
8112 (completion_tracker::completes_to_completion_word): New.
8113 (complete_files_symbols): Pass down
8114 complete_symbol_mode::EXPRESSION.
8115 (explicit_options, probe_options): New.
8116 (collect_explicit_location_matches): Complete on the
8117 explictit_loc->foo instead of word. Use
8118 linespec_complete_function. Handle MATCH_LINE. Handle offering
8119 keyword and options completions.
8120 (backup_text_ptr): Delete.
8121 (skip_keyword): New.
8122 (complete_explicit_location): Remove 'word' parameter. Add
8123 language, quoted_arg_start and quoted_arg_end parameters.
8124 Rewrite, parsing left to right.
8125 (location_completer): Rewrite.
8126 (location_completer_handle_brkchars): New function.
8127 (symbol_completer): Pass down complete_symbol_mode::EXPRESSION.
8128 (enum complete_line_internal_reason): Adjust comments.
8129 (completion_tracker::discard_completions): New.
8130 (completer_handle_brkchars_func_for_completer): Handle
8131 location_completer.
8132 (gdb_custom_word_point_brkchars)
8133 (gdb_org_rl_basic_quote_characters): New.
8134 (gdb_completion_word_break_characters_throw)
8135 (completion_find_completion_word): Handle trackers that use a
8136 custom word point.
8137 (completion_tracker::advance_custom_word_point_by): New.
8138 (completion_tracker::build_completion_result): Don't rely on
8139 readline appending the quote char.
8140 (gdb_rl_attempted_completion_function_throw): Handle trackers that
8141 use a custom word point.
8142 (gdb_rl_attempted_completion_function): Restore
8143 rl_basic_quote_characters.
8144 * completer.h (class completion_tracker): Extend intro comment.
8145 (completion_tracker::set_quote_char)
8146 (completion_tracker::quote_char)
8147 (completion_tracker::set_use_custom_word_point)
8148 (completion_tracker::use_custom_word_point)
8149 (completion_tracker::custom_word_point)
8150 (completion_tracker::set_custom_word_point)
8151 (completion_tracker::advance_custom_word_point_by)
8152 (completion_tracker::completes_to_completion_word)
8153 (completion_tracker::discard_completions): New methods.
8154 (completion_tracker::m_quote_char)
8155 (completion_tracker::m_use_custom_word_point)
8156 (completion_tracker::m_custom_word_point): New fields.
8157 (advance_to_expression_complete_word_point): Declare.
8158 * f-lang.c (f_collect_symbol_completion_matches): Add
8159 complete_symbol_mode parameter.
8160 * language.h (struct language_defn)
8161 <la_collect_symbol_completion_matches>: Add complete_symbol_mode
8162 parameter.
8163 * linespec.c (linespec_keywords): Add NULL terminator. Make extern.
8164 (linespec_complete_function): New function.
8165 (linespec_lexer_lex_keyword): Adjust.
8166 * linespec.h (linespec_keywords, linespec_complete_function): New
8167 declarations.
8168 * location.c (find_end_quote): New function.
8169 (explicit_location_lex_one): Add explicit_completion_info
8170 parameter. Save quoting info. Don't throw if being called for
8171 completion. Don't handle Ada operators here.
8172 (is_cp_operator, skip_op_false_positives, first_of)
8173 (explicit_location_lex_one_function): New function.
8174 (string_to_explicit_location): Replace 'dont_throw' parameter with
8175 an explicit_completion_info pointer parameter. Handle it. Don't
8176 use explicit_location_lex_one to lex function names. Use
8177 explicit_location_lex_one_function instead.
8178 * location.h (struct explicit_completion_info): New.
8179 (string_to_explicit_location): Replace 'dont_throw' parameter with
8180 an explicit_completion_info pointer parameter.
8181 * symtab.c (default_collect_symbol_completion_matches_break_on):
8182 Add complete_symbol_mode parameter. Handle LINESPEC mode.
8183 (default_collect_symbol_completion_matches)
8184 (collect_symbol_completion_matches): Add complete_symbol_mode
8185 parameter.
8186 (collect_symbol_completion_matches_type): Pass down
8187 complete_symbol_mode::EXPRESSION.
8188 (collect_file_symbol_completion_matches): Add complete_symbol_mode
8189 parameter. Handle LINESPEC mode.
8190 * symtab.h (complete_symbol_mode): New.
8191 (default_collect_symbol_completion_matches_break_on)
8192 (default_collect_symbol_completion_matches)
8193 (collect_symbol_completion_matches)
8194 (collect_file_symbol_completion_matches): Add complete_symbol_mode
8195 parameter.
8196
8197 2017-07-17 Pedro Alves <palves@redhat.com>
8198
8199 * utils.c (enum class strncmp_iw_mode): New.
8200 (strcmp_iw): Rename to ...
8201 (strncmp_iw_with_mode): ... this. Add string2_len and mode
8202 parameters. Handle them.
8203 (strncmp_iw): New.
8204 (strcmp_iw): Reimplement as wrapper around strncmp_iw_with_mode.
8205 * utils.h (strncmp_iw): Declare.
8206 (strcmp_iw): Move describing comments here.
8207
8208 2017-07-17 Pedro Alves <palves@redhat.com>
8209
8210 * c-exp.y (operator_stoken): Use CP_OPERATOR_LEN and
8211 CP_OPERATOR_STR.
8212 * c-typeprint.c (is_type_conversion_operator): Use
8213 CP_OPERATOR_STR.
8214 * cp-support.c (LENGTH_OF_OPERATOR): Delete.
8215 (cp_find_first_component_aux): Use CP_OPERATOR_STR and
8216 CP_OPERATOR_LEN.
8217 * cp-support.h (CP_OPERATOR_STR, CP_OPERATOR_LEN): New.
8218 * gnu-v2-abi.c (gnuv2_is_operator_name): Use CP_OPERATOR_STR.
8219 * gnu-v3-abi.c (gnuv3_is_operator_name): Use CP_OPERATOR_STR.
8220 * linespec.c (linespec_lexer_lex_string): Use CP_OPERATOR_LEN and
8221 CP_OPERATOR_STR.
8222 * location.c: Include "cp-support.h".
8223 (explicit_location_lex_one): Use CP_OPERATOR_LEN and
8224 CP_OPERATOR_STR.
8225 * symtab.c (operator_chars): Use CP_OPERATOR_STR and
8226 CP_OPERATOR_LEN.
8227
8228 2017-07-17 Pedro Alves <palves@redhat.com>
8229
8230 * cli/cli-cmds.c (complete_command): Use a completion tracker
8231 along with completion_find_completion_word for handle_brkchars
8232 phase.
8233 * completer.c (RL_QF_SINGLE_QUOTE, RL_QF_DOUBLE_QUOTE)
8234 (RL_QF_BACKSLASH, RL_QF_OTHER_QUOTE): New.
8235 (struct gdb_rl_completion_word_info): New.
8236 (gdb_rl_find_completion_word): New.
8237 (completion_find_completion_word): New.
8238 * completer.h (completion_find_completion_word): Declare.
8239
8240 2017-07-17 Pedro Alves <palves@redhat.com>
8241
8242 * ada-lang.c (symbol_completion_match): Adjust comments.
8243 (symbol_completion_add): Replace vector parameter with
8244 completion_tracker parameter. Use it.
8245 (ada_make_symbol_completion_list): Rename to...
8246 (ada_collect_symbol_completion_matches): ... this. Add
8247 completion_tracker parameter and use it.
8248 (ada_language_defn): Adjust.
8249 * break-catch-syscall.c (catch_syscall_completer): Adjust
8250 prototype and work with completion_tracker instead of VEC.
8251 * breakpoint.c (condition_completer): Adjust prototype and work
8252 with completion_tracker instead of VEC.
8253 * c-lang.c (c_language_defn, cplus_language_defn)
8254 (asm_language_defn, minimal_language_defn): Adjust to renames.
8255 * cli/cli-cmds.c (complete_command): Rework using
8256 completion_tracker. Catch exceptions when completing.
8257 * cli/cli-decode.c (integer_unlimited_completer)
8258 (complete_on_cmdlist, complete_on_enum): Adjust prototype and work
8259 with completion_tracker instead of VEC.
8260 * command.h (struct completion_tracker): Forward declare.
8261 (completer_ftype, completer_handle_brkchars_ftype): Change
8262 types.
8263 (complete_on_cmdlist, complete_on_enum): Adjust.
8264 * completer.c: Include <algorithm>.
8265 (struct gdb_completer_state): New.
8266 (current_completion): New global.
8267 (readline_line_completion_function): Delete.
8268 (noop_completer, filename_completer)
8269 (filename_completer_handle_brkchars, complete_files_symbols)
8270 (linespec_location_completer): Adjust to work with a
8271 completion_tracker instead of a VEC.
8272 (string_or_empty): New.
8273 (collect_explicit_location_matches): Adjust to work with a
8274 completion_tracker instead of a VEC.
8275 (explicit_location_completer): Rename to ...
8276 (complete_explicit_location): ... this and adjust to work with a
8277 completion_tracker instead of a VEC.
8278 (location_completer): Adjust to work with a completion_tracker
8279 instead of a VEC.
8280 (add_struct_fields): Adjust to work with a completion_list instead
8281 of VEC.
8282 (expression_completer): Rename to ...
8283 (complete_expression): ... this and adjust to work with a
8284 completion_tracker instead of a VEC. Use complete_files_symbols.
8285 (expression_completer): Reimplement on top of complete_expression.
8286 (symbol_completer): Adjust to work with a completion_tracker
8287 instead of a VEC.
8288 (enum complete_line_internal_reason): Add describing comments.
8289 (complete_line_internal_normal_command): Adjust to work with a
8290 completion_tracker instead of a VEC.
8291 (complete_line_internal): Rename to ...
8292 (complete_line_internal_1): ... this and adjust to work with a
8293 completion_tracker instead of a VEC. Assert TEXT is NULL in the
8294 handle_brkchars phase.
8295 (new_completion_tracker): Delete.
8296 (complete_line_internal): Reimplement as TRY/CATCH wrapper around
8297 complete_line_internal_1.
8298 (free_completion_tracker): Delete.
8299 (INITIAL_COMPLETION_HTAB_SIZE): New.
8300 (completion_tracker::completion_tracker)
8301 (completion_tracker::~completion_tracker): New.
8302 (maybe_add_completion): Delete.
8303 (completion_tracker::maybe_add_completion)
8304 (completion_tracker::add_completion)
8305 (completion_tracker::add_completions): New.
8306 (throw_max_completions_reached_error): Delete.
8307 (complete_line): Adjust to work with a completion_tracker instead
8308 of a VEC. Don't create a completion_tracker_t or check for max
8309 completions here.
8310 (command_completer, command_completer_handle_brkchars)
8311 (signal_completer, reg_or_group_completer_1)
8312 (reg_or_group_completer, default_completer_handle_brkchars):
8313 Adjust to work with a completion_tracker.
8314 (gdb_completion_word_break_characters_throw): New.
8315 (gdb_completion_word_break_characters): Reimplement.
8316 (line_completion_function): Delete.
8317 (completion_tracker::recompute_lowest_common_denominator)
8318 (expand_preserving_ws)
8319 (completion_tracker::build_completion_result)
8320 (completion_result::completion_result)
8321 (completion_result::completion_result)
8322 (completion_result::~completion_result)
8323 (completion_result::completion_result)
8324 (completion_result::release_match_list, compare_cstrings)
8325 (completion_result::sort_match_list)
8326 (completion_result::reset_match_list)
8327 (gdb_rl_attempted_completion_function_throw)
8328 (gdb_rl_attempted_completion_function): New.
8329 * completer.h (completion_list, struct completion_result)
8330 (class completion_tracker): New.
8331 (complete_line): Add completion_tracker parameter.
8332 (readline_line_completion_function): Delete.
8333 (gdb_rl_attempted_completion_function): New.
8334 (noop_completer, filename_completer, expression_completer)
8335 (location_completer, symbol_completer, command_completer)
8336 (signal_completer, reg_or_group_completer): Update prototypes.
8337 (completion_tracker_t, new_completion_tracker)
8338 (make_cleanup_free_completion_tracker): Delete.
8339 (enum maybe_add_completion_enum): Delete.
8340 (maybe_add_completion): Delete.
8341 (throw_max_completions_reached_error): Delete.
8342 * corefile.c (complete_set_gnutarget): Adjust to work with a
8343 completion_tracker instead of a VEC.
8344 * cp-abi.c (cp_abi_completer): Adjust to work with a
8345 completion_tracker instead of a VEC.
8346 * d-lang.c (d_language_defn): Adjust.
8347 * disasm.c (disassembler_options_completer): Adjust to work with a
8348 completion_tracker instead of a VEC.
8349 * f-lang.c (f_make_symbol_completion_list): Rename to ...
8350 (f_collect_symbol_completion_matches): ... this. Adjust to work
8351 with a completion_tracker instead of a VEC.
8352 (f_language_defn): Adjust.
8353 * go-lang.c (go_language_defn): Adjust.
8354 * guile/scm-cmd.c (cmdscm_add_completion, cmdscm_completer):
8355 Adjust to work with a completion_tracker instead of a VEC.
8356 * infrun.c (handle_completer): Likewise.
8357 * interps.c (interpreter_completer): Likewise.
8358 * interps.h (interpreter_completer): Likewise.
8359 * language.c (unknown_language_defn, auto_language_defn)
8360 (local_language_defn): Adjust.
8361 * language.h (language_defn::la_make_symbol_completion_list):
8362 Rename to ...
8363 (language_defn::la_collect_symbol_completion_matches): ... this
8364 and adjust to work with a completion_tracker instead of a VEC.
8365 * m2-lang.c (m2_language_defn): Adjust.
8366 * objc-lang.c (objc_language_defn): Adjust.
8367 * opencl-lang.c (opencl_language_defn): Adjust.
8368 * p-lang.c (pascal_language_defn): Adjust.
8369 * python/py-cmd.c (cmdpy_completer_helper): Handle NULL word.
8370 (cmdpy_completer_handle_brkchars, cmdpy_completer): Adjust to work
8371 with a completion_tracker.
8372 * rust-lang.c (rust_language_defn): Adjust.
8373 * symtab.c (free_completion_list, do_free_completion_list)
8374 (return_val, completion_tracker): Delete.
8375 (completion_list_add_name, completion_list_add_symbol)
8376 (completion_list_add_msymbol, completion_list_objc_symbol)
8377 (completion_list_add_fields, add_symtab_completions): Add
8378 completion_tracker parameter and use it.
8379 (default_make_symbol_completion_list_break_on_1): Rename to...
8380 (default_collect_symbol_completion_matches_break_on): ... this.
8381 Add completion_tracker parameter and use it instead of allocating
8382 a completion tracker here.
8383 (default_make_symbol_completion_list_break_on): Delete old
8384 implementation.
8385 (default_make_symbol_completion_list): Delete.
8386 (default_collect_symbol_completion_matches): New.
8387 (make_symbol_completion_list): Delete.
8388 (collect_symbol_completion_matches): New.
8389 (make_symbol_completion_type): Rename to ...
8390 (collect_symbol_completion_matches_type): ... this. Add
8391 completion_tracker parameter and use it instead of VEC.
8392 (make_file_symbol_completion_list_1): Rename to...
8393 (collect_file_symbol_completion_matches): ... this. Add
8394 completion_tracker parameter and use it instead of VEC.
8395 (make_file_symbol_completion_list): Delete.
8396 (add_filename_to_list): Use completion_list instead of a VEC.
8397 (add_partial_filename_data::list): Now a completion_list.
8398 (make_source_files_completion_list): Work with a completion_list
8399 instead of a VEC.
8400 * symtab.h: Include "completer.h".
8401 (default_make_symbol_completion_list_break_on)
8402 (default_make_symbol_completion_list, make_symbol_completion_list)
8403 (make_symbol_completion_type, make_file_symbol_completion_list)
8404 (make_source_files_completion_list): Delete.
8405 (default_collect_symbol_completion_matches_break_on)
8406 (default_collect_symbol_completion_matches)
8407 (collect_symbol_completion_matches)
8408 (collect_symbol_completion_matches_type)
8409 (collect_file_symbol_completion_matches)
8410 (make_source_files_completion_list): New.
8411 * top.c (init_main): Don't install a rl_completion_entry_function
8412 hook. Install a rl_attempted_completion_function hook instead.
8413 * tui/tui-layout.c (layout_completer): Adjust to work with a
8414 completion_tracker.
8415 * tui/tui-regs.c (tui_reggroup_completer):
8416 * tui/tui-win.c (window_name_completer, focus_completer)
8417 (winheight_completer): Adjust to work with a completion_tracker.
8418 * value.c: Include "completer.h".
8419 (complete_internalvar): Adjust to work with a completion_tracker.
8420 * value.h (complete_internalvar): Likewise.
8421
8422 2017-07-17 Pedro Alves <palves@redhat.com>
8423
8424 * cli/cli-decode.c (set_cmd_completer_handle_brkchars): Adjust to
8425 renames.
8426 * cli/cli-decode.h (struct cmd_list_element) <completer>: Move
8427 comments to completer_ftype's declaration.
8428 <completer_handle_brkchars>: Change type to
8429 completer_handle_brkchars_ftype.
8430 * command.h (completer_ftype): Add describing comment and give
8431 names to parameters.
8432 (completer_ftype_void): Rename to ...
8433 (completer_handle_brkchars_ftype) ... this. Add describing comment.
8434 (set_cmd_completer_handle_brkchars): Adjust.
8435 * completer.c (filename_completer_handle_brkchars): New function.
8436 (complete_line_internal_normal_command): New function, factored
8437 out from ...
8438 (complete_line_internal): ... here.
8439 (command_completer_handle_brkchars)
8440 (default_completer_handle_brkchars)
8441 (completer_handle_brkchars_func_for_completer): New functions.
8442 * completer.h (set_gdb_completion_word_break_characters): Delete
8443 declaration.
8444 (completer_handle_brkchars_func_for_completer): New declaration.
8445 * python/py-cmd.c (cmdpy_completer_handle_brkchars): Adjust to use
8446 completer_handle_brkchars_func_for_completer.
8447
8448 2017-07-17 Pedro Alves <palves@redhat.com>
8449
8450 * completer.c (symbol_completer): New function, based on
8451 make_symbol_completion_list_fn.
8452 * completer.h (symbol_completer): New declaration.
8453 * guile/scm-cmd.c (cmdscm_completers): Adjust.
8454 * python/py-cmd.c (completers): Adjust.
8455 * symtab.c (make_symbol_completion_list_fn): Delete.
8456 * symtab.h (make_symbol_completion_list_fn): Delete.
8457 * cli/cli-decode.c (add_cmd): Adjust.
8458
8459 2017-07-17 Pedro Alves <palves@redhat.com>
8460
8461 * Makefile.in (COMMON_OBS): Add filename-seen-cache.o.
8462 * dwarf2read.c: Include "filename-seen-cache.h".
8463 * dwarf2read.c (dwarf2_per_objfile) <filenames_cache>: New field.
8464 (dw2_map_symbol_filenames): Build and use a filenames_seen_cache.
8465 * filename-seen-cache.c: New file.
8466 * filename-seen-cache.h: New file.
8467 * symtab.c: Include "filename-seen-cache.h".
8468 (struct filename_seen_cache, INITIAL_FILENAME_SEEN_CACHE_SIZE)
8469 (create_filename_seen_cache, clear_filename_seen_cache)
8470 (delete_filename_seen_cache, filename_seen): Delete, parts moved
8471 to filename-seen-cache.h/filename-seen-cache.c.
8472 (output_source_filename, sources_info)
8473 (maybe_add_partial_symtab_filename)
8474 (make_source_files_completion_list): Adjust to use
8475 filename_seen_cache.
8476
8477 2017-07-17 Pedro Alves <palves@redhat.com>
8478
8479 * dwarf2read.c (dwarf2_per_objfile): In-class initialize all
8480 fields.
8481 (dwarf2_per_objfile::dwarf2_per_objfile(objfile*, const
8482 dwarf2_debug_sections*)): New.
8483 (dwarf2_per_objfile::dwarf2_per_objfile(const
8484 dwarf2_per_objfile&)): Declare as deleted.
8485 (dwarf2_per_objfile::operator=): Declare as deleted.
8486 (dwarf2_per_objfile::dwarf2_per_objfile)
8487 (dwarf2_per_objfile::~dwarf2_per_objfile)
8488 (dwarf2_per_objfile::free_cached_comp_units): New.
8489 (dwarf2_has_info): dwarf2_per_objfile initialization code moved to
8490 ctor. Call dwarf2_per_objfile's ctor manually.
8491 (dwarf2_locate_sections): Deleted/refactored as ...
8492 (dwarf2_per_objfile::locate_sections): ... this new method.
8493 (free_cached_comp_units): Defer to
8494 dwarf2_per_objfile::free_cached_comp_units.
8495 (dwarf2_free_objfile): Call dwarf2_per_objfile's dtor manually.
8496
8497 2017-07-14 Tom Tromey <tom@tromey.com>
8498
8499 PR rust/21764:
8500 * rust-exp.y (convert_ast_to_expression): Add "want_type"
8501 parameter.
8502 <UNOP_SIZEOF>: Split into separate case.
8503 <UNOP_VAR_VALUE>: Handle want_type. Add error case.
8504
8505 2017-07-14 Tom Tromey <tom@tromey.com>
8506
8507 PR rust/21763:
8508 * symtab.c (symbol_matches_domain): Add language_rust to special
8509 case.
8510 * rust-exp.y (convert_ast_to_expression) <OP_VAR_VALUE>: Don't
8511 treat LOC_TYPEDEF symbols as variables.
8512
8513 2017-07-14 Pedro Alves <palves@redhat.com>
8514
8515 * symtab.c (make_file_symbol_completion_list_1): Iterate over
8516 symtabs matching all symtabs with SRCFILE as file name instead of
8517 only considering the first hit, with lookup_symtab.
8518
8519 2017-07-14 Simon Marchi <simon.marchi@ericsson.com>
8520
8521 * ax-gdb.c (gen_aggregate_elt_ref): Remove operand_name and
8522 operator_name parameters.
8523 (gen_expr): Update function call.
8524
8525 2017-07-14 Simon Marchi <simon.marchi@ericsson.com>
8526
8527 * dwarf2loc.h (dwarf2_compile_expr_to_ax): Remove gdbarch
8528 parameter.
8529 * symtab.h (struct symbol_computed_ops::tracepoint_var_ref):
8530 Likewise.
8531 * dwarf2loc.c (dwarf2_compile_expr_to_ax): Remove gdbarch
8532 parameter, use agent_expr::gdbarch instead, update function
8533 calls.
8534 (locexpr_tracepoint_var_ref): Likewise.
8535 (loclist_tracepoint_var_ref): Likewise.
8536 * ax-gdb.c (gen_trace_static_fields): Likewise.
8537 (gen_traced_pop): Likewise.
8538 (gen_frame_args_address): Likewise.
8539 (gen_frame_locals_address): Likewise.
8540 (gen_var_ref): Likewise.
8541 (gen_struct_ref_recursive): Likewise.
8542 (gen_static_field): Likewise.
8543 (gen_maybe_namespace_elt): Likewise.
8544 (gen_expr): Likewise.
8545 (gen_trace_for_var): Likewise.
8546 (gen_trace_for_expr): Likewise.
8547 (gen_trace_for_return_address): Likewise.
8548
8549 2017-07-14 Simon Marchi <simon.marchi@ericsson.com>
8550
8551 * ax-gdb.c (gen_deref, gen_address_of): Remove unused ax
8552 parameter.
8553 (gen_struct_ref, gen_expr, gen_expr_binop_rest): Update call.
8554
8555 2017-07-14 Simon Marchi <simon.marchi@ericsson.com>
8556
8557 * ax-gdb.c (gen_usual_unary): Remove exp parameter, get gdbarch
8558 from ax, update calls.
8559 (gen_usual_arithmetic): Likewise.
8560 (gen_integral_promotions): Likewise.
8561 (gen_bitfield_ref): Likewise.
8562 (gen_primitive_field): Likewise.
8563 (gen_struct_ref_recursive): Likewise.
8564 (gen_struct_ref): Likewise.
8565 (gen_maybe_namespace_elt): Likewise.
8566 (gen_struct_elt_for_reference): Likewise.
8567 (gen_namespace_elt): Likewise.
8568 (gen_aggregate_elt_ref): Likewise.
8569 (gen_expr): Get gdbarch from ax, update calls.
8570 (gen_expr_binop_rest): Likewise.
8571
8572 2017-07-13 Pedro Alves <palves@redhat.com>
8573
8574 * amd64-darwin-tdep.c (x86_darwin_init_abi_64): Pass tdesc_amd64
8575 as default tdesc.
8576 * amd64-dicos-tdep.c (amd64_dicos_init_abi):
8577 * amd64-fbsd-tdep.c (amd64fbsd_init_abi):
8578 * amd64-linux-tdep.c (amd64_linux_init_abi): Pass
8579 tdesc_amd64_linux as default tdesc. Get final tdesc from the
8580 tdep.
8581 (amd64_x32_linux_init_abi): Pass tdesc_x32_linux as default tdesc.
8582 Get final tdesc from the tdep.
8583 * amd64-nbsd-tdep.c (amd64nbsd_init_abi): Pass tdesc_amd64 as
8584 default tdesc.
8585 * amd64-obsd-tdep.c (amd64obsd_init_abi): Likewise.
8586 * amd64-sol2-tdep.c (amd64_sol2_init_abi): Likewise.
8587 * amd64-tdep.c (amd64_init_abi): Add 'default_tdesc' parameter.
8588 Use it as default tdesc.
8589 (amd64_x32_init_abi): Add 'default_tdesc' parameter, and pass it
8590 down to amd_init_abi. No longer handle fallback tdesc here.
8591 * amd64-tdep.h (tdesc_x32): Declare.
8592 (amd64_init_abi, amd64_x32_init_abi): Add 'default_tdesc'
8593 parameter.
8594 * amd64-windows-tdep.c (amd64_windows_init_abi): Pass tdesc_amd64
8595 as default tdesc.
8596
8597 2017-07-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
8598
8599 * s390-linux-tdep.c (s390_process_record): Add support for
8600 instructions new in arch12.
8601
8602 2017-07-11 John Baldwin <jhb@FreeBSD.org>
8603
8604 * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers): Use
8605 PT_GETFSBASE and PT_GETGSBASE.
8606 (amd64bsd_store_inferior_registers): Use PT_SETFSBASE and
8607 PT_SETGSBASE.
8608
8609 2017-07-11 John Baldwin <jhb@FreeBSD.org>
8610
8611 * features/Makefile (amd64.dat, amd64-avx.dat, amd64-mpx.dat)
8612 (amd64-avx-mpx.dat, amd64-avx-avx512.dat)
8613 (amd64-avx-mpx-avx512-pku.dat): Add i386/64bit-segments.xml in
8614 those rules.
8615 * features/i386/amd64-avx-avx512.xml: Add 64bit-segments.xml.
8616 * features/i386/amd64-avx-mpx-avx512-pku.xml: Add 64bit-segments.xml.
8617 * features/i386/amd64-avx-mpx.xml: Add 64bit-segments.xml.
8618 * features/i386/amd64-avx.xml: Add 64bit-segments.xml.
8619 * features/i386/amd64-mpx.xml: Add 64bit-segments.xml.
8620 * features/i386/amd64.xml: Add 64bit-segments.xml.
8621 * features/i386/amd64-avx-avx512.c: Regenerated.
8622 * features/i386/amd64-avx-mpx-avx512-pku.c: Regenerated.
8623 * features/i386/amd64-avx-mpx.c: Regenerated.
8624 * features/i386/amd64-avx.c: Regenerated.
8625 * features/i386/amd64-mpx.c: Regenerated.
8626 * features/i386/amd64.c: Regenerated.
8627 * regformats/i386/amd64-avx-avx512.dat: Regenerated.
8628 * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Regenerated.
8629 * regformats/i386/amd64-avx-mpx.dat: Regenerated.
8630 * regformats/i386/amd64-avx.dat: Regenerated.
8631 * regformats/i386/amd64-mpx.dat: Regenerated.
8632 * regformats/i386/amd64.dat: Regenerated.
8633
8634 2017-07-10 Yao Qi <yao.qi@linaro.org>
8635
8636 * features/i386/amd64-avx-avx512-linux.c: Re-generated.
8637 * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Re-generated.
8638
8639 2017-07-10 Anton Kolesov <Anton.Kolesov@synopsys.com>
8640
8641 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add setenv and
8642 unsetenv.
8643 * gnulib/aclocal.m4: Regenerate.
8644 * gnulib/config.in: Regenerate.
8645 * gnulib/configure: Regenerate.
8646 * gnulib/import/Makefile.am: Regenerate.
8647 * gnulib/import/Makefile.in: Regenerate.
8648 * gnulib/import/m4/gnulib-cache.m4: Regenerate.
8649 * gnulib/import/m4/gnulib-comp.m4: Regenerate.
8650 * gnulib/import/m4/environ.m4: New file.
8651 * gnulib/import/m4/setenv.m4: New file.
8652 * gnulib/import/setenv.c: New file.
8653 * gnulib/import/unsetenv.c: New file.
8654
8655 2017-07-09 Simon Marchi <simon.marchi@ericsson.com>
8656
8657 * compile/compile-loc2c.c (do_compile_dwarf_expr_to_c): Read
8658 address when op is DW_OP_addr.
8659
8660 2017-07-09 Tom Tromey <tom@tromey.com>
8661
8662 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Reverse size
8663 check and apply to outer type.
8664
8665 2017-07-07 John Baldwin <jhb@FreeBSD.org>
8666
8667 * fbsd-tdep.c (LWPINFO_OFFSET, LWPINFO_PL_FLAGS)
8668 (LWPINFO64_PL_SIGINFO, LWPINFO32_PL_SIGINFO, PL_FLAG_SI)
8669 (SIZE64_SIGINFO_T, SIZE32_SIGINFO_T, fbsd_core_xfer_siginfo): New.
8670 (fbsd_init_abi): Install gdbarch "core_xfer_siginfo" method.
8671
8672 2017-07-07 John Baldwin <jhb@FreeBSD.org>
8673
8674 * fbsd-tdep.c (fbsd_core_thread_name): Use thread_section_name.
8675
8676 2017-07-07 John Baldwin <jhb@FreeBSD.org>
8677
8678 * corelow.c (get_core_siginfo): Remove.
8679 (core_xfer_partial): Use the gdbarch "core_xfer_siginfo" method
8680 instead of get_core_siginfo.
8681 * gdbarch.sh (core_xfer_siginfo): New gdbarch callback.
8682 * gdbarch.h: Re-generate.
8683 * gdbarch.c: Re-generate.
8684 * linux-tdep.c (linux_core_xfer_siginfo): New.
8685 (linux_init_abi): Install gdbarch "core_xfer_siginfo" method.
8686
8687 2017-07-07 John Baldwin <jhb@FreeBSD.org>
8688
8689 * corelow.c (thread_section_name): Move to ...
8690 * gdbcore.h (thread_section_name): ... here.
8691
8692 2017-07-07 John Baldwin <jhb@FreeBSD.org>
8693
8694 * fbsd-nat.c [PT_LWPINFO && __LP64__] (union sigval32)
8695 (struct siginfo32): New.
8696 [PT_LWPINFO] (fbsd_siginfo_size, fbsd_convert_siginfo): New.
8697 (fbsd_xfer_partial) [PT_LWPINFO]: Handle TARGET_OBJECT_SIGNAL_INFO
8698 via ptrace(PT_LWPINFO).
8699
8700 2017-07-07 John Baldwin <jhb@FreeBSD.org>
8701
8702 * fbsd-tdep.c (fbsd_gdbarch_data_handle, struct fbsd_gdbarch_data)
8703 (init_fbsd_gdbarch_data, get_fbsd_gdbarch_data)
8704 (fbsd_get_siginfo_type): New.
8705 (fbsd_init_abi): Install gdbarch "get_siginfo_type" method.
8706 (_initialize_fbsd_tdep): New.
8707
8708 2017-07-06 David Blaikie <dblaikie@gmail.com>
8709
8710 * dwarf2read.c (struct dwo_file): Use a htab of dwo_unit* (rather than
8711 a singular dwo_unit*) to support multiple CUs in the same way that
8712 multiple TUs are supported.
8713 (create_cus_hash_table): Replace create_dwo_cu with a function for
8714 parsing multiple CUs from a DWO file.
8715 (open_and_init_dwo_file): Use create_cus_hash_table rather than
8716 create_dwo_cu.
8717 (lookup_dwo_cutu): Lookup CU in the hash table in the dwo_file with
8718 htab_find, rather than comparing the signature to a singleton CU in
8719 the dwo_file.
8720
8721 2017-07-06 Pedro Alves <palves@redhat.com>
8722
8723 * python/py-unwind.c (pyuw_dealloc_cache): Fix for loop condition.
8724
8725 2017-07-04 Pedro Alves <palves@redhat.com>
8726
8727 * gdbtypes.c (recursive_dump_type): Don't reference TYPE_STATIC.
8728 * gdbtypes.h (TYPE_STATIC): Delete.
8729 (struct fn_field) <is_public, is_abstract, is_static, is_final,
8730 is_synchronized, is_native>: Delete.
8731 <dummy>: Bump.
8732 (TYPE_FN_FIELD_PUBLIC, TYPE_FN_FIELD_STATIC, TYPE_FN_FIELD_FINAL)
8733 (TYPE_FN_FIELD_SYNCHRONIZED, TYPE_FN_FIELD_NATIVE)
8734 (TYPE_FN_FIELD_ABSTRACT): Delete.
8735
8736 2017-07-03 Simon Marchi <simon.marchi@ericsson.com>
8737
8738 * buffer.h (buffer_finish): Fix spelling mistakes.
8739
8740 2017-07-01 Eli Zaretskii <eliz@gnu.org>
8741
8742 * .dir-locals.el: Automatically switch to C-style comments in
8743 versions of Emacs that support the feature.
8744
8745 2017-06-30 Sergio Durigan Junior <sergiodj@redhat.com>
8746 Pedro Alves <palves@redhat.com>
8747
8748 PR cli/21688
8749 * cli/cli-script.c (command_name_equals_not_inline): Remove function.
8750 (process_next_line): New variable 'inline_cmd'.
8751 Adjust 'if' clauses for "python", "compile" and "guile" to use
8752 'command_name_equals' and check for '!inline_cmd'.
8753
8754 2017-06-30 Sergio Durigan Junior <sergiodj@redhat.com>
8755
8756 PR cli/21688
8757 * cli/cli-script.c (command_name_equals_not_inline): New function.
8758 (process_next_line): Adjust 'if' clauses for "python", "compile"
8759 and "guile" to use command_name_equals_not_inline.
8760
8761 2017-06-29 Pedro Alves <palves@redhat.com>
8762
8763 * completer.c (expression_completer): Call
8764 linespec_location_completer instead of location_completer.
8765
8766 2017-06-29 Pedro Alves <palves@redhat.com>
8767
8768 * completer.c (expression_completer): Remove code that recomputes
8769 'text' from 'word'.
8770
8771 2017-06-29 Yao Qi <yao.qi@linaro.org>
8772
8773 * regformats/regdat.sh: Generate code with
8774 "ifndef IN_PROCESS_AGENT".
8775
8776 2017-06-28 Pedro Alves <palves@redhat.com>
8777
8778 * command.h: Include "common/scoped_restore.h".
8779
8780 2017-06-28 Yao Qi <yao.qi@linaro.org>
8781
8782 * mi/mi-cmd-break.c (mi_argv_to_format): Use obstack_grow_str
8783 instead of obstack_grow.
8784
8785 2017-06-28 Doug Gilmore <Doug.Gilmore@imgtec.com>
8786
8787 PR gdb/21337
8788 * symfile.c (reread_symbols): Call objfiles_changed just before
8789 read_symbols.
8790
8791 2017-06-27 Pedro Alves <palves@redhat.com>
8792
8793 * symtab.c (COMPLETION_LIST_ADD_SYMBOL)
8794 (MCOMPLETION_LIST_ADD_SYMBOL): Delete macros, replace with ...
8795 (completion_list_add_symbol, completion_list_add_msymbol):
8796 ... these new functions.
8797 (add_symtab_completions)
8798 (default_make_symbol_completion_list_break_on_1): Adjust.
8799
8800 2017-06-27 Pedro Alves <palves@redhat.com>
8801
8802 * objfiles.c (get_objfile_bfd_data): Call bfd_alloc instead of
8803 bfd_zalloc. Call objfile_per_bfd_storage's ctor.
8804 (free_objfile_per_bfd_storage): Call objfile_per_bfd_storage's
8805 dtor.
8806 * objfiles.h (objfile_per_bfd_storage): Add ctor. Make
8807 'storage_obstack' field an auto_obstack. In-class initialize all
8808 non-bitfield fields. Make minsyms_read bool.
8809 * symfile.c (read_symbols): Adjust.
8810
8811 2017-06-27 Alan Hayward <alan.hayward@arm.com>
8812
8813 * remote-sim.c (gdbsim_fetch_register): Use byte_vector.
8814 (gdbsim_store_register): Likewise.
8815
8816 2017-06-27 Pedro Alves <palves@redhat.com>
8817
8818 * c-exp.y (name_obstack): Now an auto_obstack.
8819 (yylex): Use auto_obstack::clear.
8820 (c_parse): Use auto_obstack::clear instead of reinitializing and
8821 freeing the obstack.
8822 * c-lang.c (evaluate_subexp_c): Use auto_obstack.
8823 * d-exp.y (name_obstack): Now an auto_obstack.
8824 (yylex): Use auto_obstack::clear.
8825 (d_parse): Use auto_obstack::clear instead of reinitializing and
8826 freeing the obstack.
8827 * dwarf2loc.c (fetch_const_value_from_synthetic_pointer): Use
8828 auto_obstack.
8829 * dwarf2read.c (create_addrmap_from_index)
8830 (dwarf2_build_psymtabs_hard)
8831 (update_enumeration_type_from_children): Likewise.
8832 * gdb_obstack.h (auto_obstack): New type.
8833 * go-exp.y (name_obstack): Now an auto_obstack.
8834 (build_packaged_name): Use auto_obstack::clear.
8835 (go_parse): Use auto_obstack::clear instead of reinitializing and
8836 freeing the obstack.
8837 * linux-tdep.c (linux_make_mappings_corefile_notes): Use
8838 auto_obstack.
8839 * printcmd.c (printf_wide_c_string, ui_printf): Use auto_obstack.
8840 * rust-exp.y (work_obstack): Now an auto_obstack.
8841 (rust_parse, rust_lex_tests): Use auto_obstack::clear instead of
8842 reinitializing and freeing the obstack.
8843 * utils.c (do_obstack_free, make_cleanup_obstack_free): Delete.
8844 (host_char_to_target): Use auto_obstack.
8845 * utils.h (make_cleanup_obstack_free): Delete declaration.
8846 * valprint.c (generic_emit_char, generic_printstr): Use
8847 auto_obstack.
8848
8849 2017-06-27 Simon Marchi <simon.marchi@ericsson.com>
8850
8851 * darwin-nat.c (darwin_check_new_threads): Don't handle dummy
8852 thread.
8853 (darwin_init_thread_list): Don't update dummy thread.
8854 (darwin_create_inferior, darwin_attach): Don't add a dummy thread.
8855
8856 2017-06-26 Simon Marchi <simon.marchi@ericsson.com>
8857
8858 * record-full.c (netorder16): Remove.
8859
8860 2017-06-26 Simon Marchi <simon.marchi@ericsson.com>
8861
8862 * common/diagnostics.h: Define macros for GCC.
8863 (DIAGNOSTIC_IGNORE_UNUSED_FUNCTION): New macro.
8864 * common/vec.h: Include diagnostics.h.
8865 (DIAGNOSTIC_IGNORE_UNUSED_VEC_FUNCTION): New macro.
8866 (DEF_VEC_I, DEF_VEC_P, DEF_VEC_O): Ignore -Wunused-function
8867 warning.
8868
8869 2017-06-26 Simon Marchi <simon.marchi@ericsson.com>
8870
8871 * common/diagnostics.h (DIAGNOSTIC_IGNORE_DEPRECATED_REGISTER):
8872 New macro.
8873 * ada-lex.l: Ignore deprecated register warnings.
8874
8875 2017-06-25 Simon Marchi <simon.marchi@ericsson.com>
8876
8877 * main.c (get_init_files): Replace "SYSTEM_GDBINIT +
8878 datadir_len" with "&SYSTEM_GDBINIT[datadir_len]".
8879
8880 2017-06-25 Simon Marchi <simon.marchi@ericsson.com>
8881
8882 * dtrace-probe.c (dtrace_process_dof_probe): Put semi-colon on
8883 its own line.
8884
8885 2017-06-25 Simon Marchi <simon.marchi@ericsson.com>
8886
8887 * nat/x86-dregs.c (x86_show_dr): Print registers one per line.
8888
8889 2017-06-23 Alan Hayward <alan.hayward@arm.com>
8890
8891 * xtensa-tdep.c (XTENSA_MAX_REGISTER_SIZE): Add.
8892 (xtensa_register_write_masked): Use XTENSA_MAX_REGISTER_SIZE.
8893 (xtensa_register_read_masked): Likewise.
8894
8895 2017-06-22 Sergio Durigan Junior <sergiodj@redhat.com>
8896
8897 * common/environ.c (gdb_environ::unset): Update comment.
8898
8899 2017-06-22 Alan Hayward <alan.hayward@arm.com>
8900
8901 * python/py-unwind.c (pyuw_sniffer): Allocate space for
8902 registers.
8903
8904 2017-06-22 Alan Hayward <alan.hayward@arm.com>
8905
8906 * record-full.c (record_full_exec_insn): Use byte_vector.
8907
8908 2017-06-22 Yao Qi <yao.qi@linaro.org>
8909
8910 * regformats/i386/amd64-avx-mpx-avx512-pku-linux.dat: Regenerated.
8911 * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Regenerated.
8912
8913 2017-06-22 Alan Hayward <alan.hayward@arm.com>
8914
8915 * remote.c (cached_reg): Move from here...
8916 * regcache.h (cached_reg): ...to here.
8917 * python/py-unwind.c (struct reg_info): Remove.
8918 (cached_frame_info): Use cached_reg_t.
8919 (pyuw_prev_register): Likewise.
8920 (pyuw_sniffer): Use cached_reg_t and allocate registers.
8921 (pyuw_dealloc_cache): Free all registers.
8922
8923 2017-06-22 Pedro Alves <palves@redhat.com>
8924 Simon Marchi <simon.marchi@ericsson.com>
8925
8926 * unittests/environ-selftests.c (run_tests): Ignore -Wself-move
8927 warning.
8928 * common/diagnostics.h: New file.
8929
8930 2017-06-22 Pedro Alves <palves@redhat.com>
8931
8932 * common/agent.h: Add include guards.
8933
8934 2017-06-21 Simon Marchi <simon.marchi@ericsson.com>
8935
8936 * target.h (struct target_ops) <to_xfer_partial>: Update doc to
8937 talk about addressable units instead of bytes.
8938
8939 2017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
8940
8941 * common/environ.c (gdb_environ::unset): Use '::iterator' instead
8942 of '::const_iterator'.
8943
8944 2017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
8945
8946 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
8947 'unittests/environ-selftests.c'.
8948 (SUBDIR_UNITTESTS_OBS): Add 'environ-selftests.o'.
8949 * charset.c (find_charset_names): Declare object 'iconv_env'.
8950 Update code to use 'iconv_env' object. Remove call to
8951 'free_environ'.
8952 * common/environ.c: Include <utility>.
8953 (make_environ): Delete function.
8954 (free_environ): Delete function.
8955 (gdb_environ::clear): New function.
8956 (gdb_environ::operator=): New function.
8957 (gdb_environ::get): Likewise.
8958 (environ_vector): Delete function.
8959 (set_in_environ): Delete function.
8960 (gdb_environ::set): New function.
8961 (unset_in_environ): Delete function.
8962 (gdb_environ::unset): New function.
8963 (gdb_environ::envp): Likewise.
8964 * common/environ.h: Include <vector>.
8965 (struct gdb_environ): Delete; transform into...
8966 (class gdb_environ): ... this class.
8967 (free_environ): Delete prototype.
8968 (init_environ, get_in_environ, set_in_environ, unset_in_environ,
8969 environ_vector): Likewise.
8970 * infcmd.c (run_command_1): Update code to call
8971 'envp' from 'gdb_environ' class.
8972 (environment_info): Update code to call methods from 'gdb_environ'
8973 class.
8974 (unset_environment_command): Likewise.
8975 (path_info): Likewise.
8976 (path_command): Likewise.
8977 * inferior.c (inferior::~inferior): Delete call to 'free_environ'.
8978 (inferior::inferior): Initialize 'environment' using the host's
8979 information.
8980 * inferior.h: Remove forward declaration of 'struct gdb_environ'.
8981 Include "environ.h".
8982 (class inferior) <environment>: Change type from 'struct
8983 gdb_environ' to 'gdb_environ'.
8984 * mi/mi-cmd-env.c (mi_cmd_env_path): Update code to call
8985 methods from 'gdb_environ' class.
8986 * solib.c (solib_find_1): Likewise
8987 * unittests/environ-selftests.c: New file.
8988
8989 2017-06-20 Yao Qi <yao.qi@linaro.org>
8990
8991 * features/i386/i386-linux.xml: Exchange the order of including
8992 32bit-linux.xml and 32bit-sse.xml.
8993 * features/i386/i386-linux.c: Regenerated.
8994
8995 2017-06-20 Yao Qi <yao.qi@linaro.org>
8996
8997 * target-descriptions.c (tdesc_reg): Add ctor, dtor.
8998 Delete copy ctor and assignment operator.
8999 (tdesc_type): Likewise.
9000 (tdesc_feature): Likewise.
9001 (tdesc_free_reg): Remove.
9002 (tdesc_create_reg): Use new.
9003 (tdesc_free_type): Remove.
9004 (tdesc_create_vector): Use new.
9005 (tdesc_create_union): Likewise.
9006 (tdesc_create_flags): Likewise.
9007 (tdesc_create_enum): Likewise.
9008 (tdesc_free_feature): Delete.
9009 (free_target_description): Use delete.
9010
9011 2017-06-19 John Baldwin <jhb@FreeBSD.org>
9012
9013 * mips-tdep.c (print_gp_register_row): Don't error for unavailable
9014 registers.
9015
9016 2017-06-19 Pedro Alves <palves@redhat.com>
9017
9018 * dwarf2read.c (write_psymtabs_to_index): Construct file_closer
9019 after gdb::unlinker.
9020
9021 2017-06-19 Sergio Durigan Junior <sergiodj@redhat.com>
9022
9023 * mi/mi-cm-env.c (_initialize_mi_cmd_env): Use getenv instead of
9024 gdb_environ to access an environment variable.
9025
9026 2017-06-18 Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
9027
9028 * nat/linux-ptrace.c (linux_fork_to_function): Add cast to
9029 gdb_byte*.
9030
9031 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
9032
9033 * nat/fork-inferior.h (trace_start_error): Add ATTRIBUTE_PRINTF.
9034
9035 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
9036
9037 * configure: Re-generate.
9038 * warning.m4 (build_warnings): Add -Wno-mismatched-tags.
9039
9040 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
9041
9042 * configure: Re-generate.
9043 * warning.m4: Pass -Werror to compiler when checking for
9044 supported warning flags.
9045
9046 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
9047
9048 * Makefile.in (COMPILE.pre): Add "-x c++".
9049
9050 2017-06-16 Alan Hayward <alan.hayward@arm.com>
9051 Pedro Alves <palves@redhat.com>
9052 Yao Qi <yao.qi@linaro.org>
9053
9054 * defs.h (RequireLongest): New.
9055 (extract_integer): Declare function template.
9056 (extract_signed_integer): Remove the declaration, but define it
9057 static inline.
9058 (extract_unsigned_integer): Likewise.
9059 (store_integer): Declare function template.
9060 (store_signed_integer): Remove the declaration, but define it
9061 static inline.
9062 (store_unsigned_integer): Likewise.
9063 * findvar.c (extract_integer): New function template.
9064 (extract_signed_integer): Remove.
9065 (extract_unsigned_integer): Remove.
9066 (extract_integer<LONGEST>, extract_integer<ULONGEST>): Explicit
9067 instantiations.
9068 (store_integer): New function template.
9069 (store_signed_integer): Remove.
9070 (store_unsigned_integer): Remove.
9071 (store_integer): Explicit instantiations.
9072 * regcache.c (regcache_raw_read_signed): Update.
9073 (regcache::raw_read): New function.
9074 (regcache::raw_read_signed): Remove.
9075 (regcache::raw_read_unsigned): Remove.
9076 (regcache_raw_read_unsigned): Update.
9077 (regcache_raw_write_unsigned): Update.
9078 (regcache::raw_write_signed): Remove.
9079 (regcache::raw_write): New function.
9080 (regcache_cooked_read_signed): Update.
9081 (regcache::raw_write_unsigned): Remove.
9082 (regcache::cooked_read_signed): Remove.
9083 (regcache_cooked_read_unsigned): Update.
9084 (regcache::cooked_read_unsigned): Remove.
9085 (regcache_cooked_write_signed): Update.
9086 (regcache_cooked_write_unsigned): Update.
9087 * regcache.h (regcache) <raw_read_signed>: Remove.
9088 <raw_write_signed, raw_read_unsigned, raw_write_unsigned>: Remove.
9089 <raw_read, raw_write>: New.
9090 <cooked_read_signed, cooked_write_signed>: Remove.
9091 <cooked_write_unsigned, cooked_read_unsigned>: Remove.
9092 <cooked_read, cooked_write>: New.
9093 * sh64-tdep.c (sh64_pseudo_register_read): Update.
9094 (sh64_pseudo_register_write): Update.
9095
9096 2017-06-16 Anton Kolesov <anton.kolesov@synopsys.com>
9097
9098 * arc-tdep.c (arc_disassembler_options): New variable.
9099 (arc_gdbarch_init): Set and use it. Use arc_delayed_print_insn instead
9100 of default_print_insn.
9101 (arc_delayed_print_insn): Set info->section when needed,
9102 use default_print_insn to retrieve a disassembler.
9103
9104 2017-06-14 Sergio Durigan Junior <sergiodj@redhat.com>
9105
9106 PR gdb/21574
9107 * infcmd.c (_initialize_infcmd): Expand "help run" documentation
9108 to mention $SHELL and startup-with-shell.
9109
9110 2017-06-14 Max Filippov <jcmvbkbc@gmail.com>
9111
9112 * MAINTAINERS: Move Maxim Grigoriev to the Past Maintainers.
9113
9114 2017-06-14 Yao Qi <yao.qi@linaro.org>
9115
9116 * aarch64-tdep.c (aarch64_gdb_print_insn): Call
9117 default_print_insn instead of print_insn_aarch64.
9118 * arm-tdep.c (gdb_print_insn_arm): Call
9119 default_print_insn instead of print_insn_big_arm
9120 and print_insn_little_arm.
9121 * i386-tdep.c (i386_print_insn): Call default_print_insn
9122 instead of print_insn_i386.
9123 * ia64-tdep.c (ia64_print_insn): Call
9124 default_print_insn instead of print_insn_ia64.
9125 * mips-tdep.c (gdb_print_insn_mips): Call
9126 default_print_insn instead of print_insn_big_mips
9127 and print_insn_little_mips.
9128 * spu-tdep.c (gdb_print_insn_spu): Call default_print_insn
9129 instead of print_insn_spu.
9130
9131 2017-06-14 Pedro Alves <palves@redhat.com>
9132
9133 * ada-lang.c: Include "common/byte-vector.h".
9134 (ada_value_primitive_packed_val): Use gdb::byte_vector.
9135 * charset.c (wchar_iterator::iterate): Resize the vector instead
9136 of reserving it.
9137 * common/byte-vector.h: Include "common/def-vector.h".
9138 (wchar_iterator::m_out): Now a gdb::def_vector<gdb_wchar_t>.
9139 * cli/cli-dump.c: Include "common/byte-vector.h".
9140 (dump_memory_to_file, restore_binary_file): Use gdb::byte_vector.
9141 * common/byte-vector.h: New file.
9142 * common/def-vector.h: New file.
9143 * common/default-init-alloc.h: New file.
9144 * dwarf2loc.c: Include "common/byte-vector.h".
9145 (rw_pieced_value): Use gdb::byte_vector, and resize the vector
9146 instead of reserving it.
9147 * dwarf2read.c: Include "common/byte-vector.h".
9148 (data_buf::m_vec): Now a gdb::byte_vector.
9149 * gdb_regex.c: Include "common/def-vector.h".
9150 (compiled_regex::compiled_regex): Use gdb::def_vector<char>.
9151 * mi/mi-main.c: Include "common/byte-vector.h".
9152 (mi_cmd_data_read_memory): Use gdb::byte_vector.
9153 * printcmd.c: Include "common/byte-vector.h".
9154 (print_scalar_formatted): Use gdb::byte_vector.
9155 * valprint.c: Include "common/byte-vector.h".
9156 (maybe_negate_by_bytes, print_decimal_chars): Use
9157 gdb::byte_vector.
9158
9159 2017-06-13 Simon Marchi <simon.marchi@ericsson.com>
9160
9161 * darwin-nat.c: Include "nat/fork-inferior.h".
9162
9163 2017-06-13 Simon Marchi <simon.marchi@ericsson.com>
9164
9165 * configure.nat: Factor out Darwin bits that are not
9166 architecture-specific. Add fork-inferior.o.
9167
9168 2017-06-13 Simon Marchi <simon.marchi@ericsson.com>
9169
9170 * configure.nat: Factor out AIX bits that are not
9171 architecture-specific. Add fork-inferior.o.
9172
9173 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
9174
9175 * dwarf2loc.c (rw_pieced_value): New. Merge logic from...
9176 (read_pieced_value, write_pieced_value): ...here. Reduce to
9177 wrappers that just call rw_pieced_value.
9178
9179 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
9180
9181 * dwarf2loc.c (write_pieced_value): When writing the data for a
9182 memory piece, use write_memory_with_notification instead of
9183 write_memory.
9184
9185 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
9186
9187 * valops.c (read_value_memory): Change embedded_offset to
9188 represent a bit offset instead of a byte offset.
9189 * value.h (read_value_memory): Adjust comment.
9190
9191 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
9192
9193 * dwarf2loc.c (read_pieced_value): Remove unnecessary variables
9194 dest_offset_bits and source_offset_bits.
9195 (write_pieced_value): Likewise.
9196
9197 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
9198
9199 * dwarf2loc.c (read_pieced_value): Respect the piece offset, as
9200 given by DW_OP_bit_piece.
9201 (write_pieced_value): Likewise.
9202
9203 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
9204
9205 * dwarf2loc.c (read_pieced_value): Move the buffer allocation and
9206 some other preparations to the places where sufficient information
9207 is available.
9208 (write_pieced_value): Likewise.
9209
9210 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
9211
9212 * dwarf2loc.c (bits_to_bytes): New function.
9213 (read_pieced_value): Fix offset calculations for register pieces
9214 on big-endian targets.
9215 (write_pieced_value): Likewise.
9216
9217 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
9218
9219 * dwarf2loc.c (read_pieced_value): Remove buffer_size variable.
9220 (write_pieced_value): Likewise.
9221
9222 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
9223
9224 * dwarf2loc.c (write_pieced_value): When writing to a bit-field,
9225 transfer the source value's least significant bits, instead of its
9226 lowest-addressed ones. Rename type_len to max_offset.
9227 (read_pieced_value): Mirror above changes to write_pieced_value as
9228 applicable.
9229
9230 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
9231
9232 * dwarf2loc.c (write_pieced_value): In DWARF_VALUE_MEMORY,
9233 truncate full bytes from dest_offset_bits before using it as an
9234 offset into the buffer.
9235
9236 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
9237
9238 * dwarf2loc.c (write_pieced_value): Include transfer size in
9239 byte-wise check.
9240
9241 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
9242
9243 * dwarf2loc.c (write_pieced_value): Fix copy/paste error in the
9244 calculation of this_size.
9245
9246 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
9247
9248 * dwarf2loc.c (read_pieced_value): Respect parent value's offset
9249 when targeting a bit-field.
9250 (write_pieced_value): Likewise.
9251
9252 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
9253
9254 * dwarf2loc.c (struct piece_closure) <addr_size>: Remove field.
9255 (allocate_piece_closure): Drop addr_size parameter.
9256 (dwarf2_evaluate_loc_desc_full): Adjust call to
9257 allocate_piece_closure.
9258
9259 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
9260
9261 PR gdb/21226
9262 * dwarf2loc.c (read_pieced_value): Anchor stack value pieces at
9263 the LSB end, independent of endianness.
9264
9265 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
9266
9267 * dwarf2loc.c (write_pieced_value): Fix order of calculations for
9268 size capping.
9269
9270 2017-06-13 Yao Qi <yao.qi@linaro.org>
9271
9272 * mips-linux-nat.c: Move include features/mips*-linux.c to
9273 mips-linux-tdep.c.
9274 (_initialize_mips_linux_nat): Move initialize_tdesc_mips* calls
9275 to mips-linux-tdep.c.
9276 * mips-linux-tdep.c: Include features/mips*-linux.c
9277 (_initialize_mips_linux_tdep): Call initialize_tdesc_mips*
9278 functions.
9279 * mips-linux-tdep.h (tdesc_mips_linux): Declare.
9280 (tdesc_mips_dsp_linux, tdesc_mips64_linux): Declare.
9281 (tdesc_mips64_dsp_linux): Declare.
9282
9283 2017-06-12 Tom Tromey <tom@tromey.com>
9284
9285 * valprint.h (val_print_type_code_int): Remove.
9286 * valprint.c (generic_val_print_int): Always call
9287 val_print_scalar_formatted.
9288 (val_print_type_code_int): Remove.
9289 * printcmd.c (print_scalar_formatted): Handle options->format==0.
9290 * f-valprint.c (f_val_print): Use val_print_scalar_formatted.
9291 * c-valprint.c (c_val_print_int): Use val_print_scalar_formatted.
9292 * ada-valprint.c (ada_val_print_num): Use
9293 val_print_scalar_formatted.
9294
9295 2017-06-12 Tom Tromey <tom@tromey.com>
9296
9297 * printcmd.c (print_scalar_formatted): Unify the two switches.
9298 Don't convert scalars to LONGEST.
9299
9300 2017-06-12 Tom Tromey <tom@tromey.com>
9301
9302 PR exp/16225:
9303 * valprint.h (print_decimal_chars): Update.
9304 * valprint.c (maybe_negate_by_bytes): New function.
9305 (print_decimal_chars): Add "is_signed" argument.
9306 * printcmd.c (print_scalar_formatted): Update.
9307
9308 2017-06-12 Tom Tromey <tom@tromey.com>
9309
9310 PR exp/16225:
9311 * valprint.h (print_binary_chars, print_hex_chars): Update.
9312 * valprint.c (val_print_type_code_int): Update.
9313 (print_binary_chars): Add "zero_pad" argument.
9314 (emit_octal_digit): New function.
9315 (print_octal_chars): Don't zero-pad.
9316 (print_decimal_chars): Likewise.
9317 (print_hex_chars): Add "zero_pad" argument.
9318 * sh64-tdep.c (sh64_do_fp_register): Update.
9319 * regcache.c (regcache::dump): Update.
9320 * printcmd.c (print_scalar_formatted): Update.
9321 * infcmd.c (default_print_one_register_info): Update.
9322
9323 2017-06-12 Pedro Alves <palves@redhat.com>
9324 Alan Hayward <alan.hayward@arm.com>
9325
9326 * mips-tdep.c (MAX_MIPS_ABI_REGSIZE): New.
9327 (mips_eabi_push_dummy_call): Rename local 'regsize' to
9328 'abi_regsize'. Rename local array 'valbuf' to 'ref_valbuf', and
9329 use MAX_MIPS_ABI_REGSIZE instead of MAX_REGISTER_SIZE to size it.
9330 Assert that abi_regsize bytes fit in 'ref_valbuf'.
9331
9332 2017-06-12 Pedro Alves <palves@redhat.com>
9333
9334 * dwarf2read.c (mapped_symtab::data): Now a vector of
9335 symtab_index_entry instead of vector of
9336 std::unique_ptr<symtab_index_entry>. All users adjusted to check
9337 whether an element's name is NULL instead of checking whether the
9338 element itself is NULL.
9339 (find_slot): Change return type. Adjust.
9340 (hash_expand, , add_index_entry, uniquify_cu_indices)
9341 (write_hash_table): Adjust.
9342
9343 2017-06-12 Pedro Alves <palves@redhat.com>
9344
9345 * dwarf2read.c (recursively_count_psymbols): New function.
9346 (write_psymtabs_to_index): Call it to compute number of psyms and
9347 pass estimate size of psyms_seen to unordered_set's ctor.
9348
9349 2017-06-12 Pedro Alves <palves@redhat.com>
9350
9351 * dwarf2read.c (write_hash_table): Check if key already exists
9352 before emplacing.
9353
9354 2017-06-12 Pedro Alves <palves@redhat.com>
9355
9356 * dwarf2read.c (data_buf::append_space): Rename to...
9357 (data_buf::grow): ... this, and make private. Adjust all callers.
9358 (data_buf::append_uint): New method.
9359 (add_address_entry, write_one_signatured_type)
9360 (write_psymtabs_to_index): Use it.
9361
9362 2017-06-12 Pedro Alves <palves@redhat.com>
9363
9364 * dwarf2read.c (file_write(FILE *, const void *, size_t)): Delete.
9365 (file_write (FILE *, const std::vector<Elem>&)): Delete.
9366 (data_buf::file_write): Call ::fwrite directly.
9367
9368 2017-06-12 Pedro Alves <palves@redhat.com>
9369
9370 * dwarf2read.c (uniquify_cu_indices): Use std::unique and
9371 std::vector::erase.
9372
9373 2017-06-12 Jan Kratochvil <jan.kratochvil@redhat.com>
9374
9375 Code cleanup: C++ify .gdb_index producer.
9376 * dwarf2read.c: Include <unordered_set> and <unordered_map>.
9377 (MAYBE_SWAP) [WORDS_BIGENDIAN]: Cast to offset_type.
9378 (struct strtab_entry, hash_strtab_entry, eq_strtab_entry)
9379 (create_strtab, add_string): Remove.
9380 (file_write, data_buf): New.
9381 (struct symtab_index_entry): Use std::vector for cu_indices.
9382 (struct mapped_symtab): Use std::vector for data.
9383 (hash_symtab_entry, eq_symtab_entry, delete_symtab_entry)
9384 (create_symbol_hash_table, create_mapped_symtab, cleanup_mapped_symtab):
9385 Remove.
9386 (find_slot): Change return type. Update it to the new data structures.
9387 (hash_expand, add_index_entry): Update it to the new data structures.
9388 (offset_type_compare): Remove.
9389 (uniquify_cu_indices): Update it to the new data structures.
9390 (c_str_view, c_str_view_hasher, vector_hasher): New.
9391 (add_indices_to_cpool): Remove.
9392 (write_hash_table): Update it to the new data structures.
9393 (struct psymtab_cu_index_map, hash_psymtab_cu_index)
9394 (eq_psymtab_cu_index): Remove.
9395 (psym_index_map): New typedef.
9396 (struct addrmap_index_data): Change addr_obstack pointer to data_buf
9397 reference and std::unordered_map for cu_index_htab.
9398 (add_address_entry, add_address_entry_worker, write_address_map)
9399 (write_psymbols): Update it to the new data structures.
9400 (write_obstack): Remove.
9401 (struct signatured_type_index_data): Change types_list to a data_buf
9402 reference and psyms_seen to a std::unordered_set reference.
9403 (write_one_signatured_type, recursively_write_psymbols)
9404 (write_psymtabs_to_index): Update it to the new data structures.
9405
9406 2017-06-11 Simon Marchi <simon.marchi@ericsson.com>
9407
9408 * NEWS (Changes since GDB 8.0): Announce {set,show} debug
9409 separate-debug-file commands.
9410 * symfile.h (separate_debug_file_debug): New global.
9411 * symfile.c (separate_debug_file_debug): New global.
9412 (separate_debug_file_exists, find_separate_debug_file): Add
9413 debug output.
9414 (_initialize_symfile): Add "set debug separate-debug-file"
9415 command.
9416 * build-id.c (build_id_to_debug_bfd,
9417 find_separate_debug_file_by_buildid): Add debug output.
9418
9419 2017-06-10 Simon Marchi <simon.marchi@polymtl.ca>
9420
9421 * gdbarch.sh (displaced_step_free_closure): Remove.
9422 * gdbarch.h, gdbarch.c: Re-generate.
9423 * aarch64-linux-tdep.c (aarch64_linux_init_abi): Don't set
9424 displaced_step_free_closure.
9425 * amd64-linux-tdep.c (amd64_linux_init_abi_common): Likewise.
9426 * arm-linux-tdep.c (arm_linux_init_abi): Likewise.
9427 * i386-linux-tdep.c (i386_linux_init_abi): Likewise.
9428 * rs6000-aix-tdep.c (rs6000_aix_init_osabi): Likewise.
9429 * rs6000-tdep.c (rs6000_gdbarch_init): Likewise.
9430 * s390-linux-tdep.c (s390_gdbarch_init): Likewise.
9431 * arch-utils.h (simple_displaced_step_free_closure): Remove.
9432 * arch-utils.c (simple_displaced_step_free_closure): Remove.
9433 * infrun.c (displaced_step_clear): Call xfree instead of
9434 gdbarch_displaced_step_free_closure.
9435
9436 2017-06-08 Sergio Durigan Junior <sergiodj@redhat.com>
9437
9438 * common/common-utils.c (stringify_argv): Check for "arg[0] !=
9439 NULL".
9440
9441 2017-06-08 Alan Hayward <alan.hayward@arm.com>
9442
9443 * mn10300-tdep.c (MN10300_MAX_REGISTER_SIZE): Add.
9444 (mn10300_extract_return_value): Use MN10300_MAX_REGISTER_SIZE.
9445 (mn10300_push_dummy_call): Likewise.
9446
9447 2017-06-08 Alan Hayward <alan.hayward@arm.com>
9448
9449 * mi/mi-main.c (register_changed_p): Use value_contents_eq.
9450
9451 2017-06-08 Alan Hayward <alan.hayward@arm.com>
9452
9453 * mi/mi-main.c (register_changed_p): Use cooked_read_value.
9454
9455 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
9456
9457 * NEWS (Changes since GDB 8.0): Announce that GDBserver is now
9458 able to start inferiors using a shell.
9459 (New remote packets): Announce new packet "QStartupWithShell".
9460 * remote.c: Add PACKET_QStartupWithShell.
9461 (extended_remote_create_inferior): Handle new
9462 PACKET_QStartupWithShell.
9463 (remote_protocol_features) <QStartupWithShell>: New entry for
9464 PACKET_QStartupWithShell.
9465 (_initialize_remote): Call "add_packet_config_cmd" for
9466 QStartupShell.
9467
9468 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
9469 Pedro Alves <palves@redhat.com>
9470
9471 * Makefile.in (HFILES_NO_SRCDIR): Add "common/common-inferior.h"
9472 and "nat/fork-inferior.h".
9473 * common/common-inferior.h: New file, with contents from
9474 "gdb/inferior.h".
9475 * commom/common-utils.c: Include "common-utils.h".
9476 (stringify_argv): New function.
9477 * common/common-utils.h (stringify_argv): New prototype.
9478 * configure.nat: Add "fork-inferior.o" as a dependency for
9479 "*linux*", "fbsd*" and "nbsd*" hosts.
9480 * corefile.c (get_exec_file): Update comment.
9481 * darwin-nat.c (darwin_ptrace_him): Call "gdb_startup_inferior"
9482 instead of "startup_inferior".
9483 (darwin_create_inferior): Call "add_thread_silent" after
9484 "fork_inferior".
9485 * fork-child.c: Cleanup unnecessary includes.
9486 (SHELL_FILE): Move to "common/common-fork-child.c".
9487 (environ): Likewise.
9488 (exec_wrapper): Initialize.
9489 (get_exec_wrapper): New function.
9490 (breakup_args): Move to "common/common-fork-child.c"; rename to
9491 "breakup_args_for_exec".
9492 (escape_bang_in_quoted_argument): Move to
9493 "common/common-fork-child.c".
9494 (saved_ui): New variable.
9495 (prefork_hook): New function.
9496 (postfork_hook): Likewise.
9497 (postfork_child_hook): Likewise.
9498 (gdb_startup_inferior): Likewise.
9499 (fork_inferior): Move to "common/common-fork-child.c". Update
9500 function to support gdbserver.
9501 (startup_inferior): Likewise.
9502 * gdbcore.h (get_exec_file): Remove declaration.
9503 * gnu-nat.c (gnu_create_inferior): Call "gdb_startup_inferior"
9504 instead of "startup_inferior". Call "add_thread_silent" after
9505 "fork_inferior".
9506 * inf-ptrace.c: Include "nat/fork-inferior.h" and "utils.h".
9507 (inf_ptrace_create_inferior): Call "gdb_startup_inferior"
9508 instead of "startup_inferior". Call "add_thread_silent" after
9509 "fork_inferior".
9510 * inferior.h: Include "common-inferior.h".
9511 (trace_start_error): Move to "common/common-utils.h".
9512 (trace_start_error_with_name): Likewise.
9513 (fork_inferior): Move prototype to "nat/fork-inferior.h".
9514 (startup_inferior): Likewise.
9515 (gdb_startup_inferior): New prototype.
9516 * nat/fork-inferior.c: New file, with contents from "fork-child.c".
9517 * nat/fork-inferior.h: New file.
9518 * procfs.c (procfs_init_inferior): Call "gdb_startup_inferior"
9519 instead of "startup_inferior". Call "add_thread_silent" after
9520 "fork_inferior".
9521 * target.h (target_terminal_init): Move prototype to
9522 "target/target.h".
9523 (target_terminal_inferior): Likewise.
9524 (target_terminal_ours): Likewise.
9525 * target/target.h (target_terminal_init): New prototype, moved
9526 from "target.h".
9527 (target_terminal_inferior): Likewise.
9528 (target_terminal_ours): Likewise.
9529 * utils.c (gdb_flush_out_err): New function.
9530
9531 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
9532
9533 * Makefile.in (HFILES_NO_SRCDIR): Add "common/common-gdbthread.h".
9534 * common/common-gdbthread.h: New file, with parts from
9535 "gdb/gdbthread.h".
9536 * gdbthread.h: Include "common-gdbthread.h".
9537 (switch_to_thread): Moved to "common/common-gdbthread.h".
9538
9539 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
9540
9541 * Makefile.in (SFILES): Add "common/job-control.c".
9542 (HFILES_NO_SRCDIR): Add "common/job-control.h".
9543 (COMMON_OBS): Add "job-control.o".
9544 * common/job-control.c: New file, with contents from
9545 "gdb/inflow.c".
9546 * common/job-control.h: New file, with contents from "terminal.h".
9547 * fork-child.c: Include "job-control.h".
9548 * inflow.c: Include "job-control.h".
9549 (gdb_setpgid): Move to "common/common-inflow.c".
9550 (_initialize_inflow): Move setting of "job_control" to
9551 "handle_job_control".
9552 * terminal.h (job_control): Moved to "common/common-terminal.h".
9553 (gdb_setpgid): Likewise.
9554 * top.c: Include "job_control.h".
9555 * utils.c: Likewise.
9556 (job_control): Moved to "job-control.c".
9557
9558 2017-06-07 Pedro Alves <palves@redhat.com>
9559
9560 * Makefile.in (SFILES): Add gdb_regex.c.
9561 (COMMON_OBS): Add gdb_regex.o.
9562 * ada-lang.c (ada_add_standard_exceptions)
9563 (ada_add_exceptions_from_frame, name_matches_regex)
9564 (ada_add_global_exceptions, ada_exceptions_list_1): Change regex
9565 parameter type to compiled_regex. Adjust.
9566 (ada_exceptions_list): Use compiled_regex.
9567 * break-catch-throw.c (exception_catchpoint::pattern): Now a
9568 std::unique_ptr<compiled_regex>.
9569 (exception_catchpoint::~exception_catchpoint): Remove regfree
9570 call.
9571 (check_status_exception_catchpoint): Adjust to use compiled_regex.
9572 (handle_gnu_v3_exceptions): Adjust to use compiled_regex.
9573 * breakpoint.c (solib_catchpoint::compiled): Now a
9574 std::unique_ptr<compiled_regex>.
9575 (solib_catchpoint::~solib_catchpoint): Remove regfree call.
9576 (check_status_catch_solib): Adjust to use compiled_regex.
9577 (add_solib_catchpoint): Adjust to use compiled_regex.
9578 * cli/cli-cmds.c (apropos_command): Use compiled_regex.
9579 * cli/cli-decode.c (apropos_cmd): Change regex parameter to
9580 compiled_regex reference. Adjust to use it.
9581 * cli/cli-decode.h: Remove struct re_pattern_buffer forward
9582 declaration. Include "gdb_regex.h".
9583 (apropos_cmd): Change regex parameter to compiled_regex reference.
9584 * gdb_regex.c: New file.
9585 * gdb_regex.h (make_regfree_cleanup, get_regcomp_error): Delete
9586 declarations.
9587 (class compiled_regex): New.
9588 * linux-tdep.c: Include "common/gdb_optional.h".
9589 (struct mapping_regexes): New, factored out from
9590 mapping_is_anonymous_p, and adjusted to use compiled_regex.
9591 (mapping_is_anonymous_p): Use mapping_regexes wrapped in a
9592 gdb::optional and remove cleanups. Adjust to compiled_regex.
9593 * probe.c: Include "common/gdb_optional.h".
9594 (collect_probes): Use compiled_regex and gdb::optional and remove
9595 cleanups.
9596 * skip.c: Include "common/gdb_optional.h".
9597 (skiplist_entry::compiled_function_regexp): Now a
9598 gdb::optional<compiled_regex>.
9599 (skiplist_entry::compiled_function_regexp_is_valid): Delete field.
9600 (free_skiplist_entry): Remove regfree call.
9601 (compile_skip_regexp, skip_rfunction_p): Adjust to use
9602 compiled_regex and gdb::optional.
9603 * symtab.c: Include "common/gdb_optional.h".
9604 (search_symbols): Use compiled_regex and gdb::optional.
9605 * utils.c (do_regfree_cleanup, make_regfree_cleanup)
9606 (get_regcomp_error, compile_rx_or_error): Delete. Some bits moved
9607 to gdb_regex.c.
9608
9609 2017-06-07 Alan Hayward <alan.hayward@arm.com>
9610
9611 * regcache.c (regcache::save): Avoid buffer use.
9612 (regcache::dump): Likewise.
9613
9614 2017-06-07 Alan Hayward <alan.hayward@arm.com>
9615
9616 * sh-tdep.c (sh_pseudo_register_read): Remove
9617 MAX_REGISTER_SIZE.
9618 (sh_pseudo_register_write): Likewise.
9619 * sh64-tdep.c (sh64_pseudo_register_read): Likewise.
9620 (sh64_pseudo_register_write): Likewise
9621
9622 2017-06-07 Alan Hayward <alan.hayward@arm.com>
9623
9624 * aarch64-tdep.c (aarch64_store_return_value): Use
9625 V_REGISTER_SIZE.
9626 (aarch64_pseudo_read_value): Likewise.
9627 (aarch64_pseudo_write): Likewise.
9628
9629 2017-06-06 Yao Qi <yao.qi@linaro.org>
9630
9631 * regformats/regdef.h (set_register_cache): Remove the
9632 declaration.
9633
9634 2017-06-06 Alan Hayward <alan.hayward@arm.com>
9635
9636 * frame.c (frame_unwind_register_signed): Use
9637 frame_unwind_register_value.
9638
9639 2017-06-06 Pedro Alves <palves@redhat.com>
9640
9641 PR breakpoints/21553
9642 * breakpoint.c (create_breakpoints_sal_default)
9643 (init_breakpoint_sal, create_breakpoint_sal): Use
9644 gdb::unique_xmalloc_ptr for string parameters.
9645 (create_breakpoint): Constify 'extra_string' and 'cond_string'
9646 parameters. Replace cleanups with gdb::unique_xmalloc_ptr.
9647 (base_breakpoint_create_breakpoints_sal)
9648 (bkpt_create_breakpoints_sal, tracepoint_create_breakpoints_sal)
9649 (strace_marker_create_breakpoints_sal)
9650 (create_breakpoints_sal_default): Use gdb::unique_xmalloc_ptr for
9651 string parameters.
9652 * breakpoint.h (breakpoint_ops::create_breakpoints_sal): Use
9653 gdb::unique_xmalloc_ptr for string parameters.
9654 (create_breakpoint): Constify 'extra_string' and 'cond_string'
9655 parameters.
9656
9657 2017-06-06 Alan Hayward <alan.hayward@arm.com>
9658
9659 * alpha-tdep.c (alpha_register_to_value): Use
9660 get_frame_register_value.
9661 (alpha_value_to_register): Use ALPHA_REGISTER_SIZE.
9662
9663 2017-06-06 Alan Hayward <alan.hayward@arm.com>
9664
9665 * ia64-tdep.c (IA64_MAX_FP_REGISTER_SIZE) Add.
9666 (ia64_register_to_value): Use IA64_MAX_FP_REGISTER_SIZE.
9667 (ia64_value_to_register): Likewise.
9668 (ia64_extract_return_value): Likewise.
9669 (ia64_store_return_value): Likewise.
9670 (ia64_push_dummy_call): Likewise.
9671
9672 2017-06-04 Joel Brobecker <brobecker@adacore.com>
9673
9674 GDB 8.0 released.
9675
9676 2017-06-03 Simon Marchi <simon.marchi@ericsson.com>
9677
9678 * x86-linux-nat.c (struct arch_lwp_info): Remove.
9679
9680 2017-06-03 Simon Marchi <simon.marchi@polymtl.ca>
9681
9682 * linux-nat.c (linux_nat_post_attach_wait): Remove FIRST
9683 parameter.
9684 (linux_nat_attach): Adjust call to linux_nat_post_attach_wait.
9685
9686 2017-06-02 Simon Marchi <simon.marchi@ericsson.com>
9687
9688 * event-loop.c (poll_timers): Unallocate timer using delete
9689 instead of xfree.
9690
9691 2017-06-02 Simon Marchi <simon.marchi@polymtl.ca>
9692
9693 * breakpoint.h (struct breakpoint_ops) <dtor>: Remove.
9694 (struct breakpoint) <~breakpoint>: New.
9695 (struct watchpoint): Inherit from breakpoint.
9696 <~watchpoint>: New.
9697 <base>: Remove.
9698 (struct tracepoint): Inherit from breakpoint.
9699 <base>: Remove.
9700 * breakpoint.c (longjmp_breakpoint_ops): Remove.
9701 (struct longjmp_breakpoint): Inherit from breakpoint.
9702 <~longjmp_breakpoint>: New.
9703 <base>: Remove.
9704 (new_breakpoint_from_type): Remove casts.
9705 (watchpoint_in_thread_scope): Remove reference to base field.
9706 (watchpoint_del_at_next_stop): Likewise.
9707 (update_watchpoint): Likewise.
9708 (watchpoint_check): Likewise.
9709 (bpstat_check_watchpoint): Likewise.
9710 (set_longjmp_breakpoint): Likewise.
9711 (struct fork_catchpoint): Inherit from breakpoint.
9712 <base>: Remove.
9713 (struct solib_catchpoint): Inherit from breakpoint.
9714 <~solib_catchpoint>: New.
9715 <base>: Remove.
9716 (dtor_catch_solib): Change to ...
9717 (solib_catchpoint::~solib_catchpoint): ... this.
9718 (breakpoint_hit_catch_solib): Remove reference to base field.
9719 (add_solib_catchpoint): Likewise.
9720 (create_fork_vfork_event_catchpoint): Likewise.
9721 (struct exec_catchpoint): Inherit from breakpoint.
9722 <~exec_catchpoint>: New.
9723 <base>: Remove.
9724 (dtor_catch_exec): Change to ...
9725 (exec_catchpoint::~exec_catchpoint): ... this.
9726 (dtor_watchpoint): Change to ...
9727 (watchpoint::~watchpoint): ... this.
9728 (watch_command_1): Remove reference to base field.
9729 (catch_exec_command_1): Likewise.
9730 (base_breakpoint_dtor): Change to ...
9731 (breakpoint::~breakpoint): ... this.
9732 (base_breakpoint_ops): Remove dtor field value.
9733 (longjmp_bkpt_dtor): Change to ...
9734 (longjmp_breakpoint::~longjmp_breakpoint): ... this.
9735 (strace_marker_create_breakpoints_sal): Remove reference to base
9736 field.
9737 (delete_breakpoint): Don't manually call breakpoint destructor.
9738 (create_tracepoint_from_upload): Remove reference to base field.
9739 (trace_pass_set_count): Likewise.
9740 (initialize_breakpoint_ops): Don't initialize
9741 momentary_breakpoint_ops, don't set dtors.
9742 * ada-lang.c (struct ada_catchpoint): Inherit from breakpoint.
9743 <~ada_catchpoint>: New.
9744 <base>: Remove.
9745 (create_excep_cond_exprs): Remove reference to base field.
9746 (dtor_exception): Change to ...
9747 (ada_catchpoint::~ada_catchpoint): ... this.
9748 (dtor_catch_exception): Remove.
9749 (dtor_catch_exception_unhandled): Remove.
9750 (dtor_catch_assert): Remove.
9751 (create_ada_exception_catchpoint): Remove reference to base
9752 field.
9753 (initialize_ada_catchpoint_ops): Don't set dtors.
9754 * break-catch-sig.c (struct signal_catchpoint): Inherit from
9755 breakpoint.
9756 <~signal_catchpoint>: New.
9757 <base>: Remove.
9758 (signal_catchpoint_dtor): Change to ...
9759 (signal_catchpoint::~signal_catchpoint): ... this.
9760 (create_signal_catchpoint): Remove reference to base field.
9761 (initialize_signal_catchpoint_ops): Don't set dtor.
9762 * break-catch-syscall.c (struct syscall_catchpoint): Inherit
9763 from breakpoint.
9764 <~syscall_catchpoint>: New.
9765 <base>: Remove.
9766 (dtor_catch_syscall): Change to ...
9767 (syscall_catchpoint::~syscall_catchpoint): ... this.
9768 (create_syscall_event_catchpoint): Remove reference to base
9769 field.
9770 (initialize_syscall_catchpoint_ops): Don't set dtor.
9771 * break-catch-throw.c (struct exception_catchpoint): Inherit
9772 from breakpoint.
9773 <~exception_catchpoint>: New.
9774 <base>: Remove.
9775 (dtor_exception_catchpoint): Change to ...
9776 (exception_catchpoint::~exception_catchpoint): ... this.
9777 (handle_gnu_v3_exceptions): Remove reference to base field.
9778 (initialize_throw_catchpoint_ops): Don't set dtor.
9779 * ctf.c (ctf_get_traceframe_address): Remove reference to base
9780 field.
9781 * remote.c (remote_get_tracepoint_status): Likewise.
9782 * tracefile-tfile.c (tfile_get_traceframe_address): Likewise.
9783 * tracefile.c (tracefile_fetch_registers): Likewise.
9784 * tracepoint.c (actions_command): Likewise.
9785 (validate_actionline): Likewise.
9786 (tfind_1): Likewise.
9787 (get_traceframe_location): Likewise.
9788 (find_matching_tracepoint_location): Likewise.
9789 (parse_tracepoint_status): Likewise.
9790 * mi/mi-cmd-break.c (mi_cmd_break_passcount): Likewise.
9791
9792 2017-06-02 Simon Marchi <simon.marchi@polymtl.ca>
9793
9794 * breakpoint.c (struct longjmp_breakpoint): New struct.
9795 (is_tracepoint_type): Change return type to bool.
9796 (is_longjmp_type): New function.
9797 (new_breakpoint_from_type): Handle longjmp kinds of breakpoints.
9798 (set_raw_breakpoint_without_location): Use
9799 new_breakpoint_from_type.
9800 (set_raw_breakpoint): Likewise.
9801
9802 2017-06-02 Simon Marchi <simon.marchi@polymtl.ca>
9803
9804 * breakpoint.c (new_breakpoint_from_type): New function.
9805 (create_breakpoint_sal): Use new_breakpoint_from_type and
9806 unique_ptr.
9807 (create_breakpoint): Likewise.
9808
9809 2017-05-31 Simon Marchi <simon.marchi@ericsson.com>
9810
9811 * memattr.c (mem_info_command): Rename to ...
9812 (info_mem_command): ... this.
9813 (mem_enable_command): Rename to ...
9814 (enable_mem_command): ... this.
9815 (mem_disable_command): Rename to ...
9816 (disable_mem_command): ... this.
9817 (mem_delete_command): Rename to ...
9818 (delete_mem_command): ... this.
9819 (_initialize_mem): Adjust function names.
9820
9821 2017-05-31 Markus Metzger <markus.t.metzger@intel.com>
9822
9823 * btrace.c (handle_pt_insn_events): New.
9824 (ftrace_add_pt): Call handle_pt_insn_events. Rename ERRCODE into
9825 STATUS. Split into this and ...
9826 (handle_pt_insn_event_flags): ... this.
9827
9828 2017-05-31 Markus Metzger <markus.t.metzger@intel.com>
9829
9830 * configure.ac: Check for pt_insn_event, struct pt_insn.enabled,
9831 and struct pt_insn.resynced.
9832 * configure: Regenerated.
9833 * config.in: Regenerated.
9834
9835 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
9836
9837 * btrace.c (ftrace_find_call_by_number): New function.
9838 (ftrace_new_function): Store objects, not pointers.
9839 (ftrace_find_call_by_number, ftrace_new_return, ftrace_new_switch,
9840 ftrace_new_gap, ftrace_update_function,
9841 ftrace_compute_global_level_offset, btrace_stich_bts, btrace_clear,
9842 btrace_insn_get, btrace_insn_get_error, btrace_insn_end,
9843 btrace_insn_next, btrace_insn_prev, ptrace_find_insn_by_number,
9844 btrace_ends_with_single_insn, btrace_call_get): Account for
9845 btrace_thread_info::functions now storing objects.
9846 * btrace.h (struct btrace_thread_info): Add constructor.
9847 (struct btrace_thread_info) <functions>: Make std::vector.
9848 (struct btrace_thread_info) <prev, next, up, insn, errcode, flags):
9849 Initialize with default values.
9850 * record-btrace.c (record_btrace_frame_sniffer): Account for
9851 btrace_thread_info::functions now storing objects.
9852
9853 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
9854
9855 * btrace.c: Remove typedef bfun_s.
9856 (ftrace_new_gap): Directly add gaps to the list of gaps.
9857 (btrace_bridge_gaps, btrace_compute_ftrace_bts, pt_btrace_insn_flags,
9858 ftrace_add_pt, btrace_compute_ftrace_pt, btrace_compute_ftrace_1,
9859 btrace_finalize_ftrace, btrace_compute_ftrace): Use std::vector
9860 instead of gdb VEC.
9861
9862 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
9863
9864 * btrace.c (ftrace_fixup_caller, ftrace_new_return, ftrace_connect_bfun,
9865 ftrace_bridge_gap): Replace references to btrace_thread_info::segment
9866 with btrace_thread_info::next_segment and
9867 btrace_thread_info::prev_segment.
9868 * btrace.h: Remove struct btrace_func_link.
9869 (struct btrace_function): Replace pair of function segment pointers
9870 with pair of indices.
9871 * python/py-record-btrace.c (btpy_call_prev_sibling,
9872 btpy_call_next_sibling): Replace references to
9873 btrace_thread_info::segment with btrace_thread_info::next_segment and
9874 btrace_thread_info::prev_segment.
9875 * record-btrace.c (record_btrace_frame_this_id): Use
9876 btrace_find_call_by_number.
9877
9878 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
9879
9880 * btrace.c (ftrace_new_function, ftrace_fixup_level,
9881 ftrace_connect_bfun, ftrace_bridge_gap, btrace_bridge_gaps,
9882 btrace_insn_next, btrace_insn_prev): Remove references to
9883 btrace_thread_info::flow.
9884 * btrace.h (struct btrace_function): Remove FLOW.
9885
9886 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
9887
9888 * btrace.c (ftrace_find_call_by_number): New function.
9889 (ftrace_update_caller, ftrace_new_call, ftrace_new_tailcall,
9890 ftrace_get_caller, ftrace_find_call, ftrace_new_return,
9891 ftrace_match_backtrace, ftrace_connect_bfun, ftrace_connect_backtrace,
9892 ftrace_bridge_gap, btrace_bridge_gaps): Use btrace_function::up as an
9893 index.
9894 * btrace.h (struct btrace_function): Turn UP into an index.
9895 * python/py-record-btrace.c (btpy_call_up): Use btrace_function::up
9896 as an index.
9897 * record-btrace.c (record_btrace_frame_unwind_stop_reason,
9898 record_btrace_frame_prev_register, record_btrace_frame_sniffer,
9899 record_btrace_tailcall_frame_sniffe): Use btrace_find_call_by_number.
9900
9901 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
9902
9903 * btrace.c (ftrace_new_function, ftrace_new_call, ftrace_new_tailcall,
9904 ftrace_new_return, ftrace_new_switch, ftrace_new_gap,
9905 ftrace_update_function, ftrace_compute_global_level_offset,
9906 btrace_compute_ftrace_bts, ftrace_add_pt, btrace_compute_ftrace_pt,
9907 btrace_stitch_bts, btrace_fetch, btrace_clear, btrace_insn_number,
9908 btrace_insn_end, btrace_is_empty): Remove references to
9909 btrace_thread_info::begin and btrace_thread_info::end.
9910 * btrace.h (struct btrace_thread_info): Remove BEGIN and END.
9911 (struct btrace_thread_info) <functions>: Adjust comment.
9912 * record-btrace.c (record_btrace_start_replaying): Remove reference to
9913 btrace_thread_info::begin.
9914
9915 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
9916
9917 * btrace.c (ftrace_new_function, ftrace_new_call, ftrace_new_tailcall,
9918 ftrace_new_return, ftrace_new_switch, ftrace_new_gap,
9919 ftrace_update_function): Remove arguments that implicitly were always
9920 BTINFO->END.
9921 (btrace_compute_ftrace_bts, ftrace_add_pt, btrace_compute_ftrace_pt):
9922 Don't pass BTINFO->END.
9923
9924 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
9925
9926 * btrace.c: (btrace_insn_get, btrace_insn_get_error, btrace_insn_number,
9927 btrace_insn_begin, btrace_insn_end, btrace_insn_next, btrace_insn_prev,
9928 btrace_find_insn_by_number): Replace function segment pointer with
9929 index.
9930 (btrace_insn_cmp): Simplify.
9931 * btrace.h: (struct btrace_insn_iterator) Rename index to
9932 insn_index. Replace function segment pointer with index into function
9933 segment vector.
9934 * record-btrace.c (record_btrace_call_history): Replace function
9935 segment pointer use with index.
9936 (record_btrace_frame_sniffer): Retrieve function call segment through
9937 vector.
9938 (record_btrace_set_replay): Remove defunc't safety check.
9939
9940 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
9941
9942 * btrace.c (btrace_ends_with_single_insn): New function.
9943 (btrace_call_get, btrace_call_number, btrace_call_begin,
9944 btrace_call_end, btrace_call_next, btrace_call_prev,
9945 btrace_find_call_by_number): Use index into call segment vector
9946 instead of pointer.
9947 (btrace_call_cmp): Simplify.
9948 * btrace.h (struct btrace_call_iterator): Replace function call segment
9949 pointer with index into vector.
9950 * record-btrace.c (record_btrace_call_history): Use index instead of
9951 pointer.
9952
9953 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
9954
9955 * btrace.c (btrace_insn_begin, btrace_insn_end,
9956 btrace_find_insn_by_number): Add btinfo to iterator.
9957 * btrace.h (struct btrace_insn_iterator): Add btinfo.
9958
9959 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
9960
9961 * btrace.c (ftrace_new_function): Add btrace_thread_info to arguments
9962 and save pointers directly.
9963 (ftrace_new_call, ftrace_new_tailcall, ftrace_new_return,
9964 ftrace_new_switch, ftrace_new_gap, ftrace_update_function,
9965 ftrace_add_pt): Add btrace_thread_info to arguments. Adjust for
9966 changed signature of functions.
9967 (btrace_compute_ftrace_pt): Adjust for changed signature of functions.
9968 (btrace_fetch): Remove code that adds btrace_function pointers to
9969 vector of btrace_functions.
9970 (btrace_clear): Simplify freeing vector of btrace_functions.
9971
9972 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
9973
9974 * btrace.c (btrace_fetch, btrace_clear, btrace_find_insn_by_number):
9975 Replace VEC_* with std::vector functions.
9976 * btrace.h: Add include: vector. Remove typedef for DEF_VEC_P.
9977 (struct btrace_thread_info)<functions>: Change type to std::vector.
9978
9979 2017-05-30 Simon Marchi <simon.marchi@ericsson.com>
9980
9981 * NEWS (Changes in GDB 8.0): Remove extra empty line. Move
9982 "Removed targets and native configurations" up. Merge duplicate
9983 "New commands" sub-sections. Add "New options" sub-sections.
9984
9985 2017-05-26 Alan Hayward <alan.hayward@arm.com>
9986
9987 * defs.h (copy_integer_to_size): New declaration.
9988 * findvar.c (copy_integer_to_size): New function.
9989 (do_cint_test): New selftest function.
9990 (copy_integer_to_size_test): Likewise.
9991 (_initialize_findvar): Likewise.
9992 * mips-fbsd-tdep.c (mips_fbsd_supply_reg): Use raw_supply_integer.
9993 (mips_fbsd_collect_reg): Use raw_collect_integer.
9994 * mips-linux-tdep.c (supply_32bit_reg): Use raw_supply_integer.
9995 (mips64_fill_gregset): Use raw_collect_integer
9996 (mips64_fill_fpregset): Use raw_supply_integer.
9997 * regcache.c (regcache::raw_supply_integer): New function.
9998 (regcache::raw_collect_integer): Likewise.
9999 * regcache.h: (regcache::raw_supply_integer): New declaration.
10000 (regcache::raw_collect_integer): Likewise.
10001
10002 2017-05-24 Yao Qi <yao.qi@linaro.org>
10003
10004 * Makefile.in (SFILES): Add gdbarch-selftests.c.
10005 (COMMON_OBS): Add gdbarch-selftests.o.
10006 * frame.c [GDB_SELF_TESTS] (create_new_frame): New function.
10007 * frame.h [GDB_SELF_TESTS] (create_new_frame): Declare.
10008 * gdbarch-selftests.c: New file.
10009 * regcache.h (regcache) <~regcache>: Mark it virtual if
10010 GDB_SELF_TEST.
10011 <raw_write>: Likewise.
10012
10013 2017-05-24 Yao Qi <yao.qi@linaro.org>
10014
10015 * regcache.c (current_regcache): Change it to
10016 regcache::current_regcache.
10017 (regcache_observer_target_changed): Update.
10018 (regcache_thread_ptid_changed): Make it a regcache static
10019 method.
10020 (regcache_thread_ptid_changed): Update.
10021 (class regcache_access): New.
10022 (current_regcache_test): Update.
10023 (_initialize_regcache): Update.
10024 * regcache.h: Include forward_list.
10025 (regcache): Declare regcache_thread_ptid_changed and declare
10026 registers_changed_ptid as friend.
10027
10028 2017-05-24 Yao Qi <yao.qi@linaro.org>
10029
10030 * i387-tdep.c (i387_register_to_value): Use register_size
10031 instead of TYPE_LENGTH.
10032 * m68k-tdep.c (m68k_register_to_value): Likewise.
10033
10034 2017-05-24 Yao Qi <yao.qi@linaro.org>
10035
10036 * i387-tdep.c (i387_convert_register_p): Return false if type
10037 code isn't TYPE_CODE_FLT.
10038
10039 2017-05-24 Yao Qi <yao.qi@linaro.org>
10040
10041 * alpha-tdep.c (alpha_convert_register_p): Return true if type
10042 length is 4.
10043 (alpha_register_to_value): Remove type length check.
10044 (alpha_value_to_register): Likewise.
10045
10046 2017-05-24 Yao Qi <yao.qi@linaro.org>
10047
10048 * ia64-tdep.c (ia64_convert_register_p): Check type's code is
10049 TYPE_CODE_FLT.
10050
10051 2017-05-24 Yao Qi <yao.qi@linaro.org>
10052
10053 * m68k-tdep.c (m68k_convert_register_p): Check type's code is
10054 TYPE_CODE_FLT or not.
10055
10056 2017-05-24 Yao Qi <yao.qi@linaro.org>
10057
10058 * alpha-tdep.c (alpha_gdbarch_init): Use XCNEW instead of XNEW.
10059 * avr-tdep.c (avr_gdbarch_init): Likewise.
10060 * bfin-tdep.c (bfin_gdbarch_init): Likewise.
10061 * cris-tdep.c (cris_gdbarch_init): Likewise.
10062 * ft32-tdep.c (ft32_gdbarch_init): Likewise.
10063 * lm32-tdep.c (lm32_gdbarch_init): Likewise.
10064 * m32r-tdep.c (m32r_gdbarch_init): Likewise.
10065 * m68hc11-tdep.c (m68hc11_gdbarch_init): Likewise.
10066 * mep-tdep.c (mep_gdbarch_init): Likewise.
10067 * microblaze-tdep.c (microblaze_gdbarch_init): Likewise.
10068 * mips-tdep.c (mips_gdbarch_init): Likewise.
10069 * mn10300-tdep.c (mn10300_gdbarch_init): Likewise.
10070 * moxie-tdep.c (moxie_gdbarch_init): Likewise.
10071 * msp430-tdep.c (msp430_gdbarch_init): Likewise.
10072 * sh64-tdep.c (sh64_gdbarch_init): Likewise.
10073 * v850-tdep.c (v850_gdbarch_init): Likewise.
10074
10075 2017-05-24 Yao Qi <yao.qi@linaro.org>
10076
10077 * selftest-arch.c (tests_with_arch): Call registers_changed
10078 and reinit_frame_cache.
10079 * selftest.c (run_self_tests): Likewise.
10080
10081 2017-05-24 Yao Qi <yao.qi@linaro.org>
10082
10083 * rs6000-tdep.c (gdb_print_insn_powerpc): Remove.
10084 (rs6000_gdbarch_init): Don't call set_gdbarch_print_insn.
10085
10086 2017-05-24 Yao Qi <yao.qi@linaro.org>
10087
10088 * rl78-tdep.c (rl78_gdbarch_init): Don't call
10089 set_gdbarch_print_insn.
10090
10091 2017-05-24 Yao Qi <yao.qi@linaro.org>
10092
10093 * h8300-tdep.c (h8300_gdbarch_init): Don't call
10094 set_gdbarch_print_insn.
10095
10096 2017-05-24 Yao Qi <yao.qi@linaro.org>
10097
10098 * alpha-tdep.c (alpha_gdbarch_init): Don't call
10099 set_gdbarch_print_insn.
10100 * arc-tdep.c (arc_gdbarch_init): Likewise.
10101 * arch-utils.c: include dis-asm.h.
10102 (default_print_insn): New function.
10103 * arch-utils.h (default_print_insn): Declare.
10104 * avr-tdep.c (avr_gdbarch_init): Don't call set_gdbarch_print_insn.
10105 * bfin-tdep.c (bfin_gdbarch_init): Likewise.
10106 * cris-tdep.c (cris_delayed_get_disassembler): Remove.
10107 (cris_gdbarch_init): Don't call set_gdbarch_print_insn.
10108 * frv-tdep.c (frv_gdbarch_init): Likewise.
10109 * ft32-tdep.c (ft32_gdbarch_init): Likewise.
10110 * gdbarch.sh (print_insn): Use default_print_insn.
10111 * gdbarch.c: Regenerated.
10112 * hppa-tdep.c (hppa_gdbarch_init): Likewise.
10113 * iq2000-tdep.c (iq2000_gdbarch_init): Likewise.
10114 * lm32-tdep.c (lm32_gdbarch_init): Likewise.
10115 * m32c-tdep.c (m32c_gdbarch_init): Likewise.
10116 * m32r-tdep.c (m32r_gdbarch_init): Likewise.
10117 * m68hc11-tdep.c (gdb_print_insn_m68hc11): Remove.
10118 (m68hc11_gdbarch_init): Don't call set_gdbarch_print_insn.
10119 * m68k-tdep.c (m68k_gdbarch_init): Likewise.
10120 * m88k-tdep.c (m88k_gdbarch_init): Likewise.
10121 * microblaze-tdep.c (microblaze_gdbarch_init): Likewise.
10122 * mn10300-tdep.c (mn10300_gdbarch_init): Likewise.
10123 * moxie-tdep.c (moxie_gdbarch_init): Likewise.
10124 * msp430-tdep.c (msp430_gdbarch_init): Likewise.
10125 * mt-tdep.c (mt_gdbarch_init): Likewise.
10126 * nds32-tdep.c (nds32_gdbarch_init): Likewise.
10127 * nios2-tdep.c (nios2_print_insn): Remove.
10128 (nios2_gdbarch_init): Don't call set_gdbarch_print_insn.
10129 * rx-tdep.c (rx_gdbarch_init): Likewise.
10130 * s390-linux-tdep.c (s390_gdbarch_init): Likewise.
10131 * score-tdep.c (score_print_insn): Remove.
10132 (score_gdbarch_init): Don't call set_gdbarch_print_insn.
10133 * sh-tdep.c (sh_gdbarch_init): Likewise.
10134 * sh64-tdep.c (sh64_gdbarch_init): Likewise.
10135 * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
10136 * tic6x-tdep.c (tic6x_print_insn): Remove.
10137 (tic6x_gdbarch_init): Don't call set_gdbarch_print_insn.
10138 * tilegx-tdep.c (tilegx_gdbarch_init): Likewise.
10139 * v850-tdep.c (v850_gdbarch_init): Likewise.
10140 * vax-tdep.c (vax_gdbarch_init): Likewise.
10141 * xstormy16-tdep.c (xstormy16_gdbarch_init): Likewise.
10142 * xtensa-tdep.c (xtensa_gdbarch_init): Likewise.
10143
10144 2017-05-23 John Baldwin <jhb@FreeBSD.org>
10145
10146 * mips-fbsd-tdep.c (MIPS_PC_REGNUM): Remove.
10147 (MIPS_FP0_REGNUM): Remove.
10148 (MIPS_FSR_REGNUM): Remove.
10149 (mips_fbsd_supply_fpregs): Use mips_regnum.
10150 (mips_fbsd_supply_gregs): Likewise.
10151 (mips_fbsd_collect_fpregs): Likewise.
10152 (mips_fbsd_collect_gregs): Likewise.
10153
10154 2017-05-23 John Baldwin <jhb@FreeBSD.org>
10155
10156 * mips-fbsd-nat.c (getregs_supplies): Fix upper bound comparison.
10157 (getpfpregs_supplies): New function.
10158 (mips_fbsd_fetch_inferior_registers): Remove early exit and use
10159 getfpregs_supplies.
10160 (mips_fbsd_store_inferior_registers): Likewise.
10161
10162 2017-05-22 Pedro Alves <palves@redhat.com>
10163
10164 * MAINTAINERS (Host/Native): Add John Baldwin as FreeBSD
10165 maintainer.
10166
10167 2017-05-22 Alan Hayward <alan.hayward@arm.com>
10168
10169 * ppc-linux-nat.c (fetch_register): Use PPC_MAX_REGISTER_SIZE.
10170 (store_register): Likewise.
10171 * ppc-sysv-tdep.c (ppc_sysv_abi_push_dummy_call): Likewise.
10172 (get_decimal_float_return_value): Likewise.
10173 (do_ppc_sysv_return_value): Likewise.
10174 (ppc64_sysv_abi_push_integer): Likewise.
10175 (ppc64_sysv_abi_push_freg): Likewise.
10176 (ppc64_sysv_abi_return_value_base): Likewise.
10177 (ppc64_sysv_abi_return_value): Likewise.
10178 * rs6000-aix-tdep.c (rs6000_push_dummy_call): Likewise.
10179 * rs6000-lynx178-tdep.c (rs6000_lynx178_push_dummy_call): Likewise.
10180 * rs6000-nat.c: Likewise.
10181 * rs6000-tdep.c (rs6000_register_to_value): Likewise.
10182 (rs6000_value_to_register): Likewise.
10183 * ppc-tdep.h (PPC_MAX_REGISTER_SIZE): Add.
10184
10185 2017-05-21 Tom Tromey <tom@tromey.com>
10186
10187 PR rust/21466:
10188 * rust-lang.c (rust_print_type) <TYPE_CODE_ARRAY>: Print unsized
10189 arrays as "[T]", not "[T; ]".
10190
10191 2017-05-19 Tom Tromey <tom@tromey.com>
10192
10193 PR rust/21484:
10194 * rust-lang.c (exp_descriptor_rust): New function.
10195 (rust_language_defn): Use it.
10196 * p-lang.c (pascal_language_defn): Update.
10197 * opencl-lang.c (opencl_language_defn): Update.
10198 * objc-lang.c (objc_language_defn): Update.
10199 * m2-lang.c (m2_language_defn): Update.
10200 * language.h (struct language_defn)
10201 <la_watch_location_expression>: New member.
10202 * language.c (unknown_language_defn, auto_language_defn)
10203 (local_language_defn): Update.
10204 * go-lang.c (go_language_defn): Update.
10205 * f-lang.c (f_language_defn): Update.
10206 * d-lang.c (d_language_defn): Update.
10207 * c-lang.h (c_watch_location_expression): Declare.
10208 * c-lang.c (c_watch_location_expression): New function.
10209 (c_language_defn, cplus_language_defn, asm_language_defn)
10210 (minimal_language_defn): Use it.
10211 * breakpoint.c (watch_command_1): Call
10212 la_watch_location_expression.
10213 * ada-lang.c (ada_language_defn): Update.
10214
10215 2017-05-19 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
10216
10217 PR tui/21482
10218 * gdb_curses.h (NOMACROS): Define.
10219 (NCURSES_NOMACROS): Define.
10220
10221 2017-05-19 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
10222
10223 PR tui/21482
10224 * tui/tui-windata.c (tui_erase_data_content): Cast last mvwaddstr
10225 arg to char *.
10226 * tui/tui-wingeneral.c (box_win): Likewise.
10227 * tui/tui-winsource.c (tui_erase_source_content): Likewise.
10228 (tui_show_source_line): Likewise.
10229 (tui_show_exec_info_content): Likewise.
10230
10231 2017-05-19 Vladimir Mezentsev <vladimir.mezentsev@oracle.com>
10232
10233 * sparc-tdep.c (sparc_structure_return_p)
10234 (sparc_arg_on_registers_p): New functions.
10235 (sparc32_store_arguments): Use them.
10236 * sparc64-tdep.c (sparc64_16_byte_align_p)
10237 (sparc64_store_floating_fields, sparc64_extract_floating_fields):
10238 Handle TYPE_CODE_ARRAY.
10239
10240 2017-05-17 Yao Qi <yao.qi@linaro.org>
10241
10242 * cli/cli-decode.c (add_alias_cmd): New function.
10243 * command.h (add_alias_cmd): Declare.
10244 * infcmd.c (_initialize_infcmd): Don't call add_com_alias,
10245 instead call add_alias_cmd.
10246
10247 2017-05-17 Pedro Alves <palves@redhat.com>
10248
10249 * Makefile.in (nat_extra_makefile_frag): Rename to ...
10250 (nat_makefile_frag): ... this. All references updated.
10251 * configure.ac: Likewise.
10252 * configure.nat: Likewise. Enhance comments.
10253 * configure: Regenerate.
10254
10255 2017-05-15 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
10256
10257 * procfs.c (procfs_create_inferior): Change prototype to match
10258 definition.
10259
10260 2017-05-13 Eli Zaretskii <eliz@gnu.org>
10261
10262 * tui/tui.c (tui_enable): Cast "unknown" to 'char *' to avoid a
10263 C++ compiler warning.
10264
10265 2017-05-12 Tom Tromey <tom@tromey.com>
10266
10267 PR rust/21483:
10268 * rust-lang.c (rust_evaluate_subexp) <STRUCTOP_STRUCT>: Don't
10269 recurse, just call value_struct_elt directly.
10270
10271 2017-05-12 Tom Tromey <tom@tromey.com>
10272
10273 * rust-lang.c (rust_dump_subexp_body) <STRUCTOP_ANONYMOUS,
10274 OP_RUST_ARRAY>: Fix.
10275
10276 2017-05-12 Tom Tromey <tom@tromey.com>
10277
10278 * rust-lang.c (rust_print_subexp): Replace "return" with "break".
10279
10280 2017-05-09 Yao Qi <yao.qi@linaro.org>
10281
10282 * regcache.c: Include <forward_list>.
10283 (struct regcache_list): Remove.
10284 (current_regcache): Update.
10285 (get_thread_arch_aspace_regcache): Update for std::forward_list.
10286 (regcache_thread_ptid_changed): Likewise.
10287 (registers_changed_ptid): Likewise.
10288 (current_regcache_size): Likewise.
10289
10290 2017-05-09 Yao Qi <yao.qi@linaro.org>
10291
10292 * regcache.c [GDB_SELF_TEST]: Include selftest.h.
10293 (current_regcache_size): New function.
10294 (current_regcache_test): New function.
10295 (_initialize_regcache) [GDB_SELF_TEST]: Register the unit test.
10296
10297 2017-05-08 Alan Hayward <alan.hayward@arm.com>
10298
10299 * mips-tdep.c (mips_o32_return_value): Remove unused buffer.
10300 (print_gp_register_row): Use get_frame_register_value.
10301
10302 2017-05-08 Alan Hayward <alan.hayward@arm.com>
10303
10304 * mips-linux-tdep.c (mips_supply_gregset): Use raw_supply_zeroed.
10305 (mips_supply_fpregset): Likewise.
10306 (mips64_supply_gregset): Likewise.
10307
10308 2017-05-08 Alan Hayward <alan.hayward@arm.com>
10309
10310 * mn10300-linux-tdep.c (am33_supply_gregset_method): Use
10311 regcache->raw_supply_zeroed.
10312
10313 2017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
10314
10315 * configure.nat: Rearrange 'case' statements to match
10316 host before cpu.
10317
10318 2017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
10319
10320 * Makefile.in: Remove "@host_makefile_frag@". Add variables
10321 NAT_FILE, NATDEPFILES, NAT_CDEPS, LOADLIBES, MH_CFLAGS, XM_CLIBS,
10322 NAT_GENERATED_FILES, HAVE_NATIVE_GCORE_HOST. Add
10323 "@nat_extra_makefile_frag@".
10324 (Makefile): Remove dependency on "@frags@".
10325 ($(GNULIB_BUILDDIR)/Makefile): Likewise.
10326 (data-directory/Makefile): Likewise.
10327 * config/aarch64/linux.mh: Deleted; moved contents to
10328 "gdb/configure.nat".
10329 * config/alpha/alpha-linux.mh: Likewise.
10330 * config/alpha/nbsd.mh: Likewise.
10331 * config/arm/linux.mh: Likewise.
10332 * config/arm/nbsdelf.mh: Likewise.
10333 * config/i386/cygwin.mh: Likewise.
10334 * config/i386/cygwin64.mh: Likewise.
10335 * config/i386/darwin.mh: Likewise.
10336 * config/i386/fbsd.mh: Likewise.
10337 * config/i386/fbsd64.mh: Likewise.
10338 * config/i386/go32.mh: Likewise.
10339 * config/i386/i386gnu.mh: Likewise.
10340 * config/i386/i386sol2.mh: Likewise.
10341 * config/i386/linux.mh: Likewise.
10342 * config/i386/linux64.mh: Likewise.
10343 * config/i386/mingw.mh: Likewise.
10344 * config/i386/mingw64.mh: Likewise.
10345 * config/i386/nbsd64.mh: Likewise.
10346 * config/i386/nbsdelf.mh: Likewise.
10347 * config/i386/nto.mh: Likewise.
10348 * config/i386/obsd.mh: Likewise.
10349 * config/i386/obsd64.mh: Likewise.
10350 * config/i386/sol2-64.mh: Likewise.
10351 * config/ia64/linux.mh: Likewise.
10352 * config/m32r/linux.mh: Likewise.
10353 * config/m68k/linux.mh: Likewise.
10354 * config/m68k/nbsdelf.mh: Likewise.
10355 * config/m68k/obsd.mh: Likewise.
10356 * config/m88k/obsd.mh: Likewise.
10357 * config/mips/fbsd.mh: Likewise.
10358 * config/mips/linux.mh: Likewise.
10359 * config/mips/nbsd.mh: Likewise.
10360 * config/mips/obsd64.mh: Likewise.
10361 * config/pa/linux.mh: Likewise.
10362 * config/pa/nbsd.mh: Likewise.
10363 * config/pa/obsd.mh: Likewise.
10364 * config/powerpc/aix.mh: Likewise.
10365 * config/powerpc/fbsd.mh: Likewise.
10366 * config/powerpc/linux.mh: Likewise.
10367 * config/powerpc/nbsd.mh: Likewise.
10368 * config/powerpc/obsd.mh: Likewise.
10369 * config/powerpc/ppc64-linux.mh: Likewise.
10370 * config/powerpc/spu-linux.mh: Likewise.
10371 * config/s390/linux.mh: Likewise.
10372 * config/sh/nbsd.mh: Likewise.
10373 * config/sparc/fbsd.mh: Likewise.
10374 * config/sparc/linux.mh: Likewise.
10375 * config/sparc/linux64.mh: Likewise.
10376 * config/sparc/nbsd64.mh: Likewise.
10377 * config/sparc/nbsdelf.mh: Likewise.
10378 * config/sparc/obsd64.mh: Likewise.
10379 * config/sparc/sol2.mh: Likewise.
10380 * config/tilegx/linux.mh: Likewise.
10381 * config/vax/nbsdelf.mh: Likewise.
10382 * config/vax/obsd.mh: Likewise.
10383 * config/xtensa/linux.mh: Likewise.
10384 * config/i386/i386gnu.mn: New file, with excerpts from
10385 "config/i386/i386gnu.mh".
10386 * configure: Regenerate.
10387 * configure.ac: Rewrite code to use "gdb/configure.nat" instead of
10388 *.mh files under "gdb/config".
10389 * configure.nat: New file, with contents from the
10390 "gdb/config/*/*.mh" files.
10391
10392 2017-05-05 Tim Wiederhake <tim.wiederhake@intel.com>
10393
10394 * btrace.c (btrace_clear): Free insn vector.
10395
10396 2017-05-05 Pedro Alves <palves@redhat.com>
10397
10398 * warning.m4 (build_warnings): Add -Wno-error=maybe-uninitialized.
10399 * configure: Regenerate.
10400
10401 2017-05-04 Pedro Alves <palves@redhat.com>
10402
10403 * Makefile.in (SFILES): Add progspace-and-thread.c.
10404 (HFILES_NO_SRCDIR): Add progspace-and-thread.h.
10405 (COMMON_OBS): Add progspace-and-thread.o.
10406 * breakpoint.c: Include "progspace-and-thread.h".
10407 (update_inserted_breakpoint_locations)
10408 (insert_breakpoint_locations, create_longjmp_master_breakpoint):
10409 Use scoped_restore_current_pspace_and_thread.
10410 (create_std_terminate_master_breakpoint): Use
10411 scoped_restore_current_program_space.
10412 (remove_breakpoint): Use scoped_restore_current_pspace_and_thread.
10413 (print_breakpoint_location): Use
10414 scoped_restore_current_program_space.
10415 (bp_loc_is_permanent): Use
10416 scoped_restore_current_pspace_and_thread.
10417 (resolve_sal_pc): Use scoped_restore_current_pspace_and_thread.
10418 (download_tracepoint_locations): Use
10419 scoped_restore_current_pspace_and_thread.
10420 (breakpoint_re_set): Use scoped_restore_current_pspace_and_thread.
10421 * exec.c (exec_close_1): Use scoped_restore_current_program_space.
10422 (enum step_over_calls_kind): Moved from inferior.h.
10423 (class scoped_restore_current_thread): New class.
10424 * gdbthread.h (make_cleanup_restore_current_thread): Delete
10425 declaration.
10426 (scoped_restore_current_thread): New class.
10427 * infcmd.c: Include "common/gdb_optional.h".
10428 (continue_1, proceed_after_attach): Use
10429 scoped_restore_current_thread.
10430 (notice_new_inferior): Use scoped_restore_current_thread.
10431 * inferior.c: Include "progspace-and-thread.h".
10432 (restore_inferior, save_current_inferior): Delete.
10433 (add_inferior_command, clone_inferior_command): Use
10434 scoped_restore_current_pspace_and_thread.
10435 * inferior.h (scoped_restore_current_inferior): New class.
10436 * infrun.c: Include "progspace-and-thread.h" and
10437 "common/gdb_optional.h".
10438 (follow_fork_inferior): Use
10439 scoped_restore_current_pspace_and_thread.
10440 (scoped_restore_exited_inferior): New class.
10441 (handle_vfork_child_exec_or_exit): Use
10442 scoped_restore_exited_inferior,
10443 scoped_restore_current_pspace_and_thread,
10444 scoped_restore_current_thread and scoped_restore.
10445 (fetch_inferior_event): Use scoped_restore_current_thread.
10446 * linespec.c (decode_line_full, decode_line_1): Use
10447 scoped_restore_current_program_space.
10448 * mi/mi-main.c: Include "progspace-and-thread.h".
10449 (exec_continue): Use scoped_restore_current_thread.
10450 (mi_cmd_exec_run): Use scoped_restore_current_pspace_and_thread.
10451 (mi_cmd_trace_frame_collected): Use scoped_restore_current_thread.
10452 * proc-service.c (ps_pglobal_lookup): Use
10453 scoped_restore_current_program_space.
10454 * progspace-and-thread.c: New file.
10455 * progspace-and-thread.h: New file.
10456 * progspace.c (release_program_space, clone_program_space): Use
10457 scoped_restore_current_program_space.
10458 (restore_program_space, save_current_program_space)
10459 (save_current_space_and_thread): Delete.
10460 (switch_to_program_space_and_thread): Moved to
10461 progspace-and-thread.c.
10462 * progspace.h (save_current_program_space)
10463 (save_current_space_and_thread): Delete declarations.
10464 (scoped_restore_current_program_space): New class.
10465 * remote.c (remote_btrace_maybe_reopen): Use
10466 scoped_restore_current_thread.
10467 * symtab.c: Include "progspace-and-thread.h".
10468 (skip_prologue_sal): Use scoped_restore_current_pspace_and_thread.
10469 * thread.c (print_thread_info_1): Use
10470 scoped_restore_current_thread.
10471 (struct current_thread_cleanup): Delete.
10472 (do_restore_current_thread_cleanup)
10473 (restore_current_thread_cleanup_dtor): Rename/convert both to ...
10474 (scoped_restore_current_thread::~scoped_restore_current_thread):
10475 ... this new dtor.
10476 (make_cleanup_restore_current_thread): Rename/convert to ...
10477 (scoped_restore_current_thread::scoped_restore_current_thread):
10478 ... this new ctor.
10479 (thread_apply_all_command): Use scoped_restore_current_thread.
10480 (thread_apply_command): Use scoped_restore_current_thread.
10481 * tracepoint.c (tdump_command): Use scoped_restore_current_thread.
10482 * varobj.c (value_of_root_1): Use scoped_restore_current_thread.
10483
10484 2017-05-04 Pedro Alves <palves@redhat.com>
10485
10486 * thread.c (make_cleanup_restore_current_thread): Move
10487 find_thread_ptid call before the is_stopped call. Assert that the
10488 thread is found. Replace is_stopped call by checking the thread's
10489 state directly. Remove unnecessary NULL-thread check.
10490
10491 2017-05-04 Pedro Alves <palves@redhat.com>
10492
10493 * corelow.c (thread_section_name): New class.
10494 (get_core_register_section, get_core_siginfo): Use it.
10495
10496 2017-05-04 Andreas Arnez <arnez@linux.vnet.ibm.com>
10497
10498 * corelow.c (sniff_core_bfd): Remove extra semicolon.
10499 (get_core_register_section): Remove xfree of NULL pointer.
10500
10501 2017-05-03 Alan Hayward <alan.hayward@arm.com>
10502
10503 * frv-linux-tdep.c (frv_linux_supply_gregset): Use raw_supply_zeroed.
10504 * regcache.c (regcache::raw_supply_zeroed): New function.
10505 * regcache.h (regcache::raw_supply_zeroed): New declaration.
10506
10507 2017-05-03 Simon Marchi <simon.marchi@ericsson.com>
10508
10509 * gdbarch.sh: Remove commented out definition of
10510 TARGET_CHAR_BIT.
10511 * gdbarch.h: Re-generate.
10512
10513 2017-05-03 Sergio Durigan Junior <sergiodj@redhat.com>
10514
10515 * configure: Regenerate.
10516
10517 2017-05-02 Simon Marchi <simon.marchi@ericsson.com>
10518
10519 * solib-target.c (solib_target_relocate_section_addresses):
10520 Remove num_section_bases, num_bases, segment_bases variables.
10521
10522 2017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
10523
10524 * common/gdb_vecs.h (DEF_VEC_I (CORE_ADDR)): Remove.
10525
10526 2017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
10527
10528 * solib-target.c: Include <vector>
10529 (struct lm_info_target) <~lm_info_target>: Remove.
10530 <segment_bases, section_bases>: Change type to
10531 std::vector<CORE_ADDR>.
10532 (library_list_start_segment, library_list_start_section,
10533 library_list_end_library,
10534 solib_target_relocate_section_addresses): Adjust.
10535
10536 2017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
10537
10538 * gdbarch.sh (software_single_step): Change return type to
10539 std::vector<CORE_ADDR>.
10540 * gdbarch.c, gdbarch.h: Re-generate.
10541 * arch/arm-get-next-pcs.c (thumb_deal_with_atomic_sequence_raw):
10542 Adjust.
10543 (arm_deal_with_atomic_sequence_raw): Adjust.
10544 (thumb_get_next_pcs_raw): Adjust.
10545 (arm_get_next_pcs_raw): Adjust.
10546 (arm_get_next_pcs): Adjust.
10547 * arch/arm-get-next-pcs.h (arm_get_next_pcs): Adjust.
10548 * aarch64-tdep.c (aarch64_software_single_step): Adjust.
10549 * alpha-tdep.c (alpha_deal_with_atomic_sequence): Adjust.
10550 (alpha_software_single_step): Adjust.
10551 * alpha-tdep.h (alpha_software_single_step): Adjust.
10552 * arm-linux-tdep.c (arm_linux_software_single_step): Adjust.
10553 * arm-tdep.c (arm_software_single_step): Adjust.
10554 (arm_breakpoint_kind_from_current_state): Adjust.
10555 * arm-tdep.h (arm_software_single_step): Adjust.
10556 * breakpoint.c (insert_single_step_breakpoint): Adjust.
10557 * cris-tdep.c (cris_software_single_step): Adjust.
10558 * mips-tdep.c (mips_deal_with_atomic_sequence): Adjust.
10559 (micromips_deal_with_atomic_sequence): Adjust.
10560 (deal_with_atomic_sequence): Adjust.
10561 (mips_software_single_step): Adjust.
10562 * mips-tdep.h (mips_software_single_step): Adjust.
10563 * moxie-tdep.c (moxie_software_single_step): Adjust.
10564 * nios2-tdep.c (nios2_software_single_step): Adjust.
10565 * ppc-tdep.h (ppc_deal_with_atomic_sequence): Adjust.
10566 * rs6000-aix-tdep.c (rs6000_software_single_step): Adjust.
10567 * rs6000-tdep.c (ppc_deal_with_atomic_sequence): Adjust.
10568 * s390-linux-tdep.c (s390_software_single_step): Adjust.
10569 * sparc-tdep.c (sparc_software_single_step): Adjust.
10570 * spu-tdep.c (spu_software_single_step): Adjust.
10571 * tic6x-tdep.c (tic6x_software_single_step): Adjust.
10572
10573 2017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
10574
10575 * gdbarch.sh: Use semi-colon as field separator instead of colon.
10576 * gdbarch.h: Re-generate.
10577
10578 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
10579
10580 * Makefile.in (SUBDIR_PYTHON_OBS): Add py-instruction.o.
10581 (SUBDIR_PYTHON_SRCS): Add py-instruction.c.
10582 * python/py-instruction.c, python/py-instruction.h: New file.
10583 * python/py-record.c: Add py-instruction.h include.
10584 (gdbpy_initialize_record): Make gdb.Instruction a super class of
10585 gdb.RecordInstruction.
10586 * python/python-internal.h: Add gdbpy_initialize_instruction
10587 declaration.
10588 * python/python.c (do_start_initialization): Add
10589 gdbpy_initialize_instruction.
10590
10591 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
10592
10593 * python/py-record-btrace.c (BTPY_REQUIRE_VALID_CALL, btpy_call_type):
10594 Remove.
10595 (btrace_func_from_recpy_func): New function.
10596 (btpy_call_new, btpy_number, btpy_hash, btpy_richcompare): Remove.
10597 (btpy_call_level, btpy_call_symbol, btpy_call_instructions,
10598 btpy_call_up, btpy_call_prev_sibling, btpy_call_next_sibling): Rename to ...
10599 (recpy_bt_func_level, recpy_bt_func_symbol, recpy_bt_func_instructions,
10600 recpy_bt_func_up, recpy_bt_func_prev, recpy_bt_func_next): This.
10601 Also, use new helper functions.
10602 (btpy_list_item): Use new helper functions.
10603 (recpy_bt_function_call_history): Use new type name.
10604 (btpy_call_getset): Remove.
10605 (gdbpy_initialize_btrace): Remove code to initialize
10606 gdb.BtraceFunctionCall.
10607 * python/py-record-btrace.h (recpy_bt_func_number, recpy_btb_func_level,
10608 recpy_btb_func_symbol, recpy_bt_func_instructions, recpy_bt_func_up,
10609 recpy_bt_func_prev, recpy_bt_func_next): New export.
10610 * python/py-record.c (recpy_func_type): New static object.
10611 (recpy_func_new, recpy_func_level, recpy_func_symbol,
10612 recpy_func_instructions, recpy_func_up, recpy_func_prev,
10613 recpy_func_next): New function.
10614 (recpy_element_hash, recpy_element_richcompare): Updated comment.
10615 (recpy_func_getset): New static object.
10616 (gdbpy_initialize_record): Add code to initialize gdb.RecordInstruction.
10617 * python/py-record.h (recpy_func_type, recpy_func_new): New export.
10618
10619 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
10620
10621 * python/py-record-btrace.c (BTPY_REQUIRE_VALID_INSN): Remove.
10622 (btpy_object, btpy_insn_type, btpy_new): Remove.
10623 (btpy_list_object): Use gdb.RecordInstruction type instead of
10624 gdb.BtraceInstruction type.
10625 (btrace_insn_from_recpy_insn): New function.
10626 (btpy_insn_or_gap_new): Adjust comment. Use recpy_insn_new instead of
10627 btpy_new.
10628 (btpy_call_new, btpy_list_item): Do not use btpy_new anymore.
10629 (btpy_number, btpy_hash, btpy_call_level, btpy_call_symbol,
10630 btpy_call_instructions, btpy_call_up, btpy_call_prev_sibling,
10631 btpy_call_next_sibling, btpy_richcompare): Use recpy_element_object
10632 instead of btpy_object.
10633 (btpy_insn_sal, btpy_insn_pc, btpy_insn_size, btpy_insn_is_speculative,
10634 btpy_insn_data, btpy_insn_decode): Rename to ...
10635 (recpy_bt_insn_sal, recpy_bt_insn_pc, recpy_bt_insn_size,
10636 recpy_bt_insn_is_speculative, recpy_bt_insn_data,
10637 recpy_bt_insn_decode): This. Also, use new helper functions.
10638 (btpy_list_position, recpy_bt_goto): Use recpy_element_object and
10639 recpy_insn_type.
10640 (btpy_insn_getset): Remove.
10641 (gdbpy_initialize_btrace): Remove code to initialize
10642 gdb.BtraceInstruction. Use recpy_element_object.
10643 * python/py-record-btrace.h (recpy_bt_insn_number, recpy_bt_insn_sal,
10644 recpy_bt_insn_pc, recpy_bt_insn_data, recpy_bt_insn_decoded,
10645 recpy_bt_insn_size, recpy_bt_insn_is_speculative): New export.
10646 * python/py-record.c (recpy_insn_type): New static object.
10647 (recpy_insn_new, recpy_insn_sal, recpy_insn_pc, recpy_insn_data,
10648 recpy_insn_decoded, recpy_insn_size, recpy_insn_is_speculative,
10649 recpy_element_number, recpy_element_hash, recpy_element_richcompare):
10650 New function.
10651 (recpy_insn_getset): New static object.
10652 (gdbpy_initialize_record): Initialize gdb.RecordInstruction.
10653 * python/py-record.h (recpy_element_object): New typedef.
10654 (recpy_insn_type, recpy_insn_new): New export.
10655
10656 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
10657
10658 * py-record-btrace.c (btpy_insn_new): Removed.
10659 (btpy_insn_or_gap_new): New function.
10660 (btpy_insn_error): Removed.
10661 (btpy_insn_sal, btpy_insn_pc, btpy_insn_size, btpy_insn_is_speculative,
10662 btpy_insn_data, btpy_insn_decode): Remove code path for gaps.
10663 (recpy_bt_replay_position, recpy_bt_begin, recpy_bt_end): Call
10664 btpy_insn_or_gap_new instead of btpy_insn_new.
10665 (btpy_insn_getset): Remove btpy_insn_error.
10666 * py-record.c (recpy_gap_type): New static object.
10667 (recpy_gap_object): New typedef.
10668 (recpy_gap_new, recpy_gap_number, recpy_gap_reason_code,
10669 recpy_gap_reason_string): New function.
10670 (recpy_gap_getset): New static object.
10671 (gdbpy_initialize_record): Initialize gdb.RecordGap type.
10672 * py-record.h (recpy_gap_new): New export.
10673
10674 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
10675
10676 * python/py-record.c (recpy_ptid): Remove.
10677 (recpy_record_getset): Remove recpy_ptid.
10678
10679 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
10680
10681 * btrace.c (btrace_fetch): Set inferior_ptid.
10682 * python/py-record-btrace.c: Add "py-record.h" include.
10683 (recpy_bt_format, recpy_bt_replay_position, recpy_bt_begin,
10684 recpy_bt_end, recpy_bt_instruction_history,
10685 recpy_bt_function_call_history, recpy_bt_goto): Use ptid stored
10686 in gdb.Record object instead of current ptid.
10687 * python/py-record.c: Include new "py-record.h" file.
10688 (recpy_record_object): Moved to py-record.h.
10689 * python/py-record.h: New file.
10690
10691 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
10692
10693 * python/py-record-btrace.c (BTPY_REQUIRE_VALID_INSN,
10694 BTPY_REQUIRE_VALID_CALL, recpy_bt_function_call_history): Fix
10695 indentation.
10696
10697 2017-05-01 Joel Brobecker <brobecker@adacore.com>
10698
10699 * MAINTAINERS: Move Daniel Jacobowitz and Mark Kettenis to
10700 the past maintainers section.
10701
10702 2017-04-28 Yao Qi <yao.qi@linaro.org>
10703
10704 * infcmd.c (get_return_value): Use regcache ctor, and remove
10705 cleanup.
10706
10707 2017-04-28 Yao Qi <yao.qi@linaro.org>
10708 Pedro Alves <palves@redhat.com>
10709
10710 * regcache.c (regcache::regcache): New tag dispatch ctor.
10711 (do_cooked_read): Moved above.
10712 (regcache_dup): Use the tag dispatch ctor..
10713 * regcache.h (regcache): Declare ctor, delete copy ctor and
10714 assignment operator, remove friend regcache_dup.
10715
10716 2017-04-28 Yao Qi <yao.qi@linaro.org>
10717
10718 * regcache.c (regcache_dup): Assert !src->m_readonly_p and
10719 call method save instead of regcache_cpy.
10720 * regcache.h (struct regcache): Make regcache_dup a friend.
10721
10722 2017-04-28 Yao Qi <yao.qi@linaro.org>
10723
10724 * regcache.c (struct regcache): Move to regcache.h
10725 (regcache::arch): New method.
10726 (regcache_get_ptid): Update.
10727 (get_regcache_arch): Call arch method.
10728 (get_regcache_aspace): Call method aspace.
10729 (register_buffer): Change it to method.
10730 (regcache_save): Change it to regcache::save.
10731 (regcache_restore): Likewise.
10732 (regcache_cpy_no_passthrough): Remove the declaration.
10733 (regcache_cpy): Call methods restore and cpy_no_passthrough.
10734 (regcache_cpy_no_passthrough): Change it to method
10735 cpy_no_passthrough.
10736 (regcache_register_status): Change it to method
10737 get_register_status.
10738 (regcache_invalidate): Change it to method invalidate.
10739 (regcache_thread_ptid_changed): Use methods ptid and set_ptid.
10740 (regcache_raw_update): Change it to method raw_update.
10741 (regcache_raw_read): Likewise.
10742 (regcache_raw_read_signed): Likewise.
10743 (regcache_raw_read_unsigned): Likewise.
10744 (regcache_raw_write_signed): Likewise.
10745 (regcache_raw_write_unsigned): Likewise.
10746 (regcache_cooked_read): Likewise.
10747 (regcache_cooked_read_value): Likewise.
10748 (regcache_cooked_read_signed): Likewise.
10749 (regcache_cooked_read_unsigned): Likewise.
10750 (regcache_cooked_write_signed): Likewise.
10751 (regcache_cooked_write_unsigned): Likewise.
10752 (regcache_raw_set_cached_value): Likewise.
10753 (regcache_raw_write): Likewise.
10754 (regcache_cooked_write): Likewise.
10755 (regcache_xfer_part): Likewise.
10756 (regcache_raw_read_part): Likewise.
10757 (regcache_raw_write_part): Likewise.
10758 (regcache_cooked_read_part): Likewise.
10759 (regcache_cooked_write_part): Likewise.
10760 (regcache_raw_supply): Likewise.
10761 (regcache_raw_collect): Likewise.
10762 (regcache_transfer_regset): Likewise.
10763 (regcache_supply_regset): Likewise.
10764 (regcache_collect_regset): Likewise.
10765 (regcache_debug_print_register): Likewise.
10766 (enum regcache_dump_what): Move it to regcache.h.
10767 (regcache_dump): Change it to method dump.
10768 * regcache.h (enum regcache_dump_what): New.
10769 (class regcache): New.
10770 * target.c (target_fetch_registers): Call method
10771 debug_print_register.
10772 (target_store_registers): Likewise.
10773
10774 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
10775
10776 * windows-nat.c (struct lm_info_windows): Initialize field.
10777 (windows_make_so): Allocate lm_info_windows with new.
10778 (windows_free_so): Free lm_info_windows with delete.
10779
10780 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
10781
10782 * solib-darwin.c (struct lm_info_darwin): Initialize field.
10783 (darwin_current_sos): Allocate lm_info_darwin with new, remove
10784 cleanup.
10785 (darwin_free_so): Free lm_info_darwin with delete.
10786
10787 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
10788
10789 * solib-svr4.h (struct lm_info_svr4): Initialize fields.
10790 <l_addr_p>: Change type to bool.
10791 * solib-svr4.c (lm_info_read): Allocate lm_info_svr4 with new.
10792 (svr4_free_so): Free lm_info_svr4 with delete.
10793 (svr4_copy_library_list): Replace memcpy with call to copy
10794 constructor.
10795 (library_list_start_library, svr4_default_sos): Allocate
10796 lm_info_svr4 with new.
10797
10798 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
10799
10800 * solib-target.c (struct lm_info_target): Add destructor,
10801 initialize fields.
10802 <name>: Change type to std::string.
10803 (library_list_start_library): Allocate lm_info_target with new.
10804 (solib_target_free_library_list): Free lm_info_target with
10805 delete.
10806 (solib_target_current_sos): Adapt to std::string.
10807 (solib_target_free_so): Free lm_info_target with delete.
10808
10809 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
10810
10811 * solib-frv.c (struct lm_info_frv): Add destructor, initialize
10812 fields.
10813 (frv_current_sos): Allocate lm_info_frv with new.
10814 (frv_relocate_main_executable): Free lm_info_frv with delete,
10815 allocate with new.
10816 (frv_clear_solib, frv_free_so): Free lm_info_frv with delete.
10817
10818 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
10819
10820 * solib-frv.c (struct lm_info_frv): Fix indentation.
10821
10822 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
10823
10824 * solib-dsbt.c (struct lm_info_dsbt): Add destructor, initialize
10825 map field.
10826 (dsbt_current_sos): Allocate lm_info_dsbt with new.
10827 (dsbt_relocate_main_executable): Free lm_info_dsbt with delete
10828 and allocate with new.
10829 (dsbt_clear_solib, dsbt_free_so): Free lm_info_dsbt with delete.
10830
10831 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
10832
10833 * solib-aix.c (struct lm_info_aix): Initialize fields in-class.
10834 <filename, member_name>: Change type to std::string.
10835 (solib_aix_new_lm_info, solib_aix_xfree_lm_info): Remove.
10836 (library_list_start_library): Allocate lm_info_aix with new.
10837 (solib_aix_free_library_list, solib_aix_free_so): Free with delete.
10838 (solib_aix_current_sos): Adapt to std::string, copy lm_info_aix
10839 with copy constructor.
10840
10841 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
10842
10843 * solist.h (struct lm_info): Remove.
10844 (struct lm_info_base): New class.
10845 (struct so_list) <lm_info>: Change type to lm_info_base *.
10846 * nto-tdep.c (struct lm_info): Remove.
10847 (lm_addr): Adjust.
10848 * solib-aix.c (struct lm_info): Rename to ...
10849 (struct lm_info_aix): ... this. Extend lm_info_base.
10850 (lm_info_p): Rename to ...
10851 (lm_info_aix_p): ... this, and adjust.
10852 (solib_aix_new_lm_info, solib_aix_xfree_lm_info,
10853 solib_aix_parse_libraries, library_list_start_library,
10854 solib_aix_free_library_list, solib_aix_parse_libraries,
10855 solib_aix_get_library_list,
10856 solib_aix_relocate_section_addresses, solib_aix_free_so,
10857 solib_aix_get_section_offsets,
10858 solib_aix_solib_create_inferior_hook, solib_aix_current_sos):
10859 Adjust.
10860 (struct solib_aix_inferior_data) <library_list>: Adjust.
10861 * solib-darwin.c (struct lm_info): Rename to ...
10862 (struct lm_info_darwin): ... this. Extend lm_info_base.
10863 (darwin_current_sos, darwin_relocate_section_addresses): Adjust.
10864 * solib-dsbt.c (struct lm_info): Rename to ...
10865 (struct lm_info_dsbt): ... this. Extend lm_info_base.
10866 (struct dsbt_info) <main_executable_lm_info): Adjust.
10867 (dsbt_current_sos, dsbt_relocate_main_executable, dsbt_free_so,
10868 dsbt_relocate_section_addresses): Adjust.
10869 * solib-frv.c (struct lm_info): Rename to ...
10870 (struct lm_info_frv): ... this. Extend lm_info_base.
10871 (main_executable_lm_info): Adjust.
10872 (frv_current_sos, frv_relocate_main_executable, frv_free_so,
10873 frv_relocate_section_addresses, frv_fdpic_find_global_pointer,
10874 find_canonical_descriptor_in_load_object,
10875 frv_fdpic_find_canonical_descriptor): Adjust.
10876 * solib-svr4.c (struct lm_info): Move to solib-svr4.h, renamed
10877 to lm_info_svr4.
10878 (lm_info_read, lm_addr_check, svr4_keep_data_in_core,
10879 svr4_clear_so, svr4_copy_library_list,
10880 library_list_start_library, svr4_default_sos, svr4_read_so_list,
10881 svr4_current_sos, svr4_fetch_objfile_link_map,
10882 solist_update_incremental): Adjust.
10883 * solib-svr4.h (struct lm_info_svr4): Move here from
10884 solib-svr4.c.
10885 * solib-target.c (struct lm_info): Rename to ...
10886 (struct lm_info_target): ... this. Extend lm_info_base.
10887 (lm_info_p): Rename to ...
10888 (lm_info_target_p): ... this.
10889 (solib_target_parse_libraries, library_list_start_segment,
10890 library_list_start_section, library_list_start_library,
10891 library_list_end_library, solib_target_free_library_list,
10892 solib_target_current_sos, solib_target_free_so,
10893 solib_target_relocate_section_addresses): Adjust.
10894 * windows-nat.c (struct lm_info): Rename to ...
10895 (struct lm_info_windows): ... this. Extend lm_info_base.
10896 (windows_make_so, handle_load_dll, handle_unload_dll,
10897 windows_xfer_shared_libraries): Adjust.
10898
10899 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
10900
10901 * solib-darwin.c (struct darwin_so_list): Remove.
10902 (darwin_current_sos): Allocate an so_list object instead of a
10903 darwin_so_list, separately allocate an lm_info object.
10904 (darwin_free_so): Free lm_info.
10905
10906 2017-04-28 John Baldwin <jhb@FreeBSD.org>
10907
10908 * mips-tdep.c (print_gp_register_row): Replace printf_filtered
10909 with fprintf_filtered.
10910
10911 2017-04-28 Yao Qi <yao.qi@linaro.org>
10912
10913 * regcache.c (regcache::regcache): New function.
10914 (regcache::~regcache): New function.
10915 (regcache_xmalloc_1): Remove.
10916 (regcache_xmalloc): Call new regcache.
10917 (regcache_xfree): Call delete regcache.
10918 (get_thread_arch_aspace_regcache): Call new regcache.
10919
10920 2017-04-28 Yao Qi <yao.qi@linaro.org>
10921
10922 * mips-linux-nat.c (mips_linux_new_thread): Use ptid method
10923 lwp instead of ptid_get_lwp.
10924
10925 2017-04-28 Yao Qi <yao.qi@linaro.org>
10926
10927 * mips-linux-nat.c (mips_linux_new_thread): Get lwpid from
10928 lwp_info instead of getting from inferior_ptid.
10929
10930 2017-04-27 Keith Seitz <keiths@redhat.com>
10931
10932 * gdbtypes.c (LVALUE_REFERENCE_TO_RVALUE_BINDING_BADNESS)
10933 DIFFERENT_REFERENCE_TYPE_BADNESS): Remove.
10934 (CV_CONVERSION_BADNESS): Define.
10935 (rank_one_type): Remove overly restrictive rvalue reference
10936 rank checks.
10937 Add cv-qualifier checks and subranks for type equality.
10938 * gdbtypes.h (REFERENCE_CONVERSION_RVALUE,
10939 REFERENCE_CONVERSION_CONST_LVALUE, CV_CONVERSION_BADNESS,
10940 CV_CONVERSION_CONST, CV_CONVERSION_VOLATILE): Declare.
10941
10942 2017-04-27 Simon Marchi <simon.marchi@ericsson.com>
10943
10944 * python/py-inferior.c (inferior_to_inferior_object): Increment reference
10945 count when creating the object.
10946
10947 2017-04-27 Sangamesh Mallayya <sangamesh.swamy@in.ibm.com>
10948 Ulrich Weigand <uweigand@de.ibm.com>
10949
10950 * xcoffread.c (read_xcoff_symtab): Read correct function auxiliary
10951 entry if xlc -qfuncsect or gcc -ffunction-sections compiler option
10952 is used in AIX.
10953 (read_xcoff_symtab): Handle C_WEAKEXT storage class.
10954 (process_xcoff_symbol): Likewise.
10955 (scan_xcoff_symtab): Likewise.
10956
10957 2017-04-26 Alan Hayward <alan.hayward@arm.com>
10958
10959 * ia64-tdep.c (examine_prologue): Use get_frame_register_unsigned.
10960 (ia64_sigtramp_frame_prev_register): Use read_memory_unsigned_integer.
10961 (ia64_access_reg): Use get_frame_register_unsigned.
10962 (ia64_access_rse_reg): Likewise.
10963 (ia64_libunwind_frame_prev_register): Likewise.
10964
10965 2017-04-26 Jiong Wang <jiong.wang@arm.com>
10966
10967 * gdbarch.sh: New gdbarch method execute_dwarf_cfa_vendor_op.
10968 * gdbarch.c: Regenerated.
10969 * gdbarch.h: Regenerated.
10970 * dwarf2-frame.c (dwarf2_frame_state_alloc_regs): Made the
10971 visibility external.
10972 (execute_cfa_program): Call execute_dwarf_cfa_vendor_op for CFI
10973 between DW_CFA_lo_user and DW_CFA_high_user inclusive.
10974 (enum cfa_how_kind): Move to ...
10975 (struct dwarf2_frame_state_reg_info): Likewise.
10976 (struct dwarf2_frame_state): Likewise.
10977 * dwarf2-frame.h: ... here.
10978 (dwarf2_frame_state_alloc_regs): New declaration.
10979 * sparc-tdep.c (sparc_execute_dwarf_cfa_vendor_op): New function.
10980 (sparc32_gdbarch_init): Register execute_dwarf_cfa_vendor_op hook.
10981
10982 2017-04-26 Alan Hayward <alan.hayward@arm.com>
10983
10984 * xtensa-tdep.c (xtensa_pseudo_register_read): Use
10985 regcache_raw_read_unsigned.
10986 (xtensa_pseudo_register_write): Likewise.
10987
10988 2017-04-26 Alan Hayward <alan.hayward@arm.com>
10989
10990 * nds32-tdep.c (nds32_pseudo_register_read): Abort on errors.
10991 (nds32_pseudo_register_write): Likewise.
10992
10993 2017-04-25 Yao Qi <yao.qi@linaro.org>
10994
10995 * regcache.c (struct regcache) <readonly_p>: Change its type
10996 to bool.
10997 (regcache_xmalloc_1): Update parameter type and callers update.
10998
10999 2017-04-25 Yao Qi <yao.qi@linaro.org>
11000
11001 * aarch64-tdep.c (aarch64_gdbarch_init): Don't call
11002 set_gdbarch_wchar_bit.
11003 * arm-tdep.c (arm_gdbarch_init): Likewise.
11004
11005 2017-04-25 Pedro Alves <palves@redhat.com>
11006
11007 * common/poison.h [!HAVE_IS_TRIVIALLY_COPYABLE] (IsRelocatable)
11008 (BothAreRelocatable, memcopy, memmove): Don't define.
11009 * common/traits.h (__has_feature, HAVE_IS_TRIVIALLY_COPYABLE): New
11010 macros.
11011
11012 2017-04-25 Pedro Alves <palves@redhat.com>
11013
11014 * common/common-defs.h: Include "common/poison.h".
11015 * common/function-view.h: (Not, Or, Requires): Move to traits.h
11016 and adjust.
11017 * common/poison.h: New file.
11018 * common/traits.h: Include <type_traits>.
11019 (Not, Or, Requires): New, moved from common/function-view.h.
11020
11021 2017-04-25 Pedro Alves <palves@redhat.com>
11022
11023 * breakpoint.h (struct breakpoint): In-class initialize all
11024 fields. Make boolean fields "bool".
11025 * breakpoint.c (init_raw_breakpoint_without_location): Remove
11026 memset call and initializations no longer necessary.
11027
11028 2017-04-25 Pedro Alves <palves@redhat.com>
11029
11030 * btrace.c (pt_btrace_insn_flags): Change parameter type to
11031 reference.
11032 (pt_btrace_insn): New function.
11033 (ftrace_add_pt): Remove memset call and use pt_btrace_insn.
11034
11035 2017-04-25 Pedro Alves <palves@redhat.com>
11036
11037 * ada-lang.c (ada_catchpoint_location): Now a "class". Remove
11038 "base" field and inherit from "bp_location" instead. Add
11039 non-default ctor.
11040 (allocate_location_exception): Use new non-default ctor.
11041 * breakpoint.c (get_first_locp_gte_addr): Remove memset call.
11042 (init_bp_location): Convert to ...
11043 (bp_location::bp_location): ... this new ctor, and remove memset
11044 call.
11045 (base_breakpoint_allocate_location): Use the new non-default ctor.
11046 * breakpoint.h (bp_location): Now a class. Declare default and
11047 non-default ctors. In-class initialize all members.
11048 (init_bp_location): Remove declaration.
11049
11050 2017-04-25 Pedro Alves <palves@redhat.com>
11051
11052 * common/enum-flags.h (enum_flags): Don't implement copy ctor and
11053 assignment operator.
11054
11055 2017-04-24 Yao Qi <yao.qi@linaro.org>
11056
11057 * doublest.c (convert_doublest_to_floatformat): Call
11058 floatformat_totalsize_bytes.
11059
11060 2017-04-22 Tom Tromey <tom@tromey.com>
11061
11062 * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries): Use
11063 ui_out_emit_list.
11064 * stack.c (print_frame): Use ui_out_emit_list.
11065 * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Use
11066 ui_out_emit_list.
11067 * mi/mi-main.c (print_one_inferior)
11068 (mi_cmd_data_list_register_names)
11069 (mi_cmd_data_list_register_values, mi_cmd_list_features)
11070 (mi_cmd_list_target_features, mi_cmd_trace_frame_collected): Use
11071 ui_out_emit_list.
11072 * mi/mi-interp.c (mi_on_normal_stop_1): Use ui_out_emit_list.
11073 (mi_output_solib_attribs): Use ui_out_emit_list,
11074 ui_out_emit_tuple.
11075 * mi/mi-cmd-var.c (varobj_update_one): Use ui_out_emit_list.
11076 * mi/mi-cmd-stack.c (mi_cmd_stack_list_frames)
11077 (mi_cmd_stack_list_args, list_args_or_locals): Use
11078 ui_out_emit_list.
11079 * disasm.c (do_assembly_only): Use ui_out_emit_list.
11080 * breakpoint.c (print_solib_event, output_thread_groups): Use
11081 ui_out_emit_list.
11082
11083 2017-04-22 Tom Tromey <tom@tromey.com>
11084
11085 * mi/mi-main.c (print_variable_or_computed): Use ui_out_emit_tuple.
11086 * mi/mi-cmd-var.c (varobj_update_one): Use ui_out_emit_tuple.
11087 * mi/mi-cmd-stack.c (list_arg_or_local): Use ui_out_emit_tuple.
11088
11089 2017-04-22 Tom Tromey <tom@tromey.com>
11090
11091 * tracepoint.c (tvariables_info_1)
11092 (print_one_static_tracepoint_marker): Use ui_out_emit_tuple.
11093
11094 2017-04-22 Tom Tromey <tom@tromey.com>
11095
11096 * stack.c (print_frame_arg): Use ui_out_emit_tuple,
11097 annotate_arg_emitter.
11098 * breakpoint.c (print_mention_watchpoint)
11099 (print_mention_masked_watchpoint): Use ui_out_emit_tuple.
11100 * annotate.h (struct annotate_arg_emitter): New.
11101
11102 2017-04-22 Tom Tromey <tom@tromey.com>
11103
11104 * record-btrace.c (record_btrace_insn_history)
11105 (record_btrace_insn_history_range, record_btrace_call_history)
11106 (record_btrace_call_history_range): Use ui_out_emit_tuple.
11107 * thread.c (do_captured_list_thread_ids, print_thread_info_1): Use
11108 ui_out_emit_tuple.
11109 * stack.c (print_frame_info): Use ui_out_emit_tuple.
11110 * solib.c (info_sharedlibrary_command): Use ui_out_emit_tuple.
11111 * skip.c (skip_info): Use ui_out_emit_tuple.
11112 * remote.c (show_remote_cmd): Use ui_out_emit_tuple.
11113 * progspace.c (print_program_space): Use ui_out_emit_tuple.
11114 * probe.c (info_probes_for_ops): Use ui_out_emit_tuple.
11115 * osdata.c (info_osdata): Use ui_out_emit_tuple.
11116 * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Use
11117 ui_out_emit_tuple.
11118 * mi/mi-main.c (print_one_inferior, list_available_thread_groups)
11119 (output_register, mi_cmd_data_read_memory)
11120 (mi_cmd_data_read_memory_bytes, mi_load_progress)
11121 (mi_cmd_trace_frame_collected): Use ui_out_emit_tuple.
11122 * mi/mi-cmd-var.c (mi_cmd_var_list_children, varobj_update_one):
11123 Use ui_out_emit_tuple.
11124 * mi/mi-cmd-stack.c (mi_cmd_stack_list_args): Use
11125 ui_out_emit_tuple.
11126 * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions)
11127 (mi_cmd_info_gdb_mi_command): Use ui_out_emit_tuple.
11128 * linux-thread-db.c (info_auto_load_libthread_db): Use
11129 ui_out_emit_tuple.
11130 * inferior.c (print_inferior): Use ui_out_emit_tuple.
11131 * gdb_bfd.c (print_one_bfd): Use ui_out_emit_tuple.
11132 * disasm.c (do_mixed_source_and_assembly_deprecated)
11133 (do_mixed_source_and_assembly): Use ui_out_emit_tuple.
11134 * cp-abi.c (list_cp_abis): Use ui_out_emit_tuple.
11135 * cli/cli-setshow.c (cmd_show_list): Use ui_out_emit_tuple.
11136 * breakpoint.c (print_one_breakpoint_location)
11137 (print_one_breakpoint): Use ui_out_emit_tuple.
11138 * auto-load.c (print_script, info_auto_load_cmd): Use
11139 ui_out_emit_tuple.
11140 * ada-tasks.c (print_ada_task_info): Use ui_out_emit_tuple.
11141
11142 2017-04-21 Simon Marchi <simon.marchi@ericsson.com>
11143
11144 * thread.c (print_thread_info_1): Remove dead code.
11145
11146 2017-04-21 Jan Kratochvil <jan.kratochvil@redhat.com>
11147
11148 * aarch64-tdep.c (selftests::aarch64_process_record_test): Make it #if
11149 GDB_SELF_TEST.
11150 * arm-tdep.c (selftests::arm_record_test): Likewise.
11151
11152 2017-04-21 Yao Qi <yao.qi@linaro.org>
11153
11154 * regcache.c (regcache_restore): Remove argument 2. Replace
11155 argument 3 with regcache. Get register status from
11156 src->register_status and get register contents from
11157 register_buffer (src, regnum).
11158 (regcache_cpy): Update.
11159
11160 2017-04-19 Pedro Alves <palves@redhat.com>
11161
11162 * gdbthread.h (thread): Add missing closing parenthesis in
11163 comment.
11164
11165 2017-04-19 Pedro Alves <palves@redhat.com>
11166
11167 * common/refcounted-object.h: New file.
11168 * gdbthread.h: Include "common/refcounted-object.h".
11169 (thread_info): Inherit from refcounted_object and add comments.
11170 (thread_info::incref, thread_info::decref)
11171 (thread_info::m_refcount): Delete.
11172 (thread_info::deletable): Use the refcounted_object::refcount()
11173 method.
11174 * inferior.c (current_inferior_): Add comment.
11175 (set_current_inferior): Increment/decrement refcounts.
11176 (prune_inferiors, remove_inferior_command): Skip inferiors marked
11177 not-deletable instead of comparing with the current inferior.
11178 (initialize_inferiors): Increment the initial inferior's refcount.
11179 * inferior.h (struct inferior): Forward declare.
11180 Include "common/refcounted-object.h".
11181 (current_inferior, set_current_inferior): Move declaration to
11182 before struct inferior's definition, and fix comment.
11183 (inferior): Inherit from refcounted_object. Add comments.
11184 * thread.c (switch_to_thread_no_regs): Reference the thread's
11185 inferior pointer directly instead of doing a ptid lookup.
11186 (switch_to_no_thread): New function.
11187 (switch_to_thread(thread_info *)): New function, factored out
11188 from ...
11189 (switch_to_thread(ptid_t)): ... this.
11190 (restore_current_thread): Delete.
11191 (current_thread_cleanup): Remove 'inf_id' and 'was_removable'
11192 fields, and add 'inf' field.
11193 (do_restore_current_thread_cleanup): Check whether old->inf is
11194 alive instead of looking up an inferior by ptid. Use
11195 switch_to_thread and switch_to_no_thread.
11196 (restore_current_thread_cleanup_dtor): Use old->inf directly
11197 instead of lookup up an inferior by id. Decref the inferior.
11198 Don't restore 'removable'.
11199 (make_cleanup_restore_current_thread): Same the inferior pointer
11200 in old, instead of the inferior number. Incref the inferior.
11201 Don't save/clear 'removable'.
11202
11203 2017-04-19 Pedro Alves <palves@redhat.com>
11204
11205 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
11206 unittests/scoped_restore-selftests.c.
11207 (SUBDIR_UNITTESTS_OBS): Add scoped_restore-selftests.o.
11208 * common/scoped_restore.h (scoped_restore_base): Make "class".
11209 (scoped_restore_base::release): New public method.
11210 (scoped_restore_base::scoped_restore_base): New protected ctor.
11211 (scoped_restore_base::m_saved_var): New protected field.
11212 (scoped_restore_tmpl::scoped_restore_tmpl(T*)): Initialize the
11213 scoped_restore_base base class instead of m_saved_var directly.
11214 (scoped_restore_tmpl::scoped_restore_tmpl(T*, T2)): Likewise.
11215 (scoped_restore_tmpl::scoped_restore_tmpl(const
11216 scoped_restore_tmpl<T>&)): Likewise.
11217 (scoped_restore_tmpl::~scoped_restore_tmpl): Use the saved_var
11218 method.
11219 (scoped_restore_tmpl::saved_var): New method.
11220 (scoped_restore_tmpl::m_saved_var): Delete.
11221 * inferior.h (inferior::detaching): Now a bool.
11222 * infrun.c (prepare_for_detach): Use a scoped_restore instead of a
11223 cleanup.
11224 * unittests/scoped_restore-selftests.c: New file.
11225
11226 2017-04-19 Pedro Alves <palves@redhat.com>
11227
11228 * Makefile.in (SUBDIR_UNITTESTS_SRCS, SUBDIR_UNITTESTS_OBS):
11229 Re-sort in alphabetic order.
11230
11231 2017-04-18 Pedro Alves <palves@redhat.com>
11232
11233 * xml-support.c (obstack_xml_printf): Delete.
11234 * xml-support.h (obstack_xml_printf): Delete.
11235
11236 2017-04-18 Pedro Alves <palves@redhat.com>
11237
11238 * xml-support.c (gdb_xml_parser) <use_dtd, dtd_name, parse,
11239 vdebug, verror, body_text, start_element, end_element, name,
11240 user_data, set_is_xinclude, set_error, expat_parser>: New methods.
11241 <name, user_data, expat_parser, scopes, error, last_line, dtd_name,
11242 is_xinclude>: Make private and add m_ prefix.
11243 (gdb_xml_parser::body_text): New method, based on ...
11244 (gdb_xml_body_text): ... this. Adjust.
11245 (gdb_xml_parser::vdebug): New method, based on ...
11246 (gdb_xml_debug): ... this. Adjust.
11247 (gdb_xml_parser::verror): New method, based on ...
11248 (gdb_xml_error): ... this. Adjust.
11249 (gdb_xml_parser::start_element): New method, based on ...
11250 (gdb_xml_start_element): ... this. Adjust.
11251 (gdb_xml_start_element_wrapper): Defer to
11252 gdb_xml_parser::start_element and gdb_xml_parser::set_error.
11253 (gdb_xml_parser::end_element): New method, based on ...
11254 (gdb_xml_end_element_wrapper): ... this. Adjust.
11255 (gdb_xml_parser::~gdb_xml_parser): Adjust.
11256 (gdb_xml_parser::gdb_xml_parser): Adjust to field renames.
11257 (gdb_xml_parser::use_dtd): New method, based on ...
11258 (gdb_xml_use_dtd): ... this. Adjust.
11259 (gdb_xml_parser::parse): New method, based on ...
11260 (gdb_xml_parse): ... this. Adjust.
11261 (gdb_xml_parse_quick): Adjust to call the parser's parse method.
11262 (xinclude_start_include): Adjust to call the parser's name method.
11263 (xml_xinclude_default, xml_xinclude_start_doctype)
11264 (xml_xinclude_end_doctype): Adjust to call the parser's user_data
11265 method.
11266 (xml_process_xincludes): Adjust to call parser methods.
11267 * xml-support.h (gdb_xml_use_dtd, gdb_xml_parse): Delete
11268 declarations.
11269
11270 2017-04-18 Pedro Alves <palves@redhat.com>
11271
11272 * tracefile-tfile.c (tfile_write_tdesc): Adjust to use
11273 gdb::optional<std::string>.
11274 * xml-support.c: Include <string>.
11275 (scope_level::scope_level(scope_level &&))
11276 (scope_level::~scope_level): Delete.
11277 (scope_level::body): Now a std::string.
11278 (gdb_xml_body_text, gdb_xml_end_element): Adjust.
11279 (xinclude_parsing_data::xinclude_parsing_data): Add 'output'
11280 parameter.
11281 (xinclude_parsing_data::~xinclude_parsing_data): Delete.
11282 (xinclude_parsing_data::output): Now a std::string reference.
11283 (xinclude_start_include): Adjust.
11284 (xml_xinclude_default): Adjust.
11285 (xml_process_xincludes): Add 'output' parameter, and return bool.
11286 * xml-support.h (xml_process_xincludes): Add 'output' parameter,
11287 and return bool.
11288 * xml-tdesc.c: Include <unordered_map> and <string>.
11289 (tdesc_xml_cache): Delete.
11290 (tdesc_xml_cache_s): Delete.
11291 (xml_cache): Now an std::unordered_map.
11292 (tdesc_parse_xml): Adjust to use std::string and unordered_map.
11293 (target_fetch_description_xml): Change return type to
11294 gdb::optional<std::string>, and adjust.
11295 * xml-tdesc.h: Include "common/gdb_optional.h" and <string>.
11296 (target_fetch_description_xml): Change return type to
11297 gdb::optional<std::string>.
11298
11299 2017-04-18 Pedro Alves <palves@redhat.com>
11300
11301 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
11302 unittests/optional-selftests.c.
11303 (SUBDIR_UNITTESTS_OBS): Add optional-selftests.o.
11304 * unittests/optional-selftests.c: New file.
11305 * unittests/optional/assignment/1.cc: New file.
11306 * unittests/optional/assignment/2.cc: New file.
11307 * unittests/optional/assignment/3.cc: New file.
11308 * unittests/optional/assignment/4.cc: New file.
11309 * unittests/optional/assignment/5.cc: New file.
11310 * unittests/optional/assignment/6.cc: New file.
11311 * unittests/optional/assignment/7.cc: New file.
11312 * unittests/optional/cons/copy.cc: New file.
11313 * unittests/optional/cons/default.cc: New file.
11314 * unittests/optional/cons/move.cc: New file.
11315 * unittests/optional/cons/value.cc: New file.
11316 * unittests/optional/in_place.cc: New file.
11317 * unittests/optional/observers/1.cc: New file.
11318 * unittests/optional/observers/2.cc: New file.
11319
11320 2017-04-18 Pedro Alves <palves@redhat.com>
11321
11322 * common/gdb_optional.h: Include common/traits.h.
11323 (in_place_t): New type.
11324 (in_place): New constexpr variable.
11325 (optional::optional): Remove member initialization of
11326 m_instantiated.
11327 (optional::optional(in_place_t...)): New constructor.
11328 (optional::~optional): Use reset.
11329 (optional::optional(const optional&)): New.
11330 (optional::optional(const optional&&)): New.
11331 (optional::optional(T &)): New.
11332 (optional::optional(T &&)): New.
11333 (operator::operator=(const optional &)): New.
11334 (operator::operator=(optional &&)): New.
11335 (operator::operator= (const T &))
11336 (operator::operator= (T &&))
11337 (operator::emplace (Args &&... args)): Return a T&. Use reset.
11338 (operator::reset): New.
11339 (operator::m_instantiated):: Add in-class initializer.
11340 * common/traits.h: Include <type_traits>.
11341 (struct And): New types.
11342
11343 2017-04-18 Pedro Alves <palves@redhat.com>
11344
11345 * xml-support.c: Include <vector>.
11346 (scope_level::scope_level(const gdb_xml_element *))
11347 (scope_level::scope_level(scope_level&&)): New.
11348 (scope_level::~scope_level): New.
11349 (scope_level_s): Delete.
11350 (gdb_xml_parser::scopes): Now a std::vector.
11351 (gdb_xml_body_text, gdb_xml_start_element, gdb_xml_end_element):
11352 Use std::vector.
11353 (gdb_xml_parser::~gdb_xml_parser): Remove now unnecessary
11354 scope cleanup code.
11355 (gdb_xml_parser::gdb_xml_parser): Remove explicit initialization
11356 of the scopes member. Use std::vector::emplace_back.
11357
11358 2017-04-18 Pedro Alves <palves@redhat.com>
11359
11360 * xml-support.c (gdb_xml_parser): Add ctor/dtor. Make is_xinclude
11361 a bool.
11362 (gdb_xml_end_element): Change type of first parameter.
11363 (gdb_xml_cleanup): Rename to ...
11364 (gdb_xml_parser::~gdb_xml_parser): ... this.
11365 (gdb_xml_create_parser_and_cleanup): Delete with ...
11366 (gdb_xml_parser::gdb_xml_parser): ... creation parts factored out
11367 to this new ctor.
11368 (gdb_xml_parse_quick): Create a local gdb_xml_parser instead of
11369 using gdb_xml_create_parser_and_cleanup.
11370 (xinclude_parsing_data): Add ctor/dtor.
11371 (xml_xinclude_cleanup): Delete.
11372 (xml_process_xincludes): Create a local xinclude_parsing_data
11373 instead of heap-allocating one. Create a local gdb_xml_parser
11374 instead of heap-allocating one with
11375 gdb_xml_create_parser_and_cleanup.
11376
11377 2017-04-18 John Baldwin <jhb@FreeBSD.org>
11378
11379 PR threads/20743
11380 * fbsd-nat.c (resume_one_thread_cb): Remove.
11381 (resume_all_threads_cb): Remove.
11382 (fbsd_resume): Use ALL_NON_EXITED_THREADS instead of
11383 iterate_over_threads.
11384
11385 2017-04-17 Joel Brobecker <brobecker@adacore.com>
11386
11387 * NEWS: Create a new section for the next release branch.
11388 Rename the section of the current branch, now that it has
11389 been cut.
11390
11391 2017-04-17 Joel Brobecker <brobecker@adacore.com>
11392
11393 GDB 8.0 branch created (725bf5cf125783c2a7ca4ab63d3768e220bab2db):
11394 * version.in: Bump version to 8.0.50.DATE-git.
11395
11396 2017-04-13 Sergio Durigan Junior <sergiodj@redhat.com>
11397
11398 PR gdb/21385
11399 * windows-nat.c (windows_create_inferior): Declare 'allargs'
11400 independently of the host, and fix build breakage on Cygwin.
11401
11402 2017-04-13 Pedro Alves <palves@redhat.com>
11403
11404 * inferior.c (free_inferior): Convert to ...
11405 (inferior::~inferior): ... this dtor.
11406 (inferior::inferior): New ctor, factored out from ...
11407 (add_inferior_silent): ... here. Allocate the inferior with a new
11408 expression.
11409 (delete_inferior): Call delete instead of free_inferior.
11410 * inferior.h (gdb_environ, continuation): Forward declare.
11411 (inferior): Now a class. Add in-class initialization to all
11412 members. Make boolean fields bool, except 'detaching'.
11413 (inferior::inferior): New explicit ctor.
11414 (inferior::~inferior): New.
11415
11416 2017-04-13 Pedro Alves <palves@redhat.com>
11417
11418 * inferior.c (init_inferior_list): Delete.
11419 * inferior.h (init_inferior_list): Delete.
11420
11421 2017-04-13 Pedro Alves <palves@redhat.com>
11422
11423 PR threads/13217
11424 * gdb.threads/threadapply.exp (thr_apply_detach): New procedure.
11425 (top level): Call it twice, with different thread sets.
11426
11427 2017-04-13 Pedro Alves <palves@redhat.com>
11428
11429 * thread.c: Include <algorithm>.
11430 (thread_array_cleanup): Delete.
11431 (scoped_inc_dec_ref): New class.
11432 (live_threads_count): New function.
11433 (set_thread_refcount): Delete.
11434 (tp_array_compar_ascending): Now a bool.
11435 (tp_array_compar): Convert to a std::sort comparison function.
11436 (thread_apply_all_command): Use std::vector and scoped_inc_dec_ref
11437 and live_threads_count.
11438
11439 2017-04-13 Pedro Alves <palves@redhat.com>
11440
11441 * infrun.c (follow_fork_inferior): Also switch the current
11442 inferior.
11443
11444 2017-04-13 Pedro Alves <palves@redhat.com>
11445
11446 * breakpoint.c (watch_command_1): Save watchpoint-frame info
11447 before calling create_internal_breakpoint.
11448
11449 2017-04-13 Pedro Alves <palves@redhat.com>
11450
11451 * fork-child.c (execv_argv): New class.
11452 (breakup_args): Refactored as ...
11453 (execv_argv::init_for_no_shell): .. this method of execv_argv.
11454 Copy arguments to storage and replace separators with NULL
11455 terminators in place.
11456 (escape_bang_in_quoted_argument): Adjust to return bool.
11457 (execv_argv::execv_argv): New ctor.
11458 (execv_argv::init_for_shell): New method, factored out from
11459 fork_inferior. Don't strdup strings into the vector.
11460 (fork_inferior): Eliminate "shell" local and use execv_argv. Use
11461 Remove free_vector_argv call.
11462
11463 2017-04-13 Yao Qi <yao.qi@linaro.org>
11464
11465 * rx-tdep.c (rx_fpsw_type): Check tdep->rx_fpsw_type instead of
11466 tdep->rx_psw_type.
11467
11468 2017-04-13 Yao Qi <yao.qi@linaro.org>
11469
11470 * rl78-tdep.c (rl78_gdbarch_init): Use XCNEW instead of XNEW.
11471 * rx-tdep.c (rx_gdbarch_init): Likewise.
11472
11473 2017-04-13 Pedro Alves <palves@redhat.com>
11474
11475 * breakpoint.h (struct breakpoint): Reindent.
11476
11477 2017-04-13 Pedro Alves <palves@redhat.com>
11478
11479 * breakpoint.c (bp_location): Rename to ...
11480 (bp_locations): ... this. All references updated.
11481 (bp_location_count): Rename to ...
11482 (bp_locations_count): ... this. All references updated.
11483 (bp_location_placed_address_before_address_max): Rename to ...
11484 (bp_locations_placed_address_before_address_max): ... this. All
11485 references updated.
11486 (bp_location_shadow_len_after_address_max): Rename to ...
11487 (bp_locations_shadow_len_after_address_max): ... this. All
11488 references updated.
11489 (bp_location_compare_addrs): Rename to ...
11490 (bp_locations_compare_addrs): ... this. All references updated.
11491 (bp_location_compare):Rename to ...
11492 (bp_locations_compare): ... this. All references updated.
11493 (bp_location_target_extensions_update): Rename to ...
11494 (bp_locations_target_extensions_update): ... this. All references
11495 updated.
11496
11497 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
11498
11499 * Makefile.in (HFILES_NO_SRCDIR): Add "common/gdb_termios.h".
11500 * common/common.m4: Check headers 'termios.h', 'termio.h' and
11501 'sgtty.h'.
11502 * common/gdb_termios.h: New file, with parts of "terminal.h".
11503 * inflow.c: Include "gdb_termios.h".
11504 * ser-unix.c: Include "gdb_termios.h".
11505 * terminal.h: Move terminal-related defines to
11506 "common/gdb_termios.h".
11507
11508 2017-04-12 Tom Tromey <tom@tromey.com>
11509
11510 * probe.c (parse_probes): Update.
11511 * location.h (delete_event_location): Don't declare.
11512 (event_location_deleter::operator()): Update.
11513 * location.c (event_location_deleter::operator()): Rename from
11514 delete_event_location.
11515 * linespec.h (linespec_result) <location>: Change type to
11516 event_location_up.
11517 * linespec.c (canonicalize_linespec, event_location_to_sals)
11518 (decode_objc): Update.
11519 (linespec_result): Don't call delete_event_location.
11520 * breakpoint.c (create_breakpoints_sal)
11521 (bkpt_probe_create_sals_from_location)
11522 (strace_marker_create_sals_from_location): Update.
11523
11524 2017-04-12 Tom Tromey <tom@tromey.com>
11525
11526 * linespec.h (struct linespec_result): Add constructor and
11527 destructor.
11528 (init_linespec_result, destroy_linespec_result)
11529 (make_cleanup_destroy_linespec_result): Don't declare.
11530 * linespec.c (init_linespec_result): Remove.
11531 (linespec_result::~linespec_result): Rename from
11532 destroy_linespec_result. Update.
11533 (cleanup_linespec_result, make_cleanup_destroy_linespec_result):
11534 Remove.
11535 * breakpoint.c (create_breakpoint, break_range_command)
11536 (decode_location_default): Update.
11537 * ax-gdb.c (agent_command_1): Update.
11538
11539 2017-04-12 Tom Tromey <tom@tromey.com>
11540
11541 * remote.c (remote_download_tracepoint): Update.
11542 * python/py-breakpoint.c (bppy_get_location): Update.
11543 * guile/scm-breakpoint.c (bpscm_print_breakpoint_smob)
11544 (gdbscm_breakpoint_location): Update.
11545 * elfread.c (elf_gnu_ifunc_resolver_return_stop): Update.
11546 * breakpoint.h (struct breakpoint) <location, location_range_end>:
11547 Change type to event_location_up.
11548 * breakpoint.c (create_overlay_event_breakpoint)
11549 (create_longjmp_master_breakpoint)
11550 (create_std_terminate_master_breakpoint)
11551 (create_exception_master_breakpoint)
11552 (breakpoint_event_location_empty_p, print_breakpoint_location)
11553 (print_one_breakpoint_location, create_thread_event_breakpoint)
11554 (init_breakpoint_sal, create_breakpoint)
11555 (print_recreate_ranged_breakpoint, break_range_command)
11556 (init_ada_exception_breakpoint, say_where): Update.
11557 (base_breakpoint_dtor): Don't call delete_event_location.
11558 (bkpt_print_recreate, tracepoint_print_recreate)
11559 (dprintf_print_recreate, update_static_tracepoint)
11560 (breakpoint_re_set_default): Update.
11561
11562 2017-04-12 Tom Tromey <tom@tromey.com>
11563
11564 * compile/compile-loc2c.c (compute_stack_depth_worker): Change
11565 type of "to_do". Update.
11566 (compute_stack_depth): Use std::vector.
11567
11568 2017-04-12 Tom Tromey <tom@tromey.com>
11569
11570 * printcmd.c (find_instruction_backward): Use std::vector.
11571
11572 2017-04-12 Tom Tromey <tom@tromey.com>
11573
11574 * symfile.c (objfilep): Remove typedef.
11575 (reread_symbols): Use a std::vector.
11576
11577 2017-04-12 Tom Tromey <tom@tromey.com>
11578
11579 * mi/mi-main.c (exec_direction_forward): Remove.
11580 (exec_reverse_continue, mi_execute_command): Use scoped_restore.
11581 * guile/scm-ports.c (ioscm_with_output_to_port_worker): Use
11582 scoped_restore.
11583 * guile/guile.c (guile_repl_command, guile_command)
11584 (gdbscm_execute_gdb_command): Use scoped_restore.
11585 * go-exp.y (go_parse): Use scoped_restore.
11586 * d-exp.y (d_parse): Use scoped_restore.
11587 * cli/cli-decode.c (cmd_func): Use scoped_restore.
11588 * c-exp.y (c_parse): Use scoped_restore.
11589
11590 2017-04-12 Tom Tromey <tom@tromey.com>
11591
11592 * mi/mi-parse.h (struct mi_parse): Add constructor, destructor.
11593 (mi_parse): Update return type.
11594 (mi_parse_free): Remove.
11595 * mi/mi-parse.c (mi_parse::mi_parse): New constructor.
11596 (mi_parse::~mi_parse): Rename from mi_parse_free.
11597 (mi_parse_cleanup): Remove.
11598 (mi_parse): Return a unique_ptr. Use new.
11599 * mi/mi-main.c (mi_execute_command): Update.
11600
11601 2017-04-12 Tom Tromey <tom@tromey.com>
11602
11603 * location.c (explicit_location_lex_one): Return a
11604 unique_xmalloc_ptr.
11605 (string_to_explicit_location): Update. Remove cleanups.
11606
11607 2017-04-12 Tom Tromey <tom@tromey.com>
11608
11609 * gnu-v3-abi.c (value_and_voffset_p): Remove typedef.
11610 (compare_value_and_voffset): Change type. Update.
11611 (compute_vtable_size): Change type of "offset_vec".
11612 (gnuv3_print_vtable): Use std::vector. Remove cleanups.
11613 (gnuv3_get_typeid): Remove extraneous declaration.
11614
11615 2017-04-12 Tom Tromey <tom@tromey.com>
11616
11617 * charset.h (wchar_iterator): Fix comment.
11618
11619 2017-04-12 Tom Tromey <tom@tromey.com>
11620
11621 * charset.c (iconv_wrapper): New class.
11622 (cleanup_iconv): Remove.
11623 (convert_between_encodings): Use it.
11624
11625 2017-04-12 Tom Tromey <tom@tromey.com>
11626
11627 * symfile.h (increment_reading_symtab): Update type.
11628 * symfile.c (decrement_reading_symtab): Remove.
11629 (increment_reading_symtab): Return a scoped_restore_tmpl<int>.
11630 * psymtab.c (psymtab_to_symtab): Update.
11631 * dwarf2read.c (dw2_instantiate_symtab): Update.
11632
11633 2017-04-12 Tom Tromey <tom@tromey.com>
11634
11635 * jit.c (struct jit_reader): Declare separately. Add constructor
11636 and destructor. Change type of "handle".
11637 (loaded_jit_reader): Define separately.
11638 (jit_reader_load): Update. New "new".
11639 (jit_reader_unload_command): Use "delete".
11640 * gdb-dlfcn.h (struct dlclose_deleter): New.
11641 (gdb_dlhandle_up): New typedef.
11642 (gdb_dlopen, gdb_dlsym): Update types.
11643 (gdb_dlclose): Remove.
11644 * gdb-dlfcn.c (gdb_dlopen): Return a gdb_dlhandle_up.
11645 (gdb_dlsym): Change type of "handle".
11646 (make_cleanup_dlclose): Remove.
11647 (dlclose_deleter::operator()): Rename from gdb_dlclose.
11648 * compile/compile-c-support.c (load_libcc): Update.
11649
11650 2017-04-12 Tom Tromey <tom@tromey.com>
11651
11652 * symtab.h (find_pcs_for_symtab_line): Change return type.
11653 * symtab.c (find_pcs_for_symtab_line): Change return type.
11654 * python/py-linetable.c (build_line_table_tuple_from_pcs): Change
11655 type of "vec". Update.
11656 (ltpy_get_pcs_for_line): Update.
11657 * linespec.c (decode_digits_ordinary): Update.
11658
11659 2017-04-12 Tom Tromey <tom@tromey.com>
11660
11661 * tracepoint.c (actions_command): Update.
11662 * python/python.c (python_command, python_interactive_command):
11663 Update.
11664 * mi/mi-cmd-break.c (mi_cmd_break_commands): Update.
11665 * guile/guile.c (guile_command): Update.
11666 * defs.h (read_command_lines, read_command_lines_1): Return
11667 command_line_up.
11668 (command_lines_deleter): New struct.
11669 (command_line_up): New typedef.
11670 * compile/compile.c (compile_code_command)
11671 (compile_print_command): Update.
11672 * cli/cli-script.h (get_command_line, copy_command_lines): Return
11673 command_line_up.
11674 (make_cleanup_free_command_lines): Remove.
11675 * cli/cli-script.c (get_command_line, read_command_lines_1)
11676 (copy_command_lines): Return command_line_up.
11677 (while_command, if_command, read_command_lines, define_command)
11678 (document_command): Update.
11679 (do_free_command_lines_cleanup, make_cleanup_free_command_lines):
11680 Remove.
11681 * breakpoint.h (breakpoint_set_commands): Change type of
11682 "commands".
11683 * breakpoint.c (breakpoint_set_commands): Change type of
11684 "commands". Update.
11685 (do_map_commands_command, update_dprintf_command_list)
11686 (create_tracepoint_from_upload): Update.
11687
11688 2017-04-12 Tom Tromey <tom@tromey.com>
11689
11690 * tracepoint.c (scope_info): Update.
11691 * spu-tdep.c (spu_catch_start): Update.
11692 * python/python.c (gdbpy_decode_line): Update.
11693 * python/py-finishbreakpoint.c (bpfinishpy_init): Update.
11694 * python/py-breakpoint.c (bppy_init): Update.
11695 * probe.c (parse_probes): Update.
11696 * mi/mi-cmd-break.c (mi_cmd_break_insert_1): Update.
11697 * location.h (event_location_deleter): New struct.
11698 (event_location_up): New typedef.
11699 (new_linespec_location, new_address_location, new_probe_location)
11700 (new_explicit_location, copy_event_location)
11701 (string_to_event_location, string_to_event_location_basic)
11702 (string_to_explicit_location): Update return type.
11703 (make_cleanup_delete_event_location): Remove.
11704 * location.c (new_linespec_location, new_address_location)
11705 (new_probe_location, new_explicit_location, copy_event_location):
11706 Return event_location_up.
11707 (delete_event_location_cleanup)
11708 (make_cleanup_delete_event_location): Remove.
11709 (string_to_explicit_location, string_to_event_location_basic)
11710 (string_to_event_location): Return event_location_up.
11711 * linespec.c (canonicalize_linespec, event_location_to_sals)
11712 (decode_line_with_current_source)
11713 (decode_line_with_last_displayed, decode_objc): Update.
11714 * guile/scm-breakpoint.c (gdbscm_register_breakpoint_x): Update.
11715 * completer.c (location_completer): Update.
11716 * cli/cli-cmds.c (edit_command, list_command): Update.
11717 * breakpoint.c (create_overlay_event_breakpoint)
11718 (create_longjmp_master_breakpoint)
11719 (create_std_terminate_master_breakpoint)
11720 (create_exception_master_breakpoint)
11721 (create_thread_event_breakpoint): Update.
11722 (init_breakpoint_sal): Update. Remove some dead code.
11723 (create_breakpoint_sal): Change type of "location". Update.
11724 (create_breakpoints_sal, create_breakpoint, break_command_1)
11725 (dprintf_command, break_range_command, until_break_command)
11726 (init_ada_exception_breakpoint)
11727 (strace_marker_create_sals_from_location)
11728 (update_static_tracepoint, trace_command, ftrace_command)
11729 (strace_command, create_tracepoint_from_upload): Update.
11730 * break-catch-throw.c (re_set_exception_catchpoint): Update.
11731 * ax-gdb.c (agent_command_1): Update.
11732
11733 2017-04-12 Pedro Alves <palves@redhat.com>
11734
11735 * Makefile.in (ALL_TARGET_OBS): Add i386-go32-tdep.o.
11736 * configure.tgt: Handle i[34567]86-*-go32* and
11737 i[34567]86-*-msdosdjgpp*.
11738 * i386-tdep.c (i386_svr4_reg_to_regnum):
11739 Make extern.
11740 (i386_go32_init_abi, i386_coff_osabi_sniffer): Moved to
11741 i386-go32-tdep.c.
11742 (_initialize_i386_tdep): DJGPP bits moved to i386-go32-tdep.c.
11743 * i386-go32-tdep.c: New file.
11744 * i386-tdep.h (tdesc_i386_mmx, i386_svr4_reg_to_regnum): New
11745 declarations.
11746
11747 2017-04-12 Simon Marchi <simon.marchi@ericsson.com>
11748
11749 * aix-thread.c (pd_status2str): Change return type to const char *.
11750
11751 2017-04-12 Pedro Alves <palves@redhat.com>
11752
11753 * i386-tdep.c (i386_elf_init_abi, i386_go32_init_abi): Remove
11754 calls to set_gdbarch_gnu_triplet_regexp.
11755
11756 2017-04-12 Pedro Alves <palves@redhat.com>
11757
11758 PR gdb/21323
11759 * c-lang.c (cplus_primitive_types) <cplus_primitive_type_wchar_t>:
11760 New enum value.
11761 (cplus_language_arch_info): Register cplus_primitive_type_wchar_t.
11762 * gdbtypes.h (struct builtin_type) <builtin_wchar>: New field.
11763 * gdbtypes.c (gdbtypes_post_init): Create the "wchar_t" type.
11764 * gdbarch.sh (wchar_bit, wchar_signed): New per-arch values.
11765 * gdbarch.h, gdbarch.c: Regenerate.
11766 * aarch64-tdep.c (aarch64_gdbarch_init): Override
11767 gdbarch_wchar_bit and gdbarch_wchar_signed.
11768 * alpha-tdep.c (alpha_gdbarch_init): Likewise.
11769 * arm-tdep.c (arm_gdbarch_init): Likewise.
11770 * avr-tdep.c (avr_gdbarch_init): Likewise.
11771 * h8300-tdep.c (h8300_gdbarch_init): Likewise.
11772 * i386-nto-tdep.c (i386nto_init_abi): Likewise.
11773 * i386-tdep.c (i386_go32_init_abi): Likewise.
11774 * m32r-tdep.c (m32r_gdbarch_init): Likewise.
11775 * moxie-tdep.c (moxie_gdbarch_init): Likewise.
11776 * nds32-tdep.c (nds32_gdbarch_init): Likewise.
11777 * rs6000-aix-tdep.c (rs6000_aix_init_osabi): Likewise.
11778 * sh-tdep.c (sh_gdbarch_init): Likewise.
11779 * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
11780 * sparc64-tdep.c (sparc64_init_abi): Likewise.
11781 * windows-tdep.c (windows_init_abi): Likewise.
11782 * xstormy16-tdep.c (xstormy16_gdbarch_init): Likewise.
11783
11784 2017-04-12 Pedro Alves <palves@redhat.com>
11785
11786 PR c++/21323
11787 * c-lang.c (cplus_primitive_types) <cplus_primitive_type_char16_t,
11788 cplus_primitive_type_char32_t>: New enum values.
11789 (cplus_language_arch_info): Register cplus_primitive_type_char16_t
11790 and cplus_primitive_type_char32_t.
11791 * dwarf2read.c (read_base_type) <DW_ATE_UTF>: If bit size is 16 or
11792 32, use the archtecture's built-in type for char16_t and char32_t,
11793 respectively. Otherwise, fallback to init_integer_type as before,
11794 but make the type unsigned, and issue a complaint.
11795 * gdbtypes.c (gdbtypes_post_init): Make char16_t and char32_t unsigned.
11796
11797 2017-04-12 Alan Hayward <alan.hayward@arm.com>
11798
11799 * m32r-tdep.c (M32R_ARG_REGISTER_SIZE): Added.
11800 (m32r_push_dummy_call): Use M32R_ARG_REGISTER_SIZE.
11801
11802 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
11803
11804 * windows-nat.c (windows_create_inferior): Declare 'toexec' as
11805 'const char *'.
11806
11807 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
11808
11809 * common/common-utils.c (free_vector_argv): New function.
11810 * common/common-utils.h: Include <vector>.
11811 (free_vector_argv): New prototype.
11812 * darwin-nat.c (darwin_create_inferior): Rewrite function
11813 prototype in order to constify "exec_file" and accept a
11814 "std::string" for "allargs".
11815 * fork-child.c: Include <vector>.
11816 (breakup_args): Rewrite function, using C++.
11817 (fork_inferior): Rewrite function header, constify "exec_file_arg"
11818 and accept "std::string" for "allargs". Update the code to
11819 calculate "argv" based on "allargs". Update calls to "exec_fun"
11820 and "execvp".
11821 * gnu-nat.c (gnu_create_inferior): Rewrite function prototype in
11822 order to constify "exec_file" and accept a "std::string" for
11823 "allargs".
11824 * go32-nat.c (go32_create_inferior): Likewise.
11825 * inf-ptrace.c (inf_ptrace_create_inferior): Likewise.
11826 * infcmd.c (run_command_1): Constify "exec_file". Use
11827 "std::string" for inferior arguments.
11828 * inferior.h (fork_inferior): Update prototype.
11829 * linux-nat.c (linux_nat_create_inferior): Rewrite function
11830 prototype in order to constify "exec_file" and accept a
11831 "std::string" for "allargs".
11832 * nto-procfs.c (procfs_create_inferior): Likewise.
11833 * procfs.c (procfs_create_inferior): Likewise.
11834 * remote-sim.c (gdbsim_create_inferior): Likewise.
11835 * remote.c (extended_remote_run): Update code to accept
11836 "std::string" as argument.
11837 (extended_remote_create_inferior): Rewrite function prototype in
11838 order to constify "exec_file" and accept a "std::string" for
11839 "allargs".
11840 * rs6000-nat.c (super_create_inferior): Likewise.
11841 (rs6000_create_inferior): Likewise.
11842 * target.h (struct target_ops) <to_create_inferior>: Likewise.
11843 * windows-nat.c (windows_create_inferior): Likewise.
11844
11845 2017-04-11 Pedro Alves <palves@redhat.com>
11846
11847 * thread.c: Fix whitespace throughout.
11848
11849 2017-04-11 Philipp Rudo <prudo@linux.vnet.ibm.com>
11850
11851 * linux-nat.c (linux_nat_detach): Remove delete_lwp call.
11852
11853 2017-04-11 Alan Hayward <alan.hayward@arm.com>
11854
11855 * arm-tdep.c (arm_store_return_value): Use FP_REGISTER_SIZE
11856
11857 2017-04-10 Sergio Durigan Junior <sergiodj@redhat.com>
11858
11859 PR gdb/21364
11860 * osdata.c (info_osdata): Check if 'type' is an empty string
11861 instead of NULL.
11862
11863 2017-04-10 Pedro Alves <palves@redhat.com>
11864
11865 * thread.c (add_thread_silent, delete_thread_1, find_thread_ptid)
11866 (ptid_to_global_thread_id, in_thread_list)
11867 (do_captured_list_thread_ids, set_resumed, set_running)
11868 (set_executing, set_stop_requested, finish_thread_state)
11869 (validate_registers_access, can_access_registers_ptid)
11870 (print_thread_info_1, switch_to_thread)
11871 (do_restore_current_thread_cleanup)
11872 (make_cleanup_restore_current_thread, thread_command)
11873 (thread_name_command): Use operator== instead of ptid_equal.
11874
11875 2017-04-10 Pedro Alves <palves@redhat.com>
11876
11877 * thread.c (struct current_thread_cleanup) <next>: Delete field.
11878 (current_thread_cleanup_chain): Delete.
11879 (restore_current_thread_cleanup_dtor)
11880 (make_cleanup_restore_current_thread): Remove references to
11881 current_thread_cleanup_chain.
11882
11883 2017-04-10 Alan Hayward <alan.hayward@arm.com>
11884
11885 * msp430-tdep.c (msp430_pseudo_register_read): Never return
11886 REG_UNKNOWN.
11887
11888 2017-04-10 Yao Qi <yao.qi@linaro.org>
11889
11890 PR gdb/19942
11891 * gdbthread.h (thread_info::deletable): New method.
11892 (thread_info::incref): New method.
11893 (thread_info::decref): New method.
11894 (thread_info::refcount): Move it to private.
11895 * infrun.c (save_stop_context): Call inc_refcount.
11896 (release_stop_context_cleanup): Likewise.
11897 * thread.c (set_thread_exited): New function.
11898 (init_thread_list): Delete "tp" only it is deletable, otherwise
11899 call set_thread_exited.
11900 (delete_thread_1): Call set_thread_exited.
11901 (current_thread_cleanup) <inferior_pid>: Remove.
11902 <thread>: New field.
11903 (restore_current_thread_ptid_changed): Removed.
11904 (do_restore_current_thread_cleanup): Adjust.
11905 (restore_current_thread_cleanup_dtor): Don't call
11906 find_thread_ptid.
11907 (set_thread_refcount): Use dec_refcount.
11908 (make_cleanup_restore_current_thread): Adjust.
11909 (thread_apply_all_command): Call inc_refcount.
11910 (_initialize_thread): Don't call
11911 observer_attach_thread_ptid_changed.
11912
11913 2017-04-10 Yao Qi <yao.qi@linaro.org>
11914
11915 * thread.c (delete_thread_1): Hoist code on marking thread as
11916 exited.
11917
11918 2017-04-09 Simon Marchi <simon.marchi@polymtl.ca>
11919
11920 * windows-nat.c (windows_detach): Initialize ptid with
11921 minus_one_ptid.
11922
11923 2017-04-07 Simon Marchi <simon.marchi@ericsson.com>
11924
11925 * unittests/ptid-selftests.c: Fix erroneous assert messages.
11926
11927 2017-04-07 Alan Hayward <alan.hayward@arm.com>
11928
11929 * bfin-tdep.c (BFIN_MAX_REGISTER_SIZE): Add.
11930 (bfin_pseudo_register_read): Use BFIN_MAX_REGISTER_SIZE.
11931 (bfin_pseudo_register_write): Likewise
11932
11933 2017-04-06 Simon Marchi <simon.marchi@ericsson.com>
11934
11935 * common/ptid.h (struct ptid): Change to...
11936 (class ptid_t): ... this.
11937 <ptid_t>: New constructors.
11938 <pid, lwp_p, lwp, tid_p, tid, is_pid, operator==, operator!=,
11939 matches>: New methods.
11940 <make_null, make_minus_one>: New static methods.
11941 <pid>: Rename to...
11942 <m_pid>: ...this.
11943 <lwp>: Rename to...
11944 <m_lwp>: ...this.
11945 <tid>: Rename to...
11946 <m_tid>: ...this.
11947 (ptid_build, ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal,
11948 ptid_is_pid, ptid_lwp_p, ptid_tid_p, ptid_match): Take ptid arguments
11949 as references, move comment to class ptid_t.
11950 * common/ptid.c (null_ptid, minus_one_ptid): Initialize with
11951 ptid_t static methods.
11952 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_tid,
11953 ptid_equal, ptid_is_pid, ptid_lwp_p, ptid_tid_p, ptid_match):
11954 Take ptid arguments as references, implement using ptid_t methods.
11955 * unittests/ptid-selftests.c: New file.
11956 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
11957 unittests/ptid-selftests.c.
11958 (SUBDIR_UNITTESTS_OBS): Add unittests/ptid-selftests.o.
11959
11960 2017-04-06 Thomas Preud'homme <thomas.preudhomme@arm.com>
11961
11962 * python/python.c (python_run_simple_file): Cast mode literal to
11963 non-const char pointer as expected by PyFile_FromString.
11964
11965 2017-04-05 Simon Marchi <simon.marchi@ericsson.com>
11966
11967 * common/ptid.c (ptid_lwp_p, ptid_tid_p): Remove comparison with
11968 minus_one_ptid and null_ptid.
11969
11970 2017-04-05 Pedro Alves <palves@redhat.com>
11971
11972 * warning.m4 (build_warnings): Remove -Wno-write-strings.
11973 * configure: Regenerate.
11974
11975 2017-04-05 Pedro Alves <palves@redhat.com>
11976
11977 * ada-exp.y (yyerror): Constify.
11978 * ada-lang.c (bound_name, get_selections)
11979 (ada_variant_discrim_type)
11980 (ada_variant_discrim_name, ada_value_struct_elt)
11981 (ada_lookup_struct_elt_type, is_unchecked_variant)
11982 (ada_which_variant_applies, standard_exc, ada_get_next_arg)
11983 (catch_ada_exception_command_split)
11984 (catch_ada_assert_command_split, catch_assert_command)
11985 (ada_op_name): Constify.
11986 * ada-lang.h (ada_yyerror, get_selections)
11987 (ada_variant_discrim_name, ada_value_struct_elt): Constify.
11988 * arc-tdep.c (arc_print_frame_cache): Constify.
11989 * arm-tdep.c (arm_skip_stub): Constify.
11990 * ax-gdb.c (gen_binop, gen_struct_ref_recursive, gen_struct_ref)
11991 (gen_aggregate_elt_ref): Constify.
11992 * bcache.c (print_bcache_statistics): Constify.
11993 * bcache.h (print_bcache_statistics): Constify.
11994 * break-catch-throw.c (catch_exception_command_1):
11995 * breakpoint.c (struct ep_type_description::description):
11996 Constify.
11997 (add_solib_catchpoint): Constify.
11998 (catch_fork_command_1): Add cast.
11999 (add_catch_command): Constify.
12000 * breakpoint.h (add_catch_command, add_solib_catchpoint):
12001 Constify.
12002 * bsd-uthread.c (bsd_uthread_state): Constify.
12003 * buildsym.c (patch_subfile_names): Constify.
12004 * buildsym.h (next_symbol_text_func, patch_subfile_names):
12005 Constify.
12006 * c-exp.y (yyerror): Constify.
12007 (token::oper): Constify.
12008 * c-lang.h (c_yyerror, cp_print_class_member): Constify.
12009 * c-varobj.c (cplus_describe_child): Constify.
12010 * charset.c (find_charset_names): Add cast.
12011 (find_charset_names): Constify array and add const_cast.
12012 * cli/cli-cmds.c (complete_command, cd_command): Constify.
12013 (edit_command): Constify.
12014 * cli/cli-decode.c (lookup_cmd): Constify.
12015 * cli/cli-dump.c (dump_memory_command, dump_value_command):
12016 Constify.
12017 (struct dump_context): Constify.
12018 (add_dump_command, restore_command): Constify.
12019 * cli/cli-script.c (get_command_line): Constify.
12020 * cli/cli-script.h (get_command_line): Constify.
12021 * cli/cli-utils.c (check_for_argument): Constify.
12022 * cli/cli-utils.h (check_for_argument): Constify.
12023 * coff-pe-read.c (struct read_pe_section_data): Constify.
12024 * command.h (lookup_cmd): Constify.
12025 * common/print-utils.c (decimal2str): Constify.
12026 * completer.c (gdb_print_filename): Constify.
12027 * corefile.c (set_gnutarget): Constify.
12028 * cp-name-parser.y (yyerror): Constify.
12029 * cp-valprint.c (cp_print_class_member): Constify.
12030 * cris-tdep.c (cris_register_name, crisv32_register_name):
12031 Constify.
12032 * d-exp.y (yyerror): Constify.
12033 (struct token::oper): Constify.
12034 * d-lang.h (d_yyerror): Constify.
12035 * dbxread.c (struct header_file_location::name): Constify.
12036 (add_old_header_file, add_new_header_file, last_function_name)
12037 (dbx_next_symbol_text, add_bincl_to_list)
12038 (find_corresponding_bincl_psymtab, set_namestring)
12039 (find_stab_function_addr, read_dbx_symtab, start_psymtab)
12040 (dbx_end_psymtab, read_ofile_symtab, process_one_symbol):
12041 * defs.h (command_line_input, print_address_symbolic)
12042 (deprecated_readline_begin_hook): Constify.
12043 * dwarf2read.c (anonymous_struct_prefix, dwarf_bool_name):
12044 Constify.
12045 * event-top.c (handle_line_of_input): Constify and add cast.
12046 * exceptions.c (catch_errors): Constify.
12047 * exceptions.h (catch_errors): Constify.
12048 * expprint.c (print_subexp_standard, op_string, op_name)
12049 (op_name_standard, dump_raw_expression, dump_raw_expression):
12050 * expression.h (op_name, op_string, dump_raw_expression):
12051 Constify.
12052 * f-exp.y (yyerror): Constify.
12053 (struct token::oper): Constify.
12054 (struct f77_boolean_val::name): Constify.
12055 * f-lang.c (f_word_break_characters): Constify.
12056 * f-lang.h (f_yyerror): Constify.
12057 * fork-child.c (fork_inferior): Add cast.
12058 * frv-tdep.c (struct gdbarch_tdep::register_names): Constify.
12059 (new_variant): Constify.
12060 * gdbarch.sh (pstring_ptr, pstring_list): Constify.
12061 * gdbarch.c: Regenerate.
12062 * gdbcore.h (set_gnutarget): Constify.
12063 * go-exp.y (yyerror): Constify.
12064 (token::oper): Constify.
12065 * go-lang.h (go_yyerror): Constify.
12066 * go32-nat.c (go32_sysinfo): Constify.
12067 * guile/scm-breakpoint.c (gdbscm_breakpoint_expression): Constify.
12068 * guile/scm-cmd.c (cmdscm_function): Constify.
12069 * guile/scm-param.c (pascm_param_value): Constify.
12070 * h8300-tdep.c (h8300_register_name, h8300s_register_name)
12071 (h8300sx_register_name): Constify.
12072 * hppa-tdep.c (hppa32_register_name, hppa64_register_name):
12073 Constify.
12074 * ia64-tdep.c (ia64_register_names): Constify.
12075 * infcmd.c (construct_inferior_arguments): Constify.
12076 (path_command, attach_post_wait): Constify.
12077 * language.c (show_range_command, show_case_command)
12078 (unk_lang_error): Constify.
12079 * language.h (language_defn::la_error)
12080 (language_defn::la_name_of_this): Constify.
12081 * linespec.c (decode_line_2): Constify.
12082 * linux-thread-db.c (thread_db_err_str): Constify.
12083 * lm32-tdep.c (lm32_register_name): Constify.
12084 * m2-exp.y (yyerror): Constify.
12085 * m2-lang.h (m2_yyerror): Constify.
12086 * m32r-tdep.c (m32r_register_names): Constify and make static.
12087 * m68hc11-tdep.c (m68hc11_register_names): Constify.
12088 * m88k-tdep.c (m88k_register_name): Constify.
12089 * macroexp.c (appendmem): Constify.
12090 * mdebugread.c (fdr_name, add_data_symbol, parse_type)
12091 (upgrade_type, parse_external, parse_partial_symbols)
12092 (mdebug_next_symbol_text, cross_ref, mylookup_symbol, new_psymtab)
12093 (new_symbol): Constify.
12094 * memattr.c (mem_info_command): Constify.
12095 * mep-tdep.c (register_name_from_keyword): Constify.
12096 * mi/mi-cmd-env.c (mi_cmd_env_path, _initialize_mi_cmd_env):
12097 Constify.
12098 * mi/mi-cmd-stack.c (list_args_or_locals): Constify.
12099 * mi/mi-cmd-var.c (mi_cmd_var_show_attributes): Constify.
12100 * mi/mi-main.c (captured_mi_execute_command): Constify and add
12101 cast.
12102 (mi_execute_async_cli_command): Constify.
12103 * mips-tdep.c (mips_register_name): Constify.
12104 * mn10300-tdep.c (register_name, mn10300_generic_register_name)
12105 (am33_register_name, am33_2_register_name)
12106 * moxie-tdep.c (moxie_register_names): Constify.
12107 * nat/linux-osdata.c (osdata_type): Constify fields.
12108 * nto-tdep.c (nto_parse_redirection): Constify.
12109 * objc-lang.c (lookup_struct_typedef, lookup_objc_class)
12110 (lookup_child_selector): Constify.
12111 (objc_methcall::name): Constify.
12112 * objc-lang.h (lookup_objc_class, lookup_child_selector)
12113 (lookup_struct_typedef): Constify.
12114 * objfiles.c (pc_in_section): Constify.
12115 * objfiles.h (pc_in_section): Constify.
12116 * p-exp.y (struct token::oper): Constify.
12117 (yyerror): Constify.
12118 * p-lang.h (pascal_yyerror): Constify.
12119 * parser-defs.h (op_name_standard): Constify.
12120 (op_print::string): Constify.
12121 (exp_descriptor::op_name): Constify.
12122 * printcmd.c (print_address_symbolic): Constify.
12123 * psymtab.c (print_partial_symbols): Constify.
12124 * python/py-breakpoint.c (stop_func): Constify.
12125 (bppy_get_expression): Constify.
12126 * python/py-cmd.c (cmdpy_completer::name): Constify.
12127 (cmdpy_function): Constify.
12128 * python/py-event.c (evpy_add_attribute)
12129 (gdbpy_initialize_event_generic): Constify.
12130 * python/py-event.h (evpy_add_attribute)
12131 (gdbpy_initialize_event_generic): Constify.
12132 * python/py-evts.c (add_new_registry): Constify.
12133 * python/py-finishbreakpoint.c (outofscope_func): Constify.
12134 * python/py-framefilter.c (get_py_iter_from_func): Constify.
12135 * python/py-inferior.c (get_buffer): Add cast.
12136 * python/py-param.c (parm_constant::name): Constify.
12137 * python/py-unwind.c (fprint_frame_id): Constify.
12138 * python/python.c (gdbpy_parameter_value): Constify.
12139 * remote-fileio.c (remote_fio_func_map): Make 'name' const.
12140 * remote.c (memory_packet_config::name): Constify.
12141 (show_packet_config_cmd, remote_write_bytes)
12142 (remote_buffer_add_string):
12143 * reverse.c (exec_reverse_once): Constify.
12144 * rs6000-tdep.c (variant::name, variant::description): Constify.
12145 * rust-exp.y (rustyyerror): Constify.
12146 * rust-lang.c (rust_op_name): Constify.
12147 * rust-lang.h (rustyyerror): Constify.
12148 * serial.h (serial_ops::name): Constify.
12149 * sh-tdep.c (sh_sh_register_name, sh_sh3_register_name)
12150 (sh_sh3e_register_name, sh_sh2e_register_name)
12151 (sh_sh2a_register_name, sh_sh2a_nofpu_register_name)
12152 (sh_sh_dsp_register_name, sh_sh3_dsp_register_name)
12153 (sh_sh4_register_name, sh_sh4_nofpu_register_name)
12154 (sh_sh4al_dsp_register_name): Constify.
12155 * sh64-tdep.c (sh64_register_name): Constify.
12156 * solib-darwin.c (lookup_symbol_from_bfd): Constify.
12157 * spu-tdep.c (spu_register_name, info_spu_dma_cmdlist): Constify.
12158 * stabsread.c (patch_block_stabs, read_type_number)
12159 (ref_map::stabs, ref_add, process_reference)
12160 (symbol_reference_defined, define_symbol, define_symbol)
12161 (error_type, read_type, read_member_functions, read_cpp_abbrev)
12162 (read_one_struct_field, read_struct_fields, read_baseclasses)
12163 (read_tilde_fields, read_struct_type, read_array_type)
12164 (read_enum_type, read_sun_builtin_type, read_sun_floating_type)
12165 (read_huge_number, read_range_type, read_args, common_block_start)
12166 (find_name_end): Constify.
12167 * stabsread.h (common_block_start, define_symbol)
12168 (process_one_symbol, symbol_reference_defined, ref_add):
12169 * symfile.c (get_section_index, add_symbol_file_command):
12170 * symfile.h (get_section_index): Constify.
12171 * target-descriptions.c (tdesc_type::name): Constify.
12172 (tdesc_free_type): Add cast.
12173 * target.c (find_default_run_target):
12174 (add_deprecated_target_alias, find_default_run_target)
12175 (target_announce_detach): Constify.
12176 (do_option): Constify.
12177 * target.h (add_deprecated_target_alias): Constify.
12178 * thread.c (print_thread_info_1): Constify.
12179 * top.c (deprecated_readline_begin_hook, command_line_input):
12180 Constify.
12181 (init_main): Add casts.
12182 * top.h (handle_line_of_input): Constify.
12183 * tracefile-tfile.c (tfile_write_uploaded_tsv): Constify.
12184 * tracepoint.c (tvariables_info_1, trace_status_mi): Constify.
12185 (tfind_command): Rename to ...
12186 (tfind_command_1): ... this and constify.
12187 (tfind_command): New function.
12188 (tfind_end_command, tfind_start_command): Adjust.
12189 (encode_source_string): Constify.
12190 * tracepoint.h (encode_source_string): Constify.
12191 * tui/tui-data.c (tui_partial_win_by_name): Constify.
12192 * tui/tui-data.h (tui_partial_win_by_name): Constify.
12193 * tui/tui-source.c (tui_set_source_content_nil): Constify.
12194 * tui/tui-source.h (tui_set_source_content_nil): Constify.
12195 * tui/tui-win.c (parse_scrolling_args): Constify.
12196 * tui/tui-windata.c (tui_erase_data_content): Constify.
12197 * tui/tui-windata.h (tui_erase_data_content): Constify.
12198 * tui/tui-winsource.c (tui_erase_source_content): Constify.
12199 * tui/tui.c (tui_enable): Add cast.
12200 * utils.c (defaulted_query): Constify.
12201 (init_page_info): Add cast.
12202 (puts_debug, subset_compare): Constify.
12203 * utils.h (subset_compare): Constify.
12204 * varobj.c (varobj_format_string): Constify.
12205 * varobj.h (varobj_format_string): Constify.
12206 * vax-tdep.c (vax_register_name): Constify.
12207 * windows-nat.c (windows_detach): Constify.
12208 * xcoffread.c (process_linenos, xcoff_next_symbol_text): Constify.
12209 * xml-support.c (gdb_xml_end_element): Constify.
12210 * xml-tdesc.c (tdesc_start_reg): Constify.
12211 * xstormy16-tdep.c (xstormy16_register_name): Constify.
12212 * xtensa-tdep.c (xtensa_find_register_by_name): Constify.
12213 * xtensa-tdep.h (xtensa_register_t::name): Constify.
12214
12215 2017-04-05 Pedro Alves <palves@redhat.com>
12216
12217 * proc-api.c (struct trans): Constify.
12218 (procfs_note): Constify.
12219 * proc-events.c (struct trans, syscall_table):
12220 * proc-flags.c (struct trans): Constify.
12221 * proc-utils.h (procfs_note): Constify.
12222 * proc-why.c (struct trans): Constify.
12223 * procfs.c (dead_procinfo, find_syscall, proc_warn, proc_error)
12224 (procfs_detach): Constify.
12225 * sol-thread.c (struct string_map): Constify.
12226 (td_err_string, td_state_string): Constify.
12227
12228 2017-04-05 Pedro Alves <palves@redhat.com>
12229
12230 * proc-api.c (procfs_filename): Don't initialize
12231 procfs_filename.
12232 (prepare_to_trace): Assume procfs_filename is non-NULL.
12233 (_initialize_proc_api): Give procfs_filename a default value here.
12234
12235 2017-04-05 Pedro Alves <palves@redhat.com>
12236
12237 * break-catch-throw.c (handle_gnu_v3_exceptions): Constify
12238 'cond_string' parameter.
12239 (extract_exception_regexp): Constify 'string' parameter.
12240 (catch_exception_command_1): Constify.
12241 * breakpoint.c (init_catchpoint)
12242 (create_fork_vfork_event_catchpoint): Constify 'cond_string'
12243 parameter.
12244 (ep_parse_optional_if_clause, catch_fork_command_1)
12245 (catch_exec_command_1): Constify.
12246 * breakpoint.h (init_catchpoint): Constify 'cond_string'
12247 parameter.
12248 (ep_parse_optional_if_clause): Constify.
12249 * cli/cli-utils.c (remove_trailing_whitespace)
12250 (check_for_argument): Constify.
12251 * cli/cli-utils.h (remove_trailing_whitespace): Constify and add
12252 non-const overload.
12253 (check_for_argument): Likewise.
12254
12255 2017-04-05 Pedro Alves <palves@redhat.com>
12256
12257 * event-top.c (command_line_handler): Add cast to execute_command
12258 call.
12259 * record-btrace.c (cmd_record_btrace_bts_start)
12260 (cmd_record_btrace_pt_start, cmd_record_btrace_start)
12261 (cmd_record_btrace_start): Add cast to execute_command call.
12262 * record-full.c (record_full_goto_insn):
12263 * record.c (record_start, record_stop): Add cast to
12264 execute_command_to_string calls.
12265 (cmd_record_start): Add cast to execute_command calls.
12266
12267 2017-04-05 Pedro Alves <palves@redhat.com>
12268
12269 * python/python-internal.h (gdb_PyArg_ParseTupleAndKeywords): New
12270 static inline function.
12271 * python/py-arch.c (archpy_disassemble): Constify 'keywords'
12272 array and use gdb_PyArg_ParseTupleAndKeywords.
12273 * python/py-cmd.c (cmdpy_init): Likewise.
12274 * python/py-finishbreakpoint.c (bpfinishpy_init): Likewise.
12275 * python/py-inferior.c (infpy_read_memory, infpy_write_memory)
12276 (infpy_search_memory): Likewise.
12277 * python/py-objfile.c (objfpy_add_separate_debug_file)
12278 (gdbpy_lookup_objfile): Likewise.
12279 * python/py-symbol.c (gdbpy_lookup_symbol)
12280 (gdbpy_lookup_global_symbol): Likewise.
12281 * python/py-type.c (gdbpy_lookup_type): Likewise.
12282 * python/py-value.c (valpy_lazy_string, valpy_string): Likewise.
12283 * python/python.c (execute_gdb_command, gdbpy_write, gdbpy_flush):
12284 Likewise.
12285
12286 2017-04-05 Pedro Alves <palves@redhat.com>
12287
12288 * python/python-internal.h (gdb_PyGetSetDef): New type.
12289 * python/py-block.c (block_object_getset)
12290 (breakpoint_object_getset): Now a gdb_PyGetSetDef array.
12291 * python/py-event.c (event_object_getset)
12292 (finish_breakpoint_object_getset): Likewise.
12293 * python/py-inferior.c (inferior_object_getset): Likewise.
12294 * python/py-infthread.c (thread_object_getset): Likewise.
12295 * python/py-lazy-string.c (lazy_string_object_getset): Likewise.
12296 * python/py-linetable.c (linetable_entry_object_getset): Likewise.
12297 * python/py-objfile.c (objfile_getset): Likewise.
12298 * python/py-progspace.c (pspace_getset): Likewise.
12299 * python/py-record-btrace.c (btpy_insn_getset, btpy_call_getset):
12300 Likewise.
12301 * python/py-record.c (recpy_record_getset): Likewise.
12302 * python/py-symbol.c (symbol_object_getset): Likewise.
12303 * python/py-symtab.c (symtab_object_getset, sal_object_getset):
12304 Likewise.
12305 * python/py-type.c (type_object_getset, field_object_getset):
12306 Likewise.
12307 * python/py-value.c (value_object_getset): Likewise.
12308
12309 2017-04-05 Pedro Alves <palves@redhat.com>
12310
12311 * python/python-internal.h (gdb_PyObject_CallMethod)
12312 (gdb_PyErr_NewException, gdb_PySys_GetObject, gdb_PySys_SetPath):
12313 New functions.
12314 (GDB_PYSYS_SETPATH_CHAR, PyObject_CallMethod, PyErr_NewException)
12315 (PySys_GetObject, PySys_SetPath): New macros.
12316
12317 2017-04-05 Pedro Alves <palves@redhat.com>
12318
12319 * mi/mi-cmd-info.c (mi_cmd_info_os): Call info_osdata instead of
12320 info_osdata_command.
12321 * osdata.c (info_osdata_command): Rename to ...
12322 (info_osdata): ... this. Constify 'type' parameter, and remove
12323 the 'from_tty' parameter. Accept NULL TYPE.
12324 (info_osdata_command): New function.
12325 * osdata.h (info_osdata_command): Remove declaration.
12326 (info_osdata): New declaration.
12327
12328 2017-04-05 Pedro Alves <palves@redhat.com>
12329
12330 * mi/mi-cmd-break.c (mi_cmd_break_insert_1, mi_cmd_break_insert)
12331 (mi_cmd_dprintf_insert, mi_cmd_break_passcount)
12332 (mi_cmd_break_watch, mi_cmd_break_commands): Constify 'command'
12333 parameter.
12334 * mi/mi-cmd-catch.c (mi_cmd_catch_assert, mi_cmd_catch_exception)
12335 (mi_cmd_catch_load, mi_cmd_catch_unload): Constify cmd' parameter.
12336 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Constify 'command'
12337 parameter.
12338 * mi/mi-cmd-env.c (mi_cmd_env_pwd, mi_cmd_env_cd, mi_cmd_env_path)
12339 (mi_cmd_env_dir, mi_cmd_inferior_tty_set, _cmd_inferior_tty_show)
12340 * mi/mi-cmd-file.c (mi_cmd_file_list_exec_source_file)
12341 (mi_cmd_file_list_exec_source_files)
12342 (mi_cmd_file_list_shared_libraries): Constify 'command' parameter.
12343 * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions)
12344 (mi_cmd_info_gdb_mi_command, mi_cmd_info_os): Constify 'command'
12345 parameter.
12346 * mi/mi-cmd-stack.c (mi_cmd_enable_frame_filters)
12347 (mi_cmd_stack_list_frames, mi_cmd_stack_info_depth)
12348 (mi_cmd_stack_list_locals, mi_cmd_stack_list_args)
12349 (mi_cmd_stack_list_variables, mi_cmd_stack_select_frame)
12350 (mi_cmd_stack_info_frame): Constify 'command' parameter.
12351 * mi/mi-cmd-target.c (mi_cmd_target_file_get)
12352 (mi_cmd_target_file_put, mi_cmd_target_file_delete): Constify
12353 'command' parameter.
12354 * mi/mi-cmd-var.c (mi_cmd_var_create, mi_cmd_var_delete)
12355 (mi_cmd_var_set_format, mi_cmd_var_set_visualizer)
12356 (mi_cmd_var_set_frozen, mi_cmd_var_show_format)
12357 (mi_cmd_var_info_num_children, mi_cmd_var_list_children)
12358 (mi_cmd_var_info_type, mi_cmd_var_info_path_expression)
12359 (mi_cmd_var_info_expression, mi_cmd_var_show_attributes)
12360 (mi_cmd_var_evaluate_expression, mi_cmd_var_assign)
12361 (mi_cmd_var_update, mi_cmd_enable_pretty_printing)
12362 (mi_cmd_var_set_update_range): Constify 'command' parameter.
12363 * mi/mi-cmds.h (mi_cmd_argv_ftype): Constify 'command' parameter.
12364 * mi/mi-interp.c (mi_cmd_interpreter_exec): Constify 'command'
12365 parameter.
12366 * mi/mi-main.c (mi_cmd_gdb_exit, mi_cmd_exec_next)
12367 (mi_cmd_exec_next_instruction, mi_cmd_exec_step)
12368 (mi_cmd_exec_step_instruction, mi_cmd_exec_finish)
12369 (mi_cmd_exec_return ,mi_cmd_exec_jump, mi_cmd_exec_continue)
12370 (mi_cmd_exec_interrupt, mi_cmd_exec_run, mi_cmd_target_detach)
12371 (mi_cmd_target_flash_erase, mi_cmd_thread_select)
12372 (mi_cmd_thread_list_ids, mi_cmd_thread_info)
12373 (mi_cmd_list_thread_groups, mi_cmd_data_list_register_names)
12374 (mi_cmd_data_list_changed_registers)
12375 (mi_cmd_data_write_register_values)
12376 (mi_cmd_data_evaluate_expression, mi_cmd_data_read_memory)
12377 (mi_cmd_data_read_memory_bytes, mi_cmd_data_write_memory)
12378 (mi_cmd_data_write_memory_bytes, mi_cmd_enable_timings)
12379 (mi_cmd_list_features, mi_cmd_list_target_features)
12380 (mi_cmd_add_inferior, mi_cmd_remove_inferior)
12381 (mi_cmd_trace_define_variable, mi_cmd_trace_list_variables)
12382 (mi_cmd_trace_find, mi_cmd_trace_save, mi_cmd_trace_start)
12383 (mi_cmd_trace_status, mi_cmd_trace_stop, mi_cmd_ada_task_info)
12384 (mi_cmd_trace_frame_collected): Constify 'command'
12385 parameter.
12386 * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Constify
12387 'command' parameter.
12388
12389 2017-04-05 Pedro Alves <palves@redhat.com>
12390
12391 * ada-lang.c (ada_completer_word_break_characters): Now a const
12392 array.
12393 (ada_get_gdb_completer_word_break_characters): Constify.
12394 * completer.c (gdb_completer_command_word_break_characters)
12395 (gdb_completer_file_name_break_characters)
12396 (gdb_completer_quote_characters): Now const arrays.
12397 (get_gdb_completer_quote_characters): Constify.
12398 (set_rl_completer_word_break_characters): New function.
12399 (set_gdb_completion_word_break_characters)
12400 (complete_line_internal): Use it.
12401 * completer.h (get_gdb_completer_quote_characters): Constify.
12402 (set_rl_completer_word_break_characters): Declare.
12403 * f-lang.c (f_word_break_characters): Constify.
12404 * language.c (default_word_break_characters): Constify.
12405 * language.h (language_defn::la_word_break_characters): Constify.
12406 (default_word_break_characters): Constify.
12407 * top.c (init_main): Use set_rl_completer_word_break_characters.
12408
12409 2017-04-05 Pedro Alves <palves@redhat.com>
12410
12411 * aix-thread.c (aix_thread_pid_to_str)
12412 (aix_thread_extra_thread_info): Constify.
12413 * bsd-kvm.c (bsd_kvm_pid_to_str): Constify.
12414 * bsd-uthread.c (bsd_uthread_extra_thread_info)
12415 (bsd_uthread_pid_to_str): Constify.
12416 * corelow.c (core_pid_to_str): Constify.
12417 * darwin-nat.c (darwin_pid_to_str): Constify.
12418 * fbsd-nat.c (fbsd_pid_to_str): Constify.
12419 * fbsd-tdep.c (fbsd_core_pid_to_str, gdbarch_core_pid_to_str):
12420 Constify.
12421 * gnu-nat.c (gnu_pid_to_str): Constify.
12422 * go32-nat.c (go32_pid_to_str): Constify.
12423 * i386-cygwin-tdep.c (i386_windows_core_pid_to_str): Constify.
12424 * inf-ptrace.c (inf_ptrace_pid_to_str): Constify.
12425 * inferior.c (inferior_pid_to_str): Constify.
12426 * linux-nat.c (linux_nat_pid_to_str): Constify.
12427 * linux-tdep.c (linux_core_pid_to_str): Constify.
12428 * linux-thread-db.c (thread_db_pid_to_str)
12429 (thread_db_extra_thread_info): Constify.
12430 * nto-tdep.c (nto_extra_thread_info): Constify.
12431 * nto-tdep.h (nto_extra_thread_info): Constify.
12432 * obsd-nat.c (obsd_pid_to_str): Constify.
12433 * procfs.c (procfs_pid_to_str): Constify.
12434 * ravenscar-thread.c (ravenscar_extra_thread_info)
12435 (ravenscar_pid_to_str): Constify.
12436 * remote-sim.c (gdbsim_pid_to_str): Constify.
12437 * remote.c (remote_threads_extra_info, remote_pid_to_str):
12438 Constify.
12439 * sol-thread.c (solaris_pid_to_str): Constify.
12440 * sol2-tdep.c (sol2_core_pid_to_str): Constify.
12441 * sol2-tdep.h (sol2_core_pid_to_str): Constify.
12442 * target.c (default_pid_to_str, target_pid_to_str)
12443 (normal_pid_to_str, default_pid_to_str): Constify.
12444 * target.h (target_ops::to_pid_to_str)
12445 (target_ops::to_extra_thread_info): Constify.
12446 (target_pid_to_str, normal_pid_to_str): Constify.
12447 * windows-nat.c (windows_pid_to_str): Constify.
12448 * gdbarch.sh (core_pid_to_str): Constify.
12449 * target-delegates.c: Regenerate.
12450 * gdbarch.h, gdbarch.c: Regenerate.
12451
12452 2017-04-05 Pedro Alves <palves@redhat.com>
12453
12454 * main.c (captured_main_1): Use gdb::unique_xmalloc_ptr to manage
12455 the memory of the temporary warning_pre_print override.
12456 * utils.c (warning_pre_print): Constify.
12457 * utils.h (warning_pre_print): Constify.
12458
12459 2017-04-05 Pedro Alves <palves@redhat.com>
12460
12461 * cli/cli-cmds.c (shell_escape): Constify 'arg' parameter.
12462 (shell_command): New function.
12463 (make_command): Use std::string.
12464 (init_cli_cmds): Register shell_command instead of shell_escape.
12465
12466 2017-04-05 Pedro Alves <palves@redhat.com>
12467
12468 * breakpoint.c (dprintf_function, dprintf_channel): Don't initialize.
12469 * tracepoint.c (default_collect): Don't initialize.
12470
12471 2017-04-05 Pedro Alves <palves@redhat.com>
12472
12473 * macroexp.c (macro_buffer::shared): Now a bool.
12474 (init_buffer): Update.
12475 (init_shared_buffer): Constify 'addr' parameter.
12476 (substitute_args, expand, macro_expand, macro_expand_next): Remove
12477 casts.
12478
12479 2017-04-05 Pedro Alves <palves@redhat.com>
12480
12481 * arm-tdep.c (show_disassembly_style_sfunc): Constify local.
12482 * disasm.c (set_disassembler_options): Constify local.
12483 * i386-tdep.c (i386_print_insn): Remove cast and FIXME comment.
12484
12485 2017-04-05 Sergio Durigan Junior <sergiodj@redhat.com>
12486
12487 PR gdb/21352
12488 * tracefile.c (tsave_command): Fix argument parsing for '-r'
12489 option.
12490
12491 2017-04-05 Yao Qi <yao.qi@linaro.org>
12492
12493 * frame.c (frame_unwind_register_unsigned): Call
12494 frame_unwind_register_value.
12495
12496 2017-04-05 Yao Qi <yao.qi@linaro.org>
12497
12498 * gdb.threads/thread-specific-bp.exp (check_thread_specific_breakpoint):
12499 Use gdb_test_multiple, and don't match anchor.
12500
12501 2017-04-05 Pedro Alves <palves@redhat.com>
12502
12503 * MAINTAINERS (Global Maintainers): Add Simon Marchi.
12504 (Write After Approval): Remove Simon Marchi.
12505
12506 2017-04-05 Pedro Alves <palves@redhat.com>
12507
12508 * common/gdb_optional.h (optional::optional): Make constexpr and
12509 initialize m_dummy.
12510
12511 2017-04-04 John Baldwin <jhb@FreeBSD.org>
12512
12513 * amd64-fbsd-tdep.c: Remove "bsd-uthread.h" include.
12514 (amd64fbsd_jmp_buf_reg_offset): Remove.
12515 (amd64fbsd_supply_uthread): Remove function.
12516 (amd64fbsd_collect_uthread): Remove function.
12517 (amd64fbsd_init_abi): Don't set bsd-uthread callbacks.
12518 * configure.tgt (i[34567]86-*-freebsd*): Remove bsd-uthread.o.
12519 (x86_64-*-freebsd*): Remove bsd-uthread.o.
12520 (fbsd-nat.c): Update comment.
12521 * i386-fbsd-tdep.c: Remove "bsd-uthread.h" include.
12522 (i386fbsd_jmp_buf_reg_offset): Remove.
12523 (i386fbsd_supply_uthread): Remove function.
12524 (i386fbsd_collect_uthread): Remove function.
12525 (i386fbsd_init_abi): Don't set bsd-uthread callbacks.
12526
12527 2017-04-04 John Baldwin <jhb@FreeBSD.org>
12528
12529 * Makefile.in (ALL_64_TARGET_OBS): Remove alpha-fbsd-tdep.o.
12530 (ALLDEPFILES): Remove alpha-fbsd-tdep.c
12531 * NEWS: Mention that support for FreeBSD/alpha was removed.
12532 * alpha-fbsd-tdep.c: Delete file.
12533 * config/alpha/fbsd.mh: Delete file.
12534 * configure.host: Delete alpha*-*-freebsd* and
12535 alpha*-*-kfreebsd*-gnu.
12536 * configure.tgt: Delete alpha*-*-freebsd* and
12537 alpha*-*-kfreebsd*-gnu.
12538
12539 2017-04-04 John Baldwin <jhb@FreeBSD.org>
12540
12541 * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers,
12542 amd64bsd_store_inferior_registers): Use ptid from regcache.
12543
12544 2017-04-04 Pedro Alves <palves@redhat.com>
12545
12546 * dwarf2read.c (lnp_state_machine): Now a class. Initialize all
12547 data fields, make them private and add "m_" prefixes.
12548 (lnp_state_machine::lnp_state_machine): New ctor.
12549 (record_line, check_line_address, handle_set_discriminator)
12550 (handle_set_address, handle_advance_pc, handle_special_opcode)
12551 (handle_advance_line, handle_set_file, handle_negate_stmt)
12552 (handle_const_add_pc, handle_fixed_advance_pc, handle_copy)
12553 (end_sequence, advance_line): New methods.
12554 (m_gdbarch, m_record_lines_p): New fields.
12555 (lnp_reader_state): Delete.
12556 (dwarf_record_line): Rename to ...
12557 (lnp_state_machine::record_line): ... adjust.
12558 (init_lnp_state_machine): Delete.
12559 (lnp_state_machine::lnp_state_machine): New.
12560 (check_line_address): Rename to ...
12561 (lnp_state_machine::check_line_address): This.
12562 (dwarf_decode_lines_1): Remove reference to "reader_state".
12563 Adjust lnp_state_machine having a non-default ctor. Use bool.
12564 State machine internal state manipulation moved to
12565 lnp_state_machine methods.
12566
12567 2017-04-04 Pedro Alves <palves@redhat.com>
12568
12569 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
12570 unittests/offset-type-selftests.c.
12571 (SUBDIR_UNITTESTS_OBS): Add offset-type-selftests.o.
12572 * common/offset-type.h: New file.
12573 * common/preprocessor.h: New file.
12574 * common/traits.h: New file.
12575 * common/valid-expr.h: New file.
12576 * dwarf2expr.c: Include "common/underlying.h". Adjust to use
12577 sect_offset and cu_offset strong typedefs throughout.
12578 * dwarf2expr.h: Adjust to use sect_offset and cu_offset strong
12579 typedefs throughout.
12580 * dwarf2loc.c: Include "common/underlying.h". Adjust to use
12581 sect_offset and cu_offset strong typedefs throughout.
12582 * dwarf2read.c: Adjust to use sect_offset and cu_offset strong
12583 typedefs throughout.
12584 * gdbtypes.h: Include "common/offset-type.h".
12585 (cu_offset): Now an offset type (strong typedef) instead of a
12586 struct.
12587 (sect_offset): Likewise.
12588 (union call_site_parameter_u): Rename "param_offset" field to
12589 "param_cu_off".
12590 * unittests/offset-type-selftests.c: New file.
12591
12592 2017-04-04 Pedro Alves <palves@redhat.com>
12593
12594 * common/underlying.h: New file.
12595 * dwarf2read.c: Include "common/gdb_optional.h" and
12596 "common/underlying.h".
12597 (dir_index, file_name_index): New types.
12598 (file_entry): Use them.
12599 (file_entry::include): Use to_underlying.
12600 (line_header::add_file_name): Use dir_index.
12601 (read_formatted_entries): Use gdb::optional. Read form before
12602 writting to file_entry.
12603 (dwarf_decode_line_header): Use dir_index.
12604 (lnp_state_machine::current_file): Use to_underlying.
12605 (lnp_state_machine::file): Change type to file_name_index.
12606 (dwarf_record_line): Use to_underlying.
12607 (init_lnp_state_machine): Use file_name_index.
12608 (dwarf_decode_lines_1): Use dir_index and file_name_index.
12609
12610 2017-04-04 Pedro Alves <palves@redhat.com>
12611
12612 * common/gdb_optional.h (gdb::optiona): Add operator->, operator*,
12613 operator bool, has_value and get methods.
12614
12615 2017-04-04 Pedro Alves <palves@redhat.com>
12616
12617 * dwarf2read.c (struct file_entry): Add ctors, and initialize all
12618 fields.
12619 (line_header): Initialize all data fields. Change type of
12620 standard_opcode_lengths to std::unique_ptr<unsigned char[]>.
12621 Change type of include_dirs to std::vector<const char *>. Remove
12622 num_include_dirs, include_dirs_size. Change type of file_names to
12623 std::vector<file_entry>. Remove num_file_names, file_names_size.
12624 (line_header::line_header): New.
12625 (line_header::add_include_dir, line_header::add_file_name): New
12626 methods.
12627 (line_header::include_dir_at): Remove NULL check.
12628 (line_header::file_name_at): Add const overload.
12629 (line_header_up): New unique_ptr typedef.
12630 (dw2_get_file_names_reader): Use line_header_up. Adjust to use
12631 std::vector. Remove free_line_header call.
12632 (dwarf2_build_include_psymtabs): Use line_header_up. Remove
12633 free_line_header call.
12634 (free_cu_line_header): Delete.
12635 (handle_DW_AT_stmt_list, handle_DW_AT_stmt_list)
12636 (setup_type_unit_groups): Use line_header_up instead of cleanups.
12637 Adjust to use std::vector.
12638 (free_line_header): Delete.
12639 (free_line_header_voidp): Use delete.
12640 (add_include_dir): Replace with ...
12641 (line_header::add_include_dir): ... this method. Use std::vector.
12642 (add_file_name): Replace with ...
12643 (line_header::add_file_name): ... this method. Use std::vector.
12644 (add_include_dir_stub): Delete.
12645 (read_formatted_entries): Remove memset.
12646 (dwarf_decode_line_header): Return a line_header_up instead of a
12647 raw pointer. Remove cleanup handling. Pass lambdas to
12648 read_formatted_entries. Adjust to use line_header methods.
12649 (dwarf_decode_lines_1): Adjust to use line_header methods.
12650 (dwarf_decode_lines, file_file_name, file_full_name): Adjust to
12651 use std::vector.
12652
12653 2017-04-04 Simon Marchi <simon.marchi@polymtl.ca>
12654
12655 * remote.c (set_general_thread, set_continue_thread): Use ptid_t
12656 instead of struct ptid.
12657
12658 2017-05-04 Alan Hayward <alan.hayward@arm.com>
12659
12660 * frame.c (get_frame_register_bytes): Unwind using value.
12661 (put_frame_register_bytes): Likewise.
12662
12663 2017-03-30 Iain Buclaw <ibuclaw@gdcproject.org>
12664
12665 * d-exp.y (type_aggregate_p): Treat TYPE_CODE_MODULE as being
12666 aggregate-like.
12667
12668 2017-03-29 Jan Kratochvil <jan.kratochvil@redhat.com>
12669
12670 * auto-load.c (auto_load_section_scripts): Check SEC_HAS_CONTENTS.
12671
12672 2017-03-29 Yao Qi <yao.qi@linaro.org>
12673
12674 * gdbthread.h (struct thread_info): Declare constructor and
12675 destructor. Add some in-class member initializers.
12676 * thread.c (free_thread): Remove.
12677 (init_thread_list): Call delete instead of free_thread.
12678 (new_thread): Call thread_info constructor.
12679 (thread_info::thread_info): New function.
12680 (thread_info::~thread_info): New function.
12681 (delete_thread_1): Call delete instead of free_thread.
12682 (make_cleanup_restore_current_thread): Move tp and frame to
12683 inner block.
12684
12685 2017-03-28 Anton Kolesov <anton.kolesov@synopsys.com>
12686
12687 * arc-tdep.c (arc_frame_cache): Add support for prologue analysis.
12688 (arc_skip_prologue): Likewise.
12689 (arc_make_frame_cache): Likewise.
12690 (arc_pv_get_operand): New function.
12691 (arc_is_in_prologue): Likewise.
12692 (arc_analyze_prologue): Likewise.
12693 (arc_print_frame_cache): Likewise.
12694 (MAX_PROLOGUE_LENGTH): New constant.
12695
12696 2017-03-28 Anton Kolesov <anton.kolesov@synopsys.com>
12697
12698 * configure.tgt: Add arc-insn.o.
12699 * arc-tdep.c (arc_delayed_print_insn): Make non-static.
12700 (dump_arc_instruction_command): New function.
12701 (arc_fprintf_disasm): Likewise.
12702 (arc_disassemble_info): Likewise.
12703 (arc_insn_get_operand_value): Likewise.
12704 (arc_insn_get_operand_value_signed): Likewise.
12705 (arc_insn_get_memory_base_reg): Likewise.
12706 (arc_insn_get_memory_offset): Likewise.
12707 (arc_insn_get_branch_target): Likewise.
12708 (arc_insn_dump): Likewise.
12709 (arc_insn_get_linear_next_pc): Likewise.
12710 * arc-tdep.h (arc_delayed_print_insn): Add function declaration.
12711 (arc_disassemble_info): Likewise.
12712 (arc_insn_get_branch_target): Likewise.
12713 (arc_insn_get_linear_next_pc): Likewise.
12714 * NEWS: Mention new "maint print arc arc-instruction".
12715
12716 2017-03-28 Anton Kolesov <anton.kolesov@synopsys.com>
12717
12718 * arc-tdep (maintenance_print_arc_list): New variable.
12719 (maintenance_print_arc_command): New function.
12720
12721 2017-03-28 Anton Kolesov <anton.kolesov@synopsys.com>
12722
12723 * arc-tdep.c (core_v2_register_names, core_arcompact_register_names)
12724 Add "limm" and "reserved".
12725 (arc_cannot_fetch_register, arc_cannot_store_register): Add
12726 ARC_RESERVED_REGNUM and ARC_LIMM_REGNUM.
12727 * arc-tdep.h (arc_regnum): Likewise.
12728
12729 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
12730
12731 * xtensa-linux-nat.c (fill_gregset): Call regcache_raw_collect
12732 for THREADPTR register.
12733 (supply_gregset_reg): Call regcache_raw_supply for THREADPTR
12734 register.
12735 * xtensa-tdep.c (XTENSA_DBREGN_UREG): New definition.
12736 (xtensa_derive_tdep): Initialize tdep->threadptr_regnum.
12737 * xtensa-tdep.h (gdbarch_tdep::threadptr_regnum): New field.
12738
12739 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
12740
12741 * xtensa-tdep.c (xtensa_pseudo_register_read): Treat all
12742 registers above gdbarch_num_regs (gdbarch) as privileged in
12743 call0 ABI.
12744
12745 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
12746
12747 * xtensa-linux-nat.c (fill_gregset): Call regcache_raw_collect
12748 for a single specified register or for all registers in
12749 a0_base..a0_base + C0_NREGS range.
12750 (supply_gregset_reg): Call regcache_raw_supply for a single
12751 specified register or for all registers in a0_base..a0_base +
12752 C0_NREGS range.
12753
12754 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
12755
12756 * arch/xtensa.h (C0_NREGS): Add definition.
12757 * xtensa-tdep.c (C0_NREGS): Remove definition.
12758
12759 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
12760
12761 * xtensa-tdep.c (xtensa_scan_prologue, call0_analyze_prologue):
12762 Drop xtensa_default_isa initialization.
12763 (xtensa_gdbarch_init): Initialize xtensa_default_isa.
12764
12765 2017-03-27 Pedro Alves <palves@redhat.com>
12766
12767 * dwarf2read.c (file_entry) <dir_index>: Add comment.
12768 (file_entry::include_dir): New method.
12769 (line_header::include_dir_at, line_header::file_name_at): New
12770 methods.
12771 (setup_type_unit_groups, setup_type_unit_groups)
12772 (psymtab_include_file_name): Simplify using the new methods.
12773 (lnp_state_machine) <the_line_header>: New field.
12774 <file>: Add comment.
12775 (lnp_state_machine::current_file): New method.
12776 (dwarf_record_line): Simplify using the new methods.
12777 (init_lnp_state_machine): Initialize the "the_line_header" field.
12778 (dwarf_decode_lines_1, dwarf_decode_lines, file_file_name):
12779 Simplify using the new methods.
12780
12781 2017-03-27 Pedro Alves <palves@redhat.com>
12782
12783 * cp-name-parser.y (make_empty): Delete.
12784 (demangler_special, nested_name, ptr_operator, array_indicator)
12785 (direct_declarator, declarator_1): Use fill_comp instead of
12786 make_empty.
12787
12788 2017-03-27 Pedro Alves <palves@redhat.com>
12789
12790 * xml-support.h (gdb_xml_debug): Pass a "first-to-check" argument
12791 to ATTRIBUTE_PRINTF.
12792 * solib-target.c (library_list_start_list): Print "string" not
12793 "version".
12794 * xml-tdesc.c (tdesc_start_field): Pass "field_name" to
12795 gdb_xml_error call.
12796
12797 2017-03-27 Pedro Alves <palves@redhat.com>
12798
12799 * dwarf2read.c (struct file_and_directory): New.
12800 (dwarf2_get_dwz_file): Adjust to use std::string.
12801 (dw2_get_file_names_reader): Adjust to use file_and_directory.
12802 (find_file_and_directory): Adjust to return a file_and_directory
12803 object.
12804 (read_file_scope): Adjust to use file_and_directory. Remove
12805 make_cleanup/do_cleanups calls.
12806 (open_and_init_dwp_file): Adjust to use std::string. Remove
12807 make_cleanup/do_cleanups calls.
12808 * python/python.c (do_start_initialization): Adjust to ldirname
12809 returning a std::string.
12810 * utils.c (ldirname): Now returns a std::string.
12811 * utils.h (ldirname): Change return type to std::string.
12812 * xml-syscall.c (xml_init_syscalls_info): Adjust to ldirname
12813 returning a std::string.
12814 * xml-tdesc.c (file_read_description_xml): Likewise.
12815
12816 2017-03-24 Alan Hayward <alan.hayward@arm.com>
12817
12818 * regcache.c (regcache_debug_print_register): New function.
12819 * regcache.h (regcache_debug_print_register): New declaration.
12820 * target.c (debug_print_register): Remove.
12821 (target_fetch_registers): Call regcache_debug_print_register.
12822 (target_store_registers): Likewise.
12823
12824 2017-03-24 Pádraig Brady <pbrady@fb.com>
12825
12826 * dwarf2read.c (setup_type_unit_groups): Ensure dir_index doesn't
12827 reference beyond the 'lh->include_dirs' array before accessing to
12828 it.
12829 (psymtab_include_file_name): Likewise.
12830 (dwarf_decode_lines_1): Likewise.
12831 (dwarf_decode_lines): Likewise.
12832 (file_file_name): Likewise.
12833
12834 2017-03-23 Simon Marchi <simon.marchi@ericsson.com>
12835
12836 * fbsd-tdep.c (fbsd_corefile_thread): Don't set/restore
12837 inferior_ptid.
12838 * proc-service.c (ps_lgetregs, ps_lsetregs, ps_lgetfpregs,
12839 ps_lsetfpregs): Likewise.
12840 * regcache.c (regcache_raw_update, regcache_raw_write): Likewise.
12841 * sol-thread.c (ps_lgetregs, ps_lsetregs, ps_lgetfpregs,
12842 ps_lsetfpregs): Likewise.
12843 * target.c (target_fetch_registers, target_store_registers):
12844 Remove asserts.
12845
12846 2017-03-23 Alan Hayward <alan.hayward@arm.com>
12847
12848 * sol-thread.c (sol_thread_store_registers): Remove regcache calls.
12849
12850 2017-03-23 Yao Qi <yao.qi@linaro.org>
12851
12852 * aarch64-tdep.c (aarch64_process_record_test): Declare.
12853 (_initialize_aarch64_tdep): Register it.
12854 (aarch64_record_load_store): Handle PRFM instruction.
12855 (aarch64_process_record_test): New function.
12856
12857 2017-03-23 Yao Qi <yao.qi@linaro.org>
12858
12859 * aarch64-tdep.c (aarch64_record_load_store): Fix code
12860 indentation.
12861
12862 2017-03-23 Yao Qi <yao.qi@linaro.org>
12863
12864 * aarch64-tdep.c: Remove AARCH64_RECORD_FAILURE.
12865
12866 2017-03-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
12867
12868 python/python.c (do_start_initialization): Fix memory leak.
12869
12870 2017-03-22 Simon Marchi <simon.marchi@polymtl.ca>
12871
12872 * inf-ptrace.c (inf_ptrace_xfer_partial): Get pid from ptid
12873 using get_ptrace_pid.
12874 * linux-nat.c (linux_nat_xfer_partial): Don't set/restore
12875 inferior_ptid.
12876 (linux_proc_xfer_partial, linux_proc_xfer_spu): Use lwp of
12877 inferior_ptid instead of pid.
12878
12879 2017-03-22 Yao Qi <yao.qi@linaro.org>
12880
12881 * aarch64-tdep.c: Wrap locally used classes in anonymous
12882 namespace.
12883 * arm-tdep.c: Likewise.
12884 * linespec.c: Likewise.
12885 * ui-out.c: Likewise.
12886
12887 2017-03-22 Jonah Graham <jonah@kichwacoders.com>
12888
12889 PR gdb/19637
12890 * python/lib/gdb/printer/bound_registers.py: Import sys.
12891
12892 2017-03-21 Simon Marchi <simon.marchi@ericsson.com>
12893
12894 * windows-nat.c (do_windows_fetch_inferior_registers): Add
12895 windows_thread_info parameter and use it instead of
12896 current_thread.
12897 (windows_fetch_inferior_registers): Don't set current_thread,
12898 pass the thread to do_windows_fetch_inferior_registers. Use
12899 ptid from regcache instead of inferior_ptid.
12900 (do_windows_store_inferior_registers): Add windows_thread_info
12901 parameter and use it instead of current_thread.
12902 (windows_store_inferior_registers): Don't set current_thread,
12903 pass the thread to do_windows_store_inferior_registers. Use
12904 ptid from regcache instead of inferior_ptid.
12905
12906 2017-03-21 Simon Marchi <simon.marchi@ericsson.com>
12907
12908 * ser-mingw.c (ser_windows_raw): Remove reference to
12909 struct serial::current_timeout.
12910
12911 2017-03-21 Ivo Raisr <ivo.raisr@oracle.com>
12912
12913 PR tdep/20928
12914 * gdb/sparc-tdep.h (gdbarch_tdep) <sparc64_ccr_type>: New field.
12915 * gdb/sparc64-tdep.c (sparc64_ccr_type): New function.
12916 (sparc64_fsr_type): Fix %fsr decoding.
12917
12918 2017-03-21 Tim Wiederhake <tim.wiederhake@intel.com>
12919
12920 * python/py-record-btrace.c (btpy_insn_data): Change return type
12921 for Python 2.
12922
12923 2017-03-20 Simon Marchi <simon.marchi@polymtl.ca>
12924
12925 * spu-linux-nat.c (spu_fetch_inferior_registers,
12926 spu_store_inferior_registers): Use ptid from regcache, set and
12927 restore inferior_ptid.
12928 * spu-multiarch.c (spu_fetch_registers, spu_store_registers):
12929 Likewise.
12930
12931 2017-03-20 Simon Marchi <simon.marchi@polymtl.ca>
12932
12933 * i386-linux-nat.c (fetch_register, store_register,
12934 i386_linux_fetch_inferior_registers,
12935 i386_linux_store_inferior_registers): Use ptid from regcache.
12936 * ia64-linux-nat.c (ia64_linux_fetch_register,
12937 ia64_linux_store_register): Likewise.
12938 * inf-ptrace.c (inf_ptrace_fetch_register,
12939 inf_ptrace_store_register): Likewise.
12940 * m32r-linux-nat.c (m32r_linux_fetch_inferior_registers,
12941 m32r_linux_store_inferior_registers): Likewise.
12942 * m68k-bsd-nat.c (m68kbsd_fetch_inferior_registers,
12943 m68kbsd_store_inferior_registers): Likewise.
12944 * m68k-linux-nat.c (fetch_register, store_register,
12945 m68k_linux_fetch_inferior_registers,
12946 m68k_linux_store_inferior_registers): Likewise.
12947 * m88k-bsd-nat.c (m88kbsd_fetch_inferior_registers,
12948 m88kbsd_store_inferior_registers): Likewise.
12949 * mips-fbsd-nat.c (mips_fbsd_fetch_inferior_registers,
12950 mips_fbsd_store_inferior_registers): Likewise.
12951 * mips-linux-nat.c (mips64_linux_regsets_fetch_registers,
12952 mips64_linux_regsets_store_registers): Likewise.
12953 * mips-nbsd-nat.c (mipsnbsd_fetch_inferior_registers,
12954 mipsnbsd_store_inferior_registers): Likewise.
12955 * mips-obsd-nat.c (mips64obsd_fetch_inferior_registers,
12956 mips64obsd_store_inferior_registers): Likewise.
12957 * nto-procfs.c (procfs_fetch_registers, procfs_store_registers):
12958 Likewise.
12959 * ppc-fbsd-nat.c (ppcfbsd_fetch_inferior_registers,
12960 ppcfbsd_store_inferior_registers): Likewise.
12961 * ppc-linux-nat.c (ppc_linux_fetch_inferior_registers,
12962 ppc_linux_store_inferior_registers): Likewise.
12963 * ppc-nbsd-nat.c (ppcnbsd_fetch_inferior_registers,
12964 ppcnbsd_store_inferior_registers): Likewise.
12965 * ppc-obsd-nat.c (ppcobsd_fetch_registers,
12966 ppcobsd_store_registers): Likewise.
12967 * procfs.c (procfs_fetch_registers, procfs_store_registers):
12968 Likewise.
12969 * ravenscar-thread.c (ravenscar_fetch_registers,
12970 ravenscar_store_registers, ravenscar_prepare_to_store):
12971 Likewise.
12972 * record-btrace.c (record_btrace_fetch_registers,
12973 record_btrace_store_registers, record_btrace_prepare_to_store):
12974 Likewise.
12975 * remote-sim.c (gdbsim_fetch_register, gdbsim_store_register):
12976 Lookup inferior using ptid from regcache, instead of
12977 current_inferior.
12978 * remote.c (remote_fetch_registers, remote_store_registers): Use
12979 ptid from regcache.
12980 * rs6000-nat.c (fetch_register, store_register): Likewise.
12981 * s390-linux-nat.c (s390_linux_fetch_inferior_registers,
12982 s390_linux_store_inferior_registers): Likewise.
12983 * sh-nbsd-nat.c (shnbsd_fetch_inferior_registers,
12984 shnbsd_store_inferior_registers): Likewise.
12985 * sol-thread.c (sol_thread_fetch_registers,
12986 sol_thread_store_registers): Likewise.
12987 * sparc-nat.c (sparc_fetch_inferior_registers,
12988 sparc_store_inferior_registers): Likewise.
12989 * tilegx-linux-nat.c (fetch_inferior_registers,
12990 store_inferior_registers): Likewise.
12991 * vax-bsd-nat.c (vaxbsd_fetch_inferior_registers,
12992 vaxbsd_store_inferior_registers): Likewise.
12993 * xtensa-linux-nat.c (fetch_gregs, store_gregs, fetch_xtregs,
12994 store_xtregs): Likewise.
12995
12996 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
12997
12998 PR gdb/14441
12999 * NEWS: Mention support for rvalue references in GDB and python.
13000 * doc/gdb.texinfo (C Plus Plus Expressions): Mention that GDB
13001 supports both lvalue and rvalue references.
13002
13003 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
13004
13005 PR gdb/14441
13006 * gdbtypes.c (rank_one_type): Implement overloading
13007 resolution rules regarding rvalue references.
13008
13009 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
13010
13011 PR gdb/14441
13012 * aarch64-tdep.c (aarch64_type_align)
13013 (aarch64_extract_return_value, aarch64_store_return_value): Change
13014 lvalue reference type checks to general reference type checks.
13015 * amd64-tdep.c (amd64_classify): Likewise.
13016 * amd64-windows-tdep.c (amd64_windows_passed_by_integer_register):
13017 Likewise.
13018 * arm-tdep.c (arm_type_align, arm_extract_return_value)
13019 (arm_store_return_value): Likewise.
13020 * ax-gdb.c (gen_fetch, gen_cast): Likewise.
13021 * c-typeprint.c (c_print_type): Likewise.
13022 * c-varobj.c (adjust_value_for_child_access, c_value_of_variable)
13023 (cplus_number_of_children, cplus_describe_child): Likewise.
13024 * compile/compile-c-symbols.c (generate_vla_size): Likewise.
13025 * completer.c (expression_completer): Likewise.
13026 * cp-support.c (make_symbol_overload_list_adl_namespace):
13027 Likewise.
13028 * darwin-nat-info.c (info_mach_region_command): Likewise.
13029 * dwarf2loc.c (entry_data_value_coerce_ref)
13030 (value_of_dwarf_reg_entry): Likewise.
13031 * eval.c (ptrmath_type_p, evaluate_subexp_standard)
13032 (evaluate_subexp_for_address, evaluate_subexp_for_sizeof):
13033 Likewise.
13034 * findvar.c (extract_typed_address, store_typed_address):
13035 Likewise.
13036 * gdbtypes.c (rank_one_type): Likewise.
13037 * hppa-tdep.c (hppa64_integral_or_pointer_p): Likewise.
13038 * infcall.c (value_arg_coerce): Likewise.
13039 * language.c (pointer_type): Likewise.
13040 * m32c-tdep.c (m32c_reg_arg_type, m32c_m16c_address_to_pointer):
13041 Likewise.
13042 * m88k-tdep.c (m88k_integral_or_pointer_p): Likewise.
13043 * mn10300-tdep.c (mn10300_type_align): Likewise.
13044 * msp430-tdep.c (msp430_push_dummy_call): Likewise.
13045 * ppc-sysv-tdep.c (do_ppc_sysv_return_value)
13046 (ppc64_sysv_abi_push_param, ppc64_sysv_abi_return_value):
13047 Likewise.
13048 * printcmd.c (print_formatted, x_command): Likewise.
13049 * python/py-type.c (typy_get_composite, typy_template_argument):
13050 Likewise.
13051 * python/py-value.c (valpy_referenced_value)
13052 (valpy_get_dynamic_type, value_has_field): Likewise.
13053 * s390-linux-tdep.c (s390_function_arg_integer): Likewise.
13054 * sparc-tdep.c (sparc_integral_or_pointer_p): Likewise.
13055 * sparc64-tdep.c (sparc64_integral_or_pointer_p): Likewise.
13056 * spu-tdep.c (spu_scalar_value_p): Likewise.
13057 * symtab.c (lookup_symbol_aux): Likewise.
13058 * typeprint.c (whatis_exp, print_type_scalar): Likewise.
13059 * valarith.c (binop_types_user_defined_p, unop_user_defined_p):
13060 Likewise.
13061 * valops.c (value_cast_pointers, value_cast)
13062 (value_reinterpret_cast, value_dynamic_cast, value_addr, typecmp)
13063 (value_struct_elt, value_struct_elt_bitpos)
13064 (value_find_oload_method_list, find_overload_match)
13065 (value_rtti_indirect_type): Likewise.
13066 * valprint.c (val_print_scalar_type_p, generic_val_print):
13067 Likewise.
13068 * value.c (value_actual_type, value_as_address, unpack_long)
13069 (pack_long, pack_unsigned_long, coerce_ref_if_computed)
13070 (coerce_ref): Likewise.
13071 * varobj.c (varobj_get_value_type): Likewise.
13072
13073 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
13074
13075 PR gdb/14441
13076 * doc/python.texi (Types in Python): Add TYPE_CODE_RVALUE_REF to
13077 table of constants.
13078 * python/lib/gdb/command/explore.py: Support exploring values
13079 of rvalue reference types.
13080 * python/lib/gdb/types.py: Implement get_basic_type() for
13081 rvalue reference types.
13082 * python/py-type.c (pyty_codes) <TYPE_CODE_RVALUE_REF>: New
13083 constant.
13084 * python/py-value.c (valpy_getitem): Add an rvalue reference
13085 check.
13086 (valpy_reference_value): Add new parameter "refcode".
13087 (valpy_lvalue_reference_value, valpy_rvalue_reference_value):
13088 New wrappers for valpy_reference_value().
13089 * python/py-xmethods.c (gdbpy_get_xmethod_result_type)
13090 (gdbpy_invoke_xmethod): Likewise.
13091
13092 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
13093
13094 PR gdb/14441
13095 * dwarf2read.c (process_die, read_type_die_1): Handle the
13096 DW_TAG_rvalue_reference_type DIE.
13097 (read_tag_reference_type): Add new parameter "refcode".
13098
13099 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
13100
13101 PR gdb/14441
13102 * c-typeprint.c (c_print_type, c_type_print_varspec_prefix)
13103 (c_type_print_modifier, c_type_print_varspec_suffix)
13104 (c_type_print_base): Support printing rvalue reference types.
13105 * c-valprint.c (c_val_print, c_value_print): Support printing
13106 rvalue reference values.
13107
13108 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
13109
13110 PR gdb/14441
13111 * cp-name-parser.y (ptr_operator): Handle the '&&' token in
13112 typename.
13113 * cp-support.c (replace_typedefs): Handle
13114 DEMANGLE_COMPONENT_RVALUE_REFERENCE.
13115 * python/py-type.c (typy_lookup_type): Likewise.
13116
13117 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
13118
13119 PR gdb/14441
13120 * c-exp.y (ptr_operator): Handle the '&&' token in the typename.
13121 * parse.c (insert_type): Change assert statement.
13122 (follow_types): Handle rvalue reference types.
13123 * parser-defs.h (enum type_pieces) <tp_rvalue_reference>: New
13124 constant.
13125
13126 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
13127
13128 PR gdb/14441
13129 * ada-lang.c (ada_evaluate_subexp): Adhere to the new
13130 value_ref() interface.
13131 * c-valprint.c (c_value_print): Likewise.
13132 * infcall.c (value_arg_coerce): Likewise.
13133 * python/py-value.c (valpy_reference_value): Likewise.
13134 * valops.c (value_cast, value_reinterpret_cast)
13135 (value_dynamic_cast, typecmp): Likewise.
13136 (value_ref): Parameterize by kind of return value reference type.
13137 * value.h (value_ref): Add new parameter "refcode".
13138
13139 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
13140
13141 PR gdb/14441
13142 * dwarf2read.c (read_tag_reference_type): Use
13143 lookup_lvalue_reference_type() instead of lookup_reference_type().
13144 * eval.c (evaluate_subexp_standard): Likewise.
13145 * f-exp.y: Likewise.
13146 * gdbtypes.c (make_reference_type, lookup_reference_type):
13147 Generalize with rvalue reference types.
13148 (lookup_lvalue_reference_type, lookup_rvalue_reference_type): New
13149 convenience wrappers for lookup_reference_type().
13150 * gdbtypes.h (make_reference_type, lookup_reference_type): Add a
13151 reference kind parameter.
13152 (lookup_lvalue_reference_type, lookup_rvalue_reference_type): Add
13153 wrappers for lookup_reference_type().
13154 * guile/scm-type.c (gdbscm_type_reference): Use
13155 lookup_lvalue_reference_type() instead of lookup_reference_type().
13156 * guile/scm-value.c (gdbscm_value_dynamic_type): Likewise.
13157 * parse.c (follow_types): Likewise.
13158 * python/py-type.c (typy_reference, typy_lookup_type): Likewise.
13159 * python/py-value.c (valpy_get_dynamic_type, valpy_getitem):
13160 Likewise.
13161 * python/py-xmethods.c (gdbpy_get_xmethod_result_type)
13162 (gdbpy_invoke_xmethod): Likewise.
13163 * stabsread.c: Provide extra argument to make_reference_type()
13164 call.
13165 * valops.c (value_ref, value_rtti_indirect_type): Use
13166 lookup_lvalue_reference_type() instead of lookup_reference_type().
13167
13168 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
13169
13170 PR gdb/14441
13171 * gdbtypes.h (enum type_code) <TYPE_CODE_RVALUE_REF>: New constant.
13172 (TYPE_IS_REFERENCE): New macro.
13173 (struct type): Add rvalue_reference_type field.
13174 (TYPE_RVALUE_REFERENCE_TYPE): New macro.
13175
13176 2017-03-20 Marc-Andre Laperle <marc-andre.laperle@ericsson.com>
13177
13178 * NEWS: Add an entry about new '-file-list-shared-libraries' command.
13179 * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries):
13180 New function definition.
13181 * mi/mi-cmds.c (mi_cmds): Add -file-list-shared-libraries command.
13182 * mi/mi-cmds.h (mi_cmd_file_list_shared_libraries):
13183 New function declaration.
13184 * mi/mi-interp.c (mi_output_solib_attribs): New Function.
13185 * mi/mi-interp.h: New file.
13186 * solib.c (info_sharedlibrary_command): Replace for loop with
13187 ALL_SO_LIBS macro
13188 * solib.h (update_solib_list): New function declaration.
13189 (so_list_head): Move macro.
13190 * solist.h (ALL_SO_LIBS): New macro.
13191
13192 2017-03-20 Marc-Andre Laperle <marc-andre.laperle@ericsson.com>
13193
13194 * infcmd.c (post_create_inferior): Remove unused argument in
13195 call to solib_add.
13196 * remote.c (remote_start_remote): Likewise.
13197 * solib-frv.c (frv_fetch_objfile_link_map): Likewise.
13198 * solib-svr4.c: (svr4_fetch_objfile_link_map): Likewise.
13199 (enable_break): Likewise.
13200 * solib.c (update_solib_list): Remove unused target argument
13201 and its documentation.
13202 (solib_add): Remove unused target argument. Remove unused
13203 argument in call to update_solib_list.
13204 (info_sharedlibrary_command): Remove unused argument in call
13205 to update_solib_list.
13206 (sharedlibrary_command): Remove unused argument in call to
13207 solib_add.
13208 (handle_solib_event): Likewise.
13209 (reload_shared_libraries): Likewise.
13210 * solib.h (solib_add): Remove unused target argument.
13211
13212 2017-03-20 Andreas Arnez <arnez@linux.vnet.ibm.com>
13213
13214 * s390-linux-tdep.c (is_rsi, is_rie): Remove functions.
13215 (s390_displaced_step_fixup): Cover relative branches with the
13216 default fixup handling. This fixes lack of support for some
13217 relative branch instructions.
13218
13219 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
13220
13221 * i386-gnu-nat.c (gnu_fetch_registers, gnu_store_registers): Use
13222 ptid from regcache.
13223
13224 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
13225
13226 * i386-darwin-nat.c (i386_darwin_fetch_inferior_registers,
13227 i386_darwin_store_inferior_registers): Use ptid from regcache.
13228
13229 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
13230
13231 * i386-bsd-nat.c (i386bsd_fetch_inferior_registers,
13232 i386bsd_store_inferior_registers): Use ptid from regcache.
13233
13234 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
13235
13236 * hppa-obsd-nat.c (hppaobsd_fetch_registers,
13237 hppaobsd_store_registers): Use ptid from regcache.
13238
13239 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
13240
13241 * hppa-nbsd-nat.c (hppanbsd_fetch_registers,
13242 hppanbsd_store_registers): Use ptid from regcache.
13243
13244 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
13245
13246 * hppa-linux-nat.c (fetch_register, store_register): Use ptid
13247 from regcache. Use get_ptrace_pid.
13248
13249 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
13250
13251 * corelow.c (get_core_register_section): Use ptid from regcache,
13252 update doc.
13253
13254 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
13255
13256 * bsd-uthread.c (bsd_uthread_fetch_registers,
13257 bsd_uthread_store_registers): Use ptid from regcache, set and
13258 restore inferior_ptid.
13259
13260 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
13261
13262 * arm-nbsd-nat.c (fetch_register, fetch_regs, fetch_fp_register,
13263 fetch_fp_regs, store_register, store_regs, store_fp_register,
13264 store_fp_regs): Use ptid from regcache.
13265
13266 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
13267
13268 * arm-linux-nat.c (fetch_fpregs, store_fpregs, fetch_regs,
13269 store_regs, fetch_wmmx_regs, store_wmmx_regs, fetch_vfp_regs,
13270 store_vfp_regs): Use ptid from regcache.
13271
13272 2017-03-17 Pedro Alves <palves@redhat.com>
13273
13274 PR remote/21188
13275 * ser-base.c (ser_base_wait_for): Add comment.
13276 (do_ser_base_readchar): Improve comment based on the ser-unix.c's
13277 version.
13278 * ser-unix.c (hardwire_raw): Remove reference to
13279 scb->current_timeout.
13280 (wait_for, do_hardwire_readchar, hardwire_readchar): Delete.
13281 (hardwire_ops): Install ser_base_readchar instead of
13282 hardwire_readchar.
13283 * serial.h (struct serial) <current_timeout, timeout_remaining>:
13284 Remove fields.
13285
13286 2017-03-17 Jonah Graham <jonah@kichwacoders.com>
13287
13288 PR gdb/19637
13289 * python/lib/gdb/printer/bound_registers.py: Add support for
13290 Python 3.
13291
13292 2017-03-16 Andreas Arnez <arnez@linux.vnet.ibm.com>
13293
13294 * dwarf2loc.c (indirect_synthetic_pointer): Get data type of
13295 pointed-to DIE and pass it to dwarf2_evaluate_loc_desc_full.
13296 (dwarf2_evaluate_loc_desc_full): New parameter subobj_type; rename
13297 byte_offset to subobj_byte_offset. Fix the handling of
13298 DWARF_VALUE_STACK on big-endian targets when coming via an
13299 implicit pointer.
13300 (dwarf2_evaluate_loc_desc): Adjust call to
13301 dwarf2_evaluate_loc_desc_full.
13302 * dwarf2loc.h (dwarf2_fetch_die_type_sect_off): New declaration.
13303 * dwarf2read.c (dwarf2_fetch_die_type_sect_off): New function.
13304
13305 2017-03-16 Yao Qi <yao.qi@linaro.org>
13306
13307 * arm-tdep.c (thumb_record_misc): Decode CBNZ, CBZ, REV16,
13308 and REVSH instructions.
13309
13310 2017-03-16 Yao Qi <yao.qi@linaro.org>
13311
13312 * arm-tdep.c [GDB_SELF_TEST]: include "selftests.h".
13313 (arm_record_test): Declare.
13314 (_initialize_arm_tdep) [GDB_SELF_TEST]: call register_self_test.
13315 (thumb_record_ld_st_reg_offset): Rewrite the opcode matching to
13316 align with the manual.
13317 (thumb_record_misc): Adjust the code order to align with the
13318 manual.
13319 (thumb2_record_decode_insn_handler): Fix instruction matching.
13320 (instruction_reader_thumb): New class.
13321 (arm_record_test): New function.
13322
13323 2017-03-16 Yao Qi <yao.qi@linaro.org>
13324
13325 * arm-tdep.c (abstract_memory_reader): New class.
13326 (instruction_reader): New class.
13327 (extract_arm_insn): Add argument 'reader'. Callers updated.
13328 (decode_insn): Likewise.
13329
13330 2017-03-16 Doug Evans <dje@google.com>
13331
13332 * guile/scm-lazy-string.c (lazy_string_smob): Clarify use of LENGTH
13333 member. Change type of TYPE member to SCM. All uses updated.
13334 (lsscm_make_lazy_string_smob): Add assert.
13335 (lsscm_make_lazy_string): Flag bad length values.
13336 (lsscm_elt_type): New function.
13337 (gdbscm_lazy_string_to_value): Rewrite to use
13338 lsscm_safe_lazy_string_to_value.
13339 (lsscm_safe_lazy_string_to_value): Fix handling of TYPE_CODE_PTR.
13340 * guile/scm-value.c (gdbscm_value_to_lazy_string): Flag bad length
13341 values. Fix TYPE_CODE_PTR. Handle TYPE_CODE_ARRAY. Handle typedefs
13342 in incoming type.
13343 * guile/guile-internal.h (tyscm_scm_to_type): Declare.
13344 * guile/scm-type.c (tyscm_scm_to_type): New function.
13345
13346 2017-03-15 Doug Evans <dje@google.com>
13347
13348 PR python/17728, python/18439, python/18779
13349 * python/py-lazy-string.c (lazy_string_object): Clarify use of LENGTH
13350 member. Change type of TYPE member to PyObject *. All uses updated.
13351 (stpy_convert_to_value): Fix handling of TYPE_CODE_PTR.
13352 (gdbpy_create_lazy_string_object): Flag bad length values.
13353 Handle TYPE_CODE_ARRAY with possibly different user-provided length.
13354 Handle typedefs in incoming type.
13355 (stpy_lazy_string_elt_type): New function.
13356 (gdbpy_extract_lazy_string): Call it.
13357 * python/py-value.c (valpy_lazy_string): Flag bad length values.
13358 Fix handling of TYPE_CODE_PTR. Handle TYPE_CODE_ARRAY. Handle
13359 typedefs in incoming type.
13360
13361 2017-03-16 Doug Evans <dje@google.com>
13362
13363 * guile/guile-internal.h (tyscm_scm_to_type): Declare.
13364 * guile/scm-type.c (tyscm_scm_to_type): New function.
13365
13366 2017-03-16 Jiong Wang <jiong.wang@arm.com>
13367
13368 * inf-ptrace.c (inf_ptrace_peek_poke): Change the type to
13369 "ULONGEST" for "skip".
13370
13371 2017-03-14 Andreas Arnez <arnez@linux.vnet.ibm.com>
13372
13373 PR gdb/21220
13374 * inf-ptrace.c (inf_ptrace_xfer_partial): In "case
13375 TARGET_OBJECT_MEMORY", extract the logic for ptrace peek/poke...
13376 (inf_ptrace_peek_poke): ...here. New function. Now also loop
13377 over ptrace peek/poke until end of buffer or error.
13378
13379 2017-03-14 Simon Marchi <simon.marchi@ericsson.com>
13380
13381 * parse.c (length_of_subexp): Make static.
13382 * parser-defs.h (length_of_subexp): Remove.
13383
13384 2017-03-14 Andreas Arnez <arnez@linux.vnet.ibm.com>
13385
13386 * linux-nat.c (linux_proc_xfer_partial): Handle write operations
13387 as well.
13388
13389 2017-03-14 Pedro Alves <palves@redhat.com>
13390
13391 * cp-name-parser.y (cp_demangled_name_to_comp): Update comment.
13392 (main): Use std::unique_ptr. Remove calls to
13393 cp_demangled_name_parse_free.
13394
13395 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
13396
13397 * alpha-bsd-nat.c (alphabsd_fetch_inferior_registers,
13398 alphabsd_store_inferior_registers): Use regcache->ptid instead
13399 of inferior_ptid.
13400
13401 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
13402
13403 * aix-thread.c (aix_thread_fetch_registers,
13404 aix_thread_store_registers): Use regcache->ptid instead of
13405 inferior_ptid.
13406
13407 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
13408
13409 * aarch64-linux-nat.c (fetch_gregs_from_thread,
13410 store_gregs_to_thread, fetch_fpregs_from_thread,
13411 store_fpregs_to_thread): Use regcache->ptid instead of
13412 inferior_ptid.
13413
13414 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
13415
13416 * amd64-linux-nat.c (amd64_linux_fetch_inferior_registers,
13417 amd64_linux_fetch_inferior_registers): Use regcache->ptid
13418 instead of inferior_ptid.
13419
13420 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
13421
13422 * target.c (target_fetch_registers, target_store_registers): Add
13423 assert.
13424
13425 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
13426
13427 * regcache.h (regcache_get_ptid): New function.
13428 * regcache.c (regcache_get_ptid): New function.
13429
13430 2017-03-13 Mark Wielaard <mark@klomp.org>
13431
13432 * cp-name-parser.y (make_empty): Initialize d_printing to zero.
13433
13434 2017-03-10 Keith Seitz <keiths@redhat.com>
13435
13436 PR c++/8218
13437 * c-typeprint.c (cp_type_print_method_args): Skip artificial arguments.
13438
13439 2017-03-08 Pedro Alves <palves@redhat.com>
13440
13441 PR gdb/18360
13442 * infrun.c (start_step_over, do_target_resume, resume)
13443 (restart_threads): Assert we're not resuming a thread that is
13444 meant to be stopped.
13445 (infrun_thread_stop_requested_callback): Delete.
13446 (infrun_thread_stop_requested): If the thread is internally
13447 stopped, queue a pending stop event and clear the thread's
13448 inline-frame state.
13449 (handle_stop_requested): New function.
13450 (handle_syscall_event, handle_inferior_event_1): Use
13451 handle_stop_requested.
13452 (handle_stop_requested): New function.
13453 (handle_signal_stop): Set the thread's stop_signal here instead of
13454 at caller.
13455 (finish_step_over): Clear step over info unconditionally.
13456 (handle_signal_stop): If the user had interrupted the event
13457 thread, consider the stop a random signal.
13458 (handle_signal_stop) <signal arrived while stepping over
13459 breakpoint>: Don't restart threads here.
13460 (stop_waiting): Don't clear step-over info here.
13461
13462 2017-03-08 Pedro Alves <palves@redhat.com>
13463
13464 PR 21206
13465 * common/gdb_unlinker.h (unlinker::unlinker): Attribute nonnull
13466 goes to argument 2, not 1.
13467
13468 2017-03-08 Pedro Alves <palves@redhat.com>
13469
13470 PR cli/21218
13471 * top.c (gdb_readline_wrapper): Avoid passing NULL to
13472 display_gdb_prompt.
13473 (command_line_input): Add comment.
13474
13475 2017-03-08 Pedro Alves <palves@redhat.com>
13476
13477 PR tui/21216
13478 * tui/tui-file.c (tui_file::write): New.
13479 * tui/tui-file.h (tui_file): Override "write".
13480 * tui/tui-io.c (do_tui_putc, update_start_line): New functions,
13481 factored out from ...
13482 (tui_puts): ... here.
13483 (tui_putc): Use them.
13484 (tui_write): New function.
13485 * tui/tui-io.h (tui_write): Declare.
13486
13487 2017-03-07 Sergio Durigan Junior <sergiodj@redhat.com>
13488
13489 * Makefile.in (SFILES): Replace "environ.c" with
13490 "common/environ.c".
13491 (HFILES_NO_SRCDIR): Likewise, for "environ.h".
13492 * environ.c: Include "common-defs.h" instead of "defs.h. Moved
13493 to...
13494 * common/environ.c: ... here.
13495 * environ.h: Moved to...
13496 * common/environ.h: ... here.
13497
13498 2017-03-07 Peter Bergner <bergner@vnet.ibm.com>
13499
13500 * gdbarch.sh (pstring_ptr): New static function.
13501 (gdbarch_disassembler_options): Use it.
13502 (gdbarch_verify_disassembler_options): Print valid_disassembler_options,
13503 not valid_disassembler_option->name.
13504 * gdbarch.c: Regenerate.
13505
13506 2017-03-07 Peter Bergner <bergner@vnet.ibm.com>
13507
13508 * config/powerpc/ppc64-linux.mh (MH_CFLAGS): Delete.
13509
13510 2017-03-07 Pedro Alves <palves@redhat.com>
13511
13512 * tui/tui-regs.c (tui_restore_gdbout): Don't delete gdb_stdout.
13513
13514 2017-03-07 Walfred Tedeschi <walfred.tedeschi@intel.com>
13515
13516 * i387-tdep.h (i387_reset_bnd_regs): Add function definition.
13517 * i387-tdep.c (i387_reset_bnd_regs): Add function implementation.
13518 * i386-tdep.c (i386_push_dummy_call): Call i387_reset_bnd_regs.
13519 * amd64-tdep.c (amd64_push_dummy_call): Call i387_reset_bnd_regs.
13520
13521 2017-03-06 Simon Marchi <simon.marchi@ericsson.com>
13522
13523 * xtensa-linux-nat.c (fetch_gregs): Remove const.
13524
13525 2017-03-03 Simon Marchi <simon.marchi@ericsson.com>
13526
13527 * remote.c (remote_add_target_side_commands): Use range-based
13528 for loop.
13529
13530 2017-03-03 Yao Qi <yao.qi@linaro.org>
13531
13532 PR gdb/21165
13533 * ada-valprint.c (ada_val_print_ref): Call value_fetch_lazy if
13534 value is lazy.
13535 * valprint.c (common_val_print): Likewise.
13536
13537 2017-02-28 Peter Bergner <bergner@vnet.ibm.com>
13538
13539 * NEWS: Mention new set/show disassembler-options commands.
13540 * doc/gdb.texinfo: Document new set/show disassembler-options commands.
13541 * disasm.c: Include "arch-utils.h", "gdbcmd.h" and "safe-ctype.h".
13542 (prospective_options): New static variable.
13543 (gdb_disassembler::gdb_disassembler): Initialize
13544 m_di.disassembler_options.
13545 (gdb_buffered_insn_length_init_dis): Initilize di->disassembler_options.
13546 (get_disassembler_options): New function.
13547 (set_disassembler_options): Likewise.
13548 (set_disassembler_options_sfunc): Likewise.
13549 (show_disassembler_options_sfunc): Likewise.
13550 (disassembler_options_completer): Likewise.
13551 (_initialize_disasm): Likewise.
13552 * disasm.h (get_disassembler_options): New prototype.
13553 (set_disassembler_options): Likewise.
13554 * gdbarch.sh (gdbarch_disassembler_options): New variable.
13555 (gdbarch_verify_disassembler_options): Likewise.
13556 * gdbarch.c: Regenerate.
13557 * gdbarch.h: Likewise.
13558 * arm-tdep.c (num_disassembly_options): Delete.
13559 (set_disassembly_style): Likewise.
13560 (arm_disassembler_options): New static variable.
13561 (set_disassembly_style_sfunc): Convert short style name into long
13562 option name. Call set_disassembler_options.
13563 (show_disassembly_style_sfunc): New function.
13564 (arm_gdbarch_init): Call set_gdbarch_disassembler_options and
13565 set_gdbarch_verify_disassembler_options.
13566 (_initialize_arm_tdep): Delete regnames variable and update callers.
13567 (arm_disassembler_options): Initialize.
13568 (disasm_options): New variable.
13569 (num_disassembly_options): Rename from this...
13570 (num_disassembly_styles): ...to this. Compute by scanning through
13571 disasm_options.
13572 (valid_disassembly_styles): Initialize using disasm_options.
13573 Remove calls to parse_arm_disassembler_option, get_arm_regnames and
13574 set_arm_regname_option.
13575 Pass show_disassembly_style_sfunc to the "disassembler" setshow command.
13576 * rs6000-tdep.c (powerpc_disassembler_options): New static variable.
13577 (rs6000_gdbarch_init): Call set_gdbarch_disassembler_options and
13578 set_gdbarch_verify_disassembler_options.
13579 * s390-tdep.c (s390_disassembler_options): New static variable.
13580 (s390_gdbarch_init):all set_gdbarch_disassembler_options and
13581 set_gdbarch_verify_disassembler_options.
13582
13583 2017-02-27 Simon Marchi <simon.marchi@ericsson.com>
13584
13585 * remote.c (remote_add_target_side_condition): Remove "struct"
13586 keyword from range-based for loop.
13587
13588 2017-02-27 Simon Marchi <simon.marchi@ericsson.com>
13589
13590 * remote.c (remote_add_target_side_condition): Use range-based
13591 for loop. Update comment.
13592
13593 2017-02-27 Yao Qi <yao.qi@linaro.org>
13594
13595 * f-typeprint.c (f_print_type): Check "varstring" is empty first.
13596
13597 2017-02-26 Alan Hayward <alan.hayward@arm.com>
13598
13599 * regcache.c (regcache_raw_update): New function.
13600 (regcache_raw_read): Move code to regcache_raw_update.
13601 * regcache.h (regcache_raw_update): New declaration.
13602 * remote.c (remote_prepare_to_store): Call regcache_raw_update.
13603
13604 2017-02-26 Jan Kratochvil <jan.kratochvil@redhat.com>
13605
13606 * dwarf2read.c (create_debug_type_hash_table): Initialize
13607 header.signature and header.type_offset_in_tu.
13608
13609 2017-02-24 Pedro Alves <palves@redhat.com>
13610
13611 * symtab.c (make_file_symbol_completion_list_1): Use
13612 add_symtab_completions.
13613
13614 2017-02-24 Alan Hayward <alan.hayward@arm.com>
13615
13616 * stack.c (frame_info): Use frame_unwind_register_value to avoid buf.
13617
13618 2017-02-24 Alan Hayward <alan.hayward@arm.com>
13619
13620 * i386-tdep.c (i386_pseudo_register_read_into_value): Use
13621 I386_MAX_REGISTER_SIZE.
13622 (i386_pseudo_register_write): Likewise.
13623 (i386_process_record): Likewise.
13624 * i387-tdep.c (i387_supply_xsave): Likewise.
13625 * m68k-linux-nat.c (fetch_register): Use M68K_MAX_REGISTER_SIZE.
13626 (store_register): Likewise.
13627
13628 2017-02-23 Pedro Alves <palves@redhat.com>
13629
13630 * ada-lang.c: Include "common/function-view.h".
13631 (ada_iterate_over_symbols): Adjust to use function_view as
13632 callback type.
13633 (struct add_partial_datum, ada_complete_symbol_matcher): Delete.
13634 (ada_make_symbol_completion_list): Use a lambda.
13635 (ada_exc_search_name_matches): Delete.
13636 (name_matches_regex): New.
13637 (ada_add_global_exceptions): Use a lambda and name_matches_regex.
13638 * compile/compile-c-support.c: Include "common/function-view.h".
13639 (print_one_macro): Change prototype to accept a ui_file pointer.
13640 (write_macro_definitions): Use a lambda.
13641 * dwarf2read.c: Include "common/function-view.h".
13642 (dw2_map_expand_apply, dw2_map_symtabs_matching_filename)
13643 (dw2_expand_symtabs_matching): Adjust to use function_view as
13644 callback type.
13645 * language.h: Include "common/function-view.h".
13646 (struct language_defn) <la_iterate_over_symbols>: Adjust to use
13647 function_view as callback type.
13648 (LA_ITERATE_OVER_SYMBOLS): Remove DATA parameter.
13649 * linespec.c: Include "common/function-view.h".
13650 (collect_info::add_symbol): New method.
13651 (struct symbol_and_data_callback, iterate_inline_only, struct
13652 symbol_matcher_data, iterate_name_matcher): Delete.
13653 (iterate_over_all_matching_symtabs): Adjust to use function_view
13654 as callback type and lambdas.
13655 (iterate_over_file_blocks): Adjust to use function_view as
13656 callback type.
13657 (decode_compound_collector): Now a class with private fields.
13658 (decode_compound_collector::release_symbols): New method.
13659 (collect_one_symbol): Rename to...
13660 (decode_compound_collector::operator()): ... this and adjust.
13661 (lookup_prefix_sym): decode_compound_collector construction bits
13662 move to decode_compound_collector ctor. Pass the
13663 decode_compound_collector object directly as callback. Remove
13664 cleanups and use decode_compound_collector::release_symbols
13665 instead.
13666 (symtab_collector): Now a class with private fields.
13667 (symtab_collector::release_symtabs): New method.
13668 (add_symtabs_to_list): Rename to...
13669 (symtab_collector::operator()): ... this and adjust.
13670 (collect_symtabs_from_filename): symtab_collector construction
13671 bits move to symtab_collector ctor. Pass the symtab_collector
13672 object directly as callback. Remove cleanups and use
13673 symtab_collector::release_symtabs instead.
13674 (collect_symbols): Delete.
13675 (add_matching_symbols_to_info): Use lambdas.
13676 * macrocmd.c (print_macro_callback): Delete.
13677 (info_macro_command): Use a lambda.
13678 (info_macros_command): Pass print_macro_definition as callable
13679 directly.
13680 (print_one_macro): Remove 'ignore' parameter.
13681 (macro_list_command): Adjust.
13682 * macrotab.c (macro_for_each_data::fn): Now a function_view.
13683 (macro_for_each_data::user_data): Delete field.
13684 (foreach_macro): Adjust to call the function_view.
13685 (macro_for_each): Adjust to use function_view as callback type.
13686 (foreach_macro_in_scope): Adjust to call the function_view.
13687 (macro_for_each_in_scope): Adjust to use function_view as callback
13688 type.
13689 * macrotab.h: Include "common/function-view.h".
13690 (macro_callback_fn): Declare a prototype instead of a pointer.
13691 Remove "user_data" parameter.
13692 (macro_for_each, macro_for_each_in_scope): Adjust to use
13693 function_view as callback type.
13694 * psymtab.c (partial_map_expand_apply)
13695 (psym_map_symtabs_matching_filename, recursively_search_psymtabs):
13696 Adjust to use function_view as callback type and to return bool.
13697 (psym_expand_symtabs_matching): Adjust to use function_view as
13698 callback types.
13699 * symfile-debug.c (debug_qf_map_symtabs_matching_filename): Adjust
13700 to use function_view as callback type and to return bool.
13701 (debug_qf_expand_symtabs_matching): Adjust to use function_view as
13702 callback types.
13703 * symfile.c (expand_symtabs_matching): Adjust to use function_view
13704 as callback types.
13705 * symfile.h: Include "common/function-view.h".
13706 (expand_symtabs_file_matcher_ftype)
13707 (expand_symtabs_symbol_matcher_ftype)
13708 (expand_symtabs_exp_notify_ftype): Remove "data" parameter and
13709 return bool.
13710 (quick_symbol_functions::map_symtabs_matching_filename)
13711 (quick_symbol_functions::expand_symtabs_matching): Adjust to use
13712 function_view as callback type and return bool.
13713 (expand_symtabs_matching): Adjust to use function_view as callback
13714 type.
13715 (maintenance_expand_name_matcher)
13716 (maintenance_expand_file_matcher): Delete.
13717 (maintenance_expand_symtabs): Use lambdas.
13718 * symtab.c (iterate_over_some_symtabs): Adjust to use
13719 function_view as callback types and return bool.
13720 (iterate_over_symtabs): Likewise. Use unique_xmalloc_ptr instead
13721 of a cleanup.
13722 (lookup_symtab_callback): Delete.
13723 (lookup_symtab): Use a lambda.
13724 (iterate_over_symbols): Adjust to use function_view as callback
13725 type.
13726 (struct search_symbols_data, search_symbols_file_matches)
13727 (search_symbols_name_matches): Delete.
13728 (search_symbols): Use a pair of lambdas.
13729 (struct add_name_data, add_macro_name, symbol_completion_matcher)
13730 (symtab_expansion_callback): Delete.
13731 (default_make_symbol_completion_list_break_on_1): Use lambdas.
13732 * symtab.h: Include "common/function-view.h".
13733 (iterate_over_some_symtabs): Adjust to use function_view as
13734 callback type and return bool.
13735 (iterate_over_symtabs): Adjust to use function_view as callback
13736 type.
13737 (symbol_found_callback_ftype): Remove 'data' parameter and return
13738 bool.
13739 (iterate_over_symbols): Adjust to use function_view as callback
13740 type.
13741
13742 2017-02-23 Pedro Alves <palves@redhat.com>
13743
13744 * Makefile.in (SUBDIR_UNITTESTS_SRCS, SUBDIR_UNITTESTS_OBS): New.
13745 (%.o) <unittests/%.c>: New pattern.
13746 * configure.ac ($development): Add $(SUBDIR_UNITTESTS_OBS) to
13747 CONFIG_OBS, and $(SUBDIR_UNITTESTS_SRCS) to CONFIG_SRCS.
13748 * common/function-view.h: New file.
13749 * unittests/function-view-selftests.c: New file.
13750 * configure: Regenerate.
13751
13752 2017-02-23 Simon Marchi <simon.marchi@ericsson.com>
13753
13754 * bsd-uthread.c (bsd_uthread_thread_alive): Use ptid instead of
13755 inferior_ptid.
13756 * go32-nat.c (go32_thread_alive): Likewise.
13757
13758 2017-02-23 Yao Qi <yao.qi@linaro.org>
13759
13760 * varobj-iter.h (varobj_iter_delete): Call xfree instead of
13761 delete.
13762
13763 2017-02-23 Yao Qi <yao.qi@linaro.org>
13764
13765 * varobj.c (varobj_clear_saved_item): Use delete instead of
13766 xfree.
13767 (update_dynamic_varobj_children): Likewise.
13768
13769 2017-02-21 Jan Kratochvil <jan.kratochvil@redhat.com>
13770
13771 * dwarf2read.c (dwarf2_record_block_ranges): Add forgotten BASEADDR.
13772
13773 2017-02-21 Simon Marchi <simon.marchi@ericsson.com>
13774
13775 * common/enum-flags.h (enum_flags::enum_flags): Initialize
13776 m_enum_value to 0 in default constructor.
13777
13778 2017-02-21 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
13779
13780 * rs6000-tdep.c (LOAD_AND_RESERVE_MASK): Rename from LWARX_MASK.
13781 (STORE_CONDITIONAL_MASK): Rename from STWCX_MASK.
13782 (LBARX_INSTRUCTION, LHARX_INSTRUCTION, LQARX_INSTRUCTION,
13783 STBCX_INSTRUCTION, STHCX_INSTRUCTION, STQCX_INSTRUCTION): New defines.
13784 (IS_LOAD_AND_RESERVE_INSN, IS_STORE_CONDITIONAL_INSN): New macros.
13785 (ppc_displaced_step_copy_insn): Use IS_LOAD_AND_RESERVE_INSN.
13786 (ppc_deal_with_atomic_sequence): Use IS_LOAD_AND_RESERVE_INSN and
13787 IS_STORE_CONDITIONAL_INSN.
13788
13789 2017-02-21 Jan Kratochvil <jan.kratochvil@redhat.com>
13790
13791 * dwarf2_rnglists_process: Initialize range_beginning and range_end.
13792
13793 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
13794
13795 * NEWS (Changes since GDB 7.12): Add DWARF-5.
13796
13797 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
13798
13799 * dwarf2read.c (skip_one_die, read_attribute_value)
13800 (dwarf2_const_value_attr, dump_die_shallow)
13801 (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
13802 (skip_form_bytes, attr_form_is_constant): Handle DW_FORM_data16.
13803
13804 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
13805
13806 * dwarf2read.c (read_file_scope): Rename DW_MACRO_GNU_*.
13807 (dwarf_parse_macro_header): Accept DWARF version 5.
13808 (dwarf_decode_macro_bytes, dwarf_decode_macros): Rename DW_MACRO_GNU_*.
13809
13810 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
13811
13812 * block.c (call_site_for_pc): Rename DW_OP_GNU_*, DW_TAG_GNU_* and
13813 DW_AT_GNU_*.
13814 * common/common-exceptions.h (enum errors): Likewise.
13815 * dwarf2-frame.c (class dwarf_expr_executor): Likewise.
13816 * dwarf2expr.c (dwarf_block_to_dwarf_reg)
13817 (dwarf_expr_context::execute_stack_op): Likewise.
13818 * dwarf2expr.h (struct dwarf_expr_context, struct dwarf_expr_piece):
13819 Likewise.
13820 * dwarf2loc.c (dwarf_evaluate_loc_desc::get_base_type)
13821 (dwarf_evaluate_loc_desc::push_dwarf_reg_entry_value)
13822 (show_entry_values_debug, call_site_to_target_addr)
13823 (func_addr_to_tail_call_list, func_verify_no_selftailcall)
13824 (dwarf_expr_reg_to_entry_parameter, dwarf_entry_parameter_to_value)
13825 (entry_data_value_free_closure, value_of_dwarf_reg_entry)
13826 (value_of_dwarf_block_entry, indirect_pieced_value)
13827 (symbol_needs_eval_context::push_dwarf_reg_entry_value):
13828 (disassemble_dwarf_expression): Likewise.
13829 * dwarf2read.c (process_die, inherit_abstract_dies)
13830 (read_call_site_scope): Likewise.
13831 * gdbtypes.h (struct func_type, struct call_site_parameter)
13832 (struct call_site): Likewise.
13833 * stack.c (read_frame_arg): Likewise.
13834 * std-operator.def (OP_VAR_ENTRY_VALUE): Likewise.
13835
13836 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
13837
13838 * defs.h (read_unsigned_leb128): New declaration.
13839 * dwarf2loc.c (decode_debug_loclists_addresses): New function.
13840 (decode_debug_loc_dwo_addresses): Update DEBUG_LOC_* to DW_LLE_*.
13841 (dwarf2_find_location_expression): Call also
13842 decode_debug_loclists_addresses. Handle DWARF-5 ULEB128 length.
13843 * dwarf2loc.h (dwarf2_version): New declaration.
13844 * dwarf2read.c (struct dwarf2_per_objfile): Add loclists, line_str,
13845 rnglists.
13846 (dwarf2_elf_names): Add .debug_loclists, .debug_line_str,
13847 .debug_rnglists.
13848 (struct dwop_section_names): Add loclists_dwo.
13849 (dwop_section_names): Add .debug_loclists.dwo.
13850 (struct comp_unit_head): Add unit_type, signature, type_offset_in_tu.
13851 (struct dwarf2_per_cu_data): Add dwarf_version.
13852 (struct dwo_sections): Add loclists.
13853 (struct attr_abbrev): Add implicit_const.
13854 (read_indirect_line_string): New declaration.
13855 (read_unsigned_leb128): Delete declaration.
13856 (rcuh_kind): New definition.
13857 (read_and_check_comp_unit_head): Change parameter
13858 is_debug_types_section to section_kind.
13859 (dwarf2_locate_sections): Handle loclists, line_str and rnglists.
13860 (read_comp_unit_head): Change parameter abfd to section, add parameter
13861 section_kind. Handle DWARF-5.
13862 (error_check_comp_unit_head): Accept also DWARF version 5.
13863 (read_and_check_comp_unit_head): Change parameter
13864 is_debug_types_section to section_kind.
13865 (read_and_check_type_unit_head): Delete function.
13866 (read_abbrev_offset): Handle DWARF-5.
13867 (create_debug_type_hash_table): Add parameter section_kind. Process
13868 only DW_UT_type. Use signature and type_offset_in_tu from struct
13869 comp_unit_head.
13870 (create_debug_types_hash_table): Update create_debug_type_hash_table
13871 caller.
13872 (create_all_type_units): Call create_debug_type_hash_table.
13873 (read_cutu_die_from_dwo, init_cutu_and_read_dies): Change
13874 read_and_check_type_unit_head caller to read_and_check_comp_unit_head
13875 caller.
13876 (skip_one_die): Handle DW_FORM_implicit_const.
13877 (dwarf2_rnglists_process): New function.
13878 (dwarf2_ranges_process): Call dwarf2_rnglists_process for DWARF-5.
13879 (abbrev_table_read_table): Handle DW_FORM_implicit_const.
13880 (read_attribute_value): Handle DW_FORM_implicit_const,
13881 DW_FORM_line_strp.
13882 (read_attribute): Handle DW_FORM_implicit_const.
13883 (read_indirect_string_at_offset_from): New function from
13884 read_indirect_string_at_offset.
13885 (read_indirect_string_at_offset): Call
13886 read_indirect_string_at_offset_from.
13887 (read_indirect_line_string_at_offset): New function.
13888 (read_indirect_string): New function comment.
13889 (read_indirect_line_string): New function.
13890 (read_unsigned_leb128): Make it global.
13891 (dwarf2_string_attr): Handle DWARF-5.
13892 (add_include_dir_stub, read_formatted_entries): New functions.
13893 (dwarf_decode_line_header, dump_die_shallow, cu_debug_loc_section):
13894 Handle DWARF-5.
13895 (per_cu_header_read_in): Update read_comp_unit_head caller.
13896 (dwarf2_version): New function.
13897 * symfile.h (struct dwarf2_debug_sections): Add loclists, line_str and
13898 rnglists.
13899 * xcoffread.c (dwarf2_xcoff_names): Update struct dwarf2_debug_sections
13900 fields.
13901
13902 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
13903
13904 * dwarf2read.c (abbrev_table_read_table): Read the data only once.
13905
13906 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
13907
13908 * dwarf2read.c (dwarf2_ranges_process): New function from
13909 dwarf2_ranges_read.
13910 (dwarf2_ranges_read, dwarf2_record_block_ranges): Use
13911 dwarf2_ranges_process.
13912
13913 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
13914
13915 * dwarf2read.c (create_debug_type_hash_table): New function from
13916 create_debug_types_hash_table.
13917 (create_debug_types_hash_table): Call create_debug_type_hash_table.
13918 (create_all_type_units, open_and_init_dwo_file): Update
13919 create_debug_types_hash_table callers.
13920
13921 2017-02-20 Sergio Durigan Junior <sergiodj@redhat.com>
13922
13923 PR gdb/16188
13924 * fork-child.c (trace_start_error): Fix thinko. va_end should
13925 refer to 'ap', not 'args'.
13926
13927 2017-02-20 Sergio Durigan Junior <sergiodj@redhat.com>
13928 Pedro Alves <palves@redhat.com>
13929
13930 PR gdb/16188
13931 * darwin-nat.c (darwin_ptrace_me): Check if calls to system
13932 calls succeeded.
13933 * fork-child.c (trace_start_error): New function.
13934 (trace_start_error_with_name): Likewise.
13935 * gnu-nat.c (gnu_ptrace_me): Check if call to PTRACE succeeded.
13936 * inf-ptrace.c (inf_ptrace_me): Likewise.
13937 * inferior.h (trace_start_error): New prototype.
13938 (trace_start_error_with_name): Likewise.
13939
13940 2017-02-15 Sergio Durigan Junior <sergiodj@redhat.com>
13941
13942 PR gdb/21164
13943 * psymtab.c (maintenance_print_psymbols): Verify if 'argv' is not
13944 NULL before using it.
13945 * symmisc.c (maintenance_print_symbols): Likewise.
13946 (maintenance_print_msymbols): Likewise.
13947
13948 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
13949
13950 * NEWS: Add record Python bindings entry.
13951
13952 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
13953
13954 * Makefile.in (SUBDIR_PYTHON_OBS): Add py-record-btrace.o,
13955 py-record-full.o.
13956 (SUBDIR_PYTHON_SRCS): Add py-record-btrace.c, py-record-full.c.
13957 * python/py-record-btrace.c, python/py-record-btrace.h,
13958 python/py-record-full.c, python/py-record-full.h: New file.
13959 * python/py-record.c: Add include for py-record-btrace.h and
13960 py-record-full.h.
13961 (recpy_method, recpy_format, recpy_goto, recpy_replay_position,
13962 recpy_instruction_history, recpy_function_call_history, recpy_begin,
13963 recpy_end): Use functions from py-record-btrace.c and py-record-full.c.
13964 * python/python-internal.h (PyInt_FromSsize_t, PyInt_AsSsize_t):
13965 New definition.
13966 (gdbpy_initialize_btrace): New export.
13967 * python/python.c (_initialize_python): Add gdbpy_initialize_btrace.
13968
13969 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
13970
13971 * Makefile.in (SUBDIR_PYTHON_OBS): Add python/py-record.o.
13972 (SUBDIR_PYTHON_SRCS): Add python/py-record.c.
13973 * python/py-record.c: New file.
13974 * python/python-internal.h (gdbpy_start_recording,
13975 gdbpy_current_recording, gdpy_stop_recording,
13976 gdbpy_initialize_record): New export.
13977 * python/python.c (_initialize_python): Add gdbpy_initialize_record.
13978 (python_GdbMethods): Add gdbpy_start_recording,
13979 gdbpy_current_recording and gdbpy_stop_recording.
13980
13981 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
13982
13983 * record-btrace.c (record_btrace_record_method): New function.
13984 (init_record_btrace_ops): Initialize to_record_method.
13985 * record-full.c (record_full_record_method): New function.
13986 (init_record_full_ops, init_record_full_core_ops): Add
13987 record_full_record_method.
13988 * record.h (enum record_method): New enum.
13989 * target-debug.h (target_debug_print_enum_record_method: New define.
13990 * target-delegates.c: Regenerate.
13991 * target.c (target_record_method): New function.
13992 * target.h: Include record.h.
13993 (struct target_ops) <to_record_method>: New field.
13994 (target_record_method): New export.
13995
13996 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
13997
13998 * record.h (record_start, record_stop): New export.
13999 * record.c (record_start, record_stop): New function.
14000
14001 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
14002
14003 * btrace.c (btrace_fetch): Copy function call segments pointer
14004 into a vector.
14005 (btrace_clear): Clear the vector.
14006 (btrace_find_insn_by_number): Use binary search to find the correct
14007 function call segment.
14008 * btrace.h (brace_fun_p): New typedef.
14009 (struct btrace_thread_info) <functions>: New field.
14010
14011 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
14012
14013 * record-btrace.c (btrace_ui_out_decode_error): Move most of it ...
14014 * btrace.c (btrace_decode_error): ... here. New function.
14015 * btrace.h (btrace_decode_error): New export.
14016
14017 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
14018
14019 * btrace.c (ftrace_call_num_insn, btrace_insn_get_error): New function.
14020 (ftrace_new_function, btrace_insn_number, btrace_insn_cmp,
14021 btrace_find_insn_by_number): Remove special case for gaps.
14022 * btrace.h (btrace_insn_get_error): New export.
14023 (btrace_insn_number, btrace_find_insn_by_number): Adjust comment.
14024 * record-btrace.c (btrace_insn_history): Print number for gaps.
14025 (record_btrace_info, record_btrace_goto): Handle gaps.
14026
14027 2017-02-14 Tom Tromey <tom@tromey.com>
14028
14029 PR python/13598:
14030 * python/python.c (gdbpy_before_prompt_hook): Emit before_prompt
14031 event.
14032 * python/py-evts.c (gdbpy_initialize_py_events): Add
14033 before_prompt registry.
14034 * python/py-events.h (events_object) <before_prompt>: New field.
14035
14036 2017-02-14 Markus Metzger <markus.t.metzger@intel.com>
14037
14038 * btrace.c (ftrace_new_switch): Preserve up link and flags.
14039
14040 2017-02-13 Luis Machado <lgustavo@codesourcery.com>
14041
14042 * symfile (_initialize_symfile): Add usage text to the load command's
14043 help text.
14044
14045 2017-02-10 Simon Marchi <simon.marchi@ericsson.com>
14046
14047 * utils.c (defaulted_query): Don't query on secondary UIs.
14048
14049 2017-02-10 Tom Tromey <tom@tromey.com>
14050
14051 * rust-lang.c (rust_get_disr_info): Remove unused variable.
14052
14053 2017-02-10 Tom Tromey <tom@tromey.com>
14054
14055 * python/py-value.c (valpy_richcompare_throw): Remove unnecessary
14056 "cleanup" local.
14057 * python/py-type.c (typy_legacy_template_argument): Remove
14058 unnecessary "cleanup" local.
14059
14060 2017-02-10 Tom Tromey <tom@tromey.com>
14061
14062 * python/python.c (do_start_initialization): New function, from
14063 _initialize_python.
14064 (_initialize_python): Call do_start_initialization.
14065 * python/py-linetable.c (ltpy_iternext): Use explicit returns, not
14066 goto.
14067
14068 2017-02-10 Tom Tromey <tom@tromey.com>
14069
14070 * python/py-prettyprint.c (pretty_print_one_value): Use
14071 gdbpy_ref.
14072
14073 2017-02-10 Tom Tromey <tom@tromey.com>
14074
14075 * python/py-cmd.c (cmdpy_destroyer): Use gdbpy_ref.
14076 * python/py-breakpoint.c (gdbpy_breakpoint_deleted): Use
14077 gdbpy_ref.
14078 * python/py-type.c (field_new): Use gdbpy_ref.
14079 * python/py-symtab.c (symtab_and_line_to_sal_object): Use
14080 gdbpy_ref.
14081 * python/py-progspace.c (pspy_new): Use gdbpy_ref.
14082 (py_free_pspace): Likewise.
14083 (pspace_to_pspace_object): Likewise.
14084 * python/py-objfile.c (objfpy_new): Use gdbpy_ref.
14085 (py_free_objfile): Likewise.
14086 (objfile_to_objfile_object): Likewise.
14087 * python/py-inferior.c (delete_thread_object): Use
14088 gdbpy_ref.
14089 (infpy_read_memory): Likewise.
14090 (py_free_inferior): Likewise.
14091 * python/py-evtregistry.c (create_eventregistry_object): Use
14092 gdbpy_ref.
14093 * python/py-event.c (create_event_object): Use gdbpy_ref.
14094
14095 2017-02-10 Tom Tromey <tom@tromey.com>
14096
14097 * python/py-ref.h (gdbpy_ref_policy): Now a template.
14098 (gdbpy_ref): Now a template; allow subclasses of PyObject to be
14099 used.
14100 * python/py-arch.c, python/py-bpevent.c, python/py-breakpoint.c,
14101 python/py-cmd.c, python/py-continueevent.c, python/py-event.c,
14102 python/py-exitedevent.c, python/py-finishbreakpoint.c,
14103 python/py-framefilter.c, python/py-function.c,
14104 python/py-inferior.c, python/py-infevents.c,
14105 python/py-linetable.c, python/py-newobjfileevent.c,
14106 python/py-param.c, python/py-prettyprint.c, python/py-ref.h,
14107 python/py-signalevent.c, python/py-stopevent.c,
14108 python/py-symbol.c, python/py-threadevent.c, python/py-type.c,
14109 python/py-unwind.c, python/py-utils.c, python/py-value.c,
14110 python/py-varobj.c, python/py-xmethods.c, python/python.c,
14111 varobj.c: Change gdbpy_ref to gdbpy_ref<>.
14112
14113 2017-02-10 Tom Tromey <tom@tromey.com>
14114
14115 * ui-out.h (ui_out_emit_type): New class.
14116 (ui_out_emit_tuple, ui_out_emit_list): New typedefs.
14117 * python/py-framefilter.c (py_print_single_arg): Use gdb::optional
14118 and ui_out_emit_tuple.
14119 (enumerate_locals): Likewise.
14120 (py_mi_print_variables, py_print_locals, py_print_args): Use
14121 ui_out_emit_list.
14122 (py_print_frame): Use gdb::optional, ui_out_emit_tuple,
14123 ui_out_emit_list.
14124 * common/gdb_optional.h: New file.
14125
14126 2017-02-10 Martin Galvan <martingalvan@sourceware.org>
14127
14128 * MAINTAINERS (Write After Approval): Update my e-mail address.
14129
14130 2017-02-10 Martin Galvan <martingalvan@sourceware.org>
14131
14132 PR gdb/21122
14133 * breakpoint.c (_initialize_breakpoint): Update the help description
14134 of the 'commands' command to indicate that it takes a list argument.
14135
14136 2017-02-09 Simon Marchi <simon.marchi@ericsson.com>
14137
14138 * interps.c (current_interp_set_logging): Remove "return".
14139
14140 2017-02-09 Gary Benson <gbenson@redhat.com>
14141
14142 * symtab.c (add_symtab_completions): Prevent NULL pointer
14143 dereference.
14144
14145 2017-02-08 Pedro Alves <palves@redhat.com>
14146
14147 * interps.c (interp::interp): Remove reference to quiet_p.
14148 (interp_set): Make static. Remove dead "Switching to" output
14149 code.
14150 (interp_quiet_p, interp_set_quiet): Delete.
14151 (interpreter_exec_cmd): Don't set the interpreter quiet.
14152 * interps.h (interp_quiet_p): Make static.
14153 (class interp) <quiet_p>: Remove field
14154
14155 2017-02-08 Jerome Guitton <guitton@adacore.com>
14156
14157 * cli/cli-decode.c (find_command_name_length): Make it extern.
14158 * cli/cli-decode.h (find_command_name_length): Declare.
14159 * cli/cli-script.c (command_name_equals, line_first_arg):
14160 New functions.
14161 (process_next_line): Use cli-decode to parse command names.
14162 (build_command_line): Make args a constant pointer.
14163
14164 2017-02-08 Jerome Guitton <guitton@adacore.com>
14165
14166 * cli-decode.c (lookup_cmd_1, lookup_cmd_composition):
14167 Remove case-insensitive search.
14168
14169 2017-02-07 Jose E. Marchesi <jose.marchesi@oracle.com>
14170
14171 * sparc-tdep.c (sparc32_gdbarch_init): Do not place a + operator
14172 at the end of the line. Avoids an ARI warning.
14173
14174 2017-02-06 Luis Machado <lgustavo@codesourcery.com>
14175
14176 * NEWS: Mention support for record/replay of Intel 64 rdrand and
14177 rdseed instructions.
14178 i386-tdep.c (i386_process_record): Handle Intel 64 rdrand and rseed.
14179
14180 2017-02-06 Ivo Raisr <ivo.raisr@oracle.com>
14181
14182 PR tdep/20936
14183 Provide and use sparc32 and sparc64 target description XML files.
14184 * features/sparc/sparc32-cp0.xml, features/sparc/sparc32-cpu.xml,
14185 features/sparc/sparc32-fpu.xml: New files for sparc 32-bit.
14186 * features/sparc/sparc64-cp0.xml, features/sparc/sparc64-cpu.xml,
14187 features/sparc/sparc64-fpu.xml: New files for sparc 64-bit.
14188 * features/sparc/sparc32-solaris.xml: New file.
14189 * features/sparc/sparc64-solaris.xml: New file.
14190 * features/sparc/sparc32-solaris.c: Generated.
14191 * features/sparc/sparc64-solaris.c: Generated.
14192 * sparc-tdep.h: Account for differences in target descriptions.
14193 * sparc-tdep.c (sparc32_register_name): Use target provided registers.
14194 (sparc32_register_type): Use target provided registers.
14195 (validate_tdesc_registers): New function.
14196 (sparc32_gdbarch_init): Use tdesc_has_registers.
14197 Set pseudoregister functions.
14198 * sparc64-tdep.c (sparc64_register_name): Use target provided registers.
14199 (sparc64_register_type): Use target provided registers.
14200 (sparc64_init_abi): Set pseudoregister functions.
14201
14202 2017-02-03 Tom Tromey <tom@tromey.com>
14203
14204 PR rust/21097:
14205 * rust-lang.c (rust_print_type) <TYPE_CODE_UNION>: Handle enums
14206 with a single member.
14207
14208 2017-02-03 Pedro Alves <palves@redhat.com>
14209
14210 * cli/cli-interp.c (cli_interp_base::cli_interp_base)
14211 (cli_interp_base::~cli_interp_base): New.
14212 (cli_interp): New struct.
14213 (as_cli_interp): Cast the interp itself to cli_interp.
14214 (cli_interpreter_pre_command_loop): Rename to ...
14215 (cli_interp_base::pre_command_loop): ... this. Remove 'self'
14216 parameter.
14217 (cli_interpreter_init): Rename to ...
14218 (cli_interp::init): ... this. Remove 'self' parameter. Use
14219 boolean. Make extern.
14220 (cli_interpreter_resume): Rename to ...
14221 (cli_interp::resume): ... this. Remove 'data' parameter. Make
14222 extern.
14223 (cli_interpreter_suspend): Rename to ...
14224 (cli_interp::suspend): ... this. Remove 'data' parameter. Make
14225 extern.
14226 (cli_interpreter_exec): Rename to ...
14227 (cli_interp::exec): ... this. Remove 'data' parameter. Make
14228 extern.
14229 (cli_interpreter_supports_command_editing): Rename to ...
14230 (cli_interp_base::supports_command_editing): ... this. Remove
14231 'interp' parameter. Make extern.
14232 (cli_ui_out): Rename to ...
14233 (cli_interp::interp_ui_out): ... this. Remove 'interp' parameter.
14234 Make extern.
14235 (cli_set_logging): Rename to ...
14236 (cli_interp_base::set_logging): ... this. Remove 'interp'
14237 parameter. Make extern.
14238 (cli_interp_procs): Delete.
14239 (cli_interp_factory): Adjust to use "new".
14240 * cli/cli-interp.h: Include "interps.h".
14241 (struct cli_interp_base): New struct.
14242 * interps.c (struct interp): Delete. Fields moved to interps.h.
14243 (interp_new): Delete.
14244 (interp::interp, interp::~interp): New.
14245 (interp_set): Use bool, and return void. Assume the interpreter
14246 has suspend, init and resume methods, and that the all return
14247 void.
14248 (set_top_level_interpreter): interp_set returns void.
14249 (interp_ui_out): Adapt.
14250 (current_interp_set_logging): Adapt.
14251 (interp_data): Delete.
14252 (interp_pre_command_loop, interp_supports_command_editing): Adapt.
14253 (interp_exec): Adapt.
14254 (top_level_interpreter_data): Delete.
14255 * interps.h (interp_init_ftype, interp_resume_ftype)
14256 (interp_suspend_ftype, interp_exec_ftype)
14257 (interp_pre_command_loop_ftype, interp_ui_out_ftype): Delete.
14258 (class interp): New.
14259 (interp_new): Delete.
14260 (interp_set): Now returns void. Use bool.
14261 (interp_data, top_level_interpreter_data): Delete.
14262 * mi/mi-common.h: Include interps.h.
14263 (class mi_interp): Inherit from interp. Define a ctor. Declare
14264 init, resume, suspect, exec, interp_ui_out, set_logging and
14265 pre_command_loop methods.
14266 * mi/mi-interp.c (as_mi_interp): Cast the interp itself.
14267 (mi_interpreter_init): Rename to ...
14268 (mi_interp::init): ... this. Remove the 'interp' parameter, use
14269 bool, return void and make extern. Adjust.
14270 (mi_interpreter_resume): ... Rename to ...
14271 (mi_interp::resume): ... this. Remove the 'data' parameter,
14272 return void and make extern. Adjust.
14273 (mi_interpreter_suspend): ... Rename to ...
14274 (mi_interp::suspend): ... this. Remove the 'data' parameter,
14275 return void and make extern. Adjust.
14276 (mi_interpreter_exec): ... Rename to ...
14277 (mi_interp::exec): ... this. Remove the 'data' parameter and make
14278 extern. Adjust.
14279 (mi_interpreter_pre_command_loop): ... Rename to ...
14280 (mi_interp::pre_command_loop): ... this. Remove the 'self'
14281 parameter and make extern.
14282 (mi_on_normal_stop_1): Adjust.
14283 (mi_ui_out): Rename to ...
14284 (mi_interp::interp_ui_out): ... this. Remove the 'interp'
14285 parameter and make extern. Adjust.
14286 (mi_set_logging): Rename to ...
14287 (mi_interp::set_logging): ... this. Remove the 'interp'
14288 parameter and make extern. Adjust.
14289 (mi_interp_procs): Delete.
14290 (mi_interp_factory): Adjust to use 'new'.
14291 * mi/mi-main.c (mi_cmd_gdb_exit, captured_mi_execute_command)
14292 (mi_print_exception, mi_execute_command, mi_load_progress):
14293 Adjust.
14294 * tui/tui-interp.c (tui_interp): New class.
14295 (as_tui_interp): Return a tui_interp pointer.
14296 (tui_on_normal_stop, tui_on_signal_received)
14297 (tui_on_end_stepping_range, tui_on_signal_exited, tui_on_exited)
14298 (tui_on_no_history, tui_on_user_selected_context_changed): Adjust
14299 to use interp::interp_ui_out.
14300 (tui_init): Rename to ...
14301 (tui_interp::init): ... this. Remove the 'self' parameter, use
14302 bool, return void and make extern. Adjust.
14303 (tui_resume): Rename to ...
14304 (tui_interp::resume): ... this. Remove the 'data' parameter,
14305 return void and make extern. Adjust.
14306 (tui_suspend): Rename to ...
14307 (tui_interp::suspend): ... this. Remove the 'data' parameter,
14308 return void and make extern. Adjust.
14309 (tui_ui_out): Rename to ...
14310 (tui_interp::interp_ui_out): ... this. Remove the 'self'
14311 parameter, and make extern. Adjust.
14312 (tui_exec): Rename to ...
14313 (tui_interp::exec): ... this. Remove the 'data' parameter and
14314 make extern.
14315 (tui_interp_procs): Delete.
14316 (tui_interp_factory): Use "new".
14317
14318 2017-02-02 Tom Tromey <tom@tromey.com>
14319
14320 * rust-exp.y (ends_raw_string, space_then_number)
14321 (rust_identifier_start_p): Return bool.
14322 * rust-lang.c (rust_tuple_type_p, rust_underscore_fields)
14323 (rust_tuple_struct_type_p, rust_tuple_variant_type_p)
14324 (rust_slice_type_p, rust_range_type_p, rust_u8_type_p)
14325 (rust_chartype_p): Return bool.
14326 (val_print_struct, rust_print_struct_def, rust_print_type):
14327 Update.
14328 * rust-lang.h (rust_tuple_type_p, rust_tuple_struct_type_p):
14329 Return bool.
14330
14331 2017-02-02 Tom Tromey <tom@tromey.com>
14332
14333 * rust-lang.c: Reindent.
14334
14335 2017-02-02 Tom Tromey <tom@tromey.com>
14336
14337 * rust-lang.h (rust_crate_for_block): Update.
14338 * rust-lang.c (rust_crate_for_block): Return std::string.
14339 (rust_get_disr_info): Use std:;string, not
14340 gdb::unique_xmalloc_ptr.
14341 * rust-exp.y (crate_name): Update.
14342
14343 2017-02-02 Pedro Alves <palves@redhat.com>
14344
14345 * disasm-selftests.c (print_one_insn_test): Move the "verbose"
14346 field out of gdb_disassembler_test and make it static.
14347
14348 2017-02-02 Pedro Alves <palves@redhat.com>
14349
14350 * mi/mi-common.h (struct mi_interp): Delete the mi2_interp,
14351 mi1_interp and mi_interp fields.
14352
14353 2017-02-02 Pedro Alves <palves@redhat.com>
14354
14355 * cli/cli-interp.c (struct saved_output_files, saved_output):
14356 Moved from cli/cli-logging.c.
14357 (cli_set_logging): New function.
14358 (cli_interp_procs): Install cli_set_logging.
14359 * cli/cli-interp.h (make_logging_output, cli_set_logging):
14360 Declare.
14361 * cli/cli-logging.c (struct saved_output_files, saved_output):
14362 Moved to cli/cli-interp.c.
14363 (pop_output_files): Don't save outputs here.
14364 (make_logging_output): New function.
14365 (handle_redirections): Don't build tee nor save previous outputs
14366 here.
14367 * interps.c (current_interp_set_logging): Change prototype.
14368 Assume there's always a set_logging_proc method installed.
14369 * interps.h (interp_set_logging_ftype): Change prototype.
14370 (current_interp_set_logging): Change prototype and adjust comment.
14371 * mi/mi-interp.c (mi_set_logging): Change protototype. Adjust to
14372 use make_logging_output.
14373 * tui/tui-interp.c (tui_interp_procs): Install cli_set_logging.
14374 2017-02-02 Pedro Alves <palves@redhat.com>
14375
14376 * cli/cli-logging.c (maybe_warn_already_logging): New factored out
14377 from ...
14378 (set_logging_overwrite): ... here.
14379 (logging_no_redirect_file): Delete.
14380 (set_logging_redirect): Don't handle redirection on the fly.
14381 Instead warn that "logging off" / "logging on" is necessary.
14382 (pop_output_files): Delete references to logging_no_redirect_file.
14383 (show_logging_command): Always speak in terms of what will happen
14384 once logging is reenabled.
14385
14386 2017-02-02 Pedro Alves <palves@redhat.com>
14387
14388 * disasm.h (gdb_pretty_print_disassembler): Tweak intro comment.
14389
14390 2017-02-02 Pedro Alves <palves@redhat.com>
14391
14392 * disasm.c (gdb_pretty_print_insn): Rename to ...
14393 (gdb_pretty_print_disassembler::pretty_print_insn): ... this.
14394 Remove gdbarch parameter. Adapt to clear the object's buffers
14395 instead of allocating new buffers, and to print using the object's
14396 gdb_disassembler instead of calling gdb_print_insn.
14397 (dump_insns): Use gdb_pretty_print_disassembler.
14398 * disasm.h (gdb_pretty_print_insn): Delete declaration.
14399 (gdb_pretty_print_disassembler): New class.
14400 * record-btrace.c (btrace_insn_history): Use
14401 gdb_pretty_print_disassembler.
14402
14403 2017-02-02 Pedro Alves <palves@redhat.com>
14404
14405 * ada-lang.c (type_as_string): Use string_file.
14406 * ada-valprint.c (ada_print_floating): Use string_file.
14407 * ada-varobj.c (ada_varobj_scalar_image)
14408 (ada_varobj_get_value_image): Use string_file.
14409 * aix-thread.c (aix_thread_extra_thread_info): Use string_file.
14410 * arm-tdep.c (_initialize_arm_tdep): Use string_printf.
14411 * breakpoint.c (update_inserted_breakpoint_locations)
14412 (insert_breakpoint_locations, reattach_breakpoints)
14413 (print_breakpoint_location, print_one_detail_ranged_breakpoint)
14414 (print_it_watchpoint): Use string_file.
14415 (save_breakpoints): Use stdio_file.
14416 * c-exp.y (oper): Use string_file.
14417 * cli/cli-logging.c (set_logging_redirect): Use ui_file_up and
14418 tee_file.
14419 (pop_output_files): Use delete.
14420 (handle_redirections): Use stdio_file and tee_file.
14421 * cli/cli-setshow.c (do_show_command): Use string_file.
14422 * compile/compile-c-support.c (c_compute_program): Use
14423 string_file.
14424 * compile/compile-c-symbols.c (generate_vla_size): Take a
14425 'string_file &' instead of a 'ui_file *'.
14426 (generate_c_for_for_one_variable): Take a 'string_file &' instead
14427 of a 'ui_file *'. Use string_file.
14428 (generate_c_for_variable_locations): Take a 'string_file &'
14429 instead of a 'ui_file *'.
14430 * compile/compile-internal.h (generate_c_for_for_one_variable):
14431 Take a 'string_file &' instead of a 'ui_file *'.
14432 * compile/compile-loc2c.c (push, pushf, unary, binary)
14433 (print_label, pushf_register_address, pushf_register)
14434 (do_compile_dwarf_expr_to_c): Take a 'string_file &' instead of a
14435 'ui_file *'. Adjust.
14436 * compile/compile.c (compile_to_object): Use string_file.
14437 * compile/compile.h (compile_dwarf_expr_to_c)
14438 (compile_dwarf_bounds_to_c): Take a 'string_file &' instead of a
14439 'ui_file *'.
14440 * cp-support.c (inspect_type): Use string_file and obstack_copy0.
14441 (replace_typedefs_qualified_name): Use string_file and
14442 obstack_copy0.
14443 * disasm.c (gdb_pretty_print_insn): Use string_file.
14444 (gdb_disassembly): Adjust reference the null_stream global.
14445 (do_ui_file_delete): Delete.
14446 (gdb_insn_length): Use null_stream.
14447 * dummy-frame.c (maintenance_print_dummy_frames): Use stdio_file.
14448 * dwarf2loc.c (dwarf2_compile_property_to_c)
14449 (locexpr_generate_c_location, loclist_generate_c_location): Take a
14450 'string_file &' instead of a 'ui_file *'.
14451 * dwarf2loc.h (dwarf2_compile_property_to_c): Likewise.
14452 * dwarf2read.c (do_ui_file_peek_last): Delete.
14453 (dwarf2_compute_name): Use string_file.
14454 * event-top.c (gdb_setup_readline): Use stdio_file.
14455 * gdbarch.sh (verify_gdbarch): Use string_file.
14456 * gdbtypes.c (safe_parse_type): Use null_stream.
14457 * guile/scm-breakpoint.c (gdbscm_breakpoint_commands): Use
14458 string_file.
14459 * guile/scm-disasm.c (gdbscm_print_insn_from_port): Take a
14460 'string_file *' instead of a 'ui_file *'.
14461 (gdbscm_arch_disassemble): Use string_file.
14462 * guile/scm-frame.c (frscm_print_frame_smob): Use string_file.
14463 * guile/scm-ports.c (class ioscm_file_port): Now a class that
14464 inherits from ui_file.
14465 (ioscm_file_port_delete, ioscm_file_port_rewind)
14466 (ioscm_file_port_put): Delete.
14467 (ioscm_file_port_write): Rename to ...
14468 (ioscm_file_port::write): ... this. Remove file_port_magic
14469 checks.
14470 (ioscm_file_port_new): Delete.
14471 (ioscm_with_output_to_port_worker): Use ioscm_file_port and
14472 ui_file_up.
14473 * guile/scm-type.c (tyscm_type_name): Use string_file.
14474 * guile/scm-value.c (vlscm_print_value_smob, gdbscm_value_print):
14475 Use string_file.
14476 * infcmd.c (print_return_value_1): Use string_file.
14477 * infrun.c (print_target_wait_results): Use string_file.
14478 * language.c (add_language): Use string_file.
14479 * location.c (explicit_to_string_internal): Use string_file.
14480 * main.c (captured_main_1): Use null_file.
14481 * maint.c (maintenance_print_architecture): Use stdio_file.
14482 * mi/mi-cmd-stack.c (list_arg_or_local): Use string_file.
14483 * mi/mi-common.h (struct mi_interp) <out, err, log, targ,
14484 event_channel>: Change type to mi_console_file pointer.
14485 * mi/mi-console.c (mi_console_file_fputs, mi_console_file_flush)
14486 (mi_console_file_delete): Delete.
14487 (struct mi_console_file): Delete.
14488 (mi_console_file_magic): Delete.
14489 (mi_console_file_new): Delete.
14490 (mi_console_file::mi_console_file): New.
14491 (mi_console_file_delete): Delete.
14492 (mi_console_file_fputs): Delete.
14493 (mi_console_file::write): New.
14494 (mi_console_raw_packet): Delete.
14495 (mi_console_file::flush): New.
14496 (mi_console_file_flush): Delete.
14497 (mi_console_set_raw): Rename to ...
14498 (mi_console_file::set_raw): ... this.
14499 * mi/mi-console.h (class mi_console_file): New class.
14500 (mi_console_file_new, mi_console_set_raw): Delete.
14501 * mi/mi-interp.c (mi_interpreter_init): Use mi_console_file.
14502 (mi_set_logging): Use delete and tee_file. Adjust.
14503 * mi/mi-main.c (output_register): Use string_file.
14504 (mi_cmd_data_evaluate_expression): Use string_file.
14505 (mi_cmd_data_read_memory): Use string_file.
14506 (mi_cmd_execute, print_variable_or_computed): Use string_file.
14507 * mi/mi-out.c (mi_ui_out::main_stream): New.
14508 (mi_ui_out::rewind): Use main_stream and
14509 string_file.
14510 (mi_ui_out::put): Use main_stream and string_file.
14511 (mi_ui_out::mi_ui_out): Remove 'stream' parameter.
14512 Allocate a 'string_file' instead.
14513 (mi_out_new): Don't allocate a mem_fileopen stream here.
14514 * mi/mi-out.h (mi_ui_out::mi_ui_out): Remove 'stream' parameter.
14515 (mi_ui_out::main_stream): Declare method.
14516 * printcmd.c (eval_command): Use string_file.
14517 * psymtab.c (maintenance_print_psymbols): Use stdio_file.
14518 * python/py-arch.c (archpy_disassemble): Use string_file.
14519 * python/py-breakpoint.c (bppy_get_commands): Use string_file.
14520 * python/py-frame.c (frapy_str): Use string_file.
14521 * python/py-framefilter.c (py_print_type, py_print_single_arg):
14522 Use string_file.
14523 * python/py-type.c (typy_str): Use string_file.
14524 * python/py-unwind.c (unwind_infopy_str): Use string_file.
14525 * python/py-value.c (valpy_str): Use string_file.
14526 * record-btrace.c (btrace_insn_history): Use string_file.
14527 * regcache.c (regcache_print): Use stdio_file.
14528 * reggroups.c (maintenance_print_reggroups): Use stdio_file.
14529 * remote.c (escape_buffer): Use string_file.
14530 * rust-lang.c (rust_get_disr_info): Use string_file.
14531 * serial.c (serial_open_ops_1): Use stdio_file.
14532 (do_serial_close): Use delete.
14533 * stack.c (print_frame_arg): Use string_file.
14534 (print_frame_args): Remove local mem_fileopen stream, not used.
14535 (print_frame): Use string_file.
14536 * symmisc.c (maintenance_print_symbols): Use stdio_file.
14537 * symtab.h (struct symbol_computed_ops) <generate_c_location>:
14538 Take a 'string_file *' instead of a 'ui_file *'.
14539 * top.c (new_ui): Use stdio_file and stderr_file.
14540 (free_ui): Use delete.
14541 (execute_command_to_string): Use string_file.
14542 (quit_confirm): Use string_file.
14543 * tracepoint.c (collection_list::append_exp): Use string_file.
14544 * tui/tui-disasm.c (tui_disassemble): Use string_file.
14545 * tui/tui-file.c: Don't include "ui-file.h".
14546 (enum streamtype, struct tui_stream): Delete.
14547 (tui_file_new, tui_file_delete, tui_fileopen, tui_sfileopen)
14548 (tui_file_isatty, tui_file_rewind, tui_file_put): Delete.
14549 (tui_file::tui_file): New method.
14550 (tui_file_fputs): Delete.
14551 (tui_file_get_strbuf): Delete.
14552 (tui_file::puts): New method.
14553 (tui_file_adjust_strbuf): Delete.
14554 (tui_file_flush): Delete.
14555 (tui_file::flush): New method.
14556 * tui/tui-file.h: Tweak intro comment.
14557 Include ui-file.h.
14558 (tui_fileopen, tui_sfileopen, tui_file_get_strbuf)
14559 (tui_file_adjust_strbuf): Delete declarations.
14560 (class tui_file): New class.
14561 * tui/tui-io.c (tui_initialize_io): Use tui_file.
14562 * tui/tui-regs.c (tui_restore_gdbout): Use delete.
14563 (tui_register_format): Use string_stream.
14564 * tui/tui-stack.c (tui_make_status_line): Use string_file.
14565 (tui_get_function_from_frame): Use string_file.
14566 * typeprint.c (type_to_string): Use string_file.
14567 * ui-file.c (struct ui_file, ui_file_magic, ui_file_new): Delete.
14568 (null_stream): New global.
14569 (ui_file_delete): Delete.
14570 (ui_file::ui_file): New.
14571 (null_file_isatty): Delete.
14572 (ui_file::~ui_file): New.
14573 (null_file_rewind): Delete.
14574 (ui_file::printf): New.
14575 (null_file_put): Delete.
14576 (null_file_flush): Delete.
14577 (ui_file::putstr): New.
14578 (null_file_write): Delete.
14579 (ui_file::putstrn): New.
14580 (null_file_read): Delete.
14581 (ui_file::putc): New.
14582 (null_file_fputs): Delete.
14583 (null_file_write_async_safe): Delete.
14584 (ui_file::vprintf): New.
14585 (null_file_delete): Delete.
14586 (null_file::write): New.
14587 (null_file_fseek): Delete.
14588 (null_file::puts): New.
14589 (ui_file_data): Delete.
14590 (null_file::write_async_safe): New.
14591 (gdb_flush, ui_file_isatty): Adjust.
14592 (ui_file_put, ui_file_rewind): Delete.
14593 (ui_file_write): Adjust.
14594 (ui_file_write_for_put): Delete.
14595 (ui_file_write_async_safe, ui_file_read): Adjust.
14596 (ui_file_fseek): Delete.
14597 (fputs_unfiltered): Adjust.
14598 (set_ui_file_flush, set_ui_file_isatty, set_ui_file_rewind)
14599 (set_ui_file_put, set_ui_file_write, set_ui_file_write_async_safe)
14600 (set_ui_file_read, set_ui_file_fputs, set_ui_file_fseek)
14601 (set_ui_file_data): Delete.
14602 (string_file::~string_file, string_file::write)
14603 (struct accumulated_ui_file, do_ui_file_xstrdup, ui_file_xstrdup)
14604 (do_ui_file_as_string, ui_file_as_string): Delete.
14605 (do_ui_file_obsavestring, ui_file_obsavestring): Delete.
14606 (struct mem_file): Delete.
14607 (mem_file_new): Delete.
14608 (stdio_file::stdio_file): New.
14609 (mem_file_delete): Delete.
14610 (stdio_file::stdio_file): New.
14611 (mem_fileopen): Delete.
14612 (stdio_file::~stdio_file): New.
14613 (mem_file_rewind): Delete.
14614 (stdio_file::set_stream): New.
14615 (mem_file_put): Delete.
14616 (stdio_file::open): New.
14617 (mem_file_write): Delete.
14618 (stdio_file_magic, struct stdio_file): Delete.
14619 (stdio_file_new, stdio_file_delete, stdio_file_flush): Delete.
14620 (stdio_file::flush): New.
14621 (stdio_file_read): Rename to ...
14622 (stdio_file::read): ... this. Adjust.
14623 (stdio_file_write): Rename to ...
14624 (stdio_file::write): ... this. Adjust.
14625 (stdio_file_write_async_safe): Rename to ...
14626 (stdio_file::write_async_safe) ... this. Adjust.
14627 (stdio_file_fputs): Rename to ...
14628 (stdio_file::puts) ... this. Adjust.
14629 (stdio_file_isatty): Delete.
14630 (stdio_file_fseek): Delete.
14631 (stdio_file::isatty): New.
14632 (stderr_file_write): Rename to ...
14633 (stderr_file::write) ... this. Adjust.
14634 (stderr_file_fputs): Rename to ...
14635 (stderr_file::puts) ... this. Adjust.
14636 (stderr_fileopen, stdio_fileopen, gdb_fopen): Delete.
14637 (stderr_file::stderr_file): New.
14638 (tee_file_magic): Delete.
14639 (struct tee_file): Delete.
14640 (tee_file::tee_file): New.
14641 (tee_file_new): Delete.
14642 (tee_file::~tee_file): New.
14643 (tee_file_delete): Delete.
14644 (tee_file_flush): Rename to ...
14645 (tee_file::flush): ... this. Adjust.
14646 (tee_file_write): Rename to ...
14647 (tee_file::write): ... this. Adjust.
14648 (tee_file::write_async_safe): New.
14649 (tee_file_fputs): Rename to ...
14650 (tee_file::puts): ... this. Adjust.
14651 (tee_file_isatty): Rename to ...
14652 (tee_file::isatty): ... this. Adjust.
14653 * ui-file.h (struct obstack, struct ui_file): Don't
14654 forward-declare.
14655 (ui_file_new, ui_file_flush_ftype, set_ui_file_flush)
14656 (ui_file_write_ftype)
14657 (set_ui_file_write, ui_file_fputs_ftype, set_ui_file_fputs)
14658 (ui_file_write_async_safe_ftype, set_ui_file_write_async_safe)
14659 (ui_file_read_ftype, set_ui_file_read, ui_file_isatty_ftype)
14660 (set_ui_file_isatty, ui_file_rewind_ftype, set_ui_file_rewind)
14661 (ui_file_put_method_ftype, ui_file_put_ftype, set_ui_file_put)
14662 (ui_file_delete_ftype, set_ui_file_data, ui_file_fseek_ftype)
14663 (set_ui_file_fseek): Delete.
14664 (ui_file_data, ui_file_delete, ui_file_rewind)
14665 (struct ui_file): New.
14666 (ui_file_up): New.
14667 (class null_file): New.
14668 (null_stream): Declare.
14669 (ui_file_write_for_put, ui_file_put): Delete.
14670 (ui_file_xstrdup, ui_file_as_string, ui_file_obsavestring):
14671 Delete.
14672 (ui_file_fseek, mem_fileopen, stdio_fileopen, stderr_fileopen)
14673 (gdb_fopen, tee_file_new): Delete.
14674 (struct string_file): New.
14675 (struct stdio_file): New.
14676 (stdio_file_up): New.
14677 (struct stderr_file): New.
14678 (class tee_file): New.
14679 * ui-out.c (ui_out::field_stream): Take a 'string_file &' instead
14680 of a 'ui_file *'. Adjust.
14681 * ui-out.h (class ui_out) <field_stream>: Likewise.
14682 * utils.c (do_ui_file_delete, make_cleanup_ui_file_delete)
14683 (null_stream): Delete.
14684 (error_stream): Take a 'string_file &' instead of a 'ui_file *'.
14685 Adjust.
14686 * utils.h (struct ui_file): Delete forward declaration..
14687 (make_cleanup_ui_file_delete, null_stream): Delete declarations.
14688 (error_stream): Take a 'string_file &' instead of a
14689 'ui_file *'.
14690 * varobj.c (varobj_value_get_print_value): Use string_file.
14691 * xtensa-tdep.c (xtensa_verify_config): Use string_file.
14692 * gdbarch.c: Regenerate.
14693
14694 2017-02-02 Pedro Alves <palves@redhat.com>
14695
14696 * disasm.c (gdb_disassembler::pretty_print_insn): Rename to...
14697 (gdb_pretty_print_insn): ... this. Now a free function. Add back
14698 a 'gdbarch' parameter. Allocate a mem_fileopen stream here.
14699 Adjust to call gdb_print_insn instead of
14700 gdb_disassembler::print_insn.
14701 (dump_insns, do_mixed_source_and_assembly_deprecated)
14702 (do_mixed_source_and_assembly, do_assembly_only): Add back a
14703 'gdbarch' parameter. Remove gdb_disassembler parameter.
14704 (gdb_disassembly): Don't allocate a gdb_disassembler here.
14705 * disasm.h (gdb_disassembler::pretty_print_insn): Delete
14706 declaration.
14707 (gdb_pretty_print_insn): Re-add declaration.
14708 * record-btrace.c (btrace_insn_history): Don't allocate a
14709 gdb_disassembler here. Adjust to call gdb_pretty_print_insn.
14710
14711 2017-02-01 Simon Marchi <simon.marchi@polymtl.ca>
14712
14713 * disasm.h (gdb_disassembly): Remove file_string parameter.
14714 * disasm.c (gdb_disassembly): Likewise.
14715 * cli/cli-cmds.c (print_disassembly): Adapt.
14716 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Likewise.
14717 * stack.c (do_gdb_disassembly): Likewise.
14718
14719 2017-02-01 Andreas Arnez <arnez@linux.vnet.ibm.com>
14720
14721 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): For
14722 DWARF_VALUE_LITERAL, no longer ignore the offset on big-endian
14723 targets. And if the implicit value is longer than needed, extract
14724 the first bytes instead of the "least significant" ones.
14725
14726 2017-02-01 Markus Metzger <markus.t.metzger@intel.com>
14727
14728 * btrace.c (btrace_enable): Do not call btrace_add_pc for
14729 BTRACE_FORMAT_PT or if can_access_registers_ptid returns false.
14730 (btrace_fetch): Assert can_access_registers_ptid.
14731 * record-btrace.c (require_btrace_thread, record_btrace_info): Call
14732 validate_registers_access.
14733
14734 2017-02-01 Markus Metzger <markus.t.metzger@intel.com>
14735
14736 * gdbthread.h (can_access_registers_ptid): New.
14737 * thread.c (can_access_registers_ptid): New.
14738
14739 2017-02-01 Pedro Alves <palves@redhat.com>
14740
14741 * i386-tdep.c (i386_fast_tracepoint_valid_at): Use gdb_insn_length.
14742
14743 2017-01-31 Pedro Alves <palves@redhat.com>
14744
14745 * mi/mi-interp.c (mi_breakpoint_created, mi_breakpoint_modified):
14746 Fix typos.
14747
14748 2017-01-31 Pedro Alves <palves@redhat.com>
14749
14750 * stack.c (print_frame_args): Remove local mem_fileopen stream,
14751 not used.
14752
14753 2017-01-31 Pedro Alves <palves@redhat.com>
14754
14755 * varobj.c (varobj_value_get_print_value): Remove xstrdup call.
14756
14757 2017-01-31 Pedro Alves <palves@redhat.com>
14758
14759 * common/scoped_restore.h
14760 (scoped_restore_tmpl::scoped_restore_tmpl): Template on T2, and
14761 change the value's parameter type to T2.
14762 (make_scoped_restore): Likewise.
14763
14764 2017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
14765 Richard Henderson <rth@redhat.com>
14766
14767 * amd64-linux-nat.c (PTRACE_ARCH_PRCTL): New define.
14768 (amd64_linux_fetch_inferior_registers): Add case to fetch FS_BASE
14769 GS_BASE for older kernels.
14770 (amd64_linux_store_inferior_registers): Add case to store FS_BASE
14771 GS_BASE for older kernels.
14772 * amd64-linux-tdep.c (amd64_linux_gregset_reg_offset): Add FS_BASE
14773 and GS_BASE to the offset table.
14774 (amd64_linux_register_reggroup_p): Add FS_BASE and GS_BASE to the
14775 system register group.
14776 * amd64-nat.c (amd64_native_gregset_reg_offset): Implements case
14777 for older kernels.
14778 * amd64-tdep.c (amd64_init_abi): Add segment registers for the
14779 amd64 ABI.
14780 * amd64-tdep.h (amd64_regnum): Add AMD64_FSBASE_REGNUM and
14781 AMD64_GSBASE_REGNUM.
14782 (AMD64_NUM_REGS): Set to AMD64_GSBASE_REGNUM + 1.
14783 * features/Makefile (amd64-linux.dat, amd64-avx-linux.dat)
14784 (amd64-mpx-linux.dat, amd64-avx512-linux.dat, x32-linux.dat)
14785 (x32-avx-linux.dat, x32-avx512-linux.dat): Add
14786 i386/64bit-segments.xml in those rules.
14787 * features/i386/64bit-segments.xml: New file.
14788 * features/i386/amd64-avx-mpx-linux.xml: Add 64bit-segments.xml.
14789 * features/i386/amd64-avx-linux.xml: Add 64bit-segments.xml.
14790 * features/i386/amd64-avx512-linux.xml: Add 64bit-segments.xml.
14791 * features/i386/amd64-mpx-linux.xml: Add 64bit-segments.xml.
14792 * features/i386/x32-avx512-linux.xml: Add 64bit-segments.xml.
14793 * features/i386/x32-avx-linux.xml: Add 64bit-segments.xml.
14794 * features/i386/amd64-linux.xml: Add 64bit-segments.xml.
14795 * features/i386/amd64-avx-linux.c: Regenerated.
14796 * features/i386/amd64-avx-mpx-linux.c: Regenerated.
14797 * features/i386/amd64-avx-mpx.c: Regenerated.
14798 * features/i386/amd64-avx512-linux.c: Regenerated.
14799 * features/i386/amd64-linux.c: Regenerated.
14800 * features/i386/amd64-mpx-linux.c: Regenerated.
14801 * features/i386/i386-avx-mpx-linux.c: Regenerated.
14802 * features/i386/i386-avx-mpx.c: Regenerated.
14803 * features/i386/x32-avx-linux.c: Regenerated.
14804 * features/i386/x32-avx512-linux.c: Regenerated.
14805 * regformats/i386/amd64-avx-linux.dat: Regenerated.
14806 * regformats/i386/amd64-avx-mpx-linux.dat: Regenerated.
14807 * regformats/i386/amd64-avx512-linux.dat: Regenerated.
14808 * regformats/i386/amd64-linux.dat: Regenerated.
14809 * regformats/i386/amd64-mpx-linux.dat: Regenerated.
14810 * regformats/i386/x32-avx-linux.dat: Regenerated.
14811 * regformats/i386/x32-avx512-linux.dat: Regenerated.
14812 * regformats/i386/x32-linux.dat: Regenerated.
14813
14814 2017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
14815
14816 * amd64-linux-tdep.h (AMD64_LINUX_ORIG_RAX_REGNUM):
14817 Set to AMD64_NUM_REGS.
14818
14819 2017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
14820
14821 * amd64-nat.c (amd64_native_gregset_reg_offset): Simplify logic
14822 that checks validity of a register number.
14823
14824 2017-01-27 Kees Cook <keescook@google.com>
14825
14826 * gdb/arm-linux-nat.c (arm_linux_fetch_inferior_registers): Call
14827 fetch_fpregs if target has fpa registers.
14828 (arm_linux_store_inferior_registers): Call store_fpregs if target
14829 has fpa registers.
14830
14831 2017-01-26 Andreas Arnez <arnez@linux.vnet.ibm.com>
14832
14833 * cris-tdep.c (cris_gdbarch_init): Remove check for
14834 info.byte_order and force it to BFD_ENDIAN_LITTLE.
14835
14836 2017-01-26 Antoine Tremblay <antoine.tremblay@ericsson.com>
14837
14838 * corelow.c (get_core_register_section): Check for regset
14839 existence before checking for REGSET_VARIABLE_SIZE.
14840
14841 2017-01-26 Yao Qi <yao.qi@linaro.org>
14842 Pedro Alves <palves@redhat.com>
14843
14844 PR gdb/20939
14845 * disasm.c (gdb_disassembler::dis_asm_memory_error): Don't
14846 call memory_error, save memaddr instead.
14847 (gdb_disassembler::print_insn): If gdbarch_print_insn returns
14848 negative, cal memory_error.
14849 * disasm.h (gdb_disassembler) <m_err_memaddr>: New field.
14850
14851 2017-01-26 Yao Qi <yao.qi@linaro.org>
14852
14853 * disasm-selftests.c (memory_error_test): New function.
14854 (_initialize_disasm_selftests): Register memory_error_test.
14855
14856 2017-01-26 Yao Qi <yao.qi@linaro.org>
14857
14858 * Makefile.in (SFILES): Add disasm-selftests.c and
14859 selftest-arch.c.
14860 (COMMON_OBS): Add disasm-selftests.o and selftest-arch.o.
14861 * disasm-selftests.c: New file.
14862 * selftest-arch.c: New file.
14863 * selftest-arch.h: New file.
14864
14865 2017-01-26 Yao Qi <yao.qi@linaro.org>
14866
14867 * mep-tdep.c (mep_gdb_print_insn): Set info->arch
14868 to bfd_arch_mep. Don't return 0 if section is not
14869 found. Call print_insn_mep.
14870
14871 2017-01-26 Pedro Alves <palves@redhat.com>
14872 Yao Qi <yao.qi@linaro.org>
14873
14874 * arm-tdep.c: Include "disasm.h".
14875 (gdb_print_insn_arm): Update code to get gdbarch.
14876 * disasm.c (dis_asm_read_memory): Change it to
14877 gdb_disassembler::dis_asm_read_memory.
14878 (dis_asm_memory_error): Likewise.
14879 (dis_asm_print_address): Likewise.
14880 (gdb_pretty_print_insn): Change it to
14881 gdb_disassembler::pretty_print_insn.
14882 (dump_insns): Add one argument gdb_disassemlber. All
14883 callers updated.
14884 (do_mixed_source_and_assembly_deprecated): Likewise.
14885 (do_mixed_source_and_assembly): Likewise.
14886 (do_assembly_only): Likewise.
14887 (gdb_disassembler::gdb_disassembler): New.
14888 (gdb_disassembler::print_insn): New.
14889 * disasm.h (class gdb_disassembler): New.
14890 (gdb_pretty_print_insn): Remove declaration.
14891 (gdb_disassemble_info): Likewise.
14892 * guile/scm-disasm.c (class gdbscm_disassembler): New.
14893 (gdbscm_disasm_read_memory_worker): Update.
14894 (gdbscm_disasm_read_memory): Update.
14895 (gdbscm_disasm_memory_error): Remove.
14896 (gdbscm_disasm_print_address): Remove.
14897 (gdbscm_disassembler::gdbscm_disassembler): New.
14898 (gdbscm_print_insn_from_port): Update.
14899 * mips-tdep.c: Include disasm.h.
14900 (gdb_print_insn_mips): Update code to get gdbarch.
14901 * record-btrace.c (btrace_insn_history): Update.
14902 * spu-tdep.c: Include disasm.h.
14903 (struct spu_dis_asm_data): Remove.
14904 (struct spu_dis_asm_info): New.
14905 (spu_dis_asm_print_address): Use spu_dis_asm_info to get
14906 SPU id.
14907 (gdb_print_insn_spu): Cast disassemble_info to
14908 spu_dis_asm_info.
14909
14910 2017-01-26 Yao Qi <yao.qi@linaro.org>
14911
14912 * disasm.c (do_ui_file_delete): Delete.
14913 (gdb_insn_length): Move code creating stream to ...
14914 * utils.c (null_stream): ... here. New function.
14915 * utils.h (null_stream): Declare.
14916
14917 2017-01-23 Simon Marchi <simon.marchi@polymtl.ca>
14918
14919 * python/py-inferior.c (find_thread_object): Return directly
14920 from the loop. Remove "found" variable.
14921
14922 2017-01-21 Joel Brobecker <brobecker@adacore.com>
14923
14924 GDB 7.12.1 released.
14925
14926 2017-01-20 Simon Marchi <simon.marchi@ericsson.com>
14927
14928 * python/py-function.c (fnpy_call): Reorder declarations to have
14929 the gdbpy_enter object declared first.
14930 * python/py-xmethods.c (gdbpy_get_xmethod_arg_types): Likewise.
14931
14932 2017-01-20 Simon Marchi <simon.marchi@ericsson.com>
14933
14934 PR python/21068
14935 * python/python-internal.h (PyMem_RawMalloc): Define for
14936 Python < 3.4.
14937 * python/py-gdb-readline.c (gdbpy_readline_wrapper): Use
14938 PyMem_RawMalloc instead of PyMem_Malloc.
14939
14940 2017-01-20 Mike Wrighton <mike_wrighton@codesourcery.com>
14941 Luis Machado <lgustavo@codesourcery.com>
14942
14943 * NEWS (New commands): Mention flash-erase.
14944 (New MI commands): Mention target-flash-erase.
14945 * mi/mi-cmds.c (mi_cmd_target_flash_erase): Add target-flash-erase MI
14946 command.
14947 * mi/mi-cmds.h (mi_cmd_target_flash_erase): New declaration.
14948 * mi/mi-main.c (mi_cmd_target_flash_erase): New function.
14949 * target.c (flash_erase_command): New function.
14950 (initialize_targets): Add new flash-erase command.
14951 * target.h (flash_erase_command): New declaration.
14952
14953 2017-01-20 Joel Brobecker <brobecker@adacore.com>
14954
14955 * nat/linux-ptrace.c: Only include <sys/procfs.h> if
14956 HAVE_SYS_PROCFS_H is defined.
14957
14958 2017-01-18 Alan Hayward <alan.hayward@arm.com>
14959
14960 * remote.c (struct cached_reg): Change data into a pointer.
14961 * (stop_reply_dtr): Free data pointers before deleting vector.
14962 (process_stop_reply): Likewise.
14963 (remote_parse_stop_reply): Allocate space for data
14964
14965 2017-01-18 Alan Hayward <alan.hayward@arm.com>
14966
14967 * amd64-tdep.c (amd64_pseudo_register_read_value): remove
14968 MAX_REGISTER_SIZE.
14969 (amd64_pseudo_register_read_value): Likewise.
14970 * remote.c (fetch_register_using_p): Remove MAX_REGISTER_SIZE.
14971 (store_register_using_P): Likewise.
14972 * regcache.c (regcache_xfer_part): Likewise.
14973
14974 2017-01-16 Ivo Raisr <ivo.raisr@oracle.com>
14975
14976 Split real and pseudo registers.
14977 * sparc-tdep.h (SPARC_CORE_REGISTERS): New macro.
14978 (sparc32_pseudo_regnum): New enum.
14979 * sparc64-tdep.h (sparc64_pseudo_regnum): New enum.
14980 * sparc-tdep.c (SPARC32_FPU_REGISTERS): New macro.
14981 (SPARC32_CP0_REGISTERS): New macro.
14982 (sparc32_pseudo_register_name): New function.
14983 (sparc32_register_name): Use sparc32_pseudo_register_name.
14984 (sparc32_pseudo_register_type): New function.
14985 (sparc32_register_type): Use sparc32_pseudo_register_type.
14986 (sparc32_pseudo_register_read, sparc32_pseudo_register_write): Handle
14987 pseudo register numbers.
14988 * sparc64-tdep.c SPARC64_FPU_REGISTERS): New macro.
14989 (SPARC64_CP0_REGISTERS): New macro.
14990 (sparc64_pseudo_register_name): New function.
14991 (sparc64_register_name): Use sparc64_pseudo_register_name.
14992 (sparc64_pseudo_register_type): New function.
14993 (sparc64_register_type): Use sparc64_pseudo_register_type.
14994 (sparc64_pseudo_register_read, sparc64_pseudo_register_write): Handle
14995 pseudo register numbers.
14996 (sparc64_store_floating_fields, sparc64_extract_floating_fields,
14997 sparc64_store_arguments): Handle pseudo register numbers.
14998
14999 2017-01-13 Yao Qi <yao.qi@linaro.org>
15000
15001 * remote.c (REMOTE_DEBUG_MAX_CHAR): New macro.
15002 (putpkt_binary): Print only REMOTE_DEBUG_MAX_CHAR chars in debug
15003 output.
15004 (getpkt_or_notif_sane_1): Likewise.
15005
15006 2017-01-13 Yao Qi <yao.qi@linaro.org>
15007
15008 * Makefile.in (checker-headers): Use CXX and CXX_DIALET instead
15009 of CC. Pass "-x c++-header" instead of "-x c".
15010
15011 2017-01-12 Simon Marchi <simon.marchi@ericsson.com>
15012
15013 * remote.c (remote_can_async_p): Update comment.
15014
15015 2017-01-12 Simon Marchi <simon.marchi@ericsson.com>
15016
15017 * linux-nat.c (linux_nat_can_async_p): Update comment.
15018
15019 2017-01-12 Simon Marchi <simon.marchi@ericsson.com>
15020
15021 * serial.c (serial_open): Forget about "pc" and "lpt" serial interface.
15022
15023 2017-01-11 Simon Marchi <simon.marchi@ericsson.com>
15024
15025 * cli/cli-decode.c (lookup_cmd_1): Fix typo in comment.
15026
15027 2017-01-10 Tom Tromey <tom@tromey.com>
15028
15029 * python/py-type.c (typy_legacy_template_argument): Update.
15030 * cp-support.h (struct demangle_parse_info) (demangle_parse_info,
15031 ~demangle_parse_info): Declare new members.
15032 (cp_demangled_name_to_comp): Return unique_ptr.
15033 (cp_demangled_name_parse_free)
15034 (make_cleanup_cp_demangled_name_parse_free)
15035 (cp_new_demangle_parse_info): Remove.
15036 * cp-support.c (do_demangled_name_parse_free_cleanup)
15037 (make_cleanup_cp_demangled_name_parse_free): Remove.
15038 (inspect_type, cp_canonicalize_string_full)
15039 (cp_canonicalize_string): Update.
15040 (mangled_name_to_comp): Change return type.
15041 (cp_class_name_from_physname, method_name_from_physname)
15042 (cp_func_name, cp_remove_params): Update.
15043 * cp-name-parser.y (demangle_parse_info): New constructor, from
15044 cp_new_demangle_parse_info.
15045 (~demangle_parse_info): New destructor, from
15046 cp_demangled_name_parse_free.
15047 (cp_merge_demangle_parse_infos): Update.
15048 (cp_demangled_name_to_comp): Change return type.
15049
15050 2017-01-10 Tom Tromey <tom@tromey.com>
15051
15052 * top.c (prevent_dont_repeat): Change return type.
15053 * python/python.c (execute_gdb_command): Use std::string.
15054 Update.
15055 * guile/guile.c (gdbscm_execute_gdb_command): Update.
15056 * command.h (prevent_dont_repeat): Change return type.
15057 * breakpoint.c (bpstat_do_actions_1): Update.
15058
15059 2017-01-10 Tom Tromey <tom@tromey.com>
15060
15061 * value.h (scoped_value_mark::~scoped_value_mark): Call
15062 free_to_mark.
15063 (scoped_value_mark::free_to_mark): New method.
15064 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Use
15065 scoped_value_mark.
15066
15067 2017-01-10 Tom Tromey <tom@tromey.com>
15068
15069 * python/py-value.c (valpy_dereference, valpy_referenced_value)
15070 (valpy_reference_value, valpy_const_value, valpy_get_address)
15071 (valpy_get_dynamic_type, valpy_lazy_string, valpy_do_cast)
15072 (valpy_getitem, valpy_call, valpy_binop_throw, valpy_negative)
15073 (valpy_absolute, valpy_richcompare_throw): Use scoped_value_mark.
15074 * dwarf2loc.c (dwarf2_loc_desc_get_symbol_read_needs): Use
15075 scoped_value_mark.
15076 * dwarf2-frame.c (execute_stack_op): Use scoped_value_mark.
15077 * value.h (scoped_value_mark): New class.
15078
15079 2017-01-10 Tom Tromey <tom@tromey.com>
15080
15081 * dwarf2read.c (dwarf2_build_psymtabs): Use psymtab_discarder.
15082 * psympriv.h (make_cleanup_discard_psymtabs): Don't declare.
15083 * psymtab.c (discard_psymtabs_upto): Remove.
15084 (make_cleanup_discard_psymtabs): Remove.
15085 (struct psymtab_state): Remove.
15086
15087 2017-01-10 Tom Tromey <tom@tromey.com>
15088
15089 * record-full.c (record_full_save_cleanups): Remove.
15090 (record_full_save): Use gdb::unlinker.
15091 * gcore.c (do_bfd_delete_cleanup): Remove.
15092 (gcore_command): Use gdb::unlinker, unique_xmalloc_ptr. Remove
15093 cleanups.
15094 * dwarf2read.c (unlink_if_set): Remove.
15095 (write_psymtabs_to_index): Use gdb::unlinker.
15096 * common/gdb_unlinker.h: New file.
15097
15098 2017-01-10 Tom Tromey <tom@tromey.com>
15099
15100 * windows-tdep.c (windows_xfer_shared_library): Update.
15101 * windows-nat.c (windows_make_so): Update.
15102 * utils.h (make_cleanup_bfd_unref): Remove.
15103 * utils.c (do_bfd_close_cleanup, make_cleanup_bfd_unref): Remove.
15104 * symfile.h (symfile_bfd_open)
15105 (find_separate_debug_file_in_section): Return gdb_bfd_ref_ptr.
15106 * symfile.c (read_symbols, symbol_file_add)
15107 (separate_debug_file_exists): Update.
15108 (symfile_bfd_open): Return gdb_bfd_ref_ptr.
15109 (generic_load, reread_symbols): Update.
15110 * symfile-mem.c (symbol_file_add_from_memory): Update.
15111 * spu-linux-nat.c (spu_bfd_open): Return gdb_bfd_ref_ptr.
15112 (spu_symbol_file_add_from_memory): Update.
15113 * solist.h (struct target_so_ops) <bfd_open>: Return
15114 gdb_bfd_ref_ptr.
15115 (solib_bfd_fopen, solib_bfd_open): Return gdb_bfd_ref_ptr.
15116 * solib.c (solib_bfd_fopen, solib_bfd_open): Return
15117 gdb_bfd_ref_ptr.
15118 (solib_map_sections, reload_shared_libraries_1): Update.
15119 * solib-svr4.c (enable_break): Update.
15120 * solib-spu.c (spu_bfd_fopen): Return gdb_bfd_ref_ptr.
15121 * solib-frv.c (enable_break2): Update.
15122 * solib-dsbt.c (enable_break): Update.
15123 * solib-darwin.c (gdb_bfd_mach_o_fat_extract): Return
15124 gdb_bfd_ref_ptr.
15125 (darwin_solib_get_all_image_info_addr_at_init): Update.
15126 (darwin_bfd_open): Return gdb_bfd_ref_ptr.
15127 * solib-aix.c (solib_aix_bfd_open): Return gdb_bfd_ref_ptr.
15128 * record-full.c (record_full_save): Update.
15129 * python/py-objfile.c (objfpy_add_separate_debug_file): Update.
15130 * procfs.c (insert_dbx_link_bpt_in_file): Update.
15131 * minidebug.c (find_separate_debug_file_in_section): Return
15132 gdb_bfd_ref_ptr.
15133 * machoread.c (macho_add_oso_symfile): Change abfd to
15134 gdb_bfd_ref_ptr.
15135 (macho_symfile_read_all_oso): Update.
15136 (macho_check_dsym): Return gdb_bfd_ref_ptr.
15137 (macho_symfile_read): Update.
15138 * jit.c (bfd_open_from_target_memory): Return gdb_bfd_ref_ptr.
15139 (jit_bfd_try_read_symtab): Update.
15140 * gdb_bfd.h (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
15141 (gdb_bfd_openw, gdb_bfd_openr_iovec)
15142 (gdb_bfd_openr_next_archived_file, gdb_bfd_fdopenr): Return
15143 gdb_bfd_ref_ptr.
15144 (gdb_bfd_ref_policy): New struct.
15145 (gdb_bfd_ref_ptr): New typedef.
15146 * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
15147 (gdb_bfd_openw, gdb_bfd_openr_iovec)
15148 (gdb_bfd_openr_next_archived_file, gdb_bfd_fdopenr): Return
15149 gdb_bfd_ref_ptr.
15150 * gcore.h (create_gcore_bfd): Return gdb_bfd_ref_ptr.
15151 * gcore.c (create_gcore_bfd): Return gdb_bfd_ref_ptr.
15152 (gcore_command): Update.
15153 * exec.c (exec_file_attach): Update.
15154 * elfread.c (elf_symfile_read): Update.
15155 * dwarf2read.c (dwarf2_get_dwz_file): Update.
15156 (try_open_dwop_file, open_dwo_file): Return gdb_bfd_ref_ptr.
15157 (open_and_init_dwo_file): Update.
15158 (open_dwp_file): Return gdb_bfd_ref_ptr.
15159 (open_and_init_dwp_file): Update.
15160 * corelow.c (core_open): Update.
15161 * compile/compile-object-load.c (compile_object_load): Update.
15162 * common/gdb_ref_ptr.h (ref_ptr::operator->): New operator.
15163 * coffread.c (coff_symfile_read): Update.
15164 * cli/cli-dump.c (bfd_openr_or_error, bfd_openw_or_error): Return
15165 gdb_bfd_ref_ptr. Rename.
15166 (dump_bfd_file, restore_command): Update.
15167 * build-id.h (build_id_to_debug_bfd): Return gdb_bfd_ref_ptr.
15168 * build-id.c (build_id_to_debug_bfd): Return gdb_bfd_ref_ptr.
15169 (find_separate_debug_file_by_buildid): Update.
15170
15171 2017-01-10 Tom Tromey <tom@tromey.com>
15172
15173 * common/gdb_ref_ptr.h: New file.
15174 * python/py-ref.h (struct gdbpy_ref_policy): New.
15175 (gdbpy_ref): Now a typedef.
15176
15177 2017-01-10 Tom Tromey <tom@tromey.com>
15178
15179 * utils.h (make_cleanup_htab_delete): Don't declare.
15180 * utils.c (do_htab_delete_cleanup, make_cleanup_htab_delete):
15181 Remove.
15182 * linespec.c (decode_compound_collector): Add constructor,
15183 destructor.
15184 (lookup_prefix_sym): Remove cleanup.
15185 (symtab_collector): Add constructor, destructor.
15186 (collect_symtabs_from_filename): Remove cleanup.
15187 * disasm.c (do_mixed_source_and_assembly): Use htab_up.
15188 * compile/compile-c-symbols.c (generate_c_for_variable_locations):
15189 Use htab_up.
15190 * gnu-v3-abi.c (gnuv3_print_vtable): Use htab_up.
15191 * dwarf2read.c (dw2_expand_symtabs_matching)
15192 (dw2_map_symbol_filenames, dwarf_decode_macros)
15193 (write_psymtabs_to_index): Use htab_up.
15194 * dwarf2loc.c (func_verify_no_selftailcall)
15195 (call_site_find_chain_1, func_verify_no_selftailcall)
15196 (chain_candidate, call_site_find_chain_1): Use std::unordered_set,
15197 std::vector, gdb::unique_xmalloc_ptr.
15198 (call_sitep): Remove typedef.
15199 (dwarf2_locexpr_baton_eval): Remove unused variable.
15200
15201 2017-01-10 Tom Tromey <tom@tromey.com>
15202
15203 * python/python-internal.h (make_cleanup_py_decref)
15204 (make_cleanup_py_xdecref): Don't declare.
15205 * python/py-utils.c (py_decref, make_cleanup_py_decref)
15206 (py_xdecref, make_cleanup_py_xdecref): Remove.
15207
15208 2017-01-10 Tom Tromey <tom@tromey.com>
15209
15210 * python/py-framefilter.c (py_mi_print_variables): Use gdbpy_ref.
15211 (py_print_locals, enumerate_locals, py_print_args): Use gdbpy_ref.
15212
15213 2017-01-10 Tom Tromey <tom@tromey.com>
15214
15215 * python/py-framefilter.c (enumerate_args): Use gdbpy_ref.
15216
15217 2017-01-10 Tom Tromey <tom@tromey.com>
15218
15219 * python/py-utils.c (unicode_to_encoded_string)
15220 (python_string_to_target_string)
15221 (python_string_to_target_python_string)
15222 (python_string_to_host_string, gdbpy_obj_to_string)
15223 (get_addr_from_python): Use gdbpy_ref.
15224
15225 2017-01-10 Tom Tromey <tom@tromey.com>
15226
15227 * python/py-unwind.c (pyuw_object_attribute_to_pointer): Use
15228 gdbpy_ref.
15229
15230 2017-01-10 Tom Tromey <tom@tromey.com>
15231
15232 * python/python.c (eval_python_command, gdbpy_decode_line)
15233 (gdbpy_run_events, gdbpy_start_type_printers)
15234 (gdbpy_apply_type_printers): Use gdbpy_ref.
15235
15236 2017-01-10 Tom Tromey <tom@tromey.com>
15237
15238 * python/py-param.c (get_doc_string, compute_enum_values): Use
15239 gdbpy_ref.
15240
15241 2017-01-10 Tom Tromey <tom@tromey.com>
15242
15243 * python/py-inferior.c (find_thread_object, build_inferior_list):
15244 Use gdbpy_ref.
15245
15246 2017-01-10 Tom Tromey <tom@tromey.com>
15247
15248 * python/py-framefilter.c (py_print_frame): Use gdbpy_ref.
15249
15250 2017-01-10 Tom Tromey <tom@tromey.com>
15251
15252 * python/py-finishbreakpoint.c (bpfinishpy_out_of_scope): Use
15253 gdbpy_ref.
15254
15255 2017-01-10 Tom Tromey <tom@tromey.com>
15256
15257 * python/py-cmd.c (cmdpy_completer_helper): Use gdbpy_ref. Remove
15258 extra incref.
15259 (cmdpy_completer_handle_brkchars, cmdpy_completer, cmdpy_init):
15260 Use gdbpy_ref.
15261
15262 2017-01-10 Tom Tromey <tom@tromey.com>
15263
15264 * python/py-breakpoint.c (gdbpy_breakpoint_cond_says_stop): Use
15265 gdbpy_ref.
15266
15267 2017-01-10 Tom Tromey <tom@tromey.com>
15268
15269 * python/py-arch.c (archpy_disassemble): Use gdbpy_ref. Don't
15270 decref results of PyArg_ParseTupleAndKeywords.
15271
15272 2017-01-10 Tom Tromey <tom@tromey.com>
15273
15274 * python/python.c (python_run_simple_file): Use
15275 unique_xmalloc_ptr, gdbpy_ref.
15276
15277 2017-01-10 Tom Tromey <tom@tromey.com>
15278
15279 * python/py-prettyprint.c (print_stack_unless_memory_error)
15280 (print_string_repr, print_children): Use gdbpy_ref.
15281 (dummy_python_frame): New class.
15282 (dummy_python_frame::dummy_python_frame): Rename from
15283 push_dummy_python_frame.
15284 (py_restore_tstate): Remove.
15285
15286 2017-01-10 Tom Tromey <tom@tromey.com>
15287
15288 * python/py-framefilter.c (py_print_frame): Use gdbpy_ref.
15289
15290 2017-01-10 Tom Tromey <tom@tromey.com>
15291
15292 * python/python.c (ensure_python_env, restore_python_env):
15293 Remove.
15294 * python/python-internal.h (ensure_python_env): Don't declare.
15295 * varobj.h (varobj_ensure_python_env): Don't declare.
15296 * varobj.c (varobj_ensure_python_env): Remove.
15297
15298 2017-01-10 Tom Tromey <tom@tromey.com>
15299
15300 * varobj.c (varobj_value_get_print_value): Use
15301 gdbpy_enter_varobj.
15302
15303 2017-01-10 Tom Tromey <tom@tromey.com>
15304
15305 * python/py-prettyprint.c (print_string_repr, print_children):
15306 Update.
15307 * python/py-lazy-string.c (gdbpy_extract_lazy_string): Change type
15308 of "encoding".
15309 * varobj.c (varobj_value_get_print_value): Update.
15310 * python/python-internal.h (gdbpy_extract_lazy_string): Update.
15311
15312 2017-01-10 Tom Tromey <tom@tromey.com>
15313
15314 * varobj.c (varobj_get_display_hint)
15315 (dynamic_varobj_has_child_method, install_new_value_visualizer)
15316 (varobj_set_visualizer, free_variable): Use
15317 gdbpy_enter_varobj.
15318
15319 2017-01-10 Tom Tromey <tom@tromey.com>
15320
15321 * python/python.c (python_command): Use gdbpy_enter, gdbpy_ref.
15322 (do_finish_initialization): New function. Use gdbpy_ref.
15323 (gdbpy_finish_initialization): Use gdbpy_enter. Call
15324 do_finish_initialization.
15325
15326 2017-01-10 Tom Tromey <tom@tromey.com>
15327
15328 * python/py-param.c (get_set_value, get_show_value): Use
15329 gdbpy_enter, gdbpy_ref.
15330
15331 2017-01-10 Tom Tromey <tom@tromey.com>
15332
15333 * python/py-function.c (fnpy_call): Use gdbpy_enter, gdbpy_ref.
15334
15335 2017-01-10 Tom Tromey <tom@tromey.com>
15336
15337 * python/py-cmd.c (cmdpy_function): Use gdbpy_enter, gdbpy_ref.
15338
15339 2017-01-10 Tom Tromey <tom@tromey.com>
15340
15341 * python/py-varobj.c (py_varobj_iter_dtor, py_varobj_iter_next):
15342 Use gdbpy_enter_varobj.
15343
15344 2017-01-10 Tom Tromey <tom@tromey.com>
15345
15346 * varobj.c (gdbpy_enter_varobj): New constructor.
15347 * python/python-internal.h (gdbpy_enter_varobj): New class.
15348 * python/py-varobj.c (py_varobj_get_iterator): Use
15349 gdbpy_enter_varobj.
15350
15351 2017-01-10 Tom Tromey <tom@tromey.com>
15352
15353 * python/py-xmethods.c (gdbpy_get_xmethod_result_type): Use
15354 gdbpy_enter, gdbpy_ref, unique_xmalloc_ptr.
15355 (gdbpy_invoke_xmethod): Use gdbpy_ref, gdbpy_enter.
15356 (gdbpy_get_xmethod_arg_types): Use gdbpy_ref,
15357 unique_xmalloc_ptr.
15358 (gdbpy_get_xmethod_arg_types): Use gdbpy_ref, gdbpy_enter.
15359
15360 2017-01-10 Tom Tromey <tom@tromey.com>
15361
15362 * python/py-xmethods.c (invoke_match_method): Use
15363 gdbpy_ref.
15364
15365 2017-01-10 Tom Tromey <tom@tromey.com>
15366
15367 * python/py-xmethods.c (gdbpy_get_matching_xmethod_workers): use
15368 gdbpy_enter, gdbpy_ref.
15369
15370 2017-01-10 Tom Tromey <tom@tromey.com>
15371
15372 * python/python.c (python_interactive_command): Use gdbpy_enter.
15373
15374 2017-01-10 Tom Tromey <tom@tromey.com>
15375
15376 * python/python.c (gdbpy_before_prompt_hook): Use gdbpy_enter,
15377 gdbpy_ref.
15378
15379 2017-01-10 Tom Tromey <tom@tromey.com>
15380
15381 * python/py-prettyprint.c (gdbpy_apply_val_pretty_printer): Use
15382 gdbpy_enter, gdbpy_ref, unique_xmalloc_ptr.
15383
15384 2017-01-10 Tom Tromey <tom@tromey.com>
15385
15386 * utils.h (htab_deleter): New struct.
15387 (htab_up): New typedef.
15388 * python/py-framefilter.c (gdbpy_apply_frame_filter): Use
15389 gdbpy_enter, gdbpy_ref, htab_up.
15390
15391 2017-01-10 Tom Tromey <tom@tromey.com>
15392
15393 * python/py-unwind.c (pending_frame_invalidate): Remove.
15394 (pyuw_sniffer): Use gdbpy_enter and gdbpy_ref.
15395
15396 2017-01-10 Tom Tromey <tom@tromey.com>
15397
15398 * python/py-xmethods.c (gdbpy_free_xmethod_worker_data)
15399 (gdbpy_clone_xmethod_worker_data): Use gdbpy_enter.
15400
15401 2017-01-10 Tom Tromey <tom@tromey.com>
15402
15403 * python/py-type.c (save_objfile_types): Use gdbpy_enter.
15404
15405 2017-01-10 Tom Tromey <tom@tromey.com>
15406
15407 * python/python.c (gdbpy_eval_from_control_command)
15408 (gdbpy_source_script, gdbpy_run_events)
15409 (gdbpy_source_objfile_script, gdbpy_execute_objfile_script)
15410 (gdbpy_free_type_printers, gdbpy_finish_initialization): Use
15411 gdbpy_enter.
15412
15413 2017-01-10 Tom Tromey <tom@tromey.com>
15414
15415 * python/py-progspace.c (py_free_pspace): Use gdbpy_enter.
15416
15417 2017-01-10 Tom Tromey <tom@tromey.com>
15418
15419 * python/py-objfile.c (py_free_objfile): Use gdbpy_enter.
15420
15421 2017-01-10 Tom Tromey <tom@tromey.com>
15422
15423 * python/py-inferior.c (python_on_normal_stop, python_on_resume)
15424 (python_on_inferior_call_pre, python_on_inferior_call_post)
15425 (python_on_memory_change, python_on_register_change)
15426 (python_inferior_exit, python_new_objfile, add_thread_object)
15427 (delete_thread_object, py_free_inferior): Use gdbpy_enter.
15428
15429 2017-01-10 Tom Tromey <tom@tromey.com>
15430
15431 * python/py-finishbreakpoint.c (bpfinishpy_handle_stop)
15432 (bpfinishpy_handle_exit): Use gdbpy_enter.
15433
15434 2017-01-10 Tom Tromey <tom@tromey.com>
15435
15436 * python/py-cmd.c (cmdpy_destroyer)
15437 (cmdpy_completer_handle_brkchars, cmdpy_completer): Use
15438 gdbpy_enter.
15439
15440 2017-01-10 Tom Tromey <tom@tromey.com>
15441
15442 * python/py-breakpoint.c (gdbpy_breakpoint_cond_says_stop): Use
15443 gdbpy_enter.
15444 (gdbpy_breakpoint_has_cond): Likewise.
15445
15446 2017-01-10 Tom Tromey <tom@tromey.com>
15447
15448 * python/python.c (gdbpy_enter): New constructor.
15449 (~gdbpy_enter): New destructor.
15450 (restore_python_env, ensure_python_env): Rewrite.
15451 * python/python-internal.h (gdbpy_enter): New class.
15452
15453 2017-01-10 Tom Tromey <tom@tromey.com>
15454
15455 * python/py-symbol.c (gdbpy_lookup_symbol): Use gdbpy_ref.
15456
15457 2017-01-10 Tom Tromey <tom@tromey.com>
15458
15459 * python/py-value.c (value_has_field, get_field_flag)
15460 (get_field_type, valpy_getitem, convert_value_from_python): Use
15461 gdbpy_ref.
15462
15463 2017-01-10 Tom Tromey <tom@tromey.com>
15464
15465 * python/python.c (gdbpy_progspaces, gdbpy_objfiles): Use
15466 gdbpy_ref.
15467
15468 2017-01-10 Tom Tromey <tom@tromey.com>
15469
15470 * python/py-prettyprint.c (search_pp_list)
15471 (find_pretty_printer_from_objfiles)
15472 (find_pretty_printer_from_progspace)
15473 (find_pretty_printer_from_gdb, find_pretty_printer)
15474 (gdbpy_get_display_hint, gdbpy_get_varobj_pretty_printer): Use
15475 gdbpy_ref.
15476
15477 2017-01-10 Tom Tromey <tom@tromey.com>
15478
15479 * python/py-param.c (call_doc_function): Use gdbpy_ref.
15480
15481 2017-01-10 Tom Tromey <tom@tromey.com>
15482
15483 * python/py-linetable.c (build_line_table_tuple_from_pcs)
15484 (ltpy_get_all_source_lines): Use gdbpy_ref.
15485
15486 2017-01-10 Tom Tromey <tom@tromey.com>
15487
15488 * python/py-framefilter.c (extract_sym, extract_value)
15489 (get_py_iter_from_func, bootstrap_python_frame_filters): Use
15490 gdbpy_ref.
15491
15492 2017-01-10 Tom Tromey <tom@tromey.com>
15493
15494 * python/py-breakpoint.c (gdbpy_breakpoints): Use gdbpy_ref.
15495
15496 2017-01-10 Tom Tromey <tom@tromey.com>
15497
15498 * python/py-inferior.c (gdbpy_inferiors): Use gdbpy_ref.
15499
15500 2017-01-10 Tom Tromey <tom@tromey.com>
15501
15502 * python/py-function.c (convert_values_to_python, fnpy_init): Use
15503 gdbpy_ref.
15504
15505 2017-01-10 Tom Tromey <tom@tromey.com>
15506
15507 * python/py-cmd.c (gdbpy_string_to_argv): Use gdbpy_ref.
15508
15509 2017-01-10 Tom Tromey <tom@tromey.com>
15510
15511 * python/py-type.c (convert_field, make_fielditem, typy_fields)
15512 (typy_range): Use gdbpy_ref.
15513
15514 2017-01-10 Tom Tromey <tom@tromey.com>
15515
15516 * python/py-threadevent.c (create_thread_event_object): Use
15517 gdbpy_ref.
15518 * python/py-stopevent.c (create_stop_event_object): Simplify.
15519 (emit_stop_event): Use gdbpy_ref.
15520 * python/py-signalevent.c (create_signal_event_object): Use
15521 gdbpy_ref.
15522 * python/py-newobjfileevent.c (create_new_objfile_event_object)
15523 (emit_new_objfile_event, create_clear_objfiles_event_object)
15524 (emit_clear_objfiles_event): Use gdbpy_ref.
15525 * python/py-infevents.c (create_inferior_call_event_object)
15526 (create_register_changed_event_object)
15527 (create_memory_changed_event_object, emit_inferior_call_event)
15528 (emit_memory_changed_event, emit_register_changed_event): Use
15529 gdbpy_ref.
15530 * python/py-exitedevent.c (create_exited_event_object)
15531 (emit_exited_event): Use gdbpy_ref.
15532 * python/py-event.h (evpy_emit_event): Remove
15533 CPYCHECKER_STEALS_REFERENCE_TO_ARG annotation.
15534 * python/py-event.c (evpy_emit_event): Use gdbpy_ref.
15535 * python/py-continueevent.c (emit_continue_event): Use
15536 gdbpy_ref.
15537 * python/py-breakpoint.c (gdbpy_breakpoint_created)
15538 (gdbpy_breakpoint_deleted, gdbpy_breakpoint_modified): Use
15539 gdbpy_ref.
15540 * python/py-bpevent.c (create_breakpoint_event_object): Use
15541 gdbpy_ref.
15542
15543 2017-01-10 Tom Tromey <tom@tromey.com>
15544
15545 * python/py-ref.h: New file.
15546
15547 2017-01-10 Simon Marchi <simon.marchi@ericsson.com>
15548
15549 * cli-out.c (cli_ui_out::do_redirect): Change return type to
15550 void.
15551 * cli-out.h (cli_ui_out::do_redirect): Likewise.
15552 * mi/mi-out.c (mi_ui_out::do_redirect): Likewise.
15553 * mi/mi-out.h (mi_ui_out::do_redirect): Likewise.
15554 * ui-out.c (ui_out::redirect): Likewise.
15555 * ui-out.h (ui_out::redirect, ui_out::do_redirect): Likewise.
15556 * cli/cli-logging.c (set_logging_redirect): Update call site of
15557 ui_out::redirect.
15558 (handle_redirections): Likewise.
15559 * scm-ports.c (ioscm_with_output_to_port_worker): Likewise.
15560 * top.c (execute_command_to_string): Likewise.
15561 * utils.c (do_ui_out_redirect_pop): Likewise.
15562
15563 2017-01-10 Simon Marchi <simon.marchi@ericsson.com>
15564
15565 * stack.c (_initialize_stack): Update "frame" command help message.
15566
15567 2017-01-08 Iain Buclaw <ibuclaw@gdcproject.org>
15568
15569 * d-exp.y (CastExpression): Emit UNOP_CAST_TYPE.
15570
15571 2017-01-06 Yao Qi <yao.qi@linaro.org>
15572
15573 * x86-linux-nat.h: Include gdb_proc_service.h.
15574
15575 2017-01-06 Yao Qi <yao.qi@linaro.org>
15576
15577 * ser-base.h: Include serial.h.
15578
15579 2017-01-06 Yao Qi <yao.qi@linaro.org>
15580
15581 * ppc-linux-tdep.h: Include ppc-tdep.h.
15582
15583 2017-01-06 Yao Qi <yao.qi@linaro.org>
15584
15585 * nat/amd64-linux-siginfo.h: Include signal.h.
15586
15587 2017-01-06 Yao Qi <yao.qi@linaro.org>
15588
15589 * nat/aarch64-linux-hw-point.h: Include break-common.h.
15590
15591 2017-01-06 Yao Qi <yao.qi@linaro.org>
15592
15593 * mi/mi-parse.h: Include mi-cmds.h.
15594
15595 2017-01-06 Yao Qi <yao.qi@linaro.org>
15596
15597 * inf-loop.c: Don't include "target.h".
15598 * inf-loop.h: Include it here.
15599
15600 2017-01-06 Yao Qi <yao.qi@linaro.org>
15601
15602 * dfp.h: Include "dboulest.h" and "expression.h".
15603
15604 2017-01-06 Yao Qi <yao.qi@linaro.org>
15605
15606 * ax-gdb.h: Include "ax.h".
15607
15608 2017-01-06 Yao Qi <yao.qi@linaro.org>
15609
15610 * Makefile.in (HFILES_NO_SRCDIR): Replace gdb_ptrace.h
15611 with nat/gdb_ptrace.h.
15612
15613 2017-01-05 Yao Qi <yao.qi@linaro.org>
15614
15615 * mips-fbsd-tdep.c (mips_fbsd_sigframe_init): Move && to
15616 new line.
15617 (mips64_fbsd_sigframe_init): Likewise.
15618
15619 2017-01-04 John Baldwin <jhb@FreeBSD.org>
15620
15621 * mips-fbsd-tdep.c (_initialize_mips_fbsd_tdep): Use
15622 GDB_OSABI_FREEBSD instead of GDB_OSABI_FREEBSD_ELF.
15623
15624 2017-01-04 John Baldwin <jhb@FreeBSD.org>
15625
15626 * Makefile.in (ALLDEPFILES): Add mips-fbsd-nat.c.
15627 * NEWS: Mention new FreeBSD/mips native configuration.
15628 * config/mips/fbsd.mh: New file.
15629 * configure.host: Add mips*-*-freebsd*.
15630 * mips-fbsd-nat.c: New file.
15631
15632 2017-01-04 John Baldwin <jhb@FreeBSD.org>
15633
15634 * Makefile.in (ALL_TARGET_OBS): Add mips-fbsd-tdep.o.
15635 (ALLDEPFILES): Add mips-fbsd-tdep.c.
15636 * NEWS: Mention new FreeBSD/mips target.
15637 * configure.tgt: Add mips*-*-freebsd*.
15638 * mips-fbsd-tdep.c: New file.
15639 * mips-fbsd-tdep.h: New file.
15640
15641 2017-01-04 Yao Qi <yao.qi@linaro.org>
15642
15643 * dwarf2loc.c (write_pieced_value): Don't use VALUE_FRAME_ID (to),
15644 use c->frame_id when the piece location is DWARF_VALUE_REGISTER.
15645
15646 2017-01-01 Joel Brobecker <brobecker@adacore.com>
15647
15648 Update copyright year range in all GDB files.
15649
15650 2017-01-01 Joel Brobecker <brobecker@adacore.com>
15651
15652 * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2016.
15653
15654 For older changes see ChangeLog-2016.
15655 \f
15656 Local Variables:
15657 mode: change-log
15658 left-margin: 8
15659 fill-column: 74
15660 version-control: never
15661 coding: utf-8
15662 End: