1 2017-11-15 Andrew Cagney <cagney@gnu.org>
3 * MAINTAINERS: Remove no-longer applicable entries.
5 2017-11-15 Andrew Cagney <cagney@gnu.org>
7 * MAINTAINERS: Move self to Past Maintainers.
9 2017-11-15 Yao Qi <yao.qi@linaro.org>
11 * features/Makefile (XMLTOC): Remove nios2-linux.xml.
12 * features/nios2-linux.c: Remove.
13 * nios2-linux-tdep.c (_initialize_nios2_linux_tdep): Don't call
14 initialize_tdesc_nios2_linux.
16 2017-11-15 Yao Qi <yao.qi@linaro.org>
18 * m68hc11-tdep.c (M68HC11_NUM_REGS): Change it to
19 M68HC11_LAST_HARD_REG + 1.
21 2017-11-14 Paul Carroll <pcarroll@codesourcery.com>
24 * remote.c (remote_write_bytes_aux, remote_read_bytes_1,
25 remote_read_bytes, remote_write_qxfer, remote_xfer_partial):
26 Return TARGET_XFER_EOF if size of returned data is 0.
28 2017-11-14 Simon Marchi <simon.marchi@ericsson.com>
30 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
31 memory-map-selftests.c.
32 (SUBDIR_UNITTESTS_OBS): Add memory-map-selftests.o.
33 * memory-map.c (memory_map_start_memory): Fix computation of hi
35 * unittests/memory-map-selftests.c: New file.
37 2017-11-09 Joel Brobecker <brobecker@adacore.com>
39 * ada-lang.c: Fix some typos in the general command documenting
40 how Ada expressions are being evaluated and how their result
43 2017-11-09 Tom Tromey <tom@tromey.com>
45 * psymtab.c (psymbol_hash): Do not hash string contents.
46 (psymbol_compare): Add comment.
48 2017-11-09 Tom Tromey <tom@tromey.com>
50 * dictionary.c (dict_hash): Move "TKB" check into the "switch".
52 2017-11-08 Joel Brobecker <brobecker@adacore.com>
54 * ada-exp.y (write_var_from_sym): Remove parameter
55 "orig_left_context". Update all callers.
57 2017-11-08 Simon Marchi <simon.marchi@ericsson.com>
59 * tracepoint.h (class collection_list) <stringify>: Return
60 std::vector<std::string>.
61 (encode_actions_rsp): Change parameters to
62 std::vector<std::string> *.
63 * tracepoint.c (collection_list::stringify): Return
64 std::vector<std::string> and adjust accordingly.
65 (encode_actions_rsp): Changee parameters to
66 std::vector<std::string> and adjust accordingly.
67 * remote.c (free_actions_list),
68 free_actions_list_cleanup_wrapper): Remove.
69 (remote_download_tracepoint): Adjust to std::vector.
71 2017-11-08 Tom Tromey <tom@tromey.com>
73 * dwarf2read.c (symbolp): Remove typedef.
74 (read_func_scope): Use std::vector.
75 (process_structure_scope): Use std::vector.
77 2017-11-08 Pedro Alves <palves@redhat.com>
79 * ada-lang.c (ada_make_symbol_completion_list): Use
80 completion_skip_symbol.
81 * symtab.c (symbol_is_function_or_method(minimal_symbol*)): New.
82 (symbol_is_function_or_method(symbol*)): New.
83 (add_symtab_completions): Add complete_symbol_mode parameter. Use
84 completion_skip_symbol.
85 (default_collect_symbol_completion_matches_break_on): Use
86 completion_skip_symbol. Pass down mode.
87 (collect_file_symbol_completion_matches): Pass down mode.
88 * symtab.h (symbol_is_function_or_method): New declarations.
89 (completion_skip_symbol): New template function.
91 2017-11-08 Pedro Alves <palves@redhat.com>
93 * linespec.c (iterate_over_all_matching_symtabs): Add
94 search_domain parameter. Pass it down to expand_symtabs_matching.
95 (decode_objc): Request FUNCTIONS_DOMAIN symbols only.
96 (lookup_prefix_sym): Adjust by passing ALL_DOMAIN as
98 (add_all_symbol_names_from_pspace): Add search_domain parameter.
100 (find_method, find_function_symbols): Request FUNCTIONS_DOMAIN
102 (add_matching_symbols_to_info): Add search_domain parameter. Pass
105 2017-11-08 Pedro Alves <palves@redhat.com>
107 * ada-lang.c (ada_make_symbol_completion_list): Remove text and
108 text_len locals and don't pass them down.
109 * symtab.c (completion_list_add_name): Remove
110 sym_text/sym_text_len parameters and adjust.
111 (completion_list_add_symbol, completion_list_add_msymbol)
112 (completion_list_objc_symbol, completion_list_add_fields)
113 (add_symtab_completions): Likewise.
114 (default_collect_symbol_completion_matches_break_on)
115 (collect_file_symbol_completion_matches): Remove sym_text_len
116 local and don't pass it down.
117 * symtab.h (completion_list_add_name): Remove
118 sym_text/sym_text_len parameters.
120 2017-11-08 Pedro Alves <palves@redhat.com>
122 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
123 unittests/lookup_name_info-selftests.c.
124 (SUBDIR_UNITTESTS_OBS): Add lookup_name_info-selftests.o.
125 * cp-support.c: Include "selftest.h".
126 (cp_remove_params_1): Rename from cp_remove_params. Add
127 'require_param' parameter, and handle it.
128 (cp_remove_params): Reimplement.
129 (cp_remove_params_if_any): New.
130 (selftests::quote): New.
131 (selftests::check_remove_params): New.
132 (selftests::test_cp_remove_params): New.
133 (_initialize_cp_support): Install
134 selftests::test_cp_remove_params.
135 * cp-support.h (cp_remove_params_if_any): Declare.
136 * dwarf2read.c :Include "selftest.h".
137 (dw2_expand_symtabs_matching_symbol): Use
138 lookup_name_info::make_ignore_params.
139 (selftests::dw2_expand_symtabs_matching::mock_mapped_index)
140 (selftests::dw2_expand_symtabs_matching::string_or_null)
141 (selftests::dw2_expand_symtabs_matching::check_match)
142 (selftests::dw2_expand_symtabs_matching::test_symbols)
143 (selftests::dw2_expand_symtabs_matching::run_test): New.
144 (_initialize_dwarf2_read): Register
145 selftests::dw2_expand_symtabs_matching::run_test.
146 * psymtab.c (psym_expand_symtabs_matching): Use
147 lookup_name_info::make_ignore_params.
148 * symtab.c (demangle_for_lookup_info::demangle_for_lookup_info):
149 If the lookup name wants to ignore parameters, strip them.
150 (compare_symbol_name): Remove sym_text/sym_text_len parameters and
152 (completion_list_add_name): Don't pass down sym_text/sym_text_len.
153 (default_collect_symbol_completion_matches_break_on): Don't try to
155 * symtab.h (lookup_name_info::lookup_name_info): Add
156 'ignore_parameters' parameter.
157 (lookup_name_info::ignore_parameters)
158 (lookup_name_info::make_ignore_params): New methods.
159 (lookup_name_info::m_ignore_parameters): New field.
160 * unittests/lookup_name_info-selftests.c: New file.
162 2017-11-08 Pedro Alves <palves@redhat.com>
164 * dwarf2read.c (dw2_expand_marked_cus)
165 (dw2_expand_symtabs_matching_symbol): Remove forward declarations.
166 (dw2_expand_symtabs_matching): Move further below.
167 (dw2_expand_marked_cus): Reindent.
169 2017-11-08 Pedro Alves <palves@redhat.com>
171 * dwarf2read.c (byte_swap, MAYBE_SWAP): Move higher up in file.
172 (struct name_component): New.
173 (mapped_index::name_components): New field.
174 (mapped_index::symbol_name_at): New method.
175 (dwarf2_read_index): Call mapped_index ctor.
176 (dw2_map_matching_symbols): Add comment about name_components
178 (dw2_expand_symtabs_matching): Factor part to...
179 (dw2_expand_symtabs_matching_symbol): ... this new function.
180 Build name components table, and lookup symbols in it before
181 calling the name matcher.
182 (dw2_expand_marked_cus): New, factored out from
183 dw2_expand_symtabs_matching.
184 (dwarf2_per_objfile_free): Call the mapped_index's dtor.
186 2017-11-08 Pedro Alves <palves@redhat.com>
188 * ada-lang.c (ada_encode): Rename to ..
189 (ada_encode_1): ... this. Add throw_errors parameter and handle
191 (ada_encode): Reimplement.
192 (match_name): Delete, folded into full_name.
193 (resolve_subexp): No longer pass the encoded name to
194 ada_lookup_symbol_list.
195 (should_use_wild_match): Delete.
196 (name_match_type_from_name): New.
197 (ada_lookup_simple_minsym): Use lookup_name_info and the
198 language's symbol_name_matcher_ftype.
199 (add_symbols_from_enclosing_procs, ada_add_local_symbols)
200 (ada_add_block_renamings): Adjust to use lookup_name_info.
201 (ada_lookup_name): New.
202 (add_nonlocal_symbols, ada_add_all_symbols)
203 (ada_lookup_symbol_list_worker, ada_lookup_symbol_list)
204 (ada_iterate_over_symbols): Adjust to use lookup_name_info.
205 (ada_name_for_lookup): Delete.
206 (ada_lookup_encoded_symbol): Construct a verbatim name.
207 (wild_match): Reverse sense of return type. Use bool.
208 (full_match): Reverse sense of return type. Inline bits of old
210 (ada_add_block_symbols): Adjust to use lookup_name_info.
211 (symbol_completion_match): Delete, folded into...
212 (ada_lookup_name_info::matches): ... .this new method.
213 (symbol_completion_add): Delete.
214 (ada_collect_symbol_completion_matches): Add name_match_type
215 parameter. Adjust to use lookup_name_info and
216 completion_list_add_name.
217 (get_var_value, ada_add_global_exceptions): Adjust to use
219 (ada_get_symbol_name_cmp): Delete.
220 (do_wild_match, do_full_match): New functions.
221 (ada_lookup_name_info::ada_lookup_name_info): New method.
222 (ada_symbol_name_matches, ada_get_symbol_name_matcher): New
224 (ada_language_defn): Install ada_get_symbol_name_matcher.
225 * ada-lex.l (processId): If name starts with '<', copy it
227 * block.c (block_iter_match_step, block_iter_match_first)
228 (block_iter_match_next, block_lookup_symbol)
229 (block_lookup_symbol_primary, block_find_symbol): Adjust to use
231 * block.h (block_iter_match_first, block_iter_match_next)
232 (ALL_BLOCK_SYMBOLS_WITH_NAME): Adjust to use lookup_name_info.
233 * c-lang.c (c_language_defn, cplus_language_defn)
234 (asm_language_defn, minimal_language_defn): Adjust comments to
235 refer to la_get_symbol_name_matcher.
236 * completer.c (complete_files_symbols)
237 (collect_explicit_location_matches, symbol_completer): Pass a
238 symbol_name_match_type down.
239 * completer.h (class completion_match, completion_match_result):
241 (completion_tracker::reset_completion_match_result): New method.
242 (completion_tracker::m_completion_match_result): New field.
243 * cp-support.c (make_symbol_overload_list_block): Adjust to use
245 (cp_fq_symbol_name_matches, cp_get_symbol_name_matcher): New
247 * cp-support.h (cp_get_symbol_name_matcher): New declaration.
248 * d-lang.c: Adjust comments to refer to
249 la_get_symbol_name_matcher.
250 * dictionary.c (dict_vector) <iter_match_first, iter_match_next>:
251 Adjust to use lookup_name_info.
252 (dict_iter_match_first, dict_iter_match_next)
253 (iter_match_first_hashed, iter_match_next_hashed)
254 (iter_match_first_linear, iter_match_next_linear): Adjust to work
255 with a lookup_name_info.
256 * dictionary.h (dict_iter_match_first, dict_iter_match_next):
258 * dwarf2read.c (dw2_lookup_symbol): Adjust to use lookup_name_info.
259 (dw2_map_matching_symbols): Adjust to use symbol_name_match_type.
260 (gdb_index_symbol_name_matcher): New class.
261 (dw2_expand_symtabs_matching) Adjust to use lookup_name_info and
262 gdb_index_symbol_name_matcher. Accept a NULL symbol_matcher.
263 * f-lang.c (f_collect_symbol_completion_matches): Adjust to work
264 with a symbol_name_match_type.
265 (f_language_defn): Adjust comments to refer to
266 la_get_symbol_name_matcher.
267 * go-lang.c (go_language_defn): Adjust comments to refer to
268 la_get_symbol_name_matcher.
269 * language.c (default_symbol_name_matcher)
270 (language_get_symbol_name_matcher): New functions.
271 (unknown_language_defn, auto_language_defn): Adjust comments to
272 refer to la_get_symbol_name_matcher.
273 * language.h (symbol_name_cmp_ftype): Delete.
274 (language_defn) <la_collect_symbol_completion_matches>: Add match
276 <la_get_symbol_name_cmp>: Delete field.
277 <la_get_symbol_name_matcher>: New field.
278 <la_iterate_over_symbols>: Adjust to use lookup_name_info.
279 (default_symbol_name_matcher, language_get_symbol_name_matcher):
281 * linespec.c (iterate_over_all_matching_symtabs)
282 (iterate_over_file_blocks): Adjust to use lookup_name_info.
283 (find_methods): Add language parameter, and use lookup_name_info
284 and the language's symbol_name_matcher_ftype.
285 (linespec_complete_function): Adjust.
286 (lookup_prefix_sym): Use lookup_name_info.
287 (add_all_symbol_names_from_pspace): Adjust.
288 (find_superclass_methods): Add language parameter and pass it
290 (find_method): Pass symbol language down.
291 (find_linespec_symbols): Don't demangle or Ada encode here.
292 (search_minsyms_for_name): Add lookup_name_info parameter.
293 (add_matching_symbols_to_info): Add name_match_type parameter.
294 Use lookup_name_info.
295 * m2-lang.c (m2_language_defn): Adjust comments to refer to
296 la_get_symbol_name_matcher.
297 * minsyms.c: Include <algorithm>.
298 (add_minsym_to_demangled_hash_table): Remove table parameter and
299 add objfile parameter. Use search_name_hash, and add language to
300 demangled languages vector.
301 (struct found_minimal_symbols): New struct.
302 (lookup_minimal_symbol_mangled, lookup_minimal_symbol_demangled):
304 (lookup_minimal_symbol): Adjust to use them. Don't canonicalize
305 input names here. Use lookup_name_info instead. Lookup up
306 demangled names once for each language in the demangled names
308 (iterate_over_minimal_symbols): Use lookup_name_info. Lookup up
309 demangled names once for each language in the demangled names
311 (build_minimal_symbol_hash_tables): Adjust.
312 * minsyms.h (iterate_over_minimal_symbols): Adjust to pass down a
314 * objc-lang.c (objc_language_defn): Adjust comment to refer to
315 la_get_symbol_name_matcher.
316 * objfiles.h: Include <vector>.
317 (objfile_per_bfd_storage) <demangled_hash_languages>: New field.
318 * opencl-lang.c (opencl_language_defn): Adjust comment to refer to
319 la_get_symbol_name_matcher.
320 * p-lang.c (pascal_language_defn): Adjust comment to refer to
321 la_get_symbol_name_matcher.
322 * psymtab.c (psym_lookup_symbol): Use lookup_name_info.
323 (match_partial_symbol): Use symbol_name_match_type,
324 lookup_name_info and psymbol_name_matches.
325 (lookup_partial_symbol): Use lookup_name_info.
326 (map_block): Use symbol_name_match_type and lookup_name_info.
327 (psym_map_matching_symbols): Use symbol_name_match_type.
328 (psymbol_name_matches): New.
329 (recursively_search_psymtabs): Use lookup_name_info and
330 psymbol_name_matches. Rename 'kind' parameter to 'domain'.
331 (psym_expand_symtabs_matching): Use lookup_name_info. Rename
332 'kind' parameter to 'domain'.
333 * rust-lang.c (rust_language_defn): Adjust comment to refer to
334 la_get_symbol_name_matcher.
335 * symfile-debug.c (debug_qf_map_matching_symbols)
336 (debug_qf_map_matching_symbols): Use symbol_name_match_type.
337 (debug_qf_expand_symtabs_matching): Use lookup_name_info.
338 * symfile.c (expand_symtabs_matching): Use lookup_name_info.
339 * symfile.h (quick_symbol_functions) <map_matching_symbols>:
340 Adjust to use symbol_name_match_type.
341 <expand_symtabs_matching>: Adjust to use lookup_name_info.
342 (expand_symtabs_matching): Adjust to use lookup_name_info.
343 * symmisc.c (maintenance_expand_symtabs): Use
344 lookup_name_info::match_any ().
345 * symtab.c (symbol_matches_search_name): New.
346 (eq_symbol_entry): Adjust to use lookup_name_info and the
348 (demangle_for_lookup_info::demangle_for_lookup_info): New.
349 (lookup_name_info::match_any): New.
350 (iterate_over_symbols, search_symbols): Use lookup_name_info.
351 (compare_symbol_name): Add language, lookup_name_info and
352 completion_match_result parameters, and use them.
353 (completion_list_add_name): Make extern. Add language and
354 lookup_name_info parameters. Use them.
355 (completion_list_add_symbol, completion_list_add_msymbol)
356 (completion_list_objc_symbol): Add lookup_name_info parameters and
357 adjust. Pass down language.
358 (completion_list_add_fields): Add lookup_name_info parameters and
359 adjust. Pass down language.
360 (add_symtab_completions): Add lookup_name_info parameters and
362 (default_collect_symbol_completion_matches_break_on): Add
363 name_match_type parameter, and use it. Use lookup_name_info.
364 (default_collect_symbol_completion_matches)
365 (collect_symbol_completion_matches): Add name_match_type
366 parameter, and pass it down.
367 (collect_symbol_completion_matches_type): Adjust.
368 (collect_file_symbol_completion_matches): Add name_match_type
369 parameter, and use lookup_name_info.
370 * symtab.h: Include <string> and "common/gdb_optional.h".
371 (enum class symbol_name_match_type): New.
372 (class ada_lookup_name_info): New.
373 (struct demangle_for_lookup_info): New.
374 (class lookup_name_info): New.
375 (symbol_name_matcher_ftype): New.
376 (SYMBOL_MATCHES_SEARCH_NAME): Use symbol_matches_search_name.
377 (symbol_matches_search_name): Declare.
378 (MSYMBOL_MATCHES_SEARCH_NAME): Delete.
379 (default_collect_symbol_completion_matches)
380 (collect_symbol_completion_matches)
381 (collect_file_symbol_completion_matches): Add name_match_type
383 (iterate_over_symbols): Use lookup_name_info.
384 (completion_list_add_name): Declare.
385 * utils.c (enum class strncmp_iw_mode): Moved to utils.h.
386 (strncmp_iw_with_mode): Now extern.
387 * utils.h (enum class strncmp_iw_mode): Moved from utils.c.
388 (strncmp_iw_with_mode): Declare.
390 2017-11-08 Keith Seitz <keiths@redhat.com>
391 Pedro Alves <palves@redhat.com>
393 * ada-lang.c (ada_language_defn): Install
394 default_search_name_hash.
395 * buildsym.c (struct buildsym_compunit): <language>: New field.
396 (finish_block_internal): Pass language when creating dictionaries.
397 (start_buildsym_compunit, start_symtab): New language parameters.
399 (restart_symtab): Pass down compilation unit's language.
400 * buildsym.h (enum language): Forward declare.
401 (start_symtab): New 'language' parameter.
402 * c-lang.c (c_language_defn, cplus_language_defn)
403 (asm_language_defn, minimal_language_defn): Install
404 default_search_name_hash.
405 * coffread.c (coff_start_symtab): Adjust.
406 * d-lang.c (d_language_defn): Install default_search_name_hash.
407 * dbxread.c (struct symloc): Add 'pst_language' field.
408 (PST_LANGUAGE): Define.
409 (start_psymtab, read_ofile_symtab): Use it.
410 (process_one_symbol): New 'language' parameter. Pass it down.
411 * dictionary.c (struct dictionary) <language>: New field.
412 (DICT_LANGUAGE): Define.
413 (dict_create_hashed, dict_create_hashed_expandable)
414 (dict_create_linear, dict_create_linear_expandable): New parameter
415 'language'. Set the dictionary's language.
416 (iter_match_first_hashed): Adjust to rename.
417 (insert_symbol_hashed): Assert we don't see mismatching
418 languages. Adjust to rename.
419 (dict_hash): Rename to ...
420 (default_search_name_hash): ... this and make extern.
421 * dictionary.h (struct language_defn): Forward declare.
422 (dict_create_hashed): New parameter 'language'.
423 * dwarf2read.c (dwarf2_start_symtab): Pass down language.
424 * f-lang.c (f_language_defn): Install default_search_name_hash.
425 * go-lang.c (go_language_defn): Install default_search_name_hash.
426 * jit.c (finalize_symtab): Pass compunit's language to dictionary
428 * language.c (unknown_language_defn, auto_language_defn):
429 * language.h (language_defn::la_search_name_hash): New field.
430 (default_search_name_hash): Declare.
431 * m2-lang.c (m2_language_defn): Install default_search_name_hash.
432 * mdebugread.c (new_block): New parameter 'language'.
433 * mdebugread.c (parse_symbol): Pass symbol language to block
435 (psymtab_to_symtab_1): Pass down language.
436 (new_symtab): Pass compunit's language to block allocation.
437 * objc-lang.c (objc_language_defn): Install
438 default_search_name_hash.
439 * opencl-lang.c (opencl_language_defn):
440 * p-lang.c (pascal_language_defn): Install
441 default_search_name_hash.
442 * rust-lang.c (rust_language_defn): Install
443 default_search_name_hash.
444 * stabsread.h (enum language): Forward declare.
445 (process_one_symbol): Add 'language' parameter.
446 * symtab.c (search_name_hash): New function.
447 * symtab.h (search_name_hash): Declare.
448 * xcoffread.c (read_xcoff_symtab): Pass language to start_symtab.
450 2017-11-08 Pedro Alves <palves@redhat.com>
452 * cp-name-parser.y (main): Don't initialize extra_chars.
454 2017-11-07 Tom Tromey <tom@tromey.com>
456 * event-top.h (command_handler): Constify.
457 * record-full.c (cmd_record_full_start): Update.
458 * thread.c (thread_apply_all_command): Update.
459 * printcmd.c (eval_command): Update.
460 * mi/mi-main.c (mi_execute_cli_command): Update.
461 (mi_execute_async_cli_command): Update.
462 * tui/tui-stack.c (tui_update_command): Update.
463 * cli/cli-interp.c (safe_execute_command): Constify.
464 * record.c (record_start): Update.
465 (record_start, record_stop, cmd_record_start): Update.
466 * record-btrace.c (cmd_record_btrace_bts_start): Update.
467 (cmd_record_btrace_pt_start): Update.
468 (cmd_record_btrace_start): Update.
469 (cmd_record_btrace_start): Update.
470 * reverse.c (exec_reverse_once): Update.
471 * python/python.c (execute_gdb_command): Don't copy the command.
472 * event-top.c (command_line_handler): Update.
473 (command_handler): Constify.
474 * defs.h (deprecated_call_command_hook): Constify.
475 * cli/cli-script.h (execute_user_command): Constify.
476 * cli/cli-script.c (execute_user_command): Constify.
477 (execute_cmd_pre_hook, execute_cmd_post_hook): Constify.
478 (enum command_control_type): Update.
479 * main.c (catch_command_errors): Remove non-const overload.
480 (catch_command_errors_ftype): Remove.
481 * python/py-cmd.c (cmdpy_function): Constify.
482 * guile/scm-cmd.c (cmdscm_function): Constify.
483 * cli/cli-dump.c (call_dump_func): Constify.
484 * cli/cli-decode.c (do_const_cfunc): Constify.
485 (do_sfunc): Constify.
486 (cmd_func): Constify.
487 * gdbcmd.h (execute_command, execute_command_to_string): Constify.
488 * top.h (execute_command): Constify.
489 * top.c (execute_command): Constify.
490 (execute_command_to_string): Constify.
491 (deprecated_call_command_hook): Constify.
492 * command.h (cmd_func): Constify.
493 * cli/cli-decode.h (struct cmd_list_element) <func>: Constify.
495 2017-11-07 Tom Tromey <tom@tromey.com>
497 * ada-lang.c (catch_ada_exception_command): Constify.
498 (catch_assert_command): Constify.
499 * break-catch-throw.c (catch_catch_command, catch_throw_command)
500 (catch_rethrow_command): Constify.
501 (catch_exception_command_1): Constify.
502 * breakpoint.h (add_catch_command): Constify.
503 * break-catch-syscall.c (catch_syscall_command_1): Constify.
504 (catch_syscall_split_args): Constify.
505 * break-catch-sig.c (catch_signal_command): Constify.
506 (catch_signal_split_args): Constify.
507 * cli/cli-decode.h (struct cmd_list_element) <function>: Use
508 cmd_const_sfunc_ftype.
509 * cli/cli-decode.c (add_setshow_cmd_full): Constify.
510 (add_setshow_enum_cmd, add_setshow_auto_boolean_cmd)
511 (add_setshow_boolean_cmd, add_setshow_filename_cmd)
512 (add_setshow_string_cmd, struct cmd_list_element)
513 (add_setshow_optional_filename_cmd, add_setshow_integer_cmd)
514 (add_setshow_uinteger_cmd, add_setshow_zinteger_cmd)
515 (add_setshow_zuinteger_unlimited_cmd, add_setshow_zuinteger_cmd):
517 (set_cmd_sfunc): Constify.
518 (empty_sfunc): Constify.
519 * command.h (add_setshow_enum_cmd, add_setshow_auto_boolean_cmd)
520 (add_setshow_boolean_cmd, add_setshow_filename_cmd)
521 (add_setshow_string_cmd, add_setshow_string_noescape_cmd)
522 (add_setshow_optional_filename_cmd, add_setshow_integer_cmd)
523 (add_setshow_uinteger_cmd, add_setshow_zinteger_cmd)
524 (add_setshow_zuinteger_cmd, add_setshow_zuinteger_unlimited_cmd):
526 (set_cmd_sfunc): Constify.
527 (cmd_sfunc_ftype): Remove.
528 * compile/compile.c (set_compile_args): Constify.
529 * infrun.c (set_disable_randomization): Constify.
530 * infcmd.c (set_args_command, set_cwd_command): Constify.
531 * breakpoint.c (set_condition_evaluation_mode): Constify.
532 (add_catch_command): Constify.
533 (catch_fork_command_1, catch_exec_command_1)
534 (catch_load_command_1, catch_unload_command_1): Constify.
535 (catch_load_or_unload): Constify.
536 * guile/scm-param.c (pascm_set_func): Constify.
537 (add_setshow_generic): Constify.
538 * python/py-param.c (get_set_value): Constify.
539 * top.h (set_verbose): Constify.
540 * tui/tui-win.c (tui_set_var_cmd): Constify.
541 * mi/mi-main.c (set_mi_async_command): Constify.
542 * cli/cli-logging.c (set_logging_overwrite)
543 (set_logging_redirect): Constify.
544 * value.c (set_max_value_size): Constify.
545 * valprint.c (set_input_radix, set_output_radix): Constify.
546 * utils.c (set_width_command, set_height_command): Constify.
547 * typeprint.c (set_print_type_methods, set_print_type_typedefs): Constify.
548 * tracepoint.c (set_disconnected_tracing)
549 (set_circular_trace_buffer, set_trace_buffer_size)
550 (set_trace_user, set_trace_notes, set_trace_stop_notes): Constify.
551 * top.c (set_history_size_command, set_verbose, set_editing)
552 (set_gdb_datadir, set_history_filename): Constify.
553 * target.c (set_targetdebug, maint_set_target_async_command)
554 (maint_set_target_non_stop_command, set_target_permissions)
555 (set_write_memory_permission): Constify.
556 (open_target): Constify.
557 * target-descriptions.c (set_tdesc_filename_cmd): Constify.
558 * target-dcache.c (set_stack_cache, set_code_cache): Constify.
559 * symtab.c (set_symbol_cache_size_handler): Constify.
560 * symfile.c (set_ext_lang_command): Constify.
561 * symfile-debug.c (set_debug_symfile): Constify.
562 * source.c (set_directories_command): Constify.
563 * solib.c (reload_shared_libraries, gdb_sysroot_changed): Constify.
564 * serial.c (set_parity): Constify.
565 * rs6000-tdep.c (powerpc_set_soft_float, powerpc_set_vector_abi): Constify.
566 * remote.c (set_remote_exec_file, set_remotebreak)
567 (set_remote_protocol_Z_packet_cmd, set_range_stepping): Constify.
568 * record.c (set_record_insn_history_size)
569 (set_record_call_history_size): Constify.
570 * record-full.c (set_record_full_insn_max_num): Constify.
571 * proc-api.c (set_procfs_trace_cmd, set_procfs_file_cmd): Constify.
572 * osabi.c (set_osabi): Constify.
573 * mips-tdep.c (set_mips64_transfers_32bit_regs)
574 (reinit_frame_cache_sfunc, mips_abi_update): Constify.
575 * maint.c (maintenance_set_profile_cmd): Constify.
576 * linux-thread-db.c (set_libthread_db_search_path): Constify.
577 * language.c (set_language_command, set_range_command)
578 (set_case_command): Constify.
579 * infrun.c (set_non_stop, set_observer_mode)
580 (set_stop_on_solib_events, set_schedlock_func)
581 (set_exec_direction_func): Constify.
582 * infcmd.c (set_inferior_tty_command): Constify.
583 * disasm.c (set_disassembler_options_sfunc): Constify.
584 * demangle.c (set_demangling_command): Constify.
585 * dcache.c (set_dcache_size, set_dcache_line_size): Constify.
586 * cris-tdep.c (set_cris_version, set_cris_mode)
587 (set_cris_dwarf2_cfi): Constify.
588 * corefile.c (set_gnutarget_command): Constify.
589 * charset.c (set_host_charset_sfunc, set_target_charset_sfunc)
590 (set_target_wide_charset_sfunc): Constify.
591 * breakpoint.c (update_dprintf_commands): Constify.
592 * auto-load.c (set_auto_load_dir, set_auto_load_safe_path): Constify.
593 * arm-tdep.c (set_fp_model_sfunc, arm_set_abi)
594 (set_disassembly_style_sfunc): Constify.
595 * arch-utils.c (set_endian, set_architecture): Constify.
596 * alpha-tdep.c (reinit_frame_cache_sfunc): Constify.
597 * agent.c (set_can_use_agent): Constify.
599 2017-11-07 Tom Tromey <tom@tromey.com>
601 * go32-nat.c (go32_sysinfo, go32_sldt, go32_sgdt, go32_sidt)
602 (go32_pde, go32_pte, go32_pte_for_address): Constify.
603 * gnu-nat.c (_parse_bool_arg, show_thread_default_pause_cmd)
604 (set_thread_default_pause_cmd, set_thread_default_run_cmd)
605 (show_thread_default_run_cmd, set_thread_default_detach_sc_cmd)
606 (parse_int_arg, show_thread_default_detach_sc_cmd)
607 (set_signals_cmd, show_signals_cmd, set_sig_thread_cmd)
608 (show_sig_thread_cmd, set_stopped_cmd, show_stopped_cmd)
609 (set_exceptions_cmd, show_exceptions_cmd, set_task_pause_cmd)
610 (show_task_pause_cmd, set_task_detach_sc_cmd)
611 (show_task_detach_sc_cmd, set_task_exc_port_cmd)
612 (set_noninvasive_cmd, set_thread_pause_cmd)
613 (show_thread_pause_cmd, set_thread_run_cmd, show_thread_run_cmd)
614 (set_thread_detach_sc_cmd, show_thread_detach_sc_cmd)
615 (set_thread_exc_port_cmd, thread_takeover_sc_cmd): Constify.
616 * windows-nat.c (display_selectors): Constify.
617 * cli/cli-decode.h (struct cmd_list_element) <function>: Remove
619 * cli/cli-decode.c (set_cmd_cfunc): Remove non-const overload.
620 (cmd_cfunc_eq): Likewise.
621 (struct cmd_list_element): Likewise.
623 (cli_user_command_p): Update.
624 * command.h (add_cmd): Remove non-const overload.
625 (cmd_cfunc_ftype): Remove typedef.
626 (cmd_cfunc_eq): Remove non-const overload.
627 * value.c (show_values): Constify.
628 * thread.c (thread_apply_all_command): Constify.
629 * symfile.c (load_command): Constify.
630 * source.c (directory_command): Constify.
631 * maint.c (maintenance_internal_error)
632 (maintenance_demangler_warning, maintenance_space_display)
633 (maintenance_print_architecture, maintenance_translate_address)
634 (maintenance_info_selftests, maintenance_internal_warning):
636 * breakpoint.c (disable_trace_command, enable_trace_command):
638 * auto-load.c (info_auto_load_local_gdbinit, add_auto_load_dir):
640 (add_auto_load_safe_path): Constify.
641 * guile/scm-auto-load.c (info_auto_load_guile_scripts): Constify.
642 * top.h (show_commands): Constify.
643 * linux-thread-db.c (info_auto_load_libthread_db): Constify.
644 * sparc64-tdep.c (adi_examine_command): Constify.
645 (adi_assign_command): Constify.
647 2017-11-07 Tom Tromey <tom@tromey.com>
649 * frame.h (info_locals_command, info_args_command): Constify.
650 * auto-load.h (auto_load_info_scripts): Constify.
651 * inferior.h (registers_info): Constify.
652 * copying.c: Rebuild.
653 * copying.awk: Constify generated commands.
654 * auto-load.c (auto_load_info_scripts)
655 (info_auto_load_gdb_scripts): Constify.
656 * cli/cli-decode.c (struct cmd_list_element): Take a
657 cmd_const_cfunc_ftype.
658 * command.h (add_info): Take a cmd_const_cfunc_ftype.
659 * tui/tui-win.c (tui_all_windows_info): Constify.
660 * python/py-auto-load.c (info_auto_load_python_scripts):
662 * cli/cli-cmds.c (show_command): Remove non-const overload.
663 * tracepoint.c (info_tvariables_command, info_scope_command):
665 (info_static_tracepoint_markers_command): Constify.
666 * thread.c (info_threads_command): Constify.
667 (print_thread_info_1): Constify.
668 * target.c (info_target_command): Constify.
669 * symtab.c (info_sources_command, info_functions_command)
670 (info_types_command): Constify.
671 (info_variables_command): Remove non-const overload.
672 * symfile.c (info_ext_lang_command): Constify.
673 * stack.c (info_frame_command, info_locals_command)
674 (info_args_command): Constify.
675 (backtrace_command): Remove non-const overload.
676 * source.c (info_source_command, info_line_command): Constify.
677 * solib.c (info_sharedlibrary_command): Constify.
678 * skip.c (info_skip_command): Constify.
679 * ser-go32.c (info_serial_command): Constify.
680 * reverse.c (info_bookmarks_command): Constify.
681 * printcmd.c (info_symbol_command, info_address_command)
682 (info_display_command): Constify.
683 * osdata.c (info_osdata_command): Constify.
684 * objc-lang.c (info_selectors_command, info_classes_command):
686 * nto-procfs.c (procfs_pidlist, procfs_meminfo): Constify.
687 * memattr.c (info_mem_command): Constify.
688 * macrocmd.c (info_macro_command, info_macros_command): Constify.
689 * linux-fork.c (info_checkpoints_command): Constify.
690 * infrun.c (info_signals_command): Constify.
691 * inflow.c (info_terminal_command): Constify.
692 * inferior.c (info_inferiors_command): Constify.
693 (print_inferior): Constify.
694 * infcmd.c (info_program_command, info_all_registers_command)
695 (info_registers_command, info_vector_command)
696 (info_float_command): Constify.
697 (registers_info): Constify.
698 * gnu-nat.c (info_send_rights_cmd, info_recv_rights_cmd)
699 (info_port_sets_cmd, info_dead_names_cmd, info_port_rights_cmd):
701 * f-valprint.c (info_common_command): Constify.
702 * dcache.c (info_dcache_command): Constify.
703 (dcache_info_1): Constify.
704 * darwin-nat-info.c (info_mach_tasks_command)
705 (info_mach_task_command, info_mach_ports_command)
706 (info_mach_port_command, info_mach_threads_command)
707 (info_mach_thread_command, info_mach_regions_command)
708 (info_mach_regions_recurse_command, info_mach_region_command)
709 (info_mach_exceptions_command): Constify.
710 (get_task_from_args): Constify.
711 * cp-support.c (info_vtbl_command): Constify.
712 * breakpoint.c (info_watchpoints_command)
713 (info_tracepoints_command): Constify.
714 (info_breakpoints_command): Remove non-const overload.
715 * avr-tdep.c (avr_io_reg_read_command): Constify.
716 * auxv.c (info_auxv_command): Constify.
717 * ada-tasks.c (info_tasks_command): Constify.
718 (info_task): Constify.
719 * ada-lang.c (info_exceptions_command): Constify.
721 2017-11-07 Tom Tromey <tom@tromey.com>
723 * solib.h (no_shared_libraries): Constify.
724 * frame.h (return_command): Constify.
725 * cli/cli-cmds.h (quit_command): Constify.
726 * top.h (quit_command, execute_command): Constify.
727 * target.h (flash_erase_command): Constify.
728 * inferior.h (set_inferior_args, attach_command): Constify.
729 * tracepoint.h (start_tracing, stop_tracing): Constify.
730 * breakpoint.h (break_command, tbreak_command)
731 (hbreak_command_wrapper, thbreak_command_wrapper)
732 (rbreak_command_wrapper, watch_command_wrapper)
733 (awatch_command_wrapper, rwatch_command_wrapper)
734 (get_tracepoint_by_number): Constify.
735 * symtab.c (info_variables_command, rbreak_command)
736 (symtab_symbol_info): Constify.
737 (info_variables_command): Add non-const overload.
738 * top.c (dont_repeat_command): Constify.
739 * breakpoint.c (ignore_command, commands_command)
740 (condition_command, tbreak_command, hbreak_command)
741 (thbreak_command, clear_command, break_command)
742 (info_breakpoints_command, watch_command, rwatch_command)
743 (awatch_command, trace_command, ftrace_command, strace_command)
744 (trace_pass_command, break_range_command, dprintf_command)
745 (agent_printf_command, get_tracepoint_by_number)
746 (watch_maybe_just_location, trace_pass_command): Constify.
747 (info_breakpoints_command): Add non-const overload.
748 * tracefile.c (tsave_command): Constify.
749 * infcmd.c (attach_command, disconnect_command, signal_command)
750 (queue_signal_command, stepi_command, nexti_command)
751 (finish_command, next_command, step_command, until_command)
752 (advance_command, jump_command, continue_command, run_command)
753 (start_command, starti_command, interrupt_command)
754 (run_command_1, set_inferior_args, step_1): Constify.
755 * inferior.c (add_inferior_command, remove_inferior_command)
756 (clone_inferior_command): Constify.
757 * linux-fork.c (checkpoint_command, restart_command): Constify.
758 * windows-nat.c (signal_event_command): Constify.
759 * guile/guile.c (guile_repl_command, guile_command): Constify.
760 * printcmd.c (x_command, display_command, printf_command)
761 (output_command, set_command, call_command, print_command)
762 (eval_command): Constify.
763 (non_const_set_command): Remove.
764 (_initialize_printcmd): Update.
765 * source.c (forward_search_command, reverse_search_command):
767 * jit.c (jit_reader_load_command, jit_reader_unload_command):
769 * infrun.c (handle_command): Constify.
770 * memattr.c (mem_command): Constify.
771 * stack.c (return_command, up_command, up_silently_command)
772 (down_command, down_silently_command, frame_command)
773 (backtrace_command, func_command, backtrace_command_1): Constify.
774 (backtrace_command): Add non-const overload.
775 * remote-sim.c (simulator_command): Constify.
776 * exec.c (set_section_command): Constify.
777 * tracepoint.c (tdump_command, trace_variable_command)
778 (tstatus_command, tstop_command, tstart_command)
779 (end_actions_pseudocommand, while_stepping_pseudocommand)
780 (collect_pseudocommand, teval_pseudocommand, actions_command)
781 (start_tracing, stop_tracing): Constify.
782 * value.c (init_if_undefined_command): Constify.
783 * tui/tui-stack.c (tui_update_command): Constify.
784 * tui/tui-win.c (tui_refresh_all_command)
785 (tui_set_tab_width_command, tui_set_win_height_command)
786 (tui_set_focus_command, tui_scroll_forward_command)
787 (tui_scroll_backward_command, tui_scroll_left_command)
788 (tui_scroll_right_command, parse_scrolling_args, tui_set_focus)
789 (tui_set_win_height): Constify.
790 * tui/tui-layout.c (tui_layout_command): Constify.
791 * procfs.c (proc_trace_syscalls, proc_trace_sysentry_cmd)
792 (proc_trace_sysexit_cmd, proc_untrace_sysentry_cmd)
793 (proc_untrace_sysexit_cmd): Constify.
794 * remote.c (threadlist_test_cmd, threadinfo_test_cmd)
795 (threadset_test_cmd, threadlist_update_test_cmd)
796 (threadalive_test): Constify.
797 * objc-lang.c (print_object_command): Constify.
798 * command.h (add_com): Constify.
799 * cli/cli-dump.c (restore_command): Constify.
800 * cli/cli-cmds.c (pwd_command, echo_command, quit_command)
801 (help_command, complete_command, shell_command, edit_command)
802 (list_command, disassemble_command, make_command)
803 (apropos_command, alias_command): Constify.
804 * cli/cli-script.c (document_command, define_command)
805 (while_command, if_command, validate_comname): Constify.
806 * cli/cli-decode.c (struct cmd_list_element): Change type of
808 * target.c (do_monitor_command, flash_erase_command): Constify.
809 * regcache.c (reg_flush_command): Constify.
810 * reverse.c (reverse_step, reverse_next, reverse_stepi)
811 (reverse_nexti, reverse_continue, reverse_finish)
812 (save_bookmark_command, goto_bookmark_command)
813 (exec_reverse_once): Constify.
814 * python/python.c (python_interactive_command, python_command):
816 * typeprint.c (ptype_command, whatis_command, whatis_exp):
818 * solib.c (sharedlibrary_command, no_shared_libraries): Constify.
819 * gcore.c (gcore_command): Constify.
821 2017-11-07 Tom Tromey <tom@tromey.com>
823 * printcmd.c (x_command): Call set_repeat_arguments.
824 * cli/cli-cmds.c (list_command): Call set_repeat_arguments.
825 * top.c (repeat_arguments): New global.
826 (set_repeat_arguments): New function.
827 (execute_command): Handle repeat_arguments.
828 (show_commands): Calls set_repeat_arguments.
829 * command.h (set_repeat_arguments): Declare.
831 2017-11-07 Tom Tromey <tom@tromey.com>
833 * stack.c (backtrace_command): Use std::string.
834 (backtrace_command_1): Make "count_exp" const.
836 2017-11-07 Tom Tromey <tom@tromey.com>
838 * source.c (directory_switch, mod_path, add_path): Constify.
839 * defs.h (add_path, mod_path, directory_switch): Constify.
840 * mi/mi-cmd-env.c (env_mod_path): Constify.
842 2017-11-07 Tom Tromey <tom@tromey.com>
844 * infcmd.c (strip_bg_char): Return gdb::unique_xmalloc_ptr.
845 (run_command_1, continue_command, step_1, jump_command)
846 (signal_command, until_command, advance_command, finish_command)
847 (attach_command): Update.
849 2017-11-07 Tom Tromey <tom@tromey.com>
851 * command.h (set_cmd_cfunc): Don't declare.
852 * cli/cli-decode.c (set_cmd_cfunc): Now static.
854 2017-11-07 Tom Tromey <tom@tromey.com>
856 * stack.c (select_frame_command): Constify.
857 * cli/cli-decode.c (add_com_suppress_notification): Constify.
858 * command.h (add_com_suppress_notification): Constify.
860 2017-11-07 Tom Tromey <tom@tromey.com>
862 * breakpoint.c (stop_command): Constify.
863 * cli/cli-decode.c (struct cmd_list_element): Constify.
864 * command.h (add_abbrev_prefix_cmd): Constify.
866 2017-11-07 Pedro Alves <palves@redhat.com>
868 * breakpoint.c (extract_bp_kind): New enum.
869 (extract_bp_num, extract_bp_or_bp_range): New functions, partially
870 factored out from ...
871 (extract_bp_number_and_location): ... here.
872 * cli/cli-utils.c (get_number_trailer): Handle '-$variable'.
874 2017-11-07 Pedro Alves <palves@redhat.com>
876 * breakpoint.c (extract_bp_number_and_location): Change return
877 type to void. Throw error instead of warning.
878 (enable_disable_command): Adjust.
880 2017-11-07 Xavier Roirand <roirand@adacore.com>
881 Pedro Alves <palves@redhat.com>
883 * breakpoint.c (map_breakpoint_number_range): New, factored out
885 (map_breakpoint_numbers): ... here.
886 (find_location_by_number): Change parameters from string to
887 breakpoint number and location.
888 (extract_bp_number_and_location): New function.
889 (enable_disable_bp_num_loc)
890 (enable_disable_breakpoint_location_range)
891 (enable_disable_command): New functions, factored out ...
892 (enable_command, disable_command): ... these functions, and
893 adjusted to support ranges.
894 * NEWS: Document enable/disable breakpoint location range feature.
896 2017-11-06 Luis Machado <luis.machado@linaro.org>
898 * MAINTAINERS (Write After Approval): Update my e-mail address.
900 2017-11-06 Pedro Alves <palves@redhat.com>
902 * gnu-nat.c (gnu_terminal_init): Delete.
903 (gnu_target): Don't install gnu_terminal_init.
904 * inflow.c (child_terminal_init_with_pgrp): Delete, merged with ...
905 (child_terminal_init): ... this function.
907 2017-11-06 Pedro Alves <palves@redhat.com>
909 * common/common.m4 (GDB_AC_COMMON): No longer check termio.h nor
911 * config.in, configure: Regenerate.
913 2017-11-06 Pedro Alves <palves@redhat.com>
915 * event-top.c: Check SIGTSTP instead of STOP_SIGNAL thoughout.
916 (async_init_signals): Adjust.
917 (handle_stop_sig): Rename to ...
918 (handle_sigtstp): ... this.
919 (async_stop_sig): Rename to ...
920 (async_sigtstp_handler): ... this, and delete STOP_SIGNAL !=
922 * event-top.h: Move signal.h include to the top. Check SIGTSTP
923 instead of STOP_SIGNAL thoughout.
924 (handle_stop_sig): Rename to ...
925 (handle_sigtstp): ... this.
926 * top.c (command_line_input): Replace STOP_SIGNAL -> SIGTSTP.
928 2017-11-06 Pedro Alves <palves@redhat.com>
930 * inflow.c (child_terminal_inferior, child_terminal_ours_1): No
931 longer set flags twice in row.
933 2017-11-06 Pedro Alves <palves@redhat.com>
935 * Makefile.in (SER_HARDWIRE): Update comment.
936 (HFILES_NO_SRCDIR): Remove gdb_termios.h.
937 * common/gdb_termios.h: Delete file.
938 * common/job-control.c: Include termios.h and unistd.h instead of
940 (gdb_setpgid): Remove HAVE_TERMIOS || TIOCGPGRP preprocessor
942 (have_job_control): Check HAVE_TERMIOS_H instead of HAVE_TERMIOS.
944 * configure.ac: No longer check for termio.h and sgtty.h.
945 * configure: Regenerate.
946 * inflow.c: Include termios.h instead of gdb_termios.h. Replace
947 PROCESS_GROUP_TYPE checks with HAVE_TERMIOS_H checks throughout.
948 Replace PROCESS_GROUP_TYPE references with pid_t references
950 (gdb_getpgrp): Delete.
951 (set_initial_gdb_ttystate): Use tcgetpgrp instead of gdb_getpgrp.
952 (child_terminal_inferior): Remove comment. Remove sgtty code.
953 (child_terminal_ours_1): Use tcgetpgrp directly instead of
954 gdb_getpgrp. Use serial_set_tty_state instead aof
955 serial_noflush_set_tty_state. Remove sgtty code.
956 * inflow.h: Include unistd.h instead of gdb_termios.h. Replace
957 PROCESS_GROUP_TYPE check with HAVE_TERMIOS_H check.
958 (inferior_process_group): Now returns pid_t.
959 * ser-base.c (ser_base_noflush_set_tty_state): Delete.
960 * ser-base.h (ser_base_noflush_set_tty_state): Delete.
961 * ser-event.c (serial_event_ops): Update.
962 * ser-go32.c (dos_noflush_set_tty_state): Delete.
964 * ser-mingw.c (hardwire_ops, tty_ops, pipe_ops, tcp_ops): Update.
965 * ser-pipe.c (pipe_ops): Update.
966 * ser-tcp.c (tcp_ops): Update.
967 * ser-unix.c: Include termios.h instead of gdb_termios.h. Remove
969 [HAVE_TERMIO] (struct hardwire_ttystate): Delete.
970 [HAVE_SGTTY] (struct hardwire_ttystate): Delete.
971 (get_tty_state, set_tty_state): Drop termio and sgtty code, and
973 (hardwire_noflush_set_tty_state): Delete.
974 (hardwire_print_tty_state, hardwire_drain_output)
975 (hardwire_flush_output, hardwire_flush_input)
976 (hardwire_send_break, hardwire_raw, hardwire_setbaudrate)
977 (hardwire_setstopbits, hardwire_setparity): Drop termio and sgtty
978 code, and assume termios.
979 (hardwire_ops): Update.
980 (_initialize_ser_hardwire): Remove HAVE_TERMIOS check.
981 * serial.c (serial_noflush_set_tty_state): Delete.
982 * serial.h (serial_noflush_set_tty_state): Delete.
983 (serial_ops::noflush_set_tty_state): Delete.
985 2017-11-06 Ulrich Weigand <uweigand@de.ibm.com>
987 * Makefile.in (SFILES): Remove doublest.c and dfp.c.
988 (HFILES_NO_SRCDIR): Remove doublest.h and dfp.h.
989 (COMMON_OBS): Remove doublest.o and dfp.o.
990 Do not build target-float.c (instead of doublest.c)
991 with -Wformat-nonliteral.
993 * doublest.c: Remove file.
994 * doublest.h: Remove file.
995 * dfp.c: Remove file.
996 * dfp.h: Remove file.
998 * target-float.c: Do not include "doublest.h" and "dfp.h".
999 (DOUBLEST): Move here from doublest.h.
1000 (enum float_kind): Likewise.
1001 (FLOATFORMAT_CHAR_BIT): Likewise.
1002 (FLOATFORMAT_LARGEST_BYTES): Likewise.
1003 (floatformat_totalsize_bytes): Move here from doublest.c. Make static.
1004 (floatformat_precision): Likewise.
1005 (floatformat_normalize_byteorder, get_field, put_field): Likewise.
1006 (floatformat_is_negative, floatformat_classify, floatformat_mantissa):
1008 (host_float_format, host_double_format, host_long_double_format):
1010 (floatformat_to_string, floatformat_from_string): Likewise.
1011 (floatformat_to_doublest): Likewise. Also, inline the original
1012 convert_floatformat_to_doublest.
1013 (floatformat_from_doublest): Likewise. Also, inline the original
1014 convert_floatformat_from_doublest.
1016 Include "dpd/decimal128.h", "dpd/decimal64.h", and "dpd/decimal32.h".
1017 (MAX_DECIMAL_STRING): Move here from dfp.c.
1018 (match_endianness): Likewise.
1019 (set_decnumber_context, decimal_check_errors): Likewise.
1020 (decimal_from_number, decimal_to_number): Likewise.
1021 (decimal_to_string, decimal_from_string): Likewise. Make static.
1022 (decimal_from_longest, decimal_from_ulongest): Likewise.
1023 (decimal_to_longest): Likewise.
1024 (decimal_binop, decimal_is_zero, decimal_compare): Likewise.
1025 (decimal_convert): Likewise.
1027 2017-11-06 Ulrich Weigand <uweigand@de.ibm.com>
1029 * doublest.c: Do not include "gdbtypes.h".
1030 (extract_typed_floating): Remove.
1031 (store_typed_floating): Remove.
1032 (convert_typed_floating): Remove.
1033 * doublest.h (struct type): Remove.
1034 (DOUBLEST_PRINT_FORMAT): Remove.
1035 (DOUBLEST_SCAN_FORMAT): Remove.
1036 (extract_typed_floating): Remove.
1037 (store_typed_floating): Remove.
1038 (convert_typed_floating): Remove.
1040 * dfp.c (decimal_from_doublest): Remove.
1041 (decimal_to_doublest): Remove.
1042 * dfp.h: Do not include "doublest.h".
1043 (decimal_from_doublest): Remove.
1044 (decimal_to_doublest): Remove.
1046 * value.c: Do not include "doublest.h" and "dfp.h".
1047 (value_as_double): Remove.
1048 (unpack_double): Remove.
1049 (value_from_double): Remove.
1050 (value_from_decfloat): Remove.
1051 * value.h: Do not include "doublest.h".
1052 (value_as_double): Remove.
1053 (unpack_double): Remove.
1054 (value_from_double): Remove.
1055 (value_from_decfloat): Remove.
1057 2017-11-06 Ulrich Weigand <uweigand@de.ibm.com>
1059 * i386-tdep.c: Include "target-float.h". Do not include "doublest.h".
1060 (i386_extract_return_value): Use target_float_convert.
1061 (i386_store_return_value): Likewise.
1062 * i387-tdep.c (i387_register_to_value): Use target_float_convert.
1063 (i387_value_to_register): Likewise.
1064 * ia64-tdep.c: Include "target-float.h". Do not include "doublest.h".
1065 (ia64_register_to_value): Use target_float_convert.
1066 (ia64_value_to_register): Likewise.
1067 (ia64_extract_return_value): Likewise.
1068 (ia64_store_return_value): Likewise.
1069 (ia64_push_dummy_call): Likewise.
1070 * m68k-tdep.c: Include "target-float.h".
1071 (m68k_register_to_value): Use target_float_convert.
1072 (m68k_value_to_register): Likewise.
1073 (m68k_svr4_extract_return_value): Likewise.
1074 (m68k_svr4_store_return_value): Likewise.
1075 * ppc-sysv-tdep.c: Include "target-float.h".
1076 (ppc_sysv_abi_push_dummy_call): Use target_float_convert.
1077 (do_ppc_sysv_return_value): Likewise.
1078 (ppc64_sysv_abi_push_freg): Likewise.
1079 (ppc64_sysv_abi_return_value_base): Likewise.
1080 * rs6000-aix-tdep.c: Include "target-float.h".
1081 (rs6000_push_dummy_call): Use target_float_convert.
1082 (rs6000_return_value): Likewise.
1083 * rs6000-lynx178-tdep.c: Include "target-float.h".
1084 (rs6000_lynx178_push_dummy_call): Use target_float_convert.
1085 (rs6000_lynx178_return_value): Likewise.
1086 * rs6000-tdep.c: Include "target-float.h". Do not include "doublest.h".
1087 (rs6000_register_to_value): Use target_float_convert.
1088 (rs6000_value_to_register): Likewise.
1089 * arm-tdep.c: Include "target-float.h". Do not include "doublest.h".
1090 (arm_extract_return_value): Use target_float_convert.
1091 (arm_store_return_value): Likewise.
1092 * sh-tdep.c: Include "target-float.h". Do not include "doublest.h".
1093 (sh_register_convert_to_virtual): Use target_float_convert.
1094 (sh_register_convert_to_raw): Likewise.
1095 * sh64-tdep.c: Include "target-float.h".
1096 (sh64_extract_return_value): Use target_float_convert.
1097 (sh64_register_convert_to_virtual): Likewise.
1098 (sh64_register_convert_to_raw): Likewise. Fix argument types.
1100 2017-11-06 Ulrich Weigand <uweigand@de.ibm.com>
1102 * target-float.c (floatformat_to_host_double): New function.
1103 (floatformat_from_host_double): Likewise.
1104 (target_float_to_host_double): Likewise.
1105 (target_float_from_host_double): Likewise.
1106 * target-float.h (target_float_to_host_double): Add prototype.
1107 (target_float_from_host_double): Likewise.
1109 * guile/scm-value.c: Include "target-float.h".
1110 (gdbscm_value_to_real): Use target_float_to_host_double.
1111 Handle integer source values via value_as_long.
1112 * guile/scm-math.c: Include "target-float.h". Do not include
1113 "doublest.h", "dfp.h", and "expression.h".
1114 (vlscm_convert_typed_number): Use target_float_from_host_double.
1115 (vlscm_convert_number): Likewise.
1117 * python/py-value.c (valpy_float): Use target_float_to_host_double.
1118 (convert_value_from_python): Use target_float_from_host_double.
1120 2017-11-06 Ulrich Weigand <uweigand@de.ibm.com>
1122 * ada-lang.c (cast_to_fixed): Reimplement in target arithmetic.
1123 (cast_from_fixed): Likewise.
1124 (ada_scaling_type): New function.
1125 (ada_delta): Return value instead of DOUBLEST. Perform target
1126 arithmetic instead of host arithmetic.
1127 (scaling_factor): Rename to ...
1128 (ada_scaling_factor) ... this. Make non-static. Return value instead
1129 of DOUBLEST. Perform target arithmetic instead of host arithmetic.
1130 (ada_fixed_to_float): Remove.
1131 (ada_float_to_fixed): Remove.
1132 * ada-lang.h (ada_fixed_to_float): Remove.
1133 (ada_float_to_fixed): Remove.
1134 (ada_delta): Return value instead of DOUBLEST.
1135 (ada_scaling_factor): Add prototype.
1137 * ada-typeprint.c: Include "target-float.h".
1138 (print_fixed_point_type): Perform target arithmetic instead of
1140 * ada-valprint.c: Include "target-float.h".
1141 (ada_val_print_num): Perform target arithmetic instead of
1142 host arithmetic for fixed-point types.
1144 2017-11-06 Ulrich Weigand <uweigand@de.ibm.com>
1146 * target-float.c: Include <math.h>.
1147 (floatformat_binop): New function.
1148 (floatformat_compare): Likewise.
1149 (target_float_binop): Likewise.
1150 (target_float_compare): Likewise.
1151 * target-float.h: Include "expression.h".
1152 (target_float_binop): Add prototype.
1153 (target_float_compare): Likewise.
1155 * valarith.c: Do not include "doublest.h" and "dfp.h".
1156 Include "common/byte-vector.h".
1157 (value_args_as_decimal): Remove, replace by ...
1158 (value_args_as_target_float): ... this function. Handle both
1159 binary and decimal target floating-point formats.
1160 (scalar_binop): Handle both binary and decimal FP using
1161 value_args_as_target_float and target_float_binop.
1162 (value_equal): Handle both binary and decimal FP using
1163 value_args_as_target_float and target_float_compare.
1164 (value_less): Likewise.
1165 (value_pos): Handle all scalar types as simple copy.
1166 (value_neg): Handle all scalar types via BINOP_SUB from 0.
1167 * dfp.c (decimal_binop): Throw error instead of internal_error
1168 when called with an unsupported operation code.
1170 2017-11-06 Ulrich Weigand <uweigand@de.ibm.com>
1172 * target-float.c (target_float_to_string): New function.
1173 (target_float_from_string): New function.
1174 * target-float.h (target_float_to_string): Add prototype.
1175 (target_float_from_string): Add prototype.
1177 * valprint.c: Include "target-float.h". Do not include
1178 "doublest.h" and "dfp.h".
1179 (print_floating): Use target_float_to_string.
1180 * printcmd.c: Include "target-float.h". Do not include "dfp.h".
1181 (printf_floating): Use target_float_to_string.
1182 * i387-tdep.c: Include "target-float.h". Do not include "doublest.h".
1183 (print_i387_value): Use target_float_to_string.
1184 * mips-tdep.c: Include "target-float.h".
1185 (mips_print_fp_register): Use target_float_to_string.
1186 * sh64-tdep.c: Include "target-float.h".
1187 (sh64_do_fp_register): Use target_float_to_string.
1189 * parse.c: Include "target-float.h". Do not include
1190 "doublest.h" and "dfp.h".
1191 (parse_float): Use target_float_from_string.
1192 * stabsread.c: Include "target-float.h". Do not include "doublest.h".
1193 (define_symbol): Use target_float_from_string.
1194 * gdbarch-selftests.c: Include "target-float.h".
1195 (register_to_value_test): Use target_float_from_string.
1197 2017-11-06 Ulrich Weigand <uweigand@de.ibm.com>
1199 * Makefile.c (SFILES): Add target-float.c.
1200 (HFILES_NO_SRCDIR): Add target-float.h.
1201 (COMMON_OBS): Add target-float.o.
1202 * target-float.h: New file.
1203 * target-float.c: New file.
1205 * doublest.c (floatformat_classify): Fix detection of float_zero.
1207 * gdbtypes.c (is_floating_type): New function.
1208 * gdbtypes.h (is_floating_type): Add prototype.
1210 * value.c: Do not include "floatformat.h".
1211 (unpack_double): Use target_float_is_valid.
1212 (is_floating_value): New function.
1213 * value.h (is_floating_value): Add prototype-
1215 * valarith.c: Include "target-float.h".
1216 (value_logical_not): Use target_float_is_zero.
1218 * python/py-value.c: Include "target-float.h".
1219 (valpy_nonzero): Use target_float_is_zero.
1221 2017-11-04 Tom Tromey <tom@tromey.com>
1223 * h8300-tdep.c (h8300_push_dummy_call): Use std::vector.
1225 2017-11-04 Tom Tromey <tom@tromey.com>
1227 * breakpoint.c (set_momentary_breakpoint): Return
1229 (until_break_command): Update.
1230 (new_until_break_fsm): Change argument types to
1232 (set_momentary_breakpoint_at_pc): Return breakpoint_up.
1233 (do_delete_breakpoint_cleanup, make_cleanup_delete_breakpoint):
1235 * infcmd.c (finish_forward): Update.
1236 * breakpoint.h (set_momentary_breakpoint)
1237 (set_momentary_breakpoint_at_pc): Return breakpoint_up.
1238 (make_cleanup_delete_breakpoint): Remove.
1239 (struct breakpoint_deleter): New.
1240 (breakpoint_up): New typedef.
1241 * infrun.c (insert_step_resume_breakpoint_at_sal_1): Update.
1242 (insert_exception_resume_breakpoint): Update.
1243 (insert_exception_resume_from_probe): Update.
1244 (insert_longjmp_resume_breakpoint): Update.
1245 * arm-linux-tdep.c (arm_linux_copy_svc): Update.
1246 * elfread.c (elf_gnu_ifunc_resolver_stop): Update.
1247 * infcall.c (call_function_by_hand_dummy): Update
1249 2017-11-04 Tom Tromey <tom@tromey.com>
1251 * c-typeprint.c (c_type_print_base): Use gdb::unique_xmalloc_ptr.
1253 2017-11-04 Tom Tromey <tom@tromey.com>
1255 * linux-tdep.c (linux_core_info_proc_mappings): Use
1257 (linux_get_siginfo_data): Return gdb::byte_vector. Remove
1259 (linux_corefile_thread): Update.
1260 (linux_make_corefile_notes): Remove unused variable.
1262 2017-11-04 Tom Tromey <tom@tromey.com>
1264 * ppc-linux-tdep.c (ppc_linux_get_syscall_number): Use
1267 2017-11-04 Tom Tromey <tom@tromey.com>
1269 * objfiles.c (do_free_objfile_cleanup): Remove.
1270 * compile/compile-object-load.c (compile_object_load): Update.
1271 * objfiles.h (make_cleanup_free_objfile): Remove.
1273 2017-11-04 Tom Tromey <tom@tromey.com>
1275 * sparc64-tdep.c (do_examine): Use gdb::def_vector.
1276 (adi_read_versions): Change "tags" to "gdb_byte *".
1277 (adi_print_versions): Likewise.
1279 2017-11-04 Tom Tromey <tom@tromey.com>
1282 (scoped_rbreak_breakpoints::scoped_rbreak_breakpoints): Rename
1283 from start_rbreak_breakpoints.
1284 (scoped_rbreak_breakpoints): Rename from end_rbreak_breakpoints.
1285 * breakpoint.h (class scoped_rbreak_breakpoints): New.
1286 (start_rbreak_breakpoints, end_rbreak_breakpoints): Remove.
1287 * symtab.c (do_end_rbreak_breakpoints): Remove.
1288 (rbreak_command): Use scoped_rbreak_breakpoints, std::string.
1290 2017-11-04 Tom Tromey <tom@tromey.com>
1292 * cp-namespace.c (reset_directive_searched): Remove.
1293 (cp_lookup_symbol_via_imports): Use scoped_restore.
1294 * cp-support.c (reset_directive_searched): Remove.
1295 (make_symbol_overload_list_using): Use scoped_restore.
1296 * d-namespace.c (d_lookup_symbol_imports): Use scoped_restore.
1297 (reset_directive_searched): Remove.
1299 2017-11-04 Tom Tromey <tom@tromey.com>
1301 * symfile.c (find_separate_debug_file_by_debuglink): Use
1304 2017-11-04 Tom Tromey <tom@tromey.com>
1306 * compile/compile-loc2c.c (compute_stack_depth_worker): Change
1308 (compute_stack_depth): Likewise.
1309 (do_compile_dwarf_expr_to_c): Use std::vector.
1311 2017-11-04 Tom Tromey <tom@tromey.com>
1313 * compile/compile-object-load.c (link_callbacks_einfo): Use
1316 2017-11-04 Tom Tromey <tom@tromey.com>
1318 * dwarf2read.c (process_full_comp_unit, process_full_type_unit):
1319 Use scoped_free_pendings.
1320 * dbxread.c (dbx_symfile_read, dbx_psymtab_to_symtab_1): Use
1321 scoped_free_pendings.
1322 * xcoffread.c (xcoff_psymtab_to_symtab_1): Use scoped_free_pendings.
1323 (xcoff_initial_scan): Likewise.
1324 * buildsym.c (reset_symtab_globals): Update comment.
1325 (scoped_free_pendings): Rename from really_free_pendings.
1326 (prepare_for_building): Update comment.
1327 (buildsym_init): Likewise.
1328 * buildsym.h (class scoped_free_pendings): New class.
1329 (really_free_pendings): Don't declare.
1331 2017-11-03 Ulrich Weigand <uweigand@de.ibm.com>
1333 * doublest.c (convert_doublest_to_floatformat): Fix uninitialized
1334 output when converting a zero value to a special byteorder format.
1336 2017-11-02 Yao Qi <yao.qi@linaro.org>
1338 * frame.c (do_frame_register_read): Remove aspace.
1339 * jit.c (jit_frame_sniffer): Likwise.
1340 * ppc-linux-tdep.c (ppu2spu_sniffer): Likewise.
1341 * regcache.c (regcache::regcache): Pass nullptr.
1342 (regcache_print): Caller updated.
1343 * regcache.h (regcache::regcache): Remove one constructor
1346 2017-11-02 Yao Qi <yao.qi@linaro.org>
1348 * regcache.h (regcache) <m_readonly_p>: Change it to const bool.
1350 2017-11-02 Yao Qi <yao.qi@linaro.org>
1352 * breakpoint.c (insert_single_step_breakpoints): Update.
1353 * frame.c (struct frame_info) <aspace>: Add const.
1354 (frame_save_as_regcache): Add const.
1355 (get_frame_address_space): Return const address_space *.
1356 * frame.h (get_frame_address_space): Update declaration.
1357 * infrun.c (struct step_over_info) <aspace>: Add const.
1358 (set_step_over_info): Make aspace const.
1359 (displaced_step_prepare_throw): Change variable const.
1361 (proceed): Likewise.
1362 (adjust_pc_after_break): Likewise.
1363 (save_waitstatus): Likewise.
1364 (handle_signal_stop): Likewise.
1365 (keep_going_pass_signal): Likewise.
1366 * jit.c (jit_frame_sniffer): Add const.
1367 * mips-tdep.c (mips_single_step_through_delay): Likewise.
1368 * ppc-linux-tdep.c (ppu2spu_sniffer): Likewise.
1369 * record-full.c (record_full_wait_1): Likewise.
1370 * regcache.c (regcache::regcache): Change parameter to const.
1371 * regcache.h (regcache::regcache): Likewise.
1372 (regcache::aspace): Return const address_space *.
1373 (regcache) <m_aspace>: Add const.
1375 2017-11-02 Yao Qi <yao.qi@linaro.org>
1377 * darwin-nat.c (cancel_breakpoint): Use regcache->aspace ().
1378 * frame.c (create_sentinel_frame): Likewise.
1379 * infrun.c (displaced_step_prepare_throw): Likewise.
1381 (thread_still_needs_step_over_bp): Likewise.
1382 (proceed): Likewise.
1383 (do_target_wait): Likewise.
1384 (adjust_pc_after_break): Likewise.
1385 (handle_syscall_event): Likewise.
1386 (save_waitstatus): Likewise.
1387 (handle_inferior_event_1): Likewise.
1388 (handle_signal_stop): Likewise.
1389 (keep_going_pass_signal): Likewise.
1390 * linux-nat.c (status_callback): Likewise.
1391 (save_stop_reason): Likewise.
1392 (resume_stopped_resumed_lwps): Likewise.
1393 * record-full.c (record_full_exec_insn): Likewise.
1394 (record_full_wait_1): Likewise.
1395 * regcache.c (get_regcache_aspace): Remove.
1396 * regcache.h (get_regcache_aspace): Remove.
1398 2017-11-02 Yao Qi <yao.qi@linaro.org>
1400 * regcache.c (struct regcache_descr) <nr_raw_registers>: Remove.
1401 (init_regcache_descr): Use gdbarch_num_regs.
1402 (regcache::regcache): Likewise.
1403 (regcache::get_register_status): Likewise.
1404 (regcache::assert_raw_regnum): Likewise.
1405 (regcache::cooked_read): Likewise.
1406 (regcache::cooked_read_value): Likewise.
1407 (regcache::cooked_write): Likewise.
1408 (regcache::dump): Likewise.
1409 (regcache::num_raw_registers): New method.
1410 * regcache.h (class regcache) <num_raw_registers>: New.
1412 2017-11-02 Yao Qi <yao.qi@linaro.org>
1414 * regcache.c (regcache::assert_regnum): New method.
1415 (regcache::invalidate): Call assert_regnum.
1416 (regcache::raw_update): Likewise.
1417 (regcache::raw_write): Likewise.
1418 (regcache::raw_read_part): Likewise.
1419 (regcache::raw_write_part): Likewise.
1420 (regcache::raw_supply): Likewise.
1421 (regcache::raw_supply_integer): Likewise.
1422 (regcache::raw_supply_zeroed): Likewise.
1423 (regcache::raw_collect): Likewise.
1424 (regcache::raw_collect_integer): Likewise.
1425 * regcache.h (regcache::assert_regnum): Declare.
1427 2017-11-02 Yao Qi <yao.qi@linaro.org>
1429 * regcache.c (regcache::dump): Remove code.
1431 2017-11-02 Yao Qi <yao.qi@linaro.org>
1433 * regcache.c (struct regcache_descr) <sizeof_raw_register_status>:
1435 <sizeof_cooked_register_status>: Remove.
1436 (init_regcache_descr): Update.
1437 (regcache::regcache): Use nr_cooked_registers and nr_raw_registers.
1438 (regcache::save): Likewise.
1439 (regcache::dump): Likewise.
1441 2017-11-01 James Bowman <james.bowman@ftdichip.com>
1443 * ft32-tdep.c (ft32_fetch_instruction): New function.
1444 (ft32_analyze_prologue): Use ft32_fetch_instruction().
1446 2017-10-31 Simon Marchi <simon.marchi@polymtl.ca>
1448 * cli/cli-script.c (execute_control_command): Rename to ...
1449 (execute_control_command_1): ... this.
1450 (execute_control_command): New function.
1452 2017-10-31 Simon Marchi <simon.marchi@ericsson.com>
1454 * tracepoint.c (tfind_command): Remove const_cast.
1456 2017-10-30 Mike Gulick <mgulick@mathworks.com>
1458 * Makefile.in (HFILES_NO_SRCDIR): Remove reference to gdb.h.
1460 2017-10-30 Simon Marchi <simon.marchi@ericsson.com>
1462 * common/common-utils.h (in_inclusive_range): New function.
1463 * arm-tdep.c (arm_record_extension_space): Use
1465 (thumb_record_ld_st_reg_offset): Use in_inclusive_range.
1466 * cris-tdep.c (cris_spec_reg_applicable): Use
1469 2017-10-30 Pedro Alves <palves@redhat.com>
1470 Simon Marchi <simon.marchi@ericsson.com>
1472 * remote.c (remote_set_syscall_catchpoint): Build a std::string
1473 instead of a gdb::unique_xmalloc_ptr, using string_appendf.
1475 2017-10-30 Pedro Alves <palves@redhat.com>
1477 * common/common-utils.c (string_appendf, string_vappendf): New
1479 * common/common-utils.h (string_appendf, string_vappendf): New
1481 * unittests/common-utils-selftests.c (string_appendf_func)
1482 (test_appendf_func, string_vappendf_wrapper, string_appendf_tests)
1483 (string_vappendf_tests): New functions.
1484 (_initialize_common_utils_selftests): Register "string_appendf" and
1485 "string_vappendf tests".
1487 2017-10-30 Pedro Alves <palves@redhat.com>
1489 * unittests/common-utils-selftests.c (format_func): New typedef.
1490 (string_printf_tests, string_vprintf_tests): Tests factored out
1492 (test_format_func): ... this new function.
1493 (string_printf_tests, string_vprintf_tests): Reimplement on top of
1496 2017-10-29 Simon Marchi <simon.marchi@ericsson.com>
1498 * darwin-nat.c: Remove include of gdb.h.
1500 2017-10-29 Simon Marchi <simon.marchi@ericsson.com>
1502 * xtensa-xtregs.c: Fix formatting issues.
1504 2017-10-29 Simon Marchi <simon.marchi@ericsson.com>
1506 * xtensa-xtregs.c (xtensa_regtable_t) <name>: Constify.
1508 2017-10-28 Maksim Dzabraev <dzabraew@gmail.com>
1511 * python/py-infthread.c (thpy_get_inferior): Increment reference
1512 of inferior before returning it.
1514 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
1516 * unittests/common-utils-selftests.c (format): Add
1519 2017-10-27 Simon Marchi <simon.marchi@polymtl.ca>
1521 * xml-syscall.c (struct syscall_desc): Add constructor.
1522 <name>: Change type to std::string.
1523 (syscall_desc_up): New typedef.
1524 (syscall_desc_p): Remove typeder.
1525 (DEF_VEC_P(syscall_desc_p)): Remove.
1526 (struct syscall_group_desc): Add constructor.
1527 <name>: Change type to std::string.
1528 <syscalls>: Change type to std::vector.
1529 (syscall_group_desc_up): New typedef.
1530 (syscall_group_desc_p): Remove typedef.
1531 (DEF_VEC_P(syscall_group_desc_p)): Remove.
1532 (struct syscalls_info) <syscalls>: Change type to std::vector of
1535 <my_gdb_datadir>: Change type to std::string.
1536 (syscalls_info_up): New typedef.
1537 (allocate_syscalls_info): Remove.
1538 (syscalls_info_free_syscalls_desc): Remove.
1539 (syscalls_info_free_syscall_group_desc): Remove.
1540 (free_syscalls_info): Remove.
1541 (make_cleanup_free_syscalls_info): Remove.
1542 (syscall_group_create_syscall_group_desc): Adjust.
1543 (syscall_group_add_syscall): Adjust.
1544 (syscall_create_syscall_desc): Adjust.
1545 (syscall_parse_xml): Adjust, use unique_ptr instead of cleanup.
1546 (init_syscalls_info): Adjust.
1547 (syscall_group_get_group_by_name): Adjust.
1548 (xml_get_syscall_number): Adjust.
1549 (xml_get_syscall_name): Adjust.
1550 (xml_list_of_syscalls): Adjust.
1551 (xml_list_syscalls_by_group): Adjust.
1552 (xml_list_of_groups): Adjust.
1554 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
1556 * probe.h: Don't include gdb_vecs.h.
1557 (DEF_VEC_P (probe_p)): Remove.
1558 (find_probes_in_objfile): Return an std::vector.
1559 * probe.c (find_probes_in_objfile): Likewise.
1560 * breakpoint.c (breakpoint_objfile_data)
1561 <longjmp_probes>: Change type to std::vector.
1562 <exception_probes>: Likewise.
1563 (free_breakpoint_probes): Don't manually free vectors.
1564 (create_longjmp_master_breakpoint): Adjust.
1565 (create_exception_master_breakpoint): Adjust.
1566 * solib-svr4.c (svr4_create_probe_breakpoints): Change
1567 parameter type, adjust.
1568 (svr4_create_solib_event_breakpoints): Adjust.
1570 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
1572 * breakpoint.c (breakpoint_objfile_data): Initialize fields.
1573 (get_breakpoint_objfile_data): Allocate breakpoint_objfile_data
1575 (free_breakpoint_probes): Rename to ...
1576 (free_breakpoint_objfile_data): ... this, and call delete on
1579 2017-10-27 Simon Marchi <simon.marchi@polymtl.ca>
1581 * auto-load.c: Don't include gdb_vecs.h, include algorithm.
1582 (loaded_script_ptr): Remove typedef.
1583 (DEF_VEC_P (loaded_script_ptr)): Remove.
1584 (struct collect_matching_scripts_data): Add constructor.
1585 <scripts_p>: Change type to (pointer to) std::vector.
1586 (collect_matching_scripts_data): Adjust.
1587 (sort_scripts_by_name): Make suitable for std::sort.
1588 (print_scripts): Don't sort vector, adjust to std::vector.
1589 (auto_load_info_scripts): Sort vectors, adjust to std::vector.
1591 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
1593 * symfile.c (filename_language): Make struct, not typedef. Add
1595 <ext>: Change type to std::string.
1596 (DEF_VEC_O (filename_language)): Remove.
1597 (filename_language_table): Change type to std::vector.
1598 (add_filename_language): Adjust.
1599 (set_ext_lang_command): Adjust.
1600 (info_ext_lang_command): Adjust.
1601 (deduce_language_from_filename): Adjust.
1602 (class scoped_restore_filename_language_table): Remove.
1603 (test_filename_language): Use scoped_restore.
1604 (test_set_ext_lang_command): Use scoped_restore, adjust to
1607 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
1609 * symfile.c: Include selftest.h.
1610 (class scoped_restore_filename_language_table): New.
1611 (test_filename_language): New test.
1612 (test_set_ext_lang_command): New test.
1613 (_initialize_symfile): Register tests.
1615 2017-10-27 Keith Seitz <keiths@redhat.com>
1617 * breakpoint.c (print_breakpoint_location): Use the symbol saved
1618 in the bp_location, falling back to find_pc_sect_function when
1620 (add_location_to_breakpoint): Save sal->symbol.
1621 * breakpoint.h (struct bp_location) <symbol>: New field.
1622 * symtab.c (find_function_start_sal): Save the symbol into the SaL.
1623 * symtab.h (struct symtab_and_line) <symbol>: New field.
1625 2017-10-26 Patrick Frants <osscontribute@gmail.com>
1628 * cp-valprint.c (cp_print_value_fields): Use obstack_blank_fast
1631 2017-10-26 Pedro Alves <palves@redhat.com>
1633 * remote.c (remote_async_terminal_ours_p): Delete.
1634 (remote_open_1, remote_terminal_inferior, remote_terminal_ours):
1635 Remove references to 'remote_async_terminal_ours_p'.
1637 2017-10-26 Yao Qi <yao.qi@linaro.org>
1639 * breakpoint.h (regular_breakpoint_inserted_here_p): Remove.
1641 2017-10-26 Yao Qi <yao.qi@linaro.org>
1643 * break-catch-sig.c (signal_catchpoint_breakpoint_hit): Make
1645 * break-catch-syscall.c (breakpoint_hit_catch_syscall):
1647 * breakpoint.c (bpstat_check_location): Remove cast.
1648 (breakpoint_hit_catch_fork): Make aspce const.
1649 (breakpoint_hit_catch_solib): Likewise.
1650 (breakpoint_hit_catch_exec): Likewise.
1651 (breakpoint_hit_ranged_breakpoint): Likewise.
1652 (breakpoint_hit_watchpoint): Likewise.
1653 (base_breakpoint_breakpoint_hit): Likewise.
1654 (bkpt_breakpoint_hit): Likewise.
1655 (dprintf_breakpoint_hit): Likewise.
1656 (tracepoint_breakpoint_hit): Likewise.
1657 * breakpoint.h (breakpoint_ops) <breakpoint_hit>: Likewise.
1659 2017-10-26 Yao Qi <yao.qi@linaro.org>
1661 * breakpoint.c (breakpoint_location_address_match): Change
1662 "struct address_space *" to "const address_space".
1663 (breakpoint_location_address_range_overlap): Likewise.
1664 (breakpoint_here_p): Likewise.
1665 (breakpoint_in_range_p): Likewise.
1666 (moribund_breakpoint_here_p): Likewise.
1667 (bp_location_inserted_here_p): Likewise.
1668 (software_breakpoint_inserted_here_p): Likewise.
1669 (hardware_breakpoint_inserted_here_p): Likewise.
1670 (hardware_watchpoint_inserted_in_range): Likewise.
1671 (bpstat_check_location): Likewise.
1672 (bpstat_stop_status): Likewise.
1673 (breakpoint_address_match): Likewise.
1674 (breakpoint_address_match_range): Likewise.
1675 (breakpoint_location_address_match): Likewise.
1676 (breakpoint_location_address_range_overlap): Likewise.
1677 (insert_single_step_breakpoint): Likewise.
1678 (breakpoint_has_location_inserted_here): Likewise.
1679 (single_step_breakpoint_inserted_here_p): Likewise.
1680 (pc_at_non_inline_function): Likewise.
1681 * breakpoint.h (bpstat_stop_status): Update declaration.
1682 (breakpoint_here_p): Likewise.
1683 (breakpoint_in_range_p): Likewise.
1684 (moribund_breakpoint_here_p): Likewise.
1685 (breakpoint_inserted_here_p): Likewise.
1686 (software_breakpoint_inserted_here_p): Likewise.
1687 (hardware_breakpoint_inserted_here_p): Likewise.
1688 (breakpoint_has_location_inserted_here): Likewise.
1689 (single_step_breakpoint_inserted_here_p): Likewise.
1690 (hardware_watchpoint_inserted_in_range): Likewise.
1691 (breakpoint_address_match): Likewise.
1692 (insert_single_step_breakpoint): Likewise.
1693 (pc_at_non_inline_function): Likewise.
1694 * gdbthread.h (thread_has_single_step_breakpoint_here): Likewise.
1695 * record.c (record_check_stopped_by_breakpoint): Likewise.
1696 * record.h (record_check_stopped_by_breakpoint): Likewise.
1697 * thread.c (thread_has_single_step_breakpoint_here): Likewise.
1699 2017-10-25 Yao Qi <yao.qi@linaro.org>
1701 * aarch32-linux-nat.c (aarch32_gp_regcache_supply): Use
1702 regcache->arch () instead get_regcache_arch.
1703 * aarch64-fbsd-nat.c (aarch64_fbsd_fetch_inferior_registers):
1705 (aarch64_fbsd_store_inferior_registers): Likewise.
1706 * aarch64-linux-nat.c (fetch_gregs_from_thread): Likewise.
1707 (store_gregs_to_thread): Likewise.
1708 (fetch_fpregs_from_thread): Likewise.
1709 (store_fpregs_to_thread): Likewise.
1710 * aarch64-tdep.c (aarch64_extract_return_value): Likewise.
1711 (aarch64_store_return_value): Likewise.
1712 (aarch64_software_single_step): Likewise.
1713 * aix-thread.c (aix_thread_wait): Likewise.
1714 (supply_reg32): Likewise.
1715 (supply_sprs64): Likewise.
1716 (supply_sprs32): Likewise.
1717 (fill_gprs64): Likewise.
1718 (fill_gprs32): Likewise.
1719 (fill_sprs64): Likewise.
1720 (fill_sprs32): Likewise.
1721 (store_regs_user_thread): Likewise.
1722 (store_regs_kernel_thread): Likewise.
1723 * alpha-bsd-nat.c (alphabsd_fetch_inferior_registers): Likewise.
1724 (alphabsd_store_inferior_registers): Likewise.
1725 * alpha-tdep.c (alpha_extract_return_value): Likewise.
1726 (alpha_store_return_value): Likewise.
1727 (alpha_deal_with_atomic_sequence): Likewise.
1728 (alpha_next_pc): Likewise.
1729 (alpha_software_single_step): Likewise.
1730 * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers): Likewise.
1731 (amd64bsd_store_inferior_registers): Likewise.
1732 * amd64-linux-nat.c (amd64_linux_fetch_inferior_registers):
1734 (amd64_linux_store_inferior_registers): Likewise.
1735 * amd64-nat.c (amd64_supply_native_gregset): Likewise.
1736 (amd64_collect_native_gregset): Likewise.
1737 * amd64-obsd-tdep.c (amd64obsd_supply_uthread): Likewise.
1738 (amd64obsd_collect_uthread): Likewise.
1739 * amd64-tdep.c (amd64_supply_fpregset): Likewise.
1740 (amd64_collect_fpregset): Likewise.
1741 (amd64_supply_fxsave): Likewise.
1742 (amd64_supply_xsave): Likewise.
1743 (amd64_collect_fxsave): Likewise.
1744 (amd64_collect_xsave): Likewise.
1745 * arc-tdep.c (arc_write_pc): Likewise.
1746 * arch-utils.c (default_skip_permanent_breakpoint): Likewise.
1747 * arm-fbsd-nat.c (arm_fbsd_fetch_inferior_registers): Likewise.
1748 (arm_fbsd_store_inferior_registers): Likewise.
1749 * arm-linux-nat.c (fetch_vfp_regs): Likewise.
1750 (store_vfp_regs): Likewise.
1751 (arm_linux_fetch_inferior_registers): Likewise.
1752 (arm_linux_store_inferior_registers): Likewise.
1753 * arm-linux-tdep.c (arm_linux_supply_gregset): Likewise.
1754 (arm_linux_sigreturn_next_pc): Likewise.
1755 (arm_linux_get_next_pcs_syscall_next_pc): Likewise.
1756 * arm-nbsd-nat.c (arm_supply_gregset): Likewise.
1757 (fetch_register): Likewise.
1758 (store_register): Likewise.
1759 * arm-tdep.c (arm_is_thumb): Likewise.
1760 (displaced_in_arm_mode): Likewise.
1761 (bx_write_pc): Likewise.
1762 (arm_get_next_pcs_addr_bits_remove): Likewise.
1763 (arm_software_single_step): Likewise.
1764 (arm_extract_return_value): Likewise.
1765 (arm_store_return_value): Likewise.
1766 (arm_write_pc): Likewise.
1767 * bfin-tdep.c (bfin_extract_return_value): Likewise.
1768 * bsd-uthread.c (bsd_uthread_fetch_registers): Likewise.
1769 (bsd_uthread_store_registers): Likewise.
1770 * core-regset.c (fetch_core_registers): Likewise.
1771 * corelow.c (get_core_registers): Likewise.
1772 * cris-tdep.c (cris_store_return_value): Likewise.
1773 (cris_extract_return_value): Likewise.
1774 (find_step_target): Likewise.
1775 (find_step_target): Likewise.
1776 (cris_software_single_step): Likewise.
1777 * ctf.c (ctf_fetch_registers): Likewise.
1778 * darwin-nat.c (cancel_breakpoint): Likewise.
1779 * fbsd-tdep.c (fbsd_collect_thread_registers): Likewise.
1780 * frv-tdep.c (frv_extract_return_value): Likewise.
1781 * ft32-tdep.c (ft32_store_return_value): Likewise.
1782 (ft32_extract_return_value): Likewise.
1783 * go32-nat.c (fetch_register): Likewise.
1784 (go32_fetch_registers): Likewise.
1785 (go32_store_registers): Likewise.
1786 (store_register): Likewise.
1787 * h8300-tdep.c (h8300_extract_return_value): Likewise.
1788 (h8300_store_return_value): Likewise.
1789 * hppa-linux-nat.c (fetch_register): Likewise.
1790 (store_register): Likewise.
1791 (hppa_linux_fetch_inferior_registers): Likewise.
1792 (hppa_linux_store_inferior_registers): Likewise.
1793 * i386-darwin-nat.c (i386_darwin_fetch_inferior_registers): Likewise.
1794 (i386_darwin_store_inferior_registers): Likewise.
1795 * i386-gnu-nat.c (gnu_fetch_registers): Likewise.
1796 (gnu_store_registers): Likewise.
1797 * i386-linux-nat.c (fetch_register): Likewise.
1798 (store_register): Likewise.
1799 (supply_gregset): Likewise.
1800 (fill_gregset): Likewise.
1801 (i386_linux_fetch_inferior_registers): Likewise.
1802 (i386_linux_store_inferior_registers): Likewise.
1803 (i386_linux_resume): Likewise.
1804 * i386-linux-tdep.c (i386_linux_get_syscall_number_from_regcache):
1806 * i386-nto-tdep.c (i386nto_supply_gregset): Likewise.
1807 * i386-obsd-nat.c (i386obsd_supply_pcb): Likewise.
1808 * i386-obsd-tdep.c (i386obsd_supply_uthread): Likewise.
1809 (i386obsd_collect_uthread): Likewise.
1810 * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
1811 (i386_supply_gregset): Likewise.
1812 (i386_collect_gregset): Likewise.
1813 (i386_supply_fpregset): Likewise.
1814 (i386_collect_fpregset): Likewise.
1815 (i386_mpx_bd_base): Likewise.
1816 * i386-v4-nat.c (supply_fpregset): Likewise.
1817 (fill_fpregset): Likewise.
1818 * i387-tdep.c (i387_supply_fsave): Likewise.
1819 (i387_collect_fsave): Likewise.
1820 (i387_supply_fxsave): Likewise.
1821 (i387_collect_fxsave): Likewise.
1822 (i387_supply_xsave): Likewise.
1823 (i387_collect_xsave): Likewise.
1824 * ia64-linux-nat.c (ia64_linux_fetch_registers): Likewise.
1825 (ia64_linux_store_registers): Likewise.
1826 * ia64-tdep.c (ia64_access_rse_reg): Likewise.
1827 (ia64_extract_return_value): Likewise.
1828 (ia64_store_return_value): Likewise.
1829 (find_func_descr): Likewise.
1830 * inf-child.c (inf_child_fetch_inferior_registers): Likewise.
1831 * inf-ptrace.c (inf_ptrace_fetch_registers): Likewise.
1832 (inf_ptrace_store_registers): Likewise.
1833 * infrun.c (use_displaced_stepping): Likewise.
1834 (displaced_step_prepare_throw): Likewise.
1836 (proceed): Likewise.
1837 (do_target_wait): Likewise.
1838 (adjust_pc_after_break): Likewise.
1839 (handle_inferior_event_1): Likewise.
1840 (handle_signal_stop): Likewise.
1841 (save_infcall_suspend_state): Likewise.
1842 (restore_infcall_suspend_state): Likewise.
1843 * iq2000-tdep.c (iq2000_extract_return_value): Likewise.
1844 * jit.c (jit_frame_prev_register): Likewise.
1845 * linux-nat.c (save_stop_reason): Likewise.
1846 (linux_nat_wait_1): Likewise.
1847 (resume_stopped_resumed_lwps): Likewise.
1848 * linux-record.c (record_linux_sockaddr): Likewise.
1849 (record_linux_msghdr): Likewise.
1850 (record_linux_system_call): Likewise.
1851 * linux-tdep.c (linux_collect_thread_registers): Likewise.
1852 * lm32-tdep.c (lm32_extract_return_value): Likewise.
1853 (lm32_store_return_value): Likewise.
1854 * m32c-tdep.c (m32c_read_flg): Likewise.
1855 (m32c_pseudo_register_read): Likewise.
1856 (m32c_pseudo_register_write): Likewise.
1857 * m32r-linux-tdep.c (m32r_linux_supply_gregset): Likewise.
1858 (m32r_linux_collect_gregset): Likewise.
1859 * m32r-tdep.c (m32r_store_return_value): Likewise.
1860 (m32r_extract_return_value): Likewise.
1861 * m68k-bsd-nat.c (m68kbsd_supply_fpregset): Likewise.
1862 (m68kbsd_collect_fpregset): Likewise.
1863 * m68k-bsd-tdep.c (m68kbsd_supply_fpregset): Likewise.
1864 * m68k-linux-nat.c (fetch_register): Likewise.
1865 (old_fetch_inferior_registers): Likewise.
1866 (old_store_inferior_registers): Likewise.
1867 (store_regs): Likewise.
1868 * m68k-tdep.c (m68k_svr4_extract_return_value): Likewise.
1869 (m68k_svr4_store_return_value): Likewise.
1870 * m88k-tdep.c (m88k_store_arguments): Likewise.
1871 * mi/mi-main.c (mi_cmd_data_list_changed_registers): Likewise.
1872 (mi_cmd_data_write_register_values): Likewise.
1873 * mips-fbsd-nat.c (mips_fbsd_fetch_inferior_registers): Likewise.
1874 (mips_fbsd_store_inferior_registers): Likewise.
1875 * mips-fbsd-tdep.c (mips_fbsd_supply_fpregs): Likewise.
1876 (mips_fbsd_supply_gregs): Likewise.
1877 (mips_fbsd_collect_fpregs): Likewise.
1878 (mips_fbsd_collect_gregs): Likewise.
1879 (mips_fbsd_supply_fpregset): Likewise.
1880 (mips_fbsd_collect_fpregset): Likewise.
1881 (mips_fbsd_supply_gregset): Likewise.
1882 (mips_fbsd_collect_gregset): Likewise.
1883 * mips-linux-nat.c (supply_gregset): Likewise.
1884 (fill_gregset): Likewise.
1885 (supply_fpregset): Likewise.
1886 (fill_fpregset): Likewise.
1887 * mips-linux-tdep.c (mips_supply_gregset): Likewise.
1888 (mips_fill_gregset): Likewise.
1889 (mips_supply_fpregset): Likewise.
1890 (mips_fill_fpregset): Likewise.
1891 (mips64_supply_gregset): Likewise.
1892 (micromips_linux_sigframe_validate): Likewise.
1893 * mips-nbsd-nat.c (mipsnbsd_fetch_inferior_registers): Likewise.
1894 (mipsnbsd_fetch_inferior_registers): Likewise.
1895 (mipsnbsd_store_inferior_registers): Likewise.
1896 * mips-nbsd-tdep.c (mipsnbsd_supply_fpregset): Likewise.
1897 (mipsnbsd_supply_gregset): Likewise.
1898 (mipsnbsd_iterate_over_regset_sections): Likewise.
1899 (mipsnbsd_supply_reg): Likewise.
1900 (mipsnbsd_supply_fpreg): Likewise.
1901 * mips-tdep.c (mips_in_frame_stub): Likewise.
1902 (mips_dummy_id): Likewise.
1903 (is_octeon_bbit_op): Likewise.
1904 (micromips_bc1_pc): Likewise.
1905 (extended_mips16_next_pc): Likewise.
1906 (mips16_next_pc): Likewise.
1907 (deal_with_atomic_sequence): Likewise.
1908 * moxie-tdep.c (moxie_process_readu): Likewise.
1909 * nios2-tdep.c (nios2_get_next_pc): Likewise.
1910 * nto-procfs.c (procfs_store_registers): Likewise.
1911 * ppc-fbsd-nat.c (ppcfbsd_fetch_inferior_registers): Likewise.
1912 (ppcfbsd_store_inferior_registers): Likewise.
1913 * ppc-linux-nat.c (fetch_vsx_register): Likewise.
1914 (fetch_altivec_register): Likewise.
1915 (get_spe_registers): Likewise.
1916 (fetch_spe_register): Likewise.
1917 (fetch_altivec_registers): Likewise.
1918 (fetch_all_gp_regs): Likewise.
1919 (fetch_all_fp_regs): Likewise.
1920 (store_vsx_register): Likewise.
1921 (store_altivec_register): Likewise.
1922 (set_spe_registers): Likewise.
1923 (store_spe_register): Likewise.
1924 (store_altivec_registers): Likewise.
1925 (store_all_gp_regs): Likewise.
1926 (store_all_fp_regs): Likewise.
1927 * ppc-linux-tdep.c (ppc_linux_supply_gregset): Likewise.
1928 (ppc_linux_collect_gregset): Likewise.
1929 (ppc_canonicalize_syscall): Likewise.
1930 (ppc_linux_record_signal): Likewise.
1931 (ppu2spu_prev_register): Likewise.
1932 * ppc-nbsd-nat.c (ppcnbsd_supply_pcb): Likewise.
1933 * ppc-obsd-nat.c (ppcobsd_fetch_registers): Likewise.
1934 (ppcobsd_store_registers): Likewise.
1935 * ppc-ravenscar-thread.c (ppc_ravenscar_generic_fetch_registers):
1937 (ppc_ravenscar_generic_store_registers): Likewise.
1938 * procfs.c (procfs_fetch_registers): Likewise.
1939 (procfs_store_registers): Likewise.
1940 * ravenscar-thread.c (ravenscar_fetch_registers): Likewise.
1941 (ravenscar_store_registers): Likewise.
1942 (ravenscar_prepare_to_store): Likewise.
1943 * record-btrace.c (record_btrace_fetch_registers): Likewise.
1944 * record-full.c (record_full_wait_1): Likewise.
1945 (record_full_registers_change): Likewise.
1946 (record_full_store_registers): Likewise.
1947 (record_full_core_fetch_registers): Likewise.
1948 (record_full_save): Likewise.
1949 (record_full_goto_insn): Likewise.
1950 * regcache.c (regcache_register_size): Likewise.
1951 (get_regcache_arch): Remove.
1952 (regcache_read_pc): Likewise.
1953 * regcache.h (get_regcache_arch): Remove.
1954 * remote-sim.c (gdbsim_fetch_register): Likewise.
1955 (gdbsim_store_register): Likewise.
1956 * remote.c (fetch_register_using_p): Likewise.
1957 (send_g_packet): Likewise.
1958 (remote_prepare_to_store): Likewise.
1959 (store_registers_using_G): Likewise.
1960 * reverse.c (save_bookmark_command): Likewise.
1961 (goto_bookmark_command): Likewise.
1962 * rs6000-aix-tdep.c (branch_dest): Likewise.
1963 * rs6000-nat.c (rs6000_ptrace64): Likewise.
1964 (fetch_register): Likewise.
1965 * rs6000-tdep.c (ppc_supply_reg): Likewise.
1966 (ppc_collect_reg): Likewise.
1967 (ppc_collect_gregset): Likewise.
1968 (ppc_collect_fpregset): Likewise.
1969 (ppc_collect_vsxregset): Likewise.
1970 (ppc_collect_vrregset): Likewise.
1971 (ppc_displaced_step_hw_singlestep): Likewise.
1972 (rs6000_pseudo_register_read): Likewise.
1973 (rs6000_pseudo_register_write): Likewise.
1974 * s390-linux-nat.c (supply_gregset): Likewise.
1975 (fill_gregset): Likewise.
1976 (s390_linux_fetch_inferior_registers): Likewise.
1977 * s390-linux-tdep.c (s390_write_pc): Likewise.
1978 (s390_software_single_step): Likewise.
1979 (s390_all_but_pc_registers_record): Likewise.
1980 (s390_linux_syscall_record): Likewise.
1981 * sentinel-frame.c (sentinel_frame_prev_arch): Likewise.
1982 * sh-nbsd-nat.c (shnbsd_fetch_inferior_registers): Likewise.
1983 (shnbsd_store_inferior_registers): Likewise.
1984 * sh-tdep.c (sh_extract_return_value_nofpu): Likewise.
1985 (sh_extract_return_value_fpu): Likewise.
1986 (sh_store_return_value_nofpu): Likewise.
1987 (sh_corefile_supply_regset): Likewise.
1988 (sh_corefile_collect_regset): Likewise.
1989 * sh64-tdep.c (sh64_extract_return_value): Likewise.
1990 (sh64_store_return_value): Likewise.
1991 * sparc-linux-tdep.c (sparc32_linux_collect_core_fpregset): Likewise.
1992 * sparc-nat.c (sparc_fetch_inferior_registers): Likewise.
1993 (sparc_store_inferior_registers): Likewise.
1994 * sparc-ravenscar-thread.c (register_in_thread_descriptor_p): Likewise.
1995 (sparc_ravenscar_prepare_to_store): Likewise.
1996 * sparc-tdep.c (sparc32_store_arguments): Likewise.
1997 (sparc_analyze_control_transfer): Likewise.
1998 (sparc_step_trap): Likewise.
1999 (sparc_software_single_step): Likewise.
2000 (sparc32_gdbarch_init): Likewise.
2001 (sparc_supply_rwindow): Likewise.
2002 (sparc_collect_rwindow): Likewise.
2003 * sparc64-linux-tdep.c (sparc64_linux_collect_core_fpregset): Likewise.
2004 * sparc64-nbsd-nat.c (sparc64nbsd_supply_gregset): Likewise.
2005 (sparc64nbsd_collect_gregset): Likewise.
2006 (sparc64nbsd_supply_fpregset): Likewise.
2007 (sparc64nbsd_collect_fpregset): Likewise.
2008 * sparc64-tdep.c (sparc64_store_arguments): Likewise.
2009 (sparc64_supply_gregset): Likewise.
2010 (sparc64_collect_gregset): Likewise.
2011 (sparc64_supply_fpregset): Likewise.
2012 (sparc64_collect_fpregset): Likewise.
2013 * spu-linux-nat.c (spu_fetch_inferior_registers): Likewise.
2014 * spu-tdep.c (spu_unwind_sp): Likewise.
2015 (spu2ppu_prev_register): Likewise.
2016 (spu_memory_remove_breakpoint): Likewise.
2017 * stack.c (return_command): Likewise.
2018 * tic6x-tdep.c (tic6x_extract_signed_field): Likewise.
2019 * tracefile-tfile.c (tfile_fetch_registers): Likewise.
2020 * tracefile.c (trace_save_ctf): Likewise.
2021 * windows-nat.c (do_windows_fetch_inferior_registers): Likewise.
2022 (do_windows_store_inferior_registers): Likewise.
2023 (windows_resume): Likewise.
2024 * xtensa-linux-nat.c (fill_gregset): Likewise.
2025 (supply_gregset_reg): Likewise.
2026 * xtensa-tdep.c (xtensa_register_write_masked): Likewise.
2027 (xtensa_register_read_masked): Likewise.
2028 (xtensa_supply_gregset): Likewise.
2029 (xtensa_extract_return_value): Likewise.
2030 (xtensa_store_return_value): Likewise.
2032 2017-10-25 Ulrich Weigand <uweigand@de.ibm.com>
2034 * doublest.c (floatformat_from_string): New function.
2035 * doublest.h (floatformat_from_string): Add prototype.
2037 * std-operator.def (OP_DOUBLE, OP_DECFLOAT): Remove, replace by ...
2038 (OP_FLOAT): ... this.
2039 * expression.h: Do not include "doublest.h".
2040 (union exp_element): Replace doubleconst and decfloatconst by
2041 new element floatconst.
2042 * ada-lang.c (resolve_subexp): Handle OP_FLOAT instead of OP_DOUBLE.
2043 (ada_evaluate_subexp): Likewise.
2044 * eval.c (evaluate_subexp_standard): Handle OP_FLOAT instead of
2045 OP_DOUBLE and OP_DECFLOAT.
2046 * expprint.c (print_subexp_standard): Likewise.
2047 (dump_subexp_body_standard): Likewise.
2048 * breakpoint.c (watchpoint_exp_is_const): Likewise.
2050 * parse.c: Include "dfp.h".
2051 (write_exp_elt_dblcst, write_exp_elt_decfloatcst): Remove.
2052 (write_exp_elt_floatcst): New function.
2053 (operator_length_standard): Handle OP_FLOAT instead of OP_DOUBLE
2055 (operator_check_standard): Likewise.
2056 (parse_float): Do not accept suffix. Take type as input. Return bool.
2057 Return target format buffer instead of host DOUBLEST.
2058 Use floatformat_from_string and decimal_from_string to parse
2059 either binary or decimal floating-point types.
2060 (parse_c_float): Remove.
2061 * parser-defs.h: Do not include "doublest.h".
2062 (write_exp_elt_dblcst, write_exp_elt_decfloatcst): Remove.
2063 (write_exp_elt_floatcst): Add prototype.
2064 (parse_float): Update prototype.
2065 (parse_c_float): Remove.
2067 * c-exp.y: Do not include "dfp.h".
2068 (typed_val_float): Use byte buffer instead of DOUBLEST.
2069 (typed_val_decfloat): Remove.
2071 (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
2072 (parse_number): Update to new parse_float interface.
2073 Parse suffixes and determine type before calling parse_float.
2074 Handle decimal and binary FP types the same way.
2076 * d-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
2077 (FLOAT_LITERAL): Use OP_FLOAT and write_exp_elt_floatcst.
2078 (parse_number): Update to new parse_float interface.
2079 Parse suffixes and determine type before calling parse_float.
2081 * f-exp.y: Replace dval by typed_val_float.
2082 (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
2083 (parse_number): Use parse_float instead of atof.
2085 * go-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
2086 (parse_go_float): Remove.
2087 (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
2088 (parse_number): Call parse_float instead of parse_go_float.
2089 Parse suffixes and determine type before calling parse_float.
2091 * p-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
2092 (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
2093 (parse_number): Update to new parse_float interface.
2094 Parse suffixes and determine type before calling parse_float.
2096 * m2-exp.y: Replace dval by byte buffer val.
2097 (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
2098 (parse_number): Call parse_float instead of atof.
2100 * rust-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
2101 (lex_number): Call parse_float instead of strtod.
2102 (ast_dliteral): Use OP_FLOAT instead of OP_DOUBLE.
2103 (convert_ast_to_expression): Handle OP_FLOAT instead of OP_DOUBLE.
2104 Use write_exp_elt_floatcst.
2105 (unit_testing): Remove static variable.
2106 (rust_type): Do not check unit_testing.
2107 (rust_lex_tests): Do not set uint_testing. Set up dummy rust_parser.
2109 * ada-exp.y (type_float, type_double): Remove.
2110 (typed_val_float): Use byte buffer instead of DOUBLEST.
2111 (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
2112 * ada-lex.l (processReal): Use parse_float instead of sscanf.
2114 2017-10-25 Alan Hayward <alan.hayward@arm.com>
2116 * aarch64-tdep.h (enum aarch64_regnum): Remove.
2117 * arch/aarch64.h: New file.
2119 2017-10-24 Ulrich Weigand <uweigand@de.ibm.com>
2121 * dfp.h (decimal_from_string): Use const reference for argument.
2122 * dfp.c (decimal_from_string): Likewise.
2124 2017-10-24 Ulrich Weigand <uweigand@de.ibm.com>
2126 * i387-tdep.c (print_i387_value): Use floatformat_to_string.
2127 * sh64-tdep.c (sh64_do_fp_register): Likewise.
2128 * mips-tdep.c (mips_print_fp_register): Likewise.
2130 2017-10-24 Ulrich Weigand <uweigand@de.ibm.com>
2132 * common/format.h (enum argclass): Replace decfloat_arg by
2133 dec32float_arg, dec64float_arg, and dec128float_arg.
2134 * common/format.c (parse_format_string): Update to return
2135 new decimal float argument classes.
2137 * printcmd.c (printf_decfloat): Rename to ...
2138 (printf_floating): ... this. Add argclass argument, and use it
2139 instead of parsing the format string again. Add support for
2140 binary floating-point values, using floatformat_to_string.
2141 Convert value to the target format if it doesn't already match.
2142 (ui_printf): Call printf_floating instead of printf_decfloat,
2143 also for double_arg / long_double_arg. Pass argclass.
2145 * dfp.c (decimal_to_string): Add format string argument.
2146 * dfp.h (decimal_to_string): Likewise.
2148 * doublest.c (floatformat_to_string): Add format string argument.
2149 * doublest.h (floatformat_to_string): Likewise.
2151 2017-10-24 Ulrich Weigand <uweigand@de.ibm.com>
2153 * doublest.c (floatformat_precision): New routine.
2154 (floatformat_to_string): Likewise.
2155 * doublest.c (floatformat_to_string): Add prototype.
2157 * printcmd.c (print_scalar_formatted): Only call print_floating
2158 on floating-point types.
2159 * valprint.c: Do not include "floatformat.h".
2160 (generic_val_print_decfloat): Remove.
2161 (generic_val_print): Call generic_val_print_float for both
2162 TYPE_CODE_FLT and TYPE_CODE_DECFLOAT.
2163 (print_floating): Use floatformat_to_string. Handle decimal float.
2164 (print_decimal_floating): Remove, merge into floatformat_to_string.
2165 * value.h (print_decimal_floating): Remove.
2167 * Makefile.in: Do not build doublest.c with -Wformat-nonliteral.
2169 2017-10-24 Ulrich Weigand <uweigand@de.ibm.com>
2171 * buildsym.c (end_symtab_get_static_block): Use std::stable_sort.
2173 2017-10-21 Simon Marchi <simon.marchi@ericsson.com>
2175 * memattr.h: Don't include vec.h.
2176 (struct mem_attrib): Initialize fields.
2177 <unknown>: New static method.
2178 (struct mem_region): Add constructors, operator<, initialize
2180 * memattr.c: Include algorithm.
2181 (default_mem_attrib, unknown_mem_attrib): Remove.
2182 (user_mem_region_list): New global.
2183 (target_mem_region_list, mem_region_list): Change type to
2184 std::vector<mem_region>.
2185 (mem_use_target): Now a function.
2186 (target_mem_regions_valid): Change type to bool.
2187 (mem_region_lessthan, mem_region_cmp, mem_region_init): Remove.
2188 (require_user_regions): Adjust.
2189 (require_target_regions): Adjust.
2190 (create_mem_region): Adjust.
2191 (lookup_mem_region): Adjust.
2192 (invalidate_target_mem_regions): Adjust.
2193 (mem_clear): Rename to...
2194 (user_mem_clear): ... this, and adjust.
2195 (mem_command): Adjust.
2196 (info_mem_command): Adjust.
2197 (mem_enable, enable_mem_command, mem_disable,
2198 disable_mem_command): Adjust.
2199 (mem_delete): Adjust.
2200 (delete_mem_command): Adjust.
2201 * memory-map.h (parse_memory_map): Return an std::vector.
2202 * memory-map.c (parse_memory_map): Likewise.
2203 (struct memory_map_parsing_data): Add constructor.
2204 <memory_map>: Point to std::vector.
2205 (memory_map_start_memory): Adjust.
2206 (memory_map_end_memory): Adjust.
2207 (memory_map_end_property): Adjust.
2208 (clear_result): Remove.
2209 * remote.c (remote_memory_map): Return an std::vector.
2210 * target-debug.h (target_debug_print_VEC_mem_region_s__p):
2212 (target_debug_print_mem_region_vector): New.
2213 * target-delegates.c: Regenerate.
2214 * target.h (mem_region_vector): New typedef.
2215 (to_memory_map): Return mem_region_vector.
2216 (target_memory_map): Return an std::vector.
2217 * target.c (target_memory_map): Return an std::vector.
2218 (flash_erase_command): Adjust.
2220 2017-10-21 Simon Marchi <simon.marchi@ericsson.com>
2222 * memory-map.c (struct memory_map_parsing_data) <property_name>:
2223 Change type to std::string.
2224 (memory_map_start_property): Adjust.
2225 (memory_map_end_property): Adjust.
2227 2017-10-21 Simon Marchi <simon.marchi@polymtl.ca>
2229 * infrun.h: Include common/byte-vector.h.
2230 (struct displaced_step_closure): New struct.
2231 (struct buf_displaced_step_closure): New struct.
2232 * infrun.c (displaced_step_closure::~displaced_step_closure):
2233 Provide default implementation.
2234 (displaced_step_clear): Deallocate step closure with delete.
2235 * aarch64-tdep.c (displaced_step_closure): Rename to ...
2236 (aarch64_displaced_step_closure): ... this, extend
2237 displaced_step_closure.
2238 (aarch64_displaced_step_data) <dsc>: Change type to
2239 aarch64_displaced_step_closure.
2240 (aarch64_displaced_step_copy_insn): Adjust to type change, use
2242 (aarch64_displaced_step_fixup): Add cast for displaced step
2244 * amd64-tdep.c (displaced_step_closure): Rename to ...
2245 (amd64_displaced_step_closure): ... this, extend
2246 displaced_step_closure.
2247 <insn_buf>: Change type to std::vector<gdb_byte>.
2249 (fixup_riprel): Change type of DSC parameter, adjust to type
2251 (fixup_displaced_copy): Change type of DSC parameter.
2252 (amd64_displaced_step_copy_insn): Instantiate
2253 amd64_displaced_step_closure.
2254 (amd64_displaced_step_fixup): Add cast for closure type, adjust
2255 to type change of insn_buf.
2256 * arm-linux-tdep.c (arm_linux_cleanup_svc): Change type of
2258 (arm_linux_copy_svc): Likewise.
2259 (cleanup_kernel_helper_return): Likewise.
2260 (arm_catch_kernel_helper_return): Likewise.
2261 (arm_linux_displaced_step_copy_insn): Instantiate
2262 arm_displaced_step_closure.
2263 * arm-tdep.c (arm_pc_is_thumb): Add cast for closure.
2264 (displaced_read_reg): Change type of parameter DSC.
2265 (branch_write_pc): Likewise.
2266 (load_write_pc): Likewise.
2267 (alu_write_pc): Likewise.
2268 (displaced_write_reg): Likewise.
2269 (arm_copy_unmodified): Likewise.
2270 (thumb_copy_unmodified_32bit): Likewise.
2271 (thumb_copy_unmodified_16bit): Likewise.
2272 (cleanup_preload): Likewise.
2273 (install_preload): Likewise.
2274 (arm_copy_preload): Likewise.
2275 (thumb2_copy_preload): Likewise.
2276 (install_preload_reg): Likewise.
2277 (arm_copy_preload_reg): Likewise.
2278 (cleanup_copro_load_store): Likewise.
2279 (install_copro_load_store): Likewise.
2280 (arm_copy_copro_load_store) Likewise.
2281 (thumb2_copy_copro_load_store): Likewise.
2282 (cleanup_branch): Likewise.
2283 (install_b_bl_blx): Likewise.
2284 (arm_copy_b_bl_blx): Likewise.
2285 (thumb2_copy_b_bl_blx): Likewise.
2286 (thumb_copy_b): Likewise.
2287 (install_bx_blx_reg): Likewise.
2288 (arm_copy_bx_blx_reg): Likewise.
2289 (thumb_copy_bx_blx_reg): Likewise.
2290 (cleanup_alu_imm): Likewise.
2291 (arm_copy_alu_imm): Likewise.
2292 (thumb2_copy_alu_imm): Likewise.
2293 (cleanup_alu_reg): Likewise.
2294 (install_alu_reg): Likewise.
2295 (arm_copy_alu_reg): Likewise.
2296 (thumb_copy_alu_reg): Likewise.
2297 (cleanup_alu_shifted_reg): Likewise.
2298 (install_alu_shifted_reg): Likewise.
2299 (arm_copy_alu_shifted_reg): Likewise.
2300 (cleanup_load): Likewise.
2301 (cleanup_store): Likewise.
2302 (arm_copy_extra_ld_st): Likewise.
2303 (install_load_store): Likewise.
2304 (thumb2_copy_load_literal): Likewise.
2305 (thumb2_copy_load_reg_imm): Likewise.
2306 (arm_copy_ldr_str_ldrb_strb): Likewise.
2307 (cleanup_block_load_all): Likewise.
2308 (cleanup_block_store_pc): Likewise.
2309 (cleanup_block_load_pc): Likewise.
2310 (arm_copy_block_xfer): Likewise.
2311 (thumb2_copy_block_xfer): Likewise.
2312 (cleanup_svc): Likewise.
2313 (install_svc): Likewise.
2314 (arm_copy_svc): Likewise.
2315 (thumb_copy_svc): Likewise.
2316 (arm_copy_undef): Likewise.
2317 (thumb_32bit_copy_undef): Likewise.
2318 (arm_copy_unpred): Likewise.
2319 (arm_decode_misc_memhint_neon): Likewise.
2320 (arm_decode_unconditional): Likewise.
2321 (arm_decode_miscellaneous): Likewise.
2322 (arm_decode_dp_misc): Likewise.
2323 (arm_decode_ld_st_word_ubyte): Likewise.
2324 (arm_decode_media): Likewise.
2325 (arm_decode_b_bl_ldmstm): Likewise.
2326 (arm_decode_ext_reg_ld_st): Likewise.
2327 (thumb2_decode_dp_shift_reg): Likewise.
2328 (thumb2_decode_ext_reg_ld_st): Likewise.
2329 (arm_decode_svc_copro): Likewise.
2330 (thumb2_decode_svc_copro): Likewise.
2331 (install_pc_relative): Likewise.
2332 (thumb_copy_pc_relative_16bit): Likewise.
2333 (thumb_decode_pc_relative_16bit): Likewise.
2334 (thumb_copy_pc_relative_32bit): Likewise.
2335 (thumb_copy_16bit_ldr_literal): Likewise.
2336 (thumb_copy_cbnz_cbz): Likewise.
2337 (thumb2_copy_table_branch): Likewise.
2338 (cleanup_pop_pc_16bit_all): Likewise.
2339 (thumb_copy_pop_pc_16bit): Likewise.
2340 (thumb_process_displaced_16bit_insn): Likewise.
2341 (decode_thumb_32bit_ld_mem_hints): Likewise.
2342 (thumb_process_displaced_32bit_insn): Likewise.
2343 (thumb_process_displaced_insn): Likewise.
2344 (arm_process_displaced_insn): Likewise.
2345 (arm_displaced_init_closure): Likewise.
2346 (arm_displaced_step_fixup): Add cast for closure.
2347 * arm-tdep.h: Include infrun.h.
2348 (displaced_step_closure): Rename to ...
2349 (arm_displaced_step_closure): ... this, extend
2350 displaced_step_closure.
2351 <u::svc::copy_svc_os>: Change type of parameter DSC.
2352 <cleanup>: Likewise.
2353 (arm_process_displaced_insn): Likewise.
2354 (arm_displaced_init_closure): Likewise.
2355 (displaced_read_reg): Likewise.
2356 (displaced_write_reg): Likewise.
2357 * i386-linux-tdep.c (i386_linux_displaced_step_copy_insn):
2359 * i386-tdep.h: Include infrun.h.
2360 (i386_displaced_step_closure): New typedef.
2361 * i386-tdep.c (i386_displaced_step_copy_insn): Use
2362 i386_displaced_step_closure.
2363 (i386_displaced_step_fixup): Adjust.
2364 * rs6000-tdep.c (ppc_displaced_step_closure): New typedef.
2365 (ppc_displaced_step_copy_insn): Use ppc_displaced_step_closure
2367 (ppc_displaced_step_fixup): Adjust.
2368 * s390-linux-tdep.c (s390_displaced_step_closure): New typedef.
2369 (s390_displaced_step_copy_insn): Use s390_displaced_step_closure
2371 (s390_displaced_step_fixup): Adjust.
2373 2017-10-21 Simon Marchi <simon.marchi@polymtl.ca>
2375 * interps.h (interp_resume, interp_suspend, interp_set_temp):
2376 Remove declarations.
2378 2017-10-20 Tom Tromey <tom@tromey.com>
2380 * gdb_bfd.c (struct gdb_bfd_data) <included_bfds>: Now a
2382 (gdb_bfd_record_inclusion): Update.
2383 (bfdp): Remove typedef.
2385 2017-10-20 Tom Tromey <tom@tromey.com>
2387 * gdb_bfd.c (gdb_bfd_ref): Use new.
2388 (struct gdb_bfd_data): Add constructor, destructor, and member
2390 (gdb_bfd_unref): Use delete.
2392 2017-10-20 Tom Tromey <tom@tromey.com>
2394 * exec.c (exec_file_attach): Use new_bfd_ref.
2395 * symfile-mem.c (symbol_file_add_from_memory): Use new_bfd_ref.
2396 * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
2397 (gdb_bfd_openw, gdb_bfd_openr_iovec, gdb_bfd_fdopenr): Use
2399 * gdb_bfd.h (new_bfd_ref): New function.
2401 2017-10-20 Pedro Alves <palves@redhat.com>
2403 * main.c (captured_command_loop): Add attribute noinline.
2405 2017-10-19 Simon Marchi <simon.marchi@ericsson.com>
2407 * interps.c (struct interp_factory): Add constructor.
2408 (interp_factory_p): Remove typedef.
2409 (DEF_VEC_P(interp_factory_p)): Remove.
2410 (interpreter_factories): Change type to std::vector.
2411 (interp_factory_register): Adjust.
2412 (interp_lookup): Adjust.
2413 (interpreter_completer): Adjust.
2415 2017-10-19 Tom Tromey <tom@tromey.com>
2417 * break-catch-syscall.c (catch_syscall_completer): Use
2418 std::string, gdb::unique_xmalloc_ptr.
2420 2017-10-19 Tom Tromey <tom@tromey.com>
2422 * infcall.c (call_function_by_hand_dummy): Use std::string.
2424 2017-10-19 Tom Tromey <tom@tromey.com>
2426 * mi/mi-main.c (mi_cmd_execute): Update.
2427 * top.h (prepare_execute_command): Return scoped_value_mark.
2428 * value.h (class scoped_value_mark): Use DISABLE_COPY_AND_ASSIGN.
2429 Add move constructor.
2430 * top.c (prepare_execute_command): Return scoped_value_mark.
2431 (execute_command): Update.
2433 2017-10-19 Pedro Alves <palves@redhat.com>
2435 * xml-support.c (xml_fetch_content_from_file): Check fread's
2438 2017-10-19 Pedro Alves <palves@redhat.com>
2440 * ser-base.c (ser_base_read_error_fd): Delete the file handler if
2442 (handle_error_fd): New function.
2443 (ser_base_async): Add/delete an event loop file handler for
2446 2017-10-19 Pedro Alves <palves@redhat.com>
2448 * xml-support.c (xml_fetch_content_from_file): Don't read in
2449 chunks. Instead use fseek to determine the file's size, and read
2452 2017-11-18 Keith Seitz <keiths@redhat.com>
2454 * c-exp.y (oper): Canonicalize conversion operators of user-defined
2456 Add whitespace to front of type name.
2458 2017-10-18 Keith Seitz <keiths@redhat.com>
2460 * dwarf2read.c (dwarf2_add_typedef): Issue a complaint on unhandled
2461 DW_AT_accessibility.
2463 2017-10-18 Yao Qi <yao.qi@linaro.org>
2465 * features/tic6x-c62x-linux.c: Remove.
2467 2017-10-17 Tom Tromey <tom@tromey.com>
2469 * disasm.c (do_mixed_source_and_assembly_deprecated): Use
2470 gdb::optional, ui_out_emit_list, ui_out_emit_tuple.
2471 (do_mixed_source_and_assembly): Likewise.
2473 2017-10-17 Tom Tromey <tom@tromey.com>
2475 * regcache.c (regcache::xfer_part): Remove assertion.
2477 2017-10-17 Pedro Alves <palves@redhat.com>
2479 * xml-support.c (xml_fetch_content_from_file): Call
2480 unique_ptr::release() instead unique_ptr::get() when passing
2483 2017-10-17 Yao Qi <yao.qi@linaro.org>
2485 * regcache.c (regcache::xfer_part): Remove parameters read and
2486 write, add parameter is_raw. All callers are updated.
2488 2017-10-16 Keith Seitz <keiths@redhat.com>
2490 * c-typeprint.c (enum access_specifier): Moved here from
2492 (output_access_specifier): New function.
2493 (c_type_print_base): Consider typedefs when assessing
2494 whether access labels are needed.
2495 Use output_access_specifier as needed.
2496 Output access specifier for typedefs, if needed.
2497 * dwarf2read.c (dwarf2_add_typedef): Record DW_AT_accessibility.
2498 * gdbtypes.h (struct typedef_field) <is_protected, is_private>: New
2500 (TYPE_TYPEDEF_FIELD_PROTECTED, TYPE_TYPEDEF_FIELD_PRIVATE): New
2503 2017-10-16 Tom Tromey <tom@tromey.com>
2505 * linux-tdep.c (linux_info_proc, linux_find_memory_regions_full)
2506 (linux_fill_prpsinfo, linux_vsyscall_range_raw): Update.
2507 * target.c (target_fileio_read_stralloc): Update.
2508 * sparc64-tdep.c (adi_is_addr_mapped): Update.
2509 * target.h (target_fileio_read_stralloc): Return
2512 2017-10-16 Tom Tromey <tom@tromey.com>
2514 * xml-syscall.c (xml_init_syscalls_info): Update.
2515 * xml-support.c (xinclude_start_include): Update.
2516 (xml_fetch_content_from_file): Return unique_xmalloc_ptr.
2517 * xml-support.h (xml_fetch_another): Return unique_xmalloc_ptr.
2518 (xml_fetch_content_from_file): Likewise.
2519 * osdata.c (get_osdata): Update.
2520 * target.h (target_read_stralloc, target_get_osdata): Return
2522 * solib-aix.c (solib_aix_get_library_list): Update.
2523 * solib-target.c (solib_target_current_sos): Update.
2524 * solib-svr4.c (svr4_current_sos_via_xfer_libraries): Update.
2525 * xml-tdesc.c (fetch_available_features_from_target): Update.
2526 (target_fetch_description_xml): Update.
2527 (file_read_description_xml): Update.
2528 * remote.c (remote_get_threads_with_qxfer, remote_memory_map)
2529 (remote_traceframe_info, btrace_read_config, remote_read_btrace)
2530 (remote_pid_to_exec_file): Update.
2531 * target.c (target_read_stralloc): Return unique_xmalloc_ptr.
2532 (target_get_osdata): Likewise.
2534 2017-10-16 Tom Tromey <tom@tromey.com>
2536 * remote.c (remote_register_number_and_offset): Use std::vector.
2537 (remote_set_syscall_catchpoint): Use gdb::unique_xmalloc_ptr.
2538 (putpkt_binary): Use gdb::def_vector.
2539 (compare_sections_command): Use gdb::byte_vector.
2541 2017-10-16 Tom Tromey <tom@tromey.com>
2543 * ppc-linux-nat.c (hwdebug_insert_point): Use
2544 gdb::unique_xmalloc_ptr, XDUP.
2546 2017-10-16 Tom Tromey <tom@tromey.com>
2548 * probe.c (parse_probes): Use std::string.
2549 (info_probes_for_ops, enable_probes_command)
2550 (disable_probes_command): Remove cleanups.
2552 2017-10-16 Tom Tromey <tom@tromey.com>
2554 * buildsym.c (block_compar): Remove.
2555 (end_symtab_get_static_block): Use std::vector.
2557 2017-10-16 Simon Marchi <simon.marchi@ericsson.com>
2559 * memrange.h (struct mem_range): Define operator< and operator==.
2560 (mem_range_s): Remove.
2561 (DEF_VEC_O (mem_range_s)): Remove.
2562 (normalize_mem_ranges): Change parameter type to std::vector.
2563 * memrange.c (compare_mem_ranges): Remove.
2564 (normalize_mem_ranges): Change parameter type to std::vector,
2565 adjust to vector change.
2566 * exec.c (section_table_available_memory): Return vector, remove
2568 (section_table_read_available_memory): Adjust to std::vector
2570 * remote.c (remote_read_bytes): Adjust to std::vector
2572 * tracepoint.h (traceframe_available_memory): Change parameter
2573 type to std::vector.
2574 * tracepoint.c (traceframe_available_memory): Change parameter
2575 type to std::vector, adjust.
2576 * gdb/mi/mi-main.c (mi_cmd_trace_frame_collected): Adjust to
2578 * gdb/Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
2579 unittests/memrange-selftests.c.
2580 (SUBDIR_UNITTESTS_OBS): Add memrange-selftests.o.
2581 * gdb/unittests/memrange-selftests.c: New file.
2583 2017-10-16 Pedro Alves <palves@redhat.com>
2585 * elfread.c (probe_key_free): Rename range-for variable.
2586 * probe.c (parse_probes_in_pspace, find_probes_in_objfile)
2587 (find_probe_by_pc, collect_probes): Rename range-for variable.
2589 2017-10-16 Yao Qi <yao.qi@linaro.org>
2591 * features/Makefile (XMLTOC): Remove tic6x-*.xml.
2592 * features/tic6x-c62x.c: Remove.
2593 * features/tic6x-c64x-linux.c: Remove.
2594 * features/tic6x-c64x.c: Remove.
2595 * features/tic6x-c64xp-linux.c: Remove.
2596 * features/tic6x-c64xp.c: Remove.
2597 * tic6x-linux-tdep.c (_initialize_tic6x_linux_tdep): Don't call
2598 initialize_tdesc_tic6x_*_linux functions.
2599 * tic6x-tdep.c (_initialize_tic6x_tdep): Don't call
2600 initialize_tdesc_tic6x_* functions.
2602 2017-10-16 Yao Qi <yao.qi@linaro.org>
2604 * features/Makefile (WHICH): Remove tic6x-c64xp, tic6x-c64x
2606 * regformats/tic6x-c62x.dat: Remove.
2607 * regformats/tic6x-c64x.dat: Remove.
2608 * regformats/tic6x-c64xp.dat: Remove.
2610 2017-10-15 Simon Marchi <simon.marchi@ericsson.com>
2612 * tracepoint.c (parse_traceframe_info): Return a unique_ptr
2613 (the !HAVE_LIBEXPAT version).
2615 2017-10-14 Simon Marchi <simon.marchi@ericsson.com>
2617 * nat/linux-osdata.c (struct pid_pgid_entry) <operator<>: Make
2620 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
2622 * target.h: Include tracepoint.h.
2623 (enum trace_find_type): Move to tracepoint.h.
2624 (struct target_ops) <to_traceframe_info>: Return a unique ptr.
2625 * tracepoint.h: Don't include target.h
2626 (enum trace_find_type): Move from target.h.
2627 (parse_traceframe_info): Return a unique ptr.
2628 * tracepoint.c (current_traceframe_info): Change type to unique
2630 (free_traceframe_info): Remove.
2631 (clear_traceframe_info): Don't manually free
2632 current_traceframe_info.
2633 (free_result): Remove.
2634 (parse_traceframe_info): Return a unique ptr.
2635 (get_traceframe_info): Adjust to unique ptr.
2636 * ctf.c (ctf_traceframe_info): Return a unique ptr.
2637 * remote.c (remote_traceframe_info): Return a unique ptr.
2638 * tracefile-tfile.c (tfile_traceframe_info): Return a unique
2640 * target-debug.h (target_debug_print_traceframe_info_up): New
2642 * target-delegates.c: Regenerate.
2644 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
2646 * memrange.h (struct mem_range): Add constructors.
2647 * tracepoint.h (struct traceframe_info) <memory>: Change type to
2648 std::vector<mem_range>.
2649 * tracepoint.c (free_traceframe_info): Don't manually free
2651 (traceframe_info_start_memory): Adjust to vector change.
2652 (traceframe_available_memory): Likewise.
2653 * tracefile-tfile.c (build_traceframe_info): Likewise.
2654 * ctf.c (ctf_traceframe_info): Likewise.
2656 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
2658 * tracepoint.h (struct traceframe_info) <tvars>: Change type to
2660 * tracepoint.c (free_traceframe_info): Deallocate with delete.
2661 (traceframe_info_start_tvar): Adjust to vector change.
2662 (parse_traceframe_info): Allocate with new.
2663 * ctf.c (ctf_traceframe_info): Allocate with new, adjust to
2665 * tracefile-tfile.c (build_traceframe_info): Adjust to vector
2667 tfile_traceframe_info): Allocate with new.
2668 * mi/mi-main.c (mi_cmd_trace_frame_collected): Adjust to vector
2671 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
2673 * tracepoint.c (traceframe_info): Rename to...
2674 (current_traceframe_info): ...this.
2675 (clear_traceframe_info): Adjust.
2676 (get_traceframe_info): Adjust.
2678 2017-10-14 Simon Marchi <simon.marchi@ericsson.com>
2680 * nat/linux-osdata.c: Include algorithm.
2681 (compare_processes): Remove.
2682 (struct pid_pgid_entry): New struct.
2683 (linux_xfer_osdata_processgroups): Use std::vector instead of
2686 2017-10-14 Simon Marchi <simon.marchi@ericsson.com>
2688 * objfiles.h: Don't include symfile.h.
2689 (struct partial_symbol): Remove forward-declaration.
2690 (struct objfile) <global_psymbols, static_psymbols>: Change type
2691 to std::vector<partial_symbol *>.
2692 * objfiles.c (objfile::objfile): Don't memset those fields.
2693 (objfile::~objfile): Don't free those fields.
2694 * psympriv.h (struct psymbol_allocation_list): Remove
2695 forward-declaration.
2696 (add_psymbol_to_list): Change psymbol_allocation_list parameter
2698 (start_psymtab_common): Change parameters to std::vector.
2699 * psymtab.c: Include algorithm.
2700 (require_partial_symbols): Call shrink_to_fit.
2701 (find_pc_sect_psymbol): Adjust to vector change.
2702 (match_partial_symbol): Likewise.
2703 (lookup_partial_symbol): Likewise.
2704 (psym_relocate): Likewise.
2705 (dump_psymtab): Likewise.
2706 (recursively_search_psymtabs): Likewise.
2707 (compare_psymbols): Remove.
2708 (sort_pst_symbols): Adjust to vector change.
2709 (start_psymtab_common): Likewise.
2710 (end_psymtab_common): Likewise.
2711 (psymbol_bcache_full): De-constify return value.
2712 (add_psymbol_to_bcache): Likewise.
2713 (extend_psymbol_list): Remove.
2714 (append_psymbol_to_list): Adjust to vector change.
2715 (add_psymbol_to_list): Likewise.
2716 (init_psymbol_list): Likewise.
2717 (maintenance_info_psymtabs): Likewise.
2718 (maintenance_check_psymtabs): Likewise.
2719 * symfile.h (struct psymbol_allocation_list): Remove.
2720 * symfile.c (reread_symbols): Adjust to vector change.
2721 * dbxread.c (start_psymtab): Change type of parameters.
2722 (dbx_symfile_read): Adjust to vector change.
2723 (read_dbx_symtab): Likewise.
2724 (start_psymtab): Change type of parameters.
2725 * dwarf2read.c (dwarf2_build_psymtabs): Adjust to vector change.
2726 (create_partial_symtab): Likewise.
2727 (add_partial_symbol): Likewise.
2728 (write_one_signatured_type): Likewise.
2729 (recursively_write_psymbols): Likewise.
2730 * mdebugread.c (parse_partial_symbols): Likewise.
2731 * xcoffread.c (xcoff_start_psymtab): Change type of parameters.
2732 (scan_xcoff_symtab): Adjust to vector change.
2733 (xcoff_initial_scan): Likewise.
2735 2017-10-13 Simon Marchi <simon.marchi@ericsson.com>
2737 * ada-typeprint.c (print_dynamic_range_bound): Use std::string.
2739 2017-10-13 Yao Qi <yao.qi@linaro.org>
2741 * features/Makefile: Remove tic6x-*-expedite, add tic6x-expedite.
2742 Remove s390x-*-expedite, add s390x-expedite.
2744 2017-10-13 Yao Qi <yao.qi@linaro.org>
2746 * features/s390-gs-linux64.c: Regenerated.
2747 * features/s390x-gs-linux64.c: Regenerated.
2749 2017-10-13 Tom Tromey <tom@tromey.com>
2751 * compile/compile-object-run.c (do_module_cleanup): Use delete.
2752 * solib.c (update_solib_list, reload_shared_libraries_1): Use
2754 * symfile.c (symbol_file_add_with_addrs): Use new.
2755 (symbol_file_add_separate): Update comment.
2756 (syms_from_objfile_1, remove_symbol_file_command): Use delete.
2757 * jit.c (jit_object_close_impl): Use new.
2758 (jit_unregister_code): Use delete.
2759 * objfiles.c (objfile::objfile): Rename from allocate_objfile.
2760 (~objfile): Rename from free_objfile.
2761 (free_objfile_separate_debug, do_free_objfile_cleanup)
2762 (free_all_objfiles, objfile_purge_solibs): Use delete.
2763 * objfiles.h (struct objfile): Add constructor and destructor.
2764 Use DISABLE_COPY_AND_ASSIGN. Add initializers to data members.
2765 (allocate_objfile, free_objfile): Don't declare.
2766 (struct objstats): Add initializers.
2768 2017-10-12 Simon Marchi <simon.marchi@ericsson.com>
2770 * arch-utils.h (simple_displaced_step_copy_insn): Remove.
2771 * arch-utils.c (simple_displaced_step_copy_insn): Remove.
2772 * gdbarch.sh (displaced_step_copy_insn): Adjust comment.
2773 * gdbarch.h: Regenerate.
2774 * i386-linux-tdep.c (i386_linux_displaced_step_copy_insn):
2776 * i386-tdep.c (i386_displaced_step_copy_insn): Adjust comment.
2777 (i386_displaced_step_fixup): Adjust comment.
2778 * rs6000-tdep.c (ppc_displaced_step_copy_insn): Adjust comment.
2780 2017-10-12 Tom Tromey <tom@tromey.com>
2782 * prologue-value.h (pv_area::store_would_trash): Return bool.
2783 (pv_area::find_reg): Likewise.
2784 * prologue-value.c (pv_area::store_would_trash): Return bool.
2785 (pv_area::find_reg): Likewise.
2787 2017-10-12 Tom Tromey <tom@tromey.com>
2789 * s390-linux-tdep.c (s390_store, s390_load)
2790 (s390_check_for_saved, s390_analyze_prologue): Update.
2791 * rx-tdep.c (check_for_saved, rx_analyze_prologue): Update.
2792 * rl78-tdep.c (rl78_analyze_prologue, check_for_saved): Update.
2793 * prologue-value.h (class pv_area): Move from prologue-value.c.
2794 Change names of members. Add constructor, destructor, member
2796 (make_pv_area, free_pv_area, make_cleanup_free_pv_area)
2797 (pv_area_store, pv_area_fetch, pv_area_store_would_trash)
2798 (pv_area_fetch, pv_area_scan): Don't declare.
2799 * prologue-value.c (struct pv_area::area_entry): Now member of
2801 (struct pv_area): Move to prologue-value.h.
2802 (pv_area::pv_area): Rename from make_pv_area.
2803 (pv_area::~pv_area): Rename from free_pv_area.
2804 (do_free_pv_area_cleanup, make_cleanup_free_pv_area): Remove.
2805 (clear_entries, find_entry, overlaps, store_would_trash, store)
2806 (fetch, find_reg, scan): Now member of pv_area.
2807 Remove "area" argument. Update.
2808 * msp430-tdep.c (check_for_saved, msp430_analyze_prologue):
2810 * mn10300-tdep.c (push_reg, check_for_saved)
2811 (mn10300_analyze_prologue): Update.
2812 * mep-tdep.c (is_arg_spill, check_for_saved)
2813 (mep_analyze_prologue): Update.
2814 * m32c-tdep.c (m32c_pv_push, m32c_srcdest_fetch)
2815 (m32c_srcdest_store, m32c_pv_enter, m32c_is_arg_spill)
2816 (m32c_is_struct_return, m32c_analyze_prologue): Update.
2817 * arm-tdep.c (thumb_analyze_prologue, arm_analyze_prologue):
2819 * arc-tdep.c (arc_is_in_prologue, arc_analyze_prologue): Update.
2820 * aarch64-tdep.c (aarch64_analyze_prologue): Update.
2822 2017-10-12 Simon Marchi <simon.marchi@ericsson.com>
2824 * linux-nat.h (linux_nat_set_delete_thread): New declaration.
2825 * linux-nat.c (linux_nat_delete_thread): New variable.
2826 (lwp_free): Invoke linux_nat_delete_thread if set.
2827 (linux_nat_set_delete_thread): New function.
2828 * aarch64-linux-nat.c (_initialize_aarch64_linux_nat): Assign
2829 thread delete callback.
2830 * arm-linux-nat.c (arm_linux_delete_thread): New function.
2831 (_initialize_arm_linux_nat): Assign thread delete callback.
2832 * s390-linux-nat.c (s390_delete_thread): New function.
2833 (_initialize_s390_nat): Assign thread delete callback.
2834 * x86-linux-nat.c (x86_linux_add_target): Likewise.
2835 * nat/aarch64-linux.c (aarch64_linux_delete_thread): New
2837 * nat/aarch64-linux.h (aarch64_linux_delete_thread): New
2839 * nat/x86-linux.c (x86_linux_delete_thread): New function.
2840 * nat/x86-linux.h (x86_linux_delete_thread): New declaration.
2842 2017-10-09 Tom Tromey <tom@tromey.com>
2844 * tui/tui-win.c (tui_set_win_height, parse_scrolling_args): Use
2846 * tui/tui-layout.c (enum tui_status): Use std::string.
2848 2017-10-11 Tom Tromey <tom@tromey.com>
2850 * gdbthread.h (thread_command): Constify.
2851 * inferior.h (detach_command): Constify.
2852 * top.h (set_history, show_history): Constify.
2853 * arm-tdep.c (set_arm_command, show_arm_command): Constify.
2854 * serial.c (serial_set_cmd, serial_show_cmd): Constify.
2855 * bsd-kvm.c (bsd_kvm_cmd): Constify.
2856 * printcmd.c (set_command): Constify.
2857 (non_const_set_command): New function.
2858 * dcache.c (set_dcache_command, show_dcache_command): Constify.
2859 * breakpoint.c (enable_command, disable_command, delete_command)
2860 (catch_command, tcatch_command, set_breakpoint_cmd)
2861 (show_breakpoint_cmd): Constify.
2862 * macrocmd.c (macro_command): Constify.
2863 * infcmd.c (unset_command, kill_command, detach_command)
2864 (info_proc_cmd): Constify.
2865 * i386-tdep.c (set_mpx_cmd, show_mpx_cmd): Constify.
2866 * auto-load.c (show_auto_load_cmd, set_auto_load_cmd)
2867 (info_auto_load_cmd): Constify.
2868 * target-descriptions.c (set_tdesc_cmd, show_tdesc_cmd)
2869 (unset_tdesc_cmd): Constify.
2870 * ada-lang.c (set_ada_command, show_ada_command)
2871 (maint_set_ada_cmd, maint_show_ada_cmd): Constify.
2872 * guile/guile.c (set_guile_command, show_guile_command)
2873 (info_guile_command): Constify.
2874 * tui/tui-win.c (tui_command, set_tui_cmd, show_tui_cmd):
2876 * skip.c (skip_command): Constify.
2877 * compile/compile.c (_initialize_compile): Constify.
2878 * dwarf2read.c (set_dwarf_cmd, show_dwarf_cmd): Constify.
2879 * btrace.c (maint_btrace_cmd, maint_btrace_set_cmd)
2880 (maint_btrace_show_cmd, maint_btrace_pt_set_cmd)
2881 (maint_btrace_pt_show_cmd): Constify.
2882 * remote.c (set_remote_cmd, show_remote_cmd, remote_command):
2884 * python/python.c (user_show_python, user_set_python): Constify.
2885 * mips-tdep.c (set_mips_command, show_mips_command)
2886 (set_mipsfpu_command): Constify.
2887 * record-btrace.c (cmd_record_btrace_start)
2888 (cmd_set_record_btrace, cmd_show_record_btrace)
2889 (cmd_set_record_btrace_bts, cmd_show_record_btrace_bts)
2890 (cmd_set_record_btrace_pt, cmd_show_record_btrace_pt): Constify.
2891 * rs6000-tdep.c (set_powerpc_command, show_powerpc_command):
2893 * symfile.c (overlay_command): Constify.
2894 * spu-tdep.c (set_spu_command, show_spu_command): Constify.
2895 * cli/cli-logging.c (set_logging_command, show_logging_command):
2897 * cli/cli-dump.c (dump_command, append_command)
2898 (srec_dump_command, ihex_dump_command, verilog_dump_command)
2899 (tekhex_dump_command, binary_dump_command)
2900 (binary_append_command): Constify.
2901 * cli/cli-decode.c (struct cmd_list_element): Change type of
2903 * cli/cli-cmds.c (info_command, show_command, set_debug)
2904 (show_debug): Constify.
2905 (show_command): Add non-const overload.
2906 * top.c (set_history, show_history): Constify.
2907 * sh-tdep.c (set_sh_command, show_sh_command): Constify.
2908 * command.h (add_prefix_cmd): Accept a cmd_const_cfunc_ftype.
2909 * target.c (target_command): Constify.
2910 * sparc64-tdep.c (info_adi_command): Constify.
2911 * record-full.c (cmd_record_full_start): Constify.
2912 (set_record_full_command): Constify. Fix typo.
2913 (show_record_full_command): Constify.
2914 * thread.c (thread_command, thread_apply_command): Constify.
2915 * memattr.c (dummy_cmd): Constify.
2916 * value.c (function_command): Constify.
2917 * frame.c (set_backtrace_cmd, show_backtrace_cmd): Constify.
2918 * probe.c (info_probes_command): Constify.
2919 * ser-tcp.c (set_tcp_cmd, show_tcp_cmd): Constify.
2920 * gnu-nat.c (set_task_cmd, show_task_cmd, set_thread_cmd)
2921 (show_thread_cmd, set_thread_default_cmd)
2922 (show_thread_default_cmd): Constify.
2923 (check_empty): Constify.
2924 * tracepoint.c (tfind_command): Constify.
2925 * cp-support.c (maint_cplus_command): Constify.
2926 * windows-tdep.c (info_w32_command): Constify.
2927 * record.c (cmd_record_start, set_record_command)
2928 (show_record_command, info_record_command, cmd_record_goto):
2930 * ravenscar-thread.c (set_ravenscar_command)
2931 (show_ravenscar_command): Constify.
2932 * utils.c (set_internal_problem_cmd, show_internal_problem_cmd):
2934 (add_internal_problem_command): Remove casts.
2935 * arc-tdep.c (maintenance_print_arc_command): Constify.
2936 * valprint.c (set_print, show_print, set_print_raw)
2937 (show_print_raw): Constify.
2938 * maint.c (maintenance_command, maintenance_info_command)
2939 (maintenance_print_command, maintenance_set_cmd)
2940 (maintenance_show_cmd, set_per_command_cmd)
2941 (show_per_command_cmd, maintenance_check_command): Constify.
2942 * language.c (set_check, show_check): Constify.
2943 * typeprint.c (show_print_type, set_print_type): Constify.
2944 * go32-nat.c (go32_info_dos_command): Constify.
2946 2017-10-11 Tom Tromey <tom@tromey.com>
2948 * breakpoint.c (prepare_re_set_context): Remove.
2949 (breakpoint_re_set_one): Update. Don't use cleanups.
2950 (breakpoint_re_set): Use scoped_restore, std::string, and
2951 scoped_restore_current_language.
2953 2017-10-11 Tom Tromey <tom@tromey.com>
2955 * breakpoint.c (commands_command_1): Use std::string.
2956 (cleanup_executing_breakpoints): Remove.
2957 (bpstat_do_actions_1): Use scoped_restore.
2958 (bpstat_check_watchpoint): Use std::string.
2959 (decode_static_tracepoint_spec): Likewise.
2960 (break_range_command): Likewise.
2961 (watch_command_1): Likewise.
2962 (compare_breakpoints): Change argument types.
2963 (clear_command): Use std::vector.
2964 (cleanup_executing_breakpoints): Remove.
2965 (update_global_location_list): Use unique_xmalloc_ptr.
2966 (strace_command): Remove unused declaration.
2968 2017-10-11 John Baldwin <jhb@FreeBSD.org>
2970 * Makefile.in (ALLDEPFILES): Add arm-fbsd-nat.c.
2971 * NEWS: Mention new FreeBSD/arm native configuration.
2972 * configure.host: Add arm*-*-freebsd*.
2973 * configure.nat: Likewise.
2974 * arm-fbsd-nat.c: New file.
2976 2017-10-11 John Baldwin <jhb@FreeBSD.org>
2978 * Makefile.in (ALL_TARGET_OBS): Add arm-fbsd-tdep.o.
2979 (ALLDEPFILES): Add arm-fbsd-tdep.c.
2980 * NEWS: Mention new FreeBSD/arm target.
2981 * configure.tgt: Add arm*-*-freebsd*.
2982 * arm-fbsd-tdep.c: New file.
2983 * arm-fbsd-tdep.h: New file.
2985 2017-10-11 Maciej W. Rozycki <macro@imgtec.com>
2987 * linux-tdep.c (linux_make_corefile_notes): Remove call to
2988 `gdbarch_elfcore_write_linux_prpsinfo'.
2989 * gdbarch.sh (elfcore_write_linux_prpsinfo): Remove architecture
2991 (elf_internal_linux_prpsinfo): Remove declaration.
2992 * gdbarch.h: Regenerate.
2993 * gdbarch.c: Regenerate.
2995 2017-10-11 Maciej W. Rozycki <macro@imgtec.com>
2997 * ppc-linux-tdep.c (ppc_linux_init_abi): Remove call to
2998 `set_gdbarch_elfcore_write_linux_prpsinfo'.
3000 2017-10-11 Pedro Alves <palves@redhat.com>
3002 * breakpoint.c (reattach_breakpoints): Delete.
3003 * breakpoint.h (reattach_breakpoints): Delete.
3005 2017-10-11 Simon Marchi <simon.marchi@ericsson.com>
3007 * symfile.c (registered_sym_fns): Make struct, not typedef.
3008 (DEF_VEC_O (registered_sym_fns)): Remove.
3009 (symtab_fns): Change type to std::vector.
3010 (add_symtab_fns): Adjust.
3011 (find_sym_fns): Adjust.
3013 2017-10-11 Anton Kolesov <Anton.Kolesov@synopsys.com>
3015 * arc-tdep.c (arc_gdbarch_init): Pass proper cpu value to disassembler.
3016 * arc-tdep.h (arc_arch_is_em): New function.
3017 (arc_arch_is_hs): Likewise.
3019 2017-10-11 Egeyar Bagcioglu <egeyar.bagcioglu@oracle.com>
3021 * macrotab.h (macro_lookup_inclusion): Remove unnecessary
3022 parentheses in the declaration.
3023 (macro_lookup_inclusion): Likewise.
3024 (macro_lookup_definition): Likewise.
3025 * p-lang.h (pascal_builtin_types): Likewise.
3026 * tui/tui-data.c (tui_win_list): Likewise.
3027 * tui/tui-data.h (tui_win_list): Likewise.
3028 * utils.h (make_cleanup_free_section_addr_info): Likewise.
3030 2017-10-11 Mark Rages <markrages@gmail.com>
3032 * target-memory.c (block_boundaries): Fix for block address not
3033 aligned on block size.
3035 2017-10-10 Pedro Alves <palves@redhat.com>
3036 Tom Tromey <tom@tromey.com>
3038 * breakpoint.c (struct captured_breakpoint_query_args)
3039 (do_captured_breakpoint_query, gdb_breakpoint_query): Delete.
3040 (print_breakpoint): New.
3041 * breakpoint.h (print_breakpoint): Declare.
3042 * common/common-exceptions.h (enum return_reason): Remove
3043 references to catch_exceptions.
3044 * exceptions.c (catch_exceptions, catch_exceptions_with_msg):
3046 * exceptions.h (catch_exceptions_ftype, catch_exceptions)
3047 (catch_exception_ftype, catch_exceptions_with_msg): Delete.
3049 * gdbthread.h (thread_select): Declare.
3050 * mi/mi-cmd-break.c: Don't include gdb.h.
3051 (breakpoint_notify): Use print_breakpoint.
3052 * mi/mi-cmd-catch.c: Don't include gdb.h.
3053 * mi/mi-interp.c: Don't include gdb.h.
3054 (mi_print_breakpoint_for_event): New.
3055 (mi_breakpoint_created, mi_breakpoint_modified): Use
3056 mi_print_breakpoint_for_event.
3057 * mi/mi-main.c: Don't include gdb.h.
3058 (mi_cmd_thread_select): Parse the global thread ID here. Use
3059 thread_select instead of gdb_thread_select.
3060 (mi_cmd_thread_list_ids): Output "thread-ids" tuple here instead
3061 of using gdb_list_thread_ids.
3062 * remote-fileio.c (do_remote_fileio_request): Change type. Reply
3064 (remote_fileio_request): Use TRY/CATCH instead of
3066 * symfile-mem.c (struct symbol_file_add_from_memory_args)
3067 (symbol_file_add_from_memory_wrapper): Delete.
3068 (add_vsyscall_page): Use TRY/CATCH instead of catch_exceptions.
3069 * thread.c: Don't include gdb.h.
3070 (do_captured_list_thread_ids, gdb_list_thread_ids): Delete.
3071 (thread_alive): Use thread_select.
3072 (do_captured_thread_select): Delete, parts salvaged as ...
3073 (thread_select): ... this new function.
3074 (gdb_thread_select): Delete.
3076 2017-10-10 Pedro Alves <palves@redhat.com>
3077 Tom Tromey <tom@tromey.com>
3079 * breakpoint.c (breakpoint_cond_eval): Change return type to bool
3081 (WP_DELETED, WP_VALUE_CHANGED, WP_VALUE_NOT_CHANGED, WP_IGNORE):
3082 No longer macros. Instead ...
3083 (enum wp_check_result): They're now values of this new
3085 (watchpoint_check): Change return type to wp_check_result and
3086 parameter type to bpstat.
3087 (bpstat_check_watchpoint): Use TRY/CATCH instead of catch_errors.
3088 (bpstat_check_breakpoint_conditions): Use TRY/CATCH instead of
3089 catch_errors. Reverse logic of watchpoint_check call.
3090 (breakpoint_re_set_one): Now returns void and takes a breakpoint
3091 pointer as parameter.
3092 (breakpoint_re_set): Use TRY/CATCH instead of catch_errors.
3093 * common/common-exceptions.c (throw_exception_sjlj): Update
3094 comments to avoid mentioning catch_errors.
3095 * exceptions.c (catch_errors): Delete.
3096 * exceptions.h: Update comments to avoid mentioning catch_errors.
3097 (catch_errors_ftype, catch_errors): Delete.
3098 * infrun.c (normal_stop): Use TRY/CATCH instead of catch_errors.
3099 (hook_stop_stub): Delete.
3100 (restore_selected_frame): Change return type to void, and
3101 parameter type to const frame_id &.
3102 (restore_infcall_control_state): Use TRY/CATCH instead of
3104 * main.c (captured_command_loop): Return void and remove
3105 parameter. Remove references to catch_errors.
3106 (captured_main): Use TRY/CATCH instead of catch_errors.
3107 * objc-lang.c (objc_submethod_helper_data)
3108 (find_objc_msgcall_submethod_helper): Delete.
3109 (find_objc_msgcall_submethod): Use TRY/CATCH instead of
3111 * record-full.c (record_full_message): Return void.
3112 (record_full_message_args, record_full_message_wrapper): Delete.
3113 (record_full_message_wrapper_safe): Return bool and use TRY/CATCH
3114 instead of catch_errors.
3115 * solib-aix.c (solib_aix_open_symbol_file_object): Change
3116 parameter type to int.
3117 * solib-darwin.c (open_symbol_file_object): Ditto.
3118 * solib-dsbt.c (open_symbol_file_object): Ditto.
3119 * solib-frv.c (open_symbol_file_object): Ditto.
3120 * solib-svr4.c (open_symbol_file_object): Ditto.
3121 * solib-target.c (solib_target_open_symbol_file_object): Ditto.
3122 * solib.c (update_solib_list): Use TRY/CATCH instead of
3124 * solist.h (struct target_so_ops) <open_symbol_file_object>:
3126 * symmisc.c (struct print_symbol_args): Remove.
3127 (dump_symtab_1): Use TRY/CATCH instead of catch_errors.
3128 (print_symbol): Change type.
3129 * windows-nat.c (handle_load_dll, handle_unload_dll): Return void
3130 and remove parameters.
3131 (catch_errors): New.
3132 (get_windows_debug_event): Adjust.
3134 2017-10-09 Tom Tromey <tom@tromey.com>
3136 * mi/mi-main.c (free_splay_tree): Remove.
3137 (list_available_thread_groups): Use splay_tree_up.
3138 * common/gdb_splay_tree.h: New file.
3140 2017-10-09 Tom Tromey <tom@tromey.com>
3142 * mi/mi-main.c (do_nothing): Remove.
3143 (list_available_thread_groups): Update.
3145 2017-10-09 Pedro Alves <palves@redhat.com>
3147 * infrun.c (handle_inferior_event_1) <TARGET_WAITKIND_EXECD>: Skip
3148 reading registers when switching context.
3150 2017-10-09 John Baldwin <jhb@FreeBSD.org>
3152 * fbsd-nat.c (fbsd_siginfo_size): Use gdbarch_long_bit.
3153 (fbsd_convert_siginfo): Likewise.
3154 * fbsd-tdep.c (fbsd_core_xfer_siginfo): Likewise.
3156 2017-10-09 Simon Marchi <simon.marchi@polymtl.ca>
3158 * configure.ac (try_guile_versions): Remove guile-2.2.
3159 * configure: Regenerate.
3161 2017-10-09 Tom Tromey <tom@tromey.com>
3163 * Makefile.in (COMPILE.post, POSTCOMPILE): Restore $(basename).
3164 (COMPILE.pre): Use $(CXX).
3166 2017-10-09 Pedro Alves <palves@redhat.com>
3168 * cp-support.c (cp_remove_params): Return a gdb::unique_xmalloc_ptr.
3170 (overload_list_add_symbol): Adjust to use gdb::unique_xmalloc_ptr.
3171 * cp-support.h (cp_remove_params): Now returns a
3172 gdb::unique_xmalloc_ptr.
3173 * dwarf2read.c (find_slot_in_mapped_hash): Now returns bool.
3174 Adjust to cp_remove_params returning a gdb::unique_xmalloc_ptr.
3175 * psymtab.c (psymtab_search_name): Adjust to cp_remove_params
3176 returning a gdb::unique_xmalloc_ptr.
3177 (lookup_partial_symbol): Adjust to use gdb::unique_xmalloc_ptr.
3178 * stack.c (find_frame_funname): Adjust to cp_remove_params
3179 returning a gdb::unique_xmalloc_ptr.
3181 2017-10-08 Tom Tromey <tom@tromey.com>
3183 * dwarf2read.c (dwarf2_get_dwz_file): Use
3184 gdb::unique_xmalloc_ptr.
3185 (find_slot_in_mapped_hash): Likewise.
3186 (dwarf2_physname): Likewise.
3187 (create_dwo_unit_in_dwp_v1): Use std::string.
3188 (create_dwo_unit_in_dwp_v2): Likewise.
3189 (lookup_dwo_cutu): Likewise.
3190 (inherit_abstract_dies): Use std::vector.
3191 (read_array_type): Likewise.
3192 (dwarf_decode_macros): Remove unused declaration.
3193 (unsigned_int_compar): Remove.
3194 (dwarf2_build_psymtabs_hard): Use scoped_restore.
3195 (psymtabs_addrmap_cleanup): Remove.
3197 2017-10-08 Tom Tromey <tom@tromey.com>
3199 * frame-unwind.c (frame_unwind_try_unwinder): Update.
3200 * frame.h (frame_cleanup_after_sniffer): Declare.
3201 (frame_prepare_for_sniffer): Return void.
3202 * frame.c (frame_cleanup_after_sniffer): No longer static. Change
3204 (frame_prepare_for_sniffer): Return void.
3206 2017-10-08 Tom Tromey <tom@tromey.com>
3208 * utils.h (make_cleanup_value_free): Remove.
3209 * utils.c (do_value_free, struct cleanup): Remove.
3210 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full) <DWARF_VALUE_STACK>:
3212 * value.h (struct value_deleter): New.
3213 (gdb_value_up): New typedef.
3215 2017-10-08 Tom Tromey <tom@tromey.com>
3217 * symtab.c (free_search_symbols, do_free_search_symbols_cleanup)
3218 (make_cleanup_free_search_symbols): Remove.
3219 (search_symbols): Return std::vector.
3220 (symbol_search::compare_search_syms): Now member of
3221 symbol_search. Change arguments.
3222 (sort_search_symbols_remove_dups): Change arguments. Rewrite.
3223 (symtab_symbol_info, rbreak_command): Update.
3224 * symtab.h (struct symbol_search) <next>: Remove.
3226 (symbol_search::operator<): New function.
3227 (symbol_search::operator==): New function.
3228 (search_symbols): Remove std::vector.
3229 (free_search_symbols, make_cleanup_free_search_symbols): Remove.
3230 (symbol_search::compare_search_syms): Declare.
3232 2017-10-06 Yao Qi <yao.qi@linaro.org>
3234 * Makefile.in (ALL_64_TARGET_OBS): Replace aarch64-insn.o with
3235 arch/aarch64-insn.o.
3237 * configure.tgt: Replace aarch64-insn.o with arch/aarch64-insn.o.
3239 2017-10-06 Yao Qi <yao.qi@linaro.org>
3241 * Makefile.in (ALL_TARGET_OBS): Replace arm.o, arm-get-next-pcs.o,
3242 and arm-linux.o with arch/arm.o, arch/arm-get-next-pcs.o and
3243 arch/arm-linux.o respectively.
3244 * configure.tgt: Likewise.
3246 2017-10-06 Yao Qi <yao.qi@linaro.org>
3248 * Makefile.in (ALL_TARGET_OBS): Rename i386.o to arch/i386.o.
3249 * configure.tgt (i386_tobjs): Replace i386.o with arch/i386.o.
3251 2017-10-06 Pedro Alves <palves@redhat.com>
3253 * windows-nat.c: Include <algorithm>.
3255 2017-10-06 Yao Qi <yao.qi@linaro.org>
3257 * configure.tgt (i386_tobjs): New variable.
3258 (amd64_tobjs): New variable.
3259 Set $cpu_obs and $os_obs.
3261 2017-10-06 Yao Qi <yao.qi@linaro.org>
3263 * Makefile.in (CONFIG_SRC_SUBDIR): New.
3264 (ALL_64_TARGET_OBS): Replace amd64.o with arch/amd64.o.
3265 (clean): Remove object files and dependency files.
3266 (distclean): Remove the directory.
3267 * configure.ac: Invoke AC_CONFIG_COMMANDS.
3268 * configure: Re-generated.
3269 * configure.tgt: Replace amd64.o with arch/amd64.o.
3271 2017-10-05 Jose E. Marchesi <jose.marchesi@oracle.com>
3274 * arm-tdep.c (arm_decode_misc_memhint_neon): Fix decoding of CPS
3277 2017-10-05 Pedro Alves <palves@redhat.com>
3279 * linux-nat.c (linux_child_follow_fork): When following the parent
3280 and detaching the child, consult the parent thread's architecture
3281 instead of the child's.
3283 2017-10-05 Ulrich Weigand <uweigand@de.ibm.com>
3285 * ax.h: Do not include "doublest.h".
3286 (union agent_val): Remove.
3288 2017-10-05 Ulrich Weigand <uweigand@de.ibm.com>
3290 * dfp.h (MAX_DECIMAL_STRING): Move to dfp.c.
3291 (decimal_to_string): Return std::string object.
3292 (decimal_from_string): Accept std::string object. Return bool.
3293 (decimal_from_integral, decimal_from_doublest): Remove.
3294 (decimal_from_longest): Add prototype.
3295 (decimal_from_ulongest): Likewise.
3296 (decimal_to_longest): Likewise.
3297 (decimal_from_doublest): Likewise.
3298 * dfp.c: Do not include "gdbtypes.h" or "value.h".
3299 (MAX_DECIMAL_STRING): Move here.
3300 (decimal_to_string): Return std::string object.
3301 (decimal_from_string): Accept std::string object. Return bool.
3302 (decimal_from_integral): Remove, replace by ...
3303 (decimal_from_longest, decimal_from_ulongest): ... these new functions.
3304 (decimal_to_longest): New function.
3305 (decimal_from_floating): Remove, replace by ...
3306 (decimal_from_doublest): ... this new function.
3307 (decimal_to_doublest): Update to new decimal_to_string interface.
3309 * value.c (unpack_long): Use decimal_to_longest.
3310 * valops.c (value_cast): Use decimal_from_doublest instead of
3311 decimal_from_floating. Use decimal_from_[u]longest isntead of
3312 decimal_from_integral.
3313 * valarith.c (value_args_as_decimal): Likewise.
3314 * valprint.c (print_decimal_floating): Update to new
3315 decimal_to_string interface.
3316 * printcmd.c (printf_decfloat): Likewise.
3317 * c-exp.y (parse_number): Update to new decimal_from_string interface.
3319 2017-10-05 Ulrich Weigand <uweigand@de.ibm.com>
3321 * doublest.h: Do not include "floatformat.h". Remove stale comments.
3322 * gdbtypes.c: Include "floatformat.h".
3323 * value.c: Likewise.
3324 * m68k-tdep.c: Likewise.
3326 * findvar.c: Do not include "floatformat.h".
3327 * amd64-darwin-tdep.c: Likewise.
3328 * arm-linux-tdep.c: Likewise.
3329 * i386-darwin-tdep.c: Likewise.
3330 * i387-tdep.c: Likewise.
3331 * m68k-linux-tdep.c: Likewise.
3332 * mep-tdep.c: Likewise.
3333 * mips-tdep.c: Likewise.
3334 * nios2-tdep.c: Likewise.
3335 * s390-linux-tdep.c: Likewise.
3336 * sparc-obsd-tdep.c: Likewise.
3337 * sparc-tdep.c: Likewise.
3338 * sparc64-tdep.c: Likewise.
3339 * spu-tdep.c: Likewise.
3340 * tic6x-tdep.c: Likewise.
3341 * tilegx-tdep.c: Likewise.
3342 * vax-tdep.c: Likewise.
3343 * xstormy16-tdep.c: Likewise.
3344 * xtensa-tdep.c: Likewise.
3346 * top.c: Do not include "doublest.h".
3347 * aarch64-tdep.c: Likewise.
3348 * alpha-tdep.c: Likewise.
3349 * arm-linux-tdep.c: Likewise.
3350 * m68k-linux-tdep.c: Likewise.
3351 * tilegx-tdep.c: Likewise.
3352 * xstormy16-tdep.c: Likewise.
3354 2017-10-05 John Baldwin <jhb@FreeBSD.org>
3356 * mips-fbsd-tdep.c (MIPS_INST_ADDIU_A0_SP_N32): Define.
3357 (mipsn32_fbsd_sigframe): Define.
3358 (mips_fbsd_init_abi): Install mipsn32_fbsd_sigframe unwinder
3359 for FreeBSD/mipsn32.
3361 2017-10-05 John Baldwin <jhb@FreeBSD.org>
3363 * fbsd-tdep.c (fbsd_print_auxv_entry): Handle AT_EHDRFLAGS and
3366 2017-10-05 Tristan Gingold <tgingold@free.fr>
3368 * MAINTAINERS (Misc): Update my email address.
3370 2017-10-04 Pedro Alves <palves@redhat.com>
3372 * remote.c (get_remote_arch_state): New 'gdbarch' parameter. Use
3373 it instead of target_gdbarch.
3374 (get_remote_state, get_remote_packet_size): Adjust
3375 get_remote_arch_state calls, passing down target_gdbarch
3377 (packet_reg_from_regnum, packet_reg_from_pnum): New parameter
3378 'gdbarch' and use it instead of target_gdbarch.
3379 (get_memory_packet_size): Adjust get_remote_arch_state calls,
3380 passing down target_gdbarch explicitly.
3381 (struct stop_reply) <arch>: New field.
3382 (remote_parse_stop_reply): Use the stopped thread's architecture,
3383 not the current inferior's. Save the architecture in the
3385 (process_stop_reply): Use the stop reply's architecture.
3386 (process_g_packet, remote_fetch_registers)
3387 (remote_prepare_to_store, store_registers_using_G)
3388 (remote_store_registers): Adjust get_remote_arch_state calls,
3389 using the regcache's architecture.
3390 (remote_get_trace_status): Adjust get_remote_arch_state calls,
3391 passing down target_gdbarch explicitly.
3392 * spu-multiarch.c (spu_thread_architecture): Defer to the target
3393 beneath instead of calling target_gdbarch.
3394 * target.c (default_thread_architecture): Use the specified
3395 inferior's architecture, instead of the current inferior's
3396 architecture (via target_gdbarch).
3398 2017-10-04 Pedro Alves <palves@redhat.com>
3400 * regcache.c (get_thread_arch_regcache): Remove null_ptid special
3402 (regcache_print): Handle !target_has_registers here instead.
3404 2017-10-04 Pedro Alves <palves@redhat.com>
3406 * frame.c (create_test_frame): Delete.
3407 * frame.h (create_test_frame): Delete.
3408 * gdbarch-selftests.c: Include gdbthread.h and target.h.
3409 (class regcache_test): Delete.
3410 (test_target_has_registers, test_target_has_stack)
3411 (test_target_has_memory, test_target_prepare_to_store)
3412 (test_target_store_registers): New functions.
3413 (test_target_ops): New class.
3414 (register_to_value_test): Error out if there's already a
3415 process_stratum (or higher) target pushed. Create a fuller mock
3416 environment, with mock target_ops, inferior, address space, thread
3418 * progspace.c (struct address_space): Move to ...
3419 * progspace.h (struct address_space): ... here.
3420 * regcache.h (regcache::~regcache, regcache::raw_write)
3421 [GDB_SELF_TEST]: No longer virtual.
3423 2017-10-04 Simon Marchi <simon.marchi@ericsson.com>
3425 * mi/mi-main.c (list_available_thread_groups): Reverse filter logic.
3427 2017-10-04 Pedro Alves <palves@redhat.com>
3429 * guile/scm-breakpoint.c (gdbscm_breakpoint_commands): Move code
3430 out of 'between TRY and CATCH'.
3432 2017-10-04 Pedro Alves <palves@redhat.com>
3434 * cli/cli-cmds.c (complete_command): Add missing END_CATCH.
3435 * common/common-exceptions.h (TRY): Open an outermost scope.
3436 Expand intro comment.
3438 (END_CATCH): Close the outermost scope.
3439 * completer.c (complete_line_internal): Add missing END_CATCH.
3441 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
3443 * NEWS (Changes since GDB 8.0): Add entry about new
3444 'set-cwd-on-gdbserver' feature.
3445 (New remote packets): Add entry for QSetWorkingDir.
3446 * common/common-inferior.h (set_inferior_cwd): New prototype.
3447 * infcmd.c (set_inferior_cwd): Remove "static".
3448 (show_cwd_command): Expand text to include remote debugging.
3449 * remote.c: Add PACKET_QSetWorkingDir.
3450 (remote_protocol_features) <QSetWorkingDir>: New entry for
3451 PACKET_QSetWorkingDir.
3452 (extended_remote_set_inferior_cwd): New function.
3453 (extended_remote_create_inferior): Call
3454 "extended_remote_set_inferior_cwd".
3455 (_initialize_remote): Call "add_packet_config_cmd" for
3458 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
3460 * NEWS (New commands): Mention "set/show cwd".
3461 * cli/cli-cmds.c (_initialize_cli_cmds): Mention "set cwd" on
3462 "cd" command's help text.
3463 * common/common-inferior.h (get_inferior_cwd): New prototype.
3464 * infcmd.c (inferior_cwd_scratch): New global variable.
3465 (set_inferior_cwd): New function.
3466 (get_inferior_cwd): Likewise.
3467 (set_cwd_command): Likewise.
3468 (show_cwd_command): Likewise.
3469 (_initialize_infcmd): Add "set/show cwd" commands.
3470 * inferior.h (class inferior) <cwd>: New field.
3471 * nat/fork-inferior.c: Include "gdb_tilde_expand.h".
3472 (fork_inferior): Change inferior's cwd before its execution.
3473 * windows-nat.c (windows_create_inferior): Pass inferior's cwd
3476 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
3478 * Makefile.in (SFILES): Add gdb_tilde_expand.c.
3479 (HFILES_NO_SRCDIR): Add gdb_tilde_expand.h.
3480 (COMMON_OBS): Add gdb_tilde_expand.o.
3481 * common/gdb_tilde_expand.c: New file.
3482 * common/gdb_tilde_expand.h: Likewise.
3484 2017-10-03 Maciej W. Rozycki <macro@imgtec.com>
3486 * gdbarch.sh (objfile): Remove duplicate declaration.
3487 * gdbarch.h: Regenerate.
3489 2017-10-03 Tom Tromey <tom@tromey.com>
3491 * utils.c (internal_vproblem): Use string_vprintf.
3493 2017-10-03 Tom Tromey <tom@tromey.com>
3495 * printcmd.c (info_symbol_command): Use std::string.
3497 2017-10-03 Tom Tromey <tom@tromey.com>
3499 * top.c (gdb_safe_append_history): Use std::string.
3501 2017-10-03 Tom Tromey <tom@tromey.com>
3503 * event-top.c (stdin_event_handler): Update.
3504 * main.c (captured_main_1): Update.
3505 * top.h (make_delete_ui_cleanup): Remove.
3506 (struct ui): Add constructor and destructor.
3507 (new_ui, delete_ui): Remove.
3508 * top.c (make_delete_ui_cleanup): Remove.
3509 (new_ui_command): Use std::unique_ptr.
3510 (delete_ui_cleanup): Remove.
3511 (ui::ui): Rename from new_ui. Update.
3513 (ui::~ui): Rename from delete_ui. Update.
3515 2017-10-03 Tom Tromey <tom@tromey.com>
3517 * symfile.c (load_progress): Use gdb::byte_vector.
3519 2017-10-03 Tom Tromey <tom@tromey.com>
3521 * mi/mi-main.c (mi_cmd_trace_frame_collected): Remove unused
3523 * printcmd.c (x_command): Remove unused declaration.
3524 * symfile.c (symbol_file_command): Remove unused declaration.
3526 2017-10-03 Tom Tromey <tom@tromey.com>
3528 * utils.c (internal_vproblem): Use std::string.
3529 (defaulted_query): Likewise.
3531 2017-10-03 Tom Tromey <tom@tromey.com>
3533 * guile/scm-ports.c (ioscm_with_output_to_port_worker): Update.
3534 * top.c (execute_command_to_string): Update.
3535 * utils.c (make_cleanup_restore_page_info): Remove.
3536 (do_restore_page_info_cleanup): Remove.
3537 (set_batch_flag_and_restore_page_info):
3539 (make_cleanup_restore_page_info): Remove.
3540 (set_batch_flag_and_make_cleanup_restore_page_info): Remove.
3541 (~set_batch_flag_and_restore_page_info): New
3542 (make_cleanup_restore_uinteger): Remove.
3543 (make_cleanup_restore_integer): Remove.
3544 (struct restore_integer_closure): Remove.
3545 (restore_integer): Remove.
3546 * utils.h (struct set_batch_flag_and_restore_page_info): New
3548 (set_batch_flag_and_make_cleanup_restore_page_info): Remove.
3549 (make_cleanup_restore_page_info): Remove.
3550 (make_cleanup_restore_uinteger) Remove.
3551 (make_cleanup_restore_integer) Remove.
3553 2017-10-03 Tom Tromey <tom@tromey.com>
3555 * record-full.h (record_full_gdb_operation_disable_set): Return
3556 scoped_restore_tmpl<int>.
3557 * infrun.c (adjust_pc_after_break): Update.
3558 (handle_signal_stop): Update.
3559 * record-full.c (record_full_gdb_operation_disable_set): Return
3560 scoped_restore_tmpl<int>.
3561 (record_full_wait_1, record_full_insert_breakpoint)
3562 (record_full_remove_breakpoint, record_full_save)
3563 (record_full_goto_insn): Update.
3565 2017-10-02 Tom Tromey <tom@tromey.com>
3568 * rust-lang.c (rust_val_print_str): New function.
3569 (val_print_struct): Call it.
3570 (rust_subscript): Preserve name of slice type.
3572 2017-10-02 Tom Tromey <tom@tromey.com>
3574 * rust-lang.c (rust_subscript): Handle slices in
3575 EVAL_AVOID_SIDE_EFFECTS case.
3577 2017-10-02 Tom Tromey <tom@tromey.com>
3579 * rust-lang.c (rust_slice_type_p): Recognize &str as a slice type.
3581 2017-10-02 Tom Tromey <tom@tromey.com>
3583 * rust-lang.h (rust_slice_type): Add "extern".
3585 2017-10-02 Tom Tromey <tom@tromey.com>
3586 Pedro Alves <palves@redhat.com>
3588 * ada-lang.h (ada_exc_info::operator<): Make const.
3589 (ada_exc_info::operator==): Make const.
3590 * ada-lang.c (ada_exc_info::operator<, ada_exc_info::operator==):
3593 2017-09-29 Tom Tromey <tom@tromey.com>
3595 * target.c (read_whatever_is_readable): Change type of "result".
3597 (free_memory_read_result_vector): Remove.
3598 (read_memory_robust): Change return type. Update.
3599 * mi/mi-main.c (mi_cmd_data_read_memory_bytes): Update. Use
3600 bin2hex, std::string.
3601 * target.h (memory_read_result_s): Remove typedef.
3602 (free_memory_read_result_vector): Remove.
3603 (read_memory_robust): Return std::vector.
3605 2017-09-29 Tom Tromey <tom@tromey.com>
3607 * mi/mi-main.c (captured_mi_execute_command): Use scope_restore.
3609 2017-09-29 Tom Tromey <tom@tromey.com>
3611 * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions): Update.
3612 * ada-lang.h (struct ada_exc_info): Remove typedef. Declare
3613 operator< and operator==.
3614 (ada_exceptions_list): Return a std::vector.
3615 * ada-lang.c (ada_exc_info::operator<): Rename from
3616 compare_ada_exception_info.
3617 (ada_exc_info::operator==): New.
3618 (sort_remove_dups_ada_exceptions_list): Change type of
3620 (ada_add_standard_exceptions, ada_add_exceptions_from_frame)
3621 (ada_add_global_exceptions): Likewise.
3622 (ada_exceptions_list_1): Return a std::vector.
3623 (ada_exceptions_list): Likewise.
3625 2017-09-29 Tom Tromey <tom@tromey.com>
3627 * mi/mi-main.c (struct print_one_inferior_data) <inferiors>: Now a
3629 (print_one_inferior): Update.
3630 (free_vector_of_ints): Remove.
3631 (list_available_thread_groups): Change "ids" to std::set.
3632 (mi_cmd_list_thread_groups): Update.
3633 (struct collect_cores_data) <core>: Now a std::set.
3634 (collect_cores): Update.
3636 (print_one_inferior): Update.
3638 2017-09-29 Tom Tromey <tom@tromey.com>
3640 * mi/mi-main.c (mi_execute_cli_command): Use std::string.
3641 (mi_execute_async_cli_command): Likewise.
3642 (mi_cmd_trace_frame_collected): Use field_fmt.
3644 2017-09-29 Tom Tromey <tom@tromey.com>
3646 * mi/mi-main.c (mi_cmd_data_write_memory_bytes): Use
3649 2017-09-29 Tom Tromey <tom@tromey.com>
3651 * mi/mi-parse.c (mi_parse): Remove unused declaration.
3653 2017-09-29 Tom Tromey <tom@tromey.com>
3655 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Don't copy "oarg".
3657 2017-09-29 Tom Tromey <tom@tromey.com>
3659 * varobj.h (varobj_gen_name): Return std::string.
3660 * varobj.c (varobj_gen_name): Return std::string.
3661 * mi/mi-cmd-var.c (mi_cmd_var_create): Use std::string.
3662 (mi_cmd_var_delete): Don't copy "name".
3664 2017-09-29 Tom Tromey <tom@tromey.com>
3666 * mi/mi-cmd-break.c (mi_argv_to_format): Return std::string.
3667 (mi_cmd_break_insert_1): Update.
3669 2017-09-29 Tom Tromey <tom@tromey.com>
3671 * target.h (make_scoped_defer_target_commit_resume): Update.
3672 * target.c (make_scoped_defer_target_commit_resume): Rename from
3673 make_cleanup_defer_target_commit_resume. Return a
3675 * infrun.c (proceed): Use make_scoped_defer_target_commit_resume.
3677 2017-09-29 Tom Tromey <tom@tromey.com>
3679 * main.c (captured_main_1): Remove unused declaration.
3680 * spu-multiarch.c (parse_spufs_run): Remove unused declaration.
3682 2017-09-29 Tom Tromey <tom@tromey.com>
3684 * symtab.c (search_symbols): Remove unused outer cleanup.
3685 (make_source_files_completion_list): Remove unused declaration.
3687 2017-09-29 Tom Tromey <tom@tromey.com>
3689 * mt-tdep.c (mt_push_dummy_call): Use gdb::byte_vector.
3691 2017-09-29 Tom Tromey <tom@tromey.com>
3693 * xstormy16-tdep.c (xstormy16_push_dummy_call): Use
3696 2017-09-29 Tom Tromey <tom@tromey.com>
3698 * complaints.c (vcomplaint): Use std::string.
3700 2017-09-29 Tom Tromey <tom@tromey.com>
3702 * tracepoint.c (trace_variable_command): Use std::string.
3703 (encode_actions_1): Remove unused declarations.
3704 (create_tsv_from_upload): Use std::string.
3706 2017-09-29 Tom Tromey <tom@tromey.com>
3708 * cp-support.c (gdb_demangle): Use std::string.
3710 2017-09-29 Tom Tromey <tom@tromey.com>
3712 * stack.c (parse_frame_specification): Use std::string
3713 (info_frame_command): Use gdb::unique_xmalloc_ptr.
3715 2017-09-29 Tom Tromey <tom@tromey.com>
3717 * tilegx-tdep.c (tilegx_push_dummy_call): Use gdb::byte_vector.
3719 2017-09-29 Tom Tromey <tom@tromey.com>
3721 * utils.c (vfprintf_maybe_filtered): Use std::string.
3722 (vfprintf_unfiltered): Likewise.
3724 2017-09-29 Tom Tromey <tom@tromey.com>
3726 * event-top.c (top_level_prompt): Return std::string.
3727 (display_gdb_prompt): Update.
3729 2017-09-29 Tom Tromey <tom@tromey.com>
3731 * unittests/common-utils-selftests.c (format): New function.
3732 (string_vprintf_tests): New function.
3733 (_initialize_common_utils_selftests): Register new tests.
3734 * common/common-utils.c (string_vprintf): New function.
3735 * common/common-utils.h (string_vprintf): Declare.
3737 2017-09-29 Pedro Alves <palves@redhat.com>
3739 * common/rsp-low.c (unpack_varlen_hex): Constify.
3740 * common/rsp-low.h (unpack_varlen_hex): Constify.
3741 * linux-nat.c (linux_child_static_tracepoint_markers_by_strid):
3743 * remote.c (remote_set_permissions, read_ptid)
3744 (remote_current_thread, remote_get_threads_with_qthreadinfo)
3745 (remote_static_tracepoint_marker_at)
3746 (remote_static_tracepoint_markers_by_strid)
3747 (stop_reply_extract_thread, remote_parse_stop_reply): Constify.
3748 * tracepoint.c (parse_trace_status, parse_tracepoint_status)
3749 (parse_tracepoint_definition, parse_tsv_definition)
3750 (parse_static_tracepoint_marker_definition): Constify.
3751 * tracepoint.h (parse_static_tracepoint_marker_definition)
3752 (parse_trace_status, parse_tracepoint_status)
3753 (parse_tracepoint_definition, parse_tsv_definition): Constify.
3755 2017-09-29 Pedro Alves <palves@redhat.com>
3757 * remote.c (target_buf, target_buf_size): Delete.
3758 (remote_get_noisy_reply): Remove buf_p and sizeof_buf parameters.
3759 Use the connection's packet buffer instead.
3760 All callers adjusted.
3761 (_initialize_remote): Remove references to target_buf and
3764 2017-09-28 Pedro Alves <palves@redhat.com>
3766 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
3767 unittests/common-utils-selftests.c.
3768 (SUBDIR_UNITTESTS_OBS): Add common-utils-selftests.o.
3769 (COMMON_OBS): Remove utils-selftests.o.
3770 * utils-selftests.c: Move to ...
3771 * unittests/common-utils-selftests.c: ... here and rename self
3772 test to "string_printf".
3774 2017-09-28 Alexander Shaposhnikov <alexander.v.shaposhnikov@gmail.com> (tiny patch)
3776 * dwarf2read.c (open_and_init_dwp_file): Protect against dwp_file
3777 having NULL cus or tus.
3779 2017-09-27 Ulrich Weigand <uweigand@de.ibm.com>
3781 * arm-tdep.c: (convert_from_extended): Remove.
3782 (convert_to_extended): Likewise.
3783 (arm_extract_return_value): Use convert_typed_floating.
3784 (arm_store_return_value): Likewise.
3786 * sh-tdep.h (struct gdbarch_tdep): Add sh_littlebyte_bigword_type.
3787 * sh-tdep.c: Do not include "floatformat.h".
3788 (sh_littlebyte_bigword_type): New function.
3789 (sh_register_convert_to_virtual): Use convert_typed_floating.
3790 (sh_register_convert_to_raw): Likewise.
3791 * sh64-tdep.c: (struct gdbarch_tdep): Add sh_littlebyte_bigword_type.
3792 (sh64_littlebyte_bigword_type): New function.
3793 (sh64_extract_return_value): Use convert_typed_floating.
3794 (sh64_register_convert_to_virtual): Likewise.
3795 (sh64_register_convert_to_raw): Likewise.
3797 2017-09-27 Ulrich Weigand <uweigand@de.ibm.com>
3799 * doublest.h (floatformat_from_type): Move to gdbtypes.h.
3800 * doublest.c (floatformat_from_type): Move to gdbtypes.c.
3802 * gdbtypes.h (union type_specific): Make field floatformat hold
3803 just a single struct floatformat, not an array.
3804 (floatformat_from_type): Move here.
3805 * gdbtypes.c (floatformat_from_type): Move here. Update to
3806 changed TYPE_FLOATFORMAT definition.
3807 (verify_floatformat): Update to changed TYPE_FLOATFORMAT.
3808 (recursive_dump_type): Likewise.
3809 (init_float_type): Install correct floatformat for byte order.
3810 (arch_float_type): Likewise.
3812 2017-09-27 Ulrich Weigand <uweigand@de.ibm.com>
3814 * gdbtypes.c (init_type): Change incoming argument from
3815 length-in-bytes to length-in-bits. Assert length is a
3816 multiple of TARGET_CHAR_BITS.
3817 (arch_type, arch_flags_type): Likewise.
3818 (init_integer_type): Update call to init_type.
3819 (init_character_type): Likewise.
3820 (init_boolean_type): Likewise.
3821 (init_float_type): Likewise.
3822 (init_decfloat_type): Likewise.
3823 (init_complex_type): Likewise.
3824 (init_pointer_type): Likewise.
3825 (objfile_type): Likewise.
3826 (arch_integer_type): Update call to arch_type.
3827 (arch_character_type): Likewise.
3828 (arch_boolean_type): Likewise.
3829 (arch_float_type): Likewise.
3830 (arch_decfloat_type): Likewise.
3831 (arch_complex_type): Likewise.
3832 (arch_pointer_type): Likewise.
3833 (gdbtypes_post_init): Likewise.
3835 * dwarf2read.c (dwarf2_init_float_type): Update call to init_type.
3836 (read_base_type): Likewise.
3837 * mdebugread.c (basic_type): Likewise.
3838 * stabsread.c (dbx_init_float_type): Likewise.
3839 (rs6000_builtin_type): Likewise.
3840 (read_range_type): Likewise. Also, fix call to init_integer_type
3841 with erroneous length argument.
3843 * ada-lang.c (ada_language_arch_info): Update call to arch_type.
3844 * d-lang.c (build_d_types): Likewise.
3845 * f-lang.c (build_fortran_types): Likewise.
3846 * go-lang.c (build_go_types): Likewise.
3847 * opencl-lang.c (build_opencl_types): Likewise.
3848 * jit.c (finalize_symtab): Likewise.
3849 * gnu-v3-abi.c (build_gdb_vtable_type): Likewise.
3850 (build_std_type_info_type): Likewise.
3851 * target-descriptions.c (tdesc_gdb_type): Likewise. Also,
3852 update call to arch_flags_type.
3854 * linux-tdep.c (linux_get_siginfo_type_with_fields): Update call to
3856 * fbsd-tdep.c (fbsd_get_siginfo_type): Likewise.
3857 * windows-tdep.c (windows_get_tlb_type): Likewise.
3859 * avr-tdep.c (avr_gdbarch_init): Update call to arch_type.
3860 * ft32-tdep.c (ft32_gdbarch_init): Likewise.
3861 * m32c-tdep.c (make_types): Likewise.
3862 * rl78-tdep.c (rl78_gdbarch_init): Likewise.
3863 (rl78_psw_type): Update call to arch_flags_type.
3864 * m68k-tdep.c (m68k_ps_type): Update call to arch_flags_type.
3865 * rx-tdep.c (rx_psw_type): Likewise.
3866 (rx_fpsw_type): Likewise.
3867 * sparc-tdep.c (sparc_psr_type): Likewise.
3868 (sparc_fsr_type): Likewise.
3869 * sparc64-tdep.c (sparc64_pstate_type): Likewise.
3870 (sparc64_ccr_type): Likewise.
3871 (sparc64_fsr_type): Likewise.
3872 (sparc64_fprs_type): Likewise.
3874 2017-09-27 Tom Tromey <tom@tromey.com>
3876 * findcmd.c (find_command): Constify.
3878 2017-09-27 Tom Tromey <tom@tromey.com>
3880 * ada-tasks.c (task_command_1, task_command): Constify.
3882 2017-09-27 Tom Tromey <tom@tromey.com>
3884 * symtab.c (maintenance_print_symbol_cache)
3885 (maintenance_flush_symbol_cache)
3886 (maintenance_print_symbol_cache_statistics): Constify.
3888 2017-09-27 Tom Tromey <tom@tromey.com>
3890 * inferior.c (detach_inferior_command, kill_inferior_command)
3891 (inferior_command): Constify.
3893 2017-09-27 Tom Tromey <tom@tromey.com>
3895 * regcache.c (regcache_print, maintenance_print_registers)
3896 (maintenance_print_raw_registers)
3897 (maintenance_print_cooked_registers)
3898 (maintenance_print_register_groups)
3899 (maintenance_print_remote_registers): Constify.
3901 2017-09-27 Tom Tromey <tom@tromey.com>
3903 * printcmd.c (map_display_numbers, undisplay_command)
3904 (enable_disable_display_command, enable_display_command)
3905 (disable_display_command): Constify.
3907 2017-09-27 Tom Tromey <tom@tromey.com>
3909 * breakpoint.h (delete_command): Don't declare.
3910 * breakpoint.c (delete_command, enable_once_command)
3911 (enable_count_command, enable_delete_command, breakpoint_1)
3912 (maintenance_info_breakpoints, stopin_command, stopat_command)
3913 (delete_command, delete_trace_command, save_breakpoints)
3914 (save_breakpoints_command, save_tracepoints_command): Constify.
3916 2017-09-27 Tom Tromey <tom@tromey.com>
3918 * macrocmd.c (macro_expand_command, macro_expand_once_command)
3919 (skip_ws, extract_identifier, macro_define_command)
3920 (macro_undef_command, macro_list_command): Constify.
3922 2017-09-27 Tom Tromey <tom@tromey.com>
3924 * infcmd.c (environment_info, set_environment_command)
3925 (unset_environment_command, path_info, info_proc_cmd_1)
3926 (info_proc_cmd_mappings, info_proc_cmd_stat)
3927 (info_proc_cmd_status, info_proc_cmd_cwd, info_proc_cmd_cmdline)
3928 (info_proc_cmd_exe, info_proc_cmd_all): Constify.
3930 2017-09-27 Tom Tromey <tom@tromey.com>
3932 * i386-tdep.c (i386_mpx_info_bounds, i386_mpx_set_bounds):
3935 2017-09-27 Tom Tromey <tom@tromey.com>
3937 * symfile-mem.c (add_symbol_file_from_memory_command): Constify.
3939 2017-09-27 Tom Tromey <tom@tromey.com>
3941 * demangle.c (demangle_command): Constify.
3943 2017-09-27 Tom Tromey <tom@tromey.com>
3945 * progspace.c (maintenance_info_program_spaces_command):
3948 2017-09-27 Tom Tromey <tom@tromey.com>
3950 * compile/compile.c (check_raw_argument, compile_file_command)
3951 (compile_code_command, compile_print_command): Constify.
3953 2017-09-27 Tom Tromey <tom@tromey.com>
3955 * reggroups.c (maintenance_print_reggroups): Constify.
3957 2017-09-27 Tom Tromey <tom@tromey.com>
3959 * dwarf2read.c (save_gdb_index_command): Constify.
3961 2017-09-27 Tom Tromey <tom@tromey.com>
3963 * stap-probe.c (info_probes_stap_command): Constify.
3965 2017-09-27 Tom Tromey <tom@tromey.com>
3967 * fork-child.c (unset_exec_wrapper_command): Constify.
3969 2017-09-27 Tom Tromey <tom@tromey.com>
3971 * btrace.c (get_uint, get_context_size, no_chunk)
3972 (maint_btrace_packet_history_cmd)
3973 (maint_btrace_clear_packet_history_cmd, maint_btrace_clear_cmd)
3974 (maint_info_btrace_cmd): Constify.
3976 2017-09-27 Tom Tromey <tom@tromey.com>
3978 * reverse.c (delete_bookmark_command): Constify.
3980 2017-09-27 Tom Tromey <tom@tromey.com>
3982 * remote.c (set_memory_packet_size)
3983 (set_memory_write_packet_size, show_memory_write_packet_size)
3984 (set_memory_read_packet_size, show_memory_read_packet_size)
3985 (compare_sections_command, packet_command, remote_put_command)
3986 (remote_get_command, remote_delete_command): Constify.
3988 2017-09-27 Tom Tromey <tom@tromey.com>
3990 * mips-tdep.c (show_mipsfpu_command, set_mipsfpu_single_command)
3991 (set_mipsfpu_double_command, set_mipsfpu_none_command)
3992 (set_mipsfpu_auto_command): Constify.
3994 2017-09-27 Tom Tromey <tom@tromey.com>
3996 * cli/cli-cmds.h (cd_command): Constify.
3997 * cli/cli-cmds.c (cd_command): Constify.
3999 2017-09-27 Tom Tromey <tom@tromey.com>
4001 * thread.c (thread_name_command, thread_find_command): Constify.
4003 2017-09-27 Tom Tromey <tom@tromey.com>
4005 * probe.c (enable_probes_command, disable_probes_command):
4008 2017-09-27 Tom Tromey <tom@tromey.com>
4010 * symfile.c (symbol_file_command): Constify.
4011 * gdbcore.h (deprecated_file_changed_hook): Constify.
4012 * exec.c (deprecated_file_changed_hook, exec_file_command)
4013 (file_command): Constify.
4014 * defs.h (symbol_file_command): Constify.
4016 2017-09-27 Tom Tromey <tom@tromey.com>
4018 * remote-fileio.c (set_system_call_allowed)
4019 (show_system_call_allowed): Constify.
4021 2017-09-27 Tom Tromey <tom@tromey.com>
4023 * tracepoint.c (delete_trace_variable_command)
4024 (tfind_end_command, tfind_start_command, tfind_pc_command)
4025 (tfind_tracepoint_command, tfind_line_command)
4026 (tfind_range_command, tfind_outside_command): Constify.
4028 2017-09-27 Tom Tromey <tom@tromey.com>
4030 * ax-gdb.c (maint_agent_printf_command, agent_command)
4031 (agent_eval_command): Constify.
4033 2017-09-27 Tom Tromey <tom@tromey.com>
4035 * tracepoint.c (info_scope_command): Constify.
4036 * python/python.c (gdbpy_decode_line): Constify.
4037 * python/py-breakpoint.c (bppy_init): Constify.
4038 * mi/mi-cmd-break.c (mi_cmd_break_insert_1): Constify.
4039 * location.h: (new_linespec_location)
4040 (string_to_event_location_basic, string_to_event_location):
4042 * location.c (new_linespec_location)
4043 (string_to_event_location_basic, string_to_event_location):
4045 * linespec.h (decode_line_with_current_source)
4046 (decode_line_with_last_displayed, linespec_lex_to_end): Constify.
4047 * linespec.c (linespec_lex_to_end)
4048 (decode_line_with_current_source)
4049 (decode_line_with_last_displayed): Constify.
4050 * guile/scm-breakpoint.c (gdbscm_register_breakpoint_x):
4052 * cli/cli-cmds.c (edit_command, list_command): Constify.
4053 * breakpoint.h (until_break_command, watch_command_wrapper)
4054 (awatch_command_wrapper, rwatch_command_wrapper)
4055 (init_ada_exception_breakpoint): Constify.
4056 * breakpoint.c (break_command_1, dprintf_command)
4057 (break_range_command, watch_command_wrapper)
4058 (rwatch_command_wrapper, awatch_command_wrapper)
4059 (until_break_command, init_ada_exception_breakpoint)
4060 (strace_marker_create_sals_from_location, trace_command)
4061 (ftrace_command, strace_command, struct tracepoint): Constify.
4062 * ax-gdb.c (agent_command_1): Constify.
4063 * ada-lang.c (ada_exception_sal): Constify.
4065 2017-09-27 Tom Tromey <tom@tromey.com>
4067 * record.c (cmd_record_delete, cmd_record_stop, cmd_record_save)
4068 (cmd_record_goto_begin, cmd_record_goto_end, get_insn_number)
4069 (get_context_size, no_chunk, get_insn_history_modifiers)
4070 (cmd_record_insn_history, get_call_history_modifiers)
4071 (cmd_record_call_history): Constify.
4073 2017-09-27 Tom Tromey <tom@tromey.com>
4075 * source.c (show_substitute_path_command)
4076 (unset_substitute_path_command, set_substitute_path_command):
4079 2017-09-27 Tom Tromey <tom@tromey.com>
4081 * typeprint.c (maintenance_print_type): Constify.
4082 * maint.c (maintenance_dump_me, maintenance_demangle)
4083 (maintenance_time_display, maintenance_info_sections)
4084 (maintenance_print_statistics, maintenance_deprecate)
4085 (maintenance_undeprecate): Constify.
4086 (maintenance_do_deprecate): Constify. Use std::string.
4087 (maintenance_selftest): Constify.
4088 * gdbtypes.h (maintenance_print_type): Constify.
4090 2017-09-27 Tom Tromey <tom@tromey.com>
4092 * hppa-tdep.c (unwind_command): Constify.
4094 2017-09-27 Tom Tromey <tom@tromey.com>
4096 * target-descriptions.c (unset_tdesc_filename_cmd)
4097 (maint_print_c_tdesc_cmd, maintenance_check_xml_descriptions):
4100 2017-09-27 Tom Tromey <tom@tromey.com>
4102 * dummy-frame.c (maintenance_print_dummy_frames): Constify.
4104 2017-09-27 Tom Tromey <tom@tromey.com>
4106 * tui/tui.c (tui_enable_command, tui_disable_command): Constify.
4108 2017-09-27 Tom Tromey <tom@tromey.com>
4110 * tui/tui-regs.c (tui_reg_command): Constify.
4112 2017-09-27 Tom Tromey <tom@tromey.com>
4114 * skip.c (skip_file_command, skip_function_command)
4115 (skip_enable_command, skip_disable_command, skip_delete_command):
4118 2017-09-27 Tom Tromey <tom@tromey.com>
4120 * record-btrace.c (cmd_record_btrace_bts_start)
4121 (cmd_record_btrace_pt_start): Constify.
4123 2017-09-27 Tom Tromey <tom@tromey.com>
4125 * symmisc.c (maintenance_print_symbols)
4126 (maintenance_print_msymbols, maintenance_print_objfiles)
4127 (maintenance_info_symtabs, maintenance_check_symtabs)
4128 (maintenance_expand_symtabs, maintenance_info_line_tables):
4131 2017-09-27 Tom Tromey <tom@tromey.com>
4133 * top.c (new_ui_command): Constify.
4135 2017-09-27 Tom Tromey <tom@tromey.com>
4137 * symfile.c (add_symbol_file_command)
4138 (remove_symbol_file_command, list_overlays_command)
4139 (map_overlay_command, unmap_overlay_command)
4140 (overlay_auto_command, overlay_manual_command)
4141 (overlay_off_command, overlay_load_command): Constify.
4143 2017-09-27 Tom Tromey <tom@tromey.com>
4145 * spu-tdep.c (info_spu_event_command, info_spu_signal_command)
4146 (info_spu_mailbox_command, info_spu_dma_command)
4147 (info_spu_proxydma_command): Constify.
4149 2017-09-27 Tom Tromey <tom@tromey.com>
4151 * cli/cli-logging.c (set_logging_on, set_logging_off): Constify.
4153 2017-09-27 Tom Tromey <tom@tromey.com>
4155 * cli/cli-script.c (user_defined_command): Constify.
4157 2017-09-27 Tom Tromey <tom@tromey.com>
4159 * cli/cli-dump.c (dump_memory_command, dump_value_command)
4160 (dump_srec_memory, dump_srec_value, dump_ihex_memory)
4161 (dump_ihex_value, dump_verilog_memory, dump_verilog_value)
4162 (dump_tekhex_memory, dump_tekhex_value, dump_binary_memory)
4163 (dump_binary_value, append_binary_memory, append_binary_value):
4165 (struct dump_context) <func>: Constify.
4166 (add_dump_command): Update.
4168 2017-09-27 Tom Tromey <tom@tromey.com>
4170 * cli/cli-cmds.c (show_version, show_configuration)
4171 (source_command, show_user): Constify.
4173 2017-09-27 Tom Tromey <tom@tromey.com>
4175 * target.c (maintenance_print_target_stack): Constify.
4177 2017-09-27 Tom Tromey <tom@tromey.com>
4179 * interps.c (interpreter_exec_cmd): Constify.
4181 2017-09-27 Tom Tromey <tom@tromey.com>
4183 * record-full.c (cmd_record_full_restore): Constify.
4185 2017-09-27 Tom Tromey <tom@tromey.com>
4187 * memattr.c (enable_mem_command, disable_mem_command)
4188 (delete_mem_command): Constify.
4190 2017-09-27 Tom Tromey <tom@tromey.com>
4192 * value.c (show_convenience): Constify.
4194 2017-09-27 Tom Tromey <tom@tromey.com>
4196 * gdbcore.h (core_file_command): Update.
4197 * corefile.c (core_file_command): Constify.
4199 2017-09-27 Tom Tromey <tom@tromey.com>
4201 * user-regs.c (maintenance_print_user_registers): Constify.
4203 2017-09-27 Tom Tromey <tom@tromey.com>
4205 * cp-namespace.c (maintenance_cplus_namespace): Constify.
4207 2017-09-27 Tom Tromey <tom@tromey.com>
4209 * cp-support.c (first_component_command): Constify.
4211 2017-09-27 Tom Tromey <tom@tromey.com>
4213 * psymtab.c (maintenance_print_psymbols)
4214 (maintenance_info_psymtabs, maintenance_check_psymtabs):
4217 2017-09-27 Tom Tromey <tom@tromey.com>
4219 * windows-tdep.c (display_tib): Constify.
4221 2017-09-27 Tom Tromey <tom@tromey.com>
4223 * linux-fork.c (delete_checkpoint_command)
4224 (detach_checkpoint_command): Constify.
4226 2017-09-27 Tom Tromey <tom@tromey.com>
4228 * cp-abi.c (set_cp_abi_cmd, show_cp_abi_cmd): Constify.
4230 2017-09-27 Tom Tromey <tom@tromey.com>
4232 * arc-tdep.c (dump_arc_instruction_command): Constify.
4234 2017-09-27 Tom Tromey <tom@tromey.com>
4236 * valprint.c (set_radix, show_radix): Constify.
4238 2017-09-27 Tom Tromey <tom@tromey.com>
4240 * dtrace-probe.c (info_probes_dtrace_command): Constify.
4242 2017-09-27 Tom Tromey <tom@tromey.com>
4244 * command.h (not_just_help_class_command): Update.
4245 * cli/cli-decode.h (not_just_help_class_command): Update.
4246 * cli/cli-decode.c (not_just_help_class_command): Constify.
4248 2017-09-27 Tom Tromey <tom@tromey.com>
4250 * gdb_bfd.c (maintenance_info_bfds): Constify.
4252 2017-09-27 Tom Tromey <tom@tromey.com>
4254 * cli/cli-decode.c (add_cmd, set_cmd_cfunc): New function
4256 (do_add_cmd): Rename from add_cmd. Don't call set_cmd_cfunc.
4257 (do_const_cfunc): New function.
4258 (cmd_cfunc_eq): New overload.
4259 (cli_user_command_p): Check do_const_cfunc.
4260 * cli/cli-decode.h (struct cmd_list_element) <function>: New field
4262 * command.h (add_cmd): Add const overload and no-function
4264 (set_cmd_cfunc): Add const overload.
4265 (cmd_const_cfunc_ftype): Declare.
4266 (cmd_cfunc_eq): Add const overload.
4267 * breakpoint.c, cli-cmds.c, cli-dump.c, guile/scm-cmd.c,
4268 python/py-cmd.c, target.c, tracepoint.c: Use no-function add_cmd
4271 2017-09-27 Tom Tromey <tom@tromey.com>
4273 * macroexp.c (get_next_token_for_substitution): New function.
4274 (substitute_args): Call it. Check for __VA_OPT__.
4276 2017-09-26 Walfred Tedeschi <walfred.tedeschi@intel.com>
4277 Pedro Alves <palves@redhat.com>
4279 * dwarf2read.c (dwarf2_cu): Remove field producer_is_icc and add
4280 producer_is_icc_lt_14.
4281 (producer_is_icc_lt_14): New function.
4282 (check_producer): Add code for checking version of ICC.
4283 (producer_is_icc): Move to producer.c.
4284 (read_structure_type): Restrict ICC workaround to ICC<14.
4285 * producer.c: Include selftest.h.
4286 (producer_is_icc, producer_parsing_tests, _initialize_producer):
4288 * producer.h (producer_is_icc): New declaration.
4290 2017-09-26 Walfred Tedeschi <walfred.tedeschi@intel.com>
4292 * Makefile.in (SFILES): Add producer.c.
4293 (COMMON_OBS): Add producer.o
4294 * amd64-tdep.c (producer.h): Add new include.
4295 * dwarf2read.c (producer.h): Add new include.
4296 * producer.c: New file.
4297 * producer.h: New file.
4298 * utils.c (producer_is_gcc, producer_is_gcc_ge_4): Move to
4300 * utils.h (producer_is_gcc, producer_is_gcc_ge_4): Move to
4303 2017-09-26 Matthias Klose <doko@ubuntu.com>
4305 * configure.ac: Search ncursesw before ncurses.
4306 Check ncursesw/ncurses.h before ncurses/ncurses.h.
4307 * gdb_curses.h: Include <ncursesw/ncurses.h>
4308 * config.in, configure: Regenerate.
4310 2017-09-26 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
4313 * configure.host <*-*-solaris2.[01], *-*-solaris2.[2-9]*>: Mark as
4315 Use gdb_host sol2 for i[34567]86-*-solaris2*, x86_64-*-solaris2*.
4316 Remove i386sol2 support.
4317 * configure.nat <i386sol2>: Remove.
4318 <sol2-64>: Fold into ...
4320 Move common settings to default section.
4322 * configure.tgt <i[34567]86-*-solaris2.1[0-9]*,
4323 x86_64-*-solaris2.1[0-9]*>: Rename to ...
4324 <i[34567]86-*-solaris2*, x86_64-*-solaris2*>: ... this.
4325 <i[34567]86-*-solaris*>: Remove.
4326 <sparc-*-solaris2.[0-6], sparc-*-solaris2.[0-6].*>: Remove.
4328 * configure.ac: Remove wctype in libw check.
4329 (_MSE_INT_H): Don't define on Solaris 7-9.
4330 <solaris*>: Remove libthread_db.so.1 check.
4331 * configure: Regenerate.
4332 * config.in: Regenerate.
4334 * proc-service.c: Remove PROC_SERVICE_IS_OLD handling.
4335 (gdb_ps_prochandle_t, gdb_ps_read_buf_t, gdb_ps_write_buf_t)
4336 (gdb_ps_size_t): Remove.
4337 Use base types in users.
4338 * sol-thread.c: Likewise, also for gdb_ps_addr_t.
4340 * NEWS (Changes since GDB 8.0): Document Solaris 2.0-9 removal.
4342 2017-09-26 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
4345 * sparc64-tdep.c (adi_tag_fd): Print pid as long.
4346 (adi_is_addr_mapped): Likewise.
4347 (PSR_ICC): Don't redefine.
4348 (PSR_IMPL): Likewise.
4350 2017-09-25 Tom Tromey <tom@tromey.com>
4352 * regcache.c (regcache::dump): Use string_printf.
4354 2017-09-25 Tom Tromey <tom@tromey.com>
4356 * regcache.c (class regcache_invalidator): New.
4357 (struct register_to_invalidate): Remove.
4358 (make_cleanup_regcache_invalidate): Remove.
4359 (regcache::raw_write): Use regcache_invalidator.
4361 2017-09-25 Tom Tromey <tom@tromey.com>
4363 * spu-tdep.c (spu2ppu_sniffer): Update.
4364 * regcache.h (make_cleanup_regcache_xfree): Don't declare.
4365 * regcache.c (do_regcache_xfree, make_cleanup_regcache_xfree):
4367 * ppc-linux-tdep.c (ppu2spu_sniffer): Update.
4368 * mi/mi-main.c (mi_cmd_data_list_changed_registers): Update.
4369 * frame.h (frame_save_as_regcache): Return std::unique_ptr.
4370 * frame.c (frame_save_as_regcache): Return std::unique_ptr.
4371 (frame_pop): Update.
4373 2017-09-25 Tom Tromey <tom@tromey.com>
4375 * spu-tdep.c (spu2ppu_dealloc_cache): Use delete.
4376 * regcache.h (regcache_xfree): Don't declare.
4377 * regcache.c (regcache_xfree): Remove.
4378 (do_regcache_xfree): Use delete.
4379 * ppc-linux-tdep.c (ppu2spu_dealloc_cache): Use delete.
4380 * linux-fork.c (free_fork): Use delete.
4381 (fork_save_infrun_state): Likewise.
4382 * jit.c (jit_dealloc_cache): Use delete.
4383 * infrun.c (discard_infcall_suspend_state): Use delete.
4385 2017-09-25 Tom Tromey <tom@tromey.com>
4387 * regcache.h (regcache_xmalloc): Don't declare.
4388 (regcache_raw_set_cached_value): Update comment.
4389 * regcache.c (regcache_xmalloc): Remove.
4390 * ppc-linux-tdep.c (ppu2spu_sniffer): Use new.
4391 * jit.c (jit_frame_sniffer): Use new.
4392 * frame.c (frame_save_as_regcache): Use new.
4394 2017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
4396 * NEWS: Advertise support for guarded-storage registers on IBM z.
4398 2017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
4400 * s390-linux-nat.c (have_regset_gs): New static variable.
4401 (s390_linux_fetch_inferior_registers): Handle guarded-storage
4402 control block and guarded-storage broadcast control regsets.
4403 (s390_read_description): Detect whether the target has
4404 guarded-storage support, return appropriate tdesc.
4405 * s390-linux-tdep.c (features/s390-gs-linux64.c): New include.
4406 (features/s390x-gs-linux64.c): Likewise.
4407 (struct gdbarch_tdep) <have_gs>: New field.
4408 (s390_regmap_gs, s390_regmap_gsbc, s390_gs_regset)
4409 (s390_gsbc_regset): New variables.
4410 (s390_iterate_over_regset_sections): Iterate over s390_gs_regset
4411 and s390_gsbc_regset, if applicable.
4412 (s390_core_read_description): Check whether core file was from a
4413 target with guarded-storage support; include appropriate regsets.
4414 (s390_gdbarch_init): Add registers for guarded-storage support.
4415 (_initialize_s390_tdep): Initialize new target descriptions that
4416 include registers for guarded-storage support.
4417 * s390-linux-tdep.h (HWCAP_S390_GS, S390_GSD_REGNUM)
4418 (S390_GSSM_REGNUM, S390_GSEPLA_REGNUM)
4419 (S390_BC_GSD_REGNUM, S390_BC_GSSM_REGNUM): New defines.
4420 (S390_NUM_REGS): Adjust macro definition.
4421 (s390_gs_regset, s390_gsbc_regset, tdesc_s390_gs_linux64)
4422 (tdesc_s390x_gs_linux64): New declarations.
4424 2017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
4426 * features/s390-gs-linux64.xml: New file.
4427 * features/s390-gs.xml: New file.
4428 * features/s390-gsbc.xml: New file.
4429 * features/s390x-gs-linux64.xml: New file.
4430 * features/Makefile (WHICH): Add s390-gs-linux64 and
4432 (s390-gs-linux64-expedite, s390x-gs-linux64-expedite): New macros.
4433 (XMLTOC): Add s390-gs-linux64.xml and s390x-linux64.xml.
4434 * features/s390-gs-linux64.c: New generated file.
4435 * features/s390x-gs-linux64.c: New file.
4436 * regformats/s390-gs-linux64.dat: New file.
4437 * regformats/s390x-gs-linux64.dat: New file.
4439 2017-09-23 Tom Tromey <tom@tromey.com>
4441 * defs.h (make_cleanup_override_quit_handler): Don't declare.
4443 2017-09-22 Tom Tromey <tom@tromey.com>
4445 * utils.c (class scoped_input_handler) <m_quit_handler>: Change
4446 type to scoped_restore_tmpl.
4447 <scoped_input_handler>: Initialize m_quit_handler directly.
4449 2017-09-22 Sergio Durigan Junior <sergiodj@redhat.com>
4451 * cli/cli-cmds.c (pwd_command): Use "getcwd (NULL, 0)".
4452 (cd_command): Likewise. Free "current_directory" before
4454 * main.c (captured_main_1): Use "getcwd (NULL, 0)".
4455 * mi/mi-cmd-env.c (mi_cmd_env_pwd): Likewise.
4456 * top.c (gdb_dirbuf): Remove global declaration.
4457 * top.h (gdb_dirbuf): Likewise.
4459 2017-09-22 Sergio Durigan Junior <sergiodj@redhat.com>
4461 * gnulib/aclocal.m4: Regenerate.
4462 * gnulib/config.in: Regenerate.
4463 * gnulib/configure: Regenerate.
4464 * gnulib/import/Makefile.am: Regenerate.
4465 * gnulib/import/Makefile.in: Regenerate.
4466 * gnulib/import/assure.h: New file.
4467 * gnulib/import/at-func.c: Likewise
4468 * gnulib/import/chdir-long.c: New file.
4469 * gnulib/import/chdir-long.h: New file.
4470 * gnulib/import/cloexec.c: New file.
4471 * gnulib/import/cloexec.h: New file.
4472 * gnulib/import/close.c: New file.
4473 * gnulib/import/closedir.c: New file.
4474 * gnulib/import/dirent-private.h: New file.
4475 * gnulib/import/dup-safer.c: New file.
4476 * gnulib/import/dup.c: New file.
4477 * gnulib/import/dup2.c: New file.
4478 * gnulib/import/error.c: New file.
4479 * gnulib/import/error.h: New file.
4480 * gnulib/import/exitfail.c: New file.
4481 * gnulib/import/exitfail.h: New file.
4482 * gnulib/import/fchdir.c: New file.
4483 * gnulib/import/fcntl.c: New file.
4484 * gnulib/import/fcntl.in.h: New file.
4485 * gnulib/import/fd-hook.c: New file.
4486 * gnulib/import/fd-hook.h: New file.
4487 * gnulib/import/fd-safer.c: New file.
4488 * gnulib/import/fdopendir.c: New file.
4489 * gnulib/import/filename.h: New file.
4490 * gnulib/import/filenamecat-lgpl.c: New file.
4491 * gnulib/import/filenamecat.h: New file.
4492 * gnulib/import/fstat.c: New file.
4493 * gnulib/import/fstatat.c: New file.
4494 * gnulib/import/getcwd-lgpl.c: New file.
4495 * gnulib/import/getcwd.c: New file.
4496 * gnulib/import/getdtablesize.c: New file.
4497 * gnulib/import/getlogin_r.c: New file.
4498 * gnulib/import/getprogname.c: New file.
4499 * gnulib/import/getprogname.h: New file.
4500 * gnulib/import/gettext.h: New file.
4501 * gnulib/import/glob-libc.h: New file.
4502 * gnulib/import/glob.c: New file.
4503 * gnulib/import/glob.in.h: New file.
4504 * gnulib/import/intprops.h: New file.
4505 * gnulib/import/m4/chdir-long.m4: New file.
4506 * gnulib/import/m4/close.m4: New file.
4507 * gnulib/import/m4/closedir.m4: New file.
4508 * gnulib/import/m4/d-ino.m4: New file.
4509 * gnulib/import/m4/d-type.m4: New file.
4510 * gnulib/import/m4/dup.m4: New file.
4511 * gnulib/import/m4/dup2.m4: New file.
4512 * gnulib/import/m4/error.m4: New file.
4513 * gnulib/import/m4/fchdir.m4: New file.
4514 * gnulib/import/m4/fcntl.m4: New file.
4515 * gnulib/import/m4/fcntl_h.m4: New file.
4516 * gnulib/import/m4/fdopendir.m4: New file.
4517 * gnulib/import/m4/filenamecat.m4: New file.
4518 * gnulib/import/m4/fstat.m4: New file.
4519 * gnulib/import/m4/fstatat.m4: New file.
4520 * gnulib/import/m4/getcwd-abort-bug.m4: New file.
4521 * gnulib/import/m4/getcwd-path-max.m4: New file.
4522 * gnulib/import/m4/getcwd.m4: New file.
4523 * gnulib/import/m4/getdtablesize.m4: New file.
4524 * gnulib/import/m4/getlogin_r.m4: New file.
4525 * gnulib/import/m4/getprogname.m4: New file.
4526 * gnulib/import/m4/glob.m4: New file.
4527 * gnulib/import/m4/gnulib-cache.m4: Regenerate.
4528 * gnulib/import/m4/gnulib-comp.m4: Regenerate.
4529 * gnulib/import/m4/mempcpy.m4: New file.
4530 * gnulib/import/m4/memrchr.m4: New file.
4531 * gnulib/import/m4/mode_t.m4: New file.
4532 * gnulib/import/m4/msvc-inval.m4: New file.
4533 * gnulib/import/m4/msvc-nothrow.m4: New file.
4534 * gnulib/import/m4/open.m4: New file.
4535 * gnulib/import/m4/openat.m4: New file.
4536 * gnulib/import/m4/opendir.m4: New file.
4537 * gnulib/import/m4/readdir.m4: New file.
4538 * gnulib/import/m4/realloc.m4: New file.
4539 * gnulib/import/m4/rewinddir.m4: New file.
4540 * gnulib/import/m4/save-cwd.m4: New file.
4541 * gnulib/import/m4/strdup.m4: New file.
4542 * gnulib/import/m4/strerror.m4: New file.
4543 * gnulib/import/m4/unistd-safer.m4: New file.
4544 * gnulib/import/mempcpy.c: New file.
4545 * gnulib/import/memrchr.c: New file.
4546 * gnulib/import/msvc-inval.c: New file.
4547 * gnulib/import/msvc-inval.h: New file.
4548 * gnulib/import/msvc-nothrow.c: New file.
4549 * gnulib/import/msvc-nothrow.h: New file.
4550 * gnulib/import/open.c: New file.
4551 * gnulib/import/openat-die.c: New file.
4552 * gnulib/import/openat-priv.h: New file.
4553 * gnulib/import/openat-proc.c: New file.
4554 * gnulib/import/openat.c: New file.
4555 * gnulib/import/openat.h: New file.
4556 * gnulib/import/opendir.c: New file.
4557 * gnulib/import/pipe-safer.c: New file.
4558 * gnulib/import/readdir.c: New file.
4559 * gnulib/import/realloc.c: New file.
4560 * gnulib/import/rewinddir.c: New file.
4561 * gnulib/import/save-cwd.c: New file.
4562 * gnulib/import/save-cwd.h: New file.
4563 * gnulib/import/strdup.c: New file.
4564 * gnulib/import/strerror-override.c: New file.
4565 * gnulib/import/strerror-override.h: New file.
4566 * gnulib/import/strerror.c: New file.
4567 * gnulib/import/unistd--.h: New file.
4568 * gnulib/import/unistd-safer.h: New file.
4569 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add
4570 "getcwd" and "glob".
4571 * ser-tcp.c: Undefine "close" before redefining it.
4573 2017-09-21 Simon Marchi <simon.marchi@ericsson.com>
4575 * guile/scm-value.c (gdbscm_value_address): Initialize address,
4578 2017-09-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
4580 * configure.nat <i386sol2,i386>: Add fork-inferior.o to NATDEPFILES.
4581 <sol2,sparc>: Likewise.
4582 <sol2-64,i386>: Likewise.
4584 * warning.m4 (AM_GDB_WARNINGS): Disable -Wunknown-pragmas,
4585 -Wdeprecated-declarations on *-*-solaris*.
4586 * configure: Regenerate.
4588 * procfs.c: Include "nat/inferior.h".
4589 (procfs_info_proc): Fix typo.
4591 2017-09-21 Kevin Buettner <kevinb@redhat.com>
4593 * remote.c (vector): Include.
4594 (struct private_thread_info): Add field, thread_handle.
4595 (free_private_thread_info): Deallocate storage associated with
4597 (get_private_info_thread): Initialize `thread_handle' field.
4598 (struct thread_item): Add field, thread_handle.
4599 (clear_threads_listing_context): Deallocate storage associated
4601 (start_thread): Add support for "handle" attribute.
4602 (thread_attributes): Add "handle".
4603 (remote_get_threads_with_qthreadinfo): Initialize thread_handle
4605 (remote_update_thread_list): Update thread_handle.
4606 (remote_thread_handle_to_thread_info): New function.
4607 (init_remote_ops): Initialize to_thread_handle_to_thread_info.
4609 2017-09-21 Kevin Buettner <kevinb@redhat.com>
4611 * python/py-inferior.c (gdbpy_thread_from_thread_handle): New
4613 (inferior_object_methods): Add gdbpy_thread_from_thread_handle.
4614 * python/python-internal.h (thread_object_type): Declare.
4616 2017-09-21 Kevin Buettner <kevinb@redhat.com>
4618 * target.h (struct target_ops): Add to_thread_handle_to_thread_info.
4619 (target_thread_handle_to_thread_info): Declare.
4620 * target.c (target_thread_handle_to_thread_info): New function.
4621 * target-delegates.c: Regenerate.
4622 * gdbthread.h (find_thread_by_handle): Declare.
4623 * thread.c (find_thread_by_handle): New function.
4624 * linux-thread-db.c (thread_db_thread_handle_to_thread_info): New
4626 (init_thread_db_ops): Register thread_db_thread_handle_to_thread_info.
4628 2017-09-21 Simon Marchi <simon.marchi@ericsson.com>
4630 * nat/linux-waitpid.c (linux_debug): Add ATTRIBUTE_PRINTF.
4632 2017-09-21 Simon Marchi <simon.marchi@ericsson.com>
4634 * microblaze-tdep.c (microblaze_debug): Add ATTRIBUTE_PRINTF.
4636 2017-09-21 Yao Qi <yao.qi@linaro.org>
4638 * configure.tgt (aarch64*-*-freebsd*): Add fbsd-tdep.o solib-svr4.o
4641 2017-09-20 Tom Tromey <tom@tromey.com>
4643 * breakpoint.c (struct counted_command_line): Remove.
4644 (breakpoint_commands): Update.
4645 (alloc_counted_command_line, incref_counted_command_line)
4646 (decref_counted_command_line, do_cleanup_counted_command_line)
4647 (make_cleanup_decref_counted_command_line): Remove.
4648 (breakpoint_set_commands, commands_command_1, ~bpstats, bpstats)
4649 (bpstat_clear_actions, bpstat_do_actions_1, watchpoint_check)
4650 (bpstat_stop_status, print_one_breakpoint_location, ~breakpoint)
4651 (save_breakpoints): Update.
4652 * breakpoint.h (counted_command_line): Now a typedef to
4654 (struct breakpoint) <commands>: Now a counted_command_line.
4655 (struct bpstats) <command>: Likewise.
4657 2017-09-20 Tom Tromey <tom@tromey.com>
4659 * breakpoint.c (struct commands_info, do_map_commands_command):
4661 (commands_command_1): Update.
4662 (iterate_over_related_breakpoints): Take a function_view.
4663 (do_delete_breakpoint, do_map_delete_breakpoint): Remove.
4664 (delete_command): Update.
4665 (map_breakpoint_numbers): Take a function_view.
4666 (do_disable_breakpoint, do_map_delete_breakpoint): Remove.
4667 (disable_command): Update.
4668 (do_enable_breakpoint, do_map_enable_breakpoint): Remove.
4669 (enable_command): Update.
4670 (struct disp_data, do_enable_breakpoint_disp)
4671 (do_map_enable_once_breakpoint, do_map_enable_count_breakpoint)
4672 (do_map_enable_delete_breakpoint): Remove.
4673 (enable_once_command, enable_count_command, enable_delete_command)
4674 (delete_trace_variable_command): Update.
4676 2017-09-20 Tom Tromey <tom@tromey.com>
4678 * breakpoint.c (~bpstats): Rename from bpstat_free. Update.
4679 (bpstat_clear): Use delete.
4680 (bpstats): New constructors.
4681 (bpstat_copy, bpstat_stop_status): Use new.
4682 (dprintf_after_condition_true): Update.
4683 * breakpoint.h (bpstats::bpstats): Add constructors.
4684 (bpstats::~bpstats): Add destructor.
4686 2017-09-20 Pedro Alves <palves@redhat.com>
4688 * eval.c (make_params): Delete, refactored as ...
4689 (class fake_method): ... this new type's ctor.
4690 (fake_method::~fake_method): New.
4691 (evaluate_subexp_standard): Use 'fake_method'.
4693 2017-09-20 Tom Tromey <tom@tromey.com>
4695 * windows-nat.c (get_windows_debug_event, windows_wait)
4696 (do_initial_windows_stuff, windows_attach): Update.
4697 * utils.c (vwarning, internal_vproblem): Update.
4698 (ui_unregister_input_event_handler_cleanup)
4699 (prepare_to_handle_input): Remove.
4700 (class scoped_input_handler): New.
4701 (defaulted_query, prompt_for_continue): Update.
4702 * tui/tui-hooks.c (tui_refresh_frame_and_register_information):
4704 * top.c (undo_terminal_modifications_before_exit): Update.
4705 * target/target.h (target_terminal_init, target_terminal_inferior)
4706 (target_terminal_ours): Don't declare.
4707 (class target_terminal): New.
4708 * target.h (target_terminal_is_inferior, target_terminal_is_ours)
4709 (target_terminal_ours_for_output)
4710 (make_cleanup_restore_target_terminal): Don't declare.
4711 (target_terminal_info): Remove.
4712 * target.c (enum terminal_state, terminal_state): Remove.
4713 (target_terminal::terminal_state): Define.
4714 (target_terminal::init): Rename from target_terminal_init.
4715 (target_terminal::inferior): Rename from
4716 target_terminal_inferior.
4717 (target_terminal::ours): Rename from target_terminal_ours.
4718 (target_terminal::ours_for_output): Rename from
4719 target_terminal_ours_for_output.
4720 (target_terminal::info): New method.
4721 (cleanup_restore_target_terminal)
4722 (make_cleanup_restore_target_terminal): Remove.
4723 * solib.c (handle_solib_event): Update.
4724 * remote.c (remote_serial_quit_handler): Update.
4725 (remote_terminal_inferior, remote_wait_as): Update.
4726 * record-full.c (record_full_wait_1): Update.
4727 * nto-procfs.c (procfs_create_inferior): Update.
4728 * nat/fork-inferior.c (startup_inferior): Update.
4729 * mi/mi-interp.c (mi_new_thread, mi_thread_exit)
4730 (mi_record_changed, mi_inferior_added, mi_inferior_appeared)
4731 (mi_inferior_exit, mi_inferior_removed, mi_traceframe_changed)
4732 (mi_tsv_created, mi_tsv_deleted, mi_tsv_modified)
4733 (mi_breakpoint_created, mi_breakpoint_deleted)
4734 (mi_breakpoint_modified, mi_on_resume, mi_solib_loaded)
4735 (mi_solib_unloaded, mi_command_param_changed, mi_memory_changed)
4736 (mi_user_selected_context_changed, report_initial_inferior):
4738 * linux-nat.c (linux_nat_attach, linux_nat_terminal_ours)
4739 (linux_nat_terminal_inferior): Update.
4740 * infrun.c (follow_fork_inferior)
4741 (handle_vfork_child_exec_or_exit, do_target_resume)
4742 (check_curr_ui_sync_execution_done, handle_inferior_event_1)
4743 (handle_signal_stop, maybe_remove_breakpoints, normal_stop):
4745 * inflow.c (child_terminal_init, info_terminal_command): Update.
4746 * infcmd.c (post_create_inferior, continue_1, prepare_one_step)
4747 (attach_command): Update.
4748 * infcall.c (call_thread_fsm_should_stop): Update.
4749 * gnu-nat.c (gnu_attach): Update.
4750 * extension.c (struct active_ext_lang_state)
4751 (restore_active_ext_lang): Update.
4752 * exceptions.c (print_flush): Update.
4753 * event-top.c (async_enable_stdin, default_quit_handler): Update.
4754 (struct quit_handler_cleanup_data, restore_quit_handler)
4755 (restore_quit_handler_dtor, make_cleanup_override_quit_handler):
4757 * cp-support.c (gdb_demangle): Update.
4758 * breakpoint.c (update_inserted_breakpoint_locations)
4759 (insert_breakpoint_locations, handle_jit_event)
4760 (disable_breakpoints_in_unloaded_shlib): Update.
4761 * annotate.c (annotate_breakpoints_invalid)
4762 (annotate_frames_invalid): Update.
4764 2017-09-20 Tom Tromey <tom@tromey.com>
4766 * main.c (catch_command_errors): Rename from
4767 catch_command_errors_const.
4768 (captured_main_1): Update.
4770 2017-09-20 Pedro Alves <palves@redhat.com>
4772 * cli/cli-cmds.c (list_command): Use print_sal_location.
4773 (print_sal_location): New function.
4774 (ambiguous_line_spec): Use print_sal_location.
4775 * linespec.c (symbol_to_sal): Record the symbol in the sal.
4776 * symtab.c (find_function_start_sal): Likewise.
4777 * symtab.h (symtab_and_line::symbol): New field.
4779 2017-09-20 Pedro Alves <palves@redhat.com>
4781 * linespec.c (minsym_found): Handle non-text minsyms.
4782 (symbol_to_sal): Record a sal.pc for non-block, non-label symbols.
4784 2017-09-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
4786 * features/Makefile (i386-avx-mpx-avx512-pku.dat): Add missing
4789 2017-09-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
4791 * gdb.arch/i386-avx512.c (move_zmm_data_to_reg): Use
4792 vmovups instead vmovaps.
4793 (move_zmm_data_to_memory): Use vmovups instead vmovaps.
4795 2017-09-19 John Baldwin <jhb@FreeBSD.org>
4797 * NEWS (Changes since GDB 8.0): Add starti.
4798 * infcmd.c (enum run_break): New.
4799 (run_command_1): Queue pending event for RUN_STOP_AT_FIRST_INSN
4801 (run_command): Use enum run_how.
4802 (start_command): Likewise.
4803 (starti_command): New function.
4804 (RUN_ARGS_HELP): New macro.
4805 (_initialize_infcmd): Use RUN_ARGS_HELP for run and start
4806 commands. Add starti command.
4808 2017-09-19 Yao Qi <yao.qi@linaro.org>
4810 * Makefile.in (monitor.o): Remove the rule.
4812 2017-09-19 Yao Qi <yao.qi@linaro.org>
4814 * annotate.h (struct annotate_arg_emitter): Use
4815 DISABLE_COPY_AND_ASSIGN.
4816 * common/refcounted-object.h (refcounted_object): Likewise.
4817 * completer.h (struct completion_result): Likewise.
4818 * dwarf2read.c (struct dwarf2_per_objfile): Likewise.
4819 * filename-seen-cache.h (filename_seen_cache): Likewise.
4820 * gdbcore.h (thread_section_name): Likewise.
4821 * gdb_regex.h (compiled_regex): Likewise.
4822 * gdbthread.h (scoped_restore_current_thread): Likewise.
4823 * inferior.h (scoped_restore_current_inferior): Likewise.
4824 * jit.c (jit_reader): Likewise.
4825 * linespec.h (struct linespec_result): Likewise.
4826 * mi/mi-parse.h (struct mi_parse): Likewise.
4827 * nat/fork-inferior.c (execv_argv): Likewise.
4828 * progspace.h (scoped_restore_current_program_space): Likewise.
4829 * python/python-internal.h (class gdbpy_enter): Likewise.
4830 * regcache.h (regcache): Likewise.
4831 * target-descriptions.c (struct tdesc_reg): Likewise.
4832 (struct tdesc_type): Likewise.
4833 (struct tdesc_feature): Likewise.
4834 * ui-out.h (ui_out_emit_type): Likewise.
4836 2017-09-18 Simon Marchi <simon.marchi@ericsson.com>
4838 * dwarf2expr.c (dwarf_expr_context::execute_stack_op): Remove
4839 label abort_expression.
4841 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
4843 * common/buffer.c (buffer_xml_printf): Adjust.
4844 * common/xml-utils.c (xml_escape_text): Change return type to
4845 std::string, update code accordingly.
4846 * common/xml-utils.h (xml_escape_text): Change return type to
4848 * rs6000-aix-tdep.c (rs6000_aix_shared_library_to_xml): Adjust.
4849 * windows-tdep.c (windows_xfer_shared_library): Adjust.
4850 * unittests/xml-utils-selftests.c (test_xml_escape_text):
4853 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
4855 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add new source file.
4856 (SUBDIR_UNITTESTS_OBS): Add new object file.
4857 * unittests/xml-utils-selftests.c: New file.
4859 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
4861 * common/selftest.h (selftest): New struct/interface.
4862 (register_test): Add name parameter, add new overload.
4863 (run_tests): Add filter parameter.
4864 (for_each_selftest_ftype): New typedef.
4865 (for_each_selftest): New declaration.
4866 * common/selftest.c (tests): Change type to
4867 map<string, unique_ptr<selftest>>.
4868 (simple_selftest): New struct.
4869 (register_test): New function.
4870 (register_test): Add name parameter and use it.
4871 (run_tests): Add filter parameter and use it. Add prints.
4872 Adjust to vector -> map change.
4873 * aarch64-tdep.c (_initialize_aarch64_tdep): Add names when
4874 registering selftests.
4875 * arm-tdep.c (_initialize_arm_tdep): Likewise.
4876 * disasm-selftests.c (_initialize_disasm_selftests): Likewise.
4877 * dwarf2-frame.c (_initialize_dwarf2_frame): Likewise.
4878 * dwarf2loc.c (_initialize_dwarf2loc): Likewise.
4879 * findvar.c (_initialize_findvar): Likewise.
4880 * gdbarch-selftests.c (_initialize_gdbarch_selftests): Likewise.
4881 * maint.c (maintenance_selftest): Update call to run_tests.
4882 (maintenance_info_selftests): New function.
4883 (_initialize_maint_cmds): Register "maintenance info selftests"
4884 command. Update "maintenance selftest" doc.
4885 * regcache.c (_initialize_regcache): Add names when registering
4887 * rust-exp.y (_initialize_rust_exp): Likewise.
4888 * selftest-arch.c (gdbarch_selftest): New struct.
4889 (gdbarch_tests): Remove.
4890 (register_test_foreach_arch): Add name parameter. Call
4892 (tests_with_arch): Remove, move most content to
4893 gdbarch_selftest::operator().
4894 (_initialize_selftests_foreach_arch): Remove.
4895 * selftest-arch.h (register_test_foreach_arch): Add name
4897 (run_tests_with_arch): New declaration.
4898 * utils-selftests.c (_initialize_utils_selftests): Add names
4899 when registering selftests.
4900 * utils.c (_initialize_utils): Likewise.
4901 * unittests/array-view-selftests.c
4902 (_initialize_array_view_selftests): Likewise.
4903 * unittests/environ-selftests.c (_initialize_environ_selftests):
4905 * unittests/function-view-selftests.c
4906 (_initialize_function_view_selftests): Likewise.
4907 * unittests/offset-type-selftests.c
4908 (_initialize_offset_type_selftests): Likewise.
4909 * unittests/optional-selftests.c
4910 (_initialize_optional_selftests): Likewise.
4911 * unittests/scoped_restore-selftests.c
4912 (_initialize_scoped_restore_selftests): Likewise.
4913 * NEWS: Document "maintenance selftest" and "maint info
4916 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
4918 * mi/mi-main.c (mi_load_progress): Restore current_uiout using a
4921 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
4923 * mi/mi-main.c (mi_load_progress): Make uiout variable
4926 2017-09-15 Pedro Alves <palves@redhat.com>
4928 * compile/compile-c-types.c (convert_enum, convert_int)
4929 (convert_float): Adjust to refer to int_type_v0 and float_type_v0.
4931 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
4933 * dwarf2read.c (copy_string): Remove.
4934 (parse_macro_definition): Replace copy_string with savestring.
4936 2017-09-15 Yao Qi <yao.qi@linaro.org>
4938 * configure.tgt (i[34567]86-*-darwin*): Append amd64.o to
4940 (i[34567]86-*-solaris2.1[0-9]* | x86_64-*-solaris2.1[0-9]*):
4942 (i[34567]86-*-linux*): Likewise.
4944 2017-09-14 Simon Marchi <simon.marchi@ericsson.com>
4946 * dwarf2expr.h (dwarf_stack_value): Add constructor.
4947 (dwarf_expr_context) <~dwarf_expr_context>: Define as default.
4948 <stack>: Change type to std::vector.
4949 <stack_len, stack_allocated>: Remove.
4950 <grow_stack>: Remove.
4951 * dwarf2expr.c (dwarf_expr_context::dwarf_expr_context): Adjust.
4952 (dwarf_expr_context::~dwarf_expr_context): Remove.
4953 (dwarf_expr_context::grow_stack): Remove.
4954 (dwarf_expr_context::push): Adjust.
4955 (dwarf_expr_context::pop): Adjust.
4956 (dwarf_expr_context::fetch): Adjust.
4957 (dwarf_expr_context::fetch_in_stack_memory): Adjust.
4958 (dwarf_expr_context::stack_empty_p): Adjust.
4959 (dwarf_expr_context::execute_stack_op): Adjust.
4961 2017-09-14 Simon Marchi <simon.marchi@ericsson.com>
4963 * dwarf2expr.h (dwarf_expr_context) <stack_empty_p>: Change
4964 return type to bool.
4965 * dwarf2expr.c (dwarf_expr_context::stack_empty_p): Likewise.
4967 2017-09-14 Simon Marchi <simon.marchi@ericsson.com>
4969 * dwarf2expr.h (dwarf_expr_piece) <v.mem.in_stack_memory>:
4970 Change type to bool.
4971 (dwarf_stack_value) <in_stack_memory>: Likewise.
4972 (dwarf_expr_context) <push_address>: Change parameter type to
4974 <fetch_in_stack_memory>: Change return type to bool.
4975 <push>: Change parameter type to bool.
4976 * dwarf2expr.c (dwarf_expr_context::push): Change parameter type
4978 (dwarf_expr_context::push_address): Likewise.
4979 (dwarf_expr_context::fetch_in_stack_memory): Change return type
4981 (dwarf_expr_context::execute_stack_op): Adjust.
4982 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Adjust.
4984 2017-09-14 Simon Marchi <simon.marchi@ericsson.com>
4986 * dwarf2expr.h (struct dwarf_expr_piece): Move up.
4987 (struct dwarf_expr_context) <n_pieces>: Remove.
4988 <pieces>: Change type to std::vector.
4989 * dwarf2expr.c (dwarf_expr_context::dwarf_expr_context): Adjust.
4990 (dwarf_expr_context::~dwarf_expr_context): Don't manually free
4992 (dwarf_expr_context::add_piece): Adjust.
4993 * dwarf2loc.c (struct piece_closure): Initialize fields.
4995 <pieces>: Change type to std::vector.
4996 (allocate_piece_closure): Adjust, change parameter to
4997 std::vector rvalue and std::move it to piece_closure.
4998 (rw_pieced_value): Adjust.
4999 (check_pieced_synthetic_pointer): Adjust.
5000 (indirect_synthetic_pointer): Adjust.
5001 (coerce_pieced_ref): Adjust.
5002 (free_pieced_value_closure): Adjust. Use delete to free
5004 (dwarf2_evaluate_loc_desc_full): Adjust. std::move ctx.pieces
5005 to allocate_piece_closure.
5006 (dwarf2_loc_desc_get_symbol_read_needs): Adjust.
5008 2017-09-12 Simon Marchi <simon.marchi@ericsson.com>
5010 * probe.h (probe_ops_cp): Remove typedef.
5011 (DEF_VEC_P (probe_ops_cp)): Remove.
5012 (all_probe_ops): Change type to std::vector.
5013 * probe.c (info_probes_for_ops): Adjust to vector change.
5014 (probe_linespec_to_ops): Likewise.
5015 (all_probe_ops): Change type to std::vector.
5016 (_initialize_probe): Adjust to vector change.
5017 * dtrace-probe.c (_initialize_dtrace_probe): Likewise.
5018 * elfread.c (elf_get_probes): Likewise.
5019 * stap-probe.c (_initialize_stap_probe): Likewise.
5021 2017-09-12 Simon Marchi <simon.marchi@ericsson.com>
5023 * probe.h (struct bound_probe): Define constructors.
5024 * probe.c (bound_probe_s): Remove typedef.
5025 (DEF_VEC_O (bound_probe_s)): Remove VEC.
5026 (collect_probes): Change return type to std::vector, remove
5028 (compare_probes): Return bool, change parameter type. Change
5029 semantic to "less than".
5030 (gen_ui_out_table_header_info): Change parameter to std::vector
5032 (exists_probe_with_pops): Likewise.
5033 (info_probes_for_ops): Update to std::vector change.
5034 (enable_probes_command): Likewise.
5035 (disable_probes_command): Likewise.
5037 2017-09-12 Simon Marchi <simon.marchi@ericsson.com>
5039 * probe.h (struct probe_ops) <get_probes>: Change parameter from
5041 * probe.c (parse_probes_in_pspace): Update.
5042 (find_probes_in_objfile): Update.
5043 (find_probe_by_pc): Update.
5044 (collect_probes): Update.
5045 (probe_any_get_probes): Update.
5046 * symfile.h (struct sym_probe_fns) <sym_get_probes> Change
5047 return type to reference to std::vector.
5048 * dtrace-probe.c (dtrace_process_dof_probe): Change parameter to
5049 std::vector and update.
5050 (dtrace_process_dof): Likewise.
5051 (dtrace_get_probes): Likewise.
5052 * elfread.c (elf_get_probes): Change return type to std::vector,
5053 store an std::vector in bfd_data.
5054 (probe_key_free): Update to std::vector.
5055 * stap-probe.c (handle_stap_probe): Change parameter to
5056 std::vector and update.
5057 (stap_get_probes): Likewise.
5058 * symfile-debug.c (debug_sym_get_probes): Change return type to
5059 std::vector and update.
5061 2017-09-11 Tom Tromey <tom@tromey.com>
5063 * breakpoint.c (program_breakpoint_here_p): Update.
5064 * target.c (make_scoped_restore_show_memory_breakpoints): Rename
5065 from make_show_memory_breakpoints_cleanup. Return a
5066 scoped_restore_tmpl<int>.
5067 (restore_show_memory_breakpoints): Remove.
5068 * ppc-linux-tdep.c (ppc_linux_memory_remove_breakpoint): Update.
5069 * mem-break.c (memory_validate_breakpoint): Update.
5070 * ia64-tdep.c (ia64_memory_insert_breakpoint): Update.
5071 (ia64_memory_remove_breakpoint): Update.
5072 (ia64_breakpoint_from_pc): Update.
5073 * target.h (make_scoped_restore_show_memory_breakpoints): Rename
5074 from make_show_memory_breakpoints_cleanup.
5076 2017-09-11 Tom Tromey <tom@tromey.com>
5078 * d-namespace.c (d_lookup_symbol): Use std::string.
5079 (find_symbol_in_baseclass): Likewise.
5081 2017-09-11 Tom Tromey <tom@tromey.com>
5083 * ctf.c (ctf_start): Use std::string.
5085 2017-09-11 Tom Tromey <tom@tromey.com>
5087 * ada-lang.c (is_known_support_routine): Update.
5088 (ada_unhandled_exception_name_addr_from_raise): Update.
5089 * guile/scm-frame.c (gdbscm_frame_name): Update.
5090 * python/py-frame.c (frapy_name): Update.
5091 (frapy_function): Update.
5092 * stack.h (find_frame_funname): Update.
5093 * stack.c (find_frame_funname): Return unique_xmalloc_ptr.
5094 (print_frame): Update.
5096 2017-09-11 Tom Tromey <tom@tromey.com>
5098 * findcmd.c (put_bits): Take a gdb::byte_vector.
5099 (parse_find_args): Return gdb::byte_vector. "args" now const.
5100 Remove "pattern_bufp" and "pattern_lenp" parameters. Remove
5102 (find_command): Update.
5104 2017-09-11 Tom Tromey <tom@tromey.com>
5106 * cli/cli-script.c (class scoped_restore_hook_in): New.
5107 (clear_hook_in_cleanup): Remove.
5108 (execute_cmd_pre_hook, execute_cmd_post_hook): Use
5109 scoped_restore_hook_in.
5111 2017-09-11 Tom Tromey <tom@tromey.com>
5113 * cli/cli-script.c (restore_interp): Remove.
5114 (read_command_lines): Use scoped_restore_interp.
5115 * interps.c (scoped_restore_interp::set_temp): Rename from
5117 * interps.h (class scoped_restore_interp): New.
5118 (interp_set_temp): Remove.
5120 2017-09-11 Tom Tromey <tom@tromey.com>
5122 * mi/mi-cmd-catch.c (mi_cmd_catch_assert)
5123 (mi_cmd_catch_exception, mi_catch_load_unload): Update.
5124 * mi/mi-cmd-break.c (setup_breakpoint_reporting): Return a
5126 (mi_cmd_break_insert_1): Update.
5127 * mi/mi-cmd-break.h (setup_breakpoint_reporting): Return a
5130 2017-09-11 Tom Tromey <tom@tromey.com>
5132 * demangle.c (demangle_command): Update.
5133 * breakpoint.c (disable_command): Update.
5134 (enable_command): Update.
5135 (find_location_by_number): Make "number" const. Use
5137 * cli/cli-utils.c (extract_arg): Return std::string.
5138 * probe.c (parse_probe_linespec): Update. Change types.
5139 (collect_probes): Take string arguments.
5140 (parse_probe_linespec): Likewise.
5141 (info_probes_for_ops): Update.
5142 (enable_probes_command): Update.
5143 (disable_probes_command): Update.
5144 * break-catch-sig.c (catch_signal_split_args): Update.
5145 * mi/mi-parse.c (mi_parse): Update.
5147 2017-09-11 Tom Tromey <tom@tromey.com>
5149 * language.h (language_enum): Make argument const.
5150 * language.c (language_enum): Make argument const.
5152 2017-09-11 Tom Tromey <tom@tromey.com>
5154 * common/common-utils.h (skip_to_space): Remove macro, redeclare
5156 (skip_to_space): Rename from skip_to_space_const.
5157 * common/common-utils.c (skip_to_space): New function.
5158 (skip_to_space): Rename from skip_to_space_const.
5159 * cli/cli-utils.h (get_number): Rename from get_number_const.
5160 (extract_arg): Rename from extract_arg_const.
5161 * cli/cli-utils.c (get_number): Rename from get_number_const.
5162 (extract_arg): Rename from extract_arg_const.
5163 (number_or_range_parser::get_number): Use ::get_number.
5164 * aarch64-linux-tdep.c, ada-lang.c, arm-linux-tdep.c, ax-gdb.c,
5165 break-catch-throw.c, breakpoint.c, cli/cli-cmds.c, cli/cli-dump.c,
5166 cli/cli-script.c, cli/cli-setshow.c, compile/compile.c,
5167 completer.c, demangle.c, disasm.c, findcmd.c, linespec.c,
5168 linux-tdep.c, linux-thread-db.c, location.c, mi/mi-parse.c,
5169 minsyms.c, nat/linux-procfs.c, printcmd.c, probe.c,
5170 python/py-breakpoint.c, record.c, rust-exp.y, serial.c, stack.c,
5171 stap-probe.c, tid-parse.c, tracepoint.c: Update all callers.
5173 2017-09-11 Tom Tromey <tom@tromey.com>
5175 * python/python.c (do_start_initialization): Use
5176 py-event-types.def to initialize types.
5177 Define all object type structures.
5178 * python/python-internal.h: Don't declare event initialization
5180 * python/py-threadevent.c (thread_event_object_type): Don't
5182 * python/py-stopevent.c (stop_event_object_type): Don't define.
5183 * python/py-signalevent.c (signal_event_object_type): Don't
5185 * python/py-newobjfileevent.c (new_objfile_event_object_type)
5186 (clear_objfiles_event_object_type): Don't declare or define.
5187 * python/py-infevents.c (inferior_call_pre_event_object_type)
5188 (inferior_call_post_event_object_type)
5189 (register_changed_event_object_type)
5190 (memory_changed_event_object_type): Don't declare or define.
5191 * python/py-inferior.c (new_thread_event_object_type)
5192 (new_inferior_event_object_type)
5193 (inferior_deleted_event_object_type): Don't declare or define.
5194 * python/py-exitedevent.c (exited_event_object_type): Don't
5196 * python/py-evts.c (gdbpy_initialize_py_events): Use
5198 * python/py-events.h (thread_event_object_type): Don't declare.
5199 (events_object): Use py-all-events.def.
5200 * python/py-event.h (GDBPY_NEW_EVENT_TYPE): Remove. Use
5202 * python/py-event-types.def: New file.
5203 * python/py-continueevent.c (create_continue_event_object): Don't
5205 * python/py-bpevent.c (breakpoint_event_object_type): Don't
5207 * python/py-all-events.def: New file.
5209 2017-09-11 Tom Tromey <tom@tromey.com>
5211 * python/py-threadevent.c (create_thread_event_object): Return
5213 * python/py-stopevent.h (create_stop_event_object)
5214 (create_breakpoint_event_object, create_signal_event_object):
5216 * python/py-stopevent.c (create_stop_event_object): Return
5218 (emit_stop_event): Update.
5219 * python/py-signalevent.c (create_signal_event_object): Return
5221 * python/py-infevents.c (create_inferior_call_event_object):
5223 * python/py-event.h (create_event_object)
5224 (create_thread_event_object): Update.
5225 * python/py-event.c (create_event_object): Return gdbpy_ref.
5226 * python/py-continueevent.c: Return gdbpy_ref.
5227 * python/py-bpevent.c (create_breakpoint_event_object): Return
5230 2017-09-11 Tom Tromey <tom@tromey.com>
5234 * python/python.c (do_start_initialization): Initialize new event
5236 * python/python-internal.h (gdbpy_initialize_new_inferior_event)
5237 (gdbpy_initialize_inferior_deleted_event)
5238 (gdbpy_initialize_new_thread_event): Declare.
5239 * python/py-threadevent.c (create_thread_event_object): Add option
5241 * python/py-inferior.c (new_thread_event_object_type)
5242 (new_inferior_event_object_type)
5243 (inferior_deleted_event_object_type): Declare.
5244 (python_new_inferior, python_inferior_deleted): New functions.
5245 (add_thread_object): Emit new_thread event.
5246 (gdbpy_initialize_inferior): Attach new functions to corresponding
5248 (new_thread, new_inferior, inferior_deleted): Define new event
5250 * python/py-evts.c (gdbpy_initialize_py_events): Add new
5252 * python/py-events.h (events_object) <new_inferior,
5253 inferior_deleted, new_thread>: New fields.
5254 * python/py-event.h (create_thread_event_breakpoint): Add optional
5257 2017-09-10 Andrew Burgess <andrew.burgess@embecosm.com>
5259 * utils.c (abort_with_message): Don't compare gdb_stderr to NULL,
5260 check current_ui instead.
5261 (internal_vproblem): Likewise.
5263 2017-09-09 Simon Marchi <simon.marchi@ericsson.com>
5265 * thread.c (print_thread_info_1): Remove unnecessary calls to
5266 uiout->is_mi_like_p.
5268 2017-09-09 Tom Tromey <tom@tromey.com>
5270 * namespace.h (add_using_directive): Update.
5271 * namespace.c (add_using_directive): Change type of excludes to
5273 * dwarf2read.c (read_import_statement): Use std::vector.
5274 (read_namespace): Update.
5275 * cp-namespace.c (cp_scan_for_anonymous_namespaces): Update.
5277 2017-09-09 Tom Tromey <tom@tromey.com>
5279 * linespec.c (create_sals_line_offset): Use gdb::def_vector.
5281 2017-09-09 Tom Tromey <tom@tromey.com>
5283 * p-valprint.c (pascal_object_print_value): Use gdb::byte_vector.
5285 2017-09-09 Tom Tromey <tom@tromey.com>
5287 * stack.c (func_command): Use gdb::def_vector.
5289 2017-09-09 Tom Tromey <tom@tromey.com>
5291 * mi/mi-cmd-var.c (mi_cmd_var_list_children): Use gdb::optional,
5292 ui_out_emit_list, ui_out_emit_tuple.
5293 (mi_cmd_var_update): Likewise.
5295 2017-09-09 Tom Tromey <tom@tromey.com>
5297 * mi/mi-interp.c (mi_user_selected_context_changed): Use
5298 ui_out_redirect_pop.
5299 * guile/scm-ports.c (ioscm_with_output_to_port_worker): Use
5300 ui_out_redirect_pop.
5301 * utils.c (do_ui_out_redirect_pop)
5302 (make_cleanup_ui_out_redirect_pop): Remove.
5303 * top.c (execute_command_to_string): Use ui_out_redirect_pop.
5304 * utils.h (make_cleanup_ui_out_redirect_pop): Remove.
5305 * ui-out.h (ui_out_redirect_pop): New class.
5307 2017-09-09 Tom Tromey <tom@tromey.com>
5309 * mi/mi-main.c (output_cores): Use ui_out_emit_list.
5310 (list_available_thread_groups, mi_cmd_list_thread_groups)
5311 (mi_cmd_data_list_changed_registers, mi_cmd_data_read_memory)
5312 (mi_cmd_data_read_memory_bytes, mi_cmd_trace_frame_collected):
5315 2017-09-09 Tom Tromey <tom@tromey.com>
5317 * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn): Use
5320 2017-09-09 Tom Tromey <tom@tromey.com>
5322 * target.c (flash_erase_command): Use ui_out_emit_tuple.
5323 * stack.c (print_frame): Use ui_out_emit_tuple.
5324 * spu-tdep.c (info_spu_event_command): Use ui_out_emit_tuple.
5325 (info_spu_mailbox_command, info_spu_dma_command)
5326 (info_spu_proxydma_command): Likewise.
5327 * mi/mi-main.c (mi_cmd_trace_frame_collected): Use
5328 ui_out_emit_tuple, gdb::byte_vector, bin2hex.
5329 * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries): Use
5331 * breakpoint.c (print_it_watchpoint): Use ui_out_emit_tuple.
5333 2017-09-09 Tom Tromey <tom@tromey.com>
5335 * ui-out.h (make_cleanup_ui_out_table_begin_end): Remove.
5336 (class ui_out_emit_table): Update comment.
5337 * ui-out.c (do_cleanup_table_end)
5338 (make_cleanup_ui_out_table_begin_end): Remove.
5339 * spu-tdep.c (info_spu_mailbox_list): Use ui_out_emit_table.
5340 (info_spu_dma_cmdlist): Likewise.
5341 * probe.c (info_probes_for_ops): Use ui_out_emit_table.
5342 * darwin-nat-info.c (darwin_debug_regions_recurse): Use
5345 2017-09-09 Tom Tromey <tom@tromey.com>
5347 * thread.c (print_thread_info_1): Use ui_out_emit_table,
5348 ui_out_emit_list, gdb::optional.
5350 2017-09-09 John Baldwin <jhb@FreeBSD.org>
5352 * aarch64-linux-nat.c: Remove _initialize_aarch64_linux_nat
5354 * aarch64-linux-tdep.c: Remove _initialize_aarch64_linux_tdep
5356 * aarch64-newlib-tdep.c: Remove _initialize_aarch64_newlib_tdep
5358 * aarch64-tdep.c: Remove _initialize_aarch64_tdep prototype.
5359 * ada-exp.y: Remove _initialize_ada_exp prototype.
5360 * ada-lang.c: Remove _initialize_ada_language prototype.
5361 * ada-tasks.c: Remove _initialize_tasks prototype.
5362 * addrmap.c: Remove _initialize_addrmap prototype.
5363 * agent.c: Remove _initialize_agent prototype.
5364 * aix-thread.c: Remove _initialize_aix_thread prototype.
5365 * alpha-bsd-nat.c: Remove _initialize_alphabsd_nat prototype.
5366 * alpha-linux-nat.c: Remove _initialize_alpha_linux_nat prototype.
5367 * alpha-linux-tdep.c: Remove _initialize_alpha_linux_tdep
5369 * alpha-nbsd-tdep.c: Remove _initialize_alphanbsd_tdep prototype.
5370 * alpha-obsd-tdep.c: Remove _initialize_alphaobsd_tdep prototype.
5371 * alpha-tdep.c: Remove _initialize_alpha_tdep prototype.
5372 * amd64-darwin-tdep.c: Remove _initialize_amd64_darwin_tdep
5374 * amd64-dicos-tdep.c: Remove _initialize_amd64_dicos_tdep
5376 * amd64-fbsd-nat.c: Remove _initialize_amd64fbsd_nat prototype.
5377 * amd64-fbsd-tdep.c: Remove _initialize_amd64fbsd_tdep prototype.
5378 * amd64-linux-nat.c: Remove _initialize_amd64_linux_nat prototype.
5379 * amd64-linux-tdep.c: Remove _initialize_amd64_linux_tdep
5381 * amd64-nbsd-nat.c: Remove _initialize_amd64nbsd_nat prototype.
5382 * amd64-nbsd-tdep.c: Remove _initialize_amd64nbsd_tdep prototype.
5383 * amd64-obsd-nat.c: Remove _initialize_amd64obsd_nat prototype.
5384 * amd64-obsd-tdep.c: Remove _initialize_amd64obsd_tdep prototype.
5385 * amd64-sol2-tdep.c: Remove _initialize_amd64_sol2_tdep prototype.
5386 * amd64-tdep.c: Remove _initialize_amd64_tdep prototype.
5387 * amd64-windows-nat.c: Remove _initialize_amd64_windows_nat
5389 * amd64-windows-tdep.c: Remove _initialize_amd64_windows_tdep
5391 * annotate.c: Remove _initialize_annotate prototype.
5392 * arc-newlib-tdep.c: Remove _initialize_arc_newlib_tdep prototype.
5393 * arc-tdep.c: Remove _initialize_arc_tdep prototype.
5394 * arch-utils.c: Remove _initialize_gdbarch_utils prototype.
5395 * arm-linux-nat.c: Remove _initialize_arm_linux_nat prototype.
5396 * arm-linux-tdep.c: Remove _initialize_arm_linux_tdep prototype.
5397 * arm-nbsd-tdep.c: Remove _initialize_arm_netbsd_tdep prototype.
5398 * arm-obsd-tdep.c: Remove _initialize_armobsd_tdep prototype.
5399 * arm-symbian-tdep.c: Remove _initialize_arm_symbian_tdep
5401 * arm-tdep.c: Remove _initialize_arm_tdep prototype.
5402 * arm-wince-tdep.c: Remove _initialize_arm_wince_tdep prototype.
5403 * auto-load.c: Remove _initialize_auto_load prototype.
5404 * auxv.c: Remove _initialize_auxv prototype.
5405 * avr-tdep.c: Remove _initialize_avr_tdep prototype.
5406 * ax-gdb.c: Remove _initialize_ax_gdb prototype.
5407 * bfin-linux-tdep.c: Remove _initialize_bfin_linux_tdep prototype.
5408 * bfin-tdep.c: Remove _initialize_bfin_tdep prototype.
5409 * break-catch-sig.c: Remove _initialize_break_catch_sig prototype.
5410 * break-catch-syscall.c: Remove _initialize_break_catch_syscall
5412 * break-catch-throw.c: Remove _initialize_break_catch_throw
5414 * breakpoint.c: Remove _initialize_breakpoint prototype.
5415 * bsd-uthread.c: Remove _initialize_bsd_uthread prototype.
5416 * btrace.c: Remove _initialize_btrace prototype.
5417 * charset.c: Remove _initialize_charset prototype.
5418 * cli/cli-cmds.c: Remove _initialize_cli_cmds prototype.
5419 * cli/cli-dump.c: Remove _initialize_cli_dump prototype.
5420 * cli/cli-interp.c: Remove _initialize_cli_interp prototype.
5421 * cli/cli-logging.c: Remove _initialize_cli_logging prototype.
5422 * cli/cli-script.c: Remove _initialize_cli_script prototype.
5423 * coff-pe-read.c: Remove _initialize_coff_pe_read prototype.
5424 * coffread.c: Remove _initialize_coffread prototype.
5425 * compile/compile.c: Remove _initialize_compile prototype.
5426 * complaints.c: Remove _initialize_complaints prototype.
5427 * completer.c: Remove _initialize_completer prototype.
5428 * copying.awk: Remove _initialize_copying prototype.
5429 * copying.c: Regenerate.
5430 * core-regset.c: Remove _initialize_core_regset prototype.
5431 * corefile.c: Remove _initialize_core prototype.
5432 * corelow.c: Remove _initialize_corelow prototype.
5433 * cp-abi.c: Remove _initialize_cp_abi prototype.
5434 * cp-namespace.c: Remove _initialize_cp_namespace prototype.
5435 * cp-support.c: Remove _initialize_cp_support prototype.
5436 * cp-valprint.c: Remove _initialize_cp_valprint prototype.
5437 * cris-linux-tdep.c: Remove _initialize_cris_linux_tdep prototype.
5438 * cris-tdep.c: Remove _initialize_cris_tdep prototype.
5439 * ctf.c: Remove _initialize_ctf prototype.
5440 * d-lang.c: Remove _initialize_d_language prototype.
5441 * darwin-nat-info.c: Remove _initialize_darwin_info_commands
5443 * darwin-nat.c: Remove _initialize_darwin_inferior prototype.
5444 * dbxread.c: Remove _initialize_dbxread prototype.
5445 * dcache.c: Remove _initialize_dcache prototype.
5446 * demangle.c: Remove _initialize_demangler prototype.
5447 * disasm-selftests.c: Remove _initialize_disasm_selftests
5449 * disasm.c: Remove _initialize_disasm prototype.
5450 * dtrace-probe.c: Remove _initialize_dtrace_probe prototype.
5451 * dummy-frame.c: Remove _initialize_dummy_frame prototype.
5452 * dwarf2-frame-tailcall.c: Remove _initialize_tailcall_frame
5454 * dwarf2-frame.c: Remove _initialize_dwarf2_frame prototype.
5455 * dwarf2expr.c: Remove _initialize_dwarf2expr prototype.
5456 * dwarf2loc.c: Remove _initialize_dwarf2loc prototype.
5457 * dwarf2read.c: Remove _initialize_dwarf2_read prototype.
5458 * elfread.c: Remove _initialize_elfread prototype.
5459 * exec.c: Remove _initialize_exec prototype.
5460 * extension.c: Remove _initialize_extension prototype.
5461 * f-lang.c: Remove _initialize_f_language prototype.
5462 * f-valprint.c: Remove _initialize_f_valprint prototype.
5463 * fbsd-nat.c: Remove _initialize_fbsd_nat prototype.
5464 * fbsd-tdep.c: Remove _initialize_fbsd_tdep prototype.
5465 * filesystem.c: Remove _initialize_filesystem prototype.
5466 * findcmd.c: Remove _initialize_mem_search prototype.
5467 * fork-child.c: Remove _initialize_fork_child prototype.
5468 * frame-base.c: Remove _initialize_frame_base prototype.
5469 * frame-unwind.c: Remove _initialize_frame_unwind prototype.
5470 * frame.c: Remove _initialize_frame prototype.
5471 * frv-linux-tdep.c: Remove _initialize_frv_linux_tdep prototype.
5472 * frv-tdep.c: Remove _initialize_frv_tdep prototype.
5473 * ft32-tdep.c: Remove _initialize_ft32_tdep prototype.
5474 * gcore.c: Remove _initialize_gcore prototype.
5475 * gdb_bfd.c: Remove _initialize_gdb_bfd prototype.
5476 * gdbarch.c: Regenerate.
5477 * gdbarch.sh: Remove _initialize_gdbarch prototype.
5478 * gdbtypes.c: Remove _initialize_gdbtypes prototype.
5479 * gnu-nat.c: Remove _initialize_gnu_nat prototype.
5480 * gnu-v2-abi.c: Remove _initialize_gnu_v2_abi prototype.
5481 * gnu-v3-abi.c: Remove _initialize_gnu_v3_abi prototype.
5482 * go-lang.c: Remove _initialize_go_language prototype.
5483 * go32-nat.c: Remove _initialize_go32_nat prototype.
5484 * guile/guile.c: Remove _initialize_guile prototype.
5485 * h8300-tdep.c: Remove _initialize_h8300_tdep prototype.
5486 * hppa-linux-nat.c: Remove _initialize_hppa_linux_nat prototype.
5487 * hppa-linux-tdep.c: Remove _initialize_hppa_linux_tdep prototype.
5488 * hppa-nbsd-nat.c: Remove _initialize_hppanbsd_nat prototype.
5489 * hppa-nbsd-tdep.c: Remove _initialize_hppanbsd_tdep prototype.
5490 * hppa-obsd-nat.c: Remove _initialize_hppaobsd_nat prototype.
5491 * hppa-obsd-tdep.c: Remove _initialize_hppaobsd_tdep prototype.
5492 * hppa-tdep.c: Remove _initialize_hppa_tdep prototype.
5493 * i386-bsd-nat.c: Remove _initialize_i386bsd_nat prototype.
5494 * i386-cygwin-tdep.c: Remove _initialize_i386_cygwin_tdep
5496 * i386-darwin-tdep.c: Remove _initialize_i386_darwin_tdep
5498 * i386-dicos-tdep.c: Remove _initialize_i386_dicos_tdep prototype.
5499 * i386-fbsd-nat.c: Remove _initialize_i386fbsd_nat prototype.
5500 * i386-fbsd-tdep.c: Remove _initialize_i386fbsd_tdep prototype.
5501 * i386-gnu-nat.c: Remove _initialize_i386gnu_nat prototype.
5502 * i386-gnu-tdep.c: Remove _initialize_i386gnu_tdep prototype.
5503 * i386-linux-nat.c: Remove _initialize_i386_linux_nat prototype.
5504 * i386-linux-tdep.c: Remove _initialize_i386_linux_tdep prototype.
5505 * i386-nbsd-nat.c: Remove _initialize_i386nbsd_nat prototype.
5506 * i386-nbsd-tdep.c: Remove _initialize_i386nbsd_tdep prototype.
5507 * i386-nto-tdep.c: Remove _initialize_i386nto_tdep prototype.
5508 * i386-obsd-nat.c: Remove _initialize_i386obsd_nat prototype.
5509 * i386-obsd-tdep.c: Remove _initialize_i386obsd_tdep prototype.
5510 * i386-sol2-nat.c: Remove _initialize_amd64_sol2_nat prototype.
5511 * i386-sol2-tdep.c: Remove _initialize_amd64_sol2_tdep prototype.
5512 * i386-tdep.c: Remove _initialize_i386_tdep prototype.
5513 * i386-windows-nat.c: Remove _initialize_i386_windows_nat
5515 * ia64-libunwind-tdep.c: Remove _initialize_libunwind_frame
5517 * ia64-linux-nat.c: Remove _initialize_ia64_linux_nat prototype.
5518 * ia64-linux-tdep.c: Remove _initialize_ia64_linux_tdep prototype.
5519 * ia64-tdep.c: Remove _initialize_ia64_tdep prototype.
5520 * ia64-vms-tdep.c: Remove _initialize_ia64_vms_tdep prototype.
5521 * infcall.c: Remove _initialize_infcall prototype.
5522 * infcmd.c: Remove _initialize_infcmd prototype.
5523 * inferior.c: Remove _initialize_inferiors prototype.
5524 * inflow.c: Remove _initialize_inflow prototype.
5525 * infrun.c: Remove _initialize_infrun prototype.
5526 * interps.c: Remove _initialize_interpreter prototype.
5527 * iq2000-tdep.c: Remove _initialize_iq2000_tdep prototype.
5528 * jit.c: Remove _initialize_jit prototype.
5529 * language.c: Remove _initialize_language prototype.
5530 * linux-fork.c: Remove _initialize_linux_fork prototype.
5531 * linux-nat.c: Remove _initialize_linux_nat prototype.
5532 * linux-tdep.c: Remove _initialize_linux_tdep prototype.
5533 * linux-thread-db.c: Remove _initialize_thread_db prototype.
5534 * lm32-tdep.c: Remove _initialize_lm32_tdep prototype.
5535 * m2-lang.c: Remove _initialize_m2_language prototype.
5536 * m32c-tdep.c: Remove _initialize_m32c_tdep prototype.
5537 * m32r-linux-nat.c: Remove _initialize_m32r_linux_nat prototype.
5538 * m32r-linux-tdep.c: Remove _initialize_m32r_linux_tdep prototype.
5539 * m32r-tdep.c: Remove _initialize_m32r_tdep prototype.
5540 * m68hc11-tdep.c: Remove _initialize_m68hc11_tdep prototype.
5541 * m68k-bsd-nat.c: Remove _initialize_m68kbsd_nat prototype.
5542 * m68k-bsd-tdep.c: Remove _initialize_m68kbsd_tdep prototype.
5543 * m68k-linux-nat.c: Remove _initialize_m68k_linux_tdep prototype.
5544 * m68k-linux-tdep.c: Remove _initialize_m68k_linux_tdep prototype.
5545 * m68k-tdep.c: Remove _initialize_m68k_tdep prototype.
5546 * m88k-bsd-nat.c: Remove _initialize_m68kbsd_nat prototype.
5547 * m88k-tdep.c: Remove _initialize_m68kbsd_tdep prototype.
5548 * machoread.c: Remove _initialize_machoread prototype.
5549 * macrocmd.c: Remove _initialize_macrocmd prototype.
5550 * macroscope.c: Remove _initialize_macroscope prototype.
5551 * maint.c: Remove _initialize_maint_cmds prototype.
5552 * mdebugread.c: Remove _initialize_mdebugread prototype.
5553 * memattr.c: Remove _initialize_mem prototype.
5554 * mep-tdep.c: Remove _initialize_mep_tdep prototype.
5555 * mi/mi-cmd-env.c: Remove _initialize_mi_cmd_env prototype.
5556 * mi/mi-cmds.c: Remove _initialize_mi_cmds prototype.
5557 * mi/mi-interp.c: Remove _initialize_mi_interp prototype.
5558 * mi/mi-main.c: Remove _initialize_mi_main prototype.
5559 * microblaze-linux-tdep.c: Remove
5560 _initialize_microblaze_linux_tdep prototype.
5561 * microblaze-tdep.c: Remove _initialize_microblaze_tdep prototype.
5562 * mips-fbsd-nat.c: Remove _initialize_mips_fbsd_nat prototype.
5563 * mips-fbsd-tdep.c: Remove _initialize_mips_fbsd_tdep prototype.
5564 * mips-linux-nat.c: Remove _initialize_mips_linux_nat prototype.
5565 * mips-linux-tdep.c: Remove _initialize_mips_linux_tdep prototype.
5566 * mips-nbsd-nat.c: Remove _initialize_mipsnbsd_nat prototype.
5567 * mips-nbsd-tdep.c: Remove _initialize_mipsnbsd_tdep prototype.
5568 * mips-sde-tdep.c: Remove _initialize_mips_sde_tdep prototype.
5569 * mips-tdep.c: Remove _initialize_mips_tdep prototype.
5570 * mips64-obsd-nat.c: Remove _initialize_mips64obsd_nat prototype.
5571 * mips64-obsd-tdep.c: Remove _initialize_mips64obsd_tdep
5573 * mipsread.c: Remove _initialize_mipsread prototype.
5574 * mn10300-linux-tdep.c: Remove _initialize_mn10300_linux_tdep
5576 * mn10300-tdep.c: Remove _initialize_mn10300_tdep prototype.
5577 * moxie-tdep.c: Remove _initialize_moxie_tdep prototype.
5578 * msp430-tdep.c: Remove _initialize_msp430_tdep prototype.
5579 * mt-tdep.c: Remove _initialize_mt_tdep prototype.
5580 * nds32-tdep.c: Remove _initialize_nds32_tdep prototype.
5581 * nios2-linux-tdep.c: Remove _initialize_nios2_linux_tdep
5583 * nios2-tdep.c: Remove _initialize_nios2_tdep prototype.
5584 * nto-procfs.c: Remove _initialize_procfs prototype.
5585 * nto-tdep.c: Remove _initialize_nto_tdep prototype.
5586 * objc-lang.c: Remove _initialize_objc_language prototype.
5587 * objfiles.c: Remove _initialize_objfiles prototype.
5588 * observer.c: Remove observer_test_first_notification_function,
5589 observer_test_second_notification_function,
5590 observer_test_third_notification_function, and
5591 _initialize_observer prototypes.
5592 * opencl-lang.c: Remove _initialize_opencl_language prototypes.
5593 * osabi.c: Remove _initialize_gdb_osabi prototype.
5594 * osdata.c: Remove _initialize_osdata prototype.
5595 * p-valprint.c: Remove _initialize_pascal_valprint prototype.
5596 * parse.c: Remove _initialize_parse prototype.
5597 * ppc-fbsd-nat.c: Remove _initialize_ppcfbsd_nat prototype.
5598 * ppc-fbsd-tdep.c: Remove _initialize_ppcfbsd_tdep prototype.
5599 * ppc-linux-nat.c: Remove _initialize_ppc_linux_nat prototype.
5600 * ppc-linux-tdep.c: Remove _initialize_ppc_linux_tdep prototype.
5601 * ppc-nbsd-nat.c: Remove _initialize_ppcnbsd_nat prototype.
5602 * ppc-nbsd-tdep.c: Remove _initialize_ppcnbsd_tdep prototype.
5603 * ppc-obsd-nat.c: Remove _initialize_ppcobsd_nat prototype.
5604 * ppc-obsd-tdep.c: Remove _initialize_ppcobsd_tdep prototype.
5605 * printcmd.c: Remove _initialize_printcmd prototype.
5606 * probe.c: Remove _initialize_probe prototype.
5607 * proc-api.c: Remove _initialize_proc_api prototype.
5608 * proc-events.c: Remove _initialize_proc_events prototype.
5609 * proc-service.c: Remove _initialize_proc_service prototype.
5610 * procfs.c: Remove _initialize_procfs prototype.
5611 * psymtab.c: Remove _initialize_psymtab prototype.
5612 * python/python.c: Remove _initialize_python prototype.
5613 * ravenscar-thread.c: Remove _initialize_ravenscar prototype.
5614 * record-btrace.c: Remove _initialize_record_btrace prototype.
5615 * record-full.c: Remove _initialize_record_full prototype.
5616 * record.c: Remove _initialize_record prototype.
5617 * regcache.c: Remove _initialize_regcache prototype.
5618 * reggroups.c: Remove _initialize_reggroup prototype.
5619 * remote-notif.c: Remove _initialize_notif prototype.
5620 * remote-sim.c: Remove _initialize_remote_sim prototype.
5621 * remote.c: Remove _initialize_remote prototype.
5622 * reverse.c: Remove _initialize_reverse prototype.
5623 * rl78-tdep.c: Remove _initialize_rl78_tdep prototype.
5624 * rs6000-aix-tdep.c: Remove _initialize_rs6000_aix_tdep prototype.
5625 * rs6000-lynx178-tdep.c: Remove _initialize_rs6000_lynx178_tdep
5627 * rs6000-nat.c: Remove _initialize_rs6000_nat prototype.
5628 * rs6000-tdep.c: Remove _initialize_rs6000_tdep prototype.
5629 * rust-exp.y: Remove _initialize_rust_exp prototype.
5630 * rx-tdep.c: Remove _initialize_rx_tdep prototype.
5631 * s390-linux-nat.c: Remove _initialize_s390_nat prototype.
5632 * s390-linux-tdep.c: Remove _initialize_s390_tdep prototype.
5633 * score-tdep.c: Remove _initialize_score_tdep prototype.
5634 * selftest-arch.c: Remove _initialize_selftests_foreach_arch
5636 * ser-go32.c: Remove _initialize_ser_dos prototype.
5637 * ser-mingw.c: Remove _initialize_ser_windows prototype.
5638 * ser-pipe.c: Remove _initialize_ser_pipe prototype.
5639 * ser-tcp.c: Remove _initialize_ser_tcp prototype.
5640 * ser-unix.c: Remove _initialize_ser_hardwire prototype.
5641 * serial.c: Remove _initialize_serial prototype.
5642 * sh-linux-tdep.c: Remove _initialize_sh_linux_tdep prototype.
5643 * sh-nbsd-nat.c: Remove _initialize_shnbsd_nat prototype.
5644 * sh-nbsd-tdep.c: Remove _initialize_shnbsd_tdep prototype.
5645 * sh-tdep.c: Remove _initialize_sh_tdep prototype.
5646 * skip.c: Remove _initialize_step_skip prototype.
5647 * sol-thread.c: Remove _initialize_sol_thread prototype.
5648 * solib-aix.c: Remove _initialize_solib_aix prototype.
5649 * solib-darwin.c: Remove _initialize_darwin_solib prototype.
5650 * solib-dsbt.c: Remove _initialize_dsbt_solib prototype.
5651 * solib-frv.c: Remove _initialize_frv_solib prototype.
5652 * solib-spu.c: Remove _initialize_spu_solib prototype.
5653 * solib-svr4.c: Remove _initialize_svr4_solib prototype.
5654 * solib-target.c: Remove _initialize_solib_target prototype.
5655 * solib.c: Remove _initialize_solib prototype.
5656 * source.c: Remove _initialize_source prototype.
5657 * sparc-linux-nat.c: Remove _initialize_sparc_linux_nat prototype.
5658 * sparc-linux-tdep.c: Remove _initialize_sparc_linux_tdep
5660 * sparc-nat.c: Remove _initialize_sparc_nat prototype.
5661 * sparc-nbsd-nat.c: Remove _initialize_sparcnbsd_nat prototype.
5662 * sparc-nbsd-tdep.c: Remove _initialize_sparcnbsd_tdep prototype.
5663 * sparc-obsd-tdep.c: Remove _initialize_sparc32obsd_tdep
5665 * sparc-sol2-nat.c: Remove _initialize_sparc_sol2_nat prototype.
5666 * sparc-sol2-tdep.c: Remove _initialize_sparc_sol2_tdep prototype.
5667 * sparc-tdep.c: Remove _initialize_sparc_tdep prototype.
5668 * sparc64-fbsd-nat.c: Remove _initialize_sparc64fbsd_nat
5670 * sparc64-fbsd-tdep.c: Remove _initialize_sparc64fbsd_tdep
5672 * sparc64-linux-nat.c: Remove _initialize_sparc64_linux_nat
5674 * sparc64-linux-tdep.c: Remove _initialize_sparc64_linux_tdep
5676 * sparc64-nat.c: Remove _initialize_sparc64_nat prototype.
5677 * sparc64-nbsd-nat.c: Remove _initialize_sparc64nbsd_nat
5679 * sparc64-nbsd-tdep.c: Remove _initialize_sparc64nbsd_tdep
5681 * sparc64-obsd-nat.c: Remove _initialize_sparc64obsd_nat
5683 * sparc64-obsd-tdep.c: Remove _initialize_sparc64obsd_tdep
5685 * sparc64-sol2-tdep.c: Remove _initialize_sparc64_sol2_tdep
5687 * spu-linux-nat.c: Remove _initialize_spu_nat prototype.
5688 * spu-multiarch.c: Remove _initialize_spu_multiarch prototype.
5689 * spu-tdep.c: Remove _initialize_spu_tdep prototype.
5690 * stabsread.c: Remove _initialize_stabsread prototype.
5691 * stack.c: Remove _initialize_stack prototype.
5692 * stap-probe.c: Remove _initialize_stap_probe prototype.
5693 * std-regs.c: Remove _initialize_frame_reg prototype.
5694 * symfile-debug.c: Remove _initialize_symfile_debug prototype.
5695 * symfile-mem.c: Remove _initialize_symfile_mem prototype.
5696 * symfile.c: Remove _initialize_symfile prototype.
5697 * symmisc.c: Remove _initialize_symmisc prototype.
5698 * symtab.c: Remove _initialize_symtab prototype.
5699 * target-dcache.c: Remove _initialize_target_dcache prototype.
5700 * target-descriptions.c: Remove _initialize_target_descriptions
5702 * thread.c: Remove _initialize_thread prototype.
5703 * tic6x-linux-tdep.c: Remove _initialize_tic6x_linux_tdep
5705 * tic6x-tdep.c: Remove _initialize_tic6x_tdep prototype.
5706 * tilegx-linux-nat.c: Remove _initialize_tile_linux_nat prototype.
5707 * tilegx-linux-tdep.c: Remove _initialize_tilegx_linux_tdep
5709 * tilegx-tdep.c: Remove _initialize_tilegx_tdep prototype.
5710 * tracefile-tfile.c: Remove _initialize_tracefile_tfile prototype.
5711 * tracefile.c: Remove _initialize_tracefile prototype.
5712 * tracepoint.c: Remove _initialize_tracepoint prototype.
5713 * tui/tui-hooks.c: Remove _initialize_tui_hooks prototype.
5714 * tui/tui-interp.c: Remove _initialize_tui_interp prototype.
5715 * tui/tui-layout.c: Remove _initialize_tui_layout prototype.
5716 * tui/tui-regs.c: Remove _initialize_tui_regs prototype.
5717 * tui/tui-stack.c: Remove _initialize_tui_stack prototype.
5718 * tui/tui-win.c: Remove _initialize_tui_win prototype.
5719 * tui/tui.c: Remove _initialize_tui prototype.
5720 * typeprint.c: Remove _initialize_typeprint prototype.
5721 * user-regs.c: Remove _initialize_user_regs prototype.
5722 * utils.c: Remove _initialize_utils prototype.
5723 * v850-tdep.c: Remove _initialize_v850_tdep prototype.
5724 * valarith.c: Remove _initialize_valarith prototype.
5725 * valops.c: Remove _initialize_valops prototype.
5726 * valprint.c: Remove _initialize_valprint prototype.
5727 * value.c: Remove _initialize_values prototype.
5728 * varobj.c: Remove _initialize_varobj prototype.
5729 * vax-bsd-nat.c: Remove _initialize_vaxbsd_nat prototype.
5730 * vax-nbsd-tdep.c: Remove _initialize_vaxnbsd_tdep prototype.
5731 * vax-tdep.c: Remove _initialize_vax_tdep prototype.
5732 * windows-nat.c: Remove _initialize_windows_nat,
5733 _initialize_check_for_gdb_ini, and _initialize_loadable
5735 * windows-tdep.c: Remove _initialize_windows_tdep prototype.
5736 * xcoffread.c: Remove _initialize_xcoffread prototype.
5737 * xml-support.c: Remove _initialize_xml_support prototype.
5738 * xstormy16-tdep.c: Remove _initialize_xstormy16_tdep prototype.
5739 * xtensa-linux-nat.c: Remove _initialize_xtensa_linux_nat
5741 * xtensa-linux-tdep.c: Remove _initialize_xtensa_linux_tdep
5743 * xtensa-tdep.c: Remove _initialize_xtensa_tdep prototype.
5745 2017-09-08 Keith Seitz <keiths@redhat.com>
5747 * dwarf2read.c (struct field_info) <fnfields>: Remove unused
5750 2017-09-08 Christoph Weinmann <christoph.t.weinmann@intel.com>
5752 * f-valprint.c (f_val_print): Remove check for one byte
5753 sized integers. Remove printing of character type.
5755 2017-09-08 Frank Penczek <frank.penczek@intel.com>
5756 Christoph Weinmann <christoph.t.weinmann@intel.com>
5757 Bernhard Heckel <bernhard.heckel@intel.com>
5759 * f-typeprint.c (f_type_print_base): Use fprintfi_filtered
5760 to maintain proper indentation when printing pointers/refs.
5762 2017-09-07 Joel Brobecker <brobecker@adacore.com>
5766 2017-09-07 Joel Brobecker <brobecker@adacore.com>
5768 * NEWS (Changes in GDB 7.11): Remove entry for QStartupWithShell.
5770 2017-09-05 Tom Tromey <tom@tromey.com>
5772 * parse.c (funcall_chain): Now a std::vector.
5773 (start_arglist, end_arglist): Simplify.
5774 (free_funcalls): Remove.
5775 (parse_exp_in_context_1): Remove cleanup.
5777 2017-09-05 Tom Tromey <tom@tromey.com>
5779 * go-exp.y (go_parse): Don't create a cleanup.
5781 2017-09-05 Tom Tromey <tom@tromey.com>
5783 * d-exp.y (PrimaryExpression): Use std::string.
5784 (d_parse): Don't create a cleanup.
5786 2017-09-05 Tom Tromey <tom@tromey.com>
5788 * utils.c (do_clear_parser_state): Remove.
5789 (make_cleanup_clear_parser_state): Remove.
5790 * p-exp.y (pascal_parse): Use scoped_restore.
5791 * m2-exp.y (m2_parse): Use scoped_restore.
5792 * f-exp.y (f_parse): Use scoped_restore.
5793 * d-exp.y (d_parse): Use scoped_restore.
5794 * c-exp.y (c_parse): Use scoped_restore.
5795 * ada-exp.y (ada_parse): Use scoped_restore.
5796 * utils.h (make_cleanup_clear_parser_state): Remove.
5798 2017-09-06 Keith Seitz <keiths@redhat.com>
5800 * dwarf2read.c (dw2_linkage_name_attr): New function.
5801 (dw2_linkage_name): New function.
5802 (dwarf2_compute_name, dwarf2_physname, read_call_site_scope)
5803 (guess_full_die_structure_name, dwarf2_name): Use dw2_linkage_name.
5804 (anonymous_struct_prefix, dwarf2_name): Use dw2_linkage_name_attr.
5806 2017-09-06 Kamil Rytarowski <n54@gmx.com>
5808 * config/djgpp/djconfig.sh: Correct shell portability issue.
5810 2017-09-06 Kamil Rytarowski <n54@gmx.com>
5812 * configure.nat: Define HAVE_NATIVE_GCORE_HOST on NetBSD.
5814 2017-09-06 John Baldwin <jhb@FreeBSD.org>
5816 * Makefile.in (ALLDEPFILES): Add mips-fbsd-nat.c.
5817 * NEWS: Mention new FreeBSD/mips native configuration.
5818 * configure.host: Add aarch64*-*-freebsd*.
5819 * configure.nat: Likewise.
5820 * aarch64-fbsd-nat.c: New file.
5822 2017-09-06 John Baldwin <jhb@FreeBSD.org>
5824 * Makefile.in (ALL_64_TARGET_OBS): Add aarch64-fbsd-tdep.o.
5825 (ALLDEPFILES): Add aarch64-fbsd-tdep.c.
5826 * NEWS: Mention new FreeBSD/aarch64 target.
5827 * configure.tgt: Add aarch64*-*-freebsd*.
5828 * aarch64-fbsd-tdep.c: New file.
5829 * aarch64-fbsd-tdep.h: New file.
5831 2017-09-06 Kamil Rytarowski <n54@gmx.com>
5833 * MAINTAINERS (Write After Approval): Add Kamil Rytarowski.
5835 2017-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
5837 * parse.c (find_minsym_type_and_address): Don't relocate addresses
5840 2017-09-05 Philippe Waroquiers <philippe.waroquiers@skynet.be>
5842 * objfiles.c (get_objfile_bfd_data): Remove useless obstack_init
5845 2017-09-05 Simon Marchi <simon.marchi@ericsson.com>
5847 * infrun.c (follow_exec): Call add_thread after
5848 target_find_description.
5850 2017-09-05 Simon Marchi <simon.marchi@ericsson.com>
5852 * infrun.c (handle_inferior_event_1): When exec'ing, read
5853 stop_pc after follow_exec.
5855 2017-09-05 Simon Marchi <simon.marchi@ericsson.com>
5857 * remote.c (process_g_packet): Update error message.
5859 2017-09-05 Yao Qi <yao.qi@linaro.org>
5861 * configure.tgt (gdb_target_obs): Add i386.o for x86_64-*
5864 2017-09-05 Pedro Alves <palves@redhat.com>
5866 * eval.c (eval_call, evaluate_funcall): New functions, factored
5868 (evaluate_subexp_standard): ... this.
5870 2017-09-05 Yao Qi <yao.qi@linaro.org>
5872 * amd64-tdep.c (amd64_target_description): Create target
5874 (_initialize_amd64_tdep): Don't call functions
5875 initialize_tdesc_amd64_*. Add self tests.
5876 * arch/amd64.c (amd64_create_target_description): Add parameter
5877 is_linux. Call set_tdesc_osabi if is_linux is true.
5878 * arch/amd64.h (amd64_create_target_description): Update the
5880 * arch/i386.c (i386_create_target_description): Add parameter
5881 is_linux. Call set_tdesc_osabi if is_linux is true.
5882 * arch/i386.h (i386_create_target_description): Update
5884 * configure.tgt: Add i386.o to gdb_target_obs.
5885 * features/Makefile (XMLTOC): Remove i386/*.xml.
5886 * features/i386/amd64-avx-avx512.c: Remove.
5887 * features/i386/amd64-avx-mpx-avx512-pku.c: Remove.
5888 * features/i386/amd64-avx-mpx.c: Remove.
5889 * features/i386/amd64-avx.c: Remove.
5890 * features/i386/amd64-mpx.c: Remove.
5891 * features/i386/amd64.c: Remove.
5892 * features/i386/i386-avx-avx512.c: Remove.
5893 * features/i386/i386-avx-mpx-avx512-pku.c: Remove.
5894 * features/i386/i386-avx-mpx.c: Remove.
5895 * features/i386/i386-avx.c: Remove.
5896 * features/i386/i386-mmx.c: Remove.
5897 * features/i386/i386-mpx.c: Remove.
5898 * features/i386/i386.c: Remove.
5899 * i386-tdep.c: Don't include features/i386/i386*.c., include
5900 target-descriptions.h and arch/i386.h.
5901 (i386_target_description): Create target descriptions.
5902 (i386_gdbarch_init): Don't call initialize_tdesc_i386_*
5903 functions. Do self tests.
5905 2017-09-05 Yao Qi <yao.qi@linaro.org>
5907 * features/Makefile (XMLTOC): Remove i386/amd64XXX-linux.xml.
5908 * features/i386/amd64-avx-avx512-linux.c: Removed.
5909 * features/i386/amd64-avx-linux.c: Removed.
5910 * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Removed.
5911 * features/i386/amd64-avx-mpx-linux.c: Removed.
5912 * features/i386/amd64-linux.c: Removed.
5913 * features/i386/amd64-mpx-linux.c: Removed.
5914 * features/i386/x32-avx-avx512-linux.c: Removed.
5915 * features/i386/x32-avx-linux.c: Removed.
5916 * features/i386/x32-linux.c: Removed.
5918 2017-09-05 Yao Qi <yao.qi@linaro.org>
5920 * amd64-linux-tdep.c: Include arch/amd64.h. Don't include
5922 (amd64_linux_read_description): Call
5923 amd64_create_target_description.
5924 * arch/amd64.c: New file.
5925 * arch/amd64.h: New file.
5926 * configure.tgt (x86_64-*-linux*): Append amd64.o.
5927 * Makefile.in (ALL_64_TARGET_OBS): Append amd64.o.
5929 2017-09-05 Yao Qi <yao.qi@linaro.org>
5931 * amd64-linux-tdep.c: Don't include amd64-XXX-linux and
5932 x32-XXX-linux.c. Include 64bit-XX.c and x32-XX.c.
5933 (amd64_linux_read_description): Create target descriptions.
5934 (_initialize_amd64_linux_tdep): Don't call initialize_tdesc_XXX
5935 functions. Add unit tests.
5936 * features/Makefile (FEATURE_XMLFILES): Append 64bit-XXX.xml and
5938 * features/i386/64bit-avx.c: Generated.
5939 * features/i386/64bit-avx512.c: Generated.
5940 * features/i386/64bit-core.c: Generated.
5941 * features/i386/64bit-linux.c: Generated.
5942 * features/i386/64bit-mpx.c: Generated.
5943 * features/i386/64bit-pkeys.c: Generated.
5944 * features/i386/64bit-segments.c: Generated.
5945 * features/i386/64bit-sse.c: Generated.
5946 * features/i386/x32-core.c: Generated.
5947 * target-descriptions.c (maint_print_c_tdesc_cmd): Print feature
5948 c files for amd64-linux and x32-linux.
5950 2017-09-05 Yao Qi <yao.qi@linaro.org>
5952 * amd64-linux-tdep.c (amd64_linux_read_description): New
5954 (amd64_linux_core_read_description): Call
5955 amd64_linux_read_description.
5956 (amd64_linux_init_abi): Likewise.
5957 (amd64_x32_linux_init_abi): Likewise.
5958 * amd64-linux-tdep.h (amd64_linux_read_description): Declare.
5959 * x86-linux-nat.c (x86_linux_read_description): Call
5960 amd64_linux_read_description.
5962 2017-09-05 Yao Qi <yao.qi@linaro.org>
5964 * amd64-linux-tdep.c (amd64_linux_core_read_description): Update
5967 2017-09-05 Yao Qi <yao.qi@linaro.org>
5969 * features/Makefile (XMLTOC): Remove i386/i386-XX-linux.xml.
5970 * features/i386/i386-avx-avx512-linux.c: Remove.
5971 * features/i386/i386-avx-linux.c: Remove.
5972 * features/i386/i386-avx-mpx-avx512-pku-linux.c: Remove.
5973 * features/i386/i386-avx-mpx-linux.c: Remove.
5974 * features/i386/i386-linux.c: Remove.
5975 * features/i386/i386-mmx-linux.c: Remove.
5976 * features/i386/i386-mpx-linux.c: Remove.
5978 2017-09-05 Yao Qi <yao.qi@linaro.org>
5980 * Makefile.in (ALL_TARGET_OBS): Add i386.o.
5981 (SFILES): Add arch/i386.c.
5982 (HFILES_NO_SRCDIR): Add arch/i386.h.
5983 * arch/i386.c: New file.
5984 * arch/i386.h: New file.
5985 * arch/tdesc.h (allocate_target_description): Declare.
5986 (set_tdesc_architecture): Declare.
5987 (set_tdesc_osabi): Declare.
5988 * configure.tgt (i[34567]86-*-linux*): Add i386.o.
5989 * i386-linux-tdep.c: Don't include ../features/i386/32bit-XXX.c.
5990 include arch/i386.h.
5991 (i386_linux_read_description): Remove code and call
5992 i386_create_target_description.
5993 (set_tdesc_architecture): New function.
5994 (set_tdesc_osabi): New function.
5995 * target-descriptions.h (allocate_target_description): Remove.
5997 2017-09-05 Yao Qi <yao.qi@linaro.org>
5999 * arch/tdesc.h (tdesc_create_feature): Add an argument xml.
6000 * target-descriptions.c (tdesc_create_feature): Likewise, and
6002 * features/i386/32bit-avx.c: Re-generated.
6003 * features/i386/32bit-avx512.c: Re-generated.
6004 * features/i386/32bit-core.c: Re-generated.
6005 * features/i386/32bit-linux.c: Re-generated.
6006 * features/i386/32bit-mpx.c: Re-generated.
6007 * features/i386/32bit-pkeys.c: Re-generated.
6008 * features/i386/32bit-sse.c: Re-generated.
6010 2017-09-05 Yao Qi <yao.qi@linaro.org>
6012 * regformats/regdef.h (struct reg): Override operator == and !=.
6014 2017-09-05 Yao Qi <yao.qi@linaro.org>
6016 * arch/tdesc.h: New file.
6017 * regformats/regdat.sh: Generate code using tdesc_create_reg.
6018 * target-descriptions.c: Update comments.
6019 * target-descriptions.h: Include "arch/tdesc.h". Remove the
6021 * features/i386/32bit-avx.c: Re-generated.
6022 * features/i386/32bit-avx512.c: Re-generated.
6023 * features/i386/32bit-core.c: Re-generated.
6024 * features/i386/32bit-linux.c: Re-generated.
6025 * features/i386/32bit-mpx.c: Re-generated.
6026 * features/i386/32bit-pkeys.c: Re-generated.
6027 * features/i386/32bit-sse.c: Re-generated.
6029 2017-09-05 Yao Qi <yao.qi@linaro.org>
6031 * regformats/regdat.sh: Update generated code.
6033 2017-09-05 Yao Qi <yao.qi@linaro.org>
6035 * regformats/regdat.sh: Adjust code order.
6037 2017-09-05 Simon Marchi <simon.marchi@ericsson.com>
6039 * expprint.c (dump_subexp_body_standard): Use constant format
6040 string in fprintf_filtered call.
6042 2017-09-04 John Baldwin <jhb@FreeBSD.org>
6044 * configure.nat: Add "x86-nat.o x86-dregs.o" for NetBSD/amd64 and
6046 * x86-bsd-nat.c [!DBREG_DRX && __NetBSD__]: Define DBREG_DRX.
6048 2017-09-04 John Baldwin <jhb@FreeBSD.org>
6050 * bsd-kvm.o: Make <sys/user.h> conditional on HAVE_SYS_USER_H.
6052 2017-09-04 John Baldwin <jhb@FreeBSD.org>
6054 * bsd-kvm.o: Define _KMEMUSER.
6055 * configure.ac: Define _KMEMUSER when checking for "struct lwp".
6056 * configure: Regenerate.
6058 2017-09-04 John Baldwin <jhb@FreeBSD.org>
6060 * amd64-fbsd-nat.c: Add include of "x86-xstate.h".
6061 * i386-fbsd-nat.c: Likewise.
6063 2017-09-04 John Baldwin <jhb@FreeBSD.org>
6065 * unittests/array-view-selftests.c: Add include of <array>.
6067 2017-09-04 John Baldwin <jhb@FreeBSD.org>
6069 * spu-tdep.c (flush_ea_cache): Add missing argument to
6070 call_function_by_hand.
6072 2017-09-04 Pedro Alves <palves@redhat.com>
6074 * NEWS (Safer support for debugging with no debug info): New.
6076 2017-09-04 Pedro Alves <palves@redhat.com>
6078 * c-exp.y (function_method, function_method_void): Add current
6079 instance flags to TYPE_INSTANCE.
6080 * dwarf2read.c (check_modifier): New.
6081 (compute_delayed_physnames): Assert that only C++ adds delayed
6082 physnames. Mark fn_fields as const/volatile depending on
6084 * eval.c (make_params): New type_instance_flags parameter. Use
6085 it as the new type's instance flags.
6086 (evaluate_subexp_standard) <TYPE_INSTANCE>: Extract the instance
6087 flags element and pass it to make_params.
6088 * expprint.c (print_subexp_standard) <TYPE_INSTANCE>: Handle
6089 instance flags element.
6090 (dump_subexp_body_standard) <TYPE_INSTANCE>: Likewise.
6091 * gdbtypes.h: Include "enum-flags.h".
6092 (type_instance_flags): New enum-flags type.
6093 (TYPE_CONST, TYPE_VOLATILE, TYPE_RESTRICT, TYPE_ATOMIC)
6094 (TYPE_CODE_SPACE, TYPE_DATA_SPACE): Return boolean.
6095 * parse.c (operator_length_standard) <TYPE_INSTANCE>: Adjust.
6096 (follow_type_instance_flags): New function.
6097 (operator_check_standard) <TYPE_INSTANCE>: Adjust.
6098 * parser-defs.h (follow_type_instance_flags): Declare.
6099 * valops.c (value_struct_elt_for_reference): const/volatile must
6102 2017-09-04 Pedro Alves <palves@redhat.com>
6104 * cp-namespace.c (cp_search_static_and_baseclasses): Handle
6105 function/method scopes; lookup the nested name as a function local
6108 2017-09-04 Pedro Alves <palves@redhat.com>
6110 (%type <voidval>): Add function_method.
6111 * c-exp.y (exp): New production for calls with no arguments.
6112 (function_method, function_method_void_or_typelist): New
6114 (exp): New production for "method()::static_var".
6115 * eval.c (evaluate_subexp_standard): Handle OP_FUNC_STATIC_VAR.
6116 * expprint.c (print_subexp_standard, dump_subexp_body_standard):
6117 Handle OP_FUNC_STATIC_VAR.
6118 * parse.c (operator_length_standard):
6119 Handle OP_FUNC_STATIC_VAR.
6121 2017-09-04 Pedro Alves <palves@redhat.com>
6123 * eval.c (evaluate_subexp_standard): Remove UNOP_MEMVAL_TLS
6125 * expprint.c (print_subexp_standard, dump_subexp_body_standard):
6127 * parse.c (operator_length_standard, operator_check_standard):
6129 * std-operator.def (UNOP_MEMVAL_TLS): Delete.
6131 2017-09-04 Pedro Alves <palves@redhat.com>
6133 * ax-gdb.c: Include "typeprint.h".
6134 (gen_expr_for_cast): New function.
6135 (gen_expr) <OP_CAST, OP_CAST_TYPE>: Use it.
6136 <OP_VAR_VALUE, OP_MSYM_VAR_VALUE>: Error out if the variable's
6138 * dwarf2read.c (new_symbol_full): Fallback to int instead of
6139 nodebug_data_symbol.
6140 * eval.c: Include "typeprint.h".
6141 (evaluate_subexp_standard) <OP_VAR_VALUE, OP_VAR_MSYM_VALUE>:
6142 Error out if symbol has unknown type.
6143 <UNOP_CAST, UNOP_CAST_TYPE>: Common bits factored out to
6144 evaluate_subexp_for_cast.
6145 (evaluate_subexp_for_address, evaluate_subexp_for_sizeof): Handle
6147 (evaluate_subexp_for_cast): New function.
6148 * gdbtypes.c (init_nodebug_var_type): New function.
6149 (objfile_type): Use it to initialize types of variables with no
6151 * typeprint.c (error_unknown_type): New.
6152 * typeprint.h (error_unknown_type): New declaration.
6153 * compile/compile-c-types.c (convert_type_basic): Handle
6154 TYPE_CODE_ERROR; warn and fallback to int for variables with
6157 2017-09-04 Pedro Alves <palves@redhat.com>
6159 * eval.c (evaluate_var_value): New function, factored out from ...
6160 (evaluate_subexp_standard): ... here.
6162 2017-09-04 Pedro Alves <palves@redhat.com>
6164 * eval.c (evaluate_subexp_standard) <UNOP_COMPLEMENT, UNOP_ADDR>:
6165 Remove useless assignments to 'op'.
6167 2017-09-04 Pedro Alves <palves@redhat.com>
6169 * eval.c (eval_skip_value): New function.
6170 (evaluate_subexp_standard): Use it.
6172 2017-09-04 Pedro Alves <palves@redhat.com>
6174 * eval.c (evaluate_subexp_standard): <OP_FUNCALL>: Extract
6175 function name from symbol/minsym and pass it to
6176 error_call_unknown_return_type.
6178 2017-09-04 Pedro Alves <palves@redhat.com>
6180 * ada-lang.c (resolve_subexp): Handle OP_VAR_MSYM_VALUE.
6181 * ax-gdb.c (gen_msym_var_ref): New function.
6182 (gen_expr): Handle OP_VAR_MSYM_VALUE.
6183 * eval.c (evaluate_var_msym_value): New function.
6184 * eval.c (evaluate_subexp_standard): Handle OP_VAR_MSYM_VALUE.
6185 <OP_FUNCALL>: Extract function name from symbol/minsym and pass it
6186 to call_function_by_hand.
6187 * expprint.c (print_subexp_standard, dump_subexp_body_standard):
6188 Handle OP_VAR_MSYM_VALUE.
6189 (union exp_element) <msymbol>: New field.
6190 * minsyms.h (struct type): Forward declare.
6191 (find_minsym_type_and_address): Declare.
6192 * parse.c (write_exp_elt_msym): New function.
6193 (write_exp_msymbol): Delete, refactored as ...
6194 (find_minsym_type_and_address): ... this new function.
6195 (write_exp_msymbol): Reimplement using OP_VAR_MSYM_VALUE.
6196 (operator_length_standard, operator_check_standard): Handle
6198 * std-operator.def (OP_VAR_MSYM_VALUE): New.
6200 2017-09-04 Pedro Alves <palves@redhat.com>
6202 * ada-lang.c (ada_evaluate_subexp) <TYPE_CODE_FUNC>: Don't handle
6203 TYPE_GNU_IFUNC specially here. Throw error if return type is
6205 * ada-typeprint.c (print_func_type): Handle functions with unknown
6207 * c-typeprint.c (c_type_print_base): Handle functions and methods
6208 with unknown return type.
6209 * compile/compile-c-symbols.c (convert_symbol_bmsym)
6210 <mst_text_gnu_ifunc>: Use nodebug_text_gnu_ifunc_symbol.
6211 * compile/compile-c-types.c: Include "objfiles.h".
6212 (convert_func): For functions with unknown return type, warn and
6214 * compile/compile-object-run.c (compile_object_run): Adjust call
6215 to call_function_by_hand_dummy.
6216 * elfread.c (elf_gnu_ifunc_resolve_addr): Adjust call to
6217 call_function_by_hand.
6218 * eval.c (evaluate_subexp_standard): Adjust calls to
6219 call_function_by_hand. Handle functions and methods with unknown
6220 return type. Pass expect_type to call_function_by_hand.
6221 * f-typeprint.c (f_type_print_base): Handle functions with unknown
6223 * gcore.c (call_target_sbrk): Adjust call to
6224 call_function_by_hand.
6225 * gdbtypes.c (objfile_type): Leave nodebug text symbol with NULL
6226 return type instead of int. Make nodebug_text_gnu_ifunc_symbol be
6227 an integer address type instead of nodebug.
6228 * guile/scm-value.c (gdbscm_value_call): Adjust call to
6229 call_function_by_hand.
6230 * infcall.c (error_call_unknown_return_type): New function.
6231 (call_function_by_hand): New "default_return_type" parameter.
6233 (call_function_by_hand_dummy): New "default_return_type"
6234 parameter. Use it instead of defaulting to int. If there's no
6235 default and the return type is unknown, throw an error. If
6236 there's a default return type, and the called function has no
6237 debug info, then assume the function is prototyped.
6238 * infcall.h (call_function_by_hand, call_function_by_hand_dummy):
6239 New "default_return_type" parameter.
6240 (error_call_unknown_return_type): New declaration.
6241 * linux-fork.c (call_lseek): Cast return type of lseek.
6242 (inferior_call_waitpid, checkpoint_command): Adjust calls to
6243 call_function_by_hand.
6244 * linux-tdep.c (linux_infcall_mmap, linux_infcall_munmap): Adjust
6245 calls to call_function_by_hand.
6246 * m2-typeprint.c (m2_procedure): Handle functions with unknown
6248 * objc-lang.c (lookup_objc_class, lookup_child_selector)
6249 (value_nsstring, print_object_command): Adjust calls to
6250 call_function_by_hand.
6251 * p-typeprint.c (pascal_type_print_varspec_prefix): Handle
6252 functions with unknown return type.
6253 (pascal_type_print_func_varspec_suffix): New function.
6254 (pascal_type_print_varspec_suffix) <TYPE_CODE_FUNC,
6255 TYPE_CODE_METHOD>: Use it.
6256 * python/py-value.c (valpy_call): Adjust call to
6257 call_function_by_hand.
6258 * rust-lang.c (rust_evaluate_funcall): Adjust call to
6259 call_function_by_hand.
6260 * valarith.c (value_x_binop, value_x_unop): Adjust calls to
6261 call_function_by_hand.
6262 * valops.c (value_allocate_space_in_inferior): Adjust call to
6263 call_function_by_hand.
6264 * typeprint.c (type_print_unknown_return_type): New function.
6265 * typeprint.h (type_print_unknown_return_type): New declaration.
6267 2017-09-04 Pedro Alves <palves@redhat.com>
6269 * gdbtypes.c (lookup_function_type_with_arguments): Mark function
6270 types with more than one parameter as prototyped.
6272 2017-09-04 Pedro Alves <palves@redhat.com>
6274 * cli/cli-cmds.c (print_disassembly, disassemble_current_function)
6275 (disassemble_command): Use gdb_disassembly_flags instead of bare
6277 * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn)
6278 (dump_insns, do_mixed_source_and_assembly_deprecated)
6279 (do_mixed_source_and_assembly, do_assembly_only, gdb_disassembly):
6280 Use gdb_disassembly_flags instead of bare int.
6281 * disasm.h (DISASSEMBLY_SOURCE_DEPRECATED, DISASSEMBLY_RAW_INSN)
6282 (DISASSEMBLY_OMIT_FNAME, DISASSEMBLY_FILENAME)
6283 (DISASSEMBLY_OMIT_PC, DISASSEMBLY_SOURCE)
6284 (DISASSEMBLY_SPECULATIVE): No longer macros. Instead they're...
6285 (enum gdb_disassembly_flag): ... values of this new enumeration.
6286 (gdb_disassembly_flags): Define.
6288 (gdb_pretty_print_disassembler::pretty_print_insn): Use it.
6289 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Use
6290 gdb_disassembly_flags instead of bare int.
6291 * record-btrace.c (btrace_insn_history)
6292 (record_btrace_insn_history, record_btrace_insn_history_range)
6293 (record_btrace_insn_history_from): Use gdb_disassembly_flags
6294 instead of bare int.
6295 * record.c (get_insn_history_modifiers, cmd_record_insn_history):
6296 Use gdb_disassembly_flags instead of bare int.
6297 * target-debug.h (target_debug_print_gdb_disassembly_flags):
6299 * target-delegates.c: Regenerate.
6300 * target.c (target_insn_history, target_insn_history_from)
6301 (target_insn_history_range): Use gdb_disassembly_flags instead of
6303 * target.h: Include "disasm.h".
6304 (struct target_ops) <to_insn_history, to_insn_history_from,
6305 to_insn_history_range>: Use gdb_disassembly_flags instead of bare
6307 (target_insn_history, target_insn_history_from)
6308 (target_insn_history_range): Use gdb_disassembly_flags instead of
6311 2017-09-04 Simon Marchi <simon.marchi@ericsson.com>
6313 * cli/cli-script.c (build_command_line): For if/while commands,
6314 check whether args is empty.
6316 2017-09-04 Simon Marchi <simon.marchi@ericsson.com>
6318 * cli/cli-script.h (enum misc_command_type): Move from defs.h.
6319 (enum command_control_type): Likewise.
6320 (struct command_line): Likewise.
6321 (free_command_lines): Likewise.
6322 (struct command_lines_deleter): Likewise.
6323 (command_line_up): Likewise.
6324 (read_command_lines): Likewise.
6325 (read_command_lines_1): Likewise.
6326 * defs.h (enum misc_command_type): Move to cli/cli-script.h.
6327 (enum command_control_type): Likewise.
6328 (struct command_line): Likewise.
6329 (free_command_lines): Likewise.
6330 (struct command_lines_deleter): Likewise.
6331 (command_line_up): Likewise.
6332 (read_command_lines): Likewise.
6333 (read_command_lines_1): Likewise.
6334 * breakpoint.h: Include cli/cli-script.h.
6335 * extension-priv.h: Likewise.
6336 * gdbcmd.h: Likewise.
6338 2017-09-04 Pedro Alves <palves@redhat.com>
6340 * ada-lang.c (is_known_support_routine): Move sal declaration to
6341 where it is initialized.
6342 * breakpoint.c (create_internal_breakpoint, init_catchpoint)
6343 (parse_breakpoint_sals, decode_static_tracepoint_spec)
6344 (clear_command, update_static_tracepoint): Remove init_sal
6345 references. Move declarations closer to initializations.
6346 * cli/cli-cmds.c (list_command): Move sal declarations closer to
6348 * elfread.c (elf_gnu_ifunc_resolver_stop): Remove init_sal
6349 references. Move sal declarations closer to initializations.
6350 * frame.c (find_frame_sal): Return a symtab_and_line via function
6351 return instead of output parameter. Remove init_sal references.
6352 * frame.h (find_frame_sal): Return a symtab_and_line via function
6353 return instead of output parameter.
6354 * guile/scm-frame.c (gdbscm_frame_sal): Adjust.
6355 * guile/scm-symtab.c (stscm_make_sal_smob): Use in-place new
6357 (gdbscm_find_pc_line): Remove init_sal reference.
6358 * infcall.c (call_function_by_hand_dummy): Remove init_sal
6359 references. Move declarations closer to initializations.
6360 * infcmd.c (set_step_frame): Update. Move declarations closer to
6362 (finish_backward): Remove init_sal references. Move declarations
6363 closer to initializations.
6364 * infrun.c (process_event_stop_test, handle_step_into_function)
6365 (insert_hp_step_resume_breakpoint_at_frame)
6366 (insert_step_resume_breakpoint_at_caller): Likewise.
6367 * linespec.c (create_sals_line_offset, decode_digits_ordinary)
6368 (symbol_to_sal): Likewise.
6369 * probe.c (parse_probes_in_pspace): Remove init_sal reference.
6370 * python/py-frame.c (frapy_find_sal): Move sal declaration closer
6371 to its initialization.
6372 * reverse.c (save_bookmark_command): Use new/delete. Remove
6373 init_sal references. Move declarations closer to initializations.
6374 * source.c (get_current_source_symtab_and_line): Remove brace
6376 (set_current_source_symtab_and_line): Now takes the sal by const
6377 reference. Remove brace initialization.
6378 (line_info): Remove init_sal reference.
6379 * source.h (set_current_source_symtab_and_line): Now takes a
6380 symtab_and_line via const reference.
6381 * stack.c (set_current_sal_from_frame): Adjust.
6382 (print_frame_info): Adjust.
6383 (get_last_displayed_sal): Return the sal via function return
6384 instead of via output parameter. Simplify.
6385 (frame_info): Adjust.
6386 * stack.h (get_last_displayed_sal): Return the sal via function
6387 return instead of via output parameter.
6388 * symtab.c (init_sal): Delete.
6389 (find_pc_sect_line): Remove init_sal references. Move
6390 declarations closer to initializations.
6391 (find_function_start_sal): Remove init_sal references. Move
6392 declarations closer to initializations.
6393 * symtab.h (struct symtab_and_line): In-class initialize all
6395 * tracepoint.c (set_traceframe_context)
6396 (print_one_static_tracepoint_marker): Remove init_sal references.
6397 Move declarations closer to initializations.
6398 * tui/tui-disasm.c (tui_show_disassem_and_update_source): Adjust.
6399 * tui/tui-stack.c (tui_show_frame_info): Adjust. Move
6400 declarations closer to initializations.
6401 * tui/tui-winsource.c (tui_update_source_window_as_is): Remove
6402 init_sal references. Adjust.
6404 2017-09-04 Pedro Alves <palves@redhat.com>
6406 * ax-gdb.c (agent_command_1): Use range-for.
6407 * break-catch-throw.c (re_set_exception_catchpoint): Update.
6408 * breakpoint.c: Include "common/array-view.h".
6409 (init_breakpoint_sal, create_breakpoint_sal): Change sals
6410 parameter from struct symtabs_and_lines to
6411 array_view<symtab_and_line>. Adjust. Use range-for. Update.
6412 (breakpoint_sals_to_pc): Change sals parameter from struct
6413 symtabs_and_lines to std::vector reference.
6414 (check_fast_tracepoint_sals): Change sals parameter from struct
6415 symtabs_and_lines to std::array_view. Use range-for.
6416 (decode_static_tracepoint_spec): Return a std::vector instead of
6417 symtabs_and_lines. Update.
6418 (create_breakpoint): Update.
6419 (break_range_command, until_break_command, clear_command): Update.
6420 (base_breakpoint_decode_location, bkpt_decode_location)
6421 (bkpt_probe_create_sals_from_location)
6422 (bkpt_probe_decode_location, tracepoint_decode_location)
6423 (tracepoint_probe_decode_location)
6424 (strace_marker_create_sals_from_location): Return a std::vector
6425 instead of symtabs_and_lines.
6426 (strace_marker_create_breakpoints_sal): Update.
6427 (strace_marker_decode_location): Return a std::vector instead of
6428 symtabs_and_lines. Update.
6429 (update_breakpoint_locations): Change struct symtabs_and_lines
6430 parameters to gdb::array_view. Adjust.
6431 (location_to_sals): Return a std::vector instead of
6432 symtabs_and_lines. Update.
6433 (breakpoint_re_set_default): Use std::vector instead of struct
6435 (decode_location_default): Return a std::vector instead of
6436 symtabs_and_lines. Update.
6437 * breakpoint.h: Include "common/array-view.h".
6438 (struct breakpoint_ops) <decode_location>: Now returns a
6439 std::vector instead of returning a symtabs_and_lines via output
6441 (update_breakpoint_locations): Change sals parameters to use
6443 * cli/cli-cmds.c (edit_command, list_command): Update to use
6444 std::vector and gdb::array_view.
6445 (ambiguous_line_spec): Adjust to use gdb::array_view and
6447 (compare_symtabs): Rename to ...
6448 (cmp_symtabs): ... this. Change parameters to symtab_and_line
6449 const reference and adjust.
6450 (filter_sals): Rewrite using std::vector and standard algorithms.
6451 * elfread.c (elf_gnu_ifunc_resolver_return_stop): Simplify.
6452 (jump_command): Update to use std::vector.
6453 * linespec.c (struct linespec_state) <canonical_names>: Update
6455 (add_sal_to_sals_basic): Delete.
6456 (add_sal_to_sals, filter_results, convert_results_to_lsals)
6457 (decode_line_2, create_sals_line_offset)
6458 (convert_address_location_to_sals, convert_linespec_to_sals)
6459 (convert_explicit_location_to_sals, parse_linespec)
6460 (event_location_to_sals, decode_line_full, decode_line_1)
6461 (decode_line_with_current_source)
6462 (decode_line_with_last_displayed, decode_objc)
6463 (decode_digits_list_mode, decode_digits_ordinary, minsym_found)
6464 (linespec_result::~linespec_result): Adjust to use std::vector
6465 instead of symtabs_and_lines.
6466 * linespec.h (linespec_sals::sals): Now a std::vector.
6467 (struct linespec_result): Use std::vector, bool, and in-class
6469 (decode_line_1, decode_line_with_current_source)
6470 (decode_line_with_last_displayed): Return std::vector.
6471 * macrocmd.c (info_macros_command): Use std::vector.
6472 * mi/mi-main.c (mi_cmd_trace_find): Use std::vector.
6473 * probe.c (parse_probes_in_pspace, parse_probes): Adjust to use
6475 * probe.h (parse_probes): Return a std::vector.
6476 * python/python.c (gdbpy_decode_line): Use std::vector and
6478 * source.c (select_source_symtab, line_info): Use std::vector.
6479 * stack.c (func_command): Use std::vector.
6480 * symtab.h (struct symtabs_and_lines): Delete.
6481 * tracepoint.c (tfind_line_command, scope_info): Use std::vector.
6483 2017-09-04 Pedro Alves <palves@redhat.com>
6485 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
6486 unittests/array-view-selftests.c.
6487 (SUBDIR_UNITTESTS_OBS): Add array-view-selftests.o.
6488 * common/array-view.h: New file.
6489 * unittests/array-view-selftests.c: New file.
6491 2017-09-04 Pedro Alves <palves@redhat.com>
6493 * cli/cli-cmds.c (edit_command): Pass message to
6494 ambiguous_line_spec.
6495 (list_command): Pass message to ambiguous_line_spec. Say
6496 "first"/"last" instead of "start" and "end" to be consistent with
6498 (ambiguous_line_spec): Add 'format' and vararg parameters. Use
6499 them to print formatted message.
6501 2017-09-04 Pedro Alves <palves@redhat.com>
6503 * btrace.c (ftrace_add_pt): Pass btrace_insn to
6504 ftrace_update_insns by reference instead of pointer.
6506 2017-09-04 Yao Qi <yao.qi@linaro.org>
6508 * i386-go32-tdep.c: Include x86-xstate.h.
6509 (i386_go32_init_abi): Call i386_target_description.
6510 * i386-tdep.c (i386_target_description): Return tdesc_i386_mmx
6511 if xcr0 is X86_XSTATE_X87_MASK.
6512 * i386-tdep.h (tdesc_i386): Remove the declaration.
6513 (tdesc_i386_mmx): Likewise.
6515 2017-09-04 Yao Qi <yao.qi@linaro.org>
6517 * i386-fbsd-tdep.c (i386fbsd_core_read_xcr0): Return
6518 X86_XSTATE_SSE_MASK instead of 0.
6520 2017-09-04 Yao Qi <yao.qi@linaro.org>
6522 * amd64-fbsd-nat.c (amd64fbsd_read_description): Call
6523 i386_target_description.
6524 * i386-fbsd-nat.c (i386fbsd_read_description): Call
6525 i386_target_description.
6526 * i386-tdep.c (i386_gdbarch_init): Likewise.
6528 2017-09-04 Yao Qi <yao.qi@linaro.org>
6530 * amd64-darwin-tdep.c: Include "x86-xstate.h".
6531 (x86_darwin_init_abi_64): Call amd64_target_description.
6532 * amd64-dicos-tdep.c: Likewise.
6533 * amd64-fbsd-nat.c: Likewise.
6534 * amd64-fbsd-tdep.c: Likewise.
6535 * amd64-nbsd-tdep.c: Likewise.
6536 * amd64-obsd-tdep.c: Likewise.
6537 * amd64-sol2-tdep.c: Likewise.
6538 * amd64-windows-tdep.c: Likewise.
6539 * amd64-tdep.h (tdesc_amd64): Remove the declaration.
6541 2017-09-04 Simon Marchi <simon.marchi@ericsson.com>
6543 * btrace.h (btrace_insn_s, DEF_VEC_O (btrace_insn_s)): Remove.
6544 (btrace_function) <insn>: Change type to use std::vector.
6545 * btrace.c (ftrace_debug, ftrace_call_num_insn,
6546 ftrace_find_call, ftrace_new_gap, ftrace_update_function,
6547 ftrace_update_insns, ftrace_compute_global_level_offset,
6548 btrace_stitch_bts, btrace_clear, btrace_insn_get,
6549 btrace_insn_end, btrace_insn_next, btrace_insn_prev): Adjust to
6550 change to std::vector.
6551 (ftrace_update_insns): Adjust to change to std::vector, change
6552 type of INSN parameter.
6553 (btrace_compute_ftrace_bts): Adjust call to ftrace_update_insns.
6554 * record-btrace.c (btrace_call_history_insn_range,
6555 btrace_compute_src_line_range,
6556 record_btrace_frame_prev_register): Adjust to change to
6558 * python/py-record-btrace.c (recpy_bt_func_instructions): Adjust
6559 to change to std::vector.
6561 2017-09-03 Tom Tromey <tom@tromey.com>
6563 * corefile.c (reopen_exec_file): Use std::string.
6565 2017-09-03 Tom Tromey <tom@tromey.com>
6567 * compile/compile.c (compile_register_name_mangled): Return
6569 * compile/compile-loc2c.c (pushf_register_address): Update.
6570 (pushf_register): Update.
6571 * compile/compile-c-types.c (convert_array): Update.
6572 * compile/compile-c-symbols.c (generate_vla_size): Update.
6573 (error_symbol_once): Use a gdb::unique_xmalloc_ptr.
6574 (symbol_substitution_name): Return a gdb::unique_xmalloc_ptr.
6575 (convert_one_symbol): Update.
6576 (generate_c_for_for_one_variable): Update.
6577 * compile/compile-c-support.c (c_get_range_decl_name): Return a
6579 (generate_register_struct): Update.
6580 * compile/compile-internal.h (c_get_range_decl_name): Return a
6582 (compile_register_name_mangled): Return std::string.
6584 2017-09-03 Tom Tromey <tom@tromey.com>
6586 * utils.c (perror_string): Return a std::string.
6587 (throw_perror_with_name, perror_warning_with_name): Update.
6589 2017-09-03 Tom Tromey <tom@tromey.com>
6591 * demangle.c (demangle_command): Use std::string,
6594 2017-09-03 Tom Tromey <tom@tromey.com>
6596 * cli/cli-setshow.c (do_set_command): Use std::string.
6598 2017-09-03 Tom Tromey <tom@tromey.com>
6600 * cli/cli-cmds.c (cd_command): Use gdb::unique_xmalloc_ptr.
6602 2017-09-03 Tom Tromey <tom@tromey.com>
6604 * mi/mi-interp.c (mi_cmd_interpreter_exec): Use std::string.
6606 2017-09-03 Tom Tromey <tom@tromey.com>
6608 * mi/mi-cmd-env.c (env_execute_cli_command): Use
6609 gdb::unique_xmalloc_ptr.
6611 2017-09-03 Tom Tromey <tom@tromey.com>
6613 * thread.c (print_thread_info_1): Use string_printf.
6614 (thread_apply_command, thread_apply_all_command): Use
6617 2017-09-03 Tom Tromey <tom@tromey.com>
6619 * valprint.c (val_print_string): Update.
6620 * gdbcore.h (memory_error_message): Return std::string.
6621 * corefile.c (memory_error_message): Return std::string.
6622 (memory_error): Update.
6623 * breakpoint.c (insert_bp_location): Update.
6625 2017-09-03 Simon Marchi <simon.marchi@ericsson.com>
6627 * target/waitstatus.h (target_waitstatus_to_string): Change
6628 return type to std::string.
6629 * target/waitstatus.c (target_waitstatus_to_string): Return
6631 * target.h (target_waitstatus_to_string): Remove declaration.
6632 * infrun.c (resume, clear_proceed_status_thread,
6633 print_target_wait_results, do_target_wait, save_waitstatus,
6634 stop_all_threads): Adjust.
6635 * record-btrace.c (record_btrace_wait): Adjust.
6637 (target_debug_print_struct_target_waitstatus_p): Adjust.
6639 2017-09-01 Jan Kratochvil <jan.kratochvil@redhat.com>
6642 * nat/linux-procfs.c (parse_proc_status_state): Fix PROC_STATE_STOPPED
6645 2017-08-31 Sergio Durigan Junior <sergiodj@redhat.com>
6647 * NEWS (Changes since GDB 8.0): Add entry mentioning new support
6648 for setting/unsetting environment variables on the remote target.
6649 (New remote packets): Add entries for QEnvironmentHexEncoded,
6650 QEnvironmentUnset and QEnvironmentReset.
6651 * common/environ.c (gdb_environ::operator=): Extend method to
6652 handle m_user_set_env_list and m_user_unset_env_list.
6653 (gdb_environ::clear): Likewise.
6654 (match_var_in_string): Change type of first parameter from 'char
6655 *' to 'const char *'.
6656 (gdb_environ::set): Extend method to handle
6657 m_user_set_env_list and m_user_unset_env_list.
6658 (gdb_environ::unset): Likewise.
6659 (gdb_environ::clear_user_set_env): New method.
6660 (gdb_environ::user_set_envp): Likewise.
6661 (gdb_environ::user_unset_envp): Likewise.
6662 * common/environ.h (gdb_environ): Handle m_user_set_env_list and
6663 m_user_unset_env_list on move constructor/assignment.
6664 (unset): Add new default parameter 'update_unset_list = true'.
6665 (clear_user_set_env): New method.
6666 (user_set_envp): Likewise.
6667 (user_unset_envp): Likewise.
6668 (m_user_set_env_list): New std::set.
6669 (m_user_unset_env_list): Likewise.
6670 * common/rsp-low.c (hex2str): New function.
6671 (bin2hex): New overload for bin2hex function.
6672 * common/rsp-low.c (hex2str): New prototype.
6673 (str2hex): New overload prototype.
6674 * remote.c: Include "environ.h". Add QEnvironmentHexEncoded,
6675 QEnvironmentUnset and QEnvironmentReset.
6676 (remote_protocol_features): Add QEnvironmentHexEncoded,
6677 QEnvironmentUnset and QEnvironmentReset packets.
6678 (send_environment_packet): New function.
6679 (extended_remote_environment_support): Likewise.
6680 (extended_remote_create_inferior): Call
6681 extended_remote_environment_support.
6682 (_initialize_remote): Add QEnvironmentHexEncoded,
6683 QEnvironmentUnset and QEnvironmentReset packet configs.
6684 * unittests/environ-selftests.c (gdb_selftest_env_var):
6686 (test_vector_initialization): New function.
6687 (test_init_from_host_environ): Likewise.
6688 (test_reinit_from_host_environ): Likewise.
6689 (test_set_A_unset_B_unset_A_cannot_find_A_can_find_B):
6691 (test_unset_set_empty_vector): Likewise.
6692 (test_vector_clear): Likewise.
6693 (test_std_move): Likewise.
6694 (test_move_constructor):
6695 (test_self_move): Likewise.
6696 (test_set_unset_reset): Likewise.
6697 (run_tests): Rewrite in terms of the functions above.
6699 2017-08-31 Weimin Pan <weimin.pan@oracle.com>
6701 * sparc64-tdep.c (adi_stat_t): Fix comment formatting.
6702 (adi_available): Use a temp variable of type CORE_ADDR as argument
6703 3 when calling target_auxv_search.
6704 (adi_normalize_address): Use masks and xor operators to calculate
6706 (adi_read_versions, adi_write_versions, adi_print_versions)
6707 (do_examine, do_assign): Use paddress.
6709 2017-08-29 John Baldwin <jhb@FreeBSD.org>
6711 * mips-fbsd-nat.c (getfpregs_supplies): Return true for FIR.
6712 * mips-fbsd-tdep.c (mips_fbsd_supply_fpregs): Split supply of FSR
6713 out of loop and add supply of FIR.
6714 (mips_fbsd_collect_fpregs): Split collect of FSR out of loop and
6717 2017-08-28 Simon Marchi <simon.marchi@ericsson.com>
6720 * cli/cli-script.c (define_command): Don't convert command name
6723 2017-08-25 Joel Brobecker <brobecker@adacore.com>
6725 * ada-lang.c (ada_lookup_struct_elt_type): Remove parameter "dispp".
6726 Update all callers accordingly. Remove all code blocks handling
6727 the case where DISPP is not NULL.
6729 2017-08-24 Jan Kratochvil <jan.kratochvil@redhat.com>
6732 * dwarf2read.c (dwarf2_const_value_attr, dump_die_shallow)
6733 (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
6734 (skip_form_bytes, attr_form_is_constant): Handle DW_FORM_implicit_const.
6736 2017-08-24 Jan Kratochvil <jan.kratochvil@redhat.com>
6738 * dwarf2read.c (build_type_psymtabs_reader): New prototype.
6739 (process_psymtab_comp_unit): Accept IS_DEBUG_TYPES.
6740 (read_comp_units_from_section): New parameter abbrev_section, use
6741 read_and_check_comp_unit_head, allocate signatured_type if needed.
6742 (create_all_comp_units): Update read_comp_units_from_section caller.
6744 2017-08-23 Pedro Alves <palves@redhat.com>
6747 * remote.c (add_current_inferior_and_thread): Set inferior_ptid
6748 to null_ptid and switch to thread without reading the registers
6749 after adding the inferior.
6751 2017-08-23 Jan Kratochvil <jan.kratochvil@redhat.com>
6753 * NEWS (Changes since GDB 8.0): Add set compile-gcc and show
6755 * compile/compile.c (compile_gcc, show_compile_gcc): New.
6756 (compile_to_object): Implement compile_gcc.
6757 (_initialize_compile): Install "set compile-gcc". Initialize
6760 2017-08-23 Jan Kratochvil <jan.kratochvil@redhat.com>
6762 * compile/compile.c (compile_to_object): Conditionally call
6763 set_verbose. Conditionally call compile or compile_v0.
6765 2017-08-07 Weimin Pan <weimin.pan@oracle.com>
6767 * sparc64-tdep.h: (adi_normalize_address): New export.
6768 * sparc-nat.h: (open_adi_tag_fd): New export.
6769 * sparc64-linux-nat.c: (open_adi_tag_fd): New function.
6770 * sparc64-linux-tdep.c:
6771 (SEGV_ACCADI, SEGV_ADIDERR, SEGV_ADIPERR) New defines.
6772 (sparc64_linux_handle_segmentation_fault): New function.
6773 (sparc64_linux_init_abi): Register
6774 sparc64_linux_handle_segmentation_fault
6775 * sparc64-tdep.c: Include cli-utils.h,gdbcmd.h,auxv.h.
6776 (sparc64_addr_bits_remove): New function.
6777 (sparc64_init_abi): Register sparc64_addr_bits_remove.
6778 (MAX_PROC_NAME_SIZE): New macro.
6779 (AT_ADI_BLKSZ, AT_ADI_NBITS, AT_ADI_UEONADI) New defines.
6780 (sparc64adilist): New variable.
6781 (adi_proc_list): New variable.
6782 (find_adi_info): New function.
6783 (add_adi_info): New function.
6784 (get_adi_info_proc): New function.
6785 (get_adi_info): New function.
6786 (info_adi_command): New function.
6787 (read_maps_entry): New function.
6788 (adi_available): New function.
6789 (adi_normalize_address): New function.
6790 (adi_align_address): New function.
6791 (adi_convert_byte_count): New function.
6792 (adi_tag_fd): New function.
6793 (adi_is_addr_mapped): New function.
6794 (adi_read_versions): New function.
6795 (adi_write_versions): New function.
6796 (adi_print_versions): New function.
6797 (do_examine): New function.
6798 (do_assign): New function.
6799 (adi_examine_command): New function.
6800 (adi_assign_command): New function.
6801 (_initialize_sparc64_adi_tdep): New function.
6803 2017-08-22 Simon Marchi <simon.marchi@ericsson.com>
6805 * breakpoint.c (breakpoints_info): Rename to ...
6806 (info_breakpoints_command): ... this.
6807 (watchpoints_info): Rename to ...
6808 (info_watchpoints_command): ... this.
6809 (tracepoints_info): Rename to ...
6810 (info_tracepoints_command): ... this.
6811 (_initialize_breakpoint): Adjust.
6812 * dcache.c (dcache_info): Rename to ...
6813 (info_display_command): ... this.
6814 (_initialize_dcache): Adjust.
6815 * frame.h (args_info): Rename to ...
6816 (info_args_command): ... this.
6817 (locals_info): Rename to ...
6818 (info_locals_command): ... this.
6819 * infcmd.c (nofp_registers_info): Rename to ...
6820 (info_registers_command): ... this.
6821 (float_info): Rename to ...
6822 (info_float_command): ... this.
6823 (program_info): Rename to ...
6824 (info_program_command): ... this.
6825 (all_registers_info): Rename to ...
6826 (info_all_registers_command): ... this.
6827 (vector_info): Rename to ...
6828 (info_vector_command): ... this.
6829 (float_info): Rename to ...
6830 (info_float_command): ... this.
6831 (_initialize_infcmd): Adjust.
6832 * inferior.h (term_info): Rename to ...
6833 (info_terminal_command): ... this.
6834 * inflow.c (term_info): Rename to ...
6835 (info_terminal_command): ... this.
6836 (_initialize_inflow): Adjust.
6837 * infrun.c (signals_info): Rename to ...
6838 (info_signals_command): ... this.
6839 (_initialize_infrun): Adjust.
6840 * objc-lang.c (classes_info): Rename to ...
6841 (info_classes_command): ... this.
6842 (selectors_info): Rename to ...
6843 (info_selectors_command): ... this.
6844 (_initialize_objc_language): Adjust.
6845 * printcmd.c (sym_info): Rename to ...
6846 (info_symbol_command): ... this.
6847 (address_info): Rename to ...
6848 (info_address_command): ... this.
6849 (display_info): Rename to ...
6850 (info_display_command): ... this.
6851 (_initialize_printcmd): Adjust.
6852 * reverse.c (bookmarks_info): Rename to ...
6853 (info_breakpoints_command): ... this.
6854 (_initialize_reverse): Adjust.
6855 * ser-go32.c (dos_info): Rename to ...
6856 (info_serial_command): ... this.
6857 (_initialize_ser_dos): Adjust.
6858 * skip.c (skip_info): Rename to ...
6859 (info_skip_command): ... this.
6860 (_initialize_step_skip): Adjust.
6861 * source.c (line_info): Rename to ...
6862 (info_line_command): ... this.
6863 (source_info): Rename to ...
6864 (info_source_command)
6865 * stack.c (frame_info): Rename to ...
6866 (info_frame_command): ... this.
6867 (locals_info): Rename to ...
6868 (info_locals_command): ... this.
6869 (args_info): Rename to ...
6870 (info_args_command): ... this.
6871 (_initialize_stack): Adjust.
6872 * symtab.c (sources_info): Rename to ...
6873 (info_sources_command): ... this.
6874 (variables_info): Rename to ...
6875 (info_variables_command): ... this.
6876 (functions_info): Rename to ...
6877 (info_functions_command): ... this.
6878 (types_info): Rename to ...
6879 (info_types_command): ... this.
6880 (_initialize_symtab): Adjust.
6881 * target.c (target_info): Rename to ...
6882 (info_target_command): ... this.
6883 (initialize_targets): Adjust.
6884 * tracepoint.c (tvariables_info): Rename to ...
6885 (info_tvariables_command): ... this.
6886 (scope_info): Rename to ...
6887 (info_scope_command): ... this.
6888 (trace_dump_actions): Adjust.
6889 (_initialize_tracepoint): Adjust.
6891 2017-08-22 Tom Tromey <tom@tromey.com>
6893 * breakpoint.h (install_breakpoint): Update.
6894 * breakpoint.c (add_solib_catchpoint): Update.
6895 (install_breakpoint): Change argument to a std::unique_ptr.
6896 (create_fork_vfork_event_catchpoint): Use std::unique_ptr.
6897 (create_breakpoint_sal, create_breakpoint): Update.
6898 (watch_command_1, catch_exec_command_1)
6899 (strace_marker_create_breakpoints_sal): Use std::unique_ptr.
6900 (add_to_breakpoint_chain): Change argument to a std::unique_ptr.
6901 Return the breakpoint.
6902 (set_raw_breakpoint_without_location, set_raw_breakpoint)
6903 (new_single_step_breakpoint): Update.
6904 * break-catch-throw.c (handle_gnu_v3_exceptions): Use
6906 * break-catch-syscall.c (create_syscall_event_catchpoint): Use
6908 * break-catch-sig.c (create_signal_catchpoint): Use
6910 * ada-lang.c (create_ada_exception_catchpoint): Use
6913 2017-08-22 Tom Tromey <tom@tromey.com>
6915 * breakpoint.c (add_solib_catchpoint): Use std::unique_ptr.
6917 2017-08-22 Tom Tromey <tom@tromey.com>
6919 * psymtab.c (psymtab_search_name): Return a unique_xmalloc_ptr.
6920 (lookup_partial_symbol): Update.
6922 2017-08-22 Tom Tromey <tom@tromey.com>
6924 * source.h (rewrite_source_path): Return a unique_xmalloc_ptr.
6925 * source.c (rewrite_source_path): Return a unique_xmalloc_ptr.
6926 (find_and_open_source, symtab_to_fullname): Update.
6927 * psymtab.c (psymtab_to_fullname): Update.
6929 2017-08-22 Tom Tromey <tom@tromey.com>
6931 * exec.c (exec_file_attach): Update.
6932 * linux-thread-db.c (try_thread_db_load): Update.
6933 * guile/scm-safe-call.c (gdbscm_safe_source_script): Update.
6934 * utils.c (gdb_realpath): Change return type.
6935 (gdb_realpath_keepfile): Update.
6936 (gdb_realpath_check_trailer, gdb_realpath_tests): New functions.
6937 (_initialize_utils): Register the new self test.
6938 * source.c (openp): Update.
6939 (find_and_open_source): Update.
6940 * nto-tdep.c (nto_find_and_open_solib): Update.
6941 * main.c (set_gdb_data_directory): Update.
6942 (captured_main_1): Update.
6943 * dwarf2read.c (dwarf2_get_dwz_file): Update
6944 (dw2_map_symbol_filenames): Update.
6945 * auto-load.c (auto_load_safe_path_vec_update): Update.
6946 (filename_is_in_auto_load_safe_path_vec): Change type of
6948 (auto_load_objfile_script): Update.
6949 (file_is_auto_load_safe): Update. Use std::string.
6950 * utils.h (gdb_realpath): Return a gdb::unique_xmalloc_ptr.
6952 2017-08-22 Tom Tromey <tom@tromey.com>
6954 * utils.c (gdb_realpath_keepfile): Return a
6955 gdb::unique_xmalloc_ptr.
6956 * exec.c (exec_file_attach): Update.
6957 * utils.h (gdb_realpath_keepfile): Return a
6958 gdb::unique_xmalloc_ptr.
6960 2017-08-22 Tom Tromey <tom@tromey.com>
6962 * compile/compile.c (compile_file_command): Use
6963 gdb::unique_xmalloc_ptr, std::string.
6964 * utils.c (gdb_abspath): Change return type.
6965 * source.c (openp): Update.
6966 * objfiles.c (allocate_objfile): Update.
6967 * main.c (set_gdb_data_directory): Update.
6968 * utils.h (gdb_abspath): Return a gdb::unique_xmalloc_ptr.
6970 2017-08-22 Zhouyi Zhou <zhouzhouyi@gmail.com>
6972 * cli-cmds.c (list_commands): List actual code around more than
6975 2017-08-21 John Baldwin <jhb@FreeBSD.org>
6977 * fbsd-nat.c (fbsd_add_threads): Use array type for `lwps'.
6979 2017-08-21 Pedro Alves <palves@redhat.com>
6982 * c-exp.y (variable production): Handle function aliases.
6983 * minsyms.c (msymbol_is_text): New function.
6984 * minsyms.h (msymbol_is_text): Declare.
6985 * symtab.c (find_function_alias_target): New function.
6986 * symtab.h (find_function_alias_target): Declare.
6988 2017-08-21 Pedro Alves <palves@redhat.com>
6990 * eval.c (evaluate_subexp_standard) <OP_TYPE>: Don't dig past
6992 * typeprint.c (whatis_exp): If handling "whatis", and expression
6993 is OP_TYPE, strip one typedef level. Otherwise don't strip
6995 * valops.c (value_cast): Save "to" type before resolving
6996 stubs/typedefs. Use that type as resulting value's type.
6998 2017-08-18 Tom Tromey <tom@tromey.com>
6999 Pedro Alves <palves@redhat.com>
7001 * spu-multiarch.c (parse_spufs_run): Use scoped_restore.
7002 * sol-thread.c (sol_thread_resume, sol_thread_wait)
7003 (sol_thread_xfer_partial, rw_common): Use scoped_restore.
7004 * procfs.c (procfs_do_thread_registers): Use scoped_restore.
7005 * proc-service.c (ps_xfer_memory): Use scoped_restore.
7006 * linux-tdep.c (linux_corefile_thread): Remove a cleanup.
7007 (linux_get_siginfo_data): Add "thread" argument. Use
7009 * linux-nat.c (linux_child_follow_fork)
7010 (check_stopped_by_watchpoint): Use scoped_restore.
7011 * infrun.c (displaced_step_prepare_throw, write_memory_ptid)
7012 (THREAD_STOPPED_BY, handle_signal_stop): Use scoped_restore.
7013 (restore_inferior_ptid, save_inferior_ptid): Remove.
7014 * btrace.c (btrace_fetch): Use scoped_restore.
7015 * bsd-uthread.c (bsd_uthread_fetch_registers)
7016 (bsd_uthread_store_registers): Use scoped_restore.
7017 * breakpoint.c (reattach_breakpoints, detach_breakpoints): Use
7019 * aix-thread.c (aix_thread_resume, aix_thread_wait)
7020 (aix_thread_xfer_partial): Use scoped_restore.
7021 * inferior.h (save_inferior_ptid): Remove.
7023 2017-08-18 Yao Qi <yao.qi@linaro.org>
7026 * arm-tdep.c (gdb_print_insn_arm): Mark
7027 USER_SPECIFIED_MACHINE_TYPE if exec_bfd isn't NULL.
7029 2017-08-18 Yao Qi <yao.qi@linaro.org>
7031 * NEWS: Mention GDBserver's new option "--selftest".
7032 * Makefile.in (SFILES): Remove selftest.c, add common/selftest.c.
7033 * selftest.c: Move it to common/selftest.c.
7034 * selftest.h: Move it to common/selftest.h.
7035 * selftest-arch.c (reset): New function.
7036 (tests_with_arch): Call reset.
7038 2017-08-18 Yao Qi <yao.qi@linaro.org>
7040 * selftest.c (run_tests): Don't call QUIT. Call debug_printf
7041 instead of exception_fprintf and printf_filtered.
7043 2017-08-18 Yao Qi <yao.qi@linaro.org>
7045 * selftest.c (register_self_test): Rename it to
7046 selftests::register_test.
7047 (run_self_tests): selftest::run_tests.
7048 * selftest.h: Update declarations.
7049 * selftest-arch.c (register_self_test_foreach_arch): Rename it to
7050 selftests::register_test_foreach_arch.
7051 * selftest-arch.h: Update declaration.
7052 * aarch64-tdep.c: Update.
7053 * arm-tdep.c: Likewise.
7054 * disasm-selftests.c: Likewise.
7055 * dwarf2loc.c: Likewise.
7056 * dwarf2-frame.c: Likewise.
7057 * findvar.c: Likewise.
7058 * gdbarch-selftests.c: Likewise.
7059 * maint.c (maintenance_selftest): Likewise.
7060 * regcache.c: Likewise.
7061 * rust-exp.y: Likewise.
7062 * selftest-arch.c: Likewise.
7063 * unittests/environ-selftests.c: Likewise.
7064 * unittests/function-view-selftests.c: Likewise.
7065 * unittests/offset-type-selftests.c: Likewise.
7066 * unittests/optional-selftests.c: Likewise.
7067 * unittests/scoped_restore-selftests.c: Likewise.
7068 * utils-selftests.c: Likewise.
7070 2017-08-17 Pedro Alves <palves@redhat.com>
7072 * cli/cli-cmds.c (source_command): Delete 'old_source_verbose'
7075 2017-08-17 Pedro Alves <palves@redhat.com>
7077 * dwarf2read.c (struct dwarf2_cu) <line_header_die_owner>: New
7079 (reset_die_in_process): Delete, replaced by ...
7080 (process_die_scope): ... this new class. Make it responsible for
7081 freeing cu->line_header too.
7082 (process_die): Use process_die_scope.
7083 (handle_DW_AT_stmt_list): Record the line header's owner CU/DIE in
7084 cu->line_header_die_owner. Don't release the line header if it's
7086 (setup_type_unit_groups): Make the CU/DIE own the line header.
7087 Don't release the line header here.
7089 2017-08-17 Alex Lindsay <alexlindsay239@gmail.com> (tiny change)
7091 * elfread.c (elf_read_minimal_symbols): xfree synthsyms.
7093 2017-08-17 Ruslan Kabatsayev <b7.10110111@gmail.com>
7095 * NEWS: Mention new shortcuts for nexti and stepi in TUI
7098 2017-08-16 Ruslan Kabatsayev <b7.10110111@gmail.com>
7100 * tui/tui.c (tui_commands): Add "nexti" and "stepi" to the Single-Key
7103 2017-08-15 Stafford Horne <shorne@gmail.com>
7105 * MAINTAINERS (Write After Approval): Add Stafford Horne.
7107 2017-08-15 Stafford Horne <shorne@gmail.com>
7109 * xtensa-tdep.c (xtensa_init_reggroups): Use xstrdup for cpname.
7111 2017-08-15 Sergio Durigan Junior <sergiodj@redhat.com>
7114 * infcmd.c (unset_environment_command): Use the 'clear' method on
7115 the environment instead of resetting it.
7117 2017-08-15 John Baldwin <jhb@FreeBSD.org>
7119 * fbsd-nat.c (fbsd_convert_siginfo): Fix compile on big-endian
7122 2017-08-14 Tom Tromey <tom@tromey.com>
7124 * valprint.c (print_octal_chars): Use HOST_CHAR_BIT.
7125 (print_binary_chars): Likewise.
7126 (BITS_IN_BYTES): Remove.
7128 2017-08-14 Tom Tromey <tom@tromey.com>
7131 * valprint.c (LOW_ZERO): Change value to 034.
7132 (print_octal_chars): Add static_asserts for octal constants.
7133 * printcmd.c (print_scalar_formatted): Add 'd' case.
7135 2017-08-11 Tom Tromey <tom@tromey.com>
7137 * symfile.c (add_symbol_file_command): Use std::vector.
7139 2017-08-14 Tom Tromey <tom@tromey.com>
7141 * break-catch-throw.c (handle_gnu_v3_exceptions): Use std::move.
7142 * break-catch-syscall.c (create_syscall_event_catchpoint): Use
7144 * break-catch-sig.c (create_signal_catchpoint): Use std::move.
7146 2017-08-11 Pedro Alves <palves@redhat.com>
7148 * infrun.c (process_event_stop_test): Adjust
7149 function_name_is_marked_for_skip call.
7150 * skip.c: Include <list>.
7151 (skiplist_entry): Make it a class with private fields, and
7153 (skiplist_entry_chain): Delete.
7154 (skiplist_entries): New.
7155 (skiplist_entry_count): Delete.
7156 (highest_skiplist_entry_num): New.
7157 (ALL_SKIPLIST_ENTRIES, ALL_SKIPLIST_ENTRIES_SAFE): Delete.
7158 (add_skiplist_entry): Delete.
7159 (skiplist_entry::skiplist_entry): New.
7160 (skiplist_entry::add_entry): New.
7161 (skip_file_command, skip_function): Adjust.
7162 (compile_skip_regexp): Delete.
7163 (skip_command): Don't compile regexp here. Adjust to use
7164 skiplist_entry::add_entry.
7165 (skip_info): Adjust to use range-for and getters.
7166 (skip_enable_command, skip_disable_command): Adjust to use
7167 range-for and setters.
7168 (skip_delete_command): Adjust to use std::list.
7169 (add_skiplist_entry): Delete.
7170 (skip_file_p): Delete, refactored as ...
7171 (skiplist_entry::do_skip_file_p): ... this new method.
7172 (skip_gfile_p): Delete, refactored as ...
7173 (skiplist_entry::do_gskip_file_p): ... this new method.
7174 (skip_function_p, skip_rfunction_p): Delete, refactored as ...
7175 (skiplist_entry::skip_function_p): ... this new method.
7176 (function_name_is_marked_for_skip): Now returns bool, and takes
7177 the function sal by const reference. Adjust to use range-for and
7178 skiplist_entry methods.
7179 (_initialize_step_skip): Remove references to
7180 skiplist_entry_chain, skiplist_entry_count.
7181 * skip.h (function_name_is_marked_for_skip): Now returns bool, and
7182 takes the function sal by const reference.
7184 2017-08-11 Yao Qi <yao.qi@linaro.org>
7186 * dwarf2-frame.c (clear_pointer_cleanup): Remove.
7187 (dwarf2_frame_cache): Remove reset_cache_cleanup.
7188 (dwarf2_frame_cache):
7189 * frame-unwind.c (frame_unwind_try_unwinder): Catch
7190 RETURN_MASK_ALL and set *this_case to NULL.
7191 * frame-unwind.h: Update comments.
7193 2017-08-11 Yao Qi <yao.qi@linaro.org>
7195 * dwarf2-frame.c (dwarf2_frame_state_alloc_regs): Remove.
7196 (dwarf2_frame_state_copy_regs): Remove.
7197 (dwarf2_frame_state_free_regs): Remove.
7198 (dwarf2_frame_state::~dwarf2_frame_state): Remove.
7199 (dwarf2_restore_rule): Call method .alloc_regs instead of
7200 dwarf2_frame_state_alloc_regs.
7201 (execute_cfa_program): Likewise. Call dwarf2_frame_state_reg_info
7202 constructor. Call std::move.
7203 (dwarf2_fetch_cfa_info): Don't call dwarf2_frame_state_copy_regs.
7204 (dwarf2_frame_cache): Likewise.
7206 [GDB_SELF_TEST]: Include selftest.h and
7208 [GDB_SELF_TEST] (execute_cfa_program_test): New function.
7209 (_initialize_dwarf2_frame) [GDB_SELF_TEST]: Register
7210 execute_cfa_program_test.
7212 * dwarf2-frame.h (dwarf2_frame_state_reg_info): Add ctor, dtor,
7213 copy ctor, assignment operator, move assignment.
7214 <alloc_regs>: New method.
7216 (struct dwarf2_frame_state): Delete dtor.
7217 (dwarf2_frame_state_alloc_regs): Remove declaration.
7218 * sparc-tdep.c (sparc_execute_dwarf_cfa_vendor_op): Don't call
7219 dwarf2_frame_state_alloc_regs, use .alloc_regs instead.
7221 2017-08-11 Yao Qi <yao.qi@linaro.org>
7223 * dwarf2-frame.c (dwarf2_frame_state_free): Remove.
7224 (dwarf2_frame_state::dwarf2_frame_state): New.
7225 (dwarf2_frame_state::~dwarf2_frame_state): New.
7226 (dwarf2_fetch_cfa_info): Update.
7227 (dwarf2_frame_cache): Remove old_chain. Change 'fs' to an object
7228 rather than a pointer. Update code.
7229 * dwarf2-frame.h (struct dwarf2_frame_state): Declare ctor and
7231 <data_align, code_align, retaddr_column>: Change them to const.
7232 <armcc_cfa_offsets_sf, armcc_cfa_offsets_reversed>: Change them
7235 2017-08-11 Yao Qi <yao.qi@linaro.org>
7237 * dwarf2-frame.h (struct dwarf2_frame_state_reg) <exp_len>: Remove.
7238 <loc.exp>: New field.
7239 * dwarf2-frame.c (execute_cfa_program): Update.
7240 (dwarf2_frame_prev_register): Update.
7242 2017-08-10 Pedro Alves <palves@redhat.com>
7244 * common/gdb_unique_ptr.h (xfree_deleter<T[]>): Define.
7246 2017-08-09 John Baldwin <jhb@FreeBSD.org>
7248 * fbsd-nat.c (struct fbsd_fork_info): Remove.
7249 (fbsd_pending_children): Use std::list.
7250 (fbsd_remember_child): Likewise.
7251 (fbsd_is_child_pending): Likewise.
7252 (fbsd_pending_vfork_done): Use std::forward_list.
7253 (fbsd_add_vfork_done): Likewise.
7254 (fbsd_is_vfork_done_pending): Likewise.
7255 (fbsd_next_vfork_done): Likewise.
7257 2017-08-09 John Baldwin <jhb@FreeBSD.org>
7259 * fbsd-nat.c [HAVE_KINFO_GETVMMAP] (struct free_deleter): New.
7260 (fbsd_find_memory_regions): Use free_deleter with std::unique_ptr.
7261 [!HAVE_KINFO_GETVMMAP] (fbsd_find_memory_regions): Use std::string
7263 (fbsd_xfer_partial): Use gdb::byte_vector.
7264 (fbsd_add_threads): Use gdb::unique_xmalloc_ptr.
7266 2017-08-09 John Baldwin <jhb@FreeBSD.org>
7268 * fbsd-nat.c: [!HAVE_KINFO_GETVMMAP]: Include <sys/user.h> and
7270 (fbsd_find_memory_regions): Fix `mapfile' initialization.
7272 2017-08-09 Tom Tromey <tom@tromey.com>
7274 * skip.c (skiplist_entry): New constructor.
7275 (skiplist_entry::enabled, skiplist_entry::function_is_regexp)
7276 (skiplist_entry::file_is_glob): Now bool.
7277 (skiplist_entry::file, skiplist_entry::function): Now
7279 (make_skip_entry): Return a unique_ptr. Use new.
7280 (free_skiplist_entry, free_skiplist_entry_cleanup)
7281 (make_free_skiplist_entry_cleanup): Remove.
7282 (skip_command, skip_disable_command, add_skiplist_entry)
7283 (skip_form_bytes, compile_skip_regexp, skip_command, skip_info)
7284 (skip_file_p, skip_gfile_p, skip_function_p, skip_rfunction_p)
7285 (function_name_is_marked_for_skip): Update.
7286 (skip_delete_command): Update. Use delete.
7288 2017-08-09 Jiong Wang <jiong.wang@arm.com>
7290 * aarch64-linux-tdep.c: Include "auxv.h" and "elf/common.h".
7291 (aarch64_linux_core_read_description): New function.
7292 (aarch64_linux_init_abi): Register gdbarch_core_read_description.
7294 2017-08-09 Pedro Alves <palves@redhat.com>
7296 * cp-name-parser.y (cp_comp_to_string): Return a
7297 gdb::unique_xmalloc_ptr<char>.
7298 * cp-support.c (replace_typedefs_qualified_name)
7299 (replace_typedefs): Adjust to use gdb::unique_xmalloc_ptr<char>.
7300 (cp_canonicalize_string_full): Use op= instead of explicit
7302 (cp_class_name_from_physname, method_name_from_physname)
7303 (cp_func_name, cp_remove_params): Adjust to use
7304 gdb::unique_xmalloc_ptr<char>.
7305 * cp-support.h (cp_comp_to_string): Return a
7306 gdb::unique_xmalloc_ptr<char>.
7307 * python/py-type.c (typy_lookup_type): Adjust to use
7308 gdb::unique_xmalloc_ptr<char>.
7310 2017-08-09 H.J. Lu <hongjiu.lu@intel.com>
7312 * dwarf2read.c (dwarf2_string_attr): Fix a typo.
7314 2017-08-09 Alex Lindsay <alexlindsay239@gmail.com>
7315 Yao Qi <yao.qi@linaro.org>
7317 * cp-support.c (cp_canonicalize_string_full): Use
7318 gdb::unique_xmalloc_ptr<char>.
7319 (cp_canonicalize_string): Likewise.
7321 2017-08-09 Yao Qi <yao.qi@linaro.org>
7323 * features/Makefile (WHICH): Remove i386/ non-linux stuff.
7324 * regformats/i386/amd64-avx-avx512.dat: Remove.
7325 * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Remove.
7326 * regformats/i386/amd64-avx-mpx.dat:Remove.
7327 * regformats/i386/amd64-avx.dat: Remove.
7328 * regformats/i386/amd64-mpx.dat: Remove.
7329 * regformats/i386/i386-avx-avx512.dat: Remove.
7330 * regformats/i386/i386-avx-mpx-avx512-pku.dat: Remove.
7331 * regformats/i386/i386-avx-mpx.dat: Remove.
7332 * regformats/i386/i386-mmx.dat: Remove.
7333 * regformats/i386/i386-mpx.dat: Remove.
7335 2017-08-09 Yao Qi <yao.qi@linaro.org>
7337 * amd64-tdep.h (tdesc_x32): Remove the declaration.
7338 * amd64-tdep.c: Don't include features/i386/x32*.c.
7339 (_initialize_amd64_tdep): Don't call initialize_tdesc_x32*
7341 * features/Makefile (WHICH): Remove i386/x32, i386/x32-avx,
7342 and i386/x32-avx-avx512.
7343 (XMLTOC): Remove i386/x32-avx.xml, i386/x32-avx-avx512.xml,
7345 * features/i386/x32-avx-avx512.c: Removed.
7346 * features/i386/x32-avx-avx512.xml: Removed.
7347 * features/i386/x32-avx.c: Removed.
7348 * features/i386/x32-avx.xml: Removed.
7349 * features/i386/x32.c: Removed.
7350 * features/i386/x32.xml: Removed.
7351 * regformats/i386/x32-avx-avx512.dat: Removed.
7352 * regformats/i386/x32-avx.dat: Removed.
7353 * regformats/i386/x32.dat: Removed.
7355 2017-08-07 Maciej W. Rozycki <macro@imgtec.com>
7357 PR breakpoints/21886
7358 * mem-break.c (default_memory_insert_breakpoint): Use
7359 `->placed_address' rather than `->reqstd_address' for the
7360 breakpoint location.
7362 2017-08-07 Maciej W. Rozycki <macro@imgtec.com>
7364 * arch-utils.c (default_print_insn): Remove arch/mach/endian
7367 2017-08-07 Maciej W. Rozycki <macro@imgtec.com>
7369 * gdbarch.sh (gdbarch_info): Replace the `tdep_info' member with
7370 a union of `tdep_info', `tdesc_data' and `id'.
7371 * aarch64-tdep.c (aarch64_gdbarch_init): Use `info.tdesc_data'
7372 rather than `info.tdep_info'.
7373 * amd64-linux-tdep.c (amd64_linux_init_abi): Likewise.
7374 * i386-linux-tdep.c (i386_linux_init_abi): Likewise.
7375 * i386-tdep.c (i386_gdbarch_init): Likewise.
7376 * mips-linux-tdep.c (mips_linux_init_abi): Likewise.
7377 * mips-tdep.c (mips_gdbarch_init): Likewise.
7378 * nds32-tdep.c (nds32_gdbarch_init): Likewise.
7379 * rs6000-tdep.c (rs6000_gdbarch_init): Likewise.
7380 * ppc-linux-tdep.c (ppu2spu_sniffer): Use `info.id' rather than
7382 (ppc_linux_init_abi): Use `info.tdesc_data' rather than
7384 * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
7385 * spu-multiarch.c (spu_gdbarch): Use `info.id' rather than
7387 * spu-tdep.c (spu_gdbarch_init): Likewise.
7388 * gdbarch.h: Regenerate.
7390 2017-08-07 Leszek Swirski <leszeks@google.com>
7393 * dwarf2read.c (dwarf2_string_attr): Allow DW_FORM_GNU_strp_alt.
7395 2017-08-07 Simon Marchi <simon.marchi@ericsson.com>
7397 * remote-sim.c (gdbsim_load): Remove char **argv local variable.
7398 (gdbsim_open): Rename gdb_argv args object to argv.
7400 2017-08-05 Tom Tromey <tom@tromey.com>
7402 * compile/compile-object-load.c (compile_object_load): Use
7403 gdb::unique_xmalloc_ptr.
7404 * cli/cli-dump.c (scan_filename): Rename from
7405 scan_filename_with_cleanup. Change return type.
7406 (scan_expression): Rename from scan_expression_with_cleanup.
7408 (dump_memory_to_file, dump_value_to_file, restore_command):
7409 Use gdb::unique_xmalloc_ptr. Update.
7410 * cli/cli-cmds.c (find_and_open_script): Use
7411 gdb::unique_xmalloc_ptr.
7412 * tracefile-tfile.c (tfile_open): Use gdb::unique_xmalloc_ptr.
7413 * symmisc.c (maintenance_print_symbols)
7414 (maintenance_print_msymbols): Use gdb::unique_xmalloc_ptr.
7415 * symfile.c (symfile_bfd_open, generic_load)
7416 (add_symbol_file_command, remove_symbol_file_command): Use
7417 gdb::unique_xmalloc_ptr.
7418 * source.c (openp): Use gdb::unique_xmalloc_ptr.
7419 * psymtab.c (maintenance_print_psymbols): Use
7420 gdb::unique_xmalloc_ptr.
7421 * corelow.c (core_open): Use gdb::unique_xmalloc_ptr.
7422 * breakpoint.c (save_breakpoints): Use gdb::unique_xmalloc_ptr.
7423 * solib.c (solib_map_sections): Use gdb::unique_xmalloc_ptr.
7424 (reload_shared_libraries_1): Likewise.
7426 2017-08-05 Tom Tromey <tom@tromey.com>
7428 * rust-exp.y (rust_op_ptr, set_field): Remove typedefs.
7429 (rust_op_vector, rust_set_vector): New typedefs.
7430 (current_parser): New global.
7431 (work_obstack): Change to pointer type. Update all users.
7432 (rust_ast, pstate): Remove globals.
7433 (struct rust_parser): New.
7434 (%union) <params, field_inits>: Change type.
7435 (start, tuple_expr, unit_expr, struct_expr_list, literal)
7436 (field_expr, expr_list, maybe_expr_list, type_list): Update.
7437 (ast_call_ish, ast_path, ast_function_type, ast_tuple_type)
7438 (convert_params_to_types, convert_params_to_expression): Change
7440 (ast_string): Change type of "fields".
7441 (rust_parse): Make a rust_parser. Remove cleanups.
7442 (rust_lex_tests): Make and install an auto_obstack.
7444 2017-08-04 Yao Qi <yao.qi@linaro.org>
7446 * configure.srv (ipa_x32_linux_regobj): New.
7447 * linux-amd64-ipa.c (get_ipa_tdesc): Use X86_TDESC_AVX_AVX512
7448 instead of X86_TDESC_AVX512.
7449 (initialize_low_tracepoint): Call
7450 init_registers_x32_avx_avx512_linux.
7452 2017-08-04 Yao Qi <yao.qi@linaro.org>
7454 * utils.h (gdb_argv): Add namespace std for nullptr_t.
7456 2017-08-03 Ruslan Kabatsayev <b7.10110111@gmail.com>
7458 * MAINTAINERS (Write After Approval): Add Ruslan Kabatsayev.
7460 2017-08-03 Tom Tromey <tom@tromey.com>
7462 * utils.c (make_cleanup_freeargv, do_freeargv, gdb_buildargv):
7464 * utils.h (make_cleanup_freeargv, gdb_buildargv): Remove.
7466 2017-08-03 Tom Tromey <tom@tromey.com>
7468 * python/py-param.c (compute_enum_values): Use gdb_argv.
7470 2017-08-03 Tom Tromey <tom@tromey.com>
7472 * utils.h (struct gdb_argv_deleter): New.
7473 (gdb_argv): New class.
7474 * utils.c (gdb_argv::reset): New method.
7475 * tracepoint.c (delete_trace_variable_command): Use gdb_argv.
7476 * tracefile.c (tsave_command): Use gdb_argv.
7477 * top.c (new_ui_command): Use gdb_argv.
7478 * symmisc.c (maintenance_print_symbols)
7479 (maintenance_print_msymbols, maintenance_expand_symtabs): Use gdb_argv.
7480 * symfile.c (symbol_file_command, generic_load)
7481 (remove_symbol_file_command): Use gdb_argv.
7482 * stack.c (backtrace_command): Use gdb_argv.
7483 * source.c (add_path, show_substitute_path_command)
7484 (unset_substitute_path_command, set_substitute_path_command):
7486 * skip.c (skip_command): Use gdb_argv. Use gdb_buildargv.
7487 * ser-mingw.c (pipe_windows_open): Use gdb_argv.
7488 * remote.c (extended_remote_run, remote_put_command)
7489 (remote_get_command, remote_delete_command): Use gdb_argv.
7490 * remote-sim.c (gdbsim_load, gdbsim_create_inferior)
7491 (gdbsim_open): Use gdb_argv.
7492 * python/py-cmd.c (gdbpy_string_to_argv): Use gdb_argv.
7493 * psymtab.c (maintenance_print_psymbols): Use gdb_argv.
7494 * procfs.c (procfs_info_proc): Use gdb_argv.
7495 * interps.c (interpreter_exec_cmd): Use gdb_argv.
7496 * infrun.c (handle_command): Use gdb_argv.
7497 * inferior.c (add_inferior_command, clone_inferior_command):
7499 * guile/scm-string.c (gdbscm_string_to_argv): Use gdb_argv.
7500 * exec.c (exec_file_command): Use gdb_argv.
7501 * cli/cli-cmds.c (alias_command): Use gdb_argv.
7502 * compile/compile.c (build_argc_argv): Use gdb_argv.
7504 2017-08-03 Tom Tromey <tom@tromey.com>
7506 * python/python.c (gdbpy_decode_line): Use unique_xmalloc_ptr.
7508 2017-08-03 Tom Tromey <tom@tromey.com>
7510 * python/python.c (compute_python_string): Return std::string.
7511 (gdbpy_eval_from_control_command): Update.
7512 (do_start_initialization): Use std::string.
7513 * python/py-varobj.c (py_varobj_iter_next): Use string_printf, not
7515 * python/py-breakpoint.c (local_setattro): Use string_printf, not
7518 2017-08-03 Tom Tromey <tom@tromey.com>
7520 * top.h (do_restore_instream_cleanup): Remove.
7521 * top.c (do_restore_instream_cleanup): Remove.
7522 (read_command_file): Use scoped_restore.
7523 * cli/cli-script.c (execute_user_command): Use scoped_restore.
7525 2017-08-03 Tom Tromey <tom@tromey.com>
7527 * cli/cli-script.c (execute_user_command)
7528 (execute_control_command): Use scoped_restore.
7530 2017-08-03 Tom Tromey <tom@tromey.com>
7532 * cli/cli-script.c (do_restore_user_call_depth): Remove.
7533 (execute_user_command): Remove user_call_depth; use
7534 user_args_stack's size instead.
7536 2017-08-03 Tom Tromey <tom@tromey.com>
7538 * top.h (in_user_command): Remove.
7539 * top.c (in_user_command): Remove.
7540 * cli/cli-script.c (do_restore_user_call_depth)
7541 (execute_user_command): Update.
7543 2017-08-03 Tom Tromey <tom@tromey.com>
7545 * valops.c (search_struct_method): Use gdb::byte_vector.
7546 * valarith.c (value_concat): Use std::vector.
7547 * target.c (memory_xfer_partial): Use gdb::byte_vector.
7548 (simple_search_memory): Likewise.
7549 * printcmd.c (find_string_backward): Use gdb::byte_vector.
7550 * mi/mi-main.c (mi_cmd_data_write_memory): Use gdb::byte_vector.
7551 * gcore.c (gcore_copy_callback): Use gdb::byte_vector.
7552 * elfread.c (elf_rel_plt_read): Use std::string.
7553 * cp-valprint.c (cp_print_value): Use gdb::byte_vector.
7554 * cli/cli-dump.c (restore_section_callback): Use
7557 2017-08-03 Tom Tromey <tom@tromey.com>
7559 * jit.c (jit_reader_load_command): Use unique_xmalloc_ptr.
7561 2017-08-03 Tom Tromey <tom@tromey.com>
7563 * tui/tui-regs.c (tui_restore_gdbout): Remove.
7564 (tui_register_format): Use scoped_restore.
7566 2017-08-03 Tom Tromey <tom@tromey.com>
7568 * reverse.c (exec_direction_default): Remove.
7569 (exec_reverse_once): Use scoped_restore.
7570 * remote.c (restore_remote_timeout): Remove.
7571 (remote_flash_erase, remote_flash_write, remote_flash_done)
7572 (readchar, remote_serial_write): Use scoped_restore.
7573 * cli/cli-script.c (struct source_cleanup_lines_args)
7574 (source_cleanup_lines): Remove.
7575 (script_from_file): Use scoped_restore.
7576 * cli/cli-cmds.c (source_verbose_cleanup): Remove.
7577 (source_command): Use scoped_restore.
7579 2017-08-03 Tom Tromey <tom@tromey.com>
7581 * utils.h (make_cleanup_free_so): Remove.
7582 * utils.c (do_free_so, make_cleanup_free_so): Remove.
7583 * solist.h (struct so_deleter): New.
7584 (so_list_up): New typedef.
7585 * solib-svr4.c (svr4_read_so_list): Use so_list_up.
7587 2017-08-03 Tom Tromey <tom@tromey.com>
7589 * utils.h (make_cleanup_restore_current_language): Remove.
7590 * utils.c (do_restore_current_language)
7591 (make_cleanup_restore_current_language): Remove.
7592 * parse.c (parse_exp_in_context_1)
7593 (parse_expression_with_language): Use
7594 scoped_restore_current_language.
7595 * mi/mi-main.c (mi_cmd_execute): Use
7596 scoped_restore_current_language.
7597 * language.h (scoped_restore_current_language): New class.
7599 2017-08-03 Tom Tromey <tom@tromey.com>
7601 * compile/compile.c (cleanup_unlink_file): Remove.
7602 (compile_to_object): Use gdb::unlinker.
7603 (eval_compile_command): Likewise.
7605 2017-08-03 Tom Tromey <tom@tromey.com>
7607 * utils.h (make_cleanup_fclose): Remove.
7608 * utils.c (do_fclose_cleanup, make_cleanup_fclose): Remove.
7610 2017-08-03 Tom Tromey <tom@tromey.com>
7612 * top.c (open_terminal_stream): Return gdb_file_up.
7613 (new_ui_command): Update.
7615 2017-08-03 Tom Tromey <tom@tromey.com>
7617 * source.c (print_source_lines_base, forward_search_command)
7618 (reverse_search_command): Use gdb_file_up.
7620 2017-08-03 Tom Tromey <tom@tromey.com>
7622 * fbsd-nat.c (fbsd_find_memory_regions): Update.
7624 2017-08-03 Tom Tromey <tom@tromey.com>
7626 * cli/cli-cmds.c (find_and_open_script): Change return type.
7627 Remove "streamp" and "full_path" parameters.
7628 (source_script_with_search): Update.
7629 * auto-load.c (source_script_file): Update.
7630 * cli/cli-cmds.h (find_and_open_script): Change type.
7631 (open_script): New struct.
7633 2017-08-03 Tom Tromey <tom@tromey.com>
7635 * xml-support.c (xml_fetch_content_from_file): Update.
7636 * ui-file.c (stdio_file::open): Update.
7637 * tracefile-tfile.c (tfile_start): Update.
7638 * remote.c (remote_file_put, remote_file_get): Update.
7639 * nat/linux-procfs.c (linux_proc_get_int)
7640 (linux_proc_pid_get_state, linux_proc_tid_get_name): Update.
7641 * nat/linux-osdata.c (linux_common_core_of_thread): Update.
7642 (command_from_pid, commandline_from_pid, linux_xfer_osdata_cpus)
7643 (print_sockets, linux_xfer_osdata_shm, linux_xfer_osdata_sem)
7644 (linux_xfer_osdata_msg, linux_xfer_osdata_modules): Update.
7645 * nat/linux-btrace.c (linux_determine_kernel_start): Update.
7646 * linux-nat.c (linux_proc_pending_signals): Update.
7647 * dwarf2read.c (write_psymtabs_to_index): Use gdb_file_up.
7648 (file_closer): Remove.
7649 * compile/compile.c (compile_to_object): Update.
7650 * common/filestuff.h (struct gdb_file_deleter): New.
7651 (gdb_file_up): New typedef.
7652 (gdb_fopen_cloexec): Change return type.
7653 * common/filestuff.c (gdb_fopen_cloexec): Return gdb_file_up.
7654 * cli/cli-dump.c (fopen_with_cleanup): Remove.
7655 (dump_binary_file, restore_binary_file): Update.
7656 * auto-load.c (auto_load_objfile_script_1): Update.
7658 2017-08-03 Tom Tromey <tom@tromey.com>
7660 * tracepoint.c (tvariables_info_1): Use ui_out_emit_table.
7661 (info_static_tracepoint_markers_command): Likewise.
7662 * solib.c (info_sharedlibrary_command): Use ui_out_emit_table.
7663 * skip.c (skip_info): Use ui_out_emit_table.
7664 * progspace.c (print_program_space): Use ui_out_emit_table.
7665 * osdata.c (info_osdata): Use ui_out_emit_table.
7666 * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions): Use
7668 * linux-thread-db.c (info_auto_load_libthread_db): Use
7670 * inferior.c (print_inferior): Use ui_out_emit_table.
7671 * gdb_bfd.c (maintenance_info_bfds): Use ui_out_emit_table.
7672 * breakpoint.c (breakpoint_1): Use ui_out_emit_table.
7673 * auto-load.c (auto_load_info_scripts): Use ui_out_emit_table.
7674 * ada-tasks.c (print_ada_task_info): Use ui_out_emit_table.
7675 * ui-out.h (class ui_out_emit_table): New.
7677 2017-08-02 Maciej W. Rozycki <macro@imgtec.com>
7679 * mips-tdep.c (mips_fpu_type_str): New function.
7680 (mips_dump_tdep): Call it.
7682 2017-08-01 Maciej W. Rozycki <macro@imgtec.com>
7684 * mips-tdep.c (mips_gdbarch_init): Use MIPS_FPU_TYPE to access
7687 2017-07-31 Xavier Roirand <roirand@adacore.com>
7689 * solib-darwin.c (DYLD_VERSION_MAX): Increase value.
7691 2017-07-27 Xavier Roirand <roirand@adacore.com>
7693 * MAINTAINERS (Write After Approval): Add Xavier Roirand.
7695 2017-07-26 Yao Qi <yao.qi@linaro.org>
7697 * cli/cli-cmds.c (maintenancechecklist): New variable.
7698 * gdbcmd.h (maintenancechecklist): Declare it.
7699 * i386-linux-tdep.c (_initialize_i386_linux_tdep) [GDB_SELF_TEST]:
7700 Call i386_linux_read_description with different masks.
7701 * maint.c (maintenance_check_command): New function.
7702 (_initialize_maint_cmds): Call add_prefix_cmd.
7703 * target-descriptions.c (tdesc_reg): override operator != and ==.
7704 (tdesc_type): Likewise.
7705 (tdesc_feature): Likewise.
7706 (target_desc): Likewise.
7707 [GDB_SELF_TEST] (selftests::record_xml_tdesc): New function.
7708 (maintenance_check_xml_descriptions): New function.
7709 (_initialize_target_descriptions) Add command "xml-descriptions".
7710 * target-descriptions.h (selftests::record_xml_tdesc): Declare.
7712 2017-07-26 Yao Qi <yao.qi@linaro.org>
7714 * i386-linux-tdep.c: Don't include features/i386/i386-*linux.c.
7715 Include features/i386/32bit-*.c.
7716 (i386_linux_read_description): Generate target description if it
7718 (_initialize_i386_linux_tdep): Don't call _initialize_tdesc_i386
7720 * features/i386/32bit-linux.c: Re-generated.
7721 * features/i386/32bit-sse.c: Likewise.
7722 * target-descriptions.c (print_c_feature::visit): Print code to
7723 set register number if needed.
7724 (print_c_feature) <m_next_regnum>: New field.
7726 2017-07-26 Yao Qi <yao.qi@linaro.org>
7728 * features/Makefile (CFILES): Rename with TDESC_CFILES.
7729 (FEATURE_XMLFILES): New.
7730 (FEATURE_CFILES): New.
7732 (clean-cfiles): Remove generated c files.
7733 * features/i386/32bit-avx.c: Generated.
7734 * features/i386/32bit-avx512.c: Generated.
7735 * features/i386/32bit-core.c: Generated.
7736 * features/i386/32bit-linux.c: Generated.
7737 * features/i386/32bit-mpx.c: Generated.
7738 * features/i386/32bit-pkeys.c: Generated.
7739 * features/i386/32bit-sse.c: Generated.
7740 * target-descriptions.c: Include algorithm.
7741 (tdesc_element_visitor): Add method visit_end.
7742 (print_c_tdesc): Implement visit_end.
7743 (print_c_tdesc:: m_filename_after_features): Move it to
7745 (print_c_feature): New class.
7746 (maint_print_c_tdesc_cmd): Use print_c_feature if XML file
7747 name starts with "i386/32bit-".
7749 2017-07-26 Yao Qi <yao.qi@linaro.org>
7751 * target-descriptions.c (tdesc_element_visitor): New class.
7752 (tdesc_element): New class.
7753 (tdesc_reg): Inherit from tdesc_element.
7754 (tdesc_reg::accept): New function.
7755 (tdesc_type): Inherit from tdesc_element.
7756 (tdesc_type::accept): New function.
7757 (tdesc_feature): Inherit from tdesc_element.
7758 (tdesc_feature::accept): New function.
7759 (target_desc): Inherit from tdesc_element.
7760 (target_desc::target_desc): New.
7761 (target_desc::~target_desc): New.
7762 (target_desc::accept): New.
7763 (allocate_target_description): Use new.
7764 (free_target_description): Use delete.
7765 (print_c_tdesc): New class.
7766 (maint_print_c_tdesc_cmd): Adjust.
7768 * features/aarch64.c: Re-generated.
7769 * features/arc-arcompact.c: Re-generated.
7770 * features/arc-v2.c: Re-generated.
7771 * features/arm/arm-with-iwmmxt.c: Re-generated.
7772 * features/arm/arm-with-m.c: Re-generated.
7773 * features/arm/arm-with-m-fpa-layout.c: Re-generated.
7774 * features/arm/arm-with-m-vfp-d16.c: Re-generated.
7775 * features/arm/arm-with-neon.c: Re-generated.
7776 * features/arm/arm-with-vfpv2.c: Re-generated.
7777 * features/arm/arm-with-vfpv3.c: Re-generated.
7778 * features/i386/amd64-avx-avx512.c: Re-generated.
7779 * features/i386/amd64-avx-avx512-linux.c: Re-generated.
7780 * features/i386/amd64-avx.c: Re-generated.
7781 * features/i386/amd64-avx-linux.c: Re-generated.
7782 * features/i386/amd64-avx-mpx-avx512-pku.c: Re-generated.
7783 * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Re-generated.
7784 * features/i386/amd64-avx-mpx.c: Re-generated.
7785 * features/i386/amd64-avx-mpx-linux.c: Re-generated.
7786 * features/i386/amd64.c: Re-generated.
7787 * features/i386/amd64-linux.c: Re-generated.
7788 * features/i386/amd64-mpx.c: Re-generated.
7789 * features/i386/amd64-mpx-linux.c: Re-generated.
7790 * features/i386/i386-avx-avx512.c: Re-generated.
7791 * features/i386/i386-avx-avx512-linux.c: Re-generated.
7792 * features/i386/i386-avx.c: Re-generated.
7793 * features/i386/i386-avx-linux.c: Re-generated.
7794 * features/i386/i386-avx-mpx-avx512-pku.c: Re-generated.
7795 * features/i386/i386-avx-mpx-avx512-pku-linux.c: Re-generated.
7796 * features/i386/i386-avx-mpx.c: Re-generated.
7797 * features/i386/i386-avx-mpx-linux.c: Re-generated.
7798 * features/i386/i386.c: Re-generated.
7799 * features/i386/i386-linux.c: Re-generated.
7800 * features/i386/i386-mmx.c: Re-generated.
7801 * features/i386/i386-mmx-linux.c: Re-generated.
7802 * features/i386/i386-mpx.c: Re-generated.
7803 * features/i386/i386-mpx-linux.c: Re-generated.
7804 * features/i386/x32-avx-avx512.c: Re-generated.
7805 * features/i386/x32-avx-avx512-linux.c: Re-generated.
7806 * features/i386/x32-avx.c: Re-generated.
7807 * features/i386/x32-avx-linux.c: Re-generated.
7808 * features/i386/x32.c: Re-generated.
7809 * features/i386/x32-linux.c: Re-generated.
7810 * features/microblaze.c: Re-generated.
7811 * features/microblaze-with-stack-protect.c: Re-generated.
7812 * features/mips64-dsp-linux.c: Re-generated.
7813 * features/mips64-linux.c: Re-generated.
7814 * features/mips-dsp-linux.c: Re-generated.
7815 * features/mips-linux.c: Re-generated.
7816 * features/nds32.c: Re-generated.
7817 * features/nios2.c: Re-generated.
7818 * features/nios2-linux.c: Re-generated.
7819 * features/rs6000/powerpc-32.c: Re-generated.
7820 * features/rs6000/powerpc-32l.c: Re-generated.
7821 * features/rs6000/powerpc-403.c: Re-generated.
7822 * features/rs6000/powerpc-403gc.c : Re-generated.
7823 * features/rs6000/powerpc-405.c: Re-generated.
7824 * features/rs6000/powerpc-505.c: Re-generated.
7825 * features/rs6000/powerpc-601.c: Re-generated.
7826 * features/rs6000/powerpc-602.c: Re-generated.
7827 * features/rs6000/powerpc-603.c: Re-generated.
7828 * features/rs6000/powerpc-604.c: Re-generated.
7829 * features/rs6000/powerpc-64.c: Re-generated.
7830 * features/rs6000/powerpc-64l.c: Re-generated.
7831 * features/rs6000/powerpc-7400.c: Re-generated.
7832 * features/rs6000/powerpc-750.c: Re-generated.
7833 * features/rs6000/powerpc-860.c: Re-generated.
7834 * features/rs6000/powerpc-altivec32.c: Re-generated.
7835 * features/rs6000/powerpc-altivec32l.c: Re-generated.
7836 * features/rs6000/powerpc-altivec64.c: Re-generated.
7837 * features/rs6000/powerpc-altivec64l.c: Re-generated.
7838 * features/rs6000/powerpc-cell32l.c: Re-generated.
7839 * features/rs6000/powerpc-cell64l.c: Re-generated.
7840 * features/rs6000/powerpc-e500.c: Re-generated.
7841 * features/rs6000/powerpc-e500l.c: Re-generated.
7842 * features/rs6000/powerpc-isa205-32l.c: Re-generated.
7843 * features/rs6000/powerpc-isa205-64l.c: Re-generated.
7844 * features/rs6000/powerpc-isa205-altivec32l.c: Re-generated.
7845 * features/rs6000/powerpc-isa205-altivec64l.c: Re-generated.
7846 * features/rs6000/powerpc-isa205-vsx32l.c: Re-generated.
7847 * features/rs6000/powerpc-isa205-vsx64l.c: Re-generated.
7848 * features/rs6000/powerpc-vsx32.c: Re-generated.
7849 * features/rs6000/powerpc-vsx32l.c: Re-generated.
7850 * features/rs6000/powerpc-vsx64.c: Re-generated.
7851 * features/rs6000/powerpc-vsx64l.c: Re-generated.
7852 * features/rs6000/rs6000.c: Re-generated.
7853 * features/s390-linux32.c: Re-generated.
7854 * features/s390-linux32v1.c: Re-generated.
7855 * features/s390-linux32v2.c: Re-generated.
7856 * features/s390-linux64.c: Re-generated.
7857 * features/s390-linux64v1.c: Re-generated.
7858 * features/s390-linux64v2.c: Re-generated.
7859 * features/s390-te-linux64.c: Re-generated.
7860 * features/s390-tevx-linux64.c: Re-generated.
7861 * features/s390-vx-linux64.c: Re-generated.
7862 * features/s390x-linux64.c: Re-generated.
7863 * features/s390x-linux64v1.c: Re-generated.
7864 * features/s390x-linux64v2.c: Re-generated.
7865 * features/s390x-te-linux64.c: Re-generated.
7866 * features/s390x-tevx-linux64.c: Re-generated.
7867 * features/s390x-vx-linux64.c: Re-generated.
7868 * features/sparc/sparc32-solaris.c: Re-generated.
7869 * features/sparc/sparc64-solaris.c: Re-generated.
7870 * features/tic6x-c62x.c: Re-generated.
7871 * features/tic6x-c62x-linux.c: Re-generated.
7872 * features/tic6x-c64x.c: Re-generated.
7873 * features/tic6x-c64x-linux.c: Re-generated.
7874 * features/tic6x-c64xp.c: Re-generated.
7875 * features/tic6x-c64xp-linux.c: Re-generated.
7877 2017-07-26 Yao Qi <yao.qi@linaro.org>
7879 * i386-linux-tdep.c (i386_linux_read_description): New function.
7880 (i386_linux_core_read_description): Call
7881 i386_linux_read_description.
7882 * i386-linux-tdep.h (i386_linux_read_description): Declare.
7883 (tdesc_i386_linux, tdesc_i386_mmx_linux): Remove declarations.
7884 (tdesc_i386_avx_linux, tdesc_i386_mpx_linux): Likewise
7885 (tdesc_i386_avx_mpx_linux, tdesc_i386_avx_avx512_linux): Likewise.
7886 (tdesc_i386_avx_mpx_avx512_pku_linux): Likewise.
7887 * x86-linux-nat.c (x86_linux_read_description): Call
7888 i386_linux_read_description.
7890 2017-07-26 Yao Qi <yao.qi@linaro.org>
7893 * features/Makefile (%.c: %.xml): Pass the xml file name to
7894 command "maint print c-tdesc".
7895 * target-descriptions.c (maint_print_c_tdesc_cmd): Get file
7898 2017-07-26 Yao Qi <yao.qi@linaro.org>
7900 * target-descriptions.c (target_desc): Add ctor and dtor. Do
7901 in-class initialization.
7902 (tdesc_create_feature): Call new instead of XCNEW.
7903 (free_target_description): Ue delete.
7905 2017-07-25 John Baldwin <jhb@FreeBSD.org>
7907 * configure.nat: Add "-lkvm" for NetBSD/sparc64 and fix typo.
7909 2017-07-25 Yao Qi <yao.qi@linaro.org>
7911 * amd64-tdep.c (amd64_init_abi): Make argument default_tdesc
7913 (amd64_x32_init_abi): Likewise.
7914 * amd64-tdep.h (amd64_init_abi): Update declaration.
7915 (amd64_x32_init_abi): Likewise.
7917 2017-07-25 Yao Qi <yao.qi@linaro.org>
7920 * arm-linux-nat.c (arm_linux_fetch_inferior_registers): Update
7921 condition for FPSCR.
7922 (arm_linux_store_inferior_registers): Likewise.
7924 2017-07-22 Tom Tromey <tom@tromey.com>
7926 * break-catch-syscall.c (struct catch_syscall_inferior_data)
7927 <syscalls_counts>: Now a std::vector.
7928 (get_catch_syscall_inferior_data): Use "new".
7929 (catch_syscall_inferior_data_cleanup): Use "delete".
7930 (insert_catch_syscall, remove_catch_syscall)
7931 (clear_syscall_counts): Update.
7933 2017-07-22 Tom Tromey <tom@tromey.com>
7935 * break-catch-syscall.c (syscall_catchpoint)
7936 <syscalls_to_be_caught>: Now a std::vector<int>
7937 (~syscall_catchpoint): Remove.
7938 (insert_catch_syscall, remove_catch_syscall)
7939 (breakpoint_hit_catch_syscall, print_one_catch_syscall)
7940 (print_mention_catch_syscall, print_recreate_catch_syscall):
7942 (create_syscall_event_catchpoint): Change type of "filter"
7944 (catch_syscall_split_args): Return a std::vector.
7945 (catch_syscall_command_1, catching_syscall_number_1): Update.
7947 2017-07-22 Tom Tromey <tom@tromey.com>
7949 * break-catch-throw.c (struct exception_catchpoint)
7950 <exception_rx>: Now a std::string.
7951 (~exception_catchpoint): Remove.
7952 (print_one_detail_exception_catchpoint): Update.
7953 (handle_gnu_v3_exceptions): Change type of except_rx.
7954 (extract_exception_regexp): Return a std::string.
7955 (catch_exception_command_1): Update.
7957 2017-07-22 Tom Tromey <tom@tromey.com>
7959 * break-catch-sig.c (gdb_signal_type): Remove typedef.
7960 (struct signal_catchpoint) <signals_to_be_caught>: Now a
7962 <catch_all>: Now a bool.
7963 (~signal_catchpoint): Remove.
7964 (signal_catchpoint_insert_location)
7965 (signal_catchpoint_remove_location)
7966 (signal_catchpoint_breakpoint_hit, signal_catchpoint_print_one)
7967 (signal_catchpoint_print_mention)
7968 (signal_catchpoint_print_recreate)
7969 (signal_catchpoint_explains_signal): Update.
7970 (create_signal_catchpoint): Change type of "filter" and
7972 (catch_signal_split_args): Return a std::vector. Change type of
7974 (catch_signal_command): Update.
7976 2017-07-20 Pedro Alves <palves@redhat.com>
7978 * ada-lang.c (ada_language_defn): Make extern.
7979 (_initialize_ada_language): Remove add_language call.
7980 * c-lang.c (c_language_defn, cplus_language_defn)
7981 (asm_language_defn, minimal_language_defn): Make extern.
7982 (_initialize_c_language): Delete.
7983 * completer.c (compare_cstrings): Delete, moved to utils.h.
7984 * d-lang.c (d_language_defn): Make extern.
7985 (_initialize_d_language): Remove add_language calls.
7986 * defs.h (enum language): Add comment.
7987 * f-lang.c (f_language_defn): Make extern.
7988 (_initialize_f_language): Remove add_language call.
7989 * go-lang.c (go_language_defn): Make extern.
7990 (_initialize_go_language): Remove add_language call.
7991 * language.c: Include <algorithm>.
7992 (languages): Redefine as const array.
7993 (languages_size, languages_allocsize, DEFAULT_ALLOCSIZE): Delete.
7994 (set_language_command): Handle "local". Use for-range loop.
7995 (set_language): Remove loop.
7996 (language_enum): Rewrite.
7997 (language_def, language_str): Remove loops.
7998 (add_language): Delete.
7999 (add_set_language_command): New, based on add_languages.
8000 (skip_language_trampoline): Adjust.
8001 (local_language_defn): Delete.
8002 (language_gdbarch_post_init): Adjust.
8003 (_initialize_language): Remove add_language calls. Call
8004 add_set_language_command.
8005 * language.h (add_language): Delete.
8006 (auto_language_defn)
8007 (unknown_language_defn, minimal_language_defn, ada_language_defn)
8008 (asm_language_defn, c_language_defn, cplus_language_defn)
8009 (d_language_defn, f_language_defn, go_language_defn)
8010 (m2_language_defn, objc_language_defn, opencl_language_defn)
8011 (pascal_language_defn, rust_language_defn): Declare.
8012 * m2-lang.c (m2_language_defn): Make extern.
8013 (_initialize_m2_language): Remove add_language call.
8014 * objc-lang.c (objc_language_defn): Make extern.
8015 (_initialize_objc_language): Remove add_language call.
8016 * opencl-lang.c (opencl_language_defn): Make extern.
8017 (_initialize_opencl_language): Remove add_language call.
8018 * p-lang.c (pascal_language_defn): Make extern.
8019 (_initialize_pascal_language): Delete.
8020 * rust-lang.c (rust_language_defn): Make extern.
8021 (_initialize_rust_language): Delete.
8022 * utils.h (compare_cstrings): New static inline function.
8024 2017-07-20 Pedro Alves <palves@redhat.com>
8026 * ada-lang.c (ada_to_fixed_type_1): Adjust.
8027 (get_var_value): Constify parameters.
8028 (get_int_var_value): Change prototype.
8029 (to_fixed_range_type): Adjust.
8030 * ada-lang.h (get_int_var_value): Change prototype.
8032 2017-07-20 Pedro Alves <palves@redhat.com>
8034 * dwarf2read.c (dw2_lookup_symbol): Use
8035 SYMBOL_MATCHES_SEARCH_NAME.
8036 * psymtab.c (psym_lookup_symbol): Use SYMBOL_MATCHES_SEARCH_NAME.
8038 2017-07-20 Pedro Alves <palves@redhat.com>
8040 * block.c (block_iter_name_step, block_iter_name_first)
8041 (block_iter_name_next): Delete.
8042 (block_lookup_symbol_primary): Adjust to use
8043 dict_iter_match_first/dict_iter_match_next.
8044 * block.h (block_iter_name_first, block_iter_name_next): Delete
8046 (ALL_BLOCK_SYMBOLS_WITH_NAME): Adjust to use
8047 dict_iter_match_first/dict_iter_match_next.
8049 2017-07-20 Pedro Alves <palves@redhat.com>
8051 * cp-support.c (cp_find_first_component_aux): Add missing case for
8054 2017-07-18 David Blaikie <dblaikie@gmail.com>
8056 * dwarf2read.c (create_cus_hash_table): Re-add lost initialization
8057 of dwo_cu's dwo_file.
8059 2017-07-18 Yao Qi <yao.qi@linaro.org>
8061 * remote.c (store_registers_using_G): Remove one line comment.
8063 2017-07-18 Yao Qi <yao.qi@linaro.org>
8065 * regcache.c (regcache_cpy): Simplify it.
8066 (regcache::cpy_no_passthrough): Remove it.
8067 * regcache.h (cpy_no_passthrough): Remove it.
8068 (regcache_dup, regcache_cpy): Update comments.
8070 2017-07-18 Pedro Alves <palves@redhat.com>
8072 * remote-sim.c (sim_command_completer): Adjust to work with a
8073 completion_tracker instead of a VEC.
8075 2017-07-17 Pedro Alves <palves@redhat.com>
8077 * completer.c (complete_source_filenames): New function.
8078 (complete_address_and_linespec_locations): New function.
8079 (location_completer): Use complete_address_and_linespec_locations.
8080 (completion_tracker::build_completion_result): Honor the tracker's
8081 request to suppress append.
8082 * completer.h (completion_tracker::suppress_append_ws)
8083 (completion_tracker::set_suppress_append_ws): New methods.
8084 (completion_tracker::m_suppress_append_ws): New field.
8085 (complete_source_filenames): New declaration.
8086 * linespec.c (linespec_complete_what): New.
8087 (struct ls_parser) <complete_what, completion_word,
8088 completion_quote_char, completion_quote_end, completion_tracker>:
8090 (string_find_incomplete_keyword_at_end): New.
8091 (linespec_lexer_lex_string): Record quote char. If in completion
8093 (linespec_lexer_consume_token): Advance the completion word point.
8094 (linespec_lexer_peek_token): Save/restore completion info.
8095 (save_stream_and_consume_token): New.
8096 (set_completion_after_number): New.
8097 (linespec_parse_basic): Set what to complete next depending on
8098 token. Handle function and label completions specially.
8099 (parse_linespec): Disable objc shortcut in completion mode. Set
8100 what to complete next depending on token type. Skip keyword if in
8102 (complete_linespec_component, linespec_complete): New.
8103 * linespec.h (linespec_complete): Declare.
8105 2017-07-17 Pedro Alves <palves@redhat.com>
8107 * linespec.c (linespec_lexer_lex_string, find_toplevel_char):
8108 Handle 'operator<' / 'operator<<'.
8110 2017-07-17 Pedro Alves <palves@redhat.com>
8112 * completer.c (collect_explicit_location_matches): Handle
8114 (convert_explicit_location_to_linespec): New, factored out from
8116 (convert_explicit_location_to_sals): ... this.
8117 (complete_label): New.
8118 (linespec_complete_label, find_label_symbols_in_block): New.
8119 (find_label_symbols): Add completion_mode parameter and adjust to
8120 call find_label_symbols_in_block.
8121 * linespec.h (linespec_complete_label): Declare.
8123 2017-07-17 Pedro Alves <palves@redhat.com>
8125 * ada-lang.c (ada_collect_symbol_completion_matches): Add
8126 complete_symbol_mode parameter.
8127 * cli/cli-cmds.c (complete_command): Get the completion result out
8128 of the handle_brkchars tracker if used a custom word point.
8129 * completer.c: Include "linespec.h".
8130 (enum explicit_location_match_type) <MATCH_LINE>: New enumerator.
8131 (advance_to_expression_complete_word_point): New.
8132 (completion_tracker::completes_to_completion_word): New.
8133 (complete_files_symbols): Pass down
8134 complete_symbol_mode::EXPRESSION.
8135 (explicit_options, probe_options): New.
8136 (collect_explicit_location_matches): Complete on the
8137 explictit_loc->foo instead of word. Use
8138 linespec_complete_function. Handle MATCH_LINE. Handle offering
8139 keyword and options completions.
8140 (backup_text_ptr): Delete.
8141 (skip_keyword): New.
8142 (complete_explicit_location): Remove 'word' parameter. Add
8143 language, quoted_arg_start and quoted_arg_end parameters.
8144 Rewrite, parsing left to right.
8145 (location_completer): Rewrite.
8146 (location_completer_handle_brkchars): New function.
8147 (symbol_completer): Pass down complete_symbol_mode::EXPRESSION.
8148 (enum complete_line_internal_reason): Adjust comments.
8149 (completion_tracker::discard_completions): New.
8150 (completer_handle_brkchars_func_for_completer): Handle
8152 (gdb_custom_word_point_brkchars)
8153 (gdb_org_rl_basic_quote_characters): New.
8154 (gdb_completion_word_break_characters_throw)
8155 (completion_find_completion_word): Handle trackers that use a
8157 (completion_tracker::advance_custom_word_point_by): New.
8158 (completion_tracker::build_completion_result): Don't rely on
8159 readline appending the quote char.
8160 (gdb_rl_attempted_completion_function_throw): Handle trackers that
8161 use a custom word point.
8162 (gdb_rl_attempted_completion_function): Restore
8163 rl_basic_quote_characters.
8164 * completer.h (class completion_tracker): Extend intro comment.
8165 (completion_tracker::set_quote_char)
8166 (completion_tracker::quote_char)
8167 (completion_tracker::set_use_custom_word_point)
8168 (completion_tracker::use_custom_word_point)
8169 (completion_tracker::custom_word_point)
8170 (completion_tracker::set_custom_word_point)
8171 (completion_tracker::advance_custom_word_point_by)
8172 (completion_tracker::completes_to_completion_word)
8173 (completion_tracker::discard_completions): New methods.
8174 (completion_tracker::m_quote_char)
8175 (completion_tracker::m_use_custom_word_point)
8176 (completion_tracker::m_custom_word_point): New fields.
8177 (advance_to_expression_complete_word_point): Declare.
8178 * f-lang.c (f_collect_symbol_completion_matches): Add
8179 complete_symbol_mode parameter.
8180 * language.h (struct language_defn)
8181 <la_collect_symbol_completion_matches>: Add complete_symbol_mode
8183 * linespec.c (linespec_keywords): Add NULL terminator. Make extern.
8184 (linespec_complete_function): New function.
8185 (linespec_lexer_lex_keyword): Adjust.
8186 * linespec.h (linespec_keywords, linespec_complete_function): New
8188 * location.c (find_end_quote): New function.
8189 (explicit_location_lex_one): Add explicit_completion_info
8190 parameter. Save quoting info. Don't throw if being called for
8191 completion. Don't handle Ada operators here.
8192 (is_cp_operator, skip_op_false_positives, first_of)
8193 (explicit_location_lex_one_function): New function.
8194 (string_to_explicit_location): Replace 'dont_throw' parameter with
8195 an explicit_completion_info pointer parameter. Handle it. Don't
8196 use explicit_location_lex_one to lex function names. Use
8197 explicit_location_lex_one_function instead.
8198 * location.h (struct explicit_completion_info): New.
8199 (string_to_explicit_location): Replace 'dont_throw' parameter with
8200 an explicit_completion_info pointer parameter.
8201 * symtab.c (default_collect_symbol_completion_matches_break_on):
8202 Add complete_symbol_mode parameter. Handle LINESPEC mode.
8203 (default_collect_symbol_completion_matches)
8204 (collect_symbol_completion_matches): Add complete_symbol_mode
8206 (collect_symbol_completion_matches_type): Pass down
8207 complete_symbol_mode::EXPRESSION.
8208 (collect_file_symbol_completion_matches): Add complete_symbol_mode
8209 parameter. Handle LINESPEC mode.
8210 * symtab.h (complete_symbol_mode): New.
8211 (default_collect_symbol_completion_matches_break_on)
8212 (default_collect_symbol_completion_matches)
8213 (collect_symbol_completion_matches)
8214 (collect_file_symbol_completion_matches): Add complete_symbol_mode
8217 2017-07-17 Pedro Alves <palves@redhat.com>
8219 * utils.c (enum class strncmp_iw_mode): New.
8220 (strcmp_iw): Rename to ...
8221 (strncmp_iw_with_mode): ... this. Add string2_len and mode
8222 parameters. Handle them.
8224 (strcmp_iw): Reimplement as wrapper around strncmp_iw_with_mode.
8225 * utils.h (strncmp_iw): Declare.
8226 (strcmp_iw): Move describing comments here.
8228 2017-07-17 Pedro Alves <palves@redhat.com>
8230 * c-exp.y (operator_stoken): Use CP_OPERATOR_LEN and
8232 * c-typeprint.c (is_type_conversion_operator): Use
8234 * cp-support.c (LENGTH_OF_OPERATOR): Delete.
8235 (cp_find_first_component_aux): Use CP_OPERATOR_STR and
8237 * cp-support.h (CP_OPERATOR_STR, CP_OPERATOR_LEN): New.
8238 * gnu-v2-abi.c (gnuv2_is_operator_name): Use CP_OPERATOR_STR.
8239 * gnu-v3-abi.c (gnuv3_is_operator_name): Use CP_OPERATOR_STR.
8240 * linespec.c (linespec_lexer_lex_string): Use CP_OPERATOR_LEN and
8242 * location.c: Include "cp-support.h".
8243 (explicit_location_lex_one): Use CP_OPERATOR_LEN and
8245 * symtab.c (operator_chars): Use CP_OPERATOR_STR and
8248 2017-07-17 Pedro Alves <palves@redhat.com>
8250 * cli/cli-cmds.c (complete_command): Use a completion tracker
8251 along with completion_find_completion_word for handle_brkchars
8253 * completer.c (RL_QF_SINGLE_QUOTE, RL_QF_DOUBLE_QUOTE)
8254 (RL_QF_BACKSLASH, RL_QF_OTHER_QUOTE): New.
8255 (struct gdb_rl_completion_word_info): New.
8256 (gdb_rl_find_completion_word): New.
8257 (completion_find_completion_word): New.
8258 * completer.h (completion_find_completion_word): Declare.
8260 2017-07-17 Pedro Alves <palves@redhat.com>
8262 * ada-lang.c (symbol_completion_match): Adjust comments.
8263 (symbol_completion_add): Replace vector parameter with
8264 completion_tracker parameter. Use it.
8265 (ada_make_symbol_completion_list): Rename to...
8266 (ada_collect_symbol_completion_matches): ... this. Add
8267 completion_tracker parameter and use it.
8268 (ada_language_defn): Adjust.
8269 * break-catch-syscall.c (catch_syscall_completer): Adjust
8270 prototype and work with completion_tracker instead of VEC.
8271 * breakpoint.c (condition_completer): Adjust prototype and work
8272 with completion_tracker instead of VEC.
8273 * c-lang.c (c_language_defn, cplus_language_defn)
8274 (asm_language_defn, minimal_language_defn): Adjust to renames.
8275 * cli/cli-cmds.c (complete_command): Rework using
8276 completion_tracker. Catch exceptions when completing.
8277 * cli/cli-decode.c (integer_unlimited_completer)
8278 (complete_on_cmdlist, complete_on_enum): Adjust prototype and work
8279 with completion_tracker instead of VEC.
8280 * command.h (struct completion_tracker): Forward declare.
8281 (completer_ftype, completer_handle_brkchars_ftype): Change
8283 (complete_on_cmdlist, complete_on_enum): Adjust.
8284 * completer.c: Include <algorithm>.
8285 (struct gdb_completer_state): New.
8286 (current_completion): New global.
8287 (readline_line_completion_function): Delete.
8288 (noop_completer, filename_completer)
8289 (filename_completer_handle_brkchars, complete_files_symbols)
8290 (linespec_location_completer): Adjust to work with a
8291 completion_tracker instead of a VEC.
8292 (string_or_empty): New.
8293 (collect_explicit_location_matches): Adjust to work with a
8294 completion_tracker instead of a VEC.
8295 (explicit_location_completer): Rename to ...
8296 (complete_explicit_location): ... this and adjust to work with a
8297 completion_tracker instead of a VEC.
8298 (location_completer): Adjust to work with a completion_tracker
8300 (add_struct_fields): Adjust to work with a completion_list instead
8302 (expression_completer): Rename to ...
8303 (complete_expression): ... this and adjust to work with a
8304 completion_tracker instead of a VEC. Use complete_files_symbols.
8305 (expression_completer): Reimplement on top of complete_expression.
8306 (symbol_completer): Adjust to work with a completion_tracker
8308 (enum complete_line_internal_reason): Add describing comments.
8309 (complete_line_internal_normal_command): Adjust to work with a
8310 completion_tracker instead of a VEC.
8311 (complete_line_internal): Rename to ...
8312 (complete_line_internal_1): ... this and adjust to work with a
8313 completion_tracker instead of a VEC. Assert TEXT is NULL in the
8314 handle_brkchars phase.
8315 (new_completion_tracker): Delete.
8316 (complete_line_internal): Reimplement as TRY/CATCH wrapper around
8317 complete_line_internal_1.
8318 (free_completion_tracker): Delete.
8319 (INITIAL_COMPLETION_HTAB_SIZE): New.
8320 (completion_tracker::completion_tracker)
8321 (completion_tracker::~completion_tracker): New.
8322 (maybe_add_completion): Delete.
8323 (completion_tracker::maybe_add_completion)
8324 (completion_tracker::add_completion)
8325 (completion_tracker::add_completions): New.
8326 (throw_max_completions_reached_error): Delete.
8327 (complete_line): Adjust to work with a completion_tracker instead
8328 of a VEC. Don't create a completion_tracker_t or check for max
8330 (command_completer, command_completer_handle_brkchars)
8331 (signal_completer, reg_or_group_completer_1)
8332 (reg_or_group_completer, default_completer_handle_brkchars):
8333 Adjust to work with a completion_tracker.
8334 (gdb_completion_word_break_characters_throw): New.
8335 (gdb_completion_word_break_characters): Reimplement.
8336 (line_completion_function): Delete.
8337 (completion_tracker::recompute_lowest_common_denominator)
8338 (expand_preserving_ws)
8339 (completion_tracker::build_completion_result)
8340 (completion_result::completion_result)
8341 (completion_result::completion_result)
8342 (completion_result::~completion_result)
8343 (completion_result::completion_result)
8344 (completion_result::release_match_list, compare_cstrings)
8345 (completion_result::sort_match_list)
8346 (completion_result::reset_match_list)
8347 (gdb_rl_attempted_completion_function_throw)
8348 (gdb_rl_attempted_completion_function): New.
8349 * completer.h (completion_list, struct completion_result)
8350 (class completion_tracker): New.
8351 (complete_line): Add completion_tracker parameter.
8352 (readline_line_completion_function): Delete.
8353 (gdb_rl_attempted_completion_function): New.
8354 (noop_completer, filename_completer, expression_completer)
8355 (location_completer, symbol_completer, command_completer)
8356 (signal_completer, reg_or_group_completer): Update prototypes.
8357 (completion_tracker_t, new_completion_tracker)
8358 (make_cleanup_free_completion_tracker): Delete.
8359 (enum maybe_add_completion_enum): Delete.
8360 (maybe_add_completion): Delete.
8361 (throw_max_completions_reached_error): Delete.
8362 * corefile.c (complete_set_gnutarget): Adjust to work with a
8363 completion_tracker instead of a VEC.
8364 * cp-abi.c (cp_abi_completer): Adjust to work with a
8365 completion_tracker instead of a VEC.
8366 * d-lang.c (d_language_defn): Adjust.
8367 * disasm.c (disassembler_options_completer): Adjust to work with a
8368 completion_tracker instead of a VEC.
8369 * f-lang.c (f_make_symbol_completion_list): Rename to ...
8370 (f_collect_symbol_completion_matches): ... this. Adjust to work
8371 with a completion_tracker instead of a VEC.
8372 (f_language_defn): Adjust.
8373 * go-lang.c (go_language_defn): Adjust.
8374 * guile/scm-cmd.c (cmdscm_add_completion, cmdscm_completer):
8375 Adjust to work with a completion_tracker instead of a VEC.
8376 * infrun.c (handle_completer): Likewise.
8377 * interps.c (interpreter_completer): Likewise.
8378 * interps.h (interpreter_completer): Likewise.
8379 * language.c (unknown_language_defn, auto_language_defn)
8380 (local_language_defn): Adjust.
8381 * language.h (language_defn::la_make_symbol_completion_list):
8383 (language_defn::la_collect_symbol_completion_matches): ... this
8384 and adjust to work with a completion_tracker instead of a VEC.
8385 * m2-lang.c (m2_language_defn): Adjust.
8386 * objc-lang.c (objc_language_defn): Adjust.
8387 * opencl-lang.c (opencl_language_defn): Adjust.
8388 * p-lang.c (pascal_language_defn): Adjust.
8389 * python/py-cmd.c (cmdpy_completer_helper): Handle NULL word.
8390 (cmdpy_completer_handle_brkchars, cmdpy_completer): Adjust to work
8391 with a completion_tracker.
8392 * rust-lang.c (rust_language_defn): Adjust.
8393 * symtab.c (free_completion_list, do_free_completion_list)
8394 (return_val, completion_tracker): Delete.
8395 (completion_list_add_name, completion_list_add_symbol)
8396 (completion_list_add_msymbol, completion_list_objc_symbol)
8397 (completion_list_add_fields, add_symtab_completions): Add
8398 completion_tracker parameter and use it.
8399 (default_make_symbol_completion_list_break_on_1): Rename to...
8400 (default_collect_symbol_completion_matches_break_on): ... this.
8401 Add completion_tracker parameter and use it instead of allocating
8402 a completion tracker here.
8403 (default_make_symbol_completion_list_break_on): Delete old
8405 (default_make_symbol_completion_list): Delete.
8406 (default_collect_symbol_completion_matches): New.
8407 (make_symbol_completion_list): Delete.
8408 (collect_symbol_completion_matches): New.
8409 (make_symbol_completion_type): Rename to ...
8410 (collect_symbol_completion_matches_type): ... this. Add
8411 completion_tracker parameter and use it instead of VEC.
8412 (make_file_symbol_completion_list_1): Rename to...
8413 (collect_file_symbol_completion_matches): ... this. Add
8414 completion_tracker parameter and use it instead of VEC.
8415 (make_file_symbol_completion_list): Delete.
8416 (add_filename_to_list): Use completion_list instead of a VEC.
8417 (add_partial_filename_data::list): Now a completion_list.
8418 (make_source_files_completion_list): Work with a completion_list
8420 * symtab.h: Include "completer.h".
8421 (default_make_symbol_completion_list_break_on)
8422 (default_make_symbol_completion_list, make_symbol_completion_list)
8423 (make_symbol_completion_type, make_file_symbol_completion_list)
8424 (make_source_files_completion_list): Delete.
8425 (default_collect_symbol_completion_matches_break_on)
8426 (default_collect_symbol_completion_matches)
8427 (collect_symbol_completion_matches)
8428 (collect_symbol_completion_matches_type)
8429 (collect_file_symbol_completion_matches)
8430 (make_source_files_completion_list): New.
8431 * top.c (init_main): Don't install a rl_completion_entry_function
8432 hook. Install a rl_attempted_completion_function hook instead.
8433 * tui/tui-layout.c (layout_completer): Adjust to work with a
8435 * tui/tui-regs.c (tui_reggroup_completer):
8436 * tui/tui-win.c (window_name_completer, focus_completer)
8437 (winheight_completer): Adjust to work with a completion_tracker.
8438 * value.c: Include "completer.h".
8439 (complete_internalvar): Adjust to work with a completion_tracker.
8440 * value.h (complete_internalvar): Likewise.
8442 2017-07-17 Pedro Alves <palves@redhat.com>
8444 * cli/cli-decode.c (set_cmd_completer_handle_brkchars): Adjust to
8446 * cli/cli-decode.h (struct cmd_list_element) <completer>: Move
8447 comments to completer_ftype's declaration.
8448 <completer_handle_brkchars>: Change type to
8449 completer_handle_brkchars_ftype.
8450 * command.h (completer_ftype): Add describing comment and give
8451 names to parameters.
8452 (completer_ftype_void): Rename to ...
8453 (completer_handle_brkchars_ftype) ... this. Add describing comment.
8454 (set_cmd_completer_handle_brkchars): Adjust.
8455 * completer.c (filename_completer_handle_brkchars): New function.
8456 (complete_line_internal_normal_command): New function, factored
8458 (complete_line_internal): ... here.
8459 (command_completer_handle_brkchars)
8460 (default_completer_handle_brkchars)
8461 (completer_handle_brkchars_func_for_completer): New functions.
8462 * completer.h (set_gdb_completion_word_break_characters): Delete
8464 (completer_handle_brkchars_func_for_completer): New declaration.
8465 * python/py-cmd.c (cmdpy_completer_handle_brkchars): Adjust to use
8466 completer_handle_brkchars_func_for_completer.
8468 2017-07-17 Pedro Alves <palves@redhat.com>
8470 * completer.c (symbol_completer): New function, based on
8471 make_symbol_completion_list_fn.
8472 * completer.h (symbol_completer): New declaration.
8473 * guile/scm-cmd.c (cmdscm_completers): Adjust.
8474 * python/py-cmd.c (completers): Adjust.
8475 * symtab.c (make_symbol_completion_list_fn): Delete.
8476 * symtab.h (make_symbol_completion_list_fn): Delete.
8477 * cli/cli-decode.c (add_cmd): Adjust.
8479 2017-07-17 Pedro Alves <palves@redhat.com>
8481 * Makefile.in (COMMON_OBS): Add filename-seen-cache.o.
8482 * dwarf2read.c: Include "filename-seen-cache.h".
8483 * dwarf2read.c (dwarf2_per_objfile) <filenames_cache>: New field.
8484 (dw2_map_symbol_filenames): Build and use a filenames_seen_cache.
8485 * filename-seen-cache.c: New file.
8486 * filename-seen-cache.h: New file.
8487 * symtab.c: Include "filename-seen-cache.h".
8488 (struct filename_seen_cache, INITIAL_FILENAME_SEEN_CACHE_SIZE)
8489 (create_filename_seen_cache, clear_filename_seen_cache)
8490 (delete_filename_seen_cache, filename_seen): Delete, parts moved
8491 to filename-seen-cache.h/filename-seen-cache.c.
8492 (output_source_filename, sources_info)
8493 (maybe_add_partial_symtab_filename)
8494 (make_source_files_completion_list): Adjust to use
8495 filename_seen_cache.
8497 2017-07-17 Pedro Alves <palves@redhat.com>
8499 * dwarf2read.c (dwarf2_per_objfile): In-class initialize all
8501 (dwarf2_per_objfile::dwarf2_per_objfile(objfile*, const
8502 dwarf2_debug_sections*)): New.
8503 (dwarf2_per_objfile::dwarf2_per_objfile(const
8504 dwarf2_per_objfile&)): Declare as deleted.
8505 (dwarf2_per_objfile::operator=): Declare as deleted.
8506 (dwarf2_per_objfile::dwarf2_per_objfile)
8507 (dwarf2_per_objfile::~dwarf2_per_objfile)
8508 (dwarf2_per_objfile::free_cached_comp_units): New.
8509 (dwarf2_has_info): dwarf2_per_objfile initialization code moved to
8510 ctor. Call dwarf2_per_objfile's ctor manually.
8511 (dwarf2_locate_sections): Deleted/refactored as ...
8512 (dwarf2_per_objfile::locate_sections): ... this new method.
8513 (free_cached_comp_units): Defer to
8514 dwarf2_per_objfile::free_cached_comp_units.
8515 (dwarf2_free_objfile): Call dwarf2_per_objfile's dtor manually.
8517 2017-07-14 Tom Tromey <tom@tromey.com>
8520 * rust-exp.y (convert_ast_to_expression): Add "want_type"
8522 <UNOP_SIZEOF>: Split into separate case.
8523 <UNOP_VAR_VALUE>: Handle want_type. Add error case.
8525 2017-07-14 Tom Tromey <tom@tromey.com>
8528 * symtab.c (symbol_matches_domain): Add language_rust to special
8530 * rust-exp.y (convert_ast_to_expression) <OP_VAR_VALUE>: Don't
8531 treat LOC_TYPEDEF symbols as variables.
8533 2017-07-14 Pedro Alves <palves@redhat.com>
8535 * symtab.c (make_file_symbol_completion_list_1): Iterate over
8536 symtabs matching all symtabs with SRCFILE as file name instead of
8537 only considering the first hit, with lookup_symtab.
8539 2017-07-14 Simon Marchi <simon.marchi@ericsson.com>
8541 * ax-gdb.c (gen_aggregate_elt_ref): Remove operand_name and
8542 operator_name parameters.
8543 (gen_expr): Update function call.
8545 2017-07-14 Simon Marchi <simon.marchi@ericsson.com>
8547 * dwarf2loc.h (dwarf2_compile_expr_to_ax): Remove gdbarch
8549 * symtab.h (struct symbol_computed_ops::tracepoint_var_ref):
8551 * dwarf2loc.c (dwarf2_compile_expr_to_ax): Remove gdbarch
8552 parameter, use agent_expr::gdbarch instead, update function
8554 (locexpr_tracepoint_var_ref): Likewise.
8555 (loclist_tracepoint_var_ref): Likewise.
8556 * ax-gdb.c (gen_trace_static_fields): Likewise.
8557 (gen_traced_pop): Likewise.
8558 (gen_frame_args_address): Likewise.
8559 (gen_frame_locals_address): Likewise.
8560 (gen_var_ref): Likewise.
8561 (gen_struct_ref_recursive): Likewise.
8562 (gen_static_field): Likewise.
8563 (gen_maybe_namespace_elt): Likewise.
8564 (gen_expr): Likewise.
8565 (gen_trace_for_var): Likewise.
8566 (gen_trace_for_expr): Likewise.
8567 (gen_trace_for_return_address): Likewise.
8569 2017-07-14 Simon Marchi <simon.marchi@ericsson.com>
8571 * ax-gdb.c (gen_deref, gen_address_of): Remove unused ax
8573 (gen_struct_ref, gen_expr, gen_expr_binop_rest): Update call.
8575 2017-07-14 Simon Marchi <simon.marchi@ericsson.com>
8577 * ax-gdb.c (gen_usual_unary): Remove exp parameter, get gdbarch
8578 from ax, update calls.
8579 (gen_usual_arithmetic): Likewise.
8580 (gen_integral_promotions): Likewise.
8581 (gen_bitfield_ref): Likewise.
8582 (gen_primitive_field): Likewise.
8583 (gen_struct_ref_recursive): Likewise.
8584 (gen_struct_ref): Likewise.
8585 (gen_maybe_namespace_elt): Likewise.
8586 (gen_struct_elt_for_reference): Likewise.
8587 (gen_namespace_elt): Likewise.
8588 (gen_aggregate_elt_ref): Likewise.
8589 (gen_expr): Get gdbarch from ax, update calls.
8590 (gen_expr_binop_rest): Likewise.
8592 2017-07-13 Pedro Alves <palves@redhat.com>
8594 * amd64-darwin-tdep.c (x86_darwin_init_abi_64): Pass tdesc_amd64
8596 * amd64-dicos-tdep.c (amd64_dicos_init_abi):
8597 * amd64-fbsd-tdep.c (amd64fbsd_init_abi):
8598 * amd64-linux-tdep.c (amd64_linux_init_abi): Pass
8599 tdesc_amd64_linux as default tdesc. Get final tdesc from the
8601 (amd64_x32_linux_init_abi): Pass tdesc_x32_linux as default tdesc.
8602 Get final tdesc from the tdep.
8603 * amd64-nbsd-tdep.c (amd64nbsd_init_abi): Pass tdesc_amd64 as
8605 * amd64-obsd-tdep.c (amd64obsd_init_abi): Likewise.
8606 * amd64-sol2-tdep.c (amd64_sol2_init_abi): Likewise.
8607 * amd64-tdep.c (amd64_init_abi): Add 'default_tdesc' parameter.
8608 Use it as default tdesc.
8609 (amd64_x32_init_abi): Add 'default_tdesc' parameter, and pass it
8610 down to amd_init_abi. No longer handle fallback tdesc here.
8611 * amd64-tdep.h (tdesc_x32): Declare.
8612 (amd64_init_abi, amd64_x32_init_abi): Add 'default_tdesc'
8614 * amd64-windows-tdep.c (amd64_windows_init_abi): Pass tdesc_amd64
8617 2017-07-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
8619 * s390-linux-tdep.c (s390_process_record): Add support for
8620 instructions new in arch12.
8622 2017-07-11 John Baldwin <jhb@FreeBSD.org>
8624 * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers): Use
8625 PT_GETFSBASE and PT_GETGSBASE.
8626 (amd64bsd_store_inferior_registers): Use PT_SETFSBASE and
8629 2017-07-11 John Baldwin <jhb@FreeBSD.org>
8631 * features/Makefile (amd64.dat, amd64-avx.dat, amd64-mpx.dat)
8632 (amd64-avx-mpx.dat, amd64-avx-avx512.dat)
8633 (amd64-avx-mpx-avx512-pku.dat): Add i386/64bit-segments.xml in
8635 * features/i386/amd64-avx-avx512.xml: Add 64bit-segments.xml.
8636 * features/i386/amd64-avx-mpx-avx512-pku.xml: Add 64bit-segments.xml.
8637 * features/i386/amd64-avx-mpx.xml: Add 64bit-segments.xml.
8638 * features/i386/amd64-avx.xml: Add 64bit-segments.xml.
8639 * features/i386/amd64-mpx.xml: Add 64bit-segments.xml.
8640 * features/i386/amd64.xml: Add 64bit-segments.xml.
8641 * features/i386/amd64-avx-avx512.c: Regenerated.
8642 * features/i386/amd64-avx-mpx-avx512-pku.c: Regenerated.
8643 * features/i386/amd64-avx-mpx.c: Regenerated.
8644 * features/i386/amd64-avx.c: Regenerated.
8645 * features/i386/amd64-mpx.c: Regenerated.
8646 * features/i386/amd64.c: Regenerated.
8647 * regformats/i386/amd64-avx-avx512.dat: Regenerated.
8648 * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Regenerated.
8649 * regformats/i386/amd64-avx-mpx.dat: Regenerated.
8650 * regformats/i386/amd64-avx.dat: Regenerated.
8651 * regformats/i386/amd64-mpx.dat: Regenerated.
8652 * regformats/i386/amd64.dat: Regenerated.
8654 2017-07-10 Yao Qi <yao.qi@linaro.org>
8656 * features/i386/amd64-avx-avx512-linux.c: Re-generated.
8657 * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Re-generated.
8659 2017-07-10 Anton Kolesov <Anton.Kolesov@synopsys.com>
8661 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add setenv and
8663 * gnulib/aclocal.m4: Regenerate.
8664 * gnulib/config.in: Regenerate.
8665 * gnulib/configure: Regenerate.
8666 * gnulib/import/Makefile.am: Regenerate.
8667 * gnulib/import/Makefile.in: Regenerate.
8668 * gnulib/import/m4/gnulib-cache.m4: Regenerate.
8669 * gnulib/import/m4/gnulib-comp.m4: Regenerate.
8670 * gnulib/import/m4/environ.m4: New file.
8671 * gnulib/import/m4/setenv.m4: New file.
8672 * gnulib/import/setenv.c: New file.
8673 * gnulib/import/unsetenv.c: New file.
8675 2017-07-09 Simon Marchi <simon.marchi@ericsson.com>
8677 * compile/compile-loc2c.c (do_compile_dwarf_expr_to_c): Read
8678 address when op is DW_OP_addr.
8680 2017-07-09 Tom Tromey <tom@tromey.com>
8682 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Reverse size
8683 check and apply to outer type.
8685 2017-07-07 John Baldwin <jhb@FreeBSD.org>
8687 * fbsd-tdep.c (LWPINFO_OFFSET, LWPINFO_PL_FLAGS)
8688 (LWPINFO64_PL_SIGINFO, LWPINFO32_PL_SIGINFO, PL_FLAG_SI)
8689 (SIZE64_SIGINFO_T, SIZE32_SIGINFO_T, fbsd_core_xfer_siginfo): New.
8690 (fbsd_init_abi): Install gdbarch "core_xfer_siginfo" method.
8692 2017-07-07 John Baldwin <jhb@FreeBSD.org>
8694 * fbsd-tdep.c (fbsd_core_thread_name): Use thread_section_name.
8696 2017-07-07 John Baldwin <jhb@FreeBSD.org>
8698 * corelow.c (get_core_siginfo): Remove.
8699 (core_xfer_partial): Use the gdbarch "core_xfer_siginfo" method
8700 instead of get_core_siginfo.
8701 * gdbarch.sh (core_xfer_siginfo): New gdbarch callback.
8702 * gdbarch.h: Re-generate.
8703 * gdbarch.c: Re-generate.
8704 * linux-tdep.c (linux_core_xfer_siginfo): New.
8705 (linux_init_abi): Install gdbarch "core_xfer_siginfo" method.
8707 2017-07-07 John Baldwin <jhb@FreeBSD.org>
8709 * corelow.c (thread_section_name): Move to ...
8710 * gdbcore.h (thread_section_name): ... here.
8712 2017-07-07 John Baldwin <jhb@FreeBSD.org>
8714 * fbsd-nat.c [PT_LWPINFO && __LP64__] (union sigval32)
8715 (struct siginfo32): New.
8716 [PT_LWPINFO] (fbsd_siginfo_size, fbsd_convert_siginfo): New.
8717 (fbsd_xfer_partial) [PT_LWPINFO]: Handle TARGET_OBJECT_SIGNAL_INFO
8718 via ptrace(PT_LWPINFO).
8720 2017-07-07 John Baldwin <jhb@FreeBSD.org>
8722 * fbsd-tdep.c (fbsd_gdbarch_data_handle, struct fbsd_gdbarch_data)
8723 (init_fbsd_gdbarch_data, get_fbsd_gdbarch_data)
8724 (fbsd_get_siginfo_type): New.
8725 (fbsd_init_abi): Install gdbarch "get_siginfo_type" method.
8726 (_initialize_fbsd_tdep): New.
8728 2017-07-06 David Blaikie <dblaikie@gmail.com>
8730 * dwarf2read.c (struct dwo_file): Use a htab of dwo_unit* (rather than
8731 a singular dwo_unit*) to support multiple CUs in the same way that
8732 multiple TUs are supported.
8733 (create_cus_hash_table): Replace create_dwo_cu with a function for
8734 parsing multiple CUs from a DWO file.
8735 (open_and_init_dwo_file): Use create_cus_hash_table rather than
8737 (lookup_dwo_cutu): Lookup CU in the hash table in the dwo_file with
8738 htab_find, rather than comparing the signature to a singleton CU in
8741 2017-07-06 Pedro Alves <palves@redhat.com>
8743 * python/py-unwind.c (pyuw_dealloc_cache): Fix for loop condition.
8745 2017-07-04 Pedro Alves <palves@redhat.com>
8747 * gdbtypes.c (recursive_dump_type): Don't reference TYPE_STATIC.
8748 * gdbtypes.h (TYPE_STATIC): Delete.
8749 (struct fn_field) <is_public, is_abstract, is_static, is_final,
8750 is_synchronized, is_native>: Delete.
8752 (TYPE_FN_FIELD_PUBLIC, TYPE_FN_FIELD_STATIC, TYPE_FN_FIELD_FINAL)
8753 (TYPE_FN_FIELD_SYNCHRONIZED, TYPE_FN_FIELD_NATIVE)
8754 (TYPE_FN_FIELD_ABSTRACT): Delete.
8756 2017-07-03 Simon Marchi <simon.marchi@ericsson.com>
8758 * buffer.h (buffer_finish): Fix spelling mistakes.
8760 2017-07-01 Eli Zaretskii <eliz@gnu.org>
8762 * .dir-locals.el: Automatically switch to C-style comments in
8763 versions of Emacs that support the feature.
8765 2017-06-30 Sergio Durigan Junior <sergiodj@redhat.com>
8766 Pedro Alves <palves@redhat.com>
8769 * cli/cli-script.c (command_name_equals_not_inline): Remove function.
8770 (process_next_line): New variable 'inline_cmd'.
8771 Adjust 'if' clauses for "python", "compile" and "guile" to use
8772 'command_name_equals' and check for '!inline_cmd'.
8774 2017-06-30 Sergio Durigan Junior <sergiodj@redhat.com>
8777 * cli/cli-script.c (command_name_equals_not_inline): New function.
8778 (process_next_line): Adjust 'if' clauses for "python", "compile"
8779 and "guile" to use command_name_equals_not_inline.
8781 2017-06-29 Pedro Alves <palves@redhat.com>
8783 * completer.c (expression_completer): Call
8784 linespec_location_completer instead of location_completer.
8786 2017-06-29 Pedro Alves <palves@redhat.com>
8788 * completer.c (expression_completer): Remove code that recomputes
8791 2017-06-29 Yao Qi <yao.qi@linaro.org>
8793 * regformats/regdat.sh: Generate code with
8794 "ifndef IN_PROCESS_AGENT".
8796 2017-06-28 Pedro Alves <palves@redhat.com>
8798 * command.h: Include "common/scoped_restore.h".
8800 2017-06-28 Yao Qi <yao.qi@linaro.org>
8802 * mi/mi-cmd-break.c (mi_argv_to_format): Use obstack_grow_str
8803 instead of obstack_grow.
8805 2017-06-28 Doug Gilmore <Doug.Gilmore@imgtec.com>
8808 * symfile.c (reread_symbols): Call objfiles_changed just before
8811 2017-06-27 Pedro Alves <palves@redhat.com>
8813 * symtab.c (COMPLETION_LIST_ADD_SYMBOL)
8814 (MCOMPLETION_LIST_ADD_SYMBOL): Delete macros, replace with ...
8815 (completion_list_add_symbol, completion_list_add_msymbol):
8816 ... these new functions.
8817 (add_symtab_completions)
8818 (default_make_symbol_completion_list_break_on_1): Adjust.
8820 2017-06-27 Pedro Alves <palves@redhat.com>
8822 * objfiles.c (get_objfile_bfd_data): Call bfd_alloc instead of
8823 bfd_zalloc. Call objfile_per_bfd_storage's ctor.
8824 (free_objfile_per_bfd_storage): Call objfile_per_bfd_storage's
8826 * objfiles.h (objfile_per_bfd_storage): Add ctor. Make
8827 'storage_obstack' field an auto_obstack. In-class initialize all
8828 non-bitfield fields. Make minsyms_read bool.
8829 * symfile.c (read_symbols): Adjust.
8831 2017-06-27 Alan Hayward <alan.hayward@arm.com>
8833 * remote-sim.c (gdbsim_fetch_register): Use byte_vector.
8834 (gdbsim_store_register): Likewise.
8836 2017-06-27 Pedro Alves <palves@redhat.com>
8838 * c-exp.y (name_obstack): Now an auto_obstack.
8839 (yylex): Use auto_obstack::clear.
8840 (c_parse): Use auto_obstack::clear instead of reinitializing and
8841 freeing the obstack.
8842 * c-lang.c (evaluate_subexp_c): Use auto_obstack.
8843 * d-exp.y (name_obstack): Now an auto_obstack.
8844 (yylex): Use auto_obstack::clear.
8845 (d_parse): Use auto_obstack::clear instead of reinitializing and
8846 freeing the obstack.
8847 * dwarf2loc.c (fetch_const_value_from_synthetic_pointer): Use
8849 * dwarf2read.c (create_addrmap_from_index)
8850 (dwarf2_build_psymtabs_hard)
8851 (update_enumeration_type_from_children): Likewise.
8852 * gdb_obstack.h (auto_obstack): New type.
8853 * go-exp.y (name_obstack): Now an auto_obstack.
8854 (build_packaged_name): Use auto_obstack::clear.
8855 (go_parse): Use auto_obstack::clear instead of reinitializing and
8856 freeing the obstack.
8857 * linux-tdep.c (linux_make_mappings_corefile_notes): Use
8859 * printcmd.c (printf_wide_c_string, ui_printf): Use auto_obstack.
8860 * rust-exp.y (work_obstack): Now an auto_obstack.
8861 (rust_parse, rust_lex_tests): Use auto_obstack::clear instead of
8862 reinitializing and freeing the obstack.
8863 * utils.c (do_obstack_free, make_cleanup_obstack_free): Delete.
8864 (host_char_to_target): Use auto_obstack.
8865 * utils.h (make_cleanup_obstack_free): Delete declaration.
8866 * valprint.c (generic_emit_char, generic_printstr): Use
8869 2017-06-27 Simon Marchi <simon.marchi@ericsson.com>
8871 * darwin-nat.c (darwin_check_new_threads): Don't handle dummy
8873 (darwin_init_thread_list): Don't update dummy thread.
8874 (darwin_create_inferior, darwin_attach): Don't add a dummy thread.
8876 2017-06-26 Simon Marchi <simon.marchi@ericsson.com>
8878 * record-full.c (netorder16): Remove.
8880 2017-06-26 Simon Marchi <simon.marchi@ericsson.com>
8882 * common/diagnostics.h: Define macros for GCC.
8883 (DIAGNOSTIC_IGNORE_UNUSED_FUNCTION): New macro.
8884 * common/vec.h: Include diagnostics.h.
8885 (DIAGNOSTIC_IGNORE_UNUSED_VEC_FUNCTION): New macro.
8886 (DEF_VEC_I, DEF_VEC_P, DEF_VEC_O): Ignore -Wunused-function
8889 2017-06-26 Simon Marchi <simon.marchi@ericsson.com>
8891 * common/diagnostics.h (DIAGNOSTIC_IGNORE_DEPRECATED_REGISTER):
8893 * ada-lex.l: Ignore deprecated register warnings.
8895 2017-06-25 Simon Marchi <simon.marchi@ericsson.com>
8897 * main.c (get_init_files): Replace "SYSTEM_GDBINIT +
8898 datadir_len" with "&SYSTEM_GDBINIT[datadir_len]".
8900 2017-06-25 Simon Marchi <simon.marchi@ericsson.com>
8902 * dtrace-probe.c (dtrace_process_dof_probe): Put semi-colon on
8905 2017-06-25 Simon Marchi <simon.marchi@ericsson.com>
8907 * nat/x86-dregs.c (x86_show_dr): Print registers one per line.
8909 2017-06-23 Alan Hayward <alan.hayward@arm.com>
8911 * xtensa-tdep.c (XTENSA_MAX_REGISTER_SIZE): Add.
8912 (xtensa_register_write_masked): Use XTENSA_MAX_REGISTER_SIZE.
8913 (xtensa_register_read_masked): Likewise.
8915 2017-06-22 Sergio Durigan Junior <sergiodj@redhat.com>
8917 * common/environ.c (gdb_environ::unset): Update comment.
8919 2017-06-22 Alan Hayward <alan.hayward@arm.com>
8921 * python/py-unwind.c (pyuw_sniffer): Allocate space for
8924 2017-06-22 Alan Hayward <alan.hayward@arm.com>
8926 * record-full.c (record_full_exec_insn): Use byte_vector.
8928 2017-06-22 Yao Qi <yao.qi@linaro.org>
8930 * regformats/i386/amd64-avx-mpx-avx512-pku-linux.dat: Regenerated.
8931 * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Regenerated.
8933 2017-06-22 Alan Hayward <alan.hayward@arm.com>
8935 * remote.c (cached_reg): Move from here...
8936 * regcache.h (cached_reg): ...to here.
8937 * python/py-unwind.c (struct reg_info): Remove.
8938 (cached_frame_info): Use cached_reg_t.
8939 (pyuw_prev_register): Likewise.
8940 (pyuw_sniffer): Use cached_reg_t and allocate registers.
8941 (pyuw_dealloc_cache): Free all registers.
8943 2017-06-22 Pedro Alves <palves@redhat.com>
8944 Simon Marchi <simon.marchi@ericsson.com>
8946 * unittests/environ-selftests.c (run_tests): Ignore -Wself-move
8948 * common/diagnostics.h: New file.
8950 2017-06-22 Pedro Alves <palves@redhat.com>
8952 * common/agent.h: Add include guards.
8954 2017-06-21 Simon Marchi <simon.marchi@ericsson.com>
8956 * target.h (struct target_ops) <to_xfer_partial>: Update doc to
8957 talk about addressable units instead of bytes.
8959 2017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
8961 * common/environ.c (gdb_environ::unset): Use '::iterator' instead
8962 of '::const_iterator'.
8964 2017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
8966 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
8967 'unittests/environ-selftests.c'.
8968 (SUBDIR_UNITTESTS_OBS): Add 'environ-selftests.o'.
8969 * charset.c (find_charset_names): Declare object 'iconv_env'.
8970 Update code to use 'iconv_env' object. Remove call to
8972 * common/environ.c: Include <utility>.
8973 (make_environ): Delete function.
8974 (free_environ): Delete function.
8975 (gdb_environ::clear): New function.
8976 (gdb_environ::operator=): New function.
8977 (gdb_environ::get): Likewise.
8978 (environ_vector): Delete function.
8979 (set_in_environ): Delete function.
8980 (gdb_environ::set): New function.
8981 (unset_in_environ): Delete function.
8982 (gdb_environ::unset): New function.
8983 (gdb_environ::envp): Likewise.
8984 * common/environ.h: Include <vector>.
8985 (struct gdb_environ): Delete; transform into...
8986 (class gdb_environ): ... this class.
8987 (free_environ): Delete prototype.
8988 (init_environ, get_in_environ, set_in_environ, unset_in_environ,
8989 environ_vector): Likewise.
8990 * infcmd.c (run_command_1): Update code to call
8991 'envp' from 'gdb_environ' class.
8992 (environment_info): Update code to call methods from 'gdb_environ'
8994 (unset_environment_command): Likewise.
8995 (path_info): Likewise.
8996 (path_command): Likewise.
8997 * inferior.c (inferior::~inferior): Delete call to 'free_environ'.
8998 (inferior::inferior): Initialize 'environment' using the host's
9000 * inferior.h: Remove forward declaration of 'struct gdb_environ'.
9001 Include "environ.h".
9002 (class inferior) <environment>: Change type from 'struct
9003 gdb_environ' to 'gdb_environ'.
9004 * mi/mi-cmd-env.c (mi_cmd_env_path): Update code to call
9005 methods from 'gdb_environ' class.
9006 * solib.c (solib_find_1): Likewise
9007 * unittests/environ-selftests.c: New file.
9009 2017-06-20 Yao Qi <yao.qi@linaro.org>
9011 * features/i386/i386-linux.xml: Exchange the order of including
9012 32bit-linux.xml and 32bit-sse.xml.
9013 * features/i386/i386-linux.c: Regenerated.
9015 2017-06-20 Yao Qi <yao.qi@linaro.org>
9017 * target-descriptions.c (tdesc_reg): Add ctor, dtor.
9018 Delete copy ctor and assignment operator.
9019 (tdesc_type): Likewise.
9020 (tdesc_feature): Likewise.
9021 (tdesc_free_reg): Remove.
9022 (tdesc_create_reg): Use new.
9023 (tdesc_free_type): Remove.
9024 (tdesc_create_vector): Use new.
9025 (tdesc_create_union): Likewise.
9026 (tdesc_create_flags): Likewise.
9027 (tdesc_create_enum): Likewise.
9028 (tdesc_free_feature): Delete.
9029 (free_target_description): Use delete.
9031 2017-06-19 John Baldwin <jhb@FreeBSD.org>
9033 * mips-tdep.c (print_gp_register_row): Don't error for unavailable
9036 2017-06-19 Pedro Alves <palves@redhat.com>
9038 * dwarf2read.c (write_psymtabs_to_index): Construct file_closer
9039 after gdb::unlinker.
9041 2017-06-19 Sergio Durigan Junior <sergiodj@redhat.com>
9043 * mi/mi-cm-env.c (_initialize_mi_cmd_env): Use getenv instead of
9044 gdb_environ to access an environment variable.
9046 2017-06-18 Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
9048 * nat/linux-ptrace.c (linux_fork_to_function): Add cast to
9051 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
9053 * nat/fork-inferior.h (trace_start_error): Add ATTRIBUTE_PRINTF.
9055 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
9057 * configure: Re-generate.
9058 * warning.m4 (build_warnings): Add -Wno-mismatched-tags.
9060 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
9062 * configure: Re-generate.
9063 * warning.m4: Pass -Werror to compiler when checking for
9064 supported warning flags.
9066 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
9068 * Makefile.in (COMPILE.pre): Add "-x c++".
9070 2017-06-16 Alan Hayward <alan.hayward@arm.com>
9071 Pedro Alves <palves@redhat.com>
9072 Yao Qi <yao.qi@linaro.org>
9074 * defs.h (RequireLongest): New.
9075 (extract_integer): Declare function template.
9076 (extract_signed_integer): Remove the declaration, but define it
9078 (extract_unsigned_integer): Likewise.
9079 (store_integer): Declare function template.
9080 (store_signed_integer): Remove the declaration, but define it
9082 (store_unsigned_integer): Likewise.
9083 * findvar.c (extract_integer): New function template.
9084 (extract_signed_integer): Remove.
9085 (extract_unsigned_integer): Remove.
9086 (extract_integer<LONGEST>, extract_integer<ULONGEST>): Explicit
9088 (store_integer): New function template.
9089 (store_signed_integer): Remove.
9090 (store_unsigned_integer): Remove.
9091 (store_integer): Explicit instantiations.
9092 * regcache.c (regcache_raw_read_signed): Update.
9093 (regcache::raw_read): New function.
9094 (regcache::raw_read_signed): Remove.
9095 (regcache::raw_read_unsigned): Remove.
9096 (regcache_raw_read_unsigned): Update.
9097 (regcache_raw_write_unsigned): Update.
9098 (regcache::raw_write_signed): Remove.
9099 (regcache::raw_write): New function.
9100 (regcache_cooked_read_signed): Update.
9101 (regcache::raw_write_unsigned): Remove.
9102 (regcache::cooked_read_signed): Remove.
9103 (regcache_cooked_read_unsigned): Update.
9104 (regcache::cooked_read_unsigned): Remove.
9105 (regcache_cooked_write_signed): Update.
9106 (regcache_cooked_write_unsigned): Update.
9107 * regcache.h (regcache) <raw_read_signed>: Remove.
9108 <raw_write_signed, raw_read_unsigned, raw_write_unsigned>: Remove.
9109 <raw_read, raw_write>: New.
9110 <cooked_read_signed, cooked_write_signed>: Remove.
9111 <cooked_write_unsigned, cooked_read_unsigned>: Remove.
9112 <cooked_read, cooked_write>: New.
9113 * sh64-tdep.c (sh64_pseudo_register_read): Update.
9114 (sh64_pseudo_register_write): Update.
9116 2017-06-16 Anton Kolesov <anton.kolesov@synopsys.com>
9118 * arc-tdep.c (arc_disassembler_options): New variable.
9119 (arc_gdbarch_init): Set and use it. Use arc_delayed_print_insn instead
9120 of default_print_insn.
9121 (arc_delayed_print_insn): Set info->section when needed,
9122 use default_print_insn to retrieve a disassembler.
9124 2017-06-14 Sergio Durigan Junior <sergiodj@redhat.com>
9127 * infcmd.c (_initialize_infcmd): Expand "help run" documentation
9128 to mention $SHELL and startup-with-shell.
9130 2017-06-14 Max Filippov <jcmvbkbc@gmail.com>
9132 * MAINTAINERS: Move Maxim Grigoriev to the Past Maintainers.
9134 2017-06-14 Yao Qi <yao.qi@linaro.org>
9136 * aarch64-tdep.c (aarch64_gdb_print_insn): Call
9137 default_print_insn instead of print_insn_aarch64.
9138 * arm-tdep.c (gdb_print_insn_arm): Call
9139 default_print_insn instead of print_insn_big_arm
9140 and print_insn_little_arm.
9141 * i386-tdep.c (i386_print_insn): Call default_print_insn
9142 instead of print_insn_i386.
9143 * ia64-tdep.c (ia64_print_insn): Call
9144 default_print_insn instead of print_insn_ia64.
9145 * mips-tdep.c (gdb_print_insn_mips): Call
9146 default_print_insn instead of print_insn_big_mips
9147 and print_insn_little_mips.
9148 * spu-tdep.c (gdb_print_insn_spu): Call default_print_insn
9149 instead of print_insn_spu.
9151 2017-06-14 Pedro Alves <palves@redhat.com>
9153 * ada-lang.c: Include "common/byte-vector.h".
9154 (ada_value_primitive_packed_val): Use gdb::byte_vector.
9155 * charset.c (wchar_iterator::iterate): Resize the vector instead
9157 * common/byte-vector.h: Include "common/def-vector.h".
9158 (wchar_iterator::m_out): Now a gdb::def_vector<gdb_wchar_t>.
9159 * cli/cli-dump.c: Include "common/byte-vector.h".
9160 (dump_memory_to_file, restore_binary_file): Use gdb::byte_vector.
9161 * common/byte-vector.h: New file.
9162 * common/def-vector.h: New file.
9163 * common/default-init-alloc.h: New file.
9164 * dwarf2loc.c: Include "common/byte-vector.h".
9165 (rw_pieced_value): Use gdb::byte_vector, and resize the vector
9166 instead of reserving it.
9167 * dwarf2read.c: Include "common/byte-vector.h".
9168 (data_buf::m_vec): Now a gdb::byte_vector.
9169 * gdb_regex.c: Include "common/def-vector.h".
9170 (compiled_regex::compiled_regex): Use gdb::def_vector<char>.
9171 * mi/mi-main.c: Include "common/byte-vector.h".
9172 (mi_cmd_data_read_memory): Use gdb::byte_vector.
9173 * printcmd.c: Include "common/byte-vector.h".
9174 (print_scalar_formatted): Use gdb::byte_vector.
9175 * valprint.c: Include "common/byte-vector.h".
9176 (maybe_negate_by_bytes, print_decimal_chars): Use
9179 2017-06-13 Simon Marchi <simon.marchi@ericsson.com>
9181 * darwin-nat.c: Include "nat/fork-inferior.h".
9183 2017-06-13 Simon Marchi <simon.marchi@ericsson.com>
9185 * configure.nat: Factor out Darwin bits that are not
9186 architecture-specific. Add fork-inferior.o.
9188 2017-06-13 Simon Marchi <simon.marchi@ericsson.com>
9190 * configure.nat: Factor out AIX bits that are not
9191 architecture-specific. Add fork-inferior.o.
9193 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
9195 * dwarf2loc.c (rw_pieced_value): New. Merge logic from...
9196 (read_pieced_value, write_pieced_value): ...here. Reduce to
9197 wrappers that just call rw_pieced_value.
9199 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
9201 * dwarf2loc.c (write_pieced_value): When writing the data for a
9202 memory piece, use write_memory_with_notification instead of
9205 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
9207 * valops.c (read_value_memory): Change embedded_offset to
9208 represent a bit offset instead of a byte offset.
9209 * value.h (read_value_memory): Adjust comment.
9211 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
9213 * dwarf2loc.c (read_pieced_value): Remove unnecessary variables
9214 dest_offset_bits and source_offset_bits.
9215 (write_pieced_value): Likewise.
9217 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
9219 * dwarf2loc.c (read_pieced_value): Respect the piece offset, as
9220 given by DW_OP_bit_piece.
9221 (write_pieced_value): Likewise.
9223 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
9225 * dwarf2loc.c (read_pieced_value): Move the buffer allocation and
9226 some other preparations to the places where sufficient information
9228 (write_pieced_value): Likewise.
9230 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
9232 * dwarf2loc.c (bits_to_bytes): New function.
9233 (read_pieced_value): Fix offset calculations for register pieces
9234 on big-endian targets.
9235 (write_pieced_value): Likewise.
9237 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
9239 * dwarf2loc.c (read_pieced_value): Remove buffer_size variable.
9240 (write_pieced_value): Likewise.
9242 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
9244 * dwarf2loc.c (write_pieced_value): When writing to a bit-field,
9245 transfer the source value's least significant bits, instead of its
9246 lowest-addressed ones. Rename type_len to max_offset.
9247 (read_pieced_value): Mirror above changes to write_pieced_value as
9250 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
9252 * dwarf2loc.c (write_pieced_value): In DWARF_VALUE_MEMORY,
9253 truncate full bytes from dest_offset_bits before using it as an
9254 offset into the buffer.
9256 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
9258 * dwarf2loc.c (write_pieced_value): Include transfer size in
9261 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
9263 * dwarf2loc.c (write_pieced_value): Fix copy/paste error in the
9264 calculation of this_size.
9266 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
9268 * dwarf2loc.c (read_pieced_value): Respect parent value's offset
9269 when targeting a bit-field.
9270 (write_pieced_value): Likewise.
9272 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
9274 * dwarf2loc.c (struct piece_closure) <addr_size>: Remove field.
9275 (allocate_piece_closure): Drop addr_size parameter.
9276 (dwarf2_evaluate_loc_desc_full): Adjust call to
9277 allocate_piece_closure.
9279 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
9282 * dwarf2loc.c (read_pieced_value): Anchor stack value pieces at
9283 the LSB end, independent of endianness.
9285 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
9287 * dwarf2loc.c (write_pieced_value): Fix order of calculations for
9290 2017-06-13 Yao Qi <yao.qi@linaro.org>
9292 * mips-linux-nat.c: Move include features/mips*-linux.c to
9294 (_initialize_mips_linux_nat): Move initialize_tdesc_mips* calls
9295 to mips-linux-tdep.c.
9296 * mips-linux-tdep.c: Include features/mips*-linux.c
9297 (_initialize_mips_linux_tdep): Call initialize_tdesc_mips*
9299 * mips-linux-tdep.h (tdesc_mips_linux): Declare.
9300 (tdesc_mips_dsp_linux, tdesc_mips64_linux): Declare.
9301 (tdesc_mips64_dsp_linux): Declare.
9303 2017-06-12 Tom Tromey <tom@tromey.com>
9305 * valprint.h (val_print_type_code_int): Remove.
9306 * valprint.c (generic_val_print_int): Always call
9307 val_print_scalar_formatted.
9308 (val_print_type_code_int): Remove.
9309 * printcmd.c (print_scalar_formatted): Handle options->format==0.
9310 * f-valprint.c (f_val_print): Use val_print_scalar_formatted.
9311 * c-valprint.c (c_val_print_int): Use val_print_scalar_formatted.
9312 * ada-valprint.c (ada_val_print_num): Use
9313 val_print_scalar_formatted.
9315 2017-06-12 Tom Tromey <tom@tromey.com>
9317 * printcmd.c (print_scalar_formatted): Unify the two switches.
9318 Don't convert scalars to LONGEST.
9320 2017-06-12 Tom Tromey <tom@tromey.com>
9323 * valprint.h (print_decimal_chars): Update.
9324 * valprint.c (maybe_negate_by_bytes): New function.
9325 (print_decimal_chars): Add "is_signed" argument.
9326 * printcmd.c (print_scalar_formatted): Update.
9328 2017-06-12 Tom Tromey <tom@tromey.com>
9331 * valprint.h (print_binary_chars, print_hex_chars): Update.
9332 * valprint.c (val_print_type_code_int): Update.
9333 (print_binary_chars): Add "zero_pad" argument.
9334 (emit_octal_digit): New function.
9335 (print_octal_chars): Don't zero-pad.
9336 (print_decimal_chars): Likewise.
9337 (print_hex_chars): Add "zero_pad" argument.
9338 * sh64-tdep.c (sh64_do_fp_register): Update.
9339 * regcache.c (regcache::dump): Update.
9340 * printcmd.c (print_scalar_formatted): Update.
9341 * infcmd.c (default_print_one_register_info): Update.
9343 2017-06-12 Pedro Alves <palves@redhat.com>
9344 Alan Hayward <alan.hayward@arm.com>
9346 * mips-tdep.c (MAX_MIPS_ABI_REGSIZE): New.
9347 (mips_eabi_push_dummy_call): Rename local 'regsize' to
9348 'abi_regsize'. Rename local array 'valbuf' to 'ref_valbuf', and
9349 use MAX_MIPS_ABI_REGSIZE instead of MAX_REGISTER_SIZE to size it.
9350 Assert that abi_regsize bytes fit in 'ref_valbuf'.
9352 2017-06-12 Pedro Alves <palves@redhat.com>
9354 * dwarf2read.c (mapped_symtab::data): Now a vector of
9355 symtab_index_entry instead of vector of
9356 std::unique_ptr<symtab_index_entry>. All users adjusted to check
9357 whether an element's name is NULL instead of checking whether the
9358 element itself is NULL.
9359 (find_slot): Change return type. Adjust.
9360 (hash_expand, , add_index_entry, uniquify_cu_indices)
9361 (write_hash_table): Adjust.
9363 2017-06-12 Pedro Alves <palves@redhat.com>
9365 * dwarf2read.c (recursively_count_psymbols): New function.
9366 (write_psymtabs_to_index): Call it to compute number of psyms and
9367 pass estimate size of psyms_seen to unordered_set's ctor.
9369 2017-06-12 Pedro Alves <palves@redhat.com>
9371 * dwarf2read.c (write_hash_table): Check if key already exists
9374 2017-06-12 Pedro Alves <palves@redhat.com>
9376 * dwarf2read.c (data_buf::append_space): Rename to...
9377 (data_buf::grow): ... this, and make private. Adjust all callers.
9378 (data_buf::append_uint): New method.
9379 (add_address_entry, write_one_signatured_type)
9380 (write_psymtabs_to_index): Use it.
9382 2017-06-12 Pedro Alves <palves@redhat.com>
9384 * dwarf2read.c (file_write(FILE *, const void *, size_t)): Delete.
9385 (file_write (FILE *, const std::vector<Elem>&)): Delete.
9386 (data_buf::file_write): Call ::fwrite directly.
9388 2017-06-12 Pedro Alves <palves@redhat.com>
9390 * dwarf2read.c (uniquify_cu_indices): Use std::unique and
9393 2017-06-12 Jan Kratochvil <jan.kratochvil@redhat.com>
9395 Code cleanup: C++ify .gdb_index producer.
9396 * dwarf2read.c: Include <unordered_set> and <unordered_map>.
9397 (MAYBE_SWAP) [WORDS_BIGENDIAN]: Cast to offset_type.
9398 (struct strtab_entry, hash_strtab_entry, eq_strtab_entry)
9399 (create_strtab, add_string): Remove.
9400 (file_write, data_buf): New.
9401 (struct symtab_index_entry): Use std::vector for cu_indices.
9402 (struct mapped_symtab): Use std::vector for data.
9403 (hash_symtab_entry, eq_symtab_entry, delete_symtab_entry)
9404 (create_symbol_hash_table, create_mapped_symtab, cleanup_mapped_symtab):
9406 (find_slot): Change return type. Update it to the new data structures.
9407 (hash_expand, add_index_entry): Update it to the new data structures.
9408 (offset_type_compare): Remove.
9409 (uniquify_cu_indices): Update it to the new data structures.
9410 (c_str_view, c_str_view_hasher, vector_hasher): New.
9411 (add_indices_to_cpool): Remove.
9412 (write_hash_table): Update it to the new data structures.
9413 (struct psymtab_cu_index_map, hash_psymtab_cu_index)
9414 (eq_psymtab_cu_index): Remove.
9415 (psym_index_map): New typedef.
9416 (struct addrmap_index_data): Change addr_obstack pointer to data_buf
9417 reference and std::unordered_map for cu_index_htab.
9418 (add_address_entry, add_address_entry_worker, write_address_map)
9419 (write_psymbols): Update it to the new data structures.
9420 (write_obstack): Remove.
9421 (struct signatured_type_index_data): Change types_list to a data_buf
9422 reference and psyms_seen to a std::unordered_set reference.
9423 (write_one_signatured_type, recursively_write_psymbols)
9424 (write_psymtabs_to_index): Update it to the new data structures.
9426 2017-06-11 Simon Marchi <simon.marchi@ericsson.com>
9428 * NEWS (Changes since GDB 8.0): Announce {set,show} debug
9429 separate-debug-file commands.
9430 * symfile.h (separate_debug_file_debug): New global.
9431 * symfile.c (separate_debug_file_debug): New global.
9432 (separate_debug_file_exists, find_separate_debug_file): Add
9434 (_initialize_symfile): Add "set debug separate-debug-file"
9436 * build-id.c (build_id_to_debug_bfd,
9437 find_separate_debug_file_by_buildid): Add debug output.
9439 2017-06-10 Simon Marchi <simon.marchi@polymtl.ca>
9441 * gdbarch.sh (displaced_step_free_closure): Remove.
9442 * gdbarch.h, gdbarch.c: Re-generate.
9443 * aarch64-linux-tdep.c (aarch64_linux_init_abi): Don't set
9444 displaced_step_free_closure.
9445 * amd64-linux-tdep.c (amd64_linux_init_abi_common): Likewise.
9446 * arm-linux-tdep.c (arm_linux_init_abi): Likewise.
9447 * i386-linux-tdep.c (i386_linux_init_abi): Likewise.
9448 * rs6000-aix-tdep.c (rs6000_aix_init_osabi): Likewise.
9449 * rs6000-tdep.c (rs6000_gdbarch_init): Likewise.
9450 * s390-linux-tdep.c (s390_gdbarch_init): Likewise.
9451 * arch-utils.h (simple_displaced_step_free_closure): Remove.
9452 * arch-utils.c (simple_displaced_step_free_closure): Remove.
9453 * infrun.c (displaced_step_clear): Call xfree instead of
9454 gdbarch_displaced_step_free_closure.
9456 2017-06-08 Sergio Durigan Junior <sergiodj@redhat.com>
9458 * common/common-utils.c (stringify_argv): Check for "arg[0] !=
9461 2017-06-08 Alan Hayward <alan.hayward@arm.com>
9463 * mn10300-tdep.c (MN10300_MAX_REGISTER_SIZE): Add.
9464 (mn10300_extract_return_value): Use MN10300_MAX_REGISTER_SIZE.
9465 (mn10300_push_dummy_call): Likewise.
9467 2017-06-08 Alan Hayward <alan.hayward@arm.com>
9469 * mi/mi-main.c (register_changed_p): Use value_contents_eq.
9471 2017-06-08 Alan Hayward <alan.hayward@arm.com>
9473 * mi/mi-main.c (register_changed_p): Use cooked_read_value.
9475 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
9477 * NEWS (Changes since GDB 8.0): Announce that GDBserver is now
9478 able to start inferiors using a shell.
9479 (New remote packets): Announce new packet "QStartupWithShell".
9480 * remote.c: Add PACKET_QStartupWithShell.
9481 (extended_remote_create_inferior): Handle new
9482 PACKET_QStartupWithShell.
9483 (remote_protocol_features) <QStartupWithShell>: New entry for
9484 PACKET_QStartupWithShell.
9485 (_initialize_remote): Call "add_packet_config_cmd" for
9488 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
9489 Pedro Alves <palves@redhat.com>
9491 * Makefile.in (HFILES_NO_SRCDIR): Add "common/common-inferior.h"
9492 and "nat/fork-inferior.h".
9493 * common/common-inferior.h: New file, with contents from
9495 * commom/common-utils.c: Include "common-utils.h".
9496 (stringify_argv): New function.
9497 * common/common-utils.h (stringify_argv): New prototype.
9498 * configure.nat: Add "fork-inferior.o" as a dependency for
9499 "*linux*", "fbsd*" and "nbsd*" hosts.
9500 * corefile.c (get_exec_file): Update comment.
9501 * darwin-nat.c (darwin_ptrace_him): Call "gdb_startup_inferior"
9502 instead of "startup_inferior".
9503 (darwin_create_inferior): Call "add_thread_silent" after
9505 * fork-child.c: Cleanup unnecessary includes.
9506 (SHELL_FILE): Move to "common/common-fork-child.c".
9507 (environ): Likewise.
9508 (exec_wrapper): Initialize.
9509 (get_exec_wrapper): New function.
9510 (breakup_args): Move to "common/common-fork-child.c"; rename to
9511 "breakup_args_for_exec".
9512 (escape_bang_in_quoted_argument): Move to
9513 "common/common-fork-child.c".
9514 (saved_ui): New variable.
9515 (prefork_hook): New function.
9516 (postfork_hook): Likewise.
9517 (postfork_child_hook): Likewise.
9518 (gdb_startup_inferior): Likewise.
9519 (fork_inferior): Move to "common/common-fork-child.c". Update
9520 function to support gdbserver.
9521 (startup_inferior): Likewise.
9522 * gdbcore.h (get_exec_file): Remove declaration.
9523 * gnu-nat.c (gnu_create_inferior): Call "gdb_startup_inferior"
9524 instead of "startup_inferior". Call "add_thread_silent" after
9526 * inf-ptrace.c: Include "nat/fork-inferior.h" and "utils.h".
9527 (inf_ptrace_create_inferior): Call "gdb_startup_inferior"
9528 instead of "startup_inferior". Call "add_thread_silent" after
9530 * inferior.h: Include "common-inferior.h".
9531 (trace_start_error): Move to "common/common-utils.h".
9532 (trace_start_error_with_name): Likewise.
9533 (fork_inferior): Move prototype to "nat/fork-inferior.h".
9534 (startup_inferior): Likewise.
9535 (gdb_startup_inferior): New prototype.
9536 * nat/fork-inferior.c: New file, with contents from "fork-child.c".
9537 * nat/fork-inferior.h: New file.
9538 * procfs.c (procfs_init_inferior): Call "gdb_startup_inferior"
9539 instead of "startup_inferior". Call "add_thread_silent" after
9541 * target.h (target_terminal_init): Move prototype to
9543 (target_terminal_inferior): Likewise.
9544 (target_terminal_ours): Likewise.
9545 * target/target.h (target_terminal_init): New prototype, moved
9547 (target_terminal_inferior): Likewise.
9548 (target_terminal_ours): Likewise.
9549 * utils.c (gdb_flush_out_err): New function.
9551 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
9553 * Makefile.in (HFILES_NO_SRCDIR): Add "common/common-gdbthread.h".
9554 * common/common-gdbthread.h: New file, with parts from
9556 * gdbthread.h: Include "common-gdbthread.h".
9557 (switch_to_thread): Moved to "common/common-gdbthread.h".
9559 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
9561 * Makefile.in (SFILES): Add "common/job-control.c".
9562 (HFILES_NO_SRCDIR): Add "common/job-control.h".
9563 (COMMON_OBS): Add "job-control.o".
9564 * common/job-control.c: New file, with contents from
9566 * common/job-control.h: New file, with contents from "terminal.h".
9567 * fork-child.c: Include "job-control.h".
9568 * inflow.c: Include "job-control.h".
9569 (gdb_setpgid): Move to "common/common-inflow.c".
9570 (_initialize_inflow): Move setting of "job_control" to
9571 "handle_job_control".
9572 * terminal.h (job_control): Moved to "common/common-terminal.h".
9573 (gdb_setpgid): Likewise.
9574 * top.c: Include "job_control.h".
9575 * utils.c: Likewise.
9576 (job_control): Moved to "job-control.c".
9578 2017-06-07 Pedro Alves <palves@redhat.com>
9580 * Makefile.in (SFILES): Add gdb_regex.c.
9581 (COMMON_OBS): Add gdb_regex.o.
9582 * ada-lang.c (ada_add_standard_exceptions)
9583 (ada_add_exceptions_from_frame, name_matches_regex)
9584 (ada_add_global_exceptions, ada_exceptions_list_1): Change regex
9585 parameter type to compiled_regex. Adjust.
9586 (ada_exceptions_list): Use compiled_regex.
9587 * break-catch-throw.c (exception_catchpoint::pattern): Now a
9588 std::unique_ptr<compiled_regex>.
9589 (exception_catchpoint::~exception_catchpoint): Remove regfree
9591 (check_status_exception_catchpoint): Adjust to use compiled_regex.
9592 (handle_gnu_v3_exceptions): Adjust to use compiled_regex.
9593 * breakpoint.c (solib_catchpoint::compiled): Now a
9594 std::unique_ptr<compiled_regex>.
9595 (solib_catchpoint::~solib_catchpoint): Remove regfree call.
9596 (check_status_catch_solib): Adjust to use compiled_regex.
9597 (add_solib_catchpoint): Adjust to use compiled_regex.
9598 * cli/cli-cmds.c (apropos_command): Use compiled_regex.
9599 * cli/cli-decode.c (apropos_cmd): Change regex parameter to
9600 compiled_regex reference. Adjust to use it.
9601 * cli/cli-decode.h: Remove struct re_pattern_buffer forward
9602 declaration. Include "gdb_regex.h".
9603 (apropos_cmd): Change regex parameter to compiled_regex reference.
9604 * gdb_regex.c: New file.
9605 * gdb_regex.h (make_regfree_cleanup, get_regcomp_error): Delete
9607 (class compiled_regex): New.
9608 * linux-tdep.c: Include "common/gdb_optional.h".
9609 (struct mapping_regexes): New, factored out from
9610 mapping_is_anonymous_p, and adjusted to use compiled_regex.
9611 (mapping_is_anonymous_p): Use mapping_regexes wrapped in a
9612 gdb::optional and remove cleanups. Adjust to compiled_regex.
9613 * probe.c: Include "common/gdb_optional.h".
9614 (collect_probes): Use compiled_regex and gdb::optional and remove
9616 * skip.c: Include "common/gdb_optional.h".
9617 (skiplist_entry::compiled_function_regexp): Now a
9618 gdb::optional<compiled_regex>.
9619 (skiplist_entry::compiled_function_regexp_is_valid): Delete field.
9620 (free_skiplist_entry): Remove regfree call.
9621 (compile_skip_regexp, skip_rfunction_p): Adjust to use
9622 compiled_regex and gdb::optional.
9623 * symtab.c: Include "common/gdb_optional.h".
9624 (search_symbols): Use compiled_regex and gdb::optional.
9625 * utils.c (do_regfree_cleanup, make_regfree_cleanup)
9626 (get_regcomp_error, compile_rx_or_error): Delete. Some bits moved
9629 2017-06-07 Alan Hayward <alan.hayward@arm.com>
9631 * regcache.c (regcache::save): Avoid buffer use.
9632 (regcache::dump): Likewise.
9634 2017-06-07 Alan Hayward <alan.hayward@arm.com>
9636 * sh-tdep.c (sh_pseudo_register_read): Remove
9638 (sh_pseudo_register_write): Likewise.
9639 * sh64-tdep.c (sh64_pseudo_register_read): Likewise.
9640 (sh64_pseudo_register_write): Likewise
9642 2017-06-07 Alan Hayward <alan.hayward@arm.com>
9644 * aarch64-tdep.c (aarch64_store_return_value): Use
9646 (aarch64_pseudo_read_value): Likewise.
9647 (aarch64_pseudo_write): Likewise.
9649 2017-06-06 Yao Qi <yao.qi@linaro.org>
9651 * regformats/regdef.h (set_register_cache): Remove the
9654 2017-06-06 Alan Hayward <alan.hayward@arm.com>
9656 * frame.c (frame_unwind_register_signed): Use
9657 frame_unwind_register_value.
9659 2017-06-06 Pedro Alves <palves@redhat.com>
9661 PR breakpoints/21553
9662 * breakpoint.c (create_breakpoints_sal_default)
9663 (init_breakpoint_sal, create_breakpoint_sal): Use
9664 gdb::unique_xmalloc_ptr for string parameters.
9665 (create_breakpoint): Constify 'extra_string' and 'cond_string'
9666 parameters. Replace cleanups with gdb::unique_xmalloc_ptr.
9667 (base_breakpoint_create_breakpoints_sal)
9668 (bkpt_create_breakpoints_sal, tracepoint_create_breakpoints_sal)
9669 (strace_marker_create_breakpoints_sal)
9670 (create_breakpoints_sal_default): Use gdb::unique_xmalloc_ptr for
9672 * breakpoint.h (breakpoint_ops::create_breakpoints_sal): Use
9673 gdb::unique_xmalloc_ptr for string parameters.
9674 (create_breakpoint): Constify 'extra_string' and 'cond_string'
9677 2017-06-06 Alan Hayward <alan.hayward@arm.com>
9679 * alpha-tdep.c (alpha_register_to_value): Use
9680 get_frame_register_value.
9681 (alpha_value_to_register): Use ALPHA_REGISTER_SIZE.
9683 2017-06-06 Alan Hayward <alan.hayward@arm.com>
9685 * ia64-tdep.c (IA64_MAX_FP_REGISTER_SIZE) Add.
9686 (ia64_register_to_value): Use IA64_MAX_FP_REGISTER_SIZE.
9687 (ia64_value_to_register): Likewise.
9688 (ia64_extract_return_value): Likewise.
9689 (ia64_store_return_value): Likewise.
9690 (ia64_push_dummy_call): Likewise.
9692 2017-06-04 Joel Brobecker <brobecker@adacore.com>
9696 2017-06-03 Simon Marchi <simon.marchi@ericsson.com>
9698 * x86-linux-nat.c (struct arch_lwp_info): Remove.
9700 2017-06-03 Simon Marchi <simon.marchi@polymtl.ca>
9702 * linux-nat.c (linux_nat_post_attach_wait): Remove FIRST
9704 (linux_nat_attach): Adjust call to linux_nat_post_attach_wait.
9706 2017-06-02 Simon Marchi <simon.marchi@ericsson.com>
9708 * event-loop.c (poll_timers): Unallocate timer using delete
9711 2017-06-02 Simon Marchi <simon.marchi@polymtl.ca>
9713 * breakpoint.h (struct breakpoint_ops) <dtor>: Remove.
9714 (struct breakpoint) <~breakpoint>: New.
9715 (struct watchpoint): Inherit from breakpoint.
9718 (struct tracepoint): Inherit from breakpoint.
9720 * breakpoint.c (longjmp_breakpoint_ops): Remove.
9721 (struct longjmp_breakpoint): Inherit from breakpoint.
9722 <~longjmp_breakpoint>: New.
9724 (new_breakpoint_from_type): Remove casts.
9725 (watchpoint_in_thread_scope): Remove reference to base field.
9726 (watchpoint_del_at_next_stop): Likewise.
9727 (update_watchpoint): Likewise.
9728 (watchpoint_check): Likewise.
9729 (bpstat_check_watchpoint): Likewise.
9730 (set_longjmp_breakpoint): Likewise.
9731 (struct fork_catchpoint): Inherit from breakpoint.
9733 (struct solib_catchpoint): Inherit from breakpoint.
9734 <~solib_catchpoint>: New.
9736 (dtor_catch_solib): Change to ...
9737 (solib_catchpoint::~solib_catchpoint): ... this.
9738 (breakpoint_hit_catch_solib): Remove reference to base field.
9739 (add_solib_catchpoint): Likewise.
9740 (create_fork_vfork_event_catchpoint): Likewise.
9741 (struct exec_catchpoint): Inherit from breakpoint.
9742 <~exec_catchpoint>: New.
9744 (dtor_catch_exec): Change to ...
9745 (exec_catchpoint::~exec_catchpoint): ... this.
9746 (dtor_watchpoint): Change to ...
9747 (watchpoint::~watchpoint): ... this.
9748 (watch_command_1): Remove reference to base field.
9749 (catch_exec_command_1): Likewise.
9750 (base_breakpoint_dtor): Change to ...
9751 (breakpoint::~breakpoint): ... this.
9752 (base_breakpoint_ops): Remove dtor field value.
9753 (longjmp_bkpt_dtor): Change to ...
9754 (longjmp_breakpoint::~longjmp_breakpoint): ... this.
9755 (strace_marker_create_breakpoints_sal): Remove reference to base
9757 (delete_breakpoint): Don't manually call breakpoint destructor.
9758 (create_tracepoint_from_upload): Remove reference to base field.
9759 (trace_pass_set_count): Likewise.
9760 (initialize_breakpoint_ops): Don't initialize
9761 momentary_breakpoint_ops, don't set dtors.
9762 * ada-lang.c (struct ada_catchpoint): Inherit from breakpoint.
9763 <~ada_catchpoint>: New.
9765 (create_excep_cond_exprs): Remove reference to base field.
9766 (dtor_exception): Change to ...
9767 (ada_catchpoint::~ada_catchpoint): ... this.
9768 (dtor_catch_exception): Remove.
9769 (dtor_catch_exception_unhandled): Remove.
9770 (dtor_catch_assert): Remove.
9771 (create_ada_exception_catchpoint): Remove reference to base
9773 (initialize_ada_catchpoint_ops): Don't set dtors.
9774 * break-catch-sig.c (struct signal_catchpoint): Inherit from
9776 <~signal_catchpoint>: New.
9778 (signal_catchpoint_dtor): Change to ...
9779 (signal_catchpoint::~signal_catchpoint): ... this.
9780 (create_signal_catchpoint): Remove reference to base field.
9781 (initialize_signal_catchpoint_ops): Don't set dtor.
9782 * break-catch-syscall.c (struct syscall_catchpoint): Inherit
9784 <~syscall_catchpoint>: New.
9786 (dtor_catch_syscall): Change to ...
9787 (syscall_catchpoint::~syscall_catchpoint): ... this.
9788 (create_syscall_event_catchpoint): Remove reference to base
9790 (initialize_syscall_catchpoint_ops): Don't set dtor.
9791 * break-catch-throw.c (struct exception_catchpoint): Inherit
9793 <~exception_catchpoint>: New.
9795 (dtor_exception_catchpoint): Change to ...
9796 (exception_catchpoint::~exception_catchpoint): ... this.
9797 (handle_gnu_v3_exceptions): Remove reference to base field.
9798 (initialize_throw_catchpoint_ops): Don't set dtor.
9799 * ctf.c (ctf_get_traceframe_address): Remove reference to base
9801 * remote.c (remote_get_tracepoint_status): Likewise.
9802 * tracefile-tfile.c (tfile_get_traceframe_address): Likewise.
9803 * tracefile.c (tracefile_fetch_registers): Likewise.
9804 * tracepoint.c (actions_command): Likewise.
9805 (validate_actionline): Likewise.
9806 (tfind_1): Likewise.
9807 (get_traceframe_location): Likewise.
9808 (find_matching_tracepoint_location): Likewise.
9809 (parse_tracepoint_status): Likewise.
9810 * mi/mi-cmd-break.c (mi_cmd_break_passcount): Likewise.
9812 2017-06-02 Simon Marchi <simon.marchi@polymtl.ca>
9814 * breakpoint.c (struct longjmp_breakpoint): New struct.
9815 (is_tracepoint_type): Change return type to bool.
9816 (is_longjmp_type): New function.
9817 (new_breakpoint_from_type): Handle longjmp kinds of breakpoints.
9818 (set_raw_breakpoint_without_location): Use
9819 new_breakpoint_from_type.
9820 (set_raw_breakpoint): Likewise.
9822 2017-06-02 Simon Marchi <simon.marchi@polymtl.ca>
9824 * breakpoint.c (new_breakpoint_from_type): New function.
9825 (create_breakpoint_sal): Use new_breakpoint_from_type and
9827 (create_breakpoint): Likewise.
9829 2017-05-31 Simon Marchi <simon.marchi@ericsson.com>
9831 * memattr.c (mem_info_command): Rename to ...
9832 (info_mem_command): ... this.
9833 (mem_enable_command): Rename to ...
9834 (enable_mem_command): ... this.
9835 (mem_disable_command): Rename to ...
9836 (disable_mem_command): ... this.
9837 (mem_delete_command): Rename to ...
9838 (delete_mem_command): ... this.
9839 (_initialize_mem): Adjust function names.
9841 2017-05-31 Markus Metzger <markus.t.metzger@intel.com>
9843 * btrace.c (handle_pt_insn_events): New.
9844 (ftrace_add_pt): Call handle_pt_insn_events. Rename ERRCODE into
9845 STATUS. Split into this and ...
9846 (handle_pt_insn_event_flags): ... this.
9848 2017-05-31 Markus Metzger <markus.t.metzger@intel.com>
9850 * configure.ac: Check for pt_insn_event, struct pt_insn.enabled,
9851 and struct pt_insn.resynced.
9852 * configure: Regenerated.
9853 * config.in: Regenerated.
9855 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
9857 * btrace.c (ftrace_find_call_by_number): New function.
9858 (ftrace_new_function): Store objects, not pointers.
9859 (ftrace_find_call_by_number, ftrace_new_return, ftrace_new_switch,
9860 ftrace_new_gap, ftrace_update_function,
9861 ftrace_compute_global_level_offset, btrace_stich_bts, btrace_clear,
9862 btrace_insn_get, btrace_insn_get_error, btrace_insn_end,
9863 btrace_insn_next, btrace_insn_prev, ptrace_find_insn_by_number,
9864 btrace_ends_with_single_insn, btrace_call_get): Account for
9865 btrace_thread_info::functions now storing objects.
9866 * btrace.h (struct btrace_thread_info): Add constructor.
9867 (struct btrace_thread_info) <functions>: Make std::vector.
9868 (struct btrace_thread_info) <prev, next, up, insn, errcode, flags):
9869 Initialize with default values.
9870 * record-btrace.c (record_btrace_frame_sniffer): Account for
9871 btrace_thread_info::functions now storing objects.
9873 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
9875 * btrace.c: Remove typedef bfun_s.
9876 (ftrace_new_gap): Directly add gaps to the list of gaps.
9877 (btrace_bridge_gaps, btrace_compute_ftrace_bts, pt_btrace_insn_flags,
9878 ftrace_add_pt, btrace_compute_ftrace_pt, btrace_compute_ftrace_1,
9879 btrace_finalize_ftrace, btrace_compute_ftrace): Use std::vector
9882 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
9884 * btrace.c (ftrace_fixup_caller, ftrace_new_return, ftrace_connect_bfun,
9885 ftrace_bridge_gap): Replace references to btrace_thread_info::segment
9886 with btrace_thread_info::next_segment and
9887 btrace_thread_info::prev_segment.
9888 * btrace.h: Remove struct btrace_func_link.
9889 (struct btrace_function): Replace pair of function segment pointers
9890 with pair of indices.
9891 * python/py-record-btrace.c (btpy_call_prev_sibling,
9892 btpy_call_next_sibling): Replace references to
9893 btrace_thread_info::segment with btrace_thread_info::next_segment and
9894 btrace_thread_info::prev_segment.
9895 * record-btrace.c (record_btrace_frame_this_id): Use
9896 btrace_find_call_by_number.
9898 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
9900 * btrace.c (ftrace_new_function, ftrace_fixup_level,
9901 ftrace_connect_bfun, ftrace_bridge_gap, btrace_bridge_gaps,
9902 btrace_insn_next, btrace_insn_prev): Remove references to
9903 btrace_thread_info::flow.
9904 * btrace.h (struct btrace_function): Remove FLOW.
9906 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
9908 * btrace.c (ftrace_find_call_by_number): New function.
9909 (ftrace_update_caller, ftrace_new_call, ftrace_new_tailcall,
9910 ftrace_get_caller, ftrace_find_call, ftrace_new_return,
9911 ftrace_match_backtrace, ftrace_connect_bfun, ftrace_connect_backtrace,
9912 ftrace_bridge_gap, btrace_bridge_gaps): Use btrace_function::up as an
9914 * btrace.h (struct btrace_function): Turn UP into an index.
9915 * python/py-record-btrace.c (btpy_call_up): Use btrace_function::up
9917 * record-btrace.c (record_btrace_frame_unwind_stop_reason,
9918 record_btrace_frame_prev_register, record_btrace_frame_sniffer,
9919 record_btrace_tailcall_frame_sniffe): Use btrace_find_call_by_number.
9921 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
9923 * btrace.c (ftrace_new_function, ftrace_new_call, ftrace_new_tailcall,
9924 ftrace_new_return, ftrace_new_switch, ftrace_new_gap,
9925 ftrace_update_function, ftrace_compute_global_level_offset,
9926 btrace_compute_ftrace_bts, ftrace_add_pt, btrace_compute_ftrace_pt,
9927 btrace_stitch_bts, btrace_fetch, btrace_clear, btrace_insn_number,
9928 btrace_insn_end, btrace_is_empty): Remove references to
9929 btrace_thread_info::begin and btrace_thread_info::end.
9930 * btrace.h (struct btrace_thread_info): Remove BEGIN and END.
9931 (struct btrace_thread_info) <functions>: Adjust comment.
9932 * record-btrace.c (record_btrace_start_replaying): Remove reference to
9933 btrace_thread_info::begin.
9935 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
9937 * btrace.c (ftrace_new_function, ftrace_new_call, ftrace_new_tailcall,
9938 ftrace_new_return, ftrace_new_switch, ftrace_new_gap,
9939 ftrace_update_function): Remove arguments that implicitly were always
9941 (btrace_compute_ftrace_bts, ftrace_add_pt, btrace_compute_ftrace_pt):
9942 Don't pass BTINFO->END.
9944 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
9946 * btrace.c: (btrace_insn_get, btrace_insn_get_error, btrace_insn_number,
9947 btrace_insn_begin, btrace_insn_end, btrace_insn_next, btrace_insn_prev,
9948 btrace_find_insn_by_number): Replace function segment pointer with
9950 (btrace_insn_cmp): Simplify.
9951 * btrace.h: (struct btrace_insn_iterator) Rename index to
9952 insn_index. Replace function segment pointer with index into function
9954 * record-btrace.c (record_btrace_call_history): Replace function
9955 segment pointer use with index.
9956 (record_btrace_frame_sniffer): Retrieve function call segment through
9958 (record_btrace_set_replay): Remove defunc't safety check.
9960 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
9962 * btrace.c (btrace_ends_with_single_insn): New function.
9963 (btrace_call_get, btrace_call_number, btrace_call_begin,
9964 btrace_call_end, btrace_call_next, btrace_call_prev,
9965 btrace_find_call_by_number): Use index into call segment vector
9967 (btrace_call_cmp): Simplify.
9968 * btrace.h (struct btrace_call_iterator): Replace function call segment
9969 pointer with index into vector.
9970 * record-btrace.c (record_btrace_call_history): Use index instead of
9973 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
9975 * btrace.c (btrace_insn_begin, btrace_insn_end,
9976 btrace_find_insn_by_number): Add btinfo to iterator.
9977 * btrace.h (struct btrace_insn_iterator): Add btinfo.
9979 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
9981 * btrace.c (ftrace_new_function): Add btrace_thread_info to arguments
9982 and save pointers directly.
9983 (ftrace_new_call, ftrace_new_tailcall, ftrace_new_return,
9984 ftrace_new_switch, ftrace_new_gap, ftrace_update_function,
9985 ftrace_add_pt): Add btrace_thread_info to arguments. Adjust for
9986 changed signature of functions.
9987 (btrace_compute_ftrace_pt): Adjust for changed signature of functions.
9988 (btrace_fetch): Remove code that adds btrace_function pointers to
9989 vector of btrace_functions.
9990 (btrace_clear): Simplify freeing vector of btrace_functions.
9992 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
9994 * btrace.c (btrace_fetch, btrace_clear, btrace_find_insn_by_number):
9995 Replace VEC_* with std::vector functions.
9996 * btrace.h: Add include: vector. Remove typedef for DEF_VEC_P.
9997 (struct btrace_thread_info)<functions>: Change type to std::vector.
9999 2017-05-30 Simon Marchi <simon.marchi@ericsson.com>
10001 * NEWS (Changes in GDB 8.0): Remove extra empty line. Move
10002 "Removed targets and native configurations" up. Merge duplicate
10003 "New commands" sub-sections. Add "New options" sub-sections.
10005 2017-05-26 Alan Hayward <alan.hayward@arm.com>
10007 * defs.h (copy_integer_to_size): New declaration.
10008 * findvar.c (copy_integer_to_size): New function.
10009 (do_cint_test): New selftest function.
10010 (copy_integer_to_size_test): Likewise.
10011 (_initialize_findvar): Likewise.
10012 * mips-fbsd-tdep.c (mips_fbsd_supply_reg): Use raw_supply_integer.
10013 (mips_fbsd_collect_reg): Use raw_collect_integer.
10014 * mips-linux-tdep.c (supply_32bit_reg): Use raw_supply_integer.
10015 (mips64_fill_gregset): Use raw_collect_integer
10016 (mips64_fill_fpregset): Use raw_supply_integer.
10017 * regcache.c (regcache::raw_supply_integer): New function.
10018 (regcache::raw_collect_integer): Likewise.
10019 * regcache.h: (regcache::raw_supply_integer): New declaration.
10020 (regcache::raw_collect_integer): Likewise.
10022 2017-05-24 Yao Qi <yao.qi@linaro.org>
10024 * Makefile.in (SFILES): Add gdbarch-selftests.c.
10025 (COMMON_OBS): Add gdbarch-selftests.o.
10026 * frame.c [GDB_SELF_TESTS] (create_new_frame): New function.
10027 * frame.h [GDB_SELF_TESTS] (create_new_frame): Declare.
10028 * gdbarch-selftests.c: New file.
10029 * regcache.h (regcache) <~regcache>: Mark it virtual if
10031 <raw_write>: Likewise.
10033 2017-05-24 Yao Qi <yao.qi@linaro.org>
10035 * regcache.c (current_regcache): Change it to
10036 regcache::current_regcache.
10037 (regcache_observer_target_changed): Update.
10038 (regcache_thread_ptid_changed): Make it a regcache static
10040 (regcache_thread_ptid_changed): Update.
10041 (class regcache_access): New.
10042 (current_regcache_test): Update.
10043 (_initialize_regcache): Update.
10044 * regcache.h: Include forward_list.
10045 (regcache): Declare regcache_thread_ptid_changed and declare
10046 registers_changed_ptid as friend.
10048 2017-05-24 Yao Qi <yao.qi@linaro.org>
10050 * i387-tdep.c (i387_register_to_value): Use register_size
10051 instead of TYPE_LENGTH.
10052 * m68k-tdep.c (m68k_register_to_value): Likewise.
10054 2017-05-24 Yao Qi <yao.qi@linaro.org>
10056 * i387-tdep.c (i387_convert_register_p): Return false if type
10057 code isn't TYPE_CODE_FLT.
10059 2017-05-24 Yao Qi <yao.qi@linaro.org>
10061 * alpha-tdep.c (alpha_convert_register_p): Return true if type
10063 (alpha_register_to_value): Remove type length check.
10064 (alpha_value_to_register): Likewise.
10066 2017-05-24 Yao Qi <yao.qi@linaro.org>
10068 * ia64-tdep.c (ia64_convert_register_p): Check type's code is
10071 2017-05-24 Yao Qi <yao.qi@linaro.org>
10073 * m68k-tdep.c (m68k_convert_register_p): Check type's code is
10074 TYPE_CODE_FLT or not.
10076 2017-05-24 Yao Qi <yao.qi@linaro.org>
10078 * alpha-tdep.c (alpha_gdbarch_init): Use XCNEW instead of XNEW.
10079 * avr-tdep.c (avr_gdbarch_init): Likewise.
10080 * bfin-tdep.c (bfin_gdbarch_init): Likewise.
10081 * cris-tdep.c (cris_gdbarch_init): Likewise.
10082 * ft32-tdep.c (ft32_gdbarch_init): Likewise.
10083 * lm32-tdep.c (lm32_gdbarch_init): Likewise.
10084 * m32r-tdep.c (m32r_gdbarch_init): Likewise.
10085 * m68hc11-tdep.c (m68hc11_gdbarch_init): Likewise.
10086 * mep-tdep.c (mep_gdbarch_init): Likewise.
10087 * microblaze-tdep.c (microblaze_gdbarch_init): Likewise.
10088 * mips-tdep.c (mips_gdbarch_init): Likewise.
10089 * mn10300-tdep.c (mn10300_gdbarch_init): Likewise.
10090 * moxie-tdep.c (moxie_gdbarch_init): Likewise.
10091 * msp430-tdep.c (msp430_gdbarch_init): Likewise.
10092 * sh64-tdep.c (sh64_gdbarch_init): Likewise.
10093 * v850-tdep.c (v850_gdbarch_init): Likewise.
10095 2017-05-24 Yao Qi <yao.qi@linaro.org>
10097 * selftest-arch.c (tests_with_arch): Call registers_changed
10098 and reinit_frame_cache.
10099 * selftest.c (run_self_tests): Likewise.
10101 2017-05-24 Yao Qi <yao.qi@linaro.org>
10103 * rs6000-tdep.c (gdb_print_insn_powerpc): Remove.
10104 (rs6000_gdbarch_init): Don't call set_gdbarch_print_insn.
10106 2017-05-24 Yao Qi <yao.qi@linaro.org>
10108 * rl78-tdep.c (rl78_gdbarch_init): Don't call
10109 set_gdbarch_print_insn.
10111 2017-05-24 Yao Qi <yao.qi@linaro.org>
10113 * h8300-tdep.c (h8300_gdbarch_init): Don't call
10114 set_gdbarch_print_insn.
10116 2017-05-24 Yao Qi <yao.qi@linaro.org>
10118 * alpha-tdep.c (alpha_gdbarch_init): Don't call
10119 set_gdbarch_print_insn.
10120 * arc-tdep.c (arc_gdbarch_init): Likewise.
10121 * arch-utils.c: include dis-asm.h.
10122 (default_print_insn): New function.
10123 * arch-utils.h (default_print_insn): Declare.
10124 * avr-tdep.c (avr_gdbarch_init): Don't call set_gdbarch_print_insn.
10125 * bfin-tdep.c (bfin_gdbarch_init): Likewise.
10126 * cris-tdep.c (cris_delayed_get_disassembler): Remove.
10127 (cris_gdbarch_init): Don't call set_gdbarch_print_insn.
10128 * frv-tdep.c (frv_gdbarch_init): Likewise.
10129 * ft32-tdep.c (ft32_gdbarch_init): Likewise.
10130 * gdbarch.sh (print_insn): Use default_print_insn.
10131 * gdbarch.c: Regenerated.
10132 * hppa-tdep.c (hppa_gdbarch_init): Likewise.
10133 * iq2000-tdep.c (iq2000_gdbarch_init): Likewise.
10134 * lm32-tdep.c (lm32_gdbarch_init): Likewise.
10135 * m32c-tdep.c (m32c_gdbarch_init): Likewise.
10136 * m32r-tdep.c (m32r_gdbarch_init): Likewise.
10137 * m68hc11-tdep.c (gdb_print_insn_m68hc11): Remove.
10138 (m68hc11_gdbarch_init): Don't call set_gdbarch_print_insn.
10139 * m68k-tdep.c (m68k_gdbarch_init): Likewise.
10140 * m88k-tdep.c (m88k_gdbarch_init): Likewise.
10141 * microblaze-tdep.c (microblaze_gdbarch_init): Likewise.
10142 * mn10300-tdep.c (mn10300_gdbarch_init): Likewise.
10143 * moxie-tdep.c (moxie_gdbarch_init): Likewise.
10144 * msp430-tdep.c (msp430_gdbarch_init): Likewise.
10145 * mt-tdep.c (mt_gdbarch_init): Likewise.
10146 * nds32-tdep.c (nds32_gdbarch_init): Likewise.
10147 * nios2-tdep.c (nios2_print_insn): Remove.
10148 (nios2_gdbarch_init): Don't call set_gdbarch_print_insn.
10149 * rx-tdep.c (rx_gdbarch_init): Likewise.
10150 * s390-linux-tdep.c (s390_gdbarch_init): Likewise.
10151 * score-tdep.c (score_print_insn): Remove.
10152 (score_gdbarch_init): Don't call set_gdbarch_print_insn.
10153 * sh-tdep.c (sh_gdbarch_init): Likewise.
10154 * sh64-tdep.c (sh64_gdbarch_init): Likewise.
10155 * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
10156 * tic6x-tdep.c (tic6x_print_insn): Remove.
10157 (tic6x_gdbarch_init): Don't call set_gdbarch_print_insn.
10158 * tilegx-tdep.c (tilegx_gdbarch_init): Likewise.
10159 * v850-tdep.c (v850_gdbarch_init): Likewise.
10160 * vax-tdep.c (vax_gdbarch_init): Likewise.
10161 * xstormy16-tdep.c (xstormy16_gdbarch_init): Likewise.
10162 * xtensa-tdep.c (xtensa_gdbarch_init): Likewise.
10164 2017-05-23 John Baldwin <jhb@FreeBSD.org>
10166 * mips-fbsd-tdep.c (MIPS_PC_REGNUM): Remove.
10167 (MIPS_FP0_REGNUM): Remove.
10168 (MIPS_FSR_REGNUM): Remove.
10169 (mips_fbsd_supply_fpregs): Use mips_regnum.
10170 (mips_fbsd_supply_gregs): Likewise.
10171 (mips_fbsd_collect_fpregs): Likewise.
10172 (mips_fbsd_collect_gregs): Likewise.
10174 2017-05-23 John Baldwin <jhb@FreeBSD.org>
10176 * mips-fbsd-nat.c (getregs_supplies): Fix upper bound comparison.
10177 (getpfpregs_supplies): New function.
10178 (mips_fbsd_fetch_inferior_registers): Remove early exit and use
10179 getfpregs_supplies.
10180 (mips_fbsd_store_inferior_registers): Likewise.
10182 2017-05-22 Pedro Alves <palves@redhat.com>
10184 * MAINTAINERS (Host/Native): Add John Baldwin as FreeBSD
10187 2017-05-22 Alan Hayward <alan.hayward@arm.com>
10189 * ppc-linux-nat.c (fetch_register): Use PPC_MAX_REGISTER_SIZE.
10190 (store_register): Likewise.
10191 * ppc-sysv-tdep.c (ppc_sysv_abi_push_dummy_call): Likewise.
10192 (get_decimal_float_return_value): Likewise.
10193 (do_ppc_sysv_return_value): Likewise.
10194 (ppc64_sysv_abi_push_integer): Likewise.
10195 (ppc64_sysv_abi_push_freg): Likewise.
10196 (ppc64_sysv_abi_return_value_base): Likewise.
10197 (ppc64_sysv_abi_return_value): Likewise.
10198 * rs6000-aix-tdep.c (rs6000_push_dummy_call): Likewise.
10199 * rs6000-lynx178-tdep.c (rs6000_lynx178_push_dummy_call): Likewise.
10200 * rs6000-nat.c: Likewise.
10201 * rs6000-tdep.c (rs6000_register_to_value): Likewise.
10202 (rs6000_value_to_register): Likewise.
10203 * ppc-tdep.h (PPC_MAX_REGISTER_SIZE): Add.
10205 2017-05-21 Tom Tromey <tom@tromey.com>
10208 * rust-lang.c (rust_print_type) <TYPE_CODE_ARRAY>: Print unsized
10209 arrays as "[T]", not "[T; ]".
10211 2017-05-19 Tom Tromey <tom@tromey.com>
10214 * rust-lang.c (exp_descriptor_rust): New function.
10215 (rust_language_defn): Use it.
10216 * p-lang.c (pascal_language_defn): Update.
10217 * opencl-lang.c (opencl_language_defn): Update.
10218 * objc-lang.c (objc_language_defn): Update.
10219 * m2-lang.c (m2_language_defn): Update.
10220 * language.h (struct language_defn)
10221 <la_watch_location_expression>: New member.
10222 * language.c (unknown_language_defn, auto_language_defn)
10223 (local_language_defn): Update.
10224 * go-lang.c (go_language_defn): Update.
10225 * f-lang.c (f_language_defn): Update.
10226 * d-lang.c (d_language_defn): Update.
10227 * c-lang.h (c_watch_location_expression): Declare.
10228 * c-lang.c (c_watch_location_expression): New function.
10229 (c_language_defn, cplus_language_defn, asm_language_defn)
10230 (minimal_language_defn): Use it.
10231 * breakpoint.c (watch_command_1): Call
10232 la_watch_location_expression.
10233 * ada-lang.c (ada_language_defn): Update.
10235 2017-05-19 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
10238 * gdb_curses.h (NOMACROS): Define.
10239 (NCURSES_NOMACROS): Define.
10241 2017-05-19 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
10244 * tui/tui-windata.c (tui_erase_data_content): Cast last mvwaddstr
10246 * tui/tui-wingeneral.c (box_win): Likewise.
10247 * tui/tui-winsource.c (tui_erase_source_content): Likewise.
10248 (tui_show_source_line): Likewise.
10249 (tui_show_exec_info_content): Likewise.
10251 2017-05-19 Vladimir Mezentsev <vladimir.mezentsev@oracle.com>
10253 * sparc-tdep.c (sparc_structure_return_p)
10254 (sparc_arg_on_registers_p): New functions.
10255 (sparc32_store_arguments): Use them.
10256 * sparc64-tdep.c (sparc64_16_byte_align_p)
10257 (sparc64_store_floating_fields, sparc64_extract_floating_fields):
10258 Handle TYPE_CODE_ARRAY.
10260 2017-05-17 Yao Qi <yao.qi@linaro.org>
10262 * cli/cli-decode.c (add_alias_cmd): New function.
10263 * command.h (add_alias_cmd): Declare.
10264 * infcmd.c (_initialize_infcmd): Don't call add_com_alias,
10265 instead call add_alias_cmd.
10267 2017-05-17 Pedro Alves <palves@redhat.com>
10269 * Makefile.in (nat_extra_makefile_frag): Rename to ...
10270 (nat_makefile_frag): ... this. All references updated.
10271 * configure.ac: Likewise.
10272 * configure.nat: Likewise. Enhance comments.
10273 * configure: Regenerate.
10275 2017-05-15 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
10277 * procfs.c (procfs_create_inferior): Change prototype to match
10280 2017-05-13 Eli Zaretskii <eliz@gnu.org>
10282 * tui/tui.c (tui_enable): Cast "unknown" to 'char *' to avoid a
10283 C++ compiler warning.
10285 2017-05-12 Tom Tromey <tom@tromey.com>
10288 * rust-lang.c (rust_evaluate_subexp) <STRUCTOP_STRUCT>: Don't
10289 recurse, just call value_struct_elt directly.
10291 2017-05-12 Tom Tromey <tom@tromey.com>
10293 * rust-lang.c (rust_dump_subexp_body) <STRUCTOP_ANONYMOUS,
10294 OP_RUST_ARRAY>: Fix.
10296 2017-05-12 Tom Tromey <tom@tromey.com>
10298 * rust-lang.c (rust_print_subexp): Replace "return" with "break".
10300 2017-05-09 Yao Qi <yao.qi@linaro.org>
10302 * regcache.c: Include <forward_list>.
10303 (struct regcache_list): Remove.
10304 (current_regcache): Update.
10305 (get_thread_arch_aspace_regcache): Update for std::forward_list.
10306 (regcache_thread_ptid_changed): Likewise.
10307 (registers_changed_ptid): Likewise.
10308 (current_regcache_size): Likewise.
10310 2017-05-09 Yao Qi <yao.qi@linaro.org>
10312 * regcache.c [GDB_SELF_TEST]: Include selftest.h.
10313 (current_regcache_size): New function.
10314 (current_regcache_test): New function.
10315 (_initialize_regcache) [GDB_SELF_TEST]: Register the unit test.
10317 2017-05-08 Alan Hayward <alan.hayward@arm.com>
10319 * mips-tdep.c (mips_o32_return_value): Remove unused buffer.
10320 (print_gp_register_row): Use get_frame_register_value.
10322 2017-05-08 Alan Hayward <alan.hayward@arm.com>
10324 * mips-linux-tdep.c (mips_supply_gregset): Use raw_supply_zeroed.
10325 (mips_supply_fpregset): Likewise.
10326 (mips64_supply_gregset): Likewise.
10328 2017-05-08 Alan Hayward <alan.hayward@arm.com>
10330 * mn10300-linux-tdep.c (am33_supply_gregset_method): Use
10331 regcache->raw_supply_zeroed.
10333 2017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
10335 * configure.nat: Rearrange 'case' statements to match
10338 2017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
10340 * Makefile.in: Remove "@host_makefile_frag@". Add variables
10341 NAT_FILE, NATDEPFILES, NAT_CDEPS, LOADLIBES, MH_CFLAGS, XM_CLIBS,
10342 NAT_GENERATED_FILES, HAVE_NATIVE_GCORE_HOST. Add
10343 "@nat_extra_makefile_frag@".
10344 (Makefile): Remove dependency on "@frags@".
10345 ($(GNULIB_BUILDDIR)/Makefile): Likewise.
10346 (data-directory/Makefile): Likewise.
10347 * config/aarch64/linux.mh: Deleted; moved contents to
10348 "gdb/configure.nat".
10349 * config/alpha/alpha-linux.mh: Likewise.
10350 * config/alpha/nbsd.mh: Likewise.
10351 * config/arm/linux.mh: Likewise.
10352 * config/arm/nbsdelf.mh: Likewise.
10353 * config/i386/cygwin.mh: Likewise.
10354 * config/i386/cygwin64.mh: Likewise.
10355 * config/i386/darwin.mh: Likewise.
10356 * config/i386/fbsd.mh: Likewise.
10357 * config/i386/fbsd64.mh: Likewise.
10358 * config/i386/go32.mh: Likewise.
10359 * config/i386/i386gnu.mh: Likewise.
10360 * config/i386/i386sol2.mh: Likewise.
10361 * config/i386/linux.mh: Likewise.
10362 * config/i386/linux64.mh: Likewise.
10363 * config/i386/mingw.mh: Likewise.
10364 * config/i386/mingw64.mh: Likewise.
10365 * config/i386/nbsd64.mh: Likewise.
10366 * config/i386/nbsdelf.mh: Likewise.
10367 * config/i386/nto.mh: Likewise.
10368 * config/i386/obsd.mh: Likewise.
10369 * config/i386/obsd64.mh: Likewise.
10370 * config/i386/sol2-64.mh: Likewise.
10371 * config/ia64/linux.mh: Likewise.
10372 * config/m32r/linux.mh: Likewise.
10373 * config/m68k/linux.mh: Likewise.
10374 * config/m68k/nbsdelf.mh: Likewise.
10375 * config/m68k/obsd.mh: Likewise.
10376 * config/m88k/obsd.mh: Likewise.
10377 * config/mips/fbsd.mh: Likewise.
10378 * config/mips/linux.mh: Likewise.
10379 * config/mips/nbsd.mh: Likewise.
10380 * config/mips/obsd64.mh: Likewise.
10381 * config/pa/linux.mh: Likewise.
10382 * config/pa/nbsd.mh: Likewise.
10383 * config/pa/obsd.mh: Likewise.
10384 * config/powerpc/aix.mh: Likewise.
10385 * config/powerpc/fbsd.mh: Likewise.
10386 * config/powerpc/linux.mh: Likewise.
10387 * config/powerpc/nbsd.mh: Likewise.
10388 * config/powerpc/obsd.mh: Likewise.
10389 * config/powerpc/ppc64-linux.mh: Likewise.
10390 * config/powerpc/spu-linux.mh: Likewise.
10391 * config/s390/linux.mh: Likewise.
10392 * config/sh/nbsd.mh: Likewise.
10393 * config/sparc/fbsd.mh: Likewise.
10394 * config/sparc/linux.mh: Likewise.
10395 * config/sparc/linux64.mh: Likewise.
10396 * config/sparc/nbsd64.mh: Likewise.
10397 * config/sparc/nbsdelf.mh: Likewise.
10398 * config/sparc/obsd64.mh: Likewise.
10399 * config/sparc/sol2.mh: Likewise.
10400 * config/tilegx/linux.mh: Likewise.
10401 * config/vax/nbsdelf.mh: Likewise.
10402 * config/vax/obsd.mh: Likewise.
10403 * config/xtensa/linux.mh: Likewise.
10404 * config/i386/i386gnu.mn: New file, with excerpts from
10405 "config/i386/i386gnu.mh".
10406 * configure: Regenerate.
10407 * configure.ac: Rewrite code to use "gdb/configure.nat" instead of
10408 *.mh files under "gdb/config".
10409 * configure.nat: New file, with contents from the
10410 "gdb/config/*/*.mh" files.
10412 2017-05-05 Tim Wiederhake <tim.wiederhake@intel.com>
10414 * btrace.c (btrace_clear): Free insn vector.
10416 2017-05-05 Pedro Alves <palves@redhat.com>
10418 * warning.m4 (build_warnings): Add -Wno-error=maybe-uninitialized.
10419 * configure: Regenerate.
10421 2017-05-04 Pedro Alves <palves@redhat.com>
10423 * Makefile.in (SFILES): Add progspace-and-thread.c.
10424 (HFILES_NO_SRCDIR): Add progspace-and-thread.h.
10425 (COMMON_OBS): Add progspace-and-thread.o.
10426 * breakpoint.c: Include "progspace-and-thread.h".
10427 (update_inserted_breakpoint_locations)
10428 (insert_breakpoint_locations, create_longjmp_master_breakpoint):
10429 Use scoped_restore_current_pspace_and_thread.
10430 (create_std_terminate_master_breakpoint): Use
10431 scoped_restore_current_program_space.
10432 (remove_breakpoint): Use scoped_restore_current_pspace_and_thread.
10433 (print_breakpoint_location): Use
10434 scoped_restore_current_program_space.
10435 (bp_loc_is_permanent): Use
10436 scoped_restore_current_pspace_and_thread.
10437 (resolve_sal_pc): Use scoped_restore_current_pspace_and_thread.
10438 (download_tracepoint_locations): Use
10439 scoped_restore_current_pspace_and_thread.
10440 (breakpoint_re_set): Use scoped_restore_current_pspace_and_thread.
10441 * exec.c (exec_close_1): Use scoped_restore_current_program_space.
10442 (enum step_over_calls_kind): Moved from inferior.h.
10443 (class scoped_restore_current_thread): New class.
10444 * gdbthread.h (make_cleanup_restore_current_thread): Delete
10446 (scoped_restore_current_thread): New class.
10447 * infcmd.c: Include "common/gdb_optional.h".
10448 (continue_1, proceed_after_attach): Use
10449 scoped_restore_current_thread.
10450 (notice_new_inferior): Use scoped_restore_current_thread.
10451 * inferior.c: Include "progspace-and-thread.h".
10452 (restore_inferior, save_current_inferior): Delete.
10453 (add_inferior_command, clone_inferior_command): Use
10454 scoped_restore_current_pspace_and_thread.
10455 * inferior.h (scoped_restore_current_inferior): New class.
10456 * infrun.c: Include "progspace-and-thread.h" and
10457 "common/gdb_optional.h".
10458 (follow_fork_inferior): Use
10459 scoped_restore_current_pspace_and_thread.
10460 (scoped_restore_exited_inferior): New class.
10461 (handle_vfork_child_exec_or_exit): Use
10462 scoped_restore_exited_inferior,
10463 scoped_restore_current_pspace_and_thread,
10464 scoped_restore_current_thread and scoped_restore.
10465 (fetch_inferior_event): Use scoped_restore_current_thread.
10466 * linespec.c (decode_line_full, decode_line_1): Use
10467 scoped_restore_current_program_space.
10468 * mi/mi-main.c: Include "progspace-and-thread.h".
10469 (exec_continue): Use scoped_restore_current_thread.
10470 (mi_cmd_exec_run): Use scoped_restore_current_pspace_and_thread.
10471 (mi_cmd_trace_frame_collected): Use scoped_restore_current_thread.
10472 * proc-service.c (ps_pglobal_lookup): Use
10473 scoped_restore_current_program_space.
10474 * progspace-and-thread.c: New file.
10475 * progspace-and-thread.h: New file.
10476 * progspace.c (release_program_space, clone_program_space): Use
10477 scoped_restore_current_program_space.
10478 (restore_program_space, save_current_program_space)
10479 (save_current_space_and_thread): Delete.
10480 (switch_to_program_space_and_thread): Moved to
10481 progspace-and-thread.c.
10482 * progspace.h (save_current_program_space)
10483 (save_current_space_and_thread): Delete declarations.
10484 (scoped_restore_current_program_space): New class.
10485 * remote.c (remote_btrace_maybe_reopen): Use
10486 scoped_restore_current_thread.
10487 * symtab.c: Include "progspace-and-thread.h".
10488 (skip_prologue_sal): Use scoped_restore_current_pspace_and_thread.
10489 * thread.c (print_thread_info_1): Use
10490 scoped_restore_current_thread.
10491 (struct current_thread_cleanup): Delete.
10492 (do_restore_current_thread_cleanup)
10493 (restore_current_thread_cleanup_dtor): Rename/convert both to ...
10494 (scoped_restore_current_thread::~scoped_restore_current_thread):
10496 (make_cleanup_restore_current_thread): Rename/convert to ...
10497 (scoped_restore_current_thread::scoped_restore_current_thread):
10499 (thread_apply_all_command): Use scoped_restore_current_thread.
10500 (thread_apply_command): Use scoped_restore_current_thread.
10501 * tracepoint.c (tdump_command): Use scoped_restore_current_thread.
10502 * varobj.c (value_of_root_1): Use scoped_restore_current_thread.
10504 2017-05-04 Pedro Alves <palves@redhat.com>
10506 * thread.c (make_cleanup_restore_current_thread): Move
10507 find_thread_ptid call before the is_stopped call. Assert that the
10508 thread is found. Replace is_stopped call by checking the thread's
10509 state directly. Remove unnecessary NULL-thread check.
10511 2017-05-04 Pedro Alves <palves@redhat.com>
10513 * corelow.c (thread_section_name): New class.
10514 (get_core_register_section, get_core_siginfo): Use it.
10516 2017-05-04 Andreas Arnez <arnez@linux.vnet.ibm.com>
10518 * corelow.c (sniff_core_bfd): Remove extra semicolon.
10519 (get_core_register_section): Remove xfree of NULL pointer.
10521 2017-05-03 Alan Hayward <alan.hayward@arm.com>
10523 * frv-linux-tdep.c (frv_linux_supply_gregset): Use raw_supply_zeroed.
10524 * regcache.c (regcache::raw_supply_zeroed): New function.
10525 * regcache.h (regcache::raw_supply_zeroed): New declaration.
10527 2017-05-03 Simon Marchi <simon.marchi@ericsson.com>
10529 * gdbarch.sh: Remove commented out definition of
10531 * gdbarch.h: Re-generate.
10533 2017-05-03 Sergio Durigan Junior <sergiodj@redhat.com>
10535 * configure: Regenerate.
10537 2017-05-02 Simon Marchi <simon.marchi@ericsson.com>
10539 * solib-target.c (solib_target_relocate_section_addresses):
10540 Remove num_section_bases, num_bases, segment_bases variables.
10542 2017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
10544 * common/gdb_vecs.h (DEF_VEC_I (CORE_ADDR)): Remove.
10546 2017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
10548 * solib-target.c: Include <vector>
10549 (struct lm_info_target) <~lm_info_target>: Remove.
10550 <segment_bases, section_bases>: Change type to
10551 std::vector<CORE_ADDR>.
10552 (library_list_start_segment, library_list_start_section,
10553 library_list_end_library,
10554 solib_target_relocate_section_addresses): Adjust.
10556 2017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
10558 * gdbarch.sh (software_single_step): Change return type to
10559 std::vector<CORE_ADDR>.
10560 * gdbarch.c, gdbarch.h: Re-generate.
10561 * arch/arm-get-next-pcs.c (thumb_deal_with_atomic_sequence_raw):
10563 (arm_deal_with_atomic_sequence_raw): Adjust.
10564 (thumb_get_next_pcs_raw): Adjust.
10565 (arm_get_next_pcs_raw): Adjust.
10566 (arm_get_next_pcs): Adjust.
10567 * arch/arm-get-next-pcs.h (arm_get_next_pcs): Adjust.
10568 * aarch64-tdep.c (aarch64_software_single_step): Adjust.
10569 * alpha-tdep.c (alpha_deal_with_atomic_sequence): Adjust.
10570 (alpha_software_single_step): Adjust.
10571 * alpha-tdep.h (alpha_software_single_step): Adjust.
10572 * arm-linux-tdep.c (arm_linux_software_single_step): Adjust.
10573 * arm-tdep.c (arm_software_single_step): Adjust.
10574 (arm_breakpoint_kind_from_current_state): Adjust.
10575 * arm-tdep.h (arm_software_single_step): Adjust.
10576 * breakpoint.c (insert_single_step_breakpoint): Adjust.
10577 * cris-tdep.c (cris_software_single_step): Adjust.
10578 * mips-tdep.c (mips_deal_with_atomic_sequence): Adjust.
10579 (micromips_deal_with_atomic_sequence): Adjust.
10580 (deal_with_atomic_sequence): Adjust.
10581 (mips_software_single_step): Adjust.
10582 * mips-tdep.h (mips_software_single_step): Adjust.
10583 * moxie-tdep.c (moxie_software_single_step): Adjust.
10584 * nios2-tdep.c (nios2_software_single_step): Adjust.
10585 * ppc-tdep.h (ppc_deal_with_atomic_sequence): Adjust.
10586 * rs6000-aix-tdep.c (rs6000_software_single_step): Adjust.
10587 * rs6000-tdep.c (ppc_deal_with_atomic_sequence): Adjust.
10588 * s390-linux-tdep.c (s390_software_single_step): Adjust.
10589 * sparc-tdep.c (sparc_software_single_step): Adjust.
10590 * spu-tdep.c (spu_software_single_step): Adjust.
10591 * tic6x-tdep.c (tic6x_software_single_step): Adjust.
10593 2017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
10595 * gdbarch.sh: Use semi-colon as field separator instead of colon.
10596 * gdbarch.h: Re-generate.
10598 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
10600 * Makefile.in (SUBDIR_PYTHON_OBS): Add py-instruction.o.
10601 (SUBDIR_PYTHON_SRCS): Add py-instruction.c.
10602 * python/py-instruction.c, python/py-instruction.h: New file.
10603 * python/py-record.c: Add py-instruction.h include.
10604 (gdbpy_initialize_record): Make gdb.Instruction a super class of
10605 gdb.RecordInstruction.
10606 * python/python-internal.h: Add gdbpy_initialize_instruction
10608 * python/python.c (do_start_initialization): Add
10609 gdbpy_initialize_instruction.
10611 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
10613 * python/py-record-btrace.c (BTPY_REQUIRE_VALID_CALL, btpy_call_type):
10615 (btrace_func_from_recpy_func): New function.
10616 (btpy_call_new, btpy_number, btpy_hash, btpy_richcompare): Remove.
10617 (btpy_call_level, btpy_call_symbol, btpy_call_instructions,
10618 btpy_call_up, btpy_call_prev_sibling, btpy_call_next_sibling): Rename to ...
10619 (recpy_bt_func_level, recpy_bt_func_symbol, recpy_bt_func_instructions,
10620 recpy_bt_func_up, recpy_bt_func_prev, recpy_bt_func_next): This.
10621 Also, use new helper functions.
10622 (btpy_list_item): Use new helper functions.
10623 (recpy_bt_function_call_history): Use new type name.
10624 (btpy_call_getset): Remove.
10625 (gdbpy_initialize_btrace): Remove code to initialize
10626 gdb.BtraceFunctionCall.
10627 * python/py-record-btrace.h (recpy_bt_func_number, recpy_btb_func_level,
10628 recpy_btb_func_symbol, recpy_bt_func_instructions, recpy_bt_func_up,
10629 recpy_bt_func_prev, recpy_bt_func_next): New export.
10630 * python/py-record.c (recpy_func_type): New static object.
10631 (recpy_func_new, recpy_func_level, recpy_func_symbol,
10632 recpy_func_instructions, recpy_func_up, recpy_func_prev,
10633 recpy_func_next): New function.
10634 (recpy_element_hash, recpy_element_richcompare): Updated comment.
10635 (recpy_func_getset): New static object.
10636 (gdbpy_initialize_record): Add code to initialize gdb.RecordInstruction.
10637 * python/py-record.h (recpy_func_type, recpy_func_new): New export.
10639 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
10641 * python/py-record-btrace.c (BTPY_REQUIRE_VALID_INSN): Remove.
10642 (btpy_object, btpy_insn_type, btpy_new): Remove.
10643 (btpy_list_object): Use gdb.RecordInstruction type instead of
10644 gdb.BtraceInstruction type.
10645 (btrace_insn_from_recpy_insn): New function.
10646 (btpy_insn_or_gap_new): Adjust comment. Use recpy_insn_new instead of
10648 (btpy_call_new, btpy_list_item): Do not use btpy_new anymore.
10649 (btpy_number, btpy_hash, btpy_call_level, btpy_call_symbol,
10650 btpy_call_instructions, btpy_call_up, btpy_call_prev_sibling,
10651 btpy_call_next_sibling, btpy_richcompare): Use recpy_element_object
10652 instead of btpy_object.
10653 (btpy_insn_sal, btpy_insn_pc, btpy_insn_size, btpy_insn_is_speculative,
10654 btpy_insn_data, btpy_insn_decode): Rename to ...
10655 (recpy_bt_insn_sal, recpy_bt_insn_pc, recpy_bt_insn_size,
10656 recpy_bt_insn_is_speculative, recpy_bt_insn_data,
10657 recpy_bt_insn_decode): This. Also, use new helper functions.
10658 (btpy_list_position, recpy_bt_goto): Use recpy_element_object and
10660 (btpy_insn_getset): Remove.
10661 (gdbpy_initialize_btrace): Remove code to initialize
10662 gdb.BtraceInstruction. Use recpy_element_object.
10663 * python/py-record-btrace.h (recpy_bt_insn_number, recpy_bt_insn_sal,
10664 recpy_bt_insn_pc, recpy_bt_insn_data, recpy_bt_insn_decoded,
10665 recpy_bt_insn_size, recpy_bt_insn_is_speculative): New export.
10666 * python/py-record.c (recpy_insn_type): New static object.
10667 (recpy_insn_new, recpy_insn_sal, recpy_insn_pc, recpy_insn_data,
10668 recpy_insn_decoded, recpy_insn_size, recpy_insn_is_speculative,
10669 recpy_element_number, recpy_element_hash, recpy_element_richcompare):
10671 (recpy_insn_getset): New static object.
10672 (gdbpy_initialize_record): Initialize gdb.RecordInstruction.
10673 * python/py-record.h (recpy_element_object): New typedef.
10674 (recpy_insn_type, recpy_insn_new): New export.
10676 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
10678 * py-record-btrace.c (btpy_insn_new): Removed.
10679 (btpy_insn_or_gap_new): New function.
10680 (btpy_insn_error): Removed.
10681 (btpy_insn_sal, btpy_insn_pc, btpy_insn_size, btpy_insn_is_speculative,
10682 btpy_insn_data, btpy_insn_decode): Remove code path for gaps.
10683 (recpy_bt_replay_position, recpy_bt_begin, recpy_bt_end): Call
10684 btpy_insn_or_gap_new instead of btpy_insn_new.
10685 (btpy_insn_getset): Remove btpy_insn_error.
10686 * py-record.c (recpy_gap_type): New static object.
10687 (recpy_gap_object): New typedef.
10688 (recpy_gap_new, recpy_gap_number, recpy_gap_reason_code,
10689 recpy_gap_reason_string): New function.
10690 (recpy_gap_getset): New static object.
10691 (gdbpy_initialize_record): Initialize gdb.RecordGap type.
10692 * py-record.h (recpy_gap_new): New export.
10694 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
10696 * python/py-record.c (recpy_ptid): Remove.
10697 (recpy_record_getset): Remove recpy_ptid.
10699 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
10701 * btrace.c (btrace_fetch): Set inferior_ptid.
10702 * python/py-record-btrace.c: Add "py-record.h" include.
10703 (recpy_bt_format, recpy_bt_replay_position, recpy_bt_begin,
10704 recpy_bt_end, recpy_bt_instruction_history,
10705 recpy_bt_function_call_history, recpy_bt_goto): Use ptid stored
10706 in gdb.Record object instead of current ptid.
10707 * python/py-record.c: Include new "py-record.h" file.
10708 (recpy_record_object): Moved to py-record.h.
10709 * python/py-record.h: New file.
10711 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
10713 * python/py-record-btrace.c (BTPY_REQUIRE_VALID_INSN,
10714 BTPY_REQUIRE_VALID_CALL, recpy_bt_function_call_history): Fix
10717 2017-05-01 Joel Brobecker <brobecker@adacore.com>
10719 * MAINTAINERS: Move Daniel Jacobowitz and Mark Kettenis to
10720 the past maintainers section.
10722 2017-04-28 Yao Qi <yao.qi@linaro.org>
10724 * infcmd.c (get_return_value): Use regcache ctor, and remove
10727 2017-04-28 Yao Qi <yao.qi@linaro.org>
10728 Pedro Alves <palves@redhat.com>
10730 * regcache.c (regcache::regcache): New tag dispatch ctor.
10731 (do_cooked_read): Moved above.
10732 (regcache_dup): Use the tag dispatch ctor..
10733 * regcache.h (regcache): Declare ctor, delete copy ctor and
10734 assignment operator, remove friend regcache_dup.
10736 2017-04-28 Yao Qi <yao.qi@linaro.org>
10738 * regcache.c (regcache_dup): Assert !src->m_readonly_p and
10739 call method save instead of regcache_cpy.
10740 * regcache.h (struct regcache): Make regcache_dup a friend.
10742 2017-04-28 Yao Qi <yao.qi@linaro.org>
10744 * regcache.c (struct regcache): Move to regcache.h
10745 (regcache::arch): New method.
10746 (regcache_get_ptid): Update.
10747 (get_regcache_arch): Call arch method.
10748 (get_regcache_aspace): Call method aspace.
10749 (register_buffer): Change it to method.
10750 (regcache_save): Change it to regcache::save.
10751 (regcache_restore): Likewise.
10752 (regcache_cpy_no_passthrough): Remove the declaration.
10753 (regcache_cpy): Call methods restore and cpy_no_passthrough.
10754 (regcache_cpy_no_passthrough): Change it to method
10755 cpy_no_passthrough.
10756 (regcache_register_status): Change it to method
10757 get_register_status.
10758 (regcache_invalidate): Change it to method invalidate.
10759 (regcache_thread_ptid_changed): Use methods ptid and set_ptid.
10760 (regcache_raw_update): Change it to method raw_update.
10761 (regcache_raw_read): Likewise.
10762 (regcache_raw_read_signed): Likewise.
10763 (regcache_raw_read_unsigned): Likewise.
10764 (regcache_raw_write_signed): Likewise.
10765 (regcache_raw_write_unsigned): Likewise.
10766 (regcache_cooked_read): Likewise.
10767 (regcache_cooked_read_value): Likewise.
10768 (regcache_cooked_read_signed): Likewise.
10769 (regcache_cooked_read_unsigned): Likewise.
10770 (regcache_cooked_write_signed): Likewise.
10771 (regcache_cooked_write_unsigned): Likewise.
10772 (regcache_raw_set_cached_value): Likewise.
10773 (regcache_raw_write): Likewise.
10774 (regcache_cooked_write): Likewise.
10775 (regcache_xfer_part): Likewise.
10776 (regcache_raw_read_part): Likewise.
10777 (regcache_raw_write_part): Likewise.
10778 (regcache_cooked_read_part): Likewise.
10779 (regcache_cooked_write_part): Likewise.
10780 (regcache_raw_supply): Likewise.
10781 (regcache_raw_collect): Likewise.
10782 (regcache_transfer_regset): Likewise.
10783 (regcache_supply_regset): Likewise.
10784 (regcache_collect_regset): Likewise.
10785 (regcache_debug_print_register): Likewise.
10786 (enum regcache_dump_what): Move it to regcache.h.
10787 (regcache_dump): Change it to method dump.
10788 * regcache.h (enum regcache_dump_what): New.
10789 (class regcache): New.
10790 * target.c (target_fetch_registers): Call method
10791 debug_print_register.
10792 (target_store_registers): Likewise.
10794 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
10796 * windows-nat.c (struct lm_info_windows): Initialize field.
10797 (windows_make_so): Allocate lm_info_windows with new.
10798 (windows_free_so): Free lm_info_windows with delete.
10800 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
10802 * solib-darwin.c (struct lm_info_darwin): Initialize field.
10803 (darwin_current_sos): Allocate lm_info_darwin with new, remove
10805 (darwin_free_so): Free lm_info_darwin with delete.
10807 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
10809 * solib-svr4.h (struct lm_info_svr4): Initialize fields.
10810 <l_addr_p>: Change type to bool.
10811 * solib-svr4.c (lm_info_read): Allocate lm_info_svr4 with new.
10812 (svr4_free_so): Free lm_info_svr4 with delete.
10813 (svr4_copy_library_list): Replace memcpy with call to copy
10815 (library_list_start_library, svr4_default_sos): Allocate
10816 lm_info_svr4 with new.
10818 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
10820 * solib-target.c (struct lm_info_target): Add destructor,
10822 <name>: Change type to std::string.
10823 (library_list_start_library): Allocate lm_info_target with new.
10824 (solib_target_free_library_list): Free lm_info_target with
10826 (solib_target_current_sos): Adapt to std::string.
10827 (solib_target_free_so): Free lm_info_target with delete.
10829 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
10831 * solib-frv.c (struct lm_info_frv): Add destructor, initialize
10833 (frv_current_sos): Allocate lm_info_frv with new.
10834 (frv_relocate_main_executable): Free lm_info_frv with delete,
10836 (frv_clear_solib, frv_free_so): Free lm_info_frv with delete.
10838 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
10840 * solib-frv.c (struct lm_info_frv): Fix indentation.
10842 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
10844 * solib-dsbt.c (struct lm_info_dsbt): Add destructor, initialize
10846 (dsbt_current_sos): Allocate lm_info_dsbt with new.
10847 (dsbt_relocate_main_executable): Free lm_info_dsbt with delete
10848 and allocate with new.
10849 (dsbt_clear_solib, dsbt_free_so): Free lm_info_dsbt with delete.
10851 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
10853 * solib-aix.c (struct lm_info_aix): Initialize fields in-class.
10854 <filename, member_name>: Change type to std::string.
10855 (solib_aix_new_lm_info, solib_aix_xfree_lm_info): Remove.
10856 (library_list_start_library): Allocate lm_info_aix with new.
10857 (solib_aix_free_library_list, solib_aix_free_so): Free with delete.
10858 (solib_aix_current_sos): Adapt to std::string, copy lm_info_aix
10859 with copy constructor.
10861 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
10863 * solist.h (struct lm_info): Remove.
10864 (struct lm_info_base): New class.
10865 (struct so_list) <lm_info>: Change type to lm_info_base *.
10866 * nto-tdep.c (struct lm_info): Remove.
10868 * solib-aix.c (struct lm_info): Rename to ...
10869 (struct lm_info_aix): ... this. Extend lm_info_base.
10870 (lm_info_p): Rename to ...
10871 (lm_info_aix_p): ... this, and adjust.
10872 (solib_aix_new_lm_info, solib_aix_xfree_lm_info,
10873 solib_aix_parse_libraries, library_list_start_library,
10874 solib_aix_free_library_list, solib_aix_parse_libraries,
10875 solib_aix_get_library_list,
10876 solib_aix_relocate_section_addresses, solib_aix_free_so,
10877 solib_aix_get_section_offsets,
10878 solib_aix_solib_create_inferior_hook, solib_aix_current_sos):
10880 (struct solib_aix_inferior_data) <library_list>: Adjust.
10881 * solib-darwin.c (struct lm_info): Rename to ...
10882 (struct lm_info_darwin): ... this. Extend lm_info_base.
10883 (darwin_current_sos, darwin_relocate_section_addresses): Adjust.
10884 * solib-dsbt.c (struct lm_info): Rename to ...
10885 (struct lm_info_dsbt): ... this. Extend lm_info_base.
10886 (struct dsbt_info) <main_executable_lm_info): Adjust.
10887 (dsbt_current_sos, dsbt_relocate_main_executable, dsbt_free_so,
10888 dsbt_relocate_section_addresses): Adjust.
10889 * solib-frv.c (struct lm_info): Rename to ...
10890 (struct lm_info_frv): ... this. Extend lm_info_base.
10891 (main_executable_lm_info): Adjust.
10892 (frv_current_sos, frv_relocate_main_executable, frv_free_so,
10893 frv_relocate_section_addresses, frv_fdpic_find_global_pointer,
10894 find_canonical_descriptor_in_load_object,
10895 frv_fdpic_find_canonical_descriptor): Adjust.
10896 * solib-svr4.c (struct lm_info): Move to solib-svr4.h, renamed
10898 (lm_info_read, lm_addr_check, svr4_keep_data_in_core,
10899 svr4_clear_so, svr4_copy_library_list,
10900 library_list_start_library, svr4_default_sos, svr4_read_so_list,
10901 svr4_current_sos, svr4_fetch_objfile_link_map,
10902 solist_update_incremental): Adjust.
10903 * solib-svr4.h (struct lm_info_svr4): Move here from
10905 * solib-target.c (struct lm_info): Rename to ...
10906 (struct lm_info_target): ... this. Extend lm_info_base.
10907 (lm_info_p): Rename to ...
10908 (lm_info_target_p): ... this.
10909 (solib_target_parse_libraries, library_list_start_segment,
10910 library_list_start_section, library_list_start_library,
10911 library_list_end_library, solib_target_free_library_list,
10912 solib_target_current_sos, solib_target_free_so,
10913 solib_target_relocate_section_addresses): Adjust.
10914 * windows-nat.c (struct lm_info): Rename to ...
10915 (struct lm_info_windows): ... this. Extend lm_info_base.
10916 (windows_make_so, handle_load_dll, handle_unload_dll,
10917 windows_xfer_shared_libraries): Adjust.
10919 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
10921 * solib-darwin.c (struct darwin_so_list): Remove.
10922 (darwin_current_sos): Allocate an so_list object instead of a
10923 darwin_so_list, separately allocate an lm_info object.
10924 (darwin_free_so): Free lm_info.
10926 2017-04-28 John Baldwin <jhb@FreeBSD.org>
10928 * mips-tdep.c (print_gp_register_row): Replace printf_filtered
10929 with fprintf_filtered.
10931 2017-04-28 Yao Qi <yao.qi@linaro.org>
10933 * regcache.c (regcache::regcache): New function.
10934 (regcache::~regcache): New function.
10935 (regcache_xmalloc_1): Remove.
10936 (regcache_xmalloc): Call new regcache.
10937 (regcache_xfree): Call delete regcache.
10938 (get_thread_arch_aspace_regcache): Call new regcache.
10940 2017-04-28 Yao Qi <yao.qi@linaro.org>
10942 * mips-linux-nat.c (mips_linux_new_thread): Use ptid method
10943 lwp instead of ptid_get_lwp.
10945 2017-04-28 Yao Qi <yao.qi@linaro.org>
10947 * mips-linux-nat.c (mips_linux_new_thread): Get lwpid from
10948 lwp_info instead of getting from inferior_ptid.
10950 2017-04-27 Keith Seitz <keiths@redhat.com>
10952 * gdbtypes.c (LVALUE_REFERENCE_TO_RVALUE_BINDING_BADNESS)
10953 DIFFERENT_REFERENCE_TYPE_BADNESS): Remove.
10954 (CV_CONVERSION_BADNESS): Define.
10955 (rank_one_type): Remove overly restrictive rvalue reference
10957 Add cv-qualifier checks and subranks for type equality.
10958 * gdbtypes.h (REFERENCE_CONVERSION_RVALUE,
10959 REFERENCE_CONVERSION_CONST_LVALUE, CV_CONVERSION_BADNESS,
10960 CV_CONVERSION_CONST, CV_CONVERSION_VOLATILE): Declare.
10962 2017-04-27 Simon Marchi <simon.marchi@ericsson.com>
10964 * python/py-inferior.c (inferior_to_inferior_object): Increment reference
10965 count when creating the object.
10967 2017-04-27 Sangamesh Mallayya <sangamesh.swamy@in.ibm.com>
10968 Ulrich Weigand <uweigand@de.ibm.com>
10970 * xcoffread.c (read_xcoff_symtab): Read correct function auxiliary
10971 entry if xlc -qfuncsect or gcc -ffunction-sections compiler option
10973 (read_xcoff_symtab): Handle C_WEAKEXT storage class.
10974 (process_xcoff_symbol): Likewise.
10975 (scan_xcoff_symtab): Likewise.
10977 2017-04-26 Alan Hayward <alan.hayward@arm.com>
10979 * ia64-tdep.c (examine_prologue): Use get_frame_register_unsigned.
10980 (ia64_sigtramp_frame_prev_register): Use read_memory_unsigned_integer.
10981 (ia64_access_reg): Use get_frame_register_unsigned.
10982 (ia64_access_rse_reg): Likewise.
10983 (ia64_libunwind_frame_prev_register): Likewise.
10985 2017-04-26 Jiong Wang <jiong.wang@arm.com>
10987 * gdbarch.sh: New gdbarch method execute_dwarf_cfa_vendor_op.
10988 * gdbarch.c: Regenerated.
10989 * gdbarch.h: Regenerated.
10990 * dwarf2-frame.c (dwarf2_frame_state_alloc_regs): Made the
10991 visibility external.
10992 (execute_cfa_program): Call execute_dwarf_cfa_vendor_op for CFI
10993 between DW_CFA_lo_user and DW_CFA_high_user inclusive.
10994 (enum cfa_how_kind): Move to ...
10995 (struct dwarf2_frame_state_reg_info): Likewise.
10996 (struct dwarf2_frame_state): Likewise.
10997 * dwarf2-frame.h: ... here.
10998 (dwarf2_frame_state_alloc_regs): New declaration.
10999 * sparc-tdep.c (sparc_execute_dwarf_cfa_vendor_op): New function.
11000 (sparc32_gdbarch_init): Register execute_dwarf_cfa_vendor_op hook.
11002 2017-04-26 Alan Hayward <alan.hayward@arm.com>
11004 * xtensa-tdep.c (xtensa_pseudo_register_read): Use
11005 regcache_raw_read_unsigned.
11006 (xtensa_pseudo_register_write): Likewise.
11008 2017-04-26 Alan Hayward <alan.hayward@arm.com>
11010 * nds32-tdep.c (nds32_pseudo_register_read): Abort on errors.
11011 (nds32_pseudo_register_write): Likewise.
11013 2017-04-25 Yao Qi <yao.qi@linaro.org>
11015 * regcache.c (struct regcache) <readonly_p>: Change its type
11017 (regcache_xmalloc_1): Update parameter type and callers update.
11019 2017-04-25 Yao Qi <yao.qi@linaro.org>
11021 * aarch64-tdep.c (aarch64_gdbarch_init): Don't call
11022 set_gdbarch_wchar_bit.
11023 * arm-tdep.c (arm_gdbarch_init): Likewise.
11025 2017-04-25 Pedro Alves <palves@redhat.com>
11027 * common/poison.h [!HAVE_IS_TRIVIALLY_COPYABLE] (IsRelocatable)
11028 (BothAreRelocatable, memcopy, memmove): Don't define.
11029 * common/traits.h (__has_feature, HAVE_IS_TRIVIALLY_COPYABLE): New
11032 2017-04-25 Pedro Alves <palves@redhat.com>
11034 * common/common-defs.h: Include "common/poison.h".
11035 * common/function-view.h: (Not, Or, Requires): Move to traits.h
11037 * common/poison.h: New file.
11038 * common/traits.h: Include <type_traits>.
11039 (Not, Or, Requires): New, moved from common/function-view.h.
11041 2017-04-25 Pedro Alves <palves@redhat.com>
11043 * breakpoint.h (struct breakpoint): In-class initialize all
11044 fields. Make boolean fields "bool".
11045 * breakpoint.c (init_raw_breakpoint_without_location): Remove
11046 memset call and initializations no longer necessary.
11048 2017-04-25 Pedro Alves <palves@redhat.com>
11050 * btrace.c (pt_btrace_insn_flags): Change parameter type to
11052 (pt_btrace_insn): New function.
11053 (ftrace_add_pt): Remove memset call and use pt_btrace_insn.
11055 2017-04-25 Pedro Alves <palves@redhat.com>
11057 * ada-lang.c (ada_catchpoint_location): Now a "class". Remove
11058 "base" field and inherit from "bp_location" instead. Add
11060 (allocate_location_exception): Use new non-default ctor.
11061 * breakpoint.c (get_first_locp_gte_addr): Remove memset call.
11062 (init_bp_location): Convert to ...
11063 (bp_location::bp_location): ... this new ctor, and remove memset
11065 (base_breakpoint_allocate_location): Use the new non-default ctor.
11066 * breakpoint.h (bp_location): Now a class. Declare default and
11067 non-default ctors. In-class initialize all members.
11068 (init_bp_location): Remove declaration.
11070 2017-04-25 Pedro Alves <palves@redhat.com>
11072 * common/enum-flags.h (enum_flags): Don't implement copy ctor and
11073 assignment operator.
11075 2017-04-24 Yao Qi <yao.qi@linaro.org>
11077 * doublest.c (convert_doublest_to_floatformat): Call
11078 floatformat_totalsize_bytes.
11080 2017-04-22 Tom Tromey <tom@tromey.com>
11082 * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries): Use
11084 * stack.c (print_frame): Use ui_out_emit_list.
11085 * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Use
11087 * mi/mi-main.c (print_one_inferior)
11088 (mi_cmd_data_list_register_names)
11089 (mi_cmd_data_list_register_values, mi_cmd_list_features)
11090 (mi_cmd_list_target_features, mi_cmd_trace_frame_collected): Use
11092 * mi/mi-interp.c (mi_on_normal_stop_1): Use ui_out_emit_list.
11093 (mi_output_solib_attribs): Use ui_out_emit_list,
11095 * mi/mi-cmd-var.c (varobj_update_one): Use ui_out_emit_list.
11096 * mi/mi-cmd-stack.c (mi_cmd_stack_list_frames)
11097 (mi_cmd_stack_list_args, list_args_or_locals): Use
11099 * disasm.c (do_assembly_only): Use ui_out_emit_list.
11100 * breakpoint.c (print_solib_event, output_thread_groups): Use
11103 2017-04-22 Tom Tromey <tom@tromey.com>
11105 * mi/mi-main.c (print_variable_or_computed): Use ui_out_emit_tuple.
11106 * mi/mi-cmd-var.c (varobj_update_one): Use ui_out_emit_tuple.
11107 * mi/mi-cmd-stack.c (list_arg_or_local): Use ui_out_emit_tuple.
11109 2017-04-22 Tom Tromey <tom@tromey.com>
11111 * tracepoint.c (tvariables_info_1)
11112 (print_one_static_tracepoint_marker): Use ui_out_emit_tuple.
11114 2017-04-22 Tom Tromey <tom@tromey.com>
11116 * stack.c (print_frame_arg): Use ui_out_emit_tuple,
11117 annotate_arg_emitter.
11118 * breakpoint.c (print_mention_watchpoint)
11119 (print_mention_masked_watchpoint): Use ui_out_emit_tuple.
11120 * annotate.h (struct annotate_arg_emitter): New.
11122 2017-04-22 Tom Tromey <tom@tromey.com>
11124 * record-btrace.c (record_btrace_insn_history)
11125 (record_btrace_insn_history_range, record_btrace_call_history)
11126 (record_btrace_call_history_range): Use ui_out_emit_tuple.
11127 * thread.c (do_captured_list_thread_ids, print_thread_info_1): Use
11129 * stack.c (print_frame_info): Use ui_out_emit_tuple.
11130 * solib.c (info_sharedlibrary_command): Use ui_out_emit_tuple.
11131 * skip.c (skip_info): Use ui_out_emit_tuple.
11132 * remote.c (show_remote_cmd): Use ui_out_emit_tuple.
11133 * progspace.c (print_program_space): Use ui_out_emit_tuple.
11134 * probe.c (info_probes_for_ops): Use ui_out_emit_tuple.
11135 * osdata.c (info_osdata): Use ui_out_emit_tuple.
11136 * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Use
11138 * mi/mi-main.c (print_one_inferior, list_available_thread_groups)
11139 (output_register, mi_cmd_data_read_memory)
11140 (mi_cmd_data_read_memory_bytes, mi_load_progress)
11141 (mi_cmd_trace_frame_collected): Use ui_out_emit_tuple.
11142 * mi/mi-cmd-var.c (mi_cmd_var_list_children, varobj_update_one):
11143 Use ui_out_emit_tuple.
11144 * mi/mi-cmd-stack.c (mi_cmd_stack_list_args): Use
11146 * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions)
11147 (mi_cmd_info_gdb_mi_command): Use ui_out_emit_tuple.
11148 * linux-thread-db.c (info_auto_load_libthread_db): Use
11150 * inferior.c (print_inferior): Use ui_out_emit_tuple.
11151 * gdb_bfd.c (print_one_bfd): Use ui_out_emit_tuple.
11152 * disasm.c (do_mixed_source_and_assembly_deprecated)
11153 (do_mixed_source_and_assembly): Use ui_out_emit_tuple.
11154 * cp-abi.c (list_cp_abis): Use ui_out_emit_tuple.
11155 * cli/cli-setshow.c (cmd_show_list): Use ui_out_emit_tuple.
11156 * breakpoint.c (print_one_breakpoint_location)
11157 (print_one_breakpoint): Use ui_out_emit_tuple.
11158 * auto-load.c (print_script, info_auto_load_cmd): Use
11160 * ada-tasks.c (print_ada_task_info): Use ui_out_emit_tuple.
11162 2017-04-21 Simon Marchi <simon.marchi@ericsson.com>
11164 * thread.c (print_thread_info_1): Remove dead code.
11166 2017-04-21 Jan Kratochvil <jan.kratochvil@redhat.com>
11168 * aarch64-tdep.c (selftests::aarch64_process_record_test): Make it #if
11170 * arm-tdep.c (selftests::arm_record_test): Likewise.
11172 2017-04-21 Yao Qi <yao.qi@linaro.org>
11174 * regcache.c (regcache_restore): Remove argument 2. Replace
11175 argument 3 with regcache. Get register status from
11176 src->register_status and get register contents from
11177 register_buffer (src, regnum).
11178 (regcache_cpy): Update.
11180 2017-04-19 Pedro Alves <palves@redhat.com>
11182 * gdbthread.h (thread): Add missing closing parenthesis in
11185 2017-04-19 Pedro Alves <palves@redhat.com>
11187 * common/refcounted-object.h: New file.
11188 * gdbthread.h: Include "common/refcounted-object.h".
11189 (thread_info): Inherit from refcounted_object and add comments.
11190 (thread_info::incref, thread_info::decref)
11191 (thread_info::m_refcount): Delete.
11192 (thread_info::deletable): Use the refcounted_object::refcount()
11194 * inferior.c (current_inferior_): Add comment.
11195 (set_current_inferior): Increment/decrement refcounts.
11196 (prune_inferiors, remove_inferior_command): Skip inferiors marked
11197 not-deletable instead of comparing with the current inferior.
11198 (initialize_inferiors): Increment the initial inferior's refcount.
11199 * inferior.h (struct inferior): Forward declare.
11200 Include "common/refcounted-object.h".
11201 (current_inferior, set_current_inferior): Move declaration to
11202 before struct inferior's definition, and fix comment.
11203 (inferior): Inherit from refcounted_object. Add comments.
11204 * thread.c (switch_to_thread_no_regs): Reference the thread's
11205 inferior pointer directly instead of doing a ptid lookup.
11206 (switch_to_no_thread): New function.
11207 (switch_to_thread(thread_info *)): New function, factored out
11209 (switch_to_thread(ptid_t)): ... this.
11210 (restore_current_thread): Delete.
11211 (current_thread_cleanup): Remove 'inf_id' and 'was_removable'
11212 fields, and add 'inf' field.
11213 (do_restore_current_thread_cleanup): Check whether old->inf is
11214 alive instead of looking up an inferior by ptid. Use
11215 switch_to_thread and switch_to_no_thread.
11216 (restore_current_thread_cleanup_dtor): Use old->inf directly
11217 instead of lookup up an inferior by id. Decref the inferior.
11218 Don't restore 'removable'.
11219 (make_cleanup_restore_current_thread): Same the inferior pointer
11220 in old, instead of the inferior number. Incref the inferior.
11221 Don't save/clear 'removable'.
11223 2017-04-19 Pedro Alves <palves@redhat.com>
11225 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
11226 unittests/scoped_restore-selftests.c.
11227 (SUBDIR_UNITTESTS_OBS): Add scoped_restore-selftests.o.
11228 * common/scoped_restore.h (scoped_restore_base): Make "class".
11229 (scoped_restore_base::release): New public method.
11230 (scoped_restore_base::scoped_restore_base): New protected ctor.
11231 (scoped_restore_base::m_saved_var): New protected field.
11232 (scoped_restore_tmpl::scoped_restore_tmpl(T*)): Initialize the
11233 scoped_restore_base base class instead of m_saved_var directly.
11234 (scoped_restore_tmpl::scoped_restore_tmpl(T*, T2)): Likewise.
11235 (scoped_restore_tmpl::scoped_restore_tmpl(const
11236 scoped_restore_tmpl<T>&)): Likewise.
11237 (scoped_restore_tmpl::~scoped_restore_tmpl): Use the saved_var
11239 (scoped_restore_tmpl::saved_var): New method.
11240 (scoped_restore_tmpl::m_saved_var): Delete.
11241 * inferior.h (inferior::detaching): Now a bool.
11242 * infrun.c (prepare_for_detach): Use a scoped_restore instead of a
11244 * unittests/scoped_restore-selftests.c: New file.
11246 2017-04-19 Pedro Alves <palves@redhat.com>
11248 * Makefile.in (SUBDIR_UNITTESTS_SRCS, SUBDIR_UNITTESTS_OBS):
11249 Re-sort in alphabetic order.
11251 2017-04-18 Pedro Alves <palves@redhat.com>
11253 * xml-support.c (obstack_xml_printf): Delete.
11254 * xml-support.h (obstack_xml_printf): Delete.
11256 2017-04-18 Pedro Alves <palves@redhat.com>
11258 * xml-support.c (gdb_xml_parser) <use_dtd, dtd_name, parse,
11259 vdebug, verror, body_text, start_element, end_element, name,
11260 user_data, set_is_xinclude, set_error, expat_parser>: New methods.
11261 <name, user_data, expat_parser, scopes, error, last_line, dtd_name,
11262 is_xinclude>: Make private and add m_ prefix.
11263 (gdb_xml_parser::body_text): New method, based on ...
11264 (gdb_xml_body_text): ... this. Adjust.
11265 (gdb_xml_parser::vdebug): New method, based on ...
11266 (gdb_xml_debug): ... this. Adjust.
11267 (gdb_xml_parser::verror): New method, based on ...
11268 (gdb_xml_error): ... this. Adjust.
11269 (gdb_xml_parser::start_element): New method, based on ...
11270 (gdb_xml_start_element): ... this. Adjust.
11271 (gdb_xml_start_element_wrapper): Defer to
11272 gdb_xml_parser::start_element and gdb_xml_parser::set_error.
11273 (gdb_xml_parser::end_element): New method, based on ...
11274 (gdb_xml_end_element_wrapper): ... this. Adjust.
11275 (gdb_xml_parser::~gdb_xml_parser): Adjust.
11276 (gdb_xml_parser::gdb_xml_parser): Adjust to field renames.
11277 (gdb_xml_parser::use_dtd): New method, based on ...
11278 (gdb_xml_use_dtd): ... this. Adjust.
11279 (gdb_xml_parser::parse): New method, based on ...
11280 (gdb_xml_parse): ... this. Adjust.
11281 (gdb_xml_parse_quick): Adjust to call the parser's parse method.
11282 (xinclude_start_include): Adjust to call the parser's name method.
11283 (xml_xinclude_default, xml_xinclude_start_doctype)
11284 (xml_xinclude_end_doctype): Adjust to call the parser's user_data
11286 (xml_process_xincludes): Adjust to call parser methods.
11287 * xml-support.h (gdb_xml_use_dtd, gdb_xml_parse): Delete
11290 2017-04-18 Pedro Alves <palves@redhat.com>
11292 * tracefile-tfile.c (tfile_write_tdesc): Adjust to use
11293 gdb::optional<std::string>.
11294 * xml-support.c: Include <string>.
11295 (scope_level::scope_level(scope_level &&))
11296 (scope_level::~scope_level): Delete.
11297 (scope_level::body): Now a std::string.
11298 (gdb_xml_body_text, gdb_xml_end_element): Adjust.
11299 (xinclude_parsing_data::xinclude_parsing_data): Add 'output'
11301 (xinclude_parsing_data::~xinclude_parsing_data): Delete.
11302 (xinclude_parsing_data::output): Now a std::string reference.
11303 (xinclude_start_include): Adjust.
11304 (xml_xinclude_default): Adjust.
11305 (xml_process_xincludes): Add 'output' parameter, and return bool.
11306 * xml-support.h (xml_process_xincludes): Add 'output' parameter,
11308 * xml-tdesc.c: Include <unordered_map> and <string>.
11309 (tdesc_xml_cache): Delete.
11310 (tdesc_xml_cache_s): Delete.
11311 (xml_cache): Now an std::unordered_map.
11312 (tdesc_parse_xml): Adjust to use std::string and unordered_map.
11313 (target_fetch_description_xml): Change return type to
11314 gdb::optional<std::string>, and adjust.
11315 * xml-tdesc.h: Include "common/gdb_optional.h" and <string>.
11316 (target_fetch_description_xml): Change return type to
11317 gdb::optional<std::string>.
11319 2017-04-18 Pedro Alves <palves@redhat.com>
11321 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
11322 unittests/optional-selftests.c.
11323 (SUBDIR_UNITTESTS_OBS): Add optional-selftests.o.
11324 * unittests/optional-selftests.c: New file.
11325 * unittests/optional/assignment/1.cc: New file.
11326 * unittests/optional/assignment/2.cc: New file.
11327 * unittests/optional/assignment/3.cc: New file.
11328 * unittests/optional/assignment/4.cc: New file.
11329 * unittests/optional/assignment/5.cc: New file.
11330 * unittests/optional/assignment/6.cc: New file.
11331 * unittests/optional/assignment/7.cc: New file.
11332 * unittests/optional/cons/copy.cc: New file.
11333 * unittests/optional/cons/default.cc: New file.
11334 * unittests/optional/cons/move.cc: New file.
11335 * unittests/optional/cons/value.cc: New file.
11336 * unittests/optional/in_place.cc: New file.
11337 * unittests/optional/observers/1.cc: New file.
11338 * unittests/optional/observers/2.cc: New file.
11340 2017-04-18 Pedro Alves <palves@redhat.com>
11342 * common/gdb_optional.h: Include common/traits.h.
11343 (in_place_t): New type.
11344 (in_place): New constexpr variable.
11345 (optional::optional): Remove member initialization of
11347 (optional::optional(in_place_t...)): New constructor.
11348 (optional::~optional): Use reset.
11349 (optional::optional(const optional&)): New.
11350 (optional::optional(const optional&&)): New.
11351 (optional::optional(T &)): New.
11352 (optional::optional(T &&)): New.
11353 (operator::operator=(const optional &)): New.
11354 (operator::operator=(optional &&)): New.
11355 (operator::operator= (const T &))
11356 (operator::operator= (T &&))
11357 (operator::emplace (Args &&... args)): Return a T&. Use reset.
11358 (operator::reset): New.
11359 (operator::m_instantiated):: Add in-class initializer.
11360 * common/traits.h: Include <type_traits>.
11361 (struct And): New types.
11363 2017-04-18 Pedro Alves <palves@redhat.com>
11365 * xml-support.c: Include <vector>.
11366 (scope_level::scope_level(const gdb_xml_element *))
11367 (scope_level::scope_level(scope_level&&)): New.
11368 (scope_level::~scope_level): New.
11369 (scope_level_s): Delete.
11370 (gdb_xml_parser::scopes): Now a std::vector.
11371 (gdb_xml_body_text, gdb_xml_start_element, gdb_xml_end_element):
11373 (gdb_xml_parser::~gdb_xml_parser): Remove now unnecessary
11374 scope cleanup code.
11375 (gdb_xml_parser::gdb_xml_parser): Remove explicit initialization
11376 of the scopes member. Use std::vector::emplace_back.
11378 2017-04-18 Pedro Alves <palves@redhat.com>
11380 * xml-support.c (gdb_xml_parser): Add ctor/dtor. Make is_xinclude
11382 (gdb_xml_end_element): Change type of first parameter.
11383 (gdb_xml_cleanup): Rename to ...
11384 (gdb_xml_parser::~gdb_xml_parser): ... this.
11385 (gdb_xml_create_parser_and_cleanup): Delete with ...
11386 (gdb_xml_parser::gdb_xml_parser): ... creation parts factored out
11388 (gdb_xml_parse_quick): Create a local gdb_xml_parser instead of
11389 using gdb_xml_create_parser_and_cleanup.
11390 (xinclude_parsing_data): Add ctor/dtor.
11391 (xml_xinclude_cleanup): Delete.
11392 (xml_process_xincludes): Create a local xinclude_parsing_data
11393 instead of heap-allocating one. Create a local gdb_xml_parser
11394 instead of heap-allocating one with
11395 gdb_xml_create_parser_and_cleanup.
11397 2017-04-18 John Baldwin <jhb@FreeBSD.org>
11400 * fbsd-nat.c (resume_one_thread_cb): Remove.
11401 (resume_all_threads_cb): Remove.
11402 (fbsd_resume): Use ALL_NON_EXITED_THREADS instead of
11403 iterate_over_threads.
11405 2017-04-17 Joel Brobecker <brobecker@adacore.com>
11407 * NEWS: Create a new section for the next release branch.
11408 Rename the section of the current branch, now that it has
11411 2017-04-17 Joel Brobecker <brobecker@adacore.com>
11413 GDB 8.0 branch created (725bf5cf125783c2a7ca4ab63d3768e220bab2db):
11414 * version.in: Bump version to 8.0.50.DATE-git.
11416 2017-04-13 Sergio Durigan Junior <sergiodj@redhat.com>
11419 * windows-nat.c (windows_create_inferior): Declare 'allargs'
11420 independently of the host, and fix build breakage on Cygwin.
11422 2017-04-13 Pedro Alves <palves@redhat.com>
11424 * inferior.c (free_inferior): Convert to ...
11425 (inferior::~inferior): ... this dtor.
11426 (inferior::inferior): New ctor, factored out from ...
11427 (add_inferior_silent): ... here. Allocate the inferior with a new
11429 (delete_inferior): Call delete instead of free_inferior.
11430 * inferior.h (gdb_environ, continuation): Forward declare.
11431 (inferior): Now a class. Add in-class initialization to all
11432 members. Make boolean fields bool, except 'detaching'.
11433 (inferior::inferior): New explicit ctor.
11434 (inferior::~inferior): New.
11436 2017-04-13 Pedro Alves <palves@redhat.com>
11438 * inferior.c (init_inferior_list): Delete.
11439 * inferior.h (init_inferior_list): Delete.
11441 2017-04-13 Pedro Alves <palves@redhat.com>
11444 * gdb.threads/threadapply.exp (thr_apply_detach): New procedure.
11445 (top level): Call it twice, with different thread sets.
11447 2017-04-13 Pedro Alves <palves@redhat.com>
11449 * thread.c: Include <algorithm>.
11450 (thread_array_cleanup): Delete.
11451 (scoped_inc_dec_ref): New class.
11452 (live_threads_count): New function.
11453 (set_thread_refcount): Delete.
11454 (tp_array_compar_ascending): Now a bool.
11455 (tp_array_compar): Convert to a std::sort comparison function.
11456 (thread_apply_all_command): Use std::vector and scoped_inc_dec_ref
11457 and live_threads_count.
11459 2017-04-13 Pedro Alves <palves@redhat.com>
11461 * infrun.c (follow_fork_inferior): Also switch the current
11464 2017-04-13 Pedro Alves <palves@redhat.com>
11466 * breakpoint.c (watch_command_1): Save watchpoint-frame info
11467 before calling create_internal_breakpoint.
11469 2017-04-13 Pedro Alves <palves@redhat.com>
11471 * fork-child.c (execv_argv): New class.
11472 (breakup_args): Refactored as ...
11473 (execv_argv::init_for_no_shell): .. this method of execv_argv.
11474 Copy arguments to storage and replace separators with NULL
11475 terminators in place.
11476 (escape_bang_in_quoted_argument): Adjust to return bool.
11477 (execv_argv::execv_argv): New ctor.
11478 (execv_argv::init_for_shell): New method, factored out from
11479 fork_inferior. Don't strdup strings into the vector.
11480 (fork_inferior): Eliminate "shell" local and use execv_argv. Use
11481 Remove free_vector_argv call.
11483 2017-04-13 Yao Qi <yao.qi@linaro.org>
11485 * rx-tdep.c (rx_fpsw_type): Check tdep->rx_fpsw_type instead of
11488 2017-04-13 Yao Qi <yao.qi@linaro.org>
11490 * rl78-tdep.c (rl78_gdbarch_init): Use XCNEW instead of XNEW.
11491 * rx-tdep.c (rx_gdbarch_init): Likewise.
11493 2017-04-13 Pedro Alves <palves@redhat.com>
11495 * breakpoint.h (struct breakpoint): Reindent.
11497 2017-04-13 Pedro Alves <palves@redhat.com>
11499 * breakpoint.c (bp_location): Rename to ...
11500 (bp_locations): ... this. All references updated.
11501 (bp_location_count): Rename to ...
11502 (bp_locations_count): ... this. All references updated.
11503 (bp_location_placed_address_before_address_max): Rename to ...
11504 (bp_locations_placed_address_before_address_max): ... this. All
11505 references updated.
11506 (bp_location_shadow_len_after_address_max): Rename to ...
11507 (bp_locations_shadow_len_after_address_max): ... this. All
11508 references updated.
11509 (bp_location_compare_addrs): Rename to ...
11510 (bp_locations_compare_addrs): ... this. All references updated.
11511 (bp_location_compare):Rename to ...
11512 (bp_locations_compare): ... this. All references updated.
11513 (bp_location_target_extensions_update): Rename to ...
11514 (bp_locations_target_extensions_update): ... this. All references
11517 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
11519 * Makefile.in (HFILES_NO_SRCDIR): Add "common/gdb_termios.h".
11520 * common/common.m4: Check headers 'termios.h', 'termio.h' and
11522 * common/gdb_termios.h: New file, with parts of "terminal.h".
11523 * inflow.c: Include "gdb_termios.h".
11524 * ser-unix.c: Include "gdb_termios.h".
11525 * terminal.h: Move terminal-related defines to
11526 "common/gdb_termios.h".
11528 2017-04-12 Tom Tromey <tom@tromey.com>
11530 * probe.c (parse_probes): Update.
11531 * location.h (delete_event_location): Don't declare.
11532 (event_location_deleter::operator()): Update.
11533 * location.c (event_location_deleter::operator()): Rename from
11534 delete_event_location.
11535 * linespec.h (linespec_result) <location>: Change type to
11537 * linespec.c (canonicalize_linespec, event_location_to_sals)
11538 (decode_objc): Update.
11539 (linespec_result): Don't call delete_event_location.
11540 * breakpoint.c (create_breakpoints_sal)
11541 (bkpt_probe_create_sals_from_location)
11542 (strace_marker_create_sals_from_location): Update.
11544 2017-04-12 Tom Tromey <tom@tromey.com>
11546 * linespec.h (struct linespec_result): Add constructor and
11548 (init_linespec_result, destroy_linespec_result)
11549 (make_cleanup_destroy_linespec_result): Don't declare.
11550 * linespec.c (init_linespec_result): Remove.
11551 (linespec_result::~linespec_result): Rename from
11552 destroy_linespec_result. Update.
11553 (cleanup_linespec_result, make_cleanup_destroy_linespec_result):
11555 * breakpoint.c (create_breakpoint, break_range_command)
11556 (decode_location_default): Update.
11557 * ax-gdb.c (agent_command_1): Update.
11559 2017-04-12 Tom Tromey <tom@tromey.com>
11561 * remote.c (remote_download_tracepoint): Update.
11562 * python/py-breakpoint.c (bppy_get_location): Update.
11563 * guile/scm-breakpoint.c (bpscm_print_breakpoint_smob)
11564 (gdbscm_breakpoint_location): Update.
11565 * elfread.c (elf_gnu_ifunc_resolver_return_stop): Update.
11566 * breakpoint.h (struct breakpoint) <location, location_range_end>:
11567 Change type to event_location_up.
11568 * breakpoint.c (create_overlay_event_breakpoint)
11569 (create_longjmp_master_breakpoint)
11570 (create_std_terminate_master_breakpoint)
11571 (create_exception_master_breakpoint)
11572 (breakpoint_event_location_empty_p, print_breakpoint_location)
11573 (print_one_breakpoint_location, create_thread_event_breakpoint)
11574 (init_breakpoint_sal, create_breakpoint)
11575 (print_recreate_ranged_breakpoint, break_range_command)
11576 (init_ada_exception_breakpoint, say_where): Update.
11577 (base_breakpoint_dtor): Don't call delete_event_location.
11578 (bkpt_print_recreate, tracepoint_print_recreate)
11579 (dprintf_print_recreate, update_static_tracepoint)
11580 (breakpoint_re_set_default): Update.
11582 2017-04-12 Tom Tromey <tom@tromey.com>
11584 * compile/compile-loc2c.c (compute_stack_depth_worker): Change
11585 type of "to_do". Update.
11586 (compute_stack_depth): Use std::vector.
11588 2017-04-12 Tom Tromey <tom@tromey.com>
11590 * printcmd.c (find_instruction_backward): Use std::vector.
11592 2017-04-12 Tom Tromey <tom@tromey.com>
11594 * symfile.c (objfilep): Remove typedef.
11595 (reread_symbols): Use a std::vector.
11597 2017-04-12 Tom Tromey <tom@tromey.com>
11599 * mi/mi-main.c (exec_direction_forward): Remove.
11600 (exec_reverse_continue, mi_execute_command): Use scoped_restore.
11601 * guile/scm-ports.c (ioscm_with_output_to_port_worker): Use
11603 * guile/guile.c (guile_repl_command, guile_command)
11604 (gdbscm_execute_gdb_command): Use scoped_restore.
11605 * go-exp.y (go_parse): Use scoped_restore.
11606 * d-exp.y (d_parse): Use scoped_restore.
11607 * cli/cli-decode.c (cmd_func): Use scoped_restore.
11608 * c-exp.y (c_parse): Use scoped_restore.
11610 2017-04-12 Tom Tromey <tom@tromey.com>
11612 * mi/mi-parse.h (struct mi_parse): Add constructor, destructor.
11613 (mi_parse): Update return type.
11614 (mi_parse_free): Remove.
11615 * mi/mi-parse.c (mi_parse::mi_parse): New constructor.
11616 (mi_parse::~mi_parse): Rename from mi_parse_free.
11617 (mi_parse_cleanup): Remove.
11618 (mi_parse): Return a unique_ptr. Use new.
11619 * mi/mi-main.c (mi_execute_command): Update.
11621 2017-04-12 Tom Tromey <tom@tromey.com>
11623 * location.c (explicit_location_lex_one): Return a
11624 unique_xmalloc_ptr.
11625 (string_to_explicit_location): Update. Remove cleanups.
11627 2017-04-12 Tom Tromey <tom@tromey.com>
11629 * gnu-v3-abi.c (value_and_voffset_p): Remove typedef.
11630 (compare_value_and_voffset): Change type. Update.
11631 (compute_vtable_size): Change type of "offset_vec".
11632 (gnuv3_print_vtable): Use std::vector. Remove cleanups.
11633 (gnuv3_get_typeid): Remove extraneous declaration.
11635 2017-04-12 Tom Tromey <tom@tromey.com>
11637 * charset.h (wchar_iterator): Fix comment.
11639 2017-04-12 Tom Tromey <tom@tromey.com>
11641 * charset.c (iconv_wrapper): New class.
11642 (cleanup_iconv): Remove.
11643 (convert_between_encodings): Use it.
11645 2017-04-12 Tom Tromey <tom@tromey.com>
11647 * symfile.h (increment_reading_symtab): Update type.
11648 * symfile.c (decrement_reading_symtab): Remove.
11649 (increment_reading_symtab): Return a scoped_restore_tmpl<int>.
11650 * psymtab.c (psymtab_to_symtab): Update.
11651 * dwarf2read.c (dw2_instantiate_symtab): Update.
11653 2017-04-12 Tom Tromey <tom@tromey.com>
11655 * jit.c (struct jit_reader): Declare separately. Add constructor
11656 and destructor. Change type of "handle".
11657 (loaded_jit_reader): Define separately.
11658 (jit_reader_load): Update. New "new".
11659 (jit_reader_unload_command): Use "delete".
11660 * gdb-dlfcn.h (struct dlclose_deleter): New.
11661 (gdb_dlhandle_up): New typedef.
11662 (gdb_dlopen, gdb_dlsym): Update types.
11663 (gdb_dlclose): Remove.
11664 * gdb-dlfcn.c (gdb_dlopen): Return a gdb_dlhandle_up.
11665 (gdb_dlsym): Change type of "handle".
11666 (make_cleanup_dlclose): Remove.
11667 (dlclose_deleter::operator()): Rename from gdb_dlclose.
11668 * compile/compile-c-support.c (load_libcc): Update.
11670 2017-04-12 Tom Tromey <tom@tromey.com>
11672 * symtab.h (find_pcs_for_symtab_line): Change return type.
11673 * symtab.c (find_pcs_for_symtab_line): Change return type.
11674 * python/py-linetable.c (build_line_table_tuple_from_pcs): Change
11675 type of "vec". Update.
11676 (ltpy_get_pcs_for_line): Update.
11677 * linespec.c (decode_digits_ordinary): Update.
11679 2017-04-12 Tom Tromey <tom@tromey.com>
11681 * tracepoint.c (actions_command): Update.
11682 * python/python.c (python_command, python_interactive_command):
11684 * mi/mi-cmd-break.c (mi_cmd_break_commands): Update.
11685 * guile/guile.c (guile_command): Update.
11686 * defs.h (read_command_lines, read_command_lines_1): Return
11688 (command_lines_deleter): New struct.
11689 (command_line_up): New typedef.
11690 * compile/compile.c (compile_code_command)
11691 (compile_print_command): Update.
11692 * cli/cli-script.h (get_command_line, copy_command_lines): Return
11694 (make_cleanup_free_command_lines): Remove.
11695 * cli/cli-script.c (get_command_line, read_command_lines_1)
11696 (copy_command_lines): Return command_line_up.
11697 (while_command, if_command, read_command_lines, define_command)
11698 (document_command): Update.
11699 (do_free_command_lines_cleanup, make_cleanup_free_command_lines):
11701 * breakpoint.h (breakpoint_set_commands): Change type of
11703 * breakpoint.c (breakpoint_set_commands): Change type of
11704 "commands". Update.
11705 (do_map_commands_command, update_dprintf_command_list)
11706 (create_tracepoint_from_upload): Update.
11708 2017-04-12 Tom Tromey <tom@tromey.com>
11710 * tracepoint.c (scope_info): Update.
11711 * spu-tdep.c (spu_catch_start): Update.
11712 * python/python.c (gdbpy_decode_line): Update.
11713 * python/py-finishbreakpoint.c (bpfinishpy_init): Update.
11714 * python/py-breakpoint.c (bppy_init): Update.
11715 * probe.c (parse_probes): Update.
11716 * mi/mi-cmd-break.c (mi_cmd_break_insert_1): Update.
11717 * location.h (event_location_deleter): New struct.
11718 (event_location_up): New typedef.
11719 (new_linespec_location, new_address_location, new_probe_location)
11720 (new_explicit_location, copy_event_location)
11721 (string_to_event_location, string_to_event_location_basic)
11722 (string_to_explicit_location): Update return type.
11723 (make_cleanup_delete_event_location): Remove.
11724 * location.c (new_linespec_location, new_address_location)
11725 (new_probe_location, new_explicit_location, copy_event_location):
11726 Return event_location_up.
11727 (delete_event_location_cleanup)
11728 (make_cleanup_delete_event_location): Remove.
11729 (string_to_explicit_location, string_to_event_location_basic)
11730 (string_to_event_location): Return event_location_up.
11731 * linespec.c (canonicalize_linespec, event_location_to_sals)
11732 (decode_line_with_current_source)
11733 (decode_line_with_last_displayed, decode_objc): Update.
11734 * guile/scm-breakpoint.c (gdbscm_register_breakpoint_x): Update.
11735 * completer.c (location_completer): Update.
11736 * cli/cli-cmds.c (edit_command, list_command): Update.
11737 * breakpoint.c (create_overlay_event_breakpoint)
11738 (create_longjmp_master_breakpoint)
11739 (create_std_terminate_master_breakpoint)
11740 (create_exception_master_breakpoint)
11741 (create_thread_event_breakpoint): Update.
11742 (init_breakpoint_sal): Update. Remove some dead code.
11743 (create_breakpoint_sal): Change type of "location". Update.
11744 (create_breakpoints_sal, create_breakpoint, break_command_1)
11745 (dprintf_command, break_range_command, until_break_command)
11746 (init_ada_exception_breakpoint)
11747 (strace_marker_create_sals_from_location)
11748 (update_static_tracepoint, trace_command, ftrace_command)
11749 (strace_command, create_tracepoint_from_upload): Update.
11750 * break-catch-throw.c (re_set_exception_catchpoint): Update.
11751 * ax-gdb.c (agent_command_1): Update.
11753 2017-04-12 Pedro Alves <palves@redhat.com>
11755 * Makefile.in (ALL_TARGET_OBS): Add i386-go32-tdep.o.
11756 * configure.tgt: Handle i[34567]86-*-go32* and
11757 i[34567]86-*-msdosdjgpp*.
11758 * i386-tdep.c (i386_svr4_reg_to_regnum):
11760 (i386_go32_init_abi, i386_coff_osabi_sniffer): Moved to
11762 (_initialize_i386_tdep): DJGPP bits moved to i386-go32-tdep.c.
11763 * i386-go32-tdep.c: New file.
11764 * i386-tdep.h (tdesc_i386_mmx, i386_svr4_reg_to_regnum): New
11767 2017-04-12 Simon Marchi <simon.marchi@ericsson.com>
11769 * aix-thread.c (pd_status2str): Change return type to const char *.
11771 2017-04-12 Pedro Alves <palves@redhat.com>
11773 * i386-tdep.c (i386_elf_init_abi, i386_go32_init_abi): Remove
11774 calls to set_gdbarch_gnu_triplet_regexp.
11776 2017-04-12 Pedro Alves <palves@redhat.com>
11779 * c-lang.c (cplus_primitive_types) <cplus_primitive_type_wchar_t>:
11781 (cplus_language_arch_info): Register cplus_primitive_type_wchar_t.
11782 * gdbtypes.h (struct builtin_type) <builtin_wchar>: New field.
11783 * gdbtypes.c (gdbtypes_post_init): Create the "wchar_t" type.
11784 * gdbarch.sh (wchar_bit, wchar_signed): New per-arch values.
11785 * gdbarch.h, gdbarch.c: Regenerate.
11786 * aarch64-tdep.c (aarch64_gdbarch_init): Override
11787 gdbarch_wchar_bit and gdbarch_wchar_signed.
11788 * alpha-tdep.c (alpha_gdbarch_init): Likewise.
11789 * arm-tdep.c (arm_gdbarch_init): Likewise.
11790 * avr-tdep.c (avr_gdbarch_init): Likewise.
11791 * h8300-tdep.c (h8300_gdbarch_init): Likewise.
11792 * i386-nto-tdep.c (i386nto_init_abi): Likewise.
11793 * i386-tdep.c (i386_go32_init_abi): Likewise.
11794 * m32r-tdep.c (m32r_gdbarch_init): Likewise.
11795 * moxie-tdep.c (moxie_gdbarch_init): Likewise.
11796 * nds32-tdep.c (nds32_gdbarch_init): Likewise.
11797 * rs6000-aix-tdep.c (rs6000_aix_init_osabi): Likewise.
11798 * sh-tdep.c (sh_gdbarch_init): Likewise.
11799 * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
11800 * sparc64-tdep.c (sparc64_init_abi): Likewise.
11801 * windows-tdep.c (windows_init_abi): Likewise.
11802 * xstormy16-tdep.c (xstormy16_gdbarch_init): Likewise.
11804 2017-04-12 Pedro Alves <palves@redhat.com>
11807 * c-lang.c (cplus_primitive_types) <cplus_primitive_type_char16_t,
11808 cplus_primitive_type_char32_t>: New enum values.
11809 (cplus_language_arch_info): Register cplus_primitive_type_char16_t
11810 and cplus_primitive_type_char32_t.
11811 * dwarf2read.c (read_base_type) <DW_ATE_UTF>: If bit size is 16 or
11812 32, use the archtecture's built-in type for char16_t and char32_t,
11813 respectively. Otherwise, fallback to init_integer_type as before,
11814 but make the type unsigned, and issue a complaint.
11815 * gdbtypes.c (gdbtypes_post_init): Make char16_t and char32_t unsigned.
11817 2017-04-12 Alan Hayward <alan.hayward@arm.com>
11819 * m32r-tdep.c (M32R_ARG_REGISTER_SIZE): Added.
11820 (m32r_push_dummy_call): Use M32R_ARG_REGISTER_SIZE.
11822 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
11824 * windows-nat.c (windows_create_inferior): Declare 'toexec' as
11827 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
11829 * common/common-utils.c (free_vector_argv): New function.
11830 * common/common-utils.h: Include <vector>.
11831 (free_vector_argv): New prototype.
11832 * darwin-nat.c (darwin_create_inferior): Rewrite function
11833 prototype in order to constify "exec_file" and accept a
11834 "std::string" for "allargs".
11835 * fork-child.c: Include <vector>.
11836 (breakup_args): Rewrite function, using C++.
11837 (fork_inferior): Rewrite function header, constify "exec_file_arg"
11838 and accept "std::string" for "allargs". Update the code to
11839 calculate "argv" based on "allargs". Update calls to "exec_fun"
11841 * gnu-nat.c (gnu_create_inferior): Rewrite function prototype in
11842 order to constify "exec_file" and accept a "std::string" for
11844 * go32-nat.c (go32_create_inferior): Likewise.
11845 * inf-ptrace.c (inf_ptrace_create_inferior): Likewise.
11846 * infcmd.c (run_command_1): Constify "exec_file". Use
11847 "std::string" for inferior arguments.
11848 * inferior.h (fork_inferior): Update prototype.
11849 * linux-nat.c (linux_nat_create_inferior): Rewrite function
11850 prototype in order to constify "exec_file" and accept a
11851 "std::string" for "allargs".
11852 * nto-procfs.c (procfs_create_inferior): Likewise.
11853 * procfs.c (procfs_create_inferior): Likewise.
11854 * remote-sim.c (gdbsim_create_inferior): Likewise.
11855 * remote.c (extended_remote_run): Update code to accept
11856 "std::string" as argument.
11857 (extended_remote_create_inferior): Rewrite function prototype in
11858 order to constify "exec_file" and accept a "std::string" for
11860 * rs6000-nat.c (super_create_inferior): Likewise.
11861 (rs6000_create_inferior): Likewise.
11862 * target.h (struct target_ops) <to_create_inferior>: Likewise.
11863 * windows-nat.c (windows_create_inferior): Likewise.
11865 2017-04-11 Pedro Alves <palves@redhat.com>
11867 * thread.c: Fix whitespace throughout.
11869 2017-04-11 Philipp Rudo <prudo@linux.vnet.ibm.com>
11871 * linux-nat.c (linux_nat_detach): Remove delete_lwp call.
11873 2017-04-11 Alan Hayward <alan.hayward@arm.com>
11875 * arm-tdep.c (arm_store_return_value): Use FP_REGISTER_SIZE
11877 2017-04-10 Sergio Durigan Junior <sergiodj@redhat.com>
11880 * osdata.c (info_osdata): Check if 'type' is an empty string
11883 2017-04-10 Pedro Alves <palves@redhat.com>
11885 * thread.c (add_thread_silent, delete_thread_1, find_thread_ptid)
11886 (ptid_to_global_thread_id, in_thread_list)
11887 (do_captured_list_thread_ids, set_resumed, set_running)
11888 (set_executing, set_stop_requested, finish_thread_state)
11889 (validate_registers_access, can_access_registers_ptid)
11890 (print_thread_info_1, switch_to_thread)
11891 (do_restore_current_thread_cleanup)
11892 (make_cleanup_restore_current_thread, thread_command)
11893 (thread_name_command): Use operator== instead of ptid_equal.
11895 2017-04-10 Pedro Alves <palves@redhat.com>
11897 * thread.c (struct current_thread_cleanup) <next>: Delete field.
11898 (current_thread_cleanup_chain): Delete.
11899 (restore_current_thread_cleanup_dtor)
11900 (make_cleanup_restore_current_thread): Remove references to
11901 current_thread_cleanup_chain.
11903 2017-04-10 Alan Hayward <alan.hayward@arm.com>
11905 * msp430-tdep.c (msp430_pseudo_register_read): Never return
11908 2017-04-10 Yao Qi <yao.qi@linaro.org>
11911 * gdbthread.h (thread_info::deletable): New method.
11912 (thread_info::incref): New method.
11913 (thread_info::decref): New method.
11914 (thread_info::refcount): Move it to private.
11915 * infrun.c (save_stop_context): Call inc_refcount.
11916 (release_stop_context_cleanup): Likewise.
11917 * thread.c (set_thread_exited): New function.
11918 (init_thread_list): Delete "tp" only it is deletable, otherwise
11919 call set_thread_exited.
11920 (delete_thread_1): Call set_thread_exited.
11921 (current_thread_cleanup) <inferior_pid>: Remove.
11922 <thread>: New field.
11923 (restore_current_thread_ptid_changed): Removed.
11924 (do_restore_current_thread_cleanup): Adjust.
11925 (restore_current_thread_cleanup_dtor): Don't call
11927 (set_thread_refcount): Use dec_refcount.
11928 (make_cleanup_restore_current_thread): Adjust.
11929 (thread_apply_all_command): Call inc_refcount.
11930 (_initialize_thread): Don't call
11931 observer_attach_thread_ptid_changed.
11933 2017-04-10 Yao Qi <yao.qi@linaro.org>
11935 * thread.c (delete_thread_1): Hoist code on marking thread as
11938 2017-04-09 Simon Marchi <simon.marchi@polymtl.ca>
11940 * windows-nat.c (windows_detach): Initialize ptid with
11943 2017-04-07 Simon Marchi <simon.marchi@ericsson.com>
11945 * unittests/ptid-selftests.c: Fix erroneous assert messages.
11947 2017-04-07 Alan Hayward <alan.hayward@arm.com>
11949 * bfin-tdep.c (BFIN_MAX_REGISTER_SIZE): Add.
11950 (bfin_pseudo_register_read): Use BFIN_MAX_REGISTER_SIZE.
11951 (bfin_pseudo_register_write): Likewise
11953 2017-04-06 Simon Marchi <simon.marchi@ericsson.com>
11955 * common/ptid.h (struct ptid): Change to...
11956 (class ptid_t): ... this.
11957 <ptid_t>: New constructors.
11958 <pid, lwp_p, lwp, tid_p, tid, is_pid, operator==, operator!=,
11959 matches>: New methods.
11960 <make_null, make_minus_one>: New static methods.
11961 <pid>: Rename to...
11963 <lwp>: Rename to...
11965 <tid>: Rename to...
11967 (ptid_build, ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal,
11968 ptid_is_pid, ptid_lwp_p, ptid_tid_p, ptid_match): Take ptid arguments
11969 as references, move comment to class ptid_t.
11970 * common/ptid.c (null_ptid, minus_one_ptid): Initialize with
11971 ptid_t static methods.
11972 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_tid,
11973 ptid_equal, ptid_is_pid, ptid_lwp_p, ptid_tid_p, ptid_match):
11974 Take ptid arguments as references, implement using ptid_t methods.
11975 * unittests/ptid-selftests.c: New file.
11976 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
11977 unittests/ptid-selftests.c.
11978 (SUBDIR_UNITTESTS_OBS): Add unittests/ptid-selftests.o.
11980 2017-04-06 Thomas Preud'homme <thomas.preudhomme@arm.com>
11982 * python/python.c (python_run_simple_file): Cast mode literal to
11983 non-const char pointer as expected by PyFile_FromString.
11985 2017-04-05 Simon Marchi <simon.marchi@ericsson.com>
11987 * common/ptid.c (ptid_lwp_p, ptid_tid_p): Remove comparison with
11988 minus_one_ptid and null_ptid.
11990 2017-04-05 Pedro Alves <palves@redhat.com>
11992 * warning.m4 (build_warnings): Remove -Wno-write-strings.
11993 * configure: Regenerate.
11995 2017-04-05 Pedro Alves <palves@redhat.com>
11997 * ada-exp.y (yyerror): Constify.
11998 * ada-lang.c (bound_name, get_selections)
11999 (ada_variant_discrim_type)
12000 (ada_variant_discrim_name, ada_value_struct_elt)
12001 (ada_lookup_struct_elt_type, is_unchecked_variant)
12002 (ada_which_variant_applies, standard_exc, ada_get_next_arg)
12003 (catch_ada_exception_command_split)
12004 (catch_ada_assert_command_split, catch_assert_command)
12005 (ada_op_name): Constify.
12006 * ada-lang.h (ada_yyerror, get_selections)
12007 (ada_variant_discrim_name, ada_value_struct_elt): Constify.
12008 * arc-tdep.c (arc_print_frame_cache): Constify.
12009 * arm-tdep.c (arm_skip_stub): Constify.
12010 * ax-gdb.c (gen_binop, gen_struct_ref_recursive, gen_struct_ref)
12011 (gen_aggregate_elt_ref): Constify.
12012 * bcache.c (print_bcache_statistics): Constify.
12013 * bcache.h (print_bcache_statistics): Constify.
12014 * break-catch-throw.c (catch_exception_command_1):
12015 * breakpoint.c (struct ep_type_description::description):
12017 (add_solib_catchpoint): Constify.
12018 (catch_fork_command_1): Add cast.
12019 (add_catch_command): Constify.
12020 * breakpoint.h (add_catch_command, add_solib_catchpoint):
12022 * bsd-uthread.c (bsd_uthread_state): Constify.
12023 * buildsym.c (patch_subfile_names): Constify.
12024 * buildsym.h (next_symbol_text_func, patch_subfile_names):
12026 * c-exp.y (yyerror): Constify.
12027 (token::oper): Constify.
12028 * c-lang.h (c_yyerror, cp_print_class_member): Constify.
12029 * c-varobj.c (cplus_describe_child): Constify.
12030 * charset.c (find_charset_names): Add cast.
12031 (find_charset_names): Constify array and add const_cast.
12032 * cli/cli-cmds.c (complete_command, cd_command): Constify.
12033 (edit_command): Constify.
12034 * cli/cli-decode.c (lookup_cmd): Constify.
12035 * cli/cli-dump.c (dump_memory_command, dump_value_command):
12037 (struct dump_context): Constify.
12038 (add_dump_command, restore_command): Constify.
12039 * cli/cli-script.c (get_command_line): Constify.
12040 * cli/cli-script.h (get_command_line): Constify.
12041 * cli/cli-utils.c (check_for_argument): Constify.
12042 * cli/cli-utils.h (check_for_argument): Constify.
12043 * coff-pe-read.c (struct read_pe_section_data): Constify.
12044 * command.h (lookup_cmd): Constify.
12045 * common/print-utils.c (decimal2str): Constify.
12046 * completer.c (gdb_print_filename): Constify.
12047 * corefile.c (set_gnutarget): Constify.
12048 * cp-name-parser.y (yyerror): Constify.
12049 * cp-valprint.c (cp_print_class_member): Constify.
12050 * cris-tdep.c (cris_register_name, crisv32_register_name):
12052 * d-exp.y (yyerror): Constify.
12053 (struct token::oper): Constify.
12054 * d-lang.h (d_yyerror): Constify.
12055 * dbxread.c (struct header_file_location::name): Constify.
12056 (add_old_header_file, add_new_header_file, last_function_name)
12057 (dbx_next_symbol_text, add_bincl_to_list)
12058 (find_corresponding_bincl_psymtab, set_namestring)
12059 (find_stab_function_addr, read_dbx_symtab, start_psymtab)
12060 (dbx_end_psymtab, read_ofile_symtab, process_one_symbol):
12061 * defs.h (command_line_input, print_address_symbolic)
12062 (deprecated_readline_begin_hook): Constify.
12063 * dwarf2read.c (anonymous_struct_prefix, dwarf_bool_name):
12065 * event-top.c (handle_line_of_input): Constify and add cast.
12066 * exceptions.c (catch_errors): Constify.
12067 * exceptions.h (catch_errors): Constify.
12068 * expprint.c (print_subexp_standard, op_string, op_name)
12069 (op_name_standard, dump_raw_expression, dump_raw_expression):
12070 * expression.h (op_name, op_string, dump_raw_expression):
12072 * f-exp.y (yyerror): Constify.
12073 (struct token::oper): Constify.
12074 (struct f77_boolean_val::name): Constify.
12075 * f-lang.c (f_word_break_characters): Constify.
12076 * f-lang.h (f_yyerror): Constify.
12077 * fork-child.c (fork_inferior): Add cast.
12078 * frv-tdep.c (struct gdbarch_tdep::register_names): Constify.
12079 (new_variant): Constify.
12080 * gdbarch.sh (pstring_ptr, pstring_list): Constify.
12081 * gdbarch.c: Regenerate.
12082 * gdbcore.h (set_gnutarget): Constify.
12083 * go-exp.y (yyerror): Constify.
12084 (token::oper): Constify.
12085 * go-lang.h (go_yyerror): Constify.
12086 * go32-nat.c (go32_sysinfo): Constify.
12087 * guile/scm-breakpoint.c (gdbscm_breakpoint_expression): Constify.
12088 * guile/scm-cmd.c (cmdscm_function): Constify.
12089 * guile/scm-param.c (pascm_param_value): Constify.
12090 * h8300-tdep.c (h8300_register_name, h8300s_register_name)
12091 (h8300sx_register_name): Constify.
12092 * hppa-tdep.c (hppa32_register_name, hppa64_register_name):
12094 * ia64-tdep.c (ia64_register_names): Constify.
12095 * infcmd.c (construct_inferior_arguments): Constify.
12096 (path_command, attach_post_wait): Constify.
12097 * language.c (show_range_command, show_case_command)
12098 (unk_lang_error): Constify.
12099 * language.h (language_defn::la_error)
12100 (language_defn::la_name_of_this): Constify.
12101 * linespec.c (decode_line_2): Constify.
12102 * linux-thread-db.c (thread_db_err_str): Constify.
12103 * lm32-tdep.c (lm32_register_name): Constify.
12104 * m2-exp.y (yyerror): Constify.
12105 * m2-lang.h (m2_yyerror): Constify.
12106 * m32r-tdep.c (m32r_register_names): Constify and make static.
12107 * m68hc11-tdep.c (m68hc11_register_names): Constify.
12108 * m88k-tdep.c (m88k_register_name): Constify.
12109 * macroexp.c (appendmem): Constify.
12110 * mdebugread.c (fdr_name, add_data_symbol, parse_type)
12111 (upgrade_type, parse_external, parse_partial_symbols)
12112 (mdebug_next_symbol_text, cross_ref, mylookup_symbol, new_psymtab)
12113 (new_symbol): Constify.
12114 * memattr.c (mem_info_command): Constify.
12115 * mep-tdep.c (register_name_from_keyword): Constify.
12116 * mi/mi-cmd-env.c (mi_cmd_env_path, _initialize_mi_cmd_env):
12118 * mi/mi-cmd-stack.c (list_args_or_locals): Constify.
12119 * mi/mi-cmd-var.c (mi_cmd_var_show_attributes): Constify.
12120 * mi/mi-main.c (captured_mi_execute_command): Constify and add
12122 (mi_execute_async_cli_command): Constify.
12123 * mips-tdep.c (mips_register_name): Constify.
12124 * mn10300-tdep.c (register_name, mn10300_generic_register_name)
12125 (am33_register_name, am33_2_register_name)
12126 * moxie-tdep.c (moxie_register_names): Constify.
12127 * nat/linux-osdata.c (osdata_type): Constify fields.
12128 * nto-tdep.c (nto_parse_redirection): Constify.
12129 * objc-lang.c (lookup_struct_typedef, lookup_objc_class)
12130 (lookup_child_selector): Constify.
12131 (objc_methcall::name): Constify.
12132 * objc-lang.h (lookup_objc_class, lookup_child_selector)
12133 (lookup_struct_typedef): Constify.
12134 * objfiles.c (pc_in_section): Constify.
12135 * objfiles.h (pc_in_section): Constify.
12136 * p-exp.y (struct token::oper): Constify.
12137 (yyerror): Constify.
12138 * p-lang.h (pascal_yyerror): Constify.
12139 * parser-defs.h (op_name_standard): Constify.
12140 (op_print::string): Constify.
12141 (exp_descriptor::op_name): Constify.
12142 * printcmd.c (print_address_symbolic): Constify.
12143 * psymtab.c (print_partial_symbols): Constify.
12144 * python/py-breakpoint.c (stop_func): Constify.
12145 (bppy_get_expression): Constify.
12146 * python/py-cmd.c (cmdpy_completer::name): Constify.
12147 (cmdpy_function): Constify.
12148 * python/py-event.c (evpy_add_attribute)
12149 (gdbpy_initialize_event_generic): Constify.
12150 * python/py-event.h (evpy_add_attribute)
12151 (gdbpy_initialize_event_generic): Constify.
12152 * python/py-evts.c (add_new_registry): Constify.
12153 * python/py-finishbreakpoint.c (outofscope_func): Constify.
12154 * python/py-framefilter.c (get_py_iter_from_func): Constify.
12155 * python/py-inferior.c (get_buffer): Add cast.
12156 * python/py-param.c (parm_constant::name): Constify.
12157 * python/py-unwind.c (fprint_frame_id): Constify.
12158 * python/python.c (gdbpy_parameter_value): Constify.
12159 * remote-fileio.c (remote_fio_func_map): Make 'name' const.
12160 * remote.c (memory_packet_config::name): Constify.
12161 (show_packet_config_cmd, remote_write_bytes)
12162 (remote_buffer_add_string):
12163 * reverse.c (exec_reverse_once): Constify.
12164 * rs6000-tdep.c (variant::name, variant::description): Constify.
12165 * rust-exp.y (rustyyerror): Constify.
12166 * rust-lang.c (rust_op_name): Constify.
12167 * rust-lang.h (rustyyerror): Constify.
12168 * serial.h (serial_ops::name): Constify.
12169 * sh-tdep.c (sh_sh_register_name, sh_sh3_register_name)
12170 (sh_sh3e_register_name, sh_sh2e_register_name)
12171 (sh_sh2a_register_name, sh_sh2a_nofpu_register_name)
12172 (sh_sh_dsp_register_name, sh_sh3_dsp_register_name)
12173 (sh_sh4_register_name, sh_sh4_nofpu_register_name)
12174 (sh_sh4al_dsp_register_name): Constify.
12175 * sh64-tdep.c (sh64_register_name): Constify.
12176 * solib-darwin.c (lookup_symbol_from_bfd): Constify.
12177 * spu-tdep.c (spu_register_name, info_spu_dma_cmdlist): Constify.
12178 * stabsread.c (patch_block_stabs, read_type_number)
12179 (ref_map::stabs, ref_add, process_reference)
12180 (symbol_reference_defined, define_symbol, define_symbol)
12181 (error_type, read_type, read_member_functions, read_cpp_abbrev)
12182 (read_one_struct_field, read_struct_fields, read_baseclasses)
12183 (read_tilde_fields, read_struct_type, read_array_type)
12184 (read_enum_type, read_sun_builtin_type, read_sun_floating_type)
12185 (read_huge_number, read_range_type, read_args, common_block_start)
12186 (find_name_end): Constify.
12187 * stabsread.h (common_block_start, define_symbol)
12188 (process_one_symbol, symbol_reference_defined, ref_add):
12189 * symfile.c (get_section_index, add_symbol_file_command):
12190 * symfile.h (get_section_index): Constify.
12191 * target-descriptions.c (tdesc_type::name): Constify.
12192 (tdesc_free_type): Add cast.
12193 * target.c (find_default_run_target):
12194 (add_deprecated_target_alias, find_default_run_target)
12195 (target_announce_detach): Constify.
12196 (do_option): Constify.
12197 * target.h (add_deprecated_target_alias): Constify.
12198 * thread.c (print_thread_info_1): Constify.
12199 * top.c (deprecated_readline_begin_hook, command_line_input):
12201 (init_main): Add casts.
12202 * top.h (handle_line_of_input): Constify.
12203 * tracefile-tfile.c (tfile_write_uploaded_tsv): Constify.
12204 * tracepoint.c (tvariables_info_1, trace_status_mi): Constify.
12205 (tfind_command): Rename to ...
12206 (tfind_command_1): ... this and constify.
12207 (tfind_command): New function.
12208 (tfind_end_command, tfind_start_command): Adjust.
12209 (encode_source_string): Constify.
12210 * tracepoint.h (encode_source_string): Constify.
12211 * tui/tui-data.c (tui_partial_win_by_name): Constify.
12212 * tui/tui-data.h (tui_partial_win_by_name): Constify.
12213 * tui/tui-source.c (tui_set_source_content_nil): Constify.
12214 * tui/tui-source.h (tui_set_source_content_nil): Constify.
12215 * tui/tui-win.c (parse_scrolling_args): Constify.
12216 * tui/tui-windata.c (tui_erase_data_content): Constify.
12217 * tui/tui-windata.h (tui_erase_data_content): Constify.
12218 * tui/tui-winsource.c (tui_erase_source_content): Constify.
12219 * tui/tui.c (tui_enable): Add cast.
12220 * utils.c (defaulted_query): Constify.
12221 (init_page_info): Add cast.
12222 (puts_debug, subset_compare): Constify.
12223 * utils.h (subset_compare): Constify.
12224 * varobj.c (varobj_format_string): Constify.
12225 * varobj.h (varobj_format_string): Constify.
12226 * vax-tdep.c (vax_register_name): Constify.
12227 * windows-nat.c (windows_detach): Constify.
12228 * xcoffread.c (process_linenos, xcoff_next_symbol_text): Constify.
12229 * xml-support.c (gdb_xml_end_element): Constify.
12230 * xml-tdesc.c (tdesc_start_reg): Constify.
12231 * xstormy16-tdep.c (xstormy16_register_name): Constify.
12232 * xtensa-tdep.c (xtensa_find_register_by_name): Constify.
12233 * xtensa-tdep.h (xtensa_register_t::name): Constify.
12235 2017-04-05 Pedro Alves <palves@redhat.com>
12237 * proc-api.c (struct trans): Constify.
12238 (procfs_note): Constify.
12239 * proc-events.c (struct trans, syscall_table):
12240 * proc-flags.c (struct trans): Constify.
12241 * proc-utils.h (procfs_note): Constify.
12242 * proc-why.c (struct trans): Constify.
12243 * procfs.c (dead_procinfo, find_syscall, proc_warn, proc_error)
12244 (procfs_detach): Constify.
12245 * sol-thread.c (struct string_map): Constify.
12246 (td_err_string, td_state_string): Constify.
12248 2017-04-05 Pedro Alves <palves@redhat.com>
12250 * proc-api.c (procfs_filename): Don't initialize
12252 (prepare_to_trace): Assume procfs_filename is non-NULL.
12253 (_initialize_proc_api): Give procfs_filename a default value here.
12255 2017-04-05 Pedro Alves <palves@redhat.com>
12257 * break-catch-throw.c (handle_gnu_v3_exceptions): Constify
12258 'cond_string' parameter.
12259 (extract_exception_regexp): Constify 'string' parameter.
12260 (catch_exception_command_1): Constify.
12261 * breakpoint.c (init_catchpoint)
12262 (create_fork_vfork_event_catchpoint): Constify 'cond_string'
12264 (ep_parse_optional_if_clause, catch_fork_command_1)
12265 (catch_exec_command_1): Constify.
12266 * breakpoint.h (init_catchpoint): Constify 'cond_string'
12268 (ep_parse_optional_if_clause): Constify.
12269 * cli/cli-utils.c (remove_trailing_whitespace)
12270 (check_for_argument): Constify.
12271 * cli/cli-utils.h (remove_trailing_whitespace): Constify and add
12272 non-const overload.
12273 (check_for_argument): Likewise.
12275 2017-04-05 Pedro Alves <palves@redhat.com>
12277 * event-top.c (command_line_handler): Add cast to execute_command
12279 * record-btrace.c (cmd_record_btrace_bts_start)
12280 (cmd_record_btrace_pt_start, cmd_record_btrace_start)
12281 (cmd_record_btrace_start): Add cast to execute_command call.
12282 * record-full.c (record_full_goto_insn):
12283 * record.c (record_start, record_stop): Add cast to
12284 execute_command_to_string calls.
12285 (cmd_record_start): Add cast to execute_command calls.
12287 2017-04-05 Pedro Alves <palves@redhat.com>
12289 * python/python-internal.h (gdb_PyArg_ParseTupleAndKeywords): New
12290 static inline function.
12291 * python/py-arch.c (archpy_disassemble): Constify 'keywords'
12292 array and use gdb_PyArg_ParseTupleAndKeywords.
12293 * python/py-cmd.c (cmdpy_init): Likewise.
12294 * python/py-finishbreakpoint.c (bpfinishpy_init): Likewise.
12295 * python/py-inferior.c (infpy_read_memory, infpy_write_memory)
12296 (infpy_search_memory): Likewise.
12297 * python/py-objfile.c (objfpy_add_separate_debug_file)
12298 (gdbpy_lookup_objfile): Likewise.
12299 * python/py-symbol.c (gdbpy_lookup_symbol)
12300 (gdbpy_lookup_global_symbol): Likewise.
12301 * python/py-type.c (gdbpy_lookup_type): Likewise.
12302 * python/py-value.c (valpy_lazy_string, valpy_string): Likewise.
12303 * python/python.c (execute_gdb_command, gdbpy_write, gdbpy_flush):
12306 2017-04-05 Pedro Alves <palves@redhat.com>
12308 * python/python-internal.h (gdb_PyGetSetDef): New type.
12309 * python/py-block.c (block_object_getset)
12310 (breakpoint_object_getset): Now a gdb_PyGetSetDef array.
12311 * python/py-event.c (event_object_getset)
12312 (finish_breakpoint_object_getset): Likewise.
12313 * python/py-inferior.c (inferior_object_getset): Likewise.
12314 * python/py-infthread.c (thread_object_getset): Likewise.
12315 * python/py-lazy-string.c (lazy_string_object_getset): Likewise.
12316 * python/py-linetable.c (linetable_entry_object_getset): Likewise.
12317 * python/py-objfile.c (objfile_getset): Likewise.
12318 * python/py-progspace.c (pspace_getset): Likewise.
12319 * python/py-record-btrace.c (btpy_insn_getset, btpy_call_getset):
12321 * python/py-record.c (recpy_record_getset): Likewise.
12322 * python/py-symbol.c (symbol_object_getset): Likewise.
12323 * python/py-symtab.c (symtab_object_getset, sal_object_getset):
12325 * python/py-type.c (type_object_getset, field_object_getset):
12327 * python/py-value.c (value_object_getset): Likewise.
12329 2017-04-05 Pedro Alves <palves@redhat.com>
12331 * python/python-internal.h (gdb_PyObject_CallMethod)
12332 (gdb_PyErr_NewException, gdb_PySys_GetObject, gdb_PySys_SetPath):
12334 (GDB_PYSYS_SETPATH_CHAR, PyObject_CallMethod, PyErr_NewException)
12335 (PySys_GetObject, PySys_SetPath): New macros.
12337 2017-04-05 Pedro Alves <palves@redhat.com>
12339 * mi/mi-cmd-info.c (mi_cmd_info_os): Call info_osdata instead of
12340 info_osdata_command.
12341 * osdata.c (info_osdata_command): Rename to ...
12342 (info_osdata): ... this. Constify 'type' parameter, and remove
12343 the 'from_tty' parameter. Accept NULL TYPE.
12344 (info_osdata_command): New function.
12345 * osdata.h (info_osdata_command): Remove declaration.
12346 (info_osdata): New declaration.
12348 2017-04-05 Pedro Alves <palves@redhat.com>
12350 * mi/mi-cmd-break.c (mi_cmd_break_insert_1, mi_cmd_break_insert)
12351 (mi_cmd_dprintf_insert, mi_cmd_break_passcount)
12352 (mi_cmd_break_watch, mi_cmd_break_commands): Constify 'command'
12354 * mi/mi-cmd-catch.c (mi_cmd_catch_assert, mi_cmd_catch_exception)
12355 (mi_cmd_catch_load, mi_cmd_catch_unload): Constify cmd' parameter.
12356 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Constify 'command'
12358 * mi/mi-cmd-env.c (mi_cmd_env_pwd, mi_cmd_env_cd, mi_cmd_env_path)
12359 (mi_cmd_env_dir, mi_cmd_inferior_tty_set, _cmd_inferior_tty_show)
12360 * mi/mi-cmd-file.c (mi_cmd_file_list_exec_source_file)
12361 (mi_cmd_file_list_exec_source_files)
12362 (mi_cmd_file_list_shared_libraries): Constify 'command' parameter.
12363 * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions)
12364 (mi_cmd_info_gdb_mi_command, mi_cmd_info_os): Constify 'command'
12366 * mi/mi-cmd-stack.c (mi_cmd_enable_frame_filters)
12367 (mi_cmd_stack_list_frames, mi_cmd_stack_info_depth)
12368 (mi_cmd_stack_list_locals, mi_cmd_stack_list_args)
12369 (mi_cmd_stack_list_variables, mi_cmd_stack_select_frame)
12370 (mi_cmd_stack_info_frame): Constify 'command' parameter.
12371 * mi/mi-cmd-target.c (mi_cmd_target_file_get)
12372 (mi_cmd_target_file_put, mi_cmd_target_file_delete): Constify
12373 'command' parameter.
12374 * mi/mi-cmd-var.c (mi_cmd_var_create, mi_cmd_var_delete)
12375 (mi_cmd_var_set_format, mi_cmd_var_set_visualizer)
12376 (mi_cmd_var_set_frozen, mi_cmd_var_show_format)
12377 (mi_cmd_var_info_num_children, mi_cmd_var_list_children)
12378 (mi_cmd_var_info_type, mi_cmd_var_info_path_expression)
12379 (mi_cmd_var_info_expression, mi_cmd_var_show_attributes)
12380 (mi_cmd_var_evaluate_expression, mi_cmd_var_assign)
12381 (mi_cmd_var_update, mi_cmd_enable_pretty_printing)
12382 (mi_cmd_var_set_update_range): Constify 'command' parameter.
12383 * mi/mi-cmds.h (mi_cmd_argv_ftype): Constify 'command' parameter.
12384 * mi/mi-interp.c (mi_cmd_interpreter_exec): Constify 'command'
12386 * mi/mi-main.c (mi_cmd_gdb_exit, mi_cmd_exec_next)
12387 (mi_cmd_exec_next_instruction, mi_cmd_exec_step)
12388 (mi_cmd_exec_step_instruction, mi_cmd_exec_finish)
12389 (mi_cmd_exec_return ,mi_cmd_exec_jump, mi_cmd_exec_continue)
12390 (mi_cmd_exec_interrupt, mi_cmd_exec_run, mi_cmd_target_detach)
12391 (mi_cmd_target_flash_erase, mi_cmd_thread_select)
12392 (mi_cmd_thread_list_ids, mi_cmd_thread_info)
12393 (mi_cmd_list_thread_groups, mi_cmd_data_list_register_names)
12394 (mi_cmd_data_list_changed_registers)
12395 (mi_cmd_data_write_register_values)
12396 (mi_cmd_data_evaluate_expression, mi_cmd_data_read_memory)
12397 (mi_cmd_data_read_memory_bytes, mi_cmd_data_write_memory)
12398 (mi_cmd_data_write_memory_bytes, mi_cmd_enable_timings)
12399 (mi_cmd_list_features, mi_cmd_list_target_features)
12400 (mi_cmd_add_inferior, mi_cmd_remove_inferior)
12401 (mi_cmd_trace_define_variable, mi_cmd_trace_list_variables)
12402 (mi_cmd_trace_find, mi_cmd_trace_save, mi_cmd_trace_start)
12403 (mi_cmd_trace_status, mi_cmd_trace_stop, mi_cmd_ada_task_info)
12404 (mi_cmd_trace_frame_collected): Constify 'command'
12406 * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Constify
12407 'command' parameter.
12409 2017-04-05 Pedro Alves <palves@redhat.com>
12411 * ada-lang.c (ada_completer_word_break_characters): Now a const
12413 (ada_get_gdb_completer_word_break_characters): Constify.
12414 * completer.c (gdb_completer_command_word_break_characters)
12415 (gdb_completer_file_name_break_characters)
12416 (gdb_completer_quote_characters): Now const arrays.
12417 (get_gdb_completer_quote_characters): Constify.
12418 (set_rl_completer_word_break_characters): New function.
12419 (set_gdb_completion_word_break_characters)
12420 (complete_line_internal): Use it.
12421 * completer.h (get_gdb_completer_quote_characters): Constify.
12422 (set_rl_completer_word_break_characters): Declare.
12423 * f-lang.c (f_word_break_characters): Constify.
12424 * language.c (default_word_break_characters): Constify.
12425 * language.h (language_defn::la_word_break_characters): Constify.
12426 (default_word_break_characters): Constify.
12427 * top.c (init_main): Use set_rl_completer_word_break_characters.
12429 2017-04-05 Pedro Alves <palves@redhat.com>
12431 * aix-thread.c (aix_thread_pid_to_str)
12432 (aix_thread_extra_thread_info): Constify.
12433 * bsd-kvm.c (bsd_kvm_pid_to_str): Constify.
12434 * bsd-uthread.c (bsd_uthread_extra_thread_info)
12435 (bsd_uthread_pid_to_str): Constify.
12436 * corelow.c (core_pid_to_str): Constify.
12437 * darwin-nat.c (darwin_pid_to_str): Constify.
12438 * fbsd-nat.c (fbsd_pid_to_str): Constify.
12439 * fbsd-tdep.c (fbsd_core_pid_to_str, gdbarch_core_pid_to_str):
12441 * gnu-nat.c (gnu_pid_to_str): Constify.
12442 * go32-nat.c (go32_pid_to_str): Constify.
12443 * i386-cygwin-tdep.c (i386_windows_core_pid_to_str): Constify.
12444 * inf-ptrace.c (inf_ptrace_pid_to_str): Constify.
12445 * inferior.c (inferior_pid_to_str): Constify.
12446 * linux-nat.c (linux_nat_pid_to_str): Constify.
12447 * linux-tdep.c (linux_core_pid_to_str): Constify.
12448 * linux-thread-db.c (thread_db_pid_to_str)
12449 (thread_db_extra_thread_info): Constify.
12450 * nto-tdep.c (nto_extra_thread_info): Constify.
12451 * nto-tdep.h (nto_extra_thread_info): Constify.
12452 * obsd-nat.c (obsd_pid_to_str): Constify.
12453 * procfs.c (procfs_pid_to_str): Constify.
12454 * ravenscar-thread.c (ravenscar_extra_thread_info)
12455 (ravenscar_pid_to_str): Constify.
12456 * remote-sim.c (gdbsim_pid_to_str): Constify.
12457 * remote.c (remote_threads_extra_info, remote_pid_to_str):
12459 * sol-thread.c (solaris_pid_to_str): Constify.
12460 * sol2-tdep.c (sol2_core_pid_to_str): Constify.
12461 * sol2-tdep.h (sol2_core_pid_to_str): Constify.
12462 * target.c (default_pid_to_str, target_pid_to_str)
12463 (normal_pid_to_str, default_pid_to_str): Constify.
12464 * target.h (target_ops::to_pid_to_str)
12465 (target_ops::to_extra_thread_info): Constify.
12466 (target_pid_to_str, normal_pid_to_str): Constify.
12467 * windows-nat.c (windows_pid_to_str): Constify.
12468 * gdbarch.sh (core_pid_to_str): Constify.
12469 * target-delegates.c: Regenerate.
12470 * gdbarch.h, gdbarch.c: Regenerate.
12472 2017-04-05 Pedro Alves <palves@redhat.com>
12474 * main.c (captured_main_1): Use gdb::unique_xmalloc_ptr to manage
12475 the memory of the temporary warning_pre_print override.
12476 * utils.c (warning_pre_print): Constify.
12477 * utils.h (warning_pre_print): Constify.
12479 2017-04-05 Pedro Alves <palves@redhat.com>
12481 * cli/cli-cmds.c (shell_escape): Constify 'arg' parameter.
12482 (shell_command): New function.
12483 (make_command): Use std::string.
12484 (init_cli_cmds): Register shell_command instead of shell_escape.
12486 2017-04-05 Pedro Alves <palves@redhat.com>
12488 * breakpoint.c (dprintf_function, dprintf_channel): Don't initialize.
12489 * tracepoint.c (default_collect): Don't initialize.
12491 2017-04-05 Pedro Alves <palves@redhat.com>
12493 * macroexp.c (macro_buffer::shared): Now a bool.
12494 (init_buffer): Update.
12495 (init_shared_buffer): Constify 'addr' parameter.
12496 (substitute_args, expand, macro_expand, macro_expand_next): Remove
12499 2017-04-05 Pedro Alves <palves@redhat.com>
12501 * arm-tdep.c (show_disassembly_style_sfunc): Constify local.
12502 * disasm.c (set_disassembler_options): Constify local.
12503 * i386-tdep.c (i386_print_insn): Remove cast and FIXME comment.
12505 2017-04-05 Sergio Durigan Junior <sergiodj@redhat.com>
12508 * tracefile.c (tsave_command): Fix argument parsing for '-r'
12511 2017-04-05 Yao Qi <yao.qi@linaro.org>
12513 * frame.c (frame_unwind_register_unsigned): Call
12514 frame_unwind_register_value.
12516 2017-04-05 Yao Qi <yao.qi@linaro.org>
12518 * gdb.threads/thread-specific-bp.exp (check_thread_specific_breakpoint):
12519 Use gdb_test_multiple, and don't match anchor.
12521 2017-04-05 Pedro Alves <palves@redhat.com>
12523 * MAINTAINERS (Global Maintainers): Add Simon Marchi.
12524 (Write After Approval): Remove Simon Marchi.
12526 2017-04-05 Pedro Alves <palves@redhat.com>
12528 * common/gdb_optional.h (optional::optional): Make constexpr and
12529 initialize m_dummy.
12531 2017-04-04 John Baldwin <jhb@FreeBSD.org>
12533 * amd64-fbsd-tdep.c: Remove "bsd-uthread.h" include.
12534 (amd64fbsd_jmp_buf_reg_offset): Remove.
12535 (amd64fbsd_supply_uthread): Remove function.
12536 (amd64fbsd_collect_uthread): Remove function.
12537 (amd64fbsd_init_abi): Don't set bsd-uthread callbacks.
12538 * configure.tgt (i[34567]86-*-freebsd*): Remove bsd-uthread.o.
12539 (x86_64-*-freebsd*): Remove bsd-uthread.o.
12540 (fbsd-nat.c): Update comment.
12541 * i386-fbsd-tdep.c: Remove "bsd-uthread.h" include.
12542 (i386fbsd_jmp_buf_reg_offset): Remove.
12543 (i386fbsd_supply_uthread): Remove function.
12544 (i386fbsd_collect_uthread): Remove function.
12545 (i386fbsd_init_abi): Don't set bsd-uthread callbacks.
12547 2017-04-04 John Baldwin <jhb@FreeBSD.org>
12549 * Makefile.in (ALL_64_TARGET_OBS): Remove alpha-fbsd-tdep.o.
12550 (ALLDEPFILES): Remove alpha-fbsd-tdep.c
12551 * NEWS: Mention that support for FreeBSD/alpha was removed.
12552 * alpha-fbsd-tdep.c: Delete file.
12553 * config/alpha/fbsd.mh: Delete file.
12554 * configure.host: Delete alpha*-*-freebsd* and
12555 alpha*-*-kfreebsd*-gnu.
12556 * configure.tgt: Delete alpha*-*-freebsd* and
12557 alpha*-*-kfreebsd*-gnu.
12559 2017-04-04 John Baldwin <jhb@FreeBSD.org>
12561 * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers,
12562 amd64bsd_store_inferior_registers): Use ptid from regcache.
12564 2017-04-04 Pedro Alves <palves@redhat.com>
12566 * dwarf2read.c (lnp_state_machine): Now a class. Initialize all
12567 data fields, make them private and add "m_" prefixes.
12568 (lnp_state_machine::lnp_state_machine): New ctor.
12569 (record_line, check_line_address, handle_set_discriminator)
12570 (handle_set_address, handle_advance_pc, handle_special_opcode)
12571 (handle_advance_line, handle_set_file, handle_negate_stmt)
12572 (handle_const_add_pc, handle_fixed_advance_pc, handle_copy)
12573 (end_sequence, advance_line): New methods.
12574 (m_gdbarch, m_record_lines_p): New fields.
12575 (lnp_reader_state): Delete.
12576 (dwarf_record_line): Rename to ...
12577 (lnp_state_machine::record_line): ... adjust.
12578 (init_lnp_state_machine): Delete.
12579 (lnp_state_machine::lnp_state_machine): New.
12580 (check_line_address): Rename to ...
12581 (lnp_state_machine::check_line_address): This.
12582 (dwarf_decode_lines_1): Remove reference to "reader_state".
12583 Adjust lnp_state_machine having a non-default ctor. Use bool.
12584 State machine internal state manipulation moved to
12585 lnp_state_machine methods.
12587 2017-04-04 Pedro Alves <palves@redhat.com>
12589 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
12590 unittests/offset-type-selftests.c.
12591 (SUBDIR_UNITTESTS_OBS): Add offset-type-selftests.o.
12592 * common/offset-type.h: New file.
12593 * common/preprocessor.h: New file.
12594 * common/traits.h: New file.
12595 * common/valid-expr.h: New file.
12596 * dwarf2expr.c: Include "common/underlying.h". Adjust to use
12597 sect_offset and cu_offset strong typedefs throughout.
12598 * dwarf2expr.h: Adjust to use sect_offset and cu_offset strong
12599 typedefs throughout.
12600 * dwarf2loc.c: Include "common/underlying.h". Adjust to use
12601 sect_offset and cu_offset strong typedefs throughout.
12602 * dwarf2read.c: Adjust to use sect_offset and cu_offset strong
12603 typedefs throughout.
12604 * gdbtypes.h: Include "common/offset-type.h".
12605 (cu_offset): Now an offset type (strong typedef) instead of a
12607 (sect_offset): Likewise.
12608 (union call_site_parameter_u): Rename "param_offset" field to
12610 * unittests/offset-type-selftests.c: New file.
12612 2017-04-04 Pedro Alves <palves@redhat.com>
12614 * common/underlying.h: New file.
12615 * dwarf2read.c: Include "common/gdb_optional.h" and
12616 "common/underlying.h".
12617 (dir_index, file_name_index): New types.
12618 (file_entry): Use them.
12619 (file_entry::include): Use to_underlying.
12620 (line_header::add_file_name): Use dir_index.
12621 (read_formatted_entries): Use gdb::optional. Read form before
12622 writting to file_entry.
12623 (dwarf_decode_line_header): Use dir_index.
12624 (lnp_state_machine::current_file): Use to_underlying.
12625 (lnp_state_machine::file): Change type to file_name_index.
12626 (dwarf_record_line): Use to_underlying.
12627 (init_lnp_state_machine): Use file_name_index.
12628 (dwarf_decode_lines_1): Use dir_index and file_name_index.
12630 2017-04-04 Pedro Alves <palves@redhat.com>
12632 * common/gdb_optional.h (gdb::optiona): Add operator->, operator*,
12633 operator bool, has_value and get methods.
12635 2017-04-04 Pedro Alves <palves@redhat.com>
12637 * dwarf2read.c (struct file_entry): Add ctors, and initialize all
12639 (line_header): Initialize all data fields. Change type of
12640 standard_opcode_lengths to std::unique_ptr<unsigned char[]>.
12641 Change type of include_dirs to std::vector<const char *>. Remove
12642 num_include_dirs, include_dirs_size. Change type of file_names to
12643 std::vector<file_entry>. Remove num_file_names, file_names_size.
12644 (line_header::line_header): New.
12645 (line_header::add_include_dir, line_header::add_file_name): New
12647 (line_header::include_dir_at): Remove NULL check.
12648 (line_header::file_name_at): Add const overload.
12649 (line_header_up): New unique_ptr typedef.
12650 (dw2_get_file_names_reader): Use line_header_up. Adjust to use
12651 std::vector. Remove free_line_header call.
12652 (dwarf2_build_include_psymtabs): Use line_header_up. Remove
12653 free_line_header call.
12654 (free_cu_line_header): Delete.
12655 (handle_DW_AT_stmt_list, handle_DW_AT_stmt_list)
12656 (setup_type_unit_groups): Use line_header_up instead of cleanups.
12657 Adjust to use std::vector.
12658 (free_line_header): Delete.
12659 (free_line_header_voidp): Use delete.
12660 (add_include_dir): Replace with ...
12661 (line_header::add_include_dir): ... this method. Use std::vector.
12662 (add_file_name): Replace with ...
12663 (line_header::add_file_name): ... this method. Use std::vector.
12664 (add_include_dir_stub): Delete.
12665 (read_formatted_entries): Remove memset.
12666 (dwarf_decode_line_header): Return a line_header_up instead of a
12667 raw pointer. Remove cleanup handling. Pass lambdas to
12668 read_formatted_entries. Adjust to use line_header methods.
12669 (dwarf_decode_lines_1): Adjust to use line_header methods.
12670 (dwarf_decode_lines, file_file_name, file_full_name): Adjust to
12673 2017-04-04 Simon Marchi <simon.marchi@polymtl.ca>
12675 * remote.c (set_general_thread, set_continue_thread): Use ptid_t
12676 instead of struct ptid.
12678 2017-05-04 Alan Hayward <alan.hayward@arm.com>
12680 * frame.c (get_frame_register_bytes): Unwind using value.
12681 (put_frame_register_bytes): Likewise.
12683 2017-03-30 Iain Buclaw <ibuclaw@gdcproject.org>
12685 * d-exp.y (type_aggregate_p): Treat TYPE_CODE_MODULE as being
12688 2017-03-29 Jan Kratochvil <jan.kratochvil@redhat.com>
12690 * auto-load.c (auto_load_section_scripts): Check SEC_HAS_CONTENTS.
12692 2017-03-29 Yao Qi <yao.qi@linaro.org>
12694 * gdbthread.h (struct thread_info): Declare constructor and
12695 destructor. Add some in-class member initializers.
12696 * thread.c (free_thread): Remove.
12697 (init_thread_list): Call delete instead of free_thread.
12698 (new_thread): Call thread_info constructor.
12699 (thread_info::thread_info): New function.
12700 (thread_info::~thread_info): New function.
12701 (delete_thread_1): Call delete instead of free_thread.
12702 (make_cleanup_restore_current_thread): Move tp and frame to
12705 2017-03-28 Anton Kolesov <anton.kolesov@synopsys.com>
12707 * arc-tdep.c (arc_frame_cache): Add support for prologue analysis.
12708 (arc_skip_prologue): Likewise.
12709 (arc_make_frame_cache): Likewise.
12710 (arc_pv_get_operand): New function.
12711 (arc_is_in_prologue): Likewise.
12712 (arc_analyze_prologue): Likewise.
12713 (arc_print_frame_cache): Likewise.
12714 (MAX_PROLOGUE_LENGTH): New constant.
12716 2017-03-28 Anton Kolesov <anton.kolesov@synopsys.com>
12718 * configure.tgt: Add arc-insn.o.
12719 * arc-tdep.c (arc_delayed_print_insn): Make non-static.
12720 (dump_arc_instruction_command): New function.
12721 (arc_fprintf_disasm): Likewise.
12722 (arc_disassemble_info): Likewise.
12723 (arc_insn_get_operand_value): Likewise.
12724 (arc_insn_get_operand_value_signed): Likewise.
12725 (arc_insn_get_memory_base_reg): Likewise.
12726 (arc_insn_get_memory_offset): Likewise.
12727 (arc_insn_get_branch_target): Likewise.
12728 (arc_insn_dump): Likewise.
12729 (arc_insn_get_linear_next_pc): Likewise.
12730 * arc-tdep.h (arc_delayed_print_insn): Add function declaration.
12731 (arc_disassemble_info): Likewise.
12732 (arc_insn_get_branch_target): Likewise.
12733 (arc_insn_get_linear_next_pc): Likewise.
12734 * NEWS: Mention new "maint print arc arc-instruction".
12736 2017-03-28 Anton Kolesov <anton.kolesov@synopsys.com>
12738 * arc-tdep (maintenance_print_arc_list): New variable.
12739 (maintenance_print_arc_command): New function.
12741 2017-03-28 Anton Kolesov <anton.kolesov@synopsys.com>
12743 * arc-tdep.c (core_v2_register_names, core_arcompact_register_names)
12744 Add "limm" and "reserved".
12745 (arc_cannot_fetch_register, arc_cannot_store_register): Add
12746 ARC_RESERVED_REGNUM and ARC_LIMM_REGNUM.
12747 * arc-tdep.h (arc_regnum): Likewise.
12749 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
12751 * xtensa-linux-nat.c (fill_gregset): Call regcache_raw_collect
12752 for THREADPTR register.
12753 (supply_gregset_reg): Call regcache_raw_supply for THREADPTR
12755 * xtensa-tdep.c (XTENSA_DBREGN_UREG): New definition.
12756 (xtensa_derive_tdep): Initialize tdep->threadptr_regnum.
12757 * xtensa-tdep.h (gdbarch_tdep::threadptr_regnum): New field.
12759 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
12761 * xtensa-tdep.c (xtensa_pseudo_register_read): Treat all
12762 registers above gdbarch_num_regs (gdbarch) as privileged in
12765 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
12767 * xtensa-linux-nat.c (fill_gregset): Call regcache_raw_collect
12768 for a single specified register or for all registers in
12769 a0_base..a0_base + C0_NREGS range.
12770 (supply_gregset_reg): Call regcache_raw_supply for a single
12771 specified register or for all registers in a0_base..a0_base +
12774 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
12776 * arch/xtensa.h (C0_NREGS): Add definition.
12777 * xtensa-tdep.c (C0_NREGS): Remove definition.
12779 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
12781 * xtensa-tdep.c (xtensa_scan_prologue, call0_analyze_prologue):
12782 Drop xtensa_default_isa initialization.
12783 (xtensa_gdbarch_init): Initialize xtensa_default_isa.
12785 2017-03-27 Pedro Alves <palves@redhat.com>
12787 * dwarf2read.c (file_entry) <dir_index>: Add comment.
12788 (file_entry::include_dir): New method.
12789 (line_header::include_dir_at, line_header::file_name_at): New
12791 (setup_type_unit_groups, setup_type_unit_groups)
12792 (psymtab_include_file_name): Simplify using the new methods.
12793 (lnp_state_machine) <the_line_header>: New field.
12794 <file>: Add comment.
12795 (lnp_state_machine::current_file): New method.
12796 (dwarf_record_line): Simplify using the new methods.
12797 (init_lnp_state_machine): Initialize the "the_line_header" field.
12798 (dwarf_decode_lines_1, dwarf_decode_lines, file_file_name):
12799 Simplify using the new methods.
12801 2017-03-27 Pedro Alves <palves@redhat.com>
12803 * cp-name-parser.y (make_empty): Delete.
12804 (demangler_special, nested_name, ptr_operator, array_indicator)
12805 (direct_declarator, declarator_1): Use fill_comp instead of
12808 2017-03-27 Pedro Alves <palves@redhat.com>
12810 * xml-support.h (gdb_xml_debug): Pass a "first-to-check" argument
12811 to ATTRIBUTE_PRINTF.
12812 * solib-target.c (library_list_start_list): Print "string" not
12814 * xml-tdesc.c (tdesc_start_field): Pass "field_name" to
12815 gdb_xml_error call.
12817 2017-03-27 Pedro Alves <palves@redhat.com>
12819 * dwarf2read.c (struct file_and_directory): New.
12820 (dwarf2_get_dwz_file): Adjust to use std::string.
12821 (dw2_get_file_names_reader): Adjust to use file_and_directory.
12822 (find_file_and_directory): Adjust to return a file_and_directory
12824 (read_file_scope): Adjust to use file_and_directory. Remove
12825 make_cleanup/do_cleanups calls.
12826 (open_and_init_dwp_file): Adjust to use std::string. Remove
12827 make_cleanup/do_cleanups calls.
12828 * python/python.c (do_start_initialization): Adjust to ldirname
12829 returning a std::string.
12830 * utils.c (ldirname): Now returns a std::string.
12831 * utils.h (ldirname): Change return type to std::string.
12832 * xml-syscall.c (xml_init_syscalls_info): Adjust to ldirname
12833 returning a std::string.
12834 * xml-tdesc.c (file_read_description_xml): Likewise.
12836 2017-03-24 Alan Hayward <alan.hayward@arm.com>
12838 * regcache.c (regcache_debug_print_register): New function.
12839 * regcache.h (regcache_debug_print_register): New declaration.
12840 * target.c (debug_print_register): Remove.
12841 (target_fetch_registers): Call regcache_debug_print_register.
12842 (target_store_registers): Likewise.
12844 2017-03-24 Pádraig Brady <pbrady@fb.com>
12846 * dwarf2read.c (setup_type_unit_groups): Ensure dir_index doesn't
12847 reference beyond the 'lh->include_dirs' array before accessing to
12849 (psymtab_include_file_name): Likewise.
12850 (dwarf_decode_lines_1): Likewise.
12851 (dwarf_decode_lines): Likewise.
12852 (file_file_name): Likewise.
12854 2017-03-23 Simon Marchi <simon.marchi@ericsson.com>
12856 * fbsd-tdep.c (fbsd_corefile_thread): Don't set/restore
12858 * proc-service.c (ps_lgetregs, ps_lsetregs, ps_lgetfpregs,
12859 ps_lsetfpregs): Likewise.
12860 * regcache.c (regcache_raw_update, regcache_raw_write): Likewise.
12861 * sol-thread.c (ps_lgetregs, ps_lsetregs, ps_lgetfpregs,
12862 ps_lsetfpregs): Likewise.
12863 * target.c (target_fetch_registers, target_store_registers):
12866 2017-03-23 Alan Hayward <alan.hayward@arm.com>
12868 * sol-thread.c (sol_thread_store_registers): Remove regcache calls.
12870 2017-03-23 Yao Qi <yao.qi@linaro.org>
12872 * aarch64-tdep.c (aarch64_process_record_test): Declare.
12873 (_initialize_aarch64_tdep): Register it.
12874 (aarch64_record_load_store): Handle PRFM instruction.
12875 (aarch64_process_record_test): New function.
12877 2017-03-23 Yao Qi <yao.qi@linaro.org>
12879 * aarch64-tdep.c (aarch64_record_load_store): Fix code
12882 2017-03-23 Yao Qi <yao.qi@linaro.org>
12884 * aarch64-tdep.c: Remove AARCH64_RECORD_FAILURE.
12886 2017-03-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
12888 python/python.c (do_start_initialization): Fix memory leak.
12890 2017-03-22 Simon Marchi <simon.marchi@polymtl.ca>
12892 * inf-ptrace.c (inf_ptrace_xfer_partial): Get pid from ptid
12893 using get_ptrace_pid.
12894 * linux-nat.c (linux_nat_xfer_partial): Don't set/restore
12896 (linux_proc_xfer_partial, linux_proc_xfer_spu): Use lwp of
12897 inferior_ptid instead of pid.
12899 2017-03-22 Yao Qi <yao.qi@linaro.org>
12901 * aarch64-tdep.c: Wrap locally used classes in anonymous
12903 * arm-tdep.c: Likewise.
12904 * linespec.c: Likewise.
12905 * ui-out.c: Likewise.
12907 2017-03-22 Jonah Graham <jonah@kichwacoders.com>
12910 * python/lib/gdb/printer/bound_registers.py: Import sys.
12912 2017-03-21 Simon Marchi <simon.marchi@ericsson.com>
12914 * windows-nat.c (do_windows_fetch_inferior_registers): Add
12915 windows_thread_info parameter and use it instead of
12917 (windows_fetch_inferior_registers): Don't set current_thread,
12918 pass the thread to do_windows_fetch_inferior_registers. Use
12919 ptid from regcache instead of inferior_ptid.
12920 (do_windows_store_inferior_registers): Add windows_thread_info
12921 parameter and use it instead of current_thread.
12922 (windows_store_inferior_registers): Don't set current_thread,
12923 pass the thread to do_windows_store_inferior_registers. Use
12924 ptid from regcache instead of inferior_ptid.
12926 2017-03-21 Simon Marchi <simon.marchi@ericsson.com>
12928 * ser-mingw.c (ser_windows_raw): Remove reference to
12929 struct serial::current_timeout.
12931 2017-03-21 Ivo Raisr <ivo.raisr@oracle.com>
12934 * gdb/sparc-tdep.h (gdbarch_tdep) <sparc64_ccr_type>: New field.
12935 * gdb/sparc64-tdep.c (sparc64_ccr_type): New function.
12936 (sparc64_fsr_type): Fix %fsr decoding.
12938 2017-03-21 Tim Wiederhake <tim.wiederhake@intel.com>
12940 * python/py-record-btrace.c (btpy_insn_data): Change return type
12943 2017-03-20 Simon Marchi <simon.marchi@polymtl.ca>
12945 * spu-linux-nat.c (spu_fetch_inferior_registers,
12946 spu_store_inferior_registers): Use ptid from regcache, set and
12947 restore inferior_ptid.
12948 * spu-multiarch.c (spu_fetch_registers, spu_store_registers):
12951 2017-03-20 Simon Marchi <simon.marchi@polymtl.ca>
12953 * i386-linux-nat.c (fetch_register, store_register,
12954 i386_linux_fetch_inferior_registers,
12955 i386_linux_store_inferior_registers): Use ptid from regcache.
12956 * ia64-linux-nat.c (ia64_linux_fetch_register,
12957 ia64_linux_store_register): Likewise.
12958 * inf-ptrace.c (inf_ptrace_fetch_register,
12959 inf_ptrace_store_register): Likewise.
12960 * m32r-linux-nat.c (m32r_linux_fetch_inferior_registers,
12961 m32r_linux_store_inferior_registers): Likewise.
12962 * m68k-bsd-nat.c (m68kbsd_fetch_inferior_registers,
12963 m68kbsd_store_inferior_registers): Likewise.
12964 * m68k-linux-nat.c (fetch_register, store_register,
12965 m68k_linux_fetch_inferior_registers,
12966 m68k_linux_store_inferior_registers): Likewise.
12967 * m88k-bsd-nat.c (m88kbsd_fetch_inferior_registers,
12968 m88kbsd_store_inferior_registers): Likewise.
12969 * mips-fbsd-nat.c (mips_fbsd_fetch_inferior_registers,
12970 mips_fbsd_store_inferior_registers): Likewise.
12971 * mips-linux-nat.c (mips64_linux_regsets_fetch_registers,
12972 mips64_linux_regsets_store_registers): Likewise.
12973 * mips-nbsd-nat.c (mipsnbsd_fetch_inferior_registers,
12974 mipsnbsd_store_inferior_registers): Likewise.
12975 * mips-obsd-nat.c (mips64obsd_fetch_inferior_registers,
12976 mips64obsd_store_inferior_registers): Likewise.
12977 * nto-procfs.c (procfs_fetch_registers, procfs_store_registers):
12979 * ppc-fbsd-nat.c (ppcfbsd_fetch_inferior_registers,
12980 ppcfbsd_store_inferior_registers): Likewise.
12981 * ppc-linux-nat.c (ppc_linux_fetch_inferior_registers,
12982 ppc_linux_store_inferior_registers): Likewise.
12983 * ppc-nbsd-nat.c (ppcnbsd_fetch_inferior_registers,
12984 ppcnbsd_store_inferior_registers): Likewise.
12985 * ppc-obsd-nat.c (ppcobsd_fetch_registers,
12986 ppcobsd_store_registers): Likewise.
12987 * procfs.c (procfs_fetch_registers, procfs_store_registers):
12989 * ravenscar-thread.c (ravenscar_fetch_registers,
12990 ravenscar_store_registers, ravenscar_prepare_to_store):
12992 * record-btrace.c (record_btrace_fetch_registers,
12993 record_btrace_store_registers, record_btrace_prepare_to_store):
12995 * remote-sim.c (gdbsim_fetch_register, gdbsim_store_register):
12996 Lookup inferior using ptid from regcache, instead of
12998 * remote.c (remote_fetch_registers, remote_store_registers): Use
12999 ptid from regcache.
13000 * rs6000-nat.c (fetch_register, store_register): Likewise.
13001 * s390-linux-nat.c (s390_linux_fetch_inferior_registers,
13002 s390_linux_store_inferior_registers): Likewise.
13003 * sh-nbsd-nat.c (shnbsd_fetch_inferior_registers,
13004 shnbsd_store_inferior_registers): Likewise.
13005 * sol-thread.c (sol_thread_fetch_registers,
13006 sol_thread_store_registers): Likewise.
13007 * sparc-nat.c (sparc_fetch_inferior_registers,
13008 sparc_store_inferior_registers): Likewise.
13009 * tilegx-linux-nat.c (fetch_inferior_registers,
13010 store_inferior_registers): Likewise.
13011 * vax-bsd-nat.c (vaxbsd_fetch_inferior_registers,
13012 vaxbsd_store_inferior_registers): Likewise.
13013 * xtensa-linux-nat.c (fetch_gregs, store_gregs, fetch_xtregs,
13014 store_xtregs): Likewise.
13016 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
13019 * NEWS: Mention support for rvalue references in GDB and python.
13020 * doc/gdb.texinfo (C Plus Plus Expressions): Mention that GDB
13021 supports both lvalue and rvalue references.
13023 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
13026 * gdbtypes.c (rank_one_type): Implement overloading
13027 resolution rules regarding rvalue references.
13029 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
13032 * aarch64-tdep.c (aarch64_type_align)
13033 (aarch64_extract_return_value, aarch64_store_return_value): Change
13034 lvalue reference type checks to general reference type checks.
13035 * amd64-tdep.c (amd64_classify): Likewise.
13036 * amd64-windows-tdep.c (amd64_windows_passed_by_integer_register):
13038 * arm-tdep.c (arm_type_align, arm_extract_return_value)
13039 (arm_store_return_value): Likewise.
13040 * ax-gdb.c (gen_fetch, gen_cast): Likewise.
13041 * c-typeprint.c (c_print_type): Likewise.
13042 * c-varobj.c (adjust_value_for_child_access, c_value_of_variable)
13043 (cplus_number_of_children, cplus_describe_child): Likewise.
13044 * compile/compile-c-symbols.c (generate_vla_size): Likewise.
13045 * completer.c (expression_completer): Likewise.
13046 * cp-support.c (make_symbol_overload_list_adl_namespace):
13048 * darwin-nat-info.c (info_mach_region_command): Likewise.
13049 * dwarf2loc.c (entry_data_value_coerce_ref)
13050 (value_of_dwarf_reg_entry): Likewise.
13051 * eval.c (ptrmath_type_p, evaluate_subexp_standard)
13052 (evaluate_subexp_for_address, evaluate_subexp_for_sizeof):
13054 * findvar.c (extract_typed_address, store_typed_address):
13056 * gdbtypes.c (rank_one_type): Likewise.
13057 * hppa-tdep.c (hppa64_integral_or_pointer_p): Likewise.
13058 * infcall.c (value_arg_coerce): Likewise.
13059 * language.c (pointer_type): Likewise.
13060 * m32c-tdep.c (m32c_reg_arg_type, m32c_m16c_address_to_pointer):
13062 * m88k-tdep.c (m88k_integral_or_pointer_p): Likewise.
13063 * mn10300-tdep.c (mn10300_type_align): Likewise.
13064 * msp430-tdep.c (msp430_push_dummy_call): Likewise.
13065 * ppc-sysv-tdep.c (do_ppc_sysv_return_value)
13066 (ppc64_sysv_abi_push_param, ppc64_sysv_abi_return_value):
13068 * printcmd.c (print_formatted, x_command): Likewise.
13069 * python/py-type.c (typy_get_composite, typy_template_argument):
13071 * python/py-value.c (valpy_referenced_value)
13072 (valpy_get_dynamic_type, value_has_field): Likewise.
13073 * s390-linux-tdep.c (s390_function_arg_integer): Likewise.
13074 * sparc-tdep.c (sparc_integral_or_pointer_p): Likewise.
13075 * sparc64-tdep.c (sparc64_integral_or_pointer_p): Likewise.
13076 * spu-tdep.c (spu_scalar_value_p): Likewise.
13077 * symtab.c (lookup_symbol_aux): Likewise.
13078 * typeprint.c (whatis_exp, print_type_scalar): Likewise.
13079 * valarith.c (binop_types_user_defined_p, unop_user_defined_p):
13081 * valops.c (value_cast_pointers, value_cast)
13082 (value_reinterpret_cast, value_dynamic_cast, value_addr, typecmp)
13083 (value_struct_elt, value_struct_elt_bitpos)
13084 (value_find_oload_method_list, find_overload_match)
13085 (value_rtti_indirect_type): Likewise.
13086 * valprint.c (val_print_scalar_type_p, generic_val_print):
13088 * value.c (value_actual_type, value_as_address, unpack_long)
13089 (pack_long, pack_unsigned_long, coerce_ref_if_computed)
13090 (coerce_ref): Likewise.
13091 * varobj.c (varobj_get_value_type): Likewise.
13093 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
13096 * doc/python.texi (Types in Python): Add TYPE_CODE_RVALUE_REF to
13097 table of constants.
13098 * python/lib/gdb/command/explore.py: Support exploring values
13099 of rvalue reference types.
13100 * python/lib/gdb/types.py: Implement get_basic_type() for
13101 rvalue reference types.
13102 * python/py-type.c (pyty_codes) <TYPE_CODE_RVALUE_REF>: New
13104 * python/py-value.c (valpy_getitem): Add an rvalue reference
13106 (valpy_reference_value): Add new parameter "refcode".
13107 (valpy_lvalue_reference_value, valpy_rvalue_reference_value):
13108 New wrappers for valpy_reference_value().
13109 * python/py-xmethods.c (gdbpy_get_xmethod_result_type)
13110 (gdbpy_invoke_xmethod): Likewise.
13112 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
13115 * dwarf2read.c (process_die, read_type_die_1): Handle the
13116 DW_TAG_rvalue_reference_type DIE.
13117 (read_tag_reference_type): Add new parameter "refcode".
13119 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
13122 * c-typeprint.c (c_print_type, c_type_print_varspec_prefix)
13123 (c_type_print_modifier, c_type_print_varspec_suffix)
13124 (c_type_print_base): Support printing rvalue reference types.
13125 * c-valprint.c (c_val_print, c_value_print): Support printing
13126 rvalue reference values.
13128 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
13131 * cp-name-parser.y (ptr_operator): Handle the '&&' token in
13133 * cp-support.c (replace_typedefs): Handle
13134 DEMANGLE_COMPONENT_RVALUE_REFERENCE.
13135 * python/py-type.c (typy_lookup_type): Likewise.
13137 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
13140 * c-exp.y (ptr_operator): Handle the '&&' token in the typename.
13141 * parse.c (insert_type): Change assert statement.
13142 (follow_types): Handle rvalue reference types.
13143 * parser-defs.h (enum type_pieces) <tp_rvalue_reference>: New
13146 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
13149 * ada-lang.c (ada_evaluate_subexp): Adhere to the new
13150 value_ref() interface.
13151 * c-valprint.c (c_value_print): Likewise.
13152 * infcall.c (value_arg_coerce): Likewise.
13153 * python/py-value.c (valpy_reference_value): Likewise.
13154 * valops.c (value_cast, value_reinterpret_cast)
13155 (value_dynamic_cast, typecmp): Likewise.
13156 (value_ref): Parameterize by kind of return value reference type.
13157 * value.h (value_ref): Add new parameter "refcode".
13159 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
13162 * dwarf2read.c (read_tag_reference_type): Use
13163 lookup_lvalue_reference_type() instead of lookup_reference_type().
13164 * eval.c (evaluate_subexp_standard): Likewise.
13165 * f-exp.y: Likewise.
13166 * gdbtypes.c (make_reference_type, lookup_reference_type):
13167 Generalize with rvalue reference types.
13168 (lookup_lvalue_reference_type, lookup_rvalue_reference_type): New
13169 convenience wrappers for lookup_reference_type().
13170 * gdbtypes.h (make_reference_type, lookup_reference_type): Add a
13171 reference kind parameter.
13172 (lookup_lvalue_reference_type, lookup_rvalue_reference_type): Add
13173 wrappers for lookup_reference_type().
13174 * guile/scm-type.c (gdbscm_type_reference): Use
13175 lookup_lvalue_reference_type() instead of lookup_reference_type().
13176 * guile/scm-value.c (gdbscm_value_dynamic_type): Likewise.
13177 * parse.c (follow_types): Likewise.
13178 * python/py-type.c (typy_reference, typy_lookup_type): Likewise.
13179 * python/py-value.c (valpy_get_dynamic_type, valpy_getitem):
13181 * python/py-xmethods.c (gdbpy_get_xmethod_result_type)
13182 (gdbpy_invoke_xmethod): Likewise.
13183 * stabsread.c: Provide extra argument to make_reference_type()
13185 * valops.c (value_ref, value_rtti_indirect_type): Use
13186 lookup_lvalue_reference_type() instead of lookup_reference_type().
13188 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
13191 * gdbtypes.h (enum type_code) <TYPE_CODE_RVALUE_REF>: New constant.
13192 (TYPE_IS_REFERENCE): New macro.
13193 (struct type): Add rvalue_reference_type field.
13194 (TYPE_RVALUE_REFERENCE_TYPE): New macro.
13196 2017-03-20 Marc-Andre Laperle <marc-andre.laperle@ericsson.com>
13198 * NEWS: Add an entry about new '-file-list-shared-libraries' command.
13199 * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries):
13200 New function definition.
13201 * mi/mi-cmds.c (mi_cmds): Add -file-list-shared-libraries command.
13202 * mi/mi-cmds.h (mi_cmd_file_list_shared_libraries):
13203 New function declaration.
13204 * mi/mi-interp.c (mi_output_solib_attribs): New Function.
13205 * mi/mi-interp.h: New file.
13206 * solib.c (info_sharedlibrary_command): Replace for loop with
13208 * solib.h (update_solib_list): New function declaration.
13209 (so_list_head): Move macro.
13210 * solist.h (ALL_SO_LIBS): New macro.
13212 2017-03-20 Marc-Andre Laperle <marc-andre.laperle@ericsson.com>
13214 * infcmd.c (post_create_inferior): Remove unused argument in
13216 * remote.c (remote_start_remote): Likewise.
13217 * solib-frv.c (frv_fetch_objfile_link_map): Likewise.
13218 * solib-svr4.c: (svr4_fetch_objfile_link_map): Likewise.
13219 (enable_break): Likewise.
13220 * solib.c (update_solib_list): Remove unused target argument
13221 and its documentation.
13222 (solib_add): Remove unused target argument. Remove unused
13223 argument in call to update_solib_list.
13224 (info_sharedlibrary_command): Remove unused argument in call
13225 to update_solib_list.
13226 (sharedlibrary_command): Remove unused argument in call to
13228 (handle_solib_event): Likewise.
13229 (reload_shared_libraries): Likewise.
13230 * solib.h (solib_add): Remove unused target argument.
13232 2017-03-20 Andreas Arnez <arnez@linux.vnet.ibm.com>
13234 * s390-linux-tdep.c (is_rsi, is_rie): Remove functions.
13235 (s390_displaced_step_fixup): Cover relative branches with the
13236 default fixup handling. This fixes lack of support for some
13237 relative branch instructions.
13239 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
13241 * i386-gnu-nat.c (gnu_fetch_registers, gnu_store_registers): Use
13242 ptid from regcache.
13244 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
13246 * i386-darwin-nat.c (i386_darwin_fetch_inferior_registers,
13247 i386_darwin_store_inferior_registers): Use ptid from regcache.
13249 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
13251 * i386-bsd-nat.c (i386bsd_fetch_inferior_registers,
13252 i386bsd_store_inferior_registers): Use ptid from regcache.
13254 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
13256 * hppa-obsd-nat.c (hppaobsd_fetch_registers,
13257 hppaobsd_store_registers): Use ptid from regcache.
13259 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
13261 * hppa-nbsd-nat.c (hppanbsd_fetch_registers,
13262 hppanbsd_store_registers): Use ptid from regcache.
13264 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
13266 * hppa-linux-nat.c (fetch_register, store_register): Use ptid
13267 from regcache. Use get_ptrace_pid.
13269 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
13271 * corelow.c (get_core_register_section): Use ptid from regcache,
13274 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
13276 * bsd-uthread.c (bsd_uthread_fetch_registers,
13277 bsd_uthread_store_registers): Use ptid from regcache, set and
13278 restore inferior_ptid.
13280 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
13282 * arm-nbsd-nat.c (fetch_register, fetch_regs, fetch_fp_register,
13283 fetch_fp_regs, store_register, store_regs, store_fp_register,
13284 store_fp_regs): Use ptid from regcache.
13286 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
13288 * arm-linux-nat.c (fetch_fpregs, store_fpregs, fetch_regs,
13289 store_regs, fetch_wmmx_regs, store_wmmx_regs, fetch_vfp_regs,
13290 store_vfp_regs): Use ptid from regcache.
13292 2017-03-17 Pedro Alves <palves@redhat.com>
13295 * ser-base.c (ser_base_wait_for): Add comment.
13296 (do_ser_base_readchar): Improve comment based on the ser-unix.c's
13298 * ser-unix.c (hardwire_raw): Remove reference to
13299 scb->current_timeout.
13300 (wait_for, do_hardwire_readchar, hardwire_readchar): Delete.
13301 (hardwire_ops): Install ser_base_readchar instead of
13303 * serial.h (struct serial) <current_timeout, timeout_remaining>:
13306 2017-03-17 Jonah Graham <jonah@kichwacoders.com>
13309 * python/lib/gdb/printer/bound_registers.py: Add support for
13312 2017-03-16 Andreas Arnez <arnez@linux.vnet.ibm.com>
13314 * dwarf2loc.c (indirect_synthetic_pointer): Get data type of
13315 pointed-to DIE and pass it to dwarf2_evaluate_loc_desc_full.
13316 (dwarf2_evaluate_loc_desc_full): New parameter subobj_type; rename
13317 byte_offset to subobj_byte_offset. Fix the handling of
13318 DWARF_VALUE_STACK on big-endian targets when coming via an
13320 (dwarf2_evaluate_loc_desc): Adjust call to
13321 dwarf2_evaluate_loc_desc_full.
13322 * dwarf2loc.h (dwarf2_fetch_die_type_sect_off): New declaration.
13323 * dwarf2read.c (dwarf2_fetch_die_type_sect_off): New function.
13325 2017-03-16 Yao Qi <yao.qi@linaro.org>
13327 * arm-tdep.c (thumb_record_misc): Decode CBNZ, CBZ, REV16,
13328 and REVSH instructions.
13330 2017-03-16 Yao Qi <yao.qi@linaro.org>
13332 * arm-tdep.c [GDB_SELF_TEST]: include "selftests.h".
13333 (arm_record_test): Declare.
13334 (_initialize_arm_tdep) [GDB_SELF_TEST]: call register_self_test.
13335 (thumb_record_ld_st_reg_offset): Rewrite the opcode matching to
13336 align with the manual.
13337 (thumb_record_misc): Adjust the code order to align with the
13339 (thumb2_record_decode_insn_handler): Fix instruction matching.
13340 (instruction_reader_thumb): New class.
13341 (arm_record_test): New function.
13343 2017-03-16 Yao Qi <yao.qi@linaro.org>
13345 * arm-tdep.c (abstract_memory_reader): New class.
13346 (instruction_reader): New class.
13347 (extract_arm_insn): Add argument 'reader'. Callers updated.
13348 (decode_insn): Likewise.
13350 2017-03-16 Doug Evans <dje@google.com>
13352 * guile/scm-lazy-string.c (lazy_string_smob): Clarify use of LENGTH
13353 member. Change type of TYPE member to SCM. All uses updated.
13354 (lsscm_make_lazy_string_smob): Add assert.
13355 (lsscm_make_lazy_string): Flag bad length values.
13356 (lsscm_elt_type): New function.
13357 (gdbscm_lazy_string_to_value): Rewrite to use
13358 lsscm_safe_lazy_string_to_value.
13359 (lsscm_safe_lazy_string_to_value): Fix handling of TYPE_CODE_PTR.
13360 * guile/scm-value.c (gdbscm_value_to_lazy_string): Flag bad length
13361 values. Fix TYPE_CODE_PTR. Handle TYPE_CODE_ARRAY. Handle typedefs
13363 * guile/guile-internal.h (tyscm_scm_to_type): Declare.
13364 * guile/scm-type.c (tyscm_scm_to_type): New function.
13366 2017-03-15 Doug Evans <dje@google.com>
13368 PR python/17728, python/18439, python/18779
13369 * python/py-lazy-string.c (lazy_string_object): Clarify use of LENGTH
13370 member. Change type of TYPE member to PyObject *. All uses updated.
13371 (stpy_convert_to_value): Fix handling of TYPE_CODE_PTR.
13372 (gdbpy_create_lazy_string_object): Flag bad length values.
13373 Handle TYPE_CODE_ARRAY with possibly different user-provided length.
13374 Handle typedefs in incoming type.
13375 (stpy_lazy_string_elt_type): New function.
13376 (gdbpy_extract_lazy_string): Call it.
13377 * python/py-value.c (valpy_lazy_string): Flag bad length values.
13378 Fix handling of TYPE_CODE_PTR. Handle TYPE_CODE_ARRAY. Handle
13379 typedefs in incoming type.
13381 2017-03-16 Doug Evans <dje@google.com>
13383 * guile/guile-internal.h (tyscm_scm_to_type): Declare.
13384 * guile/scm-type.c (tyscm_scm_to_type): New function.
13386 2017-03-16 Jiong Wang <jiong.wang@arm.com>
13388 * inf-ptrace.c (inf_ptrace_peek_poke): Change the type to
13389 "ULONGEST" for "skip".
13391 2017-03-14 Andreas Arnez <arnez@linux.vnet.ibm.com>
13394 * inf-ptrace.c (inf_ptrace_xfer_partial): In "case
13395 TARGET_OBJECT_MEMORY", extract the logic for ptrace peek/poke...
13396 (inf_ptrace_peek_poke): ...here. New function. Now also loop
13397 over ptrace peek/poke until end of buffer or error.
13399 2017-03-14 Simon Marchi <simon.marchi@ericsson.com>
13401 * parse.c (length_of_subexp): Make static.
13402 * parser-defs.h (length_of_subexp): Remove.
13404 2017-03-14 Andreas Arnez <arnez@linux.vnet.ibm.com>
13406 * linux-nat.c (linux_proc_xfer_partial): Handle write operations
13409 2017-03-14 Pedro Alves <palves@redhat.com>
13411 * cp-name-parser.y (cp_demangled_name_to_comp): Update comment.
13412 (main): Use std::unique_ptr. Remove calls to
13413 cp_demangled_name_parse_free.
13415 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
13417 * alpha-bsd-nat.c (alphabsd_fetch_inferior_registers,
13418 alphabsd_store_inferior_registers): Use regcache->ptid instead
13421 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
13423 * aix-thread.c (aix_thread_fetch_registers,
13424 aix_thread_store_registers): Use regcache->ptid instead of
13427 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
13429 * aarch64-linux-nat.c (fetch_gregs_from_thread,
13430 store_gregs_to_thread, fetch_fpregs_from_thread,
13431 store_fpregs_to_thread): Use regcache->ptid instead of
13434 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
13436 * amd64-linux-nat.c (amd64_linux_fetch_inferior_registers,
13437 amd64_linux_fetch_inferior_registers): Use regcache->ptid
13438 instead of inferior_ptid.
13440 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
13442 * target.c (target_fetch_registers, target_store_registers): Add
13445 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
13447 * regcache.h (regcache_get_ptid): New function.
13448 * regcache.c (regcache_get_ptid): New function.
13450 2017-03-13 Mark Wielaard <mark@klomp.org>
13452 * cp-name-parser.y (make_empty): Initialize d_printing to zero.
13454 2017-03-10 Keith Seitz <keiths@redhat.com>
13457 * c-typeprint.c (cp_type_print_method_args): Skip artificial arguments.
13459 2017-03-08 Pedro Alves <palves@redhat.com>
13462 * infrun.c (start_step_over, do_target_resume, resume)
13463 (restart_threads): Assert we're not resuming a thread that is
13464 meant to be stopped.
13465 (infrun_thread_stop_requested_callback): Delete.
13466 (infrun_thread_stop_requested): If the thread is internally
13467 stopped, queue a pending stop event and clear the thread's
13468 inline-frame state.
13469 (handle_stop_requested): New function.
13470 (handle_syscall_event, handle_inferior_event_1): Use
13471 handle_stop_requested.
13472 (handle_stop_requested): New function.
13473 (handle_signal_stop): Set the thread's stop_signal here instead of
13475 (finish_step_over): Clear step over info unconditionally.
13476 (handle_signal_stop): If the user had interrupted the event
13477 thread, consider the stop a random signal.
13478 (handle_signal_stop) <signal arrived while stepping over
13479 breakpoint>: Don't restart threads here.
13480 (stop_waiting): Don't clear step-over info here.
13482 2017-03-08 Pedro Alves <palves@redhat.com>
13485 * common/gdb_unlinker.h (unlinker::unlinker): Attribute nonnull
13486 goes to argument 2, not 1.
13488 2017-03-08 Pedro Alves <palves@redhat.com>
13491 * top.c (gdb_readline_wrapper): Avoid passing NULL to
13492 display_gdb_prompt.
13493 (command_line_input): Add comment.
13495 2017-03-08 Pedro Alves <palves@redhat.com>
13498 * tui/tui-file.c (tui_file::write): New.
13499 * tui/tui-file.h (tui_file): Override "write".
13500 * tui/tui-io.c (do_tui_putc, update_start_line): New functions,
13501 factored out from ...
13502 (tui_puts): ... here.
13503 (tui_putc): Use them.
13504 (tui_write): New function.
13505 * tui/tui-io.h (tui_write): Declare.
13507 2017-03-07 Sergio Durigan Junior <sergiodj@redhat.com>
13509 * Makefile.in (SFILES): Replace "environ.c" with
13510 "common/environ.c".
13511 (HFILES_NO_SRCDIR): Likewise, for "environ.h".
13512 * environ.c: Include "common-defs.h" instead of "defs.h. Moved
13514 * common/environ.c: ... here.
13515 * environ.h: Moved to...
13516 * common/environ.h: ... here.
13518 2017-03-07 Peter Bergner <bergner@vnet.ibm.com>
13520 * gdbarch.sh (pstring_ptr): New static function.
13521 (gdbarch_disassembler_options): Use it.
13522 (gdbarch_verify_disassembler_options): Print valid_disassembler_options,
13523 not valid_disassembler_option->name.
13524 * gdbarch.c: Regenerate.
13526 2017-03-07 Peter Bergner <bergner@vnet.ibm.com>
13528 * config/powerpc/ppc64-linux.mh (MH_CFLAGS): Delete.
13530 2017-03-07 Pedro Alves <palves@redhat.com>
13532 * tui/tui-regs.c (tui_restore_gdbout): Don't delete gdb_stdout.
13534 2017-03-07 Walfred Tedeschi <walfred.tedeschi@intel.com>
13536 * i387-tdep.h (i387_reset_bnd_regs): Add function definition.
13537 * i387-tdep.c (i387_reset_bnd_regs): Add function implementation.
13538 * i386-tdep.c (i386_push_dummy_call): Call i387_reset_bnd_regs.
13539 * amd64-tdep.c (amd64_push_dummy_call): Call i387_reset_bnd_regs.
13541 2017-03-06 Simon Marchi <simon.marchi@ericsson.com>
13543 * xtensa-linux-nat.c (fetch_gregs): Remove const.
13545 2017-03-03 Simon Marchi <simon.marchi@ericsson.com>
13547 * remote.c (remote_add_target_side_commands): Use range-based
13550 2017-03-03 Yao Qi <yao.qi@linaro.org>
13553 * ada-valprint.c (ada_val_print_ref): Call value_fetch_lazy if
13555 * valprint.c (common_val_print): Likewise.
13557 2017-02-28 Peter Bergner <bergner@vnet.ibm.com>
13559 * NEWS: Mention new set/show disassembler-options commands.
13560 * doc/gdb.texinfo: Document new set/show disassembler-options commands.
13561 * disasm.c: Include "arch-utils.h", "gdbcmd.h" and "safe-ctype.h".
13562 (prospective_options): New static variable.
13563 (gdb_disassembler::gdb_disassembler): Initialize
13564 m_di.disassembler_options.
13565 (gdb_buffered_insn_length_init_dis): Initilize di->disassembler_options.
13566 (get_disassembler_options): New function.
13567 (set_disassembler_options): Likewise.
13568 (set_disassembler_options_sfunc): Likewise.
13569 (show_disassembler_options_sfunc): Likewise.
13570 (disassembler_options_completer): Likewise.
13571 (_initialize_disasm): Likewise.
13572 * disasm.h (get_disassembler_options): New prototype.
13573 (set_disassembler_options): Likewise.
13574 * gdbarch.sh (gdbarch_disassembler_options): New variable.
13575 (gdbarch_verify_disassembler_options): Likewise.
13576 * gdbarch.c: Regenerate.
13577 * gdbarch.h: Likewise.
13578 * arm-tdep.c (num_disassembly_options): Delete.
13579 (set_disassembly_style): Likewise.
13580 (arm_disassembler_options): New static variable.
13581 (set_disassembly_style_sfunc): Convert short style name into long
13582 option name. Call set_disassembler_options.
13583 (show_disassembly_style_sfunc): New function.
13584 (arm_gdbarch_init): Call set_gdbarch_disassembler_options and
13585 set_gdbarch_verify_disassembler_options.
13586 (_initialize_arm_tdep): Delete regnames variable and update callers.
13587 (arm_disassembler_options): Initialize.
13588 (disasm_options): New variable.
13589 (num_disassembly_options): Rename from this...
13590 (num_disassembly_styles): ...to this. Compute by scanning through
13592 (valid_disassembly_styles): Initialize using disasm_options.
13593 Remove calls to parse_arm_disassembler_option, get_arm_regnames and
13594 set_arm_regname_option.
13595 Pass show_disassembly_style_sfunc to the "disassembler" setshow command.
13596 * rs6000-tdep.c (powerpc_disassembler_options): New static variable.
13597 (rs6000_gdbarch_init): Call set_gdbarch_disassembler_options and
13598 set_gdbarch_verify_disassembler_options.
13599 * s390-tdep.c (s390_disassembler_options): New static variable.
13600 (s390_gdbarch_init):all set_gdbarch_disassembler_options and
13601 set_gdbarch_verify_disassembler_options.
13603 2017-02-27 Simon Marchi <simon.marchi@ericsson.com>
13605 * remote.c (remote_add_target_side_condition): Remove "struct"
13606 keyword from range-based for loop.
13608 2017-02-27 Simon Marchi <simon.marchi@ericsson.com>
13610 * remote.c (remote_add_target_side_condition): Use range-based
13611 for loop. Update comment.
13613 2017-02-27 Yao Qi <yao.qi@linaro.org>
13615 * f-typeprint.c (f_print_type): Check "varstring" is empty first.
13617 2017-02-26 Alan Hayward <alan.hayward@arm.com>
13619 * regcache.c (regcache_raw_update): New function.
13620 (regcache_raw_read): Move code to regcache_raw_update.
13621 * regcache.h (regcache_raw_update): New declaration.
13622 * remote.c (remote_prepare_to_store): Call regcache_raw_update.
13624 2017-02-26 Jan Kratochvil <jan.kratochvil@redhat.com>
13626 * dwarf2read.c (create_debug_type_hash_table): Initialize
13627 header.signature and header.type_offset_in_tu.
13629 2017-02-24 Pedro Alves <palves@redhat.com>
13631 * symtab.c (make_file_symbol_completion_list_1): Use
13632 add_symtab_completions.
13634 2017-02-24 Alan Hayward <alan.hayward@arm.com>
13636 * stack.c (frame_info): Use frame_unwind_register_value to avoid buf.
13638 2017-02-24 Alan Hayward <alan.hayward@arm.com>
13640 * i386-tdep.c (i386_pseudo_register_read_into_value): Use
13641 I386_MAX_REGISTER_SIZE.
13642 (i386_pseudo_register_write): Likewise.
13643 (i386_process_record): Likewise.
13644 * i387-tdep.c (i387_supply_xsave): Likewise.
13645 * m68k-linux-nat.c (fetch_register): Use M68K_MAX_REGISTER_SIZE.
13646 (store_register): Likewise.
13648 2017-02-23 Pedro Alves <palves@redhat.com>
13650 * ada-lang.c: Include "common/function-view.h".
13651 (ada_iterate_over_symbols): Adjust to use function_view as
13653 (struct add_partial_datum, ada_complete_symbol_matcher): Delete.
13654 (ada_make_symbol_completion_list): Use a lambda.
13655 (ada_exc_search_name_matches): Delete.
13656 (name_matches_regex): New.
13657 (ada_add_global_exceptions): Use a lambda and name_matches_regex.
13658 * compile/compile-c-support.c: Include "common/function-view.h".
13659 (print_one_macro): Change prototype to accept a ui_file pointer.
13660 (write_macro_definitions): Use a lambda.
13661 * dwarf2read.c: Include "common/function-view.h".
13662 (dw2_map_expand_apply, dw2_map_symtabs_matching_filename)
13663 (dw2_expand_symtabs_matching): Adjust to use function_view as
13665 * language.h: Include "common/function-view.h".
13666 (struct language_defn) <la_iterate_over_symbols>: Adjust to use
13667 function_view as callback type.
13668 (LA_ITERATE_OVER_SYMBOLS): Remove DATA parameter.
13669 * linespec.c: Include "common/function-view.h".
13670 (collect_info::add_symbol): New method.
13671 (struct symbol_and_data_callback, iterate_inline_only, struct
13672 symbol_matcher_data, iterate_name_matcher): Delete.
13673 (iterate_over_all_matching_symtabs): Adjust to use function_view
13674 as callback type and lambdas.
13675 (iterate_over_file_blocks): Adjust to use function_view as
13677 (decode_compound_collector): Now a class with private fields.
13678 (decode_compound_collector::release_symbols): New method.
13679 (collect_one_symbol): Rename to...
13680 (decode_compound_collector::operator()): ... this and adjust.
13681 (lookup_prefix_sym): decode_compound_collector construction bits
13682 move to decode_compound_collector ctor. Pass the
13683 decode_compound_collector object directly as callback. Remove
13684 cleanups and use decode_compound_collector::release_symbols
13686 (symtab_collector): Now a class with private fields.
13687 (symtab_collector::release_symtabs): New method.
13688 (add_symtabs_to_list): Rename to...
13689 (symtab_collector::operator()): ... this and adjust.
13690 (collect_symtabs_from_filename): symtab_collector construction
13691 bits move to symtab_collector ctor. Pass the symtab_collector
13692 object directly as callback. Remove cleanups and use
13693 symtab_collector::release_symtabs instead.
13694 (collect_symbols): Delete.
13695 (add_matching_symbols_to_info): Use lambdas.
13696 * macrocmd.c (print_macro_callback): Delete.
13697 (info_macro_command): Use a lambda.
13698 (info_macros_command): Pass print_macro_definition as callable
13700 (print_one_macro): Remove 'ignore' parameter.
13701 (macro_list_command): Adjust.
13702 * macrotab.c (macro_for_each_data::fn): Now a function_view.
13703 (macro_for_each_data::user_data): Delete field.
13704 (foreach_macro): Adjust to call the function_view.
13705 (macro_for_each): Adjust to use function_view as callback type.
13706 (foreach_macro_in_scope): Adjust to call the function_view.
13707 (macro_for_each_in_scope): Adjust to use function_view as callback
13709 * macrotab.h: Include "common/function-view.h".
13710 (macro_callback_fn): Declare a prototype instead of a pointer.
13711 Remove "user_data" parameter.
13712 (macro_for_each, macro_for_each_in_scope): Adjust to use
13713 function_view as callback type.
13714 * psymtab.c (partial_map_expand_apply)
13715 (psym_map_symtabs_matching_filename, recursively_search_psymtabs):
13716 Adjust to use function_view as callback type and to return bool.
13717 (psym_expand_symtabs_matching): Adjust to use function_view as
13719 * symfile-debug.c (debug_qf_map_symtabs_matching_filename): Adjust
13720 to use function_view as callback type and to return bool.
13721 (debug_qf_expand_symtabs_matching): Adjust to use function_view as
13723 * symfile.c (expand_symtabs_matching): Adjust to use function_view
13725 * symfile.h: Include "common/function-view.h".
13726 (expand_symtabs_file_matcher_ftype)
13727 (expand_symtabs_symbol_matcher_ftype)
13728 (expand_symtabs_exp_notify_ftype): Remove "data" parameter and
13730 (quick_symbol_functions::map_symtabs_matching_filename)
13731 (quick_symbol_functions::expand_symtabs_matching): Adjust to use
13732 function_view as callback type and return bool.
13733 (expand_symtabs_matching): Adjust to use function_view as callback
13735 (maintenance_expand_name_matcher)
13736 (maintenance_expand_file_matcher): Delete.
13737 (maintenance_expand_symtabs): Use lambdas.
13738 * symtab.c (iterate_over_some_symtabs): Adjust to use
13739 function_view as callback types and return bool.
13740 (iterate_over_symtabs): Likewise. Use unique_xmalloc_ptr instead
13742 (lookup_symtab_callback): Delete.
13743 (lookup_symtab): Use a lambda.
13744 (iterate_over_symbols): Adjust to use function_view as callback
13746 (struct search_symbols_data, search_symbols_file_matches)
13747 (search_symbols_name_matches): Delete.
13748 (search_symbols): Use a pair of lambdas.
13749 (struct add_name_data, add_macro_name, symbol_completion_matcher)
13750 (symtab_expansion_callback): Delete.
13751 (default_make_symbol_completion_list_break_on_1): Use lambdas.
13752 * symtab.h: Include "common/function-view.h".
13753 (iterate_over_some_symtabs): Adjust to use function_view as
13754 callback type and return bool.
13755 (iterate_over_symtabs): Adjust to use function_view as callback
13757 (symbol_found_callback_ftype): Remove 'data' parameter and return
13759 (iterate_over_symbols): Adjust to use function_view as callback
13762 2017-02-23 Pedro Alves <palves@redhat.com>
13764 * Makefile.in (SUBDIR_UNITTESTS_SRCS, SUBDIR_UNITTESTS_OBS): New.
13765 (%.o) <unittests/%.c>: New pattern.
13766 * configure.ac ($development): Add $(SUBDIR_UNITTESTS_OBS) to
13767 CONFIG_OBS, and $(SUBDIR_UNITTESTS_SRCS) to CONFIG_SRCS.
13768 * common/function-view.h: New file.
13769 * unittests/function-view-selftests.c: New file.
13770 * configure: Regenerate.
13772 2017-02-23 Simon Marchi <simon.marchi@ericsson.com>
13774 * bsd-uthread.c (bsd_uthread_thread_alive): Use ptid instead of
13776 * go32-nat.c (go32_thread_alive): Likewise.
13778 2017-02-23 Yao Qi <yao.qi@linaro.org>
13780 * varobj-iter.h (varobj_iter_delete): Call xfree instead of
13783 2017-02-23 Yao Qi <yao.qi@linaro.org>
13785 * varobj.c (varobj_clear_saved_item): Use delete instead of
13787 (update_dynamic_varobj_children): Likewise.
13789 2017-02-21 Jan Kratochvil <jan.kratochvil@redhat.com>
13791 * dwarf2read.c (dwarf2_record_block_ranges): Add forgotten BASEADDR.
13793 2017-02-21 Simon Marchi <simon.marchi@ericsson.com>
13795 * common/enum-flags.h (enum_flags::enum_flags): Initialize
13796 m_enum_value to 0 in default constructor.
13798 2017-02-21 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
13800 * rs6000-tdep.c (LOAD_AND_RESERVE_MASK): Rename from LWARX_MASK.
13801 (STORE_CONDITIONAL_MASK): Rename from STWCX_MASK.
13802 (LBARX_INSTRUCTION, LHARX_INSTRUCTION, LQARX_INSTRUCTION,
13803 STBCX_INSTRUCTION, STHCX_INSTRUCTION, STQCX_INSTRUCTION): New defines.
13804 (IS_LOAD_AND_RESERVE_INSN, IS_STORE_CONDITIONAL_INSN): New macros.
13805 (ppc_displaced_step_copy_insn): Use IS_LOAD_AND_RESERVE_INSN.
13806 (ppc_deal_with_atomic_sequence): Use IS_LOAD_AND_RESERVE_INSN and
13807 IS_STORE_CONDITIONAL_INSN.
13809 2017-02-21 Jan Kratochvil <jan.kratochvil@redhat.com>
13811 * dwarf2_rnglists_process: Initialize range_beginning and range_end.
13813 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
13815 * NEWS (Changes since GDB 7.12): Add DWARF-5.
13817 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
13819 * dwarf2read.c (skip_one_die, read_attribute_value)
13820 (dwarf2_const_value_attr, dump_die_shallow)
13821 (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
13822 (skip_form_bytes, attr_form_is_constant): Handle DW_FORM_data16.
13824 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
13826 * dwarf2read.c (read_file_scope): Rename DW_MACRO_GNU_*.
13827 (dwarf_parse_macro_header): Accept DWARF version 5.
13828 (dwarf_decode_macro_bytes, dwarf_decode_macros): Rename DW_MACRO_GNU_*.
13830 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
13832 * block.c (call_site_for_pc): Rename DW_OP_GNU_*, DW_TAG_GNU_* and
13834 * common/common-exceptions.h (enum errors): Likewise.
13835 * dwarf2-frame.c (class dwarf_expr_executor): Likewise.
13836 * dwarf2expr.c (dwarf_block_to_dwarf_reg)
13837 (dwarf_expr_context::execute_stack_op): Likewise.
13838 * dwarf2expr.h (struct dwarf_expr_context, struct dwarf_expr_piece):
13840 * dwarf2loc.c (dwarf_evaluate_loc_desc::get_base_type)
13841 (dwarf_evaluate_loc_desc::push_dwarf_reg_entry_value)
13842 (show_entry_values_debug, call_site_to_target_addr)
13843 (func_addr_to_tail_call_list, func_verify_no_selftailcall)
13844 (dwarf_expr_reg_to_entry_parameter, dwarf_entry_parameter_to_value)
13845 (entry_data_value_free_closure, value_of_dwarf_reg_entry)
13846 (value_of_dwarf_block_entry, indirect_pieced_value)
13847 (symbol_needs_eval_context::push_dwarf_reg_entry_value):
13848 (disassemble_dwarf_expression): Likewise.
13849 * dwarf2read.c (process_die, inherit_abstract_dies)
13850 (read_call_site_scope): Likewise.
13851 * gdbtypes.h (struct func_type, struct call_site_parameter)
13852 (struct call_site): Likewise.
13853 * stack.c (read_frame_arg): Likewise.
13854 * std-operator.def (OP_VAR_ENTRY_VALUE): Likewise.
13856 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
13858 * defs.h (read_unsigned_leb128): New declaration.
13859 * dwarf2loc.c (decode_debug_loclists_addresses): New function.
13860 (decode_debug_loc_dwo_addresses): Update DEBUG_LOC_* to DW_LLE_*.
13861 (dwarf2_find_location_expression): Call also
13862 decode_debug_loclists_addresses. Handle DWARF-5 ULEB128 length.
13863 * dwarf2loc.h (dwarf2_version): New declaration.
13864 * dwarf2read.c (struct dwarf2_per_objfile): Add loclists, line_str,
13866 (dwarf2_elf_names): Add .debug_loclists, .debug_line_str,
13868 (struct dwop_section_names): Add loclists_dwo.
13869 (dwop_section_names): Add .debug_loclists.dwo.
13870 (struct comp_unit_head): Add unit_type, signature, type_offset_in_tu.
13871 (struct dwarf2_per_cu_data): Add dwarf_version.
13872 (struct dwo_sections): Add loclists.
13873 (struct attr_abbrev): Add implicit_const.
13874 (read_indirect_line_string): New declaration.
13875 (read_unsigned_leb128): Delete declaration.
13876 (rcuh_kind): New definition.
13877 (read_and_check_comp_unit_head): Change parameter
13878 is_debug_types_section to section_kind.
13879 (dwarf2_locate_sections): Handle loclists, line_str and rnglists.
13880 (read_comp_unit_head): Change parameter abfd to section, add parameter
13881 section_kind. Handle DWARF-5.
13882 (error_check_comp_unit_head): Accept also DWARF version 5.
13883 (read_and_check_comp_unit_head): Change parameter
13884 is_debug_types_section to section_kind.
13885 (read_and_check_type_unit_head): Delete function.
13886 (read_abbrev_offset): Handle DWARF-5.
13887 (create_debug_type_hash_table): Add parameter section_kind. Process
13888 only DW_UT_type. Use signature and type_offset_in_tu from struct
13890 (create_debug_types_hash_table): Update create_debug_type_hash_table
13892 (create_all_type_units): Call create_debug_type_hash_table.
13893 (read_cutu_die_from_dwo, init_cutu_and_read_dies): Change
13894 read_and_check_type_unit_head caller to read_and_check_comp_unit_head
13896 (skip_one_die): Handle DW_FORM_implicit_const.
13897 (dwarf2_rnglists_process): New function.
13898 (dwarf2_ranges_process): Call dwarf2_rnglists_process for DWARF-5.
13899 (abbrev_table_read_table): Handle DW_FORM_implicit_const.
13900 (read_attribute_value): Handle DW_FORM_implicit_const,
13902 (read_attribute): Handle DW_FORM_implicit_const.
13903 (read_indirect_string_at_offset_from): New function from
13904 read_indirect_string_at_offset.
13905 (read_indirect_string_at_offset): Call
13906 read_indirect_string_at_offset_from.
13907 (read_indirect_line_string_at_offset): New function.
13908 (read_indirect_string): New function comment.
13909 (read_indirect_line_string): New function.
13910 (read_unsigned_leb128): Make it global.
13911 (dwarf2_string_attr): Handle DWARF-5.
13912 (add_include_dir_stub, read_formatted_entries): New functions.
13913 (dwarf_decode_line_header, dump_die_shallow, cu_debug_loc_section):
13915 (per_cu_header_read_in): Update read_comp_unit_head caller.
13916 (dwarf2_version): New function.
13917 * symfile.h (struct dwarf2_debug_sections): Add loclists, line_str and
13919 * xcoffread.c (dwarf2_xcoff_names): Update struct dwarf2_debug_sections
13922 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
13924 * dwarf2read.c (abbrev_table_read_table): Read the data only once.
13926 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
13928 * dwarf2read.c (dwarf2_ranges_process): New function from
13929 dwarf2_ranges_read.
13930 (dwarf2_ranges_read, dwarf2_record_block_ranges): Use
13931 dwarf2_ranges_process.
13933 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
13935 * dwarf2read.c (create_debug_type_hash_table): New function from
13936 create_debug_types_hash_table.
13937 (create_debug_types_hash_table): Call create_debug_type_hash_table.
13938 (create_all_type_units, open_and_init_dwo_file): Update
13939 create_debug_types_hash_table callers.
13941 2017-02-20 Sergio Durigan Junior <sergiodj@redhat.com>
13944 * fork-child.c (trace_start_error): Fix thinko. va_end should
13945 refer to 'ap', not 'args'.
13947 2017-02-20 Sergio Durigan Junior <sergiodj@redhat.com>
13948 Pedro Alves <palves@redhat.com>
13951 * darwin-nat.c (darwin_ptrace_me): Check if calls to system
13953 * fork-child.c (trace_start_error): New function.
13954 (trace_start_error_with_name): Likewise.
13955 * gnu-nat.c (gnu_ptrace_me): Check if call to PTRACE succeeded.
13956 * inf-ptrace.c (inf_ptrace_me): Likewise.
13957 * inferior.h (trace_start_error): New prototype.
13958 (trace_start_error_with_name): Likewise.
13960 2017-02-15 Sergio Durigan Junior <sergiodj@redhat.com>
13963 * psymtab.c (maintenance_print_psymbols): Verify if 'argv' is not
13964 NULL before using it.
13965 * symmisc.c (maintenance_print_symbols): Likewise.
13966 (maintenance_print_msymbols): Likewise.
13968 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
13970 * NEWS: Add record Python bindings entry.
13972 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
13974 * Makefile.in (SUBDIR_PYTHON_OBS): Add py-record-btrace.o,
13976 (SUBDIR_PYTHON_SRCS): Add py-record-btrace.c, py-record-full.c.
13977 * python/py-record-btrace.c, python/py-record-btrace.h,
13978 python/py-record-full.c, python/py-record-full.h: New file.
13979 * python/py-record.c: Add include for py-record-btrace.h and
13981 (recpy_method, recpy_format, recpy_goto, recpy_replay_position,
13982 recpy_instruction_history, recpy_function_call_history, recpy_begin,
13983 recpy_end): Use functions from py-record-btrace.c and py-record-full.c.
13984 * python/python-internal.h (PyInt_FromSsize_t, PyInt_AsSsize_t):
13986 (gdbpy_initialize_btrace): New export.
13987 * python/python.c (_initialize_python): Add gdbpy_initialize_btrace.
13989 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
13991 * Makefile.in (SUBDIR_PYTHON_OBS): Add python/py-record.o.
13992 (SUBDIR_PYTHON_SRCS): Add python/py-record.c.
13993 * python/py-record.c: New file.
13994 * python/python-internal.h (gdbpy_start_recording,
13995 gdbpy_current_recording, gdpy_stop_recording,
13996 gdbpy_initialize_record): New export.
13997 * python/python.c (_initialize_python): Add gdbpy_initialize_record.
13998 (python_GdbMethods): Add gdbpy_start_recording,
13999 gdbpy_current_recording and gdbpy_stop_recording.
14001 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
14003 * record-btrace.c (record_btrace_record_method): New function.
14004 (init_record_btrace_ops): Initialize to_record_method.
14005 * record-full.c (record_full_record_method): New function.
14006 (init_record_full_ops, init_record_full_core_ops): Add
14007 record_full_record_method.
14008 * record.h (enum record_method): New enum.
14009 * target-debug.h (target_debug_print_enum_record_method: New define.
14010 * target-delegates.c: Regenerate.
14011 * target.c (target_record_method): New function.
14012 * target.h: Include record.h.
14013 (struct target_ops) <to_record_method>: New field.
14014 (target_record_method): New export.
14016 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
14018 * record.h (record_start, record_stop): New export.
14019 * record.c (record_start, record_stop): New function.
14021 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
14023 * btrace.c (btrace_fetch): Copy function call segments pointer
14025 (btrace_clear): Clear the vector.
14026 (btrace_find_insn_by_number): Use binary search to find the correct
14027 function call segment.
14028 * btrace.h (brace_fun_p): New typedef.
14029 (struct btrace_thread_info) <functions>: New field.
14031 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
14033 * record-btrace.c (btrace_ui_out_decode_error): Move most of it ...
14034 * btrace.c (btrace_decode_error): ... here. New function.
14035 * btrace.h (btrace_decode_error): New export.
14037 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
14039 * btrace.c (ftrace_call_num_insn, btrace_insn_get_error): New function.
14040 (ftrace_new_function, btrace_insn_number, btrace_insn_cmp,
14041 btrace_find_insn_by_number): Remove special case for gaps.
14042 * btrace.h (btrace_insn_get_error): New export.
14043 (btrace_insn_number, btrace_find_insn_by_number): Adjust comment.
14044 * record-btrace.c (btrace_insn_history): Print number for gaps.
14045 (record_btrace_info, record_btrace_goto): Handle gaps.
14047 2017-02-14 Tom Tromey <tom@tromey.com>
14050 * python/python.c (gdbpy_before_prompt_hook): Emit before_prompt
14052 * python/py-evts.c (gdbpy_initialize_py_events): Add
14053 before_prompt registry.
14054 * python/py-events.h (events_object) <before_prompt>: New field.
14056 2017-02-14 Markus Metzger <markus.t.metzger@intel.com>
14058 * btrace.c (ftrace_new_switch): Preserve up link and flags.
14060 2017-02-13 Luis Machado <lgustavo@codesourcery.com>
14062 * symfile (_initialize_symfile): Add usage text to the load command's
14065 2017-02-10 Simon Marchi <simon.marchi@ericsson.com>
14067 * utils.c (defaulted_query): Don't query on secondary UIs.
14069 2017-02-10 Tom Tromey <tom@tromey.com>
14071 * rust-lang.c (rust_get_disr_info): Remove unused variable.
14073 2017-02-10 Tom Tromey <tom@tromey.com>
14075 * python/py-value.c (valpy_richcompare_throw): Remove unnecessary
14077 * python/py-type.c (typy_legacy_template_argument): Remove
14078 unnecessary "cleanup" local.
14080 2017-02-10 Tom Tromey <tom@tromey.com>
14082 * python/python.c (do_start_initialization): New function, from
14083 _initialize_python.
14084 (_initialize_python): Call do_start_initialization.
14085 * python/py-linetable.c (ltpy_iternext): Use explicit returns, not
14088 2017-02-10 Tom Tromey <tom@tromey.com>
14090 * python/py-prettyprint.c (pretty_print_one_value): Use
14093 2017-02-10 Tom Tromey <tom@tromey.com>
14095 * python/py-cmd.c (cmdpy_destroyer): Use gdbpy_ref.
14096 * python/py-breakpoint.c (gdbpy_breakpoint_deleted): Use
14098 * python/py-type.c (field_new): Use gdbpy_ref.
14099 * python/py-symtab.c (symtab_and_line_to_sal_object): Use
14101 * python/py-progspace.c (pspy_new): Use gdbpy_ref.
14102 (py_free_pspace): Likewise.
14103 (pspace_to_pspace_object): Likewise.
14104 * python/py-objfile.c (objfpy_new): Use gdbpy_ref.
14105 (py_free_objfile): Likewise.
14106 (objfile_to_objfile_object): Likewise.
14107 * python/py-inferior.c (delete_thread_object): Use
14109 (infpy_read_memory): Likewise.
14110 (py_free_inferior): Likewise.
14111 * python/py-evtregistry.c (create_eventregistry_object): Use
14113 * python/py-event.c (create_event_object): Use gdbpy_ref.
14115 2017-02-10 Tom Tromey <tom@tromey.com>
14117 * python/py-ref.h (gdbpy_ref_policy): Now a template.
14118 (gdbpy_ref): Now a template; allow subclasses of PyObject to be
14120 * python/py-arch.c, python/py-bpevent.c, python/py-breakpoint.c,
14121 python/py-cmd.c, python/py-continueevent.c, python/py-event.c,
14122 python/py-exitedevent.c, python/py-finishbreakpoint.c,
14123 python/py-framefilter.c, python/py-function.c,
14124 python/py-inferior.c, python/py-infevents.c,
14125 python/py-linetable.c, python/py-newobjfileevent.c,
14126 python/py-param.c, python/py-prettyprint.c, python/py-ref.h,
14127 python/py-signalevent.c, python/py-stopevent.c,
14128 python/py-symbol.c, python/py-threadevent.c, python/py-type.c,
14129 python/py-unwind.c, python/py-utils.c, python/py-value.c,
14130 python/py-varobj.c, python/py-xmethods.c, python/python.c,
14131 varobj.c: Change gdbpy_ref to gdbpy_ref<>.
14133 2017-02-10 Tom Tromey <tom@tromey.com>
14135 * ui-out.h (ui_out_emit_type): New class.
14136 (ui_out_emit_tuple, ui_out_emit_list): New typedefs.
14137 * python/py-framefilter.c (py_print_single_arg): Use gdb::optional
14138 and ui_out_emit_tuple.
14139 (enumerate_locals): Likewise.
14140 (py_mi_print_variables, py_print_locals, py_print_args): Use
14142 (py_print_frame): Use gdb::optional, ui_out_emit_tuple,
14144 * common/gdb_optional.h: New file.
14146 2017-02-10 Martin Galvan <martingalvan@sourceware.org>
14148 * MAINTAINERS (Write After Approval): Update my e-mail address.
14150 2017-02-10 Martin Galvan <martingalvan@sourceware.org>
14153 * breakpoint.c (_initialize_breakpoint): Update the help description
14154 of the 'commands' command to indicate that it takes a list argument.
14156 2017-02-09 Simon Marchi <simon.marchi@ericsson.com>
14158 * interps.c (current_interp_set_logging): Remove "return".
14160 2017-02-09 Gary Benson <gbenson@redhat.com>
14162 * symtab.c (add_symtab_completions): Prevent NULL pointer
14165 2017-02-08 Pedro Alves <palves@redhat.com>
14167 * interps.c (interp::interp): Remove reference to quiet_p.
14168 (interp_set): Make static. Remove dead "Switching to" output
14170 (interp_quiet_p, interp_set_quiet): Delete.
14171 (interpreter_exec_cmd): Don't set the interpreter quiet.
14172 * interps.h (interp_quiet_p): Make static.
14173 (class interp) <quiet_p>: Remove field
14175 2017-02-08 Jerome Guitton <guitton@adacore.com>
14177 * cli/cli-decode.c (find_command_name_length): Make it extern.
14178 * cli/cli-decode.h (find_command_name_length): Declare.
14179 * cli/cli-script.c (command_name_equals, line_first_arg):
14181 (process_next_line): Use cli-decode to parse command names.
14182 (build_command_line): Make args a constant pointer.
14184 2017-02-08 Jerome Guitton <guitton@adacore.com>
14186 * cli-decode.c (lookup_cmd_1, lookup_cmd_composition):
14187 Remove case-insensitive search.
14189 2017-02-07 Jose E. Marchesi <jose.marchesi@oracle.com>
14191 * sparc-tdep.c (sparc32_gdbarch_init): Do not place a + operator
14192 at the end of the line. Avoids an ARI warning.
14194 2017-02-06 Luis Machado <lgustavo@codesourcery.com>
14196 * NEWS: Mention support for record/replay of Intel 64 rdrand and
14197 rdseed instructions.
14198 i386-tdep.c (i386_process_record): Handle Intel 64 rdrand and rseed.
14200 2017-02-06 Ivo Raisr <ivo.raisr@oracle.com>
14203 Provide and use sparc32 and sparc64 target description XML files.
14204 * features/sparc/sparc32-cp0.xml, features/sparc/sparc32-cpu.xml,
14205 features/sparc/sparc32-fpu.xml: New files for sparc 32-bit.
14206 * features/sparc/sparc64-cp0.xml, features/sparc/sparc64-cpu.xml,
14207 features/sparc/sparc64-fpu.xml: New files for sparc 64-bit.
14208 * features/sparc/sparc32-solaris.xml: New file.
14209 * features/sparc/sparc64-solaris.xml: New file.
14210 * features/sparc/sparc32-solaris.c: Generated.
14211 * features/sparc/sparc64-solaris.c: Generated.
14212 * sparc-tdep.h: Account for differences in target descriptions.
14213 * sparc-tdep.c (sparc32_register_name): Use target provided registers.
14214 (sparc32_register_type): Use target provided registers.
14215 (validate_tdesc_registers): New function.
14216 (sparc32_gdbarch_init): Use tdesc_has_registers.
14217 Set pseudoregister functions.
14218 * sparc64-tdep.c (sparc64_register_name): Use target provided registers.
14219 (sparc64_register_type): Use target provided registers.
14220 (sparc64_init_abi): Set pseudoregister functions.
14222 2017-02-03 Tom Tromey <tom@tromey.com>
14225 * rust-lang.c (rust_print_type) <TYPE_CODE_UNION>: Handle enums
14226 with a single member.
14228 2017-02-03 Pedro Alves <palves@redhat.com>
14230 * cli/cli-interp.c (cli_interp_base::cli_interp_base)
14231 (cli_interp_base::~cli_interp_base): New.
14232 (cli_interp): New struct.
14233 (as_cli_interp): Cast the interp itself to cli_interp.
14234 (cli_interpreter_pre_command_loop): Rename to ...
14235 (cli_interp_base::pre_command_loop): ... this. Remove 'self'
14237 (cli_interpreter_init): Rename to ...
14238 (cli_interp::init): ... this. Remove 'self' parameter. Use
14239 boolean. Make extern.
14240 (cli_interpreter_resume): Rename to ...
14241 (cli_interp::resume): ... this. Remove 'data' parameter. Make
14243 (cli_interpreter_suspend): Rename to ...
14244 (cli_interp::suspend): ... this. Remove 'data' parameter. Make
14246 (cli_interpreter_exec): Rename to ...
14247 (cli_interp::exec): ... this. Remove 'data' parameter. Make
14249 (cli_interpreter_supports_command_editing): Rename to ...
14250 (cli_interp_base::supports_command_editing): ... this. Remove
14251 'interp' parameter. Make extern.
14252 (cli_ui_out): Rename to ...
14253 (cli_interp::interp_ui_out): ... this. Remove 'interp' parameter.
14255 (cli_set_logging): Rename to ...
14256 (cli_interp_base::set_logging): ... this. Remove 'interp'
14257 parameter. Make extern.
14258 (cli_interp_procs): Delete.
14259 (cli_interp_factory): Adjust to use "new".
14260 * cli/cli-interp.h: Include "interps.h".
14261 (struct cli_interp_base): New struct.
14262 * interps.c (struct interp): Delete. Fields moved to interps.h.
14263 (interp_new): Delete.
14264 (interp::interp, interp::~interp): New.
14265 (interp_set): Use bool, and return void. Assume the interpreter
14266 has suspend, init and resume methods, and that the all return
14268 (set_top_level_interpreter): interp_set returns void.
14269 (interp_ui_out): Adapt.
14270 (current_interp_set_logging): Adapt.
14271 (interp_data): Delete.
14272 (interp_pre_command_loop, interp_supports_command_editing): Adapt.
14273 (interp_exec): Adapt.
14274 (top_level_interpreter_data): Delete.
14275 * interps.h (interp_init_ftype, interp_resume_ftype)
14276 (interp_suspend_ftype, interp_exec_ftype)
14277 (interp_pre_command_loop_ftype, interp_ui_out_ftype): Delete.
14278 (class interp): New.
14279 (interp_new): Delete.
14280 (interp_set): Now returns void. Use bool.
14281 (interp_data, top_level_interpreter_data): Delete.
14282 * mi/mi-common.h: Include interps.h.
14283 (class mi_interp): Inherit from interp. Define a ctor. Declare
14284 init, resume, suspect, exec, interp_ui_out, set_logging and
14285 pre_command_loop methods.
14286 * mi/mi-interp.c (as_mi_interp): Cast the interp itself.
14287 (mi_interpreter_init): Rename to ...
14288 (mi_interp::init): ... this. Remove the 'interp' parameter, use
14289 bool, return void and make extern. Adjust.
14290 (mi_interpreter_resume): ... Rename to ...
14291 (mi_interp::resume): ... this. Remove the 'data' parameter,
14292 return void and make extern. Adjust.
14293 (mi_interpreter_suspend): ... Rename to ...
14294 (mi_interp::suspend): ... this. Remove the 'data' parameter,
14295 return void and make extern. Adjust.
14296 (mi_interpreter_exec): ... Rename to ...
14297 (mi_interp::exec): ... this. Remove the 'data' parameter and make
14299 (mi_interpreter_pre_command_loop): ... Rename to ...
14300 (mi_interp::pre_command_loop): ... this. Remove the 'self'
14301 parameter and make extern.
14302 (mi_on_normal_stop_1): Adjust.
14303 (mi_ui_out): Rename to ...
14304 (mi_interp::interp_ui_out): ... this. Remove the 'interp'
14305 parameter and make extern. Adjust.
14306 (mi_set_logging): Rename to ...
14307 (mi_interp::set_logging): ... this. Remove the 'interp'
14308 parameter and make extern. Adjust.
14309 (mi_interp_procs): Delete.
14310 (mi_interp_factory): Adjust to use 'new'.
14311 * mi/mi-main.c (mi_cmd_gdb_exit, captured_mi_execute_command)
14312 (mi_print_exception, mi_execute_command, mi_load_progress):
14314 * tui/tui-interp.c (tui_interp): New class.
14315 (as_tui_interp): Return a tui_interp pointer.
14316 (tui_on_normal_stop, tui_on_signal_received)
14317 (tui_on_end_stepping_range, tui_on_signal_exited, tui_on_exited)
14318 (tui_on_no_history, tui_on_user_selected_context_changed): Adjust
14319 to use interp::interp_ui_out.
14320 (tui_init): Rename to ...
14321 (tui_interp::init): ... this. Remove the 'self' parameter, use
14322 bool, return void and make extern. Adjust.
14323 (tui_resume): Rename to ...
14324 (tui_interp::resume): ... this. Remove the 'data' parameter,
14325 return void and make extern. Adjust.
14326 (tui_suspend): Rename to ...
14327 (tui_interp::suspend): ... this. Remove the 'data' parameter,
14328 return void and make extern. Adjust.
14329 (tui_ui_out): Rename to ...
14330 (tui_interp::interp_ui_out): ... this. Remove the 'self'
14331 parameter, and make extern. Adjust.
14332 (tui_exec): Rename to ...
14333 (tui_interp::exec): ... this. Remove the 'data' parameter and
14335 (tui_interp_procs): Delete.
14336 (tui_interp_factory): Use "new".
14338 2017-02-02 Tom Tromey <tom@tromey.com>
14340 * rust-exp.y (ends_raw_string, space_then_number)
14341 (rust_identifier_start_p): Return bool.
14342 * rust-lang.c (rust_tuple_type_p, rust_underscore_fields)
14343 (rust_tuple_struct_type_p, rust_tuple_variant_type_p)
14344 (rust_slice_type_p, rust_range_type_p, rust_u8_type_p)
14345 (rust_chartype_p): Return bool.
14346 (val_print_struct, rust_print_struct_def, rust_print_type):
14348 * rust-lang.h (rust_tuple_type_p, rust_tuple_struct_type_p):
14351 2017-02-02 Tom Tromey <tom@tromey.com>
14353 * rust-lang.c: Reindent.
14355 2017-02-02 Tom Tromey <tom@tromey.com>
14357 * rust-lang.h (rust_crate_for_block): Update.
14358 * rust-lang.c (rust_crate_for_block): Return std::string.
14359 (rust_get_disr_info): Use std:;string, not
14360 gdb::unique_xmalloc_ptr.
14361 * rust-exp.y (crate_name): Update.
14363 2017-02-02 Pedro Alves <palves@redhat.com>
14365 * disasm-selftests.c (print_one_insn_test): Move the "verbose"
14366 field out of gdb_disassembler_test and make it static.
14368 2017-02-02 Pedro Alves <palves@redhat.com>
14370 * mi/mi-common.h (struct mi_interp): Delete the mi2_interp,
14371 mi1_interp and mi_interp fields.
14373 2017-02-02 Pedro Alves <palves@redhat.com>
14375 * cli/cli-interp.c (struct saved_output_files, saved_output):
14376 Moved from cli/cli-logging.c.
14377 (cli_set_logging): New function.
14378 (cli_interp_procs): Install cli_set_logging.
14379 * cli/cli-interp.h (make_logging_output, cli_set_logging):
14381 * cli/cli-logging.c (struct saved_output_files, saved_output):
14382 Moved to cli/cli-interp.c.
14383 (pop_output_files): Don't save outputs here.
14384 (make_logging_output): New function.
14385 (handle_redirections): Don't build tee nor save previous outputs
14387 * interps.c (current_interp_set_logging): Change prototype.
14388 Assume there's always a set_logging_proc method installed.
14389 * interps.h (interp_set_logging_ftype): Change prototype.
14390 (current_interp_set_logging): Change prototype and adjust comment.
14391 * mi/mi-interp.c (mi_set_logging): Change protototype. Adjust to
14392 use make_logging_output.
14393 * tui/tui-interp.c (tui_interp_procs): Install cli_set_logging.
14394 2017-02-02 Pedro Alves <palves@redhat.com>
14396 * cli/cli-logging.c (maybe_warn_already_logging): New factored out
14398 (set_logging_overwrite): ... here.
14399 (logging_no_redirect_file): Delete.
14400 (set_logging_redirect): Don't handle redirection on the fly.
14401 Instead warn that "logging off" / "logging on" is necessary.
14402 (pop_output_files): Delete references to logging_no_redirect_file.
14403 (show_logging_command): Always speak in terms of what will happen
14404 once logging is reenabled.
14406 2017-02-02 Pedro Alves <palves@redhat.com>
14408 * disasm.h (gdb_pretty_print_disassembler): Tweak intro comment.
14410 2017-02-02 Pedro Alves <palves@redhat.com>
14412 * disasm.c (gdb_pretty_print_insn): Rename to ...
14413 (gdb_pretty_print_disassembler::pretty_print_insn): ... this.
14414 Remove gdbarch parameter. Adapt to clear the object's buffers
14415 instead of allocating new buffers, and to print using the object's
14416 gdb_disassembler instead of calling gdb_print_insn.
14417 (dump_insns): Use gdb_pretty_print_disassembler.
14418 * disasm.h (gdb_pretty_print_insn): Delete declaration.
14419 (gdb_pretty_print_disassembler): New class.
14420 * record-btrace.c (btrace_insn_history): Use
14421 gdb_pretty_print_disassembler.
14423 2017-02-02 Pedro Alves <palves@redhat.com>
14425 * ada-lang.c (type_as_string): Use string_file.
14426 * ada-valprint.c (ada_print_floating): Use string_file.
14427 * ada-varobj.c (ada_varobj_scalar_image)
14428 (ada_varobj_get_value_image): Use string_file.
14429 * aix-thread.c (aix_thread_extra_thread_info): Use string_file.
14430 * arm-tdep.c (_initialize_arm_tdep): Use string_printf.
14431 * breakpoint.c (update_inserted_breakpoint_locations)
14432 (insert_breakpoint_locations, reattach_breakpoints)
14433 (print_breakpoint_location, print_one_detail_ranged_breakpoint)
14434 (print_it_watchpoint): Use string_file.
14435 (save_breakpoints): Use stdio_file.
14436 * c-exp.y (oper): Use string_file.
14437 * cli/cli-logging.c (set_logging_redirect): Use ui_file_up and
14439 (pop_output_files): Use delete.
14440 (handle_redirections): Use stdio_file and tee_file.
14441 * cli/cli-setshow.c (do_show_command): Use string_file.
14442 * compile/compile-c-support.c (c_compute_program): Use
14444 * compile/compile-c-symbols.c (generate_vla_size): Take a
14445 'string_file &' instead of a 'ui_file *'.
14446 (generate_c_for_for_one_variable): Take a 'string_file &' instead
14447 of a 'ui_file *'. Use string_file.
14448 (generate_c_for_variable_locations): Take a 'string_file &'
14449 instead of a 'ui_file *'.
14450 * compile/compile-internal.h (generate_c_for_for_one_variable):
14451 Take a 'string_file &' instead of a 'ui_file *'.
14452 * compile/compile-loc2c.c (push, pushf, unary, binary)
14453 (print_label, pushf_register_address, pushf_register)
14454 (do_compile_dwarf_expr_to_c): Take a 'string_file &' instead of a
14455 'ui_file *'. Adjust.
14456 * compile/compile.c (compile_to_object): Use string_file.
14457 * compile/compile.h (compile_dwarf_expr_to_c)
14458 (compile_dwarf_bounds_to_c): Take a 'string_file &' instead of a
14460 * cp-support.c (inspect_type): Use string_file and obstack_copy0.
14461 (replace_typedefs_qualified_name): Use string_file and
14463 * disasm.c (gdb_pretty_print_insn): Use string_file.
14464 (gdb_disassembly): Adjust reference the null_stream global.
14465 (do_ui_file_delete): Delete.
14466 (gdb_insn_length): Use null_stream.
14467 * dummy-frame.c (maintenance_print_dummy_frames): Use stdio_file.
14468 * dwarf2loc.c (dwarf2_compile_property_to_c)
14469 (locexpr_generate_c_location, loclist_generate_c_location): Take a
14470 'string_file &' instead of a 'ui_file *'.
14471 * dwarf2loc.h (dwarf2_compile_property_to_c): Likewise.
14472 * dwarf2read.c (do_ui_file_peek_last): Delete.
14473 (dwarf2_compute_name): Use string_file.
14474 * event-top.c (gdb_setup_readline): Use stdio_file.
14475 * gdbarch.sh (verify_gdbarch): Use string_file.
14476 * gdbtypes.c (safe_parse_type): Use null_stream.
14477 * guile/scm-breakpoint.c (gdbscm_breakpoint_commands): Use
14479 * guile/scm-disasm.c (gdbscm_print_insn_from_port): Take a
14480 'string_file *' instead of a 'ui_file *'.
14481 (gdbscm_arch_disassemble): Use string_file.
14482 * guile/scm-frame.c (frscm_print_frame_smob): Use string_file.
14483 * guile/scm-ports.c (class ioscm_file_port): Now a class that
14484 inherits from ui_file.
14485 (ioscm_file_port_delete, ioscm_file_port_rewind)
14486 (ioscm_file_port_put): Delete.
14487 (ioscm_file_port_write): Rename to ...
14488 (ioscm_file_port::write): ... this. Remove file_port_magic
14490 (ioscm_file_port_new): Delete.
14491 (ioscm_with_output_to_port_worker): Use ioscm_file_port and
14493 * guile/scm-type.c (tyscm_type_name): Use string_file.
14494 * guile/scm-value.c (vlscm_print_value_smob, gdbscm_value_print):
14496 * infcmd.c (print_return_value_1): Use string_file.
14497 * infrun.c (print_target_wait_results): Use string_file.
14498 * language.c (add_language): Use string_file.
14499 * location.c (explicit_to_string_internal): Use string_file.
14500 * main.c (captured_main_1): Use null_file.
14501 * maint.c (maintenance_print_architecture): Use stdio_file.
14502 * mi/mi-cmd-stack.c (list_arg_or_local): Use string_file.
14503 * mi/mi-common.h (struct mi_interp) <out, err, log, targ,
14504 event_channel>: Change type to mi_console_file pointer.
14505 * mi/mi-console.c (mi_console_file_fputs, mi_console_file_flush)
14506 (mi_console_file_delete): Delete.
14507 (struct mi_console_file): Delete.
14508 (mi_console_file_magic): Delete.
14509 (mi_console_file_new): Delete.
14510 (mi_console_file::mi_console_file): New.
14511 (mi_console_file_delete): Delete.
14512 (mi_console_file_fputs): Delete.
14513 (mi_console_file::write): New.
14514 (mi_console_raw_packet): Delete.
14515 (mi_console_file::flush): New.
14516 (mi_console_file_flush): Delete.
14517 (mi_console_set_raw): Rename to ...
14518 (mi_console_file::set_raw): ... this.
14519 * mi/mi-console.h (class mi_console_file): New class.
14520 (mi_console_file_new, mi_console_set_raw): Delete.
14521 * mi/mi-interp.c (mi_interpreter_init): Use mi_console_file.
14522 (mi_set_logging): Use delete and tee_file. Adjust.
14523 * mi/mi-main.c (output_register): Use string_file.
14524 (mi_cmd_data_evaluate_expression): Use string_file.
14525 (mi_cmd_data_read_memory): Use string_file.
14526 (mi_cmd_execute, print_variable_or_computed): Use string_file.
14527 * mi/mi-out.c (mi_ui_out::main_stream): New.
14528 (mi_ui_out::rewind): Use main_stream and
14530 (mi_ui_out::put): Use main_stream and string_file.
14531 (mi_ui_out::mi_ui_out): Remove 'stream' parameter.
14532 Allocate a 'string_file' instead.
14533 (mi_out_new): Don't allocate a mem_fileopen stream here.
14534 * mi/mi-out.h (mi_ui_out::mi_ui_out): Remove 'stream' parameter.
14535 (mi_ui_out::main_stream): Declare method.
14536 * printcmd.c (eval_command): Use string_file.
14537 * psymtab.c (maintenance_print_psymbols): Use stdio_file.
14538 * python/py-arch.c (archpy_disassemble): Use string_file.
14539 * python/py-breakpoint.c (bppy_get_commands): Use string_file.
14540 * python/py-frame.c (frapy_str): Use string_file.
14541 * python/py-framefilter.c (py_print_type, py_print_single_arg):
14543 * python/py-type.c (typy_str): Use string_file.
14544 * python/py-unwind.c (unwind_infopy_str): Use string_file.
14545 * python/py-value.c (valpy_str): Use string_file.
14546 * record-btrace.c (btrace_insn_history): Use string_file.
14547 * regcache.c (regcache_print): Use stdio_file.
14548 * reggroups.c (maintenance_print_reggroups): Use stdio_file.
14549 * remote.c (escape_buffer): Use string_file.
14550 * rust-lang.c (rust_get_disr_info): Use string_file.
14551 * serial.c (serial_open_ops_1): Use stdio_file.
14552 (do_serial_close): Use delete.
14553 * stack.c (print_frame_arg): Use string_file.
14554 (print_frame_args): Remove local mem_fileopen stream, not used.
14555 (print_frame): Use string_file.
14556 * symmisc.c (maintenance_print_symbols): Use stdio_file.
14557 * symtab.h (struct symbol_computed_ops) <generate_c_location>:
14558 Take a 'string_file *' instead of a 'ui_file *'.
14559 * top.c (new_ui): Use stdio_file and stderr_file.
14560 (free_ui): Use delete.
14561 (execute_command_to_string): Use string_file.
14562 (quit_confirm): Use string_file.
14563 * tracepoint.c (collection_list::append_exp): Use string_file.
14564 * tui/tui-disasm.c (tui_disassemble): Use string_file.
14565 * tui/tui-file.c: Don't include "ui-file.h".
14566 (enum streamtype, struct tui_stream): Delete.
14567 (tui_file_new, tui_file_delete, tui_fileopen, tui_sfileopen)
14568 (tui_file_isatty, tui_file_rewind, tui_file_put): Delete.
14569 (tui_file::tui_file): New method.
14570 (tui_file_fputs): Delete.
14571 (tui_file_get_strbuf): Delete.
14572 (tui_file::puts): New method.
14573 (tui_file_adjust_strbuf): Delete.
14574 (tui_file_flush): Delete.
14575 (tui_file::flush): New method.
14576 * tui/tui-file.h: Tweak intro comment.
14578 (tui_fileopen, tui_sfileopen, tui_file_get_strbuf)
14579 (tui_file_adjust_strbuf): Delete declarations.
14580 (class tui_file): New class.
14581 * tui/tui-io.c (tui_initialize_io): Use tui_file.
14582 * tui/tui-regs.c (tui_restore_gdbout): Use delete.
14583 (tui_register_format): Use string_stream.
14584 * tui/tui-stack.c (tui_make_status_line): Use string_file.
14585 (tui_get_function_from_frame): Use string_file.
14586 * typeprint.c (type_to_string): Use string_file.
14587 * ui-file.c (struct ui_file, ui_file_magic, ui_file_new): Delete.
14588 (null_stream): New global.
14589 (ui_file_delete): Delete.
14590 (ui_file::ui_file): New.
14591 (null_file_isatty): Delete.
14592 (ui_file::~ui_file): New.
14593 (null_file_rewind): Delete.
14594 (ui_file::printf): New.
14595 (null_file_put): Delete.
14596 (null_file_flush): Delete.
14597 (ui_file::putstr): New.
14598 (null_file_write): Delete.
14599 (ui_file::putstrn): New.
14600 (null_file_read): Delete.
14601 (ui_file::putc): New.
14602 (null_file_fputs): Delete.
14603 (null_file_write_async_safe): Delete.
14604 (ui_file::vprintf): New.
14605 (null_file_delete): Delete.
14606 (null_file::write): New.
14607 (null_file_fseek): Delete.
14608 (null_file::puts): New.
14609 (ui_file_data): Delete.
14610 (null_file::write_async_safe): New.
14611 (gdb_flush, ui_file_isatty): Adjust.
14612 (ui_file_put, ui_file_rewind): Delete.
14613 (ui_file_write): Adjust.
14614 (ui_file_write_for_put): Delete.
14615 (ui_file_write_async_safe, ui_file_read): Adjust.
14616 (ui_file_fseek): Delete.
14617 (fputs_unfiltered): Adjust.
14618 (set_ui_file_flush, set_ui_file_isatty, set_ui_file_rewind)
14619 (set_ui_file_put, set_ui_file_write, set_ui_file_write_async_safe)
14620 (set_ui_file_read, set_ui_file_fputs, set_ui_file_fseek)
14621 (set_ui_file_data): Delete.
14622 (string_file::~string_file, string_file::write)
14623 (struct accumulated_ui_file, do_ui_file_xstrdup, ui_file_xstrdup)
14624 (do_ui_file_as_string, ui_file_as_string): Delete.
14625 (do_ui_file_obsavestring, ui_file_obsavestring): Delete.
14626 (struct mem_file): Delete.
14627 (mem_file_new): Delete.
14628 (stdio_file::stdio_file): New.
14629 (mem_file_delete): Delete.
14630 (stdio_file::stdio_file): New.
14631 (mem_fileopen): Delete.
14632 (stdio_file::~stdio_file): New.
14633 (mem_file_rewind): Delete.
14634 (stdio_file::set_stream): New.
14635 (mem_file_put): Delete.
14636 (stdio_file::open): New.
14637 (mem_file_write): Delete.
14638 (stdio_file_magic, struct stdio_file): Delete.
14639 (stdio_file_new, stdio_file_delete, stdio_file_flush): Delete.
14640 (stdio_file::flush): New.
14641 (stdio_file_read): Rename to ...
14642 (stdio_file::read): ... this. Adjust.
14643 (stdio_file_write): Rename to ...
14644 (stdio_file::write): ... this. Adjust.
14645 (stdio_file_write_async_safe): Rename to ...
14646 (stdio_file::write_async_safe) ... this. Adjust.
14647 (stdio_file_fputs): Rename to ...
14648 (stdio_file::puts) ... this. Adjust.
14649 (stdio_file_isatty): Delete.
14650 (stdio_file_fseek): Delete.
14651 (stdio_file::isatty): New.
14652 (stderr_file_write): Rename to ...
14653 (stderr_file::write) ... this. Adjust.
14654 (stderr_file_fputs): Rename to ...
14655 (stderr_file::puts) ... this. Adjust.
14656 (stderr_fileopen, stdio_fileopen, gdb_fopen): Delete.
14657 (stderr_file::stderr_file): New.
14658 (tee_file_magic): Delete.
14659 (struct tee_file): Delete.
14660 (tee_file::tee_file): New.
14661 (tee_file_new): Delete.
14662 (tee_file::~tee_file): New.
14663 (tee_file_delete): Delete.
14664 (tee_file_flush): Rename to ...
14665 (tee_file::flush): ... this. Adjust.
14666 (tee_file_write): Rename to ...
14667 (tee_file::write): ... this. Adjust.
14668 (tee_file::write_async_safe): New.
14669 (tee_file_fputs): Rename to ...
14670 (tee_file::puts): ... this. Adjust.
14671 (tee_file_isatty): Rename to ...
14672 (tee_file::isatty): ... this. Adjust.
14673 * ui-file.h (struct obstack, struct ui_file): Don't
14675 (ui_file_new, ui_file_flush_ftype, set_ui_file_flush)
14676 (ui_file_write_ftype)
14677 (set_ui_file_write, ui_file_fputs_ftype, set_ui_file_fputs)
14678 (ui_file_write_async_safe_ftype, set_ui_file_write_async_safe)
14679 (ui_file_read_ftype, set_ui_file_read, ui_file_isatty_ftype)
14680 (set_ui_file_isatty, ui_file_rewind_ftype, set_ui_file_rewind)
14681 (ui_file_put_method_ftype, ui_file_put_ftype, set_ui_file_put)
14682 (ui_file_delete_ftype, set_ui_file_data, ui_file_fseek_ftype)
14683 (set_ui_file_fseek): Delete.
14684 (ui_file_data, ui_file_delete, ui_file_rewind)
14685 (struct ui_file): New.
14687 (class null_file): New.
14688 (null_stream): Declare.
14689 (ui_file_write_for_put, ui_file_put): Delete.
14690 (ui_file_xstrdup, ui_file_as_string, ui_file_obsavestring):
14692 (ui_file_fseek, mem_fileopen, stdio_fileopen, stderr_fileopen)
14693 (gdb_fopen, tee_file_new): Delete.
14694 (struct string_file): New.
14695 (struct stdio_file): New.
14696 (stdio_file_up): New.
14697 (struct stderr_file): New.
14698 (class tee_file): New.
14699 * ui-out.c (ui_out::field_stream): Take a 'string_file &' instead
14700 of a 'ui_file *'. Adjust.
14701 * ui-out.h (class ui_out) <field_stream>: Likewise.
14702 * utils.c (do_ui_file_delete, make_cleanup_ui_file_delete)
14703 (null_stream): Delete.
14704 (error_stream): Take a 'string_file &' instead of a 'ui_file *'.
14706 * utils.h (struct ui_file): Delete forward declaration..
14707 (make_cleanup_ui_file_delete, null_stream): Delete declarations.
14708 (error_stream): Take a 'string_file &' instead of a
14710 * varobj.c (varobj_value_get_print_value): Use string_file.
14711 * xtensa-tdep.c (xtensa_verify_config): Use string_file.
14712 * gdbarch.c: Regenerate.
14714 2017-02-02 Pedro Alves <palves@redhat.com>
14716 * disasm.c (gdb_disassembler::pretty_print_insn): Rename to...
14717 (gdb_pretty_print_insn): ... this. Now a free function. Add back
14718 a 'gdbarch' parameter. Allocate a mem_fileopen stream here.
14719 Adjust to call gdb_print_insn instead of
14720 gdb_disassembler::print_insn.
14721 (dump_insns, do_mixed_source_and_assembly_deprecated)
14722 (do_mixed_source_and_assembly, do_assembly_only): Add back a
14723 'gdbarch' parameter. Remove gdb_disassembler parameter.
14724 (gdb_disassembly): Don't allocate a gdb_disassembler here.
14725 * disasm.h (gdb_disassembler::pretty_print_insn): Delete
14727 (gdb_pretty_print_insn): Re-add declaration.
14728 * record-btrace.c (btrace_insn_history): Don't allocate a
14729 gdb_disassembler here. Adjust to call gdb_pretty_print_insn.
14731 2017-02-01 Simon Marchi <simon.marchi@polymtl.ca>
14733 * disasm.h (gdb_disassembly): Remove file_string parameter.
14734 * disasm.c (gdb_disassembly): Likewise.
14735 * cli/cli-cmds.c (print_disassembly): Adapt.
14736 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Likewise.
14737 * stack.c (do_gdb_disassembly): Likewise.
14739 2017-02-01 Andreas Arnez <arnez@linux.vnet.ibm.com>
14741 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): For
14742 DWARF_VALUE_LITERAL, no longer ignore the offset on big-endian
14743 targets. And if the implicit value is longer than needed, extract
14744 the first bytes instead of the "least significant" ones.
14746 2017-02-01 Markus Metzger <markus.t.metzger@intel.com>
14748 * btrace.c (btrace_enable): Do not call btrace_add_pc for
14749 BTRACE_FORMAT_PT or if can_access_registers_ptid returns false.
14750 (btrace_fetch): Assert can_access_registers_ptid.
14751 * record-btrace.c (require_btrace_thread, record_btrace_info): Call
14752 validate_registers_access.
14754 2017-02-01 Markus Metzger <markus.t.metzger@intel.com>
14756 * gdbthread.h (can_access_registers_ptid): New.
14757 * thread.c (can_access_registers_ptid): New.
14759 2017-02-01 Pedro Alves <palves@redhat.com>
14761 * i386-tdep.c (i386_fast_tracepoint_valid_at): Use gdb_insn_length.
14763 2017-01-31 Pedro Alves <palves@redhat.com>
14765 * mi/mi-interp.c (mi_breakpoint_created, mi_breakpoint_modified):
14768 2017-01-31 Pedro Alves <palves@redhat.com>
14770 * stack.c (print_frame_args): Remove local mem_fileopen stream,
14773 2017-01-31 Pedro Alves <palves@redhat.com>
14775 * varobj.c (varobj_value_get_print_value): Remove xstrdup call.
14777 2017-01-31 Pedro Alves <palves@redhat.com>
14779 * common/scoped_restore.h
14780 (scoped_restore_tmpl::scoped_restore_tmpl): Template on T2, and
14781 change the value's parameter type to T2.
14782 (make_scoped_restore): Likewise.
14784 2017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
14785 Richard Henderson <rth@redhat.com>
14787 * amd64-linux-nat.c (PTRACE_ARCH_PRCTL): New define.
14788 (amd64_linux_fetch_inferior_registers): Add case to fetch FS_BASE
14789 GS_BASE for older kernels.
14790 (amd64_linux_store_inferior_registers): Add case to store FS_BASE
14791 GS_BASE for older kernels.
14792 * amd64-linux-tdep.c (amd64_linux_gregset_reg_offset): Add FS_BASE
14793 and GS_BASE to the offset table.
14794 (amd64_linux_register_reggroup_p): Add FS_BASE and GS_BASE to the
14795 system register group.
14796 * amd64-nat.c (amd64_native_gregset_reg_offset): Implements case
14798 * amd64-tdep.c (amd64_init_abi): Add segment registers for the
14800 * amd64-tdep.h (amd64_regnum): Add AMD64_FSBASE_REGNUM and
14801 AMD64_GSBASE_REGNUM.
14802 (AMD64_NUM_REGS): Set to AMD64_GSBASE_REGNUM + 1.
14803 * features/Makefile (amd64-linux.dat, amd64-avx-linux.dat)
14804 (amd64-mpx-linux.dat, amd64-avx512-linux.dat, x32-linux.dat)
14805 (x32-avx-linux.dat, x32-avx512-linux.dat): Add
14806 i386/64bit-segments.xml in those rules.
14807 * features/i386/64bit-segments.xml: New file.
14808 * features/i386/amd64-avx-mpx-linux.xml: Add 64bit-segments.xml.
14809 * features/i386/amd64-avx-linux.xml: Add 64bit-segments.xml.
14810 * features/i386/amd64-avx512-linux.xml: Add 64bit-segments.xml.
14811 * features/i386/amd64-mpx-linux.xml: Add 64bit-segments.xml.
14812 * features/i386/x32-avx512-linux.xml: Add 64bit-segments.xml.
14813 * features/i386/x32-avx-linux.xml: Add 64bit-segments.xml.
14814 * features/i386/amd64-linux.xml: Add 64bit-segments.xml.
14815 * features/i386/amd64-avx-linux.c: Regenerated.
14816 * features/i386/amd64-avx-mpx-linux.c: Regenerated.
14817 * features/i386/amd64-avx-mpx.c: Regenerated.
14818 * features/i386/amd64-avx512-linux.c: Regenerated.
14819 * features/i386/amd64-linux.c: Regenerated.
14820 * features/i386/amd64-mpx-linux.c: Regenerated.
14821 * features/i386/i386-avx-mpx-linux.c: Regenerated.
14822 * features/i386/i386-avx-mpx.c: Regenerated.
14823 * features/i386/x32-avx-linux.c: Regenerated.
14824 * features/i386/x32-avx512-linux.c: Regenerated.
14825 * regformats/i386/amd64-avx-linux.dat: Regenerated.
14826 * regformats/i386/amd64-avx-mpx-linux.dat: Regenerated.
14827 * regformats/i386/amd64-avx512-linux.dat: Regenerated.
14828 * regformats/i386/amd64-linux.dat: Regenerated.
14829 * regformats/i386/amd64-mpx-linux.dat: Regenerated.
14830 * regformats/i386/x32-avx-linux.dat: Regenerated.
14831 * regformats/i386/x32-avx512-linux.dat: Regenerated.
14832 * regformats/i386/x32-linux.dat: Regenerated.
14834 2017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
14836 * amd64-linux-tdep.h (AMD64_LINUX_ORIG_RAX_REGNUM):
14837 Set to AMD64_NUM_REGS.
14839 2017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
14841 * amd64-nat.c (amd64_native_gregset_reg_offset): Simplify logic
14842 that checks validity of a register number.
14844 2017-01-27 Kees Cook <keescook@google.com>
14846 * gdb/arm-linux-nat.c (arm_linux_fetch_inferior_registers): Call
14847 fetch_fpregs if target has fpa registers.
14848 (arm_linux_store_inferior_registers): Call store_fpregs if target
14851 2017-01-26 Andreas Arnez <arnez@linux.vnet.ibm.com>
14853 * cris-tdep.c (cris_gdbarch_init): Remove check for
14854 info.byte_order and force it to BFD_ENDIAN_LITTLE.
14856 2017-01-26 Antoine Tremblay <antoine.tremblay@ericsson.com>
14858 * corelow.c (get_core_register_section): Check for regset
14859 existence before checking for REGSET_VARIABLE_SIZE.
14861 2017-01-26 Yao Qi <yao.qi@linaro.org>
14862 Pedro Alves <palves@redhat.com>
14865 * disasm.c (gdb_disassembler::dis_asm_memory_error): Don't
14866 call memory_error, save memaddr instead.
14867 (gdb_disassembler::print_insn): If gdbarch_print_insn returns
14868 negative, cal memory_error.
14869 * disasm.h (gdb_disassembler) <m_err_memaddr>: New field.
14871 2017-01-26 Yao Qi <yao.qi@linaro.org>
14873 * disasm-selftests.c (memory_error_test): New function.
14874 (_initialize_disasm_selftests): Register memory_error_test.
14876 2017-01-26 Yao Qi <yao.qi@linaro.org>
14878 * Makefile.in (SFILES): Add disasm-selftests.c and
14880 (COMMON_OBS): Add disasm-selftests.o and selftest-arch.o.
14881 * disasm-selftests.c: New file.
14882 * selftest-arch.c: New file.
14883 * selftest-arch.h: New file.
14885 2017-01-26 Yao Qi <yao.qi@linaro.org>
14887 * mep-tdep.c (mep_gdb_print_insn): Set info->arch
14888 to bfd_arch_mep. Don't return 0 if section is not
14889 found. Call print_insn_mep.
14891 2017-01-26 Pedro Alves <palves@redhat.com>
14892 Yao Qi <yao.qi@linaro.org>
14894 * arm-tdep.c: Include "disasm.h".
14895 (gdb_print_insn_arm): Update code to get gdbarch.
14896 * disasm.c (dis_asm_read_memory): Change it to
14897 gdb_disassembler::dis_asm_read_memory.
14898 (dis_asm_memory_error): Likewise.
14899 (dis_asm_print_address): Likewise.
14900 (gdb_pretty_print_insn): Change it to
14901 gdb_disassembler::pretty_print_insn.
14902 (dump_insns): Add one argument gdb_disassemlber. All
14904 (do_mixed_source_and_assembly_deprecated): Likewise.
14905 (do_mixed_source_and_assembly): Likewise.
14906 (do_assembly_only): Likewise.
14907 (gdb_disassembler::gdb_disassembler): New.
14908 (gdb_disassembler::print_insn): New.
14909 * disasm.h (class gdb_disassembler): New.
14910 (gdb_pretty_print_insn): Remove declaration.
14911 (gdb_disassemble_info): Likewise.
14912 * guile/scm-disasm.c (class gdbscm_disassembler): New.
14913 (gdbscm_disasm_read_memory_worker): Update.
14914 (gdbscm_disasm_read_memory): Update.
14915 (gdbscm_disasm_memory_error): Remove.
14916 (gdbscm_disasm_print_address): Remove.
14917 (gdbscm_disassembler::gdbscm_disassembler): New.
14918 (gdbscm_print_insn_from_port): Update.
14919 * mips-tdep.c: Include disasm.h.
14920 (gdb_print_insn_mips): Update code to get gdbarch.
14921 * record-btrace.c (btrace_insn_history): Update.
14922 * spu-tdep.c: Include disasm.h.
14923 (struct spu_dis_asm_data): Remove.
14924 (struct spu_dis_asm_info): New.
14925 (spu_dis_asm_print_address): Use spu_dis_asm_info to get
14927 (gdb_print_insn_spu): Cast disassemble_info to
14930 2017-01-26 Yao Qi <yao.qi@linaro.org>
14932 * disasm.c (do_ui_file_delete): Delete.
14933 (gdb_insn_length): Move code creating stream to ...
14934 * utils.c (null_stream): ... here. New function.
14935 * utils.h (null_stream): Declare.
14937 2017-01-23 Simon Marchi <simon.marchi@polymtl.ca>
14939 * python/py-inferior.c (find_thread_object): Return directly
14940 from the loop. Remove "found" variable.
14942 2017-01-21 Joel Brobecker <brobecker@adacore.com>
14944 GDB 7.12.1 released.
14946 2017-01-20 Simon Marchi <simon.marchi@ericsson.com>
14948 * python/py-function.c (fnpy_call): Reorder declarations to have
14949 the gdbpy_enter object declared first.
14950 * python/py-xmethods.c (gdbpy_get_xmethod_arg_types): Likewise.
14952 2017-01-20 Simon Marchi <simon.marchi@ericsson.com>
14955 * python/python-internal.h (PyMem_RawMalloc): Define for
14957 * python/py-gdb-readline.c (gdbpy_readline_wrapper): Use
14958 PyMem_RawMalloc instead of PyMem_Malloc.
14960 2017-01-20 Mike Wrighton <mike_wrighton@codesourcery.com>
14961 Luis Machado <lgustavo@codesourcery.com>
14963 * NEWS (New commands): Mention flash-erase.
14964 (New MI commands): Mention target-flash-erase.
14965 * mi/mi-cmds.c (mi_cmd_target_flash_erase): Add target-flash-erase MI
14967 * mi/mi-cmds.h (mi_cmd_target_flash_erase): New declaration.
14968 * mi/mi-main.c (mi_cmd_target_flash_erase): New function.
14969 * target.c (flash_erase_command): New function.
14970 (initialize_targets): Add new flash-erase command.
14971 * target.h (flash_erase_command): New declaration.
14973 2017-01-20 Joel Brobecker <brobecker@adacore.com>
14975 * nat/linux-ptrace.c: Only include <sys/procfs.h> if
14976 HAVE_SYS_PROCFS_H is defined.
14978 2017-01-18 Alan Hayward <alan.hayward@arm.com>
14980 * remote.c (struct cached_reg): Change data into a pointer.
14981 * (stop_reply_dtr): Free data pointers before deleting vector.
14982 (process_stop_reply): Likewise.
14983 (remote_parse_stop_reply): Allocate space for data
14985 2017-01-18 Alan Hayward <alan.hayward@arm.com>
14987 * amd64-tdep.c (amd64_pseudo_register_read_value): remove
14989 (amd64_pseudo_register_read_value): Likewise.
14990 * remote.c (fetch_register_using_p): Remove MAX_REGISTER_SIZE.
14991 (store_register_using_P): Likewise.
14992 * regcache.c (regcache_xfer_part): Likewise.
14994 2017-01-16 Ivo Raisr <ivo.raisr@oracle.com>
14996 Split real and pseudo registers.
14997 * sparc-tdep.h (SPARC_CORE_REGISTERS): New macro.
14998 (sparc32_pseudo_regnum): New enum.
14999 * sparc64-tdep.h (sparc64_pseudo_regnum): New enum.
15000 * sparc-tdep.c (SPARC32_FPU_REGISTERS): New macro.
15001 (SPARC32_CP0_REGISTERS): New macro.
15002 (sparc32_pseudo_register_name): New function.
15003 (sparc32_register_name): Use sparc32_pseudo_register_name.
15004 (sparc32_pseudo_register_type): New function.
15005 (sparc32_register_type): Use sparc32_pseudo_register_type.
15006 (sparc32_pseudo_register_read, sparc32_pseudo_register_write): Handle
15007 pseudo register numbers.
15008 * sparc64-tdep.c SPARC64_FPU_REGISTERS): New macro.
15009 (SPARC64_CP0_REGISTERS): New macro.
15010 (sparc64_pseudo_register_name): New function.
15011 (sparc64_register_name): Use sparc64_pseudo_register_name.
15012 (sparc64_pseudo_register_type): New function.
15013 (sparc64_register_type): Use sparc64_pseudo_register_type.
15014 (sparc64_pseudo_register_read, sparc64_pseudo_register_write): Handle
15015 pseudo register numbers.
15016 (sparc64_store_floating_fields, sparc64_extract_floating_fields,
15017 sparc64_store_arguments): Handle pseudo register numbers.
15019 2017-01-13 Yao Qi <yao.qi@linaro.org>
15021 * remote.c (REMOTE_DEBUG_MAX_CHAR): New macro.
15022 (putpkt_binary): Print only REMOTE_DEBUG_MAX_CHAR chars in debug
15024 (getpkt_or_notif_sane_1): Likewise.
15026 2017-01-13 Yao Qi <yao.qi@linaro.org>
15028 * Makefile.in (checker-headers): Use CXX and CXX_DIALET instead
15029 of CC. Pass "-x c++-header" instead of "-x c".
15031 2017-01-12 Simon Marchi <simon.marchi@ericsson.com>
15033 * remote.c (remote_can_async_p): Update comment.
15035 2017-01-12 Simon Marchi <simon.marchi@ericsson.com>
15037 * linux-nat.c (linux_nat_can_async_p): Update comment.
15039 2017-01-12 Simon Marchi <simon.marchi@ericsson.com>
15041 * serial.c (serial_open): Forget about "pc" and "lpt" serial interface.
15043 2017-01-11 Simon Marchi <simon.marchi@ericsson.com>
15045 * cli/cli-decode.c (lookup_cmd_1): Fix typo in comment.
15047 2017-01-10 Tom Tromey <tom@tromey.com>
15049 * python/py-type.c (typy_legacy_template_argument): Update.
15050 * cp-support.h (struct demangle_parse_info) (demangle_parse_info,
15051 ~demangle_parse_info): Declare new members.
15052 (cp_demangled_name_to_comp): Return unique_ptr.
15053 (cp_demangled_name_parse_free)
15054 (make_cleanup_cp_demangled_name_parse_free)
15055 (cp_new_demangle_parse_info): Remove.
15056 * cp-support.c (do_demangled_name_parse_free_cleanup)
15057 (make_cleanup_cp_demangled_name_parse_free): Remove.
15058 (inspect_type, cp_canonicalize_string_full)
15059 (cp_canonicalize_string): Update.
15060 (mangled_name_to_comp): Change return type.
15061 (cp_class_name_from_physname, method_name_from_physname)
15062 (cp_func_name, cp_remove_params): Update.
15063 * cp-name-parser.y (demangle_parse_info): New constructor, from
15064 cp_new_demangle_parse_info.
15065 (~demangle_parse_info): New destructor, from
15066 cp_demangled_name_parse_free.
15067 (cp_merge_demangle_parse_infos): Update.
15068 (cp_demangled_name_to_comp): Change return type.
15070 2017-01-10 Tom Tromey <tom@tromey.com>
15072 * top.c (prevent_dont_repeat): Change return type.
15073 * python/python.c (execute_gdb_command): Use std::string.
15075 * guile/guile.c (gdbscm_execute_gdb_command): Update.
15076 * command.h (prevent_dont_repeat): Change return type.
15077 * breakpoint.c (bpstat_do_actions_1): Update.
15079 2017-01-10 Tom Tromey <tom@tromey.com>
15081 * value.h (scoped_value_mark::~scoped_value_mark): Call
15083 (scoped_value_mark::free_to_mark): New method.
15084 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Use
15087 2017-01-10 Tom Tromey <tom@tromey.com>
15089 * python/py-value.c (valpy_dereference, valpy_referenced_value)
15090 (valpy_reference_value, valpy_const_value, valpy_get_address)
15091 (valpy_get_dynamic_type, valpy_lazy_string, valpy_do_cast)
15092 (valpy_getitem, valpy_call, valpy_binop_throw, valpy_negative)
15093 (valpy_absolute, valpy_richcompare_throw): Use scoped_value_mark.
15094 * dwarf2loc.c (dwarf2_loc_desc_get_symbol_read_needs): Use
15096 * dwarf2-frame.c (execute_stack_op): Use scoped_value_mark.
15097 * value.h (scoped_value_mark): New class.
15099 2017-01-10 Tom Tromey <tom@tromey.com>
15101 * dwarf2read.c (dwarf2_build_psymtabs): Use psymtab_discarder.
15102 * psympriv.h (make_cleanup_discard_psymtabs): Don't declare.
15103 * psymtab.c (discard_psymtabs_upto): Remove.
15104 (make_cleanup_discard_psymtabs): Remove.
15105 (struct psymtab_state): Remove.
15107 2017-01-10 Tom Tromey <tom@tromey.com>
15109 * record-full.c (record_full_save_cleanups): Remove.
15110 (record_full_save): Use gdb::unlinker.
15111 * gcore.c (do_bfd_delete_cleanup): Remove.
15112 (gcore_command): Use gdb::unlinker, unique_xmalloc_ptr. Remove
15114 * dwarf2read.c (unlink_if_set): Remove.
15115 (write_psymtabs_to_index): Use gdb::unlinker.
15116 * common/gdb_unlinker.h: New file.
15118 2017-01-10 Tom Tromey <tom@tromey.com>
15120 * windows-tdep.c (windows_xfer_shared_library): Update.
15121 * windows-nat.c (windows_make_so): Update.
15122 * utils.h (make_cleanup_bfd_unref): Remove.
15123 * utils.c (do_bfd_close_cleanup, make_cleanup_bfd_unref): Remove.
15124 * symfile.h (symfile_bfd_open)
15125 (find_separate_debug_file_in_section): Return gdb_bfd_ref_ptr.
15126 * symfile.c (read_symbols, symbol_file_add)
15127 (separate_debug_file_exists): Update.
15128 (symfile_bfd_open): Return gdb_bfd_ref_ptr.
15129 (generic_load, reread_symbols): Update.
15130 * symfile-mem.c (symbol_file_add_from_memory): Update.
15131 * spu-linux-nat.c (spu_bfd_open): Return gdb_bfd_ref_ptr.
15132 (spu_symbol_file_add_from_memory): Update.
15133 * solist.h (struct target_so_ops) <bfd_open>: Return
15135 (solib_bfd_fopen, solib_bfd_open): Return gdb_bfd_ref_ptr.
15136 * solib.c (solib_bfd_fopen, solib_bfd_open): Return
15138 (solib_map_sections, reload_shared_libraries_1): Update.
15139 * solib-svr4.c (enable_break): Update.
15140 * solib-spu.c (spu_bfd_fopen): Return gdb_bfd_ref_ptr.
15141 * solib-frv.c (enable_break2): Update.
15142 * solib-dsbt.c (enable_break): Update.
15143 * solib-darwin.c (gdb_bfd_mach_o_fat_extract): Return
15145 (darwin_solib_get_all_image_info_addr_at_init): Update.
15146 (darwin_bfd_open): Return gdb_bfd_ref_ptr.
15147 * solib-aix.c (solib_aix_bfd_open): Return gdb_bfd_ref_ptr.
15148 * record-full.c (record_full_save): Update.
15149 * python/py-objfile.c (objfpy_add_separate_debug_file): Update.
15150 * procfs.c (insert_dbx_link_bpt_in_file): Update.
15151 * minidebug.c (find_separate_debug_file_in_section): Return
15153 * machoread.c (macho_add_oso_symfile): Change abfd to
15155 (macho_symfile_read_all_oso): Update.
15156 (macho_check_dsym): Return gdb_bfd_ref_ptr.
15157 (macho_symfile_read): Update.
15158 * jit.c (bfd_open_from_target_memory): Return gdb_bfd_ref_ptr.
15159 (jit_bfd_try_read_symtab): Update.
15160 * gdb_bfd.h (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
15161 (gdb_bfd_openw, gdb_bfd_openr_iovec)
15162 (gdb_bfd_openr_next_archived_file, gdb_bfd_fdopenr): Return
15164 (gdb_bfd_ref_policy): New struct.
15165 (gdb_bfd_ref_ptr): New typedef.
15166 * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
15167 (gdb_bfd_openw, gdb_bfd_openr_iovec)
15168 (gdb_bfd_openr_next_archived_file, gdb_bfd_fdopenr): Return
15170 * gcore.h (create_gcore_bfd): Return gdb_bfd_ref_ptr.
15171 * gcore.c (create_gcore_bfd): Return gdb_bfd_ref_ptr.
15172 (gcore_command): Update.
15173 * exec.c (exec_file_attach): Update.
15174 * elfread.c (elf_symfile_read): Update.
15175 * dwarf2read.c (dwarf2_get_dwz_file): Update.
15176 (try_open_dwop_file, open_dwo_file): Return gdb_bfd_ref_ptr.
15177 (open_and_init_dwo_file): Update.
15178 (open_dwp_file): Return gdb_bfd_ref_ptr.
15179 (open_and_init_dwp_file): Update.
15180 * corelow.c (core_open): Update.
15181 * compile/compile-object-load.c (compile_object_load): Update.
15182 * common/gdb_ref_ptr.h (ref_ptr::operator->): New operator.
15183 * coffread.c (coff_symfile_read): Update.
15184 * cli/cli-dump.c (bfd_openr_or_error, bfd_openw_or_error): Return
15185 gdb_bfd_ref_ptr. Rename.
15186 (dump_bfd_file, restore_command): Update.
15187 * build-id.h (build_id_to_debug_bfd): Return gdb_bfd_ref_ptr.
15188 * build-id.c (build_id_to_debug_bfd): Return gdb_bfd_ref_ptr.
15189 (find_separate_debug_file_by_buildid): Update.
15191 2017-01-10 Tom Tromey <tom@tromey.com>
15193 * common/gdb_ref_ptr.h: New file.
15194 * python/py-ref.h (struct gdbpy_ref_policy): New.
15195 (gdbpy_ref): Now a typedef.
15197 2017-01-10 Tom Tromey <tom@tromey.com>
15199 * utils.h (make_cleanup_htab_delete): Don't declare.
15200 * utils.c (do_htab_delete_cleanup, make_cleanup_htab_delete):
15202 * linespec.c (decode_compound_collector): Add constructor,
15204 (lookup_prefix_sym): Remove cleanup.
15205 (symtab_collector): Add constructor, destructor.
15206 (collect_symtabs_from_filename): Remove cleanup.
15207 * disasm.c (do_mixed_source_and_assembly): Use htab_up.
15208 * compile/compile-c-symbols.c (generate_c_for_variable_locations):
15210 * gnu-v3-abi.c (gnuv3_print_vtable): Use htab_up.
15211 * dwarf2read.c (dw2_expand_symtabs_matching)
15212 (dw2_map_symbol_filenames, dwarf_decode_macros)
15213 (write_psymtabs_to_index): Use htab_up.
15214 * dwarf2loc.c (func_verify_no_selftailcall)
15215 (call_site_find_chain_1, func_verify_no_selftailcall)
15216 (chain_candidate, call_site_find_chain_1): Use std::unordered_set,
15217 std::vector, gdb::unique_xmalloc_ptr.
15218 (call_sitep): Remove typedef.
15219 (dwarf2_locexpr_baton_eval): Remove unused variable.
15221 2017-01-10 Tom Tromey <tom@tromey.com>
15223 * python/python-internal.h (make_cleanup_py_decref)
15224 (make_cleanup_py_xdecref): Don't declare.
15225 * python/py-utils.c (py_decref, make_cleanup_py_decref)
15226 (py_xdecref, make_cleanup_py_xdecref): Remove.
15228 2017-01-10 Tom Tromey <tom@tromey.com>
15230 * python/py-framefilter.c (py_mi_print_variables): Use gdbpy_ref.
15231 (py_print_locals, enumerate_locals, py_print_args): Use gdbpy_ref.
15233 2017-01-10 Tom Tromey <tom@tromey.com>
15235 * python/py-framefilter.c (enumerate_args): Use gdbpy_ref.
15237 2017-01-10 Tom Tromey <tom@tromey.com>
15239 * python/py-utils.c (unicode_to_encoded_string)
15240 (python_string_to_target_string)
15241 (python_string_to_target_python_string)
15242 (python_string_to_host_string, gdbpy_obj_to_string)
15243 (get_addr_from_python): Use gdbpy_ref.
15245 2017-01-10 Tom Tromey <tom@tromey.com>
15247 * python/py-unwind.c (pyuw_object_attribute_to_pointer): Use
15250 2017-01-10 Tom Tromey <tom@tromey.com>
15252 * python/python.c (eval_python_command, gdbpy_decode_line)
15253 (gdbpy_run_events, gdbpy_start_type_printers)
15254 (gdbpy_apply_type_printers): Use gdbpy_ref.
15256 2017-01-10 Tom Tromey <tom@tromey.com>
15258 * python/py-param.c (get_doc_string, compute_enum_values): Use
15261 2017-01-10 Tom Tromey <tom@tromey.com>
15263 * python/py-inferior.c (find_thread_object, build_inferior_list):
15266 2017-01-10 Tom Tromey <tom@tromey.com>
15268 * python/py-framefilter.c (py_print_frame): Use gdbpy_ref.
15270 2017-01-10 Tom Tromey <tom@tromey.com>
15272 * python/py-finishbreakpoint.c (bpfinishpy_out_of_scope): Use
15275 2017-01-10 Tom Tromey <tom@tromey.com>
15277 * python/py-cmd.c (cmdpy_completer_helper): Use gdbpy_ref. Remove
15279 (cmdpy_completer_handle_brkchars, cmdpy_completer, cmdpy_init):
15282 2017-01-10 Tom Tromey <tom@tromey.com>
15284 * python/py-breakpoint.c (gdbpy_breakpoint_cond_says_stop): Use
15287 2017-01-10 Tom Tromey <tom@tromey.com>
15289 * python/py-arch.c (archpy_disassemble): Use gdbpy_ref. Don't
15290 decref results of PyArg_ParseTupleAndKeywords.
15292 2017-01-10 Tom Tromey <tom@tromey.com>
15294 * python/python.c (python_run_simple_file): Use
15295 unique_xmalloc_ptr, gdbpy_ref.
15297 2017-01-10 Tom Tromey <tom@tromey.com>
15299 * python/py-prettyprint.c (print_stack_unless_memory_error)
15300 (print_string_repr, print_children): Use gdbpy_ref.
15301 (dummy_python_frame): New class.
15302 (dummy_python_frame::dummy_python_frame): Rename from
15303 push_dummy_python_frame.
15304 (py_restore_tstate): Remove.
15306 2017-01-10 Tom Tromey <tom@tromey.com>
15308 * python/py-framefilter.c (py_print_frame): Use gdbpy_ref.
15310 2017-01-10 Tom Tromey <tom@tromey.com>
15312 * python/python.c (ensure_python_env, restore_python_env):
15314 * python/python-internal.h (ensure_python_env): Don't declare.
15315 * varobj.h (varobj_ensure_python_env): Don't declare.
15316 * varobj.c (varobj_ensure_python_env): Remove.
15318 2017-01-10 Tom Tromey <tom@tromey.com>
15320 * varobj.c (varobj_value_get_print_value): Use
15321 gdbpy_enter_varobj.
15323 2017-01-10 Tom Tromey <tom@tromey.com>
15325 * python/py-prettyprint.c (print_string_repr, print_children):
15327 * python/py-lazy-string.c (gdbpy_extract_lazy_string): Change type
15329 * varobj.c (varobj_value_get_print_value): Update.
15330 * python/python-internal.h (gdbpy_extract_lazy_string): Update.
15332 2017-01-10 Tom Tromey <tom@tromey.com>
15334 * varobj.c (varobj_get_display_hint)
15335 (dynamic_varobj_has_child_method, install_new_value_visualizer)
15336 (varobj_set_visualizer, free_variable): Use
15337 gdbpy_enter_varobj.
15339 2017-01-10 Tom Tromey <tom@tromey.com>
15341 * python/python.c (python_command): Use gdbpy_enter, gdbpy_ref.
15342 (do_finish_initialization): New function. Use gdbpy_ref.
15343 (gdbpy_finish_initialization): Use gdbpy_enter. Call
15344 do_finish_initialization.
15346 2017-01-10 Tom Tromey <tom@tromey.com>
15348 * python/py-param.c (get_set_value, get_show_value): Use
15349 gdbpy_enter, gdbpy_ref.
15351 2017-01-10 Tom Tromey <tom@tromey.com>
15353 * python/py-function.c (fnpy_call): Use gdbpy_enter, gdbpy_ref.
15355 2017-01-10 Tom Tromey <tom@tromey.com>
15357 * python/py-cmd.c (cmdpy_function): Use gdbpy_enter, gdbpy_ref.
15359 2017-01-10 Tom Tromey <tom@tromey.com>
15361 * python/py-varobj.c (py_varobj_iter_dtor, py_varobj_iter_next):
15362 Use gdbpy_enter_varobj.
15364 2017-01-10 Tom Tromey <tom@tromey.com>
15366 * varobj.c (gdbpy_enter_varobj): New constructor.
15367 * python/python-internal.h (gdbpy_enter_varobj): New class.
15368 * python/py-varobj.c (py_varobj_get_iterator): Use
15369 gdbpy_enter_varobj.
15371 2017-01-10 Tom Tromey <tom@tromey.com>
15373 * python/py-xmethods.c (gdbpy_get_xmethod_result_type): Use
15374 gdbpy_enter, gdbpy_ref, unique_xmalloc_ptr.
15375 (gdbpy_invoke_xmethod): Use gdbpy_ref, gdbpy_enter.
15376 (gdbpy_get_xmethod_arg_types): Use gdbpy_ref,
15377 unique_xmalloc_ptr.
15378 (gdbpy_get_xmethod_arg_types): Use gdbpy_ref, gdbpy_enter.
15380 2017-01-10 Tom Tromey <tom@tromey.com>
15382 * python/py-xmethods.c (invoke_match_method): Use
15385 2017-01-10 Tom Tromey <tom@tromey.com>
15387 * python/py-xmethods.c (gdbpy_get_matching_xmethod_workers): use
15388 gdbpy_enter, gdbpy_ref.
15390 2017-01-10 Tom Tromey <tom@tromey.com>
15392 * python/python.c (python_interactive_command): Use gdbpy_enter.
15394 2017-01-10 Tom Tromey <tom@tromey.com>
15396 * python/python.c (gdbpy_before_prompt_hook): Use gdbpy_enter,
15399 2017-01-10 Tom Tromey <tom@tromey.com>
15401 * python/py-prettyprint.c (gdbpy_apply_val_pretty_printer): Use
15402 gdbpy_enter, gdbpy_ref, unique_xmalloc_ptr.
15404 2017-01-10 Tom Tromey <tom@tromey.com>
15406 * utils.h (htab_deleter): New struct.
15407 (htab_up): New typedef.
15408 * python/py-framefilter.c (gdbpy_apply_frame_filter): Use
15409 gdbpy_enter, gdbpy_ref, htab_up.
15411 2017-01-10 Tom Tromey <tom@tromey.com>
15413 * python/py-unwind.c (pending_frame_invalidate): Remove.
15414 (pyuw_sniffer): Use gdbpy_enter and gdbpy_ref.
15416 2017-01-10 Tom Tromey <tom@tromey.com>
15418 * python/py-xmethods.c (gdbpy_free_xmethod_worker_data)
15419 (gdbpy_clone_xmethod_worker_data): Use gdbpy_enter.
15421 2017-01-10 Tom Tromey <tom@tromey.com>
15423 * python/py-type.c (save_objfile_types): Use gdbpy_enter.
15425 2017-01-10 Tom Tromey <tom@tromey.com>
15427 * python/python.c (gdbpy_eval_from_control_command)
15428 (gdbpy_source_script, gdbpy_run_events)
15429 (gdbpy_source_objfile_script, gdbpy_execute_objfile_script)
15430 (gdbpy_free_type_printers, gdbpy_finish_initialization): Use
15433 2017-01-10 Tom Tromey <tom@tromey.com>
15435 * python/py-progspace.c (py_free_pspace): Use gdbpy_enter.
15437 2017-01-10 Tom Tromey <tom@tromey.com>
15439 * python/py-objfile.c (py_free_objfile): Use gdbpy_enter.
15441 2017-01-10 Tom Tromey <tom@tromey.com>
15443 * python/py-inferior.c (python_on_normal_stop, python_on_resume)
15444 (python_on_inferior_call_pre, python_on_inferior_call_post)
15445 (python_on_memory_change, python_on_register_change)
15446 (python_inferior_exit, python_new_objfile, add_thread_object)
15447 (delete_thread_object, py_free_inferior): Use gdbpy_enter.
15449 2017-01-10 Tom Tromey <tom@tromey.com>
15451 * python/py-finishbreakpoint.c (bpfinishpy_handle_stop)
15452 (bpfinishpy_handle_exit): Use gdbpy_enter.
15454 2017-01-10 Tom Tromey <tom@tromey.com>
15456 * python/py-cmd.c (cmdpy_destroyer)
15457 (cmdpy_completer_handle_brkchars, cmdpy_completer): Use
15460 2017-01-10 Tom Tromey <tom@tromey.com>
15462 * python/py-breakpoint.c (gdbpy_breakpoint_cond_says_stop): Use
15464 (gdbpy_breakpoint_has_cond): Likewise.
15466 2017-01-10 Tom Tromey <tom@tromey.com>
15468 * python/python.c (gdbpy_enter): New constructor.
15469 (~gdbpy_enter): New destructor.
15470 (restore_python_env, ensure_python_env): Rewrite.
15471 * python/python-internal.h (gdbpy_enter): New class.
15473 2017-01-10 Tom Tromey <tom@tromey.com>
15475 * python/py-symbol.c (gdbpy_lookup_symbol): Use gdbpy_ref.
15477 2017-01-10 Tom Tromey <tom@tromey.com>
15479 * python/py-value.c (value_has_field, get_field_flag)
15480 (get_field_type, valpy_getitem, convert_value_from_python): Use
15483 2017-01-10 Tom Tromey <tom@tromey.com>
15485 * python/python.c (gdbpy_progspaces, gdbpy_objfiles): Use
15488 2017-01-10 Tom Tromey <tom@tromey.com>
15490 * python/py-prettyprint.c (search_pp_list)
15491 (find_pretty_printer_from_objfiles)
15492 (find_pretty_printer_from_progspace)
15493 (find_pretty_printer_from_gdb, find_pretty_printer)
15494 (gdbpy_get_display_hint, gdbpy_get_varobj_pretty_printer): Use
15497 2017-01-10 Tom Tromey <tom@tromey.com>
15499 * python/py-param.c (call_doc_function): Use gdbpy_ref.
15501 2017-01-10 Tom Tromey <tom@tromey.com>
15503 * python/py-linetable.c (build_line_table_tuple_from_pcs)
15504 (ltpy_get_all_source_lines): Use gdbpy_ref.
15506 2017-01-10 Tom Tromey <tom@tromey.com>
15508 * python/py-framefilter.c (extract_sym, extract_value)
15509 (get_py_iter_from_func, bootstrap_python_frame_filters): Use
15512 2017-01-10 Tom Tromey <tom@tromey.com>
15514 * python/py-breakpoint.c (gdbpy_breakpoints): Use gdbpy_ref.
15516 2017-01-10 Tom Tromey <tom@tromey.com>
15518 * python/py-inferior.c (gdbpy_inferiors): Use gdbpy_ref.
15520 2017-01-10 Tom Tromey <tom@tromey.com>
15522 * python/py-function.c (convert_values_to_python, fnpy_init): Use
15525 2017-01-10 Tom Tromey <tom@tromey.com>
15527 * python/py-cmd.c (gdbpy_string_to_argv): Use gdbpy_ref.
15529 2017-01-10 Tom Tromey <tom@tromey.com>
15531 * python/py-type.c (convert_field, make_fielditem, typy_fields)
15532 (typy_range): Use gdbpy_ref.
15534 2017-01-10 Tom Tromey <tom@tromey.com>
15536 * python/py-threadevent.c (create_thread_event_object): Use
15538 * python/py-stopevent.c (create_stop_event_object): Simplify.
15539 (emit_stop_event): Use gdbpy_ref.
15540 * python/py-signalevent.c (create_signal_event_object): Use
15542 * python/py-newobjfileevent.c (create_new_objfile_event_object)
15543 (emit_new_objfile_event, create_clear_objfiles_event_object)
15544 (emit_clear_objfiles_event): Use gdbpy_ref.
15545 * python/py-infevents.c (create_inferior_call_event_object)
15546 (create_register_changed_event_object)
15547 (create_memory_changed_event_object, emit_inferior_call_event)
15548 (emit_memory_changed_event, emit_register_changed_event): Use
15550 * python/py-exitedevent.c (create_exited_event_object)
15551 (emit_exited_event): Use gdbpy_ref.
15552 * python/py-event.h (evpy_emit_event): Remove
15553 CPYCHECKER_STEALS_REFERENCE_TO_ARG annotation.
15554 * python/py-event.c (evpy_emit_event): Use gdbpy_ref.
15555 * python/py-continueevent.c (emit_continue_event): Use
15557 * python/py-breakpoint.c (gdbpy_breakpoint_created)
15558 (gdbpy_breakpoint_deleted, gdbpy_breakpoint_modified): Use
15560 * python/py-bpevent.c (create_breakpoint_event_object): Use
15563 2017-01-10 Tom Tromey <tom@tromey.com>
15565 * python/py-ref.h: New file.
15567 2017-01-10 Simon Marchi <simon.marchi@ericsson.com>
15569 * cli-out.c (cli_ui_out::do_redirect): Change return type to
15571 * cli-out.h (cli_ui_out::do_redirect): Likewise.
15572 * mi/mi-out.c (mi_ui_out::do_redirect): Likewise.
15573 * mi/mi-out.h (mi_ui_out::do_redirect): Likewise.
15574 * ui-out.c (ui_out::redirect): Likewise.
15575 * ui-out.h (ui_out::redirect, ui_out::do_redirect): Likewise.
15576 * cli/cli-logging.c (set_logging_redirect): Update call site of
15578 (handle_redirections): Likewise.
15579 * scm-ports.c (ioscm_with_output_to_port_worker): Likewise.
15580 * top.c (execute_command_to_string): Likewise.
15581 * utils.c (do_ui_out_redirect_pop): Likewise.
15583 2017-01-10 Simon Marchi <simon.marchi@ericsson.com>
15585 * stack.c (_initialize_stack): Update "frame" command help message.
15587 2017-01-08 Iain Buclaw <ibuclaw@gdcproject.org>
15589 * d-exp.y (CastExpression): Emit UNOP_CAST_TYPE.
15591 2017-01-06 Yao Qi <yao.qi@linaro.org>
15593 * x86-linux-nat.h: Include gdb_proc_service.h.
15595 2017-01-06 Yao Qi <yao.qi@linaro.org>
15597 * ser-base.h: Include serial.h.
15599 2017-01-06 Yao Qi <yao.qi@linaro.org>
15601 * ppc-linux-tdep.h: Include ppc-tdep.h.
15603 2017-01-06 Yao Qi <yao.qi@linaro.org>
15605 * nat/amd64-linux-siginfo.h: Include signal.h.
15607 2017-01-06 Yao Qi <yao.qi@linaro.org>
15609 * nat/aarch64-linux-hw-point.h: Include break-common.h.
15611 2017-01-06 Yao Qi <yao.qi@linaro.org>
15613 * mi/mi-parse.h: Include mi-cmds.h.
15615 2017-01-06 Yao Qi <yao.qi@linaro.org>
15617 * inf-loop.c: Don't include "target.h".
15618 * inf-loop.h: Include it here.
15620 2017-01-06 Yao Qi <yao.qi@linaro.org>
15622 * dfp.h: Include "dboulest.h" and "expression.h".
15624 2017-01-06 Yao Qi <yao.qi@linaro.org>
15626 * ax-gdb.h: Include "ax.h".
15628 2017-01-06 Yao Qi <yao.qi@linaro.org>
15630 * Makefile.in (HFILES_NO_SRCDIR): Replace gdb_ptrace.h
15631 with nat/gdb_ptrace.h.
15633 2017-01-05 Yao Qi <yao.qi@linaro.org>
15635 * mips-fbsd-tdep.c (mips_fbsd_sigframe_init): Move && to
15637 (mips64_fbsd_sigframe_init): Likewise.
15639 2017-01-04 John Baldwin <jhb@FreeBSD.org>
15641 * mips-fbsd-tdep.c (_initialize_mips_fbsd_tdep): Use
15642 GDB_OSABI_FREEBSD instead of GDB_OSABI_FREEBSD_ELF.
15644 2017-01-04 John Baldwin <jhb@FreeBSD.org>
15646 * Makefile.in (ALLDEPFILES): Add mips-fbsd-nat.c.
15647 * NEWS: Mention new FreeBSD/mips native configuration.
15648 * config/mips/fbsd.mh: New file.
15649 * configure.host: Add mips*-*-freebsd*.
15650 * mips-fbsd-nat.c: New file.
15652 2017-01-04 John Baldwin <jhb@FreeBSD.org>
15654 * Makefile.in (ALL_TARGET_OBS): Add mips-fbsd-tdep.o.
15655 (ALLDEPFILES): Add mips-fbsd-tdep.c.
15656 * NEWS: Mention new FreeBSD/mips target.
15657 * configure.tgt: Add mips*-*-freebsd*.
15658 * mips-fbsd-tdep.c: New file.
15659 * mips-fbsd-tdep.h: New file.
15661 2017-01-04 Yao Qi <yao.qi@linaro.org>
15663 * dwarf2loc.c (write_pieced_value): Don't use VALUE_FRAME_ID (to),
15664 use c->frame_id when the piece location is DWARF_VALUE_REGISTER.
15666 2017-01-01 Joel Brobecker <brobecker@adacore.com>
15668 Update copyright year range in all GDB files.
15670 2017-01-01 Joel Brobecker <brobecker@adacore.com>
15672 * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2016.
15674 For older changes see ChangeLog-2016.
15680 version-control: never