1 2017-11-08 Joel Brobecker <brobecker@adacore.com>
3 * ada-exp.y (write_var_from_sym): Remove parameter
4 "orig_left_context". Update all callers.
6 2017-11-08 Simon Marchi <simon.marchi@ericsson.com>
8 * tracepoint.h (class collection_list) <stringify>: Return
9 std::vector<std::string>.
10 (encode_actions_rsp): Change parameters to
11 std::vector<std::string> *.
12 * tracepoint.c (collection_list::stringify): Return
13 std::vector<std::string> and adjust accordingly.
14 (encode_actions_rsp): Changee parameters to
15 std::vector<std::string> and adjust accordingly.
16 * remote.c (free_actions_list),
17 free_actions_list_cleanup_wrapper): Remove.
18 (remote_download_tracepoint): Adjust to std::vector.
20 2017-11-08 Tom Tromey <tom@tromey.com>
22 * dwarf2read.c (symbolp): Remove typedef.
23 (read_func_scope): Use std::vector.
24 (process_structure_scope): Use std::vector.
26 2017-11-08 Pedro Alves <palves@redhat.com>
28 * ada-lang.c (ada_make_symbol_completion_list): Use
29 completion_skip_symbol.
30 * symtab.c (symbol_is_function_or_method(minimal_symbol*)): New.
31 (symbol_is_function_or_method(symbol*)): New.
32 (add_symtab_completions): Add complete_symbol_mode parameter. Use
33 completion_skip_symbol.
34 (default_collect_symbol_completion_matches_break_on): Use
35 completion_skip_symbol. Pass down mode.
36 (collect_file_symbol_completion_matches): Pass down mode.
37 * symtab.h (symbol_is_function_or_method): New declarations.
38 (completion_skip_symbol): New template function.
40 2017-11-08 Pedro Alves <palves@redhat.com>
42 * linespec.c (iterate_over_all_matching_symtabs): Add
43 search_domain parameter. Pass it down to expand_symtabs_matching.
44 (decode_objc): Request FUNCTIONS_DOMAIN symbols only.
45 (lookup_prefix_sym): Adjust by passing ALL_DOMAIN as
47 (add_all_symbol_names_from_pspace): Add search_domain parameter.
49 (find_method, find_function_symbols): Request FUNCTIONS_DOMAIN
51 (add_matching_symbols_to_info): Add search_domain parameter. Pass
54 2017-11-08 Pedro Alves <palves@redhat.com>
56 * ada-lang.c (ada_make_symbol_completion_list): Remove text and
57 text_len locals and don't pass them down.
58 * symtab.c (completion_list_add_name): Remove
59 sym_text/sym_text_len parameters and adjust.
60 (completion_list_add_symbol, completion_list_add_msymbol)
61 (completion_list_objc_symbol, completion_list_add_fields)
62 (add_symtab_completions): Likewise.
63 (default_collect_symbol_completion_matches_break_on)
64 (collect_file_symbol_completion_matches): Remove sym_text_len
65 local and don't pass it down.
66 * symtab.h (completion_list_add_name): Remove
67 sym_text/sym_text_len parameters.
69 2017-11-08 Pedro Alves <palves@redhat.com>
71 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
72 unittests/lookup_name_info-selftests.c.
73 (SUBDIR_UNITTESTS_OBS): Add lookup_name_info-selftests.o.
74 * cp-support.c: Include "selftest.h".
75 (cp_remove_params_1): Rename from cp_remove_params. Add
76 'require_param' parameter, and handle it.
77 (cp_remove_params): Reimplement.
78 (cp_remove_params_if_any): New.
79 (selftests::quote): New.
80 (selftests::check_remove_params): New.
81 (selftests::test_cp_remove_params): New.
82 (_initialize_cp_support): Install
83 selftests::test_cp_remove_params.
84 * cp-support.h (cp_remove_params_if_any): Declare.
85 * dwarf2read.c :Include "selftest.h".
86 (dw2_expand_symtabs_matching_symbol): Use
87 lookup_name_info::make_ignore_params.
88 (selftests::dw2_expand_symtabs_matching::mock_mapped_index)
89 (selftests::dw2_expand_symtabs_matching::string_or_null)
90 (selftests::dw2_expand_symtabs_matching::check_match)
91 (selftests::dw2_expand_symtabs_matching::test_symbols)
92 (selftests::dw2_expand_symtabs_matching::run_test): New.
93 (_initialize_dwarf2_read): Register
94 selftests::dw2_expand_symtabs_matching::run_test.
95 * psymtab.c (psym_expand_symtabs_matching): Use
96 lookup_name_info::make_ignore_params.
97 * symtab.c (demangle_for_lookup_info::demangle_for_lookup_info):
98 If the lookup name wants to ignore parameters, strip them.
99 (compare_symbol_name): Remove sym_text/sym_text_len parameters and
101 (completion_list_add_name): Don't pass down sym_text/sym_text_len.
102 (default_collect_symbol_completion_matches_break_on): Don't try to
104 * symtab.h (lookup_name_info::lookup_name_info): Add
105 'ignore_parameters' parameter.
106 (lookup_name_info::ignore_parameters)
107 (lookup_name_info::make_ignore_params): New methods.
108 (lookup_name_info::m_ignore_parameters): New field.
109 * unittests/lookup_name_info-selftests.c: New file.
111 2017-11-08 Pedro Alves <palves@redhat.com>
113 * dwarf2read.c (dw2_expand_marked_cus)
114 (dw2_expand_symtabs_matching_symbol): Remove forward declarations.
115 (dw2_expand_symtabs_matching): Move further below.
116 (dw2_expand_marked_cus): Reindent.
118 2017-11-08 Pedro Alves <palves@redhat.com>
120 * dwarf2read.c (byte_swap, MAYBE_SWAP): Move higher up in file.
121 (struct name_component): New.
122 (mapped_index::name_components): New field.
123 (mapped_index::symbol_name_at): New method.
124 (dwarf2_read_index): Call mapped_index ctor.
125 (dw2_map_matching_symbols): Add comment about name_components
127 (dw2_expand_symtabs_matching): Factor part to...
128 (dw2_expand_symtabs_matching_symbol): ... this new function.
129 Build name components table, and lookup symbols in it before
130 calling the name matcher.
131 (dw2_expand_marked_cus): New, factored out from
132 dw2_expand_symtabs_matching.
133 (dwarf2_per_objfile_free): Call the mapped_index's dtor.
135 2017-11-08 Pedro Alves <palves@redhat.com>
137 * ada-lang.c (ada_encode): Rename to ..
138 (ada_encode_1): ... this. Add throw_errors parameter and handle
140 (ada_encode): Reimplement.
141 (match_name): Delete, folded into full_name.
142 (resolve_subexp): No longer pass the encoded name to
143 ada_lookup_symbol_list.
144 (should_use_wild_match): Delete.
145 (name_match_type_from_name): New.
146 (ada_lookup_simple_minsym): Use lookup_name_info and the
147 language's symbol_name_matcher_ftype.
148 (add_symbols_from_enclosing_procs, ada_add_local_symbols)
149 (ada_add_block_renamings): Adjust to use lookup_name_info.
150 (ada_lookup_name): New.
151 (add_nonlocal_symbols, ada_add_all_symbols)
152 (ada_lookup_symbol_list_worker, ada_lookup_symbol_list)
153 (ada_iterate_over_symbols): Adjust to use lookup_name_info.
154 (ada_name_for_lookup): Delete.
155 (ada_lookup_encoded_symbol): Construct a verbatim name.
156 (wild_match): Reverse sense of return type. Use bool.
157 (full_match): Reverse sense of return type. Inline bits of old
159 (ada_add_block_symbols): Adjust to use lookup_name_info.
160 (symbol_completion_match): Delete, folded into...
161 (ada_lookup_name_info::matches): ... .this new method.
162 (symbol_completion_add): Delete.
163 (ada_collect_symbol_completion_matches): Add name_match_type
164 parameter. Adjust to use lookup_name_info and
165 completion_list_add_name.
166 (get_var_value, ada_add_global_exceptions): Adjust to use
168 (ada_get_symbol_name_cmp): Delete.
169 (do_wild_match, do_full_match): New functions.
170 (ada_lookup_name_info::ada_lookup_name_info): New method.
171 (ada_symbol_name_matches, ada_get_symbol_name_matcher): New
173 (ada_language_defn): Install ada_get_symbol_name_matcher.
174 * ada-lex.l (processId): If name starts with '<', copy it
176 * block.c (block_iter_match_step, block_iter_match_first)
177 (block_iter_match_next, block_lookup_symbol)
178 (block_lookup_symbol_primary, block_find_symbol): Adjust to use
180 * block.h (block_iter_match_first, block_iter_match_next)
181 (ALL_BLOCK_SYMBOLS_WITH_NAME): Adjust to use lookup_name_info.
182 * c-lang.c (c_language_defn, cplus_language_defn)
183 (asm_language_defn, minimal_language_defn): Adjust comments to
184 refer to la_get_symbol_name_matcher.
185 * completer.c (complete_files_symbols)
186 (collect_explicit_location_matches, symbol_completer): Pass a
187 symbol_name_match_type down.
188 * completer.h (class completion_match, completion_match_result):
190 (completion_tracker::reset_completion_match_result): New method.
191 (completion_tracker::m_completion_match_result): New field.
192 * cp-support.c (make_symbol_overload_list_block): Adjust to use
194 (cp_fq_symbol_name_matches, cp_get_symbol_name_matcher): New
196 * cp-support.h (cp_get_symbol_name_matcher): New declaration.
197 * d-lang.c: Adjust comments to refer to
198 la_get_symbol_name_matcher.
199 * dictionary.c (dict_vector) <iter_match_first, iter_match_next>:
200 Adjust to use lookup_name_info.
201 (dict_iter_match_first, dict_iter_match_next)
202 (iter_match_first_hashed, iter_match_next_hashed)
203 (iter_match_first_linear, iter_match_next_linear): Adjust to work
204 with a lookup_name_info.
205 * dictionary.h (dict_iter_match_first, dict_iter_match_next):
207 * dwarf2read.c (dw2_lookup_symbol): Adjust to use lookup_name_info.
208 (dw2_map_matching_symbols): Adjust to use symbol_name_match_type.
209 (gdb_index_symbol_name_matcher): New class.
210 (dw2_expand_symtabs_matching) Adjust to use lookup_name_info and
211 gdb_index_symbol_name_matcher. Accept a NULL symbol_matcher.
212 * f-lang.c (f_collect_symbol_completion_matches): Adjust to work
213 with a symbol_name_match_type.
214 (f_language_defn): Adjust comments to refer to
215 la_get_symbol_name_matcher.
216 * go-lang.c (go_language_defn): Adjust comments to refer to
217 la_get_symbol_name_matcher.
218 * language.c (default_symbol_name_matcher)
219 (language_get_symbol_name_matcher): New functions.
220 (unknown_language_defn, auto_language_defn): Adjust comments to
221 refer to la_get_symbol_name_matcher.
222 * language.h (symbol_name_cmp_ftype): Delete.
223 (language_defn) <la_collect_symbol_completion_matches>: Add match
225 <la_get_symbol_name_cmp>: Delete field.
226 <la_get_symbol_name_matcher>: New field.
227 <la_iterate_over_symbols>: Adjust to use lookup_name_info.
228 (default_symbol_name_matcher, language_get_symbol_name_matcher):
230 * linespec.c (iterate_over_all_matching_symtabs)
231 (iterate_over_file_blocks): Adjust to use lookup_name_info.
232 (find_methods): Add language parameter, and use lookup_name_info
233 and the language's symbol_name_matcher_ftype.
234 (linespec_complete_function): Adjust.
235 (lookup_prefix_sym): Use lookup_name_info.
236 (add_all_symbol_names_from_pspace): Adjust.
237 (find_superclass_methods): Add language parameter and pass it
239 (find_method): Pass symbol language down.
240 (find_linespec_symbols): Don't demangle or Ada encode here.
241 (search_minsyms_for_name): Add lookup_name_info parameter.
242 (add_matching_symbols_to_info): Add name_match_type parameter.
243 Use lookup_name_info.
244 * m2-lang.c (m2_language_defn): Adjust comments to refer to
245 la_get_symbol_name_matcher.
246 * minsyms.c: Include <algorithm>.
247 (add_minsym_to_demangled_hash_table): Remove table parameter and
248 add objfile parameter. Use search_name_hash, and add language to
249 demangled languages vector.
250 (struct found_minimal_symbols): New struct.
251 (lookup_minimal_symbol_mangled, lookup_minimal_symbol_demangled):
253 (lookup_minimal_symbol): Adjust to use them. Don't canonicalize
254 input names here. Use lookup_name_info instead. Lookup up
255 demangled names once for each language in the demangled names
257 (iterate_over_minimal_symbols): Use lookup_name_info. Lookup up
258 demangled names once for each language in the demangled names
260 (build_minimal_symbol_hash_tables): Adjust.
261 * minsyms.h (iterate_over_minimal_symbols): Adjust to pass down a
263 * objc-lang.c (objc_language_defn): Adjust comment to refer to
264 la_get_symbol_name_matcher.
265 * objfiles.h: Include <vector>.
266 (objfile_per_bfd_storage) <demangled_hash_languages>: New field.
267 * opencl-lang.c (opencl_language_defn): Adjust comment to refer to
268 la_get_symbol_name_matcher.
269 * p-lang.c (pascal_language_defn): Adjust comment to refer to
270 la_get_symbol_name_matcher.
271 * psymtab.c (psym_lookup_symbol): Use lookup_name_info.
272 (match_partial_symbol): Use symbol_name_match_type,
273 lookup_name_info and psymbol_name_matches.
274 (lookup_partial_symbol): Use lookup_name_info.
275 (map_block): Use symbol_name_match_type and lookup_name_info.
276 (psym_map_matching_symbols): Use symbol_name_match_type.
277 (psymbol_name_matches): New.
278 (recursively_search_psymtabs): Use lookup_name_info and
279 psymbol_name_matches. Rename 'kind' parameter to 'domain'.
280 (psym_expand_symtabs_matching): Use lookup_name_info. Rename
281 'kind' parameter to 'domain'.
282 * rust-lang.c (rust_language_defn): Adjust comment to refer to
283 la_get_symbol_name_matcher.
284 * symfile-debug.c (debug_qf_map_matching_symbols)
285 (debug_qf_map_matching_symbols): Use symbol_name_match_type.
286 (debug_qf_expand_symtabs_matching): Use lookup_name_info.
287 * symfile.c (expand_symtabs_matching): Use lookup_name_info.
288 * symfile.h (quick_symbol_functions) <map_matching_symbols>:
289 Adjust to use symbol_name_match_type.
290 <expand_symtabs_matching>: Adjust to use lookup_name_info.
291 (expand_symtabs_matching): Adjust to use lookup_name_info.
292 * symmisc.c (maintenance_expand_symtabs): Use
293 lookup_name_info::match_any ().
294 * symtab.c (symbol_matches_search_name): New.
295 (eq_symbol_entry): Adjust to use lookup_name_info and the
297 (demangle_for_lookup_info::demangle_for_lookup_info): New.
298 (lookup_name_info::match_any): New.
299 (iterate_over_symbols, search_symbols): Use lookup_name_info.
300 (compare_symbol_name): Add language, lookup_name_info and
301 completion_match_result parameters, and use them.
302 (completion_list_add_name): Make extern. Add language and
303 lookup_name_info parameters. Use them.
304 (completion_list_add_symbol, completion_list_add_msymbol)
305 (completion_list_objc_symbol): Add lookup_name_info parameters and
306 adjust. Pass down language.
307 (completion_list_add_fields): Add lookup_name_info parameters and
308 adjust. Pass down language.
309 (add_symtab_completions): Add lookup_name_info parameters and
311 (default_collect_symbol_completion_matches_break_on): Add
312 name_match_type parameter, and use it. Use lookup_name_info.
313 (default_collect_symbol_completion_matches)
314 (collect_symbol_completion_matches): Add name_match_type
315 parameter, and pass it down.
316 (collect_symbol_completion_matches_type): Adjust.
317 (collect_file_symbol_completion_matches): Add name_match_type
318 parameter, and use lookup_name_info.
319 * symtab.h: Include <string> and "common/gdb_optional.h".
320 (enum class symbol_name_match_type): New.
321 (class ada_lookup_name_info): New.
322 (struct demangle_for_lookup_info): New.
323 (class lookup_name_info): New.
324 (symbol_name_matcher_ftype): New.
325 (SYMBOL_MATCHES_SEARCH_NAME): Use symbol_matches_search_name.
326 (symbol_matches_search_name): Declare.
327 (MSYMBOL_MATCHES_SEARCH_NAME): Delete.
328 (default_collect_symbol_completion_matches)
329 (collect_symbol_completion_matches)
330 (collect_file_symbol_completion_matches): Add name_match_type
332 (iterate_over_symbols): Use lookup_name_info.
333 (completion_list_add_name): Declare.
334 * utils.c (enum class strncmp_iw_mode): Moved to utils.h.
335 (strncmp_iw_with_mode): Now extern.
336 * utils.h (enum class strncmp_iw_mode): Moved from utils.c.
337 (strncmp_iw_with_mode): Declare.
339 2017-11-08 Keith Seitz <keiths@redhat.com>
340 Pedro Alves <palves@redhat.com>
342 * ada-lang.c (ada_language_defn): Install
343 default_search_name_hash.
344 * buildsym.c (struct buildsym_compunit): <language>: New field.
345 (finish_block_internal): Pass language when creating dictionaries.
346 (start_buildsym_compunit, start_symtab): New language parameters.
348 (restart_symtab): Pass down compilation unit's language.
349 * buildsym.h (enum language): Forward declare.
350 (start_symtab): New 'language' parameter.
351 * c-lang.c (c_language_defn, cplus_language_defn)
352 (asm_language_defn, minimal_language_defn): Install
353 default_search_name_hash.
354 * coffread.c (coff_start_symtab): Adjust.
355 * d-lang.c (d_language_defn): Install default_search_name_hash.
356 * dbxread.c (struct symloc): Add 'pst_language' field.
357 (PST_LANGUAGE): Define.
358 (start_psymtab, read_ofile_symtab): Use it.
359 (process_one_symbol): New 'language' parameter. Pass it down.
360 * dictionary.c (struct dictionary) <language>: New field.
361 (DICT_LANGUAGE): Define.
362 (dict_create_hashed, dict_create_hashed_expandable)
363 (dict_create_linear, dict_create_linear_expandable): New parameter
364 'language'. Set the dictionary's language.
365 (iter_match_first_hashed): Adjust to rename.
366 (insert_symbol_hashed): Assert we don't see mismatching
367 languages. Adjust to rename.
368 (dict_hash): Rename to ...
369 (default_search_name_hash): ... this and make extern.
370 * dictionary.h (struct language_defn): Forward declare.
371 (dict_create_hashed): New parameter 'language'.
372 * dwarf2read.c (dwarf2_start_symtab): Pass down language.
373 * f-lang.c (f_language_defn): Install default_search_name_hash.
374 * go-lang.c (go_language_defn): Install default_search_name_hash.
375 * jit.c (finalize_symtab): Pass compunit's language to dictionary
377 * language.c (unknown_language_defn, auto_language_defn):
378 * language.h (language_defn::la_search_name_hash): New field.
379 (default_search_name_hash): Declare.
380 * m2-lang.c (m2_language_defn): Install default_search_name_hash.
381 * mdebugread.c (new_block): New parameter 'language'.
382 * mdebugread.c (parse_symbol): Pass symbol language to block
384 (psymtab_to_symtab_1): Pass down language.
385 (new_symtab): Pass compunit's language to block allocation.
386 * objc-lang.c (objc_language_defn): Install
387 default_search_name_hash.
388 * opencl-lang.c (opencl_language_defn):
389 * p-lang.c (pascal_language_defn): Install
390 default_search_name_hash.
391 * rust-lang.c (rust_language_defn): Install
392 default_search_name_hash.
393 * stabsread.h (enum language): Forward declare.
394 (process_one_symbol): Add 'language' parameter.
395 * symtab.c (search_name_hash): New function.
396 * symtab.h (search_name_hash): Declare.
397 * xcoffread.c (read_xcoff_symtab): Pass language to start_symtab.
399 2017-11-08 Pedro Alves <palves@redhat.com>
401 * cp-name-parser.y (main): Don't initialize extra_chars.
403 2017-11-07 Tom Tromey <tom@tromey.com>
405 * event-top.h (command_handler): Constify.
406 * record-full.c (cmd_record_full_start): Update.
407 * thread.c (thread_apply_all_command): Update.
408 * printcmd.c (eval_command): Update.
409 * mi/mi-main.c (mi_execute_cli_command): Update.
410 (mi_execute_async_cli_command): Update.
411 * tui/tui-stack.c (tui_update_command): Update.
412 * cli/cli-interp.c (safe_execute_command): Constify.
413 * record.c (record_start): Update.
414 (record_start, record_stop, cmd_record_start): Update.
415 * record-btrace.c (cmd_record_btrace_bts_start): Update.
416 (cmd_record_btrace_pt_start): Update.
417 (cmd_record_btrace_start): Update.
418 (cmd_record_btrace_start): Update.
419 * reverse.c (exec_reverse_once): Update.
420 * python/python.c (execute_gdb_command): Don't copy the command.
421 * event-top.c (command_line_handler): Update.
422 (command_handler): Constify.
423 * defs.h (deprecated_call_command_hook): Constify.
424 * cli/cli-script.h (execute_user_command): Constify.
425 * cli/cli-script.c (execute_user_command): Constify.
426 (execute_cmd_pre_hook, execute_cmd_post_hook): Constify.
427 (enum command_control_type): Update.
428 * main.c (catch_command_errors): Remove non-const overload.
429 (catch_command_errors_ftype): Remove.
430 * python/py-cmd.c (cmdpy_function): Constify.
431 * guile/scm-cmd.c (cmdscm_function): Constify.
432 * cli/cli-dump.c (call_dump_func): Constify.
433 * cli/cli-decode.c (do_const_cfunc): Constify.
434 (do_sfunc): Constify.
435 (cmd_func): Constify.
436 * gdbcmd.h (execute_command, execute_command_to_string): Constify.
437 * top.h (execute_command): Constify.
438 * top.c (execute_command): Constify.
439 (execute_command_to_string): Constify.
440 (deprecated_call_command_hook): Constify.
441 * command.h (cmd_func): Constify.
442 * cli/cli-decode.h (struct cmd_list_element) <func>: Constify.
444 2017-11-07 Tom Tromey <tom@tromey.com>
446 * ada-lang.c (catch_ada_exception_command): Constify.
447 (catch_assert_command): Constify.
448 * break-catch-throw.c (catch_catch_command, catch_throw_command)
449 (catch_rethrow_command): Constify.
450 (catch_exception_command_1): Constify.
451 * breakpoint.h (add_catch_command): Constify.
452 * break-catch-syscall.c (catch_syscall_command_1): Constify.
453 (catch_syscall_split_args): Constify.
454 * break-catch-sig.c (catch_signal_command): Constify.
455 (catch_signal_split_args): Constify.
456 * cli/cli-decode.h (struct cmd_list_element) <function>: Use
457 cmd_const_sfunc_ftype.
458 * cli/cli-decode.c (add_setshow_cmd_full): Constify.
459 (add_setshow_enum_cmd, add_setshow_auto_boolean_cmd)
460 (add_setshow_boolean_cmd, add_setshow_filename_cmd)
461 (add_setshow_string_cmd, struct cmd_list_element)
462 (add_setshow_optional_filename_cmd, add_setshow_integer_cmd)
463 (add_setshow_uinteger_cmd, add_setshow_zinteger_cmd)
464 (add_setshow_zuinteger_unlimited_cmd, add_setshow_zuinteger_cmd):
466 (set_cmd_sfunc): Constify.
467 (empty_sfunc): Constify.
468 * command.h (add_setshow_enum_cmd, add_setshow_auto_boolean_cmd)
469 (add_setshow_boolean_cmd, add_setshow_filename_cmd)
470 (add_setshow_string_cmd, add_setshow_string_noescape_cmd)
471 (add_setshow_optional_filename_cmd, add_setshow_integer_cmd)
472 (add_setshow_uinteger_cmd, add_setshow_zinteger_cmd)
473 (add_setshow_zuinteger_cmd, add_setshow_zuinteger_unlimited_cmd):
475 (set_cmd_sfunc): Constify.
476 (cmd_sfunc_ftype): Remove.
477 * compile/compile.c (set_compile_args): Constify.
478 * infrun.c (set_disable_randomization): Constify.
479 * infcmd.c (set_args_command, set_cwd_command): Constify.
480 * breakpoint.c (set_condition_evaluation_mode): Constify.
481 (add_catch_command): Constify.
482 (catch_fork_command_1, catch_exec_command_1)
483 (catch_load_command_1, catch_unload_command_1): Constify.
484 (catch_load_or_unload): Constify.
485 * guile/scm-param.c (pascm_set_func): Constify.
486 (add_setshow_generic): Constify.
487 * python/py-param.c (get_set_value): Constify.
488 * top.h (set_verbose): Constify.
489 * tui/tui-win.c (tui_set_var_cmd): Constify.
490 * mi/mi-main.c (set_mi_async_command): Constify.
491 * cli/cli-logging.c (set_logging_overwrite)
492 (set_logging_redirect): Constify.
493 * value.c (set_max_value_size): Constify.
494 * valprint.c (set_input_radix, set_output_radix): Constify.
495 * utils.c (set_width_command, set_height_command): Constify.
496 * typeprint.c (set_print_type_methods, set_print_type_typedefs): Constify.
497 * tracepoint.c (set_disconnected_tracing)
498 (set_circular_trace_buffer, set_trace_buffer_size)
499 (set_trace_user, set_trace_notes, set_trace_stop_notes): Constify.
500 * top.c (set_history_size_command, set_verbose, set_editing)
501 (set_gdb_datadir, set_history_filename): Constify.
502 * target.c (set_targetdebug, maint_set_target_async_command)
503 (maint_set_target_non_stop_command, set_target_permissions)
504 (set_write_memory_permission): Constify.
505 (open_target): Constify.
506 * target-descriptions.c (set_tdesc_filename_cmd): Constify.
507 * target-dcache.c (set_stack_cache, set_code_cache): Constify.
508 * symtab.c (set_symbol_cache_size_handler): Constify.
509 * symfile.c (set_ext_lang_command): Constify.
510 * symfile-debug.c (set_debug_symfile): Constify.
511 * source.c (set_directories_command): Constify.
512 * solib.c (reload_shared_libraries, gdb_sysroot_changed): Constify.
513 * serial.c (set_parity): Constify.
514 * rs6000-tdep.c (powerpc_set_soft_float, powerpc_set_vector_abi): Constify.
515 * remote.c (set_remote_exec_file, set_remotebreak)
516 (set_remote_protocol_Z_packet_cmd, set_range_stepping): Constify.
517 * record.c (set_record_insn_history_size)
518 (set_record_call_history_size): Constify.
519 * record-full.c (set_record_full_insn_max_num): Constify.
520 * proc-api.c (set_procfs_trace_cmd, set_procfs_file_cmd): Constify.
521 * osabi.c (set_osabi): Constify.
522 * mips-tdep.c (set_mips64_transfers_32bit_regs)
523 (reinit_frame_cache_sfunc, mips_abi_update): Constify.
524 * maint.c (maintenance_set_profile_cmd): Constify.
525 * linux-thread-db.c (set_libthread_db_search_path): Constify.
526 * language.c (set_language_command, set_range_command)
527 (set_case_command): Constify.
528 * infrun.c (set_non_stop, set_observer_mode)
529 (set_stop_on_solib_events, set_schedlock_func)
530 (set_exec_direction_func): Constify.
531 * infcmd.c (set_inferior_tty_command): Constify.
532 * disasm.c (set_disassembler_options_sfunc): Constify.
533 * demangle.c (set_demangling_command): Constify.
534 * dcache.c (set_dcache_size, set_dcache_line_size): Constify.
535 * cris-tdep.c (set_cris_version, set_cris_mode)
536 (set_cris_dwarf2_cfi): Constify.
537 * corefile.c (set_gnutarget_command): Constify.
538 * charset.c (set_host_charset_sfunc, set_target_charset_sfunc)
539 (set_target_wide_charset_sfunc): Constify.
540 * breakpoint.c (update_dprintf_commands): Constify.
541 * auto-load.c (set_auto_load_dir, set_auto_load_safe_path): Constify.
542 * arm-tdep.c (set_fp_model_sfunc, arm_set_abi)
543 (set_disassembly_style_sfunc): Constify.
544 * arch-utils.c (set_endian, set_architecture): Constify.
545 * alpha-tdep.c (reinit_frame_cache_sfunc): Constify.
546 * agent.c (set_can_use_agent): Constify.
548 2017-11-07 Tom Tromey <tom@tromey.com>
550 * go32-nat.c (go32_sysinfo, go32_sldt, go32_sgdt, go32_sidt)
551 (go32_pde, go32_pte, go32_pte_for_address): Constify.
552 * gnu-nat.c (_parse_bool_arg, show_thread_default_pause_cmd)
553 (set_thread_default_pause_cmd, set_thread_default_run_cmd)
554 (show_thread_default_run_cmd, set_thread_default_detach_sc_cmd)
555 (parse_int_arg, show_thread_default_detach_sc_cmd)
556 (set_signals_cmd, show_signals_cmd, set_sig_thread_cmd)
557 (show_sig_thread_cmd, set_stopped_cmd, show_stopped_cmd)
558 (set_exceptions_cmd, show_exceptions_cmd, set_task_pause_cmd)
559 (show_task_pause_cmd, set_task_detach_sc_cmd)
560 (show_task_detach_sc_cmd, set_task_exc_port_cmd)
561 (set_noninvasive_cmd, set_thread_pause_cmd)
562 (show_thread_pause_cmd, set_thread_run_cmd, show_thread_run_cmd)
563 (set_thread_detach_sc_cmd, show_thread_detach_sc_cmd)
564 (set_thread_exc_port_cmd, thread_takeover_sc_cmd): Constify.
565 * windows-nat.c (display_selectors): Constify.
566 * cli/cli-decode.h (struct cmd_list_element) <function>: Remove
568 * cli/cli-decode.c (set_cmd_cfunc): Remove non-const overload.
569 (cmd_cfunc_eq): Likewise.
570 (struct cmd_list_element): Likewise.
572 (cli_user_command_p): Update.
573 * command.h (add_cmd): Remove non-const overload.
574 (cmd_cfunc_ftype): Remove typedef.
575 (cmd_cfunc_eq): Remove non-const overload.
576 * value.c (show_values): Constify.
577 * thread.c (thread_apply_all_command): Constify.
578 * symfile.c (load_command): Constify.
579 * source.c (directory_command): Constify.
580 * maint.c (maintenance_internal_error)
581 (maintenance_demangler_warning, maintenance_space_display)
582 (maintenance_print_architecture, maintenance_translate_address)
583 (maintenance_info_selftests, maintenance_internal_warning):
585 * breakpoint.c (disable_trace_command, enable_trace_command):
587 * auto-load.c (info_auto_load_local_gdbinit, add_auto_load_dir):
589 (add_auto_load_safe_path): Constify.
590 * guile/scm-auto-load.c (info_auto_load_guile_scripts): Constify.
591 * top.h (show_commands): Constify.
592 * linux-thread-db.c (info_auto_load_libthread_db): Constify.
593 * sparc64-tdep.c (adi_examine_command): Constify.
594 (adi_assign_command): Constify.
596 2017-11-07 Tom Tromey <tom@tromey.com>
598 * frame.h (info_locals_command, info_args_command): Constify.
599 * auto-load.h (auto_load_info_scripts): Constify.
600 * inferior.h (registers_info): Constify.
601 * copying.c: Rebuild.
602 * copying.awk: Constify generated commands.
603 * auto-load.c (auto_load_info_scripts)
604 (info_auto_load_gdb_scripts): Constify.
605 * cli/cli-decode.c (struct cmd_list_element): Take a
606 cmd_const_cfunc_ftype.
607 * command.h (add_info): Take a cmd_const_cfunc_ftype.
608 * tui/tui-win.c (tui_all_windows_info): Constify.
609 * python/py-auto-load.c (info_auto_load_python_scripts):
611 * cli/cli-cmds.c (show_command): Remove non-const overload.
612 * tracepoint.c (info_tvariables_command, info_scope_command):
614 (info_static_tracepoint_markers_command): Constify.
615 * thread.c (info_threads_command): Constify.
616 (print_thread_info_1): Constify.
617 * target.c (info_target_command): Constify.
618 * symtab.c (info_sources_command, info_functions_command)
619 (info_types_command): Constify.
620 (info_variables_command): Remove non-const overload.
621 * symfile.c (info_ext_lang_command): Constify.
622 * stack.c (info_frame_command, info_locals_command)
623 (info_args_command): Constify.
624 (backtrace_command): Remove non-const overload.
625 * source.c (info_source_command, info_line_command): Constify.
626 * solib.c (info_sharedlibrary_command): Constify.
627 * skip.c (info_skip_command): Constify.
628 * ser-go32.c (info_serial_command): Constify.
629 * reverse.c (info_bookmarks_command): Constify.
630 * printcmd.c (info_symbol_command, info_address_command)
631 (info_display_command): Constify.
632 * osdata.c (info_osdata_command): Constify.
633 * objc-lang.c (info_selectors_command, info_classes_command):
635 * nto-procfs.c (procfs_pidlist, procfs_meminfo): Constify.
636 * memattr.c (info_mem_command): Constify.
637 * macrocmd.c (info_macro_command, info_macros_command): Constify.
638 * linux-fork.c (info_checkpoints_command): Constify.
639 * infrun.c (info_signals_command): Constify.
640 * inflow.c (info_terminal_command): Constify.
641 * inferior.c (info_inferiors_command): Constify.
642 (print_inferior): Constify.
643 * infcmd.c (info_program_command, info_all_registers_command)
644 (info_registers_command, info_vector_command)
645 (info_float_command): Constify.
646 (registers_info): Constify.
647 * gnu-nat.c (info_send_rights_cmd, info_recv_rights_cmd)
648 (info_port_sets_cmd, info_dead_names_cmd, info_port_rights_cmd):
650 * f-valprint.c (info_common_command): Constify.
651 * dcache.c (info_dcache_command): Constify.
652 (dcache_info_1): Constify.
653 * darwin-nat-info.c (info_mach_tasks_command)
654 (info_mach_task_command, info_mach_ports_command)
655 (info_mach_port_command, info_mach_threads_command)
656 (info_mach_thread_command, info_mach_regions_command)
657 (info_mach_regions_recurse_command, info_mach_region_command)
658 (info_mach_exceptions_command): Constify.
659 (get_task_from_args): Constify.
660 * cp-support.c (info_vtbl_command): Constify.
661 * breakpoint.c (info_watchpoints_command)
662 (info_tracepoints_command): Constify.
663 (info_breakpoints_command): Remove non-const overload.
664 * avr-tdep.c (avr_io_reg_read_command): Constify.
665 * auxv.c (info_auxv_command): Constify.
666 * ada-tasks.c (info_tasks_command): Constify.
667 (info_task): Constify.
668 * ada-lang.c (info_exceptions_command): Constify.
670 2017-11-07 Tom Tromey <tom@tromey.com>
672 * solib.h (no_shared_libraries): Constify.
673 * frame.h (return_command): Constify.
674 * cli/cli-cmds.h (quit_command): Constify.
675 * top.h (quit_command, execute_command): Constify.
676 * target.h (flash_erase_command): Constify.
677 * inferior.h (set_inferior_args, attach_command): Constify.
678 * tracepoint.h (start_tracing, stop_tracing): Constify.
679 * breakpoint.h (break_command, tbreak_command)
680 (hbreak_command_wrapper, thbreak_command_wrapper)
681 (rbreak_command_wrapper, watch_command_wrapper)
682 (awatch_command_wrapper, rwatch_command_wrapper)
683 (get_tracepoint_by_number): Constify.
684 * symtab.c (info_variables_command, rbreak_command)
685 (symtab_symbol_info): Constify.
686 (info_variables_command): Add non-const overload.
687 * top.c (dont_repeat_command): Constify.
688 * breakpoint.c (ignore_command, commands_command)
689 (condition_command, tbreak_command, hbreak_command)
690 (thbreak_command, clear_command, break_command)
691 (info_breakpoints_command, watch_command, rwatch_command)
692 (awatch_command, trace_command, ftrace_command, strace_command)
693 (trace_pass_command, break_range_command, dprintf_command)
694 (agent_printf_command, get_tracepoint_by_number)
695 (watch_maybe_just_location, trace_pass_command): Constify.
696 (info_breakpoints_command): Add non-const overload.
697 * tracefile.c (tsave_command): Constify.
698 * infcmd.c (attach_command, disconnect_command, signal_command)
699 (queue_signal_command, stepi_command, nexti_command)
700 (finish_command, next_command, step_command, until_command)
701 (advance_command, jump_command, continue_command, run_command)
702 (start_command, starti_command, interrupt_command)
703 (run_command_1, set_inferior_args, step_1): Constify.
704 * inferior.c (add_inferior_command, remove_inferior_command)
705 (clone_inferior_command): Constify.
706 * linux-fork.c (checkpoint_command, restart_command): Constify.
707 * windows-nat.c (signal_event_command): Constify.
708 * guile/guile.c (guile_repl_command, guile_command): Constify.
709 * printcmd.c (x_command, display_command, printf_command)
710 (output_command, set_command, call_command, print_command)
711 (eval_command): Constify.
712 (non_const_set_command): Remove.
713 (_initialize_printcmd): Update.
714 * source.c (forward_search_command, reverse_search_command):
716 * jit.c (jit_reader_load_command, jit_reader_unload_command):
718 * infrun.c (handle_command): Constify.
719 * memattr.c (mem_command): Constify.
720 * stack.c (return_command, up_command, up_silently_command)
721 (down_command, down_silently_command, frame_command)
722 (backtrace_command, func_command, backtrace_command_1): Constify.
723 (backtrace_command): Add non-const overload.
724 * remote-sim.c (simulator_command): Constify.
725 * exec.c (set_section_command): Constify.
726 * tracepoint.c (tdump_command, trace_variable_command)
727 (tstatus_command, tstop_command, tstart_command)
728 (end_actions_pseudocommand, while_stepping_pseudocommand)
729 (collect_pseudocommand, teval_pseudocommand, actions_command)
730 (start_tracing, stop_tracing): Constify.
731 * value.c (init_if_undefined_command): Constify.
732 * tui/tui-stack.c (tui_update_command): Constify.
733 * tui/tui-win.c (tui_refresh_all_command)
734 (tui_set_tab_width_command, tui_set_win_height_command)
735 (tui_set_focus_command, tui_scroll_forward_command)
736 (tui_scroll_backward_command, tui_scroll_left_command)
737 (tui_scroll_right_command, parse_scrolling_args, tui_set_focus)
738 (tui_set_win_height): Constify.
739 * tui/tui-layout.c (tui_layout_command): Constify.
740 * procfs.c (proc_trace_syscalls, proc_trace_sysentry_cmd)
741 (proc_trace_sysexit_cmd, proc_untrace_sysentry_cmd)
742 (proc_untrace_sysexit_cmd): Constify.
743 * remote.c (threadlist_test_cmd, threadinfo_test_cmd)
744 (threadset_test_cmd, threadlist_update_test_cmd)
745 (threadalive_test): Constify.
746 * objc-lang.c (print_object_command): Constify.
747 * command.h (add_com): Constify.
748 * cli/cli-dump.c (restore_command): Constify.
749 * cli/cli-cmds.c (pwd_command, echo_command, quit_command)
750 (help_command, complete_command, shell_command, edit_command)
751 (list_command, disassemble_command, make_command)
752 (apropos_command, alias_command): Constify.
753 * cli/cli-script.c (document_command, define_command)
754 (while_command, if_command, validate_comname): Constify.
755 * cli/cli-decode.c (struct cmd_list_element): Change type of
757 * target.c (do_monitor_command, flash_erase_command): Constify.
758 * regcache.c (reg_flush_command): Constify.
759 * reverse.c (reverse_step, reverse_next, reverse_stepi)
760 (reverse_nexti, reverse_continue, reverse_finish)
761 (save_bookmark_command, goto_bookmark_command)
762 (exec_reverse_once): Constify.
763 * python/python.c (python_interactive_command, python_command):
765 * typeprint.c (ptype_command, whatis_command, whatis_exp):
767 * solib.c (sharedlibrary_command, no_shared_libraries): Constify.
768 * gcore.c (gcore_command): Constify.
770 2017-11-07 Tom Tromey <tom@tromey.com>
772 * printcmd.c (x_command): Call set_repeat_arguments.
773 * cli/cli-cmds.c (list_command): Call set_repeat_arguments.
774 * top.c (repeat_arguments): New global.
775 (set_repeat_arguments): New function.
776 (execute_command): Handle repeat_arguments.
777 (show_commands): Calls set_repeat_arguments.
778 * command.h (set_repeat_arguments): Declare.
780 2017-11-07 Tom Tromey <tom@tromey.com>
782 * stack.c (backtrace_command): Use std::string.
783 (backtrace_command_1): Make "count_exp" const.
785 2017-11-07 Tom Tromey <tom@tromey.com>
787 * source.c (directory_switch, mod_path, add_path): Constify.
788 * defs.h (add_path, mod_path, directory_switch): Constify.
789 * mi/mi-cmd-env.c (env_mod_path): Constify.
791 2017-11-07 Tom Tromey <tom@tromey.com>
793 * infcmd.c (strip_bg_char): Return gdb::unique_xmalloc_ptr.
794 (run_command_1, continue_command, step_1, jump_command)
795 (signal_command, until_command, advance_command, finish_command)
796 (attach_command): Update.
798 2017-11-07 Tom Tromey <tom@tromey.com>
800 * command.h (set_cmd_cfunc): Don't declare.
801 * cli/cli-decode.c (set_cmd_cfunc): Now static.
803 2017-11-07 Tom Tromey <tom@tromey.com>
805 * stack.c (select_frame_command): Constify.
806 * cli/cli-decode.c (add_com_suppress_notification): Constify.
807 * command.h (add_com_suppress_notification): Constify.
809 2017-11-07 Tom Tromey <tom@tromey.com>
811 * breakpoint.c (stop_command): Constify.
812 * cli/cli-decode.c (struct cmd_list_element): Constify.
813 * command.h (add_abbrev_prefix_cmd): Constify.
815 2017-11-07 Pedro Alves <palves@redhat.com>
817 * breakpoint.c (extract_bp_kind): New enum.
818 (extract_bp_num, extract_bp_or_bp_range): New functions, partially
819 factored out from ...
820 (extract_bp_number_and_location): ... here.
821 * cli/cli-utils.c (get_number_trailer): Handle '-$variable'.
823 2017-11-07 Pedro Alves <palves@redhat.com>
825 * breakpoint.c (extract_bp_number_and_location): Change return
826 type to void. Throw error instead of warning.
827 (enable_disable_command): Adjust.
829 2017-11-07 Xavier Roirand <roirand@adacore.com>
830 Pedro Alves <palves@redhat.com>
832 * breakpoint.c (map_breakpoint_number_range): New, factored out
834 (map_breakpoint_numbers): ... here.
835 (find_location_by_number): Change parameters from string to
836 breakpoint number and location.
837 (extract_bp_number_and_location): New function.
838 (enable_disable_bp_num_loc)
839 (enable_disable_breakpoint_location_range)
840 (enable_disable_command): New functions, factored out ...
841 (enable_command, disable_command): ... these functions, and
842 adjusted to support ranges.
843 * NEWS: Document enable/disable breakpoint location range feature.
845 2017-11-06 Luis Machado <luis.machado@linaro.org>
847 * MAINTAINERS (Write After Approval): Update my e-mail address.
849 2017-11-06 Pedro Alves <palves@redhat.com>
851 * gnu-nat.c (gnu_terminal_init): Delete.
852 (gnu_target): Don't install gnu_terminal_init.
853 * inflow.c (child_terminal_init_with_pgrp): Delete, merged with ...
854 (child_terminal_init): ... this function.
856 2017-11-06 Pedro Alves <palves@redhat.com>
858 * common/common.m4 (GDB_AC_COMMON): No longer check termio.h nor
860 * config.in, configure: Regenerate.
862 2017-11-06 Pedro Alves <palves@redhat.com>
864 * event-top.c: Check SIGTSTP instead of STOP_SIGNAL thoughout.
865 (async_init_signals): Adjust.
866 (handle_stop_sig): Rename to ...
867 (handle_sigtstp): ... this.
868 (async_stop_sig): Rename to ...
869 (async_sigtstp_handler): ... this, and delete STOP_SIGNAL !=
871 * event-top.h: Move signal.h include to the top. Check SIGTSTP
872 instead of STOP_SIGNAL thoughout.
873 (handle_stop_sig): Rename to ...
874 (handle_sigtstp): ... this.
875 * top.c (command_line_input): Replace STOP_SIGNAL -> SIGTSTP.
877 2017-11-06 Pedro Alves <palves@redhat.com>
879 * inflow.c (child_terminal_inferior, child_terminal_ours_1): No
880 longer set flags twice in row.
882 2017-11-06 Pedro Alves <palves@redhat.com>
884 * Makefile.in (SER_HARDWIRE): Update comment.
885 (HFILES_NO_SRCDIR): Remove gdb_termios.h.
886 * common/gdb_termios.h: Delete file.
887 * common/job-control.c: Include termios.h and unistd.h instead of
889 (gdb_setpgid): Remove HAVE_TERMIOS || TIOCGPGRP preprocessor
891 (have_job_control): Check HAVE_TERMIOS_H instead of HAVE_TERMIOS.
893 * configure.ac: No longer check for termio.h and sgtty.h.
894 * configure: Regenerate.
895 * inflow.c: Include termios.h instead of gdb_termios.h. Replace
896 PROCESS_GROUP_TYPE checks with HAVE_TERMIOS_H checks throughout.
897 Replace PROCESS_GROUP_TYPE references with pid_t references
899 (gdb_getpgrp): Delete.
900 (set_initial_gdb_ttystate): Use tcgetpgrp instead of gdb_getpgrp.
901 (child_terminal_inferior): Remove comment. Remove sgtty code.
902 (child_terminal_ours_1): Use tcgetpgrp directly instead of
903 gdb_getpgrp. Use serial_set_tty_state instead aof
904 serial_noflush_set_tty_state. Remove sgtty code.
905 * inflow.h: Include unistd.h instead of gdb_termios.h. Replace
906 PROCESS_GROUP_TYPE check with HAVE_TERMIOS_H check.
907 (inferior_process_group): Now returns pid_t.
908 * ser-base.c (ser_base_noflush_set_tty_state): Delete.
909 * ser-base.h (ser_base_noflush_set_tty_state): Delete.
910 * ser-event.c (serial_event_ops): Update.
911 * ser-go32.c (dos_noflush_set_tty_state): Delete.
913 * ser-mingw.c (hardwire_ops, tty_ops, pipe_ops, tcp_ops): Update.
914 * ser-pipe.c (pipe_ops): Update.
915 * ser-tcp.c (tcp_ops): Update.
916 * ser-unix.c: Include termios.h instead of gdb_termios.h. Remove
918 [HAVE_TERMIO] (struct hardwire_ttystate): Delete.
919 [HAVE_SGTTY] (struct hardwire_ttystate): Delete.
920 (get_tty_state, set_tty_state): Drop termio and sgtty code, and
922 (hardwire_noflush_set_tty_state): Delete.
923 (hardwire_print_tty_state, hardwire_drain_output)
924 (hardwire_flush_output, hardwire_flush_input)
925 (hardwire_send_break, hardwire_raw, hardwire_setbaudrate)
926 (hardwire_setstopbits, hardwire_setparity): Drop termio and sgtty
927 code, and assume termios.
928 (hardwire_ops): Update.
929 (_initialize_ser_hardwire): Remove HAVE_TERMIOS check.
930 * serial.c (serial_noflush_set_tty_state): Delete.
931 * serial.h (serial_noflush_set_tty_state): Delete.
932 (serial_ops::noflush_set_tty_state): Delete.
934 2017-11-06 Ulrich Weigand <uweigand@de.ibm.com>
936 * Makefile.in (SFILES): Remove doublest.c and dfp.c.
937 (HFILES_NO_SRCDIR): Remove doublest.h and dfp.h.
938 (COMMON_OBS): Remove doublest.o and dfp.o.
939 Do not build target-float.c (instead of doublest.c)
940 with -Wformat-nonliteral.
942 * doublest.c: Remove file.
943 * doublest.h: Remove file.
944 * dfp.c: Remove file.
945 * dfp.h: Remove file.
947 * target-float.c: Do not include "doublest.h" and "dfp.h".
948 (DOUBLEST): Move here from doublest.h.
949 (enum float_kind): Likewise.
950 (FLOATFORMAT_CHAR_BIT): Likewise.
951 (FLOATFORMAT_LARGEST_BYTES): Likewise.
952 (floatformat_totalsize_bytes): Move here from doublest.c. Make static.
953 (floatformat_precision): Likewise.
954 (floatformat_normalize_byteorder, get_field, put_field): Likewise.
955 (floatformat_is_negative, floatformat_classify, floatformat_mantissa):
957 (host_float_format, host_double_format, host_long_double_format):
959 (floatformat_to_string, floatformat_from_string): Likewise.
960 (floatformat_to_doublest): Likewise. Also, inline the original
961 convert_floatformat_to_doublest.
962 (floatformat_from_doublest): Likewise. Also, inline the original
963 convert_floatformat_from_doublest.
965 Include "dpd/decimal128.h", "dpd/decimal64.h", and "dpd/decimal32.h".
966 (MAX_DECIMAL_STRING): Move here from dfp.c.
967 (match_endianness): Likewise.
968 (set_decnumber_context, decimal_check_errors): Likewise.
969 (decimal_from_number, decimal_to_number): Likewise.
970 (decimal_to_string, decimal_from_string): Likewise. Make static.
971 (decimal_from_longest, decimal_from_ulongest): Likewise.
972 (decimal_to_longest): Likewise.
973 (decimal_binop, decimal_is_zero, decimal_compare): Likewise.
974 (decimal_convert): Likewise.
976 2017-11-06 Ulrich Weigand <uweigand@de.ibm.com>
978 * doublest.c: Do not include "gdbtypes.h".
979 (extract_typed_floating): Remove.
980 (store_typed_floating): Remove.
981 (convert_typed_floating): Remove.
982 * doublest.h (struct type): Remove.
983 (DOUBLEST_PRINT_FORMAT): Remove.
984 (DOUBLEST_SCAN_FORMAT): Remove.
985 (extract_typed_floating): Remove.
986 (store_typed_floating): Remove.
987 (convert_typed_floating): Remove.
989 * dfp.c (decimal_from_doublest): Remove.
990 (decimal_to_doublest): Remove.
991 * dfp.h: Do not include "doublest.h".
992 (decimal_from_doublest): Remove.
993 (decimal_to_doublest): Remove.
995 * value.c: Do not include "doublest.h" and "dfp.h".
996 (value_as_double): Remove.
997 (unpack_double): Remove.
998 (value_from_double): Remove.
999 (value_from_decfloat): Remove.
1000 * value.h: Do not include "doublest.h".
1001 (value_as_double): Remove.
1002 (unpack_double): Remove.
1003 (value_from_double): Remove.
1004 (value_from_decfloat): Remove.
1006 2017-11-06 Ulrich Weigand <uweigand@de.ibm.com>
1008 * i386-tdep.c: Include "target-float.h". Do not include "doublest.h".
1009 (i386_extract_return_value): Use target_float_convert.
1010 (i386_store_return_value): Likewise.
1011 * i387-tdep.c (i387_register_to_value): Use target_float_convert.
1012 (i387_value_to_register): Likewise.
1013 * ia64-tdep.c: Include "target-float.h". Do not include "doublest.h".
1014 (ia64_register_to_value): Use target_float_convert.
1015 (ia64_value_to_register): Likewise.
1016 (ia64_extract_return_value): Likewise.
1017 (ia64_store_return_value): Likewise.
1018 (ia64_push_dummy_call): Likewise.
1019 * m68k-tdep.c: Include "target-float.h".
1020 (m68k_register_to_value): Use target_float_convert.
1021 (m68k_value_to_register): Likewise.
1022 (m68k_svr4_extract_return_value): Likewise.
1023 (m68k_svr4_store_return_value): Likewise.
1024 * ppc-sysv-tdep.c: Include "target-float.h".
1025 (ppc_sysv_abi_push_dummy_call): Use target_float_convert.
1026 (do_ppc_sysv_return_value): Likewise.
1027 (ppc64_sysv_abi_push_freg): Likewise.
1028 (ppc64_sysv_abi_return_value_base): Likewise.
1029 * rs6000-aix-tdep.c: Include "target-float.h".
1030 (rs6000_push_dummy_call): Use target_float_convert.
1031 (rs6000_return_value): Likewise.
1032 * rs6000-lynx178-tdep.c: Include "target-float.h".
1033 (rs6000_lynx178_push_dummy_call): Use target_float_convert.
1034 (rs6000_lynx178_return_value): Likewise.
1035 * rs6000-tdep.c: Include "target-float.h". Do not include "doublest.h".
1036 (rs6000_register_to_value): Use target_float_convert.
1037 (rs6000_value_to_register): Likewise.
1038 * arm-tdep.c: Include "target-float.h". Do not include "doublest.h".
1039 (arm_extract_return_value): Use target_float_convert.
1040 (arm_store_return_value): Likewise.
1041 * sh-tdep.c: Include "target-float.h". Do not include "doublest.h".
1042 (sh_register_convert_to_virtual): Use target_float_convert.
1043 (sh_register_convert_to_raw): Likewise.
1044 * sh64-tdep.c: Include "target-float.h".
1045 (sh64_extract_return_value): Use target_float_convert.
1046 (sh64_register_convert_to_virtual): Likewise.
1047 (sh64_register_convert_to_raw): Likewise. Fix argument types.
1049 2017-11-06 Ulrich Weigand <uweigand@de.ibm.com>
1051 * target-float.c (floatformat_to_host_double): New function.
1052 (floatformat_from_host_double): Likewise.
1053 (target_float_to_host_double): Likewise.
1054 (target_float_from_host_double): Likewise.
1055 * target-float.h (target_float_to_host_double): Add prototype.
1056 (target_float_from_host_double): Likewise.
1058 * guile/scm-value.c: Include "target-float.h".
1059 (gdbscm_value_to_real): Use target_float_to_host_double.
1060 Handle integer source values via value_as_long.
1061 * guile/scm-math.c: Include "target-float.h". Do not include
1062 "doublest.h", "dfp.h", and "expression.h".
1063 (vlscm_convert_typed_number): Use target_float_from_host_double.
1064 (vlscm_convert_number): Likewise.
1066 * python/py-value.c (valpy_float): Use target_float_to_host_double.
1067 (convert_value_from_python): Use target_float_from_host_double.
1069 2017-11-06 Ulrich Weigand <uweigand@de.ibm.com>
1071 * ada-lang.c (cast_to_fixed): Reimplement in target arithmetic.
1072 (cast_from_fixed): Likewise.
1073 (ada_scaling_type): New function.
1074 (ada_delta): Return value instead of DOUBLEST. Perform target
1075 arithmetic instead of host arithmetic.
1076 (scaling_factor): Rename to ...
1077 (ada_scaling_factor) ... this. Make non-static. Return value instead
1078 of DOUBLEST. Perform target arithmetic instead of host arithmetic.
1079 (ada_fixed_to_float): Remove.
1080 (ada_float_to_fixed): Remove.
1081 * ada-lang.h (ada_fixed_to_float): Remove.
1082 (ada_float_to_fixed): Remove.
1083 (ada_delta): Return value instead of DOUBLEST.
1084 (ada_scaling_factor): Add prototype.
1086 * ada-typeprint.c: Include "target-float.h".
1087 (print_fixed_point_type): Perform target arithmetic instead of
1089 * ada-valprint.c: Include "target-float.h".
1090 (ada_val_print_num): Perform target arithmetic instead of
1091 host arithmetic for fixed-point types.
1093 2017-11-06 Ulrich Weigand <uweigand@de.ibm.com>
1095 * target-float.c: Include <math.h>.
1096 (floatformat_binop): New function.
1097 (floatformat_compare): Likewise.
1098 (target_float_binop): Likewise.
1099 (target_float_compare): Likewise.
1100 * target-float.h: Include "expression.h".
1101 (target_float_binop): Add prototype.
1102 (target_float_compare): Likewise.
1104 * valarith.c: Do not include "doublest.h" and "dfp.h".
1105 Include "common/byte-vector.h".
1106 (value_args_as_decimal): Remove, replace by ...
1107 (value_args_as_target_float): ... this function. Handle both
1108 binary and decimal target floating-point formats.
1109 (scalar_binop): Handle both binary and decimal FP using
1110 value_args_as_target_float and target_float_binop.
1111 (value_equal): Handle both binary and decimal FP using
1112 value_args_as_target_float and target_float_compare.
1113 (value_less): Likewise.
1114 (value_pos): Handle all scalar types as simple copy.
1115 (value_neg): Handle all scalar types via BINOP_SUB from 0.
1116 * dfp.c (decimal_binop): Throw error instead of internal_error
1117 when called with an unsupported operation code.
1119 2017-11-06 Ulrich Weigand <uweigand@de.ibm.com>
1121 * target-float.c (target_float_to_string): New function.
1122 (target_float_from_string): New function.
1123 * target-float.h (target_float_to_string): Add prototype.
1124 (target_float_from_string): Add prototype.
1126 * valprint.c: Include "target-float.h". Do not include
1127 "doublest.h" and "dfp.h".
1128 (print_floating): Use target_float_to_string.
1129 * printcmd.c: Include "target-float.h". Do not include "dfp.h".
1130 (printf_floating): Use target_float_to_string.
1131 * i387-tdep.c: Include "target-float.h". Do not include "doublest.h".
1132 (print_i387_value): Use target_float_to_string.
1133 * mips-tdep.c: Include "target-float.h".
1134 (mips_print_fp_register): Use target_float_to_string.
1135 * sh64-tdep.c: Include "target-float.h".
1136 (sh64_do_fp_register): Use target_float_to_string.
1138 * parse.c: Include "target-float.h". Do not include
1139 "doublest.h" and "dfp.h".
1140 (parse_float): Use target_float_from_string.
1141 * stabsread.c: Include "target-float.h". Do not include "doublest.h".
1142 (define_symbol): Use target_float_from_string.
1143 * gdbarch-selftests.c: Include "target-float.h".
1144 (register_to_value_test): Use target_float_from_string.
1146 2017-11-06 Ulrich Weigand <uweigand@de.ibm.com>
1148 * Makefile.c (SFILES): Add target-float.c.
1149 (HFILES_NO_SRCDIR): Add target-float.h.
1150 (COMMON_OBS): Add target-float.o.
1151 * target-float.h: New file.
1152 * target-float.c: New file.
1154 * doublest.c (floatformat_classify): Fix detection of float_zero.
1156 * gdbtypes.c (is_floating_type): New function.
1157 * gdbtypes.h (is_floating_type): Add prototype.
1159 * value.c: Do not include "floatformat.h".
1160 (unpack_double): Use target_float_is_valid.
1161 (is_floating_value): New function.
1162 * value.h (is_floating_value): Add prototype-
1164 * valarith.c: Include "target-float.h".
1165 (value_logical_not): Use target_float_is_zero.
1167 * python/py-value.c: Include "target-float.h".
1168 (valpy_nonzero): Use target_float_is_zero.
1170 2017-11-04 Tom Tromey <tom@tromey.com>
1172 * h8300-tdep.c (h8300_push_dummy_call): Use std::vector.
1174 2017-11-04 Tom Tromey <tom@tromey.com>
1176 * breakpoint.c (set_momentary_breakpoint): Return
1178 (until_break_command): Update.
1179 (new_until_break_fsm): Change argument types to
1181 (set_momentary_breakpoint_at_pc): Return breakpoint_up.
1182 (do_delete_breakpoint_cleanup, make_cleanup_delete_breakpoint):
1184 * infcmd.c (finish_forward): Update.
1185 * breakpoint.h (set_momentary_breakpoint)
1186 (set_momentary_breakpoint_at_pc): Return breakpoint_up.
1187 (make_cleanup_delete_breakpoint): Remove.
1188 (struct breakpoint_deleter): New.
1189 (breakpoint_up): New typedef.
1190 * infrun.c (insert_step_resume_breakpoint_at_sal_1): Update.
1191 (insert_exception_resume_breakpoint): Update.
1192 (insert_exception_resume_from_probe): Update.
1193 (insert_longjmp_resume_breakpoint): Update.
1194 * arm-linux-tdep.c (arm_linux_copy_svc): Update.
1195 * elfread.c (elf_gnu_ifunc_resolver_stop): Update.
1196 * infcall.c (call_function_by_hand_dummy): Update
1198 2017-11-04 Tom Tromey <tom@tromey.com>
1200 * c-typeprint.c (c_type_print_base): Use gdb::unique_xmalloc_ptr.
1202 2017-11-04 Tom Tromey <tom@tromey.com>
1204 * linux-tdep.c (linux_core_info_proc_mappings): Use
1206 (linux_get_siginfo_data): Return gdb::byte_vector. Remove
1208 (linux_corefile_thread): Update.
1209 (linux_make_corefile_notes): Remove unused variable.
1211 2017-11-04 Tom Tromey <tom@tromey.com>
1213 * ppc-linux-tdep.c (ppc_linux_get_syscall_number): Use
1216 2017-11-04 Tom Tromey <tom@tromey.com>
1218 * objfiles.c (do_free_objfile_cleanup): Remove.
1219 * compile/compile-object-load.c (compile_object_load): Update.
1220 * objfiles.h (make_cleanup_free_objfile): Remove.
1222 2017-11-04 Tom Tromey <tom@tromey.com>
1224 * sparc64-tdep.c (do_examine): Use gdb::def_vector.
1225 (adi_read_versions): Change "tags" to "gdb_byte *".
1226 (adi_print_versions): Likewise.
1228 2017-11-04 Tom Tromey <tom@tromey.com>
1231 (scoped_rbreak_breakpoints::scoped_rbreak_breakpoints): Rename
1232 from start_rbreak_breakpoints.
1233 (scoped_rbreak_breakpoints): Rename from end_rbreak_breakpoints.
1234 * breakpoint.h (class scoped_rbreak_breakpoints): New.
1235 (start_rbreak_breakpoints, end_rbreak_breakpoints): Remove.
1236 * symtab.c (do_end_rbreak_breakpoints): Remove.
1237 (rbreak_command): Use scoped_rbreak_breakpoints, std::string.
1239 2017-11-04 Tom Tromey <tom@tromey.com>
1241 * cp-namespace.c (reset_directive_searched): Remove.
1242 (cp_lookup_symbol_via_imports): Use scoped_restore.
1243 * cp-support.c (reset_directive_searched): Remove.
1244 (make_symbol_overload_list_using): Use scoped_restore.
1245 * d-namespace.c (d_lookup_symbol_imports): Use scoped_restore.
1246 (reset_directive_searched): Remove.
1248 2017-11-04 Tom Tromey <tom@tromey.com>
1250 * symfile.c (find_separate_debug_file_by_debuglink): Use
1253 2017-11-04 Tom Tromey <tom@tromey.com>
1255 * compile/compile-loc2c.c (compute_stack_depth_worker): Change
1257 (compute_stack_depth): Likewise.
1258 (do_compile_dwarf_expr_to_c): Use std::vector.
1260 2017-11-04 Tom Tromey <tom@tromey.com>
1262 * compile/compile-object-load.c (link_callbacks_einfo): Use
1265 2017-11-04 Tom Tromey <tom@tromey.com>
1267 * dwarf2read.c (process_full_comp_unit, process_full_type_unit):
1268 Use scoped_free_pendings.
1269 * dbxread.c (dbx_symfile_read, dbx_psymtab_to_symtab_1): Use
1270 scoped_free_pendings.
1271 * xcoffread.c (xcoff_psymtab_to_symtab_1): Use scoped_free_pendings.
1272 (xcoff_initial_scan): Likewise.
1273 * buildsym.c (reset_symtab_globals): Update comment.
1274 (scoped_free_pendings): Rename from really_free_pendings.
1275 (prepare_for_building): Update comment.
1276 (buildsym_init): Likewise.
1277 * buildsym.h (class scoped_free_pendings): New class.
1278 (really_free_pendings): Don't declare.
1280 2017-11-03 Ulrich Weigand <uweigand@de.ibm.com>
1282 * doublest.c (convert_doublest_to_floatformat): Fix uninitialized
1283 output when converting a zero value to a special byteorder format.
1285 2017-11-02 Yao Qi <yao.qi@linaro.org>
1287 * frame.c (do_frame_register_read): Remove aspace.
1288 * jit.c (jit_frame_sniffer): Likwise.
1289 * ppc-linux-tdep.c (ppu2spu_sniffer): Likewise.
1290 * regcache.c (regcache::regcache): Pass nullptr.
1291 (regcache_print): Caller updated.
1292 * regcache.h (regcache::regcache): Remove one constructor
1295 2017-11-02 Yao Qi <yao.qi@linaro.org>
1297 * regcache.h (regcache) <m_readonly_p>: Change it to const bool.
1299 2017-11-02 Yao Qi <yao.qi@linaro.org>
1301 * breakpoint.c (insert_single_step_breakpoints): Update.
1302 * frame.c (struct frame_info) <aspace>: Add const.
1303 (frame_save_as_regcache): Add const.
1304 (get_frame_address_space): Return const address_space *.
1305 * frame.h (get_frame_address_space): Update declaration.
1306 * infrun.c (struct step_over_info) <aspace>: Add const.
1307 (set_step_over_info): Make aspace const.
1308 (displaced_step_prepare_throw): Change variable const.
1310 (proceed): Likewise.
1311 (adjust_pc_after_break): Likewise.
1312 (save_waitstatus): Likewise.
1313 (handle_signal_stop): Likewise.
1314 (keep_going_pass_signal): Likewise.
1315 * jit.c (jit_frame_sniffer): Add const.
1316 * mips-tdep.c (mips_single_step_through_delay): Likewise.
1317 * ppc-linux-tdep.c (ppu2spu_sniffer): Likewise.
1318 * record-full.c (record_full_wait_1): Likewise.
1319 * regcache.c (regcache::regcache): Change parameter to const.
1320 * regcache.h (regcache::regcache): Likewise.
1321 (regcache::aspace): Return const address_space *.
1322 (regcache) <m_aspace>: Add const.
1324 2017-11-02 Yao Qi <yao.qi@linaro.org>
1326 * darwin-nat.c (cancel_breakpoint): Use regcache->aspace ().
1327 * frame.c (create_sentinel_frame): Likewise.
1328 * infrun.c (displaced_step_prepare_throw): Likewise.
1330 (thread_still_needs_step_over_bp): Likewise.
1331 (proceed): Likewise.
1332 (do_target_wait): Likewise.
1333 (adjust_pc_after_break): Likewise.
1334 (handle_syscall_event): Likewise.
1335 (save_waitstatus): Likewise.
1336 (handle_inferior_event_1): Likewise.
1337 (handle_signal_stop): Likewise.
1338 (keep_going_pass_signal): Likewise.
1339 * linux-nat.c (status_callback): Likewise.
1340 (save_stop_reason): Likewise.
1341 (resume_stopped_resumed_lwps): Likewise.
1342 * record-full.c (record_full_exec_insn): Likewise.
1343 (record_full_wait_1): Likewise.
1344 * regcache.c (get_regcache_aspace): Remove.
1345 * regcache.h (get_regcache_aspace): Remove.
1347 2017-11-02 Yao Qi <yao.qi@linaro.org>
1349 * regcache.c (struct regcache_descr) <nr_raw_registers>: Remove.
1350 (init_regcache_descr): Use gdbarch_num_regs.
1351 (regcache::regcache): Likewise.
1352 (regcache::get_register_status): Likewise.
1353 (regcache::assert_raw_regnum): Likewise.
1354 (regcache::cooked_read): Likewise.
1355 (regcache::cooked_read_value): Likewise.
1356 (regcache::cooked_write): Likewise.
1357 (regcache::dump): Likewise.
1358 (regcache::num_raw_registers): New method.
1359 * regcache.h (class regcache) <num_raw_registers>: New.
1361 2017-11-02 Yao Qi <yao.qi@linaro.org>
1363 * regcache.c (regcache::assert_regnum): New method.
1364 (regcache::invalidate): Call assert_regnum.
1365 (regcache::raw_update): Likewise.
1366 (regcache::raw_write): Likewise.
1367 (regcache::raw_read_part): Likewise.
1368 (regcache::raw_write_part): Likewise.
1369 (regcache::raw_supply): Likewise.
1370 (regcache::raw_supply_integer): Likewise.
1371 (regcache::raw_supply_zeroed): Likewise.
1372 (regcache::raw_collect): Likewise.
1373 (regcache::raw_collect_integer): Likewise.
1374 * regcache.h (regcache::assert_regnum): Declare.
1376 2017-11-02 Yao Qi <yao.qi@linaro.org>
1378 * regcache.c (regcache::dump): Remove code.
1380 2017-11-02 Yao Qi <yao.qi@linaro.org>
1382 * regcache.c (struct regcache_descr) <sizeof_raw_register_status>:
1384 <sizeof_cooked_register_status>: Remove.
1385 (init_regcache_descr): Update.
1386 (regcache::regcache): Use nr_cooked_registers and nr_raw_registers.
1387 (regcache::save): Likewise.
1388 (regcache::dump): Likewise.
1390 2017-11-01 James Bowman <james.bowman@ftdichip.com>
1392 * ft32-tdep.c (ft32_fetch_instruction): New function.
1393 (ft32_analyze_prologue): Use ft32_fetch_instruction().
1395 2017-10-31 Simon Marchi <simon.marchi@polymtl.ca>
1397 * cli/cli-script.c (execute_control_command): Rename to ...
1398 (execute_control_command_1): ... this.
1399 (execute_control_command): New function.
1401 2017-10-31 Simon Marchi <simon.marchi@ericsson.com>
1403 * tracepoint.c (tfind_command): Remove const_cast.
1405 2017-10-30 Mike Gulick <mgulick@mathworks.com>
1407 * Makefile.in (HFILES_NO_SRCDIR): Remove reference to gdb.h.
1409 2017-10-30 Simon Marchi <simon.marchi@ericsson.com>
1411 * common/common-utils.h (in_inclusive_range): New function.
1412 * arm-tdep.c (arm_record_extension_space): Use
1414 (thumb_record_ld_st_reg_offset): Use in_inclusive_range.
1415 * cris-tdep.c (cris_spec_reg_applicable): Use
1418 2017-10-30 Pedro Alves <palves@redhat.com>
1419 Simon Marchi <simon.marchi@ericsson.com>
1421 * remote.c (remote_set_syscall_catchpoint): Build a std::string
1422 instead of a gdb::unique_xmalloc_ptr, using string_appendf.
1424 2017-10-30 Pedro Alves <palves@redhat.com>
1426 * common/common-utils.c (string_appendf, string_vappendf): New
1428 * common/common-utils.h (string_appendf, string_vappendf): New
1430 * unittests/common-utils-selftests.c (string_appendf_func)
1431 (test_appendf_func, string_vappendf_wrapper, string_appendf_tests)
1432 (string_vappendf_tests): New functions.
1433 (_initialize_common_utils_selftests): Register "string_appendf" and
1434 "string_vappendf tests".
1436 2017-10-30 Pedro Alves <palves@redhat.com>
1438 * unittests/common-utils-selftests.c (format_func): New typedef.
1439 (string_printf_tests, string_vprintf_tests): Tests factored out
1441 (test_format_func): ... this new function.
1442 (string_printf_tests, string_vprintf_tests): Reimplement on top of
1445 2017-10-29 Simon Marchi <simon.marchi@ericsson.com>
1447 * darwin-nat.c: Remove include of gdb.h.
1449 2017-10-29 Simon Marchi <simon.marchi@ericsson.com>
1451 * xtensa-xtregs.c: Fix formatting issues.
1453 2017-10-29 Simon Marchi <simon.marchi@ericsson.com>
1455 * xtensa-xtregs.c (xtensa_regtable_t) <name>: Constify.
1457 2017-10-28 Maksim Dzabraev <dzabraew@gmail.com>
1460 * python/py-infthread.c (thpy_get_inferior): Increment reference
1461 of inferior before returning it.
1463 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
1465 * unittests/common-utils-selftests.c (format): Add
1468 2017-10-27 Simon Marchi <simon.marchi@polymtl.ca>
1470 * xml-syscall.c (struct syscall_desc): Add constructor.
1471 <name>: Change type to std::string.
1472 (syscall_desc_up): New typedef.
1473 (syscall_desc_p): Remove typeder.
1474 (DEF_VEC_P(syscall_desc_p)): Remove.
1475 (struct syscall_group_desc): Add constructor.
1476 <name>: Change type to std::string.
1477 <syscalls>: Change type to std::vector.
1478 (syscall_group_desc_up): New typedef.
1479 (syscall_group_desc_p): Remove typedef.
1480 (DEF_VEC_P(syscall_group_desc_p)): Remove.
1481 (struct syscalls_info) <syscalls>: Change type to std::vector of
1484 <my_gdb_datadir>: Change type to std::string.
1485 (syscalls_info_up): New typedef.
1486 (allocate_syscalls_info): Remove.
1487 (syscalls_info_free_syscalls_desc): Remove.
1488 (syscalls_info_free_syscall_group_desc): Remove.
1489 (free_syscalls_info): Remove.
1490 (make_cleanup_free_syscalls_info): Remove.
1491 (syscall_group_create_syscall_group_desc): Adjust.
1492 (syscall_group_add_syscall): Adjust.
1493 (syscall_create_syscall_desc): Adjust.
1494 (syscall_parse_xml): Adjust, use unique_ptr instead of cleanup.
1495 (init_syscalls_info): Adjust.
1496 (syscall_group_get_group_by_name): Adjust.
1497 (xml_get_syscall_number): Adjust.
1498 (xml_get_syscall_name): Adjust.
1499 (xml_list_of_syscalls): Adjust.
1500 (xml_list_syscalls_by_group): Adjust.
1501 (xml_list_of_groups): Adjust.
1503 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
1505 * probe.h: Don't include gdb_vecs.h.
1506 (DEF_VEC_P (probe_p)): Remove.
1507 (find_probes_in_objfile): Return an std::vector.
1508 * probe.c (find_probes_in_objfile): Likewise.
1509 * breakpoint.c (breakpoint_objfile_data)
1510 <longjmp_probes>: Change type to std::vector.
1511 <exception_probes>: Likewise.
1512 (free_breakpoint_probes): Don't manually free vectors.
1513 (create_longjmp_master_breakpoint): Adjust.
1514 (create_exception_master_breakpoint): Adjust.
1515 * solib-svr4.c (svr4_create_probe_breakpoints): Change
1516 parameter type, adjust.
1517 (svr4_create_solib_event_breakpoints): Adjust.
1519 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
1521 * breakpoint.c (breakpoint_objfile_data): Initialize fields.
1522 (get_breakpoint_objfile_data): Allocate breakpoint_objfile_data
1524 (free_breakpoint_probes): Rename to ...
1525 (free_breakpoint_objfile_data): ... this, and call delete on
1528 2017-10-27 Simon Marchi <simon.marchi@polymtl.ca>
1530 * auto-load.c: Don't include gdb_vecs.h, include algorithm.
1531 (loaded_script_ptr): Remove typedef.
1532 (DEF_VEC_P (loaded_script_ptr)): Remove.
1533 (struct collect_matching_scripts_data): Add constructor.
1534 <scripts_p>: Change type to (pointer to) std::vector.
1535 (collect_matching_scripts_data): Adjust.
1536 (sort_scripts_by_name): Make suitable for std::sort.
1537 (print_scripts): Don't sort vector, adjust to std::vector.
1538 (auto_load_info_scripts): Sort vectors, adjust to std::vector.
1540 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
1542 * symfile.c (filename_language): Make struct, not typedef. Add
1544 <ext>: Change type to std::string.
1545 (DEF_VEC_O (filename_language)): Remove.
1546 (filename_language_table): Change type to std::vector.
1547 (add_filename_language): Adjust.
1548 (set_ext_lang_command): Adjust.
1549 (info_ext_lang_command): Adjust.
1550 (deduce_language_from_filename): Adjust.
1551 (class scoped_restore_filename_language_table): Remove.
1552 (test_filename_language): Use scoped_restore.
1553 (test_set_ext_lang_command): Use scoped_restore, adjust to
1556 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
1558 * symfile.c: Include selftest.h.
1559 (class scoped_restore_filename_language_table): New.
1560 (test_filename_language): New test.
1561 (test_set_ext_lang_command): New test.
1562 (_initialize_symfile): Register tests.
1564 2017-10-27 Keith Seitz <keiths@redhat.com>
1566 * breakpoint.c (print_breakpoint_location): Use the symbol saved
1567 in the bp_location, falling back to find_pc_sect_function when
1569 (add_location_to_breakpoint): Save sal->symbol.
1570 * breakpoint.h (struct bp_location) <symbol>: New field.
1571 * symtab.c (find_function_start_sal): Save the symbol into the SaL.
1572 * symtab.h (struct symtab_and_line) <symbol>: New field.
1574 2017-10-26 Patrick Frants <osscontribute@gmail.com>
1577 * cp-valprint.c (cp_print_value_fields): Use obstack_blank_fast
1580 2017-10-26 Pedro Alves <palves@redhat.com>
1582 * remote.c (remote_async_terminal_ours_p): Delete.
1583 (remote_open_1, remote_terminal_inferior, remote_terminal_ours):
1584 Remove references to 'remote_async_terminal_ours_p'.
1586 2017-10-26 Yao Qi <yao.qi@linaro.org>
1588 * breakpoint.h (regular_breakpoint_inserted_here_p): Remove.
1590 2017-10-26 Yao Qi <yao.qi@linaro.org>
1592 * break-catch-sig.c (signal_catchpoint_breakpoint_hit): Make
1594 * break-catch-syscall.c (breakpoint_hit_catch_syscall):
1596 * breakpoint.c (bpstat_check_location): Remove cast.
1597 (breakpoint_hit_catch_fork): Make aspce const.
1598 (breakpoint_hit_catch_solib): Likewise.
1599 (breakpoint_hit_catch_exec): Likewise.
1600 (breakpoint_hit_ranged_breakpoint): Likewise.
1601 (breakpoint_hit_watchpoint): Likewise.
1602 (base_breakpoint_breakpoint_hit): Likewise.
1603 (bkpt_breakpoint_hit): Likewise.
1604 (dprintf_breakpoint_hit): Likewise.
1605 (tracepoint_breakpoint_hit): Likewise.
1606 * breakpoint.h (breakpoint_ops) <breakpoint_hit>: Likewise.
1608 2017-10-26 Yao Qi <yao.qi@linaro.org>
1610 * breakpoint.c (breakpoint_location_address_match): Change
1611 "struct address_space *" to "const address_space".
1612 (breakpoint_location_address_range_overlap): Likewise.
1613 (breakpoint_here_p): Likewise.
1614 (breakpoint_in_range_p): Likewise.
1615 (moribund_breakpoint_here_p): Likewise.
1616 (bp_location_inserted_here_p): Likewise.
1617 (software_breakpoint_inserted_here_p): Likewise.
1618 (hardware_breakpoint_inserted_here_p): Likewise.
1619 (hardware_watchpoint_inserted_in_range): Likewise.
1620 (bpstat_check_location): Likewise.
1621 (bpstat_stop_status): Likewise.
1622 (breakpoint_address_match): Likewise.
1623 (breakpoint_address_match_range): Likewise.
1624 (breakpoint_location_address_match): Likewise.
1625 (breakpoint_location_address_range_overlap): Likewise.
1626 (insert_single_step_breakpoint): Likewise.
1627 (breakpoint_has_location_inserted_here): Likewise.
1628 (single_step_breakpoint_inserted_here_p): Likewise.
1629 (pc_at_non_inline_function): Likewise.
1630 * breakpoint.h (bpstat_stop_status): Update declaration.
1631 (breakpoint_here_p): Likewise.
1632 (breakpoint_in_range_p): Likewise.
1633 (moribund_breakpoint_here_p): Likewise.
1634 (breakpoint_inserted_here_p): Likewise.
1635 (software_breakpoint_inserted_here_p): Likewise.
1636 (hardware_breakpoint_inserted_here_p): Likewise.
1637 (breakpoint_has_location_inserted_here): Likewise.
1638 (single_step_breakpoint_inserted_here_p): Likewise.
1639 (hardware_watchpoint_inserted_in_range): Likewise.
1640 (breakpoint_address_match): Likewise.
1641 (insert_single_step_breakpoint): Likewise.
1642 (pc_at_non_inline_function): Likewise.
1643 * gdbthread.h (thread_has_single_step_breakpoint_here): Likewise.
1644 * record.c (record_check_stopped_by_breakpoint): Likewise.
1645 * record.h (record_check_stopped_by_breakpoint): Likewise.
1646 * thread.c (thread_has_single_step_breakpoint_here): Likewise.
1648 2017-10-25 Yao Qi <yao.qi@linaro.org>
1650 * aarch32-linux-nat.c (aarch32_gp_regcache_supply): Use
1651 regcache->arch () instead get_regcache_arch.
1652 * aarch64-fbsd-nat.c (aarch64_fbsd_fetch_inferior_registers):
1654 (aarch64_fbsd_store_inferior_registers): Likewise.
1655 * aarch64-linux-nat.c (fetch_gregs_from_thread): Likewise.
1656 (store_gregs_to_thread): Likewise.
1657 (fetch_fpregs_from_thread): Likewise.
1658 (store_fpregs_to_thread): Likewise.
1659 * aarch64-tdep.c (aarch64_extract_return_value): Likewise.
1660 (aarch64_store_return_value): Likewise.
1661 (aarch64_software_single_step): Likewise.
1662 * aix-thread.c (aix_thread_wait): Likewise.
1663 (supply_reg32): Likewise.
1664 (supply_sprs64): Likewise.
1665 (supply_sprs32): Likewise.
1666 (fill_gprs64): Likewise.
1667 (fill_gprs32): Likewise.
1668 (fill_sprs64): Likewise.
1669 (fill_sprs32): Likewise.
1670 (store_regs_user_thread): Likewise.
1671 (store_regs_kernel_thread): Likewise.
1672 * alpha-bsd-nat.c (alphabsd_fetch_inferior_registers): Likewise.
1673 (alphabsd_store_inferior_registers): Likewise.
1674 * alpha-tdep.c (alpha_extract_return_value): Likewise.
1675 (alpha_store_return_value): Likewise.
1676 (alpha_deal_with_atomic_sequence): Likewise.
1677 (alpha_next_pc): Likewise.
1678 (alpha_software_single_step): Likewise.
1679 * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers): Likewise.
1680 (amd64bsd_store_inferior_registers): Likewise.
1681 * amd64-linux-nat.c (amd64_linux_fetch_inferior_registers):
1683 (amd64_linux_store_inferior_registers): Likewise.
1684 * amd64-nat.c (amd64_supply_native_gregset): Likewise.
1685 (amd64_collect_native_gregset): Likewise.
1686 * amd64-obsd-tdep.c (amd64obsd_supply_uthread): Likewise.
1687 (amd64obsd_collect_uthread): Likewise.
1688 * amd64-tdep.c (amd64_supply_fpregset): Likewise.
1689 (amd64_collect_fpregset): Likewise.
1690 (amd64_supply_fxsave): Likewise.
1691 (amd64_supply_xsave): Likewise.
1692 (amd64_collect_fxsave): Likewise.
1693 (amd64_collect_xsave): Likewise.
1694 * arc-tdep.c (arc_write_pc): Likewise.
1695 * arch-utils.c (default_skip_permanent_breakpoint): Likewise.
1696 * arm-fbsd-nat.c (arm_fbsd_fetch_inferior_registers): Likewise.
1697 (arm_fbsd_store_inferior_registers): Likewise.
1698 * arm-linux-nat.c (fetch_vfp_regs): Likewise.
1699 (store_vfp_regs): Likewise.
1700 (arm_linux_fetch_inferior_registers): Likewise.
1701 (arm_linux_store_inferior_registers): Likewise.
1702 * arm-linux-tdep.c (arm_linux_supply_gregset): Likewise.
1703 (arm_linux_sigreturn_next_pc): Likewise.
1704 (arm_linux_get_next_pcs_syscall_next_pc): Likewise.
1705 * arm-nbsd-nat.c (arm_supply_gregset): Likewise.
1706 (fetch_register): Likewise.
1707 (store_register): Likewise.
1708 * arm-tdep.c (arm_is_thumb): Likewise.
1709 (displaced_in_arm_mode): Likewise.
1710 (bx_write_pc): Likewise.
1711 (arm_get_next_pcs_addr_bits_remove): Likewise.
1712 (arm_software_single_step): Likewise.
1713 (arm_extract_return_value): Likewise.
1714 (arm_store_return_value): Likewise.
1715 (arm_write_pc): Likewise.
1716 * bfin-tdep.c (bfin_extract_return_value): Likewise.
1717 * bsd-uthread.c (bsd_uthread_fetch_registers): Likewise.
1718 (bsd_uthread_store_registers): Likewise.
1719 * core-regset.c (fetch_core_registers): Likewise.
1720 * corelow.c (get_core_registers): Likewise.
1721 * cris-tdep.c (cris_store_return_value): Likewise.
1722 (cris_extract_return_value): Likewise.
1723 (find_step_target): Likewise.
1724 (find_step_target): Likewise.
1725 (cris_software_single_step): Likewise.
1726 * ctf.c (ctf_fetch_registers): Likewise.
1727 * darwin-nat.c (cancel_breakpoint): Likewise.
1728 * fbsd-tdep.c (fbsd_collect_thread_registers): Likewise.
1729 * frv-tdep.c (frv_extract_return_value): Likewise.
1730 * ft32-tdep.c (ft32_store_return_value): Likewise.
1731 (ft32_extract_return_value): Likewise.
1732 * go32-nat.c (fetch_register): Likewise.
1733 (go32_fetch_registers): Likewise.
1734 (go32_store_registers): Likewise.
1735 (store_register): Likewise.
1736 * h8300-tdep.c (h8300_extract_return_value): Likewise.
1737 (h8300_store_return_value): Likewise.
1738 * hppa-linux-nat.c (fetch_register): Likewise.
1739 (store_register): Likewise.
1740 (hppa_linux_fetch_inferior_registers): Likewise.
1741 (hppa_linux_store_inferior_registers): Likewise.
1742 * i386-darwin-nat.c (i386_darwin_fetch_inferior_registers): Likewise.
1743 (i386_darwin_store_inferior_registers): Likewise.
1744 * i386-gnu-nat.c (gnu_fetch_registers): Likewise.
1745 (gnu_store_registers): Likewise.
1746 * i386-linux-nat.c (fetch_register): Likewise.
1747 (store_register): Likewise.
1748 (supply_gregset): Likewise.
1749 (fill_gregset): Likewise.
1750 (i386_linux_fetch_inferior_registers): Likewise.
1751 (i386_linux_store_inferior_registers): Likewise.
1752 (i386_linux_resume): Likewise.
1753 * i386-linux-tdep.c (i386_linux_get_syscall_number_from_regcache):
1755 * i386-nto-tdep.c (i386nto_supply_gregset): Likewise.
1756 * i386-obsd-nat.c (i386obsd_supply_pcb): Likewise.
1757 * i386-obsd-tdep.c (i386obsd_supply_uthread): Likewise.
1758 (i386obsd_collect_uthread): Likewise.
1759 * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
1760 (i386_supply_gregset): Likewise.
1761 (i386_collect_gregset): Likewise.
1762 (i386_supply_fpregset): Likewise.
1763 (i386_collect_fpregset): Likewise.
1764 (i386_mpx_bd_base): Likewise.
1765 * i386-v4-nat.c (supply_fpregset): Likewise.
1766 (fill_fpregset): Likewise.
1767 * i387-tdep.c (i387_supply_fsave): Likewise.
1768 (i387_collect_fsave): Likewise.
1769 (i387_supply_fxsave): Likewise.
1770 (i387_collect_fxsave): Likewise.
1771 (i387_supply_xsave): Likewise.
1772 (i387_collect_xsave): Likewise.
1773 * ia64-linux-nat.c (ia64_linux_fetch_registers): Likewise.
1774 (ia64_linux_store_registers): Likewise.
1775 * ia64-tdep.c (ia64_access_rse_reg): Likewise.
1776 (ia64_extract_return_value): Likewise.
1777 (ia64_store_return_value): Likewise.
1778 (find_func_descr): Likewise.
1779 * inf-child.c (inf_child_fetch_inferior_registers): Likewise.
1780 * inf-ptrace.c (inf_ptrace_fetch_registers): Likewise.
1781 (inf_ptrace_store_registers): Likewise.
1782 * infrun.c (use_displaced_stepping): Likewise.
1783 (displaced_step_prepare_throw): Likewise.
1785 (proceed): Likewise.
1786 (do_target_wait): Likewise.
1787 (adjust_pc_after_break): Likewise.
1788 (handle_inferior_event_1): Likewise.
1789 (handle_signal_stop): Likewise.
1790 (save_infcall_suspend_state): Likewise.
1791 (restore_infcall_suspend_state): Likewise.
1792 * iq2000-tdep.c (iq2000_extract_return_value): Likewise.
1793 * jit.c (jit_frame_prev_register): Likewise.
1794 * linux-nat.c (save_stop_reason): Likewise.
1795 (linux_nat_wait_1): Likewise.
1796 (resume_stopped_resumed_lwps): Likewise.
1797 * linux-record.c (record_linux_sockaddr): Likewise.
1798 (record_linux_msghdr): Likewise.
1799 (record_linux_system_call): Likewise.
1800 * linux-tdep.c (linux_collect_thread_registers): Likewise.
1801 * lm32-tdep.c (lm32_extract_return_value): Likewise.
1802 (lm32_store_return_value): Likewise.
1803 * m32c-tdep.c (m32c_read_flg): Likewise.
1804 (m32c_pseudo_register_read): Likewise.
1805 (m32c_pseudo_register_write): Likewise.
1806 * m32r-linux-tdep.c (m32r_linux_supply_gregset): Likewise.
1807 (m32r_linux_collect_gregset): Likewise.
1808 * m32r-tdep.c (m32r_store_return_value): Likewise.
1809 (m32r_extract_return_value): Likewise.
1810 * m68k-bsd-nat.c (m68kbsd_supply_fpregset): Likewise.
1811 (m68kbsd_collect_fpregset): Likewise.
1812 * m68k-bsd-tdep.c (m68kbsd_supply_fpregset): Likewise.
1813 * m68k-linux-nat.c (fetch_register): Likewise.
1814 (old_fetch_inferior_registers): Likewise.
1815 (old_store_inferior_registers): Likewise.
1816 (store_regs): Likewise.
1817 * m68k-tdep.c (m68k_svr4_extract_return_value): Likewise.
1818 (m68k_svr4_store_return_value): Likewise.
1819 * m88k-tdep.c (m88k_store_arguments): Likewise.
1820 * mi/mi-main.c (mi_cmd_data_list_changed_registers): Likewise.
1821 (mi_cmd_data_write_register_values): Likewise.
1822 * mips-fbsd-nat.c (mips_fbsd_fetch_inferior_registers): Likewise.
1823 (mips_fbsd_store_inferior_registers): Likewise.
1824 * mips-fbsd-tdep.c (mips_fbsd_supply_fpregs): Likewise.
1825 (mips_fbsd_supply_gregs): Likewise.
1826 (mips_fbsd_collect_fpregs): Likewise.
1827 (mips_fbsd_collect_gregs): Likewise.
1828 (mips_fbsd_supply_fpregset): Likewise.
1829 (mips_fbsd_collect_fpregset): Likewise.
1830 (mips_fbsd_supply_gregset): Likewise.
1831 (mips_fbsd_collect_gregset): Likewise.
1832 * mips-linux-nat.c (supply_gregset): Likewise.
1833 (fill_gregset): Likewise.
1834 (supply_fpregset): Likewise.
1835 (fill_fpregset): Likewise.
1836 * mips-linux-tdep.c (mips_supply_gregset): Likewise.
1837 (mips_fill_gregset): Likewise.
1838 (mips_supply_fpregset): Likewise.
1839 (mips_fill_fpregset): Likewise.
1840 (mips64_supply_gregset): Likewise.
1841 (micromips_linux_sigframe_validate): Likewise.
1842 * mips-nbsd-nat.c (mipsnbsd_fetch_inferior_registers): Likewise.
1843 (mipsnbsd_fetch_inferior_registers): Likewise.
1844 (mipsnbsd_store_inferior_registers): Likewise.
1845 * mips-nbsd-tdep.c (mipsnbsd_supply_fpregset): Likewise.
1846 (mipsnbsd_supply_gregset): Likewise.
1847 (mipsnbsd_iterate_over_regset_sections): Likewise.
1848 (mipsnbsd_supply_reg): Likewise.
1849 (mipsnbsd_supply_fpreg): Likewise.
1850 * mips-tdep.c (mips_in_frame_stub): Likewise.
1851 (mips_dummy_id): Likewise.
1852 (is_octeon_bbit_op): Likewise.
1853 (micromips_bc1_pc): Likewise.
1854 (extended_mips16_next_pc): Likewise.
1855 (mips16_next_pc): Likewise.
1856 (deal_with_atomic_sequence): Likewise.
1857 * moxie-tdep.c (moxie_process_readu): Likewise.
1858 * nios2-tdep.c (nios2_get_next_pc): Likewise.
1859 * nto-procfs.c (procfs_store_registers): Likewise.
1860 * ppc-fbsd-nat.c (ppcfbsd_fetch_inferior_registers): Likewise.
1861 (ppcfbsd_store_inferior_registers): Likewise.
1862 * ppc-linux-nat.c (fetch_vsx_register): Likewise.
1863 (fetch_altivec_register): Likewise.
1864 (get_spe_registers): Likewise.
1865 (fetch_spe_register): Likewise.
1866 (fetch_altivec_registers): Likewise.
1867 (fetch_all_gp_regs): Likewise.
1868 (fetch_all_fp_regs): Likewise.
1869 (store_vsx_register): Likewise.
1870 (store_altivec_register): Likewise.
1871 (set_spe_registers): Likewise.
1872 (store_spe_register): Likewise.
1873 (store_altivec_registers): Likewise.
1874 (store_all_gp_regs): Likewise.
1875 (store_all_fp_regs): Likewise.
1876 * ppc-linux-tdep.c (ppc_linux_supply_gregset): Likewise.
1877 (ppc_linux_collect_gregset): Likewise.
1878 (ppc_canonicalize_syscall): Likewise.
1879 (ppc_linux_record_signal): Likewise.
1880 (ppu2spu_prev_register): Likewise.
1881 * ppc-nbsd-nat.c (ppcnbsd_supply_pcb): Likewise.
1882 * ppc-obsd-nat.c (ppcobsd_fetch_registers): Likewise.
1883 (ppcobsd_store_registers): Likewise.
1884 * ppc-ravenscar-thread.c (ppc_ravenscar_generic_fetch_registers):
1886 (ppc_ravenscar_generic_store_registers): Likewise.
1887 * procfs.c (procfs_fetch_registers): Likewise.
1888 (procfs_store_registers): Likewise.
1889 * ravenscar-thread.c (ravenscar_fetch_registers): Likewise.
1890 (ravenscar_store_registers): Likewise.
1891 (ravenscar_prepare_to_store): Likewise.
1892 * record-btrace.c (record_btrace_fetch_registers): Likewise.
1893 * record-full.c (record_full_wait_1): Likewise.
1894 (record_full_registers_change): Likewise.
1895 (record_full_store_registers): Likewise.
1896 (record_full_core_fetch_registers): Likewise.
1897 (record_full_save): Likewise.
1898 (record_full_goto_insn): Likewise.
1899 * regcache.c (regcache_register_size): Likewise.
1900 (get_regcache_arch): Remove.
1901 (regcache_read_pc): Likewise.
1902 * regcache.h (get_regcache_arch): Remove.
1903 * remote-sim.c (gdbsim_fetch_register): Likewise.
1904 (gdbsim_store_register): Likewise.
1905 * remote.c (fetch_register_using_p): Likewise.
1906 (send_g_packet): Likewise.
1907 (remote_prepare_to_store): Likewise.
1908 (store_registers_using_G): Likewise.
1909 * reverse.c (save_bookmark_command): Likewise.
1910 (goto_bookmark_command): Likewise.
1911 * rs6000-aix-tdep.c (branch_dest): Likewise.
1912 * rs6000-nat.c (rs6000_ptrace64): Likewise.
1913 (fetch_register): Likewise.
1914 * rs6000-tdep.c (ppc_supply_reg): Likewise.
1915 (ppc_collect_reg): Likewise.
1916 (ppc_collect_gregset): Likewise.
1917 (ppc_collect_fpregset): Likewise.
1918 (ppc_collect_vsxregset): Likewise.
1919 (ppc_collect_vrregset): Likewise.
1920 (ppc_displaced_step_hw_singlestep): Likewise.
1921 (rs6000_pseudo_register_read): Likewise.
1922 (rs6000_pseudo_register_write): Likewise.
1923 * s390-linux-nat.c (supply_gregset): Likewise.
1924 (fill_gregset): Likewise.
1925 (s390_linux_fetch_inferior_registers): Likewise.
1926 * s390-linux-tdep.c (s390_write_pc): Likewise.
1927 (s390_software_single_step): Likewise.
1928 (s390_all_but_pc_registers_record): Likewise.
1929 (s390_linux_syscall_record): Likewise.
1930 * sentinel-frame.c (sentinel_frame_prev_arch): Likewise.
1931 * sh-nbsd-nat.c (shnbsd_fetch_inferior_registers): Likewise.
1932 (shnbsd_store_inferior_registers): Likewise.
1933 * sh-tdep.c (sh_extract_return_value_nofpu): Likewise.
1934 (sh_extract_return_value_fpu): Likewise.
1935 (sh_store_return_value_nofpu): Likewise.
1936 (sh_corefile_supply_regset): Likewise.
1937 (sh_corefile_collect_regset): Likewise.
1938 * sh64-tdep.c (sh64_extract_return_value): Likewise.
1939 (sh64_store_return_value): Likewise.
1940 * sparc-linux-tdep.c (sparc32_linux_collect_core_fpregset): Likewise.
1941 * sparc-nat.c (sparc_fetch_inferior_registers): Likewise.
1942 (sparc_store_inferior_registers): Likewise.
1943 * sparc-ravenscar-thread.c (register_in_thread_descriptor_p): Likewise.
1944 (sparc_ravenscar_prepare_to_store): Likewise.
1945 * sparc-tdep.c (sparc32_store_arguments): Likewise.
1946 (sparc_analyze_control_transfer): Likewise.
1947 (sparc_step_trap): Likewise.
1948 (sparc_software_single_step): Likewise.
1949 (sparc32_gdbarch_init): Likewise.
1950 (sparc_supply_rwindow): Likewise.
1951 (sparc_collect_rwindow): Likewise.
1952 * sparc64-linux-tdep.c (sparc64_linux_collect_core_fpregset): Likewise.
1953 * sparc64-nbsd-nat.c (sparc64nbsd_supply_gregset): Likewise.
1954 (sparc64nbsd_collect_gregset): Likewise.
1955 (sparc64nbsd_supply_fpregset): Likewise.
1956 (sparc64nbsd_collect_fpregset): Likewise.
1957 * sparc64-tdep.c (sparc64_store_arguments): Likewise.
1958 (sparc64_supply_gregset): Likewise.
1959 (sparc64_collect_gregset): Likewise.
1960 (sparc64_supply_fpregset): Likewise.
1961 (sparc64_collect_fpregset): Likewise.
1962 * spu-linux-nat.c (spu_fetch_inferior_registers): Likewise.
1963 * spu-tdep.c (spu_unwind_sp): Likewise.
1964 (spu2ppu_prev_register): Likewise.
1965 (spu_memory_remove_breakpoint): Likewise.
1966 * stack.c (return_command): Likewise.
1967 * tic6x-tdep.c (tic6x_extract_signed_field): Likewise.
1968 * tracefile-tfile.c (tfile_fetch_registers): Likewise.
1969 * tracefile.c (trace_save_ctf): Likewise.
1970 * windows-nat.c (do_windows_fetch_inferior_registers): Likewise.
1971 (do_windows_store_inferior_registers): Likewise.
1972 (windows_resume): Likewise.
1973 * xtensa-linux-nat.c (fill_gregset): Likewise.
1974 (supply_gregset_reg): Likewise.
1975 * xtensa-tdep.c (xtensa_register_write_masked): Likewise.
1976 (xtensa_register_read_masked): Likewise.
1977 (xtensa_supply_gregset): Likewise.
1978 (xtensa_extract_return_value): Likewise.
1979 (xtensa_store_return_value): Likewise.
1981 2017-10-25 Ulrich Weigand <uweigand@de.ibm.com>
1983 * doublest.c (floatformat_from_string): New function.
1984 * doublest.h (floatformat_from_string): Add prototype.
1986 * std-operator.def (OP_DOUBLE, OP_DECFLOAT): Remove, replace by ...
1987 (OP_FLOAT): ... this.
1988 * expression.h: Do not include "doublest.h".
1989 (union exp_element): Replace doubleconst and decfloatconst by
1990 new element floatconst.
1991 * ada-lang.c (resolve_subexp): Handle OP_FLOAT instead of OP_DOUBLE.
1992 (ada_evaluate_subexp): Likewise.
1993 * eval.c (evaluate_subexp_standard): Handle OP_FLOAT instead of
1994 OP_DOUBLE and OP_DECFLOAT.
1995 * expprint.c (print_subexp_standard): Likewise.
1996 (dump_subexp_body_standard): Likewise.
1997 * breakpoint.c (watchpoint_exp_is_const): Likewise.
1999 * parse.c: Include "dfp.h".
2000 (write_exp_elt_dblcst, write_exp_elt_decfloatcst): Remove.
2001 (write_exp_elt_floatcst): New function.
2002 (operator_length_standard): Handle OP_FLOAT instead of OP_DOUBLE
2004 (operator_check_standard): Likewise.
2005 (parse_float): Do not accept suffix. Take type as input. Return bool.
2006 Return target format buffer instead of host DOUBLEST.
2007 Use floatformat_from_string and decimal_from_string to parse
2008 either binary or decimal floating-point types.
2009 (parse_c_float): Remove.
2010 * parser-defs.h: Do not include "doublest.h".
2011 (write_exp_elt_dblcst, write_exp_elt_decfloatcst): Remove.
2012 (write_exp_elt_floatcst): Add prototype.
2013 (parse_float): Update prototype.
2014 (parse_c_float): Remove.
2016 * c-exp.y: Do not include "dfp.h".
2017 (typed_val_float): Use byte buffer instead of DOUBLEST.
2018 (typed_val_decfloat): Remove.
2020 (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
2021 (parse_number): Update to new parse_float interface.
2022 Parse suffixes and determine type before calling parse_float.
2023 Handle decimal and binary FP types the same way.
2025 * d-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
2026 (FLOAT_LITERAL): Use OP_FLOAT and write_exp_elt_floatcst.
2027 (parse_number): Update to new parse_float interface.
2028 Parse suffixes and determine type before calling parse_float.
2030 * f-exp.y: Replace dval by typed_val_float.
2031 (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
2032 (parse_number): Use parse_float instead of atof.
2034 * go-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
2035 (parse_go_float): Remove.
2036 (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
2037 (parse_number): Call parse_float instead of parse_go_float.
2038 Parse suffixes and determine type before calling parse_float.
2040 * p-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
2041 (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
2042 (parse_number): Update to new parse_float interface.
2043 Parse suffixes and determine type before calling parse_float.
2045 * m2-exp.y: Replace dval by byte buffer val.
2046 (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
2047 (parse_number): Call parse_float instead of atof.
2049 * rust-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
2050 (lex_number): Call parse_float instead of strtod.
2051 (ast_dliteral): Use OP_FLOAT instead of OP_DOUBLE.
2052 (convert_ast_to_expression): Handle OP_FLOAT instead of OP_DOUBLE.
2053 Use write_exp_elt_floatcst.
2054 (unit_testing): Remove static variable.
2055 (rust_type): Do not check unit_testing.
2056 (rust_lex_tests): Do not set uint_testing. Set up dummy rust_parser.
2058 * ada-exp.y (type_float, type_double): Remove.
2059 (typed_val_float): Use byte buffer instead of DOUBLEST.
2060 (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
2061 * ada-lex.l (processReal): Use parse_float instead of sscanf.
2063 2017-10-25 Alan Hayward <alan.hayward@arm.com>
2065 * aarch64-tdep.h (enum aarch64_regnum): Remove.
2066 * arch/aarch64.h: New file.
2068 2017-10-24 Ulrich Weigand <uweigand@de.ibm.com>
2070 * dfp.h (decimal_from_string): Use const reference for argument.
2071 * dfp.c (decimal_from_string): Likewise.
2073 2017-10-24 Ulrich Weigand <uweigand@de.ibm.com>
2075 * i387-tdep.c (print_i387_value): Use floatformat_to_string.
2076 * sh64-tdep.c (sh64_do_fp_register): Likewise.
2077 * mips-tdep.c (mips_print_fp_register): Likewise.
2079 2017-10-24 Ulrich Weigand <uweigand@de.ibm.com>
2081 * common/format.h (enum argclass): Replace decfloat_arg by
2082 dec32float_arg, dec64float_arg, and dec128float_arg.
2083 * common/format.c (parse_format_string): Update to return
2084 new decimal float argument classes.
2086 * printcmd.c (printf_decfloat): Rename to ...
2087 (printf_floating): ... this. Add argclass argument, and use it
2088 instead of parsing the format string again. Add support for
2089 binary floating-point values, using floatformat_to_string.
2090 Convert value to the target format if it doesn't already match.
2091 (ui_printf): Call printf_floating instead of printf_decfloat,
2092 also for double_arg / long_double_arg. Pass argclass.
2094 * dfp.c (decimal_to_string): Add format string argument.
2095 * dfp.h (decimal_to_string): Likewise.
2097 * doublest.c (floatformat_to_string): Add format string argument.
2098 * doublest.h (floatformat_to_string): Likewise.
2100 2017-10-24 Ulrich Weigand <uweigand@de.ibm.com>
2102 * doublest.c (floatformat_precision): New routine.
2103 (floatformat_to_string): Likewise.
2104 * doublest.c (floatformat_to_string): Add prototype.
2106 * printcmd.c (print_scalar_formatted): Only call print_floating
2107 on floating-point types.
2108 * valprint.c: Do not include "floatformat.h".
2109 (generic_val_print_decfloat): Remove.
2110 (generic_val_print): Call generic_val_print_float for both
2111 TYPE_CODE_FLT and TYPE_CODE_DECFLOAT.
2112 (print_floating): Use floatformat_to_string. Handle decimal float.
2113 (print_decimal_floating): Remove, merge into floatformat_to_string.
2114 * value.h (print_decimal_floating): Remove.
2116 * Makefile.in: Do not build doublest.c with -Wformat-nonliteral.
2118 2017-10-24 Ulrich Weigand <uweigand@de.ibm.com>
2120 * buildsym.c (end_symtab_get_static_block): Use std::stable_sort.
2122 2017-10-21 Simon Marchi <simon.marchi@ericsson.com>
2124 * memattr.h: Don't include vec.h.
2125 (struct mem_attrib): Initialize fields.
2126 <unknown>: New static method.
2127 (struct mem_region): Add constructors, operator<, initialize
2129 * memattr.c: Include algorithm.
2130 (default_mem_attrib, unknown_mem_attrib): Remove.
2131 (user_mem_region_list): New global.
2132 (target_mem_region_list, mem_region_list): Change type to
2133 std::vector<mem_region>.
2134 (mem_use_target): Now a function.
2135 (target_mem_regions_valid): Change type to bool.
2136 (mem_region_lessthan, mem_region_cmp, mem_region_init): Remove.
2137 (require_user_regions): Adjust.
2138 (require_target_regions): Adjust.
2139 (create_mem_region): Adjust.
2140 (lookup_mem_region): Adjust.
2141 (invalidate_target_mem_regions): Adjust.
2142 (mem_clear): Rename to...
2143 (user_mem_clear): ... this, and adjust.
2144 (mem_command): Adjust.
2145 (info_mem_command): Adjust.
2146 (mem_enable, enable_mem_command, mem_disable,
2147 disable_mem_command): Adjust.
2148 (mem_delete): Adjust.
2149 (delete_mem_command): Adjust.
2150 * memory-map.h (parse_memory_map): Return an std::vector.
2151 * memory-map.c (parse_memory_map): Likewise.
2152 (struct memory_map_parsing_data): Add constructor.
2153 <memory_map>: Point to std::vector.
2154 (memory_map_start_memory): Adjust.
2155 (memory_map_end_memory): Adjust.
2156 (memory_map_end_property): Adjust.
2157 (clear_result): Remove.
2158 * remote.c (remote_memory_map): Return an std::vector.
2159 * target-debug.h (target_debug_print_VEC_mem_region_s__p):
2161 (target_debug_print_mem_region_vector): New.
2162 * target-delegates.c: Regenerate.
2163 * target.h (mem_region_vector): New typedef.
2164 (to_memory_map): Return mem_region_vector.
2165 (target_memory_map): Return an std::vector.
2166 * target.c (target_memory_map): Return an std::vector.
2167 (flash_erase_command): Adjust.
2169 2017-10-21 Simon Marchi <simon.marchi@ericsson.com>
2171 * memory-map.c (struct memory_map_parsing_data) <property_name>:
2172 Change type to std::string.
2173 (memory_map_start_property): Adjust.
2174 (memory_map_end_property): Adjust.
2176 2017-10-21 Simon Marchi <simon.marchi@polymtl.ca>
2178 * infrun.h: Include common/byte-vector.h.
2179 (struct displaced_step_closure): New struct.
2180 (struct buf_displaced_step_closure): New struct.
2181 * infrun.c (displaced_step_closure::~displaced_step_closure):
2182 Provide default implementation.
2183 (displaced_step_clear): Deallocate step closure with delete.
2184 * aarch64-tdep.c (displaced_step_closure): Rename to ...
2185 (aarch64_displaced_step_closure): ... this, extend
2186 displaced_step_closure.
2187 (aarch64_displaced_step_data) <dsc>: Change type to
2188 aarch64_displaced_step_closure.
2189 (aarch64_displaced_step_copy_insn): Adjust to type change, use
2191 (aarch64_displaced_step_fixup): Add cast for displaced step
2193 * amd64-tdep.c (displaced_step_closure): Rename to ...
2194 (amd64_displaced_step_closure): ... this, extend
2195 displaced_step_closure.
2196 <insn_buf>: Change type to std::vector<gdb_byte>.
2198 (fixup_riprel): Change type of DSC parameter, adjust to type
2200 (fixup_displaced_copy): Change type of DSC parameter.
2201 (amd64_displaced_step_copy_insn): Instantiate
2202 amd64_displaced_step_closure.
2203 (amd64_displaced_step_fixup): Add cast for closure type, adjust
2204 to type change of insn_buf.
2205 * arm-linux-tdep.c (arm_linux_cleanup_svc): Change type of
2207 (arm_linux_copy_svc): Likewise.
2208 (cleanup_kernel_helper_return): Likewise.
2209 (arm_catch_kernel_helper_return): Likewise.
2210 (arm_linux_displaced_step_copy_insn): Instantiate
2211 arm_displaced_step_closure.
2212 * arm-tdep.c (arm_pc_is_thumb): Add cast for closure.
2213 (displaced_read_reg): Change type of parameter DSC.
2214 (branch_write_pc): Likewise.
2215 (load_write_pc): Likewise.
2216 (alu_write_pc): Likewise.
2217 (displaced_write_reg): Likewise.
2218 (arm_copy_unmodified): Likewise.
2219 (thumb_copy_unmodified_32bit): Likewise.
2220 (thumb_copy_unmodified_16bit): Likewise.
2221 (cleanup_preload): Likewise.
2222 (install_preload): Likewise.
2223 (arm_copy_preload): Likewise.
2224 (thumb2_copy_preload): Likewise.
2225 (install_preload_reg): Likewise.
2226 (arm_copy_preload_reg): Likewise.
2227 (cleanup_copro_load_store): Likewise.
2228 (install_copro_load_store): Likewise.
2229 (arm_copy_copro_load_store) Likewise.
2230 (thumb2_copy_copro_load_store): Likewise.
2231 (cleanup_branch): Likewise.
2232 (install_b_bl_blx): Likewise.
2233 (arm_copy_b_bl_blx): Likewise.
2234 (thumb2_copy_b_bl_blx): Likewise.
2235 (thumb_copy_b): Likewise.
2236 (install_bx_blx_reg): Likewise.
2237 (arm_copy_bx_blx_reg): Likewise.
2238 (thumb_copy_bx_blx_reg): Likewise.
2239 (cleanup_alu_imm): Likewise.
2240 (arm_copy_alu_imm): Likewise.
2241 (thumb2_copy_alu_imm): Likewise.
2242 (cleanup_alu_reg): Likewise.
2243 (install_alu_reg): Likewise.
2244 (arm_copy_alu_reg): Likewise.
2245 (thumb_copy_alu_reg): Likewise.
2246 (cleanup_alu_shifted_reg): Likewise.
2247 (install_alu_shifted_reg): Likewise.
2248 (arm_copy_alu_shifted_reg): Likewise.
2249 (cleanup_load): Likewise.
2250 (cleanup_store): Likewise.
2251 (arm_copy_extra_ld_st): Likewise.
2252 (install_load_store): Likewise.
2253 (thumb2_copy_load_literal): Likewise.
2254 (thumb2_copy_load_reg_imm): Likewise.
2255 (arm_copy_ldr_str_ldrb_strb): Likewise.
2256 (cleanup_block_load_all): Likewise.
2257 (cleanup_block_store_pc): Likewise.
2258 (cleanup_block_load_pc): Likewise.
2259 (arm_copy_block_xfer): Likewise.
2260 (thumb2_copy_block_xfer): Likewise.
2261 (cleanup_svc): Likewise.
2262 (install_svc): Likewise.
2263 (arm_copy_svc): Likewise.
2264 (thumb_copy_svc): Likewise.
2265 (arm_copy_undef): Likewise.
2266 (thumb_32bit_copy_undef): Likewise.
2267 (arm_copy_unpred): Likewise.
2268 (arm_decode_misc_memhint_neon): Likewise.
2269 (arm_decode_unconditional): Likewise.
2270 (arm_decode_miscellaneous): Likewise.
2271 (arm_decode_dp_misc): Likewise.
2272 (arm_decode_ld_st_word_ubyte): Likewise.
2273 (arm_decode_media): Likewise.
2274 (arm_decode_b_bl_ldmstm): Likewise.
2275 (arm_decode_ext_reg_ld_st): Likewise.
2276 (thumb2_decode_dp_shift_reg): Likewise.
2277 (thumb2_decode_ext_reg_ld_st): Likewise.
2278 (arm_decode_svc_copro): Likewise.
2279 (thumb2_decode_svc_copro): Likewise.
2280 (install_pc_relative): Likewise.
2281 (thumb_copy_pc_relative_16bit): Likewise.
2282 (thumb_decode_pc_relative_16bit): Likewise.
2283 (thumb_copy_pc_relative_32bit): Likewise.
2284 (thumb_copy_16bit_ldr_literal): Likewise.
2285 (thumb_copy_cbnz_cbz): Likewise.
2286 (thumb2_copy_table_branch): Likewise.
2287 (cleanup_pop_pc_16bit_all): Likewise.
2288 (thumb_copy_pop_pc_16bit): Likewise.
2289 (thumb_process_displaced_16bit_insn): Likewise.
2290 (decode_thumb_32bit_ld_mem_hints): Likewise.
2291 (thumb_process_displaced_32bit_insn): Likewise.
2292 (thumb_process_displaced_insn): Likewise.
2293 (arm_process_displaced_insn): Likewise.
2294 (arm_displaced_init_closure): Likewise.
2295 (arm_displaced_step_fixup): Add cast for closure.
2296 * arm-tdep.h: Include infrun.h.
2297 (displaced_step_closure): Rename to ...
2298 (arm_displaced_step_closure): ... this, extend
2299 displaced_step_closure.
2300 <u::svc::copy_svc_os>: Change type of parameter DSC.
2301 <cleanup>: Likewise.
2302 (arm_process_displaced_insn): Likewise.
2303 (arm_displaced_init_closure): Likewise.
2304 (displaced_read_reg): Likewise.
2305 (displaced_write_reg): Likewise.
2306 * i386-linux-tdep.c (i386_linux_displaced_step_copy_insn):
2308 * i386-tdep.h: Include infrun.h.
2309 (i386_displaced_step_closure): New typedef.
2310 * i386-tdep.c (i386_displaced_step_copy_insn): Use
2311 i386_displaced_step_closure.
2312 (i386_displaced_step_fixup): Adjust.
2313 * rs6000-tdep.c (ppc_displaced_step_closure): New typedef.
2314 (ppc_displaced_step_copy_insn): Use ppc_displaced_step_closure
2316 (ppc_displaced_step_fixup): Adjust.
2317 * s390-linux-tdep.c (s390_displaced_step_closure): New typedef.
2318 (s390_displaced_step_copy_insn): Use s390_displaced_step_closure
2320 (s390_displaced_step_fixup): Adjust.
2322 2017-10-21 Simon Marchi <simon.marchi@polymtl.ca>
2324 * interps.h (interp_resume, interp_suspend, interp_set_temp):
2325 Remove declarations.
2327 2017-10-20 Tom Tromey <tom@tromey.com>
2329 * gdb_bfd.c (struct gdb_bfd_data) <included_bfds>: Now a
2331 (gdb_bfd_record_inclusion): Update.
2332 (bfdp): Remove typedef.
2334 2017-10-20 Tom Tromey <tom@tromey.com>
2336 * gdb_bfd.c (gdb_bfd_ref): Use new.
2337 (struct gdb_bfd_data): Add constructor, destructor, and member
2339 (gdb_bfd_unref): Use delete.
2341 2017-10-20 Tom Tromey <tom@tromey.com>
2343 * exec.c (exec_file_attach): Use new_bfd_ref.
2344 * symfile-mem.c (symbol_file_add_from_memory): Use new_bfd_ref.
2345 * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
2346 (gdb_bfd_openw, gdb_bfd_openr_iovec, gdb_bfd_fdopenr): Use
2348 * gdb_bfd.h (new_bfd_ref): New function.
2350 2017-10-20 Pedro Alves <palves@redhat.com>
2352 * main.c (captured_command_loop): Add attribute noinline.
2354 2017-10-19 Simon Marchi <simon.marchi@ericsson.com>
2356 * interps.c (struct interp_factory): Add constructor.
2357 (interp_factory_p): Remove typedef.
2358 (DEF_VEC_P(interp_factory_p)): Remove.
2359 (interpreter_factories): Change type to std::vector.
2360 (interp_factory_register): Adjust.
2361 (interp_lookup): Adjust.
2362 (interpreter_completer): Adjust.
2364 2017-10-19 Tom Tromey <tom@tromey.com>
2366 * break-catch-syscall.c (catch_syscall_completer): Use
2367 std::string, gdb::unique_xmalloc_ptr.
2369 2017-10-19 Tom Tromey <tom@tromey.com>
2371 * infcall.c (call_function_by_hand_dummy): Use std::string.
2373 2017-10-19 Tom Tromey <tom@tromey.com>
2375 * mi/mi-main.c (mi_cmd_execute): Update.
2376 * top.h (prepare_execute_command): Return scoped_value_mark.
2377 * value.h (class scoped_value_mark): Use DISABLE_COPY_AND_ASSIGN.
2378 Add move constructor.
2379 * top.c (prepare_execute_command): Return scoped_value_mark.
2380 (execute_command): Update.
2382 2017-10-19 Pedro Alves <palves@redhat.com>
2384 * xml-support.c (xml_fetch_content_from_file): Check fread's
2387 2017-10-19 Pedro Alves <palves@redhat.com>
2389 * ser-base.c (ser_base_read_error_fd): Delete the file handler if
2391 (handle_error_fd): New function.
2392 (ser_base_async): Add/delete an event loop file handler for
2395 2017-10-19 Pedro Alves <palves@redhat.com>
2397 * xml-support.c (xml_fetch_content_from_file): Don't read in
2398 chunks. Instead use fseek to determine the file's size, and read
2401 2017-11-18 Keith Seitz <keiths@redhat.com>
2403 * c-exp.y (oper): Canonicalize conversion operators of user-defined
2405 Add whitespace to front of type name.
2407 2017-10-18 Keith Seitz <keiths@redhat.com>
2409 * dwarf2read.c (dwarf2_add_typedef): Issue a complaint on unhandled
2410 DW_AT_accessibility.
2412 2017-10-18 Yao Qi <yao.qi@linaro.org>
2414 * features/tic6x-c62x-linux.c: Remove.
2416 2017-10-17 Tom Tromey <tom@tromey.com>
2418 * disasm.c (do_mixed_source_and_assembly_deprecated): Use
2419 gdb::optional, ui_out_emit_list, ui_out_emit_tuple.
2420 (do_mixed_source_and_assembly): Likewise.
2422 2017-10-17 Tom Tromey <tom@tromey.com>
2424 * regcache.c (regcache::xfer_part): Remove assertion.
2426 2017-10-17 Pedro Alves <palves@redhat.com>
2428 * xml-support.c (xml_fetch_content_from_file): Call
2429 unique_ptr::release() instead unique_ptr::get() when passing
2432 2017-10-17 Yao Qi <yao.qi@linaro.org>
2434 * regcache.c (regcache::xfer_part): Remove parameters read and
2435 write, add parameter is_raw. All callers are updated.
2437 2017-10-16 Keith Seitz <keiths@redhat.com>
2439 * c-typeprint.c (enum access_specifier): Moved here from
2441 (output_access_specifier): New function.
2442 (c_type_print_base): Consider typedefs when assessing
2443 whether access labels are needed.
2444 Use output_access_specifier as needed.
2445 Output access specifier for typedefs, if needed.
2446 * dwarf2read.c (dwarf2_add_typedef): Record DW_AT_accessibility.
2447 * gdbtypes.h (struct typedef_field) <is_protected, is_private>: New
2449 (TYPE_TYPEDEF_FIELD_PROTECTED, TYPE_TYPEDEF_FIELD_PRIVATE): New
2452 2017-10-16 Tom Tromey <tom@tromey.com>
2454 * linux-tdep.c (linux_info_proc, linux_find_memory_regions_full)
2455 (linux_fill_prpsinfo, linux_vsyscall_range_raw): Update.
2456 * target.c (target_fileio_read_stralloc): Update.
2457 * sparc64-tdep.c (adi_is_addr_mapped): Update.
2458 * target.h (target_fileio_read_stralloc): Return
2461 2017-10-16 Tom Tromey <tom@tromey.com>
2463 * xml-syscall.c (xml_init_syscalls_info): Update.
2464 * xml-support.c (xinclude_start_include): Update.
2465 (xml_fetch_content_from_file): Return unique_xmalloc_ptr.
2466 * xml-support.h (xml_fetch_another): Return unique_xmalloc_ptr.
2467 (xml_fetch_content_from_file): Likewise.
2468 * osdata.c (get_osdata): Update.
2469 * target.h (target_read_stralloc, target_get_osdata): Return
2471 * solib-aix.c (solib_aix_get_library_list): Update.
2472 * solib-target.c (solib_target_current_sos): Update.
2473 * solib-svr4.c (svr4_current_sos_via_xfer_libraries): Update.
2474 * xml-tdesc.c (fetch_available_features_from_target): Update.
2475 (target_fetch_description_xml): Update.
2476 (file_read_description_xml): Update.
2477 * remote.c (remote_get_threads_with_qxfer, remote_memory_map)
2478 (remote_traceframe_info, btrace_read_config, remote_read_btrace)
2479 (remote_pid_to_exec_file): Update.
2480 * target.c (target_read_stralloc): Return unique_xmalloc_ptr.
2481 (target_get_osdata): Likewise.
2483 2017-10-16 Tom Tromey <tom@tromey.com>
2485 * remote.c (remote_register_number_and_offset): Use std::vector.
2486 (remote_set_syscall_catchpoint): Use gdb::unique_xmalloc_ptr.
2487 (putpkt_binary): Use gdb::def_vector.
2488 (compare_sections_command): Use gdb::byte_vector.
2490 2017-10-16 Tom Tromey <tom@tromey.com>
2492 * ppc-linux-nat.c (hwdebug_insert_point): Use
2493 gdb::unique_xmalloc_ptr, XDUP.
2495 2017-10-16 Tom Tromey <tom@tromey.com>
2497 * probe.c (parse_probes): Use std::string.
2498 (info_probes_for_ops, enable_probes_command)
2499 (disable_probes_command): Remove cleanups.
2501 2017-10-16 Tom Tromey <tom@tromey.com>
2503 * buildsym.c (block_compar): Remove.
2504 (end_symtab_get_static_block): Use std::vector.
2506 2017-10-16 Simon Marchi <simon.marchi@ericsson.com>
2508 * memrange.h (struct mem_range): Define operator< and operator==.
2509 (mem_range_s): Remove.
2510 (DEF_VEC_O (mem_range_s)): Remove.
2511 (normalize_mem_ranges): Change parameter type to std::vector.
2512 * memrange.c (compare_mem_ranges): Remove.
2513 (normalize_mem_ranges): Change parameter type to std::vector,
2514 adjust to vector change.
2515 * exec.c (section_table_available_memory): Return vector, remove
2517 (section_table_read_available_memory): Adjust to std::vector
2519 * remote.c (remote_read_bytes): Adjust to std::vector
2521 * tracepoint.h (traceframe_available_memory): Change parameter
2522 type to std::vector.
2523 * tracepoint.c (traceframe_available_memory): Change parameter
2524 type to std::vector, adjust.
2525 * gdb/mi/mi-main.c (mi_cmd_trace_frame_collected): Adjust to
2527 * gdb/Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
2528 unittests/memrange-selftests.c.
2529 (SUBDIR_UNITTESTS_OBS): Add memrange-selftests.o.
2530 * gdb/unittests/memrange-selftests.c: New file.
2532 2017-10-16 Pedro Alves <palves@redhat.com>
2534 * elfread.c (probe_key_free): Rename range-for variable.
2535 * probe.c (parse_probes_in_pspace, find_probes_in_objfile)
2536 (find_probe_by_pc, collect_probes): Rename range-for variable.
2538 2017-10-16 Yao Qi <yao.qi@linaro.org>
2540 * features/Makefile (XMLTOC): Remove tic6x-*.xml.
2541 * features/tic6x-c62x.c: Remove.
2542 * features/tic6x-c64x-linux.c: Remove.
2543 * features/tic6x-c64x.c: Remove.
2544 * features/tic6x-c64xp-linux.c: Remove.
2545 * features/tic6x-c64xp.c: Remove.
2546 * tic6x-linux-tdep.c (_initialize_tic6x_linux_tdep): Don't call
2547 initialize_tdesc_tic6x_*_linux functions.
2548 * tic6x-tdep.c (_initialize_tic6x_tdep): Don't call
2549 initialize_tdesc_tic6x_* functions.
2551 2017-10-16 Yao Qi <yao.qi@linaro.org>
2553 * features/Makefile (WHICH): Remove tic6x-c64xp, tic6x-c64x
2555 * regformats/tic6x-c62x.dat: Remove.
2556 * regformats/tic6x-c64x.dat: Remove.
2557 * regformats/tic6x-c64xp.dat: Remove.
2559 2017-10-15 Simon Marchi <simon.marchi@ericsson.com>
2561 * tracepoint.c (parse_traceframe_info): Return a unique_ptr
2562 (the !HAVE_LIBEXPAT version).
2564 2017-10-14 Simon Marchi <simon.marchi@ericsson.com>
2566 * nat/linux-osdata.c (struct pid_pgid_entry) <operator<>: Make
2569 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
2571 * target.h: Include tracepoint.h.
2572 (enum trace_find_type): Move to tracepoint.h.
2573 (struct target_ops) <to_traceframe_info>: Return a unique ptr.
2574 * tracepoint.h: Don't include target.h
2575 (enum trace_find_type): Move from target.h.
2576 (parse_traceframe_info): Return a unique ptr.
2577 * tracepoint.c (current_traceframe_info): Change type to unique
2579 (free_traceframe_info): Remove.
2580 (clear_traceframe_info): Don't manually free
2581 current_traceframe_info.
2582 (free_result): Remove.
2583 (parse_traceframe_info): Return a unique ptr.
2584 (get_traceframe_info): Adjust to unique ptr.
2585 * ctf.c (ctf_traceframe_info): Return a unique ptr.
2586 * remote.c (remote_traceframe_info): Return a unique ptr.
2587 * tracefile-tfile.c (tfile_traceframe_info): Return a unique
2589 * target-debug.h (target_debug_print_traceframe_info_up): New
2591 * target-delegates.c: Regenerate.
2593 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
2595 * memrange.h (struct mem_range): Add constructors.
2596 * tracepoint.h (struct traceframe_info) <memory>: Change type to
2597 std::vector<mem_range>.
2598 * tracepoint.c (free_traceframe_info): Don't manually free
2600 (traceframe_info_start_memory): Adjust to vector change.
2601 (traceframe_available_memory): Likewise.
2602 * tracefile-tfile.c (build_traceframe_info): Likewise.
2603 * ctf.c (ctf_traceframe_info): Likewise.
2605 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
2607 * tracepoint.h (struct traceframe_info) <tvars>: Change type to
2609 * tracepoint.c (free_traceframe_info): Deallocate with delete.
2610 (traceframe_info_start_tvar): Adjust to vector change.
2611 (parse_traceframe_info): Allocate with new.
2612 * ctf.c (ctf_traceframe_info): Allocate with new, adjust to
2614 * tracefile-tfile.c (build_traceframe_info): Adjust to vector
2616 tfile_traceframe_info): Allocate with new.
2617 * mi/mi-main.c (mi_cmd_trace_frame_collected): Adjust to vector
2620 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
2622 * tracepoint.c (traceframe_info): Rename to...
2623 (current_traceframe_info): ...this.
2624 (clear_traceframe_info): Adjust.
2625 (get_traceframe_info): Adjust.
2627 2017-10-14 Simon Marchi <simon.marchi@ericsson.com>
2629 * nat/linux-osdata.c: Include algorithm.
2630 (compare_processes): Remove.
2631 (struct pid_pgid_entry): New struct.
2632 (linux_xfer_osdata_processgroups): Use std::vector instead of
2635 2017-10-14 Simon Marchi <simon.marchi@ericsson.com>
2637 * objfiles.h: Don't include symfile.h.
2638 (struct partial_symbol): Remove forward-declaration.
2639 (struct objfile) <global_psymbols, static_psymbols>: Change type
2640 to std::vector<partial_symbol *>.
2641 * objfiles.c (objfile::objfile): Don't memset those fields.
2642 (objfile::~objfile): Don't free those fields.
2643 * psympriv.h (struct psymbol_allocation_list): Remove
2644 forward-declaration.
2645 (add_psymbol_to_list): Change psymbol_allocation_list parameter
2647 (start_psymtab_common): Change parameters to std::vector.
2648 * psymtab.c: Include algorithm.
2649 (require_partial_symbols): Call shrink_to_fit.
2650 (find_pc_sect_psymbol): Adjust to vector change.
2651 (match_partial_symbol): Likewise.
2652 (lookup_partial_symbol): Likewise.
2653 (psym_relocate): Likewise.
2654 (dump_psymtab): Likewise.
2655 (recursively_search_psymtabs): Likewise.
2656 (compare_psymbols): Remove.
2657 (sort_pst_symbols): Adjust to vector change.
2658 (start_psymtab_common): Likewise.
2659 (end_psymtab_common): Likewise.
2660 (psymbol_bcache_full): De-constify return value.
2661 (add_psymbol_to_bcache): Likewise.
2662 (extend_psymbol_list): Remove.
2663 (append_psymbol_to_list): Adjust to vector change.
2664 (add_psymbol_to_list): Likewise.
2665 (init_psymbol_list): Likewise.
2666 (maintenance_info_psymtabs): Likewise.
2667 (maintenance_check_psymtabs): Likewise.
2668 * symfile.h (struct psymbol_allocation_list): Remove.
2669 * symfile.c (reread_symbols): Adjust to vector change.
2670 * dbxread.c (start_psymtab): Change type of parameters.
2671 (dbx_symfile_read): Adjust to vector change.
2672 (read_dbx_symtab): Likewise.
2673 (start_psymtab): Change type of parameters.
2674 * dwarf2read.c (dwarf2_build_psymtabs): Adjust to vector change.
2675 (create_partial_symtab): Likewise.
2676 (add_partial_symbol): Likewise.
2677 (write_one_signatured_type): Likewise.
2678 (recursively_write_psymbols): Likewise.
2679 * mdebugread.c (parse_partial_symbols): Likewise.
2680 * xcoffread.c (xcoff_start_psymtab): Change type of parameters.
2681 (scan_xcoff_symtab): Adjust to vector change.
2682 (xcoff_initial_scan): Likewise.
2684 2017-10-13 Simon Marchi <simon.marchi@ericsson.com>
2686 * ada-typeprint.c (print_dynamic_range_bound): Use std::string.
2688 2017-10-13 Yao Qi <yao.qi@linaro.org>
2690 * features/Makefile: Remove tic6x-*-expedite, add tic6x-expedite.
2691 Remove s390x-*-expedite, add s390x-expedite.
2693 2017-10-13 Yao Qi <yao.qi@linaro.org>
2695 * features/s390-gs-linux64.c: Regenerated.
2696 * features/s390x-gs-linux64.c: Regenerated.
2698 2017-10-13 Tom Tromey <tom@tromey.com>
2700 * compile/compile-object-run.c (do_module_cleanup): Use delete.
2701 * solib.c (update_solib_list, reload_shared_libraries_1): Use
2703 * symfile.c (symbol_file_add_with_addrs): Use new.
2704 (symbol_file_add_separate): Update comment.
2705 (syms_from_objfile_1, remove_symbol_file_command): Use delete.
2706 * jit.c (jit_object_close_impl): Use new.
2707 (jit_unregister_code): Use delete.
2708 * objfiles.c (objfile::objfile): Rename from allocate_objfile.
2709 (~objfile): Rename from free_objfile.
2710 (free_objfile_separate_debug, do_free_objfile_cleanup)
2711 (free_all_objfiles, objfile_purge_solibs): Use delete.
2712 * objfiles.h (struct objfile): Add constructor and destructor.
2713 Use DISABLE_COPY_AND_ASSIGN. Add initializers to data members.
2714 (allocate_objfile, free_objfile): Don't declare.
2715 (struct objstats): Add initializers.
2717 2017-10-12 Simon Marchi <simon.marchi@ericsson.com>
2719 * arch-utils.h (simple_displaced_step_copy_insn): Remove.
2720 * arch-utils.c (simple_displaced_step_copy_insn): Remove.
2721 * gdbarch.sh (displaced_step_copy_insn): Adjust comment.
2722 * gdbarch.h: Regenerate.
2723 * i386-linux-tdep.c (i386_linux_displaced_step_copy_insn):
2725 * i386-tdep.c (i386_displaced_step_copy_insn): Adjust comment.
2726 (i386_displaced_step_fixup): Adjust comment.
2727 * rs6000-tdep.c (ppc_displaced_step_copy_insn): Adjust comment.
2729 2017-10-12 Tom Tromey <tom@tromey.com>
2731 * prologue-value.h (pv_area::store_would_trash): Return bool.
2732 (pv_area::find_reg): Likewise.
2733 * prologue-value.c (pv_area::store_would_trash): Return bool.
2734 (pv_area::find_reg): Likewise.
2736 2017-10-12 Tom Tromey <tom@tromey.com>
2738 * s390-linux-tdep.c (s390_store, s390_load)
2739 (s390_check_for_saved, s390_analyze_prologue): Update.
2740 * rx-tdep.c (check_for_saved, rx_analyze_prologue): Update.
2741 * rl78-tdep.c (rl78_analyze_prologue, check_for_saved): Update.
2742 * prologue-value.h (class pv_area): Move from prologue-value.c.
2743 Change names of members. Add constructor, destructor, member
2745 (make_pv_area, free_pv_area, make_cleanup_free_pv_area)
2746 (pv_area_store, pv_area_fetch, pv_area_store_would_trash)
2747 (pv_area_fetch, pv_area_scan): Don't declare.
2748 * prologue-value.c (struct pv_area::area_entry): Now member of
2750 (struct pv_area): Move to prologue-value.h.
2751 (pv_area::pv_area): Rename from make_pv_area.
2752 (pv_area::~pv_area): Rename from free_pv_area.
2753 (do_free_pv_area_cleanup, make_cleanup_free_pv_area): Remove.
2754 (clear_entries, find_entry, overlaps, store_would_trash, store)
2755 (fetch, find_reg, scan): Now member of pv_area.
2756 Remove "area" argument. Update.
2757 * msp430-tdep.c (check_for_saved, msp430_analyze_prologue):
2759 * mn10300-tdep.c (push_reg, check_for_saved)
2760 (mn10300_analyze_prologue): Update.
2761 * mep-tdep.c (is_arg_spill, check_for_saved)
2762 (mep_analyze_prologue): Update.
2763 * m32c-tdep.c (m32c_pv_push, m32c_srcdest_fetch)
2764 (m32c_srcdest_store, m32c_pv_enter, m32c_is_arg_spill)
2765 (m32c_is_struct_return, m32c_analyze_prologue): Update.
2766 * arm-tdep.c (thumb_analyze_prologue, arm_analyze_prologue):
2768 * arc-tdep.c (arc_is_in_prologue, arc_analyze_prologue): Update.
2769 * aarch64-tdep.c (aarch64_analyze_prologue): Update.
2771 2017-10-12 Simon Marchi <simon.marchi@ericsson.com>
2773 * linux-nat.h (linux_nat_set_delete_thread): New declaration.
2774 * linux-nat.c (linux_nat_delete_thread): New variable.
2775 (lwp_free): Invoke linux_nat_delete_thread if set.
2776 (linux_nat_set_delete_thread): New function.
2777 * aarch64-linux-nat.c (_initialize_aarch64_linux_nat): Assign
2778 thread delete callback.
2779 * arm-linux-nat.c (arm_linux_delete_thread): New function.
2780 (_initialize_arm_linux_nat): Assign thread delete callback.
2781 * s390-linux-nat.c (s390_delete_thread): New function.
2782 (_initialize_s390_nat): Assign thread delete callback.
2783 * x86-linux-nat.c (x86_linux_add_target): Likewise.
2784 * nat/aarch64-linux.c (aarch64_linux_delete_thread): New
2786 * nat/aarch64-linux.h (aarch64_linux_delete_thread): New
2788 * nat/x86-linux.c (x86_linux_delete_thread): New function.
2789 * nat/x86-linux.h (x86_linux_delete_thread): New declaration.
2791 2017-10-09 Tom Tromey <tom@tromey.com>
2793 * tui/tui-win.c (tui_set_win_height, parse_scrolling_args): Use
2795 * tui/tui-layout.c (enum tui_status): Use std::string.
2797 2017-10-11 Tom Tromey <tom@tromey.com>
2799 * gdbthread.h (thread_command): Constify.
2800 * inferior.h (detach_command): Constify.
2801 * top.h (set_history, show_history): Constify.
2802 * arm-tdep.c (set_arm_command, show_arm_command): Constify.
2803 * serial.c (serial_set_cmd, serial_show_cmd): Constify.
2804 * bsd-kvm.c (bsd_kvm_cmd): Constify.
2805 * printcmd.c (set_command): Constify.
2806 (non_const_set_command): New function.
2807 * dcache.c (set_dcache_command, show_dcache_command): Constify.
2808 * breakpoint.c (enable_command, disable_command, delete_command)
2809 (catch_command, tcatch_command, set_breakpoint_cmd)
2810 (show_breakpoint_cmd): Constify.
2811 * macrocmd.c (macro_command): Constify.
2812 * infcmd.c (unset_command, kill_command, detach_command)
2813 (info_proc_cmd): Constify.
2814 * i386-tdep.c (set_mpx_cmd, show_mpx_cmd): Constify.
2815 * auto-load.c (show_auto_load_cmd, set_auto_load_cmd)
2816 (info_auto_load_cmd): Constify.
2817 * target-descriptions.c (set_tdesc_cmd, show_tdesc_cmd)
2818 (unset_tdesc_cmd): Constify.
2819 * ada-lang.c (set_ada_command, show_ada_command)
2820 (maint_set_ada_cmd, maint_show_ada_cmd): Constify.
2821 * guile/guile.c (set_guile_command, show_guile_command)
2822 (info_guile_command): Constify.
2823 * tui/tui-win.c (tui_command, set_tui_cmd, show_tui_cmd):
2825 * skip.c (skip_command): Constify.
2826 * compile/compile.c (_initialize_compile): Constify.
2827 * dwarf2read.c (set_dwarf_cmd, show_dwarf_cmd): Constify.
2828 * btrace.c (maint_btrace_cmd, maint_btrace_set_cmd)
2829 (maint_btrace_show_cmd, maint_btrace_pt_set_cmd)
2830 (maint_btrace_pt_show_cmd): Constify.
2831 * remote.c (set_remote_cmd, show_remote_cmd, remote_command):
2833 * python/python.c (user_show_python, user_set_python): Constify.
2834 * mips-tdep.c (set_mips_command, show_mips_command)
2835 (set_mipsfpu_command): Constify.
2836 * record-btrace.c (cmd_record_btrace_start)
2837 (cmd_set_record_btrace, cmd_show_record_btrace)
2838 (cmd_set_record_btrace_bts, cmd_show_record_btrace_bts)
2839 (cmd_set_record_btrace_pt, cmd_show_record_btrace_pt): Constify.
2840 * rs6000-tdep.c (set_powerpc_command, show_powerpc_command):
2842 * symfile.c (overlay_command): Constify.
2843 * spu-tdep.c (set_spu_command, show_spu_command): Constify.
2844 * cli/cli-logging.c (set_logging_command, show_logging_command):
2846 * cli/cli-dump.c (dump_command, append_command)
2847 (srec_dump_command, ihex_dump_command, verilog_dump_command)
2848 (tekhex_dump_command, binary_dump_command)
2849 (binary_append_command): Constify.
2850 * cli/cli-decode.c (struct cmd_list_element): Change type of
2852 * cli/cli-cmds.c (info_command, show_command, set_debug)
2853 (show_debug): Constify.
2854 (show_command): Add non-const overload.
2855 * top.c (set_history, show_history): Constify.
2856 * sh-tdep.c (set_sh_command, show_sh_command): Constify.
2857 * command.h (add_prefix_cmd): Accept a cmd_const_cfunc_ftype.
2858 * target.c (target_command): Constify.
2859 * sparc64-tdep.c (info_adi_command): Constify.
2860 * record-full.c (cmd_record_full_start): Constify.
2861 (set_record_full_command): Constify. Fix typo.
2862 (show_record_full_command): Constify.
2863 * thread.c (thread_command, thread_apply_command): Constify.
2864 * memattr.c (dummy_cmd): Constify.
2865 * value.c (function_command): Constify.
2866 * frame.c (set_backtrace_cmd, show_backtrace_cmd): Constify.
2867 * probe.c (info_probes_command): Constify.
2868 * ser-tcp.c (set_tcp_cmd, show_tcp_cmd): Constify.
2869 * gnu-nat.c (set_task_cmd, show_task_cmd, set_thread_cmd)
2870 (show_thread_cmd, set_thread_default_cmd)
2871 (show_thread_default_cmd): Constify.
2872 (check_empty): Constify.
2873 * tracepoint.c (tfind_command): Constify.
2874 * cp-support.c (maint_cplus_command): Constify.
2875 * windows-tdep.c (info_w32_command): Constify.
2876 * record.c (cmd_record_start, set_record_command)
2877 (show_record_command, info_record_command, cmd_record_goto):
2879 * ravenscar-thread.c (set_ravenscar_command)
2880 (show_ravenscar_command): Constify.
2881 * utils.c (set_internal_problem_cmd, show_internal_problem_cmd):
2883 (add_internal_problem_command): Remove casts.
2884 * arc-tdep.c (maintenance_print_arc_command): Constify.
2885 * valprint.c (set_print, show_print, set_print_raw)
2886 (show_print_raw): Constify.
2887 * maint.c (maintenance_command, maintenance_info_command)
2888 (maintenance_print_command, maintenance_set_cmd)
2889 (maintenance_show_cmd, set_per_command_cmd)
2890 (show_per_command_cmd, maintenance_check_command): Constify.
2891 * language.c (set_check, show_check): Constify.
2892 * typeprint.c (show_print_type, set_print_type): Constify.
2893 * go32-nat.c (go32_info_dos_command): Constify.
2895 2017-10-11 Tom Tromey <tom@tromey.com>
2897 * breakpoint.c (prepare_re_set_context): Remove.
2898 (breakpoint_re_set_one): Update. Don't use cleanups.
2899 (breakpoint_re_set): Use scoped_restore, std::string, and
2900 scoped_restore_current_language.
2902 2017-10-11 Tom Tromey <tom@tromey.com>
2904 * breakpoint.c (commands_command_1): Use std::string.
2905 (cleanup_executing_breakpoints): Remove.
2906 (bpstat_do_actions_1): Use scoped_restore.
2907 (bpstat_check_watchpoint): Use std::string.
2908 (decode_static_tracepoint_spec): Likewise.
2909 (break_range_command): Likewise.
2910 (watch_command_1): Likewise.
2911 (compare_breakpoints): Change argument types.
2912 (clear_command): Use std::vector.
2913 (cleanup_executing_breakpoints): Remove.
2914 (update_global_location_list): Use unique_xmalloc_ptr.
2915 (strace_command): Remove unused declaration.
2917 2017-10-11 John Baldwin <jhb@FreeBSD.org>
2919 * Makefile.in (ALLDEPFILES): Add arm-fbsd-nat.c.
2920 * NEWS: Mention new FreeBSD/arm native configuration.
2921 * configure.host: Add arm*-*-freebsd*.
2922 * configure.nat: Likewise.
2923 * arm-fbsd-nat.c: New file.
2925 2017-10-11 John Baldwin <jhb@FreeBSD.org>
2927 * Makefile.in (ALL_TARGET_OBS): Add arm-fbsd-tdep.o.
2928 (ALLDEPFILES): Add arm-fbsd-tdep.c.
2929 * NEWS: Mention new FreeBSD/arm target.
2930 * configure.tgt: Add arm*-*-freebsd*.
2931 * arm-fbsd-tdep.c: New file.
2932 * arm-fbsd-tdep.h: New file.
2934 2017-10-11 Maciej W. Rozycki <macro@imgtec.com>
2936 * linux-tdep.c (linux_make_corefile_notes): Remove call to
2937 `gdbarch_elfcore_write_linux_prpsinfo'.
2938 * gdbarch.sh (elfcore_write_linux_prpsinfo): Remove architecture
2940 (elf_internal_linux_prpsinfo): Remove declaration.
2941 * gdbarch.h: Regenerate.
2942 * gdbarch.c: Regenerate.
2944 2017-10-11 Maciej W. Rozycki <macro@imgtec.com>
2946 * ppc-linux-tdep.c (ppc_linux_init_abi): Remove call to
2947 `set_gdbarch_elfcore_write_linux_prpsinfo'.
2949 2017-10-11 Pedro Alves <palves@redhat.com>
2951 * breakpoint.c (reattach_breakpoints): Delete.
2952 * breakpoint.h (reattach_breakpoints): Delete.
2954 2017-10-11 Simon Marchi <simon.marchi@ericsson.com>
2956 * symfile.c (registered_sym_fns): Make struct, not typedef.
2957 (DEF_VEC_O (registered_sym_fns)): Remove.
2958 (symtab_fns): Change type to std::vector.
2959 (add_symtab_fns): Adjust.
2960 (find_sym_fns): Adjust.
2962 2017-10-11 Anton Kolesov <Anton.Kolesov@synopsys.com>
2964 * arc-tdep.c (arc_gdbarch_init): Pass proper cpu value to disassembler.
2965 * arc-tdep.h (arc_arch_is_em): New function.
2966 (arc_arch_is_hs): Likewise.
2968 2017-10-11 Egeyar Bagcioglu <egeyar.bagcioglu@oracle.com>
2970 * macrotab.h (macro_lookup_inclusion): Remove unnecessary
2971 parentheses in the declaration.
2972 (macro_lookup_inclusion): Likewise.
2973 (macro_lookup_definition): Likewise.
2974 * p-lang.h (pascal_builtin_types): Likewise.
2975 * tui/tui-data.c (tui_win_list): Likewise.
2976 * tui/tui-data.h (tui_win_list): Likewise.
2977 * utils.h (make_cleanup_free_section_addr_info): Likewise.
2979 2017-10-11 Mark Rages <markrages@gmail.com>
2981 * target-memory.c (block_boundaries): Fix for block address not
2982 aligned on block size.
2984 2017-10-10 Pedro Alves <palves@redhat.com>
2985 Tom Tromey <tom@tromey.com>
2987 * breakpoint.c (struct captured_breakpoint_query_args)
2988 (do_captured_breakpoint_query, gdb_breakpoint_query): Delete.
2989 (print_breakpoint): New.
2990 * breakpoint.h (print_breakpoint): Declare.
2991 * common/common-exceptions.h (enum return_reason): Remove
2992 references to catch_exceptions.
2993 * exceptions.c (catch_exceptions, catch_exceptions_with_msg):
2995 * exceptions.h (catch_exceptions_ftype, catch_exceptions)
2996 (catch_exception_ftype, catch_exceptions_with_msg): Delete.
2998 * gdbthread.h (thread_select): Declare.
2999 * mi/mi-cmd-break.c: Don't include gdb.h.
3000 (breakpoint_notify): Use print_breakpoint.
3001 * mi/mi-cmd-catch.c: Don't include gdb.h.
3002 * mi/mi-interp.c: Don't include gdb.h.
3003 (mi_print_breakpoint_for_event): New.
3004 (mi_breakpoint_created, mi_breakpoint_modified): Use
3005 mi_print_breakpoint_for_event.
3006 * mi/mi-main.c: Don't include gdb.h.
3007 (mi_cmd_thread_select): Parse the global thread ID here. Use
3008 thread_select instead of gdb_thread_select.
3009 (mi_cmd_thread_list_ids): Output "thread-ids" tuple here instead
3010 of using gdb_list_thread_ids.
3011 * remote-fileio.c (do_remote_fileio_request): Change type. Reply
3013 (remote_fileio_request): Use TRY/CATCH instead of
3015 * symfile-mem.c (struct symbol_file_add_from_memory_args)
3016 (symbol_file_add_from_memory_wrapper): Delete.
3017 (add_vsyscall_page): Use TRY/CATCH instead of catch_exceptions.
3018 * thread.c: Don't include gdb.h.
3019 (do_captured_list_thread_ids, gdb_list_thread_ids): Delete.
3020 (thread_alive): Use thread_select.
3021 (do_captured_thread_select): Delete, parts salvaged as ...
3022 (thread_select): ... this new function.
3023 (gdb_thread_select): Delete.
3025 2017-10-10 Pedro Alves <palves@redhat.com>
3026 Tom Tromey <tom@tromey.com>
3028 * breakpoint.c (breakpoint_cond_eval): Change return type to bool
3030 (WP_DELETED, WP_VALUE_CHANGED, WP_VALUE_NOT_CHANGED, WP_IGNORE):
3031 No longer macros. Instead ...
3032 (enum wp_check_result): They're now values of this new
3034 (watchpoint_check): Change return type to wp_check_result and
3035 parameter type to bpstat.
3036 (bpstat_check_watchpoint): Use TRY/CATCH instead of catch_errors.
3037 (bpstat_check_breakpoint_conditions): Use TRY/CATCH instead of
3038 catch_errors. Reverse logic of watchpoint_check call.
3039 (breakpoint_re_set_one): Now returns void and takes a breakpoint
3040 pointer as parameter.
3041 (breakpoint_re_set): Use TRY/CATCH instead of catch_errors.
3042 * common/common-exceptions.c (throw_exception_sjlj): Update
3043 comments to avoid mentioning catch_errors.
3044 * exceptions.c (catch_errors): Delete.
3045 * exceptions.h: Update comments to avoid mentioning catch_errors.
3046 (catch_errors_ftype, catch_errors): Delete.
3047 * infrun.c (normal_stop): Use TRY/CATCH instead of catch_errors.
3048 (hook_stop_stub): Delete.
3049 (restore_selected_frame): Change return type to void, and
3050 parameter type to const frame_id &.
3051 (restore_infcall_control_state): Use TRY/CATCH instead of
3053 * main.c (captured_command_loop): Return void and remove
3054 parameter. Remove references to catch_errors.
3055 (captured_main): Use TRY/CATCH instead of catch_errors.
3056 * objc-lang.c (objc_submethod_helper_data)
3057 (find_objc_msgcall_submethod_helper): Delete.
3058 (find_objc_msgcall_submethod): Use TRY/CATCH instead of
3060 * record-full.c (record_full_message): Return void.
3061 (record_full_message_args, record_full_message_wrapper): Delete.
3062 (record_full_message_wrapper_safe): Return bool and use TRY/CATCH
3063 instead of catch_errors.
3064 * solib-aix.c (solib_aix_open_symbol_file_object): Change
3065 parameter type to int.
3066 * solib-darwin.c (open_symbol_file_object): Ditto.
3067 * solib-dsbt.c (open_symbol_file_object): Ditto.
3068 * solib-frv.c (open_symbol_file_object): Ditto.
3069 * solib-svr4.c (open_symbol_file_object): Ditto.
3070 * solib-target.c (solib_target_open_symbol_file_object): Ditto.
3071 * solib.c (update_solib_list): Use TRY/CATCH instead of
3073 * solist.h (struct target_so_ops) <open_symbol_file_object>:
3075 * symmisc.c (struct print_symbol_args): Remove.
3076 (dump_symtab_1): Use TRY/CATCH instead of catch_errors.
3077 (print_symbol): Change type.
3078 * windows-nat.c (handle_load_dll, handle_unload_dll): Return void
3079 and remove parameters.
3080 (catch_errors): New.
3081 (get_windows_debug_event): Adjust.
3083 2017-10-09 Tom Tromey <tom@tromey.com>
3085 * mi/mi-main.c (free_splay_tree): Remove.
3086 (list_available_thread_groups): Use splay_tree_up.
3087 * common/gdb_splay_tree.h: New file.
3089 2017-10-09 Tom Tromey <tom@tromey.com>
3091 * mi/mi-main.c (do_nothing): Remove.
3092 (list_available_thread_groups): Update.
3094 2017-10-09 Pedro Alves <palves@redhat.com>
3096 * infrun.c (handle_inferior_event_1) <TARGET_WAITKIND_EXECD>: Skip
3097 reading registers when switching context.
3099 2017-10-09 John Baldwin <jhb@FreeBSD.org>
3101 * fbsd-nat.c (fbsd_siginfo_size): Use gdbarch_long_bit.
3102 (fbsd_convert_siginfo): Likewise.
3103 * fbsd-tdep.c (fbsd_core_xfer_siginfo): Likewise.
3105 2017-10-09 Simon Marchi <simon.marchi@polymtl.ca>
3107 * configure.ac (try_guile_versions): Remove guile-2.2.
3108 * configure: Regenerate.
3110 2017-10-09 Tom Tromey <tom@tromey.com>
3112 * Makefile.in (COMPILE.post, POSTCOMPILE): Restore $(basename).
3113 (COMPILE.pre): Use $(CXX).
3115 2017-10-09 Pedro Alves <palves@redhat.com>
3117 * cp-support.c (cp_remove_params): Return a gdb::unique_xmalloc_ptr.
3119 (overload_list_add_symbol): Adjust to use gdb::unique_xmalloc_ptr.
3120 * cp-support.h (cp_remove_params): Now returns a
3121 gdb::unique_xmalloc_ptr.
3122 * dwarf2read.c (find_slot_in_mapped_hash): Now returns bool.
3123 Adjust to cp_remove_params returning a gdb::unique_xmalloc_ptr.
3124 * psymtab.c (psymtab_search_name): Adjust to cp_remove_params
3125 returning a gdb::unique_xmalloc_ptr.
3126 (lookup_partial_symbol): Adjust to use gdb::unique_xmalloc_ptr.
3127 * stack.c (find_frame_funname): Adjust to cp_remove_params
3128 returning a gdb::unique_xmalloc_ptr.
3130 2017-10-08 Tom Tromey <tom@tromey.com>
3132 * dwarf2read.c (dwarf2_get_dwz_file): Use
3133 gdb::unique_xmalloc_ptr.
3134 (find_slot_in_mapped_hash): Likewise.
3135 (dwarf2_physname): Likewise.
3136 (create_dwo_unit_in_dwp_v1): Use std::string.
3137 (create_dwo_unit_in_dwp_v2): Likewise.
3138 (lookup_dwo_cutu): Likewise.
3139 (inherit_abstract_dies): Use std::vector.
3140 (read_array_type): Likewise.
3141 (dwarf_decode_macros): Remove unused declaration.
3142 (unsigned_int_compar): Remove.
3143 (dwarf2_build_psymtabs_hard): Use scoped_restore.
3144 (psymtabs_addrmap_cleanup): Remove.
3146 2017-10-08 Tom Tromey <tom@tromey.com>
3148 * frame-unwind.c (frame_unwind_try_unwinder): Update.
3149 * frame.h (frame_cleanup_after_sniffer): Declare.
3150 (frame_prepare_for_sniffer): Return void.
3151 * frame.c (frame_cleanup_after_sniffer): No longer static. Change
3153 (frame_prepare_for_sniffer): Return void.
3155 2017-10-08 Tom Tromey <tom@tromey.com>
3157 * utils.h (make_cleanup_value_free): Remove.
3158 * utils.c (do_value_free, struct cleanup): Remove.
3159 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full) <DWARF_VALUE_STACK>:
3161 * value.h (struct value_deleter): New.
3162 (gdb_value_up): New typedef.
3164 2017-10-08 Tom Tromey <tom@tromey.com>
3166 * symtab.c (free_search_symbols, do_free_search_symbols_cleanup)
3167 (make_cleanup_free_search_symbols): Remove.
3168 (search_symbols): Return std::vector.
3169 (symbol_search::compare_search_syms): Now member of
3170 symbol_search. Change arguments.
3171 (sort_search_symbols_remove_dups): Change arguments. Rewrite.
3172 (symtab_symbol_info, rbreak_command): Update.
3173 * symtab.h (struct symbol_search) <next>: Remove.
3175 (symbol_search::operator<): New function.
3176 (symbol_search::operator==): New function.
3177 (search_symbols): Remove std::vector.
3178 (free_search_symbols, make_cleanup_free_search_symbols): Remove.
3179 (symbol_search::compare_search_syms): Declare.
3181 2017-10-06 Yao Qi <yao.qi@linaro.org>
3183 * Makefile.in (ALL_64_TARGET_OBS): Replace aarch64-insn.o with
3184 arch/aarch64-insn.o.
3186 * configure.tgt: Replace aarch64-insn.o with arch/aarch64-insn.o.
3188 2017-10-06 Yao Qi <yao.qi@linaro.org>
3190 * Makefile.in (ALL_TARGET_OBS): Replace arm.o, arm-get-next-pcs.o,
3191 and arm-linux.o with arch/arm.o, arch/arm-get-next-pcs.o and
3192 arch/arm-linux.o respectively.
3193 * configure.tgt: Likewise.
3195 2017-10-06 Yao Qi <yao.qi@linaro.org>
3197 * Makefile.in (ALL_TARGET_OBS): Rename i386.o to arch/i386.o.
3198 * configure.tgt (i386_tobjs): Replace i386.o with arch/i386.o.
3200 2017-10-06 Pedro Alves <palves@redhat.com>
3202 * windows-nat.c: Include <algorithm>.
3204 2017-10-06 Yao Qi <yao.qi@linaro.org>
3206 * configure.tgt (i386_tobjs): New variable.
3207 (amd64_tobjs): New variable.
3208 Set $cpu_obs and $os_obs.
3210 2017-10-06 Yao Qi <yao.qi@linaro.org>
3212 * Makefile.in (CONFIG_SRC_SUBDIR): New.
3213 (ALL_64_TARGET_OBS): Replace amd64.o with arch/amd64.o.
3214 (clean): Remove object files and dependency files.
3215 (distclean): Remove the directory.
3216 * configure.ac: Invoke AC_CONFIG_COMMANDS.
3217 * configure: Re-generated.
3218 * configure.tgt: Replace amd64.o with arch/amd64.o.
3220 2017-10-05 Jose E. Marchesi <jose.marchesi@oracle.com>
3223 * arm-tdep.c (arm_decode_misc_memhint_neon): Fix decoding of CPS
3226 2017-10-05 Pedro Alves <palves@redhat.com>
3228 * linux-nat.c (linux_child_follow_fork): When following the parent
3229 and detaching the child, consult the parent thread's architecture
3230 instead of the child's.
3232 2017-10-05 Ulrich Weigand <uweigand@de.ibm.com>
3234 * ax.h: Do not include "doublest.h".
3235 (union agent_val): Remove.
3237 2017-10-05 Ulrich Weigand <uweigand@de.ibm.com>
3239 * dfp.h (MAX_DECIMAL_STRING): Move to dfp.c.
3240 (decimal_to_string): Return std::string object.
3241 (decimal_from_string): Accept std::string object. Return bool.
3242 (decimal_from_integral, decimal_from_doublest): Remove.
3243 (decimal_from_longest): Add prototype.
3244 (decimal_from_ulongest): Likewise.
3245 (decimal_to_longest): Likewise.
3246 (decimal_from_doublest): Likewise.
3247 * dfp.c: Do not include "gdbtypes.h" or "value.h".
3248 (MAX_DECIMAL_STRING): Move here.
3249 (decimal_to_string): Return std::string object.
3250 (decimal_from_string): Accept std::string object. Return bool.
3251 (decimal_from_integral): Remove, replace by ...
3252 (decimal_from_longest, decimal_from_ulongest): ... these new functions.
3253 (decimal_to_longest): New function.
3254 (decimal_from_floating): Remove, replace by ...
3255 (decimal_from_doublest): ... this new function.
3256 (decimal_to_doublest): Update to new decimal_to_string interface.
3258 * value.c (unpack_long): Use decimal_to_longest.
3259 * valops.c (value_cast): Use decimal_from_doublest instead of
3260 decimal_from_floating. Use decimal_from_[u]longest isntead of
3261 decimal_from_integral.
3262 * valarith.c (value_args_as_decimal): Likewise.
3263 * valprint.c (print_decimal_floating): Update to new
3264 decimal_to_string interface.
3265 * printcmd.c (printf_decfloat): Likewise.
3266 * c-exp.y (parse_number): Update to new decimal_from_string interface.
3268 2017-10-05 Ulrich Weigand <uweigand@de.ibm.com>
3270 * doublest.h: Do not include "floatformat.h". Remove stale comments.
3271 * gdbtypes.c: Include "floatformat.h".
3272 * value.c: Likewise.
3273 * m68k-tdep.c: Likewise.
3275 * findvar.c: Do not include "floatformat.h".
3276 * amd64-darwin-tdep.c: Likewise.
3277 * arm-linux-tdep.c: Likewise.
3278 * i386-darwin-tdep.c: Likewise.
3279 * i387-tdep.c: Likewise.
3280 * m68k-linux-tdep.c: Likewise.
3281 * mep-tdep.c: Likewise.
3282 * mips-tdep.c: Likewise.
3283 * nios2-tdep.c: Likewise.
3284 * s390-linux-tdep.c: Likewise.
3285 * sparc-obsd-tdep.c: Likewise.
3286 * sparc-tdep.c: Likewise.
3287 * sparc64-tdep.c: Likewise.
3288 * spu-tdep.c: Likewise.
3289 * tic6x-tdep.c: Likewise.
3290 * tilegx-tdep.c: Likewise.
3291 * vax-tdep.c: Likewise.
3292 * xstormy16-tdep.c: Likewise.
3293 * xtensa-tdep.c: Likewise.
3295 * top.c: Do not include "doublest.h".
3296 * aarch64-tdep.c: Likewise.
3297 * alpha-tdep.c: Likewise.
3298 * arm-linux-tdep.c: Likewise.
3299 * m68k-linux-tdep.c: Likewise.
3300 * tilegx-tdep.c: Likewise.
3301 * xstormy16-tdep.c: Likewise.
3303 2017-10-05 John Baldwin <jhb@FreeBSD.org>
3305 * mips-fbsd-tdep.c (MIPS_INST_ADDIU_A0_SP_N32): Define.
3306 (mipsn32_fbsd_sigframe): Define.
3307 (mips_fbsd_init_abi): Install mipsn32_fbsd_sigframe unwinder
3308 for FreeBSD/mipsn32.
3310 2017-10-05 John Baldwin <jhb@FreeBSD.org>
3312 * fbsd-tdep.c (fbsd_print_auxv_entry): Handle AT_EHDRFLAGS and
3315 2017-10-05 Tristan Gingold <tgingold@free.fr>
3317 * MAINTAINERS (Misc): Update my email address.
3319 2017-10-04 Pedro Alves <palves@redhat.com>
3321 * remote.c (get_remote_arch_state): New 'gdbarch' parameter. Use
3322 it instead of target_gdbarch.
3323 (get_remote_state, get_remote_packet_size): Adjust
3324 get_remote_arch_state calls, passing down target_gdbarch
3326 (packet_reg_from_regnum, packet_reg_from_pnum): New parameter
3327 'gdbarch' and use it instead of target_gdbarch.
3328 (get_memory_packet_size): Adjust get_remote_arch_state calls,
3329 passing down target_gdbarch explicitly.
3330 (struct stop_reply) <arch>: New field.
3331 (remote_parse_stop_reply): Use the stopped thread's architecture,
3332 not the current inferior's. Save the architecture in the
3334 (process_stop_reply): Use the stop reply's architecture.
3335 (process_g_packet, remote_fetch_registers)
3336 (remote_prepare_to_store, store_registers_using_G)
3337 (remote_store_registers): Adjust get_remote_arch_state calls,
3338 using the regcache's architecture.
3339 (remote_get_trace_status): Adjust get_remote_arch_state calls,
3340 passing down target_gdbarch explicitly.
3341 * spu-multiarch.c (spu_thread_architecture): Defer to the target
3342 beneath instead of calling target_gdbarch.
3343 * target.c (default_thread_architecture): Use the specified
3344 inferior's architecture, instead of the current inferior's
3345 architecture (via target_gdbarch).
3347 2017-10-04 Pedro Alves <palves@redhat.com>
3349 * regcache.c (get_thread_arch_regcache): Remove null_ptid special
3351 (regcache_print): Handle !target_has_registers here instead.
3353 2017-10-04 Pedro Alves <palves@redhat.com>
3355 * frame.c (create_test_frame): Delete.
3356 * frame.h (create_test_frame): Delete.
3357 * gdbarch-selftests.c: Include gdbthread.h and target.h.
3358 (class regcache_test): Delete.
3359 (test_target_has_registers, test_target_has_stack)
3360 (test_target_has_memory, test_target_prepare_to_store)
3361 (test_target_store_registers): New functions.
3362 (test_target_ops): New class.
3363 (register_to_value_test): Error out if there's already a
3364 process_stratum (or higher) target pushed. Create a fuller mock
3365 environment, with mock target_ops, inferior, address space, thread
3367 * progspace.c (struct address_space): Move to ...
3368 * progspace.h (struct address_space): ... here.
3369 * regcache.h (regcache::~regcache, regcache::raw_write)
3370 [GDB_SELF_TEST]: No longer virtual.
3372 2017-10-04 Simon Marchi <simon.marchi@ericsson.com>
3374 * mi/mi-main.c (list_available_thread_groups): Reverse filter logic.
3376 2017-10-04 Pedro Alves <palves@redhat.com>
3378 * guile/scm-breakpoint.c (gdbscm_breakpoint_commands): Move code
3379 out of 'between TRY and CATCH'.
3381 2017-10-04 Pedro Alves <palves@redhat.com>
3383 * cli/cli-cmds.c (complete_command): Add missing END_CATCH.
3384 * common/common-exceptions.h (TRY): Open an outermost scope.
3385 Expand intro comment.
3387 (END_CATCH): Close the outermost scope.
3388 * completer.c (complete_line_internal): Add missing END_CATCH.
3390 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
3392 * NEWS (Changes since GDB 8.0): Add entry about new
3393 'set-cwd-on-gdbserver' feature.
3394 (New remote packets): Add entry for QSetWorkingDir.
3395 * common/common-inferior.h (set_inferior_cwd): New prototype.
3396 * infcmd.c (set_inferior_cwd): Remove "static".
3397 (show_cwd_command): Expand text to include remote debugging.
3398 * remote.c: Add PACKET_QSetWorkingDir.
3399 (remote_protocol_features) <QSetWorkingDir>: New entry for
3400 PACKET_QSetWorkingDir.
3401 (extended_remote_set_inferior_cwd): New function.
3402 (extended_remote_create_inferior): Call
3403 "extended_remote_set_inferior_cwd".
3404 (_initialize_remote): Call "add_packet_config_cmd" for
3407 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
3409 * NEWS (New commands): Mention "set/show cwd".
3410 * cli/cli-cmds.c (_initialize_cli_cmds): Mention "set cwd" on
3411 "cd" command's help text.
3412 * common/common-inferior.h (get_inferior_cwd): New prototype.
3413 * infcmd.c (inferior_cwd_scratch): New global variable.
3414 (set_inferior_cwd): New function.
3415 (get_inferior_cwd): Likewise.
3416 (set_cwd_command): Likewise.
3417 (show_cwd_command): Likewise.
3418 (_initialize_infcmd): Add "set/show cwd" commands.
3419 * inferior.h (class inferior) <cwd>: New field.
3420 * nat/fork-inferior.c: Include "gdb_tilde_expand.h".
3421 (fork_inferior): Change inferior's cwd before its execution.
3422 * windows-nat.c (windows_create_inferior): Pass inferior's cwd
3425 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
3427 * Makefile.in (SFILES): Add gdb_tilde_expand.c.
3428 (HFILES_NO_SRCDIR): Add gdb_tilde_expand.h.
3429 (COMMON_OBS): Add gdb_tilde_expand.o.
3430 * common/gdb_tilde_expand.c: New file.
3431 * common/gdb_tilde_expand.h: Likewise.
3433 2017-10-03 Maciej W. Rozycki <macro@imgtec.com>
3435 * gdbarch.sh (objfile): Remove duplicate declaration.
3436 * gdbarch.h: Regenerate.
3438 2017-10-03 Tom Tromey <tom@tromey.com>
3440 * utils.c (internal_vproblem): Use string_vprintf.
3442 2017-10-03 Tom Tromey <tom@tromey.com>
3444 * printcmd.c (info_symbol_command): Use std::string.
3446 2017-10-03 Tom Tromey <tom@tromey.com>
3448 * top.c (gdb_safe_append_history): Use std::string.
3450 2017-10-03 Tom Tromey <tom@tromey.com>
3452 * event-top.c (stdin_event_handler): Update.
3453 * main.c (captured_main_1): Update.
3454 * top.h (make_delete_ui_cleanup): Remove.
3455 (struct ui): Add constructor and destructor.
3456 (new_ui, delete_ui): Remove.
3457 * top.c (make_delete_ui_cleanup): Remove.
3458 (new_ui_command): Use std::unique_ptr.
3459 (delete_ui_cleanup): Remove.
3460 (ui::ui): Rename from new_ui. Update.
3462 (ui::~ui): Rename from delete_ui. Update.
3464 2017-10-03 Tom Tromey <tom@tromey.com>
3466 * symfile.c (load_progress): Use gdb::byte_vector.
3468 2017-10-03 Tom Tromey <tom@tromey.com>
3470 * mi/mi-main.c (mi_cmd_trace_frame_collected): Remove unused
3472 * printcmd.c (x_command): Remove unused declaration.
3473 * symfile.c (symbol_file_command): Remove unused declaration.
3475 2017-10-03 Tom Tromey <tom@tromey.com>
3477 * utils.c (internal_vproblem): Use std::string.
3478 (defaulted_query): Likewise.
3480 2017-10-03 Tom Tromey <tom@tromey.com>
3482 * guile/scm-ports.c (ioscm_with_output_to_port_worker): Update.
3483 * top.c (execute_command_to_string): Update.
3484 * utils.c (make_cleanup_restore_page_info): Remove.
3485 (do_restore_page_info_cleanup): Remove.
3486 (set_batch_flag_and_restore_page_info):
3488 (make_cleanup_restore_page_info): Remove.
3489 (set_batch_flag_and_make_cleanup_restore_page_info): Remove.
3490 (~set_batch_flag_and_restore_page_info): New
3491 (make_cleanup_restore_uinteger): Remove.
3492 (make_cleanup_restore_integer): Remove.
3493 (struct restore_integer_closure): Remove.
3494 (restore_integer): Remove.
3495 * utils.h (struct set_batch_flag_and_restore_page_info): New
3497 (set_batch_flag_and_make_cleanup_restore_page_info): Remove.
3498 (make_cleanup_restore_page_info): Remove.
3499 (make_cleanup_restore_uinteger) Remove.
3500 (make_cleanup_restore_integer) Remove.
3502 2017-10-03 Tom Tromey <tom@tromey.com>
3504 * record-full.h (record_full_gdb_operation_disable_set): Return
3505 scoped_restore_tmpl<int>.
3506 * infrun.c (adjust_pc_after_break): Update.
3507 (handle_signal_stop): Update.
3508 * record-full.c (record_full_gdb_operation_disable_set): Return
3509 scoped_restore_tmpl<int>.
3510 (record_full_wait_1, record_full_insert_breakpoint)
3511 (record_full_remove_breakpoint, record_full_save)
3512 (record_full_goto_insn): Update.
3514 2017-10-02 Tom Tromey <tom@tromey.com>
3517 * rust-lang.c (rust_val_print_str): New function.
3518 (val_print_struct): Call it.
3519 (rust_subscript): Preserve name of slice type.
3521 2017-10-02 Tom Tromey <tom@tromey.com>
3523 * rust-lang.c (rust_subscript): Handle slices in
3524 EVAL_AVOID_SIDE_EFFECTS case.
3526 2017-10-02 Tom Tromey <tom@tromey.com>
3528 * rust-lang.c (rust_slice_type_p): Recognize &str as a slice type.
3530 2017-10-02 Tom Tromey <tom@tromey.com>
3532 * rust-lang.h (rust_slice_type): Add "extern".
3534 2017-10-02 Tom Tromey <tom@tromey.com>
3535 Pedro Alves <palves@redhat.com>
3537 * ada-lang.h (ada_exc_info::operator<): Make const.
3538 (ada_exc_info::operator==): Make const.
3539 * ada-lang.c (ada_exc_info::operator<, ada_exc_info::operator==):
3542 2017-09-29 Tom Tromey <tom@tromey.com>
3544 * target.c (read_whatever_is_readable): Change type of "result".
3546 (free_memory_read_result_vector): Remove.
3547 (read_memory_robust): Change return type. Update.
3548 * mi/mi-main.c (mi_cmd_data_read_memory_bytes): Update. Use
3549 bin2hex, std::string.
3550 * target.h (memory_read_result_s): Remove typedef.
3551 (free_memory_read_result_vector): Remove.
3552 (read_memory_robust): Return std::vector.
3554 2017-09-29 Tom Tromey <tom@tromey.com>
3556 * mi/mi-main.c (captured_mi_execute_command): Use scope_restore.
3558 2017-09-29 Tom Tromey <tom@tromey.com>
3560 * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions): Update.
3561 * ada-lang.h (struct ada_exc_info): Remove typedef. Declare
3562 operator< and operator==.
3563 (ada_exceptions_list): Return a std::vector.
3564 * ada-lang.c (ada_exc_info::operator<): Rename from
3565 compare_ada_exception_info.
3566 (ada_exc_info::operator==): New.
3567 (sort_remove_dups_ada_exceptions_list): Change type of
3569 (ada_add_standard_exceptions, ada_add_exceptions_from_frame)
3570 (ada_add_global_exceptions): Likewise.
3571 (ada_exceptions_list_1): Return a std::vector.
3572 (ada_exceptions_list): Likewise.
3574 2017-09-29 Tom Tromey <tom@tromey.com>
3576 * mi/mi-main.c (struct print_one_inferior_data) <inferiors>: Now a
3578 (print_one_inferior): Update.
3579 (free_vector_of_ints): Remove.
3580 (list_available_thread_groups): Change "ids" to std::set.
3581 (mi_cmd_list_thread_groups): Update.
3582 (struct collect_cores_data) <core>: Now a std::set.
3583 (collect_cores): Update.
3585 (print_one_inferior): Update.
3587 2017-09-29 Tom Tromey <tom@tromey.com>
3589 * mi/mi-main.c (mi_execute_cli_command): Use std::string.
3590 (mi_execute_async_cli_command): Likewise.
3591 (mi_cmd_trace_frame_collected): Use field_fmt.
3593 2017-09-29 Tom Tromey <tom@tromey.com>
3595 * mi/mi-main.c (mi_cmd_data_write_memory_bytes): Use
3598 2017-09-29 Tom Tromey <tom@tromey.com>
3600 * mi/mi-parse.c (mi_parse): Remove unused declaration.
3602 2017-09-29 Tom Tromey <tom@tromey.com>
3604 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Don't copy "oarg".
3606 2017-09-29 Tom Tromey <tom@tromey.com>
3608 * varobj.h (varobj_gen_name): Return std::string.
3609 * varobj.c (varobj_gen_name): Return std::string.
3610 * mi/mi-cmd-var.c (mi_cmd_var_create): Use std::string.
3611 (mi_cmd_var_delete): Don't copy "name".
3613 2017-09-29 Tom Tromey <tom@tromey.com>
3615 * mi/mi-cmd-break.c (mi_argv_to_format): Return std::string.
3616 (mi_cmd_break_insert_1): Update.
3618 2017-09-29 Tom Tromey <tom@tromey.com>
3620 * target.h (make_scoped_defer_target_commit_resume): Update.
3621 * target.c (make_scoped_defer_target_commit_resume): Rename from
3622 make_cleanup_defer_target_commit_resume. Return a
3624 * infrun.c (proceed): Use make_scoped_defer_target_commit_resume.
3626 2017-09-29 Tom Tromey <tom@tromey.com>
3628 * main.c (captured_main_1): Remove unused declaration.
3629 * spu-multiarch.c (parse_spufs_run): Remove unused declaration.
3631 2017-09-29 Tom Tromey <tom@tromey.com>
3633 * symtab.c (search_symbols): Remove unused outer cleanup.
3634 (make_source_files_completion_list): Remove unused declaration.
3636 2017-09-29 Tom Tromey <tom@tromey.com>
3638 * mt-tdep.c (mt_push_dummy_call): Use gdb::byte_vector.
3640 2017-09-29 Tom Tromey <tom@tromey.com>
3642 * xstormy16-tdep.c (xstormy16_push_dummy_call): Use
3645 2017-09-29 Tom Tromey <tom@tromey.com>
3647 * complaints.c (vcomplaint): Use std::string.
3649 2017-09-29 Tom Tromey <tom@tromey.com>
3651 * tracepoint.c (trace_variable_command): Use std::string.
3652 (encode_actions_1): Remove unused declarations.
3653 (create_tsv_from_upload): Use std::string.
3655 2017-09-29 Tom Tromey <tom@tromey.com>
3657 * cp-support.c (gdb_demangle): Use std::string.
3659 2017-09-29 Tom Tromey <tom@tromey.com>
3661 * stack.c (parse_frame_specification): Use std::string
3662 (info_frame_command): Use gdb::unique_xmalloc_ptr.
3664 2017-09-29 Tom Tromey <tom@tromey.com>
3666 * tilegx-tdep.c (tilegx_push_dummy_call): Use gdb::byte_vector.
3668 2017-09-29 Tom Tromey <tom@tromey.com>
3670 * utils.c (vfprintf_maybe_filtered): Use std::string.
3671 (vfprintf_unfiltered): Likewise.
3673 2017-09-29 Tom Tromey <tom@tromey.com>
3675 * event-top.c (top_level_prompt): Return std::string.
3676 (display_gdb_prompt): Update.
3678 2017-09-29 Tom Tromey <tom@tromey.com>
3680 * unittests/common-utils-selftests.c (format): New function.
3681 (string_vprintf_tests): New function.
3682 (_initialize_common_utils_selftests): Register new tests.
3683 * common/common-utils.c (string_vprintf): New function.
3684 * common/common-utils.h (string_vprintf): Declare.
3686 2017-09-29 Pedro Alves <palves@redhat.com>
3688 * common/rsp-low.c (unpack_varlen_hex): Constify.
3689 * common/rsp-low.h (unpack_varlen_hex): Constify.
3690 * linux-nat.c (linux_child_static_tracepoint_markers_by_strid):
3692 * remote.c (remote_set_permissions, read_ptid)
3693 (remote_current_thread, remote_get_threads_with_qthreadinfo)
3694 (remote_static_tracepoint_marker_at)
3695 (remote_static_tracepoint_markers_by_strid)
3696 (stop_reply_extract_thread, remote_parse_stop_reply): Constify.
3697 * tracepoint.c (parse_trace_status, parse_tracepoint_status)
3698 (parse_tracepoint_definition, parse_tsv_definition)
3699 (parse_static_tracepoint_marker_definition): Constify.
3700 * tracepoint.h (parse_static_tracepoint_marker_definition)
3701 (parse_trace_status, parse_tracepoint_status)
3702 (parse_tracepoint_definition, parse_tsv_definition): Constify.
3704 2017-09-29 Pedro Alves <palves@redhat.com>
3706 * remote.c (target_buf, target_buf_size): Delete.
3707 (remote_get_noisy_reply): Remove buf_p and sizeof_buf parameters.
3708 Use the connection's packet buffer instead.
3709 All callers adjusted.
3710 (_initialize_remote): Remove references to target_buf and
3713 2017-09-28 Pedro Alves <palves@redhat.com>
3715 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
3716 unittests/common-utils-selftests.c.
3717 (SUBDIR_UNITTESTS_OBS): Add common-utils-selftests.o.
3718 (COMMON_OBS): Remove utils-selftests.o.
3719 * utils-selftests.c: Move to ...
3720 * unittests/common-utils-selftests.c: ... here and rename self
3721 test to "string_printf".
3723 2017-09-28 Alexander Shaposhnikov <alexander.v.shaposhnikov@gmail.com> (tiny patch)
3725 * dwarf2read.c (open_and_init_dwp_file): Protect against dwp_file
3726 having NULL cus or tus.
3728 2017-09-27 Ulrich Weigand <uweigand@de.ibm.com>
3730 * arm-tdep.c: (convert_from_extended): Remove.
3731 (convert_to_extended): Likewise.
3732 (arm_extract_return_value): Use convert_typed_floating.
3733 (arm_store_return_value): Likewise.
3735 * sh-tdep.h (struct gdbarch_tdep): Add sh_littlebyte_bigword_type.
3736 * sh-tdep.c: Do not include "floatformat.h".
3737 (sh_littlebyte_bigword_type): New function.
3738 (sh_register_convert_to_virtual): Use convert_typed_floating.
3739 (sh_register_convert_to_raw): Likewise.
3740 * sh64-tdep.c: (struct gdbarch_tdep): Add sh_littlebyte_bigword_type.
3741 (sh64_littlebyte_bigword_type): New function.
3742 (sh64_extract_return_value): Use convert_typed_floating.
3743 (sh64_register_convert_to_virtual): Likewise.
3744 (sh64_register_convert_to_raw): Likewise.
3746 2017-09-27 Ulrich Weigand <uweigand@de.ibm.com>
3748 * doublest.h (floatformat_from_type): Move to gdbtypes.h.
3749 * doublest.c (floatformat_from_type): Move to gdbtypes.c.
3751 * gdbtypes.h (union type_specific): Make field floatformat hold
3752 just a single struct floatformat, not an array.
3753 (floatformat_from_type): Move here.
3754 * gdbtypes.c (floatformat_from_type): Move here. Update to
3755 changed TYPE_FLOATFORMAT definition.
3756 (verify_floatformat): Update to changed TYPE_FLOATFORMAT.
3757 (recursive_dump_type): Likewise.
3758 (init_float_type): Install correct floatformat for byte order.
3759 (arch_float_type): Likewise.
3761 2017-09-27 Ulrich Weigand <uweigand@de.ibm.com>
3763 * gdbtypes.c (init_type): Change incoming argument from
3764 length-in-bytes to length-in-bits. Assert length is a
3765 multiple of TARGET_CHAR_BITS.
3766 (arch_type, arch_flags_type): Likewise.
3767 (init_integer_type): Update call to init_type.
3768 (init_character_type): Likewise.
3769 (init_boolean_type): Likewise.
3770 (init_float_type): Likewise.
3771 (init_decfloat_type): Likewise.
3772 (init_complex_type): Likewise.
3773 (init_pointer_type): Likewise.
3774 (objfile_type): Likewise.
3775 (arch_integer_type): Update call to arch_type.
3776 (arch_character_type): Likewise.
3777 (arch_boolean_type): Likewise.
3778 (arch_float_type): Likewise.
3779 (arch_decfloat_type): Likewise.
3780 (arch_complex_type): Likewise.
3781 (arch_pointer_type): Likewise.
3782 (gdbtypes_post_init): Likewise.
3784 * dwarf2read.c (dwarf2_init_float_type): Update call to init_type.
3785 (read_base_type): Likewise.
3786 * mdebugread.c (basic_type): Likewise.
3787 * stabsread.c (dbx_init_float_type): Likewise.
3788 (rs6000_builtin_type): Likewise.
3789 (read_range_type): Likewise. Also, fix call to init_integer_type
3790 with erroneous length argument.
3792 * ada-lang.c (ada_language_arch_info): Update call to arch_type.
3793 * d-lang.c (build_d_types): Likewise.
3794 * f-lang.c (build_fortran_types): Likewise.
3795 * go-lang.c (build_go_types): Likewise.
3796 * opencl-lang.c (build_opencl_types): Likewise.
3797 * jit.c (finalize_symtab): Likewise.
3798 * gnu-v3-abi.c (build_gdb_vtable_type): Likewise.
3799 (build_std_type_info_type): Likewise.
3800 * target-descriptions.c (tdesc_gdb_type): Likewise. Also,
3801 update call to arch_flags_type.
3803 * linux-tdep.c (linux_get_siginfo_type_with_fields): Update call to
3805 * fbsd-tdep.c (fbsd_get_siginfo_type): Likewise.
3806 * windows-tdep.c (windows_get_tlb_type): Likewise.
3808 * avr-tdep.c (avr_gdbarch_init): Update call to arch_type.
3809 * ft32-tdep.c (ft32_gdbarch_init): Likewise.
3810 * m32c-tdep.c (make_types): Likewise.
3811 * rl78-tdep.c (rl78_gdbarch_init): Likewise.
3812 (rl78_psw_type): Update call to arch_flags_type.
3813 * m68k-tdep.c (m68k_ps_type): Update call to arch_flags_type.
3814 * rx-tdep.c (rx_psw_type): Likewise.
3815 (rx_fpsw_type): Likewise.
3816 * sparc-tdep.c (sparc_psr_type): Likewise.
3817 (sparc_fsr_type): Likewise.
3818 * sparc64-tdep.c (sparc64_pstate_type): Likewise.
3819 (sparc64_ccr_type): Likewise.
3820 (sparc64_fsr_type): Likewise.
3821 (sparc64_fprs_type): Likewise.
3823 2017-09-27 Tom Tromey <tom@tromey.com>
3825 * findcmd.c (find_command): Constify.
3827 2017-09-27 Tom Tromey <tom@tromey.com>
3829 * ada-tasks.c (task_command_1, task_command): Constify.
3831 2017-09-27 Tom Tromey <tom@tromey.com>
3833 * symtab.c (maintenance_print_symbol_cache)
3834 (maintenance_flush_symbol_cache)
3835 (maintenance_print_symbol_cache_statistics): Constify.
3837 2017-09-27 Tom Tromey <tom@tromey.com>
3839 * inferior.c (detach_inferior_command, kill_inferior_command)
3840 (inferior_command): Constify.
3842 2017-09-27 Tom Tromey <tom@tromey.com>
3844 * regcache.c (regcache_print, maintenance_print_registers)
3845 (maintenance_print_raw_registers)
3846 (maintenance_print_cooked_registers)
3847 (maintenance_print_register_groups)
3848 (maintenance_print_remote_registers): Constify.
3850 2017-09-27 Tom Tromey <tom@tromey.com>
3852 * printcmd.c (map_display_numbers, undisplay_command)
3853 (enable_disable_display_command, enable_display_command)
3854 (disable_display_command): Constify.
3856 2017-09-27 Tom Tromey <tom@tromey.com>
3858 * breakpoint.h (delete_command): Don't declare.
3859 * breakpoint.c (delete_command, enable_once_command)
3860 (enable_count_command, enable_delete_command, breakpoint_1)
3861 (maintenance_info_breakpoints, stopin_command, stopat_command)
3862 (delete_command, delete_trace_command, save_breakpoints)
3863 (save_breakpoints_command, save_tracepoints_command): Constify.
3865 2017-09-27 Tom Tromey <tom@tromey.com>
3867 * macrocmd.c (macro_expand_command, macro_expand_once_command)
3868 (skip_ws, extract_identifier, macro_define_command)
3869 (macro_undef_command, macro_list_command): Constify.
3871 2017-09-27 Tom Tromey <tom@tromey.com>
3873 * infcmd.c (environment_info, set_environment_command)
3874 (unset_environment_command, path_info, info_proc_cmd_1)
3875 (info_proc_cmd_mappings, info_proc_cmd_stat)
3876 (info_proc_cmd_status, info_proc_cmd_cwd, info_proc_cmd_cmdline)
3877 (info_proc_cmd_exe, info_proc_cmd_all): Constify.
3879 2017-09-27 Tom Tromey <tom@tromey.com>
3881 * i386-tdep.c (i386_mpx_info_bounds, i386_mpx_set_bounds):
3884 2017-09-27 Tom Tromey <tom@tromey.com>
3886 * symfile-mem.c (add_symbol_file_from_memory_command): Constify.
3888 2017-09-27 Tom Tromey <tom@tromey.com>
3890 * demangle.c (demangle_command): Constify.
3892 2017-09-27 Tom Tromey <tom@tromey.com>
3894 * progspace.c (maintenance_info_program_spaces_command):
3897 2017-09-27 Tom Tromey <tom@tromey.com>
3899 * compile/compile.c (check_raw_argument, compile_file_command)
3900 (compile_code_command, compile_print_command): Constify.
3902 2017-09-27 Tom Tromey <tom@tromey.com>
3904 * reggroups.c (maintenance_print_reggroups): Constify.
3906 2017-09-27 Tom Tromey <tom@tromey.com>
3908 * dwarf2read.c (save_gdb_index_command): Constify.
3910 2017-09-27 Tom Tromey <tom@tromey.com>
3912 * stap-probe.c (info_probes_stap_command): Constify.
3914 2017-09-27 Tom Tromey <tom@tromey.com>
3916 * fork-child.c (unset_exec_wrapper_command): Constify.
3918 2017-09-27 Tom Tromey <tom@tromey.com>
3920 * btrace.c (get_uint, get_context_size, no_chunk)
3921 (maint_btrace_packet_history_cmd)
3922 (maint_btrace_clear_packet_history_cmd, maint_btrace_clear_cmd)
3923 (maint_info_btrace_cmd): Constify.
3925 2017-09-27 Tom Tromey <tom@tromey.com>
3927 * reverse.c (delete_bookmark_command): Constify.
3929 2017-09-27 Tom Tromey <tom@tromey.com>
3931 * remote.c (set_memory_packet_size)
3932 (set_memory_write_packet_size, show_memory_write_packet_size)
3933 (set_memory_read_packet_size, show_memory_read_packet_size)
3934 (compare_sections_command, packet_command, remote_put_command)
3935 (remote_get_command, remote_delete_command): Constify.
3937 2017-09-27 Tom Tromey <tom@tromey.com>
3939 * mips-tdep.c (show_mipsfpu_command, set_mipsfpu_single_command)
3940 (set_mipsfpu_double_command, set_mipsfpu_none_command)
3941 (set_mipsfpu_auto_command): Constify.
3943 2017-09-27 Tom Tromey <tom@tromey.com>
3945 * cli/cli-cmds.h (cd_command): Constify.
3946 * cli/cli-cmds.c (cd_command): Constify.
3948 2017-09-27 Tom Tromey <tom@tromey.com>
3950 * thread.c (thread_name_command, thread_find_command): Constify.
3952 2017-09-27 Tom Tromey <tom@tromey.com>
3954 * probe.c (enable_probes_command, disable_probes_command):
3957 2017-09-27 Tom Tromey <tom@tromey.com>
3959 * symfile.c (symbol_file_command): Constify.
3960 * gdbcore.h (deprecated_file_changed_hook): Constify.
3961 * exec.c (deprecated_file_changed_hook, exec_file_command)
3962 (file_command): Constify.
3963 * defs.h (symbol_file_command): Constify.
3965 2017-09-27 Tom Tromey <tom@tromey.com>
3967 * remote-fileio.c (set_system_call_allowed)
3968 (show_system_call_allowed): Constify.
3970 2017-09-27 Tom Tromey <tom@tromey.com>
3972 * tracepoint.c (delete_trace_variable_command)
3973 (tfind_end_command, tfind_start_command, tfind_pc_command)
3974 (tfind_tracepoint_command, tfind_line_command)
3975 (tfind_range_command, tfind_outside_command): Constify.
3977 2017-09-27 Tom Tromey <tom@tromey.com>
3979 * ax-gdb.c (maint_agent_printf_command, agent_command)
3980 (agent_eval_command): Constify.
3982 2017-09-27 Tom Tromey <tom@tromey.com>
3984 * tracepoint.c (info_scope_command): Constify.
3985 * python/python.c (gdbpy_decode_line): Constify.
3986 * python/py-breakpoint.c (bppy_init): Constify.
3987 * mi/mi-cmd-break.c (mi_cmd_break_insert_1): Constify.
3988 * location.h: (new_linespec_location)
3989 (string_to_event_location_basic, string_to_event_location):
3991 * location.c (new_linespec_location)
3992 (string_to_event_location_basic, string_to_event_location):
3994 * linespec.h (decode_line_with_current_source)
3995 (decode_line_with_last_displayed, linespec_lex_to_end): Constify.
3996 * linespec.c (linespec_lex_to_end)
3997 (decode_line_with_current_source)
3998 (decode_line_with_last_displayed): Constify.
3999 * guile/scm-breakpoint.c (gdbscm_register_breakpoint_x):
4001 * cli/cli-cmds.c (edit_command, list_command): Constify.
4002 * breakpoint.h (until_break_command, watch_command_wrapper)
4003 (awatch_command_wrapper, rwatch_command_wrapper)
4004 (init_ada_exception_breakpoint): Constify.
4005 * breakpoint.c (break_command_1, dprintf_command)
4006 (break_range_command, watch_command_wrapper)
4007 (rwatch_command_wrapper, awatch_command_wrapper)
4008 (until_break_command, init_ada_exception_breakpoint)
4009 (strace_marker_create_sals_from_location, trace_command)
4010 (ftrace_command, strace_command, struct tracepoint): Constify.
4011 * ax-gdb.c (agent_command_1): Constify.
4012 * ada-lang.c (ada_exception_sal): Constify.
4014 2017-09-27 Tom Tromey <tom@tromey.com>
4016 * record.c (cmd_record_delete, cmd_record_stop, cmd_record_save)
4017 (cmd_record_goto_begin, cmd_record_goto_end, get_insn_number)
4018 (get_context_size, no_chunk, get_insn_history_modifiers)
4019 (cmd_record_insn_history, get_call_history_modifiers)
4020 (cmd_record_call_history): Constify.
4022 2017-09-27 Tom Tromey <tom@tromey.com>
4024 * source.c (show_substitute_path_command)
4025 (unset_substitute_path_command, set_substitute_path_command):
4028 2017-09-27 Tom Tromey <tom@tromey.com>
4030 * typeprint.c (maintenance_print_type): Constify.
4031 * maint.c (maintenance_dump_me, maintenance_demangle)
4032 (maintenance_time_display, maintenance_info_sections)
4033 (maintenance_print_statistics, maintenance_deprecate)
4034 (maintenance_undeprecate): Constify.
4035 (maintenance_do_deprecate): Constify. Use std::string.
4036 (maintenance_selftest): Constify.
4037 * gdbtypes.h (maintenance_print_type): Constify.
4039 2017-09-27 Tom Tromey <tom@tromey.com>
4041 * hppa-tdep.c (unwind_command): Constify.
4043 2017-09-27 Tom Tromey <tom@tromey.com>
4045 * target-descriptions.c (unset_tdesc_filename_cmd)
4046 (maint_print_c_tdesc_cmd, maintenance_check_xml_descriptions):
4049 2017-09-27 Tom Tromey <tom@tromey.com>
4051 * dummy-frame.c (maintenance_print_dummy_frames): Constify.
4053 2017-09-27 Tom Tromey <tom@tromey.com>
4055 * tui/tui.c (tui_enable_command, tui_disable_command): Constify.
4057 2017-09-27 Tom Tromey <tom@tromey.com>
4059 * tui/tui-regs.c (tui_reg_command): Constify.
4061 2017-09-27 Tom Tromey <tom@tromey.com>
4063 * skip.c (skip_file_command, skip_function_command)
4064 (skip_enable_command, skip_disable_command, skip_delete_command):
4067 2017-09-27 Tom Tromey <tom@tromey.com>
4069 * record-btrace.c (cmd_record_btrace_bts_start)
4070 (cmd_record_btrace_pt_start): Constify.
4072 2017-09-27 Tom Tromey <tom@tromey.com>
4074 * symmisc.c (maintenance_print_symbols)
4075 (maintenance_print_msymbols, maintenance_print_objfiles)
4076 (maintenance_info_symtabs, maintenance_check_symtabs)
4077 (maintenance_expand_symtabs, maintenance_info_line_tables):
4080 2017-09-27 Tom Tromey <tom@tromey.com>
4082 * top.c (new_ui_command): Constify.
4084 2017-09-27 Tom Tromey <tom@tromey.com>
4086 * symfile.c (add_symbol_file_command)
4087 (remove_symbol_file_command, list_overlays_command)
4088 (map_overlay_command, unmap_overlay_command)
4089 (overlay_auto_command, overlay_manual_command)
4090 (overlay_off_command, overlay_load_command): Constify.
4092 2017-09-27 Tom Tromey <tom@tromey.com>
4094 * spu-tdep.c (info_spu_event_command, info_spu_signal_command)
4095 (info_spu_mailbox_command, info_spu_dma_command)
4096 (info_spu_proxydma_command): Constify.
4098 2017-09-27 Tom Tromey <tom@tromey.com>
4100 * cli/cli-logging.c (set_logging_on, set_logging_off): Constify.
4102 2017-09-27 Tom Tromey <tom@tromey.com>
4104 * cli/cli-script.c (user_defined_command): Constify.
4106 2017-09-27 Tom Tromey <tom@tromey.com>
4108 * cli/cli-dump.c (dump_memory_command, dump_value_command)
4109 (dump_srec_memory, dump_srec_value, dump_ihex_memory)
4110 (dump_ihex_value, dump_verilog_memory, dump_verilog_value)
4111 (dump_tekhex_memory, dump_tekhex_value, dump_binary_memory)
4112 (dump_binary_value, append_binary_memory, append_binary_value):
4114 (struct dump_context) <func>: Constify.
4115 (add_dump_command): Update.
4117 2017-09-27 Tom Tromey <tom@tromey.com>
4119 * cli/cli-cmds.c (show_version, show_configuration)
4120 (source_command, show_user): Constify.
4122 2017-09-27 Tom Tromey <tom@tromey.com>
4124 * target.c (maintenance_print_target_stack): Constify.
4126 2017-09-27 Tom Tromey <tom@tromey.com>
4128 * interps.c (interpreter_exec_cmd): Constify.
4130 2017-09-27 Tom Tromey <tom@tromey.com>
4132 * record-full.c (cmd_record_full_restore): Constify.
4134 2017-09-27 Tom Tromey <tom@tromey.com>
4136 * memattr.c (enable_mem_command, disable_mem_command)
4137 (delete_mem_command): Constify.
4139 2017-09-27 Tom Tromey <tom@tromey.com>
4141 * value.c (show_convenience): Constify.
4143 2017-09-27 Tom Tromey <tom@tromey.com>
4145 * gdbcore.h (core_file_command): Update.
4146 * corefile.c (core_file_command): Constify.
4148 2017-09-27 Tom Tromey <tom@tromey.com>
4150 * user-regs.c (maintenance_print_user_registers): Constify.
4152 2017-09-27 Tom Tromey <tom@tromey.com>
4154 * cp-namespace.c (maintenance_cplus_namespace): Constify.
4156 2017-09-27 Tom Tromey <tom@tromey.com>
4158 * cp-support.c (first_component_command): Constify.
4160 2017-09-27 Tom Tromey <tom@tromey.com>
4162 * psymtab.c (maintenance_print_psymbols)
4163 (maintenance_info_psymtabs, maintenance_check_psymtabs):
4166 2017-09-27 Tom Tromey <tom@tromey.com>
4168 * windows-tdep.c (display_tib): Constify.
4170 2017-09-27 Tom Tromey <tom@tromey.com>
4172 * linux-fork.c (delete_checkpoint_command)
4173 (detach_checkpoint_command): Constify.
4175 2017-09-27 Tom Tromey <tom@tromey.com>
4177 * cp-abi.c (set_cp_abi_cmd, show_cp_abi_cmd): Constify.
4179 2017-09-27 Tom Tromey <tom@tromey.com>
4181 * arc-tdep.c (dump_arc_instruction_command): Constify.
4183 2017-09-27 Tom Tromey <tom@tromey.com>
4185 * valprint.c (set_radix, show_radix): Constify.
4187 2017-09-27 Tom Tromey <tom@tromey.com>
4189 * dtrace-probe.c (info_probes_dtrace_command): Constify.
4191 2017-09-27 Tom Tromey <tom@tromey.com>
4193 * command.h (not_just_help_class_command): Update.
4194 * cli/cli-decode.h (not_just_help_class_command): Update.
4195 * cli/cli-decode.c (not_just_help_class_command): Constify.
4197 2017-09-27 Tom Tromey <tom@tromey.com>
4199 * gdb_bfd.c (maintenance_info_bfds): Constify.
4201 2017-09-27 Tom Tromey <tom@tromey.com>
4203 * cli/cli-decode.c (add_cmd, set_cmd_cfunc): New function
4205 (do_add_cmd): Rename from add_cmd. Don't call set_cmd_cfunc.
4206 (do_const_cfunc): New function.
4207 (cmd_cfunc_eq): New overload.
4208 (cli_user_command_p): Check do_const_cfunc.
4209 * cli/cli-decode.h (struct cmd_list_element) <function>: New field
4211 * command.h (add_cmd): Add const overload and no-function
4213 (set_cmd_cfunc): Add const overload.
4214 (cmd_const_cfunc_ftype): Declare.
4215 (cmd_cfunc_eq): Add const overload.
4216 * breakpoint.c, cli-cmds.c, cli-dump.c, guile/scm-cmd.c,
4217 python/py-cmd.c, target.c, tracepoint.c: Use no-function add_cmd
4220 2017-09-27 Tom Tromey <tom@tromey.com>
4222 * macroexp.c (get_next_token_for_substitution): New function.
4223 (substitute_args): Call it. Check for __VA_OPT__.
4225 2017-09-26 Walfred Tedeschi <walfred.tedeschi@intel.com>
4226 Pedro Alves <palves@redhat.com>
4228 * dwarf2read.c (dwarf2_cu): Remove field producer_is_icc and add
4229 producer_is_icc_lt_14.
4230 (producer_is_icc_lt_14): New function.
4231 (check_producer): Add code for checking version of ICC.
4232 (producer_is_icc): Move to producer.c.
4233 (read_structure_type): Restrict ICC workaround to ICC<14.
4234 * producer.c: Include selftest.h.
4235 (producer_is_icc, producer_parsing_tests, _initialize_producer):
4237 * producer.h (producer_is_icc): New declaration.
4239 2017-09-26 Walfred Tedeschi <walfred.tedeschi@intel.com>
4241 * Makefile.in (SFILES): Add producer.c.
4242 (COMMON_OBS): Add producer.o
4243 * amd64-tdep.c (producer.h): Add new include.
4244 * dwarf2read.c (producer.h): Add new include.
4245 * producer.c: New file.
4246 * producer.h: New file.
4247 * utils.c (producer_is_gcc, producer_is_gcc_ge_4): Move to
4249 * utils.h (producer_is_gcc, producer_is_gcc_ge_4): Move to
4252 2017-09-26 Matthias Klose <doko@ubuntu.com>
4254 * configure.ac: Search ncursesw before ncurses.
4255 Check ncursesw/ncurses.h before ncurses/ncurses.h.
4256 * gdb_curses.h: Include <ncursesw/ncurses.h>
4257 * config.in, configure: Regenerate.
4259 2017-09-26 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
4262 * configure.host <*-*-solaris2.[01], *-*-solaris2.[2-9]*>: Mark as
4264 Use gdb_host sol2 for i[34567]86-*-solaris2*, x86_64-*-solaris2*.
4265 Remove i386sol2 support.
4266 * configure.nat <i386sol2>: Remove.
4267 <sol2-64>: Fold into ...
4269 Move common settings to default section.
4271 * configure.tgt <i[34567]86-*-solaris2.1[0-9]*,
4272 x86_64-*-solaris2.1[0-9]*>: Rename to ...
4273 <i[34567]86-*-solaris2*, x86_64-*-solaris2*>: ... this.
4274 <i[34567]86-*-solaris*>: Remove.
4275 <sparc-*-solaris2.[0-6], sparc-*-solaris2.[0-6].*>: Remove.
4277 * configure.ac: Remove wctype in libw check.
4278 (_MSE_INT_H): Don't define on Solaris 7-9.
4279 <solaris*>: Remove libthread_db.so.1 check.
4280 * configure: Regenerate.
4281 * config.in: Regenerate.
4283 * proc-service.c: Remove PROC_SERVICE_IS_OLD handling.
4284 (gdb_ps_prochandle_t, gdb_ps_read_buf_t, gdb_ps_write_buf_t)
4285 (gdb_ps_size_t): Remove.
4286 Use base types in users.
4287 * sol-thread.c: Likewise, also for gdb_ps_addr_t.
4289 * NEWS (Changes since GDB 8.0): Document Solaris 2.0-9 removal.
4291 2017-09-26 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
4294 * sparc64-tdep.c (adi_tag_fd): Print pid as long.
4295 (adi_is_addr_mapped): Likewise.
4296 (PSR_ICC): Don't redefine.
4297 (PSR_IMPL): Likewise.
4299 2017-09-25 Tom Tromey <tom@tromey.com>
4301 * regcache.c (regcache::dump): Use string_printf.
4303 2017-09-25 Tom Tromey <tom@tromey.com>
4305 * regcache.c (class regcache_invalidator): New.
4306 (struct register_to_invalidate): Remove.
4307 (make_cleanup_regcache_invalidate): Remove.
4308 (regcache::raw_write): Use regcache_invalidator.
4310 2017-09-25 Tom Tromey <tom@tromey.com>
4312 * spu-tdep.c (spu2ppu_sniffer): Update.
4313 * regcache.h (make_cleanup_regcache_xfree): Don't declare.
4314 * regcache.c (do_regcache_xfree, make_cleanup_regcache_xfree):
4316 * ppc-linux-tdep.c (ppu2spu_sniffer): Update.
4317 * mi/mi-main.c (mi_cmd_data_list_changed_registers): Update.
4318 * frame.h (frame_save_as_regcache): Return std::unique_ptr.
4319 * frame.c (frame_save_as_regcache): Return std::unique_ptr.
4320 (frame_pop): Update.
4322 2017-09-25 Tom Tromey <tom@tromey.com>
4324 * spu-tdep.c (spu2ppu_dealloc_cache): Use delete.
4325 * regcache.h (regcache_xfree): Don't declare.
4326 * regcache.c (regcache_xfree): Remove.
4327 (do_regcache_xfree): Use delete.
4328 * ppc-linux-tdep.c (ppu2spu_dealloc_cache): Use delete.
4329 * linux-fork.c (free_fork): Use delete.
4330 (fork_save_infrun_state): Likewise.
4331 * jit.c (jit_dealloc_cache): Use delete.
4332 * infrun.c (discard_infcall_suspend_state): Use delete.
4334 2017-09-25 Tom Tromey <tom@tromey.com>
4336 * regcache.h (regcache_xmalloc): Don't declare.
4337 (regcache_raw_set_cached_value): Update comment.
4338 * regcache.c (regcache_xmalloc): Remove.
4339 * ppc-linux-tdep.c (ppu2spu_sniffer): Use new.
4340 * jit.c (jit_frame_sniffer): Use new.
4341 * frame.c (frame_save_as_regcache): Use new.
4343 2017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
4345 * NEWS: Advertise support for guarded-storage registers on IBM z.
4347 2017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
4349 * s390-linux-nat.c (have_regset_gs): New static variable.
4350 (s390_linux_fetch_inferior_registers): Handle guarded-storage
4351 control block and guarded-storage broadcast control regsets.
4352 (s390_read_description): Detect whether the target has
4353 guarded-storage support, return appropriate tdesc.
4354 * s390-linux-tdep.c (features/s390-gs-linux64.c): New include.
4355 (features/s390x-gs-linux64.c): Likewise.
4356 (struct gdbarch_tdep) <have_gs>: New field.
4357 (s390_regmap_gs, s390_regmap_gsbc, s390_gs_regset)
4358 (s390_gsbc_regset): New variables.
4359 (s390_iterate_over_regset_sections): Iterate over s390_gs_regset
4360 and s390_gsbc_regset, if applicable.
4361 (s390_core_read_description): Check whether core file was from a
4362 target with guarded-storage support; include appropriate regsets.
4363 (s390_gdbarch_init): Add registers for guarded-storage support.
4364 (_initialize_s390_tdep): Initialize new target descriptions that
4365 include registers for guarded-storage support.
4366 * s390-linux-tdep.h (HWCAP_S390_GS, S390_GSD_REGNUM)
4367 (S390_GSSM_REGNUM, S390_GSEPLA_REGNUM)
4368 (S390_BC_GSD_REGNUM, S390_BC_GSSM_REGNUM): New defines.
4369 (S390_NUM_REGS): Adjust macro definition.
4370 (s390_gs_regset, s390_gsbc_regset, tdesc_s390_gs_linux64)
4371 (tdesc_s390x_gs_linux64): New declarations.
4373 2017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
4375 * features/s390-gs-linux64.xml: New file.
4376 * features/s390-gs.xml: New file.
4377 * features/s390-gsbc.xml: New file.
4378 * features/s390x-gs-linux64.xml: New file.
4379 * features/Makefile (WHICH): Add s390-gs-linux64 and
4381 (s390-gs-linux64-expedite, s390x-gs-linux64-expedite): New macros.
4382 (XMLTOC): Add s390-gs-linux64.xml and s390x-linux64.xml.
4383 * features/s390-gs-linux64.c: New generated file.
4384 * features/s390x-gs-linux64.c: New file.
4385 * regformats/s390-gs-linux64.dat: New file.
4386 * regformats/s390x-gs-linux64.dat: New file.
4388 2017-09-23 Tom Tromey <tom@tromey.com>
4390 * defs.h (make_cleanup_override_quit_handler): Don't declare.
4392 2017-09-22 Tom Tromey <tom@tromey.com>
4394 * utils.c (class scoped_input_handler) <m_quit_handler>: Change
4395 type to scoped_restore_tmpl.
4396 <scoped_input_handler>: Initialize m_quit_handler directly.
4398 2017-09-22 Sergio Durigan Junior <sergiodj@redhat.com>
4400 * cli/cli-cmds.c (pwd_command): Use "getcwd (NULL, 0)".
4401 (cd_command): Likewise. Free "current_directory" before
4403 * main.c (captured_main_1): Use "getcwd (NULL, 0)".
4404 * mi/mi-cmd-env.c (mi_cmd_env_pwd): Likewise.
4405 * top.c (gdb_dirbuf): Remove global declaration.
4406 * top.h (gdb_dirbuf): Likewise.
4408 2017-09-22 Sergio Durigan Junior <sergiodj@redhat.com>
4410 * gnulib/aclocal.m4: Regenerate.
4411 * gnulib/config.in: Regenerate.
4412 * gnulib/configure: Regenerate.
4413 * gnulib/import/Makefile.am: Regenerate.
4414 * gnulib/import/Makefile.in: Regenerate.
4415 * gnulib/import/assure.h: New file.
4416 * gnulib/import/at-func.c: Likewise
4417 * gnulib/import/chdir-long.c: New file.
4418 * gnulib/import/chdir-long.h: New file.
4419 * gnulib/import/cloexec.c: New file.
4420 * gnulib/import/cloexec.h: New file.
4421 * gnulib/import/close.c: New file.
4422 * gnulib/import/closedir.c: New file.
4423 * gnulib/import/dirent-private.h: New file.
4424 * gnulib/import/dup-safer.c: New file.
4425 * gnulib/import/dup.c: New file.
4426 * gnulib/import/dup2.c: New file.
4427 * gnulib/import/error.c: New file.
4428 * gnulib/import/error.h: New file.
4429 * gnulib/import/exitfail.c: New file.
4430 * gnulib/import/exitfail.h: New file.
4431 * gnulib/import/fchdir.c: New file.
4432 * gnulib/import/fcntl.c: New file.
4433 * gnulib/import/fcntl.in.h: New file.
4434 * gnulib/import/fd-hook.c: New file.
4435 * gnulib/import/fd-hook.h: New file.
4436 * gnulib/import/fd-safer.c: New file.
4437 * gnulib/import/fdopendir.c: New file.
4438 * gnulib/import/filename.h: New file.
4439 * gnulib/import/filenamecat-lgpl.c: New file.
4440 * gnulib/import/filenamecat.h: New file.
4441 * gnulib/import/fstat.c: New file.
4442 * gnulib/import/fstatat.c: New file.
4443 * gnulib/import/getcwd-lgpl.c: New file.
4444 * gnulib/import/getcwd.c: New file.
4445 * gnulib/import/getdtablesize.c: New file.
4446 * gnulib/import/getlogin_r.c: New file.
4447 * gnulib/import/getprogname.c: New file.
4448 * gnulib/import/getprogname.h: New file.
4449 * gnulib/import/gettext.h: New file.
4450 * gnulib/import/glob-libc.h: New file.
4451 * gnulib/import/glob.c: New file.
4452 * gnulib/import/glob.in.h: New file.
4453 * gnulib/import/intprops.h: New file.
4454 * gnulib/import/m4/chdir-long.m4: New file.
4455 * gnulib/import/m4/close.m4: New file.
4456 * gnulib/import/m4/closedir.m4: New file.
4457 * gnulib/import/m4/d-ino.m4: New file.
4458 * gnulib/import/m4/d-type.m4: New file.
4459 * gnulib/import/m4/dup.m4: New file.
4460 * gnulib/import/m4/dup2.m4: New file.
4461 * gnulib/import/m4/error.m4: New file.
4462 * gnulib/import/m4/fchdir.m4: New file.
4463 * gnulib/import/m4/fcntl.m4: New file.
4464 * gnulib/import/m4/fcntl_h.m4: New file.
4465 * gnulib/import/m4/fdopendir.m4: New file.
4466 * gnulib/import/m4/filenamecat.m4: New file.
4467 * gnulib/import/m4/fstat.m4: New file.
4468 * gnulib/import/m4/fstatat.m4: New file.
4469 * gnulib/import/m4/getcwd-abort-bug.m4: New file.
4470 * gnulib/import/m4/getcwd-path-max.m4: New file.
4471 * gnulib/import/m4/getcwd.m4: New file.
4472 * gnulib/import/m4/getdtablesize.m4: New file.
4473 * gnulib/import/m4/getlogin_r.m4: New file.
4474 * gnulib/import/m4/getprogname.m4: New file.
4475 * gnulib/import/m4/glob.m4: New file.
4476 * gnulib/import/m4/gnulib-cache.m4: Regenerate.
4477 * gnulib/import/m4/gnulib-comp.m4: Regenerate.
4478 * gnulib/import/m4/mempcpy.m4: New file.
4479 * gnulib/import/m4/memrchr.m4: New file.
4480 * gnulib/import/m4/mode_t.m4: New file.
4481 * gnulib/import/m4/msvc-inval.m4: New file.
4482 * gnulib/import/m4/msvc-nothrow.m4: New file.
4483 * gnulib/import/m4/open.m4: New file.
4484 * gnulib/import/m4/openat.m4: New file.
4485 * gnulib/import/m4/opendir.m4: New file.
4486 * gnulib/import/m4/readdir.m4: New file.
4487 * gnulib/import/m4/realloc.m4: New file.
4488 * gnulib/import/m4/rewinddir.m4: New file.
4489 * gnulib/import/m4/save-cwd.m4: New file.
4490 * gnulib/import/m4/strdup.m4: New file.
4491 * gnulib/import/m4/strerror.m4: New file.
4492 * gnulib/import/m4/unistd-safer.m4: New file.
4493 * gnulib/import/mempcpy.c: New file.
4494 * gnulib/import/memrchr.c: New file.
4495 * gnulib/import/msvc-inval.c: New file.
4496 * gnulib/import/msvc-inval.h: New file.
4497 * gnulib/import/msvc-nothrow.c: New file.
4498 * gnulib/import/msvc-nothrow.h: New file.
4499 * gnulib/import/open.c: New file.
4500 * gnulib/import/openat-die.c: New file.
4501 * gnulib/import/openat-priv.h: New file.
4502 * gnulib/import/openat-proc.c: New file.
4503 * gnulib/import/openat.c: New file.
4504 * gnulib/import/openat.h: New file.
4505 * gnulib/import/opendir.c: New file.
4506 * gnulib/import/pipe-safer.c: New file.
4507 * gnulib/import/readdir.c: New file.
4508 * gnulib/import/realloc.c: New file.
4509 * gnulib/import/rewinddir.c: New file.
4510 * gnulib/import/save-cwd.c: New file.
4511 * gnulib/import/save-cwd.h: New file.
4512 * gnulib/import/strdup.c: New file.
4513 * gnulib/import/strerror-override.c: New file.
4514 * gnulib/import/strerror-override.h: New file.
4515 * gnulib/import/strerror.c: New file.
4516 * gnulib/import/unistd--.h: New file.
4517 * gnulib/import/unistd-safer.h: New file.
4518 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add
4519 "getcwd" and "glob".
4520 * ser-tcp.c: Undefine "close" before redefining it.
4522 2017-09-21 Simon Marchi <simon.marchi@ericsson.com>
4524 * guile/scm-value.c (gdbscm_value_address): Initialize address,
4527 2017-09-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
4529 * configure.nat <i386sol2,i386>: Add fork-inferior.o to NATDEPFILES.
4530 <sol2,sparc>: Likewise.
4531 <sol2-64,i386>: Likewise.
4533 * warning.m4 (AM_GDB_WARNINGS): Disable -Wunknown-pragmas,
4534 -Wdeprecated-declarations on *-*-solaris*.
4535 * configure: Regenerate.
4537 * procfs.c: Include "nat/inferior.h".
4538 (procfs_info_proc): Fix typo.
4540 2017-09-21 Kevin Buettner <kevinb@redhat.com>
4542 * remote.c (vector): Include.
4543 (struct private_thread_info): Add field, thread_handle.
4544 (free_private_thread_info): Deallocate storage associated with
4546 (get_private_info_thread): Initialize `thread_handle' field.
4547 (struct thread_item): Add field, thread_handle.
4548 (clear_threads_listing_context): Deallocate storage associated
4550 (start_thread): Add support for "handle" attribute.
4551 (thread_attributes): Add "handle".
4552 (remote_get_threads_with_qthreadinfo): Initialize thread_handle
4554 (remote_update_thread_list): Update thread_handle.
4555 (remote_thread_handle_to_thread_info): New function.
4556 (init_remote_ops): Initialize to_thread_handle_to_thread_info.
4558 2017-09-21 Kevin Buettner <kevinb@redhat.com>
4560 * python/py-inferior.c (gdbpy_thread_from_thread_handle): New
4562 (inferior_object_methods): Add gdbpy_thread_from_thread_handle.
4563 * python/python-internal.h (thread_object_type): Declare.
4565 2017-09-21 Kevin Buettner <kevinb@redhat.com>
4567 * target.h (struct target_ops): Add to_thread_handle_to_thread_info.
4568 (target_thread_handle_to_thread_info): Declare.
4569 * target.c (target_thread_handle_to_thread_info): New function.
4570 * target-delegates.c: Regenerate.
4571 * gdbthread.h (find_thread_by_handle): Declare.
4572 * thread.c (find_thread_by_handle): New function.
4573 * linux-thread-db.c (thread_db_thread_handle_to_thread_info): New
4575 (init_thread_db_ops): Register thread_db_thread_handle_to_thread_info.
4577 2017-09-21 Simon Marchi <simon.marchi@ericsson.com>
4579 * nat/linux-waitpid.c (linux_debug): Add ATTRIBUTE_PRINTF.
4581 2017-09-21 Simon Marchi <simon.marchi@ericsson.com>
4583 * microblaze-tdep.c (microblaze_debug): Add ATTRIBUTE_PRINTF.
4585 2017-09-21 Yao Qi <yao.qi@linaro.org>
4587 * configure.tgt (aarch64*-*-freebsd*): Add fbsd-tdep.o solib-svr4.o
4590 2017-09-20 Tom Tromey <tom@tromey.com>
4592 * breakpoint.c (struct counted_command_line): Remove.
4593 (breakpoint_commands): Update.
4594 (alloc_counted_command_line, incref_counted_command_line)
4595 (decref_counted_command_line, do_cleanup_counted_command_line)
4596 (make_cleanup_decref_counted_command_line): Remove.
4597 (breakpoint_set_commands, commands_command_1, ~bpstats, bpstats)
4598 (bpstat_clear_actions, bpstat_do_actions_1, watchpoint_check)
4599 (bpstat_stop_status, print_one_breakpoint_location, ~breakpoint)
4600 (save_breakpoints): Update.
4601 * breakpoint.h (counted_command_line): Now a typedef to
4603 (struct breakpoint) <commands>: Now a counted_command_line.
4604 (struct bpstats) <command>: Likewise.
4606 2017-09-20 Tom Tromey <tom@tromey.com>
4608 * breakpoint.c (struct commands_info, do_map_commands_command):
4610 (commands_command_1): Update.
4611 (iterate_over_related_breakpoints): Take a function_view.
4612 (do_delete_breakpoint, do_map_delete_breakpoint): Remove.
4613 (delete_command): Update.
4614 (map_breakpoint_numbers): Take a function_view.
4615 (do_disable_breakpoint, do_map_delete_breakpoint): Remove.
4616 (disable_command): Update.
4617 (do_enable_breakpoint, do_map_enable_breakpoint): Remove.
4618 (enable_command): Update.
4619 (struct disp_data, do_enable_breakpoint_disp)
4620 (do_map_enable_once_breakpoint, do_map_enable_count_breakpoint)
4621 (do_map_enable_delete_breakpoint): Remove.
4622 (enable_once_command, enable_count_command, enable_delete_command)
4623 (delete_trace_variable_command): Update.
4625 2017-09-20 Tom Tromey <tom@tromey.com>
4627 * breakpoint.c (~bpstats): Rename from bpstat_free. Update.
4628 (bpstat_clear): Use delete.
4629 (bpstats): New constructors.
4630 (bpstat_copy, bpstat_stop_status): Use new.
4631 (dprintf_after_condition_true): Update.
4632 * breakpoint.h (bpstats::bpstats): Add constructors.
4633 (bpstats::~bpstats): Add destructor.
4635 2017-09-20 Pedro Alves <palves@redhat.com>
4637 * eval.c (make_params): Delete, refactored as ...
4638 (class fake_method): ... this new type's ctor.
4639 (fake_method::~fake_method): New.
4640 (evaluate_subexp_standard): Use 'fake_method'.
4642 2017-09-20 Tom Tromey <tom@tromey.com>
4644 * windows-nat.c (get_windows_debug_event, windows_wait)
4645 (do_initial_windows_stuff, windows_attach): Update.
4646 * utils.c (vwarning, internal_vproblem): Update.
4647 (ui_unregister_input_event_handler_cleanup)
4648 (prepare_to_handle_input): Remove.
4649 (class scoped_input_handler): New.
4650 (defaulted_query, prompt_for_continue): Update.
4651 * tui/tui-hooks.c (tui_refresh_frame_and_register_information):
4653 * top.c (undo_terminal_modifications_before_exit): Update.
4654 * target/target.h (target_terminal_init, target_terminal_inferior)
4655 (target_terminal_ours): Don't declare.
4656 (class target_terminal): New.
4657 * target.h (target_terminal_is_inferior, target_terminal_is_ours)
4658 (target_terminal_ours_for_output)
4659 (make_cleanup_restore_target_terminal): Don't declare.
4660 (target_terminal_info): Remove.
4661 * target.c (enum terminal_state, terminal_state): Remove.
4662 (target_terminal::terminal_state): Define.
4663 (target_terminal::init): Rename from target_terminal_init.
4664 (target_terminal::inferior): Rename from
4665 target_terminal_inferior.
4666 (target_terminal::ours): Rename from target_terminal_ours.
4667 (target_terminal::ours_for_output): Rename from
4668 target_terminal_ours_for_output.
4669 (target_terminal::info): New method.
4670 (cleanup_restore_target_terminal)
4671 (make_cleanup_restore_target_terminal): Remove.
4672 * solib.c (handle_solib_event): Update.
4673 * remote.c (remote_serial_quit_handler): Update.
4674 (remote_terminal_inferior, remote_wait_as): Update.
4675 * record-full.c (record_full_wait_1): Update.
4676 * nto-procfs.c (procfs_create_inferior): Update.
4677 * nat/fork-inferior.c (startup_inferior): Update.
4678 * mi/mi-interp.c (mi_new_thread, mi_thread_exit)
4679 (mi_record_changed, mi_inferior_added, mi_inferior_appeared)
4680 (mi_inferior_exit, mi_inferior_removed, mi_traceframe_changed)
4681 (mi_tsv_created, mi_tsv_deleted, mi_tsv_modified)
4682 (mi_breakpoint_created, mi_breakpoint_deleted)
4683 (mi_breakpoint_modified, mi_on_resume, mi_solib_loaded)
4684 (mi_solib_unloaded, mi_command_param_changed, mi_memory_changed)
4685 (mi_user_selected_context_changed, report_initial_inferior):
4687 * linux-nat.c (linux_nat_attach, linux_nat_terminal_ours)
4688 (linux_nat_terminal_inferior): Update.
4689 * infrun.c (follow_fork_inferior)
4690 (handle_vfork_child_exec_or_exit, do_target_resume)
4691 (check_curr_ui_sync_execution_done, handle_inferior_event_1)
4692 (handle_signal_stop, maybe_remove_breakpoints, normal_stop):
4694 * inflow.c (child_terminal_init, info_terminal_command): Update.
4695 * infcmd.c (post_create_inferior, continue_1, prepare_one_step)
4696 (attach_command): Update.
4697 * infcall.c (call_thread_fsm_should_stop): Update.
4698 * gnu-nat.c (gnu_attach): Update.
4699 * extension.c (struct active_ext_lang_state)
4700 (restore_active_ext_lang): Update.
4701 * exceptions.c (print_flush): Update.
4702 * event-top.c (async_enable_stdin, default_quit_handler): Update.
4703 (struct quit_handler_cleanup_data, restore_quit_handler)
4704 (restore_quit_handler_dtor, make_cleanup_override_quit_handler):
4706 * cp-support.c (gdb_demangle): Update.
4707 * breakpoint.c (update_inserted_breakpoint_locations)
4708 (insert_breakpoint_locations, handle_jit_event)
4709 (disable_breakpoints_in_unloaded_shlib): Update.
4710 * annotate.c (annotate_breakpoints_invalid)
4711 (annotate_frames_invalid): Update.
4713 2017-09-20 Tom Tromey <tom@tromey.com>
4715 * main.c (catch_command_errors): Rename from
4716 catch_command_errors_const.
4717 (captured_main_1): Update.
4719 2017-09-20 Pedro Alves <palves@redhat.com>
4721 * cli/cli-cmds.c (list_command): Use print_sal_location.
4722 (print_sal_location): New function.
4723 (ambiguous_line_spec): Use print_sal_location.
4724 * linespec.c (symbol_to_sal): Record the symbol in the sal.
4725 * symtab.c (find_function_start_sal): Likewise.
4726 * symtab.h (symtab_and_line::symbol): New field.
4728 2017-09-20 Pedro Alves <palves@redhat.com>
4730 * linespec.c (minsym_found): Handle non-text minsyms.
4731 (symbol_to_sal): Record a sal.pc for non-block, non-label symbols.
4733 2017-09-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
4735 * features/Makefile (i386-avx-mpx-avx512-pku.dat): Add missing
4738 2017-09-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
4740 * gdb.arch/i386-avx512.c (move_zmm_data_to_reg): Use
4741 vmovups instead vmovaps.
4742 (move_zmm_data_to_memory): Use vmovups instead vmovaps.
4744 2017-09-19 John Baldwin <jhb@FreeBSD.org>
4746 * NEWS (Changes since GDB 8.0): Add starti.
4747 * infcmd.c (enum run_break): New.
4748 (run_command_1): Queue pending event for RUN_STOP_AT_FIRST_INSN
4750 (run_command): Use enum run_how.
4751 (start_command): Likewise.
4752 (starti_command): New function.
4753 (RUN_ARGS_HELP): New macro.
4754 (_initialize_infcmd): Use RUN_ARGS_HELP for run and start
4755 commands. Add starti command.
4757 2017-09-19 Yao Qi <yao.qi@linaro.org>
4759 * Makefile.in (monitor.o): Remove the rule.
4761 2017-09-19 Yao Qi <yao.qi@linaro.org>
4763 * annotate.h (struct annotate_arg_emitter): Use
4764 DISABLE_COPY_AND_ASSIGN.
4765 * common/refcounted-object.h (refcounted_object): Likewise.
4766 * completer.h (struct completion_result): Likewise.
4767 * dwarf2read.c (struct dwarf2_per_objfile): Likewise.
4768 * filename-seen-cache.h (filename_seen_cache): Likewise.
4769 * gdbcore.h (thread_section_name): Likewise.
4770 * gdb_regex.h (compiled_regex): Likewise.
4771 * gdbthread.h (scoped_restore_current_thread): Likewise.
4772 * inferior.h (scoped_restore_current_inferior): Likewise.
4773 * jit.c (jit_reader): Likewise.
4774 * linespec.h (struct linespec_result): Likewise.
4775 * mi/mi-parse.h (struct mi_parse): Likewise.
4776 * nat/fork-inferior.c (execv_argv): Likewise.
4777 * progspace.h (scoped_restore_current_program_space): Likewise.
4778 * python/python-internal.h (class gdbpy_enter): Likewise.
4779 * regcache.h (regcache): Likewise.
4780 * target-descriptions.c (struct tdesc_reg): Likewise.
4781 (struct tdesc_type): Likewise.
4782 (struct tdesc_feature): Likewise.
4783 * ui-out.h (ui_out_emit_type): Likewise.
4785 2017-09-18 Simon Marchi <simon.marchi@ericsson.com>
4787 * dwarf2expr.c (dwarf_expr_context::execute_stack_op): Remove
4788 label abort_expression.
4790 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
4792 * common/buffer.c (buffer_xml_printf): Adjust.
4793 * common/xml-utils.c (xml_escape_text): Change return type to
4794 std::string, update code accordingly.
4795 * common/xml-utils.h (xml_escape_text): Change return type to
4797 * rs6000-aix-tdep.c (rs6000_aix_shared_library_to_xml): Adjust.
4798 * windows-tdep.c (windows_xfer_shared_library): Adjust.
4799 * unittests/xml-utils-selftests.c (test_xml_escape_text):
4802 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
4804 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add new source file.
4805 (SUBDIR_UNITTESTS_OBS): Add new object file.
4806 * unittests/xml-utils-selftests.c: New file.
4808 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
4810 * common/selftest.h (selftest): New struct/interface.
4811 (register_test): Add name parameter, add new overload.
4812 (run_tests): Add filter parameter.
4813 (for_each_selftest_ftype): New typedef.
4814 (for_each_selftest): New declaration.
4815 * common/selftest.c (tests): Change type to
4816 map<string, unique_ptr<selftest>>.
4817 (simple_selftest): New struct.
4818 (register_test): New function.
4819 (register_test): Add name parameter and use it.
4820 (run_tests): Add filter parameter and use it. Add prints.
4821 Adjust to vector -> map change.
4822 * aarch64-tdep.c (_initialize_aarch64_tdep): Add names when
4823 registering selftests.
4824 * arm-tdep.c (_initialize_arm_tdep): Likewise.
4825 * disasm-selftests.c (_initialize_disasm_selftests): Likewise.
4826 * dwarf2-frame.c (_initialize_dwarf2_frame): Likewise.
4827 * dwarf2loc.c (_initialize_dwarf2loc): Likewise.
4828 * findvar.c (_initialize_findvar): Likewise.
4829 * gdbarch-selftests.c (_initialize_gdbarch_selftests): Likewise.
4830 * maint.c (maintenance_selftest): Update call to run_tests.
4831 (maintenance_info_selftests): New function.
4832 (_initialize_maint_cmds): Register "maintenance info selftests"
4833 command. Update "maintenance selftest" doc.
4834 * regcache.c (_initialize_regcache): Add names when registering
4836 * rust-exp.y (_initialize_rust_exp): Likewise.
4837 * selftest-arch.c (gdbarch_selftest): New struct.
4838 (gdbarch_tests): Remove.
4839 (register_test_foreach_arch): Add name parameter. Call
4841 (tests_with_arch): Remove, move most content to
4842 gdbarch_selftest::operator().
4843 (_initialize_selftests_foreach_arch): Remove.
4844 * selftest-arch.h (register_test_foreach_arch): Add name
4846 (run_tests_with_arch): New declaration.
4847 * utils-selftests.c (_initialize_utils_selftests): Add names
4848 when registering selftests.
4849 * utils.c (_initialize_utils): Likewise.
4850 * unittests/array-view-selftests.c
4851 (_initialize_array_view_selftests): Likewise.
4852 * unittests/environ-selftests.c (_initialize_environ_selftests):
4854 * unittests/function-view-selftests.c
4855 (_initialize_function_view_selftests): Likewise.
4856 * unittests/offset-type-selftests.c
4857 (_initialize_offset_type_selftests): Likewise.
4858 * unittests/optional-selftests.c
4859 (_initialize_optional_selftests): Likewise.
4860 * unittests/scoped_restore-selftests.c
4861 (_initialize_scoped_restore_selftests): Likewise.
4862 * NEWS: Document "maintenance selftest" and "maint info
4865 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
4867 * mi/mi-main.c (mi_load_progress): Restore current_uiout using a
4870 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
4872 * mi/mi-main.c (mi_load_progress): Make uiout variable
4875 2017-09-15 Pedro Alves <palves@redhat.com>
4877 * compile/compile-c-types.c (convert_enum, convert_int)
4878 (convert_float): Adjust to refer to int_type_v0 and float_type_v0.
4880 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
4882 * dwarf2read.c (copy_string): Remove.
4883 (parse_macro_definition): Replace copy_string with savestring.
4885 2017-09-15 Yao Qi <yao.qi@linaro.org>
4887 * configure.tgt (i[34567]86-*-darwin*): Append amd64.o to
4889 (i[34567]86-*-solaris2.1[0-9]* | x86_64-*-solaris2.1[0-9]*):
4891 (i[34567]86-*-linux*): Likewise.
4893 2017-09-14 Simon Marchi <simon.marchi@ericsson.com>
4895 * dwarf2expr.h (dwarf_stack_value): Add constructor.
4896 (dwarf_expr_context) <~dwarf_expr_context>: Define as default.
4897 <stack>: Change type to std::vector.
4898 <stack_len, stack_allocated>: Remove.
4899 <grow_stack>: Remove.
4900 * dwarf2expr.c (dwarf_expr_context::dwarf_expr_context): Adjust.
4901 (dwarf_expr_context::~dwarf_expr_context): Remove.
4902 (dwarf_expr_context::grow_stack): Remove.
4903 (dwarf_expr_context::push): Adjust.
4904 (dwarf_expr_context::pop): Adjust.
4905 (dwarf_expr_context::fetch): Adjust.
4906 (dwarf_expr_context::fetch_in_stack_memory): Adjust.
4907 (dwarf_expr_context::stack_empty_p): Adjust.
4908 (dwarf_expr_context::execute_stack_op): Adjust.
4910 2017-09-14 Simon Marchi <simon.marchi@ericsson.com>
4912 * dwarf2expr.h (dwarf_expr_context) <stack_empty_p>: Change
4913 return type to bool.
4914 * dwarf2expr.c (dwarf_expr_context::stack_empty_p): Likewise.
4916 2017-09-14 Simon Marchi <simon.marchi@ericsson.com>
4918 * dwarf2expr.h (dwarf_expr_piece) <v.mem.in_stack_memory>:
4919 Change type to bool.
4920 (dwarf_stack_value) <in_stack_memory>: Likewise.
4921 (dwarf_expr_context) <push_address>: Change parameter type to
4923 <fetch_in_stack_memory>: Change return type to bool.
4924 <push>: Change parameter type to bool.
4925 * dwarf2expr.c (dwarf_expr_context::push): Change parameter type
4927 (dwarf_expr_context::push_address): Likewise.
4928 (dwarf_expr_context::fetch_in_stack_memory): Change return type
4930 (dwarf_expr_context::execute_stack_op): Adjust.
4931 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Adjust.
4933 2017-09-14 Simon Marchi <simon.marchi@ericsson.com>
4935 * dwarf2expr.h (struct dwarf_expr_piece): Move up.
4936 (struct dwarf_expr_context) <n_pieces>: Remove.
4937 <pieces>: Change type to std::vector.
4938 * dwarf2expr.c (dwarf_expr_context::dwarf_expr_context): Adjust.
4939 (dwarf_expr_context::~dwarf_expr_context): Don't manually free
4941 (dwarf_expr_context::add_piece): Adjust.
4942 * dwarf2loc.c (struct piece_closure): Initialize fields.
4944 <pieces>: Change type to std::vector.
4945 (allocate_piece_closure): Adjust, change parameter to
4946 std::vector rvalue and std::move it to piece_closure.
4947 (rw_pieced_value): Adjust.
4948 (check_pieced_synthetic_pointer): Adjust.
4949 (indirect_synthetic_pointer): Adjust.
4950 (coerce_pieced_ref): Adjust.
4951 (free_pieced_value_closure): Adjust. Use delete to free
4953 (dwarf2_evaluate_loc_desc_full): Adjust. std::move ctx.pieces
4954 to allocate_piece_closure.
4955 (dwarf2_loc_desc_get_symbol_read_needs): Adjust.
4957 2017-09-12 Simon Marchi <simon.marchi@ericsson.com>
4959 * probe.h (probe_ops_cp): Remove typedef.
4960 (DEF_VEC_P (probe_ops_cp)): Remove.
4961 (all_probe_ops): Change type to std::vector.
4962 * probe.c (info_probes_for_ops): Adjust to vector change.
4963 (probe_linespec_to_ops): Likewise.
4964 (all_probe_ops): Change type to std::vector.
4965 (_initialize_probe): Adjust to vector change.
4966 * dtrace-probe.c (_initialize_dtrace_probe): Likewise.
4967 * elfread.c (elf_get_probes): Likewise.
4968 * stap-probe.c (_initialize_stap_probe): Likewise.
4970 2017-09-12 Simon Marchi <simon.marchi@ericsson.com>
4972 * probe.h (struct bound_probe): Define constructors.
4973 * probe.c (bound_probe_s): Remove typedef.
4974 (DEF_VEC_O (bound_probe_s)): Remove VEC.
4975 (collect_probes): Change return type to std::vector, remove
4977 (compare_probes): Return bool, change parameter type. Change
4978 semantic to "less than".
4979 (gen_ui_out_table_header_info): Change parameter to std::vector
4981 (exists_probe_with_pops): Likewise.
4982 (info_probes_for_ops): Update to std::vector change.
4983 (enable_probes_command): Likewise.
4984 (disable_probes_command): Likewise.
4986 2017-09-12 Simon Marchi <simon.marchi@ericsson.com>
4988 * probe.h (struct probe_ops) <get_probes>: Change parameter from
4990 * probe.c (parse_probes_in_pspace): Update.
4991 (find_probes_in_objfile): Update.
4992 (find_probe_by_pc): Update.
4993 (collect_probes): Update.
4994 (probe_any_get_probes): Update.
4995 * symfile.h (struct sym_probe_fns) <sym_get_probes> Change
4996 return type to reference to std::vector.
4997 * dtrace-probe.c (dtrace_process_dof_probe): Change parameter to
4998 std::vector and update.
4999 (dtrace_process_dof): Likewise.
5000 (dtrace_get_probes): Likewise.
5001 * elfread.c (elf_get_probes): Change return type to std::vector,
5002 store an std::vector in bfd_data.
5003 (probe_key_free): Update to std::vector.
5004 * stap-probe.c (handle_stap_probe): Change parameter to
5005 std::vector and update.
5006 (stap_get_probes): Likewise.
5007 * symfile-debug.c (debug_sym_get_probes): Change return type to
5008 std::vector and update.
5010 2017-09-11 Tom Tromey <tom@tromey.com>
5012 * breakpoint.c (program_breakpoint_here_p): Update.
5013 * target.c (make_scoped_restore_show_memory_breakpoints): Rename
5014 from make_show_memory_breakpoints_cleanup. Return a
5015 scoped_restore_tmpl<int>.
5016 (restore_show_memory_breakpoints): Remove.
5017 * ppc-linux-tdep.c (ppc_linux_memory_remove_breakpoint): Update.
5018 * mem-break.c (memory_validate_breakpoint): Update.
5019 * ia64-tdep.c (ia64_memory_insert_breakpoint): Update.
5020 (ia64_memory_remove_breakpoint): Update.
5021 (ia64_breakpoint_from_pc): Update.
5022 * target.h (make_scoped_restore_show_memory_breakpoints): Rename
5023 from make_show_memory_breakpoints_cleanup.
5025 2017-09-11 Tom Tromey <tom@tromey.com>
5027 * d-namespace.c (d_lookup_symbol): Use std::string.
5028 (find_symbol_in_baseclass): Likewise.
5030 2017-09-11 Tom Tromey <tom@tromey.com>
5032 * ctf.c (ctf_start): Use std::string.
5034 2017-09-11 Tom Tromey <tom@tromey.com>
5036 * ada-lang.c (is_known_support_routine): Update.
5037 (ada_unhandled_exception_name_addr_from_raise): Update.
5038 * guile/scm-frame.c (gdbscm_frame_name): Update.
5039 * python/py-frame.c (frapy_name): Update.
5040 (frapy_function): Update.
5041 * stack.h (find_frame_funname): Update.
5042 * stack.c (find_frame_funname): Return unique_xmalloc_ptr.
5043 (print_frame): Update.
5045 2017-09-11 Tom Tromey <tom@tromey.com>
5047 * findcmd.c (put_bits): Take a gdb::byte_vector.
5048 (parse_find_args): Return gdb::byte_vector. "args" now const.
5049 Remove "pattern_bufp" and "pattern_lenp" parameters. Remove
5051 (find_command): Update.
5053 2017-09-11 Tom Tromey <tom@tromey.com>
5055 * cli/cli-script.c (class scoped_restore_hook_in): New.
5056 (clear_hook_in_cleanup): Remove.
5057 (execute_cmd_pre_hook, execute_cmd_post_hook): Use
5058 scoped_restore_hook_in.
5060 2017-09-11 Tom Tromey <tom@tromey.com>
5062 * cli/cli-script.c (restore_interp): Remove.
5063 (read_command_lines): Use scoped_restore_interp.
5064 * interps.c (scoped_restore_interp::set_temp): Rename from
5066 * interps.h (class scoped_restore_interp): New.
5067 (interp_set_temp): Remove.
5069 2017-09-11 Tom Tromey <tom@tromey.com>
5071 * mi/mi-cmd-catch.c (mi_cmd_catch_assert)
5072 (mi_cmd_catch_exception, mi_catch_load_unload): Update.
5073 * mi/mi-cmd-break.c (setup_breakpoint_reporting): Return a
5075 (mi_cmd_break_insert_1): Update.
5076 * mi/mi-cmd-break.h (setup_breakpoint_reporting): Return a
5079 2017-09-11 Tom Tromey <tom@tromey.com>
5081 * demangle.c (demangle_command): Update.
5082 * breakpoint.c (disable_command): Update.
5083 (enable_command): Update.
5084 (find_location_by_number): Make "number" const. Use
5086 * cli/cli-utils.c (extract_arg): Return std::string.
5087 * probe.c (parse_probe_linespec): Update. Change types.
5088 (collect_probes): Take string arguments.
5089 (parse_probe_linespec): Likewise.
5090 (info_probes_for_ops): Update.
5091 (enable_probes_command): Update.
5092 (disable_probes_command): Update.
5093 * break-catch-sig.c (catch_signal_split_args): Update.
5094 * mi/mi-parse.c (mi_parse): Update.
5096 2017-09-11 Tom Tromey <tom@tromey.com>
5098 * language.h (language_enum): Make argument const.
5099 * language.c (language_enum): Make argument const.
5101 2017-09-11 Tom Tromey <tom@tromey.com>
5103 * common/common-utils.h (skip_to_space): Remove macro, redeclare
5105 (skip_to_space): Rename from skip_to_space_const.
5106 * common/common-utils.c (skip_to_space): New function.
5107 (skip_to_space): Rename from skip_to_space_const.
5108 * cli/cli-utils.h (get_number): Rename from get_number_const.
5109 (extract_arg): Rename from extract_arg_const.
5110 * cli/cli-utils.c (get_number): Rename from get_number_const.
5111 (extract_arg): Rename from extract_arg_const.
5112 (number_or_range_parser::get_number): Use ::get_number.
5113 * aarch64-linux-tdep.c, ada-lang.c, arm-linux-tdep.c, ax-gdb.c,
5114 break-catch-throw.c, breakpoint.c, cli/cli-cmds.c, cli/cli-dump.c,
5115 cli/cli-script.c, cli/cli-setshow.c, compile/compile.c,
5116 completer.c, demangle.c, disasm.c, findcmd.c, linespec.c,
5117 linux-tdep.c, linux-thread-db.c, location.c, mi/mi-parse.c,
5118 minsyms.c, nat/linux-procfs.c, printcmd.c, probe.c,
5119 python/py-breakpoint.c, record.c, rust-exp.y, serial.c, stack.c,
5120 stap-probe.c, tid-parse.c, tracepoint.c: Update all callers.
5122 2017-09-11 Tom Tromey <tom@tromey.com>
5124 * python/python.c (do_start_initialization): Use
5125 py-event-types.def to initialize types.
5126 Define all object type structures.
5127 * python/python-internal.h: Don't declare event initialization
5129 * python/py-threadevent.c (thread_event_object_type): Don't
5131 * python/py-stopevent.c (stop_event_object_type): Don't define.
5132 * python/py-signalevent.c (signal_event_object_type): Don't
5134 * python/py-newobjfileevent.c (new_objfile_event_object_type)
5135 (clear_objfiles_event_object_type): Don't declare or define.
5136 * python/py-infevents.c (inferior_call_pre_event_object_type)
5137 (inferior_call_post_event_object_type)
5138 (register_changed_event_object_type)
5139 (memory_changed_event_object_type): Don't declare or define.
5140 * python/py-inferior.c (new_thread_event_object_type)
5141 (new_inferior_event_object_type)
5142 (inferior_deleted_event_object_type): Don't declare or define.
5143 * python/py-exitedevent.c (exited_event_object_type): Don't
5145 * python/py-evts.c (gdbpy_initialize_py_events): Use
5147 * python/py-events.h (thread_event_object_type): Don't declare.
5148 (events_object): Use py-all-events.def.
5149 * python/py-event.h (GDBPY_NEW_EVENT_TYPE): Remove. Use
5151 * python/py-event-types.def: New file.
5152 * python/py-continueevent.c (create_continue_event_object): Don't
5154 * python/py-bpevent.c (breakpoint_event_object_type): Don't
5156 * python/py-all-events.def: New file.
5158 2017-09-11 Tom Tromey <tom@tromey.com>
5160 * python/py-threadevent.c (create_thread_event_object): Return
5162 * python/py-stopevent.h (create_stop_event_object)
5163 (create_breakpoint_event_object, create_signal_event_object):
5165 * python/py-stopevent.c (create_stop_event_object): Return
5167 (emit_stop_event): Update.
5168 * python/py-signalevent.c (create_signal_event_object): Return
5170 * python/py-infevents.c (create_inferior_call_event_object):
5172 * python/py-event.h (create_event_object)
5173 (create_thread_event_object): Update.
5174 * python/py-event.c (create_event_object): Return gdbpy_ref.
5175 * python/py-continueevent.c: Return gdbpy_ref.
5176 * python/py-bpevent.c (create_breakpoint_event_object): Return
5179 2017-09-11 Tom Tromey <tom@tromey.com>
5183 * python/python.c (do_start_initialization): Initialize new event
5185 * python/python-internal.h (gdbpy_initialize_new_inferior_event)
5186 (gdbpy_initialize_inferior_deleted_event)
5187 (gdbpy_initialize_new_thread_event): Declare.
5188 * python/py-threadevent.c (create_thread_event_object): Add option
5190 * python/py-inferior.c (new_thread_event_object_type)
5191 (new_inferior_event_object_type)
5192 (inferior_deleted_event_object_type): Declare.
5193 (python_new_inferior, python_inferior_deleted): New functions.
5194 (add_thread_object): Emit new_thread event.
5195 (gdbpy_initialize_inferior): Attach new functions to corresponding
5197 (new_thread, new_inferior, inferior_deleted): Define new event
5199 * python/py-evts.c (gdbpy_initialize_py_events): Add new
5201 * python/py-events.h (events_object) <new_inferior,
5202 inferior_deleted, new_thread>: New fields.
5203 * python/py-event.h (create_thread_event_breakpoint): Add optional
5206 2017-09-10 Andrew Burgess <andrew.burgess@embecosm.com>
5208 * utils.c (abort_with_message): Don't compare gdb_stderr to NULL,
5209 check current_ui instead.
5210 (internal_vproblem): Likewise.
5212 2017-09-09 Simon Marchi <simon.marchi@ericsson.com>
5214 * thread.c (print_thread_info_1): Remove unnecessary calls to
5215 uiout->is_mi_like_p.
5217 2017-09-09 Tom Tromey <tom@tromey.com>
5219 * namespace.h (add_using_directive): Update.
5220 * namespace.c (add_using_directive): Change type of excludes to
5222 * dwarf2read.c (read_import_statement): Use std::vector.
5223 (read_namespace): Update.
5224 * cp-namespace.c (cp_scan_for_anonymous_namespaces): Update.
5226 2017-09-09 Tom Tromey <tom@tromey.com>
5228 * linespec.c (create_sals_line_offset): Use gdb::def_vector.
5230 2017-09-09 Tom Tromey <tom@tromey.com>
5232 * p-valprint.c (pascal_object_print_value): Use gdb::byte_vector.
5234 2017-09-09 Tom Tromey <tom@tromey.com>
5236 * stack.c (func_command): Use gdb::def_vector.
5238 2017-09-09 Tom Tromey <tom@tromey.com>
5240 * mi/mi-cmd-var.c (mi_cmd_var_list_children): Use gdb::optional,
5241 ui_out_emit_list, ui_out_emit_tuple.
5242 (mi_cmd_var_update): Likewise.
5244 2017-09-09 Tom Tromey <tom@tromey.com>
5246 * mi/mi-interp.c (mi_user_selected_context_changed): Use
5247 ui_out_redirect_pop.
5248 * guile/scm-ports.c (ioscm_with_output_to_port_worker): Use
5249 ui_out_redirect_pop.
5250 * utils.c (do_ui_out_redirect_pop)
5251 (make_cleanup_ui_out_redirect_pop): Remove.
5252 * top.c (execute_command_to_string): Use ui_out_redirect_pop.
5253 * utils.h (make_cleanup_ui_out_redirect_pop): Remove.
5254 * ui-out.h (ui_out_redirect_pop): New class.
5256 2017-09-09 Tom Tromey <tom@tromey.com>
5258 * mi/mi-main.c (output_cores): Use ui_out_emit_list.
5259 (list_available_thread_groups, mi_cmd_list_thread_groups)
5260 (mi_cmd_data_list_changed_registers, mi_cmd_data_read_memory)
5261 (mi_cmd_data_read_memory_bytes, mi_cmd_trace_frame_collected):
5264 2017-09-09 Tom Tromey <tom@tromey.com>
5266 * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn): Use
5269 2017-09-09 Tom Tromey <tom@tromey.com>
5271 * target.c (flash_erase_command): Use ui_out_emit_tuple.
5272 * stack.c (print_frame): Use ui_out_emit_tuple.
5273 * spu-tdep.c (info_spu_event_command): Use ui_out_emit_tuple.
5274 (info_spu_mailbox_command, info_spu_dma_command)
5275 (info_spu_proxydma_command): Likewise.
5276 * mi/mi-main.c (mi_cmd_trace_frame_collected): Use
5277 ui_out_emit_tuple, gdb::byte_vector, bin2hex.
5278 * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries): Use
5280 * breakpoint.c (print_it_watchpoint): Use ui_out_emit_tuple.
5282 2017-09-09 Tom Tromey <tom@tromey.com>
5284 * ui-out.h (make_cleanup_ui_out_table_begin_end): Remove.
5285 (class ui_out_emit_table): Update comment.
5286 * ui-out.c (do_cleanup_table_end)
5287 (make_cleanup_ui_out_table_begin_end): Remove.
5288 * spu-tdep.c (info_spu_mailbox_list): Use ui_out_emit_table.
5289 (info_spu_dma_cmdlist): Likewise.
5290 * probe.c (info_probes_for_ops): Use ui_out_emit_table.
5291 * darwin-nat-info.c (darwin_debug_regions_recurse): Use
5294 2017-09-09 Tom Tromey <tom@tromey.com>
5296 * thread.c (print_thread_info_1): Use ui_out_emit_table,
5297 ui_out_emit_list, gdb::optional.
5299 2017-09-09 John Baldwin <jhb@FreeBSD.org>
5301 * aarch64-linux-nat.c: Remove _initialize_aarch64_linux_nat
5303 * aarch64-linux-tdep.c: Remove _initialize_aarch64_linux_tdep
5305 * aarch64-newlib-tdep.c: Remove _initialize_aarch64_newlib_tdep
5307 * aarch64-tdep.c: Remove _initialize_aarch64_tdep prototype.
5308 * ada-exp.y: Remove _initialize_ada_exp prototype.
5309 * ada-lang.c: Remove _initialize_ada_language prototype.
5310 * ada-tasks.c: Remove _initialize_tasks prototype.
5311 * addrmap.c: Remove _initialize_addrmap prototype.
5312 * agent.c: Remove _initialize_agent prototype.
5313 * aix-thread.c: Remove _initialize_aix_thread prototype.
5314 * alpha-bsd-nat.c: Remove _initialize_alphabsd_nat prototype.
5315 * alpha-linux-nat.c: Remove _initialize_alpha_linux_nat prototype.
5316 * alpha-linux-tdep.c: Remove _initialize_alpha_linux_tdep
5318 * alpha-nbsd-tdep.c: Remove _initialize_alphanbsd_tdep prototype.
5319 * alpha-obsd-tdep.c: Remove _initialize_alphaobsd_tdep prototype.
5320 * alpha-tdep.c: Remove _initialize_alpha_tdep prototype.
5321 * amd64-darwin-tdep.c: Remove _initialize_amd64_darwin_tdep
5323 * amd64-dicos-tdep.c: Remove _initialize_amd64_dicos_tdep
5325 * amd64-fbsd-nat.c: Remove _initialize_amd64fbsd_nat prototype.
5326 * amd64-fbsd-tdep.c: Remove _initialize_amd64fbsd_tdep prototype.
5327 * amd64-linux-nat.c: Remove _initialize_amd64_linux_nat prototype.
5328 * amd64-linux-tdep.c: Remove _initialize_amd64_linux_tdep
5330 * amd64-nbsd-nat.c: Remove _initialize_amd64nbsd_nat prototype.
5331 * amd64-nbsd-tdep.c: Remove _initialize_amd64nbsd_tdep prototype.
5332 * amd64-obsd-nat.c: Remove _initialize_amd64obsd_nat prototype.
5333 * amd64-obsd-tdep.c: Remove _initialize_amd64obsd_tdep prototype.
5334 * amd64-sol2-tdep.c: Remove _initialize_amd64_sol2_tdep prototype.
5335 * amd64-tdep.c: Remove _initialize_amd64_tdep prototype.
5336 * amd64-windows-nat.c: Remove _initialize_amd64_windows_nat
5338 * amd64-windows-tdep.c: Remove _initialize_amd64_windows_tdep
5340 * annotate.c: Remove _initialize_annotate prototype.
5341 * arc-newlib-tdep.c: Remove _initialize_arc_newlib_tdep prototype.
5342 * arc-tdep.c: Remove _initialize_arc_tdep prototype.
5343 * arch-utils.c: Remove _initialize_gdbarch_utils prototype.
5344 * arm-linux-nat.c: Remove _initialize_arm_linux_nat prototype.
5345 * arm-linux-tdep.c: Remove _initialize_arm_linux_tdep prototype.
5346 * arm-nbsd-tdep.c: Remove _initialize_arm_netbsd_tdep prototype.
5347 * arm-obsd-tdep.c: Remove _initialize_armobsd_tdep prototype.
5348 * arm-symbian-tdep.c: Remove _initialize_arm_symbian_tdep
5350 * arm-tdep.c: Remove _initialize_arm_tdep prototype.
5351 * arm-wince-tdep.c: Remove _initialize_arm_wince_tdep prototype.
5352 * auto-load.c: Remove _initialize_auto_load prototype.
5353 * auxv.c: Remove _initialize_auxv prototype.
5354 * avr-tdep.c: Remove _initialize_avr_tdep prototype.
5355 * ax-gdb.c: Remove _initialize_ax_gdb prototype.
5356 * bfin-linux-tdep.c: Remove _initialize_bfin_linux_tdep prototype.
5357 * bfin-tdep.c: Remove _initialize_bfin_tdep prototype.
5358 * break-catch-sig.c: Remove _initialize_break_catch_sig prototype.
5359 * break-catch-syscall.c: Remove _initialize_break_catch_syscall
5361 * break-catch-throw.c: Remove _initialize_break_catch_throw
5363 * breakpoint.c: Remove _initialize_breakpoint prototype.
5364 * bsd-uthread.c: Remove _initialize_bsd_uthread prototype.
5365 * btrace.c: Remove _initialize_btrace prototype.
5366 * charset.c: Remove _initialize_charset prototype.
5367 * cli/cli-cmds.c: Remove _initialize_cli_cmds prototype.
5368 * cli/cli-dump.c: Remove _initialize_cli_dump prototype.
5369 * cli/cli-interp.c: Remove _initialize_cli_interp prototype.
5370 * cli/cli-logging.c: Remove _initialize_cli_logging prototype.
5371 * cli/cli-script.c: Remove _initialize_cli_script prototype.
5372 * coff-pe-read.c: Remove _initialize_coff_pe_read prototype.
5373 * coffread.c: Remove _initialize_coffread prototype.
5374 * compile/compile.c: Remove _initialize_compile prototype.
5375 * complaints.c: Remove _initialize_complaints prototype.
5376 * completer.c: Remove _initialize_completer prototype.
5377 * copying.awk: Remove _initialize_copying prototype.
5378 * copying.c: Regenerate.
5379 * core-regset.c: Remove _initialize_core_regset prototype.
5380 * corefile.c: Remove _initialize_core prototype.
5381 * corelow.c: Remove _initialize_corelow prototype.
5382 * cp-abi.c: Remove _initialize_cp_abi prototype.
5383 * cp-namespace.c: Remove _initialize_cp_namespace prototype.
5384 * cp-support.c: Remove _initialize_cp_support prototype.
5385 * cp-valprint.c: Remove _initialize_cp_valprint prototype.
5386 * cris-linux-tdep.c: Remove _initialize_cris_linux_tdep prototype.
5387 * cris-tdep.c: Remove _initialize_cris_tdep prototype.
5388 * ctf.c: Remove _initialize_ctf prototype.
5389 * d-lang.c: Remove _initialize_d_language prototype.
5390 * darwin-nat-info.c: Remove _initialize_darwin_info_commands
5392 * darwin-nat.c: Remove _initialize_darwin_inferior prototype.
5393 * dbxread.c: Remove _initialize_dbxread prototype.
5394 * dcache.c: Remove _initialize_dcache prototype.
5395 * demangle.c: Remove _initialize_demangler prototype.
5396 * disasm-selftests.c: Remove _initialize_disasm_selftests
5398 * disasm.c: Remove _initialize_disasm prototype.
5399 * dtrace-probe.c: Remove _initialize_dtrace_probe prototype.
5400 * dummy-frame.c: Remove _initialize_dummy_frame prototype.
5401 * dwarf2-frame-tailcall.c: Remove _initialize_tailcall_frame
5403 * dwarf2-frame.c: Remove _initialize_dwarf2_frame prototype.
5404 * dwarf2expr.c: Remove _initialize_dwarf2expr prototype.
5405 * dwarf2loc.c: Remove _initialize_dwarf2loc prototype.
5406 * dwarf2read.c: Remove _initialize_dwarf2_read prototype.
5407 * elfread.c: Remove _initialize_elfread prototype.
5408 * exec.c: Remove _initialize_exec prototype.
5409 * extension.c: Remove _initialize_extension prototype.
5410 * f-lang.c: Remove _initialize_f_language prototype.
5411 * f-valprint.c: Remove _initialize_f_valprint prototype.
5412 * fbsd-nat.c: Remove _initialize_fbsd_nat prototype.
5413 * fbsd-tdep.c: Remove _initialize_fbsd_tdep prototype.
5414 * filesystem.c: Remove _initialize_filesystem prototype.
5415 * findcmd.c: Remove _initialize_mem_search prototype.
5416 * fork-child.c: Remove _initialize_fork_child prototype.
5417 * frame-base.c: Remove _initialize_frame_base prototype.
5418 * frame-unwind.c: Remove _initialize_frame_unwind prototype.
5419 * frame.c: Remove _initialize_frame prototype.
5420 * frv-linux-tdep.c: Remove _initialize_frv_linux_tdep prototype.
5421 * frv-tdep.c: Remove _initialize_frv_tdep prototype.
5422 * ft32-tdep.c: Remove _initialize_ft32_tdep prototype.
5423 * gcore.c: Remove _initialize_gcore prototype.
5424 * gdb_bfd.c: Remove _initialize_gdb_bfd prototype.
5425 * gdbarch.c: Regenerate.
5426 * gdbarch.sh: Remove _initialize_gdbarch prototype.
5427 * gdbtypes.c: Remove _initialize_gdbtypes prototype.
5428 * gnu-nat.c: Remove _initialize_gnu_nat prototype.
5429 * gnu-v2-abi.c: Remove _initialize_gnu_v2_abi prototype.
5430 * gnu-v3-abi.c: Remove _initialize_gnu_v3_abi prototype.
5431 * go-lang.c: Remove _initialize_go_language prototype.
5432 * go32-nat.c: Remove _initialize_go32_nat prototype.
5433 * guile/guile.c: Remove _initialize_guile prototype.
5434 * h8300-tdep.c: Remove _initialize_h8300_tdep prototype.
5435 * hppa-linux-nat.c: Remove _initialize_hppa_linux_nat prototype.
5436 * hppa-linux-tdep.c: Remove _initialize_hppa_linux_tdep prototype.
5437 * hppa-nbsd-nat.c: Remove _initialize_hppanbsd_nat prototype.
5438 * hppa-nbsd-tdep.c: Remove _initialize_hppanbsd_tdep prototype.
5439 * hppa-obsd-nat.c: Remove _initialize_hppaobsd_nat prototype.
5440 * hppa-obsd-tdep.c: Remove _initialize_hppaobsd_tdep prototype.
5441 * hppa-tdep.c: Remove _initialize_hppa_tdep prototype.
5442 * i386-bsd-nat.c: Remove _initialize_i386bsd_nat prototype.
5443 * i386-cygwin-tdep.c: Remove _initialize_i386_cygwin_tdep
5445 * i386-darwin-tdep.c: Remove _initialize_i386_darwin_tdep
5447 * i386-dicos-tdep.c: Remove _initialize_i386_dicos_tdep prototype.
5448 * i386-fbsd-nat.c: Remove _initialize_i386fbsd_nat prototype.
5449 * i386-fbsd-tdep.c: Remove _initialize_i386fbsd_tdep prototype.
5450 * i386-gnu-nat.c: Remove _initialize_i386gnu_nat prototype.
5451 * i386-gnu-tdep.c: Remove _initialize_i386gnu_tdep prototype.
5452 * i386-linux-nat.c: Remove _initialize_i386_linux_nat prototype.
5453 * i386-linux-tdep.c: Remove _initialize_i386_linux_tdep prototype.
5454 * i386-nbsd-nat.c: Remove _initialize_i386nbsd_nat prototype.
5455 * i386-nbsd-tdep.c: Remove _initialize_i386nbsd_tdep prototype.
5456 * i386-nto-tdep.c: Remove _initialize_i386nto_tdep prototype.
5457 * i386-obsd-nat.c: Remove _initialize_i386obsd_nat prototype.
5458 * i386-obsd-tdep.c: Remove _initialize_i386obsd_tdep prototype.
5459 * i386-sol2-nat.c: Remove _initialize_amd64_sol2_nat prototype.
5460 * i386-sol2-tdep.c: Remove _initialize_amd64_sol2_tdep prototype.
5461 * i386-tdep.c: Remove _initialize_i386_tdep prototype.
5462 * i386-windows-nat.c: Remove _initialize_i386_windows_nat
5464 * ia64-libunwind-tdep.c: Remove _initialize_libunwind_frame
5466 * ia64-linux-nat.c: Remove _initialize_ia64_linux_nat prototype.
5467 * ia64-linux-tdep.c: Remove _initialize_ia64_linux_tdep prototype.
5468 * ia64-tdep.c: Remove _initialize_ia64_tdep prototype.
5469 * ia64-vms-tdep.c: Remove _initialize_ia64_vms_tdep prototype.
5470 * infcall.c: Remove _initialize_infcall prototype.
5471 * infcmd.c: Remove _initialize_infcmd prototype.
5472 * inferior.c: Remove _initialize_inferiors prototype.
5473 * inflow.c: Remove _initialize_inflow prototype.
5474 * infrun.c: Remove _initialize_infrun prototype.
5475 * interps.c: Remove _initialize_interpreter prototype.
5476 * iq2000-tdep.c: Remove _initialize_iq2000_tdep prototype.
5477 * jit.c: Remove _initialize_jit prototype.
5478 * language.c: Remove _initialize_language prototype.
5479 * linux-fork.c: Remove _initialize_linux_fork prototype.
5480 * linux-nat.c: Remove _initialize_linux_nat prototype.
5481 * linux-tdep.c: Remove _initialize_linux_tdep prototype.
5482 * linux-thread-db.c: Remove _initialize_thread_db prototype.
5483 * lm32-tdep.c: Remove _initialize_lm32_tdep prototype.
5484 * m2-lang.c: Remove _initialize_m2_language prototype.
5485 * m32c-tdep.c: Remove _initialize_m32c_tdep prototype.
5486 * m32r-linux-nat.c: Remove _initialize_m32r_linux_nat prototype.
5487 * m32r-linux-tdep.c: Remove _initialize_m32r_linux_tdep prototype.
5488 * m32r-tdep.c: Remove _initialize_m32r_tdep prototype.
5489 * m68hc11-tdep.c: Remove _initialize_m68hc11_tdep prototype.
5490 * m68k-bsd-nat.c: Remove _initialize_m68kbsd_nat prototype.
5491 * m68k-bsd-tdep.c: Remove _initialize_m68kbsd_tdep prototype.
5492 * m68k-linux-nat.c: Remove _initialize_m68k_linux_tdep prototype.
5493 * m68k-linux-tdep.c: Remove _initialize_m68k_linux_tdep prototype.
5494 * m68k-tdep.c: Remove _initialize_m68k_tdep prototype.
5495 * m88k-bsd-nat.c: Remove _initialize_m68kbsd_nat prototype.
5496 * m88k-tdep.c: Remove _initialize_m68kbsd_tdep prototype.
5497 * machoread.c: Remove _initialize_machoread prototype.
5498 * macrocmd.c: Remove _initialize_macrocmd prototype.
5499 * macroscope.c: Remove _initialize_macroscope prototype.
5500 * maint.c: Remove _initialize_maint_cmds prototype.
5501 * mdebugread.c: Remove _initialize_mdebugread prototype.
5502 * memattr.c: Remove _initialize_mem prototype.
5503 * mep-tdep.c: Remove _initialize_mep_tdep prototype.
5504 * mi/mi-cmd-env.c: Remove _initialize_mi_cmd_env prototype.
5505 * mi/mi-cmds.c: Remove _initialize_mi_cmds prototype.
5506 * mi/mi-interp.c: Remove _initialize_mi_interp prototype.
5507 * mi/mi-main.c: Remove _initialize_mi_main prototype.
5508 * microblaze-linux-tdep.c: Remove
5509 _initialize_microblaze_linux_tdep prototype.
5510 * microblaze-tdep.c: Remove _initialize_microblaze_tdep prototype.
5511 * mips-fbsd-nat.c: Remove _initialize_mips_fbsd_nat prototype.
5512 * mips-fbsd-tdep.c: Remove _initialize_mips_fbsd_tdep prototype.
5513 * mips-linux-nat.c: Remove _initialize_mips_linux_nat prototype.
5514 * mips-linux-tdep.c: Remove _initialize_mips_linux_tdep prototype.
5515 * mips-nbsd-nat.c: Remove _initialize_mipsnbsd_nat prototype.
5516 * mips-nbsd-tdep.c: Remove _initialize_mipsnbsd_tdep prototype.
5517 * mips-sde-tdep.c: Remove _initialize_mips_sde_tdep prototype.
5518 * mips-tdep.c: Remove _initialize_mips_tdep prototype.
5519 * mips64-obsd-nat.c: Remove _initialize_mips64obsd_nat prototype.
5520 * mips64-obsd-tdep.c: Remove _initialize_mips64obsd_tdep
5522 * mipsread.c: Remove _initialize_mipsread prototype.
5523 * mn10300-linux-tdep.c: Remove _initialize_mn10300_linux_tdep
5525 * mn10300-tdep.c: Remove _initialize_mn10300_tdep prototype.
5526 * moxie-tdep.c: Remove _initialize_moxie_tdep prototype.
5527 * msp430-tdep.c: Remove _initialize_msp430_tdep prototype.
5528 * mt-tdep.c: Remove _initialize_mt_tdep prototype.
5529 * nds32-tdep.c: Remove _initialize_nds32_tdep prototype.
5530 * nios2-linux-tdep.c: Remove _initialize_nios2_linux_tdep
5532 * nios2-tdep.c: Remove _initialize_nios2_tdep prototype.
5533 * nto-procfs.c: Remove _initialize_procfs prototype.
5534 * nto-tdep.c: Remove _initialize_nto_tdep prototype.
5535 * objc-lang.c: Remove _initialize_objc_language prototype.
5536 * objfiles.c: Remove _initialize_objfiles prototype.
5537 * observer.c: Remove observer_test_first_notification_function,
5538 observer_test_second_notification_function,
5539 observer_test_third_notification_function, and
5540 _initialize_observer prototypes.
5541 * opencl-lang.c: Remove _initialize_opencl_language prototypes.
5542 * osabi.c: Remove _initialize_gdb_osabi prototype.
5543 * osdata.c: Remove _initialize_osdata prototype.
5544 * p-valprint.c: Remove _initialize_pascal_valprint prototype.
5545 * parse.c: Remove _initialize_parse prototype.
5546 * ppc-fbsd-nat.c: Remove _initialize_ppcfbsd_nat prototype.
5547 * ppc-fbsd-tdep.c: Remove _initialize_ppcfbsd_tdep prototype.
5548 * ppc-linux-nat.c: Remove _initialize_ppc_linux_nat prototype.
5549 * ppc-linux-tdep.c: Remove _initialize_ppc_linux_tdep prototype.
5550 * ppc-nbsd-nat.c: Remove _initialize_ppcnbsd_nat prototype.
5551 * ppc-nbsd-tdep.c: Remove _initialize_ppcnbsd_tdep prototype.
5552 * ppc-obsd-nat.c: Remove _initialize_ppcobsd_nat prototype.
5553 * ppc-obsd-tdep.c: Remove _initialize_ppcobsd_tdep prototype.
5554 * printcmd.c: Remove _initialize_printcmd prototype.
5555 * probe.c: Remove _initialize_probe prototype.
5556 * proc-api.c: Remove _initialize_proc_api prototype.
5557 * proc-events.c: Remove _initialize_proc_events prototype.
5558 * proc-service.c: Remove _initialize_proc_service prototype.
5559 * procfs.c: Remove _initialize_procfs prototype.
5560 * psymtab.c: Remove _initialize_psymtab prototype.
5561 * python/python.c: Remove _initialize_python prototype.
5562 * ravenscar-thread.c: Remove _initialize_ravenscar prototype.
5563 * record-btrace.c: Remove _initialize_record_btrace prototype.
5564 * record-full.c: Remove _initialize_record_full prototype.
5565 * record.c: Remove _initialize_record prototype.
5566 * regcache.c: Remove _initialize_regcache prototype.
5567 * reggroups.c: Remove _initialize_reggroup prototype.
5568 * remote-notif.c: Remove _initialize_notif prototype.
5569 * remote-sim.c: Remove _initialize_remote_sim prototype.
5570 * remote.c: Remove _initialize_remote prototype.
5571 * reverse.c: Remove _initialize_reverse prototype.
5572 * rl78-tdep.c: Remove _initialize_rl78_tdep prototype.
5573 * rs6000-aix-tdep.c: Remove _initialize_rs6000_aix_tdep prototype.
5574 * rs6000-lynx178-tdep.c: Remove _initialize_rs6000_lynx178_tdep
5576 * rs6000-nat.c: Remove _initialize_rs6000_nat prototype.
5577 * rs6000-tdep.c: Remove _initialize_rs6000_tdep prototype.
5578 * rust-exp.y: Remove _initialize_rust_exp prototype.
5579 * rx-tdep.c: Remove _initialize_rx_tdep prototype.
5580 * s390-linux-nat.c: Remove _initialize_s390_nat prototype.
5581 * s390-linux-tdep.c: Remove _initialize_s390_tdep prototype.
5582 * score-tdep.c: Remove _initialize_score_tdep prototype.
5583 * selftest-arch.c: Remove _initialize_selftests_foreach_arch
5585 * ser-go32.c: Remove _initialize_ser_dos prototype.
5586 * ser-mingw.c: Remove _initialize_ser_windows prototype.
5587 * ser-pipe.c: Remove _initialize_ser_pipe prototype.
5588 * ser-tcp.c: Remove _initialize_ser_tcp prototype.
5589 * ser-unix.c: Remove _initialize_ser_hardwire prototype.
5590 * serial.c: Remove _initialize_serial prototype.
5591 * sh-linux-tdep.c: Remove _initialize_sh_linux_tdep prototype.
5592 * sh-nbsd-nat.c: Remove _initialize_shnbsd_nat prototype.
5593 * sh-nbsd-tdep.c: Remove _initialize_shnbsd_tdep prototype.
5594 * sh-tdep.c: Remove _initialize_sh_tdep prototype.
5595 * skip.c: Remove _initialize_step_skip prototype.
5596 * sol-thread.c: Remove _initialize_sol_thread prototype.
5597 * solib-aix.c: Remove _initialize_solib_aix prototype.
5598 * solib-darwin.c: Remove _initialize_darwin_solib prototype.
5599 * solib-dsbt.c: Remove _initialize_dsbt_solib prototype.
5600 * solib-frv.c: Remove _initialize_frv_solib prototype.
5601 * solib-spu.c: Remove _initialize_spu_solib prototype.
5602 * solib-svr4.c: Remove _initialize_svr4_solib prototype.
5603 * solib-target.c: Remove _initialize_solib_target prototype.
5604 * solib.c: Remove _initialize_solib prototype.
5605 * source.c: Remove _initialize_source prototype.
5606 * sparc-linux-nat.c: Remove _initialize_sparc_linux_nat prototype.
5607 * sparc-linux-tdep.c: Remove _initialize_sparc_linux_tdep
5609 * sparc-nat.c: Remove _initialize_sparc_nat prototype.
5610 * sparc-nbsd-nat.c: Remove _initialize_sparcnbsd_nat prototype.
5611 * sparc-nbsd-tdep.c: Remove _initialize_sparcnbsd_tdep prototype.
5612 * sparc-obsd-tdep.c: Remove _initialize_sparc32obsd_tdep
5614 * sparc-sol2-nat.c: Remove _initialize_sparc_sol2_nat prototype.
5615 * sparc-sol2-tdep.c: Remove _initialize_sparc_sol2_tdep prototype.
5616 * sparc-tdep.c: Remove _initialize_sparc_tdep prototype.
5617 * sparc64-fbsd-nat.c: Remove _initialize_sparc64fbsd_nat
5619 * sparc64-fbsd-tdep.c: Remove _initialize_sparc64fbsd_tdep
5621 * sparc64-linux-nat.c: Remove _initialize_sparc64_linux_nat
5623 * sparc64-linux-tdep.c: Remove _initialize_sparc64_linux_tdep
5625 * sparc64-nat.c: Remove _initialize_sparc64_nat prototype.
5626 * sparc64-nbsd-nat.c: Remove _initialize_sparc64nbsd_nat
5628 * sparc64-nbsd-tdep.c: Remove _initialize_sparc64nbsd_tdep
5630 * sparc64-obsd-nat.c: Remove _initialize_sparc64obsd_nat
5632 * sparc64-obsd-tdep.c: Remove _initialize_sparc64obsd_tdep
5634 * sparc64-sol2-tdep.c: Remove _initialize_sparc64_sol2_tdep
5636 * spu-linux-nat.c: Remove _initialize_spu_nat prototype.
5637 * spu-multiarch.c: Remove _initialize_spu_multiarch prototype.
5638 * spu-tdep.c: Remove _initialize_spu_tdep prototype.
5639 * stabsread.c: Remove _initialize_stabsread prototype.
5640 * stack.c: Remove _initialize_stack prototype.
5641 * stap-probe.c: Remove _initialize_stap_probe prototype.
5642 * std-regs.c: Remove _initialize_frame_reg prototype.
5643 * symfile-debug.c: Remove _initialize_symfile_debug prototype.
5644 * symfile-mem.c: Remove _initialize_symfile_mem prototype.
5645 * symfile.c: Remove _initialize_symfile prototype.
5646 * symmisc.c: Remove _initialize_symmisc prototype.
5647 * symtab.c: Remove _initialize_symtab prototype.
5648 * target-dcache.c: Remove _initialize_target_dcache prototype.
5649 * target-descriptions.c: Remove _initialize_target_descriptions
5651 * thread.c: Remove _initialize_thread prototype.
5652 * tic6x-linux-tdep.c: Remove _initialize_tic6x_linux_tdep
5654 * tic6x-tdep.c: Remove _initialize_tic6x_tdep prototype.
5655 * tilegx-linux-nat.c: Remove _initialize_tile_linux_nat prototype.
5656 * tilegx-linux-tdep.c: Remove _initialize_tilegx_linux_tdep
5658 * tilegx-tdep.c: Remove _initialize_tilegx_tdep prototype.
5659 * tracefile-tfile.c: Remove _initialize_tracefile_tfile prototype.
5660 * tracefile.c: Remove _initialize_tracefile prototype.
5661 * tracepoint.c: Remove _initialize_tracepoint prototype.
5662 * tui/tui-hooks.c: Remove _initialize_tui_hooks prototype.
5663 * tui/tui-interp.c: Remove _initialize_tui_interp prototype.
5664 * tui/tui-layout.c: Remove _initialize_tui_layout prototype.
5665 * tui/tui-regs.c: Remove _initialize_tui_regs prototype.
5666 * tui/tui-stack.c: Remove _initialize_tui_stack prototype.
5667 * tui/tui-win.c: Remove _initialize_tui_win prototype.
5668 * tui/tui.c: Remove _initialize_tui prototype.
5669 * typeprint.c: Remove _initialize_typeprint prototype.
5670 * user-regs.c: Remove _initialize_user_regs prototype.
5671 * utils.c: Remove _initialize_utils prototype.
5672 * v850-tdep.c: Remove _initialize_v850_tdep prototype.
5673 * valarith.c: Remove _initialize_valarith prototype.
5674 * valops.c: Remove _initialize_valops prototype.
5675 * valprint.c: Remove _initialize_valprint prototype.
5676 * value.c: Remove _initialize_values prototype.
5677 * varobj.c: Remove _initialize_varobj prototype.
5678 * vax-bsd-nat.c: Remove _initialize_vaxbsd_nat prototype.
5679 * vax-nbsd-tdep.c: Remove _initialize_vaxnbsd_tdep prototype.
5680 * vax-tdep.c: Remove _initialize_vax_tdep prototype.
5681 * windows-nat.c: Remove _initialize_windows_nat,
5682 _initialize_check_for_gdb_ini, and _initialize_loadable
5684 * windows-tdep.c: Remove _initialize_windows_tdep prototype.
5685 * xcoffread.c: Remove _initialize_xcoffread prototype.
5686 * xml-support.c: Remove _initialize_xml_support prototype.
5687 * xstormy16-tdep.c: Remove _initialize_xstormy16_tdep prototype.
5688 * xtensa-linux-nat.c: Remove _initialize_xtensa_linux_nat
5690 * xtensa-linux-tdep.c: Remove _initialize_xtensa_linux_tdep
5692 * xtensa-tdep.c: Remove _initialize_xtensa_tdep prototype.
5694 2017-09-08 Keith Seitz <keiths@redhat.com>
5696 * dwarf2read.c (struct field_info) <fnfields>: Remove unused
5699 2017-09-08 Christoph Weinmann <christoph.t.weinmann@intel.com>
5701 * f-valprint.c (f_val_print): Remove check for one byte
5702 sized integers. Remove printing of character type.
5704 2017-09-08 Frank Penczek <frank.penczek@intel.com>
5705 Christoph Weinmann <christoph.t.weinmann@intel.com>
5706 Bernhard Heckel <bernhard.heckel@intel.com>
5708 * f-typeprint.c (f_type_print_base): Use fprintfi_filtered
5709 to maintain proper indentation when printing pointers/refs.
5711 2017-09-07 Joel Brobecker <brobecker@adacore.com>
5715 2017-09-07 Joel Brobecker <brobecker@adacore.com>
5717 * NEWS (Changes in GDB 7.11): Remove entry for QStartupWithShell.
5719 2017-09-05 Tom Tromey <tom@tromey.com>
5721 * parse.c (funcall_chain): Now a std::vector.
5722 (start_arglist, end_arglist): Simplify.
5723 (free_funcalls): Remove.
5724 (parse_exp_in_context_1): Remove cleanup.
5726 2017-09-05 Tom Tromey <tom@tromey.com>
5728 * go-exp.y (go_parse): Don't create a cleanup.
5730 2017-09-05 Tom Tromey <tom@tromey.com>
5732 * d-exp.y (PrimaryExpression): Use std::string.
5733 (d_parse): Don't create a cleanup.
5735 2017-09-05 Tom Tromey <tom@tromey.com>
5737 * utils.c (do_clear_parser_state): Remove.
5738 (make_cleanup_clear_parser_state): Remove.
5739 * p-exp.y (pascal_parse): Use scoped_restore.
5740 * m2-exp.y (m2_parse): Use scoped_restore.
5741 * f-exp.y (f_parse): Use scoped_restore.
5742 * d-exp.y (d_parse): Use scoped_restore.
5743 * c-exp.y (c_parse): Use scoped_restore.
5744 * ada-exp.y (ada_parse): Use scoped_restore.
5745 * utils.h (make_cleanup_clear_parser_state): Remove.
5747 2017-09-06 Keith Seitz <keiths@redhat.com>
5749 * dwarf2read.c (dw2_linkage_name_attr): New function.
5750 (dw2_linkage_name): New function.
5751 (dwarf2_compute_name, dwarf2_physname, read_call_site_scope)
5752 (guess_full_die_structure_name, dwarf2_name): Use dw2_linkage_name.
5753 (anonymous_struct_prefix, dwarf2_name): Use dw2_linkage_name_attr.
5755 2017-09-06 Kamil Rytarowski <n54@gmx.com>
5757 * config/djgpp/djconfig.sh: Correct shell portability issue.
5759 2017-09-06 Kamil Rytarowski <n54@gmx.com>
5761 * configure.nat: Define HAVE_NATIVE_GCORE_HOST on NetBSD.
5763 2017-09-06 John Baldwin <jhb@FreeBSD.org>
5765 * Makefile.in (ALLDEPFILES): Add mips-fbsd-nat.c.
5766 * NEWS: Mention new FreeBSD/mips native configuration.
5767 * configure.host: Add aarch64*-*-freebsd*.
5768 * configure.nat: Likewise.
5769 * aarch64-fbsd-nat.c: New file.
5771 2017-09-06 John Baldwin <jhb@FreeBSD.org>
5773 * Makefile.in (ALL_64_TARGET_OBS): Add aarch64-fbsd-tdep.o.
5774 (ALLDEPFILES): Add aarch64-fbsd-tdep.c.
5775 * NEWS: Mention new FreeBSD/aarch64 target.
5776 * configure.tgt: Add aarch64*-*-freebsd*.
5777 * aarch64-fbsd-tdep.c: New file.
5778 * aarch64-fbsd-tdep.h: New file.
5780 2017-09-06 Kamil Rytarowski <n54@gmx.com>
5782 * MAINTAINERS (Write After Approval): Add Kamil Rytarowski.
5784 2017-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
5786 * parse.c (find_minsym_type_and_address): Don't relocate addresses
5789 2017-09-05 Philippe Waroquiers <philippe.waroquiers@skynet.be>
5791 * objfiles.c (get_objfile_bfd_data): Remove useless obstack_init
5794 2017-09-05 Simon Marchi <simon.marchi@ericsson.com>
5796 * infrun.c (follow_exec): Call add_thread after
5797 target_find_description.
5799 2017-09-05 Simon Marchi <simon.marchi@ericsson.com>
5801 * infrun.c (handle_inferior_event_1): When exec'ing, read
5802 stop_pc after follow_exec.
5804 2017-09-05 Simon Marchi <simon.marchi@ericsson.com>
5806 * remote.c (process_g_packet): Update error message.
5808 2017-09-05 Yao Qi <yao.qi@linaro.org>
5810 * configure.tgt (gdb_target_obs): Add i386.o for x86_64-*
5813 2017-09-05 Pedro Alves <palves@redhat.com>
5815 * eval.c (eval_call, evaluate_funcall): New functions, factored
5817 (evaluate_subexp_standard): ... this.
5819 2017-09-05 Yao Qi <yao.qi@linaro.org>
5821 * amd64-tdep.c (amd64_target_description): Create target
5823 (_initialize_amd64_tdep): Don't call functions
5824 initialize_tdesc_amd64_*. Add self tests.
5825 * arch/amd64.c (amd64_create_target_description): Add parameter
5826 is_linux. Call set_tdesc_osabi if is_linux is true.
5827 * arch/amd64.h (amd64_create_target_description): Update the
5829 * arch/i386.c (i386_create_target_description): Add parameter
5830 is_linux. Call set_tdesc_osabi if is_linux is true.
5831 * arch/i386.h (i386_create_target_description): Update
5833 * configure.tgt: Add i386.o to gdb_target_obs.
5834 * features/Makefile (XMLTOC): Remove i386/*.xml.
5835 * features/i386/amd64-avx-avx512.c: Remove.
5836 * features/i386/amd64-avx-mpx-avx512-pku.c: Remove.
5837 * features/i386/amd64-avx-mpx.c: Remove.
5838 * features/i386/amd64-avx.c: Remove.
5839 * features/i386/amd64-mpx.c: Remove.
5840 * features/i386/amd64.c: Remove.
5841 * features/i386/i386-avx-avx512.c: Remove.
5842 * features/i386/i386-avx-mpx-avx512-pku.c: Remove.
5843 * features/i386/i386-avx-mpx.c: Remove.
5844 * features/i386/i386-avx.c: Remove.
5845 * features/i386/i386-mmx.c: Remove.
5846 * features/i386/i386-mpx.c: Remove.
5847 * features/i386/i386.c: Remove.
5848 * i386-tdep.c: Don't include features/i386/i386*.c., include
5849 target-descriptions.h and arch/i386.h.
5850 (i386_target_description): Create target descriptions.
5851 (i386_gdbarch_init): Don't call initialize_tdesc_i386_*
5852 functions. Do self tests.
5854 2017-09-05 Yao Qi <yao.qi@linaro.org>
5856 * features/Makefile (XMLTOC): Remove i386/amd64XXX-linux.xml.
5857 * features/i386/amd64-avx-avx512-linux.c: Removed.
5858 * features/i386/amd64-avx-linux.c: Removed.
5859 * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Removed.
5860 * features/i386/amd64-avx-mpx-linux.c: Removed.
5861 * features/i386/amd64-linux.c: Removed.
5862 * features/i386/amd64-mpx-linux.c: Removed.
5863 * features/i386/x32-avx-avx512-linux.c: Removed.
5864 * features/i386/x32-avx-linux.c: Removed.
5865 * features/i386/x32-linux.c: Removed.
5867 2017-09-05 Yao Qi <yao.qi@linaro.org>
5869 * amd64-linux-tdep.c: Include arch/amd64.h. Don't include
5871 (amd64_linux_read_description): Call
5872 amd64_create_target_description.
5873 * arch/amd64.c: New file.
5874 * arch/amd64.h: New file.
5875 * configure.tgt (x86_64-*-linux*): Append amd64.o.
5876 * Makefile.in (ALL_64_TARGET_OBS): Append amd64.o.
5878 2017-09-05 Yao Qi <yao.qi@linaro.org>
5880 * amd64-linux-tdep.c: Don't include amd64-XXX-linux and
5881 x32-XXX-linux.c. Include 64bit-XX.c and x32-XX.c.
5882 (amd64_linux_read_description): Create target descriptions.
5883 (_initialize_amd64_linux_tdep): Don't call initialize_tdesc_XXX
5884 functions. Add unit tests.
5885 * features/Makefile (FEATURE_XMLFILES): Append 64bit-XXX.xml and
5887 * features/i386/64bit-avx.c: Generated.
5888 * features/i386/64bit-avx512.c: Generated.
5889 * features/i386/64bit-core.c: Generated.
5890 * features/i386/64bit-linux.c: Generated.
5891 * features/i386/64bit-mpx.c: Generated.
5892 * features/i386/64bit-pkeys.c: Generated.
5893 * features/i386/64bit-segments.c: Generated.
5894 * features/i386/64bit-sse.c: Generated.
5895 * features/i386/x32-core.c: Generated.
5896 * target-descriptions.c (maint_print_c_tdesc_cmd): Print feature
5897 c files for amd64-linux and x32-linux.
5899 2017-09-05 Yao Qi <yao.qi@linaro.org>
5901 * amd64-linux-tdep.c (amd64_linux_read_description): New
5903 (amd64_linux_core_read_description): Call
5904 amd64_linux_read_description.
5905 (amd64_linux_init_abi): Likewise.
5906 (amd64_x32_linux_init_abi): Likewise.
5907 * amd64-linux-tdep.h (amd64_linux_read_description): Declare.
5908 * x86-linux-nat.c (x86_linux_read_description): Call
5909 amd64_linux_read_description.
5911 2017-09-05 Yao Qi <yao.qi@linaro.org>
5913 * amd64-linux-tdep.c (amd64_linux_core_read_description): Update
5916 2017-09-05 Yao Qi <yao.qi@linaro.org>
5918 * features/Makefile (XMLTOC): Remove i386/i386-XX-linux.xml.
5919 * features/i386/i386-avx-avx512-linux.c: Remove.
5920 * features/i386/i386-avx-linux.c: Remove.
5921 * features/i386/i386-avx-mpx-avx512-pku-linux.c: Remove.
5922 * features/i386/i386-avx-mpx-linux.c: Remove.
5923 * features/i386/i386-linux.c: Remove.
5924 * features/i386/i386-mmx-linux.c: Remove.
5925 * features/i386/i386-mpx-linux.c: Remove.
5927 2017-09-05 Yao Qi <yao.qi@linaro.org>
5929 * Makefile.in (ALL_TARGET_OBS): Add i386.o.
5930 (SFILES): Add arch/i386.c.
5931 (HFILES_NO_SRCDIR): Add arch/i386.h.
5932 * arch/i386.c: New file.
5933 * arch/i386.h: New file.
5934 * arch/tdesc.h (allocate_target_description): Declare.
5935 (set_tdesc_architecture): Declare.
5936 (set_tdesc_osabi): Declare.
5937 * configure.tgt (i[34567]86-*-linux*): Add i386.o.
5938 * i386-linux-tdep.c: Don't include ../features/i386/32bit-XXX.c.
5939 include arch/i386.h.
5940 (i386_linux_read_description): Remove code and call
5941 i386_create_target_description.
5942 (set_tdesc_architecture): New function.
5943 (set_tdesc_osabi): New function.
5944 * target-descriptions.h (allocate_target_description): Remove.
5946 2017-09-05 Yao Qi <yao.qi@linaro.org>
5948 * arch/tdesc.h (tdesc_create_feature): Add an argument xml.
5949 * target-descriptions.c (tdesc_create_feature): Likewise, and
5951 * features/i386/32bit-avx.c: Re-generated.
5952 * features/i386/32bit-avx512.c: Re-generated.
5953 * features/i386/32bit-core.c: Re-generated.
5954 * features/i386/32bit-linux.c: Re-generated.
5955 * features/i386/32bit-mpx.c: Re-generated.
5956 * features/i386/32bit-pkeys.c: Re-generated.
5957 * features/i386/32bit-sse.c: Re-generated.
5959 2017-09-05 Yao Qi <yao.qi@linaro.org>
5961 * regformats/regdef.h (struct reg): Override operator == and !=.
5963 2017-09-05 Yao Qi <yao.qi@linaro.org>
5965 * arch/tdesc.h: New file.
5966 * regformats/regdat.sh: Generate code using tdesc_create_reg.
5967 * target-descriptions.c: Update comments.
5968 * target-descriptions.h: Include "arch/tdesc.h". Remove the
5970 * features/i386/32bit-avx.c: Re-generated.
5971 * features/i386/32bit-avx512.c: Re-generated.
5972 * features/i386/32bit-core.c: Re-generated.
5973 * features/i386/32bit-linux.c: Re-generated.
5974 * features/i386/32bit-mpx.c: Re-generated.
5975 * features/i386/32bit-pkeys.c: Re-generated.
5976 * features/i386/32bit-sse.c: Re-generated.
5978 2017-09-05 Yao Qi <yao.qi@linaro.org>
5980 * regformats/regdat.sh: Update generated code.
5982 2017-09-05 Yao Qi <yao.qi@linaro.org>
5984 * regformats/regdat.sh: Adjust code order.
5986 2017-09-05 Simon Marchi <simon.marchi@ericsson.com>
5988 * expprint.c (dump_subexp_body_standard): Use constant format
5989 string in fprintf_filtered call.
5991 2017-09-04 John Baldwin <jhb@FreeBSD.org>
5993 * configure.nat: Add "x86-nat.o x86-dregs.o" for NetBSD/amd64 and
5995 * x86-bsd-nat.c [!DBREG_DRX && __NetBSD__]: Define DBREG_DRX.
5997 2017-09-04 John Baldwin <jhb@FreeBSD.org>
5999 * bsd-kvm.o: Make <sys/user.h> conditional on HAVE_SYS_USER_H.
6001 2017-09-04 John Baldwin <jhb@FreeBSD.org>
6003 * bsd-kvm.o: Define _KMEMUSER.
6004 * configure.ac: Define _KMEMUSER when checking for "struct lwp".
6005 * configure: Regenerate.
6007 2017-09-04 John Baldwin <jhb@FreeBSD.org>
6009 * amd64-fbsd-nat.c: Add include of "x86-xstate.h".
6010 * i386-fbsd-nat.c: Likewise.
6012 2017-09-04 John Baldwin <jhb@FreeBSD.org>
6014 * unittests/array-view-selftests.c: Add include of <array>.
6016 2017-09-04 John Baldwin <jhb@FreeBSD.org>
6018 * spu-tdep.c (flush_ea_cache): Add missing argument to
6019 call_function_by_hand.
6021 2017-09-04 Pedro Alves <palves@redhat.com>
6023 * NEWS (Safer support for debugging with no debug info): New.
6025 2017-09-04 Pedro Alves <palves@redhat.com>
6027 * c-exp.y (function_method, function_method_void): Add current
6028 instance flags to TYPE_INSTANCE.
6029 * dwarf2read.c (check_modifier): New.
6030 (compute_delayed_physnames): Assert that only C++ adds delayed
6031 physnames. Mark fn_fields as const/volatile depending on
6033 * eval.c (make_params): New type_instance_flags parameter. Use
6034 it as the new type's instance flags.
6035 (evaluate_subexp_standard) <TYPE_INSTANCE>: Extract the instance
6036 flags element and pass it to make_params.
6037 * expprint.c (print_subexp_standard) <TYPE_INSTANCE>: Handle
6038 instance flags element.
6039 (dump_subexp_body_standard) <TYPE_INSTANCE>: Likewise.
6040 * gdbtypes.h: Include "enum-flags.h".
6041 (type_instance_flags): New enum-flags type.
6042 (TYPE_CONST, TYPE_VOLATILE, TYPE_RESTRICT, TYPE_ATOMIC)
6043 (TYPE_CODE_SPACE, TYPE_DATA_SPACE): Return boolean.
6044 * parse.c (operator_length_standard) <TYPE_INSTANCE>: Adjust.
6045 (follow_type_instance_flags): New function.
6046 (operator_check_standard) <TYPE_INSTANCE>: Adjust.
6047 * parser-defs.h (follow_type_instance_flags): Declare.
6048 * valops.c (value_struct_elt_for_reference): const/volatile must
6051 2017-09-04 Pedro Alves <palves@redhat.com>
6053 * cp-namespace.c (cp_search_static_and_baseclasses): Handle
6054 function/method scopes; lookup the nested name as a function local
6057 2017-09-04 Pedro Alves <palves@redhat.com>
6059 (%type <voidval>): Add function_method.
6060 * c-exp.y (exp): New production for calls with no arguments.
6061 (function_method, function_method_void_or_typelist): New
6063 (exp): New production for "method()::static_var".
6064 * eval.c (evaluate_subexp_standard): Handle OP_FUNC_STATIC_VAR.
6065 * expprint.c (print_subexp_standard, dump_subexp_body_standard):
6066 Handle OP_FUNC_STATIC_VAR.
6067 * parse.c (operator_length_standard):
6068 Handle OP_FUNC_STATIC_VAR.
6070 2017-09-04 Pedro Alves <palves@redhat.com>
6072 * eval.c (evaluate_subexp_standard): Remove UNOP_MEMVAL_TLS
6074 * expprint.c (print_subexp_standard, dump_subexp_body_standard):
6076 * parse.c (operator_length_standard, operator_check_standard):
6078 * std-operator.def (UNOP_MEMVAL_TLS): Delete.
6080 2017-09-04 Pedro Alves <palves@redhat.com>
6082 * ax-gdb.c: Include "typeprint.h".
6083 (gen_expr_for_cast): New function.
6084 (gen_expr) <OP_CAST, OP_CAST_TYPE>: Use it.
6085 <OP_VAR_VALUE, OP_MSYM_VAR_VALUE>: Error out if the variable's
6087 * dwarf2read.c (new_symbol_full): Fallback to int instead of
6088 nodebug_data_symbol.
6089 * eval.c: Include "typeprint.h".
6090 (evaluate_subexp_standard) <OP_VAR_VALUE, OP_VAR_MSYM_VALUE>:
6091 Error out if symbol has unknown type.
6092 <UNOP_CAST, UNOP_CAST_TYPE>: Common bits factored out to
6093 evaluate_subexp_for_cast.
6094 (evaluate_subexp_for_address, evaluate_subexp_for_sizeof): Handle
6096 (evaluate_subexp_for_cast): New function.
6097 * gdbtypes.c (init_nodebug_var_type): New function.
6098 (objfile_type): Use it to initialize types of variables with no
6100 * typeprint.c (error_unknown_type): New.
6101 * typeprint.h (error_unknown_type): New declaration.
6102 * compile/compile-c-types.c (convert_type_basic): Handle
6103 TYPE_CODE_ERROR; warn and fallback to int for variables with
6106 2017-09-04 Pedro Alves <palves@redhat.com>
6108 * eval.c (evaluate_var_value): New function, factored out from ...
6109 (evaluate_subexp_standard): ... here.
6111 2017-09-04 Pedro Alves <palves@redhat.com>
6113 * eval.c (evaluate_subexp_standard) <UNOP_COMPLEMENT, UNOP_ADDR>:
6114 Remove useless assignments to 'op'.
6116 2017-09-04 Pedro Alves <palves@redhat.com>
6118 * eval.c (eval_skip_value): New function.
6119 (evaluate_subexp_standard): Use it.
6121 2017-09-04 Pedro Alves <palves@redhat.com>
6123 * eval.c (evaluate_subexp_standard): <OP_FUNCALL>: Extract
6124 function name from symbol/minsym and pass it to
6125 error_call_unknown_return_type.
6127 2017-09-04 Pedro Alves <palves@redhat.com>
6129 * ada-lang.c (resolve_subexp): Handle OP_VAR_MSYM_VALUE.
6130 * ax-gdb.c (gen_msym_var_ref): New function.
6131 (gen_expr): Handle OP_VAR_MSYM_VALUE.
6132 * eval.c (evaluate_var_msym_value): New function.
6133 * eval.c (evaluate_subexp_standard): Handle OP_VAR_MSYM_VALUE.
6134 <OP_FUNCALL>: Extract function name from symbol/minsym and pass it
6135 to call_function_by_hand.
6136 * expprint.c (print_subexp_standard, dump_subexp_body_standard):
6137 Handle OP_VAR_MSYM_VALUE.
6138 (union exp_element) <msymbol>: New field.
6139 * minsyms.h (struct type): Forward declare.
6140 (find_minsym_type_and_address): Declare.
6141 * parse.c (write_exp_elt_msym): New function.
6142 (write_exp_msymbol): Delete, refactored as ...
6143 (find_minsym_type_and_address): ... this new function.
6144 (write_exp_msymbol): Reimplement using OP_VAR_MSYM_VALUE.
6145 (operator_length_standard, operator_check_standard): Handle
6147 * std-operator.def (OP_VAR_MSYM_VALUE): New.
6149 2017-09-04 Pedro Alves <palves@redhat.com>
6151 * ada-lang.c (ada_evaluate_subexp) <TYPE_CODE_FUNC>: Don't handle
6152 TYPE_GNU_IFUNC specially here. Throw error if return type is
6154 * ada-typeprint.c (print_func_type): Handle functions with unknown
6156 * c-typeprint.c (c_type_print_base): Handle functions and methods
6157 with unknown return type.
6158 * compile/compile-c-symbols.c (convert_symbol_bmsym)
6159 <mst_text_gnu_ifunc>: Use nodebug_text_gnu_ifunc_symbol.
6160 * compile/compile-c-types.c: Include "objfiles.h".
6161 (convert_func): For functions with unknown return type, warn and
6163 * compile/compile-object-run.c (compile_object_run): Adjust call
6164 to call_function_by_hand_dummy.
6165 * elfread.c (elf_gnu_ifunc_resolve_addr): Adjust call to
6166 call_function_by_hand.
6167 * eval.c (evaluate_subexp_standard): Adjust calls to
6168 call_function_by_hand. Handle functions and methods with unknown
6169 return type. Pass expect_type to call_function_by_hand.
6170 * f-typeprint.c (f_type_print_base): Handle functions with unknown
6172 * gcore.c (call_target_sbrk): Adjust call to
6173 call_function_by_hand.
6174 * gdbtypes.c (objfile_type): Leave nodebug text symbol with NULL
6175 return type instead of int. Make nodebug_text_gnu_ifunc_symbol be
6176 an integer address type instead of nodebug.
6177 * guile/scm-value.c (gdbscm_value_call): Adjust call to
6178 call_function_by_hand.
6179 * infcall.c (error_call_unknown_return_type): New function.
6180 (call_function_by_hand): New "default_return_type" parameter.
6182 (call_function_by_hand_dummy): New "default_return_type"
6183 parameter. Use it instead of defaulting to int. If there's no
6184 default and the return type is unknown, throw an error. If
6185 there's a default return type, and the called function has no
6186 debug info, then assume the function is prototyped.
6187 * infcall.h (call_function_by_hand, call_function_by_hand_dummy):
6188 New "default_return_type" parameter.
6189 (error_call_unknown_return_type): New declaration.
6190 * linux-fork.c (call_lseek): Cast return type of lseek.
6191 (inferior_call_waitpid, checkpoint_command): Adjust calls to
6192 call_function_by_hand.
6193 * linux-tdep.c (linux_infcall_mmap, linux_infcall_munmap): Adjust
6194 calls to call_function_by_hand.
6195 * m2-typeprint.c (m2_procedure): Handle functions with unknown
6197 * objc-lang.c (lookup_objc_class, lookup_child_selector)
6198 (value_nsstring, print_object_command): Adjust calls to
6199 call_function_by_hand.
6200 * p-typeprint.c (pascal_type_print_varspec_prefix): Handle
6201 functions with unknown return type.
6202 (pascal_type_print_func_varspec_suffix): New function.
6203 (pascal_type_print_varspec_suffix) <TYPE_CODE_FUNC,
6204 TYPE_CODE_METHOD>: Use it.
6205 * python/py-value.c (valpy_call): Adjust call to
6206 call_function_by_hand.
6207 * rust-lang.c (rust_evaluate_funcall): Adjust call to
6208 call_function_by_hand.
6209 * valarith.c (value_x_binop, value_x_unop): Adjust calls to
6210 call_function_by_hand.
6211 * valops.c (value_allocate_space_in_inferior): Adjust call to
6212 call_function_by_hand.
6213 * typeprint.c (type_print_unknown_return_type): New function.
6214 * typeprint.h (type_print_unknown_return_type): New declaration.
6216 2017-09-04 Pedro Alves <palves@redhat.com>
6218 * gdbtypes.c (lookup_function_type_with_arguments): Mark function
6219 types with more than one parameter as prototyped.
6221 2017-09-04 Pedro Alves <palves@redhat.com>
6223 * cli/cli-cmds.c (print_disassembly, disassemble_current_function)
6224 (disassemble_command): Use gdb_disassembly_flags instead of bare
6226 * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn)
6227 (dump_insns, do_mixed_source_and_assembly_deprecated)
6228 (do_mixed_source_and_assembly, do_assembly_only, gdb_disassembly):
6229 Use gdb_disassembly_flags instead of bare int.
6230 * disasm.h (DISASSEMBLY_SOURCE_DEPRECATED, DISASSEMBLY_RAW_INSN)
6231 (DISASSEMBLY_OMIT_FNAME, DISASSEMBLY_FILENAME)
6232 (DISASSEMBLY_OMIT_PC, DISASSEMBLY_SOURCE)
6233 (DISASSEMBLY_SPECULATIVE): No longer macros. Instead they're...
6234 (enum gdb_disassembly_flag): ... values of this new enumeration.
6235 (gdb_disassembly_flags): Define.
6237 (gdb_pretty_print_disassembler::pretty_print_insn): Use it.
6238 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Use
6239 gdb_disassembly_flags instead of bare int.
6240 * record-btrace.c (btrace_insn_history)
6241 (record_btrace_insn_history, record_btrace_insn_history_range)
6242 (record_btrace_insn_history_from): Use gdb_disassembly_flags
6243 instead of bare int.
6244 * record.c (get_insn_history_modifiers, cmd_record_insn_history):
6245 Use gdb_disassembly_flags instead of bare int.
6246 * target-debug.h (target_debug_print_gdb_disassembly_flags):
6248 * target-delegates.c: Regenerate.
6249 * target.c (target_insn_history, target_insn_history_from)
6250 (target_insn_history_range): Use gdb_disassembly_flags instead of
6252 * target.h: Include "disasm.h".
6253 (struct target_ops) <to_insn_history, to_insn_history_from,
6254 to_insn_history_range>: Use gdb_disassembly_flags instead of bare
6256 (target_insn_history, target_insn_history_from)
6257 (target_insn_history_range): Use gdb_disassembly_flags instead of
6260 2017-09-04 Simon Marchi <simon.marchi@ericsson.com>
6262 * cli/cli-script.c (build_command_line): For if/while commands,
6263 check whether args is empty.
6265 2017-09-04 Simon Marchi <simon.marchi@ericsson.com>
6267 * cli/cli-script.h (enum misc_command_type): Move from defs.h.
6268 (enum command_control_type): Likewise.
6269 (struct command_line): Likewise.
6270 (free_command_lines): Likewise.
6271 (struct command_lines_deleter): Likewise.
6272 (command_line_up): Likewise.
6273 (read_command_lines): Likewise.
6274 (read_command_lines_1): Likewise.
6275 * defs.h (enum misc_command_type): Move to cli/cli-script.h.
6276 (enum command_control_type): Likewise.
6277 (struct command_line): Likewise.
6278 (free_command_lines): Likewise.
6279 (struct command_lines_deleter): Likewise.
6280 (command_line_up): Likewise.
6281 (read_command_lines): Likewise.
6282 (read_command_lines_1): Likewise.
6283 * breakpoint.h: Include cli/cli-script.h.
6284 * extension-priv.h: Likewise.
6285 * gdbcmd.h: Likewise.
6287 2017-09-04 Pedro Alves <palves@redhat.com>
6289 * ada-lang.c (is_known_support_routine): Move sal declaration to
6290 where it is initialized.
6291 * breakpoint.c (create_internal_breakpoint, init_catchpoint)
6292 (parse_breakpoint_sals, decode_static_tracepoint_spec)
6293 (clear_command, update_static_tracepoint): Remove init_sal
6294 references. Move declarations closer to initializations.
6295 * cli/cli-cmds.c (list_command): Move sal declarations closer to
6297 * elfread.c (elf_gnu_ifunc_resolver_stop): Remove init_sal
6298 references. Move sal declarations closer to initializations.
6299 * frame.c (find_frame_sal): Return a symtab_and_line via function
6300 return instead of output parameter. Remove init_sal references.
6301 * frame.h (find_frame_sal): Return a symtab_and_line via function
6302 return instead of output parameter.
6303 * guile/scm-frame.c (gdbscm_frame_sal): Adjust.
6304 * guile/scm-symtab.c (stscm_make_sal_smob): Use in-place new
6306 (gdbscm_find_pc_line): Remove init_sal reference.
6307 * infcall.c (call_function_by_hand_dummy): Remove init_sal
6308 references. Move declarations closer to initializations.
6309 * infcmd.c (set_step_frame): Update. Move declarations closer to
6311 (finish_backward): Remove init_sal references. Move declarations
6312 closer to initializations.
6313 * infrun.c (process_event_stop_test, handle_step_into_function)
6314 (insert_hp_step_resume_breakpoint_at_frame)
6315 (insert_step_resume_breakpoint_at_caller): Likewise.
6316 * linespec.c (create_sals_line_offset, decode_digits_ordinary)
6317 (symbol_to_sal): Likewise.
6318 * probe.c (parse_probes_in_pspace): Remove init_sal reference.
6319 * python/py-frame.c (frapy_find_sal): Move sal declaration closer
6320 to its initialization.
6321 * reverse.c (save_bookmark_command): Use new/delete. Remove
6322 init_sal references. Move declarations closer to initializations.
6323 * source.c (get_current_source_symtab_and_line): Remove brace
6325 (set_current_source_symtab_and_line): Now takes the sal by const
6326 reference. Remove brace initialization.
6327 (line_info): Remove init_sal reference.
6328 * source.h (set_current_source_symtab_and_line): Now takes a
6329 symtab_and_line via const reference.
6330 * stack.c (set_current_sal_from_frame): Adjust.
6331 (print_frame_info): Adjust.
6332 (get_last_displayed_sal): Return the sal via function return
6333 instead of via output parameter. Simplify.
6334 (frame_info): Adjust.
6335 * stack.h (get_last_displayed_sal): Return the sal via function
6336 return instead of via output parameter.
6337 * symtab.c (init_sal): Delete.
6338 (find_pc_sect_line): Remove init_sal references. Move
6339 declarations closer to initializations.
6340 (find_function_start_sal): Remove init_sal references. Move
6341 declarations closer to initializations.
6342 * symtab.h (struct symtab_and_line): In-class initialize all
6344 * tracepoint.c (set_traceframe_context)
6345 (print_one_static_tracepoint_marker): Remove init_sal references.
6346 Move declarations closer to initializations.
6347 * tui/tui-disasm.c (tui_show_disassem_and_update_source): Adjust.
6348 * tui/tui-stack.c (tui_show_frame_info): Adjust. Move
6349 declarations closer to initializations.
6350 * tui/tui-winsource.c (tui_update_source_window_as_is): Remove
6351 init_sal references. Adjust.
6353 2017-09-04 Pedro Alves <palves@redhat.com>
6355 * ax-gdb.c (agent_command_1): Use range-for.
6356 * break-catch-throw.c (re_set_exception_catchpoint): Update.
6357 * breakpoint.c: Include "common/array-view.h".
6358 (init_breakpoint_sal, create_breakpoint_sal): Change sals
6359 parameter from struct symtabs_and_lines to
6360 array_view<symtab_and_line>. Adjust. Use range-for. Update.
6361 (breakpoint_sals_to_pc): Change sals parameter from struct
6362 symtabs_and_lines to std::vector reference.
6363 (check_fast_tracepoint_sals): Change sals parameter from struct
6364 symtabs_and_lines to std::array_view. Use range-for.
6365 (decode_static_tracepoint_spec): Return a std::vector instead of
6366 symtabs_and_lines. Update.
6367 (create_breakpoint): Update.
6368 (break_range_command, until_break_command, clear_command): Update.
6369 (base_breakpoint_decode_location, bkpt_decode_location)
6370 (bkpt_probe_create_sals_from_location)
6371 (bkpt_probe_decode_location, tracepoint_decode_location)
6372 (tracepoint_probe_decode_location)
6373 (strace_marker_create_sals_from_location): Return a std::vector
6374 instead of symtabs_and_lines.
6375 (strace_marker_create_breakpoints_sal): Update.
6376 (strace_marker_decode_location): Return a std::vector instead of
6377 symtabs_and_lines. Update.
6378 (update_breakpoint_locations): Change struct symtabs_and_lines
6379 parameters to gdb::array_view. Adjust.
6380 (location_to_sals): Return a std::vector instead of
6381 symtabs_and_lines. Update.
6382 (breakpoint_re_set_default): Use std::vector instead of struct
6384 (decode_location_default): Return a std::vector instead of
6385 symtabs_and_lines. Update.
6386 * breakpoint.h: Include "common/array-view.h".
6387 (struct breakpoint_ops) <decode_location>: Now returns a
6388 std::vector instead of returning a symtabs_and_lines via output
6390 (update_breakpoint_locations): Change sals parameters to use
6392 * cli/cli-cmds.c (edit_command, list_command): Update to use
6393 std::vector and gdb::array_view.
6394 (ambiguous_line_spec): Adjust to use gdb::array_view and
6396 (compare_symtabs): Rename to ...
6397 (cmp_symtabs): ... this. Change parameters to symtab_and_line
6398 const reference and adjust.
6399 (filter_sals): Rewrite using std::vector and standard algorithms.
6400 * elfread.c (elf_gnu_ifunc_resolver_return_stop): Simplify.
6401 (jump_command): Update to use std::vector.
6402 * linespec.c (struct linespec_state) <canonical_names>: Update
6404 (add_sal_to_sals_basic): Delete.
6405 (add_sal_to_sals, filter_results, convert_results_to_lsals)
6406 (decode_line_2, create_sals_line_offset)
6407 (convert_address_location_to_sals, convert_linespec_to_sals)
6408 (convert_explicit_location_to_sals, parse_linespec)
6409 (event_location_to_sals, decode_line_full, decode_line_1)
6410 (decode_line_with_current_source)
6411 (decode_line_with_last_displayed, decode_objc)
6412 (decode_digits_list_mode, decode_digits_ordinary, minsym_found)
6413 (linespec_result::~linespec_result): Adjust to use std::vector
6414 instead of symtabs_and_lines.
6415 * linespec.h (linespec_sals::sals): Now a std::vector.
6416 (struct linespec_result): Use std::vector, bool, and in-class
6418 (decode_line_1, decode_line_with_current_source)
6419 (decode_line_with_last_displayed): Return std::vector.
6420 * macrocmd.c (info_macros_command): Use std::vector.
6421 * mi/mi-main.c (mi_cmd_trace_find): Use std::vector.
6422 * probe.c (parse_probes_in_pspace, parse_probes): Adjust to use
6424 * probe.h (parse_probes): Return a std::vector.
6425 * python/python.c (gdbpy_decode_line): Use std::vector and
6427 * source.c (select_source_symtab, line_info): Use std::vector.
6428 * stack.c (func_command): Use std::vector.
6429 * symtab.h (struct symtabs_and_lines): Delete.
6430 * tracepoint.c (tfind_line_command, scope_info): Use std::vector.
6432 2017-09-04 Pedro Alves <palves@redhat.com>
6434 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
6435 unittests/array-view-selftests.c.
6436 (SUBDIR_UNITTESTS_OBS): Add array-view-selftests.o.
6437 * common/array-view.h: New file.
6438 * unittests/array-view-selftests.c: New file.
6440 2017-09-04 Pedro Alves <palves@redhat.com>
6442 * cli/cli-cmds.c (edit_command): Pass message to
6443 ambiguous_line_spec.
6444 (list_command): Pass message to ambiguous_line_spec. Say
6445 "first"/"last" instead of "start" and "end" to be consistent with
6447 (ambiguous_line_spec): Add 'format' and vararg parameters. Use
6448 them to print formatted message.
6450 2017-09-04 Pedro Alves <palves@redhat.com>
6452 * btrace.c (ftrace_add_pt): Pass btrace_insn to
6453 ftrace_update_insns by reference instead of pointer.
6455 2017-09-04 Yao Qi <yao.qi@linaro.org>
6457 * i386-go32-tdep.c: Include x86-xstate.h.
6458 (i386_go32_init_abi): Call i386_target_description.
6459 * i386-tdep.c (i386_target_description): Return tdesc_i386_mmx
6460 if xcr0 is X86_XSTATE_X87_MASK.
6461 * i386-tdep.h (tdesc_i386): Remove the declaration.
6462 (tdesc_i386_mmx): Likewise.
6464 2017-09-04 Yao Qi <yao.qi@linaro.org>
6466 * i386-fbsd-tdep.c (i386fbsd_core_read_xcr0): Return
6467 X86_XSTATE_SSE_MASK instead of 0.
6469 2017-09-04 Yao Qi <yao.qi@linaro.org>
6471 * amd64-fbsd-nat.c (amd64fbsd_read_description): Call
6472 i386_target_description.
6473 * i386-fbsd-nat.c (i386fbsd_read_description): Call
6474 i386_target_description.
6475 * i386-tdep.c (i386_gdbarch_init): Likewise.
6477 2017-09-04 Yao Qi <yao.qi@linaro.org>
6479 * amd64-darwin-tdep.c: Include "x86-xstate.h".
6480 (x86_darwin_init_abi_64): Call amd64_target_description.
6481 * amd64-dicos-tdep.c: Likewise.
6482 * amd64-fbsd-nat.c: Likewise.
6483 * amd64-fbsd-tdep.c: Likewise.
6484 * amd64-nbsd-tdep.c: Likewise.
6485 * amd64-obsd-tdep.c: Likewise.
6486 * amd64-sol2-tdep.c: Likewise.
6487 * amd64-windows-tdep.c: Likewise.
6488 * amd64-tdep.h (tdesc_amd64): Remove the declaration.
6490 2017-09-04 Simon Marchi <simon.marchi@ericsson.com>
6492 * btrace.h (btrace_insn_s, DEF_VEC_O (btrace_insn_s)): Remove.
6493 (btrace_function) <insn>: Change type to use std::vector.
6494 * btrace.c (ftrace_debug, ftrace_call_num_insn,
6495 ftrace_find_call, ftrace_new_gap, ftrace_update_function,
6496 ftrace_update_insns, ftrace_compute_global_level_offset,
6497 btrace_stitch_bts, btrace_clear, btrace_insn_get,
6498 btrace_insn_end, btrace_insn_next, btrace_insn_prev): Adjust to
6499 change to std::vector.
6500 (ftrace_update_insns): Adjust to change to std::vector, change
6501 type of INSN parameter.
6502 (btrace_compute_ftrace_bts): Adjust call to ftrace_update_insns.
6503 * record-btrace.c (btrace_call_history_insn_range,
6504 btrace_compute_src_line_range,
6505 record_btrace_frame_prev_register): Adjust to change to
6507 * python/py-record-btrace.c (recpy_bt_func_instructions): Adjust
6508 to change to std::vector.
6510 2017-09-03 Tom Tromey <tom@tromey.com>
6512 * corefile.c (reopen_exec_file): Use std::string.
6514 2017-09-03 Tom Tromey <tom@tromey.com>
6516 * compile/compile.c (compile_register_name_mangled): Return
6518 * compile/compile-loc2c.c (pushf_register_address): Update.
6519 (pushf_register): Update.
6520 * compile/compile-c-types.c (convert_array): Update.
6521 * compile/compile-c-symbols.c (generate_vla_size): Update.
6522 (error_symbol_once): Use a gdb::unique_xmalloc_ptr.
6523 (symbol_substitution_name): Return a gdb::unique_xmalloc_ptr.
6524 (convert_one_symbol): Update.
6525 (generate_c_for_for_one_variable): Update.
6526 * compile/compile-c-support.c (c_get_range_decl_name): Return a
6528 (generate_register_struct): Update.
6529 * compile/compile-internal.h (c_get_range_decl_name): Return a
6531 (compile_register_name_mangled): Return std::string.
6533 2017-09-03 Tom Tromey <tom@tromey.com>
6535 * utils.c (perror_string): Return a std::string.
6536 (throw_perror_with_name, perror_warning_with_name): Update.
6538 2017-09-03 Tom Tromey <tom@tromey.com>
6540 * demangle.c (demangle_command): Use std::string,
6543 2017-09-03 Tom Tromey <tom@tromey.com>
6545 * cli/cli-setshow.c (do_set_command): Use std::string.
6547 2017-09-03 Tom Tromey <tom@tromey.com>
6549 * cli/cli-cmds.c (cd_command): Use gdb::unique_xmalloc_ptr.
6551 2017-09-03 Tom Tromey <tom@tromey.com>
6553 * mi/mi-interp.c (mi_cmd_interpreter_exec): Use std::string.
6555 2017-09-03 Tom Tromey <tom@tromey.com>
6557 * mi/mi-cmd-env.c (env_execute_cli_command): Use
6558 gdb::unique_xmalloc_ptr.
6560 2017-09-03 Tom Tromey <tom@tromey.com>
6562 * thread.c (print_thread_info_1): Use string_printf.
6563 (thread_apply_command, thread_apply_all_command): Use
6566 2017-09-03 Tom Tromey <tom@tromey.com>
6568 * valprint.c (val_print_string): Update.
6569 * gdbcore.h (memory_error_message): Return std::string.
6570 * corefile.c (memory_error_message): Return std::string.
6571 (memory_error): Update.
6572 * breakpoint.c (insert_bp_location): Update.
6574 2017-09-03 Simon Marchi <simon.marchi@ericsson.com>
6576 * target/waitstatus.h (target_waitstatus_to_string): Change
6577 return type to std::string.
6578 * target/waitstatus.c (target_waitstatus_to_string): Return
6580 * target.h (target_waitstatus_to_string): Remove declaration.
6581 * infrun.c (resume, clear_proceed_status_thread,
6582 print_target_wait_results, do_target_wait, save_waitstatus,
6583 stop_all_threads): Adjust.
6584 * record-btrace.c (record_btrace_wait): Adjust.
6586 (target_debug_print_struct_target_waitstatus_p): Adjust.
6588 2017-09-01 Jan Kratochvil <jan.kratochvil@redhat.com>
6591 * nat/linux-procfs.c (parse_proc_status_state): Fix PROC_STATE_STOPPED
6594 2017-08-31 Sergio Durigan Junior <sergiodj@redhat.com>
6596 * NEWS (Changes since GDB 8.0): Add entry mentioning new support
6597 for setting/unsetting environment variables on the remote target.
6598 (New remote packets): Add entries for QEnvironmentHexEncoded,
6599 QEnvironmentUnset and QEnvironmentReset.
6600 * common/environ.c (gdb_environ::operator=): Extend method to
6601 handle m_user_set_env_list and m_user_unset_env_list.
6602 (gdb_environ::clear): Likewise.
6603 (match_var_in_string): Change type of first parameter from 'char
6604 *' to 'const char *'.
6605 (gdb_environ::set): Extend method to handle
6606 m_user_set_env_list and m_user_unset_env_list.
6607 (gdb_environ::unset): Likewise.
6608 (gdb_environ::clear_user_set_env): New method.
6609 (gdb_environ::user_set_envp): Likewise.
6610 (gdb_environ::user_unset_envp): Likewise.
6611 * common/environ.h (gdb_environ): Handle m_user_set_env_list and
6612 m_user_unset_env_list on move constructor/assignment.
6613 (unset): Add new default parameter 'update_unset_list = true'.
6614 (clear_user_set_env): New method.
6615 (user_set_envp): Likewise.
6616 (user_unset_envp): Likewise.
6617 (m_user_set_env_list): New std::set.
6618 (m_user_unset_env_list): Likewise.
6619 * common/rsp-low.c (hex2str): New function.
6620 (bin2hex): New overload for bin2hex function.
6621 * common/rsp-low.c (hex2str): New prototype.
6622 (str2hex): New overload prototype.
6623 * remote.c: Include "environ.h". Add QEnvironmentHexEncoded,
6624 QEnvironmentUnset and QEnvironmentReset.
6625 (remote_protocol_features): Add QEnvironmentHexEncoded,
6626 QEnvironmentUnset and QEnvironmentReset packets.
6627 (send_environment_packet): New function.
6628 (extended_remote_environment_support): Likewise.
6629 (extended_remote_create_inferior): Call
6630 extended_remote_environment_support.
6631 (_initialize_remote): Add QEnvironmentHexEncoded,
6632 QEnvironmentUnset and QEnvironmentReset packet configs.
6633 * unittests/environ-selftests.c (gdb_selftest_env_var):
6635 (test_vector_initialization): New function.
6636 (test_init_from_host_environ): Likewise.
6637 (test_reinit_from_host_environ): Likewise.
6638 (test_set_A_unset_B_unset_A_cannot_find_A_can_find_B):
6640 (test_unset_set_empty_vector): Likewise.
6641 (test_vector_clear): Likewise.
6642 (test_std_move): Likewise.
6643 (test_move_constructor):
6644 (test_self_move): Likewise.
6645 (test_set_unset_reset): Likewise.
6646 (run_tests): Rewrite in terms of the functions above.
6648 2017-08-31 Weimin Pan <weimin.pan@oracle.com>
6650 * sparc64-tdep.c (adi_stat_t): Fix comment formatting.
6651 (adi_available): Use a temp variable of type CORE_ADDR as argument
6652 3 when calling target_auxv_search.
6653 (adi_normalize_address): Use masks and xor operators to calculate
6655 (adi_read_versions, adi_write_versions, adi_print_versions)
6656 (do_examine, do_assign): Use paddress.
6658 2017-08-29 John Baldwin <jhb@FreeBSD.org>
6660 * mips-fbsd-nat.c (getfpregs_supplies): Return true for FIR.
6661 * mips-fbsd-tdep.c (mips_fbsd_supply_fpregs): Split supply of FSR
6662 out of loop and add supply of FIR.
6663 (mips_fbsd_collect_fpregs): Split collect of FSR out of loop and
6666 2017-08-28 Simon Marchi <simon.marchi@ericsson.com>
6669 * cli/cli-script.c (define_command): Don't convert command name
6672 2017-08-25 Joel Brobecker <brobecker@adacore.com>
6674 * ada-lang.c (ada_lookup_struct_elt_type): Remove parameter "dispp".
6675 Update all callers accordingly. Remove all code blocks handling
6676 the case where DISPP is not NULL.
6678 2017-08-24 Jan Kratochvil <jan.kratochvil@redhat.com>
6681 * dwarf2read.c (dwarf2_const_value_attr, dump_die_shallow)
6682 (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
6683 (skip_form_bytes, attr_form_is_constant): Handle DW_FORM_implicit_const.
6685 2017-08-24 Jan Kratochvil <jan.kratochvil@redhat.com>
6687 * dwarf2read.c (build_type_psymtabs_reader): New prototype.
6688 (process_psymtab_comp_unit): Accept IS_DEBUG_TYPES.
6689 (read_comp_units_from_section): New parameter abbrev_section, use
6690 read_and_check_comp_unit_head, allocate signatured_type if needed.
6691 (create_all_comp_units): Update read_comp_units_from_section caller.
6693 2017-08-23 Pedro Alves <palves@redhat.com>
6696 * remote.c (add_current_inferior_and_thread): Set inferior_ptid
6697 to null_ptid and switch to thread without reading the registers
6698 after adding the inferior.
6700 2017-08-23 Jan Kratochvil <jan.kratochvil@redhat.com>
6702 * NEWS (Changes since GDB 8.0): Add set compile-gcc and show
6704 * compile/compile.c (compile_gcc, show_compile_gcc): New.
6705 (compile_to_object): Implement compile_gcc.
6706 (_initialize_compile): Install "set compile-gcc". Initialize
6709 2017-08-23 Jan Kratochvil <jan.kratochvil@redhat.com>
6711 * compile/compile.c (compile_to_object): Conditionally call
6712 set_verbose. Conditionally call compile or compile_v0.
6714 2017-08-07 Weimin Pan <weimin.pan@oracle.com>
6716 * sparc64-tdep.h: (adi_normalize_address): New export.
6717 * sparc-nat.h: (open_adi_tag_fd): New export.
6718 * sparc64-linux-nat.c: (open_adi_tag_fd): New function.
6719 * sparc64-linux-tdep.c:
6720 (SEGV_ACCADI, SEGV_ADIDERR, SEGV_ADIPERR) New defines.
6721 (sparc64_linux_handle_segmentation_fault): New function.
6722 (sparc64_linux_init_abi): Register
6723 sparc64_linux_handle_segmentation_fault
6724 * sparc64-tdep.c: Include cli-utils.h,gdbcmd.h,auxv.h.
6725 (sparc64_addr_bits_remove): New function.
6726 (sparc64_init_abi): Register sparc64_addr_bits_remove.
6727 (MAX_PROC_NAME_SIZE): New macro.
6728 (AT_ADI_BLKSZ, AT_ADI_NBITS, AT_ADI_UEONADI) New defines.
6729 (sparc64adilist): New variable.
6730 (adi_proc_list): New variable.
6731 (find_adi_info): New function.
6732 (add_adi_info): New function.
6733 (get_adi_info_proc): New function.
6734 (get_adi_info): New function.
6735 (info_adi_command): New function.
6736 (read_maps_entry): New function.
6737 (adi_available): New function.
6738 (adi_normalize_address): New function.
6739 (adi_align_address): New function.
6740 (adi_convert_byte_count): New function.
6741 (adi_tag_fd): New function.
6742 (adi_is_addr_mapped): New function.
6743 (adi_read_versions): New function.
6744 (adi_write_versions): New function.
6745 (adi_print_versions): New function.
6746 (do_examine): New function.
6747 (do_assign): New function.
6748 (adi_examine_command): New function.
6749 (adi_assign_command): New function.
6750 (_initialize_sparc64_adi_tdep): New function.
6752 2017-08-22 Simon Marchi <simon.marchi@ericsson.com>
6754 * breakpoint.c (breakpoints_info): Rename to ...
6755 (info_breakpoints_command): ... this.
6756 (watchpoints_info): Rename to ...
6757 (info_watchpoints_command): ... this.
6758 (tracepoints_info): Rename to ...
6759 (info_tracepoints_command): ... this.
6760 (_initialize_breakpoint): Adjust.
6761 * dcache.c (dcache_info): Rename to ...
6762 (info_display_command): ... this.
6763 (_initialize_dcache): Adjust.
6764 * frame.h (args_info): Rename to ...
6765 (info_args_command): ... this.
6766 (locals_info): Rename to ...
6767 (info_locals_command): ... this.
6768 * infcmd.c (nofp_registers_info): Rename to ...
6769 (info_registers_command): ... this.
6770 (float_info): Rename to ...
6771 (info_float_command): ... this.
6772 (program_info): Rename to ...
6773 (info_program_command): ... this.
6774 (all_registers_info): Rename to ...
6775 (info_all_registers_command): ... this.
6776 (vector_info): Rename to ...
6777 (info_vector_command): ... this.
6778 (float_info): Rename to ...
6779 (info_float_command): ... this.
6780 (_initialize_infcmd): Adjust.
6781 * inferior.h (term_info): Rename to ...
6782 (info_terminal_command): ... this.
6783 * inflow.c (term_info): Rename to ...
6784 (info_terminal_command): ... this.
6785 (_initialize_inflow): Adjust.
6786 * infrun.c (signals_info): Rename to ...
6787 (info_signals_command): ... this.
6788 (_initialize_infrun): Adjust.
6789 * objc-lang.c (classes_info): Rename to ...
6790 (info_classes_command): ... this.
6791 (selectors_info): Rename to ...
6792 (info_selectors_command): ... this.
6793 (_initialize_objc_language): Adjust.
6794 * printcmd.c (sym_info): Rename to ...
6795 (info_symbol_command): ... this.
6796 (address_info): Rename to ...
6797 (info_address_command): ... this.
6798 (display_info): Rename to ...
6799 (info_display_command): ... this.
6800 (_initialize_printcmd): Adjust.
6801 * reverse.c (bookmarks_info): Rename to ...
6802 (info_breakpoints_command): ... this.
6803 (_initialize_reverse): Adjust.
6804 * ser-go32.c (dos_info): Rename to ...
6805 (info_serial_command): ... this.
6806 (_initialize_ser_dos): Adjust.
6807 * skip.c (skip_info): Rename to ...
6808 (info_skip_command): ... this.
6809 (_initialize_step_skip): Adjust.
6810 * source.c (line_info): Rename to ...
6811 (info_line_command): ... this.
6812 (source_info): Rename to ...
6813 (info_source_command)
6814 * stack.c (frame_info): Rename to ...
6815 (info_frame_command): ... this.
6816 (locals_info): Rename to ...
6817 (info_locals_command): ... this.
6818 (args_info): Rename to ...
6819 (info_args_command): ... this.
6820 (_initialize_stack): Adjust.
6821 * symtab.c (sources_info): Rename to ...
6822 (info_sources_command): ... this.
6823 (variables_info): Rename to ...
6824 (info_variables_command): ... this.
6825 (functions_info): Rename to ...
6826 (info_functions_command): ... this.
6827 (types_info): Rename to ...
6828 (info_types_command): ... this.
6829 (_initialize_symtab): Adjust.
6830 * target.c (target_info): Rename to ...
6831 (info_target_command): ... this.
6832 (initialize_targets): Adjust.
6833 * tracepoint.c (tvariables_info): Rename to ...
6834 (info_tvariables_command): ... this.
6835 (scope_info): Rename to ...
6836 (info_scope_command): ... this.
6837 (trace_dump_actions): Adjust.
6838 (_initialize_tracepoint): Adjust.
6840 2017-08-22 Tom Tromey <tom@tromey.com>
6842 * breakpoint.h (install_breakpoint): Update.
6843 * breakpoint.c (add_solib_catchpoint): Update.
6844 (install_breakpoint): Change argument to a std::unique_ptr.
6845 (create_fork_vfork_event_catchpoint): Use std::unique_ptr.
6846 (create_breakpoint_sal, create_breakpoint): Update.
6847 (watch_command_1, catch_exec_command_1)
6848 (strace_marker_create_breakpoints_sal): Use std::unique_ptr.
6849 (add_to_breakpoint_chain): Change argument to a std::unique_ptr.
6850 Return the breakpoint.
6851 (set_raw_breakpoint_without_location, set_raw_breakpoint)
6852 (new_single_step_breakpoint): Update.
6853 * break-catch-throw.c (handle_gnu_v3_exceptions): Use
6855 * break-catch-syscall.c (create_syscall_event_catchpoint): Use
6857 * break-catch-sig.c (create_signal_catchpoint): Use
6859 * ada-lang.c (create_ada_exception_catchpoint): Use
6862 2017-08-22 Tom Tromey <tom@tromey.com>
6864 * breakpoint.c (add_solib_catchpoint): Use std::unique_ptr.
6866 2017-08-22 Tom Tromey <tom@tromey.com>
6868 * psymtab.c (psymtab_search_name): Return a unique_xmalloc_ptr.
6869 (lookup_partial_symbol): Update.
6871 2017-08-22 Tom Tromey <tom@tromey.com>
6873 * source.h (rewrite_source_path): Return a unique_xmalloc_ptr.
6874 * source.c (rewrite_source_path): Return a unique_xmalloc_ptr.
6875 (find_and_open_source, symtab_to_fullname): Update.
6876 * psymtab.c (psymtab_to_fullname): Update.
6878 2017-08-22 Tom Tromey <tom@tromey.com>
6880 * exec.c (exec_file_attach): Update.
6881 * linux-thread-db.c (try_thread_db_load): Update.
6882 * guile/scm-safe-call.c (gdbscm_safe_source_script): Update.
6883 * utils.c (gdb_realpath): Change return type.
6884 (gdb_realpath_keepfile): Update.
6885 (gdb_realpath_check_trailer, gdb_realpath_tests): New functions.
6886 (_initialize_utils): Register the new self test.
6887 * source.c (openp): Update.
6888 (find_and_open_source): Update.
6889 * nto-tdep.c (nto_find_and_open_solib): Update.
6890 * main.c (set_gdb_data_directory): Update.
6891 (captured_main_1): Update.
6892 * dwarf2read.c (dwarf2_get_dwz_file): Update
6893 (dw2_map_symbol_filenames): Update.
6894 * auto-load.c (auto_load_safe_path_vec_update): Update.
6895 (filename_is_in_auto_load_safe_path_vec): Change type of
6897 (auto_load_objfile_script): Update.
6898 (file_is_auto_load_safe): Update. Use std::string.
6899 * utils.h (gdb_realpath): Return a gdb::unique_xmalloc_ptr.
6901 2017-08-22 Tom Tromey <tom@tromey.com>
6903 * utils.c (gdb_realpath_keepfile): Return a
6904 gdb::unique_xmalloc_ptr.
6905 * exec.c (exec_file_attach): Update.
6906 * utils.h (gdb_realpath_keepfile): Return a
6907 gdb::unique_xmalloc_ptr.
6909 2017-08-22 Tom Tromey <tom@tromey.com>
6911 * compile/compile.c (compile_file_command): Use
6912 gdb::unique_xmalloc_ptr, std::string.
6913 * utils.c (gdb_abspath): Change return type.
6914 * source.c (openp): Update.
6915 * objfiles.c (allocate_objfile): Update.
6916 * main.c (set_gdb_data_directory): Update.
6917 * utils.h (gdb_abspath): Return a gdb::unique_xmalloc_ptr.
6919 2017-08-22 Zhouyi Zhou <zhouzhouyi@gmail.com>
6921 * cli-cmds.c (list_commands): List actual code around more than
6924 2017-08-21 John Baldwin <jhb@FreeBSD.org>
6926 * fbsd-nat.c (fbsd_add_threads): Use array type for `lwps'.
6928 2017-08-21 Pedro Alves <palves@redhat.com>
6931 * c-exp.y (variable production): Handle function aliases.
6932 * minsyms.c (msymbol_is_text): New function.
6933 * minsyms.h (msymbol_is_text): Declare.
6934 * symtab.c (find_function_alias_target): New function.
6935 * symtab.h (find_function_alias_target): Declare.
6937 2017-08-21 Pedro Alves <palves@redhat.com>
6939 * eval.c (evaluate_subexp_standard) <OP_TYPE>: Don't dig past
6941 * typeprint.c (whatis_exp): If handling "whatis", and expression
6942 is OP_TYPE, strip one typedef level. Otherwise don't strip
6944 * valops.c (value_cast): Save "to" type before resolving
6945 stubs/typedefs. Use that type as resulting value's type.
6947 2017-08-18 Tom Tromey <tom@tromey.com>
6948 Pedro Alves <palves@redhat.com>
6950 * spu-multiarch.c (parse_spufs_run): Use scoped_restore.
6951 * sol-thread.c (sol_thread_resume, sol_thread_wait)
6952 (sol_thread_xfer_partial, rw_common): Use scoped_restore.
6953 * procfs.c (procfs_do_thread_registers): Use scoped_restore.
6954 * proc-service.c (ps_xfer_memory): Use scoped_restore.
6955 * linux-tdep.c (linux_corefile_thread): Remove a cleanup.
6956 (linux_get_siginfo_data): Add "thread" argument. Use
6958 * linux-nat.c (linux_child_follow_fork)
6959 (check_stopped_by_watchpoint): Use scoped_restore.
6960 * infrun.c (displaced_step_prepare_throw, write_memory_ptid)
6961 (THREAD_STOPPED_BY, handle_signal_stop): Use scoped_restore.
6962 (restore_inferior_ptid, save_inferior_ptid): Remove.
6963 * btrace.c (btrace_fetch): Use scoped_restore.
6964 * bsd-uthread.c (bsd_uthread_fetch_registers)
6965 (bsd_uthread_store_registers): Use scoped_restore.
6966 * breakpoint.c (reattach_breakpoints, detach_breakpoints): Use
6968 * aix-thread.c (aix_thread_resume, aix_thread_wait)
6969 (aix_thread_xfer_partial): Use scoped_restore.
6970 * inferior.h (save_inferior_ptid): Remove.
6972 2017-08-18 Yao Qi <yao.qi@linaro.org>
6975 * arm-tdep.c (gdb_print_insn_arm): Mark
6976 USER_SPECIFIED_MACHINE_TYPE if exec_bfd isn't NULL.
6978 2017-08-18 Yao Qi <yao.qi@linaro.org>
6980 * NEWS: Mention GDBserver's new option "--selftest".
6981 * Makefile.in (SFILES): Remove selftest.c, add common/selftest.c.
6982 * selftest.c: Move it to common/selftest.c.
6983 * selftest.h: Move it to common/selftest.h.
6984 * selftest-arch.c (reset): New function.
6985 (tests_with_arch): Call reset.
6987 2017-08-18 Yao Qi <yao.qi@linaro.org>
6989 * selftest.c (run_tests): Don't call QUIT. Call debug_printf
6990 instead of exception_fprintf and printf_filtered.
6992 2017-08-18 Yao Qi <yao.qi@linaro.org>
6994 * selftest.c (register_self_test): Rename it to
6995 selftests::register_test.
6996 (run_self_tests): selftest::run_tests.
6997 * selftest.h: Update declarations.
6998 * selftest-arch.c (register_self_test_foreach_arch): Rename it to
6999 selftests::register_test_foreach_arch.
7000 * selftest-arch.h: Update declaration.
7001 * aarch64-tdep.c: Update.
7002 * arm-tdep.c: Likewise.
7003 * disasm-selftests.c: Likewise.
7004 * dwarf2loc.c: Likewise.
7005 * dwarf2-frame.c: Likewise.
7006 * findvar.c: Likewise.
7007 * gdbarch-selftests.c: Likewise.
7008 * maint.c (maintenance_selftest): Likewise.
7009 * regcache.c: Likewise.
7010 * rust-exp.y: Likewise.
7011 * selftest-arch.c: Likewise.
7012 * unittests/environ-selftests.c: Likewise.
7013 * unittests/function-view-selftests.c: Likewise.
7014 * unittests/offset-type-selftests.c: Likewise.
7015 * unittests/optional-selftests.c: Likewise.
7016 * unittests/scoped_restore-selftests.c: Likewise.
7017 * utils-selftests.c: Likewise.
7019 2017-08-17 Pedro Alves <palves@redhat.com>
7021 * cli/cli-cmds.c (source_command): Delete 'old_source_verbose'
7024 2017-08-17 Pedro Alves <palves@redhat.com>
7026 * dwarf2read.c (struct dwarf2_cu) <line_header_die_owner>: New
7028 (reset_die_in_process): Delete, replaced by ...
7029 (process_die_scope): ... this new class. Make it responsible for
7030 freeing cu->line_header too.
7031 (process_die): Use process_die_scope.
7032 (handle_DW_AT_stmt_list): Record the line header's owner CU/DIE in
7033 cu->line_header_die_owner. Don't release the line header if it's
7035 (setup_type_unit_groups): Make the CU/DIE own the line header.
7036 Don't release the line header here.
7038 2017-08-17 Alex Lindsay <alexlindsay239@gmail.com> (tiny change)
7040 * elfread.c (elf_read_minimal_symbols): xfree synthsyms.
7042 2017-08-17 Ruslan Kabatsayev <b7.10110111@gmail.com>
7044 * NEWS: Mention new shortcuts for nexti and stepi in TUI
7047 2017-08-16 Ruslan Kabatsayev <b7.10110111@gmail.com>
7049 * tui/tui.c (tui_commands): Add "nexti" and "stepi" to the Single-Key
7052 2017-08-15 Stafford Horne <shorne@gmail.com>
7054 * MAINTAINERS (Write After Approval): Add Stafford Horne.
7056 2017-08-15 Stafford Horne <shorne@gmail.com>
7058 * xtensa-tdep.c (xtensa_init_reggroups): Use xstrdup for cpname.
7060 2017-08-15 Sergio Durigan Junior <sergiodj@redhat.com>
7063 * infcmd.c (unset_environment_command): Use the 'clear' method on
7064 the environment instead of resetting it.
7066 2017-08-15 John Baldwin <jhb@FreeBSD.org>
7068 * fbsd-nat.c (fbsd_convert_siginfo): Fix compile on big-endian
7071 2017-08-14 Tom Tromey <tom@tromey.com>
7073 * valprint.c (print_octal_chars): Use HOST_CHAR_BIT.
7074 (print_binary_chars): Likewise.
7075 (BITS_IN_BYTES): Remove.
7077 2017-08-14 Tom Tromey <tom@tromey.com>
7080 * valprint.c (LOW_ZERO): Change value to 034.
7081 (print_octal_chars): Add static_asserts for octal constants.
7082 * printcmd.c (print_scalar_formatted): Add 'd' case.
7084 2017-08-11 Tom Tromey <tom@tromey.com>
7086 * symfile.c (add_symbol_file_command): Use std::vector.
7088 2017-08-14 Tom Tromey <tom@tromey.com>
7090 * break-catch-throw.c (handle_gnu_v3_exceptions): Use std::move.
7091 * break-catch-syscall.c (create_syscall_event_catchpoint): Use
7093 * break-catch-sig.c (create_signal_catchpoint): Use std::move.
7095 2017-08-11 Pedro Alves <palves@redhat.com>
7097 * infrun.c (process_event_stop_test): Adjust
7098 function_name_is_marked_for_skip call.
7099 * skip.c: Include <list>.
7100 (skiplist_entry): Make it a class with private fields, and
7102 (skiplist_entry_chain): Delete.
7103 (skiplist_entries): New.
7104 (skiplist_entry_count): Delete.
7105 (highest_skiplist_entry_num): New.
7106 (ALL_SKIPLIST_ENTRIES, ALL_SKIPLIST_ENTRIES_SAFE): Delete.
7107 (add_skiplist_entry): Delete.
7108 (skiplist_entry::skiplist_entry): New.
7109 (skiplist_entry::add_entry): New.
7110 (skip_file_command, skip_function): Adjust.
7111 (compile_skip_regexp): Delete.
7112 (skip_command): Don't compile regexp here. Adjust to use
7113 skiplist_entry::add_entry.
7114 (skip_info): Adjust to use range-for and getters.
7115 (skip_enable_command, skip_disable_command): Adjust to use
7116 range-for and setters.
7117 (skip_delete_command): Adjust to use std::list.
7118 (add_skiplist_entry): Delete.
7119 (skip_file_p): Delete, refactored as ...
7120 (skiplist_entry::do_skip_file_p): ... this new method.
7121 (skip_gfile_p): Delete, refactored as ...
7122 (skiplist_entry::do_gskip_file_p): ... this new method.
7123 (skip_function_p, skip_rfunction_p): Delete, refactored as ...
7124 (skiplist_entry::skip_function_p): ... this new method.
7125 (function_name_is_marked_for_skip): Now returns bool, and takes
7126 the function sal by const reference. Adjust to use range-for and
7127 skiplist_entry methods.
7128 (_initialize_step_skip): Remove references to
7129 skiplist_entry_chain, skiplist_entry_count.
7130 * skip.h (function_name_is_marked_for_skip): Now returns bool, and
7131 takes the function sal by const reference.
7133 2017-08-11 Yao Qi <yao.qi@linaro.org>
7135 * dwarf2-frame.c (clear_pointer_cleanup): Remove.
7136 (dwarf2_frame_cache): Remove reset_cache_cleanup.
7137 (dwarf2_frame_cache):
7138 * frame-unwind.c (frame_unwind_try_unwinder): Catch
7139 RETURN_MASK_ALL and set *this_case to NULL.
7140 * frame-unwind.h: Update comments.
7142 2017-08-11 Yao Qi <yao.qi@linaro.org>
7144 * dwarf2-frame.c (dwarf2_frame_state_alloc_regs): Remove.
7145 (dwarf2_frame_state_copy_regs): Remove.
7146 (dwarf2_frame_state_free_regs): Remove.
7147 (dwarf2_frame_state::~dwarf2_frame_state): Remove.
7148 (dwarf2_restore_rule): Call method .alloc_regs instead of
7149 dwarf2_frame_state_alloc_regs.
7150 (execute_cfa_program): Likewise. Call dwarf2_frame_state_reg_info
7151 constructor. Call std::move.
7152 (dwarf2_fetch_cfa_info): Don't call dwarf2_frame_state_copy_regs.
7153 (dwarf2_frame_cache): Likewise.
7155 [GDB_SELF_TEST]: Include selftest.h and
7157 [GDB_SELF_TEST] (execute_cfa_program_test): New function.
7158 (_initialize_dwarf2_frame) [GDB_SELF_TEST]: Register
7159 execute_cfa_program_test.
7161 * dwarf2-frame.h (dwarf2_frame_state_reg_info): Add ctor, dtor,
7162 copy ctor, assignment operator, move assignment.
7163 <alloc_regs>: New method.
7165 (struct dwarf2_frame_state): Delete dtor.
7166 (dwarf2_frame_state_alloc_regs): Remove declaration.
7167 * sparc-tdep.c (sparc_execute_dwarf_cfa_vendor_op): Don't call
7168 dwarf2_frame_state_alloc_regs, use .alloc_regs instead.
7170 2017-08-11 Yao Qi <yao.qi@linaro.org>
7172 * dwarf2-frame.c (dwarf2_frame_state_free): Remove.
7173 (dwarf2_frame_state::dwarf2_frame_state): New.
7174 (dwarf2_frame_state::~dwarf2_frame_state): New.
7175 (dwarf2_fetch_cfa_info): Update.
7176 (dwarf2_frame_cache): Remove old_chain. Change 'fs' to an object
7177 rather than a pointer. Update code.
7178 * dwarf2-frame.h (struct dwarf2_frame_state): Declare ctor and
7180 <data_align, code_align, retaddr_column>: Change them to const.
7181 <armcc_cfa_offsets_sf, armcc_cfa_offsets_reversed>: Change them
7184 2017-08-11 Yao Qi <yao.qi@linaro.org>
7186 * dwarf2-frame.h (struct dwarf2_frame_state_reg) <exp_len>: Remove.
7187 <loc.exp>: New field.
7188 * dwarf2-frame.c (execute_cfa_program): Update.
7189 (dwarf2_frame_prev_register): Update.
7191 2017-08-10 Pedro Alves <palves@redhat.com>
7193 * common/gdb_unique_ptr.h (xfree_deleter<T[]>): Define.
7195 2017-08-09 John Baldwin <jhb@FreeBSD.org>
7197 * fbsd-nat.c (struct fbsd_fork_info): Remove.
7198 (fbsd_pending_children): Use std::list.
7199 (fbsd_remember_child): Likewise.
7200 (fbsd_is_child_pending): Likewise.
7201 (fbsd_pending_vfork_done): Use std::forward_list.
7202 (fbsd_add_vfork_done): Likewise.
7203 (fbsd_is_vfork_done_pending): Likewise.
7204 (fbsd_next_vfork_done): Likewise.
7206 2017-08-09 John Baldwin <jhb@FreeBSD.org>
7208 * fbsd-nat.c [HAVE_KINFO_GETVMMAP] (struct free_deleter): New.
7209 (fbsd_find_memory_regions): Use free_deleter with std::unique_ptr.
7210 [!HAVE_KINFO_GETVMMAP] (fbsd_find_memory_regions): Use std::string
7212 (fbsd_xfer_partial): Use gdb::byte_vector.
7213 (fbsd_add_threads): Use gdb::unique_xmalloc_ptr.
7215 2017-08-09 John Baldwin <jhb@FreeBSD.org>
7217 * fbsd-nat.c: [!HAVE_KINFO_GETVMMAP]: Include <sys/user.h> and
7219 (fbsd_find_memory_regions): Fix `mapfile' initialization.
7221 2017-08-09 Tom Tromey <tom@tromey.com>
7223 * skip.c (skiplist_entry): New constructor.
7224 (skiplist_entry::enabled, skiplist_entry::function_is_regexp)
7225 (skiplist_entry::file_is_glob): Now bool.
7226 (skiplist_entry::file, skiplist_entry::function): Now
7228 (make_skip_entry): Return a unique_ptr. Use new.
7229 (free_skiplist_entry, free_skiplist_entry_cleanup)
7230 (make_free_skiplist_entry_cleanup): Remove.
7231 (skip_command, skip_disable_command, add_skiplist_entry)
7232 (skip_form_bytes, compile_skip_regexp, skip_command, skip_info)
7233 (skip_file_p, skip_gfile_p, skip_function_p, skip_rfunction_p)
7234 (function_name_is_marked_for_skip): Update.
7235 (skip_delete_command): Update. Use delete.
7237 2017-08-09 Jiong Wang <jiong.wang@arm.com>
7239 * aarch64-linux-tdep.c: Include "auxv.h" and "elf/common.h".
7240 (aarch64_linux_core_read_description): New function.
7241 (aarch64_linux_init_abi): Register gdbarch_core_read_description.
7243 2017-08-09 Pedro Alves <palves@redhat.com>
7245 * cp-name-parser.y (cp_comp_to_string): Return a
7246 gdb::unique_xmalloc_ptr<char>.
7247 * cp-support.c (replace_typedefs_qualified_name)
7248 (replace_typedefs): Adjust to use gdb::unique_xmalloc_ptr<char>.
7249 (cp_canonicalize_string_full): Use op= instead of explicit
7251 (cp_class_name_from_physname, method_name_from_physname)
7252 (cp_func_name, cp_remove_params): Adjust to use
7253 gdb::unique_xmalloc_ptr<char>.
7254 * cp-support.h (cp_comp_to_string): Return a
7255 gdb::unique_xmalloc_ptr<char>.
7256 * python/py-type.c (typy_lookup_type): Adjust to use
7257 gdb::unique_xmalloc_ptr<char>.
7259 2017-08-09 H.J. Lu <hongjiu.lu@intel.com>
7261 * dwarf2read.c (dwarf2_string_attr): Fix a typo.
7263 2017-08-09 Alex Lindsay <alexlindsay239@gmail.com>
7264 Yao Qi <yao.qi@linaro.org>
7266 * cp-support.c (cp_canonicalize_string_full): Use
7267 gdb::unique_xmalloc_ptr<char>.
7268 (cp_canonicalize_string): Likewise.
7270 2017-08-09 Yao Qi <yao.qi@linaro.org>
7272 * features/Makefile (WHICH): Remove i386/ non-linux stuff.
7273 * regformats/i386/amd64-avx-avx512.dat: Remove.
7274 * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Remove.
7275 * regformats/i386/amd64-avx-mpx.dat:Remove.
7276 * regformats/i386/amd64-avx.dat: Remove.
7277 * regformats/i386/amd64-mpx.dat: Remove.
7278 * regformats/i386/i386-avx-avx512.dat: Remove.
7279 * regformats/i386/i386-avx-mpx-avx512-pku.dat: Remove.
7280 * regformats/i386/i386-avx-mpx.dat: Remove.
7281 * regformats/i386/i386-mmx.dat: Remove.
7282 * regformats/i386/i386-mpx.dat: Remove.
7284 2017-08-09 Yao Qi <yao.qi@linaro.org>
7286 * amd64-tdep.h (tdesc_x32): Remove the declaration.
7287 * amd64-tdep.c: Don't include features/i386/x32*.c.
7288 (_initialize_amd64_tdep): Don't call initialize_tdesc_x32*
7290 * features/Makefile (WHICH): Remove i386/x32, i386/x32-avx,
7291 and i386/x32-avx-avx512.
7292 (XMLTOC): Remove i386/x32-avx.xml, i386/x32-avx-avx512.xml,
7294 * features/i386/x32-avx-avx512.c: Removed.
7295 * features/i386/x32-avx-avx512.xml: Removed.
7296 * features/i386/x32-avx.c: Removed.
7297 * features/i386/x32-avx.xml: Removed.
7298 * features/i386/x32.c: Removed.
7299 * features/i386/x32.xml: Removed.
7300 * regformats/i386/x32-avx-avx512.dat: Removed.
7301 * regformats/i386/x32-avx.dat: Removed.
7302 * regformats/i386/x32.dat: Removed.
7304 2017-08-07 Maciej W. Rozycki <macro@imgtec.com>
7306 PR breakpoints/21886
7307 * mem-break.c (default_memory_insert_breakpoint): Use
7308 `->placed_address' rather than `->reqstd_address' for the
7309 breakpoint location.
7311 2017-08-07 Maciej W. Rozycki <macro@imgtec.com>
7313 * arch-utils.c (default_print_insn): Remove arch/mach/endian
7316 2017-08-07 Maciej W. Rozycki <macro@imgtec.com>
7318 * gdbarch.sh (gdbarch_info): Replace the `tdep_info' member with
7319 a union of `tdep_info', `tdesc_data' and `id'.
7320 * aarch64-tdep.c (aarch64_gdbarch_init): Use `info.tdesc_data'
7321 rather than `info.tdep_info'.
7322 * amd64-linux-tdep.c (amd64_linux_init_abi): Likewise.
7323 * i386-linux-tdep.c (i386_linux_init_abi): Likewise.
7324 * i386-tdep.c (i386_gdbarch_init): Likewise.
7325 * mips-linux-tdep.c (mips_linux_init_abi): Likewise.
7326 * mips-tdep.c (mips_gdbarch_init): Likewise.
7327 * nds32-tdep.c (nds32_gdbarch_init): Likewise.
7328 * rs6000-tdep.c (rs6000_gdbarch_init): Likewise.
7329 * ppc-linux-tdep.c (ppu2spu_sniffer): Use `info.id' rather than
7331 (ppc_linux_init_abi): Use `info.tdesc_data' rather than
7333 * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
7334 * spu-multiarch.c (spu_gdbarch): Use `info.id' rather than
7336 * spu-tdep.c (spu_gdbarch_init): Likewise.
7337 * gdbarch.h: Regenerate.
7339 2017-08-07 Leszek Swirski <leszeks@google.com>
7342 * dwarf2read.c (dwarf2_string_attr): Allow DW_FORM_GNU_strp_alt.
7344 2017-08-07 Simon Marchi <simon.marchi@ericsson.com>
7346 * remote-sim.c (gdbsim_load): Remove char **argv local variable.
7347 (gdbsim_open): Rename gdb_argv args object to argv.
7349 2017-08-05 Tom Tromey <tom@tromey.com>
7351 * compile/compile-object-load.c (compile_object_load): Use
7352 gdb::unique_xmalloc_ptr.
7353 * cli/cli-dump.c (scan_filename): Rename from
7354 scan_filename_with_cleanup. Change return type.
7355 (scan_expression): Rename from scan_expression_with_cleanup.
7357 (dump_memory_to_file, dump_value_to_file, restore_command):
7358 Use gdb::unique_xmalloc_ptr. Update.
7359 * cli/cli-cmds.c (find_and_open_script): Use
7360 gdb::unique_xmalloc_ptr.
7361 * tracefile-tfile.c (tfile_open): Use gdb::unique_xmalloc_ptr.
7362 * symmisc.c (maintenance_print_symbols)
7363 (maintenance_print_msymbols): Use gdb::unique_xmalloc_ptr.
7364 * symfile.c (symfile_bfd_open, generic_load)
7365 (add_symbol_file_command, remove_symbol_file_command): Use
7366 gdb::unique_xmalloc_ptr.
7367 * source.c (openp): Use gdb::unique_xmalloc_ptr.
7368 * psymtab.c (maintenance_print_psymbols): Use
7369 gdb::unique_xmalloc_ptr.
7370 * corelow.c (core_open): Use gdb::unique_xmalloc_ptr.
7371 * breakpoint.c (save_breakpoints): Use gdb::unique_xmalloc_ptr.
7372 * solib.c (solib_map_sections): Use gdb::unique_xmalloc_ptr.
7373 (reload_shared_libraries_1): Likewise.
7375 2017-08-05 Tom Tromey <tom@tromey.com>
7377 * rust-exp.y (rust_op_ptr, set_field): Remove typedefs.
7378 (rust_op_vector, rust_set_vector): New typedefs.
7379 (current_parser): New global.
7380 (work_obstack): Change to pointer type. Update all users.
7381 (rust_ast, pstate): Remove globals.
7382 (struct rust_parser): New.
7383 (%union) <params, field_inits>: Change type.
7384 (start, tuple_expr, unit_expr, struct_expr_list, literal)
7385 (field_expr, expr_list, maybe_expr_list, type_list): Update.
7386 (ast_call_ish, ast_path, ast_function_type, ast_tuple_type)
7387 (convert_params_to_types, convert_params_to_expression): Change
7389 (ast_string): Change type of "fields".
7390 (rust_parse): Make a rust_parser. Remove cleanups.
7391 (rust_lex_tests): Make and install an auto_obstack.
7393 2017-08-04 Yao Qi <yao.qi@linaro.org>
7395 * configure.srv (ipa_x32_linux_regobj): New.
7396 * linux-amd64-ipa.c (get_ipa_tdesc): Use X86_TDESC_AVX_AVX512
7397 instead of X86_TDESC_AVX512.
7398 (initialize_low_tracepoint): Call
7399 init_registers_x32_avx_avx512_linux.
7401 2017-08-04 Yao Qi <yao.qi@linaro.org>
7403 * utils.h (gdb_argv): Add namespace std for nullptr_t.
7405 2017-08-03 Ruslan Kabatsayev <b7.10110111@gmail.com>
7407 * MAINTAINERS (Write After Approval): Add Ruslan Kabatsayev.
7409 2017-08-03 Tom Tromey <tom@tromey.com>
7411 * utils.c (make_cleanup_freeargv, do_freeargv, gdb_buildargv):
7413 * utils.h (make_cleanup_freeargv, gdb_buildargv): Remove.
7415 2017-08-03 Tom Tromey <tom@tromey.com>
7417 * python/py-param.c (compute_enum_values): Use gdb_argv.
7419 2017-08-03 Tom Tromey <tom@tromey.com>
7421 * utils.h (struct gdb_argv_deleter): New.
7422 (gdb_argv): New class.
7423 * utils.c (gdb_argv::reset): New method.
7424 * tracepoint.c (delete_trace_variable_command): Use gdb_argv.
7425 * tracefile.c (tsave_command): Use gdb_argv.
7426 * top.c (new_ui_command): Use gdb_argv.
7427 * symmisc.c (maintenance_print_symbols)
7428 (maintenance_print_msymbols, maintenance_expand_symtabs): Use gdb_argv.
7429 * symfile.c (symbol_file_command, generic_load)
7430 (remove_symbol_file_command): Use gdb_argv.
7431 * stack.c (backtrace_command): Use gdb_argv.
7432 * source.c (add_path, show_substitute_path_command)
7433 (unset_substitute_path_command, set_substitute_path_command):
7435 * skip.c (skip_command): Use gdb_argv. Use gdb_buildargv.
7436 * ser-mingw.c (pipe_windows_open): Use gdb_argv.
7437 * remote.c (extended_remote_run, remote_put_command)
7438 (remote_get_command, remote_delete_command): Use gdb_argv.
7439 * remote-sim.c (gdbsim_load, gdbsim_create_inferior)
7440 (gdbsim_open): Use gdb_argv.
7441 * python/py-cmd.c (gdbpy_string_to_argv): Use gdb_argv.
7442 * psymtab.c (maintenance_print_psymbols): Use gdb_argv.
7443 * procfs.c (procfs_info_proc): Use gdb_argv.
7444 * interps.c (interpreter_exec_cmd): Use gdb_argv.
7445 * infrun.c (handle_command): Use gdb_argv.
7446 * inferior.c (add_inferior_command, clone_inferior_command):
7448 * guile/scm-string.c (gdbscm_string_to_argv): Use gdb_argv.
7449 * exec.c (exec_file_command): Use gdb_argv.
7450 * cli/cli-cmds.c (alias_command): Use gdb_argv.
7451 * compile/compile.c (build_argc_argv): Use gdb_argv.
7453 2017-08-03 Tom Tromey <tom@tromey.com>
7455 * python/python.c (gdbpy_decode_line): Use unique_xmalloc_ptr.
7457 2017-08-03 Tom Tromey <tom@tromey.com>
7459 * python/python.c (compute_python_string): Return std::string.
7460 (gdbpy_eval_from_control_command): Update.
7461 (do_start_initialization): Use std::string.
7462 * python/py-varobj.c (py_varobj_iter_next): Use string_printf, not
7464 * python/py-breakpoint.c (local_setattro): Use string_printf, not
7467 2017-08-03 Tom Tromey <tom@tromey.com>
7469 * top.h (do_restore_instream_cleanup): Remove.
7470 * top.c (do_restore_instream_cleanup): Remove.
7471 (read_command_file): Use scoped_restore.
7472 * cli/cli-script.c (execute_user_command): Use scoped_restore.
7474 2017-08-03 Tom Tromey <tom@tromey.com>
7476 * cli/cli-script.c (execute_user_command)
7477 (execute_control_command): Use scoped_restore.
7479 2017-08-03 Tom Tromey <tom@tromey.com>
7481 * cli/cli-script.c (do_restore_user_call_depth): Remove.
7482 (execute_user_command): Remove user_call_depth; use
7483 user_args_stack's size instead.
7485 2017-08-03 Tom Tromey <tom@tromey.com>
7487 * top.h (in_user_command): Remove.
7488 * top.c (in_user_command): Remove.
7489 * cli/cli-script.c (do_restore_user_call_depth)
7490 (execute_user_command): Update.
7492 2017-08-03 Tom Tromey <tom@tromey.com>
7494 * valops.c (search_struct_method): Use gdb::byte_vector.
7495 * valarith.c (value_concat): Use std::vector.
7496 * target.c (memory_xfer_partial): Use gdb::byte_vector.
7497 (simple_search_memory): Likewise.
7498 * printcmd.c (find_string_backward): Use gdb::byte_vector.
7499 * mi/mi-main.c (mi_cmd_data_write_memory): Use gdb::byte_vector.
7500 * gcore.c (gcore_copy_callback): Use gdb::byte_vector.
7501 * elfread.c (elf_rel_plt_read): Use std::string.
7502 * cp-valprint.c (cp_print_value): Use gdb::byte_vector.
7503 * cli/cli-dump.c (restore_section_callback): Use
7506 2017-08-03 Tom Tromey <tom@tromey.com>
7508 * jit.c (jit_reader_load_command): Use unique_xmalloc_ptr.
7510 2017-08-03 Tom Tromey <tom@tromey.com>
7512 * tui/tui-regs.c (tui_restore_gdbout): Remove.
7513 (tui_register_format): Use scoped_restore.
7515 2017-08-03 Tom Tromey <tom@tromey.com>
7517 * reverse.c (exec_direction_default): Remove.
7518 (exec_reverse_once): Use scoped_restore.
7519 * remote.c (restore_remote_timeout): Remove.
7520 (remote_flash_erase, remote_flash_write, remote_flash_done)
7521 (readchar, remote_serial_write): Use scoped_restore.
7522 * cli/cli-script.c (struct source_cleanup_lines_args)
7523 (source_cleanup_lines): Remove.
7524 (script_from_file): Use scoped_restore.
7525 * cli/cli-cmds.c (source_verbose_cleanup): Remove.
7526 (source_command): Use scoped_restore.
7528 2017-08-03 Tom Tromey <tom@tromey.com>
7530 * utils.h (make_cleanup_free_so): Remove.
7531 * utils.c (do_free_so, make_cleanup_free_so): Remove.
7532 * solist.h (struct so_deleter): New.
7533 (so_list_up): New typedef.
7534 * solib-svr4.c (svr4_read_so_list): Use so_list_up.
7536 2017-08-03 Tom Tromey <tom@tromey.com>
7538 * utils.h (make_cleanup_restore_current_language): Remove.
7539 * utils.c (do_restore_current_language)
7540 (make_cleanup_restore_current_language): Remove.
7541 * parse.c (parse_exp_in_context_1)
7542 (parse_expression_with_language): Use
7543 scoped_restore_current_language.
7544 * mi/mi-main.c (mi_cmd_execute): Use
7545 scoped_restore_current_language.
7546 * language.h (scoped_restore_current_language): New class.
7548 2017-08-03 Tom Tromey <tom@tromey.com>
7550 * compile/compile.c (cleanup_unlink_file): Remove.
7551 (compile_to_object): Use gdb::unlinker.
7552 (eval_compile_command): Likewise.
7554 2017-08-03 Tom Tromey <tom@tromey.com>
7556 * utils.h (make_cleanup_fclose): Remove.
7557 * utils.c (do_fclose_cleanup, make_cleanup_fclose): Remove.
7559 2017-08-03 Tom Tromey <tom@tromey.com>
7561 * top.c (open_terminal_stream): Return gdb_file_up.
7562 (new_ui_command): Update.
7564 2017-08-03 Tom Tromey <tom@tromey.com>
7566 * source.c (print_source_lines_base, forward_search_command)
7567 (reverse_search_command): Use gdb_file_up.
7569 2017-08-03 Tom Tromey <tom@tromey.com>
7571 * fbsd-nat.c (fbsd_find_memory_regions): Update.
7573 2017-08-03 Tom Tromey <tom@tromey.com>
7575 * cli/cli-cmds.c (find_and_open_script): Change return type.
7576 Remove "streamp" and "full_path" parameters.
7577 (source_script_with_search): Update.
7578 * auto-load.c (source_script_file): Update.
7579 * cli/cli-cmds.h (find_and_open_script): Change type.
7580 (open_script): New struct.
7582 2017-08-03 Tom Tromey <tom@tromey.com>
7584 * xml-support.c (xml_fetch_content_from_file): Update.
7585 * ui-file.c (stdio_file::open): Update.
7586 * tracefile-tfile.c (tfile_start): Update.
7587 * remote.c (remote_file_put, remote_file_get): Update.
7588 * nat/linux-procfs.c (linux_proc_get_int)
7589 (linux_proc_pid_get_state, linux_proc_tid_get_name): Update.
7590 * nat/linux-osdata.c (linux_common_core_of_thread): Update.
7591 (command_from_pid, commandline_from_pid, linux_xfer_osdata_cpus)
7592 (print_sockets, linux_xfer_osdata_shm, linux_xfer_osdata_sem)
7593 (linux_xfer_osdata_msg, linux_xfer_osdata_modules): Update.
7594 * nat/linux-btrace.c (linux_determine_kernel_start): Update.
7595 * linux-nat.c (linux_proc_pending_signals): Update.
7596 * dwarf2read.c (write_psymtabs_to_index): Use gdb_file_up.
7597 (file_closer): Remove.
7598 * compile/compile.c (compile_to_object): Update.
7599 * common/filestuff.h (struct gdb_file_deleter): New.
7600 (gdb_file_up): New typedef.
7601 (gdb_fopen_cloexec): Change return type.
7602 * common/filestuff.c (gdb_fopen_cloexec): Return gdb_file_up.
7603 * cli/cli-dump.c (fopen_with_cleanup): Remove.
7604 (dump_binary_file, restore_binary_file): Update.
7605 * auto-load.c (auto_load_objfile_script_1): Update.
7607 2017-08-03 Tom Tromey <tom@tromey.com>
7609 * tracepoint.c (tvariables_info_1): Use ui_out_emit_table.
7610 (info_static_tracepoint_markers_command): Likewise.
7611 * solib.c (info_sharedlibrary_command): Use ui_out_emit_table.
7612 * skip.c (skip_info): Use ui_out_emit_table.
7613 * progspace.c (print_program_space): Use ui_out_emit_table.
7614 * osdata.c (info_osdata): Use ui_out_emit_table.
7615 * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions): Use
7617 * linux-thread-db.c (info_auto_load_libthread_db): Use
7619 * inferior.c (print_inferior): Use ui_out_emit_table.
7620 * gdb_bfd.c (maintenance_info_bfds): Use ui_out_emit_table.
7621 * breakpoint.c (breakpoint_1): Use ui_out_emit_table.
7622 * auto-load.c (auto_load_info_scripts): Use ui_out_emit_table.
7623 * ada-tasks.c (print_ada_task_info): Use ui_out_emit_table.
7624 * ui-out.h (class ui_out_emit_table): New.
7626 2017-08-02 Maciej W. Rozycki <macro@imgtec.com>
7628 * mips-tdep.c (mips_fpu_type_str): New function.
7629 (mips_dump_tdep): Call it.
7631 2017-08-01 Maciej W. Rozycki <macro@imgtec.com>
7633 * mips-tdep.c (mips_gdbarch_init): Use MIPS_FPU_TYPE to access
7636 2017-07-31 Xavier Roirand <roirand@adacore.com>
7638 * solib-darwin.c (DYLD_VERSION_MAX): Increase value.
7640 2017-07-27 Xavier Roirand <roirand@adacore.com>
7642 * MAINTAINERS (Write After Approval): Add Xavier Roirand.
7644 2017-07-26 Yao Qi <yao.qi@linaro.org>
7646 * cli/cli-cmds.c (maintenancechecklist): New variable.
7647 * gdbcmd.h (maintenancechecklist): Declare it.
7648 * i386-linux-tdep.c (_initialize_i386_linux_tdep) [GDB_SELF_TEST]:
7649 Call i386_linux_read_description with different masks.
7650 * maint.c (maintenance_check_command): New function.
7651 (_initialize_maint_cmds): Call add_prefix_cmd.
7652 * target-descriptions.c (tdesc_reg): override operator != and ==.
7653 (tdesc_type): Likewise.
7654 (tdesc_feature): Likewise.
7655 (target_desc): Likewise.
7656 [GDB_SELF_TEST] (selftests::record_xml_tdesc): New function.
7657 (maintenance_check_xml_descriptions): New function.
7658 (_initialize_target_descriptions) Add command "xml-descriptions".
7659 * target-descriptions.h (selftests::record_xml_tdesc): Declare.
7661 2017-07-26 Yao Qi <yao.qi@linaro.org>
7663 * i386-linux-tdep.c: Don't include features/i386/i386-*linux.c.
7664 Include features/i386/32bit-*.c.
7665 (i386_linux_read_description): Generate target description if it
7667 (_initialize_i386_linux_tdep): Don't call _initialize_tdesc_i386
7669 * features/i386/32bit-linux.c: Re-generated.
7670 * features/i386/32bit-sse.c: Likewise.
7671 * target-descriptions.c (print_c_feature::visit): Print code to
7672 set register number if needed.
7673 (print_c_feature) <m_next_regnum>: New field.
7675 2017-07-26 Yao Qi <yao.qi@linaro.org>
7677 * features/Makefile (CFILES): Rename with TDESC_CFILES.
7678 (FEATURE_XMLFILES): New.
7679 (FEATURE_CFILES): New.
7681 (clean-cfiles): Remove generated c files.
7682 * features/i386/32bit-avx.c: Generated.
7683 * features/i386/32bit-avx512.c: Generated.
7684 * features/i386/32bit-core.c: Generated.
7685 * features/i386/32bit-linux.c: Generated.
7686 * features/i386/32bit-mpx.c: Generated.
7687 * features/i386/32bit-pkeys.c: Generated.
7688 * features/i386/32bit-sse.c: Generated.
7689 * target-descriptions.c: Include algorithm.
7690 (tdesc_element_visitor): Add method visit_end.
7691 (print_c_tdesc): Implement visit_end.
7692 (print_c_tdesc:: m_filename_after_features): Move it to
7694 (print_c_feature): New class.
7695 (maint_print_c_tdesc_cmd): Use print_c_feature if XML file
7696 name starts with "i386/32bit-".
7698 2017-07-26 Yao Qi <yao.qi@linaro.org>
7700 * target-descriptions.c (tdesc_element_visitor): New class.
7701 (tdesc_element): New class.
7702 (tdesc_reg): Inherit from tdesc_element.
7703 (tdesc_reg::accept): New function.
7704 (tdesc_type): Inherit from tdesc_element.
7705 (tdesc_type::accept): New function.
7706 (tdesc_feature): Inherit from tdesc_element.
7707 (tdesc_feature::accept): New function.
7708 (target_desc): Inherit from tdesc_element.
7709 (target_desc::target_desc): New.
7710 (target_desc::~target_desc): New.
7711 (target_desc::accept): New.
7712 (allocate_target_description): Use new.
7713 (free_target_description): Use delete.
7714 (print_c_tdesc): New class.
7715 (maint_print_c_tdesc_cmd): Adjust.
7717 * features/aarch64.c: Re-generated.
7718 * features/arc-arcompact.c: Re-generated.
7719 * features/arc-v2.c: Re-generated.
7720 * features/arm/arm-with-iwmmxt.c: Re-generated.
7721 * features/arm/arm-with-m.c: Re-generated.
7722 * features/arm/arm-with-m-fpa-layout.c: Re-generated.
7723 * features/arm/arm-with-m-vfp-d16.c: Re-generated.
7724 * features/arm/arm-with-neon.c: Re-generated.
7725 * features/arm/arm-with-vfpv2.c: Re-generated.
7726 * features/arm/arm-with-vfpv3.c: Re-generated.
7727 * features/i386/amd64-avx-avx512.c: Re-generated.
7728 * features/i386/amd64-avx-avx512-linux.c: Re-generated.
7729 * features/i386/amd64-avx.c: Re-generated.
7730 * features/i386/amd64-avx-linux.c: Re-generated.
7731 * features/i386/amd64-avx-mpx-avx512-pku.c: Re-generated.
7732 * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Re-generated.
7733 * features/i386/amd64-avx-mpx.c: Re-generated.
7734 * features/i386/amd64-avx-mpx-linux.c: Re-generated.
7735 * features/i386/amd64.c: Re-generated.
7736 * features/i386/amd64-linux.c: Re-generated.
7737 * features/i386/amd64-mpx.c: Re-generated.
7738 * features/i386/amd64-mpx-linux.c: Re-generated.
7739 * features/i386/i386-avx-avx512.c: Re-generated.
7740 * features/i386/i386-avx-avx512-linux.c: Re-generated.
7741 * features/i386/i386-avx.c: Re-generated.
7742 * features/i386/i386-avx-linux.c: Re-generated.
7743 * features/i386/i386-avx-mpx-avx512-pku.c: Re-generated.
7744 * features/i386/i386-avx-mpx-avx512-pku-linux.c: Re-generated.
7745 * features/i386/i386-avx-mpx.c: Re-generated.
7746 * features/i386/i386-avx-mpx-linux.c: Re-generated.
7747 * features/i386/i386.c: Re-generated.
7748 * features/i386/i386-linux.c: Re-generated.
7749 * features/i386/i386-mmx.c: Re-generated.
7750 * features/i386/i386-mmx-linux.c: Re-generated.
7751 * features/i386/i386-mpx.c: Re-generated.
7752 * features/i386/i386-mpx-linux.c: Re-generated.
7753 * features/i386/x32-avx-avx512.c: Re-generated.
7754 * features/i386/x32-avx-avx512-linux.c: Re-generated.
7755 * features/i386/x32-avx.c: Re-generated.
7756 * features/i386/x32-avx-linux.c: Re-generated.
7757 * features/i386/x32.c: Re-generated.
7758 * features/i386/x32-linux.c: Re-generated.
7759 * features/microblaze.c: Re-generated.
7760 * features/microblaze-with-stack-protect.c: Re-generated.
7761 * features/mips64-dsp-linux.c: Re-generated.
7762 * features/mips64-linux.c: Re-generated.
7763 * features/mips-dsp-linux.c: Re-generated.
7764 * features/mips-linux.c: Re-generated.
7765 * features/nds32.c: Re-generated.
7766 * features/nios2.c: Re-generated.
7767 * features/nios2-linux.c: Re-generated.
7768 * features/rs6000/powerpc-32.c: Re-generated.
7769 * features/rs6000/powerpc-32l.c: Re-generated.
7770 * features/rs6000/powerpc-403.c: Re-generated.
7771 * features/rs6000/powerpc-403gc.c : Re-generated.
7772 * features/rs6000/powerpc-405.c: Re-generated.
7773 * features/rs6000/powerpc-505.c: Re-generated.
7774 * features/rs6000/powerpc-601.c: Re-generated.
7775 * features/rs6000/powerpc-602.c: Re-generated.
7776 * features/rs6000/powerpc-603.c: Re-generated.
7777 * features/rs6000/powerpc-604.c: Re-generated.
7778 * features/rs6000/powerpc-64.c: Re-generated.
7779 * features/rs6000/powerpc-64l.c: Re-generated.
7780 * features/rs6000/powerpc-7400.c: Re-generated.
7781 * features/rs6000/powerpc-750.c: Re-generated.
7782 * features/rs6000/powerpc-860.c: Re-generated.
7783 * features/rs6000/powerpc-altivec32.c: Re-generated.
7784 * features/rs6000/powerpc-altivec32l.c: Re-generated.
7785 * features/rs6000/powerpc-altivec64.c: Re-generated.
7786 * features/rs6000/powerpc-altivec64l.c: Re-generated.
7787 * features/rs6000/powerpc-cell32l.c: Re-generated.
7788 * features/rs6000/powerpc-cell64l.c: Re-generated.
7789 * features/rs6000/powerpc-e500.c: Re-generated.
7790 * features/rs6000/powerpc-e500l.c: Re-generated.
7791 * features/rs6000/powerpc-isa205-32l.c: Re-generated.
7792 * features/rs6000/powerpc-isa205-64l.c: Re-generated.
7793 * features/rs6000/powerpc-isa205-altivec32l.c: Re-generated.
7794 * features/rs6000/powerpc-isa205-altivec64l.c: Re-generated.
7795 * features/rs6000/powerpc-isa205-vsx32l.c: Re-generated.
7796 * features/rs6000/powerpc-isa205-vsx64l.c: Re-generated.
7797 * features/rs6000/powerpc-vsx32.c: Re-generated.
7798 * features/rs6000/powerpc-vsx32l.c: Re-generated.
7799 * features/rs6000/powerpc-vsx64.c: Re-generated.
7800 * features/rs6000/powerpc-vsx64l.c: Re-generated.
7801 * features/rs6000/rs6000.c: Re-generated.
7802 * features/s390-linux32.c: Re-generated.
7803 * features/s390-linux32v1.c: Re-generated.
7804 * features/s390-linux32v2.c: Re-generated.
7805 * features/s390-linux64.c: Re-generated.
7806 * features/s390-linux64v1.c: Re-generated.
7807 * features/s390-linux64v2.c: Re-generated.
7808 * features/s390-te-linux64.c: Re-generated.
7809 * features/s390-tevx-linux64.c: Re-generated.
7810 * features/s390-vx-linux64.c: Re-generated.
7811 * features/s390x-linux64.c: Re-generated.
7812 * features/s390x-linux64v1.c: Re-generated.
7813 * features/s390x-linux64v2.c: Re-generated.
7814 * features/s390x-te-linux64.c: Re-generated.
7815 * features/s390x-tevx-linux64.c: Re-generated.
7816 * features/s390x-vx-linux64.c: Re-generated.
7817 * features/sparc/sparc32-solaris.c: Re-generated.
7818 * features/sparc/sparc64-solaris.c: Re-generated.
7819 * features/tic6x-c62x.c: Re-generated.
7820 * features/tic6x-c62x-linux.c: Re-generated.
7821 * features/tic6x-c64x.c: Re-generated.
7822 * features/tic6x-c64x-linux.c: Re-generated.
7823 * features/tic6x-c64xp.c: Re-generated.
7824 * features/tic6x-c64xp-linux.c: Re-generated.
7826 2017-07-26 Yao Qi <yao.qi@linaro.org>
7828 * i386-linux-tdep.c (i386_linux_read_description): New function.
7829 (i386_linux_core_read_description): Call
7830 i386_linux_read_description.
7831 * i386-linux-tdep.h (i386_linux_read_description): Declare.
7832 (tdesc_i386_linux, tdesc_i386_mmx_linux): Remove declarations.
7833 (tdesc_i386_avx_linux, tdesc_i386_mpx_linux): Likewise
7834 (tdesc_i386_avx_mpx_linux, tdesc_i386_avx_avx512_linux): Likewise.
7835 (tdesc_i386_avx_mpx_avx512_pku_linux): Likewise.
7836 * x86-linux-nat.c (x86_linux_read_description): Call
7837 i386_linux_read_description.
7839 2017-07-26 Yao Qi <yao.qi@linaro.org>
7842 * features/Makefile (%.c: %.xml): Pass the xml file name to
7843 command "maint print c-tdesc".
7844 * target-descriptions.c (maint_print_c_tdesc_cmd): Get file
7847 2017-07-26 Yao Qi <yao.qi@linaro.org>
7849 * target-descriptions.c (target_desc): Add ctor and dtor. Do
7850 in-class initialization.
7851 (tdesc_create_feature): Call new instead of XCNEW.
7852 (free_target_description): Ue delete.
7854 2017-07-25 John Baldwin <jhb@FreeBSD.org>
7856 * configure.nat: Add "-lkvm" for NetBSD/sparc64 and fix typo.
7858 2017-07-25 Yao Qi <yao.qi@linaro.org>
7860 * amd64-tdep.c (amd64_init_abi): Make argument default_tdesc
7862 (amd64_x32_init_abi): Likewise.
7863 * amd64-tdep.h (amd64_init_abi): Update declaration.
7864 (amd64_x32_init_abi): Likewise.
7866 2017-07-25 Yao Qi <yao.qi@linaro.org>
7869 * arm-linux-nat.c (arm_linux_fetch_inferior_registers): Update
7870 condition for FPSCR.
7871 (arm_linux_store_inferior_registers): Likewise.
7873 2017-07-22 Tom Tromey <tom@tromey.com>
7875 * break-catch-syscall.c (struct catch_syscall_inferior_data)
7876 <syscalls_counts>: Now a std::vector.
7877 (get_catch_syscall_inferior_data): Use "new".
7878 (catch_syscall_inferior_data_cleanup): Use "delete".
7879 (insert_catch_syscall, remove_catch_syscall)
7880 (clear_syscall_counts): Update.
7882 2017-07-22 Tom Tromey <tom@tromey.com>
7884 * break-catch-syscall.c (syscall_catchpoint)
7885 <syscalls_to_be_caught>: Now a std::vector<int>
7886 (~syscall_catchpoint): Remove.
7887 (insert_catch_syscall, remove_catch_syscall)
7888 (breakpoint_hit_catch_syscall, print_one_catch_syscall)
7889 (print_mention_catch_syscall, print_recreate_catch_syscall):
7891 (create_syscall_event_catchpoint): Change type of "filter"
7893 (catch_syscall_split_args): Return a std::vector.
7894 (catch_syscall_command_1, catching_syscall_number_1): Update.
7896 2017-07-22 Tom Tromey <tom@tromey.com>
7898 * break-catch-throw.c (struct exception_catchpoint)
7899 <exception_rx>: Now a std::string.
7900 (~exception_catchpoint): Remove.
7901 (print_one_detail_exception_catchpoint): Update.
7902 (handle_gnu_v3_exceptions): Change type of except_rx.
7903 (extract_exception_regexp): Return a std::string.
7904 (catch_exception_command_1): Update.
7906 2017-07-22 Tom Tromey <tom@tromey.com>
7908 * break-catch-sig.c (gdb_signal_type): Remove typedef.
7909 (struct signal_catchpoint) <signals_to_be_caught>: Now a
7911 <catch_all>: Now a bool.
7912 (~signal_catchpoint): Remove.
7913 (signal_catchpoint_insert_location)
7914 (signal_catchpoint_remove_location)
7915 (signal_catchpoint_breakpoint_hit, signal_catchpoint_print_one)
7916 (signal_catchpoint_print_mention)
7917 (signal_catchpoint_print_recreate)
7918 (signal_catchpoint_explains_signal): Update.
7919 (create_signal_catchpoint): Change type of "filter" and
7921 (catch_signal_split_args): Return a std::vector. Change type of
7923 (catch_signal_command): Update.
7925 2017-07-20 Pedro Alves <palves@redhat.com>
7927 * ada-lang.c (ada_language_defn): Make extern.
7928 (_initialize_ada_language): Remove add_language call.
7929 * c-lang.c (c_language_defn, cplus_language_defn)
7930 (asm_language_defn, minimal_language_defn): Make extern.
7931 (_initialize_c_language): Delete.
7932 * completer.c (compare_cstrings): Delete, moved to utils.h.
7933 * d-lang.c (d_language_defn): Make extern.
7934 (_initialize_d_language): Remove add_language calls.
7935 * defs.h (enum language): Add comment.
7936 * f-lang.c (f_language_defn): Make extern.
7937 (_initialize_f_language): Remove add_language call.
7938 * go-lang.c (go_language_defn): Make extern.
7939 (_initialize_go_language): Remove add_language call.
7940 * language.c: Include <algorithm>.
7941 (languages): Redefine as const array.
7942 (languages_size, languages_allocsize, DEFAULT_ALLOCSIZE): Delete.
7943 (set_language_command): Handle "local". Use for-range loop.
7944 (set_language): Remove loop.
7945 (language_enum): Rewrite.
7946 (language_def, language_str): Remove loops.
7947 (add_language): Delete.
7948 (add_set_language_command): New, based on add_languages.
7949 (skip_language_trampoline): Adjust.
7950 (local_language_defn): Delete.
7951 (language_gdbarch_post_init): Adjust.
7952 (_initialize_language): Remove add_language calls. Call
7953 add_set_language_command.
7954 * language.h (add_language): Delete.
7955 (auto_language_defn)
7956 (unknown_language_defn, minimal_language_defn, ada_language_defn)
7957 (asm_language_defn, c_language_defn, cplus_language_defn)
7958 (d_language_defn, f_language_defn, go_language_defn)
7959 (m2_language_defn, objc_language_defn, opencl_language_defn)
7960 (pascal_language_defn, rust_language_defn): Declare.
7961 * m2-lang.c (m2_language_defn): Make extern.
7962 (_initialize_m2_language): Remove add_language call.
7963 * objc-lang.c (objc_language_defn): Make extern.
7964 (_initialize_objc_language): Remove add_language call.
7965 * opencl-lang.c (opencl_language_defn): Make extern.
7966 (_initialize_opencl_language): Remove add_language call.
7967 * p-lang.c (pascal_language_defn): Make extern.
7968 (_initialize_pascal_language): Delete.
7969 * rust-lang.c (rust_language_defn): Make extern.
7970 (_initialize_rust_language): Delete.
7971 * utils.h (compare_cstrings): New static inline function.
7973 2017-07-20 Pedro Alves <palves@redhat.com>
7975 * ada-lang.c (ada_to_fixed_type_1): Adjust.
7976 (get_var_value): Constify parameters.
7977 (get_int_var_value): Change prototype.
7978 (to_fixed_range_type): Adjust.
7979 * ada-lang.h (get_int_var_value): Change prototype.
7981 2017-07-20 Pedro Alves <palves@redhat.com>
7983 * dwarf2read.c (dw2_lookup_symbol): Use
7984 SYMBOL_MATCHES_SEARCH_NAME.
7985 * psymtab.c (psym_lookup_symbol): Use SYMBOL_MATCHES_SEARCH_NAME.
7987 2017-07-20 Pedro Alves <palves@redhat.com>
7989 * block.c (block_iter_name_step, block_iter_name_first)
7990 (block_iter_name_next): Delete.
7991 (block_lookup_symbol_primary): Adjust to use
7992 dict_iter_match_first/dict_iter_match_next.
7993 * block.h (block_iter_name_first, block_iter_name_next): Delete
7995 (ALL_BLOCK_SYMBOLS_WITH_NAME): Adjust to use
7996 dict_iter_match_first/dict_iter_match_next.
7998 2017-07-20 Pedro Alves <palves@redhat.com>
8000 * cp-support.c (cp_find_first_component_aux): Add missing case for
8003 2017-07-18 David Blaikie <dblaikie@gmail.com>
8005 * dwarf2read.c (create_cus_hash_table): Re-add lost initialization
8006 of dwo_cu's dwo_file.
8008 2017-07-18 Yao Qi <yao.qi@linaro.org>
8010 * remote.c (store_registers_using_G): Remove one line comment.
8012 2017-07-18 Yao Qi <yao.qi@linaro.org>
8014 * regcache.c (regcache_cpy): Simplify it.
8015 (regcache::cpy_no_passthrough): Remove it.
8016 * regcache.h (cpy_no_passthrough): Remove it.
8017 (regcache_dup, regcache_cpy): Update comments.
8019 2017-07-18 Pedro Alves <palves@redhat.com>
8021 * remote-sim.c (sim_command_completer): Adjust to work with a
8022 completion_tracker instead of a VEC.
8024 2017-07-17 Pedro Alves <palves@redhat.com>
8026 * completer.c (complete_source_filenames): New function.
8027 (complete_address_and_linespec_locations): New function.
8028 (location_completer): Use complete_address_and_linespec_locations.
8029 (completion_tracker::build_completion_result): Honor the tracker's
8030 request to suppress append.
8031 * completer.h (completion_tracker::suppress_append_ws)
8032 (completion_tracker::set_suppress_append_ws): New methods.
8033 (completion_tracker::m_suppress_append_ws): New field.
8034 (complete_source_filenames): New declaration.
8035 * linespec.c (linespec_complete_what): New.
8036 (struct ls_parser) <complete_what, completion_word,
8037 completion_quote_char, completion_quote_end, completion_tracker>:
8039 (string_find_incomplete_keyword_at_end): New.
8040 (linespec_lexer_lex_string): Record quote char. If in completion
8042 (linespec_lexer_consume_token): Advance the completion word point.
8043 (linespec_lexer_peek_token): Save/restore completion info.
8044 (save_stream_and_consume_token): New.
8045 (set_completion_after_number): New.
8046 (linespec_parse_basic): Set what to complete next depending on
8047 token. Handle function and label completions specially.
8048 (parse_linespec): Disable objc shortcut in completion mode. Set
8049 what to complete next depending on token type. Skip keyword if in
8051 (complete_linespec_component, linespec_complete): New.
8052 * linespec.h (linespec_complete): Declare.
8054 2017-07-17 Pedro Alves <palves@redhat.com>
8056 * linespec.c (linespec_lexer_lex_string, find_toplevel_char):
8057 Handle 'operator<' / 'operator<<'.
8059 2017-07-17 Pedro Alves <palves@redhat.com>
8061 * completer.c (collect_explicit_location_matches): Handle
8063 (convert_explicit_location_to_linespec): New, factored out from
8065 (convert_explicit_location_to_sals): ... this.
8066 (complete_label): New.
8067 (linespec_complete_label, find_label_symbols_in_block): New.
8068 (find_label_symbols): Add completion_mode parameter and adjust to
8069 call find_label_symbols_in_block.
8070 * linespec.h (linespec_complete_label): Declare.
8072 2017-07-17 Pedro Alves <palves@redhat.com>
8074 * ada-lang.c (ada_collect_symbol_completion_matches): Add
8075 complete_symbol_mode parameter.
8076 * cli/cli-cmds.c (complete_command): Get the completion result out
8077 of the handle_brkchars tracker if used a custom word point.
8078 * completer.c: Include "linespec.h".
8079 (enum explicit_location_match_type) <MATCH_LINE>: New enumerator.
8080 (advance_to_expression_complete_word_point): New.
8081 (completion_tracker::completes_to_completion_word): New.
8082 (complete_files_symbols): Pass down
8083 complete_symbol_mode::EXPRESSION.
8084 (explicit_options, probe_options): New.
8085 (collect_explicit_location_matches): Complete on the
8086 explictit_loc->foo instead of word. Use
8087 linespec_complete_function. Handle MATCH_LINE. Handle offering
8088 keyword and options completions.
8089 (backup_text_ptr): Delete.
8090 (skip_keyword): New.
8091 (complete_explicit_location): Remove 'word' parameter. Add
8092 language, quoted_arg_start and quoted_arg_end parameters.
8093 Rewrite, parsing left to right.
8094 (location_completer): Rewrite.
8095 (location_completer_handle_brkchars): New function.
8096 (symbol_completer): Pass down complete_symbol_mode::EXPRESSION.
8097 (enum complete_line_internal_reason): Adjust comments.
8098 (completion_tracker::discard_completions): New.
8099 (completer_handle_brkchars_func_for_completer): Handle
8101 (gdb_custom_word_point_brkchars)
8102 (gdb_org_rl_basic_quote_characters): New.
8103 (gdb_completion_word_break_characters_throw)
8104 (completion_find_completion_word): Handle trackers that use a
8106 (completion_tracker::advance_custom_word_point_by): New.
8107 (completion_tracker::build_completion_result): Don't rely on
8108 readline appending the quote char.
8109 (gdb_rl_attempted_completion_function_throw): Handle trackers that
8110 use a custom word point.
8111 (gdb_rl_attempted_completion_function): Restore
8112 rl_basic_quote_characters.
8113 * completer.h (class completion_tracker): Extend intro comment.
8114 (completion_tracker::set_quote_char)
8115 (completion_tracker::quote_char)
8116 (completion_tracker::set_use_custom_word_point)
8117 (completion_tracker::use_custom_word_point)
8118 (completion_tracker::custom_word_point)
8119 (completion_tracker::set_custom_word_point)
8120 (completion_tracker::advance_custom_word_point_by)
8121 (completion_tracker::completes_to_completion_word)
8122 (completion_tracker::discard_completions): New methods.
8123 (completion_tracker::m_quote_char)
8124 (completion_tracker::m_use_custom_word_point)
8125 (completion_tracker::m_custom_word_point): New fields.
8126 (advance_to_expression_complete_word_point): Declare.
8127 * f-lang.c (f_collect_symbol_completion_matches): Add
8128 complete_symbol_mode parameter.
8129 * language.h (struct language_defn)
8130 <la_collect_symbol_completion_matches>: Add complete_symbol_mode
8132 * linespec.c (linespec_keywords): Add NULL terminator. Make extern.
8133 (linespec_complete_function): New function.
8134 (linespec_lexer_lex_keyword): Adjust.
8135 * linespec.h (linespec_keywords, linespec_complete_function): New
8137 * location.c (find_end_quote): New function.
8138 (explicit_location_lex_one): Add explicit_completion_info
8139 parameter. Save quoting info. Don't throw if being called for
8140 completion. Don't handle Ada operators here.
8141 (is_cp_operator, skip_op_false_positives, first_of)
8142 (explicit_location_lex_one_function): New function.
8143 (string_to_explicit_location): Replace 'dont_throw' parameter with
8144 an explicit_completion_info pointer parameter. Handle it. Don't
8145 use explicit_location_lex_one to lex function names. Use
8146 explicit_location_lex_one_function instead.
8147 * location.h (struct explicit_completion_info): New.
8148 (string_to_explicit_location): Replace 'dont_throw' parameter with
8149 an explicit_completion_info pointer parameter.
8150 * symtab.c (default_collect_symbol_completion_matches_break_on):
8151 Add complete_symbol_mode parameter. Handle LINESPEC mode.
8152 (default_collect_symbol_completion_matches)
8153 (collect_symbol_completion_matches): Add complete_symbol_mode
8155 (collect_symbol_completion_matches_type): Pass down
8156 complete_symbol_mode::EXPRESSION.
8157 (collect_file_symbol_completion_matches): Add complete_symbol_mode
8158 parameter. Handle LINESPEC mode.
8159 * symtab.h (complete_symbol_mode): New.
8160 (default_collect_symbol_completion_matches_break_on)
8161 (default_collect_symbol_completion_matches)
8162 (collect_symbol_completion_matches)
8163 (collect_file_symbol_completion_matches): Add complete_symbol_mode
8166 2017-07-17 Pedro Alves <palves@redhat.com>
8168 * utils.c (enum class strncmp_iw_mode): New.
8169 (strcmp_iw): Rename to ...
8170 (strncmp_iw_with_mode): ... this. Add string2_len and mode
8171 parameters. Handle them.
8173 (strcmp_iw): Reimplement as wrapper around strncmp_iw_with_mode.
8174 * utils.h (strncmp_iw): Declare.
8175 (strcmp_iw): Move describing comments here.
8177 2017-07-17 Pedro Alves <palves@redhat.com>
8179 * c-exp.y (operator_stoken): Use CP_OPERATOR_LEN and
8181 * c-typeprint.c (is_type_conversion_operator): Use
8183 * cp-support.c (LENGTH_OF_OPERATOR): Delete.
8184 (cp_find_first_component_aux): Use CP_OPERATOR_STR and
8186 * cp-support.h (CP_OPERATOR_STR, CP_OPERATOR_LEN): New.
8187 * gnu-v2-abi.c (gnuv2_is_operator_name): Use CP_OPERATOR_STR.
8188 * gnu-v3-abi.c (gnuv3_is_operator_name): Use CP_OPERATOR_STR.
8189 * linespec.c (linespec_lexer_lex_string): Use CP_OPERATOR_LEN and
8191 * location.c: Include "cp-support.h".
8192 (explicit_location_lex_one): Use CP_OPERATOR_LEN and
8194 * symtab.c (operator_chars): Use CP_OPERATOR_STR and
8197 2017-07-17 Pedro Alves <palves@redhat.com>
8199 * cli/cli-cmds.c (complete_command): Use a completion tracker
8200 along with completion_find_completion_word for handle_brkchars
8202 * completer.c (RL_QF_SINGLE_QUOTE, RL_QF_DOUBLE_QUOTE)
8203 (RL_QF_BACKSLASH, RL_QF_OTHER_QUOTE): New.
8204 (struct gdb_rl_completion_word_info): New.
8205 (gdb_rl_find_completion_word): New.
8206 (completion_find_completion_word): New.
8207 * completer.h (completion_find_completion_word): Declare.
8209 2017-07-17 Pedro Alves <palves@redhat.com>
8211 * ada-lang.c (symbol_completion_match): Adjust comments.
8212 (symbol_completion_add): Replace vector parameter with
8213 completion_tracker parameter. Use it.
8214 (ada_make_symbol_completion_list): Rename to...
8215 (ada_collect_symbol_completion_matches): ... this. Add
8216 completion_tracker parameter and use it.
8217 (ada_language_defn): Adjust.
8218 * break-catch-syscall.c (catch_syscall_completer): Adjust
8219 prototype and work with completion_tracker instead of VEC.
8220 * breakpoint.c (condition_completer): Adjust prototype and work
8221 with completion_tracker instead of VEC.
8222 * c-lang.c (c_language_defn, cplus_language_defn)
8223 (asm_language_defn, minimal_language_defn): Adjust to renames.
8224 * cli/cli-cmds.c (complete_command): Rework using
8225 completion_tracker. Catch exceptions when completing.
8226 * cli/cli-decode.c (integer_unlimited_completer)
8227 (complete_on_cmdlist, complete_on_enum): Adjust prototype and work
8228 with completion_tracker instead of VEC.
8229 * command.h (struct completion_tracker): Forward declare.
8230 (completer_ftype, completer_handle_brkchars_ftype): Change
8232 (complete_on_cmdlist, complete_on_enum): Adjust.
8233 * completer.c: Include <algorithm>.
8234 (struct gdb_completer_state): New.
8235 (current_completion): New global.
8236 (readline_line_completion_function): Delete.
8237 (noop_completer, filename_completer)
8238 (filename_completer_handle_brkchars, complete_files_symbols)
8239 (linespec_location_completer): Adjust to work with a
8240 completion_tracker instead of a VEC.
8241 (string_or_empty): New.
8242 (collect_explicit_location_matches): Adjust to work with a
8243 completion_tracker instead of a VEC.
8244 (explicit_location_completer): Rename to ...
8245 (complete_explicit_location): ... this and adjust to work with a
8246 completion_tracker instead of a VEC.
8247 (location_completer): Adjust to work with a completion_tracker
8249 (add_struct_fields): Adjust to work with a completion_list instead
8251 (expression_completer): Rename to ...
8252 (complete_expression): ... this and adjust to work with a
8253 completion_tracker instead of a VEC. Use complete_files_symbols.
8254 (expression_completer): Reimplement on top of complete_expression.
8255 (symbol_completer): Adjust to work with a completion_tracker
8257 (enum complete_line_internal_reason): Add describing comments.
8258 (complete_line_internal_normal_command): Adjust to work with a
8259 completion_tracker instead of a VEC.
8260 (complete_line_internal): Rename to ...
8261 (complete_line_internal_1): ... this and adjust to work with a
8262 completion_tracker instead of a VEC. Assert TEXT is NULL in the
8263 handle_brkchars phase.
8264 (new_completion_tracker): Delete.
8265 (complete_line_internal): Reimplement as TRY/CATCH wrapper around
8266 complete_line_internal_1.
8267 (free_completion_tracker): Delete.
8268 (INITIAL_COMPLETION_HTAB_SIZE): New.
8269 (completion_tracker::completion_tracker)
8270 (completion_tracker::~completion_tracker): New.
8271 (maybe_add_completion): Delete.
8272 (completion_tracker::maybe_add_completion)
8273 (completion_tracker::add_completion)
8274 (completion_tracker::add_completions): New.
8275 (throw_max_completions_reached_error): Delete.
8276 (complete_line): Adjust to work with a completion_tracker instead
8277 of a VEC. Don't create a completion_tracker_t or check for max
8279 (command_completer, command_completer_handle_brkchars)
8280 (signal_completer, reg_or_group_completer_1)
8281 (reg_or_group_completer, default_completer_handle_brkchars):
8282 Adjust to work with a completion_tracker.
8283 (gdb_completion_word_break_characters_throw): New.
8284 (gdb_completion_word_break_characters): Reimplement.
8285 (line_completion_function): Delete.
8286 (completion_tracker::recompute_lowest_common_denominator)
8287 (expand_preserving_ws)
8288 (completion_tracker::build_completion_result)
8289 (completion_result::completion_result)
8290 (completion_result::completion_result)
8291 (completion_result::~completion_result)
8292 (completion_result::completion_result)
8293 (completion_result::release_match_list, compare_cstrings)
8294 (completion_result::sort_match_list)
8295 (completion_result::reset_match_list)
8296 (gdb_rl_attempted_completion_function_throw)
8297 (gdb_rl_attempted_completion_function): New.
8298 * completer.h (completion_list, struct completion_result)
8299 (class completion_tracker): New.
8300 (complete_line): Add completion_tracker parameter.
8301 (readline_line_completion_function): Delete.
8302 (gdb_rl_attempted_completion_function): New.
8303 (noop_completer, filename_completer, expression_completer)
8304 (location_completer, symbol_completer, command_completer)
8305 (signal_completer, reg_or_group_completer): Update prototypes.
8306 (completion_tracker_t, new_completion_tracker)
8307 (make_cleanup_free_completion_tracker): Delete.
8308 (enum maybe_add_completion_enum): Delete.
8309 (maybe_add_completion): Delete.
8310 (throw_max_completions_reached_error): Delete.
8311 * corefile.c (complete_set_gnutarget): Adjust to work with a
8312 completion_tracker instead of a VEC.
8313 * cp-abi.c (cp_abi_completer): Adjust to work with a
8314 completion_tracker instead of a VEC.
8315 * d-lang.c (d_language_defn): Adjust.
8316 * disasm.c (disassembler_options_completer): Adjust to work with a
8317 completion_tracker instead of a VEC.
8318 * f-lang.c (f_make_symbol_completion_list): Rename to ...
8319 (f_collect_symbol_completion_matches): ... this. Adjust to work
8320 with a completion_tracker instead of a VEC.
8321 (f_language_defn): Adjust.
8322 * go-lang.c (go_language_defn): Adjust.
8323 * guile/scm-cmd.c (cmdscm_add_completion, cmdscm_completer):
8324 Adjust to work with a completion_tracker instead of a VEC.
8325 * infrun.c (handle_completer): Likewise.
8326 * interps.c (interpreter_completer): Likewise.
8327 * interps.h (interpreter_completer): Likewise.
8328 * language.c (unknown_language_defn, auto_language_defn)
8329 (local_language_defn): Adjust.
8330 * language.h (language_defn::la_make_symbol_completion_list):
8332 (language_defn::la_collect_symbol_completion_matches): ... this
8333 and adjust to work with a completion_tracker instead of a VEC.
8334 * m2-lang.c (m2_language_defn): Adjust.
8335 * objc-lang.c (objc_language_defn): Adjust.
8336 * opencl-lang.c (opencl_language_defn): Adjust.
8337 * p-lang.c (pascal_language_defn): Adjust.
8338 * python/py-cmd.c (cmdpy_completer_helper): Handle NULL word.
8339 (cmdpy_completer_handle_brkchars, cmdpy_completer): Adjust to work
8340 with a completion_tracker.
8341 * rust-lang.c (rust_language_defn): Adjust.
8342 * symtab.c (free_completion_list, do_free_completion_list)
8343 (return_val, completion_tracker): Delete.
8344 (completion_list_add_name, completion_list_add_symbol)
8345 (completion_list_add_msymbol, completion_list_objc_symbol)
8346 (completion_list_add_fields, add_symtab_completions): Add
8347 completion_tracker parameter and use it.
8348 (default_make_symbol_completion_list_break_on_1): Rename to...
8349 (default_collect_symbol_completion_matches_break_on): ... this.
8350 Add completion_tracker parameter and use it instead of allocating
8351 a completion tracker here.
8352 (default_make_symbol_completion_list_break_on): Delete old
8354 (default_make_symbol_completion_list): Delete.
8355 (default_collect_symbol_completion_matches): New.
8356 (make_symbol_completion_list): Delete.
8357 (collect_symbol_completion_matches): New.
8358 (make_symbol_completion_type): Rename to ...
8359 (collect_symbol_completion_matches_type): ... this. Add
8360 completion_tracker parameter and use it instead of VEC.
8361 (make_file_symbol_completion_list_1): Rename to...
8362 (collect_file_symbol_completion_matches): ... this. Add
8363 completion_tracker parameter and use it instead of VEC.
8364 (make_file_symbol_completion_list): Delete.
8365 (add_filename_to_list): Use completion_list instead of a VEC.
8366 (add_partial_filename_data::list): Now a completion_list.
8367 (make_source_files_completion_list): Work with a completion_list
8369 * symtab.h: Include "completer.h".
8370 (default_make_symbol_completion_list_break_on)
8371 (default_make_symbol_completion_list, make_symbol_completion_list)
8372 (make_symbol_completion_type, make_file_symbol_completion_list)
8373 (make_source_files_completion_list): Delete.
8374 (default_collect_symbol_completion_matches_break_on)
8375 (default_collect_symbol_completion_matches)
8376 (collect_symbol_completion_matches)
8377 (collect_symbol_completion_matches_type)
8378 (collect_file_symbol_completion_matches)
8379 (make_source_files_completion_list): New.
8380 * top.c (init_main): Don't install a rl_completion_entry_function
8381 hook. Install a rl_attempted_completion_function hook instead.
8382 * tui/tui-layout.c (layout_completer): Adjust to work with a
8384 * tui/tui-regs.c (tui_reggroup_completer):
8385 * tui/tui-win.c (window_name_completer, focus_completer)
8386 (winheight_completer): Adjust to work with a completion_tracker.
8387 * value.c: Include "completer.h".
8388 (complete_internalvar): Adjust to work with a completion_tracker.
8389 * value.h (complete_internalvar): Likewise.
8391 2017-07-17 Pedro Alves <palves@redhat.com>
8393 * cli/cli-decode.c (set_cmd_completer_handle_brkchars): Adjust to
8395 * cli/cli-decode.h (struct cmd_list_element) <completer>: Move
8396 comments to completer_ftype's declaration.
8397 <completer_handle_brkchars>: Change type to
8398 completer_handle_brkchars_ftype.
8399 * command.h (completer_ftype): Add describing comment and give
8400 names to parameters.
8401 (completer_ftype_void): Rename to ...
8402 (completer_handle_brkchars_ftype) ... this. Add describing comment.
8403 (set_cmd_completer_handle_brkchars): Adjust.
8404 * completer.c (filename_completer_handle_brkchars): New function.
8405 (complete_line_internal_normal_command): New function, factored
8407 (complete_line_internal): ... here.
8408 (command_completer_handle_brkchars)
8409 (default_completer_handle_brkchars)
8410 (completer_handle_brkchars_func_for_completer): New functions.
8411 * completer.h (set_gdb_completion_word_break_characters): Delete
8413 (completer_handle_brkchars_func_for_completer): New declaration.
8414 * python/py-cmd.c (cmdpy_completer_handle_brkchars): Adjust to use
8415 completer_handle_brkchars_func_for_completer.
8417 2017-07-17 Pedro Alves <palves@redhat.com>
8419 * completer.c (symbol_completer): New function, based on
8420 make_symbol_completion_list_fn.
8421 * completer.h (symbol_completer): New declaration.
8422 * guile/scm-cmd.c (cmdscm_completers): Adjust.
8423 * python/py-cmd.c (completers): Adjust.
8424 * symtab.c (make_symbol_completion_list_fn): Delete.
8425 * symtab.h (make_symbol_completion_list_fn): Delete.
8426 * cli/cli-decode.c (add_cmd): Adjust.
8428 2017-07-17 Pedro Alves <palves@redhat.com>
8430 * Makefile.in (COMMON_OBS): Add filename-seen-cache.o.
8431 * dwarf2read.c: Include "filename-seen-cache.h".
8432 * dwarf2read.c (dwarf2_per_objfile) <filenames_cache>: New field.
8433 (dw2_map_symbol_filenames): Build and use a filenames_seen_cache.
8434 * filename-seen-cache.c: New file.
8435 * filename-seen-cache.h: New file.
8436 * symtab.c: Include "filename-seen-cache.h".
8437 (struct filename_seen_cache, INITIAL_FILENAME_SEEN_CACHE_SIZE)
8438 (create_filename_seen_cache, clear_filename_seen_cache)
8439 (delete_filename_seen_cache, filename_seen): Delete, parts moved
8440 to filename-seen-cache.h/filename-seen-cache.c.
8441 (output_source_filename, sources_info)
8442 (maybe_add_partial_symtab_filename)
8443 (make_source_files_completion_list): Adjust to use
8444 filename_seen_cache.
8446 2017-07-17 Pedro Alves <palves@redhat.com>
8448 * dwarf2read.c (dwarf2_per_objfile): In-class initialize all
8450 (dwarf2_per_objfile::dwarf2_per_objfile(objfile*, const
8451 dwarf2_debug_sections*)): New.
8452 (dwarf2_per_objfile::dwarf2_per_objfile(const
8453 dwarf2_per_objfile&)): Declare as deleted.
8454 (dwarf2_per_objfile::operator=): Declare as deleted.
8455 (dwarf2_per_objfile::dwarf2_per_objfile)
8456 (dwarf2_per_objfile::~dwarf2_per_objfile)
8457 (dwarf2_per_objfile::free_cached_comp_units): New.
8458 (dwarf2_has_info): dwarf2_per_objfile initialization code moved to
8459 ctor. Call dwarf2_per_objfile's ctor manually.
8460 (dwarf2_locate_sections): Deleted/refactored as ...
8461 (dwarf2_per_objfile::locate_sections): ... this new method.
8462 (free_cached_comp_units): Defer to
8463 dwarf2_per_objfile::free_cached_comp_units.
8464 (dwarf2_free_objfile): Call dwarf2_per_objfile's dtor manually.
8466 2017-07-14 Tom Tromey <tom@tromey.com>
8469 * rust-exp.y (convert_ast_to_expression): Add "want_type"
8471 <UNOP_SIZEOF>: Split into separate case.
8472 <UNOP_VAR_VALUE>: Handle want_type. Add error case.
8474 2017-07-14 Tom Tromey <tom@tromey.com>
8477 * symtab.c (symbol_matches_domain): Add language_rust to special
8479 * rust-exp.y (convert_ast_to_expression) <OP_VAR_VALUE>: Don't
8480 treat LOC_TYPEDEF symbols as variables.
8482 2017-07-14 Pedro Alves <palves@redhat.com>
8484 * symtab.c (make_file_symbol_completion_list_1): Iterate over
8485 symtabs matching all symtabs with SRCFILE as file name instead of
8486 only considering the first hit, with lookup_symtab.
8488 2017-07-14 Simon Marchi <simon.marchi@ericsson.com>
8490 * ax-gdb.c (gen_aggregate_elt_ref): Remove operand_name and
8491 operator_name parameters.
8492 (gen_expr): Update function call.
8494 2017-07-14 Simon Marchi <simon.marchi@ericsson.com>
8496 * dwarf2loc.h (dwarf2_compile_expr_to_ax): Remove gdbarch
8498 * symtab.h (struct symbol_computed_ops::tracepoint_var_ref):
8500 * dwarf2loc.c (dwarf2_compile_expr_to_ax): Remove gdbarch
8501 parameter, use agent_expr::gdbarch instead, update function
8503 (locexpr_tracepoint_var_ref): Likewise.
8504 (loclist_tracepoint_var_ref): Likewise.
8505 * ax-gdb.c (gen_trace_static_fields): Likewise.
8506 (gen_traced_pop): Likewise.
8507 (gen_frame_args_address): Likewise.
8508 (gen_frame_locals_address): Likewise.
8509 (gen_var_ref): Likewise.
8510 (gen_struct_ref_recursive): Likewise.
8511 (gen_static_field): Likewise.
8512 (gen_maybe_namespace_elt): Likewise.
8513 (gen_expr): Likewise.
8514 (gen_trace_for_var): Likewise.
8515 (gen_trace_for_expr): Likewise.
8516 (gen_trace_for_return_address): Likewise.
8518 2017-07-14 Simon Marchi <simon.marchi@ericsson.com>
8520 * ax-gdb.c (gen_deref, gen_address_of): Remove unused ax
8522 (gen_struct_ref, gen_expr, gen_expr_binop_rest): Update call.
8524 2017-07-14 Simon Marchi <simon.marchi@ericsson.com>
8526 * ax-gdb.c (gen_usual_unary): Remove exp parameter, get gdbarch
8527 from ax, update calls.
8528 (gen_usual_arithmetic): Likewise.
8529 (gen_integral_promotions): Likewise.
8530 (gen_bitfield_ref): Likewise.
8531 (gen_primitive_field): Likewise.
8532 (gen_struct_ref_recursive): Likewise.
8533 (gen_struct_ref): Likewise.
8534 (gen_maybe_namespace_elt): Likewise.
8535 (gen_struct_elt_for_reference): Likewise.
8536 (gen_namespace_elt): Likewise.
8537 (gen_aggregate_elt_ref): Likewise.
8538 (gen_expr): Get gdbarch from ax, update calls.
8539 (gen_expr_binop_rest): Likewise.
8541 2017-07-13 Pedro Alves <palves@redhat.com>
8543 * amd64-darwin-tdep.c (x86_darwin_init_abi_64): Pass tdesc_amd64
8545 * amd64-dicos-tdep.c (amd64_dicos_init_abi):
8546 * amd64-fbsd-tdep.c (amd64fbsd_init_abi):
8547 * amd64-linux-tdep.c (amd64_linux_init_abi): Pass
8548 tdesc_amd64_linux as default tdesc. Get final tdesc from the
8550 (amd64_x32_linux_init_abi): Pass tdesc_x32_linux as default tdesc.
8551 Get final tdesc from the tdep.
8552 * amd64-nbsd-tdep.c (amd64nbsd_init_abi): Pass tdesc_amd64 as
8554 * amd64-obsd-tdep.c (amd64obsd_init_abi): Likewise.
8555 * amd64-sol2-tdep.c (amd64_sol2_init_abi): Likewise.
8556 * amd64-tdep.c (amd64_init_abi): Add 'default_tdesc' parameter.
8557 Use it as default tdesc.
8558 (amd64_x32_init_abi): Add 'default_tdesc' parameter, and pass it
8559 down to amd_init_abi. No longer handle fallback tdesc here.
8560 * amd64-tdep.h (tdesc_x32): Declare.
8561 (amd64_init_abi, amd64_x32_init_abi): Add 'default_tdesc'
8563 * amd64-windows-tdep.c (amd64_windows_init_abi): Pass tdesc_amd64
8566 2017-07-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
8568 * s390-linux-tdep.c (s390_process_record): Add support for
8569 instructions new in arch12.
8571 2017-07-11 John Baldwin <jhb@FreeBSD.org>
8573 * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers): Use
8574 PT_GETFSBASE and PT_GETGSBASE.
8575 (amd64bsd_store_inferior_registers): Use PT_SETFSBASE and
8578 2017-07-11 John Baldwin <jhb@FreeBSD.org>
8580 * features/Makefile (amd64.dat, amd64-avx.dat, amd64-mpx.dat)
8581 (amd64-avx-mpx.dat, amd64-avx-avx512.dat)
8582 (amd64-avx-mpx-avx512-pku.dat): Add i386/64bit-segments.xml in
8584 * features/i386/amd64-avx-avx512.xml: Add 64bit-segments.xml.
8585 * features/i386/amd64-avx-mpx-avx512-pku.xml: Add 64bit-segments.xml.
8586 * features/i386/amd64-avx-mpx.xml: Add 64bit-segments.xml.
8587 * features/i386/amd64-avx.xml: Add 64bit-segments.xml.
8588 * features/i386/amd64-mpx.xml: Add 64bit-segments.xml.
8589 * features/i386/amd64.xml: Add 64bit-segments.xml.
8590 * features/i386/amd64-avx-avx512.c: Regenerated.
8591 * features/i386/amd64-avx-mpx-avx512-pku.c: Regenerated.
8592 * features/i386/amd64-avx-mpx.c: Regenerated.
8593 * features/i386/amd64-avx.c: Regenerated.
8594 * features/i386/amd64-mpx.c: Regenerated.
8595 * features/i386/amd64.c: Regenerated.
8596 * regformats/i386/amd64-avx-avx512.dat: Regenerated.
8597 * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Regenerated.
8598 * regformats/i386/amd64-avx-mpx.dat: Regenerated.
8599 * regformats/i386/amd64-avx.dat: Regenerated.
8600 * regformats/i386/amd64-mpx.dat: Regenerated.
8601 * regformats/i386/amd64.dat: Regenerated.
8603 2017-07-10 Yao Qi <yao.qi@linaro.org>
8605 * features/i386/amd64-avx-avx512-linux.c: Re-generated.
8606 * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Re-generated.
8608 2017-07-10 Anton Kolesov <Anton.Kolesov@synopsys.com>
8610 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add setenv and
8612 * gnulib/aclocal.m4: Regenerate.
8613 * gnulib/config.in: Regenerate.
8614 * gnulib/configure: Regenerate.
8615 * gnulib/import/Makefile.am: Regenerate.
8616 * gnulib/import/Makefile.in: Regenerate.
8617 * gnulib/import/m4/gnulib-cache.m4: Regenerate.
8618 * gnulib/import/m4/gnulib-comp.m4: Regenerate.
8619 * gnulib/import/m4/environ.m4: New file.
8620 * gnulib/import/m4/setenv.m4: New file.
8621 * gnulib/import/setenv.c: New file.
8622 * gnulib/import/unsetenv.c: New file.
8624 2017-07-09 Simon Marchi <simon.marchi@ericsson.com>
8626 * compile/compile-loc2c.c (do_compile_dwarf_expr_to_c): Read
8627 address when op is DW_OP_addr.
8629 2017-07-09 Tom Tromey <tom@tromey.com>
8631 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Reverse size
8632 check and apply to outer type.
8634 2017-07-07 John Baldwin <jhb@FreeBSD.org>
8636 * fbsd-tdep.c (LWPINFO_OFFSET, LWPINFO_PL_FLAGS)
8637 (LWPINFO64_PL_SIGINFO, LWPINFO32_PL_SIGINFO, PL_FLAG_SI)
8638 (SIZE64_SIGINFO_T, SIZE32_SIGINFO_T, fbsd_core_xfer_siginfo): New.
8639 (fbsd_init_abi): Install gdbarch "core_xfer_siginfo" method.
8641 2017-07-07 John Baldwin <jhb@FreeBSD.org>
8643 * fbsd-tdep.c (fbsd_core_thread_name): Use thread_section_name.
8645 2017-07-07 John Baldwin <jhb@FreeBSD.org>
8647 * corelow.c (get_core_siginfo): Remove.
8648 (core_xfer_partial): Use the gdbarch "core_xfer_siginfo" method
8649 instead of get_core_siginfo.
8650 * gdbarch.sh (core_xfer_siginfo): New gdbarch callback.
8651 * gdbarch.h: Re-generate.
8652 * gdbarch.c: Re-generate.
8653 * linux-tdep.c (linux_core_xfer_siginfo): New.
8654 (linux_init_abi): Install gdbarch "core_xfer_siginfo" method.
8656 2017-07-07 John Baldwin <jhb@FreeBSD.org>
8658 * corelow.c (thread_section_name): Move to ...
8659 * gdbcore.h (thread_section_name): ... here.
8661 2017-07-07 John Baldwin <jhb@FreeBSD.org>
8663 * fbsd-nat.c [PT_LWPINFO && __LP64__] (union sigval32)
8664 (struct siginfo32): New.
8665 [PT_LWPINFO] (fbsd_siginfo_size, fbsd_convert_siginfo): New.
8666 (fbsd_xfer_partial) [PT_LWPINFO]: Handle TARGET_OBJECT_SIGNAL_INFO
8667 via ptrace(PT_LWPINFO).
8669 2017-07-07 John Baldwin <jhb@FreeBSD.org>
8671 * fbsd-tdep.c (fbsd_gdbarch_data_handle, struct fbsd_gdbarch_data)
8672 (init_fbsd_gdbarch_data, get_fbsd_gdbarch_data)
8673 (fbsd_get_siginfo_type): New.
8674 (fbsd_init_abi): Install gdbarch "get_siginfo_type" method.
8675 (_initialize_fbsd_tdep): New.
8677 2017-07-06 David Blaikie <dblaikie@gmail.com>
8679 * dwarf2read.c (struct dwo_file): Use a htab of dwo_unit* (rather than
8680 a singular dwo_unit*) to support multiple CUs in the same way that
8681 multiple TUs are supported.
8682 (create_cus_hash_table): Replace create_dwo_cu with a function for
8683 parsing multiple CUs from a DWO file.
8684 (open_and_init_dwo_file): Use create_cus_hash_table rather than
8686 (lookup_dwo_cutu): Lookup CU in the hash table in the dwo_file with
8687 htab_find, rather than comparing the signature to a singleton CU in
8690 2017-07-06 Pedro Alves <palves@redhat.com>
8692 * python/py-unwind.c (pyuw_dealloc_cache): Fix for loop condition.
8694 2017-07-04 Pedro Alves <palves@redhat.com>
8696 * gdbtypes.c (recursive_dump_type): Don't reference TYPE_STATIC.
8697 * gdbtypes.h (TYPE_STATIC): Delete.
8698 (struct fn_field) <is_public, is_abstract, is_static, is_final,
8699 is_synchronized, is_native>: Delete.
8701 (TYPE_FN_FIELD_PUBLIC, TYPE_FN_FIELD_STATIC, TYPE_FN_FIELD_FINAL)
8702 (TYPE_FN_FIELD_SYNCHRONIZED, TYPE_FN_FIELD_NATIVE)
8703 (TYPE_FN_FIELD_ABSTRACT): Delete.
8705 2017-07-03 Simon Marchi <simon.marchi@ericsson.com>
8707 * buffer.h (buffer_finish): Fix spelling mistakes.
8709 2017-07-01 Eli Zaretskii <eliz@gnu.org>
8711 * .dir-locals.el: Automatically switch to C-style comments in
8712 versions of Emacs that support the feature.
8714 2017-06-30 Sergio Durigan Junior <sergiodj@redhat.com>
8715 Pedro Alves <palves@redhat.com>
8718 * cli/cli-script.c (command_name_equals_not_inline): Remove function.
8719 (process_next_line): New variable 'inline_cmd'.
8720 Adjust 'if' clauses for "python", "compile" and "guile" to use
8721 'command_name_equals' and check for '!inline_cmd'.
8723 2017-06-30 Sergio Durigan Junior <sergiodj@redhat.com>
8726 * cli/cli-script.c (command_name_equals_not_inline): New function.
8727 (process_next_line): Adjust 'if' clauses for "python", "compile"
8728 and "guile" to use command_name_equals_not_inline.
8730 2017-06-29 Pedro Alves <palves@redhat.com>
8732 * completer.c (expression_completer): Call
8733 linespec_location_completer instead of location_completer.
8735 2017-06-29 Pedro Alves <palves@redhat.com>
8737 * completer.c (expression_completer): Remove code that recomputes
8740 2017-06-29 Yao Qi <yao.qi@linaro.org>
8742 * regformats/regdat.sh: Generate code with
8743 "ifndef IN_PROCESS_AGENT".
8745 2017-06-28 Pedro Alves <palves@redhat.com>
8747 * command.h: Include "common/scoped_restore.h".
8749 2017-06-28 Yao Qi <yao.qi@linaro.org>
8751 * mi/mi-cmd-break.c (mi_argv_to_format): Use obstack_grow_str
8752 instead of obstack_grow.
8754 2017-06-28 Doug Gilmore <Doug.Gilmore@imgtec.com>
8757 * symfile.c (reread_symbols): Call objfiles_changed just before
8760 2017-06-27 Pedro Alves <palves@redhat.com>
8762 * symtab.c (COMPLETION_LIST_ADD_SYMBOL)
8763 (MCOMPLETION_LIST_ADD_SYMBOL): Delete macros, replace with ...
8764 (completion_list_add_symbol, completion_list_add_msymbol):
8765 ... these new functions.
8766 (add_symtab_completions)
8767 (default_make_symbol_completion_list_break_on_1): Adjust.
8769 2017-06-27 Pedro Alves <palves@redhat.com>
8771 * objfiles.c (get_objfile_bfd_data): Call bfd_alloc instead of
8772 bfd_zalloc. Call objfile_per_bfd_storage's ctor.
8773 (free_objfile_per_bfd_storage): Call objfile_per_bfd_storage's
8775 * objfiles.h (objfile_per_bfd_storage): Add ctor. Make
8776 'storage_obstack' field an auto_obstack. In-class initialize all
8777 non-bitfield fields. Make minsyms_read bool.
8778 * symfile.c (read_symbols): Adjust.
8780 2017-06-27 Alan Hayward <alan.hayward@arm.com>
8782 * remote-sim.c (gdbsim_fetch_register): Use byte_vector.
8783 (gdbsim_store_register): Likewise.
8785 2017-06-27 Pedro Alves <palves@redhat.com>
8787 * c-exp.y (name_obstack): Now an auto_obstack.
8788 (yylex): Use auto_obstack::clear.
8789 (c_parse): Use auto_obstack::clear instead of reinitializing and
8790 freeing the obstack.
8791 * c-lang.c (evaluate_subexp_c): Use auto_obstack.
8792 * d-exp.y (name_obstack): Now an auto_obstack.
8793 (yylex): Use auto_obstack::clear.
8794 (d_parse): Use auto_obstack::clear instead of reinitializing and
8795 freeing the obstack.
8796 * dwarf2loc.c (fetch_const_value_from_synthetic_pointer): Use
8798 * dwarf2read.c (create_addrmap_from_index)
8799 (dwarf2_build_psymtabs_hard)
8800 (update_enumeration_type_from_children): Likewise.
8801 * gdb_obstack.h (auto_obstack): New type.
8802 * go-exp.y (name_obstack): Now an auto_obstack.
8803 (build_packaged_name): Use auto_obstack::clear.
8804 (go_parse): Use auto_obstack::clear instead of reinitializing and
8805 freeing the obstack.
8806 * linux-tdep.c (linux_make_mappings_corefile_notes): Use
8808 * printcmd.c (printf_wide_c_string, ui_printf): Use auto_obstack.
8809 * rust-exp.y (work_obstack): Now an auto_obstack.
8810 (rust_parse, rust_lex_tests): Use auto_obstack::clear instead of
8811 reinitializing and freeing the obstack.
8812 * utils.c (do_obstack_free, make_cleanup_obstack_free): Delete.
8813 (host_char_to_target): Use auto_obstack.
8814 * utils.h (make_cleanup_obstack_free): Delete declaration.
8815 * valprint.c (generic_emit_char, generic_printstr): Use
8818 2017-06-27 Simon Marchi <simon.marchi@ericsson.com>
8820 * darwin-nat.c (darwin_check_new_threads): Don't handle dummy
8822 (darwin_init_thread_list): Don't update dummy thread.
8823 (darwin_create_inferior, darwin_attach): Don't add a dummy thread.
8825 2017-06-26 Simon Marchi <simon.marchi@ericsson.com>
8827 * record-full.c (netorder16): Remove.
8829 2017-06-26 Simon Marchi <simon.marchi@ericsson.com>
8831 * common/diagnostics.h: Define macros for GCC.
8832 (DIAGNOSTIC_IGNORE_UNUSED_FUNCTION): New macro.
8833 * common/vec.h: Include diagnostics.h.
8834 (DIAGNOSTIC_IGNORE_UNUSED_VEC_FUNCTION): New macro.
8835 (DEF_VEC_I, DEF_VEC_P, DEF_VEC_O): Ignore -Wunused-function
8838 2017-06-26 Simon Marchi <simon.marchi@ericsson.com>
8840 * common/diagnostics.h (DIAGNOSTIC_IGNORE_DEPRECATED_REGISTER):
8842 * ada-lex.l: Ignore deprecated register warnings.
8844 2017-06-25 Simon Marchi <simon.marchi@ericsson.com>
8846 * main.c (get_init_files): Replace "SYSTEM_GDBINIT +
8847 datadir_len" with "&SYSTEM_GDBINIT[datadir_len]".
8849 2017-06-25 Simon Marchi <simon.marchi@ericsson.com>
8851 * dtrace-probe.c (dtrace_process_dof_probe): Put semi-colon on
8854 2017-06-25 Simon Marchi <simon.marchi@ericsson.com>
8856 * nat/x86-dregs.c (x86_show_dr): Print registers one per line.
8858 2017-06-23 Alan Hayward <alan.hayward@arm.com>
8860 * xtensa-tdep.c (XTENSA_MAX_REGISTER_SIZE): Add.
8861 (xtensa_register_write_masked): Use XTENSA_MAX_REGISTER_SIZE.
8862 (xtensa_register_read_masked): Likewise.
8864 2017-06-22 Sergio Durigan Junior <sergiodj@redhat.com>
8866 * common/environ.c (gdb_environ::unset): Update comment.
8868 2017-06-22 Alan Hayward <alan.hayward@arm.com>
8870 * python/py-unwind.c (pyuw_sniffer): Allocate space for
8873 2017-06-22 Alan Hayward <alan.hayward@arm.com>
8875 * record-full.c (record_full_exec_insn): Use byte_vector.
8877 2017-06-22 Yao Qi <yao.qi@linaro.org>
8879 * regformats/i386/amd64-avx-mpx-avx512-pku-linux.dat: Regenerated.
8880 * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Regenerated.
8882 2017-06-22 Alan Hayward <alan.hayward@arm.com>
8884 * remote.c (cached_reg): Move from here...
8885 * regcache.h (cached_reg): ...to here.
8886 * python/py-unwind.c (struct reg_info): Remove.
8887 (cached_frame_info): Use cached_reg_t.
8888 (pyuw_prev_register): Likewise.
8889 (pyuw_sniffer): Use cached_reg_t and allocate registers.
8890 (pyuw_dealloc_cache): Free all registers.
8892 2017-06-22 Pedro Alves <palves@redhat.com>
8893 Simon Marchi <simon.marchi@ericsson.com>
8895 * unittests/environ-selftests.c (run_tests): Ignore -Wself-move
8897 * common/diagnostics.h: New file.
8899 2017-06-22 Pedro Alves <palves@redhat.com>
8901 * common/agent.h: Add include guards.
8903 2017-06-21 Simon Marchi <simon.marchi@ericsson.com>
8905 * target.h (struct target_ops) <to_xfer_partial>: Update doc to
8906 talk about addressable units instead of bytes.
8908 2017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
8910 * common/environ.c (gdb_environ::unset): Use '::iterator' instead
8911 of '::const_iterator'.
8913 2017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
8915 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
8916 'unittests/environ-selftests.c'.
8917 (SUBDIR_UNITTESTS_OBS): Add 'environ-selftests.o'.
8918 * charset.c (find_charset_names): Declare object 'iconv_env'.
8919 Update code to use 'iconv_env' object. Remove call to
8921 * common/environ.c: Include <utility>.
8922 (make_environ): Delete function.
8923 (free_environ): Delete function.
8924 (gdb_environ::clear): New function.
8925 (gdb_environ::operator=): New function.
8926 (gdb_environ::get): Likewise.
8927 (environ_vector): Delete function.
8928 (set_in_environ): Delete function.
8929 (gdb_environ::set): New function.
8930 (unset_in_environ): Delete function.
8931 (gdb_environ::unset): New function.
8932 (gdb_environ::envp): Likewise.
8933 * common/environ.h: Include <vector>.
8934 (struct gdb_environ): Delete; transform into...
8935 (class gdb_environ): ... this class.
8936 (free_environ): Delete prototype.
8937 (init_environ, get_in_environ, set_in_environ, unset_in_environ,
8938 environ_vector): Likewise.
8939 * infcmd.c (run_command_1): Update code to call
8940 'envp' from 'gdb_environ' class.
8941 (environment_info): Update code to call methods from 'gdb_environ'
8943 (unset_environment_command): Likewise.
8944 (path_info): Likewise.
8945 (path_command): Likewise.
8946 * inferior.c (inferior::~inferior): Delete call to 'free_environ'.
8947 (inferior::inferior): Initialize 'environment' using the host's
8949 * inferior.h: Remove forward declaration of 'struct gdb_environ'.
8950 Include "environ.h".
8951 (class inferior) <environment>: Change type from 'struct
8952 gdb_environ' to 'gdb_environ'.
8953 * mi/mi-cmd-env.c (mi_cmd_env_path): Update code to call
8954 methods from 'gdb_environ' class.
8955 * solib.c (solib_find_1): Likewise
8956 * unittests/environ-selftests.c: New file.
8958 2017-06-20 Yao Qi <yao.qi@linaro.org>
8960 * features/i386/i386-linux.xml: Exchange the order of including
8961 32bit-linux.xml and 32bit-sse.xml.
8962 * features/i386/i386-linux.c: Regenerated.
8964 2017-06-20 Yao Qi <yao.qi@linaro.org>
8966 * target-descriptions.c (tdesc_reg): Add ctor, dtor.
8967 Delete copy ctor and assignment operator.
8968 (tdesc_type): Likewise.
8969 (tdesc_feature): Likewise.
8970 (tdesc_free_reg): Remove.
8971 (tdesc_create_reg): Use new.
8972 (tdesc_free_type): Remove.
8973 (tdesc_create_vector): Use new.
8974 (tdesc_create_union): Likewise.
8975 (tdesc_create_flags): Likewise.
8976 (tdesc_create_enum): Likewise.
8977 (tdesc_free_feature): Delete.
8978 (free_target_description): Use delete.
8980 2017-06-19 John Baldwin <jhb@FreeBSD.org>
8982 * mips-tdep.c (print_gp_register_row): Don't error for unavailable
8985 2017-06-19 Pedro Alves <palves@redhat.com>
8987 * dwarf2read.c (write_psymtabs_to_index): Construct file_closer
8988 after gdb::unlinker.
8990 2017-06-19 Sergio Durigan Junior <sergiodj@redhat.com>
8992 * mi/mi-cm-env.c (_initialize_mi_cmd_env): Use getenv instead of
8993 gdb_environ to access an environment variable.
8995 2017-06-18 Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
8997 * nat/linux-ptrace.c (linux_fork_to_function): Add cast to
9000 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
9002 * nat/fork-inferior.h (trace_start_error): Add ATTRIBUTE_PRINTF.
9004 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
9006 * configure: Re-generate.
9007 * warning.m4 (build_warnings): Add -Wno-mismatched-tags.
9009 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
9011 * configure: Re-generate.
9012 * warning.m4: Pass -Werror to compiler when checking for
9013 supported warning flags.
9015 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
9017 * Makefile.in (COMPILE.pre): Add "-x c++".
9019 2017-06-16 Alan Hayward <alan.hayward@arm.com>
9020 Pedro Alves <palves@redhat.com>
9021 Yao Qi <yao.qi@linaro.org>
9023 * defs.h (RequireLongest): New.
9024 (extract_integer): Declare function template.
9025 (extract_signed_integer): Remove the declaration, but define it
9027 (extract_unsigned_integer): Likewise.
9028 (store_integer): Declare function template.
9029 (store_signed_integer): Remove the declaration, but define it
9031 (store_unsigned_integer): Likewise.
9032 * findvar.c (extract_integer): New function template.
9033 (extract_signed_integer): Remove.
9034 (extract_unsigned_integer): Remove.
9035 (extract_integer<LONGEST>, extract_integer<ULONGEST>): Explicit
9037 (store_integer): New function template.
9038 (store_signed_integer): Remove.
9039 (store_unsigned_integer): Remove.
9040 (store_integer): Explicit instantiations.
9041 * regcache.c (regcache_raw_read_signed): Update.
9042 (regcache::raw_read): New function.
9043 (regcache::raw_read_signed): Remove.
9044 (regcache::raw_read_unsigned): Remove.
9045 (regcache_raw_read_unsigned): Update.
9046 (regcache_raw_write_unsigned): Update.
9047 (regcache::raw_write_signed): Remove.
9048 (regcache::raw_write): New function.
9049 (regcache_cooked_read_signed): Update.
9050 (regcache::raw_write_unsigned): Remove.
9051 (regcache::cooked_read_signed): Remove.
9052 (regcache_cooked_read_unsigned): Update.
9053 (regcache::cooked_read_unsigned): Remove.
9054 (regcache_cooked_write_signed): Update.
9055 (regcache_cooked_write_unsigned): Update.
9056 * regcache.h (regcache) <raw_read_signed>: Remove.
9057 <raw_write_signed, raw_read_unsigned, raw_write_unsigned>: Remove.
9058 <raw_read, raw_write>: New.
9059 <cooked_read_signed, cooked_write_signed>: Remove.
9060 <cooked_write_unsigned, cooked_read_unsigned>: Remove.
9061 <cooked_read, cooked_write>: New.
9062 * sh64-tdep.c (sh64_pseudo_register_read): Update.
9063 (sh64_pseudo_register_write): Update.
9065 2017-06-16 Anton Kolesov <anton.kolesov@synopsys.com>
9067 * arc-tdep.c (arc_disassembler_options): New variable.
9068 (arc_gdbarch_init): Set and use it. Use arc_delayed_print_insn instead
9069 of default_print_insn.
9070 (arc_delayed_print_insn): Set info->section when needed,
9071 use default_print_insn to retrieve a disassembler.
9073 2017-06-14 Sergio Durigan Junior <sergiodj@redhat.com>
9076 * infcmd.c (_initialize_infcmd): Expand "help run" documentation
9077 to mention $SHELL and startup-with-shell.
9079 2017-06-14 Max Filippov <jcmvbkbc@gmail.com>
9081 * MAINTAINERS: Move Maxim Grigoriev to the Past Maintainers.
9083 2017-06-14 Yao Qi <yao.qi@linaro.org>
9085 * aarch64-tdep.c (aarch64_gdb_print_insn): Call
9086 default_print_insn instead of print_insn_aarch64.
9087 * arm-tdep.c (gdb_print_insn_arm): Call
9088 default_print_insn instead of print_insn_big_arm
9089 and print_insn_little_arm.
9090 * i386-tdep.c (i386_print_insn): Call default_print_insn
9091 instead of print_insn_i386.
9092 * ia64-tdep.c (ia64_print_insn): Call
9093 default_print_insn instead of print_insn_ia64.
9094 * mips-tdep.c (gdb_print_insn_mips): Call
9095 default_print_insn instead of print_insn_big_mips
9096 and print_insn_little_mips.
9097 * spu-tdep.c (gdb_print_insn_spu): Call default_print_insn
9098 instead of print_insn_spu.
9100 2017-06-14 Pedro Alves <palves@redhat.com>
9102 * ada-lang.c: Include "common/byte-vector.h".
9103 (ada_value_primitive_packed_val): Use gdb::byte_vector.
9104 * charset.c (wchar_iterator::iterate): Resize the vector instead
9106 * common/byte-vector.h: Include "common/def-vector.h".
9107 (wchar_iterator::m_out): Now a gdb::def_vector<gdb_wchar_t>.
9108 * cli/cli-dump.c: Include "common/byte-vector.h".
9109 (dump_memory_to_file, restore_binary_file): Use gdb::byte_vector.
9110 * common/byte-vector.h: New file.
9111 * common/def-vector.h: New file.
9112 * common/default-init-alloc.h: New file.
9113 * dwarf2loc.c: Include "common/byte-vector.h".
9114 (rw_pieced_value): Use gdb::byte_vector, and resize the vector
9115 instead of reserving it.
9116 * dwarf2read.c: Include "common/byte-vector.h".
9117 (data_buf::m_vec): Now a gdb::byte_vector.
9118 * gdb_regex.c: Include "common/def-vector.h".
9119 (compiled_regex::compiled_regex): Use gdb::def_vector<char>.
9120 * mi/mi-main.c: Include "common/byte-vector.h".
9121 (mi_cmd_data_read_memory): Use gdb::byte_vector.
9122 * printcmd.c: Include "common/byte-vector.h".
9123 (print_scalar_formatted): Use gdb::byte_vector.
9124 * valprint.c: Include "common/byte-vector.h".
9125 (maybe_negate_by_bytes, print_decimal_chars): Use
9128 2017-06-13 Simon Marchi <simon.marchi@ericsson.com>
9130 * darwin-nat.c: Include "nat/fork-inferior.h".
9132 2017-06-13 Simon Marchi <simon.marchi@ericsson.com>
9134 * configure.nat: Factor out Darwin bits that are not
9135 architecture-specific. Add fork-inferior.o.
9137 2017-06-13 Simon Marchi <simon.marchi@ericsson.com>
9139 * configure.nat: Factor out AIX bits that are not
9140 architecture-specific. Add fork-inferior.o.
9142 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
9144 * dwarf2loc.c (rw_pieced_value): New. Merge logic from...
9145 (read_pieced_value, write_pieced_value): ...here. Reduce to
9146 wrappers that just call rw_pieced_value.
9148 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
9150 * dwarf2loc.c (write_pieced_value): When writing the data for a
9151 memory piece, use write_memory_with_notification instead of
9154 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
9156 * valops.c (read_value_memory): Change embedded_offset to
9157 represent a bit offset instead of a byte offset.
9158 * value.h (read_value_memory): Adjust comment.
9160 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
9162 * dwarf2loc.c (read_pieced_value): Remove unnecessary variables
9163 dest_offset_bits and source_offset_bits.
9164 (write_pieced_value): Likewise.
9166 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
9168 * dwarf2loc.c (read_pieced_value): Respect the piece offset, as
9169 given by DW_OP_bit_piece.
9170 (write_pieced_value): Likewise.
9172 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
9174 * dwarf2loc.c (read_pieced_value): Move the buffer allocation and
9175 some other preparations to the places where sufficient information
9177 (write_pieced_value): Likewise.
9179 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
9181 * dwarf2loc.c (bits_to_bytes): New function.
9182 (read_pieced_value): Fix offset calculations for register pieces
9183 on big-endian targets.
9184 (write_pieced_value): Likewise.
9186 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
9188 * dwarf2loc.c (read_pieced_value): Remove buffer_size variable.
9189 (write_pieced_value): Likewise.
9191 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
9193 * dwarf2loc.c (write_pieced_value): When writing to a bit-field,
9194 transfer the source value's least significant bits, instead of its
9195 lowest-addressed ones. Rename type_len to max_offset.
9196 (read_pieced_value): Mirror above changes to write_pieced_value as
9199 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
9201 * dwarf2loc.c (write_pieced_value): In DWARF_VALUE_MEMORY,
9202 truncate full bytes from dest_offset_bits before using it as an
9203 offset into the buffer.
9205 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
9207 * dwarf2loc.c (write_pieced_value): Include transfer size in
9210 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
9212 * dwarf2loc.c (write_pieced_value): Fix copy/paste error in the
9213 calculation of this_size.
9215 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
9217 * dwarf2loc.c (read_pieced_value): Respect parent value's offset
9218 when targeting a bit-field.
9219 (write_pieced_value): Likewise.
9221 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
9223 * dwarf2loc.c (struct piece_closure) <addr_size>: Remove field.
9224 (allocate_piece_closure): Drop addr_size parameter.
9225 (dwarf2_evaluate_loc_desc_full): Adjust call to
9226 allocate_piece_closure.
9228 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
9231 * dwarf2loc.c (read_pieced_value): Anchor stack value pieces at
9232 the LSB end, independent of endianness.
9234 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
9236 * dwarf2loc.c (write_pieced_value): Fix order of calculations for
9239 2017-06-13 Yao Qi <yao.qi@linaro.org>
9241 * mips-linux-nat.c: Move include features/mips*-linux.c to
9243 (_initialize_mips_linux_nat): Move initialize_tdesc_mips* calls
9244 to mips-linux-tdep.c.
9245 * mips-linux-tdep.c: Include features/mips*-linux.c
9246 (_initialize_mips_linux_tdep): Call initialize_tdesc_mips*
9248 * mips-linux-tdep.h (tdesc_mips_linux): Declare.
9249 (tdesc_mips_dsp_linux, tdesc_mips64_linux): Declare.
9250 (tdesc_mips64_dsp_linux): Declare.
9252 2017-06-12 Tom Tromey <tom@tromey.com>
9254 * valprint.h (val_print_type_code_int): Remove.
9255 * valprint.c (generic_val_print_int): Always call
9256 val_print_scalar_formatted.
9257 (val_print_type_code_int): Remove.
9258 * printcmd.c (print_scalar_formatted): Handle options->format==0.
9259 * f-valprint.c (f_val_print): Use val_print_scalar_formatted.
9260 * c-valprint.c (c_val_print_int): Use val_print_scalar_formatted.
9261 * ada-valprint.c (ada_val_print_num): Use
9262 val_print_scalar_formatted.
9264 2017-06-12 Tom Tromey <tom@tromey.com>
9266 * printcmd.c (print_scalar_formatted): Unify the two switches.
9267 Don't convert scalars to LONGEST.
9269 2017-06-12 Tom Tromey <tom@tromey.com>
9272 * valprint.h (print_decimal_chars): Update.
9273 * valprint.c (maybe_negate_by_bytes): New function.
9274 (print_decimal_chars): Add "is_signed" argument.
9275 * printcmd.c (print_scalar_formatted): Update.
9277 2017-06-12 Tom Tromey <tom@tromey.com>
9280 * valprint.h (print_binary_chars, print_hex_chars): Update.
9281 * valprint.c (val_print_type_code_int): Update.
9282 (print_binary_chars): Add "zero_pad" argument.
9283 (emit_octal_digit): New function.
9284 (print_octal_chars): Don't zero-pad.
9285 (print_decimal_chars): Likewise.
9286 (print_hex_chars): Add "zero_pad" argument.
9287 * sh64-tdep.c (sh64_do_fp_register): Update.
9288 * regcache.c (regcache::dump): Update.
9289 * printcmd.c (print_scalar_formatted): Update.
9290 * infcmd.c (default_print_one_register_info): Update.
9292 2017-06-12 Pedro Alves <palves@redhat.com>
9293 Alan Hayward <alan.hayward@arm.com>
9295 * mips-tdep.c (MAX_MIPS_ABI_REGSIZE): New.
9296 (mips_eabi_push_dummy_call): Rename local 'regsize' to
9297 'abi_regsize'. Rename local array 'valbuf' to 'ref_valbuf', and
9298 use MAX_MIPS_ABI_REGSIZE instead of MAX_REGISTER_SIZE to size it.
9299 Assert that abi_regsize bytes fit in 'ref_valbuf'.
9301 2017-06-12 Pedro Alves <palves@redhat.com>
9303 * dwarf2read.c (mapped_symtab::data): Now a vector of
9304 symtab_index_entry instead of vector of
9305 std::unique_ptr<symtab_index_entry>. All users adjusted to check
9306 whether an element's name is NULL instead of checking whether the
9307 element itself is NULL.
9308 (find_slot): Change return type. Adjust.
9309 (hash_expand, , add_index_entry, uniquify_cu_indices)
9310 (write_hash_table): Adjust.
9312 2017-06-12 Pedro Alves <palves@redhat.com>
9314 * dwarf2read.c (recursively_count_psymbols): New function.
9315 (write_psymtabs_to_index): Call it to compute number of psyms and
9316 pass estimate size of psyms_seen to unordered_set's ctor.
9318 2017-06-12 Pedro Alves <palves@redhat.com>
9320 * dwarf2read.c (write_hash_table): Check if key already exists
9323 2017-06-12 Pedro Alves <palves@redhat.com>
9325 * dwarf2read.c (data_buf::append_space): Rename to...
9326 (data_buf::grow): ... this, and make private. Adjust all callers.
9327 (data_buf::append_uint): New method.
9328 (add_address_entry, write_one_signatured_type)
9329 (write_psymtabs_to_index): Use it.
9331 2017-06-12 Pedro Alves <palves@redhat.com>
9333 * dwarf2read.c (file_write(FILE *, const void *, size_t)): Delete.
9334 (file_write (FILE *, const std::vector<Elem>&)): Delete.
9335 (data_buf::file_write): Call ::fwrite directly.
9337 2017-06-12 Pedro Alves <palves@redhat.com>
9339 * dwarf2read.c (uniquify_cu_indices): Use std::unique and
9342 2017-06-12 Jan Kratochvil <jan.kratochvil@redhat.com>
9344 Code cleanup: C++ify .gdb_index producer.
9345 * dwarf2read.c: Include <unordered_set> and <unordered_map>.
9346 (MAYBE_SWAP) [WORDS_BIGENDIAN]: Cast to offset_type.
9347 (struct strtab_entry, hash_strtab_entry, eq_strtab_entry)
9348 (create_strtab, add_string): Remove.
9349 (file_write, data_buf): New.
9350 (struct symtab_index_entry): Use std::vector for cu_indices.
9351 (struct mapped_symtab): Use std::vector for data.
9352 (hash_symtab_entry, eq_symtab_entry, delete_symtab_entry)
9353 (create_symbol_hash_table, create_mapped_symtab, cleanup_mapped_symtab):
9355 (find_slot): Change return type. Update it to the new data structures.
9356 (hash_expand, add_index_entry): Update it to the new data structures.
9357 (offset_type_compare): Remove.
9358 (uniquify_cu_indices): Update it to the new data structures.
9359 (c_str_view, c_str_view_hasher, vector_hasher): New.
9360 (add_indices_to_cpool): Remove.
9361 (write_hash_table): Update it to the new data structures.
9362 (struct psymtab_cu_index_map, hash_psymtab_cu_index)
9363 (eq_psymtab_cu_index): Remove.
9364 (psym_index_map): New typedef.
9365 (struct addrmap_index_data): Change addr_obstack pointer to data_buf
9366 reference and std::unordered_map for cu_index_htab.
9367 (add_address_entry, add_address_entry_worker, write_address_map)
9368 (write_psymbols): Update it to the new data structures.
9369 (write_obstack): Remove.
9370 (struct signatured_type_index_data): Change types_list to a data_buf
9371 reference and psyms_seen to a std::unordered_set reference.
9372 (write_one_signatured_type, recursively_write_psymbols)
9373 (write_psymtabs_to_index): Update it to the new data structures.
9375 2017-06-11 Simon Marchi <simon.marchi@ericsson.com>
9377 * NEWS (Changes since GDB 8.0): Announce {set,show} debug
9378 separate-debug-file commands.
9379 * symfile.h (separate_debug_file_debug): New global.
9380 * symfile.c (separate_debug_file_debug): New global.
9381 (separate_debug_file_exists, find_separate_debug_file): Add
9383 (_initialize_symfile): Add "set debug separate-debug-file"
9385 * build-id.c (build_id_to_debug_bfd,
9386 find_separate_debug_file_by_buildid): Add debug output.
9388 2017-06-10 Simon Marchi <simon.marchi@polymtl.ca>
9390 * gdbarch.sh (displaced_step_free_closure): Remove.
9391 * gdbarch.h, gdbarch.c: Re-generate.
9392 * aarch64-linux-tdep.c (aarch64_linux_init_abi): Don't set
9393 displaced_step_free_closure.
9394 * amd64-linux-tdep.c (amd64_linux_init_abi_common): Likewise.
9395 * arm-linux-tdep.c (arm_linux_init_abi): Likewise.
9396 * i386-linux-tdep.c (i386_linux_init_abi): Likewise.
9397 * rs6000-aix-tdep.c (rs6000_aix_init_osabi): Likewise.
9398 * rs6000-tdep.c (rs6000_gdbarch_init): Likewise.
9399 * s390-linux-tdep.c (s390_gdbarch_init): Likewise.
9400 * arch-utils.h (simple_displaced_step_free_closure): Remove.
9401 * arch-utils.c (simple_displaced_step_free_closure): Remove.
9402 * infrun.c (displaced_step_clear): Call xfree instead of
9403 gdbarch_displaced_step_free_closure.
9405 2017-06-08 Sergio Durigan Junior <sergiodj@redhat.com>
9407 * common/common-utils.c (stringify_argv): Check for "arg[0] !=
9410 2017-06-08 Alan Hayward <alan.hayward@arm.com>
9412 * mn10300-tdep.c (MN10300_MAX_REGISTER_SIZE): Add.
9413 (mn10300_extract_return_value): Use MN10300_MAX_REGISTER_SIZE.
9414 (mn10300_push_dummy_call): Likewise.
9416 2017-06-08 Alan Hayward <alan.hayward@arm.com>
9418 * mi/mi-main.c (register_changed_p): Use value_contents_eq.
9420 2017-06-08 Alan Hayward <alan.hayward@arm.com>
9422 * mi/mi-main.c (register_changed_p): Use cooked_read_value.
9424 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
9426 * NEWS (Changes since GDB 8.0): Announce that GDBserver is now
9427 able to start inferiors using a shell.
9428 (New remote packets): Announce new packet "QStartupWithShell".
9429 * remote.c: Add PACKET_QStartupWithShell.
9430 (extended_remote_create_inferior): Handle new
9431 PACKET_QStartupWithShell.
9432 (remote_protocol_features) <QStartupWithShell>: New entry for
9433 PACKET_QStartupWithShell.
9434 (_initialize_remote): Call "add_packet_config_cmd" for
9437 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
9438 Pedro Alves <palves@redhat.com>
9440 * Makefile.in (HFILES_NO_SRCDIR): Add "common/common-inferior.h"
9441 and "nat/fork-inferior.h".
9442 * common/common-inferior.h: New file, with contents from
9444 * commom/common-utils.c: Include "common-utils.h".
9445 (stringify_argv): New function.
9446 * common/common-utils.h (stringify_argv): New prototype.
9447 * configure.nat: Add "fork-inferior.o" as a dependency for
9448 "*linux*", "fbsd*" and "nbsd*" hosts.
9449 * corefile.c (get_exec_file): Update comment.
9450 * darwin-nat.c (darwin_ptrace_him): Call "gdb_startup_inferior"
9451 instead of "startup_inferior".
9452 (darwin_create_inferior): Call "add_thread_silent" after
9454 * fork-child.c: Cleanup unnecessary includes.
9455 (SHELL_FILE): Move to "common/common-fork-child.c".
9456 (environ): Likewise.
9457 (exec_wrapper): Initialize.
9458 (get_exec_wrapper): New function.
9459 (breakup_args): Move to "common/common-fork-child.c"; rename to
9460 "breakup_args_for_exec".
9461 (escape_bang_in_quoted_argument): Move to
9462 "common/common-fork-child.c".
9463 (saved_ui): New variable.
9464 (prefork_hook): New function.
9465 (postfork_hook): Likewise.
9466 (postfork_child_hook): Likewise.
9467 (gdb_startup_inferior): Likewise.
9468 (fork_inferior): Move to "common/common-fork-child.c". Update
9469 function to support gdbserver.
9470 (startup_inferior): Likewise.
9471 * gdbcore.h (get_exec_file): Remove declaration.
9472 * gnu-nat.c (gnu_create_inferior): Call "gdb_startup_inferior"
9473 instead of "startup_inferior". Call "add_thread_silent" after
9475 * inf-ptrace.c: Include "nat/fork-inferior.h" and "utils.h".
9476 (inf_ptrace_create_inferior): Call "gdb_startup_inferior"
9477 instead of "startup_inferior". Call "add_thread_silent" after
9479 * inferior.h: Include "common-inferior.h".
9480 (trace_start_error): Move to "common/common-utils.h".
9481 (trace_start_error_with_name): Likewise.
9482 (fork_inferior): Move prototype to "nat/fork-inferior.h".
9483 (startup_inferior): Likewise.
9484 (gdb_startup_inferior): New prototype.
9485 * nat/fork-inferior.c: New file, with contents from "fork-child.c".
9486 * nat/fork-inferior.h: New file.
9487 * procfs.c (procfs_init_inferior): Call "gdb_startup_inferior"
9488 instead of "startup_inferior". Call "add_thread_silent" after
9490 * target.h (target_terminal_init): Move prototype to
9492 (target_terminal_inferior): Likewise.
9493 (target_terminal_ours): Likewise.
9494 * target/target.h (target_terminal_init): New prototype, moved
9496 (target_terminal_inferior): Likewise.
9497 (target_terminal_ours): Likewise.
9498 * utils.c (gdb_flush_out_err): New function.
9500 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
9502 * Makefile.in (HFILES_NO_SRCDIR): Add "common/common-gdbthread.h".
9503 * common/common-gdbthread.h: New file, with parts from
9505 * gdbthread.h: Include "common-gdbthread.h".
9506 (switch_to_thread): Moved to "common/common-gdbthread.h".
9508 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
9510 * Makefile.in (SFILES): Add "common/job-control.c".
9511 (HFILES_NO_SRCDIR): Add "common/job-control.h".
9512 (COMMON_OBS): Add "job-control.o".
9513 * common/job-control.c: New file, with contents from
9515 * common/job-control.h: New file, with contents from "terminal.h".
9516 * fork-child.c: Include "job-control.h".
9517 * inflow.c: Include "job-control.h".
9518 (gdb_setpgid): Move to "common/common-inflow.c".
9519 (_initialize_inflow): Move setting of "job_control" to
9520 "handle_job_control".
9521 * terminal.h (job_control): Moved to "common/common-terminal.h".
9522 (gdb_setpgid): Likewise.
9523 * top.c: Include "job_control.h".
9524 * utils.c: Likewise.
9525 (job_control): Moved to "job-control.c".
9527 2017-06-07 Pedro Alves <palves@redhat.com>
9529 * Makefile.in (SFILES): Add gdb_regex.c.
9530 (COMMON_OBS): Add gdb_regex.o.
9531 * ada-lang.c (ada_add_standard_exceptions)
9532 (ada_add_exceptions_from_frame, name_matches_regex)
9533 (ada_add_global_exceptions, ada_exceptions_list_1): Change regex
9534 parameter type to compiled_regex. Adjust.
9535 (ada_exceptions_list): Use compiled_regex.
9536 * break-catch-throw.c (exception_catchpoint::pattern): Now a
9537 std::unique_ptr<compiled_regex>.
9538 (exception_catchpoint::~exception_catchpoint): Remove regfree
9540 (check_status_exception_catchpoint): Adjust to use compiled_regex.
9541 (handle_gnu_v3_exceptions): Adjust to use compiled_regex.
9542 * breakpoint.c (solib_catchpoint::compiled): Now a
9543 std::unique_ptr<compiled_regex>.
9544 (solib_catchpoint::~solib_catchpoint): Remove regfree call.
9545 (check_status_catch_solib): Adjust to use compiled_regex.
9546 (add_solib_catchpoint): Adjust to use compiled_regex.
9547 * cli/cli-cmds.c (apropos_command): Use compiled_regex.
9548 * cli/cli-decode.c (apropos_cmd): Change regex parameter to
9549 compiled_regex reference. Adjust to use it.
9550 * cli/cli-decode.h: Remove struct re_pattern_buffer forward
9551 declaration. Include "gdb_regex.h".
9552 (apropos_cmd): Change regex parameter to compiled_regex reference.
9553 * gdb_regex.c: New file.
9554 * gdb_regex.h (make_regfree_cleanup, get_regcomp_error): Delete
9556 (class compiled_regex): New.
9557 * linux-tdep.c: Include "common/gdb_optional.h".
9558 (struct mapping_regexes): New, factored out from
9559 mapping_is_anonymous_p, and adjusted to use compiled_regex.
9560 (mapping_is_anonymous_p): Use mapping_regexes wrapped in a
9561 gdb::optional and remove cleanups. Adjust to compiled_regex.
9562 * probe.c: Include "common/gdb_optional.h".
9563 (collect_probes): Use compiled_regex and gdb::optional and remove
9565 * skip.c: Include "common/gdb_optional.h".
9566 (skiplist_entry::compiled_function_regexp): Now a
9567 gdb::optional<compiled_regex>.
9568 (skiplist_entry::compiled_function_regexp_is_valid): Delete field.
9569 (free_skiplist_entry): Remove regfree call.
9570 (compile_skip_regexp, skip_rfunction_p): Adjust to use
9571 compiled_regex and gdb::optional.
9572 * symtab.c: Include "common/gdb_optional.h".
9573 (search_symbols): Use compiled_regex and gdb::optional.
9574 * utils.c (do_regfree_cleanup, make_regfree_cleanup)
9575 (get_regcomp_error, compile_rx_or_error): Delete. Some bits moved
9578 2017-06-07 Alan Hayward <alan.hayward@arm.com>
9580 * regcache.c (regcache::save): Avoid buffer use.
9581 (regcache::dump): Likewise.
9583 2017-06-07 Alan Hayward <alan.hayward@arm.com>
9585 * sh-tdep.c (sh_pseudo_register_read): Remove
9587 (sh_pseudo_register_write): Likewise.
9588 * sh64-tdep.c (sh64_pseudo_register_read): Likewise.
9589 (sh64_pseudo_register_write): Likewise
9591 2017-06-07 Alan Hayward <alan.hayward@arm.com>
9593 * aarch64-tdep.c (aarch64_store_return_value): Use
9595 (aarch64_pseudo_read_value): Likewise.
9596 (aarch64_pseudo_write): Likewise.
9598 2017-06-06 Yao Qi <yao.qi@linaro.org>
9600 * regformats/regdef.h (set_register_cache): Remove the
9603 2017-06-06 Alan Hayward <alan.hayward@arm.com>
9605 * frame.c (frame_unwind_register_signed): Use
9606 frame_unwind_register_value.
9608 2017-06-06 Pedro Alves <palves@redhat.com>
9610 PR breakpoints/21553
9611 * breakpoint.c (create_breakpoints_sal_default)
9612 (init_breakpoint_sal, create_breakpoint_sal): Use
9613 gdb::unique_xmalloc_ptr for string parameters.
9614 (create_breakpoint): Constify 'extra_string' and 'cond_string'
9615 parameters. Replace cleanups with gdb::unique_xmalloc_ptr.
9616 (base_breakpoint_create_breakpoints_sal)
9617 (bkpt_create_breakpoints_sal, tracepoint_create_breakpoints_sal)
9618 (strace_marker_create_breakpoints_sal)
9619 (create_breakpoints_sal_default): Use gdb::unique_xmalloc_ptr for
9621 * breakpoint.h (breakpoint_ops::create_breakpoints_sal): Use
9622 gdb::unique_xmalloc_ptr for string parameters.
9623 (create_breakpoint): Constify 'extra_string' and 'cond_string'
9626 2017-06-06 Alan Hayward <alan.hayward@arm.com>
9628 * alpha-tdep.c (alpha_register_to_value): Use
9629 get_frame_register_value.
9630 (alpha_value_to_register): Use ALPHA_REGISTER_SIZE.
9632 2017-06-06 Alan Hayward <alan.hayward@arm.com>
9634 * ia64-tdep.c (IA64_MAX_FP_REGISTER_SIZE) Add.
9635 (ia64_register_to_value): Use IA64_MAX_FP_REGISTER_SIZE.
9636 (ia64_value_to_register): Likewise.
9637 (ia64_extract_return_value): Likewise.
9638 (ia64_store_return_value): Likewise.
9639 (ia64_push_dummy_call): Likewise.
9641 2017-06-04 Joel Brobecker <brobecker@adacore.com>
9645 2017-06-03 Simon Marchi <simon.marchi@ericsson.com>
9647 * x86-linux-nat.c (struct arch_lwp_info): Remove.
9649 2017-06-03 Simon Marchi <simon.marchi@polymtl.ca>
9651 * linux-nat.c (linux_nat_post_attach_wait): Remove FIRST
9653 (linux_nat_attach): Adjust call to linux_nat_post_attach_wait.
9655 2017-06-02 Simon Marchi <simon.marchi@ericsson.com>
9657 * event-loop.c (poll_timers): Unallocate timer using delete
9660 2017-06-02 Simon Marchi <simon.marchi@polymtl.ca>
9662 * breakpoint.h (struct breakpoint_ops) <dtor>: Remove.
9663 (struct breakpoint) <~breakpoint>: New.
9664 (struct watchpoint): Inherit from breakpoint.
9667 (struct tracepoint): Inherit from breakpoint.
9669 * breakpoint.c (longjmp_breakpoint_ops): Remove.
9670 (struct longjmp_breakpoint): Inherit from breakpoint.
9671 <~longjmp_breakpoint>: New.
9673 (new_breakpoint_from_type): Remove casts.
9674 (watchpoint_in_thread_scope): Remove reference to base field.
9675 (watchpoint_del_at_next_stop): Likewise.
9676 (update_watchpoint): Likewise.
9677 (watchpoint_check): Likewise.
9678 (bpstat_check_watchpoint): Likewise.
9679 (set_longjmp_breakpoint): Likewise.
9680 (struct fork_catchpoint): Inherit from breakpoint.
9682 (struct solib_catchpoint): Inherit from breakpoint.
9683 <~solib_catchpoint>: New.
9685 (dtor_catch_solib): Change to ...
9686 (solib_catchpoint::~solib_catchpoint): ... this.
9687 (breakpoint_hit_catch_solib): Remove reference to base field.
9688 (add_solib_catchpoint): Likewise.
9689 (create_fork_vfork_event_catchpoint): Likewise.
9690 (struct exec_catchpoint): Inherit from breakpoint.
9691 <~exec_catchpoint>: New.
9693 (dtor_catch_exec): Change to ...
9694 (exec_catchpoint::~exec_catchpoint): ... this.
9695 (dtor_watchpoint): Change to ...
9696 (watchpoint::~watchpoint): ... this.
9697 (watch_command_1): Remove reference to base field.
9698 (catch_exec_command_1): Likewise.
9699 (base_breakpoint_dtor): Change to ...
9700 (breakpoint::~breakpoint): ... this.
9701 (base_breakpoint_ops): Remove dtor field value.
9702 (longjmp_bkpt_dtor): Change to ...
9703 (longjmp_breakpoint::~longjmp_breakpoint): ... this.
9704 (strace_marker_create_breakpoints_sal): Remove reference to base
9706 (delete_breakpoint): Don't manually call breakpoint destructor.
9707 (create_tracepoint_from_upload): Remove reference to base field.
9708 (trace_pass_set_count): Likewise.
9709 (initialize_breakpoint_ops): Don't initialize
9710 momentary_breakpoint_ops, don't set dtors.
9711 * ada-lang.c (struct ada_catchpoint): Inherit from breakpoint.
9712 <~ada_catchpoint>: New.
9714 (create_excep_cond_exprs): Remove reference to base field.
9715 (dtor_exception): Change to ...
9716 (ada_catchpoint::~ada_catchpoint): ... this.
9717 (dtor_catch_exception): Remove.
9718 (dtor_catch_exception_unhandled): Remove.
9719 (dtor_catch_assert): Remove.
9720 (create_ada_exception_catchpoint): Remove reference to base
9722 (initialize_ada_catchpoint_ops): Don't set dtors.
9723 * break-catch-sig.c (struct signal_catchpoint): Inherit from
9725 <~signal_catchpoint>: New.
9727 (signal_catchpoint_dtor): Change to ...
9728 (signal_catchpoint::~signal_catchpoint): ... this.
9729 (create_signal_catchpoint): Remove reference to base field.
9730 (initialize_signal_catchpoint_ops): Don't set dtor.
9731 * break-catch-syscall.c (struct syscall_catchpoint): Inherit
9733 <~syscall_catchpoint>: New.
9735 (dtor_catch_syscall): Change to ...
9736 (syscall_catchpoint::~syscall_catchpoint): ... this.
9737 (create_syscall_event_catchpoint): Remove reference to base
9739 (initialize_syscall_catchpoint_ops): Don't set dtor.
9740 * break-catch-throw.c (struct exception_catchpoint): Inherit
9742 <~exception_catchpoint>: New.
9744 (dtor_exception_catchpoint): Change to ...
9745 (exception_catchpoint::~exception_catchpoint): ... this.
9746 (handle_gnu_v3_exceptions): Remove reference to base field.
9747 (initialize_throw_catchpoint_ops): Don't set dtor.
9748 * ctf.c (ctf_get_traceframe_address): Remove reference to base
9750 * remote.c (remote_get_tracepoint_status): Likewise.
9751 * tracefile-tfile.c (tfile_get_traceframe_address): Likewise.
9752 * tracefile.c (tracefile_fetch_registers): Likewise.
9753 * tracepoint.c (actions_command): Likewise.
9754 (validate_actionline): Likewise.
9755 (tfind_1): Likewise.
9756 (get_traceframe_location): Likewise.
9757 (find_matching_tracepoint_location): Likewise.
9758 (parse_tracepoint_status): Likewise.
9759 * mi/mi-cmd-break.c (mi_cmd_break_passcount): Likewise.
9761 2017-06-02 Simon Marchi <simon.marchi@polymtl.ca>
9763 * breakpoint.c (struct longjmp_breakpoint): New struct.
9764 (is_tracepoint_type): Change return type to bool.
9765 (is_longjmp_type): New function.
9766 (new_breakpoint_from_type): Handle longjmp kinds of breakpoints.
9767 (set_raw_breakpoint_without_location): Use
9768 new_breakpoint_from_type.
9769 (set_raw_breakpoint): Likewise.
9771 2017-06-02 Simon Marchi <simon.marchi@polymtl.ca>
9773 * breakpoint.c (new_breakpoint_from_type): New function.
9774 (create_breakpoint_sal): Use new_breakpoint_from_type and
9776 (create_breakpoint): Likewise.
9778 2017-05-31 Simon Marchi <simon.marchi@ericsson.com>
9780 * memattr.c (mem_info_command): Rename to ...
9781 (info_mem_command): ... this.
9782 (mem_enable_command): Rename to ...
9783 (enable_mem_command): ... this.
9784 (mem_disable_command): Rename to ...
9785 (disable_mem_command): ... this.
9786 (mem_delete_command): Rename to ...
9787 (delete_mem_command): ... this.
9788 (_initialize_mem): Adjust function names.
9790 2017-05-31 Markus Metzger <markus.t.metzger@intel.com>
9792 * btrace.c (handle_pt_insn_events): New.
9793 (ftrace_add_pt): Call handle_pt_insn_events. Rename ERRCODE into
9794 STATUS. Split into this and ...
9795 (handle_pt_insn_event_flags): ... this.
9797 2017-05-31 Markus Metzger <markus.t.metzger@intel.com>
9799 * configure.ac: Check for pt_insn_event, struct pt_insn.enabled,
9800 and struct pt_insn.resynced.
9801 * configure: Regenerated.
9802 * config.in: Regenerated.
9804 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
9806 * btrace.c (ftrace_find_call_by_number): New function.
9807 (ftrace_new_function): Store objects, not pointers.
9808 (ftrace_find_call_by_number, ftrace_new_return, ftrace_new_switch,
9809 ftrace_new_gap, ftrace_update_function,
9810 ftrace_compute_global_level_offset, btrace_stich_bts, btrace_clear,
9811 btrace_insn_get, btrace_insn_get_error, btrace_insn_end,
9812 btrace_insn_next, btrace_insn_prev, ptrace_find_insn_by_number,
9813 btrace_ends_with_single_insn, btrace_call_get): Account for
9814 btrace_thread_info::functions now storing objects.
9815 * btrace.h (struct btrace_thread_info): Add constructor.
9816 (struct btrace_thread_info) <functions>: Make std::vector.
9817 (struct btrace_thread_info) <prev, next, up, insn, errcode, flags):
9818 Initialize with default values.
9819 * record-btrace.c (record_btrace_frame_sniffer): Account for
9820 btrace_thread_info::functions now storing objects.
9822 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
9824 * btrace.c: Remove typedef bfun_s.
9825 (ftrace_new_gap): Directly add gaps to the list of gaps.
9826 (btrace_bridge_gaps, btrace_compute_ftrace_bts, pt_btrace_insn_flags,
9827 ftrace_add_pt, btrace_compute_ftrace_pt, btrace_compute_ftrace_1,
9828 btrace_finalize_ftrace, btrace_compute_ftrace): Use std::vector
9831 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
9833 * btrace.c (ftrace_fixup_caller, ftrace_new_return, ftrace_connect_bfun,
9834 ftrace_bridge_gap): Replace references to btrace_thread_info::segment
9835 with btrace_thread_info::next_segment and
9836 btrace_thread_info::prev_segment.
9837 * btrace.h: Remove struct btrace_func_link.
9838 (struct btrace_function): Replace pair of function segment pointers
9839 with pair of indices.
9840 * python/py-record-btrace.c (btpy_call_prev_sibling,
9841 btpy_call_next_sibling): Replace references to
9842 btrace_thread_info::segment with btrace_thread_info::next_segment and
9843 btrace_thread_info::prev_segment.
9844 * record-btrace.c (record_btrace_frame_this_id): Use
9845 btrace_find_call_by_number.
9847 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
9849 * btrace.c (ftrace_new_function, ftrace_fixup_level,
9850 ftrace_connect_bfun, ftrace_bridge_gap, btrace_bridge_gaps,
9851 btrace_insn_next, btrace_insn_prev): Remove references to
9852 btrace_thread_info::flow.
9853 * btrace.h (struct btrace_function): Remove FLOW.
9855 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
9857 * btrace.c (ftrace_find_call_by_number): New function.
9858 (ftrace_update_caller, ftrace_new_call, ftrace_new_tailcall,
9859 ftrace_get_caller, ftrace_find_call, ftrace_new_return,
9860 ftrace_match_backtrace, ftrace_connect_bfun, ftrace_connect_backtrace,
9861 ftrace_bridge_gap, btrace_bridge_gaps): Use btrace_function::up as an
9863 * btrace.h (struct btrace_function): Turn UP into an index.
9864 * python/py-record-btrace.c (btpy_call_up): Use btrace_function::up
9866 * record-btrace.c (record_btrace_frame_unwind_stop_reason,
9867 record_btrace_frame_prev_register, record_btrace_frame_sniffer,
9868 record_btrace_tailcall_frame_sniffe): Use btrace_find_call_by_number.
9870 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
9872 * btrace.c (ftrace_new_function, ftrace_new_call, ftrace_new_tailcall,
9873 ftrace_new_return, ftrace_new_switch, ftrace_new_gap,
9874 ftrace_update_function, ftrace_compute_global_level_offset,
9875 btrace_compute_ftrace_bts, ftrace_add_pt, btrace_compute_ftrace_pt,
9876 btrace_stitch_bts, btrace_fetch, btrace_clear, btrace_insn_number,
9877 btrace_insn_end, btrace_is_empty): Remove references to
9878 btrace_thread_info::begin and btrace_thread_info::end.
9879 * btrace.h (struct btrace_thread_info): Remove BEGIN and END.
9880 (struct btrace_thread_info) <functions>: Adjust comment.
9881 * record-btrace.c (record_btrace_start_replaying): Remove reference to
9882 btrace_thread_info::begin.
9884 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
9886 * btrace.c (ftrace_new_function, ftrace_new_call, ftrace_new_tailcall,
9887 ftrace_new_return, ftrace_new_switch, ftrace_new_gap,
9888 ftrace_update_function): Remove arguments that implicitly were always
9890 (btrace_compute_ftrace_bts, ftrace_add_pt, btrace_compute_ftrace_pt):
9891 Don't pass BTINFO->END.
9893 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
9895 * btrace.c: (btrace_insn_get, btrace_insn_get_error, btrace_insn_number,
9896 btrace_insn_begin, btrace_insn_end, btrace_insn_next, btrace_insn_prev,
9897 btrace_find_insn_by_number): Replace function segment pointer with
9899 (btrace_insn_cmp): Simplify.
9900 * btrace.h: (struct btrace_insn_iterator) Rename index to
9901 insn_index. Replace function segment pointer with index into function
9903 * record-btrace.c (record_btrace_call_history): Replace function
9904 segment pointer use with index.
9905 (record_btrace_frame_sniffer): Retrieve function call segment through
9907 (record_btrace_set_replay): Remove defunc't safety check.
9909 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
9911 * btrace.c (btrace_ends_with_single_insn): New function.
9912 (btrace_call_get, btrace_call_number, btrace_call_begin,
9913 btrace_call_end, btrace_call_next, btrace_call_prev,
9914 btrace_find_call_by_number): Use index into call segment vector
9916 (btrace_call_cmp): Simplify.
9917 * btrace.h (struct btrace_call_iterator): Replace function call segment
9918 pointer with index into vector.
9919 * record-btrace.c (record_btrace_call_history): Use index instead of
9922 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
9924 * btrace.c (btrace_insn_begin, btrace_insn_end,
9925 btrace_find_insn_by_number): Add btinfo to iterator.
9926 * btrace.h (struct btrace_insn_iterator): Add btinfo.
9928 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
9930 * btrace.c (ftrace_new_function): Add btrace_thread_info to arguments
9931 and save pointers directly.
9932 (ftrace_new_call, ftrace_new_tailcall, ftrace_new_return,
9933 ftrace_new_switch, ftrace_new_gap, ftrace_update_function,
9934 ftrace_add_pt): Add btrace_thread_info to arguments. Adjust for
9935 changed signature of functions.
9936 (btrace_compute_ftrace_pt): Adjust for changed signature of functions.
9937 (btrace_fetch): Remove code that adds btrace_function pointers to
9938 vector of btrace_functions.
9939 (btrace_clear): Simplify freeing vector of btrace_functions.
9941 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
9943 * btrace.c (btrace_fetch, btrace_clear, btrace_find_insn_by_number):
9944 Replace VEC_* with std::vector functions.
9945 * btrace.h: Add include: vector. Remove typedef for DEF_VEC_P.
9946 (struct btrace_thread_info)<functions>: Change type to std::vector.
9948 2017-05-30 Simon Marchi <simon.marchi@ericsson.com>
9950 * NEWS (Changes in GDB 8.0): Remove extra empty line. Move
9951 "Removed targets and native configurations" up. Merge duplicate
9952 "New commands" sub-sections. Add "New options" sub-sections.
9954 2017-05-26 Alan Hayward <alan.hayward@arm.com>
9956 * defs.h (copy_integer_to_size): New declaration.
9957 * findvar.c (copy_integer_to_size): New function.
9958 (do_cint_test): New selftest function.
9959 (copy_integer_to_size_test): Likewise.
9960 (_initialize_findvar): Likewise.
9961 * mips-fbsd-tdep.c (mips_fbsd_supply_reg): Use raw_supply_integer.
9962 (mips_fbsd_collect_reg): Use raw_collect_integer.
9963 * mips-linux-tdep.c (supply_32bit_reg): Use raw_supply_integer.
9964 (mips64_fill_gregset): Use raw_collect_integer
9965 (mips64_fill_fpregset): Use raw_supply_integer.
9966 * regcache.c (regcache::raw_supply_integer): New function.
9967 (regcache::raw_collect_integer): Likewise.
9968 * regcache.h: (regcache::raw_supply_integer): New declaration.
9969 (regcache::raw_collect_integer): Likewise.
9971 2017-05-24 Yao Qi <yao.qi@linaro.org>
9973 * Makefile.in (SFILES): Add gdbarch-selftests.c.
9974 (COMMON_OBS): Add gdbarch-selftests.o.
9975 * frame.c [GDB_SELF_TESTS] (create_new_frame): New function.
9976 * frame.h [GDB_SELF_TESTS] (create_new_frame): Declare.
9977 * gdbarch-selftests.c: New file.
9978 * regcache.h (regcache) <~regcache>: Mark it virtual if
9980 <raw_write>: Likewise.
9982 2017-05-24 Yao Qi <yao.qi@linaro.org>
9984 * regcache.c (current_regcache): Change it to
9985 regcache::current_regcache.
9986 (regcache_observer_target_changed): Update.
9987 (regcache_thread_ptid_changed): Make it a regcache static
9989 (regcache_thread_ptid_changed): Update.
9990 (class regcache_access): New.
9991 (current_regcache_test): Update.
9992 (_initialize_regcache): Update.
9993 * regcache.h: Include forward_list.
9994 (regcache): Declare regcache_thread_ptid_changed and declare
9995 registers_changed_ptid as friend.
9997 2017-05-24 Yao Qi <yao.qi@linaro.org>
9999 * i387-tdep.c (i387_register_to_value): Use register_size
10000 instead of TYPE_LENGTH.
10001 * m68k-tdep.c (m68k_register_to_value): Likewise.
10003 2017-05-24 Yao Qi <yao.qi@linaro.org>
10005 * i387-tdep.c (i387_convert_register_p): Return false if type
10006 code isn't TYPE_CODE_FLT.
10008 2017-05-24 Yao Qi <yao.qi@linaro.org>
10010 * alpha-tdep.c (alpha_convert_register_p): Return true if type
10012 (alpha_register_to_value): Remove type length check.
10013 (alpha_value_to_register): Likewise.
10015 2017-05-24 Yao Qi <yao.qi@linaro.org>
10017 * ia64-tdep.c (ia64_convert_register_p): Check type's code is
10020 2017-05-24 Yao Qi <yao.qi@linaro.org>
10022 * m68k-tdep.c (m68k_convert_register_p): Check type's code is
10023 TYPE_CODE_FLT or not.
10025 2017-05-24 Yao Qi <yao.qi@linaro.org>
10027 * alpha-tdep.c (alpha_gdbarch_init): Use XCNEW instead of XNEW.
10028 * avr-tdep.c (avr_gdbarch_init): Likewise.
10029 * bfin-tdep.c (bfin_gdbarch_init): Likewise.
10030 * cris-tdep.c (cris_gdbarch_init): Likewise.
10031 * ft32-tdep.c (ft32_gdbarch_init): Likewise.
10032 * lm32-tdep.c (lm32_gdbarch_init): Likewise.
10033 * m32r-tdep.c (m32r_gdbarch_init): Likewise.
10034 * m68hc11-tdep.c (m68hc11_gdbarch_init): Likewise.
10035 * mep-tdep.c (mep_gdbarch_init): Likewise.
10036 * microblaze-tdep.c (microblaze_gdbarch_init): Likewise.
10037 * mips-tdep.c (mips_gdbarch_init): Likewise.
10038 * mn10300-tdep.c (mn10300_gdbarch_init): Likewise.
10039 * moxie-tdep.c (moxie_gdbarch_init): Likewise.
10040 * msp430-tdep.c (msp430_gdbarch_init): Likewise.
10041 * sh64-tdep.c (sh64_gdbarch_init): Likewise.
10042 * v850-tdep.c (v850_gdbarch_init): Likewise.
10044 2017-05-24 Yao Qi <yao.qi@linaro.org>
10046 * selftest-arch.c (tests_with_arch): Call registers_changed
10047 and reinit_frame_cache.
10048 * selftest.c (run_self_tests): Likewise.
10050 2017-05-24 Yao Qi <yao.qi@linaro.org>
10052 * rs6000-tdep.c (gdb_print_insn_powerpc): Remove.
10053 (rs6000_gdbarch_init): Don't call set_gdbarch_print_insn.
10055 2017-05-24 Yao Qi <yao.qi@linaro.org>
10057 * rl78-tdep.c (rl78_gdbarch_init): Don't call
10058 set_gdbarch_print_insn.
10060 2017-05-24 Yao Qi <yao.qi@linaro.org>
10062 * h8300-tdep.c (h8300_gdbarch_init): Don't call
10063 set_gdbarch_print_insn.
10065 2017-05-24 Yao Qi <yao.qi@linaro.org>
10067 * alpha-tdep.c (alpha_gdbarch_init): Don't call
10068 set_gdbarch_print_insn.
10069 * arc-tdep.c (arc_gdbarch_init): Likewise.
10070 * arch-utils.c: include dis-asm.h.
10071 (default_print_insn): New function.
10072 * arch-utils.h (default_print_insn): Declare.
10073 * avr-tdep.c (avr_gdbarch_init): Don't call set_gdbarch_print_insn.
10074 * bfin-tdep.c (bfin_gdbarch_init): Likewise.
10075 * cris-tdep.c (cris_delayed_get_disassembler): Remove.
10076 (cris_gdbarch_init): Don't call set_gdbarch_print_insn.
10077 * frv-tdep.c (frv_gdbarch_init): Likewise.
10078 * ft32-tdep.c (ft32_gdbarch_init): Likewise.
10079 * gdbarch.sh (print_insn): Use default_print_insn.
10080 * gdbarch.c: Regenerated.
10081 * hppa-tdep.c (hppa_gdbarch_init): Likewise.
10082 * iq2000-tdep.c (iq2000_gdbarch_init): Likewise.
10083 * lm32-tdep.c (lm32_gdbarch_init): Likewise.
10084 * m32c-tdep.c (m32c_gdbarch_init): Likewise.
10085 * m32r-tdep.c (m32r_gdbarch_init): Likewise.
10086 * m68hc11-tdep.c (gdb_print_insn_m68hc11): Remove.
10087 (m68hc11_gdbarch_init): Don't call set_gdbarch_print_insn.
10088 * m68k-tdep.c (m68k_gdbarch_init): Likewise.
10089 * m88k-tdep.c (m88k_gdbarch_init): Likewise.
10090 * microblaze-tdep.c (microblaze_gdbarch_init): Likewise.
10091 * mn10300-tdep.c (mn10300_gdbarch_init): Likewise.
10092 * moxie-tdep.c (moxie_gdbarch_init): Likewise.
10093 * msp430-tdep.c (msp430_gdbarch_init): Likewise.
10094 * mt-tdep.c (mt_gdbarch_init): Likewise.
10095 * nds32-tdep.c (nds32_gdbarch_init): Likewise.
10096 * nios2-tdep.c (nios2_print_insn): Remove.
10097 (nios2_gdbarch_init): Don't call set_gdbarch_print_insn.
10098 * rx-tdep.c (rx_gdbarch_init): Likewise.
10099 * s390-linux-tdep.c (s390_gdbarch_init): Likewise.
10100 * score-tdep.c (score_print_insn): Remove.
10101 (score_gdbarch_init): Don't call set_gdbarch_print_insn.
10102 * sh-tdep.c (sh_gdbarch_init): Likewise.
10103 * sh64-tdep.c (sh64_gdbarch_init): Likewise.
10104 * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
10105 * tic6x-tdep.c (tic6x_print_insn): Remove.
10106 (tic6x_gdbarch_init): Don't call set_gdbarch_print_insn.
10107 * tilegx-tdep.c (tilegx_gdbarch_init): Likewise.
10108 * v850-tdep.c (v850_gdbarch_init): Likewise.
10109 * vax-tdep.c (vax_gdbarch_init): Likewise.
10110 * xstormy16-tdep.c (xstormy16_gdbarch_init): Likewise.
10111 * xtensa-tdep.c (xtensa_gdbarch_init): Likewise.
10113 2017-05-23 John Baldwin <jhb@FreeBSD.org>
10115 * mips-fbsd-tdep.c (MIPS_PC_REGNUM): Remove.
10116 (MIPS_FP0_REGNUM): Remove.
10117 (MIPS_FSR_REGNUM): Remove.
10118 (mips_fbsd_supply_fpregs): Use mips_regnum.
10119 (mips_fbsd_supply_gregs): Likewise.
10120 (mips_fbsd_collect_fpregs): Likewise.
10121 (mips_fbsd_collect_gregs): Likewise.
10123 2017-05-23 John Baldwin <jhb@FreeBSD.org>
10125 * mips-fbsd-nat.c (getregs_supplies): Fix upper bound comparison.
10126 (getpfpregs_supplies): New function.
10127 (mips_fbsd_fetch_inferior_registers): Remove early exit and use
10128 getfpregs_supplies.
10129 (mips_fbsd_store_inferior_registers): Likewise.
10131 2017-05-22 Pedro Alves <palves@redhat.com>
10133 * MAINTAINERS (Host/Native): Add John Baldwin as FreeBSD
10136 2017-05-22 Alan Hayward <alan.hayward@arm.com>
10138 * ppc-linux-nat.c (fetch_register): Use PPC_MAX_REGISTER_SIZE.
10139 (store_register): Likewise.
10140 * ppc-sysv-tdep.c (ppc_sysv_abi_push_dummy_call): Likewise.
10141 (get_decimal_float_return_value): Likewise.
10142 (do_ppc_sysv_return_value): Likewise.
10143 (ppc64_sysv_abi_push_integer): Likewise.
10144 (ppc64_sysv_abi_push_freg): Likewise.
10145 (ppc64_sysv_abi_return_value_base): Likewise.
10146 (ppc64_sysv_abi_return_value): Likewise.
10147 * rs6000-aix-tdep.c (rs6000_push_dummy_call): Likewise.
10148 * rs6000-lynx178-tdep.c (rs6000_lynx178_push_dummy_call): Likewise.
10149 * rs6000-nat.c: Likewise.
10150 * rs6000-tdep.c (rs6000_register_to_value): Likewise.
10151 (rs6000_value_to_register): Likewise.
10152 * ppc-tdep.h (PPC_MAX_REGISTER_SIZE): Add.
10154 2017-05-21 Tom Tromey <tom@tromey.com>
10157 * rust-lang.c (rust_print_type) <TYPE_CODE_ARRAY>: Print unsized
10158 arrays as "[T]", not "[T; ]".
10160 2017-05-19 Tom Tromey <tom@tromey.com>
10163 * rust-lang.c (exp_descriptor_rust): New function.
10164 (rust_language_defn): Use it.
10165 * p-lang.c (pascal_language_defn): Update.
10166 * opencl-lang.c (opencl_language_defn): Update.
10167 * objc-lang.c (objc_language_defn): Update.
10168 * m2-lang.c (m2_language_defn): Update.
10169 * language.h (struct language_defn)
10170 <la_watch_location_expression>: New member.
10171 * language.c (unknown_language_defn, auto_language_defn)
10172 (local_language_defn): Update.
10173 * go-lang.c (go_language_defn): Update.
10174 * f-lang.c (f_language_defn): Update.
10175 * d-lang.c (d_language_defn): Update.
10176 * c-lang.h (c_watch_location_expression): Declare.
10177 * c-lang.c (c_watch_location_expression): New function.
10178 (c_language_defn, cplus_language_defn, asm_language_defn)
10179 (minimal_language_defn): Use it.
10180 * breakpoint.c (watch_command_1): Call
10181 la_watch_location_expression.
10182 * ada-lang.c (ada_language_defn): Update.
10184 2017-05-19 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
10187 * gdb_curses.h (NOMACROS): Define.
10188 (NCURSES_NOMACROS): Define.
10190 2017-05-19 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
10193 * tui/tui-windata.c (tui_erase_data_content): Cast last mvwaddstr
10195 * tui/tui-wingeneral.c (box_win): Likewise.
10196 * tui/tui-winsource.c (tui_erase_source_content): Likewise.
10197 (tui_show_source_line): Likewise.
10198 (tui_show_exec_info_content): Likewise.
10200 2017-05-19 Vladimir Mezentsev <vladimir.mezentsev@oracle.com>
10202 * sparc-tdep.c (sparc_structure_return_p)
10203 (sparc_arg_on_registers_p): New functions.
10204 (sparc32_store_arguments): Use them.
10205 * sparc64-tdep.c (sparc64_16_byte_align_p)
10206 (sparc64_store_floating_fields, sparc64_extract_floating_fields):
10207 Handle TYPE_CODE_ARRAY.
10209 2017-05-17 Yao Qi <yao.qi@linaro.org>
10211 * cli/cli-decode.c (add_alias_cmd): New function.
10212 * command.h (add_alias_cmd): Declare.
10213 * infcmd.c (_initialize_infcmd): Don't call add_com_alias,
10214 instead call add_alias_cmd.
10216 2017-05-17 Pedro Alves <palves@redhat.com>
10218 * Makefile.in (nat_extra_makefile_frag): Rename to ...
10219 (nat_makefile_frag): ... this. All references updated.
10220 * configure.ac: Likewise.
10221 * configure.nat: Likewise. Enhance comments.
10222 * configure: Regenerate.
10224 2017-05-15 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
10226 * procfs.c (procfs_create_inferior): Change prototype to match
10229 2017-05-13 Eli Zaretskii <eliz@gnu.org>
10231 * tui/tui.c (tui_enable): Cast "unknown" to 'char *' to avoid a
10232 C++ compiler warning.
10234 2017-05-12 Tom Tromey <tom@tromey.com>
10237 * rust-lang.c (rust_evaluate_subexp) <STRUCTOP_STRUCT>: Don't
10238 recurse, just call value_struct_elt directly.
10240 2017-05-12 Tom Tromey <tom@tromey.com>
10242 * rust-lang.c (rust_dump_subexp_body) <STRUCTOP_ANONYMOUS,
10243 OP_RUST_ARRAY>: Fix.
10245 2017-05-12 Tom Tromey <tom@tromey.com>
10247 * rust-lang.c (rust_print_subexp): Replace "return" with "break".
10249 2017-05-09 Yao Qi <yao.qi@linaro.org>
10251 * regcache.c: Include <forward_list>.
10252 (struct regcache_list): Remove.
10253 (current_regcache): Update.
10254 (get_thread_arch_aspace_regcache): Update for std::forward_list.
10255 (regcache_thread_ptid_changed): Likewise.
10256 (registers_changed_ptid): Likewise.
10257 (current_regcache_size): Likewise.
10259 2017-05-09 Yao Qi <yao.qi@linaro.org>
10261 * regcache.c [GDB_SELF_TEST]: Include selftest.h.
10262 (current_regcache_size): New function.
10263 (current_regcache_test): New function.
10264 (_initialize_regcache) [GDB_SELF_TEST]: Register the unit test.
10266 2017-05-08 Alan Hayward <alan.hayward@arm.com>
10268 * mips-tdep.c (mips_o32_return_value): Remove unused buffer.
10269 (print_gp_register_row): Use get_frame_register_value.
10271 2017-05-08 Alan Hayward <alan.hayward@arm.com>
10273 * mips-linux-tdep.c (mips_supply_gregset): Use raw_supply_zeroed.
10274 (mips_supply_fpregset): Likewise.
10275 (mips64_supply_gregset): Likewise.
10277 2017-05-08 Alan Hayward <alan.hayward@arm.com>
10279 * mn10300-linux-tdep.c (am33_supply_gregset_method): Use
10280 regcache->raw_supply_zeroed.
10282 2017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
10284 * configure.nat: Rearrange 'case' statements to match
10287 2017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
10289 * Makefile.in: Remove "@host_makefile_frag@". Add variables
10290 NAT_FILE, NATDEPFILES, NAT_CDEPS, LOADLIBES, MH_CFLAGS, XM_CLIBS,
10291 NAT_GENERATED_FILES, HAVE_NATIVE_GCORE_HOST. Add
10292 "@nat_extra_makefile_frag@".
10293 (Makefile): Remove dependency on "@frags@".
10294 ($(GNULIB_BUILDDIR)/Makefile): Likewise.
10295 (data-directory/Makefile): Likewise.
10296 * config/aarch64/linux.mh: Deleted; moved contents to
10297 "gdb/configure.nat".
10298 * config/alpha/alpha-linux.mh: Likewise.
10299 * config/alpha/nbsd.mh: Likewise.
10300 * config/arm/linux.mh: Likewise.
10301 * config/arm/nbsdelf.mh: Likewise.
10302 * config/i386/cygwin.mh: Likewise.
10303 * config/i386/cygwin64.mh: Likewise.
10304 * config/i386/darwin.mh: Likewise.
10305 * config/i386/fbsd.mh: Likewise.
10306 * config/i386/fbsd64.mh: Likewise.
10307 * config/i386/go32.mh: Likewise.
10308 * config/i386/i386gnu.mh: Likewise.
10309 * config/i386/i386sol2.mh: Likewise.
10310 * config/i386/linux.mh: Likewise.
10311 * config/i386/linux64.mh: Likewise.
10312 * config/i386/mingw.mh: Likewise.
10313 * config/i386/mingw64.mh: Likewise.
10314 * config/i386/nbsd64.mh: Likewise.
10315 * config/i386/nbsdelf.mh: Likewise.
10316 * config/i386/nto.mh: Likewise.
10317 * config/i386/obsd.mh: Likewise.
10318 * config/i386/obsd64.mh: Likewise.
10319 * config/i386/sol2-64.mh: Likewise.
10320 * config/ia64/linux.mh: Likewise.
10321 * config/m32r/linux.mh: Likewise.
10322 * config/m68k/linux.mh: Likewise.
10323 * config/m68k/nbsdelf.mh: Likewise.
10324 * config/m68k/obsd.mh: Likewise.
10325 * config/m88k/obsd.mh: Likewise.
10326 * config/mips/fbsd.mh: Likewise.
10327 * config/mips/linux.mh: Likewise.
10328 * config/mips/nbsd.mh: Likewise.
10329 * config/mips/obsd64.mh: Likewise.
10330 * config/pa/linux.mh: Likewise.
10331 * config/pa/nbsd.mh: Likewise.
10332 * config/pa/obsd.mh: Likewise.
10333 * config/powerpc/aix.mh: Likewise.
10334 * config/powerpc/fbsd.mh: Likewise.
10335 * config/powerpc/linux.mh: Likewise.
10336 * config/powerpc/nbsd.mh: Likewise.
10337 * config/powerpc/obsd.mh: Likewise.
10338 * config/powerpc/ppc64-linux.mh: Likewise.
10339 * config/powerpc/spu-linux.mh: Likewise.
10340 * config/s390/linux.mh: Likewise.
10341 * config/sh/nbsd.mh: Likewise.
10342 * config/sparc/fbsd.mh: Likewise.
10343 * config/sparc/linux.mh: Likewise.
10344 * config/sparc/linux64.mh: Likewise.
10345 * config/sparc/nbsd64.mh: Likewise.
10346 * config/sparc/nbsdelf.mh: Likewise.
10347 * config/sparc/obsd64.mh: Likewise.
10348 * config/sparc/sol2.mh: Likewise.
10349 * config/tilegx/linux.mh: Likewise.
10350 * config/vax/nbsdelf.mh: Likewise.
10351 * config/vax/obsd.mh: Likewise.
10352 * config/xtensa/linux.mh: Likewise.
10353 * config/i386/i386gnu.mn: New file, with excerpts from
10354 "config/i386/i386gnu.mh".
10355 * configure: Regenerate.
10356 * configure.ac: Rewrite code to use "gdb/configure.nat" instead of
10357 *.mh files under "gdb/config".
10358 * configure.nat: New file, with contents from the
10359 "gdb/config/*/*.mh" files.
10361 2017-05-05 Tim Wiederhake <tim.wiederhake@intel.com>
10363 * btrace.c (btrace_clear): Free insn vector.
10365 2017-05-05 Pedro Alves <palves@redhat.com>
10367 * warning.m4 (build_warnings): Add -Wno-error=maybe-uninitialized.
10368 * configure: Regenerate.
10370 2017-05-04 Pedro Alves <palves@redhat.com>
10372 * Makefile.in (SFILES): Add progspace-and-thread.c.
10373 (HFILES_NO_SRCDIR): Add progspace-and-thread.h.
10374 (COMMON_OBS): Add progspace-and-thread.o.
10375 * breakpoint.c: Include "progspace-and-thread.h".
10376 (update_inserted_breakpoint_locations)
10377 (insert_breakpoint_locations, create_longjmp_master_breakpoint):
10378 Use scoped_restore_current_pspace_and_thread.
10379 (create_std_terminate_master_breakpoint): Use
10380 scoped_restore_current_program_space.
10381 (remove_breakpoint): Use scoped_restore_current_pspace_and_thread.
10382 (print_breakpoint_location): Use
10383 scoped_restore_current_program_space.
10384 (bp_loc_is_permanent): Use
10385 scoped_restore_current_pspace_and_thread.
10386 (resolve_sal_pc): Use scoped_restore_current_pspace_and_thread.
10387 (download_tracepoint_locations): Use
10388 scoped_restore_current_pspace_and_thread.
10389 (breakpoint_re_set): Use scoped_restore_current_pspace_and_thread.
10390 * exec.c (exec_close_1): Use scoped_restore_current_program_space.
10391 (enum step_over_calls_kind): Moved from inferior.h.
10392 (class scoped_restore_current_thread): New class.
10393 * gdbthread.h (make_cleanup_restore_current_thread): Delete
10395 (scoped_restore_current_thread): New class.
10396 * infcmd.c: Include "common/gdb_optional.h".
10397 (continue_1, proceed_after_attach): Use
10398 scoped_restore_current_thread.
10399 (notice_new_inferior): Use scoped_restore_current_thread.
10400 * inferior.c: Include "progspace-and-thread.h".
10401 (restore_inferior, save_current_inferior): Delete.
10402 (add_inferior_command, clone_inferior_command): Use
10403 scoped_restore_current_pspace_and_thread.
10404 * inferior.h (scoped_restore_current_inferior): New class.
10405 * infrun.c: Include "progspace-and-thread.h" and
10406 "common/gdb_optional.h".
10407 (follow_fork_inferior): Use
10408 scoped_restore_current_pspace_and_thread.
10409 (scoped_restore_exited_inferior): New class.
10410 (handle_vfork_child_exec_or_exit): Use
10411 scoped_restore_exited_inferior,
10412 scoped_restore_current_pspace_and_thread,
10413 scoped_restore_current_thread and scoped_restore.
10414 (fetch_inferior_event): Use scoped_restore_current_thread.
10415 * linespec.c (decode_line_full, decode_line_1): Use
10416 scoped_restore_current_program_space.
10417 * mi/mi-main.c: Include "progspace-and-thread.h".
10418 (exec_continue): Use scoped_restore_current_thread.
10419 (mi_cmd_exec_run): Use scoped_restore_current_pspace_and_thread.
10420 (mi_cmd_trace_frame_collected): Use scoped_restore_current_thread.
10421 * proc-service.c (ps_pglobal_lookup): Use
10422 scoped_restore_current_program_space.
10423 * progspace-and-thread.c: New file.
10424 * progspace-and-thread.h: New file.
10425 * progspace.c (release_program_space, clone_program_space): Use
10426 scoped_restore_current_program_space.
10427 (restore_program_space, save_current_program_space)
10428 (save_current_space_and_thread): Delete.
10429 (switch_to_program_space_and_thread): Moved to
10430 progspace-and-thread.c.
10431 * progspace.h (save_current_program_space)
10432 (save_current_space_and_thread): Delete declarations.
10433 (scoped_restore_current_program_space): New class.
10434 * remote.c (remote_btrace_maybe_reopen): Use
10435 scoped_restore_current_thread.
10436 * symtab.c: Include "progspace-and-thread.h".
10437 (skip_prologue_sal): Use scoped_restore_current_pspace_and_thread.
10438 * thread.c (print_thread_info_1): Use
10439 scoped_restore_current_thread.
10440 (struct current_thread_cleanup): Delete.
10441 (do_restore_current_thread_cleanup)
10442 (restore_current_thread_cleanup_dtor): Rename/convert both to ...
10443 (scoped_restore_current_thread::~scoped_restore_current_thread):
10445 (make_cleanup_restore_current_thread): Rename/convert to ...
10446 (scoped_restore_current_thread::scoped_restore_current_thread):
10448 (thread_apply_all_command): Use scoped_restore_current_thread.
10449 (thread_apply_command): Use scoped_restore_current_thread.
10450 * tracepoint.c (tdump_command): Use scoped_restore_current_thread.
10451 * varobj.c (value_of_root_1): Use scoped_restore_current_thread.
10453 2017-05-04 Pedro Alves <palves@redhat.com>
10455 * thread.c (make_cleanup_restore_current_thread): Move
10456 find_thread_ptid call before the is_stopped call. Assert that the
10457 thread is found. Replace is_stopped call by checking the thread's
10458 state directly. Remove unnecessary NULL-thread check.
10460 2017-05-04 Pedro Alves <palves@redhat.com>
10462 * corelow.c (thread_section_name): New class.
10463 (get_core_register_section, get_core_siginfo): Use it.
10465 2017-05-04 Andreas Arnez <arnez@linux.vnet.ibm.com>
10467 * corelow.c (sniff_core_bfd): Remove extra semicolon.
10468 (get_core_register_section): Remove xfree of NULL pointer.
10470 2017-05-03 Alan Hayward <alan.hayward@arm.com>
10472 * frv-linux-tdep.c (frv_linux_supply_gregset): Use raw_supply_zeroed.
10473 * regcache.c (regcache::raw_supply_zeroed): New function.
10474 * regcache.h (regcache::raw_supply_zeroed): New declaration.
10476 2017-05-03 Simon Marchi <simon.marchi@ericsson.com>
10478 * gdbarch.sh: Remove commented out definition of
10480 * gdbarch.h: Re-generate.
10482 2017-05-03 Sergio Durigan Junior <sergiodj@redhat.com>
10484 * configure: Regenerate.
10486 2017-05-02 Simon Marchi <simon.marchi@ericsson.com>
10488 * solib-target.c (solib_target_relocate_section_addresses):
10489 Remove num_section_bases, num_bases, segment_bases variables.
10491 2017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
10493 * common/gdb_vecs.h (DEF_VEC_I (CORE_ADDR)): Remove.
10495 2017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
10497 * solib-target.c: Include <vector>
10498 (struct lm_info_target) <~lm_info_target>: Remove.
10499 <segment_bases, section_bases>: Change type to
10500 std::vector<CORE_ADDR>.
10501 (library_list_start_segment, library_list_start_section,
10502 library_list_end_library,
10503 solib_target_relocate_section_addresses): Adjust.
10505 2017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
10507 * gdbarch.sh (software_single_step): Change return type to
10508 std::vector<CORE_ADDR>.
10509 * gdbarch.c, gdbarch.h: Re-generate.
10510 * arch/arm-get-next-pcs.c (thumb_deal_with_atomic_sequence_raw):
10512 (arm_deal_with_atomic_sequence_raw): Adjust.
10513 (thumb_get_next_pcs_raw): Adjust.
10514 (arm_get_next_pcs_raw): Adjust.
10515 (arm_get_next_pcs): Adjust.
10516 * arch/arm-get-next-pcs.h (arm_get_next_pcs): Adjust.
10517 * aarch64-tdep.c (aarch64_software_single_step): Adjust.
10518 * alpha-tdep.c (alpha_deal_with_atomic_sequence): Adjust.
10519 (alpha_software_single_step): Adjust.
10520 * alpha-tdep.h (alpha_software_single_step): Adjust.
10521 * arm-linux-tdep.c (arm_linux_software_single_step): Adjust.
10522 * arm-tdep.c (arm_software_single_step): Adjust.
10523 (arm_breakpoint_kind_from_current_state): Adjust.
10524 * arm-tdep.h (arm_software_single_step): Adjust.
10525 * breakpoint.c (insert_single_step_breakpoint): Adjust.
10526 * cris-tdep.c (cris_software_single_step): Adjust.
10527 * mips-tdep.c (mips_deal_with_atomic_sequence): Adjust.
10528 (micromips_deal_with_atomic_sequence): Adjust.
10529 (deal_with_atomic_sequence): Adjust.
10530 (mips_software_single_step): Adjust.
10531 * mips-tdep.h (mips_software_single_step): Adjust.
10532 * moxie-tdep.c (moxie_software_single_step): Adjust.
10533 * nios2-tdep.c (nios2_software_single_step): Adjust.
10534 * ppc-tdep.h (ppc_deal_with_atomic_sequence): Adjust.
10535 * rs6000-aix-tdep.c (rs6000_software_single_step): Adjust.
10536 * rs6000-tdep.c (ppc_deal_with_atomic_sequence): Adjust.
10537 * s390-linux-tdep.c (s390_software_single_step): Adjust.
10538 * sparc-tdep.c (sparc_software_single_step): Adjust.
10539 * spu-tdep.c (spu_software_single_step): Adjust.
10540 * tic6x-tdep.c (tic6x_software_single_step): Adjust.
10542 2017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
10544 * gdbarch.sh: Use semi-colon as field separator instead of colon.
10545 * gdbarch.h: Re-generate.
10547 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
10549 * Makefile.in (SUBDIR_PYTHON_OBS): Add py-instruction.o.
10550 (SUBDIR_PYTHON_SRCS): Add py-instruction.c.
10551 * python/py-instruction.c, python/py-instruction.h: New file.
10552 * python/py-record.c: Add py-instruction.h include.
10553 (gdbpy_initialize_record): Make gdb.Instruction a super class of
10554 gdb.RecordInstruction.
10555 * python/python-internal.h: Add gdbpy_initialize_instruction
10557 * python/python.c (do_start_initialization): Add
10558 gdbpy_initialize_instruction.
10560 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
10562 * python/py-record-btrace.c (BTPY_REQUIRE_VALID_CALL, btpy_call_type):
10564 (btrace_func_from_recpy_func): New function.
10565 (btpy_call_new, btpy_number, btpy_hash, btpy_richcompare): Remove.
10566 (btpy_call_level, btpy_call_symbol, btpy_call_instructions,
10567 btpy_call_up, btpy_call_prev_sibling, btpy_call_next_sibling): Rename to ...
10568 (recpy_bt_func_level, recpy_bt_func_symbol, recpy_bt_func_instructions,
10569 recpy_bt_func_up, recpy_bt_func_prev, recpy_bt_func_next): This.
10570 Also, use new helper functions.
10571 (btpy_list_item): Use new helper functions.
10572 (recpy_bt_function_call_history): Use new type name.
10573 (btpy_call_getset): Remove.
10574 (gdbpy_initialize_btrace): Remove code to initialize
10575 gdb.BtraceFunctionCall.
10576 * python/py-record-btrace.h (recpy_bt_func_number, recpy_btb_func_level,
10577 recpy_btb_func_symbol, recpy_bt_func_instructions, recpy_bt_func_up,
10578 recpy_bt_func_prev, recpy_bt_func_next): New export.
10579 * python/py-record.c (recpy_func_type): New static object.
10580 (recpy_func_new, recpy_func_level, recpy_func_symbol,
10581 recpy_func_instructions, recpy_func_up, recpy_func_prev,
10582 recpy_func_next): New function.
10583 (recpy_element_hash, recpy_element_richcompare): Updated comment.
10584 (recpy_func_getset): New static object.
10585 (gdbpy_initialize_record): Add code to initialize gdb.RecordInstruction.
10586 * python/py-record.h (recpy_func_type, recpy_func_new): New export.
10588 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
10590 * python/py-record-btrace.c (BTPY_REQUIRE_VALID_INSN): Remove.
10591 (btpy_object, btpy_insn_type, btpy_new): Remove.
10592 (btpy_list_object): Use gdb.RecordInstruction type instead of
10593 gdb.BtraceInstruction type.
10594 (btrace_insn_from_recpy_insn): New function.
10595 (btpy_insn_or_gap_new): Adjust comment. Use recpy_insn_new instead of
10597 (btpy_call_new, btpy_list_item): Do not use btpy_new anymore.
10598 (btpy_number, btpy_hash, btpy_call_level, btpy_call_symbol,
10599 btpy_call_instructions, btpy_call_up, btpy_call_prev_sibling,
10600 btpy_call_next_sibling, btpy_richcompare): Use recpy_element_object
10601 instead of btpy_object.
10602 (btpy_insn_sal, btpy_insn_pc, btpy_insn_size, btpy_insn_is_speculative,
10603 btpy_insn_data, btpy_insn_decode): Rename to ...
10604 (recpy_bt_insn_sal, recpy_bt_insn_pc, recpy_bt_insn_size,
10605 recpy_bt_insn_is_speculative, recpy_bt_insn_data,
10606 recpy_bt_insn_decode): This. Also, use new helper functions.
10607 (btpy_list_position, recpy_bt_goto): Use recpy_element_object and
10609 (btpy_insn_getset): Remove.
10610 (gdbpy_initialize_btrace): Remove code to initialize
10611 gdb.BtraceInstruction. Use recpy_element_object.
10612 * python/py-record-btrace.h (recpy_bt_insn_number, recpy_bt_insn_sal,
10613 recpy_bt_insn_pc, recpy_bt_insn_data, recpy_bt_insn_decoded,
10614 recpy_bt_insn_size, recpy_bt_insn_is_speculative): New export.
10615 * python/py-record.c (recpy_insn_type): New static object.
10616 (recpy_insn_new, recpy_insn_sal, recpy_insn_pc, recpy_insn_data,
10617 recpy_insn_decoded, recpy_insn_size, recpy_insn_is_speculative,
10618 recpy_element_number, recpy_element_hash, recpy_element_richcompare):
10620 (recpy_insn_getset): New static object.
10621 (gdbpy_initialize_record): Initialize gdb.RecordInstruction.
10622 * python/py-record.h (recpy_element_object): New typedef.
10623 (recpy_insn_type, recpy_insn_new): New export.
10625 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
10627 * py-record-btrace.c (btpy_insn_new): Removed.
10628 (btpy_insn_or_gap_new): New function.
10629 (btpy_insn_error): Removed.
10630 (btpy_insn_sal, btpy_insn_pc, btpy_insn_size, btpy_insn_is_speculative,
10631 btpy_insn_data, btpy_insn_decode): Remove code path for gaps.
10632 (recpy_bt_replay_position, recpy_bt_begin, recpy_bt_end): Call
10633 btpy_insn_or_gap_new instead of btpy_insn_new.
10634 (btpy_insn_getset): Remove btpy_insn_error.
10635 * py-record.c (recpy_gap_type): New static object.
10636 (recpy_gap_object): New typedef.
10637 (recpy_gap_new, recpy_gap_number, recpy_gap_reason_code,
10638 recpy_gap_reason_string): New function.
10639 (recpy_gap_getset): New static object.
10640 (gdbpy_initialize_record): Initialize gdb.RecordGap type.
10641 * py-record.h (recpy_gap_new): New export.
10643 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
10645 * python/py-record.c (recpy_ptid): Remove.
10646 (recpy_record_getset): Remove recpy_ptid.
10648 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
10650 * btrace.c (btrace_fetch): Set inferior_ptid.
10651 * python/py-record-btrace.c: Add "py-record.h" include.
10652 (recpy_bt_format, recpy_bt_replay_position, recpy_bt_begin,
10653 recpy_bt_end, recpy_bt_instruction_history,
10654 recpy_bt_function_call_history, recpy_bt_goto): Use ptid stored
10655 in gdb.Record object instead of current ptid.
10656 * python/py-record.c: Include new "py-record.h" file.
10657 (recpy_record_object): Moved to py-record.h.
10658 * python/py-record.h: New file.
10660 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
10662 * python/py-record-btrace.c (BTPY_REQUIRE_VALID_INSN,
10663 BTPY_REQUIRE_VALID_CALL, recpy_bt_function_call_history): Fix
10666 2017-05-01 Joel Brobecker <brobecker@adacore.com>
10668 * MAINTAINERS: Move Daniel Jacobowitz and Mark Kettenis to
10669 the past maintainers section.
10671 2017-04-28 Yao Qi <yao.qi@linaro.org>
10673 * infcmd.c (get_return_value): Use regcache ctor, and remove
10676 2017-04-28 Yao Qi <yao.qi@linaro.org>
10677 Pedro Alves <palves@redhat.com>
10679 * regcache.c (regcache::regcache): New tag dispatch ctor.
10680 (do_cooked_read): Moved above.
10681 (regcache_dup): Use the tag dispatch ctor..
10682 * regcache.h (regcache): Declare ctor, delete copy ctor and
10683 assignment operator, remove friend regcache_dup.
10685 2017-04-28 Yao Qi <yao.qi@linaro.org>
10687 * regcache.c (regcache_dup): Assert !src->m_readonly_p and
10688 call method save instead of regcache_cpy.
10689 * regcache.h (struct regcache): Make regcache_dup a friend.
10691 2017-04-28 Yao Qi <yao.qi@linaro.org>
10693 * regcache.c (struct regcache): Move to regcache.h
10694 (regcache::arch): New method.
10695 (regcache_get_ptid): Update.
10696 (get_regcache_arch): Call arch method.
10697 (get_regcache_aspace): Call method aspace.
10698 (register_buffer): Change it to method.
10699 (regcache_save): Change it to regcache::save.
10700 (regcache_restore): Likewise.
10701 (regcache_cpy_no_passthrough): Remove the declaration.
10702 (regcache_cpy): Call methods restore and cpy_no_passthrough.
10703 (regcache_cpy_no_passthrough): Change it to method
10704 cpy_no_passthrough.
10705 (regcache_register_status): Change it to method
10706 get_register_status.
10707 (regcache_invalidate): Change it to method invalidate.
10708 (regcache_thread_ptid_changed): Use methods ptid and set_ptid.
10709 (regcache_raw_update): Change it to method raw_update.
10710 (regcache_raw_read): Likewise.
10711 (regcache_raw_read_signed): Likewise.
10712 (regcache_raw_read_unsigned): Likewise.
10713 (regcache_raw_write_signed): Likewise.
10714 (regcache_raw_write_unsigned): Likewise.
10715 (regcache_cooked_read): Likewise.
10716 (regcache_cooked_read_value): Likewise.
10717 (regcache_cooked_read_signed): Likewise.
10718 (regcache_cooked_read_unsigned): Likewise.
10719 (regcache_cooked_write_signed): Likewise.
10720 (regcache_cooked_write_unsigned): Likewise.
10721 (regcache_raw_set_cached_value): Likewise.
10722 (regcache_raw_write): Likewise.
10723 (regcache_cooked_write): Likewise.
10724 (regcache_xfer_part): Likewise.
10725 (regcache_raw_read_part): Likewise.
10726 (regcache_raw_write_part): Likewise.
10727 (regcache_cooked_read_part): Likewise.
10728 (regcache_cooked_write_part): Likewise.
10729 (regcache_raw_supply): Likewise.
10730 (regcache_raw_collect): Likewise.
10731 (regcache_transfer_regset): Likewise.
10732 (regcache_supply_regset): Likewise.
10733 (regcache_collect_regset): Likewise.
10734 (regcache_debug_print_register): Likewise.
10735 (enum regcache_dump_what): Move it to regcache.h.
10736 (regcache_dump): Change it to method dump.
10737 * regcache.h (enum regcache_dump_what): New.
10738 (class regcache): New.
10739 * target.c (target_fetch_registers): Call method
10740 debug_print_register.
10741 (target_store_registers): Likewise.
10743 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
10745 * windows-nat.c (struct lm_info_windows): Initialize field.
10746 (windows_make_so): Allocate lm_info_windows with new.
10747 (windows_free_so): Free lm_info_windows with delete.
10749 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
10751 * solib-darwin.c (struct lm_info_darwin): Initialize field.
10752 (darwin_current_sos): Allocate lm_info_darwin with new, remove
10754 (darwin_free_so): Free lm_info_darwin with delete.
10756 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
10758 * solib-svr4.h (struct lm_info_svr4): Initialize fields.
10759 <l_addr_p>: Change type to bool.
10760 * solib-svr4.c (lm_info_read): Allocate lm_info_svr4 with new.
10761 (svr4_free_so): Free lm_info_svr4 with delete.
10762 (svr4_copy_library_list): Replace memcpy with call to copy
10764 (library_list_start_library, svr4_default_sos): Allocate
10765 lm_info_svr4 with new.
10767 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
10769 * solib-target.c (struct lm_info_target): Add destructor,
10771 <name>: Change type to std::string.
10772 (library_list_start_library): Allocate lm_info_target with new.
10773 (solib_target_free_library_list): Free lm_info_target with
10775 (solib_target_current_sos): Adapt to std::string.
10776 (solib_target_free_so): Free lm_info_target with delete.
10778 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
10780 * solib-frv.c (struct lm_info_frv): Add destructor, initialize
10782 (frv_current_sos): Allocate lm_info_frv with new.
10783 (frv_relocate_main_executable): Free lm_info_frv with delete,
10785 (frv_clear_solib, frv_free_so): Free lm_info_frv with delete.
10787 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
10789 * solib-frv.c (struct lm_info_frv): Fix indentation.
10791 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
10793 * solib-dsbt.c (struct lm_info_dsbt): Add destructor, initialize
10795 (dsbt_current_sos): Allocate lm_info_dsbt with new.
10796 (dsbt_relocate_main_executable): Free lm_info_dsbt with delete
10797 and allocate with new.
10798 (dsbt_clear_solib, dsbt_free_so): Free lm_info_dsbt with delete.
10800 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
10802 * solib-aix.c (struct lm_info_aix): Initialize fields in-class.
10803 <filename, member_name>: Change type to std::string.
10804 (solib_aix_new_lm_info, solib_aix_xfree_lm_info): Remove.
10805 (library_list_start_library): Allocate lm_info_aix with new.
10806 (solib_aix_free_library_list, solib_aix_free_so): Free with delete.
10807 (solib_aix_current_sos): Adapt to std::string, copy lm_info_aix
10808 with copy constructor.
10810 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
10812 * solist.h (struct lm_info): Remove.
10813 (struct lm_info_base): New class.
10814 (struct so_list) <lm_info>: Change type to lm_info_base *.
10815 * nto-tdep.c (struct lm_info): Remove.
10817 * solib-aix.c (struct lm_info): Rename to ...
10818 (struct lm_info_aix): ... this. Extend lm_info_base.
10819 (lm_info_p): Rename to ...
10820 (lm_info_aix_p): ... this, and adjust.
10821 (solib_aix_new_lm_info, solib_aix_xfree_lm_info,
10822 solib_aix_parse_libraries, library_list_start_library,
10823 solib_aix_free_library_list, solib_aix_parse_libraries,
10824 solib_aix_get_library_list,
10825 solib_aix_relocate_section_addresses, solib_aix_free_so,
10826 solib_aix_get_section_offsets,
10827 solib_aix_solib_create_inferior_hook, solib_aix_current_sos):
10829 (struct solib_aix_inferior_data) <library_list>: Adjust.
10830 * solib-darwin.c (struct lm_info): Rename to ...
10831 (struct lm_info_darwin): ... this. Extend lm_info_base.
10832 (darwin_current_sos, darwin_relocate_section_addresses): Adjust.
10833 * solib-dsbt.c (struct lm_info): Rename to ...
10834 (struct lm_info_dsbt): ... this. Extend lm_info_base.
10835 (struct dsbt_info) <main_executable_lm_info): Adjust.
10836 (dsbt_current_sos, dsbt_relocate_main_executable, dsbt_free_so,
10837 dsbt_relocate_section_addresses): Adjust.
10838 * solib-frv.c (struct lm_info): Rename to ...
10839 (struct lm_info_frv): ... this. Extend lm_info_base.
10840 (main_executable_lm_info): Adjust.
10841 (frv_current_sos, frv_relocate_main_executable, frv_free_so,
10842 frv_relocate_section_addresses, frv_fdpic_find_global_pointer,
10843 find_canonical_descriptor_in_load_object,
10844 frv_fdpic_find_canonical_descriptor): Adjust.
10845 * solib-svr4.c (struct lm_info): Move to solib-svr4.h, renamed
10847 (lm_info_read, lm_addr_check, svr4_keep_data_in_core,
10848 svr4_clear_so, svr4_copy_library_list,
10849 library_list_start_library, svr4_default_sos, svr4_read_so_list,
10850 svr4_current_sos, svr4_fetch_objfile_link_map,
10851 solist_update_incremental): Adjust.
10852 * solib-svr4.h (struct lm_info_svr4): Move here from
10854 * solib-target.c (struct lm_info): Rename to ...
10855 (struct lm_info_target): ... this. Extend lm_info_base.
10856 (lm_info_p): Rename to ...
10857 (lm_info_target_p): ... this.
10858 (solib_target_parse_libraries, library_list_start_segment,
10859 library_list_start_section, library_list_start_library,
10860 library_list_end_library, solib_target_free_library_list,
10861 solib_target_current_sos, solib_target_free_so,
10862 solib_target_relocate_section_addresses): Adjust.
10863 * windows-nat.c (struct lm_info): Rename to ...
10864 (struct lm_info_windows): ... this. Extend lm_info_base.
10865 (windows_make_so, handle_load_dll, handle_unload_dll,
10866 windows_xfer_shared_libraries): Adjust.
10868 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
10870 * solib-darwin.c (struct darwin_so_list): Remove.
10871 (darwin_current_sos): Allocate an so_list object instead of a
10872 darwin_so_list, separately allocate an lm_info object.
10873 (darwin_free_so): Free lm_info.
10875 2017-04-28 John Baldwin <jhb@FreeBSD.org>
10877 * mips-tdep.c (print_gp_register_row): Replace printf_filtered
10878 with fprintf_filtered.
10880 2017-04-28 Yao Qi <yao.qi@linaro.org>
10882 * regcache.c (regcache::regcache): New function.
10883 (regcache::~regcache): New function.
10884 (regcache_xmalloc_1): Remove.
10885 (regcache_xmalloc): Call new regcache.
10886 (regcache_xfree): Call delete regcache.
10887 (get_thread_arch_aspace_regcache): Call new regcache.
10889 2017-04-28 Yao Qi <yao.qi@linaro.org>
10891 * mips-linux-nat.c (mips_linux_new_thread): Use ptid method
10892 lwp instead of ptid_get_lwp.
10894 2017-04-28 Yao Qi <yao.qi@linaro.org>
10896 * mips-linux-nat.c (mips_linux_new_thread): Get lwpid from
10897 lwp_info instead of getting from inferior_ptid.
10899 2017-04-27 Keith Seitz <keiths@redhat.com>
10901 * gdbtypes.c (LVALUE_REFERENCE_TO_RVALUE_BINDING_BADNESS)
10902 DIFFERENT_REFERENCE_TYPE_BADNESS): Remove.
10903 (CV_CONVERSION_BADNESS): Define.
10904 (rank_one_type): Remove overly restrictive rvalue reference
10906 Add cv-qualifier checks and subranks for type equality.
10907 * gdbtypes.h (REFERENCE_CONVERSION_RVALUE,
10908 REFERENCE_CONVERSION_CONST_LVALUE, CV_CONVERSION_BADNESS,
10909 CV_CONVERSION_CONST, CV_CONVERSION_VOLATILE): Declare.
10911 2017-04-27 Simon Marchi <simon.marchi@ericsson.com>
10913 * python/py-inferior.c (inferior_to_inferior_object): Increment reference
10914 count when creating the object.
10916 2017-04-27 Sangamesh Mallayya <sangamesh.swamy@in.ibm.com>
10917 Ulrich Weigand <uweigand@de.ibm.com>
10919 * xcoffread.c (read_xcoff_symtab): Read correct function auxiliary
10920 entry if xlc -qfuncsect or gcc -ffunction-sections compiler option
10922 (read_xcoff_symtab): Handle C_WEAKEXT storage class.
10923 (process_xcoff_symbol): Likewise.
10924 (scan_xcoff_symtab): Likewise.
10926 2017-04-26 Alan Hayward <alan.hayward@arm.com>
10928 * ia64-tdep.c (examine_prologue): Use get_frame_register_unsigned.
10929 (ia64_sigtramp_frame_prev_register): Use read_memory_unsigned_integer.
10930 (ia64_access_reg): Use get_frame_register_unsigned.
10931 (ia64_access_rse_reg): Likewise.
10932 (ia64_libunwind_frame_prev_register): Likewise.
10934 2017-04-26 Jiong Wang <jiong.wang@arm.com>
10936 * gdbarch.sh: New gdbarch method execute_dwarf_cfa_vendor_op.
10937 * gdbarch.c: Regenerated.
10938 * gdbarch.h: Regenerated.
10939 * dwarf2-frame.c (dwarf2_frame_state_alloc_regs): Made the
10940 visibility external.
10941 (execute_cfa_program): Call execute_dwarf_cfa_vendor_op for CFI
10942 between DW_CFA_lo_user and DW_CFA_high_user inclusive.
10943 (enum cfa_how_kind): Move to ...
10944 (struct dwarf2_frame_state_reg_info): Likewise.
10945 (struct dwarf2_frame_state): Likewise.
10946 * dwarf2-frame.h: ... here.
10947 (dwarf2_frame_state_alloc_regs): New declaration.
10948 * sparc-tdep.c (sparc_execute_dwarf_cfa_vendor_op): New function.
10949 (sparc32_gdbarch_init): Register execute_dwarf_cfa_vendor_op hook.
10951 2017-04-26 Alan Hayward <alan.hayward@arm.com>
10953 * xtensa-tdep.c (xtensa_pseudo_register_read): Use
10954 regcache_raw_read_unsigned.
10955 (xtensa_pseudo_register_write): Likewise.
10957 2017-04-26 Alan Hayward <alan.hayward@arm.com>
10959 * nds32-tdep.c (nds32_pseudo_register_read): Abort on errors.
10960 (nds32_pseudo_register_write): Likewise.
10962 2017-04-25 Yao Qi <yao.qi@linaro.org>
10964 * regcache.c (struct regcache) <readonly_p>: Change its type
10966 (regcache_xmalloc_1): Update parameter type and callers update.
10968 2017-04-25 Yao Qi <yao.qi@linaro.org>
10970 * aarch64-tdep.c (aarch64_gdbarch_init): Don't call
10971 set_gdbarch_wchar_bit.
10972 * arm-tdep.c (arm_gdbarch_init): Likewise.
10974 2017-04-25 Pedro Alves <palves@redhat.com>
10976 * common/poison.h [!HAVE_IS_TRIVIALLY_COPYABLE] (IsRelocatable)
10977 (BothAreRelocatable, memcopy, memmove): Don't define.
10978 * common/traits.h (__has_feature, HAVE_IS_TRIVIALLY_COPYABLE): New
10981 2017-04-25 Pedro Alves <palves@redhat.com>
10983 * common/common-defs.h: Include "common/poison.h".
10984 * common/function-view.h: (Not, Or, Requires): Move to traits.h
10986 * common/poison.h: New file.
10987 * common/traits.h: Include <type_traits>.
10988 (Not, Or, Requires): New, moved from common/function-view.h.
10990 2017-04-25 Pedro Alves <palves@redhat.com>
10992 * breakpoint.h (struct breakpoint): In-class initialize all
10993 fields. Make boolean fields "bool".
10994 * breakpoint.c (init_raw_breakpoint_without_location): Remove
10995 memset call and initializations no longer necessary.
10997 2017-04-25 Pedro Alves <palves@redhat.com>
10999 * btrace.c (pt_btrace_insn_flags): Change parameter type to
11001 (pt_btrace_insn): New function.
11002 (ftrace_add_pt): Remove memset call and use pt_btrace_insn.
11004 2017-04-25 Pedro Alves <palves@redhat.com>
11006 * ada-lang.c (ada_catchpoint_location): Now a "class". Remove
11007 "base" field and inherit from "bp_location" instead. Add
11009 (allocate_location_exception): Use new non-default ctor.
11010 * breakpoint.c (get_first_locp_gte_addr): Remove memset call.
11011 (init_bp_location): Convert to ...
11012 (bp_location::bp_location): ... this new ctor, and remove memset
11014 (base_breakpoint_allocate_location): Use the new non-default ctor.
11015 * breakpoint.h (bp_location): Now a class. Declare default and
11016 non-default ctors. In-class initialize all members.
11017 (init_bp_location): Remove declaration.
11019 2017-04-25 Pedro Alves <palves@redhat.com>
11021 * common/enum-flags.h (enum_flags): Don't implement copy ctor and
11022 assignment operator.
11024 2017-04-24 Yao Qi <yao.qi@linaro.org>
11026 * doublest.c (convert_doublest_to_floatformat): Call
11027 floatformat_totalsize_bytes.
11029 2017-04-22 Tom Tromey <tom@tromey.com>
11031 * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries): Use
11033 * stack.c (print_frame): Use ui_out_emit_list.
11034 * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Use
11036 * mi/mi-main.c (print_one_inferior)
11037 (mi_cmd_data_list_register_names)
11038 (mi_cmd_data_list_register_values, mi_cmd_list_features)
11039 (mi_cmd_list_target_features, mi_cmd_trace_frame_collected): Use
11041 * mi/mi-interp.c (mi_on_normal_stop_1): Use ui_out_emit_list.
11042 (mi_output_solib_attribs): Use ui_out_emit_list,
11044 * mi/mi-cmd-var.c (varobj_update_one): Use ui_out_emit_list.
11045 * mi/mi-cmd-stack.c (mi_cmd_stack_list_frames)
11046 (mi_cmd_stack_list_args, list_args_or_locals): Use
11048 * disasm.c (do_assembly_only): Use ui_out_emit_list.
11049 * breakpoint.c (print_solib_event, output_thread_groups): Use
11052 2017-04-22 Tom Tromey <tom@tromey.com>
11054 * mi/mi-main.c (print_variable_or_computed): Use ui_out_emit_tuple.
11055 * mi/mi-cmd-var.c (varobj_update_one): Use ui_out_emit_tuple.
11056 * mi/mi-cmd-stack.c (list_arg_or_local): Use ui_out_emit_tuple.
11058 2017-04-22 Tom Tromey <tom@tromey.com>
11060 * tracepoint.c (tvariables_info_1)
11061 (print_one_static_tracepoint_marker): Use ui_out_emit_tuple.
11063 2017-04-22 Tom Tromey <tom@tromey.com>
11065 * stack.c (print_frame_arg): Use ui_out_emit_tuple,
11066 annotate_arg_emitter.
11067 * breakpoint.c (print_mention_watchpoint)
11068 (print_mention_masked_watchpoint): Use ui_out_emit_tuple.
11069 * annotate.h (struct annotate_arg_emitter): New.
11071 2017-04-22 Tom Tromey <tom@tromey.com>
11073 * record-btrace.c (record_btrace_insn_history)
11074 (record_btrace_insn_history_range, record_btrace_call_history)
11075 (record_btrace_call_history_range): Use ui_out_emit_tuple.
11076 * thread.c (do_captured_list_thread_ids, print_thread_info_1): Use
11078 * stack.c (print_frame_info): Use ui_out_emit_tuple.
11079 * solib.c (info_sharedlibrary_command): Use ui_out_emit_tuple.
11080 * skip.c (skip_info): Use ui_out_emit_tuple.
11081 * remote.c (show_remote_cmd): Use ui_out_emit_tuple.
11082 * progspace.c (print_program_space): Use ui_out_emit_tuple.
11083 * probe.c (info_probes_for_ops): Use ui_out_emit_tuple.
11084 * osdata.c (info_osdata): Use ui_out_emit_tuple.
11085 * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Use
11087 * mi/mi-main.c (print_one_inferior, list_available_thread_groups)
11088 (output_register, mi_cmd_data_read_memory)
11089 (mi_cmd_data_read_memory_bytes, mi_load_progress)
11090 (mi_cmd_trace_frame_collected): Use ui_out_emit_tuple.
11091 * mi/mi-cmd-var.c (mi_cmd_var_list_children, varobj_update_one):
11092 Use ui_out_emit_tuple.
11093 * mi/mi-cmd-stack.c (mi_cmd_stack_list_args): Use
11095 * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions)
11096 (mi_cmd_info_gdb_mi_command): Use ui_out_emit_tuple.
11097 * linux-thread-db.c (info_auto_load_libthread_db): Use
11099 * inferior.c (print_inferior): Use ui_out_emit_tuple.
11100 * gdb_bfd.c (print_one_bfd): Use ui_out_emit_tuple.
11101 * disasm.c (do_mixed_source_and_assembly_deprecated)
11102 (do_mixed_source_and_assembly): Use ui_out_emit_tuple.
11103 * cp-abi.c (list_cp_abis): Use ui_out_emit_tuple.
11104 * cli/cli-setshow.c (cmd_show_list): Use ui_out_emit_tuple.
11105 * breakpoint.c (print_one_breakpoint_location)
11106 (print_one_breakpoint): Use ui_out_emit_tuple.
11107 * auto-load.c (print_script, info_auto_load_cmd): Use
11109 * ada-tasks.c (print_ada_task_info): Use ui_out_emit_tuple.
11111 2017-04-21 Simon Marchi <simon.marchi@ericsson.com>
11113 * thread.c (print_thread_info_1): Remove dead code.
11115 2017-04-21 Jan Kratochvil <jan.kratochvil@redhat.com>
11117 * aarch64-tdep.c (selftests::aarch64_process_record_test): Make it #if
11119 * arm-tdep.c (selftests::arm_record_test): Likewise.
11121 2017-04-21 Yao Qi <yao.qi@linaro.org>
11123 * regcache.c (regcache_restore): Remove argument 2. Replace
11124 argument 3 with regcache. Get register status from
11125 src->register_status and get register contents from
11126 register_buffer (src, regnum).
11127 (regcache_cpy): Update.
11129 2017-04-19 Pedro Alves <palves@redhat.com>
11131 * gdbthread.h (thread): Add missing closing parenthesis in
11134 2017-04-19 Pedro Alves <palves@redhat.com>
11136 * common/refcounted-object.h: New file.
11137 * gdbthread.h: Include "common/refcounted-object.h".
11138 (thread_info): Inherit from refcounted_object and add comments.
11139 (thread_info::incref, thread_info::decref)
11140 (thread_info::m_refcount): Delete.
11141 (thread_info::deletable): Use the refcounted_object::refcount()
11143 * inferior.c (current_inferior_): Add comment.
11144 (set_current_inferior): Increment/decrement refcounts.
11145 (prune_inferiors, remove_inferior_command): Skip inferiors marked
11146 not-deletable instead of comparing with the current inferior.
11147 (initialize_inferiors): Increment the initial inferior's refcount.
11148 * inferior.h (struct inferior): Forward declare.
11149 Include "common/refcounted-object.h".
11150 (current_inferior, set_current_inferior): Move declaration to
11151 before struct inferior's definition, and fix comment.
11152 (inferior): Inherit from refcounted_object. Add comments.
11153 * thread.c (switch_to_thread_no_regs): Reference the thread's
11154 inferior pointer directly instead of doing a ptid lookup.
11155 (switch_to_no_thread): New function.
11156 (switch_to_thread(thread_info *)): New function, factored out
11158 (switch_to_thread(ptid_t)): ... this.
11159 (restore_current_thread): Delete.
11160 (current_thread_cleanup): Remove 'inf_id' and 'was_removable'
11161 fields, and add 'inf' field.
11162 (do_restore_current_thread_cleanup): Check whether old->inf is
11163 alive instead of looking up an inferior by ptid. Use
11164 switch_to_thread and switch_to_no_thread.
11165 (restore_current_thread_cleanup_dtor): Use old->inf directly
11166 instead of lookup up an inferior by id. Decref the inferior.
11167 Don't restore 'removable'.
11168 (make_cleanup_restore_current_thread): Same the inferior pointer
11169 in old, instead of the inferior number. Incref the inferior.
11170 Don't save/clear 'removable'.
11172 2017-04-19 Pedro Alves <palves@redhat.com>
11174 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
11175 unittests/scoped_restore-selftests.c.
11176 (SUBDIR_UNITTESTS_OBS): Add scoped_restore-selftests.o.
11177 * common/scoped_restore.h (scoped_restore_base): Make "class".
11178 (scoped_restore_base::release): New public method.
11179 (scoped_restore_base::scoped_restore_base): New protected ctor.
11180 (scoped_restore_base::m_saved_var): New protected field.
11181 (scoped_restore_tmpl::scoped_restore_tmpl(T*)): Initialize the
11182 scoped_restore_base base class instead of m_saved_var directly.
11183 (scoped_restore_tmpl::scoped_restore_tmpl(T*, T2)): Likewise.
11184 (scoped_restore_tmpl::scoped_restore_tmpl(const
11185 scoped_restore_tmpl<T>&)): Likewise.
11186 (scoped_restore_tmpl::~scoped_restore_tmpl): Use the saved_var
11188 (scoped_restore_tmpl::saved_var): New method.
11189 (scoped_restore_tmpl::m_saved_var): Delete.
11190 * inferior.h (inferior::detaching): Now a bool.
11191 * infrun.c (prepare_for_detach): Use a scoped_restore instead of a
11193 * unittests/scoped_restore-selftests.c: New file.
11195 2017-04-19 Pedro Alves <palves@redhat.com>
11197 * Makefile.in (SUBDIR_UNITTESTS_SRCS, SUBDIR_UNITTESTS_OBS):
11198 Re-sort in alphabetic order.
11200 2017-04-18 Pedro Alves <palves@redhat.com>
11202 * xml-support.c (obstack_xml_printf): Delete.
11203 * xml-support.h (obstack_xml_printf): Delete.
11205 2017-04-18 Pedro Alves <palves@redhat.com>
11207 * xml-support.c (gdb_xml_parser) <use_dtd, dtd_name, parse,
11208 vdebug, verror, body_text, start_element, end_element, name,
11209 user_data, set_is_xinclude, set_error, expat_parser>: New methods.
11210 <name, user_data, expat_parser, scopes, error, last_line, dtd_name,
11211 is_xinclude>: Make private and add m_ prefix.
11212 (gdb_xml_parser::body_text): New method, based on ...
11213 (gdb_xml_body_text): ... this. Adjust.
11214 (gdb_xml_parser::vdebug): New method, based on ...
11215 (gdb_xml_debug): ... this. Adjust.
11216 (gdb_xml_parser::verror): New method, based on ...
11217 (gdb_xml_error): ... this. Adjust.
11218 (gdb_xml_parser::start_element): New method, based on ...
11219 (gdb_xml_start_element): ... this. Adjust.
11220 (gdb_xml_start_element_wrapper): Defer to
11221 gdb_xml_parser::start_element and gdb_xml_parser::set_error.
11222 (gdb_xml_parser::end_element): New method, based on ...
11223 (gdb_xml_end_element_wrapper): ... this. Adjust.
11224 (gdb_xml_parser::~gdb_xml_parser): Adjust.
11225 (gdb_xml_parser::gdb_xml_parser): Adjust to field renames.
11226 (gdb_xml_parser::use_dtd): New method, based on ...
11227 (gdb_xml_use_dtd): ... this. Adjust.
11228 (gdb_xml_parser::parse): New method, based on ...
11229 (gdb_xml_parse): ... this. Adjust.
11230 (gdb_xml_parse_quick): Adjust to call the parser's parse method.
11231 (xinclude_start_include): Adjust to call the parser's name method.
11232 (xml_xinclude_default, xml_xinclude_start_doctype)
11233 (xml_xinclude_end_doctype): Adjust to call the parser's user_data
11235 (xml_process_xincludes): Adjust to call parser methods.
11236 * xml-support.h (gdb_xml_use_dtd, gdb_xml_parse): Delete
11239 2017-04-18 Pedro Alves <palves@redhat.com>
11241 * tracefile-tfile.c (tfile_write_tdesc): Adjust to use
11242 gdb::optional<std::string>.
11243 * xml-support.c: Include <string>.
11244 (scope_level::scope_level(scope_level &&))
11245 (scope_level::~scope_level): Delete.
11246 (scope_level::body): Now a std::string.
11247 (gdb_xml_body_text, gdb_xml_end_element): Adjust.
11248 (xinclude_parsing_data::xinclude_parsing_data): Add 'output'
11250 (xinclude_parsing_data::~xinclude_parsing_data): Delete.
11251 (xinclude_parsing_data::output): Now a std::string reference.
11252 (xinclude_start_include): Adjust.
11253 (xml_xinclude_default): Adjust.
11254 (xml_process_xincludes): Add 'output' parameter, and return bool.
11255 * xml-support.h (xml_process_xincludes): Add 'output' parameter,
11257 * xml-tdesc.c: Include <unordered_map> and <string>.
11258 (tdesc_xml_cache): Delete.
11259 (tdesc_xml_cache_s): Delete.
11260 (xml_cache): Now an std::unordered_map.
11261 (tdesc_parse_xml): Adjust to use std::string and unordered_map.
11262 (target_fetch_description_xml): Change return type to
11263 gdb::optional<std::string>, and adjust.
11264 * xml-tdesc.h: Include "common/gdb_optional.h" and <string>.
11265 (target_fetch_description_xml): Change return type to
11266 gdb::optional<std::string>.
11268 2017-04-18 Pedro Alves <palves@redhat.com>
11270 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
11271 unittests/optional-selftests.c.
11272 (SUBDIR_UNITTESTS_OBS): Add optional-selftests.o.
11273 * unittests/optional-selftests.c: New file.
11274 * unittests/optional/assignment/1.cc: New file.
11275 * unittests/optional/assignment/2.cc: New file.
11276 * unittests/optional/assignment/3.cc: New file.
11277 * unittests/optional/assignment/4.cc: New file.
11278 * unittests/optional/assignment/5.cc: New file.
11279 * unittests/optional/assignment/6.cc: New file.
11280 * unittests/optional/assignment/7.cc: New file.
11281 * unittests/optional/cons/copy.cc: New file.
11282 * unittests/optional/cons/default.cc: New file.
11283 * unittests/optional/cons/move.cc: New file.
11284 * unittests/optional/cons/value.cc: New file.
11285 * unittests/optional/in_place.cc: New file.
11286 * unittests/optional/observers/1.cc: New file.
11287 * unittests/optional/observers/2.cc: New file.
11289 2017-04-18 Pedro Alves <palves@redhat.com>
11291 * common/gdb_optional.h: Include common/traits.h.
11292 (in_place_t): New type.
11293 (in_place): New constexpr variable.
11294 (optional::optional): Remove member initialization of
11296 (optional::optional(in_place_t...)): New constructor.
11297 (optional::~optional): Use reset.
11298 (optional::optional(const optional&)): New.
11299 (optional::optional(const optional&&)): New.
11300 (optional::optional(T &)): New.
11301 (optional::optional(T &&)): New.
11302 (operator::operator=(const optional &)): New.
11303 (operator::operator=(optional &&)): New.
11304 (operator::operator= (const T &))
11305 (operator::operator= (T &&))
11306 (operator::emplace (Args &&... args)): Return a T&. Use reset.
11307 (operator::reset): New.
11308 (operator::m_instantiated):: Add in-class initializer.
11309 * common/traits.h: Include <type_traits>.
11310 (struct And): New types.
11312 2017-04-18 Pedro Alves <palves@redhat.com>
11314 * xml-support.c: Include <vector>.
11315 (scope_level::scope_level(const gdb_xml_element *))
11316 (scope_level::scope_level(scope_level&&)): New.
11317 (scope_level::~scope_level): New.
11318 (scope_level_s): Delete.
11319 (gdb_xml_parser::scopes): Now a std::vector.
11320 (gdb_xml_body_text, gdb_xml_start_element, gdb_xml_end_element):
11322 (gdb_xml_parser::~gdb_xml_parser): Remove now unnecessary
11323 scope cleanup code.
11324 (gdb_xml_parser::gdb_xml_parser): Remove explicit initialization
11325 of the scopes member. Use std::vector::emplace_back.
11327 2017-04-18 Pedro Alves <palves@redhat.com>
11329 * xml-support.c (gdb_xml_parser): Add ctor/dtor. Make is_xinclude
11331 (gdb_xml_end_element): Change type of first parameter.
11332 (gdb_xml_cleanup): Rename to ...
11333 (gdb_xml_parser::~gdb_xml_parser): ... this.
11334 (gdb_xml_create_parser_and_cleanup): Delete with ...
11335 (gdb_xml_parser::gdb_xml_parser): ... creation parts factored out
11337 (gdb_xml_parse_quick): Create a local gdb_xml_parser instead of
11338 using gdb_xml_create_parser_and_cleanup.
11339 (xinclude_parsing_data): Add ctor/dtor.
11340 (xml_xinclude_cleanup): Delete.
11341 (xml_process_xincludes): Create a local xinclude_parsing_data
11342 instead of heap-allocating one. Create a local gdb_xml_parser
11343 instead of heap-allocating one with
11344 gdb_xml_create_parser_and_cleanup.
11346 2017-04-18 John Baldwin <jhb@FreeBSD.org>
11349 * fbsd-nat.c (resume_one_thread_cb): Remove.
11350 (resume_all_threads_cb): Remove.
11351 (fbsd_resume): Use ALL_NON_EXITED_THREADS instead of
11352 iterate_over_threads.
11354 2017-04-17 Joel Brobecker <brobecker@adacore.com>
11356 * NEWS: Create a new section for the next release branch.
11357 Rename the section of the current branch, now that it has
11360 2017-04-17 Joel Brobecker <brobecker@adacore.com>
11362 GDB 8.0 branch created (725bf5cf125783c2a7ca4ab63d3768e220bab2db):
11363 * version.in: Bump version to 8.0.50.DATE-git.
11365 2017-04-13 Sergio Durigan Junior <sergiodj@redhat.com>
11368 * windows-nat.c (windows_create_inferior): Declare 'allargs'
11369 independently of the host, and fix build breakage on Cygwin.
11371 2017-04-13 Pedro Alves <palves@redhat.com>
11373 * inferior.c (free_inferior): Convert to ...
11374 (inferior::~inferior): ... this dtor.
11375 (inferior::inferior): New ctor, factored out from ...
11376 (add_inferior_silent): ... here. Allocate the inferior with a new
11378 (delete_inferior): Call delete instead of free_inferior.
11379 * inferior.h (gdb_environ, continuation): Forward declare.
11380 (inferior): Now a class. Add in-class initialization to all
11381 members. Make boolean fields bool, except 'detaching'.
11382 (inferior::inferior): New explicit ctor.
11383 (inferior::~inferior): New.
11385 2017-04-13 Pedro Alves <palves@redhat.com>
11387 * inferior.c (init_inferior_list): Delete.
11388 * inferior.h (init_inferior_list): Delete.
11390 2017-04-13 Pedro Alves <palves@redhat.com>
11393 * gdb.threads/threadapply.exp (thr_apply_detach): New procedure.
11394 (top level): Call it twice, with different thread sets.
11396 2017-04-13 Pedro Alves <palves@redhat.com>
11398 * thread.c: Include <algorithm>.
11399 (thread_array_cleanup): Delete.
11400 (scoped_inc_dec_ref): New class.
11401 (live_threads_count): New function.
11402 (set_thread_refcount): Delete.
11403 (tp_array_compar_ascending): Now a bool.
11404 (tp_array_compar): Convert to a std::sort comparison function.
11405 (thread_apply_all_command): Use std::vector and scoped_inc_dec_ref
11406 and live_threads_count.
11408 2017-04-13 Pedro Alves <palves@redhat.com>
11410 * infrun.c (follow_fork_inferior): Also switch the current
11413 2017-04-13 Pedro Alves <palves@redhat.com>
11415 * breakpoint.c (watch_command_1): Save watchpoint-frame info
11416 before calling create_internal_breakpoint.
11418 2017-04-13 Pedro Alves <palves@redhat.com>
11420 * fork-child.c (execv_argv): New class.
11421 (breakup_args): Refactored as ...
11422 (execv_argv::init_for_no_shell): .. this method of execv_argv.
11423 Copy arguments to storage and replace separators with NULL
11424 terminators in place.
11425 (escape_bang_in_quoted_argument): Adjust to return bool.
11426 (execv_argv::execv_argv): New ctor.
11427 (execv_argv::init_for_shell): New method, factored out from
11428 fork_inferior. Don't strdup strings into the vector.
11429 (fork_inferior): Eliminate "shell" local and use execv_argv. Use
11430 Remove free_vector_argv call.
11432 2017-04-13 Yao Qi <yao.qi@linaro.org>
11434 * rx-tdep.c (rx_fpsw_type): Check tdep->rx_fpsw_type instead of
11437 2017-04-13 Yao Qi <yao.qi@linaro.org>
11439 * rl78-tdep.c (rl78_gdbarch_init): Use XCNEW instead of XNEW.
11440 * rx-tdep.c (rx_gdbarch_init): Likewise.
11442 2017-04-13 Pedro Alves <palves@redhat.com>
11444 * breakpoint.h (struct breakpoint): Reindent.
11446 2017-04-13 Pedro Alves <palves@redhat.com>
11448 * breakpoint.c (bp_location): Rename to ...
11449 (bp_locations): ... this. All references updated.
11450 (bp_location_count): Rename to ...
11451 (bp_locations_count): ... this. All references updated.
11452 (bp_location_placed_address_before_address_max): Rename to ...
11453 (bp_locations_placed_address_before_address_max): ... this. All
11454 references updated.
11455 (bp_location_shadow_len_after_address_max): Rename to ...
11456 (bp_locations_shadow_len_after_address_max): ... this. All
11457 references updated.
11458 (bp_location_compare_addrs): Rename to ...
11459 (bp_locations_compare_addrs): ... this. All references updated.
11460 (bp_location_compare):Rename to ...
11461 (bp_locations_compare): ... this. All references updated.
11462 (bp_location_target_extensions_update): Rename to ...
11463 (bp_locations_target_extensions_update): ... this. All references
11466 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
11468 * Makefile.in (HFILES_NO_SRCDIR): Add "common/gdb_termios.h".
11469 * common/common.m4: Check headers 'termios.h', 'termio.h' and
11471 * common/gdb_termios.h: New file, with parts of "terminal.h".
11472 * inflow.c: Include "gdb_termios.h".
11473 * ser-unix.c: Include "gdb_termios.h".
11474 * terminal.h: Move terminal-related defines to
11475 "common/gdb_termios.h".
11477 2017-04-12 Tom Tromey <tom@tromey.com>
11479 * probe.c (parse_probes): Update.
11480 * location.h (delete_event_location): Don't declare.
11481 (event_location_deleter::operator()): Update.
11482 * location.c (event_location_deleter::operator()): Rename from
11483 delete_event_location.
11484 * linespec.h (linespec_result) <location>: Change type to
11486 * linespec.c (canonicalize_linespec, event_location_to_sals)
11487 (decode_objc): Update.
11488 (linespec_result): Don't call delete_event_location.
11489 * breakpoint.c (create_breakpoints_sal)
11490 (bkpt_probe_create_sals_from_location)
11491 (strace_marker_create_sals_from_location): Update.
11493 2017-04-12 Tom Tromey <tom@tromey.com>
11495 * linespec.h (struct linespec_result): Add constructor and
11497 (init_linespec_result, destroy_linespec_result)
11498 (make_cleanup_destroy_linespec_result): Don't declare.
11499 * linespec.c (init_linespec_result): Remove.
11500 (linespec_result::~linespec_result): Rename from
11501 destroy_linespec_result. Update.
11502 (cleanup_linespec_result, make_cleanup_destroy_linespec_result):
11504 * breakpoint.c (create_breakpoint, break_range_command)
11505 (decode_location_default): Update.
11506 * ax-gdb.c (agent_command_1): Update.
11508 2017-04-12 Tom Tromey <tom@tromey.com>
11510 * remote.c (remote_download_tracepoint): Update.
11511 * python/py-breakpoint.c (bppy_get_location): Update.
11512 * guile/scm-breakpoint.c (bpscm_print_breakpoint_smob)
11513 (gdbscm_breakpoint_location): Update.
11514 * elfread.c (elf_gnu_ifunc_resolver_return_stop): Update.
11515 * breakpoint.h (struct breakpoint) <location, location_range_end>:
11516 Change type to event_location_up.
11517 * breakpoint.c (create_overlay_event_breakpoint)
11518 (create_longjmp_master_breakpoint)
11519 (create_std_terminate_master_breakpoint)
11520 (create_exception_master_breakpoint)
11521 (breakpoint_event_location_empty_p, print_breakpoint_location)
11522 (print_one_breakpoint_location, create_thread_event_breakpoint)
11523 (init_breakpoint_sal, create_breakpoint)
11524 (print_recreate_ranged_breakpoint, break_range_command)
11525 (init_ada_exception_breakpoint, say_where): Update.
11526 (base_breakpoint_dtor): Don't call delete_event_location.
11527 (bkpt_print_recreate, tracepoint_print_recreate)
11528 (dprintf_print_recreate, update_static_tracepoint)
11529 (breakpoint_re_set_default): Update.
11531 2017-04-12 Tom Tromey <tom@tromey.com>
11533 * compile/compile-loc2c.c (compute_stack_depth_worker): Change
11534 type of "to_do". Update.
11535 (compute_stack_depth): Use std::vector.
11537 2017-04-12 Tom Tromey <tom@tromey.com>
11539 * printcmd.c (find_instruction_backward): Use std::vector.
11541 2017-04-12 Tom Tromey <tom@tromey.com>
11543 * symfile.c (objfilep): Remove typedef.
11544 (reread_symbols): Use a std::vector.
11546 2017-04-12 Tom Tromey <tom@tromey.com>
11548 * mi/mi-main.c (exec_direction_forward): Remove.
11549 (exec_reverse_continue, mi_execute_command): Use scoped_restore.
11550 * guile/scm-ports.c (ioscm_with_output_to_port_worker): Use
11552 * guile/guile.c (guile_repl_command, guile_command)
11553 (gdbscm_execute_gdb_command): Use scoped_restore.
11554 * go-exp.y (go_parse): Use scoped_restore.
11555 * d-exp.y (d_parse): Use scoped_restore.
11556 * cli/cli-decode.c (cmd_func): Use scoped_restore.
11557 * c-exp.y (c_parse): Use scoped_restore.
11559 2017-04-12 Tom Tromey <tom@tromey.com>
11561 * mi/mi-parse.h (struct mi_parse): Add constructor, destructor.
11562 (mi_parse): Update return type.
11563 (mi_parse_free): Remove.
11564 * mi/mi-parse.c (mi_parse::mi_parse): New constructor.
11565 (mi_parse::~mi_parse): Rename from mi_parse_free.
11566 (mi_parse_cleanup): Remove.
11567 (mi_parse): Return a unique_ptr. Use new.
11568 * mi/mi-main.c (mi_execute_command): Update.
11570 2017-04-12 Tom Tromey <tom@tromey.com>
11572 * location.c (explicit_location_lex_one): Return a
11573 unique_xmalloc_ptr.
11574 (string_to_explicit_location): Update. Remove cleanups.
11576 2017-04-12 Tom Tromey <tom@tromey.com>
11578 * gnu-v3-abi.c (value_and_voffset_p): Remove typedef.
11579 (compare_value_and_voffset): Change type. Update.
11580 (compute_vtable_size): Change type of "offset_vec".
11581 (gnuv3_print_vtable): Use std::vector. Remove cleanups.
11582 (gnuv3_get_typeid): Remove extraneous declaration.
11584 2017-04-12 Tom Tromey <tom@tromey.com>
11586 * charset.h (wchar_iterator): Fix comment.
11588 2017-04-12 Tom Tromey <tom@tromey.com>
11590 * charset.c (iconv_wrapper): New class.
11591 (cleanup_iconv): Remove.
11592 (convert_between_encodings): Use it.
11594 2017-04-12 Tom Tromey <tom@tromey.com>
11596 * symfile.h (increment_reading_symtab): Update type.
11597 * symfile.c (decrement_reading_symtab): Remove.
11598 (increment_reading_symtab): Return a scoped_restore_tmpl<int>.
11599 * psymtab.c (psymtab_to_symtab): Update.
11600 * dwarf2read.c (dw2_instantiate_symtab): Update.
11602 2017-04-12 Tom Tromey <tom@tromey.com>
11604 * jit.c (struct jit_reader): Declare separately. Add constructor
11605 and destructor. Change type of "handle".
11606 (loaded_jit_reader): Define separately.
11607 (jit_reader_load): Update. New "new".
11608 (jit_reader_unload_command): Use "delete".
11609 * gdb-dlfcn.h (struct dlclose_deleter): New.
11610 (gdb_dlhandle_up): New typedef.
11611 (gdb_dlopen, gdb_dlsym): Update types.
11612 (gdb_dlclose): Remove.
11613 * gdb-dlfcn.c (gdb_dlopen): Return a gdb_dlhandle_up.
11614 (gdb_dlsym): Change type of "handle".
11615 (make_cleanup_dlclose): Remove.
11616 (dlclose_deleter::operator()): Rename from gdb_dlclose.
11617 * compile/compile-c-support.c (load_libcc): Update.
11619 2017-04-12 Tom Tromey <tom@tromey.com>
11621 * symtab.h (find_pcs_for_symtab_line): Change return type.
11622 * symtab.c (find_pcs_for_symtab_line): Change return type.
11623 * python/py-linetable.c (build_line_table_tuple_from_pcs): Change
11624 type of "vec". Update.
11625 (ltpy_get_pcs_for_line): Update.
11626 * linespec.c (decode_digits_ordinary): Update.
11628 2017-04-12 Tom Tromey <tom@tromey.com>
11630 * tracepoint.c (actions_command): Update.
11631 * python/python.c (python_command, python_interactive_command):
11633 * mi/mi-cmd-break.c (mi_cmd_break_commands): Update.
11634 * guile/guile.c (guile_command): Update.
11635 * defs.h (read_command_lines, read_command_lines_1): Return
11637 (command_lines_deleter): New struct.
11638 (command_line_up): New typedef.
11639 * compile/compile.c (compile_code_command)
11640 (compile_print_command): Update.
11641 * cli/cli-script.h (get_command_line, copy_command_lines): Return
11643 (make_cleanup_free_command_lines): Remove.
11644 * cli/cli-script.c (get_command_line, read_command_lines_1)
11645 (copy_command_lines): Return command_line_up.
11646 (while_command, if_command, read_command_lines, define_command)
11647 (document_command): Update.
11648 (do_free_command_lines_cleanup, make_cleanup_free_command_lines):
11650 * breakpoint.h (breakpoint_set_commands): Change type of
11652 * breakpoint.c (breakpoint_set_commands): Change type of
11653 "commands". Update.
11654 (do_map_commands_command, update_dprintf_command_list)
11655 (create_tracepoint_from_upload): Update.
11657 2017-04-12 Tom Tromey <tom@tromey.com>
11659 * tracepoint.c (scope_info): Update.
11660 * spu-tdep.c (spu_catch_start): Update.
11661 * python/python.c (gdbpy_decode_line): Update.
11662 * python/py-finishbreakpoint.c (bpfinishpy_init): Update.
11663 * python/py-breakpoint.c (bppy_init): Update.
11664 * probe.c (parse_probes): Update.
11665 * mi/mi-cmd-break.c (mi_cmd_break_insert_1): Update.
11666 * location.h (event_location_deleter): New struct.
11667 (event_location_up): New typedef.
11668 (new_linespec_location, new_address_location, new_probe_location)
11669 (new_explicit_location, copy_event_location)
11670 (string_to_event_location, string_to_event_location_basic)
11671 (string_to_explicit_location): Update return type.
11672 (make_cleanup_delete_event_location): Remove.
11673 * location.c (new_linespec_location, new_address_location)
11674 (new_probe_location, new_explicit_location, copy_event_location):
11675 Return event_location_up.
11676 (delete_event_location_cleanup)
11677 (make_cleanup_delete_event_location): Remove.
11678 (string_to_explicit_location, string_to_event_location_basic)
11679 (string_to_event_location): Return event_location_up.
11680 * linespec.c (canonicalize_linespec, event_location_to_sals)
11681 (decode_line_with_current_source)
11682 (decode_line_with_last_displayed, decode_objc): Update.
11683 * guile/scm-breakpoint.c (gdbscm_register_breakpoint_x): Update.
11684 * completer.c (location_completer): Update.
11685 * cli/cli-cmds.c (edit_command, list_command): Update.
11686 * breakpoint.c (create_overlay_event_breakpoint)
11687 (create_longjmp_master_breakpoint)
11688 (create_std_terminate_master_breakpoint)
11689 (create_exception_master_breakpoint)
11690 (create_thread_event_breakpoint): Update.
11691 (init_breakpoint_sal): Update. Remove some dead code.
11692 (create_breakpoint_sal): Change type of "location". Update.
11693 (create_breakpoints_sal, create_breakpoint, break_command_1)
11694 (dprintf_command, break_range_command, until_break_command)
11695 (init_ada_exception_breakpoint)
11696 (strace_marker_create_sals_from_location)
11697 (update_static_tracepoint, trace_command, ftrace_command)
11698 (strace_command, create_tracepoint_from_upload): Update.
11699 * break-catch-throw.c (re_set_exception_catchpoint): Update.
11700 * ax-gdb.c (agent_command_1): Update.
11702 2017-04-12 Pedro Alves <palves@redhat.com>
11704 * Makefile.in (ALL_TARGET_OBS): Add i386-go32-tdep.o.
11705 * configure.tgt: Handle i[34567]86-*-go32* and
11706 i[34567]86-*-msdosdjgpp*.
11707 * i386-tdep.c (i386_svr4_reg_to_regnum):
11709 (i386_go32_init_abi, i386_coff_osabi_sniffer): Moved to
11711 (_initialize_i386_tdep): DJGPP bits moved to i386-go32-tdep.c.
11712 * i386-go32-tdep.c: New file.
11713 * i386-tdep.h (tdesc_i386_mmx, i386_svr4_reg_to_regnum): New
11716 2017-04-12 Simon Marchi <simon.marchi@ericsson.com>
11718 * aix-thread.c (pd_status2str): Change return type to const char *.
11720 2017-04-12 Pedro Alves <palves@redhat.com>
11722 * i386-tdep.c (i386_elf_init_abi, i386_go32_init_abi): Remove
11723 calls to set_gdbarch_gnu_triplet_regexp.
11725 2017-04-12 Pedro Alves <palves@redhat.com>
11728 * c-lang.c (cplus_primitive_types) <cplus_primitive_type_wchar_t>:
11730 (cplus_language_arch_info): Register cplus_primitive_type_wchar_t.
11731 * gdbtypes.h (struct builtin_type) <builtin_wchar>: New field.
11732 * gdbtypes.c (gdbtypes_post_init): Create the "wchar_t" type.
11733 * gdbarch.sh (wchar_bit, wchar_signed): New per-arch values.
11734 * gdbarch.h, gdbarch.c: Regenerate.
11735 * aarch64-tdep.c (aarch64_gdbarch_init): Override
11736 gdbarch_wchar_bit and gdbarch_wchar_signed.
11737 * alpha-tdep.c (alpha_gdbarch_init): Likewise.
11738 * arm-tdep.c (arm_gdbarch_init): Likewise.
11739 * avr-tdep.c (avr_gdbarch_init): Likewise.
11740 * h8300-tdep.c (h8300_gdbarch_init): Likewise.
11741 * i386-nto-tdep.c (i386nto_init_abi): Likewise.
11742 * i386-tdep.c (i386_go32_init_abi): Likewise.
11743 * m32r-tdep.c (m32r_gdbarch_init): Likewise.
11744 * moxie-tdep.c (moxie_gdbarch_init): Likewise.
11745 * nds32-tdep.c (nds32_gdbarch_init): Likewise.
11746 * rs6000-aix-tdep.c (rs6000_aix_init_osabi): Likewise.
11747 * sh-tdep.c (sh_gdbarch_init): Likewise.
11748 * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
11749 * sparc64-tdep.c (sparc64_init_abi): Likewise.
11750 * windows-tdep.c (windows_init_abi): Likewise.
11751 * xstormy16-tdep.c (xstormy16_gdbarch_init): Likewise.
11753 2017-04-12 Pedro Alves <palves@redhat.com>
11756 * c-lang.c (cplus_primitive_types) <cplus_primitive_type_char16_t,
11757 cplus_primitive_type_char32_t>: New enum values.
11758 (cplus_language_arch_info): Register cplus_primitive_type_char16_t
11759 and cplus_primitive_type_char32_t.
11760 * dwarf2read.c (read_base_type) <DW_ATE_UTF>: If bit size is 16 or
11761 32, use the archtecture's built-in type for char16_t and char32_t,
11762 respectively. Otherwise, fallback to init_integer_type as before,
11763 but make the type unsigned, and issue a complaint.
11764 * gdbtypes.c (gdbtypes_post_init): Make char16_t and char32_t unsigned.
11766 2017-04-12 Alan Hayward <alan.hayward@arm.com>
11768 * m32r-tdep.c (M32R_ARG_REGISTER_SIZE): Added.
11769 (m32r_push_dummy_call): Use M32R_ARG_REGISTER_SIZE.
11771 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
11773 * windows-nat.c (windows_create_inferior): Declare 'toexec' as
11776 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
11778 * common/common-utils.c (free_vector_argv): New function.
11779 * common/common-utils.h: Include <vector>.
11780 (free_vector_argv): New prototype.
11781 * darwin-nat.c (darwin_create_inferior): Rewrite function
11782 prototype in order to constify "exec_file" and accept a
11783 "std::string" for "allargs".
11784 * fork-child.c: Include <vector>.
11785 (breakup_args): Rewrite function, using C++.
11786 (fork_inferior): Rewrite function header, constify "exec_file_arg"
11787 and accept "std::string" for "allargs". Update the code to
11788 calculate "argv" based on "allargs". Update calls to "exec_fun"
11790 * gnu-nat.c (gnu_create_inferior): Rewrite function prototype in
11791 order to constify "exec_file" and accept a "std::string" for
11793 * go32-nat.c (go32_create_inferior): Likewise.
11794 * inf-ptrace.c (inf_ptrace_create_inferior): Likewise.
11795 * infcmd.c (run_command_1): Constify "exec_file". Use
11796 "std::string" for inferior arguments.
11797 * inferior.h (fork_inferior): Update prototype.
11798 * linux-nat.c (linux_nat_create_inferior): Rewrite function
11799 prototype in order to constify "exec_file" and accept a
11800 "std::string" for "allargs".
11801 * nto-procfs.c (procfs_create_inferior): Likewise.
11802 * procfs.c (procfs_create_inferior): Likewise.
11803 * remote-sim.c (gdbsim_create_inferior): Likewise.
11804 * remote.c (extended_remote_run): Update code to accept
11805 "std::string" as argument.
11806 (extended_remote_create_inferior): Rewrite function prototype in
11807 order to constify "exec_file" and accept a "std::string" for
11809 * rs6000-nat.c (super_create_inferior): Likewise.
11810 (rs6000_create_inferior): Likewise.
11811 * target.h (struct target_ops) <to_create_inferior>: Likewise.
11812 * windows-nat.c (windows_create_inferior): Likewise.
11814 2017-04-11 Pedro Alves <palves@redhat.com>
11816 * thread.c: Fix whitespace throughout.
11818 2017-04-11 Philipp Rudo <prudo@linux.vnet.ibm.com>
11820 * linux-nat.c (linux_nat_detach): Remove delete_lwp call.
11822 2017-04-11 Alan Hayward <alan.hayward@arm.com>
11824 * arm-tdep.c (arm_store_return_value): Use FP_REGISTER_SIZE
11826 2017-04-10 Sergio Durigan Junior <sergiodj@redhat.com>
11829 * osdata.c (info_osdata): Check if 'type' is an empty string
11832 2017-04-10 Pedro Alves <palves@redhat.com>
11834 * thread.c (add_thread_silent, delete_thread_1, find_thread_ptid)
11835 (ptid_to_global_thread_id, in_thread_list)
11836 (do_captured_list_thread_ids, set_resumed, set_running)
11837 (set_executing, set_stop_requested, finish_thread_state)
11838 (validate_registers_access, can_access_registers_ptid)
11839 (print_thread_info_1, switch_to_thread)
11840 (do_restore_current_thread_cleanup)
11841 (make_cleanup_restore_current_thread, thread_command)
11842 (thread_name_command): Use operator== instead of ptid_equal.
11844 2017-04-10 Pedro Alves <palves@redhat.com>
11846 * thread.c (struct current_thread_cleanup) <next>: Delete field.
11847 (current_thread_cleanup_chain): Delete.
11848 (restore_current_thread_cleanup_dtor)
11849 (make_cleanup_restore_current_thread): Remove references to
11850 current_thread_cleanup_chain.
11852 2017-04-10 Alan Hayward <alan.hayward@arm.com>
11854 * msp430-tdep.c (msp430_pseudo_register_read): Never return
11857 2017-04-10 Yao Qi <yao.qi@linaro.org>
11860 * gdbthread.h (thread_info::deletable): New method.
11861 (thread_info::incref): New method.
11862 (thread_info::decref): New method.
11863 (thread_info::refcount): Move it to private.
11864 * infrun.c (save_stop_context): Call inc_refcount.
11865 (release_stop_context_cleanup): Likewise.
11866 * thread.c (set_thread_exited): New function.
11867 (init_thread_list): Delete "tp" only it is deletable, otherwise
11868 call set_thread_exited.
11869 (delete_thread_1): Call set_thread_exited.
11870 (current_thread_cleanup) <inferior_pid>: Remove.
11871 <thread>: New field.
11872 (restore_current_thread_ptid_changed): Removed.
11873 (do_restore_current_thread_cleanup): Adjust.
11874 (restore_current_thread_cleanup_dtor): Don't call
11876 (set_thread_refcount): Use dec_refcount.
11877 (make_cleanup_restore_current_thread): Adjust.
11878 (thread_apply_all_command): Call inc_refcount.
11879 (_initialize_thread): Don't call
11880 observer_attach_thread_ptid_changed.
11882 2017-04-10 Yao Qi <yao.qi@linaro.org>
11884 * thread.c (delete_thread_1): Hoist code on marking thread as
11887 2017-04-09 Simon Marchi <simon.marchi@polymtl.ca>
11889 * windows-nat.c (windows_detach): Initialize ptid with
11892 2017-04-07 Simon Marchi <simon.marchi@ericsson.com>
11894 * unittests/ptid-selftests.c: Fix erroneous assert messages.
11896 2017-04-07 Alan Hayward <alan.hayward@arm.com>
11898 * bfin-tdep.c (BFIN_MAX_REGISTER_SIZE): Add.
11899 (bfin_pseudo_register_read): Use BFIN_MAX_REGISTER_SIZE.
11900 (bfin_pseudo_register_write): Likewise
11902 2017-04-06 Simon Marchi <simon.marchi@ericsson.com>
11904 * common/ptid.h (struct ptid): Change to...
11905 (class ptid_t): ... this.
11906 <ptid_t>: New constructors.
11907 <pid, lwp_p, lwp, tid_p, tid, is_pid, operator==, operator!=,
11908 matches>: New methods.
11909 <make_null, make_minus_one>: New static methods.
11910 <pid>: Rename to...
11912 <lwp>: Rename to...
11914 <tid>: Rename to...
11916 (ptid_build, ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal,
11917 ptid_is_pid, ptid_lwp_p, ptid_tid_p, ptid_match): Take ptid arguments
11918 as references, move comment to class ptid_t.
11919 * common/ptid.c (null_ptid, minus_one_ptid): Initialize with
11920 ptid_t static methods.
11921 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_tid,
11922 ptid_equal, ptid_is_pid, ptid_lwp_p, ptid_tid_p, ptid_match):
11923 Take ptid arguments as references, implement using ptid_t methods.
11924 * unittests/ptid-selftests.c: New file.
11925 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
11926 unittests/ptid-selftests.c.
11927 (SUBDIR_UNITTESTS_OBS): Add unittests/ptid-selftests.o.
11929 2017-04-06 Thomas Preud'homme <thomas.preudhomme@arm.com>
11931 * python/python.c (python_run_simple_file): Cast mode literal to
11932 non-const char pointer as expected by PyFile_FromString.
11934 2017-04-05 Simon Marchi <simon.marchi@ericsson.com>
11936 * common/ptid.c (ptid_lwp_p, ptid_tid_p): Remove comparison with
11937 minus_one_ptid and null_ptid.
11939 2017-04-05 Pedro Alves <palves@redhat.com>
11941 * warning.m4 (build_warnings): Remove -Wno-write-strings.
11942 * configure: Regenerate.
11944 2017-04-05 Pedro Alves <palves@redhat.com>
11946 * ada-exp.y (yyerror): Constify.
11947 * ada-lang.c (bound_name, get_selections)
11948 (ada_variant_discrim_type)
11949 (ada_variant_discrim_name, ada_value_struct_elt)
11950 (ada_lookup_struct_elt_type, is_unchecked_variant)
11951 (ada_which_variant_applies, standard_exc, ada_get_next_arg)
11952 (catch_ada_exception_command_split)
11953 (catch_ada_assert_command_split, catch_assert_command)
11954 (ada_op_name): Constify.
11955 * ada-lang.h (ada_yyerror, get_selections)
11956 (ada_variant_discrim_name, ada_value_struct_elt): Constify.
11957 * arc-tdep.c (arc_print_frame_cache): Constify.
11958 * arm-tdep.c (arm_skip_stub): Constify.
11959 * ax-gdb.c (gen_binop, gen_struct_ref_recursive, gen_struct_ref)
11960 (gen_aggregate_elt_ref): Constify.
11961 * bcache.c (print_bcache_statistics): Constify.
11962 * bcache.h (print_bcache_statistics): Constify.
11963 * break-catch-throw.c (catch_exception_command_1):
11964 * breakpoint.c (struct ep_type_description::description):
11966 (add_solib_catchpoint): Constify.
11967 (catch_fork_command_1): Add cast.
11968 (add_catch_command): Constify.
11969 * breakpoint.h (add_catch_command, add_solib_catchpoint):
11971 * bsd-uthread.c (bsd_uthread_state): Constify.
11972 * buildsym.c (patch_subfile_names): Constify.
11973 * buildsym.h (next_symbol_text_func, patch_subfile_names):
11975 * c-exp.y (yyerror): Constify.
11976 (token::oper): Constify.
11977 * c-lang.h (c_yyerror, cp_print_class_member): Constify.
11978 * c-varobj.c (cplus_describe_child): Constify.
11979 * charset.c (find_charset_names): Add cast.
11980 (find_charset_names): Constify array and add const_cast.
11981 * cli/cli-cmds.c (complete_command, cd_command): Constify.
11982 (edit_command): Constify.
11983 * cli/cli-decode.c (lookup_cmd): Constify.
11984 * cli/cli-dump.c (dump_memory_command, dump_value_command):
11986 (struct dump_context): Constify.
11987 (add_dump_command, restore_command): Constify.
11988 * cli/cli-script.c (get_command_line): Constify.
11989 * cli/cli-script.h (get_command_line): Constify.
11990 * cli/cli-utils.c (check_for_argument): Constify.
11991 * cli/cli-utils.h (check_for_argument): Constify.
11992 * coff-pe-read.c (struct read_pe_section_data): Constify.
11993 * command.h (lookup_cmd): Constify.
11994 * common/print-utils.c (decimal2str): Constify.
11995 * completer.c (gdb_print_filename): Constify.
11996 * corefile.c (set_gnutarget): Constify.
11997 * cp-name-parser.y (yyerror): Constify.
11998 * cp-valprint.c (cp_print_class_member): Constify.
11999 * cris-tdep.c (cris_register_name, crisv32_register_name):
12001 * d-exp.y (yyerror): Constify.
12002 (struct token::oper): Constify.
12003 * d-lang.h (d_yyerror): Constify.
12004 * dbxread.c (struct header_file_location::name): Constify.
12005 (add_old_header_file, add_new_header_file, last_function_name)
12006 (dbx_next_symbol_text, add_bincl_to_list)
12007 (find_corresponding_bincl_psymtab, set_namestring)
12008 (find_stab_function_addr, read_dbx_symtab, start_psymtab)
12009 (dbx_end_psymtab, read_ofile_symtab, process_one_symbol):
12010 * defs.h (command_line_input, print_address_symbolic)
12011 (deprecated_readline_begin_hook): Constify.
12012 * dwarf2read.c (anonymous_struct_prefix, dwarf_bool_name):
12014 * event-top.c (handle_line_of_input): Constify and add cast.
12015 * exceptions.c (catch_errors): Constify.
12016 * exceptions.h (catch_errors): Constify.
12017 * expprint.c (print_subexp_standard, op_string, op_name)
12018 (op_name_standard, dump_raw_expression, dump_raw_expression):
12019 * expression.h (op_name, op_string, dump_raw_expression):
12021 * f-exp.y (yyerror): Constify.
12022 (struct token::oper): Constify.
12023 (struct f77_boolean_val::name): Constify.
12024 * f-lang.c (f_word_break_characters): Constify.
12025 * f-lang.h (f_yyerror): Constify.
12026 * fork-child.c (fork_inferior): Add cast.
12027 * frv-tdep.c (struct gdbarch_tdep::register_names): Constify.
12028 (new_variant): Constify.
12029 * gdbarch.sh (pstring_ptr, pstring_list): Constify.
12030 * gdbarch.c: Regenerate.
12031 * gdbcore.h (set_gnutarget): Constify.
12032 * go-exp.y (yyerror): Constify.
12033 (token::oper): Constify.
12034 * go-lang.h (go_yyerror): Constify.
12035 * go32-nat.c (go32_sysinfo): Constify.
12036 * guile/scm-breakpoint.c (gdbscm_breakpoint_expression): Constify.
12037 * guile/scm-cmd.c (cmdscm_function): Constify.
12038 * guile/scm-param.c (pascm_param_value): Constify.
12039 * h8300-tdep.c (h8300_register_name, h8300s_register_name)
12040 (h8300sx_register_name): Constify.
12041 * hppa-tdep.c (hppa32_register_name, hppa64_register_name):
12043 * ia64-tdep.c (ia64_register_names): Constify.
12044 * infcmd.c (construct_inferior_arguments): Constify.
12045 (path_command, attach_post_wait): Constify.
12046 * language.c (show_range_command, show_case_command)
12047 (unk_lang_error): Constify.
12048 * language.h (language_defn::la_error)
12049 (language_defn::la_name_of_this): Constify.
12050 * linespec.c (decode_line_2): Constify.
12051 * linux-thread-db.c (thread_db_err_str): Constify.
12052 * lm32-tdep.c (lm32_register_name): Constify.
12053 * m2-exp.y (yyerror): Constify.
12054 * m2-lang.h (m2_yyerror): Constify.
12055 * m32r-tdep.c (m32r_register_names): Constify and make static.
12056 * m68hc11-tdep.c (m68hc11_register_names): Constify.
12057 * m88k-tdep.c (m88k_register_name): Constify.
12058 * macroexp.c (appendmem): Constify.
12059 * mdebugread.c (fdr_name, add_data_symbol, parse_type)
12060 (upgrade_type, parse_external, parse_partial_symbols)
12061 (mdebug_next_symbol_text, cross_ref, mylookup_symbol, new_psymtab)
12062 (new_symbol): Constify.
12063 * memattr.c (mem_info_command): Constify.
12064 * mep-tdep.c (register_name_from_keyword): Constify.
12065 * mi/mi-cmd-env.c (mi_cmd_env_path, _initialize_mi_cmd_env):
12067 * mi/mi-cmd-stack.c (list_args_or_locals): Constify.
12068 * mi/mi-cmd-var.c (mi_cmd_var_show_attributes): Constify.
12069 * mi/mi-main.c (captured_mi_execute_command): Constify and add
12071 (mi_execute_async_cli_command): Constify.
12072 * mips-tdep.c (mips_register_name): Constify.
12073 * mn10300-tdep.c (register_name, mn10300_generic_register_name)
12074 (am33_register_name, am33_2_register_name)
12075 * moxie-tdep.c (moxie_register_names): Constify.
12076 * nat/linux-osdata.c (osdata_type): Constify fields.
12077 * nto-tdep.c (nto_parse_redirection): Constify.
12078 * objc-lang.c (lookup_struct_typedef, lookup_objc_class)
12079 (lookup_child_selector): Constify.
12080 (objc_methcall::name): Constify.
12081 * objc-lang.h (lookup_objc_class, lookup_child_selector)
12082 (lookup_struct_typedef): Constify.
12083 * objfiles.c (pc_in_section): Constify.
12084 * objfiles.h (pc_in_section): Constify.
12085 * p-exp.y (struct token::oper): Constify.
12086 (yyerror): Constify.
12087 * p-lang.h (pascal_yyerror): Constify.
12088 * parser-defs.h (op_name_standard): Constify.
12089 (op_print::string): Constify.
12090 (exp_descriptor::op_name): Constify.
12091 * printcmd.c (print_address_symbolic): Constify.
12092 * psymtab.c (print_partial_symbols): Constify.
12093 * python/py-breakpoint.c (stop_func): Constify.
12094 (bppy_get_expression): Constify.
12095 * python/py-cmd.c (cmdpy_completer::name): Constify.
12096 (cmdpy_function): Constify.
12097 * python/py-event.c (evpy_add_attribute)
12098 (gdbpy_initialize_event_generic): Constify.
12099 * python/py-event.h (evpy_add_attribute)
12100 (gdbpy_initialize_event_generic): Constify.
12101 * python/py-evts.c (add_new_registry): Constify.
12102 * python/py-finishbreakpoint.c (outofscope_func): Constify.
12103 * python/py-framefilter.c (get_py_iter_from_func): Constify.
12104 * python/py-inferior.c (get_buffer): Add cast.
12105 * python/py-param.c (parm_constant::name): Constify.
12106 * python/py-unwind.c (fprint_frame_id): Constify.
12107 * python/python.c (gdbpy_parameter_value): Constify.
12108 * remote-fileio.c (remote_fio_func_map): Make 'name' const.
12109 * remote.c (memory_packet_config::name): Constify.
12110 (show_packet_config_cmd, remote_write_bytes)
12111 (remote_buffer_add_string):
12112 * reverse.c (exec_reverse_once): Constify.
12113 * rs6000-tdep.c (variant::name, variant::description): Constify.
12114 * rust-exp.y (rustyyerror): Constify.
12115 * rust-lang.c (rust_op_name): Constify.
12116 * rust-lang.h (rustyyerror): Constify.
12117 * serial.h (serial_ops::name): Constify.
12118 * sh-tdep.c (sh_sh_register_name, sh_sh3_register_name)
12119 (sh_sh3e_register_name, sh_sh2e_register_name)
12120 (sh_sh2a_register_name, sh_sh2a_nofpu_register_name)
12121 (sh_sh_dsp_register_name, sh_sh3_dsp_register_name)
12122 (sh_sh4_register_name, sh_sh4_nofpu_register_name)
12123 (sh_sh4al_dsp_register_name): Constify.
12124 * sh64-tdep.c (sh64_register_name): Constify.
12125 * solib-darwin.c (lookup_symbol_from_bfd): Constify.
12126 * spu-tdep.c (spu_register_name, info_spu_dma_cmdlist): Constify.
12127 * stabsread.c (patch_block_stabs, read_type_number)
12128 (ref_map::stabs, ref_add, process_reference)
12129 (symbol_reference_defined, define_symbol, define_symbol)
12130 (error_type, read_type, read_member_functions, read_cpp_abbrev)
12131 (read_one_struct_field, read_struct_fields, read_baseclasses)
12132 (read_tilde_fields, read_struct_type, read_array_type)
12133 (read_enum_type, read_sun_builtin_type, read_sun_floating_type)
12134 (read_huge_number, read_range_type, read_args, common_block_start)
12135 (find_name_end): Constify.
12136 * stabsread.h (common_block_start, define_symbol)
12137 (process_one_symbol, symbol_reference_defined, ref_add):
12138 * symfile.c (get_section_index, add_symbol_file_command):
12139 * symfile.h (get_section_index): Constify.
12140 * target-descriptions.c (tdesc_type::name): Constify.
12141 (tdesc_free_type): Add cast.
12142 * target.c (find_default_run_target):
12143 (add_deprecated_target_alias, find_default_run_target)
12144 (target_announce_detach): Constify.
12145 (do_option): Constify.
12146 * target.h (add_deprecated_target_alias): Constify.
12147 * thread.c (print_thread_info_1): Constify.
12148 * top.c (deprecated_readline_begin_hook, command_line_input):
12150 (init_main): Add casts.
12151 * top.h (handle_line_of_input): Constify.
12152 * tracefile-tfile.c (tfile_write_uploaded_tsv): Constify.
12153 * tracepoint.c (tvariables_info_1, trace_status_mi): Constify.
12154 (tfind_command): Rename to ...
12155 (tfind_command_1): ... this and constify.
12156 (tfind_command): New function.
12157 (tfind_end_command, tfind_start_command): Adjust.
12158 (encode_source_string): Constify.
12159 * tracepoint.h (encode_source_string): Constify.
12160 * tui/tui-data.c (tui_partial_win_by_name): Constify.
12161 * tui/tui-data.h (tui_partial_win_by_name): Constify.
12162 * tui/tui-source.c (tui_set_source_content_nil): Constify.
12163 * tui/tui-source.h (tui_set_source_content_nil): Constify.
12164 * tui/tui-win.c (parse_scrolling_args): Constify.
12165 * tui/tui-windata.c (tui_erase_data_content): Constify.
12166 * tui/tui-windata.h (tui_erase_data_content): Constify.
12167 * tui/tui-winsource.c (tui_erase_source_content): Constify.
12168 * tui/tui.c (tui_enable): Add cast.
12169 * utils.c (defaulted_query): Constify.
12170 (init_page_info): Add cast.
12171 (puts_debug, subset_compare): Constify.
12172 * utils.h (subset_compare): Constify.
12173 * varobj.c (varobj_format_string): Constify.
12174 * varobj.h (varobj_format_string): Constify.
12175 * vax-tdep.c (vax_register_name): Constify.
12176 * windows-nat.c (windows_detach): Constify.
12177 * xcoffread.c (process_linenos, xcoff_next_symbol_text): Constify.
12178 * xml-support.c (gdb_xml_end_element): Constify.
12179 * xml-tdesc.c (tdesc_start_reg): Constify.
12180 * xstormy16-tdep.c (xstormy16_register_name): Constify.
12181 * xtensa-tdep.c (xtensa_find_register_by_name): Constify.
12182 * xtensa-tdep.h (xtensa_register_t::name): Constify.
12184 2017-04-05 Pedro Alves <palves@redhat.com>
12186 * proc-api.c (struct trans): Constify.
12187 (procfs_note): Constify.
12188 * proc-events.c (struct trans, syscall_table):
12189 * proc-flags.c (struct trans): Constify.
12190 * proc-utils.h (procfs_note): Constify.
12191 * proc-why.c (struct trans): Constify.
12192 * procfs.c (dead_procinfo, find_syscall, proc_warn, proc_error)
12193 (procfs_detach): Constify.
12194 * sol-thread.c (struct string_map): Constify.
12195 (td_err_string, td_state_string): Constify.
12197 2017-04-05 Pedro Alves <palves@redhat.com>
12199 * proc-api.c (procfs_filename): Don't initialize
12201 (prepare_to_trace): Assume procfs_filename is non-NULL.
12202 (_initialize_proc_api): Give procfs_filename a default value here.
12204 2017-04-05 Pedro Alves <palves@redhat.com>
12206 * break-catch-throw.c (handle_gnu_v3_exceptions): Constify
12207 'cond_string' parameter.
12208 (extract_exception_regexp): Constify 'string' parameter.
12209 (catch_exception_command_1): Constify.
12210 * breakpoint.c (init_catchpoint)
12211 (create_fork_vfork_event_catchpoint): Constify 'cond_string'
12213 (ep_parse_optional_if_clause, catch_fork_command_1)
12214 (catch_exec_command_1): Constify.
12215 * breakpoint.h (init_catchpoint): Constify 'cond_string'
12217 (ep_parse_optional_if_clause): Constify.
12218 * cli/cli-utils.c (remove_trailing_whitespace)
12219 (check_for_argument): Constify.
12220 * cli/cli-utils.h (remove_trailing_whitespace): Constify and add
12221 non-const overload.
12222 (check_for_argument): Likewise.
12224 2017-04-05 Pedro Alves <palves@redhat.com>
12226 * event-top.c (command_line_handler): Add cast to execute_command
12228 * record-btrace.c (cmd_record_btrace_bts_start)
12229 (cmd_record_btrace_pt_start, cmd_record_btrace_start)
12230 (cmd_record_btrace_start): Add cast to execute_command call.
12231 * record-full.c (record_full_goto_insn):
12232 * record.c (record_start, record_stop): Add cast to
12233 execute_command_to_string calls.
12234 (cmd_record_start): Add cast to execute_command calls.
12236 2017-04-05 Pedro Alves <palves@redhat.com>
12238 * python/python-internal.h (gdb_PyArg_ParseTupleAndKeywords): New
12239 static inline function.
12240 * python/py-arch.c (archpy_disassemble): Constify 'keywords'
12241 array and use gdb_PyArg_ParseTupleAndKeywords.
12242 * python/py-cmd.c (cmdpy_init): Likewise.
12243 * python/py-finishbreakpoint.c (bpfinishpy_init): Likewise.
12244 * python/py-inferior.c (infpy_read_memory, infpy_write_memory)
12245 (infpy_search_memory): Likewise.
12246 * python/py-objfile.c (objfpy_add_separate_debug_file)
12247 (gdbpy_lookup_objfile): Likewise.
12248 * python/py-symbol.c (gdbpy_lookup_symbol)
12249 (gdbpy_lookup_global_symbol): Likewise.
12250 * python/py-type.c (gdbpy_lookup_type): Likewise.
12251 * python/py-value.c (valpy_lazy_string, valpy_string): Likewise.
12252 * python/python.c (execute_gdb_command, gdbpy_write, gdbpy_flush):
12255 2017-04-05 Pedro Alves <palves@redhat.com>
12257 * python/python-internal.h (gdb_PyGetSetDef): New type.
12258 * python/py-block.c (block_object_getset)
12259 (breakpoint_object_getset): Now a gdb_PyGetSetDef array.
12260 * python/py-event.c (event_object_getset)
12261 (finish_breakpoint_object_getset): Likewise.
12262 * python/py-inferior.c (inferior_object_getset): Likewise.
12263 * python/py-infthread.c (thread_object_getset): Likewise.
12264 * python/py-lazy-string.c (lazy_string_object_getset): Likewise.
12265 * python/py-linetable.c (linetable_entry_object_getset): Likewise.
12266 * python/py-objfile.c (objfile_getset): Likewise.
12267 * python/py-progspace.c (pspace_getset): Likewise.
12268 * python/py-record-btrace.c (btpy_insn_getset, btpy_call_getset):
12270 * python/py-record.c (recpy_record_getset): Likewise.
12271 * python/py-symbol.c (symbol_object_getset): Likewise.
12272 * python/py-symtab.c (symtab_object_getset, sal_object_getset):
12274 * python/py-type.c (type_object_getset, field_object_getset):
12276 * python/py-value.c (value_object_getset): Likewise.
12278 2017-04-05 Pedro Alves <palves@redhat.com>
12280 * python/python-internal.h (gdb_PyObject_CallMethod)
12281 (gdb_PyErr_NewException, gdb_PySys_GetObject, gdb_PySys_SetPath):
12283 (GDB_PYSYS_SETPATH_CHAR, PyObject_CallMethod, PyErr_NewException)
12284 (PySys_GetObject, PySys_SetPath): New macros.
12286 2017-04-05 Pedro Alves <palves@redhat.com>
12288 * mi/mi-cmd-info.c (mi_cmd_info_os): Call info_osdata instead of
12289 info_osdata_command.
12290 * osdata.c (info_osdata_command): Rename to ...
12291 (info_osdata): ... this. Constify 'type' parameter, and remove
12292 the 'from_tty' parameter. Accept NULL TYPE.
12293 (info_osdata_command): New function.
12294 * osdata.h (info_osdata_command): Remove declaration.
12295 (info_osdata): New declaration.
12297 2017-04-05 Pedro Alves <palves@redhat.com>
12299 * mi/mi-cmd-break.c (mi_cmd_break_insert_1, mi_cmd_break_insert)
12300 (mi_cmd_dprintf_insert, mi_cmd_break_passcount)
12301 (mi_cmd_break_watch, mi_cmd_break_commands): Constify 'command'
12303 * mi/mi-cmd-catch.c (mi_cmd_catch_assert, mi_cmd_catch_exception)
12304 (mi_cmd_catch_load, mi_cmd_catch_unload): Constify cmd' parameter.
12305 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Constify 'command'
12307 * mi/mi-cmd-env.c (mi_cmd_env_pwd, mi_cmd_env_cd, mi_cmd_env_path)
12308 (mi_cmd_env_dir, mi_cmd_inferior_tty_set, _cmd_inferior_tty_show)
12309 * mi/mi-cmd-file.c (mi_cmd_file_list_exec_source_file)
12310 (mi_cmd_file_list_exec_source_files)
12311 (mi_cmd_file_list_shared_libraries): Constify 'command' parameter.
12312 * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions)
12313 (mi_cmd_info_gdb_mi_command, mi_cmd_info_os): Constify 'command'
12315 * mi/mi-cmd-stack.c (mi_cmd_enable_frame_filters)
12316 (mi_cmd_stack_list_frames, mi_cmd_stack_info_depth)
12317 (mi_cmd_stack_list_locals, mi_cmd_stack_list_args)
12318 (mi_cmd_stack_list_variables, mi_cmd_stack_select_frame)
12319 (mi_cmd_stack_info_frame): Constify 'command' parameter.
12320 * mi/mi-cmd-target.c (mi_cmd_target_file_get)
12321 (mi_cmd_target_file_put, mi_cmd_target_file_delete): Constify
12322 'command' parameter.
12323 * mi/mi-cmd-var.c (mi_cmd_var_create, mi_cmd_var_delete)
12324 (mi_cmd_var_set_format, mi_cmd_var_set_visualizer)
12325 (mi_cmd_var_set_frozen, mi_cmd_var_show_format)
12326 (mi_cmd_var_info_num_children, mi_cmd_var_list_children)
12327 (mi_cmd_var_info_type, mi_cmd_var_info_path_expression)
12328 (mi_cmd_var_info_expression, mi_cmd_var_show_attributes)
12329 (mi_cmd_var_evaluate_expression, mi_cmd_var_assign)
12330 (mi_cmd_var_update, mi_cmd_enable_pretty_printing)
12331 (mi_cmd_var_set_update_range): Constify 'command' parameter.
12332 * mi/mi-cmds.h (mi_cmd_argv_ftype): Constify 'command' parameter.
12333 * mi/mi-interp.c (mi_cmd_interpreter_exec): Constify 'command'
12335 * mi/mi-main.c (mi_cmd_gdb_exit, mi_cmd_exec_next)
12336 (mi_cmd_exec_next_instruction, mi_cmd_exec_step)
12337 (mi_cmd_exec_step_instruction, mi_cmd_exec_finish)
12338 (mi_cmd_exec_return ,mi_cmd_exec_jump, mi_cmd_exec_continue)
12339 (mi_cmd_exec_interrupt, mi_cmd_exec_run, mi_cmd_target_detach)
12340 (mi_cmd_target_flash_erase, mi_cmd_thread_select)
12341 (mi_cmd_thread_list_ids, mi_cmd_thread_info)
12342 (mi_cmd_list_thread_groups, mi_cmd_data_list_register_names)
12343 (mi_cmd_data_list_changed_registers)
12344 (mi_cmd_data_write_register_values)
12345 (mi_cmd_data_evaluate_expression, mi_cmd_data_read_memory)
12346 (mi_cmd_data_read_memory_bytes, mi_cmd_data_write_memory)
12347 (mi_cmd_data_write_memory_bytes, mi_cmd_enable_timings)
12348 (mi_cmd_list_features, mi_cmd_list_target_features)
12349 (mi_cmd_add_inferior, mi_cmd_remove_inferior)
12350 (mi_cmd_trace_define_variable, mi_cmd_trace_list_variables)
12351 (mi_cmd_trace_find, mi_cmd_trace_save, mi_cmd_trace_start)
12352 (mi_cmd_trace_status, mi_cmd_trace_stop, mi_cmd_ada_task_info)
12353 (mi_cmd_trace_frame_collected): Constify 'command'
12355 * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Constify
12356 'command' parameter.
12358 2017-04-05 Pedro Alves <palves@redhat.com>
12360 * ada-lang.c (ada_completer_word_break_characters): Now a const
12362 (ada_get_gdb_completer_word_break_characters): Constify.
12363 * completer.c (gdb_completer_command_word_break_characters)
12364 (gdb_completer_file_name_break_characters)
12365 (gdb_completer_quote_characters): Now const arrays.
12366 (get_gdb_completer_quote_characters): Constify.
12367 (set_rl_completer_word_break_characters): New function.
12368 (set_gdb_completion_word_break_characters)
12369 (complete_line_internal): Use it.
12370 * completer.h (get_gdb_completer_quote_characters): Constify.
12371 (set_rl_completer_word_break_characters): Declare.
12372 * f-lang.c (f_word_break_characters): Constify.
12373 * language.c (default_word_break_characters): Constify.
12374 * language.h (language_defn::la_word_break_characters): Constify.
12375 (default_word_break_characters): Constify.
12376 * top.c (init_main): Use set_rl_completer_word_break_characters.
12378 2017-04-05 Pedro Alves <palves@redhat.com>
12380 * aix-thread.c (aix_thread_pid_to_str)
12381 (aix_thread_extra_thread_info): Constify.
12382 * bsd-kvm.c (bsd_kvm_pid_to_str): Constify.
12383 * bsd-uthread.c (bsd_uthread_extra_thread_info)
12384 (bsd_uthread_pid_to_str): Constify.
12385 * corelow.c (core_pid_to_str): Constify.
12386 * darwin-nat.c (darwin_pid_to_str): Constify.
12387 * fbsd-nat.c (fbsd_pid_to_str): Constify.
12388 * fbsd-tdep.c (fbsd_core_pid_to_str, gdbarch_core_pid_to_str):
12390 * gnu-nat.c (gnu_pid_to_str): Constify.
12391 * go32-nat.c (go32_pid_to_str): Constify.
12392 * i386-cygwin-tdep.c (i386_windows_core_pid_to_str): Constify.
12393 * inf-ptrace.c (inf_ptrace_pid_to_str): Constify.
12394 * inferior.c (inferior_pid_to_str): Constify.
12395 * linux-nat.c (linux_nat_pid_to_str): Constify.
12396 * linux-tdep.c (linux_core_pid_to_str): Constify.
12397 * linux-thread-db.c (thread_db_pid_to_str)
12398 (thread_db_extra_thread_info): Constify.
12399 * nto-tdep.c (nto_extra_thread_info): Constify.
12400 * nto-tdep.h (nto_extra_thread_info): Constify.
12401 * obsd-nat.c (obsd_pid_to_str): Constify.
12402 * procfs.c (procfs_pid_to_str): Constify.
12403 * ravenscar-thread.c (ravenscar_extra_thread_info)
12404 (ravenscar_pid_to_str): Constify.
12405 * remote-sim.c (gdbsim_pid_to_str): Constify.
12406 * remote.c (remote_threads_extra_info, remote_pid_to_str):
12408 * sol-thread.c (solaris_pid_to_str): Constify.
12409 * sol2-tdep.c (sol2_core_pid_to_str): Constify.
12410 * sol2-tdep.h (sol2_core_pid_to_str): Constify.
12411 * target.c (default_pid_to_str, target_pid_to_str)
12412 (normal_pid_to_str, default_pid_to_str): Constify.
12413 * target.h (target_ops::to_pid_to_str)
12414 (target_ops::to_extra_thread_info): Constify.
12415 (target_pid_to_str, normal_pid_to_str): Constify.
12416 * windows-nat.c (windows_pid_to_str): Constify.
12417 * gdbarch.sh (core_pid_to_str): Constify.
12418 * target-delegates.c: Regenerate.
12419 * gdbarch.h, gdbarch.c: Regenerate.
12421 2017-04-05 Pedro Alves <palves@redhat.com>
12423 * main.c (captured_main_1): Use gdb::unique_xmalloc_ptr to manage
12424 the memory of the temporary warning_pre_print override.
12425 * utils.c (warning_pre_print): Constify.
12426 * utils.h (warning_pre_print): Constify.
12428 2017-04-05 Pedro Alves <palves@redhat.com>
12430 * cli/cli-cmds.c (shell_escape): Constify 'arg' parameter.
12431 (shell_command): New function.
12432 (make_command): Use std::string.
12433 (init_cli_cmds): Register shell_command instead of shell_escape.
12435 2017-04-05 Pedro Alves <palves@redhat.com>
12437 * breakpoint.c (dprintf_function, dprintf_channel): Don't initialize.
12438 * tracepoint.c (default_collect): Don't initialize.
12440 2017-04-05 Pedro Alves <palves@redhat.com>
12442 * macroexp.c (macro_buffer::shared): Now a bool.
12443 (init_buffer): Update.
12444 (init_shared_buffer): Constify 'addr' parameter.
12445 (substitute_args, expand, macro_expand, macro_expand_next): Remove
12448 2017-04-05 Pedro Alves <palves@redhat.com>
12450 * arm-tdep.c (show_disassembly_style_sfunc): Constify local.
12451 * disasm.c (set_disassembler_options): Constify local.
12452 * i386-tdep.c (i386_print_insn): Remove cast and FIXME comment.
12454 2017-04-05 Sergio Durigan Junior <sergiodj@redhat.com>
12457 * tracefile.c (tsave_command): Fix argument parsing for '-r'
12460 2017-04-05 Yao Qi <yao.qi@linaro.org>
12462 * frame.c (frame_unwind_register_unsigned): Call
12463 frame_unwind_register_value.
12465 2017-04-05 Yao Qi <yao.qi@linaro.org>
12467 * gdb.threads/thread-specific-bp.exp (check_thread_specific_breakpoint):
12468 Use gdb_test_multiple, and don't match anchor.
12470 2017-04-05 Pedro Alves <palves@redhat.com>
12472 * MAINTAINERS (Global Maintainers): Add Simon Marchi.
12473 (Write After Approval): Remove Simon Marchi.
12475 2017-04-05 Pedro Alves <palves@redhat.com>
12477 * common/gdb_optional.h (optional::optional): Make constexpr and
12478 initialize m_dummy.
12480 2017-04-04 John Baldwin <jhb@FreeBSD.org>
12482 * amd64-fbsd-tdep.c: Remove "bsd-uthread.h" include.
12483 (amd64fbsd_jmp_buf_reg_offset): Remove.
12484 (amd64fbsd_supply_uthread): Remove function.
12485 (amd64fbsd_collect_uthread): Remove function.
12486 (amd64fbsd_init_abi): Don't set bsd-uthread callbacks.
12487 * configure.tgt (i[34567]86-*-freebsd*): Remove bsd-uthread.o.
12488 (x86_64-*-freebsd*): Remove bsd-uthread.o.
12489 (fbsd-nat.c): Update comment.
12490 * i386-fbsd-tdep.c: Remove "bsd-uthread.h" include.
12491 (i386fbsd_jmp_buf_reg_offset): Remove.
12492 (i386fbsd_supply_uthread): Remove function.
12493 (i386fbsd_collect_uthread): Remove function.
12494 (i386fbsd_init_abi): Don't set bsd-uthread callbacks.
12496 2017-04-04 John Baldwin <jhb@FreeBSD.org>
12498 * Makefile.in (ALL_64_TARGET_OBS): Remove alpha-fbsd-tdep.o.
12499 (ALLDEPFILES): Remove alpha-fbsd-tdep.c
12500 * NEWS: Mention that support for FreeBSD/alpha was removed.
12501 * alpha-fbsd-tdep.c: Delete file.
12502 * config/alpha/fbsd.mh: Delete file.
12503 * configure.host: Delete alpha*-*-freebsd* and
12504 alpha*-*-kfreebsd*-gnu.
12505 * configure.tgt: Delete alpha*-*-freebsd* and
12506 alpha*-*-kfreebsd*-gnu.
12508 2017-04-04 John Baldwin <jhb@FreeBSD.org>
12510 * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers,
12511 amd64bsd_store_inferior_registers): Use ptid from regcache.
12513 2017-04-04 Pedro Alves <palves@redhat.com>
12515 * dwarf2read.c (lnp_state_machine): Now a class. Initialize all
12516 data fields, make them private and add "m_" prefixes.
12517 (lnp_state_machine::lnp_state_machine): New ctor.
12518 (record_line, check_line_address, handle_set_discriminator)
12519 (handle_set_address, handle_advance_pc, handle_special_opcode)
12520 (handle_advance_line, handle_set_file, handle_negate_stmt)
12521 (handle_const_add_pc, handle_fixed_advance_pc, handle_copy)
12522 (end_sequence, advance_line): New methods.
12523 (m_gdbarch, m_record_lines_p): New fields.
12524 (lnp_reader_state): Delete.
12525 (dwarf_record_line): Rename to ...
12526 (lnp_state_machine::record_line): ... adjust.
12527 (init_lnp_state_machine): Delete.
12528 (lnp_state_machine::lnp_state_machine): New.
12529 (check_line_address): Rename to ...
12530 (lnp_state_machine::check_line_address): This.
12531 (dwarf_decode_lines_1): Remove reference to "reader_state".
12532 Adjust lnp_state_machine having a non-default ctor. Use bool.
12533 State machine internal state manipulation moved to
12534 lnp_state_machine methods.
12536 2017-04-04 Pedro Alves <palves@redhat.com>
12538 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
12539 unittests/offset-type-selftests.c.
12540 (SUBDIR_UNITTESTS_OBS): Add offset-type-selftests.o.
12541 * common/offset-type.h: New file.
12542 * common/preprocessor.h: New file.
12543 * common/traits.h: New file.
12544 * common/valid-expr.h: New file.
12545 * dwarf2expr.c: Include "common/underlying.h". Adjust to use
12546 sect_offset and cu_offset strong typedefs throughout.
12547 * dwarf2expr.h: Adjust to use sect_offset and cu_offset strong
12548 typedefs throughout.
12549 * dwarf2loc.c: Include "common/underlying.h". Adjust to use
12550 sect_offset and cu_offset strong typedefs throughout.
12551 * dwarf2read.c: Adjust to use sect_offset and cu_offset strong
12552 typedefs throughout.
12553 * gdbtypes.h: Include "common/offset-type.h".
12554 (cu_offset): Now an offset type (strong typedef) instead of a
12556 (sect_offset): Likewise.
12557 (union call_site_parameter_u): Rename "param_offset" field to
12559 * unittests/offset-type-selftests.c: New file.
12561 2017-04-04 Pedro Alves <palves@redhat.com>
12563 * common/underlying.h: New file.
12564 * dwarf2read.c: Include "common/gdb_optional.h" and
12565 "common/underlying.h".
12566 (dir_index, file_name_index): New types.
12567 (file_entry): Use them.
12568 (file_entry::include): Use to_underlying.
12569 (line_header::add_file_name): Use dir_index.
12570 (read_formatted_entries): Use gdb::optional. Read form before
12571 writting to file_entry.
12572 (dwarf_decode_line_header): Use dir_index.
12573 (lnp_state_machine::current_file): Use to_underlying.
12574 (lnp_state_machine::file): Change type to file_name_index.
12575 (dwarf_record_line): Use to_underlying.
12576 (init_lnp_state_machine): Use file_name_index.
12577 (dwarf_decode_lines_1): Use dir_index and file_name_index.
12579 2017-04-04 Pedro Alves <palves@redhat.com>
12581 * common/gdb_optional.h (gdb::optiona): Add operator->, operator*,
12582 operator bool, has_value and get methods.
12584 2017-04-04 Pedro Alves <palves@redhat.com>
12586 * dwarf2read.c (struct file_entry): Add ctors, and initialize all
12588 (line_header): Initialize all data fields. Change type of
12589 standard_opcode_lengths to std::unique_ptr<unsigned char[]>.
12590 Change type of include_dirs to std::vector<const char *>. Remove
12591 num_include_dirs, include_dirs_size. Change type of file_names to
12592 std::vector<file_entry>. Remove num_file_names, file_names_size.
12593 (line_header::line_header): New.
12594 (line_header::add_include_dir, line_header::add_file_name): New
12596 (line_header::include_dir_at): Remove NULL check.
12597 (line_header::file_name_at): Add const overload.
12598 (line_header_up): New unique_ptr typedef.
12599 (dw2_get_file_names_reader): Use line_header_up. Adjust to use
12600 std::vector. Remove free_line_header call.
12601 (dwarf2_build_include_psymtabs): Use line_header_up. Remove
12602 free_line_header call.
12603 (free_cu_line_header): Delete.
12604 (handle_DW_AT_stmt_list, handle_DW_AT_stmt_list)
12605 (setup_type_unit_groups): Use line_header_up instead of cleanups.
12606 Adjust to use std::vector.
12607 (free_line_header): Delete.
12608 (free_line_header_voidp): Use delete.
12609 (add_include_dir): Replace with ...
12610 (line_header::add_include_dir): ... this method. Use std::vector.
12611 (add_file_name): Replace with ...
12612 (line_header::add_file_name): ... this method. Use std::vector.
12613 (add_include_dir_stub): Delete.
12614 (read_formatted_entries): Remove memset.
12615 (dwarf_decode_line_header): Return a line_header_up instead of a
12616 raw pointer. Remove cleanup handling. Pass lambdas to
12617 read_formatted_entries. Adjust to use line_header methods.
12618 (dwarf_decode_lines_1): Adjust to use line_header methods.
12619 (dwarf_decode_lines, file_file_name, file_full_name): Adjust to
12622 2017-04-04 Simon Marchi <simon.marchi@polymtl.ca>
12624 * remote.c (set_general_thread, set_continue_thread): Use ptid_t
12625 instead of struct ptid.
12627 2017-05-04 Alan Hayward <alan.hayward@arm.com>
12629 * frame.c (get_frame_register_bytes): Unwind using value.
12630 (put_frame_register_bytes): Likewise.
12632 2017-03-30 Iain Buclaw <ibuclaw@gdcproject.org>
12634 * d-exp.y (type_aggregate_p): Treat TYPE_CODE_MODULE as being
12637 2017-03-29 Jan Kratochvil <jan.kratochvil@redhat.com>
12639 * auto-load.c (auto_load_section_scripts): Check SEC_HAS_CONTENTS.
12641 2017-03-29 Yao Qi <yao.qi@linaro.org>
12643 * gdbthread.h (struct thread_info): Declare constructor and
12644 destructor. Add some in-class member initializers.
12645 * thread.c (free_thread): Remove.
12646 (init_thread_list): Call delete instead of free_thread.
12647 (new_thread): Call thread_info constructor.
12648 (thread_info::thread_info): New function.
12649 (thread_info::~thread_info): New function.
12650 (delete_thread_1): Call delete instead of free_thread.
12651 (make_cleanup_restore_current_thread): Move tp and frame to
12654 2017-03-28 Anton Kolesov <anton.kolesov@synopsys.com>
12656 * arc-tdep.c (arc_frame_cache): Add support for prologue analysis.
12657 (arc_skip_prologue): Likewise.
12658 (arc_make_frame_cache): Likewise.
12659 (arc_pv_get_operand): New function.
12660 (arc_is_in_prologue): Likewise.
12661 (arc_analyze_prologue): Likewise.
12662 (arc_print_frame_cache): Likewise.
12663 (MAX_PROLOGUE_LENGTH): New constant.
12665 2017-03-28 Anton Kolesov <anton.kolesov@synopsys.com>
12667 * configure.tgt: Add arc-insn.o.
12668 * arc-tdep.c (arc_delayed_print_insn): Make non-static.
12669 (dump_arc_instruction_command): New function.
12670 (arc_fprintf_disasm): Likewise.
12671 (arc_disassemble_info): Likewise.
12672 (arc_insn_get_operand_value): Likewise.
12673 (arc_insn_get_operand_value_signed): Likewise.
12674 (arc_insn_get_memory_base_reg): Likewise.
12675 (arc_insn_get_memory_offset): Likewise.
12676 (arc_insn_get_branch_target): Likewise.
12677 (arc_insn_dump): Likewise.
12678 (arc_insn_get_linear_next_pc): Likewise.
12679 * arc-tdep.h (arc_delayed_print_insn): Add function declaration.
12680 (arc_disassemble_info): Likewise.
12681 (arc_insn_get_branch_target): Likewise.
12682 (arc_insn_get_linear_next_pc): Likewise.
12683 * NEWS: Mention new "maint print arc arc-instruction".
12685 2017-03-28 Anton Kolesov <anton.kolesov@synopsys.com>
12687 * arc-tdep (maintenance_print_arc_list): New variable.
12688 (maintenance_print_arc_command): New function.
12690 2017-03-28 Anton Kolesov <anton.kolesov@synopsys.com>
12692 * arc-tdep.c (core_v2_register_names, core_arcompact_register_names)
12693 Add "limm" and "reserved".
12694 (arc_cannot_fetch_register, arc_cannot_store_register): Add
12695 ARC_RESERVED_REGNUM and ARC_LIMM_REGNUM.
12696 * arc-tdep.h (arc_regnum): Likewise.
12698 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
12700 * xtensa-linux-nat.c (fill_gregset): Call regcache_raw_collect
12701 for THREADPTR register.
12702 (supply_gregset_reg): Call regcache_raw_supply for THREADPTR
12704 * xtensa-tdep.c (XTENSA_DBREGN_UREG): New definition.
12705 (xtensa_derive_tdep): Initialize tdep->threadptr_regnum.
12706 * xtensa-tdep.h (gdbarch_tdep::threadptr_regnum): New field.
12708 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
12710 * xtensa-tdep.c (xtensa_pseudo_register_read): Treat all
12711 registers above gdbarch_num_regs (gdbarch) as privileged in
12714 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
12716 * xtensa-linux-nat.c (fill_gregset): Call regcache_raw_collect
12717 for a single specified register or for all registers in
12718 a0_base..a0_base + C0_NREGS range.
12719 (supply_gregset_reg): Call regcache_raw_supply for a single
12720 specified register or for all registers in a0_base..a0_base +
12723 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
12725 * arch/xtensa.h (C0_NREGS): Add definition.
12726 * xtensa-tdep.c (C0_NREGS): Remove definition.
12728 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
12730 * xtensa-tdep.c (xtensa_scan_prologue, call0_analyze_prologue):
12731 Drop xtensa_default_isa initialization.
12732 (xtensa_gdbarch_init): Initialize xtensa_default_isa.
12734 2017-03-27 Pedro Alves <palves@redhat.com>
12736 * dwarf2read.c (file_entry) <dir_index>: Add comment.
12737 (file_entry::include_dir): New method.
12738 (line_header::include_dir_at, line_header::file_name_at): New
12740 (setup_type_unit_groups, setup_type_unit_groups)
12741 (psymtab_include_file_name): Simplify using the new methods.
12742 (lnp_state_machine) <the_line_header>: New field.
12743 <file>: Add comment.
12744 (lnp_state_machine::current_file): New method.
12745 (dwarf_record_line): Simplify using the new methods.
12746 (init_lnp_state_machine): Initialize the "the_line_header" field.
12747 (dwarf_decode_lines_1, dwarf_decode_lines, file_file_name):
12748 Simplify using the new methods.
12750 2017-03-27 Pedro Alves <palves@redhat.com>
12752 * cp-name-parser.y (make_empty): Delete.
12753 (demangler_special, nested_name, ptr_operator, array_indicator)
12754 (direct_declarator, declarator_1): Use fill_comp instead of
12757 2017-03-27 Pedro Alves <palves@redhat.com>
12759 * xml-support.h (gdb_xml_debug): Pass a "first-to-check" argument
12760 to ATTRIBUTE_PRINTF.
12761 * solib-target.c (library_list_start_list): Print "string" not
12763 * xml-tdesc.c (tdesc_start_field): Pass "field_name" to
12764 gdb_xml_error call.
12766 2017-03-27 Pedro Alves <palves@redhat.com>
12768 * dwarf2read.c (struct file_and_directory): New.
12769 (dwarf2_get_dwz_file): Adjust to use std::string.
12770 (dw2_get_file_names_reader): Adjust to use file_and_directory.
12771 (find_file_and_directory): Adjust to return a file_and_directory
12773 (read_file_scope): Adjust to use file_and_directory. Remove
12774 make_cleanup/do_cleanups calls.
12775 (open_and_init_dwp_file): Adjust to use std::string. Remove
12776 make_cleanup/do_cleanups calls.
12777 * python/python.c (do_start_initialization): Adjust to ldirname
12778 returning a std::string.
12779 * utils.c (ldirname): Now returns a std::string.
12780 * utils.h (ldirname): Change return type to std::string.
12781 * xml-syscall.c (xml_init_syscalls_info): Adjust to ldirname
12782 returning a std::string.
12783 * xml-tdesc.c (file_read_description_xml): Likewise.
12785 2017-03-24 Alan Hayward <alan.hayward@arm.com>
12787 * regcache.c (regcache_debug_print_register): New function.
12788 * regcache.h (regcache_debug_print_register): New declaration.
12789 * target.c (debug_print_register): Remove.
12790 (target_fetch_registers): Call regcache_debug_print_register.
12791 (target_store_registers): Likewise.
12793 2017-03-24 Pádraig Brady <pbrady@fb.com>
12795 * dwarf2read.c (setup_type_unit_groups): Ensure dir_index doesn't
12796 reference beyond the 'lh->include_dirs' array before accessing to
12798 (psymtab_include_file_name): Likewise.
12799 (dwarf_decode_lines_1): Likewise.
12800 (dwarf_decode_lines): Likewise.
12801 (file_file_name): Likewise.
12803 2017-03-23 Simon Marchi <simon.marchi@ericsson.com>
12805 * fbsd-tdep.c (fbsd_corefile_thread): Don't set/restore
12807 * proc-service.c (ps_lgetregs, ps_lsetregs, ps_lgetfpregs,
12808 ps_lsetfpregs): Likewise.
12809 * regcache.c (regcache_raw_update, regcache_raw_write): Likewise.
12810 * sol-thread.c (ps_lgetregs, ps_lsetregs, ps_lgetfpregs,
12811 ps_lsetfpregs): Likewise.
12812 * target.c (target_fetch_registers, target_store_registers):
12815 2017-03-23 Alan Hayward <alan.hayward@arm.com>
12817 * sol-thread.c (sol_thread_store_registers): Remove regcache calls.
12819 2017-03-23 Yao Qi <yao.qi@linaro.org>
12821 * aarch64-tdep.c (aarch64_process_record_test): Declare.
12822 (_initialize_aarch64_tdep): Register it.
12823 (aarch64_record_load_store): Handle PRFM instruction.
12824 (aarch64_process_record_test): New function.
12826 2017-03-23 Yao Qi <yao.qi@linaro.org>
12828 * aarch64-tdep.c (aarch64_record_load_store): Fix code
12831 2017-03-23 Yao Qi <yao.qi@linaro.org>
12833 * aarch64-tdep.c: Remove AARCH64_RECORD_FAILURE.
12835 2017-03-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
12837 python/python.c (do_start_initialization): Fix memory leak.
12839 2017-03-22 Simon Marchi <simon.marchi@polymtl.ca>
12841 * inf-ptrace.c (inf_ptrace_xfer_partial): Get pid from ptid
12842 using get_ptrace_pid.
12843 * linux-nat.c (linux_nat_xfer_partial): Don't set/restore
12845 (linux_proc_xfer_partial, linux_proc_xfer_spu): Use lwp of
12846 inferior_ptid instead of pid.
12848 2017-03-22 Yao Qi <yao.qi@linaro.org>
12850 * aarch64-tdep.c: Wrap locally used classes in anonymous
12852 * arm-tdep.c: Likewise.
12853 * linespec.c: Likewise.
12854 * ui-out.c: Likewise.
12856 2017-03-22 Jonah Graham <jonah@kichwacoders.com>
12859 * python/lib/gdb/printer/bound_registers.py: Import sys.
12861 2017-03-21 Simon Marchi <simon.marchi@ericsson.com>
12863 * windows-nat.c (do_windows_fetch_inferior_registers): Add
12864 windows_thread_info parameter and use it instead of
12866 (windows_fetch_inferior_registers): Don't set current_thread,
12867 pass the thread to do_windows_fetch_inferior_registers. Use
12868 ptid from regcache instead of inferior_ptid.
12869 (do_windows_store_inferior_registers): Add windows_thread_info
12870 parameter and use it instead of current_thread.
12871 (windows_store_inferior_registers): Don't set current_thread,
12872 pass the thread to do_windows_store_inferior_registers. Use
12873 ptid from regcache instead of inferior_ptid.
12875 2017-03-21 Simon Marchi <simon.marchi@ericsson.com>
12877 * ser-mingw.c (ser_windows_raw): Remove reference to
12878 struct serial::current_timeout.
12880 2017-03-21 Ivo Raisr <ivo.raisr@oracle.com>
12883 * gdb/sparc-tdep.h (gdbarch_tdep) <sparc64_ccr_type>: New field.
12884 * gdb/sparc64-tdep.c (sparc64_ccr_type): New function.
12885 (sparc64_fsr_type): Fix %fsr decoding.
12887 2017-03-21 Tim Wiederhake <tim.wiederhake@intel.com>
12889 * python/py-record-btrace.c (btpy_insn_data): Change return type
12892 2017-03-20 Simon Marchi <simon.marchi@polymtl.ca>
12894 * spu-linux-nat.c (spu_fetch_inferior_registers,
12895 spu_store_inferior_registers): Use ptid from regcache, set and
12896 restore inferior_ptid.
12897 * spu-multiarch.c (spu_fetch_registers, spu_store_registers):
12900 2017-03-20 Simon Marchi <simon.marchi@polymtl.ca>
12902 * i386-linux-nat.c (fetch_register, store_register,
12903 i386_linux_fetch_inferior_registers,
12904 i386_linux_store_inferior_registers): Use ptid from regcache.
12905 * ia64-linux-nat.c (ia64_linux_fetch_register,
12906 ia64_linux_store_register): Likewise.
12907 * inf-ptrace.c (inf_ptrace_fetch_register,
12908 inf_ptrace_store_register): Likewise.
12909 * m32r-linux-nat.c (m32r_linux_fetch_inferior_registers,
12910 m32r_linux_store_inferior_registers): Likewise.
12911 * m68k-bsd-nat.c (m68kbsd_fetch_inferior_registers,
12912 m68kbsd_store_inferior_registers): Likewise.
12913 * m68k-linux-nat.c (fetch_register, store_register,
12914 m68k_linux_fetch_inferior_registers,
12915 m68k_linux_store_inferior_registers): Likewise.
12916 * m88k-bsd-nat.c (m88kbsd_fetch_inferior_registers,
12917 m88kbsd_store_inferior_registers): Likewise.
12918 * mips-fbsd-nat.c (mips_fbsd_fetch_inferior_registers,
12919 mips_fbsd_store_inferior_registers): Likewise.
12920 * mips-linux-nat.c (mips64_linux_regsets_fetch_registers,
12921 mips64_linux_regsets_store_registers): Likewise.
12922 * mips-nbsd-nat.c (mipsnbsd_fetch_inferior_registers,
12923 mipsnbsd_store_inferior_registers): Likewise.
12924 * mips-obsd-nat.c (mips64obsd_fetch_inferior_registers,
12925 mips64obsd_store_inferior_registers): Likewise.
12926 * nto-procfs.c (procfs_fetch_registers, procfs_store_registers):
12928 * ppc-fbsd-nat.c (ppcfbsd_fetch_inferior_registers,
12929 ppcfbsd_store_inferior_registers): Likewise.
12930 * ppc-linux-nat.c (ppc_linux_fetch_inferior_registers,
12931 ppc_linux_store_inferior_registers): Likewise.
12932 * ppc-nbsd-nat.c (ppcnbsd_fetch_inferior_registers,
12933 ppcnbsd_store_inferior_registers): Likewise.
12934 * ppc-obsd-nat.c (ppcobsd_fetch_registers,
12935 ppcobsd_store_registers): Likewise.
12936 * procfs.c (procfs_fetch_registers, procfs_store_registers):
12938 * ravenscar-thread.c (ravenscar_fetch_registers,
12939 ravenscar_store_registers, ravenscar_prepare_to_store):
12941 * record-btrace.c (record_btrace_fetch_registers,
12942 record_btrace_store_registers, record_btrace_prepare_to_store):
12944 * remote-sim.c (gdbsim_fetch_register, gdbsim_store_register):
12945 Lookup inferior using ptid from regcache, instead of
12947 * remote.c (remote_fetch_registers, remote_store_registers): Use
12948 ptid from regcache.
12949 * rs6000-nat.c (fetch_register, store_register): Likewise.
12950 * s390-linux-nat.c (s390_linux_fetch_inferior_registers,
12951 s390_linux_store_inferior_registers): Likewise.
12952 * sh-nbsd-nat.c (shnbsd_fetch_inferior_registers,
12953 shnbsd_store_inferior_registers): Likewise.
12954 * sol-thread.c (sol_thread_fetch_registers,
12955 sol_thread_store_registers): Likewise.
12956 * sparc-nat.c (sparc_fetch_inferior_registers,
12957 sparc_store_inferior_registers): Likewise.
12958 * tilegx-linux-nat.c (fetch_inferior_registers,
12959 store_inferior_registers): Likewise.
12960 * vax-bsd-nat.c (vaxbsd_fetch_inferior_registers,
12961 vaxbsd_store_inferior_registers): Likewise.
12962 * xtensa-linux-nat.c (fetch_gregs, store_gregs, fetch_xtregs,
12963 store_xtregs): Likewise.
12965 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
12968 * NEWS: Mention support for rvalue references in GDB and python.
12969 * doc/gdb.texinfo (C Plus Plus Expressions): Mention that GDB
12970 supports both lvalue and rvalue references.
12972 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
12975 * gdbtypes.c (rank_one_type): Implement overloading
12976 resolution rules regarding rvalue references.
12978 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
12981 * aarch64-tdep.c (aarch64_type_align)
12982 (aarch64_extract_return_value, aarch64_store_return_value): Change
12983 lvalue reference type checks to general reference type checks.
12984 * amd64-tdep.c (amd64_classify): Likewise.
12985 * amd64-windows-tdep.c (amd64_windows_passed_by_integer_register):
12987 * arm-tdep.c (arm_type_align, arm_extract_return_value)
12988 (arm_store_return_value): Likewise.
12989 * ax-gdb.c (gen_fetch, gen_cast): Likewise.
12990 * c-typeprint.c (c_print_type): Likewise.
12991 * c-varobj.c (adjust_value_for_child_access, c_value_of_variable)
12992 (cplus_number_of_children, cplus_describe_child): Likewise.
12993 * compile/compile-c-symbols.c (generate_vla_size): Likewise.
12994 * completer.c (expression_completer): Likewise.
12995 * cp-support.c (make_symbol_overload_list_adl_namespace):
12997 * darwin-nat-info.c (info_mach_region_command): Likewise.
12998 * dwarf2loc.c (entry_data_value_coerce_ref)
12999 (value_of_dwarf_reg_entry): Likewise.
13000 * eval.c (ptrmath_type_p, evaluate_subexp_standard)
13001 (evaluate_subexp_for_address, evaluate_subexp_for_sizeof):
13003 * findvar.c (extract_typed_address, store_typed_address):
13005 * gdbtypes.c (rank_one_type): Likewise.
13006 * hppa-tdep.c (hppa64_integral_or_pointer_p): Likewise.
13007 * infcall.c (value_arg_coerce): Likewise.
13008 * language.c (pointer_type): Likewise.
13009 * m32c-tdep.c (m32c_reg_arg_type, m32c_m16c_address_to_pointer):
13011 * m88k-tdep.c (m88k_integral_or_pointer_p): Likewise.
13012 * mn10300-tdep.c (mn10300_type_align): Likewise.
13013 * msp430-tdep.c (msp430_push_dummy_call): Likewise.
13014 * ppc-sysv-tdep.c (do_ppc_sysv_return_value)
13015 (ppc64_sysv_abi_push_param, ppc64_sysv_abi_return_value):
13017 * printcmd.c (print_formatted, x_command): Likewise.
13018 * python/py-type.c (typy_get_composite, typy_template_argument):
13020 * python/py-value.c (valpy_referenced_value)
13021 (valpy_get_dynamic_type, value_has_field): Likewise.
13022 * s390-linux-tdep.c (s390_function_arg_integer): Likewise.
13023 * sparc-tdep.c (sparc_integral_or_pointer_p): Likewise.
13024 * sparc64-tdep.c (sparc64_integral_or_pointer_p): Likewise.
13025 * spu-tdep.c (spu_scalar_value_p): Likewise.
13026 * symtab.c (lookup_symbol_aux): Likewise.
13027 * typeprint.c (whatis_exp, print_type_scalar): Likewise.
13028 * valarith.c (binop_types_user_defined_p, unop_user_defined_p):
13030 * valops.c (value_cast_pointers, value_cast)
13031 (value_reinterpret_cast, value_dynamic_cast, value_addr, typecmp)
13032 (value_struct_elt, value_struct_elt_bitpos)
13033 (value_find_oload_method_list, find_overload_match)
13034 (value_rtti_indirect_type): Likewise.
13035 * valprint.c (val_print_scalar_type_p, generic_val_print):
13037 * value.c (value_actual_type, value_as_address, unpack_long)
13038 (pack_long, pack_unsigned_long, coerce_ref_if_computed)
13039 (coerce_ref): Likewise.
13040 * varobj.c (varobj_get_value_type): Likewise.
13042 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
13045 * doc/python.texi (Types in Python): Add TYPE_CODE_RVALUE_REF to
13046 table of constants.
13047 * python/lib/gdb/command/explore.py: Support exploring values
13048 of rvalue reference types.
13049 * python/lib/gdb/types.py: Implement get_basic_type() for
13050 rvalue reference types.
13051 * python/py-type.c (pyty_codes) <TYPE_CODE_RVALUE_REF>: New
13053 * python/py-value.c (valpy_getitem): Add an rvalue reference
13055 (valpy_reference_value): Add new parameter "refcode".
13056 (valpy_lvalue_reference_value, valpy_rvalue_reference_value):
13057 New wrappers for valpy_reference_value().
13058 * python/py-xmethods.c (gdbpy_get_xmethod_result_type)
13059 (gdbpy_invoke_xmethod): Likewise.
13061 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
13064 * dwarf2read.c (process_die, read_type_die_1): Handle the
13065 DW_TAG_rvalue_reference_type DIE.
13066 (read_tag_reference_type): Add new parameter "refcode".
13068 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
13071 * c-typeprint.c (c_print_type, c_type_print_varspec_prefix)
13072 (c_type_print_modifier, c_type_print_varspec_suffix)
13073 (c_type_print_base): Support printing rvalue reference types.
13074 * c-valprint.c (c_val_print, c_value_print): Support printing
13075 rvalue reference values.
13077 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
13080 * cp-name-parser.y (ptr_operator): Handle the '&&' token in
13082 * cp-support.c (replace_typedefs): Handle
13083 DEMANGLE_COMPONENT_RVALUE_REFERENCE.
13084 * python/py-type.c (typy_lookup_type): Likewise.
13086 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
13089 * c-exp.y (ptr_operator): Handle the '&&' token in the typename.
13090 * parse.c (insert_type): Change assert statement.
13091 (follow_types): Handle rvalue reference types.
13092 * parser-defs.h (enum type_pieces) <tp_rvalue_reference>: New
13095 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
13098 * ada-lang.c (ada_evaluate_subexp): Adhere to the new
13099 value_ref() interface.
13100 * c-valprint.c (c_value_print): Likewise.
13101 * infcall.c (value_arg_coerce): Likewise.
13102 * python/py-value.c (valpy_reference_value): Likewise.
13103 * valops.c (value_cast, value_reinterpret_cast)
13104 (value_dynamic_cast, typecmp): Likewise.
13105 (value_ref): Parameterize by kind of return value reference type.
13106 * value.h (value_ref): Add new parameter "refcode".
13108 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
13111 * dwarf2read.c (read_tag_reference_type): Use
13112 lookup_lvalue_reference_type() instead of lookup_reference_type().
13113 * eval.c (evaluate_subexp_standard): Likewise.
13114 * f-exp.y: Likewise.
13115 * gdbtypes.c (make_reference_type, lookup_reference_type):
13116 Generalize with rvalue reference types.
13117 (lookup_lvalue_reference_type, lookup_rvalue_reference_type): New
13118 convenience wrappers for lookup_reference_type().
13119 * gdbtypes.h (make_reference_type, lookup_reference_type): Add a
13120 reference kind parameter.
13121 (lookup_lvalue_reference_type, lookup_rvalue_reference_type): Add
13122 wrappers for lookup_reference_type().
13123 * guile/scm-type.c (gdbscm_type_reference): Use
13124 lookup_lvalue_reference_type() instead of lookup_reference_type().
13125 * guile/scm-value.c (gdbscm_value_dynamic_type): Likewise.
13126 * parse.c (follow_types): Likewise.
13127 * python/py-type.c (typy_reference, typy_lookup_type): Likewise.
13128 * python/py-value.c (valpy_get_dynamic_type, valpy_getitem):
13130 * python/py-xmethods.c (gdbpy_get_xmethod_result_type)
13131 (gdbpy_invoke_xmethod): Likewise.
13132 * stabsread.c: Provide extra argument to make_reference_type()
13134 * valops.c (value_ref, value_rtti_indirect_type): Use
13135 lookup_lvalue_reference_type() instead of lookup_reference_type().
13137 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
13140 * gdbtypes.h (enum type_code) <TYPE_CODE_RVALUE_REF>: New constant.
13141 (TYPE_IS_REFERENCE): New macro.
13142 (struct type): Add rvalue_reference_type field.
13143 (TYPE_RVALUE_REFERENCE_TYPE): New macro.
13145 2017-03-20 Marc-Andre Laperle <marc-andre.laperle@ericsson.com>
13147 * NEWS: Add an entry about new '-file-list-shared-libraries' command.
13148 * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries):
13149 New function definition.
13150 * mi/mi-cmds.c (mi_cmds): Add -file-list-shared-libraries command.
13151 * mi/mi-cmds.h (mi_cmd_file_list_shared_libraries):
13152 New function declaration.
13153 * mi/mi-interp.c (mi_output_solib_attribs): New Function.
13154 * mi/mi-interp.h: New file.
13155 * solib.c (info_sharedlibrary_command): Replace for loop with
13157 * solib.h (update_solib_list): New function declaration.
13158 (so_list_head): Move macro.
13159 * solist.h (ALL_SO_LIBS): New macro.
13161 2017-03-20 Marc-Andre Laperle <marc-andre.laperle@ericsson.com>
13163 * infcmd.c (post_create_inferior): Remove unused argument in
13165 * remote.c (remote_start_remote): Likewise.
13166 * solib-frv.c (frv_fetch_objfile_link_map): Likewise.
13167 * solib-svr4.c: (svr4_fetch_objfile_link_map): Likewise.
13168 (enable_break): Likewise.
13169 * solib.c (update_solib_list): Remove unused target argument
13170 and its documentation.
13171 (solib_add): Remove unused target argument. Remove unused
13172 argument in call to update_solib_list.
13173 (info_sharedlibrary_command): Remove unused argument in call
13174 to update_solib_list.
13175 (sharedlibrary_command): Remove unused argument in call to
13177 (handle_solib_event): Likewise.
13178 (reload_shared_libraries): Likewise.
13179 * solib.h (solib_add): Remove unused target argument.
13181 2017-03-20 Andreas Arnez <arnez@linux.vnet.ibm.com>
13183 * s390-linux-tdep.c (is_rsi, is_rie): Remove functions.
13184 (s390_displaced_step_fixup): Cover relative branches with the
13185 default fixup handling. This fixes lack of support for some
13186 relative branch instructions.
13188 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
13190 * i386-gnu-nat.c (gnu_fetch_registers, gnu_store_registers): Use
13191 ptid from regcache.
13193 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
13195 * i386-darwin-nat.c (i386_darwin_fetch_inferior_registers,
13196 i386_darwin_store_inferior_registers): Use ptid from regcache.
13198 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
13200 * i386-bsd-nat.c (i386bsd_fetch_inferior_registers,
13201 i386bsd_store_inferior_registers): Use ptid from regcache.
13203 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
13205 * hppa-obsd-nat.c (hppaobsd_fetch_registers,
13206 hppaobsd_store_registers): Use ptid from regcache.
13208 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
13210 * hppa-nbsd-nat.c (hppanbsd_fetch_registers,
13211 hppanbsd_store_registers): Use ptid from regcache.
13213 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
13215 * hppa-linux-nat.c (fetch_register, store_register): Use ptid
13216 from regcache. Use get_ptrace_pid.
13218 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
13220 * corelow.c (get_core_register_section): Use ptid from regcache,
13223 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
13225 * bsd-uthread.c (bsd_uthread_fetch_registers,
13226 bsd_uthread_store_registers): Use ptid from regcache, set and
13227 restore inferior_ptid.
13229 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
13231 * arm-nbsd-nat.c (fetch_register, fetch_regs, fetch_fp_register,
13232 fetch_fp_regs, store_register, store_regs, store_fp_register,
13233 store_fp_regs): Use ptid from regcache.
13235 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
13237 * arm-linux-nat.c (fetch_fpregs, store_fpregs, fetch_regs,
13238 store_regs, fetch_wmmx_regs, store_wmmx_regs, fetch_vfp_regs,
13239 store_vfp_regs): Use ptid from regcache.
13241 2017-03-17 Pedro Alves <palves@redhat.com>
13244 * ser-base.c (ser_base_wait_for): Add comment.
13245 (do_ser_base_readchar): Improve comment based on the ser-unix.c's
13247 * ser-unix.c (hardwire_raw): Remove reference to
13248 scb->current_timeout.
13249 (wait_for, do_hardwire_readchar, hardwire_readchar): Delete.
13250 (hardwire_ops): Install ser_base_readchar instead of
13252 * serial.h (struct serial) <current_timeout, timeout_remaining>:
13255 2017-03-17 Jonah Graham <jonah@kichwacoders.com>
13258 * python/lib/gdb/printer/bound_registers.py: Add support for
13261 2017-03-16 Andreas Arnez <arnez@linux.vnet.ibm.com>
13263 * dwarf2loc.c (indirect_synthetic_pointer): Get data type of
13264 pointed-to DIE and pass it to dwarf2_evaluate_loc_desc_full.
13265 (dwarf2_evaluate_loc_desc_full): New parameter subobj_type; rename
13266 byte_offset to subobj_byte_offset. Fix the handling of
13267 DWARF_VALUE_STACK on big-endian targets when coming via an
13269 (dwarf2_evaluate_loc_desc): Adjust call to
13270 dwarf2_evaluate_loc_desc_full.
13271 * dwarf2loc.h (dwarf2_fetch_die_type_sect_off): New declaration.
13272 * dwarf2read.c (dwarf2_fetch_die_type_sect_off): New function.
13274 2017-03-16 Yao Qi <yao.qi@linaro.org>
13276 * arm-tdep.c (thumb_record_misc): Decode CBNZ, CBZ, REV16,
13277 and REVSH instructions.
13279 2017-03-16 Yao Qi <yao.qi@linaro.org>
13281 * arm-tdep.c [GDB_SELF_TEST]: include "selftests.h".
13282 (arm_record_test): Declare.
13283 (_initialize_arm_tdep) [GDB_SELF_TEST]: call register_self_test.
13284 (thumb_record_ld_st_reg_offset): Rewrite the opcode matching to
13285 align with the manual.
13286 (thumb_record_misc): Adjust the code order to align with the
13288 (thumb2_record_decode_insn_handler): Fix instruction matching.
13289 (instruction_reader_thumb): New class.
13290 (arm_record_test): New function.
13292 2017-03-16 Yao Qi <yao.qi@linaro.org>
13294 * arm-tdep.c (abstract_memory_reader): New class.
13295 (instruction_reader): New class.
13296 (extract_arm_insn): Add argument 'reader'. Callers updated.
13297 (decode_insn): Likewise.
13299 2017-03-16 Doug Evans <dje@google.com>
13301 * guile/scm-lazy-string.c (lazy_string_smob): Clarify use of LENGTH
13302 member. Change type of TYPE member to SCM. All uses updated.
13303 (lsscm_make_lazy_string_smob): Add assert.
13304 (lsscm_make_lazy_string): Flag bad length values.
13305 (lsscm_elt_type): New function.
13306 (gdbscm_lazy_string_to_value): Rewrite to use
13307 lsscm_safe_lazy_string_to_value.
13308 (lsscm_safe_lazy_string_to_value): Fix handling of TYPE_CODE_PTR.
13309 * guile/scm-value.c (gdbscm_value_to_lazy_string): Flag bad length
13310 values. Fix TYPE_CODE_PTR. Handle TYPE_CODE_ARRAY. Handle typedefs
13312 * guile/guile-internal.h (tyscm_scm_to_type): Declare.
13313 * guile/scm-type.c (tyscm_scm_to_type): New function.
13315 2017-03-15 Doug Evans <dje@google.com>
13317 PR python/17728, python/18439, python/18779
13318 * python/py-lazy-string.c (lazy_string_object): Clarify use of LENGTH
13319 member. Change type of TYPE member to PyObject *. All uses updated.
13320 (stpy_convert_to_value): Fix handling of TYPE_CODE_PTR.
13321 (gdbpy_create_lazy_string_object): Flag bad length values.
13322 Handle TYPE_CODE_ARRAY with possibly different user-provided length.
13323 Handle typedefs in incoming type.
13324 (stpy_lazy_string_elt_type): New function.
13325 (gdbpy_extract_lazy_string): Call it.
13326 * python/py-value.c (valpy_lazy_string): Flag bad length values.
13327 Fix handling of TYPE_CODE_PTR. Handle TYPE_CODE_ARRAY. Handle
13328 typedefs in incoming type.
13330 2017-03-16 Doug Evans <dje@google.com>
13332 * guile/guile-internal.h (tyscm_scm_to_type): Declare.
13333 * guile/scm-type.c (tyscm_scm_to_type): New function.
13335 2017-03-16 Jiong Wang <jiong.wang@arm.com>
13337 * inf-ptrace.c (inf_ptrace_peek_poke): Change the type to
13338 "ULONGEST" for "skip".
13340 2017-03-14 Andreas Arnez <arnez@linux.vnet.ibm.com>
13343 * inf-ptrace.c (inf_ptrace_xfer_partial): In "case
13344 TARGET_OBJECT_MEMORY", extract the logic for ptrace peek/poke...
13345 (inf_ptrace_peek_poke): ...here. New function. Now also loop
13346 over ptrace peek/poke until end of buffer or error.
13348 2017-03-14 Simon Marchi <simon.marchi@ericsson.com>
13350 * parse.c (length_of_subexp): Make static.
13351 * parser-defs.h (length_of_subexp): Remove.
13353 2017-03-14 Andreas Arnez <arnez@linux.vnet.ibm.com>
13355 * linux-nat.c (linux_proc_xfer_partial): Handle write operations
13358 2017-03-14 Pedro Alves <palves@redhat.com>
13360 * cp-name-parser.y (cp_demangled_name_to_comp): Update comment.
13361 (main): Use std::unique_ptr. Remove calls to
13362 cp_demangled_name_parse_free.
13364 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
13366 * alpha-bsd-nat.c (alphabsd_fetch_inferior_registers,
13367 alphabsd_store_inferior_registers): Use regcache->ptid instead
13370 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
13372 * aix-thread.c (aix_thread_fetch_registers,
13373 aix_thread_store_registers): Use regcache->ptid instead of
13376 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
13378 * aarch64-linux-nat.c (fetch_gregs_from_thread,
13379 store_gregs_to_thread, fetch_fpregs_from_thread,
13380 store_fpregs_to_thread): Use regcache->ptid instead of
13383 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
13385 * amd64-linux-nat.c (amd64_linux_fetch_inferior_registers,
13386 amd64_linux_fetch_inferior_registers): Use regcache->ptid
13387 instead of inferior_ptid.
13389 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
13391 * target.c (target_fetch_registers, target_store_registers): Add
13394 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
13396 * regcache.h (regcache_get_ptid): New function.
13397 * regcache.c (regcache_get_ptid): New function.
13399 2017-03-13 Mark Wielaard <mark@klomp.org>
13401 * cp-name-parser.y (make_empty): Initialize d_printing to zero.
13403 2017-03-10 Keith Seitz <keiths@redhat.com>
13406 * c-typeprint.c (cp_type_print_method_args): Skip artificial arguments.
13408 2017-03-08 Pedro Alves <palves@redhat.com>
13411 * infrun.c (start_step_over, do_target_resume, resume)
13412 (restart_threads): Assert we're not resuming a thread that is
13413 meant to be stopped.
13414 (infrun_thread_stop_requested_callback): Delete.
13415 (infrun_thread_stop_requested): If the thread is internally
13416 stopped, queue a pending stop event and clear the thread's
13417 inline-frame state.
13418 (handle_stop_requested): New function.
13419 (handle_syscall_event, handle_inferior_event_1): Use
13420 handle_stop_requested.
13421 (handle_stop_requested): New function.
13422 (handle_signal_stop): Set the thread's stop_signal here instead of
13424 (finish_step_over): Clear step over info unconditionally.
13425 (handle_signal_stop): If the user had interrupted the event
13426 thread, consider the stop a random signal.
13427 (handle_signal_stop) <signal arrived while stepping over
13428 breakpoint>: Don't restart threads here.
13429 (stop_waiting): Don't clear step-over info here.
13431 2017-03-08 Pedro Alves <palves@redhat.com>
13434 * common/gdb_unlinker.h (unlinker::unlinker): Attribute nonnull
13435 goes to argument 2, not 1.
13437 2017-03-08 Pedro Alves <palves@redhat.com>
13440 * top.c (gdb_readline_wrapper): Avoid passing NULL to
13441 display_gdb_prompt.
13442 (command_line_input): Add comment.
13444 2017-03-08 Pedro Alves <palves@redhat.com>
13447 * tui/tui-file.c (tui_file::write): New.
13448 * tui/tui-file.h (tui_file): Override "write".
13449 * tui/tui-io.c (do_tui_putc, update_start_line): New functions,
13450 factored out from ...
13451 (tui_puts): ... here.
13452 (tui_putc): Use them.
13453 (tui_write): New function.
13454 * tui/tui-io.h (tui_write): Declare.
13456 2017-03-07 Sergio Durigan Junior <sergiodj@redhat.com>
13458 * Makefile.in (SFILES): Replace "environ.c" with
13459 "common/environ.c".
13460 (HFILES_NO_SRCDIR): Likewise, for "environ.h".
13461 * environ.c: Include "common-defs.h" instead of "defs.h. Moved
13463 * common/environ.c: ... here.
13464 * environ.h: Moved to...
13465 * common/environ.h: ... here.
13467 2017-03-07 Peter Bergner <bergner@vnet.ibm.com>
13469 * gdbarch.sh (pstring_ptr): New static function.
13470 (gdbarch_disassembler_options): Use it.
13471 (gdbarch_verify_disassembler_options): Print valid_disassembler_options,
13472 not valid_disassembler_option->name.
13473 * gdbarch.c: Regenerate.
13475 2017-03-07 Peter Bergner <bergner@vnet.ibm.com>
13477 * config/powerpc/ppc64-linux.mh (MH_CFLAGS): Delete.
13479 2017-03-07 Pedro Alves <palves@redhat.com>
13481 * tui/tui-regs.c (tui_restore_gdbout): Don't delete gdb_stdout.
13483 2017-03-07 Walfred Tedeschi <walfred.tedeschi@intel.com>
13485 * i387-tdep.h (i387_reset_bnd_regs): Add function definition.
13486 * i387-tdep.c (i387_reset_bnd_regs): Add function implementation.
13487 * i386-tdep.c (i386_push_dummy_call): Call i387_reset_bnd_regs.
13488 * amd64-tdep.c (amd64_push_dummy_call): Call i387_reset_bnd_regs.
13490 2017-03-06 Simon Marchi <simon.marchi@ericsson.com>
13492 * xtensa-linux-nat.c (fetch_gregs): Remove const.
13494 2017-03-03 Simon Marchi <simon.marchi@ericsson.com>
13496 * remote.c (remote_add_target_side_commands): Use range-based
13499 2017-03-03 Yao Qi <yao.qi@linaro.org>
13502 * ada-valprint.c (ada_val_print_ref): Call value_fetch_lazy if
13504 * valprint.c (common_val_print): Likewise.
13506 2017-02-28 Peter Bergner <bergner@vnet.ibm.com>
13508 * NEWS: Mention new set/show disassembler-options commands.
13509 * doc/gdb.texinfo: Document new set/show disassembler-options commands.
13510 * disasm.c: Include "arch-utils.h", "gdbcmd.h" and "safe-ctype.h".
13511 (prospective_options): New static variable.
13512 (gdb_disassembler::gdb_disassembler): Initialize
13513 m_di.disassembler_options.
13514 (gdb_buffered_insn_length_init_dis): Initilize di->disassembler_options.
13515 (get_disassembler_options): New function.
13516 (set_disassembler_options): Likewise.
13517 (set_disassembler_options_sfunc): Likewise.
13518 (show_disassembler_options_sfunc): Likewise.
13519 (disassembler_options_completer): Likewise.
13520 (_initialize_disasm): Likewise.
13521 * disasm.h (get_disassembler_options): New prototype.
13522 (set_disassembler_options): Likewise.
13523 * gdbarch.sh (gdbarch_disassembler_options): New variable.
13524 (gdbarch_verify_disassembler_options): Likewise.
13525 * gdbarch.c: Regenerate.
13526 * gdbarch.h: Likewise.
13527 * arm-tdep.c (num_disassembly_options): Delete.
13528 (set_disassembly_style): Likewise.
13529 (arm_disassembler_options): New static variable.
13530 (set_disassembly_style_sfunc): Convert short style name into long
13531 option name. Call set_disassembler_options.
13532 (show_disassembly_style_sfunc): New function.
13533 (arm_gdbarch_init): Call set_gdbarch_disassembler_options and
13534 set_gdbarch_verify_disassembler_options.
13535 (_initialize_arm_tdep): Delete regnames variable and update callers.
13536 (arm_disassembler_options): Initialize.
13537 (disasm_options): New variable.
13538 (num_disassembly_options): Rename from this...
13539 (num_disassembly_styles): ...to this. Compute by scanning through
13541 (valid_disassembly_styles): Initialize using disasm_options.
13542 Remove calls to parse_arm_disassembler_option, get_arm_regnames and
13543 set_arm_regname_option.
13544 Pass show_disassembly_style_sfunc to the "disassembler" setshow command.
13545 * rs6000-tdep.c (powerpc_disassembler_options): New static variable.
13546 (rs6000_gdbarch_init): Call set_gdbarch_disassembler_options and
13547 set_gdbarch_verify_disassembler_options.
13548 * s390-tdep.c (s390_disassembler_options): New static variable.
13549 (s390_gdbarch_init):all set_gdbarch_disassembler_options and
13550 set_gdbarch_verify_disassembler_options.
13552 2017-02-27 Simon Marchi <simon.marchi@ericsson.com>
13554 * remote.c (remote_add_target_side_condition): Remove "struct"
13555 keyword from range-based for loop.
13557 2017-02-27 Simon Marchi <simon.marchi@ericsson.com>
13559 * remote.c (remote_add_target_side_condition): Use range-based
13560 for loop. Update comment.
13562 2017-02-27 Yao Qi <yao.qi@linaro.org>
13564 * f-typeprint.c (f_print_type): Check "varstring" is empty first.
13566 2017-02-26 Alan Hayward <alan.hayward@arm.com>
13568 * regcache.c (regcache_raw_update): New function.
13569 (regcache_raw_read): Move code to regcache_raw_update.
13570 * regcache.h (regcache_raw_update): New declaration.
13571 * remote.c (remote_prepare_to_store): Call regcache_raw_update.
13573 2017-02-26 Jan Kratochvil <jan.kratochvil@redhat.com>
13575 * dwarf2read.c (create_debug_type_hash_table): Initialize
13576 header.signature and header.type_offset_in_tu.
13578 2017-02-24 Pedro Alves <palves@redhat.com>
13580 * symtab.c (make_file_symbol_completion_list_1): Use
13581 add_symtab_completions.
13583 2017-02-24 Alan Hayward <alan.hayward@arm.com>
13585 * stack.c (frame_info): Use frame_unwind_register_value to avoid buf.
13587 2017-02-24 Alan Hayward <alan.hayward@arm.com>
13589 * i386-tdep.c (i386_pseudo_register_read_into_value): Use
13590 I386_MAX_REGISTER_SIZE.
13591 (i386_pseudo_register_write): Likewise.
13592 (i386_process_record): Likewise.
13593 * i387-tdep.c (i387_supply_xsave): Likewise.
13594 * m68k-linux-nat.c (fetch_register): Use M68K_MAX_REGISTER_SIZE.
13595 (store_register): Likewise.
13597 2017-02-23 Pedro Alves <palves@redhat.com>
13599 * ada-lang.c: Include "common/function-view.h".
13600 (ada_iterate_over_symbols): Adjust to use function_view as
13602 (struct add_partial_datum, ada_complete_symbol_matcher): Delete.
13603 (ada_make_symbol_completion_list): Use a lambda.
13604 (ada_exc_search_name_matches): Delete.
13605 (name_matches_regex): New.
13606 (ada_add_global_exceptions): Use a lambda and name_matches_regex.
13607 * compile/compile-c-support.c: Include "common/function-view.h".
13608 (print_one_macro): Change prototype to accept a ui_file pointer.
13609 (write_macro_definitions): Use a lambda.
13610 * dwarf2read.c: Include "common/function-view.h".
13611 (dw2_map_expand_apply, dw2_map_symtabs_matching_filename)
13612 (dw2_expand_symtabs_matching): Adjust to use function_view as
13614 * language.h: Include "common/function-view.h".
13615 (struct language_defn) <la_iterate_over_symbols>: Adjust to use
13616 function_view as callback type.
13617 (LA_ITERATE_OVER_SYMBOLS): Remove DATA parameter.
13618 * linespec.c: Include "common/function-view.h".
13619 (collect_info::add_symbol): New method.
13620 (struct symbol_and_data_callback, iterate_inline_only, struct
13621 symbol_matcher_data, iterate_name_matcher): Delete.
13622 (iterate_over_all_matching_symtabs): Adjust to use function_view
13623 as callback type and lambdas.
13624 (iterate_over_file_blocks): Adjust to use function_view as
13626 (decode_compound_collector): Now a class with private fields.
13627 (decode_compound_collector::release_symbols): New method.
13628 (collect_one_symbol): Rename to...
13629 (decode_compound_collector::operator()): ... this and adjust.
13630 (lookup_prefix_sym): decode_compound_collector construction bits
13631 move to decode_compound_collector ctor. Pass the
13632 decode_compound_collector object directly as callback. Remove
13633 cleanups and use decode_compound_collector::release_symbols
13635 (symtab_collector): Now a class with private fields.
13636 (symtab_collector::release_symtabs): New method.
13637 (add_symtabs_to_list): Rename to...
13638 (symtab_collector::operator()): ... this and adjust.
13639 (collect_symtabs_from_filename): symtab_collector construction
13640 bits move to symtab_collector ctor. Pass the symtab_collector
13641 object directly as callback. Remove cleanups and use
13642 symtab_collector::release_symtabs instead.
13643 (collect_symbols): Delete.
13644 (add_matching_symbols_to_info): Use lambdas.
13645 * macrocmd.c (print_macro_callback): Delete.
13646 (info_macro_command): Use a lambda.
13647 (info_macros_command): Pass print_macro_definition as callable
13649 (print_one_macro): Remove 'ignore' parameter.
13650 (macro_list_command): Adjust.
13651 * macrotab.c (macro_for_each_data::fn): Now a function_view.
13652 (macro_for_each_data::user_data): Delete field.
13653 (foreach_macro): Adjust to call the function_view.
13654 (macro_for_each): Adjust to use function_view as callback type.
13655 (foreach_macro_in_scope): Adjust to call the function_view.
13656 (macro_for_each_in_scope): Adjust to use function_view as callback
13658 * macrotab.h: Include "common/function-view.h".
13659 (macro_callback_fn): Declare a prototype instead of a pointer.
13660 Remove "user_data" parameter.
13661 (macro_for_each, macro_for_each_in_scope): Adjust to use
13662 function_view as callback type.
13663 * psymtab.c (partial_map_expand_apply)
13664 (psym_map_symtabs_matching_filename, recursively_search_psymtabs):
13665 Adjust to use function_view as callback type and to return bool.
13666 (psym_expand_symtabs_matching): Adjust to use function_view as
13668 * symfile-debug.c (debug_qf_map_symtabs_matching_filename): Adjust
13669 to use function_view as callback type and to return bool.
13670 (debug_qf_expand_symtabs_matching): Adjust to use function_view as
13672 * symfile.c (expand_symtabs_matching): Adjust to use function_view
13674 * symfile.h: Include "common/function-view.h".
13675 (expand_symtabs_file_matcher_ftype)
13676 (expand_symtabs_symbol_matcher_ftype)
13677 (expand_symtabs_exp_notify_ftype): Remove "data" parameter and
13679 (quick_symbol_functions::map_symtabs_matching_filename)
13680 (quick_symbol_functions::expand_symtabs_matching): Adjust to use
13681 function_view as callback type and return bool.
13682 (expand_symtabs_matching): Adjust to use function_view as callback
13684 (maintenance_expand_name_matcher)
13685 (maintenance_expand_file_matcher): Delete.
13686 (maintenance_expand_symtabs): Use lambdas.
13687 * symtab.c (iterate_over_some_symtabs): Adjust to use
13688 function_view as callback types and return bool.
13689 (iterate_over_symtabs): Likewise. Use unique_xmalloc_ptr instead
13691 (lookup_symtab_callback): Delete.
13692 (lookup_symtab): Use a lambda.
13693 (iterate_over_symbols): Adjust to use function_view as callback
13695 (struct search_symbols_data, search_symbols_file_matches)
13696 (search_symbols_name_matches): Delete.
13697 (search_symbols): Use a pair of lambdas.
13698 (struct add_name_data, add_macro_name, symbol_completion_matcher)
13699 (symtab_expansion_callback): Delete.
13700 (default_make_symbol_completion_list_break_on_1): Use lambdas.
13701 * symtab.h: Include "common/function-view.h".
13702 (iterate_over_some_symtabs): Adjust to use function_view as
13703 callback type and return bool.
13704 (iterate_over_symtabs): Adjust to use function_view as callback
13706 (symbol_found_callback_ftype): Remove 'data' parameter and return
13708 (iterate_over_symbols): Adjust to use function_view as callback
13711 2017-02-23 Pedro Alves <palves@redhat.com>
13713 * Makefile.in (SUBDIR_UNITTESTS_SRCS, SUBDIR_UNITTESTS_OBS): New.
13714 (%.o) <unittests/%.c>: New pattern.
13715 * configure.ac ($development): Add $(SUBDIR_UNITTESTS_OBS) to
13716 CONFIG_OBS, and $(SUBDIR_UNITTESTS_SRCS) to CONFIG_SRCS.
13717 * common/function-view.h: New file.
13718 * unittests/function-view-selftests.c: New file.
13719 * configure: Regenerate.
13721 2017-02-23 Simon Marchi <simon.marchi@ericsson.com>
13723 * bsd-uthread.c (bsd_uthread_thread_alive): Use ptid instead of
13725 * go32-nat.c (go32_thread_alive): Likewise.
13727 2017-02-23 Yao Qi <yao.qi@linaro.org>
13729 * varobj-iter.h (varobj_iter_delete): Call xfree instead of
13732 2017-02-23 Yao Qi <yao.qi@linaro.org>
13734 * varobj.c (varobj_clear_saved_item): Use delete instead of
13736 (update_dynamic_varobj_children): Likewise.
13738 2017-02-21 Jan Kratochvil <jan.kratochvil@redhat.com>
13740 * dwarf2read.c (dwarf2_record_block_ranges): Add forgotten BASEADDR.
13742 2017-02-21 Simon Marchi <simon.marchi@ericsson.com>
13744 * common/enum-flags.h (enum_flags::enum_flags): Initialize
13745 m_enum_value to 0 in default constructor.
13747 2017-02-21 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
13749 * rs6000-tdep.c (LOAD_AND_RESERVE_MASK): Rename from LWARX_MASK.
13750 (STORE_CONDITIONAL_MASK): Rename from STWCX_MASK.
13751 (LBARX_INSTRUCTION, LHARX_INSTRUCTION, LQARX_INSTRUCTION,
13752 STBCX_INSTRUCTION, STHCX_INSTRUCTION, STQCX_INSTRUCTION): New defines.
13753 (IS_LOAD_AND_RESERVE_INSN, IS_STORE_CONDITIONAL_INSN): New macros.
13754 (ppc_displaced_step_copy_insn): Use IS_LOAD_AND_RESERVE_INSN.
13755 (ppc_deal_with_atomic_sequence): Use IS_LOAD_AND_RESERVE_INSN and
13756 IS_STORE_CONDITIONAL_INSN.
13758 2017-02-21 Jan Kratochvil <jan.kratochvil@redhat.com>
13760 * dwarf2_rnglists_process: Initialize range_beginning and range_end.
13762 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
13764 * NEWS (Changes since GDB 7.12): Add DWARF-5.
13766 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
13768 * dwarf2read.c (skip_one_die, read_attribute_value)
13769 (dwarf2_const_value_attr, dump_die_shallow)
13770 (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
13771 (skip_form_bytes, attr_form_is_constant): Handle DW_FORM_data16.
13773 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
13775 * dwarf2read.c (read_file_scope): Rename DW_MACRO_GNU_*.
13776 (dwarf_parse_macro_header): Accept DWARF version 5.
13777 (dwarf_decode_macro_bytes, dwarf_decode_macros): Rename DW_MACRO_GNU_*.
13779 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
13781 * block.c (call_site_for_pc): Rename DW_OP_GNU_*, DW_TAG_GNU_* and
13783 * common/common-exceptions.h (enum errors): Likewise.
13784 * dwarf2-frame.c (class dwarf_expr_executor): Likewise.
13785 * dwarf2expr.c (dwarf_block_to_dwarf_reg)
13786 (dwarf_expr_context::execute_stack_op): Likewise.
13787 * dwarf2expr.h (struct dwarf_expr_context, struct dwarf_expr_piece):
13789 * dwarf2loc.c (dwarf_evaluate_loc_desc::get_base_type)
13790 (dwarf_evaluate_loc_desc::push_dwarf_reg_entry_value)
13791 (show_entry_values_debug, call_site_to_target_addr)
13792 (func_addr_to_tail_call_list, func_verify_no_selftailcall)
13793 (dwarf_expr_reg_to_entry_parameter, dwarf_entry_parameter_to_value)
13794 (entry_data_value_free_closure, value_of_dwarf_reg_entry)
13795 (value_of_dwarf_block_entry, indirect_pieced_value)
13796 (symbol_needs_eval_context::push_dwarf_reg_entry_value):
13797 (disassemble_dwarf_expression): Likewise.
13798 * dwarf2read.c (process_die, inherit_abstract_dies)
13799 (read_call_site_scope): Likewise.
13800 * gdbtypes.h (struct func_type, struct call_site_parameter)
13801 (struct call_site): Likewise.
13802 * stack.c (read_frame_arg): Likewise.
13803 * std-operator.def (OP_VAR_ENTRY_VALUE): Likewise.
13805 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
13807 * defs.h (read_unsigned_leb128): New declaration.
13808 * dwarf2loc.c (decode_debug_loclists_addresses): New function.
13809 (decode_debug_loc_dwo_addresses): Update DEBUG_LOC_* to DW_LLE_*.
13810 (dwarf2_find_location_expression): Call also
13811 decode_debug_loclists_addresses. Handle DWARF-5 ULEB128 length.
13812 * dwarf2loc.h (dwarf2_version): New declaration.
13813 * dwarf2read.c (struct dwarf2_per_objfile): Add loclists, line_str,
13815 (dwarf2_elf_names): Add .debug_loclists, .debug_line_str,
13817 (struct dwop_section_names): Add loclists_dwo.
13818 (dwop_section_names): Add .debug_loclists.dwo.
13819 (struct comp_unit_head): Add unit_type, signature, type_offset_in_tu.
13820 (struct dwarf2_per_cu_data): Add dwarf_version.
13821 (struct dwo_sections): Add loclists.
13822 (struct attr_abbrev): Add implicit_const.
13823 (read_indirect_line_string): New declaration.
13824 (read_unsigned_leb128): Delete declaration.
13825 (rcuh_kind): New definition.
13826 (read_and_check_comp_unit_head): Change parameter
13827 is_debug_types_section to section_kind.
13828 (dwarf2_locate_sections): Handle loclists, line_str and rnglists.
13829 (read_comp_unit_head): Change parameter abfd to section, add parameter
13830 section_kind. Handle DWARF-5.
13831 (error_check_comp_unit_head): Accept also DWARF version 5.
13832 (read_and_check_comp_unit_head): Change parameter
13833 is_debug_types_section to section_kind.
13834 (read_and_check_type_unit_head): Delete function.
13835 (read_abbrev_offset): Handle DWARF-5.
13836 (create_debug_type_hash_table): Add parameter section_kind. Process
13837 only DW_UT_type. Use signature and type_offset_in_tu from struct
13839 (create_debug_types_hash_table): Update create_debug_type_hash_table
13841 (create_all_type_units): Call create_debug_type_hash_table.
13842 (read_cutu_die_from_dwo, init_cutu_and_read_dies): Change
13843 read_and_check_type_unit_head caller to read_and_check_comp_unit_head
13845 (skip_one_die): Handle DW_FORM_implicit_const.
13846 (dwarf2_rnglists_process): New function.
13847 (dwarf2_ranges_process): Call dwarf2_rnglists_process for DWARF-5.
13848 (abbrev_table_read_table): Handle DW_FORM_implicit_const.
13849 (read_attribute_value): Handle DW_FORM_implicit_const,
13851 (read_attribute): Handle DW_FORM_implicit_const.
13852 (read_indirect_string_at_offset_from): New function from
13853 read_indirect_string_at_offset.
13854 (read_indirect_string_at_offset): Call
13855 read_indirect_string_at_offset_from.
13856 (read_indirect_line_string_at_offset): New function.
13857 (read_indirect_string): New function comment.
13858 (read_indirect_line_string): New function.
13859 (read_unsigned_leb128): Make it global.
13860 (dwarf2_string_attr): Handle DWARF-5.
13861 (add_include_dir_stub, read_formatted_entries): New functions.
13862 (dwarf_decode_line_header, dump_die_shallow, cu_debug_loc_section):
13864 (per_cu_header_read_in): Update read_comp_unit_head caller.
13865 (dwarf2_version): New function.
13866 * symfile.h (struct dwarf2_debug_sections): Add loclists, line_str and
13868 * xcoffread.c (dwarf2_xcoff_names): Update struct dwarf2_debug_sections
13871 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
13873 * dwarf2read.c (abbrev_table_read_table): Read the data only once.
13875 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
13877 * dwarf2read.c (dwarf2_ranges_process): New function from
13878 dwarf2_ranges_read.
13879 (dwarf2_ranges_read, dwarf2_record_block_ranges): Use
13880 dwarf2_ranges_process.
13882 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
13884 * dwarf2read.c (create_debug_type_hash_table): New function from
13885 create_debug_types_hash_table.
13886 (create_debug_types_hash_table): Call create_debug_type_hash_table.
13887 (create_all_type_units, open_and_init_dwo_file): Update
13888 create_debug_types_hash_table callers.
13890 2017-02-20 Sergio Durigan Junior <sergiodj@redhat.com>
13893 * fork-child.c (trace_start_error): Fix thinko. va_end should
13894 refer to 'ap', not 'args'.
13896 2017-02-20 Sergio Durigan Junior <sergiodj@redhat.com>
13897 Pedro Alves <palves@redhat.com>
13900 * darwin-nat.c (darwin_ptrace_me): Check if calls to system
13902 * fork-child.c (trace_start_error): New function.
13903 (trace_start_error_with_name): Likewise.
13904 * gnu-nat.c (gnu_ptrace_me): Check if call to PTRACE succeeded.
13905 * inf-ptrace.c (inf_ptrace_me): Likewise.
13906 * inferior.h (trace_start_error): New prototype.
13907 (trace_start_error_with_name): Likewise.
13909 2017-02-15 Sergio Durigan Junior <sergiodj@redhat.com>
13912 * psymtab.c (maintenance_print_psymbols): Verify if 'argv' is not
13913 NULL before using it.
13914 * symmisc.c (maintenance_print_symbols): Likewise.
13915 (maintenance_print_msymbols): Likewise.
13917 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
13919 * NEWS: Add record Python bindings entry.
13921 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
13923 * Makefile.in (SUBDIR_PYTHON_OBS): Add py-record-btrace.o,
13925 (SUBDIR_PYTHON_SRCS): Add py-record-btrace.c, py-record-full.c.
13926 * python/py-record-btrace.c, python/py-record-btrace.h,
13927 python/py-record-full.c, python/py-record-full.h: New file.
13928 * python/py-record.c: Add include for py-record-btrace.h and
13930 (recpy_method, recpy_format, recpy_goto, recpy_replay_position,
13931 recpy_instruction_history, recpy_function_call_history, recpy_begin,
13932 recpy_end): Use functions from py-record-btrace.c and py-record-full.c.
13933 * python/python-internal.h (PyInt_FromSsize_t, PyInt_AsSsize_t):
13935 (gdbpy_initialize_btrace): New export.
13936 * python/python.c (_initialize_python): Add gdbpy_initialize_btrace.
13938 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
13940 * Makefile.in (SUBDIR_PYTHON_OBS): Add python/py-record.o.
13941 (SUBDIR_PYTHON_SRCS): Add python/py-record.c.
13942 * python/py-record.c: New file.
13943 * python/python-internal.h (gdbpy_start_recording,
13944 gdbpy_current_recording, gdpy_stop_recording,
13945 gdbpy_initialize_record): New export.
13946 * python/python.c (_initialize_python): Add gdbpy_initialize_record.
13947 (python_GdbMethods): Add gdbpy_start_recording,
13948 gdbpy_current_recording and gdbpy_stop_recording.
13950 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
13952 * record-btrace.c (record_btrace_record_method): New function.
13953 (init_record_btrace_ops): Initialize to_record_method.
13954 * record-full.c (record_full_record_method): New function.
13955 (init_record_full_ops, init_record_full_core_ops): Add
13956 record_full_record_method.
13957 * record.h (enum record_method): New enum.
13958 * target-debug.h (target_debug_print_enum_record_method: New define.
13959 * target-delegates.c: Regenerate.
13960 * target.c (target_record_method): New function.
13961 * target.h: Include record.h.
13962 (struct target_ops) <to_record_method>: New field.
13963 (target_record_method): New export.
13965 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
13967 * record.h (record_start, record_stop): New export.
13968 * record.c (record_start, record_stop): New function.
13970 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
13972 * btrace.c (btrace_fetch): Copy function call segments pointer
13974 (btrace_clear): Clear the vector.
13975 (btrace_find_insn_by_number): Use binary search to find the correct
13976 function call segment.
13977 * btrace.h (brace_fun_p): New typedef.
13978 (struct btrace_thread_info) <functions>: New field.
13980 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
13982 * record-btrace.c (btrace_ui_out_decode_error): Move most of it ...
13983 * btrace.c (btrace_decode_error): ... here. New function.
13984 * btrace.h (btrace_decode_error): New export.
13986 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
13988 * btrace.c (ftrace_call_num_insn, btrace_insn_get_error): New function.
13989 (ftrace_new_function, btrace_insn_number, btrace_insn_cmp,
13990 btrace_find_insn_by_number): Remove special case for gaps.
13991 * btrace.h (btrace_insn_get_error): New export.
13992 (btrace_insn_number, btrace_find_insn_by_number): Adjust comment.
13993 * record-btrace.c (btrace_insn_history): Print number for gaps.
13994 (record_btrace_info, record_btrace_goto): Handle gaps.
13996 2017-02-14 Tom Tromey <tom@tromey.com>
13999 * python/python.c (gdbpy_before_prompt_hook): Emit before_prompt
14001 * python/py-evts.c (gdbpy_initialize_py_events): Add
14002 before_prompt registry.
14003 * python/py-events.h (events_object) <before_prompt>: New field.
14005 2017-02-14 Markus Metzger <markus.t.metzger@intel.com>
14007 * btrace.c (ftrace_new_switch): Preserve up link and flags.
14009 2017-02-13 Luis Machado <lgustavo@codesourcery.com>
14011 * symfile (_initialize_symfile): Add usage text to the load command's
14014 2017-02-10 Simon Marchi <simon.marchi@ericsson.com>
14016 * utils.c (defaulted_query): Don't query on secondary UIs.
14018 2017-02-10 Tom Tromey <tom@tromey.com>
14020 * rust-lang.c (rust_get_disr_info): Remove unused variable.
14022 2017-02-10 Tom Tromey <tom@tromey.com>
14024 * python/py-value.c (valpy_richcompare_throw): Remove unnecessary
14026 * python/py-type.c (typy_legacy_template_argument): Remove
14027 unnecessary "cleanup" local.
14029 2017-02-10 Tom Tromey <tom@tromey.com>
14031 * python/python.c (do_start_initialization): New function, from
14032 _initialize_python.
14033 (_initialize_python): Call do_start_initialization.
14034 * python/py-linetable.c (ltpy_iternext): Use explicit returns, not
14037 2017-02-10 Tom Tromey <tom@tromey.com>
14039 * python/py-prettyprint.c (pretty_print_one_value): Use
14042 2017-02-10 Tom Tromey <tom@tromey.com>
14044 * python/py-cmd.c (cmdpy_destroyer): Use gdbpy_ref.
14045 * python/py-breakpoint.c (gdbpy_breakpoint_deleted): Use
14047 * python/py-type.c (field_new): Use gdbpy_ref.
14048 * python/py-symtab.c (symtab_and_line_to_sal_object): Use
14050 * python/py-progspace.c (pspy_new): Use gdbpy_ref.
14051 (py_free_pspace): Likewise.
14052 (pspace_to_pspace_object): Likewise.
14053 * python/py-objfile.c (objfpy_new): Use gdbpy_ref.
14054 (py_free_objfile): Likewise.
14055 (objfile_to_objfile_object): Likewise.
14056 * python/py-inferior.c (delete_thread_object): Use
14058 (infpy_read_memory): Likewise.
14059 (py_free_inferior): Likewise.
14060 * python/py-evtregistry.c (create_eventregistry_object): Use
14062 * python/py-event.c (create_event_object): Use gdbpy_ref.
14064 2017-02-10 Tom Tromey <tom@tromey.com>
14066 * python/py-ref.h (gdbpy_ref_policy): Now a template.
14067 (gdbpy_ref): Now a template; allow subclasses of PyObject to be
14069 * python/py-arch.c, python/py-bpevent.c, python/py-breakpoint.c,
14070 python/py-cmd.c, python/py-continueevent.c, python/py-event.c,
14071 python/py-exitedevent.c, python/py-finishbreakpoint.c,
14072 python/py-framefilter.c, python/py-function.c,
14073 python/py-inferior.c, python/py-infevents.c,
14074 python/py-linetable.c, python/py-newobjfileevent.c,
14075 python/py-param.c, python/py-prettyprint.c, python/py-ref.h,
14076 python/py-signalevent.c, python/py-stopevent.c,
14077 python/py-symbol.c, python/py-threadevent.c, python/py-type.c,
14078 python/py-unwind.c, python/py-utils.c, python/py-value.c,
14079 python/py-varobj.c, python/py-xmethods.c, python/python.c,
14080 varobj.c: Change gdbpy_ref to gdbpy_ref<>.
14082 2017-02-10 Tom Tromey <tom@tromey.com>
14084 * ui-out.h (ui_out_emit_type): New class.
14085 (ui_out_emit_tuple, ui_out_emit_list): New typedefs.
14086 * python/py-framefilter.c (py_print_single_arg): Use gdb::optional
14087 and ui_out_emit_tuple.
14088 (enumerate_locals): Likewise.
14089 (py_mi_print_variables, py_print_locals, py_print_args): Use
14091 (py_print_frame): Use gdb::optional, ui_out_emit_tuple,
14093 * common/gdb_optional.h: New file.
14095 2017-02-10 Martin Galvan <martingalvan@sourceware.org>
14097 * MAINTAINERS (Write After Approval): Update my e-mail address.
14099 2017-02-10 Martin Galvan <martingalvan@sourceware.org>
14102 * breakpoint.c (_initialize_breakpoint): Update the help description
14103 of the 'commands' command to indicate that it takes a list argument.
14105 2017-02-09 Simon Marchi <simon.marchi@ericsson.com>
14107 * interps.c (current_interp_set_logging): Remove "return".
14109 2017-02-09 Gary Benson <gbenson@redhat.com>
14111 * symtab.c (add_symtab_completions): Prevent NULL pointer
14114 2017-02-08 Pedro Alves <palves@redhat.com>
14116 * interps.c (interp::interp): Remove reference to quiet_p.
14117 (interp_set): Make static. Remove dead "Switching to" output
14119 (interp_quiet_p, interp_set_quiet): Delete.
14120 (interpreter_exec_cmd): Don't set the interpreter quiet.
14121 * interps.h (interp_quiet_p): Make static.
14122 (class interp) <quiet_p>: Remove field
14124 2017-02-08 Jerome Guitton <guitton@adacore.com>
14126 * cli/cli-decode.c (find_command_name_length): Make it extern.
14127 * cli/cli-decode.h (find_command_name_length): Declare.
14128 * cli/cli-script.c (command_name_equals, line_first_arg):
14130 (process_next_line): Use cli-decode to parse command names.
14131 (build_command_line): Make args a constant pointer.
14133 2017-02-08 Jerome Guitton <guitton@adacore.com>
14135 * cli-decode.c (lookup_cmd_1, lookup_cmd_composition):
14136 Remove case-insensitive search.
14138 2017-02-07 Jose E. Marchesi <jose.marchesi@oracle.com>
14140 * sparc-tdep.c (sparc32_gdbarch_init): Do not place a + operator
14141 at the end of the line. Avoids an ARI warning.
14143 2017-02-06 Luis Machado <lgustavo@codesourcery.com>
14145 * NEWS: Mention support for record/replay of Intel 64 rdrand and
14146 rdseed instructions.
14147 i386-tdep.c (i386_process_record): Handle Intel 64 rdrand and rseed.
14149 2017-02-06 Ivo Raisr <ivo.raisr@oracle.com>
14152 Provide and use sparc32 and sparc64 target description XML files.
14153 * features/sparc/sparc32-cp0.xml, features/sparc/sparc32-cpu.xml,
14154 features/sparc/sparc32-fpu.xml: New files for sparc 32-bit.
14155 * features/sparc/sparc64-cp0.xml, features/sparc/sparc64-cpu.xml,
14156 features/sparc/sparc64-fpu.xml: New files for sparc 64-bit.
14157 * features/sparc/sparc32-solaris.xml: New file.
14158 * features/sparc/sparc64-solaris.xml: New file.
14159 * features/sparc/sparc32-solaris.c: Generated.
14160 * features/sparc/sparc64-solaris.c: Generated.
14161 * sparc-tdep.h: Account for differences in target descriptions.
14162 * sparc-tdep.c (sparc32_register_name): Use target provided registers.
14163 (sparc32_register_type): Use target provided registers.
14164 (validate_tdesc_registers): New function.
14165 (sparc32_gdbarch_init): Use tdesc_has_registers.
14166 Set pseudoregister functions.
14167 * sparc64-tdep.c (sparc64_register_name): Use target provided registers.
14168 (sparc64_register_type): Use target provided registers.
14169 (sparc64_init_abi): Set pseudoregister functions.
14171 2017-02-03 Tom Tromey <tom@tromey.com>
14174 * rust-lang.c (rust_print_type) <TYPE_CODE_UNION>: Handle enums
14175 with a single member.
14177 2017-02-03 Pedro Alves <palves@redhat.com>
14179 * cli/cli-interp.c (cli_interp_base::cli_interp_base)
14180 (cli_interp_base::~cli_interp_base): New.
14181 (cli_interp): New struct.
14182 (as_cli_interp): Cast the interp itself to cli_interp.
14183 (cli_interpreter_pre_command_loop): Rename to ...
14184 (cli_interp_base::pre_command_loop): ... this. Remove 'self'
14186 (cli_interpreter_init): Rename to ...
14187 (cli_interp::init): ... this. Remove 'self' parameter. Use
14188 boolean. Make extern.
14189 (cli_interpreter_resume): Rename to ...
14190 (cli_interp::resume): ... this. Remove 'data' parameter. Make
14192 (cli_interpreter_suspend): Rename to ...
14193 (cli_interp::suspend): ... this. Remove 'data' parameter. Make
14195 (cli_interpreter_exec): Rename to ...
14196 (cli_interp::exec): ... this. Remove 'data' parameter. Make
14198 (cli_interpreter_supports_command_editing): Rename to ...
14199 (cli_interp_base::supports_command_editing): ... this. Remove
14200 'interp' parameter. Make extern.
14201 (cli_ui_out): Rename to ...
14202 (cli_interp::interp_ui_out): ... this. Remove 'interp' parameter.
14204 (cli_set_logging): Rename to ...
14205 (cli_interp_base::set_logging): ... this. Remove 'interp'
14206 parameter. Make extern.
14207 (cli_interp_procs): Delete.
14208 (cli_interp_factory): Adjust to use "new".
14209 * cli/cli-interp.h: Include "interps.h".
14210 (struct cli_interp_base): New struct.
14211 * interps.c (struct interp): Delete. Fields moved to interps.h.
14212 (interp_new): Delete.
14213 (interp::interp, interp::~interp): New.
14214 (interp_set): Use bool, and return void. Assume the interpreter
14215 has suspend, init and resume methods, and that the all return
14217 (set_top_level_interpreter): interp_set returns void.
14218 (interp_ui_out): Adapt.
14219 (current_interp_set_logging): Adapt.
14220 (interp_data): Delete.
14221 (interp_pre_command_loop, interp_supports_command_editing): Adapt.
14222 (interp_exec): Adapt.
14223 (top_level_interpreter_data): Delete.
14224 * interps.h (interp_init_ftype, interp_resume_ftype)
14225 (interp_suspend_ftype, interp_exec_ftype)
14226 (interp_pre_command_loop_ftype, interp_ui_out_ftype): Delete.
14227 (class interp): New.
14228 (interp_new): Delete.
14229 (interp_set): Now returns void. Use bool.
14230 (interp_data, top_level_interpreter_data): Delete.
14231 * mi/mi-common.h: Include interps.h.
14232 (class mi_interp): Inherit from interp. Define a ctor. Declare
14233 init, resume, suspect, exec, interp_ui_out, set_logging and
14234 pre_command_loop methods.
14235 * mi/mi-interp.c (as_mi_interp): Cast the interp itself.
14236 (mi_interpreter_init): Rename to ...
14237 (mi_interp::init): ... this. Remove the 'interp' parameter, use
14238 bool, return void and make extern. Adjust.
14239 (mi_interpreter_resume): ... Rename to ...
14240 (mi_interp::resume): ... this. Remove the 'data' parameter,
14241 return void and make extern. Adjust.
14242 (mi_interpreter_suspend): ... Rename to ...
14243 (mi_interp::suspend): ... this. Remove the 'data' parameter,
14244 return void and make extern. Adjust.
14245 (mi_interpreter_exec): ... Rename to ...
14246 (mi_interp::exec): ... this. Remove the 'data' parameter and make
14248 (mi_interpreter_pre_command_loop): ... Rename to ...
14249 (mi_interp::pre_command_loop): ... this. Remove the 'self'
14250 parameter and make extern.
14251 (mi_on_normal_stop_1): Adjust.
14252 (mi_ui_out): Rename to ...
14253 (mi_interp::interp_ui_out): ... this. Remove the 'interp'
14254 parameter and make extern. Adjust.
14255 (mi_set_logging): Rename to ...
14256 (mi_interp::set_logging): ... this. Remove the 'interp'
14257 parameter and make extern. Adjust.
14258 (mi_interp_procs): Delete.
14259 (mi_interp_factory): Adjust to use 'new'.
14260 * mi/mi-main.c (mi_cmd_gdb_exit, captured_mi_execute_command)
14261 (mi_print_exception, mi_execute_command, mi_load_progress):
14263 * tui/tui-interp.c (tui_interp): New class.
14264 (as_tui_interp): Return a tui_interp pointer.
14265 (tui_on_normal_stop, tui_on_signal_received)
14266 (tui_on_end_stepping_range, tui_on_signal_exited, tui_on_exited)
14267 (tui_on_no_history, tui_on_user_selected_context_changed): Adjust
14268 to use interp::interp_ui_out.
14269 (tui_init): Rename to ...
14270 (tui_interp::init): ... this. Remove the 'self' parameter, use
14271 bool, return void and make extern. Adjust.
14272 (tui_resume): Rename to ...
14273 (tui_interp::resume): ... this. Remove the 'data' parameter,
14274 return void and make extern. Adjust.
14275 (tui_suspend): Rename to ...
14276 (tui_interp::suspend): ... this. Remove the 'data' parameter,
14277 return void and make extern. Adjust.
14278 (tui_ui_out): Rename to ...
14279 (tui_interp::interp_ui_out): ... this. Remove the 'self'
14280 parameter, and make extern. Adjust.
14281 (tui_exec): Rename to ...
14282 (tui_interp::exec): ... this. Remove the 'data' parameter and
14284 (tui_interp_procs): Delete.
14285 (tui_interp_factory): Use "new".
14287 2017-02-02 Tom Tromey <tom@tromey.com>
14289 * rust-exp.y (ends_raw_string, space_then_number)
14290 (rust_identifier_start_p): Return bool.
14291 * rust-lang.c (rust_tuple_type_p, rust_underscore_fields)
14292 (rust_tuple_struct_type_p, rust_tuple_variant_type_p)
14293 (rust_slice_type_p, rust_range_type_p, rust_u8_type_p)
14294 (rust_chartype_p): Return bool.
14295 (val_print_struct, rust_print_struct_def, rust_print_type):
14297 * rust-lang.h (rust_tuple_type_p, rust_tuple_struct_type_p):
14300 2017-02-02 Tom Tromey <tom@tromey.com>
14302 * rust-lang.c: Reindent.
14304 2017-02-02 Tom Tromey <tom@tromey.com>
14306 * rust-lang.h (rust_crate_for_block): Update.
14307 * rust-lang.c (rust_crate_for_block): Return std::string.
14308 (rust_get_disr_info): Use std:;string, not
14309 gdb::unique_xmalloc_ptr.
14310 * rust-exp.y (crate_name): Update.
14312 2017-02-02 Pedro Alves <palves@redhat.com>
14314 * disasm-selftests.c (print_one_insn_test): Move the "verbose"
14315 field out of gdb_disassembler_test and make it static.
14317 2017-02-02 Pedro Alves <palves@redhat.com>
14319 * mi/mi-common.h (struct mi_interp): Delete the mi2_interp,
14320 mi1_interp and mi_interp fields.
14322 2017-02-02 Pedro Alves <palves@redhat.com>
14324 * cli/cli-interp.c (struct saved_output_files, saved_output):
14325 Moved from cli/cli-logging.c.
14326 (cli_set_logging): New function.
14327 (cli_interp_procs): Install cli_set_logging.
14328 * cli/cli-interp.h (make_logging_output, cli_set_logging):
14330 * cli/cli-logging.c (struct saved_output_files, saved_output):
14331 Moved to cli/cli-interp.c.
14332 (pop_output_files): Don't save outputs here.
14333 (make_logging_output): New function.
14334 (handle_redirections): Don't build tee nor save previous outputs
14336 * interps.c (current_interp_set_logging): Change prototype.
14337 Assume there's always a set_logging_proc method installed.
14338 * interps.h (interp_set_logging_ftype): Change prototype.
14339 (current_interp_set_logging): Change prototype and adjust comment.
14340 * mi/mi-interp.c (mi_set_logging): Change protototype. Adjust to
14341 use make_logging_output.
14342 * tui/tui-interp.c (tui_interp_procs): Install cli_set_logging.
14343 2017-02-02 Pedro Alves <palves@redhat.com>
14345 * cli/cli-logging.c (maybe_warn_already_logging): New factored out
14347 (set_logging_overwrite): ... here.
14348 (logging_no_redirect_file): Delete.
14349 (set_logging_redirect): Don't handle redirection on the fly.
14350 Instead warn that "logging off" / "logging on" is necessary.
14351 (pop_output_files): Delete references to logging_no_redirect_file.
14352 (show_logging_command): Always speak in terms of what will happen
14353 once logging is reenabled.
14355 2017-02-02 Pedro Alves <palves@redhat.com>
14357 * disasm.h (gdb_pretty_print_disassembler): Tweak intro comment.
14359 2017-02-02 Pedro Alves <palves@redhat.com>
14361 * disasm.c (gdb_pretty_print_insn): Rename to ...
14362 (gdb_pretty_print_disassembler::pretty_print_insn): ... this.
14363 Remove gdbarch parameter. Adapt to clear the object's buffers
14364 instead of allocating new buffers, and to print using the object's
14365 gdb_disassembler instead of calling gdb_print_insn.
14366 (dump_insns): Use gdb_pretty_print_disassembler.
14367 * disasm.h (gdb_pretty_print_insn): Delete declaration.
14368 (gdb_pretty_print_disassembler): New class.
14369 * record-btrace.c (btrace_insn_history): Use
14370 gdb_pretty_print_disassembler.
14372 2017-02-02 Pedro Alves <palves@redhat.com>
14374 * ada-lang.c (type_as_string): Use string_file.
14375 * ada-valprint.c (ada_print_floating): Use string_file.
14376 * ada-varobj.c (ada_varobj_scalar_image)
14377 (ada_varobj_get_value_image): Use string_file.
14378 * aix-thread.c (aix_thread_extra_thread_info): Use string_file.
14379 * arm-tdep.c (_initialize_arm_tdep): Use string_printf.
14380 * breakpoint.c (update_inserted_breakpoint_locations)
14381 (insert_breakpoint_locations, reattach_breakpoints)
14382 (print_breakpoint_location, print_one_detail_ranged_breakpoint)
14383 (print_it_watchpoint): Use string_file.
14384 (save_breakpoints): Use stdio_file.
14385 * c-exp.y (oper): Use string_file.
14386 * cli/cli-logging.c (set_logging_redirect): Use ui_file_up and
14388 (pop_output_files): Use delete.
14389 (handle_redirections): Use stdio_file and tee_file.
14390 * cli/cli-setshow.c (do_show_command): Use string_file.
14391 * compile/compile-c-support.c (c_compute_program): Use
14393 * compile/compile-c-symbols.c (generate_vla_size): Take a
14394 'string_file &' instead of a 'ui_file *'.
14395 (generate_c_for_for_one_variable): Take a 'string_file &' instead
14396 of a 'ui_file *'. Use string_file.
14397 (generate_c_for_variable_locations): Take a 'string_file &'
14398 instead of a 'ui_file *'.
14399 * compile/compile-internal.h (generate_c_for_for_one_variable):
14400 Take a 'string_file &' instead of a 'ui_file *'.
14401 * compile/compile-loc2c.c (push, pushf, unary, binary)
14402 (print_label, pushf_register_address, pushf_register)
14403 (do_compile_dwarf_expr_to_c): Take a 'string_file &' instead of a
14404 'ui_file *'. Adjust.
14405 * compile/compile.c (compile_to_object): Use string_file.
14406 * compile/compile.h (compile_dwarf_expr_to_c)
14407 (compile_dwarf_bounds_to_c): Take a 'string_file &' instead of a
14409 * cp-support.c (inspect_type): Use string_file and obstack_copy0.
14410 (replace_typedefs_qualified_name): Use string_file and
14412 * disasm.c (gdb_pretty_print_insn): Use string_file.
14413 (gdb_disassembly): Adjust reference the null_stream global.
14414 (do_ui_file_delete): Delete.
14415 (gdb_insn_length): Use null_stream.
14416 * dummy-frame.c (maintenance_print_dummy_frames): Use stdio_file.
14417 * dwarf2loc.c (dwarf2_compile_property_to_c)
14418 (locexpr_generate_c_location, loclist_generate_c_location): Take a
14419 'string_file &' instead of a 'ui_file *'.
14420 * dwarf2loc.h (dwarf2_compile_property_to_c): Likewise.
14421 * dwarf2read.c (do_ui_file_peek_last): Delete.
14422 (dwarf2_compute_name): Use string_file.
14423 * event-top.c (gdb_setup_readline): Use stdio_file.
14424 * gdbarch.sh (verify_gdbarch): Use string_file.
14425 * gdbtypes.c (safe_parse_type): Use null_stream.
14426 * guile/scm-breakpoint.c (gdbscm_breakpoint_commands): Use
14428 * guile/scm-disasm.c (gdbscm_print_insn_from_port): Take a
14429 'string_file *' instead of a 'ui_file *'.
14430 (gdbscm_arch_disassemble): Use string_file.
14431 * guile/scm-frame.c (frscm_print_frame_smob): Use string_file.
14432 * guile/scm-ports.c (class ioscm_file_port): Now a class that
14433 inherits from ui_file.
14434 (ioscm_file_port_delete, ioscm_file_port_rewind)
14435 (ioscm_file_port_put): Delete.
14436 (ioscm_file_port_write): Rename to ...
14437 (ioscm_file_port::write): ... this. Remove file_port_magic
14439 (ioscm_file_port_new): Delete.
14440 (ioscm_with_output_to_port_worker): Use ioscm_file_port and
14442 * guile/scm-type.c (tyscm_type_name): Use string_file.
14443 * guile/scm-value.c (vlscm_print_value_smob, gdbscm_value_print):
14445 * infcmd.c (print_return_value_1): Use string_file.
14446 * infrun.c (print_target_wait_results): Use string_file.
14447 * language.c (add_language): Use string_file.
14448 * location.c (explicit_to_string_internal): Use string_file.
14449 * main.c (captured_main_1): Use null_file.
14450 * maint.c (maintenance_print_architecture): Use stdio_file.
14451 * mi/mi-cmd-stack.c (list_arg_or_local): Use string_file.
14452 * mi/mi-common.h (struct mi_interp) <out, err, log, targ,
14453 event_channel>: Change type to mi_console_file pointer.
14454 * mi/mi-console.c (mi_console_file_fputs, mi_console_file_flush)
14455 (mi_console_file_delete): Delete.
14456 (struct mi_console_file): Delete.
14457 (mi_console_file_magic): Delete.
14458 (mi_console_file_new): Delete.
14459 (mi_console_file::mi_console_file): New.
14460 (mi_console_file_delete): Delete.
14461 (mi_console_file_fputs): Delete.
14462 (mi_console_file::write): New.
14463 (mi_console_raw_packet): Delete.
14464 (mi_console_file::flush): New.
14465 (mi_console_file_flush): Delete.
14466 (mi_console_set_raw): Rename to ...
14467 (mi_console_file::set_raw): ... this.
14468 * mi/mi-console.h (class mi_console_file): New class.
14469 (mi_console_file_new, mi_console_set_raw): Delete.
14470 * mi/mi-interp.c (mi_interpreter_init): Use mi_console_file.
14471 (mi_set_logging): Use delete and tee_file. Adjust.
14472 * mi/mi-main.c (output_register): Use string_file.
14473 (mi_cmd_data_evaluate_expression): Use string_file.
14474 (mi_cmd_data_read_memory): Use string_file.
14475 (mi_cmd_execute, print_variable_or_computed): Use string_file.
14476 * mi/mi-out.c (mi_ui_out::main_stream): New.
14477 (mi_ui_out::rewind): Use main_stream and
14479 (mi_ui_out::put): Use main_stream and string_file.
14480 (mi_ui_out::mi_ui_out): Remove 'stream' parameter.
14481 Allocate a 'string_file' instead.
14482 (mi_out_new): Don't allocate a mem_fileopen stream here.
14483 * mi/mi-out.h (mi_ui_out::mi_ui_out): Remove 'stream' parameter.
14484 (mi_ui_out::main_stream): Declare method.
14485 * printcmd.c (eval_command): Use string_file.
14486 * psymtab.c (maintenance_print_psymbols): Use stdio_file.
14487 * python/py-arch.c (archpy_disassemble): Use string_file.
14488 * python/py-breakpoint.c (bppy_get_commands): Use string_file.
14489 * python/py-frame.c (frapy_str): Use string_file.
14490 * python/py-framefilter.c (py_print_type, py_print_single_arg):
14492 * python/py-type.c (typy_str): Use string_file.
14493 * python/py-unwind.c (unwind_infopy_str): Use string_file.
14494 * python/py-value.c (valpy_str): Use string_file.
14495 * record-btrace.c (btrace_insn_history): Use string_file.
14496 * regcache.c (regcache_print): Use stdio_file.
14497 * reggroups.c (maintenance_print_reggroups): Use stdio_file.
14498 * remote.c (escape_buffer): Use string_file.
14499 * rust-lang.c (rust_get_disr_info): Use string_file.
14500 * serial.c (serial_open_ops_1): Use stdio_file.
14501 (do_serial_close): Use delete.
14502 * stack.c (print_frame_arg): Use string_file.
14503 (print_frame_args): Remove local mem_fileopen stream, not used.
14504 (print_frame): Use string_file.
14505 * symmisc.c (maintenance_print_symbols): Use stdio_file.
14506 * symtab.h (struct symbol_computed_ops) <generate_c_location>:
14507 Take a 'string_file *' instead of a 'ui_file *'.
14508 * top.c (new_ui): Use stdio_file and stderr_file.
14509 (free_ui): Use delete.
14510 (execute_command_to_string): Use string_file.
14511 (quit_confirm): Use string_file.
14512 * tracepoint.c (collection_list::append_exp): Use string_file.
14513 * tui/tui-disasm.c (tui_disassemble): Use string_file.
14514 * tui/tui-file.c: Don't include "ui-file.h".
14515 (enum streamtype, struct tui_stream): Delete.
14516 (tui_file_new, tui_file_delete, tui_fileopen, tui_sfileopen)
14517 (tui_file_isatty, tui_file_rewind, tui_file_put): Delete.
14518 (tui_file::tui_file): New method.
14519 (tui_file_fputs): Delete.
14520 (tui_file_get_strbuf): Delete.
14521 (tui_file::puts): New method.
14522 (tui_file_adjust_strbuf): Delete.
14523 (tui_file_flush): Delete.
14524 (tui_file::flush): New method.
14525 * tui/tui-file.h: Tweak intro comment.
14527 (tui_fileopen, tui_sfileopen, tui_file_get_strbuf)
14528 (tui_file_adjust_strbuf): Delete declarations.
14529 (class tui_file): New class.
14530 * tui/tui-io.c (tui_initialize_io): Use tui_file.
14531 * tui/tui-regs.c (tui_restore_gdbout): Use delete.
14532 (tui_register_format): Use string_stream.
14533 * tui/tui-stack.c (tui_make_status_line): Use string_file.
14534 (tui_get_function_from_frame): Use string_file.
14535 * typeprint.c (type_to_string): Use string_file.
14536 * ui-file.c (struct ui_file, ui_file_magic, ui_file_new): Delete.
14537 (null_stream): New global.
14538 (ui_file_delete): Delete.
14539 (ui_file::ui_file): New.
14540 (null_file_isatty): Delete.
14541 (ui_file::~ui_file): New.
14542 (null_file_rewind): Delete.
14543 (ui_file::printf): New.
14544 (null_file_put): Delete.
14545 (null_file_flush): Delete.
14546 (ui_file::putstr): New.
14547 (null_file_write): Delete.
14548 (ui_file::putstrn): New.
14549 (null_file_read): Delete.
14550 (ui_file::putc): New.
14551 (null_file_fputs): Delete.
14552 (null_file_write_async_safe): Delete.
14553 (ui_file::vprintf): New.
14554 (null_file_delete): Delete.
14555 (null_file::write): New.
14556 (null_file_fseek): Delete.
14557 (null_file::puts): New.
14558 (ui_file_data): Delete.
14559 (null_file::write_async_safe): New.
14560 (gdb_flush, ui_file_isatty): Adjust.
14561 (ui_file_put, ui_file_rewind): Delete.
14562 (ui_file_write): Adjust.
14563 (ui_file_write_for_put): Delete.
14564 (ui_file_write_async_safe, ui_file_read): Adjust.
14565 (ui_file_fseek): Delete.
14566 (fputs_unfiltered): Adjust.
14567 (set_ui_file_flush, set_ui_file_isatty, set_ui_file_rewind)
14568 (set_ui_file_put, set_ui_file_write, set_ui_file_write_async_safe)
14569 (set_ui_file_read, set_ui_file_fputs, set_ui_file_fseek)
14570 (set_ui_file_data): Delete.
14571 (string_file::~string_file, string_file::write)
14572 (struct accumulated_ui_file, do_ui_file_xstrdup, ui_file_xstrdup)
14573 (do_ui_file_as_string, ui_file_as_string): Delete.
14574 (do_ui_file_obsavestring, ui_file_obsavestring): Delete.
14575 (struct mem_file): Delete.
14576 (mem_file_new): Delete.
14577 (stdio_file::stdio_file): New.
14578 (mem_file_delete): Delete.
14579 (stdio_file::stdio_file): New.
14580 (mem_fileopen): Delete.
14581 (stdio_file::~stdio_file): New.
14582 (mem_file_rewind): Delete.
14583 (stdio_file::set_stream): New.
14584 (mem_file_put): Delete.
14585 (stdio_file::open): New.
14586 (mem_file_write): Delete.
14587 (stdio_file_magic, struct stdio_file): Delete.
14588 (stdio_file_new, stdio_file_delete, stdio_file_flush): Delete.
14589 (stdio_file::flush): New.
14590 (stdio_file_read): Rename to ...
14591 (stdio_file::read): ... this. Adjust.
14592 (stdio_file_write): Rename to ...
14593 (stdio_file::write): ... this. Adjust.
14594 (stdio_file_write_async_safe): Rename to ...
14595 (stdio_file::write_async_safe) ... this. Adjust.
14596 (stdio_file_fputs): Rename to ...
14597 (stdio_file::puts) ... this. Adjust.
14598 (stdio_file_isatty): Delete.
14599 (stdio_file_fseek): Delete.
14600 (stdio_file::isatty): New.
14601 (stderr_file_write): Rename to ...
14602 (stderr_file::write) ... this. Adjust.
14603 (stderr_file_fputs): Rename to ...
14604 (stderr_file::puts) ... this. Adjust.
14605 (stderr_fileopen, stdio_fileopen, gdb_fopen): Delete.
14606 (stderr_file::stderr_file): New.
14607 (tee_file_magic): Delete.
14608 (struct tee_file): Delete.
14609 (tee_file::tee_file): New.
14610 (tee_file_new): Delete.
14611 (tee_file::~tee_file): New.
14612 (tee_file_delete): Delete.
14613 (tee_file_flush): Rename to ...
14614 (tee_file::flush): ... this. Adjust.
14615 (tee_file_write): Rename to ...
14616 (tee_file::write): ... this. Adjust.
14617 (tee_file::write_async_safe): New.
14618 (tee_file_fputs): Rename to ...
14619 (tee_file::puts): ... this. Adjust.
14620 (tee_file_isatty): Rename to ...
14621 (tee_file::isatty): ... this. Adjust.
14622 * ui-file.h (struct obstack, struct ui_file): Don't
14624 (ui_file_new, ui_file_flush_ftype, set_ui_file_flush)
14625 (ui_file_write_ftype)
14626 (set_ui_file_write, ui_file_fputs_ftype, set_ui_file_fputs)
14627 (ui_file_write_async_safe_ftype, set_ui_file_write_async_safe)
14628 (ui_file_read_ftype, set_ui_file_read, ui_file_isatty_ftype)
14629 (set_ui_file_isatty, ui_file_rewind_ftype, set_ui_file_rewind)
14630 (ui_file_put_method_ftype, ui_file_put_ftype, set_ui_file_put)
14631 (ui_file_delete_ftype, set_ui_file_data, ui_file_fseek_ftype)
14632 (set_ui_file_fseek): Delete.
14633 (ui_file_data, ui_file_delete, ui_file_rewind)
14634 (struct ui_file): New.
14636 (class null_file): New.
14637 (null_stream): Declare.
14638 (ui_file_write_for_put, ui_file_put): Delete.
14639 (ui_file_xstrdup, ui_file_as_string, ui_file_obsavestring):
14641 (ui_file_fseek, mem_fileopen, stdio_fileopen, stderr_fileopen)
14642 (gdb_fopen, tee_file_new): Delete.
14643 (struct string_file): New.
14644 (struct stdio_file): New.
14645 (stdio_file_up): New.
14646 (struct stderr_file): New.
14647 (class tee_file): New.
14648 * ui-out.c (ui_out::field_stream): Take a 'string_file &' instead
14649 of a 'ui_file *'. Adjust.
14650 * ui-out.h (class ui_out) <field_stream>: Likewise.
14651 * utils.c (do_ui_file_delete, make_cleanup_ui_file_delete)
14652 (null_stream): Delete.
14653 (error_stream): Take a 'string_file &' instead of a 'ui_file *'.
14655 * utils.h (struct ui_file): Delete forward declaration..
14656 (make_cleanup_ui_file_delete, null_stream): Delete declarations.
14657 (error_stream): Take a 'string_file &' instead of a
14659 * varobj.c (varobj_value_get_print_value): Use string_file.
14660 * xtensa-tdep.c (xtensa_verify_config): Use string_file.
14661 * gdbarch.c: Regenerate.
14663 2017-02-02 Pedro Alves <palves@redhat.com>
14665 * disasm.c (gdb_disassembler::pretty_print_insn): Rename to...
14666 (gdb_pretty_print_insn): ... this. Now a free function. Add back
14667 a 'gdbarch' parameter. Allocate a mem_fileopen stream here.
14668 Adjust to call gdb_print_insn instead of
14669 gdb_disassembler::print_insn.
14670 (dump_insns, do_mixed_source_and_assembly_deprecated)
14671 (do_mixed_source_and_assembly, do_assembly_only): Add back a
14672 'gdbarch' parameter. Remove gdb_disassembler parameter.
14673 (gdb_disassembly): Don't allocate a gdb_disassembler here.
14674 * disasm.h (gdb_disassembler::pretty_print_insn): Delete
14676 (gdb_pretty_print_insn): Re-add declaration.
14677 * record-btrace.c (btrace_insn_history): Don't allocate a
14678 gdb_disassembler here. Adjust to call gdb_pretty_print_insn.
14680 2017-02-01 Simon Marchi <simon.marchi@polymtl.ca>
14682 * disasm.h (gdb_disassembly): Remove file_string parameter.
14683 * disasm.c (gdb_disassembly): Likewise.
14684 * cli/cli-cmds.c (print_disassembly): Adapt.
14685 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Likewise.
14686 * stack.c (do_gdb_disassembly): Likewise.
14688 2017-02-01 Andreas Arnez <arnez@linux.vnet.ibm.com>
14690 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): For
14691 DWARF_VALUE_LITERAL, no longer ignore the offset on big-endian
14692 targets. And if the implicit value is longer than needed, extract
14693 the first bytes instead of the "least significant" ones.
14695 2017-02-01 Markus Metzger <markus.t.metzger@intel.com>
14697 * btrace.c (btrace_enable): Do not call btrace_add_pc for
14698 BTRACE_FORMAT_PT or if can_access_registers_ptid returns false.
14699 (btrace_fetch): Assert can_access_registers_ptid.
14700 * record-btrace.c (require_btrace_thread, record_btrace_info): Call
14701 validate_registers_access.
14703 2017-02-01 Markus Metzger <markus.t.metzger@intel.com>
14705 * gdbthread.h (can_access_registers_ptid): New.
14706 * thread.c (can_access_registers_ptid): New.
14708 2017-02-01 Pedro Alves <palves@redhat.com>
14710 * i386-tdep.c (i386_fast_tracepoint_valid_at): Use gdb_insn_length.
14712 2017-01-31 Pedro Alves <palves@redhat.com>
14714 * mi/mi-interp.c (mi_breakpoint_created, mi_breakpoint_modified):
14717 2017-01-31 Pedro Alves <palves@redhat.com>
14719 * stack.c (print_frame_args): Remove local mem_fileopen stream,
14722 2017-01-31 Pedro Alves <palves@redhat.com>
14724 * varobj.c (varobj_value_get_print_value): Remove xstrdup call.
14726 2017-01-31 Pedro Alves <palves@redhat.com>
14728 * common/scoped_restore.h
14729 (scoped_restore_tmpl::scoped_restore_tmpl): Template on T2, and
14730 change the value's parameter type to T2.
14731 (make_scoped_restore): Likewise.
14733 2017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
14734 Richard Henderson <rth@redhat.com>
14736 * amd64-linux-nat.c (PTRACE_ARCH_PRCTL): New define.
14737 (amd64_linux_fetch_inferior_registers): Add case to fetch FS_BASE
14738 GS_BASE for older kernels.
14739 (amd64_linux_store_inferior_registers): Add case to store FS_BASE
14740 GS_BASE for older kernels.
14741 * amd64-linux-tdep.c (amd64_linux_gregset_reg_offset): Add FS_BASE
14742 and GS_BASE to the offset table.
14743 (amd64_linux_register_reggroup_p): Add FS_BASE and GS_BASE to the
14744 system register group.
14745 * amd64-nat.c (amd64_native_gregset_reg_offset): Implements case
14747 * amd64-tdep.c (amd64_init_abi): Add segment registers for the
14749 * amd64-tdep.h (amd64_regnum): Add AMD64_FSBASE_REGNUM and
14750 AMD64_GSBASE_REGNUM.
14751 (AMD64_NUM_REGS): Set to AMD64_GSBASE_REGNUM + 1.
14752 * features/Makefile (amd64-linux.dat, amd64-avx-linux.dat)
14753 (amd64-mpx-linux.dat, amd64-avx512-linux.dat, x32-linux.dat)
14754 (x32-avx-linux.dat, x32-avx512-linux.dat): Add
14755 i386/64bit-segments.xml in those rules.
14756 * features/i386/64bit-segments.xml: New file.
14757 * features/i386/amd64-avx-mpx-linux.xml: Add 64bit-segments.xml.
14758 * features/i386/amd64-avx-linux.xml: Add 64bit-segments.xml.
14759 * features/i386/amd64-avx512-linux.xml: Add 64bit-segments.xml.
14760 * features/i386/amd64-mpx-linux.xml: Add 64bit-segments.xml.
14761 * features/i386/x32-avx512-linux.xml: Add 64bit-segments.xml.
14762 * features/i386/x32-avx-linux.xml: Add 64bit-segments.xml.
14763 * features/i386/amd64-linux.xml: Add 64bit-segments.xml.
14764 * features/i386/amd64-avx-linux.c: Regenerated.
14765 * features/i386/amd64-avx-mpx-linux.c: Regenerated.
14766 * features/i386/amd64-avx-mpx.c: Regenerated.
14767 * features/i386/amd64-avx512-linux.c: Regenerated.
14768 * features/i386/amd64-linux.c: Regenerated.
14769 * features/i386/amd64-mpx-linux.c: Regenerated.
14770 * features/i386/i386-avx-mpx-linux.c: Regenerated.
14771 * features/i386/i386-avx-mpx.c: Regenerated.
14772 * features/i386/x32-avx-linux.c: Regenerated.
14773 * features/i386/x32-avx512-linux.c: Regenerated.
14774 * regformats/i386/amd64-avx-linux.dat: Regenerated.
14775 * regformats/i386/amd64-avx-mpx-linux.dat: Regenerated.
14776 * regformats/i386/amd64-avx512-linux.dat: Regenerated.
14777 * regformats/i386/amd64-linux.dat: Regenerated.
14778 * regformats/i386/amd64-mpx-linux.dat: Regenerated.
14779 * regformats/i386/x32-avx-linux.dat: Regenerated.
14780 * regformats/i386/x32-avx512-linux.dat: Regenerated.
14781 * regformats/i386/x32-linux.dat: Regenerated.
14783 2017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
14785 * amd64-linux-tdep.h (AMD64_LINUX_ORIG_RAX_REGNUM):
14786 Set to AMD64_NUM_REGS.
14788 2017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
14790 * amd64-nat.c (amd64_native_gregset_reg_offset): Simplify logic
14791 that checks validity of a register number.
14793 2017-01-27 Kees Cook <keescook@google.com>
14795 * gdb/arm-linux-nat.c (arm_linux_fetch_inferior_registers): Call
14796 fetch_fpregs if target has fpa registers.
14797 (arm_linux_store_inferior_registers): Call store_fpregs if target
14800 2017-01-26 Andreas Arnez <arnez@linux.vnet.ibm.com>
14802 * cris-tdep.c (cris_gdbarch_init): Remove check for
14803 info.byte_order and force it to BFD_ENDIAN_LITTLE.
14805 2017-01-26 Antoine Tremblay <antoine.tremblay@ericsson.com>
14807 * corelow.c (get_core_register_section): Check for regset
14808 existence before checking for REGSET_VARIABLE_SIZE.
14810 2017-01-26 Yao Qi <yao.qi@linaro.org>
14811 Pedro Alves <palves@redhat.com>
14814 * disasm.c (gdb_disassembler::dis_asm_memory_error): Don't
14815 call memory_error, save memaddr instead.
14816 (gdb_disassembler::print_insn): If gdbarch_print_insn returns
14817 negative, cal memory_error.
14818 * disasm.h (gdb_disassembler) <m_err_memaddr>: New field.
14820 2017-01-26 Yao Qi <yao.qi@linaro.org>
14822 * disasm-selftests.c (memory_error_test): New function.
14823 (_initialize_disasm_selftests): Register memory_error_test.
14825 2017-01-26 Yao Qi <yao.qi@linaro.org>
14827 * Makefile.in (SFILES): Add disasm-selftests.c and
14829 (COMMON_OBS): Add disasm-selftests.o and selftest-arch.o.
14830 * disasm-selftests.c: New file.
14831 * selftest-arch.c: New file.
14832 * selftest-arch.h: New file.
14834 2017-01-26 Yao Qi <yao.qi@linaro.org>
14836 * mep-tdep.c (mep_gdb_print_insn): Set info->arch
14837 to bfd_arch_mep. Don't return 0 if section is not
14838 found. Call print_insn_mep.
14840 2017-01-26 Pedro Alves <palves@redhat.com>
14841 Yao Qi <yao.qi@linaro.org>
14843 * arm-tdep.c: Include "disasm.h".
14844 (gdb_print_insn_arm): Update code to get gdbarch.
14845 * disasm.c (dis_asm_read_memory): Change it to
14846 gdb_disassembler::dis_asm_read_memory.
14847 (dis_asm_memory_error): Likewise.
14848 (dis_asm_print_address): Likewise.
14849 (gdb_pretty_print_insn): Change it to
14850 gdb_disassembler::pretty_print_insn.
14851 (dump_insns): Add one argument gdb_disassemlber. All
14853 (do_mixed_source_and_assembly_deprecated): Likewise.
14854 (do_mixed_source_and_assembly): Likewise.
14855 (do_assembly_only): Likewise.
14856 (gdb_disassembler::gdb_disassembler): New.
14857 (gdb_disassembler::print_insn): New.
14858 * disasm.h (class gdb_disassembler): New.
14859 (gdb_pretty_print_insn): Remove declaration.
14860 (gdb_disassemble_info): Likewise.
14861 * guile/scm-disasm.c (class gdbscm_disassembler): New.
14862 (gdbscm_disasm_read_memory_worker): Update.
14863 (gdbscm_disasm_read_memory): Update.
14864 (gdbscm_disasm_memory_error): Remove.
14865 (gdbscm_disasm_print_address): Remove.
14866 (gdbscm_disassembler::gdbscm_disassembler): New.
14867 (gdbscm_print_insn_from_port): Update.
14868 * mips-tdep.c: Include disasm.h.
14869 (gdb_print_insn_mips): Update code to get gdbarch.
14870 * record-btrace.c (btrace_insn_history): Update.
14871 * spu-tdep.c: Include disasm.h.
14872 (struct spu_dis_asm_data): Remove.
14873 (struct spu_dis_asm_info): New.
14874 (spu_dis_asm_print_address): Use spu_dis_asm_info to get
14876 (gdb_print_insn_spu): Cast disassemble_info to
14879 2017-01-26 Yao Qi <yao.qi@linaro.org>
14881 * disasm.c (do_ui_file_delete): Delete.
14882 (gdb_insn_length): Move code creating stream to ...
14883 * utils.c (null_stream): ... here. New function.
14884 * utils.h (null_stream): Declare.
14886 2017-01-23 Simon Marchi <simon.marchi@polymtl.ca>
14888 * python/py-inferior.c (find_thread_object): Return directly
14889 from the loop. Remove "found" variable.
14891 2017-01-21 Joel Brobecker <brobecker@adacore.com>
14893 GDB 7.12.1 released.
14895 2017-01-20 Simon Marchi <simon.marchi@ericsson.com>
14897 * python/py-function.c (fnpy_call): Reorder declarations to have
14898 the gdbpy_enter object declared first.
14899 * python/py-xmethods.c (gdbpy_get_xmethod_arg_types): Likewise.
14901 2017-01-20 Simon Marchi <simon.marchi@ericsson.com>
14904 * python/python-internal.h (PyMem_RawMalloc): Define for
14906 * python/py-gdb-readline.c (gdbpy_readline_wrapper): Use
14907 PyMem_RawMalloc instead of PyMem_Malloc.
14909 2017-01-20 Mike Wrighton <mike_wrighton@codesourcery.com>
14910 Luis Machado <lgustavo@codesourcery.com>
14912 * NEWS (New commands): Mention flash-erase.
14913 (New MI commands): Mention target-flash-erase.
14914 * mi/mi-cmds.c (mi_cmd_target_flash_erase): Add target-flash-erase MI
14916 * mi/mi-cmds.h (mi_cmd_target_flash_erase): New declaration.
14917 * mi/mi-main.c (mi_cmd_target_flash_erase): New function.
14918 * target.c (flash_erase_command): New function.
14919 (initialize_targets): Add new flash-erase command.
14920 * target.h (flash_erase_command): New declaration.
14922 2017-01-20 Joel Brobecker <brobecker@adacore.com>
14924 * nat/linux-ptrace.c: Only include <sys/procfs.h> if
14925 HAVE_SYS_PROCFS_H is defined.
14927 2017-01-18 Alan Hayward <alan.hayward@arm.com>
14929 * remote.c (struct cached_reg): Change data into a pointer.
14930 * (stop_reply_dtr): Free data pointers before deleting vector.
14931 (process_stop_reply): Likewise.
14932 (remote_parse_stop_reply): Allocate space for data
14934 2017-01-18 Alan Hayward <alan.hayward@arm.com>
14936 * amd64-tdep.c (amd64_pseudo_register_read_value): remove
14938 (amd64_pseudo_register_read_value): Likewise.
14939 * remote.c (fetch_register_using_p): Remove MAX_REGISTER_SIZE.
14940 (store_register_using_P): Likewise.
14941 * regcache.c (regcache_xfer_part): Likewise.
14943 2017-01-16 Ivo Raisr <ivo.raisr@oracle.com>
14945 Split real and pseudo registers.
14946 * sparc-tdep.h (SPARC_CORE_REGISTERS): New macro.
14947 (sparc32_pseudo_regnum): New enum.
14948 * sparc64-tdep.h (sparc64_pseudo_regnum): New enum.
14949 * sparc-tdep.c (SPARC32_FPU_REGISTERS): New macro.
14950 (SPARC32_CP0_REGISTERS): New macro.
14951 (sparc32_pseudo_register_name): New function.
14952 (sparc32_register_name): Use sparc32_pseudo_register_name.
14953 (sparc32_pseudo_register_type): New function.
14954 (sparc32_register_type): Use sparc32_pseudo_register_type.
14955 (sparc32_pseudo_register_read, sparc32_pseudo_register_write): Handle
14956 pseudo register numbers.
14957 * sparc64-tdep.c SPARC64_FPU_REGISTERS): New macro.
14958 (SPARC64_CP0_REGISTERS): New macro.
14959 (sparc64_pseudo_register_name): New function.
14960 (sparc64_register_name): Use sparc64_pseudo_register_name.
14961 (sparc64_pseudo_register_type): New function.
14962 (sparc64_register_type): Use sparc64_pseudo_register_type.
14963 (sparc64_pseudo_register_read, sparc64_pseudo_register_write): Handle
14964 pseudo register numbers.
14965 (sparc64_store_floating_fields, sparc64_extract_floating_fields,
14966 sparc64_store_arguments): Handle pseudo register numbers.
14968 2017-01-13 Yao Qi <yao.qi@linaro.org>
14970 * remote.c (REMOTE_DEBUG_MAX_CHAR): New macro.
14971 (putpkt_binary): Print only REMOTE_DEBUG_MAX_CHAR chars in debug
14973 (getpkt_or_notif_sane_1): Likewise.
14975 2017-01-13 Yao Qi <yao.qi@linaro.org>
14977 * Makefile.in (checker-headers): Use CXX and CXX_DIALET instead
14978 of CC. Pass "-x c++-header" instead of "-x c".
14980 2017-01-12 Simon Marchi <simon.marchi@ericsson.com>
14982 * remote.c (remote_can_async_p): Update comment.
14984 2017-01-12 Simon Marchi <simon.marchi@ericsson.com>
14986 * linux-nat.c (linux_nat_can_async_p): Update comment.
14988 2017-01-12 Simon Marchi <simon.marchi@ericsson.com>
14990 * serial.c (serial_open): Forget about "pc" and "lpt" serial interface.
14992 2017-01-11 Simon Marchi <simon.marchi@ericsson.com>
14994 * cli/cli-decode.c (lookup_cmd_1): Fix typo in comment.
14996 2017-01-10 Tom Tromey <tom@tromey.com>
14998 * python/py-type.c (typy_legacy_template_argument): Update.
14999 * cp-support.h (struct demangle_parse_info) (demangle_parse_info,
15000 ~demangle_parse_info): Declare new members.
15001 (cp_demangled_name_to_comp): Return unique_ptr.
15002 (cp_demangled_name_parse_free)
15003 (make_cleanup_cp_demangled_name_parse_free)
15004 (cp_new_demangle_parse_info): Remove.
15005 * cp-support.c (do_demangled_name_parse_free_cleanup)
15006 (make_cleanup_cp_demangled_name_parse_free): Remove.
15007 (inspect_type, cp_canonicalize_string_full)
15008 (cp_canonicalize_string): Update.
15009 (mangled_name_to_comp): Change return type.
15010 (cp_class_name_from_physname, method_name_from_physname)
15011 (cp_func_name, cp_remove_params): Update.
15012 * cp-name-parser.y (demangle_parse_info): New constructor, from
15013 cp_new_demangle_parse_info.
15014 (~demangle_parse_info): New destructor, from
15015 cp_demangled_name_parse_free.
15016 (cp_merge_demangle_parse_infos): Update.
15017 (cp_demangled_name_to_comp): Change return type.
15019 2017-01-10 Tom Tromey <tom@tromey.com>
15021 * top.c (prevent_dont_repeat): Change return type.
15022 * python/python.c (execute_gdb_command): Use std::string.
15024 * guile/guile.c (gdbscm_execute_gdb_command): Update.
15025 * command.h (prevent_dont_repeat): Change return type.
15026 * breakpoint.c (bpstat_do_actions_1): Update.
15028 2017-01-10 Tom Tromey <tom@tromey.com>
15030 * value.h (scoped_value_mark::~scoped_value_mark): Call
15032 (scoped_value_mark::free_to_mark): New method.
15033 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Use
15036 2017-01-10 Tom Tromey <tom@tromey.com>
15038 * python/py-value.c (valpy_dereference, valpy_referenced_value)
15039 (valpy_reference_value, valpy_const_value, valpy_get_address)
15040 (valpy_get_dynamic_type, valpy_lazy_string, valpy_do_cast)
15041 (valpy_getitem, valpy_call, valpy_binop_throw, valpy_negative)
15042 (valpy_absolute, valpy_richcompare_throw): Use scoped_value_mark.
15043 * dwarf2loc.c (dwarf2_loc_desc_get_symbol_read_needs): Use
15045 * dwarf2-frame.c (execute_stack_op): Use scoped_value_mark.
15046 * value.h (scoped_value_mark): New class.
15048 2017-01-10 Tom Tromey <tom@tromey.com>
15050 * dwarf2read.c (dwarf2_build_psymtabs): Use psymtab_discarder.
15051 * psympriv.h (make_cleanup_discard_psymtabs): Don't declare.
15052 * psymtab.c (discard_psymtabs_upto): Remove.
15053 (make_cleanup_discard_psymtabs): Remove.
15054 (struct psymtab_state): Remove.
15056 2017-01-10 Tom Tromey <tom@tromey.com>
15058 * record-full.c (record_full_save_cleanups): Remove.
15059 (record_full_save): Use gdb::unlinker.
15060 * gcore.c (do_bfd_delete_cleanup): Remove.
15061 (gcore_command): Use gdb::unlinker, unique_xmalloc_ptr. Remove
15063 * dwarf2read.c (unlink_if_set): Remove.
15064 (write_psymtabs_to_index): Use gdb::unlinker.
15065 * common/gdb_unlinker.h: New file.
15067 2017-01-10 Tom Tromey <tom@tromey.com>
15069 * windows-tdep.c (windows_xfer_shared_library): Update.
15070 * windows-nat.c (windows_make_so): Update.
15071 * utils.h (make_cleanup_bfd_unref): Remove.
15072 * utils.c (do_bfd_close_cleanup, make_cleanup_bfd_unref): Remove.
15073 * symfile.h (symfile_bfd_open)
15074 (find_separate_debug_file_in_section): Return gdb_bfd_ref_ptr.
15075 * symfile.c (read_symbols, symbol_file_add)
15076 (separate_debug_file_exists): Update.
15077 (symfile_bfd_open): Return gdb_bfd_ref_ptr.
15078 (generic_load, reread_symbols): Update.
15079 * symfile-mem.c (symbol_file_add_from_memory): Update.
15080 * spu-linux-nat.c (spu_bfd_open): Return gdb_bfd_ref_ptr.
15081 (spu_symbol_file_add_from_memory): Update.
15082 * solist.h (struct target_so_ops) <bfd_open>: Return
15084 (solib_bfd_fopen, solib_bfd_open): Return gdb_bfd_ref_ptr.
15085 * solib.c (solib_bfd_fopen, solib_bfd_open): Return
15087 (solib_map_sections, reload_shared_libraries_1): Update.
15088 * solib-svr4.c (enable_break): Update.
15089 * solib-spu.c (spu_bfd_fopen): Return gdb_bfd_ref_ptr.
15090 * solib-frv.c (enable_break2): Update.
15091 * solib-dsbt.c (enable_break): Update.
15092 * solib-darwin.c (gdb_bfd_mach_o_fat_extract): Return
15094 (darwin_solib_get_all_image_info_addr_at_init): Update.
15095 (darwin_bfd_open): Return gdb_bfd_ref_ptr.
15096 * solib-aix.c (solib_aix_bfd_open): Return gdb_bfd_ref_ptr.
15097 * record-full.c (record_full_save): Update.
15098 * python/py-objfile.c (objfpy_add_separate_debug_file): Update.
15099 * procfs.c (insert_dbx_link_bpt_in_file): Update.
15100 * minidebug.c (find_separate_debug_file_in_section): Return
15102 * machoread.c (macho_add_oso_symfile): Change abfd to
15104 (macho_symfile_read_all_oso): Update.
15105 (macho_check_dsym): Return gdb_bfd_ref_ptr.
15106 (macho_symfile_read): Update.
15107 * jit.c (bfd_open_from_target_memory): Return gdb_bfd_ref_ptr.
15108 (jit_bfd_try_read_symtab): Update.
15109 * gdb_bfd.h (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
15110 (gdb_bfd_openw, gdb_bfd_openr_iovec)
15111 (gdb_bfd_openr_next_archived_file, gdb_bfd_fdopenr): Return
15113 (gdb_bfd_ref_policy): New struct.
15114 (gdb_bfd_ref_ptr): New typedef.
15115 * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
15116 (gdb_bfd_openw, gdb_bfd_openr_iovec)
15117 (gdb_bfd_openr_next_archived_file, gdb_bfd_fdopenr): Return
15119 * gcore.h (create_gcore_bfd): Return gdb_bfd_ref_ptr.
15120 * gcore.c (create_gcore_bfd): Return gdb_bfd_ref_ptr.
15121 (gcore_command): Update.
15122 * exec.c (exec_file_attach): Update.
15123 * elfread.c (elf_symfile_read): Update.
15124 * dwarf2read.c (dwarf2_get_dwz_file): Update.
15125 (try_open_dwop_file, open_dwo_file): Return gdb_bfd_ref_ptr.
15126 (open_and_init_dwo_file): Update.
15127 (open_dwp_file): Return gdb_bfd_ref_ptr.
15128 (open_and_init_dwp_file): Update.
15129 * corelow.c (core_open): Update.
15130 * compile/compile-object-load.c (compile_object_load): Update.
15131 * common/gdb_ref_ptr.h (ref_ptr::operator->): New operator.
15132 * coffread.c (coff_symfile_read): Update.
15133 * cli/cli-dump.c (bfd_openr_or_error, bfd_openw_or_error): Return
15134 gdb_bfd_ref_ptr. Rename.
15135 (dump_bfd_file, restore_command): Update.
15136 * build-id.h (build_id_to_debug_bfd): Return gdb_bfd_ref_ptr.
15137 * build-id.c (build_id_to_debug_bfd): Return gdb_bfd_ref_ptr.
15138 (find_separate_debug_file_by_buildid): Update.
15140 2017-01-10 Tom Tromey <tom@tromey.com>
15142 * common/gdb_ref_ptr.h: New file.
15143 * python/py-ref.h (struct gdbpy_ref_policy): New.
15144 (gdbpy_ref): Now a typedef.
15146 2017-01-10 Tom Tromey <tom@tromey.com>
15148 * utils.h (make_cleanup_htab_delete): Don't declare.
15149 * utils.c (do_htab_delete_cleanup, make_cleanup_htab_delete):
15151 * linespec.c (decode_compound_collector): Add constructor,
15153 (lookup_prefix_sym): Remove cleanup.
15154 (symtab_collector): Add constructor, destructor.
15155 (collect_symtabs_from_filename): Remove cleanup.
15156 * disasm.c (do_mixed_source_and_assembly): Use htab_up.
15157 * compile/compile-c-symbols.c (generate_c_for_variable_locations):
15159 * gnu-v3-abi.c (gnuv3_print_vtable): Use htab_up.
15160 * dwarf2read.c (dw2_expand_symtabs_matching)
15161 (dw2_map_symbol_filenames, dwarf_decode_macros)
15162 (write_psymtabs_to_index): Use htab_up.
15163 * dwarf2loc.c (func_verify_no_selftailcall)
15164 (call_site_find_chain_1, func_verify_no_selftailcall)
15165 (chain_candidate, call_site_find_chain_1): Use std::unordered_set,
15166 std::vector, gdb::unique_xmalloc_ptr.
15167 (call_sitep): Remove typedef.
15168 (dwarf2_locexpr_baton_eval): Remove unused variable.
15170 2017-01-10 Tom Tromey <tom@tromey.com>
15172 * python/python-internal.h (make_cleanup_py_decref)
15173 (make_cleanup_py_xdecref): Don't declare.
15174 * python/py-utils.c (py_decref, make_cleanup_py_decref)
15175 (py_xdecref, make_cleanup_py_xdecref): Remove.
15177 2017-01-10 Tom Tromey <tom@tromey.com>
15179 * python/py-framefilter.c (py_mi_print_variables): Use gdbpy_ref.
15180 (py_print_locals, enumerate_locals, py_print_args): Use gdbpy_ref.
15182 2017-01-10 Tom Tromey <tom@tromey.com>
15184 * python/py-framefilter.c (enumerate_args): Use gdbpy_ref.
15186 2017-01-10 Tom Tromey <tom@tromey.com>
15188 * python/py-utils.c (unicode_to_encoded_string)
15189 (python_string_to_target_string)
15190 (python_string_to_target_python_string)
15191 (python_string_to_host_string, gdbpy_obj_to_string)
15192 (get_addr_from_python): Use gdbpy_ref.
15194 2017-01-10 Tom Tromey <tom@tromey.com>
15196 * python/py-unwind.c (pyuw_object_attribute_to_pointer): Use
15199 2017-01-10 Tom Tromey <tom@tromey.com>
15201 * python/python.c (eval_python_command, gdbpy_decode_line)
15202 (gdbpy_run_events, gdbpy_start_type_printers)
15203 (gdbpy_apply_type_printers): Use gdbpy_ref.
15205 2017-01-10 Tom Tromey <tom@tromey.com>
15207 * python/py-param.c (get_doc_string, compute_enum_values): Use
15210 2017-01-10 Tom Tromey <tom@tromey.com>
15212 * python/py-inferior.c (find_thread_object, build_inferior_list):
15215 2017-01-10 Tom Tromey <tom@tromey.com>
15217 * python/py-framefilter.c (py_print_frame): Use gdbpy_ref.
15219 2017-01-10 Tom Tromey <tom@tromey.com>
15221 * python/py-finishbreakpoint.c (bpfinishpy_out_of_scope): Use
15224 2017-01-10 Tom Tromey <tom@tromey.com>
15226 * python/py-cmd.c (cmdpy_completer_helper): Use gdbpy_ref. Remove
15228 (cmdpy_completer_handle_brkchars, cmdpy_completer, cmdpy_init):
15231 2017-01-10 Tom Tromey <tom@tromey.com>
15233 * python/py-breakpoint.c (gdbpy_breakpoint_cond_says_stop): Use
15236 2017-01-10 Tom Tromey <tom@tromey.com>
15238 * python/py-arch.c (archpy_disassemble): Use gdbpy_ref. Don't
15239 decref results of PyArg_ParseTupleAndKeywords.
15241 2017-01-10 Tom Tromey <tom@tromey.com>
15243 * python/python.c (python_run_simple_file): Use
15244 unique_xmalloc_ptr, gdbpy_ref.
15246 2017-01-10 Tom Tromey <tom@tromey.com>
15248 * python/py-prettyprint.c (print_stack_unless_memory_error)
15249 (print_string_repr, print_children): Use gdbpy_ref.
15250 (dummy_python_frame): New class.
15251 (dummy_python_frame::dummy_python_frame): Rename from
15252 push_dummy_python_frame.
15253 (py_restore_tstate): Remove.
15255 2017-01-10 Tom Tromey <tom@tromey.com>
15257 * python/py-framefilter.c (py_print_frame): Use gdbpy_ref.
15259 2017-01-10 Tom Tromey <tom@tromey.com>
15261 * python/python.c (ensure_python_env, restore_python_env):
15263 * python/python-internal.h (ensure_python_env): Don't declare.
15264 * varobj.h (varobj_ensure_python_env): Don't declare.
15265 * varobj.c (varobj_ensure_python_env): Remove.
15267 2017-01-10 Tom Tromey <tom@tromey.com>
15269 * varobj.c (varobj_value_get_print_value): Use
15270 gdbpy_enter_varobj.
15272 2017-01-10 Tom Tromey <tom@tromey.com>
15274 * python/py-prettyprint.c (print_string_repr, print_children):
15276 * python/py-lazy-string.c (gdbpy_extract_lazy_string): Change type
15278 * varobj.c (varobj_value_get_print_value): Update.
15279 * python/python-internal.h (gdbpy_extract_lazy_string): Update.
15281 2017-01-10 Tom Tromey <tom@tromey.com>
15283 * varobj.c (varobj_get_display_hint)
15284 (dynamic_varobj_has_child_method, install_new_value_visualizer)
15285 (varobj_set_visualizer, free_variable): Use
15286 gdbpy_enter_varobj.
15288 2017-01-10 Tom Tromey <tom@tromey.com>
15290 * python/python.c (python_command): Use gdbpy_enter, gdbpy_ref.
15291 (do_finish_initialization): New function. Use gdbpy_ref.
15292 (gdbpy_finish_initialization): Use gdbpy_enter. Call
15293 do_finish_initialization.
15295 2017-01-10 Tom Tromey <tom@tromey.com>
15297 * python/py-param.c (get_set_value, get_show_value): Use
15298 gdbpy_enter, gdbpy_ref.
15300 2017-01-10 Tom Tromey <tom@tromey.com>
15302 * python/py-function.c (fnpy_call): Use gdbpy_enter, gdbpy_ref.
15304 2017-01-10 Tom Tromey <tom@tromey.com>
15306 * python/py-cmd.c (cmdpy_function): Use gdbpy_enter, gdbpy_ref.
15308 2017-01-10 Tom Tromey <tom@tromey.com>
15310 * python/py-varobj.c (py_varobj_iter_dtor, py_varobj_iter_next):
15311 Use gdbpy_enter_varobj.
15313 2017-01-10 Tom Tromey <tom@tromey.com>
15315 * varobj.c (gdbpy_enter_varobj): New constructor.
15316 * python/python-internal.h (gdbpy_enter_varobj): New class.
15317 * python/py-varobj.c (py_varobj_get_iterator): Use
15318 gdbpy_enter_varobj.
15320 2017-01-10 Tom Tromey <tom@tromey.com>
15322 * python/py-xmethods.c (gdbpy_get_xmethod_result_type): Use
15323 gdbpy_enter, gdbpy_ref, unique_xmalloc_ptr.
15324 (gdbpy_invoke_xmethod): Use gdbpy_ref, gdbpy_enter.
15325 (gdbpy_get_xmethod_arg_types): Use gdbpy_ref,
15326 unique_xmalloc_ptr.
15327 (gdbpy_get_xmethod_arg_types): Use gdbpy_ref, gdbpy_enter.
15329 2017-01-10 Tom Tromey <tom@tromey.com>
15331 * python/py-xmethods.c (invoke_match_method): Use
15334 2017-01-10 Tom Tromey <tom@tromey.com>
15336 * python/py-xmethods.c (gdbpy_get_matching_xmethod_workers): use
15337 gdbpy_enter, gdbpy_ref.
15339 2017-01-10 Tom Tromey <tom@tromey.com>
15341 * python/python.c (python_interactive_command): Use gdbpy_enter.
15343 2017-01-10 Tom Tromey <tom@tromey.com>
15345 * python/python.c (gdbpy_before_prompt_hook): Use gdbpy_enter,
15348 2017-01-10 Tom Tromey <tom@tromey.com>
15350 * python/py-prettyprint.c (gdbpy_apply_val_pretty_printer): Use
15351 gdbpy_enter, gdbpy_ref, unique_xmalloc_ptr.
15353 2017-01-10 Tom Tromey <tom@tromey.com>
15355 * utils.h (htab_deleter): New struct.
15356 (htab_up): New typedef.
15357 * python/py-framefilter.c (gdbpy_apply_frame_filter): Use
15358 gdbpy_enter, gdbpy_ref, htab_up.
15360 2017-01-10 Tom Tromey <tom@tromey.com>
15362 * python/py-unwind.c (pending_frame_invalidate): Remove.
15363 (pyuw_sniffer): Use gdbpy_enter and gdbpy_ref.
15365 2017-01-10 Tom Tromey <tom@tromey.com>
15367 * python/py-xmethods.c (gdbpy_free_xmethod_worker_data)
15368 (gdbpy_clone_xmethod_worker_data): Use gdbpy_enter.
15370 2017-01-10 Tom Tromey <tom@tromey.com>
15372 * python/py-type.c (save_objfile_types): Use gdbpy_enter.
15374 2017-01-10 Tom Tromey <tom@tromey.com>
15376 * python/python.c (gdbpy_eval_from_control_command)
15377 (gdbpy_source_script, gdbpy_run_events)
15378 (gdbpy_source_objfile_script, gdbpy_execute_objfile_script)
15379 (gdbpy_free_type_printers, gdbpy_finish_initialization): Use
15382 2017-01-10 Tom Tromey <tom@tromey.com>
15384 * python/py-progspace.c (py_free_pspace): Use gdbpy_enter.
15386 2017-01-10 Tom Tromey <tom@tromey.com>
15388 * python/py-objfile.c (py_free_objfile): Use gdbpy_enter.
15390 2017-01-10 Tom Tromey <tom@tromey.com>
15392 * python/py-inferior.c (python_on_normal_stop, python_on_resume)
15393 (python_on_inferior_call_pre, python_on_inferior_call_post)
15394 (python_on_memory_change, python_on_register_change)
15395 (python_inferior_exit, python_new_objfile, add_thread_object)
15396 (delete_thread_object, py_free_inferior): Use gdbpy_enter.
15398 2017-01-10 Tom Tromey <tom@tromey.com>
15400 * python/py-finishbreakpoint.c (bpfinishpy_handle_stop)
15401 (bpfinishpy_handle_exit): Use gdbpy_enter.
15403 2017-01-10 Tom Tromey <tom@tromey.com>
15405 * python/py-cmd.c (cmdpy_destroyer)
15406 (cmdpy_completer_handle_brkchars, cmdpy_completer): Use
15409 2017-01-10 Tom Tromey <tom@tromey.com>
15411 * python/py-breakpoint.c (gdbpy_breakpoint_cond_says_stop): Use
15413 (gdbpy_breakpoint_has_cond): Likewise.
15415 2017-01-10 Tom Tromey <tom@tromey.com>
15417 * python/python.c (gdbpy_enter): New constructor.
15418 (~gdbpy_enter): New destructor.
15419 (restore_python_env, ensure_python_env): Rewrite.
15420 * python/python-internal.h (gdbpy_enter): New class.
15422 2017-01-10 Tom Tromey <tom@tromey.com>
15424 * python/py-symbol.c (gdbpy_lookup_symbol): Use gdbpy_ref.
15426 2017-01-10 Tom Tromey <tom@tromey.com>
15428 * python/py-value.c (value_has_field, get_field_flag)
15429 (get_field_type, valpy_getitem, convert_value_from_python): Use
15432 2017-01-10 Tom Tromey <tom@tromey.com>
15434 * python/python.c (gdbpy_progspaces, gdbpy_objfiles): Use
15437 2017-01-10 Tom Tromey <tom@tromey.com>
15439 * python/py-prettyprint.c (search_pp_list)
15440 (find_pretty_printer_from_objfiles)
15441 (find_pretty_printer_from_progspace)
15442 (find_pretty_printer_from_gdb, find_pretty_printer)
15443 (gdbpy_get_display_hint, gdbpy_get_varobj_pretty_printer): Use
15446 2017-01-10 Tom Tromey <tom@tromey.com>
15448 * python/py-param.c (call_doc_function): Use gdbpy_ref.
15450 2017-01-10 Tom Tromey <tom@tromey.com>
15452 * python/py-linetable.c (build_line_table_tuple_from_pcs)
15453 (ltpy_get_all_source_lines): Use gdbpy_ref.
15455 2017-01-10 Tom Tromey <tom@tromey.com>
15457 * python/py-framefilter.c (extract_sym, extract_value)
15458 (get_py_iter_from_func, bootstrap_python_frame_filters): Use
15461 2017-01-10 Tom Tromey <tom@tromey.com>
15463 * python/py-breakpoint.c (gdbpy_breakpoints): Use gdbpy_ref.
15465 2017-01-10 Tom Tromey <tom@tromey.com>
15467 * python/py-inferior.c (gdbpy_inferiors): Use gdbpy_ref.
15469 2017-01-10 Tom Tromey <tom@tromey.com>
15471 * python/py-function.c (convert_values_to_python, fnpy_init): Use
15474 2017-01-10 Tom Tromey <tom@tromey.com>
15476 * python/py-cmd.c (gdbpy_string_to_argv): Use gdbpy_ref.
15478 2017-01-10 Tom Tromey <tom@tromey.com>
15480 * python/py-type.c (convert_field, make_fielditem, typy_fields)
15481 (typy_range): Use gdbpy_ref.
15483 2017-01-10 Tom Tromey <tom@tromey.com>
15485 * python/py-threadevent.c (create_thread_event_object): Use
15487 * python/py-stopevent.c (create_stop_event_object): Simplify.
15488 (emit_stop_event): Use gdbpy_ref.
15489 * python/py-signalevent.c (create_signal_event_object): Use
15491 * python/py-newobjfileevent.c (create_new_objfile_event_object)
15492 (emit_new_objfile_event, create_clear_objfiles_event_object)
15493 (emit_clear_objfiles_event): Use gdbpy_ref.
15494 * python/py-infevents.c (create_inferior_call_event_object)
15495 (create_register_changed_event_object)
15496 (create_memory_changed_event_object, emit_inferior_call_event)
15497 (emit_memory_changed_event, emit_register_changed_event): Use
15499 * python/py-exitedevent.c (create_exited_event_object)
15500 (emit_exited_event): Use gdbpy_ref.
15501 * python/py-event.h (evpy_emit_event): Remove
15502 CPYCHECKER_STEALS_REFERENCE_TO_ARG annotation.
15503 * python/py-event.c (evpy_emit_event): Use gdbpy_ref.
15504 * python/py-continueevent.c (emit_continue_event): Use
15506 * python/py-breakpoint.c (gdbpy_breakpoint_created)
15507 (gdbpy_breakpoint_deleted, gdbpy_breakpoint_modified): Use
15509 * python/py-bpevent.c (create_breakpoint_event_object): Use
15512 2017-01-10 Tom Tromey <tom@tromey.com>
15514 * python/py-ref.h: New file.
15516 2017-01-10 Simon Marchi <simon.marchi@ericsson.com>
15518 * cli-out.c (cli_ui_out::do_redirect): Change return type to
15520 * cli-out.h (cli_ui_out::do_redirect): Likewise.
15521 * mi/mi-out.c (mi_ui_out::do_redirect): Likewise.
15522 * mi/mi-out.h (mi_ui_out::do_redirect): Likewise.
15523 * ui-out.c (ui_out::redirect): Likewise.
15524 * ui-out.h (ui_out::redirect, ui_out::do_redirect): Likewise.
15525 * cli/cli-logging.c (set_logging_redirect): Update call site of
15527 (handle_redirections): Likewise.
15528 * scm-ports.c (ioscm_with_output_to_port_worker): Likewise.
15529 * top.c (execute_command_to_string): Likewise.
15530 * utils.c (do_ui_out_redirect_pop): Likewise.
15532 2017-01-10 Simon Marchi <simon.marchi@ericsson.com>
15534 * stack.c (_initialize_stack): Update "frame" command help message.
15536 2017-01-08 Iain Buclaw <ibuclaw@gdcproject.org>
15538 * d-exp.y (CastExpression): Emit UNOP_CAST_TYPE.
15540 2017-01-06 Yao Qi <yao.qi@linaro.org>
15542 * x86-linux-nat.h: Include gdb_proc_service.h.
15544 2017-01-06 Yao Qi <yao.qi@linaro.org>
15546 * ser-base.h: Include serial.h.
15548 2017-01-06 Yao Qi <yao.qi@linaro.org>
15550 * ppc-linux-tdep.h: Include ppc-tdep.h.
15552 2017-01-06 Yao Qi <yao.qi@linaro.org>
15554 * nat/amd64-linux-siginfo.h: Include signal.h.
15556 2017-01-06 Yao Qi <yao.qi@linaro.org>
15558 * nat/aarch64-linux-hw-point.h: Include break-common.h.
15560 2017-01-06 Yao Qi <yao.qi@linaro.org>
15562 * mi/mi-parse.h: Include mi-cmds.h.
15564 2017-01-06 Yao Qi <yao.qi@linaro.org>
15566 * inf-loop.c: Don't include "target.h".
15567 * inf-loop.h: Include it here.
15569 2017-01-06 Yao Qi <yao.qi@linaro.org>
15571 * dfp.h: Include "dboulest.h" and "expression.h".
15573 2017-01-06 Yao Qi <yao.qi@linaro.org>
15575 * ax-gdb.h: Include "ax.h".
15577 2017-01-06 Yao Qi <yao.qi@linaro.org>
15579 * Makefile.in (HFILES_NO_SRCDIR): Replace gdb_ptrace.h
15580 with nat/gdb_ptrace.h.
15582 2017-01-05 Yao Qi <yao.qi@linaro.org>
15584 * mips-fbsd-tdep.c (mips_fbsd_sigframe_init): Move && to
15586 (mips64_fbsd_sigframe_init): Likewise.
15588 2017-01-04 John Baldwin <jhb@FreeBSD.org>
15590 * mips-fbsd-tdep.c (_initialize_mips_fbsd_tdep): Use
15591 GDB_OSABI_FREEBSD instead of GDB_OSABI_FREEBSD_ELF.
15593 2017-01-04 John Baldwin <jhb@FreeBSD.org>
15595 * Makefile.in (ALLDEPFILES): Add mips-fbsd-nat.c.
15596 * NEWS: Mention new FreeBSD/mips native configuration.
15597 * config/mips/fbsd.mh: New file.
15598 * configure.host: Add mips*-*-freebsd*.
15599 * mips-fbsd-nat.c: New file.
15601 2017-01-04 John Baldwin <jhb@FreeBSD.org>
15603 * Makefile.in (ALL_TARGET_OBS): Add mips-fbsd-tdep.o.
15604 (ALLDEPFILES): Add mips-fbsd-tdep.c.
15605 * NEWS: Mention new FreeBSD/mips target.
15606 * configure.tgt: Add mips*-*-freebsd*.
15607 * mips-fbsd-tdep.c: New file.
15608 * mips-fbsd-tdep.h: New file.
15610 2017-01-04 Yao Qi <yao.qi@linaro.org>
15612 * dwarf2loc.c (write_pieced_value): Don't use VALUE_FRAME_ID (to),
15613 use c->frame_id when the piece location is DWARF_VALUE_REGISTER.
15615 2017-01-01 Joel Brobecker <brobecker@adacore.com>
15617 Update copyright year range in all GDB files.
15619 2017-01-01 Joel Brobecker <brobecker@adacore.com>
15621 * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2016.
15623 For older changes see ChangeLog-2016.
15629 version-control: never