1 2017-11-22 Yao Qi <yao.qi@linaro.org>
3 * python/py-gdb-readline.c (gdbpy_readline_wrapper): Use strcpy.
5 2017-11-22 Yao Qi <yao.qi@linaro.org>
7 * cli/cli-decode.c (help_list): Use memcpy instead of strncpy.
8 * cp-namespace.c (cp_lookup_transparent_type_loop): Likewise.
10 2017-11-21 Jerome Guitton <guitton@adacore.com>
12 * ravenscar-thread.c (ravenscar_wait): Update inferior ptid
13 with event ptid from the lower layer before doing the
14 ravenscar-specific update.
16 2017-11-21 Joel Brobecker <brobecker@adacore.com>
18 * ravenscar-thread.c (is_ravenscar_task): Also verify that
19 the ptid's TID is nonzero.
21 2017-11-21 Joel Brobecker <brobecker@adacore.com>
23 * ada-lang.h (ada_get_tcb_types_info): Add declaration.
24 * ada-tasks.c (ada_get_tcb_types_info): Renames get_tcb_types_info.
25 Make non-static. Change return type to char *. Adjust code
26 accordingly. Rewrite the function's documentation.
27 (read_atcb): Adjust call to get_tcb_types_info accordingly.
28 * ravenscar-thread.c (ravenscar_inferior_created): Check that
29 we have enough debugging information in the runtime to support
30 Ada task debugging before we enable the ravenscar-thread layer.
32 2017-11-21 Joel Brobecker <brobecker@adacore.com>
34 * ada-lang.h (ada_get_task_info_from_ptid): Add declaration.
35 * ada-tasks.c (ada_get_task_info_from_ptid): New function.
36 * ravenscar-thread.c: Add into comment.
37 (base_magic_null_ptid): Delete.
38 (base_ptid): Change documentation.
39 (ravenscar_active_task): Renames ravenscar_running_thread.
40 All callers updated throughout.
41 (is_ravenscar_task, ravenscar_get_thread_base_cpu): New function.
42 (ravenscar_task_is_currently_active): Likewise.
43 (get_base_thread_from_ravenscar_task): Ditto.
44 (ravenscar_update_inferior_ptid): Adjust to handle multiple CPUs.
45 (ravenscar_runtime_initialized): Likewise.
46 (get_running_thread_id): Add new parameter "cpu". Adjust
47 implementation to handle this new parameter.
48 (ravenscar_fetch_registers): Small adjustment to use
49 is_ravenscar_task and ravenscar_task_is_currently_active in
50 order to decide whether to use the target beneath or this
52 (ravenscar_store_registers, ravenscar_prepare_to_store): Likewise.
53 (ravenscar_stopped_by_sw_breakpoint): Use
54 get_base_thread_from_ravenscar_task to get the underlying
55 thread, rather than using base_ptid.
56 (ravenscar_stopped_by_hw_breakpoint, ravenscar_stopped_by_watchpoint)
57 (ravenscar_stopped_data_address, ravenscar_core_of_thread):
59 (ravenscar_inferior_created): Do not set base_magic_null_ptid.
61 2017-11-21 Joel Brobecker <brobecker@adacore.com>
63 * ada-lang.h (struct ada_task_info) <base_cpu>: New field.
64 * ada-lang.c (struct atcb_fieldno) <base_cpu>: New field.
65 (get_tcb_types_info): Set fieldnos.base_cpu.
66 (read_atcb): Set task_info->base_cpu.
67 (info_task): Print "Base CPU" info if set by runtime.
69 2017-11-21 Joel Brobecker <brobecker@adacore.com>
71 * ravenscar-thread.c (ravenscar_stopped_by_sw_breakpoint)
72 (ravenscar_stopped_by_hw_breakpoint, ravenscar_stopped_by_watchpoint)
73 (ravenscar_stopped_data_address, ravenscar_core_of_thread):
75 (init_ravenscar_thread_ops): Set the to_stopped_by_sw_breakpoint,
76 to_stopped_by_hw_breakpoint, to_stopped_by_watchpoint,
77 to_stopped_data_address and to_core_of_thread fields of
80 2017-11-21 Ulrich Weigand <uweigand@de.ibm.com>
82 * ppc-tdep.h (enum powerpc_long_double_abi): New data type.
83 (struct gdbarch_tdep): New member long_double_abi.
84 * rs6000-tdep.c (rs6000_gdbarch_init): Initialize long_double_abi
85 member of tdep struct based on Tag_GNU_Power_ABI_FP attribute.
86 * ppc-linux-tdep.c (ppc_linux_init_abi): Install long double data
87 format depending on long_double_abi tdep member.
88 (ppc_floatformat_for_type): Handle __ibm128 type.
90 2017-11-20 Simon Marchi <simon.marchi@polymtl.ca>
92 * darwin-nat.c (set_enable_mach_exceptions): Constify parameter.
94 2017-11-21 Pedro Alves <palves@redhat.com>
96 * dwarf2read.c (mapped_index::find_name_components_bounds)
97 <completion mode, upper bound>: Use std::lower_bound instead of
99 (test_mapped_index_find_name_component_bounds): Remove incorrect
100 "t1_fund" from expected symbols.
102 2017-11-21 Pedro Alves <palves@redhat.com>
104 * dwarf2read.c (mapped_index::name_components_casing): New field.
105 (mapped_index) <build_name_components,
106 find_name_components_bounds): Declare new methods.
107 (mapped_index::find_name_components_bounds)
108 (mapped_index::build_name_components): New methods, factored out
109 from dw2_expand_symtabs_matching_symbol.
110 (check_find_bounds_finds)
111 (test_mapped_index_find_name_component_bounds): New.
112 (run_test): Rename to ...
113 (test_dw2_expand_symtabs_matching_symbol): ... this.
114 (run_test): Reimplement.
116 2017-11-21 Pedro Alves <palves@redhat.com>
118 * cp-name-parser.y (cp_ident_is_alpha, cp_ident_is_alnum): New.
119 (symbol_end): Use cp_ident_is_alnum.
120 (yylex): Use cp_ident_is_alpha and cp_ident_is_alnum.
121 * dwarf2read.c (make_sort_after_prefix_name): New function.
122 (dw2_expand_symtabs_matching_symbol): Use it.
123 (test_symbols): Add more symbols.
124 (run_test): Add tests.
126 2017-11-17 Tom Tromey <tom@tromey.com>
128 * symtab.h (enum symbol_subclass_kind): New.
129 (struct symbol) <is_cplus_template_function, is_rust_vtable>:
131 <subclass>: New member.
132 (SYMBOL_IS_CPLUS_TEMPLATE_FUNCTION): Update.
133 * rust-lang.c (rust_get_trait_object_pointer): Update.
134 * dwarf2read.c (read_func_scope): Update.
135 (read_variable): Update.
137 2017-11-17 Tom Tromey <tom@tromey.com>
139 * dwarf2read.c (read_func_scope): Update.
140 * symtab.h (struct template_symbol): Derive from symbol.
143 2017-11-17 Tom Tromey <tom@tromey.com>
145 * symtab.h (struct symbol) <is_rust_vtable>: New member.
146 (struct rust_vtable_symbol): New.
147 (find_symbol_at_address): Declare.
148 * symtab.c (find_symbol_at_address): New function.
149 * symfile.h (struct quick_symbol_functions)
150 <find_compunit_symtab_by_address>: New member.
151 * symfile-debug.c (debug_qf_find_compunit_symtab_by_address): New
153 (debug_sym_quick_functions): Link to
154 debug_qf_find_compunit_symtab_by_address.
155 * rust-lang.c (rust_get_trait_object_pointer): New function.
156 (rust_evaluate_subexp) <case UNOP_IND>: New case. Call
157 rust_get_trait_object_pointer.
158 * psymtab.c (psym_relocate): Clear psymbol_map.
159 (psym_fill_psymbol_map, psym_find_compunit_symtab_by_address): New
161 (psym_functions): Link to psym_find_compunit_symtab_by_address.
162 * objfiles.h (struct objfile) <psymbol_map>: New member.
163 * dwarf2read.c (dwarf2_gdb_index_functions): Update.
164 (process_die) <DW_TAG_variable>: New case. Call read_variable.
165 (rust_containing_type, read_variable): New functions.
167 2017-11-17 Simon Marchi <simon.marchi@polymtl.ca>
169 * common/gdb_vecs.h (DEF_VEC_I (int)): Remove.
171 2017-11-17 Simon Marchi <simon.marchi@polymtl.ca>
173 * common/filestuff.c: Include <algorithm>.
174 (open_fds): Change type to std::vector<int>.
175 (do_mark_open_fd): Adjust.
176 (unmark_fd_no_cloexec): Adjust.
179 2017-11-17 Simon Marchi <simon.marchi@polymtl.ca>
181 * breakpoint.c (output_thread_groups): Take an std::vector.
182 (print_one_breakpoint_location): Adjust.
184 2017-11-17 Joel Brobecker <brobecker@adacore.com>
186 * ada-lang.c (resolve_subexp): Add handling of OP_VAR_MSYM_VALUE.
187 (ada_evaluate_subexp_for_cast): New function.
188 (ada_evaluate_subexp) <UNOP_CAST>: Replace code by call to
189 ada_evaluate_subexp_for_cast.
190 (ada_evaluate_subexp) <nosideret>: Replace code by call to
192 * eval.c (evaluate_var_value): Make non-static.
193 (evaluate_var_msym_value, eval_skip_value): Likewise.
194 * value.h (evaluate_var_value, evaluate_var_msym_value)
195 (eval_skip_value): Declare.
197 2017-11-16 Joel Brobecker <brobecker@adacore.com>
199 * ada-lang.c (ada_value_cast): Remove parameter "noside".
202 2017-11-16 Pedro Alves <palves@redhat.com>
204 * python/py-unwind.c (pyuw_sniffer): Translate
205 PyExc_KeyboardInterrupt to a GDB Quit exception.
207 2017-11-16 Pedro Alves <palves@redhat.com>
209 * infrun.c (resume_cleanups): Delete.
210 (resume): No longer install a resume_cleanups cleanup nor call
212 (proceed): Pass the terminal to the inferior.
213 (keep_going_pass_signal): No longer install a resume_cleanups
216 2017-11-16 Pedro Alves <palves@redhat.com>
218 * inf-loop.c (inferior_event_handler): Don't swallow the exception
219 if the prompt is blocked.
221 2017-11-16 Pedro Alves <palves@redhat.com>
223 * breakpoint.c (insert_bp_location): Replace bp_err and
224 bp_err_message locals by a gdb_exception local.
226 2017-11-16 Pedro Alves <palves@redhat.com>
228 * inflow.c (scoped_ignore_sigttou): New class.
229 (child_terminal_ours_1, new_tty): Use it.
231 2017-11-16 Ulrich Weigand <uweigand@de.ibm.com>
233 * target-float.c (decimal_from_number): Add byte_order argument and
234 call match_endianness. Error if unknown floating-point type.
235 (decimal_to_number): Add byte_order argument and call match_endianness.
236 (decimal_from_longest): Update call. Do not call match_endianness.
237 (decimal_from_ulongest): Likewise.
238 (decimal_binop): Likewise.
239 (decimal_is_zero): Likewise.
240 (decimal_compare): Likewise.
241 (decimal_convert): Likewise.
243 2017-11-16 Phil Muldoon <pmuldoon@redhat.com>
245 * python/python.c (gdbpy_rbreak): New function.
246 * NEWS: Document Python rbreak feature.
248 2017-11-16 Yao Qi <yao.qi@linaro.org>
250 * features/tic6x-c62x.xml: Remove.
251 * features/tic6x-c64x.xml: Remove.
252 * features/tic6x-c64xp.xml: Remove.
254 2017-11-15 John Baldwin <jhb@FreeBSD.org>
256 * symtab.h: Include <array>.
258 2017-11-15 John Baldwin <jhb@FreeBSD.org>
260 * bsd-kvm.c (bsd_kvm_cmd): Constify 'arg'.
261 (bsd_kvm_proc_cmd): Likewise.
263 2017-11-15 Simon Marchi <simon.marchi@ericsson.com>
265 * tui/tui-win.c (window_name_completer): Replace VEC with
268 2017-11-15 Andrew Cagney <cagney@gnu.org>
270 * MAINTAINERS: Remove no-longer applicable entries.
272 2017-11-15 Andrew Cagney <cagney@gnu.org>
274 * MAINTAINERS: Move self to Past Maintainers.
276 2017-11-15 Yao Qi <yao.qi@linaro.org>
278 * features/Makefile (XMLTOC): Remove nios2-linux.xml.
279 * features/nios2-linux.c: Remove.
280 * nios2-linux-tdep.c (_initialize_nios2_linux_tdep): Don't call
281 initialize_tdesc_nios2_linux.
283 2017-11-15 Yao Qi <yao.qi@linaro.org>
285 * m68hc11-tdep.c (M68HC11_NUM_REGS): Change it to
286 M68HC11_LAST_HARD_REG + 1.
288 2017-11-14 Paul Carroll <pcarroll@codesourcery.com>
291 * remote.c (remote_write_bytes_aux, remote_read_bytes_1,
292 remote_read_bytes, remote_write_qxfer, remote_xfer_partial):
293 Return TARGET_XFER_EOF if size of returned data is 0.
295 2017-11-14 Simon Marchi <simon.marchi@ericsson.com>
297 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
298 memory-map-selftests.c.
299 (SUBDIR_UNITTESTS_OBS): Add memory-map-selftests.o.
300 * memory-map.c (memory_map_start_memory): Fix computation of hi
302 * unittests/memory-map-selftests.c: New file.
304 2017-11-09 Joel Brobecker <brobecker@adacore.com>
306 * ada-lang.c: Fix some typos in the general command documenting
307 how Ada expressions are being evaluated and how their result
310 2017-11-09 Tom Tromey <tom@tromey.com>
312 * psymtab.c (psymbol_hash): Do not hash string contents.
313 (psymbol_compare): Add comment.
315 2017-11-09 Tom Tromey <tom@tromey.com>
317 * dictionary.c (dict_hash): Move "TKB" check into the "switch".
319 2017-11-08 Joel Brobecker <brobecker@adacore.com>
321 * ada-exp.y (write_var_from_sym): Remove parameter
322 "orig_left_context". Update all callers.
324 2017-11-08 Simon Marchi <simon.marchi@ericsson.com>
326 * tracepoint.h (class collection_list) <stringify>: Return
327 std::vector<std::string>.
328 (encode_actions_rsp): Change parameters to
329 std::vector<std::string> *.
330 * tracepoint.c (collection_list::stringify): Return
331 std::vector<std::string> and adjust accordingly.
332 (encode_actions_rsp): Changee parameters to
333 std::vector<std::string> and adjust accordingly.
334 * remote.c (free_actions_list),
335 free_actions_list_cleanup_wrapper): Remove.
336 (remote_download_tracepoint): Adjust to std::vector.
338 2017-11-08 Tom Tromey <tom@tromey.com>
340 * dwarf2read.c (symbolp): Remove typedef.
341 (read_func_scope): Use std::vector.
342 (process_structure_scope): Use std::vector.
344 2017-11-08 Pedro Alves <palves@redhat.com>
346 * ada-lang.c (ada_make_symbol_completion_list): Use
347 completion_skip_symbol.
348 * symtab.c (symbol_is_function_or_method(minimal_symbol*)): New.
349 (symbol_is_function_or_method(symbol*)): New.
350 (add_symtab_completions): Add complete_symbol_mode parameter. Use
351 completion_skip_symbol.
352 (default_collect_symbol_completion_matches_break_on): Use
353 completion_skip_symbol. Pass down mode.
354 (collect_file_symbol_completion_matches): Pass down mode.
355 * symtab.h (symbol_is_function_or_method): New declarations.
356 (completion_skip_symbol): New template function.
358 2017-11-08 Pedro Alves <palves@redhat.com>
360 * linespec.c (iterate_over_all_matching_symtabs): Add
361 search_domain parameter. Pass it down to expand_symtabs_matching.
362 (decode_objc): Request FUNCTIONS_DOMAIN symbols only.
363 (lookup_prefix_sym): Adjust by passing ALL_DOMAIN as
365 (add_all_symbol_names_from_pspace): Add search_domain parameter.
367 (find_method, find_function_symbols): Request FUNCTIONS_DOMAIN
369 (add_matching_symbols_to_info): Add search_domain parameter. Pass
372 2017-11-08 Pedro Alves <palves@redhat.com>
374 * ada-lang.c (ada_make_symbol_completion_list): Remove text and
375 text_len locals and don't pass them down.
376 * symtab.c (completion_list_add_name): Remove
377 sym_text/sym_text_len parameters and adjust.
378 (completion_list_add_symbol, completion_list_add_msymbol)
379 (completion_list_objc_symbol, completion_list_add_fields)
380 (add_symtab_completions): Likewise.
381 (default_collect_symbol_completion_matches_break_on)
382 (collect_file_symbol_completion_matches): Remove sym_text_len
383 local and don't pass it down.
384 * symtab.h (completion_list_add_name): Remove
385 sym_text/sym_text_len parameters.
387 2017-11-08 Pedro Alves <palves@redhat.com>
389 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
390 unittests/lookup_name_info-selftests.c.
391 (SUBDIR_UNITTESTS_OBS): Add lookup_name_info-selftests.o.
392 * cp-support.c: Include "selftest.h".
393 (cp_remove_params_1): Rename from cp_remove_params. Add
394 'require_param' parameter, and handle it.
395 (cp_remove_params): Reimplement.
396 (cp_remove_params_if_any): New.
397 (selftests::quote): New.
398 (selftests::check_remove_params): New.
399 (selftests::test_cp_remove_params): New.
400 (_initialize_cp_support): Install
401 selftests::test_cp_remove_params.
402 * cp-support.h (cp_remove_params_if_any): Declare.
403 * dwarf2read.c :Include "selftest.h".
404 (dw2_expand_symtabs_matching_symbol): Use
405 lookup_name_info::make_ignore_params.
406 (selftests::dw2_expand_symtabs_matching::mock_mapped_index)
407 (selftests::dw2_expand_symtabs_matching::string_or_null)
408 (selftests::dw2_expand_symtabs_matching::check_match)
409 (selftests::dw2_expand_symtabs_matching::test_symbols)
410 (selftests::dw2_expand_symtabs_matching::run_test): New.
411 (_initialize_dwarf2_read): Register
412 selftests::dw2_expand_symtabs_matching::run_test.
413 * psymtab.c (psym_expand_symtabs_matching): Use
414 lookup_name_info::make_ignore_params.
415 * symtab.c (demangle_for_lookup_info::demangle_for_lookup_info):
416 If the lookup name wants to ignore parameters, strip them.
417 (compare_symbol_name): Remove sym_text/sym_text_len parameters and
419 (completion_list_add_name): Don't pass down sym_text/sym_text_len.
420 (default_collect_symbol_completion_matches_break_on): Don't try to
422 * symtab.h (lookup_name_info::lookup_name_info): Add
423 'ignore_parameters' parameter.
424 (lookup_name_info::ignore_parameters)
425 (lookup_name_info::make_ignore_params): New methods.
426 (lookup_name_info::m_ignore_parameters): New field.
427 * unittests/lookup_name_info-selftests.c: New file.
429 2017-11-08 Pedro Alves <palves@redhat.com>
431 * dwarf2read.c (dw2_expand_marked_cus)
432 (dw2_expand_symtabs_matching_symbol): Remove forward declarations.
433 (dw2_expand_symtabs_matching): Move further below.
434 (dw2_expand_marked_cus): Reindent.
436 2017-11-08 Pedro Alves <palves@redhat.com>
438 * dwarf2read.c (byte_swap, MAYBE_SWAP): Move higher up in file.
439 (struct name_component): New.
440 (mapped_index::name_components): New field.
441 (mapped_index::symbol_name_at): New method.
442 (dwarf2_read_index): Call mapped_index ctor.
443 (dw2_map_matching_symbols): Add comment about name_components
445 (dw2_expand_symtabs_matching): Factor part to...
446 (dw2_expand_symtabs_matching_symbol): ... this new function.
447 Build name components table, and lookup symbols in it before
448 calling the name matcher.
449 (dw2_expand_marked_cus): New, factored out from
450 dw2_expand_symtabs_matching.
451 (dwarf2_per_objfile_free): Call the mapped_index's dtor.
453 2017-11-08 Pedro Alves <palves@redhat.com>
455 * ada-lang.c (ada_encode): Rename to ..
456 (ada_encode_1): ... this. Add throw_errors parameter and handle
458 (ada_encode): Reimplement.
459 (match_name): Delete, folded into full_name.
460 (resolve_subexp): No longer pass the encoded name to
461 ada_lookup_symbol_list.
462 (should_use_wild_match): Delete.
463 (name_match_type_from_name): New.
464 (ada_lookup_simple_minsym): Use lookup_name_info and the
465 language's symbol_name_matcher_ftype.
466 (add_symbols_from_enclosing_procs, ada_add_local_symbols)
467 (ada_add_block_renamings): Adjust to use lookup_name_info.
468 (ada_lookup_name): New.
469 (add_nonlocal_symbols, ada_add_all_symbols)
470 (ada_lookup_symbol_list_worker, ada_lookup_symbol_list)
471 (ada_iterate_over_symbols): Adjust to use lookup_name_info.
472 (ada_name_for_lookup): Delete.
473 (ada_lookup_encoded_symbol): Construct a verbatim name.
474 (wild_match): Reverse sense of return type. Use bool.
475 (full_match): Reverse sense of return type. Inline bits of old
477 (ada_add_block_symbols): Adjust to use lookup_name_info.
478 (symbol_completion_match): Delete, folded into...
479 (ada_lookup_name_info::matches): ... .this new method.
480 (symbol_completion_add): Delete.
481 (ada_collect_symbol_completion_matches): Add name_match_type
482 parameter. Adjust to use lookup_name_info and
483 completion_list_add_name.
484 (get_var_value, ada_add_global_exceptions): Adjust to use
486 (ada_get_symbol_name_cmp): Delete.
487 (do_wild_match, do_full_match): New functions.
488 (ada_lookup_name_info::ada_lookup_name_info): New method.
489 (ada_symbol_name_matches, ada_get_symbol_name_matcher): New
491 (ada_language_defn): Install ada_get_symbol_name_matcher.
492 * ada-lex.l (processId): If name starts with '<', copy it
494 * block.c (block_iter_match_step, block_iter_match_first)
495 (block_iter_match_next, block_lookup_symbol)
496 (block_lookup_symbol_primary, block_find_symbol): Adjust to use
498 * block.h (block_iter_match_first, block_iter_match_next)
499 (ALL_BLOCK_SYMBOLS_WITH_NAME): Adjust to use lookup_name_info.
500 * c-lang.c (c_language_defn, cplus_language_defn)
501 (asm_language_defn, minimal_language_defn): Adjust comments to
502 refer to la_get_symbol_name_matcher.
503 * completer.c (complete_files_symbols)
504 (collect_explicit_location_matches, symbol_completer): Pass a
505 symbol_name_match_type down.
506 * completer.h (class completion_match, completion_match_result):
508 (completion_tracker::reset_completion_match_result): New method.
509 (completion_tracker::m_completion_match_result): New field.
510 * cp-support.c (make_symbol_overload_list_block): Adjust to use
512 (cp_fq_symbol_name_matches, cp_get_symbol_name_matcher): New
514 * cp-support.h (cp_get_symbol_name_matcher): New declaration.
515 * d-lang.c: Adjust comments to refer to
516 la_get_symbol_name_matcher.
517 * dictionary.c (dict_vector) <iter_match_first, iter_match_next>:
518 Adjust to use lookup_name_info.
519 (dict_iter_match_first, dict_iter_match_next)
520 (iter_match_first_hashed, iter_match_next_hashed)
521 (iter_match_first_linear, iter_match_next_linear): Adjust to work
522 with a lookup_name_info.
523 * dictionary.h (dict_iter_match_first, dict_iter_match_next):
525 * dwarf2read.c (dw2_lookup_symbol): Adjust to use lookup_name_info.
526 (dw2_map_matching_symbols): Adjust to use symbol_name_match_type.
527 (gdb_index_symbol_name_matcher): New class.
528 (dw2_expand_symtabs_matching) Adjust to use lookup_name_info and
529 gdb_index_symbol_name_matcher. Accept a NULL symbol_matcher.
530 * f-lang.c (f_collect_symbol_completion_matches): Adjust to work
531 with a symbol_name_match_type.
532 (f_language_defn): Adjust comments to refer to
533 la_get_symbol_name_matcher.
534 * go-lang.c (go_language_defn): Adjust comments to refer to
535 la_get_symbol_name_matcher.
536 * language.c (default_symbol_name_matcher)
537 (language_get_symbol_name_matcher): New functions.
538 (unknown_language_defn, auto_language_defn): Adjust comments to
539 refer to la_get_symbol_name_matcher.
540 * language.h (symbol_name_cmp_ftype): Delete.
541 (language_defn) <la_collect_symbol_completion_matches>: Add match
543 <la_get_symbol_name_cmp>: Delete field.
544 <la_get_symbol_name_matcher>: New field.
545 <la_iterate_over_symbols>: Adjust to use lookup_name_info.
546 (default_symbol_name_matcher, language_get_symbol_name_matcher):
548 * linespec.c (iterate_over_all_matching_symtabs)
549 (iterate_over_file_blocks): Adjust to use lookup_name_info.
550 (find_methods): Add language parameter, and use lookup_name_info
551 and the language's symbol_name_matcher_ftype.
552 (linespec_complete_function): Adjust.
553 (lookup_prefix_sym): Use lookup_name_info.
554 (add_all_symbol_names_from_pspace): Adjust.
555 (find_superclass_methods): Add language parameter and pass it
557 (find_method): Pass symbol language down.
558 (find_linespec_symbols): Don't demangle or Ada encode here.
559 (search_minsyms_for_name): Add lookup_name_info parameter.
560 (add_matching_symbols_to_info): Add name_match_type parameter.
561 Use lookup_name_info.
562 * m2-lang.c (m2_language_defn): Adjust comments to refer to
563 la_get_symbol_name_matcher.
564 * minsyms.c: Include <algorithm>.
565 (add_minsym_to_demangled_hash_table): Remove table parameter and
566 add objfile parameter. Use search_name_hash, and add language to
567 demangled languages vector.
568 (struct found_minimal_symbols): New struct.
569 (lookup_minimal_symbol_mangled, lookup_minimal_symbol_demangled):
571 (lookup_minimal_symbol): Adjust to use them. Don't canonicalize
572 input names here. Use lookup_name_info instead. Lookup up
573 demangled names once for each language in the demangled names
575 (iterate_over_minimal_symbols): Use lookup_name_info. Lookup up
576 demangled names once for each language in the demangled names
578 (build_minimal_symbol_hash_tables): Adjust.
579 * minsyms.h (iterate_over_minimal_symbols): Adjust to pass down a
581 * objc-lang.c (objc_language_defn): Adjust comment to refer to
582 la_get_symbol_name_matcher.
583 * objfiles.h: Include <vector>.
584 (objfile_per_bfd_storage) <demangled_hash_languages>: New field.
585 * opencl-lang.c (opencl_language_defn): Adjust comment to refer to
586 la_get_symbol_name_matcher.
587 * p-lang.c (pascal_language_defn): Adjust comment to refer to
588 la_get_symbol_name_matcher.
589 * psymtab.c (psym_lookup_symbol): Use lookup_name_info.
590 (match_partial_symbol): Use symbol_name_match_type,
591 lookup_name_info and psymbol_name_matches.
592 (lookup_partial_symbol): Use lookup_name_info.
593 (map_block): Use symbol_name_match_type and lookup_name_info.
594 (psym_map_matching_symbols): Use symbol_name_match_type.
595 (psymbol_name_matches): New.
596 (recursively_search_psymtabs): Use lookup_name_info and
597 psymbol_name_matches. Rename 'kind' parameter to 'domain'.
598 (psym_expand_symtabs_matching): Use lookup_name_info. Rename
599 'kind' parameter to 'domain'.
600 * rust-lang.c (rust_language_defn): Adjust comment to refer to
601 la_get_symbol_name_matcher.
602 * symfile-debug.c (debug_qf_map_matching_symbols)
603 (debug_qf_map_matching_symbols): Use symbol_name_match_type.
604 (debug_qf_expand_symtabs_matching): Use lookup_name_info.
605 * symfile.c (expand_symtabs_matching): Use lookup_name_info.
606 * symfile.h (quick_symbol_functions) <map_matching_symbols>:
607 Adjust to use symbol_name_match_type.
608 <expand_symtabs_matching>: Adjust to use lookup_name_info.
609 (expand_symtabs_matching): Adjust to use lookup_name_info.
610 * symmisc.c (maintenance_expand_symtabs): Use
611 lookup_name_info::match_any ().
612 * symtab.c (symbol_matches_search_name): New.
613 (eq_symbol_entry): Adjust to use lookup_name_info and the
615 (demangle_for_lookup_info::demangle_for_lookup_info): New.
616 (lookup_name_info::match_any): New.
617 (iterate_over_symbols, search_symbols): Use lookup_name_info.
618 (compare_symbol_name): Add language, lookup_name_info and
619 completion_match_result parameters, and use them.
620 (completion_list_add_name): Make extern. Add language and
621 lookup_name_info parameters. Use them.
622 (completion_list_add_symbol, completion_list_add_msymbol)
623 (completion_list_objc_symbol): Add lookup_name_info parameters and
624 adjust. Pass down language.
625 (completion_list_add_fields): Add lookup_name_info parameters and
626 adjust. Pass down language.
627 (add_symtab_completions): Add lookup_name_info parameters and
629 (default_collect_symbol_completion_matches_break_on): Add
630 name_match_type parameter, and use it. Use lookup_name_info.
631 (default_collect_symbol_completion_matches)
632 (collect_symbol_completion_matches): Add name_match_type
633 parameter, and pass it down.
634 (collect_symbol_completion_matches_type): Adjust.
635 (collect_file_symbol_completion_matches): Add name_match_type
636 parameter, and use lookup_name_info.
637 * symtab.h: Include <string> and "common/gdb_optional.h".
638 (enum class symbol_name_match_type): New.
639 (class ada_lookup_name_info): New.
640 (struct demangle_for_lookup_info): New.
641 (class lookup_name_info): New.
642 (symbol_name_matcher_ftype): New.
643 (SYMBOL_MATCHES_SEARCH_NAME): Use symbol_matches_search_name.
644 (symbol_matches_search_name): Declare.
645 (MSYMBOL_MATCHES_SEARCH_NAME): Delete.
646 (default_collect_symbol_completion_matches)
647 (collect_symbol_completion_matches)
648 (collect_file_symbol_completion_matches): Add name_match_type
650 (iterate_over_symbols): Use lookup_name_info.
651 (completion_list_add_name): Declare.
652 * utils.c (enum class strncmp_iw_mode): Moved to utils.h.
653 (strncmp_iw_with_mode): Now extern.
654 * utils.h (enum class strncmp_iw_mode): Moved from utils.c.
655 (strncmp_iw_with_mode): Declare.
657 2017-11-08 Keith Seitz <keiths@redhat.com>
658 Pedro Alves <palves@redhat.com>
660 * ada-lang.c (ada_language_defn): Install
661 default_search_name_hash.
662 * buildsym.c (struct buildsym_compunit): <language>: New field.
663 (finish_block_internal): Pass language when creating dictionaries.
664 (start_buildsym_compunit, start_symtab): New language parameters.
666 (restart_symtab): Pass down compilation unit's language.
667 * buildsym.h (enum language): Forward declare.
668 (start_symtab): New 'language' parameter.
669 * c-lang.c (c_language_defn, cplus_language_defn)
670 (asm_language_defn, minimal_language_defn): Install
671 default_search_name_hash.
672 * coffread.c (coff_start_symtab): Adjust.
673 * d-lang.c (d_language_defn): Install default_search_name_hash.
674 * dbxread.c (struct symloc): Add 'pst_language' field.
675 (PST_LANGUAGE): Define.
676 (start_psymtab, read_ofile_symtab): Use it.
677 (process_one_symbol): New 'language' parameter. Pass it down.
678 * dictionary.c (struct dictionary) <language>: New field.
679 (DICT_LANGUAGE): Define.
680 (dict_create_hashed, dict_create_hashed_expandable)
681 (dict_create_linear, dict_create_linear_expandable): New parameter
682 'language'. Set the dictionary's language.
683 (iter_match_first_hashed): Adjust to rename.
684 (insert_symbol_hashed): Assert we don't see mismatching
685 languages. Adjust to rename.
686 (dict_hash): Rename to ...
687 (default_search_name_hash): ... this and make extern.
688 * dictionary.h (struct language_defn): Forward declare.
689 (dict_create_hashed): New parameter 'language'.
690 * dwarf2read.c (dwarf2_start_symtab): Pass down language.
691 * f-lang.c (f_language_defn): Install default_search_name_hash.
692 * go-lang.c (go_language_defn): Install default_search_name_hash.
693 * jit.c (finalize_symtab): Pass compunit's language to dictionary
695 * language.c (unknown_language_defn, auto_language_defn):
696 * language.h (language_defn::la_search_name_hash): New field.
697 (default_search_name_hash): Declare.
698 * m2-lang.c (m2_language_defn): Install default_search_name_hash.
699 * mdebugread.c (new_block): New parameter 'language'.
700 * mdebugread.c (parse_symbol): Pass symbol language to block
702 (psymtab_to_symtab_1): Pass down language.
703 (new_symtab): Pass compunit's language to block allocation.
704 * objc-lang.c (objc_language_defn): Install
705 default_search_name_hash.
706 * opencl-lang.c (opencl_language_defn):
707 * p-lang.c (pascal_language_defn): Install
708 default_search_name_hash.
709 * rust-lang.c (rust_language_defn): Install
710 default_search_name_hash.
711 * stabsread.h (enum language): Forward declare.
712 (process_one_symbol): Add 'language' parameter.
713 * symtab.c (search_name_hash): New function.
714 * symtab.h (search_name_hash): Declare.
715 * xcoffread.c (read_xcoff_symtab): Pass language to start_symtab.
717 2017-11-08 Pedro Alves <palves@redhat.com>
719 * cp-name-parser.y (main): Don't initialize extra_chars.
721 2017-11-07 Tom Tromey <tom@tromey.com>
723 * event-top.h (command_handler): Constify.
724 * record-full.c (cmd_record_full_start): Update.
725 * thread.c (thread_apply_all_command): Update.
726 * printcmd.c (eval_command): Update.
727 * mi/mi-main.c (mi_execute_cli_command): Update.
728 (mi_execute_async_cli_command): Update.
729 * tui/tui-stack.c (tui_update_command): Update.
730 * cli/cli-interp.c (safe_execute_command): Constify.
731 * record.c (record_start): Update.
732 (record_start, record_stop, cmd_record_start): Update.
733 * record-btrace.c (cmd_record_btrace_bts_start): Update.
734 (cmd_record_btrace_pt_start): Update.
735 (cmd_record_btrace_start): Update.
736 (cmd_record_btrace_start): Update.
737 * reverse.c (exec_reverse_once): Update.
738 * python/python.c (execute_gdb_command): Don't copy the command.
739 * event-top.c (command_line_handler): Update.
740 (command_handler): Constify.
741 * defs.h (deprecated_call_command_hook): Constify.
742 * cli/cli-script.h (execute_user_command): Constify.
743 * cli/cli-script.c (execute_user_command): Constify.
744 (execute_cmd_pre_hook, execute_cmd_post_hook): Constify.
745 (enum command_control_type): Update.
746 * main.c (catch_command_errors): Remove non-const overload.
747 (catch_command_errors_ftype): Remove.
748 * python/py-cmd.c (cmdpy_function): Constify.
749 * guile/scm-cmd.c (cmdscm_function): Constify.
750 * cli/cli-dump.c (call_dump_func): Constify.
751 * cli/cli-decode.c (do_const_cfunc): Constify.
752 (do_sfunc): Constify.
753 (cmd_func): Constify.
754 * gdbcmd.h (execute_command, execute_command_to_string): Constify.
755 * top.h (execute_command): Constify.
756 * top.c (execute_command): Constify.
757 (execute_command_to_string): Constify.
758 (deprecated_call_command_hook): Constify.
759 * command.h (cmd_func): Constify.
760 * cli/cli-decode.h (struct cmd_list_element) <func>: Constify.
762 2017-11-07 Tom Tromey <tom@tromey.com>
764 * ada-lang.c (catch_ada_exception_command): Constify.
765 (catch_assert_command): Constify.
766 * break-catch-throw.c (catch_catch_command, catch_throw_command)
767 (catch_rethrow_command): Constify.
768 (catch_exception_command_1): Constify.
769 * breakpoint.h (add_catch_command): Constify.
770 * break-catch-syscall.c (catch_syscall_command_1): Constify.
771 (catch_syscall_split_args): Constify.
772 * break-catch-sig.c (catch_signal_command): Constify.
773 (catch_signal_split_args): Constify.
774 * cli/cli-decode.h (struct cmd_list_element) <function>: Use
775 cmd_const_sfunc_ftype.
776 * cli/cli-decode.c (add_setshow_cmd_full): Constify.
777 (add_setshow_enum_cmd, add_setshow_auto_boolean_cmd)
778 (add_setshow_boolean_cmd, add_setshow_filename_cmd)
779 (add_setshow_string_cmd, struct cmd_list_element)
780 (add_setshow_optional_filename_cmd, add_setshow_integer_cmd)
781 (add_setshow_uinteger_cmd, add_setshow_zinteger_cmd)
782 (add_setshow_zuinteger_unlimited_cmd, add_setshow_zuinteger_cmd):
784 (set_cmd_sfunc): Constify.
785 (empty_sfunc): Constify.
786 * command.h (add_setshow_enum_cmd, add_setshow_auto_boolean_cmd)
787 (add_setshow_boolean_cmd, add_setshow_filename_cmd)
788 (add_setshow_string_cmd, add_setshow_string_noescape_cmd)
789 (add_setshow_optional_filename_cmd, add_setshow_integer_cmd)
790 (add_setshow_uinteger_cmd, add_setshow_zinteger_cmd)
791 (add_setshow_zuinteger_cmd, add_setshow_zuinteger_unlimited_cmd):
793 (set_cmd_sfunc): Constify.
794 (cmd_sfunc_ftype): Remove.
795 * compile/compile.c (set_compile_args): Constify.
796 * infrun.c (set_disable_randomization): Constify.
797 * infcmd.c (set_args_command, set_cwd_command): Constify.
798 * breakpoint.c (set_condition_evaluation_mode): Constify.
799 (add_catch_command): Constify.
800 (catch_fork_command_1, catch_exec_command_1)
801 (catch_load_command_1, catch_unload_command_1): Constify.
802 (catch_load_or_unload): Constify.
803 * guile/scm-param.c (pascm_set_func): Constify.
804 (add_setshow_generic): Constify.
805 * python/py-param.c (get_set_value): Constify.
806 * top.h (set_verbose): Constify.
807 * tui/tui-win.c (tui_set_var_cmd): Constify.
808 * mi/mi-main.c (set_mi_async_command): Constify.
809 * cli/cli-logging.c (set_logging_overwrite)
810 (set_logging_redirect): Constify.
811 * value.c (set_max_value_size): Constify.
812 * valprint.c (set_input_radix, set_output_radix): Constify.
813 * utils.c (set_width_command, set_height_command): Constify.
814 * typeprint.c (set_print_type_methods, set_print_type_typedefs): Constify.
815 * tracepoint.c (set_disconnected_tracing)
816 (set_circular_trace_buffer, set_trace_buffer_size)
817 (set_trace_user, set_trace_notes, set_trace_stop_notes): Constify.
818 * top.c (set_history_size_command, set_verbose, set_editing)
819 (set_gdb_datadir, set_history_filename): Constify.
820 * target.c (set_targetdebug, maint_set_target_async_command)
821 (maint_set_target_non_stop_command, set_target_permissions)
822 (set_write_memory_permission): Constify.
823 (open_target): Constify.
824 * target-descriptions.c (set_tdesc_filename_cmd): Constify.
825 * target-dcache.c (set_stack_cache, set_code_cache): Constify.
826 * symtab.c (set_symbol_cache_size_handler): Constify.
827 * symfile.c (set_ext_lang_command): Constify.
828 * symfile-debug.c (set_debug_symfile): Constify.
829 * source.c (set_directories_command): Constify.
830 * solib.c (reload_shared_libraries, gdb_sysroot_changed): Constify.
831 * serial.c (set_parity): Constify.
832 * rs6000-tdep.c (powerpc_set_soft_float, powerpc_set_vector_abi): Constify.
833 * remote.c (set_remote_exec_file, set_remotebreak)
834 (set_remote_protocol_Z_packet_cmd, set_range_stepping): Constify.
835 * record.c (set_record_insn_history_size)
836 (set_record_call_history_size): Constify.
837 * record-full.c (set_record_full_insn_max_num): Constify.
838 * proc-api.c (set_procfs_trace_cmd, set_procfs_file_cmd): Constify.
839 * osabi.c (set_osabi): Constify.
840 * mips-tdep.c (set_mips64_transfers_32bit_regs)
841 (reinit_frame_cache_sfunc, mips_abi_update): Constify.
842 * maint.c (maintenance_set_profile_cmd): Constify.
843 * linux-thread-db.c (set_libthread_db_search_path): Constify.
844 * language.c (set_language_command, set_range_command)
845 (set_case_command): Constify.
846 * infrun.c (set_non_stop, set_observer_mode)
847 (set_stop_on_solib_events, set_schedlock_func)
848 (set_exec_direction_func): Constify.
849 * infcmd.c (set_inferior_tty_command): Constify.
850 * disasm.c (set_disassembler_options_sfunc): Constify.
851 * demangle.c (set_demangling_command): Constify.
852 * dcache.c (set_dcache_size, set_dcache_line_size): Constify.
853 * cris-tdep.c (set_cris_version, set_cris_mode)
854 (set_cris_dwarf2_cfi): Constify.
855 * corefile.c (set_gnutarget_command): Constify.
856 * charset.c (set_host_charset_sfunc, set_target_charset_sfunc)
857 (set_target_wide_charset_sfunc): Constify.
858 * breakpoint.c (update_dprintf_commands): Constify.
859 * auto-load.c (set_auto_load_dir, set_auto_load_safe_path): Constify.
860 * arm-tdep.c (set_fp_model_sfunc, arm_set_abi)
861 (set_disassembly_style_sfunc): Constify.
862 * arch-utils.c (set_endian, set_architecture): Constify.
863 * alpha-tdep.c (reinit_frame_cache_sfunc): Constify.
864 * agent.c (set_can_use_agent): Constify.
866 2017-11-07 Tom Tromey <tom@tromey.com>
868 * go32-nat.c (go32_sysinfo, go32_sldt, go32_sgdt, go32_sidt)
869 (go32_pde, go32_pte, go32_pte_for_address): Constify.
870 * gnu-nat.c (_parse_bool_arg, show_thread_default_pause_cmd)
871 (set_thread_default_pause_cmd, set_thread_default_run_cmd)
872 (show_thread_default_run_cmd, set_thread_default_detach_sc_cmd)
873 (parse_int_arg, show_thread_default_detach_sc_cmd)
874 (set_signals_cmd, show_signals_cmd, set_sig_thread_cmd)
875 (show_sig_thread_cmd, set_stopped_cmd, show_stopped_cmd)
876 (set_exceptions_cmd, show_exceptions_cmd, set_task_pause_cmd)
877 (show_task_pause_cmd, set_task_detach_sc_cmd)
878 (show_task_detach_sc_cmd, set_task_exc_port_cmd)
879 (set_noninvasive_cmd, set_thread_pause_cmd)
880 (show_thread_pause_cmd, set_thread_run_cmd, show_thread_run_cmd)
881 (set_thread_detach_sc_cmd, show_thread_detach_sc_cmd)
882 (set_thread_exc_port_cmd, thread_takeover_sc_cmd): Constify.
883 * windows-nat.c (display_selectors): Constify.
884 * cli/cli-decode.h (struct cmd_list_element) <function>: Remove
886 * cli/cli-decode.c (set_cmd_cfunc): Remove non-const overload.
887 (cmd_cfunc_eq): Likewise.
888 (struct cmd_list_element): Likewise.
890 (cli_user_command_p): Update.
891 * command.h (add_cmd): Remove non-const overload.
892 (cmd_cfunc_ftype): Remove typedef.
893 (cmd_cfunc_eq): Remove non-const overload.
894 * value.c (show_values): Constify.
895 * thread.c (thread_apply_all_command): Constify.
896 * symfile.c (load_command): Constify.
897 * source.c (directory_command): Constify.
898 * maint.c (maintenance_internal_error)
899 (maintenance_demangler_warning, maintenance_space_display)
900 (maintenance_print_architecture, maintenance_translate_address)
901 (maintenance_info_selftests, maintenance_internal_warning):
903 * breakpoint.c (disable_trace_command, enable_trace_command):
905 * auto-load.c (info_auto_load_local_gdbinit, add_auto_load_dir):
907 (add_auto_load_safe_path): Constify.
908 * guile/scm-auto-load.c (info_auto_load_guile_scripts): Constify.
909 * top.h (show_commands): Constify.
910 * linux-thread-db.c (info_auto_load_libthread_db): Constify.
911 * sparc64-tdep.c (adi_examine_command): Constify.
912 (adi_assign_command): Constify.
914 2017-11-07 Tom Tromey <tom@tromey.com>
916 * frame.h (info_locals_command, info_args_command): Constify.
917 * auto-load.h (auto_load_info_scripts): Constify.
918 * inferior.h (registers_info): Constify.
919 * copying.c: Rebuild.
920 * copying.awk: Constify generated commands.
921 * auto-load.c (auto_load_info_scripts)
922 (info_auto_load_gdb_scripts): Constify.
923 * cli/cli-decode.c (struct cmd_list_element): Take a
924 cmd_const_cfunc_ftype.
925 * command.h (add_info): Take a cmd_const_cfunc_ftype.
926 * tui/tui-win.c (tui_all_windows_info): Constify.
927 * python/py-auto-load.c (info_auto_load_python_scripts):
929 * cli/cli-cmds.c (show_command): Remove non-const overload.
930 * tracepoint.c (info_tvariables_command, info_scope_command):
932 (info_static_tracepoint_markers_command): Constify.
933 * thread.c (info_threads_command): Constify.
934 (print_thread_info_1): Constify.
935 * target.c (info_target_command): Constify.
936 * symtab.c (info_sources_command, info_functions_command)
937 (info_types_command): Constify.
938 (info_variables_command): Remove non-const overload.
939 * symfile.c (info_ext_lang_command): Constify.
940 * stack.c (info_frame_command, info_locals_command)
941 (info_args_command): Constify.
942 (backtrace_command): Remove non-const overload.
943 * source.c (info_source_command, info_line_command): Constify.
944 * solib.c (info_sharedlibrary_command): Constify.
945 * skip.c (info_skip_command): Constify.
946 * ser-go32.c (info_serial_command): Constify.
947 * reverse.c (info_bookmarks_command): Constify.
948 * printcmd.c (info_symbol_command, info_address_command)
949 (info_display_command): Constify.
950 * osdata.c (info_osdata_command): Constify.
951 * objc-lang.c (info_selectors_command, info_classes_command):
953 * nto-procfs.c (procfs_pidlist, procfs_meminfo): Constify.
954 * memattr.c (info_mem_command): Constify.
955 * macrocmd.c (info_macro_command, info_macros_command): Constify.
956 * linux-fork.c (info_checkpoints_command): Constify.
957 * infrun.c (info_signals_command): Constify.
958 * inflow.c (info_terminal_command): Constify.
959 * inferior.c (info_inferiors_command): Constify.
960 (print_inferior): Constify.
961 * infcmd.c (info_program_command, info_all_registers_command)
962 (info_registers_command, info_vector_command)
963 (info_float_command): Constify.
964 (registers_info): Constify.
965 * gnu-nat.c (info_send_rights_cmd, info_recv_rights_cmd)
966 (info_port_sets_cmd, info_dead_names_cmd, info_port_rights_cmd):
968 * f-valprint.c (info_common_command): Constify.
969 * dcache.c (info_dcache_command): Constify.
970 (dcache_info_1): Constify.
971 * darwin-nat-info.c (info_mach_tasks_command)
972 (info_mach_task_command, info_mach_ports_command)
973 (info_mach_port_command, info_mach_threads_command)
974 (info_mach_thread_command, info_mach_regions_command)
975 (info_mach_regions_recurse_command, info_mach_region_command)
976 (info_mach_exceptions_command): Constify.
977 (get_task_from_args): Constify.
978 * cp-support.c (info_vtbl_command): Constify.
979 * breakpoint.c (info_watchpoints_command)
980 (info_tracepoints_command): Constify.
981 (info_breakpoints_command): Remove non-const overload.
982 * avr-tdep.c (avr_io_reg_read_command): Constify.
983 * auxv.c (info_auxv_command): Constify.
984 * ada-tasks.c (info_tasks_command): Constify.
985 (info_task): Constify.
986 * ada-lang.c (info_exceptions_command): Constify.
988 2017-11-07 Tom Tromey <tom@tromey.com>
990 * solib.h (no_shared_libraries): Constify.
991 * frame.h (return_command): Constify.
992 * cli/cli-cmds.h (quit_command): Constify.
993 * top.h (quit_command, execute_command): Constify.
994 * target.h (flash_erase_command): Constify.
995 * inferior.h (set_inferior_args, attach_command): Constify.
996 * tracepoint.h (start_tracing, stop_tracing): Constify.
997 * breakpoint.h (break_command, tbreak_command)
998 (hbreak_command_wrapper, thbreak_command_wrapper)
999 (rbreak_command_wrapper, watch_command_wrapper)
1000 (awatch_command_wrapper, rwatch_command_wrapper)
1001 (get_tracepoint_by_number): Constify.
1002 * symtab.c (info_variables_command, rbreak_command)
1003 (symtab_symbol_info): Constify.
1004 (info_variables_command): Add non-const overload.
1005 * top.c (dont_repeat_command): Constify.
1006 * breakpoint.c (ignore_command, commands_command)
1007 (condition_command, tbreak_command, hbreak_command)
1008 (thbreak_command, clear_command, break_command)
1009 (info_breakpoints_command, watch_command, rwatch_command)
1010 (awatch_command, trace_command, ftrace_command, strace_command)
1011 (trace_pass_command, break_range_command, dprintf_command)
1012 (agent_printf_command, get_tracepoint_by_number)
1013 (watch_maybe_just_location, trace_pass_command): Constify.
1014 (info_breakpoints_command): Add non-const overload.
1015 * tracefile.c (tsave_command): Constify.
1016 * infcmd.c (attach_command, disconnect_command, signal_command)
1017 (queue_signal_command, stepi_command, nexti_command)
1018 (finish_command, next_command, step_command, until_command)
1019 (advance_command, jump_command, continue_command, run_command)
1020 (start_command, starti_command, interrupt_command)
1021 (run_command_1, set_inferior_args, step_1): Constify.
1022 * inferior.c (add_inferior_command, remove_inferior_command)
1023 (clone_inferior_command): Constify.
1024 * linux-fork.c (checkpoint_command, restart_command): Constify.
1025 * windows-nat.c (signal_event_command): Constify.
1026 * guile/guile.c (guile_repl_command, guile_command): Constify.
1027 * printcmd.c (x_command, display_command, printf_command)
1028 (output_command, set_command, call_command, print_command)
1029 (eval_command): Constify.
1030 (non_const_set_command): Remove.
1031 (_initialize_printcmd): Update.
1032 * source.c (forward_search_command, reverse_search_command):
1034 * jit.c (jit_reader_load_command, jit_reader_unload_command):
1036 * infrun.c (handle_command): Constify.
1037 * memattr.c (mem_command): Constify.
1038 * stack.c (return_command, up_command, up_silently_command)
1039 (down_command, down_silently_command, frame_command)
1040 (backtrace_command, func_command, backtrace_command_1): Constify.
1041 (backtrace_command): Add non-const overload.
1042 * remote-sim.c (simulator_command): Constify.
1043 * exec.c (set_section_command): Constify.
1044 * tracepoint.c (tdump_command, trace_variable_command)
1045 (tstatus_command, tstop_command, tstart_command)
1046 (end_actions_pseudocommand, while_stepping_pseudocommand)
1047 (collect_pseudocommand, teval_pseudocommand, actions_command)
1048 (start_tracing, stop_tracing): Constify.
1049 * value.c (init_if_undefined_command): Constify.
1050 * tui/tui-stack.c (tui_update_command): Constify.
1051 * tui/tui-win.c (tui_refresh_all_command)
1052 (tui_set_tab_width_command, tui_set_win_height_command)
1053 (tui_set_focus_command, tui_scroll_forward_command)
1054 (tui_scroll_backward_command, tui_scroll_left_command)
1055 (tui_scroll_right_command, parse_scrolling_args, tui_set_focus)
1056 (tui_set_win_height): Constify.
1057 * tui/tui-layout.c (tui_layout_command): Constify.
1058 * procfs.c (proc_trace_syscalls, proc_trace_sysentry_cmd)
1059 (proc_trace_sysexit_cmd, proc_untrace_sysentry_cmd)
1060 (proc_untrace_sysexit_cmd): Constify.
1061 * remote.c (threadlist_test_cmd, threadinfo_test_cmd)
1062 (threadset_test_cmd, threadlist_update_test_cmd)
1063 (threadalive_test): Constify.
1064 * objc-lang.c (print_object_command): Constify.
1065 * command.h (add_com): Constify.
1066 * cli/cli-dump.c (restore_command): Constify.
1067 * cli/cli-cmds.c (pwd_command, echo_command, quit_command)
1068 (help_command, complete_command, shell_command, edit_command)
1069 (list_command, disassemble_command, make_command)
1070 (apropos_command, alias_command): Constify.
1071 * cli/cli-script.c (document_command, define_command)
1072 (while_command, if_command, validate_comname): Constify.
1073 * cli/cli-decode.c (struct cmd_list_element): Change type of
1075 * target.c (do_monitor_command, flash_erase_command): Constify.
1076 * regcache.c (reg_flush_command): Constify.
1077 * reverse.c (reverse_step, reverse_next, reverse_stepi)
1078 (reverse_nexti, reverse_continue, reverse_finish)
1079 (save_bookmark_command, goto_bookmark_command)
1080 (exec_reverse_once): Constify.
1081 * python/python.c (python_interactive_command, python_command):
1083 * typeprint.c (ptype_command, whatis_command, whatis_exp):
1085 * solib.c (sharedlibrary_command, no_shared_libraries): Constify.
1086 * gcore.c (gcore_command): Constify.
1088 2017-11-07 Tom Tromey <tom@tromey.com>
1090 * printcmd.c (x_command): Call set_repeat_arguments.
1091 * cli/cli-cmds.c (list_command): Call set_repeat_arguments.
1092 * top.c (repeat_arguments): New global.
1093 (set_repeat_arguments): New function.
1094 (execute_command): Handle repeat_arguments.
1095 (show_commands): Calls set_repeat_arguments.
1096 * command.h (set_repeat_arguments): Declare.
1098 2017-11-07 Tom Tromey <tom@tromey.com>
1100 * stack.c (backtrace_command): Use std::string.
1101 (backtrace_command_1): Make "count_exp" const.
1103 2017-11-07 Tom Tromey <tom@tromey.com>
1105 * source.c (directory_switch, mod_path, add_path): Constify.
1106 * defs.h (add_path, mod_path, directory_switch): Constify.
1107 * mi/mi-cmd-env.c (env_mod_path): Constify.
1109 2017-11-07 Tom Tromey <tom@tromey.com>
1111 * infcmd.c (strip_bg_char): Return gdb::unique_xmalloc_ptr.
1112 (run_command_1, continue_command, step_1, jump_command)
1113 (signal_command, until_command, advance_command, finish_command)
1114 (attach_command): Update.
1116 2017-11-07 Tom Tromey <tom@tromey.com>
1118 * command.h (set_cmd_cfunc): Don't declare.
1119 * cli/cli-decode.c (set_cmd_cfunc): Now static.
1121 2017-11-07 Tom Tromey <tom@tromey.com>
1123 * stack.c (select_frame_command): Constify.
1124 * cli/cli-decode.c (add_com_suppress_notification): Constify.
1125 * command.h (add_com_suppress_notification): Constify.
1127 2017-11-07 Tom Tromey <tom@tromey.com>
1129 * breakpoint.c (stop_command): Constify.
1130 * cli/cli-decode.c (struct cmd_list_element): Constify.
1131 * command.h (add_abbrev_prefix_cmd): Constify.
1133 2017-11-07 Pedro Alves <palves@redhat.com>
1135 * breakpoint.c (extract_bp_kind): New enum.
1136 (extract_bp_num, extract_bp_or_bp_range): New functions, partially
1137 factored out from ...
1138 (extract_bp_number_and_location): ... here.
1139 * cli/cli-utils.c (get_number_trailer): Handle '-$variable'.
1141 2017-11-07 Pedro Alves <palves@redhat.com>
1143 * breakpoint.c (extract_bp_number_and_location): Change return
1144 type to void. Throw error instead of warning.
1145 (enable_disable_command): Adjust.
1147 2017-11-07 Xavier Roirand <roirand@adacore.com>
1148 Pedro Alves <palves@redhat.com>
1150 * breakpoint.c (map_breakpoint_number_range): New, factored out
1152 (map_breakpoint_numbers): ... here.
1153 (find_location_by_number): Change parameters from string to
1154 breakpoint number and location.
1155 (extract_bp_number_and_location): New function.
1156 (enable_disable_bp_num_loc)
1157 (enable_disable_breakpoint_location_range)
1158 (enable_disable_command): New functions, factored out ...
1159 (enable_command, disable_command): ... these functions, and
1160 adjusted to support ranges.
1161 * NEWS: Document enable/disable breakpoint location range feature.
1163 2017-11-06 Luis Machado <luis.machado@linaro.org>
1165 * MAINTAINERS (Write After Approval): Update my e-mail address.
1167 2017-11-06 Pedro Alves <palves@redhat.com>
1169 * gnu-nat.c (gnu_terminal_init): Delete.
1170 (gnu_target): Don't install gnu_terminal_init.
1171 * inflow.c (child_terminal_init_with_pgrp): Delete, merged with ...
1172 (child_terminal_init): ... this function.
1174 2017-11-06 Pedro Alves <palves@redhat.com>
1176 * common/common.m4 (GDB_AC_COMMON): No longer check termio.h nor
1178 * config.in, configure: Regenerate.
1180 2017-11-06 Pedro Alves <palves@redhat.com>
1182 * event-top.c: Check SIGTSTP instead of STOP_SIGNAL thoughout.
1183 (async_init_signals): Adjust.
1184 (handle_stop_sig): Rename to ...
1185 (handle_sigtstp): ... this.
1186 (async_stop_sig): Rename to ...
1187 (async_sigtstp_handler): ... this, and delete STOP_SIGNAL !=
1189 * event-top.h: Move signal.h include to the top. Check SIGTSTP
1190 instead of STOP_SIGNAL thoughout.
1191 (handle_stop_sig): Rename to ...
1192 (handle_sigtstp): ... this.
1193 * top.c (command_line_input): Replace STOP_SIGNAL -> SIGTSTP.
1195 2017-11-06 Pedro Alves <palves@redhat.com>
1197 * inflow.c (child_terminal_inferior, child_terminal_ours_1): No
1198 longer set flags twice in row.
1200 2017-11-06 Pedro Alves <palves@redhat.com>
1202 * Makefile.in (SER_HARDWIRE): Update comment.
1203 (HFILES_NO_SRCDIR): Remove gdb_termios.h.
1204 * common/gdb_termios.h: Delete file.
1205 * common/job-control.c: Include termios.h and unistd.h instead of
1207 (gdb_setpgid): Remove HAVE_TERMIOS || TIOCGPGRP preprocessor
1209 (have_job_control): Check HAVE_TERMIOS_H instead of HAVE_TERMIOS.
1211 * configure.ac: No longer check for termio.h and sgtty.h.
1212 * configure: Regenerate.
1213 * inflow.c: Include termios.h instead of gdb_termios.h. Replace
1214 PROCESS_GROUP_TYPE checks with HAVE_TERMIOS_H checks throughout.
1215 Replace PROCESS_GROUP_TYPE references with pid_t references
1217 (gdb_getpgrp): Delete.
1218 (set_initial_gdb_ttystate): Use tcgetpgrp instead of gdb_getpgrp.
1219 (child_terminal_inferior): Remove comment. Remove sgtty code.
1220 (child_terminal_ours_1): Use tcgetpgrp directly instead of
1221 gdb_getpgrp. Use serial_set_tty_state instead aof
1222 serial_noflush_set_tty_state. Remove sgtty code.
1223 * inflow.h: Include unistd.h instead of gdb_termios.h. Replace
1224 PROCESS_GROUP_TYPE check with HAVE_TERMIOS_H check.
1225 (inferior_process_group): Now returns pid_t.
1226 * ser-base.c (ser_base_noflush_set_tty_state): Delete.
1227 * ser-base.h (ser_base_noflush_set_tty_state): Delete.
1228 * ser-event.c (serial_event_ops): Update.
1229 * ser-go32.c (dos_noflush_set_tty_state): Delete.
1231 * ser-mingw.c (hardwire_ops, tty_ops, pipe_ops, tcp_ops): Update.
1232 * ser-pipe.c (pipe_ops): Update.
1233 * ser-tcp.c (tcp_ops): Update.
1234 * ser-unix.c: Include termios.h instead of gdb_termios.h. Remove
1235 HAVE_TERMIOS checks.
1236 [HAVE_TERMIO] (struct hardwire_ttystate): Delete.
1237 [HAVE_SGTTY] (struct hardwire_ttystate): Delete.
1238 (get_tty_state, set_tty_state): Drop termio and sgtty code, and
1240 (hardwire_noflush_set_tty_state): Delete.
1241 (hardwire_print_tty_state, hardwire_drain_output)
1242 (hardwire_flush_output, hardwire_flush_input)
1243 (hardwire_send_break, hardwire_raw, hardwire_setbaudrate)
1244 (hardwire_setstopbits, hardwire_setparity): Drop termio and sgtty
1245 code, and assume termios.
1246 (hardwire_ops): Update.
1247 (_initialize_ser_hardwire): Remove HAVE_TERMIOS check.
1248 * serial.c (serial_noflush_set_tty_state): Delete.
1249 * serial.h (serial_noflush_set_tty_state): Delete.
1250 (serial_ops::noflush_set_tty_state): Delete.
1252 2017-11-06 Ulrich Weigand <uweigand@de.ibm.com>
1254 * Makefile.in (SFILES): Remove doublest.c and dfp.c.
1255 (HFILES_NO_SRCDIR): Remove doublest.h and dfp.h.
1256 (COMMON_OBS): Remove doublest.o and dfp.o.
1257 Do not build target-float.c (instead of doublest.c)
1258 with -Wformat-nonliteral.
1260 * doublest.c: Remove file.
1261 * doublest.h: Remove file.
1262 * dfp.c: Remove file.
1263 * dfp.h: Remove file.
1265 * target-float.c: Do not include "doublest.h" and "dfp.h".
1266 (DOUBLEST): Move here from doublest.h.
1267 (enum float_kind): Likewise.
1268 (FLOATFORMAT_CHAR_BIT): Likewise.
1269 (FLOATFORMAT_LARGEST_BYTES): Likewise.
1270 (floatformat_totalsize_bytes): Move here from doublest.c. Make static.
1271 (floatformat_precision): Likewise.
1272 (floatformat_normalize_byteorder, get_field, put_field): Likewise.
1273 (floatformat_is_negative, floatformat_classify, floatformat_mantissa):
1275 (host_float_format, host_double_format, host_long_double_format):
1277 (floatformat_to_string, floatformat_from_string): Likewise.
1278 (floatformat_to_doublest): Likewise. Also, inline the original
1279 convert_floatformat_to_doublest.
1280 (floatformat_from_doublest): Likewise. Also, inline the original
1281 convert_floatformat_from_doublest.
1283 Include "dpd/decimal128.h", "dpd/decimal64.h", and "dpd/decimal32.h".
1284 (MAX_DECIMAL_STRING): Move here from dfp.c.
1285 (match_endianness): Likewise.
1286 (set_decnumber_context, decimal_check_errors): Likewise.
1287 (decimal_from_number, decimal_to_number): Likewise.
1288 (decimal_to_string, decimal_from_string): Likewise. Make static.
1289 (decimal_from_longest, decimal_from_ulongest): Likewise.
1290 (decimal_to_longest): Likewise.
1291 (decimal_binop, decimal_is_zero, decimal_compare): Likewise.
1292 (decimal_convert): Likewise.
1294 2017-11-06 Ulrich Weigand <uweigand@de.ibm.com>
1296 * doublest.c: Do not include "gdbtypes.h".
1297 (extract_typed_floating): Remove.
1298 (store_typed_floating): Remove.
1299 (convert_typed_floating): Remove.
1300 * doublest.h (struct type): Remove.
1301 (DOUBLEST_PRINT_FORMAT): Remove.
1302 (DOUBLEST_SCAN_FORMAT): Remove.
1303 (extract_typed_floating): Remove.
1304 (store_typed_floating): Remove.
1305 (convert_typed_floating): Remove.
1307 * dfp.c (decimal_from_doublest): Remove.
1308 (decimal_to_doublest): Remove.
1309 * dfp.h: Do not include "doublest.h".
1310 (decimal_from_doublest): Remove.
1311 (decimal_to_doublest): Remove.
1313 * value.c: Do not include "doublest.h" and "dfp.h".
1314 (value_as_double): Remove.
1315 (unpack_double): Remove.
1316 (value_from_double): Remove.
1317 (value_from_decfloat): Remove.
1318 * value.h: Do not include "doublest.h".
1319 (value_as_double): Remove.
1320 (unpack_double): Remove.
1321 (value_from_double): Remove.
1322 (value_from_decfloat): Remove.
1324 2017-11-06 Ulrich Weigand <uweigand@de.ibm.com>
1326 * i386-tdep.c: Include "target-float.h". Do not include "doublest.h".
1327 (i386_extract_return_value): Use target_float_convert.
1328 (i386_store_return_value): Likewise.
1329 * i387-tdep.c (i387_register_to_value): Use target_float_convert.
1330 (i387_value_to_register): Likewise.
1331 * ia64-tdep.c: Include "target-float.h". Do not include "doublest.h".
1332 (ia64_register_to_value): Use target_float_convert.
1333 (ia64_value_to_register): Likewise.
1334 (ia64_extract_return_value): Likewise.
1335 (ia64_store_return_value): Likewise.
1336 (ia64_push_dummy_call): Likewise.
1337 * m68k-tdep.c: Include "target-float.h".
1338 (m68k_register_to_value): Use target_float_convert.
1339 (m68k_value_to_register): Likewise.
1340 (m68k_svr4_extract_return_value): Likewise.
1341 (m68k_svr4_store_return_value): Likewise.
1342 * ppc-sysv-tdep.c: Include "target-float.h".
1343 (ppc_sysv_abi_push_dummy_call): Use target_float_convert.
1344 (do_ppc_sysv_return_value): Likewise.
1345 (ppc64_sysv_abi_push_freg): Likewise.
1346 (ppc64_sysv_abi_return_value_base): Likewise.
1347 * rs6000-aix-tdep.c: Include "target-float.h".
1348 (rs6000_push_dummy_call): Use target_float_convert.
1349 (rs6000_return_value): Likewise.
1350 * rs6000-lynx178-tdep.c: Include "target-float.h".
1351 (rs6000_lynx178_push_dummy_call): Use target_float_convert.
1352 (rs6000_lynx178_return_value): Likewise.
1353 * rs6000-tdep.c: Include "target-float.h". Do not include "doublest.h".
1354 (rs6000_register_to_value): Use target_float_convert.
1355 (rs6000_value_to_register): Likewise.
1356 * arm-tdep.c: Include "target-float.h". Do not include "doublest.h".
1357 (arm_extract_return_value): Use target_float_convert.
1358 (arm_store_return_value): Likewise.
1359 * sh-tdep.c: Include "target-float.h". Do not include "doublest.h".
1360 (sh_register_convert_to_virtual): Use target_float_convert.
1361 (sh_register_convert_to_raw): Likewise.
1362 * sh64-tdep.c: Include "target-float.h".
1363 (sh64_extract_return_value): Use target_float_convert.
1364 (sh64_register_convert_to_virtual): Likewise.
1365 (sh64_register_convert_to_raw): Likewise. Fix argument types.
1367 2017-11-06 Ulrich Weigand <uweigand@de.ibm.com>
1369 * target-float.c (floatformat_to_host_double): New function.
1370 (floatformat_from_host_double): Likewise.
1371 (target_float_to_host_double): Likewise.
1372 (target_float_from_host_double): Likewise.
1373 * target-float.h (target_float_to_host_double): Add prototype.
1374 (target_float_from_host_double): Likewise.
1376 * guile/scm-value.c: Include "target-float.h".
1377 (gdbscm_value_to_real): Use target_float_to_host_double.
1378 Handle integer source values via value_as_long.
1379 * guile/scm-math.c: Include "target-float.h". Do not include
1380 "doublest.h", "dfp.h", and "expression.h".
1381 (vlscm_convert_typed_number): Use target_float_from_host_double.
1382 (vlscm_convert_number): Likewise.
1384 * python/py-value.c (valpy_float): Use target_float_to_host_double.
1385 (convert_value_from_python): Use target_float_from_host_double.
1387 2017-11-06 Ulrich Weigand <uweigand@de.ibm.com>
1389 * ada-lang.c (cast_to_fixed): Reimplement in target arithmetic.
1390 (cast_from_fixed): Likewise.
1391 (ada_scaling_type): New function.
1392 (ada_delta): Return value instead of DOUBLEST. Perform target
1393 arithmetic instead of host arithmetic.
1394 (scaling_factor): Rename to ...
1395 (ada_scaling_factor) ... this. Make non-static. Return value instead
1396 of DOUBLEST. Perform target arithmetic instead of host arithmetic.
1397 (ada_fixed_to_float): Remove.
1398 (ada_float_to_fixed): Remove.
1399 * ada-lang.h (ada_fixed_to_float): Remove.
1400 (ada_float_to_fixed): Remove.
1401 (ada_delta): Return value instead of DOUBLEST.
1402 (ada_scaling_factor): Add prototype.
1404 * ada-typeprint.c: Include "target-float.h".
1405 (print_fixed_point_type): Perform target arithmetic instead of
1407 * ada-valprint.c: Include "target-float.h".
1408 (ada_val_print_num): Perform target arithmetic instead of
1409 host arithmetic for fixed-point types.
1411 2017-11-06 Ulrich Weigand <uweigand@de.ibm.com>
1413 * target-float.c: Include <math.h>.
1414 (floatformat_binop): New function.
1415 (floatformat_compare): Likewise.
1416 (target_float_binop): Likewise.
1417 (target_float_compare): Likewise.
1418 * target-float.h: Include "expression.h".
1419 (target_float_binop): Add prototype.
1420 (target_float_compare): Likewise.
1422 * valarith.c: Do not include "doublest.h" and "dfp.h".
1423 Include "common/byte-vector.h".
1424 (value_args_as_decimal): Remove, replace by ...
1425 (value_args_as_target_float): ... this function. Handle both
1426 binary and decimal target floating-point formats.
1427 (scalar_binop): Handle both binary and decimal FP using
1428 value_args_as_target_float and target_float_binop.
1429 (value_equal): Handle both binary and decimal FP using
1430 value_args_as_target_float and target_float_compare.
1431 (value_less): Likewise.
1432 (value_pos): Handle all scalar types as simple copy.
1433 (value_neg): Handle all scalar types via BINOP_SUB from 0.
1434 * dfp.c (decimal_binop): Throw error instead of internal_error
1435 when called with an unsupported operation code.
1437 2017-11-06 Ulrich Weigand <uweigand@de.ibm.com>
1439 * target-float.c (target_float_to_string): New function.
1440 (target_float_from_string): New function.
1441 * target-float.h (target_float_to_string): Add prototype.
1442 (target_float_from_string): Add prototype.
1444 * valprint.c: Include "target-float.h". Do not include
1445 "doublest.h" and "dfp.h".
1446 (print_floating): Use target_float_to_string.
1447 * printcmd.c: Include "target-float.h". Do not include "dfp.h".
1448 (printf_floating): Use target_float_to_string.
1449 * i387-tdep.c: Include "target-float.h". Do not include "doublest.h".
1450 (print_i387_value): Use target_float_to_string.
1451 * mips-tdep.c: Include "target-float.h".
1452 (mips_print_fp_register): Use target_float_to_string.
1453 * sh64-tdep.c: Include "target-float.h".
1454 (sh64_do_fp_register): Use target_float_to_string.
1456 * parse.c: Include "target-float.h". Do not include
1457 "doublest.h" and "dfp.h".
1458 (parse_float): Use target_float_from_string.
1459 * stabsread.c: Include "target-float.h". Do not include "doublest.h".
1460 (define_symbol): Use target_float_from_string.
1461 * gdbarch-selftests.c: Include "target-float.h".
1462 (register_to_value_test): Use target_float_from_string.
1464 2017-11-06 Ulrich Weigand <uweigand@de.ibm.com>
1466 * Makefile.c (SFILES): Add target-float.c.
1467 (HFILES_NO_SRCDIR): Add target-float.h.
1468 (COMMON_OBS): Add target-float.o.
1469 * target-float.h: New file.
1470 * target-float.c: New file.
1472 * doublest.c (floatformat_classify): Fix detection of float_zero.
1474 * gdbtypes.c (is_floating_type): New function.
1475 * gdbtypes.h (is_floating_type): Add prototype.
1477 * value.c: Do not include "floatformat.h".
1478 (unpack_double): Use target_float_is_valid.
1479 (is_floating_value): New function.
1480 * value.h (is_floating_value): Add prototype-
1482 * valarith.c: Include "target-float.h".
1483 (value_logical_not): Use target_float_is_zero.
1485 * python/py-value.c: Include "target-float.h".
1486 (valpy_nonzero): Use target_float_is_zero.
1488 2017-11-04 Tom Tromey <tom@tromey.com>
1490 * h8300-tdep.c (h8300_push_dummy_call): Use std::vector.
1492 2017-11-04 Tom Tromey <tom@tromey.com>
1494 * breakpoint.c (set_momentary_breakpoint): Return
1496 (until_break_command): Update.
1497 (new_until_break_fsm): Change argument types to
1499 (set_momentary_breakpoint_at_pc): Return breakpoint_up.
1500 (do_delete_breakpoint_cleanup, make_cleanup_delete_breakpoint):
1502 * infcmd.c (finish_forward): Update.
1503 * breakpoint.h (set_momentary_breakpoint)
1504 (set_momentary_breakpoint_at_pc): Return breakpoint_up.
1505 (make_cleanup_delete_breakpoint): Remove.
1506 (struct breakpoint_deleter): New.
1507 (breakpoint_up): New typedef.
1508 * infrun.c (insert_step_resume_breakpoint_at_sal_1): Update.
1509 (insert_exception_resume_breakpoint): Update.
1510 (insert_exception_resume_from_probe): Update.
1511 (insert_longjmp_resume_breakpoint): Update.
1512 * arm-linux-tdep.c (arm_linux_copy_svc): Update.
1513 * elfread.c (elf_gnu_ifunc_resolver_stop): Update.
1514 * infcall.c (call_function_by_hand_dummy): Update
1516 2017-11-04 Tom Tromey <tom@tromey.com>
1518 * c-typeprint.c (c_type_print_base): Use gdb::unique_xmalloc_ptr.
1520 2017-11-04 Tom Tromey <tom@tromey.com>
1522 * linux-tdep.c (linux_core_info_proc_mappings): Use
1524 (linux_get_siginfo_data): Return gdb::byte_vector. Remove
1526 (linux_corefile_thread): Update.
1527 (linux_make_corefile_notes): Remove unused variable.
1529 2017-11-04 Tom Tromey <tom@tromey.com>
1531 * ppc-linux-tdep.c (ppc_linux_get_syscall_number): Use
1534 2017-11-04 Tom Tromey <tom@tromey.com>
1536 * objfiles.c (do_free_objfile_cleanup): Remove.
1537 * compile/compile-object-load.c (compile_object_load): Update.
1538 * objfiles.h (make_cleanup_free_objfile): Remove.
1540 2017-11-04 Tom Tromey <tom@tromey.com>
1542 * sparc64-tdep.c (do_examine): Use gdb::def_vector.
1543 (adi_read_versions): Change "tags" to "gdb_byte *".
1544 (adi_print_versions): Likewise.
1546 2017-11-04 Tom Tromey <tom@tromey.com>
1549 (scoped_rbreak_breakpoints::scoped_rbreak_breakpoints): Rename
1550 from start_rbreak_breakpoints.
1551 (scoped_rbreak_breakpoints): Rename from end_rbreak_breakpoints.
1552 * breakpoint.h (class scoped_rbreak_breakpoints): New.
1553 (start_rbreak_breakpoints, end_rbreak_breakpoints): Remove.
1554 * symtab.c (do_end_rbreak_breakpoints): Remove.
1555 (rbreak_command): Use scoped_rbreak_breakpoints, std::string.
1557 2017-11-04 Tom Tromey <tom@tromey.com>
1559 * cp-namespace.c (reset_directive_searched): Remove.
1560 (cp_lookup_symbol_via_imports): Use scoped_restore.
1561 * cp-support.c (reset_directive_searched): Remove.
1562 (make_symbol_overload_list_using): Use scoped_restore.
1563 * d-namespace.c (d_lookup_symbol_imports): Use scoped_restore.
1564 (reset_directive_searched): Remove.
1566 2017-11-04 Tom Tromey <tom@tromey.com>
1568 * symfile.c (find_separate_debug_file_by_debuglink): Use
1571 2017-11-04 Tom Tromey <tom@tromey.com>
1573 * compile/compile-loc2c.c (compute_stack_depth_worker): Change
1575 (compute_stack_depth): Likewise.
1576 (do_compile_dwarf_expr_to_c): Use std::vector.
1578 2017-11-04 Tom Tromey <tom@tromey.com>
1580 * compile/compile-object-load.c (link_callbacks_einfo): Use
1583 2017-11-04 Tom Tromey <tom@tromey.com>
1585 * dwarf2read.c (process_full_comp_unit, process_full_type_unit):
1586 Use scoped_free_pendings.
1587 * dbxread.c (dbx_symfile_read, dbx_psymtab_to_symtab_1): Use
1588 scoped_free_pendings.
1589 * xcoffread.c (xcoff_psymtab_to_symtab_1): Use scoped_free_pendings.
1590 (xcoff_initial_scan): Likewise.
1591 * buildsym.c (reset_symtab_globals): Update comment.
1592 (scoped_free_pendings): Rename from really_free_pendings.
1593 (prepare_for_building): Update comment.
1594 (buildsym_init): Likewise.
1595 * buildsym.h (class scoped_free_pendings): New class.
1596 (really_free_pendings): Don't declare.
1598 2017-11-03 Ulrich Weigand <uweigand@de.ibm.com>
1600 * doublest.c (convert_doublest_to_floatformat): Fix uninitialized
1601 output when converting a zero value to a special byteorder format.
1603 2017-11-02 Yao Qi <yao.qi@linaro.org>
1605 * frame.c (do_frame_register_read): Remove aspace.
1606 * jit.c (jit_frame_sniffer): Likwise.
1607 * ppc-linux-tdep.c (ppu2spu_sniffer): Likewise.
1608 * regcache.c (regcache::regcache): Pass nullptr.
1609 (regcache_print): Caller updated.
1610 * regcache.h (regcache::regcache): Remove one constructor
1613 2017-11-02 Yao Qi <yao.qi@linaro.org>
1615 * regcache.h (regcache) <m_readonly_p>: Change it to const bool.
1617 2017-11-02 Yao Qi <yao.qi@linaro.org>
1619 * breakpoint.c (insert_single_step_breakpoints): Update.
1620 * frame.c (struct frame_info) <aspace>: Add const.
1621 (frame_save_as_regcache): Add const.
1622 (get_frame_address_space): Return const address_space *.
1623 * frame.h (get_frame_address_space): Update declaration.
1624 * infrun.c (struct step_over_info) <aspace>: Add const.
1625 (set_step_over_info): Make aspace const.
1626 (displaced_step_prepare_throw): Change variable const.
1628 (proceed): Likewise.
1629 (adjust_pc_after_break): Likewise.
1630 (save_waitstatus): Likewise.
1631 (handle_signal_stop): Likewise.
1632 (keep_going_pass_signal): Likewise.
1633 * jit.c (jit_frame_sniffer): Add const.
1634 * mips-tdep.c (mips_single_step_through_delay): Likewise.
1635 * ppc-linux-tdep.c (ppu2spu_sniffer): Likewise.
1636 * record-full.c (record_full_wait_1): Likewise.
1637 * regcache.c (regcache::regcache): Change parameter to const.
1638 * regcache.h (regcache::regcache): Likewise.
1639 (regcache::aspace): Return const address_space *.
1640 (regcache) <m_aspace>: Add const.
1642 2017-11-02 Yao Qi <yao.qi@linaro.org>
1644 * darwin-nat.c (cancel_breakpoint): Use regcache->aspace ().
1645 * frame.c (create_sentinel_frame): Likewise.
1646 * infrun.c (displaced_step_prepare_throw): Likewise.
1648 (thread_still_needs_step_over_bp): Likewise.
1649 (proceed): Likewise.
1650 (do_target_wait): Likewise.
1651 (adjust_pc_after_break): Likewise.
1652 (handle_syscall_event): Likewise.
1653 (save_waitstatus): Likewise.
1654 (handle_inferior_event_1): Likewise.
1655 (handle_signal_stop): Likewise.
1656 (keep_going_pass_signal): Likewise.
1657 * linux-nat.c (status_callback): Likewise.
1658 (save_stop_reason): Likewise.
1659 (resume_stopped_resumed_lwps): Likewise.
1660 * record-full.c (record_full_exec_insn): Likewise.
1661 (record_full_wait_1): Likewise.
1662 * regcache.c (get_regcache_aspace): Remove.
1663 * regcache.h (get_regcache_aspace): Remove.
1665 2017-11-02 Yao Qi <yao.qi@linaro.org>
1667 * regcache.c (struct regcache_descr) <nr_raw_registers>: Remove.
1668 (init_regcache_descr): Use gdbarch_num_regs.
1669 (regcache::regcache): Likewise.
1670 (regcache::get_register_status): Likewise.
1671 (regcache::assert_raw_regnum): Likewise.
1672 (regcache::cooked_read): Likewise.
1673 (regcache::cooked_read_value): Likewise.
1674 (regcache::cooked_write): Likewise.
1675 (regcache::dump): Likewise.
1676 (regcache::num_raw_registers): New method.
1677 * regcache.h (class regcache) <num_raw_registers>: New.
1679 2017-11-02 Yao Qi <yao.qi@linaro.org>
1681 * regcache.c (regcache::assert_regnum): New method.
1682 (regcache::invalidate): Call assert_regnum.
1683 (regcache::raw_update): Likewise.
1684 (regcache::raw_write): Likewise.
1685 (regcache::raw_read_part): Likewise.
1686 (regcache::raw_write_part): Likewise.
1687 (regcache::raw_supply): Likewise.
1688 (regcache::raw_supply_integer): Likewise.
1689 (regcache::raw_supply_zeroed): Likewise.
1690 (regcache::raw_collect): Likewise.
1691 (regcache::raw_collect_integer): Likewise.
1692 * regcache.h (regcache::assert_regnum): Declare.
1694 2017-11-02 Yao Qi <yao.qi@linaro.org>
1696 * regcache.c (regcache::dump): Remove code.
1698 2017-11-02 Yao Qi <yao.qi@linaro.org>
1700 * regcache.c (struct regcache_descr) <sizeof_raw_register_status>:
1702 <sizeof_cooked_register_status>: Remove.
1703 (init_regcache_descr): Update.
1704 (regcache::regcache): Use nr_cooked_registers and nr_raw_registers.
1705 (regcache::save): Likewise.
1706 (regcache::dump): Likewise.
1708 2017-11-01 James Bowman <james.bowman@ftdichip.com>
1710 * ft32-tdep.c (ft32_fetch_instruction): New function.
1711 (ft32_analyze_prologue): Use ft32_fetch_instruction().
1713 2017-10-31 Simon Marchi <simon.marchi@polymtl.ca>
1715 * cli/cli-script.c (execute_control_command): Rename to ...
1716 (execute_control_command_1): ... this.
1717 (execute_control_command): New function.
1719 2017-10-31 Simon Marchi <simon.marchi@ericsson.com>
1721 * tracepoint.c (tfind_command): Remove const_cast.
1723 2017-10-30 Mike Gulick <mgulick@mathworks.com>
1725 * Makefile.in (HFILES_NO_SRCDIR): Remove reference to gdb.h.
1727 2017-10-30 Simon Marchi <simon.marchi@ericsson.com>
1729 * common/common-utils.h (in_inclusive_range): New function.
1730 * arm-tdep.c (arm_record_extension_space): Use
1732 (thumb_record_ld_st_reg_offset): Use in_inclusive_range.
1733 * cris-tdep.c (cris_spec_reg_applicable): Use
1736 2017-10-30 Pedro Alves <palves@redhat.com>
1737 Simon Marchi <simon.marchi@ericsson.com>
1739 * remote.c (remote_set_syscall_catchpoint): Build a std::string
1740 instead of a gdb::unique_xmalloc_ptr, using string_appendf.
1742 2017-10-30 Pedro Alves <palves@redhat.com>
1744 * common/common-utils.c (string_appendf, string_vappendf): New
1746 * common/common-utils.h (string_appendf, string_vappendf): New
1748 * unittests/common-utils-selftests.c (string_appendf_func)
1749 (test_appendf_func, string_vappendf_wrapper, string_appendf_tests)
1750 (string_vappendf_tests): New functions.
1751 (_initialize_common_utils_selftests): Register "string_appendf" and
1752 "string_vappendf tests".
1754 2017-10-30 Pedro Alves <palves@redhat.com>
1756 * unittests/common-utils-selftests.c (format_func): New typedef.
1757 (string_printf_tests, string_vprintf_tests): Tests factored out
1759 (test_format_func): ... this new function.
1760 (string_printf_tests, string_vprintf_tests): Reimplement on top of
1763 2017-10-29 Simon Marchi <simon.marchi@ericsson.com>
1765 * darwin-nat.c: Remove include of gdb.h.
1767 2017-10-29 Simon Marchi <simon.marchi@ericsson.com>
1769 * xtensa-xtregs.c: Fix formatting issues.
1771 2017-10-29 Simon Marchi <simon.marchi@ericsson.com>
1773 * xtensa-xtregs.c (xtensa_regtable_t) <name>: Constify.
1775 2017-10-28 Maksim Dzabraev <dzabraew@gmail.com>
1778 * python/py-infthread.c (thpy_get_inferior): Increment reference
1779 of inferior before returning it.
1781 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
1783 * unittests/common-utils-selftests.c (format): Add
1786 2017-10-27 Simon Marchi <simon.marchi@polymtl.ca>
1788 * xml-syscall.c (struct syscall_desc): Add constructor.
1789 <name>: Change type to std::string.
1790 (syscall_desc_up): New typedef.
1791 (syscall_desc_p): Remove typeder.
1792 (DEF_VEC_P(syscall_desc_p)): Remove.
1793 (struct syscall_group_desc): Add constructor.
1794 <name>: Change type to std::string.
1795 <syscalls>: Change type to std::vector.
1796 (syscall_group_desc_up): New typedef.
1797 (syscall_group_desc_p): Remove typedef.
1798 (DEF_VEC_P(syscall_group_desc_p)): Remove.
1799 (struct syscalls_info) <syscalls>: Change type to std::vector of
1802 <my_gdb_datadir>: Change type to std::string.
1803 (syscalls_info_up): New typedef.
1804 (allocate_syscalls_info): Remove.
1805 (syscalls_info_free_syscalls_desc): Remove.
1806 (syscalls_info_free_syscall_group_desc): Remove.
1807 (free_syscalls_info): Remove.
1808 (make_cleanup_free_syscalls_info): Remove.
1809 (syscall_group_create_syscall_group_desc): Adjust.
1810 (syscall_group_add_syscall): Adjust.
1811 (syscall_create_syscall_desc): Adjust.
1812 (syscall_parse_xml): Adjust, use unique_ptr instead of cleanup.
1813 (init_syscalls_info): Adjust.
1814 (syscall_group_get_group_by_name): Adjust.
1815 (xml_get_syscall_number): Adjust.
1816 (xml_get_syscall_name): Adjust.
1817 (xml_list_of_syscalls): Adjust.
1818 (xml_list_syscalls_by_group): Adjust.
1819 (xml_list_of_groups): Adjust.
1821 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
1823 * probe.h: Don't include gdb_vecs.h.
1824 (DEF_VEC_P (probe_p)): Remove.
1825 (find_probes_in_objfile): Return an std::vector.
1826 * probe.c (find_probes_in_objfile): Likewise.
1827 * breakpoint.c (breakpoint_objfile_data)
1828 <longjmp_probes>: Change type to std::vector.
1829 <exception_probes>: Likewise.
1830 (free_breakpoint_probes): Don't manually free vectors.
1831 (create_longjmp_master_breakpoint): Adjust.
1832 (create_exception_master_breakpoint): Adjust.
1833 * solib-svr4.c (svr4_create_probe_breakpoints): Change
1834 parameter type, adjust.
1835 (svr4_create_solib_event_breakpoints): Adjust.
1837 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
1839 * breakpoint.c (breakpoint_objfile_data): Initialize fields.
1840 (get_breakpoint_objfile_data): Allocate breakpoint_objfile_data
1842 (free_breakpoint_probes): Rename to ...
1843 (free_breakpoint_objfile_data): ... this, and call delete on
1846 2017-10-27 Simon Marchi <simon.marchi@polymtl.ca>
1848 * auto-load.c: Don't include gdb_vecs.h, include algorithm.
1849 (loaded_script_ptr): Remove typedef.
1850 (DEF_VEC_P (loaded_script_ptr)): Remove.
1851 (struct collect_matching_scripts_data): Add constructor.
1852 <scripts_p>: Change type to (pointer to) std::vector.
1853 (collect_matching_scripts_data): Adjust.
1854 (sort_scripts_by_name): Make suitable for std::sort.
1855 (print_scripts): Don't sort vector, adjust to std::vector.
1856 (auto_load_info_scripts): Sort vectors, adjust to std::vector.
1858 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
1860 * symfile.c (filename_language): Make struct, not typedef. Add
1862 <ext>: Change type to std::string.
1863 (DEF_VEC_O (filename_language)): Remove.
1864 (filename_language_table): Change type to std::vector.
1865 (add_filename_language): Adjust.
1866 (set_ext_lang_command): Adjust.
1867 (info_ext_lang_command): Adjust.
1868 (deduce_language_from_filename): Adjust.
1869 (class scoped_restore_filename_language_table): Remove.
1870 (test_filename_language): Use scoped_restore.
1871 (test_set_ext_lang_command): Use scoped_restore, adjust to
1874 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
1876 * symfile.c: Include selftest.h.
1877 (class scoped_restore_filename_language_table): New.
1878 (test_filename_language): New test.
1879 (test_set_ext_lang_command): New test.
1880 (_initialize_symfile): Register tests.
1882 2017-10-27 Keith Seitz <keiths@redhat.com>
1884 * breakpoint.c (print_breakpoint_location): Use the symbol saved
1885 in the bp_location, falling back to find_pc_sect_function when
1887 (add_location_to_breakpoint): Save sal->symbol.
1888 * breakpoint.h (struct bp_location) <symbol>: New field.
1889 * symtab.c (find_function_start_sal): Save the symbol into the SaL.
1890 * symtab.h (struct symtab_and_line) <symbol>: New field.
1892 2017-10-26 Patrick Frants <osscontribute@gmail.com>
1895 * cp-valprint.c (cp_print_value_fields): Use obstack_blank_fast
1898 2017-10-26 Pedro Alves <palves@redhat.com>
1900 * remote.c (remote_async_terminal_ours_p): Delete.
1901 (remote_open_1, remote_terminal_inferior, remote_terminal_ours):
1902 Remove references to 'remote_async_terminal_ours_p'.
1904 2017-10-26 Yao Qi <yao.qi@linaro.org>
1906 * breakpoint.h (regular_breakpoint_inserted_here_p): Remove.
1908 2017-10-26 Yao Qi <yao.qi@linaro.org>
1910 * break-catch-sig.c (signal_catchpoint_breakpoint_hit): Make
1912 * break-catch-syscall.c (breakpoint_hit_catch_syscall):
1914 * breakpoint.c (bpstat_check_location): Remove cast.
1915 (breakpoint_hit_catch_fork): Make aspce const.
1916 (breakpoint_hit_catch_solib): Likewise.
1917 (breakpoint_hit_catch_exec): Likewise.
1918 (breakpoint_hit_ranged_breakpoint): Likewise.
1919 (breakpoint_hit_watchpoint): Likewise.
1920 (base_breakpoint_breakpoint_hit): Likewise.
1921 (bkpt_breakpoint_hit): Likewise.
1922 (dprintf_breakpoint_hit): Likewise.
1923 (tracepoint_breakpoint_hit): Likewise.
1924 * breakpoint.h (breakpoint_ops) <breakpoint_hit>: Likewise.
1926 2017-10-26 Yao Qi <yao.qi@linaro.org>
1928 * breakpoint.c (breakpoint_location_address_match): Change
1929 "struct address_space *" to "const address_space".
1930 (breakpoint_location_address_range_overlap): Likewise.
1931 (breakpoint_here_p): Likewise.
1932 (breakpoint_in_range_p): Likewise.
1933 (moribund_breakpoint_here_p): Likewise.
1934 (bp_location_inserted_here_p): Likewise.
1935 (software_breakpoint_inserted_here_p): Likewise.
1936 (hardware_breakpoint_inserted_here_p): Likewise.
1937 (hardware_watchpoint_inserted_in_range): Likewise.
1938 (bpstat_check_location): Likewise.
1939 (bpstat_stop_status): Likewise.
1940 (breakpoint_address_match): Likewise.
1941 (breakpoint_address_match_range): Likewise.
1942 (breakpoint_location_address_match): Likewise.
1943 (breakpoint_location_address_range_overlap): Likewise.
1944 (insert_single_step_breakpoint): Likewise.
1945 (breakpoint_has_location_inserted_here): Likewise.
1946 (single_step_breakpoint_inserted_here_p): Likewise.
1947 (pc_at_non_inline_function): Likewise.
1948 * breakpoint.h (bpstat_stop_status): Update declaration.
1949 (breakpoint_here_p): Likewise.
1950 (breakpoint_in_range_p): Likewise.
1951 (moribund_breakpoint_here_p): Likewise.
1952 (breakpoint_inserted_here_p): Likewise.
1953 (software_breakpoint_inserted_here_p): Likewise.
1954 (hardware_breakpoint_inserted_here_p): Likewise.
1955 (breakpoint_has_location_inserted_here): Likewise.
1956 (single_step_breakpoint_inserted_here_p): Likewise.
1957 (hardware_watchpoint_inserted_in_range): Likewise.
1958 (breakpoint_address_match): Likewise.
1959 (insert_single_step_breakpoint): Likewise.
1960 (pc_at_non_inline_function): Likewise.
1961 * gdbthread.h (thread_has_single_step_breakpoint_here): Likewise.
1962 * record.c (record_check_stopped_by_breakpoint): Likewise.
1963 * record.h (record_check_stopped_by_breakpoint): Likewise.
1964 * thread.c (thread_has_single_step_breakpoint_here): Likewise.
1966 2017-10-25 Yao Qi <yao.qi@linaro.org>
1968 * aarch32-linux-nat.c (aarch32_gp_regcache_supply): Use
1969 regcache->arch () instead get_regcache_arch.
1970 * aarch64-fbsd-nat.c (aarch64_fbsd_fetch_inferior_registers):
1972 (aarch64_fbsd_store_inferior_registers): Likewise.
1973 * aarch64-linux-nat.c (fetch_gregs_from_thread): Likewise.
1974 (store_gregs_to_thread): Likewise.
1975 (fetch_fpregs_from_thread): Likewise.
1976 (store_fpregs_to_thread): Likewise.
1977 * aarch64-tdep.c (aarch64_extract_return_value): Likewise.
1978 (aarch64_store_return_value): Likewise.
1979 (aarch64_software_single_step): Likewise.
1980 * aix-thread.c (aix_thread_wait): Likewise.
1981 (supply_reg32): Likewise.
1982 (supply_sprs64): Likewise.
1983 (supply_sprs32): Likewise.
1984 (fill_gprs64): Likewise.
1985 (fill_gprs32): Likewise.
1986 (fill_sprs64): Likewise.
1987 (fill_sprs32): Likewise.
1988 (store_regs_user_thread): Likewise.
1989 (store_regs_kernel_thread): Likewise.
1990 * alpha-bsd-nat.c (alphabsd_fetch_inferior_registers): Likewise.
1991 (alphabsd_store_inferior_registers): Likewise.
1992 * alpha-tdep.c (alpha_extract_return_value): Likewise.
1993 (alpha_store_return_value): Likewise.
1994 (alpha_deal_with_atomic_sequence): Likewise.
1995 (alpha_next_pc): Likewise.
1996 (alpha_software_single_step): Likewise.
1997 * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers): Likewise.
1998 (amd64bsd_store_inferior_registers): Likewise.
1999 * amd64-linux-nat.c (amd64_linux_fetch_inferior_registers):
2001 (amd64_linux_store_inferior_registers): Likewise.
2002 * amd64-nat.c (amd64_supply_native_gregset): Likewise.
2003 (amd64_collect_native_gregset): Likewise.
2004 * amd64-obsd-tdep.c (amd64obsd_supply_uthread): Likewise.
2005 (amd64obsd_collect_uthread): Likewise.
2006 * amd64-tdep.c (amd64_supply_fpregset): Likewise.
2007 (amd64_collect_fpregset): Likewise.
2008 (amd64_supply_fxsave): Likewise.
2009 (amd64_supply_xsave): Likewise.
2010 (amd64_collect_fxsave): Likewise.
2011 (amd64_collect_xsave): Likewise.
2012 * arc-tdep.c (arc_write_pc): Likewise.
2013 * arch-utils.c (default_skip_permanent_breakpoint): Likewise.
2014 * arm-fbsd-nat.c (arm_fbsd_fetch_inferior_registers): Likewise.
2015 (arm_fbsd_store_inferior_registers): Likewise.
2016 * arm-linux-nat.c (fetch_vfp_regs): Likewise.
2017 (store_vfp_regs): Likewise.
2018 (arm_linux_fetch_inferior_registers): Likewise.
2019 (arm_linux_store_inferior_registers): Likewise.
2020 * arm-linux-tdep.c (arm_linux_supply_gregset): Likewise.
2021 (arm_linux_sigreturn_next_pc): Likewise.
2022 (arm_linux_get_next_pcs_syscall_next_pc): Likewise.
2023 * arm-nbsd-nat.c (arm_supply_gregset): Likewise.
2024 (fetch_register): Likewise.
2025 (store_register): Likewise.
2026 * arm-tdep.c (arm_is_thumb): Likewise.
2027 (displaced_in_arm_mode): Likewise.
2028 (bx_write_pc): Likewise.
2029 (arm_get_next_pcs_addr_bits_remove): Likewise.
2030 (arm_software_single_step): Likewise.
2031 (arm_extract_return_value): Likewise.
2032 (arm_store_return_value): Likewise.
2033 (arm_write_pc): Likewise.
2034 * bfin-tdep.c (bfin_extract_return_value): Likewise.
2035 * bsd-uthread.c (bsd_uthread_fetch_registers): Likewise.
2036 (bsd_uthread_store_registers): Likewise.
2037 * core-regset.c (fetch_core_registers): Likewise.
2038 * corelow.c (get_core_registers): Likewise.
2039 * cris-tdep.c (cris_store_return_value): Likewise.
2040 (cris_extract_return_value): Likewise.
2041 (find_step_target): Likewise.
2042 (find_step_target): Likewise.
2043 (cris_software_single_step): Likewise.
2044 * ctf.c (ctf_fetch_registers): Likewise.
2045 * darwin-nat.c (cancel_breakpoint): Likewise.
2046 * fbsd-tdep.c (fbsd_collect_thread_registers): Likewise.
2047 * frv-tdep.c (frv_extract_return_value): Likewise.
2048 * ft32-tdep.c (ft32_store_return_value): Likewise.
2049 (ft32_extract_return_value): Likewise.
2050 * go32-nat.c (fetch_register): Likewise.
2051 (go32_fetch_registers): Likewise.
2052 (go32_store_registers): Likewise.
2053 (store_register): Likewise.
2054 * h8300-tdep.c (h8300_extract_return_value): Likewise.
2055 (h8300_store_return_value): Likewise.
2056 * hppa-linux-nat.c (fetch_register): Likewise.
2057 (store_register): Likewise.
2058 (hppa_linux_fetch_inferior_registers): Likewise.
2059 (hppa_linux_store_inferior_registers): Likewise.
2060 * i386-darwin-nat.c (i386_darwin_fetch_inferior_registers): Likewise.
2061 (i386_darwin_store_inferior_registers): Likewise.
2062 * i386-gnu-nat.c (gnu_fetch_registers): Likewise.
2063 (gnu_store_registers): Likewise.
2064 * i386-linux-nat.c (fetch_register): Likewise.
2065 (store_register): Likewise.
2066 (supply_gregset): Likewise.
2067 (fill_gregset): Likewise.
2068 (i386_linux_fetch_inferior_registers): Likewise.
2069 (i386_linux_store_inferior_registers): Likewise.
2070 (i386_linux_resume): Likewise.
2071 * i386-linux-tdep.c (i386_linux_get_syscall_number_from_regcache):
2073 * i386-nto-tdep.c (i386nto_supply_gregset): Likewise.
2074 * i386-obsd-nat.c (i386obsd_supply_pcb): Likewise.
2075 * i386-obsd-tdep.c (i386obsd_supply_uthread): Likewise.
2076 (i386obsd_collect_uthread): Likewise.
2077 * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
2078 (i386_supply_gregset): Likewise.
2079 (i386_collect_gregset): Likewise.
2080 (i386_supply_fpregset): Likewise.
2081 (i386_collect_fpregset): Likewise.
2082 (i386_mpx_bd_base): Likewise.
2083 * i386-v4-nat.c (supply_fpregset): Likewise.
2084 (fill_fpregset): Likewise.
2085 * i387-tdep.c (i387_supply_fsave): Likewise.
2086 (i387_collect_fsave): Likewise.
2087 (i387_supply_fxsave): Likewise.
2088 (i387_collect_fxsave): Likewise.
2089 (i387_supply_xsave): Likewise.
2090 (i387_collect_xsave): Likewise.
2091 * ia64-linux-nat.c (ia64_linux_fetch_registers): Likewise.
2092 (ia64_linux_store_registers): Likewise.
2093 * ia64-tdep.c (ia64_access_rse_reg): Likewise.
2094 (ia64_extract_return_value): Likewise.
2095 (ia64_store_return_value): Likewise.
2096 (find_func_descr): Likewise.
2097 * inf-child.c (inf_child_fetch_inferior_registers): Likewise.
2098 * inf-ptrace.c (inf_ptrace_fetch_registers): Likewise.
2099 (inf_ptrace_store_registers): Likewise.
2100 * infrun.c (use_displaced_stepping): Likewise.
2101 (displaced_step_prepare_throw): Likewise.
2103 (proceed): Likewise.
2104 (do_target_wait): Likewise.
2105 (adjust_pc_after_break): Likewise.
2106 (handle_inferior_event_1): Likewise.
2107 (handle_signal_stop): Likewise.
2108 (save_infcall_suspend_state): Likewise.
2109 (restore_infcall_suspend_state): Likewise.
2110 * iq2000-tdep.c (iq2000_extract_return_value): Likewise.
2111 * jit.c (jit_frame_prev_register): Likewise.
2112 * linux-nat.c (save_stop_reason): Likewise.
2113 (linux_nat_wait_1): Likewise.
2114 (resume_stopped_resumed_lwps): Likewise.
2115 * linux-record.c (record_linux_sockaddr): Likewise.
2116 (record_linux_msghdr): Likewise.
2117 (record_linux_system_call): Likewise.
2118 * linux-tdep.c (linux_collect_thread_registers): Likewise.
2119 * lm32-tdep.c (lm32_extract_return_value): Likewise.
2120 (lm32_store_return_value): Likewise.
2121 * m32c-tdep.c (m32c_read_flg): Likewise.
2122 (m32c_pseudo_register_read): Likewise.
2123 (m32c_pseudo_register_write): Likewise.
2124 * m32r-linux-tdep.c (m32r_linux_supply_gregset): Likewise.
2125 (m32r_linux_collect_gregset): Likewise.
2126 * m32r-tdep.c (m32r_store_return_value): Likewise.
2127 (m32r_extract_return_value): Likewise.
2128 * m68k-bsd-nat.c (m68kbsd_supply_fpregset): Likewise.
2129 (m68kbsd_collect_fpregset): Likewise.
2130 * m68k-bsd-tdep.c (m68kbsd_supply_fpregset): Likewise.
2131 * m68k-linux-nat.c (fetch_register): Likewise.
2132 (old_fetch_inferior_registers): Likewise.
2133 (old_store_inferior_registers): Likewise.
2134 (store_regs): Likewise.
2135 * m68k-tdep.c (m68k_svr4_extract_return_value): Likewise.
2136 (m68k_svr4_store_return_value): Likewise.
2137 * m88k-tdep.c (m88k_store_arguments): Likewise.
2138 * mi/mi-main.c (mi_cmd_data_list_changed_registers): Likewise.
2139 (mi_cmd_data_write_register_values): Likewise.
2140 * mips-fbsd-nat.c (mips_fbsd_fetch_inferior_registers): Likewise.
2141 (mips_fbsd_store_inferior_registers): Likewise.
2142 * mips-fbsd-tdep.c (mips_fbsd_supply_fpregs): Likewise.
2143 (mips_fbsd_supply_gregs): Likewise.
2144 (mips_fbsd_collect_fpregs): Likewise.
2145 (mips_fbsd_collect_gregs): Likewise.
2146 (mips_fbsd_supply_fpregset): Likewise.
2147 (mips_fbsd_collect_fpregset): Likewise.
2148 (mips_fbsd_supply_gregset): Likewise.
2149 (mips_fbsd_collect_gregset): Likewise.
2150 * mips-linux-nat.c (supply_gregset): Likewise.
2151 (fill_gregset): Likewise.
2152 (supply_fpregset): Likewise.
2153 (fill_fpregset): Likewise.
2154 * mips-linux-tdep.c (mips_supply_gregset): Likewise.
2155 (mips_fill_gregset): Likewise.
2156 (mips_supply_fpregset): Likewise.
2157 (mips_fill_fpregset): Likewise.
2158 (mips64_supply_gregset): Likewise.
2159 (micromips_linux_sigframe_validate): Likewise.
2160 * mips-nbsd-nat.c (mipsnbsd_fetch_inferior_registers): Likewise.
2161 (mipsnbsd_fetch_inferior_registers): Likewise.
2162 (mipsnbsd_store_inferior_registers): Likewise.
2163 * mips-nbsd-tdep.c (mipsnbsd_supply_fpregset): Likewise.
2164 (mipsnbsd_supply_gregset): Likewise.
2165 (mipsnbsd_iterate_over_regset_sections): Likewise.
2166 (mipsnbsd_supply_reg): Likewise.
2167 (mipsnbsd_supply_fpreg): Likewise.
2168 * mips-tdep.c (mips_in_frame_stub): Likewise.
2169 (mips_dummy_id): Likewise.
2170 (is_octeon_bbit_op): Likewise.
2171 (micromips_bc1_pc): Likewise.
2172 (extended_mips16_next_pc): Likewise.
2173 (mips16_next_pc): Likewise.
2174 (deal_with_atomic_sequence): Likewise.
2175 * moxie-tdep.c (moxie_process_readu): Likewise.
2176 * nios2-tdep.c (nios2_get_next_pc): Likewise.
2177 * nto-procfs.c (procfs_store_registers): Likewise.
2178 * ppc-fbsd-nat.c (ppcfbsd_fetch_inferior_registers): Likewise.
2179 (ppcfbsd_store_inferior_registers): Likewise.
2180 * ppc-linux-nat.c (fetch_vsx_register): Likewise.
2181 (fetch_altivec_register): Likewise.
2182 (get_spe_registers): Likewise.
2183 (fetch_spe_register): Likewise.
2184 (fetch_altivec_registers): Likewise.
2185 (fetch_all_gp_regs): Likewise.
2186 (fetch_all_fp_regs): Likewise.
2187 (store_vsx_register): Likewise.
2188 (store_altivec_register): Likewise.
2189 (set_spe_registers): Likewise.
2190 (store_spe_register): Likewise.
2191 (store_altivec_registers): Likewise.
2192 (store_all_gp_regs): Likewise.
2193 (store_all_fp_regs): Likewise.
2194 * ppc-linux-tdep.c (ppc_linux_supply_gregset): Likewise.
2195 (ppc_linux_collect_gregset): Likewise.
2196 (ppc_canonicalize_syscall): Likewise.
2197 (ppc_linux_record_signal): Likewise.
2198 (ppu2spu_prev_register): Likewise.
2199 * ppc-nbsd-nat.c (ppcnbsd_supply_pcb): Likewise.
2200 * ppc-obsd-nat.c (ppcobsd_fetch_registers): Likewise.
2201 (ppcobsd_store_registers): Likewise.
2202 * ppc-ravenscar-thread.c (ppc_ravenscar_generic_fetch_registers):
2204 (ppc_ravenscar_generic_store_registers): Likewise.
2205 * procfs.c (procfs_fetch_registers): Likewise.
2206 (procfs_store_registers): Likewise.
2207 * ravenscar-thread.c (ravenscar_fetch_registers): Likewise.
2208 (ravenscar_store_registers): Likewise.
2209 (ravenscar_prepare_to_store): Likewise.
2210 * record-btrace.c (record_btrace_fetch_registers): Likewise.
2211 * record-full.c (record_full_wait_1): Likewise.
2212 (record_full_registers_change): Likewise.
2213 (record_full_store_registers): Likewise.
2214 (record_full_core_fetch_registers): Likewise.
2215 (record_full_save): Likewise.
2216 (record_full_goto_insn): Likewise.
2217 * regcache.c (regcache_register_size): Likewise.
2218 (get_regcache_arch): Remove.
2219 (regcache_read_pc): Likewise.
2220 * regcache.h (get_regcache_arch): Remove.
2221 * remote-sim.c (gdbsim_fetch_register): Likewise.
2222 (gdbsim_store_register): Likewise.
2223 * remote.c (fetch_register_using_p): Likewise.
2224 (send_g_packet): Likewise.
2225 (remote_prepare_to_store): Likewise.
2226 (store_registers_using_G): Likewise.
2227 * reverse.c (save_bookmark_command): Likewise.
2228 (goto_bookmark_command): Likewise.
2229 * rs6000-aix-tdep.c (branch_dest): Likewise.
2230 * rs6000-nat.c (rs6000_ptrace64): Likewise.
2231 (fetch_register): Likewise.
2232 * rs6000-tdep.c (ppc_supply_reg): Likewise.
2233 (ppc_collect_reg): Likewise.
2234 (ppc_collect_gregset): Likewise.
2235 (ppc_collect_fpregset): Likewise.
2236 (ppc_collect_vsxregset): Likewise.
2237 (ppc_collect_vrregset): Likewise.
2238 (ppc_displaced_step_hw_singlestep): Likewise.
2239 (rs6000_pseudo_register_read): Likewise.
2240 (rs6000_pseudo_register_write): Likewise.
2241 * s390-linux-nat.c (supply_gregset): Likewise.
2242 (fill_gregset): Likewise.
2243 (s390_linux_fetch_inferior_registers): Likewise.
2244 * s390-linux-tdep.c (s390_write_pc): Likewise.
2245 (s390_software_single_step): Likewise.
2246 (s390_all_but_pc_registers_record): Likewise.
2247 (s390_linux_syscall_record): Likewise.
2248 * sentinel-frame.c (sentinel_frame_prev_arch): Likewise.
2249 * sh-nbsd-nat.c (shnbsd_fetch_inferior_registers): Likewise.
2250 (shnbsd_store_inferior_registers): Likewise.
2251 * sh-tdep.c (sh_extract_return_value_nofpu): Likewise.
2252 (sh_extract_return_value_fpu): Likewise.
2253 (sh_store_return_value_nofpu): Likewise.
2254 (sh_corefile_supply_regset): Likewise.
2255 (sh_corefile_collect_regset): Likewise.
2256 * sh64-tdep.c (sh64_extract_return_value): Likewise.
2257 (sh64_store_return_value): Likewise.
2258 * sparc-linux-tdep.c (sparc32_linux_collect_core_fpregset): Likewise.
2259 * sparc-nat.c (sparc_fetch_inferior_registers): Likewise.
2260 (sparc_store_inferior_registers): Likewise.
2261 * sparc-ravenscar-thread.c (register_in_thread_descriptor_p): Likewise.
2262 (sparc_ravenscar_prepare_to_store): Likewise.
2263 * sparc-tdep.c (sparc32_store_arguments): Likewise.
2264 (sparc_analyze_control_transfer): Likewise.
2265 (sparc_step_trap): Likewise.
2266 (sparc_software_single_step): Likewise.
2267 (sparc32_gdbarch_init): Likewise.
2268 (sparc_supply_rwindow): Likewise.
2269 (sparc_collect_rwindow): Likewise.
2270 * sparc64-linux-tdep.c (sparc64_linux_collect_core_fpregset): Likewise.
2271 * sparc64-nbsd-nat.c (sparc64nbsd_supply_gregset): Likewise.
2272 (sparc64nbsd_collect_gregset): Likewise.
2273 (sparc64nbsd_supply_fpregset): Likewise.
2274 (sparc64nbsd_collect_fpregset): Likewise.
2275 * sparc64-tdep.c (sparc64_store_arguments): Likewise.
2276 (sparc64_supply_gregset): Likewise.
2277 (sparc64_collect_gregset): Likewise.
2278 (sparc64_supply_fpregset): Likewise.
2279 (sparc64_collect_fpregset): Likewise.
2280 * spu-linux-nat.c (spu_fetch_inferior_registers): Likewise.
2281 * spu-tdep.c (spu_unwind_sp): Likewise.
2282 (spu2ppu_prev_register): Likewise.
2283 (spu_memory_remove_breakpoint): Likewise.
2284 * stack.c (return_command): Likewise.
2285 * tic6x-tdep.c (tic6x_extract_signed_field): Likewise.
2286 * tracefile-tfile.c (tfile_fetch_registers): Likewise.
2287 * tracefile.c (trace_save_ctf): Likewise.
2288 * windows-nat.c (do_windows_fetch_inferior_registers): Likewise.
2289 (do_windows_store_inferior_registers): Likewise.
2290 (windows_resume): Likewise.
2291 * xtensa-linux-nat.c (fill_gregset): Likewise.
2292 (supply_gregset_reg): Likewise.
2293 * xtensa-tdep.c (xtensa_register_write_masked): Likewise.
2294 (xtensa_register_read_masked): Likewise.
2295 (xtensa_supply_gregset): Likewise.
2296 (xtensa_extract_return_value): Likewise.
2297 (xtensa_store_return_value): Likewise.
2299 2017-10-25 Ulrich Weigand <uweigand@de.ibm.com>
2301 * doublest.c (floatformat_from_string): New function.
2302 * doublest.h (floatformat_from_string): Add prototype.
2304 * std-operator.def (OP_DOUBLE, OP_DECFLOAT): Remove, replace by ...
2305 (OP_FLOAT): ... this.
2306 * expression.h: Do not include "doublest.h".
2307 (union exp_element): Replace doubleconst and decfloatconst by
2308 new element floatconst.
2309 * ada-lang.c (resolve_subexp): Handle OP_FLOAT instead of OP_DOUBLE.
2310 (ada_evaluate_subexp): Likewise.
2311 * eval.c (evaluate_subexp_standard): Handle OP_FLOAT instead of
2312 OP_DOUBLE and OP_DECFLOAT.
2313 * expprint.c (print_subexp_standard): Likewise.
2314 (dump_subexp_body_standard): Likewise.
2315 * breakpoint.c (watchpoint_exp_is_const): Likewise.
2317 * parse.c: Include "dfp.h".
2318 (write_exp_elt_dblcst, write_exp_elt_decfloatcst): Remove.
2319 (write_exp_elt_floatcst): New function.
2320 (operator_length_standard): Handle OP_FLOAT instead of OP_DOUBLE
2322 (operator_check_standard): Likewise.
2323 (parse_float): Do not accept suffix. Take type as input. Return bool.
2324 Return target format buffer instead of host DOUBLEST.
2325 Use floatformat_from_string and decimal_from_string to parse
2326 either binary or decimal floating-point types.
2327 (parse_c_float): Remove.
2328 * parser-defs.h: Do not include "doublest.h".
2329 (write_exp_elt_dblcst, write_exp_elt_decfloatcst): Remove.
2330 (write_exp_elt_floatcst): Add prototype.
2331 (parse_float): Update prototype.
2332 (parse_c_float): Remove.
2334 * c-exp.y: Do not include "dfp.h".
2335 (typed_val_float): Use byte buffer instead of DOUBLEST.
2336 (typed_val_decfloat): Remove.
2338 (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
2339 (parse_number): Update to new parse_float interface.
2340 Parse suffixes and determine type before calling parse_float.
2341 Handle decimal and binary FP types the same way.
2343 * d-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
2344 (FLOAT_LITERAL): Use OP_FLOAT and write_exp_elt_floatcst.
2345 (parse_number): Update to new parse_float interface.
2346 Parse suffixes and determine type before calling parse_float.
2348 * f-exp.y: Replace dval by typed_val_float.
2349 (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
2350 (parse_number): Use parse_float instead of atof.
2352 * go-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
2353 (parse_go_float): Remove.
2354 (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
2355 (parse_number): Call parse_float instead of parse_go_float.
2356 Parse suffixes and determine type before calling parse_float.
2358 * p-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
2359 (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
2360 (parse_number): Update to new parse_float interface.
2361 Parse suffixes and determine type before calling parse_float.
2363 * m2-exp.y: Replace dval by byte buffer val.
2364 (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
2365 (parse_number): Call parse_float instead of atof.
2367 * rust-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
2368 (lex_number): Call parse_float instead of strtod.
2369 (ast_dliteral): Use OP_FLOAT instead of OP_DOUBLE.
2370 (convert_ast_to_expression): Handle OP_FLOAT instead of OP_DOUBLE.
2371 Use write_exp_elt_floatcst.
2372 (unit_testing): Remove static variable.
2373 (rust_type): Do not check unit_testing.
2374 (rust_lex_tests): Do not set uint_testing. Set up dummy rust_parser.
2376 * ada-exp.y (type_float, type_double): Remove.
2377 (typed_val_float): Use byte buffer instead of DOUBLEST.
2378 (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
2379 * ada-lex.l (processReal): Use parse_float instead of sscanf.
2381 2017-10-25 Alan Hayward <alan.hayward@arm.com>
2383 * aarch64-tdep.h (enum aarch64_regnum): Remove.
2384 * arch/aarch64.h: New file.
2386 2017-10-24 Ulrich Weigand <uweigand@de.ibm.com>
2388 * dfp.h (decimal_from_string): Use const reference for argument.
2389 * dfp.c (decimal_from_string): Likewise.
2391 2017-10-24 Ulrich Weigand <uweigand@de.ibm.com>
2393 * i387-tdep.c (print_i387_value): Use floatformat_to_string.
2394 * sh64-tdep.c (sh64_do_fp_register): Likewise.
2395 * mips-tdep.c (mips_print_fp_register): Likewise.
2397 2017-10-24 Ulrich Weigand <uweigand@de.ibm.com>
2399 * common/format.h (enum argclass): Replace decfloat_arg by
2400 dec32float_arg, dec64float_arg, and dec128float_arg.
2401 * common/format.c (parse_format_string): Update to return
2402 new decimal float argument classes.
2404 * printcmd.c (printf_decfloat): Rename to ...
2405 (printf_floating): ... this. Add argclass argument, and use it
2406 instead of parsing the format string again. Add support for
2407 binary floating-point values, using floatformat_to_string.
2408 Convert value to the target format if it doesn't already match.
2409 (ui_printf): Call printf_floating instead of printf_decfloat,
2410 also for double_arg / long_double_arg. Pass argclass.
2412 * dfp.c (decimal_to_string): Add format string argument.
2413 * dfp.h (decimal_to_string): Likewise.
2415 * doublest.c (floatformat_to_string): Add format string argument.
2416 * doublest.h (floatformat_to_string): Likewise.
2418 2017-10-24 Ulrich Weigand <uweigand@de.ibm.com>
2420 * doublest.c (floatformat_precision): New routine.
2421 (floatformat_to_string): Likewise.
2422 * doublest.c (floatformat_to_string): Add prototype.
2424 * printcmd.c (print_scalar_formatted): Only call print_floating
2425 on floating-point types.
2426 * valprint.c: Do not include "floatformat.h".
2427 (generic_val_print_decfloat): Remove.
2428 (generic_val_print): Call generic_val_print_float for both
2429 TYPE_CODE_FLT and TYPE_CODE_DECFLOAT.
2430 (print_floating): Use floatformat_to_string. Handle decimal float.
2431 (print_decimal_floating): Remove, merge into floatformat_to_string.
2432 * value.h (print_decimal_floating): Remove.
2434 * Makefile.in: Do not build doublest.c with -Wformat-nonliteral.
2436 2017-10-24 Ulrich Weigand <uweigand@de.ibm.com>
2438 * buildsym.c (end_symtab_get_static_block): Use std::stable_sort.
2440 2017-10-21 Simon Marchi <simon.marchi@ericsson.com>
2442 * memattr.h: Don't include vec.h.
2443 (struct mem_attrib): Initialize fields.
2444 <unknown>: New static method.
2445 (struct mem_region): Add constructors, operator<, initialize
2447 * memattr.c: Include algorithm.
2448 (default_mem_attrib, unknown_mem_attrib): Remove.
2449 (user_mem_region_list): New global.
2450 (target_mem_region_list, mem_region_list): Change type to
2451 std::vector<mem_region>.
2452 (mem_use_target): Now a function.
2453 (target_mem_regions_valid): Change type to bool.
2454 (mem_region_lessthan, mem_region_cmp, mem_region_init): Remove.
2455 (require_user_regions): Adjust.
2456 (require_target_regions): Adjust.
2457 (create_mem_region): Adjust.
2458 (lookup_mem_region): Adjust.
2459 (invalidate_target_mem_regions): Adjust.
2460 (mem_clear): Rename to...
2461 (user_mem_clear): ... this, and adjust.
2462 (mem_command): Adjust.
2463 (info_mem_command): Adjust.
2464 (mem_enable, enable_mem_command, mem_disable,
2465 disable_mem_command): Adjust.
2466 (mem_delete): Adjust.
2467 (delete_mem_command): Adjust.
2468 * memory-map.h (parse_memory_map): Return an std::vector.
2469 * memory-map.c (parse_memory_map): Likewise.
2470 (struct memory_map_parsing_data): Add constructor.
2471 <memory_map>: Point to std::vector.
2472 (memory_map_start_memory): Adjust.
2473 (memory_map_end_memory): Adjust.
2474 (memory_map_end_property): Adjust.
2475 (clear_result): Remove.
2476 * remote.c (remote_memory_map): Return an std::vector.
2477 * target-debug.h (target_debug_print_VEC_mem_region_s__p):
2479 (target_debug_print_mem_region_vector): New.
2480 * target-delegates.c: Regenerate.
2481 * target.h (mem_region_vector): New typedef.
2482 (to_memory_map): Return mem_region_vector.
2483 (target_memory_map): Return an std::vector.
2484 * target.c (target_memory_map): Return an std::vector.
2485 (flash_erase_command): Adjust.
2487 2017-10-21 Simon Marchi <simon.marchi@ericsson.com>
2489 * memory-map.c (struct memory_map_parsing_data) <property_name>:
2490 Change type to std::string.
2491 (memory_map_start_property): Adjust.
2492 (memory_map_end_property): Adjust.
2494 2017-10-21 Simon Marchi <simon.marchi@polymtl.ca>
2496 * infrun.h: Include common/byte-vector.h.
2497 (struct displaced_step_closure): New struct.
2498 (struct buf_displaced_step_closure): New struct.
2499 * infrun.c (displaced_step_closure::~displaced_step_closure):
2500 Provide default implementation.
2501 (displaced_step_clear): Deallocate step closure with delete.
2502 * aarch64-tdep.c (displaced_step_closure): Rename to ...
2503 (aarch64_displaced_step_closure): ... this, extend
2504 displaced_step_closure.
2505 (aarch64_displaced_step_data) <dsc>: Change type to
2506 aarch64_displaced_step_closure.
2507 (aarch64_displaced_step_copy_insn): Adjust to type change, use
2509 (aarch64_displaced_step_fixup): Add cast for displaced step
2511 * amd64-tdep.c (displaced_step_closure): Rename to ...
2512 (amd64_displaced_step_closure): ... this, extend
2513 displaced_step_closure.
2514 <insn_buf>: Change type to std::vector<gdb_byte>.
2516 (fixup_riprel): Change type of DSC parameter, adjust to type
2518 (fixup_displaced_copy): Change type of DSC parameter.
2519 (amd64_displaced_step_copy_insn): Instantiate
2520 amd64_displaced_step_closure.
2521 (amd64_displaced_step_fixup): Add cast for closure type, adjust
2522 to type change of insn_buf.
2523 * arm-linux-tdep.c (arm_linux_cleanup_svc): Change type of
2525 (arm_linux_copy_svc): Likewise.
2526 (cleanup_kernel_helper_return): Likewise.
2527 (arm_catch_kernel_helper_return): Likewise.
2528 (arm_linux_displaced_step_copy_insn): Instantiate
2529 arm_displaced_step_closure.
2530 * arm-tdep.c (arm_pc_is_thumb): Add cast for closure.
2531 (displaced_read_reg): Change type of parameter DSC.
2532 (branch_write_pc): Likewise.
2533 (load_write_pc): Likewise.
2534 (alu_write_pc): Likewise.
2535 (displaced_write_reg): Likewise.
2536 (arm_copy_unmodified): Likewise.
2537 (thumb_copy_unmodified_32bit): Likewise.
2538 (thumb_copy_unmodified_16bit): Likewise.
2539 (cleanup_preload): Likewise.
2540 (install_preload): Likewise.
2541 (arm_copy_preload): Likewise.
2542 (thumb2_copy_preload): Likewise.
2543 (install_preload_reg): Likewise.
2544 (arm_copy_preload_reg): Likewise.
2545 (cleanup_copro_load_store): Likewise.
2546 (install_copro_load_store): Likewise.
2547 (arm_copy_copro_load_store) Likewise.
2548 (thumb2_copy_copro_load_store): Likewise.
2549 (cleanup_branch): Likewise.
2550 (install_b_bl_blx): Likewise.
2551 (arm_copy_b_bl_blx): Likewise.
2552 (thumb2_copy_b_bl_blx): Likewise.
2553 (thumb_copy_b): Likewise.
2554 (install_bx_blx_reg): Likewise.
2555 (arm_copy_bx_blx_reg): Likewise.
2556 (thumb_copy_bx_blx_reg): Likewise.
2557 (cleanup_alu_imm): Likewise.
2558 (arm_copy_alu_imm): Likewise.
2559 (thumb2_copy_alu_imm): Likewise.
2560 (cleanup_alu_reg): Likewise.
2561 (install_alu_reg): Likewise.
2562 (arm_copy_alu_reg): Likewise.
2563 (thumb_copy_alu_reg): Likewise.
2564 (cleanup_alu_shifted_reg): Likewise.
2565 (install_alu_shifted_reg): Likewise.
2566 (arm_copy_alu_shifted_reg): Likewise.
2567 (cleanup_load): Likewise.
2568 (cleanup_store): Likewise.
2569 (arm_copy_extra_ld_st): Likewise.
2570 (install_load_store): Likewise.
2571 (thumb2_copy_load_literal): Likewise.
2572 (thumb2_copy_load_reg_imm): Likewise.
2573 (arm_copy_ldr_str_ldrb_strb): Likewise.
2574 (cleanup_block_load_all): Likewise.
2575 (cleanup_block_store_pc): Likewise.
2576 (cleanup_block_load_pc): Likewise.
2577 (arm_copy_block_xfer): Likewise.
2578 (thumb2_copy_block_xfer): Likewise.
2579 (cleanup_svc): Likewise.
2580 (install_svc): Likewise.
2581 (arm_copy_svc): Likewise.
2582 (thumb_copy_svc): Likewise.
2583 (arm_copy_undef): Likewise.
2584 (thumb_32bit_copy_undef): Likewise.
2585 (arm_copy_unpred): Likewise.
2586 (arm_decode_misc_memhint_neon): Likewise.
2587 (arm_decode_unconditional): Likewise.
2588 (arm_decode_miscellaneous): Likewise.
2589 (arm_decode_dp_misc): Likewise.
2590 (arm_decode_ld_st_word_ubyte): Likewise.
2591 (arm_decode_media): Likewise.
2592 (arm_decode_b_bl_ldmstm): Likewise.
2593 (arm_decode_ext_reg_ld_st): Likewise.
2594 (thumb2_decode_dp_shift_reg): Likewise.
2595 (thumb2_decode_ext_reg_ld_st): Likewise.
2596 (arm_decode_svc_copro): Likewise.
2597 (thumb2_decode_svc_copro): Likewise.
2598 (install_pc_relative): Likewise.
2599 (thumb_copy_pc_relative_16bit): Likewise.
2600 (thumb_decode_pc_relative_16bit): Likewise.
2601 (thumb_copy_pc_relative_32bit): Likewise.
2602 (thumb_copy_16bit_ldr_literal): Likewise.
2603 (thumb_copy_cbnz_cbz): Likewise.
2604 (thumb2_copy_table_branch): Likewise.
2605 (cleanup_pop_pc_16bit_all): Likewise.
2606 (thumb_copy_pop_pc_16bit): Likewise.
2607 (thumb_process_displaced_16bit_insn): Likewise.
2608 (decode_thumb_32bit_ld_mem_hints): Likewise.
2609 (thumb_process_displaced_32bit_insn): Likewise.
2610 (thumb_process_displaced_insn): Likewise.
2611 (arm_process_displaced_insn): Likewise.
2612 (arm_displaced_init_closure): Likewise.
2613 (arm_displaced_step_fixup): Add cast for closure.
2614 * arm-tdep.h: Include infrun.h.
2615 (displaced_step_closure): Rename to ...
2616 (arm_displaced_step_closure): ... this, extend
2617 displaced_step_closure.
2618 <u::svc::copy_svc_os>: Change type of parameter DSC.
2619 <cleanup>: Likewise.
2620 (arm_process_displaced_insn): Likewise.
2621 (arm_displaced_init_closure): Likewise.
2622 (displaced_read_reg): Likewise.
2623 (displaced_write_reg): Likewise.
2624 * i386-linux-tdep.c (i386_linux_displaced_step_copy_insn):
2626 * i386-tdep.h: Include infrun.h.
2627 (i386_displaced_step_closure): New typedef.
2628 * i386-tdep.c (i386_displaced_step_copy_insn): Use
2629 i386_displaced_step_closure.
2630 (i386_displaced_step_fixup): Adjust.
2631 * rs6000-tdep.c (ppc_displaced_step_closure): New typedef.
2632 (ppc_displaced_step_copy_insn): Use ppc_displaced_step_closure
2634 (ppc_displaced_step_fixup): Adjust.
2635 * s390-linux-tdep.c (s390_displaced_step_closure): New typedef.
2636 (s390_displaced_step_copy_insn): Use s390_displaced_step_closure
2638 (s390_displaced_step_fixup): Adjust.
2640 2017-10-21 Simon Marchi <simon.marchi@polymtl.ca>
2642 * interps.h (interp_resume, interp_suspend, interp_set_temp):
2643 Remove declarations.
2645 2017-10-20 Tom Tromey <tom@tromey.com>
2647 * gdb_bfd.c (struct gdb_bfd_data) <included_bfds>: Now a
2649 (gdb_bfd_record_inclusion): Update.
2650 (bfdp): Remove typedef.
2652 2017-10-20 Tom Tromey <tom@tromey.com>
2654 * gdb_bfd.c (gdb_bfd_ref): Use new.
2655 (struct gdb_bfd_data): Add constructor, destructor, and member
2657 (gdb_bfd_unref): Use delete.
2659 2017-10-20 Tom Tromey <tom@tromey.com>
2661 * exec.c (exec_file_attach): Use new_bfd_ref.
2662 * symfile-mem.c (symbol_file_add_from_memory): Use new_bfd_ref.
2663 * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
2664 (gdb_bfd_openw, gdb_bfd_openr_iovec, gdb_bfd_fdopenr): Use
2666 * gdb_bfd.h (new_bfd_ref): New function.
2668 2017-10-20 Pedro Alves <palves@redhat.com>
2670 * main.c (captured_command_loop): Add attribute noinline.
2672 2017-10-19 Simon Marchi <simon.marchi@ericsson.com>
2674 * interps.c (struct interp_factory): Add constructor.
2675 (interp_factory_p): Remove typedef.
2676 (DEF_VEC_P(interp_factory_p)): Remove.
2677 (interpreter_factories): Change type to std::vector.
2678 (interp_factory_register): Adjust.
2679 (interp_lookup): Adjust.
2680 (interpreter_completer): Adjust.
2682 2017-10-19 Tom Tromey <tom@tromey.com>
2684 * break-catch-syscall.c (catch_syscall_completer): Use
2685 std::string, gdb::unique_xmalloc_ptr.
2687 2017-10-19 Tom Tromey <tom@tromey.com>
2689 * infcall.c (call_function_by_hand_dummy): Use std::string.
2691 2017-10-19 Tom Tromey <tom@tromey.com>
2693 * mi/mi-main.c (mi_cmd_execute): Update.
2694 * top.h (prepare_execute_command): Return scoped_value_mark.
2695 * value.h (class scoped_value_mark): Use DISABLE_COPY_AND_ASSIGN.
2696 Add move constructor.
2697 * top.c (prepare_execute_command): Return scoped_value_mark.
2698 (execute_command): Update.
2700 2017-10-19 Pedro Alves <palves@redhat.com>
2702 * xml-support.c (xml_fetch_content_from_file): Check fread's
2705 2017-10-19 Pedro Alves <palves@redhat.com>
2707 * ser-base.c (ser_base_read_error_fd): Delete the file handler if
2709 (handle_error_fd): New function.
2710 (ser_base_async): Add/delete an event loop file handler for
2713 2017-10-19 Pedro Alves <palves@redhat.com>
2715 * xml-support.c (xml_fetch_content_from_file): Don't read in
2716 chunks. Instead use fseek to determine the file's size, and read
2719 2017-11-18 Keith Seitz <keiths@redhat.com>
2721 * c-exp.y (oper): Canonicalize conversion operators of user-defined
2723 Add whitespace to front of type name.
2725 2017-10-18 Keith Seitz <keiths@redhat.com>
2727 * dwarf2read.c (dwarf2_add_typedef): Issue a complaint on unhandled
2728 DW_AT_accessibility.
2730 2017-10-18 Yao Qi <yao.qi@linaro.org>
2732 * features/tic6x-c62x-linux.c: Remove.
2734 2017-10-17 Tom Tromey <tom@tromey.com>
2736 * disasm.c (do_mixed_source_and_assembly_deprecated): Use
2737 gdb::optional, ui_out_emit_list, ui_out_emit_tuple.
2738 (do_mixed_source_and_assembly): Likewise.
2740 2017-10-17 Tom Tromey <tom@tromey.com>
2742 * regcache.c (regcache::xfer_part): Remove assertion.
2744 2017-10-17 Pedro Alves <palves@redhat.com>
2746 * xml-support.c (xml_fetch_content_from_file): Call
2747 unique_ptr::release() instead unique_ptr::get() when passing
2750 2017-10-17 Yao Qi <yao.qi@linaro.org>
2752 * regcache.c (regcache::xfer_part): Remove parameters read and
2753 write, add parameter is_raw. All callers are updated.
2755 2017-10-16 Keith Seitz <keiths@redhat.com>
2757 * c-typeprint.c (enum access_specifier): Moved here from
2759 (output_access_specifier): New function.
2760 (c_type_print_base): Consider typedefs when assessing
2761 whether access labels are needed.
2762 Use output_access_specifier as needed.
2763 Output access specifier for typedefs, if needed.
2764 * dwarf2read.c (dwarf2_add_typedef): Record DW_AT_accessibility.
2765 * gdbtypes.h (struct typedef_field) <is_protected, is_private>: New
2767 (TYPE_TYPEDEF_FIELD_PROTECTED, TYPE_TYPEDEF_FIELD_PRIVATE): New
2770 2017-10-16 Tom Tromey <tom@tromey.com>
2772 * linux-tdep.c (linux_info_proc, linux_find_memory_regions_full)
2773 (linux_fill_prpsinfo, linux_vsyscall_range_raw): Update.
2774 * target.c (target_fileio_read_stralloc): Update.
2775 * sparc64-tdep.c (adi_is_addr_mapped): Update.
2776 * target.h (target_fileio_read_stralloc): Return
2779 2017-10-16 Tom Tromey <tom@tromey.com>
2781 * xml-syscall.c (xml_init_syscalls_info): Update.
2782 * xml-support.c (xinclude_start_include): Update.
2783 (xml_fetch_content_from_file): Return unique_xmalloc_ptr.
2784 * xml-support.h (xml_fetch_another): Return unique_xmalloc_ptr.
2785 (xml_fetch_content_from_file): Likewise.
2786 * osdata.c (get_osdata): Update.
2787 * target.h (target_read_stralloc, target_get_osdata): Return
2789 * solib-aix.c (solib_aix_get_library_list): Update.
2790 * solib-target.c (solib_target_current_sos): Update.
2791 * solib-svr4.c (svr4_current_sos_via_xfer_libraries): Update.
2792 * xml-tdesc.c (fetch_available_features_from_target): Update.
2793 (target_fetch_description_xml): Update.
2794 (file_read_description_xml): Update.
2795 * remote.c (remote_get_threads_with_qxfer, remote_memory_map)
2796 (remote_traceframe_info, btrace_read_config, remote_read_btrace)
2797 (remote_pid_to_exec_file): Update.
2798 * target.c (target_read_stralloc): Return unique_xmalloc_ptr.
2799 (target_get_osdata): Likewise.
2801 2017-10-16 Tom Tromey <tom@tromey.com>
2803 * remote.c (remote_register_number_and_offset): Use std::vector.
2804 (remote_set_syscall_catchpoint): Use gdb::unique_xmalloc_ptr.
2805 (putpkt_binary): Use gdb::def_vector.
2806 (compare_sections_command): Use gdb::byte_vector.
2808 2017-10-16 Tom Tromey <tom@tromey.com>
2810 * ppc-linux-nat.c (hwdebug_insert_point): Use
2811 gdb::unique_xmalloc_ptr, XDUP.
2813 2017-10-16 Tom Tromey <tom@tromey.com>
2815 * probe.c (parse_probes): Use std::string.
2816 (info_probes_for_ops, enable_probes_command)
2817 (disable_probes_command): Remove cleanups.
2819 2017-10-16 Tom Tromey <tom@tromey.com>
2821 * buildsym.c (block_compar): Remove.
2822 (end_symtab_get_static_block): Use std::vector.
2824 2017-10-16 Simon Marchi <simon.marchi@ericsson.com>
2826 * memrange.h (struct mem_range): Define operator< and operator==.
2827 (mem_range_s): Remove.
2828 (DEF_VEC_O (mem_range_s)): Remove.
2829 (normalize_mem_ranges): Change parameter type to std::vector.
2830 * memrange.c (compare_mem_ranges): Remove.
2831 (normalize_mem_ranges): Change parameter type to std::vector,
2832 adjust to vector change.
2833 * exec.c (section_table_available_memory): Return vector, remove
2835 (section_table_read_available_memory): Adjust to std::vector
2837 * remote.c (remote_read_bytes): Adjust to std::vector
2839 * tracepoint.h (traceframe_available_memory): Change parameter
2840 type to std::vector.
2841 * tracepoint.c (traceframe_available_memory): Change parameter
2842 type to std::vector, adjust.
2843 * gdb/mi/mi-main.c (mi_cmd_trace_frame_collected): Adjust to
2845 * gdb/Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
2846 unittests/memrange-selftests.c.
2847 (SUBDIR_UNITTESTS_OBS): Add memrange-selftests.o.
2848 * gdb/unittests/memrange-selftests.c: New file.
2850 2017-10-16 Pedro Alves <palves@redhat.com>
2852 * elfread.c (probe_key_free): Rename range-for variable.
2853 * probe.c (parse_probes_in_pspace, find_probes_in_objfile)
2854 (find_probe_by_pc, collect_probes): Rename range-for variable.
2856 2017-10-16 Yao Qi <yao.qi@linaro.org>
2858 * features/Makefile (XMLTOC): Remove tic6x-*.xml.
2859 * features/tic6x-c62x.c: Remove.
2860 * features/tic6x-c64x-linux.c: Remove.
2861 * features/tic6x-c64x.c: Remove.
2862 * features/tic6x-c64xp-linux.c: Remove.
2863 * features/tic6x-c64xp.c: Remove.
2864 * tic6x-linux-tdep.c (_initialize_tic6x_linux_tdep): Don't call
2865 initialize_tdesc_tic6x_*_linux functions.
2866 * tic6x-tdep.c (_initialize_tic6x_tdep): Don't call
2867 initialize_tdesc_tic6x_* functions.
2869 2017-10-16 Yao Qi <yao.qi@linaro.org>
2871 * features/Makefile (WHICH): Remove tic6x-c64xp, tic6x-c64x
2873 * regformats/tic6x-c62x.dat: Remove.
2874 * regformats/tic6x-c64x.dat: Remove.
2875 * regformats/tic6x-c64xp.dat: Remove.
2877 2017-10-15 Simon Marchi <simon.marchi@ericsson.com>
2879 * tracepoint.c (parse_traceframe_info): Return a unique_ptr
2880 (the !HAVE_LIBEXPAT version).
2882 2017-10-14 Simon Marchi <simon.marchi@ericsson.com>
2884 * nat/linux-osdata.c (struct pid_pgid_entry) <operator<>: Make
2887 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
2889 * target.h: Include tracepoint.h.
2890 (enum trace_find_type): Move to tracepoint.h.
2891 (struct target_ops) <to_traceframe_info>: Return a unique ptr.
2892 * tracepoint.h: Don't include target.h
2893 (enum trace_find_type): Move from target.h.
2894 (parse_traceframe_info): Return a unique ptr.
2895 * tracepoint.c (current_traceframe_info): Change type to unique
2897 (free_traceframe_info): Remove.
2898 (clear_traceframe_info): Don't manually free
2899 current_traceframe_info.
2900 (free_result): Remove.
2901 (parse_traceframe_info): Return a unique ptr.
2902 (get_traceframe_info): Adjust to unique ptr.
2903 * ctf.c (ctf_traceframe_info): Return a unique ptr.
2904 * remote.c (remote_traceframe_info): Return a unique ptr.
2905 * tracefile-tfile.c (tfile_traceframe_info): Return a unique
2907 * target-debug.h (target_debug_print_traceframe_info_up): New
2909 * target-delegates.c: Regenerate.
2911 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
2913 * memrange.h (struct mem_range): Add constructors.
2914 * tracepoint.h (struct traceframe_info) <memory>: Change type to
2915 std::vector<mem_range>.
2916 * tracepoint.c (free_traceframe_info): Don't manually free
2918 (traceframe_info_start_memory): Adjust to vector change.
2919 (traceframe_available_memory): Likewise.
2920 * tracefile-tfile.c (build_traceframe_info): Likewise.
2921 * ctf.c (ctf_traceframe_info): Likewise.
2923 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
2925 * tracepoint.h (struct traceframe_info) <tvars>: Change type to
2927 * tracepoint.c (free_traceframe_info): Deallocate with delete.
2928 (traceframe_info_start_tvar): Adjust to vector change.
2929 (parse_traceframe_info): Allocate with new.
2930 * ctf.c (ctf_traceframe_info): Allocate with new, adjust to
2932 * tracefile-tfile.c (build_traceframe_info): Adjust to vector
2934 tfile_traceframe_info): Allocate with new.
2935 * mi/mi-main.c (mi_cmd_trace_frame_collected): Adjust to vector
2938 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
2940 * tracepoint.c (traceframe_info): Rename to...
2941 (current_traceframe_info): ...this.
2942 (clear_traceframe_info): Adjust.
2943 (get_traceframe_info): Adjust.
2945 2017-10-14 Simon Marchi <simon.marchi@ericsson.com>
2947 * nat/linux-osdata.c: Include algorithm.
2948 (compare_processes): Remove.
2949 (struct pid_pgid_entry): New struct.
2950 (linux_xfer_osdata_processgroups): Use std::vector instead of
2953 2017-10-14 Simon Marchi <simon.marchi@ericsson.com>
2955 * objfiles.h: Don't include symfile.h.
2956 (struct partial_symbol): Remove forward-declaration.
2957 (struct objfile) <global_psymbols, static_psymbols>: Change type
2958 to std::vector<partial_symbol *>.
2959 * objfiles.c (objfile::objfile): Don't memset those fields.
2960 (objfile::~objfile): Don't free those fields.
2961 * psympriv.h (struct psymbol_allocation_list): Remove
2962 forward-declaration.
2963 (add_psymbol_to_list): Change psymbol_allocation_list parameter
2965 (start_psymtab_common): Change parameters to std::vector.
2966 * psymtab.c: Include algorithm.
2967 (require_partial_symbols): Call shrink_to_fit.
2968 (find_pc_sect_psymbol): Adjust to vector change.
2969 (match_partial_symbol): Likewise.
2970 (lookup_partial_symbol): Likewise.
2971 (psym_relocate): Likewise.
2972 (dump_psymtab): Likewise.
2973 (recursively_search_psymtabs): Likewise.
2974 (compare_psymbols): Remove.
2975 (sort_pst_symbols): Adjust to vector change.
2976 (start_psymtab_common): Likewise.
2977 (end_psymtab_common): Likewise.
2978 (psymbol_bcache_full): De-constify return value.
2979 (add_psymbol_to_bcache): Likewise.
2980 (extend_psymbol_list): Remove.
2981 (append_psymbol_to_list): Adjust to vector change.
2982 (add_psymbol_to_list): Likewise.
2983 (init_psymbol_list): Likewise.
2984 (maintenance_info_psymtabs): Likewise.
2985 (maintenance_check_psymtabs): Likewise.
2986 * symfile.h (struct psymbol_allocation_list): Remove.
2987 * symfile.c (reread_symbols): Adjust to vector change.
2988 * dbxread.c (start_psymtab): Change type of parameters.
2989 (dbx_symfile_read): Adjust to vector change.
2990 (read_dbx_symtab): Likewise.
2991 (start_psymtab): Change type of parameters.
2992 * dwarf2read.c (dwarf2_build_psymtabs): Adjust to vector change.
2993 (create_partial_symtab): Likewise.
2994 (add_partial_symbol): Likewise.
2995 (write_one_signatured_type): Likewise.
2996 (recursively_write_psymbols): Likewise.
2997 * mdebugread.c (parse_partial_symbols): Likewise.
2998 * xcoffread.c (xcoff_start_psymtab): Change type of parameters.
2999 (scan_xcoff_symtab): Adjust to vector change.
3000 (xcoff_initial_scan): Likewise.
3002 2017-10-13 Simon Marchi <simon.marchi@ericsson.com>
3004 * ada-typeprint.c (print_dynamic_range_bound): Use std::string.
3006 2017-10-13 Yao Qi <yao.qi@linaro.org>
3008 * features/Makefile: Remove tic6x-*-expedite, add tic6x-expedite.
3009 Remove s390x-*-expedite, add s390x-expedite.
3011 2017-10-13 Yao Qi <yao.qi@linaro.org>
3013 * features/s390-gs-linux64.c: Regenerated.
3014 * features/s390x-gs-linux64.c: Regenerated.
3016 2017-10-13 Tom Tromey <tom@tromey.com>
3018 * compile/compile-object-run.c (do_module_cleanup): Use delete.
3019 * solib.c (update_solib_list, reload_shared_libraries_1): Use
3021 * symfile.c (symbol_file_add_with_addrs): Use new.
3022 (symbol_file_add_separate): Update comment.
3023 (syms_from_objfile_1, remove_symbol_file_command): Use delete.
3024 * jit.c (jit_object_close_impl): Use new.
3025 (jit_unregister_code): Use delete.
3026 * objfiles.c (objfile::objfile): Rename from allocate_objfile.
3027 (~objfile): Rename from free_objfile.
3028 (free_objfile_separate_debug, do_free_objfile_cleanup)
3029 (free_all_objfiles, objfile_purge_solibs): Use delete.
3030 * objfiles.h (struct objfile): Add constructor and destructor.
3031 Use DISABLE_COPY_AND_ASSIGN. Add initializers to data members.
3032 (allocate_objfile, free_objfile): Don't declare.
3033 (struct objstats): Add initializers.
3035 2017-10-12 Simon Marchi <simon.marchi@ericsson.com>
3037 * arch-utils.h (simple_displaced_step_copy_insn): Remove.
3038 * arch-utils.c (simple_displaced_step_copy_insn): Remove.
3039 * gdbarch.sh (displaced_step_copy_insn): Adjust comment.
3040 * gdbarch.h: Regenerate.
3041 * i386-linux-tdep.c (i386_linux_displaced_step_copy_insn):
3043 * i386-tdep.c (i386_displaced_step_copy_insn): Adjust comment.
3044 (i386_displaced_step_fixup): Adjust comment.
3045 * rs6000-tdep.c (ppc_displaced_step_copy_insn): Adjust comment.
3047 2017-10-12 Tom Tromey <tom@tromey.com>
3049 * prologue-value.h (pv_area::store_would_trash): Return bool.
3050 (pv_area::find_reg): Likewise.
3051 * prologue-value.c (pv_area::store_would_trash): Return bool.
3052 (pv_area::find_reg): Likewise.
3054 2017-10-12 Tom Tromey <tom@tromey.com>
3056 * s390-linux-tdep.c (s390_store, s390_load)
3057 (s390_check_for_saved, s390_analyze_prologue): Update.
3058 * rx-tdep.c (check_for_saved, rx_analyze_prologue): Update.
3059 * rl78-tdep.c (rl78_analyze_prologue, check_for_saved): Update.
3060 * prologue-value.h (class pv_area): Move from prologue-value.c.
3061 Change names of members. Add constructor, destructor, member
3063 (make_pv_area, free_pv_area, make_cleanup_free_pv_area)
3064 (pv_area_store, pv_area_fetch, pv_area_store_would_trash)
3065 (pv_area_fetch, pv_area_scan): Don't declare.
3066 * prologue-value.c (struct pv_area::area_entry): Now member of
3068 (struct pv_area): Move to prologue-value.h.
3069 (pv_area::pv_area): Rename from make_pv_area.
3070 (pv_area::~pv_area): Rename from free_pv_area.
3071 (do_free_pv_area_cleanup, make_cleanup_free_pv_area): Remove.
3072 (clear_entries, find_entry, overlaps, store_would_trash, store)
3073 (fetch, find_reg, scan): Now member of pv_area.
3074 Remove "area" argument. Update.
3075 * msp430-tdep.c (check_for_saved, msp430_analyze_prologue):
3077 * mn10300-tdep.c (push_reg, check_for_saved)
3078 (mn10300_analyze_prologue): Update.
3079 * mep-tdep.c (is_arg_spill, check_for_saved)
3080 (mep_analyze_prologue): Update.
3081 * m32c-tdep.c (m32c_pv_push, m32c_srcdest_fetch)
3082 (m32c_srcdest_store, m32c_pv_enter, m32c_is_arg_spill)
3083 (m32c_is_struct_return, m32c_analyze_prologue): Update.
3084 * arm-tdep.c (thumb_analyze_prologue, arm_analyze_prologue):
3086 * arc-tdep.c (arc_is_in_prologue, arc_analyze_prologue): Update.
3087 * aarch64-tdep.c (aarch64_analyze_prologue): Update.
3089 2017-10-12 Simon Marchi <simon.marchi@ericsson.com>
3091 * linux-nat.h (linux_nat_set_delete_thread): New declaration.
3092 * linux-nat.c (linux_nat_delete_thread): New variable.
3093 (lwp_free): Invoke linux_nat_delete_thread if set.
3094 (linux_nat_set_delete_thread): New function.
3095 * aarch64-linux-nat.c (_initialize_aarch64_linux_nat): Assign
3096 thread delete callback.
3097 * arm-linux-nat.c (arm_linux_delete_thread): New function.
3098 (_initialize_arm_linux_nat): Assign thread delete callback.
3099 * s390-linux-nat.c (s390_delete_thread): New function.
3100 (_initialize_s390_nat): Assign thread delete callback.
3101 * x86-linux-nat.c (x86_linux_add_target): Likewise.
3102 * nat/aarch64-linux.c (aarch64_linux_delete_thread): New
3104 * nat/aarch64-linux.h (aarch64_linux_delete_thread): New
3106 * nat/x86-linux.c (x86_linux_delete_thread): New function.
3107 * nat/x86-linux.h (x86_linux_delete_thread): New declaration.
3109 2017-10-09 Tom Tromey <tom@tromey.com>
3111 * tui/tui-win.c (tui_set_win_height, parse_scrolling_args): Use
3113 * tui/tui-layout.c (enum tui_status): Use std::string.
3115 2017-10-11 Tom Tromey <tom@tromey.com>
3117 * gdbthread.h (thread_command): Constify.
3118 * inferior.h (detach_command): Constify.
3119 * top.h (set_history, show_history): Constify.
3120 * arm-tdep.c (set_arm_command, show_arm_command): Constify.
3121 * serial.c (serial_set_cmd, serial_show_cmd): Constify.
3122 * bsd-kvm.c (bsd_kvm_cmd): Constify.
3123 * printcmd.c (set_command): Constify.
3124 (non_const_set_command): New function.
3125 * dcache.c (set_dcache_command, show_dcache_command): Constify.
3126 * breakpoint.c (enable_command, disable_command, delete_command)
3127 (catch_command, tcatch_command, set_breakpoint_cmd)
3128 (show_breakpoint_cmd): Constify.
3129 * macrocmd.c (macro_command): Constify.
3130 * infcmd.c (unset_command, kill_command, detach_command)
3131 (info_proc_cmd): Constify.
3132 * i386-tdep.c (set_mpx_cmd, show_mpx_cmd): Constify.
3133 * auto-load.c (show_auto_load_cmd, set_auto_load_cmd)
3134 (info_auto_load_cmd): Constify.
3135 * target-descriptions.c (set_tdesc_cmd, show_tdesc_cmd)
3136 (unset_tdesc_cmd): Constify.
3137 * ada-lang.c (set_ada_command, show_ada_command)
3138 (maint_set_ada_cmd, maint_show_ada_cmd): Constify.
3139 * guile/guile.c (set_guile_command, show_guile_command)
3140 (info_guile_command): Constify.
3141 * tui/tui-win.c (tui_command, set_tui_cmd, show_tui_cmd):
3143 * skip.c (skip_command): Constify.
3144 * compile/compile.c (_initialize_compile): Constify.
3145 * dwarf2read.c (set_dwarf_cmd, show_dwarf_cmd): Constify.
3146 * btrace.c (maint_btrace_cmd, maint_btrace_set_cmd)
3147 (maint_btrace_show_cmd, maint_btrace_pt_set_cmd)
3148 (maint_btrace_pt_show_cmd): Constify.
3149 * remote.c (set_remote_cmd, show_remote_cmd, remote_command):
3151 * python/python.c (user_show_python, user_set_python): Constify.
3152 * mips-tdep.c (set_mips_command, show_mips_command)
3153 (set_mipsfpu_command): Constify.
3154 * record-btrace.c (cmd_record_btrace_start)
3155 (cmd_set_record_btrace, cmd_show_record_btrace)
3156 (cmd_set_record_btrace_bts, cmd_show_record_btrace_bts)
3157 (cmd_set_record_btrace_pt, cmd_show_record_btrace_pt): Constify.
3158 * rs6000-tdep.c (set_powerpc_command, show_powerpc_command):
3160 * symfile.c (overlay_command): Constify.
3161 * spu-tdep.c (set_spu_command, show_spu_command): Constify.
3162 * cli/cli-logging.c (set_logging_command, show_logging_command):
3164 * cli/cli-dump.c (dump_command, append_command)
3165 (srec_dump_command, ihex_dump_command, verilog_dump_command)
3166 (tekhex_dump_command, binary_dump_command)
3167 (binary_append_command): Constify.
3168 * cli/cli-decode.c (struct cmd_list_element): Change type of
3170 * cli/cli-cmds.c (info_command, show_command, set_debug)
3171 (show_debug): Constify.
3172 (show_command): Add non-const overload.
3173 * top.c (set_history, show_history): Constify.
3174 * sh-tdep.c (set_sh_command, show_sh_command): Constify.
3175 * command.h (add_prefix_cmd): Accept a cmd_const_cfunc_ftype.
3176 * target.c (target_command): Constify.
3177 * sparc64-tdep.c (info_adi_command): Constify.
3178 * record-full.c (cmd_record_full_start): Constify.
3179 (set_record_full_command): Constify. Fix typo.
3180 (show_record_full_command): Constify.
3181 * thread.c (thread_command, thread_apply_command): Constify.
3182 * memattr.c (dummy_cmd): Constify.
3183 * value.c (function_command): Constify.
3184 * frame.c (set_backtrace_cmd, show_backtrace_cmd): Constify.
3185 * probe.c (info_probes_command): Constify.
3186 * ser-tcp.c (set_tcp_cmd, show_tcp_cmd): Constify.
3187 * gnu-nat.c (set_task_cmd, show_task_cmd, set_thread_cmd)
3188 (show_thread_cmd, set_thread_default_cmd)
3189 (show_thread_default_cmd): Constify.
3190 (check_empty): Constify.
3191 * tracepoint.c (tfind_command): Constify.
3192 * cp-support.c (maint_cplus_command): Constify.
3193 * windows-tdep.c (info_w32_command): Constify.
3194 * record.c (cmd_record_start, set_record_command)
3195 (show_record_command, info_record_command, cmd_record_goto):
3197 * ravenscar-thread.c (set_ravenscar_command)
3198 (show_ravenscar_command): Constify.
3199 * utils.c (set_internal_problem_cmd, show_internal_problem_cmd):
3201 (add_internal_problem_command): Remove casts.
3202 * arc-tdep.c (maintenance_print_arc_command): Constify.
3203 * valprint.c (set_print, show_print, set_print_raw)
3204 (show_print_raw): Constify.
3205 * maint.c (maintenance_command, maintenance_info_command)
3206 (maintenance_print_command, maintenance_set_cmd)
3207 (maintenance_show_cmd, set_per_command_cmd)
3208 (show_per_command_cmd, maintenance_check_command): Constify.
3209 * language.c (set_check, show_check): Constify.
3210 * typeprint.c (show_print_type, set_print_type): Constify.
3211 * go32-nat.c (go32_info_dos_command): Constify.
3213 2017-10-11 Tom Tromey <tom@tromey.com>
3215 * breakpoint.c (prepare_re_set_context): Remove.
3216 (breakpoint_re_set_one): Update. Don't use cleanups.
3217 (breakpoint_re_set): Use scoped_restore, std::string, and
3218 scoped_restore_current_language.
3220 2017-10-11 Tom Tromey <tom@tromey.com>
3222 * breakpoint.c (commands_command_1): Use std::string.
3223 (cleanup_executing_breakpoints): Remove.
3224 (bpstat_do_actions_1): Use scoped_restore.
3225 (bpstat_check_watchpoint): Use std::string.
3226 (decode_static_tracepoint_spec): Likewise.
3227 (break_range_command): Likewise.
3228 (watch_command_1): Likewise.
3229 (compare_breakpoints): Change argument types.
3230 (clear_command): Use std::vector.
3231 (cleanup_executing_breakpoints): Remove.
3232 (update_global_location_list): Use unique_xmalloc_ptr.
3233 (strace_command): Remove unused declaration.
3235 2017-10-11 John Baldwin <jhb@FreeBSD.org>
3237 * Makefile.in (ALLDEPFILES): Add arm-fbsd-nat.c.
3238 * NEWS: Mention new FreeBSD/arm native configuration.
3239 * configure.host: Add arm*-*-freebsd*.
3240 * configure.nat: Likewise.
3241 * arm-fbsd-nat.c: New file.
3243 2017-10-11 John Baldwin <jhb@FreeBSD.org>
3245 * Makefile.in (ALL_TARGET_OBS): Add arm-fbsd-tdep.o.
3246 (ALLDEPFILES): Add arm-fbsd-tdep.c.
3247 * NEWS: Mention new FreeBSD/arm target.
3248 * configure.tgt: Add arm*-*-freebsd*.
3249 * arm-fbsd-tdep.c: New file.
3250 * arm-fbsd-tdep.h: New file.
3252 2017-10-11 Maciej W. Rozycki <macro@imgtec.com>
3254 * linux-tdep.c (linux_make_corefile_notes): Remove call to
3255 `gdbarch_elfcore_write_linux_prpsinfo'.
3256 * gdbarch.sh (elfcore_write_linux_prpsinfo): Remove architecture
3258 (elf_internal_linux_prpsinfo): Remove declaration.
3259 * gdbarch.h: Regenerate.
3260 * gdbarch.c: Regenerate.
3262 2017-10-11 Maciej W. Rozycki <macro@imgtec.com>
3264 * ppc-linux-tdep.c (ppc_linux_init_abi): Remove call to
3265 `set_gdbarch_elfcore_write_linux_prpsinfo'.
3267 2017-10-11 Pedro Alves <palves@redhat.com>
3269 * breakpoint.c (reattach_breakpoints): Delete.
3270 * breakpoint.h (reattach_breakpoints): Delete.
3272 2017-10-11 Simon Marchi <simon.marchi@ericsson.com>
3274 * symfile.c (registered_sym_fns): Make struct, not typedef.
3275 (DEF_VEC_O (registered_sym_fns)): Remove.
3276 (symtab_fns): Change type to std::vector.
3277 (add_symtab_fns): Adjust.
3278 (find_sym_fns): Adjust.
3280 2017-10-11 Anton Kolesov <Anton.Kolesov@synopsys.com>
3282 * arc-tdep.c (arc_gdbarch_init): Pass proper cpu value to disassembler.
3283 * arc-tdep.h (arc_arch_is_em): New function.
3284 (arc_arch_is_hs): Likewise.
3286 2017-10-11 Egeyar Bagcioglu <egeyar.bagcioglu@oracle.com>
3288 * macrotab.h (macro_lookup_inclusion): Remove unnecessary
3289 parentheses in the declaration.
3290 (macro_lookup_inclusion): Likewise.
3291 (macro_lookup_definition): Likewise.
3292 * p-lang.h (pascal_builtin_types): Likewise.
3293 * tui/tui-data.c (tui_win_list): Likewise.
3294 * tui/tui-data.h (tui_win_list): Likewise.
3295 * utils.h (make_cleanup_free_section_addr_info): Likewise.
3297 2017-10-11 Mark Rages <markrages@gmail.com>
3299 * target-memory.c (block_boundaries): Fix for block address not
3300 aligned on block size.
3302 2017-10-10 Pedro Alves <palves@redhat.com>
3303 Tom Tromey <tom@tromey.com>
3305 * breakpoint.c (struct captured_breakpoint_query_args)
3306 (do_captured_breakpoint_query, gdb_breakpoint_query): Delete.
3307 (print_breakpoint): New.
3308 * breakpoint.h (print_breakpoint): Declare.
3309 * common/common-exceptions.h (enum return_reason): Remove
3310 references to catch_exceptions.
3311 * exceptions.c (catch_exceptions, catch_exceptions_with_msg):
3313 * exceptions.h (catch_exceptions_ftype, catch_exceptions)
3314 (catch_exception_ftype, catch_exceptions_with_msg): Delete.
3316 * gdbthread.h (thread_select): Declare.
3317 * mi/mi-cmd-break.c: Don't include gdb.h.
3318 (breakpoint_notify): Use print_breakpoint.
3319 * mi/mi-cmd-catch.c: Don't include gdb.h.
3320 * mi/mi-interp.c: Don't include gdb.h.
3321 (mi_print_breakpoint_for_event): New.
3322 (mi_breakpoint_created, mi_breakpoint_modified): Use
3323 mi_print_breakpoint_for_event.
3324 * mi/mi-main.c: Don't include gdb.h.
3325 (mi_cmd_thread_select): Parse the global thread ID here. Use
3326 thread_select instead of gdb_thread_select.
3327 (mi_cmd_thread_list_ids): Output "thread-ids" tuple here instead
3328 of using gdb_list_thread_ids.
3329 * remote-fileio.c (do_remote_fileio_request): Change type. Reply
3331 (remote_fileio_request): Use TRY/CATCH instead of
3333 * symfile-mem.c (struct symbol_file_add_from_memory_args)
3334 (symbol_file_add_from_memory_wrapper): Delete.
3335 (add_vsyscall_page): Use TRY/CATCH instead of catch_exceptions.
3336 * thread.c: Don't include gdb.h.
3337 (do_captured_list_thread_ids, gdb_list_thread_ids): Delete.
3338 (thread_alive): Use thread_select.
3339 (do_captured_thread_select): Delete, parts salvaged as ...
3340 (thread_select): ... this new function.
3341 (gdb_thread_select): Delete.
3343 2017-10-10 Pedro Alves <palves@redhat.com>
3344 Tom Tromey <tom@tromey.com>
3346 * breakpoint.c (breakpoint_cond_eval): Change return type to bool
3348 (WP_DELETED, WP_VALUE_CHANGED, WP_VALUE_NOT_CHANGED, WP_IGNORE):
3349 No longer macros. Instead ...
3350 (enum wp_check_result): They're now values of this new
3352 (watchpoint_check): Change return type to wp_check_result and
3353 parameter type to bpstat.
3354 (bpstat_check_watchpoint): Use TRY/CATCH instead of catch_errors.
3355 (bpstat_check_breakpoint_conditions): Use TRY/CATCH instead of
3356 catch_errors. Reverse logic of watchpoint_check call.
3357 (breakpoint_re_set_one): Now returns void and takes a breakpoint
3358 pointer as parameter.
3359 (breakpoint_re_set): Use TRY/CATCH instead of catch_errors.
3360 * common/common-exceptions.c (throw_exception_sjlj): Update
3361 comments to avoid mentioning catch_errors.
3362 * exceptions.c (catch_errors): Delete.
3363 * exceptions.h: Update comments to avoid mentioning catch_errors.
3364 (catch_errors_ftype, catch_errors): Delete.
3365 * infrun.c (normal_stop): Use TRY/CATCH instead of catch_errors.
3366 (hook_stop_stub): Delete.
3367 (restore_selected_frame): Change return type to void, and
3368 parameter type to const frame_id &.
3369 (restore_infcall_control_state): Use TRY/CATCH instead of
3371 * main.c (captured_command_loop): Return void and remove
3372 parameter. Remove references to catch_errors.
3373 (captured_main): Use TRY/CATCH instead of catch_errors.
3374 * objc-lang.c (objc_submethod_helper_data)
3375 (find_objc_msgcall_submethod_helper): Delete.
3376 (find_objc_msgcall_submethod): Use TRY/CATCH instead of
3378 * record-full.c (record_full_message): Return void.
3379 (record_full_message_args, record_full_message_wrapper): Delete.
3380 (record_full_message_wrapper_safe): Return bool and use TRY/CATCH
3381 instead of catch_errors.
3382 * solib-aix.c (solib_aix_open_symbol_file_object): Change
3383 parameter type to int.
3384 * solib-darwin.c (open_symbol_file_object): Ditto.
3385 * solib-dsbt.c (open_symbol_file_object): Ditto.
3386 * solib-frv.c (open_symbol_file_object): Ditto.
3387 * solib-svr4.c (open_symbol_file_object): Ditto.
3388 * solib-target.c (solib_target_open_symbol_file_object): Ditto.
3389 * solib.c (update_solib_list): Use TRY/CATCH instead of
3391 * solist.h (struct target_so_ops) <open_symbol_file_object>:
3393 * symmisc.c (struct print_symbol_args): Remove.
3394 (dump_symtab_1): Use TRY/CATCH instead of catch_errors.
3395 (print_symbol): Change type.
3396 * windows-nat.c (handle_load_dll, handle_unload_dll): Return void
3397 and remove parameters.
3398 (catch_errors): New.
3399 (get_windows_debug_event): Adjust.
3401 2017-10-09 Tom Tromey <tom@tromey.com>
3403 * mi/mi-main.c (free_splay_tree): Remove.
3404 (list_available_thread_groups): Use splay_tree_up.
3405 * common/gdb_splay_tree.h: New file.
3407 2017-10-09 Tom Tromey <tom@tromey.com>
3409 * mi/mi-main.c (do_nothing): Remove.
3410 (list_available_thread_groups): Update.
3412 2017-10-09 Pedro Alves <palves@redhat.com>
3414 * infrun.c (handle_inferior_event_1) <TARGET_WAITKIND_EXECD>: Skip
3415 reading registers when switching context.
3417 2017-10-09 John Baldwin <jhb@FreeBSD.org>
3419 * fbsd-nat.c (fbsd_siginfo_size): Use gdbarch_long_bit.
3420 (fbsd_convert_siginfo): Likewise.
3421 * fbsd-tdep.c (fbsd_core_xfer_siginfo): Likewise.
3423 2017-10-09 Simon Marchi <simon.marchi@polymtl.ca>
3425 * configure.ac (try_guile_versions): Remove guile-2.2.
3426 * configure: Regenerate.
3428 2017-10-09 Tom Tromey <tom@tromey.com>
3430 * Makefile.in (COMPILE.post, POSTCOMPILE): Restore $(basename).
3431 (COMPILE.pre): Use $(CXX).
3433 2017-10-09 Pedro Alves <palves@redhat.com>
3435 * cp-support.c (cp_remove_params): Return a gdb::unique_xmalloc_ptr.
3437 (overload_list_add_symbol): Adjust to use gdb::unique_xmalloc_ptr.
3438 * cp-support.h (cp_remove_params): Now returns a
3439 gdb::unique_xmalloc_ptr.
3440 * dwarf2read.c (find_slot_in_mapped_hash): Now returns bool.
3441 Adjust to cp_remove_params returning a gdb::unique_xmalloc_ptr.
3442 * psymtab.c (psymtab_search_name): Adjust to cp_remove_params
3443 returning a gdb::unique_xmalloc_ptr.
3444 (lookup_partial_symbol): Adjust to use gdb::unique_xmalloc_ptr.
3445 * stack.c (find_frame_funname): Adjust to cp_remove_params
3446 returning a gdb::unique_xmalloc_ptr.
3448 2017-10-08 Tom Tromey <tom@tromey.com>
3450 * dwarf2read.c (dwarf2_get_dwz_file): Use
3451 gdb::unique_xmalloc_ptr.
3452 (find_slot_in_mapped_hash): Likewise.
3453 (dwarf2_physname): Likewise.
3454 (create_dwo_unit_in_dwp_v1): Use std::string.
3455 (create_dwo_unit_in_dwp_v2): Likewise.
3456 (lookup_dwo_cutu): Likewise.
3457 (inherit_abstract_dies): Use std::vector.
3458 (read_array_type): Likewise.
3459 (dwarf_decode_macros): Remove unused declaration.
3460 (unsigned_int_compar): Remove.
3461 (dwarf2_build_psymtabs_hard): Use scoped_restore.
3462 (psymtabs_addrmap_cleanup): Remove.
3464 2017-10-08 Tom Tromey <tom@tromey.com>
3466 * frame-unwind.c (frame_unwind_try_unwinder): Update.
3467 * frame.h (frame_cleanup_after_sniffer): Declare.
3468 (frame_prepare_for_sniffer): Return void.
3469 * frame.c (frame_cleanup_after_sniffer): No longer static. Change
3471 (frame_prepare_for_sniffer): Return void.
3473 2017-10-08 Tom Tromey <tom@tromey.com>
3475 * utils.h (make_cleanup_value_free): Remove.
3476 * utils.c (do_value_free, struct cleanup): Remove.
3477 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full) <DWARF_VALUE_STACK>:
3479 * value.h (struct value_deleter): New.
3480 (gdb_value_up): New typedef.
3482 2017-10-08 Tom Tromey <tom@tromey.com>
3484 * symtab.c (free_search_symbols, do_free_search_symbols_cleanup)
3485 (make_cleanup_free_search_symbols): Remove.
3486 (search_symbols): Return std::vector.
3487 (symbol_search::compare_search_syms): Now member of
3488 symbol_search. Change arguments.
3489 (sort_search_symbols_remove_dups): Change arguments. Rewrite.
3490 (symtab_symbol_info, rbreak_command): Update.
3491 * symtab.h (struct symbol_search) <next>: Remove.
3493 (symbol_search::operator<): New function.
3494 (symbol_search::operator==): New function.
3495 (search_symbols): Remove std::vector.
3496 (free_search_symbols, make_cleanup_free_search_symbols): Remove.
3497 (symbol_search::compare_search_syms): Declare.
3499 2017-10-06 Yao Qi <yao.qi@linaro.org>
3501 * Makefile.in (ALL_64_TARGET_OBS): Replace aarch64-insn.o with
3502 arch/aarch64-insn.o.
3504 * configure.tgt: Replace aarch64-insn.o with arch/aarch64-insn.o.
3506 2017-10-06 Yao Qi <yao.qi@linaro.org>
3508 * Makefile.in (ALL_TARGET_OBS): Replace arm.o, arm-get-next-pcs.o,
3509 and arm-linux.o with arch/arm.o, arch/arm-get-next-pcs.o and
3510 arch/arm-linux.o respectively.
3511 * configure.tgt: Likewise.
3513 2017-10-06 Yao Qi <yao.qi@linaro.org>
3515 * Makefile.in (ALL_TARGET_OBS): Rename i386.o to arch/i386.o.
3516 * configure.tgt (i386_tobjs): Replace i386.o with arch/i386.o.
3518 2017-10-06 Pedro Alves <palves@redhat.com>
3520 * windows-nat.c: Include <algorithm>.
3522 2017-10-06 Yao Qi <yao.qi@linaro.org>
3524 * configure.tgt (i386_tobjs): New variable.
3525 (amd64_tobjs): New variable.
3526 Set $cpu_obs and $os_obs.
3528 2017-10-06 Yao Qi <yao.qi@linaro.org>
3530 * Makefile.in (CONFIG_SRC_SUBDIR): New.
3531 (ALL_64_TARGET_OBS): Replace amd64.o with arch/amd64.o.
3532 (clean): Remove object files and dependency files.
3533 (distclean): Remove the directory.
3534 * configure.ac: Invoke AC_CONFIG_COMMANDS.
3535 * configure: Re-generated.
3536 * configure.tgt: Replace amd64.o with arch/amd64.o.
3538 2017-10-05 Jose E. Marchesi <jose.marchesi@oracle.com>
3541 * arm-tdep.c (arm_decode_misc_memhint_neon): Fix decoding of CPS
3544 2017-10-05 Pedro Alves <palves@redhat.com>
3546 * linux-nat.c (linux_child_follow_fork): When following the parent
3547 and detaching the child, consult the parent thread's architecture
3548 instead of the child's.
3550 2017-10-05 Ulrich Weigand <uweigand@de.ibm.com>
3552 * ax.h: Do not include "doublest.h".
3553 (union agent_val): Remove.
3555 2017-10-05 Ulrich Weigand <uweigand@de.ibm.com>
3557 * dfp.h (MAX_DECIMAL_STRING): Move to dfp.c.
3558 (decimal_to_string): Return std::string object.
3559 (decimal_from_string): Accept std::string object. Return bool.
3560 (decimal_from_integral, decimal_from_doublest): Remove.
3561 (decimal_from_longest): Add prototype.
3562 (decimal_from_ulongest): Likewise.
3563 (decimal_to_longest): Likewise.
3564 (decimal_from_doublest): Likewise.
3565 * dfp.c: Do not include "gdbtypes.h" or "value.h".
3566 (MAX_DECIMAL_STRING): Move here.
3567 (decimal_to_string): Return std::string object.
3568 (decimal_from_string): Accept std::string object. Return bool.
3569 (decimal_from_integral): Remove, replace by ...
3570 (decimal_from_longest, decimal_from_ulongest): ... these new functions.
3571 (decimal_to_longest): New function.
3572 (decimal_from_floating): Remove, replace by ...
3573 (decimal_from_doublest): ... this new function.
3574 (decimal_to_doublest): Update to new decimal_to_string interface.
3576 * value.c (unpack_long): Use decimal_to_longest.
3577 * valops.c (value_cast): Use decimal_from_doublest instead of
3578 decimal_from_floating. Use decimal_from_[u]longest isntead of
3579 decimal_from_integral.
3580 * valarith.c (value_args_as_decimal): Likewise.
3581 * valprint.c (print_decimal_floating): Update to new
3582 decimal_to_string interface.
3583 * printcmd.c (printf_decfloat): Likewise.
3584 * c-exp.y (parse_number): Update to new decimal_from_string interface.
3586 2017-10-05 Ulrich Weigand <uweigand@de.ibm.com>
3588 * doublest.h: Do not include "floatformat.h". Remove stale comments.
3589 * gdbtypes.c: Include "floatformat.h".
3590 * value.c: Likewise.
3591 * m68k-tdep.c: Likewise.
3593 * findvar.c: Do not include "floatformat.h".
3594 * amd64-darwin-tdep.c: Likewise.
3595 * arm-linux-tdep.c: Likewise.
3596 * i386-darwin-tdep.c: Likewise.
3597 * i387-tdep.c: Likewise.
3598 * m68k-linux-tdep.c: Likewise.
3599 * mep-tdep.c: Likewise.
3600 * mips-tdep.c: Likewise.
3601 * nios2-tdep.c: Likewise.
3602 * s390-linux-tdep.c: Likewise.
3603 * sparc-obsd-tdep.c: Likewise.
3604 * sparc-tdep.c: Likewise.
3605 * sparc64-tdep.c: Likewise.
3606 * spu-tdep.c: Likewise.
3607 * tic6x-tdep.c: Likewise.
3608 * tilegx-tdep.c: Likewise.
3609 * vax-tdep.c: Likewise.
3610 * xstormy16-tdep.c: Likewise.
3611 * xtensa-tdep.c: Likewise.
3613 * top.c: Do not include "doublest.h".
3614 * aarch64-tdep.c: Likewise.
3615 * alpha-tdep.c: Likewise.
3616 * arm-linux-tdep.c: Likewise.
3617 * m68k-linux-tdep.c: Likewise.
3618 * tilegx-tdep.c: Likewise.
3619 * xstormy16-tdep.c: Likewise.
3621 2017-10-05 John Baldwin <jhb@FreeBSD.org>
3623 * mips-fbsd-tdep.c (MIPS_INST_ADDIU_A0_SP_N32): Define.
3624 (mipsn32_fbsd_sigframe): Define.
3625 (mips_fbsd_init_abi): Install mipsn32_fbsd_sigframe unwinder
3626 for FreeBSD/mipsn32.
3628 2017-10-05 John Baldwin <jhb@FreeBSD.org>
3630 * fbsd-tdep.c (fbsd_print_auxv_entry): Handle AT_EHDRFLAGS and
3633 2017-10-05 Tristan Gingold <tgingold@free.fr>
3635 * MAINTAINERS (Misc): Update my email address.
3637 2017-10-04 Pedro Alves <palves@redhat.com>
3639 * remote.c (get_remote_arch_state): New 'gdbarch' parameter. Use
3640 it instead of target_gdbarch.
3641 (get_remote_state, get_remote_packet_size): Adjust
3642 get_remote_arch_state calls, passing down target_gdbarch
3644 (packet_reg_from_regnum, packet_reg_from_pnum): New parameter
3645 'gdbarch' and use it instead of target_gdbarch.
3646 (get_memory_packet_size): Adjust get_remote_arch_state calls,
3647 passing down target_gdbarch explicitly.
3648 (struct stop_reply) <arch>: New field.
3649 (remote_parse_stop_reply): Use the stopped thread's architecture,
3650 not the current inferior's. Save the architecture in the
3652 (process_stop_reply): Use the stop reply's architecture.
3653 (process_g_packet, remote_fetch_registers)
3654 (remote_prepare_to_store, store_registers_using_G)
3655 (remote_store_registers): Adjust get_remote_arch_state calls,
3656 using the regcache's architecture.
3657 (remote_get_trace_status): Adjust get_remote_arch_state calls,
3658 passing down target_gdbarch explicitly.
3659 * spu-multiarch.c (spu_thread_architecture): Defer to the target
3660 beneath instead of calling target_gdbarch.
3661 * target.c (default_thread_architecture): Use the specified
3662 inferior's architecture, instead of the current inferior's
3663 architecture (via target_gdbarch).
3665 2017-10-04 Pedro Alves <palves@redhat.com>
3667 * regcache.c (get_thread_arch_regcache): Remove null_ptid special
3669 (regcache_print): Handle !target_has_registers here instead.
3671 2017-10-04 Pedro Alves <palves@redhat.com>
3673 * frame.c (create_test_frame): Delete.
3674 * frame.h (create_test_frame): Delete.
3675 * gdbarch-selftests.c: Include gdbthread.h and target.h.
3676 (class regcache_test): Delete.
3677 (test_target_has_registers, test_target_has_stack)
3678 (test_target_has_memory, test_target_prepare_to_store)
3679 (test_target_store_registers): New functions.
3680 (test_target_ops): New class.
3681 (register_to_value_test): Error out if there's already a
3682 process_stratum (or higher) target pushed. Create a fuller mock
3683 environment, with mock target_ops, inferior, address space, thread
3685 * progspace.c (struct address_space): Move to ...
3686 * progspace.h (struct address_space): ... here.
3687 * regcache.h (regcache::~regcache, regcache::raw_write)
3688 [GDB_SELF_TEST]: No longer virtual.
3690 2017-10-04 Simon Marchi <simon.marchi@ericsson.com>
3692 * mi/mi-main.c (list_available_thread_groups): Reverse filter logic.
3694 2017-10-04 Pedro Alves <palves@redhat.com>
3696 * guile/scm-breakpoint.c (gdbscm_breakpoint_commands): Move code
3697 out of 'between TRY and CATCH'.
3699 2017-10-04 Pedro Alves <palves@redhat.com>
3701 * cli/cli-cmds.c (complete_command): Add missing END_CATCH.
3702 * common/common-exceptions.h (TRY): Open an outermost scope.
3703 Expand intro comment.
3705 (END_CATCH): Close the outermost scope.
3706 * completer.c (complete_line_internal): Add missing END_CATCH.
3708 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
3710 * NEWS (Changes since GDB 8.0): Add entry about new
3711 'set-cwd-on-gdbserver' feature.
3712 (New remote packets): Add entry for QSetWorkingDir.
3713 * common/common-inferior.h (set_inferior_cwd): New prototype.
3714 * infcmd.c (set_inferior_cwd): Remove "static".
3715 (show_cwd_command): Expand text to include remote debugging.
3716 * remote.c: Add PACKET_QSetWorkingDir.
3717 (remote_protocol_features) <QSetWorkingDir>: New entry for
3718 PACKET_QSetWorkingDir.
3719 (extended_remote_set_inferior_cwd): New function.
3720 (extended_remote_create_inferior): Call
3721 "extended_remote_set_inferior_cwd".
3722 (_initialize_remote): Call "add_packet_config_cmd" for
3725 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
3727 * NEWS (New commands): Mention "set/show cwd".
3728 * cli/cli-cmds.c (_initialize_cli_cmds): Mention "set cwd" on
3729 "cd" command's help text.
3730 * common/common-inferior.h (get_inferior_cwd): New prototype.
3731 * infcmd.c (inferior_cwd_scratch): New global variable.
3732 (set_inferior_cwd): New function.
3733 (get_inferior_cwd): Likewise.
3734 (set_cwd_command): Likewise.
3735 (show_cwd_command): Likewise.
3736 (_initialize_infcmd): Add "set/show cwd" commands.
3737 * inferior.h (class inferior) <cwd>: New field.
3738 * nat/fork-inferior.c: Include "gdb_tilde_expand.h".
3739 (fork_inferior): Change inferior's cwd before its execution.
3740 * windows-nat.c (windows_create_inferior): Pass inferior's cwd
3743 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
3745 * Makefile.in (SFILES): Add gdb_tilde_expand.c.
3746 (HFILES_NO_SRCDIR): Add gdb_tilde_expand.h.
3747 (COMMON_OBS): Add gdb_tilde_expand.o.
3748 * common/gdb_tilde_expand.c: New file.
3749 * common/gdb_tilde_expand.h: Likewise.
3751 2017-10-03 Maciej W. Rozycki <macro@imgtec.com>
3753 * gdbarch.sh (objfile): Remove duplicate declaration.
3754 * gdbarch.h: Regenerate.
3756 2017-10-03 Tom Tromey <tom@tromey.com>
3758 * utils.c (internal_vproblem): Use string_vprintf.
3760 2017-10-03 Tom Tromey <tom@tromey.com>
3762 * printcmd.c (info_symbol_command): Use std::string.
3764 2017-10-03 Tom Tromey <tom@tromey.com>
3766 * top.c (gdb_safe_append_history): Use std::string.
3768 2017-10-03 Tom Tromey <tom@tromey.com>
3770 * event-top.c (stdin_event_handler): Update.
3771 * main.c (captured_main_1): Update.
3772 * top.h (make_delete_ui_cleanup): Remove.
3773 (struct ui): Add constructor and destructor.
3774 (new_ui, delete_ui): Remove.
3775 * top.c (make_delete_ui_cleanup): Remove.
3776 (new_ui_command): Use std::unique_ptr.
3777 (delete_ui_cleanup): Remove.
3778 (ui::ui): Rename from new_ui. Update.
3780 (ui::~ui): Rename from delete_ui. Update.
3782 2017-10-03 Tom Tromey <tom@tromey.com>
3784 * symfile.c (load_progress): Use gdb::byte_vector.
3786 2017-10-03 Tom Tromey <tom@tromey.com>
3788 * mi/mi-main.c (mi_cmd_trace_frame_collected): Remove unused
3790 * printcmd.c (x_command): Remove unused declaration.
3791 * symfile.c (symbol_file_command): Remove unused declaration.
3793 2017-10-03 Tom Tromey <tom@tromey.com>
3795 * utils.c (internal_vproblem): Use std::string.
3796 (defaulted_query): Likewise.
3798 2017-10-03 Tom Tromey <tom@tromey.com>
3800 * guile/scm-ports.c (ioscm_with_output_to_port_worker): Update.
3801 * top.c (execute_command_to_string): Update.
3802 * utils.c (make_cleanup_restore_page_info): Remove.
3803 (do_restore_page_info_cleanup): Remove.
3804 (set_batch_flag_and_restore_page_info):
3806 (make_cleanup_restore_page_info): Remove.
3807 (set_batch_flag_and_make_cleanup_restore_page_info): Remove.
3808 (~set_batch_flag_and_restore_page_info): New
3809 (make_cleanup_restore_uinteger): Remove.
3810 (make_cleanup_restore_integer): Remove.
3811 (struct restore_integer_closure): Remove.
3812 (restore_integer): Remove.
3813 * utils.h (struct set_batch_flag_and_restore_page_info): New
3815 (set_batch_flag_and_make_cleanup_restore_page_info): Remove.
3816 (make_cleanup_restore_page_info): Remove.
3817 (make_cleanup_restore_uinteger) Remove.
3818 (make_cleanup_restore_integer) Remove.
3820 2017-10-03 Tom Tromey <tom@tromey.com>
3822 * record-full.h (record_full_gdb_operation_disable_set): Return
3823 scoped_restore_tmpl<int>.
3824 * infrun.c (adjust_pc_after_break): Update.
3825 (handle_signal_stop): Update.
3826 * record-full.c (record_full_gdb_operation_disable_set): Return
3827 scoped_restore_tmpl<int>.
3828 (record_full_wait_1, record_full_insert_breakpoint)
3829 (record_full_remove_breakpoint, record_full_save)
3830 (record_full_goto_insn): Update.
3832 2017-10-02 Tom Tromey <tom@tromey.com>
3835 * rust-lang.c (rust_val_print_str): New function.
3836 (val_print_struct): Call it.
3837 (rust_subscript): Preserve name of slice type.
3839 2017-10-02 Tom Tromey <tom@tromey.com>
3841 * rust-lang.c (rust_subscript): Handle slices in
3842 EVAL_AVOID_SIDE_EFFECTS case.
3844 2017-10-02 Tom Tromey <tom@tromey.com>
3846 * rust-lang.c (rust_slice_type_p): Recognize &str as a slice type.
3848 2017-10-02 Tom Tromey <tom@tromey.com>
3850 * rust-lang.h (rust_slice_type): Add "extern".
3852 2017-10-02 Tom Tromey <tom@tromey.com>
3853 Pedro Alves <palves@redhat.com>
3855 * ada-lang.h (ada_exc_info::operator<): Make const.
3856 (ada_exc_info::operator==): Make const.
3857 * ada-lang.c (ada_exc_info::operator<, ada_exc_info::operator==):
3860 2017-09-29 Tom Tromey <tom@tromey.com>
3862 * target.c (read_whatever_is_readable): Change type of "result".
3864 (free_memory_read_result_vector): Remove.
3865 (read_memory_robust): Change return type. Update.
3866 * mi/mi-main.c (mi_cmd_data_read_memory_bytes): Update. Use
3867 bin2hex, std::string.
3868 * target.h (memory_read_result_s): Remove typedef.
3869 (free_memory_read_result_vector): Remove.
3870 (read_memory_robust): Return std::vector.
3872 2017-09-29 Tom Tromey <tom@tromey.com>
3874 * mi/mi-main.c (captured_mi_execute_command): Use scope_restore.
3876 2017-09-29 Tom Tromey <tom@tromey.com>
3878 * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions): Update.
3879 * ada-lang.h (struct ada_exc_info): Remove typedef. Declare
3880 operator< and operator==.
3881 (ada_exceptions_list): Return a std::vector.
3882 * ada-lang.c (ada_exc_info::operator<): Rename from
3883 compare_ada_exception_info.
3884 (ada_exc_info::operator==): New.
3885 (sort_remove_dups_ada_exceptions_list): Change type of
3887 (ada_add_standard_exceptions, ada_add_exceptions_from_frame)
3888 (ada_add_global_exceptions): Likewise.
3889 (ada_exceptions_list_1): Return a std::vector.
3890 (ada_exceptions_list): Likewise.
3892 2017-09-29 Tom Tromey <tom@tromey.com>
3894 * mi/mi-main.c (struct print_one_inferior_data) <inferiors>: Now a
3896 (print_one_inferior): Update.
3897 (free_vector_of_ints): Remove.
3898 (list_available_thread_groups): Change "ids" to std::set.
3899 (mi_cmd_list_thread_groups): Update.
3900 (struct collect_cores_data) <core>: Now a std::set.
3901 (collect_cores): Update.
3903 (print_one_inferior): Update.
3905 2017-09-29 Tom Tromey <tom@tromey.com>
3907 * mi/mi-main.c (mi_execute_cli_command): Use std::string.
3908 (mi_execute_async_cli_command): Likewise.
3909 (mi_cmd_trace_frame_collected): Use field_fmt.
3911 2017-09-29 Tom Tromey <tom@tromey.com>
3913 * mi/mi-main.c (mi_cmd_data_write_memory_bytes): Use
3916 2017-09-29 Tom Tromey <tom@tromey.com>
3918 * mi/mi-parse.c (mi_parse): Remove unused declaration.
3920 2017-09-29 Tom Tromey <tom@tromey.com>
3922 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Don't copy "oarg".
3924 2017-09-29 Tom Tromey <tom@tromey.com>
3926 * varobj.h (varobj_gen_name): Return std::string.
3927 * varobj.c (varobj_gen_name): Return std::string.
3928 * mi/mi-cmd-var.c (mi_cmd_var_create): Use std::string.
3929 (mi_cmd_var_delete): Don't copy "name".
3931 2017-09-29 Tom Tromey <tom@tromey.com>
3933 * mi/mi-cmd-break.c (mi_argv_to_format): Return std::string.
3934 (mi_cmd_break_insert_1): Update.
3936 2017-09-29 Tom Tromey <tom@tromey.com>
3938 * target.h (make_scoped_defer_target_commit_resume): Update.
3939 * target.c (make_scoped_defer_target_commit_resume): Rename from
3940 make_cleanup_defer_target_commit_resume. Return a
3942 * infrun.c (proceed): Use make_scoped_defer_target_commit_resume.
3944 2017-09-29 Tom Tromey <tom@tromey.com>
3946 * main.c (captured_main_1): Remove unused declaration.
3947 * spu-multiarch.c (parse_spufs_run): Remove unused declaration.
3949 2017-09-29 Tom Tromey <tom@tromey.com>
3951 * symtab.c (search_symbols): Remove unused outer cleanup.
3952 (make_source_files_completion_list): Remove unused declaration.
3954 2017-09-29 Tom Tromey <tom@tromey.com>
3956 * mt-tdep.c (mt_push_dummy_call): Use gdb::byte_vector.
3958 2017-09-29 Tom Tromey <tom@tromey.com>
3960 * xstormy16-tdep.c (xstormy16_push_dummy_call): Use
3963 2017-09-29 Tom Tromey <tom@tromey.com>
3965 * complaints.c (vcomplaint): Use std::string.
3967 2017-09-29 Tom Tromey <tom@tromey.com>
3969 * tracepoint.c (trace_variable_command): Use std::string.
3970 (encode_actions_1): Remove unused declarations.
3971 (create_tsv_from_upload): Use std::string.
3973 2017-09-29 Tom Tromey <tom@tromey.com>
3975 * cp-support.c (gdb_demangle): Use std::string.
3977 2017-09-29 Tom Tromey <tom@tromey.com>
3979 * stack.c (parse_frame_specification): Use std::string
3980 (info_frame_command): Use gdb::unique_xmalloc_ptr.
3982 2017-09-29 Tom Tromey <tom@tromey.com>
3984 * tilegx-tdep.c (tilegx_push_dummy_call): Use gdb::byte_vector.
3986 2017-09-29 Tom Tromey <tom@tromey.com>
3988 * utils.c (vfprintf_maybe_filtered): Use std::string.
3989 (vfprintf_unfiltered): Likewise.
3991 2017-09-29 Tom Tromey <tom@tromey.com>
3993 * event-top.c (top_level_prompt): Return std::string.
3994 (display_gdb_prompt): Update.
3996 2017-09-29 Tom Tromey <tom@tromey.com>
3998 * unittests/common-utils-selftests.c (format): New function.
3999 (string_vprintf_tests): New function.
4000 (_initialize_common_utils_selftests): Register new tests.
4001 * common/common-utils.c (string_vprintf): New function.
4002 * common/common-utils.h (string_vprintf): Declare.
4004 2017-09-29 Pedro Alves <palves@redhat.com>
4006 * common/rsp-low.c (unpack_varlen_hex): Constify.
4007 * common/rsp-low.h (unpack_varlen_hex): Constify.
4008 * linux-nat.c (linux_child_static_tracepoint_markers_by_strid):
4010 * remote.c (remote_set_permissions, read_ptid)
4011 (remote_current_thread, remote_get_threads_with_qthreadinfo)
4012 (remote_static_tracepoint_marker_at)
4013 (remote_static_tracepoint_markers_by_strid)
4014 (stop_reply_extract_thread, remote_parse_stop_reply): Constify.
4015 * tracepoint.c (parse_trace_status, parse_tracepoint_status)
4016 (parse_tracepoint_definition, parse_tsv_definition)
4017 (parse_static_tracepoint_marker_definition): Constify.
4018 * tracepoint.h (parse_static_tracepoint_marker_definition)
4019 (parse_trace_status, parse_tracepoint_status)
4020 (parse_tracepoint_definition, parse_tsv_definition): Constify.
4022 2017-09-29 Pedro Alves <palves@redhat.com>
4024 * remote.c (target_buf, target_buf_size): Delete.
4025 (remote_get_noisy_reply): Remove buf_p and sizeof_buf parameters.
4026 Use the connection's packet buffer instead.
4027 All callers adjusted.
4028 (_initialize_remote): Remove references to target_buf and
4031 2017-09-28 Pedro Alves <palves@redhat.com>
4033 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
4034 unittests/common-utils-selftests.c.
4035 (SUBDIR_UNITTESTS_OBS): Add common-utils-selftests.o.
4036 (COMMON_OBS): Remove utils-selftests.o.
4037 * utils-selftests.c: Move to ...
4038 * unittests/common-utils-selftests.c: ... here and rename self
4039 test to "string_printf".
4041 2017-09-28 Alexander Shaposhnikov <alexander.v.shaposhnikov@gmail.com> (tiny patch)
4043 * dwarf2read.c (open_and_init_dwp_file): Protect against dwp_file
4044 having NULL cus or tus.
4046 2017-09-27 Ulrich Weigand <uweigand@de.ibm.com>
4048 * arm-tdep.c: (convert_from_extended): Remove.
4049 (convert_to_extended): Likewise.
4050 (arm_extract_return_value): Use convert_typed_floating.
4051 (arm_store_return_value): Likewise.
4053 * sh-tdep.h (struct gdbarch_tdep): Add sh_littlebyte_bigword_type.
4054 * sh-tdep.c: Do not include "floatformat.h".
4055 (sh_littlebyte_bigword_type): New function.
4056 (sh_register_convert_to_virtual): Use convert_typed_floating.
4057 (sh_register_convert_to_raw): Likewise.
4058 * sh64-tdep.c: (struct gdbarch_tdep): Add sh_littlebyte_bigword_type.
4059 (sh64_littlebyte_bigword_type): New function.
4060 (sh64_extract_return_value): Use convert_typed_floating.
4061 (sh64_register_convert_to_virtual): Likewise.
4062 (sh64_register_convert_to_raw): Likewise.
4064 2017-09-27 Ulrich Weigand <uweigand@de.ibm.com>
4066 * doublest.h (floatformat_from_type): Move to gdbtypes.h.
4067 * doublest.c (floatformat_from_type): Move to gdbtypes.c.
4069 * gdbtypes.h (union type_specific): Make field floatformat hold
4070 just a single struct floatformat, not an array.
4071 (floatformat_from_type): Move here.
4072 * gdbtypes.c (floatformat_from_type): Move here. Update to
4073 changed TYPE_FLOATFORMAT definition.
4074 (verify_floatformat): Update to changed TYPE_FLOATFORMAT.
4075 (recursive_dump_type): Likewise.
4076 (init_float_type): Install correct floatformat for byte order.
4077 (arch_float_type): Likewise.
4079 2017-09-27 Ulrich Weigand <uweigand@de.ibm.com>
4081 * gdbtypes.c (init_type): Change incoming argument from
4082 length-in-bytes to length-in-bits. Assert length is a
4083 multiple of TARGET_CHAR_BITS.
4084 (arch_type, arch_flags_type): Likewise.
4085 (init_integer_type): Update call to init_type.
4086 (init_character_type): Likewise.
4087 (init_boolean_type): Likewise.
4088 (init_float_type): Likewise.
4089 (init_decfloat_type): Likewise.
4090 (init_complex_type): Likewise.
4091 (init_pointer_type): Likewise.
4092 (objfile_type): Likewise.
4093 (arch_integer_type): Update call to arch_type.
4094 (arch_character_type): Likewise.
4095 (arch_boolean_type): Likewise.
4096 (arch_float_type): Likewise.
4097 (arch_decfloat_type): Likewise.
4098 (arch_complex_type): Likewise.
4099 (arch_pointer_type): Likewise.
4100 (gdbtypes_post_init): Likewise.
4102 * dwarf2read.c (dwarf2_init_float_type): Update call to init_type.
4103 (read_base_type): Likewise.
4104 * mdebugread.c (basic_type): Likewise.
4105 * stabsread.c (dbx_init_float_type): Likewise.
4106 (rs6000_builtin_type): Likewise.
4107 (read_range_type): Likewise. Also, fix call to init_integer_type
4108 with erroneous length argument.
4110 * ada-lang.c (ada_language_arch_info): Update call to arch_type.
4111 * d-lang.c (build_d_types): Likewise.
4112 * f-lang.c (build_fortran_types): Likewise.
4113 * go-lang.c (build_go_types): Likewise.
4114 * opencl-lang.c (build_opencl_types): Likewise.
4115 * jit.c (finalize_symtab): Likewise.
4116 * gnu-v3-abi.c (build_gdb_vtable_type): Likewise.
4117 (build_std_type_info_type): Likewise.
4118 * target-descriptions.c (tdesc_gdb_type): Likewise. Also,
4119 update call to arch_flags_type.
4121 * linux-tdep.c (linux_get_siginfo_type_with_fields): Update call to
4123 * fbsd-tdep.c (fbsd_get_siginfo_type): Likewise.
4124 * windows-tdep.c (windows_get_tlb_type): Likewise.
4126 * avr-tdep.c (avr_gdbarch_init): Update call to arch_type.
4127 * ft32-tdep.c (ft32_gdbarch_init): Likewise.
4128 * m32c-tdep.c (make_types): Likewise.
4129 * rl78-tdep.c (rl78_gdbarch_init): Likewise.
4130 (rl78_psw_type): Update call to arch_flags_type.
4131 * m68k-tdep.c (m68k_ps_type): Update call to arch_flags_type.
4132 * rx-tdep.c (rx_psw_type): Likewise.
4133 (rx_fpsw_type): Likewise.
4134 * sparc-tdep.c (sparc_psr_type): Likewise.
4135 (sparc_fsr_type): Likewise.
4136 * sparc64-tdep.c (sparc64_pstate_type): Likewise.
4137 (sparc64_ccr_type): Likewise.
4138 (sparc64_fsr_type): Likewise.
4139 (sparc64_fprs_type): Likewise.
4141 2017-09-27 Tom Tromey <tom@tromey.com>
4143 * findcmd.c (find_command): Constify.
4145 2017-09-27 Tom Tromey <tom@tromey.com>
4147 * ada-tasks.c (task_command_1, task_command): Constify.
4149 2017-09-27 Tom Tromey <tom@tromey.com>
4151 * symtab.c (maintenance_print_symbol_cache)
4152 (maintenance_flush_symbol_cache)
4153 (maintenance_print_symbol_cache_statistics): Constify.
4155 2017-09-27 Tom Tromey <tom@tromey.com>
4157 * inferior.c (detach_inferior_command, kill_inferior_command)
4158 (inferior_command): Constify.
4160 2017-09-27 Tom Tromey <tom@tromey.com>
4162 * regcache.c (regcache_print, maintenance_print_registers)
4163 (maintenance_print_raw_registers)
4164 (maintenance_print_cooked_registers)
4165 (maintenance_print_register_groups)
4166 (maintenance_print_remote_registers): Constify.
4168 2017-09-27 Tom Tromey <tom@tromey.com>
4170 * printcmd.c (map_display_numbers, undisplay_command)
4171 (enable_disable_display_command, enable_display_command)
4172 (disable_display_command): Constify.
4174 2017-09-27 Tom Tromey <tom@tromey.com>
4176 * breakpoint.h (delete_command): Don't declare.
4177 * breakpoint.c (delete_command, enable_once_command)
4178 (enable_count_command, enable_delete_command, breakpoint_1)
4179 (maintenance_info_breakpoints, stopin_command, stopat_command)
4180 (delete_command, delete_trace_command, save_breakpoints)
4181 (save_breakpoints_command, save_tracepoints_command): Constify.
4183 2017-09-27 Tom Tromey <tom@tromey.com>
4185 * macrocmd.c (macro_expand_command, macro_expand_once_command)
4186 (skip_ws, extract_identifier, macro_define_command)
4187 (macro_undef_command, macro_list_command): Constify.
4189 2017-09-27 Tom Tromey <tom@tromey.com>
4191 * infcmd.c (environment_info, set_environment_command)
4192 (unset_environment_command, path_info, info_proc_cmd_1)
4193 (info_proc_cmd_mappings, info_proc_cmd_stat)
4194 (info_proc_cmd_status, info_proc_cmd_cwd, info_proc_cmd_cmdline)
4195 (info_proc_cmd_exe, info_proc_cmd_all): Constify.
4197 2017-09-27 Tom Tromey <tom@tromey.com>
4199 * i386-tdep.c (i386_mpx_info_bounds, i386_mpx_set_bounds):
4202 2017-09-27 Tom Tromey <tom@tromey.com>
4204 * symfile-mem.c (add_symbol_file_from_memory_command): Constify.
4206 2017-09-27 Tom Tromey <tom@tromey.com>
4208 * demangle.c (demangle_command): Constify.
4210 2017-09-27 Tom Tromey <tom@tromey.com>
4212 * progspace.c (maintenance_info_program_spaces_command):
4215 2017-09-27 Tom Tromey <tom@tromey.com>
4217 * compile/compile.c (check_raw_argument, compile_file_command)
4218 (compile_code_command, compile_print_command): Constify.
4220 2017-09-27 Tom Tromey <tom@tromey.com>
4222 * reggroups.c (maintenance_print_reggroups): Constify.
4224 2017-09-27 Tom Tromey <tom@tromey.com>
4226 * dwarf2read.c (save_gdb_index_command): Constify.
4228 2017-09-27 Tom Tromey <tom@tromey.com>
4230 * stap-probe.c (info_probes_stap_command): Constify.
4232 2017-09-27 Tom Tromey <tom@tromey.com>
4234 * fork-child.c (unset_exec_wrapper_command): Constify.
4236 2017-09-27 Tom Tromey <tom@tromey.com>
4238 * btrace.c (get_uint, get_context_size, no_chunk)
4239 (maint_btrace_packet_history_cmd)
4240 (maint_btrace_clear_packet_history_cmd, maint_btrace_clear_cmd)
4241 (maint_info_btrace_cmd): Constify.
4243 2017-09-27 Tom Tromey <tom@tromey.com>
4245 * reverse.c (delete_bookmark_command): Constify.
4247 2017-09-27 Tom Tromey <tom@tromey.com>
4249 * remote.c (set_memory_packet_size)
4250 (set_memory_write_packet_size, show_memory_write_packet_size)
4251 (set_memory_read_packet_size, show_memory_read_packet_size)
4252 (compare_sections_command, packet_command, remote_put_command)
4253 (remote_get_command, remote_delete_command): Constify.
4255 2017-09-27 Tom Tromey <tom@tromey.com>
4257 * mips-tdep.c (show_mipsfpu_command, set_mipsfpu_single_command)
4258 (set_mipsfpu_double_command, set_mipsfpu_none_command)
4259 (set_mipsfpu_auto_command): Constify.
4261 2017-09-27 Tom Tromey <tom@tromey.com>
4263 * cli/cli-cmds.h (cd_command): Constify.
4264 * cli/cli-cmds.c (cd_command): Constify.
4266 2017-09-27 Tom Tromey <tom@tromey.com>
4268 * thread.c (thread_name_command, thread_find_command): Constify.
4270 2017-09-27 Tom Tromey <tom@tromey.com>
4272 * probe.c (enable_probes_command, disable_probes_command):
4275 2017-09-27 Tom Tromey <tom@tromey.com>
4277 * symfile.c (symbol_file_command): Constify.
4278 * gdbcore.h (deprecated_file_changed_hook): Constify.
4279 * exec.c (deprecated_file_changed_hook, exec_file_command)
4280 (file_command): Constify.
4281 * defs.h (symbol_file_command): Constify.
4283 2017-09-27 Tom Tromey <tom@tromey.com>
4285 * remote-fileio.c (set_system_call_allowed)
4286 (show_system_call_allowed): Constify.
4288 2017-09-27 Tom Tromey <tom@tromey.com>
4290 * tracepoint.c (delete_trace_variable_command)
4291 (tfind_end_command, tfind_start_command, tfind_pc_command)
4292 (tfind_tracepoint_command, tfind_line_command)
4293 (tfind_range_command, tfind_outside_command): Constify.
4295 2017-09-27 Tom Tromey <tom@tromey.com>
4297 * ax-gdb.c (maint_agent_printf_command, agent_command)
4298 (agent_eval_command): Constify.
4300 2017-09-27 Tom Tromey <tom@tromey.com>
4302 * tracepoint.c (info_scope_command): Constify.
4303 * python/python.c (gdbpy_decode_line): Constify.
4304 * python/py-breakpoint.c (bppy_init): Constify.
4305 * mi/mi-cmd-break.c (mi_cmd_break_insert_1): Constify.
4306 * location.h: (new_linespec_location)
4307 (string_to_event_location_basic, string_to_event_location):
4309 * location.c (new_linespec_location)
4310 (string_to_event_location_basic, string_to_event_location):
4312 * linespec.h (decode_line_with_current_source)
4313 (decode_line_with_last_displayed, linespec_lex_to_end): Constify.
4314 * linespec.c (linespec_lex_to_end)
4315 (decode_line_with_current_source)
4316 (decode_line_with_last_displayed): Constify.
4317 * guile/scm-breakpoint.c (gdbscm_register_breakpoint_x):
4319 * cli/cli-cmds.c (edit_command, list_command): Constify.
4320 * breakpoint.h (until_break_command, watch_command_wrapper)
4321 (awatch_command_wrapper, rwatch_command_wrapper)
4322 (init_ada_exception_breakpoint): Constify.
4323 * breakpoint.c (break_command_1, dprintf_command)
4324 (break_range_command, watch_command_wrapper)
4325 (rwatch_command_wrapper, awatch_command_wrapper)
4326 (until_break_command, init_ada_exception_breakpoint)
4327 (strace_marker_create_sals_from_location, trace_command)
4328 (ftrace_command, strace_command, struct tracepoint): Constify.
4329 * ax-gdb.c (agent_command_1): Constify.
4330 * ada-lang.c (ada_exception_sal): Constify.
4332 2017-09-27 Tom Tromey <tom@tromey.com>
4334 * record.c (cmd_record_delete, cmd_record_stop, cmd_record_save)
4335 (cmd_record_goto_begin, cmd_record_goto_end, get_insn_number)
4336 (get_context_size, no_chunk, get_insn_history_modifiers)
4337 (cmd_record_insn_history, get_call_history_modifiers)
4338 (cmd_record_call_history): Constify.
4340 2017-09-27 Tom Tromey <tom@tromey.com>
4342 * source.c (show_substitute_path_command)
4343 (unset_substitute_path_command, set_substitute_path_command):
4346 2017-09-27 Tom Tromey <tom@tromey.com>
4348 * typeprint.c (maintenance_print_type): Constify.
4349 * maint.c (maintenance_dump_me, maintenance_demangle)
4350 (maintenance_time_display, maintenance_info_sections)
4351 (maintenance_print_statistics, maintenance_deprecate)
4352 (maintenance_undeprecate): Constify.
4353 (maintenance_do_deprecate): Constify. Use std::string.
4354 (maintenance_selftest): Constify.
4355 * gdbtypes.h (maintenance_print_type): Constify.
4357 2017-09-27 Tom Tromey <tom@tromey.com>
4359 * hppa-tdep.c (unwind_command): Constify.
4361 2017-09-27 Tom Tromey <tom@tromey.com>
4363 * target-descriptions.c (unset_tdesc_filename_cmd)
4364 (maint_print_c_tdesc_cmd, maintenance_check_xml_descriptions):
4367 2017-09-27 Tom Tromey <tom@tromey.com>
4369 * dummy-frame.c (maintenance_print_dummy_frames): Constify.
4371 2017-09-27 Tom Tromey <tom@tromey.com>
4373 * tui/tui.c (tui_enable_command, tui_disable_command): Constify.
4375 2017-09-27 Tom Tromey <tom@tromey.com>
4377 * tui/tui-regs.c (tui_reg_command): Constify.
4379 2017-09-27 Tom Tromey <tom@tromey.com>
4381 * skip.c (skip_file_command, skip_function_command)
4382 (skip_enable_command, skip_disable_command, skip_delete_command):
4385 2017-09-27 Tom Tromey <tom@tromey.com>
4387 * record-btrace.c (cmd_record_btrace_bts_start)
4388 (cmd_record_btrace_pt_start): Constify.
4390 2017-09-27 Tom Tromey <tom@tromey.com>
4392 * symmisc.c (maintenance_print_symbols)
4393 (maintenance_print_msymbols, maintenance_print_objfiles)
4394 (maintenance_info_symtabs, maintenance_check_symtabs)
4395 (maintenance_expand_symtabs, maintenance_info_line_tables):
4398 2017-09-27 Tom Tromey <tom@tromey.com>
4400 * top.c (new_ui_command): Constify.
4402 2017-09-27 Tom Tromey <tom@tromey.com>
4404 * symfile.c (add_symbol_file_command)
4405 (remove_symbol_file_command, list_overlays_command)
4406 (map_overlay_command, unmap_overlay_command)
4407 (overlay_auto_command, overlay_manual_command)
4408 (overlay_off_command, overlay_load_command): Constify.
4410 2017-09-27 Tom Tromey <tom@tromey.com>
4412 * spu-tdep.c (info_spu_event_command, info_spu_signal_command)
4413 (info_spu_mailbox_command, info_spu_dma_command)
4414 (info_spu_proxydma_command): Constify.
4416 2017-09-27 Tom Tromey <tom@tromey.com>
4418 * cli/cli-logging.c (set_logging_on, set_logging_off): Constify.
4420 2017-09-27 Tom Tromey <tom@tromey.com>
4422 * cli/cli-script.c (user_defined_command): Constify.
4424 2017-09-27 Tom Tromey <tom@tromey.com>
4426 * cli/cli-dump.c (dump_memory_command, dump_value_command)
4427 (dump_srec_memory, dump_srec_value, dump_ihex_memory)
4428 (dump_ihex_value, dump_verilog_memory, dump_verilog_value)
4429 (dump_tekhex_memory, dump_tekhex_value, dump_binary_memory)
4430 (dump_binary_value, append_binary_memory, append_binary_value):
4432 (struct dump_context) <func>: Constify.
4433 (add_dump_command): Update.
4435 2017-09-27 Tom Tromey <tom@tromey.com>
4437 * cli/cli-cmds.c (show_version, show_configuration)
4438 (source_command, show_user): Constify.
4440 2017-09-27 Tom Tromey <tom@tromey.com>
4442 * target.c (maintenance_print_target_stack): Constify.
4444 2017-09-27 Tom Tromey <tom@tromey.com>
4446 * interps.c (interpreter_exec_cmd): Constify.
4448 2017-09-27 Tom Tromey <tom@tromey.com>
4450 * record-full.c (cmd_record_full_restore): Constify.
4452 2017-09-27 Tom Tromey <tom@tromey.com>
4454 * memattr.c (enable_mem_command, disable_mem_command)
4455 (delete_mem_command): Constify.
4457 2017-09-27 Tom Tromey <tom@tromey.com>
4459 * value.c (show_convenience): Constify.
4461 2017-09-27 Tom Tromey <tom@tromey.com>
4463 * gdbcore.h (core_file_command): Update.
4464 * corefile.c (core_file_command): Constify.
4466 2017-09-27 Tom Tromey <tom@tromey.com>
4468 * user-regs.c (maintenance_print_user_registers): Constify.
4470 2017-09-27 Tom Tromey <tom@tromey.com>
4472 * cp-namespace.c (maintenance_cplus_namespace): Constify.
4474 2017-09-27 Tom Tromey <tom@tromey.com>
4476 * cp-support.c (first_component_command): Constify.
4478 2017-09-27 Tom Tromey <tom@tromey.com>
4480 * psymtab.c (maintenance_print_psymbols)
4481 (maintenance_info_psymtabs, maintenance_check_psymtabs):
4484 2017-09-27 Tom Tromey <tom@tromey.com>
4486 * windows-tdep.c (display_tib): Constify.
4488 2017-09-27 Tom Tromey <tom@tromey.com>
4490 * linux-fork.c (delete_checkpoint_command)
4491 (detach_checkpoint_command): Constify.
4493 2017-09-27 Tom Tromey <tom@tromey.com>
4495 * cp-abi.c (set_cp_abi_cmd, show_cp_abi_cmd): Constify.
4497 2017-09-27 Tom Tromey <tom@tromey.com>
4499 * arc-tdep.c (dump_arc_instruction_command): Constify.
4501 2017-09-27 Tom Tromey <tom@tromey.com>
4503 * valprint.c (set_radix, show_radix): Constify.
4505 2017-09-27 Tom Tromey <tom@tromey.com>
4507 * dtrace-probe.c (info_probes_dtrace_command): Constify.
4509 2017-09-27 Tom Tromey <tom@tromey.com>
4511 * command.h (not_just_help_class_command): Update.
4512 * cli/cli-decode.h (not_just_help_class_command): Update.
4513 * cli/cli-decode.c (not_just_help_class_command): Constify.
4515 2017-09-27 Tom Tromey <tom@tromey.com>
4517 * gdb_bfd.c (maintenance_info_bfds): Constify.
4519 2017-09-27 Tom Tromey <tom@tromey.com>
4521 * cli/cli-decode.c (add_cmd, set_cmd_cfunc): New function
4523 (do_add_cmd): Rename from add_cmd. Don't call set_cmd_cfunc.
4524 (do_const_cfunc): New function.
4525 (cmd_cfunc_eq): New overload.
4526 (cli_user_command_p): Check do_const_cfunc.
4527 * cli/cli-decode.h (struct cmd_list_element) <function>: New field
4529 * command.h (add_cmd): Add const overload and no-function
4531 (set_cmd_cfunc): Add const overload.
4532 (cmd_const_cfunc_ftype): Declare.
4533 (cmd_cfunc_eq): Add const overload.
4534 * breakpoint.c, cli-cmds.c, cli-dump.c, guile/scm-cmd.c,
4535 python/py-cmd.c, target.c, tracepoint.c: Use no-function add_cmd
4538 2017-09-27 Tom Tromey <tom@tromey.com>
4540 * macroexp.c (get_next_token_for_substitution): New function.
4541 (substitute_args): Call it. Check for __VA_OPT__.
4543 2017-09-26 Walfred Tedeschi <walfred.tedeschi@intel.com>
4544 Pedro Alves <palves@redhat.com>
4546 * dwarf2read.c (dwarf2_cu): Remove field producer_is_icc and add
4547 producer_is_icc_lt_14.
4548 (producer_is_icc_lt_14): New function.
4549 (check_producer): Add code for checking version of ICC.
4550 (producer_is_icc): Move to producer.c.
4551 (read_structure_type): Restrict ICC workaround to ICC<14.
4552 * producer.c: Include selftest.h.
4553 (producer_is_icc, producer_parsing_tests, _initialize_producer):
4555 * producer.h (producer_is_icc): New declaration.
4557 2017-09-26 Walfred Tedeschi <walfred.tedeschi@intel.com>
4559 * Makefile.in (SFILES): Add producer.c.
4560 (COMMON_OBS): Add producer.o
4561 * amd64-tdep.c (producer.h): Add new include.
4562 * dwarf2read.c (producer.h): Add new include.
4563 * producer.c: New file.
4564 * producer.h: New file.
4565 * utils.c (producer_is_gcc, producer_is_gcc_ge_4): Move to
4567 * utils.h (producer_is_gcc, producer_is_gcc_ge_4): Move to
4570 2017-09-26 Matthias Klose <doko@ubuntu.com>
4572 * configure.ac: Search ncursesw before ncurses.
4573 Check ncursesw/ncurses.h before ncurses/ncurses.h.
4574 * gdb_curses.h: Include <ncursesw/ncurses.h>
4575 * config.in, configure: Regenerate.
4577 2017-09-26 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
4580 * configure.host <*-*-solaris2.[01], *-*-solaris2.[2-9]*>: Mark as
4582 Use gdb_host sol2 for i[34567]86-*-solaris2*, x86_64-*-solaris2*.
4583 Remove i386sol2 support.
4584 * configure.nat <i386sol2>: Remove.
4585 <sol2-64>: Fold into ...
4587 Move common settings to default section.
4589 * configure.tgt <i[34567]86-*-solaris2.1[0-9]*,
4590 x86_64-*-solaris2.1[0-9]*>: Rename to ...
4591 <i[34567]86-*-solaris2*, x86_64-*-solaris2*>: ... this.
4592 <i[34567]86-*-solaris*>: Remove.
4593 <sparc-*-solaris2.[0-6], sparc-*-solaris2.[0-6].*>: Remove.
4595 * configure.ac: Remove wctype in libw check.
4596 (_MSE_INT_H): Don't define on Solaris 7-9.
4597 <solaris*>: Remove libthread_db.so.1 check.
4598 * configure: Regenerate.
4599 * config.in: Regenerate.
4601 * proc-service.c: Remove PROC_SERVICE_IS_OLD handling.
4602 (gdb_ps_prochandle_t, gdb_ps_read_buf_t, gdb_ps_write_buf_t)
4603 (gdb_ps_size_t): Remove.
4604 Use base types in users.
4605 * sol-thread.c: Likewise, also for gdb_ps_addr_t.
4607 * NEWS (Changes since GDB 8.0): Document Solaris 2.0-9 removal.
4609 2017-09-26 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
4612 * sparc64-tdep.c (adi_tag_fd): Print pid as long.
4613 (adi_is_addr_mapped): Likewise.
4614 (PSR_ICC): Don't redefine.
4615 (PSR_IMPL): Likewise.
4617 2017-09-25 Tom Tromey <tom@tromey.com>
4619 * regcache.c (regcache::dump): Use string_printf.
4621 2017-09-25 Tom Tromey <tom@tromey.com>
4623 * regcache.c (class regcache_invalidator): New.
4624 (struct register_to_invalidate): Remove.
4625 (make_cleanup_regcache_invalidate): Remove.
4626 (regcache::raw_write): Use regcache_invalidator.
4628 2017-09-25 Tom Tromey <tom@tromey.com>
4630 * spu-tdep.c (spu2ppu_sniffer): Update.
4631 * regcache.h (make_cleanup_regcache_xfree): Don't declare.
4632 * regcache.c (do_regcache_xfree, make_cleanup_regcache_xfree):
4634 * ppc-linux-tdep.c (ppu2spu_sniffer): Update.
4635 * mi/mi-main.c (mi_cmd_data_list_changed_registers): Update.
4636 * frame.h (frame_save_as_regcache): Return std::unique_ptr.
4637 * frame.c (frame_save_as_regcache): Return std::unique_ptr.
4638 (frame_pop): Update.
4640 2017-09-25 Tom Tromey <tom@tromey.com>
4642 * spu-tdep.c (spu2ppu_dealloc_cache): Use delete.
4643 * regcache.h (regcache_xfree): Don't declare.
4644 * regcache.c (regcache_xfree): Remove.
4645 (do_regcache_xfree): Use delete.
4646 * ppc-linux-tdep.c (ppu2spu_dealloc_cache): Use delete.
4647 * linux-fork.c (free_fork): Use delete.
4648 (fork_save_infrun_state): Likewise.
4649 * jit.c (jit_dealloc_cache): Use delete.
4650 * infrun.c (discard_infcall_suspend_state): Use delete.
4652 2017-09-25 Tom Tromey <tom@tromey.com>
4654 * regcache.h (regcache_xmalloc): Don't declare.
4655 (regcache_raw_set_cached_value): Update comment.
4656 * regcache.c (regcache_xmalloc): Remove.
4657 * ppc-linux-tdep.c (ppu2spu_sniffer): Use new.
4658 * jit.c (jit_frame_sniffer): Use new.
4659 * frame.c (frame_save_as_regcache): Use new.
4661 2017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
4663 * NEWS: Advertise support for guarded-storage registers on IBM z.
4665 2017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
4667 * s390-linux-nat.c (have_regset_gs): New static variable.
4668 (s390_linux_fetch_inferior_registers): Handle guarded-storage
4669 control block and guarded-storage broadcast control regsets.
4670 (s390_read_description): Detect whether the target has
4671 guarded-storage support, return appropriate tdesc.
4672 * s390-linux-tdep.c (features/s390-gs-linux64.c): New include.
4673 (features/s390x-gs-linux64.c): Likewise.
4674 (struct gdbarch_tdep) <have_gs>: New field.
4675 (s390_regmap_gs, s390_regmap_gsbc, s390_gs_regset)
4676 (s390_gsbc_regset): New variables.
4677 (s390_iterate_over_regset_sections): Iterate over s390_gs_regset
4678 and s390_gsbc_regset, if applicable.
4679 (s390_core_read_description): Check whether core file was from a
4680 target with guarded-storage support; include appropriate regsets.
4681 (s390_gdbarch_init): Add registers for guarded-storage support.
4682 (_initialize_s390_tdep): Initialize new target descriptions that
4683 include registers for guarded-storage support.
4684 * s390-linux-tdep.h (HWCAP_S390_GS, S390_GSD_REGNUM)
4685 (S390_GSSM_REGNUM, S390_GSEPLA_REGNUM)
4686 (S390_BC_GSD_REGNUM, S390_BC_GSSM_REGNUM): New defines.
4687 (S390_NUM_REGS): Adjust macro definition.
4688 (s390_gs_regset, s390_gsbc_regset, tdesc_s390_gs_linux64)
4689 (tdesc_s390x_gs_linux64): New declarations.
4691 2017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
4693 * features/s390-gs-linux64.xml: New file.
4694 * features/s390-gs.xml: New file.
4695 * features/s390-gsbc.xml: New file.
4696 * features/s390x-gs-linux64.xml: New file.
4697 * features/Makefile (WHICH): Add s390-gs-linux64 and
4699 (s390-gs-linux64-expedite, s390x-gs-linux64-expedite): New macros.
4700 (XMLTOC): Add s390-gs-linux64.xml and s390x-linux64.xml.
4701 * features/s390-gs-linux64.c: New generated file.
4702 * features/s390x-gs-linux64.c: New file.
4703 * regformats/s390-gs-linux64.dat: New file.
4704 * regformats/s390x-gs-linux64.dat: New file.
4706 2017-09-23 Tom Tromey <tom@tromey.com>
4708 * defs.h (make_cleanup_override_quit_handler): Don't declare.
4710 2017-09-22 Tom Tromey <tom@tromey.com>
4712 * utils.c (class scoped_input_handler) <m_quit_handler>: Change
4713 type to scoped_restore_tmpl.
4714 <scoped_input_handler>: Initialize m_quit_handler directly.
4716 2017-09-22 Sergio Durigan Junior <sergiodj@redhat.com>
4718 * cli/cli-cmds.c (pwd_command): Use "getcwd (NULL, 0)".
4719 (cd_command): Likewise. Free "current_directory" before
4721 * main.c (captured_main_1): Use "getcwd (NULL, 0)".
4722 * mi/mi-cmd-env.c (mi_cmd_env_pwd): Likewise.
4723 * top.c (gdb_dirbuf): Remove global declaration.
4724 * top.h (gdb_dirbuf): Likewise.
4726 2017-09-22 Sergio Durigan Junior <sergiodj@redhat.com>
4728 * gnulib/aclocal.m4: Regenerate.
4729 * gnulib/config.in: Regenerate.
4730 * gnulib/configure: Regenerate.
4731 * gnulib/import/Makefile.am: Regenerate.
4732 * gnulib/import/Makefile.in: Regenerate.
4733 * gnulib/import/assure.h: New file.
4734 * gnulib/import/at-func.c: Likewise
4735 * gnulib/import/chdir-long.c: New file.
4736 * gnulib/import/chdir-long.h: New file.
4737 * gnulib/import/cloexec.c: New file.
4738 * gnulib/import/cloexec.h: New file.
4739 * gnulib/import/close.c: New file.
4740 * gnulib/import/closedir.c: New file.
4741 * gnulib/import/dirent-private.h: New file.
4742 * gnulib/import/dup-safer.c: New file.
4743 * gnulib/import/dup.c: New file.
4744 * gnulib/import/dup2.c: New file.
4745 * gnulib/import/error.c: New file.
4746 * gnulib/import/error.h: New file.
4747 * gnulib/import/exitfail.c: New file.
4748 * gnulib/import/exitfail.h: New file.
4749 * gnulib/import/fchdir.c: New file.
4750 * gnulib/import/fcntl.c: New file.
4751 * gnulib/import/fcntl.in.h: New file.
4752 * gnulib/import/fd-hook.c: New file.
4753 * gnulib/import/fd-hook.h: New file.
4754 * gnulib/import/fd-safer.c: New file.
4755 * gnulib/import/fdopendir.c: New file.
4756 * gnulib/import/filename.h: New file.
4757 * gnulib/import/filenamecat-lgpl.c: New file.
4758 * gnulib/import/filenamecat.h: New file.
4759 * gnulib/import/fstat.c: New file.
4760 * gnulib/import/fstatat.c: New file.
4761 * gnulib/import/getcwd-lgpl.c: New file.
4762 * gnulib/import/getcwd.c: New file.
4763 * gnulib/import/getdtablesize.c: New file.
4764 * gnulib/import/getlogin_r.c: New file.
4765 * gnulib/import/getprogname.c: New file.
4766 * gnulib/import/getprogname.h: New file.
4767 * gnulib/import/gettext.h: New file.
4768 * gnulib/import/glob-libc.h: New file.
4769 * gnulib/import/glob.c: New file.
4770 * gnulib/import/glob.in.h: New file.
4771 * gnulib/import/intprops.h: New file.
4772 * gnulib/import/m4/chdir-long.m4: New file.
4773 * gnulib/import/m4/close.m4: New file.
4774 * gnulib/import/m4/closedir.m4: New file.
4775 * gnulib/import/m4/d-ino.m4: New file.
4776 * gnulib/import/m4/d-type.m4: New file.
4777 * gnulib/import/m4/dup.m4: New file.
4778 * gnulib/import/m4/dup2.m4: New file.
4779 * gnulib/import/m4/error.m4: New file.
4780 * gnulib/import/m4/fchdir.m4: New file.
4781 * gnulib/import/m4/fcntl.m4: New file.
4782 * gnulib/import/m4/fcntl_h.m4: New file.
4783 * gnulib/import/m4/fdopendir.m4: New file.
4784 * gnulib/import/m4/filenamecat.m4: New file.
4785 * gnulib/import/m4/fstat.m4: New file.
4786 * gnulib/import/m4/fstatat.m4: New file.
4787 * gnulib/import/m4/getcwd-abort-bug.m4: New file.
4788 * gnulib/import/m4/getcwd-path-max.m4: New file.
4789 * gnulib/import/m4/getcwd.m4: New file.
4790 * gnulib/import/m4/getdtablesize.m4: New file.
4791 * gnulib/import/m4/getlogin_r.m4: New file.
4792 * gnulib/import/m4/getprogname.m4: New file.
4793 * gnulib/import/m4/glob.m4: New file.
4794 * gnulib/import/m4/gnulib-cache.m4: Regenerate.
4795 * gnulib/import/m4/gnulib-comp.m4: Regenerate.
4796 * gnulib/import/m4/mempcpy.m4: New file.
4797 * gnulib/import/m4/memrchr.m4: New file.
4798 * gnulib/import/m4/mode_t.m4: New file.
4799 * gnulib/import/m4/msvc-inval.m4: New file.
4800 * gnulib/import/m4/msvc-nothrow.m4: New file.
4801 * gnulib/import/m4/open.m4: New file.
4802 * gnulib/import/m4/openat.m4: New file.
4803 * gnulib/import/m4/opendir.m4: New file.
4804 * gnulib/import/m4/readdir.m4: New file.
4805 * gnulib/import/m4/realloc.m4: New file.
4806 * gnulib/import/m4/rewinddir.m4: New file.
4807 * gnulib/import/m4/save-cwd.m4: New file.
4808 * gnulib/import/m4/strdup.m4: New file.
4809 * gnulib/import/m4/strerror.m4: New file.
4810 * gnulib/import/m4/unistd-safer.m4: New file.
4811 * gnulib/import/mempcpy.c: New file.
4812 * gnulib/import/memrchr.c: New file.
4813 * gnulib/import/msvc-inval.c: New file.
4814 * gnulib/import/msvc-inval.h: New file.
4815 * gnulib/import/msvc-nothrow.c: New file.
4816 * gnulib/import/msvc-nothrow.h: New file.
4817 * gnulib/import/open.c: New file.
4818 * gnulib/import/openat-die.c: New file.
4819 * gnulib/import/openat-priv.h: New file.
4820 * gnulib/import/openat-proc.c: New file.
4821 * gnulib/import/openat.c: New file.
4822 * gnulib/import/openat.h: New file.
4823 * gnulib/import/opendir.c: New file.
4824 * gnulib/import/pipe-safer.c: New file.
4825 * gnulib/import/readdir.c: New file.
4826 * gnulib/import/realloc.c: New file.
4827 * gnulib/import/rewinddir.c: New file.
4828 * gnulib/import/save-cwd.c: New file.
4829 * gnulib/import/save-cwd.h: New file.
4830 * gnulib/import/strdup.c: New file.
4831 * gnulib/import/strerror-override.c: New file.
4832 * gnulib/import/strerror-override.h: New file.
4833 * gnulib/import/strerror.c: New file.
4834 * gnulib/import/unistd--.h: New file.
4835 * gnulib/import/unistd-safer.h: New file.
4836 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add
4837 "getcwd" and "glob".
4838 * ser-tcp.c: Undefine "close" before redefining it.
4840 2017-09-21 Simon Marchi <simon.marchi@ericsson.com>
4842 * guile/scm-value.c (gdbscm_value_address): Initialize address,
4845 2017-09-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
4847 * configure.nat <i386sol2,i386>: Add fork-inferior.o to NATDEPFILES.
4848 <sol2,sparc>: Likewise.
4849 <sol2-64,i386>: Likewise.
4851 * warning.m4 (AM_GDB_WARNINGS): Disable -Wunknown-pragmas,
4852 -Wdeprecated-declarations on *-*-solaris*.
4853 * configure: Regenerate.
4855 * procfs.c: Include "nat/inferior.h".
4856 (procfs_info_proc): Fix typo.
4858 2017-09-21 Kevin Buettner <kevinb@redhat.com>
4860 * remote.c (vector): Include.
4861 (struct private_thread_info): Add field, thread_handle.
4862 (free_private_thread_info): Deallocate storage associated with
4864 (get_private_info_thread): Initialize `thread_handle' field.
4865 (struct thread_item): Add field, thread_handle.
4866 (clear_threads_listing_context): Deallocate storage associated
4868 (start_thread): Add support for "handle" attribute.
4869 (thread_attributes): Add "handle".
4870 (remote_get_threads_with_qthreadinfo): Initialize thread_handle
4872 (remote_update_thread_list): Update thread_handle.
4873 (remote_thread_handle_to_thread_info): New function.
4874 (init_remote_ops): Initialize to_thread_handle_to_thread_info.
4876 2017-09-21 Kevin Buettner <kevinb@redhat.com>
4878 * python/py-inferior.c (gdbpy_thread_from_thread_handle): New
4880 (inferior_object_methods): Add gdbpy_thread_from_thread_handle.
4881 * python/python-internal.h (thread_object_type): Declare.
4883 2017-09-21 Kevin Buettner <kevinb@redhat.com>
4885 * target.h (struct target_ops): Add to_thread_handle_to_thread_info.
4886 (target_thread_handle_to_thread_info): Declare.
4887 * target.c (target_thread_handle_to_thread_info): New function.
4888 * target-delegates.c: Regenerate.
4889 * gdbthread.h (find_thread_by_handle): Declare.
4890 * thread.c (find_thread_by_handle): New function.
4891 * linux-thread-db.c (thread_db_thread_handle_to_thread_info): New
4893 (init_thread_db_ops): Register thread_db_thread_handle_to_thread_info.
4895 2017-09-21 Simon Marchi <simon.marchi@ericsson.com>
4897 * nat/linux-waitpid.c (linux_debug): Add ATTRIBUTE_PRINTF.
4899 2017-09-21 Simon Marchi <simon.marchi@ericsson.com>
4901 * microblaze-tdep.c (microblaze_debug): Add ATTRIBUTE_PRINTF.
4903 2017-09-21 Yao Qi <yao.qi@linaro.org>
4905 * configure.tgt (aarch64*-*-freebsd*): Add fbsd-tdep.o solib-svr4.o
4908 2017-09-20 Tom Tromey <tom@tromey.com>
4910 * breakpoint.c (struct counted_command_line): Remove.
4911 (breakpoint_commands): Update.
4912 (alloc_counted_command_line, incref_counted_command_line)
4913 (decref_counted_command_line, do_cleanup_counted_command_line)
4914 (make_cleanup_decref_counted_command_line): Remove.
4915 (breakpoint_set_commands, commands_command_1, ~bpstats, bpstats)
4916 (bpstat_clear_actions, bpstat_do_actions_1, watchpoint_check)
4917 (bpstat_stop_status, print_one_breakpoint_location, ~breakpoint)
4918 (save_breakpoints): Update.
4919 * breakpoint.h (counted_command_line): Now a typedef to
4921 (struct breakpoint) <commands>: Now a counted_command_line.
4922 (struct bpstats) <command>: Likewise.
4924 2017-09-20 Tom Tromey <tom@tromey.com>
4926 * breakpoint.c (struct commands_info, do_map_commands_command):
4928 (commands_command_1): Update.
4929 (iterate_over_related_breakpoints): Take a function_view.
4930 (do_delete_breakpoint, do_map_delete_breakpoint): Remove.
4931 (delete_command): Update.
4932 (map_breakpoint_numbers): Take a function_view.
4933 (do_disable_breakpoint, do_map_delete_breakpoint): Remove.
4934 (disable_command): Update.
4935 (do_enable_breakpoint, do_map_enable_breakpoint): Remove.
4936 (enable_command): Update.
4937 (struct disp_data, do_enable_breakpoint_disp)
4938 (do_map_enable_once_breakpoint, do_map_enable_count_breakpoint)
4939 (do_map_enable_delete_breakpoint): Remove.
4940 (enable_once_command, enable_count_command, enable_delete_command)
4941 (delete_trace_variable_command): Update.
4943 2017-09-20 Tom Tromey <tom@tromey.com>
4945 * breakpoint.c (~bpstats): Rename from bpstat_free. Update.
4946 (bpstat_clear): Use delete.
4947 (bpstats): New constructors.
4948 (bpstat_copy, bpstat_stop_status): Use new.
4949 (dprintf_after_condition_true): Update.
4950 * breakpoint.h (bpstats::bpstats): Add constructors.
4951 (bpstats::~bpstats): Add destructor.
4953 2017-09-20 Pedro Alves <palves@redhat.com>
4955 * eval.c (make_params): Delete, refactored as ...
4956 (class fake_method): ... this new type's ctor.
4957 (fake_method::~fake_method): New.
4958 (evaluate_subexp_standard): Use 'fake_method'.
4960 2017-09-20 Tom Tromey <tom@tromey.com>
4962 * windows-nat.c (get_windows_debug_event, windows_wait)
4963 (do_initial_windows_stuff, windows_attach): Update.
4964 * utils.c (vwarning, internal_vproblem): Update.
4965 (ui_unregister_input_event_handler_cleanup)
4966 (prepare_to_handle_input): Remove.
4967 (class scoped_input_handler): New.
4968 (defaulted_query, prompt_for_continue): Update.
4969 * tui/tui-hooks.c (tui_refresh_frame_and_register_information):
4971 * top.c (undo_terminal_modifications_before_exit): Update.
4972 * target/target.h (target_terminal_init, target_terminal_inferior)
4973 (target_terminal_ours): Don't declare.
4974 (class target_terminal): New.
4975 * target.h (target_terminal_is_inferior, target_terminal_is_ours)
4976 (target_terminal_ours_for_output)
4977 (make_cleanup_restore_target_terminal): Don't declare.
4978 (target_terminal_info): Remove.
4979 * target.c (enum terminal_state, terminal_state): Remove.
4980 (target_terminal::terminal_state): Define.
4981 (target_terminal::init): Rename from target_terminal_init.
4982 (target_terminal::inferior): Rename from
4983 target_terminal_inferior.
4984 (target_terminal::ours): Rename from target_terminal_ours.
4985 (target_terminal::ours_for_output): Rename from
4986 target_terminal_ours_for_output.
4987 (target_terminal::info): New method.
4988 (cleanup_restore_target_terminal)
4989 (make_cleanup_restore_target_terminal): Remove.
4990 * solib.c (handle_solib_event): Update.
4991 * remote.c (remote_serial_quit_handler): Update.
4992 (remote_terminal_inferior, remote_wait_as): Update.
4993 * record-full.c (record_full_wait_1): Update.
4994 * nto-procfs.c (procfs_create_inferior): Update.
4995 * nat/fork-inferior.c (startup_inferior): Update.
4996 * mi/mi-interp.c (mi_new_thread, mi_thread_exit)
4997 (mi_record_changed, mi_inferior_added, mi_inferior_appeared)
4998 (mi_inferior_exit, mi_inferior_removed, mi_traceframe_changed)
4999 (mi_tsv_created, mi_tsv_deleted, mi_tsv_modified)
5000 (mi_breakpoint_created, mi_breakpoint_deleted)
5001 (mi_breakpoint_modified, mi_on_resume, mi_solib_loaded)
5002 (mi_solib_unloaded, mi_command_param_changed, mi_memory_changed)
5003 (mi_user_selected_context_changed, report_initial_inferior):
5005 * linux-nat.c (linux_nat_attach, linux_nat_terminal_ours)
5006 (linux_nat_terminal_inferior): Update.
5007 * infrun.c (follow_fork_inferior)
5008 (handle_vfork_child_exec_or_exit, do_target_resume)
5009 (check_curr_ui_sync_execution_done, handle_inferior_event_1)
5010 (handle_signal_stop, maybe_remove_breakpoints, normal_stop):
5012 * inflow.c (child_terminal_init, info_terminal_command): Update.
5013 * infcmd.c (post_create_inferior, continue_1, prepare_one_step)
5014 (attach_command): Update.
5015 * infcall.c (call_thread_fsm_should_stop): Update.
5016 * gnu-nat.c (gnu_attach): Update.
5017 * extension.c (struct active_ext_lang_state)
5018 (restore_active_ext_lang): Update.
5019 * exceptions.c (print_flush): Update.
5020 * event-top.c (async_enable_stdin, default_quit_handler): Update.
5021 (struct quit_handler_cleanup_data, restore_quit_handler)
5022 (restore_quit_handler_dtor, make_cleanup_override_quit_handler):
5024 * cp-support.c (gdb_demangle): Update.
5025 * breakpoint.c (update_inserted_breakpoint_locations)
5026 (insert_breakpoint_locations, handle_jit_event)
5027 (disable_breakpoints_in_unloaded_shlib): Update.
5028 * annotate.c (annotate_breakpoints_invalid)
5029 (annotate_frames_invalid): Update.
5031 2017-09-20 Tom Tromey <tom@tromey.com>
5033 * main.c (catch_command_errors): Rename from
5034 catch_command_errors_const.
5035 (captured_main_1): Update.
5037 2017-09-20 Pedro Alves <palves@redhat.com>
5039 * cli/cli-cmds.c (list_command): Use print_sal_location.
5040 (print_sal_location): New function.
5041 (ambiguous_line_spec): Use print_sal_location.
5042 * linespec.c (symbol_to_sal): Record the symbol in the sal.
5043 * symtab.c (find_function_start_sal): Likewise.
5044 * symtab.h (symtab_and_line::symbol): New field.
5046 2017-09-20 Pedro Alves <palves@redhat.com>
5048 * linespec.c (minsym_found): Handle non-text minsyms.
5049 (symbol_to_sal): Record a sal.pc for non-block, non-label symbols.
5051 2017-09-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
5053 * features/Makefile (i386-avx-mpx-avx512-pku.dat): Add missing
5056 2017-09-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
5058 * gdb.arch/i386-avx512.c (move_zmm_data_to_reg): Use
5059 vmovups instead vmovaps.
5060 (move_zmm_data_to_memory): Use vmovups instead vmovaps.
5062 2017-09-19 John Baldwin <jhb@FreeBSD.org>
5064 * NEWS (Changes since GDB 8.0): Add starti.
5065 * infcmd.c (enum run_break): New.
5066 (run_command_1): Queue pending event for RUN_STOP_AT_FIRST_INSN
5068 (run_command): Use enum run_how.
5069 (start_command): Likewise.
5070 (starti_command): New function.
5071 (RUN_ARGS_HELP): New macro.
5072 (_initialize_infcmd): Use RUN_ARGS_HELP for run and start
5073 commands. Add starti command.
5075 2017-09-19 Yao Qi <yao.qi@linaro.org>
5077 * Makefile.in (monitor.o): Remove the rule.
5079 2017-09-19 Yao Qi <yao.qi@linaro.org>
5081 * annotate.h (struct annotate_arg_emitter): Use
5082 DISABLE_COPY_AND_ASSIGN.
5083 * common/refcounted-object.h (refcounted_object): Likewise.
5084 * completer.h (struct completion_result): Likewise.
5085 * dwarf2read.c (struct dwarf2_per_objfile): Likewise.
5086 * filename-seen-cache.h (filename_seen_cache): Likewise.
5087 * gdbcore.h (thread_section_name): Likewise.
5088 * gdb_regex.h (compiled_regex): Likewise.
5089 * gdbthread.h (scoped_restore_current_thread): Likewise.
5090 * inferior.h (scoped_restore_current_inferior): Likewise.
5091 * jit.c (jit_reader): Likewise.
5092 * linespec.h (struct linespec_result): Likewise.
5093 * mi/mi-parse.h (struct mi_parse): Likewise.
5094 * nat/fork-inferior.c (execv_argv): Likewise.
5095 * progspace.h (scoped_restore_current_program_space): Likewise.
5096 * python/python-internal.h (class gdbpy_enter): Likewise.
5097 * regcache.h (regcache): Likewise.
5098 * target-descriptions.c (struct tdesc_reg): Likewise.
5099 (struct tdesc_type): Likewise.
5100 (struct tdesc_feature): Likewise.
5101 * ui-out.h (ui_out_emit_type): Likewise.
5103 2017-09-18 Simon Marchi <simon.marchi@ericsson.com>
5105 * dwarf2expr.c (dwarf_expr_context::execute_stack_op): Remove
5106 label abort_expression.
5108 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
5110 * common/buffer.c (buffer_xml_printf): Adjust.
5111 * common/xml-utils.c (xml_escape_text): Change return type to
5112 std::string, update code accordingly.
5113 * common/xml-utils.h (xml_escape_text): Change return type to
5115 * rs6000-aix-tdep.c (rs6000_aix_shared_library_to_xml): Adjust.
5116 * windows-tdep.c (windows_xfer_shared_library): Adjust.
5117 * unittests/xml-utils-selftests.c (test_xml_escape_text):
5120 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
5122 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add new source file.
5123 (SUBDIR_UNITTESTS_OBS): Add new object file.
5124 * unittests/xml-utils-selftests.c: New file.
5126 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
5128 * common/selftest.h (selftest): New struct/interface.
5129 (register_test): Add name parameter, add new overload.
5130 (run_tests): Add filter parameter.
5131 (for_each_selftest_ftype): New typedef.
5132 (for_each_selftest): New declaration.
5133 * common/selftest.c (tests): Change type to
5134 map<string, unique_ptr<selftest>>.
5135 (simple_selftest): New struct.
5136 (register_test): New function.
5137 (register_test): Add name parameter and use it.
5138 (run_tests): Add filter parameter and use it. Add prints.
5139 Adjust to vector -> map change.
5140 * aarch64-tdep.c (_initialize_aarch64_tdep): Add names when
5141 registering selftests.
5142 * arm-tdep.c (_initialize_arm_tdep): Likewise.
5143 * disasm-selftests.c (_initialize_disasm_selftests): Likewise.
5144 * dwarf2-frame.c (_initialize_dwarf2_frame): Likewise.
5145 * dwarf2loc.c (_initialize_dwarf2loc): Likewise.
5146 * findvar.c (_initialize_findvar): Likewise.
5147 * gdbarch-selftests.c (_initialize_gdbarch_selftests): Likewise.
5148 * maint.c (maintenance_selftest): Update call to run_tests.
5149 (maintenance_info_selftests): New function.
5150 (_initialize_maint_cmds): Register "maintenance info selftests"
5151 command. Update "maintenance selftest" doc.
5152 * regcache.c (_initialize_regcache): Add names when registering
5154 * rust-exp.y (_initialize_rust_exp): Likewise.
5155 * selftest-arch.c (gdbarch_selftest): New struct.
5156 (gdbarch_tests): Remove.
5157 (register_test_foreach_arch): Add name parameter. Call
5159 (tests_with_arch): Remove, move most content to
5160 gdbarch_selftest::operator().
5161 (_initialize_selftests_foreach_arch): Remove.
5162 * selftest-arch.h (register_test_foreach_arch): Add name
5164 (run_tests_with_arch): New declaration.
5165 * utils-selftests.c (_initialize_utils_selftests): Add names
5166 when registering selftests.
5167 * utils.c (_initialize_utils): Likewise.
5168 * unittests/array-view-selftests.c
5169 (_initialize_array_view_selftests): Likewise.
5170 * unittests/environ-selftests.c (_initialize_environ_selftests):
5172 * unittests/function-view-selftests.c
5173 (_initialize_function_view_selftests): Likewise.
5174 * unittests/offset-type-selftests.c
5175 (_initialize_offset_type_selftests): Likewise.
5176 * unittests/optional-selftests.c
5177 (_initialize_optional_selftests): Likewise.
5178 * unittests/scoped_restore-selftests.c
5179 (_initialize_scoped_restore_selftests): Likewise.
5180 * NEWS: Document "maintenance selftest" and "maint info
5183 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
5185 * mi/mi-main.c (mi_load_progress): Restore current_uiout using a
5188 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
5190 * mi/mi-main.c (mi_load_progress): Make uiout variable
5193 2017-09-15 Pedro Alves <palves@redhat.com>
5195 * compile/compile-c-types.c (convert_enum, convert_int)
5196 (convert_float): Adjust to refer to int_type_v0 and float_type_v0.
5198 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
5200 * dwarf2read.c (copy_string): Remove.
5201 (parse_macro_definition): Replace copy_string with savestring.
5203 2017-09-15 Yao Qi <yao.qi@linaro.org>
5205 * configure.tgt (i[34567]86-*-darwin*): Append amd64.o to
5207 (i[34567]86-*-solaris2.1[0-9]* | x86_64-*-solaris2.1[0-9]*):
5209 (i[34567]86-*-linux*): Likewise.
5211 2017-09-14 Simon Marchi <simon.marchi@ericsson.com>
5213 * dwarf2expr.h (dwarf_stack_value): Add constructor.
5214 (dwarf_expr_context) <~dwarf_expr_context>: Define as default.
5215 <stack>: Change type to std::vector.
5216 <stack_len, stack_allocated>: Remove.
5217 <grow_stack>: Remove.
5218 * dwarf2expr.c (dwarf_expr_context::dwarf_expr_context): Adjust.
5219 (dwarf_expr_context::~dwarf_expr_context): Remove.
5220 (dwarf_expr_context::grow_stack): Remove.
5221 (dwarf_expr_context::push): Adjust.
5222 (dwarf_expr_context::pop): Adjust.
5223 (dwarf_expr_context::fetch): Adjust.
5224 (dwarf_expr_context::fetch_in_stack_memory): Adjust.
5225 (dwarf_expr_context::stack_empty_p): Adjust.
5226 (dwarf_expr_context::execute_stack_op): Adjust.
5228 2017-09-14 Simon Marchi <simon.marchi@ericsson.com>
5230 * dwarf2expr.h (dwarf_expr_context) <stack_empty_p>: Change
5231 return type to bool.
5232 * dwarf2expr.c (dwarf_expr_context::stack_empty_p): Likewise.
5234 2017-09-14 Simon Marchi <simon.marchi@ericsson.com>
5236 * dwarf2expr.h (dwarf_expr_piece) <v.mem.in_stack_memory>:
5237 Change type to bool.
5238 (dwarf_stack_value) <in_stack_memory>: Likewise.
5239 (dwarf_expr_context) <push_address>: Change parameter type to
5241 <fetch_in_stack_memory>: Change return type to bool.
5242 <push>: Change parameter type to bool.
5243 * dwarf2expr.c (dwarf_expr_context::push): Change parameter type
5245 (dwarf_expr_context::push_address): Likewise.
5246 (dwarf_expr_context::fetch_in_stack_memory): Change return type
5248 (dwarf_expr_context::execute_stack_op): Adjust.
5249 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Adjust.
5251 2017-09-14 Simon Marchi <simon.marchi@ericsson.com>
5253 * dwarf2expr.h (struct dwarf_expr_piece): Move up.
5254 (struct dwarf_expr_context) <n_pieces>: Remove.
5255 <pieces>: Change type to std::vector.
5256 * dwarf2expr.c (dwarf_expr_context::dwarf_expr_context): Adjust.
5257 (dwarf_expr_context::~dwarf_expr_context): Don't manually free
5259 (dwarf_expr_context::add_piece): Adjust.
5260 * dwarf2loc.c (struct piece_closure): Initialize fields.
5262 <pieces>: Change type to std::vector.
5263 (allocate_piece_closure): Adjust, change parameter to
5264 std::vector rvalue and std::move it to piece_closure.
5265 (rw_pieced_value): Adjust.
5266 (check_pieced_synthetic_pointer): Adjust.
5267 (indirect_synthetic_pointer): Adjust.
5268 (coerce_pieced_ref): Adjust.
5269 (free_pieced_value_closure): Adjust. Use delete to free
5271 (dwarf2_evaluate_loc_desc_full): Adjust. std::move ctx.pieces
5272 to allocate_piece_closure.
5273 (dwarf2_loc_desc_get_symbol_read_needs): Adjust.
5275 2017-09-12 Simon Marchi <simon.marchi@ericsson.com>
5277 * probe.h (probe_ops_cp): Remove typedef.
5278 (DEF_VEC_P (probe_ops_cp)): Remove.
5279 (all_probe_ops): Change type to std::vector.
5280 * probe.c (info_probes_for_ops): Adjust to vector change.
5281 (probe_linespec_to_ops): Likewise.
5282 (all_probe_ops): Change type to std::vector.
5283 (_initialize_probe): Adjust to vector change.
5284 * dtrace-probe.c (_initialize_dtrace_probe): Likewise.
5285 * elfread.c (elf_get_probes): Likewise.
5286 * stap-probe.c (_initialize_stap_probe): Likewise.
5288 2017-09-12 Simon Marchi <simon.marchi@ericsson.com>
5290 * probe.h (struct bound_probe): Define constructors.
5291 * probe.c (bound_probe_s): Remove typedef.
5292 (DEF_VEC_O (bound_probe_s)): Remove VEC.
5293 (collect_probes): Change return type to std::vector, remove
5295 (compare_probes): Return bool, change parameter type. Change
5296 semantic to "less than".
5297 (gen_ui_out_table_header_info): Change parameter to std::vector
5299 (exists_probe_with_pops): Likewise.
5300 (info_probes_for_ops): Update to std::vector change.
5301 (enable_probes_command): Likewise.
5302 (disable_probes_command): Likewise.
5304 2017-09-12 Simon Marchi <simon.marchi@ericsson.com>
5306 * probe.h (struct probe_ops) <get_probes>: Change parameter from
5308 * probe.c (parse_probes_in_pspace): Update.
5309 (find_probes_in_objfile): Update.
5310 (find_probe_by_pc): Update.
5311 (collect_probes): Update.
5312 (probe_any_get_probes): Update.
5313 * symfile.h (struct sym_probe_fns) <sym_get_probes> Change
5314 return type to reference to std::vector.
5315 * dtrace-probe.c (dtrace_process_dof_probe): Change parameter to
5316 std::vector and update.
5317 (dtrace_process_dof): Likewise.
5318 (dtrace_get_probes): Likewise.
5319 * elfread.c (elf_get_probes): Change return type to std::vector,
5320 store an std::vector in bfd_data.
5321 (probe_key_free): Update to std::vector.
5322 * stap-probe.c (handle_stap_probe): Change parameter to
5323 std::vector and update.
5324 (stap_get_probes): Likewise.
5325 * symfile-debug.c (debug_sym_get_probes): Change return type to
5326 std::vector and update.
5328 2017-09-11 Tom Tromey <tom@tromey.com>
5330 * breakpoint.c (program_breakpoint_here_p): Update.
5331 * target.c (make_scoped_restore_show_memory_breakpoints): Rename
5332 from make_show_memory_breakpoints_cleanup. Return a
5333 scoped_restore_tmpl<int>.
5334 (restore_show_memory_breakpoints): Remove.
5335 * ppc-linux-tdep.c (ppc_linux_memory_remove_breakpoint): Update.
5336 * mem-break.c (memory_validate_breakpoint): Update.
5337 * ia64-tdep.c (ia64_memory_insert_breakpoint): Update.
5338 (ia64_memory_remove_breakpoint): Update.
5339 (ia64_breakpoint_from_pc): Update.
5340 * target.h (make_scoped_restore_show_memory_breakpoints): Rename
5341 from make_show_memory_breakpoints_cleanup.
5343 2017-09-11 Tom Tromey <tom@tromey.com>
5345 * d-namespace.c (d_lookup_symbol): Use std::string.
5346 (find_symbol_in_baseclass): Likewise.
5348 2017-09-11 Tom Tromey <tom@tromey.com>
5350 * ctf.c (ctf_start): Use std::string.
5352 2017-09-11 Tom Tromey <tom@tromey.com>
5354 * ada-lang.c (is_known_support_routine): Update.
5355 (ada_unhandled_exception_name_addr_from_raise): Update.
5356 * guile/scm-frame.c (gdbscm_frame_name): Update.
5357 * python/py-frame.c (frapy_name): Update.
5358 (frapy_function): Update.
5359 * stack.h (find_frame_funname): Update.
5360 * stack.c (find_frame_funname): Return unique_xmalloc_ptr.
5361 (print_frame): Update.
5363 2017-09-11 Tom Tromey <tom@tromey.com>
5365 * findcmd.c (put_bits): Take a gdb::byte_vector.
5366 (parse_find_args): Return gdb::byte_vector. "args" now const.
5367 Remove "pattern_bufp" and "pattern_lenp" parameters. Remove
5369 (find_command): Update.
5371 2017-09-11 Tom Tromey <tom@tromey.com>
5373 * cli/cli-script.c (class scoped_restore_hook_in): New.
5374 (clear_hook_in_cleanup): Remove.
5375 (execute_cmd_pre_hook, execute_cmd_post_hook): Use
5376 scoped_restore_hook_in.
5378 2017-09-11 Tom Tromey <tom@tromey.com>
5380 * cli/cli-script.c (restore_interp): Remove.
5381 (read_command_lines): Use scoped_restore_interp.
5382 * interps.c (scoped_restore_interp::set_temp): Rename from
5384 * interps.h (class scoped_restore_interp): New.
5385 (interp_set_temp): Remove.
5387 2017-09-11 Tom Tromey <tom@tromey.com>
5389 * mi/mi-cmd-catch.c (mi_cmd_catch_assert)
5390 (mi_cmd_catch_exception, mi_catch_load_unload): Update.
5391 * mi/mi-cmd-break.c (setup_breakpoint_reporting): Return a
5393 (mi_cmd_break_insert_1): Update.
5394 * mi/mi-cmd-break.h (setup_breakpoint_reporting): Return a
5397 2017-09-11 Tom Tromey <tom@tromey.com>
5399 * demangle.c (demangle_command): Update.
5400 * breakpoint.c (disable_command): Update.
5401 (enable_command): Update.
5402 (find_location_by_number): Make "number" const. Use
5404 * cli/cli-utils.c (extract_arg): Return std::string.
5405 * probe.c (parse_probe_linespec): Update. Change types.
5406 (collect_probes): Take string arguments.
5407 (parse_probe_linespec): Likewise.
5408 (info_probes_for_ops): Update.
5409 (enable_probes_command): Update.
5410 (disable_probes_command): Update.
5411 * break-catch-sig.c (catch_signal_split_args): Update.
5412 * mi/mi-parse.c (mi_parse): Update.
5414 2017-09-11 Tom Tromey <tom@tromey.com>
5416 * language.h (language_enum): Make argument const.
5417 * language.c (language_enum): Make argument const.
5419 2017-09-11 Tom Tromey <tom@tromey.com>
5421 * common/common-utils.h (skip_to_space): Remove macro, redeclare
5423 (skip_to_space): Rename from skip_to_space_const.
5424 * common/common-utils.c (skip_to_space): New function.
5425 (skip_to_space): Rename from skip_to_space_const.
5426 * cli/cli-utils.h (get_number): Rename from get_number_const.
5427 (extract_arg): Rename from extract_arg_const.
5428 * cli/cli-utils.c (get_number): Rename from get_number_const.
5429 (extract_arg): Rename from extract_arg_const.
5430 (number_or_range_parser::get_number): Use ::get_number.
5431 * aarch64-linux-tdep.c, ada-lang.c, arm-linux-tdep.c, ax-gdb.c,
5432 break-catch-throw.c, breakpoint.c, cli/cli-cmds.c, cli/cli-dump.c,
5433 cli/cli-script.c, cli/cli-setshow.c, compile/compile.c,
5434 completer.c, demangle.c, disasm.c, findcmd.c, linespec.c,
5435 linux-tdep.c, linux-thread-db.c, location.c, mi/mi-parse.c,
5436 minsyms.c, nat/linux-procfs.c, printcmd.c, probe.c,
5437 python/py-breakpoint.c, record.c, rust-exp.y, serial.c, stack.c,
5438 stap-probe.c, tid-parse.c, tracepoint.c: Update all callers.
5440 2017-09-11 Tom Tromey <tom@tromey.com>
5442 * python/python.c (do_start_initialization): Use
5443 py-event-types.def to initialize types.
5444 Define all object type structures.
5445 * python/python-internal.h: Don't declare event initialization
5447 * python/py-threadevent.c (thread_event_object_type): Don't
5449 * python/py-stopevent.c (stop_event_object_type): Don't define.
5450 * python/py-signalevent.c (signal_event_object_type): Don't
5452 * python/py-newobjfileevent.c (new_objfile_event_object_type)
5453 (clear_objfiles_event_object_type): Don't declare or define.
5454 * python/py-infevents.c (inferior_call_pre_event_object_type)
5455 (inferior_call_post_event_object_type)
5456 (register_changed_event_object_type)
5457 (memory_changed_event_object_type): Don't declare or define.
5458 * python/py-inferior.c (new_thread_event_object_type)
5459 (new_inferior_event_object_type)
5460 (inferior_deleted_event_object_type): Don't declare or define.
5461 * python/py-exitedevent.c (exited_event_object_type): Don't
5463 * python/py-evts.c (gdbpy_initialize_py_events): Use
5465 * python/py-events.h (thread_event_object_type): Don't declare.
5466 (events_object): Use py-all-events.def.
5467 * python/py-event.h (GDBPY_NEW_EVENT_TYPE): Remove. Use
5469 * python/py-event-types.def: New file.
5470 * python/py-continueevent.c (create_continue_event_object): Don't
5472 * python/py-bpevent.c (breakpoint_event_object_type): Don't
5474 * python/py-all-events.def: New file.
5476 2017-09-11 Tom Tromey <tom@tromey.com>
5478 * python/py-threadevent.c (create_thread_event_object): Return
5480 * python/py-stopevent.h (create_stop_event_object)
5481 (create_breakpoint_event_object, create_signal_event_object):
5483 * python/py-stopevent.c (create_stop_event_object): Return
5485 (emit_stop_event): Update.
5486 * python/py-signalevent.c (create_signal_event_object): Return
5488 * python/py-infevents.c (create_inferior_call_event_object):
5490 * python/py-event.h (create_event_object)
5491 (create_thread_event_object): Update.
5492 * python/py-event.c (create_event_object): Return gdbpy_ref.
5493 * python/py-continueevent.c: Return gdbpy_ref.
5494 * python/py-bpevent.c (create_breakpoint_event_object): Return
5497 2017-09-11 Tom Tromey <tom@tromey.com>
5501 * python/python.c (do_start_initialization): Initialize new event
5503 * python/python-internal.h (gdbpy_initialize_new_inferior_event)
5504 (gdbpy_initialize_inferior_deleted_event)
5505 (gdbpy_initialize_new_thread_event): Declare.
5506 * python/py-threadevent.c (create_thread_event_object): Add option
5508 * python/py-inferior.c (new_thread_event_object_type)
5509 (new_inferior_event_object_type)
5510 (inferior_deleted_event_object_type): Declare.
5511 (python_new_inferior, python_inferior_deleted): New functions.
5512 (add_thread_object): Emit new_thread event.
5513 (gdbpy_initialize_inferior): Attach new functions to corresponding
5515 (new_thread, new_inferior, inferior_deleted): Define new event
5517 * python/py-evts.c (gdbpy_initialize_py_events): Add new
5519 * python/py-events.h (events_object) <new_inferior,
5520 inferior_deleted, new_thread>: New fields.
5521 * python/py-event.h (create_thread_event_breakpoint): Add optional
5524 2017-09-10 Andrew Burgess <andrew.burgess@embecosm.com>
5526 * utils.c (abort_with_message): Don't compare gdb_stderr to NULL,
5527 check current_ui instead.
5528 (internal_vproblem): Likewise.
5530 2017-09-09 Simon Marchi <simon.marchi@ericsson.com>
5532 * thread.c (print_thread_info_1): Remove unnecessary calls to
5533 uiout->is_mi_like_p.
5535 2017-09-09 Tom Tromey <tom@tromey.com>
5537 * namespace.h (add_using_directive): Update.
5538 * namespace.c (add_using_directive): Change type of excludes to
5540 * dwarf2read.c (read_import_statement): Use std::vector.
5541 (read_namespace): Update.
5542 * cp-namespace.c (cp_scan_for_anonymous_namespaces): Update.
5544 2017-09-09 Tom Tromey <tom@tromey.com>
5546 * linespec.c (create_sals_line_offset): Use gdb::def_vector.
5548 2017-09-09 Tom Tromey <tom@tromey.com>
5550 * p-valprint.c (pascal_object_print_value): Use gdb::byte_vector.
5552 2017-09-09 Tom Tromey <tom@tromey.com>
5554 * stack.c (func_command): Use gdb::def_vector.
5556 2017-09-09 Tom Tromey <tom@tromey.com>
5558 * mi/mi-cmd-var.c (mi_cmd_var_list_children): Use gdb::optional,
5559 ui_out_emit_list, ui_out_emit_tuple.
5560 (mi_cmd_var_update): Likewise.
5562 2017-09-09 Tom Tromey <tom@tromey.com>
5564 * mi/mi-interp.c (mi_user_selected_context_changed): Use
5565 ui_out_redirect_pop.
5566 * guile/scm-ports.c (ioscm_with_output_to_port_worker): Use
5567 ui_out_redirect_pop.
5568 * utils.c (do_ui_out_redirect_pop)
5569 (make_cleanup_ui_out_redirect_pop): Remove.
5570 * top.c (execute_command_to_string): Use ui_out_redirect_pop.
5571 * utils.h (make_cleanup_ui_out_redirect_pop): Remove.
5572 * ui-out.h (ui_out_redirect_pop): New class.
5574 2017-09-09 Tom Tromey <tom@tromey.com>
5576 * mi/mi-main.c (output_cores): Use ui_out_emit_list.
5577 (list_available_thread_groups, mi_cmd_list_thread_groups)
5578 (mi_cmd_data_list_changed_registers, mi_cmd_data_read_memory)
5579 (mi_cmd_data_read_memory_bytes, mi_cmd_trace_frame_collected):
5582 2017-09-09 Tom Tromey <tom@tromey.com>
5584 * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn): Use
5587 2017-09-09 Tom Tromey <tom@tromey.com>
5589 * target.c (flash_erase_command): Use ui_out_emit_tuple.
5590 * stack.c (print_frame): Use ui_out_emit_tuple.
5591 * spu-tdep.c (info_spu_event_command): Use ui_out_emit_tuple.
5592 (info_spu_mailbox_command, info_spu_dma_command)
5593 (info_spu_proxydma_command): Likewise.
5594 * mi/mi-main.c (mi_cmd_trace_frame_collected): Use
5595 ui_out_emit_tuple, gdb::byte_vector, bin2hex.
5596 * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries): Use
5598 * breakpoint.c (print_it_watchpoint): Use ui_out_emit_tuple.
5600 2017-09-09 Tom Tromey <tom@tromey.com>
5602 * ui-out.h (make_cleanup_ui_out_table_begin_end): Remove.
5603 (class ui_out_emit_table): Update comment.
5604 * ui-out.c (do_cleanup_table_end)
5605 (make_cleanup_ui_out_table_begin_end): Remove.
5606 * spu-tdep.c (info_spu_mailbox_list): Use ui_out_emit_table.
5607 (info_spu_dma_cmdlist): Likewise.
5608 * probe.c (info_probes_for_ops): Use ui_out_emit_table.
5609 * darwin-nat-info.c (darwin_debug_regions_recurse): Use
5612 2017-09-09 Tom Tromey <tom@tromey.com>
5614 * thread.c (print_thread_info_1): Use ui_out_emit_table,
5615 ui_out_emit_list, gdb::optional.
5617 2017-09-09 John Baldwin <jhb@FreeBSD.org>
5619 * aarch64-linux-nat.c: Remove _initialize_aarch64_linux_nat
5621 * aarch64-linux-tdep.c: Remove _initialize_aarch64_linux_tdep
5623 * aarch64-newlib-tdep.c: Remove _initialize_aarch64_newlib_tdep
5625 * aarch64-tdep.c: Remove _initialize_aarch64_tdep prototype.
5626 * ada-exp.y: Remove _initialize_ada_exp prototype.
5627 * ada-lang.c: Remove _initialize_ada_language prototype.
5628 * ada-tasks.c: Remove _initialize_tasks prototype.
5629 * addrmap.c: Remove _initialize_addrmap prototype.
5630 * agent.c: Remove _initialize_agent prototype.
5631 * aix-thread.c: Remove _initialize_aix_thread prototype.
5632 * alpha-bsd-nat.c: Remove _initialize_alphabsd_nat prototype.
5633 * alpha-linux-nat.c: Remove _initialize_alpha_linux_nat prototype.
5634 * alpha-linux-tdep.c: Remove _initialize_alpha_linux_tdep
5636 * alpha-nbsd-tdep.c: Remove _initialize_alphanbsd_tdep prototype.
5637 * alpha-obsd-tdep.c: Remove _initialize_alphaobsd_tdep prototype.
5638 * alpha-tdep.c: Remove _initialize_alpha_tdep prototype.
5639 * amd64-darwin-tdep.c: Remove _initialize_amd64_darwin_tdep
5641 * amd64-dicos-tdep.c: Remove _initialize_amd64_dicos_tdep
5643 * amd64-fbsd-nat.c: Remove _initialize_amd64fbsd_nat prototype.
5644 * amd64-fbsd-tdep.c: Remove _initialize_amd64fbsd_tdep prototype.
5645 * amd64-linux-nat.c: Remove _initialize_amd64_linux_nat prototype.
5646 * amd64-linux-tdep.c: Remove _initialize_amd64_linux_tdep
5648 * amd64-nbsd-nat.c: Remove _initialize_amd64nbsd_nat prototype.
5649 * amd64-nbsd-tdep.c: Remove _initialize_amd64nbsd_tdep prototype.
5650 * amd64-obsd-nat.c: Remove _initialize_amd64obsd_nat prototype.
5651 * amd64-obsd-tdep.c: Remove _initialize_amd64obsd_tdep prototype.
5652 * amd64-sol2-tdep.c: Remove _initialize_amd64_sol2_tdep prototype.
5653 * amd64-tdep.c: Remove _initialize_amd64_tdep prototype.
5654 * amd64-windows-nat.c: Remove _initialize_amd64_windows_nat
5656 * amd64-windows-tdep.c: Remove _initialize_amd64_windows_tdep
5658 * annotate.c: Remove _initialize_annotate prototype.
5659 * arc-newlib-tdep.c: Remove _initialize_arc_newlib_tdep prototype.
5660 * arc-tdep.c: Remove _initialize_arc_tdep prototype.
5661 * arch-utils.c: Remove _initialize_gdbarch_utils prototype.
5662 * arm-linux-nat.c: Remove _initialize_arm_linux_nat prototype.
5663 * arm-linux-tdep.c: Remove _initialize_arm_linux_tdep prototype.
5664 * arm-nbsd-tdep.c: Remove _initialize_arm_netbsd_tdep prototype.
5665 * arm-obsd-tdep.c: Remove _initialize_armobsd_tdep prototype.
5666 * arm-symbian-tdep.c: Remove _initialize_arm_symbian_tdep
5668 * arm-tdep.c: Remove _initialize_arm_tdep prototype.
5669 * arm-wince-tdep.c: Remove _initialize_arm_wince_tdep prototype.
5670 * auto-load.c: Remove _initialize_auto_load prototype.
5671 * auxv.c: Remove _initialize_auxv prototype.
5672 * avr-tdep.c: Remove _initialize_avr_tdep prototype.
5673 * ax-gdb.c: Remove _initialize_ax_gdb prototype.
5674 * bfin-linux-tdep.c: Remove _initialize_bfin_linux_tdep prototype.
5675 * bfin-tdep.c: Remove _initialize_bfin_tdep prototype.
5676 * break-catch-sig.c: Remove _initialize_break_catch_sig prototype.
5677 * break-catch-syscall.c: Remove _initialize_break_catch_syscall
5679 * break-catch-throw.c: Remove _initialize_break_catch_throw
5681 * breakpoint.c: Remove _initialize_breakpoint prototype.
5682 * bsd-uthread.c: Remove _initialize_bsd_uthread prototype.
5683 * btrace.c: Remove _initialize_btrace prototype.
5684 * charset.c: Remove _initialize_charset prototype.
5685 * cli/cli-cmds.c: Remove _initialize_cli_cmds prototype.
5686 * cli/cli-dump.c: Remove _initialize_cli_dump prototype.
5687 * cli/cli-interp.c: Remove _initialize_cli_interp prototype.
5688 * cli/cli-logging.c: Remove _initialize_cli_logging prototype.
5689 * cli/cli-script.c: Remove _initialize_cli_script prototype.
5690 * coff-pe-read.c: Remove _initialize_coff_pe_read prototype.
5691 * coffread.c: Remove _initialize_coffread prototype.
5692 * compile/compile.c: Remove _initialize_compile prototype.
5693 * complaints.c: Remove _initialize_complaints prototype.
5694 * completer.c: Remove _initialize_completer prototype.
5695 * copying.awk: Remove _initialize_copying prototype.
5696 * copying.c: Regenerate.
5697 * core-regset.c: Remove _initialize_core_regset prototype.
5698 * corefile.c: Remove _initialize_core prototype.
5699 * corelow.c: Remove _initialize_corelow prototype.
5700 * cp-abi.c: Remove _initialize_cp_abi prototype.
5701 * cp-namespace.c: Remove _initialize_cp_namespace prototype.
5702 * cp-support.c: Remove _initialize_cp_support prototype.
5703 * cp-valprint.c: Remove _initialize_cp_valprint prototype.
5704 * cris-linux-tdep.c: Remove _initialize_cris_linux_tdep prototype.
5705 * cris-tdep.c: Remove _initialize_cris_tdep prototype.
5706 * ctf.c: Remove _initialize_ctf prototype.
5707 * d-lang.c: Remove _initialize_d_language prototype.
5708 * darwin-nat-info.c: Remove _initialize_darwin_info_commands
5710 * darwin-nat.c: Remove _initialize_darwin_inferior prototype.
5711 * dbxread.c: Remove _initialize_dbxread prototype.
5712 * dcache.c: Remove _initialize_dcache prototype.
5713 * demangle.c: Remove _initialize_demangler prototype.
5714 * disasm-selftests.c: Remove _initialize_disasm_selftests
5716 * disasm.c: Remove _initialize_disasm prototype.
5717 * dtrace-probe.c: Remove _initialize_dtrace_probe prototype.
5718 * dummy-frame.c: Remove _initialize_dummy_frame prototype.
5719 * dwarf2-frame-tailcall.c: Remove _initialize_tailcall_frame
5721 * dwarf2-frame.c: Remove _initialize_dwarf2_frame prototype.
5722 * dwarf2expr.c: Remove _initialize_dwarf2expr prototype.
5723 * dwarf2loc.c: Remove _initialize_dwarf2loc prototype.
5724 * dwarf2read.c: Remove _initialize_dwarf2_read prototype.
5725 * elfread.c: Remove _initialize_elfread prototype.
5726 * exec.c: Remove _initialize_exec prototype.
5727 * extension.c: Remove _initialize_extension prototype.
5728 * f-lang.c: Remove _initialize_f_language prototype.
5729 * f-valprint.c: Remove _initialize_f_valprint prototype.
5730 * fbsd-nat.c: Remove _initialize_fbsd_nat prototype.
5731 * fbsd-tdep.c: Remove _initialize_fbsd_tdep prototype.
5732 * filesystem.c: Remove _initialize_filesystem prototype.
5733 * findcmd.c: Remove _initialize_mem_search prototype.
5734 * fork-child.c: Remove _initialize_fork_child prototype.
5735 * frame-base.c: Remove _initialize_frame_base prototype.
5736 * frame-unwind.c: Remove _initialize_frame_unwind prototype.
5737 * frame.c: Remove _initialize_frame prototype.
5738 * frv-linux-tdep.c: Remove _initialize_frv_linux_tdep prototype.
5739 * frv-tdep.c: Remove _initialize_frv_tdep prototype.
5740 * ft32-tdep.c: Remove _initialize_ft32_tdep prototype.
5741 * gcore.c: Remove _initialize_gcore prototype.
5742 * gdb_bfd.c: Remove _initialize_gdb_bfd prototype.
5743 * gdbarch.c: Regenerate.
5744 * gdbarch.sh: Remove _initialize_gdbarch prototype.
5745 * gdbtypes.c: Remove _initialize_gdbtypes prototype.
5746 * gnu-nat.c: Remove _initialize_gnu_nat prototype.
5747 * gnu-v2-abi.c: Remove _initialize_gnu_v2_abi prototype.
5748 * gnu-v3-abi.c: Remove _initialize_gnu_v3_abi prototype.
5749 * go-lang.c: Remove _initialize_go_language prototype.
5750 * go32-nat.c: Remove _initialize_go32_nat prototype.
5751 * guile/guile.c: Remove _initialize_guile prototype.
5752 * h8300-tdep.c: Remove _initialize_h8300_tdep prototype.
5753 * hppa-linux-nat.c: Remove _initialize_hppa_linux_nat prototype.
5754 * hppa-linux-tdep.c: Remove _initialize_hppa_linux_tdep prototype.
5755 * hppa-nbsd-nat.c: Remove _initialize_hppanbsd_nat prototype.
5756 * hppa-nbsd-tdep.c: Remove _initialize_hppanbsd_tdep prototype.
5757 * hppa-obsd-nat.c: Remove _initialize_hppaobsd_nat prototype.
5758 * hppa-obsd-tdep.c: Remove _initialize_hppaobsd_tdep prototype.
5759 * hppa-tdep.c: Remove _initialize_hppa_tdep prototype.
5760 * i386-bsd-nat.c: Remove _initialize_i386bsd_nat prototype.
5761 * i386-cygwin-tdep.c: Remove _initialize_i386_cygwin_tdep
5763 * i386-darwin-tdep.c: Remove _initialize_i386_darwin_tdep
5765 * i386-dicos-tdep.c: Remove _initialize_i386_dicos_tdep prototype.
5766 * i386-fbsd-nat.c: Remove _initialize_i386fbsd_nat prototype.
5767 * i386-fbsd-tdep.c: Remove _initialize_i386fbsd_tdep prototype.
5768 * i386-gnu-nat.c: Remove _initialize_i386gnu_nat prototype.
5769 * i386-gnu-tdep.c: Remove _initialize_i386gnu_tdep prototype.
5770 * i386-linux-nat.c: Remove _initialize_i386_linux_nat prototype.
5771 * i386-linux-tdep.c: Remove _initialize_i386_linux_tdep prototype.
5772 * i386-nbsd-nat.c: Remove _initialize_i386nbsd_nat prototype.
5773 * i386-nbsd-tdep.c: Remove _initialize_i386nbsd_tdep prototype.
5774 * i386-nto-tdep.c: Remove _initialize_i386nto_tdep prototype.
5775 * i386-obsd-nat.c: Remove _initialize_i386obsd_nat prototype.
5776 * i386-obsd-tdep.c: Remove _initialize_i386obsd_tdep prototype.
5777 * i386-sol2-nat.c: Remove _initialize_amd64_sol2_nat prototype.
5778 * i386-sol2-tdep.c: Remove _initialize_amd64_sol2_tdep prototype.
5779 * i386-tdep.c: Remove _initialize_i386_tdep prototype.
5780 * i386-windows-nat.c: Remove _initialize_i386_windows_nat
5782 * ia64-libunwind-tdep.c: Remove _initialize_libunwind_frame
5784 * ia64-linux-nat.c: Remove _initialize_ia64_linux_nat prototype.
5785 * ia64-linux-tdep.c: Remove _initialize_ia64_linux_tdep prototype.
5786 * ia64-tdep.c: Remove _initialize_ia64_tdep prototype.
5787 * ia64-vms-tdep.c: Remove _initialize_ia64_vms_tdep prototype.
5788 * infcall.c: Remove _initialize_infcall prototype.
5789 * infcmd.c: Remove _initialize_infcmd prototype.
5790 * inferior.c: Remove _initialize_inferiors prototype.
5791 * inflow.c: Remove _initialize_inflow prototype.
5792 * infrun.c: Remove _initialize_infrun prototype.
5793 * interps.c: Remove _initialize_interpreter prototype.
5794 * iq2000-tdep.c: Remove _initialize_iq2000_tdep prototype.
5795 * jit.c: Remove _initialize_jit prototype.
5796 * language.c: Remove _initialize_language prototype.
5797 * linux-fork.c: Remove _initialize_linux_fork prototype.
5798 * linux-nat.c: Remove _initialize_linux_nat prototype.
5799 * linux-tdep.c: Remove _initialize_linux_tdep prototype.
5800 * linux-thread-db.c: Remove _initialize_thread_db prototype.
5801 * lm32-tdep.c: Remove _initialize_lm32_tdep prototype.
5802 * m2-lang.c: Remove _initialize_m2_language prototype.
5803 * m32c-tdep.c: Remove _initialize_m32c_tdep prototype.
5804 * m32r-linux-nat.c: Remove _initialize_m32r_linux_nat prototype.
5805 * m32r-linux-tdep.c: Remove _initialize_m32r_linux_tdep prototype.
5806 * m32r-tdep.c: Remove _initialize_m32r_tdep prototype.
5807 * m68hc11-tdep.c: Remove _initialize_m68hc11_tdep prototype.
5808 * m68k-bsd-nat.c: Remove _initialize_m68kbsd_nat prototype.
5809 * m68k-bsd-tdep.c: Remove _initialize_m68kbsd_tdep prototype.
5810 * m68k-linux-nat.c: Remove _initialize_m68k_linux_tdep prototype.
5811 * m68k-linux-tdep.c: Remove _initialize_m68k_linux_tdep prototype.
5812 * m68k-tdep.c: Remove _initialize_m68k_tdep prototype.
5813 * m88k-bsd-nat.c: Remove _initialize_m68kbsd_nat prototype.
5814 * m88k-tdep.c: Remove _initialize_m68kbsd_tdep prototype.
5815 * machoread.c: Remove _initialize_machoread prototype.
5816 * macrocmd.c: Remove _initialize_macrocmd prototype.
5817 * macroscope.c: Remove _initialize_macroscope prototype.
5818 * maint.c: Remove _initialize_maint_cmds prototype.
5819 * mdebugread.c: Remove _initialize_mdebugread prototype.
5820 * memattr.c: Remove _initialize_mem prototype.
5821 * mep-tdep.c: Remove _initialize_mep_tdep prototype.
5822 * mi/mi-cmd-env.c: Remove _initialize_mi_cmd_env prototype.
5823 * mi/mi-cmds.c: Remove _initialize_mi_cmds prototype.
5824 * mi/mi-interp.c: Remove _initialize_mi_interp prototype.
5825 * mi/mi-main.c: Remove _initialize_mi_main prototype.
5826 * microblaze-linux-tdep.c: Remove
5827 _initialize_microblaze_linux_tdep prototype.
5828 * microblaze-tdep.c: Remove _initialize_microblaze_tdep prototype.
5829 * mips-fbsd-nat.c: Remove _initialize_mips_fbsd_nat prototype.
5830 * mips-fbsd-tdep.c: Remove _initialize_mips_fbsd_tdep prototype.
5831 * mips-linux-nat.c: Remove _initialize_mips_linux_nat prototype.
5832 * mips-linux-tdep.c: Remove _initialize_mips_linux_tdep prototype.
5833 * mips-nbsd-nat.c: Remove _initialize_mipsnbsd_nat prototype.
5834 * mips-nbsd-tdep.c: Remove _initialize_mipsnbsd_tdep prototype.
5835 * mips-sde-tdep.c: Remove _initialize_mips_sde_tdep prototype.
5836 * mips-tdep.c: Remove _initialize_mips_tdep prototype.
5837 * mips64-obsd-nat.c: Remove _initialize_mips64obsd_nat prototype.
5838 * mips64-obsd-tdep.c: Remove _initialize_mips64obsd_tdep
5840 * mipsread.c: Remove _initialize_mipsread prototype.
5841 * mn10300-linux-tdep.c: Remove _initialize_mn10300_linux_tdep
5843 * mn10300-tdep.c: Remove _initialize_mn10300_tdep prototype.
5844 * moxie-tdep.c: Remove _initialize_moxie_tdep prototype.
5845 * msp430-tdep.c: Remove _initialize_msp430_tdep prototype.
5846 * mt-tdep.c: Remove _initialize_mt_tdep prototype.
5847 * nds32-tdep.c: Remove _initialize_nds32_tdep prototype.
5848 * nios2-linux-tdep.c: Remove _initialize_nios2_linux_tdep
5850 * nios2-tdep.c: Remove _initialize_nios2_tdep prototype.
5851 * nto-procfs.c: Remove _initialize_procfs prototype.
5852 * nto-tdep.c: Remove _initialize_nto_tdep prototype.
5853 * objc-lang.c: Remove _initialize_objc_language prototype.
5854 * objfiles.c: Remove _initialize_objfiles prototype.
5855 * observer.c: Remove observer_test_first_notification_function,
5856 observer_test_second_notification_function,
5857 observer_test_third_notification_function, and
5858 _initialize_observer prototypes.
5859 * opencl-lang.c: Remove _initialize_opencl_language prototypes.
5860 * osabi.c: Remove _initialize_gdb_osabi prototype.
5861 * osdata.c: Remove _initialize_osdata prototype.
5862 * p-valprint.c: Remove _initialize_pascal_valprint prototype.
5863 * parse.c: Remove _initialize_parse prototype.
5864 * ppc-fbsd-nat.c: Remove _initialize_ppcfbsd_nat prototype.
5865 * ppc-fbsd-tdep.c: Remove _initialize_ppcfbsd_tdep prototype.
5866 * ppc-linux-nat.c: Remove _initialize_ppc_linux_nat prototype.
5867 * ppc-linux-tdep.c: Remove _initialize_ppc_linux_tdep prototype.
5868 * ppc-nbsd-nat.c: Remove _initialize_ppcnbsd_nat prototype.
5869 * ppc-nbsd-tdep.c: Remove _initialize_ppcnbsd_tdep prototype.
5870 * ppc-obsd-nat.c: Remove _initialize_ppcobsd_nat prototype.
5871 * ppc-obsd-tdep.c: Remove _initialize_ppcobsd_tdep prototype.
5872 * printcmd.c: Remove _initialize_printcmd prototype.
5873 * probe.c: Remove _initialize_probe prototype.
5874 * proc-api.c: Remove _initialize_proc_api prototype.
5875 * proc-events.c: Remove _initialize_proc_events prototype.
5876 * proc-service.c: Remove _initialize_proc_service prototype.
5877 * procfs.c: Remove _initialize_procfs prototype.
5878 * psymtab.c: Remove _initialize_psymtab prototype.
5879 * python/python.c: Remove _initialize_python prototype.
5880 * ravenscar-thread.c: Remove _initialize_ravenscar prototype.
5881 * record-btrace.c: Remove _initialize_record_btrace prototype.
5882 * record-full.c: Remove _initialize_record_full prototype.
5883 * record.c: Remove _initialize_record prototype.
5884 * regcache.c: Remove _initialize_regcache prototype.
5885 * reggroups.c: Remove _initialize_reggroup prototype.
5886 * remote-notif.c: Remove _initialize_notif prototype.
5887 * remote-sim.c: Remove _initialize_remote_sim prototype.
5888 * remote.c: Remove _initialize_remote prototype.
5889 * reverse.c: Remove _initialize_reverse prototype.
5890 * rl78-tdep.c: Remove _initialize_rl78_tdep prototype.
5891 * rs6000-aix-tdep.c: Remove _initialize_rs6000_aix_tdep prototype.
5892 * rs6000-lynx178-tdep.c: Remove _initialize_rs6000_lynx178_tdep
5894 * rs6000-nat.c: Remove _initialize_rs6000_nat prototype.
5895 * rs6000-tdep.c: Remove _initialize_rs6000_tdep prototype.
5896 * rust-exp.y: Remove _initialize_rust_exp prototype.
5897 * rx-tdep.c: Remove _initialize_rx_tdep prototype.
5898 * s390-linux-nat.c: Remove _initialize_s390_nat prototype.
5899 * s390-linux-tdep.c: Remove _initialize_s390_tdep prototype.
5900 * score-tdep.c: Remove _initialize_score_tdep prototype.
5901 * selftest-arch.c: Remove _initialize_selftests_foreach_arch
5903 * ser-go32.c: Remove _initialize_ser_dos prototype.
5904 * ser-mingw.c: Remove _initialize_ser_windows prototype.
5905 * ser-pipe.c: Remove _initialize_ser_pipe prototype.
5906 * ser-tcp.c: Remove _initialize_ser_tcp prototype.
5907 * ser-unix.c: Remove _initialize_ser_hardwire prototype.
5908 * serial.c: Remove _initialize_serial prototype.
5909 * sh-linux-tdep.c: Remove _initialize_sh_linux_tdep prototype.
5910 * sh-nbsd-nat.c: Remove _initialize_shnbsd_nat prototype.
5911 * sh-nbsd-tdep.c: Remove _initialize_shnbsd_tdep prototype.
5912 * sh-tdep.c: Remove _initialize_sh_tdep prototype.
5913 * skip.c: Remove _initialize_step_skip prototype.
5914 * sol-thread.c: Remove _initialize_sol_thread prototype.
5915 * solib-aix.c: Remove _initialize_solib_aix prototype.
5916 * solib-darwin.c: Remove _initialize_darwin_solib prototype.
5917 * solib-dsbt.c: Remove _initialize_dsbt_solib prototype.
5918 * solib-frv.c: Remove _initialize_frv_solib prototype.
5919 * solib-spu.c: Remove _initialize_spu_solib prototype.
5920 * solib-svr4.c: Remove _initialize_svr4_solib prototype.
5921 * solib-target.c: Remove _initialize_solib_target prototype.
5922 * solib.c: Remove _initialize_solib prototype.
5923 * source.c: Remove _initialize_source prototype.
5924 * sparc-linux-nat.c: Remove _initialize_sparc_linux_nat prototype.
5925 * sparc-linux-tdep.c: Remove _initialize_sparc_linux_tdep
5927 * sparc-nat.c: Remove _initialize_sparc_nat prototype.
5928 * sparc-nbsd-nat.c: Remove _initialize_sparcnbsd_nat prototype.
5929 * sparc-nbsd-tdep.c: Remove _initialize_sparcnbsd_tdep prototype.
5930 * sparc-obsd-tdep.c: Remove _initialize_sparc32obsd_tdep
5932 * sparc-sol2-nat.c: Remove _initialize_sparc_sol2_nat prototype.
5933 * sparc-sol2-tdep.c: Remove _initialize_sparc_sol2_tdep prototype.
5934 * sparc-tdep.c: Remove _initialize_sparc_tdep prototype.
5935 * sparc64-fbsd-nat.c: Remove _initialize_sparc64fbsd_nat
5937 * sparc64-fbsd-tdep.c: Remove _initialize_sparc64fbsd_tdep
5939 * sparc64-linux-nat.c: Remove _initialize_sparc64_linux_nat
5941 * sparc64-linux-tdep.c: Remove _initialize_sparc64_linux_tdep
5943 * sparc64-nat.c: Remove _initialize_sparc64_nat prototype.
5944 * sparc64-nbsd-nat.c: Remove _initialize_sparc64nbsd_nat
5946 * sparc64-nbsd-tdep.c: Remove _initialize_sparc64nbsd_tdep
5948 * sparc64-obsd-nat.c: Remove _initialize_sparc64obsd_nat
5950 * sparc64-obsd-tdep.c: Remove _initialize_sparc64obsd_tdep
5952 * sparc64-sol2-tdep.c: Remove _initialize_sparc64_sol2_tdep
5954 * spu-linux-nat.c: Remove _initialize_spu_nat prototype.
5955 * spu-multiarch.c: Remove _initialize_spu_multiarch prototype.
5956 * spu-tdep.c: Remove _initialize_spu_tdep prototype.
5957 * stabsread.c: Remove _initialize_stabsread prototype.
5958 * stack.c: Remove _initialize_stack prototype.
5959 * stap-probe.c: Remove _initialize_stap_probe prototype.
5960 * std-regs.c: Remove _initialize_frame_reg prototype.
5961 * symfile-debug.c: Remove _initialize_symfile_debug prototype.
5962 * symfile-mem.c: Remove _initialize_symfile_mem prototype.
5963 * symfile.c: Remove _initialize_symfile prototype.
5964 * symmisc.c: Remove _initialize_symmisc prototype.
5965 * symtab.c: Remove _initialize_symtab prototype.
5966 * target-dcache.c: Remove _initialize_target_dcache prototype.
5967 * target-descriptions.c: Remove _initialize_target_descriptions
5969 * thread.c: Remove _initialize_thread prototype.
5970 * tic6x-linux-tdep.c: Remove _initialize_tic6x_linux_tdep
5972 * tic6x-tdep.c: Remove _initialize_tic6x_tdep prototype.
5973 * tilegx-linux-nat.c: Remove _initialize_tile_linux_nat prototype.
5974 * tilegx-linux-tdep.c: Remove _initialize_tilegx_linux_tdep
5976 * tilegx-tdep.c: Remove _initialize_tilegx_tdep prototype.
5977 * tracefile-tfile.c: Remove _initialize_tracefile_tfile prototype.
5978 * tracefile.c: Remove _initialize_tracefile prototype.
5979 * tracepoint.c: Remove _initialize_tracepoint prototype.
5980 * tui/tui-hooks.c: Remove _initialize_tui_hooks prototype.
5981 * tui/tui-interp.c: Remove _initialize_tui_interp prototype.
5982 * tui/tui-layout.c: Remove _initialize_tui_layout prototype.
5983 * tui/tui-regs.c: Remove _initialize_tui_regs prototype.
5984 * tui/tui-stack.c: Remove _initialize_tui_stack prototype.
5985 * tui/tui-win.c: Remove _initialize_tui_win prototype.
5986 * tui/tui.c: Remove _initialize_tui prototype.
5987 * typeprint.c: Remove _initialize_typeprint prototype.
5988 * user-regs.c: Remove _initialize_user_regs prototype.
5989 * utils.c: Remove _initialize_utils prototype.
5990 * v850-tdep.c: Remove _initialize_v850_tdep prototype.
5991 * valarith.c: Remove _initialize_valarith prototype.
5992 * valops.c: Remove _initialize_valops prototype.
5993 * valprint.c: Remove _initialize_valprint prototype.
5994 * value.c: Remove _initialize_values prototype.
5995 * varobj.c: Remove _initialize_varobj prototype.
5996 * vax-bsd-nat.c: Remove _initialize_vaxbsd_nat prototype.
5997 * vax-nbsd-tdep.c: Remove _initialize_vaxnbsd_tdep prototype.
5998 * vax-tdep.c: Remove _initialize_vax_tdep prototype.
5999 * windows-nat.c: Remove _initialize_windows_nat,
6000 _initialize_check_for_gdb_ini, and _initialize_loadable
6002 * windows-tdep.c: Remove _initialize_windows_tdep prototype.
6003 * xcoffread.c: Remove _initialize_xcoffread prototype.
6004 * xml-support.c: Remove _initialize_xml_support prototype.
6005 * xstormy16-tdep.c: Remove _initialize_xstormy16_tdep prototype.
6006 * xtensa-linux-nat.c: Remove _initialize_xtensa_linux_nat
6008 * xtensa-linux-tdep.c: Remove _initialize_xtensa_linux_tdep
6010 * xtensa-tdep.c: Remove _initialize_xtensa_tdep prototype.
6012 2017-09-08 Keith Seitz <keiths@redhat.com>
6014 * dwarf2read.c (struct field_info) <fnfields>: Remove unused
6017 2017-09-08 Christoph Weinmann <christoph.t.weinmann@intel.com>
6019 * f-valprint.c (f_val_print): Remove check for one byte
6020 sized integers. Remove printing of character type.
6022 2017-09-08 Frank Penczek <frank.penczek@intel.com>
6023 Christoph Weinmann <christoph.t.weinmann@intel.com>
6024 Bernhard Heckel <bernhard.heckel@intel.com>
6026 * f-typeprint.c (f_type_print_base): Use fprintfi_filtered
6027 to maintain proper indentation when printing pointers/refs.
6029 2017-09-07 Joel Brobecker <brobecker@adacore.com>
6033 2017-09-07 Joel Brobecker <brobecker@adacore.com>
6035 * NEWS (Changes in GDB 7.11): Remove entry for QStartupWithShell.
6037 2017-09-05 Tom Tromey <tom@tromey.com>
6039 * parse.c (funcall_chain): Now a std::vector.
6040 (start_arglist, end_arglist): Simplify.
6041 (free_funcalls): Remove.
6042 (parse_exp_in_context_1): Remove cleanup.
6044 2017-09-05 Tom Tromey <tom@tromey.com>
6046 * go-exp.y (go_parse): Don't create a cleanup.
6048 2017-09-05 Tom Tromey <tom@tromey.com>
6050 * d-exp.y (PrimaryExpression): Use std::string.
6051 (d_parse): Don't create a cleanup.
6053 2017-09-05 Tom Tromey <tom@tromey.com>
6055 * utils.c (do_clear_parser_state): Remove.
6056 (make_cleanup_clear_parser_state): Remove.
6057 * p-exp.y (pascal_parse): Use scoped_restore.
6058 * m2-exp.y (m2_parse): Use scoped_restore.
6059 * f-exp.y (f_parse): Use scoped_restore.
6060 * d-exp.y (d_parse): Use scoped_restore.
6061 * c-exp.y (c_parse): Use scoped_restore.
6062 * ada-exp.y (ada_parse): Use scoped_restore.
6063 * utils.h (make_cleanup_clear_parser_state): Remove.
6065 2017-09-06 Keith Seitz <keiths@redhat.com>
6067 * dwarf2read.c (dw2_linkage_name_attr): New function.
6068 (dw2_linkage_name): New function.
6069 (dwarf2_compute_name, dwarf2_physname, read_call_site_scope)
6070 (guess_full_die_structure_name, dwarf2_name): Use dw2_linkage_name.
6071 (anonymous_struct_prefix, dwarf2_name): Use dw2_linkage_name_attr.
6073 2017-09-06 Kamil Rytarowski <n54@gmx.com>
6075 * config/djgpp/djconfig.sh: Correct shell portability issue.
6077 2017-09-06 Kamil Rytarowski <n54@gmx.com>
6079 * configure.nat: Define HAVE_NATIVE_GCORE_HOST on NetBSD.
6081 2017-09-06 John Baldwin <jhb@FreeBSD.org>
6083 * Makefile.in (ALLDEPFILES): Add mips-fbsd-nat.c.
6084 * NEWS: Mention new FreeBSD/mips native configuration.
6085 * configure.host: Add aarch64*-*-freebsd*.
6086 * configure.nat: Likewise.
6087 * aarch64-fbsd-nat.c: New file.
6089 2017-09-06 John Baldwin <jhb@FreeBSD.org>
6091 * Makefile.in (ALL_64_TARGET_OBS): Add aarch64-fbsd-tdep.o.
6092 (ALLDEPFILES): Add aarch64-fbsd-tdep.c.
6093 * NEWS: Mention new FreeBSD/aarch64 target.
6094 * configure.tgt: Add aarch64*-*-freebsd*.
6095 * aarch64-fbsd-tdep.c: New file.
6096 * aarch64-fbsd-tdep.h: New file.
6098 2017-09-06 Kamil Rytarowski <n54@gmx.com>
6100 * MAINTAINERS (Write After Approval): Add Kamil Rytarowski.
6102 2017-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
6104 * parse.c (find_minsym_type_and_address): Don't relocate addresses
6107 2017-09-05 Philippe Waroquiers <philippe.waroquiers@skynet.be>
6109 * objfiles.c (get_objfile_bfd_data): Remove useless obstack_init
6112 2017-09-05 Simon Marchi <simon.marchi@ericsson.com>
6114 * infrun.c (follow_exec): Call add_thread after
6115 target_find_description.
6117 2017-09-05 Simon Marchi <simon.marchi@ericsson.com>
6119 * infrun.c (handle_inferior_event_1): When exec'ing, read
6120 stop_pc after follow_exec.
6122 2017-09-05 Simon Marchi <simon.marchi@ericsson.com>
6124 * remote.c (process_g_packet): Update error message.
6126 2017-09-05 Yao Qi <yao.qi@linaro.org>
6128 * configure.tgt (gdb_target_obs): Add i386.o for x86_64-*
6131 2017-09-05 Pedro Alves <palves@redhat.com>
6133 * eval.c (eval_call, evaluate_funcall): New functions, factored
6135 (evaluate_subexp_standard): ... this.
6137 2017-09-05 Yao Qi <yao.qi@linaro.org>
6139 * amd64-tdep.c (amd64_target_description): Create target
6141 (_initialize_amd64_tdep): Don't call functions
6142 initialize_tdesc_amd64_*. Add self tests.
6143 * arch/amd64.c (amd64_create_target_description): Add parameter
6144 is_linux. Call set_tdesc_osabi if is_linux is true.
6145 * arch/amd64.h (amd64_create_target_description): Update the
6147 * arch/i386.c (i386_create_target_description): Add parameter
6148 is_linux. Call set_tdesc_osabi if is_linux is true.
6149 * arch/i386.h (i386_create_target_description): Update
6151 * configure.tgt: Add i386.o to gdb_target_obs.
6152 * features/Makefile (XMLTOC): Remove i386/*.xml.
6153 * features/i386/amd64-avx-avx512.c: Remove.
6154 * features/i386/amd64-avx-mpx-avx512-pku.c: Remove.
6155 * features/i386/amd64-avx-mpx.c: Remove.
6156 * features/i386/amd64-avx.c: Remove.
6157 * features/i386/amd64-mpx.c: Remove.
6158 * features/i386/amd64.c: Remove.
6159 * features/i386/i386-avx-avx512.c: Remove.
6160 * features/i386/i386-avx-mpx-avx512-pku.c: Remove.
6161 * features/i386/i386-avx-mpx.c: Remove.
6162 * features/i386/i386-avx.c: Remove.
6163 * features/i386/i386-mmx.c: Remove.
6164 * features/i386/i386-mpx.c: Remove.
6165 * features/i386/i386.c: Remove.
6166 * i386-tdep.c: Don't include features/i386/i386*.c., include
6167 target-descriptions.h and arch/i386.h.
6168 (i386_target_description): Create target descriptions.
6169 (i386_gdbarch_init): Don't call initialize_tdesc_i386_*
6170 functions. Do self tests.
6172 2017-09-05 Yao Qi <yao.qi@linaro.org>
6174 * features/Makefile (XMLTOC): Remove i386/amd64XXX-linux.xml.
6175 * features/i386/amd64-avx-avx512-linux.c: Removed.
6176 * features/i386/amd64-avx-linux.c: Removed.
6177 * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Removed.
6178 * features/i386/amd64-avx-mpx-linux.c: Removed.
6179 * features/i386/amd64-linux.c: Removed.
6180 * features/i386/amd64-mpx-linux.c: Removed.
6181 * features/i386/x32-avx-avx512-linux.c: Removed.
6182 * features/i386/x32-avx-linux.c: Removed.
6183 * features/i386/x32-linux.c: Removed.
6185 2017-09-05 Yao Qi <yao.qi@linaro.org>
6187 * amd64-linux-tdep.c: Include arch/amd64.h. Don't include
6189 (amd64_linux_read_description): Call
6190 amd64_create_target_description.
6191 * arch/amd64.c: New file.
6192 * arch/amd64.h: New file.
6193 * configure.tgt (x86_64-*-linux*): Append amd64.o.
6194 * Makefile.in (ALL_64_TARGET_OBS): Append amd64.o.
6196 2017-09-05 Yao Qi <yao.qi@linaro.org>
6198 * amd64-linux-tdep.c: Don't include amd64-XXX-linux and
6199 x32-XXX-linux.c. Include 64bit-XX.c and x32-XX.c.
6200 (amd64_linux_read_description): Create target descriptions.
6201 (_initialize_amd64_linux_tdep): Don't call initialize_tdesc_XXX
6202 functions. Add unit tests.
6203 * features/Makefile (FEATURE_XMLFILES): Append 64bit-XXX.xml and
6205 * features/i386/64bit-avx.c: Generated.
6206 * features/i386/64bit-avx512.c: Generated.
6207 * features/i386/64bit-core.c: Generated.
6208 * features/i386/64bit-linux.c: Generated.
6209 * features/i386/64bit-mpx.c: Generated.
6210 * features/i386/64bit-pkeys.c: Generated.
6211 * features/i386/64bit-segments.c: Generated.
6212 * features/i386/64bit-sse.c: Generated.
6213 * features/i386/x32-core.c: Generated.
6214 * target-descriptions.c (maint_print_c_tdesc_cmd): Print feature
6215 c files for amd64-linux and x32-linux.
6217 2017-09-05 Yao Qi <yao.qi@linaro.org>
6219 * amd64-linux-tdep.c (amd64_linux_read_description): New
6221 (amd64_linux_core_read_description): Call
6222 amd64_linux_read_description.
6223 (amd64_linux_init_abi): Likewise.
6224 (amd64_x32_linux_init_abi): Likewise.
6225 * amd64-linux-tdep.h (amd64_linux_read_description): Declare.
6226 * x86-linux-nat.c (x86_linux_read_description): Call
6227 amd64_linux_read_description.
6229 2017-09-05 Yao Qi <yao.qi@linaro.org>
6231 * amd64-linux-tdep.c (amd64_linux_core_read_description): Update
6234 2017-09-05 Yao Qi <yao.qi@linaro.org>
6236 * features/Makefile (XMLTOC): Remove i386/i386-XX-linux.xml.
6237 * features/i386/i386-avx-avx512-linux.c: Remove.
6238 * features/i386/i386-avx-linux.c: Remove.
6239 * features/i386/i386-avx-mpx-avx512-pku-linux.c: Remove.
6240 * features/i386/i386-avx-mpx-linux.c: Remove.
6241 * features/i386/i386-linux.c: Remove.
6242 * features/i386/i386-mmx-linux.c: Remove.
6243 * features/i386/i386-mpx-linux.c: Remove.
6245 2017-09-05 Yao Qi <yao.qi@linaro.org>
6247 * Makefile.in (ALL_TARGET_OBS): Add i386.o.
6248 (SFILES): Add arch/i386.c.
6249 (HFILES_NO_SRCDIR): Add arch/i386.h.
6250 * arch/i386.c: New file.
6251 * arch/i386.h: New file.
6252 * arch/tdesc.h (allocate_target_description): Declare.
6253 (set_tdesc_architecture): Declare.
6254 (set_tdesc_osabi): Declare.
6255 * configure.tgt (i[34567]86-*-linux*): Add i386.o.
6256 * i386-linux-tdep.c: Don't include ../features/i386/32bit-XXX.c.
6257 include arch/i386.h.
6258 (i386_linux_read_description): Remove code and call
6259 i386_create_target_description.
6260 (set_tdesc_architecture): New function.
6261 (set_tdesc_osabi): New function.
6262 * target-descriptions.h (allocate_target_description): Remove.
6264 2017-09-05 Yao Qi <yao.qi@linaro.org>
6266 * arch/tdesc.h (tdesc_create_feature): Add an argument xml.
6267 * target-descriptions.c (tdesc_create_feature): Likewise, and
6269 * features/i386/32bit-avx.c: Re-generated.
6270 * features/i386/32bit-avx512.c: Re-generated.
6271 * features/i386/32bit-core.c: Re-generated.
6272 * features/i386/32bit-linux.c: Re-generated.
6273 * features/i386/32bit-mpx.c: Re-generated.
6274 * features/i386/32bit-pkeys.c: Re-generated.
6275 * features/i386/32bit-sse.c: Re-generated.
6277 2017-09-05 Yao Qi <yao.qi@linaro.org>
6279 * regformats/regdef.h (struct reg): Override operator == and !=.
6281 2017-09-05 Yao Qi <yao.qi@linaro.org>
6283 * arch/tdesc.h: New file.
6284 * regformats/regdat.sh: Generate code using tdesc_create_reg.
6285 * target-descriptions.c: Update comments.
6286 * target-descriptions.h: Include "arch/tdesc.h". Remove the
6288 * features/i386/32bit-avx.c: Re-generated.
6289 * features/i386/32bit-avx512.c: Re-generated.
6290 * features/i386/32bit-core.c: Re-generated.
6291 * features/i386/32bit-linux.c: Re-generated.
6292 * features/i386/32bit-mpx.c: Re-generated.
6293 * features/i386/32bit-pkeys.c: Re-generated.
6294 * features/i386/32bit-sse.c: Re-generated.
6296 2017-09-05 Yao Qi <yao.qi@linaro.org>
6298 * regformats/regdat.sh: Update generated code.
6300 2017-09-05 Yao Qi <yao.qi@linaro.org>
6302 * regformats/regdat.sh: Adjust code order.
6304 2017-09-05 Simon Marchi <simon.marchi@ericsson.com>
6306 * expprint.c (dump_subexp_body_standard): Use constant format
6307 string in fprintf_filtered call.
6309 2017-09-04 John Baldwin <jhb@FreeBSD.org>
6311 * configure.nat: Add "x86-nat.o x86-dregs.o" for NetBSD/amd64 and
6313 * x86-bsd-nat.c [!DBREG_DRX && __NetBSD__]: Define DBREG_DRX.
6315 2017-09-04 John Baldwin <jhb@FreeBSD.org>
6317 * bsd-kvm.o: Make <sys/user.h> conditional on HAVE_SYS_USER_H.
6319 2017-09-04 John Baldwin <jhb@FreeBSD.org>
6321 * bsd-kvm.o: Define _KMEMUSER.
6322 * configure.ac: Define _KMEMUSER when checking for "struct lwp".
6323 * configure: Regenerate.
6325 2017-09-04 John Baldwin <jhb@FreeBSD.org>
6327 * amd64-fbsd-nat.c: Add include of "x86-xstate.h".
6328 * i386-fbsd-nat.c: Likewise.
6330 2017-09-04 John Baldwin <jhb@FreeBSD.org>
6332 * unittests/array-view-selftests.c: Add include of <array>.
6334 2017-09-04 John Baldwin <jhb@FreeBSD.org>
6336 * spu-tdep.c (flush_ea_cache): Add missing argument to
6337 call_function_by_hand.
6339 2017-09-04 Pedro Alves <palves@redhat.com>
6341 * NEWS (Safer support for debugging with no debug info): New.
6343 2017-09-04 Pedro Alves <palves@redhat.com>
6345 * c-exp.y (function_method, function_method_void): Add current
6346 instance flags to TYPE_INSTANCE.
6347 * dwarf2read.c (check_modifier): New.
6348 (compute_delayed_physnames): Assert that only C++ adds delayed
6349 physnames. Mark fn_fields as const/volatile depending on
6351 * eval.c (make_params): New type_instance_flags parameter. Use
6352 it as the new type's instance flags.
6353 (evaluate_subexp_standard) <TYPE_INSTANCE>: Extract the instance
6354 flags element and pass it to make_params.
6355 * expprint.c (print_subexp_standard) <TYPE_INSTANCE>: Handle
6356 instance flags element.
6357 (dump_subexp_body_standard) <TYPE_INSTANCE>: Likewise.
6358 * gdbtypes.h: Include "enum-flags.h".
6359 (type_instance_flags): New enum-flags type.
6360 (TYPE_CONST, TYPE_VOLATILE, TYPE_RESTRICT, TYPE_ATOMIC)
6361 (TYPE_CODE_SPACE, TYPE_DATA_SPACE): Return boolean.
6362 * parse.c (operator_length_standard) <TYPE_INSTANCE>: Adjust.
6363 (follow_type_instance_flags): New function.
6364 (operator_check_standard) <TYPE_INSTANCE>: Adjust.
6365 * parser-defs.h (follow_type_instance_flags): Declare.
6366 * valops.c (value_struct_elt_for_reference): const/volatile must
6369 2017-09-04 Pedro Alves <palves@redhat.com>
6371 * cp-namespace.c (cp_search_static_and_baseclasses): Handle
6372 function/method scopes; lookup the nested name as a function local
6375 2017-09-04 Pedro Alves <palves@redhat.com>
6377 (%type <voidval>): Add function_method.
6378 * c-exp.y (exp): New production for calls with no arguments.
6379 (function_method, function_method_void_or_typelist): New
6381 (exp): New production for "method()::static_var".
6382 * eval.c (evaluate_subexp_standard): Handle OP_FUNC_STATIC_VAR.
6383 * expprint.c (print_subexp_standard, dump_subexp_body_standard):
6384 Handle OP_FUNC_STATIC_VAR.
6385 * parse.c (operator_length_standard):
6386 Handle OP_FUNC_STATIC_VAR.
6388 2017-09-04 Pedro Alves <palves@redhat.com>
6390 * eval.c (evaluate_subexp_standard): Remove UNOP_MEMVAL_TLS
6392 * expprint.c (print_subexp_standard, dump_subexp_body_standard):
6394 * parse.c (operator_length_standard, operator_check_standard):
6396 * std-operator.def (UNOP_MEMVAL_TLS): Delete.
6398 2017-09-04 Pedro Alves <palves@redhat.com>
6400 * ax-gdb.c: Include "typeprint.h".
6401 (gen_expr_for_cast): New function.
6402 (gen_expr) <OP_CAST, OP_CAST_TYPE>: Use it.
6403 <OP_VAR_VALUE, OP_MSYM_VAR_VALUE>: Error out if the variable's
6405 * dwarf2read.c (new_symbol_full): Fallback to int instead of
6406 nodebug_data_symbol.
6407 * eval.c: Include "typeprint.h".
6408 (evaluate_subexp_standard) <OP_VAR_VALUE, OP_VAR_MSYM_VALUE>:
6409 Error out if symbol has unknown type.
6410 <UNOP_CAST, UNOP_CAST_TYPE>: Common bits factored out to
6411 evaluate_subexp_for_cast.
6412 (evaluate_subexp_for_address, evaluate_subexp_for_sizeof): Handle
6414 (evaluate_subexp_for_cast): New function.
6415 * gdbtypes.c (init_nodebug_var_type): New function.
6416 (objfile_type): Use it to initialize types of variables with no
6418 * typeprint.c (error_unknown_type): New.
6419 * typeprint.h (error_unknown_type): New declaration.
6420 * compile/compile-c-types.c (convert_type_basic): Handle
6421 TYPE_CODE_ERROR; warn and fallback to int for variables with
6424 2017-09-04 Pedro Alves <palves@redhat.com>
6426 * eval.c (evaluate_var_value): New function, factored out from ...
6427 (evaluate_subexp_standard): ... here.
6429 2017-09-04 Pedro Alves <palves@redhat.com>
6431 * eval.c (evaluate_subexp_standard) <UNOP_COMPLEMENT, UNOP_ADDR>:
6432 Remove useless assignments to 'op'.
6434 2017-09-04 Pedro Alves <palves@redhat.com>
6436 * eval.c (eval_skip_value): New function.
6437 (evaluate_subexp_standard): Use it.
6439 2017-09-04 Pedro Alves <palves@redhat.com>
6441 * eval.c (evaluate_subexp_standard): <OP_FUNCALL>: Extract
6442 function name from symbol/minsym and pass it to
6443 error_call_unknown_return_type.
6445 2017-09-04 Pedro Alves <palves@redhat.com>
6447 * ada-lang.c (resolve_subexp): Handle OP_VAR_MSYM_VALUE.
6448 * ax-gdb.c (gen_msym_var_ref): New function.
6449 (gen_expr): Handle OP_VAR_MSYM_VALUE.
6450 * eval.c (evaluate_var_msym_value): New function.
6451 * eval.c (evaluate_subexp_standard): Handle OP_VAR_MSYM_VALUE.
6452 <OP_FUNCALL>: Extract function name from symbol/minsym and pass it
6453 to call_function_by_hand.
6454 * expprint.c (print_subexp_standard, dump_subexp_body_standard):
6455 Handle OP_VAR_MSYM_VALUE.
6456 (union exp_element) <msymbol>: New field.
6457 * minsyms.h (struct type): Forward declare.
6458 (find_minsym_type_and_address): Declare.
6459 * parse.c (write_exp_elt_msym): New function.
6460 (write_exp_msymbol): Delete, refactored as ...
6461 (find_minsym_type_and_address): ... this new function.
6462 (write_exp_msymbol): Reimplement using OP_VAR_MSYM_VALUE.
6463 (operator_length_standard, operator_check_standard): Handle
6465 * std-operator.def (OP_VAR_MSYM_VALUE): New.
6467 2017-09-04 Pedro Alves <palves@redhat.com>
6469 * ada-lang.c (ada_evaluate_subexp) <TYPE_CODE_FUNC>: Don't handle
6470 TYPE_GNU_IFUNC specially here. Throw error if return type is
6472 * ada-typeprint.c (print_func_type): Handle functions with unknown
6474 * c-typeprint.c (c_type_print_base): Handle functions and methods
6475 with unknown return type.
6476 * compile/compile-c-symbols.c (convert_symbol_bmsym)
6477 <mst_text_gnu_ifunc>: Use nodebug_text_gnu_ifunc_symbol.
6478 * compile/compile-c-types.c: Include "objfiles.h".
6479 (convert_func): For functions with unknown return type, warn and
6481 * compile/compile-object-run.c (compile_object_run): Adjust call
6482 to call_function_by_hand_dummy.
6483 * elfread.c (elf_gnu_ifunc_resolve_addr): Adjust call to
6484 call_function_by_hand.
6485 * eval.c (evaluate_subexp_standard): Adjust calls to
6486 call_function_by_hand. Handle functions and methods with unknown
6487 return type. Pass expect_type to call_function_by_hand.
6488 * f-typeprint.c (f_type_print_base): Handle functions with unknown
6490 * gcore.c (call_target_sbrk): Adjust call to
6491 call_function_by_hand.
6492 * gdbtypes.c (objfile_type): Leave nodebug text symbol with NULL
6493 return type instead of int. Make nodebug_text_gnu_ifunc_symbol be
6494 an integer address type instead of nodebug.
6495 * guile/scm-value.c (gdbscm_value_call): Adjust call to
6496 call_function_by_hand.
6497 * infcall.c (error_call_unknown_return_type): New function.
6498 (call_function_by_hand): New "default_return_type" parameter.
6500 (call_function_by_hand_dummy): New "default_return_type"
6501 parameter. Use it instead of defaulting to int. If there's no
6502 default and the return type is unknown, throw an error. If
6503 there's a default return type, and the called function has no
6504 debug info, then assume the function is prototyped.
6505 * infcall.h (call_function_by_hand, call_function_by_hand_dummy):
6506 New "default_return_type" parameter.
6507 (error_call_unknown_return_type): New declaration.
6508 * linux-fork.c (call_lseek): Cast return type of lseek.
6509 (inferior_call_waitpid, checkpoint_command): Adjust calls to
6510 call_function_by_hand.
6511 * linux-tdep.c (linux_infcall_mmap, linux_infcall_munmap): Adjust
6512 calls to call_function_by_hand.
6513 * m2-typeprint.c (m2_procedure): Handle functions with unknown
6515 * objc-lang.c (lookup_objc_class, lookup_child_selector)
6516 (value_nsstring, print_object_command): Adjust calls to
6517 call_function_by_hand.
6518 * p-typeprint.c (pascal_type_print_varspec_prefix): Handle
6519 functions with unknown return type.
6520 (pascal_type_print_func_varspec_suffix): New function.
6521 (pascal_type_print_varspec_suffix) <TYPE_CODE_FUNC,
6522 TYPE_CODE_METHOD>: Use it.
6523 * python/py-value.c (valpy_call): Adjust call to
6524 call_function_by_hand.
6525 * rust-lang.c (rust_evaluate_funcall): Adjust call to
6526 call_function_by_hand.
6527 * valarith.c (value_x_binop, value_x_unop): Adjust calls to
6528 call_function_by_hand.
6529 * valops.c (value_allocate_space_in_inferior): Adjust call to
6530 call_function_by_hand.
6531 * typeprint.c (type_print_unknown_return_type): New function.
6532 * typeprint.h (type_print_unknown_return_type): New declaration.
6534 2017-09-04 Pedro Alves <palves@redhat.com>
6536 * gdbtypes.c (lookup_function_type_with_arguments): Mark function
6537 types with more than one parameter as prototyped.
6539 2017-09-04 Pedro Alves <palves@redhat.com>
6541 * cli/cli-cmds.c (print_disassembly, disassemble_current_function)
6542 (disassemble_command): Use gdb_disassembly_flags instead of bare
6544 * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn)
6545 (dump_insns, do_mixed_source_and_assembly_deprecated)
6546 (do_mixed_source_and_assembly, do_assembly_only, gdb_disassembly):
6547 Use gdb_disassembly_flags instead of bare int.
6548 * disasm.h (DISASSEMBLY_SOURCE_DEPRECATED, DISASSEMBLY_RAW_INSN)
6549 (DISASSEMBLY_OMIT_FNAME, DISASSEMBLY_FILENAME)
6550 (DISASSEMBLY_OMIT_PC, DISASSEMBLY_SOURCE)
6551 (DISASSEMBLY_SPECULATIVE): No longer macros. Instead they're...
6552 (enum gdb_disassembly_flag): ... values of this new enumeration.
6553 (gdb_disassembly_flags): Define.
6555 (gdb_pretty_print_disassembler::pretty_print_insn): Use it.
6556 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Use
6557 gdb_disassembly_flags instead of bare int.
6558 * record-btrace.c (btrace_insn_history)
6559 (record_btrace_insn_history, record_btrace_insn_history_range)
6560 (record_btrace_insn_history_from): Use gdb_disassembly_flags
6561 instead of bare int.
6562 * record.c (get_insn_history_modifiers, cmd_record_insn_history):
6563 Use gdb_disassembly_flags instead of bare int.
6564 * target-debug.h (target_debug_print_gdb_disassembly_flags):
6566 * target-delegates.c: Regenerate.
6567 * target.c (target_insn_history, target_insn_history_from)
6568 (target_insn_history_range): Use gdb_disassembly_flags instead of
6570 * target.h: Include "disasm.h".
6571 (struct target_ops) <to_insn_history, to_insn_history_from,
6572 to_insn_history_range>: Use gdb_disassembly_flags instead of bare
6574 (target_insn_history, target_insn_history_from)
6575 (target_insn_history_range): Use gdb_disassembly_flags instead of
6578 2017-09-04 Simon Marchi <simon.marchi@ericsson.com>
6580 * cli/cli-script.c (build_command_line): For if/while commands,
6581 check whether args is empty.
6583 2017-09-04 Simon Marchi <simon.marchi@ericsson.com>
6585 * cli/cli-script.h (enum misc_command_type): Move from defs.h.
6586 (enum command_control_type): Likewise.
6587 (struct command_line): Likewise.
6588 (free_command_lines): Likewise.
6589 (struct command_lines_deleter): Likewise.
6590 (command_line_up): Likewise.
6591 (read_command_lines): Likewise.
6592 (read_command_lines_1): Likewise.
6593 * defs.h (enum misc_command_type): Move to cli/cli-script.h.
6594 (enum command_control_type): Likewise.
6595 (struct command_line): Likewise.
6596 (free_command_lines): Likewise.
6597 (struct command_lines_deleter): Likewise.
6598 (command_line_up): Likewise.
6599 (read_command_lines): Likewise.
6600 (read_command_lines_1): Likewise.
6601 * breakpoint.h: Include cli/cli-script.h.
6602 * extension-priv.h: Likewise.
6603 * gdbcmd.h: Likewise.
6605 2017-09-04 Pedro Alves <palves@redhat.com>
6607 * ada-lang.c (is_known_support_routine): Move sal declaration to
6608 where it is initialized.
6609 * breakpoint.c (create_internal_breakpoint, init_catchpoint)
6610 (parse_breakpoint_sals, decode_static_tracepoint_spec)
6611 (clear_command, update_static_tracepoint): Remove init_sal
6612 references. Move declarations closer to initializations.
6613 * cli/cli-cmds.c (list_command): Move sal declarations closer to
6615 * elfread.c (elf_gnu_ifunc_resolver_stop): Remove init_sal
6616 references. Move sal declarations closer to initializations.
6617 * frame.c (find_frame_sal): Return a symtab_and_line via function
6618 return instead of output parameter. Remove init_sal references.
6619 * frame.h (find_frame_sal): Return a symtab_and_line via function
6620 return instead of output parameter.
6621 * guile/scm-frame.c (gdbscm_frame_sal): Adjust.
6622 * guile/scm-symtab.c (stscm_make_sal_smob): Use in-place new
6624 (gdbscm_find_pc_line): Remove init_sal reference.
6625 * infcall.c (call_function_by_hand_dummy): Remove init_sal
6626 references. Move declarations closer to initializations.
6627 * infcmd.c (set_step_frame): Update. Move declarations closer to
6629 (finish_backward): Remove init_sal references. Move declarations
6630 closer to initializations.
6631 * infrun.c (process_event_stop_test, handle_step_into_function)
6632 (insert_hp_step_resume_breakpoint_at_frame)
6633 (insert_step_resume_breakpoint_at_caller): Likewise.
6634 * linespec.c (create_sals_line_offset, decode_digits_ordinary)
6635 (symbol_to_sal): Likewise.
6636 * probe.c (parse_probes_in_pspace): Remove init_sal reference.
6637 * python/py-frame.c (frapy_find_sal): Move sal declaration closer
6638 to its initialization.
6639 * reverse.c (save_bookmark_command): Use new/delete. Remove
6640 init_sal references. Move declarations closer to initializations.
6641 * source.c (get_current_source_symtab_and_line): Remove brace
6643 (set_current_source_symtab_and_line): Now takes the sal by const
6644 reference. Remove brace initialization.
6645 (line_info): Remove init_sal reference.
6646 * source.h (set_current_source_symtab_and_line): Now takes a
6647 symtab_and_line via const reference.
6648 * stack.c (set_current_sal_from_frame): Adjust.
6649 (print_frame_info): Adjust.
6650 (get_last_displayed_sal): Return the sal via function return
6651 instead of via output parameter. Simplify.
6652 (frame_info): Adjust.
6653 * stack.h (get_last_displayed_sal): Return the sal via function
6654 return instead of via output parameter.
6655 * symtab.c (init_sal): Delete.
6656 (find_pc_sect_line): Remove init_sal references. Move
6657 declarations closer to initializations.
6658 (find_function_start_sal): Remove init_sal references. Move
6659 declarations closer to initializations.
6660 * symtab.h (struct symtab_and_line): In-class initialize all
6662 * tracepoint.c (set_traceframe_context)
6663 (print_one_static_tracepoint_marker): Remove init_sal references.
6664 Move declarations closer to initializations.
6665 * tui/tui-disasm.c (tui_show_disassem_and_update_source): Adjust.
6666 * tui/tui-stack.c (tui_show_frame_info): Adjust. Move
6667 declarations closer to initializations.
6668 * tui/tui-winsource.c (tui_update_source_window_as_is): Remove
6669 init_sal references. Adjust.
6671 2017-09-04 Pedro Alves <palves@redhat.com>
6673 * ax-gdb.c (agent_command_1): Use range-for.
6674 * break-catch-throw.c (re_set_exception_catchpoint): Update.
6675 * breakpoint.c: Include "common/array-view.h".
6676 (init_breakpoint_sal, create_breakpoint_sal): Change sals
6677 parameter from struct symtabs_and_lines to
6678 array_view<symtab_and_line>. Adjust. Use range-for. Update.
6679 (breakpoint_sals_to_pc): Change sals parameter from struct
6680 symtabs_and_lines to std::vector reference.
6681 (check_fast_tracepoint_sals): Change sals parameter from struct
6682 symtabs_and_lines to std::array_view. Use range-for.
6683 (decode_static_tracepoint_spec): Return a std::vector instead of
6684 symtabs_and_lines. Update.
6685 (create_breakpoint): Update.
6686 (break_range_command, until_break_command, clear_command): Update.
6687 (base_breakpoint_decode_location, bkpt_decode_location)
6688 (bkpt_probe_create_sals_from_location)
6689 (bkpt_probe_decode_location, tracepoint_decode_location)
6690 (tracepoint_probe_decode_location)
6691 (strace_marker_create_sals_from_location): Return a std::vector
6692 instead of symtabs_and_lines.
6693 (strace_marker_create_breakpoints_sal): Update.
6694 (strace_marker_decode_location): Return a std::vector instead of
6695 symtabs_and_lines. Update.
6696 (update_breakpoint_locations): Change struct symtabs_and_lines
6697 parameters to gdb::array_view. Adjust.
6698 (location_to_sals): Return a std::vector instead of
6699 symtabs_and_lines. Update.
6700 (breakpoint_re_set_default): Use std::vector instead of struct
6702 (decode_location_default): Return a std::vector instead of
6703 symtabs_and_lines. Update.
6704 * breakpoint.h: Include "common/array-view.h".
6705 (struct breakpoint_ops) <decode_location>: Now returns a
6706 std::vector instead of returning a symtabs_and_lines via output
6708 (update_breakpoint_locations): Change sals parameters to use
6710 * cli/cli-cmds.c (edit_command, list_command): Update to use
6711 std::vector and gdb::array_view.
6712 (ambiguous_line_spec): Adjust to use gdb::array_view and
6714 (compare_symtabs): Rename to ...
6715 (cmp_symtabs): ... this. Change parameters to symtab_and_line
6716 const reference and adjust.
6717 (filter_sals): Rewrite using std::vector and standard algorithms.
6718 * elfread.c (elf_gnu_ifunc_resolver_return_stop): Simplify.
6719 (jump_command): Update to use std::vector.
6720 * linespec.c (struct linespec_state) <canonical_names>: Update
6722 (add_sal_to_sals_basic): Delete.
6723 (add_sal_to_sals, filter_results, convert_results_to_lsals)
6724 (decode_line_2, create_sals_line_offset)
6725 (convert_address_location_to_sals, convert_linespec_to_sals)
6726 (convert_explicit_location_to_sals, parse_linespec)
6727 (event_location_to_sals, decode_line_full, decode_line_1)
6728 (decode_line_with_current_source)
6729 (decode_line_with_last_displayed, decode_objc)
6730 (decode_digits_list_mode, decode_digits_ordinary, minsym_found)
6731 (linespec_result::~linespec_result): Adjust to use std::vector
6732 instead of symtabs_and_lines.
6733 * linespec.h (linespec_sals::sals): Now a std::vector.
6734 (struct linespec_result): Use std::vector, bool, and in-class
6736 (decode_line_1, decode_line_with_current_source)
6737 (decode_line_with_last_displayed): Return std::vector.
6738 * macrocmd.c (info_macros_command): Use std::vector.
6739 * mi/mi-main.c (mi_cmd_trace_find): Use std::vector.
6740 * probe.c (parse_probes_in_pspace, parse_probes): Adjust to use
6742 * probe.h (parse_probes): Return a std::vector.
6743 * python/python.c (gdbpy_decode_line): Use std::vector and
6745 * source.c (select_source_symtab, line_info): Use std::vector.
6746 * stack.c (func_command): Use std::vector.
6747 * symtab.h (struct symtabs_and_lines): Delete.
6748 * tracepoint.c (tfind_line_command, scope_info): Use std::vector.
6750 2017-09-04 Pedro Alves <palves@redhat.com>
6752 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
6753 unittests/array-view-selftests.c.
6754 (SUBDIR_UNITTESTS_OBS): Add array-view-selftests.o.
6755 * common/array-view.h: New file.
6756 * unittests/array-view-selftests.c: New file.
6758 2017-09-04 Pedro Alves <palves@redhat.com>
6760 * cli/cli-cmds.c (edit_command): Pass message to
6761 ambiguous_line_spec.
6762 (list_command): Pass message to ambiguous_line_spec. Say
6763 "first"/"last" instead of "start" and "end" to be consistent with
6765 (ambiguous_line_spec): Add 'format' and vararg parameters. Use
6766 them to print formatted message.
6768 2017-09-04 Pedro Alves <palves@redhat.com>
6770 * btrace.c (ftrace_add_pt): Pass btrace_insn to
6771 ftrace_update_insns by reference instead of pointer.
6773 2017-09-04 Yao Qi <yao.qi@linaro.org>
6775 * i386-go32-tdep.c: Include x86-xstate.h.
6776 (i386_go32_init_abi): Call i386_target_description.
6777 * i386-tdep.c (i386_target_description): Return tdesc_i386_mmx
6778 if xcr0 is X86_XSTATE_X87_MASK.
6779 * i386-tdep.h (tdesc_i386): Remove the declaration.
6780 (tdesc_i386_mmx): Likewise.
6782 2017-09-04 Yao Qi <yao.qi@linaro.org>
6784 * i386-fbsd-tdep.c (i386fbsd_core_read_xcr0): Return
6785 X86_XSTATE_SSE_MASK instead of 0.
6787 2017-09-04 Yao Qi <yao.qi@linaro.org>
6789 * amd64-fbsd-nat.c (amd64fbsd_read_description): Call
6790 i386_target_description.
6791 * i386-fbsd-nat.c (i386fbsd_read_description): Call
6792 i386_target_description.
6793 * i386-tdep.c (i386_gdbarch_init): Likewise.
6795 2017-09-04 Yao Qi <yao.qi@linaro.org>
6797 * amd64-darwin-tdep.c: Include "x86-xstate.h".
6798 (x86_darwin_init_abi_64): Call amd64_target_description.
6799 * amd64-dicos-tdep.c: Likewise.
6800 * amd64-fbsd-nat.c: Likewise.
6801 * amd64-fbsd-tdep.c: Likewise.
6802 * amd64-nbsd-tdep.c: Likewise.
6803 * amd64-obsd-tdep.c: Likewise.
6804 * amd64-sol2-tdep.c: Likewise.
6805 * amd64-windows-tdep.c: Likewise.
6806 * amd64-tdep.h (tdesc_amd64): Remove the declaration.
6808 2017-09-04 Simon Marchi <simon.marchi@ericsson.com>
6810 * btrace.h (btrace_insn_s, DEF_VEC_O (btrace_insn_s)): Remove.
6811 (btrace_function) <insn>: Change type to use std::vector.
6812 * btrace.c (ftrace_debug, ftrace_call_num_insn,
6813 ftrace_find_call, ftrace_new_gap, ftrace_update_function,
6814 ftrace_update_insns, ftrace_compute_global_level_offset,
6815 btrace_stitch_bts, btrace_clear, btrace_insn_get,
6816 btrace_insn_end, btrace_insn_next, btrace_insn_prev): Adjust to
6817 change to std::vector.
6818 (ftrace_update_insns): Adjust to change to std::vector, change
6819 type of INSN parameter.
6820 (btrace_compute_ftrace_bts): Adjust call to ftrace_update_insns.
6821 * record-btrace.c (btrace_call_history_insn_range,
6822 btrace_compute_src_line_range,
6823 record_btrace_frame_prev_register): Adjust to change to
6825 * python/py-record-btrace.c (recpy_bt_func_instructions): Adjust
6826 to change to std::vector.
6828 2017-09-03 Tom Tromey <tom@tromey.com>
6830 * corefile.c (reopen_exec_file): Use std::string.
6832 2017-09-03 Tom Tromey <tom@tromey.com>
6834 * compile/compile.c (compile_register_name_mangled): Return
6836 * compile/compile-loc2c.c (pushf_register_address): Update.
6837 (pushf_register): Update.
6838 * compile/compile-c-types.c (convert_array): Update.
6839 * compile/compile-c-symbols.c (generate_vla_size): Update.
6840 (error_symbol_once): Use a gdb::unique_xmalloc_ptr.
6841 (symbol_substitution_name): Return a gdb::unique_xmalloc_ptr.
6842 (convert_one_symbol): Update.
6843 (generate_c_for_for_one_variable): Update.
6844 * compile/compile-c-support.c (c_get_range_decl_name): Return a
6846 (generate_register_struct): Update.
6847 * compile/compile-internal.h (c_get_range_decl_name): Return a
6849 (compile_register_name_mangled): Return std::string.
6851 2017-09-03 Tom Tromey <tom@tromey.com>
6853 * utils.c (perror_string): Return a std::string.
6854 (throw_perror_with_name, perror_warning_with_name): Update.
6856 2017-09-03 Tom Tromey <tom@tromey.com>
6858 * demangle.c (demangle_command): Use std::string,
6861 2017-09-03 Tom Tromey <tom@tromey.com>
6863 * cli/cli-setshow.c (do_set_command): Use std::string.
6865 2017-09-03 Tom Tromey <tom@tromey.com>
6867 * cli/cli-cmds.c (cd_command): Use gdb::unique_xmalloc_ptr.
6869 2017-09-03 Tom Tromey <tom@tromey.com>
6871 * mi/mi-interp.c (mi_cmd_interpreter_exec): Use std::string.
6873 2017-09-03 Tom Tromey <tom@tromey.com>
6875 * mi/mi-cmd-env.c (env_execute_cli_command): Use
6876 gdb::unique_xmalloc_ptr.
6878 2017-09-03 Tom Tromey <tom@tromey.com>
6880 * thread.c (print_thread_info_1): Use string_printf.
6881 (thread_apply_command, thread_apply_all_command): Use
6884 2017-09-03 Tom Tromey <tom@tromey.com>
6886 * valprint.c (val_print_string): Update.
6887 * gdbcore.h (memory_error_message): Return std::string.
6888 * corefile.c (memory_error_message): Return std::string.
6889 (memory_error): Update.
6890 * breakpoint.c (insert_bp_location): Update.
6892 2017-09-03 Simon Marchi <simon.marchi@ericsson.com>
6894 * target/waitstatus.h (target_waitstatus_to_string): Change
6895 return type to std::string.
6896 * target/waitstatus.c (target_waitstatus_to_string): Return
6898 * target.h (target_waitstatus_to_string): Remove declaration.
6899 * infrun.c (resume, clear_proceed_status_thread,
6900 print_target_wait_results, do_target_wait, save_waitstatus,
6901 stop_all_threads): Adjust.
6902 * record-btrace.c (record_btrace_wait): Adjust.
6904 (target_debug_print_struct_target_waitstatus_p): Adjust.
6906 2017-09-01 Jan Kratochvil <jan.kratochvil@redhat.com>
6909 * nat/linux-procfs.c (parse_proc_status_state): Fix PROC_STATE_STOPPED
6912 2017-08-31 Sergio Durigan Junior <sergiodj@redhat.com>
6914 * NEWS (Changes since GDB 8.0): Add entry mentioning new support
6915 for setting/unsetting environment variables on the remote target.
6916 (New remote packets): Add entries for QEnvironmentHexEncoded,
6917 QEnvironmentUnset and QEnvironmentReset.
6918 * common/environ.c (gdb_environ::operator=): Extend method to
6919 handle m_user_set_env_list and m_user_unset_env_list.
6920 (gdb_environ::clear): Likewise.
6921 (match_var_in_string): Change type of first parameter from 'char
6922 *' to 'const char *'.
6923 (gdb_environ::set): Extend method to handle
6924 m_user_set_env_list and m_user_unset_env_list.
6925 (gdb_environ::unset): Likewise.
6926 (gdb_environ::clear_user_set_env): New method.
6927 (gdb_environ::user_set_envp): Likewise.
6928 (gdb_environ::user_unset_envp): Likewise.
6929 * common/environ.h (gdb_environ): Handle m_user_set_env_list and
6930 m_user_unset_env_list on move constructor/assignment.
6931 (unset): Add new default parameter 'update_unset_list = true'.
6932 (clear_user_set_env): New method.
6933 (user_set_envp): Likewise.
6934 (user_unset_envp): Likewise.
6935 (m_user_set_env_list): New std::set.
6936 (m_user_unset_env_list): Likewise.
6937 * common/rsp-low.c (hex2str): New function.
6938 (bin2hex): New overload for bin2hex function.
6939 * common/rsp-low.c (hex2str): New prototype.
6940 (str2hex): New overload prototype.
6941 * remote.c: Include "environ.h". Add QEnvironmentHexEncoded,
6942 QEnvironmentUnset and QEnvironmentReset.
6943 (remote_protocol_features): Add QEnvironmentHexEncoded,
6944 QEnvironmentUnset and QEnvironmentReset packets.
6945 (send_environment_packet): New function.
6946 (extended_remote_environment_support): Likewise.
6947 (extended_remote_create_inferior): Call
6948 extended_remote_environment_support.
6949 (_initialize_remote): Add QEnvironmentHexEncoded,
6950 QEnvironmentUnset and QEnvironmentReset packet configs.
6951 * unittests/environ-selftests.c (gdb_selftest_env_var):
6953 (test_vector_initialization): New function.
6954 (test_init_from_host_environ): Likewise.
6955 (test_reinit_from_host_environ): Likewise.
6956 (test_set_A_unset_B_unset_A_cannot_find_A_can_find_B):
6958 (test_unset_set_empty_vector): Likewise.
6959 (test_vector_clear): Likewise.
6960 (test_std_move): Likewise.
6961 (test_move_constructor):
6962 (test_self_move): Likewise.
6963 (test_set_unset_reset): Likewise.
6964 (run_tests): Rewrite in terms of the functions above.
6966 2017-08-31 Weimin Pan <weimin.pan@oracle.com>
6968 * sparc64-tdep.c (adi_stat_t): Fix comment formatting.
6969 (adi_available): Use a temp variable of type CORE_ADDR as argument
6970 3 when calling target_auxv_search.
6971 (adi_normalize_address): Use masks and xor operators to calculate
6973 (adi_read_versions, adi_write_versions, adi_print_versions)
6974 (do_examine, do_assign): Use paddress.
6976 2017-08-29 John Baldwin <jhb@FreeBSD.org>
6978 * mips-fbsd-nat.c (getfpregs_supplies): Return true for FIR.
6979 * mips-fbsd-tdep.c (mips_fbsd_supply_fpregs): Split supply of FSR
6980 out of loop and add supply of FIR.
6981 (mips_fbsd_collect_fpregs): Split collect of FSR out of loop and
6984 2017-08-28 Simon Marchi <simon.marchi@ericsson.com>
6987 * cli/cli-script.c (define_command): Don't convert command name
6990 2017-08-25 Joel Brobecker <brobecker@adacore.com>
6992 * ada-lang.c (ada_lookup_struct_elt_type): Remove parameter "dispp".
6993 Update all callers accordingly. Remove all code blocks handling
6994 the case where DISPP is not NULL.
6996 2017-08-24 Jan Kratochvil <jan.kratochvil@redhat.com>
6999 * dwarf2read.c (dwarf2_const_value_attr, dump_die_shallow)
7000 (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
7001 (skip_form_bytes, attr_form_is_constant): Handle DW_FORM_implicit_const.
7003 2017-08-24 Jan Kratochvil <jan.kratochvil@redhat.com>
7005 * dwarf2read.c (build_type_psymtabs_reader): New prototype.
7006 (process_psymtab_comp_unit): Accept IS_DEBUG_TYPES.
7007 (read_comp_units_from_section): New parameter abbrev_section, use
7008 read_and_check_comp_unit_head, allocate signatured_type if needed.
7009 (create_all_comp_units): Update read_comp_units_from_section caller.
7011 2017-08-23 Pedro Alves <palves@redhat.com>
7014 * remote.c (add_current_inferior_and_thread): Set inferior_ptid
7015 to null_ptid and switch to thread without reading the registers
7016 after adding the inferior.
7018 2017-08-23 Jan Kratochvil <jan.kratochvil@redhat.com>
7020 * NEWS (Changes since GDB 8.0): Add set compile-gcc and show
7022 * compile/compile.c (compile_gcc, show_compile_gcc): New.
7023 (compile_to_object): Implement compile_gcc.
7024 (_initialize_compile): Install "set compile-gcc". Initialize
7027 2017-08-23 Jan Kratochvil <jan.kratochvil@redhat.com>
7029 * compile/compile.c (compile_to_object): Conditionally call
7030 set_verbose. Conditionally call compile or compile_v0.
7032 2017-08-07 Weimin Pan <weimin.pan@oracle.com>
7034 * sparc64-tdep.h: (adi_normalize_address): New export.
7035 * sparc-nat.h: (open_adi_tag_fd): New export.
7036 * sparc64-linux-nat.c: (open_adi_tag_fd): New function.
7037 * sparc64-linux-tdep.c:
7038 (SEGV_ACCADI, SEGV_ADIDERR, SEGV_ADIPERR) New defines.
7039 (sparc64_linux_handle_segmentation_fault): New function.
7040 (sparc64_linux_init_abi): Register
7041 sparc64_linux_handle_segmentation_fault
7042 * sparc64-tdep.c: Include cli-utils.h,gdbcmd.h,auxv.h.
7043 (sparc64_addr_bits_remove): New function.
7044 (sparc64_init_abi): Register sparc64_addr_bits_remove.
7045 (MAX_PROC_NAME_SIZE): New macro.
7046 (AT_ADI_BLKSZ, AT_ADI_NBITS, AT_ADI_UEONADI) New defines.
7047 (sparc64adilist): New variable.
7048 (adi_proc_list): New variable.
7049 (find_adi_info): New function.
7050 (add_adi_info): New function.
7051 (get_adi_info_proc): New function.
7052 (get_adi_info): New function.
7053 (info_adi_command): New function.
7054 (read_maps_entry): New function.
7055 (adi_available): New function.
7056 (adi_normalize_address): New function.
7057 (adi_align_address): New function.
7058 (adi_convert_byte_count): New function.
7059 (adi_tag_fd): New function.
7060 (adi_is_addr_mapped): New function.
7061 (adi_read_versions): New function.
7062 (adi_write_versions): New function.
7063 (adi_print_versions): New function.
7064 (do_examine): New function.
7065 (do_assign): New function.
7066 (adi_examine_command): New function.
7067 (adi_assign_command): New function.
7068 (_initialize_sparc64_adi_tdep): New function.
7070 2017-08-22 Simon Marchi <simon.marchi@ericsson.com>
7072 * breakpoint.c (breakpoints_info): Rename to ...
7073 (info_breakpoints_command): ... this.
7074 (watchpoints_info): Rename to ...
7075 (info_watchpoints_command): ... this.
7076 (tracepoints_info): Rename to ...
7077 (info_tracepoints_command): ... this.
7078 (_initialize_breakpoint): Adjust.
7079 * dcache.c (dcache_info): Rename to ...
7080 (info_display_command): ... this.
7081 (_initialize_dcache): Adjust.
7082 * frame.h (args_info): Rename to ...
7083 (info_args_command): ... this.
7084 (locals_info): Rename to ...
7085 (info_locals_command): ... this.
7086 * infcmd.c (nofp_registers_info): Rename to ...
7087 (info_registers_command): ... this.
7088 (float_info): Rename to ...
7089 (info_float_command): ... this.
7090 (program_info): Rename to ...
7091 (info_program_command): ... this.
7092 (all_registers_info): Rename to ...
7093 (info_all_registers_command): ... this.
7094 (vector_info): Rename to ...
7095 (info_vector_command): ... this.
7096 (float_info): Rename to ...
7097 (info_float_command): ... this.
7098 (_initialize_infcmd): Adjust.
7099 * inferior.h (term_info): Rename to ...
7100 (info_terminal_command): ... this.
7101 * inflow.c (term_info): Rename to ...
7102 (info_terminal_command): ... this.
7103 (_initialize_inflow): Adjust.
7104 * infrun.c (signals_info): Rename to ...
7105 (info_signals_command): ... this.
7106 (_initialize_infrun): Adjust.
7107 * objc-lang.c (classes_info): Rename to ...
7108 (info_classes_command): ... this.
7109 (selectors_info): Rename to ...
7110 (info_selectors_command): ... this.
7111 (_initialize_objc_language): Adjust.
7112 * printcmd.c (sym_info): Rename to ...
7113 (info_symbol_command): ... this.
7114 (address_info): Rename to ...
7115 (info_address_command): ... this.
7116 (display_info): Rename to ...
7117 (info_display_command): ... this.
7118 (_initialize_printcmd): Adjust.
7119 * reverse.c (bookmarks_info): Rename to ...
7120 (info_breakpoints_command): ... this.
7121 (_initialize_reverse): Adjust.
7122 * ser-go32.c (dos_info): Rename to ...
7123 (info_serial_command): ... this.
7124 (_initialize_ser_dos): Adjust.
7125 * skip.c (skip_info): Rename to ...
7126 (info_skip_command): ... this.
7127 (_initialize_step_skip): Adjust.
7128 * source.c (line_info): Rename to ...
7129 (info_line_command): ... this.
7130 (source_info): Rename to ...
7131 (info_source_command)
7132 * stack.c (frame_info): Rename to ...
7133 (info_frame_command): ... this.
7134 (locals_info): Rename to ...
7135 (info_locals_command): ... this.
7136 (args_info): Rename to ...
7137 (info_args_command): ... this.
7138 (_initialize_stack): Adjust.
7139 * symtab.c (sources_info): Rename to ...
7140 (info_sources_command): ... this.
7141 (variables_info): Rename to ...
7142 (info_variables_command): ... this.
7143 (functions_info): Rename to ...
7144 (info_functions_command): ... this.
7145 (types_info): Rename to ...
7146 (info_types_command): ... this.
7147 (_initialize_symtab): Adjust.
7148 * target.c (target_info): Rename to ...
7149 (info_target_command): ... this.
7150 (initialize_targets): Adjust.
7151 * tracepoint.c (tvariables_info): Rename to ...
7152 (info_tvariables_command): ... this.
7153 (scope_info): Rename to ...
7154 (info_scope_command): ... this.
7155 (trace_dump_actions): Adjust.
7156 (_initialize_tracepoint): Adjust.
7158 2017-08-22 Tom Tromey <tom@tromey.com>
7160 * breakpoint.h (install_breakpoint): Update.
7161 * breakpoint.c (add_solib_catchpoint): Update.
7162 (install_breakpoint): Change argument to a std::unique_ptr.
7163 (create_fork_vfork_event_catchpoint): Use std::unique_ptr.
7164 (create_breakpoint_sal, create_breakpoint): Update.
7165 (watch_command_1, catch_exec_command_1)
7166 (strace_marker_create_breakpoints_sal): Use std::unique_ptr.
7167 (add_to_breakpoint_chain): Change argument to a std::unique_ptr.
7168 Return the breakpoint.
7169 (set_raw_breakpoint_without_location, set_raw_breakpoint)
7170 (new_single_step_breakpoint): Update.
7171 * break-catch-throw.c (handle_gnu_v3_exceptions): Use
7173 * break-catch-syscall.c (create_syscall_event_catchpoint): Use
7175 * break-catch-sig.c (create_signal_catchpoint): Use
7177 * ada-lang.c (create_ada_exception_catchpoint): Use
7180 2017-08-22 Tom Tromey <tom@tromey.com>
7182 * breakpoint.c (add_solib_catchpoint): Use std::unique_ptr.
7184 2017-08-22 Tom Tromey <tom@tromey.com>
7186 * psymtab.c (psymtab_search_name): Return a unique_xmalloc_ptr.
7187 (lookup_partial_symbol): Update.
7189 2017-08-22 Tom Tromey <tom@tromey.com>
7191 * source.h (rewrite_source_path): Return a unique_xmalloc_ptr.
7192 * source.c (rewrite_source_path): Return a unique_xmalloc_ptr.
7193 (find_and_open_source, symtab_to_fullname): Update.
7194 * psymtab.c (psymtab_to_fullname): Update.
7196 2017-08-22 Tom Tromey <tom@tromey.com>
7198 * exec.c (exec_file_attach): Update.
7199 * linux-thread-db.c (try_thread_db_load): Update.
7200 * guile/scm-safe-call.c (gdbscm_safe_source_script): Update.
7201 * utils.c (gdb_realpath): Change return type.
7202 (gdb_realpath_keepfile): Update.
7203 (gdb_realpath_check_trailer, gdb_realpath_tests): New functions.
7204 (_initialize_utils): Register the new self test.
7205 * source.c (openp): Update.
7206 (find_and_open_source): Update.
7207 * nto-tdep.c (nto_find_and_open_solib): Update.
7208 * main.c (set_gdb_data_directory): Update.
7209 (captured_main_1): Update.
7210 * dwarf2read.c (dwarf2_get_dwz_file): Update
7211 (dw2_map_symbol_filenames): Update.
7212 * auto-load.c (auto_load_safe_path_vec_update): Update.
7213 (filename_is_in_auto_load_safe_path_vec): Change type of
7215 (auto_load_objfile_script): Update.
7216 (file_is_auto_load_safe): Update. Use std::string.
7217 * utils.h (gdb_realpath): Return a gdb::unique_xmalloc_ptr.
7219 2017-08-22 Tom Tromey <tom@tromey.com>
7221 * utils.c (gdb_realpath_keepfile): Return a
7222 gdb::unique_xmalloc_ptr.
7223 * exec.c (exec_file_attach): Update.
7224 * utils.h (gdb_realpath_keepfile): Return a
7225 gdb::unique_xmalloc_ptr.
7227 2017-08-22 Tom Tromey <tom@tromey.com>
7229 * compile/compile.c (compile_file_command): Use
7230 gdb::unique_xmalloc_ptr, std::string.
7231 * utils.c (gdb_abspath): Change return type.
7232 * source.c (openp): Update.
7233 * objfiles.c (allocate_objfile): Update.
7234 * main.c (set_gdb_data_directory): Update.
7235 * utils.h (gdb_abspath): Return a gdb::unique_xmalloc_ptr.
7237 2017-08-22 Zhouyi Zhou <zhouzhouyi@gmail.com>
7239 * cli-cmds.c (list_commands): List actual code around more than
7242 2017-08-21 John Baldwin <jhb@FreeBSD.org>
7244 * fbsd-nat.c (fbsd_add_threads): Use array type for `lwps'.
7246 2017-08-21 Pedro Alves <palves@redhat.com>
7249 * c-exp.y (variable production): Handle function aliases.
7250 * minsyms.c (msymbol_is_text): New function.
7251 * minsyms.h (msymbol_is_text): Declare.
7252 * symtab.c (find_function_alias_target): New function.
7253 * symtab.h (find_function_alias_target): Declare.
7255 2017-08-21 Pedro Alves <palves@redhat.com>
7257 * eval.c (evaluate_subexp_standard) <OP_TYPE>: Don't dig past
7259 * typeprint.c (whatis_exp): If handling "whatis", and expression
7260 is OP_TYPE, strip one typedef level. Otherwise don't strip
7262 * valops.c (value_cast): Save "to" type before resolving
7263 stubs/typedefs. Use that type as resulting value's type.
7265 2017-08-18 Tom Tromey <tom@tromey.com>
7266 Pedro Alves <palves@redhat.com>
7268 * spu-multiarch.c (parse_spufs_run): Use scoped_restore.
7269 * sol-thread.c (sol_thread_resume, sol_thread_wait)
7270 (sol_thread_xfer_partial, rw_common): Use scoped_restore.
7271 * procfs.c (procfs_do_thread_registers): Use scoped_restore.
7272 * proc-service.c (ps_xfer_memory): Use scoped_restore.
7273 * linux-tdep.c (linux_corefile_thread): Remove a cleanup.
7274 (linux_get_siginfo_data): Add "thread" argument. Use
7276 * linux-nat.c (linux_child_follow_fork)
7277 (check_stopped_by_watchpoint): Use scoped_restore.
7278 * infrun.c (displaced_step_prepare_throw, write_memory_ptid)
7279 (THREAD_STOPPED_BY, handle_signal_stop): Use scoped_restore.
7280 (restore_inferior_ptid, save_inferior_ptid): Remove.
7281 * btrace.c (btrace_fetch): Use scoped_restore.
7282 * bsd-uthread.c (bsd_uthread_fetch_registers)
7283 (bsd_uthread_store_registers): Use scoped_restore.
7284 * breakpoint.c (reattach_breakpoints, detach_breakpoints): Use
7286 * aix-thread.c (aix_thread_resume, aix_thread_wait)
7287 (aix_thread_xfer_partial): Use scoped_restore.
7288 * inferior.h (save_inferior_ptid): Remove.
7290 2017-08-18 Yao Qi <yao.qi@linaro.org>
7293 * arm-tdep.c (gdb_print_insn_arm): Mark
7294 USER_SPECIFIED_MACHINE_TYPE if exec_bfd isn't NULL.
7296 2017-08-18 Yao Qi <yao.qi@linaro.org>
7298 * NEWS: Mention GDBserver's new option "--selftest".
7299 * Makefile.in (SFILES): Remove selftest.c, add common/selftest.c.
7300 * selftest.c: Move it to common/selftest.c.
7301 * selftest.h: Move it to common/selftest.h.
7302 * selftest-arch.c (reset): New function.
7303 (tests_with_arch): Call reset.
7305 2017-08-18 Yao Qi <yao.qi@linaro.org>
7307 * selftest.c (run_tests): Don't call QUIT. Call debug_printf
7308 instead of exception_fprintf and printf_filtered.
7310 2017-08-18 Yao Qi <yao.qi@linaro.org>
7312 * selftest.c (register_self_test): Rename it to
7313 selftests::register_test.
7314 (run_self_tests): selftest::run_tests.
7315 * selftest.h: Update declarations.
7316 * selftest-arch.c (register_self_test_foreach_arch): Rename it to
7317 selftests::register_test_foreach_arch.
7318 * selftest-arch.h: Update declaration.
7319 * aarch64-tdep.c: Update.
7320 * arm-tdep.c: Likewise.
7321 * disasm-selftests.c: Likewise.
7322 * dwarf2loc.c: Likewise.
7323 * dwarf2-frame.c: Likewise.
7324 * findvar.c: Likewise.
7325 * gdbarch-selftests.c: Likewise.
7326 * maint.c (maintenance_selftest): Likewise.
7327 * regcache.c: Likewise.
7328 * rust-exp.y: Likewise.
7329 * selftest-arch.c: Likewise.
7330 * unittests/environ-selftests.c: Likewise.
7331 * unittests/function-view-selftests.c: Likewise.
7332 * unittests/offset-type-selftests.c: Likewise.
7333 * unittests/optional-selftests.c: Likewise.
7334 * unittests/scoped_restore-selftests.c: Likewise.
7335 * utils-selftests.c: Likewise.
7337 2017-08-17 Pedro Alves <palves@redhat.com>
7339 * cli/cli-cmds.c (source_command): Delete 'old_source_verbose'
7342 2017-08-17 Pedro Alves <palves@redhat.com>
7344 * dwarf2read.c (struct dwarf2_cu) <line_header_die_owner>: New
7346 (reset_die_in_process): Delete, replaced by ...
7347 (process_die_scope): ... this new class. Make it responsible for
7348 freeing cu->line_header too.
7349 (process_die): Use process_die_scope.
7350 (handle_DW_AT_stmt_list): Record the line header's owner CU/DIE in
7351 cu->line_header_die_owner. Don't release the line header if it's
7353 (setup_type_unit_groups): Make the CU/DIE own the line header.
7354 Don't release the line header here.
7356 2017-08-17 Alex Lindsay <alexlindsay239@gmail.com> (tiny change)
7358 * elfread.c (elf_read_minimal_symbols): xfree synthsyms.
7360 2017-08-17 Ruslan Kabatsayev <b7.10110111@gmail.com>
7362 * NEWS: Mention new shortcuts for nexti and stepi in TUI
7365 2017-08-16 Ruslan Kabatsayev <b7.10110111@gmail.com>
7367 * tui/tui.c (tui_commands): Add "nexti" and "stepi" to the Single-Key
7370 2017-08-15 Stafford Horne <shorne@gmail.com>
7372 * MAINTAINERS (Write After Approval): Add Stafford Horne.
7374 2017-08-15 Stafford Horne <shorne@gmail.com>
7376 * xtensa-tdep.c (xtensa_init_reggroups): Use xstrdup for cpname.
7378 2017-08-15 Sergio Durigan Junior <sergiodj@redhat.com>
7381 * infcmd.c (unset_environment_command): Use the 'clear' method on
7382 the environment instead of resetting it.
7384 2017-08-15 John Baldwin <jhb@FreeBSD.org>
7386 * fbsd-nat.c (fbsd_convert_siginfo): Fix compile on big-endian
7389 2017-08-14 Tom Tromey <tom@tromey.com>
7391 * valprint.c (print_octal_chars): Use HOST_CHAR_BIT.
7392 (print_binary_chars): Likewise.
7393 (BITS_IN_BYTES): Remove.
7395 2017-08-14 Tom Tromey <tom@tromey.com>
7398 * valprint.c (LOW_ZERO): Change value to 034.
7399 (print_octal_chars): Add static_asserts for octal constants.
7400 * printcmd.c (print_scalar_formatted): Add 'd' case.
7402 2017-08-11 Tom Tromey <tom@tromey.com>
7404 * symfile.c (add_symbol_file_command): Use std::vector.
7406 2017-08-14 Tom Tromey <tom@tromey.com>
7408 * break-catch-throw.c (handle_gnu_v3_exceptions): Use std::move.
7409 * break-catch-syscall.c (create_syscall_event_catchpoint): Use
7411 * break-catch-sig.c (create_signal_catchpoint): Use std::move.
7413 2017-08-11 Pedro Alves <palves@redhat.com>
7415 * infrun.c (process_event_stop_test): Adjust
7416 function_name_is_marked_for_skip call.
7417 * skip.c: Include <list>.
7418 (skiplist_entry): Make it a class with private fields, and
7420 (skiplist_entry_chain): Delete.
7421 (skiplist_entries): New.
7422 (skiplist_entry_count): Delete.
7423 (highest_skiplist_entry_num): New.
7424 (ALL_SKIPLIST_ENTRIES, ALL_SKIPLIST_ENTRIES_SAFE): Delete.
7425 (add_skiplist_entry): Delete.
7426 (skiplist_entry::skiplist_entry): New.
7427 (skiplist_entry::add_entry): New.
7428 (skip_file_command, skip_function): Adjust.
7429 (compile_skip_regexp): Delete.
7430 (skip_command): Don't compile regexp here. Adjust to use
7431 skiplist_entry::add_entry.
7432 (skip_info): Adjust to use range-for and getters.
7433 (skip_enable_command, skip_disable_command): Adjust to use
7434 range-for and setters.
7435 (skip_delete_command): Adjust to use std::list.
7436 (add_skiplist_entry): Delete.
7437 (skip_file_p): Delete, refactored as ...
7438 (skiplist_entry::do_skip_file_p): ... this new method.
7439 (skip_gfile_p): Delete, refactored as ...
7440 (skiplist_entry::do_gskip_file_p): ... this new method.
7441 (skip_function_p, skip_rfunction_p): Delete, refactored as ...
7442 (skiplist_entry::skip_function_p): ... this new method.
7443 (function_name_is_marked_for_skip): Now returns bool, and takes
7444 the function sal by const reference. Adjust to use range-for and
7445 skiplist_entry methods.
7446 (_initialize_step_skip): Remove references to
7447 skiplist_entry_chain, skiplist_entry_count.
7448 * skip.h (function_name_is_marked_for_skip): Now returns bool, and
7449 takes the function sal by const reference.
7451 2017-08-11 Yao Qi <yao.qi@linaro.org>
7453 * dwarf2-frame.c (clear_pointer_cleanup): Remove.
7454 (dwarf2_frame_cache): Remove reset_cache_cleanup.
7455 (dwarf2_frame_cache):
7456 * frame-unwind.c (frame_unwind_try_unwinder): Catch
7457 RETURN_MASK_ALL and set *this_case to NULL.
7458 * frame-unwind.h: Update comments.
7460 2017-08-11 Yao Qi <yao.qi@linaro.org>
7462 * dwarf2-frame.c (dwarf2_frame_state_alloc_regs): Remove.
7463 (dwarf2_frame_state_copy_regs): Remove.
7464 (dwarf2_frame_state_free_regs): Remove.
7465 (dwarf2_frame_state::~dwarf2_frame_state): Remove.
7466 (dwarf2_restore_rule): Call method .alloc_regs instead of
7467 dwarf2_frame_state_alloc_regs.
7468 (execute_cfa_program): Likewise. Call dwarf2_frame_state_reg_info
7469 constructor. Call std::move.
7470 (dwarf2_fetch_cfa_info): Don't call dwarf2_frame_state_copy_regs.
7471 (dwarf2_frame_cache): Likewise.
7473 [GDB_SELF_TEST]: Include selftest.h and
7475 [GDB_SELF_TEST] (execute_cfa_program_test): New function.
7476 (_initialize_dwarf2_frame) [GDB_SELF_TEST]: Register
7477 execute_cfa_program_test.
7479 * dwarf2-frame.h (dwarf2_frame_state_reg_info): Add ctor, dtor,
7480 copy ctor, assignment operator, move assignment.
7481 <alloc_regs>: New method.
7483 (struct dwarf2_frame_state): Delete dtor.
7484 (dwarf2_frame_state_alloc_regs): Remove declaration.
7485 * sparc-tdep.c (sparc_execute_dwarf_cfa_vendor_op): Don't call
7486 dwarf2_frame_state_alloc_regs, use .alloc_regs instead.
7488 2017-08-11 Yao Qi <yao.qi@linaro.org>
7490 * dwarf2-frame.c (dwarf2_frame_state_free): Remove.
7491 (dwarf2_frame_state::dwarf2_frame_state): New.
7492 (dwarf2_frame_state::~dwarf2_frame_state): New.
7493 (dwarf2_fetch_cfa_info): Update.
7494 (dwarf2_frame_cache): Remove old_chain. Change 'fs' to an object
7495 rather than a pointer. Update code.
7496 * dwarf2-frame.h (struct dwarf2_frame_state): Declare ctor and
7498 <data_align, code_align, retaddr_column>: Change them to const.
7499 <armcc_cfa_offsets_sf, armcc_cfa_offsets_reversed>: Change them
7502 2017-08-11 Yao Qi <yao.qi@linaro.org>
7504 * dwarf2-frame.h (struct dwarf2_frame_state_reg) <exp_len>: Remove.
7505 <loc.exp>: New field.
7506 * dwarf2-frame.c (execute_cfa_program): Update.
7507 (dwarf2_frame_prev_register): Update.
7509 2017-08-10 Pedro Alves <palves@redhat.com>
7511 * common/gdb_unique_ptr.h (xfree_deleter<T[]>): Define.
7513 2017-08-09 John Baldwin <jhb@FreeBSD.org>
7515 * fbsd-nat.c (struct fbsd_fork_info): Remove.
7516 (fbsd_pending_children): Use std::list.
7517 (fbsd_remember_child): Likewise.
7518 (fbsd_is_child_pending): Likewise.
7519 (fbsd_pending_vfork_done): Use std::forward_list.
7520 (fbsd_add_vfork_done): Likewise.
7521 (fbsd_is_vfork_done_pending): Likewise.
7522 (fbsd_next_vfork_done): Likewise.
7524 2017-08-09 John Baldwin <jhb@FreeBSD.org>
7526 * fbsd-nat.c [HAVE_KINFO_GETVMMAP] (struct free_deleter): New.
7527 (fbsd_find_memory_regions): Use free_deleter with std::unique_ptr.
7528 [!HAVE_KINFO_GETVMMAP] (fbsd_find_memory_regions): Use std::string
7530 (fbsd_xfer_partial): Use gdb::byte_vector.
7531 (fbsd_add_threads): Use gdb::unique_xmalloc_ptr.
7533 2017-08-09 John Baldwin <jhb@FreeBSD.org>
7535 * fbsd-nat.c: [!HAVE_KINFO_GETVMMAP]: Include <sys/user.h> and
7537 (fbsd_find_memory_regions): Fix `mapfile' initialization.
7539 2017-08-09 Tom Tromey <tom@tromey.com>
7541 * skip.c (skiplist_entry): New constructor.
7542 (skiplist_entry::enabled, skiplist_entry::function_is_regexp)
7543 (skiplist_entry::file_is_glob): Now bool.
7544 (skiplist_entry::file, skiplist_entry::function): Now
7546 (make_skip_entry): Return a unique_ptr. Use new.
7547 (free_skiplist_entry, free_skiplist_entry_cleanup)
7548 (make_free_skiplist_entry_cleanup): Remove.
7549 (skip_command, skip_disable_command, add_skiplist_entry)
7550 (skip_form_bytes, compile_skip_regexp, skip_command, skip_info)
7551 (skip_file_p, skip_gfile_p, skip_function_p, skip_rfunction_p)
7552 (function_name_is_marked_for_skip): Update.
7553 (skip_delete_command): Update. Use delete.
7555 2017-08-09 Jiong Wang <jiong.wang@arm.com>
7557 * aarch64-linux-tdep.c: Include "auxv.h" and "elf/common.h".
7558 (aarch64_linux_core_read_description): New function.
7559 (aarch64_linux_init_abi): Register gdbarch_core_read_description.
7561 2017-08-09 Pedro Alves <palves@redhat.com>
7563 * cp-name-parser.y (cp_comp_to_string): Return a
7564 gdb::unique_xmalloc_ptr<char>.
7565 * cp-support.c (replace_typedefs_qualified_name)
7566 (replace_typedefs): Adjust to use gdb::unique_xmalloc_ptr<char>.
7567 (cp_canonicalize_string_full): Use op= instead of explicit
7569 (cp_class_name_from_physname, method_name_from_physname)
7570 (cp_func_name, cp_remove_params): Adjust to use
7571 gdb::unique_xmalloc_ptr<char>.
7572 * cp-support.h (cp_comp_to_string): Return a
7573 gdb::unique_xmalloc_ptr<char>.
7574 * python/py-type.c (typy_lookup_type): Adjust to use
7575 gdb::unique_xmalloc_ptr<char>.
7577 2017-08-09 H.J. Lu <hongjiu.lu@intel.com>
7579 * dwarf2read.c (dwarf2_string_attr): Fix a typo.
7581 2017-08-09 Alex Lindsay <alexlindsay239@gmail.com>
7582 Yao Qi <yao.qi@linaro.org>
7584 * cp-support.c (cp_canonicalize_string_full): Use
7585 gdb::unique_xmalloc_ptr<char>.
7586 (cp_canonicalize_string): Likewise.
7588 2017-08-09 Yao Qi <yao.qi@linaro.org>
7590 * features/Makefile (WHICH): Remove i386/ non-linux stuff.
7591 * regformats/i386/amd64-avx-avx512.dat: Remove.
7592 * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Remove.
7593 * regformats/i386/amd64-avx-mpx.dat:Remove.
7594 * regformats/i386/amd64-avx.dat: Remove.
7595 * regformats/i386/amd64-mpx.dat: Remove.
7596 * regformats/i386/i386-avx-avx512.dat: Remove.
7597 * regformats/i386/i386-avx-mpx-avx512-pku.dat: Remove.
7598 * regformats/i386/i386-avx-mpx.dat: Remove.
7599 * regformats/i386/i386-mmx.dat: Remove.
7600 * regformats/i386/i386-mpx.dat: Remove.
7602 2017-08-09 Yao Qi <yao.qi@linaro.org>
7604 * amd64-tdep.h (tdesc_x32): Remove the declaration.
7605 * amd64-tdep.c: Don't include features/i386/x32*.c.
7606 (_initialize_amd64_tdep): Don't call initialize_tdesc_x32*
7608 * features/Makefile (WHICH): Remove i386/x32, i386/x32-avx,
7609 and i386/x32-avx-avx512.
7610 (XMLTOC): Remove i386/x32-avx.xml, i386/x32-avx-avx512.xml,
7612 * features/i386/x32-avx-avx512.c: Removed.
7613 * features/i386/x32-avx-avx512.xml: Removed.
7614 * features/i386/x32-avx.c: Removed.
7615 * features/i386/x32-avx.xml: Removed.
7616 * features/i386/x32.c: Removed.
7617 * features/i386/x32.xml: Removed.
7618 * regformats/i386/x32-avx-avx512.dat: Removed.
7619 * regformats/i386/x32-avx.dat: Removed.
7620 * regformats/i386/x32.dat: Removed.
7622 2017-08-07 Maciej W. Rozycki <macro@imgtec.com>
7624 PR breakpoints/21886
7625 * mem-break.c (default_memory_insert_breakpoint): Use
7626 `->placed_address' rather than `->reqstd_address' for the
7627 breakpoint location.
7629 2017-08-07 Maciej W. Rozycki <macro@imgtec.com>
7631 * arch-utils.c (default_print_insn): Remove arch/mach/endian
7634 2017-08-07 Maciej W. Rozycki <macro@imgtec.com>
7636 * gdbarch.sh (gdbarch_info): Replace the `tdep_info' member with
7637 a union of `tdep_info', `tdesc_data' and `id'.
7638 * aarch64-tdep.c (aarch64_gdbarch_init): Use `info.tdesc_data'
7639 rather than `info.tdep_info'.
7640 * amd64-linux-tdep.c (amd64_linux_init_abi): Likewise.
7641 * i386-linux-tdep.c (i386_linux_init_abi): Likewise.
7642 * i386-tdep.c (i386_gdbarch_init): Likewise.
7643 * mips-linux-tdep.c (mips_linux_init_abi): Likewise.
7644 * mips-tdep.c (mips_gdbarch_init): Likewise.
7645 * nds32-tdep.c (nds32_gdbarch_init): Likewise.
7646 * rs6000-tdep.c (rs6000_gdbarch_init): Likewise.
7647 * ppc-linux-tdep.c (ppu2spu_sniffer): Use `info.id' rather than
7649 (ppc_linux_init_abi): Use `info.tdesc_data' rather than
7651 * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
7652 * spu-multiarch.c (spu_gdbarch): Use `info.id' rather than
7654 * spu-tdep.c (spu_gdbarch_init): Likewise.
7655 * gdbarch.h: Regenerate.
7657 2017-08-07 Leszek Swirski <leszeks@google.com>
7660 * dwarf2read.c (dwarf2_string_attr): Allow DW_FORM_GNU_strp_alt.
7662 2017-08-07 Simon Marchi <simon.marchi@ericsson.com>
7664 * remote-sim.c (gdbsim_load): Remove char **argv local variable.
7665 (gdbsim_open): Rename gdb_argv args object to argv.
7667 2017-08-05 Tom Tromey <tom@tromey.com>
7669 * compile/compile-object-load.c (compile_object_load): Use
7670 gdb::unique_xmalloc_ptr.
7671 * cli/cli-dump.c (scan_filename): Rename from
7672 scan_filename_with_cleanup. Change return type.
7673 (scan_expression): Rename from scan_expression_with_cleanup.
7675 (dump_memory_to_file, dump_value_to_file, restore_command):
7676 Use gdb::unique_xmalloc_ptr. Update.
7677 * cli/cli-cmds.c (find_and_open_script): Use
7678 gdb::unique_xmalloc_ptr.
7679 * tracefile-tfile.c (tfile_open): Use gdb::unique_xmalloc_ptr.
7680 * symmisc.c (maintenance_print_symbols)
7681 (maintenance_print_msymbols): Use gdb::unique_xmalloc_ptr.
7682 * symfile.c (symfile_bfd_open, generic_load)
7683 (add_symbol_file_command, remove_symbol_file_command): Use
7684 gdb::unique_xmalloc_ptr.
7685 * source.c (openp): Use gdb::unique_xmalloc_ptr.
7686 * psymtab.c (maintenance_print_psymbols): Use
7687 gdb::unique_xmalloc_ptr.
7688 * corelow.c (core_open): Use gdb::unique_xmalloc_ptr.
7689 * breakpoint.c (save_breakpoints): Use gdb::unique_xmalloc_ptr.
7690 * solib.c (solib_map_sections): Use gdb::unique_xmalloc_ptr.
7691 (reload_shared_libraries_1): Likewise.
7693 2017-08-05 Tom Tromey <tom@tromey.com>
7695 * rust-exp.y (rust_op_ptr, set_field): Remove typedefs.
7696 (rust_op_vector, rust_set_vector): New typedefs.
7697 (current_parser): New global.
7698 (work_obstack): Change to pointer type. Update all users.
7699 (rust_ast, pstate): Remove globals.
7700 (struct rust_parser): New.
7701 (%union) <params, field_inits>: Change type.
7702 (start, tuple_expr, unit_expr, struct_expr_list, literal)
7703 (field_expr, expr_list, maybe_expr_list, type_list): Update.
7704 (ast_call_ish, ast_path, ast_function_type, ast_tuple_type)
7705 (convert_params_to_types, convert_params_to_expression): Change
7707 (ast_string): Change type of "fields".
7708 (rust_parse): Make a rust_parser. Remove cleanups.
7709 (rust_lex_tests): Make and install an auto_obstack.
7711 2017-08-04 Yao Qi <yao.qi@linaro.org>
7713 * configure.srv (ipa_x32_linux_regobj): New.
7714 * linux-amd64-ipa.c (get_ipa_tdesc): Use X86_TDESC_AVX_AVX512
7715 instead of X86_TDESC_AVX512.
7716 (initialize_low_tracepoint): Call
7717 init_registers_x32_avx_avx512_linux.
7719 2017-08-04 Yao Qi <yao.qi@linaro.org>
7721 * utils.h (gdb_argv): Add namespace std for nullptr_t.
7723 2017-08-03 Ruslan Kabatsayev <b7.10110111@gmail.com>
7725 * MAINTAINERS (Write After Approval): Add Ruslan Kabatsayev.
7727 2017-08-03 Tom Tromey <tom@tromey.com>
7729 * utils.c (make_cleanup_freeargv, do_freeargv, gdb_buildargv):
7731 * utils.h (make_cleanup_freeargv, gdb_buildargv): Remove.
7733 2017-08-03 Tom Tromey <tom@tromey.com>
7735 * python/py-param.c (compute_enum_values): Use gdb_argv.
7737 2017-08-03 Tom Tromey <tom@tromey.com>
7739 * utils.h (struct gdb_argv_deleter): New.
7740 (gdb_argv): New class.
7741 * utils.c (gdb_argv::reset): New method.
7742 * tracepoint.c (delete_trace_variable_command): Use gdb_argv.
7743 * tracefile.c (tsave_command): Use gdb_argv.
7744 * top.c (new_ui_command): Use gdb_argv.
7745 * symmisc.c (maintenance_print_symbols)
7746 (maintenance_print_msymbols, maintenance_expand_symtabs): Use gdb_argv.
7747 * symfile.c (symbol_file_command, generic_load)
7748 (remove_symbol_file_command): Use gdb_argv.
7749 * stack.c (backtrace_command): Use gdb_argv.
7750 * source.c (add_path, show_substitute_path_command)
7751 (unset_substitute_path_command, set_substitute_path_command):
7753 * skip.c (skip_command): Use gdb_argv. Use gdb_buildargv.
7754 * ser-mingw.c (pipe_windows_open): Use gdb_argv.
7755 * remote.c (extended_remote_run, remote_put_command)
7756 (remote_get_command, remote_delete_command): Use gdb_argv.
7757 * remote-sim.c (gdbsim_load, gdbsim_create_inferior)
7758 (gdbsim_open): Use gdb_argv.
7759 * python/py-cmd.c (gdbpy_string_to_argv): Use gdb_argv.
7760 * psymtab.c (maintenance_print_psymbols): Use gdb_argv.
7761 * procfs.c (procfs_info_proc): Use gdb_argv.
7762 * interps.c (interpreter_exec_cmd): Use gdb_argv.
7763 * infrun.c (handle_command): Use gdb_argv.
7764 * inferior.c (add_inferior_command, clone_inferior_command):
7766 * guile/scm-string.c (gdbscm_string_to_argv): Use gdb_argv.
7767 * exec.c (exec_file_command): Use gdb_argv.
7768 * cli/cli-cmds.c (alias_command): Use gdb_argv.
7769 * compile/compile.c (build_argc_argv): Use gdb_argv.
7771 2017-08-03 Tom Tromey <tom@tromey.com>
7773 * python/python.c (gdbpy_decode_line): Use unique_xmalloc_ptr.
7775 2017-08-03 Tom Tromey <tom@tromey.com>
7777 * python/python.c (compute_python_string): Return std::string.
7778 (gdbpy_eval_from_control_command): Update.
7779 (do_start_initialization): Use std::string.
7780 * python/py-varobj.c (py_varobj_iter_next): Use string_printf, not
7782 * python/py-breakpoint.c (local_setattro): Use string_printf, not
7785 2017-08-03 Tom Tromey <tom@tromey.com>
7787 * top.h (do_restore_instream_cleanup): Remove.
7788 * top.c (do_restore_instream_cleanup): Remove.
7789 (read_command_file): Use scoped_restore.
7790 * cli/cli-script.c (execute_user_command): Use scoped_restore.
7792 2017-08-03 Tom Tromey <tom@tromey.com>
7794 * cli/cli-script.c (execute_user_command)
7795 (execute_control_command): Use scoped_restore.
7797 2017-08-03 Tom Tromey <tom@tromey.com>
7799 * cli/cli-script.c (do_restore_user_call_depth): Remove.
7800 (execute_user_command): Remove user_call_depth; use
7801 user_args_stack's size instead.
7803 2017-08-03 Tom Tromey <tom@tromey.com>
7805 * top.h (in_user_command): Remove.
7806 * top.c (in_user_command): Remove.
7807 * cli/cli-script.c (do_restore_user_call_depth)
7808 (execute_user_command): Update.
7810 2017-08-03 Tom Tromey <tom@tromey.com>
7812 * valops.c (search_struct_method): Use gdb::byte_vector.
7813 * valarith.c (value_concat): Use std::vector.
7814 * target.c (memory_xfer_partial): Use gdb::byte_vector.
7815 (simple_search_memory): Likewise.
7816 * printcmd.c (find_string_backward): Use gdb::byte_vector.
7817 * mi/mi-main.c (mi_cmd_data_write_memory): Use gdb::byte_vector.
7818 * gcore.c (gcore_copy_callback): Use gdb::byte_vector.
7819 * elfread.c (elf_rel_plt_read): Use std::string.
7820 * cp-valprint.c (cp_print_value): Use gdb::byte_vector.
7821 * cli/cli-dump.c (restore_section_callback): Use
7824 2017-08-03 Tom Tromey <tom@tromey.com>
7826 * jit.c (jit_reader_load_command): Use unique_xmalloc_ptr.
7828 2017-08-03 Tom Tromey <tom@tromey.com>
7830 * tui/tui-regs.c (tui_restore_gdbout): Remove.
7831 (tui_register_format): Use scoped_restore.
7833 2017-08-03 Tom Tromey <tom@tromey.com>
7835 * reverse.c (exec_direction_default): Remove.
7836 (exec_reverse_once): Use scoped_restore.
7837 * remote.c (restore_remote_timeout): Remove.
7838 (remote_flash_erase, remote_flash_write, remote_flash_done)
7839 (readchar, remote_serial_write): Use scoped_restore.
7840 * cli/cli-script.c (struct source_cleanup_lines_args)
7841 (source_cleanup_lines): Remove.
7842 (script_from_file): Use scoped_restore.
7843 * cli/cli-cmds.c (source_verbose_cleanup): Remove.
7844 (source_command): Use scoped_restore.
7846 2017-08-03 Tom Tromey <tom@tromey.com>
7848 * utils.h (make_cleanup_free_so): Remove.
7849 * utils.c (do_free_so, make_cleanup_free_so): Remove.
7850 * solist.h (struct so_deleter): New.
7851 (so_list_up): New typedef.
7852 * solib-svr4.c (svr4_read_so_list): Use so_list_up.
7854 2017-08-03 Tom Tromey <tom@tromey.com>
7856 * utils.h (make_cleanup_restore_current_language): Remove.
7857 * utils.c (do_restore_current_language)
7858 (make_cleanup_restore_current_language): Remove.
7859 * parse.c (parse_exp_in_context_1)
7860 (parse_expression_with_language): Use
7861 scoped_restore_current_language.
7862 * mi/mi-main.c (mi_cmd_execute): Use
7863 scoped_restore_current_language.
7864 * language.h (scoped_restore_current_language): New class.
7866 2017-08-03 Tom Tromey <tom@tromey.com>
7868 * compile/compile.c (cleanup_unlink_file): Remove.
7869 (compile_to_object): Use gdb::unlinker.
7870 (eval_compile_command): Likewise.
7872 2017-08-03 Tom Tromey <tom@tromey.com>
7874 * utils.h (make_cleanup_fclose): Remove.
7875 * utils.c (do_fclose_cleanup, make_cleanup_fclose): Remove.
7877 2017-08-03 Tom Tromey <tom@tromey.com>
7879 * top.c (open_terminal_stream): Return gdb_file_up.
7880 (new_ui_command): Update.
7882 2017-08-03 Tom Tromey <tom@tromey.com>
7884 * source.c (print_source_lines_base, forward_search_command)
7885 (reverse_search_command): Use gdb_file_up.
7887 2017-08-03 Tom Tromey <tom@tromey.com>
7889 * fbsd-nat.c (fbsd_find_memory_regions): Update.
7891 2017-08-03 Tom Tromey <tom@tromey.com>
7893 * cli/cli-cmds.c (find_and_open_script): Change return type.
7894 Remove "streamp" and "full_path" parameters.
7895 (source_script_with_search): Update.
7896 * auto-load.c (source_script_file): Update.
7897 * cli/cli-cmds.h (find_and_open_script): Change type.
7898 (open_script): New struct.
7900 2017-08-03 Tom Tromey <tom@tromey.com>
7902 * xml-support.c (xml_fetch_content_from_file): Update.
7903 * ui-file.c (stdio_file::open): Update.
7904 * tracefile-tfile.c (tfile_start): Update.
7905 * remote.c (remote_file_put, remote_file_get): Update.
7906 * nat/linux-procfs.c (linux_proc_get_int)
7907 (linux_proc_pid_get_state, linux_proc_tid_get_name): Update.
7908 * nat/linux-osdata.c (linux_common_core_of_thread): Update.
7909 (command_from_pid, commandline_from_pid, linux_xfer_osdata_cpus)
7910 (print_sockets, linux_xfer_osdata_shm, linux_xfer_osdata_sem)
7911 (linux_xfer_osdata_msg, linux_xfer_osdata_modules): Update.
7912 * nat/linux-btrace.c (linux_determine_kernel_start): Update.
7913 * linux-nat.c (linux_proc_pending_signals): Update.
7914 * dwarf2read.c (write_psymtabs_to_index): Use gdb_file_up.
7915 (file_closer): Remove.
7916 * compile/compile.c (compile_to_object): Update.
7917 * common/filestuff.h (struct gdb_file_deleter): New.
7918 (gdb_file_up): New typedef.
7919 (gdb_fopen_cloexec): Change return type.
7920 * common/filestuff.c (gdb_fopen_cloexec): Return gdb_file_up.
7921 * cli/cli-dump.c (fopen_with_cleanup): Remove.
7922 (dump_binary_file, restore_binary_file): Update.
7923 * auto-load.c (auto_load_objfile_script_1): Update.
7925 2017-08-03 Tom Tromey <tom@tromey.com>
7927 * tracepoint.c (tvariables_info_1): Use ui_out_emit_table.
7928 (info_static_tracepoint_markers_command): Likewise.
7929 * solib.c (info_sharedlibrary_command): Use ui_out_emit_table.
7930 * skip.c (skip_info): Use ui_out_emit_table.
7931 * progspace.c (print_program_space): Use ui_out_emit_table.
7932 * osdata.c (info_osdata): Use ui_out_emit_table.
7933 * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions): Use
7935 * linux-thread-db.c (info_auto_load_libthread_db): Use
7937 * inferior.c (print_inferior): Use ui_out_emit_table.
7938 * gdb_bfd.c (maintenance_info_bfds): Use ui_out_emit_table.
7939 * breakpoint.c (breakpoint_1): Use ui_out_emit_table.
7940 * auto-load.c (auto_load_info_scripts): Use ui_out_emit_table.
7941 * ada-tasks.c (print_ada_task_info): Use ui_out_emit_table.
7942 * ui-out.h (class ui_out_emit_table): New.
7944 2017-08-02 Maciej W. Rozycki <macro@imgtec.com>
7946 * mips-tdep.c (mips_fpu_type_str): New function.
7947 (mips_dump_tdep): Call it.
7949 2017-08-01 Maciej W. Rozycki <macro@imgtec.com>
7951 * mips-tdep.c (mips_gdbarch_init): Use MIPS_FPU_TYPE to access
7954 2017-07-31 Xavier Roirand <roirand@adacore.com>
7956 * solib-darwin.c (DYLD_VERSION_MAX): Increase value.
7958 2017-07-27 Xavier Roirand <roirand@adacore.com>
7960 * MAINTAINERS (Write After Approval): Add Xavier Roirand.
7962 2017-07-26 Yao Qi <yao.qi@linaro.org>
7964 * cli/cli-cmds.c (maintenancechecklist): New variable.
7965 * gdbcmd.h (maintenancechecklist): Declare it.
7966 * i386-linux-tdep.c (_initialize_i386_linux_tdep) [GDB_SELF_TEST]:
7967 Call i386_linux_read_description with different masks.
7968 * maint.c (maintenance_check_command): New function.
7969 (_initialize_maint_cmds): Call add_prefix_cmd.
7970 * target-descriptions.c (tdesc_reg): override operator != and ==.
7971 (tdesc_type): Likewise.
7972 (tdesc_feature): Likewise.
7973 (target_desc): Likewise.
7974 [GDB_SELF_TEST] (selftests::record_xml_tdesc): New function.
7975 (maintenance_check_xml_descriptions): New function.
7976 (_initialize_target_descriptions) Add command "xml-descriptions".
7977 * target-descriptions.h (selftests::record_xml_tdesc): Declare.
7979 2017-07-26 Yao Qi <yao.qi@linaro.org>
7981 * i386-linux-tdep.c: Don't include features/i386/i386-*linux.c.
7982 Include features/i386/32bit-*.c.
7983 (i386_linux_read_description): Generate target description if it
7985 (_initialize_i386_linux_tdep): Don't call _initialize_tdesc_i386
7987 * features/i386/32bit-linux.c: Re-generated.
7988 * features/i386/32bit-sse.c: Likewise.
7989 * target-descriptions.c (print_c_feature::visit): Print code to
7990 set register number if needed.
7991 (print_c_feature) <m_next_regnum>: New field.
7993 2017-07-26 Yao Qi <yao.qi@linaro.org>
7995 * features/Makefile (CFILES): Rename with TDESC_CFILES.
7996 (FEATURE_XMLFILES): New.
7997 (FEATURE_CFILES): New.
7999 (clean-cfiles): Remove generated c files.
8000 * features/i386/32bit-avx.c: Generated.
8001 * features/i386/32bit-avx512.c: Generated.
8002 * features/i386/32bit-core.c: Generated.
8003 * features/i386/32bit-linux.c: Generated.
8004 * features/i386/32bit-mpx.c: Generated.
8005 * features/i386/32bit-pkeys.c: Generated.
8006 * features/i386/32bit-sse.c: Generated.
8007 * target-descriptions.c: Include algorithm.
8008 (tdesc_element_visitor): Add method visit_end.
8009 (print_c_tdesc): Implement visit_end.
8010 (print_c_tdesc:: m_filename_after_features): Move it to
8012 (print_c_feature): New class.
8013 (maint_print_c_tdesc_cmd): Use print_c_feature if XML file
8014 name starts with "i386/32bit-".
8016 2017-07-26 Yao Qi <yao.qi@linaro.org>
8018 * target-descriptions.c (tdesc_element_visitor): New class.
8019 (tdesc_element): New class.
8020 (tdesc_reg): Inherit from tdesc_element.
8021 (tdesc_reg::accept): New function.
8022 (tdesc_type): Inherit from tdesc_element.
8023 (tdesc_type::accept): New function.
8024 (tdesc_feature): Inherit from tdesc_element.
8025 (tdesc_feature::accept): New function.
8026 (target_desc): Inherit from tdesc_element.
8027 (target_desc::target_desc): New.
8028 (target_desc::~target_desc): New.
8029 (target_desc::accept): New.
8030 (allocate_target_description): Use new.
8031 (free_target_description): Use delete.
8032 (print_c_tdesc): New class.
8033 (maint_print_c_tdesc_cmd): Adjust.
8035 * features/aarch64.c: Re-generated.
8036 * features/arc-arcompact.c: Re-generated.
8037 * features/arc-v2.c: Re-generated.
8038 * features/arm/arm-with-iwmmxt.c: Re-generated.
8039 * features/arm/arm-with-m.c: Re-generated.
8040 * features/arm/arm-with-m-fpa-layout.c: Re-generated.
8041 * features/arm/arm-with-m-vfp-d16.c: Re-generated.
8042 * features/arm/arm-with-neon.c: Re-generated.
8043 * features/arm/arm-with-vfpv2.c: Re-generated.
8044 * features/arm/arm-with-vfpv3.c: Re-generated.
8045 * features/i386/amd64-avx-avx512.c: Re-generated.
8046 * features/i386/amd64-avx-avx512-linux.c: Re-generated.
8047 * features/i386/amd64-avx.c: Re-generated.
8048 * features/i386/amd64-avx-linux.c: Re-generated.
8049 * features/i386/amd64-avx-mpx-avx512-pku.c: Re-generated.
8050 * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Re-generated.
8051 * features/i386/amd64-avx-mpx.c: Re-generated.
8052 * features/i386/amd64-avx-mpx-linux.c: Re-generated.
8053 * features/i386/amd64.c: Re-generated.
8054 * features/i386/amd64-linux.c: Re-generated.
8055 * features/i386/amd64-mpx.c: Re-generated.
8056 * features/i386/amd64-mpx-linux.c: Re-generated.
8057 * features/i386/i386-avx-avx512.c: Re-generated.
8058 * features/i386/i386-avx-avx512-linux.c: Re-generated.
8059 * features/i386/i386-avx.c: Re-generated.
8060 * features/i386/i386-avx-linux.c: Re-generated.
8061 * features/i386/i386-avx-mpx-avx512-pku.c: Re-generated.
8062 * features/i386/i386-avx-mpx-avx512-pku-linux.c: Re-generated.
8063 * features/i386/i386-avx-mpx.c: Re-generated.
8064 * features/i386/i386-avx-mpx-linux.c: Re-generated.
8065 * features/i386/i386.c: Re-generated.
8066 * features/i386/i386-linux.c: Re-generated.
8067 * features/i386/i386-mmx.c: Re-generated.
8068 * features/i386/i386-mmx-linux.c: Re-generated.
8069 * features/i386/i386-mpx.c: Re-generated.
8070 * features/i386/i386-mpx-linux.c: Re-generated.
8071 * features/i386/x32-avx-avx512.c: Re-generated.
8072 * features/i386/x32-avx-avx512-linux.c: Re-generated.
8073 * features/i386/x32-avx.c: Re-generated.
8074 * features/i386/x32-avx-linux.c: Re-generated.
8075 * features/i386/x32.c: Re-generated.
8076 * features/i386/x32-linux.c: Re-generated.
8077 * features/microblaze.c: Re-generated.
8078 * features/microblaze-with-stack-protect.c: Re-generated.
8079 * features/mips64-dsp-linux.c: Re-generated.
8080 * features/mips64-linux.c: Re-generated.
8081 * features/mips-dsp-linux.c: Re-generated.
8082 * features/mips-linux.c: Re-generated.
8083 * features/nds32.c: Re-generated.
8084 * features/nios2.c: Re-generated.
8085 * features/nios2-linux.c: Re-generated.
8086 * features/rs6000/powerpc-32.c: Re-generated.
8087 * features/rs6000/powerpc-32l.c: Re-generated.
8088 * features/rs6000/powerpc-403.c: Re-generated.
8089 * features/rs6000/powerpc-403gc.c : Re-generated.
8090 * features/rs6000/powerpc-405.c: Re-generated.
8091 * features/rs6000/powerpc-505.c: Re-generated.
8092 * features/rs6000/powerpc-601.c: Re-generated.
8093 * features/rs6000/powerpc-602.c: Re-generated.
8094 * features/rs6000/powerpc-603.c: Re-generated.
8095 * features/rs6000/powerpc-604.c: Re-generated.
8096 * features/rs6000/powerpc-64.c: Re-generated.
8097 * features/rs6000/powerpc-64l.c: Re-generated.
8098 * features/rs6000/powerpc-7400.c: Re-generated.
8099 * features/rs6000/powerpc-750.c: Re-generated.
8100 * features/rs6000/powerpc-860.c: Re-generated.
8101 * features/rs6000/powerpc-altivec32.c: Re-generated.
8102 * features/rs6000/powerpc-altivec32l.c: Re-generated.
8103 * features/rs6000/powerpc-altivec64.c: Re-generated.
8104 * features/rs6000/powerpc-altivec64l.c: Re-generated.
8105 * features/rs6000/powerpc-cell32l.c: Re-generated.
8106 * features/rs6000/powerpc-cell64l.c: Re-generated.
8107 * features/rs6000/powerpc-e500.c: Re-generated.
8108 * features/rs6000/powerpc-e500l.c: Re-generated.
8109 * features/rs6000/powerpc-isa205-32l.c: Re-generated.
8110 * features/rs6000/powerpc-isa205-64l.c: Re-generated.
8111 * features/rs6000/powerpc-isa205-altivec32l.c: Re-generated.
8112 * features/rs6000/powerpc-isa205-altivec64l.c: Re-generated.
8113 * features/rs6000/powerpc-isa205-vsx32l.c: Re-generated.
8114 * features/rs6000/powerpc-isa205-vsx64l.c: Re-generated.
8115 * features/rs6000/powerpc-vsx32.c: Re-generated.
8116 * features/rs6000/powerpc-vsx32l.c: Re-generated.
8117 * features/rs6000/powerpc-vsx64.c: Re-generated.
8118 * features/rs6000/powerpc-vsx64l.c: Re-generated.
8119 * features/rs6000/rs6000.c: Re-generated.
8120 * features/s390-linux32.c: Re-generated.
8121 * features/s390-linux32v1.c: Re-generated.
8122 * features/s390-linux32v2.c: Re-generated.
8123 * features/s390-linux64.c: Re-generated.
8124 * features/s390-linux64v1.c: Re-generated.
8125 * features/s390-linux64v2.c: Re-generated.
8126 * features/s390-te-linux64.c: Re-generated.
8127 * features/s390-tevx-linux64.c: Re-generated.
8128 * features/s390-vx-linux64.c: Re-generated.
8129 * features/s390x-linux64.c: Re-generated.
8130 * features/s390x-linux64v1.c: Re-generated.
8131 * features/s390x-linux64v2.c: Re-generated.
8132 * features/s390x-te-linux64.c: Re-generated.
8133 * features/s390x-tevx-linux64.c: Re-generated.
8134 * features/s390x-vx-linux64.c: Re-generated.
8135 * features/sparc/sparc32-solaris.c: Re-generated.
8136 * features/sparc/sparc64-solaris.c: Re-generated.
8137 * features/tic6x-c62x.c: Re-generated.
8138 * features/tic6x-c62x-linux.c: Re-generated.
8139 * features/tic6x-c64x.c: Re-generated.
8140 * features/tic6x-c64x-linux.c: Re-generated.
8141 * features/tic6x-c64xp.c: Re-generated.
8142 * features/tic6x-c64xp-linux.c: Re-generated.
8144 2017-07-26 Yao Qi <yao.qi@linaro.org>
8146 * i386-linux-tdep.c (i386_linux_read_description): New function.
8147 (i386_linux_core_read_description): Call
8148 i386_linux_read_description.
8149 * i386-linux-tdep.h (i386_linux_read_description): Declare.
8150 (tdesc_i386_linux, tdesc_i386_mmx_linux): Remove declarations.
8151 (tdesc_i386_avx_linux, tdesc_i386_mpx_linux): Likewise
8152 (tdesc_i386_avx_mpx_linux, tdesc_i386_avx_avx512_linux): Likewise.
8153 (tdesc_i386_avx_mpx_avx512_pku_linux): Likewise.
8154 * x86-linux-nat.c (x86_linux_read_description): Call
8155 i386_linux_read_description.
8157 2017-07-26 Yao Qi <yao.qi@linaro.org>
8160 * features/Makefile (%.c: %.xml): Pass the xml file name to
8161 command "maint print c-tdesc".
8162 * target-descriptions.c (maint_print_c_tdesc_cmd): Get file
8165 2017-07-26 Yao Qi <yao.qi@linaro.org>
8167 * target-descriptions.c (target_desc): Add ctor and dtor. Do
8168 in-class initialization.
8169 (tdesc_create_feature): Call new instead of XCNEW.
8170 (free_target_description): Ue delete.
8172 2017-07-25 John Baldwin <jhb@FreeBSD.org>
8174 * configure.nat: Add "-lkvm" for NetBSD/sparc64 and fix typo.
8176 2017-07-25 Yao Qi <yao.qi@linaro.org>
8178 * amd64-tdep.c (amd64_init_abi): Make argument default_tdesc
8180 (amd64_x32_init_abi): Likewise.
8181 * amd64-tdep.h (amd64_init_abi): Update declaration.
8182 (amd64_x32_init_abi): Likewise.
8184 2017-07-25 Yao Qi <yao.qi@linaro.org>
8187 * arm-linux-nat.c (arm_linux_fetch_inferior_registers): Update
8188 condition for FPSCR.
8189 (arm_linux_store_inferior_registers): Likewise.
8191 2017-07-22 Tom Tromey <tom@tromey.com>
8193 * break-catch-syscall.c (struct catch_syscall_inferior_data)
8194 <syscalls_counts>: Now a std::vector.
8195 (get_catch_syscall_inferior_data): Use "new".
8196 (catch_syscall_inferior_data_cleanup): Use "delete".
8197 (insert_catch_syscall, remove_catch_syscall)
8198 (clear_syscall_counts): Update.
8200 2017-07-22 Tom Tromey <tom@tromey.com>
8202 * break-catch-syscall.c (syscall_catchpoint)
8203 <syscalls_to_be_caught>: Now a std::vector<int>
8204 (~syscall_catchpoint): Remove.
8205 (insert_catch_syscall, remove_catch_syscall)
8206 (breakpoint_hit_catch_syscall, print_one_catch_syscall)
8207 (print_mention_catch_syscall, print_recreate_catch_syscall):
8209 (create_syscall_event_catchpoint): Change type of "filter"
8211 (catch_syscall_split_args): Return a std::vector.
8212 (catch_syscall_command_1, catching_syscall_number_1): Update.
8214 2017-07-22 Tom Tromey <tom@tromey.com>
8216 * break-catch-throw.c (struct exception_catchpoint)
8217 <exception_rx>: Now a std::string.
8218 (~exception_catchpoint): Remove.
8219 (print_one_detail_exception_catchpoint): Update.
8220 (handle_gnu_v3_exceptions): Change type of except_rx.
8221 (extract_exception_regexp): Return a std::string.
8222 (catch_exception_command_1): Update.
8224 2017-07-22 Tom Tromey <tom@tromey.com>
8226 * break-catch-sig.c (gdb_signal_type): Remove typedef.
8227 (struct signal_catchpoint) <signals_to_be_caught>: Now a
8229 <catch_all>: Now a bool.
8230 (~signal_catchpoint): Remove.
8231 (signal_catchpoint_insert_location)
8232 (signal_catchpoint_remove_location)
8233 (signal_catchpoint_breakpoint_hit, signal_catchpoint_print_one)
8234 (signal_catchpoint_print_mention)
8235 (signal_catchpoint_print_recreate)
8236 (signal_catchpoint_explains_signal): Update.
8237 (create_signal_catchpoint): Change type of "filter" and
8239 (catch_signal_split_args): Return a std::vector. Change type of
8241 (catch_signal_command): Update.
8243 2017-07-20 Pedro Alves <palves@redhat.com>
8245 * ada-lang.c (ada_language_defn): Make extern.
8246 (_initialize_ada_language): Remove add_language call.
8247 * c-lang.c (c_language_defn, cplus_language_defn)
8248 (asm_language_defn, minimal_language_defn): Make extern.
8249 (_initialize_c_language): Delete.
8250 * completer.c (compare_cstrings): Delete, moved to utils.h.
8251 * d-lang.c (d_language_defn): Make extern.
8252 (_initialize_d_language): Remove add_language calls.
8253 * defs.h (enum language): Add comment.
8254 * f-lang.c (f_language_defn): Make extern.
8255 (_initialize_f_language): Remove add_language call.
8256 * go-lang.c (go_language_defn): Make extern.
8257 (_initialize_go_language): Remove add_language call.
8258 * language.c: Include <algorithm>.
8259 (languages): Redefine as const array.
8260 (languages_size, languages_allocsize, DEFAULT_ALLOCSIZE): Delete.
8261 (set_language_command): Handle "local". Use for-range loop.
8262 (set_language): Remove loop.
8263 (language_enum): Rewrite.
8264 (language_def, language_str): Remove loops.
8265 (add_language): Delete.
8266 (add_set_language_command): New, based on add_languages.
8267 (skip_language_trampoline): Adjust.
8268 (local_language_defn): Delete.
8269 (language_gdbarch_post_init): Adjust.
8270 (_initialize_language): Remove add_language calls. Call
8271 add_set_language_command.
8272 * language.h (add_language): Delete.
8273 (auto_language_defn)
8274 (unknown_language_defn, minimal_language_defn, ada_language_defn)
8275 (asm_language_defn, c_language_defn, cplus_language_defn)
8276 (d_language_defn, f_language_defn, go_language_defn)
8277 (m2_language_defn, objc_language_defn, opencl_language_defn)
8278 (pascal_language_defn, rust_language_defn): Declare.
8279 * m2-lang.c (m2_language_defn): Make extern.
8280 (_initialize_m2_language): Remove add_language call.
8281 * objc-lang.c (objc_language_defn): Make extern.
8282 (_initialize_objc_language): Remove add_language call.
8283 * opencl-lang.c (opencl_language_defn): Make extern.
8284 (_initialize_opencl_language): Remove add_language call.
8285 * p-lang.c (pascal_language_defn): Make extern.
8286 (_initialize_pascal_language): Delete.
8287 * rust-lang.c (rust_language_defn): Make extern.
8288 (_initialize_rust_language): Delete.
8289 * utils.h (compare_cstrings): New static inline function.
8291 2017-07-20 Pedro Alves <palves@redhat.com>
8293 * ada-lang.c (ada_to_fixed_type_1): Adjust.
8294 (get_var_value): Constify parameters.
8295 (get_int_var_value): Change prototype.
8296 (to_fixed_range_type): Adjust.
8297 * ada-lang.h (get_int_var_value): Change prototype.
8299 2017-07-20 Pedro Alves <palves@redhat.com>
8301 * dwarf2read.c (dw2_lookup_symbol): Use
8302 SYMBOL_MATCHES_SEARCH_NAME.
8303 * psymtab.c (psym_lookup_symbol): Use SYMBOL_MATCHES_SEARCH_NAME.
8305 2017-07-20 Pedro Alves <palves@redhat.com>
8307 * block.c (block_iter_name_step, block_iter_name_first)
8308 (block_iter_name_next): Delete.
8309 (block_lookup_symbol_primary): Adjust to use
8310 dict_iter_match_first/dict_iter_match_next.
8311 * block.h (block_iter_name_first, block_iter_name_next): Delete
8313 (ALL_BLOCK_SYMBOLS_WITH_NAME): Adjust to use
8314 dict_iter_match_first/dict_iter_match_next.
8316 2017-07-20 Pedro Alves <palves@redhat.com>
8318 * cp-support.c (cp_find_first_component_aux): Add missing case for
8321 2017-07-18 David Blaikie <dblaikie@gmail.com>
8323 * dwarf2read.c (create_cus_hash_table): Re-add lost initialization
8324 of dwo_cu's dwo_file.
8326 2017-07-18 Yao Qi <yao.qi@linaro.org>
8328 * remote.c (store_registers_using_G): Remove one line comment.
8330 2017-07-18 Yao Qi <yao.qi@linaro.org>
8332 * regcache.c (regcache_cpy): Simplify it.
8333 (regcache::cpy_no_passthrough): Remove it.
8334 * regcache.h (cpy_no_passthrough): Remove it.
8335 (regcache_dup, regcache_cpy): Update comments.
8337 2017-07-18 Pedro Alves <palves@redhat.com>
8339 * remote-sim.c (sim_command_completer): Adjust to work with a
8340 completion_tracker instead of a VEC.
8342 2017-07-17 Pedro Alves <palves@redhat.com>
8344 * completer.c (complete_source_filenames): New function.
8345 (complete_address_and_linespec_locations): New function.
8346 (location_completer): Use complete_address_and_linespec_locations.
8347 (completion_tracker::build_completion_result): Honor the tracker's
8348 request to suppress append.
8349 * completer.h (completion_tracker::suppress_append_ws)
8350 (completion_tracker::set_suppress_append_ws): New methods.
8351 (completion_tracker::m_suppress_append_ws): New field.
8352 (complete_source_filenames): New declaration.
8353 * linespec.c (linespec_complete_what): New.
8354 (struct ls_parser) <complete_what, completion_word,
8355 completion_quote_char, completion_quote_end, completion_tracker>:
8357 (string_find_incomplete_keyword_at_end): New.
8358 (linespec_lexer_lex_string): Record quote char. If in completion
8360 (linespec_lexer_consume_token): Advance the completion word point.
8361 (linespec_lexer_peek_token): Save/restore completion info.
8362 (save_stream_and_consume_token): New.
8363 (set_completion_after_number): New.
8364 (linespec_parse_basic): Set what to complete next depending on
8365 token. Handle function and label completions specially.
8366 (parse_linespec): Disable objc shortcut in completion mode. Set
8367 what to complete next depending on token type. Skip keyword if in
8369 (complete_linespec_component, linespec_complete): New.
8370 * linespec.h (linespec_complete): Declare.
8372 2017-07-17 Pedro Alves <palves@redhat.com>
8374 * linespec.c (linespec_lexer_lex_string, find_toplevel_char):
8375 Handle 'operator<' / 'operator<<'.
8377 2017-07-17 Pedro Alves <palves@redhat.com>
8379 * completer.c (collect_explicit_location_matches): Handle
8381 (convert_explicit_location_to_linespec): New, factored out from
8383 (convert_explicit_location_to_sals): ... this.
8384 (complete_label): New.
8385 (linespec_complete_label, find_label_symbols_in_block): New.
8386 (find_label_symbols): Add completion_mode parameter and adjust to
8387 call find_label_symbols_in_block.
8388 * linespec.h (linespec_complete_label): Declare.
8390 2017-07-17 Pedro Alves <palves@redhat.com>
8392 * ada-lang.c (ada_collect_symbol_completion_matches): Add
8393 complete_symbol_mode parameter.
8394 * cli/cli-cmds.c (complete_command): Get the completion result out
8395 of the handle_brkchars tracker if used a custom word point.
8396 * completer.c: Include "linespec.h".
8397 (enum explicit_location_match_type) <MATCH_LINE>: New enumerator.
8398 (advance_to_expression_complete_word_point): New.
8399 (completion_tracker::completes_to_completion_word): New.
8400 (complete_files_symbols): Pass down
8401 complete_symbol_mode::EXPRESSION.
8402 (explicit_options, probe_options): New.
8403 (collect_explicit_location_matches): Complete on the
8404 explictit_loc->foo instead of word. Use
8405 linespec_complete_function. Handle MATCH_LINE. Handle offering
8406 keyword and options completions.
8407 (backup_text_ptr): Delete.
8408 (skip_keyword): New.
8409 (complete_explicit_location): Remove 'word' parameter. Add
8410 language, quoted_arg_start and quoted_arg_end parameters.
8411 Rewrite, parsing left to right.
8412 (location_completer): Rewrite.
8413 (location_completer_handle_brkchars): New function.
8414 (symbol_completer): Pass down complete_symbol_mode::EXPRESSION.
8415 (enum complete_line_internal_reason): Adjust comments.
8416 (completion_tracker::discard_completions): New.
8417 (completer_handle_brkchars_func_for_completer): Handle
8419 (gdb_custom_word_point_brkchars)
8420 (gdb_org_rl_basic_quote_characters): New.
8421 (gdb_completion_word_break_characters_throw)
8422 (completion_find_completion_word): Handle trackers that use a
8424 (completion_tracker::advance_custom_word_point_by): New.
8425 (completion_tracker::build_completion_result): Don't rely on
8426 readline appending the quote char.
8427 (gdb_rl_attempted_completion_function_throw): Handle trackers that
8428 use a custom word point.
8429 (gdb_rl_attempted_completion_function): Restore
8430 rl_basic_quote_characters.
8431 * completer.h (class completion_tracker): Extend intro comment.
8432 (completion_tracker::set_quote_char)
8433 (completion_tracker::quote_char)
8434 (completion_tracker::set_use_custom_word_point)
8435 (completion_tracker::use_custom_word_point)
8436 (completion_tracker::custom_word_point)
8437 (completion_tracker::set_custom_word_point)
8438 (completion_tracker::advance_custom_word_point_by)
8439 (completion_tracker::completes_to_completion_word)
8440 (completion_tracker::discard_completions): New methods.
8441 (completion_tracker::m_quote_char)
8442 (completion_tracker::m_use_custom_word_point)
8443 (completion_tracker::m_custom_word_point): New fields.
8444 (advance_to_expression_complete_word_point): Declare.
8445 * f-lang.c (f_collect_symbol_completion_matches): Add
8446 complete_symbol_mode parameter.
8447 * language.h (struct language_defn)
8448 <la_collect_symbol_completion_matches>: Add complete_symbol_mode
8450 * linespec.c (linespec_keywords): Add NULL terminator. Make extern.
8451 (linespec_complete_function): New function.
8452 (linespec_lexer_lex_keyword): Adjust.
8453 * linespec.h (linespec_keywords, linespec_complete_function): New
8455 * location.c (find_end_quote): New function.
8456 (explicit_location_lex_one): Add explicit_completion_info
8457 parameter. Save quoting info. Don't throw if being called for
8458 completion. Don't handle Ada operators here.
8459 (is_cp_operator, skip_op_false_positives, first_of)
8460 (explicit_location_lex_one_function): New function.
8461 (string_to_explicit_location): Replace 'dont_throw' parameter with
8462 an explicit_completion_info pointer parameter. Handle it. Don't
8463 use explicit_location_lex_one to lex function names. Use
8464 explicit_location_lex_one_function instead.
8465 * location.h (struct explicit_completion_info): New.
8466 (string_to_explicit_location): Replace 'dont_throw' parameter with
8467 an explicit_completion_info pointer parameter.
8468 * symtab.c (default_collect_symbol_completion_matches_break_on):
8469 Add complete_symbol_mode parameter. Handle LINESPEC mode.
8470 (default_collect_symbol_completion_matches)
8471 (collect_symbol_completion_matches): Add complete_symbol_mode
8473 (collect_symbol_completion_matches_type): Pass down
8474 complete_symbol_mode::EXPRESSION.
8475 (collect_file_symbol_completion_matches): Add complete_symbol_mode
8476 parameter. Handle LINESPEC mode.
8477 * symtab.h (complete_symbol_mode): New.
8478 (default_collect_symbol_completion_matches_break_on)
8479 (default_collect_symbol_completion_matches)
8480 (collect_symbol_completion_matches)
8481 (collect_file_symbol_completion_matches): Add complete_symbol_mode
8484 2017-07-17 Pedro Alves <palves@redhat.com>
8486 * utils.c (enum class strncmp_iw_mode): New.
8487 (strcmp_iw): Rename to ...
8488 (strncmp_iw_with_mode): ... this. Add string2_len and mode
8489 parameters. Handle them.
8491 (strcmp_iw): Reimplement as wrapper around strncmp_iw_with_mode.
8492 * utils.h (strncmp_iw): Declare.
8493 (strcmp_iw): Move describing comments here.
8495 2017-07-17 Pedro Alves <palves@redhat.com>
8497 * c-exp.y (operator_stoken): Use CP_OPERATOR_LEN and
8499 * c-typeprint.c (is_type_conversion_operator): Use
8501 * cp-support.c (LENGTH_OF_OPERATOR): Delete.
8502 (cp_find_first_component_aux): Use CP_OPERATOR_STR and
8504 * cp-support.h (CP_OPERATOR_STR, CP_OPERATOR_LEN): New.
8505 * gnu-v2-abi.c (gnuv2_is_operator_name): Use CP_OPERATOR_STR.
8506 * gnu-v3-abi.c (gnuv3_is_operator_name): Use CP_OPERATOR_STR.
8507 * linespec.c (linespec_lexer_lex_string): Use CP_OPERATOR_LEN and
8509 * location.c: Include "cp-support.h".
8510 (explicit_location_lex_one): Use CP_OPERATOR_LEN and
8512 * symtab.c (operator_chars): Use CP_OPERATOR_STR and
8515 2017-07-17 Pedro Alves <palves@redhat.com>
8517 * cli/cli-cmds.c (complete_command): Use a completion tracker
8518 along with completion_find_completion_word for handle_brkchars
8520 * completer.c (RL_QF_SINGLE_QUOTE, RL_QF_DOUBLE_QUOTE)
8521 (RL_QF_BACKSLASH, RL_QF_OTHER_QUOTE): New.
8522 (struct gdb_rl_completion_word_info): New.
8523 (gdb_rl_find_completion_word): New.
8524 (completion_find_completion_word): New.
8525 * completer.h (completion_find_completion_word): Declare.
8527 2017-07-17 Pedro Alves <palves@redhat.com>
8529 * ada-lang.c (symbol_completion_match): Adjust comments.
8530 (symbol_completion_add): Replace vector parameter with
8531 completion_tracker parameter. Use it.
8532 (ada_make_symbol_completion_list): Rename to...
8533 (ada_collect_symbol_completion_matches): ... this. Add
8534 completion_tracker parameter and use it.
8535 (ada_language_defn): Adjust.
8536 * break-catch-syscall.c (catch_syscall_completer): Adjust
8537 prototype and work with completion_tracker instead of VEC.
8538 * breakpoint.c (condition_completer): Adjust prototype and work
8539 with completion_tracker instead of VEC.
8540 * c-lang.c (c_language_defn, cplus_language_defn)
8541 (asm_language_defn, minimal_language_defn): Adjust to renames.
8542 * cli/cli-cmds.c (complete_command): Rework using
8543 completion_tracker. Catch exceptions when completing.
8544 * cli/cli-decode.c (integer_unlimited_completer)
8545 (complete_on_cmdlist, complete_on_enum): Adjust prototype and work
8546 with completion_tracker instead of VEC.
8547 * command.h (struct completion_tracker): Forward declare.
8548 (completer_ftype, completer_handle_brkchars_ftype): Change
8550 (complete_on_cmdlist, complete_on_enum): Adjust.
8551 * completer.c: Include <algorithm>.
8552 (struct gdb_completer_state): New.
8553 (current_completion): New global.
8554 (readline_line_completion_function): Delete.
8555 (noop_completer, filename_completer)
8556 (filename_completer_handle_brkchars, complete_files_symbols)
8557 (linespec_location_completer): Adjust to work with a
8558 completion_tracker instead of a VEC.
8559 (string_or_empty): New.
8560 (collect_explicit_location_matches): Adjust to work with a
8561 completion_tracker instead of a VEC.
8562 (explicit_location_completer): Rename to ...
8563 (complete_explicit_location): ... this and adjust to work with a
8564 completion_tracker instead of a VEC.
8565 (location_completer): Adjust to work with a completion_tracker
8567 (add_struct_fields): Adjust to work with a completion_list instead
8569 (expression_completer): Rename to ...
8570 (complete_expression): ... this and adjust to work with a
8571 completion_tracker instead of a VEC. Use complete_files_symbols.
8572 (expression_completer): Reimplement on top of complete_expression.
8573 (symbol_completer): Adjust to work with a completion_tracker
8575 (enum complete_line_internal_reason): Add describing comments.
8576 (complete_line_internal_normal_command): Adjust to work with a
8577 completion_tracker instead of a VEC.
8578 (complete_line_internal): Rename to ...
8579 (complete_line_internal_1): ... this and adjust to work with a
8580 completion_tracker instead of a VEC. Assert TEXT is NULL in the
8581 handle_brkchars phase.
8582 (new_completion_tracker): Delete.
8583 (complete_line_internal): Reimplement as TRY/CATCH wrapper around
8584 complete_line_internal_1.
8585 (free_completion_tracker): Delete.
8586 (INITIAL_COMPLETION_HTAB_SIZE): New.
8587 (completion_tracker::completion_tracker)
8588 (completion_tracker::~completion_tracker): New.
8589 (maybe_add_completion): Delete.
8590 (completion_tracker::maybe_add_completion)
8591 (completion_tracker::add_completion)
8592 (completion_tracker::add_completions): New.
8593 (throw_max_completions_reached_error): Delete.
8594 (complete_line): Adjust to work with a completion_tracker instead
8595 of a VEC. Don't create a completion_tracker_t or check for max
8597 (command_completer, command_completer_handle_brkchars)
8598 (signal_completer, reg_or_group_completer_1)
8599 (reg_or_group_completer, default_completer_handle_brkchars):
8600 Adjust to work with a completion_tracker.
8601 (gdb_completion_word_break_characters_throw): New.
8602 (gdb_completion_word_break_characters): Reimplement.
8603 (line_completion_function): Delete.
8604 (completion_tracker::recompute_lowest_common_denominator)
8605 (expand_preserving_ws)
8606 (completion_tracker::build_completion_result)
8607 (completion_result::completion_result)
8608 (completion_result::completion_result)
8609 (completion_result::~completion_result)
8610 (completion_result::completion_result)
8611 (completion_result::release_match_list, compare_cstrings)
8612 (completion_result::sort_match_list)
8613 (completion_result::reset_match_list)
8614 (gdb_rl_attempted_completion_function_throw)
8615 (gdb_rl_attempted_completion_function): New.
8616 * completer.h (completion_list, struct completion_result)
8617 (class completion_tracker): New.
8618 (complete_line): Add completion_tracker parameter.
8619 (readline_line_completion_function): Delete.
8620 (gdb_rl_attempted_completion_function): New.
8621 (noop_completer, filename_completer, expression_completer)
8622 (location_completer, symbol_completer, command_completer)
8623 (signal_completer, reg_or_group_completer): Update prototypes.
8624 (completion_tracker_t, new_completion_tracker)
8625 (make_cleanup_free_completion_tracker): Delete.
8626 (enum maybe_add_completion_enum): Delete.
8627 (maybe_add_completion): Delete.
8628 (throw_max_completions_reached_error): Delete.
8629 * corefile.c (complete_set_gnutarget): Adjust to work with a
8630 completion_tracker instead of a VEC.
8631 * cp-abi.c (cp_abi_completer): Adjust to work with a
8632 completion_tracker instead of a VEC.
8633 * d-lang.c (d_language_defn): Adjust.
8634 * disasm.c (disassembler_options_completer): Adjust to work with a
8635 completion_tracker instead of a VEC.
8636 * f-lang.c (f_make_symbol_completion_list): Rename to ...
8637 (f_collect_symbol_completion_matches): ... this. Adjust to work
8638 with a completion_tracker instead of a VEC.
8639 (f_language_defn): Adjust.
8640 * go-lang.c (go_language_defn): Adjust.
8641 * guile/scm-cmd.c (cmdscm_add_completion, cmdscm_completer):
8642 Adjust to work with a completion_tracker instead of a VEC.
8643 * infrun.c (handle_completer): Likewise.
8644 * interps.c (interpreter_completer): Likewise.
8645 * interps.h (interpreter_completer): Likewise.
8646 * language.c (unknown_language_defn, auto_language_defn)
8647 (local_language_defn): Adjust.
8648 * language.h (language_defn::la_make_symbol_completion_list):
8650 (language_defn::la_collect_symbol_completion_matches): ... this
8651 and adjust to work with a completion_tracker instead of a VEC.
8652 * m2-lang.c (m2_language_defn): Adjust.
8653 * objc-lang.c (objc_language_defn): Adjust.
8654 * opencl-lang.c (opencl_language_defn): Adjust.
8655 * p-lang.c (pascal_language_defn): Adjust.
8656 * python/py-cmd.c (cmdpy_completer_helper): Handle NULL word.
8657 (cmdpy_completer_handle_brkchars, cmdpy_completer): Adjust to work
8658 with a completion_tracker.
8659 * rust-lang.c (rust_language_defn): Adjust.
8660 * symtab.c (free_completion_list, do_free_completion_list)
8661 (return_val, completion_tracker): Delete.
8662 (completion_list_add_name, completion_list_add_symbol)
8663 (completion_list_add_msymbol, completion_list_objc_symbol)
8664 (completion_list_add_fields, add_symtab_completions): Add
8665 completion_tracker parameter and use it.
8666 (default_make_symbol_completion_list_break_on_1): Rename to...
8667 (default_collect_symbol_completion_matches_break_on): ... this.
8668 Add completion_tracker parameter and use it instead of allocating
8669 a completion tracker here.
8670 (default_make_symbol_completion_list_break_on): Delete old
8672 (default_make_symbol_completion_list): Delete.
8673 (default_collect_symbol_completion_matches): New.
8674 (make_symbol_completion_list): Delete.
8675 (collect_symbol_completion_matches): New.
8676 (make_symbol_completion_type): Rename to ...
8677 (collect_symbol_completion_matches_type): ... this. Add
8678 completion_tracker parameter and use it instead of VEC.
8679 (make_file_symbol_completion_list_1): Rename to...
8680 (collect_file_symbol_completion_matches): ... this. Add
8681 completion_tracker parameter and use it instead of VEC.
8682 (make_file_symbol_completion_list): Delete.
8683 (add_filename_to_list): Use completion_list instead of a VEC.
8684 (add_partial_filename_data::list): Now a completion_list.
8685 (make_source_files_completion_list): Work with a completion_list
8687 * symtab.h: Include "completer.h".
8688 (default_make_symbol_completion_list_break_on)
8689 (default_make_symbol_completion_list, make_symbol_completion_list)
8690 (make_symbol_completion_type, make_file_symbol_completion_list)
8691 (make_source_files_completion_list): Delete.
8692 (default_collect_symbol_completion_matches_break_on)
8693 (default_collect_symbol_completion_matches)
8694 (collect_symbol_completion_matches)
8695 (collect_symbol_completion_matches_type)
8696 (collect_file_symbol_completion_matches)
8697 (make_source_files_completion_list): New.
8698 * top.c (init_main): Don't install a rl_completion_entry_function
8699 hook. Install a rl_attempted_completion_function hook instead.
8700 * tui/tui-layout.c (layout_completer): Adjust to work with a
8702 * tui/tui-regs.c (tui_reggroup_completer):
8703 * tui/tui-win.c (window_name_completer, focus_completer)
8704 (winheight_completer): Adjust to work with a completion_tracker.
8705 * value.c: Include "completer.h".
8706 (complete_internalvar): Adjust to work with a completion_tracker.
8707 * value.h (complete_internalvar): Likewise.
8709 2017-07-17 Pedro Alves <palves@redhat.com>
8711 * cli/cli-decode.c (set_cmd_completer_handle_brkchars): Adjust to
8713 * cli/cli-decode.h (struct cmd_list_element) <completer>: Move
8714 comments to completer_ftype's declaration.
8715 <completer_handle_brkchars>: Change type to
8716 completer_handle_brkchars_ftype.
8717 * command.h (completer_ftype): Add describing comment and give
8718 names to parameters.
8719 (completer_ftype_void): Rename to ...
8720 (completer_handle_brkchars_ftype) ... this. Add describing comment.
8721 (set_cmd_completer_handle_brkchars): Adjust.
8722 * completer.c (filename_completer_handle_brkchars): New function.
8723 (complete_line_internal_normal_command): New function, factored
8725 (complete_line_internal): ... here.
8726 (command_completer_handle_brkchars)
8727 (default_completer_handle_brkchars)
8728 (completer_handle_brkchars_func_for_completer): New functions.
8729 * completer.h (set_gdb_completion_word_break_characters): Delete
8731 (completer_handle_brkchars_func_for_completer): New declaration.
8732 * python/py-cmd.c (cmdpy_completer_handle_brkchars): Adjust to use
8733 completer_handle_brkchars_func_for_completer.
8735 2017-07-17 Pedro Alves <palves@redhat.com>
8737 * completer.c (symbol_completer): New function, based on
8738 make_symbol_completion_list_fn.
8739 * completer.h (symbol_completer): New declaration.
8740 * guile/scm-cmd.c (cmdscm_completers): Adjust.
8741 * python/py-cmd.c (completers): Adjust.
8742 * symtab.c (make_symbol_completion_list_fn): Delete.
8743 * symtab.h (make_symbol_completion_list_fn): Delete.
8744 * cli/cli-decode.c (add_cmd): Adjust.
8746 2017-07-17 Pedro Alves <palves@redhat.com>
8748 * Makefile.in (COMMON_OBS): Add filename-seen-cache.o.
8749 * dwarf2read.c: Include "filename-seen-cache.h".
8750 * dwarf2read.c (dwarf2_per_objfile) <filenames_cache>: New field.
8751 (dw2_map_symbol_filenames): Build and use a filenames_seen_cache.
8752 * filename-seen-cache.c: New file.
8753 * filename-seen-cache.h: New file.
8754 * symtab.c: Include "filename-seen-cache.h".
8755 (struct filename_seen_cache, INITIAL_FILENAME_SEEN_CACHE_SIZE)
8756 (create_filename_seen_cache, clear_filename_seen_cache)
8757 (delete_filename_seen_cache, filename_seen): Delete, parts moved
8758 to filename-seen-cache.h/filename-seen-cache.c.
8759 (output_source_filename, sources_info)
8760 (maybe_add_partial_symtab_filename)
8761 (make_source_files_completion_list): Adjust to use
8762 filename_seen_cache.
8764 2017-07-17 Pedro Alves <palves@redhat.com>
8766 * dwarf2read.c (dwarf2_per_objfile): In-class initialize all
8768 (dwarf2_per_objfile::dwarf2_per_objfile(objfile*, const
8769 dwarf2_debug_sections*)): New.
8770 (dwarf2_per_objfile::dwarf2_per_objfile(const
8771 dwarf2_per_objfile&)): Declare as deleted.
8772 (dwarf2_per_objfile::operator=): Declare as deleted.
8773 (dwarf2_per_objfile::dwarf2_per_objfile)
8774 (dwarf2_per_objfile::~dwarf2_per_objfile)
8775 (dwarf2_per_objfile::free_cached_comp_units): New.
8776 (dwarf2_has_info): dwarf2_per_objfile initialization code moved to
8777 ctor. Call dwarf2_per_objfile's ctor manually.
8778 (dwarf2_locate_sections): Deleted/refactored as ...
8779 (dwarf2_per_objfile::locate_sections): ... this new method.
8780 (free_cached_comp_units): Defer to
8781 dwarf2_per_objfile::free_cached_comp_units.
8782 (dwarf2_free_objfile): Call dwarf2_per_objfile's dtor manually.
8784 2017-07-14 Tom Tromey <tom@tromey.com>
8787 * rust-exp.y (convert_ast_to_expression): Add "want_type"
8789 <UNOP_SIZEOF>: Split into separate case.
8790 <UNOP_VAR_VALUE>: Handle want_type. Add error case.
8792 2017-07-14 Tom Tromey <tom@tromey.com>
8795 * symtab.c (symbol_matches_domain): Add language_rust to special
8797 * rust-exp.y (convert_ast_to_expression) <OP_VAR_VALUE>: Don't
8798 treat LOC_TYPEDEF symbols as variables.
8800 2017-07-14 Pedro Alves <palves@redhat.com>
8802 * symtab.c (make_file_symbol_completion_list_1): Iterate over
8803 symtabs matching all symtabs with SRCFILE as file name instead of
8804 only considering the first hit, with lookup_symtab.
8806 2017-07-14 Simon Marchi <simon.marchi@ericsson.com>
8808 * ax-gdb.c (gen_aggregate_elt_ref): Remove operand_name and
8809 operator_name parameters.
8810 (gen_expr): Update function call.
8812 2017-07-14 Simon Marchi <simon.marchi@ericsson.com>
8814 * dwarf2loc.h (dwarf2_compile_expr_to_ax): Remove gdbarch
8816 * symtab.h (struct symbol_computed_ops::tracepoint_var_ref):
8818 * dwarf2loc.c (dwarf2_compile_expr_to_ax): Remove gdbarch
8819 parameter, use agent_expr::gdbarch instead, update function
8821 (locexpr_tracepoint_var_ref): Likewise.
8822 (loclist_tracepoint_var_ref): Likewise.
8823 * ax-gdb.c (gen_trace_static_fields): Likewise.
8824 (gen_traced_pop): Likewise.
8825 (gen_frame_args_address): Likewise.
8826 (gen_frame_locals_address): Likewise.
8827 (gen_var_ref): Likewise.
8828 (gen_struct_ref_recursive): Likewise.
8829 (gen_static_field): Likewise.
8830 (gen_maybe_namespace_elt): Likewise.
8831 (gen_expr): Likewise.
8832 (gen_trace_for_var): Likewise.
8833 (gen_trace_for_expr): Likewise.
8834 (gen_trace_for_return_address): Likewise.
8836 2017-07-14 Simon Marchi <simon.marchi@ericsson.com>
8838 * ax-gdb.c (gen_deref, gen_address_of): Remove unused ax
8840 (gen_struct_ref, gen_expr, gen_expr_binop_rest): Update call.
8842 2017-07-14 Simon Marchi <simon.marchi@ericsson.com>
8844 * ax-gdb.c (gen_usual_unary): Remove exp parameter, get gdbarch
8845 from ax, update calls.
8846 (gen_usual_arithmetic): Likewise.
8847 (gen_integral_promotions): Likewise.
8848 (gen_bitfield_ref): Likewise.
8849 (gen_primitive_field): Likewise.
8850 (gen_struct_ref_recursive): Likewise.
8851 (gen_struct_ref): Likewise.
8852 (gen_maybe_namespace_elt): Likewise.
8853 (gen_struct_elt_for_reference): Likewise.
8854 (gen_namespace_elt): Likewise.
8855 (gen_aggregate_elt_ref): Likewise.
8856 (gen_expr): Get gdbarch from ax, update calls.
8857 (gen_expr_binop_rest): Likewise.
8859 2017-07-13 Pedro Alves <palves@redhat.com>
8861 * amd64-darwin-tdep.c (x86_darwin_init_abi_64): Pass tdesc_amd64
8863 * amd64-dicos-tdep.c (amd64_dicos_init_abi):
8864 * amd64-fbsd-tdep.c (amd64fbsd_init_abi):
8865 * amd64-linux-tdep.c (amd64_linux_init_abi): Pass
8866 tdesc_amd64_linux as default tdesc. Get final tdesc from the
8868 (amd64_x32_linux_init_abi): Pass tdesc_x32_linux as default tdesc.
8869 Get final tdesc from the tdep.
8870 * amd64-nbsd-tdep.c (amd64nbsd_init_abi): Pass tdesc_amd64 as
8872 * amd64-obsd-tdep.c (amd64obsd_init_abi): Likewise.
8873 * amd64-sol2-tdep.c (amd64_sol2_init_abi): Likewise.
8874 * amd64-tdep.c (amd64_init_abi): Add 'default_tdesc' parameter.
8875 Use it as default tdesc.
8876 (amd64_x32_init_abi): Add 'default_tdesc' parameter, and pass it
8877 down to amd_init_abi. No longer handle fallback tdesc here.
8878 * amd64-tdep.h (tdesc_x32): Declare.
8879 (amd64_init_abi, amd64_x32_init_abi): Add 'default_tdesc'
8881 * amd64-windows-tdep.c (amd64_windows_init_abi): Pass tdesc_amd64
8884 2017-07-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
8886 * s390-linux-tdep.c (s390_process_record): Add support for
8887 instructions new in arch12.
8889 2017-07-11 John Baldwin <jhb@FreeBSD.org>
8891 * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers): Use
8892 PT_GETFSBASE and PT_GETGSBASE.
8893 (amd64bsd_store_inferior_registers): Use PT_SETFSBASE and
8896 2017-07-11 John Baldwin <jhb@FreeBSD.org>
8898 * features/Makefile (amd64.dat, amd64-avx.dat, amd64-mpx.dat)
8899 (amd64-avx-mpx.dat, amd64-avx-avx512.dat)
8900 (amd64-avx-mpx-avx512-pku.dat): Add i386/64bit-segments.xml in
8902 * features/i386/amd64-avx-avx512.xml: Add 64bit-segments.xml.
8903 * features/i386/amd64-avx-mpx-avx512-pku.xml: Add 64bit-segments.xml.
8904 * features/i386/amd64-avx-mpx.xml: Add 64bit-segments.xml.
8905 * features/i386/amd64-avx.xml: Add 64bit-segments.xml.
8906 * features/i386/amd64-mpx.xml: Add 64bit-segments.xml.
8907 * features/i386/amd64.xml: Add 64bit-segments.xml.
8908 * features/i386/amd64-avx-avx512.c: Regenerated.
8909 * features/i386/amd64-avx-mpx-avx512-pku.c: Regenerated.
8910 * features/i386/amd64-avx-mpx.c: Regenerated.
8911 * features/i386/amd64-avx.c: Regenerated.
8912 * features/i386/amd64-mpx.c: Regenerated.
8913 * features/i386/amd64.c: Regenerated.
8914 * regformats/i386/amd64-avx-avx512.dat: Regenerated.
8915 * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Regenerated.
8916 * regformats/i386/amd64-avx-mpx.dat: Regenerated.
8917 * regformats/i386/amd64-avx.dat: Regenerated.
8918 * regformats/i386/amd64-mpx.dat: Regenerated.
8919 * regformats/i386/amd64.dat: Regenerated.
8921 2017-07-10 Yao Qi <yao.qi@linaro.org>
8923 * features/i386/amd64-avx-avx512-linux.c: Re-generated.
8924 * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Re-generated.
8926 2017-07-10 Anton Kolesov <Anton.Kolesov@synopsys.com>
8928 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add setenv and
8930 * gnulib/aclocal.m4: Regenerate.
8931 * gnulib/config.in: Regenerate.
8932 * gnulib/configure: Regenerate.
8933 * gnulib/import/Makefile.am: Regenerate.
8934 * gnulib/import/Makefile.in: Regenerate.
8935 * gnulib/import/m4/gnulib-cache.m4: Regenerate.
8936 * gnulib/import/m4/gnulib-comp.m4: Regenerate.
8937 * gnulib/import/m4/environ.m4: New file.
8938 * gnulib/import/m4/setenv.m4: New file.
8939 * gnulib/import/setenv.c: New file.
8940 * gnulib/import/unsetenv.c: New file.
8942 2017-07-09 Simon Marchi <simon.marchi@ericsson.com>
8944 * compile/compile-loc2c.c (do_compile_dwarf_expr_to_c): Read
8945 address when op is DW_OP_addr.
8947 2017-07-09 Tom Tromey <tom@tromey.com>
8949 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Reverse size
8950 check and apply to outer type.
8952 2017-07-07 John Baldwin <jhb@FreeBSD.org>
8954 * fbsd-tdep.c (LWPINFO_OFFSET, LWPINFO_PL_FLAGS)
8955 (LWPINFO64_PL_SIGINFO, LWPINFO32_PL_SIGINFO, PL_FLAG_SI)
8956 (SIZE64_SIGINFO_T, SIZE32_SIGINFO_T, fbsd_core_xfer_siginfo): New.
8957 (fbsd_init_abi): Install gdbarch "core_xfer_siginfo" method.
8959 2017-07-07 John Baldwin <jhb@FreeBSD.org>
8961 * fbsd-tdep.c (fbsd_core_thread_name): Use thread_section_name.
8963 2017-07-07 John Baldwin <jhb@FreeBSD.org>
8965 * corelow.c (get_core_siginfo): Remove.
8966 (core_xfer_partial): Use the gdbarch "core_xfer_siginfo" method
8967 instead of get_core_siginfo.
8968 * gdbarch.sh (core_xfer_siginfo): New gdbarch callback.
8969 * gdbarch.h: Re-generate.
8970 * gdbarch.c: Re-generate.
8971 * linux-tdep.c (linux_core_xfer_siginfo): New.
8972 (linux_init_abi): Install gdbarch "core_xfer_siginfo" method.
8974 2017-07-07 John Baldwin <jhb@FreeBSD.org>
8976 * corelow.c (thread_section_name): Move to ...
8977 * gdbcore.h (thread_section_name): ... here.
8979 2017-07-07 John Baldwin <jhb@FreeBSD.org>
8981 * fbsd-nat.c [PT_LWPINFO && __LP64__] (union sigval32)
8982 (struct siginfo32): New.
8983 [PT_LWPINFO] (fbsd_siginfo_size, fbsd_convert_siginfo): New.
8984 (fbsd_xfer_partial) [PT_LWPINFO]: Handle TARGET_OBJECT_SIGNAL_INFO
8985 via ptrace(PT_LWPINFO).
8987 2017-07-07 John Baldwin <jhb@FreeBSD.org>
8989 * fbsd-tdep.c (fbsd_gdbarch_data_handle, struct fbsd_gdbarch_data)
8990 (init_fbsd_gdbarch_data, get_fbsd_gdbarch_data)
8991 (fbsd_get_siginfo_type): New.
8992 (fbsd_init_abi): Install gdbarch "get_siginfo_type" method.
8993 (_initialize_fbsd_tdep): New.
8995 2017-07-06 David Blaikie <dblaikie@gmail.com>
8997 * dwarf2read.c (struct dwo_file): Use a htab of dwo_unit* (rather than
8998 a singular dwo_unit*) to support multiple CUs in the same way that
8999 multiple TUs are supported.
9000 (create_cus_hash_table): Replace create_dwo_cu with a function for
9001 parsing multiple CUs from a DWO file.
9002 (open_and_init_dwo_file): Use create_cus_hash_table rather than
9004 (lookup_dwo_cutu): Lookup CU in the hash table in the dwo_file with
9005 htab_find, rather than comparing the signature to a singleton CU in
9008 2017-07-06 Pedro Alves <palves@redhat.com>
9010 * python/py-unwind.c (pyuw_dealloc_cache): Fix for loop condition.
9012 2017-07-04 Pedro Alves <palves@redhat.com>
9014 * gdbtypes.c (recursive_dump_type): Don't reference TYPE_STATIC.
9015 * gdbtypes.h (TYPE_STATIC): Delete.
9016 (struct fn_field) <is_public, is_abstract, is_static, is_final,
9017 is_synchronized, is_native>: Delete.
9019 (TYPE_FN_FIELD_PUBLIC, TYPE_FN_FIELD_STATIC, TYPE_FN_FIELD_FINAL)
9020 (TYPE_FN_FIELD_SYNCHRONIZED, TYPE_FN_FIELD_NATIVE)
9021 (TYPE_FN_FIELD_ABSTRACT): Delete.
9023 2017-07-03 Simon Marchi <simon.marchi@ericsson.com>
9025 * buffer.h (buffer_finish): Fix spelling mistakes.
9027 2017-07-01 Eli Zaretskii <eliz@gnu.org>
9029 * .dir-locals.el: Automatically switch to C-style comments in
9030 versions of Emacs that support the feature.
9032 2017-06-30 Sergio Durigan Junior <sergiodj@redhat.com>
9033 Pedro Alves <palves@redhat.com>
9036 * cli/cli-script.c (command_name_equals_not_inline): Remove function.
9037 (process_next_line): New variable 'inline_cmd'.
9038 Adjust 'if' clauses for "python", "compile" and "guile" to use
9039 'command_name_equals' and check for '!inline_cmd'.
9041 2017-06-30 Sergio Durigan Junior <sergiodj@redhat.com>
9044 * cli/cli-script.c (command_name_equals_not_inline): New function.
9045 (process_next_line): Adjust 'if' clauses for "python", "compile"
9046 and "guile" to use command_name_equals_not_inline.
9048 2017-06-29 Pedro Alves <palves@redhat.com>
9050 * completer.c (expression_completer): Call
9051 linespec_location_completer instead of location_completer.
9053 2017-06-29 Pedro Alves <palves@redhat.com>
9055 * completer.c (expression_completer): Remove code that recomputes
9058 2017-06-29 Yao Qi <yao.qi@linaro.org>
9060 * regformats/regdat.sh: Generate code with
9061 "ifndef IN_PROCESS_AGENT".
9063 2017-06-28 Pedro Alves <palves@redhat.com>
9065 * command.h: Include "common/scoped_restore.h".
9067 2017-06-28 Yao Qi <yao.qi@linaro.org>
9069 * mi/mi-cmd-break.c (mi_argv_to_format): Use obstack_grow_str
9070 instead of obstack_grow.
9072 2017-06-28 Doug Gilmore <Doug.Gilmore@imgtec.com>
9075 * symfile.c (reread_symbols): Call objfiles_changed just before
9078 2017-06-27 Pedro Alves <palves@redhat.com>
9080 * symtab.c (COMPLETION_LIST_ADD_SYMBOL)
9081 (MCOMPLETION_LIST_ADD_SYMBOL): Delete macros, replace with ...
9082 (completion_list_add_symbol, completion_list_add_msymbol):
9083 ... these new functions.
9084 (add_symtab_completions)
9085 (default_make_symbol_completion_list_break_on_1): Adjust.
9087 2017-06-27 Pedro Alves <palves@redhat.com>
9089 * objfiles.c (get_objfile_bfd_data): Call bfd_alloc instead of
9090 bfd_zalloc. Call objfile_per_bfd_storage's ctor.
9091 (free_objfile_per_bfd_storage): Call objfile_per_bfd_storage's
9093 * objfiles.h (objfile_per_bfd_storage): Add ctor. Make
9094 'storage_obstack' field an auto_obstack. In-class initialize all
9095 non-bitfield fields. Make minsyms_read bool.
9096 * symfile.c (read_symbols): Adjust.
9098 2017-06-27 Alan Hayward <alan.hayward@arm.com>
9100 * remote-sim.c (gdbsim_fetch_register): Use byte_vector.
9101 (gdbsim_store_register): Likewise.
9103 2017-06-27 Pedro Alves <palves@redhat.com>
9105 * c-exp.y (name_obstack): Now an auto_obstack.
9106 (yylex): Use auto_obstack::clear.
9107 (c_parse): Use auto_obstack::clear instead of reinitializing and
9108 freeing the obstack.
9109 * c-lang.c (evaluate_subexp_c): Use auto_obstack.
9110 * d-exp.y (name_obstack): Now an auto_obstack.
9111 (yylex): Use auto_obstack::clear.
9112 (d_parse): Use auto_obstack::clear instead of reinitializing and
9113 freeing the obstack.
9114 * dwarf2loc.c (fetch_const_value_from_synthetic_pointer): Use
9116 * dwarf2read.c (create_addrmap_from_index)
9117 (dwarf2_build_psymtabs_hard)
9118 (update_enumeration_type_from_children): Likewise.
9119 * gdb_obstack.h (auto_obstack): New type.
9120 * go-exp.y (name_obstack): Now an auto_obstack.
9121 (build_packaged_name): Use auto_obstack::clear.
9122 (go_parse): Use auto_obstack::clear instead of reinitializing and
9123 freeing the obstack.
9124 * linux-tdep.c (linux_make_mappings_corefile_notes): Use
9126 * printcmd.c (printf_wide_c_string, ui_printf): Use auto_obstack.
9127 * rust-exp.y (work_obstack): Now an auto_obstack.
9128 (rust_parse, rust_lex_tests): Use auto_obstack::clear instead of
9129 reinitializing and freeing the obstack.
9130 * utils.c (do_obstack_free, make_cleanup_obstack_free): Delete.
9131 (host_char_to_target): Use auto_obstack.
9132 * utils.h (make_cleanup_obstack_free): Delete declaration.
9133 * valprint.c (generic_emit_char, generic_printstr): Use
9136 2017-06-27 Simon Marchi <simon.marchi@ericsson.com>
9138 * darwin-nat.c (darwin_check_new_threads): Don't handle dummy
9140 (darwin_init_thread_list): Don't update dummy thread.
9141 (darwin_create_inferior, darwin_attach): Don't add a dummy thread.
9143 2017-06-26 Simon Marchi <simon.marchi@ericsson.com>
9145 * record-full.c (netorder16): Remove.
9147 2017-06-26 Simon Marchi <simon.marchi@ericsson.com>
9149 * common/diagnostics.h: Define macros for GCC.
9150 (DIAGNOSTIC_IGNORE_UNUSED_FUNCTION): New macro.
9151 * common/vec.h: Include diagnostics.h.
9152 (DIAGNOSTIC_IGNORE_UNUSED_VEC_FUNCTION): New macro.
9153 (DEF_VEC_I, DEF_VEC_P, DEF_VEC_O): Ignore -Wunused-function
9156 2017-06-26 Simon Marchi <simon.marchi@ericsson.com>
9158 * common/diagnostics.h (DIAGNOSTIC_IGNORE_DEPRECATED_REGISTER):
9160 * ada-lex.l: Ignore deprecated register warnings.
9162 2017-06-25 Simon Marchi <simon.marchi@ericsson.com>
9164 * main.c (get_init_files): Replace "SYSTEM_GDBINIT +
9165 datadir_len" with "&SYSTEM_GDBINIT[datadir_len]".
9167 2017-06-25 Simon Marchi <simon.marchi@ericsson.com>
9169 * dtrace-probe.c (dtrace_process_dof_probe): Put semi-colon on
9172 2017-06-25 Simon Marchi <simon.marchi@ericsson.com>
9174 * nat/x86-dregs.c (x86_show_dr): Print registers one per line.
9176 2017-06-23 Alan Hayward <alan.hayward@arm.com>
9178 * xtensa-tdep.c (XTENSA_MAX_REGISTER_SIZE): Add.
9179 (xtensa_register_write_masked): Use XTENSA_MAX_REGISTER_SIZE.
9180 (xtensa_register_read_masked): Likewise.
9182 2017-06-22 Sergio Durigan Junior <sergiodj@redhat.com>
9184 * common/environ.c (gdb_environ::unset): Update comment.
9186 2017-06-22 Alan Hayward <alan.hayward@arm.com>
9188 * python/py-unwind.c (pyuw_sniffer): Allocate space for
9191 2017-06-22 Alan Hayward <alan.hayward@arm.com>
9193 * record-full.c (record_full_exec_insn): Use byte_vector.
9195 2017-06-22 Yao Qi <yao.qi@linaro.org>
9197 * regformats/i386/amd64-avx-mpx-avx512-pku-linux.dat: Regenerated.
9198 * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Regenerated.
9200 2017-06-22 Alan Hayward <alan.hayward@arm.com>
9202 * remote.c (cached_reg): Move from here...
9203 * regcache.h (cached_reg): ...to here.
9204 * python/py-unwind.c (struct reg_info): Remove.
9205 (cached_frame_info): Use cached_reg_t.
9206 (pyuw_prev_register): Likewise.
9207 (pyuw_sniffer): Use cached_reg_t and allocate registers.
9208 (pyuw_dealloc_cache): Free all registers.
9210 2017-06-22 Pedro Alves <palves@redhat.com>
9211 Simon Marchi <simon.marchi@ericsson.com>
9213 * unittests/environ-selftests.c (run_tests): Ignore -Wself-move
9215 * common/diagnostics.h: New file.
9217 2017-06-22 Pedro Alves <palves@redhat.com>
9219 * common/agent.h: Add include guards.
9221 2017-06-21 Simon Marchi <simon.marchi@ericsson.com>
9223 * target.h (struct target_ops) <to_xfer_partial>: Update doc to
9224 talk about addressable units instead of bytes.
9226 2017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
9228 * common/environ.c (gdb_environ::unset): Use '::iterator' instead
9229 of '::const_iterator'.
9231 2017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
9233 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
9234 'unittests/environ-selftests.c'.
9235 (SUBDIR_UNITTESTS_OBS): Add 'environ-selftests.o'.
9236 * charset.c (find_charset_names): Declare object 'iconv_env'.
9237 Update code to use 'iconv_env' object. Remove call to
9239 * common/environ.c: Include <utility>.
9240 (make_environ): Delete function.
9241 (free_environ): Delete function.
9242 (gdb_environ::clear): New function.
9243 (gdb_environ::operator=): New function.
9244 (gdb_environ::get): Likewise.
9245 (environ_vector): Delete function.
9246 (set_in_environ): Delete function.
9247 (gdb_environ::set): New function.
9248 (unset_in_environ): Delete function.
9249 (gdb_environ::unset): New function.
9250 (gdb_environ::envp): Likewise.
9251 * common/environ.h: Include <vector>.
9252 (struct gdb_environ): Delete; transform into...
9253 (class gdb_environ): ... this class.
9254 (free_environ): Delete prototype.
9255 (init_environ, get_in_environ, set_in_environ, unset_in_environ,
9256 environ_vector): Likewise.
9257 * infcmd.c (run_command_1): Update code to call
9258 'envp' from 'gdb_environ' class.
9259 (environment_info): Update code to call methods from 'gdb_environ'
9261 (unset_environment_command): Likewise.
9262 (path_info): Likewise.
9263 (path_command): Likewise.
9264 * inferior.c (inferior::~inferior): Delete call to 'free_environ'.
9265 (inferior::inferior): Initialize 'environment' using the host's
9267 * inferior.h: Remove forward declaration of 'struct gdb_environ'.
9268 Include "environ.h".
9269 (class inferior) <environment>: Change type from 'struct
9270 gdb_environ' to 'gdb_environ'.
9271 * mi/mi-cmd-env.c (mi_cmd_env_path): Update code to call
9272 methods from 'gdb_environ' class.
9273 * solib.c (solib_find_1): Likewise
9274 * unittests/environ-selftests.c: New file.
9276 2017-06-20 Yao Qi <yao.qi@linaro.org>
9278 * features/i386/i386-linux.xml: Exchange the order of including
9279 32bit-linux.xml and 32bit-sse.xml.
9280 * features/i386/i386-linux.c: Regenerated.
9282 2017-06-20 Yao Qi <yao.qi@linaro.org>
9284 * target-descriptions.c (tdesc_reg): Add ctor, dtor.
9285 Delete copy ctor and assignment operator.
9286 (tdesc_type): Likewise.
9287 (tdesc_feature): Likewise.
9288 (tdesc_free_reg): Remove.
9289 (tdesc_create_reg): Use new.
9290 (tdesc_free_type): Remove.
9291 (tdesc_create_vector): Use new.
9292 (tdesc_create_union): Likewise.
9293 (tdesc_create_flags): Likewise.
9294 (tdesc_create_enum): Likewise.
9295 (tdesc_free_feature): Delete.
9296 (free_target_description): Use delete.
9298 2017-06-19 John Baldwin <jhb@FreeBSD.org>
9300 * mips-tdep.c (print_gp_register_row): Don't error for unavailable
9303 2017-06-19 Pedro Alves <palves@redhat.com>
9305 * dwarf2read.c (write_psymtabs_to_index): Construct file_closer
9306 after gdb::unlinker.
9308 2017-06-19 Sergio Durigan Junior <sergiodj@redhat.com>
9310 * mi/mi-cm-env.c (_initialize_mi_cmd_env): Use getenv instead of
9311 gdb_environ to access an environment variable.
9313 2017-06-18 Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
9315 * nat/linux-ptrace.c (linux_fork_to_function): Add cast to
9318 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
9320 * nat/fork-inferior.h (trace_start_error): Add ATTRIBUTE_PRINTF.
9322 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
9324 * configure: Re-generate.
9325 * warning.m4 (build_warnings): Add -Wno-mismatched-tags.
9327 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
9329 * configure: Re-generate.
9330 * warning.m4: Pass -Werror to compiler when checking for
9331 supported warning flags.
9333 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
9335 * Makefile.in (COMPILE.pre): Add "-x c++".
9337 2017-06-16 Alan Hayward <alan.hayward@arm.com>
9338 Pedro Alves <palves@redhat.com>
9339 Yao Qi <yao.qi@linaro.org>
9341 * defs.h (RequireLongest): New.
9342 (extract_integer): Declare function template.
9343 (extract_signed_integer): Remove the declaration, but define it
9345 (extract_unsigned_integer): Likewise.
9346 (store_integer): Declare function template.
9347 (store_signed_integer): Remove the declaration, but define it
9349 (store_unsigned_integer): Likewise.
9350 * findvar.c (extract_integer): New function template.
9351 (extract_signed_integer): Remove.
9352 (extract_unsigned_integer): Remove.
9353 (extract_integer<LONGEST>, extract_integer<ULONGEST>): Explicit
9355 (store_integer): New function template.
9356 (store_signed_integer): Remove.
9357 (store_unsigned_integer): Remove.
9358 (store_integer): Explicit instantiations.
9359 * regcache.c (regcache_raw_read_signed): Update.
9360 (regcache::raw_read): New function.
9361 (regcache::raw_read_signed): Remove.
9362 (regcache::raw_read_unsigned): Remove.
9363 (regcache_raw_read_unsigned): Update.
9364 (regcache_raw_write_unsigned): Update.
9365 (regcache::raw_write_signed): Remove.
9366 (regcache::raw_write): New function.
9367 (regcache_cooked_read_signed): Update.
9368 (regcache::raw_write_unsigned): Remove.
9369 (regcache::cooked_read_signed): Remove.
9370 (regcache_cooked_read_unsigned): Update.
9371 (regcache::cooked_read_unsigned): Remove.
9372 (regcache_cooked_write_signed): Update.
9373 (regcache_cooked_write_unsigned): Update.
9374 * regcache.h (regcache) <raw_read_signed>: Remove.
9375 <raw_write_signed, raw_read_unsigned, raw_write_unsigned>: Remove.
9376 <raw_read, raw_write>: New.
9377 <cooked_read_signed, cooked_write_signed>: Remove.
9378 <cooked_write_unsigned, cooked_read_unsigned>: Remove.
9379 <cooked_read, cooked_write>: New.
9380 * sh64-tdep.c (sh64_pseudo_register_read): Update.
9381 (sh64_pseudo_register_write): Update.
9383 2017-06-16 Anton Kolesov <anton.kolesov@synopsys.com>
9385 * arc-tdep.c (arc_disassembler_options): New variable.
9386 (arc_gdbarch_init): Set and use it. Use arc_delayed_print_insn instead
9387 of default_print_insn.
9388 (arc_delayed_print_insn): Set info->section when needed,
9389 use default_print_insn to retrieve a disassembler.
9391 2017-06-14 Sergio Durigan Junior <sergiodj@redhat.com>
9394 * infcmd.c (_initialize_infcmd): Expand "help run" documentation
9395 to mention $SHELL and startup-with-shell.
9397 2017-06-14 Max Filippov <jcmvbkbc@gmail.com>
9399 * MAINTAINERS: Move Maxim Grigoriev to the Past Maintainers.
9401 2017-06-14 Yao Qi <yao.qi@linaro.org>
9403 * aarch64-tdep.c (aarch64_gdb_print_insn): Call
9404 default_print_insn instead of print_insn_aarch64.
9405 * arm-tdep.c (gdb_print_insn_arm): Call
9406 default_print_insn instead of print_insn_big_arm
9407 and print_insn_little_arm.
9408 * i386-tdep.c (i386_print_insn): Call default_print_insn
9409 instead of print_insn_i386.
9410 * ia64-tdep.c (ia64_print_insn): Call
9411 default_print_insn instead of print_insn_ia64.
9412 * mips-tdep.c (gdb_print_insn_mips): Call
9413 default_print_insn instead of print_insn_big_mips
9414 and print_insn_little_mips.
9415 * spu-tdep.c (gdb_print_insn_spu): Call default_print_insn
9416 instead of print_insn_spu.
9418 2017-06-14 Pedro Alves <palves@redhat.com>
9420 * ada-lang.c: Include "common/byte-vector.h".
9421 (ada_value_primitive_packed_val): Use gdb::byte_vector.
9422 * charset.c (wchar_iterator::iterate): Resize the vector instead
9424 * common/byte-vector.h: Include "common/def-vector.h".
9425 (wchar_iterator::m_out): Now a gdb::def_vector<gdb_wchar_t>.
9426 * cli/cli-dump.c: Include "common/byte-vector.h".
9427 (dump_memory_to_file, restore_binary_file): Use gdb::byte_vector.
9428 * common/byte-vector.h: New file.
9429 * common/def-vector.h: New file.
9430 * common/default-init-alloc.h: New file.
9431 * dwarf2loc.c: Include "common/byte-vector.h".
9432 (rw_pieced_value): Use gdb::byte_vector, and resize the vector
9433 instead of reserving it.
9434 * dwarf2read.c: Include "common/byte-vector.h".
9435 (data_buf::m_vec): Now a gdb::byte_vector.
9436 * gdb_regex.c: Include "common/def-vector.h".
9437 (compiled_regex::compiled_regex): Use gdb::def_vector<char>.
9438 * mi/mi-main.c: Include "common/byte-vector.h".
9439 (mi_cmd_data_read_memory): Use gdb::byte_vector.
9440 * printcmd.c: Include "common/byte-vector.h".
9441 (print_scalar_formatted): Use gdb::byte_vector.
9442 * valprint.c: Include "common/byte-vector.h".
9443 (maybe_negate_by_bytes, print_decimal_chars): Use
9446 2017-06-13 Simon Marchi <simon.marchi@ericsson.com>
9448 * darwin-nat.c: Include "nat/fork-inferior.h".
9450 2017-06-13 Simon Marchi <simon.marchi@ericsson.com>
9452 * configure.nat: Factor out Darwin bits that are not
9453 architecture-specific. Add fork-inferior.o.
9455 2017-06-13 Simon Marchi <simon.marchi@ericsson.com>
9457 * configure.nat: Factor out AIX bits that are not
9458 architecture-specific. Add fork-inferior.o.
9460 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
9462 * dwarf2loc.c (rw_pieced_value): New. Merge logic from...
9463 (read_pieced_value, write_pieced_value): ...here. Reduce to
9464 wrappers that just call rw_pieced_value.
9466 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
9468 * dwarf2loc.c (write_pieced_value): When writing the data for a
9469 memory piece, use write_memory_with_notification instead of
9472 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
9474 * valops.c (read_value_memory): Change embedded_offset to
9475 represent a bit offset instead of a byte offset.
9476 * value.h (read_value_memory): Adjust comment.
9478 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
9480 * dwarf2loc.c (read_pieced_value): Remove unnecessary variables
9481 dest_offset_bits and source_offset_bits.
9482 (write_pieced_value): Likewise.
9484 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
9486 * dwarf2loc.c (read_pieced_value): Respect the piece offset, as
9487 given by DW_OP_bit_piece.
9488 (write_pieced_value): Likewise.
9490 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
9492 * dwarf2loc.c (read_pieced_value): Move the buffer allocation and
9493 some other preparations to the places where sufficient information
9495 (write_pieced_value): Likewise.
9497 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
9499 * dwarf2loc.c (bits_to_bytes): New function.
9500 (read_pieced_value): Fix offset calculations for register pieces
9501 on big-endian targets.
9502 (write_pieced_value): Likewise.
9504 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
9506 * dwarf2loc.c (read_pieced_value): Remove buffer_size variable.
9507 (write_pieced_value): Likewise.
9509 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
9511 * dwarf2loc.c (write_pieced_value): When writing to a bit-field,
9512 transfer the source value's least significant bits, instead of its
9513 lowest-addressed ones. Rename type_len to max_offset.
9514 (read_pieced_value): Mirror above changes to write_pieced_value as
9517 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
9519 * dwarf2loc.c (write_pieced_value): In DWARF_VALUE_MEMORY,
9520 truncate full bytes from dest_offset_bits before using it as an
9521 offset into the buffer.
9523 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
9525 * dwarf2loc.c (write_pieced_value): Include transfer size in
9528 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
9530 * dwarf2loc.c (write_pieced_value): Fix copy/paste error in the
9531 calculation of this_size.
9533 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
9535 * dwarf2loc.c (read_pieced_value): Respect parent value's offset
9536 when targeting a bit-field.
9537 (write_pieced_value): Likewise.
9539 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
9541 * dwarf2loc.c (struct piece_closure) <addr_size>: Remove field.
9542 (allocate_piece_closure): Drop addr_size parameter.
9543 (dwarf2_evaluate_loc_desc_full): Adjust call to
9544 allocate_piece_closure.
9546 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
9549 * dwarf2loc.c (read_pieced_value): Anchor stack value pieces at
9550 the LSB end, independent of endianness.
9552 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
9554 * dwarf2loc.c (write_pieced_value): Fix order of calculations for
9557 2017-06-13 Yao Qi <yao.qi@linaro.org>
9559 * mips-linux-nat.c: Move include features/mips*-linux.c to
9561 (_initialize_mips_linux_nat): Move initialize_tdesc_mips* calls
9562 to mips-linux-tdep.c.
9563 * mips-linux-tdep.c: Include features/mips*-linux.c
9564 (_initialize_mips_linux_tdep): Call initialize_tdesc_mips*
9566 * mips-linux-tdep.h (tdesc_mips_linux): Declare.
9567 (tdesc_mips_dsp_linux, tdesc_mips64_linux): Declare.
9568 (tdesc_mips64_dsp_linux): Declare.
9570 2017-06-12 Tom Tromey <tom@tromey.com>
9572 * valprint.h (val_print_type_code_int): Remove.
9573 * valprint.c (generic_val_print_int): Always call
9574 val_print_scalar_formatted.
9575 (val_print_type_code_int): Remove.
9576 * printcmd.c (print_scalar_formatted): Handle options->format==0.
9577 * f-valprint.c (f_val_print): Use val_print_scalar_formatted.
9578 * c-valprint.c (c_val_print_int): Use val_print_scalar_formatted.
9579 * ada-valprint.c (ada_val_print_num): Use
9580 val_print_scalar_formatted.
9582 2017-06-12 Tom Tromey <tom@tromey.com>
9584 * printcmd.c (print_scalar_formatted): Unify the two switches.
9585 Don't convert scalars to LONGEST.
9587 2017-06-12 Tom Tromey <tom@tromey.com>
9590 * valprint.h (print_decimal_chars): Update.
9591 * valprint.c (maybe_negate_by_bytes): New function.
9592 (print_decimal_chars): Add "is_signed" argument.
9593 * printcmd.c (print_scalar_formatted): Update.
9595 2017-06-12 Tom Tromey <tom@tromey.com>
9598 * valprint.h (print_binary_chars, print_hex_chars): Update.
9599 * valprint.c (val_print_type_code_int): Update.
9600 (print_binary_chars): Add "zero_pad" argument.
9601 (emit_octal_digit): New function.
9602 (print_octal_chars): Don't zero-pad.
9603 (print_decimal_chars): Likewise.
9604 (print_hex_chars): Add "zero_pad" argument.
9605 * sh64-tdep.c (sh64_do_fp_register): Update.
9606 * regcache.c (regcache::dump): Update.
9607 * printcmd.c (print_scalar_formatted): Update.
9608 * infcmd.c (default_print_one_register_info): Update.
9610 2017-06-12 Pedro Alves <palves@redhat.com>
9611 Alan Hayward <alan.hayward@arm.com>
9613 * mips-tdep.c (MAX_MIPS_ABI_REGSIZE): New.
9614 (mips_eabi_push_dummy_call): Rename local 'regsize' to
9615 'abi_regsize'. Rename local array 'valbuf' to 'ref_valbuf', and
9616 use MAX_MIPS_ABI_REGSIZE instead of MAX_REGISTER_SIZE to size it.
9617 Assert that abi_regsize bytes fit in 'ref_valbuf'.
9619 2017-06-12 Pedro Alves <palves@redhat.com>
9621 * dwarf2read.c (mapped_symtab::data): Now a vector of
9622 symtab_index_entry instead of vector of
9623 std::unique_ptr<symtab_index_entry>. All users adjusted to check
9624 whether an element's name is NULL instead of checking whether the
9625 element itself is NULL.
9626 (find_slot): Change return type. Adjust.
9627 (hash_expand, , add_index_entry, uniquify_cu_indices)
9628 (write_hash_table): Adjust.
9630 2017-06-12 Pedro Alves <palves@redhat.com>
9632 * dwarf2read.c (recursively_count_psymbols): New function.
9633 (write_psymtabs_to_index): Call it to compute number of psyms and
9634 pass estimate size of psyms_seen to unordered_set's ctor.
9636 2017-06-12 Pedro Alves <palves@redhat.com>
9638 * dwarf2read.c (write_hash_table): Check if key already exists
9641 2017-06-12 Pedro Alves <palves@redhat.com>
9643 * dwarf2read.c (data_buf::append_space): Rename to...
9644 (data_buf::grow): ... this, and make private. Adjust all callers.
9645 (data_buf::append_uint): New method.
9646 (add_address_entry, write_one_signatured_type)
9647 (write_psymtabs_to_index): Use it.
9649 2017-06-12 Pedro Alves <palves@redhat.com>
9651 * dwarf2read.c (file_write(FILE *, const void *, size_t)): Delete.
9652 (file_write (FILE *, const std::vector<Elem>&)): Delete.
9653 (data_buf::file_write): Call ::fwrite directly.
9655 2017-06-12 Pedro Alves <palves@redhat.com>
9657 * dwarf2read.c (uniquify_cu_indices): Use std::unique and
9660 2017-06-12 Jan Kratochvil <jan.kratochvil@redhat.com>
9662 Code cleanup: C++ify .gdb_index producer.
9663 * dwarf2read.c: Include <unordered_set> and <unordered_map>.
9664 (MAYBE_SWAP) [WORDS_BIGENDIAN]: Cast to offset_type.
9665 (struct strtab_entry, hash_strtab_entry, eq_strtab_entry)
9666 (create_strtab, add_string): Remove.
9667 (file_write, data_buf): New.
9668 (struct symtab_index_entry): Use std::vector for cu_indices.
9669 (struct mapped_symtab): Use std::vector for data.
9670 (hash_symtab_entry, eq_symtab_entry, delete_symtab_entry)
9671 (create_symbol_hash_table, create_mapped_symtab, cleanup_mapped_symtab):
9673 (find_slot): Change return type. Update it to the new data structures.
9674 (hash_expand, add_index_entry): Update it to the new data structures.
9675 (offset_type_compare): Remove.
9676 (uniquify_cu_indices): Update it to the new data structures.
9677 (c_str_view, c_str_view_hasher, vector_hasher): New.
9678 (add_indices_to_cpool): Remove.
9679 (write_hash_table): Update it to the new data structures.
9680 (struct psymtab_cu_index_map, hash_psymtab_cu_index)
9681 (eq_psymtab_cu_index): Remove.
9682 (psym_index_map): New typedef.
9683 (struct addrmap_index_data): Change addr_obstack pointer to data_buf
9684 reference and std::unordered_map for cu_index_htab.
9685 (add_address_entry, add_address_entry_worker, write_address_map)
9686 (write_psymbols): Update it to the new data structures.
9687 (write_obstack): Remove.
9688 (struct signatured_type_index_data): Change types_list to a data_buf
9689 reference and psyms_seen to a std::unordered_set reference.
9690 (write_one_signatured_type, recursively_write_psymbols)
9691 (write_psymtabs_to_index): Update it to the new data structures.
9693 2017-06-11 Simon Marchi <simon.marchi@ericsson.com>
9695 * NEWS (Changes since GDB 8.0): Announce {set,show} debug
9696 separate-debug-file commands.
9697 * symfile.h (separate_debug_file_debug): New global.
9698 * symfile.c (separate_debug_file_debug): New global.
9699 (separate_debug_file_exists, find_separate_debug_file): Add
9701 (_initialize_symfile): Add "set debug separate-debug-file"
9703 * build-id.c (build_id_to_debug_bfd,
9704 find_separate_debug_file_by_buildid): Add debug output.
9706 2017-06-10 Simon Marchi <simon.marchi@polymtl.ca>
9708 * gdbarch.sh (displaced_step_free_closure): Remove.
9709 * gdbarch.h, gdbarch.c: Re-generate.
9710 * aarch64-linux-tdep.c (aarch64_linux_init_abi): Don't set
9711 displaced_step_free_closure.
9712 * amd64-linux-tdep.c (amd64_linux_init_abi_common): Likewise.
9713 * arm-linux-tdep.c (arm_linux_init_abi): Likewise.
9714 * i386-linux-tdep.c (i386_linux_init_abi): Likewise.
9715 * rs6000-aix-tdep.c (rs6000_aix_init_osabi): Likewise.
9716 * rs6000-tdep.c (rs6000_gdbarch_init): Likewise.
9717 * s390-linux-tdep.c (s390_gdbarch_init): Likewise.
9718 * arch-utils.h (simple_displaced_step_free_closure): Remove.
9719 * arch-utils.c (simple_displaced_step_free_closure): Remove.
9720 * infrun.c (displaced_step_clear): Call xfree instead of
9721 gdbarch_displaced_step_free_closure.
9723 2017-06-08 Sergio Durigan Junior <sergiodj@redhat.com>
9725 * common/common-utils.c (stringify_argv): Check for "arg[0] !=
9728 2017-06-08 Alan Hayward <alan.hayward@arm.com>
9730 * mn10300-tdep.c (MN10300_MAX_REGISTER_SIZE): Add.
9731 (mn10300_extract_return_value): Use MN10300_MAX_REGISTER_SIZE.
9732 (mn10300_push_dummy_call): Likewise.
9734 2017-06-08 Alan Hayward <alan.hayward@arm.com>
9736 * mi/mi-main.c (register_changed_p): Use value_contents_eq.
9738 2017-06-08 Alan Hayward <alan.hayward@arm.com>
9740 * mi/mi-main.c (register_changed_p): Use cooked_read_value.
9742 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
9744 * NEWS (Changes since GDB 8.0): Announce that GDBserver is now
9745 able to start inferiors using a shell.
9746 (New remote packets): Announce new packet "QStartupWithShell".
9747 * remote.c: Add PACKET_QStartupWithShell.
9748 (extended_remote_create_inferior): Handle new
9749 PACKET_QStartupWithShell.
9750 (remote_protocol_features) <QStartupWithShell>: New entry for
9751 PACKET_QStartupWithShell.
9752 (_initialize_remote): Call "add_packet_config_cmd" for
9755 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
9756 Pedro Alves <palves@redhat.com>
9758 * Makefile.in (HFILES_NO_SRCDIR): Add "common/common-inferior.h"
9759 and "nat/fork-inferior.h".
9760 * common/common-inferior.h: New file, with contents from
9762 * commom/common-utils.c: Include "common-utils.h".
9763 (stringify_argv): New function.
9764 * common/common-utils.h (stringify_argv): New prototype.
9765 * configure.nat: Add "fork-inferior.o" as a dependency for
9766 "*linux*", "fbsd*" and "nbsd*" hosts.
9767 * corefile.c (get_exec_file): Update comment.
9768 * darwin-nat.c (darwin_ptrace_him): Call "gdb_startup_inferior"
9769 instead of "startup_inferior".
9770 (darwin_create_inferior): Call "add_thread_silent" after
9772 * fork-child.c: Cleanup unnecessary includes.
9773 (SHELL_FILE): Move to "common/common-fork-child.c".
9774 (environ): Likewise.
9775 (exec_wrapper): Initialize.
9776 (get_exec_wrapper): New function.
9777 (breakup_args): Move to "common/common-fork-child.c"; rename to
9778 "breakup_args_for_exec".
9779 (escape_bang_in_quoted_argument): Move to
9780 "common/common-fork-child.c".
9781 (saved_ui): New variable.
9782 (prefork_hook): New function.
9783 (postfork_hook): Likewise.
9784 (postfork_child_hook): Likewise.
9785 (gdb_startup_inferior): Likewise.
9786 (fork_inferior): Move to "common/common-fork-child.c". Update
9787 function to support gdbserver.
9788 (startup_inferior): Likewise.
9789 * gdbcore.h (get_exec_file): Remove declaration.
9790 * gnu-nat.c (gnu_create_inferior): Call "gdb_startup_inferior"
9791 instead of "startup_inferior". Call "add_thread_silent" after
9793 * inf-ptrace.c: Include "nat/fork-inferior.h" and "utils.h".
9794 (inf_ptrace_create_inferior): Call "gdb_startup_inferior"
9795 instead of "startup_inferior". Call "add_thread_silent" after
9797 * inferior.h: Include "common-inferior.h".
9798 (trace_start_error): Move to "common/common-utils.h".
9799 (trace_start_error_with_name): Likewise.
9800 (fork_inferior): Move prototype to "nat/fork-inferior.h".
9801 (startup_inferior): Likewise.
9802 (gdb_startup_inferior): New prototype.
9803 * nat/fork-inferior.c: New file, with contents from "fork-child.c".
9804 * nat/fork-inferior.h: New file.
9805 * procfs.c (procfs_init_inferior): Call "gdb_startup_inferior"
9806 instead of "startup_inferior". Call "add_thread_silent" after
9808 * target.h (target_terminal_init): Move prototype to
9810 (target_terminal_inferior): Likewise.
9811 (target_terminal_ours): Likewise.
9812 * target/target.h (target_terminal_init): New prototype, moved
9814 (target_terminal_inferior): Likewise.
9815 (target_terminal_ours): Likewise.
9816 * utils.c (gdb_flush_out_err): New function.
9818 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
9820 * Makefile.in (HFILES_NO_SRCDIR): Add "common/common-gdbthread.h".
9821 * common/common-gdbthread.h: New file, with parts from
9823 * gdbthread.h: Include "common-gdbthread.h".
9824 (switch_to_thread): Moved to "common/common-gdbthread.h".
9826 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
9828 * Makefile.in (SFILES): Add "common/job-control.c".
9829 (HFILES_NO_SRCDIR): Add "common/job-control.h".
9830 (COMMON_OBS): Add "job-control.o".
9831 * common/job-control.c: New file, with contents from
9833 * common/job-control.h: New file, with contents from "terminal.h".
9834 * fork-child.c: Include "job-control.h".
9835 * inflow.c: Include "job-control.h".
9836 (gdb_setpgid): Move to "common/common-inflow.c".
9837 (_initialize_inflow): Move setting of "job_control" to
9838 "handle_job_control".
9839 * terminal.h (job_control): Moved to "common/common-terminal.h".
9840 (gdb_setpgid): Likewise.
9841 * top.c: Include "job_control.h".
9842 * utils.c: Likewise.
9843 (job_control): Moved to "job-control.c".
9845 2017-06-07 Pedro Alves <palves@redhat.com>
9847 * Makefile.in (SFILES): Add gdb_regex.c.
9848 (COMMON_OBS): Add gdb_regex.o.
9849 * ada-lang.c (ada_add_standard_exceptions)
9850 (ada_add_exceptions_from_frame, name_matches_regex)
9851 (ada_add_global_exceptions, ada_exceptions_list_1): Change regex
9852 parameter type to compiled_regex. Adjust.
9853 (ada_exceptions_list): Use compiled_regex.
9854 * break-catch-throw.c (exception_catchpoint::pattern): Now a
9855 std::unique_ptr<compiled_regex>.
9856 (exception_catchpoint::~exception_catchpoint): Remove regfree
9858 (check_status_exception_catchpoint): Adjust to use compiled_regex.
9859 (handle_gnu_v3_exceptions): Adjust to use compiled_regex.
9860 * breakpoint.c (solib_catchpoint::compiled): Now a
9861 std::unique_ptr<compiled_regex>.
9862 (solib_catchpoint::~solib_catchpoint): Remove regfree call.
9863 (check_status_catch_solib): Adjust to use compiled_regex.
9864 (add_solib_catchpoint): Adjust to use compiled_regex.
9865 * cli/cli-cmds.c (apropos_command): Use compiled_regex.
9866 * cli/cli-decode.c (apropos_cmd): Change regex parameter to
9867 compiled_regex reference. Adjust to use it.
9868 * cli/cli-decode.h: Remove struct re_pattern_buffer forward
9869 declaration. Include "gdb_regex.h".
9870 (apropos_cmd): Change regex parameter to compiled_regex reference.
9871 * gdb_regex.c: New file.
9872 * gdb_regex.h (make_regfree_cleanup, get_regcomp_error): Delete
9874 (class compiled_regex): New.
9875 * linux-tdep.c: Include "common/gdb_optional.h".
9876 (struct mapping_regexes): New, factored out from
9877 mapping_is_anonymous_p, and adjusted to use compiled_regex.
9878 (mapping_is_anonymous_p): Use mapping_regexes wrapped in a
9879 gdb::optional and remove cleanups. Adjust to compiled_regex.
9880 * probe.c: Include "common/gdb_optional.h".
9881 (collect_probes): Use compiled_regex and gdb::optional and remove
9883 * skip.c: Include "common/gdb_optional.h".
9884 (skiplist_entry::compiled_function_regexp): Now a
9885 gdb::optional<compiled_regex>.
9886 (skiplist_entry::compiled_function_regexp_is_valid): Delete field.
9887 (free_skiplist_entry): Remove regfree call.
9888 (compile_skip_regexp, skip_rfunction_p): Adjust to use
9889 compiled_regex and gdb::optional.
9890 * symtab.c: Include "common/gdb_optional.h".
9891 (search_symbols): Use compiled_regex and gdb::optional.
9892 * utils.c (do_regfree_cleanup, make_regfree_cleanup)
9893 (get_regcomp_error, compile_rx_or_error): Delete. Some bits moved
9896 2017-06-07 Alan Hayward <alan.hayward@arm.com>
9898 * regcache.c (regcache::save): Avoid buffer use.
9899 (regcache::dump): Likewise.
9901 2017-06-07 Alan Hayward <alan.hayward@arm.com>
9903 * sh-tdep.c (sh_pseudo_register_read): Remove
9905 (sh_pseudo_register_write): Likewise.
9906 * sh64-tdep.c (sh64_pseudo_register_read): Likewise.
9907 (sh64_pseudo_register_write): Likewise
9909 2017-06-07 Alan Hayward <alan.hayward@arm.com>
9911 * aarch64-tdep.c (aarch64_store_return_value): Use
9913 (aarch64_pseudo_read_value): Likewise.
9914 (aarch64_pseudo_write): Likewise.
9916 2017-06-06 Yao Qi <yao.qi@linaro.org>
9918 * regformats/regdef.h (set_register_cache): Remove the
9921 2017-06-06 Alan Hayward <alan.hayward@arm.com>
9923 * frame.c (frame_unwind_register_signed): Use
9924 frame_unwind_register_value.
9926 2017-06-06 Pedro Alves <palves@redhat.com>
9928 PR breakpoints/21553
9929 * breakpoint.c (create_breakpoints_sal_default)
9930 (init_breakpoint_sal, create_breakpoint_sal): Use
9931 gdb::unique_xmalloc_ptr for string parameters.
9932 (create_breakpoint): Constify 'extra_string' and 'cond_string'
9933 parameters. Replace cleanups with gdb::unique_xmalloc_ptr.
9934 (base_breakpoint_create_breakpoints_sal)
9935 (bkpt_create_breakpoints_sal, tracepoint_create_breakpoints_sal)
9936 (strace_marker_create_breakpoints_sal)
9937 (create_breakpoints_sal_default): Use gdb::unique_xmalloc_ptr for
9939 * breakpoint.h (breakpoint_ops::create_breakpoints_sal): Use
9940 gdb::unique_xmalloc_ptr for string parameters.
9941 (create_breakpoint): Constify 'extra_string' and 'cond_string'
9944 2017-06-06 Alan Hayward <alan.hayward@arm.com>
9946 * alpha-tdep.c (alpha_register_to_value): Use
9947 get_frame_register_value.
9948 (alpha_value_to_register): Use ALPHA_REGISTER_SIZE.
9950 2017-06-06 Alan Hayward <alan.hayward@arm.com>
9952 * ia64-tdep.c (IA64_MAX_FP_REGISTER_SIZE) Add.
9953 (ia64_register_to_value): Use IA64_MAX_FP_REGISTER_SIZE.
9954 (ia64_value_to_register): Likewise.
9955 (ia64_extract_return_value): Likewise.
9956 (ia64_store_return_value): Likewise.
9957 (ia64_push_dummy_call): Likewise.
9959 2017-06-04 Joel Brobecker <brobecker@adacore.com>
9963 2017-06-03 Simon Marchi <simon.marchi@ericsson.com>
9965 * x86-linux-nat.c (struct arch_lwp_info): Remove.
9967 2017-06-03 Simon Marchi <simon.marchi@polymtl.ca>
9969 * linux-nat.c (linux_nat_post_attach_wait): Remove FIRST
9971 (linux_nat_attach): Adjust call to linux_nat_post_attach_wait.
9973 2017-06-02 Simon Marchi <simon.marchi@ericsson.com>
9975 * event-loop.c (poll_timers): Unallocate timer using delete
9978 2017-06-02 Simon Marchi <simon.marchi@polymtl.ca>
9980 * breakpoint.h (struct breakpoint_ops) <dtor>: Remove.
9981 (struct breakpoint) <~breakpoint>: New.
9982 (struct watchpoint): Inherit from breakpoint.
9985 (struct tracepoint): Inherit from breakpoint.
9987 * breakpoint.c (longjmp_breakpoint_ops): Remove.
9988 (struct longjmp_breakpoint): Inherit from breakpoint.
9989 <~longjmp_breakpoint>: New.
9991 (new_breakpoint_from_type): Remove casts.
9992 (watchpoint_in_thread_scope): Remove reference to base field.
9993 (watchpoint_del_at_next_stop): Likewise.
9994 (update_watchpoint): Likewise.
9995 (watchpoint_check): Likewise.
9996 (bpstat_check_watchpoint): Likewise.
9997 (set_longjmp_breakpoint): Likewise.
9998 (struct fork_catchpoint): Inherit from breakpoint.
10000 (struct solib_catchpoint): Inherit from breakpoint.
10001 <~solib_catchpoint>: New.
10003 (dtor_catch_solib): Change to ...
10004 (solib_catchpoint::~solib_catchpoint): ... this.
10005 (breakpoint_hit_catch_solib): Remove reference to base field.
10006 (add_solib_catchpoint): Likewise.
10007 (create_fork_vfork_event_catchpoint): Likewise.
10008 (struct exec_catchpoint): Inherit from breakpoint.
10009 <~exec_catchpoint>: New.
10011 (dtor_catch_exec): Change to ...
10012 (exec_catchpoint::~exec_catchpoint): ... this.
10013 (dtor_watchpoint): Change to ...
10014 (watchpoint::~watchpoint): ... this.
10015 (watch_command_1): Remove reference to base field.
10016 (catch_exec_command_1): Likewise.
10017 (base_breakpoint_dtor): Change to ...
10018 (breakpoint::~breakpoint): ... this.
10019 (base_breakpoint_ops): Remove dtor field value.
10020 (longjmp_bkpt_dtor): Change to ...
10021 (longjmp_breakpoint::~longjmp_breakpoint): ... this.
10022 (strace_marker_create_breakpoints_sal): Remove reference to base
10024 (delete_breakpoint): Don't manually call breakpoint destructor.
10025 (create_tracepoint_from_upload): Remove reference to base field.
10026 (trace_pass_set_count): Likewise.
10027 (initialize_breakpoint_ops): Don't initialize
10028 momentary_breakpoint_ops, don't set dtors.
10029 * ada-lang.c (struct ada_catchpoint): Inherit from breakpoint.
10030 <~ada_catchpoint>: New.
10032 (create_excep_cond_exprs): Remove reference to base field.
10033 (dtor_exception): Change to ...
10034 (ada_catchpoint::~ada_catchpoint): ... this.
10035 (dtor_catch_exception): Remove.
10036 (dtor_catch_exception_unhandled): Remove.
10037 (dtor_catch_assert): Remove.
10038 (create_ada_exception_catchpoint): Remove reference to base
10040 (initialize_ada_catchpoint_ops): Don't set dtors.
10041 * break-catch-sig.c (struct signal_catchpoint): Inherit from
10043 <~signal_catchpoint>: New.
10045 (signal_catchpoint_dtor): Change to ...
10046 (signal_catchpoint::~signal_catchpoint): ... this.
10047 (create_signal_catchpoint): Remove reference to base field.
10048 (initialize_signal_catchpoint_ops): Don't set dtor.
10049 * break-catch-syscall.c (struct syscall_catchpoint): Inherit
10051 <~syscall_catchpoint>: New.
10053 (dtor_catch_syscall): Change to ...
10054 (syscall_catchpoint::~syscall_catchpoint): ... this.
10055 (create_syscall_event_catchpoint): Remove reference to base
10057 (initialize_syscall_catchpoint_ops): Don't set dtor.
10058 * break-catch-throw.c (struct exception_catchpoint): Inherit
10060 <~exception_catchpoint>: New.
10062 (dtor_exception_catchpoint): Change to ...
10063 (exception_catchpoint::~exception_catchpoint): ... this.
10064 (handle_gnu_v3_exceptions): Remove reference to base field.
10065 (initialize_throw_catchpoint_ops): Don't set dtor.
10066 * ctf.c (ctf_get_traceframe_address): Remove reference to base
10068 * remote.c (remote_get_tracepoint_status): Likewise.
10069 * tracefile-tfile.c (tfile_get_traceframe_address): Likewise.
10070 * tracefile.c (tracefile_fetch_registers): Likewise.
10071 * tracepoint.c (actions_command): Likewise.
10072 (validate_actionline): Likewise.
10073 (tfind_1): Likewise.
10074 (get_traceframe_location): Likewise.
10075 (find_matching_tracepoint_location): Likewise.
10076 (parse_tracepoint_status): Likewise.
10077 * mi/mi-cmd-break.c (mi_cmd_break_passcount): Likewise.
10079 2017-06-02 Simon Marchi <simon.marchi@polymtl.ca>
10081 * breakpoint.c (struct longjmp_breakpoint): New struct.
10082 (is_tracepoint_type): Change return type to bool.
10083 (is_longjmp_type): New function.
10084 (new_breakpoint_from_type): Handle longjmp kinds of breakpoints.
10085 (set_raw_breakpoint_without_location): Use
10086 new_breakpoint_from_type.
10087 (set_raw_breakpoint): Likewise.
10089 2017-06-02 Simon Marchi <simon.marchi@polymtl.ca>
10091 * breakpoint.c (new_breakpoint_from_type): New function.
10092 (create_breakpoint_sal): Use new_breakpoint_from_type and
10094 (create_breakpoint): Likewise.
10096 2017-05-31 Simon Marchi <simon.marchi@ericsson.com>
10098 * memattr.c (mem_info_command): Rename to ...
10099 (info_mem_command): ... this.
10100 (mem_enable_command): Rename to ...
10101 (enable_mem_command): ... this.
10102 (mem_disable_command): Rename to ...
10103 (disable_mem_command): ... this.
10104 (mem_delete_command): Rename to ...
10105 (delete_mem_command): ... this.
10106 (_initialize_mem): Adjust function names.
10108 2017-05-31 Markus Metzger <markus.t.metzger@intel.com>
10110 * btrace.c (handle_pt_insn_events): New.
10111 (ftrace_add_pt): Call handle_pt_insn_events. Rename ERRCODE into
10112 STATUS. Split into this and ...
10113 (handle_pt_insn_event_flags): ... this.
10115 2017-05-31 Markus Metzger <markus.t.metzger@intel.com>
10117 * configure.ac: Check for pt_insn_event, struct pt_insn.enabled,
10118 and struct pt_insn.resynced.
10119 * configure: Regenerated.
10120 * config.in: Regenerated.
10122 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
10124 * btrace.c (ftrace_find_call_by_number): New function.
10125 (ftrace_new_function): Store objects, not pointers.
10126 (ftrace_find_call_by_number, ftrace_new_return, ftrace_new_switch,
10127 ftrace_new_gap, ftrace_update_function,
10128 ftrace_compute_global_level_offset, btrace_stich_bts, btrace_clear,
10129 btrace_insn_get, btrace_insn_get_error, btrace_insn_end,
10130 btrace_insn_next, btrace_insn_prev, ptrace_find_insn_by_number,
10131 btrace_ends_with_single_insn, btrace_call_get): Account for
10132 btrace_thread_info::functions now storing objects.
10133 * btrace.h (struct btrace_thread_info): Add constructor.
10134 (struct btrace_thread_info) <functions>: Make std::vector.
10135 (struct btrace_thread_info) <prev, next, up, insn, errcode, flags):
10136 Initialize with default values.
10137 * record-btrace.c (record_btrace_frame_sniffer): Account for
10138 btrace_thread_info::functions now storing objects.
10140 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
10142 * btrace.c: Remove typedef bfun_s.
10143 (ftrace_new_gap): Directly add gaps to the list of gaps.
10144 (btrace_bridge_gaps, btrace_compute_ftrace_bts, pt_btrace_insn_flags,
10145 ftrace_add_pt, btrace_compute_ftrace_pt, btrace_compute_ftrace_1,
10146 btrace_finalize_ftrace, btrace_compute_ftrace): Use std::vector
10147 instead of gdb VEC.
10149 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
10151 * btrace.c (ftrace_fixup_caller, ftrace_new_return, ftrace_connect_bfun,
10152 ftrace_bridge_gap): Replace references to btrace_thread_info::segment
10153 with btrace_thread_info::next_segment and
10154 btrace_thread_info::prev_segment.
10155 * btrace.h: Remove struct btrace_func_link.
10156 (struct btrace_function): Replace pair of function segment pointers
10157 with pair of indices.
10158 * python/py-record-btrace.c (btpy_call_prev_sibling,
10159 btpy_call_next_sibling): Replace references to
10160 btrace_thread_info::segment with btrace_thread_info::next_segment and
10161 btrace_thread_info::prev_segment.
10162 * record-btrace.c (record_btrace_frame_this_id): Use
10163 btrace_find_call_by_number.
10165 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
10167 * btrace.c (ftrace_new_function, ftrace_fixup_level,
10168 ftrace_connect_bfun, ftrace_bridge_gap, btrace_bridge_gaps,
10169 btrace_insn_next, btrace_insn_prev): Remove references to
10170 btrace_thread_info::flow.
10171 * btrace.h (struct btrace_function): Remove FLOW.
10173 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
10175 * btrace.c (ftrace_find_call_by_number): New function.
10176 (ftrace_update_caller, ftrace_new_call, ftrace_new_tailcall,
10177 ftrace_get_caller, ftrace_find_call, ftrace_new_return,
10178 ftrace_match_backtrace, ftrace_connect_bfun, ftrace_connect_backtrace,
10179 ftrace_bridge_gap, btrace_bridge_gaps): Use btrace_function::up as an
10181 * btrace.h (struct btrace_function): Turn UP into an index.
10182 * python/py-record-btrace.c (btpy_call_up): Use btrace_function::up
10184 * record-btrace.c (record_btrace_frame_unwind_stop_reason,
10185 record_btrace_frame_prev_register, record_btrace_frame_sniffer,
10186 record_btrace_tailcall_frame_sniffe): Use btrace_find_call_by_number.
10188 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
10190 * btrace.c (ftrace_new_function, ftrace_new_call, ftrace_new_tailcall,
10191 ftrace_new_return, ftrace_new_switch, ftrace_new_gap,
10192 ftrace_update_function, ftrace_compute_global_level_offset,
10193 btrace_compute_ftrace_bts, ftrace_add_pt, btrace_compute_ftrace_pt,
10194 btrace_stitch_bts, btrace_fetch, btrace_clear, btrace_insn_number,
10195 btrace_insn_end, btrace_is_empty): Remove references to
10196 btrace_thread_info::begin and btrace_thread_info::end.
10197 * btrace.h (struct btrace_thread_info): Remove BEGIN and END.
10198 (struct btrace_thread_info) <functions>: Adjust comment.
10199 * record-btrace.c (record_btrace_start_replaying): Remove reference to
10200 btrace_thread_info::begin.
10202 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
10204 * btrace.c (ftrace_new_function, ftrace_new_call, ftrace_new_tailcall,
10205 ftrace_new_return, ftrace_new_switch, ftrace_new_gap,
10206 ftrace_update_function): Remove arguments that implicitly were always
10208 (btrace_compute_ftrace_bts, ftrace_add_pt, btrace_compute_ftrace_pt):
10209 Don't pass BTINFO->END.
10211 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
10213 * btrace.c: (btrace_insn_get, btrace_insn_get_error, btrace_insn_number,
10214 btrace_insn_begin, btrace_insn_end, btrace_insn_next, btrace_insn_prev,
10215 btrace_find_insn_by_number): Replace function segment pointer with
10217 (btrace_insn_cmp): Simplify.
10218 * btrace.h: (struct btrace_insn_iterator) Rename index to
10219 insn_index. Replace function segment pointer with index into function
10221 * record-btrace.c (record_btrace_call_history): Replace function
10222 segment pointer use with index.
10223 (record_btrace_frame_sniffer): Retrieve function call segment through
10225 (record_btrace_set_replay): Remove defunc't safety check.
10227 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
10229 * btrace.c (btrace_ends_with_single_insn): New function.
10230 (btrace_call_get, btrace_call_number, btrace_call_begin,
10231 btrace_call_end, btrace_call_next, btrace_call_prev,
10232 btrace_find_call_by_number): Use index into call segment vector
10233 instead of pointer.
10234 (btrace_call_cmp): Simplify.
10235 * btrace.h (struct btrace_call_iterator): Replace function call segment
10236 pointer with index into vector.
10237 * record-btrace.c (record_btrace_call_history): Use index instead of
10240 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
10242 * btrace.c (btrace_insn_begin, btrace_insn_end,
10243 btrace_find_insn_by_number): Add btinfo to iterator.
10244 * btrace.h (struct btrace_insn_iterator): Add btinfo.
10246 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
10248 * btrace.c (ftrace_new_function): Add btrace_thread_info to arguments
10249 and save pointers directly.
10250 (ftrace_new_call, ftrace_new_tailcall, ftrace_new_return,
10251 ftrace_new_switch, ftrace_new_gap, ftrace_update_function,
10252 ftrace_add_pt): Add btrace_thread_info to arguments. Adjust for
10253 changed signature of functions.
10254 (btrace_compute_ftrace_pt): Adjust for changed signature of functions.
10255 (btrace_fetch): Remove code that adds btrace_function pointers to
10256 vector of btrace_functions.
10257 (btrace_clear): Simplify freeing vector of btrace_functions.
10259 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
10261 * btrace.c (btrace_fetch, btrace_clear, btrace_find_insn_by_number):
10262 Replace VEC_* with std::vector functions.
10263 * btrace.h: Add include: vector. Remove typedef for DEF_VEC_P.
10264 (struct btrace_thread_info)<functions>: Change type to std::vector.
10266 2017-05-30 Simon Marchi <simon.marchi@ericsson.com>
10268 * NEWS (Changes in GDB 8.0): Remove extra empty line. Move
10269 "Removed targets and native configurations" up. Merge duplicate
10270 "New commands" sub-sections. Add "New options" sub-sections.
10272 2017-05-26 Alan Hayward <alan.hayward@arm.com>
10274 * defs.h (copy_integer_to_size): New declaration.
10275 * findvar.c (copy_integer_to_size): New function.
10276 (do_cint_test): New selftest function.
10277 (copy_integer_to_size_test): Likewise.
10278 (_initialize_findvar): Likewise.
10279 * mips-fbsd-tdep.c (mips_fbsd_supply_reg): Use raw_supply_integer.
10280 (mips_fbsd_collect_reg): Use raw_collect_integer.
10281 * mips-linux-tdep.c (supply_32bit_reg): Use raw_supply_integer.
10282 (mips64_fill_gregset): Use raw_collect_integer
10283 (mips64_fill_fpregset): Use raw_supply_integer.
10284 * regcache.c (regcache::raw_supply_integer): New function.
10285 (regcache::raw_collect_integer): Likewise.
10286 * regcache.h: (regcache::raw_supply_integer): New declaration.
10287 (regcache::raw_collect_integer): Likewise.
10289 2017-05-24 Yao Qi <yao.qi@linaro.org>
10291 * Makefile.in (SFILES): Add gdbarch-selftests.c.
10292 (COMMON_OBS): Add gdbarch-selftests.o.
10293 * frame.c [GDB_SELF_TESTS] (create_new_frame): New function.
10294 * frame.h [GDB_SELF_TESTS] (create_new_frame): Declare.
10295 * gdbarch-selftests.c: New file.
10296 * regcache.h (regcache) <~regcache>: Mark it virtual if
10298 <raw_write>: Likewise.
10300 2017-05-24 Yao Qi <yao.qi@linaro.org>
10302 * regcache.c (current_regcache): Change it to
10303 regcache::current_regcache.
10304 (regcache_observer_target_changed): Update.
10305 (regcache_thread_ptid_changed): Make it a regcache static
10307 (regcache_thread_ptid_changed): Update.
10308 (class regcache_access): New.
10309 (current_regcache_test): Update.
10310 (_initialize_regcache): Update.
10311 * regcache.h: Include forward_list.
10312 (regcache): Declare regcache_thread_ptid_changed and declare
10313 registers_changed_ptid as friend.
10315 2017-05-24 Yao Qi <yao.qi@linaro.org>
10317 * i387-tdep.c (i387_register_to_value): Use register_size
10318 instead of TYPE_LENGTH.
10319 * m68k-tdep.c (m68k_register_to_value): Likewise.
10321 2017-05-24 Yao Qi <yao.qi@linaro.org>
10323 * i387-tdep.c (i387_convert_register_p): Return false if type
10324 code isn't TYPE_CODE_FLT.
10326 2017-05-24 Yao Qi <yao.qi@linaro.org>
10328 * alpha-tdep.c (alpha_convert_register_p): Return true if type
10330 (alpha_register_to_value): Remove type length check.
10331 (alpha_value_to_register): Likewise.
10333 2017-05-24 Yao Qi <yao.qi@linaro.org>
10335 * ia64-tdep.c (ia64_convert_register_p): Check type's code is
10338 2017-05-24 Yao Qi <yao.qi@linaro.org>
10340 * m68k-tdep.c (m68k_convert_register_p): Check type's code is
10341 TYPE_CODE_FLT or not.
10343 2017-05-24 Yao Qi <yao.qi@linaro.org>
10345 * alpha-tdep.c (alpha_gdbarch_init): Use XCNEW instead of XNEW.
10346 * avr-tdep.c (avr_gdbarch_init): Likewise.
10347 * bfin-tdep.c (bfin_gdbarch_init): Likewise.
10348 * cris-tdep.c (cris_gdbarch_init): Likewise.
10349 * ft32-tdep.c (ft32_gdbarch_init): Likewise.
10350 * lm32-tdep.c (lm32_gdbarch_init): Likewise.
10351 * m32r-tdep.c (m32r_gdbarch_init): Likewise.
10352 * m68hc11-tdep.c (m68hc11_gdbarch_init): Likewise.
10353 * mep-tdep.c (mep_gdbarch_init): Likewise.
10354 * microblaze-tdep.c (microblaze_gdbarch_init): Likewise.
10355 * mips-tdep.c (mips_gdbarch_init): Likewise.
10356 * mn10300-tdep.c (mn10300_gdbarch_init): Likewise.
10357 * moxie-tdep.c (moxie_gdbarch_init): Likewise.
10358 * msp430-tdep.c (msp430_gdbarch_init): Likewise.
10359 * sh64-tdep.c (sh64_gdbarch_init): Likewise.
10360 * v850-tdep.c (v850_gdbarch_init): Likewise.
10362 2017-05-24 Yao Qi <yao.qi@linaro.org>
10364 * selftest-arch.c (tests_with_arch): Call registers_changed
10365 and reinit_frame_cache.
10366 * selftest.c (run_self_tests): Likewise.
10368 2017-05-24 Yao Qi <yao.qi@linaro.org>
10370 * rs6000-tdep.c (gdb_print_insn_powerpc): Remove.
10371 (rs6000_gdbarch_init): Don't call set_gdbarch_print_insn.
10373 2017-05-24 Yao Qi <yao.qi@linaro.org>
10375 * rl78-tdep.c (rl78_gdbarch_init): Don't call
10376 set_gdbarch_print_insn.
10378 2017-05-24 Yao Qi <yao.qi@linaro.org>
10380 * h8300-tdep.c (h8300_gdbarch_init): Don't call
10381 set_gdbarch_print_insn.
10383 2017-05-24 Yao Qi <yao.qi@linaro.org>
10385 * alpha-tdep.c (alpha_gdbarch_init): Don't call
10386 set_gdbarch_print_insn.
10387 * arc-tdep.c (arc_gdbarch_init): Likewise.
10388 * arch-utils.c: include dis-asm.h.
10389 (default_print_insn): New function.
10390 * arch-utils.h (default_print_insn): Declare.
10391 * avr-tdep.c (avr_gdbarch_init): Don't call set_gdbarch_print_insn.
10392 * bfin-tdep.c (bfin_gdbarch_init): Likewise.
10393 * cris-tdep.c (cris_delayed_get_disassembler): Remove.
10394 (cris_gdbarch_init): Don't call set_gdbarch_print_insn.
10395 * frv-tdep.c (frv_gdbarch_init): Likewise.
10396 * ft32-tdep.c (ft32_gdbarch_init): Likewise.
10397 * gdbarch.sh (print_insn): Use default_print_insn.
10398 * gdbarch.c: Regenerated.
10399 * hppa-tdep.c (hppa_gdbarch_init): Likewise.
10400 * iq2000-tdep.c (iq2000_gdbarch_init): Likewise.
10401 * lm32-tdep.c (lm32_gdbarch_init): Likewise.
10402 * m32c-tdep.c (m32c_gdbarch_init): Likewise.
10403 * m32r-tdep.c (m32r_gdbarch_init): Likewise.
10404 * m68hc11-tdep.c (gdb_print_insn_m68hc11): Remove.
10405 (m68hc11_gdbarch_init): Don't call set_gdbarch_print_insn.
10406 * m68k-tdep.c (m68k_gdbarch_init): Likewise.
10407 * m88k-tdep.c (m88k_gdbarch_init): Likewise.
10408 * microblaze-tdep.c (microblaze_gdbarch_init): Likewise.
10409 * mn10300-tdep.c (mn10300_gdbarch_init): Likewise.
10410 * moxie-tdep.c (moxie_gdbarch_init): Likewise.
10411 * msp430-tdep.c (msp430_gdbarch_init): Likewise.
10412 * mt-tdep.c (mt_gdbarch_init): Likewise.
10413 * nds32-tdep.c (nds32_gdbarch_init): Likewise.
10414 * nios2-tdep.c (nios2_print_insn): Remove.
10415 (nios2_gdbarch_init): Don't call set_gdbarch_print_insn.
10416 * rx-tdep.c (rx_gdbarch_init): Likewise.
10417 * s390-linux-tdep.c (s390_gdbarch_init): Likewise.
10418 * score-tdep.c (score_print_insn): Remove.
10419 (score_gdbarch_init): Don't call set_gdbarch_print_insn.
10420 * sh-tdep.c (sh_gdbarch_init): Likewise.
10421 * sh64-tdep.c (sh64_gdbarch_init): Likewise.
10422 * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
10423 * tic6x-tdep.c (tic6x_print_insn): Remove.
10424 (tic6x_gdbarch_init): Don't call set_gdbarch_print_insn.
10425 * tilegx-tdep.c (tilegx_gdbarch_init): Likewise.
10426 * v850-tdep.c (v850_gdbarch_init): Likewise.
10427 * vax-tdep.c (vax_gdbarch_init): Likewise.
10428 * xstormy16-tdep.c (xstormy16_gdbarch_init): Likewise.
10429 * xtensa-tdep.c (xtensa_gdbarch_init): Likewise.
10431 2017-05-23 John Baldwin <jhb@FreeBSD.org>
10433 * mips-fbsd-tdep.c (MIPS_PC_REGNUM): Remove.
10434 (MIPS_FP0_REGNUM): Remove.
10435 (MIPS_FSR_REGNUM): Remove.
10436 (mips_fbsd_supply_fpregs): Use mips_regnum.
10437 (mips_fbsd_supply_gregs): Likewise.
10438 (mips_fbsd_collect_fpregs): Likewise.
10439 (mips_fbsd_collect_gregs): Likewise.
10441 2017-05-23 John Baldwin <jhb@FreeBSD.org>
10443 * mips-fbsd-nat.c (getregs_supplies): Fix upper bound comparison.
10444 (getpfpregs_supplies): New function.
10445 (mips_fbsd_fetch_inferior_registers): Remove early exit and use
10446 getfpregs_supplies.
10447 (mips_fbsd_store_inferior_registers): Likewise.
10449 2017-05-22 Pedro Alves <palves@redhat.com>
10451 * MAINTAINERS (Host/Native): Add John Baldwin as FreeBSD
10454 2017-05-22 Alan Hayward <alan.hayward@arm.com>
10456 * ppc-linux-nat.c (fetch_register): Use PPC_MAX_REGISTER_SIZE.
10457 (store_register): Likewise.
10458 * ppc-sysv-tdep.c (ppc_sysv_abi_push_dummy_call): Likewise.
10459 (get_decimal_float_return_value): Likewise.
10460 (do_ppc_sysv_return_value): Likewise.
10461 (ppc64_sysv_abi_push_integer): Likewise.
10462 (ppc64_sysv_abi_push_freg): Likewise.
10463 (ppc64_sysv_abi_return_value_base): Likewise.
10464 (ppc64_sysv_abi_return_value): Likewise.
10465 * rs6000-aix-tdep.c (rs6000_push_dummy_call): Likewise.
10466 * rs6000-lynx178-tdep.c (rs6000_lynx178_push_dummy_call): Likewise.
10467 * rs6000-nat.c: Likewise.
10468 * rs6000-tdep.c (rs6000_register_to_value): Likewise.
10469 (rs6000_value_to_register): Likewise.
10470 * ppc-tdep.h (PPC_MAX_REGISTER_SIZE): Add.
10472 2017-05-21 Tom Tromey <tom@tromey.com>
10475 * rust-lang.c (rust_print_type) <TYPE_CODE_ARRAY>: Print unsized
10476 arrays as "[T]", not "[T; ]".
10478 2017-05-19 Tom Tromey <tom@tromey.com>
10481 * rust-lang.c (exp_descriptor_rust): New function.
10482 (rust_language_defn): Use it.
10483 * p-lang.c (pascal_language_defn): Update.
10484 * opencl-lang.c (opencl_language_defn): Update.
10485 * objc-lang.c (objc_language_defn): Update.
10486 * m2-lang.c (m2_language_defn): Update.
10487 * language.h (struct language_defn)
10488 <la_watch_location_expression>: New member.
10489 * language.c (unknown_language_defn, auto_language_defn)
10490 (local_language_defn): Update.
10491 * go-lang.c (go_language_defn): Update.
10492 * f-lang.c (f_language_defn): Update.
10493 * d-lang.c (d_language_defn): Update.
10494 * c-lang.h (c_watch_location_expression): Declare.
10495 * c-lang.c (c_watch_location_expression): New function.
10496 (c_language_defn, cplus_language_defn, asm_language_defn)
10497 (minimal_language_defn): Use it.
10498 * breakpoint.c (watch_command_1): Call
10499 la_watch_location_expression.
10500 * ada-lang.c (ada_language_defn): Update.
10502 2017-05-19 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
10505 * gdb_curses.h (NOMACROS): Define.
10506 (NCURSES_NOMACROS): Define.
10508 2017-05-19 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
10511 * tui/tui-windata.c (tui_erase_data_content): Cast last mvwaddstr
10513 * tui/tui-wingeneral.c (box_win): Likewise.
10514 * tui/tui-winsource.c (tui_erase_source_content): Likewise.
10515 (tui_show_source_line): Likewise.
10516 (tui_show_exec_info_content): Likewise.
10518 2017-05-19 Vladimir Mezentsev <vladimir.mezentsev@oracle.com>
10520 * sparc-tdep.c (sparc_structure_return_p)
10521 (sparc_arg_on_registers_p): New functions.
10522 (sparc32_store_arguments): Use them.
10523 * sparc64-tdep.c (sparc64_16_byte_align_p)
10524 (sparc64_store_floating_fields, sparc64_extract_floating_fields):
10525 Handle TYPE_CODE_ARRAY.
10527 2017-05-17 Yao Qi <yao.qi@linaro.org>
10529 * cli/cli-decode.c (add_alias_cmd): New function.
10530 * command.h (add_alias_cmd): Declare.
10531 * infcmd.c (_initialize_infcmd): Don't call add_com_alias,
10532 instead call add_alias_cmd.
10534 2017-05-17 Pedro Alves <palves@redhat.com>
10536 * Makefile.in (nat_extra_makefile_frag): Rename to ...
10537 (nat_makefile_frag): ... this. All references updated.
10538 * configure.ac: Likewise.
10539 * configure.nat: Likewise. Enhance comments.
10540 * configure: Regenerate.
10542 2017-05-15 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
10544 * procfs.c (procfs_create_inferior): Change prototype to match
10547 2017-05-13 Eli Zaretskii <eliz@gnu.org>
10549 * tui/tui.c (tui_enable): Cast "unknown" to 'char *' to avoid a
10550 C++ compiler warning.
10552 2017-05-12 Tom Tromey <tom@tromey.com>
10555 * rust-lang.c (rust_evaluate_subexp) <STRUCTOP_STRUCT>: Don't
10556 recurse, just call value_struct_elt directly.
10558 2017-05-12 Tom Tromey <tom@tromey.com>
10560 * rust-lang.c (rust_dump_subexp_body) <STRUCTOP_ANONYMOUS,
10561 OP_RUST_ARRAY>: Fix.
10563 2017-05-12 Tom Tromey <tom@tromey.com>
10565 * rust-lang.c (rust_print_subexp): Replace "return" with "break".
10567 2017-05-09 Yao Qi <yao.qi@linaro.org>
10569 * regcache.c: Include <forward_list>.
10570 (struct regcache_list): Remove.
10571 (current_regcache): Update.
10572 (get_thread_arch_aspace_regcache): Update for std::forward_list.
10573 (regcache_thread_ptid_changed): Likewise.
10574 (registers_changed_ptid): Likewise.
10575 (current_regcache_size): Likewise.
10577 2017-05-09 Yao Qi <yao.qi@linaro.org>
10579 * regcache.c [GDB_SELF_TEST]: Include selftest.h.
10580 (current_regcache_size): New function.
10581 (current_regcache_test): New function.
10582 (_initialize_regcache) [GDB_SELF_TEST]: Register the unit test.
10584 2017-05-08 Alan Hayward <alan.hayward@arm.com>
10586 * mips-tdep.c (mips_o32_return_value): Remove unused buffer.
10587 (print_gp_register_row): Use get_frame_register_value.
10589 2017-05-08 Alan Hayward <alan.hayward@arm.com>
10591 * mips-linux-tdep.c (mips_supply_gregset): Use raw_supply_zeroed.
10592 (mips_supply_fpregset): Likewise.
10593 (mips64_supply_gregset): Likewise.
10595 2017-05-08 Alan Hayward <alan.hayward@arm.com>
10597 * mn10300-linux-tdep.c (am33_supply_gregset_method): Use
10598 regcache->raw_supply_zeroed.
10600 2017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
10602 * configure.nat: Rearrange 'case' statements to match
10605 2017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
10607 * Makefile.in: Remove "@host_makefile_frag@". Add variables
10608 NAT_FILE, NATDEPFILES, NAT_CDEPS, LOADLIBES, MH_CFLAGS, XM_CLIBS,
10609 NAT_GENERATED_FILES, HAVE_NATIVE_GCORE_HOST. Add
10610 "@nat_extra_makefile_frag@".
10611 (Makefile): Remove dependency on "@frags@".
10612 ($(GNULIB_BUILDDIR)/Makefile): Likewise.
10613 (data-directory/Makefile): Likewise.
10614 * config/aarch64/linux.mh: Deleted; moved contents to
10615 "gdb/configure.nat".
10616 * config/alpha/alpha-linux.mh: Likewise.
10617 * config/alpha/nbsd.mh: Likewise.
10618 * config/arm/linux.mh: Likewise.
10619 * config/arm/nbsdelf.mh: Likewise.
10620 * config/i386/cygwin.mh: Likewise.
10621 * config/i386/cygwin64.mh: Likewise.
10622 * config/i386/darwin.mh: Likewise.
10623 * config/i386/fbsd.mh: Likewise.
10624 * config/i386/fbsd64.mh: Likewise.
10625 * config/i386/go32.mh: Likewise.
10626 * config/i386/i386gnu.mh: Likewise.
10627 * config/i386/i386sol2.mh: Likewise.
10628 * config/i386/linux.mh: Likewise.
10629 * config/i386/linux64.mh: Likewise.
10630 * config/i386/mingw.mh: Likewise.
10631 * config/i386/mingw64.mh: Likewise.
10632 * config/i386/nbsd64.mh: Likewise.
10633 * config/i386/nbsdelf.mh: Likewise.
10634 * config/i386/nto.mh: Likewise.
10635 * config/i386/obsd.mh: Likewise.
10636 * config/i386/obsd64.mh: Likewise.
10637 * config/i386/sol2-64.mh: Likewise.
10638 * config/ia64/linux.mh: Likewise.
10639 * config/m32r/linux.mh: Likewise.
10640 * config/m68k/linux.mh: Likewise.
10641 * config/m68k/nbsdelf.mh: Likewise.
10642 * config/m68k/obsd.mh: Likewise.
10643 * config/m88k/obsd.mh: Likewise.
10644 * config/mips/fbsd.mh: Likewise.
10645 * config/mips/linux.mh: Likewise.
10646 * config/mips/nbsd.mh: Likewise.
10647 * config/mips/obsd64.mh: Likewise.
10648 * config/pa/linux.mh: Likewise.
10649 * config/pa/nbsd.mh: Likewise.
10650 * config/pa/obsd.mh: Likewise.
10651 * config/powerpc/aix.mh: Likewise.
10652 * config/powerpc/fbsd.mh: Likewise.
10653 * config/powerpc/linux.mh: Likewise.
10654 * config/powerpc/nbsd.mh: Likewise.
10655 * config/powerpc/obsd.mh: Likewise.
10656 * config/powerpc/ppc64-linux.mh: Likewise.
10657 * config/powerpc/spu-linux.mh: Likewise.
10658 * config/s390/linux.mh: Likewise.
10659 * config/sh/nbsd.mh: Likewise.
10660 * config/sparc/fbsd.mh: Likewise.
10661 * config/sparc/linux.mh: Likewise.
10662 * config/sparc/linux64.mh: Likewise.
10663 * config/sparc/nbsd64.mh: Likewise.
10664 * config/sparc/nbsdelf.mh: Likewise.
10665 * config/sparc/obsd64.mh: Likewise.
10666 * config/sparc/sol2.mh: Likewise.
10667 * config/tilegx/linux.mh: Likewise.
10668 * config/vax/nbsdelf.mh: Likewise.
10669 * config/vax/obsd.mh: Likewise.
10670 * config/xtensa/linux.mh: Likewise.
10671 * config/i386/i386gnu.mn: New file, with excerpts from
10672 "config/i386/i386gnu.mh".
10673 * configure: Regenerate.
10674 * configure.ac: Rewrite code to use "gdb/configure.nat" instead of
10675 *.mh files under "gdb/config".
10676 * configure.nat: New file, with contents from the
10677 "gdb/config/*/*.mh" files.
10679 2017-05-05 Tim Wiederhake <tim.wiederhake@intel.com>
10681 * btrace.c (btrace_clear): Free insn vector.
10683 2017-05-05 Pedro Alves <palves@redhat.com>
10685 * warning.m4 (build_warnings): Add -Wno-error=maybe-uninitialized.
10686 * configure: Regenerate.
10688 2017-05-04 Pedro Alves <palves@redhat.com>
10690 * Makefile.in (SFILES): Add progspace-and-thread.c.
10691 (HFILES_NO_SRCDIR): Add progspace-and-thread.h.
10692 (COMMON_OBS): Add progspace-and-thread.o.
10693 * breakpoint.c: Include "progspace-and-thread.h".
10694 (update_inserted_breakpoint_locations)
10695 (insert_breakpoint_locations, create_longjmp_master_breakpoint):
10696 Use scoped_restore_current_pspace_and_thread.
10697 (create_std_terminate_master_breakpoint): Use
10698 scoped_restore_current_program_space.
10699 (remove_breakpoint): Use scoped_restore_current_pspace_and_thread.
10700 (print_breakpoint_location): Use
10701 scoped_restore_current_program_space.
10702 (bp_loc_is_permanent): Use
10703 scoped_restore_current_pspace_and_thread.
10704 (resolve_sal_pc): Use scoped_restore_current_pspace_and_thread.
10705 (download_tracepoint_locations): Use
10706 scoped_restore_current_pspace_and_thread.
10707 (breakpoint_re_set): Use scoped_restore_current_pspace_and_thread.
10708 * exec.c (exec_close_1): Use scoped_restore_current_program_space.
10709 (enum step_over_calls_kind): Moved from inferior.h.
10710 (class scoped_restore_current_thread): New class.
10711 * gdbthread.h (make_cleanup_restore_current_thread): Delete
10713 (scoped_restore_current_thread): New class.
10714 * infcmd.c: Include "common/gdb_optional.h".
10715 (continue_1, proceed_after_attach): Use
10716 scoped_restore_current_thread.
10717 (notice_new_inferior): Use scoped_restore_current_thread.
10718 * inferior.c: Include "progspace-and-thread.h".
10719 (restore_inferior, save_current_inferior): Delete.
10720 (add_inferior_command, clone_inferior_command): Use
10721 scoped_restore_current_pspace_and_thread.
10722 * inferior.h (scoped_restore_current_inferior): New class.
10723 * infrun.c: Include "progspace-and-thread.h" and
10724 "common/gdb_optional.h".
10725 (follow_fork_inferior): Use
10726 scoped_restore_current_pspace_and_thread.
10727 (scoped_restore_exited_inferior): New class.
10728 (handle_vfork_child_exec_or_exit): Use
10729 scoped_restore_exited_inferior,
10730 scoped_restore_current_pspace_and_thread,
10731 scoped_restore_current_thread and scoped_restore.
10732 (fetch_inferior_event): Use scoped_restore_current_thread.
10733 * linespec.c (decode_line_full, decode_line_1): Use
10734 scoped_restore_current_program_space.
10735 * mi/mi-main.c: Include "progspace-and-thread.h".
10736 (exec_continue): Use scoped_restore_current_thread.
10737 (mi_cmd_exec_run): Use scoped_restore_current_pspace_and_thread.
10738 (mi_cmd_trace_frame_collected): Use scoped_restore_current_thread.
10739 * proc-service.c (ps_pglobal_lookup): Use
10740 scoped_restore_current_program_space.
10741 * progspace-and-thread.c: New file.
10742 * progspace-and-thread.h: New file.
10743 * progspace.c (release_program_space, clone_program_space): Use
10744 scoped_restore_current_program_space.
10745 (restore_program_space, save_current_program_space)
10746 (save_current_space_and_thread): Delete.
10747 (switch_to_program_space_and_thread): Moved to
10748 progspace-and-thread.c.
10749 * progspace.h (save_current_program_space)
10750 (save_current_space_and_thread): Delete declarations.
10751 (scoped_restore_current_program_space): New class.
10752 * remote.c (remote_btrace_maybe_reopen): Use
10753 scoped_restore_current_thread.
10754 * symtab.c: Include "progspace-and-thread.h".
10755 (skip_prologue_sal): Use scoped_restore_current_pspace_and_thread.
10756 * thread.c (print_thread_info_1): Use
10757 scoped_restore_current_thread.
10758 (struct current_thread_cleanup): Delete.
10759 (do_restore_current_thread_cleanup)
10760 (restore_current_thread_cleanup_dtor): Rename/convert both to ...
10761 (scoped_restore_current_thread::~scoped_restore_current_thread):
10763 (make_cleanup_restore_current_thread): Rename/convert to ...
10764 (scoped_restore_current_thread::scoped_restore_current_thread):
10766 (thread_apply_all_command): Use scoped_restore_current_thread.
10767 (thread_apply_command): Use scoped_restore_current_thread.
10768 * tracepoint.c (tdump_command): Use scoped_restore_current_thread.
10769 * varobj.c (value_of_root_1): Use scoped_restore_current_thread.
10771 2017-05-04 Pedro Alves <palves@redhat.com>
10773 * thread.c (make_cleanup_restore_current_thread): Move
10774 find_thread_ptid call before the is_stopped call. Assert that the
10775 thread is found. Replace is_stopped call by checking the thread's
10776 state directly. Remove unnecessary NULL-thread check.
10778 2017-05-04 Pedro Alves <palves@redhat.com>
10780 * corelow.c (thread_section_name): New class.
10781 (get_core_register_section, get_core_siginfo): Use it.
10783 2017-05-04 Andreas Arnez <arnez@linux.vnet.ibm.com>
10785 * corelow.c (sniff_core_bfd): Remove extra semicolon.
10786 (get_core_register_section): Remove xfree of NULL pointer.
10788 2017-05-03 Alan Hayward <alan.hayward@arm.com>
10790 * frv-linux-tdep.c (frv_linux_supply_gregset): Use raw_supply_zeroed.
10791 * regcache.c (regcache::raw_supply_zeroed): New function.
10792 * regcache.h (regcache::raw_supply_zeroed): New declaration.
10794 2017-05-03 Simon Marchi <simon.marchi@ericsson.com>
10796 * gdbarch.sh: Remove commented out definition of
10798 * gdbarch.h: Re-generate.
10800 2017-05-03 Sergio Durigan Junior <sergiodj@redhat.com>
10802 * configure: Regenerate.
10804 2017-05-02 Simon Marchi <simon.marchi@ericsson.com>
10806 * solib-target.c (solib_target_relocate_section_addresses):
10807 Remove num_section_bases, num_bases, segment_bases variables.
10809 2017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
10811 * common/gdb_vecs.h (DEF_VEC_I (CORE_ADDR)): Remove.
10813 2017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
10815 * solib-target.c: Include <vector>
10816 (struct lm_info_target) <~lm_info_target>: Remove.
10817 <segment_bases, section_bases>: Change type to
10818 std::vector<CORE_ADDR>.
10819 (library_list_start_segment, library_list_start_section,
10820 library_list_end_library,
10821 solib_target_relocate_section_addresses): Adjust.
10823 2017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
10825 * gdbarch.sh (software_single_step): Change return type to
10826 std::vector<CORE_ADDR>.
10827 * gdbarch.c, gdbarch.h: Re-generate.
10828 * arch/arm-get-next-pcs.c (thumb_deal_with_atomic_sequence_raw):
10830 (arm_deal_with_atomic_sequence_raw): Adjust.
10831 (thumb_get_next_pcs_raw): Adjust.
10832 (arm_get_next_pcs_raw): Adjust.
10833 (arm_get_next_pcs): Adjust.
10834 * arch/arm-get-next-pcs.h (arm_get_next_pcs): Adjust.
10835 * aarch64-tdep.c (aarch64_software_single_step): Adjust.
10836 * alpha-tdep.c (alpha_deal_with_atomic_sequence): Adjust.
10837 (alpha_software_single_step): Adjust.
10838 * alpha-tdep.h (alpha_software_single_step): Adjust.
10839 * arm-linux-tdep.c (arm_linux_software_single_step): Adjust.
10840 * arm-tdep.c (arm_software_single_step): Adjust.
10841 (arm_breakpoint_kind_from_current_state): Adjust.
10842 * arm-tdep.h (arm_software_single_step): Adjust.
10843 * breakpoint.c (insert_single_step_breakpoint): Adjust.
10844 * cris-tdep.c (cris_software_single_step): Adjust.
10845 * mips-tdep.c (mips_deal_with_atomic_sequence): Adjust.
10846 (micromips_deal_with_atomic_sequence): Adjust.
10847 (deal_with_atomic_sequence): Adjust.
10848 (mips_software_single_step): Adjust.
10849 * mips-tdep.h (mips_software_single_step): Adjust.
10850 * moxie-tdep.c (moxie_software_single_step): Adjust.
10851 * nios2-tdep.c (nios2_software_single_step): Adjust.
10852 * ppc-tdep.h (ppc_deal_with_atomic_sequence): Adjust.
10853 * rs6000-aix-tdep.c (rs6000_software_single_step): Adjust.
10854 * rs6000-tdep.c (ppc_deal_with_atomic_sequence): Adjust.
10855 * s390-linux-tdep.c (s390_software_single_step): Adjust.
10856 * sparc-tdep.c (sparc_software_single_step): Adjust.
10857 * spu-tdep.c (spu_software_single_step): Adjust.
10858 * tic6x-tdep.c (tic6x_software_single_step): Adjust.
10860 2017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
10862 * gdbarch.sh: Use semi-colon as field separator instead of colon.
10863 * gdbarch.h: Re-generate.
10865 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
10867 * Makefile.in (SUBDIR_PYTHON_OBS): Add py-instruction.o.
10868 (SUBDIR_PYTHON_SRCS): Add py-instruction.c.
10869 * python/py-instruction.c, python/py-instruction.h: New file.
10870 * python/py-record.c: Add py-instruction.h include.
10871 (gdbpy_initialize_record): Make gdb.Instruction a super class of
10872 gdb.RecordInstruction.
10873 * python/python-internal.h: Add gdbpy_initialize_instruction
10875 * python/python.c (do_start_initialization): Add
10876 gdbpy_initialize_instruction.
10878 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
10880 * python/py-record-btrace.c (BTPY_REQUIRE_VALID_CALL, btpy_call_type):
10882 (btrace_func_from_recpy_func): New function.
10883 (btpy_call_new, btpy_number, btpy_hash, btpy_richcompare): Remove.
10884 (btpy_call_level, btpy_call_symbol, btpy_call_instructions,
10885 btpy_call_up, btpy_call_prev_sibling, btpy_call_next_sibling): Rename to ...
10886 (recpy_bt_func_level, recpy_bt_func_symbol, recpy_bt_func_instructions,
10887 recpy_bt_func_up, recpy_bt_func_prev, recpy_bt_func_next): This.
10888 Also, use new helper functions.
10889 (btpy_list_item): Use new helper functions.
10890 (recpy_bt_function_call_history): Use new type name.
10891 (btpy_call_getset): Remove.
10892 (gdbpy_initialize_btrace): Remove code to initialize
10893 gdb.BtraceFunctionCall.
10894 * python/py-record-btrace.h (recpy_bt_func_number, recpy_btb_func_level,
10895 recpy_btb_func_symbol, recpy_bt_func_instructions, recpy_bt_func_up,
10896 recpy_bt_func_prev, recpy_bt_func_next): New export.
10897 * python/py-record.c (recpy_func_type): New static object.
10898 (recpy_func_new, recpy_func_level, recpy_func_symbol,
10899 recpy_func_instructions, recpy_func_up, recpy_func_prev,
10900 recpy_func_next): New function.
10901 (recpy_element_hash, recpy_element_richcompare): Updated comment.
10902 (recpy_func_getset): New static object.
10903 (gdbpy_initialize_record): Add code to initialize gdb.RecordInstruction.
10904 * python/py-record.h (recpy_func_type, recpy_func_new): New export.
10906 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
10908 * python/py-record-btrace.c (BTPY_REQUIRE_VALID_INSN): Remove.
10909 (btpy_object, btpy_insn_type, btpy_new): Remove.
10910 (btpy_list_object): Use gdb.RecordInstruction type instead of
10911 gdb.BtraceInstruction type.
10912 (btrace_insn_from_recpy_insn): New function.
10913 (btpy_insn_or_gap_new): Adjust comment. Use recpy_insn_new instead of
10915 (btpy_call_new, btpy_list_item): Do not use btpy_new anymore.
10916 (btpy_number, btpy_hash, btpy_call_level, btpy_call_symbol,
10917 btpy_call_instructions, btpy_call_up, btpy_call_prev_sibling,
10918 btpy_call_next_sibling, btpy_richcompare): Use recpy_element_object
10919 instead of btpy_object.
10920 (btpy_insn_sal, btpy_insn_pc, btpy_insn_size, btpy_insn_is_speculative,
10921 btpy_insn_data, btpy_insn_decode): Rename to ...
10922 (recpy_bt_insn_sal, recpy_bt_insn_pc, recpy_bt_insn_size,
10923 recpy_bt_insn_is_speculative, recpy_bt_insn_data,
10924 recpy_bt_insn_decode): This. Also, use new helper functions.
10925 (btpy_list_position, recpy_bt_goto): Use recpy_element_object and
10927 (btpy_insn_getset): Remove.
10928 (gdbpy_initialize_btrace): Remove code to initialize
10929 gdb.BtraceInstruction. Use recpy_element_object.
10930 * python/py-record-btrace.h (recpy_bt_insn_number, recpy_bt_insn_sal,
10931 recpy_bt_insn_pc, recpy_bt_insn_data, recpy_bt_insn_decoded,
10932 recpy_bt_insn_size, recpy_bt_insn_is_speculative): New export.
10933 * python/py-record.c (recpy_insn_type): New static object.
10934 (recpy_insn_new, recpy_insn_sal, recpy_insn_pc, recpy_insn_data,
10935 recpy_insn_decoded, recpy_insn_size, recpy_insn_is_speculative,
10936 recpy_element_number, recpy_element_hash, recpy_element_richcompare):
10938 (recpy_insn_getset): New static object.
10939 (gdbpy_initialize_record): Initialize gdb.RecordInstruction.
10940 * python/py-record.h (recpy_element_object): New typedef.
10941 (recpy_insn_type, recpy_insn_new): New export.
10943 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
10945 * py-record-btrace.c (btpy_insn_new): Removed.
10946 (btpy_insn_or_gap_new): New function.
10947 (btpy_insn_error): Removed.
10948 (btpy_insn_sal, btpy_insn_pc, btpy_insn_size, btpy_insn_is_speculative,
10949 btpy_insn_data, btpy_insn_decode): Remove code path for gaps.
10950 (recpy_bt_replay_position, recpy_bt_begin, recpy_bt_end): Call
10951 btpy_insn_or_gap_new instead of btpy_insn_new.
10952 (btpy_insn_getset): Remove btpy_insn_error.
10953 * py-record.c (recpy_gap_type): New static object.
10954 (recpy_gap_object): New typedef.
10955 (recpy_gap_new, recpy_gap_number, recpy_gap_reason_code,
10956 recpy_gap_reason_string): New function.
10957 (recpy_gap_getset): New static object.
10958 (gdbpy_initialize_record): Initialize gdb.RecordGap type.
10959 * py-record.h (recpy_gap_new): New export.
10961 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
10963 * python/py-record.c (recpy_ptid): Remove.
10964 (recpy_record_getset): Remove recpy_ptid.
10966 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
10968 * btrace.c (btrace_fetch): Set inferior_ptid.
10969 * python/py-record-btrace.c: Add "py-record.h" include.
10970 (recpy_bt_format, recpy_bt_replay_position, recpy_bt_begin,
10971 recpy_bt_end, recpy_bt_instruction_history,
10972 recpy_bt_function_call_history, recpy_bt_goto): Use ptid stored
10973 in gdb.Record object instead of current ptid.
10974 * python/py-record.c: Include new "py-record.h" file.
10975 (recpy_record_object): Moved to py-record.h.
10976 * python/py-record.h: New file.
10978 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
10980 * python/py-record-btrace.c (BTPY_REQUIRE_VALID_INSN,
10981 BTPY_REQUIRE_VALID_CALL, recpy_bt_function_call_history): Fix
10984 2017-05-01 Joel Brobecker <brobecker@adacore.com>
10986 * MAINTAINERS: Move Daniel Jacobowitz and Mark Kettenis to
10987 the past maintainers section.
10989 2017-04-28 Yao Qi <yao.qi@linaro.org>
10991 * infcmd.c (get_return_value): Use regcache ctor, and remove
10994 2017-04-28 Yao Qi <yao.qi@linaro.org>
10995 Pedro Alves <palves@redhat.com>
10997 * regcache.c (regcache::regcache): New tag dispatch ctor.
10998 (do_cooked_read): Moved above.
10999 (regcache_dup): Use the tag dispatch ctor..
11000 * regcache.h (regcache): Declare ctor, delete copy ctor and
11001 assignment operator, remove friend regcache_dup.
11003 2017-04-28 Yao Qi <yao.qi@linaro.org>
11005 * regcache.c (regcache_dup): Assert !src->m_readonly_p and
11006 call method save instead of regcache_cpy.
11007 * regcache.h (struct regcache): Make regcache_dup a friend.
11009 2017-04-28 Yao Qi <yao.qi@linaro.org>
11011 * regcache.c (struct regcache): Move to regcache.h
11012 (regcache::arch): New method.
11013 (regcache_get_ptid): Update.
11014 (get_regcache_arch): Call arch method.
11015 (get_regcache_aspace): Call method aspace.
11016 (register_buffer): Change it to method.
11017 (regcache_save): Change it to regcache::save.
11018 (regcache_restore): Likewise.
11019 (regcache_cpy_no_passthrough): Remove the declaration.
11020 (regcache_cpy): Call methods restore and cpy_no_passthrough.
11021 (regcache_cpy_no_passthrough): Change it to method
11022 cpy_no_passthrough.
11023 (regcache_register_status): Change it to method
11024 get_register_status.
11025 (regcache_invalidate): Change it to method invalidate.
11026 (regcache_thread_ptid_changed): Use methods ptid and set_ptid.
11027 (regcache_raw_update): Change it to method raw_update.
11028 (regcache_raw_read): Likewise.
11029 (regcache_raw_read_signed): Likewise.
11030 (regcache_raw_read_unsigned): Likewise.
11031 (regcache_raw_write_signed): Likewise.
11032 (regcache_raw_write_unsigned): Likewise.
11033 (regcache_cooked_read): Likewise.
11034 (regcache_cooked_read_value): Likewise.
11035 (regcache_cooked_read_signed): Likewise.
11036 (regcache_cooked_read_unsigned): Likewise.
11037 (regcache_cooked_write_signed): Likewise.
11038 (regcache_cooked_write_unsigned): Likewise.
11039 (regcache_raw_set_cached_value): Likewise.
11040 (regcache_raw_write): Likewise.
11041 (regcache_cooked_write): Likewise.
11042 (regcache_xfer_part): Likewise.
11043 (regcache_raw_read_part): Likewise.
11044 (regcache_raw_write_part): Likewise.
11045 (regcache_cooked_read_part): Likewise.
11046 (regcache_cooked_write_part): Likewise.
11047 (regcache_raw_supply): Likewise.
11048 (regcache_raw_collect): Likewise.
11049 (regcache_transfer_regset): Likewise.
11050 (regcache_supply_regset): Likewise.
11051 (regcache_collect_regset): Likewise.
11052 (regcache_debug_print_register): Likewise.
11053 (enum regcache_dump_what): Move it to regcache.h.
11054 (regcache_dump): Change it to method dump.
11055 * regcache.h (enum regcache_dump_what): New.
11056 (class regcache): New.
11057 * target.c (target_fetch_registers): Call method
11058 debug_print_register.
11059 (target_store_registers): Likewise.
11061 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
11063 * windows-nat.c (struct lm_info_windows): Initialize field.
11064 (windows_make_so): Allocate lm_info_windows with new.
11065 (windows_free_so): Free lm_info_windows with delete.
11067 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
11069 * solib-darwin.c (struct lm_info_darwin): Initialize field.
11070 (darwin_current_sos): Allocate lm_info_darwin with new, remove
11072 (darwin_free_so): Free lm_info_darwin with delete.
11074 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
11076 * solib-svr4.h (struct lm_info_svr4): Initialize fields.
11077 <l_addr_p>: Change type to bool.
11078 * solib-svr4.c (lm_info_read): Allocate lm_info_svr4 with new.
11079 (svr4_free_so): Free lm_info_svr4 with delete.
11080 (svr4_copy_library_list): Replace memcpy with call to copy
11082 (library_list_start_library, svr4_default_sos): Allocate
11083 lm_info_svr4 with new.
11085 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
11087 * solib-target.c (struct lm_info_target): Add destructor,
11089 <name>: Change type to std::string.
11090 (library_list_start_library): Allocate lm_info_target with new.
11091 (solib_target_free_library_list): Free lm_info_target with
11093 (solib_target_current_sos): Adapt to std::string.
11094 (solib_target_free_so): Free lm_info_target with delete.
11096 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
11098 * solib-frv.c (struct lm_info_frv): Add destructor, initialize
11100 (frv_current_sos): Allocate lm_info_frv with new.
11101 (frv_relocate_main_executable): Free lm_info_frv with delete,
11103 (frv_clear_solib, frv_free_so): Free lm_info_frv with delete.
11105 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
11107 * solib-frv.c (struct lm_info_frv): Fix indentation.
11109 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
11111 * solib-dsbt.c (struct lm_info_dsbt): Add destructor, initialize
11113 (dsbt_current_sos): Allocate lm_info_dsbt with new.
11114 (dsbt_relocate_main_executable): Free lm_info_dsbt with delete
11115 and allocate with new.
11116 (dsbt_clear_solib, dsbt_free_so): Free lm_info_dsbt with delete.
11118 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
11120 * solib-aix.c (struct lm_info_aix): Initialize fields in-class.
11121 <filename, member_name>: Change type to std::string.
11122 (solib_aix_new_lm_info, solib_aix_xfree_lm_info): Remove.
11123 (library_list_start_library): Allocate lm_info_aix with new.
11124 (solib_aix_free_library_list, solib_aix_free_so): Free with delete.
11125 (solib_aix_current_sos): Adapt to std::string, copy lm_info_aix
11126 with copy constructor.
11128 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
11130 * solist.h (struct lm_info): Remove.
11131 (struct lm_info_base): New class.
11132 (struct so_list) <lm_info>: Change type to lm_info_base *.
11133 * nto-tdep.c (struct lm_info): Remove.
11135 * solib-aix.c (struct lm_info): Rename to ...
11136 (struct lm_info_aix): ... this. Extend lm_info_base.
11137 (lm_info_p): Rename to ...
11138 (lm_info_aix_p): ... this, and adjust.
11139 (solib_aix_new_lm_info, solib_aix_xfree_lm_info,
11140 solib_aix_parse_libraries, library_list_start_library,
11141 solib_aix_free_library_list, solib_aix_parse_libraries,
11142 solib_aix_get_library_list,
11143 solib_aix_relocate_section_addresses, solib_aix_free_so,
11144 solib_aix_get_section_offsets,
11145 solib_aix_solib_create_inferior_hook, solib_aix_current_sos):
11147 (struct solib_aix_inferior_data) <library_list>: Adjust.
11148 * solib-darwin.c (struct lm_info): Rename to ...
11149 (struct lm_info_darwin): ... this. Extend lm_info_base.
11150 (darwin_current_sos, darwin_relocate_section_addresses): Adjust.
11151 * solib-dsbt.c (struct lm_info): Rename to ...
11152 (struct lm_info_dsbt): ... this. Extend lm_info_base.
11153 (struct dsbt_info) <main_executable_lm_info): Adjust.
11154 (dsbt_current_sos, dsbt_relocate_main_executable, dsbt_free_so,
11155 dsbt_relocate_section_addresses): Adjust.
11156 * solib-frv.c (struct lm_info): Rename to ...
11157 (struct lm_info_frv): ... this. Extend lm_info_base.
11158 (main_executable_lm_info): Adjust.
11159 (frv_current_sos, frv_relocate_main_executable, frv_free_so,
11160 frv_relocate_section_addresses, frv_fdpic_find_global_pointer,
11161 find_canonical_descriptor_in_load_object,
11162 frv_fdpic_find_canonical_descriptor): Adjust.
11163 * solib-svr4.c (struct lm_info): Move to solib-svr4.h, renamed
11165 (lm_info_read, lm_addr_check, svr4_keep_data_in_core,
11166 svr4_clear_so, svr4_copy_library_list,
11167 library_list_start_library, svr4_default_sos, svr4_read_so_list,
11168 svr4_current_sos, svr4_fetch_objfile_link_map,
11169 solist_update_incremental): Adjust.
11170 * solib-svr4.h (struct lm_info_svr4): Move here from
11172 * solib-target.c (struct lm_info): Rename to ...
11173 (struct lm_info_target): ... this. Extend lm_info_base.
11174 (lm_info_p): Rename to ...
11175 (lm_info_target_p): ... this.
11176 (solib_target_parse_libraries, library_list_start_segment,
11177 library_list_start_section, library_list_start_library,
11178 library_list_end_library, solib_target_free_library_list,
11179 solib_target_current_sos, solib_target_free_so,
11180 solib_target_relocate_section_addresses): Adjust.
11181 * windows-nat.c (struct lm_info): Rename to ...
11182 (struct lm_info_windows): ... this. Extend lm_info_base.
11183 (windows_make_so, handle_load_dll, handle_unload_dll,
11184 windows_xfer_shared_libraries): Adjust.
11186 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
11188 * solib-darwin.c (struct darwin_so_list): Remove.
11189 (darwin_current_sos): Allocate an so_list object instead of a
11190 darwin_so_list, separately allocate an lm_info object.
11191 (darwin_free_so): Free lm_info.
11193 2017-04-28 John Baldwin <jhb@FreeBSD.org>
11195 * mips-tdep.c (print_gp_register_row): Replace printf_filtered
11196 with fprintf_filtered.
11198 2017-04-28 Yao Qi <yao.qi@linaro.org>
11200 * regcache.c (regcache::regcache): New function.
11201 (regcache::~regcache): New function.
11202 (regcache_xmalloc_1): Remove.
11203 (regcache_xmalloc): Call new regcache.
11204 (regcache_xfree): Call delete regcache.
11205 (get_thread_arch_aspace_regcache): Call new regcache.
11207 2017-04-28 Yao Qi <yao.qi@linaro.org>
11209 * mips-linux-nat.c (mips_linux_new_thread): Use ptid method
11210 lwp instead of ptid_get_lwp.
11212 2017-04-28 Yao Qi <yao.qi@linaro.org>
11214 * mips-linux-nat.c (mips_linux_new_thread): Get lwpid from
11215 lwp_info instead of getting from inferior_ptid.
11217 2017-04-27 Keith Seitz <keiths@redhat.com>
11219 * gdbtypes.c (LVALUE_REFERENCE_TO_RVALUE_BINDING_BADNESS)
11220 DIFFERENT_REFERENCE_TYPE_BADNESS): Remove.
11221 (CV_CONVERSION_BADNESS): Define.
11222 (rank_one_type): Remove overly restrictive rvalue reference
11224 Add cv-qualifier checks and subranks for type equality.
11225 * gdbtypes.h (REFERENCE_CONVERSION_RVALUE,
11226 REFERENCE_CONVERSION_CONST_LVALUE, CV_CONVERSION_BADNESS,
11227 CV_CONVERSION_CONST, CV_CONVERSION_VOLATILE): Declare.
11229 2017-04-27 Simon Marchi <simon.marchi@ericsson.com>
11231 * python/py-inferior.c (inferior_to_inferior_object): Increment reference
11232 count when creating the object.
11234 2017-04-27 Sangamesh Mallayya <sangamesh.swamy@in.ibm.com>
11235 Ulrich Weigand <uweigand@de.ibm.com>
11237 * xcoffread.c (read_xcoff_symtab): Read correct function auxiliary
11238 entry if xlc -qfuncsect or gcc -ffunction-sections compiler option
11240 (read_xcoff_symtab): Handle C_WEAKEXT storage class.
11241 (process_xcoff_symbol): Likewise.
11242 (scan_xcoff_symtab): Likewise.
11244 2017-04-26 Alan Hayward <alan.hayward@arm.com>
11246 * ia64-tdep.c (examine_prologue): Use get_frame_register_unsigned.
11247 (ia64_sigtramp_frame_prev_register): Use read_memory_unsigned_integer.
11248 (ia64_access_reg): Use get_frame_register_unsigned.
11249 (ia64_access_rse_reg): Likewise.
11250 (ia64_libunwind_frame_prev_register): Likewise.
11252 2017-04-26 Jiong Wang <jiong.wang@arm.com>
11254 * gdbarch.sh: New gdbarch method execute_dwarf_cfa_vendor_op.
11255 * gdbarch.c: Regenerated.
11256 * gdbarch.h: Regenerated.
11257 * dwarf2-frame.c (dwarf2_frame_state_alloc_regs): Made the
11258 visibility external.
11259 (execute_cfa_program): Call execute_dwarf_cfa_vendor_op for CFI
11260 between DW_CFA_lo_user and DW_CFA_high_user inclusive.
11261 (enum cfa_how_kind): Move to ...
11262 (struct dwarf2_frame_state_reg_info): Likewise.
11263 (struct dwarf2_frame_state): Likewise.
11264 * dwarf2-frame.h: ... here.
11265 (dwarf2_frame_state_alloc_regs): New declaration.
11266 * sparc-tdep.c (sparc_execute_dwarf_cfa_vendor_op): New function.
11267 (sparc32_gdbarch_init): Register execute_dwarf_cfa_vendor_op hook.
11269 2017-04-26 Alan Hayward <alan.hayward@arm.com>
11271 * xtensa-tdep.c (xtensa_pseudo_register_read): Use
11272 regcache_raw_read_unsigned.
11273 (xtensa_pseudo_register_write): Likewise.
11275 2017-04-26 Alan Hayward <alan.hayward@arm.com>
11277 * nds32-tdep.c (nds32_pseudo_register_read): Abort on errors.
11278 (nds32_pseudo_register_write): Likewise.
11280 2017-04-25 Yao Qi <yao.qi@linaro.org>
11282 * regcache.c (struct regcache) <readonly_p>: Change its type
11284 (regcache_xmalloc_1): Update parameter type and callers update.
11286 2017-04-25 Yao Qi <yao.qi@linaro.org>
11288 * aarch64-tdep.c (aarch64_gdbarch_init): Don't call
11289 set_gdbarch_wchar_bit.
11290 * arm-tdep.c (arm_gdbarch_init): Likewise.
11292 2017-04-25 Pedro Alves <palves@redhat.com>
11294 * common/poison.h [!HAVE_IS_TRIVIALLY_COPYABLE] (IsRelocatable)
11295 (BothAreRelocatable, memcopy, memmove): Don't define.
11296 * common/traits.h (__has_feature, HAVE_IS_TRIVIALLY_COPYABLE): New
11299 2017-04-25 Pedro Alves <palves@redhat.com>
11301 * common/common-defs.h: Include "common/poison.h".
11302 * common/function-view.h: (Not, Or, Requires): Move to traits.h
11304 * common/poison.h: New file.
11305 * common/traits.h: Include <type_traits>.
11306 (Not, Or, Requires): New, moved from common/function-view.h.
11308 2017-04-25 Pedro Alves <palves@redhat.com>
11310 * breakpoint.h (struct breakpoint): In-class initialize all
11311 fields. Make boolean fields "bool".
11312 * breakpoint.c (init_raw_breakpoint_without_location): Remove
11313 memset call and initializations no longer necessary.
11315 2017-04-25 Pedro Alves <palves@redhat.com>
11317 * btrace.c (pt_btrace_insn_flags): Change parameter type to
11319 (pt_btrace_insn): New function.
11320 (ftrace_add_pt): Remove memset call and use pt_btrace_insn.
11322 2017-04-25 Pedro Alves <palves@redhat.com>
11324 * ada-lang.c (ada_catchpoint_location): Now a "class". Remove
11325 "base" field and inherit from "bp_location" instead. Add
11327 (allocate_location_exception): Use new non-default ctor.
11328 * breakpoint.c (get_first_locp_gte_addr): Remove memset call.
11329 (init_bp_location): Convert to ...
11330 (bp_location::bp_location): ... this new ctor, and remove memset
11332 (base_breakpoint_allocate_location): Use the new non-default ctor.
11333 * breakpoint.h (bp_location): Now a class. Declare default and
11334 non-default ctors. In-class initialize all members.
11335 (init_bp_location): Remove declaration.
11337 2017-04-25 Pedro Alves <palves@redhat.com>
11339 * common/enum-flags.h (enum_flags): Don't implement copy ctor and
11340 assignment operator.
11342 2017-04-24 Yao Qi <yao.qi@linaro.org>
11344 * doublest.c (convert_doublest_to_floatformat): Call
11345 floatformat_totalsize_bytes.
11347 2017-04-22 Tom Tromey <tom@tromey.com>
11349 * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries): Use
11351 * stack.c (print_frame): Use ui_out_emit_list.
11352 * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Use
11354 * mi/mi-main.c (print_one_inferior)
11355 (mi_cmd_data_list_register_names)
11356 (mi_cmd_data_list_register_values, mi_cmd_list_features)
11357 (mi_cmd_list_target_features, mi_cmd_trace_frame_collected): Use
11359 * mi/mi-interp.c (mi_on_normal_stop_1): Use ui_out_emit_list.
11360 (mi_output_solib_attribs): Use ui_out_emit_list,
11362 * mi/mi-cmd-var.c (varobj_update_one): Use ui_out_emit_list.
11363 * mi/mi-cmd-stack.c (mi_cmd_stack_list_frames)
11364 (mi_cmd_stack_list_args, list_args_or_locals): Use
11366 * disasm.c (do_assembly_only): Use ui_out_emit_list.
11367 * breakpoint.c (print_solib_event, output_thread_groups): Use
11370 2017-04-22 Tom Tromey <tom@tromey.com>
11372 * mi/mi-main.c (print_variable_or_computed): Use ui_out_emit_tuple.
11373 * mi/mi-cmd-var.c (varobj_update_one): Use ui_out_emit_tuple.
11374 * mi/mi-cmd-stack.c (list_arg_or_local): Use ui_out_emit_tuple.
11376 2017-04-22 Tom Tromey <tom@tromey.com>
11378 * tracepoint.c (tvariables_info_1)
11379 (print_one_static_tracepoint_marker): Use ui_out_emit_tuple.
11381 2017-04-22 Tom Tromey <tom@tromey.com>
11383 * stack.c (print_frame_arg): Use ui_out_emit_tuple,
11384 annotate_arg_emitter.
11385 * breakpoint.c (print_mention_watchpoint)
11386 (print_mention_masked_watchpoint): Use ui_out_emit_tuple.
11387 * annotate.h (struct annotate_arg_emitter): New.
11389 2017-04-22 Tom Tromey <tom@tromey.com>
11391 * record-btrace.c (record_btrace_insn_history)
11392 (record_btrace_insn_history_range, record_btrace_call_history)
11393 (record_btrace_call_history_range): Use ui_out_emit_tuple.
11394 * thread.c (do_captured_list_thread_ids, print_thread_info_1): Use
11396 * stack.c (print_frame_info): Use ui_out_emit_tuple.
11397 * solib.c (info_sharedlibrary_command): Use ui_out_emit_tuple.
11398 * skip.c (skip_info): Use ui_out_emit_tuple.
11399 * remote.c (show_remote_cmd): Use ui_out_emit_tuple.
11400 * progspace.c (print_program_space): Use ui_out_emit_tuple.
11401 * probe.c (info_probes_for_ops): Use ui_out_emit_tuple.
11402 * osdata.c (info_osdata): Use ui_out_emit_tuple.
11403 * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Use
11405 * mi/mi-main.c (print_one_inferior, list_available_thread_groups)
11406 (output_register, mi_cmd_data_read_memory)
11407 (mi_cmd_data_read_memory_bytes, mi_load_progress)
11408 (mi_cmd_trace_frame_collected): Use ui_out_emit_tuple.
11409 * mi/mi-cmd-var.c (mi_cmd_var_list_children, varobj_update_one):
11410 Use ui_out_emit_tuple.
11411 * mi/mi-cmd-stack.c (mi_cmd_stack_list_args): Use
11413 * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions)
11414 (mi_cmd_info_gdb_mi_command): Use ui_out_emit_tuple.
11415 * linux-thread-db.c (info_auto_load_libthread_db): Use
11417 * inferior.c (print_inferior): Use ui_out_emit_tuple.
11418 * gdb_bfd.c (print_one_bfd): Use ui_out_emit_tuple.
11419 * disasm.c (do_mixed_source_and_assembly_deprecated)
11420 (do_mixed_source_and_assembly): Use ui_out_emit_tuple.
11421 * cp-abi.c (list_cp_abis): Use ui_out_emit_tuple.
11422 * cli/cli-setshow.c (cmd_show_list): Use ui_out_emit_tuple.
11423 * breakpoint.c (print_one_breakpoint_location)
11424 (print_one_breakpoint): Use ui_out_emit_tuple.
11425 * auto-load.c (print_script, info_auto_load_cmd): Use
11427 * ada-tasks.c (print_ada_task_info): Use ui_out_emit_tuple.
11429 2017-04-21 Simon Marchi <simon.marchi@ericsson.com>
11431 * thread.c (print_thread_info_1): Remove dead code.
11433 2017-04-21 Jan Kratochvil <jan.kratochvil@redhat.com>
11435 * aarch64-tdep.c (selftests::aarch64_process_record_test): Make it #if
11437 * arm-tdep.c (selftests::arm_record_test): Likewise.
11439 2017-04-21 Yao Qi <yao.qi@linaro.org>
11441 * regcache.c (regcache_restore): Remove argument 2. Replace
11442 argument 3 with regcache. Get register status from
11443 src->register_status and get register contents from
11444 register_buffer (src, regnum).
11445 (regcache_cpy): Update.
11447 2017-04-19 Pedro Alves <palves@redhat.com>
11449 * gdbthread.h (thread): Add missing closing parenthesis in
11452 2017-04-19 Pedro Alves <palves@redhat.com>
11454 * common/refcounted-object.h: New file.
11455 * gdbthread.h: Include "common/refcounted-object.h".
11456 (thread_info): Inherit from refcounted_object and add comments.
11457 (thread_info::incref, thread_info::decref)
11458 (thread_info::m_refcount): Delete.
11459 (thread_info::deletable): Use the refcounted_object::refcount()
11461 * inferior.c (current_inferior_): Add comment.
11462 (set_current_inferior): Increment/decrement refcounts.
11463 (prune_inferiors, remove_inferior_command): Skip inferiors marked
11464 not-deletable instead of comparing with the current inferior.
11465 (initialize_inferiors): Increment the initial inferior's refcount.
11466 * inferior.h (struct inferior): Forward declare.
11467 Include "common/refcounted-object.h".
11468 (current_inferior, set_current_inferior): Move declaration to
11469 before struct inferior's definition, and fix comment.
11470 (inferior): Inherit from refcounted_object. Add comments.
11471 * thread.c (switch_to_thread_no_regs): Reference the thread's
11472 inferior pointer directly instead of doing a ptid lookup.
11473 (switch_to_no_thread): New function.
11474 (switch_to_thread(thread_info *)): New function, factored out
11476 (switch_to_thread(ptid_t)): ... this.
11477 (restore_current_thread): Delete.
11478 (current_thread_cleanup): Remove 'inf_id' and 'was_removable'
11479 fields, and add 'inf' field.
11480 (do_restore_current_thread_cleanup): Check whether old->inf is
11481 alive instead of looking up an inferior by ptid. Use
11482 switch_to_thread and switch_to_no_thread.
11483 (restore_current_thread_cleanup_dtor): Use old->inf directly
11484 instead of lookup up an inferior by id. Decref the inferior.
11485 Don't restore 'removable'.
11486 (make_cleanup_restore_current_thread): Same the inferior pointer
11487 in old, instead of the inferior number. Incref the inferior.
11488 Don't save/clear 'removable'.
11490 2017-04-19 Pedro Alves <palves@redhat.com>
11492 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
11493 unittests/scoped_restore-selftests.c.
11494 (SUBDIR_UNITTESTS_OBS): Add scoped_restore-selftests.o.
11495 * common/scoped_restore.h (scoped_restore_base): Make "class".
11496 (scoped_restore_base::release): New public method.
11497 (scoped_restore_base::scoped_restore_base): New protected ctor.
11498 (scoped_restore_base::m_saved_var): New protected field.
11499 (scoped_restore_tmpl::scoped_restore_tmpl(T*)): Initialize the
11500 scoped_restore_base base class instead of m_saved_var directly.
11501 (scoped_restore_tmpl::scoped_restore_tmpl(T*, T2)): Likewise.
11502 (scoped_restore_tmpl::scoped_restore_tmpl(const
11503 scoped_restore_tmpl<T>&)): Likewise.
11504 (scoped_restore_tmpl::~scoped_restore_tmpl): Use the saved_var
11506 (scoped_restore_tmpl::saved_var): New method.
11507 (scoped_restore_tmpl::m_saved_var): Delete.
11508 * inferior.h (inferior::detaching): Now a bool.
11509 * infrun.c (prepare_for_detach): Use a scoped_restore instead of a
11511 * unittests/scoped_restore-selftests.c: New file.
11513 2017-04-19 Pedro Alves <palves@redhat.com>
11515 * Makefile.in (SUBDIR_UNITTESTS_SRCS, SUBDIR_UNITTESTS_OBS):
11516 Re-sort in alphabetic order.
11518 2017-04-18 Pedro Alves <palves@redhat.com>
11520 * xml-support.c (obstack_xml_printf): Delete.
11521 * xml-support.h (obstack_xml_printf): Delete.
11523 2017-04-18 Pedro Alves <palves@redhat.com>
11525 * xml-support.c (gdb_xml_parser) <use_dtd, dtd_name, parse,
11526 vdebug, verror, body_text, start_element, end_element, name,
11527 user_data, set_is_xinclude, set_error, expat_parser>: New methods.
11528 <name, user_data, expat_parser, scopes, error, last_line, dtd_name,
11529 is_xinclude>: Make private and add m_ prefix.
11530 (gdb_xml_parser::body_text): New method, based on ...
11531 (gdb_xml_body_text): ... this. Adjust.
11532 (gdb_xml_parser::vdebug): New method, based on ...
11533 (gdb_xml_debug): ... this. Adjust.
11534 (gdb_xml_parser::verror): New method, based on ...
11535 (gdb_xml_error): ... this. Adjust.
11536 (gdb_xml_parser::start_element): New method, based on ...
11537 (gdb_xml_start_element): ... this. Adjust.
11538 (gdb_xml_start_element_wrapper): Defer to
11539 gdb_xml_parser::start_element and gdb_xml_parser::set_error.
11540 (gdb_xml_parser::end_element): New method, based on ...
11541 (gdb_xml_end_element_wrapper): ... this. Adjust.
11542 (gdb_xml_parser::~gdb_xml_parser): Adjust.
11543 (gdb_xml_parser::gdb_xml_parser): Adjust to field renames.
11544 (gdb_xml_parser::use_dtd): New method, based on ...
11545 (gdb_xml_use_dtd): ... this. Adjust.
11546 (gdb_xml_parser::parse): New method, based on ...
11547 (gdb_xml_parse): ... this. Adjust.
11548 (gdb_xml_parse_quick): Adjust to call the parser's parse method.
11549 (xinclude_start_include): Adjust to call the parser's name method.
11550 (xml_xinclude_default, xml_xinclude_start_doctype)
11551 (xml_xinclude_end_doctype): Adjust to call the parser's user_data
11553 (xml_process_xincludes): Adjust to call parser methods.
11554 * xml-support.h (gdb_xml_use_dtd, gdb_xml_parse): Delete
11557 2017-04-18 Pedro Alves <palves@redhat.com>
11559 * tracefile-tfile.c (tfile_write_tdesc): Adjust to use
11560 gdb::optional<std::string>.
11561 * xml-support.c: Include <string>.
11562 (scope_level::scope_level(scope_level &&))
11563 (scope_level::~scope_level): Delete.
11564 (scope_level::body): Now a std::string.
11565 (gdb_xml_body_text, gdb_xml_end_element): Adjust.
11566 (xinclude_parsing_data::xinclude_parsing_data): Add 'output'
11568 (xinclude_parsing_data::~xinclude_parsing_data): Delete.
11569 (xinclude_parsing_data::output): Now a std::string reference.
11570 (xinclude_start_include): Adjust.
11571 (xml_xinclude_default): Adjust.
11572 (xml_process_xincludes): Add 'output' parameter, and return bool.
11573 * xml-support.h (xml_process_xincludes): Add 'output' parameter,
11575 * xml-tdesc.c: Include <unordered_map> and <string>.
11576 (tdesc_xml_cache): Delete.
11577 (tdesc_xml_cache_s): Delete.
11578 (xml_cache): Now an std::unordered_map.
11579 (tdesc_parse_xml): Adjust to use std::string and unordered_map.
11580 (target_fetch_description_xml): Change return type to
11581 gdb::optional<std::string>, and adjust.
11582 * xml-tdesc.h: Include "common/gdb_optional.h" and <string>.
11583 (target_fetch_description_xml): Change return type to
11584 gdb::optional<std::string>.
11586 2017-04-18 Pedro Alves <palves@redhat.com>
11588 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
11589 unittests/optional-selftests.c.
11590 (SUBDIR_UNITTESTS_OBS): Add optional-selftests.o.
11591 * unittests/optional-selftests.c: New file.
11592 * unittests/optional/assignment/1.cc: New file.
11593 * unittests/optional/assignment/2.cc: New file.
11594 * unittests/optional/assignment/3.cc: New file.
11595 * unittests/optional/assignment/4.cc: New file.
11596 * unittests/optional/assignment/5.cc: New file.
11597 * unittests/optional/assignment/6.cc: New file.
11598 * unittests/optional/assignment/7.cc: New file.
11599 * unittests/optional/cons/copy.cc: New file.
11600 * unittests/optional/cons/default.cc: New file.
11601 * unittests/optional/cons/move.cc: New file.
11602 * unittests/optional/cons/value.cc: New file.
11603 * unittests/optional/in_place.cc: New file.
11604 * unittests/optional/observers/1.cc: New file.
11605 * unittests/optional/observers/2.cc: New file.
11607 2017-04-18 Pedro Alves <palves@redhat.com>
11609 * common/gdb_optional.h: Include common/traits.h.
11610 (in_place_t): New type.
11611 (in_place): New constexpr variable.
11612 (optional::optional): Remove member initialization of
11614 (optional::optional(in_place_t...)): New constructor.
11615 (optional::~optional): Use reset.
11616 (optional::optional(const optional&)): New.
11617 (optional::optional(const optional&&)): New.
11618 (optional::optional(T &)): New.
11619 (optional::optional(T &&)): New.
11620 (operator::operator=(const optional &)): New.
11621 (operator::operator=(optional &&)): New.
11622 (operator::operator= (const T &))
11623 (operator::operator= (T &&))
11624 (operator::emplace (Args &&... args)): Return a T&. Use reset.
11625 (operator::reset): New.
11626 (operator::m_instantiated):: Add in-class initializer.
11627 * common/traits.h: Include <type_traits>.
11628 (struct And): New types.
11630 2017-04-18 Pedro Alves <palves@redhat.com>
11632 * xml-support.c: Include <vector>.
11633 (scope_level::scope_level(const gdb_xml_element *))
11634 (scope_level::scope_level(scope_level&&)): New.
11635 (scope_level::~scope_level): New.
11636 (scope_level_s): Delete.
11637 (gdb_xml_parser::scopes): Now a std::vector.
11638 (gdb_xml_body_text, gdb_xml_start_element, gdb_xml_end_element):
11640 (gdb_xml_parser::~gdb_xml_parser): Remove now unnecessary
11641 scope cleanup code.
11642 (gdb_xml_parser::gdb_xml_parser): Remove explicit initialization
11643 of the scopes member. Use std::vector::emplace_back.
11645 2017-04-18 Pedro Alves <palves@redhat.com>
11647 * xml-support.c (gdb_xml_parser): Add ctor/dtor. Make is_xinclude
11649 (gdb_xml_end_element): Change type of first parameter.
11650 (gdb_xml_cleanup): Rename to ...
11651 (gdb_xml_parser::~gdb_xml_parser): ... this.
11652 (gdb_xml_create_parser_and_cleanup): Delete with ...
11653 (gdb_xml_parser::gdb_xml_parser): ... creation parts factored out
11655 (gdb_xml_parse_quick): Create a local gdb_xml_parser instead of
11656 using gdb_xml_create_parser_and_cleanup.
11657 (xinclude_parsing_data): Add ctor/dtor.
11658 (xml_xinclude_cleanup): Delete.
11659 (xml_process_xincludes): Create a local xinclude_parsing_data
11660 instead of heap-allocating one. Create a local gdb_xml_parser
11661 instead of heap-allocating one with
11662 gdb_xml_create_parser_and_cleanup.
11664 2017-04-18 John Baldwin <jhb@FreeBSD.org>
11667 * fbsd-nat.c (resume_one_thread_cb): Remove.
11668 (resume_all_threads_cb): Remove.
11669 (fbsd_resume): Use ALL_NON_EXITED_THREADS instead of
11670 iterate_over_threads.
11672 2017-04-17 Joel Brobecker <brobecker@adacore.com>
11674 * NEWS: Create a new section for the next release branch.
11675 Rename the section of the current branch, now that it has
11678 2017-04-17 Joel Brobecker <brobecker@adacore.com>
11680 GDB 8.0 branch created (725bf5cf125783c2a7ca4ab63d3768e220bab2db):
11681 * version.in: Bump version to 8.0.50.DATE-git.
11683 2017-04-13 Sergio Durigan Junior <sergiodj@redhat.com>
11686 * windows-nat.c (windows_create_inferior): Declare 'allargs'
11687 independently of the host, and fix build breakage on Cygwin.
11689 2017-04-13 Pedro Alves <palves@redhat.com>
11691 * inferior.c (free_inferior): Convert to ...
11692 (inferior::~inferior): ... this dtor.
11693 (inferior::inferior): New ctor, factored out from ...
11694 (add_inferior_silent): ... here. Allocate the inferior with a new
11696 (delete_inferior): Call delete instead of free_inferior.
11697 * inferior.h (gdb_environ, continuation): Forward declare.
11698 (inferior): Now a class. Add in-class initialization to all
11699 members. Make boolean fields bool, except 'detaching'.
11700 (inferior::inferior): New explicit ctor.
11701 (inferior::~inferior): New.
11703 2017-04-13 Pedro Alves <palves@redhat.com>
11705 * inferior.c (init_inferior_list): Delete.
11706 * inferior.h (init_inferior_list): Delete.
11708 2017-04-13 Pedro Alves <palves@redhat.com>
11711 * gdb.threads/threadapply.exp (thr_apply_detach): New procedure.
11712 (top level): Call it twice, with different thread sets.
11714 2017-04-13 Pedro Alves <palves@redhat.com>
11716 * thread.c: Include <algorithm>.
11717 (thread_array_cleanup): Delete.
11718 (scoped_inc_dec_ref): New class.
11719 (live_threads_count): New function.
11720 (set_thread_refcount): Delete.
11721 (tp_array_compar_ascending): Now a bool.
11722 (tp_array_compar): Convert to a std::sort comparison function.
11723 (thread_apply_all_command): Use std::vector and scoped_inc_dec_ref
11724 and live_threads_count.
11726 2017-04-13 Pedro Alves <palves@redhat.com>
11728 * infrun.c (follow_fork_inferior): Also switch the current
11731 2017-04-13 Pedro Alves <palves@redhat.com>
11733 * breakpoint.c (watch_command_1): Save watchpoint-frame info
11734 before calling create_internal_breakpoint.
11736 2017-04-13 Pedro Alves <palves@redhat.com>
11738 * fork-child.c (execv_argv): New class.
11739 (breakup_args): Refactored as ...
11740 (execv_argv::init_for_no_shell): .. this method of execv_argv.
11741 Copy arguments to storage and replace separators with NULL
11742 terminators in place.
11743 (escape_bang_in_quoted_argument): Adjust to return bool.
11744 (execv_argv::execv_argv): New ctor.
11745 (execv_argv::init_for_shell): New method, factored out from
11746 fork_inferior. Don't strdup strings into the vector.
11747 (fork_inferior): Eliminate "shell" local and use execv_argv. Use
11748 Remove free_vector_argv call.
11750 2017-04-13 Yao Qi <yao.qi@linaro.org>
11752 * rx-tdep.c (rx_fpsw_type): Check tdep->rx_fpsw_type instead of
11755 2017-04-13 Yao Qi <yao.qi@linaro.org>
11757 * rl78-tdep.c (rl78_gdbarch_init): Use XCNEW instead of XNEW.
11758 * rx-tdep.c (rx_gdbarch_init): Likewise.
11760 2017-04-13 Pedro Alves <palves@redhat.com>
11762 * breakpoint.h (struct breakpoint): Reindent.
11764 2017-04-13 Pedro Alves <palves@redhat.com>
11766 * breakpoint.c (bp_location): Rename to ...
11767 (bp_locations): ... this. All references updated.
11768 (bp_location_count): Rename to ...
11769 (bp_locations_count): ... this. All references updated.
11770 (bp_location_placed_address_before_address_max): Rename to ...
11771 (bp_locations_placed_address_before_address_max): ... this. All
11772 references updated.
11773 (bp_location_shadow_len_after_address_max): Rename to ...
11774 (bp_locations_shadow_len_after_address_max): ... this. All
11775 references updated.
11776 (bp_location_compare_addrs): Rename to ...
11777 (bp_locations_compare_addrs): ... this. All references updated.
11778 (bp_location_compare):Rename to ...
11779 (bp_locations_compare): ... this. All references updated.
11780 (bp_location_target_extensions_update): Rename to ...
11781 (bp_locations_target_extensions_update): ... this. All references
11784 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
11786 * Makefile.in (HFILES_NO_SRCDIR): Add "common/gdb_termios.h".
11787 * common/common.m4: Check headers 'termios.h', 'termio.h' and
11789 * common/gdb_termios.h: New file, with parts of "terminal.h".
11790 * inflow.c: Include "gdb_termios.h".
11791 * ser-unix.c: Include "gdb_termios.h".
11792 * terminal.h: Move terminal-related defines to
11793 "common/gdb_termios.h".
11795 2017-04-12 Tom Tromey <tom@tromey.com>
11797 * probe.c (parse_probes): Update.
11798 * location.h (delete_event_location): Don't declare.
11799 (event_location_deleter::operator()): Update.
11800 * location.c (event_location_deleter::operator()): Rename from
11801 delete_event_location.
11802 * linespec.h (linespec_result) <location>: Change type to
11804 * linespec.c (canonicalize_linespec, event_location_to_sals)
11805 (decode_objc): Update.
11806 (linespec_result): Don't call delete_event_location.
11807 * breakpoint.c (create_breakpoints_sal)
11808 (bkpt_probe_create_sals_from_location)
11809 (strace_marker_create_sals_from_location): Update.
11811 2017-04-12 Tom Tromey <tom@tromey.com>
11813 * linespec.h (struct linespec_result): Add constructor and
11815 (init_linespec_result, destroy_linespec_result)
11816 (make_cleanup_destroy_linespec_result): Don't declare.
11817 * linespec.c (init_linespec_result): Remove.
11818 (linespec_result::~linespec_result): Rename from
11819 destroy_linespec_result. Update.
11820 (cleanup_linespec_result, make_cleanup_destroy_linespec_result):
11822 * breakpoint.c (create_breakpoint, break_range_command)
11823 (decode_location_default): Update.
11824 * ax-gdb.c (agent_command_1): Update.
11826 2017-04-12 Tom Tromey <tom@tromey.com>
11828 * remote.c (remote_download_tracepoint): Update.
11829 * python/py-breakpoint.c (bppy_get_location): Update.
11830 * guile/scm-breakpoint.c (bpscm_print_breakpoint_smob)
11831 (gdbscm_breakpoint_location): Update.
11832 * elfread.c (elf_gnu_ifunc_resolver_return_stop): Update.
11833 * breakpoint.h (struct breakpoint) <location, location_range_end>:
11834 Change type to event_location_up.
11835 * breakpoint.c (create_overlay_event_breakpoint)
11836 (create_longjmp_master_breakpoint)
11837 (create_std_terminate_master_breakpoint)
11838 (create_exception_master_breakpoint)
11839 (breakpoint_event_location_empty_p, print_breakpoint_location)
11840 (print_one_breakpoint_location, create_thread_event_breakpoint)
11841 (init_breakpoint_sal, create_breakpoint)
11842 (print_recreate_ranged_breakpoint, break_range_command)
11843 (init_ada_exception_breakpoint, say_where): Update.
11844 (base_breakpoint_dtor): Don't call delete_event_location.
11845 (bkpt_print_recreate, tracepoint_print_recreate)
11846 (dprintf_print_recreate, update_static_tracepoint)
11847 (breakpoint_re_set_default): Update.
11849 2017-04-12 Tom Tromey <tom@tromey.com>
11851 * compile/compile-loc2c.c (compute_stack_depth_worker): Change
11852 type of "to_do". Update.
11853 (compute_stack_depth): Use std::vector.
11855 2017-04-12 Tom Tromey <tom@tromey.com>
11857 * printcmd.c (find_instruction_backward): Use std::vector.
11859 2017-04-12 Tom Tromey <tom@tromey.com>
11861 * symfile.c (objfilep): Remove typedef.
11862 (reread_symbols): Use a std::vector.
11864 2017-04-12 Tom Tromey <tom@tromey.com>
11866 * mi/mi-main.c (exec_direction_forward): Remove.
11867 (exec_reverse_continue, mi_execute_command): Use scoped_restore.
11868 * guile/scm-ports.c (ioscm_with_output_to_port_worker): Use
11870 * guile/guile.c (guile_repl_command, guile_command)
11871 (gdbscm_execute_gdb_command): Use scoped_restore.
11872 * go-exp.y (go_parse): Use scoped_restore.
11873 * d-exp.y (d_parse): Use scoped_restore.
11874 * cli/cli-decode.c (cmd_func): Use scoped_restore.
11875 * c-exp.y (c_parse): Use scoped_restore.
11877 2017-04-12 Tom Tromey <tom@tromey.com>
11879 * mi/mi-parse.h (struct mi_parse): Add constructor, destructor.
11880 (mi_parse): Update return type.
11881 (mi_parse_free): Remove.
11882 * mi/mi-parse.c (mi_parse::mi_parse): New constructor.
11883 (mi_parse::~mi_parse): Rename from mi_parse_free.
11884 (mi_parse_cleanup): Remove.
11885 (mi_parse): Return a unique_ptr. Use new.
11886 * mi/mi-main.c (mi_execute_command): Update.
11888 2017-04-12 Tom Tromey <tom@tromey.com>
11890 * location.c (explicit_location_lex_one): Return a
11891 unique_xmalloc_ptr.
11892 (string_to_explicit_location): Update. Remove cleanups.
11894 2017-04-12 Tom Tromey <tom@tromey.com>
11896 * gnu-v3-abi.c (value_and_voffset_p): Remove typedef.
11897 (compare_value_and_voffset): Change type. Update.
11898 (compute_vtable_size): Change type of "offset_vec".
11899 (gnuv3_print_vtable): Use std::vector. Remove cleanups.
11900 (gnuv3_get_typeid): Remove extraneous declaration.
11902 2017-04-12 Tom Tromey <tom@tromey.com>
11904 * charset.h (wchar_iterator): Fix comment.
11906 2017-04-12 Tom Tromey <tom@tromey.com>
11908 * charset.c (iconv_wrapper): New class.
11909 (cleanup_iconv): Remove.
11910 (convert_between_encodings): Use it.
11912 2017-04-12 Tom Tromey <tom@tromey.com>
11914 * symfile.h (increment_reading_symtab): Update type.
11915 * symfile.c (decrement_reading_symtab): Remove.
11916 (increment_reading_symtab): Return a scoped_restore_tmpl<int>.
11917 * psymtab.c (psymtab_to_symtab): Update.
11918 * dwarf2read.c (dw2_instantiate_symtab): Update.
11920 2017-04-12 Tom Tromey <tom@tromey.com>
11922 * jit.c (struct jit_reader): Declare separately. Add constructor
11923 and destructor. Change type of "handle".
11924 (loaded_jit_reader): Define separately.
11925 (jit_reader_load): Update. New "new".
11926 (jit_reader_unload_command): Use "delete".
11927 * gdb-dlfcn.h (struct dlclose_deleter): New.
11928 (gdb_dlhandle_up): New typedef.
11929 (gdb_dlopen, gdb_dlsym): Update types.
11930 (gdb_dlclose): Remove.
11931 * gdb-dlfcn.c (gdb_dlopen): Return a gdb_dlhandle_up.
11932 (gdb_dlsym): Change type of "handle".
11933 (make_cleanup_dlclose): Remove.
11934 (dlclose_deleter::operator()): Rename from gdb_dlclose.
11935 * compile/compile-c-support.c (load_libcc): Update.
11937 2017-04-12 Tom Tromey <tom@tromey.com>
11939 * symtab.h (find_pcs_for_symtab_line): Change return type.
11940 * symtab.c (find_pcs_for_symtab_line): Change return type.
11941 * python/py-linetable.c (build_line_table_tuple_from_pcs): Change
11942 type of "vec". Update.
11943 (ltpy_get_pcs_for_line): Update.
11944 * linespec.c (decode_digits_ordinary): Update.
11946 2017-04-12 Tom Tromey <tom@tromey.com>
11948 * tracepoint.c (actions_command): Update.
11949 * python/python.c (python_command, python_interactive_command):
11951 * mi/mi-cmd-break.c (mi_cmd_break_commands): Update.
11952 * guile/guile.c (guile_command): Update.
11953 * defs.h (read_command_lines, read_command_lines_1): Return
11955 (command_lines_deleter): New struct.
11956 (command_line_up): New typedef.
11957 * compile/compile.c (compile_code_command)
11958 (compile_print_command): Update.
11959 * cli/cli-script.h (get_command_line, copy_command_lines): Return
11961 (make_cleanup_free_command_lines): Remove.
11962 * cli/cli-script.c (get_command_line, read_command_lines_1)
11963 (copy_command_lines): Return command_line_up.
11964 (while_command, if_command, read_command_lines, define_command)
11965 (document_command): Update.
11966 (do_free_command_lines_cleanup, make_cleanup_free_command_lines):
11968 * breakpoint.h (breakpoint_set_commands): Change type of
11970 * breakpoint.c (breakpoint_set_commands): Change type of
11971 "commands". Update.
11972 (do_map_commands_command, update_dprintf_command_list)
11973 (create_tracepoint_from_upload): Update.
11975 2017-04-12 Tom Tromey <tom@tromey.com>
11977 * tracepoint.c (scope_info): Update.
11978 * spu-tdep.c (spu_catch_start): Update.
11979 * python/python.c (gdbpy_decode_line): Update.
11980 * python/py-finishbreakpoint.c (bpfinishpy_init): Update.
11981 * python/py-breakpoint.c (bppy_init): Update.
11982 * probe.c (parse_probes): Update.
11983 * mi/mi-cmd-break.c (mi_cmd_break_insert_1): Update.
11984 * location.h (event_location_deleter): New struct.
11985 (event_location_up): New typedef.
11986 (new_linespec_location, new_address_location, new_probe_location)
11987 (new_explicit_location, copy_event_location)
11988 (string_to_event_location, string_to_event_location_basic)
11989 (string_to_explicit_location): Update return type.
11990 (make_cleanup_delete_event_location): Remove.
11991 * location.c (new_linespec_location, new_address_location)
11992 (new_probe_location, new_explicit_location, copy_event_location):
11993 Return event_location_up.
11994 (delete_event_location_cleanup)
11995 (make_cleanup_delete_event_location): Remove.
11996 (string_to_explicit_location, string_to_event_location_basic)
11997 (string_to_event_location): Return event_location_up.
11998 * linespec.c (canonicalize_linespec, event_location_to_sals)
11999 (decode_line_with_current_source)
12000 (decode_line_with_last_displayed, decode_objc): Update.
12001 * guile/scm-breakpoint.c (gdbscm_register_breakpoint_x): Update.
12002 * completer.c (location_completer): Update.
12003 * cli/cli-cmds.c (edit_command, list_command): Update.
12004 * breakpoint.c (create_overlay_event_breakpoint)
12005 (create_longjmp_master_breakpoint)
12006 (create_std_terminate_master_breakpoint)
12007 (create_exception_master_breakpoint)
12008 (create_thread_event_breakpoint): Update.
12009 (init_breakpoint_sal): Update. Remove some dead code.
12010 (create_breakpoint_sal): Change type of "location". Update.
12011 (create_breakpoints_sal, create_breakpoint, break_command_1)
12012 (dprintf_command, break_range_command, until_break_command)
12013 (init_ada_exception_breakpoint)
12014 (strace_marker_create_sals_from_location)
12015 (update_static_tracepoint, trace_command, ftrace_command)
12016 (strace_command, create_tracepoint_from_upload): Update.
12017 * break-catch-throw.c (re_set_exception_catchpoint): Update.
12018 * ax-gdb.c (agent_command_1): Update.
12020 2017-04-12 Pedro Alves <palves@redhat.com>
12022 * Makefile.in (ALL_TARGET_OBS): Add i386-go32-tdep.o.
12023 * configure.tgt: Handle i[34567]86-*-go32* and
12024 i[34567]86-*-msdosdjgpp*.
12025 * i386-tdep.c (i386_svr4_reg_to_regnum):
12027 (i386_go32_init_abi, i386_coff_osabi_sniffer): Moved to
12029 (_initialize_i386_tdep): DJGPP bits moved to i386-go32-tdep.c.
12030 * i386-go32-tdep.c: New file.
12031 * i386-tdep.h (tdesc_i386_mmx, i386_svr4_reg_to_regnum): New
12034 2017-04-12 Simon Marchi <simon.marchi@ericsson.com>
12036 * aix-thread.c (pd_status2str): Change return type to const char *.
12038 2017-04-12 Pedro Alves <palves@redhat.com>
12040 * i386-tdep.c (i386_elf_init_abi, i386_go32_init_abi): Remove
12041 calls to set_gdbarch_gnu_triplet_regexp.
12043 2017-04-12 Pedro Alves <palves@redhat.com>
12046 * c-lang.c (cplus_primitive_types) <cplus_primitive_type_wchar_t>:
12048 (cplus_language_arch_info): Register cplus_primitive_type_wchar_t.
12049 * gdbtypes.h (struct builtin_type) <builtin_wchar>: New field.
12050 * gdbtypes.c (gdbtypes_post_init): Create the "wchar_t" type.
12051 * gdbarch.sh (wchar_bit, wchar_signed): New per-arch values.
12052 * gdbarch.h, gdbarch.c: Regenerate.
12053 * aarch64-tdep.c (aarch64_gdbarch_init): Override
12054 gdbarch_wchar_bit and gdbarch_wchar_signed.
12055 * alpha-tdep.c (alpha_gdbarch_init): Likewise.
12056 * arm-tdep.c (arm_gdbarch_init): Likewise.
12057 * avr-tdep.c (avr_gdbarch_init): Likewise.
12058 * h8300-tdep.c (h8300_gdbarch_init): Likewise.
12059 * i386-nto-tdep.c (i386nto_init_abi): Likewise.
12060 * i386-tdep.c (i386_go32_init_abi): Likewise.
12061 * m32r-tdep.c (m32r_gdbarch_init): Likewise.
12062 * moxie-tdep.c (moxie_gdbarch_init): Likewise.
12063 * nds32-tdep.c (nds32_gdbarch_init): Likewise.
12064 * rs6000-aix-tdep.c (rs6000_aix_init_osabi): Likewise.
12065 * sh-tdep.c (sh_gdbarch_init): Likewise.
12066 * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
12067 * sparc64-tdep.c (sparc64_init_abi): Likewise.
12068 * windows-tdep.c (windows_init_abi): Likewise.
12069 * xstormy16-tdep.c (xstormy16_gdbarch_init): Likewise.
12071 2017-04-12 Pedro Alves <palves@redhat.com>
12074 * c-lang.c (cplus_primitive_types) <cplus_primitive_type_char16_t,
12075 cplus_primitive_type_char32_t>: New enum values.
12076 (cplus_language_arch_info): Register cplus_primitive_type_char16_t
12077 and cplus_primitive_type_char32_t.
12078 * dwarf2read.c (read_base_type) <DW_ATE_UTF>: If bit size is 16 or
12079 32, use the archtecture's built-in type for char16_t and char32_t,
12080 respectively. Otherwise, fallback to init_integer_type as before,
12081 but make the type unsigned, and issue a complaint.
12082 * gdbtypes.c (gdbtypes_post_init): Make char16_t and char32_t unsigned.
12084 2017-04-12 Alan Hayward <alan.hayward@arm.com>
12086 * m32r-tdep.c (M32R_ARG_REGISTER_SIZE): Added.
12087 (m32r_push_dummy_call): Use M32R_ARG_REGISTER_SIZE.
12089 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
12091 * windows-nat.c (windows_create_inferior): Declare 'toexec' as
12094 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
12096 * common/common-utils.c (free_vector_argv): New function.
12097 * common/common-utils.h: Include <vector>.
12098 (free_vector_argv): New prototype.
12099 * darwin-nat.c (darwin_create_inferior): Rewrite function
12100 prototype in order to constify "exec_file" and accept a
12101 "std::string" for "allargs".
12102 * fork-child.c: Include <vector>.
12103 (breakup_args): Rewrite function, using C++.
12104 (fork_inferior): Rewrite function header, constify "exec_file_arg"
12105 and accept "std::string" for "allargs". Update the code to
12106 calculate "argv" based on "allargs". Update calls to "exec_fun"
12108 * gnu-nat.c (gnu_create_inferior): Rewrite function prototype in
12109 order to constify "exec_file" and accept a "std::string" for
12111 * go32-nat.c (go32_create_inferior): Likewise.
12112 * inf-ptrace.c (inf_ptrace_create_inferior): Likewise.
12113 * infcmd.c (run_command_1): Constify "exec_file". Use
12114 "std::string" for inferior arguments.
12115 * inferior.h (fork_inferior): Update prototype.
12116 * linux-nat.c (linux_nat_create_inferior): Rewrite function
12117 prototype in order to constify "exec_file" and accept a
12118 "std::string" for "allargs".
12119 * nto-procfs.c (procfs_create_inferior): Likewise.
12120 * procfs.c (procfs_create_inferior): Likewise.
12121 * remote-sim.c (gdbsim_create_inferior): Likewise.
12122 * remote.c (extended_remote_run): Update code to accept
12123 "std::string" as argument.
12124 (extended_remote_create_inferior): Rewrite function prototype in
12125 order to constify "exec_file" and accept a "std::string" for
12127 * rs6000-nat.c (super_create_inferior): Likewise.
12128 (rs6000_create_inferior): Likewise.
12129 * target.h (struct target_ops) <to_create_inferior>: Likewise.
12130 * windows-nat.c (windows_create_inferior): Likewise.
12132 2017-04-11 Pedro Alves <palves@redhat.com>
12134 * thread.c: Fix whitespace throughout.
12136 2017-04-11 Philipp Rudo <prudo@linux.vnet.ibm.com>
12138 * linux-nat.c (linux_nat_detach): Remove delete_lwp call.
12140 2017-04-11 Alan Hayward <alan.hayward@arm.com>
12142 * arm-tdep.c (arm_store_return_value): Use FP_REGISTER_SIZE
12144 2017-04-10 Sergio Durigan Junior <sergiodj@redhat.com>
12147 * osdata.c (info_osdata): Check if 'type' is an empty string
12150 2017-04-10 Pedro Alves <palves@redhat.com>
12152 * thread.c (add_thread_silent, delete_thread_1, find_thread_ptid)
12153 (ptid_to_global_thread_id, in_thread_list)
12154 (do_captured_list_thread_ids, set_resumed, set_running)
12155 (set_executing, set_stop_requested, finish_thread_state)
12156 (validate_registers_access, can_access_registers_ptid)
12157 (print_thread_info_1, switch_to_thread)
12158 (do_restore_current_thread_cleanup)
12159 (make_cleanup_restore_current_thread, thread_command)
12160 (thread_name_command): Use operator== instead of ptid_equal.
12162 2017-04-10 Pedro Alves <palves@redhat.com>
12164 * thread.c (struct current_thread_cleanup) <next>: Delete field.
12165 (current_thread_cleanup_chain): Delete.
12166 (restore_current_thread_cleanup_dtor)
12167 (make_cleanup_restore_current_thread): Remove references to
12168 current_thread_cleanup_chain.
12170 2017-04-10 Alan Hayward <alan.hayward@arm.com>
12172 * msp430-tdep.c (msp430_pseudo_register_read): Never return
12175 2017-04-10 Yao Qi <yao.qi@linaro.org>
12178 * gdbthread.h (thread_info::deletable): New method.
12179 (thread_info::incref): New method.
12180 (thread_info::decref): New method.
12181 (thread_info::refcount): Move it to private.
12182 * infrun.c (save_stop_context): Call inc_refcount.
12183 (release_stop_context_cleanup): Likewise.
12184 * thread.c (set_thread_exited): New function.
12185 (init_thread_list): Delete "tp" only it is deletable, otherwise
12186 call set_thread_exited.
12187 (delete_thread_1): Call set_thread_exited.
12188 (current_thread_cleanup) <inferior_pid>: Remove.
12189 <thread>: New field.
12190 (restore_current_thread_ptid_changed): Removed.
12191 (do_restore_current_thread_cleanup): Adjust.
12192 (restore_current_thread_cleanup_dtor): Don't call
12194 (set_thread_refcount): Use dec_refcount.
12195 (make_cleanup_restore_current_thread): Adjust.
12196 (thread_apply_all_command): Call inc_refcount.
12197 (_initialize_thread): Don't call
12198 observer_attach_thread_ptid_changed.
12200 2017-04-10 Yao Qi <yao.qi@linaro.org>
12202 * thread.c (delete_thread_1): Hoist code on marking thread as
12205 2017-04-09 Simon Marchi <simon.marchi@polymtl.ca>
12207 * windows-nat.c (windows_detach): Initialize ptid with
12210 2017-04-07 Simon Marchi <simon.marchi@ericsson.com>
12212 * unittests/ptid-selftests.c: Fix erroneous assert messages.
12214 2017-04-07 Alan Hayward <alan.hayward@arm.com>
12216 * bfin-tdep.c (BFIN_MAX_REGISTER_SIZE): Add.
12217 (bfin_pseudo_register_read): Use BFIN_MAX_REGISTER_SIZE.
12218 (bfin_pseudo_register_write): Likewise
12220 2017-04-06 Simon Marchi <simon.marchi@ericsson.com>
12222 * common/ptid.h (struct ptid): Change to...
12223 (class ptid_t): ... this.
12224 <ptid_t>: New constructors.
12225 <pid, lwp_p, lwp, tid_p, tid, is_pid, operator==, operator!=,
12226 matches>: New methods.
12227 <make_null, make_minus_one>: New static methods.
12228 <pid>: Rename to...
12230 <lwp>: Rename to...
12232 <tid>: Rename to...
12234 (ptid_build, ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal,
12235 ptid_is_pid, ptid_lwp_p, ptid_tid_p, ptid_match): Take ptid arguments
12236 as references, move comment to class ptid_t.
12237 * common/ptid.c (null_ptid, minus_one_ptid): Initialize with
12238 ptid_t static methods.
12239 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_tid,
12240 ptid_equal, ptid_is_pid, ptid_lwp_p, ptid_tid_p, ptid_match):
12241 Take ptid arguments as references, implement using ptid_t methods.
12242 * unittests/ptid-selftests.c: New file.
12243 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
12244 unittests/ptid-selftests.c.
12245 (SUBDIR_UNITTESTS_OBS): Add unittests/ptid-selftests.o.
12247 2017-04-06 Thomas Preud'homme <thomas.preudhomme@arm.com>
12249 * python/python.c (python_run_simple_file): Cast mode literal to
12250 non-const char pointer as expected by PyFile_FromString.
12252 2017-04-05 Simon Marchi <simon.marchi@ericsson.com>
12254 * common/ptid.c (ptid_lwp_p, ptid_tid_p): Remove comparison with
12255 minus_one_ptid and null_ptid.
12257 2017-04-05 Pedro Alves <palves@redhat.com>
12259 * warning.m4 (build_warnings): Remove -Wno-write-strings.
12260 * configure: Regenerate.
12262 2017-04-05 Pedro Alves <palves@redhat.com>
12264 * ada-exp.y (yyerror): Constify.
12265 * ada-lang.c (bound_name, get_selections)
12266 (ada_variant_discrim_type)
12267 (ada_variant_discrim_name, ada_value_struct_elt)
12268 (ada_lookup_struct_elt_type, is_unchecked_variant)
12269 (ada_which_variant_applies, standard_exc, ada_get_next_arg)
12270 (catch_ada_exception_command_split)
12271 (catch_ada_assert_command_split, catch_assert_command)
12272 (ada_op_name): Constify.
12273 * ada-lang.h (ada_yyerror, get_selections)
12274 (ada_variant_discrim_name, ada_value_struct_elt): Constify.
12275 * arc-tdep.c (arc_print_frame_cache): Constify.
12276 * arm-tdep.c (arm_skip_stub): Constify.
12277 * ax-gdb.c (gen_binop, gen_struct_ref_recursive, gen_struct_ref)
12278 (gen_aggregate_elt_ref): Constify.
12279 * bcache.c (print_bcache_statistics): Constify.
12280 * bcache.h (print_bcache_statistics): Constify.
12281 * break-catch-throw.c (catch_exception_command_1):
12282 * breakpoint.c (struct ep_type_description::description):
12284 (add_solib_catchpoint): Constify.
12285 (catch_fork_command_1): Add cast.
12286 (add_catch_command): Constify.
12287 * breakpoint.h (add_catch_command, add_solib_catchpoint):
12289 * bsd-uthread.c (bsd_uthread_state): Constify.
12290 * buildsym.c (patch_subfile_names): Constify.
12291 * buildsym.h (next_symbol_text_func, patch_subfile_names):
12293 * c-exp.y (yyerror): Constify.
12294 (token::oper): Constify.
12295 * c-lang.h (c_yyerror, cp_print_class_member): Constify.
12296 * c-varobj.c (cplus_describe_child): Constify.
12297 * charset.c (find_charset_names): Add cast.
12298 (find_charset_names): Constify array and add const_cast.
12299 * cli/cli-cmds.c (complete_command, cd_command): Constify.
12300 (edit_command): Constify.
12301 * cli/cli-decode.c (lookup_cmd): Constify.
12302 * cli/cli-dump.c (dump_memory_command, dump_value_command):
12304 (struct dump_context): Constify.
12305 (add_dump_command, restore_command): Constify.
12306 * cli/cli-script.c (get_command_line): Constify.
12307 * cli/cli-script.h (get_command_line): Constify.
12308 * cli/cli-utils.c (check_for_argument): Constify.
12309 * cli/cli-utils.h (check_for_argument): Constify.
12310 * coff-pe-read.c (struct read_pe_section_data): Constify.
12311 * command.h (lookup_cmd): Constify.
12312 * common/print-utils.c (decimal2str): Constify.
12313 * completer.c (gdb_print_filename): Constify.
12314 * corefile.c (set_gnutarget): Constify.
12315 * cp-name-parser.y (yyerror): Constify.
12316 * cp-valprint.c (cp_print_class_member): Constify.
12317 * cris-tdep.c (cris_register_name, crisv32_register_name):
12319 * d-exp.y (yyerror): Constify.
12320 (struct token::oper): Constify.
12321 * d-lang.h (d_yyerror): Constify.
12322 * dbxread.c (struct header_file_location::name): Constify.
12323 (add_old_header_file, add_new_header_file, last_function_name)
12324 (dbx_next_symbol_text, add_bincl_to_list)
12325 (find_corresponding_bincl_psymtab, set_namestring)
12326 (find_stab_function_addr, read_dbx_symtab, start_psymtab)
12327 (dbx_end_psymtab, read_ofile_symtab, process_one_symbol):
12328 * defs.h (command_line_input, print_address_symbolic)
12329 (deprecated_readline_begin_hook): Constify.
12330 * dwarf2read.c (anonymous_struct_prefix, dwarf_bool_name):
12332 * event-top.c (handle_line_of_input): Constify and add cast.
12333 * exceptions.c (catch_errors): Constify.
12334 * exceptions.h (catch_errors): Constify.
12335 * expprint.c (print_subexp_standard, op_string, op_name)
12336 (op_name_standard, dump_raw_expression, dump_raw_expression):
12337 * expression.h (op_name, op_string, dump_raw_expression):
12339 * f-exp.y (yyerror): Constify.
12340 (struct token::oper): Constify.
12341 (struct f77_boolean_val::name): Constify.
12342 * f-lang.c (f_word_break_characters): Constify.
12343 * f-lang.h (f_yyerror): Constify.
12344 * fork-child.c (fork_inferior): Add cast.
12345 * frv-tdep.c (struct gdbarch_tdep::register_names): Constify.
12346 (new_variant): Constify.
12347 * gdbarch.sh (pstring_ptr, pstring_list): Constify.
12348 * gdbarch.c: Regenerate.
12349 * gdbcore.h (set_gnutarget): Constify.
12350 * go-exp.y (yyerror): Constify.
12351 (token::oper): Constify.
12352 * go-lang.h (go_yyerror): Constify.
12353 * go32-nat.c (go32_sysinfo): Constify.
12354 * guile/scm-breakpoint.c (gdbscm_breakpoint_expression): Constify.
12355 * guile/scm-cmd.c (cmdscm_function): Constify.
12356 * guile/scm-param.c (pascm_param_value): Constify.
12357 * h8300-tdep.c (h8300_register_name, h8300s_register_name)
12358 (h8300sx_register_name): Constify.
12359 * hppa-tdep.c (hppa32_register_name, hppa64_register_name):
12361 * ia64-tdep.c (ia64_register_names): Constify.
12362 * infcmd.c (construct_inferior_arguments): Constify.
12363 (path_command, attach_post_wait): Constify.
12364 * language.c (show_range_command, show_case_command)
12365 (unk_lang_error): Constify.
12366 * language.h (language_defn::la_error)
12367 (language_defn::la_name_of_this): Constify.
12368 * linespec.c (decode_line_2): Constify.
12369 * linux-thread-db.c (thread_db_err_str): Constify.
12370 * lm32-tdep.c (lm32_register_name): Constify.
12371 * m2-exp.y (yyerror): Constify.
12372 * m2-lang.h (m2_yyerror): Constify.
12373 * m32r-tdep.c (m32r_register_names): Constify and make static.
12374 * m68hc11-tdep.c (m68hc11_register_names): Constify.
12375 * m88k-tdep.c (m88k_register_name): Constify.
12376 * macroexp.c (appendmem): Constify.
12377 * mdebugread.c (fdr_name, add_data_symbol, parse_type)
12378 (upgrade_type, parse_external, parse_partial_symbols)
12379 (mdebug_next_symbol_text, cross_ref, mylookup_symbol, new_psymtab)
12380 (new_symbol): Constify.
12381 * memattr.c (mem_info_command): Constify.
12382 * mep-tdep.c (register_name_from_keyword): Constify.
12383 * mi/mi-cmd-env.c (mi_cmd_env_path, _initialize_mi_cmd_env):
12385 * mi/mi-cmd-stack.c (list_args_or_locals): Constify.
12386 * mi/mi-cmd-var.c (mi_cmd_var_show_attributes): Constify.
12387 * mi/mi-main.c (captured_mi_execute_command): Constify and add
12389 (mi_execute_async_cli_command): Constify.
12390 * mips-tdep.c (mips_register_name): Constify.
12391 * mn10300-tdep.c (register_name, mn10300_generic_register_name)
12392 (am33_register_name, am33_2_register_name)
12393 * moxie-tdep.c (moxie_register_names): Constify.
12394 * nat/linux-osdata.c (osdata_type): Constify fields.
12395 * nto-tdep.c (nto_parse_redirection): Constify.
12396 * objc-lang.c (lookup_struct_typedef, lookup_objc_class)
12397 (lookup_child_selector): Constify.
12398 (objc_methcall::name): Constify.
12399 * objc-lang.h (lookup_objc_class, lookup_child_selector)
12400 (lookup_struct_typedef): Constify.
12401 * objfiles.c (pc_in_section): Constify.
12402 * objfiles.h (pc_in_section): Constify.
12403 * p-exp.y (struct token::oper): Constify.
12404 (yyerror): Constify.
12405 * p-lang.h (pascal_yyerror): Constify.
12406 * parser-defs.h (op_name_standard): Constify.
12407 (op_print::string): Constify.
12408 (exp_descriptor::op_name): Constify.
12409 * printcmd.c (print_address_symbolic): Constify.
12410 * psymtab.c (print_partial_symbols): Constify.
12411 * python/py-breakpoint.c (stop_func): Constify.
12412 (bppy_get_expression): Constify.
12413 * python/py-cmd.c (cmdpy_completer::name): Constify.
12414 (cmdpy_function): Constify.
12415 * python/py-event.c (evpy_add_attribute)
12416 (gdbpy_initialize_event_generic): Constify.
12417 * python/py-event.h (evpy_add_attribute)
12418 (gdbpy_initialize_event_generic): Constify.
12419 * python/py-evts.c (add_new_registry): Constify.
12420 * python/py-finishbreakpoint.c (outofscope_func): Constify.
12421 * python/py-framefilter.c (get_py_iter_from_func): Constify.
12422 * python/py-inferior.c (get_buffer): Add cast.
12423 * python/py-param.c (parm_constant::name): Constify.
12424 * python/py-unwind.c (fprint_frame_id): Constify.
12425 * python/python.c (gdbpy_parameter_value): Constify.
12426 * remote-fileio.c (remote_fio_func_map): Make 'name' const.
12427 * remote.c (memory_packet_config::name): Constify.
12428 (show_packet_config_cmd, remote_write_bytes)
12429 (remote_buffer_add_string):
12430 * reverse.c (exec_reverse_once): Constify.
12431 * rs6000-tdep.c (variant::name, variant::description): Constify.
12432 * rust-exp.y (rustyyerror): Constify.
12433 * rust-lang.c (rust_op_name): Constify.
12434 * rust-lang.h (rustyyerror): Constify.
12435 * serial.h (serial_ops::name): Constify.
12436 * sh-tdep.c (sh_sh_register_name, sh_sh3_register_name)
12437 (sh_sh3e_register_name, sh_sh2e_register_name)
12438 (sh_sh2a_register_name, sh_sh2a_nofpu_register_name)
12439 (sh_sh_dsp_register_name, sh_sh3_dsp_register_name)
12440 (sh_sh4_register_name, sh_sh4_nofpu_register_name)
12441 (sh_sh4al_dsp_register_name): Constify.
12442 * sh64-tdep.c (sh64_register_name): Constify.
12443 * solib-darwin.c (lookup_symbol_from_bfd): Constify.
12444 * spu-tdep.c (spu_register_name, info_spu_dma_cmdlist): Constify.
12445 * stabsread.c (patch_block_stabs, read_type_number)
12446 (ref_map::stabs, ref_add, process_reference)
12447 (symbol_reference_defined, define_symbol, define_symbol)
12448 (error_type, read_type, read_member_functions, read_cpp_abbrev)
12449 (read_one_struct_field, read_struct_fields, read_baseclasses)
12450 (read_tilde_fields, read_struct_type, read_array_type)
12451 (read_enum_type, read_sun_builtin_type, read_sun_floating_type)
12452 (read_huge_number, read_range_type, read_args, common_block_start)
12453 (find_name_end): Constify.
12454 * stabsread.h (common_block_start, define_symbol)
12455 (process_one_symbol, symbol_reference_defined, ref_add):
12456 * symfile.c (get_section_index, add_symbol_file_command):
12457 * symfile.h (get_section_index): Constify.
12458 * target-descriptions.c (tdesc_type::name): Constify.
12459 (tdesc_free_type): Add cast.
12460 * target.c (find_default_run_target):
12461 (add_deprecated_target_alias, find_default_run_target)
12462 (target_announce_detach): Constify.
12463 (do_option): Constify.
12464 * target.h (add_deprecated_target_alias): Constify.
12465 * thread.c (print_thread_info_1): Constify.
12466 * top.c (deprecated_readline_begin_hook, command_line_input):
12468 (init_main): Add casts.
12469 * top.h (handle_line_of_input): Constify.
12470 * tracefile-tfile.c (tfile_write_uploaded_tsv): Constify.
12471 * tracepoint.c (tvariables_info_1, trace_status_mi): Constify.
12472 (tfind_command): Rename to ...
12473 (tfind_command_1): ... this and constify.
12474 (tfind_command): New function.
12475 (tfind_end_command, tfind_start_command): Adjust.
12476 (encode_source_string): Constify.
12477 * tracepoint.h (encode_source_string): Constify.
12478 * tui/tui-data.c (tui_partial_win_by_name): Constify.
12479 * tui/tui-data.h (tui_partial_win_by_name): Constify.
12480 * tui/tui-source.c (tui_set_source_content_nil): Constify.
12481 * tui/tui-source.h (tui_set_source_content_nil): Constify.
12482 * tui/tui-win.c (parse_scrolling_args): Constify.
12483 * tui/tui-windata.c (tui_erase_data_content): Constify.
12484 * tui/tui-windata.h (tui_erase_data_content): Constify.
12485 * tui/tui-winsource.c (tui_erase_source_content): Constify.
12486 * tui/tui.c (tui_enable): Add cast.
12487 * utils.c (defaulted_query): Constify.
12488 (init_page_info): Add cast.
12489 (puts_debug, subset_compare): Constify.
12490 * utils.h (subset_compare): Constify.
12491 * varobj.c (varobj_format_string): Constify.
12492 * varobj.h (varobj_format_string): Constify.
12493 * vax-tdep.c (vax_register_name): Constify.
12494 * windows-nat.c (windows_detach): Constify.
12495 * xcoffread.c (process_linenos, xcoff_next_symbol_text): Constify.
12496 * xml-support.c (gdb_xml_end_element): Constify.
12497 * xml-tdesc.c (tdesc_start_reg): Constify.
12498 * xstormy16-tdep.c (xstormy16_register_name): Constify.
12499 * xtensa-tdep.c (xtensa_find_register_by_name): Constify.
12500 * xtensa-tdep.h (xtensa_register_t::name): Constify.
12502 2017-04-05 Pedro Alves <palves@redhat.com>
12504 * proc-api.c (struct trans): Constify.
12505 (procfs_note): Constify.
12506 * proc-events.c (struct trans, syscall_table):
12507 * proc-flags.c (struct trans): Constify.
12508 * proc-utils.h (procfs_note): Constify.
12509 * proc-why.c (struct trans): Constify.
12510 * procfs.c (dead_procinfo, find_syscall, proc_warn, proc_error)
12511 (procfs_detach): Constify.
12512 * sol-thread.c (struct string_map): Constify.
12513 (td_err_string, td_state_string): Constify.
12515 2017-04-05 Pedro Alves <palves@redhat.com>
12517 * proc-api.c (procfs_filename): Don't initialize
12519 (prepare_to_trace): Assume procfs_filename is non-NULL.
12520 (_initialize_proc_api): Give procfs_filename a default value here.
12522 2017-04-05 Pedro Alves <palves@redhat.com>
12524 * break-catch-throw.c (handle_gnu_v3_exceptions): Constify
12525 'cond_string' parameter.
12526 (extract_exception_regexp): Constify 'string' parameter.
12527 (catch_exception_command_1): Constify.
12528 * breakpoint.c (init_catchpoint)
12529 (create_fork_vfork_event_catchpoint): Constify 'cond_string'
12531 (ep_parse_optional_if_clause, catch_fork_command_1)
12532 (catch_exec_command_1): Constify.
12533 * breakpoint.h (init_catchpoint): Constify 'cond_string'
12535 (ep_parse_optional_if_clause): Constify.
12536 * cli/cli-utils.c (remove_trailing_whitespace)
12537 (check_for_argument): Constify.
12538 * cli/cli-utils.h (remove_trailing_whitespace): Constify and add
12539 non-const overload.
12540 (check_for_argument): Likewise.
12542 2017-04-05 Pedro Alves <palves@redhat.com>
12544 * event-top.c (command_line_handler): Add cast to execute_command
12546 * record-btrace.c (cmd_record_btrace_bts_start)
12547 (cmd_record_btrace_pt_start, cmd_record_btrace_start)
12548 (cmd_record_btrace_start): Add cast to execute_command call.
12549 * record-full.c (record_full_goto_insn):
12550 * record.c (record_start, record_stop): Add cast to
12551 execute_command_to_string calls.
12552 (cmd_record_start): Add cast to execute_command calls.
12554 2017-04-05 Pedro Alves <palves@redhat.com>
12556 * python/python-internal.h (gdb_PyArg_ParseTupleAndKeywords): New
12557 static inline function.
12558 * python/py-arch.c (archpy_disassemble): Constify 'keywords'
12559 array and use gdb_PyArg_ParseTupleAndKeywords.
12560 * python/py-cmd.c (cmdpy_init): Likewise.
12561 * python/py-finishbreakpoint.c (bpfinishpy_init): Likewise.
12562 * python/py-inferior.c (infpy_read_memory, infpy_write_memory)
12563 (infpy_search_memory): Likewise.
12564 * python/py-objfile.c (objfpy_add_separate_debug_file)
12565 (gdbpy_lookup_objfile): Likewise.
12566 * python/py-symbol.c (gdbpy_lookup_symbol)
12567 (gdbpy_lookup_global_symbol): Likewise.
12568 * python/py-type.c (gdbpy_lookup_type): Likewise.
12569 * python/py-value.c (valpy_lazy_string, valpy_string): Likewise.
12570 * python/python.c (execute_gdb_command, gdbpy_write, gdbpy_flush):
12573 2017-04-05 Pedro Alves <palves@redhat.com>
12575 * python/python-internal.h (gdb_PyGetSetDef): New type.
12576 * python/py-block.c (block_object_getset)
12577 (breakpoint_object_getset): Now a gdb_PyGetSetDef array.
12578 * python/py-event.c (event_object_getset)
12579 (finish_breakpoint_object_getset): Likewise.
12580 * python/py-inferior.c (inferior_object_getset): Likewise.
12581 * python/py-infthread.c (thread_object_getset): Likewise.
12582 * python/py-lazy-string.c (lazy_string_object_getset): Likewise.
12583 * python/py-linetable.c (linetable_entry_object_getset): Likewise.
12584 * python/py-objfile.c (objfile_getset): Likewise.
12585 * python/py-progspace.c (pspace_getset): Likewise.
12586 * python/py-record-btrace.c (btpy_insn_getset, btpy_call_getset):
12588 * python/py-record.c (recpy_record_getset): Likewise.
12589 * python/py-symbol.c (symbol_object_getset): Likewise.
12590 * python/py-symtab.c (symtab_object_getset, sal_object_getset):
12592 * python/py-type.c (type_object_getset, field_object_getset):
12594 * python/py-value.c (value_object_getset): Likewise.
12596 2017-04-05 Pedro Alves <palves@redhat.com>
12598 * python/python-internal.h (gdb_PyObject_CallMethod)
12599 (gdb_PyErr_NewException, gdb_PySys_GetObject, gdb_PySys_SetPath):
12601 (GDB_PYSYS_SETPATH_CHAR, PyObject_CallMethod, PyErr_NewException)
12602 (PySys_GetObject, PySys_SetPath): New macros.
12604 2017-04-05 Pedro Alves <palves@redhat.com>
12606 * mi/mi-cmd-info.c (mi_cmd_info_os): Call info_osdata instead of
12607 info_osdata_command.
12608 * osdata.c (info_osdata_command): Rename to ...
12609 (info_osdata): ... this. Constify 'type' parameter, and remove
12610 the 'from_tty' parameter. Accept NULL TYPE.
12611 (info_osdata_command): New function.
12612 * osdata.h (info_osdata_command): Remove declaration.
12613 (info_osdata): New declaration.
12615 2017-04-05 Pedro Alves <palves@redhat.com>
12617 * mi/mi-cmd-break.c (mi_cmd_break_insert_1, mi_cmd_break_insert)
12618 (mi_cmd_dprintf_insert, mi_cmd_break_passcount)
12619 (mi_cmd_break_watch, mi_cmd_break_commands): Constify 'command'
12621 * mi/mi-cmd-catch.c (mi_cmd_catch_assert, mi_cmd_catch_exception)
12622 (mi_cmd_catch_load, mi_cmd_catch_unload): Constify cmd' parameter.
12623 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Constify 'command'
12625 * mi/mi-cmd-env.c (mi_cmd_env_pwd, mi_cmd_env_cd, mi_cmd_env_path)
12626 (mi_cmd_env_dir, mi_cmd_inferior_tty_set, _cmd_inferior_tty_show)
12627 * mi/mi-cmd-file.c (mi_cmd_file_list_exec_source_file)
12628 (mi_cmd_file_list_exec_source_files)
12629 (mi_cmd_file_list_shared_libraries): Constify 'command' parameter.
12630 * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions)
12631 (mi_cmd_info_gdb_mi_command, mi_cmd_info_os): Constify 'command'
12633 * mi/mi-cmd-stack.c (mi_cmd_enable_frame_filters)
12634 (mi_cmd_stack_list_frames, mi_cmd_stack_info_depth)
12635 (mi_cmd_stack_list_locals, mi_cmd_stack_list_args)
12636 (mi_cmd_stack_list_variables, mi_cmd_stack_select_frame)
12637 (mi_cmd_stack_info_frame): Constify 'command' parameter.
12638 * mi/mi-cmd-target.c (mi_cmd_target_file_get)
12639 (mi_cmd_target_file_put, mi_cmd_target_file_delete): Constify
12640 'command' parameter.
12641 * mi/mi-cmd-var.c (mi_cmd_var_create, mi_cmd_var_delete)
12642 (mi_cmd_var_set_format, mi_cmd_var_set_visualizer)
12643 (mi_cmd_var_set_frozen, mi_cmd_var_show_format)
12644 (mi_cmd_var_info_num_children, mi_cmd_var_list_children)
12645 (mi_cmd_var_info_type, mi_cmd_var_info_path_expression)
12646 (mi_cmd_var_info_expression, mi_cmd_var_show_attributes)
12647 (mi_cmd_var_evaluate_expression, mi_cmd_var_assign)
12648 (mi_cmd_var_update, mi_cmd_enable_pretty_printing)
12649 (mi_cmd_var_set_update_range): Constify 'command' parameter.
12650 * mi/mi-cmds.h (mi_cmd_argv_ftype): Constify 'command' parameter.
12651 * mi/mi-interp.c (mi_cmd_interpreter_exec): Constify 'command'
12653 * mi/mi-main.c (mi_cmd_gdb_exit, mi_cmd_exec_next)
12654 (mi_cmd_exec_next_instruction, mi_cmd_exec_step)
12655 (mi_cmd_exec_step_instruction, mi_cmd_exec_finish)
12656 (mi_cmd_exec_return ,mi_cmd_exec_jump, mi_cmd_exec_continue)
12657 (mi_cmd_exec_interrupt, mi_cmd_exec_run, mi_cmd_target_detach)
12658 (mi_cmd_target_flash_erase, mi_cmd_thread_select)
12659 (mi_cmd_thread_list_ids, mi_cmd_thread_info)
12660 (mi_cmd_list_thread_groups, mi_cmd_data_list_register_names)
12661 (mi_cmd_data_list_changed_registers)
12662 (mi_cmd_data_write_register_values)
12663 (mi_cmd_data_evaluate_expression, mi_cmd_data_read_memory)
12664 (mi_cmd_data_read_memory_bytes, mi_cmd_data_write_memory)
12665 (mi_cmd_data_write_memory_bytes, mi_cmd_enable_timings)
12666 (mi_cmd_list_features, mi_cmd_list_target_features)
12667 (mi_cmd_add_inferior, mi_cmd_remove_inferior)
12668 (mi_cmd_trace_define_variable, mi_cmd_trace_list_variables)
12669 (mi_cmd_trace_find, mi_cmd_trace_save, mi_cmd_trace_start)
12670 (mi_cmd_trace_status, mi_cmd_trace_stop, mi_cmd_ada_task_info)
12671 (mi_cmd_trace_frame_collected): Constify 'command'
12673 * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Constify
12674 'command' parameter.
12676 2017-04-05 Pedro Alves <palves@redhat.com>
12678 * ada-lang.c (ada_completer_word_break_characters): Now a const
12680 (ada_get_gdb_completer_word_break_characters): Constify.
12681 * completer.c (gdb_completer_command_word_break_characters)
12682 (gdb_completer_file_name_break_characters)
12683 (gdb_completer_quote_characters): Now const arrays.
12684 (get_gdb_completer_quote_characters): Constify.
12685 (set_rl_completer_word_break_characters): New function.
12686 (set_gdb_completion_word_break_characters)
12687 (complete_line_internal): Use it.
12688 * completer.h (get_gdb_completer_quote_characters): Constify.
12689 (set_rl_completer_word_break_characters): Declare.
12690 * f-lang.c (f_word_break_characters): Constify.
12691 * language.c (default_word_break_characters): Constify.
12692 * language.h (language_defn::la_word_break_characters): Constify.
12693 (default_word_break_characters): Constify.
12694 * top.c (init_main): Use set_rl_completer_word_break_characters.
12696 2017-04-05 Pedro Alves <palves@redhat.com>
12698 * aix-thread.c (aix_thread_pid_to_str)
12699 (aix_thread_extra_thread_info): Constify.
12700 * bsd-kvm.c (bsd_kvm_pid_to_str): Constify.
12701 * bsd-uthread.c (bsd_uthread_extra_thread_info)
12702 (bsd_uthread_pid_to_str): Constify.
12703 * corelow.c (core_pid_to_str): Constify.
12704 * darwin-nat.c (darwin_pid_to_str): Constify.
12705 * fbsd-nat.c (fbsd_pid_to_str): Constify.
12706 * fbsd-tdep.c (fbsd_core_pid_to_str, gdbarch_core_pid_to_str):
12708 * gnu-nat.c (gnu_pid_to_str): Constify.
12709 * go32-nat.c (go32_pid_to_str): Constify.
12710 * i386-cygwin-tdep.c (i386_windows_core_pid_to_str): Constify.
12711 * inf-ptrace.c (inf_ptrace_pid_to_str): Constify.
12712 * inferior.c (inferior_pid_to_str): Constify.
12713 * linux-nat.c (linux_nat_pid_to_str): Constify.
12714 * linux-tdep.c (linux_core_pid_to_str): Constify.
12715 * linux-thread-db.c (thread_db_pid_to_str)
12716 (thread_db_extra_thread_info): Constify.
12717 * nto-tdep.c (nto_extra_thread_info): Constify.
12718 * nto-tdep.h (nto_extra_thread_info): Constify.
12719 * obsd-nat.c (obsd_pid_to_str): Constify.
12720 * procfs.c (procfs_pid_to_str): Constify.
12721 * ravenscar-thread.c (ravenscar_extra_thread_info)
12722 (ravenscar_pid_to_str): Constify.
12723 * remote-sim.c (gdbsim_pid_to_str): Constify.
12724 * remote.c (remote_threads_extra_info, remote_pid_to_str):
12726 * sol-thread.c (solaris_pid_to_str): Constify.
12727 * sol2-tdep.c (sol2_core_pid_to_str): Constify.
12728 * sol2-tdep.h (sol2_core_pid_to_str): Constify.
12729 * target.c (default_pid_to_str, target_pid_to_str)
12730 (normal_pid_to_str, default_pid_to_str): Constify.
12731 * target.h (target_ops::to_pid_to_str)
12732 (target_ops::to_extra_thread_info): Constify.
12733 (target_pid_to_str, normal_pid_to_str): Constify.
12734 * windows-nat.c (windows_pid_to_str): Constify.
12735 * gdbarch.sh (core_pid_to_str): Constify.
12736 * target-delegates.c: Regenerate.
12737 * gdbarch.h, gdbarch.c: Regenerate.
12739 2017-04-05 Pedro Alves <palves@redhat.com>
12741 * main.c (captured_main_1): Use gdb::unique_xmalloc_ptr to manage
12742 the memory of the temporary warning_pre_print override.
12743 * utils.c (warning_pre_print): Constify.
12744 * utils.h (warning_pre_print): Constify.
12746 2017-04-05 Pedro Alves <palves@redhat.com>
12748 * cli/cli-cmds.c (shell_escape): Constify 'arg' parameter.
12749 (shell_command): New function.
12750 (make_command): Use std::string.
12751 (init_cli_cmds): Register shell_command instead of shell_escape.
12753 2017-04-05 Pedro Alves <palves@redhat.com>
12755 * breakpoint.c (dprintf_function, dprintf_channel): Don't initialize.
12756 * tracepoint.c (default_collect): Don't initialize.
12758 2017-04-05 Pedro Alves <palves@redhat.com>
12760 * macroexp.c (macro_buffer::shared): Now a bool.
12761 (init_buffer): Update.
12762 (init_shared_buffer): Constify 'addr' parameter.
12763 (substitute_args, expand, macro_expand, macro_expand_next): Remove
12766 2017-04-05 Pedro Alves <palves@redhat.com>
12768 * arm-tdep.c (show_disassembly_style_sfunc): Constify local.
12769 * disasm.c (set_disassembler_options): Constify local.
12770 * i386-tdep.c (i386_print_insn): Remove cast and FIXME comment.
12772 2017-04-05 Sergio Durigan Junior <sergiodj@redhat.com>
12775 * tracefile.c (tsave_command): Fix argument parsing for '-r'
12778 2017-04-05 Yao Qi <yao.qi@linaro.org>
12780 * frame.c (frame_unwind_register_unsigned): Call
12781 frame_unwind_register_value.
12783 2017-04-05 Yao Qi <yao.qi@linaro.org>
12785 * gdb.threads/thread-specific-bp.exp (check_thread_specific_breakpoint):
12786 Use gdb_test_multiple, and don't match anchor.
12788 2017-04-05 Pedro Alves <palves@redhat.com>
12790 * MAINTAINERS (Global Maintainers): Add Simon Marchi.
12791 (Write After Approval): Remove Simon Marchi.
12793 2017-04-05 Pedro Alves <palves@redhat.com>
12795 * common/gdb_optional.h (optional::optional): Make constexpr and
12796 initialize m_dummy.
12798 2017-04-04 John Baldwin <jhb@FreeBSD.org>
12800 * amd64-fbsd-tdep.c: Remove "bsd-uthread.h" include.
12801 (amd64fbsd_jmp_buf_reg_offset): Remove.
12802 (amd64fbsd_supply_uthread): Remove function.
12803 (amd64fbsd_collect_uthread): Remove function.
12804 (amd64fbsd_init_abi): Don't set bsd-uthread callbacks.
12805 * configure.tgt (i[34567]86-*-freebsd*): Remove bsd-uthread.o.
12806 (x86_64-*-freebsd*): Remove bsd-uthread.o.
12807 (fbsd-nat.c): Update comment.
12808 * i386-fbsd-tdep.c: Remove "bsd-uthread.h" include.
12809 (i386fbsd_jmp_buf_reg_offset): Remove.
12810 (i386fbsd_supply_uthread): Remove function.
12811 (i386fbsd_collect_uthread): Remove function.
12812 (i386fbsd_init_abi): Don't set bsd-uthread callbacks.
12814 2017-04-04 John Baldwin <jhb@FreeBSD.org>
12816 * Makefile.in (ALL_64_TARGET_OBS): Remove alpha-fbsd-tdep.o.
12817 (ALLDEPFILES): Remove alpha-fbsd-tdep.c
12818 * NEWS: Mention that support for FreeBSD/alpha was removed.
12819 * alpha-fbsd-tdep.c: Delete file.
12820 * config/alpha/fbsd.mh: Delete file.
12821 * configure.host: Delete alpha*-*-freebsd* and
12822 alpha*-*-kfreebsd*-gnu.
12823 * configure.tgt: Delete alpha*-*-freebsd* and
12824 alpha*-*-kfreebsd*-gnu.
12826 2017-04-04 John Baldwin <jhb@FreeBSD.org>
12828 * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers,
12829 amd64bsd_store_inferior_registers): Use ptid from regcache.
12831 2017-04-04 Pedro Alves <palves@redhat.com>
12833 * dwarf2read.c (lnp_state_machine): Now a class. Initialize all
12834 data fields, make them private and add "m_" prefixes.
12835 (lnp_state_machine::lnp_state_machine): New ctor.
12836 (record_line, check_line_address, handle_set_discriminator)
12837 (handle_set_address, handle_advance_pc, handle_special_opcode)
12838 (handle_advance_line, handle_set_file, handle_negate_stmt)
12839 (handle_const_add_pc, handle_fixed_advance_pc, handle_copy)
12840 (end_sequence, advance_line): New methods.
12841 (m_gdbarch, m_record_lines_p): New fields.
12842 (lnp_reader_state): Delete.
12843 (dwarf_record_line): Rename to ...
12844 (lnp_state_machine::record_line): ... adjust.
12845 (init_lnp_state_machine): Delete.
12846 (lnp_state_machine::lnp_state_machine): New.
12847 (check_line_address): Rename to ...
12848 (lnp_state_machine::check_line_address): This.
12849 (dwarf_decode_lines_1): Remove reference to "reader_state".
12850 Adjust lnp_state_machine having a non-default ctor. Use bool.
12851 State machine internal state manipulation moved to
12852 lnp_state_machine methods.
12854 2017-04-04 Pedro Alves <palves@redhat.com>
12856 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
12857 unittests/offset-type-selftests.c.
12858 (SUBDIR_UNITTESTS_OBS): Add offset-type-selftests.o.
12859 * common/offset-type.h: New file.
12860 * common/preprocessor.h: New file.
12861 * common/traits.h: New file.
12862 * common/valid-expr.h: New file.
12863 * dwarf2expr.c: Include "common/underlying.h". Adjust to use
12864 sect_offset and cu_offset strong typedefs throughout.
12865 * dwarf2expr.h: Adjust to use sect_offset and cu_offset strong
12866 typedefs throughout.
12867 * dwarf2loc.c: Include "common/underlying.h". Adjust to use
12868 sect_offset and cu_offset strong typedefs throughout.
12869 * dwarf2read.c: Adjust to use sect_offset and cu_offset strong
12870 typedefs throughout.
12871 * gdbtypes.h: Include "common/offset-type.h".
12872 (cu_offset): Now an offset type (strong typedef) instead of a
12874 (sect_offset): Likewise.
12875 (union call_site_parameter_u): Rename "param_offset" field to
12877 * unittests/offset-type-selftests.c: New file.
12879 2017-04-04 Pedro Alves <palves@redhat.com>
12881 * common/underlying.h: New file.
12882 * dwarf2read.c: Include "common/gdb_optional.h" and
12883 "common/underlying.h".
12884 (dir_index, file_name_index): New types.
12885 (file_entry): Use them.
12886 (file_entry::include): Use to_underlying.
12887 (line_header::add_file_name): Use dir_index.
12888 (read_formatted_entries): Use gdb::optional. Read form before
12889 writting to file_entry.
12890 (dwarf_decode_line_header): Use dir_index.
12891 (lnp_state_machine::current_file): Use to_underlying.
12892 (lnp_state_machine::file): Change type to file_name_index.
12893 (dwarf_record_line): Use to_underlying.
12894 (init_lnp_state_machine): Use file_name_index.
12895 (dwarf_decode_lines_1): Use dir_index and file_name_index.
12897 2017-04-04 Pedro Alves <palves@redhat.com>
12899 * common/gdb_optional.h (gdb::optiona): Add operator->, operator*,
12900 operator bool, has_value and get methods.
12902 2017-04-04 Pedro Alves <palves@redhat.com>
12904 * dwarf2read.c (struct file_entry): Add ctors, and initialize all
12906 (line_header): Initialize all data fields. Change type of
12907 standard_opcode_lengths to std::unique_ptr<unsigned char[]>.
12908 Change type of include_dirs to std::vector<const char *>. Remove
12909 num_include_dirs, include_dirs_size. Change type of file_names to
12910 std::vector<file_entry>. Remove num_file_names, file_names_size.
12911 (line_header::line_header): New.
12912 (line_header::add_include_dir, line_header::add_file_name): New
12914 (line_header::include_dir_at): Remove NULL check.
12915 (line_header::file_name_at): Add const overload.
12916 (line_header_up): New unique_ptr typedef.
12917 (dw2_get_file_names_reader): Use line_header_up. Adjust to use
12918 std::vector. Remove free_line_header call.
12919 (dwarf2_build_include_psymtabs): Use line_header_up. Remove
12920 free_line_header call.
12921 (free_cu_line_header): Delete.
12922 (handle_DW_AT_stmt_list, handle_DW_AT_stmt_list)
12923 (setup_type_unit_groups): Use line_header_up instead of cleanups.
12924 Adjust to use std::vector.
12925 (free_line_header): Delete.
12926 (free_line_header_voidp): Use delete.
12927 (add_include_dir): Replace with ...
12928 (line_header::add_include_dir): ... this method. Use std::vector.
12929 (add_file_name): Replace with ...
12930 (line_header::add_file_name): ... this method. Use std::vector.
12931 (add_include_dir_stub): Delete.
12932 (read_formatted_entries): Remove memset.
12933 (dwarf_decode_line_header): Return a line_header_up instead of a
12934 raw pointer. Remove cleanup handling. Pass lambdas to
12935 read_formatted_entries. Adjust to use line_header methods.
12936 (dwarf_decode_lines_1): Adjust to use line_header methods.
12937 (dwarf_decode_lines, file_file_name, file_full_name): Adjust to
12940 2017-04-04 Simon Marchi <simon.marchi@polymtl.ca>
12942 * remote.c (set_general_thread, set_continue_thread): Use ptid_t
12943 instead of struct ptid.
12945 2017-05-04 Alan Hayward <alan.hayward@arm.com>
12947 * frame.c (get_frame_register_bytes): Unwind using value.
12948 (put_frame_register_bytes): Likewise.
12950 2017-03-30 Iain Buclaw <ibuclaw@gdcproject.org>
12952 * d-exp.y (type_aggregate_p): Treat TYPE_CODE_MODULE as being
12955 2017-03-29 Jan Kratochvil <jan.kratochvil@redhat.com>
12957 * auto-load.c (auto_load_section_scripts): Check SEC_HAS_CONTENTS.
12959 2017-03-29 Yao Qi <yao.qi@linaro.org>
12961 * gdbthread.h (struct thread_info): Declare constructor and
12962 destructor. Add some in-class member initializers.
12963 * thread.c (free_thread): Remove.
12964 (init_thread_list): Call delete instead of free_thread.
12965 (new_thread): Call thread_info constructor.
12966 (thread_info::thread_info): New function.
12967 (thread_info::~thread_info): New function.
12968 (delete_thread_1): Call delete instead of free_thread.
12969 (make_cleanup_restore_current_thread): Move tp and frame to
12972 2017-03-28 Anton Kolesov <anton.kolesov@synopsys.com>
12974 * arc-tdep.c (arc_frame_cache): Add support for prologue analysis.
12975 (arc_skip_prologue): Likewise.
12976 (arc_make_frame_cache): Likewise.
12977 (arc_pv_get_operand): New function.
12978 (arc_is_in_prologue): Likewise.
12979 (arc_analyze_prologue): Likewise.
12980 (arc_print_frame_cache): Likewise.
12981 (MAX_PROLOGUE_LENGTH): New constant.
12983 2017-03-28 Anton Kolesov <anton.kolesov@synopsys.com>
12985 * configure.tgt: Add arc-insn.o.
12986 * arc-tdep.c (arc_delayed_print_insn): Make non-static.
12987 (dump_arc_instruction_command): New function.
12988 (arc_fprintf_disasm): Likewise.
12989 (arc_disassemble_info): Likewise.
12990 (arc_insn_get_operand_value): Likewise.
12991 (arc_insn_get_operand_value_signed): Likewise.
12992 (arc_insn_get_memory_base_reg): Likewise.
12993 (arc_insn_get_memory_offset): Likewise.
12994 (arc_insn_get_branch_target): Likewise.
12995 (arc_insn_dump): Likewise.
12996 (arc_insn_get_linear_next_pc): Likewise.
12997 * arc-tdep.h (arc_delayed_print_insn): Add function declaration.
12998 (arc_disassemble_info): Likewise.
12999 (arc_insn_get_branch_target): Likewise.
13000 (arc_insn_get_linear_next_pc): Likewise.
13001 * NEWS: Mention new "maint print arc arc-instruction".
13003 2017-03-28 Anton Kolesov <anton.kolesov@synopsys.com>
13005 * arc-tdep (maintenance_print_arc_list): New variable.
13006 (maintenance_print_arc_command): New function.
13008 2017-03-28 Anton Kolesov <anton.kolesov@synopsys.com>
13010 * arc-tdep.c (core_v2_register_names, core_arcompact_register_names)
13011 Add "limm" and "reserved".
13012 (arc_cannot_fetch_register, arc_cannot_store_register): Add
13013 ARC_RESERVED_REGNUM and ARC_LIMM_REGNUM.
13014 * arc-tdep.h (arc_regnum): Likewise.
13016 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
13018 * xtensa-linux-nat.c (fill_gregset): Call regcache_raw_collect
13019 for THREADPTR register.
13020 (supply_gregset_reg): Call regcache_raw_supply for THREADPTR
13022 * xtensa-tdep.c (XTENSA_DBREGN_UREG): New definition.
13023 (xtensa_derive_tdep): Initialize tdep->threadptr_regnum.
13024 * xtensa-tdep.h (gdbarch_tdep::threadptr_regnum): New field.
13026 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
13028 * xtensa-tdep.c (xtensa_pseudo_register_read): Treat all
13029 registers above gdbarch_num_regs (gdbarch) as privileged in
13032 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
13034 * xtensa-linux-nat.c (fill_gregset): Call regcache_raw_collect
13035 for a single specified register or for all registers in
13036 a0_base..a0_base + C0_NREGS range.
13037 (supply_gregset_reg): Call regcache_raw_supply for a single
13038 specified register or for all registers in a0_base..a0_base +
13041 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
13043 * arch/xtensa.h (C0_NREGS): Add definition.
13044 * xtensa-tdep.c (C0_NREGS): Remove definition.
13046 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
13048 * xtensa-tdep.c (xtensa_scan_prologue, call0_analyze_prologue):
13049 Drop xtensa_default_isa initialization.
13050 (xtensa_gdbarch_init): Initialize xtensa_default_isa.
13052 2017-03-27 Pedro Alves <palves@redhat.com>
13054 * dwarf2read.c (file_entry) <dir_index>: Add comment.
13055 (file_entry::include_dir): New method.
13056 (line_header::include_dir_at, line_header::file_name_at): New
13058 (setup_type_unit_groups, setup_type_unit_groups)
13059 (psymtab_include_file_name): Simplify using the new methods.
13060 (lnp_state_machine) <the_line_header>: New field.
13061 <file>: Add comment.
13062 (lnp_state_machine::current_file): New method.
13063 (dwarf_record_line): Simplify using the new methods.
13064 (init_lnp_state_machine): Initialize the "the_line_header" field.
13065 (dwarf_decode_lines_1, dwarf_decode_lines, file_file_name):
13066 Simplify using the new methods.
13068 2017-03-27 Pedro Alves <palves@redhat.com>
13070 * cp-name-parser.y (make_empty): Delete.
13071 (demangler_special, nested_name, ptr_operator, array_indicator)
13072 (direct_declarator, declarator_1): Use fill_comp instead of
13075 2017-03-27 Pedro Alves <palves@redhat.com>
13077 * xml-support.h (gdb_xml_debug): Pass a "first-to-check" argument
13078 to ATTRIBUTE_PRINTF.
13079 * solib-target.c (library_list_start_list): Print "string" not
13081 * xml-tdesc.c (tdesc_start_field): Pass "field_name" to
13082 gdb_xml_error call.
13084 2017-03-27 Pedro Alves <palves@redhat.com>
13086 * dwarf2read.c (struct file_and_directory): New.
13087 (dwarf2_get_dwz_file): Adjust to use std::string.
13088 (dw2_get_file_names_reader): Adjust to use file_and_directory.
13089 (find_file_and_directory): Adjust to return a file_and_directory
13091 (read_file_scope): Adjust to use file_and_directory. Remove
13092 make_cleanup/do_cleanups calls.
13093 (open_and_init_dwp_file): Adjust to use std::string. Remove
13094 make_cleanup/do_cleanups calls.
13095 * python/python.c (do_start_initialization): Adjust to ldirname
13096 returning a std::string.
13097 * utils.c (ldirname): Now returns a std::string.
13098 * utils.h (ldirname): Change return type to std::string.
13099 * xml-syscall.c (xml_init_syscalls_info): Adjust to ldirname
13100 returning a std::string.
13101 * xml-tdesc.c (file_read_description_xml): Likewise.
13103 2017-03-24 Alan Hayward <alan.hayward@arm.com>
13105 * regcache.c (regcache_debug_print_register): New function.
13106 * regcache.h (regcache_debug_print_register): New declaration.
13107 * target.c (debug_print_register): Remove.
13108 (target_fetch_registers): Call regcache_debug_print_register.
13109 (target_store_registers): Likewise.
13111 2017-03-24 Pádraig Brady <pbrady@fb.com>
13113 * dwarf2read.c (setup_type_unit_groups): Ensure dir_index doesn't
13114 reference beyond the 'lh->include_dirs' array before accessing to
13116 (psymtab_include_file_name): Likewise.
13117 (dwarf_decode_lines_1): Likewise.
13118 (dwarf_decode_lines): Likewise.
13119 (file_file_name): Likewise.
13121 2017-03-23 Simon Marchi <simon.marchi@ericsson.com>
13123 * fbsd-tdep.c (fbsd_corefile_thread): Don't set/restore
13125 * proc-service.c (ps_lgetregs, ps_lsetregs, ps_lgetfpregs,
13126 ps_lsetfpregs): Likewise.
13127 * regcache.c (regcache_raw_update, regcache_raw_write): Likewise.
13128 * sol-thread.c (ps_lgetregs, ps_lsetregs, ps_lgetfpregs,
13129 ps_lsetfpregs): Likewise.
13130 * target.c (target_fetch_registers, target_store_registers):
13133 2017-03-23 Alan Hayward <alan.hayward@arm.com>
13135 * sol-thread.c (sol_thread_store_registers): Remove regcache calls.
13137 2017-03-23 Yao Qi <yao.qi@linaro.org>
13139 * aarch64-tdep.c (aarch64_process_record_test): Declare.
13140 (_initialize_aarch64_tdep): Register it.
13141 (aarch64_record_load_store): Handle PRFM instruction.
13142 (aarch64_process_record_test): New function.
13144 2017-03-23 Yao Qi <yao.qi@linaro.org>
13146 * aarch64-tdep.c (aarch64_record_load_store): Fix code
13149 2017-03-23 Yao Qi <yao.qi@linaro.org>
13151 * aarch64-tdep.c: Remove AARCH64_RECORD_FAILURE.
13153 2017-03-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
13155 python/python.c (do_start_initialization): Fix memory leak.
13157 2017-03-22 Simon Marchi <simon.marchi@polymtl.ca>
13159 * inf-ptrace.c (inf_ptrace_xfer_partial): Get pid from ptid
13160 using get_ptrace_pid.
13161 * linux-nat.c (linux_nat_xfer_partial): Don't set/restore
13163 (linux_proc_xfer_partial, linux_proc_xfer_spu): Use lwp of
13164 inferior_ptid instead of pid.
13166 2017-03-22 Yao Qi <yao.qi@linaro.org>
13168 * aarch64-tdep.c: Wrap locally used classes in anonymous
13170 * arm-tdep.c: Likewise.
13171 * linespec.c: Likewise.
13172 * ui-out.c: Likewise.
13174 2017-03-22 Jonah Graham <jonah@kichwacoders.com>
13177 * python/lib/gdb/printer/bound_registers.py: Import sys.
13179 2017-03-21 Simon Marchi <simon.marchi@ericsson.com>
13181 * windows-nat.c (do_windows_fetch_inferior_registers): Add
13182 windows_thread_info parameter and use it instead of
13184 (windows_fetch_inferior_registers): Don't set current_thread,
13185 pass the thread to do_windows_fetch_inferior_registers. Use
13186 ptid from regcache instead of inferior_ptid.
13187 (do_windows_store_inferior_registers): Add windows_thread_info
13188 parameter and use it instead of current_thread.
13189 (windows_store_inferior_registers): Don't set current_thread,
13190 pass the thread to do_windows_store_inferior_registers. Use
13191 ptid from regcache instead of inferior_ptid.
13193 2017-03-21 Simon Marchi <simon.marchi@ericsson.com>
13195 * ser-mingw.c (ser_windows_raw): Remove reference to
13196 struct serial::current_timeout.
13198 2017-03-21 Ivo Raisr <ivo.raisr@oracle.com>
13201 * gdb/sparc-tdep.h (gdbarch_tdep) <sparc64_ccr_type>: New field.
13202 * gdb/sparc64-tdep.c (sparc64_ccr_type): New function.
13203 (sparc64_fsr_type): Fix %fsr decoding.
13205 2017-03-21 Tim Wiederhake <tim.wiederhake@intel.com>
13207 * python/py-record-btrace.c (btpy_insn_data): Change return type
13210 2017-03-20 Simon Marchi <simon.marchi@polymtl.ca>
13212 * spu-linux-nat.c (spu_fetch_inferior_registers,
13213 spu_store_inferior_registers): Use ptid from regcache, set and
13214 restore inferior_ptid.
13215 * spu-multiarch.c (spu_fetch_registers, spu_store_registers):
13218 2017-03-20 Simon Marchi <simon.marchi@polymtl.ca>
13220 * i386-linux-nat.c (fetch_register, store_register,
13221 i386_linux_fetch_inferior_registers,
13222 i386_linux_store_inferior_registers): Use ptid from regcache.
13223 * ia64-linux-nat.c (ia64_linux_fetch_register,
13224 ia64_linux_store_register): Likewise.
13225 * inf-ptrace.c (inf_ptrace_fetch_register,
13226 inf_ptrace_store_register): Likewise.
13227 * m32r-linux-nat.c (m32r_linux_fetch_inferior_registers,
13228 m32r_linux_store_inferior_registers): Likewise.
13229 * m68k-bsd-nat.c (m68kbsd_fetch_inferior_registers,
13230 m68kbsd_store_inferior_registers): Likewise.
13231 * m68k-linux-nat.c (fetch_register, store_register,
13232 m68k_linux_fetch_inferior_registers,
13233 m68k_linux_store_inferior_registers): Likewise.
13234 * m88k-bsd-nat.c (m88kbsd_fetch_inferior_registers,
13235 m88kbsd_store_inferior_registers): Likewise.
13236 * mips-fbsd-nat.c (mips_fbsd_fetch_inferior_registers,
13237 mips_fbsd_store_inferior_registers): Likewise.
13238 * mips-linux-nat.c (mips64_linux_regsets_fetch_registers,
13239 mips64_linux_regsets_store_registers): Likewise.
13240 * mips-nbsd-nat.c (mipsnbsd_fetch_inferior_registers,
13241 mipsnbsd_store_inferior_registers): Likewise.
13242 * mips-obsd-nat.c (mips64obsd_fetch_inferior_registers,
13243 mips64obsd_store_inferior_registers): Likewise.
13244 * nto-procfs.c (procfs_fetch_registers, procfs_store_registers):
13246 * ppc-fbsd-nat.c (ppcfbsd_fetch_inferior_registers,
13247 ppcfbsd_store_inferior_registers): Likewise.
13248 * ppc-linux-nat.c (ppc_linux_fetch_inferior_registers,
13249 ppc_linux_store_inferior_registers): Likewise.
13250 * ppc-nbsd-nat.c (ppcnbsd_fetch_inferior_registers,
13251 ppcnbsd_store_inferior_registers): Likewise.
13252 * ppc-obsd-nat.c (ppcobsd_fetch_registers,
13253 ppcobsd_store_registers): Likewise.
13254 * procfs.c (procfs_fetch_registers, procfs_store_registers):
13256 * ravenscar-thread.c (ravenscar_fetch_registers,
13257 ravenscar_store_registers, ravenscar_prepare_to_store):
13259 * record-btrace.c (record_btrace_fetch_registers,
13260 record_btrace_store_registers, record_btrace_prepare_to_store):
13262 * remote-sim.c (gdbsim_fetch_register, gdbsim_store_register):
13263 Lookup inferior using ptid from regcache, instead of
13265 * remote.c (remote_fetch_registers, remote_store_registers): Use
13266 ptid from regcache.
13267 * rs6000-nat.c (fetch_register, store_register): Likewise.
13268 * s390-linux-nat.c (s390_linux_fetch_inferior_registers,
13269 s390_linux_store_inferior_registers): Likewise.
13270 * sh-nbsd-nat.c (shnbsd_fetch_inferior_registers,
13271 shnbsd_store_inferior_registers): Likewise.
13272 * sol-thread.c (sol_thread_fetch_registers,
13273 sol_thread_store_registers): Likewise.
13274 * sparc-nat.c (sparc_fetch_inferior_registers,
13275 sparc_store_inferior_registers): Likewise.
13276 * tilegx-linux-nat.c (fetch_inferior_registers,
13277 store_inferior_registers): Likewise.
13278 * vax-bsd-nat.c (vaxbsd_fetch_inferior_registers,
13279 vaxbsd_store_inferior_registers): Likewise.
13280 * xtensa-linux-nat.c (fetch_gregs, store_gregs, fetch_xtregs,
13281 store_xtregs): Likewise.
13283 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
13286 * NEWS: Mention support for rvalue references in GDB and python.
13287 * doc/gdb.texinfo (C Plus Plus Expressions): Mention that GDB
13288 supports both lvalue and rvalue references.
13290 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
13293 * gdbtypes.c (rank_one_type): Implement overloading
13294 resolution rules regarding rvalue references.
13296 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
13299 * aarch64-tdep.c (aarch64_type_align)
13300 (aarch64_extract_return_value, aarch64_store_return_value): Change
13301 lvalue reference type checks to general reference type checks.
13302 * amd64-tdep.c (amd64_classify): Likewise.
13303 * amd64-windows-tdep.c (amd64_windows_passed_by_integer_register):
13305 * arm-tdep.c (arm_type_align, arm_extract_return_value)
13306 (arm_store_return_value): Likewise.
13307 * ax-gdb.c (gen_fetch, gen_cast): Likewise.
13308 * c-typeprint.c (c_print_type): Likewise.
13309 * c-varobj.c (adjust_value_for_child_access, c_value_of_variable)
13310 (cplus_number_of_children, cplus_describe_child): Likewise.
13311 * compile/compile-c-symbols.c (generate_vla_size): Likewise.
13312 * completer.c (expression_completer): Likewise.
13313 * cp-support.c (make_symbol_overload_list_adl_namespace):
13315 * darwin-nat-info.c (info_mach_region_command): Likewise.
13316 * dwarf2loc.c (entry_data_value_coerce_ref)
13317 (value_of_dwarf_reg_entry): Likewise.
13318 * eval.c (ptrmath_type_p, evaluate_subexp_standard)
13319 (evaluate_subexp_for_address, evaluate_subexp_for_sizeof):
13321 * findvar.c (extract_typed_address, store_typed_address):
13323 * gdbtypes.c (rank_one_type): Likewise.
13324 * hppa-tdep.c (hppa64_integral_or_pointer_p): Likewise.
13325 * infcall.c (value_arg_coerce): Likewise.
13326 * language.c (pointer_type): Likewise.
13327 * m32c-tdep.c (m32c_reg_arg_type, m32c_m16c_address_to_pointer):
13329 * m88k-tdep.c (m88k_integral_or_pointer_p): Likewise.
13330 * mn10300-tdep.c (mn10300_type_align): Likewise.
13331 * msp430-tdep.c (msp430_push_dummy_call): Likewise.
13332 * ppc-sysv-tdep.c (do_ppc_sysv_return_value)
13333 (ppc64_sysv_abi_push_param, ppc64_sysv_abi_return_value):
13335 * printcmd.c (print_formatted, x_command): Likewise.
13336 * python/py-type.c (typy_get_composite, typy_template_argument):
13338 * python/py-value.c (valpy_referenced_value)
13339 (valpy_get_dynamic_type, value_has_field): Likewise.
13340 * s390-linux-tdep.c (s390_function_arg_integer): Likewise.
13341 * sparc-tdep.c (sparc_integral_or_pointer_p): Likewise.
13342 * sparc64-tdep.c (sparc64_integral_or_pointer_p): Likewise.
13343 * spu-tdep.c (spu_scalar_value_p): Likewise.
13344 * symtab.c (lookup_symbol_aux): Likewise.
13345 * typeprint.c (whatis_exp, print_type_scalar): Likewise.
13346 * valarith.c (binop_types_user_defined_p, unop_user_defined_p):
13348 * valops.c (value_cast_pointers, value_cast)
13349 (value_reinterpret_cast, value_dynamic_cast, value_addr, typecmp)
13350 (value_struct_elt, value_struct_elt_bitpos)
13351 (value_find_oload_method_list, find_overload_match)
13352 (value_rtti_indirect_type): Likewise.
13353 * valprint.c (val_print_scalar_type_p, generic_val_print):
13355 * value.c (value_actual_type, value_as_address, unpack_long)
13356 (pack_long, pack_unsigned_long, coerce_ref_if_computed)
13357 (coerce_ref): Likewise.
13358 * varobj.c (varobj_get_value_type): Likewise.
13360 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
13363 * doc/python.texi (Types in Python): Add TYPE_CODE_RVALUE_REF to
13364 table of constants.
13365 * python/lib/gdb/command/explore.py: Support exploring values
13366 of rvalue reference types.
13367 * python/lib/gdb/types.py: Implement get_basic_type() for
13368 rvalue reference types.
13369 * python/py-type.c (pyty_codes) <TYPE_CODE_RVALUE_REF>: New
13371 * python/py-value.c (valpy_getitem): Add an rvalue reference
13373 (valpy_reference_value): Add new parameter "refcode".
13374 (valpy_lvalue_reference_value, valpy_rvalue_reference_value):
13375 New wrappers for valpy_reference_value().
13376 * python/py-xmethods.c (gdbpy_get_xmethod_result_type)
13377 (gdbpy_invoke_xmethod): Likewise.
13379 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
13382 * dwarf2read.c (process_die, read_type_die_1): Handle the
13383 DW_TAG_rvalue_reference_type DIE.
13384 (read_tag_reference_type): Add new parameter "refcode".
13386 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
13389 * c-typeprint.c (c_print_type, c_type_print_varspec_prefix)
13390 (c_type_print_modifier, c_type_print_varspec_suffix)
13391 (c_type_print_base): Support printing rvalue reference types.
13392 * c-valprint.c (c_val_print, c_value_print): Support printing
13393 rvalue reference values.
13395 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
13398 * cp-name-parser.y (ptr_operator): Handle the '&&' token in
13400 * cp-support.c (replace_typedefs): Handle
13401 DEMANGLE_COMPONENT_RVALUE_REFERENCE.
13402 * python/py-type.c (typy_lookup_type): Likewise.
13404 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
13407 * c-exp.y (ptr_operator): Handle the '&&' token in the typename.
13408 * parse.c (insert_type): Change assert statement.
13409 (follow_types): Handle rvalue reference types.
13410 * parser-defs.h (enum type_pieces) <tp_rvalue_reference>: New
13413 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
13416 * ada-lang.c (ada_evaluate_subexp): Adhere to the new
13417 value_ref() interface.
13418 * c-valprint.c (c_value_print): Likewise.
13419 * infcall.c (value_arg_coerce): Likewise.
13420 * python/py-value.c (valpy_reference_value): Likewise.
13421 * valops.c (value_cast, value_reinterpret_cast)
13422 (value_dynamic_cast, typecmp): Likewise.
13423 (value_ref): Parameterize by kind of return value reference type.
13424 * value.h (value_ref): Add new parameter "refcode".
13426 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
13429 * dwarf2read.c (read_tag_reference_type): Use
13430 lookup_lvalue_reference_type() instead of lookup_reference_type().
13431 * eval.c (evaluate_subexp_standard): Likewise.
13432 * f-exp.y: Likewise.
13433 * gdbtypes.c (make_reference_type, lookup_reference_type):
13434 Generalize with rvalue reference types.
13435 (lookup_lvalue_reference_type, lookup_rvalue_reference_type): New
13436 convenience wrappers for lookup_reference_type().
13437 * gdbtypes.h (make_reference_type, lookup_reference_type): Add a
13438 reference kind parameter.
13439 (lookup_lvalue_reference_type, lookup_rvalue_reference_type): Add
13440 wrappers for lookup_reference_type().
13441 * guile/scm-type.c (gdbscm_type_reference): Use
13442 lookup_lvalue_reference_type() instead of lookup_reference_type().
13443 * guile/scm-value.c (gdbscm_value_dynamic_type): Likewise.
13444 * parse.c (follow_types): Likewise.
13445 * python/py-type.c (typy_reference, typy_lookup_type): Likewise.
13446 * python/py-value.c (valpy_get_dynamic_type, valpy_getitem):
13448 * python/py-xmethods.c (gdbpy_get_xmethod_result_type)
13449 (gdbpy_invoke_xmethod): Likewise.
13450 * stabsread.c: Provide extra argument to make_reference_type()
13452 * valops.c (value_ref, value_rtti_indirect_type): Use
13453 lookup_lvalue_reference_type() instead of lookup_reference_type().
13455 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
13458 * gdbtypes.h (enum type_code) <TYPE_CODE_RVALUE_REF>: New constant.
13459 (TYPE_IS_REFERENCE): New macro.
13460 (struct type): Add rvalue_reference_type field.
13461 (TYPE_RVALUE_REFERENCE_TYPE): New macro.
13463 2017-03-20 Marc-Andre Laperle <marc-andre.laperle@ericsson.com>
13465 * NEWS: Add an entry about new '-file-list-shared-libraries' command.
13466 * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries):
13467 New function definition.
13468 * mi/mi-cmds.c (mi_cmds): Add -file-list-shared-libraries command.
13469 * mi/mi-cmds.h (mi_cmd_file_list_shared_libraries):
13470 New function declaration.
13471 * mi/mi-interp.c (mi_output_solib_attribs): New Function.
13472 * mi/mi-interp.h: New file.
13473 * solib.c (info_sharedlibrary_command): Replace for loop with
13475 * solib.h (update_solib_list): New function declaration.
13476 (so_list_head): Move macro.
13477 * solist.h (ALL_SO_LIBS): New macro.
13479 2017-03-20 Marc-Andre Laperle <marc-andre.laperle@ericsson.com>
13481 * infcmd.c (post_create_inferior): Remove unused argument in
13483 * remote.c (remote_start_remote): Likewise.
13484 * solib-frv.c (frv_fetch_objfile_link_map): Likewise.
13485 * solib-svr4.c: (svr4_fetch_objfile_link_map): Likewise.
13486 (enable_break): Likewise.
13487 * solib.c (update_solib_list): Remove unused target argument
13488 and its documentation.
13489 (solib_add): Remove unused target argument. Remove unused
13490 argument in call to update_solib_list.
13491 (info_sharedlibrary_command): Remove unused argument in call
13492 to update_solib_list.
13493 (sharedlibrary_command): Remove unused argument in call to
13495 (handle_solib_event): Likewise.
13496 (reload_shared_libraries): Likewise.
13497 * solib.h (solib_add): Remove unused target argument.
13499 2017-03-20 Andreas Arnez <arnez@linux.vnet.ibm.com>
13501 * s390-linux-tdep.c (is_rsi, is_rie): Remove functions.
13502 (s390_displaced_step_fixup): Cover relative branches with the
13503 default fixup handling. This fixes lack of support for some
13504 relative branch instructions.
13506 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
13508 * i386-gnu-nat.c (gnu_fetch_registers, gnu_store_registers): Use
13509 ptid from regcache.
13511 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
13513 * i386-darwin-nat.c (i386_darwin_fetch_inferior_registers,
13514 i386_darwin_store_inferior_registers): Use ptid from regcache.
13516 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
13518 * i386-bsd-nat.c (i386bsd_fetch_inferior_registers,
13519 i386bsd_store_inferior_registers): Use ptid from regcache.
13521 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
13523 * hppa-obsd-nat.c (hppaobsd_fetch_registers,
13524 hppaobsd_store_registers): Use ptid from regcache.
13526 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
13528 * hppa-nbsd-nat.c (hppanbsd_fetch_registers,
13529 hppanbsd_store_registers): Use ptid from regcache.
13531 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
13533 * hppa-linux-nat.c (fetch_register, store_register): Use ptid
13534 from regcache. Use get_ptrace_pid.
13536 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
13538 * corelow.c (get_core_register_section): Use ptid from regcache,
13541 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
13543 * bsd-uthread.c (bsd_uthread_fetch_registers,
13544 bsd_uthread_store_registers): Use ptid from regcache, set and
13545 restore inferior_ptid.
13547 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
13549 * arm-nbsd-nat.c (fetch_register, fetch_regs, fetch_fp_register,
13550 fetch_fp_regs, store_register, store_regs, store_fp_register,
13551 store_fp_regs): Use ptid from regcache.
13553 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
13555 * arm-linux-nat.c (fetch_fpregs, store_fpregs, fetch_regs,
13556 store_regs, fetch_wmmx_regs, store_wmmx_regs, fetch_vfp_regs,
13557 store_vfp_regs): Use ptid from regcache.
13559 2017-03-17 Pedro Alves <palves@redhat.com>
13562 * ser-base.c (ser_base_wait_for): Add comment.
13563 (do_ser_base_readchar): Improve comment based on the ser-unix.c's
13565 * ser-unix.c (hardwire_raw): Remove reference to
13566 scb->current_timeout.
13567 (wait_for, do_hardwire_readchar, hardwire_readchar): Delete.
13568 (hardwire_ops): Install ser_base_readchar instead of
13570 * serial.h (struct serial) <current_timeout, timeout_remaining>:
13573 2017-03-17 Jonah Graham <jonah@kichwacoders.com>
13576 * python/lib/gdb/printer/bound_registers.py: Add support for
13579 2017-03-16 Andreas Arnez <arnez@linux.vnet.ibm.com>
13581 * dwarf2loc.c (indirect_synthetic_pointer): Get data type of
13582 pointed-to DIE and pass it to dwarf2_evaluate_loc_desc_full.
13583 (dwarf2_evaluate_loc_desc_full): New parameter subobj_type; rename
13584 byte_offset to subobj_byte_offset. Fix the handling of
13585 DWARF_VALUE_STACK on big-endian targets when coming via an
13587 (dwarf2_evaluate_loc_desc): Adjust call to
13588 dwarf2_evaluate_loc_desc_full.
13589 * dwarf2loc.h (dwarf2_fetch_die_type_sect_off): New declaration.
13590 * dwarf2read.c (dwarf2_fetch_die_type_sect_off): New function.
13592 2017-03-16 Yao Qi <yao.qi@linaro.org>
13594 * arm-tdep.c (thumb_record_misc): Decode CBNZ, CBZ, REV16,
13595 and REVSH instructions.
13597 2017-03-16 Yao Qi <yao.qi@linaro.org>
13599 * arm-tdep.c [GDB_SELF_TEST]: include "selftests.h".
13600 (arm_record_test): Declare.
13601 (_initialize_arm_tdep) [GDB_SELF_TEST]: call register_self_test.
13602 (thumb_record_ld_st_reg_offset): Rewrite the opcode matching to
13603 align with the manual.
13604 (thumb_record_misc): Adjust the code order to align with the
13606 (thumb2_record_decode_insn_handler): Fix instruction matching.
13607 (instruction_reader_thumb): New class.
13608 (arm_record_test): New function.
13610 2017-03-16 Yao Qi <yao.qi@linaro.org>
13612 * arm-tdep.c (abstract_memory_reader): New class.
13613 (instruction_reader): New class.
13614 (extract_arm_insn): Add argument 'reader'. Callers updated.
13615 (decode_insn): Likewise.
13617 2017-03-16 Doug Evans <dje@google.com>
13619 * guile/scm-lazy-string.c (lazy_string_smob): Clarify use of LENGTH
13620 member. Change type of TYPE member to SCM. All uses updated.
13621 (lsscm_make_lazy_string_smob): Add assert.
13622 (lsscm_make_lazy_string): Flag bad length values.
13623 (lsscm_elt_type): New function.
13624 (gdbscm_lazy_string_to_value): Rewrite to use
13625 lsscm_safe_lazy_string_to_value.
13626 (lsscm_safe_lazy_string_to_value): Fix handling of TYPE_CODE_PTR.
13627 * guile/scm-value.c (gdbscm_value_to_lazy_string): Flag bad length
13628 values. Fix TYPE_CODE_PTR. Handle TYPE_CODE_ARRAY. Handle typedefs
13630 * guile/guile-internal.h (tyscm_scm_to_type): Declare.
13631 * guile/scm-type.c (tyscm_scm_to_type): New function.
13633 2017-03-15 Doug Evans <dje@google.com>
13635 PR python/17728, python/18439, python/18779
13636 * python/py-lazy-string.c (lazy_string_object): Clarify use of LENGTH
13637 member. Change type of TYPE member to PyObject *. All uses updated.
13638 (stpy_convert_to_value): Fix handling of TYPE_CODE_PTR.
13639 (gdbpy_create_lazy_string_object): Flag bad length values.
13640 Handle TYPE_CODE_ARRAY with possibly different user-provided length.
13641 Handle typedefs in incoming type.
13642 (stpy_lazy_string_elt_type): New function.
13643 (gdbpy_extract_lazy_string): Call it.
13644 * python/py-value.c (valpy_lazy_string): Flag bad length values.
13645 Fix handling of TYPE_CODE_PTR. Handle TYPE_CODE_ARRAY. Handle
13646 typedefs in incoming type.
13648 2017-03-16 Doug Evans <dje@google.com>
13650 * guile/guile-internal.h (tyscm_scm_to_type): Declare.
13651 * guile/scm-type.c (tyscm_scm_to_type): New function.
13653 2017-03-16 Jiong Wang <jiong.wang@arm.com>
13655 * inf-ptrace.c (inf_ptrace_peek_poke): Change the type to
13656 "ULONGEST" for "skip".
13658 2017-03-14 Andreas Arnez <arnez@linux.vnet.ibm.com>
13661 * inf-ptrace.c (inf_ptrace_xfer_partial): In "case
13662 TARGET_OBJECT_MEMORY", extract the logic for ptrace peek/poke...
13663 (inf_ptrace_peek_poke): ...here. New function. Now also loop
13664 over ptrace peek/poke until end of buffer or error.
13666 2017-03-14 Simon Marchi <simon.marchi@ericsson.com>
13668 * parse.c (length_of_subexp): Make static.
13669 * parser-defs.h (length_of_subexp): Remove.
13671 2017-03-14 Andreas Arnez <arnez@linux.vnet.ibm.com>
13673 * linux-nat.c (linux_proc_xfer_partial): Handle write operations
13676 2017-03-14 Pedro Alves <palves@redhat.com>
13678 * cp-name-parser.y (cp_demangled_name_to_comp): Update comment.
13679 (main): Use std::unique_ptr. Remove calls to
13680 cp_demangled_name_parse_free.
13682 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
13684 * alpha-bsd-nat.c (alphabsd_fetch_inferior_registers,
13685 alphabsd_store_inferior_registers): Use regcache->ptid instead
13688 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
13690 * aix-thread.c (aix_thread_fetch_registers,
13691 aix_thread_store_registers): Use regcache->ptid instead of
13694 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
13696 * aarch64-linux-nat.c (fetch_gregs_from_thread,
13697 store_gregs_to_thread, fetch_fpregs_from_thread,
13698 store_fpregs_to_thread): Use regcache->ptid instead of
13701 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
13703 * amd64-linux-nat.c (amd64_linux_fetch_inferior_registers,
13704 amd64_linux_fetch_inferior_registers): Use regcache->ptid
13705 instead of inferior_ptid.
13707 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
13709 * target.c (target_fetch_registers, target_store_registers): Add
13712 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
13714 * regcache.h (regcache_get_ptid): New function.
13715 * regcache.c (regcache_get_ptid): New function.
13717 2017-03-13 Mark Wielaard <mark@klomp.org>
13719 * cp-name-parser.y (make_empty): Initialize d_printing to zero.
13721 2017-03-10 Keith Seitz <keiths@redhat.com>
13724 * c-typeprint.c (cp_type_print_method_args): Skip artificial arguments.
13726 2017-03-08 Pedro Alves <palves@redhat.com>
13729 * infrun.c (start_step_over, do_target_resume, resume)
13730 (restart_threads): Assert we're not resuming a thread that is
13731 meant to be stopped.
13732 (infrun_thread_stop_requested_callback): Delete.
13733 (infrun_thread_stop_requested): If the thread is internally
13734 stopped, queue a pending stop event and clear the thread's
13735 inline-frame state.
13736 (handle_stop_requested): New function.
13737 (handle_syscall_event, handle_inferior_event_1): Use
13738 handle_stop_requested.
13739 (handle_stop_requested): New function.
13740 (handle_signal_stop): Set the thread's stop_signal here instead of
13742 (finish_step_over): Clear step over info unconditionally.
13743 (handle_signal_stop): If the user had interrupted the event
13744 thread, consider the stop a random signal.
13745 (handle_signal_stop) <signal arrived while stepping over
13746 breakpoint>: Don't restart threads here.
13747 (stop_waiting): Don't clear step-over info here.
13749 2017-03-08 Pedro Alves <palves@redhat.com>
13752 * common/gdb_unlinker.h (unlinker::unlinker): Attribute nonnull
13753 goes to argument 2, not 1.
13755 2017-03-08 Pedro Alves <palves@redhat.com>
13758 * top.c (gdb_readline_wrapper): Avoid passing NULL to
13759 display_gdb_prompt.
13760 (command_line_input): Add comment.
13762 2017-03-08 Pedro Alves <palves@redhat.com>
13765 * tui/tui-file.c (tui_file::write): New.
13766 * tui/tui-file.h (tui_file): Override "write".
13767 * tui/tui-io.c (do_tui_putc, update_start_line): New functions,
13768 factored out from ...
13769 (tui_puts): ... here.
13770 (tui_putc): Use them.
13771 (tui_write): New function.
13772 * tui/tui-io.h (tui_write): Declare.
13774 2017-03-07 Sergio Durigan Junior <sergiodj@redhat.com>
13776 * Makefile.in (SFILES): Replace "environ.c" with
13777 "common/environ.c".
13778 (HFILES_NO_SRCDIR): Likewise, for "environ.h".
13779 * environ.c: Include "common-defs.h" instead of "defs.h. Moved
13781 * common/environ.c: ... here.
13782 * environ.h: Moved to...
13783 * common/environ.h: ... here.
13785 2017-03-07 Peter Bergner <bergner@vnet.ibm.com>
13787 * gdbarch.sh (pstring_ptr): New static function.
13788 (gdbarch_disassembler_options): Use it.
13789 (gdbarch_verify_disassembler_options): Print valid_disassembler_options,
13790 not valid_disassembler_option->name.
13791 * gdbarch.c: Regenerate.
13793 2017-03-07 Peter Bergner <bergner@vnet.ibm.com>
13795 * config/powerpc/ppc64-linux.mh (MH_CFLAGS): Delete.
13797 2017-03-07 Pedro Alves <palves@redhat.com>
13799 * tui/tui-regs.c (tui_restore_gdbout): Don't delete gdb_stdout.
13801 2017-03-07 Walfred Tedeschi <walfred.tedeschi@intel.com>
13803 * i387-tdep.h (i387_reset_bnd_regs): Add function definition.
13804 * i387-tdep.c (i387_reset_bnd_regs): Add function implementation.
13805 * i386-tdep.c (i386_push_dummy_call): Call i387_reset_bnd_regs.
13806 * amd64-tdep.c (amd64_push_dummy_call): Call i387_reset_bnd_regs.
13808 2017-03-06 Simon Marchi <simon.marchi@ericsson.com>
13810 * xtensa-linux-nat.c (fetch_gregs): Remove const.
13812 2017-03-03 Simon Marchi <simon.marchi@ericsson.com>
13814 * remote.c (remote_add_target_side_commands): Use range-based
13817 2017-03-03 Yao Qi <yao.qi@linaro.org>
13820 * ada-valprint.c (ada_val_print_ref): Call value_fetch_lazy if
13822 * valprint.c (common_val_print): Likewise.
13824 2017-02-28 Peter Bergner <bergner@vnet.ibm.com>
13826 * NEWS: Mention new set/show disassembler-options commands.
13827 * doc/gdb.texinfo: Document new set/show disassembler-options commands.
13828 * disasm.c: Include "arch-utils.h", "gdbcmd.h" and "safe-ctype.h".
13829 (prospective_options): New static variable.
13830 (gdb_disassembler::gdb_disassembler): Initialize
13831 m_di.disassembler_options.
13832 (gdb_buffered_insn_length_init_dis): Initilize di->disassembler_options.
13833 (get_disassembler_options): New function.
13834 (set_disassembler_options): Likewise.
13835 (set_disassembler_options_sfunc): Likewise.
13836 (show_disassembler_options_sfunc): Likewise.
13837 (disassembler_options_completer): Likewise.
13838 (_initialize_disasm): Likewise.
13839 * disasm.h (get_disassembler_options): New prototype.
13840 (set_disassembler_options): Likewise.
13841 * gdbarch.sh (gdbarch_disassembler_options): New variable.
13842 (gdbarch_verify_disassembler_options): Likewise.
13843 * gdbarch.c: Regenerate.
13844 * gdbarch.h: Likewise.
13845 * arm-tdep.c (num_disassembly_options): Delete.
13846 (set_disassembly_style): Likewise.
13847 (arm_disassembler_options): New static variable.
13848 (set_disassembly_style_sfunc): Convert short style name into long
13849 option name. Call set_disassembler_options.
13850 (show_disassembly_style_sfunc): New function.
13851 (arm_gdbarch_init): Call set_gdbarch_disassembler_options and
13852 set_gdbarch_verify_disassembler_options.
13853 (_initialize_arm_tdep): Delete regnames variable and update callers.
13854 (arm_disassembler_options): Initialize.
13855 (disasm_options): New variable.
13856 (num_disassembly_options): Rename from this...
13857 (num_disassembly_styles): ...to this. Compute by scanning through
13859 (valid_disassembly_styles): Initialize using disasm_options.
13860 Remove calls to parse_arm_disassembler_option, get_arm_regnames and
13861 set_arm_regname_option.
13862 Pass show_disassembly_style_sfunc to the "disassembler" setshow command.
13863 * rs6000-tdep.c (powerpc_disassembler_options): New static variable.
13864 (rs6000_gdbarch_init): Call set_gdbarch_disassembler_options and
13865 set_gdbarch_verify_disassembler_options.
13866 * s390-tdep.c (s390_disassembler_options): New static variable.
13867 (s390_gdbarch_init):all set_gdbarch_disassembler_options and
13868 set_gdbarch_verify_disassembler_options.
13870 2017-02-27 Simon Marchi <simon.marchi@ericsson.com>
13872 * remote.c (remote_add_target_side_condition): Remove "struct"
13873 keyword from range-based for loop.
13875 2017-02-27 Simon Marchi <simon.marchi@ericsson.com>
13877 * remote.c (remote_add_target_side_condition): Use range-based
13878 for loop. Update comment.
13880 2017-02-27 Yao Qi <yao.qi@linaro.org>
13882 * f-typeprint.c (f_print_type): Check "varstring" is empty first.
13884 2017-02-26 Alan Hayward <alan.hayward@arm.com>
13886 * regcache.c (regcache_raw_update): New function.
13887 (regcache_raw_read): Move code to regcache_raw_update.
13888 * regcache.h (regcache_raw_update): New declaration.
13889 * remote.c (remote_prepare_to_store): Call regcache_raw_update.
13891 2017-02-26 Jan Kratochvil <jan.kratochvil@redhat.com>
13893 * dwarf2read.c (create_debug_type_hash_table): Initialize
13894 header.signature and header.type_offset_in_tu.
13896 2017-02-24 Pedro Alves <palves@redhat.com>
13898 * symtab.c (make_file_symbol_completion_list_1): Use
13899 add_symtab_completions.
13901 2017-02-24 Alan Hayward <alan.hayward@arm.com>
13903 * stack.c (frame_info): Use frame_unwind_register_value to avoid buf.
13905 2017-02-24 Alan Hayward <alan.hayward@arm.com>
13907 * i386-tdep.c (i386_pseudo_register_read_into_value): Use
13908 I386_MAX_REGISTER_SIZE.
13909 (i386_pseudo_register_write): Likewise.
13910 (i386_process_record): Likewise.
13911 * i387-tdep.c (i387_supply_xsave): Likewise.
13912 * m68k-linux-nat.c (fetch_register): Use M68K_MAX_REGISTER_SIZE.
13913 (store_register): Likewise.
13915 2017-02-23 Pedro Alves <palves@redhat.com>
13917 * ada-lang.c: Include "common/function-view.h".
13918 (ada_iterate_over_symbols): Adjust to use function_view as
13920 (struct add_partial_datum, ada_complete_symbol_matcher): Delete.
13921 (ada_make_symbol_completion_list): Use a lambda.
13922 (ada_exc_search_name_matches): Delete.
13923 (name_matches_regex): New.
13924 (ada_add_global_exceptions): Use a lambda and name_matches_regex.
13925 * compile/compile-c-support.c: Include "common/function-view.h".
13926 (print_one_macro): Change prototype to accept a ui_file pointer.
13927 (write_macro_definitions): Use a lambda.
13928 * dwarf2read.c: Include "common/function-view.h".
13929 (dw2_map_expand_apply, dw2_map_symtabs_matching_filename)
13930 (dw2_expand_symtabs_matching): Adjust to use function_view as
13932 * language.h: Include "common/function-view.h".
13933 (struct language_defn) <la_iterate_over_symbols>: Adjust to use
13934 function_view as callback type.
13935 (LA_ITERATE_OVER_SYMBOLS): Remove DATA parameter.
13936 * linespec.c: Include "common/function-view.h".
13937 (collect_info::add_symbol): New method.
13938 (struct symbol_and_data_callback, iterate_inline_only, struct
13939 symbol_matcher_data, iterate_name_matcher): Delete.
13940 (iterate_over_all_matching_symtabs): Adjust to use function_view
13941 as callback type and lambdas.
13942 (iterate_over_file_blocks): Adjust to use function_view as
13944 (decode_compound_collector): Now a class with private fields.
13945 (decode_compound_collector::release_symbols): New method.
13946 (collect_one_symbol): Rename to...
13947 (decode_compound_collector::operator()): ... this and adjust.
13948 (lookup_prefix_sym): decode_compound_collector construction bits
13949 move to decode_compound_collector ctor. Pass the
13950 decode_compound_collector object directly as callback. Remove
13951 cleanups and use decode_compound_collector::release_symbols
13953 (symtab_collector): Now a class with private fields.
13954 (symtab_collector::release_symtabs): New method.
13955 (add_symtabs_to_list): Rename to...
13956 (symtab_collector::operator()): ... this and adjust.
13957 (collect_symtabs_from_filename): symtab_collector construction
13958 bits move to symtab_collector ctor. Pass the symtab_collector
13959 object directly as callback. Remove cleanups and use
13960 symtab_collector::release_symtabs instead.
13961 (collect_symbols): Delete.
13962 (add_matching_symbols_to_info): Use lambdas.
13963 * macrocmd.c (print_macro_callback): Delete.
13964 (info_macro_command): Use a lambda.
13965 (info_macros_command): Pass print_macro_definition as callable
13967 (print_one_macro): Remove 'ignore' parameter.
13968 (macro_list_command): Adjust.
13969 * macrotab.c (macro_for_each_data::fn): Now a function_view.
13970 (macro_for_each_data::user_data): Delete field.
13971 (foreach_macro): Adjust to call the function_view.
13972 (macro_for_each): Adjust to use function_view as callback type.
13973 (foreach_macro_in_scope): Adjust to call the function_view.
13974 (macro_for_each_in_scope): Adjust to use function_view as callback
13976 * macrotab.h: Include "common/function-view.h".
13977 (macro_callback_fn): Declare a prototype instead of a pointer.
13978 Remove "user_data" parameter.
13979 (macro_for_each, macro_for_each_in_scope): Adjust to use
13980 function_view as callback type.
13981 * psymtab.c (partial_map_expand_apply)
13982 (psym_map_symtabs_matching_filename, recursively_search_psymtabs):
13983 Adjust to use function_view as callback type and to return bool.
13984 (psym_expand_symtabs_matching): Adjust to use function_view as
13986 * symfile-debug.c (debug_qf_map_symtabs_matching_filename): Adjust
13987 to use function_view as callback type and to return bool.
13988 (debug_qf_expand_symtabs_matching): Adjust to use function_view as
13990 * symfile.c (expand_symtabs_matching): Adjust to use function_view
13992 * symfile.h: Include "common/function-view.h".
13993 (expand_symtabs_file_matcher_ftype)
13994 (expand_symtabs_symbol_matcher_ftype)
13995 (expand_symtabs_exp_notify_ftype): Remove "data" parameter and
13997 (quick_symbol_functions::map_symtabs_matching_filename)
13998 (quick_symbol_functions::expand_symtabs_matching): Adjust to use
13999 function_view as callback type and return bool.
14000 (expand_symtabs_matching): Adjust to use function_view as callback
14002 (maintenance_expand_name_matcher)
14003 (maintenance_expand_file_matcher): Delete.
14004 (maintenance_expand_symtabs): Use lambdas.
14005 * symtab.c (iterate_over_some_symtabs): Adjust to use
14006 function_view as callback types and return bool.
14007 (iterate_over_symtabs): Likewise. Use unique_xmalloc_ptr instead
14009 (lookup_symtab_callback): Delete.
14010 (lookup_symtab): Use a lambda.
14011 (iterate_over_symbols): Adjust to use function_view as callback
14013 (struct search_symbols_data, search_symbols_file_matches)
14014 (search_symbols_name_matches): Delete.
14015 (search_symbols): Use a pair of lambdas.
14016 (struct add_name_data, add_macro_name, symbol_completion_matcher)
14017 (symtab_expansion_callback): Delete.
14018 (default_make_symbol_completion_list_break_on_1): Use lambdas.
14019 * symtab.h: Include "common/function-view.h".
14020 (iterate_over_some_symtabs): Adjust to use function_view as
14021 callback type and return bool.
14022 (iterate_over_symtabs): Adjust to use function_view as callback
14024 (symbol_found_callback_ftype): Remove 'data' parameter and return
14026 (iterate_over_symbols): Adjust to use function_view as callback
14029 2017-02-23 Pedro Alves <palves@redhat.com>
14031 * Makefile.in (SUBDIR_UNITTESTS_SRCS, SUBDIR_UNITTESTS_OBS): New.
14032 (%.o) <unittests/%.c>: New pattern.
14033 * configure.ac ($development): Add $(SUBDIR_UNITTESTS_OBS) to
14034 CONFIG_OBS, and $(SUBDIR_UNITTESTS_SRCS) to CONFIG_SRCS.
14035 * common/function-view.h: New file.
14036 * unittests/function-view-selftests.c: New file.
14037 * configure: Regenerate.
14039 2017-02-23 Simon Marchi <simon.marchi@ericsson.com>
14041 * bsd-uthread.c (bsd_uthread_thread_alive): Use ptid instead of
14043 * go32-nat.c (go32_thread_alive): Likewise.
14045 2017-02-23 Yao Qi <yao.qi@linaro.org>
14047 * varobj-iter.h (varobj_iter_delete): Call xfree instead of
14050 2017-02-23 Yao Qi <yao.qi@linaro.org>
14052 * varobj.c (varobj_clear_saved_item): Use delete instead of
14054 (update_dynamic_varobj_children): Likewise.
14056 2017-02-21 Jan Kratochvil <jan.kratochvil@redhat.com>
14058 * dwarf2read.c (dwarf2_record_block_ranges): Add forgotten BASEADDR.
14060 2017-02-21 Simon Marchi <simon.marchi@ericsson.com>
14062 * common/enum-flags.h (enum_flags::enum_flags): Initialize
14063 m_enum_value to 0 in default constructor.
14065 2017-02-21 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
14067 * rs6000-tdep.c (LOAD_AND_RESERVE_MASK): Rename from LWARX_MASK.
14068 (STORE_CONDITIONAL_MASK): Rename from STWCX_MASK.
14069 (LBARX_INSTRUCTION, LHARX_INSTRUCTION, LQARX_INSTRUCTION,
14070 STBCX_INSTRUCTION, STHCX_INSTRUCTION, STQCX_INSTRUCTION): New defines.
14071 (IS_LOAD_AND_RESERVE_INSN, IS_STORE_CONDITIONAL_INSN): New macros.
14072 (ppc_displaced_step_copy_insn): Use IS_LOAD_AND_RESERVE_INSN.
14073 (ppc_deal_with_atomic_sequence): Use IS_LOAD_AND_RESERVE_INSN and
14074 IS_STORE_CONDITIONAL_INSN.
14076 2017-02-21 Jan Kratochvil <jan.kratochvil@redhat.com>
14078 * dwarf2_rnglists_process: Initialize range_beginning and range_end.
14080 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
14082 * NEWS (Changes since GDB 7.12): Add DWARF-5.
14084 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
14086 * dwarf2read.c (skip_one_die, read_attribute_value)
14087 (dwarf2_const_value_attr, dump_die_shallow)
14088 (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
14089 (skip_form_bytes, attr_form_is_constant): Handle DW_FORM_data16.
14091 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
14093 * dwarf2read.c (read_file_scope): Rename DW_MACRO_GNU_*.
14094 (dwarf_parse_macro_header): Accept DWARF version 5.
14095 (dwarf_decode_macro_bytes, dwarf_decode_macros): Rename DW_MACRO_GNU_*.
14097 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
14099 * block.c (call_site_for_pc): Rename DW_OP_GNU_*, DW_TAG_GNU_* and
14101 * common/common-exceptions.h (enum errors): Likewise.
14102 * dwarf2-frame.c (class dwarf_expr_executor): Likewise.
14103 * dwarf2expr.c (dwarf_block_to_dwarf_reg)
14104 (dwarf_expr_context::execute_stack_op): Likewise.
14105 * dwarf2expr.h (struct dwarf_expr_context, struct dwarf_expr_piece):
14107 * dwarf2loc.c (dwarf_evaluate_loc_desc::get_base_type)
14108 (dwarf_evaluate_loc_desc::push_dwarf_reg_entry_value)
14109 (show_entry_values_debug, call_site_to_target_addr)
14110 (func_addr_to_tail_call_list, func_verify_no_selftailcall)
14111 (dwarf_expr_reg_to_entry_parameter, dwarf_entry_parameter_to_value)
14112 (entry_data_value_free_closure, value_of_dwarf_reg_entry)
14113 (value_of_dwarf_block_entry, indirect_pieced_value)
14114 (symbol_needs_eval_context::push_dwarf_reg_entry_value):
14115 (disassemble_dwarf_expression): Likewise.
14116 * dwarf2read.c (process_die, inherit_abstract_dies)
14117 (read_call_site_scope): Likewise.
14118 * gdbtypes.h (struct func_type, struct call_site_parameter)
14119 (struct call_site): Likewise.
14120 * stack.c (read_frame_arg): Likewise.
14121 * std-operator.def (OP_VAR_ENTRY_VALUE): Likewise.
14123 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
14125 * defs.h (read_unsigned_leb128): New declaration.
14126 * dwarf2loc.c (decode_debug_loclists_addresses): New function.
14127 (decode_debug_loc_dwo_addresses): Update DEBUG_LOC_* to DW_LLE_*.
14128 (dwarf2_find_location_expression): Call also
14129 decode_debug_loclists_addresses. Handle DWARF-5 ULEB128 length.
14130 * dwarf2loc.h (dwarf2_version): New declaration.
14131 * dwarf2read.c (struct dwarf2_per_objfile): Add loclists, line_str,
14133 (dwarf2_elf_names): Add .debug_loclists, .debug_line_str,
14135 (struct dwop_section_names): Add loclists_dwo.
14136 (dwop_section_names): Add .debug_loclists.dwo.
14137 (struct comp_unit_head): Add unit_type, signature, type_offset_in_tu.
14138 (struct dwarf2_per_cu_data): Add dwarf_version.
14139 (struct dwo_sections): Add loclists.
14140 (struct attr_abbrev): Add implicit_const.
14141 (read_indirect_line_string): New declaration.
14142 (read_unsigned_leb128): Delete declaration.
14143 (rcuh_kind): New definition.
14144 (read_and_check_comp_unit_head): Change parameter
14145 is_debug_types_section to section_kind.
14146 (dwarf2_locate_sections): Handle loclists, line_str and rnglists.
14147 (read_comp_unit_head): Change parameter abfd to section, add parameter
14148 section_kind. Handle DWARF-5.
14149 (error_check_comp_unit_head): Accept also DWARF version 5.
14150 (read_and_check_comp_unit_head): Change parameter
14151 is_debug_types_section to section_kind.
14152 (read_and_check_type_unit_head): Delete function.
14153 (read_abbrev_offset): Handle DWARF-5.
14154 (create_debug_type_hash_table): Add parameter section_kind. Process
14155 only DW_UT_type. Use signature and type_offset_in_tu from struct
14157 (create_debug_types_hash_table): Update create_debug_type_hash_table
14159 (create_all_type_units): Call create_debug_type_hash_table.
14160 (read_cutu_die_from_dwo, init_cutu_and_read_dies): Change
14161 read_and_check_type_unit_head caller to read_and_check_comp_unit_head
14163 (skip_one_die): Handle DW_FORM_implicit_const.
14164 (dwarf2_rnglists_process): New function.
14165 (dwarf2_ranges_process): Call dwarf2_rnglists_process for DWARF-5.
14166 (abbrev_table_read_table): Handle DW_FORM_implicit_const.
14167 (read_attribute_value): Handle DW_FORM_implicit_const,
14169 (read_attribute): Handle DW_FORM_implicit_const.
14170 (read_indirect_string_at_offset_from): New function from
14171 read_indirect_string_at_offset.
14172 (read_indirect_string_at_offset): Call
14173 read_indirect_string_at_offset_from.
14174 (read_indirect_line_string_at_offset): New function.
14175 (read_indirect_string): New function comment.
14176 (read_indirect_line_string): New function.
14177 (read_unsigned_leb128): Make it global.
14178 (dwarf2_string_attr): Handle DWARF-5.
14179 (add_include_dir_stub, read_formatted_entries): New functions.
14180 (dwarf_decode_line_header, dump_die_shallow, cu_debug_loc_section):
14182 (per_cu_header_read_in): Update read_comp_unit_head caller.
14183 (dwarf2_version): New function.
14184 * symfile.h (struct dwarf2_debug_sections): Add loclists, line_str and
14186 * xcoffread.c (dwarf2_xcoff_names): Update struct dwarf2_debug_sections
14189 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
14191 * dwarf2read.c (abbrev_table_read_table): Read the data only once.
14193 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
14195 * dwarf2read.c (dwarf2_ranges_process): New function from
14196 dwarf2_ranges_read.
14197 (dwarf2_ranges_read, dwarf2_record_block_ranges): Use
14198 dwarf2_ranges_process.
14200 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
14202 * dwarf2read.c (create_debug_type_hash_table): New function from
14203 create_debug_types_hash_table.
14204 (create_debug_types_hash_table): Call create_debug_type_hash_table.
14205 (create_all_type_units, open_and_init_dwo_file): Update
14206 create_debug_types_hash_table callers.
14208 2017-02-20 Sergio Durigan Junior <sergiodj@redhat.com>
14211 * fork-child.c (trace_start_error): Fix thinko. va_end should
14212 refer to 'ap', not 'args'.
14214 2017-02-20 Sergio Durigan Junior <sergiodj@redhat.com>
14215 Pedro Alves <palves@redhat.com>
14218 * darwin-nat.c (darwin_ptrace_me): Check if calls to system
14220 * fork-child.c (trace_start_error): New function.
14221 (trace_start_error_with_name): Likewise.
14222 * gnu-nat.c (gnu_ptrace_me): Check if call to PTRACE succeeded.
14223 * inf-ptrace.c (inf_ptrace_me): Likewise.
14224 * inferior.h (trace_start_error): New prototype.
14225 (trace_start_error_with_name): Likewise.
14227 2017-02-15 Sergio Durigan Junior <sergiodj@redhat.com>
14230 * psymtab.c (maintenance_print_psymbols): Verify if 'argv' is not
14231 NULL before using it.
14232 * symmisc.c (maintenance_print_symbols): Likewise.
14233 (maintenance_print_msymbols): Likewise.
14235 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
14237 * NEWS: Add record Python bindings entry.
14239 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
14241 * Makefile.in (SUBDIR_PYTHON_OBS): Add py-record-btrace.o,
14243 (SUBDIR_PYTHON_SRCS): Add py-record-btrace.c, py-record-full.c.
14244 * python/py-record-btrace.c, python/py-record-btrace.h,
14245 python/py-record-full.c, python/py-record-full.h: New file.
14246 * python/py-record.c: Add include for py-record-btrace.h and
14248 (recpy_method, recpy_format, recpy_goto, recpy_replay_position,
14249 recpy_instruction_history, recpy_function_call_history, recpy_begin,
14250 recpy_end): Use functions from py-record-btrace.c and py-record-full.c.
14251 * python/python-internal.h (PyInt_FromSsize_t, PyInt_AsSsize_t):
14253 (gdbpy_initialize_btrace): New export.
14254 * python/python.c (_initialize_python): Add gdbpy_initialize_btrace.
14256 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
14258 * Makefile.in (SUBDIR_PYTHON_OBS): Add python/py-record.o.
14259 (SUBDIR_PYTHON_SRCS): Add python/py-record.c.
14260 * python/py-record.c: New file.
14261 * python/python-internal.h (gdbpy_start_recording,
14262 gdbpy_current_recording, gdpy_stop_recording,
14263 gdbpy_initialize_record): New export.
14264 * python/python.c (_initialize_python): Add gdbpy_initialize_record.
14265 (python_GdbMethods): Add gdbpy_start_recording,
14266 gdbpy_current_recording and gdbpy_stop_recording.
14268 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
14270 * record-btrace.c (record_btrace_record_method): New function.
14271 (init_record_btrace_ops): Initialize to_record_method.
14272 * record-full.c (record_full_record_method): New function.
14273 (init_record_full_ops, init_record_full_core_ops): Add
14274 record_full_record_method.
14275 * record.h (enum record_method): New enum.
14276 * target-debug.h (target_debug_print_enum_record_method: New define.
14277 * target-delegates.c: Regenerate.
14278 * target.c (target_record_method): New function.
14279 * target.h: Include record.h.
14280 (struct target_ops) <to_record_method>: New field.
14281 (target_record_method): New export.
14283 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
14285 * record.h (record_start, record_stop): New export.
14286 * record.c (record_start, record_stop): New function.
14288 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
14290 * btrace.c (btrace_fetch): Copy function call segments pointer
14292 (btrace_clear): Clear the vector.
14293 (btrace_find_insn_by_number): Use binary search to find the correct
14294 function call segment.
14295 * btrace.h (brace_fun_p): New typedef.
14296 (struct btrace_thread_info) <functions>: New field.
14298 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
14300 * record-btrace.c (btrace_ui_out_decode_error): Move most of it ...
14301 * btrace.c (btrace_decode_error): ... here. New function.
14302 * btrace.h (btrace_decode_error): New export.
14304 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
14306 * btrace.c (ftrace_call_num_insn, btrace_insn_get_error): New function.
14307 (ftrace_new_function, btrace_insn_number, btrace_insn_cmp,
14308 btrace_find_insn_by_number): Remove special case for gaps.
14309 * btrace.h (btrace_insn_get_error): New export.
14310 (btrace_insn_number, btrace_find_insn_by_number): Adjust comment.
14311 * record-btrace.c (btrace_insn_history): Print number for gaps.
14312 (record_btrace_info, record_btrace_goto): Handle gaps.
14314 2017-02-14 Tom Tromey <tom@tromey.com>
14317 * python/python.c (gdbpy_before_prompt_hook): Emit before_prompt
14319 * python/py-evts.c (gdbpy_initialize_py_events): Add
14320 before_prompt registry.
14321 * python/py-events.h (events_object) <before_prompt>: New field.
14323 2017-02-14 Markus Metzger <markus.t.metzger@intel.com>
14325 * btrace.c (ftrace_new_switch): Preserve up link and flags.
14327 2017-02-13 Luis Machado <lgustavo@codesourcery.com>
14329 * symfile (_initialize_symfile): Add usage text to the load command's
14332 2017-02-10 Simon Marchi <simon.marchi@ericsson.com>
14334 * utils.c (defaulted_query): Don't query on secondary UIs.
14336 2017-02-10 Tom Tromey <tom@tromey.com>
14338 * rust-lang.c (rust_get_disr_info): Remove unused variable.
14340 2017-02-10 Tom Tromey <tom@tromey.com>
14342 * python/py-value.c (valpy_richcompare_throw): Remove unnecessary
14344 * python/py-type.c (typy_legacy_template_argument): Remove
14345 unnecessary "cleanup" local.
14347 2017-02-10 Tom Tromey <tom@tromey.com>
14349 * python/python.c (do_start_initialization): New function, from
14350 _initialize_python.
14351 (_initialize_python): Call do_start_initialization.
14352 * python/py-linetable.c (ltpy_iternext): Use explicit returns, not
14355 2017-02-10 Tom Tromey <tom@tromey.com>
14357 * python/py-prettyprint.c (pretty_print_one_value): Use
14360 2017-02-10 Tom Tromey <tom@tromey.com>
14362 * python/py-cmd.c (cmdpy_destroyer): Use gdbpy_ref.
14363 * python/py-breakpoint.c (gdbpy_breakpoint_deleted): Use
14365 * python/py-type.c (field_new): Use gdbpy_ref.
14366 * python/py-symtab.c (symtab_and_line_to_sal_object): Use
14368 * python/py-progspace.c (pspy_new): Use gdbpy_ref.
14369 (py_free_pspace): Likewise.
14370 (pspace_to_pspace_object): Likewise.
14371 * python/py-objfile.c (objfpy_new): Use gdbpy_ref.
14372 (py_free_objfile): Likewise.
14373 (objfile_to_objfile_object): Likewise.
14374 * python/py-inferior.c (delete_thread_object): Use
14376 (infpy_read_memory): Likewise.
14377 (py_free_inferior): Likewise.
14378 * python/py-evtregistry.c (create_eventregistry_object): Use
14380 * python/py-event.c (create_event_object): Use gdbpy_ref.
14382 2017-02-10 Tom Tromey <tom@tromey.com>
14384 * python/py-ref.h (gdbpy_ref_policy): Now a template.
14385 (gdbpy_ref): Now a template; allow subclasses of PyObject to be
14387 * python/py-arch.c, python/py-bpevent.c, python/py-breakpoint.c,
14388 python/py-cmd.c, python/py-continueevent.c, python/py-event.c,
14389 python/py-exitedevent.c, python/py-finishbreakpoint.c,
14390 python/py-framefilter.c, python/py-function.c,
14391 python/py-inferior.c, python/py-infevents.c,
14392 python/py-linetable.c, python/py-newobjfileevent.c,
14393 python/py-param.c, python/py-prettyprint.c, python/py-ref.h,
14394 python/py-signalevent.c, python/py-stopevent.c,
14395 python/py-symbol.c, python/py-threadevent.c, python/py-type.c,
14396 python/py-unwind.c, python/py-utils.c, python/py-value.c,
14397 python/py-varobj.c, python/py-xmethods.c, python/python.c,
14398 varobj.c: Change gdbpy_ref to gdbpy_ref<>.
14400 2017-02-10 Tom Tromey <tom@tromey.com>
14402 * ui-out.h (ui_out_emit_type): New class.
14403 (ui_out_emit_tuple, ui_out_emit_list): New typedefs.
14404 * python/py-framefilter.c (py_print_single_arg): Use gdb::optional
14405 and ui_out_emit_tuple.
14406 (enumerate_locals): Likewise.
14407 (py_mi_print_variables, py_print_locals, py_print_args): Use
14409 (py_print_frame): Use gdb::optional, ui_out_emit_tuple,
14411 * common/gdb_optional.h: New file.
14413 2017-02-10 Martin Galvan <martingalvan@sourceware.org>
14415 * MAINTAINERS (Write After Approval): Update my e-mail address.
14417 2017-02-10 Martin Galvan <martingalvan@sourceware.org>
14420 * breakpoint.c (_initialize_breakpoint): Update the help description
14421 of the 'commands' command to indicate that it takes a list argument.
14423 2017-02-09 Simon Marchi <simon.marchi@ericsson.com>
14425 * interps.c (current_interp_set_logging): Remove "return".
14427 2017-02-09 Gary Benson <gbenson@redhat.com>
14429 * symtab.c (add_symtab_completions): Prevent NULL pointer
14432 2017-02-08 Pedro Alves <palves@redhat.com>
14434 * interps.c (interp::interp): Remove reference to quiet_p.
14435 (interp_set): Make static. Remove dead "Switching to" output
14437 (interp_quiet_p, interp_set_quiet): Delete.
14438 (interpreter_exec_cmd): Don't set the interpreter quiet.
14439 * interps.h (interp_quiet_p): Make static.
14440 (class interp) <quiet_p>: Remove field
14442 2017-02-08 Jerome Guitton <guitton@adacore.com>
14444 * cli/cli-decode.c (find_command_name_length): Make it extern.
14445 * cli/cli-decode.h (find_command_name_length): Declare.
14446 * cli/cli-script.c (command_name_equals, line_first_arg):
14448 (process_next_line): Use cli-decode to parse command names.
14449 (build_command_line): Make args a constant pointer.
14451 2017-02-08 Jerome Guitton <guitton@adacore.com>
14453 * cli-decode.c (lookup_cmd_1, lookup_cmd_composition):
14454 Remove case-insensitive search.
14456 2017-02-07 Jose E. Marchesi <jose.marchesi@oracle.com>
14458 * sparc-tdep.c (sparc32_gdbarch_init): Do not place a + operator
14459 at the end of the line. Avoids an ARI warning.
14461 2017-02-06 Luis Machado <lgustavo@codesourcery.com>
14463 * NEWS: Mention support for record/replay of Intel 64 rdrand and
14464 rdseed instructions.
14465 i386-tdep.c (i386_process_record): Handle Intel 64 rdrand and rseed.
14467 2017-02-06 Ivo Raisr <ivo.raisr@oracle.com>
14470 Provide and use sparc32 and sparc64 target description XML files.
14471 * features/sparc/sparc32-cp0.xml, features/sparc/sparc32-cpu.xml,
14472 features/sparc/sparc32-fpu.xml: New files for sparc 32-bit.
14473 * features/sparc/sparc64-cp0.xml, features/sparc/sparc64-cpu.xml,
14474 features/sparc/sparc64-fpu.xml: New files for sparc 64-bit.
14475 * features/sparc/sparc32-solaris.xml: New file.
14476 * features/sparc/sparc64-solaris.xml: New file.
14477 * features/sparc/sparc32-solaris.c: Generated.
14478 * features/sparc/sparc64-solaris.c: Generated.
14479 * sparc-tdep.h: Account for differences in target descriptions.
14480 * sparc-tdep.c (sparc32_register_name): Use target provided registers.
14481 (sparc32_register_type): Use target provided registers.
14482 (validate_tdesc_registers): New function.
14483 (sparc32_gdbarch_init): Use tdesc_has_registers.
14484 Set pseudoregister functions.
14485 * sparc64-tdep.c (sparc64_register_name): Use target provided registers.
14486 (sparc64_register_type): Use target provided registers.
14487 (sparc64_init_abi): Set pseudoregister functions.
14489 2017-02-03 Tom Tromey <tom@tromey.com>
14492 * rust-lang.c (rust_print_type) <TYPE_CODE_UNION>: Handle enums
14493 with a single member.
14495 2017-02-03 Pedro Alves <palves@redhat.com>
14497 * cli/cli-interp.c (cli_interp_base::cli_interp_base)
14498 (cli_interp_base::~cli_interp_base): New.
14499 (cli_interp): New struct.
14500 (as_cli_interp): Cast the interp itself to cli_interp.
14501 (cli_interpreter_pre_command_loop): Rename to ...
14502 (cli_interp_base::pre_command_loop): ... this. Remove 'self'
14504 (cli_interpreter_init): Rename to ...
14505 (cli_interp::init): ... this. Remove 'self' parameter. Use
14506 boolean. Make extern.
14507 (cli_interpreter_resume): Rename to ...
14508 (cli_interp::resume): ... this. Remove 'data' parameter. Make
14510 (cli_interpreter_suspend): Rename to ...
14511 (cli_interp::suspend): ... this. Remove 'data' parameter. Make
14513 (cli_interpreter_exec): Rename to ...
14514 (cli_interp::exec): ... this. Remove 'data' parameter. Make
14516 (cli_interpreter_supports_command_editing): Rename to ...
14517 (cli_interp_base::supports_command_editing): ... this. Remove
14518 'interp' parameter. Make extern.
14519 (cli_ui_out): Rename to ...
14520 (cli_interp::interp_ui_out): ... this. Remove 'interp' parameter.
14522 (cli_set_logging): Rename to ...
14523 (cli_interp_base::set_logging): ... this. Remove 'interp'
14524 parameter. Make extern.
14525 (cli_interp_procs): Delete.
14526 (cli_interp_factory): Adjust to use "new".
14527 * cli/cli-interp.h: Include "interps.h".
14528 (struct cli_interp_base): New struct.
14529 * interps.c (struct interp): Delete. Fields moved to interps.h.
14530 (interp_new): Delete.
14531 (interp::interp, interp::~interp): New.
14532 (interp_set): Use bool, and return void. Assume the interpreter
14533 has suspend, init and resume methods, and that the all return
14535 (set_top_level_interpreter): interp_set returns void.
14536 (interp_ui_out): Adapt.
14537 (current_interp_set_logging): Adapt.
14538 (interp_data): Delete.
14539 (interp_pre_command_loop, interp_supports_command_editing): Adapt.
14540 (interp_exec): Adapt.
14541 (top_level_interpreter_data): Delete.
14542 * interps.h (interp_init_ftype, interp_resume_ftype)
14543 (interp_suspend_ftype, interp_exec_ftype)
14544 (interp_pre_command_loop_ftype, interp_ui_out_ftype): Delete.
14545 (class interp): New.
14546 (interp_new): Delete.
14547 (interp_set): Now returns void. Use bool.
14548 (interp_data, top_level_interpreter_data): Delete.
14549 * mi/mi-common.h: Include interps.h.
14550 (class mi_interp): Inherit from interp. Define a ctor. Declare
14551 init, resume, suspect, exec, interp_ui_out, set_logging and
14552 pre_command_loop methods.
14553 * mi/mi-interp.c (as_mi_interp): Cast the interp itself.
14554 (mi_interpreter_init): Rename to ...
14555 (mi_interp::init): ... this. Remove the 'interp' parameter, use
14556 bool, return void and make extern. Adjust.
14557 (mi_interpreter_resume): ... Rename to ...
14558 (mi_interp::resume): ... this. Remove the 'data' parameter,
14559 return void and make extern. Adjust.
14560 (mi_interpreter_suspend): ... Rename to ...
14561 (mi_interp::suspend): ... this. Remove the 'data' parameter,
14562 return void and make extern. Adjust.
14563 (mi_interpreter_exec): ... Rename to ...
14564 (mi_interp::exec): ... this. Remove the 'data' parameter and make
14566 (mi_interpreter_pre_command_loop): ... Rename to ...
14567 (mi_interp::pre_command_loop): ... this. Remove the 'self'
14568 parameter and make extern.
14569 (mi_on_normal_stop_1): Adjust.
14570 (mi_ui_out): Rename to ...
14571 (mi_interp::interp_ui_out): ... this. Remove the 'interp'
14572 parameter and make extern. Adjust.
14573 (mi_set_logging): Rename to ...
14574 (mi_interp::set_logging): ... this. Remove the 'interp'
14575 parameter and make extern. Adjust.
14576 (mi_interp_procs): Delete.
14577 (mi_interp_factory): Adjust to use 'new'.
14578 * mi/mi-main.c (mi_cmd_gdb_exit, captured_mi_execute_command)
14579 (mi_print_exception, mi_execute_command, mi_load_progress):
14581 * tui/tui-interp.c (tui_interp): New class.
14582 (as_tui_interp): Return a tui_interp pointer.
14583 (tui_on_normal_stop, tui_on_signal_received)
14584 (tui_on_end_stepping_range, tui_on_signal_exited, tui_on_exited)
14585 (tui_on_no_history, tui_on_user_selected_context_changed): Adjust
14586 to use interp::interp_ui_out.
14587 (tui_init): Rename to ...
14588 (tui_interp::init): ... this. Remove the 'self' parameter, use
14589 bool, return void and make extern. Adjust.
14590 (tui_resume): Rename to ...
14591 (tui_interp::resume): ... this. Remove the 'data' parameter,
14592 return void and make extern. Adjust.
14593 (tui_suspend): Rename to ...
14594 (tui_interp::suspend): ... this. Remove the 'data' parameter,
14595 return void and make extern. Adjust.
14596 (tui_ui_out): Rename to ...
14597 (tui_interp::interp_ui_out): ... this. Remove the 'self'
14598 parameter, and make extern. Adjust.
14599 (tui_exec): Rename to ...
14600 (tui_interp::exec): ... this. Remove the 'data' parameter and
14602 (tui_interp_procs): Delete.
14603 (tui_interp_factory): Use "new".
14605 2017-02-02 Tom Tromey <tom@tromey.com>
14607 * rust-exp.y (ends_raw_string, space_then_number)
14608 (rust_identifier_start_p): Return bool.
14609 * rust-lang.c (rust_tuple_type_p, rust_underscore_fields)
14610 (rust_tuple_struct_type_p, rust_tuple_variant_type_p)
14611 (rust_slice_type_p, rust_range_type_p, rust_u8_type_p)
14612 (rust_chartype_p): Return bool.
14613 (val_print_struct, rust_print_struct_def, rust_print_type):
14615 * rust-lang.h (rust_tuple_type_p, rust_tuple_struct_type_p):
14618 2017-02-02 Tom Tromey <tom@tromey.com>
14620 * rust-lang.c: Reindent.
14622 2017-02-02 Tom Tromey <tom@tromey.com>
14624 * rust-lang.h (rust_crate_for_block): Update.
14625 * rust-lang.c (rust_crate_for_block): Return std::string.
14626 (rust_get_disr_info): Use std:;string, not
14627 gdb::unique_xmalloc_ptr.
14628 * rust-exp.y (crate_name): Update.
14630 2017-02-02 Pedro Alves <palves@redhat.com>
14632 * disasm-selftests.c (print_one_insn_test): Move the "verbose"
14633 field out of gdb_disassembler_test and make it static.
14635 2017-02-02 Pedro Alves <palves@redhat.com>
14637 * mi/mi-common.h (struct mi_interp): Delete the mi2_interp,
14638 mi1_interp and mi_interp fields.
14640 2017-02-02 Pedro Alves <palves@redhat.com>
14642 * cli/cli-interp.c (struct saved_output_files, saved_output):
14643 Moved from cli/cli-logging.c.
14644 (cli_set_logging): New function.
14645 (cli_interp_procs): Install cli_set_logging.
14646 * cli/cli-interp.h (make_logging_output, cli_set_logging):
14648 * cli/cli-logging.c (struct saved_output_files, saved_output):
14649 Moved to cli/cli-interp.c.
14650 (pop_output_files): Don't save outputs here.
14651 (make_logging_output): New function.
14652 (handle_redirections): Don't build tee nor save previous outputs
14654 * interps.c (current_interp_set_logging): Change prototype.
14655 Assume there's always a set_logging_proc method installed.
14656 * interps.h (interp_set_logging_ftype): Change prototype.
14657 (current_interp_set_logging): Change prototype and adjust comment.
14658 * mi/mi-interp.c (mi_set_logging): Change protototype. Adjust to
14659 use make_logging_output.
14660 * tui/tui-interp.c (tui_interp_procs): Install cli_set_logging.
14661 2017-02-02 Pedro Alves <palves@redhat.com>
14663 * cli/cli-logging.c (maybe_warn_already_logging): New factored out
14665 (set_logging_overwrite): ... here.
14666 (logging_no_redirect_file): Delete.
14667 (set_logging_redirect): Don't handle redirection on the fly.
14668 Instead warn that "logging off" / "logging on" is necessary.
14669 (pop_output_files): Delete references to logging_no_redirect_file.
14670 (show_logging_command): Always speak in terms of what will happen
14671 once logging is reenabled.
14673 2017-02-02 Pedro Alves <palves@redhat.com>
14675 * disasm.h (gdb_pretty_print_disassembler): Tweak intro comment.
14677 2017-02-02 Pedro Alves <palves@redhat.com>
14679 * disasm.c (gdb_pretty_print_insn): Rename to ...
14680 (gdb_pretty_print_disassembler::pretty_print_insn): ... this.
14681 Remove gdbarch parameter. Adapt to clear the object's buffers
14682 instead of allocating new buffers, and to print using the object's
14683 gdb_disassembler instead of calling gdb_print_insn.
14684 (dump_insns): Use gdb_pretty_print_disassembler.
14685 * disasm.h (gdb_pretty_print_insn): Delete declaration.
14686 (gdb_pretty_print_disassembler): New class.
14687 * record-btrace.c (btrace_insn_history): Use
14688 gdb_pretty_print_disassembler.
14690 2017-02-02 Pedro Alves <palves@redhat.com>
14692 * ada-lang.c (type_as_string): Use string_file.
14693 * ada-valprint.c (ada_print_floating): Use string_file.
14694 * ada-varobj.c (ada_varobj_scalar_image)
14695 (ada_varobj_get_value_image): Use string_file.
14696 * aix-thread.c (aix_thread_extra_thread_info): Use string_file.
14697 * arm-tdep.c (_initialize_arm_tdep): Use string_printf.
14698 * breakpoint.c (update_inserted_breakpoint_locations)
14699 (insert_breakpoint_locations, reattach_breakpoints)
14700 (print_breakpoint_location, print_one_detail_ranged_breakpoint)
14701 (print_it_watchpoint): Use string_file.
14702 (save_breakpoints): Use stdio_file.
14703 * c-exp.y (oper): Use string_file.
14704 * cli/cli-logging.c (set_logging_redirect): Use ui_file_up and
14706 (pop_output_files): Use delete.
14707 (handle_redirections): Use stdio_file and tee_file.
14708 * cli/cli-setshow.c (do_show_command): Use string_file.
14709 * compile/compile-c-support.c (c_compute_program): Use
14711 * compile/compile-c-symbols.c (generate_vla_size): Take a
14712 'string_file &' instead of a 'ui_file *'.
14713 (generate_c_for_for_one_variable): Take a 'string_file &' instead
14714 of a 'ui_file *'. Use string_file.
14715 (generate_c_for_variable_locations): Take a 'string_file &'
14716 instead of a 'ui_file *'.
14717 * compile/compile-internal.h (generate_c_for_for_one_variable):
14718 Take a 'string_file &' instead of a 'ui_file *'.
14719 * compile/compile-loc2c.c (push, pushf, unary, binary)
14720 (print_label, pushf_register_address, pushf_register)
14721 (do_compile_dwarf_expr_to_c): Take a 'string_file &' instead of a
14722 'ui_file *'. Adjust.
14723 * compile/compile.c (compile_to_object): Use string_file.
14724 * compile/compile.h (compile_dwarf_expr_to_c)
14725 (compile_dwarf_bounds_to_c): Take a 'string_file &' instead of a
14727 * cp-support.c (inspect_type): Use string_file and obstack_copy0.
14728 (replace_typedefs_qualified_name): Use string_file and
14730 * disasm.c (gdb_pretty_print_insn): Use string_file.
14731 (gdb_disassembly): Adjust reference the null_stream global.
14732 (do_ui_file_delete): Delete.
14733 (gdb_insn_length): Use null_stream.
14734 * dummy-frame.c (maintenance_print_dummy_frames): Use stdio_file.
14735 * dwarf2loc.c (dwarf2_compile_property_to_c)
14736 (locexpr_generate_c_location, loclist_generate_c_location): Take a
14737 'string_file &' instead of a 'ui_file *'.
14738 * dwarf2loc.h (dwarf2_compile_property_to_c): Likewise.
14739 * dwarf2read.c (do_ui_file_peek_last): Delete.
14740 (dwarf2_compute_name): Use string_file.
14741 * event-top.c (gdb_setup_readline): Use stdio_file.
14742 * gdbarch.sh (verify_gdbarch): Use string_file.
14743 * gdbtypes.c (safe_parse_type): Use null_stream.
14744 * guile/scm-breakpoint.c (gdbscm_breakpoint_commands): Use
14746 * guile/scm-disasm.c (gdbscm_print_insn_from_port): Take a
14747 'string_file *' instead of a 'ui_file *'.
14748 (gdbscm_arch_disassemble): Use string_file.
14749 * guile/scm-frame.c (frscm_print_frame_smob): Use string_file.
14750 * guile/scm-ports.c (class ioscm_file_port): Now a class that
14751 inherits from ui_file.
14752 (ioscm_file_port_delete, ioscm_file_port_rewind)
14753 (ioscm_file_port_put): Delete.
14754 (ioscm_file_port_write): Rename to ...
14755 (ioscm_file_port::write): ... this. Remove file_port_magic
14757 (ioscm_file_port_new): Delete.
14758 (ioscm_with_output_to_port_worker): Use ioscm_file_port and
14760 * guile/scm-type.c (tyscm_type_name): Use string_file.
14761 * guile/scm-value.c (vlscm_print_value_smob, gdbscm_value_print):
14763 * infcmd.c (print_return_value_1): Use string_file.
14764 * infrun.c (print_target_wait_results): Use string_file.
14765 * language.c (add_language): Use string_file.
14766 * location.c (explicit_to_string_internal): Use string_file.
14767 * main.c (captured_main_1): Use null_file.
14768 * maint.c (maintenance_print_architecture): Use stdio_file.
14769 * mi/mi-cmd-stack.c (list_arg_or_local): Use string_file.
14770 * mi/mi-common.h (struct mi_interp) <out, err, log, targ,
14771 event_channel>: Change type to mi_console_file pointer.
14772 * mi/mi-console.c (mi_console_file_fputs, mi_console_file_flush)
14773 (mi_console_file_delete): Delete.
14774 (struct mi_console_file): Delete.
14775 (mi_console_file_magic): Delete.
14776 (mi_console_file_new): Delete.
14777 (mi_console_file::mi_console_file): New.
14778 (mi_console_file_delete): Delete.
14779 (mi_console_file_fputs): Delete.
14780 (mi_console_file::write): New.
14781 (mi_console_raw_packet): Delete.
14782 (mi_console_file::flush): New.
14783 (mi_console_file_flush): Delete.
14784 (mi_console_set_raw): Rename to ...
14785 (mi_console_file::set_raw): ... this.
14786 * mi/mi-console.h (class mi_console_file): New class.
14787 (mi_console_file_new, mi_console_set_raw): Delete.
14788 * mi/mi-interp.c (mi_interpreter_init): Use mi_console_file.
14789 (mi_set_logging): Use delete and tee_file. Adjust.
14790 * mi/mi-main.c (output_register): Use string_file.
14791 (mi_cmd_data_evaluate_expression): Use string_file.
14792 (mi_cmd_data_read_memory): Use string_file.
14793 (mi_cmd_execute, print_variable_or_computed): Use string_file.
14794 * mi/mi-out.c (mi_ui_out::main_stream): New.
14795 (mi_ui_out::rewind): Use main_stream and
14797 (mi_ui_out::put): Use main_stream and string_file.
14798 (mi_ui_out::mi_ui_out): Remove 'stream' parameter.
14799 Allocate a 'string_file' instead.
14800 (mi_out_new): Don't allocate a mem_fileopen stream here.
14801 * mi/mi-out.h (mi_ui_out::mi_ui_out): Remove 'stream' parameter.
14802 (mi_ui_out::main_stream): Declare method.
14803 * printcmd.c (eval_command): Use string_file.
14804 * psymtab.c (maintenance_print_psymbols): Use stdio_file.
14805 * python/py-arch.c (archpy_disassemble): Use string_file.
14806 * python/py-breakpoint.c (bppy_get_commands): Use string_file.
14807 * python/py-frame.c (frapy_str): Use string_file.
14808 * python/py-framefilter.c (py_print_type, py_print_single_arg):
14810 * python/py-type.c (typy_str): Use string_file.
14811 * python/py-unwind.c (unwind_infopy_str): Use string_file.
14812 * python/py-value.c (valpy_str): Use string_file.
14813 * record-btrace.c (btrace_insn_history): Use string_file.
14814 * regcache.c (regcache_print): Use stdio_file.
14815 * reggroups.c (maintenance_print_reggroups): Use stdio_file.
14816 * remote.c (escape_buffer): Use string_file.
14817 * rust-lang.c (rust_get_disr_info): Use string_file.
14818 * serial.c (serial_open_ops_1): Use stdio_file.
14819 (do_serial_close): Use delete.
14820 * stack.c (print_frame_arg): Use string_file.
14821 (print_frame_args): Remove local mem_fileopen stream, not used.
14822 (print_frame): Use string_file.
14823 * symmisc.c (maintenance_print_symbols): Use stdio_file.
14824 * symtab.h (struct symbol_computed_ops) <generate_c_location>:
14825 Take a 'string_file *' instead of a 'ui_file *'.
14826 * top.c (new_ui): Use stdio_file and stderr_file.
14827 (free_ui): Use delete.
14828 (execute_command_to_string): Use string_file.
14829 (quit_confirm): Use string_file.
14830 * tracepoint.c (collection_list::append_exp): Use string_file.
14831 * tui/tui-disasm.c (tui_disassemble): Use string_file.
14832 * tui/tui-file.c: Don't include "ui-file.h".
14833 (enum streamtype, struct tui_stream): Delete.
14834 (tui_file_new, tui_file_delete, tui_fileopen, tui_sfileopen)
14835 (tui_file_isatty, tui_file_rewind, tui_file_put): Delete.
14836 (tui_file::tui_file): New method.
14837 (tui_file_fputs): Delete.
14838 (tui_file_get_strbuf): Delete.
14839 (tui_file::puts): New method.
14840 (tui_file_adjust_strbuf): Delete.
14841 (tui_file_flush): Delete.
14842 (tui_file::flush): New method.
14843 * tui/tui-file.h: Tweak intro comment.
14845 (tui_fileopen, tui_sfileopen, tui_file_get_strbuf)
14846 (tui_file_adjust_strbuf): Delete declarations.
14847 (class tui_file): New class.
14848 * tui/tui-io.c (tui_initialize_io): Use tui_file.
14849 * tui/tui-regs.c (tui_restore_gdbout): Use delete.
14850 (tui_register_format): Use string_stream.
14851 * tui/tui-stack.c (tui_make_status_line): Use string_file.
14852 (tui_get_function_from_frame): Use string_file.
14853 * typeprint.c (type_to_string): Use string_file.
14854 * ui-file.c (struct ui_file, ui_file_magic, ui_file_new): Delete.
14855 (null_stream): New global.
14856 (ui_file_delete): Delete.
14857 (ui_file::ui_file): New.
14858 (null_file_isatty): Delete.
14859 (ui_file::~ui_file): New.
14860 (null_file_rewind): Delete.
14861 (ui_file::printf): New.
14862 (null_file_put): Delete.
14863 (null_file_flush): Delete.
14864 (ui_file::putstr): New.
14865 (null_file_write): Delete.
14866 (ui_file::putstrn): New.
14867 (null_file_read): Delete.
14868 (ui_file::putc): New.
14869 (null_file_fputs): Delete.
14870 (null_file_write_async_safe): Delete.
14871 (ui_file::vprintf): New.
14872 (null_file_delete): Delete.
14873 (null_file::write): New.
14874 (null_file_fseek): Delete.
14875 (null_file::puts): New.
14876 (ui_file_data): Delete.
14877 (null_file::write_async_safe): New.
14878 (gdb_flush, ui_file_isatty): Adjust.
14879 (ui_file_put, ui_file_rewind): Delete.
14880 (ui_file_write): Adjust.
14881 (ui_file_write_for_put): Delete.
14882 (ui_file_write_async_safe, ui_file_read): Adjust.
14883 (ui_file_fseek): Delete.
14884 (fputs_unfiltered): Adjust.
14885 (set_ui_file_flush, set_ui_file_isatty, set_ui_file_rewind)
14886 (set_ui_file_put, set_ui_file_write, set_ui_file_write_async_safe)
14887 (set_ui_file_read, set_ui_file_fputs, set_ui_file_fseek)
14888 (set_ui_file_data): Delete.
14889 (string_file::~string_file, string_file::write)
14890 (struct accumulated_ui_file, do_ui_file_xstrdup, ui_file_xstrdup)
14891 (do_ui_file_as_string, ui_file_as_string): Delete.
14892 (do_ui_file_obsavestring, ui_file_obsavestring): Delete.
14893 (struct mem_file): Delete.
14894 (mem_file_new): Delete.
14895 (stdio_file::stdio_file): New.
14896 (mem_file_delete): Delete.
14897 (stdio_file::stdio_file): New.
14898 (mem_fileopen): Delete.
14899 (stdio_file::~stdio_file): New.
14900 (mem_file_rewind): Delete.
14901 (stdio_file::set_stream): New.
14902 (mem_file_put): Delete.
14903 (stdio_file::open): New.
14904 (mem_file_write): Delete.
14905 (stdio_file_magic, struct stdio_file): Delete.
14906 (stdio_file_new, stdio_file_delete, stdio_file_flush): Delete.
14907 (stdio_file::flush): New.
14908 (stdio_file_read): Rename to ...
14909 (stdio_file::read): ... this. Adjust.
14910 (stdio_file_write): Rename to ...
14911 (stdio_file::write): ... this. Adjust.
14912 (stdio_file_write_async_safe): Rename to ...
14913 (stdio_file::write_async_safe) ... this. Adjust.
14914 (stdio_file_fputs): Rename to ...
14915 (stdio_file::puts) ... this. Adjust.
14916 (stdio_file_isatty): Delete.
14917 (stdio_file_fseek): Delete.
14918 (stdio_file::isatty): New.
14919 (stderr_file_write): Rename to ...
14920 (stderr_file::write) ... this. Adjust.
14921 (stderr_file_fputs): Rename to ...
14922 (stderr_file::puts) ... this. Adjust.
14923 (stderr_fileopen, stdio_fileopen, gdb_fopen): Delete.
14924 (stderr_file::stderr_file): New.
14925 (tee_file_magic): Delete.
14926 (struct tee_file): Delete.
14927 (tee_file::tee_file): New.
14928 (tee_file_new): Delete.
14929 (tee_file::~tee_file): New.
14930 (tee_file_delete): Delete.
14931 (tee_file_flush): Rename to ...
14932 (tee_file::flush): ... this. Adjust.
14933 (tee_file_write): Rename to ...
14934 (tee_file::write): ... this. Adjust.
14935 (tee_file::write_async_safe): New.
14936 (tee_file_fputs): Rename to ...
14937 (tee_file::puts): ... this. Adjust.
14938 (tee_file_isatty): Rename to ...
14939 (tee_file::isatty): ... this. Adjust.
14940 * ui-file.h (struct obstack, struct ui_file): Don't
14942 (ui_file_new, ui_file_flush_ftype, set_ui_file_flush)
14943 (ui_file_write_ftype)
14944 (set_ui_file_write, ui_file_fputs_ftype, set_ui_file_fputs)
14945 (ui_file_write_async_safe_ftype, set_ui_file_write_async_safe)
14946 (ui_file_read_ftype, set_ui_file_read, ui_file_isatty_ftype)
14947 (set_ui_file_isatty, ui_file_rewind_ftype, set_ui_file_rewind)
14948 (ui_file_put_method_ftype, ui_file_put_ftype, set_ui_file_put)
14949 (ui_file_delete_ftype, set_ui_file_data, ui_file_fseek_ftype)
14950 (set_ui_file_fseek): Delete.
14951 (ui_file_data, ui_file_delete, ui_file_rewind)
14952 (struct ui_file): New.
14954 (class null_file): New.
14955 (null_stream): Declare.
14956 (ui_file_write_for_put, ui_file_put): Delete.
14957 (ui_file_xstrdup, ui_file_as_string, ui_file_obsavestring):
14959 (ui_file_fseek, mem_fileopen, stdio_fileopen, stderr_fileopen)
14960 (gdb_fopen, tee_file_new): Delete.
14961 (struct string_file): New.
14962 (struct stdio_file): New.
14963 (stdio_file_up): New.
14964 (struct stderr_file): New.
14965 (class tee_file): New.
14966 * ui-out.c (ui_out::field_stream): Take a 'string_file &' instead
14967 of a 'ui_file *'. Adjust.
14968 * ui-out.h (class ui_out) <field_stream>: Likewise.
14969 * utils.c (do_ui_file_delete, make_cleanup_ui_file_delete)
14970 (null_stream): Delete.
14971 (error_stream): Take a 'string_file &' instead of a 'ui_file *'.
14973 * utils.h (struct ui_file): Delete forward declaration..
14974 (make_cleanup_ui_file_delete, null_stream): Delete declarations.
14975 (error_stream): Take a 'string_file &' instead of a
14977 * varobj.c (varobj_value_get_print_value): Use string_file.
14978 * xtensa-tdep.c (xtensa_verify_config): Use string_file.
14979 * gdbarch.c: Regenerate.
14981 2017-02-02 Pedro Alves <palves@redhat.com>
14983 * disasm.c (gdb_disassembler::pretty_print_insn): Rename to...
14984 (gdb_pretty_print_insn): ... this. Now a free function. Add back
14985 a 'gdbarch' parameter. Allocate a mem_fileopen stream here.
14986 Adjust to call gdb_print_insn instead of
14987 gdb_disassembler::print_insn.
14988 (dump_insns, do_mixed_source_and_assembly_deprecated)
14989 (do_mixed_source_and_assembly, do_assembly_only): Add back a
14990 'gdbarch' parameter. Remove gdb_disassembler parameter.
14991 (gdb_disassembly): Don't allocate a gdb_disassembler here.
14992 * disasm.h (gdb_disassembler::pretty_print_insn): Delete
14994 (gdb_pretty_print_insn): Re-add declaration.
14995 * record-btrace.c (btrace_insn_history): Don't allocate a
14996 gdb_disassembler here. Adjust to call gdb_pretty_print_insn.
14998 2017-02-01 Simon Marchi <simon.marchi@polymtl.ca>
15000 * disasm.h (gdb_disassembly): Remove file_string parameter.
15001 * disasm.c (gdb_disassembly): Likewise.
15002 * cli/cli-cmds.c (print_disassembly): Adapt.
15003 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Likewise.
15004 * stack.c (do_gdb_disassembly): Likewise.
15006 2017-02-01 Andreas Arnez <arnez@linux.vnet.ibm.com>
15008 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): For
15009 DWARF_VALUE_LITERAL, no longer ignore the offset on big-endian
15010 targets. And if the implicit value is longer than needed, extract
15011 the first bytes instead of the "least significant" ones.
15013 2017-02-01 Markus Metzger <markus.t.metzger@intel.com>
15015 * btrace.c (btrace_enable): Do not call btrace_add_pc for
15016 BTRACE_FORMAT_PT or if can_access_registers_ptid returns false.
15017 (btrace_fetch): Assert can_access_registers_ptid.
15018 * record-btrace.c (require_btrace_thread, record_btrace_info): Call
15019 validate_registers_access.
15021 2017-02-01 Markus Metzger <markus.t.metzger@intel.com>
15023 * gdbthread.h (can_access_registers_ptid): New.
15024 * thread.c (can_access_registers_ptid): New.
15026 2017-02-01 Pedro Alves <palves@redhat.com>
15028 * i386-tdep.c (i386_fast_tracepoint_valid_at): Use gdb_insn_length.
15030 2017-01-31 Pedro Alves <palves@redhat.com>
15032 * mi/mi-interp.c (mi_breakpoint_created, mi_breakpoint_modified):
15035 2017-01-31 Pedro Alves <palves@redhat.com>
15037 * stack.c (print_frame_args): Remove local mem_fileopen stream,
15040 2017-01-31 Pedro Alves <palves@redhat.com>
15042 * varobj.c (varobj_value_get_print_value): Remove xstrdup call.
15044 2017-01-31 Pedro Alves <palves@redhat.com>
15046 * common/scoped_restore.h
15047 (scoped_restore_tmpl::scoped_restore_tmpl): Template on T2, and
15048 change the value's parameter type to T2.
15049 (make_scoped_restore): Likewise.
15051 2017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
15052 Richard Henderson <rth@redhat.com>
15054 * amd64-linux-nat.c (PTRACE_ARCH_PRCTL): New define.
15055 (amd64_linux_fetch_inferior_registers): Add case to fetch FS_BASE
15056 GS_BASE for older kernels.
15057 (amd64_linux_store_inferior_registers): Add case to store FS_BASE
15058 GS_BASE for older kernels.
15059 * amd64-linux-tdep.c (amd64_linux_gregset_reg_offset): Add FS_BASE
15060 and GS_BASE to the offset table.
15061 (amd64_linux_register_reggroup_p): Add FS_BASE and GS_BASE to the
15062 system register group.
15063 * amd64-nat.c (amd64_native_gregset_reg_offset): Implements case
15065 * amd64-tdep.c (amd64_init_abi): Add segment registers for the
15067 * amd64-tdep.h (amd64_regnum): Add AMD64_FSBASE_REGNUM and
15068 AMD64_GSBASE_REGNUM.
15069 (AMD64_NUM_REGS): Set to AMD64_GSBASE_REGNUM + 1.
15070 * features/Makefile (amd64-linux.dat, amd64-avx-linux.dat)
15071 (amd64-mpx-linux.dat, amd64-avx512-linux.dat, x32-linux.dat)
15072 (x32-avx-linux.dat, x32-avx512-linux.dat): Add
15073 i386/64bit-segments.xml in those rules.
15074 * features/i386/64bit-segments.xml: New file.
15075 * features/i386/amd64-avx-mpx-linux.xml: Add 64bit-segments.xml.
15076 * features/i386/amd64-avx-linux.xml: Add 64bit-segments.xml.
15077 * features/i386/amd64-avx512-linux.xml: Add 64bit-segments.xml.
15078 * features/i386/amd64-mpx-linux.xml: Add 64bit-segments.xml.
15079 * features/i386/x32-avx512-linux.xml: Add 64bit-segments.xml.
15080 * features/i386/x32-avx-linux.xml: Add 64bit-segments.xml.
15081 * features/i386/amd64-linux.xml: Add 64bit-segments.xml.
15082 * features/i386/amd64-avx-linux.c: Regenerated.
15083 * features/i386/amd64-avx-mpx-linux.c: Regenerated.
15084 * features/i386/amd64-avx-mpx.c: Regenerated.
15085 * features/i386/amd64-avx512-linux.c: Regenerated.
15086 * features/i386/amd64-linux.c: Regenerated.
15087 * features/i386/amd64-mpx-linux.c: Regenerated.
15088 * features/i386/i386-avx-mpx-linux.c: Regenerated.
15089 * features/i386/i386-avx-mpx.c: Regenerated.
15090 * features/i386/x32-avx-linux.c: Regenerated.
15091 * features/i386/x32-avx512-linux.c: Regenerated.
15092 * regformats/i386/amd64-avx-linux.dat: Regenerated.
15093 * regformats/i386/amd64-avx-mpx-linux.dat: Regenerated.
15094 * regformats/i386/amd64-avx512-linux.dat: Regenerated.
15095 * regformats/i386/amd64-linux.dat: Regenerated.
15096 * regformats/i386/amd64-mpx-linux.dat: Regenerated.
15097 * regformats/i386/x32-avx-linux.dat: Regenerated.
15098 * regformats/i386/x32-avx512-linux.dat: Regenerated.
15099 * regformats/i386/x32-linux.dat: Regenerated.
15101 2017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
15103 * amd64-linux-tdep.h (AMD64_LINUX_ORIG_RAX_REGNUM):
15104 Set to AMD64_NUM_REGS.
15106 2017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
15108 * amd64-nat.c (amd64_native_gregset_reg_offset): Simplify logic
15109 that checks validity of a register number.
15111 2017-01-27 Kees Cook <keescook@google.com>
15113 * gdb/arm-linux-nat.c (arm_linux_fetch_inferior_registers): Call
15114 fetch_fpregs if target has fpa registers.
15115 (arm_linux_store_inferior_registers): Call store_fpregs if target
15118 2017-01-26 Andreas Arnez <arnez@linux.vnet.ibm.com>
15120 * cris-tdep.c (cris_gdbarch_init): Remove check for
15121 info.byte_order and force it to BFD_ENDIAN_LITTLE.
15123 2017-01-26 Antoine Tremblay <antoine.tremblay@ericsson.com>
15125 * corelow.c (get_core_register_section): Check for regset
15126 existence before checking for REGSET_VARIABLE_SIZE.
15128 2017-01-26 Yao Qi <yao.qi@linaro.org>
15129 Pedro Alves <palves@redhat.com>
15132 * disasm.c (gdb_disassembler::dis_asm_memory_error): Don't
15133 call memory_error, save memaddr instead.
15134 (gdb_disassembler::print_insn): If gdbarch_print_insn returns
15135 negative, cal memory_error.
15136 * disasm.h (gdb_disassembler) <m_err_memaddr>: New field.
15138 2017-01-26 Yao Qi <yao.qi@linaro.org>
15140 * disasm-selftests.c (memory_error_test): New function.
15141 (_initialize_disasm_selftests): Register memory_error_test.
15143 2017-01-26 Yao Qi <yao.qi@linaro.org>
15145 * Makefile.in (SFILES): Add disasm-selftests.c and
15147 (COMMON_OBS): Add disasm-selftests.o and selftest-arch.o.
15148 * disasm-selftests.c: New file.
15149 * selftest-arch.c: New file.
15150 * selftest-arch.h: New file.
15152 2017-01-26 Yao Qi <yao.qi@linaro.org>
15154 * mep-tdep.c (mep_gdb_print_insn): Set info->arch
15155 to bfd_arch_mep. Don't return 0 if section is not
15156 found. Call print_insn_mep.
15158 2017-01-26 Pedro Alves <palves@redhat.com>
15159 Yao Qi <yao.qi@linaro.org>
15161 * arm-tdep.c: Include "disasm.h".
15162 (gdb_print_insn_arm): Update code to get gdbarch.
15163 * disasm.c (dis_asm_read_memory): Change it to
15164 gdb_disassembler::dis_asm_read_memory.
15165 (dis_asm_memory_error): Likewise.
15166 (dis_asm_print_address): Likewise.
15167 (gdb_pretty_print_insn): Change it to
15168 gdb_disassembler::pretty_print_insn.
15169 (dump_insns): Add one argument gdb_disassemlber. All
15171 (do_mixed_source_and_assembly_deprecated): Likewise.
15172 (do_mixed_source_and_assembly): Likewise.
15173 (do_assembly_only): Likewise.
15174 (gdb_disassembler::gdb_disassembler): New.
15175 (gdb_disassembler::print_insn): New.
15176 * disasm.h (class gdb_disassembler): New.
15177 (gdb_pretty_print_insn): Remove declaration.
15178 (gdb_disassemble_info): Likewise.
15179 * guile/scm-disasm.c (class gdbscm_disassembler): New.
15180 (gdbscm_disasm_read_memory_worker): Update.
15181 (gdbscm_disasm_read_memory): Update.
15182 (gdbscm_disasm_memory_error): Remove.
15183 (gdbscm_disasm_print_address): Remove.
15184 (gdbscm_disassembler::gdbscm_disassembler): New.
15185 (gdbscm_print_insn_from_port): Update.
15186 * mips-tdep.c: Include disasm.h.
15187 (gdb_print_insn_mips): Update code to get gdbarch.
15188 * record-btrace.c (btrace_insn_history): Update.
15189 * spu-tdep.c: Include disasm.h.
15190 (struct spu_dis_asm_data): Remove.
15191 (struct spu_dis_asm_info): New.
15192 (spu_dis_asm_print_address): Use spu_dis_asm_info to get
15194 (gdb_print_insn_spu): Cast disassemble_info to
15197 2017-01-26 Yao Qi <yao.qi@linaro.org>
15199 * disasm.c (do_ui_file_delete): Delete.
15200 (gdb_insn_length): Move code creating stream to ...
15201 * utils.c (null_stream): ... here. New function.
15202 * utils.h (null_stream): Declare.
15204 2017-01-23 Simon Marchi <simon.marchi@polymtl.ca>
15206 * python/py-inferior.c (find_thread_object): Return directly
15207 from the loop. Remove "found" variable.
15209 2017-01-21 Joel Brobecker <brobecker@adacore.com>
15211 GDB 7.12.1 released.
15213 2017-01-20 Simon Marchi <simon.marchi@ericsson.com>
15215 * python/py-function.c (fnpy_call): Reorder declarations to have
15216 the gdbpy_enter object declared first.
15217 * python/py-xmethods.c (gdbpy_get_xmethod_arg_types): Likewise.
15219 2017-01-20 Simon Marchi <simon.marchi@ericsson.com>
15222 * python/python-internal.h (PyMem_RawMalloc): Define for
15224 * python/py-gdb-readline.c (gdbpy_readline_wrapper): Use
15225 PyMem_RawMalloc instead of PyMem_Malloc.
15227 2017-01-20 Mike Wrighton <mike_wrighton@codesourcery.com>
15228 Luis Machado <lgustavo@codesourcery.com>
15230 * NEWS (New commands): Mention flash-erase.
15231 (New MI commands): Mention target-flash-erase.
15232 * mi/mi-cmds.c (mi_cmd_target_flash_erase): Add target-flash-erase MI
15234 * mi/mi-cmds.h (mi_cmd_target_flash_erase): New declaration.
15235 * mi/mi-main.c (mi_cmd_target_flash_erase): New function.
15236 * target.c (flash_erase_command): New function.
15237 (initialize_targets): Add new flash-erase command.
15238 * target.h (flash_erase_command): New declaration.
15240 2017-01-20 Joel Brobecker <brobecker@adacore.com>
15242 * nat/linux-ptrace.c: Only include <sys/procfs.h> if
15243 HAVE_SYS_PROCFS_H is defined.
15245 2017-01-18 Alan Hayward <alan.hayward@arm.com>
15247 * remote.c (struct cached_reg): Change data into a pointer.
15248 * (stop_reply_dtr): Free data pointers before deleting vector.
15249 (process_stop_reply): Likewise.
15250 (remote_parse_stop_reply): Allocate space for data
15252 2017-01-18 Alan Hayward <alan.hayward@arm.com>
15254 * amd64-tdep.c (amd64_pseudo_register_read_value): remove
15256 (amd64_pseudo_register_read_value): Likewise.
15257 * remote.c (fetch_register_using_p): Remove MAX_REGISTER_SIZE.
15258 (store_register_using_P): Likewise.
15259 * regcache.c (regcache_xfer_part): Likewise.
15261 2017-01-16 Ivo Raisr <ivo.raisr@oracle.com>
15263 Split real and pseudo registers.
15264 * sparc-tdep.h (SPARC_CORE_REGISTERS): New macro.
15265 (sparc32_pseudo_regnum): New enum.
15266 * sparc64-tdep.h (sparc64_pseudo_regnum): New enum.
15267 * sparc-tdep.c (SPARC32_FPU_REGISTERS): New macro.
15268 (SPARC32_CP0_REGISTERS): New macro.
15269 (sparc32_pseudo_register_name): New function.
15270 (sparc32_register_name): Use sparc32_pseudo_register_name.
15271 (sparc32_pseudo_register_type): New function.
15272 (sparc32_register_type): Use sparc32_pseudo_register_type.
15273 (sparc32_pseudo_register_read, sparc32_pseudo_register_write): Handle
15274 pseudo register numbers.
15275 * sparc64-tdep.c SPARC64_FPU_REGISTERS): New macro.
15276 (SPARC64_CP0_REGISTERS): New macro.
15277 (sparc64_pseudo_register_name): New function.
15278 (sparc64_register_name): Use sparc64_pseudo_register_name.
15279 (sparc64_pseudo_register_type): New function.
15280 (sparc64_register_type): Use sparc64_pseudo_register_type.
15281 (sparc64_pseudo_register_read, sparc64_pseudo_register_write): Handle
15282 pseudo register numbers.
15283 (sparc64_store_floating_fields, sparc64_extract_floating_fields,
15284 sparc64_store_arguments): Handle pseudo register numbers.
15286 2017-01-13 Yao Qi <yao.qi@linaro.org>
15288 * remote.c (REMOTE_DEBUG_MAX_CHAR): New macro.
15289 (putpkt_binary): Print only REMOTE_DEBUG_MAX_CHAR chars in debug
15291 (getpkt_or_notif_sane_1): Likewise.
15293 2017-01-13 Yao Qi <yao.qi@linaro.org>
15295 * Makefile.in (checker-headers): Use CXX and CXX_DIALET instead
15296 of CC. Pass "-x c++-header" instead of "-x c".
15298 2017-01-12 Simon Marchi <simon.marchi@ericsson.com>
15300 * remote.c (remote_can_async_p): Update comment.
15302 2017-01-12 Simon Marchi <simon.marchi@ericsson.com>
15304 * linux-nat.c (linux_nat_can_async_p): Update comment.
15306 2017-01-12 Simon Marchi <simon.marchi@ericsson.com>
15308 * serial.c (serial_open): Forget about "pc" and "lpt" serial interface.
15310 2017-01-11 Simon Marchi <simon.marchi@ericsson.com>
15312 * cli/cli-decode.c (lookup_cmd_1): Fix typo in comment.
15314 2017-01-10 Tom Tromey <tom@tromey.com>
15316 * python/py-type.c (typy_legacy_template_argument): Update.
15317 * cp-support.h (struct demangle_parse_info) (demangle_parse_info,
15318 ~demangle_parse_info): Declare new members.
15319 (cp_demangled_name_to_comp): Return unique_ptr.
15320 (cp_demangled_name_parse_free)
15321 (make_cleanup_cp_demangled_name_parse_free)
15322 (cp_new_demangle_parse_info): Remove.
15323 * cp-support.c (do_demangled_name_parse_free_cleanup)
15324 (make_cleanup_cp_demangled_name_parse_free): Remove.
15325 (inspect_type, cp_canonicalize_string_full)
15326 (cp_canonicalize_string): Update.
15327 (mangled_name_to_comp): Change return type.
15328 (cp_class_name_from_physname, method_name_from_physname)
15329 (cp_func_name, cp_remove_params): Update.
15330 * cp-name-parser.y (demangle_parse_info): New constructor, from
15331 cp_new_demangle_parse_info.
15332 (~demangle_parse_info): New destructor, from
15333 cp_demangled_name_parse_free.
15334 (cp_merge_demangle_parse_infos): Update.
15335 (cp_demangled_name_to_comp): Change return type.
15337 2017-01-10 Tom Tromey <tom@tromey.com>
15339 * top.c (prevent_dont_repeat): Change return type.
15340 * python/python.c (execute_gdb_command): Use std::string.
15342 * guile/guile.c (gdbscm_execute_gdb_command): Update.
15343 * command.h (prevent_dont_repeat): Change return type.
15344 * breakpoint.c (bpstat_do_actions_1): Update.
15346 2017-01-10 Tom Tromey <tom@tromey.com>
15348 * value.h (scoped_value_mark::~scoped_value_mark): Call
15350 (scoped_value_mark::free_to_mark): New method.
15351 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Use
15354 2017-01-10 Tom Tromey <tom@tromey.com>
15356 * python/py-value.c (valpy_dereference, valpy_referenced_value)
15357 (valpy_reference_value, valpy_const_value, valpy_get_address)
15358 (valpy_get_dynamic_type, valpy_lazy_string, valpy_do_cast)
15359 (valpy_getitem, valpy_call, valpy_binop_throw, valpy_negative)
15360 (valpy_absolute, valpy_richcompare_throw): Use scoped_value_mark.
15361 * dwarf2loc.c (dwarf2_loc_desc_get_symbol_read_needs): Use
15363 * dwarf2-frame.c (execute_stack_op): Use scoped_value_mark.
15364 * value.h (scoped_value_mark): New class.
15366 2017-01-10 Tom Tromey <tom@tromey.com>
15368 * dwarf2read.c (dwarf2_build_psymtabs): Use psymtab_discarder.
15369 * psympriv.h (make_cleanup_discard_psymtabs): Don't declare.
15370 * psymtab.c (discard_psymtabs_upto): Remove.
15371 (make_cleanup_discard_psymtabs): Remove.
15372 (struct psymtab_state): Remove.
15374 2017-01-10 Tom Tromey <tom@tromey.com>
15376 * record-full.c (record_full_save_cleanups): Remove.
15377 (record_full_save): Use gdb::unlinker.
15378 * gcore.c (do_bfd_delete_cleanup): Remove.
15379 (gcore_command): Use gdb::unlinker, unique_xmalloc_ptr. Remove
15381 * dwarf2read.c (unlink_if_set): Remove.
15382 (write_psymtabs_to_index): Use gdb::unlinker.
15383 * common/gdb_unlinker.h: New file.
15385 2017-01-10 Tom Tromey <tom@tromey.com>
15387 * windows-tdep.c (windows_xfer_shared_library): Update.
15388 * windows-nat.c (windows_make_so): Update.
15389 * utils.h (make_cleanup_bfd_unref): Remove.
15390 * utils.c (do_bfd_close_cleanup, make_cleanup_bfd_unref): Remove.
15391 * symfile.h (symfile_bfd_open)
15392 (find_separate_debug_file_in_section): Return gdb_bfd_ref_ptr.
15393 * symfile.c (read_symbols, symbol_file_add)
15394 (separate_debug_file_exists): Update.
15395 (symfile_bfd_open): Return gdb_bfd_ref_ptr.
15396 (generic_load, reread_symbols): Update.
15397 * symfile-mem.c (symbol_file_add_from_memory): Update.
15398 * spu-linux-nat.c (spu_bfd_open): Return gdb_bfd_ref_ptr.
15399 (spu_symbol_file_add_from_memory): Update.
15400 * solist.h (struct target_so_ops) <bfd_open>: Return
15402 (solib_bfd_fopen, solib_bfd_open): Return gdb_bfd_ref_ptr.
15403 * solib.c (solib_bfd_fopen, solib_bfd_open): Return
15405 (solib_map_sections, reload_shared_libraries_1): Update.
15406 * solib-svr4.c (enable_break): Update.
15407 * solib-spu.c (spu_bfd_fopen): Return gdb_bfd_ref_ptr.
15408 * solib-frv.c (enable_break2): Update.
15409 * solib-dsbt.c (enable_break): Update.
15410 * solib-darwin.c (gdb_bfd_mach_o_fat_extract): Return
15412 (darwin_solib_get_all_image_info_addr_at_init): Update.
15413 (darwin_bfd_open): Return gdb_bfd_ref_ptr.
15414 * solib-aix.c (solib_aix_bfd_open): Return gdb_bfd_ref_ptr.
15415 * record-full.c (record_full_save): Update.
15416 * python/py-objfile.c (objfpy_add_separate_debug_file): Update.
15417 * procfs.c (insert_dbx_link_bpt_in_file): Update.
15418 * minidebug.c (find_separate_debug_file_in_section): Return
15420 * machoread.c (macho_add_oso_symfile): Change abfd to
15422 (macho_symfile_read_all_oso): Update.
15423 (macho_check_dsym): Return gdb_bfd_ref_ptr.
15424 (macho_symfile_read): Update.
15425 * jit.c (bfd_open_from_target_memory): Return gdb_bfd_ref_ptr.
15426 (jit_bfd_try_read_symtab): Update.
15427 * gdb_bfd.h (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
15428 (gdb_bfd_openw, gdb_bfd_openr_iovec)
15429 (gdb_bfd_openr_next_archived_file, gdb_bfd_fdopenr): Return
15431 (gdb_bfd_ref_policy): New struct.
15432 (gdb_bfd_ref_ptr): New typedef.
15433 * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
15434 (gdb_bfd_openw, gdb_bfd_openr_iovec)
15435 (gdb_bfd_openr_next_archived_file, gdb_bfd_fdopenr): Return
15437 * gcore.h (create_gcore_bfd): Return gdb_bfd_ref_ptr.
15438 * gcore.c (create_gcore_bfd): Return gdb_bfd_ref_ptr.
15439 (gcore_command): Update.
15440 * exec.c (exec_file_attach): Update.
15441 * elfread.c (elf_symfile_read): Update.
15442 * dwarf2read.c (dwarf2_get_dwz_file): Update.
15443 (try_open_dwop_file, open_dwo_file): Return gdb_bfd_ref_ptr.
15444 (open_and_init_dwo_file): Update.
15445 (open_dwp_file): Return gdb_bfd_ref_ptr.
15446 (open_and_init_dwp_file): Update.
15447 * corelow.c (core_open): Update.
15448 * compile/compile-object-load.c (compile_object_load): Update.
15449 * common/gdb_ref_ptr.h (ref_ptr::operator->): New operator.
15450 * coffread.c (coff_symfile_read): Update.
15451 * cli/cli-dump.c (bfd_openr_or_error, bfd_openw_or_error): Return
15452 gdb_bfd_ref_ptr. Rename.
15453 (dump_bfd_file, restore_command): Update.
15454 * build-id.h (build_id_to_debug_bfd): Return gdb_bfd_ref_ptr.
15455 * build-id.c (build_id_to_debug_bfd): Return gdb_bfd_ref_ptr.
15456 (find_separate_debug_file_by_buildid): Update.
15458 2017-01-10 Tom Tromey <tom@tromey.com>
15460 * common/gdb_ref_ptr.h: New file.
15461 * python/py-ref.h (struct gdbpy_ref_policy): New.
15462 (gdbpy_ref): Now a typedef.
15464 2017-01-10 Tom Tromey <tom@tromey.com>
15466 * utils.h (make_cleanup_htab_delete): Don't declare.
15467 * utils.c (do_htab_delete_cleanup, make_cleanup_htab_delete):
15469 * linespec.c (decode_compound_collector): Add constructor,
15471 (lookup_prefix_sym): Remove cleanup.
15472 (symtab_collector): Add constructor, destructor.
15473 (collect_symtabs_from_filename): Remove cleanup.
15474 * disasm.c (do_mixed_source_and_assembly): Use htab_up.
15475 * compile/compile-c-symbols.c (generate_c_for_variable_locations):
15477 * gnu-v3-abi.c (gnuv3_print_vtable): Use htab_up.
15478 * dwarf2read.c (dw2_expand_symtabs_matching)
15479 (dw2_map_symbol_filenames, dwarf_decode_macros)
15480 (write_psymtabs_to_index): Use htab_up.
15481 * dwarf2loc.c (func_verify_no_selftailcall)
15482 (call_site_find_chain_1, func_verify_no_selftailcall)
15483 (chain_candidate, call_site_find_chain_1): Use std::unordered_set,
15484 std::vector, gdb::unique_xmalloc_ptr.
15485 (call_sitep): Remove typedef.
15486 (dwarf2_locexpr_baton_eval): Remove unused variable.
15488 2017-01-10 Tom Tromey <tom@tromey.com>
15490 * python/python-internal.h (make_cleanup_py_decref)
15491 (make_cleanup_py_xdecref): Don't declare.
15492 * python/py-utils.c (py_decref, make_cleanup_py_decref)
15493 (py_xdecref, make_cleanup_py_xdecref): Remove.
15495 2017-01-10 Tom Tromey <tom@tromey.com>
15497 * python/py-framefilter.c (py_mi_print_variables): Use gdbpy_ref.
15498 (py_print_locals, enumerate_locals, py_print_args): Use gdbpy_ref.
15500 2017-01-10 Tom Tromey <tom@tromey.com>
15502 * python/py-framefilter.c (enumerate_args): Use gdbpy_ref.
15504 2017-01-10 Tom Tromey <tom@tromey.com>
15506 * python/py-utils.c (unicode_to_encoded_string)
15507 (python_string_to_target_string)
15508 (python_string_to_target_python_string)
15509 (python_string_to_host_string, gdbpy_obj_to_string)
15510 (get_addr_from_python): Use gdbpy_ref.
15512 2017-01-10 Tom Tromey <tom@tromey.com>
15514 * python/py-unwind.c (pyuw_object_attribute_to_pointer): Use
15517 2017-01-10 Tom Tromey <tom@tromey.com>
15519 * python/python.c (eval_python_command, gdbpy_decode_line)
15520 (gdbpy_run_events, gdbpy_start_type_printers)
15521 (gdbpy_apply_type_printers): Use gdbpy_ref.
15523 2017-01-10 Tom Tromey <tom@tromey.com>
15525 * python/py-param.c (get_doc_string, compute_enum_values): Use
15528 2017-01-10 Tom Tromey <tom@tromey.com>
15530 * python/py-inferior.c (find_thread_object, build_inferior_list):
15533 2017-01-10 Tom Tromey <tom@tromey.com>
15535 * python/py-framefilter.c (py_print_frame): Use gdbpy_ref.
15537 2017-01-10 Tom Tromey <tom@tromey.com>
15539 * python/py-finishbreakpoint.c (bpfinishpy_out_of_scope): Use
15542 2017-01-10 Tom Tromey <tom@tromey.com>
15544 * python/py-cmd.c (cmdpy_completer_helper): Use gdbpy_ref. Remove
15546 (cmdpy_completer_handle_brkchars, cmdpy_completer, cmdpy_init):
15549 2017-01-10 Tom Tromey <tom@tromey.com>
15551 * python/py-breakpoint.c (gdbpy_breakpoint_cond_says_stop): Use
15554 2017-01-10 Tom Tromey <tom@tromey.com>
15556 * python/py-arch.c (archpy_disassemble): Use gdbpy_ref. Don't
15557 decref results of PyArg_ParseTupleAndKeywords.
15559 2017-01-10 Tom Tromey <tom@tromey.com>
15561 * python/python.c (python_run_simple_file): Use
15562 unique_xmalloc_ptr, gdbpy_ref.
15564 2017-01-10 Tom Tromey <tom@tromey.com>
15566 * python/py-prettyprint.c (print_stack_unless_memory_error)
15567 (print_string_repr, print_children): Use gdbpy_ref.
15568 (dummy_python_frame): New class.
15569 (dummy_python_frame::dummy_python_frame): Rename from
15570 push_dummy_python_frame.
15571 (py_restore_tstate): Remove.
15573 2017-01-10 Tom Tromey <tom@tromey.com>
15575 * python/py-framefilter.c (py_print_frame): Use gdbpy_ref.
15577 2017-01-10 Tom Tromey <tom@tromey.com>
15579 * python/python.c (ensure_python_env, restore_python_env):
15581 * python/python-internal.h (ensure_python_env): Don't declare.
15582 * varobj.h (varobj_ensure_python_env): Don't declare.
15583 * varobj.c (varobj_ensure_python_env): Remove.
15585 2017-01-10 Tom Tromey <tom@tromey.com>
15587 * varobj.c (varobj_value_get_print_value): Use
15588 gdbpy_enter_varobj.
15590 2017-01-10 Tom Tromey <tom@tromey.com>
15592 * python/py-prettyprint.c (print_string_repr, print_children):
15594 * python/py-lazy-string.c (gdbpy_extract_lazy_string): Change type
15596 * varobj.c (varobj_value_get_print_value): Update.
15597 * python/python-internal.h (gdbpy_extract_lazy_string): Update.
15599 2017-01-10 Tom Tromey <tom@tromey.com>
15601 * varobj.c (varobj_get_display_hint)
15602 (dynamic_varobj_has_child_method, install_new_value_visualizer)
15603 (varobj_set_visualizer, free_variable): Use
15604 gdbpy_enter_varobj.
15606 2017-01-10 Tom Tromey <tom@tromey.com>
15608 * python/python.c (python_command): Use gdbpy_enter, gdbpy_ref.
15609 (do_finish_initialization): New function. Use gdbpy_ref.
15610 (gdbpy_finish_initialization): Use gdbpy_enter. Call
15611 do_finish_initialization.
15613 2017-01-10 Tom Tromey <tom@tromey.com>
15615 * python/py-param.c (get_set_value, get_show_value): Use
15616 gdbpy_enter, gdbpy_ref.
15618 2017-01-10 Tom Tromey <tom@tromey.com>
15620 * python/py-function.c (fnpy_call): Use gdbpy_enter, gdbpy_ref.
15622 2017-01-10 Tom Tromey <tom@tromey.com>
15624 * python/py-cmd.c (cmdpy_function): Use gdbpy_enter, gdbpy_ref.
15626 2017-01-10 Tom Tromey <tom@tromey.com>
15628 * python/py-varobj.c (py_varobj_iter_dtor, py_varobj_iter_next):
15629 Use gdbpy_enter_varobj.
15631 2017-01-10 Tom Tromey <tom@tromey.com>
15633 * varobj.c (gdbpy_enter_varobj): New constructor.
15634 * python/python-internal.h (gdbpy_enter_varobj): New class.
15635 * python/py-varobj.c (py_varobj_get_iterator): Use
15636 gdbpy_enter_varobj.
15638 2017-01-10 Tom Tromey <tom@tromey.com>
15640 * python/py-xmethods.c (gdbpy_get_xmethod_result_type): Use
15641 gdbpy_enter, gdbpy_ref, unique_xmalloc_ptr.
15642 (gdbpy_invoke_xmethod): Use gdbpy_ref, gdbpy_enter.
15643 (gdbpy_get_xmethod_arg_types): Use gdbpy_ref,
15644 unique_xmalloc_ptr.
15645 (gdbpy_get_xmethod_arg_types): Use gdbpy_ref, gdbpy_enter.
15647 2017-01-10 Tom Tromey <tom@tromey.com>
15649 * python/py-xmethods.c (invoke_match_method): Use
15652 2017-01-10 Tom Tromey <tom@tromey.com>
15654 * python/py-xmethods.c (gdbpy_get_matching_xmethod_workers): use
15655 gdbpy_enter, gdbpy_ref.
15657 2017-01-10 Tom Tromey <tom@tromey.com>
15659 * python/python.c (python_interactive_command): Use gdbpy_enter.
15661 2017-01-10 Tom Tromey <tom@tromey.com>
15663 * python/python.c (gdbpy_before_prompt_hook): Use gdbpy_enter,
15666 2017-01-10 Tom Tromey <tom@tromey.com>
15668 * python/py-prettyprint.c (gdbpy_apply_val_pretty_printer): Use
15669 gdbpy_enter, gdbpy_ref, unique_xmalloc_ptr.
15671 2017-01-10 Tom Tromey <tom@tromey.com>
15673 * utils.h (htab_deleter): New struct.
15674 (htab_up): New typedef.
15675 * python/py-framefilter.c (gdbpy_apply_frame_filter): Use
15676 gdbpy_enter, gdbpy_ref, htab_up.
15678 2017-01-10 Tom Tromey <tom@tromey.com>
15680 * python/py-unwind.c (pending_frame_invalidate): Remove.
15681 (pyuw_sniffer): Use gdbpy_enter and gdbpy_ref.
15683 2017-01-10 Tom Tromey <tom@tromey.com>
15685 * python/py-xmethods.c (gdbpy_free_xmethod_worker_data)
15686 (gdbpy_clone_xmethod_worker_data): Use gdbpy_enter.
15688 2017-01-10 Tom Tromey <tom@tromey.com>
15690 * python/py-type.c (save_objfile_types): Use gdbpy_enter.
15692 2017-01-10 Tom Tromey <tom@tromey.com>
15694 * python/python.c (gdbpy_eval_from_control_command)
15695 (gdbpy_source_script, gdbpy_run_events)
15696 (gdbpy_source_objfile_script, gdbpy_execute_objfile_script)
15697 (gdbpy_free_type_printers, gdbpy_finish_initialization): Use
15700 2017-01-10 Tom Tromey <tom@tromey.com>
15702 * python/py-progspace.c (py_free_pspace): Use gdbpy_enter.
15704 2017-01-10 Tom Tromey <tom@tromey.com>
15706 * python/py-objfile.c (py_free_objfile): Use gdbpy_enter.
15708 2017-01-10 Tom Tromey <tom@tromey.com>
15710 * python/py-inferior.c (python_on_normal_stop, python_on_resume)
15711 (python_on_inferior_call_pre, python_on_inferior_call_post)
15712 (python_on_memory_change, python_on_register_change)
15713 (python_inferior_exit, python_new_objfile, add_thread_object)
15714 (delete_thread_object, py_free_inferior): Use gdbpy_enter.
15716 2017-01-10 Tom Tromey <tom@tromey.com>
15718 * python/py-finishbreakpoint.c (bpfinishpy_handle_stop)
15719 (bpfinishpy_handle_exit): Use gdbpy_enter.
15721 2017-01-10 Tom Tromey <tom@tromey.com>
15723 * python/py-cmd.c (cmdpy_destroyer)
15724 (cmdpy_completer_handle_brkchars, cmdpy_completer): Use
15727 2017-01-10 Tom Tromey <tom@tromey.com>
15729 * python/py-breakpoint.c (gdbpy_breakpoint_cond_says_stop): Use
15731 (gdbpy_breakpoint_has_cond): Likewise.
15733 2017-01-10 Tom Tromey <tom@tromey.com>
15735 * python/python.c (gdbpy_enter): New constructor.
15736 (~gdbpy_enter): New destructor.
15737 (restore_python_env, ensure_python_env): Rewrite.
15738 * python/python-internal.h (gdbpy_enter): New class.
15740 2017-01-10 Tom Tromey <tom@tromey.com>
15742 * python/py-symbol.c (gdbpy_lookup_symbol): Use gdbpy_ref.
15744 2017-01-10 Tom Tromey <tom@tromey.com>
15746 * python/py-value.c (value_has_field, get_field_flag)
15747 (get_field_type, valpy_getitem, convert_value_from_python): Use
15750 2017-01-10 Tom Tromey <tom@tromey.com>
15752 * python/python.c (gdbpy_progspaces, gdbpy_objfiles): Use
15755 2017-01-10 Tom Tromey <tom@tromey.com>
15757 * python/py-prettyprint.c (search_pp_list)
15758 (find_pretty_printer_from_objfiles)
15759 (find_pretty_printer_from_progspace)
15760 (find_pretty_printer_from_gdb, find_pretty_printer)
15761 (gdbpy_get_display_hint, gdbpy_get_varobj_pretty_printer): Use
15764 2017-01-10 Tom Tromey <tom@tromey.com>
15766 * python/py-param.c (call_doc_function): Use gdbpy_ref.
15768 2017-01-10 Tom Tromey <tom@tromey.com>
15770 * python/py-linetable.c (build_line_table_tuple_from_pcs)
15771 (ltpy_get_all_source_lines): Use gdbpy_ref.
15773 2017-01-10 Tom Tromey <tom@tromey.com>
15775 * python/py-framefilter.c (extract_sym, extract_value)
15776 (get_py_iter_from_func, bootstrap_python_frame_filters): Use
15779 2017-01-10 Tom Tromey <tom@tromey.com>
15781 * python/py-breakpoint.c (gdbpy_breakpoints): Use gdbpy_ref.
15783 2017-01-10 Tom Tromey <tom@tromey.com>
15785 * python/py-inferior.c (gdbpy_inferiors): Use gdbpy_ref.
15787 2017-01-10 Tom Tromey <tom@tromey.com>
15789 * python/py-function.c (convert_values_to_python, fnpy_init): Use
15792 2017-01-10 Tom Tromey <tom@tromey.com>
15794 * python/py-cmd.c (gdbpy_string_to_argv): Use gdbpy_ref.
15796 2017-01-10 Tom Tromey <tom@tromey.com>
15798 * python/py-type.c (convert_field, make_fielditem, typy_fields)
15799 (typy_range): Use gdbpy_ref.
15801 2017-01-10 Tom Tromey <tom@tromey.com>
15803 * python/py-threadevent.c (create_thread_event_object): Use
15805 * python/py-stopevent.c (create_stop_event_object): Simplify.
15806 (emit_stop_event): Use gdbpy_ref.
15807 * python/py-signalevent.c (create_signal_event_object): Use
15809 * python/py-newobjfileevent.c (create_new_objfile_event_object)
15810 (emit_new_objfile_event, create_clear_objfiles_event_object)
15811 (emit_clear_objfiles_event): Use gdbpy_ref.
15812 * python/py-infevents.c (create_inferior_call_event_object)
15813 (create_register_changed_event_object)
15814 (create_memory_changed_event_object, emit_inferior_call_event)
15815 (emit_memory_changed_event, emit_register_changed_event): Use
15817 * python/py-exitedevent.c (create_exited_event_object)
15818 (emit_exited_event): Use gdbpy_ref.
15819 * python/py-event.h (evpy_emit_event): Remove
15820 CPYCHECKER_STEALS_REFERENCE_TO_ARG annotation.
15821 * python/py-event.c (evpy_emit_event): Use gdbpy_ref.
15822 * python/py-continueevent.c (emit_continue_event): Use
15824 * python/py-breakpoint.c (gdbpy_breakpoint_created)
15825 (gdbpy_breakpoint_deleted, gdbpy_breakpoint_modified): Use
15827 * python/py-bpevent.c (create_breakpoint_event_object): Use
15830 2017-01-10 Tom Tromey <tom@tromey.com>
15832 * python/py-ref.h: New file.
15834 2017-01-10 Simon Marchi <simon.marchi@ericsson.com>
15836 * cli-out.c (cli_ui_out::do_redirect): Change return type to
15838 * cli-out.h (cli_ui_out::do_redirect): Likewise.
15839 * mi/mi-out.c (mi_ui_out::do_redirect): Likewise.
15840 * mi/mi-out.h (mi_ui_out::do_redirect): Likewise.
15841 * ui-out.c (ui_out::redirect): Likewise.
15842 * ui-out.h (ui_out::redirect, ui_out::do_redirect): Likewise.
15843 * cli/cli-logging.c (set_logging_redirect): Update call site of
15845 (handle_redirections): Likewise.
15846 * scm-ports.c (ioscm_with_output_to_port_worker): Likewise.
15847 * top.c (execute_command_to_string): Likewise.
15848 * utils.c (do_ui_out_redirect_pop): Likewise.
15850 2017-01-10 Simon Marchi <simon.marchi@ericsson.com>
15852 * stack.c (_initialize_stack): Update "frame" command help message.
15854 2017-01-08 Iain Buclaw <ibuclaw@gdcproject.org>
15856 * d-exp.y (CastExpression): Emit UNOP_CAST_TYPE.
15858 2017-01-06 Yao Qi <yao.qi@linaro.org>
15860 * x86-linux-nat.h: Include gdb_proc_service.h.
15862 2017-01-06 Yao Qi <yao.qi@linaro.org>
15864 * ser-base.h: Include serial.h.
15866 2017-01-06 Yao Qi <yao.qi@linaro.org>
15868 * ppc-linux-tdep.h: Include ppc-tdep.h.
15870 2017-01-06 Yao Qi <yao.qi@linaro.org>
15872 * nat/amd64-linux-siginfo.h: Include signal.h.
15874 2017-01-06 Yao Qi <yao.qi@linaro.org>
15876 * nat/aarch64-linux-hw-point.h: Include break-common.h.
15878 2017-01-06 Yao Qi <yao.qi@linaro.org>
15880 * mi/mi-parse.h: Include mi-cmds.h.
15882 2017-01-06 Yao Qi <yao.qi@linaro.org>
15884 * inf-loop.c: Don't include "target.h".
15885 * inf-loop.h: Include it here.
15887 2017-01-06 Yao Qi <yao.qi@linaro.org>
15889 * dfp.h: Include "dboulest.h" and "expression.h".
15891 2017-01-06 Yao Qi <yao.qi@linaro.org>
15893 * ax-gdb.h: Include "ax.h".
15895 2017-01-06 Yao Qi <yao.qi@linaro.org>
15897 * Makefile.in (HFILES_NO_SRCDIR): Replace gdb_ptrace.h
15898 with nat/gdb_ptrace.h.
15900 2017-01-05 Yao Qi <yao.qi@linaro.org>
15902 * mips-fbsd-tdep.c (mips_fbsd_sigframe_init): Move && to
15904 (mips64_fbsd_sigframe_init): Likewise.
15906 2017-01-04 John Baldwin <jhb@FreeBSD.org>
15908 * mips-fbsd-tdep.c (_initialize_mips_fbsd_tdep): Use
15909 GDB_OSABI_FREEBSD instead of GDB_OSABI_FREEBSD_ELF.
15911 2017-01-04 John Baldwin <jhb@FreeBSD.org>
15913 * Makefile.in (ALLDEPFILES): Add mips-fbsd-nat.c.
15914 * NEWS: Mention new FreeBSD/mips native configuration.
15915 * config/mips/fbsd.mh: New file.
15916 * configure.host: Add mips*-*-freebsd*.
15917 * mips-fbsd-nat.c: New file.
15919 2017-01-04 John Baldwin <jhb@FreeBSD.org>
15921 * Makefile.in (ALL_TARGET_OBS): Add mips-fbsd-tdep.o.
15922 (ALLDEPFILES): Add mips-fbsd-tdep.c.
15923 * NEWS: Mention new FreeBSD/mips target.
15924 * configure.tgt: Add mips*-*-freebsd*.
15925 * mips-fbsd-tdep.c: New file.
15926 * mips-fbsd-tdep.h: New file.
15928 2017-01-04 Yao Qi <yao.qi@linaro.org>
15930 * dwarf2loc.c (write_pieced_value): Don't use VALUE_FRAME_ID (to),
15931 use c->frame_id when the piece location is DWARF_VALUE_REGISTER.
15933 2017-01-01 Joel Brobecker <brobecker@adacore.com>
15935 Update copyright year range in all GDB files.
15937 2017-01-01 Joel Brobecker <brobecker@adacore.com>
15939 * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2016.
15941 For older changes see ChangeLog-2016.
15947 version-control: never