1 2017-11-22 Simon Marchi <simon.marchi@ericsson.com>
3 * stack.c (iterate_over_block_locals): Add LOC_OPTIMIZED_OUT
6 2017-11-22 Simon Marchi <simon.marchi@polymtl.ca>
8 * varobj.h (DEF_VEC_P (varobj_p)): Remove.
10 2017-11-22 Simon Marchi <simon.marchi@polymtl.ca>
12 * varobj.h (struct varobj_update_result): Add constructor, add
13 move constructor, disable copy and assign, initialize fields.
14 <newobj>: Change type to std::vector.
15 (varobj_update): Return std::vector.
16 * varobj.c (install_dynamic_child): Change VEC parameters to
17 std::vector and adjust.
18 (update_dynamic_varobj_children): Likewise.
19 (varobj_update): Return std::vector and adjust.
20 * mi/mi-cmd-var.c (varobj_update_one): Adjust to vector changes.
22 2017-11-22 Simon Marchi <simon.marchi@polymtl.ca>
24 * varobj.h (struct varobj) <parent>: Remove const.
25 <children>: Change type to std::vector.
26 (varobj_list_children): Return std::vector const reference.
27 (varobj_restrict_range): Change parameter type to std::vector
29 * varobj.c (varobj_has_more): Adjust.
30 (varobj_restrict_range): Change parameter type to std::vector
31 const reference and adjust.
32 (install_dynamic_child): Adjust.
33 (update_dynamic_varobj_children): Adjust.
34 (varobj_list_children): Return std::vector const reference and
36 (varobj_add_child): Adjust.
37 (update_type_if_necessary): Adjust.
38 (varobj_update): Adjust.
39 (delete_variable_1): Adjust.
40 * ada-varobj.c (ada_value_has_mutated): Adjust.
41 * mi/mi-cmd-var.c (mi_cmd_var_list_children): Adjust.
43 2017-11-22 Simon Marchi <simon.marchi@polymtl.ca>
45 * varobj.h (struct varobj): Add constructor and destructor,
47 * varobj.c (struct varobj_root): Initialize fields.
48 (struct varobj_dynamic): Initialize fields.
49 (varobj_create): Use unique_ptr instead of cleanup. Create
50 varobj with new instead of new_root_variable.
51 (delete_variable_1): Free variable with delete instead of
53 (create_child_with_value): Create variable with new instead of
55 (varobj::varobj): New.
56 (varobj::~varobj): New (body mostly coming from free_variable).
57 (new_variable): Remove.
58 (free_variable): Remove.
59 (do_free_variable_cleanup): Remove.
60 (make_cleanup_free_variable): Remove.
62 2017-11-22 Ulrich Weigand <uweigand@de.ibm.com>
64 * core-regset.c: Remove file.
65 * Makefile.in (ALLDEPFILES): Remove core-regset.c.
67 2017-11-22 Ulrich Weigand <uweigand@de.ibm.com>
69 * NEWS: Document use of GNU MPFR.
72 * Makefile.in (LIBMPFR): Add define.
73 (CLIBS): Add $(LIBMPFR).
74 * configure.ac: Add --with-mpfr configure option.
75 * configure: Regenerate.
76 * config.in: Regenerate.
78 * target-float.c [HAVE_LIBMPFR]: Include <mpfr.h>.
79 (class mpfr_float_ops): New type.
80 (mpfr_float_ops::from_target): Two new overloaded functions.
81 (mpfr_float_ops::to_target): Likewise.
82 (mpfr_float_ops::to_string): New function.
83 (mpfr_float_ops::from_string): Likewise.
84 (mpfr_float_ops::to_longest): Likewise.
85 (mpfr_float_ops::from_longest): Likewise.
86 (mpfr_float_ops::from_ulongest): Likewise.
87 (mpfr_float_ops::to_host_double): Likewise.
88 (mpfr_float_ops::from_host_double): Likewise.
89 (mpfr_float_ops::convert): Likewise.
90 (mpfr_float_ops::binop): Likewise.
91 (mpfr_float_ops::compare): Likewise.
92 (get_target_float_ops): Use mpfr_float_ops if available.
94 2017-11-22 Ulrich Weigand <uweigand@de.ibm.com>
96 * target-float.c: Do not include <math.h>.
97 Include <cmath> and <limits>.
98 (DOUBLEST): Do not define.
99 (class target_float_ops): New type.
100 (class host_float_ops): New templated type.
101 (class decimal_float_ops): New type.
103 (floatformat_to_doublest): Rename to ...
104 (host_float_ops<T>::from_target): ... this. Use template type T
105 instead of DOUBLEST. Use C++ math routines. Update recursive calls.
106 (host_float_ops<T>::from_target): New overload using a type argument.
107 (floatformat_from_doublest): Rename to ...
108 (host_float_ops<T>::to_target): ... this. Use template type T
109 instead of DOUBLEST. Use C++ math routines. Update recursive calls.
110 (host_float_ops<T>::to_target): New overload using a type argument.
111 (floatformat_printf_format): New function.
112 (struct printf_length_modifier): New templated type.
113 (floatformat_to_string): Rename to ...
114 (host_float_ops<T>::to_string): ... this. Use type instead of
115 floatformat argument. Use floatformat_printf_format and
116 printf_length_modifier. Remove special handling of invalid numbers,
117 infinities and NaN (moved to target_float_to_string).
118 (struct scanf_length_modifier): New templated type.
119 (floatformat_from_string): Rename to ...
120 (host_float_ops<T>::from_string): ... this. Use type instead of
121 floatformat argument. Use scanf_length_modifier.
122 (floatformat_to_longest): Rename to ...
123 (host_float_ops<T>::to_longest): ... this. Use type instead of
124 floatformat argument. Handle out-of-range values deterministically.
125 (floatformat_from_longest): Rename to ...
126 (host_float_ops<T>::from_longest): ... this. Use type instead of
127 floatformat argument.
128 (floatformat_from_ulongest): Rename to ...
129 (host_float_ops<T>::from_ulongest): ... this. Use type instead of
130 floatformat argument.
131 (floatformat_to_host_double): Rename to ...
132 (host_float_ops<T>::to_host_double): ... this. Use type instead of
133 floatformat argument.
134 (floatformat_from_host_double): Rename to ...
135 (host_float_ops<T>::from_host_double): ... this. Use type instead of
136 floatformat argument.
137 (floatformat_convert): Rename to ...
138 (host_float_ops<T>::convert): ... this. Use type instead of
139 floatformat arguments. Remove handling of no-op conversions.
140 (floatformat_binop): Rename to ...
141 (host_float_ops<T>::binop): ... this. Use type instead of
142 floatformat arguments.
143 (floatformat_compare): Rename to ...
144 (host_float_ops<T>::compare): ... this. Use type instead of
145 floatformat arguments.
147 (match_endianness): Use type instead of length/byte_order arguments.
148 (set_decnumber_context): Likewise.
149 (decimal_from_number): Likewise. Update calls.
150 (decimal_to_number): Likewise.
151 (decimal_is_zero): Likewise. Update calls. Move to earlier in file.
152 (decimal_float_ops::to_host_double): New dummy function.
153 (decimal_float_ops::from_host_double): Likewise.
154 (decimal_to_string): Rename to ...
155 (decimal_float_ops::to_string): ... this. Use type instead of
156 length/byte_order arguments. Update calls.
157 (decimal_from_string): Rename to ...
158 (decimal_float_ops::from_string): ... this. Use type instead of
159 length/byte_order arguments. Update calls.
160 (decimal_from_longest): Rename to ...
161 (decimal_float_ops::from_longest): ... this. Use type instead of
162 length/byte_order arguments. Update calls.
163 (decimal_from_ulongest): Rename to ...
164 (decimal_float_ops::from_ulongest): ... this. Use type instead of
165 length/byte_order arguments. Update calls.
166 (decimal_to_longest): Rename to ...
167 (decimal_float_ops::to_longest): ... this. Use type instead of
168 length/byte_order arguments. Update calls.
169 (decimal_binop): Rename to ...
170 (decimal_float_ops::binop): ... this. Use type instead of
171 length/byte_order arguments. Update calls.
172 (decimal_compare): Rename to ...
173 (decimal_float_ops::compare): ... this. Use type instead of
174 length/byte_order arguments. Update calls.
175 (decimal_convert): Rename to ...
176 (decimal_float_ops::convert): ... this. Use type instead of
177 length/byte_order arguments. Update calls.
179 (target_float_same_category_p): New function.
180 (target_float_same_format_p): Likewise.
181 (target_float_format_length): Likewise.
182 (enum target_float_ops_kind): New type.
183 (get_target_float_ops_kind): New function.
184 (get_target_float_ops): Three new overloaded functions.
186 (target_float_is_zero): Update call.
187 (target_float_to_string): Add special handling of invalid numbers,
188 infinities and NaN (moved from floatformat_to_string). Use
189 target_float_ops callback.
190 (target_float_from_string): Use target_float_ops callback.
191 (target_float_to_longest): Likewise.
192 (target_float_from_longest): Likewise.
193 (target_float_from_ulongest): Likewise.
194 (target_float_to_host_double): Likewise.
195 (target_float_from_host_double): Likewise.
196 (target_float_convert): Add special case for no-op conversions.
197 Use target_float_ops callback.
198 (target_float_binop): Use target_float_ops callback.
199 (target_float_compare): Likewise.
201 2017-11-22 Yao Qi <yao.qi@linaro.org>
203 * python/py-gdb-readline.c (gdbpy_readline_wrapper): Use strcpy.
205 2017-11-22 Yao Qi <yao.qi@linaro.org>
207 * cli/cli-decode.c (help_list): Use memcpy instead of strncpy.
208 * cp-namespace.c (cp_lookup_transparent_type_loop): Likewise.
210 2017-11-21 Jerome Guitton <guitton@adacore.com>
212 * ravenscar-thread.c (ravenscar_wait): Update inferior ptid
213 with event ptid from the lower layer before doing the
214 ravenscar-specific update.
216 2017-11-21 Joel Brobecker <brobecker@adacore.com>
218 * ravenscar-thread.c (is_ravenscar_task): Also verify that
219 the ptid's TID is nonzero.
221 2017-11-21 Joel Brobecker <brobecker@adacore.com>
223 * ada-lang.h (ada_get_tcb_types_info): Add declaration.
224 * ada-tasks.c (ada_get_tcb_types_info): Renames get_tcb_types_info.
225 Make non-static. Change return type to char *. Adjust code
226 accordingly. Rewrite the function's documentation.
227 (read_atcb): Adjust call to get_tcb_types_info accordingly.
228 * ravenscar-thread.c (ravenscar_inferior_created): Check that
229 we have enough debugging information in the runtime to support
230 Ada task debugging before we enable the ravenscar-thread layer.
232 2017-11-21 Joel Brobecker <brobecker@adacore.com>
234 * ada-lang.h (ada_get_task_info_from_ptid): Add declaration.
235 * ada-tasks.c (ada_get_task_info_from_ptid): New function.
236 * ravenscar-thread.c: Add into comment.
237 (base_magic_null_ptid): Delete.
238 (base_ptid): Change documentation.
239 (ravenscar_active_task): Renames ravenscar_running_thread.
240 All callers updated throughout.
241 (is_ravenscar_task, ravenscar_get_thread_base_cpu): New function.
242 (ravenscar_task_is_currently_active): Likewise.
243 (get_base_thread_from_ravenscar_task): Ditto.
244 (ravenscar_update_inferior_ptid): Adjust to handle multiple CPUs.
245 (ravenscar_runtime_initialized): Likewise.
246 (get_running_thread_id): Add new parameter "cpu". Adjust
247 implementation to handle this new parameter.
248 (ravenscar_fetch_registers): Small adjustment to use
249 is_ravenscar_task and ravenscar_task_is_currently_active in
250 order to decide whether to use the target beneath or this
252 (ravenscar_store_registers, ravenscar_prepare_to_store): Likewise.
253 (ravenscar_stopped_by_sw_breakpoint): Use
254 get_base_thread_from_ravenscar_task to get the underlying
255 thread, rather than using base_ptid.
256 (ravenscar_stopped_by_hw_breakpoint, ravenscar_stopped_by_watchpoint)
257 (ravenscar_stopped_data_address, ravenscar_core_of_thread):
259 (ravenscar_inferior_created): Do not set base_magic_null_ptid.
261 2017-11-21 Joel Brobecker <brobecker@adacore.com>
263 * ada-lang.h (struct ada_task_info) <base_cpu>: New field.
264 * ada-lang.c (struct atcb_fieldno) <base_cpu>: New field.
265 (get_tcb_types_info): Set fieldnos.base_cpu.
266 (read_atcb): Set task_info->base_cpu.
267 (info_task): Print "Base CPU" info if set by runtime.
269 2017-11-21 Joel Brobecker <brobecker@adacore.com>
271 * ravenscar-thread.c (ravenscar_stopped_by_sw_breakpoint)
272 (ravenscar_stopped_by_hw_breakpoint, ravenscar_stopped_by_watchpoint)
273 (ravenscar_stopped_data_address, ravenscar_core_of_thread):
275 (init_ravenscar_thread_ops): Set the to_stopped_by_sw_breakpoint,
276 to_stopped_by_hw_breakpoint, to_stopped_by_watchpoint,
277 to_stopped_data_address and to_core_of_thread fields of
280 2017-11-21 Ulrich Weigand <uweigand@de.ibm.com>
282 * ppc-tdep.h (enum powerpc_long_double_abi): New data type.
283 (struct gdbarch_tdep): New member long_double_abi.
284 * rs6000-tdep.c (rs6000_gdbarch_init): Initialize long_double_abi
285 member of tdep struct based on Tag_GNU_Power_ABI_FP attribute.
286 * ppc-linux-tdep.c (ppc_linux_init_abi): Install long double data
287 format depending on long_double_abi tdep member.
288 (ppc_floatformat_for_type): Handle __ibm128 type.
290 2017-11-20 Simon Marchi <simon.marchi@polymtl.ca>
292 * darwin-nat.c (set_enable_mach_exceptions): Constify parameter.
294 2017-11-21 Pedro Alves <palves@redhat.com>
296 * dwarf2read.c (mapped_index::find_name_components_bounds)
297 <completion mode, upper bound>: Use std::lower_bound instead of
299 (test_mapped_index_find_name_component_bounds): Remove incorrect
300 "t1_fund" from expected symbols.
302 2017-11-21 Pedro Alves <palves@redhat.com>
304 * dwarf2read.c (mapped_index::name_components_casing): New field.
305 (mapped_index) <build_name_components,
306 find_name_components_bounds): Declare new methods.
307 (mapped_index::find_name_components_bounds)
308 (mapped_index::build_name_components): New methods, factored out
309 from dw2_expand_symtabs_matching_symbol.
310 (check_find_bounds_finds)
311 (test_mapped_index_find_name_component_bounds): New.
312 (run_test): Rename to ...
313 (test_dw2_expand_symtabs_matching_symbol): ... this.
314 (run_test): Reimplement.
316 2017-11-21 Pedro Alves <palves@redhat.com>
318 * cp-name-parser.y (cp_ident_is_alpha, cp_ident_is_alnum): New.
319 (symbol_end): Use cp_ident_is_alnum.
320 (yylex): Use cp_ident_is_alpha and cp_ident_is_alnum.
321 * dwarf2read.c (make_sort_after_prefix_name): New function.
322 (dw2_expand_symtabs_matching_symbol): Use it.
323 (test_symbols): Add more symbols.
324 (run_test): Add tests.
326 2017-11-17 Tom Tromey <tom@tromey.com>
328 * symtab.h (enum symbol_subclass_kind): New.
329 (struct symbol) <is_cplus_template_function, is_rust_vtable>:
331 <subclass>: New member.
332 (SYMBOL_IS_CPLUS_TEMPLATE_FUNCTION): Update.
333 * rust-lang.c (rust_get_trait_object_pointer): Update.
334 * dwarf2read.c (read_func_scope): Update.
335 (read_variable): Update.
337 2017-11-17 Tom Tromey <tom@tromey.com>
339 * dwarf2read.c (read_func_scope): Update.
340 * symtab.h (struct template_symbol): Derive from symbol.
343 2017-11-17 Tom Tromey <tom@tromey.com>
345 * symtab.h (struct symbol) <is_rust_vtable>: New member.
346 (struct rust_vtable_symbol): New.
347 (find_symbol_at_address): Declare.
348 * symtab.c (find_symbol_at_address): New function.
349 * symfile.h (struct quick_symbol_functions)
350 <find_compunit_symtab_by_address>: New member.
351 * symfile-debug.c (debug_qf_find_compunit_symtab_by_address): New
353 (debug_sym_quick_functions): Link to
354 debug_qf_find_compunit_symtab_by_address.
355 * rust-lang.c (rust_get_trait_object_pointer): New function.
356 (rust_evaluate_subexp) <case UNOP_IND>: New case. Call
357 rust_get_trait_object_pointer.
358 * psymtab.c (psym_relocate): Clear psymbol_map.
359 (psym_fill_psymbol_map, psym_find_compunit_symtab_by_address): New
361 (psym_functions): Link to psym_find_compunit_symtab_by_address.
362 * objfiles.h (struct objfile) <psymbol_map>: New member.
363 * dwarf2read.c (dwarf2_gdb_index_functions): Update.
364 (process_die) <DW_TAG_variable>: New case. Call read_variable.
365 (rust_containing_type, read_variable): New functions.
367 2017-11-17 Simon Marchi <simon.marchi@polymtl.ca>
369 * common/gdb_vecs.h (DEF_VEC_I (int)): Remove.
371 2017-11-17 Simon Marchi <simon.marchi@polymtl.ca>
373 * common/filestuff.c: Include <algorithm>.
374 (open_fds): Change type to std::vector<int>.
375 (do_mark_open_fd): Adjust.
376 (unmark_fd_no_cloexec): Adjust.
379 2017-11-17 Simon Marchi <simon.marchi@polymtl.ca>
381 * breakpoint.c (output_thread_groups): Take an std::vector.
382 (print_one_breakpoint_location): Adjust.
384 2017-11-17 Joel Brobecker <brobecker@adacore.com>
386 * ada-lang.c (resolve_subexp): Add handling of OP_VAR_MSYM_VALUE.
387 (ada_evaluate_subexp_for_cast): New function.
388 (ada_evaluate_subexp) <UNOP_CAST>: Replace code by call to
389 ada_evaluate_subexp_for_cast.
390 (ada_evaluate_subexp) <nosideret>: Replace code by call to
392 * eval.c (evaluate_var_value): Make non-static.
393 (evaluate_var_msym_value, eval_skip_value): Likewise.
394 * value.h (evaluate_var_value, evaluate_var_msym_value)
395 (eval_skip_value): Declare.
397 2017-11-16 Joel Brobecker <brobecker@adacore.com>
399 * ada-lang.c (ada_value_cast): Remove parameter "noside".
402 2017-11-16 Pedro Alves <palves@redhat.com>
404 * python/py-unwind.c (pyuw_sniffer): Translate
405 PyExc_KeyboardInterrupt to a GDB Quit exception.
407 2017-11-16 Pedro Alves <palves@redhat.com>
409 * infrun.c (resume_cleanups): Delete.
410 (resume): No longer install a resume_cleanups cleanup nor call
412 (proceed): Pass the terminal to the inferior.
413 (keep_going_pass_signal): No longer install a resume_cleanups
416 2017-11-16 Pedro Alves <palves@redhat.com>
418 * inf-loop.c (inferior_event_handler): Don't swallow the exception
419 if the prompt is blocked.
421 2017-11-16 Pedro Alves <palves@redhat.com>
423 * breakpoint.c (insert_bp_location): Replace bp_err and
424 bp_err_message locals by a gdb_exception local.
426 2017-11-16 Pedro Alves <palves@redhat.com>
428 * inflow.c (scoped_ignore_sigttou): New class.
429 (child_terminal_ours_1, new_tty): Use it.
431 2017-11-16 Ulrich Weigand <uweigand@de.ibm.com>
433 * target-float.c (decimal_from_number): Add byte_order argument and
434 call match_endianness. Error if unknown floating-point type.
435 (decimal_to_number): Add byte_order argument and call match_endianness.
436 (decimal_from_longest): Update call. Do not call match_endianness.
437 (decimal_from_ulongest): Likewise.
438 (decimal_binop): Likewise.
439 (decimal_is_zero): Likewise.
440 (decimal_compare): Likewise.
441 (decimal_convert): Likewise.
443 2017-11-16 Phil Muldoon <pmuldoon@redhat.com>
445 * python/python.c (gdbpy_rbreak): New function.
446 * NEWS: Document Python rbreak feature.
448 2017-11-16 Yao Qi <yao.qi@linaro.org>
450 * features/tic6x-c62x.xml: Remove.
451 * features/tic6x-c64x.xml: Remove.
452 * features/tic6x-c64xp.xml: Remove.
454 2017-11-15 John Baldwin <jhb@FreeBSD.org>
456 * symtab.h: Include <array>.
458 2017-11-15 John Baldwin <jhb@FreeBSD.org>
460 * bsd-kvm.c (bsd_kvm_cmd): Constify 'arg'.
461 (bsd_kvm_proc_cmd): Likewise.
463 2017-11-15 Simon Marchi <simon.marchi@ericsson.com>
465 * tui/tui-win.c (window_name_completer): Replace VEC with
468 2017-11-15 Andrew Cagney <cagney@gnu.org>
470 * MAINTAINERS: Remove no-longer applicable entries.
472 2017-11-15 Andrew Cagney <cagney@gnu.org>
474 * MAINTAINERS: Move self to Past Maintainers.
476 2017-11-15 Yao Qi <yao.qi@linaro.org>
478 * features/Makefile (XMLTOC): Remove nios2-linux.xml.
479 * features/nios2-linux.c: Remove.
480 * nios2-linux-tdep.c (_initialize_nios2_linux_tdep): Don't call
481 initialize_tdesc_nios2_linux.
483 2017-11-15 Yao Qi <yao.qi@linaro.org>
485 * m68hc11-tdep.c (M68HC11_NUM_REGS): Change it to
486 M68HC11_LAST_HARD_REG + 1.
488 2017-11-14 Paul Carroll <pcarroll@codesourcery.com>
491 * remote.c (remote_write_bytes_aux, remote_read_bytes_1,
492 remote_read_bytes, remote_write_qxfer, remote_xfer_partial):
493 Return TARGET_XFER_EOF if size of returned data is 0.
495 2017-11-14 Simon Marchi <simon.marchi@ericsson.com>
497 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
498 memory-map-selftests.c.
499 (SUBDIR_UNITTESTS_OBS): Add memory-map-selftests.o.
500 * memory-map.c (memory_map_start_memory): Fix computation of hi
502 * unittests/memory-map-selftests.c: New file.
504 2017-11-09 Joel Brobecker <brobecker@adacore.com>
506 * ada-lang.c: Fix some typos in the general command documenting
507 how Ada expressions are being evaluated and how their result
510 2017-11-09 Tom Tromey <tom@tromey.com>
512 * psymtab.c (psymbol_hash): Do not hash string contents.
513 (psymbol_compare): Add comment.
515 2017-11-09 Tom Tromey <tom@tromey.com>
517 * dictionary.c (dict_hash): Move "TKB" check into the "switch".
519 2017-11-08 Joel Brobecker <brobecker@adacore.com>
521 * ada-exp.y (write_var_from_sym): Remove parameter
522 "orig_left_context". Update all callers.
524 2017-11-08 Simon Marchi <simon.marchi@ericsson.com>
526 * tracepoint.h (class collection_list) <stringify>: Return
527 std::vector<std::string>.
528 (encode_actions_rsp): Change parameters to
529 std::vector<std::string> *.
530 * tracepoint.c (collection_list::stringify): Return
531 std::vector<std::string> and adjust accordingly.
532 (encode_actions_rsp): Changee parameters to
533 std::vector<std::string> and adjust accordingly.
534 * remote.c (free_actions_list),
535 free_actions_list_cleanup_wrapper): Remove.
536 (remote_download_tracepoint): Adjust to std::vector.
538 2017-11-08 Tom Tromey <tom@tromey.com>
540 * dwarf2read.c (symbolp): Remove typedef.
541 (read_func_scope): Use std::vector.
542 (process_structure_scope): Use std::vector.
544 2017-11-08 Pedro Alves <palves@redhat.com>
546 * ada-lang.c (ada_make_symbol_completion_list): Use
547 completion_skip_symbol.
548 * symtab.c (symbol_is_function_or_method(minimal_symbol*)): New.
549 (symbol_is_function_or_method(symbol*)): New.
550 (add_symtab_completions): Add complete_symbol_mode parameter. Use
551 completion_skip_symbol.
552 (default_collect_symbol_completion_matches_break_on): Use
553 completion_skip_symbol. Pass down mode.
554 (collect_file_symbol_completion_matches): Pass down mode.
555 * symtab.h (symbol_is_function_or_method): New declarations.
556 (completion_skip_symbol): New template function.
558 2017-11-08 Pedro Alves <palves@redhat.com>
560 * linespec.c (iterate_over_all_matching_symtabs): Add
561 search_domain parameter. Pass it down to expand_symtabs_matching.
562 (decode_objc): Request FUNCTIONS_DOMAIN symbols only.
563 (lookup_prefix_sym): Adjust by passing ALL_DOMAIN as
565 (add_all_symbol_names_from_pspace): Add search_domain parameter.
567 (find_method, find_function_symbols): Request FUNCTIONS_DOMAIN
569 (add_matching_symbols_to_info): Add search_domain parameter. Pass
572 2017-11-08 Pedro Alves <palves@redhat.com>
574 * ada-lang.c (ada_make_symbol_completion_list): Remove text and
575 text_len locals and don't pass them down.
576 * symtab.c (completion_list_add_name): Remove
577 sym_text/sym_text_len parameters and adjust.
578 (completion_list_add_symbol, completion_list_add_msymbol)
579 (completion_list_objc_symbol, completion_list_add_fields)
580 (add_symtab_completions): Likewise.
581 (default_collect_symbol_completion_matches_break_on)
582 (collect_file_symbol_completion_matches): Remove sym_text_len
583 local and don't pass it down.
584 * symtab.h (completion_list_add_name): Remove
585 sym_text/sym_text_len parameters.
587 2017-11-08 Pedro Alves <palves@redhat.com>
589 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
590 unittests/lookup_name_info-selftests.c.
591 (SUBDIR_UNITTESTS_OBS): Add lookup_name_info-selftests.o.
592 * cp-support.c: Include "selftest.h".
593 (cp_remove_params_1): Rename from cp_remove_params. Add
594 'require_param' parameter, and handle it.
595 (cp_remove_params): Reimplement.
596 (cp_remove_params_if_any): New.
597 (selftests::quote): New.
598 (selftests::check_remove_params): New.
599 (selftests::test_cp_remove_params): New.
600 (_initialize_cp_support): Install
601 selftests::test_cp_remove_params.
602 * cp-support.h (cp_remove_params_if_any): Declare.
603 * dwarf2read.c :Include "selftest.h".
604 (dw2_expand_symtabs_matching_symbol): Use
605 lookup_name_info::make_ignore_params.
606 (selftests::dw2_expand_symtabs_matching::mock_mapped_index)
607 (selftests::dw2_expand_symtabs_matching::string_or_null)
608 (selftests::dw2_expand_symtabs_matching::check_match)
609 (selftests::dw2_expand_symtabs_matching::test_symbols)
610 (selftests::dw2_expand_symtabs_matching::run_test): New.
611 (_initialize_dwarf2_read): Register
612 selftests::dw2_expand_symtabs_matching::run_test.
613 * psymtab.c (psym_expand_symtabs_matching): Use
614 lookup_name_info::make_ignore_params.
615 * symtab.c (demangle_for_lookup_info::demangle_for_lookup_info):
616 If the lookup name wants to ignore parameters, strip them.
617 (compare_symbol_name): Remove sym_text/sym_text_len parameters and
619 (completion_list_add_name): Don't pass down sym_text/sym_text_len.
620 (default_collect_symbol_completion_matches_break_on): Don't try to
622 * symtab.h (lookup_name_info::lookup_name_info): Add
623 'ignore_parameters' parameter.
624 (lookup_name_info::ignore_parameters)
625 (lookup_name_info::make_ignore_params): New methods.
626 (lookup_name_info::m_ignore_parameters): New field.
627 * unittests/lookup_name_info-selftests.c: New file.
629 2017-11-08 Pedro Alves <palves@redhat.com>
631 * dwarf2read.c (dw2_expand_marked_cus)
632 (dw2_expand_symtabs_matching_symbol): Remove forward declarations.
633 (dw2_expand_symtabs_matching): Move further below.
634 (dw2_expand_marked_cus): Reindent.
636 2017-11-08 Pedro Alves <palves@redhat.com>
638 * dwarf2read.c (byte_swap, MAYBE_SWAP): Move higher up in file.
639 (struct name_component): New.
640 (mapped_index::name_components): New field.
641 (mapped_index::symbol_name_at): New method.
642 (dwarf2_read_index): Call mapped_index ctor.
643 (dw2_map_matching_symbols): Add comment about name_components
645 (dw2_expand_symtabs_matching): Factor part to...
646 (dw2_expand_symtabs_matching_symbol): ... this new function.
647 Build name components table, and lookup symbols in it before
648 calling the name matcher.
649 (dw2_expand_marked_cus): New, factored out from
650 dw2_expand_symtabs_matching.
651 (dwarf2_per_objfile_free): Call the mapped_index's dtor.
653 2017-11-08 Pedro Alves <palves@redhat.com>
655 * ada-lang.c (ada_encode): Rename to ..
656 (ada_encode_1): ... this. Add throw_errors parameter and handle
658 (ada_encode): Reimplement.
659 (match_name): Delete, folded into full_name.
660 (resolve_subexp): No longer pass the encoded name to
661 ada_lookup_symbol_list.
662 (should_use_wild_match): Delete.
663 (name_match_type_from_name): New.
664 (ada_lookup_simple_minsym): Use lookup_name_info and the
665 language's symbol_name_matcher_ftype.
666 (add_symbols_from_enclosing_procs, ada_add_local_symbols)
667 (ada_add_block_renamings): Adjust to use lookup_name_info.
668 (ada_lookup_name): New.
669 (add_nonlocal_symbols, ada_add_all_symbols)
670 (ada_lookup_symbol_list_worker, ada_lookup_symbol_list)
671 (ada_iterate_over_symbols): Adjust to use lookup_name_info.
672 (ada_name_for_lookup): Delete.
673 (ada_lookup_encoded_symbol): Construct a verbatim name.
674 (wild_match): Reverse sense of return type. Use bool.
675 (full_match): Reverse sense of return type. Inline bits of old
677 (ada_add_block_symbols): Adjust to use lookup_name_info.
678 (symbol_completion_match): Delete, folded into...
679 (ada_lookup_name_info::matches): ... .this new method.
680 (symbol_completion_add): Delete.
681 (ada_collect_symbol_completion_matches): Add name_match_type
682 parameter. Adjust to use lookup_name_info and
683 completion_list_add_name.
684 (get_var_value, ada_add_global_exceptions): Adjust to use
686 (ada_get_symbol_name_cmp): Delete.
687 (do_wild_match, do_full_match): New functions.
688 (ada_lookup_name_info::ada_lookup_name_info): New method.
689 (ada_symbol_name_matches, ada_get_symbol_name_matcher): New
691 (ada_language_defn): Install ada_get_symbol_name_matcher.
692 * ada-lex.l (processId): If name starts with '<', copy it
694 * block.c (block_iter_match_step, block_iter_match_first)
695 (block_iter_match_next, block_lookup_symbol)
696 (block_lookup_symbol_primary, block_find_symbol): Adjust to use
698 * block.h (block_iter_match_first, block_iter_match_next)
699 (ALL_BLOCK_SYMBOLS_WITH_NAME): Adjust to use lookup_name_info.
700 * c-lang.c (c_language_defn, cplus_language_defn)
701 (asm_language_defn, minimal_language_defn): Adjust comments to
702 refer to la_get_symbol_name_matcher.
703 * completer.c (complete_files_symbols)
704 (collect_explicit_location_matches, symbol_completer): Pass a
705 symbol_name_match_type down.
706 * completer.h (class completion_match, completion_match_result):
708 (completion_tracker::reset_completion_match_result): New method.
709 (completion_tracker::m_completion_match_result): New field.
710 * cp-support.c (make_symbol_overload_list_block): Adjust to use
712 (cp_fq_symbol_name_matches, cp_get_symbol_name_matcher): New
714 * cp-support.h (cp_get_symbol_name_matcher): New declaration.
715 * d-lang.c: Adjust comments to refer to
716 la_get_symbol_name_matcher.
717 * dictionary.c (dict_vector) <iter_match_first, iter_match_next>:
718 Adjust to use lookup_name_info.
719 (dict_iter_match_first, dict_iter_match_next)
720 (iter_match_first_hashed, iter_match_next_hashed)
721 (iter_match_first_linear, iter_match_next_linear): Adjust to work
722 with a lookup_name_info.
723 * dictionary.h (dict_iter_match_first, dict_iter_match_next):
725 * dwarf2read.c (dw2_lookup_symbol): Adjust to use lookup_name_info.
726 (dw2_map_matching_symbols): Adjust to use symbol_name_match_type.
727 (gdb_index_symbol_name_matcher): New class.
728 (dw2_expand_symtabs_matching) Adjust to use lookup_name_info and
729 gdb_index_symbol_name_matcher. Accept a NULL symbol_matcher.
730 * f-lang.c (f_collect_symbol_completion_matches): Adjust to work
731 with a symbol_name_match_type.
732 (f_language_defn): Adjust comments to refer to
733 la_get_symbol_name_matcher.
734 * go-lang.c (go_language_defn): Adjust comments to refer to
735 la_get_symbol_name_matcher.
736 * language.c (default_symbol_name_matcher)
737 (language_get_symbol_name_matcher): New functions.
738 (unknown_language_defn, auto_language_defn): Adjust comments to
739 refer to la_get_symbol_name_matcher.
740 * language.h (symbol_name_cmp_ftype): Delete.
741 (language_defn) <la_collect_symbol_completion_matches>: Add match
743 <la_get_symbol_name_cmp>: Delete field.
744 <la_get_symbol_name_matcher>: New field.
745 <la_iterate_over_symbols>: Adjust to use lookup_name_info.
746 (default_symbol_name_matcher, language_get_symbol_name_matcher):
748 * linespec.c (iterate_over_all_matching_symtabs)
749 (iterate_over_file_blocks): Adjust to use lookup_name_info.
750 (find_methods): Add language parameter, and use lookup_name_info
751 and the language's symbol_name_matcher_ftype.
752 (linespec_complete_function): Adjust.
753 (lookup_prefix_sym): Use lookup_name_info.
754 (add_all_symbol_names_from_pspace): Adjust.
755 (find_superclass_methods): Add language parameter and pass it
757 (find_method): Pass symbol language down.
758 (find_linespec_symbols): Don't demangle or Ada encode here.
759 (search_minsyms_for_name): Add lookup_name_info parameter.
760 (add_matching_symbols_to_info): Add name_match_type parameter.
761 Use lookup_name_info.
762 * m2-lang.c (m2_language_defn): Adjust comments to refer to
763 la_get_symbol_name_matcher.
764 * minsyms.c: Include <algorithm>.
765 (add_minsym_to_demangled_hash_table): Remove table parameter and
766 add objfile parameter. Use search_name_hash, and add language to
767 demangled languages vector.
768 (struct found_minimal_symbols): New struct.
769 (lookup_minimal_symbol_mangled, lookup_minimal_symbol_demangled):
771 (lookup_minimal_symbol): Adjust to use them. Don't canonicalize
772 input names here. Use lookup_name_info instead. Lookup up
773 demangled names once for each language in the demangled names
775 (iterate_over_minimal_symbols): Use lookup_name_info. Lookup up
776 demangled names once for each language in the demangled names
778 (build_minimal_symbol_hash_tables): Adjust.
779 * minsyms.h (iterate_over_minimal_symbols): Adjust to pass down a
781 * objc-lang.c (objc_language_defn): Adjust comment to refer to
782 la_get_symbol_name_matcher.
783 * objfiles.h: Include <vector>.
784 (objfile_per_bfd_storage) <demangled_hash_languages>: New field.
785 * opencl-lang.c (opencl_language_defn): Adjust comment to refer to
786 la_get_symbol_name_matcher.
787 * p-lang.c (pascal_language_defn): Adjust comment to refer to
788 la_get_symbol_name_matcher.
789 * psymtab.c (psym_lookup_symbol): Use lookup_name_info.
790 (match_partial_symbol): Use symbol_name_match_type,
791 lookup_name_info and psymbol_name_matches.
792 (lookup_partial_symbol): Use lookup_name_info.
793 (map_block): Use symbol_name_match_type and lookup_name_info.
794 (psym_map_matching_symbols): Use symbol_name_match_type.
795 (psymbol_name_matches): New.
796 (recursively_search_psymtabs): Use lookup_name_info and
797 psymbol_name_matches. Rename 'kind' parameter to 'domain'.
798 (psym_expand_symtabs_matching): Use lookup_name_info. Rename
799 'kind' parameter to 'domain'.
800 * rust-lang.c (rust_language_defn): Adjust comment to refer to
801 la_get_symbol_name_matcher.
802 * symfile-debug.c (debug_qf_map_matching_symbols)
803 (debug_qf_map_matching_symbols): Use symbol_name_match_type.
804 (debug_qf_expand_symtabs_matching): Use lookup_name_info.
805 * symfile.c (expand_symtabs_matching): Use lookup_name_info.
806 * symfile.h (quick_symbol_functions) <map_matching_symbols>:
807 Adjust to use symbol_name_match_type.
808 <expand_symtabs_matching>: Adjust to use lookup_name_info.
809 (expand_symtabs_matching): Adjust to use lookup_name_info.
810 * symmisc.c (maintenance_expand_symtabs): Use
811 lookup_name_info::match_any ().
812 * symtab.c (symbol_matches_search_name): New.
813 (eq_symbol_entry): Adjust to use lookup_name_info and the
815 (demangle_for_lookup_info::demangle_for_lookup_info): New.
816 (lookup_name_info::match_any): New.
817 (iterate_over_symbols, search_symbols): Use lookup_name_info.
818 (compare_symbol_name): Add language, lookup_name_info and
819 completion_match_result parameters, and use them.
820 (completion_list_add_name): Make extern. Add language and
821 lookup_name_info parameters. Use them.
822 (completion_list_add_symbol, completion_list_add_msymbol)
823 (completion_list_objc_symbol): Add lookup_name_info parameters and
824 adjust. Pass down language.
825 (completion_list_add_fields): Add lookup_name_info parameters and
826 adjust. Pass down language.
827 (add_symtab_completions): Add lookup_name_info parameters and
829 (default_collect_symbol_completion_matches_break_on): Add
830 name_match_type parameter, and use it. Use lookup_name_info.
831 (default_collect_symbol_completion_matches)
832 (collect_symbol_completion_matches): Add name_match_type
833 parameter, and pass it down.
834 (collect_symbol_completion_matches_type): Adjust.
835 (collect_file_symbol_completion_matches): Add name_match_type
836 parameter, and use lookup_name_info.
837 * symtab.h: Include <string> and "common/gdb_optional.h".
838 (enum class symbol_name_match_type): New.
839 (class ada_lookup_name_info): New.
840 (struct demangle_for_lookup_info): New.
841 (class lookup_name_info): New.
842 (symbol_name_matcher_ftype): New.
843 (SYMBOL_MATCHES_SEARCH_NAME): Use symbol_matches_search_name.
844 (symbol_matches_search_name): Declare.
845 (MSYMBOL_MATCHES_SEARCH_NAME): Delete.
846 (default_collect_symbol_completion_matches)
847 (collect_symbol_completion_matches)
848 (collect_file_symbol_completion_matches): Add name_match_type
850 (iterate_over_symbols): Use lookup_name_info.
851 (completion_list_add_name): Declare.
852 * utils.c (enum class strncmp_iw_mode): Moved to utils.h.
853 (strncmp_iw_with_mode): Now extern.
854 * utils.h (enum class strncmp_iw_mode): Moved from utils.c.
855 (strncmp_iw_with_mode): Declare.
857 2017-11-08 Keith Seitz <keiths@redhat.com>
858 Pedro Alves <palves@redhat.com>
860 * ada-lang.c (ada_language_defn): Install
861 default_search_name_hash.
862 * buildsym.c (struct buildsym_compunit): <language>: New field.
863 (finish_block_internal): Pass language when creating dictionaries.
864 (start_buildsym_compunit, start_symtab): New language parameters.
866 (restart_symtab): Pass down compilation unit's language.
867 * buildsym.h (enum language): Forward declare.
868 (start_symtab): New 'language' parameter.
869 * c-lang.c (c_language_defn, cplus_language_defn)
870 (asm_language_defn, minimal_language_defn): Install
871 default_search_name_hash.
872 * coffread.c (coff_start_symtab): Adjust.
873 * d-lang.c (d_language_defn): Install default_search_name_hash.
874 * dbxread.c (struct symloc): Add 'pst_language' field.
875 (PST_LANGUAGE): Define.
876 (start_psymtab, read_ofile_symtab): Use it.
877 (process_one_symbol): New 'language' parameter. Pass it down.
878 * dictionary.c (struct dictionary) <language>: New field.
879 (DICT_LANGUAGE): Define.
880 (dict_create_hashed, dict_create_hashed_expandable)
881 (dict_create_linear, dict_create_linear_expandable): New parameter
882 'language'. Set the dictionary's language.
883 (iter_match_first_hashed): Adjust to rename.
884 (insert_symbol_hashed): Assert we don't see mismatching
885 languages. Adjust to rename.
886 (dict_hash): Rename to ...
887 (default_search_name_hash): ... this and make extern.
888 * dictionary.h (struct language_defn): Forward declare.
889 (dict_create_hashed): New parameter 'language'.
890 * dwarf2read.c (dwarf2_start_symtab): Pass down language.
891 * f-lang.c (f_language_defn): Install default_search_name_hash.
892 * go-lang.c (go_language_defn): Install default_search_name_hash.
893 * jit.c (finalize_symtab): Pass compunit's language to dictionary
895 * language.c (unknown_language_defn, auto_language_defn):
896 * language.h (language_defn::la_search_name_hash): New field.
897 (default_search_name_hash): Declare.
898 * m2-lang.c (m2_language_defn): Install default_search_name_hash.
899 * mdebugread.c (new_block): New parameter 'language'.
900 * mdebugread.c (parse_symbol): Pass symbol language to block
902 (psymtab_to_symtab_1): Pass down language.
903 (new_symtab): Pass compunit's language to block allocation.
904 * objc-lang.c (objc_language_defn): Install
905 default_search_name_hash.
906 * opencl-lang.c (opencl_language_defn):
907 * p-lang.c (pascal_language_defn): Install
908 default_search_name_hash.
909 * rust-lang.c (rust_language_defn): Install
910 default_search_name_hash.
911 * stabsread.h (enum language): Forward declare.
912 (process_one_symbol): Add 'language' parameter.
913 * symtab.c (search_name_hash): New function.
914 * symtab.h (search_name_hash): Declare.
915 * xcoffread.c (read_xcoff_symtab): Pass language to start_symtab.
917 2017-11-08 Pedro Alves <palves@redhat.com>
919 * cp-name-parser.y (main): Don't initialize extra_chars.
921 2017-11-07 Tom Tromey <tom@tromey.com>
923 * event-top.h (command_handler): Constify.
924 * record-full.c (cmd_record_full_start): Update.
925 * thread.c (thread_apply_all_command): Update.
926 * printcmd.c (eval_command): Update.
927 * mi/mi-main.c (mi_execute_cli_command): Update.
928 (mi_execute_async_cli_command): Update.
929 * tui/tui-stack.c (tui_update_command): Update.
930 * cli/cli-interp.c (safe_execute_command): Constify.
931 * record.c (record_start): Update.
932 (record_start, record_stop, cmd_record_start): Update.
933 * record-btrace.c (cmd_record_btrace_bts_start): Update.
934 (cmd_record_btrace_pt_start): Update.
935 (cmd_record_btrace_start): Update.
936 (cmd_record_btrace_start): Update.
937 * reverse.c (exec_reverse_once): Update.
938 * python/python.c (execute_gdb_command): Don't copy the command.
939 * event-top.c (command_line_handler): Update.
940 (command_handler): Constify.
941 * defs.h (deprecated_call_command_hook): Constify.
942 * cli/cli-script.h (execute_user_command): Constify.
943 * cli/cli-script.c (execute_user_command): Constify.
944 (execute_cmd_pre_hook, execute_cmd_post_hook): Constify.
945 (enum command_control_type): Update.
946 * main.c (catch_command_errors): Remove non-const overload.
947 (catch_command_errors_ftype): Remove.
948 * python/py-cmd.c (cmdpy_function): Constify.
949 * guile/scm-cmd.c (cmdscm_function): Constify.
950 * cli/cli-dump.c (call_dump_func): Constify.
951 * cli/cli-decode.c (do_const_cfunc): Constify.
952 (do_sfunc): Constify.
953 (cmd_func): Constify.
954 * gdbcmd.h (execute_command, execute_command_to_string): Constify.
955 * top.h (execute_command): Constify.
956 * top.c (execute_command): Constify.
957 (execute_command_to_string): Constify.
958 (deprecated_call_command_hook): Constify.
959 * command.h (cmd_func): Constify.
960 * cli/cli-decode.h (struct cmd_list_element) <func>: Constify.
962 2017-11-07 Tom Tromey <tom@tromey.com>
964 * ada-lang.c (catch_ada_exception_command): Constify.
965 (catch_assert_command): Constify.
966 * break-catch-throw.c (catch_catch_command, catch_throw_command)
967 (catch_rethrow_command): Constify.
968 (catch_exception_command_1): Constify.
969 * breakpoint.h (add_catch_command): Constify.
970 * break-catch-syscall.c (catch_syscall_command_1): Constify.
971 (catch_syscall_split_args): Constify.
972 * break-catch-sig.c (catch_signal_command): Constify.
973 (catch_signal_split_args): Constify.
974 * cli/cli-decode.h (struct cmd_list_element) <function>: Use
975 cmd_const_sfunc_ftype.
976 * cli/cli-decode.c (add_setshow_cmd_full): Constify.
977 (add_setshow_enum_cmd, add_setshow_auto_boolean_cmd)
978 (add_setshow_boolean_cmd, add_setshow_filename_cmd)
979 (add_setshow_string_cmd, struct cmd_list_element)
980 (add_setshow_optional_filename_cmd, add_setshow_integer_cmd)
981 (add_setshow_uinteger_cmd, add_setshow_zinteger_cmd)
982 (add_setshow_zuinteger_unlimited_cmd, add_setshow_zuinteger_cmd):
984 (set_cmd_sfunc): Constify.
985 (empty_sfunc): Constify.
986 * command.h (add_setshow_enum_cmd, add_setshow_auto_boolean_cmd)
987 (add_setshow_boolean_cmd, add_setshow_filename_cmd)
988 (add_setshow_string_cmd, add_setshow_string_noescape_cmd)
989 (add_setshow_optional_filename_cmd, add_setshow_integer_cmd)
990 (add_setshow_uinteger_cmd, add_setshow_zinteger_cmd)
991 (add_setshow_zuinteger_cmd, add_setshow_zuinteger_unlimited_cmd):
993 (set_cmd_sfunc): Constify.
994 (cmd_sfunc_ftype): Remove.
995 * compile/compile.c (set_compile_args): Constify.
996 * infrun.c (set_disable_randomization): Constify.
997 * infcmd.c (set_args_command, set_cwd_command): Constify.
998 * breakpoint.c (set_condition_evaluation_mode): Constify.
999 (add_catch_command): Constify.
1000 (catch_fork_command_1, catch_exec_command_1)
1001 (catch_load_command_1, catch_unload_command_1): Constify.
1002 (catch_load_or_unload): Constify.
1003 * guile/scm-param.c (pascm_set_func): Constify.
1004 (add_setshow_generic): Constify.
1005 * python/py-param.c (get_set_value): Constify.
1006 * top.h (set_verbose): Constify.
1007 * tui/tui-win.c (tui_set_var_cmd): Constify.
1008 * mi/mi-main.c (set_mi_async_command): Constify.
1009 * cli/cli-logging.c (set_logging_overwrite)
1010 (set_logging_redirect): Constify.
1011 * value.c (set_max_value_size): Constify.
1012 * valprint.c (set_input_radix, set_output_radix): Constify.
1013 * utils.c (set_width_command, set_height_command): Constify.
1014 * typeprint.c (set_print_type_methods, set_print_type_typedefs): Constify.
1015 * tracepoint.c (set_disconnected_tracing)
1016 (set_circular_trace_buffer, set_trace_buffer_size)
1017 (set_trace_user, set_trace_notes, set_trace_stop_notes): Constify.
1018 * top.c (set_history_size_command, set_verbose, set_editing)
1019 (set_gdb_datadir, set_history_filename): Constify.
1020 * target.c (set_targetdebug, maint_set_target_async_command)
1021 (maint_set_target_non_stop_command, set_target_permissions)
1022 (set_write_memory_permission): Constify.
1023 (open_target): Constify.
1024 * target-descriptions.c (set_tdesc_filename_cmd): Constify.
1025 * target-dcache.c (set_stack_cache, set_code_cache): Constify.
1026 * symtab.c (set_symbol_cache_size_handler): Constify.
1027 * symfile.c (set_ext_lang_command): Constify.
1028 * symfile-debug.c (set_debug_symfile): Constify.
1029 * source.c (set_directories_command): Constify.
1030 * solib.c (reload_shared_libraries, gdb_sysroot_changed): Constify.
1031 * serial.c (set_parity): Constify.
1032 * rs6000-tdep.c (powerpc_set_soft_float, powerpc_set_vector_abi): Constify.
1033 * remote.c (set_remote_exec_file, set_remotebreak)
1034 (set_remote_protocol_Z_packet_cmd, set_range_stepping): Constify.
1035 * record.c (set_record_insn_history_size)
1036 (set_record_call_history_size): Constify.
1037 * record-full.c (set_record_full_insn_max_num): Constify.
1038 * proc-api.c (set_procfs_trace_cmd, set_procfs_file_cmd): Constify.
1039 * osabi.c (set_osabi): Constify.
1040 * mips-tdep.c (set_mips64_transfers_32bit_regs)
1041 (reinit_frame_cache_sfunc, mips_abi_update): Constify.
1042 * maint.c (maintenance_set_profile_cmd): Constify.
1043 * linux-thread-db.c (set_libthread_db_search_path): Constify.
1044 * language.c (set_language_command, set_range_command)
1045 (set_case_command): Constify.
1046 * infrun.c (set_non_stop, set_observer_mode)
1047 (set_stop_on_solib_events, set_schedlock_func)
1048 (set_exec_direction_func): Constify.
1049 * infcmd.c (set_inferior_tty_command): Constify.
1050 * disasm.c (set_disassembler_options_sfunc): Constify.
1051 * demangle.c (set_demangling_command): Constify.
1052 * dcache.c (set_dcache_size, set_dcache_line_size): Constify.
1053 * cris-tdep.c (set_cris_version, set_cris_mode)
1054 (set_cris_dwarf2_cfi): Constify.
1055 * corefile.c (set_gnutarget_command): Constify.
1056 * charset.c (set_host_charset_sfunc, set_target_charset_sfunc)
1057 (set_target_wide_charset_sfunc): Constify.
1058 * breakpoint.c (update_dprintf_commands): Constify.
1059 * auto-load.c (set_auto_load_dir, set_auto_load_safe_path): Constify.
1060 * arm-tdep.c (set_fp_model_sfunc, arm_set_abi)
1061 (set_disassembly_style_sfunc): Constify.
1062 * arch-utils.c (set_endian, set_architecture): Constify.
1063 * alpha-tdep.c (reinit_frame_cache_sfunc): Constify.
1064 * agent.c (set_can_use_agent): Constify.
1066 2017-11-07 Tom Tromey <tom@tromey.com>
1068 * go32-nat.c (go32_sysinfo, go32_sldt, go32_sgdt, go32_sidt)
1069 (go32_pde, go32_pte, go32_pte_for_address): Constify.
1070 * gnu-nat.c (_parse_bool_arg, show_thread_default_pause_cmd)
1071 (set_thread_default_pause_cmd, set_thread_default_run_cmd)
1072 (show_thread_default_run_cmd, set_thread_default_detach_sc_cmd)
1073 (parse_int_arg, show_thread_default_detach_sc_cmd)
1074 (set_signals_cmd, show_signals_cmd, set_sig_thread_cmd)
1075 (show_sig_thread_cmd, set_stopped_cmd, show_stopped_cmd)
1076 (set_exceptions_cmd, show_exceptions_cmd, set_task_pause_cmd)
1077 (show_task_pause_cmd, set_task_detach_sc_cmd)
1078 (show_task_detach_sc_cmd, set_task_exc_port_cmd)
1079 (set_noninvasive_cmd, set_thread_pause_cmd)
1080 (show_thread_pause_cmd, set_thread_run_cmd, show_thread_run_cmd)
1081 (set_thread_detach_sc_cmd, show_thread_detach_sc_cmd)
1082 (set_thread_exc_port_cmd, thread_takeover_sc_cmd): Constify.
1083 * windows-nat.c (display_selectors): Constify.
1084 * cli/cli-decode.h (struct cmd_list_element) <function>: Remove
1086 * cli/cli-decode.c (set_cmd_cfunc): Remove non-const overload.
1087 (cmd_cfunc_eq): Likewise.
1088 (struct cmd_list_element): Likewise.
1090 (cli_user_command_p): Update.
1091 * command.h (add_cmd): Remove non-const overload.
1092 (cmd_cfunc_ftype): Remove typedef.
1093 (cmd_cfunc_eq): Remove non-const overload.
1094 * value.c (show_values): Constify.
1095 * thread.c (thread_apply_all_command): Constify.
1096 * symfile.c (load_command): Constify.
1097 * source.c (directory_command): Constify.
1098 * maint.c (maintenance_internal_error)
1099 (maintenance_demangler_warning, maintenance_space_display)
1100 (maintenance_print_architecture, maintenance_translate_address)
1101 (maintenance_info_selftests, maintenance_internal_warning):
1103 * breakpoint.c (disable_trace_command, enable_trace_command):
1105 * auto-load.c (info_auto_load_local_gdbinit, add_auto_load_dir):
1107 (add_auto_load_safe_path): Constify.
1108 * guile/scm-auto-load.c (info_auto_load_guile_scripts): Constify.
1109 * top.h (show_commands): Constify.
1110 * linux-thread-db.c (info_auto_load_libthread_db): Constify.
1111 * sparc64-tdep.c (adi_examine_command): Constify.
1112 (adi_assign_command): Constify.
1114 2017-11-07 Tom Tromey <tom@tromey.com>
1116 * frame.h (info_locals_command, info_args_command): Constify.
1117 * auto-load.h (auto_load_info_scripts): Constify.
1118 * inferior.h (registers_info): Constify.
1119 * copying.c: Rebuild.
1120 * copying.awk: Constify generated commands.
1121 * auto-load.c (auto_load_info_scripts)
1122 (info_auto_load_gdb_scripts): Constify.
1123 * cli/cli-decode.c (struct cmd_list_element): Take a
1124 cmd_const_cfunc_ftype.
1125 * command.h (add_info): Take a cmd_const_cfunc_ftype.
1126 * tui/tui-win.c (tui_all_windows_info): Constify.
1127 * python/py-auto-load.c (info_auto_load_python_scripts):
1129 * cli/cli-cmds.c (show_command): Remove non-const overload.
1130 * tracepoint.c (info_tvariables_command, info_scope_command):
1132 (info_static_tracepoint_markers_command): Constify.
1133 * thread.c (info_threads_command): Constify.
1134 (print_thread_info_1): Constify.
1135 * target.c (info_target_command): Constify.
1136 * symtab.c (info_sources_command, info_functions_command)
1137 (info_types_command): Constify.
1138 (info_variables_command): Remove non-const overload.
1139 * symfile.c (info_ext_lang_command): Constify.
1140 * stack.c (info_frame_command, info_locals_command)
1141 (info_args_command): Constify.
1142 (backtrace_command): Remove non-const overload.
1143 * source.c (info_source_command, info_line_command): Constify.
1144 * solib.c (info_sharedlibrary_command): Constify.
1145 * skip.c (info_skip_command): Constify.
1146 * ser-go32.c (info_serial_command): Constify.
1147 * reverse.c (info_bookmarks_command): Constify.
1148 * printcmd.c (info_symbol_command, info_address_command)
1149 (info_display_command): Constify.
1150 * osdata.c (info_osdata_command): Constify.
1151 * objc-lang.c (info_selectors_command, info_classes_command):
1153 * nto-procfs.c (procfs_pidlist, procfs_meminfo): Constify.
1154 * memattr.c (info_mem_command): Constify.
1155 * macrocmd.c (info_macro_command, info_macros_command): Constify.
1156 * linux-fork.c (info_checkpoints_command): Constify.
1157 * infrun.c (info_signals_command): Constify.
1158 * inflow.c (info_terminal_command): Constify.
1159 * inferior.c (info_inferiors_command): Constify.
1160 (print_inferior): Constify.
1161 * infcmd.c (info_program_command, info_all_registers_command)
1162 (info_registers_command, info_vector_command)
1163 (info_float_command): Constify.
1164 (registers_info): Constify.
1165 * gnu-nat.c (info_send_rights_cmd, info_recv_rights_cmd)
1166 (info_port_sets_cmd, info_dead_names_cmd, info_port_rights_cmd):
1168 * f-valprint.c (info_common_command): Constify.
1169 * dcache.c (info_dcache_command): Constify.
1170 (dcache_info_1): Constify.
1171 * darwin-nat-info.c (info_mach_tasks_command)
1172 (info_mach_task_command, info_mach_ports_command)
1173 (info_mach_port_command, info_mach_threads_command)
1174 (info_mach_thread_command, info_mach_regions_command)
1175 (info_mach_regions_recurse_command, info_mach_region_command)
1176 (info_mach_exceptions_command): Constify.
1177 (get_task_from_args): Constify.
1178 * cp-support.c (info_vtbl_command): Constify.
1179 * breakpoint.c (info_watchpoints_command)
1180 (info_tracepoints_command): Constify.
1181 (info_breakpoints_command): Remove non-const overload.
1182 * avr-tdep.c (avr_io_reg_read_command): Constify.
1183 * auxv.c (info_auxv_command): Constify.
1184 * ada-tasks.c (info_tasks_command): Constify.
1185 (info_task): Constify.
1186 * ada-lang.c (info_exceptions_command): Constify.
1188 2017-11-07 Tom Tromey <tom@tromey.com>
1190 * solib.h (no_shared_libraries): Constify.
1191 * frame.h (return_command): Constify.
1192 * cli/cli-cmds.h (quit_command): Constify.
1193 * top.h (quit_command, execute_command): Constify.
1194 * target.h (flash_erase_command): Constify.
1195 * inferior.h (set_inferior_args, attach_command): Constify.
1196 * tracepoint.h (start_tracing, stop_tracing): Constify.
1197 * breakpoint.h (break_command, tbreak_command)
1198 (hbreak_command_wrapper, thbreak_command_wrapper)
1199 (rbreak_command_wrapper, watch_command_wrapper)
1200 (awatch_command_wrapper, rwatch_command_wrapper)
1201 (get_tracepoint_by_number): Constify.
1202 * symtab.c (info_variables_command, rbreak_command)
1203 (symtab_symbol_info): Constify.
1204 (info_variables_command): Add non-const overload.
1205 * top.c (dont_repeat_command): Constify.
1206 * breakpoint.c (ignore_command, commands_command)
1207 (condition_command, tbreak_command, hbreak_command)
1208 (thbreak_command, clear_command, break_command)
1209 (info_breakpoints_command, watch_command, rwatch_command)
1210 (awatch_command, trace_command, ftrace_command, strace_command)
1211 (trace_pass_command, break_range_command, dprintf_command)
1212 (agent_printf_command, get_tracepoint_by_number)
1213 (watch_maybe_just_location, trace_pass_command): Constify.
1214 (info_breakpoints_command): Add non-const overload.
1215 * tracefile.c (tsave_command): Constify.
1216 * infcmd.c (attach_command, disconnect_command, signal_command)
1217 (queue_signal_command, stepi_command, nexti_command)
1218 (finish_command, next_command, step_command, until_command)
1219 (advance_command, jump_command, continue_command, run_command)
1220 (start_command, starti_command, interrupt_command)
1221 (run_command_1, set_inferior_args, step_1): Constify.
1222 * inferior.c (add_inferior_command, remove_inferior_command)
1223 (clone_inferior_command): Constify.
1224 * linux-fork.c (checkpoint_command, restart_command): Constify.
1225 * windows-nat.c (signal_event_command): Constify.
1226 * guile/guile.c (guile_repl_command, guile_command): Constify.
1227 * printcmd.c (x_command, display_command, printf_command)
1228 (output_command, set_command, call_command, print_command)
1229 (eval_command): Constify.
1230 (non_const_set_command): Remove.
1231 (_initialize_printcmd): Update.
1232 * source.c (forward_search_command, reverse_search_command):
1234 * jit.c (jit_reader_load_command, jit_reader_unload_command):
1236 * infrun.c (handle_command): Constify.
1237 * memattr.c (mem_command): Constify.
1238 * stack.c (return_command, up_command, up_silently_command)
1239 (down_command, down_silently_command, frame_command)
1240 (backtrace_command, func_command, backtrace_command_1): Constify.
1241 (backtrace_command): Add non-const overload.
1242 * remote-sim.c (simulator_command): Constify.
1243 * exec.c (set_section_command): Constify.
1244 * tracepoint.c (tdump_command, trace_variable_command)
1245 (tstatus_command, tstop_command, tstart_command)
1246 (end_actions_pseudocommand, while_stepping_pseudocommand)
1247 (collect_pseudocommand, teval_pseudocommand, actions_command)
1248 (start_tracing, stop_tracing): Constify.
1249 * value.c (init_if_undefined_command): Constify.
1250 * tui/tui-stack.c (tui_update_command): Constify.
1251 * tui/tui-win.c (tui_refresh_all_command)
1252 (tui_set_tab_width_command, tui_set_win_height_command)
1253 (tui_set_focus_command, tui_scroll_forward_command)
1254 (tui_scroll_backward_command, tui_scroll_left_command)
1255 (tui_scroll_right_command, parse_scrolling_args, tui_set_focus)
1256 (tui_set_win_height): Constify.
1257 * tui/tui-layout.c (tui_layout_command): Constify.
1258 * procfs.c (proc_trace_syscalls, proc_trace_sysentry_cmd)
1259 (proc_trace_sysexit_cmd, proc_untrace_sysentry_cmd)
1260 (proc_untrace_sysexit_cmd): Constify.
1261 * remote.c (threadlist_test_cmd, threadinfo_test_cmd)
1262 (threadset_test_cmd, threadlist_update_test_cmd)
1263 (threadalive_test): Constify.
1264 * objc-lang.c (print_object_command): Constify.
1265 * command.h (add_com): Constify.
1266 * cli/cli-dump.c (restore_command): Constify.
1267 * cli/cli-cmds.c (pwd_command, echo_command, quit_command)
1268 (help_command, complete_command, shell_command, edit_command)
1269 (list_command, disassemble_command, make_command)
1270 (apropos_command, alias_command): Constify.
1271 * cli/cli-script.c (document_command, define_command)
1272 (while_command, if_command, validate_comname): Constify.
1273 * cli/cli-decode.c (struct cmd_list_element): Change type of
1275 * target.c (do_monitor_command, flash_erase_command): Constify.
1276 * regcache.c (reg_flush_command): Constify.
1277 * reverse.c (reverse_step, reverse_next, reverse_stepi)
1278 (reverse_nexti, reverse_continue, reverse_finish)
1279 (save_bookmark_command, goto_bookmark_command)
1280 (exec_reverse_once): Constify.
1281 * python/python.c (python_interactive_command, python_command):
1283 * typeprint.c (ptype_command, whatis_command, whatis_exp):
1285 * solib.c (sharedlibrary_command, no_shared_libraries): Constify.
1286 * gcore.c (gcore_command): Constify.
1288 2017-11-07 Tom Tromey <tom@tromey.com>
1290 * printcmd.c (x_command): Call set_repeat_arguments.
1291 * cli/cli-cmds.c (list_command): Call set_repeat_arguments.
1292 * top.c (repeat_arguments): New global.
1293 (set_repeat_arguments): New function.
1294 (execute_command): Handle repeat_arguments.
1295 (show_commands): Calls set_repeat_arguments.
1296 * command.h (set_repeat_arguments): Declare.
1298 2017-11-07 Tom Tromey <tom@tromey.com>
1300 * stack.c (backtrace_command): Use std::string.
1301 (backtrace_command_1): Make "count_exp" const.
1303 2017-11-07 Tom Tromey <tom@tromey.com>
1305 * source.c (directory_switch, mod_path, add_path): Constify.
1306 * defs.h (add_path, mod_path, directory_switch): Constify.
1307 * mi/mi-cmd-env.c (env_mod_path): Constify.
1309 2017-11-07 Tom Tromey <tom@tromey.com>
1311 * infcmd.c (strip_bg_char): Return gdb::unique_xmalloc_ptr.
1312 (run_command_1, continue_command, step_1, jump_command)
1313 (signal_command, until_command, advance_command, finish_command)
1314 (attach_command): Update.
1316 2017-11-07 Tom Tromey <tom@tromey.com>
1318 * command.h (set_cmd_cfunc): Don't declare.
1319 * cli/cli-decode.c (set_cmd_cfunc): Now static.
1321 2017-11-07 Tom Tromey <tom@tromey.com>
1323 * stack.c (select_frame_command): Constify.
1324 * cli/cli-decode.c (add_com_suppress_notification): Constify.
1325 * command.h (add_com_suppress_notification): Constify.
1327 2017-11-07 Tom Tromey <tom@tromey.com>
1329 * breakpoint.c (stop_command): Constify.
1330 * cli/cli-decode.c (struct cmd_list_element): Constify.
1331 * command.h (add_abbrev_prefix_cmd): Constify.
1333 2017-11-07 Pedro Alves <palves@redhat.com>
1335 * breakpoint.c (extract_bp_kind): New enum.
1336 (extract_bp_num, extract_bp_or_bp_range): New functions, partially
1337 factored out from ...
1338 (extract_bp_number_and_location): ... here.
1339 * cli/cli-utils.c (get_number_trailer): Handle '-$variable'.
1341 2017-11-07 Pedro Alves <palves@redhat.com>
1343 * breakpoint.c (extract_bp_number_and_location): Change return
1344 type to void. Throw error instead of warning.
1345 (enable_disable_command): Adjust.
1347 2017-11-07 Xavier Roirand <roirand@adacore.com>
1348 Pedro Alves <palves@redhat.com>
1350 * breakpoint.c (map_breakpoint_number_range): New, factored out
1352 (map_breakpoint_numbers): ... here.
1353 (find_location_by_number): Change parameters from string to
1354 breakpoint number and location.
1355 (extract_bp_number_and_location): New function.
1356 (enable_disable_bp_num_loc)
1357 (enable_disable_breakpoint_location_range)
1358 (enable_disable_command): New functions, factored out ...
1359 (enable_command, disable_command): ... these functions, and
1360 adjusted to support ranges.
1361 * NEWS: Document enable/disable breakpoint location range feature.
1363 2017-11-06 Luis Machado <luis.machado@linaro.org>
1365 * MAINTAINERS (Write After Approval): Update my e-mail address.
1367 2017-11-06 Pedro Alves <palves@redhat.com>
1369 * gnu-nat.c (gnu_terminal_init): Delete.
1370 (gnu_target): Don't install gnu_terminal_init.
1371 * inflow.c (child_terminal_init_with_pgrp): Delete, merged with ...
1372 (child_terminal_init): ... this function.
1374 2017-11-06 Pedro Alves <palves@redhat.com>
1376 * common/common.m4 (GDB_AC_COMMON): No longer check termio.h nor
1378 * config.in, configure: Regenerate.
1380 2017-11-06 Pedro Alves <palves@redhat.com>
1382 * event-top.c: Check SIGTSTP instead of STOP_SIGNAL thoughout.
1383 (async_init_signals): Adjust.
1384 (handle_stop_sig): Rename to ...
1385 (handle_sigtstp): ... this.
1386 (async_stop_sig): Rename to ...
1387 (async_sigtstp_handler): ... this, and delete STOP_SIGNAL !=
1389 * event-top.h: Move signal.h include to the top. Check SIGTSTP
1390 instead of STOP_SIGNAL thoughout.
1391 (handle_stop_sig): Rename to ...
1392 (handle_sigtstp): ... this.
1393 * top.c (command_line_input): Replace STOP_SIGNAL -> SIGTSTP.
1395 2017-11-06 Pedro Alves <palves@redhat.com>
1397 * inflow.c (child_terminal_inferior, child_terminal_ours_1): No
1398 longer set flags twice in row.
1400 2017-11-06 Pedro Alves <palves@redhat.com>
1402 * Makefile.in (SER_HARDWIRE): Update comment.
1403 (HFILES_NO_SRCDIR): Remove gdb_termios.h.
1404 * common/gdb_termios.h: Delete file.
1405 * common/job-control.c: Include termios.h and unistd.h instead of
1407 (gdb_setpgid): Remove HAVE_TERMIOS || TIOCGPGRP preprocessor
1409 (have_job_control): Check HAVE_TERMIOS_H instead of HAVE_TERMIOS.
1411 * configure.ac: No longer check for termio.h and sgtty.h.
1412 * configure: Regenerate.
1413 * inflow.c: Include termios.h instead of gdb_termios.h. Replace
1414 PROCESS_GROUP_TYPE checks with HAVE_TERMIOS_H checks throughout.
1415 Replace PROCESS_GROUP_TYPE references with pid_t references
1417 (gdb_getpgrp): Delete.
1418 (set_initial_gdb_ttystate): Use tcgetpgrp instead of gdb_getpgrp.
1419 (child_terminal_inferior): Remove comment. Remove sgtty code.
1420 (child_terminal_ours_1): Use tcgetpgrp directly instead of
1421 gdb_getpgrp. Use serial_set_tty_state instead aof
1422 serial_noflush_set_tty_state. Remove sgtty code.
1423 * inflow.h: Include unistd.h instead of gdb_termios.h. Replace
1424 PROCESS_GROUP_TYPE check with HAVE_TERMIOS_H check.
1425 (inferior_process_group): Now returns pid_t.
1426 * ser-base.c (ser_base_noflush_set_tty_state): Delete.
1427 * ser-base.h (ser_base_noflush_set_tty_state): Delete.
1428 * ser-event.c (serial_event_ops): Update.
1429 * ser-go32.c (dos_noflush_set_tty_state): Delete.
1431 * ser-mingw.c (hardwire_ops, tty_ops, pipe_ops, tcp_ops): Update.
1432 * ser-pipe.c (pipe_ops): Update.
1433 * ser-tcp.c (tcp_ops): Update.
1434 * ser-unix.c: Include termios.h instead of gdb_termios.h. Remove
1435 HAVE_TERMIOS checks.
1436 [HAVE_TERMIO] (struct hardwire_ttystate): Delete.
1437 [HAVE_SGTTY] (struct hardwire_ttystate): Delete.
1438 (get_tty_state, set_tty_state): Drop termio and sgtty code, and
1440 (hardwire_noflush_set_tty_state): Delete.
1441 (hardwire_print_tty_state, hardwire_drain_output)
1442 (hardwire_flush_output, hardwire_flush_input)
1443 (hardwire_send_break, hardwire_raw, hardwire_setbaudrate)
1444 (hardwire_setstopbits, hardwire_setparity): Drop termio and sgtty
1445 code, and assume termios.
1446 (hardwire_ops): Update.
1447 (_initialize_ser_hardwire): Remove HAVE_TERMIOS check.
1448 * serial.c (serial_noflush_set_tty_state): Delete.
1449 * serial.h (serial_noflush_set_tty_state): Delete.
1450 (serial_ops::noflush_set_tty_state): Delete.
1452 2017-11-06 Ulrich Weigand <uweigand@de.ibm.com>
1454 * Makefile.in (SFILES): Remove doublest.c and dfp.c.
1455 (HFILES_NO_SRCDIR): Remove doublest.h and dfp.h.
1456 (COMMON_OBS): Remove doublest.o and dfp.o.
1457 Do not build target-float.c (instead of doublest.c)
1458 with -Wformat-nonliteral.
1460 * doublest.c: Remove file.
1461 * doublest.h: Remove file.
1462 * dfp.c: Remove file.
1463 * dfp.h: Remove file.
1465 * target-float.c: Do not include "doublest.h" and "dfp.h".
1466 (DOUBLEST): Move here from doublest.h.
1467 (enum float_kind): Likewise.
1468 (FLOATFORMAT_CHAR_BIT): Likewise.
1469 (FLOATFORMAT_LARGEST_BYTES): Likewise.
1470 (floatformat_totalsize_bytes): Move here from doublest.c. Make static.
1471 (floatformat_precision): Likewise.
1472 (floatformat_normalize_byteorder, get_field, put_field): Likewise.
1473 (floatformat_is_negative, floatformat_classify, floatformat_mantissa):
1475 (host_float_format, host_double_format, host_long_double_format):
1477 (floatformat_to_string, floatformat_from_string): Likewise.
1478 (floatformat_to_doublest): Likewise. Also, inline the original
1479 convert_floatformat_to_doublest.
1480 (floatformat_from_doublest): Likewise. Also, inline the original
1481 convert_floatformat_from_doublest.
1483 Include "dpd/decimal128.h", "dpd/decimal64.h", and "dpd/decimal32.h".
1484 (MAX_DECIMAL_STRING): Move here from dfp.c.
1485 (match_endianness): Likewise.
1486 (set_decnumber_context, decimal_check_errors): Likewise.
1487 (decimal_from_number, decimal_to_number): Likewise.
1488 (decimal_to_string, decimal_from_string): Likewise. Make static.
1489 (decimal_from_longest, decimal_from_ulongest): Likewise.
1490 (decimal_to_longest): Likewise.
1491 (decimal_binop, decimal_is_zero, decimal_compare): Likewise.
1492 (decimal_convert): Likewise.
1494 2017-11-06 Ulrich Weigand <uweigand@de.ibm.com>
1496 * doublest.c: Do not include "gdbtypes.h".
1497 (extract_typed_floating): Remove.
1498 (store_typed_floating): Remove.
1499 (convert_typed_floating): Remove.
1500 * doublest.h (struct type): Remove.
1501 (DOUBLEST_PRINT_FORMAT): Remove.
1502 (DOUBLEST_SCAN_FORMAT): Remove.
1503 (extract_typed_floating): Remove.
1504 (store_typed_floating): Remove.
1505 (convert_typed_floating): Remove.
1507 * dfp.c (decimal_from_doublest): Remove.
1508 (decimal_to_doublest): Remove.
1509 * dfp.h: Do not include "doublest.h".
1510 (decimal_from_doublest): Remove.
1511 (decimal_to_doublest): Remove.
1513 * value.c: Do not include "doublest.h" and "dfp.h".
1514 (value_as_double): Remove.
1515 (unpack_double): Remove.
1516 (value_from_double): Remove.
1517 (value_from_decfloat): Remove.
1518 * value.h: Do not include "doublest.h".
1519 (value_as_double): Remove.
1520 (unpack_double): Remove.
1521 (value_from_double): Remove.
1522 (value_from_decfloat): Remove.
1524 2017-11-06 Ulrich Weigand <uweigand@de.ibm.com>
1526 * i386-tdep.c: Include "target-float.h". Do not include "doublest.h".
1527 (i386_extract_return_value): Use target_float_convert.
1528 (i386_store_return_value): Likewise.
1529 * i387-tdep.c (i387_register_to_value): Use target_float_convert.
1530 (i387_value_to_register): Likewise.
1531 * ia64-tdep.c: Include "target-float.h". Do not include "doublest.h".
1532 (ia64_register_to_value): Use target_float_convert.
1533 (ia64_value_to_register): Likewise.
1534 (ia64_extract_return_value): Likewise.
1535 (ia64_store_return_value): Likewise.
1536 (ia64_push_dummy_call): Likewise.
1537 * m68k-tdep.c: Include "target-float.h".
1538 (m68k_register_to_value): Use target_float_convert.
1539 (m68k_value_to_register): Likewise.
1540 (m68k_svr4_extract_return_value): Likewise.
1541 (m68k_svr4_store_return_value): Likewise.
1542 * ppc-sysv-tdep.c: Include "target-float.h".
1543 (ppc_sysv_abi_push_dummy_call): Use target_float_convert.
1544 (do_ppc_sysv_return_value): Likewise.
1545 (ppc64_sysv_abi_push_freg): Likewise.
1546 (ppc64_sysv_abi_return_value_base): Likewise.
1547 * rs6000-aix-tdep.c: Include "target-float.h".
1548 (rs6000_push_dummy_call): Use target_float_convert.
1549 (rs6000_return_value): Likewise.
1550 * rs6000-lynx178-tdep.c: Include "target-float.h".
1551 (rs6000_lynx178_push_dummy_call): Use target_float_convert.
1552 (rs6000_lynx178_return_value): Likewise.
1553 * rs6000-tdep.c: Include "target-float.h". Do not include "doublest.h".
1554 (rs6000_register_to_value): Use target_float_convert.
1555 (rs6000_value_to_register): Likewise.
1556 * arm-tdep.c: Include "target-float.h". Do not include "doublest.h".
1557 (arm_extract_return_value): Use target_float_convert.
1558 (arm_store_return_value): Likewise.
1559 * sh-tdep.c: Include "target-float.h". Do not include "doublest.h".
1560 (sh_register_convert_to_virtual): Use target_float_convert.
1561 (sh_register_convert_to_raw): Likewise.
1562 * sh64-tdep.c: Include "target-float.h".
1563 (sh64_extract_return_value): Use target_float_convert.
1564 (sh64_register_convert_to_virtual): Likewise.
1565 (sh64_register_convert_to_raw): Likewise. Fix argument types.
1567 2017-11-06 Ulrich Weigand <uweigand@de.ibm.com>
1569 * target-float.c (floatformat_to_host_double): New function.
1570 (floatformat_from_host_double): Likewise.
1571 (target_float_to_host_double): Likewise.
1572 (target_float_from_host_double): Likewise.
1573 * target-float.h (target_float_to_host_double): Add prototype.
1574 (target_float_from_host_double): Likewise.
1576 * guile/scm-value.c: Include "target-float.h".
1577 (gdbscm_value_to_real): Use target_float_to_host_double.
1578 Handle integer source values via value_as_long.
1579 * guile/scm-math.c: Include "target-float.h". Do not include
1580 "doublest.h", "dfp.h", and "expression.h".
1581 (vlscm_convert_typed_number): Use target_float_from_host_double.
1582 (vlscm_convert_number): Likewise.
1584 * python/py-value.c (valpy_float): Use target_float_to_host_double.
1585 (convert_value_from_python): Use target_float_from_host_double.
1587 2017-11-06 Ulrich Weigand <uweigand@de.ibm.com>
1589 * ada-lang.c (cast_to_fixed): Reimplement in target arithmetic.
1590 (cast_from_fixed): Likewise.
1591 (ada_scaling_type): New function.
1592 (ada_delta): Return value instead of DOUBLEST. Perform target
1593 arithmetic instead of host arithmetic.
1594 (scaling_factor): Rename to ...
1595 (ada_scaling_factor) ... this. Make non-static. Return value instead
1596 of DOUBLEST. Perform target arithmetic instead of host arithmetic.
1597 (ada_fixed_to_float): Remove.
1598 (ada_float_to_fixed): Remove.
1599 * ada-lang.h (ada_fixed_to_float): Remove.
1600 (ada_float_to_fixed): Remove.
1601 (ada_delta): Return value instead of DOUBLEST.
1602 (ada_scaling_factor): Add prototype.
1604 * ada-typeprint.c: Include "target-float.h".
1605 (print_fixed_point_type): Perform target arithmetic instead of
1607 * ada-valprint.c: Include "target-float.h".
1608 (ada_val_print_num): Perform target arithmetic instead of
1609 host arithmetic for fixed-point types.
1611 2017-11-06 Ulrich Weigand <uweigand@de.ibm.com>
1613 * target-float.c: Include <math.h>.
1614 (floatformat_binop): New function.
1615 (floatformat_compare): Likewise.
1616 (target_float_binop): Likewise.
1617 (target_float_compare): Likewise.
1618 * target-float.h: Include "expression.h".
1619 (target_float_binop): Add prototype.
1620 (target_float_compare): Likewise.
1622 * valarith.c: Do not include "doublest.h" and "dfp.h".
1623 Include "common/byte-vector.h".
1624 (value_args_as_decimal): Remove, replace by ...
1625 (value_args_as_target_float): ... this function. Handle both
1626 binary and decimal target floating-point formats.
1627 (scalar_binop): Handle both binary and decimal FP using
1628 value_args_as_target_float and target_float_binop.
1629 (value_equal): Handle both binary and decimal FP using
1630 value_args_as_target_float and target_float_compare.
1631 (value_less): Likewise.
1632 (value_pos): Handle all scalar types as simple copy.
1633 (value_neg): Handle all scalar types via BINOP_SUB from 0.
1634 * dfp.c (decimal_binop): Throw error instead of internal_error
1635 when called with an unsupported operation code.
1637 2017-11-06 Ulrich Weigand <uweigand@de.ibm.com>
1639 * target-float.c (target_float_to_string): New function.
1640 (target_float_from_string): New function.
1641 * target-float.h (target_float_to_string): Add prototype.
1642 (target_float_from_string): Add prototype.
1644 * valprint.c: Include "target-float.h". Do not include
1645 "doublest.h" and "dfp.h".
1646 (print_floating): Use target_float_to_string.
1647 * printcmd.c: Include "target-float.h". Do not include "dfp.h".
1648 (printf_floating): Use target_float_to_string.
1649 * i387-tdep.c: Include "target-float.h". Do not include "doublest.h".
1650 (print_i387_value): Use target_float_to_string.
1651 * mips-tdep.c: Include "target-float.h".
1652 (mips_print_fp_register): Use target_float_to_string.
1653 * sh64-tdep.c: Include "target-float.h".
1654 (sh64_do_fp_register): Use target_float_to_string.
1656 * parse.c: Include "target-float.h". Do not include
1657 "doublest.h" and "dfp.h".
1658 (parse_float): Use target_float_from_string.
1659 * stabsread.c: Include "target-float.h". Do not include "doublest.h".
1660 (define_symbol): Use target_float_from_string.
1661 * gdbarch-selftests.c: Include "target-float.h".
1662 (register_to_value_test): Use target_float_from_string.
1664 2017-11-06 Ulrich Weigand <uweigand@de.ibm.com>
1666 * Makefile.c (SFILES): Add target-float.c.
1667 (HFILES_NO_SRCDIR): Add target-float.h.
1668 (COMMON_OBS): Add target-float.o.
1669 * target-float.h: New file.
1670 * target-float.c: New file.
1672 * doublest.c (floatformat_classify): Fix detection of float_zero.
1674 * gdbtypes.c (is_floating_type): New function.
1675 * gdbtypes.h (is_floating_type): Add prototype.
1677 * value.c: Do not include "floatformat.h".
1678 (unpack_double): Use target_float_is_valid.
1679 (is_floating_value): New function.
1680 * value.h (is_floating_value): Add prototype-
1682 * valarith.c: Include "target-float.h".
1683 (value_logical_not): Use target_float_is_zero.
1685 * python/py-value.c: Include "target-float.h".
1686 (valpy_nonzero): Use target_float_is_zero.
1688 2017-11-04 Tom Tromey <tom@tromey.com>
1690 * h8300-tdep.c (h8300_push_dummy_call): Use std::vector.
1692 2017-11-04 Tom Tromey <tom@tromey.com>
1694 * breakpoint.c (set_momentary_breakpoint): Return
1696 (until_break_command): Update.
1697 (new_until_break_fsm): Change argument types to
1699 (set_momentary_breakpoint_at_pc): Return breakpoint_up.
1700 (do_delete_breakpoint_cleanup, make_cleanup_delete_breakpoint):
1702 * infcmd.c (finish_forward): Update.
1703 * breakpoint.h (set_momentary_breakpoint)
1704 (set_momentary_breakpoint_at_pc): Return breakpoint_up.
1705 (make_cleanup_delete_breakpoint): Remove.
1706 (struct breakpoint_deleter): New.
1707 (breakpoint_up): New typedef.
1708 * infrun.c (insert_step_resume_breakpoint_at_sal_1): Update.
1709 (insert_exception_resume_breakpoint): Update.
1710 (insert_exception_resume_from_probe): Update.
1711 (insert_longjmp_resume_breakpoint): Update.
1712 * arm-linux-tdep.c (arm_linux_copy_svc): Update.
1713 * elfread.c (elf_gnu_ifunc_resolver_stop): Update.
1714 * infcall.c (call_function_by_hand_dummy): Update
1716 2017-11-04 Tom Tromey <tom@tromey.com>
1718 * c-typeprint.c (c_type_print_base): Use gdb::unique_xmalloc_ptr.
1720 2017-11-04 Tom Tromey <tom@tromey.com>
1722 * linux-tdep.c (linux_core_info_proc_mappings): Use
1724 (linux_get_siginfo_data): Return gdb::byte_vector. Remove
1726 (linux_corefile_thread): Update.
1727 (linux_make_corefile_notes): Remove unused variable.
1729 2017-11-04 Tom Tromey <tom@tromey.com>
1731 * ppc-linux-tdep.c (ppc_linux_get_syscall_number): Use
1734 2017-11-04 Tom Tromey <tom@tromey.com>
1736 * objfiles.c (do_free_objfile_cleanup): Remove.
1737 * compile/compile-object-load.c (compile_object_load): Update.
1738 * objfiles.h (make_cleanup_free_objfile): Remove.
1740 2017-11-04 Tom Tromey <tom@tromey.com>
1742 * sparc64-tdep.c (do_examine): Use gdb::def_vector.
1743 (adi_read_versions): Change "tags" to "gdb_byte *".
1744 (adi_print_versions): Likewise.
1746 2017-11-04 Tom Tromey <tom@tromey.com>
1749 (scoped_rbreak_breakpoints::scoped_rbreak_breakpoints): Rename
1750 from start_rbreak_breakpoints.
1751 (scoped_rbreak_breakpoints): Rename from end_rbreak_breakpoints.
1752 * breakpoint.h (class scoped_rbreak_breakpoints): New.
1753 (start_rbreak_breakpoints, end_rbreak_breakpoints): Remove.
1754 * symtab.c (do_end_rbreak_breakpoints): Remove.
1755 (rbreak_command): Use scoped_rbreak_breakpoints, std::string.
1757 2017-11-04 Tom Tromey <tom@tromey.com>
1759 * cp-namespace.c (reset_directive_searched): Remove.
1760 (cp_lookup_symbol_via_imports): Use scoped_restore.
1761 * cp-support.c (reset_directive_searched): Remove.
1762 (make_symbol_overload_list_using): Use scoped_restore.
1763 * d-namespace.c (d_lookup_symbol_imports): Use scoped_restore.
1764 (reset_directive_searched): Remove.
1766 2017-11-04 Tom Tromey <tom@tromey.com>
1768 * symfile.c (find_separate_debug_file_by_debuglink): Use
1771 2017-11-04 Tom Tromey <tom@tromey.com>
1773 * compile/compile-loc2c.c (compute_stack_depth_worker): Change
1775 (compute_stack_depth): Likewise.
1776 (do_compile_dwarf_expr_to_c): Use std::vector.
1778 2017-11-04 Tom Tromey <tom@tromey.com>
1780 * compile/compile-object-load.c (link_callbacks_einfo): Use
1783 2017-11-04 Tom Tromey <tom@tromey.com>
1785 * dwarf2read.c (process_full_comp_unit, process_full_type_unit):
1786 Use scoped_free_pendings.
1787 * dbxread.c (dbx_symfile_read, dbx_psymtab_to_symtab_1): Use
1788 scoped_free_pendings.
1789 * xcoffread.c (xcoff_psymtab_to_symtab_1): Use scoped_free_pendings.
1790 (xcoff_initial_scan): Likewise.
1791 * buildsym.c (reset_symtab_globals): Update comment.
1792 (scoped_free_pendings): Rename from really_free_pendings.
1793 (prepare_for_building): Update comment.
1794 (buildsym_init): Likewise.
1795 * buildsym.h (class scoped_free_pendings): New class.
1796 (really_free_pendings): Don't declare.
1798 2017-11-03 Ulrich Weigand <uweigand@de.ibm.com>
1800 * doublest.c (convert_doublest_to_floatformat): Fix uninitialized
1801 output when converting a zero value to a special byteorder format.
1803 2017-11-02 Yao Qi <yao.qi@linaro.org>
1805 * frame.c (do_frame_register_read): Remove aspace.
1806 * jit.c (jit_frame_sniffer): Likwise.
1807 * ppc-linux-tdep.c (ppu2spu_sniffer): Likewise.
1808 * regcache.c (regcache::regcache): Pass nullptr.
1809 (regcache_print): Caller updated.
1810 * regcache.h (regcache::regcache): Remove one constructor
1813 2017-11-02 Yao Qi <yao.qi@linaro.org>
1815 * regcache.h (regcache) <m_readonly_p>: Change it to const bool.
1817 2017-11-02 Yao Qi <yao.qi@linaro.org>
1819 * breakpoint.c (insert_single_step_breakpoints): Update.
1820 * frame.c (struct frame_info) <aspace>: Add const.
1821 (frame_save_as_regcache): Add const.
1822 (get_frame_address_space): Return const address_space *.
1823 * frame.h (get_frame_address_space): Update declaration.
1824 * infrun.c (struct step_over_info) <aspace>: Add const.
1825 (set_step_over_info): Make aspace const.
1826 (displaced_step_prepare_throw): Change variable const.
1828 (proceed): Likewise.
1829 (adjust_pc_after_break): Likewise.
1830 (save_waitstatus): Likewise.
1831 (handle_signal_stop): Likewise.
1832 (keep_going_pass_signal): Likewise.
1833 * jit.c (jit_frame_sniffer): Add const.
1834 * mips-tdep.c (mips_single_step_through_delay): Likewise.
1835 * ppc-linux-tdep.c (ppu2spu_sniffer): Likewise.
1836 * record-full.c (record_full_wait_1): Likewise.
1837 * regcache.c (regcache::regcache): Change parameter to const.
1838 * regcache.h (regcache::regcache): Likewise.
1839 (regcache::aspace): Return const address_space *.
1840 (regcache) <m_aspace>: Add const.
1842 2017-11-02 Yao Qi <yao.qi@linaro.org>
1844 * darwin-nat.c (cancel_breakpoint): Use regcache->aspace ().
1845 * frame.c (create_sentinel_frame): Likewise.
1846 * infrun.c (displaced_step_prepare_throw): Likewise.
1848 (thread_still_needs_step_over_bp): Likewise.
1849 (proceed): Likewise.
1850 (do_target_wait): Likewise.
1851 (adjust_pc_after_break): Likewise.
1852 (handle_syscall_event): Likewise.
1853 (save_waitstatus): Likewise.
1854 (handle_inferior_event_1): Likewise.
1855 (handle_signal_stop): Likewise.
1856 (keep_going_pass_signal): Likewise.
1857 * linux-nat.c (status_callback): Likewise.
1858 (save_stop_reason): Likewise.
1859 (resume_stopped_resumed_lwps): Likewise.
1860 * record-full.c (record_full_exec_insn): Likewise.
1861 (record_full_wait_1): Likewise.
1862 * regcache.c (get_regcache_aspace): Remove.
1863 * regcache.h (get_regcache_aspace): Remove.
1865 2017-11-02 Yao Qi <yao.qi@linaro.org>
1867 * regcache.c (struct regcache_descr) <nr_raw_registers>: Remove.
1868 (init_regcache_descr): Use gdbarch_num_regs.
1869 (regcache::regcache): Likewise.
1870 (regcache::get_register_status): Likewise.
1871 (regcache::assert_raw_regnum): Likewise.
1872 (regcache::cooked_read): Likewise.
1873 (regcache::cooked_read_value): Likewise.
1874 (regcache::cooked_write): Likewise.
1875 (regcache::dump): Likewise.
1876 (regcache::num_raw_registers): New method.
1877 * regcache.h (class regcache) <num_raw_registers>: New.
1879 2017-11-02 Yao Qi <yao.qi@linaro.org>
1881 * regcache.c (regcache::assert_regnum): New method.
1882 (regcache::invalidate): Call assert_regnum.
1883 (regcache::raw_update): Likewise.
1884 (regcache::raw_write): Likewise.
1885 (regcache::raw_read_part): Likewise.
1886 (regcache::raw_write_part): Likewise.
1887 (regcache::raw_supply): Likewise.
1888 (regcache::raw_supply_integer): Likewise.
1889 (regcache::raw_supply_zeroed): Likewise.
1890 (regcache::raw_collect): Likewise.
1891 (regcache::raw_collect_integer): Likewise.
1892 * regcache.h (regcache::assert_regnum): Declare.
1894 2017-11-02 Yao Qi <yao.qi@linaro.org>
1896 * regcache.c (regcache::dump): Remove code.
1898 2017-11-02 Yao Qi <yao.qi@linaro.org>
1900 * regcache.c (struct regcache_descr) <sizeof_raw_register_status>:
1902 <sizeof_cooked_register_status>: Remove.
1903 (init_regcache_descr): Update.
1904 (regcache::regcache): Use nr_cooked_registers and nr_raw_registers.
1905 (regcache::save): Likewise.
1906 (regcache::dump): Likewise.
1908 2017-11-01 James Bowman <james.bowman@ftdichip.com>
1910 * ft32-tdep.c (ft32_fetch_instruction): New function.
1911 (ft32_analyze_prologue): Use ft32_fetch_instruction().
1913 2017-10-31 Simon Marchi <simon.marchi@polymtl.ca>
1915 * cli/cli-script.c (execute_control_command): Rename to ...
1916 (execute_control_command_1): ... this.
1917 (execute_control_command): New function.
1919 2017-10-31 Simon Marchi <simon.marchi@ericsson.com>
1921 * tracepoint.c (tfind_command): Remove const_cast.
1923 2017-10-30 Mike Gulick <mgulick@mathworks.com>
1925 * Makefile.in (HFILES_NO_SRCDIR): Remove reference to gdb.h.
1927 2017-10-30 Simon Marchi <simon.marchi@ericsson.com>
1929 * common/common-utils.h (in_inclusive_range): New function.
1930 * arm-tdep.c (arm_record_extension_space): Use
1932 (thumb_record_ld_st_reg_offset): Use in_inclusive_range.
1933 * cris-tdep.c (cris_spec_reg_applicable): Use
1936 2017-10-30 Pedro Alves <palves@redhat.com>
1937 Simon Marchi <simon.marchi@ericsson.com>
1939 * remote.c (remote_set_syscall_catchpoint): Build a std::string
1940 instead of a gdb::unique_xmalloc_ptr, using string_appendf.
1942 2017-10-30 Pedro Alves <palves@redhat.com>
1944 * common/common-utils.c (string_appendf, string_vappendf): New
1946 * common/common-utils.h (string_appendf, string_vappendf): New
1948 * unittests/common-utils-selftests.c (string_appendf_func)
1949 (test_appendf_func, string_vappendf_wrapper, string_appendf_tests)
1950 (string_vappendf_tests): New functions.
1951 (_initialize_common_utils_selftests): Register "string_appendf" and
1952 "string_vappendf tests".
1954 2017-10-30 Pedro Alves <palves@redhat.com>
1956 * unittests/common-utils-selftests.c (format_func): New typedef.
1957 (string_printf_tests, string_vprintf_tests): Tests factored out
1959 (test_format_func): ... this new function.
1960 (string_printf_tests, string_vprintf_tests): Reimplement on top of
1963 2017-10-29 Simon Marchi <simon.marchi@ericsson.com>
1965 * darwin-nat.c: Remove include of gdb.h.
1967 2017-10-29 Simon Marchi <simon.marchi@ericsson.com>
1969 * xtensa-xtregs.c: Fix formatting issues.
1971 2017-10-29 Simon Marchi <simon.marchi@ericsson.com>
1973 * xtensa-xtregs.c (xtensa_regtable_t) <name>: Constify.
1975 2017-10-28 Maksim Dzabraev <dzabraew@gmail.com>
1978 * python/py-infthread.c (thpy_get_inferior): Increment reference
1979 of inferior before returning it.
1981 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
1983 * unittests/common-utils-selftests.c (format): Add
1986 2017-10-27 Simon Marchi <simon.marchi@polymtl.ca>
1988 * xml-syscall.c (struct syscall_desc): Add constructor.
1989 <name>: Change type to std::string.
1990 (syscall_desc_up): New typedef.
1991 (syscall_desc_p): Remove typeder.
1992 (DEF_VEC_P(syscall_desc_p)): Remove.
1993 (struct syscall_group_desc): Add constructor.
1994 <name>: Change type to std::string.
1995 <syscalls>: Change type to std::vector.
1996 (syscall_group_desc_up): New typedef.
1997 (syscall_group_desc_p): Remove typedef.
1998 (DEF_VEC_P(syscall_group_desc_p)): Remove.
1999 (struct syscalls_info) <syscalls>: Change type to std::vector of
2002 <my_gdb_datadir>: Change type to std::string.
2003 (syscalls_info_up): New typedef.
2004 (allocate_syscalls_info): Remove.
2005 (syscalls_info_free_syscalls_desc): Remove.
2006 (syscalls_info_free_syscall_group_desc): Remove.
2007 (free_syscalls_info): Remove.
2008 (make_cleanup_free_syscalls_info): Remove.
2009 (syscall_group_create_syscall_group_desc): Adjust.
2010 (syscall_group_add_syscall): Adjust.
2011 (syscall_create_syscall_desc): Adjust.
2012 (syscall_parse_xml): Adjust, use unique_ptr instead of cleanup.
2013 (init_syscalls_info): Adjust.
2014 (syscall_group_get_group_by_name): Adjust.
2015 (xml_get_syscall_number): Adjust.
2016 (xml_get_syscall_name): Adjust.
2017 (xml_list_of_syscalls): Adjust.
2018 (xml_list_syscalls_by_group): Adjust.
2019 (xml_list_of_groups): Adjust.
2021 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
2023 * probe.h: Don't include gdb_vecs.h.
2024 (DEF_VEC_P (probe_p)): Remove.
2025 (find_probes_in_objfile): Return an std::vector.
2026 * probe.c (find_probes_in_objfile): Likewise.
2027 * breakpoint.c (breakpoint_objfile_data)
2028 <longjmp_probes>: Change type to std::vector.
2029 <exception_probes>: Likewise.
2030 (free_breakpoint_probes): Don't manually free vectors.
2031 (create_longjmp_master_breakpoint): Adjust.
2032 (create_exception_master_breakpoint): Adjust.
2033 * solib-svr4.c (svr4_create_probe_breakpoints): Change
2034 parameter type, adjust.
2035 (svr4_create_solib_event_breakpoints): Adjust.
2037 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
2039 * breakpoint.c (breakpoint_objfile_data): Initialize fields.
2040 (get_breakpoint_objfile_data): Allocate breakpoint_objfile_data
2042 (free_breakpoint_probes): Rename to ...
2043 (free_breakpoint_objfile_data): ... this, and call delete on
2046 2017-10-27 Simon Marchi <simon.marchi@polymtl.ca>
2048 * auto-load.c: Don't include gdb_vecs.h, include algorithm.
2049 (loaded_script_ptr): Remove typedef.
2050 (DEF_VEC_P (loaded_script_ptr)): Remove.
2051 (struct collect_matching_scripts_data): Add constructor.
2052 <scripts_p>: Change type to (pointer to) std::vector.
2053 (collect_matching_scripts_data): Adjust.
2054 (sort_scripts_by_name): Make suitable for std::sort.
2055 (print_scripts): Don't sort vector, adjust to std::vector.
2056 (auto_load_info_scripts): Sort vectors, adjust to std::vector.
2058 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
2060 * symfile.c (filename_language): Make struct, not typedef. Add
2062 <ext>: Change type to std::string.
2063 (DEF_VEC_O (filename_language)): Remove.
2064 (filename_language_table): Change type to std::vector.
2065 (add_filename_language): Adjust.
2066 (set_ext_lang_command): Adjust.
2067 (info_ext_lang_command): Adjust.
2068 (deduce_language_from_filename): Adjust.
2069 (class scoped_restore_filename_language_table): Remove.
2070 (test_filename_language): Use scoped_restore.
2071 (test_set_ext_lang_command): Use scoped_restore, adjust to
2074 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
2076 * symfile.c: Include selftest.h.
2077 (class scoped_restore_filename_language_table): New.
2078 (test_filename_language): New test.
2079 (test_set_ext_lang_command): New test.
2080 (_initialize_symfile): Register tests.
2082 2017-10-27 Keith Seitz <keiths@redhat.com>
2084 * breakpoint.c (print_breakpoint_location): Use the symbol saved
2085 in the bp_location, falling back to find_pc_sect_function when
2087 (add_location_to_breakpoint): Save sal->symbol.
2088 * breakpoint.h (struct bp_location) <symbol>: New field.
2089 * symtab.c (find_function_start_sal): Save the symbol into the SaL.
2090 * symtab.h (struct symtab_and_line) <symbol>: New field.
2092 2017-10-26 Patrick Frants <osscontribute@gmail.com>
2095 * cp-valprint.c (cp_print_value_fields): Use obstack_blank_fast
2098 2017-10-26 Pedro Alves <palves@redhat.com>
2100 * remote.c (remote_async_terminal_ours_p): Delete.
2101 (remote_open_1, remote_terminal_inferior, remote_terminal_ours):
2102 Remove references to 'remote_async_terminal_ours_p'.
2104 2017-10-26 Yao Qi <yao.qi@linaro.org>
2106 * breakpoint.h (regular_breakpoint_inserted_here_p): Remove.
2108 2017-10-26 Yao Qi <yao.qi@linaro.org>
2110 * break-catch-sig.c (signal_catchpoint_breakpoint_hit): Make
2112 * break-catch-syscall.c (breakpoint_hit_catch_syscall):
2114 * breakpoint.c (bpstat_check_location): Remove cast.
2115 (breakpoint_hit_catch_fork): Make aspce const.
2116 (breakpoint_hit_catch_solib): Likewise.
2117 (breakpoint_hit_catch_exec): Likewise.
2118 (breakpoint_hit_ranged_breakpoint): Likewise.
2119 (breakpoint_hit_watchpoint): Likewise.
2120 (base_breakpoint_breakpoint_hit): Likewise.
2121 (bkpt_breakpoint_hit): Likewise.
2122 (dprintf_breakpoint_hit): Likewise.
2123 (tracepoint_breakpoint_hit): Likewise.
2124 * breakpoint.h (breakpoint_ops) <breakpoint_hit>: Likewise.
2126 2017-10-26 Yao Qi <yao.qi@linaro.org>
2128 * breakpoint.c (breakpoint_location_address_match): Change
2129 "struct address_space *" to "const address_space".
2130 (breakpoint_location_address_range_overlap): Likewise.
2131 (breakpoint_here_p): Likewise.
2132 (breakpoint_in_range_p): Likewise.
2133 (moribund_breakpoint_here_p): Likewise.
2134 (bp_location_inserted_here_p): Likewise.
2135 (software_breakpoint_inserted_here_p): Likewise.
2136 (hardware_breakpoint_inserted_here_p): Likewise.
2137 (hardware_watchpoint_inserted_in_range): Likewise.
2138 (bpstat_check_location): Likewise.
2139 (bpstat_stop_status): Likewise.
2140 (breakpoint_address_match): Likewise.
2141 (breakpoint_address_match_range): Likewise.
2142 (breakpoint_location_address_match): Likewise.
2143 (breakpoint_location_address_range_overlap): Likewise.
2144 (insert_single_step_breakpoint): Likewise.
2145 (breakpoint_has_location_inserted_here): Likewise.
2146 (single_step_breakpoint_inserted_here_p): Likewise.
2147 (pc_at_non_inline_function): Likewise.
2148 * breakpoint.h (bpstat_stop_status): Update declaration.
2149 (breakpoint_here_p): Likewise.
2150 (breakpoint_in_range_p): Likewise.
2151 (moribund_breakpoint_here_p): Likewise.
2152 (breakpoint_inserted_here_p): Likewise.
2153 (software_breakpoint_inserted_here_p): Likewise.
2154 (hardware_breakpoint_inserted_here_p): Likewise.
2155 (breakpoint_has_location_inserted_here): Likewise.
2156 (single_step_breakpoint_inserted_here_p): Likewise.
2157 (hardware_watchpoint_inserted_in_range): Likewise.
2158 (breakpoint_address_match): Likewise.
2159 (insert_single_step_breakpoint): Likewise.
2160 (pc_at_non_inline_function): Likewise.
2161 * gdbthread.h (thread_has_single_step_breakpoint_here): Likewise.
2162 * record.c (record_check_stopped_by_breakpoint): Likewise.
2163 * record.h (record_check_stopped_by_breakpoint): Likewise.
2164 * thread.c (thread_has_single_step_breakpoint_here): Likewise.
2166 2017-10-25 Yao Qi <yao.qi@linaro.org>
2168 * aarch32-linux-nat.c (aarch32_gp_regcache_supply): Use
2169 regcache->arch () instead get_regcache_arch.
2170 * aarch64-fbsd-nat.c (aarch64_fbsd_fetch_inferior_registers):
2172 (aarch64_fbsd_store_inferior_registers): Likewise.
2173 * aarch64-linux-nat.c (fetch_gregs_from_thread): Likewise.
2174 (store_gregs_to_thread): Likewise.
2175 (fetch_fpregs_from_thread): Likewise.
2176 (store_fpregs_to_thread): Likewise.
2177 * aarch64-tdep.c (aarch64_extract_return_value): Likewise.
2178 (aarch64_store_return_value): Likewise.
2179 (aarch64_software_single_step): Likewise.
2180 * aix-thread.c (aix_thread_wait): Likewise.
2181 (supply_reg32): Likewise.
2182 (supply_sprs64): Likewise.
2183 (supply_sprs32): Likewise.
2184 (fill_gprs64): Likewise.
2185 (fill_gprs32): Likewise.
2186 (fill_sprs64): Likewise.
2187 (fill_sprs32): Likewise.
2188 (store_regs_user_thread): Likewise.
2189 (store_regs_kernel_thread): Likewise.
2190 * alpha-bsd-nat.c (alphabsd_fetch_inferior_registers): Likewise.
2191 (alphabsd_store_inferior_registers): Likewise.
2192 * alpha-tdep.c (alpha_extract_return_value): Likewise.
2193 (alpha_store_return_value): Likewise.
2194 (alpha_deal_with_atomic_sequence): Likewise.
2195 (alpha_next_pc): Likewise.
2196 (alpha_software_single_step): Likewise.
2197 * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers): Likewise.
2198 (amd64bsd_store_inferior_registers): Likewise.
2199 * amd64-linux-nat.c (amd64_linux_fetch_inferior_registers):
2201 (amd64_linux_store_inferior_registers): Likewise.
2202 * amd64-nat.c (amd64_supply_native_gregset): Likewise.
2203 (amd64_collect_native_gregset): Likewise.
2204 * amd64-obsd-tdep.c (amd64obsd_supply_uthread): Likewise.
2205 (amd64obsd_collect_uthread): Likewise.
2206 * amd64-tdep.c (amd64_supply_fpregset): Likewise.
2207 (amd64_collect_fpregset): Likewise.
2208 (amd64_supply_fxsave): Likewise.
2209 (amd64_supply_xsave): Likewise.
2210 (amd64_collect_fxsave): Likewise.
2211 (amd64_collect_xsave): Likewise.
2212 * arc-tdep.c (arc_write_pc): Likewise.
2213 * arch-utils.c (default_skip_permanent_breakpoint): Likewise.
2214 * arm-fbsd-nat.c (arm_fbsd_fetch_inferior_registers): Likewise.
2215 (arm_fbsd_store_inferior_registers): Likewise.
2216 * arm-linux-nat.c (fetch_vfp_regs): Likewise.
2217 (store_vfp_regs): Likewise.
2218 (arm_linux_fetch_inferior_registers): Likewise.
2219 (arm_linux_store_inferior_registers): Likewise.
2220 * arm-linux-tdep.c (arm_linux_supply_gregset): Likewise.
2221 (arm_linux_sigreturn_next_pc): Likewise.
2222 (arm_linux_get_next_pcs_syscall_next_pc): Likewise.
2223 * arm-nbsd-nat.c (arm_supply_gregset): Likewise.
2224 (fetch_register): Likewise.
2225 (store_register): Likewise.
2226 * arm-tdep.c (arm_is_thumb): Likewise.
2227 (displaced_in_arm_mode): Likewise.
2228 (bx_write_pc): Likewise.
2229 (arm_get_next_pcs_addr_bits_remove): Likewise.
2230 (arm_software_single_step): Likewise.
2231 (arm_extract_return_value): Likewise.
2232 (arm_store_return_value): Likewise.
2233 (arm_write_pc): Likewise.
2234 * bfin-tdep.c (bfin_extract_return_value): Likewise.
2235 * bsd-uthread.c (bsd_uthread_fetch_registers): Likewise.
2236 (bsd_uthread_store_registers): Likewise.
2237 * core-regset.c (fetch_core_registers): Likewise.
2238 * corelow.c (get_core_registers): Likewise.
2239 * cris-tdep.c (cris_store_return_value): Likewise.
2240 (cris_extract_return_value): Likewise.
2241 (find_step_target): Likewise.
2242 (find_step_target): Likewise.
2243 (cris_software_single_step): Likewise.
2244 * ctf.c (ctf_fetch_registers): Likewise.
2245 * darwin-nat.c (cancel_breakpoint): Likewise.
2246 * fbsd-tdep.c (fbsd_collect_thread_registers): Likewise.
2247 * frv-tdep.c (frv_extract_return_value): Likewise.
2248 * ft32-tdep.c (ft32_store_return_value): Likewise.
2249 (ft32_extract_return_value): Likewise.
2250 * go32-nat.c (fetch_register): Likewise.
2251 (go32_fetch_registers): Likewise.
2252 (go32_store_registers): Likewise.
2253 (store_register): Likewise.
2254 * h8300-tdep.c (h8300_extract_return_value): Likewise.
2255 (h8300_store_return_value): Likewise.
2256 * hppa-linux-nat.c (fetch_register): Likewise.
2257 (store_register): Likewise.
2258 (hppa_linux_fetch_inferior_registers): Likewise.
2259 (hppa_linux_store_inferior_registers): Likewise.
2260 * i386-darwin-nat.c (i386_darwin_fetch_inferior_registers): Likewise.
2261 (i386_darwin_store_inferior_registers): Likewise.
2262 * i386-gnu-nat.c (gnu_fetch_registers): Likewise.
2263 (gnu_store_registers): Likewise.
2264 * i386-linux-nat.c (fetch_register): Likewise.
2265 (store_register): Likewise.
2266 (supply_gregset): Likewise.
2267 (fill_gregset): Likewise.
2268 (i386_linux_fetch_inferior_registers): Likewise.
2269 (i386_linux_store_inferior_registers): Likewise.
2270 (i386_linux_resume): Likewise.
2271 * i386-linux-tdep.c (i386_linux_get_syscall_number_from_regcache):
2273 * i386-nto-tdep.c (i386nto_supply_gregset): Likewise.
2274 * i386-obsd-nat.c (i386obsd_supply_pcb): Likewise.
2275 * i386-obsd-tdep.c (i386obsd_supply_uthread): Likewise.
2276 (i386obsd_collect_uthread): Likewise.
2277 * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
2278 (i386_supply_gregset): Likewise.
2279 (i386_collect_gregset): Likewise.
2280 (i386_supply_fpregset): Likewise.
2281 (i386_collect_fpregset): Likewise.
2282 (i386_mpx_bd_base): Likewise.
2283 * i386-v4-nat.c (supply_fpregset): Likewise.
2284 (fill_fpregset): Likewise.
2285 * i387-tdep.c (i387_supply_fsave): Likewise.
2286 (i387_collect_fsave): Likewise.
2287 (i387_supply_fxsave): Likewise.
2288 (i387_collect_fxsave): Likewise.
2289 (i387_supply_xsave): Likewise.
2290 (i387_collect_xsave): Likewise.
2291 * ia64-linux-nat.c (ia64_linux_fetch_registers): Likewise.
2292 (ia64_linux_store_registers): Likewise.
2293 * ia64-tdep.c (ia64_access_rse_reg): Likewise.
2294 (ia64_extract_return_value): Likewise.
2295 (ia64_store_return_value): Likewise.
2296 (find_func_descr): Likewise.
2297 * inf-child.c (inf_child_fetch_inferior_registers): Likewise.
2298 * inf-ptrace.c (inf_ptrace_fetch_registers): Likewise.
2299 (inf_ptrace_store_registers): Likewise.
2300 * infrun.c (use_displaced_stepping): Likewise.
2301 (displaced_step_prepare_throw): Likewise.
2303 (proceed): Likewise.
2304 (do_target_wait): Likewise.
2305 (adjust_pc_after_break): Likewise.
2306 (handle_inferior_event_1): Likewise.
2307 (handle_signal_stop): Likewise.
2308 (save_infcall_suspend_state): Likewise.
2309 (restore_infcall_suspend_state): Likewise.
2310 * iq2000-tdep.c (iq2000_extract_return_value): Likewise.
2311 * jit.c (jit_frame_prev_register): Likewise.
2312 * linux-nat.c (save_stop_reason): Likewise.
2313 (linux_nat_wait_1): Likewise.
2314 (resume_stopped_resumed_lwps): Likewise.
2315 * linux-record.c (record_linux_sockaddr): Likewise.
2316 (record_linux_msghdr): Likewise.
2317 (record_linux_system_call): Likewise.
2318 * linux-tdep.c (linux_collect_thread_registers): Likewise.
2319 * lm32-tdep.c (lm32_extract_return_value): Likewise.
2320 (lm32_store_return_value): Likewise.
2321 * m32c-tdep.c (m32c_read_flg): Likewise.
2322 (m32c_pseudo_register_read): Likewise.
2323 (m32c_pseudo_register_write): Likewise.
2324 * m32r-linux-tdep.c (m32r_linux_supply_gregset): Likewise.
2325 (m32r_linux_collect_gregset): Likewise.
2326 * m32r-tdep.c (m32r_store_return_value): Likewise.
2327 (m32r_extract_return_value): Likewise.
2328 * m68k-bsd-nat.c (m68kbsd_supply_fpregset): Likewise.
2329 (m68kbsd_collect_fpregset): Likewise.
2330 * m68k-bsd-tdep.c (m68kbsd_supply_fpregset): Likewise.
2331 * m68k-linux-nat.c (fetch_register): Likewise.
2332 (old_fetch_inferior_registers): Likewise.
2333 (old_store_inferior_registers): Likewise.
2334 (store_regs): Likewise.
2335 * m68k-tdep.c (m68k_svr4_extract_return_value): Likewise.
2336 (m68k_svr4_store_return_value): Likewise.
2337 * m88k-tdep.c (m88k_store_arguments): Likewise.
2338 * mi/mi-main.c (mi_cmd_data_list_changed_registers): Likewise.
2339 (mi_cmd_data_write_register_values): Likewise.
2340 * mips-fbsd-nat.c (mips_fbsd_fetch_inferior_registers): Likewise.
2341 (mips_fbsd_store_inferior_registers): Likewise.
2342 * mips-fbsd-tdep.c (mips_fbsd_supply_fpregs): Likewise.
2343 (mips_fbsd_supply_gregs): Likewise.
2344 (mips_fbsd_collect_fpregs): Likewise.
2345 (mips_fbsd_collect_gregs): Likewise.
2346 (mips_fbsd_supply_fpregset): Likewise.
2347 (mips_fbsd_collect_fpregset): Likewise.
2348 (mips_fbsd_supply_gregset): Likewise.
2349 (mips_fbsd_collect_gregset): Likewise.
2350 * mips-linux-nat.c (supply_gregset): Likewise.
2351 (fill_gregset): Likewise.
2352 (supply_fpregset): Likewise.
2353 (fill_fpregset): Likewise.
2354 * mips-linux-tdep.c (mips_supply_gregset): Likewise.
2355 (mips_fill_gregset): Likewise.
2356 (mips_supply_fpregset): Likewise.
2357 (mips_fill_fpregset): Likewise.
2358 (mips64_supply_gregset): Likewise.
2359 (micromips_linux_sigframe_validate): Likewise.
2360 * mips-nbsd-nat.c (mipsnbsd_fetch_inferior_registers): Likewise.
2361 (mipsnbsd_fetch_inferior_registers): Likewise.
2362 (mipsnbsd_store_inferior_registers): Likewise.
2363 * mips-nbsd-tdep.c (mipsnbsd_supply_fpregset): Likewise.
2364 (mipsnbsd_supply_gregset): Likewise.
2365 (mipsnbsd_iterate_over_regset_sections): Likewise.
2366 (mipsnbsd_supply_reg): Likewise.
2367 (mipsnbsd_supply_fpreg): Likewise.
2368 * mips-tdep.c (mips_in_frame_stub): Likewise.
2369 (mips_dummy_id): Likewise.
2370 (is_octeon_bbit_op): Likewise.
2371 (micromips_bc1_pc): Likewise.
2372 (extended_mips16_next_pc): Likewise.
2373 (mips16_next_pc): Likewise.
2374 (deal_with_atomic_sequence): Likewise.
2375 * moxie-tdep.c (moxie_process_readu): Likewise.
2376 * nios2-tdep.c (nios2_get_next_pc): Likewise.
2377 * nto-procfs.c (procfs_store_registers): Likewise.
2378 * ppc-fbsd-nat.c (ppcfbsd_fetch_inferior_registers): Likewise.
2379 (ppcfbsd_store_inferior_registers): Likewise.
2380 * ppc-linux-nat.c (fetch_vsx_register): Likewise.
2381 (fetch_altivec_register): Likewise.
2382 (get_spe_registers): Likewise.
2383 (fetch_spe_register): Likewise.
2384 (fetch_altivec_registers): Likewise.
2385 (fetch_all_gp_regs): Likewise.
2386 (fetch_all_fp_regs): Likewise.
2387 (store_vsx_register): Likewise.
2388 (store_altivec_register): Likewise.
2389 (set_spe_registers): Likewise.
2390 (store_spe_register): Likewise.
2391 (store_altivec_registers): Likewise.
2392 (store_all_gp_regs): Likewise.
2393 (store_all_fp_regs): Likewise.
2394 * ppc-linux-tdep.c (ppc_linux_supply_gregset): Likewise.
2395 (ppc_linux_collect_gregset): Likewise.
2396 (ppc_canonicalize_syscall): Likewise.
2397 (ppc_linux_record_signal): Likewise.
2398 (ppu2spu_prev_register): Likewise.
2399 * ppc-nbsd-nat.c (ppcnbsd_supply_pcb): Likewise.
2400 * ppc-obsd-nat.c (ppcobsd_fetch_registers): Likewise.
2401 (ppcobsd_store_registers): Likewise.
2402 * ppc-ravenscar-thread.c (ppc_ravenscar_generic_fetch_registers):
2404 (ppc_ravenscar_generic_store_registers): Likewise.
2405 * procfs.c (procfs_fetch_registers): Likewise.
2406 (procfs_store_registers): Likewise.
2407 * ravenscar-thread.c (ravenscar_fetch_registers): Likewise.
2408 (ravenscar_store_registers): Likewise.
2409 (ravenscar_prepare_to_store): Likewise.
2410 * record-btrace.c (record_btrace_fetch_registers): Likewise.
2411 * record-full.c (record_full_wait_1): Likewise.
2412 (record_full_registers_change): Likewise.
2413 (record_full_store_registers): Likewise.
2414 (record_full_core_fetch_registers): Likewise.
2415 (record_full_save): Likewise.
2416 (record_full_goto_insn): Likewise.
2417 * regcache.c (regcache_register_size): Likewise.
2418 (get_regcache_arch): Remove.
2419 (regcache_read_pc): Likewise.
2420 * regcache.h (get_regcache_arch): Remove.
2421 * remote-sim.c (gdbsim_fetch_register): Likewise.
2422 (gdbsim_store_register): Likewise.
2423 * remote.c (fetch_register_using_p): Likewise.
2424 (send_g_packet): Likewise.
2425 (remote_prepare_to_store): Likewise.
2426 (store_registers_using_G): Likewise.
2427 * reverse.c (save_bookmark_command): Likewise.
2428 (goto_bookmark_command): Likewise.
2429 * rs6000-aix-tdep.c (branch_dest): Likewise.
2430 * rs6000-nat.c (rs6000_ptrace64): Likewise.
2431 (fetch_register): Likewise.
2432 * rs6000-tdep.c (ppc_supply_reg): Likewise.
2433 (ppc_collect_reg): Likewise.
2434 (ppc_collect_gregset): Likewise.
2435 (ppc_collect_fpregset): Likewise.
2436 (ppc_collect_vsxregset): Likewise.
2437 (ppc_collect_vrregset): Likewise.
2438 (ppc_displaced_step_hw_singlestep): Likewise.
2439 (rs6000_pseudo_register_read): Likewise.
2440 (rs6000_pseudo_register_write): Likewise.
2441 * s390-linux-nat.c (supply_gregset): Likewise.
2442 (fill_gregset): Likewise.
2443 (s390_linux_fetch_inferior_registers): Likewise.
2444 * s390-linux-tdep.c (s390_write_pc): Likewise.
2445 (s390_software_single_step): Likewise.
2446 (s390_all_but_pc_registers_record): Likewise.
2447 (s390_linux_syscall_record): Likewise.
2448 * sentinel-frame.c (sentinel_frame_prev_arch): Likewise.
2449 * sh-nbsd-nat.c (shnbsd_fetch_inferior_registers): Likewise.
2450 (shnbsd_store_inferior_registers): Likewise.
2451 * sh-tdep.c (sh_extract_return_value_nofpu): Likewise.
2452 (sh_extract_return_value_fpu): Likewise.
2453 (sh_store_return_value_nofpu): Likewise.
2454 (sh_corefile_supply_regset): Likewise.
2455 (sh_corefile_collect_regset): Likewise.
2456 * sh64-tdep.c (sh64_extract_return_value): Likewise.
2457 (sh64_store_return_value): Likewise.
2458 * sparc-linux-tdep.c (sparc32_linux_collect_core_fpregset): Likewise.
2459 * sparc-nat.c (sparc_fetch_inferior_registers): Likewise.
2460 (sparc_store_inferior_registers): Likewise.
2461 * sparc-ravenscar-thread.c (register_in_thread_descriptor_p): Likewise.
2462 (sparc_ravenscar_prepare_to_store): Likewise.
2463 * sparc-tdep.c (sparc32_store_arguments): Likewise.
2464 (sparc_analyze_control_transfer): Likewise.
2465 (sparc_step_trap): Likewise.
2466 (sparc_software_single_step): Likewise.
2467 (sparc32_gdbarch_init): Likewise.
2468 (sparc_supply_rwindow): Likewise.
2469 (sparc_collect_rwindow): Likewise.
2470 * sparc64-linux-tdep.c (sparc64_linux_collect_core_fpregset): Likewise.
2471 * sparc64-nbsd-nat.c (sparc64nbsd_supply_gregset): Likewise.
2472 (sparc64nbsd_collect_gregset): Likewise.
2473 (sparc64nbsd_supply_fpregset): Likewise.
2474 (sparc64nbsd_collect_fpregset): Likewise.
2475 * sparc64-tdep.c (sparc64_store_arguments): Likewise.
2476 (sparc64_supply_gregset): Likewise.
2477 (sparc64_collect_gregset): Likewise.
2478 (sparc64_supply_fpregset): Likewise.
2479 (sparc64_collect_fpregset): Likewise.
2480 * spu-linux-nat.c (spu_fetch_inferior_registers): Likewise.
2481 * spu-tdep.c (spu_unwind_sp): Likewise.
2482 (spu2ppu_prev_register): Likewise.
2483 (spu_memory_remove_breakpoint): Likewise.
2484 * stack.c (return_command): Likewise.
2485 * tic6x-tdep.c (tic6x_extract_signed_field): Likewise.
2486 * tracefile-tfile.c (tfile_fetch_registers): Likewise.
2487 * tracefile.c (trace_save_ctf): Likewise.
2488 * windows-nat.c (do_windows_fetch_inferior_registers): Likewise.
2489 (do_windows_store_inferior_registers): Likewise.
2490 (windows_resume): Likewise.
2491 * xtensa-linux-nat.c (fill_gregset): Likewise.
2492 (supply_gregset_reg): Likewise.
2493 * xtensa-tdep.c (xtensa_register_write_masked): Likewise.
2494 (xtensa_register_read_masked): Likewise.
2495 (xtensa_supply_gregset): Likewise.
2496 (xtensa_extract_return_value): Likewise.
2497 (xtensa_store_return_value): Likewise.
2499 2017-10-25 Ulrich Weigand <uweigand@de.ibm.com>
2501 * doublest.c (floatformat_from_string): New function.
2502 * doublest.h (floatformat_from_string): Add prototype.
2504 * std-operator.def (OP_DOUBLE, OP_DECFLOAT): Remove, replace by ...
2505 (OP_FLOAT): ... this.
2506 * expression.h: Do not include "doublest.h".
2507 (union exp_element): Replace doubleconst and decfloatconst by
2508 new element floatconst.
2509 * ada-lang.c (resolve_subexp): Handle OP_FLOAT instead of OP_DOUBLE.
2510 (ada_evaluate_subexp): Likewise.
2511 * eval.c (evaluate_subexp_standard): Handle OP_FLOAT instead of
2512 OP_DOUBLE and OP_DECFLOAT.
2513 * expprint.c (print_subexp_standard): Likewise.
2514 (dump_subexp_body_standard): Likewise.
2515 * breakpoint.c (watchpoint_exp_is_const): Likewise.
2517 * parse.c: Include "dfp.h".
2518 (write_exp_elt_dblcst, write_exp_elt_decfloatcst): Remove.
2519 (write_exp_elt_floatcst): New function.
2520 (operator_length_standard): Handle OP_FLOAT instead of OP_DOUBLE
2522 (operator_check_standard): Likewise.
2523 (parse_float): Do not accept suffix. Take type as input. Return bool.
2524 Return target format buffer instead of host DOUBLEST.
2525 Use floatformat_from_string and decimal_from_string to parse
2526 either binary or decimal floating-point types.
2527 (parse_c_float): Remove.
2528 * parser-defs.h: Do not include "doublest.h".
2529 (write_exp_elt_dblcst, write_exp_elt_decfloatcst): Remove.
2530 (write_exp_elt_floatcst): Add prototype.
2531 (parse_float): Update prototype.
2532 (parse_c_float): Remove.
2534 * c-exp.y: Do not include "dfp.h".
2535 (typed_val_float): Use byte buffer instead of DOUBLEST.
2536 (typed_val_decfloat): Remove.
2538 (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
2539 (parse_number): Update to new parse_float interface.
2540 Parse suffixes and determine type before calling parse_float.
2541 Handle decimal and binary FP types the same way.
2543 * d-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
2544 (FLOAT_LITERAL): Use OP_FLOAT and write_exp_elt_floatcst.
2545 (parse_number): Update to new parse_float interface.
2546 Parse suffixes and determine type before calling parse_float.
2548 * f-exp.y: Replace dval by typed_val_float.
2549 (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
2550 (parse_number): Use parse_float instead of atof.
2552 * go-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
2553 (parse_go_float): Remove.
2554 (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
2555 (parse_number): Call parse_float instead of parse_go_float.
2556 Parse suffixes and determine type before calling parse_float.
2558 * p-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
2559 (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
2560 (parse_number): Update to new parse_float interface.
2561 Parse suffixes and determine type before calling parse_float.
2563 * m2-exp.y: Replace dval by byte buffer val.
2564 (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
2565 (parse_number): Call parse_float instead of atof.
2567 * rust-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
2568 (lex_number): Call parse_float instead of strtod.
2569 (ast_dliteral): Use OP_FLOAT instead of OP_DOUBLE.
2570 (convert_ast_to_expression): Handle OP_FLOAT instead of OP_DOUBLE.
2571 Use write_exp_elt_floatcst.
2572 (unit_testing): Remove static variable.
2573 (rust_type): Do not check unit_testing.
2574 (rust_lex_tests): Do not set uint_testing. Set up dummy rust_parser.
2576 * ada-exp.y (type_float, type_double): Remove.
2577 (typed_val_float): Use byte buffer instead of DOUBLEST.
2578 (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
2579 * ada-lex.l (processReal): Use parse_float instead of sscanf.
2581 2017-10-25 Alan Hayward <alan.hayward@arm.com>
2583 * aarch64-tdep.h (enum aarch64_regnum): Remove.
2584 * arch/aarch64.h: New file.
2586 2017-10-24 Ulrich Weigand <uweigand@de.ibm.com>
2588 * dfp.h (decimal_from_string): Use const reference for argument.
2589 * dfp.c (decimal_from_string): Likewise.
2591 2017-10-24 Ulrich Weigand <uweigand@de.ibm.com>
2593 * i387-tdep.c (print_i387_value): Use floatformat_to_string.
2594 * sh64-tdep.c (sh64_do_fp_register): Likewise.
2595 * mips-tdep.c (mips_print_fp_register): Likewise.
2597 2017-10-24 Ulrich Weigand <uweigand@de.ibm.com>
2599 * common/format.h (enum argclass): Replace decfloat_arg by
2600 dec32float_arg, dec64float_arg, and dec128float_arg.
2601 * common/format.c (parse_format_string): Update to return
2602 new decimal float argument classes.
2604 * printcmd.c (printf_decfloat): Rename to ...
2605 (printf_floating): ... this. Add argclass argument, and use it
2606 instead of parsing the format string again. Add support for
2607 binary floating-point values, using floatformat_to_string.
2608 Convert value to the target format if it doesn't already match.
2609 (ui_printf): Call printf_floating instead of printf_decfloat,
2610 also for double_arg / long_double_arg. Pass argclass.
2612 * dfp.c (decimal_to_string): Add format string argument.
2613 * dfp.h (decimal_to_string): Likewise.
2615 * doublest.c (floatformat_to_string): Add format string argument.
2616 * doublest.h (floatformat_to_string): Likewise.
2618 2017-10-24 Ulrich Weigand <uweigand@de.ibm.com>
2620 * doublest.c (floatformat_precision): New routine.
2621 (floatformat_to_string): Likewise.
2622 * doublest.c (floatformat_to_string): Add prototype.
2624 * printcmd.c (print_scalar_formatted): Only call print_floating
2625 on floating-point types.
2626 * valprint.c: Do not include "floatformat.h".
2627 (generic_val_print_decfloat): Remove.
2628 (generic_val_print): Call generic_val_print_float for both
2629 TYPE_CODE_FLT and TYPE_CODE_DECFLOAT.
2630 (print_floating): Use floatformat_to_string. Handle decimal float.
2631 (print_decimal_floating): Remove, merge into floatformat_to_string.
2632 * value.h (print_decimal_floating): Remove.
2634 * Makefile.in: Do not build doublest.c with -Wformat-nonliteral.
2636 2017-10-24 Ulrich Weigand <uweigand@de.ibm.com>
2638 * buildsym.c (end_symtab_get_static_block): Use std::stable_sort.
2640 2017-10-21 Simon Marchi <simon.marchi@ericsson.com>
2642 * memattr.h: Don't include vec.h.
2643 (struct mem_attrib): Initialize fields.
2644 <unknown>: New static method.
2645 (struct mem_region): Add constructors, operator<, initialize
2647 * memattr.c: Include algorithm.
2648 (default_mem_attrib, unknown_mem_attrib): Remove.
2649 (user_mem_region_list): New global.
2650 (target_mem_region_list, mem_region_list): Change type to
2651 std::vector<mem_region>.
2652 (mem_use_target): Now a function.
2653 (target_mem_regions_valid): Change type to bool.
2654 (mem_region_lessthan, mem_region_cmp, mem_region_init): Remove.
2655 (require_user_regions): Adjust.
2656 (require_target_regions): Adjust.
2657 (create_mem_region): Adjust.
2658 (lookup_mem_region): Adjust.
2659 (invalidate_target_mem_regions): Adjust.
2660 (mem_clear): Rename to...
2661 (user_mem_clear): ... this, and adjust.
2662 (mem_command): Adjust.
2663 (info_mem_command): Adjust.
2664 (mem_enable, enable_mem_command, mem_disable,
2665 disable_mem_command): Adjust.
2666 (mem_delete): Adjust.
2667 (delete_mem_command): Adjust.
2668 * memory-map.h (parse_memory_map): Return an std::vector.
2669 * memory-map.c (parse_memory_map): Likewise.
2670 (struct memory_map_parsing_data): Add constructor.
2671 <memory_map>: Point to std::vector.
2672 (memory_map_start_memory): Adjust.
2673 (memory_map_end_memory): Adjust.
2674 (memory_map_end_property): Adjust.
2675 (clear_result): Remove.
2676 * remote.c (remote_memory_map): Return an std::vector.
2677 * target-debug.h (target_debug_print_VEC_mem_region_s__p):
2679 (target_debug_print_mem_region_vector): New.
2680 * target-delegates.c: Regenerate.
2681 * target.h (mem_region_vector): New typedef.
2682 (to_memory_map): Return mem_region_vector.
2683 (target_memory_map): Return an std::vector.
2684 * target.c (target_memory_map): Return an std::vector.
2685 (flash_erase_command): Adjust.
2687 2017-10-21 Simon Marchi <simon.marchi@ericsson.com>
2689 * memory-map.c (struct memory_map_parsing_data) <property_name>:
2690 Change type to std::string.
2691 (memory_map_start_property): Adjust.
2692 (memory_map_end_property): Adjust.
2694 2017-10-21 Simon Marchi <simon.marchi@polymtl.ca>
2696 * infrun.h: Include common/byte-vector.h.
2697 (struct displaced_step_closure): New struct.
2698 (struct buf_displaced_step_closure): New struct.
2699 * infrun.c (displaced_step_closure::~displaced_step_closure):
2700 Provide default implementation.
2701 (displaced_step_clear): Deallocate step closure with delete.
2702 * aarch64-tdep.c (displaced_step_closure): Rename to ...
2703 (aarch64_displaced_step_closure): ... this, extend
2704 displaced_step_closure.
2705 (aarch64_displaced_step_data) <dsc>: Change type to
2706 aarch64_displaced_step_closure.
2707 (aarch64_displaced_step_copy_insn): Adjust to type change, use
2709 (aarch64_displaced_step_fixup): Add cast for displaced step
2711 * amd64-tdep.c (displaced_step_closure): Rename to ...
2712 (amd64_displaced_step_closure): ... this, extend
2713 displaced_step_closure.
2714 <insn_buf>: Change type to std::vector<gdb_byte>.
2716 (fixup_riprel): Change type of DSC parameter, adjust to type
2718 (fixup_displaced_copy): Change type of DSC parameter.
2719 (amd64_displaced_step_copy_insn): Instantiate
2720 amd64_displaced_step_closure.
2721 (amd64_displaced_step_fixup): Add cast for closure type, adjust
2722 to type change of insn_buf.
2723 * arm-linux-tdep.c (arm_linux_cleanup_svc): Change type of
2725 (arm_linux_copy_svc): Likewise.
2726 (cleanup_kernel_helper_return): Likewise.
2727 (arm_catch_kernel_helper_return): Likewise.
2728 (arm_linux_displaced_step_copy_insn): Instantiate
2729 arm_displaced_step_closure.
2730 * arm-tdep.c (arm_pc_is_thumb): Add cast for closure.
2731 (displaced_read_reg): Change type of parameter DSC.
2732 (branch_write_pc): Likewise.
2733 (load_write_pc): Likewise.
2734 (alu_write_pc): Likewise.
2735 (displaced_write_reg): Likewise.
2736 (arm_copy_unmodified): Likewise.
2737 (thumb_copy_unmodified_32bit): Likewise.
2738 (thumb_copy_unmodified_16bit): Likewise.
2739 (cleanup_preload): Likewise.
2740 (install_preload): Likewise.
2741 (arm_copy_preload): Likewise.
2742 (thumb2_copy_preload): Likewise.
2743 (install_preload_reg): Likewise.
2744 (arm_copy_preload_reg): Likewise.
2745 (cleanup_copro_load_store): Likewise.
2746 (install_copro_load_store): Likewise.
2747 (arm_copy_copro_load_store) Likewise.
2748 (thumb2_copy_copro_load_store): Likewise.
2749 (cleanup_branch): Likewise.
2750 (install_b_bl_blx): Likewise.
2751 (arm_copy_b_bl_blx): Likewise.
2752 (thumb2_copy_b_bl_blx): Likewise.
2753 (thumb_copy_b): Likewise.
2754 (install_bx_blx_reg): Likewise.
2755 (arm_copy_bx_blx_reg): Likewise.
2756 (thumb_copy_bx_blx_reg): Likewise.
2757 (cleanup_alu_imm): Likewise.
2758 (arm_copy_alu_imm): Likewise.
2759 (thumb2_copy_alu_imm): Likewise.
2760 (cleanup_alu_reg): Likewise.
2761 (install_alu_reg): Likewise.
2762 (arm_copy_alu_reg): Likewise.
2763 (thumb_copy_alu_reg): Likewise.
2764 (cleanup_alu_shifted_reg): Likewise.
2765 (install_alu_shifted_reg): Likewise.
2766 (arm_copy_alu_shifted_reg): Likewise.
2767 (cleanup_load): Likewise.
2768 (cleanup_store): Likewise.
2769 (arm_copy_extra_ld_st): Likewise.
2770 (install_load_store): Likewise.
2771 (thumb2_copy_load_literal): Likewise.
2772 (thumb2_copy_load_reg_imm): Likewise.
2773 (arm_copy_ldr_str_ldrb_strb): Likewise.
2774 (cleanup_block_load_all): Likewise.
2775 (cleanup_block_store_pc): Likewise.
2776 (cleanup_block_load_pc): Likewise.
2777 (arm_copy_block_xfer): Likewise.
2778 (thumb2_copy_block_xfer): Likewise.
2779 (cleanup_svc): Likewise.
2780 (install_svc): Likewise.
2781 (arm_copy_svc): Likewise.
2782 (thumb_copy_svc): Likewise.
2783 (arm_copy_undef): Likewise.
2784 (thumb_32bit_copy_undef): Likewise.
2785 (arm_copy_unpred): Likewise.
2786 (arm_decode_misc_memhint_neon): Likewise.
2787 (arm_decode_unconditional): Likewise.
2788 (arm_decode_miscellaneous): Likewise.
2789 (arm_decode_dp_misc): Likewise.
2790 (arm_decode_ld_st_word_ubyte): Likewise.
2791 (arm_decode_media): Likewise.
2792 (arm_decode_b_bl_ldmstm): Likewise.
2793 (arm_decode_ext_reg_ld_st): Likewise.
2794 (thumb2_decode_dp_shift_reg): Likewise.
2795 (thumb2_decode_ext_reg_ld_st): Likewise.
2796 (arm_decode_svc_copro): Likewise.
2797 (thumb2_decode_svc_copro): Likewise.
2798 (install_pc_relative): Likewise.
2799 (thumb_copy_pc_relative_16bit): Likewise.
2800 (thumb_decode_pc_relative_16bit): Likewise.
2801 (thumb_copy_pc_relative_32bit): Likewise.
2802 (thumb_copy_16bit_ldr_literal): Likewise.
2803 (thumb_copy_cbnz_cbz): Likewise.
2804 (thumb2_copy_table_branch): Likewise.
2805 (cleanup_pop_pc_16bit_all): Likewise.
2806 (thumb_copy_pop_pc_16bit): Likewise.
2807 (thumb_process_displaced_16bit_insn): Likewise.
2808 (decode_thumb_32bit_ld_mem_hints): Likewise.
2809 (thumb_process_displaced_32bit_insn): Likewise.
2810 (thumb_process_displaced_insn): Likewise.
2811 (arm_process_displaced_insn): Likewise.
2812 (arm_displaced_init_closure): Likewise.
2813 (arm_displaced_step_fixup): Add cast for closure.
2814 * arm-tdep.h: Include infrun.h.
2815 (displaced_step_closure): Rename to ...
2816 (arm_displaced_step_closure): ... this, extend
2817 displaced_step_closure.
2818 <u::svc::copy_svc_os>: Change type of parameter DSC.
2819 <cleanup>: Likewise.
2820 (arm_process_displaced_insn): Likewise.
2821 (arm_displaced_init_closure): Likewise.
2822 (displaced_read_reg): Likewise.
2823 (displaced_write_reg): Likewise.
2824 * i386-linux-tdep.c (i386_linux_displaced_step_copy_insn):
2826 * i386-tdep.h: Include infrun.h.
2827 (i386_displaced_step_closure): New typedef.
2828 * i386-tdep.c (i386_displaced_step_copy_insn): Use
2829 i386_displaced_step_closure.
2830 (i386_displaced_step_fixup): Adjust.
2831 * rs6000-tdep.c (ppc_displaced_step_closure): New typedef.
2832 (ppc_displaced_step_copy_insn): Use ppc_displaced_step_closure
2834 (ppc_displaced_step_fixup): Adjust.
2835 * s390-linux-tdep.c (s390_displaced_step_closure): New typedef.
2836 (s390_displaced_step_copy_insn): Use s390_displaced_step_closure
2838 (s390_displaced_step_fixup): Adjust.
2840 2017-10-21 Simon Marchi <simon.marchi@polymtl.ca>
2842 * interps.h (interp_resume, interp_suspend, interp_set_temp):
2843 Remove declarations.
2845 2017-10-20 Tom Tromey <tom@tromey.com>
2847 * gdb_bfd.c (struct gdb_bfd_data) <included_bfds>: Now a
2849 (gdb_bfd_record_inclusion): Update.
2850 (bfdp): Remove typedef.
2852 2017-10-20 Tom Tromey <tom@tromey.com>
2854 * gdb_bfd.c (gdb_bfd_ref): Use new.
2855 (struct gdb_bfd_data): Add constructor, destructor, and member
2857 (gdb_bfd_unref): Use delete.
2859 2017-10-20 Tom Tromey <tom@tromey.com>
2861 * exec.c (exec_file_attach): Use new_bfd_ref.
2862 * symfile-mem.c (symbol_file_add_from_memory): Use new_bfd_ref.
2863 * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
2864 (gdb_bfd_openw, gdb_bfd_openr_iovec, gdb_bfd_fdopenr): Use
2866 * gdb_bfd.h (new_bfd_ref): New function.
2868 2017-10-20 Pedro Alves <palves@redhat.com>
2870 * main.c (captured_command_loop): Add attribute noinline.
2872 2017-10-19 Simon Marchi <simon.marchi@ericsson.com>
2874 * interps.c (struct interp_factory): Add constructor.
2875 (interp_factory_p): Remove typedef.
2876 (DEF_VEC_P(interp_factory_p)): Remove.
2877 (interpreter_factories): Change type to std::vector.
2878 (interp_factory_register): Adjust.
2879 (interp_lookup): Adjust.
2880 (interpreter_completer): Adjust.
2882 2017-10-19 Tom Tromey <tom@tromey.com>
2884 * break-catch-syscall.c (catch_syscall_completer): Use
2885 std::string, gdb::unique_xmalloc_ptr.
2887 2017-10-19 Tom Tromey <tom@tromey.com>
2889 * infcall.c (call_function_by_hand_dummy): Use std::string.
2891 2017-10-19 Tom Tromey <tom@tromey.com>
2893 * mi/mi-main.c (mi_cmd_execute): Update.
2894 * top.h (prepare_execute_command): Return scoped_value_mark.
2895 * value.h (class scoped_value_mark): Use DISABLE_COPY_AND_ASSIGN.
2896 Add move constructor.
2897 * top.c (prepare_execute_command): Return scoped_value_mark.
2898 (execute_command): Update.
2900 2017-10-19 Pedro Alves <palves@redhat.com>
2902 * xml-support.c (xml_fetch_content_from_file): Check fread's
2905 2017-10-19 Pedro Alves <palves@redhat.com>
2907 * ser-base.c (ser_base_read_error_fd): Delete the file handler if
2909 (handle_error_fd): New function.
2910 (ser_base_async): Add/delete an event loop file handler for
2913 2017-10-19 Pedro Alves <palves@redhat.com>
2915 * xml-support.c (xml_fetch_content_from_file): Don't read in
2916 chunks. Instead use fseek to determine the file's size, and read
2919 2017-11-18 Keith Seitz <keiths@redhat.com>
2921 * c-exp.y (oper): Canonicalize conversion operators of user-defined
2923 Add whitespace to front of type name.
2925 2017-10-18 Keith Seitz <keiths@redhat.com>
2927 * dwarf2read.c (dwarf2_add_typedef): Issue a complaint on unhandled
2928 DW_AT_accessibility.
2930 2017-10-18 Yao Qi <yao.qi@linaro.org>
2932 * features/tic6x-c62x-linux.c: Remove.
2934 2017-10-17 Tom Tromey <tom@tromey.com>
2936 * disasm.c (do_mixed_source_and_assembly_deprecated): Use
2937 gdb::optional, ui_out_emit_list, ui_out_emit_tuple.
2938 (do_mixed_source_and_assembly): Likewise.
2940 2017-10-17 Tom Tromey <tom@tromey.com>
2942 * regcache.c (regcache::xfer_part): Remove assertion.
2944 2017-10-17 Pedro Alves <palves@redhat.com>
2946 * xml-support.c (xml_fetch_content_from_file): Call
2947 unique_ptr::release() instead unique_ptr::get() when passing
2950 2017-10-17 Yao Qi <yao.qi@linaro.org>
2952 * regcache.c (regcache::xfer_part): Remove parameters read and
2953 write, add parameter is_raw. All callers are updated.
2955 2017-10-16 Keith Seitz <keiths@redhat.com>
2957 * c-typeprint.c (enum access_specifier): Moved here from
2959 (output_access_specifier): New function.
2960 (c_type_print_base): Consider typedefs when assessing
2961 whether access labels are needed.
2962 Use output_access_specifier as needed.
2963 Output access specifier for typedefs, if needed.
2964 * dwarf2read.c (dwarf2_add_typedef): Record DW_AT_accessibility.
2965 * gdbtypes.h (struct typedef_field) <is_protected, is_private>: New
2967 (TYPE_TYPEDEF_FIELD_PROTECTED, TYPE_TYPEDEF_FIELD_PRIVATE): New
2970 2017-10-16 Tom Tromey <tom@tromey.com>
2972 * linux-tdep.c (linux_info_proc, linux_find_memory_regions_full)
2973 (linux_fill_prpsinfo, linux_vsyscall_range_raw): Update.
2974 * target.c (target_fileio_read_stralloc): Update.
2975 * sparc64-tdep.c (adi_is_addr_mapped): Update.
2976 * target.h (target_fileio_read_stralloc): Return
2979 2017-10-16 Tom Tromey <tom@tromey.com>
2981 * xml-syscall.c (xml_init_syscalls_info): Update.
2982 * xml-support.c (xinclude_start_include): Update.
2983 (xml_fetch_content_from_file): Return unique_xmalloc_ptr.
2984 * xml-support.h (xml_fetch_another): Return unique_xmalloc_ptr.
2985 (xml_fetch_content_from_file): Likewise.
2986 * osdata.c (get_osdata): Update.
2987 * target.h (target_read_stralloc, target_get_osdata): Return
2989 * solib-aix.c (solib_aix_get_library_list): Update.
2990 * solib-target.c (solib_target_current_sos): Update.
2991 * solib-svr4.c (svr4_current_sos_via_xfer_libraries): Update.
2992 * xml-tdesc.c (fetch_available_features_from_target): Update.
2993 (target_fetch_description_xml): Update.
2994 (file_read_description_xml): Update.
2995 * remote.c (remote_get_threads_with_qxfer, remote_memory_map)
2996 (remote_traceframe_info, btrace_read_config, remote_read_btrace)
2997 (remote_pid_to_exec_file): Update.
2998 * target.c (target_read_stralloc): Return unique_xmalloc_ptr.
2999 (target_get_osdata): Likewise.
3001 2017-10-16 Tom Tromey <tom@tromey.com>
3003 * remote.c (remote_register_number_and_offset): Use std::vector.
3004 (remote_set_syscall_catchpoint): Use gdb::unique_xmalloc_ptr.
3005 (putpkt_binary): Use gdb::def_vector.
3006 (compare_sections_command): Use gdb::byte_vector.
3008 2017-10-16 Tom Tromey <tom@tromey.com>
3010 * ppc-linux-nat.c (hwdebug_insert_point): Use
3011 gdb::unique_xmalloc_ptr, XDUP.
3013 2017-10-16 Tom Tromey <tom@tromey.com>
3015 * probe.c (parse_probes): Use std::string.
3016 (info_probes_for_ops, enable_probes_command)
3017 (disable_probes_command): Remove cleanups.
3019 2017-10-16 Tom Tromey <tom@tromey.com>
3021 * buildsym.c (block_compar): Remove.
3022 (end_symtab_get_static_block): Use std::vector.
3024 2017-10-16 Simon Marchi <simon.marchi@ericsson.com>
3026 * memrange.h (struct mem_range): Define operator< and operator==.
3027 (mem_range_s): Remove.
3028 (DEF_VEC_O (mem_range_s)): Remove.
3029 (normalize_mem_ranges): Change parameter type to std::vector.
3030 * memrange.c (compare_mem_ranges): Remove.
3031 (normalize_mem_ranges): Change parameter type to std::vector,
3032 adjust to vector change.
3033 * exec.c (section_table_available_memory): Return vector, remove
3035 (section_table_read_available_memory): Adjust to std::vector
3037 * remote.c (remote_read_bytes): Adjust to std::vector
3039 * tracepoint.h (traceframe_available_memory): Change parameter
3040 type to std::vector.
3041 * tracepoint.c (traceframe_available_memory): Change parameter
3042 type to std::vector, adjust.
3043 * gdb/mi/mi-main.c (mi_cmd_trace_frame_collected): Adjust to
3045 * gdb/Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
3046 unittests/memrange-selftests.c.
3047 (SUBDIR_UNITTESTS_OBS): Add memrange-selftests.o.
3048 * gdb/unittests/memrange-selftests.c: New file.
3050 2017-10-16 Pedro Alves <palves@redhat.com>
3052 * elfread.c (probe_key_free): Rename range-for variable.
3053 * probe.c (parse_probes_in_pspace, find_probes_in_objfile)
3054 (find_probe_by_pc, collect_probes): Rename range-for variable.
3056 2017-10-16 Yao Qi <yao.qi@linaro.org>
3058 * features/Makefile (XMLTOC): Remove tic6x-*.xml.
3059 * features/tic6x-c62x.c: Remove.
3060 * features/tic6x-c64x-linux.c: Remove.
3061 * features/tic6x-c64x.c: Remove.
3062 * features/tic6x-c64xp-linux.c: Remove.
3063 * features/tic6x-c64xp.c: Remove.
3064 * tic6x-linux-tdep.c (_initialize_tic6x_linux_tdep): Don't call
3065 initialize_tdesc_tic6x_*_linux functions.
3066 * tic6x-tdep.c (_initialize_tic6x_tdep): Don't call
3067 initialize_tdesc_tic6x_* functions.
3069 2017-10-16 Yao Qi <yao.qi@linaro.org>
3071 * features/Makefile (WHICH): Remove tic6x-c64xp, tic6x-c64x
3073 * regformats/tic6x-c62x.dat: Remove.
3074 * regformats/tic6x-c64x.dat: Remove.
3075 * regformats/tic6x-c64xp.dat: Remove.
3077 2017-10-15 Simon Marchi <simon.marchi@ericsson.com>
3079 * tracepoint.c (parse_traceframe_info): Return a unique_ptr
3080 (the !HAVE_LIBEXPAT version).
3082 2017-10-14 Simon Marchi <simon.marchi@ericsson.com>
3084 * nat/linux-osdata.c (struct pid_pgid_entry) <operator<>: Make
3087 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
3089 * target.h: Include tracepoint.h.
3090 (enum trace_find_type): Move to tracepoint.h.
3091 (struct target_ops) <to_traceframe_info>: Return a unique ptr.
3092 * tracepoint.h: Don't include target.h
3093 (enum trace_find_type): Move from target.h.
3094 (parse_traceframe_info): Return a unique ptr.
3095 * tracepoint.c (current_traceframe_info): Change type to unique
3097 (free_traceframe_info): Remove.
3098 (clear_traceframe_info): Don't manually free
3099 current_traceframe_info.
3100 (free_result): Remove.
3101 (parse_traceframe_info): Return a unique ptr.
3102 (get_traceframe_info): Adjust to unique ptr.
3103 * ctf.c (ctf_traceframe_info): Return a unique ptr.
3104 * remote.c (remote_traceframe_info): Return a unique ptr.
3105 * tracefile-tfile.c (tfile_traceframe_info): Return a unique
3107 * target-debug.h (target_debug_print_traceframe_info_up): New
3109 * target-delegates.c: Regenerate.
3111 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
3113 * memrange.h (struct mem_range): Add constructors.
3114 * tracepoint.h (struct traceframe_info) <memory>: Change type to
3115 std::vector<mem_range>.
3116 * tracepoint.c (free_traceframe_info): Don't manually free
3118 (traceframe_info_start_memory): Adjust to vector change.
3119 (traceframe_available_memory): Likewise.
3120 * tracefile-tfile.c (build_traceframe_info): Likewise.
3121 * ctf.c (ctf_traceframe_info): Likewise.
3123 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
3125 * tracepoint.h (struct traceframe_info) <tvars>: Change type to
3127 * tracepoint.c (free_traceframe_info): Deallocate with delete.
3128 (traceframe_info_start_tvar): Adjust to vector change.
3129 (parse_traceframe_info): Allocate with new.
3130 * ctf.c (ctf_traceframe_info): Allocate with new, adjust to
3132 * tracefile-tfile.c (build_traceframe_info): Adjust to vector
3134 tfile_traceframe_info): Allocate with new.
3135 * mi/mi-main.c (mi_cmd_trace_frame_collected): Adjust to vector
3138 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
3140 * tracepoint.c (traceframe_info): Rename to...
3141 (current_traceframe_info): ...this.
3142 (clear_traceframe_info): Adjust.
3143 (get_traceframe_info): Adjust.
3145 2017-10-14 Simon Marchi <simon.marchi@ericsson.com>
3147 * nat/linux-osdata.c: Include algorithm.
3148 (compare_processes): Remove.
3149 (struct pid_pgid_entry): New struct.
3150 (linux_xfer_osdata_processgroups): Use std::vector instead of
3153 2017-10-14 Simon Marchi <simon.marchi@ericsson.com>
3155 * objfiles.h: Don't include symfile.h.
3156 (struct partial_symbol): Remove forward-declaration.
3157 (struct objfile) <global_psymbols, static_psymbols>: Change type
3158 to std::vector<partial_symbol *>.
3159 * objfiles.c (objfile::objfile): Don't memset those fields.
3160 (objfile::~objfile): Don't free those fields.
3161 * psympriv.h (struct psymbol_allocation_list): Remove
3162 forward-declaration.
3163 (add_psymbol_to_list): Change psymbol_allocation_list parameter
3165 (start_psymtab_common): Change parameters to std::vector.
3166 * psymtab.c: Include algorithm.
3167 (require_partial_symbols): Call shrink_to_fit.
3168 (find_pc_sect_psymbol): Adjust to vector change.
3169 (match_partial_symbol): Likewise.
3170 (lookup_partial_symbol): Likewise.
3171 (psym_relocate): Likewise.
3172 (dump_psymtab): Likewise.
3173 (recursively_search_psymtabs): Likewise.
3174 (compare_psymbols): Remove.
3175 (sort_pst_symbols): Adjust to vector change.
3176 (start_psymtab_common): Likewise.
3177 (end_psymtab_common): Likewise.
3178 (psymbol_bcache_full): De-constify return value.
3179 (add_psymbol_to_bcache): Likewise.
3180 (extend_psymbol_list): Remove.
3181 (append_psymbol_to_list): Adjust to vector change.
3182 (add_psymbol_to_list): Likewise.
3183 (init_psymbol_list): Likewise.
3184 (maintenance_info_psymtabs): Likewise.
3185 (maintenance_check_psymtabs): Likewise.
3186 * symfile.h (struct psymbol_allocation_list): Remove.
3187 * symfile.c (reread_symbols): Adjust to vector change.
3188 * dbxread.c (start_psymtab): Change type of parameters.
3189 (dbx_symfile_read): Adjust to vector change.
3190 (read_dbx_symtab): Likewise.
3191 (start_psymtab): Change type of parameters.
3192 * dwarf2read.c (dwarf2_build_psymtabs): Adjust to vector change.
3193 (create_partial_symtab): Likewise.
3194 (add_partial_symbol): Likewise.
3195 (write_one_signatured_type): Likewise.
3196 (recursively_write_psymbols): Likewise.
3197 * mdebugread.c (parse_partial_symbols): Likewise.
3198 * xcoffread.c (xcoff_start_psymtab): Change type of parameters.
3199 (scan_xcoff_symtab): Adjust to vector change.
3200 (xcoff_initial_scan): Likewise.
3202 2017-10-13 Simon Marchi <simon.marchi@ericsson.com>
3204 * ada-typeprint.c (print_dynamic_range_bound): Use std::string.
3206 2017-10-13 Yao Qi <yao.qi@linaro.org>
3208 * features/Makefile: Remove tic6x-*-expedite, add tic6x-expedite.
3209 Remove s390x-*-expedite, add s390x-expedite.
3211 2017-10-13 Yao Qi <yao.qi@linaro.org>
3213 * features/s390-gs-linux64.c: Regenerated.
3214 * features/s390x-gs-linux64.c: Regenerated.
3216 2017-10-13 Tom Tromey <tom@tromey.com>
3218 * compile/compile-object-run.c (do_module_cleanup): Use delete.
3219 * solib.c (update_solib_list, reload_shared_libraries_1): Use
3221 * symfile.c (symbol_file_add_with_addrs): Use new.
3222 (symbol_file_add_separate): Update comment.
3223 (syms_from_objfile_1, remove_symbol_file_command): Use delete.
3224 * jit.c (jit_object_close_impl): Use new.
3225 (jit_unregister_code): Use delete.
3226 * objfiles.c (objfile::objfile): Rename from allocate_objfile.
3227 (~objfile): Rename from free_objfile.
3228 (free_objfile_separate_debug, do_free_objfile_cleanup)
3229 (free_all_objfiles, objfile_purge_solibs): Use delete.
3230 * objfiles.h (struct objfile): Add constructor and destructor.
3231 Use DISABLE_COPY_AND_ASSIGN. Add initializers to data members.
3232 (allocate_objfile, free_objfile): Don't declare.
3233 (struct objstats): Add initializers.
3235 2017-10-12 Simon Marchi <simon.marchi@ericsson.com>
3237 * arch-utils.h (simple_displaced_step_copy_insn): Remove.
3238 * arch-utils.c (simple_displaced_step_copy_insn): Remove.
3239 * gdbarch.sh (displaced_step_copy_insn): Adjust comment.
3240 * gdbarch.h: Regenerate.
3241 * i386-linux-tdep.c (i386_linux_displaced_step_copy_insn):
3243 * i386-tdep.c (i386_displaced_step_copy_insn): Adjust comment.
3244 (i386_displaced_step_fixup): Adjust comment.
3245 * rs6000-tdep.c (ppc_displaced_step_copy_insn): Adjust comment.
3247 2017-10-12 Tom Tromey <tom@tromey.com>
3249 * prologue-value.h (pv_area::store_would_trash): Return bool.
3250 (pv_area::find_reg): Likewise.
3251 * prologue-value.c (pv_area::store_would_trash): Return bool.
3252 (pv_area::find_reg): Likewise.
3254 2017-10-12 Tom Tromey <tom@tromey.com>
3256 * s390-linux-tdep.c (s390_store, s390_load)
3257 (s390_check_for_saved, s390_analyze_prologue): Update.
3258 * rx-tdep.c (check_for_saved, rx_analyze_prologue): Update.
3259 * rl78-tdep.c (rl78_analyze_prologue, check_for_saved): Update.
3260 * prologue-value.h (class pv_area): Move from prologue-value.c.
3261 Change names of members. Add constructor, destructor, member
3263 (make_pv_area, free_pv_area, make_cleanup_free_pv_area)
3264 (pv_area_store, pv_area_fetch, pv_area_store_would_trash)
3265 (pv_area_fetch, pv_area_scan): Don't declare.
3266 * prologue-value.c (struct pv_area::area_entry): Now member of
3268 (struct pv_area): Move to prologue-value.h.
3269 (pv_area::pv_area): Rename from make_pv_area.
3270 (pv_area::~pv_area): Rename from free_pv_area.
3271 (do_free_pv_area_cleanup, make_cleanup_free_pv_area): Remove.
3272 (clear_entries, find_entry, overlaps, store_would_trash, store)
3273 (fetch, find_reg, scan): Now member of pv_area.
3274 Remove "area" argument. Update.
3275 * msp430-tdep.c (check_for_saved, msp430_analyze_prologue):
3277 * mn10300-tdep.c (push_reg, check_for_saved)
3278 (mn10300_analyze_prologue): Update.
3279 * mep-tdep.c (is_arg_spill, check_for_saved)
3280 (mep_analyze_prologue): Update.
3281 * m32c-tdep.c (m32c_pv_push, m32c_srcdest_fetch)
3282 (m32c_srcdest_store, m32c_pv_enter, m32c_is_arg_spill)
3283 (m32c_is_struct_return, m32c_analyze_prologue): Update.
3284 * arm-tdep.c (thumb_analyze_prologue, arm_analyze_prologue):
3286 * arc-tdep.c (arc_is_in_prologue, arc_analyze_prologue): Update.
3287 * aarch64-tdep.c (aarch64_analyze_prologue): Update.
3289 2017-10-12 Simon Marchi <simon.marchi@ericsson.com>
3291 * linux-nat.h (linux_nat_set_delete_thread): New declaration.
3292 * linux-nat.c (linux_nat_delete_thread): New variable.
3293 (lwp_free): Invoke linux_nat_delete_thread if set.
3294 (linux_nat_set_delete_thread): New function.
3295 * aarch64-linux-nat.c (_initialize_aarch64_linux_nat): Assign
3296 thread delete callback.
3297 * arm-linux-nat.c (arm_linux_delete_thread): New function.
3298 (_initialize_arm_linux_nat): Assign thread delete callback.
3299 * s390-linux-nat.c (s390_delete_thread): New function.
3300 (_initialize_s390_nat): Assign thread delete callback.
3301 * x86-linux-nat.c (x86_linux_add_target): Likewise.
3302 * nat/aarch64-linux.c (aarch64_linux_delete_thread): New
3304 * nat/aarch64-linux.h (aarch64_linux_delete_thread): New
3306 * nat/x86-linux.c (x86_linux_delete_thread): New function.
3307 * nat/x86-linux.h (x86_linux_delete_thread): New declaration.
3309 2017-10-09 Tom Tromey <tom@tromey.com>
3311 * tui/tui-win.c (tui_set_win_height, parse_scrolling_args): Use
3313 * tui/tui-layout.c (enum tui_status): Use std::string.
3315 2017-10-11 Tom Tromey <tom@tromey.com>
3317 * gdbthread.h (thread_command): Constify.
3318 * inferior.h (detach_command): Constify.
3319 * top.h (set_history, show_history): Constify.
3320 * arm-tdep.c (set_arm_command, show_arm_command): Constify.
3321 * serial.c (serial_set_cmd, serial_show_cmd): Constify.
3322 * bsd-kvm.c (bsd_kvm_cmd): Constify.
3323 * printcmd.c (set_command): Constify.
3324 (non_const_set_command): New function.
3325 * dcache.c (set_dcache_command, show_dcache_command): Constify.
3326 * breakpoint.c (enable_command, disable_command, delete_command)
3327 (catch_command, tcatch_command, set_breakpoint_cmd)
3328 (show_breakpoint_cmd): Constify.
3329 * macrocmd.c (macro_command): Constify.
3330 * infcmd.c (unset_command, kill_command, detach_command)
3331 (info_proc_cmd): Constify.
3332 * i386-tdep.c (set_mpx_cmd, show_mpx_cmd): Constify.
3333 * auto-load.c (show_auto_load_cmd, set_auto_load_cmd)
3334 (info_auto_load_cmd): Constify.
3335 * target-descriptions.c (set_tdesc_cmd, show_tdesc_cmd)
3336 (unset_tdesc_cmd): Constify.
3337 * ada-lang.c (set_ada_command, show_ada_command)
3338 (maint_set_ada_cmd, maint_show_ada_cmd): Constify.
3339 * guile/guile.c (set_guile_command, show_guile_command)
3340 (info_guile_command): Constify.
3341 * tui/tui-win.c (tui_command, set_tui_cmd, show_tui_cmd):
3343 * skip.c (skip_command): Constify.
3344 * compile/compile.c (_initialize_compile): Constify.
3345 * dwarf2read.c (set_dwarf_cmd, show_dwarf_cmd): Constify.
3346 * btrace.c (maint_btrace_cmd, maint_btrace_set_cmd)
3347 (maint_btrace_show_cmd, maint_btrace_pt_set_cmd)
3348 (maint_btrace_pt_show_cmd): Constify.
3349 * remote.c (set_remote_cmd, show_remote_cmd, remote_command):
3351 * python/python.c (user_show_python, user_set_python): Constify.
3352 * mips-tdep.c (set_mips_command, show_mips_command)
3353 (set_mipsfpu_command): Constify.
3354 * record-btrace.c (cmd_record_btrace_start)
3355 (cmd_set_record_btrace, cmd_show_record_btrace)
3356 (cmd_set_record_btrace_bts, cmd_show_record_btrace_bts)
3357 (cmd_set_record_btrace_pt, cmd_show_record_btrace_pt): Constify.
3358 * rs6000-tdep.c (set_powerpc_command, show_powerpc_command):
3360 * symfile.c (overlay_command): Constify.
3361 * spu-tdep.c (set_spu_command, show_spu_command): Constify.
3362 * cli/cli-logging.c (set_logging_command, show_logging_command):
3364 * cli/cli-dump.c (dump_command, append_command)
3365 (srec_dump_command, ihex_dump_command, verilog_dump_command)
3366 (tekhex_dump_command, binary_dump_command)
3367 (binary_append_command): Constify.
3368 * cli/cli-decode.c (struct cmd_list_element): Change type of
3370 * cli/cli-cmds.c (info_command, show_command, set_debug)
3371 (show_debug): Constify.
3372 (show_command): Add non-const overload.
3373 * top.c (set_history, show_history): Constify.
3374 * sh-tdep.c (set_sh_command, show_sh_command): Constify.
3375 * command.h (add_prefix_cmd): Accept a cmd_const_cfunc_ftype.
3376 * target.c (target_command): Constify.
3377 * sparc64-tdep.c (info_adi_command): Constify.
3378 * record-full.c (cmd_record_full_start): Constify.
3379 (set_record_full_command): Constify. Fix typo.
3380 (show_record_full_command): Constify.
3381 * thread.c (thread_command, thread_apply_command): Constify.
3382 * memattr.c (dummy_cmd): Constify.
3383 * value.c (function_command): Constify.
3384 * frame.c (set_backtrace_cmd, show_backtrace_cmd): Constify.
3385 * probe.c (info_probes_command): Constify.
3386 * ser-tcp.c (set_tcp_cmd, show_tcp_cmd): Constify.
3387 * gnu-nat.c (set_task_cmd, show_task_cmd, set_thread_cmd)
3388 (show_thread_cmd, set_thread_default_cmd)
3389 (show_thread_default_cmd): Constify.
3390 (check_empty): Constify.
3391 * tracepoint.c (tfind_command): Constify.
3392 * cp-support.c (maint_cplus_command): Constify.
3393 * windows-tdep.c (info_w32_command): Constify.
3394 * record.c (cmd_record_start, set_record_command)
3395 (show_record_command, info_record_command, cmd_record_goto):
3397 * ravenscar-thread.c (set_ravenscar_command)
3398 (show_ravenscar_command): Constify.
3399 * utils.c (set_internal_problem_cmd, show_internal_problem_cmd):
3401 (add_internal_problem_command): Remove casts.
3402 * arc-tdep.c (maintenance_print_arc_command): Constify.
3403 * valprint.c (set_print, show_print, set_print_raw)
3404 (show_print_raw): Constify.
3405 * maint.c (maintenance_command, maintenance_info_command)
3406 (maintenance_print_command, maintenance_set_cmd)
3407 (maintenance_show_cmd, set_per_command_cmd)
3408 (show_per_command_cmd, maintenance_check_command): Constify.
3409 * language.c (set_check, show_check): Constify.
3410 * typeprint.c (show_print_type, set_print_type): Constify.
3411 * go32-nat.c (go32_info_dos_command): Constify.
3413 2017-10-11 Tom Tromey <tom@tromey.com>
3415 * breakpoint.c (prepare_re_set_context): Remove.
3416 (breakpoint_re_set_one): Update. Don't use cleanups.
3417 (breakpoint_re_set): Use scoped_restore, std::string, and
3418 scoped_restore_current_language.
3420 2017-10-11 Tom Tromey <tom@tromey.com>
3422 * breakpoint.c (commands_command_1): Use std::string.
3423 (cleanup_executing_breakpoints): Remove.
3424 (bpstat_do_actions_1): Use scoped_restore.
3425 (bpstat_check_watchpoint): Use std::string.
3426 (decode_static_tracepoint_spec): Likewise.
3427 (break_range_command): Likewise.
3428 (watch_command_1): Likewise.
3429 (compare_breakpoints): Change argument types.
3430 (clear_command): Use std::vector.
3431 (cleanup_executing_breakpoints): Remove.
3432 (update_global_location_list): Use unique_xmalloc_ptr.
3433 (strace_command): Remove unused declaration.
3435 2017-10-11 John Baldwin <jhb@FreeBSD.org>
3437 * Makefile.in (ALLDEPFILES): Add arm-fbsd-nat.c.
3438 * NEWS: Mention new FreeBSD/arm native configuration.
3439 * configure.host: Add arm*-*-freebsd*.
3440 * configure.nat: Likewise.
3441 * arm-fbsd-nat.c: New file.
3443 2017-10-11 John Baldwin <jhb@FreeBSD.org>
3445 * Makefile.in (ALL_TARGET_OBS): Add arm-fbsd-tdep.o.
3446 (ALLDEPFILES): Add arm-fbsd-tdep.c.
3447 * NEWS: Mention new FreeBSD/arm target.
3448 * configure.tgt: Add arm*-*-freebsd*.
3449 * arm-fbsd-tdep.c: New file.
3450 * arm-fbsd-tdep.h: New file.
3452 2017-10-11 Maciej W. Rozycki <macro@imgtec.com>
3454 * linux-tdep.c (linux_make_corefile_notes): Remove call to
3455 `gdbarch_elfcore_write_linux_prpsinfo'.
3456 * gdbarch.sh (elfcore_write_linux_prpsinfo): Remove architecture
3458 (elf_internal_linux_prpsinfo): Remove declaration.
3459 * gdbarch.h: Regenerate.
3460 * gdbarch.c: Regenerate.
3462 2017-10-11 Maciej W. Rozycki <macro@imgtec.com>
3464 * ppc-linux-tdep.c (ppc_linux_init_abi): Remove call to
3465 `set_gdbarch_elfcore_write_linux_prpsinfo'.
3467 2017-10-11 Pedro Alves <palves@redhat.com>
3469 * breakpoint.c (reattach_breakpoints): Delete.
3470 * breakpoint.h (reattach_breakpoints): Delete.
3472 2017-10-11 Simon Marchi <simon.marchi@ericsson.com>
3474 * symfile.c (registered_sym_fns): Make struct, not typedef.
3475 (DEF_VEC_O (registered_sym_fns)): Remove.
3476 (symtab_fns): Change type to std::vector.
3477 (add_symtab_fns): Adjust.
3478 (find_sym_fns): Adjust.
3480 2017-10-11 Anton Kolesov <Anton.Kolesov@synopsys.com>
3482 * arc-tdep.c (arc_gdbarch_init): Pass proper cpu value to disassembler.
3483 * arc-tdep.h (arc_arch_is_em): New function.
3484 (arc_arch_is_hs): Likewise.
3486 2017-10-11 Egeyar Bagcioglu <egeyar.bagcioglu@oracle.com>
3488 * macrotab.h (macro_lookup_inclusion): Remove unnecessary
3489 parentheses in the declaration.
3490 (macro_lookup_inclusion): Likewise.
3491 (macro_lookup_definition): Likewise.
3492 * p-lang.h (pascal_builtin_types): Likewise.
3493 * tui/tui-data.c (tui_win_list): Likewise.
3494 * tui/tui-data.h (tui_win_list): Likewise.
3495 * utils.h (make_cleanup_free_section_addr_info): Likewise.
3497 2017-10-11 Mark Rages <markrages@gmail.com>
3499 * target-memory.c (block_boundaries): Fix for block address not
3500 aligned on block size.
3502 2017-10-10 Pedro Alves <palves@redhat.com>
3503 Tom Tromey <tom@tromey.com>
3505 * breakpoint.c (struct captured_breakpoint_query_args)
3506 (do_captured_breakpoint_query, gdb_breakpoint_query): Delete.
3507 (print_breakpoint): New.
3508 * breakpoint.h (print_breakpoint): Declare.
3509 * common/common-exceptions.h (enum return_reason): Remove
3510 references to catch_exceptions.
3511 * exceptions.c (catch_exceptions, catch_exceptions_with_msg):
3513 * exceptions.h (catch_exceptions_ftype, catch_exceptions)
3514 (catch_exception_ftype, catch_exceptions_with_msg): Delete.
3516 * gdbthread.h (thread_select): Declare.
3517 * mi/mi-cmd-break.c: Don't include gdb.h.
3518 (breakpoint_notify): Use print_breakpoint.
3519 * mi/mi-cmd-catch.c: Don't include gdb.h.
3520 * mi/mi-interp.c: Don't include gdb.h.
3521 (mi_print_breakpoint_for_event): New.
3522 (mi_breakpoint_created, mi_breakpoint_modified): Use
3523 mi_print_breakpoint_for_event.
3524 * mi/mi-main.c: Don't include gdb.h.
3525 (mi_cmd_thread_select): Parse the global thread ID here. Use
3526 thread_select instead of gdb_thread_select.
3527 (mi_cmd_thread_list_ids): Output "thread-ids" tuple here instead
3528 of using gdb_list_thread_ids.
3529 * remote-fileio.c (do_remote_fileio_request): Change type. Reply
3531 (remote_fileio_request): Use TRY/CATCH instead of
3533 * symfile-mem.c (struct symbol_file_add_from_memory_args)
3534 (symbol_file_add_from_memory_wrapper): Delete.
3535 (add_vsyscall_page): Use TRY/CATCH instead of catch_exceptions.
3536 * thread.c: Don't include gdb.h.
3537 (do_captured_list_thread_ids, gdb_list_thread_ids): Delete.
3538 (thread_alive): Use thread_select.
3539 (do_captured_thread_select): Delete, parts salvaged as ...
3540 (thread_select): ... this new function.
3541 (gdb_thread_select): Delete.
3543 2017-10-10 Pedro Alves <palves@redhat.com>
3544 Tom Tromey <tom@tromey.com>
3546 * breakpoint.c (breakpoint_cond_eval): Change return type to bool
3548 (WP_DELETED, WP_VALUE_CHANGED, WP_VALUE_NOT_CHANGED, WP_IGNORE):
3549 No longer macros. Instead ...
3550 (enum wp_check_result): They're now values of this new
3552 (watchpoint_check): Change return type to wp_check_result and
3553 parameter type to bpstat.
3554 (bpstat_check_watchpoint): Use TRY/CATCH instead of catch_errors.
3555 (bpstat_check_breakpoint_conditions): Use TRY/CATCH instead of
3556 catch_errors. Reverse logic of watchpoint_check call.
3557 (breakpoint_re_set_one): Now returns void and takes a breakpoint
3558 pointer as parameter.
3559 (breakpoint_re_set): Use TRY/CATCH instead of catch_errors.
3560 * common/common-exceptions.c (throw_exception_sjlj): Update
3561 comments to avoid mentioning catch_errors.
3562 * exceptions.c (catch_errors): Delete.
3563 * exceptions.h: Update comments to avoid mentioning catch_errors.
3564 (catch_errors_ftype, catch_errors): Delete.
3565 * infrun.c (normal_stop): Use TRY/CATCH instead of catch_errors.
3566 (hook_stop_stub): Delete.
3567 (restore_selected_frame): Change return type to void, and
3568 parameter type to const frame_id &.
3569 (restore_infcall_control_state): Use TRY/CATCH instead of
3571 * main.c (captured_command_loop): Return void and remove
3572 parameter. Remove references to catch_errors.
3573 (captured_main): Use TRY/CATCH instead of catch_errors.
3574 * objc-lang.c (objc_submethod_helper_data)
3575 (find_objc_msgcall_submethod_helper): Delete.
3576 (find_objc_msgcall_submethod): Use TRY/CATCH instead of
3578 * record-full.c (record_full_message): Return void.
3579 (record_full_message_args, record_full_message_wrapper): Delete.
3580 (record_full_message_wrapper_safe): Return bool and use TRY/CATCH
3581 instead of catch_errors.
3582 * solib-aix.c (solib_aix_open_symbol_file_object): Change
3583 parameter type to int.
3584 * solib-darwin.c (open_symbol_file_object): Ditto.
3585 * solib-dsbt.c (open_symbol_file_object): Ditto.
3586 * solib-frv.c (open_symbol_file_object): Ditto.
3587 * solib-svr4.c (open_symbol_file_object): Ditto.
3588 * solib-target.c (solib_target_open_symbol_file_object): Ditto.
3589 * solib.c (update_solib_list): Use TRY/CATCH instead of
3591 * solist.h (struct target_so_ops) <open_symbol_file_object>:
3593 * symmisc.c (struct print_symbol_args): Remove.
3594 (dump_symtab_1): Use TRY/CATCH instead of catch_errors.
3595 (print_symbol): Change type.
3596 * windows-nat.c (handle_load_dll, handle_unload_dll): Return void
3597 and remove parameters.
3598 (catch_errors): New.
3599 (get_windows_debug_event): Adjust.
3601 2017-10-09 Tom Tromey <tom@tromey.com>
3603 * mi/mi-main.c (free_splay_tree): Remove.
3604 (list_available_thread_groups): Use splay_tree_up.
3605 * common/gdb_splay_tree.h: New file.
3607 2017-10-09 Tom Tromey <tom@tromey.com>
3609 * mi/mi-main.c (do_nothing): Remove.
3610 (list_available_thread_groups): Update.
3612 2017-10-09 Pedro Alves <palves@redhat.com>
3614 * infrun.c (handle_inferior_event_1) <TARGET_WAITKIND_EXECD>: Skip
3615 reading registers when switching context.
3617 2017-10-09 John Baldwin <jhb@FreeBSD.org>
3619 * fbsd-nat.c (fbsd_siginfo_size): Use gdbarch_long_bit.
3620 (fbsd_convert_siginfo): Likewise.
3621 * fbsd-tdep.c (fbsd_core_xfer_siginfo): Likewise.
3623 2017-10-09 Simon Marchi <simon.marchi@polymtl.ca>
3625 * configure.ac (try_guile_versions): Remove guile-2.2.
3626 * configure: Regenerate.
3628 2017-10-09 Tom Tromey <tom@tromey.com>
3630 * Makefile.in (COMPILE.post, POSTCOMPILE): Restore $(basename).
3631 (COMPILE.pre): Use $(CXX).
3633 2017-10-09 Pedro Alves <palves@redhat.com>
3635 * cp-support.c (cp_remove_params): Return a gdb::unique_xmalloc_ptr.
3637 (overload_list_add_symbol): Adjust to use gdb::unique_xmalloc_ptr.
3638 * cp-support.h (cp_remove_params): Now returns a
3639 gdb::unique_xmalloc_ptr.
3640 * dwarf2read.c (find_slot_in_mapped_hash): Now returns bool.
3641 Adjust to cp_remove_params returning a gdb::unique_xmalloc_ptr.
3642 * psymtab.c (psymtab_search_name): Adjust to cp_remove_params
3643 returning a gdb::unique_xmalloc_ptr.
3644 (lookup_partial_symbol): Adjust to use gdb::unique_xmalloc_ptr.
3645 * stack.c (find_frame_funname): Adjust to cp_remove_params
3646 returning a gdb::unique_xmalloc_ptr.
3648 2017-10-08 Tom Tromey <tom@tromey.com>
3650 * dwarf2read.c (dwarf2_get_dwz_file): Use
3651 gdb::unique_xmalloc_ptr.
3652 (find_slot_in_mapped_hash): Likewise.
3653 (dwarf2_physname): Likewise.
3654 (create_dwo_unit_in_dwp_v1): Use std::string.
3655 (create_dwo_unit_in_dwp_v2): Likewise.
3656 (lookup_dwo_cutu): Likewise.
3657 (inherit_abstract_dies): Use std::vector.
3658 (read_array_type): Likewise.
3659 (dwarf_decode_macros): Remove unused declaration.
3660 (unsigned_int_compar): Remove.
3661 (dwarf2_build_psymtabs_hard): Use scoped_restore.
3662 (psymtabs_addrmap_cleanup): Remove.
3664 2017-10-08 Tom Tromey <tom@tromey.com>
3666 * frame-unwind.c (frame_unwind_try_unwinder): Update.
3667 * frame.h (frame_cleanup_after_sniffer): Declare.
3668 (frame_prepare_for_sniffer): Return void.
3669 * frame.c (frame_cleanup_after_sniffer): No longer static. Change
3671 (frame_prepare_for_sniffer): Return void.
3673 2017-10-08 Tom Tromey <tom@tromey.com>
3675 * utils.h (make_cleanup_value_free): Remove.
3676 * utils.c (do_value_free, struct cleanup): Remove.
3677 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full) <DWARF_VALUE_STACK>:
3679 * value.h (struct value_deleter): New.
3680 (gdb_value_up): New typedef.
3682 2017-10-08 Tom Tromey <tom@tromey.com>
3684 * symtab.c (free_search_symbols, do_free_search_symbols_cleanup)
3685 (make_cleanup_free_search_symbols): Remove.
3686 (search_symbols): Return std::vector.
3687 (symbol_search::compare_search_syms): Now member of
3688 symbol_search. Change arguments.
3689 (sort_search_symbols_remove_dups): Change arguments. Rewrite.
3690 (symtab_symbol_info, rbreak_command): Update.
3691 * symtab.h (struct symbol_search) <next>: Remove.
3693 (symbol_search::operator<): New function.
3694 (symbol_search::operator==): New function.
3695 (search_symbols): Remove std::vector.
3696 (free_search_symbols, make_cleanup_free_search_symbols): Remove.
3697 (symbol_search::compare_search_syms): Declare.
3699 2017-10-06 Yao Qi <yao.qi@linaro.org>
3701 * Makefile.in (ALL_64_TARGET_OBS): Replace aarch64-insn.o with
3702 arch/aarch64-insn.o.
3704 * configure.tgt: Replace aarch64-insn.o with arch/aarch64-insn.o.
3706 2017-10-06 Yao Qi <yao.qi@linaro.org>
3708 * Makefile.in (ALL_TARGET_OBS): Replace arm.o, arm-get-next-pcs.o,
3709 and arm-linux.o with arch/arm.o, arch/arm-get-next-pcs.o and
3710 arch/arm-linux.o respectively.
3711 * configure.tgt: Likewise.
3713 2017-10-06 Yao Qi <yao.qi@linaro.org>
3715 * Makefile.in (ALL_TARGET_OBS): Rename i386.o to arch/i386.o.
3716 * configure.tgt (i386_tobjs): Replace i386.o with arch/i386.o.
3718 2017-10-06 Pedro Alves <palves@redhat.com>
3720 * windows-nat.c: Include <algorithm>.
3722 2017-10-06 Yao Qi <yao.qi@linaro.org>
3724 * configure.tgt (i386_tobjs): New variable.
3725 (amd64_tobjs): New variable.
3726 Set $cpu_obs and $os_obs.
3728 2017-10-06 Yao Qi <yao.qi@linaro.org>
3730 * Makefile.in (CONFIG_SRC_SUBDIR): New.
3731 (ALL_64_TARGET_OBS): Replace amd64.o with arch/amd64.o.
3732 (clean): Remove object files and dependency files.
3733 (distclean): Remove the directory.
3734 * configure.ac: Invoke AC_CONFIG_COMMANDS.
3735 * configure: Re-generated.
3736 * configure.tgt: Replace amd64.o with arch/amd64.o.
3738 2017-10-05 Jose E. Marchesi <jose.marchesi@oracle.com>
3741 * arm-tdep.c (arm_decode_misc_memhint_neon): Fix decoding of CPS
3744 2017-10-05 Pedro Alves <palves@redhat.com>
3746 * linux-nat.c (linux_child_follow_fork): When following the parent
3747 and detaching the child, consult the parent thread's architecture
3748 instead of the child's.
3750 2017-10-05 Ulrich Weigand <uweigand@de.ibm.com>
3752 * ax.h: Do not include "doublest.h".
3753 (union agent_val): Remove.
3755 2017-10-05 Ulrich Weigand <uweigand@de.ibm.com>
3757 * dfp.h (MAX_DECIMAL_STRING): Move to dfp.c.
3758 (decimal_to_string): Return std::string object.
3759 (decimal_from_string): Accept std::string object. Return bool.
3760 (decimal_from_integral, decimal_from_doublest): Remove.
3761 (decimal_from_longest): Add prototype.
3762 (decimal_from_ulongest): Likewise.
3763 (decimal_to_longest): Likewise.
3764 (decimal_from_doublest): Likewise.
3765 * dfp.c: Do not include "gdbtypes.h" or "value.h".
3766 (MAX_DECIMAL_STRING): Move here.
3767 (decimal_to_string): Return std::string object.
3768 (decimal_from_string): Accept std::string object. Return bool.
3769 (decimal_from_integral): Remove, replace by ...
3770 (decimal_from_longest, decimal_from_ulongest): ... these new functions.
3771 (decimal_to_longest): New function.
3772 (decimal_from_floating): Remove, replace by ...
3773 (decimal_from_doublest): ... this new function.
3774 (decimal_to_doublest): Update to new decimal_to_string interface.
3776 * value.c (unpack_long): Use decimal_to_longest.
3777 * valops.c (value_cast): Use decimal_from_doublest instead of
3778 decimal_from_floating. Use decimal_from_[u]longest isntead of
3779 decimal_from_integral.
3780 * valarith.c (value_args_as_decimal): Likewise.
3781 * valprint.c (print_decimal_floating): Update to new
3782 decimal_to_string interface.
3783 * printcmd.c (printf_decfloat): Likewise.
3784 * c-exp.y (parse_number): Update to new decimal_from_string interface.
3786 2017-10-05 Ulrich Weigand <uweigand@de.ibm.com>
3788 * doublest.h: Do not include "floatformat.h". Remove stale comments.
3789 * gdbtypes.c: Include "floatformat.h".
3790 * value.c: Likewise.
3791 * m68k-tdep.c: Likewise.
3793 * findvar.c: Do not include "floatformat.h".
3794 * amd64-darwin-tdep.c: Likewise.
3795 * arm-linux-tdep.c: Likewise.
3796 * i386-darwin-tdep.c: Likewise.
3797 * i387-tdep.c: Likewise.
3798 * m68k-linux-tdep.c: Likewise.
3799 * mep-tdep.c: Likewise.
3800 * mips-tdep.c: Likewise.
3801 * nios2-tdep.c: Likewise.
3802 * s390-linux-tdep.c: Likewise.
3803 * sparc-obsd-tdep.c: Likewise.
3804 * sparc-tdep.c: Likewise.
3805 * sparc64-tdep.c: Likewise.
3806 * spu-tdep.c: Likewise.
3807 * tic6x-tdep.c: Likewise.
3808 * tilegx-tdep.c: Likewise.
3809 * vax-tdep.c: Likewise.
3810 * xstormy16-tdep.c: Likewise.
3811 * xtensa-tdep.c: Likewise.
3813 * top.c: Do not include "doublest.h".
3814 * aarch64-tdep.c: Likewise.
3815 * alpha-tdep.c: Likewise.
3816 * arm-linux-tdep.c: Likewise.
3817 * m68k-linux-tdep.c: Likewise.
3818 * tilegx-tdep.c: Likewise.
3819 * xstormy16-tdep.c: Likewise.
3821 2017-10-05 John Baldwin <jhb@FreeBSD.org>
3823 * mips-fbsd-tdep.c (MIPS_INST_ADDIU_A0_SP_N32): Define.
3824 (mipsn32_fbsd_sigframe): Define.
3825 (mips_fbsd_init_abi): Install mipsn32_fbsd_sigframe unwinder
3826 for FreeBSD/mipsn32.
3828 2017-10-05 John Baldwin <jhb@FreeBSD.org>
3830 * fbsd-tdep.c (fbsd_print_auxv_entry): Handle AT_EHDRFLAGS and
3833 2017-10-05 Tristan Gingold <tgingold@free.fr>
3835 * MAINTAINERS (Misc): Update my email address.
3837 2017-10-04 Pedro Alves <palves@redhat.com>
3839 * remote.c (get_remote_arch_state): New 'gdbarch' parameter. Use
3840 it instead of target_gdbarch.
3841 (get_remote_state, get_remote_packet_size): Adjust
3842 get_remote_arch_state calls, passing down target_gdbarch
3844 (packet_reg_from_regnum, packet_reg_from_pnum): New parameter
3845 'gdbarch' and use it instead of target_gdbarch.
3846 (get_memory_packet_size): Adjust get_remote_arch_state calls,
3847 passing down target_gdbarch explicitly.
3848 (struct stop_reply) <arch>: New field.
3849 (remote_parse_stop_reply): Use the stopped thread's architecture,
3850 not the current inferior's. Save the architecture in the
3852 (process_stop_reply): Use the stop reply's architecture.
3853 (process_g_packet, remote_fetch_registers)
3854 (remote_prepare_to_store, store_registers_using_G)
3855 (remote_store_registers): Adjust get_remote_arch_state calls,
3856 using the regcache's architecture.
3857 (remote_get_trace_status): Adjust get_remote_arch_state calls,
3858 passing down target_gdbarch explicitly.
3859 * spu-multiarch.c (spu_thread_architecture): Defer to the target
3860 beneath instead of calling target_gdbarch.
3861 * target.c (default_thread_architecture): Use the specified
3862 inferior's architecture, instead of the current inferior's
3863 architecture (via target_gdbarch).
3865 2017-10-04 Pedro Alves <palves@redhat.com>
3867 * regcache.c (get_thread_arch_regcache): Remove null_ptid special
3869 (regcache_print): Handle !target_has_registers here instead.
3871 2017-10-04 Pedro Alves <palves@redhat.com>
3873 * frame.c (create_test_frame): Delete.
3874 * frame.h (create_test_frame): Delete.
3875 * gdbarch-selftests.c: Include gdbthread.h and target.h.
3876 (class regcache_test): Delete.
3877 (test_target_has_registers, test_target_has_stack)
3878 (test_target_has_memory, test_target_prepare_to_store)
3879 (test_target_store_registers): New functions.
3880 (test_target_ops): New class.
3881 (register_to_value_test): Error out if there's already a
3882 process_stratum (or higher) target pushed. Create a fuller mock
3883 environment, with mock target_ops, inferior, address space, thread
3885 * progspace.c (struct address_space): Move to ...
3886 * progspace.h (struct address_space): ... here.
3887 * regcache.h (regcache::~regcache, regcache::raw_write)
3888 [GDB_SELF_TEST]: No longer virtual.
3890 2017-10-04 Simon Marchi <simon.marchi@ericsson.com>
3892 * mi/mi-main.c (list_available_thread_groups): Reverse filter logic.
3894 2017-10-04 Pedro Alves <palves@redhat.com>
3896 * guile/scm-breakpoint.c (gdbscm_breakpoint_commands): Move code
3897 out of 'between TRY and CATCH'.
3899 2017-10-04 Pedro Alves <palves@redhat.com>
3901 * cli/cli-cmds.c (complete_command): Add missing END_CATCH.
3902 * common/common-exceptions.h (TRY): Open an outermost scope.
3903 Expand intro comment.
3905 (END_CATCH): Close the outermost scope.
3906 * completer.c (complete_line_internal): Add missing END_CATCH.
3908 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
3910 * NEWS (Changes since GDB 8.0): Add entry about new
3911 'set-cwd-on-gdbserver' feature.
3912 (New remote packets): Add entry for QSetWorkingDir.
3913 * common/common-inferior.h (set_inferior_cwd): New prototype.
3914 * infcmd.c (set_inferior_cwd): Remove "static".
3915 (show_cwd_command): Expand text to include remote debugging.
3916 * remote.c: Add PACKET_QSetWorkingDir.
3917 (remote_protocol_features) <QSetWorkingDir>: New entry for
3918 PACKET_QSetWorkingDir.
3919 (extended_remote_set_inferior_cwd): New function.
3920 (extended_remote_create_inferior): Call
3921 "extended_remote_set_inferior_cwd".
3922 (_initialize_remote): Call "add_packet_config_cmd" for
3925 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
3927 * NEWS (New commands): Mention "set/show cwd".
3928 * cli/cli-cmds.c (_initialize_cli_cmds): Mention "set cwd" on
3929 "cd" command's help text.
3930 * common/common-inferior.h (get_inferior_cwd): New prototype.
3931 * infcmd.c (inferior_cwd_scratch): New global variable.
3932 (set_inferior_cwd): New function.
3933 (get_inferior_cwd): Likewise.
3934 (set_cwd_command): Likewise.
3935 (show_cwd_command): Likewise.
3936 (_initialize_infcmd): Add "set/show cwd" commands.
3937 * inferior.h (class inferior) <cwd>: New field.
3938 * nat/fork-inferior.c: Include "gdb_tilde_expand.h".
3939 (fork_inferior): Change inferior's cwd before its execution.
3940 * windows-nat.c (windows_create_inferior): Pass inferior's cwd
3943 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
3945 * Makefile.in (SFILES): Add gdb_tilde_expand.c.
3946 (HFILES_NO_SRCDIR): Add gdb_tilde_expand.h.
3947 (COMMON_OBS): Add gdb_tilde_expand.o.
3948 * common/gdb_tilde_expand.c: New file.
3949 * common/gdb_tilde_expand.h: Likewise.
3951 2017-10-03 Maciej W. Rozycki <macro@imgtec.com>
3953 * gdbarch.sh (objfile): Remove duplicate declaration.
3954 * gdbarch.h: Regenerate.
3956 2017-10-03 Tom Tromey <tom@tromey.com>
3958 * utils.c (internal_vproblem): Use string_vprintf.
3960 2017-10-03 Tom Tromey <tom@tromey.com>
3962 * printcmd.c (info_symbol_command): Use std::string.
3964 2017-10-03 Tom Tromey <tom@tromey.com>
3966 * top.c (gdb_safe_append_history): Use std::string.
3968 2017-10-03 Tom Tromey <tom@tromey.com>
3970 * event-top.c (stdin_event_handler): Update.
3971 * main.c (captured_main_1): Update.
3972 * top.h (make_delete_ui_cleanup): Remove.
3973 (struct ui): Add constructor and destructor.
3974 (new_ui, delete_ui): Remove.
3975 * top.c (make_delete_ui_cleanup): Remove.
3976 (new_ui_command): Use std::unique_ptr.
3977 (delete_ui_cleanup): Remove.
3978 (ui::ui): Rename from new_ui. Update.
3980 (ui::~ui): Rename from delete_ui. Update.
3982 2017-10-03 Tom Tromey <tom@tromey.com>
3984 * symfile.c (load_progress): Use gdb::byte_vector.
3986 2017-10-03 Tom Tromey <tom@tromey.com>
3988 * mi/mi-main.c (mi_cmd_trace_frame_collected): Remove unused
3990 * printcmd.c (x_command): Remove unused declaration.
3991 * symfile.c (symbol_file_command): Remove unused declaration.
3993 2017-10-03 Tom Tromey <tom@tromey.com>
3995 * utils.c (internal_vproblem): Use std::string.
3996 (defaulted_query): Likewise.
3998 2017-10-03 Tom Tromey <tom@tromey.com>
4000 * guile/scm-ports.c (ioscm_with_output_to_port_worker): Update.
4001 * top.c (execute_command_to_string): Update.
4002 * utils.c (make_cleanup_restore_page_info): Remove.
4003 (do_restore_page_info_cleanup): Remove.
4004 (set_batch_flag_and_restore_page_info):
4006 (make_cleanup_restore_page_info): Remove.
4007 (set_batch_flag_and_make_cleanup_restore_page_info): Remove.
4008 (~set_batch_flag_and_restore_page_info): New
4009 (make_cleanup_restore_uinteger): Remove.
4010 (make_cleanup_restore_integer): Remove.
4011 (struct restore_integer_closure): Remove.
4012 (restore_integer): Remove.
4013 * utils.h (struct set_batch_flag_and_restore_page_info): New
4015 (set_batch_flag_and_make_cleanup_restore_page_info): Remove.
4016 (make_cleanup_restore_page_info): Remove.
4017 (make_cleanup_restore_uinteger) Remove.
4018 (make_cleanup_restore_integer) Remove.
4020 2017-10-03 Tom Tromey <tom@tromey.com>
4022 * record-full.h (record_full_gdb_operation_disable_set): Return
4023 scoped_restore_tmpl<int>.
4024 * infrun.c (adjust_pc_after_break): Update.
4025 (handle_signal_stop): Update.
4026 * record-full.c (record_full_gdb_operation_disable_set): Return
4027 scoped_restore_tmpl<int>.
4028 (record_full_wait_1, record_full_insert_breakpoint)
4029 (record_full_remove_breakpoint, record_full_save)
4030 (record_full_goto_insn): Update.
4032 2017-10-02 Tom Tromey <tom@tromey.com>
4035 * rust-lang.c (rust_val_print_str): New function.
4036 (val_print_struct): Call it.
4037 (rust_subscript): Preserve name of slice type.
4039 2017-10-02 Tom Tromey <tom@tromey.com>
4041 * rust-lang.c (rust_subscript): Handle slices in
4042 EVAL_AVOID_SIDE_EFFECTS case.
4044 2017-10-02 Tom Tromey <tom@tromey.com>
4046 * rust-lang.c (rust_slice_type_p): Recognize &str as a slice type.
4048 2017-10-02 Tom Tromey <tom@tromey.com>
4050 * rust-lang.h (rust_slice_type): Add "extern".
4052 2017-10-02 Tom Tromey <tom@tromey.com>
4053 Pedro Alves <palves@redhat.com>
4055 * ada-lang.h (ada_exc_info::operator<): Make const.
4056 (ada_exc_info::operator==): Make const.
4057 * ada-lang.c (ada_exc_info::operator<, ada_exc_info::operator==):
4060 2017-09-29 Tom Tromey <tom@tromey.com>
4062 * target.c (read_whatever_is_readable): Change type of "result".
4064 (free_memory_read_result_vector): Remove.
4065 (read_memory_robust): Change return type. Update.
4066 * mi/mi-main.c (mi_cmd_data_read_memory_bytes): Update. Use
4067 bin2hex, std::string.
4068 * target.h (memory_read_result_s): Remove typedef.
4069 (free_memory_read_result_vector): Remove.
4070 (read_memory_robust): Return std::vector.
4072 2017-09-29 Tom Tromey <tom@tromey.com>
4074 * mi/mi-main.c (captured_mi_execute_command): Use scope_restore.
4076 2017-09-29 Tom Tromey <tom@tromey.com>
4078 * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions): Update.
4079 * ada-lang.h (struct ada_exc_info): Remove typedef. Declare
4080 operator< and operator==.
4081 (ada_exceptions_list): Return a std::vector.
4082 * ada-lang.c (ada_exc_info::operator<): Rename from
4083 compare_ada_exception_info.
4084 (ada_exc_info::operator==): New.
4085 (sort_remove_dups_ada_exceptions_list): Change type of
4087 (ada_add_standard_exceptions, ada_add_exceptions_from_frame)
4088 (ada_add_global_exceptions): Likewise.
4089 (ada_exceptions_list_1): Return a std::vector.
4090 (ada_exceptions_list): Likewise.
4092 2017-09-29 Tom Tromey <tom@tromey.com>
4094 * mi/mi-main.c (struct print_one_inferior_data) <inferiors>: Now a
4096 (print_one_inferior): Update.
4097 (free_vector_of_ints): Remove.
4098 (list_available_thread_groups): Change "ids" to std::set.
4099 (mi_cmd_list_thread_groups): Update.
4100 (struct collect_cores_data) <core>: Now a std::set.
4101 (collect_cores): Update.
4103 (print_one_inferior): Update.
4105 2017-09-29 Tom Tromey <tom@tromey.com>
4107 * mi/mi-main.c (mi_execute_cli_command): Use std::string.
4108 (mi_execute_async_cli_command): Likewise.
4109 (mi_cmd_trace_frame_collected): Use field_fmt.
4111 2017-09-29 Tom Tromey <tom@tromey.com>
4113 * mi/mi-main.c (mi_cmd_data_write_memory_bytes): Use
4116 2017-09-29 Tom Tromey <tom@tromey.com>
4118 * mi/mi-parse.c (mi_parse): Remove unused declaration.
4120 2017-09-29 Tom Tromey <tom@tromey.com>
4122 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Don't copy "oarg".
4124 2017-09-29 Tom Tromey <tom@tromey.com>
4126 * varobj.h (varobj_gen_name): Return std::string.
4127 * varobj.c (varobj_gen_name): Return std::string.
4128 * mi/mi-cmd-var.c (mi_cmd_var_create): Use std::string.
4129 (mi_cmd_var_delete): Don't copy "name".
4131 2017-09-29 Tom Tromey <tom@tromey.com>
4133 * mi/mi-cmd-break.c (mi_argv_to_format): Return std::string.
4134 (mi_cmd_break_insert_1): Update.
4136 2017-09-29 Tom Tromey <tom@tromey.com>
4138 * target.h (make_scoped_defer_target_commit_resume): Update.
4139 * target.c (make_scoped_defer_target_commit_resume): Rename from
4140 make_cleanup_defer_target_commit_resume. Return a
4142 * infrun.c (proceed): Use make_scoped_defer_target_commit_resume.
4144 2017-09-29 Tom Tromey <tom@tromey.com>
4146 * main.c (captured_main_1): Remove unused declaration.
4147 * spu-multiarch.c (parse_spufs_run): Remove unused declaration.
4149 2017-09-29 Tom Tromey <tom@tromey.com>
4151 * symtab.c (search_symbols): Remove unused outer cleanup.
4152 (make_source_files_completion_list): Remove unused declaration.
4154 2017-09-29 Tom Tromey <tom@tromey.com>
4156 * mt-tdep.c (mt_push_dummy_call): Use gdb::byte_vector.
4158 2017-09-29 Tom Tromey <tom@tromey.com>
4160 * xstormy16-tdep.c (xstormy16_push_dummy_call): Use
4163 2017-09-29 Tom Tromey <tom@tromey.com>
4165 * complaints.c (vcomplaint): Use std::string.
4167 2017-09-29 Tom Tromey <tom@tromey.com>
4169 * tracepoint.c (trace_variable_command): Use std::string.
4170 (encode_actions_1): Remove unused declarations.
4171 (create_tsv_from_upload): Use std::string.
4173 2017-09-29 Tom Tromey <tom@tromey.com>
4175 * cp-support.c (gdb_demangle): Use std::string.
4177 2017-09-29 Tom Tromey <tom@tromey.com>
4179 * stack.c (parse_frame_specification): Use std::string
4180 (info_frame_command): Use gdb::unique_xmalloc_ptr.
4182 2017-09-29 Tom Tromey <tom@tromey.com>
4184 * tilegx-tdep.c (tilegx_push_dummy_call): Use gdb::byte_vector.
4186 2017-09-29 Tom Tromey <tom@tromey.com>
4188 * utils.c (vfprintf_maybe_filtered): Use std::string.
4189 (vfprintf_unfiltered): Likewise.
4191 2017-09-29 Tom Tromey <tom@tromey.com>
4193 * event-top.c (top_level_prompt): Return std::string.
4194 (display_gdb_prompt): Update.
4196 2017-09-29 Tom Tromey <tom@tromey.com>
4198 * unittests/common-utils-selftests.c (format): New function.
4199 (string_vprintf_tests): New function.
4200 (_initialize_common_utils_selftests): Register new tests.
4201 * common/common-utils.c (string_vprintf): New function.
4202 * common/common-utils.h (string_vprintf): Declare.
4204 2017-09-29 Pedro Alves <palves@redhat.com>
4206 * common/rsp-low.c (unpack_varlen_hex): Constify.
4207 * common/rsp-low.h (unpack_varlen_hex): Constify.
4208 * linux-nat.c (linux_child_static_tracepoint_markers_by_strid):
4210 * remote.c (remote_set_permissions, read_ptid)
4211 (remote_current_thread, remote_get_threads_with_qthreadinfo)
4212 (remote_static_tracepoint_marker_at)
4213 (remote_static_tracepoint_markers_by_strid)
4214 (stop_reply_extract_thread, remote_parse_stop_reply): Constify.
4215 * tracepoint.c (parse_trace_status, parse_tracepoint_status)
4216 (parse_tracepoint_definition, parse_tsv_definition)
4217 (parse_static_tracepoint_marker_definition): Constify.
4218 * tracepoint.h (parse_static_tracepoint_marker_definition)
4219 (parse_trace_status, parse_tracepoint_status)
4220 (parse_tracepoint_definition, parse_tsv_definition): Constify.
4222 2017-09-29 Pedro Alves <palves@redhat.com>
4224 * remote.c (target_buf, target_buf_size): Delete.
4225 (remote_get_noisy_reply): Remove buf_p and sizeof_buf parameters.
4226 Use the connection's packet buffer instead.
4227 All callers adjusted.
4228 (_initialize_remote): Remove references to target_buf and
4231 2017-09-28 Pedro Alves <palves@redhat.com>
4233 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
4234 unittests/common-utils-selftests.c.
4235 (SUBDIR_UNITTESTS_OBS): Add common-utils-selftests.o.
4236 (COMMON_OBS): Remove utils-selftests.o.
4237 * utils-selftests.c: Move to ...
4238 * unittests/common-utils-selftests.c: ... here and rename self
4239 test to "string_printf".
4241 2017-09-28 Alexander Shaposhnikov <alexander.v.shaposhnikov@gmail.com> (tiny patch)
4243 * dwarf2read.c (open_and_init_dwp_file): Protect against dwp_file
4244 having NULL cus or tus.
4246 2017-09-27 Ulrich Weigand <uweigand@de.ibm.com>
4248 * arm-tdep.c: (convert_from_extended): Remove.
4249 (convert_to_extended): Likewise.
4250 (arm_extract_return_value): Use convert_typed_floating.
4251 (arm_store_return_value): Likewise.
4253 * sh-tdep.h (struct gdbarch_tdep): Add sh_littlebyte_bigword_type.
4254 * sh-tdep.c: Do not include "floatformat.h".
4255 (sh_littlebyte_bigword_type): New function.
4256 (sh_register_convert_to_virtual): Use convert_typed_floating.
4257 (sh_register_convert_to_raw): Likewise.
4258 * sh64-tdep.c: (struct gdbarch_tdep): Add sh_littlebyte_bigword_type.
4259 (sh64_littlebyte_bigword_type): New function.
4260 (sh64_extract_return_value): Use convert_typed_floating.
4261 (sh64_register_convert_to_virtual): Likewise.
4262 (sh64_register_convert_to_raw): Likewise.
4264 2017-09-27 Ulrich Weigand <uweigand@de.ibm.com>
4266 * doublest.h (floatformat_from_type): Move to gdbtypes.h.
4267 * doublest.c (floatformat_from_type): Move to gdbtypes.c.
4269 * gdbtypes.h (union type_specific): Make field floatformat hold
4270 just a single struct floatformat, not an array.
4271 (floatformat_from_type): Move here.
4272 * gdbtypes.c (floatformat_from_type): Move here. Update to
4273 changed TYPE_FLOATFORMAT definition.
4274 (verify_floatformat): Update to changed TYPE_FLOATFORMAT.
4275 (recursive_dump_type): Likewise.
4276 (init_float_type): Install correct floatformat for byte order.
4277 (arch_float_type): Likewise.
4279 2017-09-27 Ulrich Weigand <uweigand@de.ibm.com>
4281 * gdbtypes.c (init_type): Change incoming argument from
4282 length-in-bytes to length-in-bits. Assert length is a
4283 multiple of TARGET_CHAR_BITS.
4284 (arch_type, arch_flags_type): Likewise.
4285 (init_integer_type): Update call to init_type.
4286 (init_character_type): Likewise.
4287 (init_boolean_type): Likewise.
4288 (init_float_type): Likewise.
4289 (init_decfloat_type): Likewise.
4290 (init_complex_type): Likewise.
4291 (init_pointer_type): Likewise.
4292 (objfile_type): Likewise.
4293 (arch_integer_type): Update call to arch_type.
4294 (arch_character_type): Likewise.
4295 (arch_boolean_type): Likewise.
4296 (arch_float_type): Likewise.
4297 (arch_decfloat_type): Likewise.
4298 (arch_complex_type): Likewise.
4299 (arch_pointer_type): Likewise.
4300 (gdbtypes_post_init): Likewise.
4302 * dwarf2read.c (dwarf2_init_float_type): Update call to init_type.
4303 (read_base_type): Likewise.
4304 * mdebugread.c (basic_type): Likewise.
4305 * stabsread.c (dbx_init_float_type): Likewise.
4306 (rs6000_builtin_type): Likewise.
4307 (read_range_type): Likewise. Also, fix call to init_integer_type
4308 with erroneous length argument.
4310 * ada-lang.c (ada_language_arch_info): Update call to arch_type.
4311 * d-lang.c (build_d_types): Likewise.
4312 * f-lang.c (build_fortran_types): Likewise.
4313 * go-lang.c (build_go_types): Likewise.
4314 * opencl-lang.c (build_opencl_types): Likewise.
4315 * jit.c (finalize_symtab): Likewise.
4316 * gnu-v3-abi.c (build_gdb_vtable_type): Likewise.
4317 (build_std_type_info_type): Likewise.
4318 * target-descriptions.c (tdesc_gdb_type): Likewise. Also,
4319 update call to arch_flags_type.
4321 * linux-tdep.c (linux_get_siginfo_type_with_fields): Update call to
4323 * fbsd-tdep.c (fbsd_get_siginfo_type): Likewise.
4324 * windows-tdep.c (windows_get_tlb_type): Likewise.
4326 * avr-tdep.c (avr_gdbarch_init): Update call to arch_type.
4327 * ft32-tdep.c (ft32_gdbarch_init): Likewise.
4328 * m32c-tdep.c (make_types): Likewise.
4329 * rl78-tdep.c (rl78_gdbarch_init): Likewise.
4330 (rl78_psw_type): Update call to arch_flags_type.
4331 * m68k-tdep.c (m68k_ps_type): Update call to arch_flags_type.
4332 * rx-tdep.c (rx_psw_type): Likewise.
4333 (rx_fpsw_type): Likewise.
4334 * sparc-tdep.c (sparc_psr_type): Likewise.
4335 (sparc_fsr_type): Likewise.
4336 * sparc64-tdep.c (sparc64_pstate_type): Likewise.
4337 (sparc64_ccr_type): Likewise.
4338 (sparc64_fsr_type): Likewise.
4339 (sparc64_fprs_type): Likewise.
4341 2017-09-27 Tom Tromey <tom@tromey.com>
4343 * findcmd.c (find_command): Constify.
4345 2017-09-27 Tom Tromey <tom@tromey.com>
4347 * ada-tasks.c (task_command_1, task_command): Constify.
4349 2017-09-27 Tom Tromey <tom@tromey.com>
4351 * symtab.c (maintenance_print_symbol_cache)
4352 (maintenance_flush_symbol_cache)
4353 (maintenance_print_symbol_cache_statistics): Constify.
4355 2017-09-27 Tom Tromey <tom@tromey.com>
4357 * inferior.c (detach_inferior_command, kill_inferior_command)
4358 (inferior_command): Constify.
4360 2017-09-27 Tom Tromey <tom@tromey.com>
4362 * regcache.c (regcache_print, maintenance_print_registers)
4363 (maintenance_print_raw_registers)
4364 (maintenance_print_cooked_registers)
4365 (maintenance_print_register_groups)
4366 (maintenance_print_remote_registers): Constify.
4368 2017-09-27 Tom Tromey <tom@tromey.com>
4370 * printcmd.c (map_display_numbers, undisplay_command)
4371 (enable_disable_display_command, enable_display_command)
4372 (disable_display_command): Constify.
4374 2017-09-27 Tom Tromey <tom@tromey.com>
4376 * breakpoint.h (delete_command): Don't declare.
4377 * breakpoint.c (delete_command, enable_once_command)
4378 (enable_count_command, enable_delete_command, breakpoint_1)
4379 (maintenance_info_breakpoints, stopin_command, stopat_command)
4380 (delete_command, delete_trace_command, save_breakpoints)
4381 (save_breakpoints_command, save_tracepoints_command): Constify.
4383 2017-09-27 Tom Tromey <tom@tromey.com>
4385 * macrocmd.c (macro_expand_command, macro_expand_once_command)
4386 (skip_ws, extract_identifier, macro_define_command)
4387 (macro_undef_command, macro_list_command): Constify.
4389 2017-09-27 Tom Tromey <tom@tromey.com>
4391 * infcmd.c (environment_info, set_environment_command)
4392 (unset_environment_command, path_info, info_proc_cmd_1)
4393 (info_proc_cmd_mappings, info_proc_cmd_stat)
4394 (info_proc_cmd_status, info_proc_cmd_cwd, info_proc_cmd_cmdline)
4395 (info_proc_cmd_exe, info_proc_cmd_all): Constify.
4397 2017-09-27 Tom Tromey <tom@tromey.com>
4399 * i386-tdep.c (i386_mpx_info_bounds, i386_mpx_set_bounds):
4402 2017-09-27 Tom Tromey <tom@tromey.com>
4404 * symfile-mem.c (add_symbol_file_from_memory_command): Constify.
4406 2017-09-27 Tom Tromey <tom@tromey.com>
4408 * demangle.c (demangle_command): Constify.
4410 2017-09-27 Tom Tromey <tom@tromey.com>
4412 * progspace.c (maintenance_info_program_spaces_command):
4415 2017-09-27 Tom Tromey <tom@tromey.com>
4417 * compile/compile.c (check_raw_argument, compile_file_command)
4418 (compile_code_command, compile_print_command): Constify.
4420 2017-09-27 Tom Tromey <tom@tromey.com>
4422 * reggroups.c (maintenance_print_reggroups): Constify.
4424 2017-09-27 Tom Tromey <tom@tromey.com>
4426 * dwarf2read.c (save_gdb_index_command): Constify.
4428 2017-09-27 Tom Tromey <tom@tromey.com>
4430 * stap-probe.c (info_probes_stap_command): Constify.
4432 2017-09-27 Tom Tromey <tom@tromey.com>
4434 * fork-child.c (unset_exec_wrapper_command): Constify.
4436 2017-09-27 Tom Tromey <tom@tromey.com>
4438 * btrace.c (get_uint, get_context_size, no_chunk)
4439 (maint_btrace_packet_history_cmd)
4440 (maint_btrace_clear_packet_history_cmd, maint_btrace_clear_cmd)
4441 (maint_info_btrace_cmd): Constify.
4443 2017-09-27 Tom Tromey <tom@tromey.com>
4445 * reverse.c (delete_bookmark_command): Constify.
4447 2017-09-27 Tom Tromey <tom@tromey.com>
4449 * remote.c (set_memory_packet_size)
4450 (set_memory_write_packet_size, show_memory_write_packet_size)
4451 (set_memory_read_packet_size, show_memory_read_packet_size)
4452 (compare_sections_command, packet_command, remote_put_command)
4453 (remote_get_command, remote_delete_command): Constify.
4455 2017-09-27 Tom Tromey <tom@tromey.com>
4457 * mips-tdep.c (show_mipsfpu_command, set_mipsfpu_single_command)
4458 (set_mipsfpu_double_command, set_mipsfpu_none_command)
4459 (set_mipsfpu_auto_command): Constify.
4461 2017-09-27 Tom Tromey <tom@tromey.com>
4463 * cli/cli-cmds.h (cd_command): Constify.
4464 * cli/cli-cmds.c (cd_command): Constify.
4466 2017-09-27 Tom Tromey <tom@tromey.com>
4468 * thread.c (thread_name_command, thread_find_command): Constify.
4470 2017-09-27 Tom Tromey <tom@tromey.com>
4472 * probe.c (enable_probes_command, disable_probes_command):
4475 2017-09-27 Tom Tromey <tom@tromey.com>
4477 * symfile.c (symbol_file_command): Constify.
4478 * gdbcore.h (deprecated_file_changed_hook): Constify.
4479 * exec.c (deprecated_file_changed_hook, exec_file_command)
4480 (file_command): Constify.
4481 * defs.h (symbol_file_command): Constify.
4483 2017-09-27 Tom Tromey <tom@tromey.com>
4485 * remote-fileio.c (set_system_call_allowed)
4486 (show_system_call_allowed): Constify.
4488 2017-09-27 Tom Tromey <tom@tromey.com>
4490 * tracepoint.c (delete_trace_variable_command)
4491 (tfind_end_command, tfind_start_command, tfind_pc_command)
4492 (tfind_tracepoint_command, tfind_line_command)
4493 (tfind_range_command, tfind_outside_command): Constify.
4495 2017-09-27 Tom Tromey <tom@tromey.com>
4497 * ax-gdb.c (maint_agent_printf_command, agent_command)
4498 (agent_eval_command): Constify.
4500 2017-09-27 Tom Tromey <tom@tromey.com>
4502 * tracepoint.c (info_scope_command): Constify.
4503 * python/python.c (gdbpy_decode_line): Constify.
4504 * python/py-breakpoint.c (bppy_init): Constify.
4505 * mi/mi-cmd-break.c (mi_cmd_break_insert_1): Constify.
4506 * location.h: (new_linespec_location)
4507 (string_to_event_location_basic, string_to_event_location):
4509 * location.c (new_linespec_location)
4510 (string_to_event_location_basic, string_to_event_location):
4512 * linespec.h (decode_line_with_current_source)
4513 (decode_line_with_last_displayed, linespec_lex_to_end): Constify.
4514 * linespec.c (linespec_lex_to_end)
4515 (decode_line_with_current_source)
4516 (decode_line_with_last_displayed): Constify.
4517 * guile/scm-breakpoint.c (gdbscm_register_breakpoint_x):
4519 * cli/cli-cmds.c (edit_command, list_command): Constify.
4520 * breakpoint.h (until_break_command, watch_command_wrapper)
4521 (awatch_command_wrapper, rwatch_command_wrapper)
4522 (init_ada_exception_breakpoint): Constify.
4523 * breakpoint.c (break_command_1, dprintf_command)
4524 (break_range_command, watch_command_wrapper)
4525 (rwatch_command_wrapper, awatch_command_wrapper)
4526 (until_break_command, init_ada_exception_breakpoint)
4527 (strace_marker_create_sals_from_location, trace_command)
4528 (ftrace_command, strace_command, struct tracepoint): Constify.
4529 * ax-gdb.c (agent_command_1): Constify.
4530 * ada-lang.c (ada_exception_sal): Constify.
4532 2017-09-27 Tom Tromey <tom@tromey.com>
4534 * record.c (cmd_record_delete, cmd_record_stop, cmd_record_save)
4535 (cmd_record_goto_begin, cmd_record_goto_end, get_insn_number)
4536 (get_context_size, no_chunk, get_insn_history_modifiers)
4537 (cmd_record_insn_history, get_call_history_modifiers)
4538 (cmd_record_call_history): Constify.
4540 2017-09-27 Tom Tromey <tom@tromey.com>
4542 * source.c (show_substitute_path_command)
4543 (unset_substitute_path_command, set_substitute_path_command):
4546 2017-09-27 Tom Tromey <tom@tromey.com>
4548 * typeprint.c (maintenance_print_type): Constify.
4549 * maint.c (maintenance_dump_me, maintenance_demangle)
4550 (maintenance_time_display, maintenance_info_sections)
4551 (maintenance_print_statistics, maintenance_deprecate)
4552 (maintenance_undeprecate): Constify.
4553 (maintenance_do_deprecate): Constify. Use std::string.
4554 (maintenance_selftest): Constify.
4555 * gdbtypes.h (maintenance_print_type): Constify.
4557 2017-09-27 Tom Tromey <tom@tromey.com>
4559 * hppa-tdep.c (unwind_command): Constify.
4561 2017-09-27 Tom Tromey <tom@tromey.com>
4563 * target-descriptions.c (unset_tdesc_filename_cmd)
4564 (maint_print_c_tdesc_cmd, maintenance_check_xml_descriptions):
4567 2017-09-27 Tom Tromey <tom@tromey.com>
4569 * dummy-frame.c (maintenance_print_dummy_frames): Constify.
4571 2017-09-27 Tom Tromey <tom@tromey.com>
4573 * tui/tui.c (tui_enable_command, tui_disable_command): Constify.
4575 2017-09-27 Tom Tromey <tom@tromey.com>
4577 * tui/tui-regs.c (tui_reg_command): Constify.
4579 2017-09-27 Tom Tromey <tom@tromey.com>
4581 * skip.c (skip_file_command, skip_function_command)
4582 (skip_enable_command, skip_disable_command, skip_delete_command):
4585 2017-09-27 Tom Tromey <tom@tromey.com>
4587 * record-btrace.c (cmd_record_btrace_bts_start)
4588 (cmd_record_btrace_pt_start): Constify.
4590 2017-09-27 Tom Tromey <tom@tromey.com>
4592 * symmisc.c (maintenance_print_symbols)
4593 (maintenance_print_msymbols, maintenance_print_objfiles)
4594 (maintenance_info_symtabs, maintenance_check_symtabs)
4595 (maintenance_expand_symtabs, maintenance_info_line_tables):
4598 2017-09-27 Tom Tromey <tom@tromey.com>
4600 * top.c (new_ui_command): Constify.
4602 2017-09-27 Tom Tromey <tom@tromey.com>
4604 * symfile.c (add_symbol_file_command)
4605 (remove_symbol_file_command, list_overlays_command)
4606 (map_overlay_command, unmap_overlay_command)
4607 (overlay_auto_command, overlay_manual_command)
4608 (overlay_off_command, overlay_load_command): Constify.
4610 2017-09-27 Tom Tromey <tom@tromey.com>
4612 * spu-tdep.c (info_spu_event_command, info_spu_signal_command)
4613 (info_spu_mailbox_command, info_spu_dma_command)
4614 (info_spu_proxydma_command): Constify.
4616 2017-09-27 Tom Tromey <tom@tromey.com>
4618 * cli/cli-logging.c (set_logging_on, set_logging_off): Constify.
4620 2017-09-27 Tom Tromey <tom@tromey.com>
4622 * cli/cli-script.c (user_defined_command): Constify.
4624 2017-09-27 Tom Tromey <tom@tromey.com>
4626 * cli/cli-dump.c (dump_memory_command, dump_value_command)
4627 (dump_srec_memory, dump_srec_value, dump_ihex_memory)
4628 (dump_ihex_value, dump_verilog_memory, dump_verilog_value)
4629 (dump_tekhex_memory, dump_tekhex_value, dump_binary_memory)
4630 (dump_binary_value, append_binary_memory, append_binary_value):
4632 (struct dump_context) <func>: Constify.
4633 (add_dump_command): Update.
4635 2017-09-27 Tom Tromey <tom@tromey.com>
4637 * cli/cli-cmds.c (show_version, show_configuration)
4638 (source_command, show_user): Constify.
4640 2017-09-27 Tom Tromey <tom@tromey.com>
4642 * target.c (maintenance_print_target_stack): Constify.
4644 2017-09-27 Tom Tromey <tom@tromey.com>
4646 * interps.c (interpreter_exec_cmd): Constify.
4648 2017-09-27 Tom Tromey <tom@tromey.com>
4650 * record-full.c (cmd_record_full_restore): Constify.
4652 2017-09-27 Tom Tromey <tom@tromey.com>
4654 * memattr.c (enable_mem_command, disable_mem_command)
4655 (delete_mem_command): Constify.
4657 2017-09-27 Tom Tromey <tom@tromey.com>
4659 * value.c (show_convenience): Constify.
4661 2017-09-27 Tom Tromey <tom@tromey.com>
4663 * gdbcore.h (core_file_command): Update.
4664 * corefile.c (core_file_command): Constify.
4666 2017-09-27 Tom Tromey <tom@tromey.com>
4668 * user-regs.c (maintenance_print_user_registers): Constify.
4670 2017-09-27 Tom Tromey <tom@tromey.com>
4672 * cp-namespace.c (maintenance_cplus_namespace): Constify.
4674 2017-09-27 Tom Tromey <tom@tromey.com>
4676 * cp-support.c (first_component_command): Constify.
4678 2017-09-27 Tom Tromey <tom@tromey.com>
4680 * psymtab.c (maintenance_print_psymbols)
4681 (maintenance_info_psymtabs, maintenance_check_psymtabs):
4684 2017-09-27 Tom Tromey <tom@tromey.com>
4686 * windows-tdep.c (display_tib): Constify.
4688 2017-09-27 Tom Tromey <tom@tromey.com>
4690 * linux-fork.c (delete_checkpoint_command)
4691 (detach_checkpoint_command): Constify.
4693 2017-09-27 Tom Tromey <tom@tromey.com>
4695 * cp-abi.c (set_cp_abi_cmd, show_cp_abi_cmd): Constify.
4697 2017-09-27 Tom Tromey <tom@tromey.com>
4699 * arc-tdep.c (dump_arc_instruction_command): Constify.
4701 2017-09-27 Tom Tromey <tom@tromey.com>
4703 * valprint.c (set_radix, show_radix): Constify.
4705 2017-09-27 Tom Tromey <tom@tromey.com>
4707 * dtrace-probe.c (info_probes_dtrace_command): Constify.
4709 2017-09-27 Tom Tromey <tom@tromey.com>
4711 * command.h (not_just_help_class_command): Update.
4712 * cli/cli-decode.h (not_just_help_class_command): Update.
4713 * cli/cli-decode.c (not_just_help_class_command): Constify.
4715 2017-09-27 Tom Tromey <tom@tromey.com>
4717 * gdb_bfd.c (maintenance_info_bfds): Constify.
4719 2017-09-27 Tom Tromey <tom@tromey.com>
4721 * cli/cli-decode.c (add_cmd, set_cmd_cfunc): New function
4723 (do_add_cmd): Rename from add_cmd. Don't call set_cmd_cfunc.
4724 (do_const_cfunc): New function.
4725 (cmd_cfunc_eq): New overload.
4726 (cli_user_command_p): Check do_const_cfunc.
4727 * cli/cli-decode.h (struct cmd_list_element) <function>: New field
4729 * command.h (add_cmd): Add const overload and no-function
4731 (set_cmd_cfunc): Add const overload.
4732 (cmd_const_cfunc_ftype): Declare.
4733 (cmd_cfunc_eq): Add const overload.
4734 * breakpoint.c, cli-cmds.c, cli-dump.c, guile/scm-cmd.c,
4735 python/py-cmd.c, target.c, tracepoint.c: Use no-function add_cmd
4738 2017-09-27 Tom Tromey <tom@tromey.com>
4740 * macroexp.c (get_next_token_for_substitution): New function.
4741 (substitute_args): Call it. Check for __VA_OPT__.
4743 2017-09-26 Walfred Tedeschi <walfred.tedeschi@intel.com>
4744 Pedro Alves <palves@redhat.com>
4746 * dwarf2read.c (dwarf2_cu): Remove field producer_is_icc and add
4747 producer_is_icc_lt_14.
4748 (producer_is_icc_lt_14): New function.
4749 (check_producer): Add code for checking version of ICC.
4750 (producer_is_icc): Move to producer.c.
4751 (read_structure_type): Restrict ICC workaround to ICC<14.
4752 * producer.c: Include selftest.h.
4753 (producer_is_icc, producer_parsing_tests, _initialize_producer):
4755 * producer.h (producer_is_icc): New declaration.
4757 2017-09-26 Walfred Tedeschi <walfred.tedeschi@intel.com>
4759 * Makefile.in (SFILES): Add producer.c.
4760 (COMMON_OBS): Add producer.o
4761 * amd64-tdep.c (producer.h): Add new include.
4762 * dwarf2read.c (producer.h): Add new include.
4763 * producer.c: New file.
4764 * producer.h: New file.
4765 * utils.c (producer_is_gcc, producer_is_gcc_ge_4): Move to
4767 * utils.h (producer_is_gcc, producer_is_gcc_ge_4): Move to
4770 2017-09-26 Matthias Klose <doko@ubuntu.com>
4772 * configure.ac: Search ncursesw before ncurses.
4773 Check ncursesw/ncurses.h before ncurses/ncurses.h.
4774 * gdb_curses.h: Include <ncursesw/ncurses.h>
4775 * config.in, configure: Regenerate.
4777 2017-09-26 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
4780 * configure.host <*-*-solaris2.[01], *-*-solaris2.[2-9]*>: Mark as
4782 Use gdb_host sol2 for i[34567]86-*-solaris2*, x86_64-*-solaris2*.
4783 Remove i386sol2 support.
4784 * configure.nat <i386sol2>: Remove.
4785 <sol2-64>: Fold into ...
4787 Move common settings to default section.
4789 * configure.tgt <i[34567]86-*-solaris2.1[0-9]*,
4790 x86_64-*-solaris2.1[0-9]*>: Rename to ...
4791 <i[34567]86-*-solaris2*, x86_64-*-solaris2*>: ... this.
4792 <i[34567]86-*-solaris*>: Remove.
4793 <sparc-*-solaris2.[0-6], sparc-*-solaris2.[0-6].*>: Remove.
4795 * configure.ac: Remove wctype in libw check.
4796 (_MSE_INT_H): Don't define on Solaris 7-9.
4797 <solaris*>: Remove libthread_db.so.1 check.
4798 * configure: Regenerate.
4799 * config.in: Regenerate.
4801 * proc-service.c: Remove PROC_SERVICE_IS_OLD handling.
4802 (gdb_ps_prochandle_t, gdb_ps_read_buf_t, gdb_ps_write_buf_t)
4803 (gdb_ps_size_t): Remove.
4804 Use base types in users.
4805 * sol-thread.c: Likewise, also for gdb_ps_addr_t.
4807 * NEWS (Changes since GDB 8.0): Document Solaris 2.0-9 removal.
4809 2017-09-26 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
4812 * sparc64-tdep.c (adi_tag_fd): Print pid as long.
4813 (adi_is_addr_mapped): Likewise.
4814 (PSR_ICC): Don't redefine.
4815 (PSR_IMPL): Likewise.
4817 2017-09-25 Tom Tromey <tom@tromey.com>
4819 * regcache.c (regcache::dump): Use string_printf.
4821 2017-09-25 Tom Tromey <tom@tromey.com>
4823 * regcache.c (class regcache_invalidator): New.
4824 (struct register_to_invalidate): Remove.
4825 (make_cleanup_regcache_invalidate): Remove.
4826 (regcache::raw_write): Use regcache_invalidator.
4828 2017-09-25 Tom Tromey <tom@tromey.com>
4830 * spu-tdep.c (spu2ppu_sniffer): Update.
4831 * regcache.h (make_cleanup_regcache_xfree): Don't declare.
4832 * regcache.c (do_regcache_xfree, make_cleanup_regcache_xfree):
4834 * ppc-linux-tdep.c (ppu2spu_sniffer): Update.
4835 * mi/mi-main.c (mi_cmd_data_list_changed_registers): Update.
4836 * frame.h (frame_save_as_regcache): Return std::unique_ptr.
4837 * frame.c (frame_save_as_regcache): Return std::unique_ptr.
4838 (frame_pop): Update.
4840 2017-09-25 Tom Tromey <tom@tromey.com>
4842 * spu-tdep.c (spu2ppu_dealloc_cache): Use delete.
4843 * regcache.h (regcache_xfree): Don't declare.
4844 * regcache.c (regcache_xfree): Remove.
4845 (do_regcache_xfree): Use delete.
4846 * ppc-linux-tdep.c (ppu2spu_dealloc_cache): Use delete.
4847 * linux-fork.c (free_fork): Use delete.
4848 (fork_save_infrun_state): Likewise.
4849 * jit.c (jit_dealloc_cache): Use delete.
4850 * infrun.c (discard_infcall_suspend_state): Use delete.
4852 2017-09-25 Tom Tromey <tom@tromey.com>
4854 * regcache.h (regcache_xmalloc): Don't declare.
4855 (regcache_raw_set_cached_value): Update comment.
4856 * regcache.c (regcache_xmalloc): Remove.
4857 * ppc-linux-tdep.c (ppu2spu_sniffer): Use new.
4858 * jit.c (jit_frame_sniffer): Use new.
4859 * frame.c (frame_save_as_regcache): Use new.
4861 2017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
4863 * NEWS: Advertise support for guarded-storage registers on IBM z.
4865 2017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
4867 * s390-linux-nat.c (have_regset_gs): New static variable.
4868 (s390_linux_fetch_inferior_registers): Handle guarded-storage
4869 control block and guarded-storage broadcast control regsets.
4870 (s390_read_description): Detect whether the target has
4871 guarded-storage support, return appropriate tdesc.
4872 * s390-linux-tdep.c (features/s390-gs-linux64.c): New include.
4873 (features/s390x-gs-linux64.c): Likewise.
4874 (struct gdbarch_tdep) <have_gs>: New field.
4875 (s390_regmap_gs, s390_regmap_gsbc, s390_gs_regset)
4876 (s390_gsbc_regset): New variables.
4877 (s390_iterate_over_regset_sections): Iterate over s390_gs_regset
4878 and s390_gsbc_regset, if applicable.
4879 (s390_core_read_description): Check whether core file was from a
4880 target with guarded-storage support; include appropriate regsets.
4881 (s390_gdbarch_init): Add registers for guarded-storage support.
4882 (_initialize_s390_tdep): Initialize new target descriptions that
4883 include registers for guarded-storage support.
4884 * s390-linux-tdep.h (HWCAP_S390_GS, S390_GSD_REGNUM)
4885 (S390_GSSM_REGNUM, S390_GSEPLA_REGNUM)
4886 (S390_BC_GSD_REGNUM, S390_BC_GSSM_REGNUM): New defines.
4887 (S390_NUM_REGS): Adjust macro definition.
4888 (s390_gs_regset, s390_gsbc_regset, tdesc_s390_gs_linux64)
4889 (tdesc_s390x_gs_linux64): New declarations.
4891 2017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
4893 * features/s390-gs-linux64.xml: New file.
4894 * features/s390-gs.xml: New file.
4895 * features/s390-gsbc.xml: New file.
4896 * features/s390x-gs-linux64.xml: New file.
4897 * features/Makefile (WHICH): Add s390-gs-linux64 and
4899 (s390-gs-linux64-expedite, s390x-gs-linux64-expedite): New macros.
4900 (XMLTOC): Add s390-gs-linux64.xml and s390x-linux64.xml.
4901 * features/s390-gs-linux64.c: New generated file.
4902 * features/s390x-gs-linux64.c: New file.
4903 * regformats/s390-gs-linux64.dat: New file.
4904 * regformats/s390x-gs-linux64.dat: New file.
4906 2017-09-23 Tom Tromey <tom@tromey.com>
4908 * defs.h (make_cleanup_override_quit_handler): Don't declare.
4910 2017-09-22 Tom Tromey <tom@tromey.com>
4912 * utils.c (class scoped_input_handler) <m_quit_handler>: Change
4913 type to scoped_restore_tmpl.
4914 <scoped_input_handler>: Initialize m_quit_handler directly.
4916 2017-09-22 Sergio Durigan Junior <sergiodj@redhat.com>
4918 * cli/cli-cmds.c (pwd_command): Use "getcwd (NULL, 0)".
4919 (cd_command): Likewise. Free "current_directory" before
4921 * main.c (captured_main_1): Use "getcwd (NULL, 0)".
4922 * mi/mi-cmd-env.c (mi_cmd_env_pwd): Likewise.
4923 * top.c (gdb_dirbuf): Remove global declaration.
4924 * top.h (gdb_dirbuf): Likewise.
4926 2017-09-22 Sergio Durigan Junior <sergiodj@redhat.com>
4928 * gnulib/aclocal.m4: Regenerate.
4929 * gnulib/config.in: Regenerate.
4930 * gnulib/configure: Regenerate.
4931 * gnulib/import/Makefile.am: Regenerate.
4932 * gnulib/import/Makefile.in: Regenerate.
4933 * gnulib/import/assure.h: New file.
4934 * gnulib/import/at-func.c: Likewise
4935 * gnulib/import/chdir-long.c: New file.
4936 * gnulib/import/chdir-long.h: New file.
4937 * gnulib/import/cloexec.c: New file.
4938 * gnulib/import/cloexec.h: New file.
4939 * gnulib/import/close.c: New file.
4940 * gnulib/import/closedir.c: New file.
4941 * gnulib/import/dirent-private.h: New file.
4942 * gnulib/import/dup-safer.c: New file.
4943 * gnulib/import/dup.c: New file.
4944 * gnulib/import/dup2.c: New file.
4945 * gnulib/import/error.c: New file.
4946 * gnulib/import/error.h: New file.
4947 * gnulib/import/exitfail.c: New file.
4948 * gnulib/import/exitfail.h: New file.
4949 * gnulib/import/fchdir.c: New file.
4950 * gnulib/import/fcntl.c: New file.
4951 * gnulib/import/fcntl.in.h: New file.
4952 * gnulib/import/fd-hook.c: New file.
4953 * gnulib/import/fd-hook.h: New file.
4954 * gnulib/import/fd-safer.c: New file.
4955 * gnulib/import/fdopendir.c: New file.
4956 * gnulib/import/filename.h: New file.
4957 * gnulib/import/filenamecat-lgpl.c: New file.
4958 * gnulib/import/filenamecat.h: New file.
4959 * gnulib/import/fstat.c: New file.
4960 * gnulib/import/fstatat.c: New file.
4961 * gnulib/import/getcwd-lgpl.c: New file.
4962 * gnulib/import/getcwd.c: New file.
4963 * gnulib/import/getdtablesize.c: New file.
4964 * gnulib/import/getlogin_r.c: New file.
4965 * gnulib/import/getprogname.c: New file.
4966 * gnulib/import/getprogname.h: New file.
4967 * gnulib/import/gettext.h: New file.
4968 * gnulib/import/glob-libc.h: New file.
4969 * gnulib/import/glob.c: New file.
4970 * gnulib/import/glob.in.h: New file.
4971 * gnulib/import/intprops.h: New file.
4972 * gnulib/import/m4/chdir-long.m4: New file.
4973 * gnulib/import/m4/close.m4: New file.
4974 * gnulib/import/m4/closedir.m4: New file.
4975 * gnulib/import/m4/d-ino.m4: New file.
4976 * gnulib/import/m4/d-type.m4: New file.
4977 * gnulib/import/m4/dup.m4: New file.
4978 * gnulib/import/m4/dup2.m4: New file.
4979 * gnulib/import/m4/error.m4: New file.
4980 * gnulib/import/m4/fchdir.m4: New file.
4981 * gnulib/import/m4/fcntl.m4: New file.
4982 * gnulib/import/m4/fcntl_h.m4: New file.
4983 * gnulib/import/m4/fdopendir.m4: New file.
4984 * gnulib/import/m4/filenamecat.m4: New file.
4985 * gnulib/import/m4/fstat.m4: New file.
4986 * gnulib/import/m4/fstatat.m4: New file.
4987 * gnulib/import/m4/getcwd-abort-bug.m4: New file.
4988 * gnulib/import/m4/getcwd-path-max.m4: New file.
4989 * gnulib/import/m4/getcwd.m4: New file.
4990 * gnulib/import/m4/getdtablesize.m4: New file.
4991 * gnulib/import/m4/getlogin_r.m4: New file.
4992 * gnulib/import/m4/getprogname.m4: New file.
4993 * gnulib/import/m4/glob.m4: New file.
4994 * gnulib/import/m4/gnulib-cache.m4: Regenerate.
4995 * gnulib/import/m4/gnulib-comp.m4: Regenerate.
4996 * gnulib/import/m4/mempcpy.m4: New file.
4997 * gnulib/import/m4/memrchr.m4: New file.
4998 * gnulib/import/m4/mode_t.m4: New file.
4999 * gnulib/import/m4/msvc-inval.m4: New file.
5000 * gnulib/import/m4/msvc-nothrow.m4: New file.
5001 * gnulib/import/m4/open.m4: New file.
5002 * gnulib/import/m4/openat.m4: New file.
5003 * gnulib/import/m4/opendir.m4: New file.
5004 * gnulib/import/m4/readdir.m4: New file.
5005 * gnulib/import/m4/realloc.m4: New file.
5006 * gnulib/import/m4/rewinddir.m4: New file.
5007 * gnulib/import/m4/save-cwd.m4: New file.
5008 * gnulib/import/m4/strdup.m4: New file.
5009 * gnulib/import/m4/strerror.m4: New file.
5010 * gnulib/import/m4/unistd-safer.m4: New file.
5011 * gnulib/import/mempcpy.c: New file.
5012 * gnulib/import/memrchr.c: New file.
5013 * gnulib/import/msvc-inval.c: New file.
5014 * gnulib/import/msvc-inval.h: New file.
5015 * gnulib/import/msvc-nothrow.c: New file.
5016 * gnulib/import/msvc-nothrow.h: New file.
5017 * gnulib/import/open.c: New file.
5018 * gnulib/import/openat-die.c: New file.
5019 * gnulib/import/openat-priv.h: New file.
5020 * gnulib/import/openat-proc.c: New file.
5021 * gnulib/import/openat.c: New file.
5022 * gnulib/import/openat.h: New file.
5023 * gnulib/import/opendir.c: New file.
5024 * gnulib/import/pipe-safer.c: New file.
5025 * gnulib/import/readdir.c: New file.
5026 * gnulib/import/realloc.c: New file.
5027 * gnulib/import/rewinddir.c: New file.
5028 * gnulib/import/save-cwd.c: New file.
5029 * gnulib/import/save-cwd.h: New file.
5030 * gnulib/import/strdup.c: New file.
5031 * gnulib/import/strerror-override.c: New file.
5032 * gnulib/import/strerror-override.h: New file.
5033 * gnulib/import/strerror.c: New file.
5034 * gnulib/import/unistd--.h: New file.
5035 * gnulib/import/unistd-safer.h: New file.
5036 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add
5037 "getcwd" and "glob".
5038 * ser-tcp.c: Undefine "close" before redefining it.
5040 2017-09-21 Simon Marchi <simon.marchi@ericsson.com>
5042 * guile/scm-value.c (gdbscm_value_address): Initialize address,
5045 2017-09-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
5047 * configure.nat <i386sol2,i386>: Add fork-inferior.o to NATDEPFILES.
5048 <sol2,sparc>: Likewise.
5049 <sol2-64,i386>: Likewise.
5051 * warning.m4 (AM_GDB_WARNINGS): Disable -Wunknown-pragmas,
5052 -Wdeprecated-declarations on *-*-solaris*.
5053 * configure: Regenerate.
5055 * procfs.c: Include "nat/inferior.h".
5056 (procfs_info_proc): Fix typo.
5058 2017-09-21 Kevin Buettner <kevinb@redhat.com>
5060 * remote.c (vector): Include.
5061 (struct private_thread_info): Add field, thread_handle.
5062 (free_private_thread_info): Deallocate storage associated with
5064 (get_private_info_thread): Initialize `thread_handle' field.
5065 (struct thread_item): Add field, thread_handle.
5066 (clear_threads_listing_context): Deallocate storage associated
5068 (start_thread): Add support for "handle" attribute.
5069 (thread_attributes): Add "handle".
5070 (remote_get_threads_with_qthreadinfo): Initialize thread_handle
5072 (remote_update_thread_list): Update thread_handle.
5073 (remote_thread_handle_to_thread_info): New function.
5074 (init_remote_ops): Initialize to_thread_handle_to_thread_info.
5076 2017-09-21 Kevin Buettner <kevinb@redhat.com>
5078 * python/py-inferior.c (gdbpy_thread_from_thread_handle): New
5080 (inferior_object_methods): Add gdbpy_thread_from_thread_handle.
5081 * python/python-internal.h (thread_object_type): Declare.
5083 2017-09-21 Kevin Buettner <kevinb@redhat.com>
5085 * target.h (struct target_ops): Add to_thread_handle_to_thread_info.
5086 (target_thread_handle_to_thread_info): Declare.
5087 * target.c (target_thread_handle_to_thread_info): New function.
5088 * target-delegates.c: Regenerate.
5089 * gdbthread.h (find_thread_by_handle): Declare.
5090 * thread.c (find_thread_by_handle): New function.
5091 * linux-thread-db.c (thread_db_thread_handle_to_thread_info): New
5093 (init_thread_db_ops): Register thread_db_thread_handle_to_thread_info.
5095 2017-09-21 Simon Marchi <simon.marchi@ericsson.com>
5097 * nat/linux-waitpid.c (linux_debug): Add ATTRIBUTE_PRINTF.
5099 2017-09-21 Simon Marchi <simon.marchi@ericsson.com>
5101 * microblaze-tdep.c (microblaze_debug): Add ATTRIBUTE_PRINTF.
5103 2017-09-21 Yao Qi <yao.qi@linaro.org>
5105 * configure.tgt (aarch64*-*-freebsd*): Add fbsd-tdep.o solib-svr4.o
5108 2017-09-20 Tom Tromey <tom@tromey.com>
5110 * breakpoint.c (struct counted_command_line): Remove.
5111 (breakpoint_commands): Update.
5112 (alloc_counted_command_line, incref_counted_command_line)
5113 (decref_counted_command_line, do_cleanup_counted_command_line)
5114 (make_cleanup_decref_counted_command_line): Remove.
5115 (breakpoint_set_commands, commands_command_1, ~bpstats, bpstats)
5116 (bpstat_clear_actions, bpstat_do_actions_1, watchpoint_check)
5117 (bpstat_stop_status, print_one_breakpoint_location, ~breakpoint)
5118 (save_breakpoints): Update.
5119 * breakpoint.h (counted_command_line): Now a typedef to
5121 (struct breakpoint) <commands>: Now a counted_command_line.
5122 (struct bpstats) <command>: Likewise.
5124 2017-09-20 Tom Tromey <tom@tromey.com>
5126 * breakpoint.c (struct commands_info, do_map_commands_command):
5128 (commands_command_1): Update.
5129 (iterate_over_related_breakpoints): Take a function_view.
5130 (do_delete_breakpoint, do_map_delete_breakpoint): Remove.
5131 (delete_command): Update.
5132 (map_breakpoint_numbers): Take a function_view.
5133 (do_disable_breakpoint, do_map_delete_breakpoint): Remove.
5134 (disable_command): Update.
5135 (do_enable_breakpoint, do_map_enable_breakpoint): Remove.
5136 (enable_command): Update.
5137 (struct disp_data, do_enable_breakpoint_disp)
5138 (do_map_enable_once_breakpoint, do_map_enable_count_breakpoint)
5139 (do_map_enable_delete_breakpoint): Remove.
5140 (enable_once_command, enable_count_command, enable_delete_command)
5141 (delete_trace_variable_command): Update.
5143 2017-09-20 Tom Tromey <tom@tromey.com>
5145 * breakpoint.c (~bpstats): Rename from bpstat_free. Update.
5146 (bpstat_clear): Use delete.
5147 (bpstats): New constructors.
5148 (bpstat_copy, bpstat_stop_status): Use new.
5149 (dprintf_after_condition_true): Update.
5150 * breakpoint.h (bpstats::bpstats): Add constructors.
5151 (bpstats::~bpstats): Add destructor.
5153 2017-09-20 Pedro Alves <palves@redhat.com>
5155 * eval.c (make_params): Delete, refactored as ...
5156 (class fake_method): ... this new type's ctor.
5157 (fake_method::~fake_method): New.
5158 (evaluate_subexp_standard): Use 'fake_method'.
5160 2017-09-20 Tom Tromey <tom@tromey.com>
5162 * windows-nat.c (get_windows_debug_event, windows_wait)
5163 (do_initial_windows_stuff, windows_attach): Update.
5164 * utils.c (vwarning, internal_vproblem): Update.
5165 (ui_unregister_input_event_handler_cleanup)
5166 (prepare_to_handle_input): Remove.
5167 (class scoped_input_handler): New.
5168 (defaulted_query, prompt_for_continue): Update.
5169 * tui/tui-hooks.c (tui_refresh_frame_and_register_information):
5171 * top.c (undo_terminal_modifications_before_exit): Update.
5172 * target/target.h (target_terminal_init, target_terminal_inferior)
5173 (target_terminal_ours): Don't declare.
5174 (class target_terminal): New.
5175 * target.h (target_terminal_is_inferior, target_terminal_is_ours)
5176 (target_terminal_ours_for_output)
5177 (make_cleanup_restore_target_terminal): Don't declare.
5178 (target_terminal_info): Remove.
5179 * target.c (enum terminal_state, terminal_state): Remove.
5180 (target_terminal::terminal_state): Define.
5181 (target_terminal::init): Rename from target_terminal_init.
5182 (target_terminal::inferior): Rename from
5183 target_terminal_inferior.
5184 (target_terminal::ours): Rename from target_terminal_ours.
5185 (target_terminal::ours_for_output): Rename from
5186 target_terminal_ours_for_output.
5187 (target_terminal::info): New method.
5188 (cleanup_restore_target_terminal)
5189 (make_cleanup_restore_target_terminal): Remove.
5190 * solib.c (handle_solib_event): Update.
5191 * remote.c (remote_serial_quit_handler): Update.
5192 (remote_terminal_inferior, remote_wait_as): Update.
5193 * record-full.c (record_full_wait_1): Update.
5194 * nto-procfs.c (procfs_create_inferior): Update.
5195 * nat/fork-inferior.c (startup_inferior): Update.
5196 * mi/mi-interp.c (mi_new_thread, mi_thread_exit)
5197 (mi_record_changed, mi_inferior_added, mi_inferior_appeared)
5198 (mi_inferior_exit, mi_inferior_removed, mi_traceframe_changed)
5199 (mi_tsv_created, mi_tsv_deleted, mi_tsv_modified)
5200 (mi_breakpoint_created, mi_breakpoint_deleted)
5201 (mi_breakpoint_modified, mi_on_resume, mi_solib_loaded)
5202 (mi_solib_unloaded, mi_command_param_changed, mi_memory_changed)
5203 (mi_user_selected_context_changed, report_initial_inferior):
5205 * linux-nat.c (linux_nat_attach, linux_nat_terminal_ours)
5206 (linux_nat_terminal_inferior): Update.
5207 * infrun.c (follow_fork_inferior)
5208 (handle_vfork_child_exec_or_exit, do_target_resume)
5209 (check_curr_ui_sync_execution_done, handle_inferior_event_1)
5210 (handle_signal_stop, maybe_remove_breakpoints, normal_stop):
5212 * inflow.c (child_terminal_init, info_terminal_command): Update.
5213 * infcmd.c (post_create_inferior, continue_1, prepare_one_step)
5214 (attach_command): Update.
5215 * infcall.c (call_thread_fsm_should_stop): Update.
5216 * gnu-nat.c (gnu_attach): Update.
5217 * extension.c (struct active_ext_lang_state)
5218 (restore_active_ext_lang): Update.
5219 * exceptions.c (print_flush): Update.
5220 * event-top.c (async_enable_stdin, default_quit_handler): Update.
5221 (struct quit_handler_cleanup_data, restore_quit_handler)
5222 (restore_quit_handler_dtor, make_cleanup_override_quit_handler):
5224 * cp-support.c (gdb_demangle): Update.
5225 * breakpoint.c (update_inserted_breakpoint_locations)
5226 (insert_breakpoint_locations, handle_jit_event)
5227 (disable_breakpoints_in_unloaded_shlib): Update.
5228 * annotate.c (annotate_breakpoints_invalid)
5229 (annotate_frames_invalid): Update.
5231 2017-09-20 Tom Tromey <tom@tromey.com>
5233 * main.c (catch_command_errors): Rename from
5234 catch_command_errors_const.
5235 (captured_main_1): Update.
5237 2017-09-20 Pedro Alves <palves@redhat.com>
5239 * cli/cli-cmds.c (list_command): Use print_sal_location.
5240 (print_sal_location): New function.
5241 (ambiguous_line_spec): Use print_sal_location.
5242 * linespec.c (symbol_to_sal): Record the symbol in the sal.
5243 * symtab.c (find_function_start_sal): Likewise.
5244 * symtab.h (symtab_and_line::symbol): New field.
5246 2017-09-20 Pedro Alves <palves@redhat.com>
5248 * linespec.c (minsym_found): Handle non-text minsyms.
5249 (symbol_to_sal): Record a sal.pc for non-block, non-label symbols.
5251 2017-09-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
5253 * features/Makefile (i386-avx-mpx-avx512-pku.dat): Add missing
5256 2017-09-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
5258 * gdb.arch/i386-avx512.c (move_zmm_data_to_reg): Use
5259 vmovups instead vmovaps.
5260 (move_zmm_data_to_memory): Use vmovups instead vmovaps.
5262 2017-09-19 John Baldwin <jhb@FreeBSD.org>
5264 * NEWS (Changes since GDB 8.0): Add starti.
5265 * infcmd.c (enum run_break): New.
5266 (run_command_1): Queue pending event for RUN_STOP_AT_FIRST_INSN
5268 (run_command): Use enum run_how.
5269 (start_command): Likewise.
5270 (starti_command): New function.
5271 (RUN_ARGS_HELP): New macro.
5272 (_initialize_infcmd): Use RUN_ARGS_HELP for run and start
5273 commands. Add starti command.
5275 2017-09-19 Yao Qi <yao.qi@linaro.org>
5277 * Makefile.in (monitor.o): Remove the rule.
5279 2017-09-19 Yao Qi <yao.qi@linaro.org>
5281 * annotate.h (struct annotate_arg_emitter): Use
5282 DISABLE_COPY_AND_ASSIGN.
5283 * common/refcounted-object.h (refcounted_object): Likewise.
5284 * completer.h (struct completion_result): Likewise.
5285 * dwarf2read.c (struct dwarf2_per_objfile): Likewise.
5286 * filename-seen-cache.h (filename_seen_cache): Likewise.
5287 * gdbcore.h (thread_section_name): Likewise.
5288 * gdb_regex.h (compiled_regex): Likewise.
5289 * gdbthread.h (scoped_restore_current_thread): Likewise.
5290 * inferior.h (scoped_restore_current_inferior): Likewise.
5291 * jit.c (jit_reader): Likewise.
5292 * linespec.h (struct linespec_result): Likewise.
5293 * mi/mi-parse.h (struct mi_parse): Likewise.
5294 * nat/fork-inferior.c (execv_argv): Likewise.
5295 * progspace.h (scoped_restore_current_program_space): Likewise.
5296 * python/python-internal.h (class gdbpy_enter): Likewise.
5297 * regcache.h (regcache): Likewise.
5298 * target-descriptions.c (struct tdesc_reg): Likewise.
5299 (struct tdesc_type): Likewise.
5300 (struct tdesc_feature): Likewise.
5301 * ui-out.h (ui_out_emit_type): Likewise.
5303 2017-09-18 Simon Marchi <simon.marchi@ericsson.com>
5305 * dwarf2expr.c (dwarf_expr_context::execute_stack_op): Remove
5306 label abort_expression.
5308 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
5310 * common/buffer.c (buffer_xml_printf): Adjust.
5311 * common/xml-utils.c (xml_escape_text): Change return type to
5312 std::string, update code accordingly.
5313 * common/xml-utils.h (xml_escape_text): Change return type to
5315 * rs6000-aix-tdep.c (rs6000_aix_shared_library_to_xml): Adjust.
5316 * windows-tdep.c (windows_xfer_shared_library): Adjust.
5317 * unittests/xml-utils-selftests.c (test_xml_escape_text):
5320 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
5322 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add new source file.
5323 (SUBDIR_UNITTESTS_OBS): Add new object file.
5324 * unittests/xml-utils-selftests.c: New file.
5326 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
5328 * common/selftest.h (selftest): New struct/interface.
5329 (register_test): Add name parameter, add new overload.
5330 (run_tests): Add filter parameter.
5331 (for_each_selftest_ftype): New typedef.
5332 (for_each_selftest): New declaration.
5333 * common/selftest.c (tests): Change type to
5334 map<string, unique_ptr<selftest>>.
5335 (simple_selftest): New struct.
5336 (register_test): New function.
5337 (register_test): Add name parameter and use it.
5338 (run_tests): Add filter parameter and use it. Add prints.
5339 Adjust to vector -> map change.
5340 * aarch64-tdep.c (_initialize_aarch64_tdep): Add names when
5341 registering selftests.
5342 * arm-tdep.c (_initialize_arm_tdep): Likewise.
5343 * disasm-selftests.c (_initialize_disasm_selftests): Likewise.
5344 * dwarf2-frame.c (_initialize_dwarf2_frame): Likewise.
5345 * dwarf2loc.c (_initialize_dwarf2loc): Likewise.
5346 * findvar.c (_initialize_findvar): Likewise.
5347 * gdbarch-selftests.c (_initialize_gdbarch_selftests): Likewise.
5348 * maint.c (maintenance_selftest): Update call to run_tests.
5349 (maintenance_info_selftests): New function.
5350 (_initialize_maint_cmds): Register "maintenance info selftests"
5351 command. Update "maintenance selftest" doc.
5352 * regcache.c (_initialize_regcache): Add names when registering
5354 * rust-exp.y (_initialize_rust_exp): Likewise.
5355 * selftest-arch.c (gdbarch_selftest): New struct.
5356 (gdbarch_tests): Remove.
5357 (register_test_foreach_arch): Add name parameter. Call
5359 (tests_with_arch): Remove, move most content to
5360 gdbarch_selftest::operator().
5361 (_initialize_selftests_foreach_arch): Remove.
5362 * selftest-arch.h (register_test_foreach_arch): Add name
5364 (run_tests_with_arch): New declaration.
5365 * utils-selftests.c (_initialize_utils_selftests): Add names
5366 when registering selftests.
5367 * utils.c (_initialize_utils): Likewise.
5368 * unittests/array-view-selftests.c
5369 (_initialize_array_view_selftests): Likewise.
5370 * unittests/environ-selftests.c (_initialize_environ_selftests):
5372 * unittests/function-view-selftests.c
5373 (_initialize_function_view_selftests): Likewise.
5374 * unittests/offset-type-selftests.c
5375 (_initialize_offset_type_selftests): Likewise.
5376 * unittests/optional-selftests.c
5377 (_initialize_optional_selftests): Likewise.
5378 * unittests/scoped_restore-selftests.c
5379 (_initialize_scoped_restore_selftests): Likewise.
5380 * NEWS: Document "maintenance selftest" and "maint info
5383 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
5385 * mi/mi-main.c (mi_load_progress): Restore current_uiout using a
5388 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
5390 * mi/mi-main.c (mi_load_progress): Make uiout variable
5393 2017-09-15 Pedro Alves <palves@redhat.com>
5395 * compile/compile-c-types.c (convert_enum, convert_int)
5396 (convert_float): Adjust to refer to int_type_v0 and float_type_v0.
5398 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
5400 * dwarf2read.c (copy_string): Remove.
5401 (parse_macro_definition): Replace copy_string with savestring.
5403 2017-09-15 Yao Qi <yao.qi@linaro.org>
5405 * configure.tgt (i[34567]86-*-darwin*): Append amd64.o to
5407 (i[34567]86-*-solaris2.1[0-9]* | x86_64-*-solaris2.1[0-9]*):
5409 (i[34567]86-*-linux*): Likewise.
5411 2017-09-14 Simon Marchi <simon.marchi@ericsson.com>
5413 * dwarf2expr.h (dwarf_stack_value): Add constructor.
5414 (dwarf_expr_context) <~dwarf_expr_context>: Define as default.
5415 <stack>: Change type to std::vector.
5416 <stack_len, stack_allocated>: Remove.
5417 <grow_stack>: Remove.
5418 * dwarf2expr.c (dwarf_expr_context::dwarf_expr_context): Adjust.
5419 (dwarf_expr_context::~dwarf_expr_context): Remove.
5420 (dwarf_expr_context::grow_stack): Remove.
5421 (dwarf_expr_context::push): Adjust.
5422 (dwarf_expr_context::pop): Adjust.
5423 (dwarf_expr_context::fetch): Adjust.
5424 (dwarf_expr_context::fetch_in_stack_memory): Adjust.
5425 (dwarf_expr_context::stack_empty_p): Adjust.
5426 (dwarf_expr_context::execute_stack_op): Adjust.
5428 2017-09-14 Simon Marchi <simon.marchi@ericsson.com>
5430 * dwarf2expr.h (dwarf_expr_context) <stack_empty_p>: Change
5431 return type to bool.
5432 * dwarf2expr.c (dwarf_expr_context::stack_empty_p): Likewise.
5434 2017-09-14 Simon Marchi <simon.marchi@ericsson.com>
5436 * dwarf2expr.h (dwarf_expr_piece) <v.mem.in_stack_memory>:
5437 Change type to bool.
5438 (dwarf_stack_value) <in_stack_memory>: Likewise.
5439 (dwarf_expr_context) <push_address>: Change parameter type to
5441 <fetch_in_stack_memory>: Change return type to bool.
5442 <push>: Change parameter type to bool.
5443 * dwarf2expr.c (dwarf_expr_context::push): Change parameter type
5445 (dwarf_expr_context::push_address): Likewise.
5446 (dwarf_expr_context::fetch_in_stack_memory): Change return type
5448 (dwarf_expr_context::execute_stack_op): Adjust.
5449 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Adjust.
5451 2017-09-14 Simon Marchi <simon.marchi@ericsson.com>
5453 * dwarf2expr.h (struct dwarf_expr_piece): Move up.
5454 (struct dwarf_expr_context) <n_pieces>: Remove.
5455 <pieces>: Change type to std::vector.
5456 * dwarf2expr.c (dwarf_expr_context::dwarf_expr_context): Adjust.
5457 (dwarf_expr_context::~dwarf_expr_context): Don't manually free
5459 (dwarf_expr_context::add_piece): Adjust.
5460 * dwarf2loc.c (struct piece_closure): Initialize fields.
5462 <pieces>: Change type to std::vector.
5463 (allocate_piece_closure): Adjust, change parameter to
5464 std::vector rvalue and std::move it to piece_closure.
5465 (rw_pieced_value): Adjust.
5466 (check_pieced_synthetic_pointer): Adjust.
5467 (indirect_synthetic_pointer): Adjust.
5468 (coerce_pieced_ref): Adjust.
5469 (free_pieced_value_closure): Adjust. Use delete to free
5471 (dwarf2_evaluate_loc_desc_full): Adjust. std::move ctx.pieces
5472 to allocate_piece_closure.
5473 (dwarf2_loc_desc_get_symbol_read_needs): Adjust.
5475 2017-09-12 Simon Marchi <simon.marchi@ericsson.com>
5477 * probe.h (probe_ops_cp): Remove typedef.
5478 (DEF_VEC_P (probe_ops_cp)): Remove.
5479 (all_probe_ops): Change type to std::vector.
5480 * probe.c (info_probes_for_ops): Adjust to vector change.
5481 (probe_linespec_to_ops): Likewise.
5482 (all_probe_ops): Change type to std::vector.
5483 (_initialize_probe): Adjust to vector change.
5484 * dtrace-probe.c (_initialize_dtrace_probe): Likewise.
5485 * elfread.c (elf_get_probes): Likewise.
5486 * stap-probe.c (_initialize_stap_probe): Likewise.
5488 2017-09-12 Simon Marchi <simon.marchi@ericsson.com>
5490 * probe.h (struct bound_probe): Define constructors.
5491 * probe.c (bound_probe_s): Remove typedef.
5492 (DEF_VEC_O (bound_probe_s)): Remove VEC.
5493 (collect_probes): Change return type to std::vector, remove
5495 (compare_probes): Return bool, change parameter type. Change
5496 semantic to "less than".
5497 (gen_ui_out_table_header_info): Change parameter to std::vector
5499 (exists_probe_with_pops): Likewise.
5500 (info_probes_for_ops): Update to std::vector change.
5501 (enable_probes_command): Likewise.
5502 (disable_probes_command): Likewise.
5504 2017-09-12 Simon Marchi <simon.marchi@ericsson.com>
5506 * probe.h (struct probe_ops) <get_probes>: Change parameter from
5508 * probe.c (parse_probes_in_pspace): Update.
5509 (find_probes_in_objfile): Update.
5510 (find_probe_by_pc): Update.
5511 (collect_probes): Update.
5512 (probe_any_get_probes): Update.
5513 * symfile.h (struct sym_probe_fns) <sym_get_probes> Change
5514 return type to reference to std::vector.
5515 * dtrace-probe.c (dtrace_process_dof_probe): Change parameter to
5516 std::vector and update.
5517 (dtrace_process_dof): Likewise.
5518 (dtrace_get_probes): Likewise.
5519 * elfread.c (elf_get_probes): Change return type to std::vector,
5520 store an std::vector in bfd_data.
5521 (probe_key_free): Update to std::vector.
5522 * stap-probe.c (handle_stap_probe): Change parameter to
5523 std::vector and update.
5524 (stap_get_probes): Likewise.
5525 * symfile-debug.c (debug_sym_get_probes): Change return type to
5526 std::vector and update.
5528 2017-09-11 Tom Tromey <tom@tromey.com>
5530 * breakpoint.c (program_breakpoint_here_p): Update.
5531 * target.c (make_scoped_restore_show_memory_breakpoints): Rename
5532 from make_show_memory_breakpoints_cleanup. Return a
5533 scoped_restore_tmpl<int>.
5534 (restore_show_memory_breakpoints): Remove.
5535 * ppc-linux-tdep.c (ppc_linux_memory_remove_breakpoint): Update.
5536 * mem-break.c (memory_validate_breakpoint): Update.
5537 * ia64-tdep.c (ia64_memory_insert_breakpoint): Update.
5538 (ia64_memory_remove_breakpoint): Update.
5539 (ia64_breakpoint_from_pc): Update.
5540 * target.h (make_scoped_restore_show_memory_breakpoints): Rename
5541 from make_show_memory_breakpoints_cleanup.
5543 2017-09-11 Tom Tromey <tom@tromey.com>
5545 * d-namespace.c (d_lookup_symbol): Use std::string.
5546 (find_symbol_in_baseclass): Likewise.
5548 2017-09-11 Tom Tromey <tom@tromey.com>
5550 * ctf.c (ctf_start): Use std::string.
5552 2017-09-11 Tom Tromey <tom@tromey.com>
5554 * ada-lang.c (is_known_support_routine): Update.
5555 (ada_unhandled_exception_name_addr_from_raise): Update.
5556 * guile/scm-frame.c (gdbscm_frame_name): Update.
5557 * python/py-frame.c (frapy_name): Update.
5558 (frapy_function): Update.
5559 * stack.h (find_frame_funname): Update.
5560 * stack.c (find_frame_funname): Return unique_xmalloc_ptr.
5561 (print_frame): Update.
5563 2017-09-11 Tom Tromey <tom@tromey.com>
5565 * findcmd.c (put_bits): Take a gdb::byte_vector.
5566 (parse_find_args): Return gdb::byte_vector. "args" now const.
5567 Remove "pattern_bufp" and "pattern_lenp" parameters. Remove
5569 (find_command): Update.
5571 2017-09-11 Tom Tromey <tom@tromey.com>
5573 * cli/cli-script.c (class scoped_restore_hook_in): New.
5574 (clear_hook_in_cleanup): Remove.
5575 (execute_cmd_pre_hook, execute_cmd_post_hook): Use
5576 scoped_restore_hook_in.
5578 2017-09-11 Tom Tromey <tom@tromey.com>
5580 * cli/cli-script.c (restore_interp): Remove.
5581 (read_command_lines): Use scoped_restore_interp.
5582 * interps.c (scoped_restore_interp::set_temp): Rename from
5584 * interps.h (class scoped_restore_interp): New.
5585 (interp_set_temp): Remove.
5587 2017-09-11 Tom Tromey <tom@tromey.com>
5589 * mi/mi-cmd-catch.c (mi_cmd_catch_assert)
5590 (mi_cmd_catch_exception, mi_catch_load_unload): Update.
5591 * mi/mi-cmd-break.c (setup_breakpoint_reporting): Return a
5593 (mi_cmd_break_insert_1): Update.
5594 * mi/mi-cmd-break.h (setup_breakpoint_reporting): Return a
5597 2017-09-11 Tom Tromey <tom@tromey.com>
5599 * demangle.c (demangle_command): Update.
5600 * breakpoint.c (disable_command): Update.
5601 (enable_command): Update.
5602 (find_location_by_number): Make "number" const. Use
5604 * cli/cli-utils.c (extract_arg): Return std::string.
5605 * probe.c (parse_probe_linespec): Update. Change types.
5606 (collect_probes): Take string arguments.
5607 (parse_probe_linespec): Likewise.
5608 (info_probes_for_ops): Update.
5609 (enable_probes_command): Update.
5610 (disable_probes_command): Update.
5611 * break-catch-sig.c (catch_signal_split_args): Update.
5612 * mi/mi-parse.c (mi_parse): Update.
5614 2017-09-11 Tom Tromey <tom@tromey.com>
5616 * language.h (language_enum): Make argument const.
5617 * language.c (language_enum): Make argument const.
5619 2017-09-11 Tom Tromey <tom@tromey.com>
5621 * common/common-utils.h (skip_to_space): Remove macro, redeclare
5623 (skip_to_space): Rename from skip_to_space_const.
5624 * common/common-utils.c (skip_to_space): New function.
5625 (skip_to_space): Rename from skip_to_space_const.
5626 * cli/cli-utils.h (get_number): Rename from get_number_const.
5627 (extract_arg): Rename from extract_arg_const.
5628 * cli/cli-utils.c (get_number): Rename from get_number_const.
5629 (extract_arg): Rename from extract_arg_const.
5630 (number_or_range_parser::get_number): Use ::get_number.
5631 * aarch64-linux-tdep.c, ada-lang.c, arm-linux-tdep.c, ax-gdb.c,
5632 break-catch-throw.c, breakpoint.c, cli/cli-cmds.c, cli/cli-dump.c,
5633 cli/cli-script.c, cli/cli-setshow.c, compile/compile.c,
5634 completer.c, demangle.c, disasm.c, findcmd.c, linespec.c,
5635 linux-tdep.c, linux-thread-db.c, location.c, mi/mi-parse.c,
5636 minsyms.c, nat/linux-procfs.c, printcmd.c, probe.c,
5637 python/py-breakpoint.c, record.c, rust-exp.y, serial.c, stack.c,
5638 stap-probe.c, tid-parse.c, tracepoint.c: Update all callers.
5640 2017-09-11 Tom Tromey <tom@tromey.com>
5642 * python/python.c (do_start_initialization): Use
5643 py-event-types.def to initialize types.
5644 Define all object type structures.
5645 * python/python-internal.h: Don't declare event initialization
5647 * python/py-threadevent.c (thread_event_object_type): Don't
5649 * python/py-stopevent.c (stop_event_object_type): Don't define.
5650 * python/py-signalevent.c (signal_event_object_type): Don't
5652 * python/py-newobjfileevent.c (new_objfile_event_object_type)
5653 (clear_objfiles_event_object_type): Don't declare or define.
5654 * python/py-infevents.c (inferior_call_pre_event_object_type)
5655 (inferior_call_post_event_object_type)
5656 (register_changed_event_object_type)
5657 (memory_changed_event_object_type): Don't declare or define.
5658 * python/py-inferior.c (new_thread_event_object_type)
5659 (new_inferior_event_object_type)
5660 (inferior_deleted_event_object_type): Don't declare or define.
5661 * python/py-exitedevent.c (exited_event_object_type): Don't
5663 * python/py-evts.c (gdbpy_initialize_py_events): Use
5665 * python/py-events.h (thread_event_object_type): Don't declare.
5666 (events_object): Use py-all-events.def.
5667 * python/py-event.h (GDBPY_NEW_EVENT_TYPE): Remove. Use
5669 * python/py-event-types.def: New file.
5670 * python/py-continueevent.c (create_continue_event_object): Don't
5672 * python/py-bpevent.c (breakpoint_event_object_type): Don't
5674 * python/py-all-events.def: New file.
5676 2017-09-11 Tom Tromey <tom@tromey.com>
5678 * python/py-threadevent.c (create_thread_event_object): Return
5680 * python/py-stopevent.h (create_stop_event_object)
5681 (create_breakpoint_event_object, create_signal_event_object):
5683 * python/py-stopevent.c (create_stop_event_object): Return
5685 (emit_stop_event): Update.
5686 * python/py-signalevent.c (create_signal_event_object): Return
5688 * python/py-infevents.c (create_inferior_call_event_object):
5690 * python/py-event.h (create_event_object)
5691 (create_thread_event_object): Update.
5692 * python/py-event.c (create_event_object): Return gdbpy_ref.
5693 * python/py-continueevent.c: Return gdbpy_ref.
5694 * python/py-bpevent.c (create_breakpoint_event_object): Return
5697 2017-09-11 Tom Tromey <tom@tromey.com>
5701 * python/python.c (do_start_initialization): Initialize new event
5703 * python/python-internal.h (gdbpy_initialize_new_inferior_event)
5704 (gdbpy_initialize_inferior_deleted_event)
5705 (gdbpy_initialize_new_thread_event): Declare.
5706 * python/py-threadevent.c (create_thread_event_object): Add option
5708 * python/py-inferior.c (new_thread_event_object_type)
5709 (new_inferior_event_object_type)
5710 (inferior_deleted_event_object_type): Declare.
5711 (python_new_inferior, python_inferior_deleted): New functions.
5712 (add_thread_object): Emit new_thread event.
5713 (gdbpy_initialize_inferior): Attach new functions to corresponding
5715 (new_thread, new_inferior, inferior_deleted): Define new event
5717 * python/py-evts.c (gdbpy_initialize_py_events): Add new
5719 * python/py-events.h (events_object) <new_inferior,
5720 inferior_deleted, new_thread>: New fields.
5721 * python/py-event.h (create_thread_event_breakpoint): Add optional
5724 2017-09-10 Andrew Burgess <andrew.burgess@embecosm.com>
5726 * utils.c (abort_with_message): Don't compare gdb_stderr to NULL,
5727 check current_ui instead.
5728 (internal_vproblem): Likewise.
5730 2017-09-09 Simon Marchi <simon.marchi@ericsson.com>
5732 * thread.c (print_thread_info_1): Remove unnecessary calls to
5733 uiout->is_mi_like_p.
5735 2017-09-09 Tom Tromey <tom@tromey.com>
5737 * namespace.h (add_using_directive): Update.
5738 * namespace.c (add_using_directive): Change type of excludes to
5740 * dwarf2read.c (read_import_statement): Use std::vector.
5741 (read_namespace): Update.
5742 * cp-namespace.c (cp_scan_for_anonymous_namespaces): Update.
5744 2017-09-09 Tom Tromey <tom@tromey.com>
5746 * linespec.c (create_sals_line_offset): Use gdb::def_vector.
5748 2017-09-09 Tom Tromey <tom@tromey.com>
5750 * p-valprint.c (pascal_object_print_value): Use gdb::byte_vector.
5752 2017-09-09 Tom Tromey <tom@tromey.com>
5754 * stack.c (func_command): Use gdb::def_vector.
5756 2017-09-09 Tom Tromey <tom@tromey.com>
5758 * mi/mi-cmd-var.c (mi_cmd_var_list_children): Use gdb::optional,
5759 ui_out_emit_list, ui_out_emit_tuple.
5760 (mi_cmd_var_update): Likewise.
5762 2017-09-09 Tom Tromey <tom@tromey.com>
5764 * mi/mi-interp.c (mi_user_selected_context_changed): Use
5765 ui_out_redirect_pop.
5766 * guile/scm-ports.c (ioscm_with_output_to_port_worker): Use
5767 ui_out_redirect_pop.
5768 * utils.c (do_ui_out_redirect_pop)
5769 (make_cleanup_ui_out_redirect_pop): Remove.
5770 * top.c (execute_command_to_string): Use ui_out_redirect_pop.
5771 * utils.h (make_cleanup_ui_out_redirect_pop): Remove.
5772 * ui-out.h (ui_out_redirect_pop): New class.
5774 2017-09-09 Tom Tromey <tom@tromey.com>
5776 * mi/mi-main.c (output_cores): Use ui_out_emit_list.
5777 (list_available_thread_groups, mi_cmd_list_thread_groups)
5778 (mi_cmd_data_list_changed_registers, mi_cmd_data_read_memory)
5779 (mi_cmd_data_read_memory_bytes, mi_cmd_trace_frame_collected):
5782 2017-09-09 Tom Tromey <tom@tromey.com>
5784 * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn): Use
5787 2017-09-09 Tom Tromey <tom@tromey.com>
5789 * target.c (flash_erase_command): Use ui_out_emit_tuple.
5790 * stack.c (print_frame): Use ui_out_emit_tuple.
5791 * spu-tdep.c (info_spu_event_command): Use ui_out_emit_tuple.
5792 (info_spu_mailbox_command, info_spu_dma_command)
5793 (info_spu_proxydma_command): Likewise.
5794 * mi/mi-main.c (mi_cmd_trace_frame_collected): Use
5795 ui_out_emit_tuple, gdb::byte_vector, bin2hex.
5796 * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries): Use
5798 * breakpoint.c (print_it_watchpoint): Use ui_out_emit_tuple.
5800 2017-09-09 Tom Tromey <tom@tromey.com>
5802 * ui-out.h (make_cleanup_ui_out_table_begin_end): Remove.
5803 (class ui_out_emit_table): Update comment.
5804 * ui-out.c (do_cleanup_table_end)
5805 (make_cleanup_ui_out_table_begin_end): Remove.
5806 * spu-tdep.c (info_spu_mailbox_list): Use ui_out_emit_table.
5807 (info_spu_dma_cmdlist): Likewise.
5808 * probe.c (info_probes_for_ops): Use ui_out_emit_table.
5809 * darwin-nat-info.c (darwin_debug_regions_recurse): Use
5812 2017-09-09 Tom Tromey <tom@tromey.com>
5814 * thread.c (print_thread_info_1): Use ui_out_emit_table,
5815 ui_out_emit_list, gdb::optional.
5817 2017-09-09 John Baldwin <jhb@FreeBSD.org>
5819 * aarch64-linux-nat.c: Remove _initialize_aarch64_linux_nat
5821 * aarch64-linux-tdep.c: Remove _initialize_aarch64_linux_tdep
5823 * aarch64-newlib-tdep.c: Remove _initialize_aarch64_newlib_tdep
5825 * aarch64-tdep.c: Remove _initialize_aarch64_tdep prototype.
5826 * ada-exp.y: Remove _initialize_ada_exp prototype.
5827 * ada-lang.c: Remove _initialize_ada_language prototype.
5828 * ada-tasks.c: Remove _initialize_tasks prototype.
5829 * addrmap.c: Remove _initialize_addrmap prototype.
5830 * agent.c: Remove _initialize_agent prototype.
5831 * aix-thread.c: Remove _initialize_aix_thread prototype.
5832 * alpha-bsd-nat.c: Remove _initialize_alphabsd_nat prototype.
5833 * alpha-linux-nat.c: Remove _initialize_alpha_linux_nat prototype.
5834 * alpha-linux-tdep.c: Remove _initialize_alpha_linux_tdep
5836 * alpha-nbsd-tdep.c: Remove _initialize_alphanbsd_tdep prototype.
5837 * alpha-obsd-tdep.c: Remove _initialize_alphaobsd_tdep prototype.
5838 * alpha-tdep.c: Remove _initialize_alpha_tdep prototype.
5839 * amd64-darwin-tdep.c: Remove _initialize_amd64_darwin_tdep
5841 * amd64-dicos-tdep.c: Remove _initialize_amd64_dicos_tdep
5843 * amd64-fbsd-nat.c: Remove _initialize_amd64fbsd_nat prototype.
5844 * amd64-fbsd-tdep.c: Remove _initialize_amd64fbsd_tdep prototype.
5845 * amd64-linux-nat.c: Remove _initialize_amd64_linux_nat prototype.
5846 * amd64-linux-tdep.c: Remove _initialize_amd64_linux_tdep
5848 * amd64-nbsd-nat.c: Remove _initialize_amd64nbsd_nat prototype.
5849 * amd64-nbsd-tdep.c: Remove _initialize_amd64nbsd_tdep prototype.
5850 * amd64-obsd-nat.c: Remove _initialize_amd64obsd_nat prototype.
5851 * amd64-obsd-tdep.c: Remove _initialize_amd64obsd_tdep prototype.
5852 * amd64-sol2-tdep.c: Remove _initialize_amd64_sol2_tdep prototype.
5853 * amd64-tdep.c: Remove _initialize_amd64_tdep prototype.
5854 * amd64-windows-nat.c: Remove _initialize_amd64_windows_nat
5856 * amd64-windows-tdep.c: Remove _initialize_amd64_windows_tdep
5858 * annotate.c: Remove _initialize_annotate prototype.
5859 * arc-newlib-tdep.c: Remove _initialize_arc_newlib_tdep prototype.
5860 * arc-tdep.c: Remove _initialize_arc_tdep prototype.
5861 * arch-utils.c: Remove _initialize_gdbarch_utils prototype.
5862 * arm-linux-nat.c: Remove _initialize_arm_linux_nat prototype.
5863 * arm-linux-tdep.c: Remove _initialize_arm_linux_tdep prototype.
5864 * arm-nbsd-tdep.c: Remove _initialize_arm_netbsd_tdep prototype.
5865 * arm-obsd-tdep.c: Remove _initialize_armobsd_tdep prototype.
5866 * arm-symbian-tdep.c: Remove _initialize_arm_symbian_tdep
5868 * arm-tdep.c: Remove _initialize_arm_tdep prototype.
5869 * arm-wince-tdep.c: Remove _initialize_arm_wince_tdep prototype.
5870 * auto-load.c: Remove _initialize_auto_load prototype.
5871 * auxv.c: Remove _initialize_auxv prototype.
5872 * avr-tdep.c: Remove _initialize_avr_tdep prototype.
5873 * ax-gdb.c: Remove _initialize_ax_gdb prototype.
5874 * bfin-linux-tdep.c: Remove _initialize_bfin_linux_tdep prototype.
5875 * bfin-tdep.c: Remove _initialize_bfin_tdep prototype.
5876 * break-catch-sig.c: Remove _initialize_break_catch_sig prototype.
5877 * break-catch-syscall.c: Remove _initialize_break_catch_syscall
5879 * break-catch-throw.c: Remove _initialize_break_catch_throw
5881 * breakpoint.c: Remove _initialize_breakpoint prototype.
5882 * bsd-uthread.c: Remove _initialize_bsd_uthread prototype.
5883 * btrace.c: Remove _initialize_btrace prototype.
5884 * charset.c: Remove _initialize_charset prototype.
5885 * cli/cli-cmds.c: Remove _initialize_cli_cmds prototype.
5886 * cli/cli-dump.c: Remove _initialize_cli_dump prototype.
5887 * cli/cli-interp.c: Remove _initialize_cli_interp prototype.
5888 * cli/cli-logging.c: Remove _initialize_cli_logging prototype.
5889 * cli/cli-script.c: Remove _initialize_cli_script prototype.
5890 * coff-pe-read.c: Remove _initialize_coff_pe_read prototype.
5891 * coffread.c: Remove _initialize_coffread prototype.
5892 * compile/compile.c: Remove _initialize_compile prototype.
5893 * complaints.c: Remove _initialize_complaints prototype.
5894 * completer.c: Remove _initialize_completer prototype.
5895 * copying.awk: Remove _initialize_copying prototype.
5896 * copying.c: Regenerate.
5897 * core-regset.c: Remove _initialize_core_regset prototype.
5898 * corefile.c: Remove _initialize_core prototype.
5899 * corelow.c: Remove _initialize_corelow prototype.
5900 * cp-abi.c: Remove _initialize_cp_abi prototype.
5901 * cp-namespace.c: Remove _initialize_cp_namespace prototype.
5902 * cp-support.c: Remove _initialize_cp_support prototype.
5903 * cp-valprint.c: Remove _initialize_cp_valprint prototype.
5904 * cris-linux-tdep.c: Remove _initialize_cris_linux_tdep prototype.
5905 * cris-tdep.c: Remove _initialize_cris_tdep prototype.
5906 * ctf.c: Remove _initialize_ctf prototype.
5907 * d-lang.c: Remove _initialize_d_language prototype.
5908 * darwin-nat-info.c: Remove _initialize_darwin_info_commands
5910 * darwin-nat.c: Remove _initialize_darwin_inferior prototype.
5911 * dbxread.c: Remove _initialize_dbxread prototype.
5912 * dcache.c: Remove _initialize_dcache prototype.
5913 * demangle.c: Remove _initialize_demangler prototype.
5914 * disasm-selftests.c: Remove _initialize_disasm_selftests
5916 * disasm.c: Remove _initialize_disasm prototype.
5917 * dtrace-probe.c: Remove _initialize_dtrace_probe prototype.
5918 * dummy-frame.c: Remove _initialize_dummy_frame prototype.
5919 * dwarf2-frame-tailcall.c: Remove _initialize_tailcall_frame
5921 * dwarf2-frame.c: Remove _initialize_dwarf2_frame prototype.
5922 * dwarf2expr.c: Remove _initialize_dwarf2expr prototype.
5923 * dwarf2loc.c: Remove _initialize_dwarf2loc prototype.
5924 * dwarf2read.c: Remove _initialize_dwarf2_read prototype.
5925 * elfread.c: Remove _initialize_elfread prototype.
5926 * exec.c: Remove _initialize_exec prototype.
5927 * extension.c: Remove _initialize_extension prototype.
5928 * f-lang.c: Remove _initialize_f_language prototype.
5929 * f-valprint.c: Remove _initialize_f_valprint prototype.
5930 * fbsd-nat.c: Remove _initialize_fbsd_nat prototype.
5931 * fbsd-tdep.c: Remove _initialize_fbsd_tdep prototype.
5932 * filesystem.c: Remove _initialize_filesystem prototype.
5933 * findcmd.c: Remove _initialize_mem_search prototype.
5934 * fork-child.c: Remove _initialize_fork_child prototype.
5935 * frame-base.c: Remove _initialize_frame_base prototype.
5936 * frame-unwind.c: Remove _initialize_frame_unwind prototype.
5937 * frame.c: Remove _initialize_frame prototype.
5938 * frv-linux-tdep.c: Remove _initialize_frv_linux_tdep prototype.
5939 * frv-tdep.c: Remove _initialize_frv_tdep prototype.
5940 * ft32-tdep.c: Remove _initialize_ft32_tdep prototype.
5941 * gcore.c: Remove _initialize_gcore prototype.
5942 * gdb_bfd.c: Remove _initialize_gdb_bfd prototype.
5943 * gdbarch.c: Regenerate.
5944 * gdbarch.sh: Remove _initialize_gdbarch prototype.
5945 * gdbtypes.c: Remove _initialize_gdbtypes prototype.
5946 * gnu-nat.c: Remove _initialize_gnu_nat prototype.
5947 * gnu-v2-abi.c: Remove _initialize_gnu_v2_abi prototype.
5948 * gnu-v3-abi.c: Remove _initialize_gnu_v3_abi prototype.
5949 * go-lang.c: Remove _initialize_go_language prototype.
5950 * go32-nat.c: Remove _initialize_go32_nat prototype.
5951 * guile/guile.c: Remove _initialize_guile prototype.
5952 * h8300-tdep.c: Remove _initialize_h8300_tdep prototype.
5953 * hppa-linux-nat.c: Remove _initialize_hppa_linux_nat prototype.
5954 * hppa-linux-tdep.c: Remove _initialize_hppa_linux_tdep prototype.
5955 * hppa-nbsd-nat.c: Remove _initialize_hppanbsd_nat prototype.
5956 * hppa-nbsd-tdep.c: Remove _initialize_hppanbsd_tdep prototype.
5957 * hppa-obsd-nat.c: Remove _initialize_hppaobsd_nat prototype.
5958 * hppa-obsd-tdep.c: Remove _initialize_hppaobsd_tdep prototype.
5959 * hppa-tdep.c: Remove _initialize_hppa_tdep prototype.
5960 * i386-bsd-nat.c: Remove _initialize_i386bsd_nat prototype.
5961 * i386-cygwin-tdep.c: Remove _initialize_i386_cygwin_tdep
5963 * i386-darwin-tdep.c: Remove _initialize_i386_darwin_tdep
5965 * i386-dicos-tdep.c: Remove _initialize_i386_dicos_tdep prototype.
5966 * i386-fbsd-nat.c: Remove _initialize_i386fbsd_nat prototype.
5967 * i386-fbsd-tdep.c: Remove _initialize_i386fbsd_tdep prototype.
5968 * i386-gnu-nat.c: Remove _initialize_i386gnu_nat prototype.
5969 * i386-gnu-tdep.c: Remove _initialize_i386gnu_tdep prototype.
5970 * i386-linux-nat.c: Remove _initialize_i386_linux_nat prototype.
5971 * i386-linux-tdep.c: Remove _initialize_i386_linux_tdep prototype.
5972 * i386-nbsd-nat.c: Remove _initialize_i386nbsd_nat prototype.
5973 * i386-nbsd-tdep.c: Remove _initialize_i386nbsd_tdep prototype.
5974 * i386-nto-tdep.c: Remove _initialize_i386nto_tdep prototype.
5975 * i386-obsd-nat.c: Remove _initialize_i386obsd_nat prototype.
5976 * i386-obsd-tdep.c: Remove _initialize_i386obsd_tdep prototype.
5977 * i386-sol2-nat.c: Remove _initialize_amd64_sol2_nat prototype.
5978 * i386-sol2-tdep.c: Remove _initialize_amd64_sol2_tdep prototype.
5979 * i386-tdep.c: Remove _initialize_i386_tdep prototype.
5980 * i386-windows-nat.c: Remove _initialize_i386_windows_nat
5982 * ia64-libunwind-tdep.c: Remove _initialize_libunwind_frame
5984 * ia64-linux-nat.c: Remove _initialize_ia64_linux_nat prototype.
5985 * ia64-linux-tdep.c: Remove _initialize_ia64_linux_tdep prototype.
5986 * ia64-tdep.c: Remove _initialize_ia64_tdep prototype.
5987 * ia64-vms-tdep.c: Remove _initialize_ia64_vms_tdep prototype.
5988 * infcall.c: Remove _initialize_infcall prototype.
5989 * infcmd.c: Remove _initialize_infcmd prototype.
5990 * inferior.c: Remove _initialize_inferiors prototype.
5991 * inflow.c: Remove _initialize_inflow prototype.
5992 * infrun.c: Remove _initialize_infrun prototype.
5993 * interps.c: Remove _initialize_interpreter prototype.
5994 * iq2000-tdep.c: Remove _initialize_iq2000_tdep prototype.
5995 * jit.c: Remove _initialize_jit prototype.
5996 * language.c: Remove _initialize_language prototype.
5997 * linux-fork.c: Remove _initialize_linux_fork prototype.
5998 * linux-nat.c: Remove _initialize_linux_nat prototype.
5999 * linux-tdep.c: Remove _initialize_linux_tdep prototype.
6000 * linux-thread-db.c: Remove _initialize_thread_db prototype.
6001 * lm32-tdep.c: Remove _initialize_lm32_tdep prototype.
6002 * m2-lang.c: Remove _initialize_m2_language prototype.
6003 * m32c-tdep.c: Remove _initialize_m32c_tdep prototype.
6004 * m32r-linux-nat.c: Remove _initialize_m32r_linux_nat prototype.
6005 * m32r-linux-tdep.c: Remove _initialize_m32r_linux_tdep prototype.
6006 * m32r-tdep.c: Remove _initialize_m32r_tdep prototype.
6007 * m68hc11-tdep.c: Remove _initialize_m68hc11_tdep prototype.
6008 * m68k-bsd-nat.c: Remove _initialize_m68kbsd_nat prototype.
6009 * m68k-bsd-tdep.c: Remove _initialize_m68kbsd_tdep prototype.
6010 * m68k-linux-nat.c: Remove _initialize_m68k_linux_tdep prototype.
6011 * m68k-linux-tdep.c: Remove _initialize_m68k_linux_tdep prototype.
6012 * m68k-tdep.c: Remove _initialize_m68k_tdep prototype.
6013 * m88k-bsd-nat.c: Remove _initialize_m68kbsd_nat prototype.
6014 * m88k-tdep.c: Remove _initialize_m68kbsd_tdep prototype.
6015 * machoread.c: Remove _initialize_machoread prototype.
6016 * macrocmd.c: Remove _initialize_macrocmd prototype.
6017 * macroscope.c: Remove _initialize_macroscope prototype.
6018 * maint.c: Remove _initialize_maint_cmds prototype.
6019 * mdebugread.c: Remove _initialize_mdebugread prototype.
6020 * memattr.c: Remove _initialize_mem prototype.
6021 * mep-tdep.c: Remove _initialize_mep_tdep prototype.
6022 * mi/mi-cmd-env.c: Remove _initialize_mi_cmd_env prototype.
6023 * mi/mi-cmds.c: Remove _initialize_mi_cmds prototype.
6024 * mi/mi-interp.c: Remove _initialize_mi_interp prototype.
6025 * mi/mi-main.c: Remove _initialize_mi_main prototype.
6026 * microblaze-linux-tdep.c: Remove
6027 _initialize_microblaze_linux_tdep prototype.
6028 * microblaze-tdep.c: Remove _initialize_microblaze_tdep prototype.
6029 * mips-fbsd-nat.c: Remove _initialize_mips_fbsd_nat prototype.
6030 * mips-fbsd-tdep.c: Remove _initialize_mips_fbsd_tdep prototype.
6031 * mips-linux-nat.c: Remove _initialize_mips_linux_nat prototype.
6032 * mips-linux-tdep.c: Remove _initialize_mips_linux_tdep prototype.
6033 * mips-nbsd-nat.c: Remove _initialize_mipsnbsd_nat prototype.
6034 * mips-nbsd-tdep.c: Remove _initialize_mipsnbsd_tdep prototype.
6035 * mips-sde-tdep.c: Remove _initialize_mips_sde_tdep prototype.
6036 * mips-tdep.c: Remove _initialize_mips_tdep prototype.
6037 * mips64-obsd-nat.c: Remove _initialize_mips64obsd_nat prototype.
6038 * mips64-obsd-tdep.c: Remove _initialize_mips64obsd_tdep
6040 * mipsread.c: Remove _initialize_mipsread prototype.
6041 * mn10300-linux-tdep.c: Remove _initialize_mn10300_linux_tdep
6043 * mn10300-tdep.c: Remove _initialize_mn10300_tdep prototype.
6044 * moxie-tdep.c: Remove _initialize_moxie_tdep prototype.
6045 * msp430-tdep.c: Remove _initialize_msp430_tdep prototype.
6046 * mt-tdep.c: Remove _initialize_mt_tdep prototype.
6047 * nds32-tdep.c: Remove _initialize_nds32_tdep prototype.
6048 * nios2-linux-tdep.c: Remove _initialize_nios2_linux_tdep
6050 * nios2-tdep.c: Remove _initialize_nios2_tdep prototype.
6051 * nto-procfs.c: Remove _initialize_procfs prototype.
6052 * nto-tdep.c: Remove _initialize_nto_tdep prototype.
6053 * objc-lang.c: Remove _initialize_objc_language prototype.
6054 * objfiles.c: Remove _initialize_objfiles prototype.
6055 * observer.c: Remove observer_test_first_notification_function,
6056 observer_test_second_notification_function,
6057 observer_test_third_notification_function, and
6058 _initialize_observer prototypes.
6059 * opencl-lang.c: Remove _initialize_opencl_language prototypes.
6060 * osabi.c: Remove _initialize_gdb_osabi prototype.
6061 * osdata.c: Remove _initialize_osdata prototype.
6062 * p-valprint.c: Remove _initialize_pascal_valprint prototype.
6063 * parse.c: Remove _initialize_parse prototype.
6064 * ppc-fbsd-nat.c: Remove _initialize_ppcfbsd_nat prototype.
6065 * ppc-fbsd-tdep.c: Remove _initialize_ppcfbsd_tdep prototype.
6066 * ppc-linux-nat.c: Remove _initialize_ppc_linux_nat prototype.
6067 * ppc-linux-tdep.c: Remove _initialize_ppc_linux_tdep prototype.
6068 * ppc-nbsd-nat.c: Remove _initialize_ppcnbsd_nat prototype.
6069 * ppc-nbsd-tdep.c: Remove _initialize_ppcnbsd_tdep prototype.
6070 * ppc-obsd-nat.c: Remove _initialize_ppcobsd_nat prototype.
6071 * ppc-obsd-tdep.c: Remove _initialize_ppcobsd_tdep prototype.
6072 * printcmd.c: Remove _initialize_printcmd prototype.
6073 * probe.c: Remove _initialize_probe prototype.
6074 * proc-api.c: Remove _initialize_proc_api prototype.
6075 * proc-events.c: Remove _initialize_proc_events prototype.
6076 * proc-service.c: Remove _initialize_proc_service prototype.
6077 * procfs.c: Remove _initialize_procfs prototype.
6078 * psymtab.c: Remove _initialize_psymtab prototype.
6079 * python/python.c: Remove _initialize_python prototype.
6080 * ravenscar-thread.c: Remove _initialize_ravenscar prototype.
6081 * record-btrace.c: Remove _initialize_record_btrace prototype.
6082 * record-full.c: Remove _initialize_record_full prototype.
6083 * record.c: Remove _initialize_record prototype.
6084 * regcache.c: Remove _initialize_regcache prototype.
6085 * reggroups.c: Remove _initialize_reggroup prototype.
6086 * remote-notif.c: Remove _initialize_notif prototype.
6087 * remote-sim.c: Remove _initialize_remote_sim prototype.
6088 * remote.c: Remove _initialize_remote prototype.
6089 * reverse.c: Remove _initialize_reverse prototype.
6090 * rl78-tdep.c: Remove _initialize_rl78_tdep prototype.
6091 * rs6000-aix-tdep.c: Remove _initialize_rs6000_aix_tdep prototype.
6092 * rs6000-lynx178-tdep.c: Remove _initialize_rs6000_lynx178_tdep
6094 * rs6000-nat.c: Remove _initialize_rs6000_nat prototype.
6095 * rs6000-tdep.c: Remove _initialize_rs6000_tdep prototype.
6096 * rust-exp.y: Remove _initialize_rust_exp prototype.
6097 * rx-tdep.c: Remove _initialize_rx_tdep prototype.
6098 * s390-linux-nat.c: Remove _initialize_s390_nat prototype.
6099 * s390-linux-tdep.c: Remove _initialize_s390_tdep prototype.
6100 * score-tdep.c: Remove _initialize_score_tdep prototype.
6101 * selftest-arch.c: Remove _initialize_selftests_foreach_arch
6103 * ser-go32.c: Remove _initialize_ser_dos prototype.
6104 * ser-mingw.c: Remove _initialize_ser_windows prototype.
6105 * ser-pipe.c: Remove _initialize_ser_pipe prototype.
6106 * ser-tcp.c: Remove _initialize_ser_tcp prototype.
6107 * ser-unix.c: Remove _initialize_ser_hardwire prototype.
6108 * serial.c: Remove _initialize_serial prototype.
6109 * sh-linux-tdep.c: Remove _initialize_sh_linux_tdep prototype.
6110 * sh-nbsd-nat.c: Remove _initialize_shnbsd_nat prototype.
6111 * sh-nbsd-tdep.c: Remove _initialize_shnbsd_tdep prototype.
6112 * sh-tdep.c: Remove _initialize_sh_tdep prototype.
6113 * skip.c: Remove _initialize_step_skip prototype.
6114 * sol-thread.c: Remove _initialize_sol_thread prototype.
6115 * solib-aix.c: Remove _initialize_solib_aix prototype.
6116 * solib-darwin.c: Remove _initialize_darwin_solib prototype.
6117 * solib-dsbt.c: Remove _initialize_dsbt_solib prototype.
6118 * solib-frv.c: Remove _initialize_frv_solib prototype.
6119 * solib-spu.c: Remove _initialize_spu_solib prototype.
6120 * solib-svr4.c: Remove _initialize_svr4_solib prototype.
6121 * solib-target.c: Remove _initialize_solib_target prototype.
6122 * solib.c: Remove _initialize_solib prototype.
6123 * source.c: Remove _initialize_source prototype.
6124 * sparc-linux-nat.c: Remove _initialize_sparc_linux_nat prototype.
6125 * sparc-linux-tdep.c: Remove _initialize_sparc_linux_tdep
6127 * sparc-nat.c: Remove _initialize_sparc_nat prototype.
6128 * sparc-nbsd-nat.c: Remove _initialize_sparcnbsd_nat prototype.
6129 * sparc-nbsd-tdep.c: Remove _initialize_sparcnbsd_tdep prototype.
6130 * sparc-obsd-tdep.c: Remove _initialize_sparc32obsd_tdep
6132 * sparc-sol2-nat.c: Remove _initialize_sparc_sol2_nat prototype.
6133 * sparc-sol2-tdep.c: Remove _initialize_sparc_sol2_tdep prototype.
6134 * sparc-tdep.c: Remove _initialize_sparc_tdep prototype.
6135 * sparc64-fbsd-nat.c: Remove _initialize_sparc64fbsd_nat
6137 * sparc64-fbsd-tdep.c: Remove _initialize_sparc64fbsd_tdep
6139 * sparc64-linux-nat.c: Remove _initialize_sparc64_linux_nat
6141 * sparc64-linux-tdep.c: Remove _initialize_sparc64_linux_tdep
6143 * sparc64-nat.c: Remove _initialize_sparc64_nat prototype.
6144 * sparc64-nbsd-nat.c: Remove _initialize_sparc64nbsd_nat
6146 * sparc64-nbsd-tdep.c: Remove _initialize_sparc64nbsd_tdep
6148 * sparc64-obsd-nat.c: Remove _initialize_sparc64obsd_nat
6150 * sparc64-obsd-tdep.c: Remove _initialize_sparc64obsd_tdep
6152 * sparc64-sol2-tdep.c: Remove _initialize_sparc64_sol2_tdep
6154 * spu-linux-nat.c: Remove _initialize_spu_nat prototype.
6155 * spu-multiarch.c: Remove _initialize_spu_multiarch prototype.
6156 * spu-tdep.c: Remove _initialize_spu_tdep prototype.
6157 * stabsread.c: Remove _initialize_stabsread prototype.
6158 * stack.c: Remove _initialize_stack prototype.
6159 * stap-probe.c: Remove _initialize_stap_probe prototype.
6160 * std-regs.c: Remove _initialize_frame_reg prototype.
6161 * symfile-debug.c: Remove _initialize_symfile_debug prototype.
6162 * symfile-mem.c: Remove _initialize_symfile_mem prototype.
6163 * symfile.c: Remove _initialize_symfile prototype.
6164 * symmisc.c: Remove _initialize_symmisc prototype.
6165 * symtab.c: Remove _initialize_symtab prototype.
6166 * target-dcache.c: Remove _initialize_target_dcache prototype.
6167 * target-descriptions.c: Remove _initialize_target_descriptions
6169 * thread.c: Remove _initialize_thread prototype.
6170 * tic6x-linux-tdep.c: Remove _initialize_tic6x_linux_tdep
6172 * tic6x-tdep.c: Remove _initialize_tic6x_tdep prototype.
6173 * tilegx-linux-nat.c: Remove _initialize_tile_linux_nat prototype.
6174 * tilegx-linux-tdep.c: Remove _initialize_tilegx_linux_tdep
6176 * tilegx-tdep.c: Remove _initialize_tilegx_tdep prototype.
6177 * tracefile-tfile.c: Remove _initialize_tracefile_tfile prototype.
6178 * tracefile.c: Remove _initialize_tracefile prototype.
6179 * tracepoint.c: Remove _initialize_tracepoint prototype.
6180 * tui/tui-hooks.c: Remove _initialize_tui_hooks prototype.
6181 * tui/tui-interp.c: Remove _initialize_tui_interp prototype.
6182 * tui/tui-layout.c: Remove _initialize_tui_layout prototype.
6183 * tui/tui-regs.c: Remove _initialize_tui_regs prototype.
6184 * tui/tui-stack.c: Remove _initialize_tui_stack prototype.
6185 * tui/tui-win.c: Remove _initialize_tui_win prototype.
6186 * tui/tui.c: Remove _initialize_tui prototype.
6187 * typeprint.c: Remove _initialize_typeprint prototype.
6188 * user-regs.c: Remove _initialize_user_regs prototype.
6189 * utils.c: Remove _initialize_utils prototype.
6190 * v850-tdep.c: Remove _initialize_v850_tdep prototype.
6191 * valarith.c: Remove _initialize_valarith prototype.
6192 * valops.c: Remove _initialize_valops prototype.
6193 * valprint.c: Remove _initialize_valprint prototype.
6194 * value.c: Remove _initialize_values prototype.
6195 * varobj.c: Remove _initialize_varobj prototype.
6196 * vax-bsd-nat.c: Remove _initialize_vaxbsd_nat prototype.
6197 * vax-nbsd-tdep.c: Remove _initialize_vaxnbsd_tdep prototype.
6198 * vax-tdep.c: Remove _initialize_vax_tdep prototype.
6199 * windows-nat.c: Remove _initialize_windows_nat,
6200 _initialize_check_for_gdb_ini, and _initialize_loadable
6202 * windows-tdep.c: Remove _initialize_windows_tdep prototype.
6203 * xcoffread.c: Remove _initialize_xcoffread prototype.
6204 * xml-support.c: Remove _initialize_xml_support prototype.
6205 * xstormy16-tdep.c: Remove _initialize_xstormy16_tdep prototype.
6206 * xtensa-linux-nat.c: Remove _initialize_xtensa_linux_nat
6208 * xtensa-linux-tdep.c: Remove _initialize_xtensa_linux_tdep
6210 * xtensa-tdep.c: Remove _initialize_xtensa_tdep prototype.
6212 2017-09-08 Keith Seitz <keiths@redhat.com>
6214 * dwarf2read.c (struct field_info) <fnfields>: Remove unused
6217 2017-09-08 Christoph Weinmann <christoph.t.weinmann@intel.com>
6219 * f-valprint.c (f_val_print): Remove check for one byte
6220 sized integers. Remove printing of character type.
6222 2017-09-08 Frank Penczek <frank.penczek@intel.com>
6223 Christoph Weinmann <christoph.t.weinmann@intel.com>
6224 Bernhard Heckel <bernhard.heckel@intel.com>
6226 * f-typeprint.c (f_type_print_base): Use fprintfi_filtered
6227 to maintain proper indentation when printing pointers/refs.
6229 2017-09-07 Joel Brobecker <brobecker@adacore.com>
6233 2017-09-07 Joel Brobecker <brobecker@adacore.com>
6235 * NEWS (Changes in GDB 7.11): Remove entry for QStartupWithShell.
6237 2017-09-05 Tom Tromey <tom@tromey.com>
6239 * parse.c (funcall_chain): Now a std::vector.
6240 (start_arglist, end_arglist): Simplify.
6241 (free_funcalls): Remove.
6242 (parse_exp_in_context_1): Remove cleanup.
6244 2017-09-05 Tom Tromey <tom@tromey.com>
6246 * go-exp.y (go_parse): Don't create a cleanup.
6248 2017-09-05 Tom Tromey <tom@tromey.com>
6250 * d-exp.y (PrimaryExpression): Use std::string.
6251 (d_parse): Don't create a cleanup.
6253 2017-09-05 Tom Tromey <tom@tromey.com>
6255 * utils.c (do_clear_parser_state): Remove.
6256 (make_cleanup_clear_parser_state): Remove.
6257 * p-exp.y (pascal_parse): Use scoped_restore.
6258 * m2-exp.y (m2_parse): Use scoped_restore.
6259 * f-exp.y (f_parse): Use scoped_restore.
6260 * d-exp.y (d_parse): Use scoped_restore.
6261 * c-exp.y (c_parse): Use scoped_restore.
6262 * ada-exp.y (ada_parse): Use scoped_restore.
6263 * utils.h (make_cleanup_clear_parser_state): Remove.
6265 2017-09-06 Keith Seitz <keiths@redhat.com>
6267 * dwarf2read.c (dw2_linkage_name_attr): New function.
6268 (dw2_linkage_name): New function.
6269 (dwarf2_compute_name, dwarf2_physname, read_call_site_scope)
6270 (guess_full_die_structure_name, dwarf2_name): Use dw2_linkage_name.
6271 (anonymous_struct_prefix, dwarf2_name): Use dw2_linkage_name_attr.
6273 2017-09-06 Kamil Rytarowski <n54@gmx.com>
6275 * config/djgpp/djconfig.sh: Correct shell portability issue.
6277 2017-09-06 Kamil Rytarowski <n54@gmx.com>
6279 * configure.nat: Define HAVE_NATIVE_GCORE_HOST on NetBSD.
6281 2017-09-06 John Baldwin <jhb@FreeBSD.org>
6283 * Makefile.in (ALLDEPFILES): Add mips-fbsd-nat.c.
6284 * NEWS: Mention new FreeBSD/mips native configuration.
6285 * configure.host: Add aarch64*-*-freebsd*.
6286 * configure.nat: Likewise.
6287 * aarch64-fbsd-nat.c: New file.
6289 2017-09-06 John Baldwin <jhb@FreeBSD.org>
6291 * Makefile.in (ALL_64_TARGET_OBS): Add aarch64-fbsd-tdep.o.
6292 (ALLDEPFILES): Add aarch64-fbsd-tdep.c.
6293 * NEWS: Mention new FreeBSD/aarch64 target.
6294 * configure.tgt: Add aarch64*-*-freebsd*.
6295 * aarch64-fbsd-tdep.c: New file.
6296 * aarch64-fbsd-tdep.h: New file.
6298 2017-09-06 Kamil Rytarowski <n54@gmx.com>
6300 * MAINTAINERS (Write After Approval): Add Kamil Rytarowski.
6302 2017-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
6304 * parse.c (find_minsym_type_and_address): Don't relocate addresses
6307 2017-09-05 Philippe Waroquiers <philippe.waroquiers@skynet.be>
6309 * objfiles.c (get_objfile_bfd_data): Remove useless obstack_init
6312 2017-09-05 Simon Marchi <simon.marchi@ericsson.com>
6314 * infrun.c (follow_exec): Call add_thread after
6315 target_find_description.
6317 2017-09-05 Simon Marchi <simon.marchi@ericsson.com>
6319 * infrun.c (handle_inferior_event_1): When exec'ing, read
6320 stop_pc after follow_exec.
6322 2017-09-05 Simon Marchi <simon.marchi@ericsson.com>
6324 * remote.c (process_g_packet): Update error message.
6326 2017-09-05 Yao Qi <yao.qi@linaro.org>
6328 * configure.tgt (gdb_target_obs): Add i386.o for x86_64-*
6331 2017-09-05 Pedro Alves <palves@redhat.com>
6333 * eval.c (eval_call, evaluate_funcall): New functions, factored
6335 (evaluate_subexp_standard): ... this.
6337 2017-09-05 Yao Qi <yao.qi@linaro.org>
6339 * amd64-tdep.c (amd64_target_description): Create target
6341 (_initialize_amd64_tdep): Don't call functions
6342 initialize_tdesc_amd64_*. Add self tests.
6343 * arch/amd64.c (amd64_create_target_description): Add parameter
6344 is_linux. Call set_tdesc_osabi if is_linux is true.
6345 * arch/amd64.h (amd64_create_target_description): Update the
6347 * arch/i386.c (i386_create_target_description): Add parameter
6348 is_linux. Call set_tdesc_osabi if is_linux is true.
6349 * arch/i386.h (i386_create_target_description): Update
6351 * configure.tgt: Add i386.o to gdb_target_obs.
6352 * features/Makefile (XMLTOC): Remove i386/*.xml.
6353 * features/i386/amd64-avx-avx512.c: Remove.
6354 * features/i386/amd64-avx-mpx-avx512-pku.c: Remove.
6355 * features/i386/amd64-avx-mpx.c: Remove.
6356 * features/i386/amd64-avx.c: Remove.
6357 * features/i386/amd64-mpx.c: Remove.
6358 * features/i386/amd64.c: Remove.
6359 * features/i386/i386-avx-avx512.c: Remove.
6360 * features/i386/i386-avx-mpx-avx512-pku.c: Remove.
6361 * features/i386/i386-avx-mpx.c: Remove.
6362 * features/i386/i386-avx.c: Remove.
6363 * features/i386/i386-mmx.c: Remove.
6364 * features/i386/i386-mpx.c: Remove.
6365 * features/i386/i386.c: Remove.
6366 * i386-tdep.c: Don't include features/i386/i386*.c., include
6367 target-descriptions.h and arch/i386.h.
6368 (i386_target_description): Create target descriptions.
6369 (i386_gdbarch_init): Don't call initialize_tdesc_i386_*
6370 functions. Do self tests.
6372 2017-09-05 Yao Qi <yao.qi@linaro.org>
6374 * features/Makefile (XMLTOC): Remove i386/amd64XXX-linux.xml.
6375 * features/i386/amd64-avx-avx512-linux.c: Removed.
6376 * features/i386/amd64-avx-linux.c: Removed.
6377 * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Removed.
6378 * features/i386/amd64-avx-mpx-linux.c: Removed.
6379 * features/i386/amd64-linux.c: Removed.
6380 * features/i386/amd64-mpx-linux.c: Removed.
6381 * features/i386/x32-avx-avx512-linux.c: Removed.
6382 * features/i386/x32-avx-linux.c: Removed.
6383 * features/i386/x32-linux.c: Removed.
6385 2017-09-05 Yao Qi <yao.qi@linaro.org>
6387 * amd64-linux-tdep.c: Include arch/amd64.h. Don't include
6389 (amd64_linux_read_description): Call
6390 amd64_create_target_description.
6391 * arch/amd64.c: New file.
6392 * arch/amd64.h: New file.
6393 * configure.tgt (x86_64-*-linux*): Append amd64.o.
6394 * Makefile.in (ALL_64_TARGET_OBS): Append amd64.o.
6396 2017-09-05 Yao Qi <yao.qi@linaro.org>
6398 * amd64-linux-tdep.c: Don't include amd64-XXX-linux and
6399 x32-XXX-linux.c. Include 64bit-XX.c and x32-XX.c.
6400 (amd64_linux_read_description): Create target descriptions.
6401 (_initialize_amd64_linux_tdep): Don't call initialize_tdesc_XXX
6402 functions. Add unit tests.
6403 * features/Makefile (FEATURE_XMLFILES): Append 64bit-XXX.xml and
6405 * features/i386/64bit-avx.c: Generated.
6406 * features/i386/64bit-avx512.c: Generated.
6407 * features/i386/64bit-core.c: Generated.
6408 * features/i386/64bit-linux.c: Generated.
6409 * features/i386/64bit-mpx.c: Generated.
6410 * features/i386/64bit-pkeys.c: Generated.
6411 * features/i386/64bit-segments.c: Generated.
6412 * features/i386/64bit-sse.c: Generated.
6413 * features/i386/x32-core.c: Generated.
6414 * target-descriptions.c (maint_print_c_tdesc_cmd): Print feature
6415 c files for amd64-linux and x32-linux.
6417 2017-09-05 Yao Qi <yao.qi@linaro.org>
6419 * amd64-linux-tdep.c (amd64_linux_read_description): New
6421 (amd64_linux_core_read_description): Call
6422 amd64_linux_read_description.
6423 (amd64_linux_init_abi): Likewise.
6424 (amd64_x32_linux_init_abi): Likewise.
6425 * amd64-linux-tdep.h (amd64_linux_read_description): Declare.
6426 * x86-linux-nat.c (x86_linux_read_description): Call
6427 amd64_linux_read_description.
6429 2017-09-05 Yao Qi <yao.qi@linaro.org>
6431 * amd64-linux-tdep.c (amd64_linux_core_read_description): Update
6434 2017-09-05 Yao Qi <yao.qi@linaro.org>
6436 * features/Makefile (XMLTOC): Remove i386/i386-XX-linux.xml.
6437 * features/i386/i386-avx-avx512-linux.c: Remove.
6438 * features/i386/i386-avx-linux.c: Remove.
6439 * features/i386/i386-avx-mpx-avx512-pku-linux.c: Remove.
6440 * features/i386/i386-avx-mpx-linux.c: Remove.
6441 * features/i386/i386-linux.c: Remove.
6442 * features/i386/i386-mmx-linux.c: Remove.
6443 * features/i386/i386-mpx-linux.c: Remove.
6445 2017-09-05 Yao Qi <yao.qi@linaro.org>
6447 * Makefile.in (ALL_TARGET_OBS): Add i386.o.
6448 (SFILES): Add arch/i386.c.
6449 (HFILES_NO_SRCDIR): Add arch/i386.h.
6450 * arch/i386.c: New file.
6451 * arch/i386.h: New file.
6452 * arch/tdesc.h (allocate_target_description): Declare.
6453 (set_tdesc_architecture): Declare.
6454 (set_tdesc_osabi): Declare.
6455 * configure.tgt (i[34567]86-*-linux*): Add i386.o.
6456 * i386-linux-tdep.c: Don't include ../features/i386/32bit-XXX.c.
6457 include arch/i386.h.
6458 (i386_linux_read_description): Remove code and call
6459 i386_create_target_description.
6460 (set_tdesc_architecture): New function.
6461 (set_tdesc_osabi): New function.
6462 * target-descriptions.h (allocate_target_description): Remove.
6464 2017-09-05 Yao Qi <yao.qi@linaro.org>
6466 * arch/tdesc.h (tdesc_create_feature): Add an argument xml.
6467 * target-descriptions.c (tdesc_create_feature): Likewise, and
6469 * features/i386/32bit-avx.c: Re-generated.
6470 * features/i386/32bit-avx512.c: Re-generated.
6471 * features/i386/32bit-core.c: Re-generated.
6472 * features/i386/32bit-linux.c: Re-generated.
6473 * features/i386/32bit-mpx.c: Re-generated.
6474 * features/i386/32bit-pkeys.c: Re-generated.
6475 * features/i386/32bit-sse.c: Re-generated.
6477 2017-09-05 Yao Qi <yao.qi@linaro.org>
6479 * regformats/regdef.h (struct reg): Override operator == and !=.
6481 2017-09-05 Yao Qi <yao.qi@linaro.org>
6483 * arch/tdesc.h: New file.
6484 * regformats/regdat.sh: Generate code using tdesc_create_reg.
6485 * target-descriptions.c: Update comments.
6486 * target-descriptions.h: Include "arch/tdesc.h". Remove the
6488 * features/i386/32bit-avx.c: Re-generated.
6489 * features/i386/32bit-avx512.c: Re-generated.
6490 * features/i386/32bit-core.c: Re-generated.
6491 * features/i386/32bit-linux.c: Re-generated.
6492 * features/i386/32bit-mpx.c: Re-generated.
6493 * features/i386/32bit-pkeys.c: Re-generated.
6494 * features/i386/32bit-sse.c: Re-generated.
6496 2017-09-05 Yao Qi <yao.qi@linaro.org>
6498 * regformats/regdat.sh: Update generated code.
6500 2017-09-05 Yao Qi <yao.qi@linaro.org>
6502 * regformats/regdat.sh: Adjust code order.
6504 2017-09-05 Simon Marchi <simon.marchi@ericsson.com>
6506 * expprint.c (dump_subexp_body_standard): Use constant format
6507 string in fprintf_filtered call.
6509 2017-09-04 John Baldwin <jhb@FreeBSD.org>
6511 * configure.nat: Add "x86-nat.o x86-dregs.o" for NetBSD/amd64 and
6513 * x86-bsd-nat.c [!DBREG_DRX && __NetBSD__]: Define DBREG_DRX.
6515 2017-09-04 John Baldwin <jhb@FreeBSD.org>
6517 * bsd-kvm.o: Make <sys/user.h> conditional on HAVE_SYS_USER_H.
6519 2017-09-04 John Baldwin <jhb@FreeBSD.org>
6521 * bsd-kvm.o: Define _KMEMUSER.
6522 * configure.ac: Define _KMEMUSER when checking for "struct lwp".
6523 * configure: Regenerate.
6525 2017-09-04 John Baldwin <jhb@FreeBSD.org>
6527 * amd64-fbsd-nat.c: Add include of "x86-xstate.h".
6528 * i386-fbsd-nat.c: Likewise.
6530 2017-09-04 John Baldwin <jhb@FreeBSD.org>
6532 * unittests/array-view-selftests.c: Add include of <array>.
6534 2017-09-04 John Baldwin <jhb@FreeBSD.org>
6536 * spu-tdep.c (flush_ea_cache): Add missing argument to
6537 call_function_by_hand.
6539 2017-09-04 Pedro Alves <palves@redhat.com>
6541 * NEWS (Safer support for debugging with no debug info): New.
6543 2017-09-04 Pedro Alves <palves@redhat.com>
6545 * c-exp.y (function_method, function_method_void): Add current
6546 instance flags to TYPE_INSTANCE.
6547 * dwarf2read.c (check_modifier): New.
6548 (compute_delayed_physnames): Assert that only C++ adds delayed
6549 physnames. Mark fn_fields as const/volatile depending on
6551 * eval.c (make_params): New type_instance_flags parameter. Use
6552 it as the new type's instance flags.
6553 (evaluate_subexp_standard) <TYPE_INSTANCE>: Extract the instance
6554 flags element and pass it to make_params.
6555 * expprint.c (print_subexp_standard) <TYPE_INSTANCE>: Handle
6556 instance flags element.
6557 (dump_subexp_body_standard) <TYPE_INSTANCE>: Likewise.
6558 * gdbtypes.h: Include "enum-flags.h".
6559 (type_instance_flags): New enum-flags type.
6560 (TYPE_CONST, TYPE_VOLATILE, TYPE_RESTRICT, TYPE_ATOMIC)
6561 (TYPE_CODE_SPACE, TYPE_DATA_SPACE): Return boolean.
6562 * parse.c (operator_length_standard) <TYPE_INSTANCE>: Adjust.
6563 (follow_type_instance_flags): New function.
6564 (operator_check_standard) <TYPE_INSTANCE>: Adjust.
6565 * parser-defs.h (follow_type_instance_flags): Declare.
6566 * valops.c (value_struct_elt_for_reference): const/volatile must
6569 2017-09-04 Pedro Alves <palves@redhat.com>
6571 * cp-namespace.c (cp_search_static_and_baseclasses): Handle
6572 function/method scopes; lookup the nested name as a function local
6575 2017-09-04 Pedro Alves <palves@redhat.com>
6577 (%type <voidval>): Add function_method.
6578 * c-exp.y (exp): New production for calls with no arguments.
6579 (function_method, function_method_void_or_typelist): New
6581 (exp): New production for "method()::static_var".
6582 * eval.c (evaluate_subexp_standard): Handle OP_FUNC_STATIC_VAR.
6583 * expprint.c (print_subexp_standard, dump_subexp_body_standard):
6584 Handle OP_FUNC_STATIC_VAR.
6585 * parse.c (operator_length_standard):
6586 Handle OP_FUNC_STATIC_VAR.
6588 2017-09-04 Pedro Alves <palves@redhat.com>
6590 * eval.c (evaluate_subexp_standard): Remove UNOP_MEMVAL_TLS
6592 * expprint.c (print_subexp_standard, dump_subexp_body_standard):
6594 * parse.c (operator_length_standard, operator_check_standard):
6596 * std-operator.def (UNOP_MEMVAL_TLS): Delete.
6598 2017-09-04 Pedro Alves <palves@redhat.com>
6600 * ax-gdb.c: Include "typeprint.h".
6601 (gen_expr_for_cast): New function.
6602 (gen_expr) <OP_CAST, OP_CAST_TYPE>: Use it.
6603 <OP_VAR_VALUE, OP_MSYM_VAR_VALUE>: Error out if the variable's
6605 * dwarf2read.c (new_symbol_full): Fallback to int instead of
6606 nodebug_data_symbol.
6607 * eval.c: Include "typeprint.h".
6608 (evaluate_subexp_standard) <OP_VAR_VALUE, OP_VAR_MSYM_VALUE>:
6609 Error out if symbol has unknown type.
6610 <UNOP_CAST, UNOP_CAST_TYPE>: Common bits factored out to
6611 evaluate_subexp_for_cast.
6612 (evaluate_subexp_for_address, evaluate_subexp_for_sizeof): Handle
6614 (evaluate_subexp_for_cast): New function.
6615 * gdbtypes.c (init_nodebug_var_type): New function.
6616 (objfile_type): Use it to initialize types of variables with no
6618 * typeprint.c (error_unknown_type): New.
6619 * typeprint.h (error_unknown_type): New declaration.
6620 * compile/compile-c-types.c (convert_type_basic): Handle
6621 TYPE_CODE_ERROR; warn and fallback to int for variables with
6624 2017-09-04 Pedro Alves <palves@redhat.com>
6626 * eval.c (evaluate_var_value): New function, factored out from ...
6627 (evaluate_subexp_standard): ... here.
6629 2017-09-04 Pedro Alves <palves@redhat.com>
6631 * eval.c (evaluate_subexp_standard) <UNOP_COMPLEMENT, UNOP_ADDR>:
6632 Remove useless assignments to 'op'.
6634 2017-09-04 Pedro Alves <palves@redhat.com>
6636 * eval.c (eval_skip_value): New function.
6637 (evaluate_subexp_standard): Use it.
6639 2017-09-04 Pedro Alves <palves@redhat.com>
6641 * eval.c (evaluate_subexp_standard): <OP_FUNCALL>: Extract
6642 function name from symbol/minsym and pass it to
6643 error_call_unknown_return_type.
6645 2017-09-04 Pedro Alves <palves@redhat.com>
6647 * ada-lang.c (resolve_subexp): Handle OP_VAR_MSYM_VALUE.
6648 * ax-gdb.c (gen_msym_var_ref): New function.
6649 (gen_expr): Handle OP_VAR_MSYM_VALUE.
6650 * eval.c (evaluate_var_msym_value): New function.
6651 * eval.c (evaluate_subexp_standard): Handle OP_VAR_MSYM_VALUE.
6652 <OP_FUNCALL>: Extract function name from symbol/minsym and pass it
6653 to call_function_by_hand.
6654 * expprint.c (print_subexp_standard, dump_subexp_body_standard):
6655 Handle OP_VAR_MSYM_VALUE.
6656 (union exp_element) <msymbol>: New field.
6657 * minsyms.h (struct type): Forward declare.
6658 (find_minsym_type_and_address): Declare.
6659 * parse.c (write_exp_elt_msym): New function.
6660 (write_exp_msymbol): Delete, refactored as ...
6661 (find_minsym_type_and_address): ... this new function.
6662 (write_exp_msymbol): Reimplement using OP_VAR_MSYM_VALUE.
6663 (operator_length_standard, operator_check_standard): Handle
6665 * std-operator.def (OP_VAR_MSYM_VALUE): New.
6667 2017-09-04 Pedro Alves <palves@redhat.com>
6669 * ada-lang.c (ada_evaluate_subexp) <TYPE_CODE_FUNC>: Don't handle
6670 TYPE_GNU_IFUNC specially here. Throw error if return type is
6672 * ada-typeprint.c (print_func_type): Handle functions with unknown
6674 * c-typeprint.c (c_type_print_base): Handle functions and methods
6675 with unknown return type.
6676 * compile/compile-c-symbols.c (convert_symbol_bmsym)
6677 <mst_text_gnu_ifunc>: Use nodebug_text_gnu_ifunc_symbol.
6678 * compile/compile-c-types.c: Include "objfiles.h".
6679 (convert_func): For functions with unknown return type, warn and
6681 * compile/compile-object-run.c (compile_object_run): Adjust call
6682 to call_function_by_hand_dummy.
6683 * elfread.c (elf_gnu_ifunc_resolve_addr): Adjust call to
6684 call_function_by_hand.
6685 * eval.c (evaluate_subexp_standard): Adjust calls to
6686 call_function_by_hand. Handle functions and methods with unknown
6687 return type. Pass expect_type to call_function_by_hand.
6688 * f-typeprint.c (f_type_print_base): Handle functions with unknown
6690 * gcore.c (call_target_sbrk): Adjust call to
6691 call_function_by_hand.
6692 * gdbtypes.c (objfile_type): Leave nodebug text symbol with NULL
6693 return type instead of int. Make nodebug_text_gnu_ifunc_symbol be
6694 an integer address type instead of nodebug.
6695 * guile/scm-value.c (gdbscm_value_call): Adjust call to
6696 call_function_by_hand.
6697 * infcall.c (error_call_unknown_return_type): New function.
6698 (call_function_by_hand): New "default_return_type" parameter.
6700 (call_function_by_hand_dummy): New "default_return_type"
6701 parameter. Use it instead of defaulting to int. If there's no
6702 default and the return type is unknown, throw an error. If
6703 there's a default return type, and the called function has no
6704 debug info, then assume the function is prototyped.
6705 * infcall.h (call_function_by_hand, call_function_by_hand_dummy):
6706 New "default_return_type" parameter.
6707 (error_call_unknown_return_type): New declaration.
6708 * linux-fork.c (call_lseek): Cast return type of lseek.
6709 (inferior_call_waitpid, checkpoint_command): Adjust calls to
6710 call_function_by_hand.
6711 * linux-tdep.c (linux_infcall_mmap, linux_infcall_munmap): Adjust
6712 calls to call_function_by_hand.
6713 * m2-typeprint.c (m2_procedure): Handle functions with unknown
6715 * objc-lang.c (lookup_objc_class, lookup_child_selector)
6716 (value_nsstring, print_object_command): Adjust calls to
6717 call_function_by_hand.
6718 * p-typeprint.c (pascal_type_print_varspec_prefix): Handle
6719 functions with unknown return type.
6720 (pascal_type_print_func_varspec_suffix): New function.
6721 (pascal_type_print_varspec_suffix) <TYPE_CODE_FUNC,
6722 TYPE_CODE_METHOD>: Use it.
6723 * python/py-value.c (valpy_call): Adjust call to
6724 call_function_by_hand.
6725 * rust-lang.c (rust_evaluate_funcall): Adjust call to
6726 call_function_by_hand.
6727 * valarith.c (value_x_binop, value_x_unop): Adjust calls to
6728 call_function_by_hand.
6729 * valops.c (value_allocate_space_in_inferior): Adjust call to
6730 call_function_by_hand.
6731 * typeprint.c (type_print_unknown_return_type): New function.
6732 * typeprint.h (type_print_unknown_return_type): New declaration.
6734 2017-09-04 Pedro Alves <palves@redhat.com>
6736 * gdbtypes.c (lookup_function_type_with_arguments): Mark function
6737 types with more than one parameter as prototyped.
6739 2017-09-04 Pedro Alves <palves@redhat.com>
6741 * cli/cli-cmds.c (print_disassembly, disassemble_current_function)
6742 (disassemble_command): Use gdb_disassembly_flags instead of bare
6744 * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn)
6745 (dump_insns, do_mixed_source_and_assembly_deprecated)
6746 (do_mixed_source_and_assembly, do_assembly_only, gdb_disassembly):
6747 Use gdb_disassembly_flags instead of bare int.
6748 * disasm.h (DISASSEMBLY_SOURCE_DEPRECATED, DISASSEMBLY_RAW_INSN)
6749 (DISASSEMBLY_OMIT_FNAME, DISASSEMBLY_FILENAME)
6750 (DISASSEMBLY_OMIT_PC, DISASSEMBLY_SOURCE)
6751 (DISASSEMBLY_SPECULATIVE): No longer macros. Instead they're...
6752 (enum gdb_disassembly_flag): ... values of this new enumeration.
6753 (gdb_disassembly_flags): Define.
6755 (gdb_pretty_print_disassembler::pretty_print_insn): Use it.
6756 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Use
6757 gdb_disassembly_flags instead of bare int.
6758 * record-btrace.c (btrace_insn_history)
6759 (record_btrace_insn_history, record_btrace_insn_history_range)
6760 (record_btrace_insn_history_from): Use gdb_disassembly_flags
6761 instead of bare int.
6762 * record.c (get_insn_history_modifiers, cmd_record_insn_history):
6763 Use gdb_disassembly_flags instead of bare int.
6764 * target-debug.h (target_debug_print_gdb_disassembly_flags):
6766 * target-delegates.c: Regenerate.
6767 * target.c (target_insn_history, target_insn_history_from)
6768 (target_insn_history_range): Use gdb_disassembly_flags instead of
6770 * target.h: Include "disasm.h".
6771 (struct target_ops) <to_insn_history, to_insn_history_from,
6772 to_insn_history_range>: Use gdb_disassembly_flags instead of bare
6774 (target_insn_history, target_insn_history_from)
6775 (target_insn_history_range): Use gdb_disassembly_flags instead of
6778 2017-09-04 Simon Marchi <simon.marchi@ericsson.com>
6780 * cli/cli-script.c (build_command_line): For if/while commands,
6781 check whether args is empty.
6783 2017-09-04 Simon Marchi <simon.marchi@ericsson.com>
6785 * cli/cli-script.h (enum misc_command_type): Move from defs.h.
6786 (enum command_control_type): Likewise.
6787 (struct command_line): Likewise.
6788 (free_command_lines): Likewise.
6789 (struct command_lines_deleter): Likewise.
6790 (command_line_up): Likewise.
6791 (read_command_lines): Likewise.
6792 (read_command_lines_1): Likewise.
6793 * defs.h (enum misc_command_type): Move to cli/cli-script.h.
6794 (enum command_control_type): Likewise.
6795 (struct command_line): Likewise.
6796 (free_command_lines): Likewise.
6797 (struct command_lines_deleter): Likewise.
6798 (command_line_up): Likewise.
6799 (read_command_lines): Likewise.
6800 (read_command_lines_1): Likewise.
6801 * breakpoint.h: Include cli/cli-script.h.
6802 * extension-priv.h: Likewise.
6803 * gdbcmd.h: Likewise.
6805 2017-09-04 Pedro Alves <palves@redhat.com>
6807 * ada-lang.c (is_known_support_routine): Move sal declaration to
6808 where it is initialized.
6809 * breakpoint.c (create_internal_breakpoint, init_catchpoint)
6810 (parse_breakpoint_sals, decode_static_tracepoint_spec)
6811 (clear_command, update_static_tracepoint): Remove init_sal
6812 references. Move declarations closer to initializations.
6813 * cli/cli-cmds.c (list_command): Move sal declarations closer to
6815 * elfread.c (elf_gnu_ifunc_resolver_stop): Remove init_sal
6816 references. Move sal declarations closer to initializations.
6817 * frame.c (find_frame_sal): Return a symtab_and_line via function
6818 return instead of output parameter. Remove init_sal references.
6819 * frame.h (find_frame_sal): Return a symtab_and_line via function
6820 return instead of output parameter.
6821 * guile/scm-frame.c (gdbscm_frame_sal): Adjust.
6822 * guile/scm-symtab.c (stscm_make_sal_smob): Use in-place new
6824 (gdbscm_find_pc_line): Remove init_sal reference.
6825 * infcall.c (call_function_by_hand_dummy): Remove init_sal
6826 references. Move declarations closer to initializations.
6827 * infcmd.c (set_step_frame): Update. Move declarations closer to
6829 (finish_backward): Remove init_sal references. Move declarations
6830 closer to initializations.
6831 * infrun.c (process_event_stop_test, handle_step_into_function)
6832 (insert_hp_step_resume_breakpoint_at_frame)
6833 (insert_step_resume_breakpoint_at_caller): Likewise.
6834 * linespec.c (create_sals_line_offset, decode_digits_ordinary)
6835 (symbol_to_sal): Likewise.
6836 * probe.c (parse_probes_in_pspace): Remove init_sal reference.
6837 * python/py-frame.c (frapy_find_sal): Move sal declaration closer
6838 to its initialization.
6839 * reverse.c (save_bookmark_command): Use new/delete. Remove
6840 init_sal references. Move declarations closer to initializations.
6841 * source.c (get_current_source_symtab_and_line): Remove brace
6843 (set_current_source_symtab_and_line): Now takes the sal by const
6844 reference. Remove brace initialization.
6845 (line_info): Remove init_sal reference.
6846 * source.h (set_current_source_symtab_and_line): Now takes a
6847 symtab_and_line via const reference.
6848 * stack.c (set_current_sal_from_frame): Adjust.
6849 (print_frame_info): Adjust.
6850 (get_last_displayed_sal): Return the sal via function return
6851 instead of via output parameter. Simplify.
6852 (frame_info): Adjust.
6853 * stack.h (get_last_displayed_sal): Return the sal via function
6854 return instead of via output parameter.
6855 * symtab.c (init_sal): Delete.
6856 (find_pc_sect_line): Remove init_sal references. Move
6857 declarations closer to initializations.
6858 (find_function_start_sal): Remove init_sal references. Move
6859 declarations closer to initializations.
6860 * symtab.h (struct symtab_and_line): In-class initialize all
6862 * tracepoint.c (set_traceframe_context)
6863 (print_one_static_tracepoint_marker): Remove init_sal references.
6864 Move declarations closer to initializations.
6865 * tui/tui-disasm.c (tui_show_disassem_and_update_source): Adjust.
6866 * tui/tui-stack.c (tui_show_frame_info): Adjust. Move
6867 declarations closer to initializations.
6868 * tui/tui-winsource.c (tui_update_source_window_as_is): Remove
6869 init_sal references. Adjust.
6871 2017-09-04 Pedro Alves <palves@redhat.com>
6873 * ax-gdb.c (agent_command_1): Use range-for.
6874 * break-catch-throw.c (re_set_exception_catchpoint): Update.
6875 * breakpoint.c: Include "common/array-view.h".
6876 (init_breakpoint_sal, create_breakpoint_sal): Change sals
6877 parameter from struct symtabs_and_lines to
6878 array_view<symtab_and_line>. Adjust. Use range-for. Update.
6879 (breakpoint_sals_to_pc): Change sals parameter from struct
6880 symtabs_and_lines to std::vector reference.
6881 (check_fast_tracepoint_sals): Change sals parameter from struct
6882 symtabs_and_lines to std::array_view. Use range-for.
6883 (decode_static_tracepoint_spec): Return a std::vector instead of
6884 symtabs_and_lines. Update.
6885 (create_breakpoint): Update.
6886 (break_range_command, until_break_command, clear_command): Update.
6887 (base_breakpoint_decode_location, bkpt_decode_location)
6888 (bkpt_probe_create_sals_from_location)
6889 (bkpt_probe_decode_location, tracepoint_decode_location)
6890 (tracepoint_probe_decode_location)
6891 (strace_marker_create_sals_from_location): Return a std::vector
6892 instead of symtabs_and_lines.
6893 (strace_marker_create_breakpoints_sal): Update.
6894 (strace_marker_decode_location): Return a std::vector instead of
6895 symtabs_and_lines. Update.
6896 (update_breakpoint_locations): Change struct symtabs_and_lines
6897 parameters to gdb::array_view. Adjust.
6898 (location_to_sals): Return a std::vector instead of
6899 symtabs_and_lines. Update.
6900 (breakpoint_re_set_default): Use std::vector instead of struct
6902 (decode_location_default): Return a std::vector instead of
6903 symtabs_and_lines. Update.
6904 * breakpoint.h: Include "common/array-view.h".
6905 (struct breakpoint_ops) <decode_location>: Now returns a
6906 std::vector instead of returning a symtabs_and_lines via output
6908 (update_breakpoint_locations): Change sals parameters to use
6910 * cli/cli-cmds.c (edit_command, list_command): Update to use
6911 std::vector and gdb::array_view.
6912 (ambiguous_line_spec): Adjust to use gdb::array_view and
6914 (compare_symtabs): Rename to ...
6915 (cmp_symtabs): ... this. Change parameters to symtab_and_line
6916 const reference and adjust.
6917 (filter_sals): Rewrite using std::vector and standard algorithms.
6918 * elfread.c (elf_gnu_ifunc_resolver_return_stop): Simplify.
6919 (jump_command): Update to use std::vector.
6920 * linespec.c (struct linespec_state) <canonical_names>: Update
6922 (add_sal_to_sals_basic): Delete.
6923 (add_sal_to_sals, filter_results, convert_results_to_lsals)
6924 (decode_line_2, create_sals_line_offset)
6925 (convert_address_location_to_sals, convert_linespec_to_sals)
6926 (convert_explicit_location_to_sals, parse_linespec)
6927 (event_location_to_sals, decode_line_full, decode_line_1)
6928 (decode_line_with_current_source)
6929 (decode_line_with_last_displayed, decode_objc)
6930 (decode_digits_list_mode, decode_digits_ordinary, minsym_found)
6931 (linespec_result::~linespec_result): Adjust to use std::vector
6932 instead of symtabs_and_lines.
6933 * linespec.h (linespec_sals::sals): Now a std::vector.
6934 (struct linespec_result): Use std::vector, bool, and in-class
6936 (decode_line_1, decode_line_with_current_source)
6937 (decode_line_with_last_displayed): Return std::vector.
6938 * macrocmd.c (info_macros_command): Use std::vector.
6939 * mi/mi-main.c (mi_cmd_trace_find): Use std::vector.
6940 * probe.c (parse_probes_in_pspace, parse_probes): Adjust to use
6942 * probe.h (parse_probes): Return a std::vector.
6943 * python/python.c (gdbpy_decode_line): Use std::vector and
6945 * source.c (select_source_symtab, line_info): Use std::vector.
6946 * stack.c (func_command): Use std::vector.
6947 * symtab.h (struct symtabs_and_lines): Delete.
6948 * tracepoint.c (tfind_line_command, scope_info): Use std::vector.
6950 2017-09-04 Pedro Alves <palves@redhat.com>
6952 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
6953 unittests/array-view-selftests.c.
6954 (SUBDIR_UNITTESTS_OBS): Add array-view-selftests.o.
6955 * common/array-view.h: New file.
6956 * unittests/array-view-selftests.c: New file.
6958 2017-09-04 Pedro Alves <palves@redhat.com>
6960 * cli/cli-cmds.c (edit_command): Pass message to
6961 ambiguous_line_spec.
6962 (list_command): Pass message to ambiguous_line_spec. Say
6963 "first"/"last" instead of "start" and "end" to be consistent with
6965 (ambiguous_line_spec): Add 'format' and vararg parameters. Use
6966 them to print formatted message.
6968 2017-09-04 Pedro Alves <palves@redhat.com>
6970 * btrace.c (ftrace_add_pt): Pass btrace_insn to
6971 ftrace_update_insns by reference instead of pointer.
6973 2017-09-04 Yao Qi <yao.qi@linaro.org>
6975 * i386-go32-tdep.c: Include x86-xstate.h.
6976 (i386_go32_init_abi): Call i386_target_description.
6977 * i386-tdep.c (i386_target_description): Return tdesc_i386_mmx
6978 if xcr0 is X86_XSTATE_X87_MASK.
6979 * i386-tdep.h (tdesc_i386): Remove the declaration.
6980 (tdesc_i386_mmx): Likewise.
6982 2017-09-04 Yao Qi <yao.qi@linaro.org>
6984 * i386-fbsd-tdep.c (i386fbsd_core_read_xcr0): Return
6985 X86_XSTATE_SSE_MASK instead of 0.
6987 2017-09-04 Yao Qi <yao.qi@linaro.org>
6989 * amd64-fbsd-nat.c (amd64fbsd_read_description): Call
6990 i386_target_description.
6991 * i386-fbsd-nat.c (i386fbsd_read_description): Call
6992 i386_target_description.
6993 * i386-tdep.c (i386_gdbarch_init): Likewise.
6995 2017-09-04 Yao Qi <yao.qi@linaro.org>
6997 * amd64-darwin-tdep.c: Include "x86-xstate.h".
6998 (x86_darwin_init_abi_64): Call amd64_target_description.
6999 * amd64-dicos-tdep.c: Likewise.
7000 * amd64-fbsd-nat.c: Likewise.
7001 * amd64-fbsd-tdep.c: Likewise.
7002 * amd64-nbsd-tdep.c: Likewise.
7003 * amd64-obsd-tdep.c: Likewise.
7004 * amd64-sol2-tdep.c: Likewise.
7005 * amd64-windows-tdep.c: Likewise.
7006 * amd64-tdep.h (tdesc_amd64): Remove the declaration.
7008 2017-09-04 Simon Marchi <simon.marchi@ericsson.com>
7010 * btrace.h (btrace_insn_s, DEF_VEC_O (btrace_insn_s)): Remove.
7011 (btrace_function) <insn>: Change type to use std::vector.
7012 * btrace.c (ftrace_debug, ftrace_call_num_insn,
7013 ftrace_find_call, ftrace_new_gap, ftrace_update_function,
7014 ftrace_update_insns, ftrace_compute_global_level_offset,
7015 btrace_stitch_bts, btrace_clear, btrace_insn_get,
7016 btrace_insn_end, btrace_insn_next, btrace_insn_prev): Adjust to
7017 change to std::vector.
7018 (ftrace_update_insns): Adjust to change to std::vector, change
7019 type of INSN parameter.
7020 (btrace_compute_ftrace_bts): Adjust call to ftrace_update_insns.
7021 * record-btrace.c (btrace_call_history_insn_range,
7022 btrace_compute_src_line_range,
7023 record_btrace_frame_prev_register): Adjust to change to
7025 * python/py-record-btrace.c (recpy_bt_func_instructions): Adjust
7026 to change to std::vector.
7028 2017-09-03 Tom Tromey <tom@tromey.com>
7030 * corefile.c (reopen_exec_file): Use std::string.
7032 2017-09-03 Tom Tromey <tom@tromey.com>
7034 * compile/compile.c (compile_register_name_mangled): Return
7036 * compile/compile-loc2c.c (pushf_register_address): Update.
7037 (pushf_register): Update.
7038 * compile/compile-c-types.c (convert_array): Update.
7039 * compile/compile-c-symbols.c (generate_vla_size): Update.
7040 (error_symbol_once): Use a gdb::unique_xmalloc_ptr.
7041 (symbol_substitution_name): Return a gdb::unique_xmalloc_ptr.
7042 (convert_one_symbol): Update.
7043 (generate_c_for_for_one_variable): Update.
7044 * compile/compile-c-support.c (c_get_range_decl_name): Return a
7046 (generate_register_struct): Update.
7047 * compile/compile-internal.h (c_get_range_decl_name): Return a
7049 (compile_register_name_mangled): Return std::string.
7051 2017-09-03 Tom Tromey <tom@tromey.com>
7053 * utils.c (perror_string): Return a std::string.
7054 (throw_perror_with_name, perror_warning_with_name): Update.
7056 2017-09-03 Tom Tromey <tom@tromey.com>
7058 * demangle.c (demangle_command): Use std::string,
7061 2017-09-03 Tom Tromey <tom@tromey.com>
7063 * cli/cli-setshow.c (do_set_command): Use std::string.
7065 2017-09-03 Tom Tromey <tom@tromey.com>
7067 * cli/cli-cmds.c (cd_command): Use gdb::unique_xmalloc_ptr.
7069 2017-09-03 Tom Tromey <tom@tromey.com>
7071 * mi/mi-interp.c (mi_cmd_interpreter_exec): Use std::string.
7073 2017-09-03 Tom Tromey <tom@tromey.com>
7075 * mi/mi-cmd-env.c (env_execute_cli_command): Use
7076 gdb::unique_xmalloc_ptr.
7078 2017-09-03 Tom Tromey <tom@tromey.com>
7080 * thread.c (print_thread_info_1): Use string_printf.
7081 (thread_apply_command, thread_apply_all_command): Use
7084 2017-09-03 Tom Tromey <tom@tromey.com>
7086 * valprint.c (val_print_string): Update.
7087 * gdbcore.h (memory_error_message): Return std::string.
7088 * corefile.c (memory_error_message): Return std::string.
7089 (memory_error): Update.
7090 * breakpoint.c (insert_bp_location): Update.
7092 2017-09-03 Simon Marchi <simon.marchi@ericsson.com>
7094 * target/waitstatus.h (target_waitstatus_to_string): Change
7095 return type to std::string.
7096 * target/waitstatus.c (target_waitstatus_to_string): Return
7098 * target.h (target_waitstatus_to_string): Remove declaration.
7099 * infrun.c (resume, clear_proceed_status_thread,
7100 print_target_wait_results, do_target_wait, save_waitstatus,
7101 stop_all_threads): Adjust.
7102 * record-btrace.c (record_btrace_wait): Adjust.
7104 (target_debug_print_struct_target_waitstatus_p): Adjust.
7106 2017-09-01 Jan Kratochvil <jan.kratochvil@redhat.com>
7109 * nat/linux-procfs.c (parse_proc_status_state): Fix PROC_STATE_STOPPED
7112 2017-08-31 Sergio Durigan Junior <sergiodj@redhat.com>
7114 * NEWS (Changes since GDB 8.0): Add entry mentioning new support
7115 for setting/unsetting environment variables on the remote target.
7116 (New remote packets): Add entries for QEnvironmentHexEncoded,
7117 QEnvironmentUnset and QEnvironmentReset.
7118 * common/environ.c (gdb_environ::operator=): Extend method to
7119 handle m_user_set_env_list and m_user_unset_env_list.
7120 (gdb_environ::clear): Likewise.
7121 (match_var_in_string): Change type of first parameter from 'char
7122 *' to 'const char *'.
7123 (gdb_environ::set): Extend method to handle
7124 m_user_set_env_list and m_user_unset_env_list.
7125 (gdb_environ::unset): Likewise.
7126 (gdb_environ::clear_user_set_env): New method.
7127 (gdb_environ::user_set_envp): Likewise.
7128 (gdb_environ::user_unset_envp): Likewise.
7129 * common/environ.h (gdb_environ): Handle m_user_set_env_list and
7130 m_user_unset_env_list on move constructor/assignment.
7131 (unset): Add new default parameter 'update_unset_list = true'.
7132 (clear_user_set_env): New method.
7133 (user_set_envp): Likewise.
7134 (user_unset_envp): Likewise.
7135 (m_user_set_env_list): New std::set.
7136 (m_user_unset_env_list): Likewise.
7137 * common/rsp-low.c (hex2str): New function.
7138 (bin2hex): New overload for bin2hex function.
7139 * common/rsp-low.c (hex2str): New prototype.
7140 (str2hex): New overload prototype.
7141 * remote.c: Include "environ.h". Add QEnvironmentHexEncoded,
7142 QEnvironmentUnset and QEnvironmentReset.
7143 (remote_protocol_features): Add QEnvironmentHexEncoded,
7144 QEnvironmentUnset and QEnvironmentReset packets.
7145 (send_environment_packet): New function.
7146 (extended_remote_environment_support): Likewise.
7147 (extended_remote_create_inferior): Call
7148 extended_remote_environment_support.
7149 (_initialize_remote): Add QEnvironmentHexEncoded,
7150 QEnvironmentUnset and QEnvironmentReset packet configs.
7151 * unittests/environ-selftests.c (gdb_selftest_env_var):
7153 (test_vector_initialization): New function.
7154 (test_init_from_host_environ): Likewise.
7155 (test_reinit_from_host_environ): Likewise.
7156 (test_set_A_unset_B_unset_A_cannot_find_A_can_find_B):
7158 (test_unset_set_empty_vector): Likewise.
7159 (test_vector_clear): Likewise.
7160 (test_std_move): Likewise.
7161 (test_move_constructor):
7162 (test_self_move): Likewise.
7163 (test_set_unset_reset): Likewise.
7164 (run_tests): Rewrite in terms of the functions above.
7166 2017-08-31 Weimin Pan <weimin.pan@oracle.com>
7168 * sparc64-tdep.c (adi_stat_t): Fix comment formatting.
7169 (adi_available): Use a temp variable of type CORE_ADDR as argument
7170 3 when calling target_auxv_search.
7171 (adi_normalize_address): Use masks and xor operators to calculate
7173 (adi_read_versions, adi_write_versions, adi_print_versions)
7174 (do_examine, do_assign): Use paddress.
7176 2017-08-29 John Baldwin <jhb@FreeBSD.org>
7178 * mips-fbsd-nat.c (getfpregs_supplies): Return true for FIR.
7179 * mips-fbsd-tdep.c (mips_fbsd_supply_fpregs): Split supply of FSR
7180 out of loop and add supply of FIR.
7181 (mips_fbsd_collect_fpregs): Split collect of FSR out of loop and
7184 2017-08-28 Simon Marchi <simon.marchi@ericsson.com>
7187 * cli/cli-script.c (define_command): Don't convert command name
7190 2017-08-25 Joel Brobecker <brobecker@adacore.com>
7192 * ada-lang.c (ada_lookup_struct_elt_type): Remove parameter "dispp".
7193 Update all callers accordingly. Remove all code blocks handling
7194 the case where DISPP is not NULL.
7196 2017-08-24 Jan Kratochvil <jan.kratochvil@redhat.com>
7199 * dwarf2read.c (dwarf2_const_value_attr, dump_die_shallow)
7200 (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
7201 (skip_form_bytes, attr_form_is_constant): Handle DW_FORM_implicit_const.
7203 2017-08-24 Jan Kratochvil <jan.kratochvil@redhat.com>
7205 * dwarf2read.c (build_type_psymtabs_reader): New prototype.
7206 (process_psymtab_comp_unit): Accept IS_DEBUG_TYPES.
7207 (read_comp_units_from_section): New parameter abbrev_section, use
7208 read_and_check_comp_unit_head, allocate signatured_type if needed.
7209 (create_all_comp_units): Update read_comp_units_from_section caller.
7211 2017-08-23 Pedro Alves <palves@redhat.com>
7214 * remote.c (add_current_inferior_and_thread): Set inferior_ptid
7215 to null_ptid and switch to thread without reading the registers
7216 after adding the inferior.
7218 2017-08-23 Jan Kratochvil <jan.kratochvil@redhat.com>
7220 * NEWS (Changes since GDB 8.0): Add set compile-gcc and show
7222 * compile/compile.c (compile_gcc, show_compile_gcc): New.
7223 (compile_to_object): Implement compile_gcc.
7224 (_initialize_compile): Install "set compile-gcc". Initialize
7227 2017-08-23 Jan Kratochvil <jan.kratochvil@redhat.com>
7229 * compile/compile.c (compile_to_object): Conditionally call
7230 set_verbose. Conditionally call compile or compile_v0.
7232 2017-08-07 Weimin Pan <weimin.pan@oracle.com>
7234 * sparc64-tdep.h: (adi_normalize_address): New export.
7235 * sparc-nat.h: (open_adi_tag_fd): New export.
7236 * sparc64-linux-nat.c: (open_adi_tag_fd): New function.
7237 * sparc64-linux-tdep.c:
7238 (SEGV_ACCADI, SEGV_ADIDERR, SEGV_ADIPERR) New defines.
7239 (sparc64_linux_handle_segmentation_fault): New function.
7240 (sparc64_linux_init_abi): Register
7241 sparc64_linux_handle_segmentation_fault
7242 * sparc64-tdep.c: Include cli-utils.h,gdbcmd.h,auxv.h.
7243 (sparc64_addr_bits_remove): New function.
7244 (sparc64_init_abi): Register sparc64_addr_bits_remove.
7245 (MAX_PROC_NAME_SIZE): New macro.
7246 (AT_ADI_BLKSZ, AT_ADI_NBITS, AT_ADI_UEONADI) New defines.
7247 (sparc64adilist): New variable.
7248 (adi_proc_list): New variable.
7249 (find_adi_info): New function.
7250 (add_adi_info): New function.
7251 (get_adi_info_proc): New function.
7252 (get_adi_info): New function.
7253 (info_adi_command): New function.
7254 (read_maps_entry): New function.
7255 (adi_available): New function.
7256 (adi_normalize_address): New function.
7257 (adi_align_address): New function.
7258 (adi_convert_byte_count): New function.
7259 (adi_tag_fd): New function.
7260 (adi_is_addr_mapped): New function.
7261 (adi_read_versions): New function.
7262 (adi_write_versions): New function.
7263 (adi_print_versions): New function.
7264 (do_examine): New function.
7265 (do_assign): New function.
7266 (adi_examine_command): New function.
7267 (adi_assign_command): New function.
7268 (_initialize_sparc64_adi_tdep): New function.
7270 2017-08-22 Simon Marchi <simon.marchi@ericsson.com>
7272 * breakpoint.c (breakpoints_info): Rename to ...
7273 (info_breakpoints_command): ... this.
7274 (watchpoints_info): Rename to ...
7275 (info_watchpoints_command): ... this.
7276 (tracepoints_info): Rename to ...
7277 (info_tracepoints_command): ... this.
7278 (_initialize_breakpoint): Adjust.
7279 * dcache.c (dcache_info): Rename to ...
7280 (info_display_command): ... this.
7281 (_initialize_dcache): Adjust.
7282 * frame.h (args_info): Rename to ...
7283 (info_args_command): ... this.
7284 (locals_info): Rename to ...
7285 (info_locals_command): ... this.
7286 * infcmd.c (nofp_registers_info): Rename to ...
7287 (info_registers_command): ... this.
7288 (float_info): Rename to ...
7289 (info_float_command): ... this.
7290 (program_info): Rename to ...
7291 (info_program_command): ... this.
7292 (all_registers_info): Rename to ...
7293 (info_all_registers_command): ... this.
7294 (vector_info): Rename to ...
7295 (info_vector_command): ... this.
7296 (float_info): Rename to ...
7297 (info_float_command): ... this.
7298 (_initialize_infcmd): Adjust.
7299 * inferior.h (term_info): Rename to ...
7300 (info_terminal_command): ... this.
7301 * inflow.c (term_info): Rename to ...
7302 (info_terminal_command): ... this.
7303 (_initialize_inflow): Adjust.
7304 * infrun.c (signals_info): Rename to ...
7305 (info_signals_command): ... this.
7306 (_initialize_infrun): Adjust.
7307 * objc-lang.c (classes_info): Rename to ...
7308 (info_classes_command): ... this.
7309 (selectors_info): Rename to ...
7310 (info_selectors_command): ... this.
7311 (_initialize_objc_language): Adjust.
7312 * printcmd.c (sym_info): Rename to ...
7313 (info_symbol_command): ... this.
7314 (address_info): Rename to ...
7315 (info_address_command): ... this.
7316 (display_info): Rename to ...
7317 (info_display_command): ... this.
7318 (_initialize_printcmd): Adjust.
7319 * reverse.c (bookmarks_info): Rename to ...
7320 (info_breakpoints_command): ... this.
7321 (_initialize_reverse): Adjust.
7322 * ser-go32.c (dos_info): Rename to ...
7323 (info_serial_command): ... this.
7324 (_initialize_ser_dos): Adjust.
7325 * skip.c (skip_info): Rename to ...
7326 (info_skip_command): ... this.
7327 (_initialize_step_skip): Adjust.
7328 * source.c (line_info): Rename to ...
7329 (info_line_command): ... this.
7330 (source_info): Rename to ...
7331 (info_source_command)
7332 * stack.c (frame_info): Rename to ...
7333 (info_frame_command): ... this.
7334 (locals_info): Rename to ...
7335 (info_locals_command): ... this.
7336 (args_info): Rename to ...
7337 (info_args_command): ... this.
7338 (_initialize_stack): Adjust.
7339 * symtab.c (sources_info): Rename to ...
7340 (info_sources_command): ... this.
7341 (variables_info): Rename to ...
7342 (info_variables_command): ... this.
7343 (functions_info): Rename to ...
7344 (info_functions_command): ... this.
7345 (types_info): Rename to ...
7346 (info_types_command): ... this.
7347 (_initialize_symtab): Adjust.
7348 * target.c (target_info): Rename to ...
7349 (info_target_command): ... this.
7350 (initialize_targets): Adjust.
7351 * tracepoint.c (tvariables_info): Rename to ...
7352 (info_tvariables_command): ... this.
7353 (scope_info): Rename to ...
7354 (info_scope_command): ... this.
7355 (trace_dump_actions): Adjust.
7356 (_initialize_tracepoint): Adjust.
7358 2017-08-22 Tom Tromey <tom@tromey.com>
7360 * breakpoint.h (install_breakpoint): Update.
7361 * breakpoint.c (add_solib_catchpoint): Update.
7362 (install_breakpoint): Change argument to a std::unique_ptr.
7363 (create_fork_vfork_event_catchpoint): Use std::unique_ptr.
7364 (create_breakpoint_sal, create_breakpoint): Update.
7365 (watch_command_1, catch_exec_command_1)
7366 (strace_marker_create_breakpoints_sal): Use std::unique_ptr.
7367 (add_to_breakpoint_chain): Change argument to a std::unique_ptr.
7368 Return the breakpoint.
7369 (set_raw_breakpoint_without_location, set_raw_breakpoint)
7370 (new_single_step_breakpoint): Update.
7371 * break-catch-throw.c (handle_gnu_v3_exceptions): Use
7373 * break-catch-syscall.c (create_syscall_event_catchpoint): Use
7375 * break-catch-sig.c (create_signal_catchpoint): Use
7377 * ada-lang.c (create_ada_exception_catchpoint): Use
7380 2017-08-22 Tom Tromey <tom@tromey.com>
7382 * breakpoint.c (add_solib_catchpoint): Use std::unique_ptr.
7384 2017-08-22 Tom Tromey <tom@tromey.com>
7386 * psymtab.c (psymtab_search_name): Return a unique_xmalloc_ptr.
7387 (lookup_partial_symbol): Update.
7389 2017-08-22 Tom Tromey <tom@tromey.com>
7391 * source.h (rewrite_source_path): Return a unique_xmalloc_ptr.
7392 * source.c (rewrite_source_path): Return a unique_xmalloc_ptr.
7393 (find_and_open_source, symtab_to_fullname): Update.
7394 * psymtab.c (psymtab_to_fullname): Update.
7396 2017-08-22 Tom Tromey <tom@tromey.com>
7398 * exec.c (exec_file_attach): Update.
7399 * linux-thread-db.c (try_thread_db_load): Update.
7400 * guile/scm-safe-call.c (gdbscm_safe_source_script): Update.
7401 * utils.c (gdb_realpath): Change return type.
7402 (gdb_realpath_keepfile): Update.
7403 (gdb_realpath_check_trailer, gdb_realpath_tests): New functions.
7404 (_initialize_utils): Register the new self test.
7405 * source.c (openp): Update.
7406 (find_and_open_source): Update.
7407 * nto-tdep.c (nto_find_and_open_solib): Update.
7408 * main.c (set_gdb_data_directory): Update.
7409 (captured_main_1): Update.
7410 * dwarf2read.c (dwarf2_get_dwz_file): Update
7411 (dw2_map_symbol_filenames): Update.
7412 * auto-load.c (auto_load_safe_path_vec_update): Update.
7413 (filename_is_in_auto_load_safe_path_vec): Change type of
7415 (auto_load_objfile_script): Update.
7416 (file_is_auto_load_safe): Update. Use std::string.
7417 * utils.h (gdb_realpath): Return a gdb::unique_xmalloc_ptr.
7419 2017-08-22 Tom Tromey <tom@tromey.com>
7421 * utils.c (gdb_realpath_keepfile): Return a
7422 gdb::unique_xmalloc_ptr.
7423 * exec.c (exec_file_attach): Update.
7424 * utils.h (gdb_realpath_keepfile): Return a
7425 gdb::unique_xmalloc_ptr.
7427 2017-08-22 Tom Tromey <tom@tromey.com>
7429 * compile/compile.c (compile_file_command): Use
7430 gdb::unique_xmalloc_ptr, std::string.
7431 * utils.c (gdb_abspath): Change return type.
7432 * source.c (openp): Update.
7433 * objfiles.c (allocate_objfile): Update.
7434 * main.c (set_gdb_data_directory): Update.
7435 * utils.h (gdb_abspath): Return a gdb::unique_xmalloc_ptr.
7437 2017-08-22 Zhouyi Zhou <zhouzhouyi@gmail.com>
7439 * cli-cmds.c (list_commands): List actual code around more than
7442 2017-08-21 John Baldwin <jhb@FreeBSD.org>
7444 * fbsd-nat.c (fbsd_add_threads): Use array type for `lwps'.
7446 2017-08-21 Pedro Alves <palves@redhat.com>
7449 * c-exp.y (variable production): Handle function aliases.
7450 * minsyms.c (msymbol_is_text): New function.
7451 * minsyms.h (msymbol_is_text): Declare.
7452 * symtab.c (find_function_alias_target): New function.
7453 * symtab.h (find_function_alias_target): Declare.
7455 2017-08-21 Pedro Alves <palves@redhat.com>
7457 * eval.c (evaluate_subexp_standard) <OP_TYPE>: Don't dig past
7459 * typeprint.c (whatis_exp): If handling "whatis", and expression
7460 is OP_TYPE, strip one typedef level. Otherwise don't strip
7462 * valops.c (value_cast): Save "to" type before resolving
7463 stubs/typedefs. Use that type as resulting value's type.
7465 2017-08-18 Tom Tromey <tom@tromey.com>
7466 Pedro Alves <palves@redhat.com>
7468 * spu-multiarch.c (parse_spufs_run): Use scoped_restore.
7469 * sol-thread.c (sol_thread_resume, sol_thread_wait)
7470 (sol_thread_xfer_partial, rw_common): Use scoped_restore.
7471 * procfs.c (procfs_do_thread_registers): Use scoped_restore.
7472 * proc-service.c (ps_xfer_memory): Use scoped_restore.
7473 * linux-tdep.c (linux_corefile_thread): Remove a cleanup.
7474 (linux_get_siginfo_data): Add "thread" argument. Use
7476 * linux-nat.c (linux_child_follow_fork)
7477 (check_stopped_by_watchpoint): Use scoped_restore.
7478 * infrun.c (displaced_step_prepare_throw, write_memory_ptid)
7479 (THREAD_STOPPED_BY, handle_signal_stop): Use scoped_restore.
7480 (restore_inferior_ptid, save_inferior_ptid): Remove.
7481 * btrace.c (btrace_fetch): Use scoped_restore.
7482 * bsd-uthread.c (bsd_uthread_fetch_registers)
7483 (bsd_uthread_store_registers): Use scoped_restore.
7484 * breakpoint.c (reattach_breakpoints, detach_breakpoints): Use
7486 * aix-thread.c (aix_thread_resume, aix_thread_wait)
7487 (aix_thread_xfer_partial): Use scoped_restore.
7488 * inferior.h (save_inferior_ptid): Remove.
7490 2017-08-18 Yao Qi <yao.qi@linaro.org>
7493 * arm-tdep.c (gdb_print_insn_arm): Mark
7494 USER_SPECIFIED_MACHINE_TYPE if exec_bfd isn't NULL.
7496 2017-08-18 Yao Qi <yao.qi@linaro.org>
7498 * NEWS: Mention GDBserver's new option "--selftest".
7499 * Makefile.in (SFILES): Remove selftest.c, add common/selftest.c.
7500 * selftest.c: Move it to common/selftest.c.
7501 * selftest.h: Move it to common/selftest.h.
7502 * selftest-arch.c (reset): New function.
7503 (tests_with_arch): Call reset.
7505 2017-08-18 Yao Qi <yao.qi@linaro.org>
7507 * selftest.c (run_tests): Don't call QUIT. Call debug_printf
7508 instead of exception_fprintf and printf_filtered.
7510 2017-08-18 Yao Qi <yao.qi@linaro.org>
7512 * selftest.c (register_self_test): Rename it to
7513 selftests::register_test.
7514 (run_self_tests): selftest::run_tests.
7515 * selftest.h: Update declarations.
7516 * selftest-arch.c (register_self_test_foreach_arch): Rename it to
7517 selftests::register_test_foreach_arch.
7518 * selftest-arch.h: Update declaration.
7519 * aarch64-tdep.c: Update.
7520 * arm-tdep.c: Likewise.
7521 * disasm-selftests.c: Likewise.
7522 * dwarf2loc.c: Likewise.
7523 * dwarf2-frame.c: Likewise.
7524 * findvar.c: Likewise.
7525 * gdbarch-selftests.c: Likewise.
7526 * maint.c (maintenance_selftest): Likewise.
7527 * regcache.c: Likewise.
7528 * rust-exp.y: Likewise.
7529 * selftest-arch.c: Likewise.
7530 * unittests/environ-selftests.c: Likewise.
7531 * unittests/function-view-selftests.c: Likewise.
7532 * unittests/offset-type-selftests.c: Likewise.
7533 * unittests/optional-selftests.c: Likewise.
7534 * unittests/scoped_restore-selftests.c: Likewise.
7535 * utils-selftests.c: Likewise.
7537 2017-08-17 Pedro Alves <palves@redhat.com>
7539 * cli/cli-cmds.c (source_command): Delete 'old_source_verbose'
7542 2017-08-17 Pedro Alves <palves@redhat.com>
7544 * dwarf2read.c (struct dwarf2_cu) <line_header_die_owner>: New
7546 (reset_die_in_process): Delete, replaced by ...
7547 (process_die_scope): ... this new class. Make it responsible for
7548 freeing cu->line_header too.
7549 (process_die): Use process_die_scope.
7550 (handle_DW_AT_stmt_list): Record the line header's owner CU/DIE in
7551 cu->line_header_die_owner. Don't release the line header if it's
7553 (setup_type_unit_groups): Make the CU/DIE own the line header.
7554 Don't release the line header here.
7556 2017-08-17 Alex Lindsay <alexlindsay239@gmail.com> (tiny change)
7558 * elfread.c (elf_read_minimal_symbols): xfree synthsyms.
7560 2017-08-17 Ruslan Kabatsayev <b7.10110111@gmail.com>
7562 * NEWS: Mention new shortcuts for nexti and stepi in TUI
7565 2017-08-16 Ruslan Kabatsayev <b7.10110111@gmail.com>
7567 * tui/tui.c (tui_commands): Add "nexti" and "stepi" to the Single-Key
7570 2017-08-15 Stafford Horne <shorne@gmail.com>
7572 * MAINTAINERS (Write After Approval): Add Stafford Horne.
7574 2017-08-15 Stafford Horne <shorne@gmail.com>
7576 * xtensa-tdep.c (xtensa_init_reggroups): Use xstrdup for cpname.
7578 2017-08-15 Sergio Durigan Junior <sergiodj@redhat.com>
7581 * infcmd.c (unset_environment_command): Use the 'clear' method on
7582 the environment instead of resetting it.
7584 2017-08-15 John Baldwin <jhb@FreeBSD.org>
7586 * fbsd-nat.c (fbsd_convert_siginfo): Fix compile on big-endian
7589 2017-08-14 Tom Tromey <tom@tromey.com>
7591 * valprint.c (print_octal_chars): Use HOST_CHAR_BIT.
7592 (print_binary_chars): Likewise.
7593 (BITS_IN_BYTES): Remove.
7595 2017-08-14 Tom Tromey <tom@tromey.com>
7598 * valprint.c (LOW_ZERO): Change value to 034.
7599 (print_octal_chars): Add static_asserts for octal constants.
7600 * printcmd.c (print_scalar_formatted): Add 'd' case.
7602 2017-08-11 Tom Tromey <tom@tromey.com>
7604 * symfile.c (add_symbol_file_command): Use std::vector.
7606 2017-08-14 Tom Tromey <tom@tromey.com>
7608 * break-catch-throw.c (handle_gnu_v3_exceptions): Use std::move.
7609 * break-catch-syscall.c (create_syscall_event_catchpoint): Use
7611 * break-catch-sig.c (create_signal_catchpoint): Use std::move.
7613 2017-08-11 Pedro Alves <palves@redhat.com>
7615 * infrun.c (process_event_stop_test): Adjust
7616 function_name_is_marked_for_skip call.
7617 * skip.c: Include <list>.
7618 (skiplist_entry): Make it a class with private fields, and
7620 (skiplist_entry_chain): Delete.
7621 (skiplist_entries): New.
7622 (skiplist_entry_count): Delete.
7623 (highest_skiplist_entry_num): New.
7624 (ALL_SKIPLIST_ENTRIES, ALL_SKIPLIST_ENTRIES_SAFE): Delete.
7625 (add_skiplist_entry): Delete.
7626 (skiplist_entry::skiplist_entry): New.
7627 (skiplist_entry::add_entry): New.
7628 (skip_file_command, skip_function): Adjust.
7629 (compile_skip_regexp): Delete.
7630 (skip_command): Don't compile regexp here. Adjust to use
7631 skiplist_entry::add_entry.
7632 (skip_info): Adjust to use range-for and getters.
7633 (skip_enable_command, skip_disable_command): Adjust to use
7634 range-for and setters.
7635 (skip_delete_command): Adjust to use std::list.
7636 (add_skiplist_entry): Delete.
7637 (skip_file_p): Delete, refactored as ...
7638 (skiplist_entry::do_skip_file_p): ... this new method.
7639 (skip_gfile_p): Delete, refactored as ...
7640 (skiplist_entry::do_gskip_file_p): ... this new method.
7641 (skip_function_p, skip_rfunction_p): Delete, refactored as ...
7642 (skiplist_entry::skip_function_p): ... this new method.
7643 (function_name_is_marked_for_skip): Now returns bool, and takes
7644 the function sal by const reference. Adjust to use range-for and
7645 skiplist_entry methods.
7646 (_initialize_step_skip): Remove references to
7647 skiplist_entry_chain, skiplist_entry_count.
7648 * skip.h (function_name_is_marked_for_skip): Now returns bool, and
7649 takes the function sal by const reference.
7651 2017-08-11 Yao Qi <yao.qi@linaro.org>
7653 * dwarf2-frame.c (clear_pointer_cleanup): Remove.
7654 (dwarf2_frame_cache): Remove reset_cache_cleanup.
7655 (dwarf2_frame_cache):
7656 * frame-unwind.c (frame_unwind_try_unwinder): Catch
7657 RETURN_MASK_ALL and set *this_case to NULL.
7658 * frame-unwind.h: Update comments.
7660 2017-08-11 Yao Qi <yao.qi@linaro.org>
7662 * dwarf2-frame.c (dwarf2_frame_state_alloc_regs): Remove.
7663 (dwarf2_frame_state_copy_regs): Remove.
7664 (dwarf2_frame_state_free_regs): Remove.
7665 (dwarf2_frame_state::~dwarf2_frame_state): Remove.
7666 (dwarf2_restore_rule): Call method .alloc_regs instead of
7667 dwarf2_frame_state_alloc_regs.
7668 (execute_cfa_program): Likewise. Call dwarf2_frame_state_reg_info
7669 constructor. Call std::move.
7670 (dwarf2_fetch_cfa_info): Don't call dwarf2_frame_state_copy_regs.
7671 (dwarf2_frame_cache): Likewise.
7673 [GDB_SELF_TEST]: Include selftest.h and
7675 [GDB_SELF_TEST] (execute_cfa_program_test): New function.
7676 (_initialize_dwarf2_frame) [GDB_SELF_TEST]: Register
7677 execute_cfa_program_test.
7679 * dwarf2-frame.h (dwarf2_frame_state_reg_info): Add ctor, dtor,
7680 copy ctor, assignment operator, move assignment.
7681 <alloc_regs>: New method.
7683 (struct dwarf2_frame_state): Delete dtor.
7684 (dwarf2_frame_state_alloc_regs): Remove declaration.
7685 * sparc-tdep.c (sparc_execute_dwarf_cfa_vendor_op): Don't call
7686 dwarf2_frame_state_alloc_regs, use .alloc_regs instead.
7688 2017-08-11 Yao Qi <yao.qi@linaro.org>
7690 * dwarf2-frame.c (dwarf2_frame_state_free): Remove.
7691 (dwarf2_frame_state::dwarf2_frame_state): New.
7692 (dwarf2_frame_state::~dwarf2_frame_state): New.
7693 (dwarf2_fetch_cfa_info): Update.
7694 (dwarf2_frame_cache): Remove old_chain. Change 'fs' to an object
7695 rather than a pointer. Update code.
7696 * dwarf2-frame.h (struct dwarf2_frame_state): Declare ctor and
7698 <data_align, code_align, retaddr_column>: Change them to const.
7699 <armcc_cfa_offsets_sf, armcc_cfa_offsets_reversed>: Change them
7702 2017-08-11 Yao Qi <yao.qi@linaro.org>
7704 * dwarf2-frame.h (struct dwarf2_frame_state_reg) <exp_len>: Remove.
7705 <loc.exp>: New field.
7706 * dwarf2-frame.c (execute_cfa_program): Update.
7707 (dwarf2_frame_prev_register): Update.
7709 2017-08-10 Pedro Alves <palves@redhat.com>
7711 * common/gdb_unique_ptr.h (xfree_deleter<T[]>): Define.
7713 2017-08-09 John Baldwin <jhb@FreeBSD.org>
7715 * fbsd-nat.c (struct fbsd_fork_info): Remove.
7716 (fbsd_pending_children): Use std::list.
7717 (fbsd_remember_child): Likewise.
7718 (fbsd_is_child_pending): Likewise.
7719 (fbsd_pending_vfork_done): Use std::forward_list.
7720 (fbsd_add_vfork_done): Likewise.
7721 (fbsd_is_vfork_done_pending): Likewise.
7722 (fbsd_next_vfork_done): Likewise.
7724 2017-08-09 John Baldwin <jhb@FreeBSD.org>
7726 * fbsd-nat.c [HAVE_KINFO_GETVMMAP] (struct free_deleter): New.
7727 (fbsd_find_memory_regions): Use free_deleter with std::unique_ptr.
7728 [!HAVE_KINFO_GETVMMAP] (fbsd_find_memory_regions): Use std::string
7730 (fbsd_xfer_partial): Use gdb::byte_vector.
7731 (fbsd_add_threads): Use gdb::unique_xmalloc_ptr.
7733 2017-08-09 John Baldwin <jhb@FreeBSD.org>
7735 * fbsd-nat.c: [!HAVE_KINFO_GETVMMAP]: Include <sys/user.h> and
7737 (fbsd_find_memory_regions): Fix `mapfile' initialization.
7739 2017-08-09 Tom Tromey <tom@tromey.com>
7741 * skip.c (skiplist_entry): New constructor.
7742 (skiplist_entry::enabled, skiplist_entry::function_is_regexp)
7743 (skiplist_entry::file_is_glob): Now bool.
7744 (skiplist_entry::file, skiplist_entry::function): Now
7746 (make_skip_entry): Return a unique_ptr. Use new.
7747 (free_skiplist_entry, free_skiplist_entry_cleanup)
7748 (make_free_skiplist_entry_cleanup): Remove.
7749 (skip_command, skip_disable_command, add_skiplist_entry)
7750 (skip_form_bytes, compile_skip_regexp, skip_command, skip_info)
7751 (skip_file_p, skip_gfile_p, skip_function_p, skip_rfunction_p)
7752 (function_name_is_marked_for_skip): Update.
7753 (skip_delete_command): Update. Use delete.
7755 2017-08-09 Jiong Wang <jiong.wang@arm.com>
7757 * aarch64-linux-tdep.c: Include "auxv.h" and "elf/common.h".
7758 (aarch64_linux_core_read_description): New function.
7759 (aarch64_linux_init_abi): Register gdbarch_core_read_description.
7761 2017-08-09 Pedro Alves <palves@redhat.com>
7763 * cp-name-parser.y (cp_comp_to_string): Return a
7764 gdb::unique_xmalloc_ptr<char>.
7765 * cp-support.c (replace_typedefs_qualified_name)
7766 (replace_typedefs): Adjust to use gdb::unique_xmalloc_ptr<char>.
7767 (cp_canonicalize_string_full): Use op= instead of explicit
7769 (cp_class_name_from_physname, method_name_from_physname)
7770 (cp_func_name, cp_remove_params): Adjust to use
7771 gdb::unique_xmalloc_ptr<char>.
7772 * cp-support.h (cp_comp_to_string): Return a
7773 gdb::unique_xmalloc_ptr<char>.
7774 * python/py-type.c (typy_lookup_type): Adjust to use
7775 gdb::unique_xmalloc_ptr<char>.
7777 2017-08-09 H.J. Lu <hongjiu.lu@intel.com>
7779 * dwarf2read.c (dwarf2_string_attr): Fix a typo.
7781 2017-08-09 Alex Lindsay <alexlindsay239@gmail.com>
7782 Yao Qi <yao.qi@linaro.org>
7784 * cp-support.c (cp_canonicalize_string_full): Use
7785 gdb::unique_xmalloc_ptr<char>.
7786 (cp_canonicalize_string): Likewise.
7788 2017-08-09 Yao Qi <yao.qi@linaro.org>
7790 * features/Makefile (WHICH): Remove i386/ non-linux stuff.
7791 * regformats/i386/amd64-avx-avx512.dat: Remove.
7792 * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Remove.
7793 * regformats/i386/amd64-avx-mpx.dat:Remove.
7794 * regformats/i386/amd64-avx.dat: Remove.
7795 * regformats/i386/amd64-mpx.dat: Remove.
7796 * regformats/i386/i386-avx-avx512.dat: Remove.
7797 * regformats/i386/i386-avx-mpx-avx512-pku.dat: Remove.
7798 * regformats/i386/i386-avx-mpx.dat: Remove.
7799 * regformats/i386/i386-mmx.dat: Remove.
7800 * regformats/i386/i386-mpx.dat: Remove.
7802 2017-08-09 Yao Qi <yao.qi@linaro.org>
7804 * amd64-tdep.h (tdesc_x32): Remove the declaration.
7805 * amd64-tdep.c: Don't include features/i386/x32*.c.
7806 (_initialize_amd64_tdep): Don't call initialize_tdesc_x32*
7808 * features/Makefile (WHICH): Remove i386/x32, i386/x32-avx,
7809 and i386/x32-avx-avx512.
7810 (XMLTOC): Remove i386/x32-avx.xml, i386/x32-avx-avx512.xml,
7812 * features/i386/x32-avx-avx512.c: Removed.
7813 * features/i386/x32-avx-avx512.xml: Removed.
7814 * features/i386/x32-avx.c: Removed.
7815 * features/i386/x32-avx.xml: Removed.
7816 * features/i386/x32.c: Removed.
7817 * features/i386/x32.xml: Removed.
7818 * regformats/i386/x32-avx-avx512.dat: Removed.
7819 * regformats/i386/x32-avx.dat: Removed.
7820 * regformats/i386/x32.dat: Removed.
7822 2017-08-07 Maciej W. Rozycki <macro@imgtec.com>
7824 PR breakpoints/21886
7825 * mem-break.c (default_memory_insert_breakpoint): Use
7826 `->placed_address' rather than `->reqstd_address' for the
7827 breakpoint location.
7829 2017-08-07 Maciej W. Rozycki <macro@imgtec.com>
7831 * arch-utils.c (default_print_insn): Remove arch/mach/endian
7834 2017-08-07 Maciej W. Rozycki <macro@imgtec.com>
7836 * gdbarch.sh (gdbarch_info): Replace the `tdep_info' member with
7837 a union of `tdep_info', `tdesc_data' and `id'.
7838 * aarch64-tdep.c (aarch64_gdbarch_init): Use `info.tdesc_data'
7839 rather than `info.tdep_info'.
7840 * amd64-linux-tdep.c (amd64_linux_init_abi): Likewise.
7841 * i386-linux-tdep.c (i386_linux_init_abi): Likewise.
7842 * i386-tdep.c (i386_gdbarch_init): Likewise.
7843 * mips-linux-tdep.c (mips_linux_init_abi): Likewise.
7844 * mips-tdep.c (mips_gdbarch_init): Likewise.
7845 * nds32-tdep.c (nds32_gdbarch_init): Likewise.
7846 * rs6000-tdep.c (rs6000_gdbarch_init): Likewise.
7847 * ppc-linux-tdep.c (ppu2spu_sniffer): Use `info.id' rather than
7849 (ppc_linux_init_abi): Use `info.tdesc_data' rather than
7851 * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
7852 * spu-multiarch.c (spu_gdbarch): Use `info.id' rather than
7854 * spu-tdep.c (spu_gdbarch_init): Likewise.
7855 * gdbarch.h: Regenerate.
7857 2017-08-07 Leszek Swirski <leszeks@google.com>
7860 * dwarf2read.c (dwarf2_string_attr): Allow DW_FORM_GNU_strp_alt.
7862 2017-08-07 Simon Marchi <simon.marchi@ericsson.com>
7864 * remote-sim.c (gdbsim_load): Remove char **argv local variable.
7865 (gdbsim_open): Rename gdb_argv args object to argv.
7867 2017-08-05 Tom Tromey <tom@tromey.com>
7869 * compile/compile-object-load.c (compile_object_load): Use
7870 gdb::unique_xmalloc_ptr.
7871 * cli/cli-dump.c (scan_filename): Rename from
7872 scan_filename_with_cleanup. Change return type.
7873 (scan_expression): Rename from scan_expression_with_cleanup.
7875 (dump_memory_to_file, dump_value_to_file, restore_command):
7876 Use gdb::unique_xmalloc_ptr. Update.
7877 * cli/cli-cmds.c (find_and_open_script): Use
7878 gdb::unique_xmalloc_ptr.
7879 * tracefile-tfile.c (tfile_open): Use gdb::unique_xmalloc_ptr.
7880 * symmisc.c (maintenance_print_symbols)
7881 (maintenance_print_msymbols): Use gdb::unique_xmalloc_ptr.
7882 * symfile.c (symfile_bfd_open, generic_load)
7883 (add_symbol_file_command, remove_symbol_file_command): Use
7884 gdb::unique_xmalloc_ptr.
7885 * source.c (openp): Use gdb::unique_xmalloc_ptr.
7886 * psymtab.c (maintenance_print_psymbols): Use
7887 gdb::unique_xmalloc_ptr.
7888 * corelow.c (core_open): Use gdb::unique_xmalloc_ptr.
7889 * breakpoint.c (save_breakpoints): Use gdb::unique_xmalloc_ptr.
7890 * solib.c (solib_map_sections): Use gdb::unique_xmalloc_ptr.
7891 (reload_shared_libraries_1): Likewise.
7893 2017-08-05 Tom Tromey <tom@tromey.com>
7895 * rust-exp.y (rust_op_ptr, set_field): Remove typedefs.
7896 (rust_op_vector, rust_set_vector): New typedefs.
7897 (current_parser): New global.
7898 (work_obstack): Change to pointer type. Update all users.
7899 (rust_ast, pstate): Remove globals.
7900 (struct rust_parser): New.
7901 (%union) <params, field_inits>: Change type.
7902 (start, tuple_expr, unit_expr, struct_expr_list, literal)
7903 (field_expr, expr_list, maybe_expr_list, type_list): Update.
7904 (ast_call_ish, ast_path, ast_function_type, ast_tuple_type)
7905 (convert_params_to_types, convert_params_to_expression): Change
7907 (ast_string): Change type of "fields".
7908 (rust_parse): Make a rust_parser. Remove cleanups.
7909 (rust_lex_tests): Make and install an auto_obstack.
7911 2017-08-04 Yao Qi <yao.qi@linaro.org>
7913 * configure.srv (ipa_x32_linux_regobj): New.
7914 * linux-amd64-ipa.c (get_ipa_tdesc): Use X86_TDESC_AVX_AVX512
7915 instead of X86_TDESC_AVX512.
7916 (initialize_low_tracepoint): Call
7917 init_registers_x32_avx_avx512_linux.
7919 2017-08-04 Yao Qi <yao.qi@linaro.org>
7921 * utils.h (gdb_argv): Add namespace std for nullptr_t.
7923 2017-08-03 Ruslan Kabatsayev <b7.10110111@gmail.com>
7925 * MAINTAINERS (Write After Approval): Add Ruslan Kabatsayev.
7927 2017-08-03 Tom Tromey <tom@tromey.com>
7929 * utils.c (make_cleanup_freeargv, do_freeargv, gdb_buildargv):
7931 * utils.h (make_cleanup_freeargv, gdb_buildargv): Remove.
7933 2017-08-03 Tom Tromey <tom@tromey.com>
7935 * python/py-param.c (compute_enum_values): Use gdb_argv.
7937 2017-08-03 Tom Tromey <tom@tromey.com>
7939 * utils.h (struct gdb_argv_deleter): New.
7940 (gdb_argv): New class.
7941 * utils.c (gdb_argv::reset): New method.
7942 * tracepoint.c (delete_trace_variable_command): Use gdb_argv.
7943 * tracefile.c (tsave_command): Use gdb_argv.
7944 * top.c (new_ui_command): Use gdb_argv.
7945 * symmisc.c (maintenance_print_symbols)
7946 (maintenance_print_msymbols, maintenance_expand_symtabs): Use gdb_argv.
7947 * symfile.c (symbol_file_command, generic_load)
7948 (remove_symbol_file_command): Use gdb_argv.
7949 * stack.c (backtrace_command): Use gdb_argv.
7950 * source.c (add_path, show_substitute_path_command)
7951 (unset_substitute_path_command, set_substitute_path_command):
7953 * skip.c (skip_command): Use gdb_argv. Use gdb_buildargv.
7954 * ser-mingw.c (pipe_windows_open): Use gdb_argv.
7955 * remote.c (extended_remote_run, remote_put_command)
7956 (remote_get_command, remote_delete_command): Use gdb_argv.
7957 * remote-sim.c (gdbsim_load, gdbsim_create_inferior)
7958 (gdbsim_open): Use gdb_argv.
7959 * python/py-cmd.c (gdbpy_string_to_argv): Use gdb_argv.
7960 * psymtab.c (maintenance_print_psymbols): Use gdb_argv.
7961 * procfs.c (procfs_info_proc): Use gdb_argv.
7962 * interps.c (interpreter_exec_cmd): Use gdb_argv.
7963 * infrun.c (handle_command): Use gdb_argv.
7964 * inferior.c (add_inferior_command, clone_inferior_command):
7966 * guile/scm-string.c (gdbscm_string_to_argv): Use gdb_argv.
7967 * exec.c (exec_file_command): Use gdb_argv.
7968 * cli/cli-cmds.c (alias_command): Use gdb_argv.
7969 * compile/compile.c (build_argc_argv): Use gdb_argv.
7971 2017-08-03 Tom Tromey <tom@tromey.com>
7973 * python/python.c (gdbpy_decode_line): Use unique_xmalloc_ptr.
7975 2017-08-03 Tom Tromey <tom@tromey.com>
7977 * python/python.c (compute_python_string): Return std::string.
7978 (gdbpy_eval_from_control_command): Update.
7979 (do_start_initialization): Use std::string.
7980 * python/py-varobj.c (py_varobj_iter_next): Use string_printf, not
7982 * python/py-breakpoint.c (local_setattro): Use string_printf, not
7985 2017-08-03 Tom Tromey <tom@tromey.com>
7987 * top.h (do_restore_instream_cleanup): Remove.
7988 * top.c (do_restore_instream_cleanup): Remove.
7989 (read_command_file): Use scoped_restore.
7990 * cli/cli-script.c (execute_user_command): Use scoped_restore.
7992 2017-08-03 Tom Tromey <tom@tromey.com>
7994 * cli/cli-script.c (execute_user_command)
7995 (execute_control_command): Use scoped_restore.
7997 2017-08-03 Tom Tromey <tom@tromey.com>
7999 * cli/cli-script.c (do_restore_user_call_depth): Remove.
8000 (execute_user_command): Remove user_call_depth; use
8001 user_args_stack's size instead.
8003 2017-08-03 Tom Tromey <tom@tromey.com>
8005 * top.h (in_user_command): Remove.
8006 * top.c (in_user_command): Remove.
8007 * cli/cli-script.c (do_restore_user_call_depth)
8008 (execute_user_command): Update.
8010 2017-08-03 Tom Tromey <tom@tromey.com>
8012 * valops.c (search_struct_method): Use gdb::byte_vector.
8013 * valarith.c (value_concat): Use std::vector.
8014 * target.c (memory_xfer_partial): Use gdb::byte_vector.
8015 (simple_search_memory): Likewise.
8016 * printcmd.c (find_string_backward): Use gdb::byte_vector.
8017 * mi/mi-main.c (mi_cmd_data_write_memory): Use gdb::byte_vector.
8018 * gcore.c (gcore_copy_callback): Use gdb::byte_vector.
8019 * elfread.c (elf_rel_plt_read): Use std::string.
8020 * cp-valprint.c (cp_print_value): Use gdb::byte_vector.
8021 * cli/cli-dump.c (restore_section_callback): Use
8024 2017-08-03 Tom Tromey <tom@tromey.com>
8026 * jit.c (jit_reader_load_command): Use unique_xmalloc_ptr.
8028 2017-08-03 Tom Tromey <tom@tromey.com>
8030 * tui/tui-regs.c (tui_restore_gdbout): Remove.
8031 (tui_register_format): Use scoped_restore.
8033 2017-08-03 Tom Tromey <tom@tromey.com>
8035 * reverse.c (exec_direction_default): Remove.
8036 (exec_reverse_once): Use scoped_restore.
8037 * remote.c (restore_remote_timeout): Remove.
8038 (remote_flash_erase, remote_flash_write, remote_flash_done)
8039 (readchar, remote_serial_write): Use scoped_restore.
8040 * cli/cli-script.c (struct source_cleanup_lines_args)
8041 (source_cleanup_lines): Remove.
8042 (script_from_file): Use scoped_restore.
8043 * cli/cli-cmds.c (source_verbose_cleanup): Remove.
8044 (source_command): Use scoped_restore.
8046 2017-08-03 Tom Tromey <tom@tromey.com>
8048 * utils.h (make_cleanup_free_so): Remove.
8049 * utils.c (do_free_so, make_cleanup_free_so): Remove.
8050 * solist.h (struct so_deleter): New.
8051 (so_list_up): New typedef.
8052 * solib-svr4.c (svr4_read_so_list): Use so_list_up.
8054 2017-08-03 Tom Tromey <tom@tromey.com>
8056 * utils.h (make_cleanup_restore_current_language): Remove.
8057 * utils.c (do_restore_current_language)
8058 (make_cleanup_restore_current_language): Remove.
8059 * parse.c (parse_exp_in_context_1)
8060 (parse_expression_with_language): Use
8061 scoped_restore_current_language.
8062 * mi/mi-main.c (mi_cmd_execute): Use
8063 scoped_restore_current_language.
8064 * language.h (scoped_restore_current_language): New class.
8066 2017-08-03 Tom Tromey <tom@tromey.com>
8068 * compile/compile.c (cleanup_unlink_file): Remove.
8069 (compile_to_object): Use gdb::unlinker.
8070 (eval_compile_command): Likewise.
8072 2017-08-03 Tom Tromey <tom@tromey.com>
8074 * utils.h (make_cleanup_fclose): Remove.
8075 * utils.c (do_fclose_cleanup, make_cleanup_fclose): Remove.
8077 2017-08-03 Tom Tromey <tom@tromey.com>
8079 * top.c (open_terminal_stream): Return gdb_file_up.
8080 (new_ui_command): Update.
8082 2017-08-03 Tom Tromey <tom@tromey.com>
8084 * source.c (print_source_lines_base, forward_search_command)
8085 (reverse_search_command): Use gdb_file_up.
8087 2017-08-03 Tom Tromey <tom@tromey.com>
8089 * fbsd-nat.c (fbsd_find_memory_regions): Update.
8091 2017-08-03 Tom Tromey <tom@tromey.com>
8093 * cli/cli-cmds.c (find_and_open_script): Change return type.
8094 Remove "streamp" and "full_path" parameters.
8095 (source_script_with_search): Update.
8096 * auto-load.c (source_script_file): Update.
8097 * cli/cli-cmds.h (find_and_open_script): Change type.
8098 (open_script): New struct.
8100 2017-08-03 Tom Tromey <tom@tromey.com>
8102 * xml-support.c (xml_fetch_content_from_file): Update.
8103 * ui-file.c (stdio_file::open): Update.
8104 * tracefile-tfile.c (tfile_start): Update.
8105 * remote.c (remote_file_put, remote_file_get): Update.
8106 * nat/linux-procfs.c (linux_proc_get_int)
8107 (linux_proc_pid_get_state, linux_proc_tid_get_name): Update.
8108 * nat/linux-osdata.c (linux_common_core_of_thread): Update.
8109 (command_from_pid, commandline_from_pid, linux_xfer_osdata_cpus)
8110 (print_sockets, linux_xfer_osdata_shm, linux_xfer_osdata_sem)
8111 (linux_xfer_osdata_msg, linux_xfer_osdata_modules): Update.
8112 * nat/linux-btrace.c (linux_determine_kernel_start): Update.
8113 * linux-nat.c (linux_proc_pending_signals): Update.
8114 * dwarf2read.c (write_psymtabs_to_index): Use gdb_file_up.
8115 (file_closer): Remove.
8116 * compile/compile.c (compile_to_object): Update.
8117 * common/filestuff.h (struct gdb_file_deleter): New.
8118 (gdb_file_up): New typedef.
8119 (gdb_fopen_cloexec): Change return type.
8120 * common/filestuff.c (gdb_fopen_cloexec): Return gdb_file_up.
8121 * cli/cli-dump.c (fopen_with_cleanup): Remove.
8122 (dump_binary_file, restore_binary_file): Update.
8123 * auto-load.c (auto_load_objfile_script_1): Update.
8125 2017-08-03 Tom Tromey <tom@tromey.com>
8127 * tracepoint.c (tvariables_info_1): Use ui_out_emit_table.
8128 (info_static_tracepoint_markers_command): Likewise.
8129 * solib.c (info_sharedlibrary_command): Use ui_out_emit_table.
8130 * skip.c (skip_info): Use ui_out_emit_table.
8131 * progspace.c (print_program_space): Use ui_out_emit_table.
8132 * osdata.c (info_osdata): Use ui_out_emit_table.
8133 * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions): Use
8135 * linux-thread-db.c (info_auto_load_libthread_db): Use
8137 * inferior.c (print_inferior): Use ui_out_emit_table.
8138 * gdb_bfd.c (maintenance_info_bfds): Use ui_out_emit_table.
8139 * breakpoint.c (breakpoint_1): Use ui_out_emit_table.
8140 * auto-load.c (auto_load_info_scripts): Use ui_out_emit_table.
8141 * ada-tasks.c (print_ada_task_info): Use ui_out_emit_table.
8142 * ui-out.h (class ui_out_emit_table): New.
8144 2017-08-02 Maciej W. Rozycki <macro@imgtec.com>
8146 * mips-tdep.c (mips_fpu_type_str): New function.
8147 (mips_dump_tdep): Call it.
8149 2017-08-01 Maciej W. Rozycki <macro@imgtec.com>
8151 * mips-tdep.c (mips_gdbarch_init): Use MIPS_FPU_TYPE to access
8154 2017-07-31 Xavier Roirand <roirand@adacore.com>
8156 * solib-darwin.c (DYLD_VERSION_MAX): Increase value.
8158 2017-07-27 Xavier Roirand <roirand@adacore.com>
8160 * MAINTAINERS (Write After Approval): Add Xavier Roirand.
8162 2017-07-26 Yao Qi <yao.qi@linaro.org>
8164 * cli/cli-cmds.c (maintenancechecklist): New variable.
8165 * gdbcmd.h (maintenancechecklist): Declare it.
8166 * i386-linux-tdep.c (_initialize_i386_linux_tdep) [GDB_SELF_TEST]:
8167 Call i386_linux_read_description with different masks.
8168 * maint.c (maintenance_check_command): New function.
8169 (_initialize_maint_cmds): Call add_prefix_cmd.
8170 * target-descriptions.c (tdesc_reg): override operator != and ==.
8171 (tdesc_type): Likewise.
8172 (tdesc_feature): Likewise.
8173 (target_desc): Likewise.
8174 [GDB_SELF_TEST] (selftests::record_xml_tdesc): New function.
8175 (maintenance_check_xml_descriptions): New function.
8176 (_initialize_target_descriptions) Add command "xml-descriptions".
8177 * target-descriptions.h (selftests::record_xml_tdesc): Declare.
8179 2017-07-26 Yao Qi <yao.qi@linaro.org>
8181 * i386-linux-tdep.c: Don't include features/i386/i386-*linux.c.
8182 Include features/i386/32bit-*.c.
8183 (i386_linux_read_description): Generate target description if it
8185 (_initialize_i386_linux_tdep): Don't call _initialize_tdesc_i386
8187 * features/i386/32bit-linux.c: Re-generated.
8188 * features/i386/32bit-sse.c: Likewise.
8189 * target-descriptions.c (print_c_feature::visit): Print code to
8190 set register number if needed.
8191 (print_c_feature) <m_next_regnum>: New field.
8193 2017-07-26 Yao Qi <yao.qi@linaro.org>
8195 * features/Makefile (CFILES): Rename with TDESC_CFILES.
8196 (FEATURE_XMLFILES): New.
8197 (FEATURE_CFILES): New.
8199 (clean-cfiles): Remove generated c files.
8200 * features/i386/32bit-avx.c: Generated.
8201 * features/i386/32bit-avx512.c: Generated.
8202 * features/i386/32bit-core.c: Generated.
8203 * features/i386/32bit-linux.c: Generated.
8204 * features/i386/32bit-mpx.c: Generated.
8205 * features/i386/32bit-pkeys.c: Generated.
8206 * features/i386/32bit-sse.c: Generated.
8207 * target-descriptions.c: Include algorithm.
8208 (tdesc_element_visitor): Add method visit_end.
8209 (print_c_tdesc): Implement visit_end.
8210 (print_c_tdesc:: m_filename_after_features): Move it to
8212 (print_c_feature): New class.
8213 (maint_print_c_tdesc_cmd): Use print_c_feature if XML file
8214 name starts with "i386/32bit-".
8216 2017-07-26 Yao Qi <yao.qi@linaro.org>
8218 * target-descriptions.c (tdesc_element_visitor): New class.
8219 (tdesc_element): New class.
8220 (tdesc_reg): Inherit from tdesc_element.
8221 (tdesc_reg::accept): New function.
8222 (tdesc_type): Inherit from tdesc_element.
8223 (tdesc_type::accept): New function.
8224 (tdesc_feature): Inherit from tdesc_element.
8225 (tdesc_feature::accept): New function.
8226 (target_desc): Inherit from tdesc_element.
8227 (target_desc::target_desc): New.
8228 (target_desc::~target_desc): New.
8229 (target_desc::accept): New.
8230 (allocate_target_description): Use new.
8231 (free_target_description): Use delete.
8232 (print_c_tdesc): New class.
8233 (maint_print_c_tdesc_cmd): Adjust.
8235 * features/aarch64.c: Re-generated.
8236 * features/arc-arcompact.c: Re-generated.
8237 * features/arc-v2.c: Re-generated.
8238 * features/arm/arm-with-iwmmxt.c: Re-generated.
8239 * features/arm/arm-with-m.c: Re-generated.
8240 * features/arm/arm-with-m-fpa-layout.c: Re-generated.
8241 * features/arm/arm-with-m-vfp-d16.c: Re-generated.
8242 * features/arm/arm-with-neon.c: Re-generated.
8243 * features/arm/arm-with-vfpv2.c: Re-generated.
8244 * features/arm/arm-with-vfpv3.c: Re-generated.
8245 * features/i386/amd64-avx-avx512.c: Re-generated.
8246 * features/i386/amd64-avx-avx512-linux.c: Re-generated.
8247 * features/i386/amd64-avx.c: Re-generated.
8248 * features/i386/amd64-avx-linux.c: Re-generated.
8249 * features/i386/amd64-avx-mpx-avx512-pku.c: Re-generated.
8250 * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Re-generated.
8251 * features/i386/amd64-avx-mpx.c: Re-generated.
8252 * features/i386/amd64-avx-mpx-linux.c: Re-generated.
8253 * features/i386/amd64.c: Re-generated.
8254 * features/i386/amd64-linux.c: Re-generated.
8255 * features/i386/amd64-mpx.c: Re-generated.
8256 * features/i386/amd64-mpx-linux.c: Re-generated.
8257 * features/i386/i386-avx-avx512.c: Re-generated.
8258 * features/i386/i386-avx-avx512-linux.c: Re-generated.
8259 * features/i386/i386-avx.c: Re-generated.
8260 * features/i386/i386-avx-linux.c: Re-generated.
8261 * features/i386/i386-avx-mpx-avx512-pku.c: Re-generated.
8262 * features/i386/i386-avx-mpx-avx512-pku-linux.c: Re-generated.
8263 * features/i386/i386-avx-mpx.c: Re-generated.
8264 * features/i386/i386-avx-mpx-linux.c: Re-generated.
8265 * features/i386/i386.c: Re-generated.
8266 * features/i386/i386-linux.c: Re-generated.
8267 * features/i386/i386-mmx.c: Re-generated.
8268 * features/i386/i386-mmx-linux.c: Re-generated.
8269 * features/i386/i386-mpx.c: Re-generated.
8270 * features/i386/i386-mpx-linux.c: Re-generated.
8271 * features/i386/x32-avx-avx512.c: Re-generated.
8272 * features/i386/x32-avx-avx512-linux.c: Re-generated.
8273 * features/i386/x32-avx.c: Re-generated.
8274 * features/i386/x32-avx-linux.c: Re-generated.
8275 * features/i386/x32.c: Re-generated.
8276 * features/i386/x32-linux.c: Re-generated.
8277 * features/microblaze.c: Re-generated.
8278 * features/microblaze-with-stack-protect.c: Re-generated.
8279 * features/mips64-dsp-linux.c: Re-generated.
8280 * features/mips64-linux.c: Re-generated.
8281 * features/mips-dsp-linux.c: Re-generated.
8282 * features/mips-linux.c: Re-generated.
8283 * features/nds32.c: Re-generated.
8284 * features/nios2.c: Re-generated.
8285 * features/nios2-linux.c: Re-generated.
8286 * features/rs6000/powerpc-32.c: Re-generated.
8287 * features/rs6000/powerpc-32l.c: Re-generated.
8288 * features/rs6000/powerpc-403.c: Re-generated.
8289 * features/rs6000/powerpc-403gc.c : Re-generated.
8290 * features/rs6000/powerpc-405.c: Re-generated.
8291 * features/rs6000/powerpc-505.c: Re-generated.
8292 * features/rs6000/powerpc-601.c: Re-generated.
8293 * features/rs6000/powerpc-602.c: Re-generated.
8294 * features/rs6000/powerpc-603.c: Re-generated.
8295 * features/rs6000/powerpc-604.c: Re-generated.
8296 * features/rs6000/powerpc-64.c: Re-generated.
8297 * features/rs6000/powerpc-64l.c: Re-generated.
8298 * features/rs6000/powerpc-7400.c: Re-generated.
8299 * features/rs6000/powerpc-750.c: Re-generated.
8300 * features/rs6000/powerpc-860.c: Re-generated.
8301 * features/rs6000/powerpc-altivec32.c: Re-generated.
8302 * features/rs6000/powerpc-altivec32l.c: Re-generated.
8303 * features/rs6000/powerpc-altivec64.c: Re-generated.
8304 * features/rs6000/powerpc-altivec64l.c: Re-generated.
8305 * features/rs6000/powerpc-cell32l.c: Re-generated.
8306 * features/rs6000/powerpc-cell64l.c: Re-generated.
8307 * features/rs6000/powerpc-e500.c: Re-generated.
8308 * features/rs6000/powerpc-e500l.c: Re-generated.
8309 * features/rs6000/powerpc-isa205-32l.c: Re-generated.
8310 * features/rs6000/powerpc-isa205-64l.c: Re-generated.
8311 * features/rs6000/powerpc-isa205-altivec32l.c: Re-generated.
8312 * features/rs6000/powerpc-isa205-altivec64l.c: Re-generated.
8313 * features/rs6000/powerpc-isa205-vsx32l.c: Re-generated.
8314 * features/rs6000/powerpc-isa205-vsx64l.c: Re-generated.
8315 * features/rs6000/powerpc-vsx32.c: Re-generated.
8316 * features/rs6000/powerpc-vsx32l.c: Re-generated.
8317 * features/rs6000/powerpc-vsx64.c: Re-generated.
8318 * features/rs6000/powerpc-vsx64l.c: Re-generated.
8319 * features/rs6000/rs6000.c: Re-generated.
8320 * features/s390-linux32.c: Re-generated.
8321 * features/s390-linux32v1.c: Re-generated.
8322 * features/s390-linux32v2.c: Re-generated.
8323 * features/s390-linux64.c: Re-generated.
8324 * features/s390-linux64v1.c: Re-generated.
8325 * features/s390-linux64v2.c: Re-generated.
8326 * features/s390-te-linux64.c: Re-generated.
8327 * features/s390-tevx-linux64.c: Re-generated.
8328 * features/s390-vx-linux64.c: Re-generated.
8329 * features/s390x-linux64.c: Re-generated.
8330 * features/s390x-linux64v1.c: Re-generated.
8331 * features/s390x-linux64v2.c: Re-generated.
8332 * features/s390x-te-linux64.c: Re-generated.
8333 * features/s390x-tevx-linux64.c: Re-generated.
8334 * features/s390x-vx-linux64.c: Re-generated.
8335 * features/sparc/sparc32-solaris.c: Re-generated.
8336 * features/sparc/sparc64-solaris.c: Re-generated.
8337 * features/tic6x-c62x.c: Re-generated.
8338 * features/tic6x-c62x-linux.c: Re-generated.
8339 * features/tic6x-c64x.c: Re-generated.
8340 * features/tic6x-c64x-linux.c: Re-generated.
8341 * features/tic6x-c64xp.c: Re-generated.
8342 * features/tic6x-c64xp-linux.c: Re-generated.
8344 2017-07-26 Yao Qi <yao.qi@linaro.org>
8346 * i386-linux-tdep.c (i386_linux_read_description): New function.
8347 (i386_linux_core_read_description): Call
8348 i386_linux_read_description.
8349 * i386-linux-tdep.h (i386_linux_read_description): Declare.
8350 (tdesc_i386_linux, tdesc_i386_mmx_linux): Remove declarations.
8351 (tdesc_i386_avx_linux, tdesc_i386_mpx_linux): Likewise
8352 (tdesc_i386_avx_mpx_linux, tdesc_i386_avx_avx512_linux): Likewise.
8353 (tdesc_i386_avx_mpx_avx512_pku_linux): Likewise.
8354 * x86-linux-nat.c (x86_linux_read_description): Call
8355 i386_linux_read_description.
8357 2017-07-26 Yao Qi <yao.qi@linaro.org>
8360 * features/Makefile (%.c: %.xml): Pass the xml file name to
8361 command "maint print c-tdesc".
8362 * target-descriptions.c (maint_print_c_tdesc_cmd): Get file
8365 2017-07-26 Yao Qi <yao.qi@linaro.org>
8367 * target-descriptions.c (target_desc): Add ctor and dtor. Do
8368 in-class initialization.
8369 (tdesc_create_feature): Call new instead of XCNEW.
8370 (free_target_description): Ue delete.
8372 2017-07-25 John Baldwin <jhb@FreeBSD.org>
8374 * configure.nat: Add "-lkvm" for NetBSD/sparc64 and fix typo.
8376 2017-07-25 Yao Qi <yao.qi@linaro.org>
8378 * amd64-tdep.c (amd64_init_abi): Make argument default_tdesc
8380 (amd64_x32_init_abi): Likewise.
8381 * amd64-tdep.h (amd64_init_abi): Update declaration.
8382 (amd64_x32_init_abi): Likewise.
8384 2017-07-25 Yao Qi <yao.qi@linaro.org>
8387 * arm-linux-nat.c (arm_linux_fetch_inferior_registers): Update
8388 condition for FPSCR.
8389 (arm_linux_store_inferior_registers): Likewise.
8391 2017-07-22 Tom Tromey <tom@tromey.com>
8393 * break-catch-syscall.c (struct catch_syscall_inferior_data)
8394 <syscalls_counts>: Now a std::vector.
8395 (get_catch_syscall_inferior_data): Use "new".
8396 (catch_syscall_inferior_data_cleanup): Use "delete".
8397 (insert_catch_syscall, remove_catch_syscall)
8398 (clear_syscall_counts): Update.
8400 2017-07-22 Tom Tromey <tom@tromey.com>
8402 * break-catch-syscall.c (syscall_catchpoint)
8403 <syscalls_to_be_caught>: Now a std::vector<int>
8404 (~syscall_catchpoint): Remove.
8405 (insert_catch_syscall, remove_catch_syscall)
8406 (breakpoint_hit_catch_syscall, print_one_catch_syscall)
8407 (print_mention_catch_syscall, print_recreate_catch_syscall):
8409 (create_syscall_event_catchpoint): Change type of "filter"
8411 (catch_syscall_split_args): Return a std::vector.
8412 (catch_syscall_command_1, catching_syscall_number_1): Update.
8414 2017-07-22 Tom Tromey <tom@tromey.com>
8416 * break-catch-throw.c (struct exception_catchpoint)
8417 <exception_rx>: Now a std::string.
8418 (~exception_catchpoint): Remove.
8419 (print_one_detail_exception_catchpoint): Update.
8420 (handle_gnu_v3_exceptions): Change type of except_rx.
8421 (extract_exception_regexp): Return a std::string.
8422 (catch_exception_command_1): Update.
8424 2017-07-22 Tom Tromey <tom@tromey.com>
8426 * break-catch-sig.c (gdb_signal_type): Remove typedef.
8427 (struct signal_catchpoint) <signals_to_be_caught>: Now a
8429 <catch_all>: Now a bool.
8430 (~signal_catchpoint): Remove.
8431 (signal_catchpoint_insert_location)
8432 (signal_catchpoint_remove_location)
8433 (signal_catchpoint_breakpoint_hit, signal_catchpoint_print_one)
8434 (signal_catchpoint_print_mention)
8435 (signal_catchpoint_print_recreate)
8436 (signal_catchpoint_explains_signal): Update.
8437 (create_signal_catchpoint): Change type of "filter" and
8439 (catch_signal_split_args): Return a std::vector. Change type of
8441 (catch_signal_command): Update.
8443 2017-07-20 Pedro Alves <palves@redhat.com>
8445 * ada-lang.c (ada_language_defn): Make extern.
8446 (_initialize_ada_language): Remove add_language call.
8447 * c-lang.c (c_language_defn, cplus_language_defn)
8448 (asm_language_defn, minimal_language_defn): Make extern.
8449 (_initialize_c_language): Delete.
8450 * completer.c (compare_cstrings): Delete, moved to utils.h.
8451 * d-lang.c (d_language_defn): Make extern.
8452 (_initialize_d_language): Remove add_language calls.
8453 * defs.h (enum language): Add comment.
8454 * f-lang.c (f_language_defn): Make extern.
8455 (_initialize_f_language): Remove add_language call.
8456 * go-lang.c (go_language_defn): Make extern.
8457 (_initialize_go_language): Remove add_language call.
8458 * language.c: Include <algorithm>.
8459 (languages): Redefine as const array.
8460 (languages_size, languages_allocsize, DEFAULT_ALLOCSIZE): Delete.
8461 (set_language_command): Handle "local". Use for-range loop.
8462 (set_language): Remove loop.
8463 (language_enum): Rewrite.
8464 (language_def, language_str): Remove loops.
8465 (add_language): Delete.
8466 (add_set_language_command): New, based on add_languages.
8467 (skip_language_trampoline): Adjust.
8468 (local_language_defn): Delete.
8469 (language_gdbarch_post_init): Adjust.
8470 (_initialize_language): Remove add_language calls. Call
8471 add_set_language_command.
8472 * language.h (add_language): Delete.
8473 (auto_language_defn)
8474 (unknown_language_defn, minimal_language_defn, ada_language_defn)
8475 (asm_language_defn, c_language_defn, cplus_language_defn)
8476 (d_language_defn, f_language_defn, go_language_defn)
8477 (m2_language_defn, objc_language_defn, opencl_language_defn)
8478 (pascal_language_defn, rust_language_defn): Declare.
8479 * m2-lang.c (m2_language_defn): Make extern.
8480 (_initialize_m2_language): Remove add_language call.
8481 * objc-lang.c (objc_language_defn): Make extern.
8482 (_initialize_objc_language): Remove add_language call.
8483 * opencl-lang.c (opencl_language_defn): Make extern.
8484 (_initialize_opencl_language): Remove add_language call.
8485 * p-lang.c (pascal_language_defn): Make extern.
8486 (_initialize_pascal_language): Delete.
8487 * rust-lang.c (rust_language_defn): Make extern.
8488 (_initialize_rust_language): Delete.
8489 * utils.h (compare_cstrings): New static inline function.
8491 2017-07-20 Pedro Alves <palves@redhat.com>
8493 * ada-lang.c (ada_to_fixed_type_1): Adjust.
8494 (get_var_value): Constify parameters.
8495 (get_int_var_value): Change prototype.
8496 (to_fixed_range_type): Adjust.
8497 * ada-lang.h (get_int_var_value): Change prototype.
8499 2017-07-20 Pedro Alves <palves@redhat.com>
8501 * dwarf2read.c (dw2_lookup_symbol): Use
8502 SYMBOL_MATCHES_SEARCH_NAME.
8503 * psymtab.c (psym_lookup_symbol): Use SYMBOL_MATCHES_SEARCH_NAME.
8505 2017-07-20 Pedro Alves <palves@redhat.com>
8507 * block.c (block_iter_name_step, block_iter_name_first)
8508 (block_iter_name_next): Delete.
8509 (block_lookup_symbol_primary): Adjust to use
8510 dict_iter_match_first/dict_iter_match_next.
8511 * block.h (block_iter_name_first, block_iter_name_next): Delete
8513 (ALL_BLOCK_SYMBOLS_WITH_NAME): Adjust to use
8514 dict_iter_match_first/dict_iter_match_next.
8516 2017-07-20 Pedro Alves <palves@redhat.com>
8518 * cp-support.c (cp_find_first_component_aux): Add missing case for
8521 2017-07-18 David Blaikie <dblaikie@gmail.com>
8523 * dwarf2read.c (create_cus_hash_table): Re-add lost initialization
8524 of dwo_cu's dwo_file.
8526 2017-07-18 Yao Qi <yao.qi@linaro.org>
8528 * remote.c (store_registers_using_G): Remove one line comment.
8530 2017-07-18 Yao Qi <yao.qi@linaro.org>
8532 * regcache.c (regcache_cpy): Simplify it.
8533 (regcache::cpy_no_passthrough): Remove it.
8534 * regcache.h (cpy_no_passthrough): Remove it.
8535 (regcache_dup, regcache_cpy): Update comments.
8537 2017-07-18 Pedro Alves <palves@redhat.com>
8539 * remote-sim.c (sim_command_completer): Adjust to work with a
8540 completion_tracker instead of a VEC.
8542 2017-07-17 Pedro Alves <palves@redhat.com>
8544 * completer.c (complete_source_filenames): New function.
8545 (complete_address_and_linespec_locations): New function.
8546 (location_completer): Use complete_address_and_linespec_locations.
8547 (completion_tracker::build_completion_result): Honor the tracker's
8548 request to suppress append.
8549 * completer.h (completion_tracker::suppress_append_ws)
8550 (completion_tracker::set_suppress_append_ws): New methods.
8551 (completion_tracker::m_suppress_append_ws): New field.
8552 (complete_source_filenames): New declaration.
8553 * linespec.c (linespec_complete_what): New.
8554 (struct ls_parser) <complete_what, completion_word,
8555 completion_quote_char, completion_quote_end, completion_tracker>:
8557 (string_find_incomplete_keyword_at_end): New.
8558 (linespec_lexer_lex_string): Record quote char. If in completion
8560 (linespec_lexer_consume_token): Advance the completion word point.
8561 (linespec_lexer_peek_token): Save/restore completion info.
8562 (save_stream_and_consume_token): New.
8563 (set_completion_after_number): New.
8564 (linespec_parse_basic): Set what to complete next depending on
8565 token. Handle function and label completions specially.
8566 (parse_linespec): Disable objc shortcut in completion mode. Set
8567 what to complete next depending on token type. Skip keyword if in
8569 (complete_linespec_component, linespec_complete): New.
8570 * linespec.h (linespec_complete): Declare.
8572 2017-07-17 Pedro Alves <palves@redhat.com>
8574 * linespec.c (linespec_lexer_lex_string, find_toplevel_char):
8575 Handle 'operator<' / 'operator<<'.
8577 2017-07-17 Pedro Alves <palves@redhat.com>
8579 * completer.c (collect_explicit_location_matches): Handle
8581 (convert_explicit_location_to_linespec): New, factored out from
8583 (convert_explicit_location_to_sals): ... this.
8584 (complete_label): New.
8585 (linespec_complete_label, find_label_symbols_in_block): New.
8586 (find_label_symbols): Add completion_mode parameter and adjust to
8587 call find_label_symbols_in_block.
8588 * linespec.h (linespec_complete_label): Declare.
8590 2017-07-17 Pedro Alves <palves@redhat.com>
8592 * ada-lang.c (ada_collect_symbol_completion_matches): Add
8593 complete_symbol_mode parameter.
8594 * cli/cli-cmds.c (complete_command): Get the completion result out
8595 of the handle_brkchars tracker if used a custom word point.
8596 * completer.c: Include "linespec.h".
8597 (enum explicit_location_match_type) <MATCH_LINE>: New enumerator.
8598 (advance_to_expression_complete_word_point): New.
8599 (completion_tracker::completes_to_completion_word): New.
8600 (complete_files_symbols): Pass down
8601 complete_symbol_mode::EXPRESSION.
8602 (explicit_options, probe_options): New.
8603 (collect_explicit_location_matches): Complete on the
8604 explictit_loc->foo instead of word. Use
8605 linespec_complete_function. Handle MATCH_LINE. Handle offering
8606 keyword and options completions.
8607 (backup_text_ptr): Delete.
8608 (skip_keyword): New.
8609 (complete_explicit_location): Remove 'word' parameter. Add
8610 language, quoted_arg_start and quoted_arg_end parameters.
8611 Rewrite, parsing left to right.
8612 (location_completer): Rewrite.
8613 (location_completer_handle_brkchars): New function.
8614 (symbol_completer): Pass down complete_symbol_mode::EXPRESSION.
8615 (enum complete_line_internal_reason): Adjust comments.
8616 (completion_tracker::discard_completions): New.
8617 (completer_handle_brkchars_func_for_completer): Handle
8619 (gdb_custom_word_point_brkchars)
8620 (gdb_org_rl_basic_quote_characters): New.
8621 (gdb_completion_word_break_characters_throw)
8622 (completion_find_completion_word): Handle trackers that use a
8624 (completion_tracker::advance_custom_word_point_by): New.
8625 (completion_tracker::build_completion_result): Don't rely on
8626 readline appending the quote char.
8627 (gdb_rl_attempted_completion_function_throw): Handle trackers that
8628 use a custom word point.
8629 (gdb_rl_attempted_completion_function): Restore
8630 rl_basic_quote_characters.
8631 * completer.h (class completion_tracker): Extend intro comment.
8632 (completion_tracker::set_quote_char)
8633 (completion_tracker::quote_char)
8634 (completion_tracker::set_use_custom_word_point)
8635 (completion_tracker::use_custom_word_point)
8636 (completion_tracker::custom_word_point)
8637 (completion_tracker::set_custom_word_point)
8638 (completion_tracker::advance_custom_word_point_by)
8639 (completion_tracker::completes_to_completion_word)
8640 (completion_tracker::discard_completions): New methods.
8641 (completion_tracker::m_quote_char)
8642 (completion_tracker::m_use_custom_word_point)
8643 (completion_tracker::m_custom_word_point): New fields.
8644 (advance_to_expression_complete_word_point): Declare.
8645 * f-lang.c (f_collect_symbol_completion_matches): Add
8646 complete_symbol_mode parameter.
8647 * language.h (struct language_defn)
8648 <la_collect_symbol_completion_matches>: Add complete_symbol_mode
8650 * linespec.c (linespec_keywords): Add NULL terminator. Make extern.
8651 (linespec_complete_function): New function.
8652 (linespec_lexer_lex_keyword): Adjust.
8653 * linespec.h (linespec_keywords, linespec_complete_function): New
8655 * location.c (find_end_quote): New function.
8656 (explicit_location_lex_one): Add explicit_completion_info
8657 parameter. Save quoting info. Don't throw if being called for
8658 completion. Don't handle Ada operators here.
8659 (is_cp_operator, skip_op_false_positives, first_of)
8660 (explicit_location_lex_one_function): New function.
8661 (string_to_explicit_location): Replace 'dont_throw' parameter with
8662 an explicit_completion_info pointer parameter. Handle it. Don't
8663 use explicit_location_lex_one to lex function names. Use
8664 explicit_location_lex_one_function instead.
8665 * location.h (struct explicit_completion_info): New.
8666 (string_to_explicit_location): Replace 'dont_throw' parameter with
8667 an explicit_completion_info pointer parameter.
8668 * symtab.c (default_collect_symbol_completion_matches_break_on):
8669 Add complete_symbol_mode parameter. Handle LINESPEC mode.
8670 (default_collect_symbol_completion_matches)
8671 (collect_symbol_completion_matches): Add complete_symbol_mode
8673 (collect_symbol_completion_matches_type): Pass down
8674 complete_symbol_mode::EXPRESSION.
8675 (collect_file_symbol_completion_matches): Add complete_symbol_mode
8676 parameter. Handle LINESPEC mode.
8677 * symtab.h (complete_symbol_mode): New.
8678 (default_collect_symbol_completion_matches_break_on)
8679 (default_collect_symbol_completion_matches)
8680 (collect_symbol_completion_matches)
8681 (collect_file_symbol_completion_matches): Add complete_symbol_mode
8684 2017-07-17 Pedro Alves <palves@redhat.com>
8686 * utils.c (enum class strncmp_iw_mode): New.
8687 (strcmp_iw): Rename to ...
8688 (strncmp_iw_with_mode): ... this. Add string2_len and mode
8689 parameters. Handle them.
8691 (strcmp_iw): Reimplement as wrapper around strncmp_iw_with_mode.
8692 * utils.h (strncmp_iw): Declare.
8693 (strcmp_iw): Move describing comments here.
8695 2017-07-17 Pedro Alves <palves@redhat.com>
8697 * c-exp.y (operator_stoken): Use CP_OPERATOR_LEN and
8699 * c-typeprint.c (is_type_conversion_operator): Use
8701 * cp-support.c (LENGTH_OF_OPERATOR): Delete.
8702 (cp_find_first_component_aux): Use CP_OPERATOR_STR and
8704 * cp-support.h (CP_OPERATOR_STR, CP_OPERATOR_LEN): New.
8705 * gnu-v2-abi.c (gnuv2_is_operator_name): Use CP_OPERATOR_STR.
8706 * gnu-v3-abi.c (gnuv3_is_operator_name): Use CP_OPERATOR_STR.
8707 * linespec.c (linespec_lexer_lex_string): Use CP_OPERATOR_LEN and
8709 * location.c: Include "cp-support.h".
8710 (explicit_location_lex_one): Use CP_OPERATOR_LEN and
8712 * symtab.c (operator_chars): Use CP_OPERATOR_STR and
8715 2017-07-17 Pedro Alves <palves@redhat.com>
8717 * cli/cli-cmds.c (complete_command): Use a completion tracker
8718 along with completion_find_completion_word for handle_brkchars
8720 * completer.c (RL_QF_SINGLE_QUOTE, RL_QF_DOUBLE_QUOTE)
8721 (RL_QF_BACKSLASH, RL_QF_OTHER_QUOTE): New.
8722 (struct gdb_rl_completion_word_info): New.
8723 (gdb_rl_find_completion_word): New.
8724 (completion_find_completion_word): New.
8725 * completer.h (completion_find_completion_word): Declare.
8727 2017-07-17 Pedro Alves <palves@redhat.com>
8729 * ada-lang.c (symbol_completion_match): Adjust comments.
8730 (symbol_completion_add): Replace vector parameter with
8731 completion_tracker parameter. Use it.
8732 (ada_make_symbol_completion_list): Rename to...
8733 (ada_collect_symbol_completion_matches): ... this. Add
8734 completion_tracker parameter and use it.
8735 (ada_language_defn): Adjust.
8736 * break-catch-syscall.c (catch_syscall_completer): Adjust
8737 prototype and work with completion_tracker instead of VEC.
8738 * breakpoint.c (condition_completer): Adjust prototype and work
8739 with completion_tracker instead of VEC.
8740 * c-lang.c (c_language_defn, cplus_language_defn)
8741 (asm_language_defn, minimal_language_defn): Adjust to renames.
8742 * cli/cli-cmds.c (complete_command): Rework using
8743 completion_tracker. Catch exceptions when completing.
8744 * cli/cli-decode.c (integer_unlimited_completer)
8745 (complete_on_cmdlist, complete_on_enum): Adjust prototype and work
8746 with completion_tracker instead of VEC.
8747 * command.h (struct completion_tracker): Forward declare.
8748 (completer_ftype, completer_handle_brkchars_ftype): Change
8750 (complete_on_cmdlist, complete_on_enum): Adjust.
8751 * completer.c: Include <algorithm>.
8752 (struct gdb_completer_state): New.
8753 (current_completion): New global.
8754 (readline_line_completion_function): Delete.
8755 (noop_completer, filename_completer)
8756 (filename_completer_handle_brkchars, complete_files_symbols)
8757 (linespec_location_completer): Adjust to work with a
8758 completion_tracker instead of a VEC.
8759 (string_or_empty): New.
8760 (collect_explicit_location_matches): Adjust to work with a
8761 completion_tracker instead of a VEC.
8762 (explicit_location_completer): Rename to ...
8763 (complete_explicit_location): ... this and adjust to work with a
8764 completion_tracker instead of a VEC.
8765 (location_completer): Adjust to work with a completion_tracker
8767 (add_struct_fields): Adjust to work with a completion_list instead
8769 (expression_completer): Rename to ...
8770 (complete_expression): ... this and adjust to work with a
8771 completion_tracker instead of a VEC. Use complete_files_symbols.
8772 (expression_completer): Reimplement on top of complete_expression.
8773 (symbol_completer): Adjust to work with a completion_tracker
8775 (enum complete_line_internal_reason): Add describing comments.
8776 (complete_line_internal_normal_command): Adjust to work with a
8777 completion_tracker instead of a VEC.
8778 (complete_line_internal): Rename to ...
8779 (complete_line_internal_1): ... this and adjust to work with a
8780 completion_tracker instead of a VEC. Assert TEXT is NULL in the
8781 handle_brkchars phase.
8782 (new_completion_tracker): Delete.
8783 (complete_line_internal): Reimplement as TRY/CATCH wrapper around
8784 complete_line_internal_1.
8785 (free_completion_tracker): Delete.
8786 (INITIAL_COMPLETION_HTAB_SIZE): New.
8787 (completion_tracker::completion_tracker)
8788 (completion_tracker::~completion_tracker): New.
8789 (maybe_add_completion): Delete.
8790 (completion_tracker::maybe_add_completion)
8791 (completion_tracker::add_completion)
8792 (completion_tracker::add_completions): New.
8793 (throw_max_completions_reached_error): Delete.
8794 (complete_line): Adjust to work with a completion_tracker instead
8795 of a VEC. Don't create a completion_tracker_t or check for max
8797 (command_completer, command_completer_handle_brkchars)
8798 (signal_completer, reg_or_group_completer_1)
8799 (reg_or_group_completer, default_completer_handle_brkchars):
8800 Adjust to work with a completion_tracker.
8801 (gdb_completion_word_break_characters_throw): New.
8802 (gdb_completion_word_break_characters): Reimplement.
8803 (line_completion_function): Delete.
8804 (completion_tracker::recompute_lowest_common_denominator)
8805 (expand_preserving_ws)
8806 (completion_tracker::build_completion_result)
8807 (completion_result::completion_result)
8808 (completion_result::completion_result)
8809 (completion_result::~completion_result)
8810 (completion_result::completion_result)
8811 (completion_result::release_match_list, compare_cstrings)
8812 (completion_result::sort_match_list)
8813 (completion_result::reset_match_list)
8814 (gdb_rl_attempted_completion_function_throw)
8815 (gdb_rl_attempted_completion_function): New.
8816 * completer.h (completion_list, struct completion_result)
8817 (class completion_tracker): New.
8818 (complete_line): Add completion_tracker parameter.
8819 (readline_line_completion_function): Delete.
8820 (gdb_rl_attempted_completion_function): New.
8821 (noop_completer, filename_completer, expression_completer)
8822 (location_completer, symbol_completer, command_completer)
8823 (signal_completer, reg_or_group_completer): Update prototypes.
8824 (completion_tracker_t, new_completion_tracker)
8825 (make_cleanup_free_completion_tracker): Delete.
8826 (enum maybe_add_completion_enum): Delete.
8827 (maybe_add_completion): Delete.
8828 (throw_max_completions_reached_error): Delete.
8829 * corefile.c (complete_set_gnutarget): Adjust to work with a
8830 completion_tracker instead of a VEC.
8831 * cp-abi.c (cp_abi_completer): Adjust to work with a
8832 completion_tracker instead of a VEC.
8833 * d-lang.c (d_language_defn): Adjust.
8834 * disasm.c (disassembler_options_completer): Adjust to work with a
8835 completion_tracker instead of a VEC.
8836 * f-lang.c (f_make_symbol_completion_list): Rename to ...
8837 (f_collect_symbol_completion_matches): ... this. Adjust to work
8838 with a completion_tracker instead of a VEC.
8839 (f_language_defn): Adjust.
8840 * go-lang.c (go_language_defn): Adjust.
8841 * guile/scm-cmd.c (cmdscm_add_completion, cmdscm_completer):
8842 Adjust to work with a completion_tracker instead of a VEC.
8843 * infrun.c (handle_completer): Likewise.
8844 * interps.c (interpreter_completer): Likewise.
8845 * interps.h (interpreter_completer): Likewise.
8846 * language.c (unknown_language_defn, auto_language_defn)
8847 (local_language_defn): Adjust.
8848 * language.h (language_defn::la_make_symbol_completion_list):
8850 (language_defn::la_collect_symbol_completion_matches): ... this
8851 and adjust to work with a completion_tracker instead of a VEC.
8852 * m2-lang.c (m2_language_defn): Adjust.
8853 * objc-lang.c (objc_language_defn): Adjust.
8854 * opencl-lang.c (opencl_language_defn): Adjust.
8855 * p-lang.c (pascal_language_defn): Adjust.
8856 * python/py-cmd.c (cmdpy_completer_helper): Handle NULL word.
8857 (cmdpy_completer_handle_brkchars, cmdpy_completer): Adjust to work
8858 with a completion_tracker.
8859 * rust-lang.c (rust_language_defn): Adjust.
8860 * symtab.c (free_completion_list, do_free_completion_list)
8861 (return_val, completion_tracker): Delete.
8862 (completion_list_add_name, completion_list_add_symbol)
8863 (completion_list_add_msymbol, completion_list_objc_symbol)
8864 (completion_list_add_fields, add_symtab_completions): Add
8865 completion_tracker parameter and use it.
8866 (default_make_symbol_completion_list_break_on_1): Rename to...
8867 (default_collect_symbol_completion_matches_break_on): ... this.
8868 Add completion_tracker parameter and use it instead of allocating
8869 a completion tracker here.
8870 (default_make_symbol_completion_list_break_on): Delete old
8872 (default_make_symbol_completion_list): Delete.
8873 (default_collect_symbol_completion_matches): New.
8874 (make_symbol_completion_list): Delete.
8875 (collect_symbol_completion_matches): New.
8876 (make_symbol_completion_type): Rename to ...
8877 (collect_symbol_completion_matches_type): ... this. Add
8878 completion_tracker parameter and use it instead of VEC.
8879 (make_file_symbol_completion_list_1): Rename to...
8880 (collect_file_symbol_completion_matches): ... this. Add
8881 completion_tracker parameter and use it instead of VEC.
8882 (make_file_symbol_completion_list): Delete.
8883 (add_filename_to_list): Use completion_list instead of a VEC.
8884 (add_partial_filename_data::list): Now a completion_list.
8885 (make_source_files_completion_list): Work with a completion_list
8887 * symtab.h: Include "completer.h".
8888 (default_make_symbol_completion_list_break_on)
8889 (default_make_symbol_completion_list, make_symbol_completion_list)
8890 (make_symbol_completion_type, make_file_symbol_completion_list)
8891 (make_source_files_completion_list): Delete.
8892 (default_collect_symbol_completion_matches_break_on)
8893 (default_collect_symbol_completion_matches)
8894 (collect_symbol_completion_matches)
8895 (collect_symbol_completion_matches_type)
8896 (collect_file_symbol_completion_matches)
8897 (make_source_files_completion_list): New.
8898 * top.c (init_main): Don't install a rl_completion_entry_function
8899 hook. Install a rl_attempted_completion_function hook instead.
8900 * tui/tui-layout.c (layout_completer): Adjust to work with a
8902 * tui/tui-regs.c (tui_reggroup_completer):
8903 * tui/tui-win.c (window_name_completer, focus_completer)
8904 (winheight_completer): Adjust to work with a completion_tracker.
8905 * value.c: Include "completer.h".
8906 (complete_internalvar): Adjust to work with a completion_tracker.
8907 * value.h (complete_internalvar): Likewise.
8909 2017-07-17 Pedro Alves <palves@redhat.com>
8911 * cli/cli-decode.c (set_cmd_completer_handle_brkchars): Adjust to
8913 * cli/cli-decode.h (struct cmd_list_element) <completer>: Move
8914 comments to completer_ftype's declaration.
8915 <completer_handle_brkchars>: Change type to
8916 completer_handle_brkchars_ftype.
8917 * command.h (completer_ftype): Add describing comment and give
8918 names to parameters.
8919 (completer_ftype_void): Rename to ...
8920 (completer_handle_brkchars_ftype) ... this. Add describing comment.
8921 (set_cmd_completer_handle_brkchars): Adjust.
8922 * completer.c (filename_completer_handle_brkchars): New function.
8923 (complete_line_internal_normal_command): New function, factored
8925 (complete_line_internal): ... here.
8926 (command_completer_handle_brkchars)
8927 (default_completer_handle_brkchars)
8928 (completer_handle_brkchars_func_for_completer): New functions.
8929 * completer.h (set_gdb_completion_word_break_characters): Delete
8931 (completer_handle_brkchars_func_for_completer): New declaration.
8932 * python/py-cmd.c (cmdpy_completer_handle_brkchars): Adjust to use
8933 completer_handle_brkchars_func_for_completer.
8935 2017-07-17 Pedro Alves <palves@redhat.com>
8937 * completer.c (symbol_completer): New function, based on
8938 make_symbol_completion_list_fn.
8939 * completer.h (symbol_completer): New declaration.
8940 * guile/scm-cmd.c (cmdscm_completers): Adjust.
8941 * python/py-cmd.c (completers): Adjust.
8942 * symtab.c (make_symbol_completion_list_fn): Delete.
8943 * symtab.h (make_symbol_completion_list_fn): Delete.
8944 * cli/cli-decode.c (add_cmd): Adjust.
8946 2017-07-17 Pedro Alves <palves@redhat.com>
8948 * Makefile.in (COMMON_OBS): Add filename-seen-cache.o.
8949 * dwarf2read.c: Include "filename-seen-cache.h".
8950 * dwarf2read.c (dwarf2_per_objfile) <filenames_cache>: New field.
8951 (dw2_map_symbol_filenames): Build and use a filenames_seen_cache.
8952 * filename-seen-cache.c: New file.
8953 * filename-seen-cache.h: New file.
8954 * symtab.c: Include "filename-seen-cache.h".
8955 (struct filename_seen_cache, INITIAL_FILENAME_SEEN_CACHE_SIZE)
8956 (create_filename_seen_cache, clear_filename_seen_cache)
8957 (delete_filename_seen_cache, filename_seen): Delete, parts moved
8958 to filename-seen-cache.h/filename-seen-cache.c.
8959 (output_source_filename, sources_info)
8960 (maybe_add_partial_symtab_filename)
8961 (make_source_files_completion_list): Adjust to use
8962 filename_seen_cache.
8964 2017-07-17 Pedro Alves <palves@redhat.com>
8966 * dwarf2read.c (dwarf2_per_objfile): In-class initialize all
8968 (dwarf2_per_objfile::dwarf2_per_objfile(objfile*, const
8969 dwarf2_debug_sections*)): New.
8970 (dwarf2_per_objfile::dwarf2_per_objfile(const
8971 dwarf2_per_objfile&)): Declare as deleted.
8972 (dwarf2_per_objfile::operator=): Declare as deleted.
8973 (dwarf2_per_objfile::dwarf2_per_objfile)
8974 (dwarf2_per_objfile::~dwarf2_per_objfile)
8975 (dwarf2_per_objfile::free_cached_comp_units): New.
8976 (dwarf2_has_info): dwarf2_per_objfile initialization code moved to
8977 ctor. Call dwarf2_per_objfile's ctor manually.
8978 (dwarf2_locate_sections): Deleted/refactored as ...
8979 (dwarf2_per_objfile::locate_sections): ... this new method.
8980 (free_cached_comp_units): Defer to
8981 dwarf2_per_objfile::free_cached_comp_units.
8982 (dwarf2_free_objfile): Call dwarf2_per_objfile's dtor manually.
8984 2017-07-14 Tom Tromey <tom@tromey.com>
8987 * rust-exp.y (convert_ast_to_expression): Add "want_type"
8989 <UNOP_SIZEOF>: Split into separate case.
8990 <UNOP_VAR_VALUE>: Handle want_type. Add error case.
8992 2017-07-14 Tom Tromey <tom@tromey.com>
8995 * symtab.c (symbol_matches_domain): Add language_rust to special
8997 * rust-exp.y (convert_ast_to_expression) <OP_VAR_VALUE>: Don't
8998 treat LOC_TYPEDEF symbols as variables.
9000 2017-07-14 Pedro Alves <palves@redhat.com>
9002 * symtab.c (make_file_symbol_completion_list_1): Iterate over
9003 symtabs matching all symtabs with SRCFILE as file name instead of
9004 only considering the first hit, with lookup_symtab.
9006 2017-07-14 Simon Marchi <simon.marchi@ericsson.com>
9008 * ax-gdb.c (gen_aggregate_elt_ref): Remove operand_name and
9009 operator_name parameters.
9010 (gen_expr): Update function call.
9012 2017-07-14 Simon Marchi <simon.marchi@ericsson.com>
9014 * dwarf2loc.h (dwarf2_compile_expr_to_ax): Remove gdbarch
9016 * symtab.h (struct symbol_computed_ops::tracepoint_var_ref):
9018 * dwarf2loc.c (dwarf2_compile_expr_to_ax): Remove gdbarch
9019 parameter, use agent_expr::gdbarch instead, update function
9021 (locexpr_tracepoint_var_ref): Likewise.
9022 (loclist_tracepoint_var_ref): Likewise.
9023 * ax-gdb.c (gen_trace_static_fields): Likewise.
9024 (gen_traced_pop): Likewise.
9025 (gen_frame_args_address): Likewise.
9026 (gen_frame_locals_address): Likewise.
9027 (gen_var_ref): Likewise.
9028 (gen_struct_ref_recursive): Likewise.
9029 (gen_static_field): Likewise.
9030 (gen_maybe_namespace_elt): Likewise.
9031 (gen_expr): Likewise.
9032 (gen_trace_for_var): Likewise.
9033 (gen_trace_for_expr): Likewise.
9034 (gen_trace_for_return_address): Likewise.
9036 2017-07-14 Simon Marchi <simon.marchi@ericsson.com>
9038 * ax-gdb.c (gen_deref, gen_address_of): Remove unused ax
9040 (gen_struct_ref, gen_expr, gen_expr_binop_rest): Update call.
9042 2017-07-14 Simon Marchi <simon.marchi@ericsson.com>
9044 * ax-gdb.c (gen_usual_unary): Remove exp parameter, get gdbarch
9045 from ax, update calls.
9046 (gen_usual_arithmetic): Likewise.
9047 (gen_integral_promotions): Likewise.
9048 (gen_bitfield_ref): Likewise.
9049 (gen_primitive_field): Likewise.
9050 (gen_struct_ref_recursive): Likewise.
9051 (gen_struct_ref): Likewise.
9052 (gen_maybe_namespace_elt): Likewise.
9053 (gen_struct_elt_for_reference): Likewise.
9054 (gen_namespace_elt): Likewise.
9055 (gen_aggregate_elt_ref): Likewise.
9056 (gen_expr): Get gdbarch from ax, update calls.
9057 (gen_expr_binop_rest): Likewise.
9059 2017-07-13 Pedro Alves <palves@redhat.com>
9061 * amd64-darwin-tdep.c (x86_darwin_init_abi_64): Pass tdesc_amd64
9063 * amd64-dicos-tdep.c (amd64_dicos_init_abi):
9064 * amd64-fbsd-tdep.c (amd64fbsd_init_abi):
9065 * amd64-linux-tdep.c (amd64_linux_init_abi): Pass
9066 tdesc_amd64_linux as default tdesc. Get final tdesc from the
9068 (amd64_x32_linux_init_abi): Pass tdesc_x32_linux as default tdesc.
9069 Get final tdesc from the tdep.
9070 * amd64-nbsd-tdep.c (amd64nbsd_init_abi): Pass tdesc_amd64 as
9072 * amd64-obsd-tdep.c (amd64obsd_init_abi): Likewise.
9073 * amd64-sol2-tdep.c (amd64_sol2_init_abi): Likewise.
9074 * amd64-tdep.c (amd64_init_abi): Add 'default_tdesc' parameter.
9075 Use it as default tdesc.
9076 (amd64_x32_init_abi): Add 'default_tdesc' parameter, and pass it
9077 down to amd_init_abi. No longer handle fallback tdesc here.
9078 * amd64-tdep.h (tdesc_x32): Declare.
9079 (amd64_init_abi, amd64_x32_init_abi): Add 'default_tdesc'
9081 * amd64-windows-tdep.c (amd64_windows_init_abi): Pass tdesc_amd64
9084 2017-07-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
9086 * s390-linux-tdep.c (s390_process_record): Add support for
9087 instructions new in arch12.
9089 2017-07-11 John Baldwin <jhb@FreeBSD.org>
9091 * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers): Use
9092 PT_GETFSBASE and PT_GETGSBASE.
9093 (amd64bsd_store_inferior_registers): Use PT_SETFSBASE and
9096 2017-07-11 John Baldwin <jhb@FreeBSD.org>
9098 * features/Makefile (amd64.dat, amd64-avx.dat, amd64-mpx.dat)
9099 (amd64-avx-mpx.dat, amd64-avx-avx512.dat)
9100 (amd64-avx-mpx-avx512-pku.dat): Add i386/64bit-segments.xml in
9102 * features/i386/amd64-avx-avx512.xml: Add 64bit-segments.xml.
9103 * features/i386/amd64-avx-mpx-avx512-pku.xml: Add 64bit-segments.xml.
9104 * features/i386/amd64-avx-mpx.xml: Add 64bit-segments.xml.
9105 * features/i386/amd64-avx.xml: Add 64bit-segments.xml.
9106 * features/i386/amd64-mpx.xml: Add 64bit-segments.xml.
9107 * features/i386/amd64.xml: Add 64bit-segments.xml.
9108 * features/i386/amd64-avx-avx512.c: Regenerated.
9109 * features/i386/amd64-avx-mpx-avx512-pku.c: Regenerated.
9110 * features/i386/amd64-avx-mpx.c: Regenerated.
9111 * features/i386/amd64-avx.c: Regenerated.
9112 * features/i386/amd64-mpx.c: Regenerated.
9113 * features/i386/amd64.c: Regenerated.
9114 * regformats/i386/amd64-avx-avx512.dat: Regenerated.
9115 * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Regenerated.
9116 * regformats/i386/amd64-avx-mpx.dat: Regenerated.
9117 * regformats/i386/amd64-avx.dat: Regenerated.
9118 * regformats/i386/amd64-mpx.dat: Regenerated.
9119 * regformats/i386/amd64.dat: Regenerated.
9121 2017-07-10 Yao Qi <yao.qi@linaro.org>
9123 * features/i386/amd64-avx-avx512-linux.c: Re-generated.
9124 * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Re-generated.
9126 2017-07-10 Anton Kolesov <Anton.Kolesov@synopsys.com>
9128 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add setenv and
9130 * gnulib/aclocal.m4: Regenerate.
9131 * gnulib/config.in: Regenerate.
9132 * gnulib/configure: Regenerate.
9133 * gnulib/import/Makefile.am: Regenerate.
9134 * gnulib/import/Makefile.in: Regenerate.
9135 * gnulib/import/m4/gnulib-cache.m4: Regenerate.
9136 * gnulib/import/m4/gnulib-comp.m4: Regenerate.
9137 * gnulib/import/m4/environ.m4: New file.
9138 * gnulib/import/m4/setenv.m4: New file.
9139 * gnulib/import/setenv.c: New file.
9140 * gnulib/import/unsetenv.c: New file.
9142 2017-07-09 Simon Marchi <simon.marchi@ericsson.com>
9144 * compile/compile-loc2c.c (do_compile_dwarf_expr_to_c): Read
9145 address when op is DW_OP_addr.
9147 2017-07-09 Tom Tromey <tom@tromey.com>
9149 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Reverse size
9150 check and apply to outer type.
9152 2017-07-07 John Baldwin <jhb@FreeBSD.org>
9154 * fbsd-tdep.c (LWPINFO_OFFSET, LWPINFO_PL_FLAGS)
9155 (LWPINFO64_PL_SIGINFO, LWPINFO32_PL_SIGINFO, PL_FLAG_SI)
9156 (SIZE64_SIGINFO_T, SIZE32_SIGINFO_T, fbsd_core_xfer_siginfo): New.
9157 (fbsd_init_abi): Install gdbarch "core_xfer_siginfo" method.
9159 2017-07-07 John Baldwin <jhb@FreeBSD.org>
9161 * fbsd-tdep.c (fbsd_core_thread_name): Use thread_section_name.
9163 2017-07-07 John Baldwin <jhb@FreeBSD.org>
9165 * corelow.c (get_core_siginfo): Remove.
9166 (core_xfer_partial): Use the gdbarch "core_xfer_siginfo" method
9167 instead of get_core_siginfo.
9168 * gdbarch.sh (core_xfer_siginfo): New gdbarch callback.
9169 * gdbarch.h: Re-generate.
9170 * gdbarch.c: Re-generate.
9171 * linux-tdep.c (linux_core_xfer_siginfo): New.
9172 (linux_init_abi): Install gdbarch "core_xfer_siginfo" method.
9174 2017-07-07 John Baldwin <jhb@FreeBSD.org>
9176 * corelow.c (thread_section_name): Move to ...
9177 * gdbcore.h (thread_section_name): ... here.
9179 2017-07-07 John Baldwin <jhb@FreeBSD.org>
9181 * fbsd-nat.c [PT_LWPINFO && __LP64__] (union sigval32)
9182 (struct siginfo32): New.
9183 [PT_LWPINFO] (fbsd_siginfo_size, fbsd_convert_siginfo): New.
9184 (fbsd_xfer_partial) [PT_LWPINFO]: Handle TARGET_OBJECT_SIGNAL_INFO
9185 via ptrace(PT_LWPINFO).
9187 2017-07-07 John Baldwin <jhb@FreeBSD.org>
9189 * fbsd-tdep.c (fbsd_gdbarch_data_handle, struct fbsd_gdbarch_data)
9190 (init_fbsd_gdbarch_data, get_fbsd_gdbarch_data)
9191 (fbsd_get_siginfo_type): New.
9192 (fbsd_init_abi): Install gdbarch "get_siginfo_type" method.
9193 (_initialize_fbsd_tdep): New.
9195 2017-07-06 David Blaikie <dblaikie@gmail.com>
9197 * dwarf2read.c (struct dwo_file): Use a htab of dwo_unit* (rather than
9198 a singular dwo_unit*) to support multiple CUs in the same way that
9199 multiple TUs are supported.
9200 (create_cus_hash_table): Replace create_dwo_cu with a function for
9201 parsing multiple CUs from a DWO file.
9202 (open_and_init_dwo_file): Use create_cus_hash_table rather than
9204 (lookup_dwo_cutu): Lookup CU in the hash table in the dwo_file with
9205 htab_find, rather than comparing the signature to a singleton CU in
9208 2017-07-06 Pedro Alves <palves@redhat.com>
9210 * python/py-unwind.c (pyuw_dealloc_cache): Fix for loop condition.
9212 2017-07-04 Pedro Alves <palves@redhat.com>
9214 * gdbtypes.c (recursive_dump_type): Don't reference TYPE_STATIC.
9215 * gdbtypes.h (TYPE_STATIC): Delete.
9216 (struct fn_field) <is_public, is_abstract, is_static, is_final,
9217 is_synchronized, is_native>: Delete.
9219 (TYPE_FN_FIELD_PUBLIC, TYPE_FN_FIELD_STATIC, TYPE_FN_FIELD_FINAL)
9220 (TYPE_FN_FIELD_SYNCHRONIZED, TYPE_FN_FIELD_NATIVE)
9221 (TYPE_FN_FIELD_ABSTRACT): Delete.
9223 2017-07-03 Simon Marchi <simon.marchi@ericsson.com>
9225 * buffer.h (buffer_finish): Fix spelling mistakes.
9227 2017-07-01 Eli Zaretskii <eliz@gnu.org>
9229 * .dir-locals.el: Automatically switch to C-style comments in
9230 versions of Emacs that support the feature.
9232 2017-06-30 Sergio Durigan Junior <sergiodj@redhat.com>
9233 Pedro Alves <palves@redhat.com>
9236 * cli/cli-script.c (command_name_equals_not_inline): Remove function.
9237 (process_next_line): New variable 'inline_cmd'.
9238 Adjust 'if' clauses for "python", "compile" and "guile" to use
9239 'command_name_equals' and check for '!inline_cmd'.
9241 2017-06-30 Sergio Durigan Junior <sergiodj@redhat.com>
9244 * cli/cli-script.c (command_name_equals_not_inline): New function.
9245 (process_next_line): Adjust 'if' clauses for "python", "compile"
9246 and "guile" to use command_name_equals_not_inline.
9248 2017-06-29 Pedro Alves <palves@redhat.com>
9250 * completer.c (expression_completer): Call
9251 linespec_location_completer instead of location_completer.
9253 2017-06-29 Pedro Alves <palves@redhat.com>
9255 * completer.c (expression_completer): Remove code that recomputes
9258 2017-06-29 Yao Qi <yao.qi@linaro.org>
9260 * regformats/regdat.sh: Generate code with
9261 "ifndef IN_PROCESS_AGENT".
9263 2017-06-28 Pedro Alves <palves@redhat.com>
9265 * command.h: Include "common/scoped_restore.h".
9267 2017-06-28 Yao Qi <yao.qi@linaro.org>
9269 * mi/mi-cmd-break.c (mi_argv_to_format): Use obstack_grow_str
9270 instead of obstack_grow.
9272 2017-06-28 Doug Gilmore <Doug.Gilmore@imgtec.com>
9275 * symfile.c (reread_symbols): Call objfiles_changed just before
9278 2017-06-27 Pedro Alves <palves@redhat.com>
9280 * symtab.c (COMPLETION_LIST_ADD_SYMBOL)
9281 (MCOMPLETION_LIST_ADD_SYMBOL): Delete macros, replace with ...
9282 (completion_list_add_symbol, completion_list_add_msymbol):
9283 ... these new functions.
9284 (add_symtab_completions)
9285 (default_make_symbol_completion_list_break_on_1): Adjust.
9287 2017-06-27 Pedro Alves <palves@redhat.com>
9289 * objfiles.c (get_objfile_bfd_data): Call bfd_alloc instead of
9290 bfd_zalloc. Call objfile_per_bfd_storage's ctor.
9291 (free_objfile_per_bfd_storage): Call objfile_per_bfd_storage's
9293 * objfiles.h (objfile_per_bfd_storage): Add ctor. Make
9294 'storage_obstack' field an auto_obstack. In-class initialize all
9295 non-bitfield fields. Make minsyms_read bool.
9296 * symfile.c (read_symbols): Adjust.
9298 2017-06-27 Alan Hayward <alan.hayward@arm.com>
9300 * remote-sim.c (gdbsim_fetch_register): Use byte_vector.
9301 (gdbsim_store_register): Likewise.
9303 2017-06-27 Pedro Alves <palves@redhat.com>
9305 * c-exp.y (name_obstack): Now an auto_obstack.
9306 (yylex): Use auto_obstack::clear.
9307 (c_parse): Use auto_obstack::clear instead of reinitializing and
9308 freeing the obstack.
9309 * c-lang.c (evaluate_subexp_c): Use auto_obstack.
9310 * d-exp.y (name_obstack): Now an auto_obstack.
9311 (yylex): Use auto_obstack::clear.
9312 (d_parse): Use auto_obstack::clear instead of reinitializing and
9313 freeing the obstack.
9314 * dwarf2loc.c (fetch_const_value_from_synthetic_pointer): Use
9316 * dwarf2read.c (create_addrmap_from_index)
9317 (dwarf2_build_psymtabs_hard)
9318 (update_enumeration_type_from_children): Likewise.
9319 * gdb_obstack.h (auto_obstack): New type.
9320 * go-exp.y (name_obstack): Now an auto_obstack.
9321 (build_packaged_name): Use auto_obstack::clear.
9322 (go_parse): Use auto_obstack::clear instead of reinitializing and
9323 freeing the obstack.
9324 * linux-tdep.c (linux_make_mappings_corefile_notes): Use
9326 * printcmd.c (printf_wide_c_string, ui_printf): Use auto_obstack.
9327 * rust-exp.y (work_obstack): Now an auto_obstack.
9328 (rust_parse, rust_lex_tests): Use auto_obstack::clear instead of
9329 reinitializing and freeing the obstack.
9330 * utils.c (do_obstack_free, make_cleanup_obstack_free): Delete.
9331 (host_char_to_target): Use auto_obstack.
9332 * utils.h (make_cleanup_obstack_free): Delete declaration.
9333 * valprint.c (generic_emit_char, generic_printstr): Use
9336 2017-06-27 Simon Marchi <simon.marchi@ericsson.com>
9338 * darwin-nat.c (darwin_check_new_threads): Don't handle dummy
9340 (darwin_init_thread_list): Don't update dummy thread.
9341 (darwin_create_inferior, darwin_attach): Don't add a dummy thread.
9343 2017-06-26 Simon Marchi <simon.marchi@ericsson.com>
9345 * record-full.c (netorder16): Remove.
9347 2017-06-26 Simon Marchi <simon.marchi@ericsson.com>
9349 * common/diagnostics.h: Define macros for GCC.
9350 (DIAGNOSTIC_IGNORE_UNUSED_FUNCTION): New macro.
9351 * common/vec.h: Include diagnostics.h.
9352 (DIAGNOSTIC_IGNORE_UNUSED_VEC_FUNCTION): New macro.
9353 (DEF_VEC_I, DEF_VEC_P, DEF_VEC_O): Ignore -Wunused-function
9356 2017-06-26 Simon Marchi <simon.marchi@ericsson.com>
9358 * common/diagnostics.h (DIAGNOSTIC_IGNORE_DEPRECATED_REGISTER):
9360 * ada-lex.l: Ignore deprecated register warnings.
9362 2017-06-25 Simon Marchi <simon.marchi@ericsson.com>
9364 * main.c (get_init_files): Replace "SYSTEM_GDBINIT +
9365 datadir_len" with "&SYSTEM_GDBINIT[datadir_len]".
9367 2017-06-25 Simon Marchi <simon.marchi@ericsson.com>
9369 * dtrace-probe.c (dtrace_process_dof_probe): Put semi-colon on
9372 2017-06-25 Simon Marchi <simon.marchi@ericsson.com>
9374 * nat/x86-dregs.c (x86_show_dr): Print registers one per line.
9376 2017-06-23 Alan Hayward <alan.hayward@arm.com>
9378 * xtensa-tdep.c (XTENSA_MAX_REGISTER_SIZE): Add.
9379 (xtensa_register_write_masked): Use XTENSA_MAX_REGISTER_SIZE.
9380 (xtensa_register_read_masked): Likewise.
9382 2017-06-22 Sergio Durigan Junior <sergiodj@redhat.com>
9384 * common/environ.c (gdb_environ::unset): Update comment.
9386 2017-06-22 Alan Hayward <alan.hayward@arm.com>
9388 * python/py-unwind.c (pyuw_sniffer): Allocate space for
9391 2017-06-22 Alan Hayward <alan.hayward@arm.com>
9393 * record-full.c (record_full_exec_insn): Use byte_vector.
9395 2017-06-22 Yao Qi <yao.qi@linaro.org>
9397 * regformats/i386/amd64-avx-mpx-avx512-pku-linux.dat: Regenerated.
9398 * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Regenerated.
9400 2017-06-22 Alan Hayward <alan.hayward@arm.com>
9402 * remote.c (cached_reg): Move from here...
9403 * regcache.h (cached_reg): ...to here.
9404 * python/py-unwind.c (struct reg_info): Remove.
9405 (cached_frame_info): Use cached_reg_t.
9406 (pyuw_prev_register): Likewise.
9407 (pyuw_sniffer): Use cached_reg_t and allocate registers.
9408 (pyuw_dealloc_cache): Free all registers.
9410 2017-06-22 Pedro Alves <palves@redhat.com>
9411 Simon Marchi <simon.marchi@ericsson.com>
9413 * unittests/environ-selftests.c (run_tests): Ignore -Wself-move
9415 * common/diagnostics.h: New file.
9417 2017-06-22 Pedro Alves <palves@redhat.com>
9419 * common/agent.h: Add include guards.
9421 2017-06-21 Simon Marchi <simon.marchi@ericsson.com>
9423 * target.h (struct target_ops) <to_xfer_partial>: Update doc to
9424 talk about addressable units instead of bytes.
9426 2017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
9428 * common/environ.c (gdb_environ::unset): Use '::iterator' instead
9429 of '::const_iterator'.
9431 2017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
9433 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
9434 'unittests/environ-selftests.c'.
9435 (SUBDIR_UNITTESTS_OBS): Add 'environ-selftests.o'.
9436 * charset.c (find_charset_names): Declare object 'iconv_env'.
9437 Update code to use 'iconv_env' object. Remove call to
9439 * common/environ.c: Include <utility>.
9440 (make_environ): Delete function.
9441 (free_environ): Delete function.
9442 (gdb_environ::clear): New function.
9443 (gdb_environ::operator=): New function.
9444 (gdb_environ::get): Likewise.
9445 (environ_vector): Delete function.
9446 (set_in_environ): Delete function.
9447 (gdb_environ::set): New function.
9448 (unset_in_environ): Delete function.
9449 (gdb_environ::unset): New function.
9450 (gdb_environ::envp): Likewise.
9451 * common/environ.h: Include <vector>.
9452 (struct gdb_environ): Delete; transform into...
9453 (class gdb_environ): ... this class.
9454 (free_environ): Delete prototype.
9455 (init_environ, get_in_environ, set_in_environ, unset_in_environ,
9456 environ_vector): Likewise.
9457 * infcmd.c (run_command_1): Update code to call
9458 'envp' from 'gdb_environ' class.
9459 (environment_info): Update code to call methods from 'gdb_environ'
9461 (unset_environment_command): Likewise.
9462 (path_info): Likewise.
9463 (path_command): Likewise.
9464 * inferior.c (inferior::~inferior): Delete call to 'free_environ'.
9465 (inferior::inferior): Initialize 'environment' using the host's
9467 * inferior.h: Remove forward declaration of 'struct gdb_environ'.
9468 Include "environ.h".
9469 (class inferior) <environment>: Change type from 'struct
9470 gdb_environ' to 'gdb_environ'.
9471 * mi/mi-cmd-env.c (mi_cmd_env_path): Update code to call
9472 methods from 'gdb_environ' class.
9473 * solib.c (solib_find_1): Likewise
9474 * unittests/environ-selftests.c: New file.
9476 2017-06-20 Yao Qi <yao.qi@linaro.org>
9478 * features/i386/i386-linux.xml: Exchange the order of including
9479 32bit-linux.xml and 32bit-sse.xml.
9480 * features/i386/i386-linux.c: Regenerated.
9482 2017-06-20 Yao Qi <yao.qi@linaro.org>
9484 * target-descriptions.c (tdesc_reg): Add ctor, dtor.
9485 Delete copy ctor and assignment operator.
9486 (tdesc_type): Likewise.
9487 (tdesc_feature): Likewise.
9488 (tdesc_free_reg): Remove.
9489 (tdesc_create_reg): Use new.
9490 (tdesc_free_type): Remove.
9491 (tdesc_create_vector): Use new.
9492 (tdesc_create_union): Likewise.
9493 (tdesc_create_flags): Likewise.
9494 (tdesc_create_enum): Likewise.
9495 (tdesc_free_feature): Delete.
9496 (free_target_description): Use delete.
9498 2017-06-19 John Baldwin <jhb@FreeBSD.org>
9500 * mips-tdep.c (print_gp_register_row): Don't error for unavailable
9503 2017-06-19 Pedro Alves <palves@redhat.com>
9505 * dwarf2read.c (write_psymtabs_to_index): Construct file_closer
9506 after gdb::unlinker.
9508 2017-06-19 Sergio Durigan Junior <sergiodj@redhat.com>
9510 * mi/mi-cm-env.c (_initialize_mi_cmd_env): Use getenv instead of
9511 gdb_environ to access an environment variable.
9513 2017-06-18 Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
9515 * nat/linux-ptrace.c (linux_fork_to_function): Add cast to
9518 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
9520 * nat/fork-inferior.h (trace_start_error): Add ATTRIBUTE_PRINTF.
9522 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
9524 * configure: Re-generate.
9525 * warning.m4 (build_warnings): Add -Wno-mismatched-tags.
9527 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
9529 * configure: Re-generate.
9530 * warning.m4: Pass -Werror to compiler when checking for
9531 supported warning flags.
9533 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
9535 * Makefile.in (COMPILE.pre): Add "-x c++".
9537 2017-06-16 Alan Hayward <alan.hayward@arm.com>
9538 Pedro Alves <palves@redhat.com>
9539 Yao Qi <yao.qi@linaro.org>
9541 * defs.h (RequireLongest): New.
9542 (extract_integer): Declare function template.
9543 (extract_signed_integer): Remove the declaration, but define it
9545 (extract_unsigned_integer): Likewise.
9546 (store_integer): Declare function template.
9547 (store_signed_integer): Remove the declaration, but define it
9549 (store_unsigned_integer): Likewise.
9550 * findvar.c (extract_integer): New function template.
9551 (extract_signed_integer): Remove.
9552 (extract_unsigned_integer): Remove.
9553 (extract_integer<LONGEST>, extract_integer<ULONGEST>): Explicit
9555 (store_integer): New function template.
9556 (store_signed_integer): Remove.
9557 (store_unsigned_integer): Remove.
9558 (store_integer): Explicit instantiations.
9559 * regcache.c (regcache_raw_read_signed): Update.
9560 (regcache::raw_read): New function.
9561 (regcache::raw_read_signed): Remove.
9562 (regcache::raw_read_unsigned): Remove.
9563 (regcache_raw_read_unsigned): Update.
9564 (regcache_raw_write_unsigned): Update.
9565 (regcache::raw_write_signed): Remove.
9566 (regcache::raw_write): New function.
9567 (regcache_cooked_read_signed): Update.
9568 (regcache::raw_write_unsigned): Remove.
9569 (regcache::cooked_read_signed): Remove.
9570 (regcache_cooked_read_unsigned): Update.
9571 (regcache::cooked_read_unsigned): Remove.
9572 (regcache_cooked_write_signed): Update.
9573 (regcache_cooked_write_unsigned): Update.
9574 * regcache.h (regcache) <raw_read_signed>: Remove.
9575 <raw_write_signed, raw_read_unsigned, raw_write_unsigned>: Remove.
9576 <raw_read, raw_write>: New.
9577 <cooked_read_signed, cooked_write_signed>: Remove.
9578 <cooked_write_unsigned, cooked_read_unsigned>: Remove.
9579 <cooked_read, cooked_write>: New.
9580 * sh64-tdep.c (sh64_pseudo_register_read): Update.
9581 (sh64_pseudo_register_write): Update.
9583 2017-06-16 Anton Kolesov <anton.kolesov@synopsys.com>
9585 * arc-tdep.c (arc_disassembler_options): New variable.
9586 (arc_gdbarch_init): Set and use it. Use arc_delayed_print_insn instead
9587 of default_print_insn.
9588 (arc_delayed_print_insn): Set info->section when needed,
9589 use default_print_insn to retrieve a disassembler.
9591 2017-06-14 Sergio Durigan Junior <sergiodj@redhat.com>
9594 * infcmd.c (_initialize_infcmd): Expand "help run" documentation
9595 to mention $SHELL and startup-with-shell.
9597 2017-06-14 Max Filippov <jcmvbkbc@gmail.com>
9599 * MAINTAINERS: Move Maxim Grigoriev to the Past Maintainers.
9601 2017-06-14 Yao Qi <yao.qi@linaro.org>
9603 * aarch64-tdep.c (aarch64_gdb_print_insn): Call
9604 default_print_insn instead of print_insn_aarch64.
9605 * arm-tdep.c (gdb_print_insn_arm): Call
9606 default_print_insn instead of print_insn_big_arm
9607 and print_insn_little_arm.
9608 * i386-tdep.c (i386_print_insn): Call default_print_insn
9609 instead of print_insn_i386.
9610 * ia64-tdep.c (ia64_print_insn): Call
9611 default_print_insn instead of print_insn_ia64.
9612 * mips-tdep.c (gdb_print_insn_mips): Call
9613 default_print_insn instead of print_insn_big_mips
9614 and print_insn_little_mips.
9615 * spu-tdep.c (gdb_print_insn_spu): Call default_print_insn
9616 instead of print_insn_spu.
9618 2017-06-14 Pedro Alves <palves@redhat.com>
9620 * ada-lang.c: Include "common/byte-vector.h".
9621 (ada_value_primitive_packed_val): Use gdb::byte_vector.
9622 * charset.c (wchar_iterator::iterate): Resize the vector instead
9624 * common/byte-vector.h: Include "common/def-vector.h".
9625 (wchar_iterator::m_out): Now a gdb::def_vector<gdb_wchar_t>.
9626 * cli/cli-dump.c: Include "common/byte-vector.h".
9627 (dump_memory_to_file, restore_binary_file): Use gdb::byte_vector.
9628 * common/byte-vector.h: New file.
9629 * common/def-vector.h: New file.
9630 * common/default-init-alloc.h: New file.
9631 * dwarf2loc.c: Include "common/byte-vector.h".
9632 (rw_pieced_value): Use gdb::byte_vector, and resize the vector
9633 instead of reserving it.
9634 * dwarf2read.c: Include "common/byte-vector.h".
9635 (data_buf::m_vec): Now a gdb::byte_vector.
9636 * gdb_regex.c: Include "common/def-vector.h".
9637 (compiled_regex::compiled_regex): Use gdb::def_vector<char>.
9638 * mi/mi-main.c: Include "common/byte-vector.h".
9639 (mi_cmd_data_read_memory): Use gdb::byte_vector.
9640 * printcmd.c: Include "common/byte-vector.h".
9641 (print_scalar_formatted): Use gdb::byte_vector.
9642 * valprint.c: Include "common/byte-vector.h".
9643 (maybe_negate_by_bytes, print_decimal_chars): Use
9646 2017-06-13 Simon Marchi <simon.marchi@ericsson.com>
9648 * darwin-nat.c: Include "nat/fork-inferior.h".
9650 2017-06-13 Simon Marchi <simon.marchi@ericsson.com>
9652 * configure.nat: Factor out Darwin bits that are not
9653 architecture-specific. Add fork-inferior.o.
9655 2017-06-13 Simon Marchi <simon.marchi@ericsson.com>
9657 * configure.nat: Factor out AIX bits that are not
9658 architecture-specific. Add fork-inferior.o.
9660 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
9662 * dwarf2loc.c (rw_pieced_value): New. Merge logic from...
9663 (read_pieced_value, write_pieced_value): ...here. Reduce to
9664 wrappers that just call rw_pieced_value.
9666 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
9668 * dwarf2loc.c (write_pieced_value): When writing the data for a
9669 memory piece, use write_memory_with_notification instead of
9672 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
9674 * valops.c (read_value_memory): Change embedded_offset to
9675 represent a bit offset instead of a byte offset.
9676 * value.h (read_value_memory): Adjust comment.
9678 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
9680 * dwarf2loc.c (read_pieced_value): Remove unnecessary variables
9681 dest_offset_bits and source_offset_bits.
9682 (write_pieced_value): Likewise.
9684 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
9686 * dwarf2loc.c (read_pieced_value): Respect the piece offset, as
9687 given by DW_OP_bit_piece.
9688 (write_pieced_value): Likewise.
9690 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
9692 * dwarf2loc.c (read_pieced_value): Move the buffer allocation and
9693 some other preparations to the places where sufficient information
9695 (write_pieced_value): Likewise.
9697 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
9699 * dwarf2loc.c (bits_to_bytes): New function.
9700 (read_pieced_value): Fix offset calculations for register pieces
9701 on big-endian targets.
9702 (write_pieced_value): Likewise.
9704 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
9706 * dwarf2loc.c (read_pieced_value): Remove buffer_size variable.
9707 (write_pieced_value): Likewise.
9709 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
9711 * dwarf2loc.c (write_pieced_value): When writing to a bit-field,
9712 transfer the source value's least significant bits, instead of its
9713 lowest-addressed ones. Rename type_len to max_offset.
9714 (read_pieced_value): Mirror above changes to write_pieced_value as
9717 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
9719 * dwarf2loc.c (write_pieced_value): In DWARF_VALUE_MEMORY,
9720 truncate full bytes from dest_offset_bits before using it as an
9721 offset into the buffer.
9723 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
9725 * dwarf2loc.c (write_pieced_value): Include transfer size in
9728 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
9730 * dwarf2loc.c (write_pieced_value): Fix copy/paste error in the
9731 calculation of this_size.
9733 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
9735 * dwarf2loc.c (read_pieced_value): Respect parent value's offset
9736 when targeting a bit-field.
9737 (write_pieced_value): Likewise.
9739 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
9741 * dwarf2loc.c (struct piece_closure) <addr_size>: Remove field.
9742 (allocate_piece_closure): Drop addr_size parameter.
9743 (dwarf2_evaluate_loc_desc_full): Adjust call to
9744 allocate_piece_closure.
9746 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
9749 * dwarf2loc.c (read_pieced_value): Anchor stack value pieces at
9750 the LSB end, independent of endianness.
9752 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
9754 * dwarf2loc.c (write_pieced_value): Fix order of calculations for
9757 2017-06-13 Yao Qi <yao.qi@linaro.org>
9759 * mips-linux-nat.c: Move include features/mips*-linux.c to
9761 (_initialize_mips_linux_nat): Move initialize_tdesc_mips* calls
9762 to mips-linux-tdep.c.
9763 * mips-linux-tdep.c: Include features/mips*-linux.c
9764 (_initialize_mips_linux_tdep): Call initialize_tdesc_mips*
9766 * mips-linux-tdep.h (tdesc_mips_linux): Declare.
9767 (tdesc_mips_dsp_linux, tdesc_mips64_linux): Declare.
9768 (tdesc_mips64_dsp_linux): Declare.
9770 2017-06-12 Tom Tromey <tom@tromey.com>
9772 * valprint.h (val_print_type_code_int): Remove.
9773 * valprint.c (generic_val_print_int): Always call
9774 val_print_scalar_formatted.
9775 (val_print_type_code_int): Remove.
9776 * printcmd.c (print_scalar_formatted): Handle options->format==0.
9777 * f-valprint.c (f_val_print): Use val_print_scalar_formatted.
9778 * c-valprint.c (c_val_print_int): Use val_print_scalar_formatted.
9779 * ada-valprint.c (ada_val_print_num): Use
9780 val_print_scalar_formatted.
9782 2017-06-12 Tom Tromey <tom@tromey.com>
9784 * printcmd.c (print_scalar_formatted): Unify the two switches.
9785 Don't convert scalars to LONGEST.
9787 2017-06-12 Tom Tromey <tom@tromey.com>
9790 * valprint.h (print_decimal_chars): Update.
9791 * valprint.c (maybe_negate_by_bytes): New function.
9792 (print_decimal_chars): Add "is_signed" argument.
9793 * printcmd.c (print_scalar_formatted): Update.
9795 2017-06-12 Tom Tromey <tom@tromey.com>
9798 * valprint.h (print_binary_chars, print_hex_chars): Update.
9799 * valprint.c (val_print_type_code_int): Update.
9800 (print_binary_chars): Add "zero_pad" argument.
9801 (emit_octal_digit): New function.
9802 (print_octal_chars): Don't zero-pad.
9803 (print_decimal_chars): Likewise.
9804 (print_hex_chars): Add "zero_pad" argument.
9805 * sh64-tdep.c (sh64_do_fp_register): Update.
9806 * regcache.c (regcache::dump): Update.
9807 * printcmd.c (print_scalar_formatted): Update.
9808 * infcmd.c (default_print_one_register_info): Update.
9810 2017-06-12 Pedro Alves <palves@redhat.com>
9811 Alan Hayward <alan.hayward@arm.com>
9813 * mips-tdep.c (MAX_MIPS_ABI_REGSIZE): New.
9814 (mips_eabi_push_dummy_call): Rename local 'regsize' to
9815 'abi_regsize'. Rename local array 'valbuf' to 'ref_valbuf', and
9816 use MAX_MIPS_ABI_REGSIZE instead of MAX_REGISTER_SIZE to size it.
9817 Assert that abi_regsize bytes fit in 'ref_valbuf'.
9819 2017-06-12 Pedro Alves <palves@redhat.com>
9821 * dwarf2read.c (mapped_symtab::data): Now a vector of
9822 symtab_index_entry instead of vector of
9823 std::unique_ptr<symtab_index_entry>. All users adjusted to check
9824 whether an element's name is NULL instead of checking whether the
9825 element itself is NULL.
9826 (find_slot): Change return type. Adjust.
9827 (hash_expand, , add_index_entry, uniquify_cu_indices)
9828 (write_hash_table): Adjust.
9830 2017-06-12 Pedro Alves <palves@redhat.com>
9832 * dwarf2read.c (recursively_count_psymbols): New function.
9833 (write_psymtabs_to_index): Call it to compute number of psyms and
9834 pass estimate size of psyms_seen to unordered_set's ctor.
9836 2017-06-12 Pedro Alves <palves@redhat.com>
9838 * dwarf2read.c (write_hash_table): Check if key already exists
9841 2017-06-12 Pedro Alves <palves@redhat.com>
9843 * dwarf2read.c (data_buf::append_space): Rename to...
9844 (data_buf::grow): ... this, and make private. Adjust all callers.
9845 (data_buf::append_uint): New method.
9846 (add_address_entry, write_one_signatured_type)
9847 (write_psymtabs_to_index): Use it.
9849 2017-06-12 Pedro Alves <palves@redhat.com>
9851 * dwarf2read.c (file_write(FILE *, const void *, size_t)): Delete.
9852 (file_write (FILE *, const std::vector<Elem>&)): Delete.
9853 (data_buf::file_write): Call ::fwrite directly.
9855 2017-06-12 Pedro Alves <palves@redhat.com>
9857 * dwarf2read.c (uniquify_cu_indices): Use std::unique and
9860 2017-06-12 Jan Kratochvil <jan.kratochvil@redhat.com>
9862 Code cleanup: C++ify .gdb_index producer.
9863 * dwarf2read.c: Include <unordered_set> and <unordered_map>.
9864 (MAYBE_SWAP) [WORDS_BIGENDIAN]: Cast to offset_type.
9865 (struct strtab_entry, hash_strtab_entry, eq_strtab_entry)
9866 (create_strtab, add_string): Remove.
9867 (file_write, data_buf): New.
9868 (struct symtab_index_entry): Use std::vector for cu_indices.
9869 (struct mapped_symtab): Use std::vector for data.
9870 (hash_symtab_entry, eq_symtab_entry, delete_symtab_entry)
9871 (create_symbol_hash_table, create_mapped_symtab, cleanup_mapped_symtab):
9873 (find_slot): Change return type. Update it to the new data structures.
9874 (hash_expand, add_index_entry): Update it to the new data structures.
9875 (offset_type_compare): Remove.
9876 (uniquify_cu_indices): Update it to the new data structures.
9877 (c_str_view, c_str_view_hasher, vector_hasher): New.
9878 (add_indices_to_cpool): Remove.
9879 (write_hash_table): Update it to the new data structures.
9880 (struct psymtab_cu_index_map, hash_psymtab_cu_index)
9881 (eq_psymtab_cu_index): Remove.
9882 (psym_index_map): New typedef.
9883 (struct addrmap_index_data): Change addr_obstack pointer to data_buf
9884 reference and std::unordered_map for cu_index_htab.
9885 (add_address_entry, add_address_entry_worker, write_address_map)
9886 (write_psymbols): Update it to the new data structures.
9887 (write_obstack): Remove.
9888 (struct signatured_type_index_data): Change types_list to a data_buf
9889 reference and psyms_seen to a std::unordered_set reference.
9890 (write_one_signatured_type, recursively_write_psymbols)
9891 (write_psymtabs_to_index): Update it to the new data structures.
9893 2017-06-11 Simon Marchi <simon.marchi@ericsson.com>
9895 * NEWS (Changes since GDB 8.0): Announce {set,show} debug
9896 separate-debug-file commands.
9897 * symfile.h (separate_debug_file_debug): New global.
9898 * symfile.c (separate_debug_file_debug): New global.
9899 (separate_debug_file_exists, find_separate_debug_file): Add
9901 (_initialize_symfile): Add "set debug separate-debug-file"
9903 * build-id.c (build_id_to_debug_bfd,
9904 find_separate_debug_file_by_buildid): Add debug output.
9906 2017-06-10 Simon Marchi <simon.marchi@polymtl.ca>
9908 * gdbarch.sh (displaced_step_free_closure): Remove.
9909 * gdbarch.h, gdbarch.c: Re-generate.
9910 * aarch64-linux-tdep.c (aarch64_linux_init_abi): Don't set
9911 displaced_step_free_closure.
9912 * amd64-linux-tdep.c (amd64_linux_init_abi_common): Likewise.
9913 * arm-linux-tdep.c (arm_linux_init_abi): Likewise.
9914 * i386-linux-tdep.c (i386_linux_init_abi): Likewise.
9915 * rs6000-aix-tdep.c (rs6000_aix_init_osabi): Likewise.
9916 * rs6000-tdep.c (rs6000_gdbarch_init): Likewise.
9917 * s390-linux-tdep.c (s390_gdbarch_init): Likewise.
9918 * arch-utils.h (simple_displaced_step_free_closure): Remove.
9919 * arch-utils.c (simple_displaced_step_free_closure): Remove.
9920 * infrun.c (displaced_step_clear): Call xfree instead of
9921 gdbarch_displaced_step_free_closure.
9923 2017-06-08 Sergio Durigan Junior <sergiodj@redhat.com>
9925 * common/common-utils.c (stringify_argv): Check for "arg[0] !=
9928 2017-06-08 Alan Hayward <alan.hayward@arm.com>
9930 * mn10300-tdep.c (MN10300_MAX_REGISTER_SIZE): Add.
9931 (mn10300_extract_return_value): Use MN10300_MAX_REGISTER_SIZE.
9932 (mn10300_push_dummy_call): Likewise.
9934 2017-06-08 Alan Hayward <alan.hayward@arm.com>
9936 * mi/mi-main.c (register_changed_p): Use value_contents_eq.
9938 2017-06-08 Alan Hayward <alan.hayward@arm.com>
9940 * mi/mi-main.c (register_changed_p): Use cooked_read_value.
9942 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
9944 * NEWS (Changes since GDB 8.0): Announce that GDBserver is now
9945 able to start inferiors using a shell.
9946 (New remote packets): Announce new packet "QStartupWithShell".
9947 * remote.c: Add PACKET_QStartupWithShell.
9948 (extended_remote_create_inferior): Handle new
9949 PACKET_QStartupWithShell.
9950 (remote_protocol_features) <QStartupWithShell>: New entry for
9951 PACKET_QStartupWithShell.
9952 (_initialize_remote): Call "add_packet_config_cmd" for
9955 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
9956 Pedro Alves <palves@redhat.com>
9958 * Makefile.in (HFILES_NO_SRCDIR): Add "common/common-inferior.h"
9959 and "nat/fork-inferior.h".
9960 * common/common-inferior.h: New file, with contents from
9962 * commom/common-utils.c: Include "common-utils.h".
9963 (stringify_argv): New function.
9964 * common/common-utils.h (stringify_argv): New prototype.
9965 * configure.nat: Add "fork-inferior.o" as a dependency for
9966 "*linux*", "fbsd*" and "nbsd*" hosts.
9967 * corefile.c (get_exec_file): Update comment.
9968 * darwin-nat.c (darwin_ptrace_him): Call "gdb_startup_inferior"
9969 instead of "startup_inferior".
9970 (darwin_create_inferior): Call "add_thread_silent" after
9972 * fork-child.c: Cleanup unnecessary includes.
9973 (SHELL_FILE): Move to "common/common-fork-child.c".
9974 (environ): Likewise.
9975 (exec_wrapper): Initialize.
9976 (get_exec_wrapper): New function.
9977 (breakup_args): Move to "common/common-fork-child.c"; rename to
9978 "breakup_args_for_exec".
9979 (escape_bang_in_quoted_argument): Move to
9980 "common/common-fork-child.c".
9981 (saved_ui): New variable.
9982 (prefork_hook): New function.
9983 (postfork_hook): Likewise.
9984 (postfork_child_hook): Likewise.
9985 (gdb_startup_inferior): Likewise.
9986 (fork_inferior): Move to "common/common-fork-child.c". Update
9987 function to support gdbserver.
9988 (startup_inferior): Likewise.
9989 * gdbcore.h (get_exec_file): Remove declaration.
9990 * gnu-nat.c (gnu_create_inferior): Call "gdb_startup_inferior"
9991 instead of "startup_inferior". Call "add_thread_silent" after
9993 * inf-ptrace.c: Include "nat/fork-inferior.h" and "utils.h".
9994 (inf_ptrace_create_inferior): Call "gdb_startup_inferior"
9995 instead of "startup_inferior". Call "add_thread_silent" after
9997 * inferior.h: Include "common-inferior.h".
9998 (trace_start_error): Move to "common/common-utils.h".
9999 (trace_start_error_with_name): Likewise.
10000 (fork_inferior): Move prototype to "nat/fork-inferior.h".
10001 (startup_inferior): Likewise.
10002 (gdb_startup_inferior): New prototype.
10003 * nat/fork-inferior.c: New file, with contents from "fork-child.c".
10004 * nat/fork-inferior.h: New file.
10005 * procfs.c (procfs_init_inferior): Call "gdb_startup_inferior"
10006 instead of "startup_inferior". Call "add_thread_silent" after
10008 * target.h (target_terminal_init): Move prototype to
10010 (target_terminal_inferior): Likewise.
10011 (target_terminal_ours): Likewise.
10012 * target/target.h (target_terminal_init): New prototype, moved
10014 (target_terminal_inferior): Likewise.
10015 (target_terminal_ours): Likewise.
10016 * utils.c (gdb_flush_out_err): New function.
10018 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
10020 * Makefile.in (HFILES_NO_SRCDIR): Add "common/common-gdbthread.h".
10021 * common/common-gdbthread.h: New file, with parts from
10023 * gdbthread.h: Include "common-gdbthread.h".
10024 (switch_to_thread): Moved to "common/common-gdbthread.h".
10026 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
10028 * Makefile.in (SFILES): Add "common/job-control.c".
10029 (HFILES_NO_SRCDIR): Add "common/job-control.h".
10030 (COMMON_OBS): Add "job-control.o".
10031 * common/job-control.c: New file, with contents from
10033 * common/job-control.h: New file, with contents from "terminal.h".
10034 * fork-child.c: Include "job-control.h".
10035 * inflow.c: Include "job-control.h".
10036 (gdb_setpgid): Move to "common/common-inflow.c".
10037 (_initialize_inflow): Move setting of "job_control" to
10038 "handle_job_control".
10039 * terminal.h (job_control): Moved to "common/common-terminal.h".
10040 (gdb_setpgid): Likewise.
10041 * top.c: Include "job_control.h".
10042 * utils.c: Likewise.
10043 (job_control): Moved to "job-control.c".
10045 2017-06-07 Pedro Alves <palves@redhat.com>
10047 * Makefile.in (SFILES): Add gdb_regex.c.
10048 (COMMON_OBS): Add gdb_regex.o.
10049 * ada-lang.c (ada_add_standard_exceptions)
10050 (ada_add_exceptions_from_frame, name_matches_regex)
10051 (ada_add_global_exceptions, ada_exceptions_list_1): Change regex
10052 parameter type to compiled_regex. Adjust.
10053 (ada_exceptions_list): Use compiled_regex.
10054 * break-catch-throw.c (exception_catchpoint::pattern): Now a
10055 std::unique_ptr<compiled_regex>.
10056 (exception_catchpoint::~exception_catchpoint): Remove regfree
10058 (check_status_exception_catchpoint): Adjust to use compiled_regex.
10059 (handle_gnu_v3_exceptions): Adjust to use compiled_regex.
10060 * breakpoint.c (solib_catchpoint::compiled): Now a
10061 std::unique_ptr<compiled_regex>.
10062 (solib_catchpoint::~solib_catchpoint): Remove regfree call.
10063 (check_status_catch_solib): Adjust to use compiled_regex.
10064 (add_solib_catchpoint): Adjust to use compiled_regex.
10065 * cli/cli-cmds.c (apropos_command): Use compiled_regex.
10066 * cli/cli-decode.c (apropos_cmd): Change regex parameter to
10067 compiled_regex reference. Adjust to use it.
10068 * cli/cli-decode.h: Remove struct re_pattern_buffer forward
10069 declaration. Include "gdb_regex.h".
10070 (apropos_cmd): Change regex parameter to compiled_regex reference.
10071 * gdb_regex.c: New file.
10072 * gdb_regex.h (make_regfree_cleanup, get_regcomp_error): Delete
10074 (class compiled_regex): New.
10075 * linux-tdep.c: Include "common/gdb_optional.h".
10076 (struct mapping_regexes): New, factored out from
10077 mapping_is_anonymous_p, and adjusted to use compiled_regex.
10078 (mapping_is_anonymous_p): Use mapping_regexes wrapped in a
10079 gdb::optional and remove cleanups. Adjust to compiled_regex.
10080 * probe.c: Include "common/gdb_optional.h".
10081 (collect_probes): Use compiled_regex and gdb::optional and remove
10083 * skip.c: Include "common/gdb_optional.h".
10084 (skiplist_entry::compiled_function_regexp): Now a
10085 gdb::optional<compiled_regex>.
10086 (skiplist_entry::compiled_function_regexp_is_valid): Delete field.
10087 (free_skiplist_entry): Remove regfree call.
10088 (compile_skip_regexp, skip_rfunction_p): Adjust to use
10089 compiled_regex and gdb::optional.
10090 * symtab.c: Include "common/gdb_optional.h".
10091 (search_symbols): Use compiled_regex and gdb::optional.
10092 * utils.c (do_regfree_cleanup, make_regfree_cleanup)
10093 (get_regcomp_error, compile_rx_or_error): Delete. Some bits moved
10096 2017-06-07 Alan Hayward <alan.hayward@arm.com>
10098 * regcache.c (regcache::save): Avoid buffer use.
10099 (regcache::dump): Likewise.
10101 2017-06-07 Alan Hayward <alan.hayward@arm.com>
10103 * sh-tdep.c (sh_pseudo_register_read): Remove
10105 (sh_pseudo_register_write): Likewise.
10106 * sh64-tdep.c (sh64_pseudo_register_read): Likewise.
10107 (sh64_pseudo_register_write): Likewise
10109 2017-06-07 Alan Hayward <alan.hayward@arm.com>
10111 * aarch64-tdep.c (aarch64_store_return_value): Use
10113 (aarch64_pseudo_read_value): Likewise.
10114 (aarch64_pseudo_write): Likewise.
10116 2017-06-06 Yao Qi <yao.qi@linaro.org>
10118 * regformats/regdef.h (set_register_cache): Remove the
10121 2017-06-06 Alan Hayward <alan.hayward@arm.com>
10123 * frame.c (frame_unwind_register_signed): Use
10124 frame_unwind_register_value.
10126 2017-06-06 Pedro Alves <palves@redhat.com>
10128 PR breakpoints/21553
10129 * breakpoint.c (create_breakpoints_sal_default)
10130 (init_breakpoint_sal, create_breakpoint_sal): Use
10131 gdb::unique_xmalloc_ptr for string parameters.
10132 (create_breakpoint): Constify 'extra_string' and 'cond_string'
10133 parameters. Replace cleanups with gdb::unique_xmalloc_ptr.
10134 (base_breakpoint_create_breakpoints_sal)
10135 (bkpt_create_breakpoints_sal, tracepoint_create_breakpoints_sal)
10136 (strace_marker_create_breakpoints_sal)
10137 (create_breakpoints_sal_default): Use gdb::unique_xmalloc_ptr for
10139 * breakpoint.h (breakpoint_ops::create_breakpoints_sal): Use
10140 gdb::unique_xmalloc_ptr for string parameters.
10141 (create_breakpoint): Constify 'extra_string' and 'cond_string'
10144 2017-06-06 Alan Hayward <alan.hayward@arm.com>
10146 * alpha-tdep.c (alpha_register_to_value): Use
10147 get_frame_register_value.
10148 (alpha_value_to_register): Use ALPHA_REGISTER_SIZE.
10150 2017-06-06 Alan Hayward <alan.hayward@arm.com>
10152 * ia64-tdep.c (IA64_MAX_FP_REGISTER_SIZE) Add.
10153 (ia64_register_to_value): Use IA64_MAX_FP_REGISTER_SIZE.
10154 (ia64_value_to_register): Likewise.
10155 (ia64_extract_return_value): Likewise.
10156 (ia64_store_return_value): Likewise.
10157 (ia64_push_dummy_call): Likewise.
10159 2017-06-04 Joel Brobecker <brobecker@adacore.com>
10163 2017-06-03 Simon Marchi <simon.marchi@ericsson.com>
10165 * x86-linux-nat.c (struct arch_lwp_info): Remove.
10167 2017-06-03 Simon Marchi <simon.marchi@polymtl.ca>
10169 * linux-nat.c (linux_nat_post_attach_wait): Remove FIRST
10171 (linux_nat_attach): Adjust call to linux_nat_post_attach_wait.
10173 2017-06-02 Simon Marchi <simon.marchi@ericsson.com>
10175 * event-loop.c (poll_timers): Unallocate timer using delete
10178 2017-06-02 Simon Marchi <simon.marchi@polymtl.ca>
10180 * breakpoint.h (struct breakpoint_ops) <dtor>: Remove.
10181 (struct breakpoint) <~breakpoint>: New.
10182 (struct watchpoint): Inherit from breakpoint.
10183 <~watchpoint>: New.
10185 (struct tracepoint): Inherit from breakpoint.
10187 * breakpoint.c (longjmp_breakpoint_ops): Remove.
10188 (struct longjmp_breakpoint): Inherit from breakpoint.
10189 <~longjmp_breakpoint>: New.
10191 (new_breakpoint_from_type): Remove casts.
10192 (watchpoint_in_thread_scope): Remove reference to base field.
10193 (watchpoint_del_at_next_stop): Likewise.
10194 (update_watchpoint): Likewise.
10195 (watchpoint_check): Likewise.
10196 (bpstat_check_watchpoint): Likewise.
10197 (set_longjmp_breakpoint): Likewise.
10198 (struct fork_catchpoint): Inherit from breakpoint.
10200 (struct solib_catchpoint): Inherit from breakpoint.
10201 <~solib_catchpoint>: New.
10203 (dtor_catch_solib): Change to ...
10204 (solib_catchpoint::~solib_catchpoint): ... this.
10205 (breakpoint_hit_catch_solib): Remove reference to base field.
10206 (add_solib_catchpoint): Likewise.
10207 (create_fork_vfork_event_catchpoint): Likewise.
10208 (struct exec_catchpoint): Inherit from breakpoint.
10209 <~exec_catchpoint>: New.
10211 (dtor_catch_exec): Change to ...
10212 (exec_catchpoint::~exec_catchpoint): ... this.
10213 (dtor_watchpoint): Change to ...
10214 (watchpoint::~watchpoint): ... this.
10215 (watch_command_1): Remove reference to base field.
10216 (catch_exec_command_1): Likewise.
10217 (base_breakpoint_dtor): Change to ...
10218 (breakpoint::~breakpoint): ... this.
10219 (base_breakpoint_ops): Remove dtor field value.
10220 (longjmp_bkpt_dtor): Change to ...
10221 (longjmp_breakpoint::~longjmp_breakpoint): ... this.
10222 (strace_marker_create_breakpoints_sal): Remove reference to base
10224 (delete_breakpoint): Don't manually call breakpoint destructor.
10225 (create_tracepoint_from_upload): Remove reference to base field.
10226 (trace_pass_set_count): Likewise.
10227 (initialize_breakpoint_ops): Don't initialize
10228 momentary_breakpoint_ops, don't set dtors.
10229 * ada-lang.c (struct ada_catchpoint): Inherit from breakpoint.
10230 <~ada_catchpoint>: New.
10232 (create_excep_cond_exprs): Remove reference to base field.
10233 (dtor_exception): Change to ...
10234 (ada_catchpoint::~ada_catchpoint): ... this.
10235 (dtor_catch_exception): Remove.
10236 (dtor_catch_exception_unhandled): Remove.
10237 (dtor_catch_assert): Remove.
10238 (create_ada_exception_catchpoint): Remove reference to base
10240 (initialize_ada_catchpoint_ops): Don't set dtors.
10241 * break-catch-sig.c (struct signal_catchpoint): Inherit from
10243 <~signal_catchpoint>: New.
10245 (signal_catchpoint_dtor): Change to ...
10246 (signal_catchpoint::~signal_catchpoint): ... this.
10247 (create_signal_catchpoint): Remove reference to base field.
10248 (initialize_signal_catchpoint_ops): Don't set dtor.
10249 * break-catch-syscall.c (struct syscall_catchpoint): Inherit
10251 <~syscall_catchpoint>: New.
10253 (dtor_catch_syscall): Change to ...
10254 (syscall_catchpoint::~syscall_catchpoint): ... this.
10255 (create_syscall_event_catchpoint): Remove reference to base
10257 (initialize_syscall_catchpoint_ops): Don't set dtor.
10258 * break-catch-throw.c (struct exception_catchpoint): Inherit
10260 <~exception_catchpoint>: New.
10262 (dtor_exception_catchpoint): Change to ...
10263 (exception_catchpoint::~exception_catchpoint): ... this.
10264 (handle_gnu_v3_exceptions): Remove reference to base field.
10265 (initialize_throw_catchpoint_ops): Don't set dtor.
10266 * ctf.c (ctf_get_traceframe_address): Remove reference to base
10268 * remote.c (remote_get_tracepoint_status): Likewise.
10269 * tracefile-tfile.c (tfile_get_traceframe_address): Likewise.
10270 * tracefile.c (tracefile_fetch_registers): Likewise.
10271 * tracepoint.c (actions_command): Likewise.
10272 (validate_actionline): Likewise.
10273 (tfind_1): Likewise.
10274 (get_traceframe_location): Likewise.
10275 (find_matching_tracepoint_location): Likewise.
10276 (parse_tracepoint_status): Likewise.
10277 * mi/mi-cmd-break.c (mi_cmd_break_passcount): Likewise.
10279 2017-06-02 Simon Marchi <simon.marchi@polymtl.ca>
10281 * breakpoint.c (struct longjmp_breakpoint): New struct.
10282 (is_tracepoint_type): Change return type to bool.
10283 (is_longjmp_type): New function.
10284 (new_breakpoint_from_type): Handle longjmp kinds of breakpoints.
10285 (set_raw_breakpoint_without_location): Use
10286 new_breakpoint_from_type.
10287 (set_raw_breakpoint): Likewise.
10289 2017-06-02 Simon Marchi <simon.marchi@polymtl.ca>
10291 * breakpoint.c (new_breakpoint_from_type): New function.
10292 (create_breakpoint_sal): Use new_breakpoint_from_type and
10294 (create_breakpoint): Likewise.
10296 2017-05-31 Simon Marchi <simon.marchi@ericsson.com>
10298 * memattr.c (mem_info_command): Rename to ...
10299 (info_mem_command): ... this.
10300 (mem_enable_command): Rename to ...
10301 (enable_mem_command): ... this.
10302 (mem_disable_command): Rename to ...
10303 (disable_mem_command): ... this.
10304 (mem_delete_command): Rename to ...
10305 (delete_mem_command): ... this.
10306 (_initialize_mem): Adjust function names.
10308 2017-05-31 Markus Metzger <markus.t.metzger@intel.com>
10310 * btrace.c (handle_pt_insn_events): New.
10311 (ftrace_add_pt): Call handle_pt_insn_events. Rename ERRCODE into
10312 STATUS. Split into this and ...
10313 (handle_pt_insn_event_flags): ... this.
10315 2017-05-31 Markus Metzger <markus.t.metzger@intel.com>
10317 * configure.ac: Check for pt_insn_event, struct pt_insn.enabled,
10318 and struct pt_insn.resynced.
10319 * configure: Regenerated.
10320 * config.in: Regenerated.
10322 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
10324 * btrace.c (ftrace_find_call_by_number): New function.
10325 (ftrace_new_function): Store objects, not pointers.
10326 (ftrace_find_call_by_number, ftrace_new_return, ftrace_new_switch,
10327 ftrace_new_gap, ftrace_update_function,
10328 ftrace_compute_global_level_offset, btrace_stich_bts, btrace_clear,
10329 btrace_insn_get, btrace_insn_get_error, btrace_insn_end,
10330 btrace_insn_next, btrace_insn_prev, ptrace_find_insn_by_number,
10331 btrace_ends_with_single_insn, btrace_call_get): Account for
10332 btrace_thread_info::functions now storing objects.
10333 * btrace.h (struct btrace_thread_info): Add constructor.
10334 (struct btrace_thread_info) <functions>: Make std::vector.
10335 (struct btrace_thread_info) <prev, next, up, insn, errcode, flags):
10336 Initialize with default values.
10337 * record-btrace.c (record_btrace_frame_sniffer): Account for
10338 btrace_thread_info::functions now storing objects.
10340 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
10342 * btrace.c: Remove typedef bfun_s.
10343 (ftrace_new_gap): Directly add gaps to the list of gaps.
10344 (btrace_bridge_gaps, btrace_compute_ftrace_bts, pt_btrace_insn_flags,
10345 ftrace_add_pt, btrace_compute_ftrace_pt, btrace_compute_ftrace_1,
10346 btrace_finalize_ftrace, btrace_compute_ftrace): Use std::vector
10347 instead of gdb VEC.
10349 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
10351 * btrace.c (ftrace_fixup_caller, ftrace_new_return, ftrace_connect_bfun,
10352 ftrace_bridge_gap): Replace references to btrace_thread_info::segment
10353 with btrace_thread_info::next_segment and
10354 btrace_thread_info::prev_segment.
10355 * btrace.h: Remove struct btrace_func_link.
10356 (struct btrace_function): Replace pair of function segment pointers
10357 with pair of indices.
10358 * python/py-record-btrace.c (btpy_call_prev_sibling,
10359 btpy_call_next_sibling): Replace references to
10360 btrace_thread_info::segment with btrace_thread_info::next_segment and
10361 btrace_thread_info::prev_segment.
10362 * record-btrace.c (record_btrace_frame_this_id): Use
10363 btrace_find_call_by_number.
10365 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
10367 * btrace.c (ftrace_new_function, ftrace_fixup_level,
10368 ftrace_connect_bfun, ftrace_bridge_gap, btrace_bridge_gaps,
10369 btrace_insn_next, btrace_insn_prev): Remove references to
10370 btrace_thread_info::flow.
10371 * btrace.h (struct btrace_function): Remove FLOW.
10373 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
10375 * btrace.c (ftrace_find_call_by_number): New function.
10376 (ftrace_update_caller, ftrace_new_call, ftrace_new_tailcall,
10377 ftrace_get_caller, ftrace_find_call, ftrace_new_return,
10378 ftrace_match_backtrace, ftrace_connect_bfun, ftrace_connect_backtrace,
10379 ftrace_bridge_gap, btrace_bridge_gaps): Use btrace_function::up as an
10381 * btrace.h (struct btrace_function): Turn UP into an index.
10382 * python/py-record-btrace.c (btpy_call_up): Use btrace_function::up
10384 * record-btrace.c (record_btrace_frame_unwind_stop_reason,
10385 record_btrace_frame_prev_register, record_btrace_frame_sniffer,
10386 record_btrace_tailcall_frame_sniffe): Use btrace_find_call_by_number.
10388 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
10390 * btrace.c (ftrace_new_function, ftrace_new_call, ftrace_new_tailcall,
10391 ftrace_new_return, ftrace_new_switch, ftrace_new_gap,
10392 ftrace_update_function, ftrace_compute_global_level_offset,
10393 btrace_compute_ftrace_bts, ftrace_add_pt, btrace_compute_ftrace_pt,
10394 btrace_stitch_bts, btrace_fetch, btrace_clear, btrace_insn_number,
10395 btrace_insn_end, btrace_is_empty): Remove references to
10396 btrace_thread_info::begin and btrace_thread_info::end.
10397 * btrace.h (struct btrace_thread_info): Remove BEGIN and END.
10398 (struct btrace_thread_info) <functions>: Adjust comment.
10399 * record-btrace.c (record_btrace_start_replaying): Remove reference to
10400 btrace_thread_info::begin.
10402 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
10404 * btrace.c (ftrace_new_function, ftrace_new_call, ftrace_new_tailcall,
10405 ftrace_new_return, ftrace_new_switch, ftrace_new_gap,
10406 ftrace_update_function): Remove arguments that implicitly were always
10408 (btrace_compute_ftrace_bts, ftrace_add_pt, btrace_compute_ftrace_pt):
10409 Don't pass BTINFO->END.
10411 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
10413 * btrace.c: (btrace_insn_get, btrace_insn_get_error, btrace_insn_number,
10414 btrace_insn_begin, btrace_insn_end, btrace_insn_next, btrace_insn_prev,
10415 btrace_find_insn_by_number): Replace function segment pointer with
10417 (btrace_insn_cmp): Simplify.
10418 * btrace.h: (struct btrace_insn_iterator) Rename index to
10419 insn_index. Replace function segment pointer with index into function
10421 * record-btrace.c (record_btrace_call_history): Replace function
10422 segment pointer use with index.
10423 (record_btrace_frame_sniffer): Retrieve function call segment through
10425 (record_btrace_set_replay): Remove defunc't safety check.
10427 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
10429 * btrace.c (btrace_ends_with_single_insn): New function.
10430 (btrace_call_get, btrace_call_number, btrace_call_begin,
10431 btrace_call_end, btrace_call_next, btrace_call_prev,
10432 btrace_find_call_by_number): Use index into call segment vector
10433 instead of pointer.
10434 (btrace_call_cmp): Simplify.
10435 * btrace.h (struct btrace_call_iterator): Replace function call segment
10436 pointer with index into vector.
10437 * record-btrace.c (record_btrace_call_history): Use index instead of
10440 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
10442 * btrace.c (btrace_insn_begin, btrace_insn_end,
10443 btrace_find_insn_by_number): Add btinfo to iterator.
10444 * btrace.h (struct btrace_insn_iterator): Add btinfo.
10446 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
10448 * btrace.c (ftrace_new_function): Add btrace_thread_info to arguments
10449 and save pointers directly.
10450 (ftrace_new_call, ftrace_new_tailcall, ftrace_new_return,
10451 ftrace_new_switch, ftrace_new_gap, ftrace_update_function,
10452 ftrace_add_pt): Add btrace_thread_info to arguments. Adjust for
10453 changed signature of functions.
10454 (btrace_compute_ftrace_pt): Adjust for changed signature of functions.
10455 (btrace_fetch): Remove code that adds btrace_function pointers to
10456 vector of btrace_functions.
10457 (btrace_clear): Simplify freeing vector of btrace_functions.
10459 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
10461 * btrace.c (btrace_fetch, btrace_clear, btrace_find_insn_by_number):
10462 Replace VEC_* with std::vector functions.
10463 * btrace.h: Add include: vector. Remove typedef for DEF_VEC_P.
10464 (struct btrace_thread_info)<functions>: Change type to std::vector.
10466 2017-05-30 Simon Marchi <simon.marchi@ericsson.com>
10468 * NEWS (Changes in GDB 8.0): Remove extra empty line. Move
10469 "Removed targets and native configurations" up. Merge duplicate
10470 "New commands" sub-sections. Add "New options" sub-sections.
10472 2017-05-26 Alan Hayward <alan.hayward@arm.com>
10474 * defs.h (copy_integer_to_size): New declaration.
10475 * findvar.c (copy_integer_to_size): New function.
10476 (do_cint_test): New selftest function.
10477 (copy_integer_to_size_test): Likewise.
10478 (_initialize_findvar): Likewise.
10479 * mips-fbsd-tdep.c (mips_fbsd_supply_reg): Use raw_supply_integer.
10480 (mips_fbsd_collect_reg): Use raw_collect_integer.
10481 * mips-linux-tdep.c (supply_32bit_reg): Use raw_supply_integer.
10482 (mips64_fill_gregset): Use raw_collect_integer
10483 (mips64_fill_fpregset): Use raw_supply_integer.
10484 * regcache.c (regcache::raw_supply_integer): New function.
10485 (regcache::raw_collect_integer): Likewise.
10486 * regcache.h: (regcache::raw_supply_integer): New declaration.
10487 (regcache::raw_collect_integer): Likewise.
10489 2017-05-24 Yao Qi <yao.qi@linaro.org>
10491 * Makefile.in (SFILES): Add gdbarch-selftests.c.
10492 (COMMON_OBS): Add gdbarch-selftests.o.
10493 * frame.c [GDB_SELF_TESTS] (create_new_frame): New function.
10494 * frame.h [GDB_SELF_TESTS] (create_new_frame): Declare.
10495 * gdbarch-selftests.c: New file.
10496 * regcache.h (regcache) <~regcache>: Mark it virtual if
10498 <raw_write>: Likewise.
10500 2017-05-24 Yao Qi <yao.qi@linaro.org>
10502 * regcache.c (current_regcache): Change it to
10503 regcache::current_regcache.
10504 (regcache_observer_target_changed): Update.
10505 (regcache_thread_ptid_changed): Make it a regcache static
10507 (regcache_thread_ptid_changed): Update.
10508 (class regcache_access): New.
10509 (current_regcache_test): Update.
10510 (_initialize_regcache): Update.
10511 * regcache.h: Include forward_list.
10512 (regcache): Declare regcache_thread_ptid_changed and declare
10513 registers_changed_ptid as friend.
10515 2017-05-24 Yao Qi <yao.qi@linaro.org>
10517 * i387-tdep.c (i387_register_to_value): Use register_size
10518 instead of TYPE_LENGTH.
10519 * m68k-tdep.c (m68k_register_to_value): Likewise.
10521 2017-05-24 Yao Qi <yao.qi@linaro.org>
10523 * i387-tdep.c (i387_convert_register_p): Return false if type
10524 code isn't TYPE_CODE_FLT.
10526 2017-05-24 Yao Qi <yao.qi@linaro.org>
10528 * alpha-tdep.c (alpha_convert_register_p): Return true if type
10530 (alpha_register_to_value): Remove type length check.
10531 (alpha_value_to_register): Likewise.
10533 2017-05-24 Yao Qi <yao.qi@linaro.org>
10535 * ia64-tdep.c (ia64_convert_register_p): Check type's code is
10538 2017-05-24 Yao Qi <yao.qi@linaro.org>
10540 * m68k-tdep.c (m68k_convert_register_p): Check type's code is
10541 TYPE_CODE_FLT or not.
10543 2017-05-24 Yao Qi <yao.qi@linaro.org>
10545 * alpha-tdep.c (alpha_gdbarch_init): Use XCNEW instead of XNEW.
10546 * avr-tdep.c (avr_gdbarch_init): Likewise.
10547 * bfin-tdep.c (bfin_gdbarch_init): Likewise.
10548 * cris-tdep.c (cris_gdbarch_init): Likewise.
10549 * ft32-tdep.c (ft32_gdbarch_init): Likewise.
10550 * lm32-tdep.c (lm32_gdbarch_init): Likewise.
10551 * m32r-tdep.c (m32r_gdbarch_init): Likewise.
10552 * m68hc11-tdep.c (m68hc11_gdbarch_init): Likewise.
10553 * mep-tdep.c (mep_gdbarch_init): Likewise.
10554 * microblaze-tdep.c (microblaze_gdbarch_init): Likewise.
10555 * mips-tdep.c (mips_gdbarch_init): Likewise.
10556 * mn10300-tdep.c (mn10300_gdbarch_init): Likewise.
10557 * moxie-tdep.c (moxie_gdbarch_init): Likewise.
10558 * msp430-tdep.c (msp430_gdbarch_init): Likewise.
10559 * sh64-tdep.c (sh64_gdbarch_init): Likewise.
10560 * v850-tdep.c (v850_gdbarch_init): Likewise.
10562 2017-05-24 Yao Qi <yao.qi@linaro.org>
10564 * selftest-arch.c (tests_with_arch): Call registers_changed
10565 and reinit_frame_cache.
10566 * selftest.c (run_self_tests): Likewise.
10568 2017-05-24 Yao Qi <yao.qi@linaro.org>
10570 * rs6000-tdep.c (gdb_print_insn_powerpc): Remove.
10571 (rs6000_gdbarch_init): Don't call set_gdbarch_print_insn.
10573 2017-05-24 Yao Qi <yao.qi@linaro.org>
10575 * rl78-tdep.c (rl78_gdbarch_init): Don't call
10576 set_gdbarch_print_insn.
10578 2017-05-24 Yao Qi <yao.qi@linaro.org>
10580 * h8300-tdep.c (h8300_gdbarch_init): Don't call
10581 set_gdbarch_print_insn.
10583 2017-05-24 Yao Qi <yao.qi@linaro.org>
10585 * alpha-tdep.c (alpha_gdbarch_init): Don't call
10586 set_gdbarch_print_insn.
10587 * arc-tdep.c (arc_gdbarch_init): Likewise.
10588 * arch-utils.c: include dis-asm.h.
10589 (default_print_insn): New function.
10590 * arch-utils.h (default_print_insn): Declare.
10591 * avr-tdep.c (avr_gdbarch_init): Don't call set_gdbarch_print_insn.
10592 * bfin-tdep.c (bfin_gdbarch_init): Likewise.
10593 * cris-tdep.c (cris_delayed_get_disassembler): Remove.
10594 (cris_gdbarch_init): Don't call set_gdbarch_print_insn.
10595 * frv-tdep.c (frv_gdbarch_init): Likewise.
10596 * ft32-tdep.c (ft32_gdbarch_init): Likewise.
10597 * gdbarch.sh (print_insn): Use default_print_insn.
10598 * gdbarch.c: Regenerated.
10599 * hppa-tdep.c (hppa_gdbarch_init): Likewise.
10600 * iq2000-tdep.c (iq2000_gdbarch_init): Likewise.
10601 * lm32-tdep.c (lm32_gdbarch_init): Likewise.
10602 * m32c-tdep.c (m32c_gdbarch_init): Likewise.
10603 * m32r-tdep.c (m32r_gdbarch_init): Likewise.
10604 * m68hc11-tdep.c (gdb_print_insn_m68hc11): Remove.
10605 (m68hc11_gdbarch_init): Don't call set_gdbarch_print_insn.
10606 * m68k-tdep.c (m68k_gdbarch_init): Likewise.
10607 * m88k-tdep.c (m88k_gdbarch_init): Likewise.
10608 * microblaze-tdep.c (microblaze_gdbarch_init): Likewise.
10609 * mn10300-tdep.c (mn10300_gdbarch_init): Likewise.
10610 * moxie-tdep.c (moxie_gdbarch_init): Likewise.
10611 * msp430-tdep.c (msp430_gdbarch_init): Likewise.
10612 * mt-tdep.c (mt_gdbarch_init): Likewise.
10613 * nds32-tdep.c (nds32_gdbarch_init): Likewise.
10614 * nios2-tdep.c (nios2_print_insn): Remove.
10615 (nios2_gdbarch_init): Don't call set_gdbarch_print_insn.
10616 * rx-tdep.c (rx_gdbarch_init): Likewise.
10617 * s390-linux-tdep.c (s390_gdbarch_init): Likewise.
10618 * score-tdep.c (score_print_insn): Remove.
10619 (score_gdbarch_init): Don't call set_gdbarch_print_insn.
10620 * sh-tdep.c (sh_gdbarch_init): Likewise.
10621 * sh64-tdep.c (sh64_gdbarch_init): Likewise.
10622 * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
10623 * tic6x-tdep.c (tic6x_print_insn): Remove.
10624 (tic6x_gdbarch_init): Don't call set_gdbarch_print_insn.
10625 * tilegx-tdep.c (tilegx_gdbarch_init): Likewise.
10626 * v850-tdep.c (v850_gdbarch_init): Likewise.
10627 * vax-tdep.c (vax_gdbarch_init): Likewise.
10628 * xstormy16-tdep.c (xstormy16_gdbarch_init): Likewise.
10629 * xtensa-tdep.c (xtensa_gdbarch_init): Likewise.
10631 2017-05-23 John Baldwin <jhb@FreeBSD.org>
10633 * mips-fbsd-tdep.c (MIPS_PC_REGNUM): Remove.
10634 (MIPS_FP0_REGNUM): Remove.
10635 (MIPS_FSR_REGNUM): Remove.
10636 (mips_fbsd_supply_fpregs): Use mips_regnum.
10637 (mips_fbsd_supply_gregs): Likewise.
10638 (mips_fbsd_collect_fpregs): Likewise.
10639 (mips_fbsd_collect_gregs): Likewise.
10641 2017-05-23 John Baldwin <jhb@FreeBSD.org>
10643 * mips-fbsd-nat.c (getregs_supplies): Fix upper bound comparison.
10644 (getpfpregs_supplies): New function.
10645 (mips_fbsd_fetch_inferior_registers): Remove early exit and use
10646 getfpregs_supplies.
10647 (mips_fbsd_store_inferior_registers): Likewise.
10649 2017-05-22 Pedro Alves <palves@redhat.com>
10651 * MAINTAINERS (Host/Native): Add John Baldwin as FreeBSD
10654 2017-05-22 Alan Hayward <alan.hayward@arm.com>
10656 * ppc-linux-nat.c (fetch_register): Use PPC_MAX_REGISTER_SIZE.
10657 (store_register): Likewise.
10658 * ppc-sysv-tdep.c (ppc_sysv_abi_push_dummy_call): Likewise.
10659 (get_decimal_float_return_value): Likewise.
10660 (do_ppc_sysv_return_value): Likewise.
10661 (ppc64_sysv_abi_push_integer): Likewise.
10662 (ppc64_sysv_abi_push_freg): Likewise.
10663 (ppc64_sysv_abi_return_value_base): Likewise.
10664 (ppc64_sysv_abi_return_value): Likewise.
10665 * rs6000-aix-tdep.c (rs6000_push_dummy_call): Likewise.
10666 * rs6000-lynx178-tdep.c (rs6000_lynx178_push_dummy_call): Likewise.
10667 * rs6000-nat.c: Likewise.
10668 * rs6000-tdep.c (rs6000_register_to_value): Likewise.
10669 (rs6000_value_to_register): Likewise.
10670 * ppc-tdep.h (PPC_MAX_REGISTER_SIZE): Add.
10672 2017-05-21 Tom Tromey <tom@tromey.com>
10675 * rust-lang.c (rust_print_type) <TYPE_CODE_ARRAY>: Print unsized
10676 arrays as "[T]", not "[T; ]".
10678 2017-05-19 Tom Tromey <tom@tromey.com>
10681 * rust-lang.c (exp_descriptor_rust): New function.
10682 (rust_language_defn): Use it.
10683 * p-lang.c (pascal_language_defn): Update.
10684 * opencl-lang.c (opencl_language_defn): Update.
10685 * objc-lang.c (objc_language_defn): Update.
10686 * m2-lang.c (m2_language_defn): Update.
10687 * language.h (struct language_defn)
10688 <la_watch_location_expression>: New member.
10689 * language.c (unknown_language_defn, auto_language_defn)
10690 (local_language_defn): Update.
10691 * go-lang.c (go_language_defn): Update.
10692 * f-lang.c (f_language_defn): Update.
10693 * d-lang.c (d_language_defn): Update.
10694 * c-lang.h (c_watch_location_expression): Declare.
10695 * c-lang.c (c_watch_location_expression): New function.
10696 (c_language_defn, cplus_language_defn, asm_language_defn)
10697 (minimal_language_defn): Use it.
10698 * breakpoint.c (watch_command_1): Call
10699 la_watch_location_expression.
10700 * ada-lang.c (ada_language_defn): Update.
10702 2017-05-19 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
10705 * gdb_curses.h (NOMACROS): Define.
10706 (NCURSES_NOMACROS): Define.
10708 2017-05-19 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
10711 * tui/tui-windata.c (tui_erase_data_content): Cast last mvwaddstr
10713 * tui/tui-wingeneral.c (box_win): Likewise.
10714 * tui/tui-winsource.c (tui_erase_source_content): Likewise.
10715 (tui_show_source_line): Likewise.
10716 (tui_show_exec_info_content): Likewise.
10718 2017-05-19 Vladimir Mezentsev <vladimir.mezentsev@oracle.com>
10720 * sparc-tdep.c (sparc_structure_return_p)
10721 (sparc_arg_on_registers_p): New functions.
10722 (sparc32_store_arguments): Use them.
10723 * sparc64-tdep.c (sparc64_16_byte_align_p)
10724 (sparc64_store_floating_fields, sparc64_extract_floating_fields):
10725 Handle TYPE_CODE_ARRAY.
10727 2017-05-17 Yao Qi <yao.qi@linaro.org>
10729 * cli/cli-decode.c (add_alias_cmd): New function.
10730 * command.h (add_alias_cmd): Declare.
10731 * infcmd.c (_initialize_infcmd): Don't call add_com_alias,
10732 instead call add_alias_cmd.
10734 2017-05-17 Pedro Alves <palves@redhat.com>
10736 * Makefile.in (nat_extra_makefile_frag): Rename to ...
10737 (nat_makefile_frag): ... this. All references updated.
10738 * configure.ac: Likewise.
10739 * configure.nat: Likewise. Enhance comments.
10740 * configure: Regenerate.
10742 2017-05-15 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
10744 * procfs.c (procfs_create_inferior): Change prototype to match
10747 2017-05-13 Eli Zaretskii <eliz@gnu.org>
10749 * tui/tui.c (tui_enable): Cast "unknown" to 'char *' to avoid a
10750 C++ compiler warning.
10752 2017-05-12 Tom Tromey <tom@tromey.com>
10755 * rust-lang.c (rust_evaluate_subexp) <STRUCTOP_STRUCT>: Don't
10756 recurse, just call value_struct_elt directly.
10758 2017-05-12 Tom Tromey <tom@tromey.com>
10760 * rust-lang.c (rust_dump_subexp_body) <STRUCTOP_ANONYMOUS,
10761 OP_RUST_ARRAY>: Fix.
10763 2017-05-12 Tom Tromey <tom@tromey.com>
10765 * rust-lang.c (rust_print_subexp): Replace "return" with "break".
10767 2017-05-09 Yao Qi <yao.qi@linaro.org>
10769 * regcache.c: Include <forward_list>.
10770 (struct regcache_list): Remove.
10771 (current_regcache): Update.
10772 (get_thread_arch_aspace_regcache): Update for std::forward_list.
10773 (regcache_thread_ptid_changed): Likewise.
10774 (registers_changed_ptid): Likewise.
10775 (current_regcache_size): Likewise.
10777 2017-05-09 Yao Qi <yao.qi@linaro.org>
10779 * regcache.c [GDB_SELF_TEST]: Include selftest.h.
10780 (current_regcache_size): New function.
10781 (current_regcache_test): New function.
10782 (_initialize_regcache) [GDB_SELF_TEST]: Register the unit test.
10784 2017-05-08 Alan Hayward <alan.hayward@arm.com>
10786 * mips-tdep.c (mips_o32_return_value): Remove unused buffer.
10787 (print_gp_register_row): Use get_frame_register_value.
10789 2017-05-08 Alan Hayward <alan.hayward@arm.com>
10791 * mips-linux-tdep.c (mips_supply_gregset): Use raw_supply_zeroed.
10792 (mips_supply_fpregset): Likewise.
10793 (mips64_supply_gregset): Likewise.
10795 2017-05-08 Alan Hayward <alan.hayward@arm.com>
10797 * mn10300-linux-tdep.c (am33_supply_gregset_method): Use
10798 regcache->raw_supply_zeroed.
10800 2017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
10802 * configure.nat: Rearrange 'case' statements to match
10805 2017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
10807 * Makefile.in: Remove "@host_makefile_frag@". Add variables
10808 NAT_FILE, NATDEPFILES, NAT_CDEPS, LOADLIBES, MH_CFLAGS, XM_CLIBS,
10809 NAT_GENERATED_FILES, HAVE_NATIVE_GCORE_HOST. Add
10810 "@nat_extra_makefile_frag@".
10811 (Makefile): Remove dependency on "@frags@".
10812 ($(GNULIB_BUILDDIR)/Makefile): Likewise.
10813 (data-directory/Makefile): Likewise.
10814 * config/aarch64/linux.mh: Deleted; moved contents to
10815 "gdb/configure.nat".
10816 * config/alpha/alpha-linux.mh: Likewise.
10817 * config/alpha/nbsd.mh: Likewise.
10818 * config/arm/linux.mh: Likewise.
10819 * config/arm/nbsdelf.mh: Likewise.
10820 * config/i386/cygwin.mh: Likewise.
10821 * config/i386/cygwin64.mh: Likewise.
10822 * config/i386/darwin.mh: Likewise.
10823 * config/i386/fbsd.mh: Likewise.
10824 * config/i386/fbsd64.mh: Likewise.
10825 * config/i386/go32.mh: Likewise.
10826 * config/i386/i386gnu.mh: Likewise.
10827 * config/i386/i386sol2.mh: Likewise.
10828 * config/i386/linux.mh: Likewise.
10829 * config/i386/linux64.mh: Likewise.
10830 * config/i386/mingw.mh: Likewise.
10831 * config/i386/mingw64.mh: Likewise.
10832 * config/i386/nbsd64.mh: Likewise.
10833 * config/i386/nbsdelf.mh: Likewise.
10834 * config/i386/nto.mh: Likewise.
10835 * config/i386/obsd.mh: Likewise.
10836 * config/i386/obsd64.mh: Likewise.
10837 * config/i386/sol2-64.mh: Likewise.
10838 * config/ia64/linux.mh: Likewise.
10839 * config/m32r/linux.mh: Likewise.
10840 * config/m68k/linux.mh: Likewise.
10841 * config/m68k/nbsdelf.mh: Likewise.
10842 * config/m68k/obsd.mh: Likewise.
10843 * config/m88k/obsd.mh: Likewise.
10844 * config/mips/fbsd.mh: Likewise.
10845 * config/mips/linux.mh: Likewise.
10846 * config/mips/nbsd.mh: Likewise.
10847 * config/mips/obsd64.mh: Likewise.
10848 * config/pa/linux.mh: Likewise.
10849 * config/pa/nbsd.mh: Likewise.
10850 * config/pa/obsd.mh: Likewise.
10851 * config/powerpc/aix.mh: Likewise.
10852 * config/powerpc/fbsd.mh: Likewise.
10853 * config/powerpc/linux.mh: Likewise.
10854 * config/powerpc/nbsd.mh: Likewise.
10855 * config/powerpc/obsd.mh: Likewise.
10856 * config/powerpc/ppc64-linux.mh: Likewise.
10857 * config/powerpc/spu-linux.mh: Likewise.
10858 * config/s390/linux.mh: Likewise.
10859 * config/sh/nbsd.mh: Likewise.
10860 * config/sparc/fbsd.mh: Likewise.
10861 * config/sparc/linux.mh: Likewise.
10862 * config/sparc/linux64.mh: Likewise.
10863 * config/sparc/nbsd64.mh: Likewise.
10864 * config/sparc/nbsdelf.mh: Likewise.
10865 * config/sparc/obsd64.mh: Likewise.
10866 * config/sparc/sol2.mh: Likewise.
10867 * config/tilegx/linux.mh: Likewise.
10868 * config/vax/nbsdelf.mh: Likewise.
10869 * config/vax/obsd.mh: Likewise.
10870 * config/xtensa/linux.mh: Likewise.
10871 * config/i386/i386gnu.mn: New file, with excerpts from
10872 "config/i386/i386gnu.mh".
10873 * configure: Regenerate.
10874 * configure.ac: Rewrite code to use "gdb/configure.nat" instead of
10875 *.mh files under "gdb/config".
10876 * configure.nat: New file, with contents from the
10877 "gdb/config/*/*.mh" files.
10879 2017-05-05 Tim Wiederhake <tim.wiederhake@intel.com>
10881 * btrace.c (btrace_clear): Free insn vector.
10883 2017-05-05 Pedro Alves <palves@redhat.com>
10885 * warning.m4 (build_warnings): Add -Wno-error=maybe-uninitialized.
10886 * configure: Regenerate.
10888 2017-05-04 Pedro Alves <palves@redhat.com>
10890 * Makefile.in (SFILES): Add progspace-and-thread.c.
10891 (HFILES_NO_SRCDIR): Add progspace-and-thread.h.
10892 (COMMON_OBS): Add progspace-and-thread.o.
10893 * breakpoint.c: Include "progspace-and-thread.h".
10894 (update_inserted_breakpoint_locations)
10895 (insert_breakpoint_locations, create_longjmp_master_breakpoint):
10896 Use scoped_restore_current_pspace_and_thread.
10897 (create_std_terminate_master_breakpoint): Use
10898 scoped_restore_current_program_space.
10899 (remove_breakpoint): Use scoped_restore_current_pspace_and_thread.
10900 (print_breakpoint_location): Use
10901 scoped_restore_current_program_space.
10902 (bp_loc_is_permanent): Use
10903 scoped_restore_current_pspace_and_thread.
10904 (resolve_sal_pc): Use scoped_restore_current_pspace_and_thread.
10905 (download_tracepoint_locations): Use
10906 scoped_restore_current_pspace_and_thread.
10907 (breakpoint_re_set): Use scoped_restore_current_pspace_and_thread.
10908 * exec.c (exec_close_1): Use scoped_restore_current_program_space.
10909 (enum step_over_calls_kind): Moved from inferior.h.
10910 (class scoped_restore_current_thread): New class.
10911 * gdbthread.h (make_cleanup_restore_current_thread): Delete
10913 (scoped_restore_current_thread): New class.
10914 * infcmd.c: Include "common/gdb_optional.h".
10915 (continue_1, proceed_after_attach): Use
10916 scoped_restore_current_thread.
10917 (notice_new_inferior): Use scoped_restore_current_thread.
10918 * inferior.c: Include "progspace-and-thread.h".
10919 (restore_inferior, save_current_inferior): Delete.
10920 (add_inferior_command, clone_inferior_command): Use
10921 scoped_restore_current_pspace_and_thread.
10922 * inferior.h (scoped_restore_current_inferior): New class.
10923 * infrun.c: Include "progspace-and-thread.h" and
10924 "common/gdb_optional.h".
10925 (follow_fork_inferior): Use
10926 scoped_restore_current_pspace_and_thread.
10927 (scoped_restore_exited_inferior): New class.
10928 (handle_vfork_child_exec_or_exit): Use
10929 scoped_restore_exited_inferior,
10930 scoped_restore_current_pspace_and_thread,
10931 scoped_restore_current_thread and scoped_restore.
10932 (fetch_inferior_event): Use scoped_restore_current_thread.
10933 * linespec.c (decode_line_full, decode_line_1): Use
10934 scoped_restore_current_program_space.
10935 * mi/mi-main.c: Include "progspace-and-thread.h".
10936 (exec_continue): Use scoped_restore_current_thread.
10937 (mi_cmd_exec_run): Use scoped_restore_current_pspace_and_thread.
10938 (mi_cmd_trace_frame_collected): Use scoped_restore_current_thread.
10939 * proc-service.c (ps_pglobal_lookup): Use
10940 scoped_restore_current_program_space.
10941 * progspace-and-thread.c: New file.
10942 * progspace-and-thread.h: New file.
10943 * progspace.c (release_program_space, clone_program_space): Use
10944 scoped_restore_current_program_space.
10945 (restore_program_space, save_current_program_space)
10946 (save_current_space_and_thread): Delete.
10947 (switch_to_program_space_and_thread): Moved to
10948 progspace-and-thread.c.
10949 * progspace.h (save_current_program_space)
10950 (save_current_space_and_thread): Delete declarations.
10951 (scoped_restore_current_program_space): New class.
10952 * remote.c (remote_btrace_maybe_reopen): Use
10953 scoped_restore_current_thread.
10954 * symtab.c: Include "progspace-and-thread.h".
10955 (skip_prologue_sal): Use scoped_restore_current_pspace_and_thread.
10956 * thread.c (print_thread_info_1): Use
10957 scoped_restore_current_thread.
10958 (struct current_thread_cleanup): Delete.
10959 (do_restore_current_thread_cleanup)
10960 (restore_current_thread_cleanup_dtor): Rename/convert both to ...
10961 (scoped_restore_current_thread::~scoped_restore_current_thread):
10963 (make_cleanup_restore_current_thread): Rename/convert to ...
10964 (scoped_restore_current_thread::scoped_restore_current_thread):
10966 (thread_apply_all_command): Use scoped_restore_current_thread.
10967 (thread_apply_command): Use scoped_restore_current_thread.
10968 * tracepoint.c (tdump_command): Use scoped_restore_current_thread.
10969 * varobj.c (value_of_root_1): Use scoped_restore_current_thread.
10971 2017-05-04 Pedro Alves <palves@redhat.com>
10973 * thread.c (make_cleanup_restore_current_thread): Move
10974 find_thread_ptid call before the is_stopped call. Assert that the
10975 thread is found. Replace is_stopped call by checking the thread's
10976 state directly. Remove unnecessary NULL-thread check.
10978 2017-05-04 Pedro Alves <palves@redhat.com>
10980 * corelow.c (thread_section_name): New class.
10981 (get_core_register_section, get_core_siginfo): Use it.
10983 2017-05-04 Andreas Arnez <arnez@linux.vnet.ibm.com>
10985 * corelow.c (sniff_core_bfd): Remove extra semicolon.
10986 (get_core_register_section): Remove xfree of NULL pointer.
10988 2017-05-03 Alan Hayward <alan.hayward@arm.com>
10990 * frv-linux-tdep.c (frv_linux_supply_gregset): Use raw_supply_zeroed.
10991 * regcache.c (regcache::raw_supply_zeroed): New function.
10992 * regcache.h (regcache::raw_supply_zeroed): New declaration.
10994 2017-05-03 Simon Marchi <simon.marchi@ericsson.com>
10996 * gdbarch.sh: Remove commented out definition of
10998 * gdbarch.h: Re-generate.
11000 2017-05-03 Sergio Durigan Junior <sergiodj@redhat.com>
11002 * configure: Regenerate.
11004 2017-05-02 Simon Marchi <simon.marchi@ericsson.com>
11006 * solib-target.c (solib_target_relocate_section_addresses):
11007 Remove num_section_bases, num_bases, segment_bases variables.
11009 2017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
11011 * common/gdb_vecs.h (DEF_VEC_I (CORE_ADDR)): Remove.
11013 2017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
11015 * solib-target.c: Include <vector>
11016 (struct lm_info_target) <~lm_info_target>: Remove.
11017 <segment_bases, section_bases>: Change type to
11018 std::vector<CORE_ADDR>.
11019 (library_list_start_segment, library_list_start_section,
11020 library_list_end_library,
11021 solib_target_relocate_section_addresses): Adjust.
11023 2017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
11025 * gdbarch.sh (software_single_step): Change return type to
11026 std::vector<CORE_ADDR>.
11027 * gdbarch.c, gdbarch.h: Re-generate.
11028 * arch/arm-get-next-pcs.c (thumb_deal_with_atomic_sequence_raw):
11030 (arm_deal_with_atomic_sequence_raw): Adjust.
11031 (thumb_get_next_pcs_raw): Adjust.
11032 (arm_get_next_pcs_raw): Adjust.
11033 (arm_get_next_pcs): Adjust.
11034 * arch/arm-get-next-pcs.h (arm_get_next_pcs): Adjust.
11035 * aarch64-tdep.c (aarch64_software_single_step): Adjust.
11036 * alpha-tdep.c (alpha_deal_with_atomic_sequence): Adjust.
11037 (alpha_software_single_step): Adjust.
11038 * alpha-tdep.h (alpha_software_single_step): Adjust.
11039 * arm-linux-tdep.c (arm_linux_software_single_step): Adjust.
11040 * arm-tdep.c (arm_software_single_step): Adjust.
11041 (arm_breakpoint_kind_from_current_state): Adjust.
11042 * arm-tdep.h (arm_software_single_step): Adjust.
11043 * breakpoint.c (insert_single_step_breakpoint): Adjust.
11044 * cris-tdep.c (cris_software_single_step): Adjust.
11045 * mips-tdep.c (mips_deal_with_atomic_sequence): Adjust.
11046 (micromips_deal_with_atomic_sequence): Adjust.
11047 (deal_with_atomic_sequence): Adjust.
11048 (mips_software_single_step): Adjust.
11049 * mips-tdep.h (mips_software_single_step): Adjust.
11050 * moxie-tdep.c (moxie_software_single_step): Adjust.
11051 * nios2-tdep.c (nios2_software_single_step): Adjust.
11052 * ppc-tdep.h (ppc_deal_with_atomic_sequence): Adjust.
11053 * rs6000-aix-tdep.c (rs6000_software_single_step): Adjust.
11054 * rs6000-tdep.c (ppc_deal_with_atomic_sequence): Adjust.
11055 * s390-linux-tdep.c (s390_software_single_step): Adjust.
11056 * sparc-tdep.c (sparc_software_single_step): Adjust.
11057 * spu-tdep.c (spu_software_single_step): Adjust.
11058 * tic6x-tdep.c (tic6x_software_single_step): Adjust.
11060 2017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
11062 * gdbarch.sh: Use semi-colon as field separator instead of colon.
11063 * gdbarch.h: Re-generate.
11065 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
11067 * Makefile.in (SUBDIR_PYTHON_OBS): Add py-instruction.o.
11068 (SUBDIR_PYTHON_SRCS): Add py-instruction.c.
11069 * python/py-instruction.c, python/py-instruction.h: New file.
11070 * python/py-record.c: Add py-instruction.h include.
11071 (gdbpy_initialize_record): Make gdb.Instruction a super class of
11072 gdb.RecordInstruction.
11073 * python/python-internal.h: Add gdbpy_initialize_instruction
11075 * python/python.c (do_start_initialization): Add
11076 gdbpy_initialize_instruction.
11078 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
11080 * python/py-record-btrace.c (BTPY_REQUIRE_VALID_CALL, btpy_call_type):
11082 (btrace_func_from_recpy_func): New function.
11083 (btpy_call_new, btpy_number, btpy_hash, btpy_richcompare): Remove.
11084 (btpy_call_level, btpy_call_symbol, btpy_call_instructions,
11085 btpy_call_up, btpy_call_prev_sibling, btpy_call_next_sibling): Rename to ...
11086 (recpy_bt_func_level, recpy_bt_func_symbol, recpy_bt_func_instructions,
11087 recpy_bt_func_up, recpy_bt_func_prev, recpy_bt_func_next): This.
11088 Also, use new helper functions.
11089 (btpy_list_item): Use new helper functions.
11090 (recpy_bt_function_call_history): Use new type name.
11091 (btpy_call_getset): Remove.
11092 (gdbpy_initialize_btrace): Remove code to initialize
11093 gdb.BtraceFunctionCall.
11094 * python/py-record-btrace.h (recpy_bt_func_number, recpy_btb_func_level,
11095 recpy_btb_func_symbol, recpy_bt_func_instructions, recpy_bt_func_up,
11096 recpy_bt_func_prev, recpy_bt_func_next): New export.
11097 * python/py-record.c (recpy_func_type): New static object.
11098 (recpy_func_new, recpy_func_level, recpy_func_symbol,
11099 recpy_func_instructions, recpy_func_up, recpy_func_prev,
11100 recpy_func_next): New function.
11101 (recpy_element_hash, recpy_element_richcompare): Updated comment.
11102 (recpy_func_getset): New static object.
11103 (gdbpy_initialize_record): Add code to initialize gdb.RecordInstruction.
11104 * python/py-record.h (recpy_func_type, recpy_func_new): New export.
11106 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
11108 * python/py-record-btrace.c (BTPY_REQUIRE_VALID_INSN): Remove.
11109 (btpy_object, btpy_insn_type, btpy_new): Remove.
11110 (btpy_list_object): Use gdb.RecordInstruction type instead of
11111 gdb.BtraceInstruction type.
11112 (btrace_insn_from_recpy_insn): New function.
11113 (btpy_insn_or_gap_new): Adjust comment. Use recpy_insn_new instead of
11115 (btpy_call_new, btpy_list_item): Do not use btpy_new anymore.
11116 (btpy_number, btpy_hash, btpy_call_level, btpy_call_symbol,
11117 btpy_call_instructions, btpy_call_up, btpy_call_prev_sibling,
11118 btpy_call_next_sibling, btpy_richcompare): Use recpy_element_object
11119 instead of btpy_object.
11120 (btpy_insn_sal, btpy_insn_pc, btpy_insn_size, btpy_insn_is_speculative,
11121 btpy_insn_data, btpy_insn_decode): Rename to ...
11122 (recpy_bt_insn_sal, recpy_bt_insn_pc, recpy_bt_insn_size,
11123 recpy_bt_insn_is_speculative, recpy_bt_insn_data,
11124 recpy_bt_insn_decode): This. Also, use new helper functions.
11125 (btpy_list_position, recpy_bt_goto): Use recpy_element_object and
11127 (btpy_insn_getset): Remove.
11128 (gdbpy_initialize_btrace): Remove code to initialize
11129 gdb.BtraceInstruction. Use recpy_element_object.
11130 * python/py-record-btrace.h (recpy_bt_insn_number, recpy_bt_insn_sal,
11131 recpy_bt_insn_pc, recpy_bt_insn_data, recpy_bt_insn_decoded,
11132 recpy_bt_insn_size, recpy_bt_insn_is_speculative): New export.
11133 * python/py-record.c (recpy_insn_type): New static object.
11134 (recpy_insn_new, recpy_insn_sal, recpy_insn_pc, recpy_insn_data,
11135 recpy_insn_decoded, recpy_insn_size, recpy_insn_is_speculative,
11136 recpy_element_number, recpy_element_hash, recpy_element_richcompare):
11138 (recpy_insn_getset): New static object.
11139 (gdbpy_initialize_record): Initialize gdb.RecordInstruction.
11140 * python/py-record.h (recpy_element_object): New typedef.
11141 (recpy_insn_type, recpy_insn_new): New export.
11143 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
11145 * py-record-btrace.c (btpy_insn_new): Removed.
11146 (btpy_insn_or_gap_new): New function.
11147 (btpy_insn_error): Removed.
11148 (btpy_insn_sal, btpy_insn_pc, btpy_insn_size, btpy_insn_is_speculative,
11149 btpy_insn_data, btpy_insn_decode): Remove code path for gaps.
11150 (recpy_bt_replay_position, recpy_bt_begin, recpy_bt_end): Call
11151 btpy_insn_or_gap_new instead of btpy_insn_new.
11152 (btpy_insn_getset): Remove btpy_insn_error.
11153 * py-record.c (recpy_gap_type): New static object.
11154 (recpy_gap_object): New typedef.
11155 (recpy_gap_new, recpy_gap_number, recpy_gap_reason_code,
11156 recpy_gap_reason_string): New function.
11157 (recpy_gap_getset): New static object.
11158 (gdbpy_initialize_record): Initialize gdb.RecordGap type.
11159 * py-record.h (recpy_gap_new): New export.
11161 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
11163 * python/py-record.c (recpy_ptid): Remove.
11164 (recpy_record_getset): Remove recpy_ptid.
11166 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
11168 * btrace.c (btrace_fetch): Set inferior_ptid.
11169 * python/py-record-btrace.c: Add "py-record.h" include.
11170 (recpy_bt_format, recpy_bt_replay_position, recpy_bt_begin,
11171 recpy_bt_end, recpy_bt_instruction_history,
11172 recpy_bt_function_call_history, recpy_bt_goto): Use ptid stored
11173 in gdb.Record object instead of current ptid.
11174 * python/py-record.c: Include new "py-record.h" file.
11175 (recpy_record_object): Moved to py-record.h.
11176 * python/py-record.h: New file.
11178 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
11180 * python/py-record-btrace.c (BTPY_REQUIRE_VALID_INSN,
11181 BTPY_REQUIRE_VALID_CALL, recpy_bt_function_call_history): Fix
11184 2017-05-01 Joel Brobecker <brobecker@adacore.com>
11186 * MAINTAINERS: Move Daniel Jacobowitz and Mark Kettenis to
11187 the past maintainers section.
11189 2017-04-28 Yao Qi <yao.qi@linaro.org>
11191 * infcmd.c (get_return_value): Use regcache ctor, and remove
11194 2017-04-28 Yao Qi <yao.qi@linaro.org>
11195 Pedro Alves <palves@redhat.com>
11197 * regcache.c (regcache::regcache): New tag dispatch ctor.
11198 (do_cooked_read): Moved above.
11199 (regcache_dup): Use the tag dispatch ctor..
11200 * regcache.h (regcache): Declare ctor, delete copy ctor and
11201 assignment operator, remove friend regcache_dup.
11203 2017-04-28 Yao Qi <yao.qi@linaro.org>
11205 * regcache.c (regcache_dup): Assert !src->m_readonly_p and
11206 call method save instead of regcache_cpy.
11207 * regcache.h (struct regcache): Make regcache_dup a friend.
11209 2017-04-28 Yao Qi <yao.qi@linaro.org>
11211 * regcache.c (struct regcache): Move to regcache.h
11212 (regcache::arch): New method.
11213 (regcache_get_ptid): Update.
11214 (get_regcache_arch): Call arch method.
11215 (get_regcache_aspace): Call method aspace.
11216 (register_buffer): Change it to method.
11217 (regcache_save): Change it to regcache::save.
11218 (regcache_restore): Likewise.
11219 (regcache_cpy_no_passthrough): Remove the declaration.
11220 (regcache_cpy): Call methods restore and cpy_no_passthrough.
11221 (regcache_cpy_no_passthrough): Change it to method
11222 cpy_no_passthrough.
11223 (regcache_register_status): Change it to method
11224 get_register_status.
11225 (regcache_invalidate): Change it to method invalidate.
11226 (regcache_thread_ptid_changed): Use methods ptid and set_ptid.
11227 (regcache_raw_update): Change it to method raw_update.
11228 (regcache_raw_read): Likewise.
11229 (regcache_raw_read_signed): Likewise.
11230 (regcache_raw_read_unsigned): Likewise.
11231 (regcache_raw_write_signed): Likewise.
11232 (regcache_raw_write_unsigned): Likewise.
11233 (regcache_cooked_read): Likewise.
11234 (regcache_cooked_read_value): Likewise.
11235 (regcache_cooked_read_signed): Likewise.
11236 (regcache_cooked_read_unsigned): Likewise.
11237 (regcache_cooked_write_signed): Likewise.
11238 (regcache_cooked_write_unsigned): Likewise.
11239 (regcache_raw_set_cached_value): Likewise.
11240 (regcache_raw_write): Likewise.
11241 (regcache_cooked_write): Likewise.
11242 (regcache_xfer_part): Likewise.
11243 (regcache_raw_read_part): Likewise.
11244 (regcache_raw_write_part): Likewise.
11245 (regcache_cooked_read_part): Likewise.
11246 (regcache_cooked_write_part): Likewise.
11247 (regcache_raw_supply): Likewise.
11248 (regcache_raw_collect): Likewise.
11249 (regcache_transfer_regset): Likewise.
11250 (regcache_supply_regset): Likewise.
11251 (regcache_collect_regset): Likewise.
11252 (regcache_debug_print_register): Likewise.
11253 (enum regcache_dump_what): Move it to regcache.h.
11254 (regcache_dump): Change it to method dump.
11255 * regcache.h (enum regcache_dump_what): New.
11256 (class regcache): New.
11257 * target.c (target_fetch_registers): Call method
11258 debug_print_register.
11259 (target_store_registers): Likewise.
11261 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
11263 * windows-nat.c (struct lm_info_windows): Initialize field.
11264 (windows_make_so): Allocate lm_info_windows with new.
11265 (windows_free_so): Free lm_info_windows with delete.
11267 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
11269 * solib-darwin.c (struct lm_info_darwin): Initialize field.
11270 (darwin_current_sos): Allocate lm_info_darwin with new, remove
11272 (darwin_free_so): Free lm_info_darwin with delete.
11274 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
11276 * solib-svr4.h (struct lm_info_svr4): Initialize fields.
11277 <l_addr_p>: Change type to bool.
11278 * solib-svr4.c (lm_info_read): Allocate lm_info_svr4 with new.
11279 (svr4_free_so): Free lm_info_svr4 with delete.
11280 (svr4_copy_library_list): Replace memcpy with call to copy
11282 (library_list_start_library, svr4_default_sos): Allocate
11283 lm_info_svr4 with new.
11285 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
11287 * solib-target.c (struct lm_info_target): Add destructor,
11289 <name>: Change type to std::string.
11290 (library_list_start_library): Allocate lm_info_target with new.
11291 (solib_target_free_library_list): Free lm_info_target with
11293 (solib_target_current_sos): Adapt to std::string.
11294 (solib_target_free_so): Free lm_info_target with delete.
11296 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
11298 * solib-frv.c (struct lm_info_frv): Add destructor, initialize
11300 (frv_current_sos): Allocate lm_info_frv with new.
11301 (frv_relocate_main_executable): Free lm_info_frv with delete,
11303 (frv_clear_solib, frv_free_so): Free lm_info_frv with delete.
11305 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
11307 * solib-frv.c (struct lm_info_frv): Fix indentation.
11309 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
11311 * solib-dsbt.c (struct lm_info_dsbt): Add destructor, initialize
11313 (dsbt_current_sos): Allocate lm_info_dsbt with new.
11314 (dsbt_relocate_main_executable): Free lm_info_dsbt with delete
11315 and allocate with new.
11316 (dsbt_clear_solib, dsbt_free_so): Free lm_info_dsbt with delete.
11318 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
11320 * solib-aix.c (struct lm_info_aix): Initialize fields in-class.
11321 <filename, member_name>: Change type to std::string.
11322 (solib_aix_new_lm_info, solib_aix_xfree_lm_info): Remove.
11323 (library_list_start_library): Allocate lm_info_aix with new.
11324 (solib_aix_free_library_list, solib_aix_free_so): Free with delete.
11325 (solib_aix_current_sos): Adapt to std::string, copy lm_info_aix
11326 with copy constructor.
11328 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
11330 * solist.h (struct lm_info): Remove.
11331 (struct lm_info_base): New class.
11332 (struct so_list) <lm_info>: Change type to lm_info_base *.
11333 * nto-tdep.c (struct lm_info): Remove.
11335 * solib-aix.c (struct lm_info): Rename to ...
11336 (struct lm_info_aix): ... this. Extend lm_info_base.
11337 (lm_info_p): Rename to ...
11338 (lm_info_aix_p): ... this, and adjust.
11339 (solib_aix_new_lm_info, solib_aix_xfree_lm_info,
11340 solib_aix_parse_libraries, library_list_start_library,
11341 solib_aix_free_library_list, solib_aix_parse_libraries,
11342 solib_aix_get_library_list,
11343 solib_aix_relocate_section_addresses, solib_aix_free_so,
11344 solib_aix_get_section_offsets,
11345 solib_aix_solib_create_inferior_hook, solib_aix_current_sos):
11347 (struct solib_aix_inferior_data) <library_list>: Adjust.
11348 * solib-darwin.c (struct lm_info): Rename to ...
11349 (struct lm_info_darwin): ... this. Extend lm_info_base.
11350 (darwin_current_sos, darwin_relocate_section_addresses): Adjust.
11351 * solib-dsbt.c (struct lm_info): Rename to ...
11352 (struct lm_info_dsbt): ... this. Extend lm_info_base.
11353 (struct dsbt_info) <main_executable_lm_info): Adjust.
11354 (dsbt_current_sos, dsbt_relocate_main_executable, dsbt_free_so,
11355 dsbt_relocate_section_addresses): Adjust.
11356 * solib-frv.c (struct lm_info): Rename to ...
11357 (struct lm_info_frv): ... this. Extend lm_info_base.
11358 (main_executable_lm_info): Adjust.
11359 (frv_current_sos, frv_relocate_main_executable, frv_free_so,
11360 frv_relocate_section_addresses, frv_fdpic_find_global_pointer,
11361 find_canonical_descriptor_in_load_object,
11362 frv_fdpic_find_canonical_descriptor): Adjust.
11363 * solib-svr4.c (struct lm_info): Move to solib-svr4.h, renamed
11365 (lm_info_read, lm_addr_check, svr4_keep_data_in_core,
11366 svr4_clear_so, svr4_copy_library_list,
11367 library_list_start_library, svr4_default_sos, svr4_read_so_list,
11368 svr4_current_sos, svr4_fetch_objfile_link_map,
11369 solist_update_incremental): Adjust.
11370 * solib-svr4.h (struct lm_info_svr4): Move here from
11372 * solib-target.c (struct lm_info): Rename to ...
11373 (struct lm_info_target): ... this. Extend lm_info_base.
11374 (lm_info_p): Rename to ...
11375 (lm_info_target_p): ... this.
11376 (solib_target_parse_libraries, library_list_start_segment,
11377 library_list_start_section, library_list_start_library,
11378 library_list_end_library, solib_target_free_library_list,
11379 solib_target_current_sos, solib_target_free_so,
11380 solib_target_relocate_section_addresses): Adjust.
11381 * windows-nat.c (struct lm_info): Rename to ...
11382 (struct lm_info_windows): ... this. Extend lm_info_base.
11383 (windows_make_so, handle_load_dll, handle_unload_dll,
11384 windows_xfer_shared_libraries): Adjust.
11386 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
11388 * solib-darwin.c (struct darwin_so_list): Remove.
11389 (darwin_current_sos): Allocate an so_list object instead of a
11390 darwin_so_list, separately allocate an lm_info object.
11391 (darwin_free_so): Free lm_info.
11393 2017-04-28 John Baldwin <jhb@FreeBSD.org>
11395 * mips-tdep.c (print_gp_register_row): Replace printf_filtered
11396 with fprintf_filtered.
11398 2017-04-28 Yao Qi <yao.qi@linaro.org>
11400 * regcache.c (regcache::regcache): New function.
11401 (regcache::~regcache): New function.
11402 (regcache_xmalloc_1): Remove.
11403 (regcache_xmalloc): Call new regcache.
11404 (regcache_xfree): Call delete regcache.
11405 (get_thread_arch_aspace_regcache): Call new regcache.
11407 2017-04-28 Yao Qi <yao.qi@linaro.org>
11409 * mips-linux-nat.c (mips_linux_new_thread): Use ptid method
11410 lwp instead of ptid_get_lwp.
11412 2017-04-28 Yao Qi <yao.qi@linaro.org>
11414 * mips-linux-nat.c (mips_linux_new_thread): Get lwpid from
11415 lwp_info instead of getting from inferior_ptid.
11417 2017-04-27 Keith Seitz <keiths@redhat.com>
11419 * gdbtypes.c (LVALUE_REFERENCE_TO_RVALUE_BINDING_BADNESS)
11420 DIFFERENT_REFERENCE_TYPE_BADNESS): Remove.
11421 (CV_CONVERSION_BADNESS): Define.
11422 (rank_one_type): Remove overly restrictive rvalue reference
11424 Add cv-qualifier checks and subranks for type equality.
11425 * gdbtypes.h (REFERENCE_CONVERSION_RVALUE,
11426 REFERENCE_CONVERSION_CONST_LVALUE, CV_CONVERSION_BADNESS,
11427 CV_CONVERSION_CONST, CV_CONVERSION_VOLATILE): Declare.
11429 2017-04-27 Simon Marchi <simon.marchi@ericsson.com>
11431 * python/py-inferior.c (inferior_to_inferior_object): Increment reference
11432 count when creating the object.
11434 2017-04-27 Sangamesh Mallayya <sangamesh.swamy@in.ibm.com>
11435 Ulrich Weigand <uweigand@de.ibm.com>
11437 * xcoffread.c (read_xcoff_symtab): Read correct function auxiliary
11438 entry if xlc -qfuncsect or gcc -ffunction-sections compiler option
11440 (read_xcoff_symtab): Handle C_WEAKEXT storage class.
11441 (process_xcoff_symbol): Likewise.
11442 (scan_xcoff_symtab): Likewise.
11444 2017-04-26 Alan Hayward <alan.hayward@arm.com>
11446 * ia64-tdep.c (examine_prologue): Use get_frame_register_unsigned.
11447 (ia64_sigtramp_frame_prev_register): Use read_memory_unsigned_integer.
11448 (ia64_access_reg): Use get_frame_register_unsigned.
11449 (ia64_access_rse_reg): Likewise.
11450 (ia64_libunwind_frame_prev_register): Likewise.
11452 2017-04-26 Jiong Wang <jiong.wang@arm.com>
11454 * gdbarch.sh: New gdbarch method execute_dwarf_cfa_vendor_op.
11455 * gdbarch.c: Regenerated.
11456 * gdbarch.h: Regenerated.
11457 * dwarf2-frame.c (dwarf2_frame_state_alloc_regs): Made the
11458 visibility external.
11459 (execute_cfa_program): Call execute_dwarf_cfa_vendor_op for CFI
11460 between DW_CFA_lo_user and DW_CFA_high_user inclusive.
11461 (enum cfa_how_kind): Move to ...
11462 (struct dwarf2_frame_state_reg_info): Likewise.
11463 (struct dwarf2_frame_state): Likewise.
11464 * dwarf2-frame.h: ... here.
11465 (dwarf2_frame_state_alloc_regs): New declaration.
11466 * sparc-tdep.c (sparc_execute_dwarf_cfa_vendor_op): New function.
11467 (sparc32_gdbarch_init): Register execute_dwarf_cfa_vendor_op hook.
11469 2017-04-26 Alan Hayward <alan.hayward@arm.com>
11471 * xtensa-tdep.c (xtensa_pseudo_register_read): Use
11472 regcache_raw_read_unsigned.
11473 (xtensa_pseudo_register_write): Likewise.
11475 2017-04-26 Alan Hayward <alan.hayward@arm.com>
11477 * nds32-tdep.c (nds32_pseudo_register_read): Abort on errors.
11478 (nds32_pseudo_register_write): Likewise.
11480 2017-04-25 Yao Qi <yao.qi@linaro.org>
11482 * regcache.c (struct regcache) <readonly_p>: Change its type
11484 (regcache_xmalloc_1): Update parameter type and callers update.
11486 2017-04-25 Yao Qi <yao.qi@linaro.org>
11488 * aarch64-tdep.c (aarch64_gdbarch_init): Don't call
11489 set_gdbarch_wchar_bit.
11490 * arm-tdep.c (arm_gdbarch_init): Likewise.
11492 2017-04-25 Pedro Alves <palves@redhat.com>
11494 * common/poison.h [!HAVE_IS_TRIVIALLY_COPYABLE] (IsRelocatable)
11495 (BothAreRelocatable, memcopy, memmove): Don't define.
11496 * common/traits.h (__has_feature, HAVE_IS_TRIVIALLY_COPYABLE): New
11499 2017-04-25 Pedro Alves <palves@redhat.com>
11501 * common/common-defs.h: Include "common/poison.h".
11502 * common/function-view.h: (Not, Or, Requires): Move to traits.h
11504 * common/poison.h: New file.
11505 * common/traits.h: Include <type_traits>.
11506 (Not, Or, Requires): New, moved from common/function-view.h.
11508 2017-04-25 Pedro Alves <palves@redhat.com>
11510 * breakpoint.h (struct breakpoint): In-class initialize all
11511 fields. Make boolean fields "bool".
11512 * breakpoint.c (init_raw_breakpoint_without_location): Remove
11513 memset call and initializations no longer necessary.
11515 2017-04-25 Pedro Alves <palves@redhat.com>
11517 * btrace.c (pt_btrace_insn_flags): Change parameter type to
11519 (pt_btrace_insn): New function.
11520 (ftrace_add_pt): Remove memset call and use pt_btrace_insn.
11522 2017-04-25 Pedro Alves <palves@redhat.com>
11524 * ada-lang.c (ada_catchpoint_location): Now a "class". Remove
11525 "base" field and inherit from "bp_location" instead. Add
11527 (allocate_location_exception): Use new non-default ctor.
11528 * breakpoint.c (get_first_locp_gte_addr): Remove memset call.
11529 (init_bp_location): Convert to ...
11530 (bp_location::bp_location): ... this new ctor, and remove memset
11532 (base_breakpoint_allocate_location): Use the new non-default ctor.
11533 * breakpoint.h (bp_location): Now a class. Declare default and
11534 non-default ctors. In-class initialize all members.
11535 (init_bp_location): Remove declaration.
11537 2017-04-25 Pedro Alves <palves@redhat.com>
11539 * common/enum-flags.h (enum_flags): Don't implement copy ctor and
11540 assignment operator.
11542 2017-04-24 Yao Qi <yao.qi@linaro.org>
11544 * doublest.c (convert_doublest_to_floatformat): Call
11545 floatformat_totalsize_bytes.
11547 2017-04-22 Tom Tromey <tom@tromey.com>
11549 * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries): Use
11551 * stack.c (print_frame): Use ui_out_emit_list.
11552 * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Use
11554 * mi/mi-main.c (print_one_inferior)
11555 (mi_cmd_data_list_register_names)
11556 (mi_cmd_data_list_register_values, mi_cmd_list_features)
11557 (mi_cmd_list_target_features, mi_cmd_trace_frame_collected): Use
11559 * mi/mi-interp.c (mi_on_normal_stop_1): Use ui_out_emit_list.
11560 (mi_output_solib_attribs): Use ui_out_emit_list,
11562 * mi/mi-cmd-var.c (varobj_update_one): Use ui_out_emit_list.
11563 * mi/mi-cmd-stack.c (mi_cmd_stack_list_frames)
11564 (mi_cmd_stack_list_args, list_args_or_locals): Use
11566 * disasm.c (do_assembly_only): Use ui_out_emit_list.
11567 * breakpoint.c (print_solib_event, output_thread_groups): Use
11570 2017-04-22 Tom Tromey <tom@tromey.com>
11572 * mi/mi-main.c (print_variable_or_computed): Use ui_out_emit_tuple.
11573 * mi/mi-cmd-var.c (varobj_update_one): Use ui_out_emit_tuple.
11574 * mi/mi-cmd-stack.c (list_arg_or_local): Use ui_out_emit_tuple.
11576 2017-04-22 Tom Tromey <tom@tromey.com>
11578 * tracepoint.c (tvariables_info_1)
11579 (print_one_static_tracepoint_marker): Use ui_out_emit_tuple.
11581 2017-04-22 Tom Tromey <tom@tromey.com>
11583 * stack.c (print_frame_arg): Use ui_out_emit_tuple,
11584 annotate_arg_emitter.
11585 * breakpoint.c (print_mention_watchpoint)
11586 (print_mention_masked_watchpoint): Use ui_out_emit_tuple.
11587 * annotate.h (struct annotate_arg_emitter): New.
11589 2017-04-22 Tom Tromey <tom@tromey.com>
11591 * record-btrace.c (record_btrace_insn_history)
11592 (record_btrace_insn_history_range, record_btrace_call_history)
11593 (record_btrace_call_history_range): Use ui_out_emit_tuple.
11594 * thread.c (do_captured_list_thread_ids, print_thread_info_1): Use
11596 * stack.c (print_frame_info): Use ui_out_emit_tuple.
11597 * solib.c (info_sharedlibrary_command): Use ui_out_emit_tuple.
11598 * skip.c (skip_info): Use ui_out_emit_tuple.
11599 * remote.c (show_remote_cmd): Use ui_out_emit_tuple.
11600 * progspace.c (print_program_space): Use ui_out_emit_tuple.
11601 * probe.c (info_probes_for_ops): Use ui_out_emit_tuple.
11602 * osdata.c (info_osdata): Use ui_out_emit_tuple.
11603 * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Use
11605 * mi/mi-main.c (print_one_inferior, list_available_thread_groups)
11606 (output_register, mi_cmd_data_read_memory)
11607 (mi_cmd_data_read_memory_bytes, mi_load_progress)
11608 (mi_cmd_trace_frame_collected): Use ui_out_emit_tuple.
11609 * mi/mi-cmd-var.c (mi_cmd_var_list_children, varobj_update_one):
11610 Use ui_out_emit_tuple.
11611 * mi/mi-cmd-stack.c (mi_cmd_stack_list_args): Use
11613 * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions)
11614 (mi_cmd_info_gdb_mi_command): Use ui_out_emit_tuple.
11615 * linux-thread-db.c (info_auto_load_libthread_db): Use
11617 * inferior.c (print_inferior): Use ui_out_emit_tuple.
11618 * gdb_bfd.c (print_one_bfd): Use ui_out_emit_tuple.
11619 * disasm.c (do_mixed_source_and_assembly_deprecated)
11620 (do_mixed_source_and_assembly): Use ui_out_emit_tuple.
11621 * cp-abi.c (list_cp_abis): Use ui_out_emit_tuple.
11622 * cli/cli-setshow.c (cmd_show_list): Use ui_out_emit_tuple.
11623 * breakpoint.c (print_one_breakpoint_location)
11624 (print_one_breakpoint): Use ui_out_emit_tuple.
11625 * auto-load.c (print_script, info_auto_load_cmd): Use
11627 * ada-tasks.c (print_ada_task_info): Use ui_out_emit_tuple.
11629 2017-04-21 Simon Marchi <simon.marchi@ericsson.com>
11631 * thread.c (print_thread_info_1): Remove dead code.
11633 2017-04-21 Jan Kratochvil <jan.kratochvil@redhat.com>
11635 * aarch64-tdep.c (selftests::aarch64_process_record_test): Make it #if
11637 * arm-tdep.c (selftests::arm_record_test): Likewise.
11639 2017-04-21 Yao Qi <yao.qi@linaro.org>
11641 * regcache.c (regcache_restore): Remove argument 2. Replace
11642 argument 3 with regcache. Get register status from
11643 src->register_status and get register contents from
11644 register_buffer (src, regnum).
11645 (regcache_cpy): Update.
11647 2017-04-19 Pedro Alves <palves@redhat.com>
11649 * gdbthread.h (thread): Add missing closing parenthesis in
11652 2017-04-19 Pedro Alves <palves@redhat.com>
11654 * common/refcounted-object.h: New file.
11655 * gdbthread.h: Include "common/refcounted-object.h".
11656 (thread_info): Inherit from refcounted_object and add comments.
11657 (thread_info::incref, thread_info::decref)
11658 (thread_info::m_refcount): Delete.
11659 (thread_info::deletable): Use the refcounted_object::refcount()
11661 * inferior.c (current_inferior_): Add comment.
11662 (set_current_inferior): Increment/decrement refcounts.
11663 (prune_inferiors, remove_inferior_command): Skip inferiors marked
11664 not-deletable instead of comparing with the current inferior.
11665 (initialize_inferiors): Increment the initial inferior's refcount.
11666 * inferior.h (struct inferior): Forward declare.
11667 Include "common/refcounted-object.h".
11668 (current_inferior, set_current_inferior): Move declaration to
11669 before struct inferior's definition, and fix comment.
11670 (inferior): Inherit from refcounted_object. Add comments.
11671 * thread.c (switch_to_thread_no_regs): Reference the thread's
11672 inferior pointer directly instead of doing a ptid lookup.
11673 (switch_to_no_thread): New function.
11674 (switch_to_thread(thread_info *)): New function, factored out
11676 (switch_to_thread(ptid_t)): ... this.
11677 (restore_current_thread): Delete.
11678 (current_thread_cleanup): Remove 'inf_id' and 'was_removable'
11679 fields, and add 'inf' field.
11680 (do_restore_current_thread_cleanup): Check whether old->inf is
11681 alive instead of looking up an inferior by ptid. Use
11682 switch_to_thread and switch_to_no_thread.
11683 (restore_current_thread_cleanup_dtor): Use old->inf directly
11684 instead of lookup up an inferior by id. Decref the inferior.
11685 Don't restore 'removable'.
11686 (make_cleanup_restore_current_thread): Same the inferior pointer
11687 in old, instead of the inferior number. Incref the inferior.
11688 Don't save/clear 'removable'.
11690 2017-04-19 Pedro Alves <palves@redhat.com>
11692 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
11693 unittests/scoped_restore-selftests.c.
11694 (SUBDIR_UNITTESTS_OBS): Add scoped_restore-selftests.o.
11695 * common/scoped_restore.h (scoped_restore_base): Make "class".
11696 (scoped_restore_base::release): New public method.
11697 (scoped_restore_base::scoped_restore_base): New protected ctor.
11698 (scoped_restore_base::m_saved_var): New protected field.
11699 (scoped_restore_tmpl::scoped_restore_tmpl(T*)): Initialize the
11700 scoped_restore_base base class instead of m_saved_var directly.
11701 (scoped_restore_tmpl::scoped_restore_tmpl(T*, T2)): Likewise.
11702 (scoped_restore_tmpl::scoped_restore_tmpl(const
11703 scoped_restore_tmpl<T>&)): Likewise.
11704 (scoped_restore_tmpl::~scoped_restore_tmpl): Use the saved_var
11706 (scoped_restore_tmpl::saved_var): New method.
11707 (scoped_restore_tmpl::m_saved_var): Delete.
11708 * inferior.h (inferior::detaching): Now a bool.
11709 * infrun.c (prepare_for_detach): Use a scoped_restore instead of a
11711 * unittests/scoped_restore-selftests.c: New file.
11713 2017-04-19 Pedro Alves <palves@redhat.com>
11715 * Makefile.in (SUBDIR_UNITTESTS_SRCS, SUBDIR_UNITTESTS_OBS):
11716 Re-sort in alphabetic order.
11718 2017-04-18 Pedro Alves <palves@redhat.com>
11720 * xml-support.c (obstack_xml_printf): Delete.
11721 * xml-support.h (obstack_xml_printf): Delete.
11723 2017-04-18 Pedro Alves <palves@redhat.com>
11725 * xml-support.c (gdb_xml_parser) <use_dtd, dtd_name, parse,
11726 vdebug, verror, body_text, start_element, end_element, name,
11727 user_data, set_is_xinclude, set_error, expat_parser>: New methods.
11728 <name, user_data, expat_parser, scopes, error, last_line, dtd_name,
11729 is_xinclude>: Make private and add m_ prefix.
11730 (gdb_xml_parser::body_text): New method, based on ...
11731 (gdb_xml_body_text): ... this. Adjust.
11732 (gdb_xml_parser::vdebug): New method, based on ...
11733 (gdb_xml_debug): ... this. Adjust.
11734 (gdb_xml_parser::verror): New method, based on ...
11735 (gdb_xml_error): ... this. Adjust.
11736 (gdb_xml_parser::start_element): New method, based on ...
11737 (gdb_xml_start_element): ... this. Adjust.
11738 (gdb_xml_start_element_wrapper): Defer to
11739 gdb_xml_parser::start_element and gdb_xml_parser::set_error.
11740 (gdb_xml_parser::end_element): New method, based on ...
11741 (gdb_xml_end_element_wrapper): ... this. Adjust.
11742 (gdb_xml_parser::~gdb_xml_parser): Adjust.
11743 (gdb_xml_parser::gdb_xml_parser): Adjust to field renames.
11744 (gdb_xml_parser::use_dtd): New method, based on ...
11745 (gdb_xml_use_dtd): ... this. Adjust.
11746 (gdb_xml_parser::parse): New method, based on ...
11747 (gdb_xml_parse): ... this. Adjust.
11748 (gdb_xml_parse_quick): Adjust to call the parser's parse method.
11749 (xinclude_start_include): Adjust to call the parser's name method.
11750 (xml_xinclude_default, xml_xinclude_start_doctype)
11751 (xml_xinclude_end_doctype): Adjust to call the parser's user_data
11753 (xml_process_xincludes): Adjust to call parser methods.
11754 * xml-support.h (gdb_xml_use_dtd, gdb_xml_parse): Delete
11757 2017-04-18 Pedro Alves <palves@redhat.com>
11759 * tracefile-tfile.c (tfile_write_tdesc): Adjust to use
11760 gdb::optional<std::string>.
11761 * xml-support.c: Include <string>.
11762 (scope_level::scope_level(scope_level &&))
11763 (scope_level::~scope_level): Delete.
11764 (scope_level::body): Now a std::string.
11765 (gdb_xml_body_text, gdb_xml_end_element): Adjust.
11766 (xinclude_parsing_data::xinclude_parsing_data): Add 'output'
11768 (xinclude_parsing_data::~xinclude_parsing_data): Delete.
11769 (xinclude_parsing_data::output): Now a std::string reference.
11770 (xinclude_start_include): Adjust.
11771 (xml_xinclude_default): Adjust.
11772 (xml_process_xincludes): Add 'output' parameter, and return bool.
11773 * xml-support.h (xml_process_xincludes): Add 'output' parameter,
11775 * xml-tdesc.c: Include <unordered_map> and <string>.
11776 (tdesc_xml_cache): Delete.
11777 (tdesc_xml_cache_s): Delete.
11778 (xml_cache): Now an std::unordered_map.
11779 (tdesc_parse_xml): Adjust to use std::string and unordered_map.
11780 (target_fetch_description_xml): Change return type to
11781 gdb::optional<std::string>, and adjust.
11782 * xml-tdesc.h: Include "common/gdb_optional.h" and <string>.
11783 (target_fetch_description_xml): Change return type to
11784 gdb::optional<std::string>.
11786 2017-04-18 Pedro Alves <palves@redhat.com>
11788 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
11789 unittests/optional-selftests.c.
11790 (SUBDIR_UNITTESTS_OBS): Add optional-selftests.o.
11791 * unittests/optional-selftests.c: New file.
11792 * unittests/optional/assignment/1.cc: New file.
11793 * unittests/optional/assignment/2.cc: New file.
11794 * unittests/optional/assignment/3.cc: New file.
11795 * unittests/optional/assignment/4.cc: New file.
11796 * unittests/optional/assignment/5.cc: New file.
11797 * unittests/optional/assignment/6.cc: New file.
11798 * unittests/optional/assignment/7.cc: New file.
11799 * unittests/optional/cons/copy.cc: New file.
11800 * unittests/optional/cons/default.cc: New file.
11801 * unittests/optional/cons/move.cc: New file.
11802 * unittests/optional/cons/value.cc: New file.
11803 * unittests/optional/in_place.cc: New file.
11804 * unittests/optional/observers/1.cc: New file.
11805 * unittests/optional/observers/2.cc: New file.
11807 2017-04-18 Pedro Alves <palves@redhat.com>
11809 * common/gdb_optional.h: Include common/traits.h.
11810 (in_place_t): New type.
11811 (in_place): New constexpr variable.
11812 (optional::optional): Remove member initialization of
11814 (optional::optional(in_place_t...)): New constructor.
11815 (optional::~optional): Use reset.
11816 (optional::optional(const optional&)): New.
11817 (optional::optional(const optional&&)): New.
11818 (optional::optional(T &)): New.
11819 (optional::optional(T &&)): New.
11820 (operator::operator=(const optional &)): New.
11821 (operator::operator=(optional &&)): New.
11822 (operator::operator= (const T &))
11823 (operator::operator= (T &&))
11824 (operator::emplace (Args &&... args)): Return a T&. Use reset.
11825 (operator::reset): New.
11826 (operator::m_instantiated):: Add in-class initializer.
11827 * common/traits.h: Include <type_traits>.
11828 (struct And): New types.
11830 2017-04-18 Pedro Alves <palves@redhat.com>
11832 * xml-support.c: Include <vector>.
11833 (scope_level::scope_level(const gdb_xml_element *))
11834 (scope_level::scope_level(scope_level&&)): New.
11835 (scope_level::~scope_level): New.
11836 (scope_level_s): Delete.
11837 (gdb_xml_parser::scopes): Now a std::vector.
11838 (gdb_xml_body_text, gdb_xml_start_element, gdb_xml_end_element):
11840 (gdb_xml_parser::~gdb_xml_parser): Remove now unnecessary
11841 scope cleanup code.
11842 (gdb_xml_parser::gdb_xml_parser): Remove explicit initialization
11843 of the scopes member. Use std::vector::emplace_back.
11845 2017-04-18 Pedro Alves <palves@redhat.com>
11847 * xml-support.c (gdb_xml_parser): Add ctor/dtor. Make is_xinclude
11849 (gdb_xml_end_element): Change type of first parameter.
11850 (gdb_xml_cleanup): Rename to ...
11851 (gdb_xml_parser::~gdb_xml_parser): ... this.
11852 (gdb_xml_create_parser_and_cleanup): Delete with ...
11853 (gdb_xml_parser::gdb_xml_parser): ... creation parts factored out
11855 (gdb_xml_parse_quick): Create a local gdb_xml_parser instead of
11856 using gdb_xml_create_parser_and_cleanup.
11857 (xinclude_parsing_data): Add ctor/dtor.
11858 (xml_xinclude_cleanup): Delete.
11859 (xml_process_xincludes): Create a local xinclude_parsing_data
11860 instead of heap-allocating one. Create a local gdb_xml_parser
11861 instead of heap-allocating one with
11862 gdb_xml_create_parser_and_cleanup.
11864 2017-04-18 John Baldwin <jhb@FreeBSD.org>
11867 * fbsd-nat.c (resume_one_thread_cb): Remove.
11868 (resume_all_threads_cb): Remove.
11869 (fbsd_resume): Use ALL_NON_EXITED_THREADS instead of
11870 iterate_over_threads.
11872 2017-04-17 Joel Brobecker <brobecker@adacore.com>
11874 * NEWS: Create a new section for the next release branch.
11875 Rename the section of the current branch, now that it has
11878 2017-04-17 Joel Brobecker <brobecker@adacore.com>
11880 GDB 8.0 branch created (725bf5cf125783c2a7ca4ab63d3768e220bab2db):
11881 * version.in: Bump version to 8.0.50.DATE-git.
11883 2017-04-13 Sergio Durigan Junior <sergiodj@redhat.com>
11886 * windows-nat.c (windows_create_inferior): Declare 'allargs'
11887 independently of the host, and fix build breakage on Cygwin.
11889 2017-04-13 Pedro Alves <palves@redhat.com>
11891 * inferior.c (free_inferior): Convert to ...
11892 (inferior::~inferior): ... this dtor.
11893 (inferior::inferior): New ctor, factored out from ...
11894 (add_inferior_silent): ... here. Allocate the inferior with a new
11896 (delete_inferior): Call delete instead of free_inferior.
11897 * inferior.h (gdb_environ, continuation): Forward declare.
11898 (inferior): Now a class. Add in-class initialization to all
11899 members. Make boolean fields bool, except 'detaching'.
11900 (inferior::inferior): New explicit ctor.
11901 (inferior::~inferior): New.
11903 2017-04-13 Pedro Alves <palves@redhat.com>
11905 * inferior.c (init_inferior_list): Delete.
11906 * inferior.h (init_inferior_list): Delete.
11908 2017-04-13 Pedro Alves <palves@redhat.com>
11911 * gdb.threads/threadapply.exp (thr_apply_detach): New procedure.
11912 (top level): Call it twice, with different thread sets.
11914 2017-04-13 Pedro Alves <palves@redhat.com>
11916 * thread.c: Include <algorithm>.
11917 (thread_array_cleanup): Delete.
11918 (scoped_inc_dec_ref): New class.
11919 (live_threads_count): New function.
11920 (set_thread_refcount): Delete.
11921 (tp_array_compar_ascending): Now a bool.
11922 (tp_array_compar): Convert to a std::sort comparison function.
11923 (thread_apply_all_command): Use std::vector and scoped_inc_dec_ref
11924 and live_threads_count.
11926 2017-04-13 Pedro Alves <palves@redhat.com>
11928 * infrun.c (follow_fork_inferior): Also switch the current
11931 2017-04-13 Pedro Alves <palves@redhat.com>
11933 * breakpoint.c (watch_command_1): Save watchpoint-frame info
11934 before calling create_internal_breakpoint.
11936 2017-04-13 Pedro Alves <palves@redhat.com>
11938 * fork-child.c (execv_argv): New class.
11939 (breakup_args): Refactored as ...
11940 (execv_argv::init_for_no_shell): .. this method of execv_argv.
11941 Copy arguments to storage and replace separators with NULL
11942 terminators in place.
11943 (escape_bang_in_quoted_argument): Adjust to return bool.
11944 (execv_argv::execv_argv): New ctor.
11945 (execv_argv::init_for_shell): New method, factored out from
11946 fork_inferior. Don't strdup strings into the vector.
11947 (fork_inferior): Eliminate "shell" local and use execv_argv. Use
11948 Remove free_vector_argv call.
11950 2017-04-13 Yao Qi <yao.qi@linaro.org>
11952 * rx-tdep.c (rx_fpsw_type): Check tdep->rx_fpsw_type instead of
11955 2017-04-13 Yao Qi <yao.qi@linaro.org>
11957 * rl78-tdep.c (rl78_gdbarch_init): Use XCNEW instead of XNEW.
11958 * rx-tdep.c (rx_gdbarch_init): Likewise.
11960 2017-04-13 Pedro Alves <palves@redhat.com>
11962 * breakpoint.h (struct breakpoint): Reindent.
11964 2017-04-13 Pedro Alves <palves@redhat.com>
11966 * breakpoint.c (bp_location): Rename to ...
11967 (bp_locations): ... this. All references updated.
11968 (bp_location_count): Rename to ...
11969 (bp_locations_count): ... this. All references updated.
11970 (bp_location_placed_address_before_address_max): Rename to ...
11971 (bp_locations_placed_address_before_address_max): ... this. All
11972 references updated.
11973 (bp_location_shadow_len_after_address_max): Rename to ...
11974 (bp_locations_shadow_len_after_address_max): ... this. All
11975 references updated.
11976 (bp_location_compare_addrs): Rename to ...
11977 (bp_locations_compare_addrs): ... this. All references updated.
11978 (bp_location_compare):Rename to ...
11979 (bp_locations_compare): ... this. All references updated.
11980 (bp_location_target_extensions_update): Rename to ...
11981 (bp_locations_target_extensions_update): ... this. All references
11984 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
11986 * Makefile.in (HFILES_NO_SRCDIR): Add "common/gdb_termios.h".
11987 * common/common.m4: Check headers 'termios.h', 'termio.h' and
11989 * common/gdb_termios.h: New file, with parts of "terminal.h".
11990 * inflow.c: Include "gdb_termios.h".
11991 * ser-unix.c: Include "gdb_termios.h".
11992 * terminal.h: Move terminal-related defines to
11993 "common/gdb_termios.h".
11995 2017-04-12 Tom Tromey <tom@tromey.com>
11997 * probe.c (parse_probes): Update.
11998 * location.h (delete_event_location): Don't declare.
11999 (event_location_deleter::operator()): Update.
12000 * location.c (event_location_deleter::operator()): Rename from
12001 delete_event_location.
12002 * linespec.h (linespec_result) <location>: Change type to
12004 * linespec.c (canonicalize_linespec, event_location_to_sals)
12005 (decode_objc): Update.
12006 (linespec_result): Don't call delete_event_location.
12007 * breakpoint.c (create_breakpoints_sal)
12008 (bkpt_probe_create_sals_from_location)
12009 (strace_marker_create_sals_from_location): Update.
12011 2017-04-12 Tom Tromey <tom@tromey.com>
12013 * linespec.h (struct linespec_result): Add constructor and
12015 (init_linespec_result, destroy_linespec_result)
12016 (make_cleanup_destroy_linespec_result): Don't declare.
12017 * linespec.c (init_linespec_result): Remove.
12018 (linespec_result::~linespec_result): Rename from
12019 destroy_linespec_result. Update.
12020 (cleanup_linespec_result, make_cleanup_destroy_linespec_result):
12022 * breakpoint.c (create_breakpoint, break_range_command)
12023 (decode_location_default): Update.
12024 * ax-gdb.c (agent_command_1): Update.
12026 2017-04-12 Tom Tromey <tom@tromey.com>
12028 * remote.c (remote_download_tracepoint): Update.
12029 * python/py-breakpoint.c (bppy_get_location): Update.
12030 * guile/scm-breakpoint.c (bpscm_print_breakpoint_smob)
12031 (gdbscm_breakpoint_location): Update.
12032 * elfread.c (elf_gnu_ifunc_resolver_return_stop): Update.
12033 * breakpoint.h (struct breakpoint) <location, location_range_end>:
12034 Change type to event_location_up.
12035 * breakpoint.c (create_overlay_event_breakpoint)
12036 (create_longjmp_master_breakpoint)
12037 (create_std_terminate_master_breakpoint)
12038 (create_exception_master_breakpoint)
12039 (breakpoint_event_location_empty_p, print_breakpoint_location)
12040 (print_one_breakpoint_location, create_thread_event_breakpoint)
12041 (init_breakpoint_sal, create_breakpoint)
12042 (print_recreate_ranged_breakpoint, break_range_command)
12043 (init_ada_exception_breakpoint, say_where): Update.
12044 (base_breakpoint_dtor): Don't call delete_event_location.
12045 (bkpt_print_recreate, tracepoint_print_recreate)
12046 (dprintf_print_recreate, update_static_tracepoint)
12047 (breakpoint_re_set_default): Update.
12049 2017-04-12 Tom Tromey <tom@tromey.com>
12051 * compile/compile-loc2c.c (compute_stack_depth_worker): Change
12052 type of "to_do". Update.
12053 (compute_stack_depth): Use std::vector.
12055 2017-04-12 Tom Tromey <tom@tromey.com>
12057 * printcmd.c (find_instruction_backward): Use std::vector.
12059 2017-04-12 Tom Tromey <tom@tromey.com>
12061 * symfile.c (objfilep): Remove typedef.
12062 (reread_symbols): Use a std::vector.
12064 2017-04-12 Tom Tromey <tom@tromey.com>
12066 * mi/mi-main.c (exec_direction_forward): Remove.
12067 (exec_reverse_continue, mi_execute_command): Use scoped_restore.
12068 * guile/scm-ports.c (ioscm_with_output_to_port_worker): Use
12070 * guile/guile.c (guile_repl_command, guile_command)
12071 (gdbscm_execute_gdb_command): Use scoped_restore.
12072 * go-exp.y (go_parse): Use scoped_restore.
12073 * d-exp.y (d_parse): Use scoped_restore.
12074 * cli/cli-decode.c (cmd_func): Use scoped_restore.
12075 * c-exp.y (c_parse): Use scoped_restore.
12077 2017-04-12 Tom Tromey <tom@tromey.com>
12079 * mi/mi-parse.h (struct mi_parse): Add constructor, destructor.
12080 (mi_parse): Update return type.
12081 (mi_parse_free): Remove.
12082 * mi/mi-parse.c (mi_parse::mi_parse): New constructor.
12083 (mi_parse::~mi_parse): Rename from mi_parse_free.
12084 (mi_parse_cleanup): Remove.
12085 (mi_parse): Return a unique_ptr. Use new.
12086 * mi/mi-main.c (mi_execute_command): Update.
12088 2017-04-12 Tom Tromey <tom@tromey.com>
12090 * location.c (explicit_location_lex_one): Return a
12091 unique_xmalloc_ptr.
12092 (string_to_explicit_location): Update. Remove cleanups.
12094 2017-04-12 Tom Tromey <tom@tromey.com>
12096 * gnu-v3-abi.c (value_and_voffset_p): Remove typedef.
12097 (compare_value_and_voffset): Change type. Update.
12098 (compute_vtable_size): Change type of "offset_vec".
12099 (gnuv3_print_vtable): Use std::vector. Remove cleanups.
12100 (gnuv3_get_typeid): Remove extraneous declaration.
12102 2017-04-12 Tom Tromey <tom@tromey.com>
12104 * charset.h (wchar_iterator): Fix comment.
12106 2017-04-12 Tom Tromey <tom@tromey.com>
12108 * charset.c (iconv_wrapper): New class.
12109 (cleanup_iconv): Remove.
12110 (convert_between_encodings): Use it.
12112 2017-04-12 Tom Tromey <tom@tromey.com>
12114 * symfile.h (increment_reading_symtab): Update type.
12115 * symfile.c (decrement_reading_symtab): Remove.
12116 (increment_reading_symtab): Return a scoped_restore_tmpl<int>.
12117 * psymtab.c (psymtab_to_symtab): Update.
12118 * dwarf2read.c (dw2_instantiate_symtab): Update.
12120 2017-04-12 Tom Tromey <tom@tromey.com>
12122 * jit.c (struct jit_reader): Declare separately. Add constructor
12123 and destructor. Change type of "handle".
12124 (loaded_jit_reader): Define separately.
12125 (jit_reader_load): Update. New "new".
12126 (jit_reader_unload_command): Use "delete".
12127 * gdb-dlfcn.h (struct dlclose_deleter): New.
12128 (gdb_dlhandle_up): New typedef.
12129 (gdb_dlopen, gdb_dlsym): Update types.
12130 (gdb_dlclose): Remove.
12131 * gdb-dlfcn.c (gdb_dlopen): Return a gdb_dlhandle_up.
12132 (gdb_dlsym): Change type of "handle".
12133 (make_cleanup_dlclose): Remove.
12134 (dlclose_deleter::operator()): Rename from gdb_dlclose.
12135 * compile/compile-c-support.c (load_libcc): Update.
12137 2017-04-12 Tom Tromey <tom@tromey.com>
12139 * symtab.h (find_pcs_for_symtab_line): Change return type.
12140 * symtab.c (find_pcs_for_symtab_line): Change return type.
12141 * python/py-linetable.c (build_line_table_tuple_from_pcs): Change
12142 type of "vec". Update.
12143 (ltpy_get_pcs_for_line): Update.
12144 * linespec.c (decode_digits_ordinary): Update.
12146 2017-04-12 Tom Tromey <tom@tromey.com>
12148 * tracepoint.c (actions_command): Update.
12149 * python/python.c (python_command, python_interactive_command):
12151 * mi/mi-cmd-break.c (mi_cmd_break_commands): Update.
12152 * guile/guile.c (guile_command): Update.
12153 * defs.h (read_command_lines, read_command_lines_1): Return
12155 (command_lines_deleter): New struct.
12156 (command_line_up): New typedef.
12157 * compile/compile.c (compile_code_command)
12158 (compile_print_command): Update.
12159 * cli/cli-script.h (get_command_line, copy_command_lines): Return
12161 (make_cleanup_free_command_lines): Remove.
12162 * cli/cli-script.c (get_command_line, read_command_lines_1)
12163 (copy_command_lines): Return command_line_up.
12164 (while_command, if_command, read_command_lines, define_command)
12165 (document_command): Update.
12166 (do_free_command_lines_cleanup, make_cleanup_free_command_lines):
12168 * breakpoint.h (breakpoint_set_commands): Change type of
12170 * breakpoint.c (breakpoint_set_commands): Change type of
12171 "commands". Update.
12172 (do_map_commands_command, update_dprintf_command_list)
12173 (create_tracepoint_from_upload): Update.
12175 2017-04-12 Tom Tromey <tom@tromey.com>
12177 * tracepoint.c (scope_info): Update.
12178 * spu-tdep.c (spu_catch_start): Update.
12179 * python/python.c (gdbpy_decode_line): Update.
12180 * python/py-finishbreakpoint.c (bpfinishpy_init): Update.
12181 * python/py-breakpoint.c (bppy_init): Update.
12182 * probe.c (parse_probes): Update.
12183 * mi/mi-cmd-break.c (mi_cmd_break_insert_1): Update.
12184 * location.h (event_location_deleter): New struct.
12185 (event_location_up): New typedef.
12186 (new_linespec_location, new_address_location, new_probe_location)
12187 (new_explicit_location, copy_event_location)
12188 (string_to_event_location, string_to_event_location_basic)
12189 (string_to_explicit_location): Update return type.
12190 (make_cleanup_delete_event_location): Remove.
12191 * location.c (new_linespec_location, new_address_location)
12192 (new_probe_location, new_explicit_location, copy_event_location):
12193 Return event_location_up.
12194 (delete_event_location_cleanup)
12195 (make_cleanup_delete_event_location): Remove.
12196 (string_to_explicit_location, string_to_event_location_basic)
12197 (string_to_event_location): Return event_location_up.
12198 * linespec.c (canonicalize_linespec, event_location_to_sals)
12199 (decode_line_with_current_source)
12200 (decode_line_with_last_displayed, decode_objc): Update.
12201 * guile/scm-breakpoint.c (gdbscm_register_breakpoint_x): Update.
12202 * completer.c (location_completer): Update.
12203 * cli/cli-cmds.c (edit_command, list_command): Update.
12204 * breakpoint.c (create_overlay_event_breakpoint)
12205 (create_longjmp_master_breakpoint)
12206 (create_std_terminate_master_breakpoint)
12207 (create_exception_master_breakpoint)
12208 (create_thread_event_breakpoint): Update.
12209 (init_breakpoint_sal): Update. Remove some dead code.
12210 (create_breakpoint_sal): Change type of "location". Update.
12211 (create_breakpoints_sal, create_breakpoint, break_command_1)
12212 (dprintf_command, break_range_command, until_break_command)
12213 (init_ada_exception_breakpoint)
12214 (strace_marker_create_sals_from_location)
12215 (update_static_tracepoint, trace_command, ftrace_command)
12216 (strace_command, create_tracepoint_from_upload): Update.
12217 * break-catch-throw.c (re_set_exception_catchpoint): Update.
12218 * ax-gdb.c (agent_command_1): Update.
12220 2017-04-12 Pedro Alves <palves@redhat.com>
12222 * Makefile.in (ALL_TARGET_OBS): Add i386-go32-tdep.o.
12223 * configure.tgt: Handle i[34567]86-*-go32* and
12224 i[34567]86-*-msdosdjgpp*.
12225 * i386-tdep.c (i386_svr4_reg_to_regnum):
12227 (i386_go32_init_abi, i386_coff_osabi_sniffer): Moved to
12229 (_initialize_i386_tdep): DJGPP bits moved to i386-go32-tdep.c.
12230 * i386-go32-tdep.c: New file.
12231 * i386-tdep.h (tdesc_i386_mmx, i386_svr4_reg_to_regnum): New
12234 2017-04-12 Simon Marchi <simon.marchi@ericsson.com>
12236 * aix-thread.c (pd_status2str): Change return type to const char *.
12238 2017-04-12 Pedro Alves <palves@redhat.com>
12240 * i386-tdep.c (i386_elf_init_abi, i386_go32_init_abi): Remove
12241 calls to set_gdbarch_gnu_triplet_regexp.
12243 2017-04-12 Pedro Alves <palves@redhat.com>
12246 * c-lang.c (cplus_primitive_types) <cplus_primitive_type_wchar_t>:
12248 (cplus_language_arch_info): Register cplus_primitive_type_wchar_t.
12249 * gdbtypes.h (struct builtin_type) <builtin_wchar>: New field.
12250 * gdbtypes.c (gdbtypes_post_init): Create the "wchar_t" type.
12251 * gdbarch.sh (wchar_bit, wchar_signed): New per-arch values.
12252 * gdbarch.h, gdbarch.c: Regenerate.
12253 * aarch64-tdep.c (aarch64_gdbarch_init): Override
12254 gdbarch_wchar_bit and gdbarch_wchar_signed.
12255 * alpha-tdep.c (alpha_gdbarch_init): Likewise.
12256 * arm-tdep.c (arm_gdbarch_init): Likewise.
12257 * avr-tdep.c (avr_gdbarch_init): Likewise.
12258 * h8300-tdep.c (h8300_gdbarch_init): Likewise.
12259 * i386-nto-tdep.c (i386nto_init_abi): Likewise.
12260 * i386-tdep.c (i386_go32_init_abi): Likewise.
12261 * m32r-tdep.c (m32r_gdbarch_init): Likewise.
12262 * moxie-tdep.c (moxie_gdbarch_init): Likewise.
12263 * nds32-tdep.c (nds32_gdbarch_init): Likewise.
12264 * rs6000-aix-tdep.c (rs6000_aix_init_osabi): Likewise.
12265 * sh-tdep.c (sh_gdbarch_init): Likewise.
12266 * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
12267 * sparc64-tdep.c (sparc64_init_abi): Likewise.
12268 * windows-tdep.c (windows_init_abi): Likewise.
12269 * xstormy16-tdep.c (xstormy16_gdbarch_init): Likewise.
12271 2017-04-12 Pedro Alves <palves@redhat.com>
12274 * c-lang.c (cplus_primitive_types) <cplus_primitive_type_char16_t,
12275 cplus_primitive_type_char32_t>: New enum values.
12276 (cplus_language_arch_info): Register cplus_primitive_type_char16_t
12277 and cplus_primitive_type_char32_t.
12278 * dwarf2read.c (read_base_type) <DW_ATE_UTF>: If bit size is 16 or
12279 32, use the archtecture's built-in type for char16_t and char32_t,
12280 respectively. Otherwise, fallback to init_integer_type as before,
12281 but make the type unsigned, and issue a complaint.
12282 * gdbtypes.c (gdbtypes_post_init): Make char16_t and char32_t unsigned.
12284 2017-04-12 Alan Hayward <alan.hayward@arm.com>
12286 * m32r-tdep.c (M32R_ARG_REGISTER_SIZE): Added.
12287 (m32r_push_dummy_call): Use M32R_ARG_REGISTER_SIZE.
12289 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
12291 * windows-nat.c (windows_create_inferior): Declare 'toexec' as
12294 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
12296 * common/common-utils.c (free_vector_argv): New function.
12297 * common/common-utils.h: Include <vector>.
12298 (free_vector_argv): New prototype.
12299 * darwin-nat.c (darwin_create_inferior): Rewrite function
12300 prototype in order to constify "exec_file" and accept a
12301 "std::string" for "allargs".
12302 * fork-child.c: Include <vector>.
12303 (breakup_args): Rewrite function, using C++.
12304 (fork_inferior): Rewrite function header, constify "exec_file_arg"
12305 and accept "std::string" for "allargs". Update the code to
12306 calculate "argv" based on "allargs". Update calls to "exec_fun"
12308 * gnu-nat.c (gnu_create_inferior): Rewrite function prototype in
12309 order to constify "exec_file" and accept a "std::string" for
12311 * go32-nat.c (go32_create_inferior): Likewise.
12312 * inf-ptrace.c (inf_ptrace_create_inferior): Likewise.
12313 * infcmd.c (run_command_1): Constify "exec_file". Use
12314 "std::string" for inferior arguments.
12315 * inferior.h (fork_inferior): Update prototype.
12316 * linux-nat.c (linux_nat_create_inferior): Rewrite function
12317 prototype in order to constify "exec_file" and accept a
12318 "std::string" for "allargs".
12319 * nto-procfs.c (procfs_create_inferior): Likewise.
12320 * procfs.c (procfs_create_inferior): Likewise.
12321 * remote-sim.c (gdbsim_create_inferior): Likewise.
12322 * remote.c (extended_remote_run): Update code to accept
12323 "std::string" as argument.
12324 (extended_remote_create_inferior): Rewrite function prototype in
12325 order to constify "exec_file" and accept a "std::string" for
12327 * rs6000-nat.c (super_create_inferior): Likewise.
12328 (rs6000_create_inferior): Likewise.
12329 * target.h (struct target_ops) <to_create_inferior>: Likewise.
12330 * windows-nat.c (windows_create_inferior): Likewise.
12332 2017-04-11 Pedro Alves <palves@redhat.com>
12334 * thread.c: Fix whitespace throughout.
12336 2017-04-11 Philipp Rudo <prudo@linux.vnet.ibm.com>
12338 * linux-nat.c (linux_nat_detach): Remove delete_lwp call.
12340 2017-04-11 Alan Hayward <alan.hayward@arm.com>
12342 * arm-tdep.c (arm_store_return_value): Use FP_REGISTER_SIZE
12344 2017-04-10 Sergio Durigan Junior <sergiodj@redhat.com>
12347 * osdata.c (info_osdata): Check if 'type' is an empty string
12350 2017-04-10 Pedro Alves <palves@redhat.com>
12352 * thread.c (add_thread_silent, delete_thread_1, find_thread_ptid)
12353 (ptid_to_global_thread_id, in_thread_list)
12354 (do_captured_list_thread_ids, set_resumed, set_running)
12355 (set_executing, set_stop_requested, finish_thread_state)
12356 (validate_registers_access, can_access_registers_ptid)
12357 (print_thread_info_1, switch_to_thread)
12358 (do_restore_current_thread_cleanup)
12359 (make_cleanup_restore_current_thread, thread_command)
12360 (thread_name_command): Use operator== instead of ptid_equal.
12362 2017-04-10 Pedro Alves <palves@redhat.com>
12364 * thread.c (struct current_thread_cleanup) <next>: Delete field.
12365 (current_thread_cleanup_chain): Delete.
12366 (restore_current_thread_cleanup_dtor)
12367 (make_cleanup_restore_current_thread): Remove references to
12368 current_thread_cleanup_chain.
12370 2017-04-10 Alan Hayward <alan.hayward@arm.com>
12372 * msp430-tdep.c (msp430_pseudo_register_read): Never return
12375 2017-04-10 Yao Qi <yao.qi@linaro.org>
12378 * gdbthread.h (thread_info::deletable): New method.
12379 (thread_info::incref): New method.
12380 (thread_info::decref): New method.
12381 (thread_info::refcount): Move it to private.
12382 * infrun.c (save_stop_context): Call inc_refcount.
12383 (release_stop_context_cleanup): Likewise.
12384 * thread.c (set_thread_exited): New function.
12385 (init_thread_list): Delete "tp" only it is deletable, otherwise
12386 call set_thread_exited.
12387 (delete_thread_1): Call set_thread_exited.
12388 (current_thread_cleanup) <inferior_pid>: Remove.
12389 <thread>: New field.
12390 (restore_current_thread_ptid_changed): Removed.
12391 (do_restore_current_thread_cleanup): Adjust.
12392 (restore_current_thread_cleanup_dtor): Don't call
12394 (set_thread_refcount): Use dec_refcount.
12395 (make_cleanup_restore_current_thread): Adjust.
12396 (thread_apply_all_command): Call inc_refcount.
12397 (_initialize_thread): Don't call
12398 observer_attach_thread_ptid_changed.
12400 2017-04-10 Yao Qi <yao.qi@linaro.org>
12402 * thread.c (delete_thread_1): Hoist code on marking thread as
12405 2017-04-09 Simon Marchi <simon.marchi@polymtl.ca>
12407 * windows-nat.c (windows_detach): Initialize ptid with
12410 2017-04-07 Simon Marchi <simon.marchi@ericsson.com>
12412 * unittests/ptid-selftests.c: Fix erroneous assert messages.
12414 2017-04-07 Alan Hayward <alan.hayward@arm.com>
12416 * bfin-tdep.c (BFIN_MAX_REGISTER_SIZE): Add.
12417 (bfin_pseudo_register_read): Use BFIN_MAX_REGISTER_SIZE.
12418 (bfin_pseudo_register_write): Likewise
12420 2017-04-06 Simon Marchi <simon.marchi@ericsson.com>
12422 * common/ptid.h (struct ptid): Change to...
12423 (class ptid_t): ... this.
12424 <ptid_t>: New constructors.
12425 <pid, lwp_p, lwp, tid_p, tid, is_pid, operator==, operator!=,
12426 matches>: New methods.
12427 <make_null, make_minus_one>: New static methods.
12428 <pid>: Rename to...
12430 <lwp>: Rename to...
12432 <tid>: Rename to...
12434 (ptid_build, ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal,
12435 ptid_is_pid, ptid_lwp_p, ptid_tid_p, ptid_match): Take ptid arguments
12436 as references, move comment to class ptid_t.
12437 * common/ptid.c (null_ptid, minus_one_ptid): Initialize with
12438 ptid_t static methods.
12439 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_tid,
12440 ptid_equal, ptid_is_pid, ptid_lwp_p, ptid_tid_p, ptid_match):
12441 Take ptid arguments as references, implement using ptid_t methods.
12442 * unittests/ptid-selftests.c: New file.
12443 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
12444 unittests/ptid-selftests.c.
12445 (SUBDIR_UNITTESTS_OBS): Add unittests/ptid-selftests.o.
12447 2017-04-06 Thomas Preud'homme <thomas.preudhomme@arm.com>
12449 * python/python.c (python_run_simple_file): Cast mode literal to
12450 non-const char pointer as expected by PyFile_FromString.
12452 2017-04-05 Simon Marchi <simon.marchi@ericsson.com>
12454 * common/ptid.c (ptid_lwp_p, ptid_tid_p): Remove comparison with
12455 minus_one_ptid and null_ptid.
12457 2017-04-05 Pedro Alves <palves@redhat.com>
12459 * warning.m4 (build_warnings): Remove -Wno-write-strings.
12460 * configure: Regenerate.
12462 2017-04-05 Pedro Alves <palves@redhat.com>
12464 * ada-exp.y (yyerror): Constify.
12465 * ada-lang.c (bound_name, get_selections)
12466 (ada_variant_discrim_type)
12467 (ada_variant_discrim_name, ada_value_struct_elt)
12468 (ada_lookup_struct_elt_type, is_unchecked_variant)
12469 (ada_which_variant_applies, standard_exc, ada_get_next_arg)
12470 (catch_ada_exception_command_split)
12471 (catch_ada_assert_command_split, catch_assert_command)
12472 (ada_op_name): Constify.
12473 * ada-lang.h (ada_yyerror, get_selections)
12474 (ada_variant_discrim_name, ada_value_struct_elt): Constify.
12475 * arc-tdep.c (arc_print_frame_cache): Constify.
12476 * arm-tdep.c (arm_skip_stub): Constify.
12477 * ax-gdb.c (gen_binop, gen_struct_ref_recursive, gen_struct_ref)
12478 (gen_aggregate_elt_ref): Constify.
12479 * bcache.c (print_bcache_statistics): Constify.
12480 * bcache.h (print_bcache_statistics): Constify.
12481 * break-catch-throw.c (catch_exception_command_1):
12482 * breakpoint.c (struct ep_type_description::description):
12484 (add_solib_catchpoint): Constify.
12485 (catch_fork_command_1): Add cast.
12486 (add_catch_command): Constify.
12487 * breakpoint.h (add_catch_command, add_solib_catchpoint):
12489 * bsd-uthread.c (bsd_uthread_state): Constify.
12490 * buildsym.c (patch_subfile_names): Constify.
12491 * buildsym.h (next_symbol_text_func, patch_subfile_names):
12493 * c-exp.y (yyerror): Constify.
12494 (token::oper): Constify.
12495 * c-lang.h (c_yyerror, cp_print_class_member): Constify.
12496 * c-varobj.c (cplus_describe_child): Constify.
12497 * charset.c (find_charset_names): Add cast.
12498 (find_charset_names): Constify array and add const_cast.
12499 * cli/cli-cmds.c (complete_command, cd_command): Constify.
12500 (edit_command): Constify.
12501 * cli/cli-decode.c (lookup_cmd): Constify.
12502 * cli/cli-dump.c (dump_memory_command, dump_value_command):
12504 (struct dump_context): Constify.
12505 (add_dump_command, restore_command): Constify.
12506 * cli/cli-script.c (get_command_line): Constify.
12507 * cli/cli-script.h (get_command_line): Constify.
12508 * cli/cli-utils.c (check_for_argument): Constify.
12509 * cli/cli-utils.h (check_for_argument): Constify.
12510 * coff-pe-read.c (struct read_pe_section_data): Constify.
12511 * command.h (lookup_cmd): Constify.
12512 * common/print-utils.c (decimal2str): Constify.
12513 * completer.c (gdb_print_filename): Constify.
12514 * corefile.c (set_gnutarget): Constify.
12515 * cp-name-parser.y (yyerror): Constify.
12516 * cp-valprint.c (cp_print_class_member): Constify.
12517 * cris-tdep.c (cris_register_name, crisv32_register_name):
12519 * d-exp.y (yyerror): Constify.
12520 (struct token::oper): Constify.
12521 * d-lang.h (d_yyerror): Constify.
12522 * dbxread.c (struct header_file_location::name): Constify.
12523 (add_old_header_file, add_new_header_file, last_function_name)
12524 (dbx_next_symbol_text, add_bincl_to_list)
12525 (find_corresponding_bincl_psymtab, set_namestring)
12526 (find_stab_function_addr, read_dbx_symtab, start_psymtab)
12527 (dbx_end_psymtab, read_ofile_symtab, process_one_symbol):
12528 * defs.h (command_line_input, print_address_symbolic)
12529 (deprecated_readline_begin_hook): Constify.
12530 * dwarf2read.c (anonymous_struct_prefix, dwarf_bool_name):
12532 * event-top.c (handle_line_of_input): Constify and add cast.
12533 * exceptions.c (catch_errors): Constify.
12534 * exceptions.h (catch_errors): Constify.
12535 * expprint.c (print_subexp_standard, op_string, op_name)
12536 (op_name_standard, dump_raw_expression, dump_raw_expression):
12537 * expression.h (op_name, op_string, dump_raw_expression):
12539 * f-exp.y (yyerror): Constify.
12540 (struct token::oper): Constify.
12541 (struct f77_boolean_val::name): Constify.
12542 * f-lang.c (f_word_break_characters): Constify.
12543 * f-lang.h (f_yyerror): Constify.
12544 * fork-child.c (fork_inferior): Add cast.
12545 * frv-tdep.c (struct gdbarch_tdep::register_names): Constify.
12546 (new_variant): Constify.
12547 * gdbarch.sh (pstring_ptr, pstring_list): Constify.
12548 * gdbarch.c: Regenerate.
12549 * gdbcore.h (set_gnutarget): Constify.
12550 * go-exp.y (yyerror): Constify.
12551 (token::oper): Constify.
12552 * go-lang.h (go_yyerror): Constify.
12553 * go32-nat.c (go32_sysinfo): Constify.
12554 * guile/scm-breakpoint.c (gdbscm_breakpoint_expression): Constify.
12555 * guile/scm-cmd.c (cmdscm_function): Constify.
12556 * guile/scm-param.c (pascm_param_value): Constify.
12557 * h8300-tdep.c (h8300_register_name, h8300s_register_name)
12558 (h8300sx_register_name): Constify.
12559 * hppa-tdep.c (hppa32_register_name, hppa64_register_name):
12561 * ia64-tdep.c (ia64_register_names): Constify.
12562 * infcmd.c (construct_inferior_arguments): Constify.
12563 (path_command, attach_post_wait): Constify.
12564 * language.c (show_range_command, show_case_command)
12565 (unk_lang_error): Constify.
12566 * language.h (language_defn::la_error)
12567 (language_defn::la_name_of_this): Constify.
12568 * linespec.c (decode_line_2): Constify.
12569 * linux-thread-db.c (thread_db_err_str): Constify.
12570 * lm32-tdep.c (lm32_register_name): Constify.
12571 * m2-exp.y (yyerror): Constify.
12572 * m2-lang.h (m2_yyerror): Constify.
12573 * m32r-tdep.c (m32r_register_names): Constify and make static.
12574 * m68hc11-tdep.c (m68hc11_register_names): Constify.
12575 * m88k-tdep.c (m88k_register_name): Constify.
12576 * macroexp.c (appendmem): Constify.
12577 * mdebugread.c (fdr_name, add_data_symbol, parse_type)
12578 (upgrade_type, parse_external, parse_partial_symbols)
12579 (mdebug_next_symbol_text, cross_ref, mylookup_symbol, new_psymtab)
12580 (new_symbol): Constify.
12581 * memattr.c (mem_info_command): Constify.
12582 * mep-tdep.c (register_name_from_keyword): Constify.
12583 * mi/mi-cmd-env.c (mi_cmd_env_path, _initialize_mi_cmd_env):
12585 * mi/mi-cmd-stack.c (list_args_or_locals): Constify.
12586 * mi/mi-cmd-var.c (mi_cmd_var_show_attributes): Constify.
12587 * mi/mi-main.c (captured_mi_execute_command): Constify and add
12589 (mi_execute_async_cli_command): Constify.
12590 * mips-tdep.c (mips_register_name): Constify.
12591 * mn10300-tdep.c (register_name, mn10300_generic_register_name)
12592 (am33_register_name, am33_2_register_name)
12593 * moxie-tdep.c (moxie_register_names): Constify.
12594 * nat/linux-osdata.c (osdata_type): Constify fields.
12595 * nto-tdep.c (nto_parse_redirection): Constify.
12596 * objc-lang.c (lookup_struct_typedef, lookup_objc_class)
12597 (lookup_child_selector): Constify.
12598 (objc_methcall::name): Constify.
12599 * objc-lang.h (lookup_objc_class, lookup_child_selector)
12600 (lookup_struct_typedef): Constify.
12601 * objfiles.c (pc_in_section): Constify.
12602 * objfiles.h (pc_in_section): Constify.
12603 * p-exp.y (struct token::oper): Constify.
12604 (yyerror): Constify.
12605 * p-lang.h (pascal_yyerror): Constify.
12606 * parser-defs.h (op_name_standard): Constify.
12607 (op_print::string): Constify.
12608 (exp_descriptor::op_name): Constify.
12609 * printcmd.c (print_address_symbolic): Constify.
12610 * psymtab.c (print_partial_symbols): Constify.
12611 * python/py-breakpoint.c (stop_func): Constify.
12612 (bppy_get_expression): Constify.
12613 * python/py-cmd.c (cmdpy_completer::name): Constify.
12614 (cmdpy_function): Constify.
12615 * python/py-event.c (evpy_add_attribute)
12616 (gdbpy_initialize_event_generic): Constify.
12617 * python/py-event.h (evpy_add_attribute)
12618 (gdbpy_initialize_event_generic): Constify.
12619 * python/py-evts.c (add_new_registry): Constify.
12620 * python/py-finishbreakpoint.c (outofscope_func): Constify.
12621 * python/py-framefilter.c (get_py_iter_from_func): Constify.
12622 * python/py-inferior.c (get_buffer): Add cast.
12623 * python/py-param.c (parm_constant::name): Constify.
12624 * python/py-unwind.c (fprint_frame_id): Constify.
12625 * python/python.c (gdbpy_parameter_value): Constify.
12626 * remote-fileio.c (remote_fio_func_map): Make 'name' const.
12627 * remote.c (memory_packet_config::name): Constify.
12628 (show_packet_config_cmd, remote_write_bytes)
12629 (remote_buffer_add_string):
12630 * reverse.c (exec_reverse_once): Constify.
12631 * rs6000-tdep.c (variant::name, variant::description): Constify.
12632 * rust-exp.y (rustyyerror): Constify.
12633 * rust-lang.c (rust_op_name): Constify.
12634 * rust-lang.h (rustyyerror): Constify.
12635 * serial.h (serial_ops::name): Constify.
12636 * sh-tdep.c (sh_sh_register_name, sh_sh3_register_name)
12637 (sh_sh3e_register_name, sh_sh2e_register_name)
12638 (sh_sh2a_register_name, sh_sh2a_nofpu_register_name)
12639 (sh_sh_dsp_register_name, sh_sh3_dsp_register_name)
12640 (sh_sh4_register_name, sh_sh4_nofpu_register_name)
12641 (sh_sh4al_dsp_register_name): Constify.
12642 * sh64-tdep.c (sh64_register_name): Constify.
12643 * solib-darwin.c (lookup_symbol_from_bfd): Constify.
12644 * spu-tdep.c (spu_register_name, info_spu_dma_cmdlist): Constify.
12645 * stabsread.c (patch_block_stabs, read_type_number)
12646 (ref_map::stabs, ref_add, process_reference)
12647 (symbol_reference_defined, define_symbol, define_symbol)
12648 (error_type, read_type, read_member_functions, read_cpp_abbrev)
12649 (read_one_struct_field, read_struct_fields, read_baseclasses)
12650 (read_tilde_fields, read_struct_type, read_array_type)
12651 (read_enum_type, read_sun_builtin_type, read_sun_floating_type)
12652 (read_huge_number, read_range_type, read_args, common_block_start)
12653 (find_name_end): Constify.
12654 * stabsread.h (common_block_start, define_symbol)
12655 (process_one_symbol, symbol_reference_defined, ref_add):
12656 * symfile.c (get_section_index, add_symbol_file_command):
12657 * symfile.h (get_section_index): Constify.
12658 * target-descriptions.c (tdesc_type::name): Constify.
12659 (tdesc_free_type): Add cast.
12660 * target.c (find_default_run_target):
12661 (add_deprecated_target_alias, find_default_run_target)
12662 (target_announce_detach): Constify.
12663 (do_option): Constify.
12664 * target.h (add_deprecated_target_alias): Constify.
12665 * thread.c (print_thread_info_1): Constify.
12666 * top.c (deprecated_readline_begin_hook, command_line_input):
12668 (init_main): Add casts.
12669 * top.h (handle_line_of_input): Constify.
12670 * tracefile-tfile.c (tfile_write_uploaded_tsv): Constify.
12671 * tracepoint.c (tvariables_info_1, trace_status_mi): Constify.
12672 (tfind_command): Rename to ...
12673 (tfind_command_1): ... this and constify.
12674 (tfind_command): New function.
12675 (tfind_end_command, tfind_start_command): Adjust.
12676 (encode_source_string): Constify.
12677 * tracepoint.h (encode_source_string): Constify.
12678 * tui/tui-data.c (tui_partial_win_by_name): Constify.
12679 * tui/tui-data.h (tui_partial_win_by_name): Constify.
12680 * tui/tui-source.c (tui_set_source_content_nil): Constify.
12681 * tui/tui-source.h (tui_set_source_content_nil): Constify.
12682 * tui/tui-win.c (parse_scrolling_args): Constify.
12683 * tui/tui-windata.c (tui_erase_data_content): Constify.
12684 * tui/tui-windata.h (tui_erase_data_content): Constify.
12685 * tui/tui-winsource.c (tui_erase_source_content): Constify.
12686 * tui/tui.c (tui_enable): Add cast.
12687 * utils.c (defaulted_query): Constify.
12688 (init_page_info): Add cast.
12689 (puts_debug, subset_compare): Constify.
12690 * utils.h (subset_compare): Constify.
12691 * varobj.c (varobj_format_string): Constify.
12692 * varobj.h (varobj_format_string): Constify.
12693 * vax-tdep.c (vax_register_name): Constify.
12694 * windows-nat.c (windows_detach): Constify.
12695 * xcoffread.c (process_linenos, xcoff_next_symbol_text): Constify.
12696 * xml-support.c (gdb_xml_end_element): Constify.
12697 * xml-tdesc.c (tdesc_start_reg): Constify.
12698 * xstormy16-tdep.c (xstormy16_register_name): Constify.
12699 * xtensa-tdep.c (xtensa_find_register_by_name): Constify.
12700 * xtensa-tdep.h (xtensa_register_t::name): Constify.
12702 2017-04-05 Pedro Alves <palves@redhat.com>
12704 * proc-api.c (struct trans): Constify.
12705 (procfs_note): Constify.
12706 * proc-events.c (struct trans, syscall_table):
12707 * proc-flags.c (struct trans): Constify.
12708 * proc-utils.h (procfs_note): Constify.
12709 * proc-why.c (struct trans): Constify.
12710 * procfs.c (dead_procinfo, find_syscall, proc_warn, proc_error)
12711 (procfs_detach): Constify.
12712 * sol-thread.c (struct string_map): Constify.
12713 (td_err_string, td_state_string): Constify.
12715 2017-04-05 Pedro Alves <palves@redhat.com>
12717 * proc-api.c (procfs_filename): Don't initialize
12719 (prepare_to_trace): Assume procfs_filename is non-NULL.
12720 (_initialize_proc_api): Give procfs_filename a default value here.
12722 2017-04-05 Pedro Alves <palves@redhat.com>
12724 * break-catch-throw.c (handle_gnu_v3_exceptions): Constify
12725 'cond_string' parameter.
12726 (extract_exception_regexp): Constify 'string' parameter.
12727 (catch_exception_command_1): Constify.
12728 * breakpoint.c (init_catchpoint)
12729 (create_fork_vfork_event_catchpoint): Constify 'cond_string'
12731 (ep_parse_optional_if_clause, catch_fork_command_1)
12732 (catch_exec_command_1): Constify.
12733 * breakpoint.h (init_catchpoint): Constify 'cond_string'
12735 (ep_parse_optional_if_clause): Constify.
12736 * cli/cli-utils.c (remove_trailing_whitespace)
12737 (check_for_argument): Constify.
12738 * cli/cli-utils.h (remove_trailing_whitespace): Constify and add
12739 non-const overload.
12740 (check_for_argument): Likewise.
12742 2017-04-05 Pedro Alves <palves@redhat.com>
12744 * event-top.c (command_line_handler): Add cast to execute_command
12746 * record-btrace.c (cmd_record_btrace_bts_start)
12747 (cmd_record_btrace_pt_start, cmd_record_btrace_start)
12748 (cmd_record_btrace_start): Add cast to execute_command call.
12749 * record-full.c (record_full_goto_insn):
12750 * record.c (record_start, record_stop): Add cast to
12751 execute_command_to_string calls.
12752 (cmd_record_start): Add cast to execute_command calls.
12754 2017-04-05 Pedro Alves <palves@redhat.com>
12756 * python/python-internal.h (gdb_PyArg_ParseTupleAndKeywords): New
12757 static inline function.
12758 * python/py-arch.c (archpy_disassemble): Constify 'keywords'
12759 array and use gdb_PyArg_ParseTupleAndKeywords.
12760 * python/py-cmd.c (cmdpy_init): Likewise.
12761 * python/py-finishbreakpoint.c (bpfinishpy_init): Likewise.
12762 * python/py-inferior.c (infpy_read_memory, infpy_write_memory)
12763 (infpy_search_memory): Likewise.
12764 * python/py-objfile.c (objfpy_add_separate_debug_file)
12765 (gdbpy_lookup_objfile): Likewise.
12766 * python/py-symbol.c (gdbpy_lookup_symbol)
12767 (gdbpy_lookup_global_symbol): Likewise.
12768 * python/py-type.c (gdbpy_lookup_type): Likewise.
12769 * python/py-value.c (valpy_lazy_string, valpy_string): Likewise.
12770 * python/python.c (execute_gdb_command, gdbpy_write, gdbpy_flush):
12773 2017-04-05 Pedro Alves <palves@redhat.com>
12775 * python/python-internal.h (gdb_PyGetSetDef): New type.
12776 * python/py-block.c (block_object_getset)
12777 (breakpoint_object_getset): Now a gdb_PyGetSetDef array.
12778 * python/py-event.c (event_object_getset)
12779 (finish_breakpoint_object_getset): Likewise.
12780 * python/py-inferior.c (inferior_object_getset): Likewise.
12781 * python/py-infthread.c (thread_object_getset): Likewise.
12782 * python/py-lazy-string.c (lazy_string_object_getset): Likewise.
12783 * python/py-linetable.c (linetable_entry_object_getset): Likewise.
12784 * python/py-objfile.c (objfile_getset): Likewise.
12785 * python/py-progspace.c (pspace_getset): Likewise.
12786 * python/py-record-btrace.c (btpy_insn_getset, btpy_call_getset):
12788 * python/py-record.c (recpy_record_getset): Likewise.
12789 * python/py-symbol.c (symbol_object_getset): Likewise.
12790 * python/py-symtab.c (symtab_object_getset, sal_object_getset):
12792 * python/py-type.c (type_object_getset, field_object_getset):
12794 * python/py-value.c (value_object_getset): Likewise.
12796 2017-04-05 Pedro Alves <palves@redhat.com>
12798 * python/python-internal.h (gdb_PyObject_CallMethod)
12799 (gdb_PyErr_NewException, gdb_PySys_GetObject, gdb_PySys_SetPath):
12801 (GDB_PYSYS_SETPATH_CHAR, PyObject_CallMethod, PyErr_NewException)
12802 (PySys_GetObject, PySys_SetPath): New macros.
12804 2017-04-05 Pedro Alves <palves@redhat.com>
12806 * mi/mi-cmd-info.c (mi_cmd_info_os): Call info_osdata instead of
12807 info_osdata_command.
12808 * osdata.c (info_osdata_command): Rename to ...
12809 (info_osdata): ... this. Constify 'type' parameter, and remove
12810 the 'from_tty' parameter. Accept NULL TYPE.
12811 (info_osdata_command): New function.
12812 * osdata.h (info_osdata_command): Remove declaration.
12813 (info_osdata): New declaration.
12815 2017-04-05 Pedro Alves <palves@redhat.com>
12817 * mi/mi-cmd-break.c (mi_cmd_break_insert_1, mi_cmd_break_insert)
12818 (mi_cmd_dprintf_insert, mi_cmd_break_passcount)
12819 (mi_cmd_break_watch, mi_cmd_break_commands): Constify 'command'
12821 * mi/mi-cmd-catch.c (mi_cmd_catch_assert, mi_cmd_catch_exception)
12822 (mi_cmd_catch_load, mi_cmd_catch_unload): Constify cmd' parameter.
12823 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Constify 'command'
12825 * mi/mi-cmd-env.c (mi_cmd_env_pwd, mi_cmd_env_cd, mi_cmd_env_path)
12826 (mi_cmd_env_dir, mi_cmd_inferior_tty_set, _cmd_inferior_tty_show)
12827 * mi/mi-cmd-file.c (mi_cmd_file_list_exec_source_file)
12828 (mi_cmd_file_list_exec_source_files)
12829 (mi_cmd_file_list_shared_libraries): Constify 'command' parameter.
12830 * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions)
12831 (mi_cmd_info_gdb_mi_command, mi_cmd_info_os): Constify 'command'
12833 * mi/mi-cmd-stack.c (mi_cmd_enable_frame_filters)
12834 (mi_cmd_stack_list_frames, mi_cmd_stack_info_depth)
12835 (mi_cmd_stack_list_locals, mi_cmd_stack_list_args)
12836 (mi_cmd_stack_list_variables, mi_cmd_stack_select_frame)
12837 (mi_cmd_stack_info_frame): Constify 'command' parameter.
12838 * mi/mi-cmd-target.c (mi_cmd_target_file_get)
12839 (mi_cmd_target_file_put, mi_cmd_target_file_delete): Constify
12840 'command' parameter.
12841 * mi/mi-cmd-var.c (mi_cmd_var_create, mi_cmd_var_delete)
12842 (mi_cmd_var_set_format, mi_cmd_var_set_visualizer)
12843 (mi_cmd_var_set_frozen, mi_cmd_var_show_format)
12844 (mi_cmd_var_info_num_children, mi_cmd_var_list_children)
12845 (mi_cmd_var_info_type, mi_cmd_var_info_path_expression)
12846 (mi_cmd_var_info_expression, mi_cmd_var_show_attributes)
12847 (mi_cmd_var_evaluate_expression, mi_cmd_var_assign)
12848 (mi_cmd_var_update, mi_cmd_enable_pretty_printing)
12849 (mi_cmd_var_set_update_range): Constify 'command' parameter.
12850 * mi/mi-cmds.h (mi_cmd_argv_ftype): Constify 'command' parameter.
12851 * mi/mi-interp.c (mi_cmd_interpreter_exec): Constify 'command'
12853 * mi/mi-main.c (mi_cmd_gdb_exit, mi_cmd_exec_next)
12854 (mi_cmd_exec_next_instruction, mi_cmd_exec_step)
12855 (mi_cmd_exec_step_instruction, mi_cmd_exec_finish)
12856 (mi_cmd_exec_return ,mi_cmd_exec_jump, mi_cmd_exec_continue)
12857 (mi_cmd_exec_interrupt, mi_cmd_exec_run, mi_cmd_target_detach)
12858 (mi_cmd_target_flash_erase, mi_cmd_thread_select)
12859 (mi_cmd_thread_list_ids, mi_cmd_thread_info)
12860 (mi_cmd_list_thread_groups, mi_cmd_data_list_register_names)
12861 (mi_cmd_data_list_changed_registers)
12862 (mi_cmd_data_write_register_values)
12863 (mi_cmd_data_evaluate_expression, mi_cmd_data_read_memory)
12864 (mi_cmd_data_read_memory_bytes, mi_cmd_data_write_memory)
12865 (mi_cmd_data_write_memory_bytes, mi_cmd_enable_timings)
12866 (mi_cmd_list_features, mi_cmd_list_target_features)
12867 (mi_cmd_add_inferior, mi_cmd_remove_inferior)
12868 (mi_cmd_trace_define_variable, mi_cmd_trace_list_variables)
12869 (mi_cmd_trace_find, mi_cmd_trace_save, mi_cmd_trace_start)
12870 (mi_cmd_trace_status, mi_cmd_trace_stop, mi_cmd_ada_task_info)
12871 (mi_cmd_trace_frame_collected): Constify 'command'
12873 * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Constify
12874 'command' parameter.
12876 2017-04-05 Pedro Alves <palves@redhat.com>
12878 * ada-lang.c (ada_completer_word_break_characters): Now a const
12880 (ada_get_gdb_completer_word_break_characters): Constify.
12881 * completer.c (gdb_completer_command_word_break_characters)
12882 (gdb_completer_file_name_break_characters)
12883 (gdb_completer_quote_characters): Now const arrays.
12884 (get_gdb_completer_quote_characters): Constify.
12885 (set_rl_completer_word_break_characters): New function.
12886 (set_gdb_completion_word_break_characters)
12887 (complete_line_internal): Use it.
12888 * completer.h (get_gdb_completer_quote_characters): Constify.
12889 (set_rl_completer_word_break_characters): Declare.
12890 * f-lang.c (f_word_break_characters): Constify.
12891 * language.c (default_word_break_characters): Constify.
12892 * language.h (language_defn::la_word_break_characters): Constify.
12893 (default_word_break_characters): Constify.
12894 * top.c (init_main): Use set_rl_completer_word_break_characters.
12896 2017-04-05 Pedro Alves <palves@redhat.com>
12898 * aix-thread.c (aix_thread_pid_to_str)
12899 (aix_thread_extra_thread_info): Constify.
12900 * bsd-kvm.c (bsd_kvm_pid_to_str): Constify.
12901 * bsd-uthread.c (bsd_uthread_extra_thread_info)
12902 (bsd_uthread_pid_to_str): Constify.
12903 * corelow.c (core_pid_to_str): Constify.
12904 * darwin-nat.c (darwin_pid_to_str): Constify.
12905 * fbsd-nat.c (fbsd_pid_to_str): Constify.
12906 * fbsd-tdep.c (fbsd_core_pid_to_str, gdbarch_core_pid_to_str):
12908 * gnu-nat.c (gnu_pid_to_str): Constify.
12909 * go32-nat.c (go32_pid_to_str): Constify.
12910 * i386-cygwin-tdep.c (i386_windows_core_pid_to_str): Constify.
12911 * inf-ptrace.c (inf_ptrace_pid_to_str): Constify.
12912 * inferior.c (inferior_pid_to_str): Constify.
12913 * linux-nat.c (linux_nat_pid_to_str): Constify.
12914 * linux-tdep.c (linux_core_pid_to_str): Constify.
12915 * linux-thread-db.c (thread_db_pid_to_str)
12916 (thread_db_extra_thread_info): Constify.
12917 * nto-tdep.c (nto_extra_thread_info): Constify.
12918 * nto-tdep.h (nto_extra_thread_info): Constify.
12919 * obsd-nat.c (obsd_pid_to_str): Constify.
12920 * procfs.c (procfs_pid_to_str): Constify.
12921 * ravenscar-thread.c (ravenscar_extra_thread_info)
12922 (ravenscar_pid_to_str): Constify.
12923 * remote-sim.c (gdbsim_pid_to_str): Constify.
12924 * remote.c (remote_threads_extra_info, remote_pid_to_str):
12926 * sol-thread.c (solaris_pid_to_str): Constify.
12927 * sol2-tdep.c (sol2_core_pid_to_str): Constify.
12928 * sol2-tdep.h (sol2_core_pid_to_str): Constify.
12929 * target.c (default_pid_to_str, target_pid_to_str)
12930 (normal_pid_to_str, default_pid_to_str): Constify.
12931 * target.h (target_ops::to_pid_to_str)
12932 (target_ops::to_extra_thread_info): Constify.
12933 (target_pid_to_str, normal_pid_to_str): Constify.
12934 * windows-nat.c (windows_pid_to_str): Constify.
12935 * gdbarch.sh (core_pid_to_str): Constify.
12936 * target-delegates.c: Regenerate.
12937 * gdbarch.h, gdbarch.c: Regenerate.
12939 2017-04-05 Pedro Alves <palves@redhat.com>
12941 * main.c (captured_main_1): Use gdb::unique_xmalloc_ptr to manage
12942 the memory of the temporary warning_pre_print override.
12943 * utils.c (warning_pre_print): Constify.
12944 * utils.h (warning_pre_print): Constify.
12946 2017-04-05 Pedro Alves <palves@redhat.com>
12948 * cli/cli-cmds.c (shell_escape): Constify 'arg' parameter.
12949 (shell_command): New function.
12950 (make_command): Use std::string.
12951 (init_cli_cmds): Register shell_command instead of shell_escape.
12953 2017-04-05 Pedro Alves <palves@redhat.com>
12955 * breakpoint.c (dprintf_function, dprintf_channel): Don't initialize.
12956 * tracepoint.c (default_collect): Don't initialize.
12958 2017-04-05 Pedro Alves <palves@redhat.com>
12960 * macroexp.c (macro_buffer::shared): Now a bool.
12961 (init_buffer): Update.
12962 (init_shared_buffer): Constify 'addr' parameter.
12963 (substitute_args, expand, macro_expand, macro_expand_next): Remove
12966 2017-04-05 Pedro Alves <palves@redhat.com>
12968 * arm-tdep.c (show_disassembly_style_sfunc): Constify local.
12969 * disasm.c (set_disassembler_options): Constify local.
12970 * i386-tdep.c (i386_print_insn): Remove cast and FIXME comment.
12972 2017-04-05 Sergio Durigan Junior <sergiodj@redhat.com>
12975 * tracefile.c (tsave_command): Fix argument parsing for '-r'
12978 2017-04-05 Yao Qi <yao.qi@linaro.org>
12980 * frame.c (frame_unwind_register_unsigned): Call
12981 frame_unwind_register_value.
12983 2017-04-05 Yao Qi <yao.qi@linaro.org>
12985 * gdb.threads/thread-specific-bp.exp (check_thread_specific_breakpoint):
12986 Use gdb_test_multiple, and don't match anchor.
12988 2017-04-05 Pedro Alves <palves@redhat.com>
12990 * MAINTAINERS (Global Maintainers): Add Simon Marchi.
12991 (Write After Approval): Remove Simon Marchi.
12993 2017-04-05 Pedro Alves <palves@redhat.com>
12995 * common/gdb_optional.h (optional::optional): Make constexpr and
12996 initialize m_dummy.
12998 2017-04-04 John Baldwin <jhb@FreeBSD.org>
13000 * amd64-fbsd-tdep.c: Remove "bsd-uthread.h" include.
13001 (amd64fbsd_jmp_buf_reg_offset): Remove.
13002 (amd64fbsd_supply_uthread): Remove function.
13003 (amd64fbsd_collect_uthread): Remove function.
13004 (amd64fbsd_init_abi): Don't set bsd-uthread callbacks.
13005 * configure.tgt (i[34567]86-*-freebsd*): Remove bsd-uthread.o.
13006 (x86_64-*-freebsd*): Remove bsd-uthread.o.
13007 (fbsd-nat.c): Update comment.
13008 * i386-fbsd-tdep.c: Remove "bsd-uthread.h" include.
13009 (i386fbsd_jmp_buf_reg_offset): Remove.
13010 (i386fbsd_supply_uthread): Remove function.
13011 (i386fbsd_collect_uthread): Remove function.
13012 (i386fbsd_init_abi): Don't set bsd-uthread callbacks.
13014 2017-04-04 John Baldwin <jhb@FreeBSD.org>
13016 * Makefile.in (ALL_64_TARGET_OBS): Remove alpha-fbsd-tdep.o.
13017 (ALLDEPFILES): Remove alpha-fbsd-tdep.c
13018 * NEWS: Mention that support for FreeBSD/alpha was removed.
13019 * alpha-fbsd-tdep.c: Delete file.
13020 * config/alpha/fbsd.mh: Delete file.
13021 * configure.host: Delete alpha*-*-freebsd* and
13022 alpha*-*-kfreebsd*-gnu.
13023 * configure.tgt: Delete alpha*-*-freebsd* and
13024 alpha*-*-kfreebsd*-gnu.
13026 2017-04-04 John Baldwin <jhb@FreeBSD.org>
13028 * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers,
13029 amd64bsd_store_inferior_registers): Use ptid from regcache.
13031 2017-04-04 Pedro Alves <palves@redhat.com>
13033 * dwarf2read.c (lnp_state_machine): Now a class. Initialize all
13034 data fields, make them private and add "m_" prefixes.
13035 (lnp_state_machine::lnp_state_machine): New ctor.
13036 (record_line, check_line_address, handle_set_discriminator)
13037 (handle_set_address, handle_advance_pc, handle_special_opcode)
13038 (handle_advance_line, handle_set_file, handle_negate_stmt)
13039 (handle_const_add_pc, handle_fixed_advance_pc, handle_copy)
13040 (end_sequence, advance_line): New methods.
13041 (m_gdbarch, m_record_lines_p): New fields.
13042 (lnp_reader_state): Delete.
13043 (dwarf_record_line): Rename to ...
13044 (lnp_state_machine::record_line): ... adjust.
13045 (init_lnp_state_machine): Delete.
13046 (lnp_state_machine::lnp_state_machine): New.
13047 (check_line_address): Rename to ...
13048 (lnp_state_machine::check_line_address): This.
13049 (dwarf_decode_lines_1): Remove reference to "reader_state".
13050 Adjust lnp_state_machine having a non-default ctor. Use bool.
13051 State machine internal state manipulation moved to
13052 lnp_state_machine methods.
13054 2017-04-04 Pedro Alves <palves@redhat.com>
13056 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
13057 unittests/offset-type-selftests.c.
13058 (SUBDIR_UNITTESTS_OBS): Add offset-type-selftests.o.
13059 * common/offset-type.h: New file.
13060 * common/preprocessor.h: New file.
13061 * common/traits.h: New file.
13062 * common/valid-expr.h: New file.
13063 * dwarf2expr.c: Include "common/underlying.h". Adjust to use
13064 sect_offset and cu_offset strong typedefs throughout.
13065 * dwarf2expr.h: Adjust to use sect_offset and cu_offset strong
13066 typedefs throughout.
13067 * dwarf2loc.c: Include "common/underlying.h". Adjust to use
13068 sect_offset and cu_offset strong typedefs throughout.
13069 * dwarf2read.c: Adjust to use sect_offset and cu_offset strong
13070 typedefs throughout.
13071 * gdbtypes.h: Include "common/offset-type.h".
13072 (cu_offset): Now an offset type (strong typedef) instead of a
13074 (sect_offset): Likewise.
13075 (union call_site_parameter_u): Rename "param_offset" field to
13077 * unittests/offset-type-selftests.c: New file.
13079 2017-04-04 Pedro Alves <palves@redhat.com>
13081 * common/underlying.h: New file.
13082 * dwarf2read.c: Include "common/gdb_optional.h" and
13083 "common/underlying.h".
13084 (dir_index, file_name_index): New types.
13085 (file_entry): Use them.
13086 (file_entry::include): Use to_underlying.
13087 (line_header::add_file_name): Use dir_index.
13088 (read_formatted_entries): Use gdb::optional. Read form before
13089 writting to file_entry.
13090 (dwarf_decode_line_header): Use dir_index.
13091 (lnp_state_machine::current_file): Use to_underlying.
13092 (lnp_state_machine::file): Change type to file_name_index.
13093 (dwarf_record_line): Use to_underlying.
13094 (init_lnp_state_machine): Use file_name_index.
13095 (dwarf_decode_lines_1): Use dir_index and file_name_index.
13097 2017-04-04 Pedro Alves <palves@redhat.com>
13099 * common/gdb_optional.h (gdb::optiona): Add operator->, operator*,
13100 operator bool, has_value and get methods.
13102 2017-04-04 Pedro Alves <palves@redhat.com>
13104 * dwarf2read.c (struct file_entry): Add ctors, and initialize all
13106 (line_header): Initialize all data fields. Change type of
13107 standard_opcode_lengths to std::unique_ptr<unsigned char[]>.
13108 Change type of include_dirs to std::vector<const char *>. Remove
13109 num_include_dirs, include_dirs_size. Change type of file_names to
13110 std::vector<file_entry>. Remove num_file_names, file_names_size.
13111 (line_header::line_header): New.
13112 (line_header::add_include_dir, line_header::add_file_name): New
13114 (line_header::include_dir_at): Remove NULL check.
13115 (line_header::file_name_at): Add const overload.
13116 (line_header_up): New unique_ptr typedef.
13117 (dw2_get_file_names_reader): Use line_header_up. Adjust to use
13118 std::vector. Remove free_line_header call.
13119 (dwarf2_build_include_psymtabs): Use line_header_up. Remove
13120 free_line_header call.
13121 (free_cu_line_header): Delete.
13122 (handle_DW_AT_stmt_list, handle_DW_AT_stmt_list)
13123 (setup_type_unit_groups): Use line_header_up instead of cleanups.
13124 Adjust to use std::vector.
13125 (free_line_header): Delete.
13126 (free_line_header_voidp): Use delete.
13127 (add_include_dir): Replace with ...
13128 (line_header::add_include_dir): ... this method. Use std::vector.
13129 (add_file_name): Replace with ...
13130 (line_header::add_file_name): ... this method. Use std::vector.
13131 (add_include_dir_stub): Delete.
13132 (read_formatted_entries): Remove memset.
13133 (dwarf_decode_line_header): Return a line_header_up instead of a
13134 raw pointer. Remove cleanup handling. Pass lambdas to
13135 read_formatted_entries. Adjust to use line_header methods.
13136 (dwarf_decode_lines_1): Adjust to use line_header methods.
13137 (dwarf_decode_lines, file_file_name, file_full_name): Adjust to
13140 2017-04-04 Simon Marchi <simon.marchi@polymtl.ca>
13142 * remote.c (set_general_thread, set_continue_thread): Use ptid_t
13143 instead of struct ptid.
13145 2017-05-04 Alan Hayward <alan.hayward@arm.com>
13147 * frame.c (get_frame_register_bytes): Unwind using value.
13148 (put_frame_register_bytes): Likewise.
13150 2017-03-30 Iain Buclaw <ibuclaw@gdcproject.org>
13152 * d-exp.y (type_aggregate_p): Treat TYPE_CODE_MODULE as being
13155 2017-03-29 Jan Kratochvil <jan.kratochvil@redhat.com>
13157 * auto-load.c (auto_load_section_scripts): Check SEC_HAS_CONTENTS.
13159 2017-03-29 Yao Qi <yao.qi@linaro.org>
13161 * gdbthread.h (struct thread_info): Declare constructor and
13162 destructor. Add some in-class member initializers.
13163 * thread.c (free_thread): Remove.
13164 (init_thread_list): Call delete instead of free_thread.
13165 (new_thread): Call thread_info constructor.
13166 (thread_info::thread_info): New function.
13167 (thread_info::~thread_info): New function.
13168 (delete_thread_1): Call delete instead of free_thread.
13169 (make_cleanup_restore_current_thread): Move tp and frame to
13172 2017-03-28 Anton Kolesov <anton.kolesov@synopsys.com>
13174 * arc-tdep.c (arc_frame_cache): Add support for prologue analysis.
13175 (arc_skip_prologue): Likewise.
13176 (arc_make_frame_cache): Likewise.
13177 (arc_pv_get_operand): New function.
13178 (arc_is_in_prologue): Likewise.
13179 (arc_analyze_prologue): Likewise.
13180 (arc_print_frame_cache): Likewise.
13181 (MAX_PROLOGUE_LENGTH): New constant.
13183 2017-03-28 Anton Kolesov <anton.kolesov@synopsys.com>
13185 * configure.tgt: Add arc-insn.o.
13186 * arc-tdep.c (arc_delayed_print_insn): Make non-static.
13187 (dump_arc_instruction_command): New function.
13188 (arc_fprintf_disasm): Likewise.
13189 (arc_disassemble_info): Likewise.
13190 (arc_insn_get_operand_value): Likewise.
13191 (arc_insn_get_operand_value_signed): Likewise.
13192 (arc_insn_get_memory_base_reg): Likewise.
13193 (arc_insn_get_memory_offset): Likewise.
13194 (arc_insn_get_branch_target): Likewise.
13195 (arc_insn_dump): Likewise.
13196 (arc_insn_get_linear_next_pc): Likewise.
13197 * arc-tdep.h (arc_delayed_print_insn): Add function declaration.
13198 (arc_disassemble_info): Likewise.
13199 (arc_insn_get_branch_target): Likewise.
13200 (arc_insn_get_linear_next_pc): Likewise.
13201 * NEWS: Mention new "maint print arc arc-instruction".
13203 2017-03-28 Anton Kolesov <anton.kolesov@synopsys.com>
13205 * arc-tdep (maintenance_print_arc_list): New variable.
13206 (maintenance_print_arc_command): New function.
13208 2017-03-28 Anton Kolesov <anton.kolesov@synopsys.com>
13210 * arc-tdep.c (core_v2_register_names, core_arcompact_register_names)
13211 Add "limm" and "reserved".
13212 (arc_cannot_fetch_register, arc_cannot_store_register): Add
13213 ARC_RESERVED_REGNUM and ARC_LIMM_REGNUM.
13214 * arc-tdep.h (arc_regnum): Likewise.
13216 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
13218 * xtensa-linux-nat.c (fill_gregset): Call regcache_raw_collect
13219 for THREADPTR register.
13220 (supply_gregset_reg): Call regcache_raw_supply for THREADPTR
13222 * xtensa-tdep.c (XTENSA_DBREGN_UREG): New definition.
13223 (xtensa_derive_tdep): Initialize tdep->threadptr_regnum.
13224 * xtensa-tdep.h (gdbarch_tdep::threadptr_regnum): New field.
13226 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
13228 * xtensa-tdep.c (xtensa_pseudo_register_read): Treat all
13229 registers above gdbarch_num_regs (gdbarch) as privileged in
13232 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
13234 * xtensa-linux-nat.c (fill_gregset): Call regcache_raw_collect
13235 for a single specified register or for all registers in
13236 a0_base..a0_base + C0_NREGS range.
13237 (supply_gregset_reg): Call regcache_raw_supply for a single
13238 specified register or for all registers in a0_base..a0_base +
13241 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
13243 * arch/xtensa.h (C0_NREGS): Add definition.
13244 * xtensa-tdep.c (C0_NREGS): Remove definition.
13246 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
13248 * xtensa-tdep.c (xtensa_scan_prologue, call0_analyze_prologue):
13249 Drop xtensa_default_isa initialization.
13250 (xtensa_gdbarch_init): Initialize xtensa_default_isa.
13252 2017-03-27 Pedro Alves <palves@redhat.com>
13254 * dwarf2read.c (file_entry) <dir_index>: Add comment.
13255 (file_entry::include_dir): New method.
13256 (line_header::include_dir_at, line_header::file_name_at): New
13258 (setup_type_unit_groups, setup_type_unit_groups)
13259 (psymtab_include_file_name): Simplify using the new methods.
13260 (lnp_state_machine) <the_line_header>: New field.
13261 <file>: Add comment.
13262 (lnp_state_machine::current_file): New method.
13263 (dwarf_record_line): Simplify using the new methods.
13264 (init_lnp_state_machine): Initialize the "the_line_header" field.
13265 (dwarf_decode_lines_1, dwarf_decode_lines, file_file_name):
13266 Simplify using the new methods.
13268 2017-03-27 Pedro Alves <palves@redhat.com>
13270 * cp-name-parser.y (make_empty): Delete.
13271 (demangler_special, nested_name, ptr_operator, array_indicator)
13272 (direct_declarator, declarator_1): Use fill_comp instead of
13275 2017-03-27 Pedro Alves <palves@redhat.com>
13277 * xml-support.h (gdb_xml_debug): Pass a "first-to-check" argument
13278 to ATTRIBUTE_PRINTF.
13279 * solib-target.c (library_list_start_list): Print "string" not
13281 * xml-tdesc.c (tdesc_start_field): Pass "field_name" to
13282 gdb_xml_error call.
13284 2017-03-27 Pedro Alves <palves@redhat.com>
13286 * dwarf2read.c (struct file_and_directory): New.
13287 (dwarf2_get_dwz_file): Adjust to use std::string.
13288 (dw2_get_file_names_reader): Adjust to use file_and_directory.
13289 (find_file_and_directory): Adjust to return a file_and_directory
13291 (read_file_scope): Adjust to use file_and_directory. Remove
13292 make_cleanup/do_cleanups calls.
13293 (open_and_init_dwp_file): Adjust to use std::string. Remove
13294 make_cleanup/do_cleanups calls.
13295 * python/python.c (do_start_initialization): Adjust to ldirname
13296 returning a std::string.
13297 * utils.c (ldirname): Now returns a std::string.
13298 * utils.h (ldirname): Change return type to std::string.
13299 * xml-syscall.c (xml_init_syscalls_info): Adjust to ldirname
13300 returning a std::string.
13301 * xml-tdesc.c (file_read_description_xml): Likewise.
13303 2017-03-24 Alan Hayward <alan.hayward@arm.com>
13305 * regcache.c (regcache_debug_print_register): New function.
13306 * regcache.h (regcache_debug_print_register): New declaration.
13307 * target.c (debug_print_register): Remove.
13308 (target_fetch_registers): Call regcache_debug_print_register.
13309 (target_store_registers): Likewise.
13311 2017-03-24 Pádraig Brady <pbrady@fb.com>
13313 * dwarf2read.c (setup_type_unit_groups): Ensure dir_index doesn't
13314 reference beyond the 'lh->include_dirs' array before accessing to
13316 (psymtab_include_file_name): Likewise.
13317 (dwarf_decode_lines_1): Likewise.
13318 (dwarf_decode_lines): Likewise.
13319 (file_file_name): Likewise.
13321 2017-03-23 Simon Marchi <simon.marchi@ericsson.com>
13323 * fbsd-tdep.c (fbsd_corefile_thread): Don't set/restore
13325 * proc-service.c (ps_lgetregs, ps_lsetregs, ps_lgetfpregs,
13326 ps_lsetfpregs): Likewise.
13327 * regcache.c (regcache_raw_update, regcache_raw_write): Likewise.
13328 * sol-thread.c (ps_lgetregs, ps_lsetregs, ps_lgetfpregs,
13329 ps_lsetfpregs): Likewise.
13330 * target.c (target_fetch_registers, target_store_registers):
13333 2017-03-23 Alan Hayward <alan.hayward@arm.com>
13335 * sol-thread.c (sol_thread_store_registers): Remove regcache calls.
13337 2017-03-23 Yao Qi <yao.qi@linaro.org>
13339 * aarch64-tdep.c (aarch64_process_record_test): Declare.
13340 (_initialize_aarch64_tdep): Register it.
13341 (aarch64_record_load_store): Handle PRFM instruction.
13342 (aarch64_process_record_test): New function.
13344 2017-03-23 Yao Qi <yao.qi@linaro.org>
13346 * aarch64-tdep.c (aarch64_record_load_store): Fix code
13349 2017-03-23 Yao Qi <yao.qi@linaro.org>
13351 * aarch64-tdep.c: Remove AARCH64_RECORD_FAILURE.
13353 2017-03-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
13355 python/python.c (do_start_initialization): Fix memory leak.
13357 2017-03-22 Simon Marchi <simon.marchi@polymtl.ca>
13359 * inf-ptrace.c (inf_ptrace_xfer_partial): Get pid from ptid
13360 using get_ptrace_pid.
13361 * linux-nat.c (linux_nat_xfer_partial): Don't set/restore
13363 (linux_proc_xfer_partial, linux_proc_xfer_spu): Use lwp of
13364 inferior_ptid instead of pid.
13366 2017-03-22 Yao Qi <yao.qi@linaro.org>
13368 * aarch64-tdep.c: Wrap locally used classes in anonymous
13370 * arm-tdep.c: Likewise.
13371 * linespec.c: Likewise.
13372 * ui-out.c: Likewise.
13374 2017-03-22 Jonah Graham <jonah@kichwacoders.com>
13377 * python/lib/gdb/printer/bound_registers.py: Import sys.
13379 2017-03-21 Simon Marchi <simon.marchi@ericsson.com>
13381 * windows-nat.c (do_windows_fetch_inferior_registers): Add
13382 windows_thread_info parameter and use it instead of
13384 (windows_fetch_inferior_registers): Don't set current_thread,
13385 pass the thread to do_windows_fetch_inferior_registers. Use
13386 ptid from regcache instead of inferior_ptid.
13387 (do_windows_store_inferior_registers): Add windows_thread_info
13388 parameter and use it instead of current_thread.
13389 (windows_store_inferior_registers): Don't set current_thread,
13390 pass the thread to do_windows_store_inferior_registers. Use
13391 ptid from regcache instead of inferior_ptid.
13393 2017-03-21 Simon Marchi <simon.marchi@ericsson.com>
13395 * ser-mingw.c (ser_windows_raw): Remove reference to
13396 struct serial::current_timeout.
13398 2017-03-21 Ivo Raisr <ivo.raisr@oracle.com>
13401 * gdb/sparc-tdep.h (gdbarch_tdep) <sparc64_ccr_type>: New field.
13402 * gdb/sparc64-tdep.c (sparc64_ccr_type): New function.
13403 (sparc64_fsr_type): Fix %fsr decoding.
13405 2017-03-21 Tim Wiederhake <tim.wiederhake@intel.com>
13407 * python/py-record-btrace.c (btpy_insn_data): Change return type
13410 2017-03-20 Simon Marchi <simon.marchi@polymtl.ca>
13412 * spu-linux-nat.c (spu_fetch_inferior_registers,
13413 spu_store_inferior_registers): Use ptid from regcache, set and
13414 restore inferior_ptid.
13415 * spu-multiarch.c (spu_fetch_registers, spu_store_registers):
13418 2017-03-20 Simon Marchi <simon.marchi@polymtl.ca>
13420 * i386-linux-nat.c (fetch_register, store_register,
13421 i386_linux_fetch_inferior_registers,
13422 i386_linux_store_inferior_registers): Use ptid from regcache.
13423 * ia64-linux-nat.c (ia64_linux_fetch_register,
13424 ia64_linux_store_register): Likewise.
13425 * inf-ptrace.c (inf_ptrace_fetch_register,
13426 inf_ptrace_store_register): Likewise.
13427 * m32r-linux-nat.c (m32r_linux_fetch_inferior_registers,
13428 m32r_linux_store_inferior_registers): Likewise.
13429 * m68k-bsd-nat.c (m68kbsd_fetch_inferior_registers,
13430 m68kbsd_store_inferior_registers): Likewise.
13431 * m68k-linux-nat.c (fetch_register, store_register,
13432 m68k_linux_fetch_inferior_registers,
13433 m68k_linux_store_inferior_registers): Likewise.
13434 * m88k-bsd-nat.c (m88kbsd_fetch_inferior_registers,
13435 m88kbsd_store_inferior_registers): Likewise.
13436 * mips-fbsd-nat.c (mips_fbsd_fetch_inferior_registers,
13437 mips_fbsd_store_inferior_registers): Likewise.
13438 * mips-linux-nat.c (mips64_linux_regsets_fetch_registers,
13439 mips64_linux_regsets_store_registers): Likewise.
13440 * mips-nbsd-nat.c (mipsnbsd_fetch_inferior_registers,
13441 mipsnbsd_store_inferior_registers): Likewise.
13442 * mips-obsd-nat.c (mips64obsd_fetch_inferior_registers,
13443 mips64obsd_store_inferior_registers): Likewise.
13444 * nto-procfs.c (procfs_fetch_registers, procfs_store_registers):
13446 * ppc-fbsd-nat.c (ppcfbsd_fetch_inferior_registers,
13447 ppcfbsd_store_inferior_registers): Likewise.
13448 * ppc-linux-nat.c (ppc_linux_fetch_inferior_registers,
13449 ppc_linux_store_inferior_registers): Likewise.
13450 * ppc-nbsd-nat.c (ppcnbsd_fetch_inferior_registers,
13451 ppcnbsd_store_inferior_registers): Likewise.
13452 * ppc-obsd-nat.c (ppcobsd_fetch_registers,
13453 ppcobsd_store_registers): Likewise.
13454 * procfs.c (procfs_fetch_registers, procfs_store_registers):
13456 * ravenscar-thread.c (ravenscar_fetch_registers,
13457 ravenscar_store_registers, ravenscar_prepare_to_store):
13459 * record-btrace.c (record_btrace_fetch_registers,
13460 record_btrace_store_registers, record_btrace_prepare_to_store):
13462 * remote-sim.c (gdbsim_fetch_register, gdbsim_store_register):
13463 Lookup inferior using ptid from regcache, instead of
13465 * remote.c (remote_fetch_registers, remote_store_registers): Use
13466 ptid from regcache.
13467 * rs6000-nat.c (fetch_register, store_register): Likewise.
13468 * s390-linux-nat.c (s390_linux_fetch_inferior_registers,
13469 s390_linux_store_inferior_registers): Likewise.
13470 * sh-nbsd-nat.c (shnbsd_fetch_inferior_registers,
13471 shnbsd_store_inferior_registers): Likewise.
13472 * sol-thread.c (sol_thread_fetch_registers,
13473 sol_thread_store_registers): Likewise.
13474 * sparc-nat.c (sparc_fetch_inferior_registers,
13475 sparc_store_inferior_registers): Likewise.
13476 * tilegx-linux-nat.c (fetch_inferior_registers,
13477 store_inferior_registers): Likewise.
13478 * vax-bsd-nat.c (vaxbsd_fetch_inferior_registers,
13479 vaxbsd_store_inferior_registers): Likewise.
13480 * xtensa-linux-nat.c (fetch_gregs, store_gregs, fetch_xtregs,
13481 store_xtregs): Likewise.
13483 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
13486 * NEWS: Mention support for rvalue references in GDB and python.
13487 * doc/gdb.texinfo (C Plus Plus Expressions): Mention that GDB
13488 supports both lvalue and rvalue references.
13490 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
13493 * gdbtypes.c (rank_one_type): Implement overloading
13494 resolution rules regarding rvalue references.
13496 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
13499 * aarch64-tdep.c (aarch64_type_align)
13500 (aarch64_extract_return_value, aarch64_store_return_value): Change
13501 lvalue reference type checks to general reference type checks.
13502 * amd64-tdep.c (amd64_classify): Likewise.
13503 * amd64-windows-tdep.c (amd64_windows_passed_by_integer_register):
13505 * arm-tdep.c (arm_type_align, arm_extract_return_value)
13506 (arm_store_return_value): Likewise.
13507 * ax-gdb.c (gen_fetch, gen_cast): Likewise.
13508 * c-typeprint.c (c_print_type): Likewise.
13509 * c-varobj.c (adjust_value_for_child_access, c_value_of_variable)
13510 (cplus_number_of_children, cplus_describe_child): Likewise.
13511 * compile/compile-c-symbols.c (generate_vla_size): Likewise.
13512 * completer.c (expression_completer): Likewise.
13513 * cp-support.c (make_symbol_overload_list_adl_namespace):
13515 * darwin-nat-info.c (info_mach_region_command): Likewise.
13516 * dwarf2loc.c (entry_data_value_coerce_ref)
13517 (value_of_dwarf_reg_entry): Likewise.
13518 * eval.c (ptrmath_type_p, evaluate_subexp_standard)
13519 (evaluate_subexp_for_address, evaluate_subexp_for_sizeof):
13521 * findvar.c (extract_typed_address, store_typed_address):
13523 * gdbtypes.c (rank_one_type): Likewise.
13524 * hppa-tdep.c (hppa64_integral_or_pointer_p): Likewise.
13525 * infcall.c (value_arg_coerce): Likewise.
13526 * language.c (pointer_type): Likewise.
13527 * m32c-tdep.c (m32c_reg_arg_type, m32c_m16c_address_to_pointer):
13529 * m88k-tdep.c (m88k_integral_or_pointer_p): Likewise.
13530 * mn10300-tdep.c (mn10300_type_align): Likewise.
13531 * msp430-tdep.c (msp430_push_dummy_call): Likewise.
13532 * ppc-sysv-tdep.c (do_ppc_sysv_return_value)
13533 (ppc64_sysv_abi_push_param, ppc64_sysv_abi_return_value):
13535 * printcmd.c (print_formatted, x_command): Likewise.
13536 * python/py-type.c (typy_get_composite, typy_template_argument):
13538 * python/py-value.c (valpy_referenced_value)
13539 (valpy_get_dynamic_type, value_has_field): Likewise.
13540 * s390-linux-tdep.c (s390_function_arg_integer): Likewise.
13541 * sparc-tdep.c (sparc_integral_or_pointer_p): Likewise.
13542 * sparc64-tdep.c (sparc64_integral_or_pointer_p): Likewise.
13543 * spu-tdep.c (spu_scalar_value_p): Likewise.
13544 * symtab.c (lookup_symbol_aux): Likewise.
13545 * typeprint.c (whatis_exp, print_type_scalar): Likewise.
13546 * valarith.c (binop_types_user_defined_p, unop_user_defined_p):
13548 * valops.c (value_cast_pointers, value_cast)
13549 (value_reinterpret_cast, value_dynamic_cast, value_addr, typecmp)
13550 (value_struct_elt, value_struct_elt_bitpos)
13551 (value_find_oload_method_list, find_overload_match)
13552 (value_rtti_indirect_type): Likewise.
13553 * valprint.c (val_print_scalar_type_p, generic_val_print):
13555 * value.c (value_actual_type, value_as_address, unpack_long)
13556 (pack_long, pack_unsigned_long, coerce_ref_if_computed)
13557 (coerce_ref): Likewise.
13558 * varobj.c (varobj_get_value_type): Likewise.
13560 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
13563 * doc/python.texi (Types in Python): Add TYPE_CODE_RVALUE_REF to
13564 table of constants.
13565 * python/lib/gdb/command/explore.py: Support exploring values
13566 of rvalue reference types.
13567 * python/lib/gdb/types.py: Implement get_basic_type() for
13568 rvalue reference types.
13569 * python/py-type.c (pyty_codes) <TYPE_CODE_RVALUE_REF>: New
13571 * python/py-value.c (valpy_getitem): Add an rvalue reference
13573 (valpy_reference_value): Add new parameter "refcode".
13574 (valpy_lvalue_reference_value, valpy_rvalue_reference_value):
13575 New wrappers for valpy_reference_value().
13576 * python/py-xmethods.c (gdbpy_get_xmethod_result_type)
13577 (gdbpy_invoke_xmethod): Likewise.
13579 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
13582 * dwarf2read.c (process_die, read_type_die_1): Handle the
13583 DW_TAG_rvalue_reference_type DIE.
13584 (read_tag_reference_type): Add new parameter "refcode".
13586 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
13589 * c-typeprint.c (c_print_type, c_type_print_varspec_prefix)
13590 (c_type_print_modifier, c_type_print_varspec_suffix)
13591 (c_type_print_base): Support printing rvalue reference types.
13592 * c-valprint.c (c_val_print, c_value_print): Support printing
13593 rvalue reference values.
13595 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
13598 * cp-name-parser.y (ptr_operator): Handle the '&&' token in
13600 * cp-support.c (replace_typedefs): Handle
13601 DEMANGLE_COMPONENT_RVALUE_REFERENCE.
13602 * python/py-type.c (typy_lookup_type): Likewise.
13604 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
13607 * c-exp.y (ptr_operator): Handle the '&&' token in the typename.
13608 * parse.c (insert_type): Change assert statement.
13609 (follow_types): Handle rvalue reference types.
13610 * parser-defs.h (enum type_pieces) <tp_rvalue_reference>: New
13613 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
13616 * ada-lang.c (ada_evaluate_subexp): Adhere to the new
13617 value_ref() interface.
13618 * c-valprint.c (c_value_print): Likewise.
13619 * infcall.c (value_arg_coerce): Likewise.
13620 * python/py-value.c (valpy_reference_value): Likewise.
13621 * valops.c (value_cast, value_reinterpret_cast)
13622 (value_dynamic_cast, typecmp): Likewise.
13623 (value_ref): Parameterize by kind of return value reference type.
13624 * value.h (value_ref): Add new parameter "refcode".
13626 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
13629 * dwarf2read.c (read_tag_reference_type): Use
13630 lookup_lvalue_reference_type() instead of lookup_reference_type().
13631 * eval.c (evaluate_subexp_standard): Likewise.
13632 * f-exp.y: Likewise.
13633 * gdbtypes.c (make_reference_type, lookup_reference_type):
13634 Generalize with rvalue reference types.
13635 (lookup_lvalue_reference_type, lookup_rvalue_reference_type): New
13636 convenience wrappers for lookup_reference_type().
13637 * gdbtypes.h (make_reference_type, lookup_reference_type): Add a
13638 reference kind parameter.
13639 (lookup_lvalue_reference_type, lookup_rvalue_reference_type): Add
13640 wrappers for lookup_reference_type().
13641 * guile/scm-type.c (gdbscm_type_reference): Use
13642 lookup_lvalue_reference_type() instead of lookup_reference_type().
13643 * guile/scm-value.c (gdbscm_value_dynamic_type): Likewise.
13644 * parse.c (follow_types): Likewise.
13645 * python/py-type.c (typy_reference, typy_lookup_type): Likewise.
13646 * python/py-value.c (valpy_get_dynamic_type, valpy_getitem):
13648 * python/py-xmethods.c (gdbpy_get_xmethod_result_type)
13649 (gdbpy_invoke_xmethod): Likewise.
13650 * stabsread.c: Provide extra argument to make_reference_type()
13652 * valops.c (value_ref, value_rtti_indirect_type): Use
13653 lookup_lvalue_reference_type() instead of lookup_reference_type().
13655 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
13658 * gdbtypes.h (enum type_code) <TYPE_CODE_RVALUE_REF>: New constant.
13659 (TYPE_IS_REFERENCE): New macro.
13660 (struct type): Add rvalue_reference_type field.
13661 (TYPE_RVALUE_REFERENCE_TYPE): New macro.
13663 2017-03-20 Marc-Andre Laperle <marc-andre.laperle@ericsson.com>
13665 * NEWS: Add an entry about new '-file-list-shared-libraries' command.
13666 * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries):
13667 New function definition.
13668 * mi/mi-cmds.c (mi_cmds): Add -file-list-shared-libraries command.
13669 * mi/mi-cmds.h (mi_cmd_file_list_shared_libraries):
13670 New function declaration.
13671 * mi/mi-interp.c (mi_output_solib_attribs): New Function.
13672 * mi/mi-interp.h: New file.
13673 * solib.c (info_sharedlibrary_command): Replace for loop with
13675 * solib.h (update_solib_list): New function declaration.
13676 (so_list_head): Move macro.
13677 * solist.h (ALL_SO_LIBS): New macro.
13679 2017-03-20 Marc-Andre Laperle <marc-andre.laperle@ericsson.com>
13681 * infcmd.c (post_create_inferior): Remove unused argument in
13683 * remote.c (remote_start_remote): Likewise.
13684 * solib-frv.c (frv_fetch_objfile_link_map): Likewise.
13685 * solib-svr4.c: (svr4_fetch_objfile_link_map): Likewise.
13686 (enable_break): Likewise.
13687 * solib.c (update_solib_list): Remove unused target argument
13688 and its documentation.
13689 (solib_add): Remove unused target argument. Remove unused
13690 argument in call to update_solib_list.
13691 (info_sharedlibrary_command): Remove unused argument in call
13692 to update_solib_list.
13693 (sharedlibrary_command): Remove unused argument in call to
13695 (handle_solib_event): Likewise.
13696 (reload_shared_libraries): Likewise.
13697 * solib.h (solib_add): Remove unused target argument.
13699 2017-03-20 Andreas Arnez <arnez@linux.vnet.ibm.com>
13701 * s390-linux-tdep.c (is_rsi, is_rie): Remove functions.
13702 (s390_displaced_step_fixup): Cover relative branches with the
13703 default fixup handling. This fixes lack of support for some
13704 relative branch instructions.
13706 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
13708 * i386-gnu-nat.c (gnu_fetch_registers, gnu_store_registers): Use
13709 ptid from regcache.
13711 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
13713 * i386-darwin-nat.c (i386_darwin_fetch_inferior_registers,
13714 i386_darwin_store_inferior_registers): Use ptid from regcache.
13716 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
13718 * i386-bsd-nat.c (i386bsd_fetch_inferior_registers,
13719 i386bsd_store_inferior_registers): Use ptid from regcache.
13721 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
13723 * hppa-obsd-nat.c (hppaobsd_fetch_registers,
13724 hppaobsd_store_registers): Use ptid from regcache.
13726 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
13728 * hppa-nbsd-nat.c (hppanbsd_fetch_registers,
13729 hppanbsd_store_registers): Use ptid from regcache.
13731 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
13733 * hppa-linux-nat.c (fetch_register, store_register): Use ptid
13734 from regcache. Use get_ptrace_pid.
13736 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
13738 * corelow.c (get_core_register_section): Use ptid from regcache,
13741 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
13743 * bsd-uthread.c (bsd_uthread_fetch_registers,
13744 bsd_uthread_store_registers): Use ptid from regcache, set and
13745 restore inferior_ptid.
13747 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
13749 * arm-nbsd-nat.c (fetch_register, fetch_regs, fetch_fp_register,
13750 fetch_fp_regs, store_register, store_regs, store_fp_register,
13751 store_fp_regs): Use ptid from regcache.
13753 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
13755 * arm-linux-nat.c (fetch_fpregs, store_fpregs, fetch_regs,
13756 store_regs, fetch_wmmx_regs, store_wmmx_regs, fetch_vfp_regs,
13757 store_vfp_regs): Use ptid from regcache.
13759 2017-03-17 Pedro Alves <palves@redhat.com>
13762 * ser-base.c (ser_base_wait_for): Add comment.
13763 (do_ser_base_readchar): Improve comment based on the ser-unix.c's
13765 * ser-unix.c (hardwire_raw): Remove reference to
13766 scb->current_timeout.
13767 (wait_for, do_hardwire_readchar, hardwire_readchar): Delete.
13768 (hardwire_ops): Install ser_base_readchar instead of
13770 * serial.h (struct serial) <current_timeout, timeout_remaining>:
13773 2017-03-17 Jonah Graham <jonah@kichwacoders.com>
13776 * python/lib/gdb/printer/bound_registers.py: Add support for
13779 2017-03-16 Andreas Arnez <arnez@linux.vnet.ibm.com>
13781 * dwarf2loc.c (indirect_synthetic_pointer): Get data type of
13782 pointed-to DIE and pass it to dwarf2_evaluate_loc_desc_full.
13783 (dwarf2_evaluate_loc_desc_full): New parameter subobj_type; rename
13784 byte_offset to subobj_byte_offset. Fix the handling of
13785 DWARF_VALUE_STACK on big-endian targets when coming via an
13787 (dwarf2_evaluate_loc_desc): Adjust call to
13788 dwarf2_evaluate_loc_desc_full.
13789 * dwarf2loc.h (dwarf2_fetch_die_type_sect_off): New declaration.
13790 * dwarf2read.c (dwarf2_fetch_die_type_sect_off): New function.
13792 2017-03-16 Yao Qi <yao.qi@linaro.org>
13794 * arm-tdep.c (thumb_record_misc): Decode CBNZ, CBZ, REV16,
13795 and REVSH instructions.
13797 2017-03-16 Yao Qi <yao.qi@linaro.org>
13799 * arm-tdep.c [GDB_SELF_TEST]: include "selftests.h".
13800 (arm_record_test): Declare.
13801 (_initialize_arm_tdep) [GDB_SELF_TEST]: call register_self_test.
13802 (thumb_record_ld_st_reg_offset): Rewrite the opcode matching to
13803 align with the manual.
13804 (thumb_record_misc): Adjust the code order to align with the
13806 (thumb2_record_decode_insn_handler): Fix instruction matching.
13807 (instruction_reader_thumb): New class.
13808 (arm_record_test): New function.
13810 2017-03-16 Yao Qi <yao.qi@linaro.org>
13812 * arm-tdep.c (abstract_memory_reader): New class.
13813 (instruction_reader): New class.
13814 (extract_arm_insn): Add argument 'reader'. Callers updated.
13815 (decode_insn): Likewise.
13817 2017-03-16 Doug Evans <dje@google.com>
13819 * guile/scm-lazy-string.c (lazy_string_smob): Clarify use of LENGTH
13820 member. Change type of TYPE member to SCM. All uses updated.
13821 (lsscm_make_lazy_string_smob): Add assert.
13822 (lsscm_make_lazy_string): Flag bad length values.
13823 (lsscm_elt_type): New function.
13824 (gdbscm_lazy_string_to_value): Rewrite to use
13825 lsscm_safe_lazy_string_to_value.
13826 (lsscm_safe_lazy_string_to_value): Fix handling of TYPE_CODE_PTR.
13827 * guile/scm-value.c (gdbscm_value_to_lazy_string): Flag bad length
13828 values. Fix TYPE_CODE_PTR. Handle TYPE_CODE_ARRAY. Handle typedefs
13830 * guile/guile-internal.h (tyscm_scm_to_type): Declare.
13831 * guile/scm-type.c (tyscm_scm_to_type): New function.
13833 2017-03-15 Doug Evans <dje@google.com>
13835 PR python/17728, python/18439, python/18779
13836 * python/py-lazy-string.c (lazy_string_object): Clarify use of LENGTH
13837 member. Change type of TYPE member to PyObject *. All uses updated.
13838 (stpy_convert_to_value): Fix handling of TYPE_CODE_PTR.
13839 (gdbpy_create_lazy_string_object): Flag bad length values.
13840 Handle TYPE_CODE_ARRAY with possibly different user-provided length.
13841 Handle typedefs in incoming type.
13842 (stpy_lazy_string_elt_type): New function.
13843 (gdbpy_extract_lazy_string): Call it.
13844 * python/py-value.c (valpy_lazy_string): Flag bad length values.
13845 Fix handling of TYPE_CODE_PTR. Handle TYPE_CODE_ARRAY. Handle
13846 typedefs in incoming type.
13848 2017-03-16 Doug Evans <dje@google.com>
13850 * guile/guile-internal.h (tyscm_scm_to_type): Declare.
13851 * guile/scm-type.c (tyscm_scm_to_type): New function.
13853 2017-03-16 Jiong Wang <jiong.wang@arm.com>
13855 * inf-ptrace.c (inf_ptrace_peek_poke): Change the type to
13856 "ULONGEST" for "skip".
13858 2017-03-14 Andreas Arnez <arnez@linux.vnet.ibm.com>
13861 * inf-ptrace.c (inf_ptrace_xfer_partial): In "case
13862 TARGET_OBJECT_MEMORY", extract the logic for ptrace peek/poke...
13863 (inf_ptrace_peek_poke): ...here. New function. Now also loop
13864 over ptrace peek/poke until end of buffer or error.
13866 2017-03-14 Simon Marchi <simon.marchi@ericsson.com>
13868 * parse.c (length_of_subexp): Make static.
13869 * parser-defs.h (length_of_subexp): Remove.
13871 2017-03-14 Andreas Arnez <arnez@linux.vnet.ibm.com>
13873 * linux-nat.c (linux_proc_xfer_partial): Handle write operations
13876 2017-03-14 Pedro Alves <palves@redhat.com>
13878 * cp-name-parser.y (cp_demangled_name_to_comp): Update comment.
13879 (main): Use std::unique_ptr. Remove calls to
13880 cp_demangled_name_parse_free.
13882 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
13884 * alpha-bsd-nat.c (alphabsd_fetch_inferior_registers,
13885 alphabsd_store_inferior_registers): Use regcache->ptid instead
13888 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
13890 * aix-thread.c (aix_thread_fetch_registers,
13891 aix_thread_store_registers): Use regcache->ptid instead of
13894 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
13896 * aarch64-linux-nat.c (fetch_gregs_from_thread,
13897 store_gregs_to_thread, fetch_fpregs_from_thread,
13898 store_fpregs_to_thread): Use regcache->ptid instead of
13901 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
13903 * amd64-linux-nat.c (amd64_linux_fetch_inferior_registers,
13904 amd64_linux_fetch_inferior_registers): Use regcache->ptid
13905 instead of inferior_ptid.
13907 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
13909 * target.c (target_fetch_registers, target_store_registers): Add
13912 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
13914 * regcache.h (regcache_get_ptid): New function.
13915 * regcache.c (regcache_get_ptid): New function.
13917 2017-03-13 Mark Wielaard <mark@klomp.org>
13919 * cp-name-parser.y (make_empty): Initialize d_printing to zero.
13921 2017-03-10 Keith Seitz <keiths@redhat.com>
13924 * c-typeprint.c (cp_type_print_method_args): Skip artificial arguments.
13926 2017-03-08 Pedro Alves <palves@redhat.com>
13929 * infrun.c (start_step_over, do_target_resume, resume)
13930 (restart_threads): Assert we're not resuming a thread that is
13931 meant to be stopped.
13932 (infrun_thread_stop_requested_callback): Delete.
13933 (infrun_thread_stop_requested): If the thread is internally
13934 stopped, queue a pending stop event and clear the thread's
13935 inline-frame state.
13936 (handle_stop_requested): New function.
13937 (handle_syscall_event, handle_inferior_event_1): Use
13938 handle_stop_requested.
13939 (handle_stop_requested): New function.
13940 (handle_signal_stop): Set the thread's stop_signal here instead of
13942 (finish_step_over): Clear step over info unconditionally.
13943 (handle_signal_stop): If the user had interrupted the event
13944 thread, consider the stop a random signal.
13945 (handle_signal_stop) <signal arrived while stepping over
13946 breakpoint>: Don't restart threads here.
13947 (stop_waiting): Don't clear step-over info here.
13949 2017-03-08 Pedro Alves <palves@redhat.com>
13952 * common/gdb_unlinker.h (unlinker::unlinker): Attribute nonnull
13953 goes to argument 2, not 1.
13955 2017-03-08 Pedro Alves <palves@redhat.com>
13958 * top.c (gdb_readline_wrapper): Avoid passing NULL to
13959 display_gdb_prompt.
13960 (command_line_input): Add comment.
13962 2017-03-08 Pedro Alves <palves@redhat.com>
13965 * tui/tui-file.c (tui_file::write): New.
13966 * tui/tui-file.h (tui_file): Override "write".
13967 * tui/tui-io.c (do_tui_putc, update_start_line): New functions,
13968 factored out from ...
13969 (tui_puts): ... here.
13970 (tui_putc): Use them.
13971 (tui_write): New function.
13972 * tui/tui-io.h (tui_write): Declare.
13974 2017-03-07 Sergio Durigan Junior <sergiodj@redhat.com>
13976 * Makefile.in (SFILES): Replace "environ.c" with
13977 "common/environ.c".
13978 (HFILES_NO_SRCDIR): Likewise, for "environ.h".
13979 * environ.c: Include "common-defs.h" instead of "defs.h. Moved
13981 * common/environ.c: ... here.
13982 * environ.h: Moved to...
13983 * common/environ.h: ... here.
13985 2017-03-07 Peter Bergner <bergner@vnet.ibm.com>
13987 * gdbarch.sh (pstring_ptr): New static function.
13988 (gdbarch_disassembler_options): Use it.
13989 (gdbarch_verify_disassembler_options): Print valid_disassembler_options,
13990 not valid_disassembler_option->name.
13991 * gdbarch.c: Regenerate.
13993 2017-03-07 Peter Bergner <bergner@vnet.ibm.com>
13995 * config/powerpc/ppc64-linux.mh (MH_CFLAGS): Delete.
13997 2017-03-07 Pedro Alves <palves@redhat.com>
13999 * tui/tui-regs.c (tui_restore_gdbout): Don't delete gdb_stdout.
14001 2017-03-07 Walfred Tedeschi <walfred.tedeschi@intel.com>
14003 * i387-tdep.h (i387_reset_bnd_regs): Add function definition.
14004 * i387-tdep.c (i387_reset_bnd_regs): Add function implementation.
14005 * i386-tdep.c (i386_push_dummy_call): Call i387_reset_bnd_regs.
14006 * amd64-tdep.c (amd64_push_dummy_call): Call i387_reset_bnd_regs.
14008 2017-03-06 Simon Marchi <simon.marchi@ericsson.com>
14010 * xtensa-linux-nat.c (fetch_gregs): Remove const.
14012 2017-03-03 Simon Marchi <simon.marchi@ericsson.com>
14014 * remote.c (remote_add_target_side_commands): Use range-based
14017 2017-03-03 Yao Qi <yao.qi@linaro.org>
14020 * ada-valprint.c (ada_val_print_ref): Call value_fetch_lazy if
14022 * valprint.c (common_val_print): Likewise.
14024 2017-02-28 Peter Bergner <bergner@vnet.ibm.com>
14026 * NEWS: Mention new set/show disassembler-options commands.
14027 * doc/gdb.texinfo: Document new set/show disassembler-options commands.
14028 * disasm.c: Include "arch-utils.h", "gdbcmd.h" and "safe-ctype.h".
14029 (prospective_options): New static variable.
14030 (gdb_disassembler::gdb_disassembler): Initialize
14031 m_di.disassembler_options.
14032 (gdb_buffered_insn_length_init_dis): Initilize di->disassembler_options.
14033 (get_disassembler_options): New function.
14034 (set_disassembler_options): Likewise.
14035 (set_disassembler_options_sfunc): Likewise.
14036 (show_disassembler_options_sfunc): Likewise.
14037 (disassembler_options_completer): Likewise.
14038 (_initialize_disasm): Likewise.
14039 * disasm.h (get_disassembler_options): New prototype.
14040 (set_disassembler_options): Likewise.
14041 * gdbarch.sh (gdbarch_disassembler_options): New variable.
14042 (gdbarch_verify_disassembler_options): Likewise.
14043 * gdbarch.c: Regenerate.
14044 * gdbarch.h: Likewise.
14045 * arm-tdep.c (num_disassembly_options): Delete.
14046 (set_disassembly_style): Likewise.
14047 (arm_disassembler_options): New static variable.
14048 (set_disassembly_style_sfunc): Convert short style name into long
14049 option name. Call set_disassembler_options.
14050 (show_disassembly_style_sfunc): New function.
14051 (arm_gdbarch_init): Call set_gdbarch_disassembler_options and
14052 set_gdbarch_verify_disassembler_options.
14053 (_initialize_arm_tdep): Delete regnames variable and update callers.
14054 (arm_disassembler_options): Initialize.
14055 (disasm_options): New variable.
14056 (num_disassembly_options): Rename from this...
14057 (num_disassembly_styles): ...to this. Compute by scanning through
14059 (valid_disassembly_styles): Initialize using disasm_options.
14060 Remove calls to parse_arm_disassembler_option, get_arm_regnames and
14061 set_arm_regname_option.
14062 Pass show_disassembly_style_sfunc to the "disassembler" setshow command.
14063 * rs6000-tdep.c (powerpc_disassembler_options): New static variable.
14064 (rs6000_gdbarch_init): Call set_gdbarch_disassembler_options and
14065 set_gdbarch_verify_disassembler_options.
14066 * s390-tdep.c (s390_disassembler_options): New static variable.
14067 (s390_gdbarch_init):all set_gdbarch_disassembler_options and
14068 set_gdbarch_verify_disassembler_options.
14070 2017-02-27 Simon Marchi <simon.marchi@ericsson.com>
14072 * remote.c (remote_add_target_side_condition): Remove "struct"
14073 keyword from range-based for loop.
14075 2017-02-27 Simon Marchi <simon.marchi@ericsson.com>
14077 * remote.c (remote_add_target_side_condition): Use range-based
14078 for loop. Update comment.
14080 2017-02-27 Yao Qi <yao.qi@linaro.org>
14082 * f-typeprint.c (f_print_type): Check "varstring" is empty first.
14084 2017-02-26 Alan Hayward <alan.hayward@arm.com>
14086 * regcache.c (regcache_raw_update): New function.
14087 (regcache_raw_read): Move code to regcache_raw_update.
14088 * regcache.h (regcache_raw_update): New declaration.
14089 * remote.c (remote_prepare_to_store): Call regcache_raw_update.
14091 2017-02-26 Jan Kratochvil <jan.kratochvil@redhat.com>
14093 * dwarf2read.c (create_debug_type_hash_table): Initialize
14094 header.signature and header.type_offset_in_tu.
14096 2017-02-24 Pedro Alves <palves@redhat.com>
14098 * symtab.c (make_file_symbol_completion_list_1): Use
14099 add_symtab_completions.
14101 2017-02-24 Alan Hayward <alan.hayward@arm.com>
14103 * stack.c (frame_info): Use frame_unwind_register_value to avoid buf.
14105 2017-02-24 Alan Hayward <alan.hayward@arm.com>
14107 * i386-tdep.c (i386_pseudo_register_read_into_value): Use
14108 I386_MAX_REGISTER_SIZE.
14109 (i386_pseudo_register_write): Likewise.
14110 (i386_process_record): Likewise.
14111 * i387-tdep.c (i387_supply_xsave): Likewise.
14112 * m68k-linux-nat.c (fetch_register): Use M68K_MAX_REGISTER_SIZE.
14113 (store_register): Likewise.
14115 2017-02-23 Pedro Alves <palves@redhat.com>
14117 * ada-lang.c: Include "common/function-view.h".
14118 (ada_iterate_over_symbols): Adjust to use function_view as
14120 (struct add_partial_datum, ada_complete_symbol_matcher): Delete.
14121 (ada_make_symbol_completion_list): Use a lambda.
14122 (ada_exc_search_name_matches): Delete.
14123 (name_matches_regex): New.
14124 (ada_add_global_exceptions): Use a lambda and name_matches_regex.
14125 * compile/compile-c-support.c: Include "common/function-view.h".
14126 (print_one_macro): Change prototype to accept a ui_file pointer.
14127 (write_macro_definitions): Use a lambda.
14128 * dwarf2read.c: Include "common/function-view.h".
14129 (dw2_map_expand_apply, dw2_map_symtabs_matching_filename)
14130 (dw2_expand_symtabs_matching): Adjust to use function_view as
14132 * language.h: Include "common/function-view.h".
14133 (struct language_defn) <la_iterate_over_symbols>: Adjust to use
14134 function_view as callback type.
14135 (LA_ITERATE_OVER_SYMBOLS): Remove DATA parameter.
14136 * linespec.c: Include "common/function-view.h".
14137 (collect_info::add_symbol): New method.
14138 (struct symbol_and_data_callback, iterate_inline_only, struct
14139 symbol_matcher_data, iterate_name_matcher): Delete.
14140 (iterate_over_all_matching_symtabs): Adjust to use function_view
14141 as callback type and lambdas.
14142 (iterate_over_file_blocks): Adjust to use function_view as
14144 (decode_compound_collector): Now a class with private fields.
14145 (decode_compound_collector::release_symbols): New method.
14146 (collect_one_symbol): Rename to...
14147 (decode_compound_collector::operator()): ... this and adjust.
14148 (lookup_prefix_sym): decode_compound_collector construction bits
14149 move to decode_compound_collector ctor. Pass the
14150 decode_compound_collector object directly as callback. Remove
14151 cleanups and use decode_compound_collector::release_symbols
14153 (symtab_collector): Now a class with private fields.
14154 (symtab_collector::release_symtabs): New method.
14155 (add_symtabs_to_list): Rename to...
14156 (symtab_collector::operator()): ... this and adjust.
14157 (collect_symtabs_from_filename): symtab_collector construction
14158 bits move to symtab_collector ctor. Pass the symtab_collector
14159 object directly as callback. Remove cleanups and use
14160 symtab_collector::release_symtabs instead.
14161 (collect_symbols): Delete.
14162 (add_matching_symbols_to_info): Use lambdas.
14163 * macrocmd.c (print_macro_callback): Delete.
14164 (info_macro_command): Use a lambda.
14165 (info_macros_command): Pass print_macro_definition as callable
14167 (print_one_macro): Remove 'ignore' parameter.
14168 (macro_list_command): Adjust.
14169 * macrotab.c (macro_for_each_data::fn): Now a function_view.
14170 (macro_for_each_data::user_data): Delete field.
14171 (foreach_macro): Adjust to call the function_view.
14172 (macro_for_each): Adjust to use function_view as callback type.
14173 (foreach_macro_in_scope): Adjust to call the function_view.
14174 (macro_for_each_in_scope): Adjust to use function_view as callback
14176 * macrotab.h: Include "common/function-view.h".
14177 (macro_callback_fn): Declare a prototype instead of a pointer.
14178 Remove "user_data" parameter.
14179 (macro_for_each, macro_for_each_in_scope): Adjust to use
14180 function_view as callback type.
14181 * psymtab.c (partial_map_expand_apply)
14182 (psym_map_symtabs_matching_filename, recursively_search_psymtabs):
14183 Adjust to use function_view as callback type and to return bool.
14184 (psym_expand_symtabs_matching): Adjust to use function_view as
14186 * symfile-debug.c (debug_qf_map_symtabs_matching_filename): Adjust
14187 to use function_view as callback type and to return bool.
14188 (debug_qf_expand_symtabs_matching): Adjust to use function_view as
14190 * symfile.c (expand_symtabs_matching): Adjust to use function_view
14192 * symfile.h: Include "common/function-view.h".
14193 (expand_symtabs_file_matcher_ftype)
14194 (expand_symtabs_symbol_matcher_ftype)
14195 (expand_symtabs_exp_notify_ftype): Remove "data" parameter and
14197 (quick_symbol_functions::map_symtabs_matching_filename)
14198 (quick_symbol_functions::expand_symtabs_matching): Adjust to use
14199 function_view as callback type and return bool.
14200 (expand_symtabs_matching): Adjust to use function_view as callback
14202 (maintenance_expand_name_matcher)
14203 (maintenance_expand_file_matcher): Delete.
14204 (maintenance_expand_symtabs): Use lambdas.
14205 * symtab.c (iterate_over_some_symtabs): Adjust to use
14206 function_view as callback types and return bool.
14207 (iterate_over_symtabs): Likewise. Use unique_xmalloc_ptr instead
14209 (lookup_symtab_callback): Delete.
14210 (lookup_symtab): Use a lambda.
14211 (iterate_over_symbols): Adjust to use function_view as callback
14213 (struct search_symbols_data, search_symbols_file_matches)
14214 (search_symbols_name_matches): Delete.
14215 (search_symbols): Use a pair of lambdas.
14216 (struct add_name_data, add_macro_name, symbol_completion_matcher)
14217 (symtab_expansion_callback): Delete.
14218 (default_make_symbol_completion_list_break_on_1): Use lambdas.
14219 * symtab.h: Include "common/function-view.h".
14220 (iterate_over_some_symtabs): Adjust to use function_view as
14221 callback type and return bool.
14222 (iterate_over_symtabs): Adjust to use function_view as callback
14224 (symbol_found_callback_ftype): Remove 'data' parameter and return
14226 (iterate_over_symbols): Adjust to use function_view as callback
14229 2017-02-23 Pedro Alves <palves@redhat.com>
14231 * Makefile.in (SUBDIR_UNITTESTS_SRCS, SUBDIR_UNITTESTS_OBS): New.
14232 (%.o) <unittests/%.c>: New pattern.
14233 * configure.ac ($development): Add $(SUBDIR_UNITTESTS_OBS) to
14234 CONFIG_OBS, and $(SUBDIR_UNITTESTS_SRCS) to CONFIG_SRCS.
14235 * common/function-view.h: New file.
14236 * unittests/function-view-selftests.c: New file.
14237 * configure: Regenerate.
14239 2017-02-23 Simon Marchi <simon.marchi@ericsson.com>
14241 * bsd-uthread.c (bsd_uthread_thread_alive): Use ptid instead of
14243 * go32-nat.c (go32_thread_alive): Likewise.
14245 2017-02-23 Yao Qi <yao.qi@linaro.org>
14247 * varobj-iter.h (varobj_iter_delete): Call xfree instead of
14250 2017-02-23 Yao Qi <yao.qi@linaro.org>
14252 * varobj.c (varobj_clear_saved_item): Use delete instead of
14254 (update_dynamic_varobj_children): Likewise.
14256 2017-02-21 Jan Kratochvil <jan.kratochvil@redhat.com>
14258 * dwarf2read.c (dwarf2_record_block_ranges): Add forgotten BASEADDR.
14260 2017-02-21 Simon Marchi <simon.marchi@ericsson.com>
14262 * common/enum-flags.h (enum_flags::enum_flags): Initialize
14263 m_enum_value to 0 in default constructor.
14265 2017-02-21 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
14267 * rs6000-tdep.c (LOAD_AND_RESERVE_MASK): Rename from LWARX_MASK.
14268 (STORE_CONDITIONAL_MASK): Rename from STWCX_MASK.
14269 (LBARX_INSTRUCTION, LHARX_INSTRUCTION, LQARX_INSTRUCTION,
14270 STBCX_INSTRUCTION, STHCX_INSTRUCTION, STQCX_INSTRUCTION): New defines.
14271 (IS_LOAD_AND_RESERVE_INSN, IS_STORE_CONDITIONAL_INSN): New macros.
14272 (ppc_displaced_step_copy_insn): Use IS_LOAD_AND_RESERVE_INSN.
14273 (ppc_deal_with_atomic_sequence): Use IS_LOAD_AND_RESERVE_INSN and
14274 IS_STORE_CONDITIONAL_INSN.
14276 2017-02-21 Jan Kratochvil <jan.kratochvil@redhat.com>
14278 * dwarf2_rnglists_process: Initialize range_beginning and range_end.
14280 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
14282 * NEWS (Changes since GDB 7.12): Add DWARF-5.
14284 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
14286 * dwarf2read.c (skip_one_die, read_attribute_value)
14287 (dwarf2_const_value_attr, dump_die_shallow)
14288 (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
14289 (skip_form_bytes, attr_form_is_constant): Handle DW_FORM_data16.
14291 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
14293 * dwarf2read.c (read_file_scope): Rename DW_MACRO_GNU_*.
14294 (dwarf_parse_macro_header): Accept DWARF version 5.
14295 (dwarf_decode_macro_bytes, dwarf_decode_macros): Rename DW_MACRO_GNU_*.
14297 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
14299 * block.c (call_site_for_pc): Rename DW_OP_GNU_*, DW_TAG_GNU_* and
14301 * common/common-exceptions.h (enum errors): Likewise.
14302 * dwarf2-frame.c (class dwarf_expr_executor): Likewise.
14303 * dwarf2expr.c (dwarf_block_to_dwarf_reg)
14304 (dwarf_expr_context::execute_stack_op): Likewise.
14305 * dwarf2expr.h (struct dwarf_expr_context, struct dwarf_expr_piece):
14307 * dwarf2loc.c (dwarf_evaluate_loc_desc::get_base_type)
14308 (dwarf_evaluate_loc_desc::push_dwarf_reg_entry_value)
14309 (show_entry_values_debug, call_site_to_target_addr)
14310 (func_addr_to_tail_call_list, func_verify_no_selftailcall)
14311 (dwarf_expr_reg_to_entry_parameter, dwarf_entry_parameter_to_value)
14312 (entry_data_value_free_closure, value_of_dwarf_reg_entry)
14313 (value_of_dwarf_block_entry, indirect_pieced_value)
14314 (symbol_needs_eval_context::push_dwarf_reg_entry_value):
14315 (disassemble_dwarf_expression): Likewise.
14316 * dwarf2read.c (process_die, inherit_abstract_dies)
14317 (read_call_site_scope): Likewise.
14318 * gdbtypes.h (struct func_type, struct call_site_parameter)
14319 (struct call_site): Likewise.
14320 * stack.c (read_frame_arg): Likewise.
14321 * std-operator.def (OP_VAR_ENTRY_VALUE): Likewise.
14323 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
14325 * defs.h (read_unsigned_leb128): New declaration.
14326 * dwarf2loc.c (decode_debug_loclists_addresses): New function.
14327 (decode_debug_loc_dwo_addresses): Update DEBUG_LOC_* to DW_LLE_*.
14328 (dwarf2_find_location_expression): Call also
14329 decode_debug_loclists_addresses. Handle DWARF-5 ULEB128 length.
14330 * dwarf2loc.h (dwarf2_version): New declaration.
14331 * dwarf2read.c (struct dwarf2_per_objfile): Add loclists, line_str,
14333 (dwarf2_elf_names): Add .debug_loclists, .debug_line_str,
14335 (struct dwop_section_names): Add loclists_dwo.
14336 (dwop_section_names): Add .debug_loclists.dwo.
14337 (struct comp_unit_head): Add unit_type, signature, type_offset_in_tu.
14338 (struct dwarf2_per_cu_data): Add dwarf_version.
14339 (struct dwo_sections): Add loclists.
14340 (struct attr_abbrev): Add implicit_const.
14341 (read_indirect_line_string): New declaration.
14342 (read_unsigned_leb128): Delete declaration.
14343 (rcuh_kind): New definition.
14344 (read_and_check_comp_unit_head): Change parameter
14345 is_debug_types_section to section_kind.
14346 (dwarf2_locate_sections): Handle loclists, line_str and rnglists.
14347 (read_comp_unit_head): Change parameter abfd to section, add parameter
14348 section_kind. Handle DWARF-5.
14349 (error_check_comp_unit_head): Accept also DWARF version 5.
14350 (read_and_check_comp_unit_head): Change parameter
14351 is_debug_types_section to section_kind.
14352 (read_and_check_type_unit_head): Delete function.
14353 (read_abbrev_offset): Handle DWARF-5.
14354 (create_debug_type_hash_table): Add parameter section_kind. Process
14355 only DW_UT_type. Use signature and type_offset_in_tu from struct
14357 (create_debug_types_hash_table): Update create_debug_type_hash_table
14359 (create_all_type_units): Call create_debug_type_hash_table.
14360 (read_cutu_die_from_dwo, init_cutu_and_read_dies): Change
14361 read_and_check_type_unit_head caller to read_and_check_comp_unit_head
14363 (skip_one_die): Handle DW_FORM_implicit_const.
14364 (dwarf2_rnglists_process): New function.
14365 (dwarf2_ranges_process): Call dwarf2_rnglists_process for DWARF-5.
14366 (abbrev_table_read_table): Handle DW_FORM_implicit_const.
14367 (read_attribute_value): Handle DW_FORM_implicit_const,
14369 (read_attribute): Handle DW_FORM_implicit_const.
14370 (read_indirect_string_at_offset_from): New function from
14371 read_indirect_string_at_offset.
14372 (read_indirect_string_at_offset): Call
14373 read_indirect_string_at_offset_from.
14374 (read_indirect_line_string_at_offset): New function.
14375 (read_indirect_string): New function comment.
14376 (read_indirect_line_string): New function.
14377 (read_unsigned_leb128): Make it global.
14378 (dwarf2_string_attr): Handle DWARF-5.
14379 (add_include_dir_stub, read_formatted_entries): New functions.
14380 (dwarf_decode_line_header, dump_die_shallow, cu_debug_loc_section):
14382 (per_cu_header_read_in): Update read_comp_unit_head caller.
14383 (dwarf2_version): New function.
14384 * symfile.h (struct dwarf2_debug_sections): Add loclists, line_str and
14386 * xcoffread.c (dwarf2_xcoff_names): Update struct dwarf2_debug_sections
14389 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
14391 * dwarf2read.c (abbrev_table_read_table): Read the data only once.
14393 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
14395 * dwarf2read.c (dwarf2_ranges_process): New function from
14396 dwarf2_ranges_read.
14397 (dwarf2_ranges_read, dwarf2_record_block_ranges): Use
14398 dwarf2_ranges_process.
14400 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
14402 * dwarf2read.c (create_debug_type_hash_table): New function from
14403 create_debug_types_hash_table.
14404 (create_debug_types_hash_table): Call create_debug_type_hash_table.
14405 (create_all_type_units, open_and_init_dwo_file): Update
14406 create_debug_types_hash_table callers.
14408 2017-02-20 Sergio Durigan Junior <sergiodj@redhat.com>
14411 * fork-child.c (trace_start_error): Fix thinko. va_end should
14412 refer to 'ap', not 'args'.
14414 2017-02-20 Sergio Durigan Junior <sergiodj@redhat.com>
14415 Pedro Alves <palves@redhat.com>
14418 * darwin-nat.c (darwin_ptrace_me): Check if calls to system
14420 * fork-child.c (trace_start_error): New function.
14421 (trace_start_error_with_name): Likewise.
14422 * gnu-nat.c (gnu_ptrace_me): Check if call to PTRACE succeeded.
14423 * inf-ptrace.c (inf_ptrace_me): Likewise.
14424 * inferior.h (trace_start_error): New prototype.
14425 (trace_start_error_with_name): Likewise.
14427 2017-02-15 Sergio Durigan Junior <sergiodj@redhat.com>
14430 * psymtab.c (maintenance_print_psymbols): Verify if 'argv' is not
14431 NULL before using it.
14432 * symmisc.c (maintenance_print_symbols): Likewise.
14433 (maintenance_print_msymbols): Likewise.
14435 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
14437 * NEWS: Add record Python bindings entry.
14439 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
14441 * Makefile.in (SUBDIR_PYTHON_OBS): Add py-record-btrace.o,
14443 (SUBDIR_PYTHON_SRCS): Add py-record-btrace.c, py-record-full.c.
14444 * python/py-record-btrace.c, python/py-record-btrace.h,
14445 python/py-record-full.c, python/py-record-full.h: New file.
14446 * python/py-record.c: Add include for py-record-btrace.h and
14448 (recpy_method, recpy_format, recpy_goto, recpy_replay_position,
14449 recpy_instruction_history, recpy_function_call_history, recpy_begin,
14450 recpy_end): Use functions from py-record-btrace.c and py-record-full.c.
14451 * python/python-internal.h (PyInt_FromSsize_t, PyInt_AsSsize_t):
14453 (gdbpy_initialize_btrace): New export.
14454 * python/python.c (_initialize_python): Add gdbpy_initialize_btrace.
14456 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
14458 * Makefile.in (SUBDIR_PYTHON_OBS): Add python/py-record.o.
14459 (SUBDIR_PYTHON_SRCS): Add python/py-record.c.
14460 * python/py-record.c: New file.
14461 * python/python-internal.h (gdbpy_start_recording,
14462 gdbpy_current_recording, gdpy_stop_recording,
14463 gdbpy_initialize_record): New export.
14464 * python/python.c (_initialize_python): Add gdbpy_initialize_record.
14465 (python_GdbMethods): Add gdbpy_start_recording,
14466 gdbpy_current_recording and gdbpy_stop_recording.
14468 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
14470 * record-btrace.c (record_btrace_record_method): New function.
14471 (init_record_btrace_ops): Initialize to_record_method.
14472 * record-full.c (record_full_record_method): New function.
14473 (init_record_full_ops, init_record_full_core_ops): Add
14474 record_full_record_method.
14475 * record.h (enum record_method): New enum.
14476 * target-debug.h (target_debug_print_enum_record_method: New define.
14477 * target-delegates.c: Regenerate.
14478 * target.c (target_record_method): New function.
14479 * target.h: Include record.h.
14480 (struct target_ops) <to_record_method>: New field.
14481 (target_record_method): New export.
14483 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
14485 * record.h (record_start, record_stop): New export.
14486 * record.c (record_start, record_stop): New function.
14488 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
14490 * btrace.c (btrace_fetch): Copy function call segments pointer
14492 (btrace_clear): Clear the vector.
14493 (btrace_find_insn_by_number): Use binary search to find the correct
14494 function call segment.
14495 * btrace.h (brace_fun_p): New typedef.
14496 (struct btrace_thread_info) <functions>: New field.
14498 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
14500 * record-btrace.c (btrace_ui_out_decode_error): Move most of it ...
14501 * btrace.c (btrace_decode_error): ... here. New function.
14502 * btrace.h (btrace_decode_error): New export.
14504 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
14506 * btrace.c (ftrace_call_num_insn, btrace_insn_get_error): New function.
14507 (ftrace_new_function, btrace_insn_number, btrace_insn_cmp,
14508 btrace_find_insn_by_number): Remove special case for gaps.
14509 * btrace.h (btrace_insn_get_error): New export.
14510 (btrace_insn_number, btrace_find_insn_by_number): Adjust comment.
14511 * record-btrace.c (btrace_insn_history): Print number for gaps.
14512 (record_btrace_info, record_btrace_goto): Handle gaps.
14514 2017-02-14 Tom Tromey <tom@tromey.com>
14517 * python/python.c (gdbpy_before_prompt_hook): Emit before_prompt
14519 * python/py-evts.c (gdbpy_initialize_py_events): Add
14520 before_prompt registry.
14521 * python/py-events.h (events_object) <before_prompt>: New field.
14523 2017-02-14 Markus Metzger <markus.t.metzger@intel.com>
14525 * btrace.c (ftrace_new_switch): Preserve up link and flags.
14527 2017-02-13 Luis Machado <lgustavo@codesourcery.com>
14529 * symfile (_initialize_symfile): Add usage text to the load command's
14532 2017-02-10 Simon Marchi <simon.marchi@ericsson.com>
14534 * utils.c (defaulted_query): Don't query on secondary UIs.
14536 2017-02-10 Tom Tromey <tom@tromey.com>
14538 * rust-lang.c (rust_get_disr_info): Remove unused variable.
14540 2017-02-10 Tom Tromey <tom@tromey.com>
14542 * python/py-value.c (valpy_richcompare_throw): Remove unnecessary
14544 * python/py-type.c (typy_legacy_template_argument): Remove
14545 unnecessary "cleanup" local.
14547 2017-02-10 Tom Tromey <tom@tromey.com>
14549 * python/python.c (do_start_initialization): New function, from
14550 _initialize_python.
14551 (_initialize_python): Call do_start_initialization.
14552 * python/py-linetable.c (ltpy_iternext): Use explicit returns, not
14555 2017-02-10 Tom Tromey <tom@tromey.com>
14557 * python/py-prettyprint.c (pretty_print_one_value): Use
14560 2017-02-10 Tom Tromey <tom@tromey.com>
14562 * python/py-cmd.c (cmdpy_destroyer): Use gdbpy_ref.
14563 * python/py-breakpoint.c (gdbpy_breakpoint_deleted): Use
14565 * python/py-type.c (field_new): Use gdbpy_ref.
14566 * python/py-symtab.c (symtab_and_line_to_sal_object): Use
14568 * python/py-progspace.c (pspy_new): Use gdbpy_ref.
14569 (py_free_pspace): Likewise.
14570 (pspace_to_pspace_object): Likewise.
14571 * python/py-objfile.c (objfpy_new): Use gdbpy_ref.
14572 (py_free_objfile): Likewise.
14573 (objfile_to_objfile_object): Likewise.
14574 * python/py-inferior.c (delete_thread_object): Use
14576 (infpy_read_memory): Likewise.
14577 (py_free_inferior): Likewise.
14578 * python/py-evtregistry.c (create_eventregistry_object): Use
14580 * python/py-event.c (create_event_object): Use gdbpy_ref.
14582 2017-02-10 Tom Tromey <tom@tromey.com>
14584 * python/py-ref.h (gdbpy_ref_policy): Now a template.
14585 (gdbpy_ref): Now a template; allow subclasses of PyObject to be
14587 * python/py-arch.c, python/py-bpevent.c, python/py-breakpoint.c,
14588 python/py-cmd.c, python/py-continueevent.c, python/py-event.c,
14589 python/py-exitedevent.c, python/py-finishbreakpoint.c,
14590 python/py-framefilter.c, python/py-function.c,
14591 python/py-inferior.c, python/py-infevents.c,
14592 python/py-linetable.c, python/py-newobjfileevent.c,
14593 python/py-param.c, python/py-prettyprint.c, python/py-ref.h,
14594 python/py-signalevent.c, python/py-stopevent.c,
14595 python/py-symbol.c, python/py-threadevent.c, python/py-type.c,
14596 python/py-unwind.c, python/py-utils.c, python/py-value.c,
14597 python/py-varobj.c, python/py-xmethods.c, python/python.c,
14598 varobj.c: Change gdbpy_ref to gdbpy_ref<>.
14600 2017-02-10 Tom Tromey <tom@tromey.com>
14602 * ui-out.h (ui_out_emit_type): New class.
14603 (ui_out_emit_tuple, ui_out_emit_list): New typedefs.
14604 * python/py-framefilter.c (py_print_single_arg): Use gdb::optional
14605 and ui_out_emit_tuple.
14606 (enumerate_locals): Likewise.
14607 (py_mi_print_variables, py_print_locals, py_print_args): Use
14609 (py_print_frame): Use gdb::optional, ui_out_emit_tuple,
14611 * common/gdb_optional.h: New file.
14613 2017-02-10 Martin Galvan <martingalvan@sourceware.org>
14615 * MAINTAINERS (Write After Approval): Update my e-mail address.
14617 2017-02-10 Martin Galvan <martingalvan@sourceware.org>
14620 * breakpoint.c (_initialize_breakpoint): Update the help description
14621 of the 'commands' command to indicate that it takes a list argument.
14623 2017-02-09 Simon Marchi <simon.marchi@ericsson.com>
14625 * interps.c (current_interp_set_logging): Remove "return".
14627 2017-02-09 Gary Benson <gbenson@redhat.com>
14629 * symtab.c (add_symtab_completions): Prevent NULL pointer
14632 2017-02-08 Pedro Alves <palves@redhat.com>
14634 * interps.c (interp::interp): Remove reference to quiet_p.
14635 (interp_set): Make static. Remove dead "Switching to" output
14637 (interp_quiet_p, interp_set_quiet): Delete.
14638 (interpreter_exec_cmd): Don't set the interpreter quiet.
14639 * interps.h (interp_quiet_p): Make static.
14640 (class interp) <quiet_p>: Remove field
14642 2017-02-08 Jerome Guitton <guitton@adacore.com>
14644 * cli/cli-decode.c (find_command_name_length): Make it extern.
14645 * cli/cli-decode.h (find_command_name_length): Declare.
14646 * cli/cli-script.c (command_name_equals, line_first_arg):
14648 (process_next_line): Use cli-decode to parse command names.
14649 (build_command_line): Make args a constant pointer.
14651 2017-02-08 Jerome Guitton <guitton@adacore.com>
14653 * cli-decode.c (lookup_cmd_1, lookup_cmd_composition):
14654 Remove case-insensitive search.
14656 2017-02-07 Jose E. Marchesi <jose.marchesi@oracle.com>
14658 * sparc-tdep.c (sparc32_gdbarch_init): Do not place a + operator
14659 at the end of the line. Avoids an ARI warning.
14661 2017-02-06 Luis Machado <lgustavo@codesourcery.com>
14663 * NEWS: Mention support for record/replay of Intel 64 rdrand and
14664 rdseed instructions.
14665 i386-tdep.c (i386_process_record): Handle Intel 64 rdrand and rseed.
14667 2017-02-06 Ivo Raisr <ivo.raisr@oracle.com>
14670 Provide and use sparc32 and sparc64 target description XML files.
14671 * features/sparc/sparc32-cp0.xml, features/sparc/sparc32-cpu.xml,
14672 features/sparc/sparc32-fpu.xml: New files for sparc 32-bit.
14673 * features/sparc/sparc64-cp0.xml, features/sparc/sparc64-cpu.xml,
14674 features/sparc/sparc64-fpu.xml: New files for sparc 64-bit.
14675 * features/sparc/sparc32-solaris.xml: New file.
14676 * features/sparc/sparc64-solaris.xml: New file.
14677 * features/sparc/sparc32-solaris.c: Generated.
14678 * features/sparc/sparc64-solaris.c: Generated.
14679 * sparc-tdep.h: Account for differences in target descriptions.
14680 * sparc-tdep.c (sparc32_register_name): Use target provided registers.
14681 (sparc32_register_type): Use target provided registers.
14682 (validate_tdesc_registers): New function.
14683 (sparc32_gdbarch_init): Use tdesc_has_registers.
14684 Set pseudoregister functions.
14685 * sparc64-tdep.c (sparc64_register_name): Use target provided registers.
14686 (sparc64_register_type): Use target provided registers.
14687 (sparc64_init_abi): Set pseudoregister functions.
14689 2017-02-03 Tom Tromey <tom@tromey.com>
14692 * rust-lang.c (rust_print_type) <TYPE_CODE_UNION>: Handle enums
14693 with a single member.
14695 2017-02-03 Pedro Alves <palves@redhat.com>
14697 * cli/cli-interp.c (cli_interp_base::cli_interp_base)
14698 (cli_interp_base::~cli_interp_base): New.
14699 (cli_interp): New struct.
14700 (as_cli_interp): Cast the interp itself to cli_interp.
14701 (cli_interpreter_pre_command_loop): Rename to ...
14702 (cli_interp_base::pre_command_loop): ... this. Remove 'self'
14704 (cli_interpreter_init): Rename to ...
14705 (cli_interp::init): ... this. Remove 'self' parameter. Use
14706 boolean. Make extern.
14707 (cli_interpreter_resume): Rename to ...
14708 (cli_interp::resume): ... this. Remove 'data' parameter. Make
14710 (cli_interpreter_suspend): Rename to ...
14711 (cli_interp::suspend): ... this. Remove 'data' parameter. Make
14713 (cli_interpreter_exec): Rename to ...
14714 (cli_interp::exec): ... this. Remove 'data' parameter. Make
14716 (cli_interpreter_supports_command_editing): Rename to ...
14717 (cli_interp_base::supports_command_editing): ... this. Remove
14718 'interp' parameter. Make extern.
14719 (cli_ui_out): Rename to ...
14720 (cli_interp::interp_ui_out): ... this. Remove 'interp' parameter.
14722 (cli_set_logging): Rename to ...
14723 (cli_interp_base::set_logging): ... this. Remove 'interp'
14724 parameter. Make extern.
14725 (cli_interp_procs): Delete.
14726 (cli_interp_factory): Adjust to use "new".
14727 * cli/cli-interp.h: Include "interps.h".
14728 (struct cli_interp_base): New struct.
14729 * interps.c (struct interp): Delete. Fields moved to interps.h.
14730 (interp_new): Delete.
14731 (interp::interp, interp::~interp): New.
14732 (interp_set): Use bool, and return void. Assume the interpreter
14733 has suspend, init and resume methods, and that the all return
14735 (set_top_level_interpreter): interp_set returns void.
14736 (interp_ui_out): Adapt.
14737 (current_interp_set_logging): Adapt.
14738 (interp_data): Delete.
14739 (interp_pre_command_loop, interp_supports_command_editing): Adapt.
14740 (interp_exec): Adapt.
14741 (top_level_interpreter_data): Delete.
14742 * interps.h (interp_init_ftype, interp_resume_ftype)
14743 (interp_suspend_ftype, interp_exec_ftype)
14744 (interp_pre_command_loop_ftype, interp_ui_out_ftype): Delete.
14745 (class interp): New.
14746 (interp_new): Delete.
14747 (interp_set): Now returns void. Use bool.
14748 (interp_data, top_level_interpreter_data): Delete.
14749 * mi/mi-common.h: Include interps.h.
14750 (class mi_interp): Inherit from interp. Define a ctor. Declare
14751 init, resume, suspect, exec, interp_ui_out, set_logging and
14752 pre_command_loop methods.
14753 * mi/mi-interp.c (as_mi_interp): Cast the interp itself.
14754 (mi_interpreter_init): Rename to ...
14755 (mi_interp::init): ... this. Remove the 'interp' parameter, use
14756 bool, return void and make extern. Adjust.
14757 (mi_interpreter_resume): ... Rename to ...
14758 (mi_interp::resume): ... this. Remove the 'data' parameter,
14759 return void and make extern. Adjust.
14760 (mi_interpreter_suspend): ... Rename to ...
14761 (mi_interp::suspend): ... this. Remove the 'data' parameter,
14762 return void and make extern. Adjust.
14763 (mi_interpreter_exec): ... Rename to ...
14764 (mi_interp::exec): ... this. Remove the 'data' parameter and make
14766 (mi_interpreter_pre_command_loop): ... Rename to ...
14767 (mi_interp::pre_command_loop): ... this. Remove the 'self'
14768 parameter and make extern.
14769 (mi_on_normal_stop_1): Adjust.
14770 (mi_ui_out): Rename to ...
14771 (mi_interp::interp_ui_out): ... this. Remove the 'interp'
14772 parameter and make extern. Adjust.
14773 (mi_set_logging): Rename to ...
14774 (mi_interp::set_logging): ... this. Remove the 'interp'
14775 parameter and make extern. Adjust.
14776 (mi_interp_procs): Delete.
14777 (mi_interp_factory): Adjust to use 'new'.
14778 * mi/mi-main.c (mi_cmd_gdb_exit, captured_mi_execute_command)
14779 (mi_print_exception, mi_execute_command, mi_load_progress):
14781 * tui/tui-interp.c (tui_interp): New class.
14782 (as_tui_interp): Return a tui_interp pointer.
14783 (tui_on_normal_stop, tui_on_signal_received)
14784 (tui_on_end_stepping_range, tui_on_signal_exited, tui_on_exited)
14785 (tui_on_no_history, tui_on_user_selected_context_changed): Adjust
14786 to use interp::interp_ui_out.
14787 (tui_init): Rename to ...
14788 (tui_interp::init): ... this. Remove the 'self' parameter, use
14789 bool, return void and make extern. Adjust.
14790 (tui_resume): Rename to ...
14791 (tui_interp::resume): ... this. Remove the 'data' parameter,
14792 return void and make extern. Adjust.
14793 (tui_suspend): Rename to ...
14794 (tui_interp::suspend): ... this. Remove the 'data' parameter,
14795 return void and make extern. Adjust.
14796 (tui_ui_out): Rename to ...
14797 (tui_interp::interp_ui_out): ... this. Remove the 'self'
14798 parameter, and make extern. Adjust.
14799 (tui_exec): Rename to ...
14800 (tui_interp::exec): ... this. Remove the 'data' parameter and
14802 (tui_interp_procs): Delete.
14803 (tui_interp_factory): Use "new".
14805 2017-02-02 Tom Tromey <tom@tromey.com>
14807 * rust-exp.y (ends_raw_string, space_then_number)
14808 (rust_identifier_start_p): Return bool.
14809 * rust-lang.c (rust_tuple_type_p, rust_underscore_fields)
14810 (rust_tuple_struct_type_p, rust_tuple_variant_type_p)
14811 (rust_slice_type_p, rust_range_type_p, rust_u8_type_p)
14812 (rust_chartype_p): Return bool.
14813 (val_print_struct, rust_print_struct_def, rust_print_type):
14815 * rust-lang.h (rust_tuple_type_p, rust_tuple_struct_type_p):
14818 2017-02-02 Tom Tromey <tom@tromey.com>
14820 * rust-lang.c: Reindent.
14822 2017-02-02 Tom Tromey <tom@tromey.com>
14824 * rust-lang.h (rust_crate_for_block): Update.
14825 * rust-lang.c (rust_crate_for_block): Return std::string.
14826 (rust_get_disr_info): Use std:;string, not
14827 gdb::unique_xmalloc_ptr.
14828 * rust-exp.y (crate_name): Update.
14830 2017-02-02 Pedro Alves <palves@redhat.com>
14832 * disasm-selftests.c (print_one_insn_test): Move the "verbose"
14833 field out of gdb_disassembler_test and make it static.
14835 2017-02-02 Pedro Alves <palves@redhat.com>
14837 * mi/mi-common.h (struct mi_interp): Delete the mi2_interp,
14838 mi1_interp and mi_interp fields.
14840 2017-02-02 Pedro Alves <palves@redhat.com>
14842 * cli/cli-interp.c (struct saved_output_files, saved_output):
14843 Moved from cli/cli-logging.c.
14844 (cli_set_logging): New function.
14845 (cli_interp_procs): Install cli_set_logging.
14846 * cli/cli-interp.h (make_logging_output, cli_set_logging):
14848 * cli/cli-logging.c (struct saved_output_files, saved_output):
14849 Moved to cli/cli-interp.c.
14850 (pop_output_files): Don't save outputs here.
14851 (make_logging_output): New function.
14852 (handle_redirections): Don't build tee nor save previous outputs
14854 * interps.c (current_interp_set_logging): Change prototype.
14855 Assume there's always a set_logging_proc method installed.
14856 * interps.h (interp_set_logging_ftype): Change prototype.
14857 (current_interp_set_logging): Change prototype and adjust comment.
14858 * mi/mi-interp.c (mi_set_logging): Change protototype. Adjust to
14859 use make_logging_output.
14860 * tui/tui-interp.c (tui_interp_procs): Install cli_set_logging.
14861 2017-02-02 Pedro Alves <palves@redhat.com>
14863 * cli/cli-logging.c (maybe_warn_already_logging): New factored out
14865 (set_logging_overwrite): ... here.
14866 (logging_no_redirect_file): Delete.
14867 (set_logging_redirect): Don't handle redirection on the fly.
14868 Instead warn that "logging off" / "logging on" is necessary.
14869 (pop_output_files): Delete references to logging_no_redirect_file.
14870 (show_logging_command): Always speak in terms of what will happen
14871 once logging is reenabled.
14873 2017-02-02 Pedro Alves <palves@redhat.com>
14875 * disasm.h (gdb_pretty_print_disassembler): Tweak intro comment.
14877 2017-02-02 Pedro Alves <palves@redhat.com>
14879 * disasm.c (gdb_pretty_print_insn): Rename to ...
14880 (gdb_pretty_print_disassembler::pretty_print_insn): ... this.
14881 Remove gdbarch parameter. Adapt to clear the object's buffers
14882 instead of allocating new buffers, and to print using the object's
14883 gdb_disassembler instead of calling gdb_print_insn.
14884 (dump_insns): Use gdb_pretty_print_disassembler.
14885 * disasm.h (gdb_pretty_print_insn): Delete declaration.
14886 (gdb_pretty_print_disassembler): New class.
14887 * record-btrace.c (btrace_insn_history): Use
14888 gdb_pretty_print_disassembler.
14890 2017-02-02 Pedro Alves <palves@redhat.com>
14892 * ada-lang.c (type_as_string): Use string_file.
14893 * ada-valprint.c (ada_print_floating): Use string_file.
14894 * ada-varobj.c (ada_varobj_scalar_image)
14895 (ada_varobj_get_value_image): Use string_file.
14896 * aix-thread.c (aix_thread_extra_thread_info): Use string_file.
14897 * arm-tdep.c (_initialize_arm_tdep): Use string_printf.
14898 * breakpoint.c (update_inserted_breakpoint_locations)
14899 (insert_breakpoint_locations, reattach_breakpoints)
14900 (print_breakpoint_location, print_one_detail_ranged_breakpoint)
14901 (print_it_watchpoint): Use string_file.
14902 (save_breakpoints): Use stdio_file.
14903 * c-exp.y (oper): Use string_file.
14904 * cli/cli-logging.c (set_logging_redirect): Use ui_file_up and
14906 (pop_output_files): Use delete.
14907 (handle_redirections): Use stdio_file and tee_file.
14908 * cli/cli-setshow.c (do_show_command): Use string_file.
14909 * compile/compile-c-support.c (c_compute_program): Use
14911 * compile/compile-c-symbols.c (generate_vla_size): Take a
14912 'string_file &' instead of a 'ui_file *'.
14913 (generate_c_for_for_one_variable): Take a 'string_file &' instead
14914 of a 'ui_file *'. Use string_file.
14915 (generate_c_for_variable_locations): Take a 'string_file &'
14916 instead of a 'ui_file *'.
14917 * compile/compile-internal.h (generate_c_for_for_one_variable):
14918 Take a 'string_file &' instead of a 'ui_file *'.
14919 * compile/compile-loc2c.c (push, pushf, unary, binary)
14920 (print_label, pushf_register_address, pushf_register)
14921 (do_compile_dwarf_expr_to_c): Take a 'string_file &' instead of a
14922 'ui_file *'. Adjust.
14923 * compile/compile.c (compile_to_object): Use string_file.
14924 * compile/compile.h (compile_dwarf_expr_to_c)
14925 (compile_dwarf_bounds_to_c): Take a 'string_file &' instead of a
14927 * cp-support.c (inspect_type): Use string_file and obstack_copy0.
14928 (replace_typedefs_qualified_name): Use string_file and
14930 * disasm.c (gdb_pretty_print_insn): Use string_file.
14931 (gdb_disassembly): Adjust reference the null_stream global.
14932 (do_ui_file_delete): Delete.
14933 (gdb_insn_length): Use null_stream.
14934 * dummy-frame.c (maintenance_print_dummy_frames): Use stdio_file.
14935 * dwarf2loc.c (dwarf2_compile_property_to_c)
14936 (locexpr_generate_c_location, loclist_generate_c_location): Take a
14937 'string_file &' instead of a 'ui_file *'.
14938 * dwarf2loc.h (dwarf2_compile_property_to_c): Likewise.
14939 * dwarf2read.c (do_ui_file_peek_last): Delete.
14940 (dwarf2_compute_name): Use string_file.
14941 * event-top.c (gdb_setup_readline): Use stdio_file.
14942 * gdbarch.sh (verify_gdbarch): Use string_file.
14943 * gdbtypes.c (safe_parse_type): Use null_stream.
14944 * guile/scm-breakpoint.c (gdbscm_breakpoint_commands): Use
14946 * guile/scm-disasm.c (gdbscm_print_insn_from_port): Take a
14947 'string_file *' instead of a 'ui_file *'.
14948 (gdbscm_arch_disassemble): Use string_file.
14949 * guile/scm-frame.c (frscm_print_frame_smob): Use string_file.
14950 * guile/scm-ports.c (class ioscm_file_port): Now a class that
14951 inherits from ui_file.
14952 (ioscm_file_port_delete, ioscm_file_port_rewind)
14953 (ioscm_file_port_put): Delete.
14954 (ioscm_file_port_write): Rename to ...
14955 (ioscm_file_port::write): ... this. Remove file_port_magic
14957 (ioscm_file_port_new): Delete.
14958 (ioscm_with_output_to_port_worker): Use ioscm_file_port and
14960 * guile/scm-type.c (tyscm_type_name): Use string_file.
14961 * guile/scm-value.c (vlscm_print_value_smob, gdbscm_value_print):
14963 * infcmd.c (print_return_value_1): Use string_file.
14964 * infrun.c (print_target_wait_results): Use string_file.
14965 * language.c (add_language): Use string_file.
14966 * location.c (explicit_to_string_internal): Use string_file.
14967 * main.c (captured_main_1): Use null_file.
14968 * maint.c (maintenance_print_architecture): Use stdio_file.
14969 * mi/mi-cmd-stack.c (list_arg_or_local): Use string_file.
14970 * mi/mi-common.h (struct mi_interp) <out, err, log, targ,
14971 event_channel>: Change type to mi_console_file pointer.
14972 * mi/mi-console.c (mi_console_file_fputs, mi_console_file_flush)
14973 (mi_console_file_delete): Delete.
14974 (struct mi_console_file): Delete.
14975 (mi_console_file_magic): Delete.
14976 (mi_console_file_new): Delete.
14977 (mi_console_file::mi_console_file): New.
14978 (mi_console_file_delete): Delete.
14979 (mi_console_file_fputs): Delete.
14980 (mi_console_file::write): New.
14981 (mi_console_raw_packet): Delete.
14982 (mi_console_file::flush): New.
14983 (mi_console_file_flush): Delete.
14984 (mi_console_set_raw): Rename to ...
14985 (mi_console_file::set_raw): ... this.
14986 * mi/mi-console.h (class mi_console_file): New class.
14987 (mi_console_file_new, mi_console_set_raw): Delete.
14988 * mi/mi-interp.c (mi_interpreter_init): Use mi_console_file.
14989 (mi_set_logging): Use delete and tee_file. Adjust.
14990 * mi/mi-main.c (output_register): Use string_file.
14991 (mi_cmd_data_evaluate_expression): Use string_file.
14992 (mi_cmd_data_read_memory): Use string_file.
14993 (mi_cmd_execute, print_variable_or_computed): Use string_file.
14994 * mi/mi-out.c (mi_ui_out::main_stream): New.
14995 (mi_ui_out::rewind): Use main_stream and
14997 (mi_ui_out::put): Use main_stream and string_file.
14998 (mi_ui_out::mi_ui_out): Remove 'stream' parameter.
14999 Allocate a 'string_file' instead.
15000 (mi_out_new): Don't allocate a mem_fileopen stream here.
15001 * mi/mi-out.h (mi_ui_out::mi_ui_out): Remove 'stream' parameter.
15002 (mi_ui_out::main_stream): Declare method.
15003 * printcmd.c (eval_command): Use string_file.
15004 * psymtab.c (maintenance_print_psymbols): Use stdio_file.
15005 * python/py-arch.c (archpy_disassemble): Use string_file.
15006 * python/py-breakpoint.c (bppy_get_commands): Use string_file.
15007 * python/py-frame.c (frapy_str): Use string_file.
15008 * python/py-framefilter.c (py_print_type, py_print_single_arg):
15010 * python/py-type.c (typy_str): Use string_file.
15011 * python/py-unwind.c (unwind_infopy_str): Use string_file.
15012 * python/py-value.c (valpy_str): Use string_file.
15013 * record-btrace.c (btrace_insn_history): Use string_file.
15014 * regcache.c (regcache_print): Use stdio_file.
15015 * reggroups.c (maintenance_print_reggroups): Use stdio_file.
15016 * remote.c (escape_buffer): Use string_file.
15017 * rust-lang.c (rust_get_disr_info): Use string_file.
15018 * serial.c (serial_open_ops_1): Use stdio_file.
15019 (do_serial_close): Use delete.
15020 * stack.c (print_frame_arg): Use string_file.
15021 (print_frame_args): Remove local mem_fileopen stream, not used.
15022 (print_frame): Use string_file.
15023 * symmisc.c (maintenance_print_symbols): Use stdio_file.
15024 * symtab.h (struct symbol_computed_ops) <generate_c_location>:
15025 Take a 'string_file *' instead of a 'ui_file *'.
15026 * top.c (new_ui): Use stdio_file and stderr_file.
15027 (free_ui): Use delete.
15028 (execute_command_to_string): Use string_file.
15029 (quit_confirm): Use string_file.
15030 * tracepoint.c (collection_list::append_exp): Use string_file.
15031 * tui/tui-disasm.c (tui_disassemble): Use string_file.
15032 * tui/tui-file.c: Don't include "ui-file.h".
15033 (enum streamtype, struct tui_stream): Delete.
15034 (tui_file_new, tui_file_delete, tui_fileopen, tui_sfileopen)
15035 (tui_file_isatty, tui_file_rewind, tui_file_put): Delete.
15036 (tui_file::tui_file): New method.
15037 (tui_file_fputs): Delete.
15038 (tui_file_get_strbuf): Delete.
15039 (tui_file::puts): New method.
15040 (tui_file_adjust_strbuf): Delete.
15041 (tui_file_flush): Delete.
15042 (tui_file::flush): New method.
15043 * tui/tui-file.h: Tweak intro comment.
15045 (tui_fileopen, tui_sfileopen, tui_file_get_strbuf)
15046 (tui_file_adjust_strbuf): Delete declarations.
15047 (class tui_file): New class.
15048 * tui/tui-io.c (tui_initialize_io): Use tui_file.
15049 * tui/tui-regs.c (tui_restore_gdbout): Use delete.
15050 (tui_register_format): Use string_stream.
15051 * tui/tui-stack.c (tui_make_status_line): Use string_file.
15052 (tui_get_function_from_frame): Use string_file.
15053 * typeprint.c (type_to_string): Use string_file.
15054 * ui-file.c (struct ui_file, ui_file_magic, ui_file_new): Delete.
15055 (null_stream): New global.
15056 (ui_file_delete): Delete.
15057 (ui_file::ui_file): New.
15058 (null_file_isatty): Delete.
15059 (ui_file::~ui_file): New.
15060 (null_file_rewind): Delete.
15061 (ui_file::printf): New.
15062 (null_file_put): Delete.
15063 (null_file_flush): Delete.
15064 (ui_file::putstr): New.
15065 (null_file_write): Delete.
15066 (ui_file::putstrn): New.
15067 (null_file_read): Delete.
15068 (ui_file::putc): New.
15069 (null_file_fputs): Delete.
15070 (null_file_write_async_safe): Delete.
15071 (ui_file::vprintf): New.
15072 (null_file_delete): Delete.
15073 (null_file::write): New.
15074 (null_file_fseek): Delete.
15075 (null_file::puts): New.
15076 (ui_file_data): Delete.
15077 (null_file::write_async_safe): New.
15078 (gdb_flush, ui_file_isatty): Adjust.
15079 (ui_file_put, ui_file_rewind): Delete.
15080 (ui_file_write): Adjust.
15081 (ui_file_write_for_put): Delete.
15082 (ui_file_write_async_safe, ui_file_read): Adjust.
15083 (ui_file_fseek): Delete.
15084 (fputs_unfiltered): Adjust.
15085 (set_ui_file_flush, set_ui_file_isatty, set_ui_file_rewind)
15086 (set_ui_file_put, set_ui_file_write, set_ui_file_write_async_safe)
15087 (set_ui_file_read, set_ui_file_fputs, set_ui_file_fseek)
15088 (set_ui_file_data): Delete.
15089 (string_file::~string_file, string_file::write)
15090 (struct accumulated_ui_file, do_ui_file_xstrdup, ui_file_xstrdup)
15091 (do_ui_file_as_string, ui_file_as_string): Delete.
15092 (do_ui_file_obsavestring, ui_file_obsavestring): Delete.
15093 (struct mem_file): Delete.
15094 (mem_file_new): Delete.
15095 (stdio_file::stdio_file): New.
15096 (mem_file_delete): Delete.
15097 (stdio_file::stdio_file): New.
15098 (mem_fileopen): Delete.
15099 (stdio_file::~stdio_file): New.
15100 (mem_file_rewind): Delete.
15101 (stdio_file::set_stream): New.
15102 (mem_file_put): Delete.
15103 (stdio_file::open): New.
15104 (mem_file_write): Delete.
15105 (stdio_file_magic, struct stdio_file): Delete.
15106 (stdio_file_new, stdio_file_delete, stdio_file_flush): Delete.
15107 (stdio_file::flush): New.
15108 (stdio_file_read): Rename to ...
15109 (stdio_file::read): ... this. Adjust.
15110 (stdio_file_write): Rename to ...
15111 (stdio_file::write): ... this. Adjust.
15112 (stdio_file_write_async_safe): Rename to ...
15113 (stdio_file::write_async_safe) ... this. Adjust.
15114 (stdio_file_fputs): Rename to ...
15115 (stdio_file::puts) ... this. Adjust.
15116 (stdio_file_isatty): Delete.
15117 (stdio_file_fseek): Delete.
15118 (stdio_file::isatty): New.
15119 (stderr_file_write): Rename to ...
15120 (stderr_file::write) ... this. Adjust.
15121 (stderr_file_fputs): Rename to ...
15122 (stderr_file::puts) ... this. Adjust.
15123 (stderr_fileopen, stdio_fileopen, gdb_fopen): Delete.
15124 (stderr_file::stderr_file): New.
15125 (tee_file_magic): Delete.
15126 (struct tee_file): Delete.
15127 (tee_file::tee_file): New.
15128 (tee_file_new): Delete.
15129 (tee_file::~tee_file): New.
15130 (tee_file_delete): Delete.
15131 (tee_file_flush): Rename to ...
15132 (tee_file::flush): ... this. Adjust.
15133 (tee_file_write): Rename to ...
15134 (tee_file::write): ... this. Adjust.
15135 (tee_file::write_async_safe): New.
15136 (tee_file_fputs): Rename to ...
15137 (tee_file::puts): ... this. Adjust.
15138 (tee_file_isatty): Rename to ...
15139 (tee_file::isatty): ... this. Adjust.
15140 * ui-file.h (struct obstack, struct ui_file): Don't
15142 (ui_file_new, ui_file_flush_ftype, set_ui_file_flush)
15143 (ui_file_write_ftype)
15144 (set_ui_file_write, ui_file_fputs_ftype, set_ui_file_fputs)
15145 (ui_file_write_async_safe_ftype, set_ui_file_write_async_safe)
15146 (ui_file_read_ftype, set_ui_file_read, ui_file_isatty_ftype)
15147 (set_ui_file_isatty, ui_file_rewind_ftype, set_ui_file_rewind)
15148 (ui_file_put_method_ftype, ui_file_put_ftype, set_ui_file_put)
15149 (ui_file_delete_ftype, set_ui_file_data, ui_file_fseek_ftype)
15150 (set_ui_file_fseek): Delete.
15151 (ui_file_data, ui_file_delete, ui_file_rewind)
15152 (struct ui_file): New.
15154 (class null_file): New.
15155 (null_stream): Declare.
15156 (ui_file_write_for_put, ui_file_put): Delete.
15157 (ui_file_xstrdup, ui_file_as_string, ui_file_obsavestring):
15159 (ui_file_fseek, mem_fileopen, stdio_fileopen, stderr_fileopen)
15160 (gdb_fopen, tee_file_new): Delete.
15161 (struct string_file): New.
15162 (struct stdio_file): New.
15163 (stdio_file_up): New.
15164 (struct stderr_file): New.
15165 (class tee_file): New.
15166 * ui-out.c (ui_out::field_stream): Take a 'string_file &' instead
15167 of a 'ui_file *'. Adjust.
15168 * ui-out.h (class ui_out) <field_stream>: Likewise.
15169 * utils.c (do_ui_file_delete, make_cleanup_ui_file_delete)
15170 (null_stream): Delete.
15171 (error_stream): Take a 'string_file &' instead of a 'ui_file *'.
15173 * utils.h (struct ui_file): Delete forward declaration..
15174 (make_cleanup_ui_file_delete, null_stream): Delete declarations.
15175 (error_stream): Take a 'string_file &' instead of a
15177 * varobj.c (varobj_value_get_print_value): Use string_file.
15178 * xtensa-tdep.c (xtensa_verify_config): Use string_file.
15179 * gdbarch.c: Regenerate.
15181 2017-02-02 Pedro Alves <palves@redhat.com>
15183 * disasm.c (gdb_disassembler::pretty_print_insn): Rename to...
15184 (gdb_pretty_print_insn): ... this. Now a free function. Add back
15185 a 'gdbarch' parameter. Allocate a mem_fileopen stream here.
15186 Adjust to call gdb_print_insn instead of
15187 gdb_disassembler::print_insn.
15188 (dump_insns, do_mixed_source_and_assembly_deprecated)
15189 (do_mixed_source_and_assembly, do_assembly_only): Add back a
15190 'gdbarch' parameter. Remove gdb_disassembler parameter.
15191 (gdb_disassembly): Don't allocate a gdb_disassembler here.
15192 * disasm.h (gdb_disassembler::pretty_print_insn): Delete
15194 (gdb_pretty_print_insn): Re-add declaration.
15195 * record-btrace.c (btrace_insn_history): Don't allocate a
15196 gdb_disassembler here. Adjust to call gdb_pretty_print_insn.
15198 2017-02-01 Simon Marchi <simon.marchi@polymtl.ca>
15200 * disasm.h (gdb_disassembly): Remove file_string parameter.
15201 * disasm.c (gdb_disassembly): Likewise.
15202 * cli/cli-cmds.c (print_disassembly): Adapt.
15203 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Likewise.
15204 * stack.c (do_gdb_disassembly): Likewise.
15206 2017-02-01 Andreas Arnez <arnez@linux.vnet.ibm.com>
15208 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): For
15209 DWARF_VALUE_LITERAL, no longer ignore the offset on big-endian
15210 targets. And if the implicit value is longer than needed, extract
15211 the first bytes instead of the "least significant" ones.
15213 2017-02-01 Markus Metzger <markus.t.metzger@intel.com>
15215 * btrace.c (btrace_enable): Do not call btrace_add_pc for
15216 BTRACE_FORMAT_PT or if can_access_registers_ptid returns false.
15217 (btrace_fetch): Assert can_access_registers_ptid.
15218 * record-btrace.c (require_btrace_thread, record_btrace_info): Call
15219 validate_registers_access.
15221 2017-02-01 Markus Metzger <markus.t.metzger@intel.com>
15223 * gdbthread.h (can_access_registers_ptid): New.
15224 * thread.c (can_access_registers_ptid): New.
15226 2017-02-01 Pedro Alves <palves@redhat.com>
15228 * i386-tdep.c (i386_fast_tracepoint_valid_at): Use gdb_insn_length.
15230 2017-01-31 Pedro Alves <palves@redhat.com>
15232 * mi/mi-interp.c (mi_breakpoint_created, mi_breakpoint_modified):
15235 2017-01-31 Pedro Alves <palves@redhat.com>
15237 * stack.c (print_frame_args): Remove local mem_fileopen stream,
15240 2017-01-31 Pedro Alves <palves@redhat.com>
15242 * varobj.c (varobj_value_get_print_value): Remove xstrdup call.
15244 2017-01-31 Pedro Alves <palves@redhat.com>
15246 * common/scoped_restore.h
15247 (scoped_restore_tmpl::scoped_restore_tmpl): Template on T2, and
15248 change the value's parameter type to T2.
15249 (make_scoped_restore): Likewise.
15251 2017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
15252 Richard Henderson <rth@redhat.com>
15254 * amd64-linux-nat.c (PTRACE_ARCH_PRCTL): New define.
15255 (amd64_linux_fetch_inferior_registers): Add case to fetch FS_BASE
15256 GS_BASE for older kernels.
15257 (amd64_linux_store_inferior_registers): Add case to store FS_BASE
15258 GS_BASE for older kernels.
15259 * amd64-linux-tdep.c (amd64_linux_gregset_reg_offset): Add FS_BASE
15260 and GS_BASE to the offset table.
15261 (amd64_linux_register_reggroup_p): Add FS_BASE and GS_BASE to the
15262 system register group.
15263 * amd64-nat.c (amd64_native_gregset_reg_offset): Implements case
15265 * amd64-tdep.c (amd64_init_abi): Add segment registers for the
15267 * amd64-tdep.h (amd64_regnum): Add AMD64_FSBASE_REGNUM and
15268 AMD64_GSBASE_REGNUM.
15269 (AMD64_NUM_REGS): Set to AMD64_GSBASE_REGNUM + 1.
15270 * features/Makefile (amd64-linux.dat, amd64-avx-linux.dat)
15271 (amd64-mpx-linux.dat, amd64-avx512-linux.dat, x32-linux.dat)
15272 (x32-avx-linux.dat, x32-avx512-linux.dat): Add
15273 i386/64bit-segments.xml in those rules.
15274 * features/i386/64bit-segments.xml: New file.
15275 * features/i386/amd64-avx-mpx-linux.xml: Add 64bit-segments.xml.
15276 * features/i386/amd64-avx-linux.xml: Add 64bit-segments.xml.
15277 * features/i386/amd64-avx512-linux.xml: Add 64bit-segments.xml.
15278 * features/i386/amd64-mpx-linux.xml: Add 64bit-segments.xml.
15279 * features/i386/x32-avx512-linux.xml: Add 64bit-segments.xml.
15280 * features/i386/x32-avx-linux.xml: Add 64bit-segments.xml.
15281 * features/i386/amd64-linux.xml: Add 64bit-segments.xml.
15282 * features/i386/amd64-avx-linux.c: Regenerated.
15283 * features/i386/amd64-avx-mpx-linux.c: Regenerated.
15284 * features/i386/amd64-avx-mpx.c: Regenerated.
15285 * features/i386/amd64-avx512-linux.c: Regenerated.
15286 * features/i386/amd64-linux.c: Regenerated.
15287 * features/i386/amd64-mpx-linux.c: Regenerated.
15288 * features/i386/i386-avx-mpx-linux.c: Regenerated.
15289 * features/i386/i386-avx-mpx.c: Regenerated.
15290 * features/i386/x32-avx-linux.c: Regenerated.
15291 * features/i386/x32-avx512-linux.c: Regenerated.
15292 * regformats/i386/amd64-avx-linux.dat: Regenerated.
15293 * regformats/i386/amd64-avx-mpx-linux.dat: Regenerated.
15294 * regformats/i386/amd64-avx512-linux.dat: Regenerated.
15295 * regformats/i386/amd64-linux.dat: Regenerated.
15296 * regformats/i386/amd64-mpx-linux.dat: Regenerated.
15297 * regformats/i386/x32-avx-linux.dat: Regenerated.
15298 * regformats/i386/x32-avx512-linux.dat: Regenerated.
15299 * regformats/i386/x32-linux.dat: Regenerated.
15301 2017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
15303 * amd64-linux-tdep.h (AMD64_LINUX_ORIG_RAX_REGNUM):
15304 Set to AMD64_NUM_REGS.
15306 2017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
15308 * amd64-nat.c (amd64_native_gregset_reg_offset): Simplify logic
15309 that checks validity of a register number.
15311 2017-01-27 Kees Cook <keescook@google.com>
15313 * gdb/arm-linux-nat.c (arm_linux_fetch_inferior_registers): Call
15314 fetch_fpregs if target has fpa registers.
15315 (arm_linux_store_inferior_registers): Call store_fpregs if target
15318 2017-01-26 Andreas Arnez <arnez@linux.vnet.ibm.com>
15320 * cris-tdep.c (cris_gdbarch_init): Remove check for
15321 info.byte_order and force it to BFD_ENDIAN_LITTLE.
15323 2017-01-26 Antoine Tremblay <antoine.tremblay@ericsson.com>
15325 * corelow.c (get_core_register_section): Check for regset
15326 existence before checking for REGSET_VARIABLE_SIZE.
15328 2017-01-26 Yao Qi <yao.qi@linaro.org>
15329 Pedro Alves <palves@redhat.com>
15332 * disasm.c (gdb_disassembler::dis_asm_memory_error): Don't
15333 call memory_error, save memaddr instead.
15334 (gdb_disassembler::print_insn): If gdbarch_print_insn returns
15335 negative, cal memory_error.
15336 * disasm.h (gdb_disassembler) <m_err_memaddr>: New field.
15338 2017-01-26 Yao Qi <yao.qi@linaro.org>
15340 * disasm-selftests.c (memory_error_test): New function.
15341 (_initialize_disasm_selftests): Register memory_error_test.
15343 2017-01-26 Yao Qi <yao.qi@linaro.org>
15345 * Makefile.in (SFILES): Add disasm-selftests.c and
15347 (COMMON_OBS): Add disasm-selftests.o and selftest-arch.o.
15348 * disasm-selftests.c: New file.
15349 * selftest-arch.c: New file.
15350 * selftest-arch.h: New file.
15352 2017-01-26 Yao Qi <yao.qi@linaro.org>
15354 * mep-tdep.c (mep_gdb_print_insn): Set info->arch
15355 to bfd_arch_mep. Don't return 0 if section is not
15356 found. Call print_insn_mep.
15358 2017-01-26 Pedro Alves <palves@redhat.com>
15359 Yao Qi <yao.qi@linaro.org>
15361 * arm-tdep.c: Include "disasm.h".
15362 (gdb_print_insn_arm): Update code to get gdbarch.
15363 * disasm.c (dis_asm_read_memory): Change it to
15364 gdb_disassembler::dis_asm_read_memory.
15365 (dis_asm_memory_error): Likewise.
15366 (dis_asm_print_address): Likewise.
15367 (gdb_pretty_print_insn): Change it to
15368 gdb_disassembler::pretty_print_insn.
15369 (dump_insns): Add one argument gdb_disassemlber. All
15371 (do_mixed_source_and_assembly_deprecated): Likewise.
15372 (do_mixed_source_and_assembly): Likewise.
15373 (do_assembly_only): Likewise.
15374 (gdb_disassembler::gdb_disassembler): New.
15375 (gdb_disassembler::print_insn): New.
15376 * disasm.h (class gdb_disassembler): New.
15377 (gdb_pretty_print_insn): Remove declaration.
15378 (gdb_disassemble_info): Likewise.
15379 * guile/scm-disasm.c (class gdbscm_disassembler): New.
15380 (gdbscm_disasm_read_memory_worker): Update.
15381 (gdbscm_disasm_read_memory): Update.
15382 (gdbscm_disasm_memory_error): Remove.
15383 (gdbscm_disasm_print_address): Remove.
15384 (gdbscm_disassembler::gdbscm_disassembler): New.
15385 (gdbscm_print_insn_from_port): Update.
15386 * mips-tdep.c: Include disasm.h.
15387 (gdb_print_insn_mips): Update code to get gdbarch.
15388 * record-btrace.c (btrace_insn_history): Update.
15389 * spu-tdep.c: Include disasm.h.
15390 (struct spu_dis_asm_data): Remove.
15391 (struct spu_dis_asm_info): New.
15392 (spu_dis_asm_print_address): Use spu_dis_asm_info to get
15394 (gdb_print_insn_spu): Cast disassemble_info to
15397 2017-01-26 Yao Qi <yao.qi@linaro.org>
15399 * disasm.c (do_ui_file_delete): Delete.
15400 (gdb_insn_length): Move code creating stream to ...
15401 * utils.c (null_stream): ... here. New function.
15402 * utils.h (null_stream): Declare.
15404 2017-01-23 Simon Marchi <simon.marchi@polymtl.ca>
15406 * python/py-inferior.c (find_thread_object): Return directly
15407 from the loop. Remove "found" variable.
15409 2017-01-21 Joel Brobecker <brobecker@adacore.com>
15411 GDB 7.12.1 released.
15413 2017-01-20 Simon Marchi <simon.marchi@ericsson.com>
15415 * python/py-function.c (fnpy_call): Reorder declarations to have
15416 the gdbpy_enter object declared first.
15417 * python/py-xmethods.c (gdbpy_get_xmethod_arg_types): Likewise.
15419 2017-01-20 Simon Marchi <simon.marchi@ericsson.com>
15422 * python/python-internal.h (PyMem_RawMalloc): Define for
15424 * python/py-gdb-readline.c (gdbpy_readline_wrapper): Use
15425 PyMem_RawMalloc instead of PyMem_Malloc.
15427 2017-01-20 Mike Wrighton <mike_wrighton@codesourcery.com>
15428 Luis Machado <lgustavo@codesourcery.com>
15430 * NEWS (New commands): Mention flash-erase.
15431 (New MI commands): Mention target-flash-erase.
15432 * mi/mi-cmds.c (mi_cmd_target_flash_erase): Add target-flash-erase MI
15434 * mi/mi-cmds.h (mi_cmd_target_flash_erase): New declaration.
15435 * mi/mi-main.c (mi_cmd_target_flash_erase): New function.
15436 * target.c (flash_erase_command): New function.
15437 (initialize_targets): Add new flash-erase command.
15438 * target.h (flash_erase_command): New declaration.
15440 2017-01-20 Joel Brobecker <brobecker@adacore.com>
15442 * nat/linux-ptrace.c: Only include <sys/procfs.h> if
15443 HAVE_SYS_PROCFS_H is defined.
15445 2017-01-18 Alan Hayward <alan.hayward@arm.com>
15447 * remote.c (struct cached_reg): Change data into a pointer.
15448 * (stop_reply_dtr): Free data pointers before deleting vector.
15449 (process_stop_reply): Likewise.
15450 (remote_parse_stop_reply): Allocate space for data
15452 2017-01-18 Alan Hayward <alan.hayward@arm.com>
15454 * amd64-tdep.c (amd64_pseudo_register_read_value): remove
15456 (amd64_pseudo_register_read_value): Likewise.
15457 * remote.c (fetch_register_using_p): Remove MAX_REGISTER_SIZE.
15458 (store_register_using_P): Likewise.
15459 * regcache.c (regcache_xfer_part): Likewise.
15461 2017-01-16 Ivo Raisr <ivo.raisr@oracle.com>
15463 Split real and pseudo registers.
15464 * sparc-tdep.h (SPARC_CORE_REGISTERS): New macro.
15465 (sparc32_pseudo_regnum): New enum.
15466 * sparc64-tdep.h (sparc64_pseudo_regnum): New enum.
15467 * sparc-tdep.c (SPARC32_FPU_REGISTERS): New macro.
15468 (SPARC32_CP0_REGISTERS): New macro.
15469 (sparc32_pseudo_register_name): New function.
15470 (sparc32_register_name): Use sparc32_pseudo_register_name.
15471 (sparc32_pseudo_register_type): New function.
15472 (sparc32_register_type): Use sparc32_pseudo_register_type.
15473 (sparc32_pseudo_register_read, sparc32_pseudo_register_write): Handle
15474 pseudo register numbers.
15475 * sparc64-tdep.c SPARC64_FPU_REGISTERS): New macro.
15476 (SPARC64_CP0_REGISTERS): New macro.
15477 (sparc64_pseudo_register_name): New function.
15478 (sparc64_register_name): Use sparc64_pseudo_register_name.
15479 (sparc64_pseudo_register_type): New function.
15480 (sparc64_register_type): Use sparc64_pseudo_register_type.
15481 (sparc64_pseudo_register_read, sparc64_pseudo_register_write): Handle
15482 pseudo register numbers.
15483 (sparc64_store_floating_fields, sparc64_extract_floating_fields,
15484 sparc64_store_arguments): Handle pseudo register numbers.
15486 2017-01-13 Yao Qi <yao.qi@linaro.org>
15488 * remote.c (REMOTE_DEBUG_MAX_CHAR): New macro.
15489 (putpkt_binary): Print only REMOTE_DEBUG_MAX_CHAR chars in debug
15491 (getpkt_or_notif_sane_1): Likewise.
15493 2017-01-13 Yao Qi <yao.qi@linaro.org>
15495 * Makefile.in (checker-headers): Use CXX and CXX_DIALET instead
15496 of CC. Pass "-x c++-header" instead of "-x c".
15498 2017-01-12 Simon Marchi <simon.marchi@ericsson.com>
15500 * remote.c (remote_can_async_p): Update comment.
15502 2017-01-12 Simon Marchi <simon.marchi@ericsson.com>
15504 * linux-nat.c (linux_nat_can_async_p): Update comment.
15506 2017-01-12 Simon Marchi <simon.marchi@ericsson.com>
15508 * serial.c (serial_open): Forget about "pc" and "lpt" serial interface.
15510 2017-01-11 Simon Marchi <simon.marchi@ericsson.com>
15512 * cli/cli-decode.c (lookup_cmd_1): Fix typo in comment.
15514 2017-01-10 Tom Tromey <tom@tromey.com>
15516 * python/py-type.c (typy_legacy_template_argument): Update.
15517 * cp-support.h (struct demangle_parse_info) (demangle_parse_info,
15518 ~demangle_parse_info): Declare new members.
15519 (cp_demangled_name_to_comp): Return unique_ptr.
15520 (cp_demangled_name_parse_free)
15521 (make_cleanup_cp_demangled_name_parse_free)
15522 (cp_new_demangle_parse_info): Remove.
15523 * cp-support.c (do_demangled_name_parse_free_cleanup)
15524 (make_cleanup_cp_demangled_name_parse_free): Remove.
15525 (inspect_type, cp_canonicalize_string_full)
15526 (cp_canonicalize_string): Update.
15527 (mangled_name_to_comp): Change return type.
15528 (cp_class_name_from_physname, method_name_from_physname)
15529 (cp_func_name, cp_remove_params): Update.
15530 * cp-name-parser.y (demangle_parse_info): New constructor, from
15531 cp_new_demangle_parse_info.
15532 (~demangle_parse_info): New destructor, from
15533 cp_demangled_name_parse_free.
15534 (cp_merge_demangle_parse_infos): Update.
15535 (cp_demangled_name_to_comp): Change return type.
15537 2017-01-10 Tom Tromey <tom@tromey.com>
15539 * top.c (prevent_dont_repeat): Change return type.
15540 * python/python.c (execute_gdb_command): Use std::string.
15542 * guile/guile.c (gdbscm_execute_gdb_command): Update.
15543 * command.h (prevent_dont_repeat): Change return type.
15544 * breakpoint.c (bpstat_do_actions_1): Update.
15546 2017-01-10 Tom Tromey <tom@tromey.com>
15548 * value.h (scoped_value_mark::~scoped_value_mark): Call
15550 (scoped_value_mark::free_to_mark): New method.
15551 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Use
15554 2017-01-10 Tom Tromey <tom@tromey.com>
15556 * python/py-value.c (valpy_dereference, valpy_referenced_value)
15557 (valpy_reference_value, valpy_const_value, valpy_get_address)
15558 (valpy_get_dynamic_type, valpy_lazy_string, valpy_do_cast)
15559 (valpy_getitem, valpy_call, valpy_binop_throw, valpy_negative)
15560 (valpy_absolute, valpy_richcompare_throw): Use scoped_value_mark.
15561 * dwarf2loc.c (dwarf2_loc_desc_get_symbol_read_needs): Use
15563 * dwarf2-frame.c (execute_stack_op): Use scoped_value_mark.
15564 * value.h (scoped_value_mark): New class.
15566 2017-01-10 Tom Tromey <tom@tromey.com>
15568 * dwarf2read.c (dwarf2_build_psymtabs): Use psymtab_discarder.
15569 * psympriv.h (make_cleanup_discard_psymtabs): Don't declare.
15570 * psymtab.c (discard_psymtabs_upto): Remove.
15571 (make_cleanup_discard_psymtabs): Remove.
15572 (struct psymtab_state): Remove.
15574 2017-01-10 Tom Tromey <tom@tromey.com>
15576 * record-full.c (record_full_save_cleanups): Remove.
15577 (record_full_save): Use gdb::unlinker.
15578 * gcore.c (do_bfd_delete_cleanup): Remove.
15579 (gcore_command): Use gdb::unlinker, unique_xmalloc_ptr. Remove
15581 * dwarf2read.c (unlink_if_set): Remove.
15582 (write_psymtabs_to_index): Use gdb::unlinker.
15583 * common/gdb_unlinker.h: New file.
15585 2017-01-10 Tom Tromey <tom@tromey.com>
15587 * windows-tdep.c (windows_xfer_shared_library): Update.
15588 * windows-nat.c (windows_make_so): Update.
15589 * utils.h (make_cleanup_bfd_unref): Remove.
15590 * utils.c (do_bfd_close_cleanup, make_cleanup_bfd_unref): Remove.
15591 * symfile.h (symfile_bfd_open)
15592 (find_separate_debug_file_in_section): Return gdb_bfd_ref_ptr.
15593 * symfile.c (read_symbols, symbol_file_add)
15594 (separate_debug_file_exists): Update.
15595 (symfile_bfd_open): Return gdb_bfd_ref_ptr.
15596 (generic_load, reread_symbols): Update.
15597 * symfile-mem.c (symbol_file_add_from_memory): Update.
15598 * spu-linux-nat.c (spu_bfd_open): Return gdb_bfd_ref_ptr.
15599 (spu_symbol_file_add_from_memory): Update.
15600 * solist.h (struct target_so_ops) <bfd_open>: Return
15602 (solib_bfd_fopen, solib_bfd_open): Return gdb_bfd_ref_ptr.
15603 * solib.c (solib_bfd_fopen, solib_bfd_open): Return
15605 (solib_map_sections, reload_shared_libraries_1): Update.
15606 * solib-svr4.c (enable_break): Update.
15607 * solib-spu.c (spu_bfd_fopen): Return gdb_bfd_ref_ptr.
15608 * solib-frv.c (enable_break2): Update.
15609 * solib-dsbt.c (enable_break): Update.
15610 * solib-darwin.c (gdb_bfd_mach_o_fat_extract): Return
15612 (darwin_solib_get_all_image_info_addr_at_init): Update.
15613 (darwin_bfd_open): Return gdb_bfd_ref_ptr.
15614 * solib-aix.c (solib_aix_bfd_open): Return gdb_bfd_ref_ptr.
15615 * record-full.c (record_full_save): Update.
15616 * python/py-objfile.c (objfpy_add_separate_debug_file): Update.
15617 * procfs.c (insert_dbx_link_bpt_in_file): Update.
15618 * minidebug.c (find_separate_debug_file_in_section): Return
15620 * machoread.c (macho_add_oso_symfile): Change abfd to
15622 (macho_symfile_read_all_oso): Update.
15623 (macho_check_dsym): Return gdb_bfd_ref_ptr.
15624 (macho_symfile_read): Update.
15625 * jit.c (bfd_open_from_target_memory): Return gdb_bfd_ref_ptr.
15626 (jit_bfd_try_read_symtab): Update.
15627 * gdb_bfd.h (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
15628 (gdb_bfd_openw, gdb_bfd_openr_iovec)
15629 (gdb_bfd_openr_next_archived_file, gdb_bfd_fdopenr): Return
15631 (gdb_bfd_ref_policy): New struct.
15632 (gdb_bfd_ref_ptr): New typedef.
15633 * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
15634 (gdb_bfd_openw, gdb_bfd_openr_iovec)
15635 (gdb_bfd_openr_next_archived_file, gdb_bfd_fdopenr): Return
15637 * gcore.h (create_gcore_bfd): Return gdb_bfd_ref_ptr.
15638 * gcore.c (create_gcore_bfd): Return gdb_bfd_ref_ptr.
15639 (gcore_command): Update.
15640 * exec.c (exec_file_attach): Update.
15641 * elfread.c (elf_symfile_read): Update.
15642 * dwarf2read.c (dwarf2_get_dwz_file): Update.
15643 (try_open_dwop_file, open_dwo_file): Return gdb_bfd_ref_ptr.
15644 (open_and_init_dwo_file): Update.
15645 (open_dwp_file): Return gdb_bfd_ref_ptr.
15646 (open_and_init_dwp_file): Update.
15647 * corelow.c (core_open): Update.
15648 * compile/compile-object-load.c (compile_object_load): Update.
15649 * common/gdb_ref_ptr.h (ref_ptr::operator->): New operator.
15650 * coffread.c (coff_symfile_read): Update.
15651 * cli/cli-dump.c (bfd_openr_or_error, bfd_openw_or_error): Return
15652 gdb_bfd_ref_ptr. Rename.
15653 (dump_bfd_file, restore_command): Update.
15654 * build-id.h (build_id_to_debug_bfd): Return gdb_bfd_ref_ptr.
15655 * build-id.c (build_id_to_debug_bfd): Return gdb_bfd_ref_ptr.
15656 (find_separate_debug_file_by_buildid): Update.
15658 2017-01-10 Tom Tromey <tom@tromey.com>
15660 * common/gdb_ref_ptr.h: New file.
15661 * python/py-ref.h (struct gdbpy_ref_policy): New.
15662 (gdbpy_ref): Now a typedef.
15664 2017-01-10 Tom Tromey <tom@tromey.com>
15666 * utils.h (make_cleanup_htab_delete): Don't declare.
15667 * utils.c (do_htab_delete_cleanup, make_cleanup_htab_delete):
15669 * linespec.c (decode_compound_collector): Add constructor,
15671 (lookup_prefix_sym): Remove cleanup.
15672 (symtab_collector): Add constructor, destructor.
15673 (collect_symtabs_from_filename): Remove cleanup.
15674 * disasm.c (do_mixed_source_and_assembly): Use htab_up.
15675 * compile/compile-c-symbols.c (generate_c_for_variable_locations):
15677 * gnu-v3-abi.c (gnuv3_print_vtable): Use htab_up.
15678 * dwarf2read.c (dw2_expand_symtabs_matching)
15679 (dw2_map_symbol_filenames, dwarf_decode_macros)
15680 (write_psymtabs_to_index): Use htab_up.
15681 * dwarf2loc.c (func_verify_no_selftailcall)
15682 (call_site_find_chain_1, func_verify_no_selftailcall)
15683 (chain_candidate, call_site_find_chain_1): Use std::unordered_set,
15684 std::vector, gdb::unique_xmalloc_ptr.
15685 (call_sitep): Remove typedef.
15686 (dwarf2_locexpr_baton_eval): Remove unused variable.
15688 2017-01-10 Tom Tromey <tom@tromey.com>
15690 * python/python-internal.h (make_cleanup_py_decref)
15691 (make_cleanup_py_xdecref): Don't declare.
15692 * python/py-utils.c (py_decref, make_cleanup_py_decref)
15693 (py_xdecref, make_cleanup_py_xdecref): Remove.
15695 2017-01-10 Tom Tromey <tom@tromey.com>
15697 * python/py-framefilter.c (py_mi_print_variables): Use gdbpy_ref.
15698 (py_print_locals, enumerate_locals, py_print_args): Use gdbpy_ref.
15700 2017-01-10 Tom Tromey <tom@tromey.com>
15702 * python/py-framefilter.c (enumerate_args): Use gdbpy_ref.
15704 2017-01-10 Tom Tromey <tom@tromey.com>
15706 * python/py-utils.c (unicode_to_encoded_string)
15707 (python_string_to_target_string)
15708 (python_string_to_target_python_string)
15709 (python_string_to_host_string, gdbpy_obj_to_string)
15710 (get_addr_from_python): Use gdbpy_ref.
15712 2017-01-10 Tom Tromey <tom@tromey.com>
15714 * python/py-unwind.c (pyuw_object_attribute_to_pointer): Use
15717 2017-01-10 Tom Tromey <tom@tromey.com>
15719 * python/python.c (eval_python_command, gdbpy_decode_line)
15720 (gdbpy_run_events, gdbpy_start_type_printers)
15721 (gdbpy_apply_type_printers): Use gdbpy_ref.
15723 2017-01-10 Tom Tromey <tom@tromey.com>
15725 * python/py-param.c (get_doc_string, compute_enum_values): Use
15728 2017-01-10 Tom Tromey <tom@tromey.com>
15730 * python/py-inferior.c (find_thread_object, build_inferior_list):
15733 2017-01-10 Tom Tromey <tom@tromey.com>
15735 * python/py-framefilter.c (py_print_frame): Use gdbpy_ref.
15737 2017-01-10 Tom Tromey <tom@tromey.com>
15739 * python/py-finishbreakpoint.c (bpfinishpy_out_of_scope): Use
15742 2017-01-10 Tom Tromey <tom@tromey.com>
15744 * python/py-cmd.c (cmdpy_completer_helper): Use gdbpy_ref. Remove
15746 (cmdpy_completer_handle_brkchars, cmdpy_completer, cmdpy_init):
15749 2017-01-10 Tom Tromey <tom@tromey.com>
15751 * python/py-breakpoint.c (gdbpy_breakpoint_cond_says_stop): Use
15754 2017-01-10 Tom Tromey <tom@tromey.com>
15756 * python/py-arch.c (archpy_disassemble): Use gdbpy_ref. Don't
15757 decref results of PyArg_ParseTupleAndKeywords.
15759 2017-01-10 Tom Tromey <tom@tromey.com>
15761 * python/python.c (python_run_simple_file): Use
15762 unique_xmalloc_ptr, gdbpy_ref.
15764 2017-01-10 Tom Tromey <tom@tromey.com>
15766 * python/py-prettyprint.c (print_stack_unless_memory_error)
15767 (print_string_repr, print_children): Use gdbpy_ref.
15768 (dummy_python_frame): New class.
15769 (dummy_python_frame::dummy_python_frame): Rename from
15770 push_dummy_python_frame.
15771 (py_restore_tstate): Remove.
15773 2017-01-10 Tom Tromey <tom@tromey.com>
15775 * python/py-framefilter.c (py_print_frame): Use gdbpy_ref.
15777 2017-01-10 Tom Tromey <tom@tromey.com>
15779 * python/python.c (ensure_python_env, restore_python_env):
15781 * python/python-internal.h (ensure_python_env): Don't declare.
15782 * varobj.h (varobj_ensure_python_env): Don't declare.
15783 * varobj.c (varobj_ensure_python_env): Remove.
15785 2017-01-10 Tom Tromey <tom@tromey.com>
15787 * varobj.c (varobj_value_get_print_value): Use
15788 gdbpy_enter_varobj.
15790 2017-01-10 Tom Tromey <tom@tromey.com>
15792 * python/py-prettyprint.c (print_string_repr, print_children):
15794 * python/py-lazy-string.c (gdbpy_extract_lazy_string): Change type
15796 * varobj.c (varobj_value_get_print_value): Update.
15797 * python/python-internal.h (gdbpy_extract_lazy_string): Update.
15799 2017-01-10 Tom Tromey <tom@tromey.com>
15801 * varobj.c (varobj_get_display_hint)
15802 (dynamic_varobj_has_child_method, install_new_value_visualizer)
15803 (varobj_set_visualizer, free_variable): Use
15804 gdbpy_enter_varobj.
15806 2017-01-10 Tom Tromey <tom@tromey.com>
15808 * python/python.c (python_command): Use gdbpy_enter, gdbpy_ref.
15809 (do_finish_initialization): New function. Use gdbpy_ref.
15810 (gdbpy_finish_initialization): Use gdbpy_enter. Call
15811 do_finish_initialization.
15813 2017-01-10 Tom Tromey <tom@tromey.com>
15815 * python/py-param.c (get_set_value, get_show_value): Use
15816 gdbpy_enter, gdbpy_ref.
15818 2017-01-10 Tom Tromey <tom@tromey.com>
15820 * python/py-function.c (fnpy_call): Use gdbpy_enter, gdbpy_ref.
15822 2017-01-10 Tom Tromey <tom@tromey.com>
15824 * python/py-cmd.c (cmdpy_function): Use gdbpy_enter, gdbpy_ref.
15826 2017-01-10 Tom Tromey <tom@tromey.com>
15828 * python/py-varobj.c (py_varobj_iter_dtor, py_varobj_iter_next):
15829 Use gdbpy_enter_varobj.
15831 2017-01-10 Tom Tromey <tom@tromey.com>
15833 * varobj.c (gdbpy_enter_varobj): New constructor.
15834 * python/python-internal.h (gdbpy_enter_varobj): New class.
15835 * python/py-varobj.c (py_varobj_get_iterator): Use
15836 gdbpy_enter_varobj.
15838 2017-01-10 Tom Tromey <tom@tromey.com>
15840 * python/py-xmethods.c (gdbpy_get_xmethod_result_type): Use
15841 gdbpy_enter, gdbpy_ref, unique_xmalloc_ptr.
15842 (gdbpy_invoke_xmethod): Use gdbpy_ref, gdbpy_enter.
15843 (gdbpy_get_xmethod_arg_types): Use gdbpy_ref,
15844 unique_xmalloc_ptr.
15845 (gdbpy_get_xmethod_arg_types): Use gdbpy_ref, gdbpy_enter.
15847 2017-01-10 Tom Tromey <tom@tromey.com>
15849 * python/py-xmethods.c (invoke_match_method): Use
15852 2017-01-10 Tom Tromey <tom@tromey.com>
15854 * python/py-xmethods.c (gdbpy_get_matching_xmethod_workers): use
15855 gdbpy_enter, gdbpy_ref.
15857 2017-01-10 Tom Tromey <tom@tromey.com>
15859 * python/python.c (python_interactive_command): Use gdbpy_enter.
15861 2017-01-10 Tom Tromey <tom@tromey.com>
15863 * python/python.c (gdbpy_before_prompt_hook): Use gdbpy_enter,
15866 2017-01-10 Tom Tromey <tom@tromey.com>
15868 * python/py-prettyprint.c (gdbpy_apply_val_pretty_printer): Use
15869 gdbpy_enter, gdbpy_ref, unique_xmalloc_ptr.
15871 2017-01-10 Tom Tromey <tom@tromey.com>
15873 * utils.h (htab_deleter): New struct.
15874 (htab_up): New typedef.
15875 * python/py-framefilter.c (gdbpy_apply_frame_filter): Use
15876 gdbpy_enter, gdbpy_ref, htab_up.
15878 2017-01-10 Tom Tromey <tom@tromey.com>
15880 * python/py-unwind.c (pending_frame_invalidate): Remove.
15881 (pyuw_sniffer): Use gdbpy_enter and gdbpy_ref.
15883 2017-01-10 Tom Tromey <tom@tromey.com>
15885 * python/py-xmethods.c (gdbpy_free_xmethod_worker_data)
15886 (gdbpy_clone_xmethod_worker_data): Use gdbpy_enter.
15888 2017-01-10 Tom Tromey <tom@tromey.com>
15890 * python/py-type.c (save_objfile_types): Use gdbpy_enter.
15892 2017-01-10 Tom Tromey <tom@tromey.com>
15894 * python/python.c (gdbpy_eval_from_control_command)
15895 (gdbpy_source_script, gdbpy_run_events)
15896 (gdbpy_source_objfile_script, gdbpy_execute_objfile_script)
15897 (gdbpy_free_type_printers, gdbpy_finish_initialization): Use
15900 2017-01-10 Tom Tromey <tom@tromey.com>
15902 * python/py-progspace.c (py_free_pspace): Use gdbpy_enter.
15904 2017-01-10 Tom Tromey <tom@tromey.com>
15906 * python/py-objfile.c (py_free_objfile): Use gdbpy_enter.
15908 2017-01-10 Tom Tromey <tom@tromey.com>
15910 * python/py-inferior.c (python_on_normal_stop, python_on_resume)
15911 (python_on_inferior_call_pre, python_on_inferior_call_post)
15912 (python_on_memory_change, python_on_register_change)
15913 (python_inferior_exit, python_new_objfile, add_thread_object)
15914 (delete_thread_object, py_free_inferior): Use gdbpy_enter.
15916 2017-01-10 Tom Tromey <tom@tromey.com>
15918 * python/py-finishbreakpoint.c (bpfinishpy_handle_stop)
15919 (bpfinishpy_handle_exit): Use gdbpy_enter.
15921 2017-01-10 Tom Tromey <tom@tromey.com>
15923 * python/py-cmd.c (cmdpy_destroyer)
15924 (cmdpy_completer_handle_brkchars, cmdpy_completer): Use
15927 2017-01-10 Tom Tromey <tom@tromey.com>
15929 * python/py-breakpoint.c (gdbpy_breakpoint_cond_says_stop): Use
15931 (gdbpy_breakpoint_has_cond): Likewise.
15933 2017-01-10 Tom Tromey <tom@tromey.com>
15935 * python/python.c (gdbpy_enter): New constructor.
15936 (~gdbpy_enter): New destructor.
15937 (restore_python_env, ensure_python_env): Rewrite.
15938 * python/python-internal.h (gdbpy_enter): New class.
15940 2017-01-10 Tom Tromey <tom@tromey.com>
15942 * python/py-symbol.c (gdbpy_lookup_symbol): Use gdbpy_ref.
15944 2017-01-10 Tom Tromey <tom@tromey.com>
15946 * python/py-value.c (value_has_field, get_field_flag)
15947 (get_field_type, valpy_getitem, convert_value_from_python): Use
15950 2017-01-10 Tom Tromey <tom@tromey.com>
15952 * python/python.c (gdbpy_progspaces, gdbpy_objfiles): Use
15955 2017-01-10 Tom Tromey <tom@tromey.com>
15957 * python/py-prettyprint.c (search_pp_list)
15958 (find_pretty_printer_from_objfiles)
15959 (find_pretty_printer_from_progspace)
15960 (find_pretty_printer_from_gdb, find_pretty_printer)
15961 (gdbpy_get_display_hint, gdbpy_get_varobj_pretty_printer): Use
15964 2017-01-10 Tom Tromey <tom@tromey.com>
15966 * python/py-param.c (call_doc_function): Use gdbpy_ref.
15968 2017-01-10 Tom Tromey <tom@tromey.com>
15970 * python/py-linetable.c (build_line_table_tuple_from_pcs)
15971 (ltpy_get_all_source_lines): Use gdbpy_ref.
15973 2017-01-10 Tom Tromey <tom@tromey.com>
15975 * python/py-framefilter.c (extract_sym, extract_value)
15976 (get_py_iter_from_func, bootstrap_python_frame_filters): Use
15979 2017-01-10 Tom Tromey <tom@tromey.com>
15981 * python/py-breakpoint.c (gdbpy_breakpoints): Use gdbpy_ref.
15983 2017-01-10 Tom Tromey <tom@tromey.com>
15985 * python/py-inferior.c (gdbpy_inferiors): Use gdbpy_ref.
15987 2017-01-10 Tom Tromey <tom@tromey.com>
15989 * python/py-function.c (convert_values_to_python, fnpy_init): Use
15992 2017-01-10 Tom Tromey <tom@tromey.com>
15994 * python/py-cmd.c (gdbpy_string_to_argv): Use gdbpy_ref.
15996 2017-01-10 Tom Tromey <tom@tromey.com>
15998 * python/py-type.c (convert_field, make_fielditem, typy_fields)
15999 (typy_range): Use gdbpy_ref.
16001 2017-01-10 Tom Tromey <tom@tromey.com>
16003 * python/py-threadevent.c (create_thread_event_object): Use
16005 * python/py-stopevent.c (create_stop_event_object): Simplify.
16006 (emit_stop_event): Use gdbpy_ref.
16007 * python/py-signalevent.c (create_signal_event_object): Use
16009 * python/py-newobjfileevent.c (create_new_objfile_event_object)
16010 (emit_new_objfile_event, create_clear_objfiles_event_object)
16011 (emit_clear_objfiles_event): Use gdbpy_ref.
16012 * python/py-infevents.c (create_inferior_call_event_object)
16013 (create_register_changed_event_object)
16014 (create_memory_changed_event_object, emit_inferior_call_event)
16015 (emit_memory_changed_event, emit_register_changed_event): Use
16017 * python/py-exitedevent.c (create_exited_event_object)
16018 (emit_exited_event): Use gdbpy_ref.
16019 * python/py-event.h (evpy_emit_event): Remove
16020 CPYCHECKER_STEALS_REFERENCE_TO_ARG annotation.
16021 * python/py-event.c (evpy_emit_event): Use gdbpy_ref.
16022 * python/py-continueevent.c (emit_continue_event): Use
16024 * python/py-breakpoint.c (gdbpy_breakpoint_created)
16025 (gdbpy_breakpoint_deleted, gdbpy_breakpoint_modified): Use
16027 * python/py-bpevent.c (create_breakpoint_event_object): Use
16030 2017-01-10 Tom Tromey <tom@tromey.com>
16032 * python/py-ref.h: New file.
16034 2017-01-10 Simon Marchi <simon.marchi@ericsson.com>
16036 * cli-out.c (cli_ui_out::do_redirect): Change return type to
16038 * cli-out.h (cli_ui_out::do_redirect): Likewise.
16039 * mi/mi-out.c (mi_ui_out::do_redirect): Likewise.
16040 * mi/mi-out.h (mi_ui_out::do_redirect): Likewise.
16041 * ui-out.c (ui_out::redirect): Likewise.
16042 * ui-out.h (ui_out::redirect, ui_out::do_redirect): Likewise.
16043 * cli/cli-logging.c (set_logging_redirect): Update call site of
16045 (handle_redirections): Likewise.
16046 * scm-ports.c (ioscm_with_output_to_port_worker): Likewise.
16047 * top.c (execute_command_to_string): Likewise.
16048 * utils.c (do_ui_out_redirect_pop): Likewise.
16050 2017-01-10 Simon Marchi <simon.marchi@ericsson.com>
16052 * stack.c (_initialize_stack): Update "frame" command help message.
16054 2017-01-08 Iain Buclaw <ibuclaw@gdcproject.org>
16056 * d-exp.y (CastExpression): Emit UNOP_CAST_TYPE.
16058 2017-01-06 Yao Qi <yao.qi@linaro.org>
16060 * x86-linux-nat.h: Include gdb_proc_service.h.
16062 2017-01-06 Yao Qi <yao.qi@linaro.org>
16064 * ser-base.h: Include serial.h.
16066 2017-01-06 Yao Qi <yao.qi@linaro.org>
16068 * ppc-linux-tdep.h: Include ppc-tdep.h.
16070 2017-01-06 Yao Qi <yao.qi@linaro.org>
16072 * nat/amd64-linux-siginfo.h: Include signal.h.
16074 2017-01-06 Yao Qi <yao.qi@linaro.org>
16076 * nat/aarch64-linux-hw-point.h: Include break-common.h.
16078 2017-01-06 Yao Qi <yao.qi@linaro.org>
16080 * mi/mi-parse.h: Include mi-cmds.h.
16082 2017-01-06 Yao Qi <yao.qi@linaro.org>
16084 * inf-loop.c: Don't include "target.h".
16085 * inf-loop.h: Include it here.
16087 2017-01-06 Yao Qi <yao.qi@linaro.org>
16089 * dfp.h: Include "dboulest.h" and "expression.h".
16091 2017-01-06 Yao Qi <yao.qi@linaro.org>
16093 * ax-gdb.h: Include "ax.h".
16095 2017-01-06 Yao Qi <yao.qi@linaro.org>
16097 * Makefile.in (HFILES_NO_SRCDIR): Replace gdb_ptrace.h
16098 with nat/gdb_ptrace.h.
16100 2017-01-05 Yao Qi <yao.qi@linaro.org>
16102 * mips-fbsd-tdep.c (mips_fbsd_sigframe_init): Move && to
16104 (mips64_fbsd_sigframe_init): Likewise.
16106 2017-01-04 John Baldwin <jhb@FreeBSD.org>
16108 * mips-fbsd-tdep.c (_initialize_mips_fbsd_tdep): Use
16109 GDB_OSABI_FREEBSD instead of GDB_OSABI_FREEBSD_ELF.
16111 2017-01-04 John Baldwin <jhb@FreeBSD.org>
16113 * Makefile.in (ALLDEPFILES): Add mips-fbsd-nat.c.
16114 * NEWS: Mention new FreeBSD/mips native configuration.
16115 * config/mips/fbsd.mh: New file.
16116 * configure.host: Add mips*-*-freebsd*.
16117 * mips-fbsd-nat.c: New file.
16119 2017-01-04 John Baldwin <jhb@FreeBSD.org>
16121 * Makefile.in (ALL_TARGET_OBS): Add mips-fbsd-tdep.o.
16122 (ALLDEPFILES): Add mips-fbsd-tdep.c.
16123 * NEWS: Mention new FreeBSD/mips target.
16124 * configure.tgt: Add mips*-*-freebsd*.
16125 * mips-fbsd-tdep.c: New file.
16126 * mips-fbsd-tdep.h: New file.
16128 2017-01-04 Yao Qi <yao.qi@linaro.org>
16130 * dwarf2loc.c (write_pieced_value): Don't use VALUE_FRAME_ID (to),
16131 use c->frame_id when the piece location is DWARF_VALUE_REGISTER.
16133 2017-01-01 Joel Brobecker <brobecker@adacore.com>
16135 Update copyright year range in all GDB files.
16137 2017-01-01 Joel Brobecker <brobecker@adacore.com>
16139 * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2016.
16141 For older changes see ChangeLog-2016.
16147 version-control: never